MTrackWeb/Roo.php
[web.mtrack] / MTrackWeb / Roo.php
1 <?php
2
3
4 require_once 'Pman/Roo.php';
5
6
7 /**
8  * This extends the standard Roo API
9  *
10  * however it has to verify that we send data protected, as it's pretty open!!!
11  *
12  * 
13  *
14  */
15
16 class MTrackWeb_Roo extends Pman_Roo
17 {
18     var $validTables = array(
19         'mtrack_ticket' /// all of these MUST have applyFilters, and check authenication..
20     );
21     
22      function getAuth() {
23         parent::getAuth(); // load company!
24         $au = $this->getAuthUser();
25         if (!$au) {
26             $this->authUser =  false;
27         }
28         $this->authUser = $au;
29         return true;
30     }
31     
32     function get($tbl)
33     {
34         if (!in_array($tbl,$this->validTables)) {
35             $this->jerr("Invalid url");
36         }
37         return parent::get($tbl);
38     }
39     function post($table)
40     {
41         if (!in_array($tbl,$this->validTables)) {
42             $this->jerr("Invalid url");
43         }
44         return parent::post($tbl);
45     
46     }
47     
48 }