Exemplo n.º 1
0
 function getMsg($infocode)
 {
     $this->arrinfo[0] = "";
     $this->arrinfo[91] = "Login Id or Email was not found ";
     $this->arrinfo[1] = "Login Id was not found or Password was not correct";
     $this->arrinfo[2] = "Password was not correct";
     $this->arrinfo[3] = "Your login has been disabled";
     $this->arrinfo[4] = "Session expired , you need to Login";
     $this->arrinfo[5] = "Logout was successfull.";
     $this->arrinfo[6] = "Password was sended to your email successfully.";
     $this->arrinfo[7] = "New record was inserted.";
     $this->arrinfo[8] = "Record updated successfully.";
     $this->arrinfo[9] = "Record deleted successfully.";
     $this->arrinfo[10] = "Unable to insert new record.";
     $this->arrinfo[11] = "Unable to update the record.";
     $this->arrinfo[12] = "Unable to delete record.";
     $this->arrinfo[13] = "Record was not found.";
     $this->arrinfo[14] = "Payment has been approved and order was updated.";
     $this->arrinfo[15] = "Registration completed, Login to countinue.";
     $this->arrinfo[16] = "Style was updated.";
     $this->arrinfo[17] = "Style was restored.";
     $this->arrinfo[18] = "You were not allowed to the page.";
     $this->arrinfo[19] = "Nothing was transfered";
     $this->arrinfo[20] = "Record transfered successfully";
     $this->arrinfo[20] = "Record transfered successfully";
     $this->arrinfo[21] = "Thank you for Signup.";
     $this->arrinfo[22] = "Document has been Updated Successfully";
     $this->arrinfo[23] = "You have already enter your IN timing";
     $this->arrinfo[24] = "No Such entries found";
     $this->arrinfo[25] = "Attached File has been Deleted Successfully";
     $this->arrinfo[26] = "Your group has been disabled";
     $this->arrinfo[27] = "Your are already out!";
     $this->arrinfo[28] = "User Information has been Updated Successfully";
     $this->arrinfo[29] = "Email sent successfully";
     $this->arrinfo[30] = "Record Already exists!";
     //------------- new info------------------------
     $this->arrinfo[31] = "User Status has been Changed";
     $this->arrinfo[32] = "Order Product Details Updated Successfully.";
     $this->arrinfo[33] = "Order Payment Details Updated Successfully.";
     $this->arrinfo[33] = "Order Note Updated Successfully.";
     $this->arrinfo[34] = "Order Qty Updated Successfully.";
     $this->arrinfo[35] = "Parts Successfully Add in your Order.";
     $this->arrinfo[36] = "Order Products Update Successfully.";
     $this->arrinfo[37] = "Order PCS can't be Decrease! Use Delete PC.";
     $this->arrinfo[38] = "PC was Deleted Successfully.";
     $this->arrinfo[39] = "Payment Entry was Deleted Successfully.";
     $this->arrinfo[40] = "Secure e-Payments Card Process Successfully.";
     $this->arrinfo[41] = "Order Reviewed Successfully.";
     $this->arrinfo[42] = "Order Note Deleted Successfully.";
     $this->arrinfo[43] = "Mail has been Successfully Save as Draft.";
     $this->arrinfo[44] = "Document(s) has been Uploaded Successfully.";
     //------------- end new info------------------------
     $this->arrinfo[44] = "An email was sent to " . App_Env::getUserEmail();
     $this->arrinfo[45] = "Error : System cound not send email!!";
     //Curr error
     $this->arrinfo[101] = "Service Schema has been Updated Successfully!!";
     $this->arrinfo[102] = "Unable to update Service Schema !!";
     //Eorditor
     $this->arrinfo[103] = "Assessment Approved!!";
     $this->arrinfo[104] = "Assessment Reseted!!";
     $output = '';
     if (isset($this->arrinfo[$infocode])) {
         $output = $this->arrinfo[$infocode];
     } else {
         $output = $infocode;
     }
     return $output;
 }
Exemplo n.º 2
0
 public function getBodyContent()
 {
     try {
         $this->setIsNullParam('COMPANY_INFO', $this->_info());
         $this->setIsNullParam('COMPANY_NAME_TH', $this->_info(false));
         $this->setIsNullParam('CUSTOMER_NAME', App_Env::getUserFullName());
         if (count($this->_to) == 0) {
             $this->addTo(App_Env::getUserEmail());
         }
         if (count($this->_bcc) == 0) {
             $this->addBcc(App_Env::getSystemEmail());
         }
         // $mail = new Zend_Mail('utf-8');
         //$mail->setHeaderEncoding();
         ob_start();
         // ดึง layout ออกมา
         if ($this->_templete_id != '') {
             $templtet = new Sys_Model_Template();
             $templtet->find($this->_templete_id);
             $this->_subject = $templtet->name;
             //หา ค่า posible value
             $possibleAttributes = $templtet->possibleAttributes;
             $possibleAttributes_tmp1 = str_replace(array("<ul>", '</ul>', '<li>', '</li>'), ' ', $possibleAttributes);
             $possibleAttributes_tmp1 = preg_replace(array('/\\s\\s+/'), " ", $possibleAttributes_tmp1);
             $possibleAttributes_tmp2 = explode(" ", $possibleAttributes_tmp1);
             $data_key = array();
             $data_value = array();
             foreach ($possibleAttributes_tmp2 as $attr) {
                 $attr = trim($attr);
                 if ($attr != '') {
                     $value = trim($this->_templete_params[$attr]);
                     if ($value == '') {
                         $value = 'N/A';
                     }
                     $data_value[] = $value;
                     $data_key[] = $attr;
                 }
             }
             //print_r($data_key);
             //print_r($data_value);
             echo str_replace($data_key, $data_value, $templtet->getContent());
         } else {
             // กำหนดค่าโดยตรง
             echo $content = $this->_content;
             echo $footer = $this->_footer;
         }
         $html = ob_get_clean();
         $html = str_replace("http://www.dev2.scimaxthailand.com", WEB_DOMAIN, $html);
         return $html;
         //  exit();
     } catch (Exception $e) {
         //	$this->view->stat = 'error';
         //	$this->view->msg = $e->getMessage ();
         echo $e->getMessage();
         // throw new Exception($e->getMessage());
     }
 }