diff --git a/interface/lib/classes/listform.inc.php b/interface/lib/classes/listform.inc.php index ce7b220f0bdfe073ec229a492f6e51068075e1d2..7362fb14cf6d988d69db84472d291e61c2f0602b 100644 --- a/interface/lib/classes/listform.inc.php +++ b/interface/lib/classes/listform.inc.php @@ -48,10 +48,12 @@ class listform { private $module; private $dateformat = 'd.m.Y'; - public function loadListDef($file,$module = '') + public function loadListDef($file, $module = '') { global $app,$conf; - if(!is_file($file)) die("List-Definition: $file not found."); + if(!is_file($file)){ + die("List-Definition: $file not found."); + } require_once($file); $this->listDef = $liste; $this->module = $module; diff --git a/interface/web/help/index.php b/interface/web/help/index.php index ce49d769775e90b890ea36284fbf4c8c936bfff4..93204bc52586a7f8e6c63998048328bdb2402d77 100644 --- a/interface/web/help/index.php +++ b/interface/web/help/index.php @@ -10,8 +10,7 @@ <p> </p> <p> </p> <p> </p> - <p> - </p> + <p> </p> </div> </BODY> </HTML> \ No newline at end of file diff --git a/interface/web/help/lib/lang/en_support_message.lng b/interface/web/help/lib/lang/en_support_message.lng index be03ebdb56c39ae39b499bfbba5833dcefa49ea4..1f9aff1d1ca180c74a65cf7051ac6d91e6e38001 100644 --- a/interface/web/help/lib/lang/en_support_message.lng +++ b/interface/web/help/lib/lang/en_support_message.lng @@ -1,9 +1,9 @@ <?php -$wb["recipient_id_txt"] = 'recipient_id'; -$wb["sender_id_txt"] = 'sender_id'; -$wb["subject_txt"] = 'subject'; -$wb["message_txt"] = 'message'; -$wb["tstamp_txt"] = 'tstamp'; -$wb["btn_save_txt"] = 'Save'; -$wb["btn_cancel_txt"] = 'Cancel'; +$wb['recipient_id_txt'] = 'recipient_id'; +$wb['sender_id_txt'] = 'sender_id'; +$wb['subject_txt'] = 'subject'; +$wb['message_txt'] = 'message'; +$wb['tstamp_txt'] = 'tstamp'; +$wb['btn_save_txt'] = 'Save'; +$wb['btn_cancel_txt'] = 'Cancel'; ?> \ No newline at end of file diff --git a/interface/web/help/lib/lang/en_support_message_list.lng b/interface/web/help/lib/lang/en_support_message_list.lng index 73a1fdab6a5bf0f387a94e2372fdaf2971c8609f..ce62580969b205da35b816808a3565fc2ad64e27 100644 --- a/interface/web/help/lib/lang/en_support_message_list.lng +++ b/interface/web/help/lib/lang/en_support_message_list.lng @@ -1,11 +1,11 @@ <?php -$wb["list_head_txt"] = 'support_message'; -$wb["sender_id_txt"] = 'sender_id'; -$wb["subject_txt"] = 'subject'; -$wb["page_txt"] = 'Page'; -$wb["page_of_txt"] = 'of'; -$wb["page_next_txt"] = 'Next'; -$wb["page_back_txt"] = 'Back'; -$wb["delete_txt"] = 'Delete'; -$wb["filter_txt"] = 'Filter'; +$wb['list_head_txt'] = 'support_message'; +$wb['sender_id_txt'] = 'sender_id'; +$wb['subject_txt'] = 'subject'; +$wb['page_txt'] = 'Page'; +$wb['page_of_txt'] = 'of'; +$wb['page_next_txt'] = 'Next'; +$wb['page_back_txt'] = 'Back'; +$wb['delete_txt'] = 'Delete'; +$wb['filter_txt'] = 'Filter'; ?> \ No newline at end of file diff --git a/interface/web/help/lib/module.conf.php b/interface/web/help/lib/module.conf.php index c6cdfd74c85161fd8179322e0e7ddedc6de12371..36696ffbe04034957b60c273869476d854d49c5d 100644 --- a/interface/web/help/lib/module.conf.php +++ b/interface/web/help/lib/module.conf.php @@ -1,42 +1,39 @@ <?php //* Name of the module. The module name must match the name of the module directory. The module name may not contain spaces. -$module["name"] = "help"; +$module['name'] = 'help'; //* Title of the module. The title is dispalayed in the top navigation. -$module["title"] = "Help"; +$module['title'] = 'Help'; //* The template file of the module. This is always module.tpl.htm if you do not have any special requirements like a 3 column layout. -$module["template"] = "module.tpl.htm"; +$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"; +$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"] = ''; +$module['tab_width'] = ''; -/* ------------------------------------------- -- Menu Definition ------------------------------------------- -*/ + +//*** Menu Definition ***************************************** //* make sure that the items array is empty $items = array(); -//* Add a menu item with the label "Send message" +//* Add a menu item with the label 'Send message' $items[] = array( 'title' => 'Send message', 'target' => 'content', 'link' => 'help/support_message_edit.php'); -//* Add a menu item with the label "View messages" +//* Add a menu item with the label 'View messages' $items[] = array( 'title' => 'View messages', 'target' => 'content', 'link' => 'help/support_message_list.php'); //* Add the menu items defined above to a menu section labeled 'Support' -$module["nav"][] = array( 'title' => 'Support', +$module['nav'][] = array( 'title' => 'Support', 'open' => 1, 'items' => $items); diff --git a/interface/web/help/list/support_message.list.php b/interface/web/help/list/support_message.list.php index 368076db8ace6c129c8592c01e214498955510f3..1f2f8e3c379c915337a46d8347f758f76f0291e0 100644 --- a/interface/web/help/list/support_message.list.php +++ b/interface/web/help/list/support_message.list.php @@ -1,62 +1,62 @@ <?php //* Name of the list -$liste["name"] = "support_message"; +$liste['name'] = 'support_message'; //* Database table -$liste["table"] = "support_message"; +$liste['table'] = 'support_message'; //* Index index field of the database table -$liste["table_idx"] = "support_message_id"; +$liste['table_idx'] = 'support_message_id'; //* Search Field Prefix -$liste["search_prefix"] = "search_"; +$liste['search_prefix'] = 'search_'; //* Records per page -$liste["records_per_page"] = 15; +$liste['records_per_page'] = 15; //* Script File of the list -$liste["file"] = "support_message_list.php"; +$liste['file'] = 'support_message_list.php'; //* Script file of the edit form -$liste["edit_file"] = "support_message_edit.php"; +$liste['edit_file'] = 'support_message_edit.php'; //* Script File of the delete script -$liste["delete_file"] = "support_message_del.php"; +$liste['delete_file'] = 'support_message_del.php'; //* Paging Template -$liste["paging_tpl"] = "templates/paging.tpl.htm"; +$liste['paging_tpl'] = 'templates/paging.tpl.htm'; //* Enable auth -$liste["auth"] = "yes"; +$liste['auth'] = 'yes'; /***************************************************** * Search fields *****************************************************/ -$liste["item"][] = array( 'field' => "sender_id", - 'datatype' => "VARCHAR", - 'formtype' => "SELECT", - 'op' => "=", - 'prefix' => "", - 'suffix' => "", - 'width' => "", +$liste['item'][] = array( 'field' => 'sender_id', + 'datatype' => 'VARCHAR', + 'formtype' => 'SELECT', + 'op' => '=', + 'prefix' => '', + 'suffix' => '', + 'width' => '', 'datasource'=> array ( 'type' => 'SQL', 'querystring' => 'SELECT userid,username FROM sys_user WHERE {AUTHSQL} ORDER BY username', 'keyfield' => 'userid', 'valuefield' => 'username' ), - 'value' => ""); - -$liste["item"][] = array( 'field' => "subject", - 'datatype' => "VARCHAR", - 'formtype' => "TEXT", - 'op' => "like", - 'prefix' => "%", - 'suffix' => "%", - 'width' => "", - 'value' => ""); + 'value' => ''); + +$liste['item'][] = array( 'field' => 'subject', + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'op' => 'like', + 'prefix' => '%', + 'suffix' => '%', + 'width' => '', + 'value' => ''); ?> \ No newline at end of file diff --git a/interface/web/help/support_message_del.php b/interface/web/help/support_message_del.php index 1ef035eef2f9bbbfade7080d25051d9379e4baa5..721197c2b0eb6a08e39fffea3db76ac4594c8626 100644 --- a/interface/web/help/support_message_del.php +++ b/interface/web/help/support_message_del.php @@ -31,21 +31,21 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. //* From and List definition files -$list_def_file = "list/support_message.list.php"; -$tform_def_file = "form/support_message.tform.php"; +$list_def_file = 'list/support_message.list.php'; +$tform_def_file = 'form/support_message.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"); +if(!stristr($_SESSION['s']['user']['modules'], 'help')) { + header('Location: ../index.php'); exit; } //* Load the form -$app->uses("tform_actions"); +$app->uses('tform_actions'); $app->tform_actions->onDelete(); ?> \ No newline at end of file diff --git a/interface/web/help/support_message_edit.php b/interface/web/help/support_message_edit.php index f97bb88dc0078e77d62789a5b9ade318fecff00a..a36b5dbffaaa5cf7290d25f31c305ba14d993552 100644 --- a/interface/web/help/support_message_edit.php +++ b/interface/web/help/support_message_edit.php @@ -1,14 +1,14 @@ <?php //* Set the path to the form definition file. -$tform_def_file = "form/support_message.tform.php"; +$tform_def_file = 'form/support_message.tform.php'; //* include the basic application and configuration files require_once('../../lib/config.inc.php'); require_once('../../lib/app.inc.php'); //* Checking module permissions -if(!stristr($_SESSION["s"]["user"]["modules"],'help')) { +if(!stristr($_SESSION['s']['user']['modules'],'help')) { header("Location: ../index.php"); exit; } @@ -21,28 +21,30 @@ $app->load('tform_actions'); class page_action extends tform_actions { //* Custom onSubmit Event handler - function onSubmit() { + function onSubmit() + { global $app, $conf; //* If the current user is not the admin user - if($_SESSION["s"]["user"]["typ"] != 'admin') { + if($_SESSION['s']['user']['typ'] != 'admin') { //* Set the admin as recipient - $this->dataRecord["recipient_id"] = 1; + $this->dataRecord['recipient_id'] = 1; } - // Set the sender_id field to the ID of the current user - $this->dataRecord["sender_id"] = $_SESSION["s"]["user"]["userid"]; + //* Set the sender_id field to the ID of the current user + $this->dataRecord['sender_id'] = $_SESSION['s']['user']['userid']; //* call the onSubmit function of the parent class parent::onSubmit(); } //* Custom onShow Event handler - function onShow() { + function onShow() + { global $app, $conf; //* We do not want that messages get edited, so we switch to a - // read only template if a existing message is loaded + //* read only template if a existing message is loaded if($this->id > 0) { $app->tform->formDef['tabs']['message']['template'] = 'templates/support_message_view.htm'; } @@ -55,8 +57,6 @@ class page_action extends tform_actions { //* Create the new page object $page = new page_action(); - - //* Start the page rendering and action handling $page->onLoad(); diff --git a/interface/web/help/support_message_list.php b/interface/web/help/support_message_list.php index 5fc45e5ce45f71a5c58dbc543f70f342cc169716..ce990e4df73439420f9df89052c31de6d823adc3 100644 --- a/interface/web/help/support_message_list.php +++ b/interface/web/help/support_message_list.php @@ -6,8 +6,8 @@ require_once('../../lib/app.inc.php'); $list_def_file = "list/support_message.list.php"; //* Check the module permissions -if(!stristr($_SESSION["s"]["user"]["modules"],'help')) { - header("Location: ../index.php"); +if(!stristr($_SESSION['s']['user']["modules"], 'help')) { + header('Location: ../index.php'); exit; }