예제 #1
0
파일: auth.php 프로젝트: rrsc/beansbooks
 public function before()
 {
     parent::before();
     if (Session::instance()->get('auth_success_message')) {
         $this->_view->send_success_message(Session::instance()->get('auth_success_message'));
         Session::instance()->delete('auth_success_message');
     }
 }
예제 #2
0
파일: install.php 프로젝트: rrsc/beansbooks
 public function before()
 {
     if (file_exists(APPPATH . 'classes/beans/config.php') and filesize(APPPATH . 'classes/beans/config.php') > 0 and $this->request->action() != "finalize" and $this->request->action() != "manual") {
         $config_permissions = str_split(substr(decoct(fileperms(APPPATH . 'classes/beans/config.php')), 2));
         if (intval($config_permissions[count($config_permissions) - 3]) <= 6 and intval($config_permissions[count($config_permissions) - 2]) <= 6 and intval($config_permissions[count($config_permissions) - 1]) <= 0) {
             throw new HTTP_Exception_404("Page not found.");
         }
     }
     parent::before();
 }
예제 #3
0
파일: dash.php 프로젝트: rrsc/beansbooks
 function before()
 {
     parent::before();
     // Check for tabs and set if necessary.
     if (!Session::instance()->get('tab_section')) {
         Session::instance()->set('tab_section', $this->request->controller());
         $tab_links = array();
         $tab_links[] = array('url' => '/dash', 'text' => 'Overview', 'removable' => FALSE, 'text_short' => 'Over');
         Session::instance()->set('tab_links', $tab_links);
     }
 }
예제 #4
0
파일: update.php 프로젝트: rrsc/beansbooks
 public function before()
 {
     $setup_check = new Beans();
     $setup_check_result = $setup_check->execute();
     if (!Kohana::$is_cli && $this->request->action() != "manual" && ($setup_check_result->success || !isset($setup_check_result->config_error) || strpos(strtolower($setup_check_result->config_error), 'update') === FALSE)) {
         $this->request->redirect('/');
     }
     parent::before();
     $this->_view->head_title = "Update BeansBooks";
     $this->_view->page_title = "Updates Ready to Install";
 }
예제 #5
0
 function after()
 {
     if (Session::instance()->get('account_error_message')) {
         $this->_view->send_error_message(Session::instance()->get('account_error_message'));
         Session::instance()->delete('account_error_message');
     }
     if (Session::instance()->get('account_success_message')) {
         $this->_view->send_success_message(Session::instance()->get('account_success_message'));
         Session::instance()->delete('account_success_message');
     }
     parent::after();
 }
예제 #6
0
 function before()
 {
     parent::before();
     // Check for tabs and set if necessary.
     if (!Session::instance()->get('tab_section')) {
         Session::instance()->set('tab_section', $this->request->controller());
         $tab_links = array();
         $tab_links[] = array('url' => '/customers/sales', 'text' => 'Sales Orders', 'text_short' => 'SOs', 'removable' => FALSE);
         $tab_links[] = array('url' => '/customers/invoices', 'text' => 'Invoices', 'text_short' => 'Inv', 'removable' => FALSE);
         $tab_links[] = array('url' => '/customers/payments', 'text' => 'Payments', 'text_short' => 'Pay', 'removable' => FALSE);
         $tab_links[] = array('url' => '/customers/customers', 'text' => 'Customers', 'text_short' => 'Cust', 'removable' => FALSE);
         Session::instance()->set('tab_links', $tab_links);
     }
 }
예제 #7
0
파일: setup.php 프로젝트: rrsc/beansbooks
 function before()
 {
     parent::before();
     // Check for tabs and set if necessary.
     if (!Session::instance()->get('tab_section')) {
         Session::instance()->set('tab_section', $this->request->controller());
         $tab_links = array();
         $tab_links[] = array('url' => '/setup/settings', 'text' => 'Company Info', 'removable' => FALSE, 'text_short' => "Info");
         $tab_links[] = array('url' => '/setup/taxes', 'text' => 'Sales Tax', 'removable' => FALSE, 'text_short' => 'Tax');
         $tab_links[] = array('url' => '/setup/users', 'text' => 'Users', 'removable' => FALSE, 'text_short' => "Users");
         $tab_links[] = array('url' => '/setup/calibrate', 'text' => 'Calibrate Books', 'removable' => FALSE, 'text_short' => "Calibrate");
         Session::instance()->set('tab_links', $tab_links);
     }
 }
예제 #8
0
 public function before()
 {
     parent::before();
     if (!Session::instance()->get('tab_section')) {
         Session::instance()->set('tab_section', $this->request->controller());
         $tab_links = array();
         Session::instance()->set('tab_links', $tab_links);
     }
     if (Request::current()->is_initial()) {
         $this->_code = 404;
         $this->_message = "Page not found.";
     } else {
         $this->_code = base64_decode($this->request->param('code'));
         $this->_message = base64_decode($this->request->param('message'));
     }
     $this->response->status($this->_code);
 }
예제 #9
0
파일: vendors.php 프로젝트: rrsc/beansbooks
 function before()
 {
     parent::before();
     // Check for tabs and set if necessary.
     if (!Session::instance()->get('tab_section')) {
         Session::instance()->set('tab_section', $this->request->controller());
         $tab_links = array();
         $tab_links[] = array('url' => '/vendors/expenses', 'text' => 'Expenses', 'removable' => FALSE, 'text_short' => 'Exp');
         $tab_links[] = array('url' => '/vendors/purchases', 'text' => 'Purchase Orders', 'removable' => FALSE, 'text_short' => 'POs');
         $tab_links[] = array('url' => '/vendors/invoices', 'text' => 'Age Invoices', 'removable' => FALSE, 'text_short' => 'Inv');
         $tab_links[] = array('url' => '/vendors/payments', 'text' => 'Pay Invoices', 'removable' => FALSE, 'text_short' => 'Pay');
         $tab_links[] = array('url' => '/vendors/taxpayments', 'text' => 'Remit Sales Tax', 'removable' => FALSE, 'text_short' => 'Tax');
         $tab_links[] = array('url' => '/vendors/printchecks', 'text' => "Check Print Queue", 'removable' => FALSE, 'check_print_queue' => TRUE, 'text_short' => 'Print');
         $tab_links[] = array('url' => '/vendors/vendors', 'text' => 'Vendors', 'removable' => FALSE, 'text_short' => 'Ven');
         Session::instance()->set('tab_links', $tab_links);
     }
     // Repetitive - but three laws good.
     $this->_update_check_print_queue_tab();
 }
예제 #10
0
파일: help.php 프로젝트: rrsc/beansbooks
 function before()
 {
     parent::before();
     Session::instance()->set('tab_section', 'help');
     Session::instance()->delete('tab_links');
 }