function zip2web($zip, $web) { $z2w = loadInstance('zip.moyo.z2w', 'ExZIP2Web'); $r = $z2w->Create_ZIP2Web($zip, $web); if (!zip2web_successd($web, $r)) { $r = zip2web_Retry($zip, $web); if (!zip2web_successd($web, $r)) { $r = zip2web_Retry2($zip, $web); if (!zip2web_successd($web, $r)) { $r = array(); } } } $cFile = $web.'setting/constants.php'; if (!is_file($cFile)) { return zip2web_error('无法释放临时文件!请检查目录“/data/”以及其子目录的权限是否为“可读写”'); } $cContent = file_get_contents($cFile); if (!stristr($cContent, 'SYS_VERSION')) { return zip2web_error('升级文件解压失败!请手动进行升级 - <a href="'.ihelper('tg.upgrade.zip.error').'" target="_blank">查看帮助</a>'); } return $r; }
private function api($payment = false) { if (!self::$apiLoaded) { include DRIVER_PATH.'payment/tenpay.api.php'; self::$apiLoaded = true; } $api = loadInstance('driver.payment.tenpay.api', 'exTenpayAPIDriver'); $payment && $api->config($payment['config']); return $api; }
public function Bridge($trade) { $data = $this->Trade2SID($trade); return loadInstance('logic.callback.bridge.'.$data['sid'], $data['class_Bridge']); }
public function import() { return loadInstance('logic.address.import', 'AddressLogic_Import'); }
public function role() { return loadInstance('logic.me.role', 'MeLogic_Role'); }
public function forder() { return loadInstance('logic.recharge.forder', 'forder_RechargeLogic'); }
public function query() { return loadInstance('logic.push.query', 'PushLogic_Query'); }
public function clog($oid) { $obj = loadInstance('logic.order.clog', 'OrderLogic_cLog'); $obj->CSIGN = $oid; return $obj; }
public function misc() { return loadInstance('logic.pay.misc', 'PayLogic_Misc'); }
public function sync() { include_once LOGIC_PATH.'express.cdp.sync.php'; return loadInstance('logic.express.cdp.sync', 'Express_Corp_Delivery_Sync'); }
function zlog($module = null) { if (is_null($module)) { engine_class_file_load(DRIVER_PATH.'zlog/system.zlog'); return loadInstance('zlog.kernel.system', 'iSystemZLOG'); } engine_class_file_load(DRIVER_PATH.'zlog/master.zlog'); return __object_auto_load('zlog', $module, STATIC_MAP_DFS::$zlog, DRIVER_PATH.'zlog/', 'apiz'); }
private function api($service) { engine_class_file_load(INCLUDE_PATH.'reports/'.$service); return loadInstance('logic.reports.'.$service, 'reports_unit_'.$service); }
function head($title = '') { header('Content-Type: text/html; charset=utf-8'); echo '<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>', $title ? htmlspecialchars($title) . ' : ' : '', CONFIG_SITE_NAME, ' - ', CONFIG_SITE_SLOGAN, '</title> <meta name="description" content="', CONFIG_SITE_DESCRIPTION, '"> <meta name="author" content=""> <link rel="icon" href="', CONFIG_SITE_URL, 'img/favicon.png" type="image/png" /> <!-- CSS --> <link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet"> <link href="', CONFIG_SITE_URL, 'css/mellivora.css" rel="stylesheet">'; js_global_dict(); if (CONFIG_SEGMENT_IO_KEY) { echo ' <script type="text/javascript"> window.analytics=window.analytics||[],window.analytics.methods=["identify","group","track","page","pageview","alias","ready","on","once","off","trackLink","trackForm","trackClick","trackSubmit"],window.analytics.factory=function(t){return function(){var a=Array.prototype.slice.call(arguments);return a.unshift(t),window.analytics.push(a),window.analytics}};for(var i=0;i<window.analytics.methods.length;i++){var key=window.analytics.methods[i];window.analytics[key]=window.analytics.factory(key)}window.analytics.load=function(t){if(!document.getElementById("analytics-js")){var a=document.createElement("script");a.type="text/javascript",a.id="analytics-js",a.async=!0,a.src=("https:"===document.location.protocol?"https://":"http://")+"cdn.segment.io/analytics.js/v1/"+t+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(a,n)}},window.analytics.SNIPPET_VERSION="2.0.9", window.analytics.load("', CONFIG_SEGMENT_IO_KEY, '"); window.analytics.page(); </script> '; } echo ' </head> <body>'; if (!user_is_logged_in()) { login_dialog(); } if ($_GET["instanceURI"] != null) { loadInstanceURI($_GET["instanceURI"]); } if ($_GET["instanceID"] != null && $_SESSION['IID'] == null && !verifySAGlobal()) { loadInstance($_GET["instanceID"]); } if ($_SESSION['IID'] == null) { loadInstance('0'); } else { // loadInstance('') } echo ' <div class="page"> <nav class="header" id="header"> <div id="header-inner"> <div id="header-logo"> <a href="', CONFIG_SITE_URL, '"> <h4 id="site-logo-text">', CONFIG_SITE_NAME, '</h4> <h6 id="site-logo-text">' . $_SESSION["IName"] . '</h6> <div id="site-logo"/> <img src = "../img/btn_DIS1.jpg" height="50" width="50"><img src = "../img/sit_it_choices.jpg" height="50" width="50"> </div> </a> </div> <div id="header-menu"> <ul class="nav nav-pills pull-right" id="menu-main">'; if (user_is_logged_in()) { if (user_is_staff()) { echo '<li><a href="', CONFIG_SITE_ADMIN_URL, '">Manage</a></li>'; } echo ' <li><a href="', CONFIG_SITE_URL, 'home">Home</a></li> <li><a href="', CONFIG_SITE_URL, 'challenges">Challenges</a></li> <li><a href="', CONFIG_SITE_URL, 'scores">Scores</a></li> <li><a href="', CONFIG_SITE_URL, 'profile">Profile</a></li> ', $_SESSION['IID'] == 0 ? '<li><a href="' . CONFIG_SITE_URL . 'game">Game</a></li>' : "", ' ', dynamic_menu_content(), ' <li><a href="', CONFIG_SITE_URL, 'logout">Log out (', substr($_SESSION['UName'], 0, 10), ')</a></li> '; } else { echo ' <li><a href="', CONFIG_SITE_URL, 'home">Home</a></li> <li><a href="', CONFIG_SITE_URL, 'scores">Scores</a></li> ', dynamic_menu_content(), ' <li><a href="', CONFIG_SITE_URL, 'register">Register</a></li> <li><a href="" data-toggle="modal" data-target="#login-dialog">Log in</a></li> '; } echo ' </ul> </div> </div> </nav><!-- navbar --> <div class="container" id="body-container"> <div id="content-container"> '; if (isset($_GET['generic_success'])) { message_inline_green('<h3>Success!</h3>', false); } else { if (isset($_GET['generic_failure'])) { message_inline_red('<h3>Failure!</h3>', false); } else { if (isset($_GET['generic_warning'])) { message_inline_red('<h3>Something went wrong! Most likely the action you attempted has failed.</h3>', false); } } } }