cache.php
上传用户:gzy2002
上传日期:2010-02-11
资源大小:1785k
文件大小:4k
- <?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: cache.php,v $
- // | $Date: 2004/02/10 01:34:28 $
- // | $Revision: 1.18 $
- // +-------------------------------------------------------------+
- // | File Details:
- // | - Load and buffer quick replies and provide ticket reply functions
- // +-------------------------------------------------------------+
- error_reporting(E_ALL ^ E_NOTICE);
- require("./../global.php");
- reload_index();
- ?>
- <HTML>
- <HEAD>
- <META HTTP-EQUIV="refresh" content="3600;cache.php">
- <SCRIPT language="Javascript">
- reply = new Array();
- reply[0] = new Array();
- function buildselect() {
- top.center.document.dpreply.drop.options[0] = new Option('--- Quick Replies ---', '0');
- <?php
- $db->query("SELECT * FROM quickreply_cat WHERE techid = '$user[id]' OR global");
- $i = 1;
- while ($cat = $db->row_array()) {
- $cat['name'] = addslashes_js($cat['name']);
- $cats .= $cat['id'] . ',';
- $cat_temp .= "nreply[$cat[id]] = new Array();n";
- echo " top.center.document.dpreply.drop.options[$i] = new Option('$cat[name]', '$cat[id]');n";
- $i++;
- }
- echo " return true;n}nn";
- $cats = substr($cats, 0, -1);
- $i=0;
- if (!$cats) {
- $cats = '0';
- }
- $db->query("SELECT * FROM quickreply WHERE (category IN ($cats) OR (category = 0 AND techid = $user[id])) ORDER BY category");
- echo $cat_temp;
- while ($article = $db->row_array()) {
- if ($article['category'] != $lastcat) {
- $i=0;
- }
- echo "reply[$article[category]][$i] = new Array('$article[id]', '" . addslashes_js($article['name']) . "', '" . js_linespan(addslashes_js($article['response'])) . "');n";
- $i++;
- $lastcat = $article['category'];
- }
- ?>
- function showdata(i) {
- // empty old rows
- for (m=top.center.document.dpreply.list3.options.length;m>=0;m--) {
- top.center.document.dpreply.list3.options[m]=null;
- }
- // create new rows
- if (i != '') {
- var totalRows = reply[i].length;
- for (rowCount = 0; rowCount < totalRows; rowCount++) {
- top.center.document.dpreply.list3.options[rowCount] = new Option(reply[i][rowCount][1], rowCount);
- top.center.document.dpreply.category.value = i;
- }
- }
- }
- function godeep(entry, category) {
- if (entry == '') {
- alert('Please select an entry');
- } else {
- insertAtCaret (top.center.document.dpreply.reply, reply[category][entry][2]+" ");
- top.center.document.dpreply.reply.focus();
- }
- }
- function storeCaret (textEl) {
- if (textEl.createTextRange)
- textEl.caretPos = document.selection.createRange().duplicate();
- }
- function insertAtCaret (textEl, text) {
- if (textEl.createTextRange && textEl.caretPos) {
- var caretPos = textEl.caretPos;
- caretPos.text =
- caretPos.text.charAt(caretPos.text.length - 1) == ' ' ?
- text + "n" : text;
- }
- else
- textEl.value = text + "n" + textEl.value;
- }
- </SCRIPT>
- </HEAD>
- <body bgcolor="#6782B1" text="#000000" leftmargin="0" marginwidth="0" marginheight="0" topmargin="0" STYLE="margin-bottom:0px">
- </HTML>