function CreateCheckCode()
 {
     met_cooike_start();
     $this->mCheckCode = strtoupper(substr(md5(rand()), 0, $this->mCheckCodeNum));
     change_met_cookie('met_capcha', '');
     change_met_cookie('met_capcha', $this->mCheckCode);
     save_met_cookie();
     return $this->mCheckCode;
 }
    $shortcut = array();
    $query = "select * from {$met_language} where value='{$name}' and lang='{$lang}'";
    $lang_shortcut = $db->get_one($query);
    $shortcut['name'] = $lang_shortcut ? 'lang_' . $lang_shortcut['name'] : urlencode($name);
    $shortcut['url'] = $url;
    $shortcut['bigclass'] = $bigclass;
    $shortcut['field'] = $field;
    $shortcut['type'] = '2';
    $shortcut['list_order'] = $list_order;
    $shortcut['protect'] = '0';
    $shortcut['hidden'] = '0';
    foreach ($shortcut_list as $key => $val) {
        $shortcut_list[$key][name] = $shortcut_list[$key][lang];
    }
    $shortcut_list[] = $shortcut;
    change_met_cookie('metinfo_admin_shortcut', $shortcut_list);
    save_met_cookie();
    $query = "update {$met_admin_table} set admin_shortcut='" . json_encode($shortcut_list) . "' where admin_id='{$metinfo_admin_name}'";
    $db->query($query);
    echo '<script type="text/javascript">parent.window.location.reload();</script>';
    die;
    //metsave('../system/shortcut.php?anyid='.$anyid.'&lang='.$lang.'&cs='.$cs);
} else {
    $query = "select * from {$met_app} where download=1";
    $app = $db->get_all($query);
    $css_url = "../templates/" . $met_skin . "/css";
    $img_url = "../templates/" . $met_skin . "/images";
    include template('system/shortcut_editor');
    footer();
}
# This program is an open source system, commercial use, please consciously to purchase commercial license.
Beispiel #3
0
Datei: head.php Projekt: nanfs/lt
            $link_com[] = $list;
        }
        $link[] = $list;
    }
}
if ($met_member_use and $metaccess) {
    if ($index != "index") {
        $met_js_access = "<script type='text/javascript' id='metccde'>\nvar jsFile = document.createElement('script');\njsFile.setAttribute('type','text/javascript');\njsFile.setAttribute('src','../include/access.php?&metmemberforce={$metmemberforce}&metuser={$metuser}&lang={$lang}&metaccess={$metaccess}&random='+Math.random());\ndocument.getElementsByTagName('head').item(0).appendChild(jsFile);\n</script>";
        $query = "select * from {$met_admin_array} where id='{$metaccess}'";
        $metaccess = $db->get_one($query);
        if (intval($metinfo_member_type) < intval($metaccess)) {
            met_cooike_unset();
            change_met_cookie('metinfo_member_name', $metinfo_member_name);
            change_met_cookie('metinfo_member_pass', $metinfo_member_pass);
            change_met_cookie('metinfo_member_type', $metinfo_member_type);
            change_met_cookie('metinfo_admin_name', $metinfo_admin_name);
            save_met_cookie();
            okinfo('../member/' . $member_index_url . '&referer=' . urlencode(request_uri()), $lang_access);
        }
    }
}
$listimg['news'] = $listnew['news'];
$hitslistimg['news'] = $hitslistnew['news'];
$classlistimg['news'] = $classlistnew['news'];
$hitsclasslistimg['news'] = $hitsclasslistnew['news'];
if ($class_list[$class_list[$classnow]['releclass']]['module'] > 5 and count($nav_list2[$class_list[$classnow]['releclass']])) {
    $nav_list2[$class_list[$classnow]['releclass']][count($nav_list2[$class_list[$classnow]['releclass']])] = $class_list[$class_list[$classnow]['releclass']];
}
if ($met_img_style) {
    switch ($class_list[$classnow]['module']) {
        case 2:
Beispiel #4
0
$query = "select * from {$tablepre}config where name='met_tablename' and lang='metinfo'";
$mettable = $db->get_one($query);
$mettables = explode('|', $mettable[value]);
foreach ($mettables as $key => $val) {
    $tablename = 'met_' . $val;
    ${$tablename} = $tablepre . $val;
    $_M['table'][$tablename] = $tablepre . $val;
}
require_once ROOTPATH . 'include/cache.func.php';
require_once ROOTPATH . 'config/config.inc.php';
met_cooike_start();
$metmemberforce == $met_member_force;
if ($metmemberforce == $met_member_force) {
    change_met_cookie('metinfo_member_name', "force");
    change_met_cookie('metinfo_member_pass', "force");
    change_met_cookie('metinfo_member_type', "256");
    save_met_cookie();
}
$_M['user']['cookie'] = $met_cookie;
if ($met_member_use != 0) {
    $metinfo_member_id = get_met_cookie('metinfo_admin_id') == "" ? get_met_cookie('metinfo_member_id') : get_met_cookie('metinfo_admin_id');
    $metinfo_member_name = get_met_cookie('metinfo_admin_name') == "" ? get_met_cookie('metinfo_member_name') : get_met_cookie('metinfo_admin_name');
    $metinfo_member_pass = get_met_cookie('metinfo_admin_pass') == "" ? get_met_cookie('metinfo_member_pass') : get_met_cookie('metinfo_admin_pass');
    $metinfo_member_type = get_met_cookie('metinfo_admin_type') == "" ? get_met_cookie('metinfo_member_type') : '256';
    $metinfo_admin_name = get_met_cookie('metinfo_admin_name');
    if ($metinfo_member_name == '' or $metinfo_member_pass == '') {
        $metinfo_member_type = 0;
    }
} else {
    $metinfo_member_type = "256";
}
Beispiel #5
0
         echo "<script type='text/javascript'> alert('{$lang_loginpass}');location.href='login.php';</script>";
         exit;
     } else {
         login_met_cookie($metinfo_admin_name);
         met_cooike_start();
         change_met_cookie('metinfo_admin_name', $metinfo_admin_name);
         change_met_cookie('metinfo_admin_pass', $metinfo_admin_pass);
         change_met_cookie('metinfo_admin_id', $admincp_list['id']);
         change_met_cookie('metinfo_admin_type', $admincp_list['usertype']);
         change_met_cookie('metinfo_admin_pop', $admincp_list['admin_type']);
         change_met_cookie('metinfo_admin_time', $m_now_time);
         change_met_cookie('metinfo_admin_lang', $admincp_list['langok']);
         change_met_cookie('metinfo_admin_shortcut', json_decode($admincp_list['admin_shortcut']));
         if ($_GET[langset] != '') {
             $_GET[langset] = daddslashes($_GET[langset], 0, 1);
             change_met_cookie('languser', $_GET[langset]);
             save_met_cookie();
         }
         save_met_cookie();
         $query = "update {$met_admin_table} set \n\t\tadmin_modify_date='{$m_now_date}',\n\t\tadmin_login=admin_login+1,\n\t\tadmin_modify_ip='{$m_user_ip}'\n\t\tWHERE admin_id = '{$metinfo_admin_name}'";
         $db->query($query);
     }
 }
 $adminlang = explode('-', $admincp_list[langok]);
 if ($admincp_list[langok] != 'metinfo' and !strstr($admincp_list[langok], "-" . $met_index_type . "-")) {
     $lang = $adminlang[1];
 }
 $filejs = ROOTPATH_ADMIN . 'include/metvar.js';
 $strlen = file_put_contents($filejs, $js);
 if ($metinfo_mobile) {
     Header("Location: ../index.php");
    if (!$membercp_list) {
        echo "<script type='text/javascript'> alert('{$lang_membernameno}'); window.history.back();</script>";
        exit;
    } elseif ($membercp_list['admin_pass'] !== $metinfo_member_pass) {
        echo "<script type='text/javascript'> alert('{$lang_memberpassno}'); window.history.back();</script>";
        exit;
    } elseif ($membercp_list['checkid'] !== '1') {
        echo "<script type='text/javascript'> alert('{$lang_membernodo}'); window.history.back();</script>";
        exit;
    } else {
        met_cooike_start();
        change_met_cookie('metinfo_member_name', $metinfo_member_name);
        change_met_cookie('metinfo_member_pass', $metinfo_member_pass);
        change_met_cookie('metinfo_member_id', $membercp_list[id]);
        change_met_cookie('metinfo_member_type', $membercp_list['usertype']);
        change_met_cookie('metinfo_member_time', $m_now_time);
        save_met_cookie();
        $query = "update {$met_admin_table} set \n\t\t  admin_modify_date='{$m_now_date}',\n\t\t  admin_login=admin_login+1,\n\t\t  admin_modify_ip='{$m_user_ip}'\n\t\t  WHERE admin_id = '{$metinfo_member_name}'";
        $db->query($query);
    }
    if ($remember == 1) {
        setcookie("name", $metinfo_member_name, mktime() + 86400 * 7, "/");
        //7 days
        setcookie("ps", $metinfo_member_pass, mktime() + 86400 * 7, "/");
    }
    Header("Location:{$returnurl}");
} else {
    if ($memberindex != "metinfo") {
        $returnurl = "login_member.php?lang=" . $lang;
        if (!$metinfo_member_name || !$metinfo_member_pass) {
            met_cooike_unset();