예제 #1
0
파일: ticket.php 프로젝트: jehmehta/eagle
 /**
  * This is our re-routing function and is the inital function called
  *
  * 
  */
 function index()
 {
     //profiling
     $this->data['controller_profiling'][] = __FUNCTION__;
     //login check
     $this->__commonAdmin_LoggedInCheck();
     //javascript allowed files array
     js_allowedFileTypes();
     //javascript file size limit
     js_fileSizeLimit();
     //create pulldown lists
     $this->__pulldownLists();
     //uri - action segment
     $action = $this->uri->segment(4);
     //re-route to correct method
     switch ($action) {
         case 'view':
             $this->__viewTicket();
             break;
         case 'add-reply':
             $this->__addReply();
             break;
         case 'edit':
             $this->__editTicket();
             break;
         default:
             $this->__viewTicket();
     }
     //load view
     $this->__flmView('admin/main');
 }
예제 #2
0
파일: files.php 프로젝트: jehmehta/eagle
 /**
  * This is our re-routing function and is the inital function called
  *
  * 
  */
 function index()
 {
     /* --------------URI SEGMENTS---------------
      * [segment example]
      * /admin/files/2/view/*.*
      * (2)->controller
      * (3)->project_id
      * (4)->router
      ** -----------------------------------------*/
     //profiling
     $this->data['controller_profiling'][] = __FUNCTION__;
     //login check
     $this->__commonAdmin_LoggedInCheck();
     //get project id
     $this->project_id = $this->uri->segment(3);
     //set project_id for global use in template
     $this->data['vars']['project_id'] = $this->project_id;
     //PERMISSIONS CHECK - ACCESS
     //do this check before __commonAll_ProjectBasics()
     if ($this->data['vars']['my_group'] != 1) {
         if (!in_array($this->project_id, $this->data['my_projects_array'])) {
             redirect('/admin/error/permission-denied');
         }
     }
     //check if project exists & set some basic data
     $this->__commonAll_ProjectBasics($this->project_id);
     //PERMISSIONS CHECK - PROJECT
     //do this check after __commonAll_ProjectBasics()
     if ($this->data['project_permissions']['view_item_my_project_files'] != 1) {
         redirect('/admin/error/permission-denied');
     }
     //create pulldown lists
     $this->__pulldownLists();
     //javascript allowed files array
     js_allowedFileTypes();
     //javascript file size limit
     js_fileSizeLimit();
     //get the action from url
     $action = $this->uri->segment(4);
     //route the request
     switch ($action) {
         case 'view':
             $this->__filesView();
             break;
         case 'add':
             $this->__filesAdd();
             break;
         case 'edit':
             $this->__filesEdit();
             break;
         default:
             $this->__filesView();
             break;
     }
     //css - active tab
     $this->data['vars']['css_active_tab_files'] = 'side-menu-main-active';
     //load view
     $this->__flmView('admin/main');
 }
예제 #3
0
파일: files.php 프로젝트: jehmehta/eagle
 /**
  * This is our re-routing function and is the inital function called
  *
  * 
  */
 function index()
 {
     //profiling
     $this->data['controller_profiling'][] = __FUNCTION__;
     //login check
     $this->__commonClient_LoggedInCheck();
     //get project id
     $this->project_id = $this->uri->segment(3);
     /** CLIENT-RESOURCE-OWNERSHIP VALIDATION **/
     if (!in_array($this->project_id, $this->data['my_clients_project_array'])) {
         redirect('/client/error/permission-denied');
     }
     //set project_id for global use in template
     $this->data['vars']['project_id'] = $this->project_id;
     //check if project exists & set some basic data
     $this->__commonAll_ProjectBasics($this->project_id);
     //create pulldown lists
     $this->__pulldownLists();
     //javascript allowed files array
     js_allowedFileTypes();
     //javascript file size limit
     js_fileSizeLimit();
     //get the action from url
     $action = $this->uri->segment(4);
     //route the request
     switch ($action) {
         case 'view':
             $this->__filesView();
             break;
         case 'add':
             $this->__filesAdd();
             break;
         case 'edit':
             $this->__filesEdit();
             break;
         default:
             $this->__filesView();
             break;
     }
     //css - active tab
     $this->data['vars']['css_active_tab_files'] = 'side-menu-main-active';
     //load view
     $this->__flmView('client/main');
 }
예제 #4
0
파일: tickets.php 프로젝트: jehmehta/eagle
 /**
  * This is our re-routing function and is the inital function called
  *
  * 
  */
 function index()
 {
     //profiling
     $this->data['controller_profiling'][] = __FUNCTION__;
     //login check
     $this->__commonClient_LoggedInCheck();
     //create pulldown lists
     $this->__pulldownLists();
     //javascript allowed files array
     js_allowedFileTypes();
     //javascript file size limit
     js_fileSizeLimit();
     //uri - action segment
     $action = $this->uri->segment(3);
     //default page titles
     $this->data['vars']['main_title'] = $this->data['lang']['lang_tickets'];
     $this->data['vars']['main_title_icon'] = '<i class="icon-file-text"></i>';
     $this->data['vars']['sub_title'] = '';
     $this->data['vars']['sub_title_icon'] = '';
     //re-route to correct method
     switch ($action) {
         case 'list':
             $this->__listTickets();
             break;
         case 'search-tickets':
             $this->__cachedFormSearch();
             break;
         case 'new':
             $this->__newTicket();
             break;
         case 'create':
             $this->__createTicket();
             break;
         case 'add-new':
             $this->__addTicket();
             break;
         default:
             $this->__listTickets();
     }
     //load view
     $this->__flmView('admin/main');
 }
예제 #5
0
파일: ticket.php 프로젝트: jehmehta/eagle
 /**
  * This is our re-routing function and is the inital function called
  *
  * 
  */
 function index()
 {
     //profiling
     $this->data['controller_profiling'][] = __FUNCTION__;
     //login check
     $this->__commonClient_LoggedInCheck();
     //javascript allowed files array
     js_allowedFileTypes();
     //javascript file size limit
     js_fileSizeLimit();
     //uri - action segment
     $action = $this->uri->segment(4);
     //ticket id
     $ticket_id = $this->uri->segment(3);
     /** CLIENT CHECK PERMISSION **/
     if (!$this->permissions->ticketsView($ticket_id)) {
         redirect('/client/error/permission-denied-or-not-found');
     }
     //default page titles
     $this->data['vars']['main_title'] = $this->data['lang']['lang_tickets'];
     $this->data['vars']['main_title_icon'] = '<i class="icon-file-text"></i>';
     $this->data['vars']['sub_title'] = '';
     $this->data['vars']['sub_title_icon'] = '';
     //re-route to correct method
     switch ($action) {
         case 'view':
             $this->__viewTicket();
             break;
         case 'add-reply':
             $this->__addReply();
             break;
         case 'edit':
             $this->__editTicket();
             break;
         default:
             $this->__viewTicket();
     }
     //load view
     $this->__flmView('admin/main');
 }