📄 queries.php
字号:
<?php
// +-------------------------------------------------------------+
// | DeskPRO v [2.0.1 Production]
// | Copyright (C) 2001 - 2004 Headstart Solutions Limited
// | Supplied by WTN-WDYL
// | Nullified by WTN-WDYL
// | Distribution via WebForum, ForumRU and associated file dumps
// +-------------------------------------------------------------+
// | DESKPRO IS NOT FREE SOFTWARE
// +-------------------------------------------------------------+
// | License ID : Full Enterprise License =) ...
// | License Owner : WTN-WDYL Team
// +-------------------------------------------------------------+
// | $RCSfile: queries.php,v $
// | $Date: 2004/02/10 01:34:25 $
// | $Revision: 1.5 $
// +-------------------------------------------------------------+
// | File Details:
// | - Viewer for the internal query log (administration interface)
// +-------------------------------------------------------------+
error_reporting(E_ALL & ~E_NOTICE);
require_once('./global.php');
//Nullify WTN-WDYL Team
// default do
$_REQUEST['do'] = trim($_REQUEST['do']);
if (!isset($_REQUEST['do']) or $_REQUEST['do'] == "") {
$_REQUEST['do'] = "view";
}
// globalise variables
$global = array (
array('id', 'number')
);
rg($global);
if ($_REQUEST['do'] == "send") {
if (!$_REQUEST['message']) {
mistake('No message was provided. You need to accompany the report with
a message.');
}
if (!$_REQUEST['from']) {
mistake('No "From:" address was provided. One needs to be provided for the
e-mail.');
}
$db->query("SELECT * FROM query_log ORDER BY stamp DESC LIMIT 1000");
if (!$db->num_rows()) {
mistake('There are no queries logged. Perhaps logging isn\'t enabled?');
}
$mail .= "$message\n\nquery_log data follows:";
while ($data = $db->row_array()) {
$mail .= "$data[query]\n";
ob_start();
print_r(unserialize($data[explain_log]));
$mail .= "Explain:\n";
$mail .= ob_get_clean();
ob_end_clean();
$mail .= "Duration: $data[duration]\n\n";
}
dp_mail('', $subject, $message, $_REQUEST['from']);
jump('queries.php', 'Mail sent.');
} else {
admin_header('Support', 'Send Queries');
?>
<FORM ACTION="queries.php" METHOD="post">
<P>If you are having difficulties with your DeskPRO installation, and you
have been instructed to do so by DeskPRO support, please fill out this form
to transmit the most recent queries your installation has run to our
support staff. Please include your current ticket number with your
message.</P>
<P>Please do <B>not</B> mail this information to DeskPRO support without
being asked to do so by our technicians. Thank you!</P>
<?php
echo "Message from (your e-mail address):<BR /> " . form_input('from') . "<BR /><BR />\n";
echo "Brief message describing problem (include ticket number):<BR />\n";
echo form_textarea('message') . "<BR /><BR />";
echo "<INPUT TYPE=\"submit\" NAME=\"submit\" VALUE=\"Send Queries\"> * this can take a few minutes</FORM>";
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -