Example #1
0
     $query = "UPDATE {$met_config} set value='{$lang_index_type}' where name='met_index_type' and lang='metinfo'";
 } else {
     if ($cndata == "yes" or $cndata != "yes" and $endata != "yes" and $tcdata != "yes") {
         $query = "UPDATE {$met_config} set value='cn' where name='met_index_type' and lang='metinfo'";
     } else {
         if ($endata == "yes") {
             $query = "UPDATE {$met_config} set value='en' where name='met_index_type' and lang='metinfo'";
         } else {
             $query = "UPDATE {$met_config} set value='tc' where name='met_index_type' and lang='metinfo'";
         }
     }
 }
 mysql_query($query) or die('写入数据库失败: ' . mysql_error());
 @chmod('../config/config_db.php', 0554);
 require_once '../include/mysql_class.php';
 $db = new dbmysql();
 $db->dbconn($con_db_host, $con_db_id, $con_db_pass, $con_db_name);
 $conlist = $db->get_one("SELECT * FROM {$met_config} WHERE name='met_weburl'");
 $met_weburl = $conlist[value];
 $indexcont = $db->get_one("SELECT * FROM {$met_config} WHERE name='met_index_content' and lang='cn'");
 if ($indexcont) {
     $index_content = str_replace("#metinfo#", $met_weburl, $indexcont[value]);
     $query = "update {$met_config} SET value = '{$index_content}' where name='met_index_content' and lang='cn'";
     $db->query($query);
 }
 $showlist = $db->get_all("SELECT * FROM {$met_column} WHERE module='1'");
 if ($showlist) {
     foreach ($showlist as $key => $val) {
         $contentx = str_replace("#metinfo#", $met_weburl, $val[content]);
         $query = "update {$met_column} SET content = '{$contentx}' where id='{$val['id']}'";
         $db->query($query);
Example #2
0
require_once ROOTPATH . 'include/mysql_class.php';
define('MAGIC_QUOTES_GPC', get_magic_quotes_gpc());
isset($_REQUEST['GLOBALS']) && exit('Access Error');
require_once ROOTPATH . 'include/global.func.php';
foreach (array('_COOKIE', '_POST', '_GET') as $_request) {
    foreach (${$_request} as $_key => $_value) {
        $_key[0] != '_' && (${$_key} = daddslashes($_value, 0, 0, 1));
        $_M['from'][$_key] = daddslashes($_value, 0, 0, 1);
    }
}
$met_cookie = array();
$settings = array();
$db_settings = array();
$db_settings = parse_ini_file(ROOTPATH . 'config/config_db.php');
@extract($db_settings);
$db = new dbmysql();
$db->dbconn($con_db_host, $con_db_id, $con_db_pass, $con_db_name);
$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");
Example #3
0
            $applistfile = ROOTPATH . 'app/app/' . $val . '/plugin/' . 'plugin_' . $val . '.class.php';
            $_M['url']['own'] = $_M['url']['site'] . 'app/app/' . $val . '/';
            if (file_exists($applistfile) && !is_dir($applistfile) && file_get_contents($applistfile) != 'metinfo') {
                require_once $applistfile;
                $app_plugin_name = str_replace('.class.php', '', 'plugin_' . $val);
                if (class_exists($app_plugin_name)) {
                    $newclass = new $app_plugin_name();
                    if (method_exists($newclass, 'doadmin')) {
                        call_user_func(array($newclass, 'doadmin'));
                    }
                }
            }
        }
        $_M['url']['own'] = '';
        DB::close();
        $db = new dbmysql();
        $db->dbconn($con_db_host, $con_db_id, $con_db_pass, $con_db_name);
    }
}
//结束
/*管理员权限处理*/
$admin_list = $db->get_one("SELECT * FROM {$met_admin_table} WHERE admin_id='{$metinfo_admin_name}'");
$metinfo_admin_pop = $admin_list['admin_type'];
if ($metinfo_admin_pop != "metinfo") {
    $admin_pop = explode('-', $metinfo_admin_pop);
    $admin_poptext = "admin_pop";
    foreach ($admin_pop as $key => $val) {
        $admin_poptext1 = $admin_poptext . ($val = $val);
        ${$admin_poptext1} = "metinfo";
    }
}