mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 06:38:00 +02:00
Remove 'debug' code
This commit is contained in:
@@ -9,9 +9,9 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/faqs/faqs.php,v $
|
* $Source: /cvs_backup/e107_0.8/e107_plugins/faqs/faqs.php,v $
|
||||||
* $Revision: 1.4 $
|
* $Revision: 1.5 $
|
||||||
* $Date: 2009-11-20 05:01:51 $
|
* $Date: 2009-12-02 22:34:58 $
|
||||||
* $Author: e107coders $
|
* $Author: bugrain $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once ("../../class2.php");
|
require_once ("../../class2.php");
|
||||||
@@ -79,7 +79,7 @@ if (isset($_POST['faq_edit_submit']))
|
|||||||
{
|
{
|
||||||
$faq_question = $aj->formtpa($_POST['faq_question'], "on");
|
$faq_question = $aj->formtpa($_POST['faq_question'], "on");
|
||||||
$data = $aj->formtpa($_POST['data'], "on");
|
$data = $aj->formtpa($_POST['data'], "on");
|
||||||
|
|
||||||
$sql->db_Update("faqs", "faq_parent='".$_POST['faq_parent']."', faq_question ='$faq_question', faq_answer='$data', faq_comment='".$_POST['faq_comment']."' WHERE faq_id='".$idx."' ");
|
$sql->db_Update("faqs", "faq_parent='".$_POST['faq_parent']."', faq_question ='$faq_question', faq_answer='$data', faq_comment='".$_POST['faq_comment']."' WHERE faq_id='".$idx."' ");
|
||||||
$message = FAQ_ADLAN_29;
|
$message = FAQ_ADLAN_29;
|
||||||
unset($faq_question, $data);
|
unset($faq_question, $data);
|
||||||
@@ -106,13 +106,13 @@ if (isset($_POST['commentsubmit']))
|
|||||||
{
|
{
|
||||||
if(vartrue($faqpref['classic_look']))
|
if(vartrue($faqpref['classic_look']))
|
||||||
{
|
{
|
||||||
$tmp = $faq->show_existing_parents($action, $sub_action, $id, $from, $amount);
|
$tmp = $faq->show_existing_parents($action, $sub_action, $id, $from, $amount);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$tmp = $faq->view_all();
|
$tmp = $faq->view_all();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vartrue($faqpref['faq_title']))
|
if (vartrue($faqpref['faq_title']))
|
||||||
{
|
{
|
||||||
define("e_PAGETITLE", $faqpref['faq_title']);
|
define("e_PAGETITLE", $faqpref['faq_title']);
|
||||||
@@ -122,7 +122,7 @@ if (isset($_POST['commentsubmit']))
|
|||||||
define("e_PAGETITLE", FAQLAN_23);
|
define("e_PAGETITLE", FAQLAN_23);
|
||||||
}
|
}
|
||||||
require_once (HEADERF);
|
require_once (HEADERF);
|
||||||
$ns->tablerender(FAQLAN_41, $tmp['text']);
|
$ns->tablerender(FAQLAN_41, $tmp['text']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($action == "cat" && $idx)
|
if($action == "cat" && $idx)
|
||||||
@@ -132,11 +132,11 @@ if (isset($_POST['commentsubmit']))
|
|||||||
require_once(HEADERF);
|
require_once(HEADERF);
|
||||||
$ns -> tablerender($tmp['caption'], $tmp['text']);
|
$ns -> tablerender($tmp['caption'], $tmp['text']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == "cat")
|
if ($action == "cat")
|
||||||
{
|
{
|
||||||
$tmp = $faq->view_cat_list($action, $id);
|
$tmp = $faq->view_cat_list($action, $id);
|
||||||
|
|
||||||
define("e_PAGETITLE", strip_tags($tmp['title'].$tmp['caption']));
|
define("e_PAGETITLE", strip_tags($tmp['title'].$tmp['caption']));
|
||||||
require_once (HEADERF);
|
require_once (HEADERF);
|
||||||
$ns->tablerender($tmp['caption'], $tmp['text']);
|
$ns->tablerender($tmp['caption'], $tmp['text']);
|
||||||
@@ -159,31 +159,30 @@ exit;
|
|||||||
class faq
|
class faq
|
||||||
{
|
{
|
||||||
var $pref = array();
|
var $pref = array();
|
||||||
|
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
$this->pref = e107::getPlugConfig('faqs')->getPref();
|
$this->pref = e107::getPlugConfig('faqs')->getPref();
|
||||||
setScVar('faqs_shortcodes', 'pref', $this->pref);
|
setScVar('faqs_shortcodes', 'pref', $this->pref);
|
||||||
}
|
}
|
||||||
|
|
||||||
function view_all() // new funtion to render all FAQs
|
function view_all() // new funtion to render all FAQs
|
||||||
{
|
{
|
||||||
echo "hello";
|
|
||||||
$sql = e107::getDb();
|
$sql = e107::getDb();
|
||||||
$tp = e107::getParser();
|
$tp = e107::getParser();
|
||||||
|
|
||||||
global $FAQ_START, $FAQ_END, $FAQ_LISTALL_START,$FAQ_LISTALL_LOOP,$FAQ_LISTALL_END;
|
global $FAQ_START, $FAQ_END, $FAQ_LISTALL_START,$FAQ_LISTALL_LOOP,$FAQ_LISTALL_END;
|
||||||
|
|
||||||
require_once (e_PLUGIN."faqs/faqs_shortcodes.php");
|
require_once (e_PLUGIN."faqs/faqs_shortcodes.php");
|
||||||
|
|
||||||
$query = "SELECT f.*,cat.* FROM #faqs AS f LEFT JOIN #faqs_info AS cat ON f.faq_parent = cat.faq_info_id ORDER BY cat.faq_info_order,f.faq_order ";
|
$query = "SELECT f.*,cat.* FROM #faqs AS f LEFT JOIN #faqs_info AS cat ON f.faq_parent = cat.faq_info_id ORDER BY cat.faq_info_order,f.faq_order ";
|
||||||
$sql->db_Select_gen($query);
|
$sql->db_Select_gen($query);
|
||||||
$text = $tp->parseTemplate($FAQ_START, true);
|
$text = $tp->parseTemplate($FAQ_START, true);
|
||||||
$prevcat = "";
|
$prevcat = "";
|
||||||
while ($rw = $sql->db_Fetch())
|
while ($rw = $sql->db_Fetch())
|
||||||
{
|
{
|
||||||
setScVar('faqs_shortcodes', 'row', $rw);
|
setScVar('faqs_shortcodes', 'row', $rw);
|
||||||
|
|
||||||
if($rw['faq_info_order'] != $prevcat)
|
if($rw['faq_info_order'] != $prevcat)
|
||||||
{
|
{
|
||||||
if($prevcat !='')
|
if($prevcat !='')
|
||||||
@@ -192,41 +191,41 @@ class faq
|
|||||||
}
|
}
|
||||||
$text .= "\n\n<!-- FAQ Start ".$rw['faq_info_order']."-->\n\n";
|
$text .= "\n\n<!-- FAQ Start ".$rw['faq_info_order']."-->\n\n";
|
||||||
$text .= $tp->parseTemplate($FAQ_LISTALL_START, true);
|
$text .= $tp->parseTemplate($FAQ_LISTALL_START, true);
|
||||||
$start = TRUE;
|
$start = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
$text .= $tp->parseTemplate($FAQ_LISTALL_LOOP, true);
|
$text .= $tp->parseTemplate($FAQ_LISTALL_LOOP, true);
|
||||||
$prevcat = $rw['faq_info_order'];
|
$prevcat = $rw['faq_info_order'];
|
||||||
|
|
||||||
}
|
}
|
||||||
$text .= $tp->parseTemplate($FAQ_LISTALL_END, true);
|
$text .= $tp->parseTemplate($FAQ_LISTALL_END, true);
|
||||||
$text .= $tp->parseTemplate($FAQ_END, true);
|
$text .= $tp->parseTemplate($FAQ_END, true);
|
||||||
|
|
||||||
$ret['title'] = FAQLAN_FAQ;
|
$ret['title'] = FAQLAN_FAQ;
|
||||||
$ret['text'] = $text;
|
$ret['text'] = $text;
|
||||||
$ret['caption'] = $caption;
|
$ret['caption'] = $caption;
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ------------- Everything below here is kept for backwards-compatability 'Classic Look' ------------
|
// ------------- Everything below here is kept for backwards-compatability 'Classic Look' ------------
|
||||||
|
|
||||||
|
|
||||||
function view_cat_list($action, $id)
|
function view_cat_list($action, $id)
|
||||||
{
|
{
|
||||||
global $ns,$row,$FAQ_LIST_START,$FAQ_LIST_LOOP,$FAQ_LIST_END;
|
global $ns,$row,$FAQ_LIST_START,$FAQ_LIST_LOOP,$FAQ_LIST_END;
|
||||||
|
|
||||||
$tp = e107::getParser();
|
$tp = e107::getParser();
|
||||||
$sql = e107::getDb();
|
$sql = e107::getDb();
|
||||||
require_once (e_PLUGIN."faqs/faqs_shortcodes.php");
|
require_once (e_PLUGIN."faqs/faqs_shortcodes.php");
|
||||||
|
|
||||||
$query = "SELECT f.*,cat.* FROM #faqs AS f LEFT JOIN #faqs_info AS cat ON f.faq_parent = cat.faq_info_id WHERE f.faq_parent = '$id' ";
|
$query = "SELECT f.*,cat.* FROM #faqs AS f LEFT JOIN #faqs_info AS cat ON f.faq_parent = cat.faq_info_id WHERE f.faq_parent = '$id' ";
|
||||||
$sql->db_Select_gen($query);
|
$sql->db_Select_gen($query);
|
||||||
|
|
||||||
setScVar('faqs_shortcodes', 'row', $row);
|
setScVar('faqs_shortcodes', 'row', $row);
|
||||||
|
|
||||||
$text = $tp->parseTemplate($FAQ_LIST_START, true);
|
$text = $tp->parseTemplate($FAQ_LIST_START, true);
|
||||||
|
|
||||||
while ($rw = $sql->db_Fetch())
|
while ($rw = $sql->db_Fetch())
|
||||||
{
|
{
|
||||||
setScVar('faqs_shortcodes', 'row', $rw);
|
setScVar('faqs_shortcodes', 'row', $rw);
|
||||||
@@ -234,29 +233,29 @@ class faq
|
|||||||
$caption = " Category: <b>".$rw['faq_info_title']."</b>";
|
$caption = " Category: <b>".$rw['faq_info_title']."</b>";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$text .= $tp->parseTemplate($FAQ_LIST_END, true);
|
$text .= $tp->parseTemplate($FAQ_LIST_END, true);
|
||||||
|
|
||||||
$ret['title'] = FAQLAN_FAQ." - ".$category_title;
|
$ret['title'] = FAQLAN_FAQ." - ".$category_title;
|
||||||
$ret['text'] = $text.$this->faq_footer($id);
|
$ret['text'] = $text.$this->faq_footer($id);
|
||||||
$ret['caption'] = $caption;
|
$ret['caption'] = $caption;
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
// =============================================================================
|
// =============================================================================
|
||||||
|
|
||||||
function show_existing_parents($action, $sub_action, $id, $from, $amount)
|
function show_existing_parents($action, $sub_action, $id, $from, $amount)
|
||||||
{
|
{
|
||||||
$tp = e107::getParser();
|
$tp = e107::getParser();
|
||||||
$sql = e107::getDb();
|
$sql = e107::getDb();
|
||||||
|
|
||||||
// ##### Display scrolling list of existing FAQ items ---------------------------------------------------------------------------------------------------------
|
// ##### Display scrolling list of existing FAQ items ---------------------------------------------------------------------------------------------------------
|
||||||
global $FAQ_CAT_START,$FAQ_CAT_PARENT,$FAQ_CAT_CHILD,$FAQ_CAT_END;
|
global $FAQ_CAT_START,$FAQ_CAT_PARENT,$FAQ_CAT_CHILD,$FAQ_CAT_END;
|
||||||
|
|
||||||
require_once (e_PLUGIN."faqs/faqs_shortcodes.php");
|
require_once (e_PLUGIN."faqs/faqs_shortcodes.php");
|
||||||
|
|
||||||
$text = "<div style='text-align:center'>
|
$text = "<div style='text-align:center'>
|
||||||
<div style='text-align:center'>";
|
<div style='text-align:center'>";
|
||||||
|
|
||||||
$qry = "SELECT dc.*,
|
$qry = "SELECT dc.*,
|
||||||
COUNT(d.faq_id) AS f_count,
|
COUNT(d.faq_id) AS f_count,
|
||||||
COUNT(d2.faq_id) AS f_subcount
|
COUNT(d2.faq_id) AS f_subcount
|
||||||
@@ -266,25 +265,25 @@ class faq
|
|||||||
LEFT JOIN #faqs AS d2 ON dc2.faq_info_id = d2.faq_parent
|
LEFT JOIN #faqs AS d2 ON dc2.faq_info_id = d2.faq_parent
|
||||||
WHERE dc.faq_info_class IN (".USERCLASS_LIST.")
|
WHERE dc.faq_info_class IN (".USERCLASS_LIST.")
|
||||||
GROUP by dc.faq_info_id ORDER by dc.faq_info_order,dc.faq_info_parent "; //
|
GROUP by dc.faq_info_id ORDER by dc.faq_info_order,dc.faq_info_parent "; //
|
||||||
|
|
||||||
$text .= $FAQ_CAT_START;
|
$text .= $FAQ_CAT_START;
|
||||||
|
|
||||||
$sql->db_Select_gen($qry);
|
$sql->db_Select_gen($qry);
|
||||||
while ($row = $sql->db_Fetch())
|
while ($row = $sql->db_Fetch())
|
||||||
{
|
{
|
||||||
|
|
||||||
setScVar('faqs_shortcodes', 'row', $row);
|
setScVar('faqs_shortcodes', 'row', $row);
|
||||||
|
|
||||||
if ($row['faq_info_parent'] == '0') //
|
if ($row['faq_info_parent'] == '0') //
|
||||||
{
|
{
|
||||||
$text .= $tp->parseTemplate($FAQ_CAT_PARENT, true);
|
$text .= $tp->parseTemplate($FAQ_CAT_PARENT, true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!$row['f_count'] && !$row['f_subcount'])
|
if (!$row['f_count'] && !$row['f_subcount'])
|
||||||
{
|
{
|
||||||
|
|
||||||
$text .= $tp->parseTemplate($FAQ_CAT_CHILD, true);
|
$text .= $tp->parseTemplate($FAQ_CAT_CHILD, true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -293,43 +292,43 @@ class faq
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$text .= $FAQ_CAT_END;
|
$text .= $FAQ_CAT_END;
|
||||||
|
|
||||||
$ret['text'] = $text.$this->faq_footer();
|
$ret['text'] = $text.$this->faq_footer();
|
||||||
return $ret;
|
return $ret;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
|
||||||
function view_faq($idx)
|
function view_faq($idx)
|
||||||
{
|
{
|
||||||
global $ns,$row,$sql,$aj,$pref,$cobj,$id,$tp,$FAQ_VIEW_TEMPLATE;
|
global $ns,$row,$sql,$aj,$pref,$cobj,$id,$tp,$FAQ_VIEW_TEMPLATE;
|
||||||
|
|
||||||
require_once (e_PLUGIN."faqs/faqs_shortcodes.php");
|
require_once (e_PLUGIN."faqs/faqs_shortcodes.php");
|
||||||
|
|
||||||
$sql->db_Select("faqs", "*", "faq_id='$idx' LIMIT 1");
|
$sql->db_Select("faqs", "*", "faq_id='$idx' LIMIT 1");
|
||||||
$row = $sql->db_Fetch();
|
$row = $sql->db_Fetch();
|
||||||
setScVar('faqs_shortcodes', 'row', $row);
|
setScVar('faqs_shortcodes', 'row', $row);
|
||||||
|
|
||||||
$caption = " FAQ #".$row['faq_id'];
|
$caption = " FAQ #".$row['faq_id'];
|
||||||
$text = $tp->parseTemplate($FAQ_VIEW_TEMPLATE, true);
|
$text = $tp->parseTemplate($FAQ_VIEW_TEMPLATE, true);
|
||||||
|
|
||||||
// $text = $tp->toHTML($text, TRUE);
|
// $text = $tp->toHTML($text, TRUE);
|
||||||
|
|
||||||
$ret['text'] = $text;
|
$ret['text'] = $text;
|
||||||
$ret['caption'] = $caption;
|
$ret['caption'] = $caption;
|
||||||
$ret['title'] = $row['faq_question'];
|
$ret['title'] = $row['faq_question'];
|
||||||
$ret['comments'] = $text;
|
$ret['comments'] = $text;
|
||||||
|
|
||||||
return $ret;
|
return $ret;
|
||||||
|
|
||||||
$subject = (!$subject ? $aj->formtpa($faq_question) : $subject);
|
$subject = (!$subject ? $aj->formtpa($faq_question) : $subject);
|
||||||
|
|
||||||
if (check_class($row['faq_comment']))
|
if (check_class($row['faq_comment']))
|
||||||
{
|
{
|
||||||
|
|
||||||
$action = "comment";
|
$action = "comment";
|
||||||
$table = "faq";
|
$table = "faq";
|
||||||
$query = ($pref['nested_comments'] ? "comment_item_id='$idx' AND (comment_type='$table' OR comment_type='3') AND comment_pid='0' ORDER BY comment_datestamp" : "comment_item_id='$idx' AND (comment_type='$table' OR comment_type='3') ORDER BY comment_datestamp");
|
$query = ($pref['nested_comments'] ? "comment_item_id='$idx' AND (comment_type='$table' OR comment_type='3') AND comment_pid='0' ORDER BY comment_datestamp" : "comment_item_id='$idx' AND (comment_type='$table' OR comment_type='3') ORDER BY comment_datestamp");
|
||||||
@@ -368,7 +367,7 @@ class faq
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function faq_footer($id='')
|
function faq_footer($id='')
|
||||||
{
|
{
|
||||||
global $faqpref,$timing_start,$tp,$cust_footer, $CUSTOMPAGES, $CUSTOMHEADER, $CUSTOMHEADER;
|
global $faqpref,$timing_start,$tp,$cust_footer, $CUSTOMPAGES, $CUSTOMHEADER, $CUSTOMHEADER;
|
||||||
@@ -382,20 +381,20 @@ class faq
|
|||||||
|
|
||||||
$text_menu .= "<div style='text-align:center'><br />".$tp->parseTemplate("{SEARCH=faq}")."</div>";
|
$text_menu .= "<div style='text-align:center'><br />".$tp->parseTemplate("{SEARCH=faq}")."</div>";
|
||||||
return $text_menu;
|
return $text_menu;
|
||||||
|
|
||||||
// require_once (FOOTERF);
|
// require_once (FOOTERF);
|
||||||
}
|
}
|
||||||
|
|
||||||
function add_faq($action, $id, $idx)
|
function add_faq($action, $id, $idx)
|
||||||
{
|
{
|
||||||
global $rs;
|
global $rs;
|
||||||
|
|
||||||
$tp = e107::getParser();
|
$tp = e107::getParser();
|
||||||
$sql = e107::getDb();
|
$sql = e107::getDb();
|
||||||
$ns = e107::getRender();
|
$ns = e107::getRender();
|
||||||
|
|
||||||
$userid = USERID;
|
$userid = USERID;
|
||||||
|
|
||||||
$text .= "<table class='fborder' style=\"".USER_WIDTH."\" >
|
$text .= "<table class='fborder' style=\"".USER_WIDTH."\" >
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan='2' class='forumheader3' style=\"width:80%; padding:0px\">";
|
<td colspan='2' class='forumheader3' style=\"width:80%; padding:0px\">";
|
||||||
@@ -410,7 +409,7 @@ class faq
|
|||||||
{
|
{
|
||||||
// list($pfaq_id, $pfaq_parent, $pfaq_question, $pfaq_answer, $pfaq_comment);
|
// list($pfaq_id, $pfaq_parent, $pfaq_question, $pfaq_answer, $pfaq_comment);
|
||||||
$rw['faq_question'] = substr($rw['faq_question'], 0, 50)." ... ";
|
$rw['faq_question'] = substr($rw['faq_question'], 0, 50)." ... ";
|
||||||
|
|
||||||
$text .= "<tr>
|
$text .= "<tr>
|
||||||
|
|
||||||
<td style='width:70%' class='forumheader3'>".($rw['faq_question'] ? $tp->toHTML($rw['faq_question']) : "[".NWSLAN_42."]")."</td>
|
<td style='width:70%' class='forumheader3'>".($rw['faq_question'] ? $tp->toHTML($rw['faq_question']) : "[".NWSLAN_42."]")."</td>
|
||||||
@@ -421,7 +420,7 @@ class faq
|
|||||||
</tr>";
|
</tr>";
|
||||||
}
|
}
|
||||||
$text .= "</table></div>";
|
$text .= "</table></div>";
|
||||||
|
|
||||||
if ($action == "edit")
|
if ($action == "edit")
|
||||||
{
|
{
|
||||||
$sql->db_Select("faqs", "*", " faq_id = '$idx' ");
|
$sql->db_Select("faqs", "*", " faq_id = '$idx' ");
|
||||||
@@ -429,21 +428,21 @@ class faq
|
|||||||
extract($row);
|
extract($row);
|
||||||
$data = $faq_answer;
|
$data = $faq_answer;
|
||||||
}
|
}
|
||||||
|
|
||||||
$text .= "</td>
|
$text .= "</td>
|
||||||
</tr></table><form method=\"post\" action=\"".e_SELF."?cat.$id.$idx\" id=\"dataform\">
|
</tr></table><form method=\"post\" action=\"".e_SELF."?cat.$id.$idx\" id=\"dataform\">
|
||||||
<table class='fborder' style=\"".USER_WIDTH."\" >
|
<table class='fborder' style=\"".USER_WIDTH."\" >
|
||||||
<tr>
|
<tr>
|
||||||
<td class='fcaption' colspan='2' style='text-align:center'>";
|
<td class='fcaption' colspan='2' style='text-align:center'>";
|
||||||
|
|
||||||
$text .= (is_numeric($id)) ? "Edit" : "Add";
|
$text .= (is_numeric($id)) ? "Edit" : "Add";
|
||||||
$text .= " an FAQ</td></tr>";
|
$text .= " an FAQ</td></tr>";
|
||||||
|
|
||||||
$text .= "
|
$text .= "
|
||||||
<tr>
|
<tr>
|
||||||
<td class='forumheader3' style=\"width:20%\">".FAQ_ADLAN_78."</td>
|
<td class='forumheader3' style=\"width:20%\">".FAQ_ADLAN_78."</td>
|
||||||
<td class='forumheader3' style=\"width:80%\">";
|
<td class='forumheader3' style=\"width:80%\">";
|
||||||
|
|
||||||
$text .= "<select style='width:150px' class='tbox' id='faq_parent' name='faq_parent' >";
|
$text .= "<select style='width:150px' class='tbox' id='faq_parent' name='faq_parent' >";
|
||||||
$sql->db_Select("faqs_info", "*", "faq_info_parent !='0' ");
|
$sql->db_Select("faqs_info", "*", "faq_info_parent !='0' ");
|
||||||
while ($prow = $sql->db_Fetch())
|
while ($prow = $sql->db_Fetch())
|
||||||
@@ -455,7 +454,7 @@ class faq
|
|||||||
$text .= " </select>
|
$text .= " </select>
|
||||||
</td>
|
</td>
|
||||||
</tr>";
|
</tr>";
|
||||||
|
|
||||||
$text .= "
|
$text .= "
|
||||||
<tr>
|
<tr>
|
||||||
<td class='forumheader3' style=\"width:20%\">".FAQ_ADLAN_51."</td>
|
<td class='forumheader3' style=\"width:20%\">".FAQ_ADLAN_51."</td>
|
||||||
@@ -473,9 +472,9 @@ class faq
|
|||||||
<input class='helpbox' type=\"text\" id='helpb' name=\"helpb\" size=\"70\" style='width:100%' /><br />
|
<input class='helpbox' type=\"text\" id='helpb' name=\"helpb\" size=\"70\" style='width:100%' /><br />
|
||||||
";
|
";
|
||||||
$text .= ren_help("addtext");
|
$text .= ren_help("addtext");
|
||||||
|
|
||||||
$text .= "<br /></td></tr>";
|
$text .= "<br /></td></tr>";
|
||||||
|
|
||||||
if (ADMIN)
|
if (ADMIN)
|
||||||
{
|
{
|
||||||
$text .= "<tr>
|
$text .= "<tr>
|
||||||
@@ -494,7 +493,7 @@ class faq
|
|||||||
<tr>
|
<tr>
|
||||||
<td class='forumheader' colspan=\"2\" style=\"text-align:center\">
|
<td class='forumheader' colspan=\"2\" style=\"text-align:center\">
|
||||||
";
|
";
|
||||||
|
|
||||||
if ($action == "edit")
|
if ($action == "edit")
|
||||||
{
|
{
|
||||||
$text .= "<input class=\"button\" type=\"submit\" name=\"faq_edit_submit\" value=\"".FAQ_ADLAN_53."$faq_id\" />
|
$text .= "<input class=\"button\" type=\"submit\" name=\"faq_edit_submit\" value=\"".FAQ_ADLAN_53."$faq_id\" />
|
||||||
@@ -504,14 +503,14 @@ class faq
|
|||||||
{
|
{
|
||||||
$text .= "<input class=\"button\" type=\"submit\" name=\"faq_submit\" value=\"".FAQ_ADLAN_54."\" />";
|
$text .= "<input class=\"button\" type=\"submit\" name=\"faq_submit\" value=\"".FAQ_ADLAN_54."\" />";
|
||||||
}
|
}
|
||||||
|
|
||||||
$text .= "<input type=\"hidden\" name=\"faq\" value=\"$faq\" />
|
$text .= "<input type=\"hidden\" name=\"faq\" value=\"$faq\" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</form>";
|
</form>";
|
||||||
|
|
||||||
if(varset($faq))
|
if(varset($faq))
|
||||||
{
|
{
|
||||||
$sql->db_Select("faqs_info", "*", "faq_info_id='$faq'");
|
$sql->db_Select("faqs_info", "*", "faq_info_id='$faq'");
|
||||||
@@ -519,7 +518,7 @@ class faq
|
|||||||
extract($row);
|
extract($row);
|
||||||
}
|
}
|
||||||
$ns->tablerender("Frequently asked Questions".$faq_info_title, "<div style='text-align:center'>".$text."</div>".$this->faq_footer());
|
$ns->tablerender("Frequently asked Questions".$faq_info_title, "<div style='text-align:center'>".$text."</div>".$this->faq_footer());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user