コード例 #1
0
ファイル: user.php プロジェクト: nikita0905/Intern_Project
    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 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>
コード例 #2
0
ファイル: index.php プロジェクト: nikita0905/Intern_Project
if (isset($_GET['formact']) && $_GET['formact'] == 'search') {
    $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();