TOPefekt_Magesms - Version 1.3.4

Version Notes

2014-2015

Download this release

Release Info

Developer Frantisek Barancik
Extension TOPefekt_Magesms
Version 1.3.4
Comparing to
See all releases


Code changes from version 1.3.2 to 1.3.4

Files changed (184) hide show
  1. app/code/community/Topefekt/Magesms/Block/Answers.php +1 -1
  2. app/code/community/Topefekt/Magesms/Block/Answers/Grid.php +1 -1
  3. app/code/community/Topefekt/Magesms/Block/Answers/Renderer/Actions.php +1 -1
  4. app/code/community/Topefekt/Magesms/Block/Answers/Renderer/Smsc.php +1 -1
  5. app/code/community/Topefekt/Magesms/Block/Cart.php +16 -0
  6. app/code/community/Topefekt/Magesms/Block/Customer.php +1 -1
  7. app/code/community/Topefekt/Magesms/Block/Customer/Grid.php +1 -1
  8. app/code/community/Topefekt/Magesms/Block/Customer/Marketing.php +16 -0
  9. app/code/community/Topefekt/Magesms/Block/Magesms.php +1 -1
  10. app/code/community/Topefekt/Magesms/Block/Marketing.php +1 -1
  11. app/code/community/Topefekt/Magesms/Block/Marketing/Customer.php +1 -1
  12. app/code/community/Topefekt/Magesms/Block/Marketing/Form.php +2 -2
  13. app/code/community/Topefekt/Magesms/Block/Marketing/Grid.php +1 -1
  14. app/code/community/Topefekt/Magesms/Block/Marketing/Template.php +1 -1
  15. app/code/community/Topefekt/Magesms/Block/Profile.php +1 -1
  16. app/code/community/Topefekt/Magesms/Block/ShowTabsAdminBlock.php +0 -16
  17. app/code/community/Topefekt/Magesms/Block/System/Config/Apikeygenerator.php +1 -1
  18. app/code/community/Topefekt/Magesms/Block/Template.php +1 -1
  19. app/code/community/Topefekt/Magesms/Block/Template/Template.php +1 -1
  20. app/code/community/Topefekt/Magesms/Block/Wizard.php +1 -1
  21. app/code/community/Topefekt/Magesms/Block/Wizard/Grid.php +1 -1
  22. app/code/community/Topefekt/Magesms/Controller/Action.php +1 -1
  23. app/code/community/Topefekt/Magesms/Controller/Template/Action.php +1 -1
  24. app/code/community/Topefekt/Magesms/Helper/Adminhtml/Data.php +1 -1
  25. app/code/community/Topefekt/Magesms/Helper/Data.php +2 -2
  26. app/code/community/Topefekt/Magesms/Model/Admins.php +1 -1
  27. app/code/community/Topefekt/Magesms/Model/Answers.php +1 -1
  28. app/code/community/Topefekt/Magesms/Model/Api.php +1 -1
  29. app/code/community/Topefekt/Magesms/Model/Country.php +1 -1
  30. app/code/community/Topefekt/Magesms/Model/Country/Area.php +1 -1
  31. app/code/community/Topefekt/Magesms/Model/Country/Lang.php +1 -1
  32. app/code/community/Topefekt/Magesms/Model/Exceptions.php +2 -2
  33. app/code/community/Topefekt/Magesms/Model/Hooks.php +2 -2
  34. app/code/community/Topefekt/Magesms/Model/Hooks/Admins.php +1 -1
  35. app/code/community/Topefekt/Magesms/Model/Hooks/Customers.php +1 -1
  36. app/code/community/Topefekt/Magesms/Model/Hooks/Templates.php +1 -1
  37. app/code/community/Topefekt/Magesms/Model/Hooks/Unicode.php +1 -1
  38. app/code/community/Topefekt/Magesms/Model/Magesms.php +1 -1
  39. app/code/community/Topefekt/Magesms/Model/Maps.php +2 -2
  40. app/code/community/Topefekt/Magesms/Model/Marketing/Filter.php +2 -2
  41. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Birthday.php +1 -1
  42. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Birthdayall.php +1 -1
  43. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/City.php +1 -1
  44. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Collection.php +1 -1
  45. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Country.php +1 -1
  46. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Firstname.php +1 -1
  47. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Gender.php +1 -1
  48. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Group.php +1 -1
  49. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Lastname.php +1 -1
  50. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Newsletter.php +1 -1
  51. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Orderssum.php +16 -0
  52. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Product.php +16 -0
  53. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Register.php +1 -1
  54. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Type.php +1 -1
  55. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Website.php +1 -1
  56. app/code/community/Topefekt/Magesms/Model/Mysql4/Admins.php +1 -1
  57. app/code/community/Topefekt/Magesms/Model/Mysql4/Admins/Collection.php +1 -1
  58. app/code/community/Topefekt/Magesms/Model/Mysql4/Answers.php +1 -1
  59. app/code/community/Topefekt/Magesms/Model/Mysql4/Answers/Collection.php +1 -1
  60. app/code/community/Topefekt/Magesms/Model/Mysql4/Collection.php +1 -1
  61. app/code/community/Topefekt/Magesms/Model/Mysql4/Country.php +1 -1
  62. app/code/community/Topefekt/Magesms/Model/Mysql4/Country/Area.php +1 -1
  63. app/code/community/Topefekt/Magesms/Model/Mysql4/Country/Area/Collection.php +1 -1
  64. app/code/community/Topefekt/Magesms/Model/Mysql4/Country/Collection.php +1 -1
  65. app/code/community/Topefekt/Magesms/Model/Mysql4/Country/Lang.php +1 -1
  66. app/code/community/Topefekt/Magesms/Model/Mysql4/Country/Lang/Collection.php +1 -1
  67. app/code/community/Topefekt/Magesms/Model/Mysql4/Exceptions.php +1 -1
  68. app/code/community/Topefekt/Magesms/Model/Mysql4/Exceptions/Collection.php +1 -1
  69. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks.php +1 -1
  70. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Admins.php +1 -1
  71. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Admins/Collection.php +1 -1
  72. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Collection.php +1 -1
  73. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Customers.php +1 -1
  74. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Customers/Collection.php +1 -1
  75. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Templates.php +1 -1
  76. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Templates/Collection.php +1 -1
  77. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Unicode.php +1 -1
  78. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Unicode/Collection.php +1 -1
  79. app/code/community/Topefekt/Magesms/Model/Mysql4/Maps.php +1 -1
  80. app/code/community/Topefekt/Magesms/Model/Mysql4/Maps/Collection.php +1 -1
  81. app/code/community/Topefekt/Magesms/Model/Mysql4/Marketing/Filter.php +1 -1
  82. app/code/community/Topefekt/Magesms/Model/Mysql4/Marketing/Filter/Collection.php +1 -1
  83. app/code/community/Topefekt/Magesms/Model/Mysql4/Optout/Order.php +16 -0
  84. app/code/community/Topefekt/Magesms/Model/Mysql4/Optout/Order/Collection.php +16 -0
  85. app/code/community/Topefekt/Magesms/Model/Mysql4/Ownnumbersender.php +1 -1
  86. app/code/community/Topefekt/Magesms/Model/Mysql4/Ownnumbersender/Collection.php +1 -1
  87. app/code/community/Topefekt/Magesms/Model/Mysql4/Routes.php +1 -1
  88. app/code/community/Topefekt/Magesms/Model/Mysql4/Routes/Alternative.php +1 -1
  89. app/code/community/Topefekt/Magesms/Model/Mysql4/Routes/Alternative/Collection.php +1 -1
  90. app/code/community/Topefekt/Magesms/Model/Mysql4/Routes/Collection.php +1 -1
  91. app/code/community/Topefekt/Magesms/Model/Mysql4/Smshistory.php +1 -1
  92. app/code/community/Topefekt/Magesms/Model/Mysql4/Smshistory/Collection.php +1 -1
  93. app/code/community/Topefekt/Magesms/Model/Mysql4/Smsuser.php +1 -1
  94. app/code/community/Topefekt/Magesms/Model/Mysql4/Smsuser/Collection.php +1 -1
  95. app/code/community/Topefekt/Magesms/Model/Mysql4/Template.php +1 -1
  96. app/code/community/Topefekt/Magesms/Model/Mysql4/Template/Collection.php +1 -1
  97. app/code/community/Topefekt/Magesms/Model/Mysql4/Textsender.php +1 -1
  98. app/code/community/Topefekt/Magesms/Model/Mysql4/Textsender/Collection.php +1 -1
  99. app/code/community/Topefekt/Magesms/Model/Mysql4/Variables.php +1 -1
  100. app/code/community/Topefekt/Magesms/Model/Mysql4/Variables/Collection.php +1 -1
  101. app/code/community/Topefekt/Magesms/Model/Observer.php +2 -2
  102. app/code/community/Topefekt/Magesms/Model/Optout/Order.php +16 -0
  103. app/code/community/Topefekt/Magesms/Model/Overide/Cataloginventory/Stock.php +1 -1
  104. app/code/community/Topefekt/Magesms/Model/Ownnumbersender.php +1 -1
  105. app/code/community/Topefekt/Magesms/Model/Routes.php +1 -1
  106. app/code/community/Topefekt/Magesms/Model/Routes/Alternative.php +1 -1
  107. app/code/community/Topefekt/Magesms/Model/Sms.php +2 -2
  108. app/code/community/Topefekt/Magesms/Model/Smshistory.php +1 -1
  109. app/code/community/Topefekt/Magesms/Model/Smsprofile.php +1 -1
  110. app/code/community/Topefekt/Magesms/Model/Smsuser.php +1 -1
  111. app/code/community/Topefekt/Magesms/Model/System/Config/Lang.php +1 -1
  112. app/code/community/Topefekt/Magesms/Model/Template.php +1 -1
  113. app/code/community/Topefekt/Magesms/Model/Textsender.php +1 -1
  114. app/code/community/Topefekt/Magesms/Model/Variables.php +1 -1
  115. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/AboutController.php +1 -1
  116. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/AdminsmsController.php +2 -2
  117. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/AnswersController.php +1 -1
  118. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/CustomersmsController.php +1 -1
  119. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/HistoryController.php +1 -1
  120. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/MarketingController.php +3 -3
  121. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/OptoutController.php +2 -2
  122. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/ProfileController.php +1 -1
  123. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/PurchasecreditController.php +1 -1
  124. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/SendsmsController.php +1 -1
  125. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/StatisticsController.php +1 -1
  126. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/WizardController.php +1 -1
  127. app/code/community/Topefekt/Magesms/controllers/ApiController.php +1 -1
  128. app/code/community/Topefekt/Magesms/controllers/CartController.php +16 -0
  129. app/code/community/Topefekt/Magesms/controllers/DeliveryController.php +1 -1
  130. app/code/community/Topefekt/Magesms/controllers/IndexController.php +1 -1
  131. app/code/community/Topefekt/Magesms/controllers/MarketingController.php +16 -0
  132. app/code/community/Topefekt/Magesms/data/magesms_setup/data-install-1.0.0.php +1 -1
  133. app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.0.1-1.0.2.php +2 -2
  134. app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.0.3-1.0.4.php +2 -2
  135. app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.1.0-1.1.1.php +2 -2
  136. app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.1.1-1.1.2.php +2 -2
  137. app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.2.0-1.2.1.php +2 -2
  138. app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.3.1-1.3.2.php +2 -2
  139. app/code/community/Topefekt/Magesms/etc/config.xml +9 -10
  140. app/code/community/Topefekt/Magesms/etc/system.xml +19 -0
  141. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-install-0.9.0.php +1 -1
  142. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-install-1.0.0.php +2 -2
  143. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-0.9.11-0.9.12.php +1 -1
  144. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-0.9.12-0.9.13.php +1 -1
  145. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.0.1-1.0.2.php +2 -2
  146. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.1.3-1.1.4.php +2 -2
  147. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.1.5-1.2.0.php +2 -2
  148. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.3.3-1.3.4.php +24 -0
  149. app/design/adminhtml/default/default/template/topefekt/magesms/about.phtml +1 -1
  150. app/design/adminhtml/default/default/template/topefekt/magesms/adminsms.phtml +1 -1
  151. app/design/adminhtml/default/default/template/topefekt/magesms/customersms.phtml +1 -1
  152. app/design/adminhtml/default/default/template/topefekt/magesms/history.phtml +1 -1
  153. app/design/adminhtml/default/default/template/topefekt/magesms/marketing.phtml +1 -1
  154. app/design/adminhtml/default/default/template/topefekt/magesms/marketing/customer.phtml +1 -1
  155. app/design/adminhtml/default/default/template/topefekt/magesms/marketing/form.phtml +1 -1
  156. app/design/adminhtml/default/default/template/topefekt/magesms/optout.phtml +3 -3
  157. app/design/adminhtml/default/default/template/topefekt/magesms/profile.phtml +1 -1
  158. app/design/adminhtml/default/default/template/topefekt/magesms/purchasecredit.phtml +1 -1
  159. app/design/adminhtml/default/default/template/topefekt/magesms/sendsms.phtml +1 -1
  160. app/design/adminhtml/default/default/template/topefekt/magesms/statistics.phtml +1 -1
  161. app/design/adminhtml/default/default/template/topefekt/magesms/template/form.phtml +1 -1
  162. app/design/adminhtml/default/default/template/topefekt/magesms/wizard-alternative.phtml +1 -1
  163. app/design/adminhtml/default/default/template/topefekt/magesms/wizard-edit.phtml +1 -1
  164. app/design/adminhtml/default/default/template/topefekt/magesms/wizard-list.phtml +1 -1
  165. app/design/adminhtml/default/default/template/topefekt/magesms/wizard-sender.phtml +1 -1
  166. app/design/adminhtml/default/default/template/topefekt/magesms/wizard.phtml +1 -1
  167. app/design/frontend/base/default/layout/magesms.xml +24 -0
  168. app/design/frontend/base/default/template/topefekt/magesms/cart.phtml +16 -0
  169. app/design/frontend/base/default/template/topefekt/magesms/marketing-dashboard.phtml +16 -0
  170. app/locale/cs_CZ/Topefekt_Magesms.csv +5 -0
  171. app/locale/de_DE/Topefekt_Magesms.csv +5 -0
  172. app/locale/el_GR/Topefekt_Magesms.csv +5 -0
  173. app/locale/en_US/Topefekt_Magesms.csv +5 -0
  174. app/locale/es_ES/Topefekt_Magesms.csv +5 -0
  175. app/locale/fr_FR/Topefekt_Magesms.csv +5 -0
  176. app/locale/it_IT/Topefekt_Magesms.csv +5 -0
  177. app/locale/pl_PL/Topefekt_Magesms.csv +5 -0
  178. app/locale/pt_PT/Topefekt_Magesms.csv +5 -0
  179. app/locale/ru_RU/Topefekt_Magesms.csv +5 -0
  180. app/locale/sk_SK/Topefekt_Magesms.csv +5 -0
  181. app/locale/sr_RS/Topefekt_Magesms.csv +5 -0
  182. app/locale/sv_SE/Topefekt_Magesms.csv +5 -0
  183. app/locale/tr_TR/Topefekt_Magesms.csv +5 -0
  184. package.xml +4 -4
app/code/community/Topefekt/Magesms/Block/Answers.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Block_Answers extends Mage_Adminhtml_Block_Widget_Grid_Container { public function __construct() { $this->_controller = 'answers'; $this->_blockGroup = 'magesms'; $this->_headerText = $this->__('SMS Answers'); parent::__construct(); $this->_removeButton('add'); } public function getFilterUrl() { $this->getRequest()->setParam('filter', null); return $this->getUrl('*/*/filter', array('_current' => true)); } public function getHeaderHtml() { return '<h3 class="' . $this->getHeaderCssClass() . '">' . $this->getHeaderText() . '</h3><div style="clear: both">'. $this->__('SMS answer from customer is displayed only when customer receives SMS from your shop with SMS sender type „System number“ and customer replies using his own mobile phone.'). '</div>'; } public function getHeaderWidth() { return 'width: 100%'; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Answers extends Mage_Adminhtml_Block_Widget_Grid_Container { public function __construct() { $this->_controller = 'answers'; $this->_blockGroup = 'magesms'; $this->_headerText = $this->__('SMS Answers'); parent::__construct(); $this->_removeButton('add'); } public function getFilterUrl() { $this->getRequest()->setParam('filter', null); return $this->getUrl('*/*/filter', array('_current' => true)); } public function getHeaderHtml() { return '<h3 class="' . $this->getHeaderCssClass() . '">' . $this->getHeaderText() . '</h3><div style="clear: both">'. $this->__('SMS answer from customer is displayed only when customer receives SMS from your shop with SMS sender type „System number“ and customer replies using his own mobile phone.'). '</div>'; } public function getHeaderWidth() { return 'width: 100%'; } }
app/code/community/Topefekt/Magesms/Block/Answers/Grid.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Block_Answers_Grid extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setSaveParametersInSession(false); $this->setDefaultSort('cas'); $this->setDefaultDir('DESC'); } protected function _prepareCollection() { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getResourceModel('magesms/answers_collection'); $this->setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); parent::_prepareCollection(); return $this; } protected function _prepareColumns() { $this->addColumn('from', array( 'header'=>Mage::helper('magesms')->__('From number'), 'width' => '150px', 'index' => 'from', 'align' => 'right', ) ); $this->addColumn('text', array( 'index' => 'text', 'header'=>Mage::helper('magesms')->__('Text'), ) ); $this->addColumn('cas', array( 'header'=>Mage::helper('magesms')->__('Date'), 'width' => '150px', 'index' => 'cas', 'type' => 'datetime', ) ); $this->addColumn('smsc', array( 'header'=>Mage::helper('magesms')->__('SMS center'), 'width' => '150px', 'index' => 'smsc', 'align' => 'right', 'renderer' => 'Topefekt_Magesms_Block_Answers_Renderer_Smsc', ) ); if (Mage::getSingleton('admin/session')->isAllowed('magesms/answers/mark_as_read') || Mage::getSingleton('admin/session')->isAllowed('magesms/answers/remove')) { $this->addColumn('action', array( 'header' => Mage::helper('magesms')->__('Action'), 'width' => '200px', 'sortable' => false, 'filter' => false, 'type' => 'action', 'is_system' => true, 'renderer' => 'Topefekt_Magesms_Block_Answers_Renderer_Actions' ) ); } $this->addExportType('*/*/exportCsv', Mage::helper('magesms')->__('CSV')); $this->addExportType('*/*/exportExcel', Mage::helper('magesms')->__('Excel XML')); return parent::_prepareColumns(); } protected function _prepareMassaction() { $this->setMassactionIdField('IDs'); $this->getMassactionBlock()->setFormFieldName('answers'); if (Mage::getSingleton('admin/session')->isAllowed('magesms/answers/mark_as_read')) { $this->getMassactionBlock()->addItem('mark_as_read', array( 'label' => Mage::helper('magesms')->__('Mark as Read'), 'url' => $this->getUrl('*/*/massMarkAsRead', array('_current'=>true)), )); } if (Mage::getSingleton('admin/session')->isAllowed('magesms/answers/remove')) { $this->getMassactionBlock()->addItem('remove', array( 'label' => Mage::helper('magesms')->__('Remove'), 'url' => $this->getUrl('*/*/massRemove'), 'confirm' => Mage::helper('magesms')->__('Are you sure?') )); } return $this; } protected function getNoFilterMassactionColumn(){ return true; } public function getRowClass(Varien_Object $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { return $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getProhlednuto() ? 'read' : 'unread'; } public function getRowClickCallback() { return false; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Answers_Grid extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setSaveParametersInSession(false); $this->setDefaultSort('cas'); $this->setDefaultDir('DESC'); } protected function _prepareCollection() { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getResourceModel('magesms/answers_collection'); $this->setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); parent::_prepareCollection(); return $this; } protected function _prepareColumns() { $this->addColumn('from', array( 'header'=>Mage::helper('magesms')->__('From number'), 'width' => '150px', 'index' => 'from', 'align' => 'right', ) ); $this->addColumn('text', array( 'index' => 'text', 'header'=>Mage::helper('magesms')->__('Text'), ) ); $this->addColumn('cas', array( 'header'=>Mage::helper('magesms')->__('Date'), 'width' => '150px', 'index' => 'cas', 'type' => 'datetime', ) ); $this->addColumn('smsc', array( 'header'=>Mage::helper('magesms')->__('SMS center'), 'width' => '150px', 'index' => 'smsc', 'align' => 'right', 'renderer' => 'Topefekt_Magesms_Block_Answers_Renderer_Smsc', ) ); if (Mage::getSingleton('admin/session')->isAllowed('magesms/answers/mark_as_read') || Mage::getSingleton('admin/session')->isAllowed('magesms/answers/remove')) { $this->addColumn('action', array( 'header' => Mage::helper('magesms')->__('Action'), 'width' => '200px', 'sortable' => false, 'filter' => false, 'type' => 'action', 'is_system' => true, 'renderer' => 'Topefekt_Magesms_Block_Answers_Renderer_Actions' ) ); } $this->addExportType('*/*/exportCsv', Mage::helper('magesms')->__('CSV')); $this->addExportType('*/*/exportExcel', Mage::helper('magesms')->__('Excel XML')); return parent::_prepareColumns(); } protected function _prepareMassaction() { $this->setMassactionIdField('IDs'); $this->getMassactionBlock()->setFormFieldName('answers'); if (Mage::getSingleton('admin/session')->isAllowed('magesms/answers/mark_as_read')) { $this->getMassactionBlock()->addItem('mark_as_read', array( 'label' => Mage::helper('magesms')->__('Mark as Read'), 'url' => $this->getUrl('*/*/massMarkAsRead', array('_current'=>true)), )); } if (Mage::getSingleton('admin/session')->isAllowed('magesms/answers/remove')) { $this->getMassactionBlock()->addItem('remove', array( 'label' => Mage::helper('magesms')->__('Remove'), 'url' => $this->getUrl('*/*/massRemove'), 'confirm' => Mage::helper('magesms')->__('Are you sure?') )); } return $this; } protected function getNoFilterMassactionColumn(){ return true; } public function getRowClass(Varien_Object $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { return $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getProhlednuto() ? 'read' : 'unread'; } public function getRowClickCallback() { return false; } }
app/code/community/Topefekt/Magesms/Block/Answers/Renderer/Actions.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Block_Answers_Renderer_Actions extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract { public function render(Varien_Object $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { $id82aaf2f437652c4b6efbd55703199f614e8e516 = ''; if (!$iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getProhlednuto() && Mage::getSingleton('admin/session')->isAllowed('magesms/answers/mark_as_read')) { $id82aaf2f437652c4b6efbd55703199f614e8e516 = '<a href="'. $this->getUrl('*/*/markAsRead/', array('_current' => true, 'id' => $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId())).'">'. Mage::helper('magesms')->__('Mark as Read') .'</a>'; } if (Mage::getSingleton('admin/session')->isAllowed('magesms/answers/remove')) { if ($id82aaf2f437652c4b6efbd55703199f614e8e516) $id82aaf2f437652c4b6efbd55703199f614e8e516 .= ' | '; $id82aaf2f437652c4b6efbd55703199f614e8e516 .= sprintf('<a href="%s" onClick="deleteConfirm(\'%s\', this.href); return false;">%s</a>', $this->getUrl('*/*/remove/', array( '_current'=>true, 'id' => $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId(), Mage_Core_Controller_Front_Action::PARAM_NAME_URL_ENCODED => $this->helper('core/url')->getEncodedUrl()) ), Mage::helper('magesms')->__('Are you sure?'), Mage::helper('magesms')->__('Remove') ); } return $id82aaf2f437652c4b6efbd55703199f614e8e516; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Answers_Renderer_Actions extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract { public function render(Varien_Object $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { $id82aaf2f437652c4b6efbd55703199f614e8e516 = ''; if (!$iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getProhlednuto() && Mage::getSingleton('admin/session')->isAllowed('magesms/answers/mark_as_read')) { $id82aaf2f437652c4b6efbd55703199f614e8e516 = '<a href="'. $this->getUrl('*/*/markAsRead/', array('_current' => true, 'id' => $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId())).'">'. Mage::helper('magesms')->__('Mark as Read') .'</a>'; } if (Mage::getSingleton('admin/session')->isAllowed('magesms/answers/remove')) { if ($id82aaf2f437652c4b6efbd55703199f614e8e516) $id82aaf2f437652c4b6efbd55703199f614e8e516 .= ' | '; $id82aaf2f437652c4b6efbd55703199f614e8e516 .= sprintf('<a href="%s" onClick="deleteConfirm(\'%s\', this.href); return false;">%s</a>', $this->getUrl('*/*/remove/', array( '_current'=>true, 'id' => $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId(), Mage_Core_Controller_Front_Action::PARAM_NAME_URL_ENCODED => $this->helper('core/url')->getEncodedUrl()) ), Mage::helper('magesms')->__('Are you sure?'), Mage::helper('magesms')->__('Remove') ); } return $id82aaf2f437652c4b6efbd55703199f614e8e516; } }
app/code/community/Topefekt/Magesms/Block/Answers/Renderer/Smsc.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Block_Answers_Renderer_Smsc extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract { public function render(Varien_Object $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = trim($iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getData($this->getColumn()->getIndex())); return $ia61712c27ea241bd7a543dc2b02ea572274d0322 ? '+'.$ia61712c27ea241bd7a543dc2b02ea572274d0322 : '-'; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Answers_Renderer_Smsc extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract { public function render(Varien_Object $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = trim($iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getData($this->getColumn()->getIndex())); return $ia61712c27ea241bd7a543dc2b02ea572274d0322 ? '+'.$ia61712c27ea241bd7a543dc2b02ea572274d0322 : '-'; } }
app/code/community/Topefekt/Magesms/Block/Cart.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ class Topefekt_Magesms_Block_Cart extends Mage_Checkout_Block_Cart { protected function _construct() { $i69a1201e93806d55c970dfb18feec53d221ba37b = Mage::helper('magesms')->getOptoutProduct(); if ($i69a1201e93806d55c970dfb18feec53d221ba37b && Mage::helper('magesms')->isActive()) { $this->setOptoutProduct($i69a1201e93806d55c970dfb18feec53d221ba37b); $i705fa7c9639d497e1179d7d5691c212668a8c9c8 = $this->getQuote()->getItemByProduct($i69a1201e93806d55c970dfb18feec53d221ba37b); if ($i705fa7c9639d497e1179d7d5691c212668a8c9c8) $this->setOptoutUrl(Mage::app()->getDefaultStoreView()->getBaseUrl().'magesms/cart/removeProduct'); else $this->setOptoutUrl(Mage::app()->getDefaultStoreView()->getBaseUrl().'magesms/cart/addProduct'); $this->setOptoutAuto(!!$i705fa7c9639d497e1179d7d5691c212668a8c9c8); } return parent::_construct(); } }
app/code/community/Topefekt/Magesms/Block/Customer.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Block_Customer extends Mage_Adminhtml_Block_Widget_Grid_Container { public function __construct() { $this->_controller = 'customer'; $this->_blockGroup = 'magesms'; parent::__construct(); $this->_removeButton('add'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Customer extends Mage_Adminhtml_Block_Widget_Grid_Container { public function __construct() { $this->_controller = 'customer'; $this->_blockGroup = 'magesms'; parent::__construct(); $this->_removeButton('add'); } }
app/code/community/Topefekt/Magesms/Block/Customer/Grid.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Block_Customer_Grid extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setSaveParametersInSession(false); $this->setFilterVisibility(false); $this->setPagerVisibility(false); $this->setId('magesms_customer_grid'); } protected function _construct() { parent::_construct(); } protected function _prepareColumns() { $this->addColumn('lastname', array( 'index' => 'lastname', 'header'=>Mage::helper('magesms')->__('Last name'), 'sortable' => false, ) ); $this->addColumn('firstname', array( 'header'=>Mage::helper('magesms')->__('First name'), 'index' => 'firstname', 'sortable' => false, ) ); $this->addColumn('country_id', array( 'header'=>Mage::helper('magesms')->__('Country'), 'width' => '50', 'index' => 'country_id', 'sortable' => false, ) ); $this->addColumn('Telephone', array( 'header'=>Mage::helper('magesms')->__('Mobile number'), 'width' => '130', 'index' => 'telephone', 'sortable' => false, ) ); if (!Mage::app()->isSingleStoreMode()) { $this->addColumn('website_id', array( 'header' => Mage::helper('customer')->__('Website'), 'align' => 'center', 'width' => '100px', 'type' => 'options', 'options' => Mage::getSingleton('adminhtml/system_store')->getWebsiteOptionHash(true), 'index' => 'website_id', 'sortable' => false, )); } $this->addColumn('action', array( 'header'=>Mage::helper('magesms')->__('Action'), 'align' => 'center', 'width' => '80px', 'type' => 'action', 'getter' => 'getId', 'actions' => array( array( 'caption' => Mage::helper('magesms')->__('REMOVE customer from this list'), 'title' => Mage::helper('magesms')->__('REMOVE customer from this list'), 'url' => array('base'=> '*/*/filter/action/removeCustomer/letter/'.$this->getParam('letter')), 'field' => 'id', 'onclick' => 'removeCustomer(this); return false;', 'class' => 'action-remove', 'id' => '', ) ), 'sortable' => false, 'index' => 'store', 'is_system' => true, ) ); return parent::_prepareColumns(); } public function getRowClickCallback() { return 'openGridRowMagesms'; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Customer_Grid extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setSaveParametersInSession(false); $this->setFilterVisibility(false); $this->setPagerVisibility(false); $this->setId('magesms_customer_grid'); } protected function _construct() { parent::_construct(); } protected function _prepareColumns() { $this->addColumn('lastname', array( 'index' => 'lastname', 'header'=>Mage::helper('magesms')->__('Last name'), 'sortable' => false, ) ); $this->addColumn('firstname', array( 'header'=>Mage::helper('magesms')->__('First name'), 'index' => 'firstname', 'sortable' => false, ) ); $this->addColumn('country_id', array( 'header'=>Mage::helper('magesms')->__('Country'), 'width' => '50', 'index' => 'country_id', 'sortable' => false, ) ); $this->addColumn('Telephone', array( 'header'=>Mage::helper('magesms')->__('Mobile number'), 'width' => '130', 'index' => 'telephone', 'sortable' => false, ) ); if (!Mage::app()->isSingleStoreMode()) { $this->addColumn('website_id', array( 'header' => Mage::helper('customer')->__('Website'), 'align' => 'center', 'width' => '100px', 'type' => 'options', 'options' => Mage::getSingleton('adminhtml/system_store')->getWebsiteOptionHash(true), 'index' => 'website_id', 'sortable' => false, )); } $this->addColumn('action', array( 'header'=>Mage::helper('magesms')->__('Action'), 'align' => 'center', 'width' => '80px', 'type' => 'action', 'getter' => 'getId', 'actions' => array( array( 'caption' => Mage::helper('magesms')->__('REMOVE customer from this list'), 'title' => Mage::helper('magesms')->__('REMOVE customer from this list'), 'url' => array('base'=> '*/*/filter/action/removeCustomer/letter/'.$this->getParam('letter')), 'field' => 'id', 'onclick' => 'removeCustomer(this); return false;', 'class' => 'action-remove', 'id' => '', ) ), 'sortable' => false, 'index' => 'store', 'is_system' => true, ) ); return parent::_prepareColumns(); } public function getRowClickCallback() { return 'openGridRowMagesms'; } }
app/code/community/Topefekt/Magesms/Block/Customer/Marketing.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ class Topefekt_Magesms_Block_Customer_Marketing extends Mage_Core_Block_Template { protected function _construct() { $i4f9132e504066d4a445dfdf8eab82004739a54d4 = Mage::helper('magesms')->isActive() && Mage::getStoreConfig('magesms/optout/marketing'); $this->setOptoutMarketingActive($i4f9132e504066d4a445dfdf8eab82004739a54d4); if ($i4f9132e504066d4a445dfdf8eab82004739a54d4) { $i21e55df616c305955791876c1eb4da83448beba2 = Mage::getSingleton('customer/session')->getCustomer(); $this->setOptoutMarketing($i21e55df616c305955791876c1eb4da83448beba2->getMagesmsCustomerMarketing()); } parent::_construct(); } }
app/code/community/Topefekt/Magesms/Block/Magesms.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Block_Magesms extends Mage_Core_Block_Template { public function __construct() { parent::__construct(); $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/smshistory')->getCollection(); $this->setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); } protected function _prepareLayout() { parent::_prepareLayout(); $iff0690cb773a7fb817f520d36f525df413577228 = $this->getLayout()->createBlock('page/html_pager', 'custom.pager'); $iff0690cb773a7fb817f520d36f525df413577228->setAvailableLimit(array(2=>2,5=>5,10=>10,20=>20,'all'=>'all')); $iff0690cb773a7fb817f520d36f525df413577228->setCollection($this->getCollection()); $this->setChild('pager', $iff0690cb773a7fb817f520d36f525df413577228); $this->getCollection()->load(); return $this; } public function getPagerHtml() { return $this->getChildHtml('pager'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Magesms extends Mage_Core_Block_Template { public function __construct() { parent::__construct(); $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/smshistory')->getCollection(); $this->setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); } protected function _prepareLayout() { parent::_prepareLayout(); $iff0690cb773a7fb817f520d36f525df413577228 = $this->getLayout()->createBlock('page/html_pager', 'custom.pager'); $iff0690cb773a7fb817f520d36f525df413577228->setAvailableLimit(array(2=>2,5=>5,10=>10,20=>20,'all'=>'all')); $iff0690cb773a7fb817f520d36f525df413577228->setCollection($this->getCollection()); $this->setChild('pager', $iff0690cb773a7fb817f520d36f525df413577228); $this->getCollection()->load(); return $this; } public function getPagerHtml() { return $this->getChildHtml('pager'); } }
app/code/community/Topefekt/Magesms/Block/Marketing.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Block_Marketing extends Mage_Adminhtml_Block_Widget_Grid_Container { public function __construct() { $this->_controller = 'marketing'; $this->_blockGroup = 'magesms'; parent::__construct(); $this->_removeButton('add'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Marketing extends Mage_Adminhtml_Block_Widget_Grid_Container { public function __construct() { $this->_controller = 'marketing'; $this->_blockGroup = 'magesms'; parent::__construct(); $this->_removeButton('add'); } }
app/code/community/Topefekt/Magesms/Block/Marketing/Customer.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Block_Marketing_Customer extends Mage_Adminhtml_Block_Template { public function __construct($i4361b87b8aae0dab8305e7873d3986285df3ff3d = array()) { parent::__construct($i4361b87b8aae0dab8305e7873d3986285df3ff3d); $this->setTemplate('topefekt/magesms/marketing/customer.phtml'); $this->setWebsites(Mage::getSingleton('magesms/marketing_filter')); } protected function _toHtml() { if ($this->getId()) { return '<div id="magesms-marketing-'.$this->getId().'">'.parent::_toHtml().'</div>'; } return parent::_toHtml(); } public function displayByAlphabet() { $i39d2c3f69cb73b5684f101b504090c13c5174bc4 = array(); foreach($this->getCollection() as $i21e55df616c305955791876c1eb4da83448beba2) { $i47b2a41e4081b6f8d8381f411087dcd7042bfb53 = mb_strtoupper(mb_substr(trim($i21e55df616c305955791876c1eb4da83448beba2->lastname), 0, 1, 'utf-8')); if (!in_array($i47b2a41e4081b6f8d8381f411087dcd7042bfb53, array_keys($i39d2c3f69cb73b5684f101b504090c13c5174bc4))) { $i39d2c3f69cb73b5684f101b504090c13c5174bc4[$i47b2a41e4081b6f8d8381f411087dcd7042bfb53] = new Varien_Data_Collection(); } $i39d2c3f69cb73b5684f101b504090c13c5174bc4[$i47b2a41e4081b6f8d8381f411087dcd7042bfb53]->addItem($i21e55df616c305955791876c1eb4da83448beba2); } ksort($i39d2c3f69cb73b5684f101b504090c13c5174bc4); return $i39d2c3f69cb73b5684f101b504090c13c5174bc4; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Marketing_Customer extends Mage_Adminhtml_Block_Template { public function __construct($i4361b87b8aae0dab8305e7873d3986285df3ff3d = array()) { parent::__construct($i4361b87b8aae0dab8305e7873d3986285df3ff3d); $this->setTemplate('topefekt/magesms/marketing/customer.phtml'); $this->setWebsites(Mage::getSingleton('magesms/marketing_filter')); } protected function _toHtml() { if ($this->getId()) { return '<div id="magesms-marketing-'.$this->getId().'">'.parent::_toHtml().'</div>'; } return parent::_toHtml(); } public function displayByAlphabet() { $i39d2c3f69cb73b5684f101b504090c13c5174bc4 = array(); foreach($this->getCollection() as $i21e55df616c305955791876c1eb4da83448beba2) { $i47b2a41e4081b6f8d8381f411087dcd7042bfb53 = mb_strtoupper(mb_substr(trim($i21e55df616c305955791876c1eb4da83448beba2->lastname), 0, 1, 'utf-8')); if (!in_array($i47b2a41e4081b6f8d8381f411087dcd7042bfb53, array_keys($i39d2c3f69cb73b5684f101b504090c13c5174bc4))) { $i39d2c3f69cb73b5684f101b504090c13c5174bc4[$i47b2a41e4081b6f8d8381f411087dcd7042bfb53] = new Varien_Data_Collection(); } $i39d2c3f69cb73b5684f101b504090c13c5174bc4[$i47b2a41e4081b6f8d8381f411087dcd7042bfb53]->addItem($i21e55df616c305955791876c1eb4da83448beba2); } ksort($i39d2c3f69cb73b5684f101b504090c13c5174bc4); return $i39d2c3f69cb73b5684f101b504090c13c5174bc4; } }
app/code/community/Topefekt/Magesms/Block/Marketing/Form.php CHANGED
@@ -10,9 +10,9 @@
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
  class Topefekt_Magesms_Block_Marketing_Form extends Mage_Adminhtml_Block_Widget_Form { protected function _prepareForm() { $id7c8c8e1d1b44e9917ce2ae9b4c7d03e2a3ab683 = $this->getUrl('*/*/filter', array('action' => 'applyFilter')); $i1791b2d1f89bb2bd83b34046f59125af207713db = new Varien_Data_Form( array('id' => 'marketing_filter', 'action' => $id7c8c8e1d1b44e9917ce2ae9b4c7d03e2a3ab683, 'method' => 'get', 'onsubmit' => 'applyFilter(\'marketing_filter\'); return false;') ); $i5a4070f5dbe2b3be0f175bc31d21ce8a0e2e76dd = 'magesms_marketing_'; $i1791b2d1f89bb2bd83b34046f59125af207713db->setHtmlIdPrefix($i5a4070f5dbe2b3be0f175bc31d21ce8a0e2e76dd); $i1791b2d1f89bb2bd83b34046f59125af207713db->setUseContainer(true); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('customer_not', 'hidden', array( 'name' => 'customer_not', )); $i00f9b0a11b6d8c15e9d603e29ad96b2c88140a51 = $i1791b2d1f89bb2bd83b34046f59125af207713db->addFieldset('base_fieldset', array( 'legend' => Mage::helper('magesms')->__('SMS Marketing - bulk SMS filter'), ) ); $i6710129c3d74d2fb5df97ccbaab2621e9e5c1bf9 = '<a onclick="resetFilter(this);return false;" title="'.$this->__('Reset Filter').'" href="'.$this->getUrl('*/*/filter', array('action' => 'reset')).'">['.$this->__('Reset Filter').']</a>
17
  &nbsp;&nbsp;&nbsp;<a onclick="showPopup(this);return false;" title="'.$this->__('Save filter').'" href="'.$this->getUrl('*/*/filter', array('action' => 'save')).'">['.$this->__('Save filter').']</a>
18
- &nbsp;&nbsp;&nbsp;<a onclick="showPopup(this);return false;" title="'.$this->__('Saved Filters').'" href="'.$this->getUrl('*/*/filter', array('action' => 'load')).'">['.$this->__('Saved Filters').']</a>'; $i00f9b0a11b6d8c15e9d603e29ad96b2c88140a51->setHeaderBar($i6710129c3d74d2fb5df97ccbaab2621e9e5c1bf9); $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 = Mage::registry('magesms_marketing_filters'); $i00f9b0a11b6d8c15e9d603e29ad96b2c88140a51->addField('filters', 'select', array( 'name' => 'filters', 'options' => $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2->getFilters(), 'onchange' => "loadFilter(this, '".$this->getUrl('*/*/filter', array('action' => 'loadFilter'))."');", )); $i0351976a9053ff0d3893ad32bf0b51e106252b6d = $this->getButtonHtml(Mage::helper('magesms')->__('Apply filter'), "applyFilter('".$i1791b2d1f89bb2bd83b34046f59125af207713db->getId()."')"); $i00f9b0a11b6d8c15e9d603e29ad96b2c88140a51->setHtmlContent('<p id="magesms_applied_filters">'.$this->getHtmlFilters().'</p>'.$i00f9b0a11b6d8c15e9d603e29ad96b2c88140a51->getChildrenHtml().'<span id="magesms_load_filter"></span>'.$i0351976a9053ff0d3893ad32bf0b51e106252b6d); $this->setForm($i1791b2d1f89bb2bd83b34046f59125af207713db); return parent::_prepareForm(); } public function getHtmlFilters() { $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 = Mage::getModel('magesms/marketing_filter_collection'); $id82aaf2f437652c4b6efbd55703199f614e8e516 = ''; foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2->getAppliedFilters() as $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538=>$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { $ib605a096f442fa4dba073a8f5d37efb1add4650f = str_replace(':', '', $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->filter['title']); $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89 = $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getLabel() ? $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getLabel() : $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue(); if (is_array($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89)) $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89 = $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89[0].$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->filter['glue'].$if2eee0665f163a28f4adcfe84e3fc666bf1bcd89[1]; $id82aaf2f437652c4b6efbd55703199f614e8e516 .= '<span class="badge" style="background: '.$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->filter['color'].'">'. $ib605a096f442fa4dba073a8f5d37efb1add4650f.': '.$if2eee0665f163a28f4adcfe84e3fc666bf1bcd89. ' <a class="delete" onclick="removeFilter(this); return false;" href="'. $this->getUrl('*/*/filter', array('action' => 'removeFilter', 'id' => $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)).'">x</a></span>'; } return $id82aaf2f437652c4b6efbd55703199f614e8e516; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Marketing_Form extends Mage_Adminhtml_Block_Widget_Form { protected function _prepareForm() { $id7c8c8e1d1b44e9917ce2ae9b4c7d03e2a3ab683 = $this->getUrl('*/*/filter', array('action' => 'applyFilter')); $i1791b2d1f89bb2bd83b34046f59125af207713db = new Varien_Data_Form( array('id' => 'marketing_filter', 'action' => $id7c8c8e1d1b44e9917ce2ae9b4c7d03e2a3ab683, 'method' => 'get', 'onsubmit' => 'applyFilter(\'marketing_filter\'); return false;') ); $i5a4070f5dbe2b3be0f175bc31d21ce8a0e2e76dd = 'magesms_marketing_'; $i1791b2d1f89bb2bd83b34046f59125af207713db->setHtmlIdPrefix($i5a4070f5dbe2b3be0f175bc31d21ce8a0e2e76dd); $i1791b2d1f89bb2bd83b34046f59125af207713db->setUseContainer(true); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('customer_not', 'hidden', array( 'name' => 'customer_not', )); $i00f9b0a11b6d8c15e9d603e29ad96b2c88140a51 = $i1791b2d1f89bb2bd83b34046f59125af207713db->addFieldset('base_fieldset', array( 'legend' => Mage::helper('magesms')->__('SMS Marketing - bulk SMS filter'), ) ); $i6710129c3d74d2fb5df97ccbaab2621e9e5c1bf9 = '<a onclick="resetFilter(this);return false;" title="'.$this->__('Reset Filter').'" href="'.$this->getUrl('*/*/filter', array('action' => 'reset')).'">['.$this->__('Reset Filter').']</a>
17
  &nbsp;&nbsp;&nbsp;<a onclick="showPopup(this);return false;" title="'.$this->__('Save filter').'" href="'.$this->getUrl('*/*/filter', array('action' => 'save')).'">['.$this->__('Save filter').']</a>
18
+ &nbsp;&nbsp;&nbsp;<a onclick="showPopup(this);return false;" title="'.$this->__('Saved Filters').'" href="'.$this->getUrl('*/*/filter', array('action' => 'load')).'">['.$this->__('Saved Filters').']</a>'; $i00f9b0a11b6d8c15e9d603e29ad96b2c88140a51->setHeaderBar($i6710129c3d74d2fb5df97ccbaab2621e9e5c1bf9); $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 = Mage::registry('magesms_marketing_filters'); $i00f9b0a11b6d8c15e9d603e29ad96b2c88140a51->addField('filters', 'select', array( 'name' => 'filters', 'options' => $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2->getFilters(), 'onchange' => "loadFilter(this, '".$this->getUrl('*/*/filter', array('action' => 'loadFilter'))."');", )); $i0351976a9053ff0d3893ad32bf0b51e106252b6d = $this->getButtonHtml(Mage::helper('magesms')->__('Apply filter'), "applyFilter('".$i1791b2d1f89bb2bd83b34046f59125af207713db->getId()."')"); $i00f9b0a11b6d8c15e9d603e29ad96b2c88140a51->setHtmlContent('<p id="magesms_applied_filters">'.$this->getHtmlFilters().'</p>'.$i00f9b0a11b6d8c15e9d603e29ad96b2c88140a51->getChildrenHtml().'<span id="magesms_load_filter"></span>'.$i0351976a9053ff0d3893ad32bf0b51e106252b6d); $this->setForm($i1791b2d1f89bb2bd83b34046f59125af207713db); return parent::_prepareForm(); } public function getHtmlFilters() { $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 = Mage::getModel('magesms/marketing_filter_collection'); $id82aaf2f437652c4b6efbd55703199f614e8e516 = ''; foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2->getAppliedFilters() as $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538=>$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { $ib605a096f442fa4dba073a8f5d37efb1add4650f = str_replace(':', '', $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->filter['title']); $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89 = $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getLabel() ? $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getLabel() : $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue(); if (is_array($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) && isset($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->filter['cond']) ) $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89 = $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->filter['cond'].$if2eee0665f163a28f4adcfe84e3fc666bf1bcd89[1]; elseif (is_array($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89)) { $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89 = $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89[0].$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->filter['glue'].$if2eee0665f163a28f4adcfe84e3fc666bf1bcd89[1]; } $id82aaf2f437652c4b6efbd55703199f614e8e516 .= '<span class="badge" style="background: '.$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->filter['color'].'">'. $ib605a096f442fa4dba073a8f5d37efb1add4650f.': '.$if2eee0665f163a28f4adcfe84e3fc666bf1bcd89. ' <a class="delete" onclick="removeFilter(this); return false;" href="'. $this->getUrl('*/*/filter', array('action' => 'removeFilter', 'id' => $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)).'">x</a></span>'; } return $id82aaf2f437652c4b6efbd55703199f614e8e516; } }
app/code/community/Topefekt/Magesms/Block/Marketing/Grid.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Block_Marketing_Grid extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setSaveParametersInSession(false); $this->setFilterVisibility(false); } protected function _prepareCollection() { parent::_prepareCollection(); $this->setAdditionalJavaScript('countitSMS.marketingCount = '.$this->getCollection()->getSize().";\ncountitSMS.count();\n"); return $this; } protected function _construct() { parent::_construct(); } protected function _prepareColumns() { $this->addColumn('entity_id', array( 'header'=>Mage::helper('magesms')->__('Customer ID'), 'width' => '50px', 'index' => 'entity_id', 'type' => 'number', ) ); $this->addColumn('lastname', array( 'index' => 'lastname', 'header'=>Mage::helper('magesms')->__('Last name'), ) ); $this->addColumn('firstname', array( 'header'=>Mage::helper('magesms')->__('First name'), 'index' => 'firstname', ) ); $this->addColumn('country_id', array( 'header'=>Mage::helper('magesms')->__('Country'), 'width' => '50', 'index' => 'country_id', 'sortable' => false, ) ); $this->addColumn('Telephone', array( 'header'=>Mage::helper('magesms')->__('Mobile number'), 'width' => '130', 'index' => 'telephone', 'sortable' => false, ) ); if (!Mage::app()->isSingleStoreMode()) { $this->addColumn('website_id', array( 'header' => Mage::helper('customer')->__('Website'), 'align' => 'center', 'width' => '100px', 'type' => 'options', 'options' => Mage::getSingleton('adminhtml/system_store')->getWebsiteOptionHash(true), 'index' => 'website_id', )); } $this->addColumn('action', array( 'header'=>Mage::helper('magesms')->__('Action'), 'align' => 'center', 'width' => '80px', 'type' => 'action', 'getter' => 'getId', 'actions' => array( array( 'caption' => Mage::helper('magesms')->__('REMOVE customer from this list'), 'title' => Mage::helper('magesms')->__('REMOVE customer from this list'), 'field' => 'id', 'onclick' => 'filterRemoveCustomerSubmit(this)', 'class' => 'action-remove', 'id' => '', ) ), 'sortable' => false, 'index' => 'store', 'is_system' => true, ) ); return parent::_prepareColumns(); } public function getRowUrl($iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { return $this->getUrl('*/customer/edit', array('id' => $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId())); } public function getRowClickCallback() { return 'openGridRowMagesms'; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Marketing_Grid extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setSaveParametersInSession(false); $this->setFilterVisibility(false); } protected function _prepareCollection() { parent::_prepareCollection(); $this->setAdditionalJavaScript('countitSMS.marketingCount = '.$this->getCollection()->getSize().";\ncountitSMS.count();\n"); return $this; } protected function _construct() { parent::_construct(); } protected function _prepareColumns() { $this->addColumn('entity_id', array( 'header'=>Mage::helper('magesms')->__('Customer ID'), 'width' => '50px', 'index' => 'entity_id', 'type' => 'number', ) ); $this->addColumn('lastname', array( 'index' => 'lastname', 'header'=>Mage::helper('magesms')->__('Last name'), ) ); $this->addColumn('firstname', array( 'header'=>Mage::helper('magesms')->__('First name'), 'index' => 'firstname', ) ); $this->addColumn('country_id', array( 'header'=>Mage::helper('magesms')->__('Country'), 'width' => '50', 'index' => 'country_id', 'sortable' => false, ) ); $this->addColumn('Telephone', array( 'header'=>Mage::helper('magesms')->__('Mobile number'), 'width' => '130', 'index' => 'telephone', 'sortable' => false, ) ); if (!Mage::app()->isSingleStoreMode()) { $this->addColumn('website_id', array( 'header' => Mage::helper('customer')->__('Website'), 'align' => 'center', 'width' => '100px', 'type' => 'options', 'options' => Mage::getSingleton('adminhtml/system_store')->getWebsiteOptionHash(true), 'index' => 'website_id', )); } $this->addColumn('action', array( 'header'=>Mage::helper('magesms')->__('Action'), 'align' => 'center', 'width' => '80px', 'type' => 'action', 'getter' => 'getId', 'actions' => array( array( 'caption' => Mage::helper('magesms')->__('REMOVE customer from this list'), 'title' => Mage::helper('magesms')->__('REMOVE customer from this list'), 'field' => 'id', 'onclick' => 'filterRemoveCustomerSubmit(this)', 'class' => 'action-remove', 'id' => '', ) ), 'sortable' => false, 'index' => 'store', 'is_system' => true, ) ); return parent::_prepareColumns(); } public function getRowUrl($iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { return $this->getUrl('*/customer/edit', array('id' => $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId())); } public function getRowClickCallback() { return 'openGridRowMagesms'; } }
app/code/community/Topefekt/Magesms/Block/Marketing/Template.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Block_Marketing_Template extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setSaveParametersInSession(false); $this->setFilterVisibility(false); $this->setPagerVisibility(false); $this->setDefaultSort('date'); $this->setDefaultDir('DESC'); $this->setId('magesms_filter_template_grid'); $this->setUseAjax(true); } protected function _prepareCollection() { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/marketing_filter')->getCollection(); $this->setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); parent::_prepareCollection(); return $this; } protected function _prepareColumns() { $this->addColumn('name', array( 'header'=>Mage::helper('magesms')->__('Name'), 'index' => 'name', 'sortable' => false, ) ); $this->addColumn('date', array( 'header'=>Mage::helper('magesms')->__('Date'), 'index' => 'date', 'width' => '150px', 'type' => 'datetime', 'sortable' => false, ) ); $this->addColumn('action', array( 'header'=>Mage::helper('magesms')->__('Action'), 'align' => 'center', 'width' => '80px', 'type' => 'action', 'getter' => 'getId', 'actions' => array( array( 'caption' => Mage::helper('magesms')->__('REMOVE'), 'title' => Mage::helper('magesms')->__('REMOVE'), 'url' => array('base'=> '*/*/filter', 'params'=> array('action' => 'remove')), 'field' => 'id', 'onclick' => 'return window.submitRemoveFilter(this);', 'class' => 'action-remove', 'id' => '', ) ), 'sortable' => false, 'index' => 'store', 'is_system' => true, ) ); return parent::_prepareColumns(); } public function getRowClickCallback() { return 'submitRestoreFilter'; } public function getRowUrl($iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { return $this->getUrl('*/*/filter', array('action' => 'restore', 'id' => $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId())); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Marketing_Template extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setSaveParametersInSession(false); $this->setFilterVisibility(false); $this->setPagerVisibility(false); $this->setDefaultSort('date'); $this->setDefaultDir('DESC'); $this->setId('magesms_filter_template_grid'); $this->setUseAjax(true); } protected function _prepareCollection() { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/marketing_filter')->getCollection(); $this->setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); parent::_prepareCollection(); return $this; } protected function _prepareColumns() { $this->addColumn('name', array( 'header'=>Mage::helper('magesms')->__('Name'), 'index' => 'name', 'sortable' => false, ) ); $this->addColumn('date', array( 'header'=>Mage::helper('magesms')->__('Date'), 'index' => 'date', 'width' => '150px', 'type' => 'datetime', 'sortable' => false, ) ); $this->addColumn('action', array( 'header'=>Mage::helper('magesms')->__('Action'), 'align' => 'center', 'width' => '80px', 'type' => 'action', 'getter' => 'getId', 'actions' => array( array( 'caption' => Mage::helper('magesms')->__('REMOVE'), 'title' => Mage::helper('magesms')->__('REMOVE'), 'url' => array('base'=> '*/*/filter', 'params'=> array('action' => 'remove')), 'field' => 'id', 'onclick' => 'return window.submitRemoveFilter(this);', 'class' => 'action-remove', 'id' => '', ) ), 'sortable' => false, 'index' => 'store', 'is_system' => true, ) ); return parent::_prepareColumns(); } public function getRowClickCallback() { return 'submitRestoreFilter'; } public function getRowUrl($iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { return $this->getUrl('*/*/filter', array('action' => 'restore', 'id' => $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId())); } }
app/code/community/Topefekt/Magesms/Block/Profile.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Block_Profile extends Mage_Adminhtml_Block_Template { protected $_helper; public function __construct() { exit; parent::__construct(); $this->setTemplate('poll/poll.phtml'); $this->setFormAction(Mage::getUrl('*/*/new')); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Profile extends Mage_Adminhtml_Block_Template { protected $_helper; public function __construct() { exit; parent::__construct(); $this->setTemplate('poll/poll.phtml'); $this->setFormAction(Mage::getUrl('*/*/new')); } }
app/code/community/Topefekt/Magesms/Block/ShowTabsAdminBlock.php DELETED
@@ -1,16 +0,0 @@
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
- class Topefekt_Magesms_Block_ShowTabsAdminBlock extends Mage_Adminhtml_Block_Widget_Tabs { public function __construct() { parent::__construct(); $this->setId('my_custom_freely_assigned_id_for_tabs'); } protected function _beforeToHtml() { $this->addTab('custom_assigned_tab1_id_name', array( 'label' => Mage::helper('smsmagentohelper1')->__('Custom tab1 here'), 'title' => Mage::helper('smsmagentohelper1')->__('My custom tab1 title here'), 'content' => 'Some content here. We could add direct string here, or we can use something like $this->getLayout()->createBlock("adminhtml/cms_page_edit_tab_main")->toHtml()', 'active' => true )); $this->addTab('custom_aka_freely_assigned_tab2_id_name', array( 'label' => Mage::helper('smsmagentohelper1')->__('Custom tab2 here'), 'title' => Mage::helper('smsmagentohelper1')->__('My custom tab2 title here'), 'content' => 'Another content here. As mentioned, we could add direct string here, or we can use something like $this->getLayout()->createBlock("adminhtml/cms_page_edit_tab_main")->toHtml()', 'active' => false )); $this->addTab('custom_aka_freely_assigned_tab3_id_name', array( 'label' => Mage::helper('smsmagentohelper1')->__('Custom tab3 here<br />(usses class block)'), 'title' => Mage::helper('smsmagentohelper1')->__('My custom tab3 title here'), 'content' => $this->getLayout()->createBlock("smsmagentoblock2/SampleBlockForTabAreaShowoff")->toHtml(), 'active' => false )); $this->addTab('custom_aka_freely_assigned_tab4_id_name', array( 'label' => Mage::helper('smsmagentohelper1')->__('Custom tab4 here<br />(usses class block and external view file)'), 'title' => Mage::helper('smsmagentohelper1')->__('My custom tab4 title here'), 'content' => $this->getLayout()->createBlock("smsmagentoblock1/SampleBlockForTabAreaShowoffWithExtraInfo")->toHtml(), 'active' => false )); return parent::_beforeToHtml(); } }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Topefekt/Magesms/Block/System/Config/Apikeygenerator.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Block_System_Config_Apikeygenerator extends Mage_Adminhtml_Block_System_Config_Form_Field { protected function _getElementHtml(Varien_Data_Form_Element_Abstract $id23e685c18c58238831a9a9f8356004faff20ddc) { $i0fc064cffe35dbf98852d574adf2c91e8ad7190b = parent::_getElementHtml($id23e685c18c58238831a9a9f8356004faff20ddc); $this->setElement($id23e685c18c58238831a9a9f8356004faff20ddc); $id82aaf2f437652c4b6efbd55703199f614e8e516 = $this->getLayout()->createBlock('adminhtml/widget_button') ->setType('button') ->setLabel('Generator new API key') ->setOnClick("document.getElementById('magesms_api_apikey').value = 'xxxxxx-xxxx-yxxx-yxxx-xxxxxx'.replace(/[xy]/g, function(c) {var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8);return v.toString(16);});") ->toHtml(); return $i0fc064cffe35dbf98852d574adf2c91e8ad7190b.$id82aaf2f437652c4b6efbd55703199f614e8e516; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_System_Config_Apikeygenerator extends Mage_Adminhtml_Block_System_Config_Form_Field { protected function _getElementHtml(Varien_Data_Form_Element_Abstract $id23e685c18c58238831a9a9f8356004faff20ddc) { $i0fc064cffe35dbf98852d574adf2c91e8ad7190b = parent::_getElementHtml($id23e685c18c58238831a9a9f8356004faff20ddc); $this->setElement($id23e685c18c58238831a9a9f8356004faff20ddc); $id82aaf2f437652c4b6efbd55703199f614e8e516 = $this->getLayout()->createBlock('adminhtml/widget_button') ->setType('button') ->setLabel('Generator new API key') ->setOnClick("document.getElementById('magesms_api_apikey').value = 'xxxxxx-xxxx-yxxx-yxxx-xxxxxx'.replace(/[xy]/g, function(c) {var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8);return v.toString(16);});") ->toHtml(); return $i0fc064cffe35dbf98852d574adf2c91e8ad7190b.$id82aaf2f437652c4b6efbd55703199f614e8e516; } }
app/code/community/Topefekt/Magesms/Block/Template.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Block_Template extends Mage_Core_Block_Template { public $profile; public $newversion; public function _construct() { parent::_construct(); $this->profile = Mage::getSingleton('magesms/smsprofile'); } public function getFilterUrl() { $this->getRequest()->setParam('filter', null); $this->getRequest()->setParam('sms', null); return $this->getUrl('*/*/', array('_current' => true)); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Template extends Mage_Core_Block_Template { public $profile; public $newversion; public function _construct() { parent::_construct(); $this->profile = Mage::getSingleton('magesms/smsprofile'); } public function getFilterUrl() { $this->getRequest()->setParam('filter', null); $this->getRequest()->setParam('sms', null); return $this->getUrl('*/*/', array('_current' => true)); } }
app/code/community/Topefekt/Magesms/Block/Template/Template.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Block_Template_Template extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setSaveParametersInSession(false); $this->setFilterVisibility(false); $this->setPagerVisibility(false); $this->setDefaultSort('date'); $this->setDefaultDir('DESC'); $this->setId('magesms_template_grid'); $this->setUseAjax(true); } protected function _prepareCollection() { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/template')->getCollection(); $i30f20aafde612a957f7f966cb5b85e35782bc88a = ($i8082253d76e74d88c499183ff2cfde28044ae37d = Mage::app()->getRequest()->getParam('type')) ? $i8082253d76e74d88c499183ff2cfde28044ae37d : 0; $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('type', $i30f20aafde612a957f7f966cb5b85e35782bc88a); $this->setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); parent::_prepareCollection(); return $this; } protected function _prepareColumns() { $this->addColumn('name', array( 'header'=>Mage::helper('magesms')->__('Name'), 'index' => 'name', 'sortable' => false, ) ); $this->addColumn('date', array( 'header'=>Mage::helper('magesms')->__('Date'), 'index' => 'date', 'width' => '150px', 'type' => 'datetime', 'sortable' => false, ) ); $this->addColumn('action', array( 'header'=>Mage::helper('magesms')->__('Action'), 'align' => 'center', 'width' => '80px', 'type' => 'action', 'getter' => 'getId', 'actions' => array( array( 'caption' => Mage::helper('magesms')->__('REMOVE'), 'title' => Mage::helper('magesms')->__('REMOVE'), 'url' => array('base'=> '*/*/template', 'params'=> array('action' => 'remove')), 'field' => 'id', 'onclick' => 'return window.submitRemoveTemplate(this);', 'class' => 'action-remove', 'id' => '', ) ), 'sortable' => false, 'index' => 'store', 'is_system' => true, ) ); return parent::_prepareColumns(); } public function getRowClickCallback() { return 'submitRestoreTemplate'; } public function getRowUrl($iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { return $this->getUrl('*/*/template', array('action' => 'restore', 'id' => $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId())); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Template_Template extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setSaveParametersInSession(false); $this->setFilterVisibility(false); $this->setPagerVisibility(false); $this->setDefaultSort('date'); $this->setDefaultDir('DESC'); $this->setId('magesms_template_grid'); $this->setUseAjax(true); } protected function _prepareCollection() { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/template')->getCollection(); $i30f20aafde612a957f7f966cb5b85e35782bc88a = ($i8082253d76e74d88c499183ff2cfde28044ae37d = Mage::app()->getRequest()->getParam('type')) ? $i8082253d76e74d88c499183ff2cfde28044ae37d : 0; $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('type', $i30f20aafde612a957f7f966cb5b85e35782bc88a); $this->setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); parent::_prepareCollection(); return $this; } protected function _prepareColumns() { $this->addColumn('name', array( 'header'=>Mage::helper('magesms')->__('Name'), 'index' => 'name', 'sortable' => false, ) ); $this->addColumn('date', array( 'header'=>Mage::helper('magesms')->__('Date'), 'index' => 'date', 'width' => '150px', 'type' => 'datetime', 'sortable' => false, ) ); $this->addColumn('action', array( 'header'=>Mage::helper('magesms')->__('Action'), 'align' => 'center', 'width' => '80px', 'type' => 'action', 'getter' => 'getId', 'actions' => array( array( 'caption' => Mage::helper('magesms')->__('REMOVE'), 'title' => Mage::helper('magesms')->__('REMOVE'), 'url' => array('base'=> '*/*/template', 'params'=> array('action' => 'remove')), 'field' => 'id', 'onclick' => 'return window.submitRemoveTemplate(this);', 'class' => 'action-remove', 'id' => '', ) ), 'sortable' => false, 'index' => 'store', 'is_system' => true, ) ); return parent::_prepareColumns(); } public function getRowClickCallback() { return 'submitRestoreTemplate'; } public function getRowUrl($iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { return $this->getUrl('*/*/template', array('action' => 'restore', 'id' => $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId())); } }
app/code/community/Topefekt/Magesms/Block/Wizard.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Block_Wizard extends Mage_Adminhtml_Block_Widget_Grid_Container { protected function _prepareLayout() { Mage_Adminhtml_Block_Widget_Container::_prepareLayout(); } public function __construct() { $this->_controller = 'wizard'; $this->_headerText = Mage::helper('magesms')->__('SMS Settings'); parent::__construct(); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Wizard extends Mage_Adminhtml_Block_Widget_Grid_Container { protected function _prepareLayout() { Mage_Adminhtml_Block_Widget_Container::_prepareLayout(); } public function __construct() { $this->_controller = 'wizard'; $this->_headerText = Mage::helper('magesms')->__('SMS Settings'); parent::__construct(); } }
app/code/community/Topefekt/Magesms/Block/Wizard/Grid.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Block_Wizard_Grid extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setDefaultSort('ID'); $this->setId('ID'); $this->setDefaultDir('asc'); $this->setSaveParametersInSession(true); } protected function _prepareCollection() { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/routes') ->getCollection(); $this->setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); parent::_prepareCollection(); if ($this->getCollection()) { $this->getCollection() ->addCustomerTaxClassesToResult() ->addProductTaxClassesToResult() ->addRatesToResult(); } return $this; } protected function _addColumnFilterToCollection($i75f8edda04d6bdede42ee5632d74834e50512ba7) { if ($this->getCollection()) { switch ($i75f8edda04d6bdede42ee5632d74834e50512ba7->getId()) { case 'tax_rates': $this->getCollection()->joinCalculationData('rate'); break; case 'customer_tax_classes': $this->getCollection()->joinCalculationData('ctc'); break; case 'product_tax_classes': $this->getCollection()->joinCalculationData('ptc'); break; } } return parent::_addColumnFilterToCollection($i75f8edda04d6bdede42ee5632d74834e50512ba7); } protected function _prepareColumns() { $this->addColumn('code', array( 'header'=>Mage::helper('tax')->__('Name'), 'align' =>'left', 'index' => 'code', 'filter_index' => 'code', ) ); $this->addColumn('customer_tax_classes', array( 'header'=>Mage::helper('tax')->__('Customer Tax Class'), 'sortable' => false, 'align' =>'left', 'index' => 'customer_tax_classes', 'filter_index' => 'ctc.customer_tax_class_id', 'type' => 'options', 'show_missing_option_values' => true, 'options' => Mage::getModel('tax/class')->getCollection()->setClassTypeFilter(Mage_Tax_Model_Class::TAX_CLASS_TYPE_CUSTOMER)->toOptionHash(), ) ); $this->addColumn('product_tax_classes', array( 'header'=>Mage::helper('tax')->__('Product Tax Class'), 'sortable' => false, 'align' =>'left', 'index' => 'product_tax_classes', 'filter_index' => 'ptc.product_tax_class_id', 'type' => 'options', 'show_missing_option_values' => true, 'options' => Mage::getModel('tax/class')->getCollection()->setClassTypeFilter(Mage_Tax_Model_Class::TAX_CLASS_TYPE_PRODUCT)->toOptionHash(), ) ); $this->addColumn('tax_rates', array( 'sortable' => false, 'header' => Mage::helper('tax')->__('Tax Rate'), 'align' => 'left', 'index' => 'tax_rates', 'filter_index' => 'rate.tax_calculation_rate_id', 'type' => 'options', 'show_missing_option_values' => true, 'options' => Mage::getModel('tax/calculation_rate')->getCollection()->toOptionHashOptimized(), ) ); $this->addColumn('priority', array( 'header'=>Mage::helper('tax')->__('Priority'), 'width' => '50px', 'index' => 'priority' ) ); $this->addColumn('position', array( 'header'=>Mage::helper('tax')->__('Sort Order'), 'width' => '50px', 'index' => 'position' ) ); $i087550d202ce604e7a8894605fde8d6e87ee4776 = $this->getUrl('*/*/'); return parent::_prepareColumns(); } public function getRowUrl($iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { return $this->getUrl('*/*/edit', array('rule' => $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId())); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Wizard_Grid extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setDefaultSort('ID'); $this->setId('ID'); $this->setDefaultDir('asc'); $this->setSaveParametersInSession(true); } protected function _prepareCollection() { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/routes') ->getCollection(); $this->setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); parent::_prepareCollection(); if ($this->getCollection()) { $this->getCollection() ->addCustomerTaxClassesToResult() ->addProductTaxClassesToResult() ->addRatesToResult(); } return $this; } protected function _addColumnFilterToCollection($i75f8edda04d6bdede42ee5632d74834e50512ba7) { if ($this->getCollection()) { switch ($i75f8edda04d6bdede42ee5632d74834e50512ba7->getId()) { case 'tax_rates': $this->getCollection()->joinCalculationData('rate'); break; case 'customer_tax_classes': $this->getCollection()->joinCalculationData('ctc'); break; case 'product_tax_classes': $this->getCollection()->joinCalculationData('ptc'); break; } } return parent::_addColumnFilterToCollection($i75f8edda04d6bdede42ee5632d74834e50512ba7); } protected function _prepareColumns() { $this->addColumn('code', array( 'header'=>Mage::helper('tax')->__('Name'), 'align' =>'left', 'index' => 'code', 'filter_index' => 'code', ) ); $this->addColumn('customer_tax_classes', array( 'header'=>Mage::helper('tax')->__('Customer Tax Class'), 'sortable' => false, 'align' =>'left', 'index' => 'customer_tax_classes', 'filter_index' => 'ctc.customer_tax_class_id', 'type' => 'options', 'show_missing_option_values' => true, 'options' => Mage::getModel('tax/class')->getCollection()->setClassTypeFilter(Mage_Tax_Model_Class::TAX_CLASS_TYPE_CUSTOMER)->toOptionHash(), ) ); $this->addColumn('product_tax_classes', array( 'header'=>Mage::helper('tax')->__('Product Tax Class'), 'sortable' => false, 'align' =>'left', 'index' => 'product_tax_classes', 'filter_index' => 'ptc.product_tax_class_id', 'type' => 'options', 'show_missing_option_values' => true, 'options' => Mage::getModel('tax/class')->getCollection()->setClassTypeFilter(Mage_Tax_Model_Class::TAX_CLASS_TYPE_PRODUCT)->toOptionHash(), ) ); $this->addColumn('tax_rates', array( 'sortable' => false, 'header' => Mage::helper('tax')->__('Tax Rate'), 'align' => 'left', 'index' => 'tax_rates', 'filter_index' => 'rate.tax_calculation_rate_id', 'type' => 'options', 'show_missing_option_values' => true, 'options' => Mage::getModel('tax/calculation_rate')->getCollection()->toOptionHashOptimized(), ) ); $this->addColumn('priority', array( 'header'=>Mage::helper('tax')->__('Priority'), 'width' => '50px', 'index' => 'priority' ) ); $this->addColumn('position', array( 'header'=>Mage::helper('tax')->__('Sort Order'), 'width' => '50px', 'index' => 'position' ) ); $i087550d202ce604e7a8894605fde8d6e87ee4776 = $this->getUrl('*/*/'); return parent::_prepareColumns(); } public function getRowUrl($iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { return $this->getUrl('*/*/edit', array('rule' => $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId())); } }
app/code/community/Topefekt/Magesms/Controller/Action.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Controller_Action extends Mage_Adminhtml_Controller_Action { public $profile; protected $_filterData; protected function _construct() { $this->profile = Mage::getSingleton('magesms/smsprofile'); } public function preDispatch() { parent::preDispatch(); if (!$this->profile->user->getUser()) { $this->setFlag('', self::FLAG_NO_DISPATCH, true); if (!empty($this->profile->_error)) { Mage::getSingleton('adminhtml/session')->addError(Mage::helper('magesms')->__($this->profile->_error)); } else { Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('Not registered yet? Create account now!')); } $this->_redirect('*/magesms_profile'); } else { $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa = Mage::helper('adminhtml')->prepareFilterString($this->getRequest()->getParam('filter')); $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa = $this->_filterDates($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa, array('reg_from', 'reg_to', 'birth_from', 'birth_to')); $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = new Varien_Object(); foreach ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa as $i670253c23c6fcba76bc4256a88fdd8fbc1041039 => $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { if (!empty($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) || is_numeric($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89)) { $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a->setData($i670253c23c6fcba76bc4256a88fdd8fbc1041039, $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); } } $this->_filterData = $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a; } return $this; } public function getBlockCustomer() { $i21e55df616c305955791876c1eb4da83448beba2 = $this->getLayout()->createBlock('magesms/customer_grid'); return $i21e55df616c305955791876c1eb4da83448beba2; } protected function _initAction() { $this->loadLayout() ->_title(Mage::helper('magesms')->__('MageSMS')) ; $this->getLayout()->getBlock('head') ->addCss('css/topefekt/magesms/stylesheet.css') ->addJs('topefekt/functions.js') ; if ($i458778f43fe9c6d565ec84d06bb5438f060a17d8 = $this->getLayout()->getBlock('head')) { $i458778f43fe9c6d565ec84d06bb5438f060a17d8->addItem('js', 'prototype/window.js') ->addItem('js_css', 'prototype/windows/themes/default.css') ->addCss('lib/prototype/windows/themes/magento.css') ->addItem('js', 'mage/adminhtml/variables.js'); } return $this; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Controller_Action extends Mage_Adminhtml_Controller_Action { public $profile; protected $_filterData; protected function _construct() { $this->profile = Mage::getSingleton('magesms/smsprofile'); } public function preDispatch() { parent::preDispatch(); if (!$this->profile->user->getUser()) { $this->setFlag('', self::FLAG_NO_DISPATCH, true); if (!empty($this->profile->_error)) { Mage::getSingleton('adminhtml/session')->addError(Mage::helper('magesms')->__($this->profile->_error)); } else { Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('Not registered yet? Create account now!')); } $this->_redirect('*/magesms_profile'); } else { $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa = Mage::helper('adminhtml')->prepareFilterString($this->getRequest()->getParam('filter')); $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa = $this->_filterDates($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa, array('reg_from', 'reg_to', 'birth_from', 'birth_to')); $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = new Varien_Object(); foreach ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa as $i670253c23c6fcba76bc4256a88fdd8fbc1041039 => $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { if (!empty($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) || is_numeric($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89)) { $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a->setData($i670253c23c6fcba76bc4256a88fdd8fbc1041039, $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); } } $this->_filterData = $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a; } return $this; } public function getBlockCustomer() { $i21e55df616c305955791876c1eb4da83448beba2 = $this->getLayout()->createBlock('magesms/customer_grid'); return $i21e55df616c305955791876c1eb4da83448beba2; } protected function _initAction() { $this->loadLayout() ->_title(Mage::helper('magesms')->__('MageSMS')) ; $this->getLayout()->getBlock('head') ->addCss('css/topefekt/magesms/stylesheet.css') ->addJs('topefekt/functions.js') ; if ($i458778f43fe9c6d565ec84d06bb5438f060a17d8 = $this->getLayout()->getBlock('head')) { $i458778f43fe9c6d565ec84d06bb5438f060a17d8->addItem('js', 'prototype/window.js') ->addItem('js_css', 'prototype/windows/themes/default.css') ->addCss('lib/prototype/windows/themes/magento.css') ->addItem('js', 'mage/adminhtml/variables.js'); } return $this; } }
app/code/community/Topefekt/Magesms/Controller/Template/Action.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Controller_Template_Action extends Topefekt_Magesms_Controller_Action { public function templateAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ($this->getRequest()->getParams()) { $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2 = $this->getRequest(); if ($i1507c94b68f51b22087227858337782550edf618 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('action')) { try { switch ($i1507c94b68f51b22087227858337782550edf618) { case 'saveTemplate': $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($this->_saveTemplate()); break; case 'loadTemplate': $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($this->_saveTemplate(false)); break; case 'save': if ($this->getRequest()->isPost()) { $iefc930e6dfdf3023610ed7d663c73d176a7544e0 = Mage::getModel('magesms/template'); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->setData(array( 'name' => $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('saveName'), 'template' => $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('text'), 'unicode' => $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('unicode'), 'unique' => $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('unique'), 'date' => date('Y-m-d H:i:s'), 'type' => $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('type') )); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->save(); } break; case 'remove': if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('id')) { $iefc930e6dfdf3023610ed7d663c73d176a7544e0 = Mage::getModel('magesms/template'); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->delete(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($this->_saveTemplate(false)); } break; case 'restore': if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('id')) { $iefc930e6dfdf3023610ed7d663c73d176a7544e0 = Mage::getModel('magesms/template'); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->addData(array('data' => $iefc930e6dfdf3023610ed7d663c73d176a7544e0->getData())); } 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 _prepareText($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = null, $i7a5ea366969a291381fafa1448c9a2fafd34ad5e = null) { if (Mage::registry('magesms_store_id')) Mage::unregister('magesms_store_id'); Mage::register('magesms_store_id', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66, true); if (preg_match_all('/{(.*?)}/', $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $ia00c63b7b8f0d76f361b9bd281e5073cc0d0aa3e)) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b = array(); foreach($ia00c63b7b8f0d76f361b9bd281e5073cc0d0aa3e[1] as $iebd691e534c6cf2e84cf8a88790a5271154fca05) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b[$iebd691e534c6cf2e84cf8a88790a5271154fca05] = '{'.$iebd691e534c6cf2e84cf8a88790a5271154fca05.'}'; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_domain'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_domain'] = Mage::getStoreConfig('web/unsecure/base_url', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'] = Mage::getStoreConfig('general/store_information/name', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); if (empty($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'])) { if (!empty($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66)) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'] = Mage::getModel('core/store')->load($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66)->getName(); } else { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'] = 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 (is_object($i7a5ea366969a291381fafa1448c9a2fafd34ad5e) && $i7a5ea366969a291381fafa1448c9a2fafd34ad5e instanceof Varien_Object) { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'] = $i7a5ea366969a291381fafa1448c9a2fafd34ad5e->getFirstname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'] = $i7a5ea366969a291381fafa1448c9a2fafd34ad5e->getLastname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'] = $i7a5ea366969a291381fafa1448c9a2fafd34ad5e->getEmail(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_phone'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_phone'] = $i7a5ea366969a291381fafa1448c9a2fafd34ad5e->getTelephone(); } } foreach($i0933475b5bd80561a9f50282fd9eb0b8345cec4b as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa = str_replace('{'.$i670253c23c6fcba76bc4256a88fdd8fbc1041039.'}', $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89, $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa); } } return $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa; } protected function _saveTemplate($iacea0d13bc5e2676192c06d68cb091dc0ce26320 = true) { $id82aaf2f437652c4b6efbd55703199f614e8e516 = ''; if ($iacea0d13bc5e2676192c06d68cb091dc0ce26320) { $i1791b2d1f89bb2bd83b34046f59125af207713db = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'magesms_marketing_templateform', array('template' => 'topefekt/magesms/template/form.phtml') ); $id82aaf2f437652c4b6efbd55703199f614e8e516 = $i1791b2d1f89bb2bd83b34046f59125af207713db->toHtml(); } $i42cf41da37138d64d37b0778e6561aab5e1239d6 = $this->getLayout()->createBlock('magesms/template_template'); return $id82aaf2f437652c4b6efbd55703199f614e8e516.$i42cf41da37138d64d37b0778e6561aab5e1239d6->toHtml(); } protected function _initAction() { parent::_initAction(); $this->getLayout()->getBlock('head')->addJs('topefekt/template.js'); $i3358fd35282548f1f8ccafbf23d60a4ade466fd3 = '
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Controller_Template_Action extends Topefekt_Magesms_Controller_Action { public function templateAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ($this->getRequest()->getParams()) { $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2 = $this->getRequest(); if ($i1507c94b68f51b22087227858337782550edf618 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('action')) { try { switch ($i1507c94b68f51b22087227858337782550edf618) { case 'saveTemplate': $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($this->_saveTemplate()); break; case 'loadTemplate': $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($this->_saveTemplate(false)); break; case 'save': if ($this->getRequest()->isPost()) { $iefc930e6dfdf3023610ed7d663c73d176a7544e0 = Mage::getModel('magesms/template'); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->setData(array( 'name' => $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('saveName'), 'template' => $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('text'), 'unicode' => $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('unicode'), 'unique' => $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('unique'), 'date' => date('Y-m-d H:i:s'), 'type' => $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('type') )); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->save(); } break; case 'remove': if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('id')) { $iefc930e6dfdf3023610ed7d663c73d176a7544e0 = Mage::getModel('magesms/template'); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->delete(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($this->_saveTemplate(false)); } break; case 'restore': if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('id')) { $iefc930e6dfdf3023610ed7d663c73d176a7544e0 = Mage::getModel('magesms/template'); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->addData(array('data' => $iefc930e6dfdf3023610ed7d663c73d176a7544e0->getData())); } 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 _prepareText($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = null, $i7a5ea366969a291381fafa1448c9a2fafd34ad5e = null) { if (Mage::registry('magesms_store_id')) Mage::unregister('magesms_store_id'); Mage::register('magesms_store_id', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66, true); if (preg_match_all('/{(.*?)}/', $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $ia00c63b7b8f0d76f361b9bd281e5073cc0d0aa3e)) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b = array(); foreach($ia00c63b7b8f0d76f361b9bd281e5073cc0d0aa3e[1] as $iebd691e534c6cf2e84cf8a88790a5271154fca05) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b[$iebd691e534c6cf2e84cf8a88790a5271154fca05] = '{'.$iebd691e534c6cf2e84cf8a88790a5271154fca05.'}'; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_domain'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_domain'] = Mage::getStoreConfig('web/unsecure/base_url', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'] = Mage::getStoreConfig('general/store_information/name', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); if (empty($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'])) { if (!empty($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66)) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'] = Mage::getModel('core/store')->load($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66)->getName(); } else { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'] = 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 (is_object($i7a5ea366969a291381fafa1448c9a2fafd34ad5e) && $i7a5ea366969a291381fafa1448c9a2fafd34ad5e instanceof Varien_Object) { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'] = $i7a5ea366969a291381fafa1448c9a2fafd34ad5e->getFirstname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'] = $i7a5ea366969a291381fafa1448c9a2fafd34ad5e->getLastname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'] = $i7a5ea366969a291381fafa1448c9a2fafd34ad5e->getEmail(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_phone'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_phone'] = $i7a5ea366969a291381fafa1448c9a2fafd34ad5e->getTelephone(); } } foreach($i0933475b5bd80561a9f50282fd9eb0b8345cec4b as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa = str_replace('{'.$i670253c23c6fcba76bc4256a88fdd8fbc1041039.'}', $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89, $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa); } } return $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa; } protected function _saveTemplate($iacea0d13bc5e2676192c06d68cb091dc0ce26320 = true) { $id82aaf2f437652c4b6efbd55703199f614e8e516 = ''; if ($iacea0d13bc5e2676192c06d68cb091dc0ce26320) { $i1791b2d1f89bb2bd83b34046f59125af207713db = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'magesms_marketing_templateform', array('template' => 'topefekt/magesms/template/form.phtml') ); $id82aaf2f437652c4b6efbd55703199f614e8e516 = $i1791b2d1f89bb2bd83b34046f59125af207713db->toHtml(); } $i42cf41da37138d64d37b0778e6561aab5e1239d6 = $this->getLayout()->createBlock('magesms/template_template'); return $id82aaf2f437652c4b6efbd55703199f614e8e516.$i42cf41da37138d64d37b0778e6561aab5e1239d6->toHtml(); } protected function _initAction() { parent::_initAction(); $this->getLayout()->getBlock('head')->addJs('topefekt/template.js'); $i3358fd35282548f1f8ccafbf23d60a4ade466fd3 = '
app/code/community/Topefekt/Magesms/Helper/Adminhtml/Data.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Helper_Adminhtml_Data extends Mage_Adminhtml_Helper_Data { public function setPageHelpUrl($ic157485eecbe64d400493d7b9e7f434b83aca5d0=null) { if (strpos(Mage::app()->getRequest()->getControllerName(), 'magesms_') === 0) { $i593f9fb6306ab4cdb862f1ef6769504d63647c90 = Mage::getStoreConfig('magesms/template/language').'/'; if ($i593f9fb6306ab4cdb862f1ef6769504d63647c90 == 'en') $i593f9fb6306ab4cdb862f1ef6769504d63647c90 = ''; $this->_pageHelpUrl = 'http://www.mage-sms.com/'.$i593f9fb6306ab4cdb862f1ef6769504d63647c90.Mage::helper('magesms')->__('manual').'.html'; } else { return parent::setPageHelpUrl($ic157485eecbe64d400493d7b9e7f434b83aca5d0); } return $this; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Helper_Adminhtml_Data extends Mage_Adminhtml_Helper_Data { public function setPageHelpUrl($ic157485eecbe64d400493d7b9e7f434b83aca5d0=null) { if (strpos(Mage::app()->getRequest()->getControllerName(), 'magesms_') === 0) { $i593f9fb6306ab4cdb862f1ef6769504d63647c90 = Mage::getStoreConfig('magesms/template/language').'/'; if ($i593f9fb6306ab4cdb862f1ef6769504d63647c90 == 'en') $i593f9fb6306ab4cdb862f1ef6769504d63647c90 = ''; $this->_pageHelpUrl = 'http://www.mage-sms.com/'.$i593f9fb6306ab4cdb862f1ef6769504d63647c90.Mage::helper('magesms')->__('manual').'.html'; } else { return parent::setPageHelpUrl($ic157485eecbe64d400493d7b9e7f434b83aca5d0); } return $this; } }
app/code/community/Topefekt/Magesms/Helper/Data.php CHANGED
@@ -10,7 +10,7 @@
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
- class Topefekt_Magesms_Helper_Data extends Mage_Adminhtml_Helper_Data { public function prepareFilterString($i215e94a3ecdacdf2b3af7056dddcbb72bf4f3ad2) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = array(); $i215e94a3ecdacdf2b3af7056dddcbb72bf4f3ad2 = base64_decode($i215e94a3ecdacdf2b3af7056dddcbb72bf4f3ad2); parse_str($i215e94a3ecdacdf2b3af7056dddcbb72bf4f3ad2, $ia61712c27ea241bd7a543dc2b02ea572274d0322); array_walk_recursive($ia61712c27ea241bd7a543dc2b02ea572274d0322, array($this, 'decodeFilter')); return $ia61712c27ea241bd7a543dc2b02ea572274d0322; } public function decodeFilter(&$ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89 = rawurldecode($ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89); } public function strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749d7c53db4e1e286ce8a65b930c9d93cdabb069954b) { return strlen(utf8_decode($ibcdf76f8c9ddc330c79f805116a8bb146c43749d7c53db4e1e286ce8a65b930c9d93cdabb069954b)); } public function substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749d7c53db4e1e286ce8a65b930c9d93cdabb069954b, $ibcdf76f8c9ddc330c79f805116a8bb146c43749dee10b1113e98c522f9d7b19b278ac191206cf98d, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4616676bff4c07942c8542e6b4e0ccf29d473424 = -1) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d353d238323208401995f652ac6757c9d9fd6d8d5 = preg_split('//u', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7c53db4e1e286ce8a65b930c9d93cdabb069954b, -1); $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd3f9e660973a05c72dd2df52c035747f20824128 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4616676bff4c07942c8542e6b4e0ccf29d473424 == -1 ? count($ibcdf76f8c9ddc330c79f805116a8bb146c43749d353d238323208401995f652ac6757c9d9fd6d8d5) : $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4616676bff4c07942c8542e6b4e0ccf29d473424; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d43e9cdc24374813037dc691df23094b5f8072dac = ''; for($ibcdf76f8c9ddc330c79f805116a8bb146c43749d=$ibcdf76f8c9ddc330c79f805116a8bb146c43749dee10b1113e98c522f9d7b19b278ac191206cf98d; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d<$ibcdf76f8c9ddc330c79f805116a8bb146c43749dd3f9e660973a05c72dd2df52c035747f20824128; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d++) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d43e9cdc24374813037dc691df23094b5f8072dac .= $ibcdf76f8c9ddc330c79f805116a8bb146c43749d353d238323208401995f652ac6757c9d9fd6d8d5[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]; return $ibcdf76f8c9ddc330c79f805116a8bb146c43749d43e9cdc24374813037dc691df23094b5f8072dac; } public function strpos($icf8e6d55f3b73687e31b5bfb7df726c05be874e6, $ibcdf76f8c9ddc330c79f805116a8bb146c43749dfba351358ab7c7f378315c6b3cb913d7f4d7b0fa, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d37e0852c5c95f9440a8999674f38c2ab1fbd56e2 = 0) { return mb_strpos($icf8e6d55f3b73687e31b5bfb7df726c05be874e6, $ibcdf76f8c9ddc330c79f805116a8bb146c43749dfba351358ab7c7f378315c6b3cb913d7f4d7b0fa, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d37e0852c5c95f9440a8999674f38c2ab1fbd56e2, 'UTF-8'); } public function detectLang($ibcdf76f8c9ddc330c79f805116a8bb146c43749dccb00baf62ef7b52dab4785b2fe3e5d6471b5d03 = false) { if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90 = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']); if (!empty($ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90[1])) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749db473854f4b306e706e896b68ceb14665e7bc5475 = explode(';', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90[1]); if (!empty($ibcdf76f8c9ddc330c79f805116a8bb146c43749db473854f4b306e706e896b68ceb14665e7bc5475[0])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90[1] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749db473854f4b306e706e896b68ceb14665e7bc5475[0]; } $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/country_lang')->getCollection(); $iff7e46827cbb6547116c592bf800f4687428abf9->addFilter('lang', strtolower($ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90[0])); foreach ($iff7e46827cbb6547116c592bf800f4687428abf9 as $i4cf0596ef3a67e5add95b49723a3c49aecd1dbd3) { return $ibcdf76f8c9ddc330c79f805116a8bb146c43749dccb00baf62ef7b52dab4785b2fe3e5d6471b5d03 ? $i4cf0596ef3a67e5add95b49723a3c49aecd1dbd3->getData('iso2') : $i4cf0596ef3a67e5add95b49723a3c49aecd1dbd3->getData('country_name'); } if (!empty($ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90[1])) { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/country_lang')->getCollection(); $iff7e46827cbb6547116c592bf800f4687428abf9->addFilter('lang', strtolower($ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90[1])); foreach ($iff7e46827cbb6547116c592bf800f4687428abf9 as $i4cf0596ef3a67e5add95b49723a3c49aecd1dbd3) { return $ibcdf76f8c9ddc330c79f805116a8bb146c43749dccb00baf62ef7b52dab4785b2fe3e5d6471b5d03 ? $i4cf0596ef3a67e5add95b49723a3c49aecd1dbd3->getData('iso2') : $i4cf0596ef3a67e5add95b49723a3c49aecd1dbd3->getData('country_name'); } } Mage::log('Dont detect lang: '.$_SERVER['HTTP_ACCEPT_LANGUAGE']); } return 'en'; } public function formatPrice($ibcdf76f8c9ddc330c79f805116a8bb146c43749d58457975a91d59a84d2920953badcb7365ac1f01, $i2457499363c0873527a65aa9ad19ce774bd79cbc = 4) { return number_format((float)$ibcdf76f8c9ddc330c79f805116a8bb146c43749d58457975a91d59a84d2920953badcb7365ac1f01, $i2457499363c0873527a65aa9ad19ce774bd79cbc, ",", " "); } public function moreText($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4616676bff4c07942c8542e6b4e0ccf29d473424, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d41874a76da96da0584b16b9f04de6e3f06863c83) { if($this->strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa) > $ibcdf76f8c9ddc330c79f805116a8bb146c43749d41874a76da96da0584b16b9f04de6e3f06863c83): $ibcdf76f8c9ddc330c79f805116a8bb146c43749d838a72d011cf88c91dfc0040ea07c7fa8e44c6ae = $this->strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, ' ', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4616676bff4c07942c8542e6b4e0ccf29d473424, 'UTF-8'); if($ibcdf76f8c9ddc330c79f805116a8bb146c43749d838a72d011cf88c91dfc0040ea07c7fa8e44c6ae > $ibcdf76f8c9ddc330c79f805116a8bb146c43749d41874a76da96da0584b16b9f04de6e3f06863c83 || $ibcdf76f8c9ddc330c79f805116a8bb146c43749d838a72d011cf88c91dfc0040ea07c7fa8e44c6ae == 0) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d838a72d011cf88c91dfc0040ea07c7fa8e44c6ae = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d41874a76da96da0584b16b9f04de6e3f06863c83; return "<span style=\"cursor:help;text-decoration:underline;\" title=\"".$ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa."\">".$this->substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, 0, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d838a72d011cf88c91dfc0040ea07c7fa8e44c6ae)."...</span>"; else: return $ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa; endif; } public function isPhoneNumber($ibcdf76f8c9ddc330c79f805116a8bb146c43749d9e76a736cd2ce866634b875b0e477fe802efd466) { return preg_match('/^[0-9]{7,18}$/', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d9e76a736cd2ce866634b875b0e477fe802efd466); } public function isTextSender($ibcdf76f8c9ddc330c79f805116a8bb146c43749d1e0ab2cc14bf21436fd5165a18812bf40da12d82) { return preg_match('/(?!^\d+$)^[0-9a-zA-Z_.]{3,11}$/', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d1e0ab2cc14bf21436fd5165a18812bf40da12d82); } public function countSms($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $ibcdf76f8c9ddc330c79f805116a8bb146c43749de8d90f6313614fbb6564426c0b0cb59a0ca4cecd) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa = str_replace("\r\n","\n", $ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749de8d90f6313614fbb6564426c0b0cb59a0ca4cecd) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956 = $this->strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956 < 71) $if295547318143e26fc7026b92d58e3d1eec229db = 1; elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956 % 67 == 0) $if295547318143e26fc7026b92d58e3d1eec229db= floor($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956/67); else $if295547318143e26fc7026b92d58e3d1eec229db = floor($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956/67) + 1; } else { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956 = $this->strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956 < 161) $if295547318143e26fc7026b92d58e3d1eec229db = 1; elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956 % 153 == 0) $if295547318143e26fc7026b92d58e3d1eec229db = floor($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956/153); else $if295547318143e26fc7026b92d58e3d1eec229db = floor($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956/153) + 1; } return $if295547318143e26fc7026b92d58e3d1eec229db; } public function prepareNumber($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a, $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = null) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dbad5149cd536c7e1f814c7b3874463985a5fc9e0 = 0; $i7492a7ab99a6ff1e0ae253366480ecb40a550224 = ''; $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = str_replace(array(' ', '-', '(', ')', '/'), '', $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2); if (strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, '+') === 0 ) $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, 1); if (strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, '00') === 0 ) $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, 2); elseif (strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, '0') === 0 ) $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, 1); $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = Mage::getSingleton('magesms/exceptions')->number($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd); $ibcdf76f8c9ddc330c79f805116a8bb146c43749db8c2593511e733deb36fb6bc932a747fcf3b754c = strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2); $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 = Mage::getSingleton('magesms/maps')->getCollection(); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0->count()) { foreach ($ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 as $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { if (preg_match("/^".$ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getArea()."/", $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d45e0dbda03c5e1b049126d29f809da95d0e0aa03)) { $i7492a7ab99a6ff1e0ae253366480ecb40a550224 = substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, 0, strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getArea())); $ibcdf76f8c9ddc330c79f805116a8bb146c43749dc155ac0a2e7d522b71a8f6aae45a2917bd596596 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getNumber(); if (($ibcdf76f8c9ddc330c79f805116a8bb146c43749db8c2593511e733deb36fb6bc932a747fcf3b754c-strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getArea())) == $ibcdf76f8c9ddc330c79f805116a8bb146c43749dc155ac0a2e7d522b71a8f6aae45a2917bd596596) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dbad5149cd536c7e1f814c7b3874463985a5fc9e0 = 1; continue; } } } } if(!$ibcdf76f8c9ddc330c79f805116a8bb146c43749dbad5149cd536c7e1f814c7b3874463985a5fc9e0) $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd.$ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2; elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbad5149cd536c7e1f814c7b3874463985a5fc9e0 && $i7492a7ab99a6ff1e0ae253366480ecb40a550224) $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd = $i7492a7ab99a6ff1e0ae253366480ecb40a550224; if (!$ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd && $i7492a7ab99a6ff1e0ae253366480ecb40a550224) $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd = $i7492a7ab99a6ff1e0ae253366480ecb40a550224; $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df = array( 'mobile' => $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, 'prefix' => $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd, 'isms' => '', 'sendertype' => '', 'senderID' => '' ); $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 = Mage::getSingleton('magesms/routes')->getCollection() ->addFieldToFilter('area', $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd) ->addFieldToFilter('type', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a); foreach ($ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 as $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df['isms'] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d['isms']; $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df['sendertype'] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d['sendertype']; $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df['senderID'] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d['senderID']; if (!is_null($ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66)) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d898347c1def9d4effdd15deb4483c4b4a4aa8ab7 = Mage::getModel('core/store')->load($ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66)->getGroup()->getId(); $ida3b491904fb073f446bf820cd55a0ff69b347d1 = Mage::getSingleton('magesms/routes_alternative')->getCollection() ->addFieldToFilter('route_id', $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId()) ->addFieldToFilter('store_group_id', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d898347c1def9d4effdd15deb4483c4b4a4aa8ab7); if ($ida3b491904fb073f446bf820cd55a0ff69b347d1->count()) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df['senderID'] = $ida3b491904fb073f446bf820cd55a0ff69b347d1->getFirstItem()->getTextsender(); } } } return $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df; } public function getHooks($i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7137e40370cf1c5ccf937060891613788203e2d6 = 'default') { if (isset(Topefekt_Magesms_Model_Hooks::$groups[$i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc]) && $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc != 'order_status') { $if739aceffec69fa2733946a3d319defaa354082d = Mage::getSingleton('magesms/hooks')->getCollection() ->addFieldToFilter('lang', Mage::getStoreConfig('magesms/template/language')) ->addFieldToFilter('owner', array('neq'=>1)) ->addFieldToFilter('`group`', Topefekt_Magesms_Model_Hooks::$groups[$i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc]); } elseif (isset(Topefekt_Magesms_Model_Hooks::$groups[$i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc])) { $i42ee48f418943c9662de0976069476c7dc8f620d = Mage::getSingleton('magesms/hooks')->getCollection() ->addFieldToFilter('lang', Mage::getStoreConfig('magesms/template/language')) ->addFieldToFilter('owner', array('neq'=>1)) ->addFieldToFilter('`group`', Topefekt_Magesms_Model_Hooks::$groups[$i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc]) ->getFirstItem(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd09e842bda9623afdb1b69812abe0b86eaf039c9 = Mage::getSingleton('sales/order_status')->getCollection(); $if739aceffec69fa2733946a3d319defaa354082d = array(); foreach($ibcdf76f8c9ddc330c79f805116a8bb146c43749dd09e842bda9623afdb1b69812abe0b86eaf039c9 as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d712821c3a64ae4a252ded9f3deaaddb6e942d985) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05 = clone($i42ee48f418943c9662de0976069476c7dc8f620d); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0bd865ed0ae1ae72e839b8c033a4c0f7d84122b5 = Mage::helper('sales')->__($ibcdf76f8c9ddc330c79f805116a8bb146c43749d712821c3a64ae4a252ded9f3deaaddb6e942d985->getLabel()); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05->setTemplate(str_replace('{{order_status_name}}', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0bd865ed0ae1ae72e839b8c033a4c0f7d84122b5, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05->getTemplate())); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05->setTemplate2(str_replace('{{order_status_name}}', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0bd865ed0ae1ae72e839b8c033a4c0f7d84122b5, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05->getTemplate2())); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05->setName('orderStatus'.uc_words($ibcdf76f8c9ddc330c79f805116a8bb146c43749d712821c3a64ae4a252ded9f3deaaddb6e942d985->getStatus(), '')); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05->setStatusName($ibcdf76f8c9ddc330c79f805116a8bb146c43749d712821c3a64ae4a252ded9f3deaaddb6e942d985->getLabel()); $if739aceffec69fa2733946a3d319defaa354082d[] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05; } } else { $i42ee48f418943c9662de0976069476c7dc8f620d = Mage::getModel('magesms/hooks'); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a == 'customers') Mage::dispatchEvent('topefekt_magesms_customersms_hook', array('hook' => $i42ee48f418943c9662de0976069476c7dc8f620d, 'mutation' => $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7137e40370cf1c5ccf937060891613788203e2d6)); else Mage::dispatchEvent('topefekt_magesms_adminsms_hook', array('hook' => $i42ee48f418943c9662de0976069476c7dc8f620d)); } $ia61712c27ea241bd7a543dc2b02ea572274d0322 = array(); foreach($if739aceffec69fa2733946a3d319defaa354082d as $i42ee48f418943c9662de0976069476c7dc8f620d) { $ia61712c27ea241bd7a543dc2b02ea572274d0322[$i42ee48f418943c9662de0976069476c7dc8f620d->getName()] = $i42ee48f418943c9662de0976069476c7dc8f620d; } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e = Mage::getSingleton('magesms/hooks_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a)->getCollection(); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a == 'customers') $ibcdf76f8c9ddc330c79f805116a8bb146c43749d1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e->addFieldToFilter('mutation', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7137e40370cf1c5ccf937060891613788203e2d6); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e->count()) { foreach($ibcdf76f8c9ddc330c79f805116a8bb146c43749d1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4df015c4c10bbcf1d38137f3659b01221d2dc076) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4df015c4c10bbcf1d38137f3659b01221d2dc076->getName(); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) { $ia61712c27ea241bd7a543dc2b02ea572274d0322[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]->setSmstext($ibcdf76f8c9ddc330c79f805116a8bb146c43749d4df015c4c10bbcf1d38137f3659b01221d2dc076->getSmstext()); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a == 'admins') { $ia61712c27ea241bd7a543dc2b02ea572274d0322[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d4df015c4c10bbcf1d38137f3659b01221d2dc076->getAdminId().'_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d4df015c4c10bbcf1d38137f3659b01221d2dc076->getStoreGroupId()] = 1; $ia61712c27ea241bd7a543dc2b02ea572274d0322[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]->setActive(1); } else { $ia61712c27ea241bd7a543dc2b02ea572274d0322[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]->setActive($ibcdf76f8c9ddc330c79f805116a8bb146c43749d4df015c4c10bbcf1d38137f3659b01221d2dc076->getActive()); } } } } return $ia61712c27ea241bd7a543dc2b02ea572274d0322; } public function hookVariablesJS($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa) { if (preg_match_all('/{(.*?)}/', $ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $ibcdf76f8c9ddc330c79f805116a8bb146c43749da00c63b7b8f0d76f361b9bd281e5073cc0d0aa3e)) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0933475b5bd80561a9f50282fd9eb0b8345cec4b = array(); foreach($ibcdf76f8c9ddc330c79f805116a8bb146c43749da00c63b7b8f0d76f361b9bd281e5073cc0d0aa3e[1] as $ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0933475b5bd80561a9f50282fd9eb0b8345cec4b[$ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05] = '{'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05.'}'; } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d322d20c6b1eb01ecb5d5801e003969fcc1f407a9 = Mage::getSingleton('magesms/variables')->getCollection() ->addFieldToFilter('name', array('in'=>array(array_keys($ibcdf76f8c9ddc330c79f805116a8bb146c43749d0933475b5bd80561a9f50282fd9eb0b8345cec4b)))); foreach($ibcdf76f8c9ddc330c79f805116a8bb146c43749d322d20c6b1eb01ecb5d5801e003969fcc1f407a9 as $ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0933475b5bd80561a9f50282fd9eb0b8345cec4b[$ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05->getName()] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05->getTemplate() ? Mage::helper('magesms')->__($ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05->getTemplate()) : $ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05->getTemplate(); } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d5528ed14b056e3debe4695094269de3a98f76fe7 = ''; foreach($ibcdf76f8c9ddc330c79f805116a8bb146c43749d0933475b5bd80561a9f50282fd9eb0b8345cec4b as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039=>$ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { if (!empty($ibcdf76f8c9ddc330c79f805116a8bb146c43749d5528ed14b056e3debe4695094269de3a98f76fe7)) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d5528ed14b056e3debe4695094269de3a98f76fe7 .= ', '; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d5528ed14b056e3debe4695094269de3a98f76fe7 .= $ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039.': "'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89.'"'; } return $ibcdf76f8c9ddc330c79f805116a8bb146c43749d5528ed14b056e3debe4695094269de3a98f76fe7; } } public function filterDates($if66f788c75229f5f3ea1a622ab4dee258553c789, $ic78bc645a0f45c428f6551163ed2dce47dd289ee) { if (empty($ic78bc645a0f45c428f6551163ed2dce47dd289ee)) { return $if66f788c75229f5f3ea1a622ab4dee258553c789; } $i25d716f44b9a21507a214e968cc96805785eff97 = new Zend_Filter_LocalizedToNormalized(array( 'date_format' => Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT) )); $id1da71c6f00d9b85058894facc6aae99ed82822c = new Zend_Filter_NormalizedToLocalized(array( 'date_format' => Varien_Date::DATE_INTERNAL_FORMAT )); foreach ($ic78bc645a0f45c428f6551163ed2dce47dd289ee as $i36424a86007474ffc648c582cbfca240cda58c1e) { if (array_key_exists($i36424a86007474ffc648c582cbfca240cda58c1e, $if66f788c75229f5f3ea1a622ab4dee258553c789) && !empty($i36424a86007474ffc648c582cbfca240cda58c1e)) { $if66f788c75229f5f3ea1a622ab4dee258553c789[$i36424a86007474ffc648c582cbfca240cda58c1e] = $i25d716f44b9a21507a214e968cc96805785eff97->filter($if66f788c75229f5f3ea1a622ab4dee258553c789[$i36424a86007474ffc648c582cbfca240cda58c1e]); $if66f788c75229f5f3ea1a622ab4dee258553c789[$i36424a86007474ffc648c582cbfca240cda58c1e] = $id1da71c6f00d9b85058894facc6aae99ed82822c->filter($if66f788c75229f5f3ea1a622ab4dee258553c789[$i36424a86007474ffc648c582cbfca240cda58c1e]); } } return $if66f788c75229f5f3ea1a622ab4dee258553c789; } public function getCustomerCollection() { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getResourceModel('customer/customer_collection') ->addNameToSelect() ->joinAttribute('billing_telephone', 'customer_address/telephone', 'default_billing', null, 'left') ->joinAttribute('shipping_telephone', 'customer_address/telephone', 'default_shipping', null, 'left') ->joinAttribute('billing_city', 'customer_address/city', 'default_billing', null, 'left') ->joinAttribute('billing_country_id', 'customer_address/country_id', 'default_billing', null, 'left') ->joinAttribute('shipping_country_id', 'customer_address/country_id', 'default_shipping', null, 'left') ->addFieldToFilter(array( array( 'attribute' => 'billing_telephone', array(array('notnull' => true), array('neq' => '')) ), array( 'attribute' => 'shipping_telephone', array(array('notnull' => true), array('neq' => '')) ) )); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('IF(`at_shipping_telephone`.`value`, `at_shipping_telephone`.`value`, `at_billing_telephone`.`value`) AS telephone'); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('IF(`at_shipping_country_id`.`value`, `at_shipping_country_id`.`value`, `at_billing_country_id`.`value`) AS country_id'); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
+ class Topefekt_Magesms_Helper_Data extends Mage_Adminhtml_Helper_Data { const MAGESMS_ENABLE = 'magesms/magesms/enable'; private $v148194b5b9cc653ce2e35e9709e441dc6fd4123a = array(); public function isActive($ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = null) { return Mage::getStoreConfig(self::MAGESMS_ENABLE, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66); } public function prepareFilterString($i215e94a3ecdacdf2b3af7056dddcbb72bf4f3ad2) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = array(); $i215e94a3ecdacdf2b3af7056dddcbb72bf4f3ad2 = base64_decode($i215e94a3ecdacdf2b3af7056dddcbb72bf4f3ad2); parse_str($i215e94a3ecdacdf2b3af7056dddcbb72bf4f3ad2, $ia61712c27ea241bd7a543dc2b02ea572274d0322); array_walk_recursive($ia61712c27ea241bd7a543dc2b02ea572274d0322, array($this, 'decodeFilter')); return $ia61712c27ea241bd7a543dc2b02ea572274d0322; } public function decodeFilter(&$ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89 = rawurldecode($ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89); } public function strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749d7c53db4e1e286ce8a65b930c9d93cdabb069954b) { return strlen(utf8_decode($ibcdf76f8c9ddc330c79f805116a8bb146c43749d7c53db4e1e286ce8a65b930c9d93cdabb069954b)); } public function substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749d7c53db4e1e286ce8a65b930c9d93cdabb069954b, $ibcdf76f8c9ddc330c79f805116a8bb146c43749dee10b1113e98c522f9d7b19b278ac191206cf98d, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4616676bff4c07942c8542e6b4e0ccf29d473424 = -1) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d353d238323208401995f652ac6757c9d9fd6d8d5 = preg_split('//u', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7c53db4e1e286ce8a65b930c9d93cdabb069954b, -1); $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd3f9e660973a05c72dd2df52c035747f20824128 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4616676bff4c07942c8542e6b4e0ccf29d473424 == -1 ? count($ibcdf76f8c9ddc330c79f805116a8bb146c43749d353d238323208401995f652ac6757c9d9fd6d8d5) : $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4616676bff4c07942c8542e6b4e0ccf29d473424; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d43e9cdc24374813037dc691df23094b5f8072dac = ''; for($ibcdf76f8c9ddc330c79f805116a8bb146c43749d=$ibcdf76f8c9ddc330c79f805116a8bb146c43749dee10b1113e98c522f9d7b19b278ac191206cf98d; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d<$ibcdf76f8c9ddc330c79f805116a8bb146c43749dd3f9e660973a05c72dd2df52c035747f20824128; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d++) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d43e9cdc24374813037dc691df23094b5f8072dac .= $ibcdf76f8c9ddc330c79f805116a8bb146c43749d353d238323208401995f652ac6757c9d9fd6d8d5[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]; return $ibcdf76f8c9ddc330c79f805116a8bb146c43749d43e9cdc24374813037dc691df23094b5f8072dac; } public function strpos($icf8e6d55f3b73687e31b5bfb7df726c05be874e6, $ibcdf76f8c9ddc330c79f805116a8bb146c43749dfba351358ab7c7f378315c6b3cb913d7f4d7b0fa, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d37e0852c5c95f9440a8999674f38c2ab1fbd56e2 = 0) { return mb_strpos($icf8e6d55f3b73687e31b5bfb7df726c05be874e6, $ibcdf76f8c9ddc330c79f805116a8bb146c43749dfba351358ab7c7f378315c6b3cb913d7f4d7b0fa, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d37e0852c5c95f9440a8999674f38c2ab1fbd56e2, 'UTF-8'); } public function detectLang($ibcdf76f8c9ddc330c79f805116a8bb146c43749dccb00baf62ef7b52dab4785b2fe3e5d6471b5d03 = false) { if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90 = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']); if (!empty($ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90[1])) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749db473854f4b306e706e896b68ceb14665e7bc5475 = explode(';', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90[1]); if (!empty($ibcdf76f8c9ddc330c79f805116a8bb146c43749db473854f4b306e706e896b68ceb14665e7bc5475[0])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90[1] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749db473854f4b306e706e896b68ceb14665e7bc5475[0]; } $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/country_lang')->getCollection(); $iff7e46827cbb6547116c592bf800f4687428abf9->addFilter('lang', strtolower($ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90[0])); foreach ($iff7e46827cbb6547116c592bf800f4687428abf9 as $i4cf0596ef3a67e5add95b49723a3c49aecd1dbd3) { return $ibcdf76f8c9ddc330c79f805116a8bb146c43749dccb00baf62ef7b52dab4785b2fe3e5d6471b5d03 ? $i4cf0596ef3a67e5add95b49723a3c49aecd1dbd3->getData('iso2') : $i4cf0596ef3a67e5add95b49723a3c49aecd1dbd3->getData('country_name'); } if (!empty($ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90[1])) { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/country_lang')->getCollection(); $iff7e46827cbb6547116c592bf800f4687428abf9->addFilter('lang', strtolower($ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90[1])); foreach ($iff7e46827cbb6547116c592bf800f4687428abf9 as $i4cf0596ef3a67e5add95b49723a3c49aecd1dbd3) { return $ibcdf76f8c9ddc330c79f805116a8bb146c43749dccb00baf62ef7b52dab4785b2fe3e5d6471b5d03 ? $i4cf0596ef3a67e5add95b49723a3c49aecd1dbd3->getData('iso2') : $i4cf0596ef3a67e5add95b49723a3c49aecd1dbd3->getData('country_name'); } } Mage::log('Dont detect lang: '.$_SERVER['HTTP_ACCEPT_LANGUAGE']); } return 'en'; } public function formatPrice($ibcdf76f8c9ddc330c79f805116a8bb146c43749d58457975a91d59a84d2920953badcb7365ac1f01, $i2457499363c0873527a65aa9ad19ce774bd79cbc = 4) { return number_format((float)$ibcdf76f8c9ddc330c79f805116a8bb146c43749d58457975a91d59a84d2920953badcb7365ac1f01, $i2457499363c0873527a65aa9ad19ce774bd79cbc, ",", " "); } public function moreText($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4616676bff4c07942c8542e6b4e0ccf29d473424, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d41874a76da96da0584b16b9f04de6e3f06863c83) { if($this->strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa) > $ibcdf76f8c9ddc330c79f805116a8bb146c43749d41874a76da96da0584b16b9f04de6e3f06863c83): $ibcdf76f8c9ddc330c79f805116a8bb146c43749d838a72d011cf88c91dfc0040ea07c7fa8e44c6ae = $this->strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, ' ', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4616676bff4c07942c8542e6b4e0ccf29d473424, 'UTF-8'); if($ibcdf76f8c9ddc330c79f805116a8bb146c43749d838a72d011cf88c91dfc0040ea07c7fa8e44c6ae > $ibcdf76f8c9ddc330c79f805116a8bb146c43749d41874a76da96da0584b16b9f04de6e3f06863c83 || $ibcdf76f8c9ddc330c79f805116a8bb146c43749d838a72d011cf88c91dfc0040ea07c7fa8e44c6ae == 0) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d838a72d011cf88c91dfc0040ea07c7fa8e44c6ae = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d41874a76da96da0584b16b9f04de6e3f06863c83; return "<span style=\"cursor:help;text-decoration:underline;\" title=\"".$ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa."\">".$this->substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, 0, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d838a72d011cf88c91dfc0040ea07c7fa8e44c6ae)."...</span>"; else: return $ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa; endif; } public function isPhoneNumber($ibcdf76f8c9ddc330c79f805116a8bb146c43749d9e76a736cd2ce866634b875b0e477fe802efd466) { return preg_match('/^[0-9]{7,18}$/', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d9e76a736cd2ce866634b875b0e477fe802efd466); } public function isTextSender($ibcdf76f8c9ddc330c79f805116a8bb146c43749d1e0ab2cc14bf21436fd5165a18812bf40da12d82) { return preg_match('/(?!^\d+$)^[0-9a-zA-Z_.]{3,11}$/', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d1e0ab2cc14bf21436fd5165a18812bf40da12d82); } public function countSms($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $ibcdf76f8c9ddc330c79f805116a8bb146c43749de8d90f6313614fbb6564426c0b0cb59a0ca4cecd) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa = str_replace("\r\n","\n", $ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749de8d90f6313614fbb6564426c0b0cb59a0ca4cecd) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956 = $this->strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956 < 71) $if295547318143e26fc7026b92d58e3d1eec229db = 1; elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956 % 67 == 0) $if295547318143e26fc7026b92d58e3d1eec229db= floor($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956/67); else $if295547318143e26fc7026b92d58e3d1eec229db = floor($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956/67) + 1; } else { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956 = $this->strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956 < 161) $if295547318143e26fc7026b92d58e3d1eec229db = 1; elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956 % 153 == 0) $if295547318143e26fc7026b92d58e3d1eec229db = floor($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956/153); else $if295547318143e26fc7026b92d58e3d1eec229db = floor($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956/153) + 1; } return $if295547318143e26fc7026b92d58e3d1eec229db; } public function prepareNumber($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a, $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = null) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dbad5149cd536c7e1f814c7b3874463985a5fc9e0 = 0; $i7492a7ab99a6ff1e0ae253366480ecb40a550224 = ''; $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = str_replace(array(' ', '-', '(', ')', '/'), '', $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2); if (strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, '+') === 0 ) $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, 1); if (strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, '00') === 0 ) $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, 2); elseif (strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, '0') === 0 ) $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, 1); $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = Mage::getSingleton('magesms/exceptions')->number($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd); $ibcdf76f8c9ddc330c79f805116a8bb146c43749db8c2593511e733deb36fb6bc932a747fcf3b754c = strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2); if (isset($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['maps'])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['maps']; else $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['maps'] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 = Mage::getSingleton('magesms/maps')->getCollection(); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0->count()) { foreach ($ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 as $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { if (preg_match("/^".$ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getArea()."/", $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d45e0dbda03c5e1b049126d29f809da95d0e0aa03)) { $i7492a7ab99a6ff1e0ae253366480ecb40a550224 = substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, 0, strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getArea())); $ibcdf76f8c9ddc330c79f805116a8bb146c43749dc155ac0a2e7d522b71a8f6aae45a2917bd596596 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getNumber(); if (($ibcdf76f8c9ddc330c79f805116a8bb146c43749db8c2593511e733deb36fb6bc932a747fcf3b754c-strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getArea())) == $ibcdf76f8c9ddc330c79f805116a8bb146c43749dc155ac0a2e7d522b71a8f6aae45a2917bd596596) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dbad5149cd536c7e1f814c7b3874463985a5fc9e0 = 1; continue; } } } } if(!$ibcdf76f8c9ddc330c79f805116a8bb146c43749dbad5149cd536c7e1f814c7b3874463985a5fc9e0) $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd.$ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2; elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbad5149cd536c7e1f814c7b3874463985a5fc9e0 && $i7492a7ab99a6ff1e0ae253366480ecb40a550224) $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd = $i7492a7ab99a6ff1e0ae253366480ecb40a550224; if (!$ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd && $i7492a7ab99a6ff1e0ae253366480ecb40a550224) $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd = $i7492a7ab99a6ff1e0ae253366480ecb40a550224; $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df = array( 'mobile' => $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, 'prefix' => $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd, 'isms' => '', 'sendertype' => '', 'senderID' => '' ); if (isset($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['routes_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a.'_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['routes_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a.'_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd]; else $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['routes_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a.'_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 = Mage::getSingleton('magesms/routes')->getCollection() ->addFieldToFilter('area', $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd) ->addFieldToFilter('type', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a); if (!is_null($ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66)) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d898347c1def9d4effdd15deb4483c4b4a4aa8ab7 = Mage::getModel('core/store')->load($ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66)->getGroup()->getId(); foreach ($ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 as $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df['isms'] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d['isms']; $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df['sendertype'] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d['sendertype']; $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df['senderID'] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d['senderID']; if (!is_null($ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66)) { if (isset($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['routes-alternative_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId().'_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d898347c1def9d4effdd15deb4483c4b4a4aa8ab7])) $ida3b491904fb073f446bf820cd55a0ff69b347d1 = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['routes-alternative_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId().'_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d898347c1def9d4effdd15deb4483c4b4a4aa8ab7]; echo $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['routes-alternative_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId().'_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d898347c1def9d4effdd15deb4483c4b4a4aa8ab7] = $ida3b491904fb073f446bf820cd55a0ff69b347d1 = Mage::getSingleton('magesms/routes_alternative')->getCollection() ->addFieldToFilter('route_id', $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId()) ->addFieldToFilter('store_group_id', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d898347c1def9d4effdd15deb4483c4b4a4aa8ab7); if ($ida3b491904fb073f446bf820cd55a0ff69b347d1->count()) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df['senderID'] = $ida3b491904fb073f446bf820cd55a0ff69b347d1->getFirstItem()->getTextsender(); } } } return $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df; } public function getHooks($i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7137e40370cf1c5ccf937060891613788203e2d6 = 'default') { if (isset(Topefekt_Magesms_Model_Hooks::$groups[$i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc]) && $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc != 'order_status') { $if739aceffec69fa2733946a3d319defaa354082d = Mage::getSingleton('magesms/hooks')->getCollection() ->addFieldToFilter('lang', Mage::getStoreConfig('magesms/template/language')) ->addFieldToFilter('owner', array('neq'=>1)) ->addFieldToFilter('`group`', Topefekt_Magesms_Model_Hooks::$groups[$i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc]); } elseif (isset(Topefekt_Magesms_Model_Hooks::$groups[$i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc])) { $i42ee48f418943c9662de0976069476c7dc8f620d = Mage::getSingleton('magesms/hooks')->getCollection() ->addFieldToFilter('lang', Mage::getStoreConfig('magesms/template/language')) ->addFieldToFilter('owner', array('neq'=>1)) ->addFieldToFilter('`group`', Topefekt_Magesms_Model_Hooks::$groups[$i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc]) ->getFirstItem(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd09e842bda9623afdb1b69812abe0b86eaf039c9 = Mage::getSingleton('sales/order_status')->getCollection(); $if739aceffec69fa2733946a3d319defaa354082d = array(); foreach($ibcdf76f8c9ddc330c79f805116a8bb146c43749dd09e842bda9623afdb1b69812abe0b86eaf039c9 as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d712821c3a64ae4a252ded9f3deaaddb6e942d985) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05 = clone($i42ee48f418943c9662de0976069476c7dc8f620d); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0bd865ed0ae1ae72e839b8c033a4c0f7d84122b5 = Mage::helper('sales')->__($ibcdf76f8c9ddc330c79f805116a8bb146c43749d712821c3a64ae4a252ded9f3deaaddb6e942d985->getLabel()); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05->setTemplate(str_replace('{{order_status_name}}', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0bd865ed0ae1ae72e839b8c033a4c0f7d84122b5, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05->getTemplate())); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05->setTemplate2(str_replace('{{order_status_name}}', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0bd865ed0ae1ae72e839b8c033a4c0f7d84122b5, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05->getTemplate2())); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da0b4e748647d3e52f7c9741d5f659711a2db6dc5 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d712821c3a64ae4a252ded9f3deaaddb6e942d985->getStatus(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da0b4e748647d3e52f7c9741d5f659711a2db6dc5 = preg_replace('/[^a-zA-Z0-9_]/', '_', $ibcdf76f8c9ddc330c79f805116a8bb146c43749da0b4e748647d3e52f7c9741d5f659711a2db6dc5); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da0b4e748647d3e52f7c9741d5f659711a2db6dc5 = preg_replace('/^([^a-zA-Z])/', 'x$1', $ibcdf76f8c9ddc330c79f805116a8bb146c43749da0b4e748647d3e52f7c9741d5f659711a2db6dc5); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05->setName('orderStatus'.uc_words($ibcdf76f8c9ddc330c79f805116a8bb146c43749da0b4e748647d3e52f7c9741d5f659711a2db6dc5, '')); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05->setStatusName($ibcdf76f8c9ddc330c79f805116a8bb146c43749d712821c3a64ae4a252ded9f3deaaddb6e942d985->getLabel()); $if739aceffec69fa2733946a3d319defaa354082d[] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05; } } else { $i42ee48f418943c9662de0976069476c7dc8f620d = Mage::getModel('magesms/hooks'); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a == 'customers') Mage::dispatchEvent('topefekt_magesms_customersms_hook', array('hook' => $i42ee48f418943c9662de0976069476c7dc8f620d, 'mutation' => $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7137e40370cf1c5ccf937060891613788203e2d6)); else Mage::dispatchEvent('topefekt_magesms_adminsms_hook', array('hook' => $i42ee48f418943c9662de0976069476c7dc8f620d)); } $ia61712c27ea241bd7a543dc2b02ea572274d0322 = array(); foreach($if739aceffec69fa2733946a3d319defaa354082d as $i42ee48f418943c9662de0976069476c7dc8f620d) { $ia61712c27ea241bd7a543dc2b02ea572274d0322[$i42ee48f418943c9662de0976069476c7dc8f620d->getName()] = $i42ee48f418943c9662de0976069476c7dc8f620d; } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e = Mage::getSingleton('magesms/hooks_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a)->getCollection(); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a == 'customers') $ibcdf76f8c9ddc330c79f805116a8bb146c43749d1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e->addFieldToFilter('mutation', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7137e40370cf1c5ccf937060891613788203e2d6); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e->count()) { foreach($ibcdf76f8c9ddc330c79f805116a8bb146c43749d1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4df015c4c10bbcf1d38137f3659b01221d2dc076) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4df015c4c10bbcf1d38137f3659b01221d2dc076->getName(); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) { $ia61712c27ea241bd7a543dc2b02ea572274d0322[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]->setSmstext($ibcdf76f8c9ddc330c79f805116a8bb146c43749d4df015c4c10bbcf1d38137f3659b01221d2dc076->getSmstext()); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a == 'admins') { $ia61712c27ea241bd7a543dc2b02ea572274d0322[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d4df015c4c10bbcf1d38137f3659b01221d2dc076->getAdminId().'_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d4df015c4c10bbcf1d38137f3659b01221d2dc076->getStoreGroupId()] = 1; $ia61712c27ea241bd7a543dc2b02ea572274d0322[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]->setActive(1); } else { $ia61712c27ea241bd7a543dc2b02ea572274d0322[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]->setActive($ibcdf76f8c9ddc330c79f805116a8bb146c43749d4df015c4c10bbcf1d38137f3659b01221d2dc076->getActive()); } } } } return $ia61712c27ea241bd7a543dc2b02ea572274d0322; } public function hookVariablesJS($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa) { if (preg_match_all('/{(.*?)}/', $ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $ibcdf76f8c9ddc330c79f805116a8bb146c43749da00c63b7b8f0d76f361b9bd281e5073cc0d0aa3e)) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0933475b5bd80561a9f50282fd9eb0b8345cec4b = array(); foreach($ibcdf76f8c9ddc330c79f805116a8bb146c43749da00c63b7b8f0d76f361b9bd281e5073cc0d0aa3e[1] as $ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0933475b5bd80561a9f50282fd9eb0b8345cec4b[$ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05] = '{'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05.'}'; } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d322d20c6b1eb01ecb5d5801e003969fcc1f407a9 = Mage::getSingleton('magesms/variables')->getCollection() ->addFieldToFilter('name', array('in'=>array(array_keys($ibcdf76f8c9ddc330c79f805116a8bb146c43749d0933475b5bd80561a9f50282fd9eb0b8345cec4b)))); foreach($ibcdf76f8c9ddc330c79f805116a8bb146c43749d322d20c6b1eb01ecb5d5801e003969fcc1f407a9 as $ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0933475b5bd80561a9f50282fd9eb0b8345cec4b[$ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05->getName()] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05->getTemplate() ? Mage::helper('magesms')->__($ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05->getTemplate()) : $ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05->getTemplate(); } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d5528ed14b056e3debe4695094269de3a98f76fe7 = ''; foreach($ibcdf76f8c9ddc330c79f805116a8bb146c43749d0933475b5bd80561a9f50282fd9eb0b8345cec4b as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039=>$ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { if (!empty($ibcdf76f8c9ddc330c79f805116a8bb146c43749d5528ed14b056e3debe4695094269de3a98f76fe7)) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d5528ed14b056e3debe4695094269de3a98f76fe7 .= ', '; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d5528ed14b056e3debe4695094269de3a98f76fe7 .= $ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039.': "'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89.'"'; } return $ibcdf76f8c9ddc330c79f805116a8bb146c43749d5528ed14b056e3debe4695094269de3a98f76fe7; } } public function filterDates($if66f788c75229f5f3ea1a622ab4dee258553c789, $ic78bc645a0f45c428f6551163ed2dce47dd289ee) { if (empty($ic78bc645a0f45c428f6551163ed2dce47dd289ee)) { return $if66f788c75229f5f3ea1a622ab4dee258553c789; } $i25d716f44b9a21507a214e968cc96805785eff97 = new Zend_Filter_LocalizedToNormalized(array( 'date_format' => Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT) )); $id1da71c6f00d9b85058894facc6aae99ed82822c = new Zend_Filter_NormalizedToLocalized(array( 'date_format' => Varien_Date::DATE_INTERNAL_FORMAT )); foreach ($ic78bc645a0f45c428f6551163ed2dce47dd289ee as $i36424a86007474ffc648c582cbfca240cda58c1e) { if (array_key_exists($i36424a86007474ffc648c582cbfca240cda58c1e, $if66f788c75229f5f3ea1a622ab4dee258553c789) && !empty($i36424a86007474ffc648c582cbfca240cda58c1e)) { $if66f788c75229f5f3ea1a622ab4dee258553c789[$i36424a86007474ffc648c582cbfca240cda58c1e] = $i25d716f44b9a21507a214e968cc96805785eff97->filter($if66f788c75229f5f3ea1a622ab4dee258553c789[$i36424a86007474ffc648c582cbfca240cda58c1e]); $if66f788c75229f5f3ea1a622ab4dee258553c789[$i36424a86007474ffc648c582cbfca240cda58c1e] = $id1da71c6f00d9b85058894facc6aae99ed82822c->filter($if66f788c75229f5f3ea1a622ab4dee258553c789[$i36424a86007474ffc648c582cbfca240cda58c1e]); } } return $if66f788c75229f5f3ea1a622ab4dee258553c789; } public function getCustomerCollection() { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getResourceModel('customer/customer_collection') ->addNameToSelect() ->joinAttribute('billing_telephone', 'customer_address/telephone', 'default_billing', null, 'left') ->joinAttribute('shipping_telephone', 'customer_address/telephone', 'default_shipping', null, 'left') ->joinAttribute('billing_city', 'customer_address/city', 'default_billing', null, 'left') ->joinAttribute('billing_country_id', 'customer_address/country_id', 'default_billing', null, 'left') ->joinAttribute('shipping_country_id', 'customer_address/country_id', 'default_shipping', null, 'left') ->addFieldToFilter(array( array( 'attribute' => 'billing_telephone', array(array('notnull' => true), array('neq' => '')) ), array( 'attribute' => 'shipping_telephone', array(array('notnull' => true), array('neq' => '')) ) )); if (version_compare(Mage::getVersion(), '1.6', '>=')) { $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('IF(`at_shipping_telephone`.`value`, `at_shipping_telephone`.`value`, `at_billing_telephone`.`value`) AS telephone'); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('IF(`at_shipping_country_id`.`value`, `at_shipping_country_id`.`value`, `at_billing_country_id`.`value`) AS country_id'); } else { $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('IF(`_table_shipping_telephone`.`value`, `_table_shipping_telephone`.`value`, `_table_billing_telephone`.`value`) AS telephone'); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('IF(`_table_shipping_country_id`.`value`, `_table_shipping_country_id`.`value`, `_table_billing_country_id`.`value`) AS country_id'); } return $iff7e46827cbb6547116c592bf800f4687428abf9; } public function addOptoutProduct($i7fff76b02be2f63877a1782ca871e62a287fa16f = false) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b = $this->getOptoutProduct(); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b) { if ($i7fff76b02be2f63877a1782ca871e62a287fa16f) { $i32bd8782f9db301dda31691016fa281ffd5c7c36 = Mage::getResourceModel('catalog/product')->getAttributeRawValue($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b->getId(), 'magesms_optout', Mage::app()->getStore()->getId()); if (!$i32bd8782f9db301dda31691016fa281ffd5c7c36) return $this; } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b->setStoreId(Mage::app()->getStore()->getId()); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b->load($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b->getId()); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_ENABLED) { $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495 = Mage::getSingleton('checkout/cart'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d12f98417e3df53ca8bc49671d89c1a89cdceeb8b = $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->getItems(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749ddd690844e5b6fae774e02ace13c0608c4bd6bfbc = false; foreach($ibcdf76f8c9ddc330c79f805116a8bb146c43749d12f98417e3df53ca8bc49671d89c1a89cdceeb8b as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d705fa7c9639d497e1179d7d5691c212668a8c9c8) { if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d705fa7c9639d497e1179d7d5691c212668a8c9c8->getSku() == Mage::getConfig()->getNode('default/config/optout')->sku) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749ddd690844e5b6fae774e02ace13c0608c4bd6bfbc = true; break; } } if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddd690844e5b6fae774e02ace13c0608c4bd6bfbc === false) { $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->init(); $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->addProduct($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b, array('qty' => 1)); $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->save(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('checkout/session'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0e3e80cee9c51f140b823db0b7df66493acca657->setCartWasUpdated(true); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d8091f3f14f616f7c7725a766ecf5f3d4a561a828 = Mage::helper('checkout')->__('%s was added to your shopping cart.', Mage::helper('core')->escapeHtml($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b->getName())); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0e3e80cee9c51f140b823db0b7df66493acca657->addSuccess($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8091f3f14f616f7c7725a766ecf5f3d4a561a828); } } } return $this; } public function removeOptoutProduct($i7fff76b02be2f63877a1782ca871e62a287fa16f = false) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b = $this->getOptoutProduct(); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b) { $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495 = Mage::getSingleton('checkout/cart'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d705fa7c9639d497e1179d7d5691c212668a8c9c8 = $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->getQuote()->getItemByProduct($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d705fa7c9639d497e1179d7d5691c212668a8c9c8 && !$i7fff76b02be2f63877a1782ca871e62a287fa16f || $ibcdf76f8c9ddc330c79f805116a8bb146c43749d705fa7c9639d497e1179d7d5691c212668a8c9c8 && $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->getItemsCount() == 2) { $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->removeItem($ibcdf76f8c9ddc330c79f805116a8bb146c43749d705fa7c9639d497e1179d7d5691c212668a8c9c8->getId()); $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->save(); } } } public function getOptoutProduct() { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dc010a5d08128ec6abcd0a1a16cb1d8abe7bf2142 = Mage::getConfig()->getNode('default/config/optout')->sku; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b = Mage::getModel('catalog/product')->loadByAttribute('sku', $ibcdf76f8c9ddc330c79f805116a8bb146c43749dc010a5d08128ec6abcd0a1a16cb1d8abe7bf2142); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_ENABLED) return $ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b; } }
app/code/community/Topefekt/Magesms/Model/Admins.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Admins extends Mage_Core_Model_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/admins'); } public function validate() { $ieeea3fa58a065e13acdb42aab551831a98e9444c = array(); $i0d09b2a4f282150bf47b02f9f3d82586fe313844 = Mage::helper('magesms'); if (!Zend_Validate::is($this->getName(), 'NotEmpty')) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('Invalid name'); } if (!Zend_Validate::is($this->getNumber(), 'NotEmpty')) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('Invalid number'); } elseif (!Mage::helper('magesms')->isPhoneNumber($this->getNumber())) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('Invalid number'); } if (empty($ieeea3fa58a065e13acdb42aab551831a98e9444c)) { return true; } return $ieeea3fa58a065e13acdb42aab551831a98e9444c; } public function _afterDelete() { if ($this->getId()) { $if739aceffec69fa2733946a3d319defaa354082d = Mage::getModel('magesms/hooks_admins') ->getCollection() ->addFieldToFilter('admin_id', $this->getId()); foreach ($if739aceffec69fa2733946a3d319defaa354082d as $i42ee48f418943c9662de0976069476c7dc8f620d) $i42ee48f418943c9662de0976069476c7dc8f620d->delete(); } return parent::_afterDelete(); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Admins extends Mage_Core_Model_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/admins'); } public function validate() { $ieeea3fa58a065e13acdb42aab551831a98e9444c = array(); $i0d09b2a4f282150bf47b02f9f3d82586fe313844 = Mage::helper('magesms'); if (!Zend_Validate::is($this->getName(), 'NotEmpty')) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('Invalid name'); } if (!Zend_Validate::is($this->getNumber(), 'NotEmpty')) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('Invalid number'); } elseif (!Mage::helper('magesms')->isPhoneNumber($this->getNumber())) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('Invalid number'); } if (empty($ieeea3fa58a065e13acdb42aab551831a98e9444c)) { return true; } return $ieeea3fa58a065e13acdb42aab551831a98e9444c; } public function _afterDelete() { if ($this->getId()) { $if739aceffec69fa2733946a3d319defaa354082d = Mage::getModel('magesms/hooks_admins') ->getCollection() ->addFieldToFilter('admin_id', $this->getId()); foreach ($if739aceffec69fa2733946a3d319defaa354082d as $i42ee48f418943c9662de0976069476c7dc8f620d) $i42ee48f418943c9662de0976069476c7dc8f620d->delete(); } return parent::_afterDelete(); } }
app/code/community/Topefekt/Magesms/Model/Answers.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Answers extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/answers'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Answers extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/answers'); } }
app/code/community/Topefekt/Magesms/Model/Api.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Api extends Varien_Object { private $v9f1e7fea943b3d06ee78f55d3b61a95353536218 = 'Magento'; private $v9f1e7fea943b3d06ee78f55d3b61a95353536218_version; private $v240a8b53893ca3ef75eff909fc854708b004d86d; private $v178a3e710e3d4aca00fd843753ef02f29eb2145d; private $v45213b023462fa21483839e6493acb7cbe1faeab = 'smsmidlet.com'; private $v7d5fd66476c545cbe20f5b704f5ef46970896444 = '/api/api.php'; private $v9e19674cb6e6518d1f09715fae28b8fe6b262f87; private $v7cb5076e93f299085ab8c3bfa32e5712b4990f85 = 80; private $vb57aea5fc32ac2e31b4752c9f7610744dee1af4d = 443; private $v077a05d1aa14d236b9794734fee8900f425eefdf = 5; private $v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 = 'auto'; private $vcb9f213798e6a676a15ee3c66b26bee41d69d0d4; private $vc4185f8999ea79fe5ab81e90671fb9efdd6f4bdb = false; public $data; public $query; private $v31d4e11356546b3c102ad42948b903df3b2dcbfc = array(); private $v8adb8a55748ba4eeb0af088f166489d679f689d0 = array(); public function __construct($i4fa8552ddebdef541b5cf2171f90a3e3066468e0 = null) { $this->v9f1e7fea943b3d06ee78f55d3b61a95353536218_version = Mage::getVersion(); $this->v240a8b53893ca3ef75eff909fc854708b004d86d = Mage::getConfig()->getModuleConfig('Topefekt_Magesms')->version; $this->v178a3e710e3d4aca00fd843753ef02f29eb2145d = Mage::getStoreConfig('magesms/appId'); if (empty($this->v178a3e710e3d4aca00fd843753ef02f29eb2145d)) $this->v178a3e710e3d4aca00fd843753ef02f29eb2145d = 'no-appId'; if ($i4fa8552ddebdef541b5cf2171f90a3e3066468e0) $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 = $i4fa8552ddebdef541b5cf2171f90a3e3066468e0; return $this; } private function f418217640effcf22811abf41fb6822676544f195($i4fa8552ddebdef541b5cf2171f90a3e3066468e0 = null) { if ($i4fa8552ddebdef541b5cf2171f90a3e3066468e0 != null) { if (in_array($i4fa8552ddebdef541b5cf2171f90a3e3066468e0, array('auto', 'ssl', 'curl-ssl', 'no-ssl', 'curl'))) $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 = $i4fa8552ddebdef541b5cf2171f90a3e3066468e0; } if ($this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'auto' || $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'ssl') { @$this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = fsockopen('ssl://'.$this->v45213b023462fa21483839e6493acb7cbe1faeab, $this->vb57aea5fc32ac2e31b4752c9f7610744dee1af4d, $this->v31d4e11356546b3c102ad42948b903df3b2dcbfc['ssl'], $this->v8adb8a55748ba4eeb0af088f166489d679f689d0['ssl'], $this->v077a05d1aa14d236b9794734fee8900f425eefdf); if (!empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87)) return 'ssl'; } if ($this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'auto' || $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'curl-ssl') { $this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = curl_init('https://'.$this->v45213b023462fa21483839e6493acb7cbe1faeab.$this->v7d5fd66476c545cbe20f5b704f5ef46970896444); $this->v31d4e11356546b3c102ad42948b903df3b2dcbfc['curl'] = curl_errno($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); $this->v8adb8a55748ba4eeb0af088f166489d679f689d0['curl'] = curl_error($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); if (!empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87) && empty($this->v31d4e11356546b3c102ad42948b903df3b2dcbfc['curl'])) return 'curl-ssl'; $this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = null; } if ($this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'auto' || $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'no-ssl') { @$this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = fsockopen($this->v45213b023462fa21483839e6493acb7cbe1faeab, $this->v7cb5076e93f299085ab8c3bfa32e5712b4990f85, $this->v31d4e11356546b3c102ad42948b903df3b2dcbfc['no-ssl'], $this->v8adb8a55748ba4eeb0af088f166489d679f689d0['no-ssl'], $this->v077a05d1aa14d236b9794734fee8900f425eefdf); if (!empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87)) return 'no-ssl'; } if ($this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'auto' || $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'curl') { $this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = curl_init('http://'.$this->v45213b023462fa21483839e6493acb7cbe1faeab.$this->v7d5fd66476c545cbe20f5b704f5ef46970896444); $this->v31d4e11356546b3c102ad42948b903df3b2dcbfc['curl'] = curl_errno($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); $this->v8adb8a55748ba4eeb0af088f166489d679f689d0['curl'] = curl_error($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); if (!empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87) && empty($this->v31d4e11356546b3c102ad42948b903df3b2dcbfc['curl'])) return 'curl'; $this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = null; } return false; } private function fba8eb60cc038de71062462629784762fcf874461($ia61712c27ea241bd7a543dc2b02ea572274d0322) { if (empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87)) return false; $this->query = $ia61712c27ea241bd7a543dc2b02ea572274d0322; preg_match('/action=(.*?)&/', $ia61712c27ea241bd7a543dc2b02ea572274d0322, $i43da24755ffd60b125b8d028fe9374322824e354); $i87f2ea938389759d33b89c6fb4d2e619c5e100fa = $i43da24755ffd60b125b8d028fe9374322824e354[1]; switch ($this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9) { case 'no-ssl': case 'ssl': fwrite($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, "POST ".$this->v7d5fd66476c545cbe20f5b704f5ef46970896444." HTTP/1.0\r\n"); fwrite($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, "User-Agent: Smsmidlet-api/1.0 (".$this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9."; ".$this->v9f1e7fea943b3d06ee78f55d3b61a95353536218."; ".$this->v9f1e7fea943b3d06ee78f55d3b61a95353536218_version."; call: $i87f2ea938389759d33b89c6fb4d2e619c5e100fa)\r\n"); fwrite($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, "Host: ".$this->v45213b023462fa21483839e6493acb7cbe1faeab."\r\n"); fwrite($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, "Content-type: application/x-www-form-urlencoded; charset=utf-8\r\n"); fwrite($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, "Content-length: ".strlen ($ia61712c27ea241bd7a543dc2b02ea572274d0322)."\r\n"); fwrite($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, "\r\n".$ia61712c27ea241bd7a543dc2b02ea572274d0322."\r\n"); $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3 = ''; while (!feof($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87)) { @$i3bd625bb1dc4606e8c0dc77ad823797f51341fc3 .= fgets($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, 2048); } $ie4a1f55ce89a34eb3838ef044286891434352fb7 = fclose($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); list($ie3dffdbcc706f9e096534318ed81a9f59e289e7d, $this->data) = explode("\r\n\r\n", $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3, 2); return $this->data; break; case 'curl': case 'curl-ssl': if (get_resource_type($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87) == 'curl') { @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_POST, 1); @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_POSTFIELDS, $ia61712c27ea241bd7a543dc2b02ea572274d0322); @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_FOLLOWLOCATION, 1); @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_HEADER, 0); @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_RETURNTRANSFER, 1); @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_SSL_VERIFYPEER, false); @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_USERAGENT,'Smsmidlet-api/1.0 ('.$this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9.'; '.$this->v9f1e7fea943b3d06ee78f55d3b61a95353536218.'; '.$this->v9f1e7fea943b3d06ee78f55d3b61a95353536218_version."; call: $i87f2ea938389759d33b89c6fb4d2e619c5e100fa )"); @$i3bd625bb1dc4606e8c0dc77ad823797f51341fc3 = curl_exec($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3 = html_entity_decode($i3bd625bb1dc4606e8c0dc77ad823797f51341fc3); curl_close($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); return $this->data = $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3; } break; } return false; } public function getconnectMethod() { return $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9; } public function serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322, $i17c20960d197486b19dc890665362a4f2fd6f24a = true) { if (empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87) && $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 != 'auto') $i4fa8552ddebdef541b5cf2171f90a3e3066468e0 = $this->f418217640effcf22811abf41fb6822676544f195(); if (empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87)) $i4fa8552ddebdef541b5cf2171f90a3e3066468e0 = $this->f418217640effcf22811abf41fb6822676544f195('auto'); if (empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87)) return false; if (!empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87) && isset($i4fa8552ddebdef541b5cf2171f90a3e3066468e0)) $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 = $i4fa8552ddebdef541b5cf2171f90a3e3066468e0; $i2f4c8461c23acd59e2d84b6cbd67931b74d28001 = ''; if (Mage::registry('magesms_store_id')) $i2f4c8461c23acd59e2d84b6cbd67931b74d28001 = '&storeid='.Mage::registry('magesms_store_id'); $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3 = $this->fba8eb60cc038de71062462629784762fcf874461($ia61712c27ea241bd7a543dc2b02ea572274d0322.$i2f4c8461c23acd59e2d84b6cbd67931b74d28001.'&AppID='.$this->v178a3e710e3d4aca00fd843753ef02f29eb2145d.'&version='.$this->v9f1e7fea943b3d06ee78f55d3b61a95353536218_version.'&moduleVersion='.$this->v240a8b53893ca3ef75eff909fc854708b004d86d); $this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = null; return $i17c20960d197486b19dc890665362a4f2fd6f24a ? $this->parser($i3bd625bb1dc4606e8c0dc77ad823797f51341fc3) : $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3; } public function parser($ia61712c27ea241bd7a543dc2b02ea572274d0322, $ia9229b7048dd0adf905022d8569b2d2310c74a8d = ';') { if (is_bool($ia61712c27ea241bd7a543dc2b02ea572274d0322)) return $ia61712c27ea241bd7a543dc2b02ea572274d0322; $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3 = array('errno' => 99, 'error' => 'Parse error: '.$ia61712c27ea241bd7a543dc2b02ea572274d0322, 'query' => $this->query, 'source' => $ia61712c27ea241bd7a543dc2b02ea572274d0322, 'data' => NULL, 'datasrc' => null); if (preg_match('/<b>(.*?)<\/b>/', $ia61712c27ea241bd7a543dc2b02ea572274d0322, $i712821c3a64ae4a252ded9f3deaaddb6e942d985)) { $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['errno'] = $i712821c3a64ae4a252ded9f3deaaddb6e942d985[1]; } if (preg_match('/<u>(.*)<\/u>/', $ia61712c27ea241bd7a543dc2b02ea572274d0322, $i5528ed14b056e3debe4695094269de3a98f76fe7)) { if (!in_array($i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['errno'], array(1, 11, 111))) { $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['error'] = $i5528ed14b056e3debe4695094269de3a98f76fe7[1]; $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['datasrc'] = $i5528ed14b056e3debe4695094269de3a98f76fe7[1]; } else { $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['error'] = 'OK'; $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['datasrc'] = $i5528ed14b056e3debe4695094269de3a98f76fe7[1]; $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['data'] = explode($ia9229b7048dd0adf905022d8569b2d2310c74a8d, $i5528ed14b056e3debe4695094269de3a98f76fe7[1]); } } return $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Api extends Varien_Object { private $v9f1e7fea943b3d06ee78f55d3b61a95353536218 = 'Magento'; private $v9f1e7fea943b3d06ee78f55d3b61a95353536218_version; private $v240a8b53893ca3ef75eff909fc854708b004d86d; private $v178a3e710e3d4aca00fd843753ef02f29eb2145d; private $v45213b023462fa21483839e6493acb7cbe1faeab = 'smsmidlet.com'; private $v7d5fd66476c545cbe20f5b704f5ef46970896444 = '/api/api.php'; private $v9e19674cb6e6518d1f09715fae28b8fe6b262f87; private $v7cb5076e93f299085ab8c3bfa32e5712b4990f85 = 80; private $vb57aea5fc32ac2e31b4752c9f7610744dee1af4d = 443; private $v077a05d1aa14d236b9794734fee8900f425eefdf = 5; private $v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 = 'auto'; private $vcb9f213798e6a676a15ee3c66b26bee41d69d0d4; private $vc4185f8999ea79fe5ab81e90671fb9efdd6f4bdb = false; public $data; public $query; private $v31d4e11356546b3c102ad42948b903df3b2dcbfc = array(); private $v8adb8a55748ba4eeb0af088f166489d679f689d0 = array(); public function __construct($i4fa8552ddebdef541b5cf2171f90a3e3066468e0 = null) { $this->v9f1e7fea943b3d06ee78f55d3b61a95353536218_version = Mage::getVersion(); $this->v240a8b53893ca3ef75eff909fc854708b004d86d = Mage::getConfig()->getModuleConfig('Topefekt_Magesms')->version; $this->v178a3e710e3d4aca00fd843753ef02f29eb2145d = Mage::getStoreConfig('magesms/appId'); if (empty($this->v178a3e710e3d4aca00fd843753ef02f29eb2145d)) $this->v178a3e710e3d4aca00fd843753ef02f29eb2145d = 'no-appId'; if ($i4fa8552ddebdef541b5cf2171f90a3e3066468e0) $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 = $i4fa8552ddebdef541b5cf2171f90a3e3066468e0; return $this; } private function f418217640effcf22811abf41fb6822676544f195($i4fa8552ddebdef541b5cf2171f90a3e3066468e0 = null) { if ($i4fa8552ddebdef541b5cf2171f90a3e3066468e0 != null) { if (in_array($i4fa8552ddebdef541b5cf2171f90a3e3066468e0, array('auto', 'ssl', 'curl-ssl', 'no-ssl', 'curl'))) $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 = $i4fa8552ddebdef541b5cf2171f90a3e3066468e0; } if ($this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'auto' || $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'ssl') { @$this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = fsockopen('ssl://'.$this->v45213b023462fa21483839e6493acb7cbe1faeab, $this->vb57aea5fc32ac2e31b4752c9f7610744dee1af4d, $this->v31d4e11356546b3c102ad42948b903df3b2dcbfc['ssl'], $this->v8adb8a55748ba4eeb0af088f166489d679f689d0['ssl'], $this->v077a05d1aa14d236b9794734fee8900f425eefdf); if (!empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87)) return 'ssl'; } if ($this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'auto' || $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'curl-ssl') { $this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = curl_init('https://'.$this->v45213b023462fa21483839e6493acb7cbe1faeab.$this->v7d5fd66476c545cbe20f5b704f5ef46970896444); $this->v31d4e11356546b3c102ad42948b903df3b2dcbfc['curl'] = curl_errno($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); $this->v8adb8a55748ba4eeb0af088f166489d679f689d0['curl'] = curl_error($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); if (!empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87) && empty($this->v31d4e11356546b3c102ad42948b903df3b2dcbfc['curl'])) return 'curl-ssl'; $this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = null; } if ($this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'auto' || $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'no-ssl') { @$this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = fsockopen($this->v45213b023462fa21483839e6493acb7cbe1faeab, $this->v7cb5076e93f299085ab8c3bfa32e5712b4990f85, $this->v31d4e11356546b3c102ad42948b903df3b2dcbfc['no-ssl'], $this->v8adb8a55748ba4eeb0af088f166489d679f689d0['no-ssl'], $this->v077a05d1aa14d236b9794734fee8900f425eefdf); if (!empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87)) return 'no-ssl'; } if ($this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'auto' || $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'curl') { $this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = curl_init('http://'.$this->v45213b023462fa21483839e6493acb7cbe1faeab.$this->v7d5fd66476c545cbe20f5b704f5ef46970896444); $this->v31d4e11356546b3c102ad42948b903df3b2dcbfc['curl'] = curl_errno($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); $this->v8adb8a55748ba4eeb0af088f166489d679f689d0['curl'] = curl_error($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); if (!empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87) && empty($this->v31d4e11356546b3c102ad42948b903df3b2dcbfc['curl'])) return 'curl'; $this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = null; } return false; } private function fba8eb60cc038de71062462629784762fcf874461($ia61712c27ea241bd7a543dc2b02ea572274d0322) { if (empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87)) return false; $this->query = $ia61712c27ea241bd7a543dc2b02ea572274d0322; preg_match('/action=(.*?)&/', $ia61712c27ea241bd7a543dc2b02ea572274d0322, $i43da24755ffd60b125b8d028fe9374322824e354); $i87f2ea938389759d33b89c6fb4d2e619c5e100fa = $i43da24755ffd60b125b8d028fe9374322824e354[1]; switch ($this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9) { case 'no-ssl': case 'ssl': fwrite($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, "POST ".$this->v7d5fd66476c545cbe20f5b704f5ef46970896444." HTTP/1.0\r\n"); fwrite($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, "User-Agent: Smsmidlet-api/1.0 (".$this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9."; ".$this->v9f1e7fea943b3d06ee78f55d3b61a95353536218."; ".$this->v9f1e7fea943b3d06ee78f55d3b61a95353536218_version."; call: $i87f2ea938389759d33b89c6fb4d2e619c5e100fa)\r\n"); fwrite($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, "Host: ".$this->v45213b023462fa21483839e6493acb7cbe1faeab."\r\n"); fwrite($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, "Content-type: application/x-www-form-urlencoded; charset=utf-8\r\n"); fwrite($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, "Content-length: ".strlen ($ia61712c27ea241bd7a543dc2b02ea572274d0322)."\r\n"); fwrite($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, "\r\n".$ia61712c27ea241bd7a543dc2b02ea572274d0322."\r\n"); $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3 = ''; while (!feof($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87)) { @$i3bd625bb1dc4606e8c0dc77ad823797f51341fc3 .= fgets($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, 2048); } $ie4a1f55ce89a34eb3838ef044286891434352fb7 = fclose($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); list($ie3dffdbcc706f9e096534318ed81a9f59e289e7d, $this->data) = explode("\r\n\r\n", $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3, 2); return $this->data; break; case 'curl': case 'curl-ssl': if (get_resource_type($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87) == 'curl') { @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_POST, 1); @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_POSTFIELDS, $ia61712c27ea241bd7a543dc2b02ea572274d0322); @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_FOLLOWLOCATION, 1); @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_HEADER, 0); @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_RETURNTRANSFER, 1); @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_SSL_VERIFYPEER, false); @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_USERAGENT,'Smsmidlet-api/1.0 ('.$this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9.'; '.$this->v9f1e7fea943b3d06ee78f55d3b61a95353536218.'; '.$this->v9f1e7fea943b3d06ee78f55d3b61a95353536218_version."; call: $i87f2ea938389759d33b89c6fb4d2e619c5e100fa )"); @$i3bd625bb1dc4606e8c0dc77ad823797f51341fc3 = curl_exec($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3 = html_entity_decode($i3bd625bb1dc4606e8c0dc77ad823797f51341fc3); curl_close($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); return $this->data = $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3; } break; } return false; } public function getconnectMethod() { return $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9; } public function serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322, $i17c20960d197486b19dc890665362a4f2fd6f24a = true) { if (empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87) && $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 != 'auto') $i4fa8552ddebdef541b5cf2171f90a3e3066468e0 = $this->f418217640effcf22811abf41fb6822676544f195(); if (empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87)) $i4fa8552ddebdef541b5cf2171f90a3e3066468e0 = $this->f418217640effcf22811abf41fb6822676544f195('auto'); if (empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87)) return false; if (!empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87) && isset($i4fa8552ddebdef541b5cf2171f90a3e3066468e0)) $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 = $i4fa8552ddebdef541b5cf2171f90a3e3066468e0; $i2f4c8461c23acd59e2d84b6cbd67931b74d28001 = ''; if (Mage::registry('magesms_store_id')) $i2f4c8461c23acd59e2d84b6cbd67931b74d28001 = '&storeid='.Mage::registry('magesms_store_id'); $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3 = $this->fba8eb60cc038de71062462629784762fcf874461($ia61712c27ea241bd7a543dc2b02ea572274d0322.$i2f4c8461c23acd59e2d84b6cbd67931b74d28001.'&AppID='.$this->v178a3e710e3d4aca00fd843753ef02f29eb2145d.'&version='.$this->v9f1e7fea943b3d06ee78f55d3b61a95353536218_version.'&moduleVersion='.$this->v240a8b53893ca3ef75eff909fc854708b004d86d); $this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = null; return $i17c20960d197486b19dc890665362a4f2fd6f24a ? $this->parser($i3bd625bb1dc4606e8c0dc77ad823797f51341fc3) : $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3; } public function parser($ia61712c27ea241bd7a543dc2b02ea572274d0322, $ia9229b7048dd0adf905022d8569b2d2310c74a8d = ';') { if (is_bool($ia61712c27ea241bd7a543dc2b02ea572274d0322)) return $ia61712c27ea241bd7a543dc2b02ea572274d0322; $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3 = array('errno' => 99, 'error' => 'Parse error: '.$ia61712c27ea241bd7a543dc2b02ea572274d0322, 'query' => $this->query, 'source' => $ia61712c27ea241bd7a543dc2b02ea572274d0322, 'data' => NULL, 'datasrc' => null); if (preg_match('/<b>(.*?)<\/b>/', $ia61712c27ea241bd7a543dc2b02ea572274d0322, $i712821c3a64ae4a252ded9f3deaaddb6e942d985)) { $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['errno'] = $i712821c3a64ae4a252ded9f3deaaddb6e942d985[1]; } if (preg_match('/<u>(.*)<\/u>/', $ia61712c27ea241bd7a543dc2b02ea572274d0322, $i5528ed14b056e3debe4695094269de3a98f76fe7)) { if (!in_array($i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['errno'], array(1, 11, 111))) { $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['error'] = $i5528ed14b056e3debe4695094269de3a98f76fe7[1]; $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['datasrc'] = $i5528ed14b056e3debe4695094269de3a98f76fe7[1]; } else { $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['error'] = 'OK'; $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['datasrc'] = $i5528ed14b056e3debe4695094269de3a98f76fe7[1]; $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['data'] = explode($ia9229b7048dd0adf905022d8569b2d2310c74a8d, $i5528ed14b056e3debe4695094269de3a98f76fe7[1]); } } return $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3; } }
app/code/community/Topefekt/Magesms/Model/Country.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Country extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/country'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Country extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/country'); } }
app/code/community/Topefekt/Magesms/Model/Country/Area.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Country_Area extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/country_area'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Country_Area extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/country_area'); } }
app/code/community/Topefekt/Magesms/Model/Country/Lang.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Country_Lang extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/country_lang'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Country_Lang extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/country_lang'); } }
app/code/community/Topefekt/Magesms/Model/Exceptions.php CHANGED
@@ -10,7 +10,7 @@
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
- class Topefekt_Magesms_Model_Exceptions extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/exceptions'); } public function updateData() { $i04133b282add75cc6fb03b8f23059a4a19ae63c9 = $this->getCollection(); $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'action=showexc&username='.urlencode(Mage::getSingleton('magesms/smsprofile')->user->user); $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getModel('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1 && !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { $if2363dc4f19bfec9b2f6c8c836b58e55c25e6997 = array(); foreach($i04133b282add75cc6fb03b8f23059a4a19ae63c9 as $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f) $if2363dc4f19bfec9b2f6c8c836b58e55c25e6997[$i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getId()] = 1; foreach($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'] as $ia61712c27ea241bd7a543dc2b02ea572274d0322) { list($if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd, $i5bf792bc27965e6366ed7dd55d8a4f1216ffd4bc, $i4616676bff4c07942c8542e6b4e0ccf29d473424, $i4de11663a9306b410e28ff008f89a06a42664d88) = explode(',', $ia61712c27ea241bd7a543dc2b02ea572274d0322); $i5bf407a3ecf35ff195a9c7e8f546cfc606253fad = true; foreach($i04133b282add75cc6fb03b8f23059a4a19ae63c9 as $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f) { if ($i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getPrefix() == $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd && $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getFirstPrefix() == $i5bf792bc27965e6366ed7dd55d8a4f1216ffd4bc && $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getLength() == $i4616676bff4c07942c8542e6b4e0ccf29d473424 && $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getTrim() == $i4de11663a9306b410e28ff008f89a06a42664d88) { unset($if2363dc4f19bfec9b2f6c8c836b58e55c25e6997[$i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getId()]); $i5bf407a3ecf35ff195a9c7e8f546cfc606253fad = false; break; } } if ($i5bf407a3ecf35ff195a9c7e8f546cfc606253fad === true) { $i7c94c9b9e96dc295bc0fe1b03a5f04b0633533e0 = Mage::getModel('magesms/exceptions'); $i7c94c9b9e96dc295bc0fe1b03a5f04b0633533e0->setPrefix($if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd); $i7c94c9b9e96dc295bc0fe1b03a5f04b0633533e0->setFirstPrefix($i5bf792bc27965e6366ed7dd55d8a4f1216ffd4bc); $i7c94c9b9e96dc295bc0fe1b03a5f04b0633533e0->setLength($i4616676bff4c07942c8542e6b4e0ccf29d473424); $i7c94c9b9e96dc295bc0fe1b03a5f04b0633533e0->setTrim($i4de11663a9306b410e28ff008f89a06a42664d88); $i7c94c9b9e96dc295bc0fe1b03a5f04b0633533e0->save(); } } foreach($if2363dc4f19bfec9b2f6c8c836b58e55c25e6997 as $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538=>$i3ca4aff6918962dee4a8054ca52f13ef3b6bab08) Mage::getModel('magesms/exceptions')->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)->delete(); } } public function number($i39404799a9171a012cb8b15cd8f27b347aa44a5f, $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd) { $i04133b282add75cc6fb03b8f23059a4a19ae63c9 = $this->getCollection(); foreach($i04133b282add75cc6fb03b8f23059a4a19ae63c9 as $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f) { if ($i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getPrefix() == $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd && $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getLength() == strlen($i39404799a9171a012cb8b15cd8f27b347aa44a5f) && $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getFirstPrefix() == substr($i39404799a9171a012cb8b15cd8f27b347aa44a5f, 0, 2)) { return $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd.($i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getTrim() ? substr($i39404799a9171a012cb8b15cd8f27b347aa44a5f, $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getTrim()) : $i39404799a9171a012cb8b15cd8f27b347aa44a5f); } } return $i39404799a9171a012cb8b15cd8f27b347aa44a5f; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
+ class Topefekt_Magesms_Model_Exceptions extends Mage_Core_Model_Abstract { private $v148194b5b9cc653ce2e35e9709e441dc6fd4123a; protected function _construct() { $this->_init('magesms/exceptions'); } public function updateData() { $i04133b282add75cc6fb03b8f23059a4a19ae63c9 = $this->getCollection(); $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'action=showexc&username='.urlencode(Mage::getSingleton('magesms/smsprofile')->user->user); $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getModel('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1 && !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { $if2363dc4f19bfec9b2f6c8c836b58e55c25e6997 = array(); foreach($i04133b282add75cc6fb03b8f23059a4a19ae63c9 as $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f) $if2363dc4f19bfec9b2f6c8c836b58e55c25e6997[$i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getId()] = 1; foreach($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'] as $ia61712c27ea241bd7a543dc2b02ea572274d0322) { list($if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd, $i5bf792bc27965e6366ed7dd55d8a4f1216ffd4bc, $i4616676bff4c07942c8542e6b4e0ccf29d473424, $i4de11663a9306b410e28ff008f89a06a42664d88) = explode(',', $ia61712c27ea241bd7a543dc2b02ea572274d0322); $i5bf407a3ecf35ff195a9c7e8f546cfc606253fad = true; foreach($i04133b282add75cc6fb03b8f23059a4a19ae63c9 as $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f) { if ($i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getPrefix() == $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd && $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getFirstPrefix() == $i5bf792bc27965e6366ed7dd55d8a4f1216ffd4bc && $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getLength() == $i4616676bff4c07942c8542e6b4e0ccf29d473424 && $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getTrim() == $i4de11663a9306b410e28ff008f89a06a42664d88) { unset($if2363dc4f19bfec9b2f6c8c836b58e55c25e6997[$i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getId()]); $i5bf407a3ecf35ff195a9c7e8f546cfc606253fad = false; break; } } if ($i5bf407a3ecf35ff195a9c7e8f546cfc606253fad === true) { $i7c94c9b9e96dc295bc0fe1b03a5f04b0633533e0 = Mage::getModel('magesms/exceptions'); $i7c94c9b9e96dc295bc0fe1b03a5f04b0633533e0->setPrefix($if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd); $i7c94c9b9e96dc295bc0fe1b03a5f04b0633533e0->setFirstPrefix($i5bf792bc27965e6366ed7dd55d8a4f1216ffd4bc); $i7c94c9b9e96dc295bc0fe1b03a5f04b0633533e0->setLength($i4616676bff4c07942c8542e6b4e0ccf29d473424); $i7c94c9b9e96dc295bc0fe1b03a5f04b0633533e0->setTrim($i4de11663a9306b410e28ff008f89a06a42664d88); $i7c94c9b9e96dc295bc0fe1b03a5f04b0633533e0->save(); } } foreach($if2363dc4f19bfec9b2f6c8c836b58e55c25e6997 as $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538=>$i3ca4aff6918962dee4a8054ca52f13ef3b6bab08) Mage::getModel('magesms/exceptions')->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)->delete(); } } public function number($i39404799a9171a012cb8b15cd8f27b347aa44a5f, $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd) { if ($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a) $i04133b282add75cc6fb03b8f23059a4a19ae63c9 = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a; else $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a = $i04133b282add75cc6fb03b8f23059a4a19ae63c9 = $this->getCollection(); foreach($i04133b282add75cc6fb03b8f23059a4a19ae63c9 as $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f) { if ($i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getPrefix() == $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd && $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getLength() == strlen($i39404799a9171a012cb8b15cd8f27b347aa44a5f) && $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getFirstPrefix() == substr($i39404799a9171a012cb8b15cd8f27b347aa44a5f, 0, 2)) { return $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd.($i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getTrim() ? substr($i39404799a9171a012cb8b15cd8f27b347aa44a5f, $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getTrim()) : $i39404799a9171a012cb8b15cd8f27b347aa44a5f); } } return $i39404799a9171a012cb8b15cd8f27b347aa44a5f; } }
app/code/community/Topefekt/Magesms/Model/Hooks.php CHANGED
@@ -10,7 +10,7 @@
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
- class Topefekt_Magesms_Model_Hooks extends Mage_Core_Model_Abstract { public static $groups = array( 'order_status' => 0, 'order' => 1, 'account' => 2, 'product' => 3, 'contactform' => 4 ); 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; if (Mage::registry('magesms_store_id')) Mage::unregister('magesms_store_id'); Mage::register('magesms_store_id', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66, true); $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', 'mobile_number', 'phone', 'phone_number', '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') { if (!($i9805d668f75b6b461f88474f57c5f6aa86a87316 = Mage::registry('magesms_track_obj'))) $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']); } } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 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 { public static $groups = array( 'order_status' => 0, 'order' => 1, 'account' => 2, 'product' => 3, 'contactform' => 4 ); 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; if (!Mage::helper('magesms')->isActive($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66)) return $this; if (Mage::registry('magesms_store_id')) Mage::unregister('magesms_store_id'); Mage::register('magesms_store_id', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66, true); $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') { $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5 = $i5e65dd16263683749d16a84171f719e768ed14b5->getStatus(); $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5 = preg_replace('/[^a-zA-Z0-9_]/', '_', $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5); $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5 = preg_replace('/^([^a-zA-Z])/', 'x$1', $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5); $ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8->addFieldToFilter('name', 'orderStatus'.uc_words($ia0b4e748647d3e52f7c9741d5f659711a2db6dc5, '')); } 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') { $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5 = $i5e65dd16263683749d16a84171f719e768ed14b5->getStatus(); $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5 = preg_replace('/[^a-zA-Z0-9_]/', '_', $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5); $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5 = preg_replace('/^([^a-zA-Z])/', 'x$1', $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5); $i71e09ed37bc7273d250df9932c1693668e879cdd->addFieldToFilter('name', 'orderStatus'.uc_words($ia0b4e748647d3e52f7c9741d5f659711a2db6dc5, '')); } 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) { $ib8129b89cda7dae2cfe1b114353de8ba2385974e = Mage::getModel('magesms/optout_order')->getCollection() ->addFieldToFilter('order_id', $i5e65dd16263683749d16a84171f719e768ed14b5->getId()) ->addFieldToFilter('disabled', 1); if ($ib8129b89cda7dae2cfe1b114353de8ba2385974e->count()) { return $this; } if ($i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->getPrefbilling()) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()->getCountryId(); if (!$i1f1945594819c4321de45ac15ed6d4dc07f41e2f || !preg_match('/^[0-9+()\/\.\s-]+$/', $i1f1945594819c4321de45ac15ed6d4dc07f41e2f)) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress()->getCountryId(); } } else { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress()->getCountryId(); if (!$i1f1945594819c4321de45ac15ed6d4dc07f41e2f || preg_match('/^[0-9+()\/\.\s-]+$/', $i1f1945594819c4321de45ac15ed6d4dc07f41e2f)) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()->getCountryId(); } } if (!preg_match('/^[0-9+()\/\.\s-]+$/', $i1f1945594819c4321de45ac15ed6d4dc07f41e2f)) $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = ''; $ifb2b31a17a2f13d19aebc5823ae02f42988a78f2 = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerId(); if (!$ifb2b31a17a2f13d19aebc5823ae02f42988a78f2) $ifb2b31a17a2f13d19aebc5823ae02f42988a78f2 = 0; $i489c048e0604d314330360b5ee23b42f486ebb98 = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerName(); } else { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = ''; $ifb2b31a17a2f13d19aebc5823ae02f42988a78f2 = $i5e65dd16263683749d16a84171f719e768ed14b5->getId(); } if (Mage::helper('core')->isModuleEnabled('Amasty_Orderattr')) { if (($i3a8afabb89bac1f64ee08bc9eeece7680677058c = Mage::app()->getRequest()->getParam('amorderattr')) && !empty($i3a8afabb89bac1f64ee08bc9eeece7680677058c['contact_tel'])) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i3a8afabb89bac1f64ee08bc9eeece7680677058c['contact_tel']; } else { $i0bc4437a5c5941b7f3a262ba60f104077f308455 = Mage::getModel('amorderattr/attribute')->load($i5e65dd16263683749d16a84171f719e768ed14b5->getId(), 'order_id'); if ($i0bc4437a5c5941b7f3a262ba60f104077f308455->getContactTel()) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i0bc4437a5c5941b7f3a262ba60f104077f308455->getContactTel(); } } } if (!$i1f1945594819c4321de45ac15ed6d4dc07f41e2f) { $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = Mage::app()->getRequest()->getParams(); foreach(array('mobilenumber', 'mobile_number', 'phone', 'phone_number', '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') { if (!($i9805d668f75b6b461f88474f57c5f6aa86a87316 = Mage::registry('magesms_track_obj'))) $i9805d668f75b6b461f88474f57c5f6aa86a87316 = $i5e65dd16263683749d16a84171f719e768ed14b5->getTracksCollection()->getLastItem(); if (!$i9805d668f75b6b461f88474f57c5f6aa86a87316->getId()) { $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = Mage::app()->getRequest()->getParams(); if (isset($ia8a35a47a8e61218e15d1a33dac64bdc2449c01a['tracking']) && ($i71035ea6aa66350bb658a262013eb58377a0934e = $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a['tracking'])) { $i71035ea6aa66350bb658a262013eb58377a0934e = end($i71035ea6aa66350bb658a262013eb58377a0934e); if (!empty($i71035ea6aa66350bb658a262013eb58377a0934e['title'])) $i9805d668f75b6b461f88474f57c5f6aa86a87316->setTitle($i71035ea6aa66350bb658a262013eb58377a0934e['title']); if (!empty($i71035ea6aa66350bb658a262013eb58377a0934e['number'])) $i9805d668f75b6b461f88474f57c5f6aa86a87316->setTrackNumber($i71035ea6aa66350bb658a262013eb58377a0934e['number']); } } if ($i9805d668f75b6b461f88474f57c5f6aa86a87316) { 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/Hooks/Admins.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Hooks_Admins extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/hooks_admins'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 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_Admins extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/hooks_admins'); } }
app/code/community/Topefekt/Magesms/Model/Hooks/Customers.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Hooks_Customers extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/hooks_customers'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 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_Customers extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/hooks_customers'); } }
app/code/community/Topefekt/Magesms/Model/Hooks/Templates.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Hooks_Templates extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/hooks_templates'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 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_Templates extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/hooks_templates'); } }
app/code/community/Topefekt/Magesms/Model/Hooks/Unicode.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Hooks_Unicode extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/hooks_unicode'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 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_Unicode extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/hooks_unicode'); } }
app/code/community/Topefekt/Magesms/Model/Magesms.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Magesms extends Mage_Core_Model_Abstract { public function _construct() { die(get_class($this)); parent::_construct(); $this->_init('magesms/admins'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Magesms extends Mage_Core_Model_Abstract { public function _construct() { die(get_class($this)); parent::_construct(); $this->_init('magesms/admins'); } }
app/code/community/Topefekt/Magesms/Model/Maps.php CHANGED
@@ -10,7 +10,7 @@
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
- class Topefekt_Magesms_Model_Maps extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/maps'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
+ class Topefekt_Magesms_Model_Maps extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init ( 'magesms/maps' ); } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter.php CHANGED
@@ -10,7 +10,7 @@
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
- class Topefekt_Magesms_Model_Marketing_Filter extends Mage_Core_Model_Abstract { static protected $_websites; static public $colors = array( "#ed6502", "#229922", "#999922", "#229999", "#999999", "#885566", "#9933aa", "#19aba3", "#dcca00", "#96c8a3", ); protected function _construct() { $this->_init( 'magesms/marketing_filter' ); } public function getWebsites() { if (!empty(self::$_websites)) return self::$_websites; self::$_websites = Mage::app()->getWebsites(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d = 0; foreach(self::$_websites as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d9fdb3b1e2e6984ebdd1220ec199279013c5483fc) { if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d == count(self::$_websites)) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d = 0; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d9fdb3b1e2e6984ebdd1220ec199279013c5483fc->setColorWebsite(self::$colors[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d++; } return self::$_websites; } public function getColorWebsite($ibcdf76f8c9ddc330c79f805116a8bb146c43749d7d411c0cc32cdb65ec82b9e8d79aa996946f5538) { foreach($this->getWebsites() as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d9fdb3b1e2e6984ebdd1220ec199279013c5483fc) if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getId() == $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7d411c0cc32cdb65ec82b9e8d79aa996946f5538) return $ibcdf76f8c9ddc330c79f805116a8bb146c43749d9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getColorWebsite(); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
+ class Topefekt_Magesms_Model_Marketing_Filter extends Mage_Core_Model_Abstract { static protected $_websites; static public $colors = array( "#ed6502", "#229922", "#999922", "#229999", "#999999", "#885566", "#9933aa", "#19aba3", "#dcca00", "#96c8a3", ); protected function _construct() { $this->_init( 'magesms/marketing_filter' ); } public function getWebsites() { if (!empty(self::$_websites)) return self::$_websites; self::$_websites = Mage::app()->getWebsites(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d = 0; foreach(self::$_websites as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d9fdb3b1e2e6984ebdd1220ec199279013c5483fc) { if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d == count(self::$colors)) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d = 0; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d9fdb3b1e2e6984ebdd1220ec199279013c5483fc->setColorWebsite(self::$colors[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d++; } return self::$_websites; } public function getColorWebsite($ibcdf76f8c9ddc330c79f805116a8bb146c43749d7d411c0cc32cdb65ec82b9e8d79aa996946f5538) { foreach($this->getWebsites() as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d9fdb3b1e2e6984ebdd1220ec199279013c5483fc) if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getId() == $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7d411c0cc32cdb65ec82b9e8d79aa996946f5538) return $ibcdf76f8c9ddc330c79f805116a8bb146c43749d9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getColorWebsite(); } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Birthday.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Marketing_Filter_Birthday extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Date of birth from: '), 'type' => 'date', 'name' => 'birthday', 'color' => '#907523', 'glue' => ' / '.Mage::helper('magesms')->__('to: '), ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e = array(); $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69 = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { $i3ca4aff6918962dee4a8054ca52f13ef3b6bab08 = $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue(); if (!empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0])) $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e[] = array('from' => date('Y-m-d H:i:s', strtotime($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0]))); if (!empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1])) $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69[] = array('to' => date('Y-m-d H:i:s', strtotime($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1]))); } } if (count($i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('dob', $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e); if (count($ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('dob', $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter_Birthday extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Date of birth from: '), 'type' => 'date', 'name' => 'birthday', 'color' => '#907523', 'glue' => ' / '.Mage::helper('magesms')->__('to: '), ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e = array(); $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69 = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { $i3ca4aff6918962dee4a8054ca52f13ef3b6bab08 = $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue(); if (!empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0])) $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e[] = array('from' => date('Y-m-d H:i:s', strtotime($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0]))); if (!empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1])) $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69[] = array('to' => date('Y-m-d H:i:s', strtotime($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1]))); } } if (count($i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('dob', $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e); if (count($ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('dob', $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Birthdayall.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Marketing_Filter_Birthdayall extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Date of birth from: ').'('.Mage::helper('magesms')->__('All years').')', 'type' => 'birthdayall', 'name' => 'birthdayall', 'color' => '#907090', 'glue' => ' / ', ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { $i3ca4aff6918962dee4a8054ca52f13ef3b6bab08 = $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue(); if (!empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0]) && !empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1])) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = 'at_dob.value LIKE \'____-'.sprintf('%02d', $i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1]).'-'.sprintf('%02d', $i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0]).' %\''; } } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) { $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('dob', array('notnull' => true)); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect()->where('('.implode(' OR ', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e).')'); } return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter_Birthdayall extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Date of birth from: ').'('.Mage::helper('magesms')->__('All years').')', 'type' => 'birthdayall', 'name' => 'birthdayall', 'color' => '#907090', 'glue' => ' / ', ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { $i3ca4aff6918962dee4a8054ca52f13ef3b6bab08 = $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue(); if (!empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0]) && !empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1])) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = 'at_dob.value LIKE \'____-'.sprintf('%02d', $i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1]).'-'.sprintf('%02d', $i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0]).' %\''; } } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) { $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('dob', array('notnull' => true)); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect()->where('('.implode(' OR ', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e).')'); } return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/City.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Marketing_Filter_City extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('City'), 'type' => 'input', 'name' => 'city', 'color' => '#ff8000', ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array('like' => '%'.$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue().'%'); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('billing_city', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter_City extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('City'), 'type' => 'input', 'name' => 'city', 'color' => '#ff8000', ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array('like' => '%'.$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue().'%'); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('billing_city', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Collection.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Marketing_Filter_Collection extends Varien_Object { private $ve713b4c10ff4c8425970eab3a4d765b3fe6fed6c; private $v148194b5b9cc653ce2e35e9709e441dc6fd4123a; private $vb3aef862e6f33bb77b0548e126396581908637bb; public function __construct() { $this->ve713b4c10ff4c8425970eab3a4d765b3fe6fed6c = new Varien_Data_Collection(); $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a = unserialize(Mage::app()->loadCache('magesms_marketing_filter')); if (empty($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a) || !$this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a instanceof Varien_Object) { $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a = new Varien_Object(); $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->setData(array( 'filters' => new Varien_Data_Collection(), 'customers' => new Varien_Object() )); } } public function setCollection($iff7e46827cbb6547116c592bf800f4687428abf9) { parent::setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); if (($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538bc1a1bf6d5c2813b31ab86ea82f7ca5e65de27a = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getCustomers()->getIds())) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('entity_id', array('nin' => $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538bc1a1bf6d5c2813b31ab86ea82f7ca5e65de27a)); } public function addFilter($i2bd9743336318d0e14be0600c9129730279505dd) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = Mage::getModel('magesms/marketing_filter_'.$i2bd9743336318d0e14be0600c9129730279505dd); if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) $this->ve713b4c10ff4c8425970eab3a4d765b3fe6fed6c->addItem($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a); else Mage::log('Magesms: Do not load marketing filter: '.$i2bd9743336318d0e14be0600c9129730279505dd); return $this; } public function addFilters(array $ie7d1f3c0ab09749c63a4d4213221b59ce80ea45c) { foreach($ie7d1f3c0ab09749c63a4d4213221b59ce80ea45c as $i2bd9743336318d0e14be0600c9129730279505dd) $this->addFilter($i2bd9743336318d0e14be0600c9129730279505dd); } public function getFilters() { $i5528ed14b056e3debe4695094269de3a98f76fe7 = array('' => '- '.Mage::helper('magesms')->__('Please Select').' -'); foreach($this->ve713b4c10ff4c8425970eab3a4d765b3fe6fed6c as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { $i5528ed14b056e3debe4695094269de3a98f76fe7[$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->filter['name']] = str_replace(':', '', $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->filter['title']); } return $i5528ed14b056e3debe4695094269de3a98f76fe7; } public function setFilters($iff7e46827cbb6547116c592bf800f4687428abf9) { foreach($this->ve713b4c10ff4c8425970eab3a4d765b3fe6fed6c as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if (method_exists($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a, 'getFilter')) $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $this->getCache()->getFilters()); } } public function getCache() { return isset($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a) ? $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a : null; } public function getAppliedFilters() { if (!empty($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a) && $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a instanceof Varien_Object) { return $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getFilters(); } } public function addApplyFilter($i2bd9743336318d0e14be0600c9129730279505dd, $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = Mage::getModel('magesms/marketing_filter_'.$i2bd9743336318d0e14be0600c9129730279505dd); if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->setValue($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); $i092fed12249a415fe47769fa9b0bb17968e798c0 = $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValues(); if (!empty($i092fed12249a415fe47769fa9b0bb17968e798c0[0]) && is_array($i092fed12249a415fe47769fa9b0bb17968e798c0[0])) { foreach($i092fed12249a415fe47769fa9b0bb17968e798c0 as $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa) { if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa['value'] == $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->setLabel($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa['label']); break; } } } elseif (is_array($i092fed12249a415fe47769fa9b0bb17968e798c0) && in_array($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89, array_keys($i092fed12249a415fe47769fa9b0bb17968e798c0))) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->setLabel($i092fed12249a415fe47769fa9b0bb17968e798c0[$if2eee0665f163a28f4adcfe84e3fc666bf1bcd89]); } $ia8418ed18227005524e0f3a24e89ce5b21e9b483 = false; foreach ($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getFilters() as $i705fa7c9639d497e1179d7d5691c212668a8c9c8) { if ($i705fa7c9639d497e1179d7d5691c212668a8c9c8 == $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { $ia8418ed18227005524e0f3a24e89ce5b21e9b483 = true; break; } } if (!$ia8418ed18227005524e0f3a24e89ce5b21e9b483) { $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getFilters()->addItem($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a); $this->f403d2b0a9c44d21482a17bcb162aa54ccb79be64(); } } else Mage::log('Magesms: Do not load marketing filter: '.$i2bd9743336318d0e14be0600c9129730279505dd); } public function removeFilter($i670253c23c6fcba76bc4256a88fdd8fbc1041039) { $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getFilters()->removeItemByKey($i670253c23c6fcba76bc4256a88fdd8fbc1041039); $this->f403d2b0a9c44d21482a17bcb162aa54ccb79be64(); } public function addRemoveCustomer($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538) { $iea1c44f6137731e1b13c494f784074e6a133577a = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getCustomers()->getIds(); if (!is_array($iea1c44f6137731e1b13c494f784074e6a133577a)) $iea1c44f6137731e1b13c494f784074e6a133577a = array(); if (in_array($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538, $iea1c44f6137731e1b13c494f784074e6a133577a)) $iea1c44f6137731e1b13c494f784074e6a133577a = array_diff($iea1c44f6137731e1b13c494f784074e6a133577a, array($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)); else $iea1c44f6137731e1b13c494f784074e6a133577a = array_merge($iea1c44f6137731e1b13c494f784074e6a133577a, array($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)); $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getCustomers()->setIds($iea1c44f6137731e1b13c494f784074e6a133577a); $this->f403d2b0a9c44d21482a17bcb162aa54ccb79be64(); } public function resetFilter() { $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a = new Varien_Object(); $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->setData(array( 'filters' => new Varien_Data_Collection(), 'customers' => new Varien_Object() )); $this->f403d2b0a9c44d21482a17bcb162aa54ccb79be64(); } public function toSerialize() { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = array('filters' => array(), 'customers' => array()); foreach($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getFilters() as $i705fa7c9639d497e1179d7d5691c212668a8c9c8) { $ia61712c27ea241bd7a543dc2b02ea572274d0322['filters'][] = array('name' => $i705fa7c9639d497e1179d7d5691c212668a8c9c8->filter['name'], 'value' => $i705fa7c9639d497e1179d7d5691c212668a8c9c8->getValue()); } $ia61712c27ea241bd7a543dc2b02ea572274d0322['customers'] = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getCustomers()->getIds(); return serialize($ia61712c27ea241bd7a543dc2b02ea572274d0322); } public function fromSerialize($ia61712c27ea241bd7a543dc2b02ea572274d0322) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = unserialize($ia61712c27ea241bd7a543dc2b02ea572274d0322); $this->resetFilter(); if (!empty($ia61712c27ea241bd7a543dc2b02ea572274d0322['filters'])) { foreach($ia61712c27ea241bd7a543dc2b02ea572274d0322['filters'] as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { $this->addApplyFilter($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a['name'], $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a['value']); } } if (!empty($ia61712c27ea241bd7a543dc2b02ea572274d0322['customers']) && is_array($ia61712c27ea241bd7a543dc2b02ea572274d0322['customers'])) $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getCustomers()->setIds($ia61712c27ea241bd7a543dc2b02ea572274d0322['customers']); $this->f403d2b0a9c44d21482a17bcb162aa54ccb79be64(); } private function f403d2b0a9c44d21482a17bcb162aa54ccb79be64() { if (!empty($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a)) Mage::app()->saveCache(serialize($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a), 'magesms_marketing_filter'); } public function __destruct() { $this->f403d2b0a9c44d21482a17bcb162aa54ccb79be64(); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter_Collection extends Varien_Object { private $ve713b4c10ff4c8425970eab3a4d765b3fe6fed6c; private $v148194b5b9cc653ce2e35e9709e441dc6fd4123a; private $vb3aef862e6f33bb77b0548e126396581908637bb; public function __construct() { $this->ve713b4c10ff4c8425970eab3a4d765b3fe6fed6c = new Varien_Data_Collection(); $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a = unserialize(Mage::app()->loadCache('magesms_marketing_filter')); if (empty($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a) || !$this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a instanceof Varien_Object) { $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a = new Varien_Object(); $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->setData(array( 'filters' => new Varien_Data_Collection(), 'customers' => new Varien_Object() )); } } public function setCollection($iff7e46827cbb6547116c592bf800f4687428abf9) { parent::setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); if (($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538bc1a1bf6d5c2813b31ab86ea82f7ca5e65de27a = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getCustomers()->getIds())) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('entity_id', array('nin' => $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538bc1a1bf6d5c2813b31ab86ea82f7ca5e65de27a)); } public function addFilter($i2bd9743336318d0e14be0600c9129730279505dd) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = Mage::getModel('magesms/marketing_filter_'.$i2bd9743336318d0e14be0600c9129730279505dd); if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) $this->ve713b4c10ff4c8425970eab3a4d765b3fe6fed6c->addItem($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a); else Mage::log('Magesms: Do not load marketing filter: '.$i2bd9743336318d0e14be0600c9129730279505dd); return $this; } public function addFilters(array $ie7d1f3c0ab09749c63a4d4213221b59ce80ea45c) { foreach($ie7d1f3c0ab09749c63a4d4213221b59ce80ea45c as $i2bd9743336318d0e14be0600c9129730279505dd) $this->addFilter($i2bd9743336318d0e14be0600c9129730279505dd); } public function getFilters() { $i5528ed14b056e3debe4695094269de3a98f76fe7 = array('' => '- '.Mage::helper('magesms')->__('Please Select').' -'); foreach($this->ve713b4c10ff4c8425970eab3a4d765b3fe6fed6c as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { $i5528ed14b056e3debe4695094269de3a98f76fe7[$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->filter['name']] = str_replace(':', '', $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->filter['title']); } return $i5528ed14b056e3debe4695094269de3a98f76fe7; } public function setFilters($iff7e46827cbb6547116c592bf800f4687428abf9) { foreach($this->ve713b4c10ff4c8425970eab3a4d765b3fe6fed6c as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if (method_exists($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a, 'getFilter')) $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $this->getCache()->getFilters()); } } public function getCache() { return isset($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a) ? $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a : null; } public function getAppliedFilters() { if (!empty($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a) && $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a instanceof Varien_Object) { return $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getFilters(); } } public function addApplyFilter($i2bd9743336318d0e14be0600c9129730279505dd, $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = Mage::getModel('magesms/marketing_filter_'.$i2bd9743336318d0e14be0600c9129730279505dd); if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->setValue($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); $i092fed12249a415fe47769fa9b0bb17968e798c0 = $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValues(); if (!empty($i092fed12249a415fe47769fa9b0bb17968e798c0[0]) && is_array($i092fed12249a415fe47769fa9b0bb17968e798c0[0])) { foreach($i092fed12249a415fe47769fa9b0bb17968e798c0 as $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa) { if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa['value'] == $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->setLabel($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa['label']); break; } } } elseif (is_array($i092fed12249a415fe47769fa9b0bb17968e798c0) && in_array($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89, array_keys($i092fed12249a415fe47769fa9b0bb17968e798c0))) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->setLabel($i092fed12249a415fe47769fa9b0bb17968e798c0[$if2eee0665f163a28f4adcfe84e3fc666bf1bcd89]); } $ia8418ed18227005524e0f3a24e89ce5b21e9b483 = false; foreach ($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getFilters() as $i705fa7c9639d497e1179d7d5691c212668a8c9c8) { if ($i705fa7c9639d497e1179d7d5691c212668a8c9c8 == $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { $ia8418ed18227005524e0f3a24e89ce5b21e9b483 = true; break; } } if (!$ia8418ed18227005524e0f3a24e89ce5b21e9b483) { $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getFilters()->addItem($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a); $this->f403d2b0a9c44d21482a17bcb162aa54ccb79be64(); } } else Mage::log('Magesms: Do not load marketing filter: '.$i2bd9743336318d0e14be0600c9129730279505dd); } public function removeFilter($i670253c23c6fcba76bc4256a88fdd8fbc1041039) { $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getFilters()->removeItemByKey($i670253c23c6fcba76bc4256a88fdd8fbc1041039); $this->f403d2b0a9c44d21482a17bcb162aa54ccb79be64(); } public function addRemoveCustomer($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538) { $iea1c44f6137731e1b13c494f784074e6a133577a = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getCustomers()->getIds(); if (!is_array($iea1c44f6137731e1b13c494f784074e6a133577a)) $iea1c44f6137731e1b13c494f784074e6a133577a = array(); if (in_array($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538, $iea1c44f6137731e1b13c494f784074e6a133577a)) $iea1c44f6137731e1b13c494f784074e6a133577a = array_diff($iea1c44f6137731e1b13c494f784074e6a133577a, array($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)); else $iea1c44f6137731e1b13c494f784074e6a133577a = array_merge($iea1c44f6137731e1b13c494f784074e6a133577a, array($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)); $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getCustomers()->setIds($iea1c44f6137731e1b13c494f784074e6a133577a); $this->f403d2b0a9c44d21482a17bcb162aa54ccb79be64(); } public function resetFilter() { $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a = new Varien_Object(); $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->setData(array( 'filters' => new Varien_Data_Collection(), 'customers' => new Varien_Object() )); $this->f403d2b0a9c44d21482a17bcb162aa54ccb79be64(); } public function toSerialize() { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = array('filters' => array(), 'customers' => array()); foreach($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getFilters() as $i705fa7c9639d497e1179d7d5691c212668a8c9c8) { $ia61712c27ea241bd7a543dc2b02ea572274d0322['filters'][] = array('name' => $i705fa7c9639d497e1179d7d5691c212668a8c9c8->filter['name'], 'value' => $i705fa7c9639d497e1179d7d5691c212668a8c9c8->getValue()); } $ia61712c27ea241bd7a543dc2b02ea572274d0322['customers'] = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getCustomers()->getIds(); return serialize($ia61712c27ea241bd7a543dc2b02ea572274d0322); } public function fromSerialize($ia61712c27ea241bd7a543dc2b02ea572274d0322) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = unserialize($ia61712c27ea241bd7a543dc2b02ea572274d0322); $this->resetFilter(); if (!empty($ia61712c27ea241bd7a543dc2b02ea572274d0322['filters'])) { foreach($ia61712c27ea241bd7a543dc2b02ea572274d0322['filters'] as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { $this->addApplyFilter($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a['name'], $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a['value']); } } if (!empty($ia61712c27ea241bd7a543dc2b02ea572274d0322['customers']) && is_array($ia61712c27ea241bd7a543dc2b02ea572274d0322['customers'])) $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getCustomers()->setIds($ia61712c27ea241bd7a543dc2b02ea572274d0322['customers']); $this->f403d2b0a9c44d21482a17bcb162aa54ccb79be64(); } private function f403d2b0a9c44d21482a17bcb162aa54ccb79be64() { if (!empty($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a)) Mage::app()->saveCache(serialize($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a), 'magesms_marketing_filter'); } public function __destruct() { $this->f403d2b0a9c44d21482a17bcb162aa54ccb79be64(); } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Country.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Marketing_Filter_Country extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Country'), 'firstItem' => Mage::helper('magesms')->__('All countries'), 'type' => 'select', 'name' => 'country', 'color' => '#005784', ); } public function getValues() { return array_merge( array(array('value' => '', 'label' => $this->filter['firstItem'])), Mage::getModel('directory/country')->getCollection()->toOptionArray(false) ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue()); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('billing_country_id', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter_Country extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Country'), 'firstItem' => Mage::helper('magesms')->__('All countries'), 'type' => 'select', 'name' => 'country', 'color' => '#005784', ); } public function getValues() { return array_merge( array(array('value' => '', 'label' => $this->filter['firstItem'])), Mage::getModel('directory/country')->getCollection()->toOptionArray(false) ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue()); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('billing_country_id', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Firstname.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Marketing_Filter_Firstname extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('First name'), 'type' => 'input', 'name' => 'firstname', 'color' => '#c71585', ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array('like' => $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue().'%'); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('firstname', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter_Firstname extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('First name'), 'type' => 'input', 'name' => 'firstname', 'color' => '#c71585', ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array('like' => $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue().'%'); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('firstname', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Gender.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Marketing_Filter_Gender extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Gender:'), 'firstItem' => Mage::helper('magesms')->__('All'), 'type' => 'select', 'name' => 'gender', 'color' => '#eeaaaa', ); } public function getValues() { $id92fd65e479a45fd28bc877dc5d15fc219af26db = array(); $ic7e041f1c0f99ab24f17177e95509393b8ba49be = Mage::getModel('eav/config')->getAttribute('customer', 'gender'); if ($ic7e041f1c0f99ab24f17177e95509393b8ba49be->getId()) { $id92fd65e479a45fd28bc877dc5d15fc219af26db = $ic7e041f1c0f99ab24f17177e95509393b8ba49be->getSource()->getAllOptions(false); foreach($id92fd65e479a45fd28bc877dc5d15fc219af26db as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$i287bcbe0c9dfb97b6c1bb92e5d892c0dea8b7ab0) $id92fd65e479a45fd28bc877dc5d15fc219af26db[$i670253c23c6fcba76bc4256a88fdd8fbc1041039]['label'] = Mage::helper('magesms')->__($id92fd65e479a45fd28bc877dc5d15fc219af26db[$i670253c23c6fcba76bc4256a88fdd8fbc1041039]['label']); $id92fd65e479a45fd28bc877dc5d15fc219af26db = array_merge(array(array('value' => '', 'label' => $this->filter['firstItem'])), $id92fd65e479a45fd28bc877dc5d15fc219af26db); } return $id92fd65e479a45fd28bc877dc5d15fc219af26db; } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue()); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('gender', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter_Gender extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Gender:'), 'firstItem' => Mage::helper('magesms')->__('All'), 'type' => 'select', 'name' => 'gender', 'color' => '#eeaaaa', ); } public function getValues() { $id92fd65e479a45fd28bc877dc5d15fc219af26db = array(); $ic7e041f1c0f99ab24f17177e95509393b8ba49be = Mage::getModel('eav/config')->getAttribute('customer', 'gender'); if ($ic7e041f1c0f99ab24f17177e95509393b8ba49be->getId()) { $id92fd65e479a45fd28bc877dc5d15fc219af26db = $ic7e041f1c0f99ab24f17177e95509393b8ba49be->getSource()->getAllOptions(false); foreach($id92fd65e479a45fd28bc877dc5d15fc219af26db as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$i287bcbe0c9dfb97b6c1bb92e5d892c0dea8b7ab0) $id92fd65e479a45fd28bc877dc5d15fc219af26db[$i670253c23c6fcba76bc4256a88fdd8fbc1041039]['label'] = Mage::helper('magesms')->__($id92fd65e479a45fd28bc877dc5d15fc219af26db[$i670253c23c6fcba76bc4256a88fdd8fbc1041039]['label']); $id92fd65e479a45fd28bc877dc5d15fc219af26db = array_merge(array(array('value' => '', 'label' => $this->filter['firstItem'])), $id92fd65e479a45fd28bc877dc5d15fc219af26db); } return $id92fd65e479a45fd28bc877dc5d15fc219af26db; } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue()); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('gender', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Group.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Marketing_Filter_Group extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Groups'), 'firstItem' => Mage::helper('magesms')->__('All'), 'type' => 'select', 'name' => 'group', 'color' => '#d2b48c', ); } public function getValues() { return array_merge( array(array('value' => '', 'label' => $this->filter['firstItem'])), Mage::getModel('customer/group')->getCollection()->toOptionArray(false) ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue()); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('group_id', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter_Group extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Groups'), 'firstItem' => Mage::helper('magesms')->__('All'), 'type' => 'select', 'name' => 'group', 'color' => '#d2b48c', ); } public function getValues() { return array_merge( array(array('value' => '', 'label' => $this->filter['firstItem'])), Mage::getModel('customer/group')->getCollection()->toOptionArray(false) ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue()); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('group_id', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Lastname.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Marketing_Filter_Lastname extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Last name'), 'type' => 'input', 'name' => 'lastname', 'color' => '#006600', ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array('like' => $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue().'%'); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('lastname', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter_Lastname extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Last name'), 'type' => 'input', 'name' => 'lastname', 'color' => '#006600', ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array('like' => $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue().'%'); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('lastname', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Newsletter.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Marketing_Filter_Newsletter extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Newsletter:'), 'firstItem' => Mage::helper('magesms')->__('All'), 'type' => 'select', 'name' => 'newsletter', 'color' => '#cd1818', ); } public function getValues() { return array( '' => $this->filter['firstItem'], '1' => Mage::helper('magesms')->__('Yes'), '2' => Mage::helper('magesms')->__('No') ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue() == 1) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = 'ns.`subscriber_status` = 1'; else $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = 'ns.`subscriber_status` = 0 OR ns.`subscriber_status` IS NULL'; } } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) { $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->joinLeft( array('ns' => $iff7e46827cbb6547116c592bf800f4687428abf9->getTable('newsletter/subscriber')), 'ns.`customer_id` = e.`entity_id`' ); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->where(implode(' OR ', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)); } return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter_Newsletter extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Newsletter:'), 'firstItem' => Mage::helper('magesms')->__('All'), 'type' => 'select', 'name' => 'newsletter', 'color' => '#cd1818', ); } public function getValues() { return array( '' => $this->filter['firstItem'], '1' => Mage::helper('magesms')->__('Yes'), '2' => Mage::helper('magesms')->__('No') ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue() == 1) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = 'ns.`subscriber_status` = 1'; else $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = 'ns.`subscriber_status` = 0 OR ns.`subscriber_status` IS NULL'; } } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) { $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->joinLeft( array('ns' => $iff7e46827cbb6547116c592bf800f4687428abf9->getTable('newsletter/subscriber')), 'ns.`customer_id` = e.`entity_id`' ); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->where(implode(' OR ', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)); } return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Orderssum.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ class Topefekt_Magesms_Model_Marketing_Filter_Orderssum extends Varien_Object { public $filter; private $v717aafa07eeca1a7c0f40cc18a0eb90e0984de3e; public function __construct() { $this->v717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array('<', '>', '=', '<>'); $this->filter = array( 'title' => '∑ '.Mage::helper('magesms')->__('Order'), 'type' => 'number', 'name' => 'orderssum', 'color' => '#886543', ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { $i3ca4aff6918962dee4a8054ca52f13ef3b6bab08 = $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue(); $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = 'orders_sum '.$this->v717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[$i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0]].' '.(float)$i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1]; } } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) { if (strpos($iff7e46827cbb6547116c592bf800f4687428abf9->getSelect(), $iff7e46827cbb6547116c592bf800f4687428abf9->getTable('sales/order_grid')) === false) $iff7e46827cbb6547116c592bf800f4687428abf9->joinTable('sales/order_grid', 'customer_id=entity_id', array('entity_id')); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('SUM('.$iff7e46827cbb6547116c592bf800f4687428abf9->getTable('sales/order_grid').'.`grand_total`) AS orders_sum') ->having(implode(' AND ', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) ->group('e.entity_id'); } return $iff7e46827cbb6547116c592bf800f4687428abf9; } public function setValue($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $this->filter['cond'] = $this->v717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[$if2eee0665f163a28f4adcfe84e3fc666bf1bcd89[0]]; return parent::setValue($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Product.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ class Topefekt_Magesms_Model_Marketing_Filter_Product extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Product'), 'type' => 'input', 'name' => 'product', 'color' => '#77aacc', ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = (int)$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue(); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) { if (strpos($iff7e46827cbb6547116c592bf800f4687428abf9->getSelect(), $iff7e46827cbb6547116c592bf800f4687428abf9->getTable('sales/order_grid')) === false) $iff7e46827cbb6547116c592bf800f4687428abf9->joinTable('sales/order_grid', 'customer_id=entity_id', array('entity_id')); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->join( array('soi' => $iff7e46827cbb6547116c592bf800f4687428abf9->getTable('sales/order_item')), 'soi.`order_id` = `'.$iff7e46827cbb6547116c592bf800f4687428abf9->getTable('sales/order_grid').'`.`entity_id`' ); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->where('soi.`product_id` IN ('.implode(', ', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e).')'); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect()->group('e.entity_id'); } return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Register.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Marketing_Filter_Register extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Date of registration from: '), 'type' => 'datetime', 'name' => 'register', 'color' => '#907523', 'glue' => ' / '.Mage::helper('magesms')->__('to: '), ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e = array(); $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69 = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { $i3ca4aff6918962dee4a8054ca52f13ef3b6bab08 = $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue(); if (!empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0])) $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e[] = array('from' => date('Y-m-d H:i:s', strtotime($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0]))); if (!empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1])) $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69[] = array('to' => date('Y-m-d H:i:s', strtotime($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1]))); } } if (count($i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('created_at', $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e); if (count($ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('created_at', $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter_Register extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Date of registration from: '), 'type' => 'datetime', 'name' => 'register', 'color' => '#907523', 'glue' => ' / '.Mage::helper('magesms')->__('to: '), ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e = array(); $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69 = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { $i3ca4aff6918962dee4a8054ca52f13ef3b6bab08 = $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue(); if (!empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0])) $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e[] = array('from' => date('Y-m-d H:i:s', strtotime($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0]))); if (!empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1])) $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69[] = array('to' => date('Y-m-d H:i:s', strtotime($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1]))); } } if (count($i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('created_at', $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e); if (count($ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('created_at', $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Type.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Marketing_Filter_Type extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Type'), 'firstItem' => Mage::helper('magesms')->__('All customers'), 'type' => 'select', 'name' => 'type', 'color' => '#9acd32', ); } public function getValues() { return array( '' => $this->filter['firstItem'], '1' => Mage::helper('magesms')->__('company customers'), '2' => Mage::helper('magesms')->__('private customers') ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue() == 1) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array(array('notnull' => true)); if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue() == 2) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array(array('null' => true)); } } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->joinAttribute('billing_vat_id', 'customer_address/vat_id', 'default_billing', null, 'left') ->addFieldToFilter('billing_vat_id', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter_Type extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Type'), 'firstItem' => Mage::helper('magesms')->__('All customers'), 'type' => 'select', 'name' => 'type', 'color' => '#9acd32', ); } public function getValues() { return array( '' => $this->filter['firstItem'], '1' => Mage::helper('magesms')->__('company customers'), '2' => Mage::helper('magesms')->__('private customers') ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue() == 1) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array(array('notnull' => true)); if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue() == 2) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array(array('null' => true)); } } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->joinAttribute('billing_vat_id', 'customer_address/vat_id', 'default_billing', null, 'left') ->addFieldToFilter('billing_vat_id', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Website.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Marketing_Filter_Website extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Store'), 'firstItem' => Mage::helper('magesms')->__('All stores'), 'type' => 'select', 'name' => 'website', 'color' => '#8880aa', ); } public function getValues() { $if71cbed623a99cd5a1032d4d3388bfd486053db2 = array('' => $this->filter['firstItem']); foreach (Mage::app()->getWebsites($this->_isAdminScopeAllowed) as $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc) { $if71cbed623a99cd5a1032d4d3388bfd486053db2[$i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getId()] = $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getDataUsingMethod('name'); } return $if71cbed623a99cd5a1032d4d3388bfd486053db2; } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue()); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) { $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('website_id', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); } return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter_Website extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Store'), 'firstItem' => Mage::helper('magesms')->__('All stores'), 'type' => 'select', 'name' => 'website', 'color' => '#8880aa', ); } public function getValues() { $if71cbed623a99cd5a1032d4d3388bfd486053db2 = array('' => $this->filter['firstItem']); foreach (Mage::app()->getWebsites($this->_isAdminScopeAllowed) as $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc) { $if71cbed623a99cd5a1032d4d3388bfd486053db2[$i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getId()] = $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getDataUsingMethod('name'); } return $if71cbed623a99cd5a1032d4d3388bfd486053db2; } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue()); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) { $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('website_id', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); } return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Admins.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Admins extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/admins', 'ID'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Admins extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/admins', 'ID'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Admins/Collection.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Admins_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/admins'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Admins_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/admins'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Answers.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Answers extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/answers', 'ID'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Answers extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/answers', 'ID'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Answers/Collection.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Answers_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/answers'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Answers_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/answers'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Collection.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Countries_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/countries'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Countries_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/countries'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Country.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Country extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/country', 'name'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Country extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/country', 'name'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Country/Area.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Country_Area extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/country_area', 'ID'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Country_Area extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/country_area', 'ID'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Country/Area/Collection.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Country_Area_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/country_area'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Country_Area_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/country_area'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Country/Collection.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Country_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/country'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Country_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/country'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Country/Lang.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Country_Lang extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/country_lang', 'ID'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Country_Lang extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/country_lang', 'ID'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Country/Lang/Collection.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Country_Lang_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/country_lang'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Country_Lang_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/country_lang'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Exceptions.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Exceptions extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/exceptions', 'id'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Exceptions extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/exceptions', 'id'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Exceptions/Collection.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Exceptions_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/exceptions'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Exceptions_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/exceptions'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Hooks extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/hooks', 'id'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Hooks extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/hooks', 'id'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Admins.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Hooks_Admins extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/hooks_admins', 'id'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Hooks_Admins extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/hooks_admins', 'id'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Admins/Collection.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Hooks_Admins_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/hooks_admins'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Hooks_Admins_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/hooks_admins'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Collection.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Hooks_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/hooks'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Hooks_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/hooks'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Customers.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Hooks_Customers extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/hooks_customers', 'id'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Hooks_Customers extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/hooks_customers', 'id'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Customers/Collection.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Hooks_Customers_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/hooks_customers'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Hooks_Customers_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/hooks_customers'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Templates.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Hooks_Templates extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/hooks_templates', 'id'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Hooks_Templates extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/hooks_templates', 'id'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Templates/Collection.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Hooks_Templates_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/hooks_templates'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Hooks_Templates_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/hooks_templates'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Unicode.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Hooks_Unicode extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/hooks_unicode', 'id'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Hooks_Unicode extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/hooks_unicode', 'id'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Unicode/Collection.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Hooks_Unicode_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/hooks_unicode'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Hooks_Unicode_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/hooks_unicode'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Maps.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Maps extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/maps', 'id'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Maps extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/maps', 'id'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Maps/Collection.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Maps_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/maps'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Maps_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/maps'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Marketing/Filter.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Marketing_Filter extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/marketing_filter', 'id'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Marketing_Filter extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/marketing_filter', 'id'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Marketing/Filter/Collection.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Marketing_Filter_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/marketing_filter'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Marketing_Filter_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/marketing_filter'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Optout/Order.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ class Topefekt_Magesms_Model_Mysql4_Optout_Order extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/optout_order', 'id'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Optout/Order/Collection.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ class Topefekt_Magesms_Model_Mysql4_Optout_Order_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/optout_order'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Ownnumbersender.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Ownnumbersender extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/ownnumbersender', 'id'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Ownnumbersender extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/ownnumbersender', 'id'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Ownnumbersender/Collection.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Ownnumbersender_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/ownnumbersender'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Ownnumbersender_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/ownnumbersender'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Routes.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Routes extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/routes', 'ID'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Routes extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/routes', 'ID'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Routes/Alternative.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Routes_Alternative extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/routes_alternative', 'id'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Routes_Alternative extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/routes_alternative', 'id'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Routes/Alternative/Collection.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Routes_Alternative_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/routes_alternative'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Routes_Alternative_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/routes_alternative'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Routes/Collection.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Routes_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/routes'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Routes_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/routes'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Smshistory.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Smshistory extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/smshistory', 'ID'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Smshistory extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/smshistory', 'ID'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Smshistory/Collection.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Smshistory_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/smshistory'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Smshistory_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/smshistory'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Smsuser.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Smsuser extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/smsuser', 'ID'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Smsuser extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/smsuser', 'ID'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Smsuser/Collection.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Smsuser_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/smsuser'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Smsuser_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/smsuser'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Template.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Template extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/template', 'id'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Template extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/template', 'id'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Template/Collection.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Template_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/template'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Template_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/template'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Textsender.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Textsender extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/textsender', 'id'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Textsender extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/textsender', 'id'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Textsender/Collection.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Textsender_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/textsender'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Textsender_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/textsender'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Variables.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Variables extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/variables', 'id'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Variables extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/variables', 'id'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Variables/Collection.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Mysql4_Variables_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/variables'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Variables_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/variables'); } }
app/code/community/Topefekt/Magesms/Model/Observer.php CHANGED
@@ -10,7 +10,7 @@
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
- class Topefekt_Magesms_Model_Observer { public function updateOrderTrackingNumber(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { $i5e65dd16263683749d16a84171f719e768ed14b5 = $i417760717250c854293598d2ff07a66629a1946d->getEvent()->getTrack(); if ($i5e65dd16263683749d16a84171f719e768ed14b5->hasDataChanges() && ($i5e65dd16263683749d16a84171f719e768ed14b5->getData('created_at') == $i5e65dd16263683749d16a84171f719e768ed14b5->getData('updated_at') || $i5e65dd16263683749d16a84171f719e768ed14b5->dataHasChangedFor('track_number'))) { if (Mage::registry('magesms_track_obj')) Mage::unregister('magesms_track_obj'); Mage::register('magesms_track_obj', $i5e65dd16263683749d16a84171f719e768ed14b5); Mage::getSingleton('magesms/hooks')->send('updateOrderTrackingNumber', $i5e65dd16263683749d16a84171f719e768ed14b5->getShipment()->getOrder()); } return $this; } public function newOrder(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { $i0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('checkout/session'); $i0e3e80cee9c51f140b823db0b7df66493acca657->unsMageOptoutRemoved(); Mage::getSingleton('magesms/hooks')->send('newOrder', $i417760717250c854293598d2ff07a66629a1946d->getOrder()); return $this; } public function updateOrderStatus(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { if ($i417760717250c854293598d2ff07a66629a1946d->getOrder()->getOrigData('status') != $i417760717250c854293598d2ff07a66629a1946d->getOrder()->getData('status')) { Mage::getSingleton('magesms/hooks')->send('updateOrderStatus', $i417760717250c854293598d2ff07a66629a1946d->getOrder()); } return $this; } public function createCreditMemo(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { Mage::getSingleton('magesms/hooks')->send('createCreditMemo', $i417760717250c854293598d2ff07a66629a1946d); return $this; } public function customerRegisterSuccess(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { Mage::getSingleton('magesms/hooks')->send('customerRegisterSuccess', $i417760717250c854293598d2ff07a66629a1946d['customer']); return $this; } public function productStock(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { $i5e65dd16263683749d16a84171f719e768ed14b5 = $i417760717250c854293598d2ff07a66629a1946d->getEvent()->getItem(); if ($i5e65dd16263683749d16a84171f719e768ed14b5->getManageStock()) { if (!($i34b2041d68b0c6d2dfd61d3d36f96caad687688c = Mage::registry('magesms_stock_item_'.$i5e65dd16263683749d16a84171f719e768ed14b5->getProductId()))) { $i34b2041d68b0c6d2dfd61d3d36f96caad687688c = $i5e65dd16263683749d16a84171f719e768ed14b5->getOrigData(); } if (!$i34b2041d68b0c6d2dfd61d3d36f96caad687688c) return $this; if ($i5e65dd16263683749d16a84171f719e768ed14b5->hasDataChanges()) { if ($i34b2041d68b0c6d2dfd61d3d36f96caad687688c['qty'] > 0 && $i5e65dd16263683749d16a84171f719e768ed14b5->getQty() <= 0) Mage::getSingleton('magesms/hooks')->send('productOutOfStock', $i5e65dd16263683749d16a84171f719e768ed14b5); if ($i5e65dd16263683749d16a84171f719e768ed14b5->getNotifyStockQty() > $i5e65dd16263683749d16a84171f719e768ed14b5->getQty() && $i34b2041d68b0c6d2dfd61d3d36f96caad687688c['qty'] >= $i5e65dd16263683749d16a84171f719e768ed14b5->getNotifyStockQty()) Mage::getSingleton('magesms/hooks')->send('productLowStock', $i5e65dd16263683749d16a84171f719e768ed14b5); } } return $this; } public function contactForm(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { Mage::getSingleton('magesms/hooks')->send('contactForm', $i417760717250c854293598d2ff07a66629a1946d); return $this; } public function cartAddProductAddOptout(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { $i0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('checkout/session'); if (!is_null($i0e3e80cee9c51f140b823db0b7df66493acca657->getMageOptoutRemoved())) return $this; $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142 = Mage::getConfig()->getNode('default/config/optout')->sku; $i69a1201e93806d55c970dfb18feec53d221ba37b = Mage::getModel('catalog/product')->loadByAttribute('sku', $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142); if ($i69a1201e93806d55c970dfb18feec53d221ba37b) { $i69a1201e93806d55c970dfb18feec53d221ba37b->setStoreId(Mage::app()->getStore()->getId()); $i69a1201e93806d55c970dfb18feec53d221ba37b->load($i69a1201e93806d55c970dfb18feec53d221ba37b->getId()); if ($i69a1201e93806d55c970dfb18feec53d221ba37b->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_ENABLED) { $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495 = Mage::getSingleton('checkout/cart'); $i12f98417e3df53ca8bc49671d89c1a89cdceeb8b = $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->getItems(); $idd690844e5b6fae774e02ace13c0608c4bd6bfbc = false; foreach($i12f98417e3df53ca8bc49671d89c1a89cdceeb8b as $i705fa7c9639d497e1179d7d5691c212668a8c9c8) { if ($i705fa7c9639d497e1179d7d5691c212668a8c9c8->getSku() == $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142) { $idd690844e5b6fae774e02ace13c0608c4bd6bfbc = true; break; } } if ($idd690844e5b6fae774e02ace13c0608c4bd6bfbc === false) { $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->init(); $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->addProduct($i69a1201e93806d55c970dfb18feec53d221ba37b, array('qty' => 1)); $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->save(); $i0e3e80cee9c51f140b823db0b7df66493acca657->setCartWasUpdated(true); $i8091f3f14f616f7c7725a766ecf5f3d4a561a828 = Mage::helper('checkout')->__('%s was added to your shopping cart.', Mage::helper('core')->escapeHtml($i69a1201e93806d55c970dfb18feec53d221ba37b->getName())); $i0e3e80cee9c51f140b823db0b7df66493acca657->addSuccess($i8091f3f14f616f7c7725a766ecf5f3d4a561a828); $i0e3e80cee9c51f140b823db0b7df66493acca657->setMageOptoutRemoved(false); } } } return $this; } public function cartRemoveProductClearOptout(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { $i0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('checkout/session'); if (!is_null($i0e3e80cee9c51f140b823db0b7df66493acca657->getMageOptoutRemoved())) { $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142 = Mage::getConfig()->getNode('default/config/optout')->sku; if ($i417760717250c854293598d2ff07a66629a1946d->getQuoteItem()->getSku() == $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142) { $i0e3e80cee9c51f140b823db0b7df66493acca657->setMageOptoutRemoved(true); } else{ $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495 = Mage::getSingleton('checkout/cart'); if ($i0e3e80cee9c51f140b823db0b7df66493acca657->getMageOptoutRemoved() === true && $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->getItemsCount() == 1) { $i0e3e80cee9c51f140b823db0b7df66493acca657->unsMageOptoutRemoved(); } elseif ($i0e3e80cee9c51f140b823db0b7df66493acca657->getMageOptoutRemoved() === false && $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->getItemsCount() == 2) { $i69a1201e93806d55c970dfb18feec53d221ba37b = Mage::getModel('catalog/product')->loadByAttribute('sku', $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142); $i705fa7c9639d497e1179d7d5691c212668a8c9c8 = $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->getQuote()->getItemByProduct($i69a1201e93806d55c970dfb18feec53d221ba37b); $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->removeItem($i705fa7c9639d497e1179d7d5691c212668a8c9c8->getId()); $i0e3e80cee9c51f140b823db0b7df66493acca657->unsMageOptoutRemoved(); } } } return $this; } public function cartRemoveAllClearOptout(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { $i0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('checkout/session'); if (!is_null($i0e3e80cee9c51f140b823db0b7df66493acca657->getMageOptoutRemoved()) && !$i417760717250c854293598d2ff07a66629a1946d->getCart()->getItemsCount()) { $i0e3e80cee9c51f140b823db0b7df66493acca657->unsMageOptoutRemoved(); } return $this; } public function lockSkuAttribute(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142 = Mage::getConfig()->getNode('default/config/optout')->sku; $i7fff76b02be2f63877a1782ca871e62a287fa16f = $i417760717250c854293598d2ff07a66629a1946d->getEvent(); $i69a1201e93806d55c970dfb18feec53d221ba37b = $i7fff76b02be2f63877a1782ca871e62a287fa16f->getProduct(); if ($i69a1201e93806d55c970dfb18feec53d221ba37b->getSku() == $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142) $i69a1201e93806d55c970dfb18feec53d221ba37b->lockAttribute('sku'); return $this; } public function cronUpdate() { $i36c92dc65e84acd6954001035d3b86efb10057bf = Mage::app()->loadCache('magesms_update_lastcheck'); $idef7cbe5fc44de57058ffe420bace11327a9b243 = 24 * 3600; if (($idef7cbe5fc44de57058ffe420bace11327a9b243 + $i36c92dc65e84acd6954001035d3b86efb10057bf) > time()) { return $this; } $i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18 = Mage::getSingleton('magesms/smsprofile'); $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'action=showlastversion&username='.urlencode($i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->user); $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getModel('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if (!empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720) && !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][0])) { if (version_compare($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][0], Mage::getConfig()->getModuleConfig('Topefekt_Magesms')->version) > 0) { Mage::app()->saveCache($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][0], 'magesms_update_available'); Mage::log("MageSms cron - new version {$i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][0]} available"); } else Mage::app()->saveCache('', 'magesms_update_available'); } Mage::app()->saveCache(time(), 'magesms_update_lastcheck'); Mage::getSingleton('magesms/routes')->updatepricelist(); Mage::getSingleton('magesms/exceptions')->updateData(); return $this; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
+ class Topefekt_Magesms_Model_Observer { public function updateOrderTrackingNumber(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { $i5e65dd16263683749d16a84171f719e768ed14b5 = $i417760717250c854293598d2ff07a66629a1946d->getEvent()->getTrack(); if ($i5e65dd16263683749d16a84171f719e768ed14b5->hasDataChanges() && ($i5e65dd16263683749d16a84171f719e768ed14b5->getData('created_at') == $i5e65dd16263683749d16a84171f719e768ed14b5->getData('updated_at') || $i5e65dd16263683749d16a84171f719e768ed14b5->dataHasChangedFor('track_number'))) { if (Mage::registry('magesms_track_obj')) Mage::unregister('magesms_track_obj'); Mage::register('magesms_track_obj', $i5e65dd16263683749d16a84171f719e768ed14b5); Mage::getSingleton('magesms/hooks')->send('updateOrderTrackingNumber', $i5e65dd16263683749d16a84171f719e768ed14b5->getShipment()->getOrder()); } return $this; } public function newOrder(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { if (!Mage::helper('magesms')->isActive()) return $this; $i69a1201e93806d55c970dfb18feec53d221ba37b = Mage::helper('magesms')->getOptoutProduct(); if ($i69a1201e93806d55c970dfb18feec53d221ba37b) { $if80f0cbea56595a4489db73147386c11bb406a7e = $i417760717250c854293598d2ff07a66629a1946d->getEvent()->getOrder(); $i705fa7c9639d497e1179d7d5691c212668a8c9c8 = $if80f0cbea56595a4489db73147386c11bb406a7e->getQuote()->getItemByProduct($i69a1201e93806d55c970dfb18feec53d221ba37b); if (!$i705fa7c9639d497e1179d7d5691c212668a8c9c8) { $ib8129b89cda7dae2cfe1b114353de8ba2385974e = Mage::getModel('magesms/optout_order'); $ib8129b89cda7dae2cfe1b114353de8ba2385974e->setOrderId($if80f0cbea56595a4489db73147386c11bb406a7e->getId())->setDisabled(1); $ib8129b89cda7dae2cfe1b114353de8ba2385974e->save(); } } Mage::getSingleton('magesms/hooks')->send('newOrder', $i417760717250c854293598d2ff07a66629a1946d->getOrder()); return $this; } public function updateOrderStatus(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { if ($i417760717250c854293598d2ff07a66629a1946d->getOrder()->getOrigData('status') != $i417760717250c854293598d2ff07a66629a1946d->getOrder()->getData('status')) { Mage::getSingleton('magesms/hooks')->send('updateOrderStatus', $i417760717250c854293598d2ff07a66629a1946d->getOrder()); } return $this; } public function createCreditMemo(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { Mage::getSingleton('magesms/hooks')->send('createCreditMemo', $i417760717250c854293598d2ff07a66629a1946d); return $this; } public function customerRegisterSuccess(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { Mage::getSingleton('magesms/hooks')->send('customerRegisterSuccess', $i417760717250c854293598d2ff07a66629a1946d['customer']); return $this; } public function productStock(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { $i5e65dd16263683749d16a84171f719e768ed14b5 = $i417760717250c854293598d2ff07a66629a1946d->getEvent()->getItem(); if ($i5e65dd16263683749d16a84171f719e768ed14b5->getManageStock()) { if (!($i34b2041d68b0c6d2dfd61d3d36f96caad687688c = Mage::registry('magesms_stock_item_'.$i5e65dd16263683749d16a84171f719e768ed14b5->getProductId()))) { $i34b2041d68b0c6d2dfd61d3d36f96caad687688c = $i5e65dd16263683749d16a84171f719e768ed14b5->getOrigData(); } if (!$i34b2041d68b0c6d2dfd61d3d36f96caad687688c) return $this; if ($i5e65dd16263683749d16a84171f719e768ed14b5->hasDataChanges()) { if ($i34b2041d68b0c6d2dfd61d3d36f96caad687688c['qty'] > 0 && $i5e65dd16263683749d16a84171f719e768ed14b5->getQty() <= 0) Mage::getSingleton('magesms/hooks')->send('productOutOfStock', $i5e65dd16263683749d16a84171f719e768ed14b5); if ($i5e65dd16263683749d16a84171f719e768ed14b5->getNotifyStockQty() > $i5e65dd16263683749d16a84171f719e768ed14b5->getQty() && $i34b2041d68b0c6d2dfd61d3d36f96caad687688c['qty'] >= $i5e65dd16263683749d16a84171f719e768ed14b5->getNotifyStockQty()) Mage::getSingleton('magesms/hooks')->send('productLowStock', $i5e65dd16263683749d16a84171f719e768ed14b5); } } return $this; } public function contactForm(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { if (!Mage::helper('magesms')->isActive()) return $this; Mage::getSingleton('magesms/hooks')->send('contactForm', $i417760717250c854293598d2ff07a66629a1946d); return $this; } public function cartAddProductAddOptout(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { if (!Mage::helper('magesms')->isActive()) return $this; Mage::helper('magesms')->addOptoutProduct(true); return $this; } public function cartRemoveProductClearOptout(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { if (!Mage::helper('magesms')->isActive()) return $this; Mage::helper('magesms')->removeOptoutProduct(true); return $this; } public function lockSkuAttribute(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { if (!Mage::helper('magesms')->isActive()) return $this; $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142 = Mage::getConfig()->getNode('default/config/optout')->sku; $i7fff76b02be2f63877a1782ca871e62a287fa16f = $i417760717250c854293598d2ff07a66629a1946d->getEvent(); $i69a1201e93806d55c970dfb18feec53d221ba37b = $i7fff76b02be2f63877a1782ca871e62a287fa16f->getProduct(); if ($i69a1201e93806d55c970dfb18feec53d221ba37b->getSku() == $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142) $i69a1201e93806d55c970dfb18feec53d221ba37b->lockAttribute('sku'); return $this; } public function cronUpdate() { if (!Mage::helper('magesms')->isActive()) return $this; $i36c92dc65e84acd6954001035d3b86efb10057bf = Mage::app()->loadCache('magesms_update_lastcheck'); $idef7cbe5fc44de57058ffe420bace11327a9b243 = 24 * 3600; if (($idef7cbe5fc44de57058ffe420bace11327a9b243 + $i36c92dc65e84acd6954001035d3b86efb10057bf) > time()) { return $this; } $i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18 = Mage::getSingleton('magesms/smsprofile'); $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'action=showlastversion&username='.urlencode($i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->user); $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getModel('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if (!empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720) && !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][0])) { if (version_compare($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][0], Mage::getConfig()->getModuleConfig('Topefekt_Magesms')->version) > 0) { Mage::app()->saveCache($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][0], 'magesms_update_available'); Mage::log("MageSms cron - new version {$i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][0]} available"); } else Mage::app()->saveCache('', 'magesms_update_available'); } Mage::app()->saveCache(time(), 'magesms_update_lastcheck'); Mage::getSingleton('magesms/routes')->updatepricelist(); Mage::getSingleton('magesms/exceptions')->updateData(); return $this; } }
app/code/community/Topefekt/Magesms/Model/Optout/Order.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ class Topefekt_Magesms_Model_Optout_Order extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/optout_order'); } }
app/code/community/Topefekt/Magesms/Model/Overide/Cataloginventory/Stock.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Overide_Cataloginventory_Stock extends Mage_CatalogInventory_Model_Resource_Stock { public function correctItemsQty($i035599939f2d68a8936ff060ff10cbf982274764, $i18f5dd94efe6ea5893731db7537fa44426b4bba8, $i1db7e26fa11aa195a8425de5fe96b99a8a8eda0e = '-') { $i12f98417e3df53ca8bc49671d89c1a89cdceeb8b = array(); foreach($i18f5dd94efe6ea5893731db7537fa44426b4bba8 as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$i3ca4aff6918962dee4a8054ca52f13ef3b6bab08) { $i6e09c956df8f33f0146b262c4774ff2fe53579bd = Mage::getModel('cataloginventory/stock_item')->loadByProduct($i670253c23c6fcba76bc4256a88fdd8fbc1041039); if (Mage::registry('magesms_stock_item_'.$i670253c23c6fcba76bc4256a88fdd8fbc1041039)) Mage::unregister('magesms_stock_item_'.$i670253c23c6fcba76bc4256a88fdd8fbc1041039); Mage::register('magesms_stock_item_'.$i670253c23c6fcba76bc4256a88fdd8fbc1041039, $i6e09c956df8f33f0146b262c4774ff2fe53579bd->getData()); } parent::correctItemsQty($i035599939f2d68a8936ff060ff10cbf982274764, $i18f5dd94efe6ea5893731db7537fa44426b4bba8, $i1db7e26fa11aa195a8425de5fe96b99a8a8eda0e); return $this; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Overide_Cataloginventory_Stock extends Mage_CatalogInventory_Model_Resource_Stock { public function correctItemsQty($i035599939f2d68a8936ff060ff10cbf982274764, $i18f5dd94efe6ea5893731db7537fa44426b4bba8, $i1db7e26fa11aa195a8425de5fe96b99a8a8eda0e = '-') { $i12f98417e3df53ca8bc49671d89c1a89cdceeb8b = array(); foreach($i18f5dd94efe6ea5893731db7537fa44426b4bba8 as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$i3ca4aff6918962dee4a8054ca52f13ef3b6bab08) { $i6e09c956df8f33f0146b262c4774ff2fe53579bd = Mage::getModel('cataloginventory/stock_item')->loadByProduct($i670253c23c6fcba76bc4256a88fdd8fbc1041039); if (Mage::registry('magesms_stock_item_'.$i670253c23c6fcba76bc4256a88fdd8fbc1041039)) Mage::unregister('magesms_stock_item_'.$i670253c23c6fcba76bc4256a88fdd8fbc1041039); Mage::register('magesms_stock_item_'.$i670253c23c6fcba76bc4256a88fdd8fbc1041039, $i6e09c956df8f33f0146b262c4774ff2fe53579bd->getData()); } parent::correctItemsQty($i035599939f2d68a8936ff060ff10cbf982274764, $i18f5dd94efe6ea5893731db7537fa44426b4bba8, $i1db7e26fa11aa195a8425de5fe96b99a8a8eda0e); return $this; } }
app/code/community/Topefekt/Magesms/Model/Ownnumbersender.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Ownnumbersender extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/ownnumbersender'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Ownnumbersender extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/ownnumbersender'); } }
app/code/community/Topefekt/Magesms/Model/Routes.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Routes extends Mage_Core_Model_Abstract { const SENDER_TEXT = 0; const SENDER_SYSTEM = 1; const SENDER_OWN = 2; const SENDER_SIM = 3; public $displayCode = false; protected function _construct() { $this->_init('magesms/routes'); } public function loadData($i30f20aafde612a957f7f966cb5b85e35782bc88a) { $i5528ed14b056e3debe4695094269de3a98f76fe7 = array(); foreach (Mage::getSingleton('magesms/routes')->getCollection()->addFilter('type', $i30f20aafde612a957f7f966cb5b85e35782bc88a) as $ice10b700e3771fcda63608142bce93b608228583) { $i9bd2c88ca2206122845c5e189e2b6856a2409e3a = Mage::getSingleton('magesms/routes_alternative')->getCollection()->addFieldToFilter('route_id', $ice10b700e3771fcda63608142bce93b608228583->getId()); if ($i9bd2c88ca2206122845c5e189e2b6856a2409e3a->count()) $ice10b700e3771fcda63608142bce93b608228583->setAlternatives($i9bd2c88ca2206122845c5e189e2b6856a2409e3a); $i5528ed14b056e3debe4695094269de3a98f76fe7[] = $ice10b700e3771fcda63608142bce93b608228583; } return $i5528ed14b056e3debe4695094269de3a98f76fe7; } public function getGate($i39404799a9171a012cb8b15cd8f27b347aa44a5f, $i30f20aafde612a957f7f966cb5b85e35782bc88a) { foreach (Mage::getSingleton('magesms/routes')->getCollection()->addFilter('type', $i30f20aafde612a957f7f966cb5b85e35782bc88a) as $ice10b700e3771fcda63608142bce93b608228583) { if (preg_match('/^'.$ice10b700e3771fcda63608142bce93b608228583->getArea().'/', $i39404799a9171a012cb8b15cd8f27b347aa44a5f)) { return $ice10b700e3771fcda63608142bce93b608228583; } } return Mage::getSingleton('magesms/routes'); } public function getInfo() { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = array('payment' => array(), 'dph' => null, 'sms' => array()); $i107ca03708f38d42ec504f51f62355fc45d87e69 = explode("%",$this->getData('info')); $i6048c89aa6f25872dad4b719d7b6d821cac48774 = explode("_",$i107ca03708f38d42ec504f51f62355fc45d87e69[0]); $i8e506de2f16bb925ad71fe7bfd4757aeec48a809 = explode(";",$i6048c89aa6f25872dad4b719d7b6d821cac48774[0]); $i9fb8b58187be1d03efeb03cbaa24d23651e7360e = explode(";",$i6048c89aa6f25872dad4b719d7b6d821cac48774[1]); $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][0] = explode(":",$i9fb8b58187be1d03efeb03cbaa24d23651e7360e[0]); $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][1] = explode(":",$i9fb8b58187be1d03efeb03cbaa24d23651e7360e[1]); $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][2] = explode(":",$i9fb8b58187be1d03efeb03cbaa24d23651e7360e[2]); $ia61712c27ea241bd7a543dc2b02ea572274d0322['dph'] = $i107ca03708f38d42ec504f51f62355fc45d87e69[1]; for($i039030c921e1cb0961cdfe7905a8744d586dd8f5=0;$i039030c921e1cb0961cdfe7905a8744d586dd8f5<count($i8e506de2f16bb925ad71fe7bfd4757aeec48a809);$i039030c921e1cb0961cdfe7905a8744d586dd8f5++){ $ie61606c2d8de1e806ab2adf90e40cc4bb671be43 = explode("|",$i8e506de2f16bb925ad71fe7bfd4757aeec48a809[$i039030c921e1cb0961cdfe7905a8744d586dd8f5]); if($ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==1 || $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==2 || $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==4) { $ia61712c27ea241bd7a543dc2b02ea572274d0322['sms'][0][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[0]][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[1]] = array( 'credit' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay1' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][0][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay2' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][1][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay3' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][2][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'unicode' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[4]); } if($ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==3) { $ia61712c27ea241bd7a543dc2b02ea572274d0322['sms'][1][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[0]][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[1]] = array( 'credit' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay1' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][0][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay2' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][1][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay3' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][2][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'unicode' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[4]); } if($ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==1 || $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==2 || $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==5) { $ia61712c27ea241bd7a543dc2b02ea572274d0322['sms'][2][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[0]][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[1]] = array( 'credit' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay1' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][0][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay2' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][1][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay3' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][2][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'unicode' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[4]); } if($ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==10) { $ia61712c27ea241bd7a543dc2b02ea572274d0322['sms'][3][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[0]][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[1]] = array( 'credit' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay1' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][0][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay2' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][1][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay3' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][2][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'unicode' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[4]); } } return $ia61712c27ea241bd7a543dc2b02ea572274d0322; } public function _beforeSave() { $i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18 = Mage::getModel('magesms/smsprofile'); $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'action=dost&username='.urlencode($i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->user).'&password='.urlencode($i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->passwd).'&area='.urlencode($this->getArea()).'&currency='.$i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->currency; $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getModel('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1 && !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { $this->setInfo($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['datasrc']); } return parent::_beforeSave(); } public function _beforeDelete() { $i9bd2c88ca2206122845c5e189e2b6856a2409e3a = Mage::getModel('magesms/routes_alternative')->getCollection()->addFieldToFilter('route_id', $this->getId()); foreach($i9bd2c88ca2206122845c5e189e2b6856a2409e3a as $ida3b491904fb073f446bf820cd55a0ff69b347d1) $ida3b491904fb073f446bf820cd55a0ff69b347d1->delete(); return parent::_beforeDelete(); } public function validate($ia2537252e3e7dbac0ba1e1693e8531161842da87 = false) { $ieeea3fa58a065e13acdb42aab551831a98e9444c = array(); $i0d09b2a4f282150bf47b02f9f3d82586fe313844 = Mage::helper('magesms'); if ($this->getSendertype() == Topefekt_Magesms_Model_Routes::SENDER_TEXT && $ia2537252e3e7dbac0ba1e1693e8531161842da87 !== false) { if (!Zend_Validate::is($this->getData('senderID'), 'NotEmpty')) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('possible characters: ').'a-z A-Z 0-9 _ .'; } elseif (!Mage::helper('magesms')->isTextSender($this->getData('senderID'))) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('possible characters: ').'a-z A-Z 0-9 _ .'; } } if (empty($ieeea3fa58a065e13acdb42aab551831a98e9444c)) { return true; } return $ieeea3fa58a065e13acdb42aab551831a98e9444c; } public function updatepricelist() { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = $this->getCollection(); foreach($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec as $ice10b700e3771fcda63608142bce93b608228583) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->save(); } return $this; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Routes extends Mage_Core_Model_Abstract { const SENDER_TEXT = 0; const SENDER_SYSTEM = 1; const SENDER_OWN = 2; const SENDER_SIM = 3; public $displayCode = false; protected function _construct() { $this->_init('magesms/routes'); } public function loadData($i30f20aafde612a957f7f966cb5b85e35782bc88a) { $i5528ed14b056e3debe4695094269de3a98f76fe7 = array(); foreach (Mage::getSingleton('magesms/routes')->getCollection()->addFilter('type', $i30f20aafde612a957f7f966cb5b85e35782bc88a) as $ice10b700e3771fcda63608142bce93b608228583) { $i9bd2c88ca2206122845c5e189e2b6856a2409e3a = Mage::getSingleton('magesms/routes_alternative')->getCollection()->addFieldToFilter('route_id', $ice10b700e3771fcda63608142bce93b608228583->getId()); if ($i9bd2c88ca2206122845c5e189e2b6856a2409e3a->count()) $ice10b700e3771fcda63608142bce93b608228583->setAlternatives($i9bd2c88ca2206122845c5e189e2b6856a2409e3a); $i5528ed14b056e3debe4695094269de3a98f76fe7[] = $ice10b700e3771fcda63608142bce93b608228583; } return $i5528ed14b056e3debe4695094269de3a98f76fe7; } public function getGate($i39404799a9171a012cb8b15cd8f27b347aa44a5f, $i30f20aafde612a957f7f966cb5b85e35782bc88a) { foreach (Mage::getSingleton('magesms/routes')->getCollection()->addFilter('type', $i30f20aafde612a957f7f966cb5b85e35782bc88a) as $ice10b700e3771fcda63608142bce93b608228583) { if (preg_match('/^'.$ice10b700e3771fcda63608142bce93b608228583->getArea().'/', $i39404799a9171a012cb8b15cd8f27b347aa44a5f)) { return $ice10b700e3771fcda63608142bce93b608228583; } } return Mage::getSingleton('magesms/routes'); } public function getInfo() { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = array('payment' => array(), 'dph' => null, 'sms' => array()); $i107ca03708f38d42ec504f51f62355fc45d87e69 = explode("%",$this->getData('info')); $i6048c89aa6f25872dad4b719d7b6d821cac48774 = explode("_",$i107ca03708f38d42ec504f51f62355fc45d87e69[0]); $i8e506de2f16bb925ad71fe7bfd4757aeec48a809 = explode(";",$i6048c89aa6f25872dad4b719d7b6d821cac48774[0]); $i9fb8b58187be1d03efeb03cbaa24d23651e7360e = explode(";",$i6048c89aa6f25872dad4b719d7b6d821cac48774[1]); $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][0] = explode(":",$i9fb8b58187be1d03efeb03cbaa24d23651e7360e[0]); $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][1] = explode(":",$i9fb8b58187be1d03efeb03cbaa24d23651e7360e[1]); $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][2] = explode(":",$i9fb8b58187be1d03efeb03cbaa24d23651e7360e[2]); $ia61712c27ea241bd7a543dc2b02ea572274d0322['dph'] = $i107ca03708f38d42ec504f51f62355fc45d87e69[1]; for($i039030c921e1cb0961cdfe7905a8744d586dd8f5=0;$i039030c921e1cb0961cdfe7905a8744d586dd8f5<count($i8e506de2f16bb925ad71fe7bfd4757aeec48a809);$i039030c921e1cb0961cdfe7905a8744d586dd8f5++){ $ie61606c2d8de1e806ab2adf90e40cc4bb671be43 = explode("|",$i8e506de2f16bb925ad71fe7bfd4757aeec48a809[$i039030c921e1cb0961cdfe7905a8744d586dd8f5]); if($ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==1 || $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==2 || $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==4) { $ia61712c27ea241bd7a543dc2b02ea572274d0322['sms'][0][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[0]][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[1]] = array( 'credit' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay1' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][0][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay2' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][1][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay3' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][2][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'unicode' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[4]); } if($ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==3) { $ia61712c27ea241bd7a543dc2b02ea572274d0322['sms'][1][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[0]][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[1]] = array( 'credit' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay1' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][0][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay2' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][1][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay3' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][2][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'unicode' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[4]); } if($ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==1 || $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==2 || $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==5) { $ia61712c27ea241bd7a543dc2b02ea572274d0322['sms'][2][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[0]][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[1]] = array( 'credit' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay1' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][0][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay2' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][1][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay3' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][2][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'unicode' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[4]); } if($ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==10) { $ia61712c27ea241bd7a543dc2b02ea572274d0322['sms'][3][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[0]][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[1]] = array( 'credit' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay1' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][0][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay2' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][1][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay3' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][2][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'unicode' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[4]); } } return $ia61712c27ea241bd7a543dc2b02ea572274d0322; } public function _beforeSave() { $i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18 = Mage::getModel('magesms/smsprofile'); $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'action=dost&username='.urlencode($i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->user).'&password='.urlencode($i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->passwd).'&area='.urlencode($this->getArea()).'&currency='.$i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->currency; $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getModel('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1 && !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { $this->setInfo($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['datasrc']); } return parent::_beforeSave(); } public function _beforeDelete() { $i9bd2c88ca2206122845c5e189e2b6856a2409e3a = Mage::getModel('magesms/routes_alternative')->getCollection()->addFieldToFilter('route_id', $this->getId()); foreach($i9bd2c88ca2206122845c5e189e2b6856a2409e3a as $ida3b491904fb073f446bf820cd55a0ff69b347d1) $ida3b491904fb073f446bf820cd55a0ff69b347d1->delete(); return parent::_beforeDelete(); } public function validate($ia2537252e3e7dbac0ba1e1693e8531161842da87 = false) { $ieeea3fa58a065e13acdb42aab551831a98e9444c = array(); $i0d09b2a4f282150bf47b02f9f3d82586fe313844 = Mage::helper('magesms'); if ($this->getSendertype() == Topefekt_Magesms_Model_Routes::SENDER_TEXT && $ia2537252e3e7dbac0ba1e1693e8531161842da87 !== false) { if (!Zend_Validate::is($this->getData('senderID'), 'NotEmpty')) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('possible characters: ').'a-z A-Z 0-9 _ .'; } elseif (!Mage::helper('magesms')->isTextSender($this->getData('senderID'))) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('possible characters: ').'a-z A-Z 0-9 _ .'; } } if (empty($ieeea3fa58a065e13acdb42aab551831a98e9444c)) { return true; } return $ieeea3fa58a065e13acdb42aab551831a98e9444c; } public function updatepricelist() { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = $this->getCollection(); foreach($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec as $ice10b700e3771fcda63608142bce93b608228583) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->save(); } return $this; } }
app/code/community/Topefekt/Magesms/Model/Routes/Alternative.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Routes_Alternative extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/routes_alternative'); } public function validate() { $ieeea3fa58a065e13acdb42aab551831a98e9444c = array(); $i0d09b2a4f282150bf47b02f9f3d82586fe313844 = Mage::helper('magesms'); if (!Zend_Validate::is($this->getData('textsender'), 'NotEmpty')) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('possible characters: ').'a-z A-Z 0-9 _ .'; } elseif (!Mage::helper('magesms')->isTextSender($this->getData('textsender'))) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('possible characters: ').'a-z A-Z 0-9 _ .'; } if (empty($ieeea3fa58a065e13acdb42aab551831a98e9444c)) { return true; } return $ieeea3fa58a065e13acdb42aab551831a98e9444c; } public function _beforeSave() { $ibdd27a8dd714410289189d318feb96fe6ed8e07f = $this->validate(); if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } return parent::_beforeSave(); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Routes_Alternative extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/routes_alternative'); } public function validate() { $ieeea3fa58a065e13acdb42aab551831a98e9444c = array(); $i0d09b2a4f282150bf47b02f9f3d82586fe313844 = Mage::helper('magesms'); if (!Zend_Validate::is($this->getData('textsender'), 'NotEmpty')) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('possible characters: ').'a-z A-Z 0-9 _ .'; } elseif (!Mage::helper('magesms')->isTextSender($this->getData('textsender'))) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('possible characters: ').'a-z A-Z 0-9 _ .'; } if (empty($ieeea3fa58a065e13acdb42aab551831a98e9444c)) { return true; } return $ieeea3fa58a065e13acdb42aab551831a98e9444c; } public function _beforeSave() { $ibdd27a8dd714410289189d318feb96fe6ed8e07f = $this->validate(); if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } return parent::_beforeSave(); } }
app/code/community/Topefekt/Magesms/Model/Sms.php CHANGED
@@ -10,7 +10,7 @@
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
- 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, 'admin_id' => 0, 'customer_id' => 0, 'recipient_name' => '', 'store_id' => 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("&amp;", "%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("&amp;", "%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; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 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, 'admin_id' => 0, 'customer_id' => 0, 'recipient_name' => '', 'store_id' => null )); parent::_construct(); } public function send() { ini_set('max_execution_time', 1200); $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(), 'dnd'=>array(), 'admin_id'=>array(), 'customer_id'=>array(), 'recipient' => 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['dnd'][] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getDnd(); $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("&amp;", "%26", $i42745015bca99637011d2ba8a559beb3a8b0961f); $i42745015bca99637011d2ba8a559beb3a8b0961f = str_replace("&", "%26", $i42745015bca99637011d2ba8a559beb3a8b0961f); $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d] = $i42745015bca99637011d2ba8a559beb3a8b0961f; } } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d++; } if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->simulatesms) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d = 0; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d47f954bfb9dd4be93a5c46b2c8260d3fbc064235 = Mage::getModel('core/resource_transaction'); 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]); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d && !($ibcdf76f8c9ddc330c79f805116a8bb146c43749d % 10)) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d47f954bfb9dd4be93a5c46b2c8260d3fbc064235->save(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d47f954bfb9dd4be93a5c46b2c8260d3fbc064235 = Mage::getModel('core/resource_transaction'); } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d47f954bfb9dd4be93a5c46b2c8260d3fbc064235->addObject($i5ee2fa256ff77dd811a9c1911f7563263a694e4b); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d++; } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d47f954bfb9dd4be93a5c46b2c8260d3fbc064235->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 { $ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310 = array('number'=>array(), 'isms'=>array(), 'sendertype'=>array(), 'senderID'=>array(), 'dnd'=>array(), 'admin_id'=>array(), 'customer_id'=>array(), 'recipient' => array(), 'data' => array()); foreach ($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['dnd'] as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d=>$i17dbc08b33778f0cb7ec2da29ca88fea8caf1bf1) { if ($i17dbc08b33778f0cb7ec2da29ca88fea8caf1bf1) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['number'][] = $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]; unset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['isms'][] = $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['isms'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]; unset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['isms'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['sendertype'][] = $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['sendertype'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]; unset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['sendertype'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['senderID'][] = $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]; unset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['dnd'][] = $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['dnd'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]; unset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['dnd'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['admin_id'][] = $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['admin_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]; unset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['admin_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['customer_id'][] = $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customer_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]; unset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customer_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['recipient'][] = $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]; unset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['data'][] = $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]; unset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]); } } $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2 = array_map('array_values', $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2); $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'])) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d = 0; foreach ($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'] as $ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= '&data'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d.'='.$ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d++; } } else { $i42745015bca99637011d2ba8a559beb3a8b0961f = html_entity_decode($ibcdf76f8c9ddc330c79f805116a8bb146c43749dcd14fe4ea296b55b8ecbf19d2fd7bfef3a511519, ENT_QUOTES, 'UTF-8'); $i42745015bca99637011d2ba8a559beb3a8b0961f = addslashes($i42745015bca99637011d2ba8a559beb3a8b0961f); $i42745015bca99637011d2ba8a559beb3a8b0961f = str_replace("&amp;", "%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 ($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['number'] as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039=>$ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b = Mage::getModel('magesms/smshistory'); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNumber('+'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['number'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setDate(date('Y-m-d H:i:s')); if (isset($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setText($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setTotal(Mage::helper('magesms')->countSms($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039], $this->getUnicode())); } $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::DND); if (isset($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['senderID'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSender($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['senderID'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); if (isset($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['admin_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setAdminId($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['admin_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setUnicode($this->getUnicode()); if (isset($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['customer_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setCustomerId($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['customer_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); if (isset($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['recipient'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setRecipient($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['recipient'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setUnicode($this->getUnicode()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setType($this->getType()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSubject($this->getSubject()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->save(); } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d = 0; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d47f954bfb9dd4be93a5c46b2c8260d3fbc064235 = Mage::getModel('core/resource_transaction'); 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; } if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d && !($ibcdf76f8c9ddc330c79f805116a8bb146c43749d % 10)) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d47f954bfb9dd4be93a5c46b2c8260d3fbc064235->save(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d47f954bfb9dd4be93a5c46b2c8260d3fbc064235 = Mage::getModel('core/resource_transaction'); } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d47f954bfb9dd4be93a5c46b2c8260d3fbc064235->addObject($i5ee2fa256ff77dd811a9c1911f7563263a694e4b); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d++; } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d47f954bfb9dd4be93a5c46b2c8260d3fbc064235->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']); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322['dnd'])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setDnd($ia61712c27ea241bd7a543dc2b02ea572274d0322['dnd']); $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/Model/Smshistory.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Smshistory extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/smshistory'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Smshistory extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/smshistory'); } }
app/code/community/Topefekt/Magesms/Model/Smsprofile.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Smsprofile extends Mage_Core_Model_Abstract { public $user; public $admins; public $credit; public $lang; public $currency = 'EUR'; public $_error; public function _construct() { parent::_construct(); $this->user = $this->loadUser(); $this->country = Mage::getModel('magesms/country')->getCollection(); $this->lang = Mage::helper('magesms')->detectLang(); if ($this->user->user) { $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getModel('magesms/api')->serverPost('action=info&username='.urlencode($this->user->user).'&password='.urlencode($this->user->passwd)); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] != 1 || empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { $this->user = Mage::getModel('magesms/smsuser'); $this->_error = $i55dd4e7042a1f9031b84f07f04c37165ce3d0720['error']; } else { $this->credit = $i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][0]; $this->admins = Mage::getModel('magesms/admins'); } foreach($this->country as $i037b855bc01175f2c77d5c3e19eda9a0003feff4) { if ($this->user->getCountry0() == $i037b855bc01175f2c77d5c3e19eda9a0003feff4->getName()) { $this->currency = $i037b855bc01175f2c77d5c3e19eda9a0003feff4->getCurrency(); break; } } } } public function loadUser() { $i77d22463fc16d92f418e384077adc971e57f8cd8 = Mage::getModel('magesms/smsuser')->getCollection()->setOrder('ID', 'DESC'); $i77d22463fc16d92f418e384077adc971e57f8cd8->getSelect()->limit(1); foreach ($i77d22463fc16d92f418e384077adc971e57f8cd8 as $if63180c174f143cf7a7c15db835b3c86c46375ad) { return $if63180c174f143cf7a7c15db835b3c86c46375ad; } return Mage::getModel('magesms/smsuser'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Smsprofile extends Mage_Core_Model_Abstract { public $user; public $admins; public $credit; public $lang; public $currency = 'EUR'; public $_error; public function _construct() { parent::_construct(); $this->user = $this->loadUser(); $this->country = Mage::getModel('magesms/country')->getCollection(); $this->lang = Mage::helper('magesms')->detectLang(); if ($this->user->user) { $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getModel('magesms/api')->serverPost('action=info&username='.urlencode($this->user->user).'&password='.urlencode($this->user->passwd)); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] != 1 || empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { $this->user = Mage::getModel('magesms/smsuser'); $this->_error = $i55dd4e7042a1f9031b84f07f04c37165ce3d0720['error']; } else { $this->credit = $i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][0]; $this->admins = Mage::getModel('magesms/admins'); } foreach($this->country as $i037b855bc01175f2c77d5c3e19eda9a0003feff4) { if ($this->user->getCountry0() == $i037b855bc01175f2c77d5c3e19eda9a0003feff4->getName()) { $this->currency = $i037b855bc01175f2c77d5c3e19eda9a0003feff4->getCurrency(); break; } } } } public function loadUser() { $i77d22463fc16d92f418e384077adc971e57f8cd8 = Mage::getModel('magesms/smsuser')->getCollection()->setOrder('ID', 'DESC'); $i77d22463fc16d92f418e384077adc971e57f8cd8->getSelect()->limit(1); foreach ($i77d22463fc16d92f418e384077adc971e57f8cd8 as $if63180c174f143cf7a7c15db835b3c86c46375ad) { return $if63180c174f143cf7a7c15db835b3c86c46375ad; } return Mage::getModel('magesms/smsuser'); } }
app/code/community/Topefekt/Magesms/Model/Smsuser.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Smsuser extends Mage_Core_Model_Abstract { private $v118dc8155ded98699a33772a9cd69781e93a4065; protected function _construct() { $this->_init('magesms/smsuser'); } public function validate() { $ieeea3fa58a065e13acdb42aab551831a98e9444c = array(); $i0d09b2a4f282150bf47b02f9f3d82586fe313844 = Mage::helper('magesms'); if ($this->getData('deliveryemail') && !Zend_Validate::is($this->getData('deliveryemail'), 'EmailAddress')) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('Invalid e-mail'); } if (!Zend_Validate::is($this->getData('email'), 'EmailAddress')) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('Invalid e-mail'); } if (!$this->getId() && $this->getData('agree', 0) != 1) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('You have to agree with licence terms.'); } if (empty($ieeea3fa58a065e13acdb42aab551831a98e9444c)) { return true; } return $ieeea3fa58a065e13acdb42aab551831a98e9444c; } public function _afterSave() { if ($this->getOrigData('country0') != $this->getCountry0()) { Mage::getModel('magesms/routes')->updatepricelist(); } return parent::_afterSave(); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Smsuser extends Mage_Core_Model_Abstract { private $v118dc8155ded98699a33772a9cd69781e93a4065; protected function _construct() { $this->_init('magesms/smsuser'); } public function validate() { $ieeea3fa58a065e13acdb42aab551831a98e9444c = array(); $i0d09b2a4f282150bf47b02f9f3d82586fe313844 = Mage::helper('magesms'); if ($this->getData('deliveryemail') && !Zend_Validate::is($this->getData('deliveryemail'), 'EmailAddress')) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('Invalid e-mail'); } if (!Zend_Validate::is($this->getData('email'), 'EmailAddress')) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('Invalid e-mail'); } if (!$this->getId() && $this->getData('agree', 0) != 1) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('You have to agree with licence terms.'); } if (empty($ieeea3fa58a065e13acdb42aab551831a98e9444c)) { return true; } return $ieeea3fa58a065e13acdb42aab551831a98e9444c; } public function _afterSave() { if ($this->getOrigData('country0') != $this->getCountry0()) { Mage::getModel('magesms/routes')->updatepricelist(); } return parent::_afterSave(); } }
app/code/community/Topefekt/Magesms/Model/System/Config/Lang.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_System_Config_Lang { public function toOptionArray() { return array( array( 'value' => 'cz', 'label' => 'Czech', ), array( 'value' => 'de', 'label' => 'German', ), array( 'value' => 'el', 'label' => 'Greek', ), array( 'value' => 'en', 'label' => 'English', ), array( 'value' => 'es', 'label' => 'Spanish', ), array( 'value' => 'fr', 'label' => 'French', ), array( 'value' => 'it', 'label' => 'Italian', ), array( 'value' => 'pl', 'label' => 'Polish', ), array( 'value' => 'pt', 'label' => 'Portuguese', ), array( 'value' => 'ru', 'label' => 'Russian', ), array( 'value' => 'sk', 'label' => 'Slovak', ), array( 'value' => 'sr', 'label' => 'Serbian', ), array( 'value' => 'sv', 'label' => 'Swedish', ), array( 'value' => 'tr', 'label' => 'Turkish', ), ); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_System_Config_Lang { public function toOptionArray() { return array( array( 'value' => 'cz', 'label' => 'Czech', ), array( 'value' => 'de', 'label' => 'German', ), array( 'value' => 'el', 'label' => 'Greek', ), array( 'value' => 'en', 'label' => 'English', ), array( 'value' => 'es', 'label' => 'Spanish', ), array( 'value' => 'fr', 'label' => 'French', ), array( 'value' => 'it', 'label' => 'Italian', ), array( 'value' => 'pl', 'label' => 'Polish', ), array( 'value' => 'pt', 'label' => 'Portuguese', ), array( 'value' => 'ru', 'label' => 'Russian', ), array( 'value' => 'sk', 'label' => 'Slovak', ), array( 'value' => 'sr', 'label' => 'Serbian', ), array( 'value' => 'sv', 'label' => 'Swedish', ), array( 'value' => 'tr', 'label' => 'Turkish', ), ); } }
app/code/community/Topefekt/Magesms/Model/Template.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Template extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/template'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Template extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/template'); } }
app/code/community/Topefekt/Magesms/Model/Textsender.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Textsender extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/textsender'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Textsender extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/textsender'); } }
app/code/community/Topefekt/Magesms/Model/Variables.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Model_Variables extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/variables'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Variables extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/variables'); } }
app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/AboutController.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Adminhtml_Magesms_AboutController extends Topefekt_Magesms_Controller_Action { public function preDispatch() { return Mage_Adminhtml_Controller_Action::preDispatch(); } public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Mage_Core_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/about.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/about') ->_title(Mage::helper('magesms')->__('About')); ; return $this; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 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_AboutController extends Topefekt_Magesms_Controller_Action { public function preDispatch() { return Mage_Adminhtml_Controller_Action::preDispatch(); } public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Mage_Core_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/about.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/about') ->_title(Mage::helper('magesms')->__('About')); ; return $this; } }
app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/AdminsmsController.php CHANGED
@@ -10,7 +10,7 @@
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
- class Topefekt_Magesms_Adminhtml_Magesms_AdminsmsController extends Topefekt_Magesms_Controller_Action { private $v2b483c223d472d1fb22c9823dcc35f84765b2c06 = array(); public function _construct() { parent::_construct(); $this->v2b483c223d472d1fb22c9823dcc35f84765b2c06 = new Varien_Data_Collection(); $this->v2b483c223d472d1fb22c9823dcc35f84765b2c06->addItem(new Varien_Object( array( 'group' => 'order_status', 'name' => 'Order status', 'icon' => 'magesms/AdminOrders.gif' ) ))->addItem(new Varien_Object( array( 'group' => 'order', 'name' => 'Order', 'icon' => 'magesms/AdminOrders.gif' ) ))->addItem(new Varien_Object( array( 'group' => 'account', 'name' => 'Account', 'icon' => 'magesms/AdminCustomers.gif' ) ))->addItem(new Varien_Object( array( 'group' => 'product', 'name' => 'Product', 'icon' => 'AdminCatalog.gif' ) ))->addItem(new Varien_Object( array( 'group' => 'contactform', 'name' => 'Contact form', 'icon' => 'AdminCatalog.gif' ) )); } public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/adminsms.phtml') ); foreach ($this->v2b483c223d472d1fb22c9823dcc35f84765b2c06 as $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc) { $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc->setHooks(Mage::helper('magesms')->getHooks($i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc['group'], 'admins')); } $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = new Varien_Data_Collection(); Mage::dispatchEvent('topefekt_magesms_adminsms_groups', array('groups' => $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a)); foreach ($ia8a35a47a8e61218e15d1a33dac64bdc2449c01a as $i4abcdb69150d2b99477ddace90c2020fb244c4f6) { if ($i4abcdb69150d2b99477ddace90c2020fb244c4f6->getGroup() && !$this->v2b483c223d472d1fb22c9823dcc35f84765b2c06->getItemByColumnValue('group', $i4abcdb69150d2b99477ddace90c2020fb244c4f6->getGroup())) { $this->v2b483c223d472d1fb22c9823dcc35f84765b2c06->addItem($i4abcdb69150d2b99477ddace90c2020fb244c4f6); } else { foreach($i4abcdb69150d2b99477ddace90c2020fb244c4f6->getHooks() as $i42ee48f418943c9662de0976069476c7dc8f620d) { if ($i42ee48f418943c9662de0976069476c7dc8f620d->getName() && ($i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc = $this->v2b483c223d472d1fb22c9823dcc35f84765b2c06->getItemByColumnValue('group', $i42ee48f418943c9662de0976069476c7dc8f620d->getGroup()))) { $ib621bf9fa69ea2cdc5a9bc8679d915479caec16a = $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc->getHooks(); $ib621bf9fa69ea2cdc5a9bc8679d915479caec16a[$i42ee48f418943c9662de0976069476c7dc8f620d->getName()] = $i42ee48f418943c9662de0976069476c7dc8f620d; $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc->setHooks($ib621bf9fa69ea2cdc5a9bc8679d915479caec16a); } } } } $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setGroups($this->v2b483c223d472d1fb22c9823dcc35f84765b2c06); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } public function saveunicodeAction() { $i7137e40370cf1c5ccf937060891613788203e2d6 = 'default'; $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = Mage::getSingleton('magesms/hooks_unicode') ->getCollection() ->addFilter('area', $i7137e40370cf1c5ccf937060891613788203e2d6) ->addFilter('type', 'admin') ->getFirstItem(); if (!count($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getData())) { $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = Mage::getSingleton('magesms/hooks_unicode'); $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->setArea($i7137e40370cf1c5ccf937060891613788203e2d6); $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->setType('admin'); $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('*/*/'); return $this; } public function savehookAction() { $i30f20aafde612a957f7f966cb5b85e35782bc88a = $this->getRequest()->getParam('type'); $i2bd9743336318d0e14be0600c9129730279505dd = $this->getRequest()->getParam('name'); $i24273814df383b4a6926acc1db1a788b12f5a411 = $this->getRequest()->getParam('text' , ''); $id2202a8a92e3022b2b00717b92bc918373dc2edc = $this->getRequest()->getParam('plugin'); if ($i30f20aafde612a957f7f966cb5b85e35782bc88a && $i2bd9743336318d0e14be0600c9129730279505dd && $i24273814df383b4a6926acc1db1a788b12f5a411) { if ($id2202a8a92e3022b2b00717b92bc918373dc2edc) { Mage::dispatchEvent('topefekt_magesms_adminsms_save'); } else { $if739aceffec69fa2733946a3d319defaa354082d = Mage::getSingleton('magesms/hooks_'.$i30f20aafde612a957f7f966cb5b85e35782bc88a) ->getCollection() ->addFilter('name', $i2bd9743336318d0e14be0600c9129730279505dd); foreach($if739aceffec69fa2733946a3d319defaa354082d as $i42ee48f418943c9662de0976069476c7dc8f620d) { $i42ee48f418943c9662de0976069476c7dc8f620d->delete(); } } foreach($this->getRequest()->getParams() as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$iacbd1c78463510856e506611fe14b5e1173581a6) { if (strpos($i670253c23c6fcba76bc4256a88fdd8fbc1041039, 'active_') === 0) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = explode('_', $i670253c23c6fcba76bc4256a88fdd8fbc1041039); $i42ee48f418943c9662de0976069476c7dc8f620d = Mage::getModel('magesms/hooks_'.$i30f20aafde612a957f7f966cb5b85e35782bc88a) ->setName($i2bd9743336318d0e14be0600c9129730279505dd) ->setSmstext($i24273814df383b4a6926acc1db1a788b12f5a411) ->setAdminId($ia61712c27ea241bd7a543dc2b02ea572274d0322[2]) ->setStoreGroupId($ia61712c27ea241bd7a543dc2b02ea572274d0322[3]) ->save(); } else { continue; } } Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('Text of SMS was saved.')); } $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = array('_fragment' => $i2bd9743336318d0e14be0600c9129730279505dd); $this->_redirect('*/*/', $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a); return $this; } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/adminsms') ->_title(Mage::helper('magesms')->__('Admin SMS')) ; return $this; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 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_AdminsmsController extends Topefekt_Magesms_Controller_Action { private $v2b483c223d472d1fb22c9823dcc35f84765b2c06 = array(); public function _construct() { parent::_construct(); $this->v2b483c223d472d1fb22c9823dcc35f84765b2c06 = new Varien_Data_Collection(); $this->v2b483c223d472d1fb22c9823dcc35f84765b2c06->addItem(new Varien_Object( array( 'group' => 'order_status', 'name' => 'Order status', 'icon' => 'magesms/AdminOrders.gif' ) ))->addItem(new Varien_Object( array( 'group' => 'order', 'name' => 'Order', 'icon' => 'magesms/AdminOrders.gif' ) ))->addItem(new Varien_Object( array( 'group' => 'account', 'name' => 'Account', 'icon' => 'magesms/AdminCustomers.gif' ) ))->addItem(new Varien_Object( array( 'group' => 'product', 'name' => 'Product', 'icon' => 'AdminCatalog.gif' ) ))->addItem(new Varien_Object( array( 'group' => 'contactform', 'name' => 'Contact form', 'icon' => 'AdminCatalog.gif' ) )); } public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/adminsms.phtml') ); foreach ($this->v2b483c223d472d1fb22c9823dcc35f84765b2c06 as $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc) { $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc->setHooks(Mage::helper('magesms')->getHooks($i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc['group'], 'admins')); } $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = new Varien_Data_Collection(); Mage::dispatchEvent('topefekt_magesms_adminsms_groups', array('groups' => $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a)); foreach ($ia8a35a47a8e61218e15d1a33dac64bdc2449c01a as $i4abcdb69150d2b99477ddace90c2020fb244c4f6) { if ($i4abcdb69150d2b99477ddace90c2020fb244c4f6->getGroup() && !$this->v2b483c223d472d1fb22c9823dcc35f84765b2c06->getItemByColumnValue('group', $i4abcdb69150d2b99477ddace90c2020fb244c4f6->getGroup())) { $this->v2b483c223d472d1fb22c9823dcc35f84765b2c06->addItem($i4abcdb69150d2b99477ddace90c2020fb244c4f6); } else { foreach($i4abcdb69150d2b99477ddace90c2020fb244c4f6->getHooks() as $i42ee48f418943c9662de0976069476c7dc8f620d) { if ($i42ee48f418943c9662de0976069476c7dc8f620d->getName() && ($i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc = $this->v2b483c223d472d1fb22c9823dcc35f84765b2c06->getItemByColumnValue('group', $i42ee48f418943c9662de0976069476c7dc8f620d->getGroup()))) { $ib621bf9fa69ea2cdc5a9bc8679d915479caec16a = $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc->getHooks(); $ib621bf9fa69ea2cdc5a9bc8679d915479caec16a[$i42ee48f418943c9662de0976069476c7dc8f620d->getName()] = $i42ee48f418943c9662de0976069476c7dc8f620d; $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc->setHooks($ib621bf9fa69ea2cdc5a9bc8679d915479caec16a); } } } } $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setGroups($this->v2b483c223d472d1fb22c9823dcc35f84765b2c06); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } public function saveunicodeAction() { $i7137e40370cf1c5ccf937060891613788203e2d6 = 'default'; $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = Mage::getSingleton('magesms/hooks_unicode') ->getCollection() ->addFilter('area', $i7137e40370cf1c5ccf937060891613788203e2d6) ->addFilter('type', 'admin') ->getFirstItem(); if (!count($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getData())) { $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = Mage::getSingleton('magesms/hooks_unicode'); $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->setArea($i7137e40370cf1c5ccf937060891613788203e2d6); $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->setType('admin'); $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('*/*/'); return $this; } public function savehookAction() { $i30f20aafde612a957f7f966cb5b85e35782bc88a = $this->getRequest()->getParam('type'); $i2bd9743336318d0e14be0600c9129730279505dd = $this->getRequest()->getParam('name'); $i24273814df383b4a6926acc1db1a788b12f5a411 = $this->getRequest()->getParam('text' , ''); $id2202a8a92e3022b2b00717b92bc918373dc2edc = $this->getRequest()->getParam('plugin'); if ($i30f20aafde612a957f7f966cb5b85e35782bc88a && $i2bd9743336318d0e14be0600c9129730279505dd && $i24273814df383b4a6926acc1db1a788b12f5a411) { if ($id2202a8a92e3022b2b00717b92bc918373dc2edc) { Mage::dispatchEvent('topefekt_magesms_adminsms_save'); } else { $if739aceffec69fa2733946a3d319defaa354082d = Mage::getSingleton('magesms/hooks_'.$i30f20aafde612a957f7f966cb5b85e35782bc88a) ->getCollection() ->addFilter('name', $i2bd9743336318d0e14be0600c9129730279505dd); foreach($if739aceffec69fa2733946a3d319defaa354082d as $i42ee48f418943c9662de0976069476c7dc8f620d) { $i42ee48f418943c9662de0976069476c7dc8f620d->delete(); } foreach($this->getRequest()->getParams() as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$iacbd1c78463510856e506611fe14b5e1173581a6) { if (strpos($i670253c23c6fcba76bc4256a88fdd8fbc1041039, 'active_') === 0) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = explode('_', $i670253c23c6fcba76bc4256a88fdd8fbc1041039); $i42ee48f418943c9662de0976069476c7dc8f620d = Mage::getModel('magesms/hooks_'.$i30f20aafde612a957f7f966cb5b85e35782bc88a) ->setName($i2bd9743336318d0e14be0600c9129730279505dd) ->setSmstext($i24273814df383b4a6926acc1db1a788b12f5a411) ->setAdminId($ia61712c27ea241bd7a543dc2b02ea572274d0322[2]) ->setStoreGroupId($ia61712c27ea241bd7a543dc2b02ea572274d0322[3]) ->save(); } else { continue; } } } Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('Text of SMS was saved.')); } $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = array('_fragment' => $i2bd9743336318d0e14be0600c9129730279505dd); $this->_redirect('*/*/', $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a); return $this; } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/adminsms') ->_title(Mage::helper('magesms')->__('Admin SMS')) ; return $this; } }
app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/AnswersController.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Adminhtml_Magesms_AnswersController extends Topefekt_Magesms_Controller_Action { public function indexAction() { $this->_initAction(); $iea2d876101fbc4dc03450ed5474bbd8a6fb905a2 = Mage::helper('adminhtml')->prepareFilterString($this->getRequest()->getParam('filter')); $iea2d876101fbc4dc03450ed5474bbd8a6fb905a2 = $this->_filterDates($iea2d876101fbc4dc03450ed5474bbd8a6fb905a2, array('reg_from', 'reg_to', 'birth_from', 'birth_to')); $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = new Varien_Object(); foreach ($iea2d876101fbc4dc03450ed5474bbd8a6fb905a2 as $i670253c23c6fcba76bc4256a88fdd8fbc1041039 => $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { if (!empty($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89)) { $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a->setData($i670253c23c6fcba76bc4256a88fdd8fbc1041039, $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); } } $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock('magesms/answers'); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setFilterData($ia8a35a47a8e61218e15d1a33dac64bdc2449c01a); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } public function markAsReadAction() { if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $this->getRequest()->getParam('id')) { $i0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('adminhtml/session'); $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd = Mage::getModel('magesms/answers') ->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); if (!$i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd->getId()) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addError(Mage::helper('magesms')->__('Unable to proceed. Please, try again.')); $this->_redirect('*/*/'); return ; } try { $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd->setProhlednuto(1) ->save(); $i0e3e80cee9c51f140b823db0b7df66493acca657->addSuccess(Mage::helper('magesms')->__('The message has been marked as read.')); } catch (Mage_Core_Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addException($i8c174347956f0a76258a09557543e84f88beb4a0, Mage::helper('magesms')->__('An error occurred while marking notification as read.')); } $this->_redirectReferer(); return; } $this->_redirect('*/*/'); } public function massMarkAsReadAction() { $i0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('adminhtml/session'); $iea1c44f6137731e1b13c494f784074e6a133577a = $this->getRequest()->getParam('answers'); if (!is_array($iea1c44f6137731e1b13c494f784074e6a133577a)) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addError(Mage::helper('magesms')->__('Please select messages.')); } else { try { foreach ($iea1c44f6137731e1b13c494f784074e6a133577a as $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538) { $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd = Mage::getModel('magesms/answers') ->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); if ($i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd->getId()) { $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd->setProhlednuto(1) ->save(); } } $this->_getSession()->addSuccess( Mage::helper('magesms')->__('Total of %d record(s) have been marked as read.', count($iea1c44f6137731e1b13c494f784074e6a133577a)) ); } catch (Mage_Core_Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addException($i8c174347956f0a76258a09557543e84f88beb4a0, Mage::helper('magesms')->__('An error occurred while marking the messages as read.')); } } $this->_redirect('*/*/'); } public function removeAction() { if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $this->getRequest()->getParam('id')) { $i0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('adminhtml/session'); $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd = Mage::getModel('magesms/answers') ->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); if (!$i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd->getId()) { $this->_redirect('*/*/'); return ; } try { $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd->delete(); $i0e3e80cee9c51f140b823db0b7df66493acca657->addSuccess(Mage::helper('magesms')->__('The message has been removed.')); } catch (Mage_Core_Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addException($i8c174347956f0a76258a09557543e84f88beb4a0, Mage::helper('magesms')->__('An error occurred while removing the message.')); } $this->_redirect('*/*/'); return; } $this->_redirect('*/*/'); } public function massRemoveAction() { $i0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('adminhtml/session'); $iea1c44f6137731e1b13c494f784074e6a133577a = $this->getRequest()->getParam('answers'); if (!is_array($iea1c44f6137731e1b13c494f784074e6a133577a)) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addError(Mage::helper('magesms')->__('Please select messages.')); } else { try { foreach ($iea1c44f6137731e1b13c494f784074e6a133577a as $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538) { $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd = Mage::getModel('magesms/answers') ->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); if ($i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd->getId()) { $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd->delete(); } } $this->_getSession()->addSuccess( Mage::helper('magesms')->__('Total of %d record(s) have been removed.', count($iea1c44f6137731e1b13c494f784074e6a133577a)) ); } catch (Mage_Core_Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addException($i8c174347956f0a76258a09557543e84f88beb4a0, Mage::helper('magesms')->__('An error occurred while removing messages.')); } } $this->_redirectReferer(); } public function exportCsvAction() { $i76341ee5d8e86027e6fa2d5f6480a85ca10cc6da = 'answers.csv'; $i42cf41da37138d64d37b0778e6561aab5e1239d6 = $this->getLayout()->createBlock('magesms/answers_grid'); $this->_prepareDownloadResponse($i76341ee5d8e86027e6fa2d5f6480a85ca10cc6da, $i42cf41da37138d64d37b0778e6561aab5e1239d6->getCsvFile()); } public function exportExcelAction() { $i76341ee5d8e86027e6fa2d5f6480a85ca10cc6da = 'answers.xml'; $i42cf41da37138d64d37b0778e6561aab5e1239d6 = $this->getLayout()->createBlock('magesms/answers_grid'); $this->_prepareDownloadResponse($i76341ee5d8e86027e6fa2d5f6480a85ca10cc6da, $i42cf41da37138d64d37b0778e6561aab5e1239d6->getExcelFile($i76341ee5d8e86027e6fa2d5f6480a85ca10cc6da)); } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/answers') ->_title(Mage::helper('magesms')->__('SMS Answers')) ; return $this; } protected function _isAllowed() { switch ($this->getRequest()->getActionName()) { case 'markAsRead': $i72f3c526b8abf631fb79dfaa1f2cc1e7ee90ca3e = 'magesms/answers/mark_as_read'; break; case 'massMarkAsRead': $i72f3c526b8abf631fb79dfaa1f2cc1e7ee90ca3e = 'magesms/answers/mark_as_read'; break; case 'remove': $i72f3c526b8abf631fb79dfaa1f2cc1e7ee90ca3e = 'magesms/answers/remove'; break; case 'massRemove': $i72f3c526b8abf631fb79dfaa1f2cc1e7ee90ca3e = 'magesms/answers/remove'; break; default: $i72f3c526b8abf631fb79dfaa1f2cc1e7ee90ca3e = 'magesms/answers'; } return Mage::getSingleton('admin/session')->isAllowed($i72f3c526b8abf631fb79dfaa1f2cc1e7ee90ca3e); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 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_AnswersController extends Topefekt_Magesms_Controller_Action { public function indexAction() { $this->_initAction(); $iea2d876101fbc4dc03450ed5474bbd8a6fb905a2 = Mage::helper('adminhtml')->prepareFilterString($this->getRequest()->getParam('filter')); $iea2d876101fbc4dc03450ed5474bbd8a6fb905a2 = $this->_filterDates($iea2d876101fbc4dc03450ed5474bbd8a6fb905a2, array('reg_from', 'reg_to', 'birth_from', 'birth_to')); $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = new Varien_Object(); foreach ($iea2d876101fbc4dc03450ed5474bbd8a6fb905a2 as $i670253c23c6fcba76bc4256a88fdd8fbc1041039 => $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { if (!empty($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89)) { $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a->setData($i670253c23c6fcba76bc4256a88fdd8fbc1041039, $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); } } $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock('magesms/answers'); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setFilterData($ia8a35a47a8e61218e15d1a33dac64bdc2449c01a); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } public function markAsReadAction() { if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $this->getRequest()->getParam('id')) { $i0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('adminhtml/session'); $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd = Mage::getModel('magesms/answers') ->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); if (!$i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd->getId()) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addError(Mage::helper('magesms')->__('Unable to proceed. Please, try again.')); $this->_redirect('*/*/'); return ; } try { $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd->setProhlednuto(1) ->save(); $i0e3e80cee9c51f140b823db0b7df66493acca657->addSuccess(Mage::helper('magesms')->__('The message has been marked as read.')); } catch (Mage_Core_Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addException($i8c174347956f0a76258a09557543e84f88beb4a0, Mage::helper('magesms')->__('An error occurred while marking notification as read.')); } $this->_redirectReferer(); return; } $this->_redirect('*/*/'); } public function massMarkAsReadAction() { $i0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('adminhtml/session'); $iea1c44f6137731e1b13c494f784074e6a133577a = $this->getRequest()->getParam('answers'); if (!is_array($iea1c44f6137731e1b13c494f784074e6a133577a)) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addError(Mage::helper('magesms')->__('Please select messages.')); } else { try { foreach ($iea1c44f6137731e1b13c494f784074e6a133577a as $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538) { $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd = Mage::getModel('magesms/answers') ->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); if ($i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd->getId()) { $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd->setProhlednuto(1) ->save(); } } $this->_getSession()->addSuccess( Mage::helper('magesms')->__('Total of %d record(s) have been marked as read.', count($iea1c44f6137731e1b13c494f784074e6a133577a)) ); } catch (Mage_Core_Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addException($i8c174347956f0a76258a09557543e84f88beb4a0, Mage::helper('magesms')->__('An error occurred while marking the messages as read.')); } } $this->_redirect('*/*/'); } public function removeAction() { if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $this->getRequest()->getParam('id')) { $i0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('adminhtml/session'); $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd = Mage::getModel('magesms/answers') ->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); if (!$i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd->getId()) { $this->_redirect('*/*/'); return ; } try { $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd->delete(); $i0e3e80cee9c51f140b823db0b7df66493acca657->addSuccess(Mage::helper('magesms')->__('The message has been removed.')); } catch (Mage_Core_Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addException($i8c174347956f0a76258a09557543e84f88beb4a0, Mage::helper('magesms')->__('An error occurred while removing the message.')); } $this->_redirect('*/*/'); return; } $this->_redirect('*/*/'); } public function massRemoveAction() { $i0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('adminhtml/session'); $iea1c44f6137731e1b13c494f784074e6a133577a = $this->getRequest()->getParam('answers'); if (!is_array($iea1c44f6137731e1b13c494f784074e6a133577a)) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addError(Mage::helper('magesms')->__('Please select messages.')); } else { try { foreach ($iea1c44f6137731e1b13c494f784074e6a133577a as $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538) { $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd = Mage::getModel('magesms/answers') ->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); if ($i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd->getId()) { $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd->delete(); } } $this->_getSession()->addSuccess( Mage::helper('magesms')->__('Total of %d record(s) have been removed.', count($iea1c44f6137731e1b13c494f784074e6a133577a)) ); } catch (Mage_Core_Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addException($i8c174347956f0a76258a09557543e84f88beb4a0, Mage::helper('magesms')->__('An error occurred while removing messages.')); } } $this->_redirectReferer(); } public function exportCsvAction() { $i76341ee5d8e86027e6fa2d5f6480a85ca10cc6da = 'answers.csv'; $i42cf41da37138d64d37b0778e6561aab5e1239d6 = $this->getLayout()->createBlock('magesms/answers_grid'); $this->_prepareDownloadResponse($i76341ee5d8e86027e6fa2d5f6480a85ca10cc6da, $i42cf41da37138d64d37b0778e6561aab5e1239d6->getCsvFile()); } public function exportExcelAction() { $i76341ee5d8e86027e6fa2d5f6480a85ca10cc6da = 'answers.xml'; $i42cf41da37138d64d37b0778e6561aab5e1239d6 = $this->getLayout()->createBlock('magesms/answers_grid'); $this->_prepareDownloadResponse($i76341ee5d8e86027e6fa2d5f6480a85ca10cc6da, $i42cf41da37138d64d37b0778e6561aab5e1239d6->getExcelFile($i76341ee5d8e86027e6fa2d5f6480a85ca10cc6da)); } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/answers') ->_title(Mage::helper('magesms')->__('SMS Answers')) ; return $this; } protected function _isAllowed() { switch ($this->getRequest()->getActionName()) { case 'markAsRead': $i72f3c526b8abf631fb79dfaa1f2cc1e7ee90ca3e = 'magesms/answers/mark_as_read'; break; case 'massMarkAsRead': $i72f3c526b8abf631fb79dfaa1f2cc1e7ee90ca3e = 'magesms/answers/mark_as_read'; break; case 'remove': $i72f3c526b8abf631fb79dfaa1f2cc1e7ee90ca3e = 'magesms/answers/remove'; break; case 'massRemove': $i72f3c526b8abf631fb79dfaa1f2cc1e7ee90ca3e = 'magesms/answers/remove'; break; default: $i72f3c526b8abf631fb79dfaa1f2cc1e7ee90ca3e = 'magesms/answers'; } return Mage::getSingleton('admin/session')->isAllowed($i72f3c526b8abf631fb79dfaa1f2cc1e7ee90ca3e); } }
app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/CustomersmsController.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Adminhtml_Magesms_CustomersmsController extends Topefekt_Magesms_Controller_Action { private $v2b483c223d472d1fb22c9823dcc35f84765b2c06 = array(); public function _construct() { $this->v2b483c223d472d1fb22c9823dcc35f84765b2c06 = new Varien_Data_Collection(); $this->v2b483c223d472d1fb22c9823dcc35f84765b2c06->addItem(new Varien_Object( array( 'group' => 'order_status', 'name' => 'Order status', 'icon' => 'magesms/AdminOrders.gif' ) ))->addItem(new Varien_Object( array( 'group' => 'order', 'name' => 'Order', 'icon' => 'magesms/AdminOrders.gif' ) ))->addItem(new Varien_Object( array( 'group' => 'account', 'name' => 'Account', 'icon' => 'magesms/AdminCustomers.gif' ) )); parent::_construct(); } public function indexAction() { $i7137e40370cf1c5ccf937060891613788203e2d6 = $this->getRequest()->getParam('mutation', 'default'); $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/customersms.phtml') ); foreach ($this->v2b483c223d472d1fb22c9823dcc35f84765b2c06 as $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc) { $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc->setHooks(Mage::helper('magesms')->getHooks($i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc['group'], 'customers', $i7137e40370cf1c5ccf937060891613788203e2d6)); } $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = new Varien_Data_Collection(); Mage::dispatchEvent('topefekt_magesms_customersms_groups', array('groups' => $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a)); foreach ($ia8a35a47a8e61218e15d1a33dac64bdc2449c01a as $i4abcdb69150d2b99477ddace90c2020fb244c4f6) { if ($i4abcdb69150d2b99477ddace90c2020fb244c4f6->getGroup() && !$this->v2b483c223d472d1fb22c9823dcc35f84765b2c06->getItemByColumnValue('group', $i4abcdb69150d2b99477ddace90c2020fb244c4f6->getGroup())) { $this->v2b483c223d472d1fb22c9823dcc35f84765b2c06->addItem($i4abcdb69150d2b99477ddace90c2020fb244c4f6); } else { foreach($i4abcdb69150d2b99477ddace90c2020fb244c4f6->getHooks() as $i42ee48f418943c9662de0976069476c7dc8f620d) { if ($i42ee48f418943c9662de0976069476c7dc8f620d->getName() && ($i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc = $this->v2b483c223d472d1fb22c9823dcc35f84765b2c06->getItemByColumnValue('group', $i42ee48f418943c9662de0976069476c7dc8f620d->getGroup()))) { $ib621bf9fa69ea2cdc5a9bc8679d915479caec16a = $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc->getHooks(); $ib621bf9fa69ea2cdc5a9bc8679d915479caec16a[$i42ee48f418943c9662de0976069476c7dc8f620d->getName()] = $i42ee48f418943c9662de0976069476c7dc8f620d; $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc->setHooks($ib621bf9fa69ea2cdc5a9bc8679d915479caec16a); } } } } $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setGroups($this->v2b483c223d472d1fb22c9823dcc35f84765b2c06); $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'); $id2202a8a92e3022b2b00717b92bc918373dc2edc = $this->getRequest()->getParam('plugin'); $i24273814df383b4a6926acc1db1a788b12f5a411 = $this->getRequest()->getParam('text' , ''); if ($i30f20aafde612a957f7f966cb5b85e35782bc88a && $i2bd9743336318d0e14be0600c9129730279505dd && $i24273814df383b4a6926acc1db1a788b12f5a411) { if ($id2202a8a92e3022b2b00717b92bc918373dc2edc) { Mage::dispatchEvent('topefekt_magesms_customersms_save'); } else { $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; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 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 { private $v2b483c223d472d1fb22c9823dcc35f84765b2c06 = array(); public function _construct() { $this->v2b483c223d472d1fb22c9823dcc35f84765b2c06 = new Varien_Data_Collection(); $this->v2b483c223d472d1fb22c9823dcc35f84765b2c06->addItem(new Varien_Object( array( 'group' => 'order_status', 'name' => 'Order status', 'icon' => 'magesms/AdminOrders.gif' ) ))->addItem(new Varien_Object( array( 'group' => 'order', 'name' => 'Order', 'icon' => 'magesms/AdminOrders.gif' ) ))->addItem(new Varien_Object( array( 'group' => 'account', 'name' => 'Account', 'icon' => 'magesms/AdminCustomers.gif' ) )); parent::_construct(); } public function indexAction() { $i7137e40370cf1c5ccf937060891613788203e2d6 = $this->getRequest()->getParam('mutation', 'default'); $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/customersms.phtml') ); foreach ($this->v2b483c223d472d1fb22c9823dcc35f84765b2c06 as $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc) { $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc->setHooks(Mage::helper('magesms')->getHooks($i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc['group'], 'customers', $i7137e40370cf1c5ccf937060891613788203e2d6)); } $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = new Varien_Data_Collection(); Mage::dispatchEvent('topefekt_magesms_customersms_groups', array('groups' => $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a)); foreach ($ia8a35a47a8e61218e15d1a33dac64bdc2449c01a as $i4abcdb69150d2b99477ddace90c2020fb244c4f6) { if ($i4abcdb69150d2b99477ddace90c2020fb244c4f6->getGroup() && !$this->v2b483c223d472d1fb22c9823dcc35f84765b2c06->getItemByColumnValue('group', $i4abcdb69150d2b99477ddace90c2020fb244c4f6->getGroup())) { $this->v2b483c223d472d1fb22c9823dcc35f84765b2c06->addItem($i4abcdb69150d2b99477ddace90c2020fb244c4f6); } else { foreach($i4abcdb69150d2b99477ddace90c2020fb244c4f6->getHooks() as $i42ee48f418943c9662de0976069476c7dc8f620d) { if ($i42ee48f418943c9662de0976069476c7dc8f620d->getName() && ($i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc = $this->v2b483c223d472d1fb22c9823dcc35f84765b2c06->getItemByColumnValue('group', $i42ee48f418943c9662de0976069476c7dc8f620d->getGroup()))) { $ib621bf9fa69ea2cdc5a9bc8679d915479caec16a = $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc->getHooks(); $ib621bf9fa69ea2cdc5a9bc8679d915479caec16a[$i42ee48f418943c9662de0976069476c7dc8f620d->getName()] = $i42ee48f418943c9662de0976069476c7dc8f620d; $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc->setHooks($ib621bf9fa69ea2cdc5a9bc8679d915479caec16a); } } } } $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setGroups($this->v2b483c223d472d1fb22c9823dcc35f84765b2c06); $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'); $id2202a8a92e3022b2b00717b92bc918373dc2edc = $this->getRequest()->getParam('plugin'); $i24273814df383b4a6926acc1db1a788b12f5a411 = $this->getRequest()->getParam('text' , ''); if ($i30f20aafde612a957f7f966cb5b85e35782bc88a && $i2bd9743336318d0e14be0600c9129730279505dd && $i24273814df383b4a6926acc1db1a788b12f5a411) { if ($id2202a8a92e3022b2b00717b92bc918373dc2edc) { Mage::dispatchEvent('topefekt_magesms_customersms_save'); } else { $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
@@ -10,7 +10,7 @@
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
  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; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 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
@@ -10,10 +10,10 @@
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
- class Topefekt_Magesms_Adminhtml_Magesms_MarketingController extends Topefekt_Magesms_Controller_Template_Action { private $vdc6442a8b0624835ef0da7b7fcc0ac1da4d6d2da = array('type', 'country', 'group', 'gender', 'newsletter', 'website', 'firstname', 'lastname', 'city', 'register', 'birthday', 'birthdayall'); protected $_filters; protected $_collection; public function preDispatch() { parent::preDispatch(); $ia309f32db02d9de4490b0dcce975d0ccbce2c215 = Mage::helper('adminhtml')->prepareFilterString($this->getRequest()->getParam('sms')); $ia309f32db02d9de4490b0dcce975d0ccbce2c215 = $this->_filterDates($ia309f32db02d9de4490b0dcce975d0ccbce2c215, array('datumodesl')); $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = new Varien_Object(); foreach ($ia309f32db02d9de4490b0dcce975d0ccbce2c215 as $i670253c23c6fcba76bc4256a88fdd8fbc1041039 => $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { if (!empty($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) || is_numeric($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89)) { $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a->setData($i670253c23c6fcba76bc4256a88fdd8fbc1041039, $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); } } $this->_smsData = $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a; return $this; return $this; } private function f6d43ff809a46f71c1e634564f2b37e20a99bbb9c() { $this->_filters = Mage::getModel('magesms/marketing_filter_collection'); $this->_filters->addFilters($this->vdc6442a8b0624835ef0da7b7fcc0ac1da4d6d2da); Mage::register('magesms_marketing_filters', $this->_filters); $this->_collection = $this->_getCollection(); $this->_filters->setCollection($this->_collection); $this->_filters->setFilters($this->_collection); Mage::register('magesms_marketing_collection', $this->_collection); } public function indexAction() { $this->_initAction(); $this->f6d43ff809a46f71c1e634564f2b37e20a99bbb9c(); $i5509ac707290a86add15ab0ce4da982d395f4c4f = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/marketing.phtml') ); $i5509ac707290a86add15ab0ce4da982d395f4c4f->setSmsData($this->_smsData ? $this->_smsData : $this->getRequest()->getParams()); $i5509ac707290a86add15ab0ce4da982d395f4c4f->setFilterData($this->_filterData); $i7d411c0cc32cdb65ec82b9e8d79aa996946f553842c5963b49dec2d3a886ec5045e3b8e035c239f = '{customer_firstname}, {customer_lastname}, {customer_email}, {customer_phone}, {shop_name}, {shop_domain}, {shop_email}, {shop_phone}'; $i5509ac707290a86add15ab0ce4da982d395f4c4f->setNotice($i7d411c0cc32cdb65ec82b9e8d79aa996946f553842c5963b49dec2d3a886ec5045e3b8e035c239f); $i5509ac707290a86add15ab0ce4da982d395f4c4f->setTranslate(Mage::helper('magesms')->hookVariablesJS($i7d411c0cc32cdb65ec82b9e8d79aa996946f553842c5963b49dec2d3a886ec5045e3b8e035c239f)); $i5509ac707290a86add15ab0ce4da982d395f4c4f->setCollection($this->_collection); $this->getLayout()->getBlock('content')->append($i5509ac707290a86add15ab0ce4da982d395f4c4f); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = $this->getLayout()->createBlock('magesms/marketing_form'); $this->getLayout()->getBlock('content')->append($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a); $i21e55df616c305955791876c1eb4da83448beba2 = $this->_getBlockCustomer(); $this->getLayout()->getBlock('content')->append($i21e55df616c305955791876c1eb4da83448beba2); $i2ca8461421e371a2dc8ff5b5c9a248f5fb0a6dbc = $this->_getBlockDeleted(); $this->getLayout()->getBlock('content')->append($i2ca8461421e371a2dc8ff5b5c9a248f5fb0a6dbc); $this->renderLayout(); return $this; } public function filterAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ($this->getRequest()->getParams()) { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setType('marketing'); $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2 = $this->getRequest(); if ($i1507c94b68f51b22087227858337782550edf618 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('action')) { try { switch ($i1507c94b68f51b22087227858337782550edf618) { case 'save': $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($this->_popup()); break; case 'load': $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($this->_popup(false)); break; case 'saveFilter': if ($this->getRequest()->isPost()) { $this->f6d43ff809a46f71c1e634564f2b37e20a99bbb9c(); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = Mage::getModel('magesms/marketing_filter'); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->setData(array( 'name' => $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('saveName'), 'filter' => $this->_filters->toSerialize(), 'date' => date('Y-m-d H:i:s'), )); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->save(); } break; case 'remove': if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('id')) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = Mage::getModel('magesms/marketing_filter'); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->delete(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($this->_popup(false)); } break; case 'restore': if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('id')) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = Mage::getModel('magesms/marketing_filter'); if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)) { $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 = Mage::getModel('magesms/marketing_filter_collection'); $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2->fromSerialize($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getFilter()); $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 'loadFilter': if ($i2bd9743336318d0e14be0600c9129730279505dd = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('name')) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = Mage::getModel('magesms/marketing_filter_'.$i2bd9743336318d0e14be0600c9129730279505dd)) { $i1791b2d1f89bb2bd83b34046f59125af207713db = new Varien_Data_Form(); switch ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->filter['type']) { case 'select': $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('filter', 'select', array( 'name' => 'filter', 'values' => $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValues(), )); break; case 'input': $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('filter', 'text', array( 'name' => 'filter', )); break; case 'datetime': $i8114d84b871449f246242a4433e364f848daff0c = array(); $i03474abc9cad4f5c29a2f0bca70a29051a128bc9 = 'Calendar.setup({
17
  inputField: "%s",
18
  ifFormat: "%s",
19
  showsTime: true,
@@ -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) { 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?').'");
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 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_MarketingController extends Topefekt_Magesms_Controller_Template_Action { private $vdc6442a8b0624835ef0da7b7fcc0ac1da4d6d2da = array('type', 'country', 'group', 'gender', 'newsletter', 'website', 'firstname', 'lastname', 'city', 'register', 'birthday', 'birthdayall', 'orderssum', 'product'); protected $_filters; protected $_collection; private $v148194b5b9cc653ce2e35e9709e441dc6fd4123a = array(); public function preDispatch() { parent::preDispatch(); $ia309f32db02d9de4490b0dcce975d0ccbce2c215 = Mage::helper('adminhtml')->prepareFilterString($this->getRequest()->getParam('sms')); $ia309f32db02d9de4490b0dcce975d0ccbce2c215 = $this->_filterDates($ia309f32db02d9de4490b0dcce975d0ccbce2c215, array('datumodesl')); $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = new Varien_Object(); foreach ($ia309f32db02d9de4490b0dcce975d0ccbce2c215 as $i670253c23c6fcba76bc4256a88fdd8fbc1041039 => $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { if (!empty($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) || is_numeric($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89)) { $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a->setData($i670253c23c6fcba76bc4256a88fdd8fbc1041039, $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); } } $this->_smsData = $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a; return $this; return $this; } private function f6d43ff809a46f71c1e634564f2b37e20a99bbb9c() { $this->_filters = Mage::getModel('magesms/marketing_filter_collection'); $this->_filters->addFilters($this->vdc6442a8b0624835ef0da7b7fcc0ac1da4d6d2da); Mage::register('magesms_marketing_filters', $this->_filters); $this->_collection = $this->_getCollection(); $this->_filters->setCollection($this->_collection); $this->_filters->setFilters($this->_collection); Mage::register('magesms_marketing_collection', $this->_collection); } public function indexAction() { $this->_initAction(); $this->f6d43ff809a46f71c1e634564f2b37e20a99bbb9c(); $i5509ac707290a86add15ab0ce4da982d395f4c4f = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/marketing.phtml') ); $i5509ac707290a86add15ab0ce4da982d395f4c4f->setSmsData($this->_smsData ? $this->_smsData : $this->getRequest()->getParams()); $i5509ac707290a86add15ab0ce4da982d395f4c4f->setFilterData($this->_filterData); $i7d411c0cc32cdb65ec82b9e8d79aa996946f553842c5963b49dec2d3a886ec5045e3b8e035c239f = '{customer_firstname}, {customer_lastname}, {customer_email}, {customer_phone}, {shop_name}, {shop_domain}, {shop_email}, {shop_phone}'; $i5509ac707290a86add15ab0ce4da982d395f4c4f->setNotice($i7d411c0cc32cdb65ec82b9e8d79aa996946f553842c5963b49dec2d3a886ec5045e3b8e035c239f); $i5509ac707290a86add15ab0ce4da982d395f4c4f->setTranslate(Mage::helper('magesms')->hookVariablesJS($i7d411c0cc32cdb65ec82b9e8d79aa996946f553842c5963b49dec2d3a886ec5045e3b8e035c239f)); $i5509ac707290a86add15ab0ce4da982d395f4c4f->setCollection($this->_collection); $this->getLayout()->getBlock('content')->append($i5509ac707290a86add15ab0ce4da982d395f4c4f); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = $this->getLayout()->createBlock('magesms/marketing_form'); $this->getLayout()->getBlock('content')->append($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a); $i21e55df616c305955791876c1eb4da83448beba2 = $this->_getBlockCustomer(); $this->getLayout()->getBlock('content')->append($i21e55df616c305955791876c1eb4da83448beba2); $i2ca8461421e371a2dc8ff5b5c9a248f5fb0a6dbc = $this->_getBlockDeleted(); $this->getLayout()->getBlock('content')->append($i2ca8461421e371a2dc8ff5b5c9a248f5fb0a6dbc); $this->renderLayout(); return $this; } public function filterAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ($this->getRequest()->getParams()) { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setType('marketing'); $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2 = $this->getRequest(); if ($i1507c94b68f51b22087227858337782550edf618 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('action')) { try { switch ($i1507c94b68f51b22087227858337782550edf618) { case 'save': $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($this->_popup()); break; case 'load': $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($this->_popup(false)); break; case 'saveFilter': if ($this->getRequest()->isPost()) { $this->f6d43ff809a46f71c1e634564f2b37e20a99bbb9c(); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = Mage::getModel('magesms/marketing_filter'); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->setData(array( 'name' => $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('saveName'), 'filter' => $this->_filters->toSerialize(), 'date' => date('Y-m-d H:i:s'), )); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->save(); } break; case 'remove': if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('id')) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = Mage::getModel('magesms/marketing_filter'); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->delete(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($this->_popup(false)); } break; case 'restore': if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('id')) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = Mage::getModel('magesms/marketing_filter'); if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)) { $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 = Mage::getModel('magesms/marketing_filter_collection'); $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2->fromSerialize($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getFilter()); $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 'loadFilter': if ($i2bd9743336318d0e14be0600c9129730279505dd = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('name')) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = Mage::getModel('magesms/marketing_filter_'.$i2bd9743336318d0e14be0600c9129730279505dd)) { $i1791b2d1f89bb2bd83b34046f59125af207713db = new Varien_Data_Form(); switch ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->filter['type']) { case 'select': $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('filter', 'select', array( 'name' => 'filter', 'values' => $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValues(), )); break; case 'input': $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('filter', 'text', array( 'name' => 'filter', )); break; case 'datetime': $i8114d84b871449f246242a4433e364f848daff0c = array(); $i03474abc9cad4f5c29a2f0bca70a29051a128bc9 = 'Calendar.setup({
17
  inputField: "%s",
18
  ifFormat: "%s",
19
  showsTime: true,
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; case 'number': $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('filter1', 'select', array( 'name' => 'filter[]', 'values' => array('0'=> '<', '1' => '>', '2' => '=', '3' => '≠'), 'style' => 'min-width:auto;width:40px' )); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('filter2', 'text', array( 'name' => 'filter[]', )); 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()) { if (isset($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['website_'.$iff7e46827cbb6547116c592bf800f4687428abf9->getWebsiteId()])) { $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['website_'.$iff7e46827cbb6547116c592bf800f4687428abf9->getWebsiteId()]; $ic5616185277631275bc74b85565c0c6eed62a3cd = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['store-id_'.$iff7e46827cbb6547116c592bf800f4687428abf9->getWebsiteId()]; } else { $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['website_'.$iff7e46827cbb6547116c592bf800f4687428abf9->getWebsiteId()] = $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc = Mage::getModel('core/website')->load($iff7e46827cbb6547116c592bf800f4687428abf9->getWebsiteId()); $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['store-id_'.$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), 'dnd' => !(($i17dbc08b33778f0cb7ec2da29ca88fea8caf1bf1 = $iff7e46827cbb6547116c592bf800f4687428abf9->getMagesmsCustomerMarketing()) ? $i17dbc08b33778f0cb7ec2da29ca88fea8caf1bf1 : is_null($i17dbc08b33778f0cb7ec2da29ca88fea8caf1bf1) ? 1 : $i17dbc08b33778f0cb7ec2da29ca88fea8caf1bf1), ) ); } $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(); $iff7e46827cbb6547116c592bf800f4687428abf9->addAttributeToSelect('magesms_customer_marketing'); 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/OptoutController.php CHANGED
@@ -10,7 +10,7 @@
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
- class Topefekt_Magesms_Adminhtml_Magesms_OptoutController extends Topefekt_Magesms_Controller_Action { public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here2', array('template' => 'topefekt/magesms/optout.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } public function saveAction() { $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142 = Mage::getConfig()->getNode('default/config/optout')->sku; if ( $this->getRequest()->getPost() ) { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); $i69a1201e93806d55c970dfb18feec53d221ba37b = Mage::getModel('catalog/product')->loadByAttribute('sku', $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142); if (!$i69a1201e93806d55c970dfb18feec53d221ba37b) { $i69a1201e93806d55c970dfb18feec53d221ba37b = Mage::getModel('catalog/product') ->setStoreId(0); $i777846b49037125c3bf5873d46a33ab5976c5a42 = Mage::getModel('catalog/product')->getResource()->getEntityType()->getDefaultAttributeSetId(); $i69a1201e93806d55c970dfb18feec53d221ba37b->setAttributeSetId($i777846b49037125c3bf5873d46a33ab5976c5a42); $i69a1201e93806d55c970dfb18feec53d221ba37b->setTypeId(Mage_Catalog_Model_Product_Type::TYPE_VIRTUAL); $i69a1201e93806d55c970dfb18feec53d221ba37b->setData('_edit_mode', true); $i69a1201e93806d55c970dfb18feec53d221ba37b->setSku($ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142); $i69a1201e93806d55c970dfb18feec53d221ba37b->setStatus(Mage_Catalog_Model_Product_Status::STATUS_ENABLED); $i69a1201e93806d55c970dfb18feec53d221ba37b->setTaxClassId(0); $i69a1201e93806d55c970dfb18feec53d221ba37b->setVisibility(Mage_Catalog_Model_Product_Visibility::VISIBILITY_NOT_VISIBLE); $i69a1201e93806d55c970dfb18feec53d221ba37b->setStockData(array( 'use_config_manage_stock' => 0, 'manage_stock' => 0, 'use_config_min_sale_qty' => 0, 'min_sale_qty' => 0, 'use_config_max_sale_qty' => 0, 'max_sale_qty' => 1, )); $if71cbed623a99cd5a1032d4d3388bfd486053db2 = array(); foreach (Mage::app()->getWebsites() as $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc) { $if71cbed623a99cd5a1032d4d3388bfd486053db2[] = $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getId(); } $i69a1201e93806d55c970dfb18feec53d221ba37b->setWebsiteIds($if71cbed623a99cd5a1032d4d3388bfd486053db2); $i69a1201e93806d55c970dfb18feec53d221ba37b->setCreatedAt(strtotime('now')); $i69a1201e93806d55c970dfb18feec53d221ba37b->setDescription($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('name')); $i69a1201e93806d55c970dfb18feec53d221ba37b->setShortDescription($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('name')); $i2bd9743336318d0e14be0600c9129730279505dd = array_values($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('name')); $i69a1201e93806d55c970dfb18feec53d221ba37b->setName($i2bd9743336318d0e14be0600c9129730279505dd[0]); $i69a1201e93806d55c970dfb18feec53d221ba37b->setPrice(0); $ia021b43e6045d8140052e6c3c684787a27e4bbe5 = Mage::getBaseDir('media'); if (file_exists($ia021b43e6045d8140052e6c3c684787a27e4bbe5.'/magesms/sms.png')) { $i1babd2991da6b9dfe1f546b773f6f35cec746fff = array ('thumbnail', 'small_image', 'image'); $i69a1201e93806d55c970dfb18feec53d221ba37b->addImageToMediaGallery($ia021b43e6045d8140052e6c3c684787a27e4bbe5.'/magesms/sms.png', $i1babd2991da6b9dfe1f546b773f6f35cec746fff, false, false); } $i69a1201e93806d55c970dfb18feec53d221ba37b->save(); Mage::getModel('catalogrule/rule')->applyAllRulesToProduct($i69a1201e93806d55c970dfb18feec53d221ba37b->getId()); foreach(Mage::app()->getStores(false) as $i7079b107a03c03d74ad14b853dad74b85b2d25d1) { Mage::getModel('catalog/product_status')->updateProductStatus($i69a1201e93806d55c970dfb18feec53d221ba37b->getId(), $i7079b107a03c03d74ad14b853dad74b85b2d25d1->getId(), Mage_Catalog_Model_Product_Status::STATUS_DISABLED); } } else { } $i8171218dd25ff7f2de2e1c0d8733bda70b607d79 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('website', 0); $i712821c3a64ae4a252ded9f3deaaddb6e942d985 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('status', 0) ? Mage_Catalog_Model_Product_Status::STATUS_ENABLED : Mage_Catalog_Model_Product_Status::STATUS_DISABLED; $ie7d1f3c0ab09749c63a4d4213221b59ce80ea45c = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('name', array()); foreach(Mage::app()->getWebsite($i8171218dd25ff7f2de2e1c0d8733bda70b607d79)->getStoreIds() as $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66) { Mage::getModel('catalog/product_status')->updateProductStatus($i69a1201e93806d55c970dfb18feec53d221ba37b->getId(), $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66, $i712821c3a64ae4a252ded9f3deaaddb6e942d985); $i69a1201e93806d55c970dfb18feec53d221ba37b->load($i69a1201e93806d55c970dfb18feec53d221ba37b->getId()); $i69a1201e93806d55c970dfb18feec53d221ba37b->setStoreId($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); $i69a1201e93806d55c970dfb18feec53d221ba37b->setPrice($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('price')); if (isset($ie7d1f3c0ab09749c63a4d4213221b59ce80ea45c[$i3bf172bc34c83f4a18624b192bc0bd7c4d647a66])) $i69a1201e93806d55c970dfb18feec53d221ba37b->setName($ie7d1f3c0ab09749c63a4d4213221b59ce80ea45c[$i3bf172bc34c83f4a18624b192bc0bd7c4d647a66]); $i69a1201e93806d55c970dfb18feec53d221ba37b->save(); } Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('Setting of the SMS opt-out feature was successfully changed')); } $this->_redirect('*/*/index', array('_fragment' => $i8171218dd25ff7f2de2e1c0d8733bda70b607d79)); } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/purchasecredit') ->_title(Mage::helper('magesms')->__('SMS opt-out')); ; return $this; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 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_OptoutController extends Topefekt_Magesms_Controller_Action { public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here2', array('template' => 'topefekt/magesms/optout.phtml') ); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setOptoutMarketing(Mage::getStoreConfig('magesms/optout/marketing')); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } public function saveAction() { $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142 = Mage::getConfig()->getNode('default/config/optout')->sku; if ( $this->getRequest()->getPost() ) { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); $i69a1201e93806d55c970dfb18feec53d221ba37b = Mage::getModel('catalog/product')->loadByAttribute('sku', $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142); if (!$i69a1201e93806d55c970dfb18feec53d221ba37b) { $i69a1201e93806d55c970dfb18feec53d221ba37b = Mage::getModel('catalog/product') ->setStoreId(0); $i777846b49037125c3bf5873d46a33ab5976c5a42 = Mage::getModel('catalog/product')->getResource()->getEntityType()->getDefaultAttributeSetId(); $i69a1201e93806d55c970dfb18feec53d221ba37b->setAttributeSetId($i777846b49037125c3bf5873d46a33ab5976c5a42); $i69a1201e93806d55c970dfb18feec53d221ba37b->setTypeId(Mage_Catalog_Model_Product_Type::TYPE_VIRTUAL); $i69a1201e93806d55c970dfb18feec53d221ba37b->setData('_edit_mode', true); $i69a1201e93806d55c970dfb18feec53d221ba37b->setSku($ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142); $i69a1201e93806d55c970dfb18feec53d221ba37b->setStatus(Mage_Catalog_Model_Product_Status::STATUS_ENABLED); $i69a1201e93806d55c970dfb18feec53d221ba37b->setTaxClassId(0); $i69a1201e93806d55c970dfb18feec53d221ba37b->setVisibility(Mage_Catalog_Model_Product_Visibility::VISIBILITY_NOT_VISIBLE); $i69a1201e93806d55c970dfb18feec53d221ba37b->setStockData(array( 'use_config_manage_stock' => 0, 'manage_stock' => 0, 'use_config_min_sale_qty' => 0, 'min_sale_qty' => 0, 'use_config_max_sale_qty' => 0, 'max_sale_qty' => 1, )); $if71cbed623a99cd5a1032d4d3388bfd486053db2 = array(); foreach (Mage::app()->getWebsites() as $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc) { $if71cbed623a99cd5a1032d4d3388bfd486053db2[] = $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getId(); } $i69a1201e93806d55c970dfb18feec53d221ba37b->setWebsiteIds($if71cbed623a99cd5a1032d4d3388bfd486053db2); $i69a1201e93806d55c970dfb18feec53d221ba37b->setCreatedAt(strtotime('now')); $i69a1201e93806d55c970dfb18feec53d221ba37b->setDescription($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('name')); $i69a1201e93806d55c970dfb18feec53d221ba37b->setShortDescription($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('name')); $i2bd9743336318d0e14be0600c9129730279505dd = array_values($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('name')); $i69a1201e93806d55c970dfb18feec53d221ba37b->setName($i2bd9743336318d0e14be0600c9129730279505dd[0]); $i69a1201e93806d55c970dfb18feec53d221ba37b->setPrice(0); $ia021b43e6045d8140052e6c3c684787a27e4bbe5 = Mage::getBaseDir('media'); if (file_exists($ia021b43e6045d8140052e6c3c684787a27e4bbe5.'/magesms/sms.png')) { $i1babd2991da6b9dfe1f546b773f6f35cec746fff = array ('thumbnail', 'small_image', 'image'); $i69a1201e93806d55c970dfb18feec53d221ba37b->addImageToMediaGallery($ia021b43e6045d8140052e6c3c684787a27e4bbe5.'/magesms/sms.png', $i1babd2991da6b9dfe1f546b773f6f35cec746fff, false, false); } $i69a1201e93806d55c970dfb18feec53d221ba37b->save(); Mage::getModel('catalogrule/rule')->applyAllRulesToProduct($i69a1201e93806d55c970dfb18feec53d221ba37b->getId()); foreach(Mage::app()->getStores(false) as $i7079b107a03c03d74ad14b853dad74b85b2d25d1) { Mage::getModel('catalog/product_status')->updateProductStatus($i69a1201e93806d55c970dfb18feec53d221ba37b->getId(), $i7079b107a03c03d74ad14b853dad74b85b2d25d1->getId(), Mage_Catalog_Model_Product_Status::STATUS_DISABLED); } } else { } $i8171218dd25ff7f2de2e1c0d8733bda70b607d79 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('website', 0); $i712821c3a64ae4a252ded9f3deaaddb6e942d985 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('status', 0) ? Mage_Catalog_Model_Product_Status::STATUS_ENABLED : Mage_Catalog_Model_Product_Status::STATUS_DISABLED; $ie7d1f3c0ab09749c63a4d4213221b59ce80ea45c = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('name', array()); $ib8129b89cda7dae2cfe1b114353de8ba2385974e = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('auto', 1); foreach(Mage::app()->getWebsite($i8171218dd25ff7f2de2e1c0d8733bda70b607d79)->getStoreIds() as $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66) { Mage::getModel('catalog/product_status')->updateProductStatus($i69a1201e93806d55c970dfb18feec53d221ba37b->getId(), $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66, $i712821c3a64ae4a252ded9f3deaaddb6e942d985); $i69a1201e93806d55c970dfb18feec53d221ba37b->load($i69a1201e93806d55c970dfb18feec53d221ba37b->getId()); $i69a1201e93806d55c970dfb18feec53d221ba37b->setStoreId($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); $i69a1201e93806d55c970dfb18feec53d221ba37b->setPrice($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('price')); if (isset($ie7d1f3c0ab09749c63a4d4213221b59ce80ea45c[$i3bf172bc34c83f4a18624b192bc0bd7c4d647a66])) $i69a1201e93806d55c970dfb18feec53d221ba37b->setName($ie7d1f3c0ab09749c63a4d4213221b59ce80ea45c[$i3bf172bc34c83f4a18624b192bc0bd7c4d647a66]); $i69a1201e93806d55c970dfb18feec53d221ba37b->save(); Mage::getSingleton('catalog/product_action')->updateAttributes(array($i69a1201e93806d55c970dfb18feec53d221ba37b->getId()), array('magesms_optout' => $ib8129b89cda7dae2cfe1b114353de8ba2385974e), $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); Mage::getSingleton('catalog/product_action')->updateAttributes(array($i69a1201e93806d55c970dfb18feec53d221ba37b->getId()), array('magesms_optout' => 1), 0); } Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('Setting of the SMS opt-out feature was successfully changed')); } $this->_redirect('*/*/index', array('_fragment' => $i8171218dd25ff7f2de2e1c0d8733bda70b607d79)); } public function saveOptoutMarketingAction() { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); Mage::getModel('core/config')->saveConfig('magesms/optout/marketing', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('status')); Mage::getConfig()->reinit(); $this->_redirect('*/*/index'); } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/purchasecredit') ->_title(Mage::helper('magesms')->__('SMS opt-out')); ; return $this; } }
app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/ProfileController.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Adminhtml_Magesms_ProfileController extends Topefekt_Magesms_Controller_Action { public function preDispatch() { return Mage_Adminhtml_Controller_Action::preDispatch(); } public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/profile.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); if ($this->profile->user->user) Mage::getModel('magesms/observer')->cronUpdate(); if (Mage::app()->loadCache('magesms_update_available')) { Mage::getSingleton('adminhtml/session')->addNotice($this->__('New version available for download:').' '.Mage::app()->loadCache('magesms_update_available')); } return $this; } public function loginAction() { $i065df39c07d6c930a4781ba0b0f312703847fa81 = Mage::app()->getRequest()->getParam('username'); $i54d1b2514929b4ead571e37199167cb71517da24 = Mage::app()->getRequest()->getParam('password'); $i451f679eaafeecb81387b150019f0d9e0fa83d16 = Mage::getModel('magesms/api'); $ia61712c27ea241bd7a543dc2b02ea572274d0322 = $i451f679eaafeecb81387b150019f0d9e0fa83d16->serverPost('action=login&username='.urlencode($i065df39c07d6c930a4781ba0b0f312703847fa81).'&password='.urlencode($i54d1b2514929b4ead571e37199167cb71517da24)); if ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] != 1) { Mage::getSingleton('adminhtml/session')->addError($this->__($ia61712c27ea241bd7a543dc2b02ea572274d0322['error'])); } else { $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538d5406ca9a19e1687923f28236de86b1936c5757 = Mage::getModel('magesms/smsuser')->addData( array( 'user' => $i065df39c07d6c930a4781ba0b0f312703847fa81, 'passwd' => $i54d1b2514929b4ead571e37199167cb71517da24, 'email' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][0], 'companyname' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][1], 'regtype' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][1] ? 'firm' : 'person', 'addressstreet' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][2], 'addresscity' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][3], 'addresszip' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][4], 'companyid' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][5], 'companyvat' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][6], 'country0' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][7], 'firstname' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][8], 'lastname' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][9] ) )->save(); Mage::getSingleton('adminhtml/session')->addSuccess($this->__($ia61712c27ea241bd7a543dc2b02ea572274d0322['error'])); } $this->_redirect('*/*/'); } public function validateAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $this->profile->user->setData('email', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('email', '')); $this->profile->user->setData('addressstreet', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('addressstreet', '')); $this->profile->user->setData('addresszip', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('addresszip', '')); $this->profile->user->setData('addresscity', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('addresscity', '')); $this->profile->user->setData('country0', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('country0', '')); $this->profile->user->setData('regtype', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('regtype', '')); $this->profile->user->setData('firstname', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('firstname', '')); $this->profile->user->setData('lastname', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('lastname', '')); if ($this->profile->user->getRegtype() == 'firm') { $this->profile->user->setData('companyname', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('companyname', '')); $this->profile->user->setData('companyid', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('companyid', '')); $this->profile->user->setData('companyvat', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('companyvat', '')); } else { $this->profile->user->setData('companyname', ''); $this->profile->user->setData('companyid', ''); $this->profile->user->setData('companyvat', ''); } $this->profile->user->setData('agree', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('agree', 0)); $ibdd27a8dd714410289189d318feb96fe6ed8e07f = $this->profile->user->validate(); if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } if ($this->profile->user->user) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = base64_decode("YWN0aW9uPWVkaXQmdXNlcm5hbWU9").urlencode($this->profile->user->user). base64_decode("JnBhc3N3b3JkPQ==").urlencode($this->profile->user->passwd); } else { $ie955ee51cd0c7df255b696081bc48b422055d462 = Mage::getConfig()->getNode('default/config/referer'); if ($ie955ee51cd0c7df255b696081bc48b422055d462) { $ie955ee51cd0c7df255b696081bc48b422055d462 = $ie955ee51cd0c7df255b696081bc48b422055d462->id; } else { $ie955ee51cd0c7df255b696081bc48b422055d462 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('refererid', ''); } $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'action=register&refererid='.urlencode($ie955ee51cd0c7df255b696081bc48b422055d462).'&'; } $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= base64_decode("JmVtYWlsPQ==").urlencode($this->profile->user->email). base64_decode("JmptZW5vPQ==").urlencode($this->profile->user->companyname). base64_decode("Jmtvc29iYT0=").urlencode($this->profile->user->firstname). base64_decode("JmtwcmlqbWVuaT0=").urlencode($this->profile->user->lastname). "&adresa_ulice=".urlencode($this->profile->user->addressstreet). "&adresa_mesto=".urlencode($this->profile->user->addresscity). "&adresa_PSC=".urlencode($this->profile->user->addresszip). "&country0=".urlencode($this->profile->user->country0). base64_decode("JklDTz0=").urlencode($this->profile->user->companyid). base64_decode("JkRJQz0=").urlencode($this->profile->user->companyvat); $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getSingleton('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] != 1 || empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { $ibdd27a8dd714410289189d318feb96fe6ed8e07f[] = Mage::helper('magesms')->__($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['error']); } else { $ibdd27a8dd714410289189d318feb96fe6ed8e07f = array(Mage::helper('magesms')->__($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['error'])); } } elseif (!$this->profile->user->user && $i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1) { $this->profile->user->setUser($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][0]); $this->profile->user->setPasswd($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][1]); } if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } else { $i5bf407a3ecf35ff195a9c7e8f546cfc606253fad = $this->profile->user->getId(); $this->profile->user->save(); if ($i5bf407a3ecf35ff195a9c7e8f546cfc606253fad) Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Account was changed.')); else { Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Account was created.')); $ie2d3c964f264968835c26fc02ee0d5f0820fe0ce = Mage::app()->getDefaultStoreView()->getBaseUrl().'magesms/delivery'; $ia61712c27ea241bd7a543dc2b02ea572274d0322 = base64_decode("YWN0aW9uPWVkaXQyJnVzZXJuYW1lPQ==").urlencode($this->profile->user->user). base64_decode("JnBhc3N3b3JkPQ==").urlencode($this->profile->user->passwd). "&shop_domain=".urlencode($ie2d3c964f264968835c26fc02ee0d5f0820fe0ce); $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getSingleton('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] != 99 || !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1 || $i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 5) $this->profile->user->setData('URLreports', 1)->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 saveAction() { $this->_redirect('*/*/'); } public function deleteadminAction() { if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $this->getRequest()->getParam('id')) { try { $this->profile->admins->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)->delete(); Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Admin 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 Admin to delete.')); $this->_redirect('*/*/'); } public function saveadminAction() { $this->_redirect('*/*/'); } public function validateadminAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { try { $this->profile->admins->setData(Mage::app()->getRequest()->getPost()); $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $this->getRequest()->getParam('id'); if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 > 0) { $this->profile->admins->setId($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); } $ibdd27a8dd714410289189d318feb96fe6ed8e07f = $this->profile->admins->validate(); if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } else { $this->profile->admins->save(); if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538) Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Admin was changed.')); else Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Admin was created.')); } } 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 validatesettingsAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $this->profile->user->setData('simulatesms', (int)$iacbd1c78463510856e506611fe14b5e1173581a6->getPost('simulatesms', 0)); $this->profile->user->setData('deletedb', (int)$iacbd1c78463510856e506611fe14b5e1173581a6->getPost('deletedb', 0)); $this->profile->user->setData('URLreports', (int)$iacbd1c78463510856e506611fe14b5e1173581a6->getPost('URLreports', 0)); $this->profile->user->setData('pocetkredit', (int)$iacbd1c78463510856e506611fe14b5e1173581a6->getPost('pocetkredit', 0)); $this->profile->user->setData('deliveryemail', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('deliveryemail', '')); $this->profile->user->setData('prefbilling', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('prefbilling', 0)); $ibdd27a8dd714410289189d318feb96fe6ed8e07f = $this->profile->user->validate(); $ie2d3c964f264968835c26fc02ee0d5f0820fe0ce = ''; if ($this->profile->user->getData('URLreports')) { $ie2d3c964f264968835c26fc02ee0d5f0820fe0ce = Mage::app()->getDefaultStoreView()->getBaseUrl().'magesms/delivery'; } $ia61712c27ea241bd7a543dc2b02ea572274d0322 = base64_decode("YWN0aW9uPWVkaXQyJnVzZXJuYW1lPQ==").urlencode($this->profile->user->user). base64_decode("JnBhc3N3b3JkPQ==").urlencode($this->profile->user->passwd). "&shop_domain=".urlencode($ie2d3c964f264968835c26fc02ee0d5f0820fe0ce). base64_decode("JnBvY2V0a3JlZGl0PQ==").urlencode($this->profile->user->pocetkredit). base64_decode("JmVtYWlsPQ==").urlencode($this->profile->user->deliveryemail); $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getSingleton('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] != 99 || !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1 || $i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 5) { Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Account was changed.')); } elseif ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 11) { Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Account was changed, but module URL for DR does not answer.')); $this->profile->user->setData('URLreports', 0); } elseif ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 3) { $if3b1e2c1706de4c1bca112c669caba3a0420b880 = Mage::helper('magesms')->__('error'); } elseif ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 4) { $if3b1e2c1706de4c1bca112c669caba3a0420b880 = Mage::helper('magesms')->__('you can change account after ').$i55dd4e7042a1f9031b84f07f04c37165ce3d0720['error'].Mage::helper('magesms')->__(' seconds'); } } else { $if3b1e2c1706de4c1bca112c669caba3a0420b880 = Mage::helper('magesms')->__('error'); } if (!empty($if3b1e2c1706de4c1bca112c669caba3a0420b880) && is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { $ibdd27a8dd714410289189d318feb96fe6ed8e07f[] = $if3b1e2c1706de4c1bca112c669caba3a0420b880; } elseif (!empty($if3b1e2c1706de4c1bca112c669caba3a0420b880)) { $ibdd27a8dd714410289189d318feb96fe6ed8e07f = array($if3b1e2c1706de4c1bca112c669caba3a0420b880); } if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } else { $this->profile->user->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 savesettingsAction() { $this->_redirect('*/*/'); } public function vatvalidateAction() { $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 = ''; if ($this->getRequest()->getParams()) { $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2 = $this->getRequest(); if ($i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('country') && $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('companyvat')) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'action=checkVAT&country0='.urlencode($i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('country')).'&DIC='.urlencode($i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('companyvat')); $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getSingleton('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1 && !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 = 'true'; } } } $this->getResponse()->clearHeaders()->setHeader('Content-Type', 'text/html')->setBody($i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4); } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/profile') ->_title(Mage::helper('magesms')->__('Edit user account')); ; return $this; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 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_ProfileController extends Topefekt_Magesms_Controller_Action { public function preDispatch() { return Mage_Adminhtml_Controller_Action::preDispatch(); } public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/profile.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); if ($this->profile->user->user) Mage::getModel('magesms/observer')->cronUpdate(); if (Mage::app()->loadCache('magesms_update_available')) { Mage::getSingleton('adminhtml/session')->addNotice($this->__('New version available for download:').' '.Mage::app()->loadCache('magesms_update_available')); } return $this; } public function loginAction() { $i065df39c07d6c930a4781ba0b0f312703847fa81 = Mage::app()->getRequest()->getParam('username'); $i54d1b2514929b4ead571e37199167cb71517da24 = Mage::app()->getRequest()->getParam('password'); $i451f679eaafeecb81387b150019f0d9e0fa83d16 = Mage::getModel('magesms/api'); $ia61712c27ea241bd7a543dc2b02ea572274d0322 = $i451f679eaafeecb81387b150019f0d9e0fa83d16->serverPost('action=login&username='.urlencode($i065df39c07d6c930a4781ba0b0f312703847fa81).'&password='.urlencode($i54d1b2514929b4ead571e37199167cb71517da24)); if ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] != 1) { Mage::getSingleton('adminhtml/session')->addError($this->__($ia61712c27ea241bd7a543dc2b02ea572274d0322['error'])); } else { $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538d5406ca9a19e1687923f28236de86b1936c5757 = Mage::getModel('magesms/smsuser')->addData( array( 'user' => $i065df39c07d6c930a4781ba0b0f312703847fa81, 'passwd' => $i54d1b2514929b4ead571e37199167cb71517da24, 'email' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][0], 'companyname' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][1], 'regtype' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][1] ? 'firm' : 'person', 'addressstreet' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][2], 'addresscity' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][3], 'addresszip' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][4], 'companyid' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][5], 'companyvat' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][6], 'country0' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][7], 'firstname' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][8], 'lastname' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][9] ) )->save(); Mage::getSingleton('adminhtml/session')->addSuccess($this->__($ia61712c27ea241bd7a543dc2b02ea572274d0322['error'])); } $this->_redirect('*/*/'); } public function validateAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $this->profile->user->setData('email', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('email', '')); $this->profile->user->setData('addressstreet', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('addressstreet', '')); $this->profile->user->setData('addresszip', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('addresszip', '')); $this->profile->user->setData('addresscity', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('addresscity', '')); $this->profile->user->setData('country0', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('country0', '')); $this->profile->user->setData('regtype', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('regtype', '')); $this->profile->user->setData('firstname', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('firstname', '')); $this->profile->user->setData('lastname', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('lastname', '')); if ($this->profile->user->getRegtype() == 'firm') { $this->profile->user->setData('companyname', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('companyname', '')); $this->profile->user->setData('companyid', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('companyid', '')); $this->profile->user->setData('companyvat', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('companyvat', '')); } else { $this->profile->user->setData('companyname', ''); $this->profile->user->setData('companyid', ''); $this->profile->user->setData('companyvat', ''); } $this->profile->user->setData('agree', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('agree', 0)); $ibdd27a8dd714410289189d318feb96fe6ed8e07f = $this->profile->user->validate(); if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } if ($this->profile->user->user) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = base64_decode("YWN0aW9uPWVkaXQmdXNlcm5hbWU9").urlencode($this->profile->user->user). base64_decode("JnBhc3N3b3JkPQ==").urlencode($this->profile->user->passwd); } else { $ie955ee51cd0c7df255b696081bc48b422055d462 = Mage::getConfig()->getNode('default/config/referer'); if ($ie955ee51cd0c7df255b696081bc48b422055d462) { $ie955ee51cd0c7df255b696081bc48b422055d462 = $ie955ee51cd0c7df255b696081bc48b422055d462->id; } else { $ie955ee51cd0c7df255b696081bc48b422055d462 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('refererid', ''); } $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'action=register&refererid='.urlencode($ie955ee51cd0c7df255b696081bc48b422055d462).'&'; } $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= base64_decode("JmVtYWlsPQ==").urlencode($this->profile->user->email). base64_decode("JmptZW5vPQ==").urlencode($this->profile->user->companyname). base64_decode("Jmtvc29iYT0=").urlencode($this->profile->user->firstname). base64_decode("JmtwcmlqbWVuaT0=").urlencode($this->profile->user->lastname). "&adresa_ulice=".urlencode($this->profile->user->addressstreet). "&adresa_mesto=".urlencode($this->profile->user->addresscity). "&adresa_PSC=".urlencode($this->profile->user->addresszip). "&country0=".urlencode($this->profile->user->country0). base64_decode("JklDTz0=").urlencode($this->profile->user->companyid). base64_decode("JkRJQz0=").urlencode($this->profile->user->companyvat); $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getSingleton('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] != 1 || empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { $ibdd27a8dd714410289189d318feb96fe6ed8e07f[] = Mage::helper('magesms')->__($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['error']); } else { $ibdd27a8dd714410289189d318feb96fe6ed8e07f = array(Mage::helper('magesms')->__($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['error'])); } } elseif (!$this->profile->user->user && $i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1) { $this->profile->user->setUser($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][0]); $this->profile->user->setPasswd($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][1]); } if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } else { $i5bf407a3ecf35ff195a9c7e8f546cfc606253fad = $this->profile->user->getId(); $this->profile->user->save(); if ($i5bf407a3ecf35ff195a9c7e8f546cfc606253fad) Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Account was changed.')); else { Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Account was created.')); $ie2d3c964f264968835c26fc02ee0d5f0820fe0ce = Mage::app()->getDefaultStoreView()->getBaseUrl().'magesms/delivery'; $ia61712c27ea241bd7a543dc2b02ea572274d0322 = base64_decode("YWN0aW9uPWVkaXQyJnVzZXJuYW1lPQ==").urlencode($this->profile->user->user). base64_decode("JnBhc3N3b3JkPQ==").urlencode($this->profile->user->passwd). "&shop_domain=".urlencode($ie2d3c964f264968835c26fc02ee0d5f0820fe0ce); $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getSingleton('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] != 99 || !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1 || $i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 5) $this->profile->user->setData('URLreports', 1)->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 saveAction() { $this->_redirect('*/*/'); } public function deleteadminAction() { if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $this->getRequest()->getParam('id')) { try { $this->profile->admins->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)->delete(); Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Admin 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 Admin to delete.')); $this->_redirect('*/*/'); } public function saveadminAction() { $this->_redirect('*/*/'); } public function validateadminAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { try { $this->profile->admins->setData(Mage::app()->getRequest()->getPost()); $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $this->getRequest()->getParam('id'); if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 > 0) { $this->profile->admins->setId($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); } $ibdd27a8dd714410289189d318feb96fe6ed8e07f = $this->profile->admins->validate(); if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } else { $this->profile->admins->save(); if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538) Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Admin was changed.')); else Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Admin was created.')); } } 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 validatesettingsAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $this->profile->user->setData('simulatesms', (int)$iacbd1c78463510856e506611fe14b5e1173581a6->getPost('simulatesms', 0)); $this->profile->user->setData('deletedb', (int)$iacbd1c78463510856e506611fe14b5e1173581a6->getPost('deletedb', 0)); $this->profile->user->setData('URLreports', (int)$iacbd1c78463510856e506611fe14b5e1173581a6->getPost('URLreports', 0)); $this->profile->user->setData('pocetkredit', (int)$iacbd1c78463510856e506611fe14b5e1173581a6->getPost('pocetkredit', 0)); $this->profile->user->setData('deliveryemail', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('deliveryemail', '')); $this->profile->user->setData('prefbilling', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('prefbilling', 0)); $ibdd27a8dd714410289189d318feb96fe6ed8e07f = $this->profile->user->validate(); $ie2d3c964f264968835c26fc02ee0d5f0820fe0ce = ''; if ($this->profile->user->getData('URLreports')) { $ie2d3c964f264968835c26fc02ee0d5f0820fe0ce = Mage::app()->getDefaultStoreView()->getBaseUrl().'magesms/delivery'; } $ia61712c27ea241bd7a543dc2b02ea572274d0322 = base64_decode("YWN0aW9uPWVkaXQyJnVzZXJuYW1lPQ==").urlencode($this->profile->user->user). base64_decode("JnBhc3N3b3JkPQ==").urlencode($this->profile->user->passwd). "&shop_domain=".urlencode($ie2d3c964f264968835c26fc02ee0d5f0820fe0ce). base64_decode("JnBvY2V0a3JlZGl0PQ==").urlencode($this->profile->user->pocetkredit). base64_decode("JmVtYWlsPQ==").urlencode($this->profile->user->deliveryemail); $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getSingleton('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] != 99 || !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1 || $i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 5) { Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Account was changed.')); } elseif ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 11) { Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Account was changed, but module URL for DR does not answer.')); $this->profile->user->setData('URLreports', 0); } elseif ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 3) { $if3b1e2c1706de4c1bca112c669caba3a0420b880 = Mage::helper('magesms')->__('error'); } elseif ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 4) { $if3b1e2c1706de4c1bca112c669caba3a0420b880 = Mage::helper('magesms')->__('you can change account after ').$i55dd4e7042a1f9031b84f07f04c37165ce3d0720['error'].Mage::helper('magesms')->__(' seconds'); } } else { $if3b1e2c1706de4c1bca112c669caba3a0420b880 = Mage::helper('magesms')->__('error'); } if (!empty($if3b1e2c1706de4c1bca112c669caba3a0420b880) && is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { $ibdd27a8dd714410289189d318feb96fe6ed8e07f[] = $if3b1e2c1706de4c1bca112c669caba3a0420b880; } elseif (!empty($if3b1e2c1706de4c1bca112c669caba3a0420b880)) { $ibdd27a8dd714410289189d318feb96fe6ed8e07f = array($if3b1e2c1706de4c1bca112c669caba3a0420b880); } if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } else { $this->profile->user->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 savesettingsAction() { $this->_redirect('*/*/'); } public function vatvalidateAction() { $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 = ''; if ($this->getRequest()->getParams()) { $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2 = $this->getRequest(); if ($i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('country') && $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('companyvat')) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'action=checkVAT&country0='.urlencode($i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('country')).'&DIC='.urlencode($i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('companyvat')); $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getSingleton('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1 && !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 = 'true'; } } } $this->getResponse()->clearHeaders()->setHeader('Content-Type', 'text/html')->setBody($i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4); } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/profile') ->_title(Mage::helper('magesms')->__('Edit user account')); ; return $this; } }
app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/PurchasecreditController.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Adminhtml_Magesms_PurchasecreditController extends Topefekt_Magesms_Controller_Action { public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here2', array('template' => 'topefekt/magesms/purchasecredit.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/purchasecredit') ->_title(Mage::helper('magesms')->__('Purchase Credit')); ; return $this; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 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_PurchasecreditController extends Topefekt_Magesms_Controller_Action { public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here2', array('template' => 'topefekt/magesms/purchasecredit.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/purchasecredit') ->_title(Mage::helper('magesms')->__('Purchase Credit')); ; return $this; } }
app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/SendsmsController.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Adminhtml_Magesms_SendsmsController extends Topefekt_Magesms_Controller_Template_Action { public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/sendsms.phtml') ); $id42c5963b49dec2d3a886ec5045e3b8e035c239f = '{shop_name}, {shop_domain}, {shop_email}, {shop_phone}'; $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setNotice($id42c5963b49dec2d3a886ec5045e3b8e035c239f); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setTranslate(Mage::helper('magesms')->hookVariablesJS($id42c5963b49dec2d3a886ec5045e3b8e035c239f)); if (!Mage::app()->isSingleStoreMode()) { $ie7d1444276fe9dee937fd96d6e0519397fdc5701 = array(0 => array('value' => 0, 'label' => Mage::helper('adminhtml')->__('Default Config'))); foreach(Mage::app()->getWebsites(false) as $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc) { $ie7d1444276fe9dee937fd96d6e0519397fdc5701[$i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getId()] = array('value' => array(), 'label' => $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getName()); foreach($i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getStores() as $i7079b107a03c03d74ad14b853dad74b85b2d25d1) { $ie7d1444276fe9dee937fd96d6e0519397fdc5701[$i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getId()]['value'][] = array('value' => $i7079b107a03c03d74ad14b853dad74b85b2d25d1->getId(), 'label' => $i7079b107a03c03d74ad14b853dad74b85b2d25d1->getName()); } } $i1791b2d1f89bb2bd83b34046f59125af207713db = new Varien_Data_Form(); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('store', 'select', array( 'label' => $this->__('Store:'), 'name' => 'store', 'values' => $ie7d1444276fe9dee937fd96d6e0519397fdc5701, )); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setSelectStore($i1791b2d1f89bb2bd83b34046f59125af207713db->getHtml()); } $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } public function sendAction() { if ( $this->getRequest()->getPost() ) { try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa = $this->_prepareText($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('text'), $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('store')); $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('unicode') ? true : false; $ifc17de93671eea5715520ecfbc4dc543818685b8 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('unique') ? true : false; $ief058b7f255db4398d193a2545513eb1c6eb5e8b = explode(',', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('recipients')); if (!empty($_FILES['sms_file']['tmp_name']) && is_uploaded_file($_FILES['sms_file']['tmp_name'])) { $i611979c78d09dff15855871978716343fa7c183e = array('application/vnd.ms-excel', 'text/plain', 'text/csv', 'text/tsv'); $i7a969aaaa6dd03b1ecdde97917a28ff6bea21d9f = array('text/vcard', 'text/x-vcard'); if(in_array($_FILES['sms_file']['type'], $i611979c78d09dff15855871978716343fa7c183e)) { $ief058b7f255db4398d193a2545513eb1c6eb5e8b = array_merge($ief058b7f255db4398d193a2545513eb1c6eb5e8b, str_getcsv(file_get_contents($_FILES['sms_file']['tmp_name']), "\n")); } elseif(in_array($_FILES['sms_file']['type'], $i7a969aaaa6dd03b1ecdde97917a28ff6bea21d9f)) { $ief058b7f255db4398d193a2545513eb1c6eb5e8b = array_merge($ief058b7f255db4398d193a2545513eb1c6eb5e8b, preg_replace('/TEL;.*:/', '', preg_grep('/TEL;/', explode("\n", file_get_contents($_FILES['sms_file']['tmp_name']))))); } } if (!$ief058b7f255db4398d193a2545513eb1c6eb5e8b) Mage::throwException(Mage::helper('magesms')->__('Recipients found: 0')); if (!$idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa) Mage::throwException(Mage::helper('magesms')->__('Fill in SMS text.')); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f = Mage::getModel('magesms/sms'); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setRecipient($ief058b7f255db4398d193a2545513eb1c6eb5e8b) ->setMessage($idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa) ->setType(Topefekt_Magesms_Model_Sms::TYPE_SIMPLE) ->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 = Mage::getModel('core/date')->gmtTimestamp(strtotime("$i4c323947385ff52539168f26084feed4bc17e2dc $i6aa8d50211ad373efab0896425f6f5fa0e013c29:$if8001c570b9f0e904df8b36797628015beb8fa80:00") + 3600*$i836a3cd8c554d1c35cc3c6cf3e3f49052b683096); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setSendlater($i4c323947385ff52539168f26084feed4bc17e2dc); } $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->send(); $this->_redirect('*/*/index'); } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/sendsms.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->renderLayout(); } } else { $this->_redirect('*/*/index'); } return $this; } public function loadCustomersAction() { $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 = ''; if ($this->getRequest()->getParams()) { $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2 = $this->getRequest(); if ($i933cfa8bba921101c14f35998fc501e030c9db5b = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('char')) { $i854b57231c05dbaa7f22331dbaed4152a402d2f1 = new Zend_Locale_Data(); $i065c883e3f45e58104d21f8196ee3fe9bd2f513d = $i854b57231c05dbaa7f22331dbaed4152a402d2f1->getList('en-EN', 'phonetoterritory'); $ibad8f78c098260b16424eb12ceee5f8336591d56 = Mage::helper('magesms')->getCustomerCollection(); $ibad8f78c098260b16424eb12ceee5f8336591d56->addFieldToFilter('lastname', array('like' => $i933cfa8bba921101c14f35998fc501e030c9db5b.'%')); $ibad8f78c098260b16424eb12ceee5f8336591d56->addAttributeToSort('lastname', 'ASC'); foreach($ibad8f78c098260b16424eb12ceee5f8336591d56 as $i21e55df616c305955791876c1eb4da83448beba2) { $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 .= $i21e55df616c305955791876c1eb4da83448beba2->getLastname().', '.$i21e55df616c305955791876c1eb4da83448beba2->getFirstname().';'; $id1caa2f79c0787a3e797d6d388cd6f00ced4282f = Mage::helper('magesms')->prepareNumber($i21e55df616c305955791876c1eb4da83448beba2->getTelephone(), 'customer', empty($i065c883e3f45e58104d21f8196ee3fe9bd2f513d[$i21e55df616c305955791876c1eb4da83448beba2->getCountryId()]) ? '' : $i065c883e3f45e58104d21f8196ee3fe9bd2f513d[$i21e55df616c305955791876c1eb4da83448beba2->getCountryId()]); $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 .= $id1caa2f79c0787a3e797d6d388cd6f00ced4282f['mobile']."\n"; } } } $this->getResponse()->clearHeaders()->setHeader('Content-Type', 'text/html')->setBody($i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4); } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/sendsms') ->_title(Mage::helper('magesms')->__('Send SMS')) ; return $this; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 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_SendsmsController extends Topefekt_Magesms_Controller_Template_Action { public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/sendsms.phtml') ); $id42c5963b49dec2d3a886ec5045e3b8e035c239f = '{shop_name}, {shop_domain}, {shop_email}, {shop_phone}'; $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setNotice($id42c5963b49dec2d3a886ec5045e3b8e035c239f); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setTranslate(Mage::helper('magesms')->hookVariablesJS($id42c5963b49dec2d3a886ec5045e3b8e035c239f)); if (!Mage::app()->isSingleStoreMode()) { $ie7d1444276fe9dee937fd96d6e0519397fdc5701 = array(0 => array('value' => 0, 'label' => Mage::helper('adminhtml')->__('Default Config'))); foreach(Mage::app()->getWebsites(false) as $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc) { $ie7d1444276fe9dee937fd96d6e0519397fdc5701[$i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getId()] = array('value' => array(), 'label' => $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getName()); foreach($i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getStores() as $i7079b107a03c03d74ad14b853dad74b85b2d25d1) { $ie7d1444276fe9dee937fd96d6e0519397fdc5701[$i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getId()]['value'][] = array('value' => $i7079b107a03c03d74ad14b853dad74b85b2d25d1->getId(), 'label' => $i7079b107a03c03d74ad14b853dad74b85b2d25d1->getName()); } } $i1791b2d1f89bb2bd83b34046f59125af207713db = new Varien_Data_Form(); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('store', 'select', array( 'label' => $this->__('Store:'), 'name' => 'store', 'values' => $ie7d1444276fe9dee937fd96d6e0519397fdc5701, )); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setSelectStore($i1791b2d1f89bb2bd83b34046f59125af207713db->getHtml()); } $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } public function sendAction() { if ( $this->getRequest()->getPost() ) { try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa = $this->_prepareText($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('text'), $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('store')); $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('unicode') ? true : false; $ifc17de93671eea5715520ecfbc4dc543818685b8 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('unique') ? true : false; $ief058b7f255db4398d193a2545513eb1c6eb5e8b = explode(',', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('recipients')); if (!empty($_FILES['sms_file']['tmp_name']) && is_uploaded_file($_FILES['sms_file']['tmp_name'])) { $i611979c78d09dff15855871978716343fa7c183e = array('application/vnd.ms-excel', 'text/plain', 'text/csv', 'text/tsv'); $i7a969aaaa6dd03b1ecdde97917a28ff6bea21d9f = array('text/vcard', 'text/x-vcard'); if(in_array($_FILES['sms_file']['type'], $i611979c78d09dff15855871978716343fa7c183e)) { $ief058b7f255db4398d193a2545513eb1c6eb5e8b = array_merge($ief058b7f255db4398d193a2545513eb1c6eb5e8b, str_getcsv(file_get_contents($_FILES['sms_file']['tmp_name']), "\n")); } elseif(in_array($_FILES['sms_file']['type'], $i7a969aaaa6dd03b1ecdde97917a28ff6bea21d9f)) { $ief058b7f255db4398d193a2545513eb1c6eb5e8b = array_merge($ief058b7f255db4398d193a2545513eb1c6eb5e8b, preg_replace('/TEL;.*:/', '', preg_grep('/TEL;/', explode("\n", file_get_contents($_FILES['sms_file']['tmp_name']))))); } } if (!$ief058b7f255db4398d193a2545513eb1c6eb5e8b) Mage::throwException(Mage::helper('magesms')->__('Recipients found: 0')); if (!$idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa) Mage::throwException(Mage::helper('magesms')->__('Fill in SMS text.')); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f = Mage::getModel('magesms/sms'); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setRecipient($ief058b7f255db4398d193a2545513eb1c6eb5e8b) ->setMessage($idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa) ->setType(Topefekt_Magesms_Model_Sms::TYPE_SIMPLE) ->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 = Mage::getModel('core/date')->gmtTimestamp(strtotime("$i4c323947385ff52539168f26084feed4bc17e2dc $i6aa8d50211ad373efab0896425f6f5fa0e013c29:$if8001c570b9f0e904df8b36797628015beb8fa80:00") + 3600*$i836a3cd8c554d1c35cc3c6cf3e3f49052b683096); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setSendlater($i4c323947385ff52539168f26084feed4bc17e2dc); } $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->send(); $this->_redirect('*/*/index'); } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/sendsms.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->renderLayout(); } } else { $this->_redirect('*/*/index'); } return $this; } public function loadCustomersAction() { $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 = ''; if ($this->getRequest()->getParams()) { $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2 = $this->getRequest(); if ($i933cfa8bba921101c14f35998fc501e030c9db5b = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('char')) { $i854b57231c05dbaa7f22331dbaed4152a402d2f1 = new Zend_Locale_Data(); $i065c883e3f45e58104d21f8196ee3fe9bd2f513d = $i854b57231c05dbaa7f22331dbaed4152a402d2f1->getList('en-EN', 'phonetoterritory'); $ibad8f78c098260b16424eb12ceee5f8336591d56 = Mage::helper('magesms')->getCustomerCollection(); $ibad8f78c098260b16424eb12ceee5f8336591d56->addFieldToFilter('lastname', array('like' => $i933cfa8bba921101c14f35998fc501e030c9db5b.'%')); $ibad8f78c098260b16424eb12ceee5f8336591d56->addAttributeToSort('lastname', 'ASC'); foreach($ibad8f78c098260b16424eb12ceee5f8336591d56 as $i21e55df616c305955791876c1eb4da83448beba2) { $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 .= $i21e55df616c305955791876c1eb4da83448beba2->getLastname().', '.$i21e55df616c305955791876c1eb4da83448beba2->getFirstname().';'; $id1caa2f79c0787a3e797d6d388cd6f00ced4282f = Mage::helper('magesms')->prepareNumber($i21e55df616c305955791876c1eb4da83448beba2->getTelephone(), 'customer', empty($i065c883e3f45e58104d21f8196ee3fe9bd2f513d[$i21e55df616c305955791876c1eb4da83448beba2->getCountryId()]) ? '' : $i065c883e3f45e58104d21f8196ee3fe9bd2f513d[$i21e55df616c305955791876c1eb4da83448beba2->getCountryId()]); $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 .= $id1caa2f79c0787a3e797d6d388cd6f00ced4282f['mobile']."\n"; } } } $this->getResponse()->clearHeaders()->setHeader('Content-Type', 'text/html')->setBody($i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4); } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/sendsms') ->_title(Mage::helper('magesms')->__('Send SMS')) ; return $this; } }
app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/StatisticsController.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_Adminhtml_Magesms_StatisticsController extends Topefekt_Magesms_Controller_Action { public function indexAction() { $this->_initAction(); $iea2d876101fbc4dc03450ed5474bbd8a6fb905a2 = $this->getRequest()->getParams(); if (!empty($iea2d876101fbc4dc03450ed5474bbd8a6fb905a2['datefrom'])) $iea2d876101fbc4dc03450ed5474bbd8a6fb905a2['datefrom'] = base64_decode($iea2d876101fbc4dc03450ed5474bbd8a6fb905a2['datefrom']); if (!empty($iea2d876101fbc4dc03450ed5474bbd8a6fb905a2['dateto'])) $iea2d876101fbc4dc03450ed5474bbd8a6fb905a2['dateto'] = base64_decode($iea2d876101fbc4dc03450ed5474bbd8a6fb905a2['dateto']); $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = new Varien_Object(); foreach ($iea2d876101fbc4dc03450ed5474bbd8a6fb905a2 as $i670253c23c6fcba76bc4256a88fdd8fbc1041039 => $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { if (!empty($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89)) $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a->setData($i670253c23c6fcba76bc4256a88fdd8fbc1041039, $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); } $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/statistics.phtml') ); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setFilterData($ia8a35a47a8e61218e15d1a33dac64bdc2449c01a); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } public function filterAction() { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = $this->getRequest()->getParams(); unset($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a['form_key']); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a['datefrom'] = base64_encode($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a['datefrom']); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a['dateto'] = base64_encode($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a['dateto']); $this->_redirect('*/*/', $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a); } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/statistics') ->_title(Mage::helper('magesms')->__('Statistics')) ; return $this; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 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_StatisticsController extends Topefekt_Magesms_Controller_Action { public function indexAction() { $this->_initAction(); $iea2d876101fbc4dc03450ed5474bbd8a6fb905a2 = $this->getRequest()->getParams(); if (!empty($iea2d876101fbc4dc03450ed5474bbd8a6fb905a2['datefrom'])) $iea2d876101fbc4dc03450ed5474bbd8a6fb905a2['datefrom'] = base64_decode($iea2d876101fbc4dc03450ed5474bbd8a6fb905a2['datefrom']); if (!empty($iea2d876101fbc4dc03450ed5474bbd8a6fb905a2['dateto'])) $iea2d876101fbc4dc03450ed5474bbd8a6fb905a2['dateto'] = base64_decode($iea2d876101fbc4dc03450ed5474bbd8a6fb905a2['dateto']); $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = new Varien_Object(); foreach ($iea2d876101fbc4dc03450ed5474bbd8a6fb905a2 as $i670253c23c6fcba76bc4256a88fdd8fbc1041039 => $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { if (!empty($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89)) $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a->setData($i670253c23c6fcba76bc4256a88fdd8fbc1041039, $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); } $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/statistics.phtml') ); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setFilterData($ia8a35a47a8e61218e15d1a33dac64bdc2449c01a); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } public function filterAction() { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = $this->getRequest()->getParams(); unset($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a['form_key']); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a['datefrom'] = base64_encode($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a['datefrom']); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a['dateto'] = base64_encode($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a['dateto']); $this->_redirect('*/*/', $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a); } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/statistics') ->_title(Mage::helper('magesms')->__('Statistics')) ; return $this; } }
app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/WizardController.php CHANGED
@@ -10,7 +10,7 @@
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
  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()).'&currency='.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; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 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()).'&currency='.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/controllers/ApiController.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_ApiController extends Mage_Core_Controller_Front_Action {
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_ApiController extends Mage_Core_Controller_Front_Action {
app/code/community/Topefekt/Magesms/controllers/CartController.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ class Topefekt_Magesms_CartController extends Mage_Core_Controller_Front_Action { public function indexAction() { $this->loadLayout(); $this->renderLayout(); } public function addProductAction() { Mage::helper('magesms')->addOptoutProduct(); $this->_redirectReferer(); } public function removeProductAction() { Mage::helper('magesms')->removeOptoutProduct(); $this->_redirectReferer(); } }
app/code/community/Topefekt/Magesms/controllers/DeliveryController.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_DeliveryController extends Mage_Core_Controller_Front_Action { public function indexAction() { $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = $this->getRequest(); if ($ia8a35a47a8e61218e15d1a33dac64bdc2449c01a->getParam('test') == 1) { echo 'APISMS123'; } else { $this->fef04b8de4410a42fbb4f182ffb5862871ecca677(); } } private function fef04b8de4410a42fbb4f182ffb5862871ecca677() { $i2e233784f2a54347fff339d5268a637485c8d940 = $this->getRequest(); $ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 = 0; $i1bb2c0aebfcc8fd150d9defb9c92972136f814de = ''; switch($i2e233784f2a54347fff339d5268a637485c8d940->getParam('status')) { case 1: $ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 = Topefekt_Magesms_Model_Sms::DELIVERED; break; case 2: $ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 = Topefekt_Magesms_Model_Sms::UNAVAILABLE; $i1bb2c0aebfcc8fd150d9defb9c92972136f814de = 'waiting in SMS centre for delivery to the recipient'; break; case 3: if (strpos($i2e233784f2a54347fff339d5268a637485c8d940->getParam('message'), 'NDNC') !== false) $ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 = Topefekt_Magesms_Model_Sms::DND; elseif (strpos($i2e233784f2a54347fff339d5268a637485c8d940->getParam('message'), 'Message duplicity') !== false) $ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 = Topefekt_Magesms_Model_Sms::DUPLICATE; else $ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 = Topefekt_Magesms_Model_Sms::ERROR; break; case 9: $ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 = Topefekt_Magesms_Model_Sms::DND; $i1bb2c0aebfcc8fd150d9defb9c92972136f814de = 'NDNC - Do Not Call Registered Number'; break; case 10: $ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 = 10; break; } if ($ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 == 10) { list($i5a420d261e8d371c89dc6a3697921a0c5a5b5f2f) = explode(';', $i2e233784f2a54347fff339d5268a637485c8d940->getParam('smsdetails')); $i2310f34bf75d118b8c0d18d2eaa0515723ce3bab = Mage::getModel('magesms/answers'); $i2310f34bf75d118b8c0d18d2eaa0515723ce3bab->setText($i2e233784f2a54347fff339d5268a637485c8d940->getParam('message')); $i2310f34bf75d118b8c0d18d2eaa0515723ce3bab->setFrom($i2e233784f2a54347fff339d5268a637485c8d940->getParam('from')); $i2310f34bf75d118b8c0d18d2eaa0515723ce3bab->setProhlednuto(0); $i2310f34bf75d118b8c0d18d2eaa0515723ce3bab->setSmsc($i5a420d261e8d371c89dc6a3697921a0c5a5b5f2f); $i2310f34bf75d118b8c0d18d2eaa0515723ce3bab->setCas(date('Y-m-d h:i:s', Mage::getModel('core/date')->timestamp())); $i2310f34bf75d118b8c0d18d2eaa0515723ce3bab->save(); } elseif ($ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 > 0) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b = Mage::getModel('magesms/smshistory')->getCollection() ->addFieldToFilter('smsid', array('like' => $i2e233784f2a54347fff339d5268a637485c8d940->getParam('smsID'))); if (!$i5ee2fa256ff77dd811a9c1911f7563263a694e4b->count()) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b = Mage::getModel('magesms/smshistory')->getCollection() ->addFieldToFilter('smsid', array('like' => '%'.$i2e233784f2a54347fff339d5268a637485c8d940->getParam('smsID').'%')); foreach($i5ee2fa256ff77dd811a9c1911f7563263a694e4b as $i5cd55cefb174b99bf007c9ba882a9d55c1557566) { $i5cd55cefb174b99bf007c9ba882a9d55c1557566->setStatus($ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25); if ($i1bb2c0aebfcc8fd150d9defb9c92972136f814de) $i5cd55cefb174b99bf007c9ba882a9d55c1557566->setNote($i1bb2c0aebfcc8fd150d9defb9c92972136f814de); if ($i2e233784f2a54347fff339d5268a637485c8d940->getParam('price')) $i5cd55cefb174b99bf007c9ba882a9d55c1557566->setPrice($i2e233784f2a54347fff339d5268a637485c8d940->getParam('price')); $i5cd55cefb174b99bf007c9ba882a9d55c1557566->save(); } } } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_DeliveryController extends Mage_Core_Controller_Front_Action { public function indexAction() { $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = $this->getRequest(); if ($ia8a35a47a8e61218e15d1a33dac64bdc2449c01a->getParam('test') == 1) { echo 'APISMS123'; } else { $this->fef04b8de4410a42fbb4f182ffb5862871ecca677(); } } private function fef04b8de4410a42fbb4f182ffb5862871ecca677() { $i2e233784f2a54347fff339d5268a637485c8d940 = $this->getRequest(); $ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 = 0; $i1bb2c0aebfcc8fd150d9defb9c92972136f814de = ''; switch($i2e233784f2a54347fff339d5268a637485c8d940->getParam('status')) { case 1: $ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 = Topefekt_Magesms_Model_Sms::DELIVERED; break; case 2: $ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 = Topefekt_Magesms_Model_Sms::UNAVAILABLE; $i1bb2c0aebfcc8fd150d9defb9c92972136f814de = 'waiting in SMS centre for delivery to the recipient'; break; case 3: if (strpos($i2e233784f2a54347fff339d5268a637485c8d940->getParam('message'), 'NDNC') !== false) $ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 = Topefekt_Magesms_Model_Sms::DND; elseif (strpos($i2e233784f2a54347fff339d5268a637485c8d940->getParam('message'), 'Message duplicity') !== false) $ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 = Topefekt_Magesms_Model_Sms::DUPLICATE; else $ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 = Topefekt_Magesms_Model_Sms::ERROR; break; case 9: $ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 = Topefekt_Magesms_Model_Sms::DND; $i1bb2c0aebfcc8fd150d9defb9c92972136f814de = 'NDNC - Do Not Call Registered Number'; break; case 10: $ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 = 10; break; } if ($ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 == 10) { list($i5a420d261e8d371c89dc6a3697921a0c5a5b5f2f) = explode(';', $i2e233784f2a54347fff339d5268a637485c8d940->getParam('smsdetails')); $i2310f34bf75d118b8c0d18d2eaa0515723ce3bab = Mage::getModel('magesms/answers'); $i2310f34bf75d118b8c0d18d2eaa0515723ce3bab->setText($i2e233784f2a54347fff339d5268a637485c8d940->getParam('message')); $i2310f34bf75d118b8c0d18d2eaa0515723ce3bab->setFrom($i2e233784f2a54347fff339d5268a637485c8d940->getParam('from')); $i2310f34bf75d118b8c0d18d2eaa0515723ce3bab->setProhlednuto(0); $i2310f34bf75d118b8c0d18d2eaa0515723ce3bab->setSmsc($i5a420d261e8d371c89dc6a3697921a0c5a5b5f2f); $i2310f34bf75d118b8c0d18d2eaa0515723ce3bab->setCas(date('Y-m-d h:i:s', Mage::getModel('core/date')->timestamp())); $i2310f34bf75d118b8c0d18d2eaa0515723ce3bab->save(); } elseif ($ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 > 0) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b = Mage::getModel('magesms/smshistory')->getCollection() ->addFieldToFilter('smsid', array('like' => $i2e233784f2a54347fff339d5268a637485c8d940->getParam('smsID'))); if (!$i5ee2fa256ff77dd811a9c1911f7563263a694e4b->count()) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b = Mage::getModel('magesms/smshistory')->getCollection() ->addFieldToFilter('smsid', array('like' => '%'.$i2e233784f2a54347fff339d5268a637485c8d940->getParam('smsID').'%')); foreach($i5ee2fa256ff77dd811a9c1911f7563263a694e4b as $i5cd55cefb174b99bf007c9ba882a9d55c1557566) { $i5cd55cefb174b99bf007c9ba882a9d55c1557566->setStatus($ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25); if ($i1bb2c0aebfcc8fd150d9defb9c92972136f814de) $i5cd55cefb174b99bf007c9ba882a9d55c1557566->setNote($i1bb2c0aebfcc8fd150d9defb9c92972136f814de); if ($i2e233784f2a54347fff339d5268a637485c8d940->getParam('price')) $i5cd55cefb174b99bf007c9ba882a9d55c1557566->setPrice($i2e233784f2a54347fff339d5268a637485c8d940->getParam('price')); $i5cd55cefb174b99bf007c9ba882a9d55c1557566->save(); } } } }
app/code/community/Topefekt/Magesms/controllers/IndexController.php CHANGED
@@ -10,7 +10,7 @@
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
  class Topefekt_Magesms_IndexController extends Mage_Core_Controller_Front_Action { public function indexAction() { $this->loadLayout(); $this->renderLayout(); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_IndexController extends Mage_Core_Controller_Front_Action { public function indexAction() { $this->loadLayout(); $this->renderLayout(); } }
app/code/community/Topefekt/Magesms/controllers/MarketingController.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ class Topefekt_Magesms_MarketingController extends Mage_Core_Controller_Front_Action { public function indexAction() { $i21e55df616c305955791876c1eb4da83448beba2 = Mage::getSingleton('customer/session')->getCustomer(); $i21e55df616c305955791876c1eb4da83448beba2->setMagesmsCustomerMarketing(!$i21e55df616c305955791876c1eb4da83448beba2->getMagesmsCustomerMarketing()); $i21e55df616c305955791876c1eb4da83448beba2->save(); Mage::getSingleton('core/session')->addSuccess(Mage::helper('magesms')->__('SMS Marketing').Mage::helper('magesms')->__(' was saved.')); $this->_redirectReferer(); } }
app/code/community/Topefekt/Magesms/data/magesms_setup/data-install-1.0.0.php CHANGED
@@ -10,7 +10,7 @@
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->run("
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.0.1-1.0.2.php CHANGED
@@ -10,7 +10,7 @@
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(); $i195899c9895b81b9bc75dba762c949638a6f36dd = Mage::getModel('magesms/country')->getCollection()->addFieldToFilter('name', array('like' => 'Cameroon')); if (!$i195899c9895b81b9bc75dba762c949638a6f36dd->count()) { $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("INSERT INTO {$this->getTable('magesms_country')} (`name`, `vat`, `currency`) VALUES ('Cameroon', 0, 'EUR');"); } $i811abf08a05f6439fe133c7d48adeb58f4cd090e = Mage::getModel('magesms/country_area')->getCollection()->addFieldToFilter('area', 237); if (!$i811abf08a05f6439fe133c7d48adeb58f4cd090e->count()) { Mage::getModel('magesms/country_area')->setCountryName('Cameroon')->setArea(237)->save(); } $i0367352fbb593d8cb942a7be1f36e67a806ea12e = Mage::getModel('magesms/country_lang')->getCollection()->addFieldToFilter('country_name', array('like' => 'Cameroon')); if (!$i0367352fbb593d8cb942a7be1f36e67a806ea12e->count()) { Mage::getModel('magesms/country_lang')->setCountryName('Cameroon')->setLang('en-cm')->setIso2('en')->save(); Mage::getModel('magesms/country_lang')->setCountryName('Cameroon')->setLang('fr-cm')->setIso2('en')->save(); }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
+ $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $i195899c9895b81b9bc75dba762c949638a6f36dd = Mage::getModel('magesms/country')->getCollection()->addFieldToFilter('name', array('like' => 'Cameroon')); if (!$i195899c9895b81b9bc75dba762c949638a6f36dd->count()) { $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("INSERT INTO {$this->getTable('magesms_country')} (`name`, `vat`, `currency`) VALUES ('Cameroon', 0, 'EUR');"); } $i811abf08a05f6439fe133c7d48adeb58f4cd090e = Mage::getModel('magesms/country_area')->getCollection()->addFieldToFilter('area', 237); if (!$i811abf08a05f6439fe133c7d48adeb58f4cd090e->count()) { Mage::getModel('magesms/country_area')->setCountryName('Cameroon')->setArea(237)->save(); } $i0367352fbb593d8cb942a7be1f36e67a806ea12e = Mage::getModel('magesms/country_lang')->getCollection()->addFieldToFilter('country_name', array('like' => 'Cameroon')); if (!$i0367352fbb593d8cb942a7be1f36e67a806ea12e->count()) { Mage::getModel('magesms/country_lang')->setCountryName('Cameroon')->setLang('en-cm')->setIso2('en')->save(); Mage::getModel('magesms/country_lang')->setCountryName('Cameroon')->setLang('fr-cm')->setIso2('en')->save(); } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup();
app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.0.3-1.0.4.php CHANGED
@@ -10,7 +10,7 @@
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(); $i195899c9895b81b9bc75dba762c949638a6f36dd = Mage::getModel('magesms/country_lang')->getCollection()->addFieldToFilter('lang', array('like' => 'fr-fr')); if (!$i195899c9895b81b9bc75dba762c949638a6f36dd->count()) { $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("INSERT INTO {$this->getTable('magesms_country_lang')} (`country_name`, `lang`, `iso2`) VALUES ('France', 'fr-fr', 'fr');"); } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
@@ -25,4 +25,4 @@ INSERT INTO `{$this->getTable('magesms_hooks')}` (`name`, `info`, `owner`, `grou
25
  ('productLowStock', 'Προϊόν εκτός αποθέματος', 3, 3, '', '', 'ΑΥΤΟ ΤΟ ΠΡΟΙΟΝ ΕΙΝΑΙ ΣΧΕΔΟΝ ΕΚΤΟΣ ΑΠΟΘΕΜΑΤΟΣ, ID: {product_id}, REF: {product_ref}, ΟΝΟΜΑ: {product_name}, ΤΡΕΧΟΥΣΑ ΠΟΣΟΤΗΤΑ: {product_quantity}. ΠΛΗΡΟΦ. ΑΠΟ {shop_name}.', '', '{shop_domain}, {shop_name}, {shop_email}, {shop_phone}<br /><br />{customer_id}, {customer_email}, {customer_lastname}, {customer_firstname}<br /><br />{product_id}, {product_quantity}, {product_name}, {product_ref}, {product_supplier_ref}, {product_ean13}, {product_upc}, {product_supplier_id}, {product_supplier}', 'el');
26
 
27
  UPDATE `{$this->getTable('magesms_country_lang')}` SET `iso2` = 'el' WHERE `country_name` LIKE 'Greece';
28
- ");
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $i195899c9895b81b9bc75dba762c949638a6f36dd = Mage::getModel('magesms/country_lang')->getCollection()->addFieldToFilter('lang', array('like' => 'fr-fr')); if (!$i195899c9895b81b9bc75dba762c949638a6f36dd->count()) { $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("INSERT INTO {$this->getTable('magesms_country_lang')} (`country_name`, `lang`, `iso2`) VALUES ('France', 'fr-fr', 'fr');"); } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
25
  ('productLowStock', 'Προϊόν εκτός αποθέματος', 3, 3, '', '', 'ΑΥΤΟ ΤΟ ΠΡΟΙΟΝ ΕΙΝΑΙ ΣΧΕΔΟΝ ΕΚΤΟΣ ΑΠΟΘΕΜΑΤΟΣ, ID: {product_id}, REF: {product_ref}, ΟΝΟΜΑ: {product_name}, ΤΡΕΧΟΥΣΑ ΠΟΣΟΤΗΤΑ: {product_quantity}. ΠΛΗΡΟΦ. ΑΠΟ {shop_name}.', '', '{shop_domain}, {shop_name}, {shop_email}, {shop_phone}<br /><br />{customer_id}, {customer_email}, {customer_lastname}, {customer_firstname}<br /><br />{product_id}, {product_quantity}, {product_name}, {product_ref}, {product_supplier_ref}, {product_ean13}, {product_upc}, {product_supplier_id}, {product_supplier}', 'el');
26
 
27
  UPDATE `{$this->getTable('magesms_country_lang')}` SET `iso2` = 'el' WHERE `country_name` LIKE 'Greece';
28
+ "); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup();
app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.1.0-1.1.1.php CHANGED
@@ -10,9 +10,9 @@
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(); $i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce = Mage::getModel('magesms/maps')->getCollection()->addFieldToFilter('area', 55)->addFieldToFilter('number', 11); if (!$i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce->count()) { Mage::getModel('magesms/maps')->setArea(55)->setNumber(11)->save(); } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
17
  UPDATE `{$this->getTable('magesms_hooks')}` SET `notice` = '{customer_id}, {customer_email}, {customer_password}, {customer_lastname}, {customer_firstname}<br /><br />{shop_domain}, {shop_name}, {shop_email}, {shop_phone}' WHERE `name` LIKE 'customerRegisterSuccess';
18
- "); $i0933475b5bd80561a9f50282fd9eb0b8345cec4b = Mage::getModel('magesms/variables')->getCollection()->addFieldToFilter('name', 'customer_password'); if (!$i0933475b5bd80561a9f50282fd9eb0b8345cec4b->count()) { Mage::getModel('magesms/variables')->setName('customer_password')->setTemplate('********')->setTranslate(0)->save(); }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce = Mage::getModel('magesms/maps')->getCollection()->addFieldToFilter('area', 55)->addFieldToFilter('number', 11); if (!$i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce->count()) { Mage::getModel('magesms/maps')->setArea(55)->setNumber(11)->save(); } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
17
  UPDATE `{$this->getTable('magesms_hooks')}` SET `notice` = '{customer_id}, {customer_email}, {customer_password}, {customer_lastname}, {customer_firstname}<br /><br />{shop_domain}, {shop_name}, {shop_email}, {shop_phone}' WHERE `name` LIKE 'customerRegisterSuccess';
18
+ "); $i0933475b5bd80561a9f50282fd9eb0b8345cec4b = Mage::getModel('magesms/variables')->getCollection()->addFieldToFilter('name', 'customer_password'); if (!$i0933475b5bd80561a9f50282fd9eb0b8345cec4b->count()) { Mage::getModel('magesms/variables')->setName('customer_password')->setTemplate('********')->setTranslate(0)->save(); } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup();
app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.1.1-1.1.2.php CHANGED
@@ -10,7 +10,7 @@
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(); $i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce = Mage::getModel('magesms/maps')->getCollection()->addFieldToFilter('area', 230)->addFieldToFilter('number', 8); if (!$i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce->count()) { Mage::getModel('magesms/maps')->setArea(230)->setNumber(8)->save(); }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
+ $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce = Mage::getModel('magesms/maps')->getCollection()->addFieldToFilter('area', 230)->addFieldToFilter('number', 8); if (!$i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce->count()) { Mage::getModel('magesms/maps')->setArea(230)->setNumber(8)->save(); } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup();
app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.2.0-1.2.1.php CHANGED
@@ -10,11 +10,11 @@
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
- ");
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 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
+ "); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup();
app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.3.1-1.3.2.php CHANGED
@@ -10,7 +10,7 @@
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(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
@@ -26,4 +26,4 @@ INSERT INTO `{$this->getTable('magesms_hooks')}` (`name`, `info`, `owner`, `grou
26
 
27
  UPDATE `{$this->getTable('magesms_country_lang')}` SET `iso2` = 'sv' WHERE `country_name` LIKE 'Sweden';
28
 
29
- ");
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
26
 
27
  UPDATE `{$this->getTable('magesms_country_lang')}` SET `iso2` = 'sv' WHERE `country_name` LIKE 'Sweden';
28
 
29
+ "); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup();
app/code/community/Topefekt/Magesms/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Topefekt_Magesms>
5
- <version>1.3.2</version>
6
  </Topefekt_Magesms>
7
  </modules>
8
 
@@ -99,6 +99,9 @@
99
  <marketing_filter>
100
  <table>magesms_marketing_filter</table>
101
  </marketing_filter>
 
 
 
102
  </entities>
103
  </magesms_mysql4>
104
  <cataloginventory_resource>
@@ -111,6 +114,7 @@
111
  <magesms_setup>
112
  <setup>
113
  <module>Topefekt_Magesms</module>
 
114
  </setup>
115
  <connection>
116
  <use>core_setup</use>
@@ -224,14 +228,6 @@
224
  </Topefekt_Magesms_ClearOptout>
225
  </observers>
226
  </sales_quote_remove_item>
227
- <checkout_cart_save_after>
228
- <observers>
229
- <Topefekt_Magesms_AllClearOptout>
230
- <class>magesms/observer</class>
231
- <method>cartRemoveAllClearOptout</method>
232
- </Topefekt_Magesms_AllClearOptout>
233
- </observers>
234
- </checkout_cart_save_after>
235
  </events>
236
  <routers>
237
  <magesms>
@@ -272,13 +268,16 @@
272
  <template>
273
  <language>en</language>
274
  </template>
 
 
 
275
  </magesms>
276
  </default>
277
  <crontab>
278
  <jobs>
279
  <topefekt_magesms>
280
  <schedule>
281
- <cron_expr>* * * * *</cron_expr>
282
  </schedule>
283
  <run>
284
  <model>magesms/observer::cronUpdate</model>
2
  <config>
3
  <modules>
4
  <Topefekt_Magesms>
5
+ <version>1.3.4</version>
6
  </Topefekt_Magesms>
7
  </modules>
8
 
99
  <marketing_filter>
100
  <table>magesms_marketing_filter</table>
101
  </marketing_filter>
102
+ <optout_order>
103
+ <table>magesms_optout_order</table>
104
+ </optout_order>
105
  </entities>
106
  </magesms_mysql4>
107
  <cataloginventory_resource>
114
  <magesms_setup>
115
  <setup>
116
  <module>Topefekt_Magesms</module>
117
+ <class>Mage_Eav_Model_Entity_Setup</class>
118
  </setup>
119
  <connection>
120
  <use>core_setup</use>
228
  </Topefekt_Magesms_ClearOptout>
229
  </observers>
230
  </sales_quote_remove_item>
 
 
 
 
 
 
 
 
231
  </events>
232
  <routers>
233
  <magesms>
268
  <template>
269
  <language>en</language>
270
  </template>
271
+ <magesms>
272
+ <enable>1</enable>
273
+ </magesms>
274
  </magesms>
275
  </default>
276
  <crontab>
277
  <jobs>
278
  <topefekt_magesms>
279
  <schedule>
280
+ <cron_expr>0 * * * *</cron_expr>
281
  </schedule>
282
  <run>
283
  <model>magesms/observer::cronUpdate</model>
app/code/community/Topefekt/Magesms/etc/system.xml CHANGED
@@ -16,6 +16,25 @@
16
  <show_in_website>1</show_in_website>
17
  <show_in_store>1</show_in_store>
18
  <groups>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  <template translate="label" module="magesms">
20
  <label>SMS Templates Language</label>
21
  <frontend_type>text</frontend_type>
16
  <show_in_website>1</show_in_website>
17
  <show_in_store>1</show_in_store>
18
  <groups>
19
+ <magesms translate="label" module="magesms">
20
+ <label>Mage SMS module</label>
21
+ <frontend_type>text</frontend_type>
22
+ <sort_order>101</sort_order>
23
+ <show_in_default>1</show_in_default>
24
+ <show_in_website>1</show_in_website>
25
+ <show_in_store>1</show_in_store>
26
+ <fields>
27
+ <enable translate="label,comment" module="magesms">
28
+ <label>Enable Mage SMS</label>
29
+ <frontend_type>select</frontend_type>
30
+ <source_model>adminhtml/system_config_source_yesno</source_model>
31
+ <sort_order>150</sort_order>
32
+ <show_in_default>1</show_in_default>
33
+ <show_in_website>1</show_in_website>
34
+ <show_in_store>1</show_in_store>
35
+ </enable>
36
+ </fields>
37
+ </magesms>
38
  <template translate="label" module="magesms">
39
  <label>SMS Templates Language</label>
40
  <frontend_type>text</frontend_type>
app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-install-0.9.0.php CHANGED
@@ -10,7 +10,7 @@
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(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-install-1.0.0.php CHANGED
@@ -10,7 +10,7 @@
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(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
@@ -228,4 +228,4 @@ CREATE TABLE {$this->getTable('magesms_variables')} (
228
  UNIQUE KEY `name` (`name`)
229
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
230
 
231
- "); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup();
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
228
  UNIQUE KEY `name` (`name`)
229
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
230
 
231
+ "); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup(); if (version_compare(Mage::getVersion(), '1.6', '<')) { include_once dirname(__FILE__).'/../../data/magesms_setup/data-install-1.0.0.php'; }
app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-0.9.11-0.9.12.php CHANGED
@@ -10,7 +10,7 @@
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(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-0.9.12-0.9.13.php CHANGED
@@ -10,7 +10,7 @@
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(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.0.1-1.0.2.php CHANGED
@@ -10,7 +10,7 @@
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(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
@@ -23,4 +23,4 @@ CREATE TABLE IF NOT EXISTS `{$this->getTable('magesms_routes_alternative')}` (
23
  UNIQUE KEY `alternative_unique` (`route_id`,`store_group_id`)
24
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
25
 
26
- "); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup();
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
23
  UNIQUE KEY `alternative_unique` (`route_id`,`store_group_id`)
24
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
25
 
26
+ "); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup(); if (version_compare(Mage::getVersion(), '1.6', '<')) { include_once dirname(__FILE__).'/../../data/magesms_setup/data-upgrade-1.0.1-1.0.2.php'; include_once dirname(__FILE__).'/../../data/magesms_setup/data-upgrade-1.0.3-1.0.4.php'; include_once dirname(__FILE__).'/../../data/magesms_setup/data-upgrade-1.1.0-1.1.1.php'; include_once dirname(__FILE__).'/../../data/magesms_setup/data-upgrade-1.1.1-1.1.2.php'; }
app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.1.3-1.1.4.php CHANGED
@@ -10,11 +10,11 @@
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(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
17
  DELETE FROM `{$this->getTable('magesms_hooks_admins')}`
18
  WHERE `admin_id` NOT IN (
19
  SELECT `ID` FROM `{$this->getTable('magesms_admins')}`);
20
- "); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup();
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
17
  DELETE FROM `{$this->getTable('magesms_hooks_admins')}`
18
  WHERE `admin_id` NOT IN (
19
  SELECT `ID` FROM `{$this->getTable('magesms_admins')}`);
20
+ "); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup(); if (version_compare(Mage::getVersion(), '1.6', '<')) { include_once dirname(__FILE__).'/../../data/magesms_setup/data-upgrade-1.1.3-1.1.4.php'; }
app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.1.5-1.2.0.php CHANGED
@@ -10,7 +10,7 @@
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(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
@@ -35,4 +35,4 @@ CREATE TABLE IF NOT EXISTS `{$this->getTable('magesms_template')}` (
35
  PRIMARY KEY (`id`)
36
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
37
 
38
- ");
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
35
  PRIMARY KEY (`id`)
36
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
37
 
38
+ "); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup();
app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.3.3-1.3.4.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->addAttribute('catalog_product', 'magesms_optout', array( 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE, 'type' => 'int', 'backend' => '', 'frontend' => '', 'label' => 'MageSMS Opt-out', 'input' => 'hidden', 'visible' => false, 'required' => false, 'user_defined' => false, 'default' => '1', 'searchable' => false, 'filterable' => false, 'comparable' => false, 'visible_on_front' => false, 'unique' => false, )); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
17
+ CREATE TABLE IF NOT EXISTS `{$this->getTable('magesms_optout_order')}` (
18
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
19
+ `order_id` int(10) unsigned NOT NULL,
20
+ `disabled` tinyint(1) NOT NULL,
21
+ PRIMARY KEY (`id`),
22
+ KEY `order_id` (`order_id`)
23
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
24
+ "); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->addAttribute('customer', 'magesms_customer_marketing', array( 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE, 'type' => 'int', 'backend' => '', 'frontend' => '', 'label' => 'MageSMS Customer Marketing', 'input' => 'select', 'visible' => true, 'required' => false, 'user_defined' => true, 'default' => '1', 'searchable' => false, 'filterable' => false, 'comparable' => false, 'visible_on_front' => true, 'unique' => false, 'source' => 'eav/entity_attribute_source_boolean', )); $i1b4202c93885bea895a6d1a03d58657ba01d9342 = Mage::getSingleton('eav/config'); $i76200fed8240be52de0fc75ec3367898a197407f = $i1b4202c93885bea895a6d1a03d58657ba01d9342->getAttribute('customer', 'magesms_customer_marketing'); $i76200fed8240be52de0fc75ec3367898a197407f->setData('used_in_forms', array('adminhtml_customer','customer_account_create','customer_account_edit', 'checkout_register')); $i76200fed8240be52de0fc75ec3367898a197407f->save(); $ibad8f78c098260b16424eb12ceee5f8336591d56 = Mage::getModel('customer/customer')->getCollection()->addAttributeToSelect('magesms_customer_marketing'); foreach($ibad8f78c098260b16424eb12ceee5f8336591d56 as $i21e55df616c305955791876c1eb4da83448beba2) { if (is_null($i21e55df616c305955791876c1eb4da83448beba2->getMagesmsCustomerMarketing())) $i21e55df616c305955791876c1eb4da83448beba2->setMagesmsCustomerMarketing(1)->save(); } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup(); if (version_compare(Mage::getVersion(), '1.6', '<')) { include_once dirname(__FILE__).'/../../data/magesms_setup/data-upgrade-1.2.0-1.2.1.php'; include_once dirname(__FILE__).'/../../data/magesms_setup/data-upgrade-1.3.1-1.3.2.php'; }
app/design/adminhtml/default/default/template/topefekt/magesms/about.phtml CHANGED
@@ -10,7 +10,7 @@
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
  ?><h2><?php echo Mage::helper('magesms')->__('About'); ?></h2><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/magesms-logo.png'; ?>" alt="Mage SMS" style="float: right" /><b><?php echo Mage::helper('magesms')->__('Mage SMS module 2013-%s, version ', date('Y')).Mage::getConfig()->getModuleConfig('Topefekt_Magesms')->version; ?></b><br /><?php echo Mage::helper('magesms')->__('Copyright © TOPefekt s.r.o., All rights reserved'); ?><br /><br /><b><?php echo Mage::helper('magesms')->__('Supported Magento versions:'); ?></b><?php echo Mage::getConfig()->getNode('default/config/supported')->versions; ?><br /><br /><b><?php echo Mage::helper('magesms')->__('Developer:'); ?></b><br /><?php echo Mage::helper('magesms')->__('TOPefekt s.r.o.'); ?><br /><br /><b><?php echo Mage::helper('magesms')->__('Address:'); ?></b><br /><?php echo Mage::helper('magesms')->__('B. Nemcove 767/13'); ?><br /><?php echo Mage::helper('magesms')->__('78701 Sumperk'); ?><br /><?php echo Mage::helper('magesms')->__('Czech Republic'); ?><br /><?php echo Mage::helper('magesms')->__('VAT: CZ29444268'); ?><br /><br /><b><?php echo Mage::helper('magesms')->__('Office Telephone:'); ?></b><br /><?php echo Mage::helper('magesms')->__('+420 581 110 998'); ?><br /><br /><b><?php echo Mage::helper('magesms')->__('E-mail:'); ?></b><br /><a href="mailto:<?php echo Mage::helper('magesms')->__('sales@topefekt.com'); ?>"><?php echo Mage::helper('magesms')->__('sales@topefekt.com'); ?></a><br /><a href="mailto:<?php echo Mage::helper('magesms')->__('support@topefekt.com'); ?>"><?php echo Mage::helper('magesms')->__('support@topefekt.com'); ?></a><br /><br /><b><?php echo Mage::helper('magesms')->__('Web:'); ?></b><br /><a href="http://<?php echo Mage::helper('magesms')->__('www.mage-sms.com'); ?>"><?php echo Mage::helper('magesms')->__('www.mage-sms.com'); ?></a><br /><br /><b><?php echo Mage::helper('magesms')->__('Facebook:'); ?></b><br /><iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2Fmagentosms&amp;width&amp;layout=button_count&amp;action=like&amp;show_faces=false&amp;share=true&amp;height=21&amp;appId=242281502635180" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:21px;" allowTransparency="true"></iframe><br /><br /><b><?php echo Mage::helper('magesms')->__('Manual:'); ?></b><br /><a href="http://<?php echo Mage::helper('magesms')->__('www.mage-sms.com/manual.html'); ?>"><?php echo Mage::helper('magesms')->__('www.mage-sms.com/manual.html'); ?></a><br /><br /><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/topefekt-logo.gif'; ?>" alt="TOPefekt" />
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 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')->__('About'); ?></h2><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/magesms-logo.png'; ?>" alt="Mage SMS" style="float: right" /><b><?php echo Mage::helper('magesms')->__('Mage SMS module 2013-%s, version ', date('Y')).Mage::getConfig()->getModuleConfig('Topefekt_Magesms')->version; ?></b><br /><?php echo Mage::helper('magesms')->__('Copyright © TOPefekt s.r.o., All rights reserved'); ?><br /><br /><b><?php echo Mage::helper('magesms')->__('Supported Magento versions:'); ?></b><?php echo Mage::getConfig()->getNode('default/config/supported')->versions; ?><br /><br /><b><?php echo Mage::helper('magesms')->__('Developer:'); ?></b><br /><?php echo Mage::helper('magesms')->__('TOPefekt s.r.o.'); ?><br /><br /><b><?php echo Mage::helper('magesms')->__('Address:'); ?></b><br /><?php echo Mage::helper('magesms')->__('B. Nemcove 767/13'); ?><br /><?php echo Mage::helper('magesms')->__('78701 Sumperk'); ?><br /><?php echo Mage::helper('magesms')->__('Czech Republic'); ?><br /><?php echo Mage::helper('magesms')->__('VAT: CZ29444268'); ?><br /><br /><b><?php echo Mage::helper('magesms')->__('Office Telephone:'); ?></b><br /><?php echo Mage::helper('magesms')->__('+420 581 110 998'); ?><br /><br /><b><?php echo Mage::helper('magesms')->__('E-mail:'); ?></b><br /><a href="mailto:<?php echo Mage::helper('magesms')->__('sales@topefekt.com'); ?>"><?php echo Mage::helper('magesms')->__('sales@topefekt.com'); ?></a><br /><a href="mailto:<?php echo Mage::helper('magesms')->__('support@topefekt.com'); ?>"><?php echo Mage::helper('magesms')->__('support@topefekt.com'); ?></a><br /><br /><b><?php echo Mage::helper('magesms')->__('Web:'); ?></b><br /><a href="http://<?php echo Mage::helper('magesms')->__('www.mage-sms.com'); ?>"><?php echo Mage::helper('magesms')->__('www.mage-sms.com'); ?></a><br /><br /><b><?php echo Mage::helper('magesms')->__('Facebook:'); ?></b><br /><iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2Fmagentosms&amp;width&amp;layout=button_count&amp;action=like&amp;show_faces=false&amp;share=true&amp;height=21&amp;appId=242281502635180" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:21px;" allowTransparency="true"></iframe><br /><br /><b><?php echo Mage::helper('magesms')->__('Manual:'); ?></b><br /><a href="http://<?php echo Mage::helper('magesms')->__('www.mage-sms.com/manual.html'); ?>"><?php echo Mage::helper('magesms')->__('www.mage-sms.com/manual.html'); ?></a><br /><br /><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/topefekt-logo.gif'; ?>" alt="TOPefekt" />
app/design/adminhtml/default/default/template/topefekt/magesms/adminsms.phtml CHANGED
@@ -10,7 +10,7 @@
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
  ?><?php $user = $this->profile->user; ?><?php $lang = $this->profile->lang; ?><h2><?php echo Mage::helper('magesms')->__('Admin SMS'); ?></h2><p><?php echo Mage::helper('magesms')->__('Select events during which shall be shop administrators notified via SMS and customize text of messages.'); ?></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')->__('Unicode SMS'); ?></h4></div><div class="fieldset grid"><form id="magesms_changeunicode" action="<?php echo Mage::getUrl('*/*/saveunicode') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><div class="margin-form"><p><?php echo Mage::helper('magesms')->__('Check only if you want to use Chinese, Arabic, Greek, Hebrew, Korean, Cyrillic, etc. or diacritic in the text of your SMS message (Unicode text allows you to insert characters in all fonts and various other symbols simultaneously. Number of characters in one SMS will be reduced to 70).'); ?></p><input type="checkbox" id="unicode" name="unicode" value="1" <?php echo ($unicode = Mage::getSingleton('magesms/hooks_unicode')->getCollection()->addFilter('type', 'admin')->getFirstItem()->getUnicode()) ? 'checked' : ''; ?> /><label for="unicode"><?php echo Mage::helper('magesms')->__('Unicode SMS'); ?></label><input type="submit" value="<?php echo Mage::helper('magesms')->__('Save'); ?>" class="form-button" /></div></form></div></div><?php foreach ($this->getGroups() as $group): ?><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><?php if ($group->icon): ?><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).$group->icon; ?>" alt="" /> <?php endif; ?><?php echo Mage::helper('magesms')->__($group->name); ?></h4></div><div class="fieldset grid"><?php if (count($group->getHooks())): ?><table class="data" id="gridData"><col /><col width="100px" /><?php $even = 1; foreach($group->getHooks() as $hook): if ($even) $even = 0; else $even = 1; ?><tr id="hist_<?php echo $hook->getName(); ?>" class="pointer 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 if (!$group->getGroup()): ?><?php echo $hook->getInfo(); ?> - <?php echo $statusT = Mage::helper('sales')->__($hook->getStatusName()); ?><?php if ($statusT != $hook->getStatusName()): ?> (<?php echo $hook->getStatusName(); ?>)<?php endif; ?><?php else: ?><?php echo $hook->getName(); ?> - <?php echo $hook->getInfo(); ?><?php endif; ?></td><td class="a-center"><?php $title = $hook->getActive() ? Mage::helper('magesms')->__('Sending notifications via SMS is ACTIVE') : Mage::helper('magesms')->__('Sending notifications via SMS is NOT ACTIVE. To activate SMS sending check „Active“ in desired status detail.'); $img = $hook->getActive() ? 'i_accepted.gif' : 'i_canceled.gif'; ?><span style="cursor:help;" title="<?php echo $title; ?>" onclick="popup_title(this)"><img class="toggle" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/'.$img; ?>"></span></td></tr><tr id="histd_<?php echo $hook->getName(); ?>" style="display:none"><td colspan="2"><form id="hook_<?php echo $hook->getName(); ?>" action="<?php echo Mage::getUrl('*/*/savehook') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><input type="hidden" name="type" value="admins" /><input type="hidden" name="name" value="<?php echo $hook->getName(); ?>" /><?php if ($hook->getPlugin()): ?><input type="hidden" name="plugin" value="<?php echo $hook->getPlugin(); ?>" /><?php endif; ?><div style="display:inline-block;width:350px;"><label style="font-weight:normal;text-align:left;width:350px;"><?php echo Mage::helper('magesms')->__('SMS text'); ?></label><br><textarea id="text_<?php echo $hook->getName(); ?>" name="text" class="required-entry input-text" style="width:290px;height:100px;border:1px solid grey;"><?php echo ($text = $hook->getSmstext()) ? $text : $hook->getTemplate(); ?></textarea></div><div style="display:inline-block;width:320px;"><label style="font-weight:normal;text-align:left"><?php echo Mage::helper('magesms')->__('Preview'); ?> (<span id="label_<?php echo $hook->getName(); ?>"></span>)</label><br><textarea id="textfake_<?php echo $hook->getName(); ?>" name="textfake" disabled="disabled" style="width:290px;height:100px;border:1px solid grey;"></textarea></div><div style="display:inline-block;width:310px; padding-top: 20px;"><?php $admins = Mage::getSingleton('magesms/admins')->getCollection(); $stores = Mage::getModel('core/store_group')->getCollection()->setLoadDefault(false) ?><table class="data"><tr class="headings"><th colspan="<?php echo $stores->count()+1; ?>"><?php echo Mage::helper('magesms')->__('Administrators'); ?></th></tr><?php foreach($admins as $admin): ?><tr><td><?php echo $admin->getName(); ?></td><?php foreach($stores as $store): ?><td><input type="checkbox" name="active_<?php echo $hook->getName().'_'.$admin->getId().'_'.$store->getId(); ?>" id="active_<?php echo $hook->getName().'_'.$admin->getId().'_'.$store->getId(); ?>" value="1" <?php echo !empty($hook[$admin->getId().'_'.$store->getId()]) ? 'checked' : ''; ?> /><label for="active_<?php echo $hook->getName().'_'.$admin->getId().'_'.$store->getId(); ?>"><?php echo $store->getName(); ?></label></td><?php endforeach; ?></tr><?php endforeach; ?></table><br /><br /><br /><div style="float:left;"><input type="submit" value="<?php echo Mage::helper('magesms')->__('Save'); ?>" class="form-button" /></div><div style="float:left;padding-left:20px;"><input value="<?php echo Mage::helper('magesms')->__('Cancel'); ?>" title="Restore unsaved changes to its original state." class="form-button" type="button" onclick="this.form.reset();countitSMS_<?php echo $hook->getName(); ?>.count();" /></div></div></form><script type="text/javascript">//<![CDATA[
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 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; ?><h2><?php echo Mage::helper('magesms')->__('Admin SMS'); ?></h2><p><?php echo Mage::helper('magesms')->__('Select events during which shall be shop administrators notified via SMS and customize text of messages.'); ?></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')->__('Unicode SMS'); ?></h4></div><div class="fieldset grid"><form id="magesms_changeunicode" action="<?php echo Mage::getUrl('*/*/saveunicode') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><div class="margin-form"><p><?php echo Mage::helper('magesms')->__('Check only if you want to use Chinese, Arabic, Greek, Hebrew, Korean, Cyrillic, etc. or diacritic in the text of your SMS message (Unicode text allows you to insert characters in all fonts and various other symbols simultaneously. Number of characters in one SMS will be reduced to 70).'); ?></p><input type="checkbox" id="unicode" name="unicode" value="1" <?php echo ($unicode = Mage::getSingleton('magesms/hooks_unicode')->getCollection()->addFilter('type', 'admin')->getFirstItem()->getUnicode()) ? 'checked' : ''; ?> /><label for="unicode"><?php echo Mage::helper('magesms')->__('Unicode SMS'); ?></label><input type="submit" value="<?php echo Mage::helper('magesms')->__('Save'); ?>" class="form-button" /></div></form></div></div><?php foreach ($this->getGroups() as $group): ?><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><?php if ($group->icon): ?><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).$group->icon; ?>" alt="" /> <?php endif; ?><?php echo Mage::helper('magesms')->__($group->name); ?></h4></div><div class="fieldset grid"><?php if (count($group->getHooks())): ?><table class="data" id="gridData"><col /><col width="100px" /><?php $even = 1; foreach($group->getHooks() as $hook): if ($even) $even = 0; else $even = 1; ?><tr id="hist_<?php echo $hook->getName(); ?>" class="pointer 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 if (!$group->getGroup()): ?><?php echo $hook->getInfo(); ?> - <?php echo $statusT = Mage::helper('sales')->__($hook->getStatusName()); ?><?php if ($statusT != $hook->getStatusName()): ?> (<?php echo $hook->getStatusName(); ?>)<?php endif; ?><?php else: ?><?php echo $hook->getName(); ?> - <?php echo $hook->getInfo(); ?><?php endif; ?></td><td class="a-center"><?php $title = $hook->getActive() ? Mage::helper('magesms')->__('Sending notifications via SMS is ACTIVE') : Mage::helper('magesms')->__('Sending notifications via SMS is NOT ACTIVE. To activate SMS sending check „Active“ in desired status detail.'); $img = $hook->getActive() ? 'i_accepted.gif' : 'i_canceled.gif'; ?><span style="cursor:help;" title="<?php echo $title; ?>" onclick="popup_title(this)"><img class="toggle" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/'.$img; ?>"></span></td></tr><tr id="histd_<?php echo $hook->getName(); ?>" style="display:none"><td colspan="2"><form id="hook_<?php echo $hook->getName(); ?>" action="<?php echo Mage::getUrl('*/*/savehook') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><input type="hidden" name="type" value="admins" /><input type="hidden" name="name" value="<?php echo $hook->getName(); ?>" /><?php if ($hook->getPlugin()): ?><input type="hidden" name="plugin" value="<?php echo $hook->getPlugin(); ?>" /><?php endif; ?><div style="display:inline-block;width:350px;"><label style="font-weight:normal;text-align:left;width:350px;"><?php echo Mage::helper('magesms')->__('SMS text'); ?></label><br><textarea id="text_<?php echo $hook->getName(); ?>" name="text" class="required-entry input-text" style="width:290px;height:100px;border:1px solid grey;"><?php echo ($text = $hook->getSmstext()) ? $text : $hook->getTemplate(); ?></textarea></div><div style="display:inline-block;width:320px;"><label style="font-weight:normal;text-align:left"><?php echo Mage::helper('magesms')->__('Preview'); ?> (<span id="label_<?php echo $hook->getName(); ?>"></span>)</label><br><textarea id="textfake_<?php echo $hook->getName(); ?>" name="textfake" disabled="disabled" style="width:290px;height:100px;border:1px solid grey;"></textarea></div><div style="display:inline-block;width:310px; padding-top: 20px;"><?php $admins = Mage::getSingleton('magesms/admins')->getCollection(); $stores = Mage::getModel('core/store_group')->getCollection()->setLoadDefault(false) ?><table class="data"><tr class="headings"><th colspan="<?php echo $stores->count()+1; ?>"><?php echo Mage::helper('magesms')->__('Administrators'); ?></th></tr><?php foreach($admins as $admin): ?><tr><td><?php echo $admin->getName(); ?></td><?php foreach($stores as $store): ?><td><input type="checkbox" name="active_<?php echo $hook->getName().'_'.$admin->getId().'_'.$store->getId(); ?>" id="active_<?php echo $hook->getName().'_'.$admin->getId().'_'.$store->getId(); ?>" value="1" <?php echo !empty($hook[$admin->getId().'_'.$store->getId()]) ? 'checked' : ''; ?> /><label for="active_<?php echo $hook->getName().'_'.$admin->getId().'_'.$store->getId(); ?>"><?php echo $store->getName(); ?></label></td><?php endforeach; ?></tr><?php endforeach; ?></table><br /><br /><br /><div style="float:left;"><input type="submit" value="<?php echo Mage::helper('magesms')->__('Save'); ?>" class="form-button" /></div><div style="float:left;padding-left:20px;"><input value="<?php echo Mage::helper('magesms')->__('Cancel'); ?>" title="Restore unsaved changes to its original state." class="form-button" type="button" onclick="this.form.reset();countitSMS_<?php echo $hook->getName(); ?>.count();" /></div></div></form><script type="text/javascript">//<![CDATA[
app/design/adminhtml/default/default/template/topefekt/magesms/customersms.phtml CHANGED
@@ -10,7 +10,7 @@
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
  ?><?php $user = $this->profile->user; ?><?php $lang = $this->profile->lang; ?><?php $mutation = $this->getRequest()->getParam('mutation', 'default'); ?><h2><?php echo Mage::helper('magesms')->__('Customer SMS').' - '; ?><?php if ($mutation == 'default') { echo $mutation_text = Mage::helper('magesms')->__('default').' '.Mage::helper('magesms')->__(' language version'); } else { $country = Mage::getSingleton('magesms/hooks_templates')->getCollection() ->addFilter('area', $mutation)->getFirstItem(); echo $mutation_text = $country->getAreaText().' (+'.$mutation.')'; } ?></h2><p><?php echo Mage::helper('magesms')->__('Select events during which shall be customer notified via SMS and customize text of messages. You can also add a new language version of SMS messages for each country separately. In countries with undefined language version will be used default language version.'); ?></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/translation.gif'; ?>" alt="" /> <?php echo Mage::helper('magesms')->__('Add SMS text version'); ?></h4></div><div class="fieldset grid"><div style="float:right"><?php $templates = Mage::getSingleton('magesms/hooks_templates')->getCollection(); if ($templates->count()): ?><table class="data"><tr><td colspan="3"><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/index'); ?>" style="<?php echo $mutation == 'default' ? 'font-weight:bold;' : ''; ?>"><?php echo Mage::helper('magesms')->__('default'); ?></a></td></tr><?php foreach($templates as $template): ?><tr><td><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/index', array('mutation' => $template->getArea())); ?>" style="<?php echo $template->getArea() == $mutation ? 'font-weight:bold;' : ''; ?>"><?php echo $template->getAreaText(); ?></a></td><td>(+<?php echo $template->getArea(); ?>)</td><td><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/delmutation', array('mutation' => $template->getArea())); ?>" onclick="return confirm('<?php echo Mage::helper('magesms')->__('Are you sure to delete').' '.$template->getAreaText().'?'; ?>')"><img title="<?php echo Mage::helper('magesms')->__('DELETE language version'). ' '.$template->getAreaText(); ?>" alt="delete <?php echo $template->getAreaText(); ?>" style="border:0px;" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/delete.gif'; ?>" /></a></td></tr><?php endforeach; ?></table><?php endif; ?></div><form id="magesms_addmutation" action="<?php echo Mage::getUrl('*/*/addmutation') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><div class="margin-form"><label for="country"><?php echo Mage::helper('magesms')->__('Select country: '); ?></label><select name="country" id="country"><?php foreach( Mage::getSingleton('magesms/country_area') ->getCollection() ->addFieldToFilter('area', array('nin'=>array(0))) ->setOrder('country_name', 'ASC') as $country ): ?><option value="<?php echo $country->getArea(); ?>" <?php echo $lang == $country->getCountryName() ? 'selected' : ''; ?>><?php echo $country->getCountryName(); ?> (+<?php echo $country->getArea(); ?>)</option><?php endforeach; ?></select><input type="submit" value="<?php echo Mage::helper('magesms')->__('Add'); ?>" class="form-button" /></div></form><div class="clear"></div></div></div><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')->__('Unicode SMS').' - '.$mutation_text; ?></h4></div><div class="fieldset grid"><form id="magesms_changeunicode" action="<?php echo Mage::getUrl('*/*/saveunicode') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><div class="margin-form"><p><?php echo Mage::helper('magesms')->__('Check only if you want to use Chinese, Arabic, Greek, Hebrew, Korean, Cyrillic, etc. or diacritic in the text of your SMS message (Unicode text allows you to insert characters in all fonts and various other symbols simultaneously. Number of characters in one SMS will be reduced to 70).'); ?></p><input type="checkbox" id="unicode" name="unicode" value="1" <?php echo ($unicode = Mage::getSingleton('magesms/hooks_unicode')->getCollection()->addFilter('area', $mutation)->addFilter('type', 'customer')->getFirstItem()->getUnicode()) ? 'checked' : ''; ?> /><input type="hidden" name="mutation" value="<?php echo $mutation; ?>" /><label for="unicode"><?php echo Mage::helper('magesms')->__('Unicode SMS'); ?></label><input type="submit" value="<?php echo Mage::helper('magesms')->__('Save'); ?>" class="form-button" /></div></form></div></div><?php foreach ($this->getGroups() as $group): ?><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><?php if ($group->icon): ?><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).$group->icon; ?>" alt="" /> <?php endif; ?><?php echo Mage::helper('magesms')->__($group->name); ?></h4></div><div class="fieldset grid"><?php if (count($group->getHooks())): ?><table class="data"><col /><col width="100px" /><?php $even = 1; foreach($group->getHooks() as $hook): if ($even) $even = 0; else $even = 1; ?><tr id="hist_<?php echo $hook->getName(); ?>" 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 if (!$group->getGroup()): ?><?php echo $hook->getInfo(); ?> - <?php echo $statusT = Mage::helper('sales')->__($hook->getStatusName()); ?><?php if ($statusT != $hook->getStatusName()): ?> (<?php echo $hook->getStatusName(); ?>)<?php endif; ?><?php else: ?><?php echo $hook->getName(); ?> - <?php echo $hook->getInfo(); ?><?php endif; ?></td><td class="a-center"><?php $title = $hook->getActive() ? Mage::helper('magesms')->__('Sending notifications via SMS is ACTIVE') : Mage::helper('magesms')->__('Sending notifications via SMS is NOT ACTIVE. To activate SMS sending check „Active“ in desired status detail.'); $img = $hook->getActive() ? 'i_accepted.gif' : 'i_canceled.gif'; ?><span style="cursor:help;" title="<?php echo $title; ?>" onclick="popup_title(this)"><img class="toggle" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/'.$img; ?>"></span></td></tr><tr id="histd_<?php echo $hook->getName(); ?>" style="display:none"><td colspan="2"><form id="hook_<?php echo $hook->getName(); ?>" action="<?php echo Mage::getUrl('*/*/savehook') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><input type="hidden" name="type" value="customers" /><input type="hidden" name="name" value="<?php echo $hook->getName(); ?>" /><input type="hidden" name="mutation" value="<?php echo $mutation; ?>" /><?php if ($hook->getPlugin()): ?><input type="hidden" name="plugin" value="<?php echo $hook->getPlugin(); ?>" /><?php endif; ?><div style="display:inline-block;width:350px;"><label style="font-weight:normal;text-align:left;width:350px;"><?php echo Mage::helper('magesms')->__('SMS text'); ?></label><br><textarea id="text_<?php echo $hook->getName(); ?>" name="text" class="required-entry input-text" style="width:290px;height:100px;border:1px solid grey;"><?php echo ($text = $hook->getSmstext()) ? $text : $hook->getTemplate2(); ?></textarea></div><div style="display:inline-block;width:320px;"><label style="font-weight:normal;text-align:left"><?php echo Mage::helper('magesms')->__('Preview'); ?> (<span id="label_<?php echo $hook->getName(); ?>"></span>)</label><br><textarea id="textfake_<?php echo $hook->getName(); ?>" name="textfake" disabled="disabled" style="width:290px;height:100px;border:1px solid grey;"></textarea></div><div style="display:inline-block;width:310px;"><?php echo Mage::helper('magesms')->__('Active'); ?><br /><br /><input type="checkbox" name="active" id="active_<?php echo $hook->getName(); ?>" value="1" <?php echo $hook->getActive() ? 'checked' : ''; ?> /><label for="active_<?php echo $hook->getName(); ?>"><?php echo Mage::helper('magesms')->__('Active'); ?></label><br /><br /><br /><div style="float:left;"><input type="submit" value="<?php echo Mage::helper('magesms')->__('Save'); ?>" class="form-button" /></div><div style="float:left;padding-left:20px;"><input value="<?php echo Mage::helper('magesms')->__('Cancel'); ?>" title="Restore unsaved changes to its original state." class="form-button" type="button" onclick="this.form.reset();countitSMS_<?php echo $hook->getName(); ?>.count();" /></div></div><?php if ($hook->getCustomForm()): ?><?php echo $hook->getCustomForm();?><?php endif; ?></form><script type="text/javascript">//<![CDATA[
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 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 $mutation = $this->getRequest()->getParam('mutation', 'default'); ?><h2><?php echo Mage::helper('magesms')->__('Customer SMS').' - '; ?><?php if ($mutation == 'default') { echo $mutation_text = Mage::helper('magesms')->__('default').' '.Mage::helper('magesms')->__(' language version'); } else { $country = Mage::getSingleton('magesms/hooks_templates')->getCollection() ->addFilter('area', $mutation)->getFirstItem(); echo $mutation_text = $country->getAreaText().' (+'.$mutation.')'; } ?></h2><p><?php echo Mage::helper('magesms')->__('Select events during which shall be customer notified via SMS and customize text of messages. You can also add a new language version of SMS messages for each country separately. In countries with undefined language version will be used default language version.'); ?></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/translation.gif'; ?>" alt="" /> <?php echo Mage::helper('magesms')->__('Add SMS text version'); ?></h4></div><div class="fieldset grid"><div style="float:right"><?php $templates = Mage::getSingleton('magesms/hooks_templates')->getCollection(); if ($templates->count()): ?><table class="data"><tr><td colspan="3"><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/index'); ?>" style="<?php echo $mutation == 'default' ? 'font-weight:bold;' : ''; ?>"><?php echo Mage::helper('magesms')->__('default'); ?></a></td></tr><?php foreach($templates as $template): ?><tr><td><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/index', array('mutation' => $template->getArea())); ?>" style="<?php echo $template->getArea() == $mutation ? 'font-weight:bold;' : ''; ?>"><?php echo $template->getAreaText(); ?></a></td><td>(+<?php echo $template->getArea(); ?>)</td><td><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/delmutation', array('mutation' => $template->getArea())); ?>" onclick="return confirm('<?php echo Mage::helper('magesms')->__('Are you sure to delete').' '.$template->getAreaText().'?'; ?>')"><img title="<?php echo Mage::helper('magesms')->__('DELETE language version'). ' '.$template->getAreaText(); ?>" alt="delete <?php echo $template->getAreaText(); ?>" style="border:0px;" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/delete.gif'; ?>" /></a></td></tr><?php endforeach; ?></table><?php endif; ?></div><form id="magesms_addmutation" action="<?php echo Mage::getUrl('*/*/addmutation') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><div class="margin-form"><label for="country"><?php echo Mage::helper('magesms')->__('Select country: '); ?></label><select name="country" id="country"><?php foreach( Mage::getSingleton('magesms/country_area') ->getCollection() ->addFieldToFilter('area', array('nin'=>array(0))) ->setOrder('country_name', 'ASC') as $country ): ?><option value="<?php echo $country->getArea(); ?>" <?php echo $lang == $country->getCountryName() ? 'selected' : ''; ?>><?php echo $country->getCountryName(); ?> (+<?php echo $country->getArea(); ?>)</option><?php endforeach; ?></select><input type="submit" value="<?php echo Mage::helper('magesms')->__('Add'); ?>" class="form-button" /></div></form><div class="clear"></div></div></div><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')->__('Unicode SMS').' - '.$mutation_text; ?></h4></div><div class="fieldset grid"><form id="magesms_changeunicode" action="<?php echo Mage::getUrl('*/*/saveunicode') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><div class="margin-form"><p><?php echo Mage::helper('magesms')->__('Check only if you want to use Chinese, Arabic, Greek, Hebrew, Korean, Cyrillic, etc. or diacritic in the text of your SMS message (Unicode text allows you to insert characters in all fonts and various other symbols simultaneously. Number of characters in one SMS will be reduced to 70).'); ?></p><input type="checkbox" id="unicode" name="unicode" value="1" <?php echo ($unicode = Mage::getSingleton('magesms/hooks_unicode')->getCollection()->addFilter('area', $mutation)->addFilter('type', 'customer')->getFirstItem()->getUnicode()) ? 'checked' : ''; ?> /><input type="hidden" name="mutation" value="<?php echo $mutation; ?>" /><label for="unicode"><?php echo Mage::helper('magesms')->__('Unicode SMS'); ?></label><input type="submit" value="<?php echo Mage::helper('magesms')->__('Save'); ?>" class="form-button" /></div></form></div></div><?php foreach ($this->getGroups() as $group): ?><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><?php if ($group->icon): ?><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).$group->icon; ?>" alt="" /> <?php endif; ?><?php echo Mage::helper('magesms')->__($group->name); ?></h4></div><div class="fieldset grid"><?php if (count($group->getHooks())): ?><table class="data"><col /><col width="100px" /><?php $even = 1; foreach($group->getHooks() as $hook): if ($even) $even = 0; else $even = 1; ?><tr id="hist_<?php echo $hook->getName(); ?>" 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 if (!$group->getGroup()): ?><?php echo $hook->getInfo(); ?> - <?php echo $statusT = Mage::helper('sales')->__($hook->getStatusName()); ?><?php if ($statusT != $hook->getStatusName()): ?> (<?php echo $hook->getStatusName(); ?>)<?php endif; ?><?php else: ?><?php echo $hook->getName(); ?> - <?php echo $hook->getInfo(); ?><?php endif; ?></td><td class="a-center"><?php $title = $hook->getActive() ? Mage::helper('magesms')->__('Sending notifications via SMS is ACTIVE') : Mage::helper('magesms')->__('Sending notifications via SMS is NOT ACTIVE. To activate SMS sending check „Active“ in desired status detail.'); $img = $hook->getActive() ? 'i_accepted.gif' : 'i_canceled.gif'; ?><span style="cursor:help;" title="<?php echo $title; ?>" onclick="popup_title(this)"><img class="toggle" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/'.$img; ?>"></span></td></tr><tr id="histd_<?php echo $hook->getName(); ?>" style="display:none"><td colspan="2"><form id="hook_<?php echo $hook->getName(); ?>" action="<?php echo Mage::getUrl('*/*/savehook') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><input type="hidden" name="type" value="customers" /><input type="hidden" name="name" value="<?php echo $hook->getName(); ?>" /><input type="hidden" name="mutation" value="<?php echo $mutation; ?>" /><?php if ($hook->getPlugin()): ?><input type="hidden" name="plugin" value="<?php echo $hook->getPlugin(); ?>" /><?php endif; ?><div style="display:inline-block;width:350px;"><label style="font-weight:normal;text-align:left;width:350px;"><?php echo Mage::helper('magesms')->__('SMS text'); ?></label><br><textarea id="text_<?php echo $hook->getName(); ?>" name="text" class="required-entry input-text" style="width:290px;height:100px;border:1px solid grey;"><?php echo ($text = $hook->getSmstext()) ? $text : $hook->getTemplate2(); ?></textarea></div><div style="display:inline-block;width:320px;"><label style="font-weight:normal;text-align:left"><?php echo Mage::helper('magesms')->__('Preview'); ?> (<span id="label_<?php echo $hook->getName(); ?>"></span>)</label><br><textarea id="textfake_<?php echo $hook->getName(); ?>" name="textfake" disabled="disabled" style="width:290px;height:100px;border:1px solid grey;"></textarea></div><div style="display:inline-block;width:310px;"><?php echo Mage::helper('magesms')->__('Active'); ?><br /><br /><input type="checkbox" name="active" id="active_<?php echo $hook->getName(); ?>" value="1" <?php echo $hook->getActive() ? 'checked' : ''; ?> /><label for="active_<?php echo $hook->getName(); ?>"><?php echo Mage::helper('magesms')->__('Active'); ?></label><br /><br /><br /><div style="float:left;"><input type="submit" value="<?php echo Mage::helper('magesms')->__('Save'); ?>" class="form-button" /></div><div style="float:left;padding-left:20px;"><input value="<?php echo Mage::helper('magesms')->__('Cancel'); ?>" title="Restore unsaved changes to its original state." class="form-button" type="button" onclick="this.form.reset();countitSMS_<?php echo $hook->getName(); ?>.count();" /></div></div><?php if ($hook->getCustomForm()): ?><?php echo $hook->getCustomForm();?><?php endif; ?></form><script type="text/javascript">//<![CDATA[
app/design/adminhtml/default/default/template/topefekt/magesms/history.phtml CHANGED
@@ -10,7 +10,7 @@
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
  ?><?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" />&nbsp;&nbsp;&nbsp;&nbsp;<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" />&nbsp;&nbsp;&nbsp;&nbsp;<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" />&nbsp;&nbsp;&nbsp;&nbsp;<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" />&nbsp;&nbsp;&nbsp;&nbsp;<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>&nbsp;&nbsp;&nbsp;&nbsp;<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(); ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php if ($_obj->getPrice() > 0): ?><b><?php echo Mage::helper('magesms')->__('Credit balance:'); ?></b> <?php echo $_obj->getCredit(); ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php endif; ?><b><?php echo Mage::helper('magesms')->__('Total SMS:'); ?></b> <?php echo $_obj->getTotal(); ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b><?php echo Mage::helper('magesms')->__('Unicode:'); ?></b> <?php echo $_obj->getUnicode() ? Mage::helper('magesms')->__('yes') : Mage::helper('magesms')->__('no'); ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<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; ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?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[
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 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" />&nbsp;&nbsp;&nbsp;&nbsp;<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" />&nbsp;&nbsp;&nbsp;&nbsp;<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" />&nbsp;&nbsp;&nbsp;&nbsp;<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" />&nbsp;&nbsp;&nbsp;&nbsp;<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>&nbsp;&nbsp;&nbsp;&nbsp;<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(); ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php if ($_obj->getPrice() > 0): ?><b><?php echo Mage::helper('magesms')->__('Credit balance:'); ?></b> <?php echo $_obj->getCredit(); ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php endif; ?><b><?php echo Mage::helper('magesms')->__('Total SMS:'); ?></b> <?php echo $_obj->getTotal(); ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b><?php echo Mage::helper('magesms')->__('Unicode:'); ?></b> <?php echo $_obj->getUnicode() ? Mage::helper('magesms')->__('yes') : Mage::helper('magesms')->__('no'); ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<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; ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?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[
app/design/adminhtml/default/default/template/topefekt/magesms/marketing.phtml CHANGED
@@ -10,7 +10,7 @@
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
  ?><?php $user = $this->profile->user; ?><?php $lang = $this->profile->lang; ?><h2><?php echo Mage::helper('magesms')->__('SMS Marketing - customers found: '); ?><span id="magesms-marketing-countit"><?php echo $this->getCollection()->count(); ?></span></h2><p><?php echo Mage::helper('magesms')->__('Write text of message and use advanced filter to target your marketing campaign.'); ?></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 Marketing - bulk SMS text'); ?></h4><span class="right"><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/template', array('action'=>'saveTemplate', 'type' => 1)); ?>" title="<?php echo Mage::helper('magesms')->__('Save template'); ?>" onclick="showPopup(this);return false;">[<?php echo Mage::helper('magesms')->__('Save template'); ?>]</a>&nbsp;&nbsp;&nbsp;<a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/template', array('action'=>'loadTemplate', 'type' => 1)); ?>" title="<?php echo Mage::helper('magesms')->__('Saved Templates'); ?>" onclick="showPopup(this);return false;">[<?php echo Mage::helper('magesms')->__('Saved Templates'); ?>]</a></span></div><div class="fieldset"><form name="formSMS" id="magesms_sendsms" action="<?php echo Mage::helper("adminhtml")->getUrl('*/*/send') ?>" enctype="multipart/form-data" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><input name="filter" type="hidden" value="<?php echo $this->getRequest()->getParam('filter'); ?>" /><div style="float: left;margin-right:30px;width:450px"><label for="text"><?php echo Mage::helper('magesms')->__('Enter SMS text'); ?></label><br /><div class="margin-form"><textarea name="text" id="text" class="required-entry input-text" style="width:420px; height:135px;"><?php echo $this->getSmsData()->getData('text'); ?></textarea></div><div class="clear"></div><span style="font-size:10px;"><?php echo Mage::helper('magesms')->__('Possible variables:'); ?><br /><div id="notice"><?php echo $this->getNotice(); ?></div></span></div><div style="float: left;margin-right:30px;"><label for="text"><?php echo Mage::helper('magesms')->__('Preview'); ?> (<span id="labelSMS"></span>)</label><br /><div class="margin-form"><textarea name="textfake" id="textfake" disabled="disabled" class="required-entry input-text" style="width:420px; height:135px;border:1px solid grey;"></textarea></div></div><div style="float: left;margin-top:1.5em;"><div class="margin-form"><input id="unicode" type="checkbox" value="1" name="unicode" <?php echo $this->getSmsData()->getData('unicode') ? 'checked' : ''; ?> /><label for="unicode"><?php echo Mage::helper('magesms')->__(' Unicode '); ?></label><span style="cursor:help;text-decoration:underline;" title="<?php echo Mage::helper('magesms')->__('Check only if you want to use Chinese, Arabic, Greek, Hebrew, Korean, Cyrillic, etc. or diacritic in the text of your SMS message (Unicode text allows you to insert characters in all fonts and various other symbols simultaneously. Number of characters in one SMS will be reduced to 70).'); ?>" onclick="popup_title(this)">?</span></div><div class="margin-form"><input type="hidden" value="0" name="unique" /><input id="unique" type="checkbox" value="1" name="unique" <?php echo $this->getSmsData()->getData('unique') === '0' ? '' : 'checked'; ?> /><label for="unique"><?php echo Mage::helper('magesms')->__('Remove duplicate numbers'); ?></label></div><div class="margin-form" style="margin-top: 10px"><input id="sendlater" type="checkbox" value="1" onchange="sendlaterx(this)" name="sendlater" <?php echo $this->getSmsData()->getData('sendlater') ? 'checked' : ''; ?> /><label for="sendlater"><?php echo Mage::helper('magesms')->__(' Send later '); ?></label></div><div class="margin-form sendlater-form" id="sendlater-form" style="display: none; padding: 5px 0 0 20px"><label for="date"><?php echo Mage::helper('magesms')->__('Date:'); ?></label><?php $datumodesl = Mage::helper('core')->formatDate( ($_x = $this->getSmsData()->getData('datumodesl')) ? $_x.date(' H:i:s', Mage::getModel('core/date')->timestamp(time())) : date('Y-m-d H:i:s', Mage::getModel('core/date')->timestamp(time())+24*60*60), 'short', false); ?><input type="text" style="width: 100px;" class="input-text validate-sendlater-datumodesl" value="<?php echo $datumodesl; ?>" id="datumodesl" name="datumodesl"/><img style="cursor:pointer" title="<?php echo Mage::helper('magesms')->__('Calendar'); ?>" id="date_select_trig" class="v-middle" alt="" src="<?php echo $this->getSkinUrl("images/grid-cal.gif");?> "/>&nbsp;&nbsp;&nbsp;&nbsp;<label for="date"><?php echo Mage::helper('magesms')->__('Time: '); ?></label><select name="datumodesl_hour"><?php for($hour=1;$hour<=24;$hour++): ?><option value="<?php echo $hour; ?>" <?php echo (($_x = $this->getSmsData()->getData('datumodesl_hour')) ? $_x : 9 ) == $hour ? 'selected' : ''; ?>><?php printf('%02d', $hour); ?></option><?php endfor; ?></select>:<select name="datumodesl_min"><?php for($min=0;$min<=59;$min++): ?><option value="<?php echo $min; ?>" <?php echo $this->getSmsData()->getData('datumodesl_min') == $min ? 'selected' : ''; ?>><?php printf('%02d', $min); ?></option><?php endfor; ?></select><script type="text/javascript">//<![CDATA[
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 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; ?><h2><?php echo Mage::helper('magesms')->__('SMS Marketing - customers found: '); ?><span id="magesms-marketing-countit"><?php echo $this->getCollection()->count(); ?></span></h2><p><?php echo Mage::helper('magesms')->__('Write text of message and use advanced filter to target your marketing campaign.'); ?></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 Marketing - bulk SMS text'); ?></h4><span class="right"><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/template', array('action'=>'saveTemplate', 'type' => 1)); ?>" title="<?php echo Mage::helper('magesms')->__('Save template'); ?>" onclick="showPopup(this);return false;">[<?php echo Mage::helper('magesms')->__('Save template'); ?>]</a>&nbsp;&nbsp;&nbsp;<a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/template', array('action'=>'loadTemplate', 'type' => 1)); ?>" title="<?php echo Mage::helper('magesms')->__('Saved Templates'); ?>" onclick="showPopup(this);return false;">[<?php echo Mage::helper('magesms')->__('Saved Templates'); ?>]</a></span></div><div class="fieldset"><form name="formSMS" id="magesms_sendsms" action="<?php echo Mage::helper("adminhtml")->getUrl('*/*/send') ?>" enctype="multipart/form-data" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><input name="filter" type="hidden" value="<?php echo $this->getRequest()->getParam('filter'); ?>" /><div style="float: left;margin-right:30px;width:450px"><label for="text"><?php echo Mage::helper('magesms')->__('Enter SMS text'); ?></label><br /><div class="margin-form"><textarea name="text" id="text" class="required-entry input-text" style="width:420px; height:135px;"><?php echo $this->getSmsData()->getData('text'); ?></textarea></div><div class="clear"></div><span style="font-size:10px;"><?php echo Mage::helper('magesms')->__('Possible variables:'); ?><br /><div id="notice"><?php echo $this->getNotice(); ?></div></span></div><div style="float: left;margin-right:30px;"><label for="text"><?php echo Mage::helper('magesms')->__('Preview'); ?> (<span id="labelSMS"></span>)</label><br /><div class="margin-form"><textarea name="textfake" id="textfake" disabled="disabled" class="required-entry input-text" style="width:420px; height:135px;border:1px solid grey;"></textarea></div></div><div style="float: left;margin-top:1.5em;"><div class="margin-form"><input id="unicode" type="checkbox" value="1" name="unicode" <?php echo $this->getSmsData()->getData('unicode') ? 'checked' : ''; ?> /><label for="unicode"><?php echo Mage::helper('magesms')->__(' Unicode '); ?></label><span style="cursor:help;text-decoration:underline;" title="<?php echo Mage::helper('magesms')->__('Check only if you want to use Chinese, Arabic, Greek, Hebrew, Korean, Cyrillic, etc. or diacritic in the text of your SMS message (Unicode text allows you to insert characters in all fonts and various other symbols simultaneously. Number of characters in one SMS will be reduced to 70).'); ?>" onclick="popup_title(this)">?</span></div><div class="margin-form"><input type="hidden" value="0" name="unique" /><input id="unique" type="checkbox" value="1" name="unique" <?php echo $this->getSmsData()->getData('unique') === '0' ? '' : 'checked'; ?> /><label for="unique"><?php echo Mage::helper('magesms')->__('Remove duplicate numbers'); ?></label></div><div class="margin-form" style="margin-top: 10px"><input id="sendlater" type="checkbox" value="1" onchange="sendlaterx(this)" name="sendlater" <?php echo $this->getSmsData()->getData('sendlater') ? 'checked' : ''; ?> /><label for="sendlater"><?php echo Mage::helper('magesms')->__(' Send later '); ?></label></div><div class="margin-form sendlater-form" id="sendlater-form" style="display: none; padding: 5px 0 0 20px"><label for="date"><?php echo Mage::helper('magesms')->__('Date:'); ?></label><?php $datumodesl = Mage::helper('core')->formatDate( ($_x = $this->getSmsData()->getData('datumodesl')) ? $_x.date(' H:i:s', Mage::getModel('core/date')->timestamp(time())) : date('Y-m-d H:i:s', Mage::getModel('core/date')->timestamp(time())+24*60*60), 'short', false); ?><input type="text" style="width: 100px;" class="input-text validate-sendlater-datumodesl" value="<?php echo $datumodesl; ?>" id="datumodesl" name="datumodesl"/><img style="cursor:pointer" title="<?php echo Mage::helper('magesms')->__('Calendar'); ?>" id="date_select_trig" class="v-middle" alt="" src="<?php echo $this->getSkinUrl("images/grid-cal.gif");?> "/>&nbsp;&nbsp;&nbsp;&nbsp;<label for="date"><?php echo Mage::helper('magesms')->__('Time: '); ?></label><select name="datumodesl_hour"><?php for($hour=1;$hour<=24;$hour++): ?><option value="<?php echo $hour; ?>" <?php echo (($_x = $this->getSmsData()->getData('datumodesl_hour')) ? $_x : 9 ) == $hour ? 'selected' : ''; ?>><?php printf('%02d', $hour); ?></option><?php endfor; ?></select>:<select name="datumodesl_min"><?php for($min=0;$min<=59;$min++): ?><option value="<?php echo $min; ?>" <?php echo $this->getSmsData()->getData('datumodesl_min') == $min ? 'selected' : ''; ?>><?php printf('%02d', $min); ?></option><?php endfor; ?></select><script type="text/javascript">//<![CDATA[
app/design/adminhtml/default/default/template/topefekt/magesms/marketing/customer.phtml CHANGED
@@ -10,7 +10,7 @@
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
  ?><div class="entry-edit"><div class="entry-edit-head"><h4><?php echo $this->getTitle();?> <?php echo $this->getCollection()->count(); ?></h4></div><fieldset class="magesms-marketing-customer"><?php if ($this->getCollection()->count()): ?><?php if (!$this->getDeleteCustomer() && !Mage::app()->isSingleStoreMode()): ?><div id="magesms-stores"><?php foreach ($this->getWebsites()->getWebsites() as $website): ?><span class="badge" style="background:<?php echo $website->getColorWebsite(); ?>"><?php echo $website->getName(); ?></span><?php endforeach; ?></div><?php endif; ?><?php foreach($this->displayByAlphabet() as $letter=>$customers): ?><div><span class="bigLetter"><?php echo $letter; ?></span><?php $i=0;foreach($customers as $customer): ?><?php if ($this->getDeleteCustomer() || $i < 10): ?><span class="badge <?php echo $this->getDeleteCustomer() ? 'deleted' : '';?>"<?php echo !$this->getDeleteCustomer() ? ' style="background:'.$this->getWebsites()->getColorWebsite($customer->getWebsiteId()).'"' : ''?>><a href="<?php echo Mage::helper("adminhtml")->getUrl('adminhtml/customer/edit', array('id' => $customer->getId())); ?>" title="<?php echo $customer->getCountryId().' - '.$customer->getTelephone(); ?>" target="_blank"><?php echo $customer->lastname?> <?php echo $customer->firstname?></a><a class="delete" onclick="removeCustomer(this); return false;" href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/filter', array('action' => 'removeCustomer', 'id' => $customer->getId())); ?>">x</a></span><?php elseif ($i == 10): ?><span class="badge more"><a title="<?php echo $letter; ?>" href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/filter', array('action' => 'listCustomers', 'letter' => $letter)); ?>" onclick="showPopup(this);return false;"><?php echo Mage::helper('magesms')->__('More...')?></a></span><?php endif; ?><?php $i++; endforeach; ?></div><?php endforeach; ?><?php else: ?><?php echo Mage::helper('magesms')->__('Customers found: 0')?><?php endif; ?></fieldset></div>
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><div class="entry-edit"><div class="entry-edit-head"><h4><?php echo $this->getTitle();?> <?php echo $this->getCollection()->count(); ?></h4></div><fieldset class="magesms-marketing-customer"><?php if ($this->getCollection()->count()): ?><?php if (!$this->getDeleteCustomer() && !Mage::app()->isSingleStoreMode()): ?><div id="magesms-stores"><?php foreach ($this->getWebsites()->getWebsites() as $website): ?><span class="badge" style="background:<?php echo $website->getColorWebsite(); ?>"><?php echo $website->getName(); ?></span><?php endforeach; ?></div><?php endif; ?><?php foreach($this->displayByAlphabet() as $letter=>$customers): ?><div><span class="bigLetter"><?php echo $letter; ?></span><?php $i=0;foreach($customers as $customer): ?><?php if ($this->getDeleteCustomer() || $i < 10): ?><span class="badge <?php echo $this->getDeleteCustomer() ? 'deleted' : '';?>"<?php echo !$this->getDeleteCustomer() ? ' style="background:'.$this->getWebsites()->getColorWebsite($customer->getWebsiteId()).'"' : ''?>><a href="<?php echo Mage::helper("adminhtml")->getUrl('adminhtml/customer/edit', array('id' => $customer->getId())); ?>" title="<?php echo $customer->getCountryId().' - '.$customer->getTelephone(); ?>" target="_blank"><?php echo $customer->lastname?> <?php echo $customer->firstname?></a><a class="delete" onclick="removeCustomer(this); return false;" href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/filter', array('action' => 'removeCustomer', 'id' => $customer->getId())); ?>">x</a></span><?php elseif ($i == 10): ?><span class="badge more"><a title="<?php echo $letter; ?>" href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/filter', array('action' => 'listCustomers', 'letter' => $letter)); ?>" onclick="showPopup(this);return false;"><?php echo Mage::helper('magesms')->__('More...')?></a></span><?php endif; ?><?php $i++; endforeach; ?></div><?php endforeach; ?><?php else: ?><?php echo Mage::helper('magesms')->__('Customers found: 0')?><?php endif; ?></fieldset></div>
app/design/adminhtml/default/default/template/topefekt/magesms/marketing/form.phtml CHANGED
@@ -10,7 +10,7 @@
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
  ?><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>
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 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/optout.phtml CHANGED
@@ -10,11 +10,11 @@
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
- ?><?php $user = $this->profile->user; ?><?php $lang = $this->profile->lang; ?><h2><?php echo Mage::helper('magesms')->__('SMS opt-out - setting SMS opt-out option from the cart and SMS charging'); ?></h2><p><?php echo Mage::helper('magesms')->__('Select an online store for which you want to set in the cart option to unsubscribe SMS notifications, setup cost of SMS messages and define the text that is displayed to the customer in the cart.'); ?></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')->__('Your online stores'); ?></h4></div><div class="fieldset grid"><table class="data"><col /><col width="50" /><?php $even = 1; foreach(Mage::app()->getWebsites($this->_isAdminScopeAllowed) as $website): if ($even) $even = 0; else $even = 1;?><?php $stores = $website->getStoreIds(); $product = Mage::getResourceModel('catalog/product_collection') ->addFieldToFilter('sku', Mage::getConfig()->getNode('default/config/optout')->sku) ->addWebsiteFilter($website->getId()) ->addAttributeToSelect('name') ->addAttributeToSelect('price') ->joinAttribute( 'status', 'catalog_product/status', 'entity_id', null, 'inner', reset($stores)) ->getFirstItem(); ?><tr id="hist_<?php echo $website->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 $website->getName(); ?><?php echo ($_tmp = Mage::getStoreConfig('general/store_information/name', reset($stores))) ? " ($_tmp)" : ''; ?></td><td class="a-center"><?php if ($product->getId() && $product->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_ENABLED) { $img = 'i_accepted.gif'; $title = Mage::helper('magesms')->__('SMS opt-out is ACTIVE'); } else { $img = 'i_canceled.gif'; $title = Mage::helper('magesms')->__('SMS opt-out is NOT ACTIVE. To activate SMS opt-out check the checkbox „Activate displaying SMS opt-out feature in the cart“'); } ?><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/'.$img; ?>" title="<?php echo $title; ?>" /></td></tr><tr id="histd_<?php echo $website->getId(); ?>" class="<?php if ($even) echo 'even'?>" style="display:none"><td colspan="2"><form method="post" id="form_<?php echo $website->getId(); ?>" action="<?php echo Mage::getUrl('*/*/save') ?>" name="form"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><input type="hidden" value="<?php echo $website->getId(); ?>" name="website" /><div style="float:left;width:330px;"><input type="checkbox" name="status" id="status_<?php echo $website->getId(); ?>" value="1"<?php echo $product->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_ENABLED ? ' checked' : ''; ?> /><label for="status_<?php echo $website->getId(); ?>"><?php echo Mage::helper('magesms')->__('Activate displaying SMS opt-out feature in the cart'); ?></label>&nbsp;&nbsp;&nbsp;&nbsp;<br><br><br><div style="float:left;"><input type="submit" class="form-button" name="submitOptOut" value="<?php echo Mage::helper('magesms')->__('Save'); ?>" /></div><div style="float:left;padding-left:20px;"><input type="button" onclick="this.form.reset();" class="form-button" title="<?php echo Mage::helper('magesms')->__('Restore unsaved changes to its original state.'); ?>" value="<?php echo Mage::helper('magesms')->__('Cancel'); ?>" /></div></div><div style="float:left;"><table class="data"><tr class="headings"><th><?php echo Mage::helper('magesms')->__('Price of SMS'); ?></th><th<?php if (!Mage::app()->isSingleStoreMode()): ?> colspan="2"<?php endif; ?>><?php echo Mage::helper('magesms')->__('Text displayed in the cart'); ?></th></tr><?php $i=0; foreach($website->getStores() as $store): $productStore = Mage::getModel('catalog/product') ->setStoreId($store->getId()) ->load($product->getId()); ?><tr><?php if ($i++ == 0): ?><td style="vertical-align: middle;" rowspan="<?php echo count($website->getStores());?>"><span class="required">*</span><input type="text" name="price" class="required-entry validate-zero-or-greater input-text" style="width:60px" value="<?php echo $productStore->getPrice(); ?>" /><strong>[<?php echo $website->getBaseCurrency()->getCode(); ?>]</strong></td><?php endif; ?><?php if (!Mage::app()->isSingleStoreMode()): ?><td><?php echo $store->getName(); ?></td><?php endif; ?><td><span class="required">*</span><input type="text" class="required-entry input-text" name="name[<?php echo $store->getId(); ?>]" style="width:270px" value="<?php echo $this->htmlEscape($productStore->getName()); ?>" /></td></tr><?php endforeach; ?></table></div></form><script type="text/javascript">//<![CDATA[
17
  var sendForm = new varienForm('form_<?php echo $website->getId(); ?>');
18
- //]]></script><br><br><br><br><br><br></td></tr><?php endforeach; ?></table></div></div><script type="text/javascript">//<![CDATA[
19
  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';}};}}<?php if (Mage::app()->isSingleStoreMode()): ?>$$("tr[id*=hist_]")[0].click();<?php else: ?>$("hist_"+window.location.hash.substr(1)).click();<?php endif; ?>});
20
  //]]></script></div>
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 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; ?><h2><?php echo Mage::helper('magesms')->__('SMS opt-out - setting SMS opt-out option from the cart and SMS charging'); ?></h2><p><?php echo Mage::helper('magesms')->__('Select an online store for which you want to set in the cart option to unsubscribe SMS notifications, setup cost of SMS messages and define the text that is displayed to the customer in the cart.'); ?></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')->__('Your online stores'); ?></h4></div><div class="fieldset grid"><table class="data"><col /><col width="50" /><?php $even = 1; foreach(Mage::app()->getWebsites($this->_isAdminScopeAllowed) as $website): if ($even) $even = 0; else $even = 1;?><?php $stores = $website->getStoreIds(); $product = Mage::getResourceModel('catalog/product_collection') ->addFieldToFilter('sku', Mage::getConfig()->getNode('default/config/optout')->sku) ->addWebsiteFilter($website->getId()) ->addAttributeToSelect('name') ->addAttributeToSelect('price') ->joinAttribute( 'status', 'catalog_product/status', 'entity_id', null, 'inner', reset($stores)) ->getFirstItem(); if (!count($stores)) continue; $auto = Mage::getResourceModel('catalog/product')->getAttributeRawValue($product->getId(), 'magesms_optout', reset($stores)); $websiteEnable = Mage::app()->getWebsite($website->getId())->getConfig('magesms/magesms/enable'); ?><tr id="hist_<?php echo $website->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 $website->getName(); ?><?php if ($_tmp = Mage::getStoreConfig('general/store_information/name', reset($stores))) { echo " ($_tmp"; $i = 0; foreach($website->getGroups() as $group) { echo $i ? ', ' : ' - '; echo '<span>'.$group->getName().'</span>'; $i++; } echo ')'; } ?></td><td class="a-center"><?php if ($product->getId() && $product->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_ENABLED) { $img = 'i_accepted.gif'; $title = Mage::helper('magesms')->__('SMS opt-out is ACTIVE'); } else { $img = 'i_canceled.gif'; $title = Mage::helper('magesms')->__('SMS opt-out is NOT ACTIVE. To activate SMS opt-out check the checkbox „Activate displaying SMS opt-out feature in the cart“'); } ?><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/'.$img; ?>" title="<?php echo $title; ?>" /></td></tr><tr id="histd_<?php echo $website->getId(); ?>" class="<?php if ($even) echo 'even'?>" style="display:none"><td colspan="2"><form method="post" id="form_<?php echo $website->getId(); ?>" action="<?php echo Mage::getUrl('*/*/save') ?>" name="form"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><input type="hidden" value="<?php echo $website->getId(); ?>" name="website" /><div style="float:left;width:330px;"><input type="checkbox" name="status" id="status_<?php echo $website->getId(); ?>" <?php echo !$websiteEnable ? 'disabled' : ''; ?> value="1"<?php echo $product->getId() && $product->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_ENABLED ? ' checked' : ''; ?> /><label for="status_<?php echo $website->getId(); ?>"><?php echo Mage::helper('magesms')->__('Activate displaying SMS opt-out feature in the cart'); ?></label><br /><br /><b><?php echo Mage::helper('magesms')->__('Add SMS product to cart:'); ?></b><br /><input type="radio" name="auto" id="auto1_<?php echo $website->getId(); ?>" <?php echo !$websiteEnable ? 'disabled' : ''; ?> value="1" <?php echo $auto ? 'checked' : ''; ?> /><label for="auto1_<?php echo $website->getId(); ?>"><?php echo Mage::helper('magesms')->__('Automatically'); ?></label><br /><input type="radio" name="auto" id="auto0_<?php echo $website->getId(); ?>" <?php echo !$websiteEnable ? 'disabled' : ''; ?> value="0" <?php echo !$auto ? 'checked' : ''; ?> /><label for="auto0_<?php echo $website->getId(); ?>"><?php echo Mage::helper('magesms')->__('Manually'); ?></label><br /><br /><?php if ($websiteEnable): ?><div style="float:left;"><input type="submit" class="form-button disabled" name="submitOptOut" value="<?php echo Mage::helper('magesms')->__('Save'); ?>" /></div><div style="float:left;padding-left:20px;"><input type="button" onclick="this.form.reset();" class="form-button" title="<?php echo Mage::helper('magesms')->__('Restore unsaved changes to its original state.'); ?>" value="<?php echo Mage::helper('magesms')->__('Cancel'); ?>" /></div><?php endif; ?></div><div style="float:left;"><table class="data"><tr class="headings"><th><?php echo Mage::helper('magesms')->__('Price of SMS'); ?></th><th<?php if (!Mage::app()->isSingleStoreMode()): ?> colspan="2"<?php endif; ?>><?php echo Mage::helper('magesms')->__('Text displayed in the cart'); ?></th></tr><?php $i=0; foreach($website->getStores() as $store): $productStore = Mage::getModel('catalog/product') ->setStoreId($store->getId()) ->load($product->getId()); $storeEnable = Mage::getStoreConfig('magesms/magesms/enable', $store->getId()); ?><tr><?php if ($i++ == 0): ?><td style="vertical-align: middle;" rowspan="<?php echo count($website->getStores());?>"><span class="required">*</span><input type="text" name="price" <?php echo !$websiteEnable ? 'disabled' : ''; ?> class="required-entry validate-zero-or-greater input-text" style="width:60px" value="<?php echo $productStore->getPrice(); ?>" /><strong>[<?php echo $website->getBaseCurrency()->getCode(); ?>]</strong></td><?php endif; ?><?php if (!Mage::app()->isSingleStoreMode()): ?><td><?php echo $store->getName(); ?></td><?php endif; ?><td><span class="required">*</span><input type="text" class="required-entry input-text" <?php echo !$storeEnable ? 'disabled' : ''; ?> name="name[<?php echo $store->getId(); ?>]" style="width:270px" value="<?php echo $this->htmlEscape($productStore->getName()); ?>" /></td></tr><?php endforeach; ?></table></div></form><script type="text/javascript">//<![CDATA[
17
  var sendForm = new varienForm('form_<?php echo $website->getId(); ?>');
18
+ //]]></script><br><br><br><br><br><br></td></tr><?php endforeach; ?></table></div></div><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 opt-out - setting Marketing SMS opt-out option for the customer from the user profile'); ?></h4></div><div class="fieldset grid"><form method="post" id="optout_marketing" action="<?php echo Mage::getUrl('*/*/saveOptoutMarketing') ?>" name="form"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><input type="checkbox" name="status" id="status" value="1"<?php echo $this->getOptoutMarketing() ? ' checked' : ''; ?> /><label for="status"><?php echo Mage::helper('magesms')->__('Activate displaying Marketing SMS opt-out feature in the user profile'); ?></label><input type="submit" class="form-button" name="submitOptoutMarketing" value="<?php echo Mage::helper('magesms')->__('Save'); ?>" /></form></div></div><script type="text/javascript">//<![CDATA[
19
  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';}};}}<?php if (Mage::app()->isSingleStoreMode()): ?>$$("tr[id*=hist_]")[0].click();<?php else: ?>$("hist_"+window.location.hash.substr(1)).click();<?php endif; ?>});
20
  //]]></script></div>
app/design/adminhtml/default/default/template/topefekt/magesms/profile.phtml CHANGED
@@ -10,7 +10,7 @@
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
  ?><?php $user = $this->profile->user; ?><?php $lang = $this->profile->lang; ?><script type="text/javascript">//<![CDATA[
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 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; ?><script type="text/javascript">//<![CDATA[
app/design/adminhtml/default/default/template/topefekt/magesms/purchasecredit.phtml CHANGED
@@ -10,7 +10,7 @@
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
  ?><?php $user = $this->profile->user; ?><?php $url = 'pay.topefekt.com/pay.php?user='.$user->getUser().'&passwd='.$user->getPasswd().'&country='.$user->getCountry0(); ?><?php if (Mage::getModel('magesms/country')->getCollection()->addFieldToFilter('name', $user->getCountry0())->getFirstItem()->getVat()): ?><?php $url .= '&vat=0'; ?><?php else: ?><?php $url .= '&vat=1'; ?><?php endif; ?><h2><?php echo Mage::helper('magesms')->__('Purchase Credit'); ?></h2><p><?php echo Mage::helper('magesms')->__(' In case methods for credit purchase are not displayed properly, please click here:'); ?><a href="http://<?php echo $url; ?>" target="_blank"><?php echo Mage::helper('magesms')->__('Purchase Credit'); ?></a></p><br /><iframe frameborder="no" style="margin:0px;padding:0px;width:100%;height:400px" src="https://<?php echo $url.'&parentUrl='.Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);?>"></iframe>
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 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 $url = 'pay.topefekt.com/pay.php?user='.$user->getUser().'&passwd='.$user->getPasswd().'&country='.$user->getCountry0(); ?><?php if (Mage::getModel('magesms/country')->getCollection()->addFieldToFilter('name', $user->getCountry0())->getFirstItem()->getVat()): ?><?php $url .= '&vat=0'; ?><?php else: ?><?php $url .= '&vat=1'; ?><?php endif; ?><h2><?php echo Mage::helper('magesms')->__('Purchase Credit'); ?></h2><p><?php echo Mage::helper('magesms')->__(' In case methods for credit purchase are not displayed properly, please click here:'); ?><a href="http://<?php echo $url; ?>" target="_blank"><?php echo Mage::helper('magesms')->__('Purchase Credit'); ?></a></p><br /><iframe frameborder="no" style="margin:0px;padding:0px;width:100%;height:400px" src="https://<?php echo $url.'&parentUrl='.Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);?>"></iframe>
app/design/adminhtml/default/default/template/topefekt/magesms/sendsms.phtml CHANGED
@@ -10,7 +10,7 @@
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
  ?><?php $user = $this->profile->user; ?><?php $lang = $this->profile->lang; ?><h2><?php echo Mage::helper('magesms')->__('Send SMS'); ?></h2><p><?php echo Mage::helper('magesms')->__('Send SMS or bulk SMS. Enter mobile numbers or upload CSV file.'); ?></p><div id="magesms"><form name="formSMS" id="magesms_sendsms" action="<?php echo Mage::helper("adminhtml")->getUrl('*/*/send') ?>" enctype="multipart/form-data" method="post"><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')->__('Bulk SMS text'); ?></h4><span class="right"><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/template', array('action'=>'saveTemplate')); ?>" title="<?php echo Mage::helper('magesms')->__('Save template'); ?>" onclick="showPopup(this);return false;">[<?php echo Mage::helper('magesms')->__('Save template'); ?>]</a>&nbsp;&nbsp;&nbsp;<a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/template', array('action'=>'loadTemplate')); ?>" title="<?php echo Mage::helper('magesms')->__('Saved Templates'); ?>" onclick="showPopup(this);return false;">[<?php echo Mage::helper('magesms')->__('Saved Templates'); ?>]</a></span></div><div class="fieldset"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><div style="float: left;margin-right:30px;width:450px"><label for="text"><?php echo Mage::helper('magesms')->__('Enter SMS text'); ?></label><br /><div class="margin-form"><textarea name="text" id="text" class="required-entry input-text" style="width:420px; height:135px;"><?php echo $this->getRequest()->getParam('text'); ?></textarea></div><div class="clear"></div><span style="font-size:10px;"><?php echo Mage::helper('magesms')->__('Possible variables:'); ?><br /></span><?php echo $this->getSelectStore(); ?><span style="font-size:10px;"><div id="notice"><?php echo $this->getNotice(); ?></div></span></div><div style="float: left;margin-right:30px;"><label for="text"><?php echo Mage::helper('magesms')->__('Preview'); ?> (<span id="labelSMS"></span>)</label><br /><div class="margin-form"><textarea name="textfake" id="textfake" disabled="disabled" class="required-entry input-text" style="width:420px; height:135px;border:1px solid grey;"></textarea></div></div><div style="float: left;margin-top:1.5em;"><div class="margin-form"><input id="unicode" type="checkbox" value="1" name="unicode" <?php echo $this->getRequest()->getParam('unicode') ? 'checked' : ''; ?> /><label for="unicode"><?php echo Mage::helper('magesms')->__(' Unicode '); ?></label><span style="cursor:help;text-decoration:underline;" title="<?php echo Mage::helper('magesms')->__('Check only if you want to use Chinese, Arabic, Greek, Hebrew, Korean, Cyrillic, etc. or diacritic in the text of your SMS message (Unicode text allows you to insert characters in all fonts and various other symbols simultaneously. Number of characters in one SMS will be reduced to 70).'); ?>" onclick="popup_title(this)">?</span></div><div class="margin-form"><input type="hidden" value="0" name="unique" /><input id="unique" type="checkbox" value="1" name="unique" <?php echo $this->getRequest()->getParam('unique') === '0' ? '' : 'checked'; ?> /><label for="unique"><?php echo Mage::helper('magesms')->__('Remove duplicate numbers'); ?></label></div><div class="margin-form" style="margin-top: 10px"><input id="sendlater" type="checkbox" value="1" onchange="sendlaterx(this)" name="sendlater" <?php echo $this->getRequest()->getParam('sendlater') ? 'checked' : ''; ?> /><label for="sendlater"><?php echo Mage::helper('magesms')->__(' Send later '); ?></label></div><div class="margin-form sendlater-form" id="sendlater-form" style="display: none; padding: 5px 0 0 20px"><label for="date"><?php echo Mage::helper('magesms')->__('Date:'); ?></label><input type="text" style="width: 100px;" class="input-text validate-sendlater-datumodesl" value="<?php echo $this->getRequest()->getParam('datumodesl', Mage::app()->getLocale()->date(Mage::getModel('core/date')->timestamp()+24*60*60, null, null, false)->toString(Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM))); ?>" id="datumodesl" name="datumodesl"/><img style="cursor:pointer" title="<?php echo Mage::helper('magesms')->__('Calendar'); ?>" id="date_select_trig" class="v-middle" alt="" src="<?php echo $this->getSkinUrl("images/grid-cal.gif");?> "/>&nbsp;&nbsp;&nbsp;&nbsp;<label for="date"><?php echo Mage::helper('magesms')->__('Time: '); ?></label><select name="datumodesl_hour"><?php for($hour=1;$hour<=24;$hour++): ?><option value="<?php echo $hour; ?>" <?php echo $this->getRequest()->getParam('datumodesl_hour', 9) == $hour ? 'selected' : ''; ?>><?php printf('%02d', $hour); ?></option><?php endfor; ?></select>:<select name="datumodesl_min"><?php for($min=0;$min<=59;$min++): ?><option value="<?php echo $min; ?>" <?php echo $this->getRequest()->getParam('datumodesl_min', 00) == $min ? 'selected' : ''; ?>><?php printf('%02d', $min); ?></option><?php endfor; ?></select><script type="text/javascript">//<![CDATA[
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 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; ?><h2><?php echo Mage::helper('magesms')->__('Send SMS'); ?></h2><p><?php echo Mage::helper('magesms')->__('Send SMS or bulk SMS. Enter mobile numbers or upload CSV file.'); ?></p><div id="magesms"><form name="formSMS" id="magesms_sendsms" action="<?php echo Mage::helper("adminhtml")->getUrl('*/*/send') ?>" enctype="multipart/form-data" method="post"><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')->__('Bulk SMS text'); ?></h4><span class="right"><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/template', array('action'=>'saveTemplate')); ?>" title="<?php echo Mage::helper('magesms')->__('Save template'); ?>" onclick="showPopup(this);return false;">[<?php echo Mage::helper('magesms')->__('Save template'); ?>]</a>&nbsp;&nbsp;&nbsp;<a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/template', array('action'=>'loadTemplate')); ?>" title="<?php echo Mage::helper('magesms')->__('Saved Templates'); ?>" onclick="showPopup(this);return false;">[<?php echo Mage::helper('magesms')->__('Saved Templates'); ?>]</a></span></div><div class="fieldset"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><div style="float: left;margin-right:30px;width:450px"><label for="text"><?php echo Mage::helper('magesms')->__('Enter SMS text'); ?></label><br /><div class="margin-form"><textarea name="text" id="text" class="required-entry input-text" style="width:420px; height:135px;"><?php echo $this->getRequest()->getParam('text'); ?></textarea></div><div class="clear"></div><span style="font-size:10px;"><?php echo Mage::helper('magesms')->__('Possible variables:'); ?><br /></span><?php echo $this->getSelectStore(); ?><span style="font-size:10px;"><div id="notice"><?php echo $this->getNotice(); ?></div></span></div><div style="float: left;margin-right:30px;"><label for="text"><?php echo Mage::helper('magesms')->__('Preview'); ?> (<span id="labelSMS"></span>)</label><br /><div class="margin-form"><textarea name="textfake" id="textfake" disabled="disabled" class="required-entry input-text" style="width:420px; height:135px;border:1px solid grey;"></textarea></div></div><div style="float: left;margin-top:1.5em;"><div class="margin-form"><input id="unicode" type="checkbox" value="1" name="unicode" <?php echo $this->getRequest()->getParam('unicode') ? 'checked' : ''; ?> /><label for="unicode"><?php echo Mage::helper('magesms')->__(' Unicode '); ?></label><span style="cursor:help;text-decoration:underline;" title="<?php echo Mage::helper('magesms')->__('Check only if you want to use Chinese, Arabic, Greek, Hebrew, Korean, Cyrillic, etc. or diacritic in the text of your SMS message (Unicode text allows you to insert characters in all fonts and various other symbols simultaneously. Number of characters in one SMS will be reduced to 70).'); ?>" onclick="popup_title(this)">?</span></div><div class="margin-form"><input type="hidden" value="0" name="unique" /><input id="unique" type="checkbox" value="1" name="unique" <?php echo $this->getRequest()->getParam('unique') === '0' ? '' : 'checked'; ?> /><label for="unique"><?php echo Mage::helper('magesms')->__('Remove duplicate numbers'); ?></label></div><div class="margin-form" style="margin-top: 10px"><input id="sendlater" type="checkbox" value="1" onchange="sendlaterx(this)" name="sendlater" <?php echo $this->getRequest()->getParam('sendlater') ? 'checked' : ''; ?> /><label for="sendlater"><?php echo Mage::helper('magesms')->__(' Send later '); ?></label></div><div class="margin-form sendlater-form" id="sendlater-form" style="display: none; padding: 5px 0 0 20px"><label for="date"><?php echo Mage::helper('magesms')->__('Date:'); ?></label><input type="text" style="width: 100px;" class="input-text validate-sendlater-datumodesl" value="<?php echo $this->getRequest()->getParam('datumodesl', Mage::app()->getLocale()->date(Mage::getModel('core/date')->timestamp()+24*60*60, null, null, false)->toString(Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM))); ?>" id="datumodesl" name="datumodesl"/><img style="cursor:pointer" title="<?php echo Mage::helper('magesms')->__('Calendar'); ?>" id="date_select_trig" class="v-middle" alt="" src="<?php echo $this->getSkinUrl("images/grid-cal.gif");?> "/>&nbsp;&nbsp;&nbsp;&nbsp;<label for="date"><?php echo Mage::helper('magesms')->__('Time: '); ?></label><select name="datumodesl_hour"><?php for($hour=1;$hour<=24;$hour++): ?><option value="<?php echo $hour; ?>" <?php echo $this->getRequest()->getParam('datumodesl_hour', 9) == $hour ? 'selected' : ''; ?>><?php printf('%02d', $hour); ?></option><?php endfor; ?></select>:<select name="datumodesl_min"><?php for($min=0;$min<=59;$min++): ?><option value="<?php echo $min; ?>" <?php echo $this->getRequest()->getParam('datumodesl_min', 00) == $min ? 'selected' : ''; ?>><?php printf('%02d', $min); ?></option><?php endfor; ?></select><script type="text/javascript">//<![CDATA[
app/design/adminhtml/default/default/template/topefekt/magesms/statistics.phtml CHANGED
@@ -10,7 +10,7 @@
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
  ?><?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')->__('Statistics'); ?></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')->__('Statistics'); ?></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() ?>" /><div class="margin-form" style="text-align: center"><label for="datefrom"><?php echo Mage::helper('magesms')->__('Date from:'); ?></label><input type="text" style="width: 100px;" class="input-text" value="<?php echo $this->getFilterData('datefrom') ? $this->getFilterData('datefrom') : Mage::app()->getLocale()->date(Mage::getModel('core/date')->timestamp(), null, null, false)->toString(Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT)); ?>" id="datefrom" name="datefrom"/><img style="cursor:pointer" title="<?php echo Mage::helper('magesms')->__('Calendar'); ?>" id="date_select_from" class="v-middle" alt="" src="<?php echo $this->getSkinUrl("images/grid-cal.gif");?> "/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label for="dateto"><?php echo Mage::helper('magesms')->__('to: '); ?></label><input type="text" style="width: 100px;" class="input-text" value="<?php echo $this->getFilterData('dateto') ? $this->getFilterData('dateto') : Mage::app()->getLocale()->date(Mage::getModel('core/date')->timestamp(), null, null, false)->toString(Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT)); ?>" id="dateto" name="dateto"/><img style="cursor:pointer" title="<?php echo Mage::helper('magesms')->__('Calendar'); ?>" id="date_select_to" class="v-middle" alt="" src="<?php echo $this->getSkinUrl("images/grid-cal.gif");?> "/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<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->getFilterData('status') ? 'selected' : ''; ?>><?php echo $stat->name; ?></option><?php endforeach; ?></select><input type="hidden" name="eshopsms1" value="0" />&nbsp;&nbsp;&nbsp;&nbsp;<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" />&nbsp;&nbsp;&nbsp;&nbsp;<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" />&nbsp;&nbsp;&nbsp;&nbsp;<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" />&nbsp;&nbsp;&nbsp;&nbsp;<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>&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" value="<?php echo Mage::helper('magesms')->__('Show'); ?>" class="form-button" /></div><script type="text/javascript">//<![CDATA[
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 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')->__('Statistics'); ?></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')->__('Statistics'); ?></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() ?>" /><div class="margin-form" style="text-align: center"><label for="datefrom"><?php echo Mage::helper('magesms')->__('Date from:'); ?></label><input type="text" style="width: 100px;" class="input-text" value="<?php echo $this->getFilterData('datefrom') ? $this->getFilterData('datefrom') : Mage::app()->getLocale()->date(Mage::getModel('core/date')->timestamp(), null, null, false)->toString(Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT)); ?>" id="datefrom" name="datefrom"/><img style="cursor:pointer" title="<?php echo Mage::helper('magesms')->__('Calendar'); ?>" id="date_select_from" class="v-middle" alt="" src="<?php echo $this->getSkinUrl("images/grid-cal.gif");?> "/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label for="dateto"><?php echo Mage::helper('magesms')->__('to: '); ?></label><input type="text" style="width: 100px;" class="input-text" value="<?php echo $this->getFilterData('dateto') ? $this->getFilterData('dateto') : Mage::app()->getLocale()->date(Mage::getModel('core/date')->timestamp(), null, null, false)->toString(Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT)); ?>" id="dateto" name="dateto"/><img style="cursor:pointer" title="<?php echo Mage::helper('magesms')->__('Calendar'); ?>" id="date_select_to" class="v-middle" alt="" src="<?php echo $this->getSkinUrl("images/grid-cal.gif");?> "/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<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->getFilterData('status') ? 'selected' : ''; ?>><?php echo $stat->name; ?></option><?php endforeach; ?></select><input type="hidden" name="eshopsms1" value="0" />&nbsp;&nbsp;&nbsp;&nbsp;<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" />&nbsp;&nbsp;&nbsp;&nbsp;<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" />&nbsp;&nbsp;&nbsp;&nbsp;<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" />&nbsp;&nbsp;&nbsp;&nbsp;<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>&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" value="<?php echo Mage::helper('magesms')->__('Show'); ?>" class="form-button" /></div><script type="text/javascript">//<![CDATA[
app/design/adminhtml/default/default/template/topefekt/magesms/template/form.phtml CHANGED
@@ -10,7 +10,7 @@
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
  ?><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>
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 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
@@ -10,7 +10,7 @@
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
  ?><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[
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 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[
app/design/adminhtml/default/default/template/topefekt/magesms/wizard-edit.phtml CHANGED
@@ -10,7 +10,7 @@
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
  ?><?php $user = $this->profile->user; ?><?php $lang = $this->profile->lang; ?><?php $currency = $this->profile->currency; ?><?php $type = Mage::app()->getRequest()->getParam('type'); if (!$type && ($id = Mage::app()->getRequest()->getParam('id'))) { $type = Mage::getModel('magesms/routes')->load($id)->getType(); } ?><?php if (!($lang = Mage::app()->getRequest()->getParam('country0'))) { $lang = $this->profile->lang; } if (Mage::registry('routes')) { $routes = array(Mage::registry('routes')); } else { $routes = array(Mage::getModel('magesms/routes')->load($id)); $lang = $routes[0]->getAreaText(); } ?><h2><?php echo Mage::helper('magesms')->__('SMS Settings'); ?></h2><p><?php echo Mage::helper('magesms')->__('Define SMS Sender Type for each country separately (Text sender ID, Own mobile number or System number). SMS price depends on the recipient country, selected SMS sender type and amount of payment. In countries with undefined SMS sender type will be used System number sender type.'); ?></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 if ($type == 'admin'): ?><?php echo Mage::helper('magesms')->__('Admin SMS settings'); ?><?php else: ?><?php echo Mage::helper('magesms')->__('Customer SMS settings'); ?><?php endif; ?></h4></div><div class="fieldset grid"><form id="magesms_login" action="<?php echo $this->getUrl('*/*/addcountry'.$type) ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><div class="margin-form" style="text-align: center"><label for="country"><?php echo Mage::helper('magesms')->__('Select country: '); ?></label><select name="country0" id="country"><?php foreach( Mage::getSingleton('magesms/country_area')->getCollection()->setOrder('country_name', 'ASC') as $country ): ?><option value="<?php echo $country->getCountryName(); ?>" <?php echo $lang == $country->getCountryName() ? 'selected' : ''; ?>><?php echo $country->getCountryName(); ?> (+<?php echo $country->getArea(); ?>)</option><?php endforeach; ?></select><input type="submit" value="<?php echo Mage::helper('magesms')->__('ADD/CHANGE SELECTED COUNTRY'); ?>" class="form-button" /></div></form><form id="magesms_addroute" action="<?php echo $this->getUrl('*/*/addroute') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><?php if ($routes): ?><?php include 'wizard-list.phtml'; ?><?php endif; ?><input type="hidden" name="id" value="<?php echo $id; ?>" /><input type="hidden" name="country0" value="<?php echo $lang; ?>" /><input type="hidden" name="area" value="<?php echo $route->getArea(); ?>" /><input type="hidden" name="type" value="<?php echo $type; ?>" /><input type="button" onclick="addrouteForm.submit();" value="<?php echo Mage::helper('magesms')->__('SAVE SMS SETTINGS'); ?>" class="form-button" /></form><script type="text/javascript">//<![CDATA[
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 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 $currency = $this->profile->currency; ?><?php $type = Mage::app()->getRequest()->getParam('type'); if (!$type && ($id = Mage::app()->getRequest()->getParam('id'))) { $type = Mage::getModel('magesms/routes')->load($id)->getType(); } ?><?php if (!($lang = Mage::app()->getRequest()->getParam('country0'))) { $lang = $this->profile->lang; } if (Mage::registry('routes')) { $routes = array(Mage::registry('routes')); } else { $routes = array(Mage::getModel('magesms/routes')->load($id)); $lang = $routes[0]->getAreaText(); } ?><h2><?php echo Mage::helper('magesms')->__('SMS Settings'); ?></h2><p><?php echo Mage::helper('magesms')->__('Define SMS Sender Type for each country separately (Text sender ID, Own mobile number or System number). SMS price depends on the recipient country, selected SMS sender type and amount of payment. In countries with undefined SMS sender type will be used System number sender type.'); ?></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 if ($type == 'admin'): ?><?php echo Mage::helper('magesms')->__('Admin SMS settings'); ?><?php else: ?><?php echo Mage::helper('magesms')->__('Customer SMS settings'); ?><?php endif; ?></h4></div><div class="fieldset grid"><form id="magesms_login" action="<?php echo $this->getUrl('*/*/addcountry'.$type) ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><div class="margin-form" style="text-align: center"><label for="country"><?php echo Mage::helper('magesms')->__('Select country: '); ?></label><select name="country0" id="country"><?php foreach( Mage::getSingleton('magesms/country_area')->getCollection()->setOrder('country_name', 'ASC') as $country ): ?><option value="<?php echo $country->getCountryName(); ?>" <?php echo $lang == $country->getCountryName() ? 'selected' : ''; ?>><?php echo $country->getCountryName(); ?> (+<?php echo $country->getArea(); ?>)</option><?php endforeach; ?></select><input type="submit" value="<?php echo Mage::helper('magesms')->__('ADD/CHANGE SELECTED COUNTRY'); ?>" class="form-button" /></div></form><form id="magesms_addroute" action="<?php echo $this->getUrl('*/*/addroute') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><?php if ($routes): ?><?php include 'wizard-list.phtml'; ?><?php endif; ?><input type="hidden" name="id" value="<?php echo $id; ?>" /><input type="hidden" name="country0" value="<?php echo $lang; ?>" /><input type="hidden" name="area" value="<?php echo $route->getArea(); ?>" /><input type="hidden" name="type" value="<?php echo $type; ?>" /><input type="button" onclick="addrouteForm.submit();" value="<?php echo Mage::helper('magesms')->__('SAVE SMS SETTINGS'); ?>" class="form-button" /></form><script type="text/javascript">//<![CDATA[
app/design/adminhtml/default/default/template/topefekt/magesms/wizard-list.phtml CHANGED
@@ -10,7 +10,7 @@
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
  ?><?php $id = Mage::app()->getRequest()->getParam('id', null); ?><?php $info = $routes[0]->getInfo(); ?><table cellspacing="0" class="data"><tr class="headings"><th><?php echo Mage::helper('magesms')->__('SENDER TYPE'); ?></th><td></td><td></td><th colspan="3" class="a-center"><?php printf(Mage::helper('magesms')->__('SMS PRICE IN %s (excl. VAT)'), $currency); ?></th><td></td></tr><?php foreach($routes as $route): ?><tr class="headings"><td><b><?php echo $route->getAreaText(); ?> (+<?php echo $route->getArea(); ?>)</b><?php if ($id === null): ?><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/edit', array('id' => $route->getId())); ?>"><img title="edit <?php echo $route->getAreaText(); ?>" alt="edit <?php echo $route->getAreaText(); ?>" style="border:0px;" name="submitAddAdmin" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/edit.gif'; ?>"></a><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/delete', array('id' => $route->getId())); ?>" onclick="return confirm('<?php echo Mage::helper('magesms')->__('Are you sure to delete').' '.$route->getAreaText().'?'; ?>')"><img title="delete <?php echo $route->getAreaText(); ?>" alt="delete <?php echo $route->getAreaText(); ?>" style="border:0px;" name="submitAddAdmin" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/delete.gif'; ?>"></a><?php endif; ?></td><th><?php echo Mage::helper('magesms')->__('NETWORK'); ?></th><th class="a-center"><?php echo Mage::helper('magesms')->__('SMS PRICE<br />IN CREDITS'); ?></th><th class="a-center"><?php echo Mage::helper('magesms')->__('payment'); ?> <?php echo $info['payment'][0][0]; ?> (<?php echo $currency; ?>)</th><th class="a-center"><?php echo $info['payment'][1][0]; ?> (<?php echo $currency; ?>)</th><th class="a-center"><?php echo $info['payment'][2][0]; ?> (<?php echo $currency; ?>)</th><th class="a-center"><?php echo Mage::helper('magesms')->__('Unicode'); ?> &nbsp;<span onclick="popup_title(this)" title="<?php echo Mage::helper('magesms')->__('Unicode characters support (Unicode allows you to enter characters in all fonts and various symbols simultaneously. Is used for Chinese, Arabic, Greek, Hebrew, Korean, Cyrillic, etc. or diacritic in the text of your SMS message)'); ?>" style="cursor:help;text-decoration:underline;">?</span></th></tr><?php $info = $route->getInfo(); foreach($info['sms'] as $sendertype => $gates): switch($sendertype) { case Topefekt_Magesms_Model_Routes::SENDER_TEXT: $sender_h = Mage::helper('magesms')->__('TEXT SENDER ID'); if ($id === null) { $add = '<b>'.$route->getData('senderID').'</b>'; if ($route->getAlternatives()) { foreach($route->getAlternatives() as $alternative) $add .= ', '.$alternative->getTextsender(); } if (!Mage::app()->isSingleStoreMode()) { $add .= '<br /><button class="form-button" onclick="location.href=\''.Mage::helper("adminhtml")->getUrl('*/*/alternative', array('id' => $route->getId())).'\'" title="'.Mage::helper('magesms')->__('ADD/CHANGE TEXT SENDER ID').'"><span><span><span>'.Mage::helper('magesms')->__('ADD/CHANGE TEXT SENDER ID').'</span></span></span></buton>'; } } else $add = Mage::helper('magesms')->__('e.g.:').' myweb.com'; $pozn = "<span style=\"font-size:10px;\">&nbsp;&nbsp;- ".$add."</span>"; break; case Topefekt_Magesms_Model_Routes::SENDER_SYSTEM: $sender_h = Mage::helper('magesms')->__('SYSTEM NUMBER'); $pozn = "<span style=\"font-size:10px;\">&nbsp;&nbsp;- ".Mage::helper('magesms')->__('e.g.:')." +420602123456</span>"; break; case Topefekt_Magesms_Model_Routes::SENDER_OWN: $sender_h = Mage::helper('magesms')->__('OWN NUMBER SENDER ID'); if ($id === null) $add = '<b>+'.$route->getData('senderID').'</b>'; else $add = Mage::helper('magesms')->__('e.g.:').' +447971796595'; $pozn = "<span style=\"font-size:10px;\">&nbsp;&nbsp;- ".$add."</span>"; break; case Topefekt_Magesms_Model_Routes::SENDER_SIM: $sender_h = Mage::helper('magesms')->__('SIM HOSTING'); $pozn = ""; break; } ?><?php foreach($gates as $gate => $networks): ?><?php if ($id === null ) { if ($route->getIsms() != $gate || $route->getSendertype() != $sendertype ) continue; } $prid = ''; if ($sendertype == 3) $prid = ' ('.$gate.')'; ?><tr class="row"><td rowspan="<?php echo count($networks); ?>"><?php if ($id !== null): ?><input type="radio" name="isms" id="isms_<?php echo $gate.'_'.$sendertype; ?>" value="<?php echo $gate.';'.$sendertype; ?>" <?php echo $route->getIsms() == $gate && $route->getSendertype() == $sendertype ? 'checked' : ''; ?> /><label for="isms_<?php echo $gate.'_'.$sendertype; ?>"><?php echo $sender_h.$prid.$pozn; ?></label><?php else: ?><?php echo $sender_h.$prid.$pozn; ?><?php endif; ?></td><?php $even = 0; foreach($networks as $network => $price): ?><?php if ($even): ?><tr class="<?php if ($even % 2) { echo "even"; $even++; } else { $even++; } ?>"><?php else: $even++;?><?php endif; ?><td><?php echo $network; ?></td><td class="a-center"><?php echo Mage::helper('magesms')->formatPrice($price['credit'], 2); ?></td><td class="a-center"><?php echo Mage::helper('magesms')->formatPrice($price['pay1']); ?></td><td class="a-center"><?php echo Mage::helper('magesms')->formatPrice($price['pay2']); ?></td><td class="a-center"><?php echo Mage::helper('magesms')->formatPrice($price['pay3']); ?></td><td class="a-center"><?php if ($price['unicode'] > 0): ?><img alt="<?php echo Mage::helper('magesms')->__('UNICODE SUPPORTED'); ?>" style="border:0px" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA); ?>/magesms/i_accepted.gif"><?php else: ?><img alt="<?php echo Mage::helper('magesms')->__('UNICODE UNSUPPORTED'); ?>" style="border:0px" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA); ?>/magesms/i_canceled.gif"><?php endif; ?></td></tr><?php endforeach; ?><?php endforeach; ?><?php endforeach; ?><?php endforeach; ?></table><script type="text/javascript">//<![CDATA[
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><?php $id = Mage::app()->getRequest()->getParam('id', null); ?><?php $info = $routes[0]->getInfo(); ?><table cellspacing="0" class="data"><tr class="headings"><th><?php echo Mage::helper('magesms')->__('SENDER TYPE'); ?></th><td></td><td></td><th colspan="3" class="a-center"><?php printf(Mage::helper('magesms')->__('SMS PRICE IN %s (excl. VAT)'), $currency); ?></th><td></td></tr><?php foreach($routes as $route): ?><tr class="headings"><td><b><?php echo $route->getAreaText(); ?> (+<?php echo $route->getArea(); ?>)</b><?php if ($id === null): ?><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/edit', array('id' => $route->getId())); ?>"><img title="edit <?php echo $route->getAreaText(); ?>" alt="edit <?php echo $route->getAreaText(); ?>" style="border:0px;" name="submitAddAdmin" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/edit.gif'; ?>"></a><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/delete', array('id' => $route->getId())); ?>" onclick="return confirm('<?php echo Mage::helper('magesms')->__('Are you sure to delete').' '.$route->getAreaText().'?'; ?>')"><img title="delete <?php echo $route->getAreaText(); ?>" alt="delete <?php echo $route->getAreaText(); ?>" style="border:0px;" name="submitAddAdmin" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/delete.gif'; ?>"></a><?php endif; ?></td><th><?php echo Mage::helper('magesms')->__('NETWORK'); ?></th><th class="a-center"><?php echo Mage::helper('magesms')->__('SMS PRICE<br />IN CREDITS'); ?></th><th class="a-center"><?php echo Mage::helper('magesms')->__('payment'); ?> <?php echo $info['payment'][0][0]; ?> (<?php echo $currency; ?>)</th><th class="a-center"><?php echo $info['payment'][1][0]; ?> (<?php echo $currency; ?>)</th><th class="a-center"><?php echo $info['payment'][2][0]; ?> (<?php echo $currency; ?>)</th><th class="a-center"><?php echo Mage::helper('magesms')->__('Unicode'); ?> &nbsp;<span onclick="popup_title(this)" title="<?php echo Mage::helper('magesms')->__('Unicode characters support (Unicode allows you to enter characters in all fonts and various symbols simultaneously. Is used for Chinese, Arabic, Greek, Hebrew, Korean, Cyrillic, etc. or diacritic in the text of your SMS message)'); ?>" style="cursor:help;text-decoration:underline;">?</span></th></tr><?php $info = $route->getInfo(); foreach($info['sms'] as $sendertype => $gates): switch($sendertype) { case Topefekt_Magesms_Model_Routes::SENDER_TEXT: $sender_h = Mage::helper('magesms')->__('TEXT SENDER ID'); if ($id === null) { $add = '<b>'.$route->getData('senderID').'</b>'; if ($route->getAlternatives()) { foreach($route->getAlternatives() as $alternative) $add .= ', '.$alternative->getTextsender(); } if (!Mage::app()->isSingleStoreMode()) { $add .= '<br /><button class="form-button" onclick="location.href=\''.Mage::helper("adminhtml")->getUrl('*/*/alternative', array('id' => $route->getId())).'\'" title="'.Mage::helper('magesms')->__('ADD/CHANGE TEXT SENDER ID').'"><span><span><span>'.Mage::helper('magesms')->__('ADD/CHANGE TEXT SENDER ID').'</span></span></span></buton>'; } } else $add = Mage::helper('magesms')->__('e.g.:').' myweb.com'; $pozn = "<span style=\"font-size:10px;\">&nbsp;&nbsp;- ".$add."</span>"; break; case Topefekt_Magesms_Model_Routes::SENDER_SYSTEM: $sender_h = Mage::helper('magesms')->__('SYSTEM NUMBER'); $pozn = "<span style=\"font-size:10px;\">&nbsp;&nbsp;- ".Mage::helper('magesms')->__('e.g.:')." +420602123456</span>"; break; case Topefekt_Magesms_Model_Routes::SENDER_OWN: $sender_h = Mage::helper('magesms')->__('OWN NUMBER SENDER ID'); if ($id === null) $add = '<b>+'.$route->getData('senderID').'</b>'; else $add = Mage::helper('magesms')->__('e.g.:').' +447971796595'; $pozn = "<span style=\"font-size:10px;\">&nbsp;&nbsp;- ".$add."</span>"; break; case Topefekt_Magesms_Model_Routes::SENDER_SIM: $sender_h = Mage::helper('magesms')->__('SIM HOSTING'); $pozn = ""; break; } ?><?php foreach($gates as $gate => $networks): ?><?php if ($id === null ) { if ($route->getIsms() != $gate || $route->getSendertype() != $sendertype ) continue; } $prid = ''; if ($sendertype == 3) $prid = ' ('.$gate.')'; ?><tr class="row"><td rowspan="<?php echo count($networks); ?>"><?php if ($id !== null): ?><input type="radio" name="isms" id="isms_<?php echo $gate.'_'.$sendertype; ?>" value="<?php echo $gate.';'.$sendertype; ?>" <?php echo $route->getIsms() == $gate && $route->getSendertype() == $sendertype ? 'checked' : ''; ?> /><label for="isms_<?php echo $gate.'_'.$sendertype; ?>"><?php echo $sender_h.$prid.$pozn; ?></label><?php else: ?><?php echo $sender_h.$prid.$pozn; ?><?php endif; ?></td><?php $even = 0; foreach($networks as $network => $price): ?><?php if ($even): ?><tr class="<?php if ($even % 2) { echo "even"; $even++; } else { $even++; } ?>"><?php else: $even++;?><?php endif; ?><td><?php echo $network; ?></td><td class="a-center"><?php echo Mage::helper('magesms')->formatPrice($price['credit'], 2); ?></td><td class="a-center"><?php echo Mage::helper('magesms')->formatPrice($price['pay1']); ?></td><td class="a-center"><?php echo Mage::helper('magesms')->formatPrice($price['pay2']); ?></td><td class="a-center"><?php echo Mage::helper('magesms')->formatPrice($price['pay3']); ?></td><td class="a-center"><?php if ($price['unicode'] > 0): ?><img alt="<?php echo Mage::helper('magesms')->__('UNICODE SUPPORTED'); ?>" style="border:0px" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA); ?>/magesms/i_accepted.gif"><?php else: ?><img alt="<?php echo Mage::helper('magesms')->__('UNICODE UNSUPPORTED'); ?>" style="border:0px" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA); ?>/magesms/i_canceled.gif"><?php endif; ?></td></tr><?php endforeach; ?><?php endforeach; ?><?php endforeach; ?><?php endforeach; ?></table><script type="text/javascript">//<![CDATA[
app/design/adminhtml/default/default/template/topefekt/magesms/wizard-sender.phtml CHANGED
@@ -10,7 +10,7 @@
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
  ?><?php $routes = Mage::getSingleton('adminhtml/session')->getData('routes'); ?><h2><?php if ($routes->getSendertype() == 0): ?><?php echo Mage::helper('magesms')->__('SMS Settings - Select Text sender ID for '); ?><?php elseif ($routes->getSendertype() == 2): ?><?php echo Mage::helper('magesms')->__('SMS Settings - Select Own number sender ID for '); ?><?php else: return; ?><?php endif; ?><?php echo $routes->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 if ($routes->getSendertype() == 0): ?><?php echo Mage::helper('magesms')->__('Text sender ID settings'); ?><?php else: ?><?php echo Mage::helper('magesms')->__('Own number sender ID settings'); ?><?php endif; ?></h4></div><div class="fieldset grid"><form id="magesms_sender" action="<?php echo $this->getUrl('*/*/savesender') ?>" method="post" onkeypress="return event.keyCode != 13;"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><?php if ($routes->getSendertype() == 0): ?><?php $senders = Mage::getSingleton('magesms/textsender')->getCollection(); $prefix = ''; $first = Mage::helper('magesms')->__('Text sender ID'); $label1 = Mage::helper('magesms')->__('Existing Text sender ID:'); $label2 = Mage::helper('magesms')->__('New Text sender ID:'); $maxlength = 11; $desc = Mage::helper('magesms')->__('max. 11 characters'); ?><?php else: ?><?php $senders = Mage::getSingleton('magesms/ownnumbersender')->getCollection(); $prefix = '+'; $first = Mage::helper('magesms')->__('Own number sender ID'); $label1 = Mage::helper('magesms')->__('Existing Own number:'); $label2 = Mage::helper('magesms')->__('New Own number sender ID:'); $maxlength = 30; $desc = Mage::helper('magesms')->__('in international format, no leading <br />zeros or a “+” sign, e.g., 447971796595'); ?><?php endif; ?><?php if ($routes->displayCode === true): ?><div class="margin-form" id="senderx"><label class="form-required" for="newsender"><?php echo $label2; ?> <span class="required">*</span></label><?php echo $routes->getData('senderID'); ?></div><div class="margin-form"><label class="form-required" for="code"><?php echo Mage::helper('magesms')->__('SMS code:'); ?> <span class="required">*</span></label><input class="required-entry validate-sender input-text" type="text" name="code" id="code" value="" /></div><?php else: ?><?php if ($senders->count()): ?><div class="margin-form"><label class="form-required" for="sender"><?php echo $label1; ?> <span class="required">*</span></label><select class="" name="sender" id="sender"><option value="">-><?php echo $first; ?></option><?php foreach($senders as $sender): ?><option value="<?php echo $sender->getVal(); ?>"><?php echo $prefix.$sender->getVal(); ?></option><?php endforeach; ?></select></div><?php endif; ?><div class="margin-form" id="senderx"><label class="form-required" for="newsender"><?php echo $label2; ?> <span class="required">*</span></label><input class="required-entry validate-sender input-text" maxlength="<?php echo $maxlength; ?>" type="text" name="newsender" id="newsender" value="" /><p><?php echo $desc; ?></p></div><?php endif; ?><div class="margin-form"><input type="button" onclick="senderForm.submit();" value="<?php echo Mage::helper('magesms')->__('CONFIRM'); ?>" class="form-button" /></div></form><script type="text/javascript">//<![CDATA[
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><?php $routes = Mage::getSingleton('adminhtml/session')->getData('routes'); ?><h2><?php if ($routes->getSendertype() == 0): ?><?php echo Mage::helper('magesms')->__('SMS Settings - Select Text sender ID for '); ?><?php elseif ($routes->getSendertype() == 2): ?><?php echo Mage::helper('magesms')->__('SMS Settings - Select Own number sender ID for '); ?><?php else: return; ?><?php endif; ?><?php echo $routes->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 if ($routes->getSendertype() == 0): ?><?php echo Mage::helper('magesms')->__('Text sender ID settings'); ?><?php else: ?><?php echo Mage::helper('magesms')->__('Own number sender ID settings'); ?><?php endif; ?></h4></div><div class="fieldset grid"><form id="magesms_sender" action="<?php echo $this->getUrl('*/*/savesender') ?>" method="post" onkeypress="return event.keyCode != 13;"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><?php if ($routes->getSendertype() == 0): ?><?php $senders = Mage::getSingleton('magesms/textsender')->getCollection(); $prefix = ''; $first = Mage::helper('magesms')->__('Text sender ID'); $label1 = Mage::helper('magesms')->__('Existing Text sender ID:'); $label2 = Mage::helper('magesms')->__('New Text sender ID:'); $maxlength = 11; $desc = Mage::helper('magesms')->__('max. 11 characters'); ?><?php else: ?><?php $senders = Mage::getSingleton('magesms/ownnumbersender')->getCollection(); $prefix = '+'; $first = Mage::helper('magesms')->__('Own number sender ID'); $label1 = Mage::helper('magesms')->__('Existing Own number:'); $label2 = Mage::helper('magesms')->__('New Own number sender ID:'); $maxlength = 30; $desc = Mage::helper('magesms')->__('in international format, no leading <br />zeros or a “+” sign, e.g., 447971796595'); ?><?php endif; ?><?php if ($routes->displayCode === true): ?><div class="margin-form" id="senderx"><label class="form-required" for="newsender"><?php echo $label2; ?> <span class="required">*</span></label><?php echo $routes->getData('senderID'); ?></div><div class="margin-form"><label class="form-required" for="code"><?php echo Mage::helper('magesms')->__('SMS code:'); ?> <span class="required">*</span></label><input class="required-entry validate-sender input-text" type="text" name="code" id="code" value="" /></div><?php else: ?><?php if ($senders->count()): ?><div class="margin-form"><label class="form-required" for="sender"><?php echo $label1; ?> <span class="required">*</span></label><select class="" name="sender" id="sender"><option value="">-><?php echo $first; ?></option><?php foreach($senders as $sender): ?><option value="<?php echo $sender->getVal(); ?>"><?php echo $prefix.$sender->getVal(); ?></option><?php endforeach; ?></select></div><?php endif; ?><div class="margin-form" id="senderx"><label class="form-required" for="newsender"><?php echo $label2; ?> <span class="required">*</span></label><input class="required-entry validate-sender input-text" maxlength="<?php echo $maxlength; ?>" type="text" name="newsender" id="newsender" value="" /><p><?php echo $desc; ?></p></div><?php endif; ?><div class="margin-form"><input type="button" onclick="senderForm.submit();" value="<?php echo Mage::helper('magesms')->__('CONFIRM'); ?>" class="form-button" /></div></form><script type="text/javascript">//<![CDATA[
app/design/adminhtml/default/default/template/topefekt/magesms/wizard.phtml CHANGED
@@ -10,7 +10,7 @@
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
  ?><?php $user = $this->profile->user; ?><?php $lang = $this->profile->lang; ?><?php $currency = $this->profile->currency; ?><div style="float: right;"><form action="<?php echo $this->getUrl('*/*/updatepricelist') ?>" 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')->__('Update pricelist'); ?>" class="form-button" /></form></div><h2><?php echo Mage::helper('magesms')->__('SMS Settings'); ?></h2><p><?php echo Mage::helper('magesms')->__('Define SMS Sender Type for each country separately (Text sender ID, Own mobile number or System number). SMS price depends on the recipient country, selected SMS sender type and amount of payment. In countries with undefined SMS sender type will be used System number sender type.'); ?></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')->__('Customer SMS settings'); ?></h4></div><div class="fieldset grid"><form id="magesms_addcountryuser" action="<?php echo $this->getUrl('*/*/addcountrycustomer') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><div class="margin-form" style="text-align: center"><label for="country"><?php echo Mage::helper('magesms')->__('Select country: '); ?></label><select name="country0" id="country"><?php foreach( Mage::getSingleton('magesms/country_area')->getCollection()->setOrder('country_name', 'ASC') as $country ): ?><option value="<?php echo $country->getCountryName(); ?>" <?php echo $lang == $country->getCountryName() ? 'selected' : ''; ?>><?php echo $country->getCountryName(); ?> (+<?php echo $country->getArea(); ?>)</option><?php endforeach; ?></select><input type="submit" value="<?php echo Mage::helper('magesms')->__('ADD/CHANGE SELECTED COUNTRY'); ?>" class="form-button" /></div></form><?php if ($routes = Mage::getSingleton('magesms/routes')->loadData('customer')): ?><?php include 'wizard-list.phtml'; ?><?php endif; ?></div></div><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')->__('Admin SMS settings'); ?></h4></div><div class="fieldset grid"><form id="magesms_addcountryadmin" action="<?php echo $this->getUrl('*/*/addcountryadmin') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><div class="margin-form" style="text-align: center"><label for="country"><?php echo Mage::helper('magesms')->__('Select country: '); ?></label><select name="country0" id="country"><?php foreach( Mage::getSingleton('magesms/country_area')->getCollection()->setOrder('country_name', 'ASC') as $country ): ?><option value="<?php echo $country->getCountryName(); ?>" <?php echo $lang == $country->getCountryName() ? 'selected' : ''; ?>><?php echo $country->getCountryName(); ?> (+<?php echo $country->getArea(); ?>)</option><?php endforeach; ?></select><input type="submit" value="<?php echo Mage::helper('magesms')->__('ADD/CHANGE SELECTED COUNTRY'); ?>" class="form-button" /></div></form><?php if ($routes = Mage::getSingleton('magesms/routes')->loadData('admin')): ?><?php include 'wizard-list.phtml'; ?><?php endif; ?></div></div></div>
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2015 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 $currency = $this->profile->currency; ?><div style="float: right;"><form action="<?php echo $this->getUrl('*/*/updatepricelist') ?>" 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')->__('Update pricelist'); ?>" class="form-button" /></form></div><h2><?php echo Mage::helper('magesms')->__('SMS Settings'); ?></h2><p><?php echo Mage::helper('magesms')->__('Define SMS Sender Type for each country separately (Text sender ID, Own mobile number or System number). SMS price depends on the recipient country, selected SMS sender type and amount of payment. In countries with undefined SMS sender type will be used System number sender type.'); ?></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')->__('Customer SMS settings'); ?></h4></div><div class="fieldset grid"><form id="magesms_addcountryuser" action="<?php echo $this->getUrl('*/*/addcountrycustomer') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><div class="margin-form" style="text-align: center"><label for="country"><?php echo Mage::helper('magesms')->__('Select country: '); ?></label><select name="country0" id="country"><?php foreach( Mage::getSingleton('magesms/country_area')->getCollection()->setOrder('country_name', 'ASC') as $country ): ?><option value="<?php echo $country->getCountryName(); ?>" <?php echo $lang == $country->getCountryName() ? 'selected' : ''; ?>><?php echo $country->getCountryName(); ?> (+<?php echo $country->getArea(); ?>)</option><?php endforeach; ?></select><input type="submit" value="<?php echo Mage::helper('magesms')->__('ADD/CHANGE SELECTED COUNTRY'); ?>" class="form-button" /></div></form><?php if ($routes = Mage::getSingleton('magesms/routes')->loadData('customer')): ?><?php include 'wizard-list.phtml'; ?><?php endif; ?></div></div><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')->__('Admin SMS settings'); ?></h4></div><div class="fieldset grid"><form id="magesms_addcountryadmin" action="<?php echo $this->getUrl('*/*/addcountryadmin') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><div class="margin-form" style="text-align: center"><label for="country"><?php echo Mage::helper('magesms')->__('Select country: '); ?></label><select name="country0" id="country"><?php foreach( Mage::getSingleton('magesms/country_area')->getCollection()->setOrder('country_name', 'ASC') as $country ): ?><option value="<?php echo $country->getCountryName(); ?>" <?php echo $lang == $country->getCountryName() ? 'selected' : ''; ?>><?php echo $country->getCountryName(); ?> (+<?php echo $country->getArea(); ?>)</option><?php endforeach; ?></select><input type="submit" value="<?php echo Mage::helper('magesms')->__('ADD/CHANGE SELECTED COUNTRY'); ?>" class="form-button" /></div></form><?php if ($routes = Mage::getSingleton('magesms/routes')->loadData('admin')): ?><?php include 'wizard-list.phtml'; ?><?php endif; ?></div></div></div>
app/design/frontend/base/default/layout/magesms.xml ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <checkout_cart_index translate="label">
4
+ <reference name="checkout.cart.methods">
5
+ <block type="magesms/cart" name="magesms.cart" template="topefekt/magesms/cart.phtml" before="-" />
6
+ </reference>
7
+ </checkout_cart_index>
8
+ <!--
9
+ <customer_account>
10
+ <reference name="customer_account_navigation">
11
+ <action method="addLink" translate="label" module="magesms">
12
+ <name>magesms</name>
13
+ <path>magesms/marketing/</path>
14
+ <label>SMS Marketing</label>
15
+ </action>
16
+ </reference>
17
+ </customer_account>
18
+ -->
19
+ <customer_account_index translate="label">
20
+ <reference name="my.account.wrapper">
21
+ <block type="magesms/customer_marketing" name="customer_account_dashboard_magesms" template="topefekt/magesms/marketing-dashboard.phtml" />
22
+ </reference>
23
+ </customer_account_index>
24
+ </layout>
app/design/frontend/base/default/template/topefekt/magesms/cart.phtml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ ?><?php if ($this->getOptoutProduct()): ?><form method="post" action="<?php echo $this->getOptoutUrl(); ?>"><div class="discount"><p class="checkbox smsoptout"><input type="checkbox" onchange="this.form.submit()" id="smsoptout" name="smsoptout" <?php echo $this->getOptoutAuto() ? 'checked' : ''; ?>> <label for="smsoptout"><strong><?php echo $this->getOptoutProduct()->getName(); ?></strong> - <?php echo Mage::helper('core')->currency($this->getOptoutProduct()->getPrice(), true, false); ?></label></p></div></form><?php endif; ?>
app/design/frontend/base/default/template/topefekt/magesms/marketing-dashboard.phtml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ ?><?php if ($this->getOptoutMarketingActive()): ?><div class="dashboard"><div class="box"><div class="box-account box-info"><div class="box-title"><h3><?php echo $this->__('SMS Marketing'); ?>: <?php echo $this->getOptoutMarketing() ? $this->__('Yes') : $this->__('No');?></h3><a href="<?php echo $this->getUrl('magesms/marketing'); ?>"><?php echo $this->getOptoutMarketing() ? $this->__('Disable') : $this->__('Enable');?></a></div></div></div></div><?php endif; ?>
app/locale/cs_CZ/Topefekt_Magesms.csv CHANGED
@@ -507,3 +507,8 @@
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."
 
 
 
 
 
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."
510
+ "Add SMS product to cart:","Přidávat do košíku SMS produkt:"
511
+ "Automatically","Automaticky"
512
+ "Manually","Manuálně"
513
+ "SMS opt-out - setting Marketing SMS opt-out option for the customer from the user profile","SMS opt-out - nastavení odhlášení Marketingových SMS z uživatelského profilu zákazníka"
514
+ "Activate displaying Marketing SMS opt-out feature in the user profile","Aktivuj zobrazení opt-out funkce pro Marketingové SMS v uživatelském profilu"
app/locale/de_DE/Topefekt_Magesms.csv CHANGED
@@ -538,3 +538,8 @@
538
  "Dear Customer, status of your claim {return_id} has changed to ","Sehr geehrter Kunde, Zustand ihrer Retouren {return_id} wurde auf "
539
  ". Have a nice day, {shop_name}.","verändert. Wir wünschen Ihnen noch einen schönen Tag. , {shop_name}."
540
  "ADD/CHANGE TEXT SENDER ID","TEXTNUMMER HINZUFÜGEN/VERÄNDERN"
 
 
 
 
 
538
  "Dear Customer, status of your claim {return_id} has changed to ","Sehr geehrter Kunde, Zustand ihrer Retouren {return_id} wurde auf "
539
  ". Have a nice day, {shop_name}.","verändert. Wir wünschen Ihnen noch einen schönen Tag. , {shop_name}."
540
  "ADD/CHANGE TEXT SENDER ID","TEXTNUMMER HINZUFÜGEN/VERÄNDERN"
541
+ "Add SMS product to cart:","Produkt SMS in den Einkaufskorbkorb legen:"
542
+ "Automatically","automatisch"
543
+ "Manually","manuell"
544
+ "SMS opt-out - setting Marketing SMS opt-out option for the customer from the user profile","SMS opt-out - setting Marketing SMS opt-out option for the customer from the user profile"
545
+ "Activate displaying Marketing SMS opt-out feature in the user profile","Activate displaying Marketing SMS opt-out feature in the user profile"
app/locale/el_GR/Topefekt_Magesms.csv CHANGED
@@ -501,3 +501,8 @@
501
  "www.mage-sms.com","www.mage-sms.com"
502
  "www.mage-sms.com/index.html","www.mage-sms.com/index.html"
503
  "ADD/CHANGE TEXT SENDER ID","ΠΡΟΣΘΗΚΗ/ΑΛΛΑΓΗ ΚΕΙΜΕΝΟΥ ID ΑΠΟΣΤΟΛΕΑ"
 
 
 
 
 
501
  "www.mage-sms.com","www.mage-sms.com"
502
  "www.mage-sms.com/index.html","www.mage-sms.com/index.html"
503
  "ADD/CHANGE TEXT SENDER ID","ΠΡΟΣΘΗΚΗ/ΑΛΛΑΓΗ ΚΕΙΜΕΝΟΥ ID ΑΠΟΣΤΟΛΕΑ"
504
+ "Add SMS product to cart:","Προσθέστε το 'προϊόν SMS' στο καλάθι:"
505
+ "Automatically","Αυτόματα"
506
+ "Manually","Χειροκίνητα"
507
+ "SMS opt-out - setting Marketing SMS opt-out option for the customer from the user profile","SMS opt-out - setting Marketing SMS opt-out option for the customer from the user profile"
508
+ "Activate displaying Marketing SMS opt-out feature in the user profile","Activate displaying Marketing SMS opt-out feature in the user profile"
app/locale/en_US/Topefekt_Magesms.csv CHANGED
@@ -538,3 +538,8 @@
538
  "Dear Customer, status of your claim {return_id} has changed to ","Dear Customer, status of your claim {return_id} has changed to "
539
  ". Have a nice day, {shop_name}.",". Have a nice day, {shop_name}."
540
  "ADD/CHANGE TEXT SENDER ID","ADD/CHANGE TEXT SENDER ID"
 
 
 
 
 
538
  "Dear Customer, status of your claim {return_id} has changed to ","Dear Customer, status of your claim {return_id} has changed to "
539
  ". Have a nice day, {shop_name}.",". Have a nice day, {shop_name}."
540
  "ADD/CHANGE TEXT SENDER ID","ADD/CHANGE TEXT SENDER ID"
541
+ "Add SMS product to cart:","Add SMS product to cart:"
542
+ "Automatically","Automatically"
543
+ "Manually","Manually"
544
+ "SMS opt-out - setting Marketing SMS opt-out option for the customer from the user profile","SMS opt-out - setting Marketing SMS opt-out option for the customer from the user profile"
545
+ "Activate displaying Marketing SMS opt-out feature in the user profile","Activate displaying Marketing SMS opt-out feature in the user profile"
app/locale/es_ES/Topefekt_Magesms.csv CHANGED
@@ -538,3 +538,8 @@
538
  "Dear Customer, status of your claim {return_id} has changed to ","Estimado cliente, el estado de su reclamo {return_id} cambió a "
539
  ". Have a nice day, {shop_name}.",". Un buen día, {shop_name}."
540
  "ADD/CHANGE TEXT SENDER ID","AÑADIR/CAMBIAR NÚMERO TEXTUAL"
 
 
 
 
 
538
  "Dear Customer, status of your claim {return_id} has changed to ","Estimado cliente, el estado de su reclamo {return_id} cambió a "
539
  ". Have a nice day, {shop_name}.",". Un buen día, {shop_name}."
540
  "ADD/CHANGE TEXT SENDER ID","AÑADIR/CAMBIAR NÚMERO TEXTUAL"
541
+ "Add SMS product to cart:","Añadir SMS producto a la cesta:"
542
+ "Automatically","automáticamente"
543
+ "Manually","a mano"
544
+ "SMS opt-out - setting Marketing SMS opt-out option for the customer from the user profile","SMS opt-out - setting Marketing SMS opt-out option for the customer from the user profile"
545
+ "Activate displaying Marketing SMS opt-out feature in the user profile","Activate displaying Marketing SMS opt-out feature in the user profile"
app/locale/fr_FR/Topefekt_Magesms.csv CHANGED
@@ -538,3 +538,8 @@
538
  "Dear Customer, status of your claim {return_id} has changed to ","Cher client, état de votre retoure {return_id} a changé en "
539
  ". Have a nice day, {shop_name}.",". Info provenant de {shop_name}."
540
  "ADD/CHANGE TEXT SENDER ID","AJOUTER/MODIFIER TEXTE SENDER ID"
 
 
 
 
 
538
  "Dear Customer, status of your claim {return_id} has changed to ","Cher client, état de votre retoure {return_id} a changé en "
539
  ". Have a nice day, {shop_name}.",". Info provenant de {shop_name}."
540
  "ADD/CHANGE TEXT SENDER ID","AJOUTER/MODIFIER TEXTE SENDER ID"
541
+ "Add SMS product to cart:","Ajouter le SMS produit au panier:"
542
+ "Automatically","Automatique"
543
+ "Manually","Manuellement"
544
+ "SMS opt-out - setting Marketing SMS opt-out option for the customer from the user profile","SMS opt-out - setting Marketing SMS opt-out option for the customer from the user profile"
545
+ "Activate displaying Marketing SMS opt-out feature in the user profile","Activate displaying Marketing SMS opt-out feature in the user profile"
app/locale/it_IT/Topefekt_Magesms.csv CHANGED
@@ -538,3 +538,8 @@
538
  "Dear Customer, status of your claim {return_id} has changed to ","Gentile Cliente, lo stato del tuo restituzione {return_id} ha cambiato a "
539
  ". Have a nice day, {shop_name}.",". Buona giornata, {shop_name}."
540
  "ADD/CHANGE TEXT SENDER ID","AGGIUNGERE/SELEZIONA TESTO COME NUMERO"
 
 
 
 
 
538
  "Dear Customer, status of your claim {return_id} has changed to ","Gentile Cliente, lo stato del tuo restituzione {return_id} ha cambiato a "
539
  ". Have a nice day, {shop_name}.",". Buona giornata, {shop_name}."
540
  "ADD/CHANGE TEXT SENDER ID","AGGIUNGERE/SELEZIONA TESTO COME NUMERO"
541
+ "Add SMS product to cart:","Aggiungi il prodotto SMS al carrello:"
542
+ "Automatically","automaticamente"
543
+ "Manually","manualmente"
544
+ "SMS opt-out - setting Marketing SMS opt-out option for the customer from the user profile","SMS opt-out - setting Marketing SMS opt-out option for the customer from the user profile"
545
+ "Activate displaying Marketing SMS opt-out feature in the user profile","Activate displaying Marketing SMS opt-out feature in the user profile"
app/locale/pl_PL/Topefekt_Magesms.csv CHANGED
@@ -504,3 +504,8 @@
504
  "SCHEDULED","PLANOWANA"
505
  "DUPLICATE","DUPLIKAT"
506
  "ADD/CHANGE TEXT SENDER ID","DODAJ/ZMIEŃ TEKSTOWY NUMER"
 
 
 
 
 
504
  "SCHEDULED","PLANOWANA"
505
  "DUPLICATE","DUPLIKAT"
506
  "ADD/CHANGE TEXT SENDER ID","DODAJ/ZMIEŃ TEKSTOWY NUMER"
507
+ "Add SMS product to cart:","Dodaj produkt SMS do koszyka:"
508
+ "Automatically","automatycznie"
509
+ "Manually","ręcznie"
510
+ "SMS opt-out - setting Marketing SMS opt-out option for the customer from the user profile","SMS opt-out - setting Marketing SMS opt-out option for the customer from the user profile"
511
+ "Activate displaying Marketing SMS opt-out feature in the user profile","Activate displaying Marketing SMS opt-out feature in the user profile"
app/locale/pt_PT/Topefekt_Magesms.csv CHANGED
@@ -538,3 +538,8 @@
538
  "Dear Customer, status of your claim {return_id} has changed to ","Caro cliente, o estado da sua devoluçao {return_id} modificou a "
539
  ". Have a nice day, {shop_name}.",". Bom dia, {shop_name}."
540
  "ADD/CHANGE TEXT SENDER ID","ADICIONAR/ALTERAR NÚMERO DE TEXTO"
 
 
 
 
 
538
  "Dear Customer, status of your claim {return_id} has changed to ","Caro cliente, o estado da sua devoluçao {return_id} modificou a "
539
  ". Have a nice day, {shop_name}.",". Bom dia, {shop_name}."
540
  "ADD/CHANGE TEXT SENDER ID","ADICIONAR/ALTERAR NÚMERO DE TEXTO"
541
+ "Add SMS product to cart:","Adicionar o produto SMS ao carrinho:"
542
+ "Automatically","automaticamente"
543
+ "Manually","manualmente"
544
+ "SMS opt-out - setting Marketing SMS opt-out option for the customer from the user profile","SMS opt-out - setting Marketing SMS opt-out option for the customer from the user profile"
545
+ "Activate displaying Marketing SMS opt-out feature in the user profile","Activate displaying Marketing SMS opt-out feature in the user profile"
app/locale/ru_RU/Topefekt_Magesms.csv CHANGED
@@ -504,3 +504,8 @@
504
  "SCHEDULED","ОТЛОЖЕННЫЕ"
505
  "DUPLICATE","дубликат"
506
  "ADD/CHANGE TEXT SENDER ID","ДОБАВИТЬ/ИЗМЕНИТЬ ТЕКСТОВОЕ ID"
 
 
 
 
 
504
  "SCHEDULED","ОТЛОЖЕННЫЕ"
505
  "DUPLICATE","дубликат"
506
  "ADD/CHANGE TEXT SENDER ID","ДОБАВИТЬ/ИЗМЕНИТЬ ТЕКСТОВОЕ ID"
507
+ "Add SMS product to cart:","Добавить товар CMC в корзину:"
508
+ "Automatically","автоматически"
509
+ "Manually","вручную"
510
+ "SMS opt-out - setting Marketing SMS opt-out option for the customer from the user profile","SMS opt-out - setting Marketing SMS opt-out option for the customer from the user profile"
511
+ "Activate displaying Marketing SMS opt-out feature in the user profile","Activate displaying Marketing SMS opt-out feature in the user profile"
app/locale/sk_SK/Topefekt_Magesms.csv CHANGED
@@ -506,3 +506,8 @@
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á."
 
 
 
 
 
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á."
509
+ "Add SMS product to cart:","Pridávať SMS produkt do košíka:"
510
+ "Automatically","automaticky"
511
+ "Manually","manuálne"
512
+ "SMS opt-out - setting Marketing SMS opt-out option for the customer from the user profile","SMS opt-out – nastavenie odhlásenia Marketingových SMS z užívateľského profilu zákazníka"
513
+ "Activate displaying Marketing SMS opt-out feature in the user profile","Aktivuj zobrazenie opt-out funkcie pre Marketingové SMS v užívateľskom profile"
app/locale/sr_RS/Topefekt_Magesms.csv CHANGED
@@ -505,3 +505,8 @@
505
  "DO NOT DISTURB registry (DND)","DO NOT DISTURB registry (DND)"
506
  "DUPLICATE","DUPLIKAT"
507
  "ADD/CHANGE TEXT SENDER ID","DODATI/ZMENITI TEKST ID"
 
 
 
 
 
505
  "DO NOT DISTURB registry (DND)","DO NOT DISTURB registry (DND)"
506
  "DUPLICATE","DUPLIKAT"
507
  "ADD/CHANGE TEXT SENDER ID","DODATI/ZMENITI TEKST ID"
508
+ "Add SMS product to cart:","Dodaj proizvod SMS u korpu:"
509
+ "Automatically","automatsko"
510
+ "Manually","ručno"
511
+ "SMS opt-out - setting Marketing SMS opt-out option for the customer from the user profile","SMS opt-out - setting Marketing SMS opt-out option for the customer from the user profile"
512
+ "Activate displaying Marketing SMS opt-out feature in the user profile","Activate displaying Marketing SMS opt-out feature in the user profile"
app/locale/sv_SE/Topefekt_Magesms.csv CHANGED
@@ -537,3 +537,8 @@
537
  "Are you sure to delete SMS history?","Är du säker på att radera SMS historik?"
538
  "SMS history was deleted.","SMS historia raderades."
539
  "ADD/CHANGE TEXT SENDER ID","LÄGG TILL/ÄNDRA TEXT AVSÄNDARE ID"
 
 
 
 
 
537
  "Are you sure to delete SMS history?","Är du säker på att radera SMS historik?"
538
  "SMS history was deleted.","SMS historia raderades."
539
  "ADD/CHANGE TEXT SENDER ID","LÄGG TILL/ÄNDRA TEXT AVSÄNDARE ID"
540
+ "Add SMS product to cart:","Lägg till möjligheten att i varukorgen kunna välja att få SMS vid leverans :"
541
+ "Automatically","Automatiskt"
542
+ "Manually","Manuellt"
543
+ "SMS opt-out - setting Marketing SMS opt-out option for the customer from the user profile","SMS opt-out - setting Marketing SMS opt-out option for the customer from the user profile"
544
+ "Activate displaying Marketing SMS opt-out feature in the user profile","Activate displaying Marketing SMS opt-out feature in the user profile"
app/locale/tr_TR/Topefekt_Magesms.csv CHANGED
@@ -505,3 +505,8 @@
505
  "DO NOT DISTURB registry (DND)","DO NOT DISTURB registry (DND)"
506
  "DUPLICATE","çift"
507
  "ADD/CHANGE TEXT SENDER ID","METİN GÖNDERİCİ ID EKLE/DEĞİŞTİR"
 
 
 
 
 
505
  "DO NOT DISTURB registry (DND)","DO NOT DISTURB registry (DND)"
506
  "DUPLICATE","çift"
507
  "ADD/CHANGE TEXT SENDER ID","METİN GÖNDERİCİ ID EKLE/DEĞİŞTİR"
508
+ "Add SMS product to cart:","Sms ürününü karta ekleyin:"
509
+ "Automatically","Otomatik olarak"
510
+ "Manually","Manuel olarak"
511
+ "SMS opt-out - setting Marketing SMS opt-out option for the customer from the user profile","SMS opt-out - setting Marketing SMS opt-out option for the customer from the user profile"
512
+ "Activate displaying Marketing SMS opt-out feature in the user profile","Activate displaying Marketing SMS opt-out feature in the user profile"
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>TOPefekt_Magesms</name>
4
- <version>1.3.2</version>
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-2015</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>2015-01-29</date>
14
- <time>10:32:17</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="0b759e85e6cb7d0c862338b4bf96664d"/></dir></dir><dir name="Helper"><dir name="Adminhtml"><file name="Data.php" hash="ebf8c3ac5f4ede5e30218f307c60c9c3"/></dir><file name="Data.php" hash="6aa9c8f95ab31bb1ef89f363d1077935"/></dir><dir name="Model"><file name="Admins.php" hash="ced35da523fa261708ca76bf09744492"/><file name="Answers.php" hash="33fcc03e70064860f47b17291b2682ec"/><file name="Api.php" hash="e8520b753ae28b9adefa34b43f5b58cf"/><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="843d7582b92e5650e80b037d6fae788e"/><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="81b3dd750820746bf39f6fd094626683"/><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="140f7de7b47f4eef1944d8133f0fd576"/><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="3c11dd8eb01bb93eacce91a54c37682a"/><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="c5b7d2bc3a80a67dc15faf3f6c25a5d9"/></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="44f60a7ffdb5cc73d829c62a32767045"/><file name="AnswersController.php" hash="ca05a9506f32a90ff359f01f90ff7031"/><file name="CustomersmsController.php" hash="bc4d8daaebb6a6dc5f66fa42b135e264"/><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"/><file name="data-upgrade-1.3.1-1.3.2.php" hash="4ffe509c151a75edb2f39022801ffd74"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="637551698f955e9428774cc64e91ccb9"/><file name="config.xml" hash="0630c0c1918203c56de7dd9da5c242ee"/><file name="system.xml" hash="8c35619b72895b190b8a5aea21c6b934"/></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="5ff9bfdacad686bc40f657bc2b7a6098"/><file name="customersms.phtml" hash="575f044615022f51d0ceac6f20786541"/><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="sv_SE"><file name="Topefekt_Magesms.csv" hash="2e7c91d687bfa80a635e400a4dcedc56"/></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.3.4</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-2015</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>2015-04-04</date>
14
+ <time>23:03:35</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"/><file name="Cart.php" hash="2c0ac0bef513ef5efaea2cc7456c4aa8"/><dir name="Customer"><file name="Grid.php" hash="01cd30df42024487ddbb85dc805b29f2"/><file name="Marketing.php" hash="b93b4943ce65dd80a201219470ac71e4"/></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="921793ef2a4c1b6095c95a187c01a032"/><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"/><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="0b759e85e6cb7d0c862338b4bf96664d"/></dir></dir><dir name="Helper"><dir name="Adminhtml"><file name="Data.php" hash="ebf8c3ac5f4ede5e30218f307c60c9c3"/></dir><file name="Data.php" hash="2a9a8d291898ec670e29bd46a3003680"/></dir><dir name="Model"><file name="Admins.php" hash="ced35da523fa261708ca76bf09744492"/><file name="Answers.php" hash="33fcc03e70064860f47b17291b2682ec"/><file name="Api.php" hash="e8520b753ae28b9adefa34b43f5b58cf"/><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="062cfa6c80662f2bc7bbe53817f2916b"/><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="a7b96acd8dd01888cb45f15ebdc63de3"/><file name="Magesms.php" hash="e299fef5c1617dc2aba79861a170ee57"/><file name="Maps.php" hash="f1d81668d4afaa3c12b90e93a4dc6a8a"/><dir name="Marketing"><dir name="Filter"><file name="Birthday.php" hash="56d6e9638c2548a9dabd86548609d04d"/><file name="Birthdayall.php" hash="81b3dd750820746bf39f6fd094626683"/><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="Orderssum.php" hash="703f8b1d324f890df6f27d917b21cf07"/><file name="Product.php" hash="249591224a294cf410a004c5654eed7b"/><file name="Register.php" hash="18462dd6abae0d72f6863a285364885a"/><file name="Type.php" hash="49b3fefa77c399003a60edc716a19810"/><file name="Website.php" hash="998fa5822c12e7e10a9363c74922d25f"/></dir><file name="Filter.php" hash="f0608c6d7be5c646068ca30f58cd02b0"/></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="Optout"><dir name="Order"><file name="Collection.php" hash="7b593f45e990a0325bec3cf326b85c5c"/></dir><file name="Order.php" hash="5b2e04f86251001203fb858f451672b4"/></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="68fbe52c864d1dd43cda86dcf7442bfc"/><dir name="Optout"><file name="Order.php" hash="a68d9c4ecc26abd7b142d6d27d672c70"/></dir><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="7041d937e250c763e6342048d010a058"/><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="c5b7d2bc3a80a67dc15faf3f6c25a5d9"/></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="563f7dbcc7fcde5da9236fc44169cd17"/><file name="AnswersController.php" hash="ca05a9506f32a90ff359f01f90ff7031"/><file name="CustomersmsController.php" hash="bc4d8daaebb6a6dc5f66fa42b135e264"/><file name="HistoryController.php" hash="ca2a53f872a87ce16bbacfb1bcbb376b"/><file name="MarketingController.php" hash="17df754a7c57d05245a5b2bf2e9c53d1"/><file name="OptoutController.php" hash="fec54f1db0646d1f9e28de19f393040d"/><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="cc4efd6d2dfed453d1d9343430f54429"/><file name="CartController.php" hash="45c47abb7ba1da922a0ea1a74bea61a5"/><file name="DeliveryController.php" hash="8f604254b6c19c9adb84bea325e3c8ea"/><file name="IndexController.php" hash="ebc25dd160c958883f7ed4f0f4c9bfad"/><file name="MarketingController.php" hash="80d951f32ffc2809268d4804dfe7c526"/></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="c3a7d79bad8ba1d3ccc574fab0e61ba9"/><file name="data-upgrade-1.0.3-1.0.4.php" hash="f7b7c22abd1adb57dcd01f8f0f60fd78"/><file name="data-upgrade-1.1.0-1.1.1.php" hash="52af14629fdfd0510978ade963fc6e3c"/><file name="data-upgrade-1.1.1-1.1.2.php" hash="36256c476fa3d6d4446adbc2f657fe24"/><file name="data-upgrade-1.2.0-1.2.1.php" hash="2793e299f198d54691031dd8b5ac6a87"/><file name="data-upgrade-1.3.1-1.3.2.php" hash="4f24b19e61f240763e5d5d68f6990254"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="637551698f955e9428774cc64e91ccb9"/><file name="config.xml" hash="6a80ee245a9029da3662f81812cd4b54"/><file name="system.xml" hash="9755bb99d416f603541ddf00848e3951"/></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="0a9796513f8d836789c3bb006d599169"/><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="bee320d69dbffaabd111635e0310e4fb"/><file name="mysql4-upgrade-1.1.3-1.1.4.php" hash="9f62256f35510d4b4b17ea8f84c77a49"/><file name="mysql4-upgrade-1.1.5-1.2.0.php" hash="1c1697a6910273445e80ae58d3185802"/><file name="mysql4-upgrade-1.3.3-1.3.4.php" hash="31c6bebff7c4e91ffae01ab322a92643"/></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="5ff9bfdacad686bc40f657bc2b7a6098"/><file name="customersms.phtml" hash="575f044615022f51d0ceac6f20786541"/><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="435ebd01535920e65a1ec23e8b8987e4"/><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><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="topefekt"><dir name="magesms"><file name="cart.phtml" hash="b5c482d8114325b9bce25294b5ce7aa5"/><file name="marketing-dashboard.phtml" hash="528a748fc23a50262db8d44ea3d680a6"/></dir></dir></dir><dir name="layout"><file name="magesms.xml" hash="cf848296146ba48c4370a7a20abc8561"/></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="8a129f14dcc5e44b931f0a28184688d9"/></dir><dir name="de_DE"><file name="Topefekt_Magesms.csv" hash="11df21ff876b58b356b86f9ca8cb4d79"/></dir><dir name="el_GR"><file name="Topefekt_Magesms.csv" hash="5d899ac1ff4fd8398f2773dcc10ef06b"/></dir><dir name="en_US"><file name="Topefekt_Magesms.csv" hash="60e3401027c48c044f1857cf6e969161"/></dir><dir name="es_ES"><file name="Topefekt_Magesms.csv" hash="4ead3ca982f16f94938ef09cdd5e5a4a"/></dir><dir name="fr_FR"><file name="Topefekt_Magesms.csv" hash="8b318fab02e3903b02a31bf079c8723c"/></dir><dir name="it_IT"><file name="Topefekt_Magesms.csv" hash="d0a7e8dc2e750757ef0db21d7cb7f8be"/></dir><dir name="pl_PL"><file name="Topefekt_Magesms.csv" hash="e93aa222d6d2845e3c05a0aa85cd3340"/></dir><dir name="pt_PT"><file name="Topefekt_Magesms.csv" hash="6338f63536a3188696cba49d1e378ae5"/></dir><dir name="ru_RU"><file name="Topefekt_Magesms.csv" hash="e65401175ef3f7442fc9dc08d8cf937a"/></dir><dir name="sk_SK"><file name="Topefekt_Magesms.csv" hash="6343754a74d0f12f0ef2252f563fcc3d"/></dir><dir name="sr_RS"><file name="Topefekt_Magesms.csv" hash="f612baaa8c360e61a078b87b4b658205"/></dir><dir name="sv_SE"><file name="Topefekt_Magesms.csv" hash="8c30b8449d72bd4b100ace7fb811fa56"/></dir><dir name="tr_TR"><file name="Topefekt_Magesms.csv" hash="5038a6af39c6e1732a5060589b2dc46f"/></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>