Exemple #1
0
    exit;
}
if (isset($_GET['todo']) && $_GET['todo'] == 'activedeactive') {
    $tid = isset($_GET['tid']) ? $_GET['tid'] : '';
    $row = mysql_fetch_array(mysql_query("select is_active from user where id='" . $tid . "'"));
    $action = $row['is_active'] == 1 ? '0' : '1';
    mysql_query("update user set is_active='" . $action . "' where id='" . $tid . "'");
    $_SESSION['msg'] = "your status has been changed";
    header("Location:index.php");
    exit;
}
if (isset($_GET['todo']) && $_GET['todo'] == 'setord') {
    $tid = isset($_GET['tid']) ? $_GET['tid'] : '';
    $action = isset($_GET['action']) ? $_GET['action'] : '';
    setord('user', $action, $tid);
    re_arrange('user');
    header("Location:index.php");
    exit;
}
if (isset($_GET['todo']) && $_GET['todo'] == 'del') {
    mysql_query("delete from user where id=" . $_GET['user_id']);
    $_SESSION['msg'] = "Your user has been deleted sucessfully";
    header("Location:index.php");
    exit;
}
?>

<!DOCTYPE html>
<html>
    <head>
        <title>Admin</title>
Exemple #2
0
    $cond .= " and photos Like '%" . $_GET['keyWord'] . "%'";
}
if (isset($_GET['todo']) && $_GET['todo'] == 'del') {
    $rs = mysql_query("select file_name from file where id=" . $_GET['user_id']);
    $row = mysql_fetch_array($rs);
    unlink($_SERVER['DOCUMENT_ROOT'] . $frntBasePath . '/uploads/' . $row['fileName']);
    mysql_query("delete from photos where id=" . $_GET['user_id']);
    $_SESSION['msg'] = "Your user has been deleted sucessfully";
    header("Location:index.php");
    exit;
}
if (isset($_GET['todo']) && $_GET['todo'] == 'setord') {
    $tid = isset($_GET['tid']) ? $_GET['tid'] : '';
    $action = isset($_GET['action']) ? $_GET['action'] : '';
    setord('photos', $action, $tid);
    re_arrange('photos');
    header("Location:index.php");
    exit;
}
if (isset($_GET['todo']) && $_GET['todo'] == 'activedeactive') {
    $tid = isset($_GET['tid']) ? $_GET['tid'] : '';
    $row = mysql_fetch_array(mysql_query("select is_active from photos where id='" . $tid . "'"));
    $action = $row['is_active'] == 1 ? '0' : '1';
    mysql_query("update photos set is_active='" . $action . "' where id='" . $tid . "'");
    $_SESSION['msg'] = "your status has been changed";
    header("Location:index.php");
    exit;
}
if (isset($_POST['formact']) && $_POST['formact'] == 'del') {
    $checkIndi = array();
    $checkIndi = isset($_POST['checkIndi']) ? $_POST['checkIndi'] : '';