Пример #1
0
 public function clientSetup()
 {
     $this->disableCaching();
     $this->setViewTemplate('new_client_setup.tpl');
     if (isset($_POST['Submit']) && $_POST['Submit'] == 'Submit') {
         if (isset($_POST['company'])) {
             $company_id = CompanyController::addCompany($_POST['company'], 1);
             if (isset($_POST['client']) && $company_id) {
                 $_POST['client']['company_branch_id'] = $company_id;
                 $client_id = $this->addClient($_POST['client']);
                 if (isset($_POST['package']) && $client_id) {
                     //here have to do work for packages, either selection of
                     //package of creation of package.
                     $package_id = PackageController::makePackage();
                     if (isset($_POST['severity']) && $package_id) {
                         SeverityGridController::addSeverity($_POST['severity']);
                     } else {
                         // error response
                     }
                 } else {
                     // error response
                 }
             } else {
                 // error response
             }
         } else {
             //error_response
         }
         //Add Client into database
         $client_data = $_POST['client'];
         if (!isset($client_data['company_branch_id']) || $client_data['company_branch_id'] == '') {
             $client_data['company_branch_id'] = $company_id;
         }
     }
     return $this->generateView();
 }
Пример #2
0
 public function init()
 {
     $this->_model = new WsPackage(array('rowClass' => 'Row_WsPackageStatusJoinWsPackageSms'));
     $this->_logicPackage = new Logic_Package(Logic_Package::SMS_MODE);
     parent::init();
 }
Пример #3
0
 public function init()
 {
     parent::init();
 }