public function connectAction()
 {
     $auth = TBS\Auth::getInstance();
     if (!$auth->hasIdentity()) {
         throw new Zend_Controller_Action_Exception('Not logged in!', 404);
     }
     $this->view->providers = $auth->getIdentity();
 }
 public function orderviewAction()
 {
     $auth = TBS\Auth::getInstance();
     $model = new Application_Model_ServiceMasterMapper();
     $namespace = new Zend_Session_Namespace('userInfo');
     //        if(isset($namespace->user_id)){
     $laundryCart = new Zend_Session_Namespace('laundryCart');
     $users = $namespace->data;
     $uid = $users['user_id'];
     $username = $users['fnmae'];
     $category = $model->getAllServiceMasters();
     $this->view->category = $category;
     $this->view->selectedServices = $laundryCart->service ?: array();
     $this->view->headlineText = 'Select services you want';
     $this->view->user_fname = $namespace->user_fname;
     $this->view->user_lname = $namespace->user_lname;
     $this->view->user_img = $namespace->user_img;
     //        }else{
     //            $this->_redirect("");
     //        }
 }
 public function init()
 {
     $this->_auth = $auth = TBS\Auth::getInstance();
 }
Example #4
0
 public function init()
 {
     //        $this->_auth = new My_Auth("user");
     $this->_auth = $auth = TBS\Auth::getInstance();
 }
Example #5
0
 public function orderviewAction()
 {
     $params = $this->getRequest()->getParams();
     $auth = TBS\Auth::getInstance();
     $model = new Application_Model_ServiceMasterMapper();
     $packageModel = new Application_Model_PackagesMapper();
     $namespace = new Zend_Session_Namespace('userInfo');
     //        if(isset($namespace->user_id)){
     $laundryCart = new Zend_Session_Namespace('laundryCart');
     if (isset($params['ordertype'])) {
         if ($params['ordertype'] == 'package') {
             $laundryCart->service = array();
             $laundryCart->package = array($params['id']);
         }
         $orderType = $params['ordertype'];
         $laundryCart->orderType = $orderType;
         $this->view->orderType = 'package';
     } elseif (isset($laundryCart->orderType)) {
         $orderType = $laundryCart->orderType;
         $this->view->orderType = $orderType;
     }
     $users = $namespace->data;
     $uid = $users['user_id'];
     $username = $users['fnmae'];
     $category = $model->getAllServiceMasters();
     $packages = $packageModel->getAllPackages();
     $this->view->category = $category;
     $this->view->packages = $packages;
     $this->view->selectedServices = $laundryCart->service ?: array();
     $this->view->selectedPackages = $laundryCart->package ?: array();
     $this->view->headlineText = 'Select services you want';
     $this->view->user_fname = $namespace->user_fname;
     $this->view->user_lname = $namespace->user_lname;
     $this->view->user_img = $namespace->user_img;
     $this->view->orderType = $orderType ?: 'service';
     $this->view->noFooter = 'true';
     $this->view->city = $laundryCart->city ?: '';
     //        }else{
     //            $this->_redirect("");
     //        }
 }