public function signupAction()
 {
     //global $testvar;
     global $mySession;
     $db = new Db();
     $testvar = 'abctestvar';
     $this->view->testing = $testvar;
     $myform = new Form_Logindesigned();
     $this->view->myform = $myform;
     $this->_helper->layout()->setLayout('simplecontent');
     if ($this->getRequest()->isPost()) {
         $request = $this->getRequest();
         $myformsignup = new Form_Signupdesigned();
         if ($myformsignup->isValid($request->getPost())) {
             $dataForm = $myformsignup->getValues();
             $pass = $dataForm['signuppass'];
             $cnfrm = $dataForm['signupcnfrmpass'];
             if ($pass == $cnfrm) {
                 $myObj = new Myaccountdb();
                 // call to model
                 $data = $myObj->signupdb($dataForm);
                 if ($data == 0) {
                     $mySession->errorMsg = "Email already Exisis. Enter Valid Email Address";
                     $this->view->myformsignup = $myformsignup;
                     $this->render('index');
                 } else {
                     //$mySession->errorMsg="login successfull";
                     $mySession->errorMsg = "A Registration Link sent to your Email";
                     $this->_redirect('logindesigned/index');
                     //$this->_redirect('myaccount/activecampaign');
                 }
             } else {
                 $mySession->errorMsg = "password not same";
                 $this->view->myformsignup = $myformsignup;
                 $this->render('index');
             }
         } else {
             $this->view->myformsignup = $myformsignup;
             $this->render('index');
         }
     } else {
         $this->_redirect('launchcampaign/index');
     }
 }
Beispiel #2
0
 public function signupedAction()
 {
     //global $testvar;
     global $mySession;
     $launch = $this->getRequest()->getParam('l');
     $this->view->l = $launch;
     $this->_helper->layout->setLayout('myaccount');
     $db = new Db();
     $testvar = 'abctestvar';
     $this->view->testing = $testvar;
     $myform = new Form_Login();
     $this->view->myform = $myform;
     if ($this->getRequest()->isPost()) {
         $request = $this->getRequest();
         $myformsignup = new Form_Signup();
         if ($myformsignup->isValid($request->getPost())) {
             $dataForm = $myformsignup->getValues();
             $pass = $dataForm['signuppass'];
             $cnfrm = $dataForm['signupcnfrmpass'];
             if ($pass == $cnfrm) {
                 $myObj = new Myaccountdb();
                 // call to model
                 $data = $myObj->signupdb($dataForm);
                 if ($data == 0) {
                     $mySession->errorMsg = "Email already Exisis. Enter Valid Email Address";
                     $this->view->myformsignup = $myformsignup;
                     $this->render('index');
                 } else {
                     $mySession->errorMsg = "An Activation link sent to your email address. Please follow the link in the email to verify your email address and activate your account.";
                     //if($launch!="")
                     //							{
                     //								$this->_redirect('login/index/l/launch');
                     //							}
                     $this->_redirect('login/index');
                     //$this->_redirect('myaccount/activecampaign');
                 }
             } else {
                 $mySession->errorMsg = "Password not identical";
                 $this->view->myformsignup = $myformsignup;
                 $this->render('index');
             }
         } else {
             $this->view->myformsignup = $myformsignup;
             $this->render('index');
         }
     } else {
         $this->_redirect('login/index');
     }
 }