Removing innecessary double quotes - speed
| | |
| | | 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; |
| | |
| | | <p> </p> |
| | | <p> </p> |
| | | <p> </p> |
| | | <p> |
| | | </p> |
| | | <p> </p> |
| | | </div> |
| | | </BODY> |
| | | </HTML> |
| | |
| | | <?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';
|
| | | ?> |
| | |
| | | <?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';
|
| | | ?> |
| | |
| | | <?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); |
| | | |
| | |
| | | <?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' => ""); |
| | | 'value' => ''); |
| | | |
| | | $liste["item"][] = array( 'field' => "subject", |
| | | 'datatype' => "VARCHAR", |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | | 'suffix' => "%", |
| | | 'width' => "", |
| | | 'value' => ""); |
| | | $liste['item'][] = array( 'field' => 'subject', |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'op' => 'like', |
| | | 'prefix' => '%', |
| | | 'suffix' => '%', |
| | | 'width' => '', |
| | | 'value' => ''); |
| | | |
| | | |
| | | ?> |
| | |
| | | |
| | | |
| | | //* 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(); |
| | | |
| | | ?> |
| | |
| | | <?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; |
| | | } |
| | |
| | | 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'; |
| | | } |
| | |
| | | |
| | | //* Create the new page object |
| | | $page = new page_action(); |
| | | |
| | | |
| | | |
| | | //* Start the page rendering and action handling |
| | | $page->onLoad(); |
| | |
| | | $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; |
| | | } |
| | | |