<?php define("IN_KEKE", TRUE); include '../app_comm.php'; require S_ROOT . 'update/file/kppw.php'; require S_ROOT . 'update/DbUtilities.php'; $DbUtilities = new DbUtilities(); $DbUtilities->dbUpdate($dbArr); foreach ($dbArr as $table => $fields) { $filepath = S_ROOT . 'update/sqldata/' . $table . '.php'; if (file_exists($filepath)) { require $filepath; } } unset($dbArr); unset($DbUtilities); $file_obj = new keke_file_class(); $file_obj->delete_files(S_ROOT . "/data/data_cache/"); $file_obj->delete_files(S_ROOT . "/data/tpl_c/"); header('Refresh: 3; url=../index.php?do=index'); echo '升级成功...<br />'; echo '页面跳转中...<br />';
$slt = randomkeys(6); // 随机码 $sec_code = get_password($password, $slt); if ($data_type == 'b') { // 演示版本,更新数据 $db->query("update `{$tablepre}witkey_member` set username = '******',password = '******',email = '{$admin_email}',rand_code='{$slt}' where uid = 1"); $db->query("update `{$tablepre}witkey_space` set username = '******',password = '******',email = '{$admin_email}',sec_code='{$sec_code}',group_id = 1,status = 1 where uid = 1"); } else { // 纯净版本、插入数据 $db->query("replace INTO `{$tablepre}witkey_member`(`uid`,`username`,`password`,`email`,`rand_code`) VALUES ('1', '{$admin_account}','{$password}','{$admin_email}','{$slt}')"); $db->query("replace INTO `{$tablepre}witkey_space` (`uid`,`username`,`password`,`email`,`sec_code`,`group_id`,`status`,`reg_time`) VALUES('1','{$admin_account}','{$password}','{$admin_email}','{$sec_code}','1','1','" . time() . "')"); $db->query("replace INTO `{$tablepre}witkey_shop`(`uid`,`username`,`shop_name`,`shop_status`,`shop_type`) VALUES ('1', '{$admin_account}','{$admin_account}','1','1')"); } $db->query("update `{$tablepre}witkey_basic_config` set v = '{$weburl}' where config_id=3"); $file_obj = new keke_file_class(); $file_obj->delete_files($data_cache_path); $file_obj->delete_files($tpl_cache_path); $pars = array('ac' => 'install', 'sitename' => '', 'siteurl' => $weburl, 'charset' => CHARSET, 'version' => KEKE_VERSION, 'release' => KEKE_RELEASE, 'os' => PHP_OS, 'php' => $_SERVER['SERVER_SOFTWARE'], 'mysql' => mysql_get_server_info(), 'browser' => urlencode($_SERVER['HTTP_USER_AGENT']), 'username' => urlencode($_SESSION['username']), 'email' => $admin_email, 'ip' => $_SERVER['SERVER_ADDR']); $data = http_build_query($pars); // sleep(3); echo "<script>window.location.replace('index.php?step=finish&{$data}');</script>"; break; // finally // finally case 'finish': $str = md5(random(100) . '_' . time()) . '_keke_install.lck'; @touch($lock_sign); // 设定lock sign文件的访问和修改时间 file_put_contents($lock_sign, $str); $version = $_SESSION['link']; unset($_SESSION['link'], $_SESSION['lang']);
$pay_config['safekey'] = $fds['safekey']; $pay_config['account_name'] = $fds['account_name']; break; case 'chinabank': $pay_config['seller_id'] = $fds['seller_id']; $pay_config['safekey'] = $fds['safekey']; break; case 'paypal': $pay_config['account'] = $fds['account']; break; case 'tenpay': case 'yeepay': $pay_config['seller_id'] = $fds['seller_id']; $pay_config['safekey'] = $fds['safekey']; break; case 'alipay_trust': $pay_config['account'] = $fds['account']; $pay_config['seller_id'] = $fds['seller_id']; $pay_config['safekey'] = $fds['safekey']; break; } $pay_config['descript'] = $fds['descript']; $pay['config'] = serialize($pay_config); $res = $pay_api_obj->save($pay, $pk); kekezu::admin_system_log($_lang['config'] . $payname); $file_obj = new keke_file_class(); $file_obj->delete_files(S_ROOT . "./data/data_cache/"); unset($items); kekezu::admin_show_msg($_lang['submit'], 'index.php?do=config&view=pay&op=' . $type, 3, '', 'success'); } require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_config_' . $view);
static function clearCache() { global $kekezu; $file_obj = new keke_file_class(); $res = $file_obj->delete_files(S_ROOT . "./data/data_cache/"); $res = $file_obj->delete_files(S_ROOT . './data/tpl_c/'); $kekezu->_cache_obj->flush(); return true; }
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role(20); $file_obj = new keke_file_class(); $backup_patch = S_ROOT . './data/tpl_c/'; if (isset($sbt_edit)) { if ($ckb_obj_cache) { $res = $file_obj->delete_files(S_ROOT . "./data/data_cache/"); $msg = $_lang['object_cache_empty']; } if ($ckb_tpl_cache) { $res = $file_obj->delete_files($backup_patch); $msg .= $_lang['template_cache_empty']; } if (CACHE_TYPE != 'file' && IS_CACHE == 1) { $kekezu->_cache_obj->flush(); } if ($ajax && $ajax == 1) { kekezu::echojson('clear success', 1); } else { kekezu::admin_show_msg($msg, 'index.php?do=' . $do . '&view=' . $view, 2, '', 'success'); } } require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_' . $do . '_' . $view);