case 'cash_overview': display_cash_overview(); break; case 'customer_overview': display_customer_overview(); break; case 'job_overview': display_job_overview(); break; case 'user_overview': display_user_overview(); break; //DETAILS //DETAILS case 'customer_info': display_customer_info(); break; case 'job_info': display_job_info(); break; // GENERATE // GENERATE case 'generate_bill': display_bill(); $smarty->display('bill.tpl'); return true; case 'generate_cash_print': display_cash_print(); $smarty->display('cash_print.tpl'); return true; default:
require_once "include.php"; $submit = $VAR['submit']; $email = $VAR['email']; $customer_id = $VAR['customer_id']; /* Lets Grab Technicians Names */ $q = "SELECT EMPLOYEE_LOGIN, EMPLOYEE_ID FROM " . PRFX . "TABLE_EMPLOYEE WHERE EMPLOYEE_STATUS=1"; if (!($rs = $db->execute($q))) { force_page('core', 'error&error_msg=MySQL Error: ' . $db->ErrorMsg() . '&menu=1&type=database'); exit; } $tech = $rs->GetMenu2('created_by', $login, $login_id); $smarty->assign('tech', $tech); if (isset($VAR['submit'])) { if (!insert_new_workorder($db, $VAR)) { $smarty->display('workorder' . SEP . 'new.tpl'); } } else { // Grab customers Information if (!isset($customer_id)) { // redirect to customer search page //header ("location", "?page=customer:view"); } else { $smarty->assign('customer_details', display_customer_info($db, $customer_id)); } $smarty->display('workorder' . SEP . 'new.tpl'); } if (isset($VAR['email'])) { if (!email_new_workorder($db, $VAR)) { $smarty->display('workorder' . SEP . 'new.tpl'); } }
<?php require_once 'include.php'; if (!xml2php("customer")) { $smarty->assign('error_msg', "Error in language file"); } /* load customer details */ $customer_details = display_customer_info($db, $VAR['customer_id']); if (isset($VAR['submit'])) { if (!update_customer($db, $VAR)) { force_page('customer', 'edit&error_msg=Falied to Update Customer Information&customer_id=' . $VAR['customer_id']); exit; } else { force_page('customer', 'customer_details&msg=The Customers information was updated&customer_id=' . $VAR['customer_id'] . '&page_title=' . $VAR['displayName']); exit; } } else { $smarty->assign('customer', $customer_details); $smarty->display('customer' . SEP . 'edit.tpl'); }