Exemplo n.º 1
0
include_once D_P . 'data/bbscache/forum_cache.php';
require_once R_P . 'admin/cache.php';
!is_array($manager) && ($manager = array());
!is_array($manager_pwd) && ($manager_pwd = array());
$newmanager = $newmngpwd = array();
foreach ($manager as $key => $value) {
    if (!empty($value) && !is_array($value)) {
        $newmanager[$key] = $value;
        $newmngpwd[$key] = $manager_pwd[$key];
    }
}
$manager = $newmanager;
$manager_pwd = $newmngpwd;
$H_url = $db_wwwurl;
$B_url = $db_bbsurl;
if ($database == 'mysqli' && Pwloaddl('mysqli') === false) {
    $database = 'mysql';
}
$bbsrecordfile = D_P . 'data/bbscache/admin_record.php';
!file_exists($bbsrecordfile) && writeover($bbsrecordfile, "<?php die;?>\n");
$F_count = F_L_count($bbsrecordfile, 2000);
$L_T = 1200 - ($timestamp - pwFilemtime($bbsrecordfile));
$L_left = 15 - $F_count;
if ($F_count > 15 && $L_T > 0) {
    $db_adminrecord = 0;
    Cookie('AdminUser', '', 0);
    adminmsg('login_fail');
}
if (empty($manager)) {
    include PrintEot('unloginleft');
    adminmsg('sql_config');
Exemplo n.º 2
0
 if ($manager_pwd !== $manager_ckpwd) {
     Promptmsg('error_ckpwd');
 }
 $manager_pwd = md5($manager_pwd);
 $charset = str_replace('-', '', $lang['db_charset']);
 require R_P . 'require/db_mysql.php';
 $db = new DB($dbhost, $dbuser, $dbpw, '', $pconnect);
 $masterDb = $db->getMastdb();
 $mysqlinfo = mysql_get_server_info($masterDb->sql);
 if ($database == 'mysqli') {
     if ($mysqlinfo < '4.1.3') {
         $database = 'mysql';
         $mysqlimsg = $lang['error_mysqli'];
     } else {
         ob_end_clean();
         if (Pwloaddl('mysqli') === false) {
             $database = 'mysql';
             $mysqlimsg = $lang['error_mysqli'];
         }
         ob_start();
         $steptitle = $step;
     }
 }
 $manager = array($manager);
 $manager_pwd = array($manager_pwd);
 $newconfig = array('dbhost' => $dbhost, 'dbuser' => $dbuser, 'dbpw' => $dbpw, 'dbname' => $dbname, 'database' => $database, 'PW' => $PW, 'pconnect' => 0, 'charset' => $charset, 'manager' => $manager, 'manager_pwd' => $manager_pwd, 'db_hostweb' => 1, 'attach_url' => array());
 $tplpath = 'wind';
 require_once R_P . 'require/updateset.php';
 write_config($newconfig);
 unset($newconfig);
 if ($mysqlinfo > '4.1') {