コード例 #1
0
ファイル: index.php プロジェクト: burak-tekin/CMScout2
$scriptList['mooRainbow'] = 0;
$scriptList['mootabs'] = 0;
$scriptList['slimbox'] = 0;
$scriptList['tinyAdv'] = 0;
$scriptList['tinySimp'] = 0;
$tpl->assign("templateinfo", $templateinfo);
$islogged = false;
if (isset($_GET['action'])) {
    $action = $_GET['action'];
} else {
    $action = "";
}
if ($action == 'logout') {
    $islogged = false;
    $check = $Auth->logout();
    $tempcss = change_theme_dir();
    $loggedout = true;
    $panel = false;
    $tpl->assign('adminpanel', $panel);
    show_message("You have been logged out.");
    exit;
}
/********************************************Begin Initilization of page****************************************/
require_once "menu.php";
$tpl->assign('logout', $logout);
$tpl->assign('islogout', '0');
if (isset($check["uname"]) && $check['id'] != -1) {
    $tpl->assign('name', $check["uname"]);
    $sql = $data->select_query("usergroups", "WHERE userid = {$check['id']}");
    $adminpanel = 0;
    while ($temp = $data->fetch_array($sql)) {
コード例 #2
0
ファイル: profile.php プロジェクト: burak-tekin/CMScout2
 $custom = serialize($custom);
 if ($errors != "<span id=\"error\">") {
     $errors .= "</span>";
     $exit = true;
 } else {
     $errors = "";
 }
 if (!$exit) {
     $insertSQL = sprintf("firstname=%s, lastname=%s, email=%s, newtopic=%s, allowemail=%s, newpm=%s, sig=%s, publicprofile=%s, showemail=%s, showname=%s, showrecord=%s,replytopic=%s, newarticle=%s, newevent=%s, newalbum=%s, newnews=%s, newdownload=%s, newpoll=%s, custom=%s", safesql($_POST['firstname'], "text"), safesql($_POST['lastname'], "text"), safesql($_POST['email'], "text"), safesql($_POST['newtopic'], "int"), safesql($_POST['allowemail'], "int"), safesql($_POST['newpm'], "int"), safesql($sig, "text"), safesql($_POST['publicprofile'], "int"), safesql($_POST['showemail'], "int"), safesql($_POST['showname'], "int"), safesql($_POST['showrecord'], "int"), safesql($_POST['replytopic'], "int"), safesql($_POST['newarticle'], "int"), safesql($_POST['newevent'], "int"), safesql($_POST['newalbum'], "int"), safesql($_POST['newnews'], "int"), safesql($_POST['newdownload'], "int"), safesql($_POST['newpoll'], "int"), safesql($custom, "text"));
     if ($_FILES['avy']['name'] != '') {
         $insertSQL .= ", avyfile=" . $avyfilename;
     }
     $Result1 = $data->update_query("users", $insertSQL, "id={$id}", "", "", false);
     if ($Result1) {
         $themeid = $_POST['theme'];
         $templateinfo = isset($themeid) ? change_theme_dir($themeid) : change_theme_dir();
         $tpl->assign("templateinfo", $templateinfo);
         $zone = $_POST['zone'];
         $pass = md5($_POST['newpassword']);
         $repass = md5($_POST['repassword']);
         if ($pass != $repass) {
             show_message("Passwords don't match", "index.php?page=profile");
         }
         $oldpass = $check['passwd'];
         if ($pass == $oldpass) {
             $pass = $oldpass;
         } elseif ($pass == md5('')) {
             $pass = $oldpass;
         }
         $insertSQL = sprintf("passwd=%s, theme_id=%s, timezone=%s", safesql($pass, "text"), safesql($themeid, "int"), safesql($zone, "int"));
         $Result2 = $data->update_query("users", $insertSQL, "id={$id}", "", "", false);