function misc_phpinfo() { global $zbp, $blogtitle; $match = array(); $blogtitle = $zbp->name . '-phpinfo'; ob_start(); phpinfo(); $s = ob_get_clean(); if (PHP_ENGINE !== ENGINE_HHVM) { preg_match("/<body.*?>(.*?)<\\/body>/is", $s, $match); } ?> <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <?php if (strpos(GetVars('HTTP_USER_AGENT', 'SERVER'), 'Trident/')) { ?> <meta http-equiv="X-UA-Compatible" content="IE=EDGE"/> <?php } ?> <meta name="robots" content="none"/> <meta name="generator" content="<?php echo $GLOBALS['option']['ZC_BLOG_PRODUCT_FULL']; ?> "/> <link rel="stylesheet" href="css/admin.css" type="text/css" media="screen"/> <script src="script/common.js" type="text/javascript"></script> <script src="script/c_admin_js_add.php" type="text/javascript"></script> <?php foreach ($GLOBALS['hooks']['Filter_Plugin_Other_Header'] as $fpname => &$fpsignal) { $fpname(); } ?> <title><?php echo $blogtitle; ?> </title> <style type="text/css"> *{color:#000;} pre {margin: 0; font-family: monospace;} a:link {color: #009; text-decoration: none; background-color: #fff;} a:hover {text-decoration: underline;} table {border-collapse: collapse; border: 0; width: 934px; box-shadow: 1px 2px 3px #ccc;} .center {text-align: center;} .center table {margin: 1em auto; text-align: left;} .center th {text-align: center !important;} td, th {border: 1px solid #666; font-size: 75%; vertical-align: baseline; padding: 4px 5px;} h1 {font-size: 150%;} h2 {font-size: 125%;} .p {text-align: left;} .e {background-color: #ccf; width: 300px; font-weight: bold;} .h {background-color: #99c; font-weight: bold;} .v {background-color: #ddd; max-width: 300px; overflow-x: auto;} .v i {color: #999;} img {float: right; border: 0;} hr {display:none;} div.bg {background: #777bb4!important;} </style> </head> <body class="short"> <div class="bg"> <div id="wrapper"> <div class="logo"><img src="image/admin/none.gif" title="Z-BlogPHP" alt="Z-BlogPHP"/></div> <?php if (PHP_ENGINE === ENGINE_HHVM) { echo '<p style="text-align: center;">' . GetEnvironment() . '</p>'; } else { echo $match[0]; } ?> </div> </div> </body> </html> <?php RunTime(); }
<td><b><label for="all_encrypt"><p align="center">全站加密</p></label></b></td> <td><p align="left"><input id="all_encrypt" name="all_encrypt" style="display:none;" type="text" value="<?php echo $zbp->Config('passwordvisit')->all_encrypt; ?> " class="checkbox"><br>启用后访问全站均需要输入密码</p></td> </tr> <tr> <td><b><label for="default_password"><p align="center">默认密码</p></label></b></td> <td><p align="left"><input name="default_password" type="text" id="default_password" size="100%" value="<?php echo $zbp->Config('passwordvisit')->default_password; ?> " /></p></td> </tr> <tr> <td><b><label for="default_text"><p align="center">默认提示内容</p></label></b></td> <td><p align="left"><textarea name="default_text" type="text" id="default_text" style="width: 80%;"><?php echo $zbp->Config('passwordvisit')->default_text; ?> </textarea><br>支持输入HTML代码,可以根据主题自定义CSS</p></td> </tr> </table> <br /> <input name="" type="Submit" class="button" value="保存"/> </form> </div> </div> <?php require $blogpath . 'zb_system/admin/admin_footer.php'; RunTime();
/** * 输出错误信息 */ function Display() { if (!headers_sent()) { Http500(); ob_clean(); } require dirname(__FILE__) . '/../defend/error.html'; RunTime(); die; }
/** * Write data to page and exit * @param integer $errorCode * @param string $errorMessage */ public static function end($errorCode = -1, $errorMessage = "") { global $zbp; // For language file $returnObject = array('err' => $errorCode); $err = $errorCode; if ($errorCode !== -1 && $errorMessage === "") { $returnObject['message'] = $zbp->lang['error'][$errorCode]; } elseif ($errorCode !== -1 && $errorMessage !== "") { $returnObject['message'] = $errorMessage; } $returnObject['data'] = self::$savedObject; $returnObject['info'] = RunTime(); // A ZBP Function header('Content-Type: application/json'); echo json_encode($returnObject); exit; return true; }
/** * 输出错误信息 */ function Display() { if (!headers_sent()) { Http500(); ob_clean(); } require dirname(__FILE__) . '/../defend/error.php'; RunTime(); /** * ``flush()`` and ``exit($errorCode)`` is for HHVM. * @link https://github.com/zblogcn/zblogphp/issues/32 */ flush(); exit(1); }
/** * 输出错误信息 */ public function Display() { if (!headers_sent()) { Http500(); ob_clean(); } foreach ($GLOBALS['hooks']['Filter_Plugin_Debug_Display'] as $fpname => &$fpsignal) { $fpsignal = PLUGIN_EXITSIGNAL_NONE; $fpreturn = $fpname($this); if ($fpsignal == PLUGIN_EXITSIGNAL_RETURN) { return $fpreturn; } } require dirname(__FILE__) . '/../defend/error.php'; RunTime(); /** * ``flush()`` and ``exit($errorCode)`` is for HHVM. * @link https://github.com/zblogcn/zblogphp/issues/32 */ flush(); exit(1); }
} function SetWidth($rating) { $imageWidth = 29; $newWidth = $imageWidth * $rating; return "width: " . $newWidth . "px;"; } try { $netflix = new NetflixCatalog(); $settings = parse_ini_file("app.config", 1); if (!empty($settings["HTTP_PROXY_HOST"])) { $netflix->HttpProxy = new HttpProxy($settings["HTTP_PROXY_HOST"], $settings["HTTP_PROXY_PORT"], $settings["HTTP_PROXY_USER_NAME"], $settings["HTTP_PROXY_PASSWORD"]); } $query = $netflix->Titles()->Filter("Type eq 'Season'")->OrderBy("Name"); $movies = $query->Execute(); ?> <table border="1px solid gray" bgcolor="FDF8E2" width="900px;" align="center"> <?php foreach ($movies->Result as $movie) { echo " <tr>\n<td>\n<a href='{$movie->Url}'>\n<img alt='" . $movie->Name . "' src='" . $movie->BoxArt->LargeUrl . "'>\n</a>\n</td>" . "\n<td>\n<p>\n<span style='font-size: larger;'>" . $movie->Name . "\n</span> " . "\n<span style='font-size: smaller;'>({$movie->ReleaseYear})\n</span>\n</p>" . "\n{$movie->Synopsis}\n<br />\n" . "Rating:\n<span style='background: url(\"images/spite_Punk_Star.jpg\") repeat-x; height: 29px; " . SetWidth($movie->AverageRating) . "'> </span>, Runtime: " . RunTime($movie->Runtime) . "\n</td>\n</tr>\n"; } ?> </table> <?php } catch (Exception $e) { echo $e->getMessage(); } ?> </body> </html>
function misc_viewrights() { global $zbp; $blogtitle = $zbp->name . '-' . $zbp->lang['msg']['view_rights']; ?> <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <?php if (strpos(GetVars('HTTP_USER_AGENT', 'SERVER'), 'Trident/')) { ?> <meta http-equiv="X-UA-Compatible" content="IE=EDGE"/> <?php } ?> <meta name="robots" content="none"/> <meta name="generator" content="<?php echo $GLOBALS['option']['ZC_BLOG_PRODUCT_FULL']; ?> "/> <link rel="stylesheet" href="css/admin.css" type="text/css" media="screen"/> <script src="script/common.js" type="text/javascript"></script> <script src="script/c_admin_js_add.php" type="text/javascript"></script> <?php foreach ($GLOBALS['Filter_Plugin_Other_Header'] as $fpname => &$fpsignal) { $fpname(); } ?> <title><?php echo $blogtitle; ?> </title> </head> <body class="short"> <div class="bg"> <div id="wrapper"> <div class="logo"><img src="image/admin/none.gif" title="Z-BlogPHP" alt="Z-BlogPHP"/></div> <div class="login"> <form method="post" action="#"> <dl> <dt><?php echo $zbp->lang['msg']['current_member'] . ' : <b>' . $zbp->user->Name; ?> </b><br/> <?php echo $zbp->lang['msg']['member_level'] . ' : <b>' . $zbp->user->LevelName; ?> </b></dt> <?php foreach ($GLOBALS['actions'] as $key => $value) { if ($GLOBALS['zbp']->CheckRights($key)) { echo '<dd><b>' . $zbp->GetAction_Title($key) . '</b> : ' . ($zbp->CheckRights($key) ? '<span style="color:green">true</span>' : '<span style="color:red">false</span>') . '</dd>'; } } ?> </dl> </form> </div> </div> </div> </body> </html> <?php RunTime(); }
function zbp_index_cache_read() { global $zbp; if (count($_GET) == 0) { if ($zbp->cache->HasKey('default_html')) { if ((int) $zbp->cache->default_html_time < (int) $zbp->cache->refesh) { return; } echo $zbp->cache->default_html; RunTime(); die; } } }