Version Notes
2014
Download this release
Release Info
Developer | Frantisek Barancik |
Extension | TOPefekt_Magesms |
Version | 1.2.1 |
Comparing to | |
See all releases |
Code changes from version 1.2.0 to 1.2.1
- app/code/community/Topefekt/Magesms/Model/Hooks.php +1 -1
- app/code/community/Topefekt/Magesms/Model/Sms.php +1 -1
- app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/CustomersmsController.php +1 -1
- app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/HistoryController.php +1 -1
- app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/MarketingController.php +1 -1
- app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/WizardController.php +1 -1
- app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.2.0-1.2.1.php +20 -0
- app/code/community/Topefekt/Magesms/etc/config.xml +1 -1
- app/design/adminhtml/default/default/template/topefekt/magesms/history.phtml +1 -1
- app/design/adminhtml/default/default/template/topefekt/magesms/marketing/form.phtml +1 -1
- app/design/adminhtml/default/default/template/topefekt/magesms/template/form.phtml +1 -1
- app/design/adminhtml/default/default/template/topefekt/magesms/wizard-alternative.phtml +2 -2
- app/locale/cs_CZ/Topefekt_Magesms.csv +3 -0
- app/locale/sk_SK/Topefekt_Magesms.csv +3 -0
- package.xml +4 -4
app/code/community/Topefekt/Magesms/Model/Hooks.php
CHANGED
@@ -13,4 +13,4 @@
|
|
13 |
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
|
14 |
* @license http://opensource.org/licenses/BSD-3-Clause
|
15 |
*/
|
16 |
-
class Topefekt_Magesms_Model_Hooks extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/hooks'); } public function send($i41496536c6b29c24b90c374d9fc25143f114dc9a, $i5e65dd16263683749d16a84171f719e768ed14b5) { $i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18 = Mage::getSingleton('magesms/smsprofile'); if ($i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->user) { $i589c2cccd18de711ec5e779b98b9f98d0347a925 = Mage::app()->getStore()->getGroupId(); if (!$i589c2cccd18de711ec5e779b98b9f98d0347a925 && $i5e65dd16263683749d16a84171f719e768ed14b5->hasStoreId()) { $i589c2cccd18de711ec5e779b98b9f98d0347a925 = Mage::getModel('core/store')->load($i5e65dd16263683749d16a84171f719e768ed14b5->getStoreId())->getGroupId(); } if ($i5e65dd16263683749d16a84171f719e768ed14b5->getStore()) $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = $i5e65dd16263683749d16a84171f719e768ed14b5->getStore()->getId(); elseif (Mage::app()->getStore()) $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = Mage::app()->getStore()->getStoreId(); else $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = null; $ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8 = Mage::getSingleton('magesms/hooks_admins')->getCollection(); if ($i589c2cccd18de711ec5e779b98b9f98d0347a925 || !Mage::getSingleton('admin/session')->isLoggedIn()) { $ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8->addFieldToFilter('store_group_id', $i589c2cccd18de711ec5e779b98b9f98d0347a925); } else { $ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8->getSelect()->group('admin_id'); } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderStatus') $ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8->addFieldToFilter('name', 'orderStatus'.ucfirst($i5e65dd16263683749d16a84171f719e768ed14b5->getStatus())); else $ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8->addFieldToFilter('name', $i41496536c6b29c24b90c374d9fc25143f114dc9a); if ($ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8->count()) { $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = Mage::getSingleton('magesms/hooks_unicode')->getCollection() ->addFieldToFilter('type', 'admin')->getFirstItem(); foreach($ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8 as $i3d68c0cf53594c3449a7debf01d1c337a93fc4ae) { $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87 = Mage::getModel('magesms/admins')->load($i3d68c0cf53594c3449a7debf01d1c337a93fc4ae->getAdminId()); if (!$i2977ace3ff82db806c1e7c92dd6811f3d76f0e87) continue; $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f = Mage::getModel('magesms/sms'); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->addRecipient($i2977ace3ff82db806c1e7c92dd6811f3d76f0e87->getNumber(), array('recipient' => $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87->getName(), 'adminId' => $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87->getId())) ->setMessage($this->prepareText($i3d68c0cf53594c3449a7debf01d1c337a93fc4ae->getSmstext(), $i41496536c6b29c24b90c374d9fc25143f114dc9a, $i5e65dd16263683749d16a84171f719e768ed14b5)) ->setSubject($i41496536c6b29c24b90c374d9fc25143f114dc9a) ->setType(Topefekt_Magesms_Model_Sms::TYPE_ADMIN) ->setPriority(true) ->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getUnicode()) ->setStoreId($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setHookName($i41496536c6b29c24b90c374d9fc25143f114dc9a); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->send(); } } $i71e09ed37bc7273d250df9932c1693668e879cdd = Mage::getSingleton('magesms/hooks_customers')->getCollection() ->addFieldToFilter('active', 1); if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderStatus') $i71e09ed37bc7273d250df9932c1693668e879cdd->addFieldToFilter('name', 'orderStatus'.ucfirst($i5e65dd16263683749d16a84171f719e768ed14b5->getStatus())); else $i71e09ed37bc7273d250df9932c1693668e879cdd->addFieldToFilter('name', $i41496536c6b29c24b90c374d9fc25143f114dc9a); if ($i71e09ed37bc7273d250df9932c1693668e879cdd->count()) { $if2014d170e15e7f6f64523fd3238720980ceb64a = Mage::getSingleton('magesms/hooks_unicode')->getCollection() ->addFieldToFilter('type', 'customer'); if ($i5e65dd16263683749d16a84171f719e768ed14b5 instanceof Mage_Sales_Model_Order) { $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142 = Mage::getConfig()->getNode('default/config/optout')->sku; $ib8129b89cda7dae2cfe1b114353de8ba2385974e = Mage::getModel('catalog/product')->setStoreId($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66)->loadByAttribute('sku', $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142); if ($ib8129b89cda7dae2cfe1b114353de8ba2385974e && $ib8129b89cda7dae2cfe1b114353de8ba2385974e->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_ENABLED) { $i32ce098f2dde8081cf3c4de31f52b408a6ad48be = $i5e65dd16263683749d16a84171f719e768ed14b5->getItemsCollection(); $ibfceba0b027e7caa5ff39764963a80a73f4cdfeb = false; foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { if ($i69a1201e93806d55c970dfb18feec53d221ba37b->getSku() == $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142) { $ibfceba0b027e7caa5ff39764963a80a73f4cdfeb = true; break; } } if (!$ibfceba0b027e7caa5ff39764963a80a73f4cdfeb) return $this; } if ($i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->getPrefbilling()) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()->getCountryId(); if (!$i1f1945594819c4321de45ac15ed6d4dc07f41e2f) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress()->getCountryId(); } } else { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress()->getCountryId(); if (!$i1f1945594819c4321de45ac15ed6d4dc07f41e2f) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()->getCountryId(); } } $ifb2b31a17a2f13d19aebc5823ae02f42988a78f2 = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerId(); if (!$ifb2b31a17a2f13d19aebc5823ae02f42988a78f2) $ifb2b31a17a2f13d19aebc5823ae02f42988a78f2 = 0; $i489c048e0604d314330360b5ee23b42f486ebb98 = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerName(); } else { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = ''; $ifb2b31a17a2f13d19aebc5823ae02f42988a78f2 = $i5e65dd16263683749d16a84171f719e768ed14b5->getId(); } if (!$i1f1945594819c4321de45ac15ed6d4dc07f41e2f) { $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = Mage::app()->getRequest()->getParams(); foreach(array('mobilenumber', 'phone', 'telephone', 'mobile') as $i670253c23c6fcba76bc4256a88fdd8fbc1041039) { if (!empty($ia8a35a47a8e61218e15d1a33dac64bdc2449c01a[$i670253c23c6fcba76bc4256a88fdd8fbc1041039])) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a[$i670253c23c6fcba76bc4256a88fdd8fbc1041039]; $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = Mage::getStoreConfig('general/country/default', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66);; break; } } } if ($i1f1945594819c4321de45ac15ed6d4dc07f41e2f && is_numeric($ifb2b31a17a2f13d19aebc5823ae02f42988a78f2)) { if ($idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b) { $i854b57231c05dbaa7f22331dbaed4152a402d2f1 = new Zend_Locale_Data(); $i065c883e3f45e58104d21f8196ee3fe9bd2f513d = $i854b57231c05dbaa7f22331dbaed4152a402d2f1->getList('en-EN', 'phonetoterritory'); $i7492a7ab99a6ff1e0ae253366480ecb40a550224 = $i065c883e3f45e58104d21f8196ee3fe9bd2f513d[$idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b]; } else { $i7492a7ab99a6ff1e0ae253366480ecb40a550224 = ''; } $i6d6da9eb4bc3bca1db3f4eb2b907f496d625d20f = ''; foreach($i71e09ed37bc7273d250df9932c1693668e879cdd as $ifede0aa7d9c3f77f8ca4eb9c1002d82f3a770ae7) { if ($ifede0aa7d9c3f77f8ca4eb9c1002d82f3a770ae7->getMutation() == $i7492a7ab99a6ff1e0ae253366480ecb40a550224) { $i6d6da9eb4bc3bca1db3f4eb2b907f496d625d20f = $ifede0aa7d9c3f77f8ca4eb9c1002d82f3a770ae7->getSmstext(); break; } elseif ($ifede0aa7d9c3f77f8ca4eb9c1002d82f3a770ae7->getMutation() == 'default') $i6d6da9eb4bc3bca1db3f4eb2b907f496d625d20f = $ifede0aa7d9c3f77f8ca4eb9c1002d82f3a770ae7->getSmstext(); } if ($i6d6da9eb4bc3bca1db3f4eb2b907f496d625d20f) { $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f = Mage::getModel('magesms/sms'); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->addRecipient($i1f1945594819c4321de45ac15ed6d4dc07f41e2f, array('recipient' => $i489c048e0604d314330360b5ee23b42f486ebb98, 'customerId' => $ifb2b31a17a2f13d19aebc5823ae02f42988a78f2, 'country' => $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b)) ->setMessage($this->prepareText($i6d6da9eb4bc3bca1db3f4eb2b907f496d625d20f, $i41496536c6b29c24b90c374d9fc25143f114dc9a, $i5e65dd16263683749d16a84171f719e768ed14b5)) ->setSubject($i41496536c6b29c24b90c374d9fc25143f114dc9a) ->setType(Topefekt_Magesms_Model_Sms::TYPE_CUSTOMER) ->setPriority(true) ->setStoreId($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); foreach($if2014d170e15e7f6f64523fd3238720980ceb64a as $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd) { if ($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getArea() == $i7492a7ab99a6ff1e0ae253366480ecb40a550224) { $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getUnicode()); break; } elseif ($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getArea() == 'default') $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getUnicode()); } $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setHookName($i41496536c6b29c24b90c374d9fc25143f114dc9a); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->send(); } } } } return $this; } public function prepareText($idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $i41496536c6b29c24b90c374d9fc25143f114dc9a, $i5e65dd16263683749d16a84171f719e768ed14b5) { if (preg_match_all('/{(.*?)}/', $idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $ia00c63b7b8f0d76f361b9bd281e5073cc0d0aa3e)) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b = array(); foreach($ia00c63b7b8f0d76f361b9bd281e5073cc0d0aa3e[1] as $iebd691e534c6cf2e84cf8a88790a5271154fca05) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b[$iebd691e534c6cf2e84cf8a88790a5271154fca05] = '{'.$iebd691e534c6cf2e84cf8a88790a5271154fca05.'}'; } if ($i5e65dd16263683749d16a84171f719e768ed14b5->getStore()) $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = $i5e65dd16263683749d16a84171f719e768ed14b5->getStore()->getId(); elseif (Mage::app()->getStore()) $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = Mage::app()->getStore()->getStoreId(); else $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = null; if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_domain'])) { $ic157485eecbe64d400493d7b9e7f434b83aca5d0 = parse_url(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB)); $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_domain'] = $ic157485eecbe64d400493d7b9e7f434b83aca5d0['host'].($ic157485eecbe64d400493d7b9e7f434b83aca5d0['path'] != '/' ? $ic157485eecbe64d400493d7b9e7f434b83aca5d0['path'] : ''); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'] = Mage::getStoreConfig('general/store_information/name', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name2'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name2'] = Mage::app()->getStore()->getName(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_email'] = Mage::getStoreConfig('trans_email/ident_general/email', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_phone'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_phone'] = Mage::getStoreConfig('general/store_information/phone', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'contactForm') { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'] = trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('email')); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_name'] = trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('name')); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_phone'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_phone'] = trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('telephone')); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message'] = trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('comment')); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message_short1'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message_short1'] = Mage::helper('magesms')->substr(trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('comment')), 0, 120); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message_short2'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message_short2'] = Mage::helper('magesms')->substr(trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('comment')), 0, 100); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message_short3'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message_short3'] = Mage::helper('magesms')->substr(trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('comment')), 0, 80); } } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'customerRegisterSuccess') { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getEmail(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_password'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_password'] = Mage::app()->getRequest()->getParam('password'); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getFirstname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getLastname(); } } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'newOrder' || $i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderStatus' || $i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderTrackingNumber') { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerEmail(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerFirstname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerLastname(); } if (!isset($i22b151d2a920ca46892d343096abbccfad9f3678)) $i22b151d2a920ca46892d343096abbccfad9f3678 = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_company'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_company'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getCompany(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_address'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_address'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getStreet(1); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_postcode'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_postcode'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getPostcode(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_city'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_city'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getCity(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_country'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_country'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getCountry(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_state'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_state'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getRegion(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_phone'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_phone'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getTelephone(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_vat_number'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_vat_number'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getVatId(); } if (!isset($i560c12365c45b205daa0512840c70486783226b1)) $i560c12365c45b205daa0512840c70486783226b1 = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_company'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_company'] = $i560c12365c45b205daa0512840c70486783226b1->getCompany(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_firstname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_firstname'] = $i560c12365c45b205daa0512840c70486783226b1->getFirstname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_lastname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_lastname'] = $i560c12365c45b205daa0512840c70486783226b1->getLastname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_address'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_address'] = $i560c12365c45b205daa0512840c70486783226b1->getStreet(1); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_postcode'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_postcode'] = $i560c12365c45b205daa0512840c70486783226b1->getPostcode(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_city'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_city'] = $i560c12365c45b205daa0512840c70486783226b1->getCity(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_country'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_country'] = $i560c12365c45b205daa0512840c70486783226b1->getCountry(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_state'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_state'] = $i560c12365c45b205daa0512840c70486783226b1->getRegion(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_phone'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_phone'] = $i560c12365c45b205daa0512840c70486783226b1->getTelephone(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_vat_number'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_vat_number'] = $i560c12365c45b205daa0512840c70486783226b1->getVatId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_id'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getIncrementId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_payment'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_payment'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getPayment()->getMethodInstance()->getTitle(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_total_paid'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_total_paid'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getGrandTotal(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_currency'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_currency'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getOrderCurrency()->getCurrencyCode(); } $this->f2b4066ec99f97011a4a9f20dd18d97b5a49b8b51($i0933475b5bd80561a9f50282fd9eb0b8345cec4b, $i5e65dd16263683749d16a84171f719e768ed14b5->getCreatedAt()); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['delivery_date'])) { $ifd002a4ef735f38a6030baa73fafafa1118ff492 = Mage::getModel('ecommerceteam_ddc/order'); if ($ifd002a4ef735f38a6030baa73fafafa1118ff492) { $i82d8f80a6f30d2bff1b6b037fd170117a61f4e69 = $ifd002a4ef735f38a6030baa73fafafa1118ff492->load($i5e65dd16263683749d16a84171f719e768ed14b5->getEntityId(), 'order_id')->getData(); if (isset($i82d8f80a6f30d2bff1b6b037fd170117a61f4e69['order_id'])) { if (strtotime($i82d8f80a6f30d2bff1b6b037fd170117a61f4e69['delivery_date'])) { $i5b8dea0c150539c8b78ffa4a4ee9b4ea0bf09414 = Mage::getSingleton('core/locale')->date($i82d8f80a6f30d2bff1b6b037fd170117a61f4e69['delivery_date'], Zend_Date::ISO_8601, null, false)->toString(Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_FULL)); $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['delivery_date'] = $i5b8dea0c150539c8b78ffa4a4ee9b4ea0bf09414; } } elseif ($i2d35534ee8eb5c1c7e742a61e000486ce24db667 = Mage::app()->getRequest()->getParam('delivery_date')) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['delivery_date'] = $i2d35534ee8eb5c1c7e742a61e000486ce24db667; } } } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'newOrder') { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['cart_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['cart_id'] = Mage::getSingleton('checkout/session')->getQuoteId(); } $i32ce098f2dde8081cf3c4de31f52b408a6ad48be = $i5e65dd16263683749d16a84171f719e768ed14b5->getItemsCollection(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder1'])) { $i813c950729f632ca03f8c203c0a769de5e8bdf29 = array(); foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { $i813c950729f632ca03f8c203c0a769de5e8bdf29[] = $i69a1201e93806d55c970dfb18feec53d221ba37b->getId().'/'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getName().'/'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getQtyOrdered(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder1'] = implode('; ', $i813c950729f632ca03f8c203c0a769de5e8bdf29); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder2'])) { $i813c950729f632ca03f8c203c0a769de5e8bdf29 = array(); foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { $i813c950729f632ca03f8c203c0a769de5e8bdf29[] = 'id:'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getId().', ' .Mage::helper('magesms')->__('name').':'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getName().', ' .Mage::helper('magesms')->__('qty').':'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getQtyOrdered(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder2'] = implode('; ', $i813c950729f632ca03f8c203c0a769de5e8bdf29); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder3'])) { $i813c950729f632ca03f8c203c0a769de5e8bdf29 = array(); foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { $i813c950729f632ca03f8c203c0a769de5e8bdf29[] = $i69a1201e93806d55c970dfb18feec53d221ba37b->getId().'/'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getQtyOrdered(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder3'] = implode('; ', $i813c950729f632ca03f8c203c0a769de5e8bdf29); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder4'])) { $i813c950729f632ca03f8c203c0a769de5e8bdf29 = array(); foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { $i813c950729f632ca03f8c203c0a769de5e8bdf29[] = 'id:'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getId().', ' .Mage::helper('magesms')->__('qty').':'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getQtyOrdered(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder4'] = implode('; ', $i813c950729f632ca03f8c203c0a769de5e8bdf29); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder5'])) { $i813c950729f632ca03f8c203c0a769de5e8bdf29 = array(); foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { $i813c950729f632ca03f8c203c0a769de5e8bdf29[] = $i69a1201e93806d55c970dfb18feec53d221ba37b->getId().'/'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getSku().'/'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getQtyOrdered(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder5'] = implode('; ', $i813c950729f632ca03f8c203c0a769de5e8bdf29); } } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderStatus' || $i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderTrackingNumber') { $i9805d668f75b6b461f88474f57c5f6aa86a87316 = $i5e65dd16263683749d16a84171f719e768ed14b5->getTracksCollection()->getLastItem(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['carrier_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['carrier_name'] = $i9805d668f75b6b461f88474f57c5f6aa86a87316->getTitle(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_shipping_number'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_shipping_number'] = $i9805d668f75b6b461f88474f57c5f6aa86a87316->getTrackNumber(); } $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87 = Mage::getSingleton('admin/session')->getUser(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['employee_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['employee_id'] = $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87->getId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['employee_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['employee_email'] = $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87->getEmail(); } } } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'productOutOfStock' || $i41496536c6b29c24b90c374d9fc25143f114dc9a == 'productLowStock') { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_id'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getProductId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_quantity'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_quantity'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getQty(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_name']) || isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_ref'])) { $i69a1201e93806d55c970dfb18feec53d221ba37b = Mage::getModel('catalog/product'); $i69a1201e93806d55c970dfb18feec53d221ba37b->load($i5e65dd16263683749d16a84171f719e768ed14b5->getProductId()); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_name'] = $i69a1201e93806d55c970dfb18feec53d221ba37b->getName(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_ref'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_ref'] = $i69a1201e93806d55c970dfb18feec53d221ba37b->getSku(); } } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id']) || isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email']) || isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname']) || isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'])) { if ($i21e55df616c305955791876c1eb4da83448beba2 = Mage::getSingleton('customer/session')->getCustomer()) { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'] = $i21e55df616c305955791876c1eb4da83448beba2->getId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'] = $i21e55df616c305955791876c1eb4da83448beba2->getEmail(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'] = $i21e55df616c305955791876c1eb4da83448beba2->getLastname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'] = $i21e55df616c305955791876c1eb4da83448beba2->getFirstname(); } } } } foreach($i0933475b5bd80561a9f50282fd9eb0b8345cec4b as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa = str_replace('{'.$i670253c23c6fcba76bc4256a88fdd8fbc1041039.'}', $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89, $idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa); } } return $idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa; } private function f2b4066ec99f97011a4a9f20dd18d97b5a49b8b51(&$i0933475b5bd80561a9f50282fd9eb0b8345cec4b, $i53ddb2282ac3aca0d44abe35abcf69959ed66574) { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date'] = $i53ddb2282ac3aca0d44abe35abcf69959ed66574; } $i17c20960d197486b19dc890665362a4f2fd6f24a = date_parse($i53ddb2282ac3aca0d44abe35abcf69959ed66574); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date1'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date1'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'.'.$i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'.'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date2'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date2'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'/'.$i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'/'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date3'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date3'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date4'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date4'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['year'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['day']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date5'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date5'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'.'.$i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'.'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date6'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date6'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'/'.$i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'/'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date7'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date7'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_time'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_time'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['hour'].':'.sprintf('%02.0f', $i17c20960d197486b19dc890665362a4f2fd6f24a['minute']); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_time1'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_time1'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['hour'].':'.sprintf('%02.0f', $i17c20960d197486b19dc890665362a4f2fd6f24a['minute']).':'.sprintf('%02.0f', $i17c20960d197486b19dc890665362a4f2fd6f24a['second']); } } }
|
13 |
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
|
14 |
* @license http://opensource.org/licenses/BSD-3-Clause
|
15 |
*/
|
16 |
+
class Topefekt_Magesms_Model_Hooks extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/hooks'); } public function send($i41496536c6b29c24b90c374d9fc25143f114dc9a, $i5e65dd16263683749d16a84171f719e768ed14b5) { $i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18 = Mage::getSingleton('magesms/smsprofile'); if ($i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->user) { $i589c2cccd18de711ec5e779b98b9f98d0347a925 = Mage::app()->getStore()->getGroupId(); if (!$i589c2cccd18de711ec5e779b98b9f98d0347a925 && $i5e65dd16263683749d16a84171f719e768ed14b5->hasStoreId()) { $i589c2cccd18de711ec5e779b98b9f98d0347a925 = Mage::getModel('core/store')->load($i5e65dd16263683749d16a84171f719e768ed14b5->getStoreId())->getGroupId(); } if ($i5e65dd16263683749d16a84171f719e768ed14b5->getStore()) $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = $i5e65dd16263683749d16a84171f719e768ed14b5->getStore()->getId(); elseif (Mage::app()->getStore()) $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = Mage::app()->getStore()->getStoreId(); else $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = null; $ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8 = Mage::getSingleton('magesms/hooks_admins')->getCollection(); if ($i589c2cccd18de711ec5e779b98b9f98d0347a925 || !Mage::getSingleton('admin/session')->isLoggedIn()) { $ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8->addFieldToFilter('store_group_id', $i589c2cccd18de711ec5e779b98b9f98d0347a925); } else { $ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8->getSelect()->group('admin_id'); } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderStatus') $ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8->addFieldToFilter('name', 'orderStatus'.ucfirst($i5e65dd16263683749d16a84171f719e768ed14b5->getStatus())); else $ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8->addFieldToFilter('name', $i41496536c6b29c24b90c374d9fc25143f114dc9a); if ($ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8->count()) { $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = Mage::getSingleton('magesms/hooks_unicode')->getCollection() ->addFieldToFilter('type', 'admin')->getFirstItem(); foreach($ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8 as $i3d68c0cf53594c3449a7debf01d1c337a93fc4ae) { $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87 = Mage::getModel('magesms/admins')->load($i3d68c0cf53594c3449a7debf01d1c337a93fc4ae->getAdminId()); if (!$i2977ace3ff82db806c1e7c92dd6811f3d76f0e87) continue; $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f = Mage::getModel('magesms/sms'); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->addRecipient($i2977ace3ff82db806c1e7c92dd6811f3d76f0e87->getNumber(), array('recipient' => $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87->getName(), 'adminId' => $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87->getId())) ->setMessage($this->prepareText($i3d68c0cf53594c3449a7debf01d1c337a93fc4ae->getSmstext(), $i41496536c6b29c24b90c374d9fc25143f114dc9a, $i5e65dd16263683749d16a84171f719e768ed14b5)) ->setSubject($i41496536c6b29c24b90c374d9fc25143f114dc9a) ->setType(Topefekt_Magesms_Model_Sms::TYPE_ADMIN) ->setPriority(true) ->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getUnicode()) ->setStoreId($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setHookName($i41496536c6b29c24b90c374d9fc25143f114dc9a); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->send(); } } $i71e09ed37bc7273d250df9932c1693668e879cdd = Mage::getSingleton('magesms/hooks_customers')->getCollection() ->addFieldToFilter('active', 1); if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderStatus') $i71e09ed37bc7273d250df9932c1693668e879cdd->addFieldToFilter('name', 'orderStatus'.ucfirst($i5e65dd16263683749d16a84171f719e768ed14b5->getStatus())); else $i71e09ed37bc7273d250df9932c1693668e879cdd->addFieldToFilter('name', $i41496536c6b29c24b90c374d9fc25143f114dc9a); if ($i71e09ed37bc7273d250df9932c1693668e879cdd->count()) { $if2014d170e15e7f6f64523fd3238720980ceb64a = Mage::getSingleton('magesms/hooks_unicode')->getCollection() ->addFieldToFilter('type', 'customer'); if ($i5e65dd16263683749d16a84171f719e768ed14b5 instanceof Mage_Sales_Model_Order) { $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142 = Mage::getConfig()->getNode('default/config/optout')->sku; $ib8129b89cda7dae2cfe1b114353de8ba2385974e = Mage::getModel('catalog/product')->setStoreId($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66)->loadByAttribute('sku', $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142); if ($ib8129b89cda7dae2cfe1b114353de8ba2385974e && $ib8129b89cda7dae2cfe1b114353de8ba2385974e->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_ENABLED) { $i32ce098f2dde8081cf3c4de31f52b408a6ad48be = $i5e65dd16263683749d16a84171f719e768ed14b5->getItemsCollection(); $ibfceba0b027e7caa5ff39764963a80a73f4cdfeb = false; foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { if ($i69a1201e93806d55c970dfb18feec53d221ba37b->getSku() == $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142) { $ibfceba0b027e7caa5ff39764963a80a73f4cdfeb = true; break; } } if (!$ibfceba0b027e7caa5ff39764963a80a73f4cdfeb) return $this; } if ($i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->getPrefbilling()) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()->getCountryId(); if (!$i1f1945594819c4321de45ac15ed6d4dc07f41e2f) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress()->getCountryId(); } } else { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress()->getCountryId(); if (!$i1f1945594819c4321de45ac15ed6d4dc07f41e2f) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()->getCountryId(); } } $ifb2b31a17a2f13d19aebc5823ae02f42988a78f2 = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerId(); if (!$ifb2b31a17a2f13d19aebc5823ae02f42988a78f2) $ifb2b31a17a2f13d19aebc5823ae02f42988a78f2 = 0; $i489c048e0604d314330360b5ee23b42f486ebb98 = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerName(); } else { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = ''; $ifb2b31a17a2f13d19aebc5823ae02f42988a78f2 = $i5e65dd16263683749d16a84171f719e768ed14b5->getId(); } if (!$i1f1945594819c4321de45ac15ed6d4dc07f41e2f) { $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = Mage::app()->getRequest()->getParams(); foreach(array('mobilenumber', 'phone', 'telephone', 'mobile') as $i670253c23c6fcba76bc4256a88fdd8fbc1041039) { if (!empty($ia8a35a47a8e61218e15d1a33dac64bdc2449c01a[$i670253c23c6fcba76bc4256a88fdd8fbc1041039])) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a[$i670253c23c6fcba76bc4256a88fdd8fbc1041039]; $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = Mage::getStoreConfig('general/country/default', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66);; break; } } } if ($i1f1945594819c4321de45ac15ed6d4dc07f41e2f && is_numeric($ifb2b31a17a2f13d19aebc5823ae02f42988a78f2)) { if ($idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b) { $i854b57231c05dbaa7f22331dbaed4152a402d2f1 = new Zend_Locale_Data(); $i065c883e3f45e58104d21f8196ee3fe9bd2f513d = $i854b57231c05dbaa7f22331dbaed4152a402d2f1->getList('en-EN', 'phonetoterritory'); $i7492a7ab99a6ff1e0ae253366480ecb40a550224 = $i065c883e3f45e58104d21f8196ee3fe9bd2f513d[$idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b]; } else { $i7492a7ab99a6ff1e0ae253366480ecb40a550224 = ''; } $i6d6da9eb4bc3bca1db3f4eb2b907f496d625d20f = ''; foreach($i71e09ed37bc7273d250df9932c1693668e879cdd as $ifede0aa7d9c3f77f8ca4eb9c1002d82f3a770ae7) { if ($ifede0aa7d9c3f77f8ca4eb9c1002d82f3a770ae7->getMutation() == $i7492a7ab99a6ff1e0ae253366480ecb40a550224) { $i6d6da9eb4bc3bca1db3f4eb2b907f496d625d20f = $ifede0aa7d9c3f77f8ca4eb9c1002d82f3a770ae7->getSmstext(); break; } elseif ($ifede0aa7d9c3f77f8ca4eb9c1002d82f3a770ae7->getMutation() == 'default') $i6d6da9eb4bc3bca1db3f4eb2b907f496d625d20f = $ifede0aa7d9c3f77f8ca4eb9c1002d82f3a770ae7->getSmstext(); } if ($i6d6da9eb4bc3bca1db3f4eb2b907f496d625d20f) { $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f = Mage::getModel('magesms/sms'); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->addRecipient($i1f1945594819c4321de45ac15ed6d4dc07f41e2f, array('recipient' => $i489c048e0604d314330360b5ee23b42f486ebb98, 'customerId' => $ifb2b31a17a2f13d19aebc5823ae02f42988a78f2, 'country' => $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b)) ->setMessage($this->prepareText($i6d6da9eb4bc3bca1db3f4eb2b907f496d625d20f, $i41496536c6b29c24b90c374d9fc25143f114dc9a, $i5e65dd16263683749d16a84171f719e768ed14b5)) ->setSubject($i41496536c6b29c24b90c374d9fc25143f114dc9a) ->setType(Topefekt_Magesms_Model_Sms::TYPE_CUSTOMER) ->setPriority(true) ->setStoreId($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); foreach($if2014d170e15e7f6f64523fd3238720980ceb64a as $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd) { if ($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getArea() == $i7492a7ab99a6ff1e0ae253366480ecb40a550224) { $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getUnicode()); break; } elseif ($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getArea() == 'default') $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getUnicode()); } $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setHookName($i41496536c6b29c24b90c374d9fc25143f114dc9a); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->send(); } } } } return $this; } public function prepareText($idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $i41496536c6b29c24b90c374d9fc25143f114dc9a, $i5e65dd16263683749d16a84171f719e768ed14b5) { if (preg_match_all('/{(.*?)}/', $idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $ia00c63b7b8f0d76f361b9bd281e5073cc0d0aa3e)) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b = array(); foreach($ia00c63b7b8f0d76f361b9bd281e5073cc0d0aa3e[1] as $iebd691e534c6cf2e84cf8a88790a5271154fca05) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b[$iebd691e534c6cf2e84cf8a88790a5271154fca05] = '{'.$iebd691e534c6cf2e84cf8a88790a5271154fca05.'}'; } if ($i5e65dd16263683749d16a84171f719e768ed14b5->getStore()) $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = $i5e65dd16263683749d16a84171f719e768ed14b5->getStore()->getId(); elseif (Mage::app()->getStore()) $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = Mage::app()->getStore()->getStoreId(); else $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = null; if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_domain'])) { $ic157485eecbe64d400493d7b9e7f434b83aca5d0 = parse_url(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB)); $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_domain'] = $ic157485eecbe64d400493d7b9e7f434b83aca5d0['host'].($ic157485eecbe64d400493d7b9e7f434b83aca5d0['path'] != '/' ? $ic157485eecbe64d400493d7b9e7f434b83aca5d0['path'] : ''); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'] = Mage::getStoreConfig('general/store_information/name', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name2'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name2'] = Mage::app()->getStore()->getName(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_email'] = Mage::getStoreConfig('trans_email/ident_general/email', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_phone'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_phone'] = Mage::getStoreConfig('general/store_information/phone', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'contactForm') { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'] = trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('email')); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_name'] = trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('name')); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_phone'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_phone'] = trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('telephone')); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message'] = trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('comment')); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message_short1'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message_short1'] = Mage::helper('magesms')->substr(trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('comment')), 0, 120); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message_short2'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message_short2'] = Mage::helper('magesms')->substr(trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('comment')), 0, 100); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message_short3'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message_short3'] = Mage::helper('magesms')->substr(trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('comment')), 0, 80); } } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'customerRegisterSuccess') { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getEmail(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_password'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_password'] = Mage::app()->getRequest()->getParam('password'); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getFirstname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getLastname(); } } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'newOrder' || $i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderStatus' || $i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderTrackingNumber') { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerEmail(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerFirstname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerLastname(); } if (!isset($i22b151d2a920ca46892d343096abbccfad9f3678)) $i22b151d2a920ca46892d343096abbccfad9f3678 = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_company'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_company'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getCompany(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_address'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_address'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getStreet(1); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_postcode'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_postcode'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getPostcode(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_city'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_city'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getCity(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_country'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_country'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getCountry(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_state'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_state'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getRegion(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_phone'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_phone'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getTelephone(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_vat_number'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_vat_number'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getVatId(); } if (!isset($i560c12365c45b205daa0512840c70486783226b1)) $i560c12365c45b205daa0512840c70486783226b1 = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_company'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_company'] = $i560c12365c45b205daa0512840c70486783226b1->getCompany(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_firstname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_firstname'] = $i560c12365c45b205daa0512840c70486783226b1->getFirstname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_lastname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_lastname'] = $i560c12365c45b205daa0512840c70486783226b1->getLastname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_address'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_address'] = $i560c12365c45b205daa0512840c70486783226b1->getStreet(1); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_postcode'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_postcode'] = $i560c12365c45b205daa0512840c70486783226b1->getPostcode(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_city'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_city'] = $i560c12365c45b205daa0512840c70486783226b1->getCity(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_country'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_country'] = $i560c12365c45b205daa0512840c70486783226b1->getCountry(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_state'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_state'] = $i560c12365c45b205daa0512840c70486783226b1->getRegion(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_phone'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_phone'] = $i560c12365c45b205daa0512840c70486783226b1->getTelephone(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_vat_number'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_vat_number'] = $i560c12365c45b205daa0512840c70486783226b1->getVatId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_id'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getIncrementId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_payment'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_payment'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getPayment()->getMethodInstance()->getTitle(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_payment_html'])) { $ic078737049591e1e2db7c285f3e3b95cb867c6d0 = Mage::helper('payment')->getInfoBlock($i5e65dd16263683749d16a84171f719e768ed14b5->getPayment()) ->setIsSecureMode(true); $ic078737049591e1e2db7c285f3e3b95cb867c6d0->getMethod()->setStore($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); $i42745015bca99637011d2ba8a559beb3a8b0961f = strip_tags($ic078737049591e1e2db7c285f3e3b95cb867c6d0->toHtml()); $i42745015bca99637011d2ba8a559beb3a8b0961f = preg_replace('/ +/', ' ', $i42745015bca99637011d2ba8a559beb3a8b0961f); $i42745015bca99637011d2ba8a559beb3a8b0961f = preg_replace("/ \n/", "\n", $i42745015bca99637011d2ba8a559beb3a8b0961f); $i42745015bca99637011d2ba8a559beb3a8b0961f = preg_replace("/\n /", "\n", $i42745015bca99637011d2ba8a559beb3a8b0961f); $i42745015bca99637011d2ba8a559beb3a8b0961f = preg_replace("/\n\n+/", "\n", $i42745015bca99637011d2ba8a559beb3a8b0961f); $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_payment_html'] = trim($i42745015bca99637011d2ba8a559beb3a8b0961f); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_total_paid'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_total_paid'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getGrandTotal(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_currency'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_currency'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getOrderCurrency()->getCurrencyCode(); } $this->f2b4066ec99f97011a4a9f20dd18d97b5a49b8b51($i0933475b5bd80561a9f50282fd9eb0b8345cec4b, $i5e65dd16263683749d16a84171f719e768ed14b5->getCreatedAt()); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['delivery_date'])) { $ifd002a4ef735f38a6030baa73fafafa1118ff492 = Mage::getModel('ecommerceteam_ddc/order'); if ($ifd002a4ef735f38a6030baa73fafafa1118ff492) { $i82d8f80a6f30d2bff1b6b037fd170117a61f4e69 = $ifd002a4ef735f38a6030baa73fafafa1118ff492->load($i5e65dd16263683749d16a84171f719e768ed14b5->getEntityId(), 'order_id')->getData(); if (isset($i82d8f80a6f30d2bff1b6b037fd170117a61f4e69['order_id'])) { if (strtotime($i82d8f80a6f30d2bff1b6b037fd170117a61f4e69['delivery_date'])) { $i5b8dea0c150539c8b78ffa4a4ee9b4ea0bf09414 = Mage::getSingleton('core/locale')->date($i82d8f80a6f30d2bff1b6b037fd170117a61f4e69['delivery_date'], Zend_Date::ISO_8601, null, false)->toString(Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_FULL)); $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['delivery_date'] = $i5b8dea0c150539c8b78ffa4a4ee9b4ea0bf09414; } } elseif ($i2d35534ee8eb5c1c7e742a61e000486ce24db667 = Mage::app()->getRequest()->getParam('delivery_date')) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['delivery_date'] = $i2d35534ee8eb5c1c7e742a61e000486ce24db667; } } } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'newOrder') { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['cart_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['cart_id'] = Mage::getSingleton('checkout/session')->getQuoteId(); } $i32ce098f2dde8081cf3c4de31f52b408a6ad48be = $i5e65dd16263683749d16a84171f719e768ed14b5->getItemsCollection(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder1'])) { $i813c950729f632ca03f8c203c0a769de5e8bdf29 = array(); foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { $i813c950729f632ca03f8c203c0a769de5e8bdf29[] = $i69a1201e93806d55c970dfb18feec53d221ba37b->getId().'/'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getName().'/'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getQtyOrdered(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder1'] = implode('; ', $i813c950729f632ca03f8c203c0a769de5e8bdf29); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder2'])) { $i813c950729f632ca03f8c203c0a769de5e8bdf29 = array(); foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { $i813c950729f632ca03f8c203c0a769de5e8bdf29[] = 'id:'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getId().', ' .Mage::helper('magesms')->__('name').':'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getName().', ' .Mage::helper('magesms')->__('qty').':'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getQtyOrdered(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder2'] = implode('; ', $i813c950729f632ca03f8c203c0a769de5e8bdf29); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder3'])) { $i813c950729f632ca03f8c203c0a769de5e8bdf29 = array(); foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { $i813c950729f632ca03f8c203c0a769de5e8bdf29[] = $i69a1201e93806d55c970dfb18feec53d221ba37b->getId().'/'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getQtyOrdered(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder3'] = implode('; ', $i813c950729f632ca03f8c203c0a769de5e8bdf29); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder4'])) { $i813c950729f632ca03f8c203c0a769de5e8bdf29 = array(); foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { $i813c950729f632ca03f8c203c0a769de5e8bdf29[] = 'id:'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getId().', ' .Mage::helper('magesms')->__('qty').':'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getQtyOrdered(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder4'] = implode('; ', $i813c950729f632ca03f8c203c0a769de5e8bdf29); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder5'])) { $i813c950729f632ca03f8c203c0a769de5e8bdf29 = array(); foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { $i813c950729f632ca03f8c203c0a769de5e8bdf29[] = $i69a1201e93806d55c970dfb18feec53d221ba37b->getId().'/'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getSku().'/'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getQtyOrdered(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder5'] = implode('; ', $i813c950729f632ca03f8c203c0a769de5e8bdf29); } } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderStatus' || $i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderTrackingNumber') { $i9805d668f75b6b461f88474f57c5f6aa86a87316 = $i5e65dd16263683749d16a84171f719e768ed14b5->getTracksCollection()->getLastItem(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['carrier_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['carrier_name'] = $i9805d668f75b6b461f88474f57c5f6aa86a87316->getTitle(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_shipping_number'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_shipping_number'] = $i9805d668f75b6b461f88474f57c5f6aa86a87316->getTrackNumber(); } $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87 = Mage::getSingleton('admin/session')->getUser(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['employee_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['employee_id'] = $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87->getId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['employee_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['employee_email'] = $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87->getEmail(); } } } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'productOutOfStock' || $i41496536c6b29c24b90c374d9fc25143f114dc9a == 'productLowStock') { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_id'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getProductId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_quantity'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_quantity'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getQty(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_name']) || isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_ref'])) { $i69a1201e93806d55c970dfb18feec53d221ba37b = Mage::getModel('catalog/product'); $i69a1201e93806d55c970dfb18feec53d221ba37b->load($i5e65dd16263683749d16a84171f719e768ed14b5->getProductId()); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_name'] = $i69a1201e93806d55c970dfb18feec53d221ba37b->getName(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_ref'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_ref'] = $i69a1201e93806d55c970dfb18feec53d221ba37b->getSku(); } } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id']) || isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email']) || isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname']) || isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'])) { if ($i21e55df616c305955791876c1eb4da83448beba2 = Mage::getSingleton('customer/session')->getCustomer()) { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'] = $i21e55df616c305955791876c1eb4da83448beba2->getId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'] = $i21e55df616c305955791876c1eb4da83448beba2->getEmail(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'] = $i21e55df616c305955791876c1eb4da83448beba2->getLastname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'] = $i21e55df616c305955791876c1eb4da83448beba2->getFirstname(); } } } } foreach($i0933475b5bd80561a9f50282fd9eb0b8345cec4b as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa = str_replace('{'.$i670253c23c6fcba76bc4256a88fdd8fbc1041039.'}', $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89, $idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa); } } return $idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa; } private function f2b4066ec99f97011a4a9f20dd18d97b5a49b8b51(&$i0933475b5bd80561a9f50282fd9eb0b8345cec4b, $i53ddb2282ac3aca0d44abe35abcf69959ed66574) { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date'] = $i53ddb2282ac3aca0d44abe35abcf69959ed66574; } $i17c20960d197486b19dc890665362a4f2fd6f24a = date_parse($i53ddb2282ac3aca0d44abe35abcf69959ed66574); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date1'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date1'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'.'.$i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'.'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date2'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date2'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'/'.$i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'/'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date3'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date3'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date4'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date4'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['year'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['day']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date5'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date5'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'.'.$i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'.'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date6'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date6'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'/'.$i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'/'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date7'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date7'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_time'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_time'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['hour'].':'.sprintf('%02.0f', $i17c20960d197486b19dc890665362a4f2fd6f24a['minute']); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_time1'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_time1'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['hour'].':'.sprintf('%02.0f', $i17c20960d197486b19dc890665362a4f2fd6f24a['minute']).':'.sprintf('%02.0f', $i17c20960d197486b19dc890665362a4f2fd6f24a['second']); } } }
|
app/code/community/Topefekt/Magesms/Model/Sms.php
CHANGED
@@ -13,4 +13,4 @@
|
|
13 |
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
|
14 |
* @license http://opensource.org/licenses/BSD-3-Clause
|
15 |
*/
|
16 |
-
class Topefekt_Magesms_Model_Sms extends Varien_Object { const SENT = 1; const ERROR = 2; const DELIVERED = 3; const UNAVAILABLE = 4; const SIMULATION = 5; const SCHEDULED = 6; const DELETED = 7; const DND = 8; const DUPLICATE = 9; const TYPE_ADMIN = 1; const TYPE_CUSTOMER = 2; const TYPE_MARKETING = 3; const TYPE_SIMPLE = 4; protected $_routes_type = array( self::TYPE_ADMIN => 'admin', self::TYPE_CUSTOMER => 'customer', self::TYPE_MARKETING => 'customer', self::TYPE_SIMPLE => 'customer'); private $v3a95f9a85ae3fecc89b69aa9ea2d057ac2807b0b = true; public function _construct() { $this->setData(array( 'recipient' => new Varien_Data_Collection(), 'message' => '', 'subject' => '', 'unicode' => false, 'sendlater' => false, 'type' => self::TYPE_SIMPLE, 'priority' => true, 'unique' => false, 'adminId' => 0, 'customerId' => 0, 'recipientName' => '', 'storeId' => null )); parent::_construct(); } public function send() { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d6abff7c4dab2aa28578ae1dc49699ba6b1d18c18 = Mage::getSingleton('magesms/smsprofile'); try { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f = array(); if (!strlen($this->getMessage())) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f[] = Mage::helper('magesms')->__('Fill in SMS text.'); } if (is_array($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f)) Mage::throwException($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f[0]); if ($this->getSendlater()) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d8284e7e828b5452004207db69edd7aa7ff0703ab = Mage::getModel('core/date')->gmtTimestamp(); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8284e7e828b5452004207db69edd7aa7ff0703ab >= $this->getSendlater()) $ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f[] = Mage::helper('magesms')->__('Wrong time of SMS sending.'); } if (is_array($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f)) Mage::throwException($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f[0]); if (!count($this->getRecipient())) $ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f[] = Mage::helper('magesms')->__('Recipients found: 0'); if (is_array($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f)) Mage::throwException($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f[0]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749dcd14fe4ea296b55b8ecbf19d2fd7bfef3a511519 = html_entity_decode($this->getMessage(), ENT_QUOTES, 'UTF-8'); $if295547318143e26fc7026b92d58e3d1eec229db = Mage::helper('magesms')->countSms($ibcdf76f8c9ddc330c79f805116a8bb146c43749dcd14fe4ea296b55b8ecbf19d2fd7bfef3a511519, $this->getUnicode()); if (!$ibcdf76f8c9ddc330c79f805116a8bb146c43749d6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->simulatesms && count($this->getRecipient())*$if295547318143e26fc7026b92d58e3d1eec229db*0.05 > $ibcdf76f8c9ddc330c79f805116a8bb146c43749d6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->credit) $ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f[] = Mage::helper('magesms')->__('You do not have enough credit to send SMS to all ') .count($this->getRecipient()).Mage::helper('magesms')->__(' recipients.'); if (is_array($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f)) Mage::throwException($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f[0]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d854b57231c05dbaa7f22331dbaed4152a402d2f1 = new Zend_Locale_Data(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d065c883e3f45e58104d21f8196ee3fe9bd2f513d = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d854b57231c05dbaa7f22331dbaed4152a402d2f1->getList('en-EN', 'phonetoterritory'); $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2 = array('number'=>array(), 'isms'=>array(), 'sendertype'=>array(), 'senderID'=>array(), 'admin_id'=>array(), 'customer_id'=>array(), 'data' => array()); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d = 0; foreach($this->getRecipient() as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d39404799a9171a012cb8b15cd8f27b347aa44a5f = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getNumber(); $i037b855bc01175f2c77d5c3e19eda9a0003feff4 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getCountry() ? $ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getCountry() : ''; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd = ''; if ($i037b855bc01175f2c77d5c3e19eda9a0003feff4 && $ibcdf76f8c9ddc330c79f805116a8bb146c43749d065c883e3f45e58104d21f8196ee3fe9bd2f513d[$i037b855bc01175f2c77d5c3e19eda9a0003feff4] && !(strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749d39404799a9171a012cb8b15cd8f27b347aa44a5f, '+') === 0 || strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749d39404799a9171a012cb8b15cd8f27b347aa44a5f, '00') === 0)) { if (strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749d39404799a9171a012cb8b15cd8f27b347aa44a5f, '0') === 0) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d39404799a9171a012cb8b15cd8f27b347aa44a5f = substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749d39404799a9171a012cb8b15cd8f27b347aa44a5f, 1); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d065c883e3f45e58104d21f8196ee3fe9bd2f513d[$i037b855bc01175f2c77d5c3e19eda9a0003feff4]; } $i813c950729f632ca03f8c203c0a769de5e8bdf29 = Mage::helper('magesms')->prepareNumber($ibcdf76f8c9ddc330c79f805116a8bb146c43749d39404799a9171a012cb8b15cd8f27b347aa44a5f, $this->_routes_type[$this->getType()], $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd, $this->getStoreId()); if(is_array($i813c950729f632ca03f8c203c0a769de5e8bdf29)) { if ($this->getUnique()) { if (in_array($i813c950729f632ca03f8c203c0a769de5e8bdf29['mobile'], $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'])) continue; } $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'][] = $i813c950729f632ca03f8c203c0a769de5e8bdf29['mobile']; $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['isms'][] = $i813c950729f632ca03f8c203c0a769de5e8bdf29['isms']; $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['sendertype'][] = $i813c950729f632ca03f8c203c0a769de5e8bdf29['sendertype']; $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][] = $i813c950729f632ca03f8c203c0a769de5e8bdf29['senderID']; $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['admin_id'][] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getAdminId(); $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customer_id'][] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getCustomerId(); $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getRecipient(); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->hasText()) $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d] = html_entity_decode($ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getText(), ENT_QUOTES, 'UTF-8'); } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d++; } if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->simulatesms) { foreach($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'] as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039 => $ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b = Mage::getModel('magesms/smshistory'); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNumber('+'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setDate(date('Y-m-d H:i:s')); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setText($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setTotal(Mage::helper('magesms')->countSms($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039], $this->getUnicode())); } else { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setText($ibcdf76f8c9ddc330c79f805116a8bb146c43749dcd14fe4ea296b55b8ecbf19d2fd7bfef3a511519); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setTotal($if295547318143e26fc7026b92d58e3d1eec229db); } $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::SIMULATION); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSender($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setUnicode($this->getUnicode()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setType($this->getType()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('SMS SIMULATION (Sending of SMS was simulated. Recipient will not receive SMS)')); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSmsid('simulate'.md5(microtime())); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSubject($this->getSubject()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setAdminId($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['admin_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setCustomerId($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customer_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setRecipient($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->save(); } if (count($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'])) Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('SMS was sent (simulation).')); $this->v3a95f9a85ae3fecc89b69aa9ea2d057ac2807b0b = false; } else { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'username='.urlencode($ibcdf76f8c9ddc330c79f805116a8bb146c43749d6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->user).'&password='.urlencode($ibcdf76f8c9ddc330c79f805116a8bb146c43749d6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->passwd) .'&unicode='.($this->getUnicode() ? 1 : 0); if ($this->getPriority()) $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= '&action=sendsms&number='.urlencode($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'][0]) .'&isms='.urlencode($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['isms'][0]).'&sender='.urlencode($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][0]); else $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= '&action=sendsmsall'.($this->getType() == self::TYPE_MARKETING ? '2' : '').'&number='.implode(';', $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number']) .'&isms='.implode(';', $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['isms']).'&sender='.implode(';', $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID']); if ($this->getType() == self::TYPE_MARKETING && !empty($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'])) foreach ($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'] as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d=>$ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89) $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= '&data'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d.'='.urlencode($ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89); else $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= '&data='.urlencode($ibcdf76f8c9ddc330c79f805116a8bb146c43749dcd14fe4ea296b55b8ecbf19d2fd7bfef3a511519); if ($this->getSendlater()) $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= '&datelater='.urlencode($this->getSendlater()); if ($this->getHookName()) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= '&HN='.$this->getHookName(); } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getModel('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322, false); if (!empty($ibcdf76f8c9ddc330c79f805116a8bb146c43749d55dd4e7042a1f9031b84f07f04c37165ce3d0720)) { if (strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749d55dd4e7042a1f9031b84f07f04c37165ce3d0720, 'QQQ___QQQ') !== false) $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd18c7e5bc71d5242a8b8cc24d43559e5dccbddb5 = explode("QQQ___QQQ", $ibcdf76f8c9ddc330c79f805116a8bb146c43749d55dd4e7042a1f9031b84f07f04c37165ce3d0720); else $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd18c7e5bc71d5242a8b8cc24d43559e5dccbddb5 = array($ibcdf76f8c9ddc330c79f805116a8bb146c43749d55dd4e7042a1f9031b84f07f04c37165ce3d0720); foreach($ibcdf76f8c9ddc330c79f805116a8bb146c43749dd18c7e5bc71d5242a8b8cc24d43559e5dccbddb5 as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039 => $ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a = Mage::getModel('magesms/api')->parser($ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89, '__'); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b = Mage::getModel('magesms/smshistory'); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNumber('+'.$if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setDate(date('Y-m-d H:i:s')); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setText($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setTotal(Mage::helper('magesms')->countSms($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039], $this->getUnicode())); } else { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setText($ibcdf76f8c9ddc330c79f805116a8bb146c43749dcd14fe4ea296b55b8ecbf19d2fd7bfef3a511519); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setTotal($if295547318143e26fc7026b92d58e3d1eec229db); } $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::ERROR); if (isset($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['data'][1])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setPrice($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['data'][1]); if (isset($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['data'][2])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setCredit($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['data'][2]); if (isset($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['data'][0])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSmsid($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['data'][0]); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSender($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['admin_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setAdminId($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['admin_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setUnicode($this->getUnicode()); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customer_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setCustomerId($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customer_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setRecipient($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setUnicode($this->getUnicode()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setType($this->getType()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSubject($this->getSubject()); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 1 || $ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 11) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::SENT); } elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 111) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::SCHEDULED); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('SMS will be send later - ').Mage::helper('core')->formatDate(date('Y-m-d H:i:s', $this->getSendlater()), 'medium', true)); } elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3 && $ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['datasrc'] == 9) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('wrong number or unavailable')); } elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3 && $ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['datasrc'] == 15) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('unauthorized senderID in confirmation sms')); } elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3 && $ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['datasrc'] == 10) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('low credit for sending sms')); } elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3 && $ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['datasrc'] == 22) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('unicode is not supported')); } elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3 && $ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['datasrc'] == 23) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('message duplicity')); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::DUPLICATE); } elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['error'])); } elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 4) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('')); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customerID'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setCustomerId($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customerID'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setRecipient($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); } else { continue; } $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->save(); } $this->v3a95f9a85ae3fecc89b69aa9ea2d057ac2807b0b = false; if ($i5ee2fa256ff77dd811a9c1911f7563263a694e4b->getStatus() == self::SENT) Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('SMS was sent.')); elseif ($i5ee2fa256ff77dd811a9c1911f7563263a694e4b->getStatus() == self::SCHEDULED) Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('SMS was saved.')); else { Mage::getSingleton('adminhtml/session')->addError($i5ee2fa256ff77dd811a9c1911f7563263a694e4b->getNote()); $this->v3a95f9a85ae3fecc89b69aa9ea2d057ac2807b0b = true; } } } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); } } public function setRecipient($ia61712c27ea241bd7a543dc2b02ea572274d0322) { if (is_string($ia61712c27ea241bd7a543dc2b02ea572274d0322)) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setNumber($ia61712c27ea241bd7a543dc2b02ea572274d0322); $this->getRecipient()->addItem($ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6); } elseif (is_array($ia61712c27ea241bd7a543dc2b02ea572274d0322)) { foreach ($ia61712c27ea241bd7a543dc2b02ea572274d0322 as $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { if (!trim($ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d)) continue; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setNumber(trim($ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d)); $this->getRecipient()->addItem($ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6); } } return $this; } public function addRecipient($ibcdf76f8c9ddc330c79f805116a8bb146c43749d39404799a9171a012cb8b15cd8f27b347aa44a5f, $ia61712c27ea241bd7a543dc2b02ea572274d0322 = array()) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setNumber($ibcdf76f8c9ddc330c79f805116a8bb146c43749d39404799a9171a012cb8b15cd8f27b347aa44a5f); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322['country'])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setCountry($ia61712c27ea241bd7a543dc2b02ea572274d0322['country']); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322['customerId'])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setCustomerId($ia61712c27ea241bd7a543dc2b02ea572274d0322['customerId']); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322['adminId'])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setAdminId($ia61712c27ea241bd7a543dc2b02ea572274d0322['adminId']); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322['recipient'])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setRecipient($ia61712c27ea241bd7a543dc2b02ea572274d0322['recipient']); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322['text'])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setText($ia61712c27ea241bd7a543dc2b02ea572274d0322['text']); $this->getRecipient()->addItem($ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6); return $this; } public function isError() { return $this->v3a95f9a85ae3fecc89b69aa9ea2d057ac2807b0b ? true : false; } public function status($ibcdf76f8c9ddc330c79f805116a8bb146c43749d7e9551ab4470830f87be4f9ff5edc75013bc9257 = false) { $i2e68560d8e15e3c18bb400939778a6bf1ae47190 = array(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::SENT); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_sent.png'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('SENT to recipient')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::ERROR); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_canceled.gif'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('ERROR')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::DELIVERED); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_accepted.gif'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('DELIVERED to recipient')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::UNAVAILABLE); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_buffered.png'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('RECIPIENT UNAVAILABLE')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::SIMULATION); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_simulation.png'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('SIMULATION')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::SCHEDULED); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_scheduled.png'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('SCHEDULED')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::DELETED); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_deleted.png'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('DELETED')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::DND); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_donotdisturb.png'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('DO NOT DISTURB registry (DND)')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::DUPLICATE); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_duplicate.png'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('DUPLICATE')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6; if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d7e9551ab4470830f87be4f9ff5edc75013bc9257 === false) return $i2e68560d8e15e3c18bb400939778a6bf1ae47190; elseif (isset($i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d7e9551ab4470830f87be4f9ff5edc75013bc9257])) return $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d7e9551ab4470830f87be4f9ff5edc75013bc9257]; return false; } }
|
13 |
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
|
14 |
* @license http://opensource.org/licenses/BSD-3-Clause
|
15 |
*/
|
16 |
+
class Topefekt_Magesms_Model_Sms extends Varien_Object { const SENT = 1; const ERROR = 2; const DELIVERED = 3; const UNAVAILABLE = 4; const SIMULATION = 5; const SCHEDULED = 6; const DELETED = 7; const DND = 8; const DUPLICATE = 9; const TYPE_ADMIN = 1; const TYPE_CUSTOMER = 2; const TYPE_MARKETING = 3; const TYPE_SIMPLE = 4; protected $_routes_type = array( self::TYPE_ADMIN => 'admin', self::TYPE_CUSTOMER => 'customer', self::TYPE_MARKETING => 'customer', self::TYPE_SIMPLE => 'customer'); private $v3a95f9a85ae3fecc89b69aa9ea2d057ac2807b0b = true; public function _construct() { $this->setData(array( 'recipient' => new Varien_Data_Collection(), 'message' => '', 'subject' => '', 'unicode' => false, 'sendlater' => false, 'type' => self::TYPE_SIMPLE, 'priority' => true, 'unique' => false, 'adminId' => 0, 'customerId' => 0, 'recipientName' => '', 'storeId' => null )); parent::_construct(); } public function send() { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d6abff7c4dab2aa28578ae1dc49699ba6b1d18c18 = Mage::getSingleton('magesms/smsprofile'); try { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f = array(); if (!strlen($this->getMessage())) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f[] = Mage::helper('magesms')->__('Fill in SMS text.'); } if (is_array($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f)) Mage::throwException($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f[0]); if ($this->getSendlater()) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d8284e7e828b5452004207db69edd7aa7ff0703ab = Mage::getModel('core/date')->gmtTimestamp(); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8284e7e828b5452004207db69edd7aa7ff0703ab >= $this->getSendlater()) $ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f[] = Mage::helper('magesms')->__('Wrong time of SMS sending.'); } if (is_array($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f)) Mage::throwException($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f[0]); if (!count($this->getRecipient())) $ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f[] = Mage::helper('magesms')->__('Recipients found: 0'); if (is_array($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f)) Mage::throwException($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f[0]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749dcd14fe4ea296b55b8ecbf19d2fd7bfef3a511519 = html_entity_decode($this->getMessage(), ENT_QUOTES, 'UTF-8'); $if295547318143e26fc7026b92d58e3d1eec229db = Mage::helper('magesms')->countSms($ibcdf76f8c9ddc330c79f805116a8bb146c43749dcd14fe4ea296b55b8ecbf19d2fd7bfef3a511519, $this->getUnicode()); if (!$ibcdf76f8c9ddc330c79f805116a8bb146c43749d6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->simulatesms && count($this->getRecipient())*$if295547318143e26fc7026b92d58e3d1eec229db*0.05 > $ibcdf76f8c9ddc330c79f805116a8bb146c43749d6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->credit) $ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f[] = Mage::helper('magesms')->__('You do not have enough credit to send SMS to all ') .count($this->getRecipient()).Mage::helper('magesms')->__(' recipients.'); if (is_array($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f)) Mage::throwException($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f[0]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d854b57231c05dbaa7f22331dbaed4152a402d2f1 = new Zend_Locale_Data(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d065c883e3f45e58104d21f8196ee3fe9bd2f513d = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d854b57231c05dbaa7f22331dbaed4152a402d2f1->getList('en-EN', 'phonetoterritory'); $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2 = array('number'=>array(), 'isms'=>array(), 'sendertype'=>array(), 'senderID'=>array(), 'admin_id'=>array(), 'customer_id'=>array(), 'data' => array()); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d = 0; foreach($this->getRecipient() as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d39404799a9171a012cb8b15cd8f27b347aa44a5f = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getNumber(); $i037b855bc01175f2c77d5c3e19eda9a0003feff4 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getCountry() ? $ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getCountry() : ''; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd = ''; if ($i037b855bc01175f2c77d5c3e19eda9a0003feff4 && $ibcdf76f8c9ddc330c79f805116a8bb146c43749d065c883e3f45e58104d21f8196ee3fe9bd2f513d[$i037b855bc01175f2c77d5c3e19eda9a0003feff4] && !(strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749d39404799a9171a012cb8b15cd8f27b347aa44a5f, '+') === 0 || strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749d39404799a9171a012cb8b15cd8f27b347aa44a5f, '00') === 0)) { if (strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749d39404799a9171a012cb8b15cd8f27b347aa44a5f, '0') === 0) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d39404799a9171a012cb8b15cd8f27b347aa44a5f = substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749d39404799a9171a012cb8b15cd8f27b347aa44a5f, 1); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d065c883e3f45e58104d21f8196ee3fe9bd2f513d[$i037b855bc01175f2c77d5c3e19eda9a0003feff4]; } $i813c950729f632ca03f8c203c0a769de5e8bdf29 = Mage::helper('magesms')->prepareNumber($ibcdf76f8c9ddc330c79f805116a8bb146c43749d39404799a9171a012cb8b15cd8f27b347aa44a5f, $this->_routes_type[$this->getType()], $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd, $this->getStoreId()); if(is_array($i813c950729f632ca03f8c203c0a769de5e8bdf29)) { if ($this->getUnique()) { if (in_array($i813c950729f632ca03f8c203c0a769de5e8bdf29['mobile'], $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'])) continue; } $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'][] = $i813c950729f632ca03f8c203c0a769de5e8bdf29['mobile']; $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['isms'][] = $i813c950729f632ca03f8c203c0a769de5e8bdf29['isms']; $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['sendertype'][] = $i813c950729f632ca03f8c203c0a769de5e8bdf29['sendertype']; $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][] = $i813c950729f632ca03f8c203c0a769de5e8bdf29['senderID']; $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['admin_id'][] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getAdminId(); $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customer_id'][] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getCustomerId(); $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getRecipient(); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->hasText()) { $i42745015bca99637011d2ba8a559beb3a8b0961f = html_entity_decode($ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getText(), ENT_QUOTES, 'UTF-8'); $i42745015bca99637011d2ba8a559beb3a8b0961f = addslashes($i42745015bca99637011d2ba8a559beb3a8b0961f); $i42745015bca99637011d2ba8a559beb3a8b0961f = str_replace("&", "%26", $i42745015bca99637011d2ba8a559beb3a8b0961f); $i42745015bca99637011d2ba8a559beb3a8b0961f = str_replace("&", "%26", $i42745015bca99637011d2ba8a559beb3a8b0961f); $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d] = $i42745015bca99637011d2ba8a559beb3a8b0961f; } } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d++; } if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->simulatesms) { foreach($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'] as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039 => $ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b = Mage::getModel('magesms/smshistory'); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNumber('+'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setDate(date('Y-m-d H:i:s')); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setText($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setTotal(Mage::helper('magesms')->countSms($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039], $this->getUnicode())); } else { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setText($ibcdf76f8c9ddc330c79f805116a8bb146c43749dcd14fe4ea296b55b8ecbf19d2fd7bfef3a511519); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setTotal($if295547318143e26fc7026b92d58e3d1eec229db); } $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::SIMULATION); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSender($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setUnicode($this->getUnicode()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setType($this->getType()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('SMS SIMULATION (Sending of SMS was simulated. Recipient will not receive SMS)')); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSmsid('simulate'.md5(microtime())); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSubject($this->getSubject()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setAdminId($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['admin_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setCustomerId($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customer_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setRecipient($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->save(); } if (count($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'])) Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('SMS was sent (simulation).')); $this->v3a95f9a85ae3fecc89b69aa9ea2d057ac2807b0b = false; } else { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'username='.urlencode($ibcdf76f8c9ddc330c79f805116a8bb146c43749d6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->user).'&password='.urlencode($ibcdf76f8c9ddc330c79f805116a8bb146c43749d6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->passwd) .'&unicode='.($this->getUnicode() ? 1 : 0); if ($this->getPriority()) $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= '&action=sendsms&number='.urlencode($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'][0]) .'&isms='.urlencode($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['isms'][0]).'&sender='.urlencode($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][0]); else $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= '&action=sendsmsall'.($this->getType() == self::TYPE_MARKETING ? '2' : '').'&number='.implode(';', $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number']) .'&isms='.implode(';', $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['isms']).'&sender='.implode(';', $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID']); if ($this->getType() == self::TYPE_MARKETING && !empty($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'])) foreach ($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'] as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d=>$ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89) $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= '&data'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d.'='.$ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89; else { $i42745015bca99637011d2ba8a559beb3a8b0961f = html_entity_decode($ibcdf76f8c9ddc330c79f805116a8bb146c43749dcd14fe4ea296b55b8ecbf19d2fd7bfef3a511519, ENT_QUOTES, 'UTF-8'); $i42745015bca99637011d2ba8a559beb3a8b0961f = addslashes($i42745015bca99637011d2ba8a559beb3a8b0961f); $i42745015bca99637011d2ba8a559beb3a8b0961f = str_replace("&", "%26", $i42745015bca99637011d2ba8a559beb3a8b0961f); $i42745015bca99637011d2ba8a559beb3a8b0961f = str_replace("&", "%26", $i42745015bca99637011d2ba8a559beb3a8b0961f); $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= '&data='.$i42745015bca99637011d2ba8a559beb3a8b0961f; } if ($this->getSendlater()) $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= '&datelater='.urlencode($this->getSendlater()); if ($this->getHookName()) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= '&HN='.$this->getHookName(); } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getModel('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322, false); if (!empty($ibcdf76f8c9ddc330c79f805116a8bb146c43749d55dd4e7042a1f9031b84f07f04c37165ce3d0720)) { if (strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749d55dd4e7042a1f9031b84f07f04c37165ce3d0720, 'QQQ___QQQ') !== false) $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd18c7e5bc71d5242a8b8cc24d43559e5dccbddb5 = explode("QQQ___QQQ", $ibcdf76f8c9ddc330c79f805116a8bb146c43749d55dd4e7042a1f9031b84f07f04c37165ce3d0720); else $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd18c7e5bc71d5242a8b8cc24d43559e5dccbddb5 = array($ibcdf76f8c9ddc330c79f805116a8bb146c43749d55dd4e7042a1f9031b84f07f04c37165ce3d0720); foreach($ibcdf76f8c9ddc330c79f805116a8bb146c43749dd18c7e5bc71d5242a8b8cc24d43559e5dccbddb5 as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039 => $ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a = Mage::getModel('magesms/api')->parser($ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89, '__'); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b = Mage::getModel('magesms/smshistory'); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNumber('+'.$if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setDate(date('Y-m-d H:i:s')); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setText($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setTotal(Mage::helper('magesms')->countSms($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039], $this->getUnicode())); } else { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setText($ibcdf76f8c9ddc330c79f805116a8bb146c43749dcd14fe4ea296b55b8ecbf19d2fd7bfef3a511519); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setTotal($if295547318143e26fc7026b92d58e3d1eec229db); } $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::ERROR); if (isset($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['data'][1])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setPrice($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['data'][1]); if (isset($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['data'][2])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setCredit($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['data'][2]); if (isset($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['data'][0])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSmsid($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['data'][0]); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSender($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['admin_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setAdminId($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['admin_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setUnicode($this->getUnicode()); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customer_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setCustomerId($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customer_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setRecipient($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setUnicode($this->getUnicode()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setType($this->getType()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSubject($this->getSubject()); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 1 || $ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 11) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::SENT); } elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 111) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::SCHEDULED); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('SMS will be send later - ').Mage::helper('core')->formatDate(date('Y-m-d H:i:s', $this->getSendlater()), 'medium', true)); } elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3 && $ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['datasrc'] == 9) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('wrong number or unavailable')); } elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3 && $ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['datasrc'] == 15) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('unauthorized senderID in confirmation sms')); } elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3 && $ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['datasrc'] == 10) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('low credit for sending sms')); } elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3 && $ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['datasrc'] == 22) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('unicode is not supported')); } elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3 && $ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['datasrc'] == 23) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('message duplicity')); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::DUPLICATE); } elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['error'])); } elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 4) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('')); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customerID'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setCustomerId($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customerID'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setRecipient($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); } else { continue; } $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->save(); } $this->v3a95f9a85ae3fecc89b69aa9ea2d057ac2807b0b = false; if ($i5ee2fa256ff77dd811a9c1911f7563263a694e4b->getStatus() == self::SENT) Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('SMS was sent.')); elseif ($i5ee2fa256ff77dd811a9c1911f7563263a694e4b->getStatus() == self::SCHEDULED) Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('SMS was saved.')); else { Mage::getSingleton('adminhtml/session')->addError($i5ee2fa256ff77dd811a9c1911f7563263a694e4b->getNote()); $this->v3a95f9a85ae3fecc89b69aa9ea2d057ac2807b0b = true; } } } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); } } public function setRecipient($ia61712c27ea241bd7a543dc2b02ea572274d0322) { if (is_string($ia61712c27ea241bd7a543dc2b02ea572274d0322)) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setNumber($ia61712c27ea241bd7a543dc2b02ea572274d0322); $this->getRecipient()->addItem($ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6); } elseif (is_array($ia61712c27ea241bd7a543dc2b02ea572274d0322)) { foreach ($ia61712c27ea241bd7a543dc2b02ea572274d0322 as $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { if (!trim($ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d)) continue; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setNumber(trim($ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d)); $this->getRecipient()->addItem($ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6); } } return $this; } public function addRecipient($ibcdf76f8c9ddc330c79f805116a8bb146c43749d39404799a9171a012cb8b15cd8f27b347aa44a5f, $ia61712c27ea241bd7a543dc2b02ea572274d0322 = array()) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setNumber($ibcdf76f8c9ddc330c79f805116a8bb146c43749d39404799a9171a012cb8b15cd8f27b347aa44a5f); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322['country'])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setCountry($ia61712c27ea241bd7a543dc2b02ea572274d0322['country']); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322['customerId'])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setCustomerId($ia61712c27ea241bd7a543dc2b02ea572274d0322['customerId']); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322['adminId'])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setAdminId($ia61712c27ea241bd7a543dc2b02ea572274d0322['adminId']); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322['recipient'])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setRecipient($ia61712c27ea241bd7a543dc2b02ea572274d0322['recipient']); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322['text'])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setText($ia61712c27ea241bd7a543dc2b02ea572274d0322['text']); $this->getRecipient()->addItem($ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6); return $this; } public function isError() { return $this->v3a95f9a85ae3fecc89b69aa9ea2d057ac2807b0b ? true : false; } public function status($ibcdf76f8c9ddc330c79f805116a8bb146c43749d7e9551ab4470830f87be4f9ff5edc75013bc9257 = false) { $i2e68560d8e15e3c18bb400939778a6bf1ae47190 = array(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::SENT); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_sent.png'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('SENT to recipient')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::ERROR); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_canceled.gif'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('ERROR')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::DELIVERED); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_accepted.gif'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('DELIVERED to recipient')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::UNAVAILABLE); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_buffered.png'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('RECIPIENT UNAVAILABLE')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::SIMULATION); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_simulation.png'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('SIMULATION')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::SCHEDULED); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_scheduled.png'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('SCHEDULED')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::DELETED); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_deleted.png'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('DELETED')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::DND); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_donotdisturb.png'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('DO NOT DISTURB registry (DND)')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::DUPLICATE); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_duplicate.png'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('DUPLICATE')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6; if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d7e9551ab4470830f87be4f9ff5edc75013bc9257 === false) return $i2e68560d8e15e3c18bb400939778a6bf1ae47190; elseif (isset($i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d7e9551ab4470830f87be4f9ff5edc75013bc9257])) return $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d7e9551ab4470830f87be4f9ff5edc75013bc9257]; return false; } }
|
app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/CustomersmsController.php
CHANGED
@@ -13,4 +13,4 @@
|
|
13 |
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
|
14 |
* @license http://opensource.org/licenses/BSD-3-Clause
|
15 |
*/
|
16 |
-
class Topefekt_Magesms_Adminhtml_Magesms_CustomersmsController extends Topefekt_Magesms_Controller_Action { public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/customersms.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } public function addmutationAction() { $i7137e40370cf1c5ccf937060891613788203e2d6 = $this->getRequest()->getParam('country', 'default'); $idb618c56be2c8abc9a54a16881dadfd5317ba624 = Mage::getSingleton('magesms/hooks_templates')->getCollection()->addFilter('area', $i7137e40370cf1c5ccf937060891613788203e2d6); if (!$idb618c56be2c8abc9a54a16881dadfd5317ba624->count()) { $i195899c9895b81b9bc75dba762c949638a6f36dd = Mage::getSingleton('magesms/country_area')->getCollection()->addFilter('area', $i7137e40370cf1c5ccf937060891613788203e2d6); $i7d716a8fdc4101e29ab8fd7002b332e962603d8c = array(); foreach($i195899c9895b81b9bc75dba762c949638a6f36dd as $i037b855bc01175f2c77d5c3e19eda9a0003feff4) { $i7d716a8fdc4101e29ab8fd7002b332e962603d8c[] = $i037b855bc01175f2c77d5c3e19eda9a0003feff4->getCountryName(); } if (count($i7d716a8fdc4101e29ab8fd7002b332e962603d8c)) { $idb618c56be2c8abc9a54a16881dadfd5317ba624 = Mage::getSingleton('magesms/hooks_templates'); $idb618c56be2c8abc9a54a16881dadfd5317ba624->setArea($i7137e40370cf1c5ccf937060891613788203e2d6); $idb618c56be2c8abc9a54a16881dadfd5317ba624->setAreaText(implode(', ', $i7d716a8fdc4101e29ab8fd7002b332e962603d8c)); $idb618c56be2c8abc9a54a16881dadfd5317ba624->save(); Mage::getSingleton('adminhtml/session')->addSuccess( Mage::helper('magesms')->__('SMS text version for ').$idb618c56be2c8abc9a54a16881dadfd5317ba624->getAreaText(). Mage::helper('magesms')->__(' was saved')); } } $this->_redirect('*/*/', array('mutation' => $i7137e40370cf1c5ccf937060891613788203e2d6)); return $this; } public function delmutationAction() { $i7137e40370cf1c5ccf937060891613788203e2d6 = $this->getRequest()->getParam('mutation'); if ($i7137e40370cf1c5ccf937060891613788203e2d6) { $idb618c56be2c8abc9a54a16881dadfd5317ba624 = Mage::getSingleton('magesms/hooks_templates') ->getCollection() ->addFilter('area', $i7137e40370cf1c5ccf937060891613788203e2d6) ->getFirstItem() ->delete(); $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = Mage::getSingleton('magesms/hooks_unicode') ->getCollection() ->addFilter('area', $i7137e40370cf1c5ccf937060891613788203e2d6) ->addFilter('type', 'customer') ->getFirstItem() ->delete(); $ibad8f78c098260b16424eb12ceee5f8336591d56 = Mage::getSingleton('magesms/hooks_customers') ->getCollection() ->addFilter('mutation', $i7137e40370cf1c5ccf937060891613788203e2d6); foreach($ibad8f78c098260b16424eb12ceee5f8336591d56 as $i21e55df616c305955791876c1eb4da83448beba2) $i21e55df616c305955791876c1eb4da83448beba2->delete(); Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('SMS text version was deleted.')); } $this->_redirect('*/*/index'); return $this; } public function saveunicodeAction() { $i7137e40370cf1c5ccf937060891613788203e2d6 = $this->getRequest()->getParam('mutation'); if ($i7137e40370cf1c5ccf937060891613788203e2d6) { $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = Mage::getSingleton('magesms/hooks_unicode') ->getCollection() ->addFilter('area', $i7137e40370cf1c5ccf937060891613788203e2d6) ->addFilter('type', 'customer') ->getFirstItem(); if (!count($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getData())) { $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = Mage::getSingleton('magesms/hooks_unicode'); $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->setArea($i7137e40370cf1c5ccf937060891613788203e2d6); $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->setType('customer'); $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->setUnicode($this->getRequest()->getParam('unicode' , 0)); } else { $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->setUnicode($this->getRequest()->getParam('unicode' , 0)); } $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->save(); Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('Unicode was saved.')); } $this->_redirect('*/*/', array('mutation' => $i7137e40370cf1c5ccf937060891613788203e2d6)); return $this; } public function savehookAction() { $i7137e40370cf1c5ccf937060891613788203e2d6 = $this->getRequest()->getParam('mutation', 'default'); $i30f20aafde612a957f7f966cb5b85e35782bc88a = $this->getRequest()->getParam('type'); $i2bd9743336318d0e14be0600c9129730279505dd = $this->getRequest()->getParam('name'); $i24273814df383b4a6926acc1db1a788b12f5a411 = $this->getRequest()->getParam('text' , ''); if ($i30f20aafde612a957f7f966cb5b85e35782bc88a && $i2bd9743336318d0e14be0600c9129730279505dd && $i24273814df383b4a6926acc1db1a788b12f5a411) { $i42ee48f418943c9662de0976069476c7dc8f620d = Mage::getSingleton('magesms/hooks_'.$i30f20aafde612a957f7f966cb5b85e35782bc88a) ->getCollection() ->addFilter('name', $i2bd9743336318d0e14be0600c9129730279505dd) ->addFilter('mutation', $i7137e40370cf1c5ccf937060891613788203e2d6) ->getFirstItem(); if (!count($i42ee48f418943c9662de0976069476c7dc8f620d->getData())) { $i42ee48f418943c9662de0976069476c7dc8f620d = Mage::getSingleton('magesms/hooks_'.$i30f20aafde612a957f7f966cb5b85e35782bc88a); $i42ee48f418943c9662de0976069476c7dc8f620d->setMutation($i7137e40370cf1c5ccf937060891613788203e2d6); $i42ee48f418943c9662de0976069476c7dc8f620d->setName($i2bd9743336318d0e14be0600c9129730279505dd); } $i42ee48f418943c9662de0976069476c7dc8f620d->setActive($this->getRequest()->getParam('active' , 0)); $i42ee48f418943c9662de0976069476c7dc8f620d->setSmstext($i24273814df383b4a6926acc1db1a788b12f5a411); $i42ee48f418943c9662de0976069476c7dc8f620d->save(); Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('Text of SMS was saved.')); } $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = array('_fragment' => $i2bd9743336318d0e14be0600c9129730279505dd); if ($i7137e40370cf1c5ccf937060891613788203e2d6 != 'default') $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a += array('mutation' => $i7137e40370cf1c5ccf937060891613788203e2d6); $this->_redirect('*/*/', $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a); return $this; } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/customersms') ->_title(Mage::helper('magesms')->__('Customer SMS')) ; return $this; } }
|
13 |
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
|
14 |
* @license http://opensource.org/licenses/BSD-3-Clause
|
15 |
*/
|
16 |
+
class Topefekt_Magesms_Adminhtml_Magesms_CustomersmsController extends Topefekt_Magesms_Controller_Action { public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/customersms.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } public function addmutationAction() { $i7137e40370cf1c5ccf937060891613788203e2d6 = $this->getRequest()->getParam('country', 'default'); $idb618c56be2c8abc9a54a16881dadfd5317ba624 = Mage::getSingleton('magesms/hooks_templates')->getCollection()->addFilter('area', $i7137e40370cf1c5ccf937060891613788203e2d6); if (!$idb618c56be2c8abc9a54a16881dadfd5317ba624->count()) { $i195899c9895b81b9bc75dba762c949638a6f36dd = Mage::getSingleton('magesms/country_area')->getCollection()->addFilter('area', $i7137e40370cf1c5ccf937060891613788203e2d6); $i7d716a8fdc4101e29ab8fd7002b332e962603d8c = array(); foreach($i195899c9895b81b9bc75dba762c949638a6f36dd as $i037b855bc01175f2c77d5c3e19eda9a0003feff4) { $i7d716a8fdc4101e29ab8fd7002b332e962603d8c[] = $i037b855bc01175f2c77d5c3e19eda9a0003feff4->getCountryName(); } if (count($i7d716a8fdc4101e29ab8fd7002b332e962603d8c)) { $idb618c56be2c8abc9a54a16881dadfd5317ba624 = Mage::getSingleton('magesms/hooks_templates'); $idb618c56be2c8abc9a54a16881dadfd5317ba624->setArea($i7137e40370cf1c5ccf937060891613788203e2d6); $idb618c56be2c8abc9a54a16881dadfd5317ba624->setAreaText(implode(', ', $i7d716a8fdc4101e29ab8fd7002b332e962603d8c)); $idb618c56be2c8abc9a54a16881dadfd5317ba624->save(); Mage::getSingleton('adminhtml/session')->addSuccess( Mage::helper('magesms')->__('SMS text version for ').$idb618c56be2c8abc9a54a16881dadfd5317ba624->getAreaText(). Mage::helper('magesms')->__(' was saved') ); } } $this->_redirect('*/*/', array('mutation' => $i7137e40370cf1c5ccf937060891613788203e2d6)); return $this; } public function delmutationAction() { $i7137e40370cf1c5ccf937060891613788203e2d6 = $this->getRequest()->getParam('mutation'); if ($i7137e40370cf1c5ccf937060891613788203e2d6) { $idb618c56be2c8abc9a54a16881dadfd5317ba624 = Mage::getSingleton('magesms/hooks_templates') ->getCollection() ->addFilter('area', $i7137e40370cf1c5ccf937060891613788203e2d6) ->getFirstItem() ->delete(); $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = Mage::getSingleton('magesms/hooks_unicode') ->getCollection() ->addFilter('area', $i7137e40370cf1c5ccf937060891613788203e2d6) ->addFilter('type', 'customer') ->getFirstItem() ->delete(); $ibad8f78c098260b16424eb12ceee5f8336591d56 = Mage::getSingleton('magesms/hooks_customers') ->getCollection() ->addFilter('mutation', $i7137e40370cf1c5ccf937060891613788203e2d6); foreach($ibad8f78c098260b16424eb12ceee5f8336591d56 as $i21e55df616c305955791876c1eb4da83448beba2) $i21e55df616c305955791876c1eb4da83448beba2->delete(); Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('SMS text version was deleted.')); } $this->_redirect('*/*/index'); return $this; } public function saveunicodeAction() { $i7137e40370cf1c5ccf937060891613788203e2d6 = $this->getRequest()->getParam('mutation'); if ($i7137e40370cf1c5ccf937060891613788203e2d6) { $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = Mage::getSingleton('magesms/hooks_unicode') ->getCollection() ->addFilter('area', $i7137e40370cf1c5ccf937060891613788203e2d6) ->addFilter('type', 'customer') ->getFirstItem(); if (!count($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getData())) { $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = Mage::getSingleton('magesms/hooks_unicode'); $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->setArea($i7137e40370cf1c5ccf937060891613788203e2d6); $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->setType('customer'); $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->setUnicode($this->getRequest()->getParam('unicode' , 0)); } else { $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->setUnicode($this->getRequest()->getParam('unicode' , 0)); } $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->save(); Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('Unicode was saved.')); } $this->_redirect('*/*/', array('mutation' => $i7137e40370cf1c5ccf937060891613788203e2d6)); return $this; } public function savehookAction() { $i7137e40370cf1c5ccf937060891613788203e2d6 = $this->getRequest()->getParam('mutation', 'default'); $i30f20aafde612a957f7f966cb5b85e35782bc88a = $this->getRequest()->getParam('type'); $i2bd9743336318d0e14be0600c9129730279505dd = $this->getRequest()->getParam('name'); $i24273814df383b4a6926acc1db1a788b12f5a411 = $this->getRequest()->getParam('text' , ''); if ($i30f20aafde612a957f7f966cb5b85e35782bc88a && $i2bd9743336318d0e14be0600c9129730279505dd && $i24273814df383b4a6926acc1db1a788b12f5a411) { $i42ee48f418943c9662de0976069476c7dc8f620d = Mage::getSingleton('magesms/hooks_'.$i30f20aafde612a957f7f966cb5b85e35782bc88a) ->getCollection() ->addFilter('name', $i2bd9743336318d0e14be0600c9129730279505dd) ->addFilter('mutation', $i7137e40370cf1c5ccf937060891613788203e2d6) ->getFirstItem(); if (!count($i42ee48f418943c9662de0976069476c7dc8f620d->getData())) { $i42ee48f418943c9662de0976069476c7dc8f620d = Mage::getSingleton('magesms/hooks_'.$i30f20aafde612a957f7f966cb5b85e35782bc88a); $i42ee48f418943c9662de0976069476c7dc8f620d->setMutation($i7137e40370cf1c5ccf937060891613788203e2d6); $i42ee48f418943c9662de0976069476c7dc8f620d->setName($i2bd9743336318d0e14be0600c9129730279505dd); } $i42ee48f418943c9662de0976069476c7dc8f620d->setActive($this->getRequest()->getParam('active' , 0)); $i42ee48f418943c9662de0976069476c7dc8f620d->setSmstext($i24273814df383b4a6926acc1db1a788b12f5a411); $i42ee48f418943c9662de0976069476c7dc8f620d->save(); Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('Text of SMS was saved.')); } $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = array('_fragment' => $i2bd9743336318d0e14be0600c9129730279505dd); if ($i7137e40370cf1c5ccf937060891613788203e2d6 != 'default') $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a += array('mutation' => $i7137e40370cf1c5ccf937060891613788203e2d6); $this->_redirect('*/*/', $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a); return $this; } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/customersms') ->_title(Mage::helper('magesms')->__('Customer SMS')) ; return $this; } }
|
app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/HistoryController.php
CHANGED
@@ -13,4 +13,4 @@
|
|
13 |
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
|
14 |
* @license http://opensource.org/licenses/BSD-3-Clause
|
15 |
*/
|
16 |
-
class Topefekt_Magesms_Adminhtml_Magesms_HistoryController extends Topefekt_Magesms_Controller_Action { public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/history.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } public function filterAction() { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = $this->getRequest()->getParams(); unset($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a['form_key']); $this->_redirect('*/*/', $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a); } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/history') ->_title(Mage::helper('magesms')->__('SMS History')) ; return $this; } }
|
13 |
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
|
14 |
* @license http://opensource.org/licenses/BSD-3-Clause
|
15 |
*/
|
16 |
+
class Topefekt_Magesms_Adminhtml_Magesms_HistoryController extends Topefekt_Magesms_Controller_Action { public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/history.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } public function filterAction() { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = $this->getRequest()->getParams(); unset($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a['form_key']); $this->_redirect('*/*/', $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a); } public function deleteAction() { $i7af9c0bf5c8f0878a0f7c5463d75397834eda9fa = Mage::getSingleton('core/resource')->getTableName('magesms/smshistory'); Mage::getSingleton('core/resource')->getConnection('core_write')->query("TRUNCATE TABLE `$i7af9c0bf5c8f0878a0f7c5463d75397834eda9fa`"); Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('SMS history was deleted.')); $this->_redirect('*/*/'); } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/history') ->_title(Mage::helper('magesms')->__('SMS History')) ; return $this; } }
|
app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/MarketingController.php
CHANGED
@@ -27,7 +27,7 @@
|
|
27 |
button: "%s_trig",
|
28 |
align: "Bl",
|
29 |
singleClick : true
|
30 |
-
});'; $i5e2f8ae4963934ca8fbc2fff6103b6356dd52c78 = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM); $i376a6873d4104d44a8d8f0acacfc41b40105e11f = Varien_Date::convertZendToStrFtime($i5e2f8ae4963934ca8fbc2fff6103b6356dd52c78, true, true); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('filter1', 'date', array( 'name' => 'filter[]', 'format' => $i5e2f8ae4963934ca8fbc2fff6103b6356dd52c78, 'value' => Mage::app()->getLocale()->date()->toString(), 'image' => Mage::getDesign()->getSkinUrl('images/grid-cal.gif'), )); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('note', 'note', array( 'text' => Mage::helper('magesms')->__('to: '), )); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('filter2', 'date', array( 'name' => 'filter[]', 'format' => $i5e2f8ae4963934ca8fbc2fff6103b6356dd52c78, 'value' => Mage::app()->getLocale()->date()->toString(), 'image' => Mage::getDesign()->getSkinUrl('images/grid-cal.gif'), )); $i8114d84b871449f246242a4433e364f848daff0c[] = sprintf($i03474abc9cad4f5c29a2f0bca70a29051a128bc9, 'filter1', $i376a6873d4104d44a8d8f0acacfc41b40105e11f, 'filter1'); $i8114d84b871449f246242a4433e364f848daff0c[] = sprintf($i03474abc9cad4f5c29a2f0bca70a29051a128bc9, 'filter2', $i376a6873d4104d44a8d8f0acacfc41b40105e11f, 'filter2'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setJs($i8114d84b871449f246242a4433e364f848daff0c); break; case 'birthdayall': $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('note1', 'note', array( 'text' => Mage::helper('magesms')->__('day').': ', )); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('filter1', 'select', array( 'name' => 'filter[]', 'values' => array_combine(range(1, 31), range(1, 31)), )); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('note2', 'note', array( 'text' => Mage::helper('magesms')->__('month').': ', )); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('filter2', 'select', array( 'name' => 'filter[]', 'values' => array_combine(range(1, 12), range(1, 12)), )); break; } $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($i1791b2d1f89bb2bd83b34046f59125af207713db->getHtml()); } } break; case 'applyFilter': $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('value'); if (is_array($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) && count($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) == 1) $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89 = $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89[0]; if (($i2bd9743336318d0e14be0600c9129730279505dd = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('name')) && $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89 !== '') { $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 = Mage::getModel('magesms/marketing_filter_collection'); $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2->addApplyFilter($i2bd9743336318d0e14be0600c9129730279505dd, $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); $this->f6d43ff809a46f71c1e634564f2b37e20a99bbb9c(); $i21e55df616c305955791876c1eb4da83448beba2 = $this->_getBlockCustomer(); $i1791b2d1f89bb2bd83b34046f59125af207713db = $this->getLayout()->createBlock('magesms/marketing_form'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml( array( 'appliedFilters' => $i1791b2d1f89bb2bd83b34046f59125af207713db->getHtmlFilters(), 'customers' => $i21e55df616c305955791876c1eb4da83448beba2->toHtml(), 'count' => $this->_collection->count() )); } break; case 'removeFilter': $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('id'); if (is_numeric($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)) { $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 = Mage::getModel('magesms/marketing_filter_collection'); $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2->removeFilter($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); $this->f6d43ff809a46f71c1e634564f2b37e20a99bbb9c(); $i21e55df616c305955791876c1eb4da83448beba2 = $this->_getBlockCustomer(); $i9e86252a333eb6c832bb895a8d1690c48b2ed3fd = $this->_getBlockDeleted(); $i1791b2d1f89bb2bd83b34046f59125af207713db = $this->getLayout()->createBlock('magesms/marketing_form'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml( array( 'appliedFilters' => $i1791b2d1f89bb2bd83b34046f59125af207713db->getHtmlFilters(), 'customers' => $i21e55df616c305955791876c1eb4da83448beba2->toHtml(), 'deleted' => $i9e86252a333eb6c832bb895a8d1690c48b2ed3fd->toHtml(), 'count' => $this->_collection->count() )); } break; case 'listCustomers': if ($i47b2a41e4081b6f8d8381f411087dcd7042bfb53 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('letter')) { $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 = Mage::getModel('magesms/marketing_filter_collection'); $this->f6d43ff809a46f71c1e634564f2b37e20a99bbb9c(); $this->_collection->addFieldToFilter('lastname', array('like' => $i47b2a41e4081b6f8d8381f411087dcd7042bfb53.'%')); $i21e55df616c305955791876c1eb4da83448beba2 = $this->getBlockCustomer(); $i21e55df616c305955791876c1eb4da83448beba2->setCollection($this->_collection); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($i21e55df616c305955791876c1eb4da83448beba2->toHtml()); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setType('customer'); } break; case 'removeCustomer': if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('id')) { $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 = Mage::getModel('magesms/marketing_filter_collection'); $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2->addRemoveCustomer($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); $this->f6d43ff809a46f71c1e634564f2b37e20a99bbb9c(); $ib1285cda66d7403b4e0132565b5359295c62d58c = clone $this->_collection; $i21e55df616c305955791876c1eb4da83448beba2 = $this->_getBlockCustomer(); $i9e86252a333eb6c832bb895a8d1690c48b2ed3fd = $this->_getBlockDeleted(); $id82aaf2f437652c4b6efbd55703199f614e8e516 = array( 'customers' => $i21e55df616c305955791876c1eb4da83448beba2->toHtml(), 'deleted' => $i9e86252a333eb6c832bb895a8d1690c48b2ed3fd->toHtml(), 'count' => $this->_collection->count() ); if ($i47b2a41e4081b6f8d8381f411087dcd7042bfb53 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('letter')) { $ib1285cda66d7403b4e0132565b5359295c62d58c->addFieldToFilter('lastname', array('like' => $i47b2a41e4081b6f8d8381f411087dcd7042bfb53.'%')); $i2ca8461421e371a2dc8ff5b5c9a248f5fb0a6dbc = $this->getBlockCustomer(); $i2ca8461421e371a2dc8ff5b5c9a248f5fb0a6dbc->setCollection($ib1285cda66d7403b4e0132565b5359295c62d58c); $id82aaf2f437652c4b6efbd55703199f614e8e516['customer_letter'] = $i2ca8461421e371a2dc8ff5b5c9a248f5fb0a6dbc->toHtml(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setType('customer'); } $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($id82aaf2f437652c4b6efbd55703199f614e8e516); } break; case 'reset': $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 = Mage::getModel('magesms/marketing_filter_collection'); $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2->resetFilter(); $this->f6d43ff809a46f71c1e634564f2b37e20a99bbb9c(); $i21e55df616c305955791876c1eb4da83448beba2 = $this->_getBlockCustomer(); $i9e86252a333eb6c832bb895a8d1690c48b2ed3fd = $this->_getBlockDeleted(); $i1791b2d1f89bb2bd83b34046f59125af207713db = $this->getLayout()->createBlock('magesms/marketing_form'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml( array( 'appliedFilters' => $i1791b2d1f89bb2bd83b34046f59125af207713db->getHtmlFilters(), 'customers' => $i21e55df616c305955791876c1eb4da83448beba2->toHtml(), 'deleted' => $i9e86252a333eb6c832bb895a8d1690c48b2ed3fd->toHtml(), 'count' => $this->_collection->count() )); break; } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } protected function _popup($iacea0d13bc5e2676192c06d68cb091dc0ce26320 = true) { $id82aaf2f437652c4b6efbd55703199f614e8e516 = ''; if ($iacea0d13bc5e2676192c06d68cb091dc0ce26320) { $i1791b2d1f89bb2bd83b34046f59125af207713db = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'magesms_marketing_templateform', array('template' => 'topefekt/magesms/marketing/form.phtml') ); $id82aaf2f437652c4b6efbd55703199f614e8e516 = $i1791b2d1f89bb2bd83b34046f59125af207713db->toHtml(); } $i42cf41da37138d64d37b0778e6561aab5e1239d6 = $this->getLayout()->createBlock('magesms/marketing_template'); return $id82aaf2f437652c4b6efbd55703199f614e8e516.$i42cf41da37138d64d37b0778e6561aab5e1239d6->toHtml(); } public function sendAction() { if ( $this->getRequest()->getPost() ) { try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('text'); $ifc17de93671eea5715520ecfbc4dc543818685b8 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('unique') ? true : false; $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('unicode') ? true : false; $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f = Mage::getModel('magesms/sms'); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setMessage($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa) ->setType(Topefekt_Magesms_Model_Sms::TYPE_MARKETING) ->setPriority(false) ->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd) ->setUnique($ifc17de93671eea5715520ecfbc4dc543818685b8); if ($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('sendlater') && $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl')) { $i4c323947385ff52539168f26084feed4bc17e2dc = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl'); $i6aa8d50211ad373efab0896425f6f5fa0e013c29 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl_hour'); $if8001c570b9f0e904df8b36797628015beb8fa80 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl_min'); $i836a3cd8c554d1c35cc3c6cf3e3f49052b683096 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datereal', 0); $i4c323947385ff52539168f26084feed4bc17e2dc = strtotime("$i4c323947385ff52539168f26084feed4bc17e2dc $i6aa8d50211ad373efab0896425f6f5fa0e013c29:$if8001c570b9f0e904df8b36797628015beb8fa80:00") + 3600*$i836a3cd8c554d1c35cc3c6cf3e3f49052b683096; $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setSendlater($i4c323947385ff52539168f26084feed4bc17e2dc); } $this->f6d43ff809a46f71c1e634564f2b37e20a99bbb9c(); foreach($this->_collection as $iff7e46827cbb6547116c592bf800f4687428abf9) { $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc = Mage::getModel('core/website')->load($iff7e46827cbb6547116c592bf800f4687428abf9->getWebsiteId()); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->addRecipient($iff7e46827cbb6547116c592bf800f4687428abf9->getTelephone(), array( 'country' => $iff7e46827cbb6547116c592bf800f4687428abf9->getCountryId(), 'customerId' => $iff7e46827cbb6547116c592bf800f4687428abf9->getId(), 'recipient' => $iff7e46827cbb6547116c592bf800f4687428abf9->getFirstname().' '.$iff7e46827cbb6547116c592bf800f4687428abf9->getLastname(), 'text' => $this->_prepareText($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getDefaultStore()->getId(), $iff7e46827cbb6547116c592bf800f4687428abf9), ) ); } $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->send(); $this->_redirectReferer(); } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->indexAction(); } } else { $this->_redirect('*/*/index'); } return $this; } protected function _getBlockCustomer() { $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock('magesms/marketing_customer'); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setCollection($this->_collection); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setTitle(Mage::helper('magesms')->__('Customers found: ')); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setId('customer'); return $i8ee45e0018a32fb1a855b82624506e35789cc4d2; } protected function _getBlockDeleted() { $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock('magesms/marketing_customer'); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setDeleteCustomer(true); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setTitle(Mage::helper('magesms')->__('Removed Customers: ')); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setId('deleted'); $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::helper('magesms')->getCustomerCollection(); $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('entity_id', array('in' => $this->_filters->getCache()->getCustomers()->getIds())); foreach($iff7e46827cbb6547116c592bf800f4687428abf9 as $i705fa7c9639d497e1179d7d5691c212668a8c9c8) { $i705fa7c9639d497e1179d7d5691c212668a8c9c8->setDetailUrl(Mage::helper("adminhtml")->getUrl('adminhtml/customer/edit', array('id' => $i705fa7c9639d497e1179d7d5691c212668a8c9c8->getId()))); $i705fa7c9639d497e1179d7d5691c212668a8c9c8->setRemoveUrl($this->getUrl('*/*/filter', array('action' => 'removeCustomer', 'id' => $i705fa7c9639d497e1179d7d5691c212668a8c9c8->getId()))); } $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); return $i8ee45e0018a32fb1a855b82624506e35789cc4d2; } protected function _getCollection() { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::helper('magesms')->getCustomerCollection(); return $iff7e46827cbb6547116c592bf800f4687428abf9; } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/marketing') ->_title(Mage::helper('magesms')->__('SMS Marketing')) ; $i3358fd35282548f1f8ccafbf23d60a4ade466fd3 = '
|
31 |
Translator.add("Filter has been applied.", "'.$this->__('Filter has been applied.').'");
|
32 |
Translator.add("Filter has been saved.", "'.$this->__('Filter has been saved.').'");
|
33 |
Translator.add("Are you sure you want to reset the filter?", "'.$this->__('Are you sure you want to reset the filter?').'");
|
27 |
button: "%s_trig",
|
28 |
align: "Bl",
|
29 |
singleClick : true
|
30 |
+
});'; $i5e2f8ae4963934ca8fbc2fff6103b6356dd52c78 = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM); $i376a6873d4104d44a8d8f0acacfc41b40105e11f = Varien_Date::convertZendToStrFtime($i5e2f8ae4963934ca8fbc2fff6103b6356dd52c78, true, true); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('filter1', 'date', array( 'name' => 'filter[]', 'format' => $i5e2f8ae4963934ca8fbc2fff6103b6356dd52c78, 'value' => Mage::app()->getLocale()->date()->toString(), 'image' => Mage::getDesign()->getSkinUrl('images/grid-cal.gif'), )); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('note', 'note', array( 'text' => Mage::helper('magesms')->__('to: '), )); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('filter2', 'date', array( 'name' => 'filter[]', 'format' => $i5e2f8ae4963934ca8fbc2fff6103b6356dd52c78, 'value' => Mage::app()->getLocale()->date()->toString(), 'image' => Mage::getDesign()->getSkinUrl('images/grid-cal.gif'), )); $i8114d84b871449f246242a4433e364f848daff0c[] = sprintf($i03474abc9cad4f5c29a2f0bca70a29051a128bc9, 'filter1', $i376a6873d4104d44a8d8f0acacfc41b40105e11f, 'filter1'); $i8114d84b871449f246242a4433e364f848daff0c[] = sprintf($i03474abc9cad4f5c29a2f0bca70a29051a128bc9, 'filter2', $i376a6873d4104d44a8d8f0acacfc41b40105e11f, 'filter2'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setJs($i8114d84b871449f246242a4433e364f848daff0c); break; case 'birthdayall': $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('note1', 'note', array( 'text' => Mage::helper('magesms')->__('day').': ', )); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('filter1', 'select', array( 'name' => 'filter[]', 'values' => array_combine(range(1, 31), range(1, 31)), )); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('note2', 'note', array( 'text' => Mage::helper('magesms')->__('month').': ', )); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('filter2', 'select', array( 'name' => 'filter[]', 'values' => array_combine(range(1, 12), range(1, 12)), )); break; } $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($i1791b2d1f89bb2bd83b34046f59125af207713db->getHtml()); } } break; case 'applyFilter': $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('value'); if (is_array($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) && count($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) == 1) $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89 = $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89[0]; if (($i2bd9743336318d0e14be0600c9129730279505dd = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('name')) && $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89 !== '') { $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 = Mage::getModel('magesms/marketing_filter_collection'); $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2->addApplyFilter($i2bd9743336318d0e14be0600c9129730279505dd, $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); $this->f6d43ff809a46f71c1e634564f2b37e20a99bbb9c(); $i21e55df616c305955791876c1eb4da83448beba2 = $this->_getBlockCustomer(); $i1791b2d1f89bb2bd83b34046f59125af207713db = $this->getLayout()->createBlock('magesms/marketing_form'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml( array( 'appliedFilters' => $i1791b2d1f89bb2bd83b34046f59125af207713db->getHtmlFilters(), 'customers' => $i21e55df616c305955791876c1eb4da83448beba2->toHtml(), 'count' => $this->_collection->count() )); } break; case 'removeFilter': $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('id'); if (is_numeric($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)) { $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 = Mage::getModel('magesms/marketing_filter_collection'); $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2->removeFilter($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); $this->f6d43ff809a46f71c1e634564f2b37e20a99bbb9c(); $i21e55df616c305955791876c1eb4da83448beba2 = $this->_getBlockCustomer(); $i9e86252a333eb6c832bb895a8d1690c48b2ed3fd = $this->_getBlockDeleted(); $i1791b2d1f89bb2bd83b34046f59125af207713db = $this->getLayout()->createBlock('magesms/marketing_form'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml( array( 'appliedFilters' => $i1791b2d1f89bb2bd83b34046f59125af207713db->getHtmlFilters(), 'customers' => $i21e55df616c305955791876c1eb4da83448beba2->toHtml(), 'deleted' => $i9e86252a333eb6c832bb895a8d1690c48b2ed3fd->toHtml(), 'count' => $this->_collection->count() )); } break; case 'listCustomers': if ($i47b2a41e4081b6f8d8381f411087dcd7042bfb53 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('letter')) { $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 = Mage::getModel('magesms/marketing_filter_collection'); $this->f6d43ff809a46f71c1e634564f2b37e20a99bbb9c(); $this->_collection->addFieldToFilter('lastname', array('like' => $i47b2a41e4081b6f8d8381f411087dcd7042bfb53.'%')); $i21e55df616c305955791876c1eb4da83448beba2 = $this->getBlockCustomer(); $i21e55df616c305955791876c1eb4da83448beba2->setCollection($this->_collection); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($i21e55df616c305955791876c1eb4da83448beba2->toHtml()); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setType('customer'); } break; case 'removeCustomer': if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('id')) { $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 = Mage::getModel('magesms/marketing_filter_collection'); $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2->addRemoveCustomer($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); $this->f6d43ff809a46f71c1e634564f2b37e20a99bbb9c(); $ib1285cda66d7403b4e0132565b5359295c62d58c = clone $this->_collection; $i21e55df616c305955791876c1eb4da83448beba2 = $this->_getBlockCustomer(); $i9e86252a333eb6c832bb895a8d1690c48b2ed3fd = $this->_getBlockDeleted(); $id82aaf2f437652c4b6efbd55703199f614e8e516 = array( 'customers' => $i21e55df616c305955791876c1eb4da83448beba2->toHtml(), 'deleted' => $i9e86252a333eb6c832bb895a8d1690c48b2ed3fd->toHtml(), 'count' => $this->_collection->count() ); if ($i47b2a41e4081b6f8d8381f411087dcd7042bfb53 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('letter')) { $ib1285cda66d7403b4e0132565b5359295c62d58c->addFieldToFilter('lastname', array('like' => $i47b2a41e4081b6f8d8381f411087dcd7042bfb53.'%')); $i2ca8461421e371a2dc8ff5b5c9a248f5fb0a6dbc = $this->getBlockCustomer(); $i2ca8461421e371a2dc8ff5b5c9a248f5fb0a6dbc->setCollection($ib1285cda66d7403b4e0132565b5359295c62d58c); $id82aaf2f437652c4b6efbd55703199f614e8e516['customer_letter'] = $i2ca8461421e371a2dc8ff5b5c9a248f5fb0a6dbc->toHtml(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setType('customer'); } $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($id82aaf2f437652c4b6efbd55703199f614e8e516); } break; case 'reset': $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 = Mage::getModel('magesms/marketing_filter_collection'); $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2->resetFilter(); $this->f6d43ff809a46f71c1e634564f2b37e20a99bbb9c(); $i21e55df616c305955791876c1eb4da83448beba2 = $this->_getBlockCustomer(); $i9e86252a333eb6c832bb895a8d1690c48b2ed3fd = $this->_getBlockDeleted(); $i1791b2d1f89bb2bd83b34046f59125af207713db = $this->getLayout()->createBlock('magesms/marketing_form'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml( array( 'appliedFilters' => $i1791b2d1f89bb2bd83b34046f59125af207713db->getHtmlFilters(), 'customers' => $i21e55df616c305955791876c1eb4da83448beba2->toHtml(), 'deleted' => $i9e86252a333eb6c832bb895a8d1690c48b2ed3fd->toHtml(), 'count' => $this->_collection->count() )); break; } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } protected function _popup($iacea0d13bc5e2676192c06d68cb091dc0ce26320 = true) { $id82aaf2f437652c4b6efbd55703199f614e8e516 = ''; if ($iacea0d13bc5e2676192c06d68cb091dc0ce26320) { $i1791b2d1f89bb2bd83b34046f59125af207713db = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'magesms_marketing_templateform', array('template' => 'topefekt/magesms/marketing/form.phtml') ); $id82aaf2f437652c4b6efbd55703199f614e8e516 = $i1791b2d1f89bb2bd83b34046f59125af207713db->toHtml(); } $i42cf41da37138d64d37b0778e6561aab5e1239d6 = $this->getLayout()->createBlock('magesms/marketing_template'); return $id82aaf2f437652c4b6efbd55703199f614e8e516.$i42cf41da37138d64d37b0778e6561aab5e1239d6->toHtml(); } public function sendAction() { if ( $this->getRequest()->getPost() ) { try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('text'); $ifc17de93671eea5715520ecfbc4dc543818685b8 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('unique') ? true : false; $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('unicode') ? true : false; $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f = Mage::getModel('magesms/sms'); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setMessage($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa) ->setType(Topefekt_Magesms_Model_Sms::TYPE_MARKETING) ->setPriority(false) ->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd) ->setUnique($ifc17de93671eea5715520ecfbc4dc543818685b8); if ($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('sendlater') && $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl')) { $i4c323947385ff52539168f26084feed4bc17e2dc = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl'); $i6aa8d50211ad373efab0896425f6f5fa0e013c29 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl_hour'); $if8001c570b9f0e904df8b36797628015beb8fa80 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl_min'); $i836a3cd8c554d1c35cc3c6cf3e3f49052b683096 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datereal', 0); $i4c323947385ff52539168f26084feed4bc17e2dc = strtotime("$i4c323947385ff52539168f26084feed4bc17e2dc $i6aa8d50211ad373efab0896425f6f5fa0e013c29:$if8001c570b9f0e904df8b36797628015beb8fa80:00") + 3600*$i836a3cd8c554d1c35cc3c6cf3e3f49052b683096; $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setSendlater($i4c323947385ff52539168f26084feed4bc17e2dc); } $this->f6d43ff809a46f71c1e634564f2b37e20a99bbb9c(); foreach($this->_collection as $iff7e46827cbb6547116c592bf800f4687428abf9) { if ($iff7e46827cbb6547116c592bf800f4687428abf9->getWebsiteId()) { $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc = Mage::getModel('core/website')->load($iff7e46827cbb6547116c592bf800f4687428abf9->getWebsiteId()); $ic5616185277631275bc74b85565c0c6eed62a3cd = $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getDefaultStore()->getId(); } else { $ic5616185277631275bc74b85565c0c6eed62a3cd = null; } $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->addRecipient($iff7e46827cbb6547116c592bf800f4687428abf9->getTelephone(), array( 'country' => $iff7e46827cbb6547116c592bf800f4687428abf9->getCountryId(), 'customerId' => $iff7e46827cbb6547116c592bf800f4687428abf9->getId(), 'recipient' => $iff7e46827cbb6547116c592bf800f4687428abf9->getFirstname().' '.$iff7e46827cbb6547116c592bf800f4687428abf9->getLastname(), 'text' => $this->_prepareText($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $ic5616185277631275bc74b85565c0c6eed62a3cd, $iff7e46827cbb6547116c592bf800f4687428abf9), ) ); } $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->send(); $this->_redirectReferer(); } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->indexAction(); } } else { $this->_redirect('*/*/index'); } return $this; } protected function _getBlockCustomer() { $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock('magesms/marketing_customer'); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setCollection($this->_collection); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setTitle(Mage::helper('magesms')->__('Customers found: ')); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setId('customer'); return $i8ee45e0018a32fb1a855b82624506e35789cc4d2; } protected function _getBlockDeleted() { $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock('magesms/marketing_customer'); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setDeleteCustomer(true); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setTitle(Mage::helper('magesms')->__('Removed Customers: ')); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setId('deleted'); $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::helper('magesms')->getCustomerCollection(); $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('entity_id', array('in' => $this->_filters->getCache()->getCustomers()->getIds())); foreach($iff7e46827cbb6547116c592bf800f4687428abf9 as $i705fa7c9639d497e1179d7d5691c212668a8c9c8) { $i705fa7c9639d497e1179d7d5691c212668a8c9c8->setDetailUrl(Mage::helper("adminhtml")->getUrl('adminhtml/customer/edit', array('id' => $i705fa7c9639d497e1179d7d5691c212668a8c9c8->getId()))); $i705fa7c9639d497e1179d7d5691c212668a8c9c8->setRemoveUrl($this->getUrl('*/*/filter', array('action' => 'removeCustomer', 'id' => $i705fa7c9639d497e1179d7d5691c212668a8c9c8->getId()))); } $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); return $i8ee45e0018a32fb1a855b82624506e35789cc4d2; } protected function _getCollection() { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::helper('magesms')->getCustomerCollection(); return $iff7e46827cbb6547116c592bf800f4687428abf9; } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/marketing') ->_title(Mage::helper('magesms')->__('SMS Marketing')) ; $i3358fd35282548f1f8ccafbf23d60a4ade466fd3 = '
|
31 |
Translator.add("Filter has been applied.", "'.$this->__('Filter has been applied.').'");
|
32 |
Translator.add("Filter has been saved.", "'.$this->__('Filter has been saved.').'");
|
33 |
Translator.add("Are you sure you want to reset the filter?", "'.$this->__('Are you sure you want to reset the filter?').'");
|
app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/WizardController.php
CHANGED
@@ -13,4 +13,4 @@
|
|
13 |
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
|
14 |
* @license http://opensource.org/licenses/BSD-3-Clause
|
15 |
*/
|
16 |
-
class Topefekt_Magesms_Adminhtml_Magesms_WizardController extends Topefekt_Magesms_Controller_Action { public $confirmsms; protected function _construct() { parent::_construct(); $this->confirmsms = Mage::helper('magesms')->__('Confirmation code: '); } public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/wizard.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); if (!Mage::app()->loadCache('magesms_pricelist_update') || Mage::app()->loadCache('magesms_pricelist_update') != date('Y-m-d')) { Mage::app()->saveCache(date('Y-m-d'), 'magesms_pricelist_update'); $this->updatepricelistAction(); } return $this; } public function editAction() { $ia118aa93019887b74fdff43dbcf59dce271cae7d = $this->getRequest()->getParam('country0'); $i30f20aafde612a957f7f966cb5b85e35782bc88a = $this->getRequest()->getParam('type'); $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 = true; if ($ia118aa93019887b74fdff43dbcf59dce271cae7d && $i30f20aafde612a957f7f966cb5b85e35782bc88a) { $i037b855bc01175f2c77d5c3e19eda9a0003feff4 = Mage::getSingleton('magesms/country_area')->getCollection()->addFilter('country_name', $ia118aa93019887b74fdff43dbcf59dce271cae7d); if ($i037b855bc01175f2c77d5c3e19eda9a0003feff4->count()) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'action=dost&username='.urlencode($this->profile->user->user).'&password='.urlencode($this->profile->user->passwd). '&area='.urlencode($i037b855bc01175f2c77d5c3e19eda9a0003feff4->getFirstItem()->getArea()).'¤cy='.urlencode($this->profile->currency); $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getModel('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1 && !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getModel('magesms/routes'); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setInfo($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['datasrc']); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setArea($i037b855bc01175f2c77d5c3e19eda9a0003feff4->getFirstItem()->getArea()); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setType($i30f20aafde612a957f7f966cb5b85e35782bc88a); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setAreaText($ia118aa93019887b74fdff43dbcf59dce271cae7d); Mage::register('routes', $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec); } else { $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 = false; } } else { $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 = false; } } if ($i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4) { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/wizard-edit.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } Mage::getSingleton('adminhtml/session')->addError($this->__('Unable to find a Route to load.')); $this->_redirect('*/*/'); } public function deleteAction() { if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $this->getRequest()->getParam('id')) { try { $ice10b700e3771fcda63608142bce93b608228583 = Mage::getModel('magesms/routes')->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); $ice10b700e3771fcda63608142bce93b608228583->delete(); Mage::getSingleton('adminhtml/session')->addSuccess($ice10b700e3771fcda63608142bce93b608228583->getAreaText().$this->__(' was deleted.')); $this->_redirect('*/*/'); return; } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($this->__($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage())); $this->_redirect('*/*/'); return; } } Mage::getSingleton('adminhtml/session')->addError($this->__('Unable to find a Route to delete.')); $this->_redirect('*/*/'); } public function addcountrycustomerAction() { $this->getRequest()->setParam('type', 'customer'); $this->addcountryAction(); } public function addcountryadminAction() { $this->getRequest()->setParam('type', 'admin'); $this->addcountryAction(); } public function addcountryAction() { $ia118aa93019887b74fdff43dbcf59dce271cae7d = $this->getRequest()->getParam('country0'); $i30f20aafde612a957f7f966cb5b85e35782bc88a = $this->getRequest()->getParam('type'); if ($ia118aa93019887b74fdff43dbcf59dce271cae7d && $i30f20aafde612a957f7f966cb5b85e35782bc88a) { try { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getSingleton('magesms/routes')->getCollection(); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->addFilter('area_text', $ia118aa93019887b74fdff43dbcf59dce271cae7d)->addFilter('type', $i30f20aafde612a957f7f966cb5b85e35782bc88a); if ($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->count()) { $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getFirstItem()->getId(); $this->_redirect('*/*/edit', array('id'=>$i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)); return; } $this->_redirect('*/*/edit', array('country0'=>$ia118aa93019887b74fdff43dbcf59dce271cae7d, 'type'=>$i30f20aafde612a957f7f966cb5b85e35782bc88a, 'id'=>0)); return; } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($this->__($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage())); $this->_redirect('*/*/'); return; } } Mage::getSingleton('adminhtml/session')->addError($this->__('Unable to find a Route to load.')); $this->_redirect('*/*/'); } public function addrouteAction() { if (Mage::getSingleton('adminhtml/session')->hasData('routes')) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getSingleton('adminhtml/session')->getData('routes'); $this->_redirect('*/*/addroutesender'); } else { Mage::getSingleton('adminhtml/session')->addSuccess(Mage::getSingleton('adminhtml/session')->getData('routesuccess').$this->__(' was saved.')); Mage::getSingleton('adminhtml/session')->unsetData('routesuccess'); $this->_redirect('*/*/index'); } } public function addroutesenderAction() { if (Mage::getSingleton('adminhtml/session')->hasData('routes')) { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/wizard-sender.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } else { $this->_redirect('*/*/index'); } } public function validateAction($i5ba2c5364d6756af3701b475c0706df889a2545f = false) { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getModel('magesms/routes'); if ($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('id')) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->load($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('id')); } $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setArea($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('area')); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setAreaText($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('country0')); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setType($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('type')); $iecc25823227283479c5811005734b6ee2bd56071 = explode(';', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('isms')); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setIsms($iecc25823227283479c5811005734b6ee2bd56071[0]); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setSendertype($iecc25823227283479c5811005734b6ee2bd56071[1]); $ibdd27a8dd714410289189d318feb96fe6ed8e07f = $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->validate(); if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } else { if ($i5ba2c5364d6756af3701b475c0706df889a2545f === true) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->save(); } else { if ($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getSendertype() == Topefekt_Magesms_Model_Routes::SENDER_SYSTEM || $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getSendertype() == Topefekt_Magesms_Model_Routes::SENDER_SIM) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setData('senderID', ''); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->save(); Mage::getSingleton('adminhtml/session')->unsetData('routes'); Mage::getSingleton('adminhtml/session')->setData('routesuccess', $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getAreaText()); } else { Mage::getSingleton('adminhtml/session')->setData('routes', $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec); } } } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->_initLayoutMessages('adminhtml/session'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } public function validatesenderAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getSingleton('adminhtml/session')->getData('routes'); if ($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->displayCode !== true) { $i1b3f50fe6674f47cc7c1967f93ff153879178f04 = trim(($i51c6d8e5b3a92b4b73711680253408ec6d3d25f6 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('sender')) ? $i51c6d8e5b3a92b4b73711680253408ec6d3d25f6 : $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('newsender')); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setData('senderID', $i1b3f50fe6674f47cc7c1967f93ff153879178f04); } else { $id3e549697752385571e09ffe4add9278d2d6923b = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('code'); $i1b3f50fe6674f47cc7c1967f93ff153879178f04 = $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getData('senderID'); } $ibdd27a8dd714410289189d318feb96fe6ed8e07f = $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->validate(true); if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } else { $i47f954bfb9dd4be93a5c46b2c8260d3fbc064235 = Mage::getModel('core/resource_transaction') ->addObject($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec); if ($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getSendertype() == Topefekt_Magesms_Model_Routes::SENDER_OWN) { $i451f679eaafeecb81387b150019f0d9e0fa83d16 = Mage::getModel('magesms/api'); if ($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->displayCode !== true) { $i74c7f58458d186850e8386ae20067ea0a7958311 = $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getGate($i1b3f50fe6674f47cc7c1967f93ff153879178f04, 'admin'); $i9e1925546463c5a41ccbc625ed973556cc86a495 = ''; if(!$i74c7f58458d186850e8386ae20067ea0a7958311->isEmpty()): $i9e1925546463c5a41ccbc625ed973556cc86a495 = base64_decode("JmlzbXM9").urlencode($i74c7f58458d186850e8386ae20067ea0a7958311->getIsms()).base64_decode("JnNlbmRlcj0=").urlencode($i74c7f58458d186850e8386ae20067ea0a7958311->getData('senderID')); endif; $ia61712c27ea241bd7a543dc2b02ea572274d0322 = "action=checksenderID&text_sms=".urlencode($this->confirmsms).base64_decode("JnVzZXJuYW1lPQ==").urlencode($this->profile->user->user). base64_decode("JnBhc3N3b3JkPQ==").urlencode($this->profile->user->passwd).base64_decode("JnNlbmRlcklEPQ==").urlencode($i1b3f50fe6674f47cc7c1967f93ff153879178f04).$i9e1925546463c5a41ccbc625ed973556cc86a495; $ia61712c27ea241bd7a543dc2b02ea572274d0322 = $i451f679eaafeecb81387b150019f0d9e0fa83d16->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if (in_array($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'], array(1, 11))) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b = Mage::getSingleton('magesms/smshistory'); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNumber('+'.$i1b3f50fe6674f47cc7c1967f93ff153879178f04); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setDate(date('Y-m-d h:i:s', Mage::getModel('core/date')->timestamp(time()))); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setText($this->confirmsms); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(1); list($ie10d5ed46013be2962a9d08e0e1912a9c56891b4, $i58457975a91d59a84d2920953badcb7365ac1f01, $if928b7780c12c52495a2f84d8c183269cfcb7c63) = explode("__", $ia61712c27ea241bd7a543dc2b02ea572274d0322['datasrc']); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setPrice($i58457975a91d59a84d2920953badcb7365ac1f01); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setCredit($if928b7780c12c52495a2f84d8c183269cfcb7c63); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSender($i74c7f58458d186850e8386ae20067ea0a7958311->getData('senderID')); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setUnicode(0); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setType(Topefekt_Magesms_Model_Sms::TYPE_ADMIN); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSmsid($ie10d5ed46013be2962a9d08e0e1912a9c56891b4); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setTotal(1); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->save(); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->displayCode = true; Mage::getSingleton('adminhtml/session')->setData('routes', $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 111) { } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 3 && $ia61712c27ea241bd7a543dc2b02ea572274d0322['error'] == 9) { Mage::throwException(Mage::helper('magesms')->__('error - wrong number or unavailable')); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 3 && $ia61712c27ea241bd7a543dc2b02ea572274d0322['error'] == 10) { Mage::throwException(Mage::helper('magesms')->__('error - low credit for sending validation SMS')); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 3 && $ia61712c27ea241bd7a543dc2b02ea572274d0322['error'] == 15) { Mage::throwException(Mage::helper('magesms')->__('error - unauthorized senderID in confirmation sms')); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 3) { Mage::throwException(Mage::helper('magesms')->__('error - '.$ia61712c27ea241bd7a543dc2b02ea572274d0322['error'])); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 4) { Mage::throwException(Mage::helper('magesms')->__('login error')); } else { Mage::throwException(Mage::helper('magesms')->__('can not connect to SMS server').' '.$ia61712c27ea241bd7a543dc2b02ea572274d0322['error']); } } else { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = "action=checksenderIDcode&username=".urlencode($this->profile->user->user).base64_decode("JnBhc3N3b3JkPQ==").urlencode($this->profile->user->passwd). base64_decode("JmNvZGU9").urlencode($id3e549697752385571e09ffe4add9278d2d6923b).base64_decode("JnNlbmRlcklEPQ==").urlencode($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getData('senderID')); $ia61712c27ea241bd7a543dc2b02ea572274d0322 = $i451f679eaafeecb81387b150019f0d9e0fa83d16->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 1) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->displayCode = false; } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 3) { Mage::throwException(Mage::helper('magesms')->__('error - ').$ia61712c27ea241bd7a543dc2b02ea572274d0322['error']); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 4) { Mage::throwException(Mage::helper('magesms')->__('login error')); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 5) { Mage::throwException(Mage::helper('magesms')->__('correctly confirm sms code')); } else { Mage::throwException(Mage::helper('magesms')->__('can not connect to SMS server')); } } $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd = 'ownnumbersender'; } else { $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd = 'textsender'; } if ($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->displayCode !== true) { $i5b2de9a29c087ac444f7af969b9863250e38aa27 = Mage::getSingleton('magesms/'.$i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd)->getCollection()->addFilter('val', $i1b3f50fe6674f47cc7c1967f93ff153879178f04)->getFirstItem(); $i0a2378e8d343fdb890a9c568b07c541a35a12341 = Mage::getSingleton('magesms/'.$i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd)->load($i5b2de9a29c087ac444f7af969b9863250e38aa27->getId())->setVal($i1b3f50fe6674f47cc7c1967f93ff153879178f04); $i47f954bfb9dd4be93a5c46b2c8260d3fbc064235->addObject($i0a2378e8d343fdb890a9c568b07c541a35a12341) ->save(); Mage::getSingleton('adminhtml/session')->unsetData('routes'); if ($i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd == 'textsender') { Mage::getSingleton('adminhtml/session')->setData('routesuccess', $this->__('Text sender ID for ').$ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getAreaText().$this->__(' was saved.')); } else { Mage::getSingleton('adminhtml/session')->setData('routesuccess', $this->__('Own number sender ID for ').$ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getAreaText().$this->__(' was saved.')); } } } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->_initLayoutMessages('adminhtml/session'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } public function savesenderAction() { if (Mage::getSingleton('adminhtml/session')->hasData('routes')) { $this->_redirect('*/*/addroutesender'); } else { Mage::getSingleton('adminhtml/session')->addSuccess(Mage::getSingleton('adminhtml/session')->getData('routesuccess')); Mage::getSingleton('adminhtml/session')->unsetData('routesuccess'); $this->_redirect('*/*/index'); } } public function updatepricelistAction() { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getSingleton('magesms/routes')->updatepricelist($this->profile->currency); Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Pricelist was successfully updated.')); $this->_redirect('*/*/index'); } public function alternativeAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/wizard-alternative.phtml') ); $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $this->getRequest()->getParam('id'); $ice10b700e3771fcda63608142bce93b608228583 = Mage::getModel('magesms/routes')->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); if ($ice10b700e3771fcda63608142bce93b608228583->getSendertype() == Topefekt_Magesms_Model_Routes::SENDER_TEXT) { $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setRoute($ice10b700e3771fcda63608142bce93b608228583); $ie7d1444276fe9dee937fd96d6e0519397fdc5701 = Mage::getModel('core/store_group')->getCollection()->setLoadDefault(false); $i9bd2c88ca2206122845c5e189e2b6856a2409e3a = Mage::getModel('magesms/routes_alternative')->getCollection()->addFieldToFilter('route_id', $ice10b700e3771fcda63608142bce93b608228583->getId()); foreach($ie7d1444276fe9dee937fd96d6e0519397fdc5701 as $i7079b107a03c03d74ad14b853dad74b85b2d25d1) { $i7079b107a03c03d74ad14b853dad74b85b2d25d1->setTextsender($ice10b700e3771fcda63608142bce93b608228583->getData('senderID')); foreach($i9bd2c88ca2206122845c5e189e2b6856a2409e3a as $ida3b491904fb073f446bf820cd55a0ff69b347d1) { if ($ida3b491904fb073f446bf820cd55a0ff69b347d1->getStoreGroupId() == $i7079b107a03c03d74ad14b853dad74b85b2d25d1->getId()) { $i7079b107a03c03d74ad14b853dad74b85b2d25d1->setTextsenderAlternative($ida3b491904fb073f446bf820cd55a0ff69b347d1->getTextsender()); break; } } } $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setStores($ie7d1444276fe9dee937fd96d6e0519397fdc5701); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } $this->_redirect('*/*/index'); } public function validatesenderalternativeAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { $i75cfaf6baf7d451ab67af9aeef048aecfea24a82 = Mage::getModel('core/resource_transaction'); try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $i9bd2c88ca2206122845c5e189e2b6856a2409e3a = Mage::getModel('magesms/routes_alternative')->getCollection()->addFieldToFilter('route_id', $this->getRequest()->getParam('id')); $if2edf17aeebbb7b610065024e328c82ec7b37bbe = $iacbd1c78463510856e506611fe14b5e1173581a6->getParam('store_group'); foreach($i9bd2c88ca2206122845c5e189e2b6856a2409e3a as $ida3b491904fb073f446bf820cd55a0ff69b347d1) { $if433319f9b66f967b64d332ee0b51bea06276d26 = false; foreach($if2edf17aeebbb7b610065024e328c82ec7b37bbe as $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66=>$i340682ca0ed5a64e8ea449191da847abaf0aec6f) { if ($ida3b491904fb073f446bf820cd55a0ff69b347d1->getStoreGroupId() == $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66) { $if433319f9b66f967b64d332ee0b51bea06276d26 = true; if ($ida3b491904fb073f446bf820cd55a0ff69b347d1->getTextsender() != $i340682ca0ed5a64e8ea449191da847abaf0aec6f) { if (!$i340682ca0ed5a64e8ea449191da847abaf0aec6f) { $ida3b491904fb073f446bf820cd55a0ff69b347d1->isDeleted(true); } else { $ida3b491904fb073f446bf820cd55a0ff69b347d1->setTextsender($i340682ca0ed5a64e8ea449191da847abaf0aec6f); } } unset($if2edf17aeebbb7b610065024e328c82ec7b37bbe[$i3bf172bc34c83f4a18624b192bc0bd7c4d647a66]); break; } } if ($if433319f9b66f967b64d332ee0b51bea06276d26 !== true) $ida3b491904fb073f446bf820cd55a0ff69b347d1->isDeleted(true); $i75cfaf6baf7d451ab67af9aeef048aecfea24a82->addObject($ida3b491904fb073f446bf820cd55a0ff69b347d1); } foreach($if2edf17aeebbb7b610065024e328c82ec7b37bbe as $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66=>$i340682ca0ed5a64e8ea449191da847abaf0aec6f) { $ida3b491904fb073f446bf820cd55a0ff69b347d1 = Mage::getModel('magesms/routes_alternative'); $ida3b491904fb073f446bf820cd55a0ff69b347d1->setRouteId($this->getRequest()->getParam('id')); $ida3b491904fb073f446bf820cd55a0ff69b347d1->setStoreGroupId($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); $ida3b491904fb073f446bf820cd55a0ff69b347d1->setTextsender($i340682ca0ed5a64e8ea449191da847abaf0aec6f); $i75cfaf6baf7d451ab67af9aeef048aecfea24a82->addObject($ida3b491904fb073f446bf820cd55a0ff69b347d1); } $i75cfaf6baf7d451ab67af9aeef048aecfea24a82->save(); } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->_initLayoutMessages('adminhtml/session'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } public function savesenderalternativeAction() { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getModel('magesms/routes')->load($this->getRequest()->getParam('id')); Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Text sender ID for ').$ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getAreaText().$this->__(' was saved.')); $this->_redirect('*/*/index'); } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/wizard') ->_title(Mage::helper('magesms')->__('SMS Settings')) ; return $this; } }
|
13 |
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
|
14 |
* @license http://opensource.org/licenses/BSD-3-Clause
|
15 |
*/
|
16 |
+
class Topefekt_Magesms_Adminhtml_Magesms_WizardController extends Topefekt_Magesms_Controller_Action { public $confirmsms; protected function _construct() { parent::_construct(); $this->confirmsms = Mage::helper('magesms')->__('Confirmation code: '); } public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/wizard.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); if (!Mage::app()->loadCache('magesms_pricelist_update') || Mage::app()->loadCache('magesms_pricelist_update') != date('Y-m-d')) { Mage::app()->saveCache(date('Y-m-d'), 'magesms_pricelist_update'); $this->updatepricelistAction(); } return $this; } public function editAction() { $ia118aa93019887b74fdff43dbcf59dce271cae7d = $this->getRequest()->getParam('country0'); $i30f20aafde612a957f7f966cb5b85e35782bc88a = $this->getRequest()->getParam('type'); $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 = true; if ($ia118aa93019887b74fdff43dbcf59dce271cae7d && $i30f20aafde612a957f7f966cb5b85e35782bc88a) { $i037b855bc01175f2c77d5c3e19eda9a0003feff4 = Mage::getSingleton('magesms/country_area')->getCollection()->addFilter('country_name', $ia118aa93019887b74fdff43dbcf59dce271cae7d); if ($i037b855bc01175f2c77d5c3e19eda9a0003feff4->count()) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'action=dost&username='.urlencode($this->profile->user->user).'&password='.urlencode($this->profile->user->passwd). '&area='.urlencode($i037b855bc01175f2c77d5c3e19eda9a0003feff4->getFirstItem()->getArea()).'¤cy='.urlencode($this->profile->currency); $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getModel('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1 && !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getModel('magesms/routes'); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setInfo($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['datasrc']); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setArea($i037b855bc01175f2c77d5c3e19eda9a0003feff4->getFirstItem()->getArea()); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setType($i30f20aafde612a957f7f966cb5b85e35782bc88a); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setAreaText($ia118aa93019887b74fdff43dbcf59dce271cae7d); Mage::register('routes', $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec); } else { $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 = false; } } else { $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 = false; } } if ($i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4) { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/wizard-edit.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } Mage::getSingleton('adminhtml/session')->addError($this->__('Unable to find a Route to load.')); $this->_redirect('*/*/'); } public function deleteAction() { if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $this->getRequest()->getParam('id')) { try { $ice10b700e3771fcda63608142bce93b608228583 = Mage::getModel('magesms/routes')->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); $ice10b700e3771fcda63608142bce93b608228583->delete(); Mage::getSingleton('adminhtml/session')->addSuccess($ice10b700e3771fcda63608142bce93b608228583->getAreaText().$this->__(' was deleted.')); $this->_redirect('*/*/'); return; } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($this->__($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage())); $this->_redirect('*/*/'); return; } } Mage::getSingleton('adminhtml/session')->addError($this->__('Unable to find a Route to delete.')); $this->_redirect('*/*/'); } public function addcountrycustomerAction() { $this->getRequest()->setParam('type', 'customer'); $this->addcountryAction(); } public function addcountryadminAction() { $this->getRequest()->setParam('type', 'admin'); $this->addcountryAction(); } public function addcountryAction() { $ia118aa93019887b74fdff43dbcf59dce271cae7d = $this->getRequest()->getParam('country0'); $i30f20aafde612a957f7f966cb5b85e35782bc88a = $this->getRequest()->getParam('type'); if ($ia118aa93019887b74fdff43dbcf59dce271cae7d && $i30f20aafde612a957f7f966cb5b85e35782bc88a) { try { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getSingleton('magesms/routes')->getCollection(); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->addFilter('area_text', $ia118aa93019887b74fdff43dbcf59dce271cae7d)->addFilter('type', $i30f20aafde612a957f7f966cb5b85e35782bc88a); if ($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->count()) { $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getFirstItem()->getId(); $this->_redirect('*/*/edit', array('id'=>$i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)); return; } $this->_redirect('*/*/edit', array('country0'=>$ia118aa93019887b74fdff43dbcf59dce271cae7d, 'type'=>$i30f20aafde612a957f7f966cb5b85e35782bc88a, 'id'=>0)); return; } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($this->__($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage())); $this->_redirect('*/*/'); return; } } Mage::getSingleton('adminhtml/session')->addError($this->__('Unable to find a Route to load.')); $this->_redirect('*/*/'); } public function addrouteAction() { if (Mage::getSingleton('adminhtml/session')->hasData('routes')) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getSingleton('adminhtml/session')->getData('routes'); $this->_redirect('*/*/addroutesender'); } else { Mage::getSingleton('adminhtml/session')->addSuccess(Mage::getSingleton('adminhtml/session')->getData('routesuccess').$this->__(' was saved.')); Mage::getSingleton('adminhtml/session')->unsetData('routesuccess'); $this->_redirect('*/*/index'); } } public function addroutesenderAction() { if (Mage::getSingleton('adminhtml/session')->hasData('routes')) { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/wizard-sender.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } else { $this->_redirect('*/*/index'); } } public function validateAction($i5ba2c5364d6756af3701b475c0706df889a2545f = false) { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getModel('magesms/routes'); if ($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('id')) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->load($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('id')); } $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setArea($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('area')); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setAreaText($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('country0')); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setType($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('type')); $iecc25823227283479c5811005734b6ee2bd56071 = explode(';', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('isms')); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setIsms($iecc25823227283479c5811005734b6ee2bd56071[0]); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setSendertype($iecc25823227283479c5811005734b6ee2bd56071[1]); $ibdd27a8dd714410289189d318feb96fe6ed8e07f = $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->validate(); if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } else { if ($i5ba2c5364d6756af3701b475c0706df889a2545f === true) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->save(); } else { if ($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getSendertype() == Topefekt_Magesms_Model_Routes::SENDER_SYSTEM || $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getSendertype() == Topefekt_Magesms_Model_Routes::SENDER_SIM) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setData('senderID', ''); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->save(); Mage::getSingleton('adminhtml/session')->unsetData('routes'); Mage::getSingleton('adminhtml/session')->setData('routesuccess', $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getAreaText()); } else { Mage::getSingleton('adminhtml/session')->setData('routes', $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec); } } } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->_initLayoutMessages('adminhtml/session'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } public function validatesenderAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getSingleton('adminhtml/session')->getData('routes'); if ($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->displayCode !== true) { $i1b3f50fe6674f47cc7c1967f93ff153879178f04 = trim(($i51c6d8e5b3a92b4b73711680253408ec6d3d25f6 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('sender')) ? $i51c6d8e5b3a92b4b73711680253408ec6d3d25f6 : $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('newsender')); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setData('senderID', $i1b3f50fe6674f47cc7c1967f93ff153879178f04); } else { $id3e549697752385571e09ffe4add9278d2d6923b = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('code'); $i1b3f50fe6674f47cc7c1967f93ff153879178f04 = $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getData('senderID'); } $ibdd27a8dd714410289189d318feb96fe6ed8e07f = $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->validate(true); if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } else { $i47f954bfb9dd4be93a5c46b2c8260d3fbc064235 = Mage::getModel('core/resource_transaction') ->addObject($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec); if ($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getSendertype() == Topefekt_Magesms_Model_Routes::SENDER_OWN) { $i451f679eaafeecb81387b150019f0d9e0fa83d16 = Mage::getModel('magesms/api'); if ($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->displayCode !== true) { $i74c7f58458d186850e8386ae20067ea0a7958311 = $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getGate($i1b3f50fe6674f47cc7c1967f93ff153879178f04, 'admin'); $i9e1925546463c5a41ccbc625ed973556cc86a495 = ''; if(!$i74c7f58458d186850e8386ae20067ea0a7958311->isEmpty()): $i9e1925546463c5a41ccbc625ed973556cc86a495 = base64_decode("JmlzbXM9").urlencode($i74c7f58458d186850e8386ae20067ea0a7958311->getIsms()).base64_decode("JnNlbmRlcj0=").urlencode($i74c7f58458d186850e8386ae20067ea0a7958311->getData('senderID')); endif; $ia61712c27ea241bd7a543dc2b02ea572274d0322 = "action=checksenderID&text_sms=".urlencode($this->confirmsms).base64_decode("JnVzZXJuYW1lPQ==").urlencode($this->profile->user->user). base64_decode("JnBhc3N3b3JkPQ==").urlencode($this->profile->user->passwd).base64_decode("JnNlbmRlcklEPQ==").urlencode($i1b3f50fe6674f47cc7c1967f93ff153879178f04).$i9e1925546463c5a41ccbc625ed973556cc86a495; $ia61712c27ea241bd7a543dc2b02ea572274d0322 = $i451f679eaafeecb81387b150019f0d9e0fa83d16->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if (in_array($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'], array(1, 11))) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b = Mage::getSingleton('magesms/smshistory'); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNumber('+'.$i1b3f50fe6674f47cc7c1967f93ff153879178f04); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setDate(date('Y-m-d h:i:s', Mage::getModel('core/date')->timestamp(time()))); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setText($this->confirmsms); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(1); list($ie10d5ed46013be2962a9d08e0e1912a9c56891b4, $i58457975a91d59a84d2920953badcb7365ac1f01, $if928b7780c12c52495a2f84d8c183269cfcb7c63) = explode("__", $ia61712c27ea241bd7a543dc2b02ea572274d0322['datasrc']); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setPrice($i58457975a91d59a84d2920953badcb7365ac1f01); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setCredit($if928b7780c12c52495a2f84d8c183269cfcb7c63); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSender($i74c7f58458d186850e8386ae20067ea0a7958311->getData('senderID')); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setUnicode(0); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setType(Topefekt_Magesms_Model_Sms::TYPE_ADMIN); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSmsid($ie10d5ed46013be2962a9d08e0e1912a9c56891b4); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setTotal(1); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->save(); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->displayCode = true; Mage::getSingleton('adminhtml/session')->setData('routes', $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 111) { } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 3 && $ia61712c27ea241bd7a543dc2b02ea572274d0322['error'] == 9) { Mage::throwException(Mage::helper('magesms')->__('error - wrong number or unavailable')); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 3 && $ia61712c27ea241bd7a543dc2b02ea572274d0322['error'] == 10) { Mage::throwException(Mage::helper('magesms')->__('error - low credit for sending validation SMS')); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 3 && $ia61712c27ea241bd7a543dc2b02ea572274d0322['error'] == 15) { Mage::throwException(Mage::helper('magesms')->__('error - unauthorized senderID in confirmation sms')); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 3) { Mage::throwException(Mage::helper('magesms')->__('error - '.$ia61712c27ea241bd7a543dc2b02ea572274d0322['error'])); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 4) { Mage::throwException(Mage::helper('magesms')->__('login error')); } else { Mage::throwException(Mage::helper('magesms')->__('can not connect to SMS server').' '.$ia61712c27ea241bd7a543dc2b02ea572274d0322['error']); } } else { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = "action=checksenderIDcode&username=".urlencode($this->profile->user->user).base64_decode("JnBhc3N3b3JkPQ==").urlencode($this->profile->user->passwd). base64_decode("JmNvZGU9").urlencode($id3e549697752385571e09ffe4add9278d2d6923b).base64_decode("JnNlbmRlcklEPQ==").urlencode($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getData('senderID')); $ia61712c27ea241bd7a543dc2b02ea572274d0322 = $i451f679eaafeecb81387b150019f0d9e0fa83d16->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 1) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->displayCode = false; } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 3) { Mage::throwException(Mage::helper('magesms')->__('error - ').$ia61712c27ea241bd7a543dc2b02ea572274d0322['error']); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 4) { Mage::throwException(Mage::helper('magesms')->__('login error')); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 5) { Mage::throwException(Mage::helper('magesms')->__('correctly confirm sms code')); } else { Mage::throwException(Mage::helper('magesms')->__('can not connect to SMS server')); } } $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd = 'ownnumbersender'; } else { $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd = 'textsender'; } if ($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->displayCode !== true) { $i5b2de9a29c087ac444f7af969b9863250e38aa27 = Mage::getSingleton('magesms/'.$i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd)->getCollection()->addFilter('val', $i1b3f50fe6674f47cc7c1967f93ff153879178f04)->getFirstItem(); $i0a2378e8d343fdb890a9c568b07c541a35a12341 = Mage::getSingleton('magesms/'.$i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd)->load($i5b2de9a29c087ac444f7af969b9863250e38aa27->getId())->setVal($i1b3f50fe6674f47cc7c1967f93ff153879178f04); $i47f954bfb9dd4be93a5c46b2c8260d3fbc064235->addObject($i0a2378e8d343fdb890a9c568b07c541a35a12341) ->save(); Mage::getSingleton('adminhtml/session')->unsetData('routes'); if ($i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd == 'textsender') { Mage::getSingleton('adminhtml/session')->setData('routesuccess', $this->__('Text sender ID for ').$ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getAreaText().$this->__(' was saved.')); } else { Mage::getSingleton('adminhtml/session')->setData('routesuccess', $this->__('Own number sender ID for ').$ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getAreaText().$this->__(' was saved.')); } } } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->_initLayoutMessages('adminhtml/session'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } public function savesenderAction() { if (Mage::getSingleton('adminhtml/session')->hasData('routes')) { $this->_redirect('*/*/addroutesender'); } else { Mage::getSingleton('adminhtml/session')->addSuccess(Mage::getSingleton('adminhtml/session')->getData('routesuccess')); Mage::getSingleton('adminhtml/session')->unsetData('routesuccess'); $this->_redirect('*/*/index'); } } public function updatepricelistAction() { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getSingleton('magesms/routes')->updatepricelist($this->profile->currency); Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Pricelist was successfully updated.')); $this->_redirect('*/*/index'); } public function alternativeAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/wizard-alternative.phtml') ); $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $this->getRequest()->getParam('id'); $ice10b700e3771fcda63608142bce93b608228583 = Mage::getModel('magesms/routes')->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); if ($ice10b700e3771fcda63608142bce93b608228583->getSendertype() == Topefekt_Magesms_Model_Routes::SENDER_TEXT) { $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setRoute($ice10b700e3771fcda63608142bce93b608228583); $ie7d1444276fe9dee937fd96d6e0519397fdc5701 = Mage::getModel('core/store_group')->getCollection()->setLoadDefault(false); $i9bd2c88ca2206122845c5e189e2b6856a2409e3a = Mage::getModel('magesms/routes_alternative')->getCollection()->addFieldToFilter('route_id', $ice10b700e3771fcda63608142bce93b608228583->getId()); foreach($ie7d1444276fe9dee937fd96d6e0519397fdc5701 as $i7079b107a03c03d74ad14b853dad74b85b2d25d1) { $i7079b107a03c03d74ad14b853dad74b85b2d25d1->setTextsender($ice10b700e3771fcda63608142bce93b608228583->getData('senderID')); foreach($i9bd2c88ca2206122845c5e189e2b6856a2409e3a as $ida3b491904fb073f446bf820cd55a0ff69b347d1) { if ($ida3b491904fb073f446bf820cd55a0ff69b347d1->getStoreGroupId() == $i7079b107a03c03d74ad14b853dad74b85b2d25d1->getId()) { $i7079b107a03c03d74ad14b853dad74b85b2d25d1->setTextsenderAlternative($ida3b491904fb073f446bf820cd55a0ff69b347d1->getTextsender()); break; } } } $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setStores($ie7d1444276fe9dee937fd96d6e0519397fdc5701); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } $this->_redirect('*/*/index'); } public function validatesenderalternativeAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { $i75cfaf6baf7d451ab67af9aeef048aecfea24a82 = Mage::getModel('core/resource_transaction'); try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $i9bd2c88ca2206122845c5e189e2b6856a2409e3a = Mage::getModel('magesms/routes_alternative')->getCollection()->addFieldToFilter('route_id', $this->getRequest()->getParam('id')); $if2edf17aeebbb7b610065024e328c82ec7b37bbe = $iacbd1c78463510856e506611fe14b5e1173581a6->getParam('store_group'); $ice10b700e3771fcda63608142bce93b608228583 = Mage::getModel('magesms/routes')->load($this->getRequest()->getParam('id')); foreach($i9bd2c88ca2206122845c5e189e2b6856a2409e3a as $ida3b491904fb073f446bf820cd55a0ff69b347d1) { $if433319f9b66f967b64d332ee0b51bea06276d26 = false; foreach($if2edf17aeebbb7b610065024e328c82ec7b37bbe as $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66=>$i340682ca0ed5a64e8ea449191da847abaf0aec6f) { if ($ida3b491904fb073f446bf820cd55a0ff69b347d1->getStoreGroupId() == $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66) { $if433319f9b66f967b64d332ee0b51bea06276d26 = true; if ($ida3b491904fb073f446bf820cd55a0ff69b347d1->getTextsender() != $i340682ca0ed5a64e8ea449191da847abaf0aec6f || $ice10b700e3771fcda63608142bce93b608228583->getData('senderID') == $i340682ca0ed5a64e8ea449191da847abaf0aec6f) { if (!$i340682ca0ed5a64e8ea449191da847abaf0aec6f || $ice10b700e3771fcda63608142bce93b608228583->getData('senderID') == $i340682ca0ed5a64e8ea449191da847abaf0aec6f) { $ida3b491904fb073f446bf820cd55a0ff69b347d1->isDeleted(true); } else { $ida3b491904fb073f446bf820cd55a0ff69b347d1->setTextsender($i340682ca0ed5a64e8ea449191da847abaf0aec6f); } } unset($if2edf17aeebbb7b610065024e328c82ec7b37bbe[$i3bf172bc34c83f4a18624b192bc0bd7c4d647a66]); break; } } if ($if433319f9b66f967b64d332ee0b51bea06276d26 !== true) $ida3b491904fb073f446bf820cd55a0ff69b347d1->isDeleted(true); $i75cfaf6baf7d451ab67af9aeef048aecfea24a82->addObject($ida3b491904fb073f446bf820cd55a0ff69b347d1); } foreach($if2edf17aeebbb7b610065024e328c82ec7b37bbe as $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66=>$i340682ca0ed5a64e8ea449191da847abaf0aec6f) { if ($ice10b700e3771fcda63608142bce93b608228583->getData('senderID') == $i340682ca0ed5a64e8ea449191da847abaf0aec6f) continue; $ida3b491904fb073f446bf820cd55a0ff69b347d1 = Mage::getModel('magesms/routes_alternative'); $ida3b491904fb073f446bf820cd55a0ff69b347d1->setRouteId($this->getRequest()->getParam('id')); $ida3b491904fb073f446bf820cd55a0ff69b347d1->setStoreGroupId($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); $ida3b491904fb073f446bf820cd55a0ff69b347d1->setTextsender($i340682ca0ed5a64e8ea449191da847abaf0aec6f); $i75cfaf6baf7d451ab67af9aeef048aecfea24a82->addObject($ida3b491904fb073f446bf820cd55a0ff69b347d1); } $i75cfaf6baf7d451ab67af9aeef048aecfea24a82->save(); } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->_initLayoutMessages('adminhtml/session'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } public function savesenderalternativeAction() { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getModel('magesms/routes')->load($this->getRequest()->getParam('id')); Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Text sender ID for ').$ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getAreaText().$this->__(' was saved.')); $this->_redirect('*/*/index'); } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/wizard') ->_title(Mage::helper('magesms')->__('SMS Settings')) ; return $this; } }
|
app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.2.0-1.2.1.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Mage SMS - SMS notification & SMS marketing
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the BSD 3-Clause License
|
8 |
+
* It is available through the world-wide-web at this URL:
|
9 |
+
* http://opensource.org/licenses/BSD-3-Clause
|
10 |
+
*
|
11 |
+
* @category TOPefekt
|
12 |
+
* @package TOPefekt_Magesms
|
13 |
+
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
|
14 |
+
* @license http://opensource.org/licenses/BSD-3-Clause
|
15 |
+
*/
|
16 |
+
$iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $i0933475b5bd80561a9f50282fd9eb0b8345cec4b = Mage::getModel('magesms/variables')->getCollection()->addFieldToFilter('name', 'order_payment_html'); if (!$i0933475b5bd80561a9f50282fd9eb0b8345cec4b->count()) { Mage::getModel('magesms/variables')->setName('order_payment_html')->setTemplate('Bank Transfer Payment Account number: 1234567890 Sort code 1234')->setTranslate(0)->save(); } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
|
17 |
+
UPDATE `{$this->getTable('magesms_hooks')}`
|
18 |
+
SET `notice` = REPLACE(`notice`, '{order_payment}', '{order_payment}, {order_payment_html}')
|
19 |
+
WHERE `notice` LIKE '%{order_payment}%' AND `notice` NOT LIKE '%{order_payment_html}%';
|
20 |
+
");
|
app/code/community/Topefekt/Magesms/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Topefekt_Magesms>
|
5 |
-
<version>1.2.
|
6 |
</Topefekt_Magesms>
|
7 |
</modules>
|
8 |
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Topefekt_Magesms>
|
5 |
+
<version>1.2.1</version>
|
6 |
</Topefekt_Magesms>
|
7 |
</modules>
|
8 |
|
app/design/adminhtml/default/default/template/topefekt/magesms/history.phtml
CHANGED
@@ -13,6 +13,6 @@
|
|
13 |
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
|
14 |
* @license http://opensource.org/licenses/BSD-3-Clause
|
15 |
*/
|
16 |
-
?><?php $user = $this->profile->user; ?><?php $lang = $this->profile->lang; ?><?php $type = array( 1 => Mage::helper('magesms')->__(' admin sms'), 2 => Mage::helper('magesms')->__(' customer sms'), 3 => Mage::helper('magesms')->__(' marketing sms'), 4 => Mage::helper('magesms')->__(' simple sms') ); ?><h2><?php echo Mage::helper('magesms')->__('SMS History'); ?></h2><p><?php echo Mage::helper('magesms')->__('History of sent SMS from SMS module.'); ?></p><div id="magesms"><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminTools.gif'; ?>" alt="" /> <?php echo Mage::helper('magesms')->__('SMS History'); ?></h4></div><div class="fieldset grid"><form id="magesms_filter" action="<?php echo Mage::getUrl('*/*/filter') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><?php $history = Mage::getSingleton('magesms/smshistory')->getCollection() ->setOrder('date', 'ASC'); $history->getSelect()->limit(1); if ($history->count()) $rokmin = substr($history->getFirstItem()->getDate(), 0, 4); else $rokmin = date('Y'); $roky = array(); for(; $rokmin <= date('Y'); $rokmin++) $roky[] = $rokmin; ?><div class="margin-form" style="text-align: center"><select name="rok" id="rok"><option value=""><?php echo Mage::helper('magesms')->__('year'); ?></option><?php foreach( $roky as $rok ): ?><option value="<?php echo $rok; ?>" <?php echo $rok == $this->getRequest()->getParam('rok', date('Y')) ? 'selected' : ''; ?>><?php echo $rok; ?></option><?php endforeach; ?></select><select name="mesic" id="mesic"><option value=""><?php echo Mage::helper('magesms')->__('month'); ?></option><?php for( $mesic=1; $mesic<=12; $mesic++ ): ?><option value="<?php echo $mesic; ?>" <?php echo $mesic == $this->getRequest()->getParam('mesic', date('m')) ? 'selected' : ''; ?>><?php echo $mesic; ?></option><?php endfor; ?></select><select name="den" id="den"><option value=""><?php echo Mage::helper('magesms')->__('day'); ?></option><?php for( $den=1; $den<=31; $den++ ): ?><option value="<?php echo $den; ?>" <?php echo $den == $this->getRequest()->getParam('den') ? 'selected' : ''; ?>><?php echo sprintf('%02d', $den); ?></option><?php endfor; ?></select><select name="status" id="status"><option value=""><?php echo Mage::helper('magesms')->__('Status'); ?></option><?php foreach( Mage::getSingleton('magesms/sms')->status() as $id=>$stat ): ?><option value="<?php echo $id; ?>" <?php echo $id == $this->getRequest()->getParam('status') ? 'selected' : ''; ?>><?php echo $stat->name; ?></option><?php endforeach; ?></select><input type="hidden" name="eshopsms1" value="0" /> <input type="checkbox" name="eshopsms1" id="eshopsms1" value="1" <?php echo $this->getRequest()->getParam('eshopsms1') == null || $this->getRequest()->getParam('eshopsms1') == 1 ? 'checked' : ''; ?> /><label for="eshopsms1"><?php echo Mage::helper('magesms')->__(' admin sms'); ?></label><input type="hidden" name="eshopsms" value="0" /> <input type="checkbox" name="eshopsms" id="eshopsms" value="1" <?php echo $this->getRequest()->getParam('eshopsms') == null || $this->getRequest()->getParam('eshopsms') == 1 ? 'checked' : ''; ?> /><label for="eshopsms"><?php echo Mage::helper('magesms')->__(' customer sms'); ?></label><input type="hidden" name="bulksms" value="0" /> <input type="checkbox" name="bulksms" id="bulksms" value="1" <?php echo $this->getRequest()->getParam('bulksms') == null || $this->getRequest()->getParam('bulksms') == 1 ? 'checked' : ''; ?> /><label for="bulksms"><?php echo Mage::helper('magesms')->__(' marketing sms'); ?></label><input type="hidden" name="bulksms2" value="0" /> <input type="checkbox" name="bulksms2" id="bulksms2" value="1" <?php echo $this->getRequest()->getParam('bulksms2') == null || $this->getRequest()->getParam('bulksms2') == 1 ? 'checked' : ''; ?> /><label for="bulksms2"><?php echo Mage::helper('magesms')->__(' simple sms'); ?></label> <input type="submit" value="<?php echo Mage::helper('magesms')->__('Show'); ?>" class="form-button" /></div></form></div></div><?php $pageSize = 50; $page = $this->getRequest()->getParam('page', 1); $format = Mage::app()->getLocale()->getDateTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM); $history = Mage::getSingleton('magesms/smshistory')->getCollection()->setOrder('date', 'DESC'); $rok = $this->getRequest()->getParam('rok', date('Y')); $mesic = $this->getRequest()->getParam('mesic', date('m')); $den = $this->getRequest()->getParam('den'); if ($den) { $history->getSelect()->where("`date` LIKE ?", sprintf("%04d-%02d-%02d%%", $rok, $mesic, $den)); } else { $history->getSelect()->where("`date` LIKE ?", sprintf("%04d-%02d-%%", $rok, $mesic)); } if (($_status = $this->getRequest()->getParam('status'))) { $history->addFilter('status', $_status); } $notin = array(); if ($this->getRequest()->getParam('eshopsms', 1) != 1) $notin[] = 2; if ($this->getRequest()->getParam('eshopsms1', 1) != 1) $notin[] = 1; if ($this->getRequest()->getParam('bulksms', 1) != 1) $notin[] = 3; if ($this->getRequest()->getParam('bulksms2', 1) != 1) $notin[] = 4; if (count($notin)) { $history->getSelect()->where("`type` NOT IN (?)", $notin); } $history->setPageSize($pageSize); $history->setCurPage($page); if ($history->getSize()): $from = ($page-1) * $pageSize + 1; $to = ($page-1) * $pageSize + $pageSize; if ($to > $history->getSize()) $to = $history->getSize(); $this->getRequest()->setParam('page', null); ?><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminCatalog.gif'; ?>" alt="" /><?php echo Mage::helper('magesms')->__('Search results ').' '.$from.' - '.$to.Mage::helper('magesms')->__(' of ').$history->getSize().' '.Mage::helper('magesms')->__('SMS'); ?></h4></div><div class="fieldset grid"><table class="actions"><tr><td class="pager"><?php echo $this->__('Page') ?><?php $_curPage = $history->getCurPage() ?><?php $_lastPage = $history->getLastPageNumber() ?><?php if($_curPage>1): ?><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/', $this->getRequest()->getParams()+array('page' => $_curPage-1)); ?>" title="<?php echo $this->__('Previous') ?>"><img src="<?php echo $this->getSkinUrl('images/pager_arrow_left.gif') ?>" alt="Go to Previous page" class="arrow"/></a><?php else: ?><img src="<?php echo $this->getSkinUrl('images/pager_arrow_left_off.gif') ?>" alt="Go to Previous page" class="arrow"/><?php endif; ?><input type="text" name="curPage" readonly value="<?php echo $_curPage ?>" class="input-text page" /><?php if($_curPage < $_lastPage): ?><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/', $this->getRequest()->getParams()+array('page' => $_curPage+1)); ?>" title="<?php echo $this->__('Next') ?>"><img src="<?php echo $this->getSkinUrl('images/pager_arrow_right.gif') ?>" alt="Go to Next page" class="arrow"/></a><?php else: ?><img src="<?php echo $this->getSkinUrl('images/pager_arrow_right_off.gif') ?>" alt="Go to Previous page" class="arrow"/><?php endif; ?></td></tr></table><table class="data"><tr class="headings"><th><?php echo Mage::helper('magesms')->__('Number'); ?></th><th><?php echo Mage::helper('magesms')->__('Recipient'); ?></th><th><?php echo Mage::helper('magesms')->__('SMS subject'); ?></th><th class="a-left"><?php echo Mage::helper('magesms')->__('Date'); ?></th><th><?php echo Mage::helper('magesms')->__('Type'); ?></th><th class="a-center"><?php echo Mage::helper('magesms')->__('Status'); ?></th></tr><?php $even = 1; foreach($history as $_obj): if ($even) $even = 0; else $even = 1;?><tr id="hist_<?php echo $_obj->getId(); ?>" class="hover <?php if ($even) echo 'even'?>"><td><span class="img"><img class="toggle" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/i_plus.gif'; ?>"></span><span class="img" style="display:none"><img class="toggle" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/i_minus.gif'; ?>"></span><?php echo $_obj->getNumber(); ?></td><td><?php if ($_obj->getCustomerId()): ?><?php $customer = Mage::getModel('customer/customer')->load($_obj->getCustomerId()); ?><?php if ($customer->getId()): ?><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/customer/edit', array('id' => $_obj->getCustomerId())); ?>" target="magesms_popup_customer" title="<?php echo Mage::helper('magesms')->__('Display customer detail'); ?>"><?php echo $customer->getFirstname(); ?> <?php echo $customer->getLastname(); ?></a><?php else: ?><?php echo Mage::helper('magesms')->moreText($_obj->getRecipient(), 16, 25); ?><?php endif; ?><?php elseif ($_obj->getAdminId()): ?><?php $admin = Mage::getModel('magesms/admins')->load($_obj->getAdminId()); ?><?php if ($admin->getId()): ?><?php echo $admin->getName(); ?><?php else: ?><?php echo Mage::helper('magesms')->moreText($_obj->getRecipient(), 16, 25); ?><?php endif; ?><?php else: ?><?php echo ($recipient = Mage::helper('magesms')->moreText($_obj->getRecipient(), 16, 25)) ? $recipient: '-' ?><?php endif; ?></td><td><?php echo ($subject = Mage::helper('magesms')->moreText($_obj->getSubject(), 16, 25)) ? $subject : '-'; ?></td><td><?php echo Mage::helper('core')->formatDate($_obj->getDate(), 'medium', true); ?></td><td><?php echo $type[$_obj->getType()]; ?></td><td class="a-center"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/'.Mage::getSingleton('magesms/sms')->status($_obj->getStatus())->icon; ?>" title="<?php echo Mage::getSingleton('magesms/sms')->status($_obj->getStatus())->name.(($note=$_obj->getNote()) && ($_obj->getStatus() == Topefekt_Magesms_Model_Sms::ERROR || $_obj->getStatus() == Topefekt_Magesms_Model_Sms::SCHEDULED) ? " - $note" : '') ; ?>" /></td></tr><tr id="histd_<?php echo $_obj->getId(); ?>" class="<?php if ($even) echo 'even'?>" style="display:none"><td colspan="6"><b><?php echo Mage::helper('magesms')->__('Text:'); ?></b><br /><?php echo $_obj->getText(); ?><br /><br /><b><?php echo Mage::helper('magesms')->__('SMS price in credits:'); ?></b> <?php echo $_obj->getPrice(); ?> <?php if ($_obj->getPrice() > 0): ?><b><?php echo Mage::helper('magesms')->__('Credit balance:'); ?></b> <?php echo $_obj->getCredit(); ?> <?php endif; ?><b><?php echo Mage::helper('magesms')->__('Total SMS:'); ?></b> <?php echo $_obj->getTotal(); ?> <b><?php echo Mage::helper('magesms')->__('Unicode:'); ?></b> <?php echo $_obj->getUnicode() ? Mage::helper('magesms')->__('yes') : Mage::helper('magesms')->__('no'); ?> <b><?php echo Mage::helper('magesms')->__('senderID:'); ?></b><?php if ($_obj->getSender() && preg_match("/^([0-9])*$/", $_obj->getSender(), $matches)): ?>+<?php echo $_obj->getSender(); ?><?php elseif ($_obj->getSender()): ?><?php echo $_obj->getSender(); ?><?php else: ?><?php echo Mage::helper('magesms')->__('system number'); ?><?php endif; ?> <?php if ($_obj->getSmsid()): ?><br /><b><?php echo Mage::helper('magesms')->__('smsID:'); ?></b> <?php echo $_obj->getSmsid(); ?><?php endif; ?></td></tr><?php endforeach; ?></table><table class="actions"><tr><td class="pager"><?php echo $this->__('Page') ?><?php $_curPage = $history->getCurPage() ?><?php $_lastPage = $history->getLastPageNumber() ?><?php if($_curPage>1): ?><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/', $this->getRequest()->getParams()+array('page' => $_curPage-1)); ?>" title="<?php echo $this->__('Previous') ?>"><img src="<?php echo $this->getSkinUrl('images/pager_arrow_left.gif') ?>" alt="Go to Previous page" class="arrow"/></a><?php else: ?><img src="<?php echo $this->getSkinUrl('images/pager_arrow_left_off.gif') ?>" alt="Go to Previous page" class="arrow"/><?php endif; ?><input type="text" name="curPage" readonly value="<?php echo $_curPage ?>" class="input-text page" /><?php if($_curPage < $_lastPage): ?><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/', $this->getRequest()->getParams()+array('page' => $_curPage+1)); ?>" title="<?php echo $this->__('Next') ?>"><img src="<?php echo $this->getSkinUrl('images/pager_arrow_right.gif') ?>" alt="Go to Next page" class="arrow"/></a><?php else: ?><img src="<?php echo $this->getSkinUrl('images/pager_arrow_right_off.gif') ?>" alt="Go to Previous page" class="arrow"/><?php endif; ?></td></tr></table></div></div><script type="text/javascript">//<![CDATA[
|
17 |
Event.observe(window, "load", function(){var gridData = document.getElementById('magesms');var tr_array = gridData.getElementsByTagName('tr');for (var i=0, len=tr_array.length; i < len; i++) {if (tr_array[i].className.indexOf('hover') !== -1) {tr_array[i].onmouseover = function() {this.className = this.className + ' on-mouse';};tr_array[i].onmouseout = function() {this.className = this.className.replace(' on-mouse', '');};tr_array[i].onclick = function() {var arr = this.id.split('_');var next = document.getElementById('histd_'+arr[1]);if (next.style.display == 'none') {next.style.display = 'table-row';} else {next.style.display = 'none';}var img = this.getElementsByClassName('img');if (img[0].style.display == 'none') {img[0].style.display = 'inline';} else {img[0].style.display = 'none';}if (img[1].style.display == 'none') {img[1].style.display = 'inline';} else {img[1].style.display = 'none';}};}}});
|
18 |
//]]></script><?php else: ?><div><?php echo Mage::helper('magesms')->__('Total SMS: 0'); ?></div><?php endif; ?></div>
|
13 |
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
|
14 |
* @license http://opensource.org/licenses/BSD-3-Clause
|
15 |
*/
|
16 |
+
?><?php $user = $this->profile->user; ?><?php $lang = $this->profile->lang; ?><?php $type = array( 1 => Mage::helper('magesms')->__(' admin sms'), 2 => Mage::helper('magesms')->__(' customer sms'), 3 => Mage::helper('magesms')->__(' marketing sms'), 4 => Mage::helper('magesms')->__(' simple sms') ); ?><div style="float: right;"><form action="<?php echo $this->getUrl('*/*/delete') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><input type="submit" value="<?php echo Mage::helper('magesms')->__('Delete history'); ?>" onclick="return confirm('<?php echo Mage::helper('magesms')->__('Are you sure to delete SMS history?'); ?>');" class="form-button" /></form></div><h2><?php echo Mage::helper('magesms')->__('SMS History'); ?></h2><p><?php echo Mage::helper('magesms')->__('History of sent SMS from SMS module.'); ?></p><div id="magesms"><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminTools.gif'; ?>" alt="" /> <?php echo Mage::helper('magesms')->__('SMS History'); ?></h4></div><div class="fieldset grid"><form id="magesms_filter" action="<?php echo Mage::getUrl('*/*/filter') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><?php $history = Mage::getSingleton('magesms/smshistory')->getCollection() ->setOrder('date', 'ASC'); $history->getSelect()->limit(1); if ($history->count()) $rokmin = substr($history->getFirstItem()->getDate(), 0, 4); else $rokmin = date('Y'); $roky = array(); for(; $rokmin <= date('Y'); $rokmin++) $roky[] = $rokmin; ?><div class="margin-form" style="text-align: center"><select name="rok" id="rok"><option value=""><?php echo Mage::helper('magesms')->__('year'); ?></option><?php foreach( $roky as $rok ): ?><option value="<?php echo $rok; ?>" <?php echo $rok == $this->getRequest()->getParam('rok', date('Y')) ? 'selected' : ''; ?>><?php echo $rok; ?></option><?php endforeach; ?></select><select name="mesic" id="mesic"><option value=""><?php echo Mage::helper('magesms')->__('month'); ?></option><?php for( $mesic=1; $mesic<=12; $mesic++ ): ?><option value="<?php echo $mesic; ?>" <?php echo $mesic == $this->getRequest()->getParam('mesic', date('m')) ? 'selected' : ''; ?>><?php echo $mesic; ?></option><?php endfor; ?></select><select name="den" id="den"><option value=""><?php echo Mage::helper('magesms')->__('day'); ?></option><?php for( $den=1; $den<=31; $den++ ): ?><option value="<?php echo $den; ?>" <?php echo $den == $this->getRequest()->getParam('den') ? 'selected' : ''; ?>><?php echo sprintf('%02d', $den); ?></option><?php endfor; ?></select><select name="status" id="status"><option value=""><?php echo Mage::helper('magesms')->__('Status'); ?></option><?php foreach( Mage::getSingleton('magesms/sms')->status() as $id=>$stat ): ?><option value="<?php echo $id; ?>" <?php echo $id == $this->getRequest()->getParam('status') ? 'selected' : ''; ?>><?php echo $stat->name; ?></option><?php endforeach; ?></select><input type="hidden" name="eshopsms1" value="0" /> <input type="checkbox" name="eshopsms1" id="eshopsms1" value="1" <?php echo $this->getRequest()->getParam('eshopsms1') == null || $this->getRequest()->getParam('eshopsms1') == 1 ? 'checked' : ''; ?> /><label for="eshopsms1"><?php echo Mage::helper('magesms')->__(' admin sms'); ?></label><input type="hidden" name="eshopsms" value="0" /> <input type="checkbox" name="eshopsms" id="eshopsms" value="1" <?php echo $this->getRequest()->getParam('eshopsms') == null || $this->getRequest()->getParam('eshopsms') == 1 ? 'checked' : ''; ?> /><label for="eshopsms"><?php echo Mage::helper('magesms')->__(' customer sms'); ?></label><input type="hidden" name="bulksms" value="0" /> <input type="checkbox" name="bulksms" id="bulksms" value="1" <?php echo $this->getRequest()->getParam('bulksms') == null || $this->getRequest()->getParam('bulksms') == 1 ? 'checked' : ''; ?> /><label for="bulksms"><?php echo Mage::helper('magesms')->__(' marketing sms'); ?></label><input type="hidden" name="bulksms2" value="0" /> <input type="checkbox" name="bulksms2" id="bulksms2" value="1" <?php echo $this->getRequest()->getParam('bulksms2') == null || $this->getRequest()->getParam('bulksms2') == 1 ? 'checked' : ''; ?> /><label for="bulksms2"><?php echo Mage::helper('magesms')->__(' simple sms'); ?></label> <input type="submit" value="<?php echo Mage::helper('magesms')->__('Show'); ?>" class="form-button" /></div></form></div></div><?php $pageSize = 50; $page = $this->getRequest()->getParam('page', 1); $format = Mage::app()->getLocale()->getDateTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM); $history = Mage::getSingleton('magesms/smshistory')->getCollection()->setOrder('date', 'DESC'); $rok = $this->getRequest()->getParam('rok', date('Y')); $mesic = $this->getRequest()->getParam('mesic', date('m')); $den = $this->getRequest()->getParam('den'); if ($den) { $history->getSelect()->where("`date` LIKE ?", sprintf("%04d-%02d-%02d%%", $rok, $mesic, $den)); } else { $history->getSelect()->where("`date` LIKE ?", sprintf("%04d-%02d-%%", $rok, $mesic)); } if (($_status = $this->getRequest()->getParam('status'))) { $history->addFilter('status', $_status); } $notin = array(); if ($this->getRequest()->getParam('eshopsms', 1) != 1) $notin[] = 2; if ($this->getRequest()->getParam('eshopsms1', 1) != 1) $notin[] = 1; if ($this->getRequest()->getParam('bulksms', 1) != 1) $notin[] = 3; if ($this->getRequest()->getParam('bulksms2', 1) != 1) $notin[] = 4; if (count($notin)) { $history->getSelect()->where("`type` NOT IN (?)", $notin); } $history->setPageSize($pageSize); $history->setCurPage($page); if ($history->getSize()): $from = ($page-1) * $pageSize + 1; $to = ($page-1) * $pageSize + $pageSize; if ($to > $history->getSize()) $to = $history->getSize(); $this->getRequest()->setParam('page', null); ?><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminCatalog.gif'; ?>" alt="" /><?php echo Mage::helper('magesms')->__('Search results ').' '.$from.' - '.$to.Mage::helper('magesms')->__(' of ').$history->getSize().' '.Mage::helper('magesms')->__('SMS'); ?></h4></div><div class="fieldset grid"><table class="actions"><tr><td class="pager"><?php echo $this->__('Page') ?><?php $_curPage = $history->getCurPage() ?><?php $_lastPage = $history->getLastPageNumber() ?><?php if($_curPage>1): ?><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/', $this->getRequest()->getParams()+array('page' => $_curPage-1)); ?>" title="<?php echo $this->__('Previous') ?>"><img src="<?php echo $this->getSkinUrl('images/pager_arrow_left.gif') ?>" alt="Go to Previous page" class="arrow"/></a><?php else: ?><img src="<?php echo $this->getSkinUrl('images/pager_arrow_left_off.gif') ?>" alt="Go to Previous page" class="arrow"/><?php endif; ?><input type="text" name="curPage" readonly value="<?php echo $_curPage ?>" class="input-text page" /><?php if($_curPage < $_lastPage): ?><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/', $this->getRequest()->getParams()+array('page' => $_curPage+1)); ?>" title="<?php echo $this->__('Next') ?>"><img src="<?php echo $this->getSkinUrl('images/pager_arrow_right.gif') ?>" alt="Go to Next page" class="arrow"/></a><?php else: ?><img src="<?php echo $this->getSkinUrl('images/pager_arrow_right_off.gif') ?>" alt="Go to Previous page" class="arrow"/><?php endif; ?></td></tr></table><table class="data"><tr class="headings"><th><?php echo Mage::helper('magesms')->__('Number'); ?></th><th><?php echo Mage::helper('magesms')->__('Recipient'); ?></th><th><?php echo Mage::helper('magesms')->__('SMS subject'); ?></th><th class="a-left"><?php echo Mage::helper('magesms')->__('Date'); ?></th><th><?php echo Mage::helper('magesms')->__('Type'); ?></th><th class="a-center"><?php echo Mage::helper('magesms')->__('Status'); ?></th></tr><?php $even = 1; foreach($history as $_obj): if ($even) $even = 0; else $even = 1;?><tr id="hist_<?php echo $_obj->getId(); ?>" class="hover <?php if ($even) echo 'even'?>"><td><span class="img"><img class="toggle" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/i_plus.gif'; ?>"></span><span class="img" style="display:none"><img class="toggle" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/i_minus.gif'; ?>"></span><?php echo $_obj->getNumber(); ?></td><td><?php if ($_obj->getCustomerId()): ?><?php $customer = Mage::getModel('customer/customer')->load($_obj->getCustomerId()); ?><?php if ($customer->getId()): ?><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/customer/edit', array('id' => $_obj->getCustomerId())); ?>" target="magesms_popup_customer" title="<?php echo Mage::helper('magesms')->__('Display customer detail'); ?>"><?php echo $customer->getFirstname(); ?> <?php echo $customer->getLastname(); ?></a><?php else: ?><?php echo Mage::helper('magesms')->moreText($_obj->getRecipient(), 16, 25); ?><?php endif; ?><?php elseif ($_obj->getAdminId()): ?><?php $admin = Mage::getModel('magesms/admins')->load($_obj->getAdminId()); ?><?php if ($admin->getId()): ?><?php echo $admin->getName(); ?><?php else: ?><?php echo Mage::helper('magesms')->moreText($_obj->getRecipient(), 16, 25); ?><?php endif; ?><?php else: ?><?php echo ($recipient = Mage::helper('magesms')->moreText($_obj->getRecipient(), 16, 25)) ? $recipient: '-' ?><?php endif; ?></td><td><?php echo ($subject = Mage::helper('magesms')->moreText($_obj->getSubject(), 16, 25)) ? $subject : '-'; ?></td><td><?php echo Mage::helper('core')->formatDate($_obj->getDate(), 'medium', true); ?></td><td><?php echo $type[$_obj->getType()]; ?></td><td class="a-center"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/'.Mage::getSingleton('magesms/sms')->status($_obj->getStatus())->icon; ?>" title="<?php echo Mage::getSingleton('magesms/sms')->status($_obj->getStatus())->name.(($note=$_obj->getNote()) && ($_obj->getStatus() == Topefekt_Magesms_Model_Sms::ERROR || $_obj->getStatus() == Topefekt_Magesms_Model_Sms::SCHEDULED) ? " - $note" : '') ; ?>" /></td></tr><tr id="histd_<?php echo $_obj->getId(); ?>" class="<?php if ($even) echo 'even'?>" style="display:none"><td colspan="6"><b><?php echo Mage::helper('magesms')->__('Text:'); ?></b><br /><?php echo $_obj->getText(); ?><br /><br /><b><?php echo Mage::helper('magesms')->__('SMS price in credits:'); ?></b> <?php echo $_obj->getPrice(); ?> <?php if ($_obj->getPrice() > 0): ?><b><?php echo Mage::helper('magesms')->__('Credit balance:'); ?></b> <?php echo $_obj->getCredit(); ?> <?php endif; ?><b><?php echo Mage::helper('magesms')->__('Total SMS:'); ?></b> <?php echo $_obj->getTotal(); ?> <b><?php echo Mage::helper('magesms')->__('Unicode:'); ?></b> <?php echo $_obj->getUnicode() ? Mage::helper('magesms')->__('yes') : Mage::helper('magesms')->__('no'); ?> <b><?php echo Mage::helper('magesms')->__('senderID:'); ?></b><?php if ($_obj->getSender() && preg_match("/^([0-9])*$/", $_obj->getSender(), $matches)): ?>+<?php echo $_obj->getSender(); ?><?php elseif ($_obj->getSender()): ?><?php echo $_obj->getSender(); ?><?php else: ?><?php echo Mage::helper('magesms')->__('system number'); ?><?php endif; ?> <?php if ($_obj->getSmsid()): ?><br /><b><?php echo Mage::helper('magesms')->__('smsID:'); ?></b> <?php echo $_obj->getSmsid(); ?><?php endif; ?></td></tr><?php endforeach; ?></table><table class="actions"><tr><td class="pager"><?php echo $this->__('Page') ?><?php $_curPage = $history->getCurPage() ?><?php $_lastPage = $history->getLastPageNumber() ?><?php if($_curPage>1): ?><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/', $this->getRequest()->getParams()+array('page' => $_curPage-1)); ?>" title="<?php echo $this->__('Previous') ?>"><img src="<?php echo $this->getSkinUrl('images/pager_arrow_left.gif') ?>" alt="Go to Previous page" class="arrow"/></a><?php else: ?><img src="<?php echo $this->getSkinUrl('images/pager_arrow_left_off.gif') ?>" alt="Go to Previous page" class="arrow"/><?php endif; ?><input type="text" name="curPage" readonly value="<?php echo $_curPage ?>" class="input-text page" /><?php if($_curPage < $_lastPage): ?><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/', $this->getRequest()->getParams()+array('page' => $_curPage+1)); ?>" title="<?php echo $this->__('Next') ?>"><img src="<?php echo $this->getSkinUrl('images/pager_arrow_right.gif') ?>" alt="Go to Next page" class="arrow"/></a><?php else: ?><img src="<?php echo $this->getSkinUrl('images/pager_arrow_right_off.gif') ?>" alt="Go to Previous page" class="arrow"/><?php endif; ?></td></tr></table></div></div><script type="text/javascript">//<![CDATA[
|
17 |
Event.observe(window, "load", function(){var gridData = document.getElementById('magesms');var tr_array = gridData.getElementsByTagName('tr');for (var i=0, len=tr_array.length; i < len; i++) {if (tr_array[i].className.indexOf('hover') !== -1) {tr_array[i].onmouseover = function() {this.className = this.className + ' on-mouse';};tr_array[i].onmouseout = function() {this.className = this.className.replace(' on-mouse', '');};tr_array[i].onclick = function() {var arr = this.id.split('_');var next = document.getElementById('histd_'+arr[1]);if (next.style.display == 'none') {next.style.display = 'table-row';} else {next.style.display = 'none';}var img = this.getElementsByClassName('img');if (img[0].style.display == 'none') {img[0].style.display = 'inline';} else {img[0].style.display = 'none';}if (img[1].style.display == 'none') {img[1].style.display = 'inline';} else {img[1].style.display = 'none';}};}}});
|
18 |
//]]></script><?php else: ?><div><?php echo Mage::helper('magesms')->__('Total SMS: 0'); ?></div><?php endif; ?></div>
|
app/design/adminhtml/default/default/template/topefekt/magesms/marketing/form.phtml
CHANGED
@@ -13,4 +13,4 @@
|
|
13 |
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
|
14 |
* @license http://opensource.org/licenses/BSD-3-Clause
|
15 |
*/
|
16 |
-
?><div class="fieldset"><form method="post" id="magesms_filter_template" action="<?php echo Mage::helper("adminhtml")->getUrl('*/*/filter', array('action' => 'saveFilter')); ?>"><div class="margin-form"><label for="name"><?php echo Mage::helper('magesms')->__('Filter Name'); ?>: </label><input class="input-text" type="text" name="saveName" id="saveName" value="" /><button type="button" onclick="window.submitSaveFilter($('magesms_filter_template'));" title="<?php echo Mage::helper('magesms')->__('Save filter'); ?>" name="submitSaveFilter" class="form-button" /><span><span><span><?php echo Mage::helper('magesms')->__('Save filter'); ?></span></span></span></button></div></form></div>
|
13 |
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
|
14 |
* @license http://opensource.org/licenses/BSD-3-Clause
|
15 |
*/
|
16 |
+
?><div class="fieldset"><form method="post" id="magesms_filter_template" onsubmit="window.submitSaveFilter($('magesms_filter_template')); return false;" action="<?php echo Mage::helper("adminhtml")->getUrl('*/*/filter', array('action' => 'saveFilter')); ?>"><div class="margin-form"><label for="name"><?php echo Mage::helper('magesms')->__('Filter Name'); ?>: </label><input class="input-text" type="text" name="saveName" id="saveName" value="" /><button type="button" onclick="window.submitSaveFilter($('magesms_filter_template'));" title="<?php echo Mage::helper('magesms')->__('Save filter'); ?>" name="submitSaveFilter" class="form-button" /><span><span><span><?php echo Mage::helper('magesms')->__('Save filter'); ?></span></span></span></button></div></form></div>
|
app/design/adminhtml/default/default/template/topefekt/magesms/template/form.phtml
CHANGED
@@ -13,4 +13,4 @@
|
|
13 |
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
|
14 |
* @license http://opensource.org/licenses/BSD-3-Clause
|
15 |
*/
|
16 |
-
?><div class="fieldset"><form method="post" id="magesms_template" action="<?php echo Mage::helper("adminhtml")->getUrl('*/*/template', array('action' => 'save')); ?>"><div class="margin-form"><label for="name"><?php echo Mage::helper('magesms')->__('Template Name'); ?>: </label><input class="input-text" type="text" name="saveName" id="saveName" value="" /><input type="hidden" id="type" name="type" value="<?php echo Mage::app()->getRequest()->getParam('type', 0); ?>" /><button type="button" onclick="window.submitSaveTemplate($('magesms_template'));" title="<?php echo Mage::helper('magesms')->__('Save template'); ?>" name="submitSaveTemplate" class="form-button" /><span><span><span><?php echo Mage::helper('magesms')->__('Save template'); ?></span></span></span></button></div></form></div>
|
13 |
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
|
14 |
* @license http://opensource.org/licenses/BSD-3-Clause
|
15 |
*/
|
16 |
+
?><div class="fieldset"><form method="post" id="magesms_template" onsubmit="window.submitSaveTemplate($('magesms_template')); return false;" action="<?php echo Mage::helper("adminhtml")->getUrl('*/*/template', array('action' => 'save')); ?>"><div class="margin-form"><label for="name"><?php echo Mage::helper('magesms')->__('Template Name'); ?>: </label><input class="input-text" type="text" name="saveName" id="saveName" value="" /><input type="hidden" id="type" name="type" value="<?php echo Mage::app()->getRequest()->getParam('type', 0); ?>" /><button type="button" onclick="window.submitSaveTemplate($('magesms_template'));" title="<?php echo Mage::helper('magesms')->__('Save template'); ?>" name="submitSaveTemplate" class="form-button" /><span><span><span><?php echo Mage::helper('magesms')->__('Save template'); ?></span></span></span></button></div></form></div>
|
app/design/adminhtml/default/default/template/topefekt/magesms/wizard-alternative.phtml
CHANGED
@@ -13,6 +13,6 @@
|
|
13 |
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
|
14 |
* @license http://opensource.org/licenses/BSD-3-Clause
|
15 |
*/
|
16 |
-
?><h2><?php echo Mage::helper('magesms')->__('SMS Settings - Select Text sender ID for '); ?><?php echo $this->route->getAreaText(); ?></h2><div id="magesms"><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminTools.gif'; ?>" alt="" /><?php echo Mage::helper('magesms')->__('Text sender ID settings'); ?></h4></div><div class="fieldset grid"><form id="magesms_sender" action="<?php echo $this->getUrl('*/*/savesenderalternative'); ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><input name="id" type="hidden" value="<?php echo $this->getRequest()->getParam('id'); ?>" /><?php $maxlength = 11; $desc = Mage::helper('magesms')->__('max. 11 characters'); ?><table class="data" style="width:
|
17 |
-
var senderForm = new varienForm('magesms_sender', '<?php echo Mage::helper("adminhtml")->getUrl('*/*/validatesenderalternative'); ?>');Validation.add('validate-sender','possible characters: ', function(v) {return Validation.get('IsEmpty').test(v) || v.length >= 3 && /^[0-9a-zA-Z_.]+$/.test(v) && !/^[0-9]+$/.test(v);});Translator.add('possible characters: ','<?php echo Mage::helper('magesms')->__('possible characters: ').'a-z A-Z 0-9 _ .'; ?>');
|
18 |
//]]></script></div></div></div>
|
13 |
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
|
14 |
* @license http://opensource.org/licenses/BSD-3-Clause
|
15 |
*/
|
16 |
+
?><h2><?php echo Mage::helper('magesms')->__('SMS Settings - Select Text sender ID for '); ?><?php echo $this->route->getAreaText(); ?></h2><div id="magesms"><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminTools.gif'; ?>" alt="" /><?php echo Mage::helper('magesms')->__('Text sender ID settings'); ?></h4></div><div class="fieldset grid"><form id="magesms_sender" action="<?php echo $this->getUrl('*/*/savesenderalternative'); ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><input name="id" type="hidden" value="<?php echo $this->getRequest()->getParam('id'); ?>" /><?php $maxlength = 11; $desc = Mage::helper('magesms')->__('max. 11 characters'); ?><table class="data" style="width: auto;"><col /><col width="200"><tr class="headings"><th><?php echo Mage::helper('magesms')->__('Store'); ?></th><th><?php echo Mage::helper('magesms')->__('Text sender ID'); ?></th></tr><?php foreach($this->stores as $store): ?><tr><td><?php echo $store->getName(); ?></td><td><input type="text" class="validate-sender input-text" id="store_group_<?php echo $store->getId(); ?>" title="<?php echo $desc;?>" maxlength="<?php echo $maxlength;?>" name="store_group[<?php echo $store->getId(); ?>]" value="<?php echo $store->getTextsenderAlternative() ? $store->getTextsenderAlternative() : $store->getTextsender(); ?>" /></td></tr><?php endforeach; ?></table><div class="margin-form"><input type="button" onclick="senderForm.submit();" value="<?php echo Mage::helper('magesms')->__('Save'); ?>" class="form-button" /></div></form><script type="text/javascript">//<![CDATA[
|
17 |
+
var senderForm = new varienForm('magesms_sender', '<?php echo Mage::helper("adminhtml")->getUrl('*/*/validatesenderalternative'); ?>');Validation.add('validate-sender','possible characters: ', function(v) {return Validation.get('IsEmpty').test(v) || v.length >= 3 && /^[0-9a-zA-Z_.]+$/.test(v) && !/^[0-9]+$/.test(v);});Translator.add('possible characters: ','<?php echo Mage::helper('magesms')->__('possible characters: ').'a-z A-Z 0-9 _ .'; ?>');
|
18 |
//]]></script></div></div></div>
|
app/locale/cs_CZ/Topefekt_Magesms.csv
CHANGED
@@ -504,3 +504,6 @@
|
|
504 |
"Dear Customer, status of your claim {return_id} has changed to ","Vazeny zakazniku, stav Vasi reklamace {return_id} se zmenil na "
|
505 |
". Have a nice day, {shop_name}.",". Krasny den, {shop_name}."
|
506 |
"ADD/CHANGE TEXT SENDER ID","PŘIDAT/ZMĚNIT TEXTOVÉ ČÍSLO"
|
|
|
|
|
|
504 |
"Dear Customer, status of your claim {return_id} has changed to ","Vazeny zakazniku, stav Vasi reklamace {return_id} se zmenil na "
|
505 |
". Have a nice day, {shop_name}.",". Krasny den, {shop_name}."
|
506 |
"ADD/CHANGE TEXT SENDER ID","PŘIDAT/ZMĚNIT TEXTOVÉ ČÍSLO"
|
507 |
+
"Delete history","Smazat historii"
|
508 |
+
"Are you sure to delete SMS history?","Opravdu chcete smazat SMS historii?"
|
509 |
+
"SMS history was deleted.","SMS historie byla smazána."
|
app/locale/sk_SK/Topefekt_Magesms.csv
CHANGED
@@ -503,3 +503,6 @@
|
|
503 |
". Have a nice day, {shop_name}.",". Pekny den, {shop_name}."
|
504 |
"ADD/CHANGE TEXT SENDER ID","PRIDAŤ/ZMENIŤ TEXTOVÉ ČÍSLO"
|
505 |
"Possible variables:","Použiteľné parametre:"
|
|
|
|
|
|
503 |
". Have a nice day, {shop_name}.",". Pekny den, {shop_name}."
|
504 |
"ADD/CHANGE TEXT SENDER ID","PRIDAŤ/ZMENIŤ TEXTOVÉ ČÍSLO"
|
505 |
"Possible variables:","Použiteľné parametre:"
|
506 |
+
"Delete history","Zmazať históriu"
|
507 |
+
"Are you sure to delete SMS history?","Naozaj chcete zmazať SMS históriu?"
|
508 |
+
"SMS history was deleted.","SMS história byla zmazaná."
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>TOPefekt_Magesms</name>
|
4 |
-
<version>1.2.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/BSD-3-Clause">BSD</license>
|
7 |
<channel>community</channel>
|
@@ -10,9 +10,9 @@
|
|
10 |
<description>Free SMS module for Magento with advanced features and user friendly design.</description>
|
11 |
<notes>2014</notes>
|
12 |
<authors><author><name>Frantisek Barancik</name><user>SIRAPY</user><email>barancik@sirapy.cz</email></author><author><name>Lubomir Kozak</name><user>TOPefekt</user><email>info@topefekt.com</email></author></authors>
|
13 |
-
<date>2014-
|
14 |
-
<time>10:
|
15 |
-
<contents><target name="magecommunity"><dir name="Topefekt"><dir name="Magesms"><dir name="Block"><dir name="Answers"><file name="Grid.php" hash="b4161fe0c9f84ae2842ad1c5b1fee67b"/><dir name="Renderer"><file name="Actions.php" hash="8978857641921533a7ef1a511d6e98cc"/><file name="Smsc.php" hash="dec1e2ffb867499edaf2660e83a1f763"/></dir></dir><file name="Answers.php" hash="d8e8f1ddc9dc2c200d48ba61fd45f258"/><dir name="Customer"><file name="Grid.php" hash="01cd30df42024487ddbb85dc805b29f2"/></dir><file name="Customer.php" hash="8817fa3634895fb9317fc7c979f326fa"/><file name="Magesms.php" hash="80c1ac3571e5305b9a18a332d50d3598"/><dir name="Marketing"><file name="Customer.php" hash="91fcf8f90baf8ceeef6bdce74838e9e9"/><file name="Form.php" hash="1f6f5fb07741aae051f4250a027df299"/><file name="Grid.php" hash="6866d29549f350f009971deda49f31f7"/><file name="Template.php" hash="1f48e5754feb003ff361824ca0e29ebb"/></dir><file name="Marketing.php" hash="298b9175edc892566097f199f95f0d95"/><file name="Profile.php" hash="87be5911ea730b61179eaa43274ed031"/><file name="ShowTabsAdminBlock.php" hash="9d021b7bfa6ca922d7074313865bde87"/><dir name="System"><dir name="Config"><file name="Apikeygenerator.php" hash="9b5f9256de21a985efbacbbc00032296"/></dir></dir><dir name="Template"><file name="Template.php" hash="4713fdc848c5f1d5ab771011df11ff40"/></dir><file name="Template.php" hash="1420e7b7615214a3cfe8ef87d86ebd1a"/><dir name="Wizard"><file name="Grid.php" hash="62ea044623fda139cdc23e8a768d1b60"/></dir><file name="Wizard.php" hash="ef10fbfc80385cb9e90e7a6bfbf555f4"/></dir><dir name="Controller"><file name="Action.php" hash="a12f3ca7279da57be21521e7e1f33b7b"/><dir name="Template"><file name="Action.php" hash="c1fbebd2736adfbeb1ad7dd1d93fe2d9"/></dir></dir><dir name="Helper"><dir name="Adminhtml"><file name="Data.php" hash="ebf8c3ac5f4ede5e30218f307c60c9c3"/></dir><file name="Data.php" hash="ce1437fd6586beb716b631fa5617fe04"/></dir><dir name="Model"><file name="Admins.php" hash="ced35da523fa261708ca76bf09744492"/><file name="Answers.php" hash="33fcc03e70064860f47b17291b2682ec"/><file name="Api.php" hash="6b5b23ac096fd8090926bc7fc5e6900c"/><dir name="Country"><file name="Area.php" hash="4268548148d51c519328472ae744e0cd"/><file name="Lang.php" hash="1c47ceb19d913853c9ee7ab9b50f010a"/></dir><file name="Country.php" hash="6ea4a1f25f0c43c14392903328bbf794"/><file name="Exceptions.php" hash="856910cdd46ffcfb8b961826c8563670"/><dir name="Hooks"><file name="Admins.php" hash="c42b32a696e6101f50dc67942d738e6d"/><file name="Customers.php" hash="cc275a7f7c738174b420bd3c3301f79d"/><file name="Templates.php" hash="bcf959ff2f2c84bc8f287e5d7dfd637a"/><file name="Unicode.php" hash="351a49d393871e186921a98376aaa5bb"/></dir><file name="Hooks.php" hash="32c7b402cda99f399fcca2c3fd6763d7"/><file name="Magesms.php" hash="e299fef5c1617dc2aba79861a170ee57"/><file name="Maps.php" hash="7526a18b5bda119e8b564b95e13c823f"/><dir name="Marketing"><dir name="Filter"><file name="Birthday.php" hash="56d6e9638c2548a9dabd86548609d04d"/><file name="Birthdayall.php" hash="52b7459447fd8964c79bff54aef7499e"/><file name="City.php" hash="851bf11fa4eba68f5afe90bc73061075"/><file name="Collection.php" hash="a59b5af9d4dbdb3a4f4d2a319991526a"/><file name="Country.php" hash="226ea48e858db867cad73ec5df430481"/><file name="Firstname.php" hash="d2fb9d1c18d65616e85b94a19d937303"/><file name="Gender.php" hash="08583ec548a718fd598db0c8382f8fea"/><file name="Group.php" hash="5ae6a9e763a228d66dec97d6edd9504b"/><file name="Lastname.php" hash="4ce733ed97662ae7e3b9bd7fd09a9b23"/><file name="Newsletter.php" hash="e32e2584c4a5b4e83774c90ca8e03d21"/><file name="Register.php" hash="18462dd6abae0d72f6863a285364885a"/><file name="Type.php" hash="49b3fefa77c399003a60edc716a19810"/><file name="Website.php" hash="998fa5822c12e7e10a9363c74922d25f"/></dir><file name="Filter.php" hash="c67e8a70e671dc9c05194d6fea62ba1d"/></dir><dir name="Mysql4"><dir name="Admins"><file name="Collection.php" hash="c1ada270e5c640cc77beca20a90c06c1"/></dir><file name="Admins.php" hash="c1efc07554a47ddd61add948f8d7184d"/><dir name="Answers"><file name="Collection.php" hash="e0d1dfb4666cd442105b786cd8e1938b"/></dir><file name="Answers.php" hash="9b116c0acd6598b22fda9a3f7bfd0e1f"/><file name="Collection.php" hash="0713d799c11bcc14437ca3924d0aae0f"/><dir name="Country"><dir name="Area"><file name="Collection.php" hash="57076e9ef2eaee34ede11fd2b8c079ea"/></dir><file name="Area.php" hash="cb14e562273148090fcafe17a5764dcf"/><file name="Collection.php" hash="9d1c5aa0e9d956d98e45706dd24dc0f0"/><dir name="Lang"><file name="Collection.php" hash="5784492b259d0636c5c37f3f945873cf"/></dir><file name="Lang.php" hash="45c61334ccc799908468603a1601f75f"/></dir><file name="Country.php" hash="dd1e7ba04fb2d2484fcd14d35fd63513"/><dir name="Exceptions"><file name="Collection.php" hash="0f27011bb167d3686149edcea2cf9af0"/></dir><file name="Exceptions.php" hash="087363570c7e19e98343508fde136b71"/><dir name="Hooks"><dir name="Admins"><file name="Collection.php" hash="08c59f372ae4d724d1451836df655deb"/></dir><file name="Admins.php" hash="0b97679a105c98c53fb27e6f35cc49da"/><file name="Collection.php" hash="781323404157c7935539212e6c9d5948"/><dir name="Customers"><file name="Collection.php" hash="9f85b8e63521abcc575d717eaca6f7b0"/></dir><file name="Customers.php" hash="446451f0e038bc5b25ec0d3032a608a9"/><dir name="Templates"><file name="Collection.php" hash="10d674db501bdd93bfc11e0411be53b2"/></dir><file name="Templates.php" hash="b9d88cc611aa7c5ea369d9b4056a3858"/><dir name="Unicode"><file name="Collection.php" hash="e30a9e81400f25829b89d8fa4927e4e7"/></dir><file name="Unicode.php" hash="930b9f23e7b0674cef75898bebd8d4f5"/></dir><file name="Hooks.php" hash="db0d3898325974475d39f0dd786a0c7d"/><dir name="Maps"><file name="Collection.php" hash="2b8609291dc25d2445b1c168024c1783"/></dir><file name="Maps.php" hash="21e7e04096b879db02971223dbf11a1a"/><dir name="Marketing"><dir name="Filter"><file name="Collection.php" hash="ee5bfddfe067a317c94b62eea4e59aeb"/></dir><file name="Filter.php" hash="42342671cb9bcbca71165ffffa7d309d"/></dir><dir name="Ownnumbersender"><file name="Collection.php" hash="0f77ebc089da24e306dc2616178fab35"/></dir><file name="Ownnumbersender.php" hash="0b8963a836de22ff2c54ec8a6f0819bd"/><dir name="Routes"><dir name="Alternative"><file name="Collection.php" hash="dd8908e3c72bef9a4d54ab4d04119fc9"/></dir><file name="Alternative.php" hash="0b07c80a9b35a1dc6f16e310614ddbda"/><file name="Collection.php" hash="9a9f26422877c0ff82f5bc3a6865ed1f"/></dir><file name="Routes.php" hash="f500ad3e8d96b8742a194015acdd4c58"/><dir name="Smshistory"><file name="Collection.php" hash="76f838ee4e14af4789e494badf46ad84"/></dir><file name="Smshistory.php" hash="15edfec649fa894ec310e3e37d97f694"/><dir name="Smsuser"><file name="Collection.php" hash="dad8d028a32e3a860d254c0957f9d23f"/></dir><file name="Smsuser.php" hash="b9913d6c444f646623d6e282f35e8a08"/><dir name="Template"><file name="Collection.php" hash="a9e237b2e23e64e7226a95d3e6e9a7dc"/></dir><file name="Template.php" hash="20a0aad89f43fa6716d96ece9f243000"/><dir name="Textsender"><file name="Collection.php" hash="1574273dc207231460977dce7af007a9"/></dir><file name="Textsender.php" hash="242e7ac5f28b7e7b8521e201fe7cf806"/><dir name="Variables"><file name="Collection.php" hash="0c249b390280ba16db97d3acd320fedb"/></dir><file name="Variables.php" hash="e364920ad4d1a69f33ec037184f27de7"/></dir><file name="Observer.php" hash="49e655453ae47a6420161997cf2c0f80"/><dir name="Overide"><dir name="Cataloginventory"><file name="Stock.php" hash="76e53307192e54dc08b0983288acdda3"/></dir></dir><file name="Ownnumbersender.php" hash="c209b3a3756491c3d9f30c1a9055361b"/><dir name="Routes"><file name="Alternative.php" hash="c52374301eb8e0726dc54e8b08b24a8d"/></dir><file name="Routes.php" hash="917bf19f5983ccafa6e61cd9cc1d8f13"/><file name="Sms.php" hash="d21d93cde482b9767497bf3ef1e62c8f"/><file name="Smshistory.php" hash="b96ef0d1f609d28159c5a03777c953ce"/><file name="Smsprofile.php" hash="4ff023aa338c1eab827448e2c0712852"/><file name="Smsuser.php" hash="1f4906fe7a288e95de706b1343f5b985"/><dir name="System"><dir name="Config"><file name="Lang.php" hash="7bb45d97a8c3f4b4a32bf1229f5cab8b"/></dir></dir><file name="Template.php" hash="8590ec1c798028e5025bf866629bf719"/><file name="Textsender.php" hash="589c0a2087ba27d6e5310796b60e6a48"/><file name="Variables.php" hash="12844fb6fc0c4258cdcbb8d6b5343fc9"/></dir><file name="api_test1.php" hash="8a71c6b1d085ee65b3bde60c20379c9d"/><file name="api_test2.php" hash="6c1d19f8fc1e8a71a1f3129541939262"/><file name="api_test3.php" hash="9c162033d327a93bc974aa20804c161d"/><dir name="controllers"><dir name="Adminhtml"><dir name="Magesms"><file name="AboutController.php" hash="28de3dfca6c6a9ff46228ae4833ea10b"/><file name="AdminsmsController.php" hash="3de78bd855405893f2ad460c33f7d737"/><file name="AnswersController.php" hash="ca05a9506f32a90ff359f01f90ff7031"/><file name="CustomersmsController.php" hash="63513d1ee5795b64a30d878859ae21e9"/><file name="HistoryController.php" hash="3505d4adb2f3b2db83f62570fe8b49be"/><file name="MarketingController.php" hash="2ec351e68d518385a0f592959340ea8e"/><file name="OptoutController.php" hash="4e72b192749f1fabf527194712094414"/><file name="ProfileController.php" hash="511e53d9ed0df629c2fbc213b3ef5c9d"/><file name="PurchasecreditController.php" hash="377c26a55d5fc6e0ebfa281298747a00"/><file name="SendsmsController.php" hash="aa163c55589f55bc03e97a6d1ad78b71"/><file name="StatisticsController.php" hash="65b69a09bf45b80291a15c87ebb6ad04"/><file name="WizardController.php" hash="9490eff5f58b48aa35c8749ee803003c"/></dir></dir><file name="ApiController.php" hash="9756da9bfb339b1ddbab7883b7e362b1"/><file name="DeliveryController.php" hash="8f604254b6c19c9adb84bea325e3c8ea"/><file name="IndexController.php" hash="aa69e6f90f6e822941f382b1162c75d6"/></dir><dir name="data"><dir name="magesms_setup"><file name="data-install-1.0.0.php" hash="5df79e7e9193abbac12191f35c4d45a9"/><file name="data-upgrade-1.0.1-1.0.2.php" hash="290c4939bebfd6a0529dc7da20534bf5"/><file name="data-upgrade-1.0.3-1.0.4.php" hash="a60b7ce260a43d71c3afcb62e4f875e2"/><file name="data-upgrade-1.1.0-1.1.1.php" hash="c464142a975b03b81a49ba41284e1b96"/><file name="data-upgrade-1.1.1-1.1.2.php" hash="28fc124ce1e29130056ed059e5c824f0"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="637551698f955e9428774cc64e91ccb9"/><file name="config.xml" hash="57fb442eac004b8649accd94017b8382"/><file name="system.xml" hash="dbc73379e62abcbe045e203f6a0a6b41"/></dir><dir name="sql"><dir name="magesms_setup"><file name="mysql4-install-0.9.0.php" hash="b3d8975e98cb1cfe12194d7a18bbfc2f"/><file name="mysql4-install-1.0.0.php" hash="d7363753089c833e275847a9137b6c89"/><file name="mysql4-upgrade-0.9.11-0.9.12.php" hash="765533b9d6f9fa987949c0a5f73ff37d"/><file name="mysql4-upgrade-0.9.12-0.9.13.php" hash="0d3ea4875bd51593c8113805402e58fd"/><file name="mysql4-upgrade-1.0.1-1.0.2.php" hash="02b2fecd79ace03940cd7c50419c8878"/><file name="mysql4-upgrade-1.1.3-1.1.4.php" hash="d0b532bf1d394fbd27c577bd9de27564"/><file name="mysql4-upgrade-1.1.5-1.2.0.php" hash="1f32fbc9aacc4e0139fd91b35589d591"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="topefekt"><dir name="magesms"><file name="about.phtml" hash="915f3356c5819a3d7373865f665d626f"/><file name="adminsms.phtml" hash="8cd430b34c539174e2820b3c99508c9b"/><file name="customersms.phtml" hash="891bca1a083b1bcaa2399b6a1ec9be34"/><file name="history.phtml" hash="54cea1bf5ed0d03da9f430a6b17d5195"/><dir name="marketing"><file name="customer.phtml" hash="5d56650f36d41535808dbcc9f0670e35"/><file name="form.phtml" hash="65fcf660c87073a407475cdeeca0dc73"/></dir><file name="marketing.phtml" hash="630defb84f73d76435b67d05b4e4691e"/><file name="optout.phtml" hash="78891f09375e29485e58b68623a1ebb2"/><file name="profile.phtml" hash="7aa0f7b562bb8a6e4c4fc07f7058d144"/><file name="purchasecredit.phtml" hash="0ec35354e68a85b0fff078f9a8b14d96"/><file name="sendsms.phtml" hash="3a2f21302e2b246d149998bfdfea95d9"/><file name="statistics.phtml" hash="dd708338a0a5ad36bb10141ad394ea22"/><dir name="template"><file name="form.phtml" hash="7c0bf138d2ca17c74aed9ca04f022ca1"/></dir><file name="wizard-alternative.phtml" hash="02f45be72c019e52a1d4028367eafb6b"/><file name="wizard-edit.phtml" hash="e247901a92b290fcb85128b4a08ee91d"/><file name="wizard-list.phtml" hash="cee281d28e0b61f93c0acb90f064c922"/><file name="wizard-sender.phtml" hash="3ff2f15bf3e6db24f2e771f7aa2a500b"/><file name="wizard.phtml" hash="d0a70bb920e76604959c48de8fe57c84"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Topefekt_Magesms.xml" hash="d88282bf3409717dcc6c8d36102480a3"/></dir></target><target name="magelocale"><dir><dir name="cs_CZ"><file name="Topefekt_Magesms.csv" hash="5e4e56d3a7bf4f67d89342737bfb97ec"/></dir><dir name="de_DE"><file name="Topefekt_Magesms.csv" hash="2e7287b30954b3126169403822669f2a"/></dir><dir name="el_GR"><file name="Topefekt_Magesms.csv" hash="b4d8c7090d22aa1ae994ea2f13b27593"/></dir><dir name="en_US"><file name="Topefekt_Magesms.csv" hash="2aeade9ce5193f08d1b19959631764d0"/></dir><dir name="es_ES"><file name="Topefekt_Magesms.csv" hash="66aae8475301ad574cdecec4511aab80"/></dir><dir name="fr_FR"><file name="Topefekt_Magesms.csv" hash="b9f82cdd6f0779e8b13dee31e7bd8974"/></dir><dir name="it_IT"><file name="Topefekt_Magesms.csv" hash="aa2a250c18b47bf5ccad1787e2dbebda"/></dir><dir name="pl_PL"><file name="Topefekt_Magesms.csv" hash="622944ce311c1ffb5e9e8fb6c4c447cc"/></dir><dir name="pt_PT"><file name="Topefekt_Magesms.csv" hash="d7b14419f2ee4469bcf023729b523e3d"/></dir><dir name="ru_RU"><file name="Topefekt_Magesms.csv" hash="c92302b7f783678c0903695a6a47fcee"/></dir><dir name="sk_SK"><file name="Topefekt_Magesms.csv" hash="9dd75806bfa36ee683365c3ef99ad0a8"/></dir><dir name="sr_RS"><file name="Topefekt_Magesms.csv" hash="17761427d3db52adb3d55bc68c7fece9"/></dir><dir name="tr_TR"><file name="Topefekt_Magesms.csv" hash="c64505ca859e2004090fd2729ffe7b65"/></dir></dir></target><target name="magemedia"><dir name="magesms"><file name="About.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="AdminCatalog.gif" hash="2500d6277ec65b73cec8e858e8f3e5ef"/><file name="AdminCustomers.gif" hash="2575dfefce12bc9451e4dfa1e0972a1e"/><file name="AdminEmployees.gif" hash="cdb742ba271aae8e0f5129e9422d8480"/><file name="AdminOrders.gif" hash="b0b296f24674d37c3749a4c68e014173"/><file name="AdminSms.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="AdminSmsProfile.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="AdminTools.gif" hash="a3d566311d5cdd11470e60a30c4f1a1d"/><file name="CustomerSms.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="Empty.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="PayPal123.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="SendSms.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="SmsAnswers.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="SmsCharging.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="SmsHistory.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="SmsMarketing.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="SmsWizard.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="calendar.jpg" hash="ec1c2dde2879bca23fb232bdfb6459b1"/><file name="delete.gif" hash="b658193cc19b4be4776fbca433c86354"/><file name="edit.gif" hash="100198930f65efde449cce2d4fd3dd49"/><file name="i_accepted.gif" hash="befd5320058efee73744cb53f1ac58a6"/><file name="i_buffered.png" hash="df919a54ebb68a101899da77671a7ae4"/><file name="i_canceled.gif" hash="f54cd085dc4a709a590650df64c9307a"/><file name="i_deleted.png" hash="2cac2bf05b4f0bfc7f0b24ad3274c8aa"/><file name="i_donotdisturb.png" hash="cc15ea466d59c68c2278f9eac825fac9"/><file name="i_duplicate.png" hash="9a12c256c640bae544204d17933a8e0b"/><file name="i_error.gif" hash="45f02b921ce504353050a3921c6a6b70"/><file name="i_minus.gif" hash="16e4ff79084066203148d261b4d14712"/><file name="i_plus.gif" hash="1cc64296ccbf2bd9dfd61a0ce6a7f117"/><file name="i_scheduled.png" hash="b644f202e2a2cf0fccf073dfdc8befb1"/><file name="i_sent.png" hash="938d41c783cc770339e1febbe2fe538e"/><file name="i_simulation.png" hash="6b6f65f4c1ca5e9017c978274a186091"/><file name="licence_cz.pdf" hash="c61b5f052326b3cb74dd3346911c41bb"/><file name="licence_en.pdf" hash="5a96ef0dcb08cee786ef574c16608365"/><file name="logo.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="logocart.png" hash="cb095b552c60e3c23ac449a453981e6c"/><file name="magesms-logo.png" hash="5352d2cb3b95990a1eb237f0d48ed811"/><file name="next.gif" hash="d4a145a07fa436e51cbaa4a28c14b622"/><file name="prev.gif" hash="d1dab45da5f0690fcaac4ce62f6bd04d"/><file name="sms.png" hash="5473a773314938564ad2f8fb826445bd"/><file name="topefekt-logo.gif" hash="149c7fd9bb2a4f70637963b0036e5a07"/><file name="translation.gif" hash="d2f85c78ea940b1a62919e50175a4c4f"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="css"><dir name="topefekt"><dir name="magesms"><dir name="img"><file name="i_canceled.gif" hash="f54cd085dc4a709a590650df64c9307a"/><file name="i_sent.png" hash="938d41c783cc770339e1febbe2fe538e"/></dir><file name="stylesheet.css" hash="24cf22aaf8499776fda44f33ad245799"/></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="topefekt"><file name="functions.js" hash="bd4bde8c632a3d5eb8d7c21278189875"/><file name="template.js" hash="26a2428302a7306fd49b940529147042"/></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>TOPefekt_Magesms</name>
|
4 |
+
<version>1.2.1</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/BSD-3-Clause">BSD</license>
|
7 |
<channel>community</channel>
|
10 |
<description>Free SMS module for Magento with advanced features and user friendly design.</description>
|
11 |
<notes>2014</notes>
|
12 |
<authors><author><name>Frantisek Barancik</name><user>SIRAPY</user><email>barancik@sirapy.cz</email></author><author><name>Lubomir Kozak</name><user>TOPefekt</user><email>info@topefekt.com</email></author></authors>
|
13 |
+
<date>2014-10-10</date>
|
14 |
+
<time>10:48:16</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Topefekt"><dir name="Magesms"><dir name="Block"><dir name="Answers"><file name="Grid.php" hash="b4161fe0c9f84ae2842ad1c5b1fee67b"/><dir name="Renderer"><file name="Actions.php" hash="8978857641921533a7ef1a511d6e98cc"/><file name="Smsc.php" hash="dec1e2ffb867499edaf2660e83a1f763"/></dir></dir><file name="Answers.php" hash="d8e8f1ddc9dc2c200d48ba61fd45f258"/><dir name="Customer"><file name="Grid.php" hash="01cd30df42024487ddbb85dc805b29f2"/></dir><file name="Customer.php" hash="8817fa3634895fb9317fc7c979f326fa"/><file name="Magesms.php" hash="80c1ac3571e5305b9a18a332d50d3598"/><dir name="Marketing"><file name="Customer.php" hash="91fcf8f90baf8ceeef6bdce74838e9e9"/><file name="Form.php" hash="1f6f5fb07741aae051f4250a027df299"/><file name="Grid.php" hash="6866d29549f350f009971deda49f31f7"/><file name="Template.php" hash="1f48e5754feb003ff361824ca0e29ebb"/></dir><file name="Marketing.php" hash="298b9175edc892566097f199f95f0d95"/><file name="Profile.php" hash="87be5911ea730b61179eaa43274ed031"/><file name="ShowTabsAdminBlock.php" hash="9d021b7bfa6ca922d7074313865bde87"/><dir name="System"><dir name="Config"><file name="Apikeygenerator.php" hash="9b5f9256de21a985efbacbbc00032296"/></dir></dir><dir name="Template"><file name="Template.php" hash="4713fdc848c5f1d5ab771011df11ff40"/></dir><file name="Template.php" hash="1420e7b7615214a3cfe8ef87d86ebd1a"/><dir name="Wizard"><file name="Grid.php" hash="62ea044623fda139cdc23e8a768d1b60"/></dir><file name="Wizard.php" hash="ef10fbfc80385cb9e90e7a6bfbf555f4"/></dir><dir name="Controller"><file name="Action.php" hash="a12f3ca7279da57be21521e7e1f33b7b"/><dir name="Template"><file name="Action.php" hash="c1fbebd2736adfbeb1ad7dd1d93fe2d9"/></dir></dir><dir name="Helper"><dir name="Adminhtml"><file name="Data.php" hash="ebf8c3ac5f4ede5e30218f307c60c9c3"/></dir><file name="Data.php" hash="ce1437fd6586beb716b631fa5617fe04"/></dir><dir name="Model"><file name="Admins.php" hash="ced35da523fa261708ca76bf09744492"/><file name="Answers.php" hash="33fcc03e70064860f47b17291b2682ec"/><file name="Api.php" hash="6b5b23ac096fd8090926bc7fc5e6900c"/><dir name="Country"><file name="Area.php" hash="4268548148d51c519328472ae744e0cd"/><file name="Lang.php" hash="1c47ceb19d913853c9ee7ab9b50f010a"/></dir><file name="Country.php" hash="6ea4a1f25f0c43c14392903328bbf794"/><file name="Exceptions.php" hash="856910cdd46ffcfb8b961826c8563670"/><dir name="Hooks"><file name="Admins.php" hash="c42b32a696e6101f50dc67942d738e6d"/><file name="Customers.php" hash="cc275a7f7c738174b420bd3c3301f79d"/><file name="Templates.php" hash="bcf959ff2f2c84bc8f287e5d7dfd637a"/><file name="Unicode.php" hash="351a49d393871e186921a98376aaa5bb"/></dir><file name="Hooks.php" hash="522c2544fc306cb35bcfff8f456420d7"/><file name="Magesms.php" hash="e299fef5c1617dc2aba79861a170ee57"/><file name="Maps.php" hash="7526a18b5bda119e8b564b95e13c823f"/><dir name="Marketing"><dir name="Filter"><file name="Birthday.php" hash="56d6e9638c2548a9dabd86548609d04d"/><file name="Birthdayall.php" hash="52b7459447fd8964c79bff54aef7499e"/><file name="City.php" hash="851bf11fa4eba68f5afe90bc73061075"/><file name="Collection.php" hash="a59b5af9d4dbdb3a4f4d2a319991526a"/><file name="Country.php" hash="226ea48e858db867cad73ec5df430481"/><file name="Firstname.php" hash="d2fb9d1c18d65616e85b94a19d937303"/><file name="Gender.php" hash="08583ec548a718fd598db0c8382f8fea"/><file name="Group.php" hash="5ae6a9e763a228d66dec97d6edd9504b"/><file name="Lastname.php" hash="4ce733ed97662ae7e3b9bd7fd09a9b23"/><file name="Newsletter.php" hash="e32e2584c4a5b4e83774c90ca8e03d21"/><file name="Register.php" hash="18462dd6abae0d72f6863a285364885a"/><file name="Type.php" hash="49b3fefa77c399003a60edc716a19810"/><file name="Website.php" hash="998fa5822c12e7e10a9363c74922d25f"/></dir><file name="Filter.php" hash="c67e8a70e671dc9c05194d6fea62ba1d"/></dir><dir name="Mysql4"><dir name="Admins"><file name="Collection.php" hash="c1ada270e5c640cc77beca20a90c06c1"/></dir><file name="Admins.php" hash="c1efc07554a47ddd61add948f8d7184d"/><dir name="Answers"><file name="Collection.php" hash="e0d1dfb4666cd442105b786cd8e1938b"/></dir><file name="Answers.php" hash="9b116c0acd6598b22fda9a3f7bfd0e1f"/><file name="Collection.php" hash="0713d799c11bcc14437ca3924d0aae0f"/><dir name="Country"><dir name="Area"><file name="Collection.php" hash="57076e9ef2eaee34ede11fd2b8c079ea"/></dir><file name="Area.php" hash="cb14e562273148090fcafe17a5764dcf"/><file name="Collection.php" hash="9d1c5aa0e9d956d98e45706dd24dc0f0"/><dir name="Lang"><file name="Collection.php" hash="5784492b259d0636c5c37f3f945873cf"/></dir><file name="Lang.php" hash="45c61334ccc799908468603a1601f75f"/></dir><file name="Country.php" hash="dd1e7ba04fb2d2484fcd14d35fd63513"/><dir name="Exceptions"><file name="Collection.php" hash="0f27011bb167d3686149edcea2cf9af0"/></dir><file name="Exceptions.php" hash="087363570c7e19e98343508fde136b71"/><dir name="Hooks"><dir name="Admins"><file name="Collection.php" hash="08c59f372ae4d724d1451836df655deb"/></dir><file name="Admins.php" hash="0b97679a105c98c53fb27e6f35cc49da"/><file name="Collection.php" hash="781323404157c7935539212e6c9d5948"/><dir name="Customers"><file name="Collection.php" hash="9f85b8e63521abcc575d717eaca6f7b0"/></dir><file name="Customers.php" hash="446451f0e038bc5b25ec0d3032a608a9"/><dir name="Templates"><file name="Collection.php" hash="10d674db501bdd93bfc11e0411be53b2"/></dir><file name="Templates.php" hash="b9d88cc611aa7c5ea369d9b4056a3858"/><dir name="Unicode"><file name="Collection.php" hash="e30a9e81400f25829b89d8fa4927e4e7"/></dir><file name="Unicode.php" hash="930b9f23e7b0674cef75898bebd8d4f5"/></dir><file name="Hooks.php" hash="db0d3898325974475d39f0dd786a0c7d"/><dir name="Maps"><file name="Collection.php" hash="2b8609291dc25d2445b1c168024c1783"/></dir><file name="Maps.php" hash="21e7e04096b879db02971223dbf11a1a"/><dir name="Marketing"><dir name="Filter"><file name="Collection.php" hash="ee5bfddfe067a317c94b62eea4e59aeb"/></dir><file name="Filter.php" hash="42342671cb9bcbca71165ffffa7d309d"/></dir><dir name="Ownnumbersender"><file name="Collection.php" hash="0f77ebc089da24e306dc2616178fab35"/></dir><file name="Ownnumbersender.php" hash="0b8963a836de22ff2c54ec8a6f0819bd"/><dir name="Routes"><dir name="Alternative"><file name="Collection.php" hash="dd8908e3c72bef9a4d54ab4d04119fc9"/></dir><file name="Alternative.php" hash="0b07c80a9b35a1dc6f16e310614ddbda"/><file name="Collection.php" hash="9a9f26422877c0ff82f5bc3a6865ed1f"/></dir><file name="Routes.php" hash="f500ad3e8d96b8742a194015acdd4c58"/><dir name="Smshistory"><file name="Collection.php" hash="76f838ee4e14af4789e494badf46ad84"/></dir><file name="Smshistory.php" hash="15edfec649fa894ec310e3e37d97f694"/><dir name="Smsuser"><file name="Collection.php" hash="dad8d028a32e3a860d254c0957f9d23f"/></dir><file name="Smsuser.php" hash="b9913d6c444f646623d6e282f35e8a08"/><dir name="Template"><file name="Collection.php" hash="a9e237b2e23e64e7226a95d3e6e9a7dc"/></dir><file name="Template.php" hash="20a0aad89f43fa6716d96ece9f243000"/><dir name="Textsender"><file name="Collection.php" hash="1574273dc207231460977dce7af007a9"/></dir><file name="Textsender.php" hash="242e7ac5f28b7e7b8521e201fe7cf806"/><dir name="Variables"><file name="Collection.php" hash="0c249b390280ba16db97d3acd320fedb"/></dir><file name="Variables.php" hash="e364920ad4d1a69f33ec037184f27de7"/></dir><file name="Observer.php" hash="49e655453ae47a6420161997cf2c0f80"/><dir name="Overide"><dir name="Cataloginventory"><file name="Stock.php" hash="76e53307192e54dc08b0983288acdda3"/></dir></dir><file name="Ownnumbersender.php" hash="c209b3a3756491c3d9f30c1a9055361b"/><dir name="Routes"><file name="Alternative.php" hash="c52374301eb8e0726dc54e8b08b24a8d"/></dir><file name="Routes.php" hash="917bf19f5983ccafa6e61cd9cc1d8f13"/><file name="Sms.php" hash="5df02903304d576cfac33698565ecc0f"/><file name="Smshistory.php" hash="b96ef0d1f609d28159c5a03777c953ce"/><file name="Smsprofile.php" hash="4ff023aa338c1eab827448e2c0712852"/><file name="Smsuser.php" hash="1f4906fe7a288e95de706b1343f5b985"/><dir name="System"><dir name="Config"><file name="Lang.php" hash="7bb45d97a8c3f4b4a32bf1229f5cab8b"/></dir></dir><file name="Template.php" hash="8590ec1c798028e5025bf866629bf719"/><file name="Textsender.php" hash="589c0a2087ba27d6e5310796b60e6a48"/><file name="Variables.php" hash="12844fb6fc0c4258cdcbb8d6b5343fc9"/></dir><file name="api_test1.php" hash="8a71c6b1d085ee65b3bde60c20379c9d"/><file name="api_test2.php" hash="6c1d19f8fc1e8a71a1f3129541939262"/><file name="api_test3.php" hash="9c162033d327a93bc974aa20804c161d"/><dir name="controllers"><dir name="Adminhtml"><dir name="Magesms"><file name="AboutController.php" hash="28de3dfca6c6a9ff46228ae4833ea10b"/><file name="AdminsmsController.php" hash="3de78bd855405893f2ad460c33f7d737"/><file name="AnswersController.php" hash="ca05a9506f32a90ff359f01f90ff7031"/><file name="CustomersmsController.php" hash="98482d09c3a1194170f0b010e5c0487e"/><file name="HistoryController.php" hash="ca2a53f872a87ce16bbacfb1bcbb376b"/><file name="MarketingController.php" hash="754ac431dd48cb4b25ee1ade24d31e1f"/><file name="OptoutController.php" hash="4e72b192749f1fabf527194712094414"/><file name="ProfileController.php" hash="511e53d9ed0df629c2fbc213b3ef5c9d"/><file name="PurchasecreditController.php" hash="377c26a55d5fc6e0ebfa281298747a00"/><file name="SendsmsController.php" hash="aa163c55589f55bc03e97a6d1ad78b71"/><file name="StatisticsController.php" hash="65b69a09bf45b80291a15c87ebb6ad04"/><file name="WizardController.php" hash="fadcde5fbdf51869a917b8bc20596530"/></dir></dir><file name="ApiController.php" hash="9756da9bfb339b1ddbab7883b7e362b1"/><file name="DeliveryController.php" hash="8f604254b6c19c9adb84bea325e3c8ea"/><file name="IndexController.php" hash="aa69e6f90f6e822941f382b1162c75d6"/></dir><dir name="data"><dir name="magesms_setup"><file name="data-install-1.0.0.php" hash="5df79e7e9193abbac12191f35c4d45a9"/><file name="data-upgrade-1.0.1-1.0.2.php" hash="290c4939bebfd6a0529dc7da20534bf5"/><file name="data-upgrade-1.0.3-1.0.4.php" hash="a60b7ce260a43d71c3afcb62e4f875e2"/><file name="data-upgrade-1.1.0-1.1.1.php" hash="c464142a975b03b81a49ba41284e1b96"/><file name="data-upgrade-1.1.1-1.1.2.php" hash="28fc124ce1e29130056ed059e5c824f0"/><file name="data-upgrade-1.2.0-1.2.1.php" hash="119a68ac6e6238bfa07c1b5cc90045d0"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="637551698f955e9428774cc64e91ccb9"/><file name="config.xml" hash="fd1f98910320f36bf666c19745348dfe"/><file name="system.xml" hash="dbc73379e62abcbe045e203f6a0a6b41"/></dir><dir name="sql"><dir name="magesms_setup"><file name="mysql4-install-0.9.0.php" hash="b3d8975e98cb1cfe12194d7a18bbfc2f"/><file name="mysql4-install-1.0.0.php" hash="d7363753089c833e275847a9137b6c89"/><file name="mysql4-upgrade-0.9.11-0.9.12.php" hash="765533b9d6f9fa987949c0a5f73ff37d"/><file name="mysql4-upgrade-0.9.12-0.9.13.php" hash="0d3ea4875bd51593c8113805402e58fd"/><file name="mysql4-upgrade-1.0.1-1.0.2.php" hash="02b2fecd79ace03940cd7c50419c8878"/><file name="mysql4-upgrade-1.1.3-1.1.4.php" hash="d0b532bf1d394fbd27c577bd9de27564"/><file name="mysql4-upgrade-1.1.5-1.2.0.php" hash="1f32fbc9aacc4e0139fd91b35589d591"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="topefekt"><dir name="magesms"><file name="about.phtml" hash="915f3356c5819a3d7373865f665d626f"/><file name="adminsms.phtml" hash="8cd430b34c539174e2820b3c99508c9b"/><file name="customersms.phtml" hash="891bca1a083b1bcaa2399b6a1ec9be34"/><file name="history.phtml" hash="27325466405ae1a33f93978434b4ad11"/><dir name="marketing"><file name="customer.phtml" hash="5d56650f36d41535808dbcc9f0670e35"/><file name="form.phtml" hash="37a354655ae727480d779c6775d227f2"/></dir><file name="marketing.phtml" hash="630defb84f73d76435b67d05b4e4691e"/><file name="optout.phtml" hash="78891f09375e29485e58b68623a1ebb2"/><file name="profile.phtml" hash="7aa0f7b562bb8a6e4c4fc07f7058d144"/><file name="purchasecredit.phtml" hash="0ec35354e68a85b0fff078f9a8b14d96"/><file name="sendsms.phtml" hash="3a2f21302e2b246d149998bfdfea95d9"/><file name="statistics.phtml" hash="dd708338a0a5ad36bb10141ad394ea22"/><dir name="template"><file name="form.phtml" hash="e6a006574345ef9e85e28251310d96ec"/></dir><file name="wizard-alternative.phtml" hash="53128ea65c7eb6ea80faac040c0d63f2"/><file name="wizard-edit.phtml" hash="e247901a92b290fcb85128b4a08ee91d"/><file name="wizard-list.phtml" hash="cee281d28e0b61f93c0acb90f064c922"/><file name="wizard-sender.phtml" hash="3ff2f15bf3e6db24f2e771f7aa2a500b"/><file name="wizard.phtml" hash="d0a70bb920e76604959c48de8fe57c84"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Topefekt_Magesms.xml" hash="d88282bf3409717dcc6c8d36102480a3"/></dir></target><target name="magelocale"><dir><dir name="cs_CZ"><file name="Topefekt_Magesms.csv" hash="01ffb74e44c2d2374fe9ef4768888e13"/></dir><dir name="de_DE"><file name="Topefekt_Magesms.csv" hash="2e7287b30954b3126169403822669f2a"/></dir><dir name="el_GR"><file name="Topefekt_Magesms.csv" hash="b4d8c7090d22aa1ae994ea2f13b27593"/></dir><dir name="en_US"><file name="Topefekt_Magesms.csv" hash="2aeade9ce5193f08d1b19959631764d0"/></dir><dir name="es_ES"><file name="Topefekt_Magesms.csv" hash="66aae8475301ad574cdecec4511aab80"/></dir><dir name="fr_FR"><file name="Topefekt_Magesms.csv" hash="b9f82cdd6f0779e8b13dee31e7bd8974"/></dir><dir name="it_IT"><file name="Topefekt_Magesms.csv" hash="aa2a250c18b47bf5ccad1787e2dbebda"/></dir><dir name="pl_PL"><file name="Topefekt_Magesms.csv" hash="622944ce311c1ffb5e9e8fb6c4c447cc"/></dir><dir name="pt_PT"><file name="Topefekt_Magesms.csv" hash="d7b14419f2ee4469bcf023729b523e3d"/></dir><dir name="ru_RU"><file name="Topefekt_Magesms.csv" hash="c92302b7f783678c0903695a6a47fcee"/></dir><dir name="sk_SK"><file name="Topefekt_Magesms.csv" hash="5662bb27898880cfceb182daa346869e"/></dir><dir name="sr_RS"><file name="Topefekt_Magesms.csv" hash="17761427d3db52adb3d55bc68c7fece9"/></dir><dir name="tr_TR"><file name="Topefekt_Magesms.csv" hash="c64505ca859e2004090fd2729ffe7b65"/></dir></dir></target><target name="magemedia"><dir name="magesms"><file name="About.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="AdminCatalog.gif" hash="2500d6277ec65b73cec8e858e8f3e5ef"/><file name="AdminCustomers.gif" hash="2575dfefce12bc9451e4dfa1e0972a1e"/><file name="AdminEmployees.gif" hash="cdb742ba271aae8e0f5129e9422d8480"/><file name="AdminOrders.gif" hash="b0b296f24674d37c3749a4c68e014173"/><file name="AdminSms.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="AdminSmsProfile.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="AdminTools.gif" hash="a3d566311d5cdd11470e60a30c4f1a1d"/><file name="CustomerSms.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="Empty.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="PayPal123.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="SendSms.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="SmsAnswers.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="SmsCharging.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="SmsHistory.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="SmsMarketing.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="SmsWizard.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="calendar.jpg" hash="ec1c2dde2879bca23fb232bdfb6459b1"/><file name="delete.gif" hash="b658193cc19b4be4776fbca433c86354"/><file name="edit.gif" hash="100198930f65efde449cce2d4fd3dd49"/><file name="i_accepted.gif" hash="befd5320058efee73744cb53f1ac58a6"/><file name="i_buffered.png" hash="df919a54ebb68a101899da77671a7ae4"/><file name="i_canceled.gif" hash="f54cd085dc4a709a590650df64c9307a"/><file name="i_deleted.png" hash="2cac2bf05b4f0bfc7f0b24ad3274c8aa"/><file name="i_donotdisturb.png" hash="cc15ea466d59c68c2278f9eac825fac9"/><file name="i_duplicate.png" hash="9a12c256c640bae544204d17933a8e0b"/><file name="i_error.gif" hash="45f02b921ce504353050a3921c6a6b70"/><file name="i_minus.gif" hash="16e4ff79084066203148d261b4d14712"/><file name="i_plus.gif" hash="1cc64296ccbf2bd9dfd61a0ce6a7f117"/><file name="i_scheduled.png" hash="b644f202e2a2cf0fccf073dfdc8befb1"/><file name="i_sent.png" hash="938d41c783cc770339e1febbe2fe538e"/><file name="i_simulation.png" hash="6b6f65f4c1ca5e9017c978274a186091"/><file name="licence_cz.pdf" hash="c61b5f052326b3cb74dd3346911c41bb"/><file name="licence_en.pdf" hash="5a96ef0dcb08cee786ef574c16608365"/><file name="logo.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="logocart.png" hash="cb095b552c60e3c23ac449a453981e6c"/><file name="magesms-logo.png" hash="5352d2cb3b95990a1eb237f0d48ed811"/><file name="next.gif" hash="d4a145a07fa436e51cbaa4a28c14b622"/><file name="prev.gif" hash="d1dab45da5f0690fcaac4ce62f6bd04d"/><file name="sms.png" hash="5473a773314938564ad2f8fb826445bd"/><file name="topefekt-logo.gif" hash="149c7fd9bb2a4f70637963b0036e5a07"/><file name="translation.gif" hash="d2f85c78ea940b1a62919e50175a4c4f"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="css"><dir name="topefekt"><dir name="magesms"><dir name="img"><file name="i_canceled.gif" hash="f54cd085dc4a709a590650df64c9307a"/><file name="i_sent.png" hash="938d41c783cc770339e1febbe2fe538e"/></dir><file name="stylesheet.css" hash="24cf22aaf8499776fda44f33ad245799"/></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="topefekt"><file name="functions.js" hash="bd4bde8c632a3d5eb8d7c21278189875"/><file name="template.js" hash="26a2428302a7306fd49b940529147042"/></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|