本文整理汇总了PHP中exec_shut_down函数的典型用法代码示例。如果您正苦于以下问题:PHP exec_shut_down函数的具体用法?PHP exec_shut_down怎么用?PHP exec_shut_down使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了exec_shut_down函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: SUBSTRING
SELECT filedataid, SUBSTRING(" . ((!empty($vbulletin->GPC['thumb']) ? 'thumbnail' : 'filedata')) . ", $startbyte + 1, $readsize) AS filedata
FROM " . TABLE_PREFIX . "filedata
WHERE filedataid = $attachmentinfo[filedataid]
");
echo $attachmentinfo['filedata'];
$startbyte += $readsize;
flush();
}
if (defined('NOSHUTDOWNFUNC'))
{
if ($_GET['stc'] == 1)
{
$db->close();
}
else
{
exec_shut_down();
}
}
}
($hook = vBulletinHook::fetch_hook('attachment_complete')) ? eval($hook) : false;
/*======================================================================*\
|| ####################################################################
|| #
|| # CVS: $RCSfile$ - $Revision: 35055 $
|| ####################################################################
\*======================================================================*/
?>
开发者ID:hungnv0789,项目名称:vhtm,代码行数:31,代码来源:attachment.php
示例2: print_xml_end
/**
* Prints out the queued XML and then exits. Use in combination with print_xml_header();
*
* @param boolean If not using shut down functions, whether to do a full shutdown (session updates, etc) or to just close the DB
*/
function print_xml_end($full_shutdown = false)
{
// Can't use this is we need to send a content length header as we don't know how much bogus data is going to be sent
if ($this->fetch_send_content_length_header()) {
return $this->print_xml();
}
//run any registered shutdown functions
$GLOBALS['vbulletin']->shutdown->shutdown();
if (defined('NOSHUTDOWNFUNC')) {
if ($full_shutdown) {
exec_shut_down();
} else {
$this->registry->db->close();
}
}
echo $this->output();
}
开发者ID:0hyeah,项目名称:yurivn,代码行数:22,代码来源:class_xml.php
示例3: print_cp_footer
/**
* Prints the page footer, finishes Gzip encoding and terminates execution
*/
function print_cp_footer()
{
global $vbulletin, $level, $vbphrase;
echo "\r\n\r\n<!-- START CONTROL PANEL FOOTER -->\r\n";
if ($vbulletin->debug) {
if (defined('CVS_REVISION')) {
$re = '#^\\$' . 'RCS' . 'file: (.*\\.php),v ' . '\\$ - \\$' . 'Revision: ([0-9\\.]+) \\$$#siU';
$cvsversion = preg_replace($re, '\\1, CVS v\\2', CVS_REVISION);
}
if ($size = sizeof($GLOBALS['DEVDEBUG'])) {
$displayarray = array();
$displayarray[] = "<select id=\"moo\"><option selected=\"selected\">DEBUG MESSAGES ({$size})</option>\n" . construct_select_options($GLOBALS['DEVDEBUG'], -1, 1) . "\t</select>";
if (defined('CVS_REVISION')) {
$displayarray[] = "<p style=\"font: bold 11px tahoma;\">{$cvsversion}</p>";
}
$displayarray[] = "<p style=\"font: bold 11px tahoma;\">SQL Queries (" . $vbulletin->db->querycount . ")</p>";
$buttons = "<input type=\"button\" class=\"button\" value=\"Explain\" onclick=\"window.location = '" . $vbulletin->scriptpath . iif(strpos($vbulletin->scriptpath, '?') > 0, '&', '?') . 'explain=1' . "';\" />" . "\n" . "<input type=\"button\" class=\"button\" value=\"Reload\" onclick=\"window.location = window.location;\" />";
print_form_header('../docs/phrasedev', 'dofindphrase', 0, 1, 'debug', '90%', '_phrasefind');
$displayarray[] =& $buttons;
print_cells_row($displayarray, 0, 'thead');
print_table_footer();
echo '<p align="center" class="smallfont">' . date('r T') . '</p>';
} else {
echo "<p align=\"center\" class=\"smallfont\">SQL Queries (" . $vbulletin->db->querycount . ") | " . (!empty($cvsversion) ? "{$cvsversion} | " : '') . "<a href=\"" . $vbulletin->scriptpath . iif(strpos($vbulletin->scriptpath, '?') > 0, '&', '?') . "explain=1\">Explain</a></p>";
if (function_exists('memory_get_usage')) {
echo "<p align=\"center\" class=\"smallfont\">Memory Usage: " . vb_number_format(round(memory_get_usage() / 1024, 2)) . " KiB</p>";
}
}
$_REQUEST['do'] = htmlspecialchars_uni($_REQUEST['do']);
echo "<script type=\"text/javascript\">window.status = \"" . construct_phrase($vbphrase['logged_in_user_x_executed_y_queries'], $vbulletin->userinfo['username'], $vbulletin->db->querycount) . " \$_REQUEST[do] = '{$_REQUEST['do']}'\";</script>";
}
if (!defined('NO_CP_COPYRIGHT')) {
$output_version = defined('ADMIN_VERSION_VBULLETIN') ? ADMIN_VERSION_VBULLETIN : $vbulletin->options['templateversion'];
echo '<p align="center"><a href="http://www.vbulletin.com/" target="_blank" class="copyright">' . construct_phrase($vbphrase['vbulletin_copyright_orig'], $output_version, date('Y')) . '</a></p>';
}
if (!defined('IS_NAV_PANEL') and !defined('NO_PAGE_TITLE') and VB_AREA != 'Upgrade' and VB_AREA != 'Install') {
echo "\n</div>";
}
echo "\n</body>\n</html>";
($hook = vBulletinHook::fetch_hook('admin_complete')) ? eval($hook) : false;
if ($vbulletin->options['gzipoutput'] and function_exists("ob_start") and function_exists("crc32") and function_exists("gzcompress") and !$vbulletin->nozip) {
$text = ob_get_contents();
while (ob_get_level()) {
@ob_end_clean();
}
if (!(SAPI_NAME == 'apache2handler' and PHP_VERSION <= '4.3.3') and !headers_sent() and SAPI_NAME != 'apache2filter') {
$newtext = fetch_gzipped_text($text, $vbulletin->options['gziplevel']);
} else {
$newtext = $text;
}
@header('Content-Length: ' . strlen($newtext));
echo $newtext;
}
flush();
if (defined('NOSHUTDOWNFUNC')) {
exec_shut_down();
}
// terminate script execution now - DO NOT REMOVE THIS!
exit;
}
开发者ID:benyamin20,项目名称:vbregistration,代码行数:63,代码来源:adminfunctions.php
示例4: print_output
/**
* Finishes off the current page (using templates), prints it out to the browser and halts execution
*
* @param string The HTML of the page to be printed
* @param boolean Send the content length header?
*/
function print_output($vartext, $sendheader = true)
{
global $querytime, $vbulletin, $show, $vbphrase;
if ($vbulletin->options['addtemplatename']) {
if ($doctypepos = @strpos($vartext, vB_Template_Runtime::fetchStyleVar('htmldoctype'))) {
$comment = substr($vartext, 0, $doctypepos);
$vartext = substr($vartext, $doctypepos + strlen(vB_Template_Runtime::fetchStyleVar('htmldoctype')));
$vartext = vB_Template_Runtime::fetchStyleVar('htmldoctype') . "\n" . $comment . $vartext;
}
}
if (!empty($vbulletin->db->explain) or $vbulletin->debug) {
$totaltime = microtime(true) - TIMESTART;
$vartext .= "<!-- Page generated in " . vb_number_format($totaltime, 5) . " seconds with " . $vbulletin->db->querycount . " queries -->";
}
// set cookies for displayed notices
if ($show['notices'] and !defined('NOPMPOPUP') and !empty($vbulletin->np_notices_displayed) and is_array($vbulletin->np_notices_displayed)) {
$np_notices_cookie = $_COOKIE[COOKIE_PREFIX . 'np_notices_displayed'];
vbsetcookie('np_notices_displayed', ($np_notices_cookie ? "{$np_notices_cookie}," : '') . implode(',', $vbulletin->np_notices_displayed), false);
}
// --- / TODO remove this code for vB4 gold------------------------------
// debug code
global $DEVDEBUG, $vbcollapse;
if ($vbulletin->debug) {
devdebug('php_sapi_name(): ' . SAPI_NAME);
$messages = '';
if (is_array($DEVDEBUG)) {
foreach ($DEVDEBUG as $debugmessage) {
$messages .= "\t<option>" . htmlspecialchars_uni($debugmessage) . "</option>\n";
}
}
if (!empty(vB_Template::$template_usage)) {
$tempusagecache = vB_Template::$template_usage;
$_TEMPLATEQUERIES = vB_Template::$template_queries;
unset($tempusagecache['board_inactive_warning'], $_TEMPLATEQUERIES['board_inactive_warning']);
ksort($tempusagecache);
foreach ($tempusagecache as $template_name => $times) {
$tempusagecache["{$template_name}"] = "<span class=\"shade\" style=\"float:right\">({$times})</span>" . ((isset($_TEMPLATEQUERIES["{$template_name}"]) and $_TEMPLATEQUERIES["{$template_name}"]) ? "<span style=\"color:red; font-weight:bold\">{$template_name}</span>" : $template_name);
}
} else {
$tempusagecache = array();
}
$hook_usage = '';
$hook_total = 0;
foreach (vBulletinHook::fetch_hookusage() as $hook_name => $has_code) {
$hook_usage .= '<li class="smallfont' . (!$has_code ? ' shade' : '') . '">' . $hook_name . '</li>';
$hook_total++;
}
if (!$hook_usage) {
$hook_usage = '<li class="smallfont"> </li>';
}
$phrase_groups = '';
sort($GLOBALS['phrasegroups']);
foreach ($GLOBALS['phrasegroups'] as $phrase_group) {
$phrase_groups .= '<li class="smallfont">' . $phrase_group . '</li>';
}
if (!$phrase_groups) {
$phrase_groups = '<li class="smallfont"> </li>';
}
$vbcollapse['collapseimg_debuginfo'] = !empty($vbcollapse['collapseimg_debuginfo']) ? $vbcollapse['collapseimg_debuginfo'] : '';
$vbcollapse['collapseobj_debuginfo'] = !empty($vbcollapse['collapseobj_debuginfo']) ? $vbcollapse['collapseobj_debuginfo'] : '';
// TODO: This needs to be converted to vb4 style - $stylevar doesn't exist, use vB_Template_Runtime::fetchStyleVar('textdirection')
$debughtml = "\r\n\t\t\t<table class=\"tborder\" cellpadding=\"6\" cellspacing=\"1\" border=\"0\" align=\"center\" style=\"margin-top:20px\" id=\"debuginfo\" dir=\"ltr\">\r\n\t\t\t<thead>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<th class=\"tcat\" colspan=\"2\" align=\"left\">\r\n\t\t\t\t\t\t<a style=\"float:right\" href=\"#\" title=\"Close Debug Info\" onclick=\"document.getElementById('debuginfo').parentNode.removeChild(document.getElementById('debuginfo')); return false;\">X</a>\r\n\t\t\t\t\t\tvBulletin {$vbulletin->options['templateversion']} Debug Information\r\n\t\t\t\t\t</th>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td class=\"alt1 smallfont\" colspan=\"2\">\r\n\t\t\t\t\t\t<ul style=\"list-style:none; margin:0px; padding:0px\">\r\n\t\t\t\t\t\t\t<li class=\"smallfont\" style=\"display:inline; margin-right:8px\"><span class=\"shade\">Page Generation</span> " . vb_number_format($totaltime, 5) . " seconds</li>\r\n\t\t\t\t\t\t\t" . (function_exists('memory_get_usage') ? "<li class=\"smallfont\" style=\"display:inline; margin-right:8px\"><span class=\"shade\">Memory Usage</span> " . number_format(memory_get_usage() / 1024) . 'KB</li>' : '') . "\r\n\t\t\t\t\t\t\t<li class=\"smallfont\" style=\"display:inline; margin-right:8px\"><span class=\"shade\">Queries Executed</span> " . (empty($_TEMPLATEQUERIES) ? $vbulletin->db->querycount : "<span title=\"Uncached Templates!\" style=\"color:red; font-weight:bold\">{$vbulletin->db->querycount}</span>") . " <a href=\"" . htmlspecialchars($vbulletin->scriptpath) . (strpos($vbulletin->scriptpath, '?') === false ? '?' : '&') . "explain=1\" target=\"_blank\" title=\"Explain Queries\">(?)</a></li>\r\n\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr align=\"left\">\r\n\t\t\t\t\t<th class=\"thead\" colspan=\"2\"><a style=\"float:right\" href=\"#\" onclick=\"return toggle_collapse('debuginfo')\"><img id=\"collapseimg_debuginfo\" src=\"" . vB_Template_Runtime::fetchStyleVar('imgdir_button') . "/collapse_thead{$vbcollapse['collapseimg_debuginfo']}.gif\" alt=\"\" border=\"0\" /></a> More Information</th>\r\n\t\t\t\t</tr>\r\n\t\t\t</thead>\r\n\t\t\t<tbody id=\"collapseobj_debuginfo\" style=\"{$vbcollapse['collapseobj_debuginfo']}\">\r\n\t\t\t\t<tr valign=\"top\">\r\n\t\t\t\t\t<td class=\"alt1 smallfont\">\r\n\t\t\t\t\t\t<div style=\"margin-bottom:6px\"><strong>Template Usage (</strong>" . sizeof($tempusagecache) . "<strong>):</strong></div>\r\n\t\t\t\t\t\t<ul style=\"list-style:none; margin:0px; padding:0px\"><li class=\"smallfont\">" . implode('</li><li class="smallfont">', $tempusagecache) . " </li></ul>\r\n\t\t\t\t\t\t<hr style=\"margin:10px 0px 10px 0px\" />\r\n\t\t\t\t\t\t<div style=\"margin-bottom:6px\"><strong>Phrase Groups Available (</strong>" . sizeof($GLOBALS['phrasegroups']) . "<strong>):</strong></div>\r\n\t\t\t\t\t\t<ul style=\"list-style:none; margin:0px; padding:0px\">{$phrase_groups}</ul>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t\t<td class=\"alt1 smallfont\">\r\n\t\t\t\t\t\t<div style=\"margin-bottom:6px\"><strong>Included Files (</strong>" . sizeof($included_files = get_included_files()) . "<strong>):</strong></div>\r\n\t\t\t\t\t\t<ul style=\"list-style:none; margin:0px; padding:0px\"><li class=\"smallfont\">" . implode('</li><li class="smallfont">', str_replace(str_replace('\\', '/', DIR) . '/', '', preg_replace('#^(.*/)#si', '<span class="shade">./\\1</span>', str_replace('\\', '/', $included_files)))) . " </li></ul>\r\n\t\t\t\t\t\t<hr style=\"margin:10px 0px 10px 0px\" />\r\n\t\t\t\t\t\t<div style=\"margin-bottom:6px\"><strong>Hooks Called (</strong>{$hook_total}<strong>):</strong></div>\r\n\t\t\t\t\t\t<ul style=\"list-style:none; margin:0px; padding:0px\">{$hook_usage}</ul>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t</tbody>\r\n\t\t\t\t<tbody>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td class=\"alt2 smallfont\" colspan=\"2\"><label>Messages:<select style=\"display:block; width:100%\">{$messages}</select></label></td>\r\n\t\t\t\t</tr>\r\n\t\t\t</tbody>\r\n\t\t\t</table>\r\n\t\t";
$vartext = str_replace('</body>', "<!--start debug html-->{$debughtml}<!--end debug html-->\n</body>", $vartext);
}
// end debug code
// --- / TODO remove this code for vB4 gold------------------------------
$output = process_replacement_vars($vartext);
if ($vbulletin->debug and function_exists('memory_get_usage')) {
$output = preg_replace('#(<!--querycount-->Executed <b>\\d+</b> queries<!--/querycount-->)#siU', 'Memory Usage: <strong>' . number_format(memory_get_usage() / 1024) . 'KB</strong>, \\1', $output);
}
// parse PHP include ##################
($hook = vBulletinHook::fetch_hook('global_complete')) ? eval($hook) : false;
// make sure headers sent returns correctly
if (ob_get_level() and ob_get_length()) {
ob_end_flush();
}
if ($vbulletin->options['gzipoutput'] and !headers_sent()) {
$output = fetch_gzipped_text($output, $vbulletin->options['gziplevel']);
if ($sendheader and $vbulletin->donegzip) {
@header('Content-Length: ' . strlen($output));
}
}
// Trigger shutdown event
$vbulletin->shutdown->shutdown();
if (defined('NOSHUTDOWNFUNC')) {
exec_shut_down();
}
// show regular page
if (empty($vbulletin->db->explain)) {
echo $output;
} else {
$querytime = $vbulletin->db->time_total;
echo "\n<b>Page generated in {$totaltime} seconds with " . $vbulletin->db->querycount . " queries,\nspending {$querytime} doing MySQL queries and " . ($totaltime - $querytime) . " doing PHP things.\n\n<hr />Shutdown Queries:</b>" . (defined('NOSHUTDOWNFUNC') ? " <b>DISABLED</b>" : '') . "<hr />\n\n";
}
//.........这里部分代码省略.........
开发者ID:Kheros,项目名称:MMOver,代码行数:101,代码来源:functions.php
示例5: print_output
//.........这里部分代码省略.........
" . (function_exists('memory_get_usage') ? "<li class=\"smallfont\" style=\"display:inline; margin-right:8px\"><span class=\"shade\">Memory Usage</span> " . number_format(memory_get_usage() / 1024) . 'KB</li>' : '') . "
<li class=\"smallfont\" style=\"display:inline; margin-right:8px\"><span class=\"shade\">Queries Executed</span> " . (empty($_TEMPLATEQUERIES) ? $vbulletin->db->querycount : "<span title=\"Uncached Templates!\" style=\"color:red; font-weight:bold\">{$vbulletin->db->querycount}</span>") . " <a href=\"" . (htmlspecialchars($vbulletin->scriptpath)) . (strpos($vbulletin->scriptpath, '?') === false ? '?' : '&') . "explain=1\" target=\"_blank\" title=\"Explain Queries\">(?)</a></li>
</ul>
</div>
</div>
<div class=\"blocksubhead collapse\">
<a style=\"top:5px;\" class=\"collapse\" id=\"collapse_debuginfo_body\" href=\"#top\"><img src=\"" . vB_Template_Runtime::fetchStyleVar('imgdir_button') . "/collapse_40b.png\" alt=\"\" title=\"Collapse Debug Information\" /></a>
More Information
</div>
<div class=\"blockbody\" id=\"debuginfo_body\">
<div class=\"blockrow\">
<div style=\"width:48%; float:left;\">
<div style=\"margin-bottom:6px; font-weight:bold;\">Template Usage (" . sizeof($tempusagecache) . "):</div>
<ul style=\"list-style:none; margin:0px; padding:0px\"><li class=\"smallfont\">" . implode('</li><li class="smallfont">', $tempusagecache) . " </li></ul>
<hr style=\"margin:10px 0px 10px 0px\" />
<div style=\"margin-bottom:6px; font-weight:bold;\">Phrase Groups Available (" . sizeof($GLOBALS['phrasegroups']) . "):</div>
<ul style=\"list-style:none; margin:0px; padding:0px\">$phrase_groups</ul>
</div>
<div style=\"width:48%; float:right;\">
<div style=\"margin-bottom:6px; font-weight:bold;\">Included Files (" . sizeof($included_files = get_included_files()) . "):</div>
<ul style=\"list-style:none; margin:0px; padding:0px\"><li class=\"smallfont\">" . implode('</li><li class="smallfont">', str_replace(str_replace('\\', '/', DIR) . '/', '', preg_replace('#^(.*/)#si', '<span class="shade">./\1</span>', str_replace('\\', '/', $included_files)))) . " </li></ul>
<hr style=\"margin:10px 0px 10px 0px\" />
<div style=\"margin-bottom:6px; font-weight:bold;\">Hooks Called ($hook_total):</div>
<ul style=\"list-style:none; margin:0px; padding:0px\">$hook_usage</ul>
</div>
<br style=\"clear:both;\" />
</div>
</div>
<div class=\"blockbody\">
<div class=\"blockrow\">
<label>Messages:<select style=\"display:block; width:100%\">$messages</select></label>
</div>
</div>
</div>
</div>
";
$vartext = str_replace('</body>', "<!--start debug html-->$debughtml<!--end debug html-->\n</body>", $vartext);
}
// end debug code
$output = process_replacement_vars($vartext);
if ($vbulletin->debug AND function_exists('memory_get_usage'))
{
$output = preg_replace('#(<!--querycount-->Executed <b>\d+</b> queries<!--/querycount-->)#siU', 'Memory Usage: <strong>' . number_format((memory_get_usage() / 1024)) . 'KB</strong>, \1', $output);
}
// parse PHP include ##################
($hook = vBulletinHook::fetch_hook('global_complete')) ? eval($hook) : false;
// make sure headers sent returns correctly
if (ob_get_level() AND ob_get_length())
{
ob_end_flush();
}
if (!headers_sent())
{
if ($vbulletin->options['gzipoutput'])
{
$output = fetch_gzipped_text($output, $vbulletin->options['gziplevel']);
}
if ($sendheader)
{
@header('Content-Length: ' . strlen($output));
}
}
// Trigger shutdown event
$vbulletin->shutdown->shutdown();
if (defined('NOSHUTDOWNFUNC'))
{
exec_shut_down();
}
// show regular page
if (empty($vbulletin->db->explain))
{
echo $output;
}
// show explain
else
{
$querytime = $vbulletin->db->time_total;
echo "\n<b>Page generated in $totaltime seconds with " . $vbulletin->db->querycount . " queries,\nspending $querytime doing MySQL queries and " . ($totaltime - $querytime) . " doing PHP things.\n\n<hr />Shutdown Queries:</b>" . (defined('NOSHUTDOWNFUNC') ? " <b>DISABLED</b>" : '') . "<hr />\n\n";
}
// broken if zlib.output_compression is on with Apache 2
if (SAPI_NAME != 'apache2handler' AND SAPI_NAME != 'apache2filter')
{
flush();
}
exit;
}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:101,代码来源:functions.php
示例6: print_xml
/**
* Prints out the queued XML and then exits.
*
* @param boolean If not using shut down functions, whether to do a full shutdown (session updates, etc) or to just close the DB
*/
function print_xml($full_shutdown = false)
{
if (defined('NOSHUTDOWNFUNC')) {
if ($full_shutdown) {
exec_shut_down();
} else {
$this->registry->db->close();
}
}
$this->send_content_type_header();
echo $this->fetch_xml_tag() . $this->output();
exit;
}
开发者ID:holandacz,项目名称:nb4,代码行数:18,代码来源:class_xml.php
示例7: print_xml
/**
* Prints out the queued XML and then exits.
*
* @param boolean If not using shut down functions, whether to do a full shutdown (session updates, etc) or to just close the DB
*/
function print_xml($full_shutdown = false)
{
if (class_exists('vBulletinHook', false))
{
($hook = vBulletinHook::fetch_hook('xml_print_output')) ? eval($hook) : false;
}
//run any registered shutdown functions
$GLOBALS['vbulletin']->shutdown->shutdown();
if (defined('NOSHUTDOWNFUNC'))
{
if ($full_shutdown)
{
exec_shut_down();
}
else
{
$this->registry->db->close();
}
}
$this->send_content_type_header();
if (strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== false)
{
// this line is causing problems with mod_gzip/deflate, but is needed for some IIS setups
$this->send_content_length_header();
}
echo $this->fetch_xml();
exit;
}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:37,代码来源:class_xml.php
示例8: shutdown
function shutdown()
{
exec_shut_down();
// Save session, close DB etc.
}
开发者ID:reima,项目名称:restful-vb,代码行数:5,代码来源:functions.php
示例9: print_cp_footer
//.........这里部分代码省略.........
echo '<br /><br />';
if (defined('CVS_REVISION')) {
$re = '#^\\$' . 'RCS' . 'file: (.*\\.php),v ' . '\\$ - \\$' . 'Revision: ([0-9\\.]+) \\$$#siU';
$cvsversion = preg_replace($re, '\\1, CVS v\\2', CVS_REVISION);
}
if ($size = sizeof($GLOBALS['DEVDEBUG'])) {
$displayarray = array();
$displayarray[] = "<select id=\"moo\"><option selected=\"selected\">DEBUG MESSAGES ({$size})</option>\n" . construct_select_options($GLOBALS['DEVDEBUG'], -1, 1) . "\t</select>";
if (defined('CVS_REVISION')) {
$displayarray[] = "<p style=\"font: bold 11px tahoma;\">{$cvsversion}</p>";
}
$displayarray[] = "<p style=\"font: bold 11px tahoma;\">SQL Queries (" . $vbulletin->db->querycount . ")</p>";
$buttons = "<input type=\"button\" class=\"button\" value=\"Explain\" onclick=\"window.location = '" . $vbulletin->scriptpath . iif(strpos($vbulletin->scriptpath, '?') > 0, '&', '?') . 'explain=1' . "';\" />" . "\n" . "<input type=\"button\" class=\"button\" value=\"Reload\" onclick=\"window.location = window.location;\" />";
print_form_header('../docs/phrasedev', 'dofindphrase', 0, 1, 'debug', '90%', '_phrasefind');
$displayarray[] =& $buttons;
print_cells_row($displayarray, 0, 'thead');
print_table_footer();
echo '<p align="center" class="smallfont">' . date('r T') . '</p>';
} else {
echo "<p align=\"center\" class=\"smallfont\">SQL Queries (" . $vbulletin->db->querycount . ") | " . (!empty($cvsversion) ? "{$cvsversion} | " : '') . "<a href=\"" . $vbulletin->scriptpath . iif(strpos($vbulletin->scriptpath, '?') > 0, '&', '?') . "explain=1\">Explain</a></p>";
if (function_exists('memory_get_usage')) {
echo "<p align=\"center\" class=\"smallfont\">Memory Usage: " . vb_number_format(round(memory_get_usage() / 1024, 2)) . " KiB</p>";
}
}
$_REQUEST['do'] = htmlspecialchars_uni($_REQUEST['do']);
echo "<script type=\"text/javascript\">window.status = \"" . construct_phrase($vbphrase['logged_in_user_x_executed_y_queries'], $vbulletin->userinfo['username'], $vbulletin->db->querycount) . " \$_REQUEST[do] = '{$_REQUEST['do']}'\";</script>";
}
if (!defined('NO_CP_COPYRIGHT')) {
$output_version = defined('ADMIN_VERSION_VBULLETIN') ? ADMIN_VERSION_VBULLETIN : $vbulletin->options['templateversion'];
echo '<div class="acp-footer"><a href="https://www.vbulletin.com/" target="_blank" class="copyright">' . construct_phrase($vbphrase['vbulletin_copyright_orig'], $output_version, date('Y')) . '</a></div>';
}
if (!defined('IS_NAV_PANEL') and !defined('NO_PAGE_TITLE') and VB_AREA != 'Upgrade' and VB_AREA != 'Install') {
echo "\n</div>";
}
if (vB::getDbAssertor()->getDBConnection()->doExplain) {
$data = vB::getDbAssertor()->getDBConnection()->getExplain();
if (!empty($data['describe'])) {
echo '<div class="query">';
echo '<h4>Describe Queries: (Included in the full listing of queries below)</h4><ul>';
foreach ($data['describe'] as $describe) {
echo '<li>' . htmlspecialchars($describe) . '</li>';
}
echo '</ul>';
echo '</div>';
}
if (!empty($data['duplicates'])) {
echo '<div class="query">';
echo '<h4>Duplicate Queries: (Exact textual duplicates, also included in the full listing of queries below)</h4><ul>';
foreach ($data['duplicates'] as $duplicate) {
echo '<li>Times run: ' . $duplicate['count'] . '<pre>' . htmlspecialchars($duplicate['query']) . '</pre></li>';
}
echo '</ul>';
echo '</div>';
}
foreach ($data['explain'] as $i => $query) {
echo '
<div class="query">
<h4>SQL Query #' . ($i + 1) . '</h4>
<pre>' . htmlspecialchars($query['query']) . '</pre>
' . $query['explain'] . '
<ul>
<li>Time Before: ' . $query['timeStart'] . '</li>
<li>Time After: ' . $query['timeStop'] . '</li>
<li>Time Taken: ' . $query['timeTaken'] . '</li>
<li>Memory Before: ' . $query['memoryStart'] . '</li>
<li>Memory After: ' . $query['memoryStop'] . '</li>
<li>Memory Used: ' . $query['memoryUsed'] . '</li>
</ul>
</div>
';
}
$overall = $data['sqltime'] + $data['phptime'];
echo '<h1>' . count($data['explain']) . ' Queries Run : Total SQL time was ' . number_format($data['sqltime'], 6) . ' seconds , Total PHP time was ' . number_format($data['phptime'], 6) . ' seconds , Overall time was ' . number_format($overall, 6) . ' seconds.</h1><br />';
}
// Legacy Hook 'admin_complete' Removed //
if (vB::getDatastore()->getOption('gzipoutput') and function_exists("ob_start") and function_exists("crc32") and function_exists("gzcompress") and !$vbulletin->nozip) {
$text = ob_get_contents();
while (ob_get_level()) {
@ob_end_clean();
}
if (!headers_sent() and SAPI_NAME != 'apache2filter') {
$newtext = fetch_gzipped_text($text, vB::getDatastore()->getOption('gziplevel'));
} else {
$newtext = $text;
}
if (!headers_sent()) {
@header('Content-Length: ' . strlen($newtext));
}
echo $newtext;
}
flush();
//make sure that shutdown functions get called on exit.
$vbulletin->shutdown->shutdown();
if (defined('NOSHUTDOWNFUNC')) {
exec_shut_down();
}
// terminate script execution now - DO NOT REMOVE THIS!
exit;
}
开发者ID:cedwards-reisys,项目名称:nexus-web,代码行数:101,代码来源:adminfunctions.php
示例10: if
OR $vbulletin->userinfo['userid'] == $vbulletin->GPC['userid']
)
);
if ($can_view_profile_pic)
{
require_once(DIR . '/includes/functions_user.php');
if (!can_view_profile_section($vbulletin->GPC['userid'], 'profile_picture'))
{
$can_view_profile_pic = false;
}
}
// No permissions to see profile pics
if (!$can_view_profile_pic)
{
exec_shut_down(); // Update location with 'No permission to view profile picture'
header('Content-type: image/gif');
readfile(DIR . '/' . $vbulletin->options['cleargifurl']);
exit;
}
}
else if ($vbulletin->GPC['type'] == 'sigpic')
{
$table = 'sigpic';
}
else
{
$table = 'customavatar';
if ($vbulletin->GPC['type'] == 'thumb')
{
$filedata = 'filedata_thumb AS filedata';
开发者ID:hungnv0789,项目名称:vhtm,代码行数:31,代码来源:image.php
注:本文中的exec_shut_down函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论