filip
2010-09-30 f612f1ebc2b3d70f71da020d9aad01ba09461837
Fixed code formatting to tabs
10 files modified
179 ■■■■ changed files
interface/web/help/faq_delete.php 4 ●●●● patch | view | raw | blame | history
interface/web/help/faq_edit.php 6 ●●●● patch | view | raw | blame | history
interface/web/help/faq_list.php 4 ●●●● patch | view | raw | blame | history
interface/web/help/faq_sections_delete.php 4 ●●●● patch | view | raw | blame | history
interface/web/help/faq_sections_edit.php 6 ●●●● patch | view | raw | blame | history
interface/web/help/faq_sections_list.php 4 ●●●● patch | view | raw | blame | history
interface/web/help/form/faq.tform.php 89 ●●●● patch | view | raw | blame | history
interface/web/help/form/faq_sections.tform.php 36 ●●●● patch | view | raw | blame | history
interface/web/help/lib/module.conf.php 24 ●●●● patch | view | raw | blame | history
interface/web/help/templates/help_faq_sections_list.htm 2 ●●● patch | view | raw | blame | history
interface/web/help/faq_delete.php
@@ -10,8 +10,8 @@
// Check module permissions
if(!stristr($_SESSION['s']['user']['modules'],'help')) {
    header('Location: ../index.php');
    die;
    header('Location: ../index.php');
    die;
}
// Load the form
interface/web/help/faq_edit.php
@@ -9,8 +9,8 @@
// 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
@@ -20,7 +20,7 @@
// 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
}
interface/web/help/faq_list.php
@@ -8,8 +8,8 @@
// Check the module permissions
if(!stristr($_SESSION['s']['user']['modules'],'help')) {
    header('Location: ../index.php');
    die();
    header('Location: ../index.php');
    die();
}
// Loading the class
interface/web/help/faq_sections_delete.php
@@ -10,8 +10,8 @@
// Check module permissions
if(!stristr($_SESSION['s']['user']['modules'],'help')) {
    header('Location: ../index.php');
    die;
    header('Location: ../index.php');
    die;
}
// Load the form
interface/web/help/faq_sections_edit.php
@@ -9,8 +9,8 @@
// 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
@@ -20,7 +20,7 @@
// 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
}
interface/web/help/faq_sections_list.php
@@ -8,8 +8,8 @@
// Check the module permissions
if(!stristr($_SESSION['s']['user']['modules'],'help')) {
    header('Location: ../index.php');
    die();
    header('Location: ../index.php');
    die();
}
// Loading the class
interface/web/help/form/faq.tform.php
@@ -49,56 +49,57 @@
// 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 **********************************
    )
);
?>
interface/web/help/form/faq_sections.tform.php
@@ -49,26 +49,26 @@
// 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 *********************************
    )
);
?>
interface/web/help/lib/module.conf.php
@@ -46,27 +46,27 @@
$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
interface/web/help/templates/help_faq_sections_list.htm
@@ -12,7 +12,7 @@
<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>