diff --git a/install/sql/incremental/upd_0004.sql b/install/sql/incremental/upd_0004.sql new file mode 100644 index 0000000000000000000000000000000000000000..3bba2461a6c6aacff17bddeb3a02fe4aa1f0c75c --- /dev/null +++ b/install/sql/incremental/upd_0004.sql @@ -0,0 +1,33 @@ +-- -------------------------------------------------------- +-- tables for the FAQ module + +CREATE TABLE `help_faq_sections` ( + `hfs_id` int(11) NOT NULL AUTO_INCREMENT, + `hfs_name` varchar(255) DEFAULT NULL, + `hfs_order` int(11) DEFAULT '0', + `sys_userid` int(11) DEFAULT NULL, + `sys_groupid` int(11) DEFAULT NULL, + `sys_perm_user` varchar(5) DEFAULT NULL, + `sys_perm_group` varchar(5) DEFAULT NULL, + `sys_perm_other` varchar(5) DEFAULT NULL, + PRIMARY KEY (`hfs_id`) +) ENGINE=MyISAM AUTO_INCREMENT=1; + +INSERT INTO `help_faq_sections` VALUES (1,'General',0,NULL,NULL,NULL,NULL,NULL); + +CREATE TABLE `help_faq` ( + `hf_id` int(11) NOT NULL AUTO_INCREMENT, + `hf_section` int(11) DEFAULT NULL, + `hf_order` int(11) DEFAULT '0', + `hf_question` text, + `hf_answer` text, + `sys_userid` int(11) DEFAULT NULL, + `sys_groupid` int(11) DEFAULT NULL, + `sys_perm_user` varchar(5) DEFAULT NULL, + `sys_perm_group` varchar(5) DEFAULT NULL, + `sys_perm_other` varchar(5) DEFAULT NULL, + PRIMARY KEY (`hf_id`) +) ENGINE=MyISAM AUTO_INCREMENT=1; + +INSERT INTO `help_faq` VALUES (1,1,0,'I\'d like to know ...','Yes, of course.',1,1,'riud','riud','r'); + diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql index 2825b1b77788b721eb0ff33021b2e2fe3502df95..2361d9db7d5799aacada02474ce2ed90d90b695d 100644 --- a/install/sql/ispconfig3.sql +++ b/install/sql/ispconfig3.sql @@ -1617,6 +1617,38 @@ INSERT INTO `country` (`iso`, `name`, `printable_name`, `iso3`, `numcode`) VALUE ('ZW', 'ZIMBABWE', 'Zimbabwe', 'ZWE', 716); -- -------------------------------------------------------- +-- tables for the FAQ module + +CREATE TABLE `help_faq_sections` ( + `hfs_id` int(11) NOT NULL AUTO_INCREMENT, + `hfs_name` varchar(255) DEFAULT NULL, + `hfs_order` int(11) DEFAULT '0', + `sys_userid` int(11) DEFAULT NULL, + `sys_groupid` int(11) DEFAULT NULL, + `sys_perm_user` varchar(5) DEFAULT NULL, + `sys_perm_group` varchar(5) DEFAULT NULL, + `sys_perm_other` varchar(5) DEFAULT NULL, + PRIMARY KEY (`hfs_id`) +) ENGINE=MyISAM AUTO_INCREMENT=1; + +INSERT INTO `help_faq_sections` VALUES (1,'General',0,NULL,NULL,NULL,NULL,NULL); + +CREATE TABLE `help_faq` ( + `hf_id` int(11) NOT NULL AUTO_INCREMENT, + `hf_section` int(11) DEFAULT NULL, + `hf_order` int(11) DEFAULT '0', + `hf_question` text, + `hf_answer` text, + `sys_userid` int(11) DEFAULT NULL, + `sys_groupid` int(11) DEFAULT NULL, + `sys_perm_user` varchar(5) DEFAULT NULL, + `sys_perm_group` varchar(5) DEFAULT NULL, + `sys_perm_other` varchar(5) DEFAULT NULL, + PRIMARY KEY (`hf_id`) +) ENGINE=MyISAM AUTO_INCREMENT=1; + +INSERT INTO `help_faq` VALUES (1,1,0,'I\'d like to know ...','Yes, of course.',1,1,'riud','riud','r'); + -- -------------------------------------------------------- SET FOREIGN_KEY_CHECKS = 1; diff --git a/interface/web/help/faq_delete.php b/interface/web/help/faq_delete.php new file mode 100644 index 0000000000000000000000000000000000000000..1dfc69f84d19d436e2a1489f01722c90486ef6eb --- /dev/null +++ b/interface/web/help/faq_delete.php @@ -0,0 +1,21 @@ +<?php + +// From and List definition files +$list_def_file = 'list/faq_list.php'; +$tform_def_file = 'form/faq.tform.php'; + +// Include the base libraries +require_once('../../lib/config.inc.php'); +require_once('../../lib/app.inc.php'); + +// Check module permissions +if(!stristr($_SESSION['s']['user']['modules'],'help')) { + header('Location: ../index.php'); + die; +} + +// Load the form +$app->uses('tform_actions'); +$app->tform_actions->onDelete(); + +?> diff --git a/interface/web/help/faq_edit.php b/interface/web/help/faq_edit.php new file mode 100644 index 0000000000000000000000000000000000000000..02763e853a2d90c2d2e2ea0403d78f2f109f1968 --- /dev/null +++ b/interface/web/help/faq_edit.php @@ -0,0 +1,33 @@ +<?php + +// Set the path to the form definition file. +$tform_def_file = 'form/faq.tform.php'; + +// include the core configuration and application classes +require_once('../../lib/config.inc.php'); +require_once('../../lib/app.inc.php'); + +// Check the module permissions and redirect if not allowed. +if(!stristr($_SESSION['s']['user']['modules'],'help')) { + header('Location: ../index.php'); + die; +} + +// Load the templating and form classes +$app->uses('tpl,tform,tform_actions'); +$app->load('tform_actions'); + +// 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 + +} + +// Create the new page object +$page = new page_action(); + +// Start the page rendering and action handling +$page->onLoad(); + +?> diff --git a/interface/web/help/faq_list.php b/interface/web/help/faq_list.php new file mode 100644 index 0000000000000000000000000000000000000000..ff3ad37f07fc4d40236dca8f473de37bd0d4617e --- /dev/null +++ b/interface/web/help/faq_list.php @@ -0,0 +1,37 @@ +<?php + +require_once('../../lib/config.inc.php'); +require_once('../../lib/app.inc.php'); + +// Path to the list definition file +$list_def_file = 'list/faq_list.php'; + +// Check the module permissions +if(!stristr($_SESSION['s']['user']['modules'],'help')) { + header('Location: ../index.php'); + die(); +} + +// Loading the class +$app->uses('listform_actions'); + +// Optional limit +$hf_section = 0; +if(isset($_GET['hfs_id'])) + $hf_section = preg_replace("/[^0-9]/","",$_GET['hfs_id']); + +// if section id is not specified in the url, choose the first existing section +if(!$hf_section) +{ + $res = $app->db->queryOneRecord("SELECT MIN(hfs_id) AS min_id FROM help_faq_sections"); + $hf_section = $res['min_id']; +} +$app->listform_actions->SQLExtWhere = "hf_section = $hf_section"; + + +$res = $app->db->queryOneRecord("SELECT hfs_name FROM help_faq_sections WHERE hfs_id=$hf_section"); +// Start the form rendering and action ahndling +echo "<h2>FAQ: ".$res['hfs_name']."</h2>"; +$app->listform_actions->onLoad(); + +?> diff --git a/interface/web/help/faq_sections_delete.php b/interface/web/help/faq_sections_delete.php new file mode 100644 index 0000000000000000000000000000000000000000..7e087d63ea6cea5411ca9e597677577d4bdca626 --- /dev/null +++ b/interface/web/help/faq_sections_delete.php @@ -0,0 +1,21 @@ +<?php + +// From and List definition files +$list_def_file = 'list/faq_sections_list.php'; +$tform_def_file = 'form/faq_sections.tform.php'; + +// Include the base libraries +require_once('../../lib/config.inc.php'); +require_once('../../lib/app.inc.php'); + +// Check module permissions +if(!stristr($_SESSION['s']['user']['modules'],'help')) { + header('Location: ../index.php'); + die; +} + +// Load the form +$app->uses('tform_actions'); +$app->tform_actions->onDelete(); + +?> diff --git a/interface/web/help/faq_sections_edit.php b/interface/web/help/faq_sections_edit.php new file mode 100644 index 0000000000000000000000000000000000000000..7f52d680eb6ea4c7b7f72f0eee9376386cd1c6fd --- /dev/null +++ b/interface/web/help/faq_sections_edit.php @@ -0,0 +1,33 @@ +<?php + +// Set the path to the form definition file. +$tform_def_file = 'form/faq_sections.tform.php'; + +// include the core configuration and application classes +require_once('../../lib/config.inc.php'); +require_once('../../lib/app.inc.php'); + +// Check the module permissions and redirect if not allowed. +if(!stristr($_SESSION['s']['user']['modules'],'help')) { + header('Location: ../index.php'); + die; +} + +// Load the templating and form classes +$app->uses('tpl,tform,tform_actions'); +$app->load('tform_actions'); + +// 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 + +} + +// Create the new page object +$page = new page_action(); + +// Start the page rendering and action handling +$page->onLoad(); + +?> diff --git a/interface/web/help/faq_sections_list.php b/interface/web/help/faq_sections_list.php new file mode 100644 index 0000000000000000000000000000000000000000..a24c879baa7812b7202c5a84aa78d797147191a9 --- /dev/null +++ b/interface/web/help/faq_sections_list.php @@ -0,0 +1,21 @@ +<?php + +require_once('../../lib/config.inc.php'); +require_once('../../lib/app.inc.php'); + +// Path to the list definition file +$list_def_file = 'list/faq_sections_list.php'; + +// Check the module permissions +if(!stristr($_SESSION['s']['user']['modules'],'help')) { + header('Location: ../index.php'); + die(); +} + +// Loading the class +$app->uses('listform_actions'); + +// Start the form rendering and action ahndling +$app->listform_actions->onLoad(); + +?> diff --git a/interface/web/help/form/faq.tform.php b/interface/web/help/form/faq.tform.php new file mode 100644 index 0000000000000000000000000000000000000000..fd984dd7ed2f55948e3aa42aa8f5d97531391695 --- /dev/null +++ b/interface/web/help/form/faq.tform.php @@ -0,0 +1,104 @@ +<?php + +// Title of the form. +$form['title'] = 'Frequently Asked Questions'; + +// Optional description of the form. +$form['description'] = ''; + +// Name of the form which cannot contain spaces or foreign characters. +$form['name'] = 'faq_form'; + +// The file that is used to call the form in the browser. +$form['action'] = 'faq_edit.php'; + +// The name of the database table used to store the data +$form['db_table'] = 'help_faq'; + +// The name of the database table index field. +// This field must be a numeric auto increment column. +$form['db_table_idx'] = 'hf_id'; + +// Should changes to this table be stored in the database history (sys_datalog) table. +// This should be set to 'yes' for all tables that store configuration information. +$form['db_history'] = 'no'; + +// The name of the tab that is shown when the form is opened +$form['tab_default'] = 'message'; + +// The name of the default list file of this form +$form['list_default'] = 'faq_list.php'; + +// Use the internal authentication system for this table. This should +// be set to 'yes' in most cases, otherwise 'no'. +$form['auth'] = 'yes'; + +//** Authentication presets. The defaults below does not need to be changed in most cases. + +// 0 = id of the user, > 0 id must match with id of current user +$form['auth_preset']['userid'] = 0; + + // 0 = default groupid of the user, > 0 id must match with groupid of current +$form['auth_preset']['groupid'] = 0; + +// Permissions with the following codes: r = read, i = insert, u = update, d = delete +$form['auth_preset']['perm_user'] = 'riud'; +$form['auth_preset']['perm_group'] = 'riud'; +$form['auth_preset']['perm_other'] = 'r'; + +// 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( + + //*** 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_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' + ), + + //*** END Datatable columns ********************************** + ) +); +?> diff --git a/interface/web/help/form/faq_sections.tform.php b/interface/web/help/form/faq_sections.tform.php new file mode 100644 index 0000000000000000000000000000000000000000..2e61c38e0cef08ef7b5b87de2cc9f69568aa5778 --- /dev/null +++ b/interface/web/help/form/faq_sections.tform.php @@ -0,0 +1,74 @@ +<?php + +// Title of the form. +$form['title'] = 'FAQ Sections'; + +// Optional description of the form. +$form['description'] = ''; + +// Name of the form which cannot contain spaces or foreign characters. +$form['name'] = 'faq_sections_form'; + +// The file that is used to call the form in the browser. +$form['action'] = 'faq_sections_edit.php'; + +// The name of the database table used to store the data +$form['db_table'] = 'help_faq_sections'; + +// The name of the database table index field. +// This field must be a numeric auto increment column. +$form['db_table_idx'] = 'hfs_id'; + +// Should changes to this table be stored in the database history (sys_datalog) table. +// This should be set to 'yes' for all tables that store configuration information. +$form['db_history'] = 'no'; + +// The name of the tab that is shown when the form is opened +$form['tab_default'] = 'message'; + +// The name of the default list file of this form +$form['list_default'] = 'faq_sections_list.php'; + +// Use the internal authentication system for this table. This should +// be set to 'yes' in most cases, otherwise 'no'. +$form['auth'] = 'yes'; + +//** Authentication presets. The defaults below does not need to be changed in most cases. + +// 0 = id of the user, > 0 id must match with id of current user +$form['auth_preset']['userid'] = 0; + + // 0 = default groupid of the user, > 0 id must match with groupid of current +$form['auth_preset']['groupid'] = 0; + +// Permissions with the following codes: r = read, i = insert, u = update, d = delete +$form['auth_preset']['perm_user'] = 'riud'; +$form['auth_preset']['perm_group'] = 'riud'; +$form['auth_preset']['perm_other'] = ''; + +// 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( + + //*** 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 ********************************** + ) +); +?> diff --git a/interface/web/help/lib/lang/cz.lng b/interface/web/help/lib/lang/cz.lng index b0e6945d96c9a36cff875b8eedac9c694732c974..ace68bac72945144c285a5f8a6aa6b3b4693dcd3 100644 --- a/interface/web/help/lib/lang/cz.lng +++ b/interface/web/help/lib/lang/cz.lng @@ -6,4 +6,8 @@ $wb['View messages'] = 'Zobrazit zprávu'; $wb['Support'] = 'Podpora'; $wb['About ISPConfig'] = 'O ISPConfigu'; $wb['Version'] = 'Verze'; +$wb['Frequently Asked Questions'] = 'ÄŒasto kladené dotazy'; +$wb['FAQ Sections'] = 'Sekce FAQ'; +$wb['Manage Sections'] = 'Spravovat sekce'; +$wb['Add a Question & Answer Pair'] = 'PÅ™idat otázku a odpovÄ›Ä'; ?> diff --git a/interface/web/help/lib/lang/cz_faq_form.lng b/interface/web/help/lib/lang/cz_faq_form.lng new file mode 100644 index 0000000000000000000000000000000000000000..46543dc5e82724be6b3803af124d974a6b7fc27a --- /dev/null +++ b/interface/web/help/lib/lang/cz_faq_form.lng @@ -0,0 +1,6 @@ +<?php +$wb['faq_faq_txt'] = "ÄŒasto kladené dotazy"; +$wb['faq_question_txt'] = "Otázka"; +$wb['faq_answer_txt'] = "OdpovÄ›Ä"; +$wb['faq_section_txt'] = "Sekce"; +?> diff --git a/interface/web/help/lib/lang/cz_faq_sections_form.lng b/interface/web/help/lib/lang/cz_faq_sections_form.lng new file mode 100644 index 0000000000000000000000000000000000000000..b8f18fe44961141485a8b308b6c0a345aef62320 --- /dev/null +++ b/interface/web/help/lib/lang/cz_faq_sections_form.lng @@ -0,0 +1,3 @@ +<?php +$wb['faq_section_name_txt'] = "Název sekce"; +?> diff --git a/interface/web/help/lib/lang/cz_help_faq_sections_list.lng b/interface/web/help/lib/lang/cz_help_faq_sections_list.lng new file mode 100644 index 0000000000000000000000000000000000000000..ff2838b8f2c9aa72cbf247446c235655595288f6 --- /dev/null +++ b/interface/web/help/lib/lang/cz_help_faq_sections_list.lng @@ -0,0 +1,9 @@ +<?php +$wb['faq_section_name_txt'] = "Název sekce"; +$wb['faq_delete_txt'] = "Smazat"; +$wb['faq_edit_txt'] = "Upravit"; +$wb['faq_sections_txt'] = "Sekce"; +$wb['faq_faq_sections_txt'] = "Sekce FAQ"; +$wb['faq_new_section_txt'] = "PÅ™idat novou sekci"; +?> + diff --git a/interface/web/help/lib/lang/en.lng b/interface/web/help/lib/lang/en.lng index 369cbb9a8434cf3a28d993a5b7357fc6315a6647..4e8184f0ccee8d583c9fdb727028c9c40da7941c 100644 --- a/interface/web/help/lib/lang/en.lng +++ b/interface/web/help/lib/lang/en.lng @@ -6,5 +6,10 @@ $wb['View messages'] = 'View messages'; $wb['Support'] = 'Support'; $wb['About ISPConfig'] = 'About ISPConfig'; $wb['Version'] = 'Version'; +$wb['Frequently Asked Questions'] = 'Frequently Asked Questions'; +$wb['FAQ Sections'] = 'FAQ Sections'; +$wb['Manage Sections'] = 'Manage Sections'; +$wb['Add a Question & Answer Pair'] = 'Add a Question & Answer Pair'; + ?> diff --git a/interface/web/help/lib/lang/en_faq_form.lng b/interface/web/help/lib/lang/en_faq_form.lng new file mode 100644 index 0000000000000000000000000000000000000000..6dbdbb0aa025d0cbe96057e1a56c676ccb042e2f --- /dev/null +++ b/interface/web/help/lib/lang/en_faq_form.lng @@ -0,0 +1,6 @@ +<?php +$wb['faq_faq_txt'] = "Frequently Asked Questions"; +$wb['faq_question_txt'] = "Question"; +$wb['faq_answer_txt'] = "Answer"; +$wb['faq_section_txt'] = "Section"; +?> diff --git a/interface/web/help/lib/lang/en_faq_sections_form.lng b/interface/web/help/lib/lang/en_faq_sections_form.lng new file mode 100644 index 0000000000000000000000000000000000000000..ade38191773262cb448d0baa6bdd648217ba3ecc --- /dev/null +++ b/interface/web/help/lib/lang/en_faq_sections_form.lng @@ -0,0 +1,3 @@ +<?php +$wb['faq_section_name_txt'] = "Section Name"; +?> diff --git a/interface/web/help/lib/lang/en_help_faq_sections_list.lng b/interface/web/help/lib/lang/en_help_faq_sections_list.lng new file mode 100644 index 0000000000000000000000000000000000000000..37056924c7c3137fb70b6edb964601b7c5a1a595 --- /dev/null +++ b/interface/web/help/lib/lang/en_help_faq_sections_list.lng @@ -0,0 +1,9 @@ +<?php +$wb['faq_section_name_txt'] = "Section Name"; +$wb['faq_delete_txt'] = "Delete"; +$wb['faq_edit_txt'] = "Edit"; +$wb['faq_sections_txt'] = "Sections"; +$wb['faq_faq_sections_txt'] = "FAQ Sections"; +$wb['faq_new_section_txt'] = "Add a new section"; +?> + diff --git a/interface/web/help/lib/module.conf.php b/interface/web/help/lib/module.conf.php index 8278aaa3411ec30c41455fb8e2ba5c969fd72234..c783228911027617715dffabba09b25dde4ac719 100644 --- a/interface/web/help/lib/module.conf.php +++ b/interface/web/help/lib/module.conf.php @@ -10,7 +10,10 @@ $module['title'] = 'top_menu_help'; $module['template'] = 'module.tpl.htm'; //* The page that is displayed when the module is loaded. the path must is relative to the web directory -$module['startpage'] = 'help/index.php'; +if(isset($_GET['go2_faq_sections_list'])) + $module['startpage'] = 'help/faq_sections_list.php'; +else + $module['startpage'] = 'help/index.php'; //* The width of the tab. Normally you should leave this empty and let the browser define the width automatically. $module['tab_width'] = ''; @@ -39,6 +42,33 @@ $module['nav'][] = array( 'title' => 'Support', 'open' => 1, 'items' => $items); +//* the FAQ menu section +$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'); +} +$sql = "SELECT * FROM help_faq_sections"; +$res = $app->db->queryAllRecords($sql); +//* all the content sections +foreach($res as $v) +{ + $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); +//* -- end of the FAQ menu section + + if($_SESSION['s']['user']['typ'] == 'admin') { //* make sure that the items array is empty @@ -60,4 +90,4 @@ $module['nav'][] = array( 'title' => 'About ISPConfig', -?> \ No newline at end of file +?> diff --git a/interface/web/help/list/faq_list.php b/interface/web/help/list/faq_list.php new file mode 100644 index 0000000000000000000000000000000000000000..b5dc346a4fc1a346cfa70750b79985ae408200e3 --- /dev/null +++ b/interface/web/help/list/faq_list.php @@ -0,0 +1,33 @@ +<?php + +// Name of the list +$liste['name'] = 'help_faq'; + +// Database table +$liste['table'] = 'help_faq'; + +// Index index field of the database table +$liste['table_idx'] = 'hf_id'; + +// Search Field Prefix +#$liste['search_prefix'] = 'search_'; + +// Records per page +$liste['records_per_page']= 100; + +// Script File of the list +$liste['file'] = 'faq_list.php'; + +// Script file of the edit form +$liste['edit_file'] = 'faq_edit.php'; + +// Script File of the delete script +$liste['delete_file'] = 'faq_delete.php'; + +// Paging Template +$liste['paging_tpl'] = 'templates/paging.tpl.htm'; + +// Enable auth +$liste['auth'] = 'yes'; + +?> diff --git a/interface/web/help/list/faq_sections_list.php b/interface/web/help/list/faq_sections_list.php new file mode 100644 index 0000000000000000000000000000000000000000..59e30e75619e963c99095642b7bfe5e884167649 --- /dev/null +++ b/interface/web/help/list/faq_sections_list.php @@ -0,0 +1,33 @@ +<?php + +// Name of the list +$liste['name'] = 'help_faq_sections'; + +// Database table +$liste['table'] = 'help_faq_sections'; + +// Index index field of the database table +$liste['table_idx'] = 'hfs_id'; + +// Search Field Prefix +#$liste['search_prefix'] = 'search_'; + +// Records per page +$liste['records_per_page'] = 100; + +// Script File of the list +$liste['file'] = 'faq_sections_list.php'; + +// Script file of the edit form +$liste['edit_file'] = 'faq_sections_edit.php'; + +// Script File of the delete script +$liste['delete_file'] = 'faq_sections_delete.php'; + +// Paging Template +$liste['paging_tpl'] = 'templates/paging.tpl.htm'; + +// Enable auth +$liste['auth'] = 'yes'; + +?> diff --git a/interface/web/help/templates/faq_edit.htm b/interface/web/help/templates/faq_edit.htm new file mode 100644 index 0000000000000000000000000000000000000000..29f35b2603720cf5b29f9f81e66d05e8bd635ce6 --- /dev/null +++ b/interface/web/help/templates/faq_edit.htm @@ -0,0 +1,30 @@ +<div class="panel panel_support_message"> + + <div class="pnl_formsarea"> + <fieldset class="inlineLabels"><legend>FAQ</legend> + <div class="ctrlHolder"> + <label for="hf_section">{tmpl_var name='faq_section_txt'}</label> + <select name="hf_section" id="hf_section" class="selectInput"> + {tmpl_var name='hf_section'} + </select> + </div> + <div class="ctrlHolder"> + <label for="hf_question">{tmpl_var name='faq_question_txt'}</label> + <input name="hf_question" id="hf_question" value="{tmpl_var name='hf_question'}" size="30" maxlength="255" type="text" class="textInput" /> + </div> + <div class="ctrlHolder"> + <label for="hf_answer">{tmpl_var name='faq_answer_txt'}</label> + <textarea name="hf_answer" id="hf_answer" rows='10' cols='30'>{tmpl_var name='hf_answer'}</textarea> + </div> + </fieldset> + + <input type="hidden" name="id" value="{tmpl_var name='id'}"> + + <div class="buttonHolder buttons"> + <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onClick="submitForm('pageForm','help/faq_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> + <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onClick="loadContent('help/faq_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> + </div> + </div> + +</div> + diff --git a/interface/web/help/templates/faq_sections_edit.htm b/interface/web/help/templates/faq_sections_edit.htm new file mode 100644 index 0000000000000000000000000000000000000000..79d1050fc41260d7616e9a44f6dd73f2fc4aa008 --- /dev/null +++ b/interface/web/help/templates/faq_sections_edit.htm @@ -0,0 +1,20 @@ +<div class="panel panel_support_message"> + + <div class="pnl_formsarea"> + <fieldset class="inlineLabels"><legend>Section</legend> + <div class="ctrlHolder"> + <label for="hfs_name">{tmpl_var name='faq_section_name_txt'}</label> + <input name="hfs_name" id="hfs_name" value="{tmpl_var name='hfs_name'}" size="30" maxlength="255" type="text" class="textInput" /> + </div> + </fieldset> + + <input type="hidden" name="id" value="{tmpl_var name='id'}"> + + <div class="buttonHolder buttons"> + <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onClick="submitForm('pageForm','help/faq_sections_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> + <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onClick="loadContent('help/faq_sections_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> + </div> + </div> + +</div> + diff --git a/interface/web/help/templates/help_faq_list.htm b/interface/web/help/templates/help_faq_list.htm new file mode 100644 index 0000000000000000000000000000000000000000..cba74d2ae58adcfe882bcd885e1e33448de8635d --- /dev/null +++ b/interface/web/help/templates/help_faq_list.htm @@ -0,0 +1,22 @@ +<tmpl_loop name="records"> + <h3>{tmpl_var name='hf_question'} + </h3> + <p> + {tmpl_var name='hf_answer'} + </p> + <tmpl_if name='is_admin'> +<div class="buttons icons16"> + <a class="icons16 icoDelete" +href="javascript: del_record('help/faq_delete.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');" +> +<span>Delete</span></a> + </div> +<a href="#" onClick="loadContent('help/faq_edit.php?id={tmpl_var name='id'}');">Edit</a> + <br/> + <br/> + <br/> + </tmpl_if> + +</tmpl_loop> + +<!--<tmpl_var name="paging">--> diff --git a/interface/web/help/templates/help_faq_sections_list.htm b/interface/web/help/templates/help_faq_sections_list.htm new file mode 100644 index 0000000000000000000000000000000000000000..fe4f0f296e2981e5a5d6e7a72f9e1fc87581e60e --- /dev/null +++ b/interface/web/help/templates/help_faq_sections_list.htm @@ -0,0 +1,38 @@ +<h2>{tmpl_var name="faq_faq_sections_txt"}</h2> + <div class="pnl_toolsarea"> + <fieldset><legend>{tmpl_var name="toolsarea_head_txt"}</legend> + <div class="buttons"> +<button class="iconstxt icoAdd" type="button" onclick="loadContent('help/faq_sections_edit.php');"> + <span>{tmpl_var name="faq_new_section_txt"}</span> + </button> + </div> + </fieldset> + </div> + +<div class="pnl_listarea"> +<fieldset><legend><tmpl_var name="faq_sections_txt"></legend> +<table class="list"> + <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> + <th class="tbl_col_domain" scope="col">{tmpl_var name="faq_edit_txt"}</th> + </tr> + </thead> + +<tmpl_loop name="records"> +<tr> + <td><b>{tmpl_var name='hfs_name'}</b></td> + <td> +<div class="buttons icons16"> +<a class="icons16 icoDelete" href="javascript: del_record('help/faq_sections_delete.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"> +<span>{tmpl_var name="faq_delete_txt"}</span></a> </div> +</td><td> + +<a href="#" onClick="loadContent('help/faq_sections_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="faq_edit_txt"}</a> + </td> +</tr> +</tmpl_loop> +</table> +</fieldset> +</div>