Пример #1
0
         } else {
             exit('0');
         }
     }
     break;
 case 'sendTestSMS':
     $shop = $_REQUEST['shop'];
     $domain = $_REQUEST['domain'];
     $message = $_REQUEST['message'];
     $mobilenumber = $_REQUEST['mobilenumber'];
     $customVariables = array('[shop_name]' => $shop, '[shop_domain]' => $domain, '[customer_count]' => '36', '[customer_firstname]' => 'John', '[customer_lastname]' => 'Doe', '[verification_code]' => '5623321', '[customer_address]' => '1444 S. Alameda Street', '[customer_postcode]' => '90021', '[customer_city]' => 'Los Angeles', '[customer_country]' => 'United States', '[order_id]' => '10045', '[order_total]' => '$982.00', '[order_products_count]' => '3', '[order_status]' => 'Pending', '[order_old_status]' => 'Pending', '[order_new_status]' => 'Fullfilled', '[order_date]' => '26th Jan, 2016', '[return_product_name]' => 'Nokia v.2', '[return_reason]' => 'The seal of package was broken, looks like it was used before.', '[customer_name]' => 'John Doe', '[customer_email]' => '*****@*****.**', '[customer_message]' => 'Hi, This message is regarding testing.');
     foreach ($customVariables as $find => $replace) {
         $message = str_replace($find, $replace, $message);
     }
     //$message = urlencode($message);
     sendTestMessage($message, $mobilenumber);
     break;
 case 'savesmscontrydetail':
     $sms_username = $_REQUEST['sms_username'];
     $sms_password = $_REQUEST['sms_password'];
     $sender_id = $_REQUEST['sender_id'];
     $store = $_REQUEST['store'];
     $lastRow = pg_query($db, "SELECT id FROM smscountrydetail ORDER by id DESC limit 1");
     $lastID = pg_fetch_assoc($lastRow);
     $lastID = pg_num_rows($lastRow) > 0 ? $lastID['id'] : 0;
     $lastID = $lastID + 1;
     echo "INSERT INTO smscountrydetail (id, sms_username, sms_password, sender_id) VALUES ('1','{$sms_username}', '{$sms_password}', '{$sender_id}')";
     $storeexist = pg_query($db, "SELECT store FROM smscountrydetail  limit 1");
     $storeexist = pg_fetch_assoc($storeexist);
     if (pg_num_rows($lastRow) > 0) {
         $updated1 = pg_query($db, "UPDATE smscountrydetail SET sms_username = '******' ,sms_password='******' , sender_id='{$sender_id}',store='{$store}'  WHERE store = '{$store}'");
Пример #2
0
 function emailAction()
 {
     $this->_helper->layout->disableLayout();
     $this->_helper->viewRenderer->setNoRender(TRUE);
     sendTestMessage('test email', 'this is a test message please ignore - ' . APPLICATION_ENV);
 }