faqpop.php
上传用户:gzy2002
上传日期:2010-02-11
资源大小:1785k
文件大小:3k
- <?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: faqpop.php,v $
- // | $Date: 2004/02/10 01:34:30 $
- // | $Revision: 1.13 $
- // +-------------------------------------------------------------+
- // | File Details:
- // | - FAQ article popup.
- // +-------------------------------------------------------------+
- error_reporting(E_ALL ^ E_NOTICE);
- include "./../global.php";
- // default do
- $_REQUEST['do'] = trim($_REQUEST['do']);
- if (!isset($_REQUEST['do']) or $_REQUEST['do'] == "") {
- $_REQUEST['do'] = "categories";
- }
- // globalise variables
- $global = array (
- array('id')
- );
- rg($global);
- include ("./../faq/faq_include.php");
- tech_mini_header();
- table_header('FAQ', NULL, NULL, 1);
- table_content(NULL, NULL);
- table_footer();
- ############################### LIST CATEGORIES ###############################
- $categories = faq_categoryjump();
- echo table_border("<table cellpadding="3" border="0"><form><tr><td><b>Pick Category</b></td><td>" . form_select('category', $categories, '', $_REQUEST['category']) . "</td><td><input type="submit" name="View Articles" value="View Articles">" . form_hidden('do', 'pickarticle') . "</td></tr></form></table>");
- echo "<br />";
- ############################### LIST ARTICLES ###############################
- if ($_REQUEST['category']) {
- echo "<form name="dpform">";
- $db->query("SELECT id, title, answer
- FROM faq_articles
- WHERE category = '$_REQUEST[category]'
- ");
- while ($result = $db->row_array()) {
- $var = 'article' . $result['id'];
- $link = $settings['helpdesk_url'] . "/faq.php?do=article&articleid=$result[id]";
- $table[] = array(
- $result['title'] . form_hidden('article' . $result[id], $result['answer']),
- "<a href="javascript:window.opener.top.empty.insertAtCaret(window.opener.top.center.document.dpreply.reply, '".addslashes_js($result['answer'])."');">Insert Article</a>",
- "<a href="javascript:window.opener.top.empty.insertAtCaret(window.opener.top.center.document.dpreply.reply, '".addslashes_js($link)."');">Insert Link</a>"
- );
- }
- if (is_array($table)) {
- table_header('Faq Articles');
- table_content('', $table, '', '', '', '', array('', '80', '80'));
- table_footer();
- } else {
- echo "<center><b>No articles for this category</b></center>";
- }
- echo "</form>";
- }