Notice: Undefined index: 9 in /medals.php on line 163
Notice: Undefined index: 4 in medals.php on line 163
Notice: Undefined index: 3 in /medals.php on line 163
Notice: Undefined index: 12 in /medals.php on line 163
Notice: Undefined index: 8 in /medals.php on line 163
Notice: Undefined index: 6 in /medals.php on line 163
Notice: Undefined index: 7 in /medals.php on line 163
Такие ошибки сыпятся, линия:
if ( $user_list[$i] != -1 )
{
$where_sql .= ( ( $where_sql != '' ) ? ', ' : '' ) . intval($user_list[$i]);
}163 последняя скобка }
Весь кусок кода:
else if ( !empty($_POST['unmedal_user']) )
{
$where_sql = '';
if ( isset($_POST['unmedal_user']) )
{
$user_list = $_POST['unmedal_user'];
for($i = 0; $i < count($user_list); $i++)
{
if ( $user_list[$i] != -1 )
{
$where_sql .= ( ( $where_sql != '' ) ? ', ' : '' ) . intval($user_list[$i]);
}
}
}
if ( $where_sql != '' )
{
$sql = "DELETE FROM " . BB_MEDAL_USER . "
WHERE issue_id IN ($where_sql)";
if ( !DB()->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't delete medal info from user", "", __LINE__, __FILE__, $sql);
}
}
$message = $lang['MEDAL_UPDATE_SUCESSFUL'] . '<br /><br />' . sprintf($lang['CLICK_RETURN_MEDAL'], '<a href="' . "medalcp.php?" . POST_MEDAL_URL . "=$medal_id&sid=".$userdata['session_id']."" . '">', '</a>');
}