Fixed code formatting to tabs
| | |
| | | |
| | | // Check module permissions |
| | | if(!stristr($_SESSION['s']['user']['modules'],'help')) { |
| | | header('Location: ../index.php'); |
| | | die; |
| | | header('Location: ../index.php'); |
| | | die; |
| | | } |
| | | |
| | | // Load the form |
| | |
| | | |
| | | // Check the module permissions and redirect if not allowed. |
| | | if(!stristr($_SESSION['s']['user']['modules'],'help')) { |
| | | header('Location: ../index.php'); |
| | | die; |
| | | header('Location: ../index.php'); |
| | | die; |
| | | } |
| | | |
| | | // Load the templating and form classes |
| | |
| | | // Create a class page_action that extends the tform_actions base class |
| | | class page_action extends tform_actions { |
| | | |
| | | //* Customisations for the page actions will be defined here |
| | | //* Customisations for the page actions will be defined here |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | // Check the module permissions |
| | | if(!stristr($_SESSION['s']['user']['modules'],'help')) { |
| | | header('Location: ../index.php'); |
| | | die(); |
| | | header('Location: ../index.php'); |
| | | die(); |
| | | } |
| | | |
| | | // Loading the class |
| | |
| | | |
| | | // Check module permissions |
| | | if(!stristr($_SESSION['s']['user']['modules'],'help')) { |
| | | header('Location: ../index.php'); |
| | | die; |
| | | header('Location: ../index.php'); |
| | | die; |
| | | } |
| | | |
| | | // Load the form |
| | |
| | | |
| | | // Check the module permissions and redirect if not allowed. |
| | | if(!stristr($_SESSION['s']['user']['modules'],'help')) { |
| | | header('Location: ../index.php'); |
| | | die; |
| | | header('Location: ../index.php'); |
| | | die; |
| | | } |
| | | |
| | | // Load the templating and form classes |
| | |
| | | // Create a class page_action that extends the tform_actions base class |
| | | class page_action extends tform_actions { |
| | | |
| | | //* Customisations for the page actions will be defined here |
| | | //* Customisations for the page actions will be defined here |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | // Check the module permissions |
| | | if(!stristr($_SESSION['s']['user']['modules'],'help')) { |
| | | header('Location: ../index.php'); |
| | | die(); |
| | | header('Location: ../index.php'); |
| | | die(); |
| | | } |
| | | |
| | | // Loading the class |
| | |
| | | // The form definition of the first tab. The name of the tab is called 'message'. We refer |
| | | // to this name in the $form['tab_default'] setting above. |
| | | $form['tabs']['message'] = array( |
| | | 'title' => 'FAQ', // Title of the Tab |
| | | 'width' => 100, // Tab width |
| | | 'template' => 'templates/faq_edit.htm', // Template file name |
| | | 'fields' => array( |
| | | 'title' => 'FAQ', // Title of the Tab |
| | | 'width' => 100, // Tab width |
| | | 'template' => 'templates/faq_edit.htm', // Template file name |
| | | 'fields' => array( |
| | | |
| | | //*** BEGIN Datatable columns ********************************** |
| | | |
| | | 'hf_section' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'SELECT', |
| | | 'default' => '', |
| | | 'datasource' => array ( 'type' => 'SQL', |
| | | 'querystring' => 'SELECT hfs_id,hfs_name FROM help_faq_sections', |
| | | 'keyfield' => 'hfs_id', |
| | | 'valuefield' => 'hfs_name' |
| | | ), |
| | | 'validators' => array ( 0 => array ( 'type' => 'ISINT', |
| | | 'errmsg'=> 'recipient_id_is_not_integer'), |
| | | ), |
| | | 'value' => ($_SESSION['s']['user']['typ'] != 'admin')?array(1 => 'Administrator'):'' |
| | | ), |
| | | 'hf_section' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'SELECT', |
| | | 'default' => '', |
| | | 'datasource' => array ( 'type' => 'SQL', |
| | | 'querystring' => 'SELECT hfs_id,hfs_name FROM help_faq_sections', |
| | | 'keyfield' => 'hfs_id', |
| | | 'valuefield' => 'hfs_name' |
| | | ), |
| | | 'validators' => array ( 0 => array ( |
| | | 'type' => 'ISINT', |
| | | 'errmsg'=> 'recipient_id_is_not_integer'), |
| | | ), |
| | | 'value' => ($_SESSION['s']['user']['typ'] != 'admin')?array(1 => 'Administrator'):'' |
| | | ), |
| | | |
| | | 'hf_question' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'validators' => array( 0 => array( 'type' => 'NOTEMPTY', |
| | | 'errmsg'=> 'subject_is_empty' |
| | | ), |
| | | ), |
| | | 'default' => '', |
| | | 'value' => '', |
| | | 'width' => '30', |
| | | 'maxlength' => '255' |
| | | ), |
| | | 'hf_question' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'validators' => array( 0 => array( 'type' => 'NOTEMPTY', |
| | | 'errmsg'=> 'subject_is_empty' |
| | | ), |
| | | ), |
| | | 'default' => '', |
| | | 'value' => '', |
| | | 'width' => '30', |
| | | 'maxlength' => '255' |
| | | ), |
| | | |
| | | 'hf_answer' => array( |
| | | 'datatype' => 'TEXT', |
| | | 'formtype' => 'TEXTAREA', |
| | | 'validators' => array( 0 => array( 'type' => 'NOTEMPTY', |
| | | 'errmsg'=> 'message_is_empty' |
| | | ), |
| | | ), |
| | | 'default' => '', |
| | | 'value' => '', |
| | | 'cols' => '30', |
| | | 'rows' => '10', |
| | | 'maxlength' => '255' |
| | | ), |
| | | 'hf_answer' => array( |
| | | 'datatype' => 'TEXT', |
| | | 'formtype' => 'TEXTAREA', |
| | | 'validators' => array( 0 => array( 'type' => 'NOTEMPTY', |
| | | 'errmsg' => 'message_is_empty' |
| | | ), |
| | | ), |
| | | 'default' => '', |
| | | 'value' => '', |
| | | 'cols' => '30', |
| | | 'rows' => '10', |
| | | 'maxlength' => '255' |
| | | ), |
| | | |
| | | //*** END Datatable columns ********************************** |
| | | //*** END Datatable columns ********************************** |
| | | ) |
| | | ); |
| | | ?> |
| | |
| | | // The form definition of the first tab. The name of the tab is called 'message'. We refer |
| | | // to this name in the $form['tab_default'] setting above. |
| | | $form['tabs']['message'] = array( |
| | | 'title' => 'FAQ', // Title of the Tab |
| | | 'width' => 100, // Tab width |
| | | 'template' => 'templates/faq_sections_edit.htm', // Template file name |
| | | 'fields' => array( |
| | | 'title' => 'FAQ', // Title of the Tab |
| | | 'width' => 100, // Tab width |
| | | 'template' => 'templates/faq_sections_edit.htm', // Template file name |
| | | 'fields' => array( |
| | | |
| | | //*** BEGIN Datatable columns ********************************** |
| | | //*** BEGIN Datatable columns ********************************** |
| | | |
| | | 'hfs_name' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'validators' => array( 0 => array( 'type' => 'NOTEMPTY', |
| | | 'errmsg'=> 'subject_is_empty' |
| | | ), |
| | | ), |
| | | 'default' => '', |
| | | 'value' => '', |
| | | 'width' => '30', |
| | | 'maxlength' => '255' |
| | | ), |
| | | //*** END Datatable columns ********************************** |
| | | 'hfs_name' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'validators'=> array( 0 => array( 'type' => 'NOTEMPTY', |
| | | 'errmsg'=> 'subject_is_empty' |
| | | ), |
| | | ), |
| | | 'default' => '', |
| | | 'value' => '', |
| | | 'width' => '30', |
| | | 'maxlength' => '255' |
| | | ), |
| | | //*** END Datatable columns ********************************* |
| | | ) |
| | | ); |
| | | ?> |
| | |
| | | $itemsfaq = array(); |
| | | //* admin's tools |
| | | if($_SESSION['s']['user']['typ'] == 'admin') { |
| | | $itemsfaq[] = array( 'title' => 'Add a Question & Answer Pair', |
| | | 'target' => 'content', |
| | | 'link' => 'help/faq_edit.php'); |
| | | $itemsfaq[] = array( 'title' => 'Manage Sections', |
| | | 'target' => 'content', |
| | | 'link' => 'help/faq_sections_list.php'); |
| | | $itemsfaq[] = array( 'title' => 'Add a Question & Answer Pair', |
| | | 'target' => 'content', |
| | | 'link' => 'help/faq_edit.php'); |
| | | $itemsfaq[] = array( 'title' => 'Manage Sections', |
| | | 'target' => 'content', |
| | | 'link' => 'help/faq_sections_list.php'); |
| | | } |
| | | $sql = "SELECT * FROM help_faq_sections"; |
| | | $res = $app->db->queryAllRecords($sql); |
| | | //* all the content sections |
| | | if(is_array($res)) { |
| | | foreach($res as $v) { |
| | | $itemsfaq[] = array( 'title' => $v['hfs_name'], |
| | | 'target' => 'content', |
| | | 'link' => 'help/faq_list.php?hfs_id='.$v['hfs_id']); |
| | | $itemsfaq[] = array( 'title' => $v['hfs_name'], |
| | | 'target' => 'content', |
| | | 'link' => 'help/faq_list.php?hfs_id='.$v['hfs_id']); |
| | | } |
| | | } |
| | | |
| | | $module['nav'][] = array( 'title' => 'FAQ', |
| | | 'open' => 1, |
| | | 'items' => $itemsfaq); |
| | | $module['nav'][] = array( 'title' => 'FAQ', |
| | | 'open' => 1, |
| | | 'items' => $itemsfaq); |
| | | //* -- end of the FAQ menu section |
| | | |
| | | |
| | |
| | | <div class="pnl_listarea"> |
| | | <fieldset><legend><tmpl_var name="faq_sections_txt"></legend> |
| | | <table class="list"> |
| | | <thead> |
| | | <thead> |
| | | <tr> |
| | | <th class="tbl_col_active" scope="col">{tmpl_var name="faq_section_name_txt"}</th> |
| | | <th class="tbl_col_server_id" scope="col">{tmpl_var name="faq_delete_txt"}</th> |