Пример #1
0
 /**
  * load initail data for support ticket form needed during 
  * creating and editing support ticket
  * data 
  */
 public function getData()
 {
     global $database;
     $depts = Department::find_all();
     $role = Roles::find_all();
     $country = Country::find_all();
     $vendors = Vendor::find_all();
     $myproducts = Cproduct::find_all();
     $lastSignoff = array_shift($database->fetch_assoc($database->db_query("SELECT MAX(id) as lastID, prod_id FROM sign_off_form ")));
     $lastWorkSheet = array_shift($database->fetch_assoc($database->db_query("SELECT MAX(id) as lastID, prod_id FROM work_sheet_form ")));
     /**
      * issues may arise that when database
      * is cleared emp_dept may not be 5
      */
     $clients = Client::find_all();
     // print_r($clients);
     $techEmployee = Employee::find_by_sql("SELECT * FROM employee WHERE emp_dept = 5");
     $zone = Zone::find_by_sql("SELECT * FROM zone");
     $startups = array("clients" => $clients, "departs" => $depts, "country" => $country, "zone" => $zone, "vendors" => $vendors, "role" => $role, "myproducts" => $myproducts, "techstaff" => $techEmployee, "lastsf" => $lastSignoff, "lastws" => $lastWorkSheet);
     return $startups;
 }
Пример #2
0
 /**
  * load initail data for support ticket form needed during 
  * creating and editing support ticket
  * data 
  */
 public function getData()
 {
     global $database;
     $depts = Department::find_all();
     $role = Roles::find_all();
     $country = Country::find_all();
     $vendors = Vendor::find_all();
     $myproducts = Cproduct::find_all();
     /**
      * issues may arise that when database
      * is cleared emp_dept may not be 5
      */
     $techEmployee = Employee::find_by_sql("SELECT * FROM employee WHERE emp_dept = 5");
     $zone = Zone::find_by_sql("SELECT * FROM zone");
     $startups = array("departs" => $depts, "country" => $country, "zone" => $zone, "vendors" => $vendors, "role" => $role, "myproducts" => $myproducts, "techstaff" => $techEmployee);
     return $startups;
 }
 public function getData()
 {
     global $database;
     $depts = Department::find_all();
     $role = Roles::find_all();
     $country = Country::find_all();
     $vendors = Vendor::find_all();
     $zone = Zone::find_by_sql("SELECT * FROM zone");
     $clietproducts = Cproduct::find_all();
     $startups = array("departs" => $depts, "country" => $country, "zone" => $zone, "vendors" => $vendors, "role" => $role, 'products' => $clietproducts);
     return $startups;
 }