TOPefekt_Magesms - Version 1.0.1

Version Notes

2014

Download this release

Release Info

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


Version 1.0.1

Files changed (174) hide show
  1. app/code/community/Topefekt/Magesms/Block/Answers.php +16 -0
  2. app/code/community/Topefekt/Magesms/Block/Answers/Grid.php +16 -0
  3. app/code/community/Topefekt/Magesms/Block/Answers/Renderer/Actions.php +16 -0
  4. app/code/community/Topefekt/Magesms/Block/Answers/Renderer/Smsc.php +16 -0
  5. app/code/community/Topefekt/Magesms/Block/Magesms.php +16 -0
  6. app/code/community/Topefekt/Magesms/Block/Marketing.php +16 -0
  7. app/code/community/Topefekt/Magesms/Block/Marketing/Form.php +15 -0
  8. app/code/community/Topefekt/Magesms/Block/Marketing/Grid.php +16 -0
  9. app/code/community/Topefekt/Magesms/Block/Profile.php +16 -0
  10. app/code/community/Topefekt/Magesms/Block/ShowTabsAdminBlock.php +16 -0
  11. app/code/community/Topefekt/Magesms/Block/Template.php +16 -0
  12. app/code/community/Topefekt/Magesms/Block/Wizard.php +16 -0
  13. app/code/community/Topefekt/Magesms/Block/Wizard/Grid.php +16 -0
  14. app/code/community/Topefekt/Magesms/Helper/Adminhtml/Data.php +16 -0
  15. app/code/community/Topefekt/Magesms/Helper/Data.php +16 -0
  16. app/code/community/Topefekt/Magesms/Model/Admins.php +16 -0
  17. app/code/community/Topefekt/Magesms/Model/Answers.php +16 -0
  18. app/code/community/Topefekt/Magesms/Model/Api.php +16 -0
  19. app/code/community/Topefekt/Magesms/Model/Country.php +16 -0
  20. app/code/community/Topefekt/Magesms/Model/Country/Area.php +16 -0
  21. app/code/community/Topefekt/Magesms/Model/Country/Lang.php +16 -0
  22. app/code/community/Topefekt/Magesms/Model/Exceptions.php +16 -0
  23. app/code/community/Topefekt/Magesms/Model/Hooks.php +16 -0
  24. app/code/community/Topefekt/Magesms/Model/Hooks/Admins.php +16 -0
  25. app/code/community/Topefekt/Magesms/Model/Hooks/Customers.php +16 -0
  26. app/code/community/Topefekt/Magesms/Model/Hooks/Templates.php +16 -0
  27. app/code/community/Topefekt/Magesms/Model/Hooks/Unicode.php +16 -0
  28. app/code/community/Topefekt/Magesms/Model/Magesms.php +16 -0
  29. app/code/community/Topefekt/Magesms/Model/Maps.php +16 -0
  30. app/code/community/Topefekt/Magesms/Model/Mysql4/Admins.php +16 -0
  31. app/code/community/Topefekt/Magesms/Model/Mysql4/Admins/Collection.php +16 -0
  32. app/code/community/Topefekt/Magesms/Model/Mysql4/Answers.php +16 -0
  33. app/code/community/Topefekt/Magesms/Model/Mysql4/Answers/Collection.php +16 -0
  34. app/code/community/Topefekt/Magesms/Model/Mysql4/Collection.php +16 -0
  35. app/code/community/Topefekt/Magesms/Model/Mysql4/Country.php +16 -0
  36. app/code/community/Topefekt/Magesms/Model/Mysql4/Country/Area.php +16 -0
  37. app/code/community/Topefekt/Magesms/Model/Mysql4/Country/Area/Collection.php +16 -0
  38. app/code/community/Topefekt/Magesms/Model/Mysql4/Country/Collection.php +16 -0
  39. app/code/community/Topefekt/Magesms/Model/Mysql4/Country/Lang.php +16 -0
  40. app/code/community/Topefekt/Magesms/Model/Mysql4/Country/Lang/Collection.php +16 -0
  41. app/code/community/Topefekt/Magesms/Model/Mysql4/Exceptions.php +16 -0
  42. app/code/community/Topefekt/Magesms/Model/Mysql4/Exceptions/Collection.php +16 -0
  43. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks.php +16 -0
  44. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Admins.php +16 -0
  45. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Admins/Collection.php +16 -0
  46. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Collection.php +16 -0
  47. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Customers.php +16 -0
  48. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Customers/Collection.php +16 -0
  49. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Templates.php +16 -0
  50. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Templates/Collection.php +16 -0
  51. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Unicode.php +16 -0
  52. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Unicode/Collection.php +16 -0
  53. app/code/community/Topefekt/Magesms/Model/Mysql4/Maps.php +16 -0
  54. app/code/community/Topefekt/Magesms/Model/Mysql4/Maps/Collection.php +16 -0
  55. app/code/community/Topefekt/Magesms/Model/Mysql4/Ownnumbersender.php +16 -0
  56. app/code/community/Topefekt/Magesms/Model/Mysql4/Ownnumbersender/Collection.php +16 -0
  57. app/code/community/Topefekt/Magesms/Model/Mysql4/Routes.php +16 -0
  58. app/code/community/Topefekt/Magesms/Model/Mysql4/Routes/Collection.php +16 -0
  59. app/code/community/Topefekt/Magesms/Model/Mysql4/Smshistory.php +16 -0
  60. app/code/community/Topefekt/Magesms/Model/Mysql4/Smshistory/Collection.php +16 -0
  61. app/code/community/Topefekt/Magesms/Model/Mysql4/Smsuser.php +16 -0
  62. app/code/community/Topefekt/Magesms/Model/Mysql4/Smsuser/Collection.php +16 -0
  63. app/code/community/Topefekt/Magesms/Model/Mysql4/Textsender.php +16 -0
  64. app/code/community/Topefekt/Magesms/Model/Mysql4/Textsender/Collection.php +16 -0
  65. app/code/community/Topefekt/Magesms/Model/Mysql4/Variables.php +16 -0
  66. app/code/community/Topefekt/Magesms/Model/Mysql4/Variables/Collection.php +16 -0
  67. app/code/community/Topefekt/Magesms/Model/Observer.php +16 -0
  68. app/code/community/Topefekt/Magesms/Model/Overide/Cataloginventory/Stock.php +16 -0
  69. app/code/community/Topefekt/Magesms/Model/Ownnumbersender.php +16 -0
  70. app/code/community/Topefekt/Magesms/Model/Routes.php +16 -0
  71. app/code/community/Topefekt/Magesms/Model/Sms.php +16 -0
  72. app/code/community/Topefekt/Magesms/Model/Smshistory.php +16 -0
  73. app/code/community/Topefekt/Magesms/Model/Smsprofile.php +16 -0
  74. app/code/community/Topefekt/Magesms/Model/Smsuser.php +16 -0
  75. app/code/community/Topefekt/Magesms/Model/System/Config/Lang.php +16 -0
  76. app/code/community/Topefekt/Magesms/Model/Textsender.php +16 -0
  77. app/code/community/Topefekt/Magesms/Model/Variables.php +16 -0
  78. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/AboutController.php +16 -0
  79. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/AdminsmsController.php +16 -0
  80. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/AnswersController.php +16 -0
  81. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/CustomersmsController.php +16 -0
  82. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/HistoryController.php +16 -0
  83. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/MarketingController.php +16 -0
  84. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/OptoutController.php +16 -0
  85. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/ProfileController.php +16 -0
  86. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/PurchasecreditController.php +16 -0
  87. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/SendsmsController.php +16 -0
  88. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/StatisticsController.php +16 -0
  89. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/WizardController.php +16 -0
  90. app/code/community/Topefekt/Magesms/controllers/DeliveryController.php +16 -0
  91. app/code/community/Topefekt/Magesms/controllers/IndexController.php +16 -0
  92. app/code/community/Topefekt/Magesms/data/magesms_setup/data-install-1.0.0.php +735 -0
  93. app/code/community/Topefekt/Magesms/etc/adminhtml.xml +150 -0
  94. app/code/community/Topefekt/Magesms/etc/config.xml +272 -0
  95. app/code/community/Topefekt/Magesms/etc/system.xml +36 -0
  96. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-install-0.9.0.php +227 -0
  97. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-install-1.0.0.php +231 -0
  98. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-0.9.11-0.9.12.php +26 -0
  99. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-0.9.12-0.9.13.php +42 -0
  100. app/design/adminhtml/default/default/template/topefekt/magesms/about.phtml +16 -0
  101. app/design/adminhtml/default/default/template/topefekt/magesms/adminsms.phtml +20 -0
  102. app/design/adminhtml/default/default/template/topefekt/magesms/customersms.phtml +20 -0
  103. app/design/adminhtml/default/default/template/topefekt/magesms/history.phtml +18 -0
  104. app/design/adminhtml/default/default/template/topefekt/magesms/marketing.phtml +24 -0
  105. app/design/adminhtml/default/default/template/topefekt/magesms/optout.phtml +20 -0
  106. app/design/adminhtml/default/default/template/topefekt/magesms/profile.phtml +24 -0
  107. app/design/adminhtml/default/default/template/topefekt/magesms/purchasecredit.phtml +16 -0
  108. app/design/adminhtml/default/default/template/topefekt/magesms/sendsms.phtml +24 -0
  109. app/design/adminhtml/default/default/template/topefekt/magesms/statistics.phtml +18 -0
  110. app/design/adminhtml/default/default/template/topefekt/magesms/wizard-edit.phtml +18 -0
  111. app/design/adminhtml/default/default/template/topefekt/magesms/wizard-list.phtml +18 -0
  112. app/design/adminhtml/default/default/template/topefekt/magesms/wizard-sender.phtml +18 -0
  113. app/design/adminhtml/default/default/template/topefekt/magesms/wizard.phtml +16 -0
  114. app/etc/modules/Topefekt_Magesms.xml +9 -0
  115. app/locale/cs_CZ/Topefekt_Magesms.csv +504 -0
  116. app/locale/de_DE/Topefekt_Magesms.csv +539 -0
  117. app/locale/en_US/Topefekt_Magesms.csv +539 -0
  118. app/locale/es_ES/Topefekt_Magesms.csv +539 -0
  119. app/locale/fr_FR/Topefekt_Magesms.csv +539 -0
  120. app/locale/it_IT/Topefekt_Magesms.csv +539 -0
  121. app/locale/pl_PL/Topefekt_Magesms.csv +505 -0
  122. app/locale/pt_PT/Topefekt_Magesms.csv +539 -0
  123. app/locale/ru_RU/Topefekt_Magesms.csv +505 -0
  124. app/locale/sk_SK/Topefekt_Magesms.csv +503 -0
  125. app/locale/sr_RS/Topefekt_Magesms.csv +506 -0
  126. app/locale/tr_TR/Topefekt_Magesms.csv +506 -0
  127. js/topefekt/functions.js +209 -0
  128. js/topefekt/jquery-1.9.1.min.js +5 -0
  129. js/topefekt/jquery-noconflict.js +1 -0
  130. media/magesms/About.gif +0 -0
  131. media/magesms/AdminCatalog.gif +0 -0
  132. media/magesms/AdminCustomers.gif +0 -0
  133. media/magesms/AdminEmployees.gif +0 -0
  134. media/magesms/AdminOrders.gif +0 -0
  135. media/magesms/AdminSms.gif +0 -0
  136. media/magesms/AdminSmsProfile.gif +0 -0
  137. media/magesms/AdminTools.gif +0 -0
  138. media/magesms/CustomerSms.gif +0 -0
  139. media/magesms/Empty.gif +0 -0
  140. media/magesms/PayPal123.gif +0 -0
  141. media/magesms/SendSms.gif +0 -0
  142. media/magesms/SmsAnswers.gif +0 -0
  143. media/magesms/SmsCharging.gif +0 -0
  144. media/magesms/SmsHistory.gif +0 -0
  145. media/magesms/SmsMarketing.gif +0 -0
  146. media/magesms/SmsWizard.gif +0 -0
  147. media/magesms/calendar.jpg +0 -0
  148. media/magesms/delete.gif +0 -0
  149. media/magesms/edit.gif +0 -0
  150. media/magesms/i_accepted.gif +0 -0
  151. media/magesms/i_buffered.png +0 -0
  152. media/magesms/i_canceled.gif +0 -0
  153. media/magesms/i_deleted.png +0 -0
  154. media/magesms/i_donotdisturb.png +0 -0
  155. media/magesms/i_duplicate.png +0 -0
  156. media/magesms/i_error.gif +0 -0
  157. media/magesms/i_minus.gif +0 -0
  158. media/magesms/i_plus.gif +0 -0
  159. media/magesms/i_scheduled.png +0 -0
  160. media/magesms/i_sent.png +0 -0
  161. media/magesms/i_simulation.png +0 -0
  162. media/magesms/licence_cz.pdf +0 -0
  163. media/magesms/licence_en.pdf +0 -0
  164. media/magesms/logo.gif +0 -0
  165. media/magesms/logocart.png +0 -0
  166. media/magesms/magesms-logo.png +0 -0
  167. media/magesms/next.gif +0 -0
  168. media/magesms/prev.gif +0 -0
  169. media/magesms/topefekt-logo.gif +0 -0
  170. media/magesms/translation.gif +0 -0
  171. package.xml +18 -0
  172. skin/adminhtml/base/default/css/topefekt/magesms/img/i_canceled.gif +0 -0
  173. skin/adminhtml/base/default/css/topefekt/magesms/img/i_sent.png +0 -0
  174. skin/adminhtml/base/default/css/topefekt/magesms/stylesheet.css +1 -0
app/code/community/Topefekt/Magesms/Block/Answers.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-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%'; } }
app/code/community/Topefekt/Magesms/Block/Answers/Grid.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-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; } }
app/code/community/Topefekt/Magesms/Block/Answers/Renderer/Actions.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-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; } }
app/code/community/Topefekt/Magesms/Block/Answers/Renderer/Smsc.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-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 : '-'; } }
app/code/community/Topefekt/Magesms/Block/Magesms.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-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'); } }
app/code/community/Topefekt/Magesms/Block/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-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'; $this->_headerText = $this->__('Marketing'); parent::__construct(); $this->_removeButton('add'); $this->addButton('filter_reset_form_submit', array( 'label' => Mage::helper('magesms')->__('Reset filter'), 'onclick' => 'filterResetFormSubmit()' )); $this->addButton('filter_form_submit', array( 'label' => Mage::helper('magesms')->__('Apply filter'), 'onclick' => 'filterFormSubmit()' )); } }
app/code/community/Topefekt/Magesms/Block/Marketing/Form.php ADDED
@@ -0,0 +1,15 @@
1
+ <?php /**
2
+ * Mage SMS - SMS notification & SMS marketing
3
+ *
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * This source file is subject to the BSD 3-Clause License
7
+ * It is available through the world-wide-web at this URL:
8
+ * http://opensource.org/licenses/BSD-3-Clause
9
+ *
10
+ * @category TOPefekt
11
+ * @package TOPefekt_Magesms
12
+ * @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
13
+ * @license http://opensource.org/licenses/BSD-3-Clause
14
+ */
15
+ class Topefekt_Magesms_Block_Marketing_Form extends Mage_Adminhtml_Block_Widget_Form { protected function _prepareForm() { $id7c8c8e1d1b44e9917ce2ae9b4c7d03e2a3ab683 = $this->getUrl('*/*/filter'); $i1791b2d1f89bb2bd83b34046f59125af207713db = new Varien_Data_Form( array('id' => 'marketing_filter', 'action' => $id7c8c8e1d1b44e9917ce2ae9b4c7d03e2a3ab683, 'method' => 'get') ); $i5a4070f5dbe2b3be0f175bc31d21ce8a0e2e76dd = 'magesms_marketing_'; $i1791b2d1f89bb2bd83b34046f59125af207713db->setHtmlIdPrefix($i5a4070f5dbe2b3be0f175bc31d21ce8a0e2e76dd); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('customer_not', 'hidden', array( 'name' => 'customer_not', )); $i00f9b0a11b6d8c15e9d603e29ad96b2c88140a51 = $i1791b2d1f89bb2bd83b34046f59125af207713db->addFieldset('base_fieldset', array( 'legend' => Mage::helper('magesms')->__('SMS Marketing - bulk SMS filter'), ) ); $i1d62211db8a9db72de6d5dab2047f18cbfa90e19 = $i00f9b0a11b6d8c15e9d603e29ad96b2c88140a51->addFieldset('fieldset1', array('class' => 'float-left')); $if71cbed623a99cd5a1032d4d3388bfd486053db2 = array('' => '-->'.Mage::helper('magesms')->__('All stores')); foreach (Mage::app()->getWebsites($this->_isAdminScopeAllowed) as $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc) { $if71cbed623a99cd5a1032d4d3388bfd486053db2[$i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getId()] = $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getDataUsingMethod('name'); } $i1d62211db8a9db72de6d5dab2047f18cbfa90e19->addField('website_id', 'select', array( 'name' => 'website_id', 'options' => $if71cbed623a99cd5a1032d4d3388bfd486053db2, 'label' => Mage::helper('magesms')->__('Store:'), )); $i80d5e7e038cde7aac7e5d2335ded4e7785aa29c5 = Mage::getModel('customer/group')->getCollection()->toOptionArray(); array_unshift($i80d5e7e038cde7aac7e5d2335ded4e7785aa29c5, array('label' => '-->'.Mage::helper('magesms')->__('All'), 'value' => '')); $i1d62211db8a9db72de6d5dab2047f18cbfa90e19->addField('group_id', 'select', array( 'name' => 'group_id', 'values' => $i80d5e7e038cde7aac7e5d2335ded4e7785aa29c5, 'label' => Mage::helper('magesms')->__('Groups:'), )); $i1d62211db8a9db72de6d5dab2047f18cbfa90e19->addField('type', 'select', array( 'name' => 'type', 'options' => array( '' => '-->'.Mage::helper('magesms')->__('All customers'), '1' => Mage::helper('magesms')->__('company customers'), '2' => Mage::helper('magesms')->__('private customers') ), 'label' => Mage::helper('magesms')->__('Type:'), 'title' => Mage::helper('magesms')->__('Type:'), )); $i6973b269d81f66e6ce768ea1e423d5ef438b7e44 = $i00f9b0a11b6d8c15e9d603e29ad96b2c88140a51->addFieldset('fieldset2', array('class' => 'float-left')); $id92fd65e479a45fd28bc877dc5d15fc219af26db = Mage::getModel('eav/config')->getAttribute('customer', 'gender')->getSource()->getAllOptions(); foreach($id92fd65e479a45fd28bc877dc5d15fc219af26db as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$i287bcbe0c9dfb97b6c1bb92e5d892c0dea8b7ab0) $id92fd65e479a45fd28bc877dc5d15fc219af26db[$i670253c23c6fcba76bc4256a88fdd8fbc1041039]['label'] = Mage::helper('magesms')->__($id92fd65e479a45fd28bc877dc5d15fc219af26db[$i670253c23c6fcba76bc4256a88fdd8fbc1041039]['label']); $id92fd65e479a45fd28bc877dc5d15fc219af26db[0]['label'] = '-->'.Mage::helper('magesms')->__('All'); $i6973b269d81f66e6ce768ea1e423d5ef438b7e44->addField('gender', 'select', array( 'name' => 'gender', 'values' => $id92fd65e479a45fd28bc877dc5d15fc219af26db, 'label' => Mage::helper('magesms')->__('Gender:'), 'title' => Mage::helper('magesms')->__('Gender:'), )); $i6973b269d81f66e6ce768ea1e423d5ef438b7e44->addField('firstname', 'text', array( 'name' => 'firstname', 'label' => Mage::helper('magesms')->__('First name:'), 'title' => Mage::helper('magesms')->__('First name:'), )); $i6973b269d81f66e6ce768ea1e423d5ef438b7e44->addField('lastname', 'text', array( 'name' => 'lastname', 'label' => Mage::helper('magesms')->__('Last name:'), 'title' => Mage::helper('magesms')->__('Last name:'), )); $i86c493e99cbd47d91439d76b69a8635ff7e0951b = $i00f9b0a11b6d8c15e9d603e29ad96b2c88140a51->addFieldset('fieldset3', array('class' => 'float-left clear')); $i86c493e99cbd47d91439d76b69a8635ff7e0951b->addField('newsletter', 'select', array( 'name' => 'newsletter', 'options' => array( '' => '-->'.Mage::helper('magesms')->__('All'), '1' => Mage::helper('magesms')->__('yes'), '2' => Mage::helper('magesms')->__('no') ), 'label' => Mage::helper('magesms')->__('Newsletter:'), 'title' => Mage::helper('magesms')->__('Newsletter:'), )); $i195899c9895b81b9bc75dba762c949638a6f36dd = Mage::getModel('directory/country')->getCollection()->toOptionArray(); $i195899c9895b81b9bc75dba762c949638a6f36dd[0]['label'] = '-->'.Mage::helper('magesms')->__('All countries'); $i86c493e99cbd47d91439d76b69a8635ff7e0951b->addField('country_id', 'select', array( 'name' => 'country_id', 'values' => $i195899c9895b81b9bc75dba762c949638a6f36dd, 'label' => Mage::helper('magesms')->__('Country:'), )); $i86c493e99cbd47d91439d76b69a8635ff7e0951b->addField('city', 'text', array( 'name' => 'city', 'label' => Mage::helper('magesms')->__('City:'), 'title' => Mage::helper('magesms')->__('City:'), )); $i5e2f8ae4963934ca8fbc2fff6103b6356dd52c78 = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM); $i8e6fd52df86f5295fffe5104f8db4ec6715de949 = $i00f9b0a11b6d8c15e9d603e29ad96b2c88140a51->addFieldset('reg_fieldset', array( 'class' => 'float-left', ) ); $i8e6fd52df86f5295fffe5104f8db4ec6715de949->addField('reg_from', 'date', array( 'name' => 'reg_from', 'format' => $i5e2f8ae4963934ca8fbc2fff6103b6356dd52c78, 'image' => $this->getSkinUrl('images/grid-cal.gif'), 'label' => Mage::helper('magesms')->__('Date of registration from: '), 'title' => Mage::helper('magesms')->__('Date of registration from: '), )); $i8e6fd52df86f5295fffe5104f8db4ec6715de949->addField('reg_to', 'date', array( 'name' => 'reg_to', 'format' => $i5e2f8ae4963934ca8fbc2fff6103b6356dd52c78, 'image' => $this->getSkinUrl('images/grid-cal.gif'), 'label' => Mage::helper('magesms')->__('to: '), 'title' => Mage::helper('magesms')->__('to: '), )); $i8e6fd52df86f5295fffe5104f8db4ec6715de949->addField('reg_allyears', 'checkbox', array( 'name' => 'reg_allyears', 'value' => 1, 'checked' => $this->getFilterData()->getRegAllyears() ? true : false, 'label' => Mage::helper('magesms')->__('All years').':', 'title' => Mage::helper('magesms')->__('All years'), )); $i94a0c73886b997f60f48f7e0bbb9bc57703a3fdd = $i00f9b0a11b6d8c15e9d603e29ad96b2c88140a51->addFieldset('birth_fieldset', array( 'class' => 'float-left', ) ); $i94a0c73886b997f60f48f7e0bbb9bc57703a3fdd->addField('birth_from', 'date', array( 'name' => 'birth_from', 'format' => $i5e2f8ae4963934ca8fbc2fff6103b6356dd52c78, 'image' => $this->getSkinUrl('images/grid-cal.gif'), 'label' => Mage::helper('magesms')->__('Date of birth from: '), 'title' => Mage::helper('magesms')->__('Date of birth from: '), )); $i94a0c73886b997f60f48f7e0bbb9bc57703a3fdd->addField('birth_to', 'date', array( 'name' => 'birth_to', 'format' => $i5e2f8ae4963934ca8fbc2fff6103b6356dd52c78, 'image' => $this->getSkinUrl('images/grid-cal.gif'), 'label' => Mage::helper('magesms')->__('to: '), 'title' => Mage::helper('magesms')->__('to: '), )); $i94a0c73886b997f60f48f7e0bbb9bc57703a3fdd->addField('birth_allyears', 'checkbox', array( 'name' => 'birth_allyears', 'value' => 1, 'checked' => $this->getFilterData()->getBirthAllyears() ? true : false, 'label' => Mage::helper('magesms')->__('All years').':', 'title' => Mage::helper('magesms')->__('All years'), )); $i1791b2d1f89bb2bd83b34046f59125af207713db->setUseContainer(true); $this->setForm($i1791b2d1f89bb2bd83b34046f59125af207713db); return parent::_prepareForm(); } protected function _initFormValues() { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = $this->getFilterData()->getData(); foreach ($ia61712c27ea241bd7a543dc2b02ea572274d0322 as $i670253c23c6fcba76bc4256a88fdd8fbc1041039 => $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { if (is_array($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) && isset($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89[0])) { $ia61712c27ea241bd7a543dc2b02ea572274d0322[$i670253c23c6fcba76bc4256a88fdd8fbc1041039] = explode(',', $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89[0]); } } $this->getForm()->addValues($ia61712c27ea241bd7a543dc2b02ea572274d0322); return parent::_initFormValues(); } protected function _beforeToHtml() { $id567d29153b9150b8add34bc81058cd5432e46a0 = parent::_beforeToHtml(); return $id567d29153b9150b8add34bc81058cd5432e46a0; } }
app/code/community/Topefekt/Magesms/Block/Marketing/Grid.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-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); $this->setFilterData($this->getRequest()->getParam('filter')); } protected function _prepareCollection() { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::registry('magesms_marketing_collection'); $this->setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); parent::_prepareCollection(); $this->setAdditionalJavaScript('countitSMS.marketingCount = '.$this->getCollection()->getSize().";\ncountitSMS.count();\n"); return $this; } public function _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'; } public function getFilterData() { $iea2d876101fbc4dc03450ed5474bbd8a6fb905a2 = Mage::helper('adminhtml')->prepareFilterString($this->filter_data); $iea2d876101fbc4dc03450ed5474bbd8a6fb905a2 = Mage::helper('magesms')->filterDates($iea2d876101fbc4dc03450ed5474bbd8a6fb905a2, array('reg_from', 'reg_to', 'birth_from', 'birth_to')); $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = new Varien_Object(); foreach ($iea2d876101fbc4dc03450ed5474bbd8a6fb905a2 as $i670253c23c6fcba76bc4256a88fdd8fbc1041039 => $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { if (!empty($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) || is_numeric($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89)) { $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a->setData($i670253c23c6fcba76bc4256a88fdd8fbc1041039, $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); } } return $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a; } }
app/code/community/Topefekt/Magesms/Block/Profile.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-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')); } }
app/code/community/Topefekt/Magesms/Block/ShowTabsAdminBlock.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-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/Template.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-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)); } }
app/code/community/Topefekt/Magesms/Block/Wizard.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-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(); } }
app/code/community/Topefekt/Magesms/Block/Wizard/Grid.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-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())); } }
app/code/community/Topefekt/Magesms/Helper/Adminhtml/Data.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-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; } }
app/code/community/Topefekt/Magesms/Helper/Data.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-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 ''; } 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}#x2F;', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d9e76a736cd2ce866634b875b0e477fe802efd466); } 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) { $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; $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df = array( 'mobile' => $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, 'prefix' => $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd, 'isms' => '', 'sendertype' => '', 'senderID' => '' ); $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 = Mage::getSingleton('magesms/routes')->getCollection() ->addFilter('area', $i7492a7ab99a6ff1e0ae253366480ecb40a550224) ->addFilter('type', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a); foreach ($ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 as $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df['isms'] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d['isms']; $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df['sendertype'] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d['sendertype']; $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df['senderID'] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d['senderID']; } return $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df; } public function getHooks($i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7137e40370cf1c5ccf937060891613788203e2d6 = 'default') { if ($i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc > 0) { $if739aceffec69fa2733946a3d319defaa354082d = Mage::getSingleton('magesms/hooks')->getCollection() ->addFieldToFilter('lang', Mage::getStoreConfig('magesms/template/language')) ->addFieldToFilter('owner', array('neq'=>1)) ->addFieldToFilter('`group`', $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc); } else { $i42ee48f418943c9662de0976069476c7dc8f620d = Mage::getSingleton('magesms/hooks')->getCollection() ->addFieldToFilter('lang', Mage::getStoreConfig('magesms/template/language')) ->addFieldToFilter('owner', array('neq'=>1)) ->addFieldToFilter('`group`', $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; } } $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; } }
app/code/community/Topefekt/Magesms/Model/Admins.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-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; } }
app/code/community/Topefekt/Magesms/Model/Answers.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-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'); } }
app/code/community/Topefekt/Magesms/Model/Api.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-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; $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3 = $this->fba8eb60cc038de71062462629784762fcf874461($ia61712c27ea241bd7a543dc2b02ea572274d0322.'&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 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-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'); } }
app/code/community/Topefekt/Magesms/Model/Country/Area.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-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'); } }
app/code/community/Topefekt/Magesms/Model/Country/Lang.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-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'); } }
app/code/community/Topefekt/Magesms/Model/Exceptions.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-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='.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; } }
app/code/community/Topefekt/Magesms/Model/Hooks.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-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ class Topefekt_Magesms_Model_Hooks extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/hooks'); } public function send($i41496536c6b29c24b90c374d9fc25143f114dc9a, $i5e65dd16263683749d16a84171f719e768ed14b5) { $i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18 = Mage::getSingleton('magesms/smsprofile'); if ($i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->user) { $i589c2cccd18de711ec5e779b98b9f98d0347a925 = Mage::app()->getStore()->getGroupId(); if (!$i589c2cccd18de711ec5e779b98b9f98d0347a925 && $i5e65dd16263683749d16a84171f719e768ed14b5->hasStoreId()) { $i589c2cccd18de711ec5e779b98b9f98d0347a925 = Mage::getModel('core/store')->load($i5e65dd16263683749d16a84171f719e768ed14b5->getStoreId())->getGroupId(); } $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(1) ->setPriority(true) ->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getUnicode()); $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) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()->getCountryId(); if (!$i1f1945594819c4321de45ac15ed6d4dc07f41e2f) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress()->getCountryId(); } $ifb2b31a17a2f13d19aebc5823ae02f42988a78f2 = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerId(); $i489c048e0604d314330360b5ee23b42f486ebb98 = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerName(); } else { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = ''; $ifb2b31a17a2f13d19aebc5823ae02f42988a78f2 = $i5e65dd16263683749d16a84171f719e768ed14b5->getId(); } if ($i1f1945594819c4321de45ac15ed6d4dc07f41e2f && $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(2) ->setPriority(true); foreach($if2014d170e15e7f6f64523fd3238720980ceb64a as $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd) { if ($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getArea() == $i7492a7ab99a6ff1e0ae253366480ecb40a550224) { $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getUnicode()); break; } elseif ($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getArea() == 'default') $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getUnicode()); } $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 (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::app()->getStore()->getName(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_email'] = Mage::getStoreConfig('trans_email/ident_general/email'); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_phone'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_phone'] = Mage::getStoreConfig('general/store_information/phone'); } 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_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->getId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_payment'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_payment'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getPayment()->getMethod(); } 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 ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'newOrder') { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['cart_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['cart_id'] = Mage::getSingleton('checkout/session')->getQuoteId(); } $i32ce098f2dde8081cf3c4de31f52b408a6ad48be = $i5e65dd16263683749d16a84171f719e768ed14b5->getItemsCollection(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder1'])) { $i813c950729f632ca03f8c203c0a769de5e8bdf29 = array(); foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { $i813c950729f632ca03f8c203c0a769de5e8bdf29[] = $i69a1201e93806d55c970dfb18feec53d221ba37b->getId().'/'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getName().'/'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getQtyOrdered(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder1'] = implode('; ', $i813c950729f632ca03f8c203c0a769de5e8bdf29); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder2'])) { $i813c950729f632ca03f8c203c0a769de5e8bdf29 = array(); foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { $i813c950729f632ca03f8c203c0a769de5e8bdf29[] = 'id:'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getId().', ' .Mage::helper('magesms')->__('name').':'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getName().', ' .Mage::helper('magesms')->__('qty').':'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getQtyOrdered(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder2'] = implode('; ', $i813c950729f632ca03f8c203c0a769de5e8bdf29); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder3'])) { $i813c950729f632ca03f8c203c0a769de5e8bdf29 = array(); foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { $i813c950729f632ca03f8c203c0a769de5e8bdf29[] = $i69a1201e93806d55c970dfb18feec53d221ba37b->getId().'/'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getQtyOrdered(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder3'] = implode('; ', $i813c950729f632ca03f8c203c0a769de5e8bdf29); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder4'])) { $i813c950729f632ca03f8c203c0a769de5e8bdf29 = array(); foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { $i813c950729f632ca03f8c203c0a769de5e8bdf29[] = 'id:'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getId().', ' .Mage::helper('magesms')->__('qty').':'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getQtyOrdered(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder4'] = implode('; ', $i813c950729f632ca03f8c203c0a769de5e8bdf29); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder5'])) { $i813c950729f632ca03f8c203c0a769de5e8bdf29 = array(); foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { $i813c950729f632ca03f8c203c0a769de5e8bdf29[] = $i69a1201e93806d55c970dfb18feec53d221ba37b->getId().'/'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getSku().'/'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getQtyOrdered(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder5'] = implode('; ', $i813c950729f632ca03f8c203c0a769de5e8bdf29); } } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderStatus' || $i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderTrackingNumber') { $i9805d668f75b6b461f88474f57c5f6aa86a87316 = $i5e65dd16263683749d16a84171f719e768ed14b5->getTracksCollection()->getLastItem(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['carrier_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['carrier_name'] = $i9805d668f75b6b461f88474f57c5f6aa86a87316->getTitle(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_shipping_number'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_shipping_number'] = $i9805d668f75b6b461f88474f57c5f6aa86a87316->getTrackNumber(); } $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87 = Mage::getSingleton('admin/session')->getUser(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['employee_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['employee_id'] = $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87->getId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['employee_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['employee_email'] = $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87->getEmail(); } } } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'productOutOfStock' || $i41496536c6b29c24b90c374d9fc25143f114dc9a == 'productLowStock') { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_id'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getProductId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_quantity'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_quantity'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getQty(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_name']) || isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_ref'])) { $i69a1201e93806d55c970dfb18feec53d221ba37b = Mage::getModel('catalog/product'); $i69a1201e93806d55c970dfb18feec53d221ba37b->load($i5e65dd16263683749d16a84171f719e768ed14b5->getProductId()); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_name'] = $i69a1201e93806d55c970dfb18feec53d221ba37b->getName(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_ref'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_ref'] = $i69a1201e93806d55c970dfb18feec53d221ba37b->getSku(); } } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id']) || isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email']) || isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname']) || isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'])) { if ($i21e55df616c305955791876c1eb4da83448beba2 = Mage::getSingleton('customer/session')->getCustomer()) { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'] = $i21e55df616c305955791876c1eb4da83448beba2->getId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'] = $i21e55df616c305955791876c1eb4da83448beba2->getEmail(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'] = $i21e55df616c305955791876c1eb4da83448beba2->getLastname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'] = $i21e55df616c305955791876c1eb4da83448beba2->getFirstname(); } } } } foreach($i0933475b5bd80561a9f50282fd9eb0b8345cec4b as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa = str_replace('{'.$i670253c23c6fcba76bc4256a88fdd8fbc1041039.'}', $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89, $idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa); } } return $idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa; } private function f2b4066ec99f97011a4a9f20dd18d97b5a49b8b51(&$i0933475b5bd80561a9f50282fd9eb0b8345cec4b, $i53ddb2282ac3aca0d44abe35abcf69959ed66574) { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date'] = $i53ddb2282ac3aca0d44abe35abcf69959ed66574; } $i17c20960d197486b19dc890665362a4f2fd6f24a = date_parse($i53ddb2282ac3aca0d44abe35abcf69959ed66574); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date1'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date1'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'.'.$i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'.'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date2'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date2'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'/'.$i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'/'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date3'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date3'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date4'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date4'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['year'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['day']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date5'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date5'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'.'.$i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'.'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date6'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date6'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'/'.$i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'/'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date7'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date7'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_time'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_time'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['hour'].':'.sprintf('%02.0f', $i17c20960d197486b19dc890665362a4f2fd6f24a['minute']); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_time1'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_time1'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['hour'].':'.sprintf('%02.0f', $i17c20960d197486b19dc890665362a4f2fd6f24a['minute']).':'.sprintf('%02.0f', $i17c20960d197486b19dc890665362a4f2fd6f24a['second']); } } }
app/code/community/Topefekt/Magesms/Model/Hooks/Admins.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-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'); } }
app/code/community/Topefekt/Magesms/Model/Hooks/Customers.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-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'); } }
app/code/community/Topefekt/Magesms/Model/Hooks/Templates.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-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'); } }
app/code/community/Topefekt/Magesms/Model/Hooks/Unicode.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-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'); } }
app/code/community/Topefekt/Magesms/Model/Magesms.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-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'); } }
app/code/community/Topefekt/Magesms/Model/Maps.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-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'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Admins.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-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'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Admins/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-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'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Answers.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-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'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Answers/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-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'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/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-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'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Country.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-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'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Country/Area.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-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'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Country/Area/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-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'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Country/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-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'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Country/Lang.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-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'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Country/Lang/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-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'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Exceptions.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-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'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Exceptions/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-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'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks.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-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'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Admins.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-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'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Admins/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-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'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/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-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'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Customers.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-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'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Customers/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-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'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Templates.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-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'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Templates/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-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'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Unicode.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-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'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Unicode/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-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'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Maps.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-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'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Maps/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-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'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Ownnumbersender.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-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'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Ownnumbersender/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-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'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Routes.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-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'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Routes/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-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'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Smshistory.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-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'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Smshistory/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-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'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Smsuser.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-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'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Smsuser/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-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'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Textsender.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-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'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Textsender/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-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'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Variables.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-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'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Variables/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-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'); } }
app/code/community/Topefekt/Magesms/Model/Observer.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-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()->getShipment(); if ($i5e65dd16263683749d16a84171f719e768ed14b5->hasDataChanges() && $i5e65dd16263683749d16a84171f719e768ed14b5->getTracksCollection()->count()) { Mage::getSingleton('magesms/hooks')->send('updateOrderTrackingNumber', $i5e65dd16263683749d16a84171f719e768ed14b5->getOrder()); } return $this; } public function newOrder(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { 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 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='.$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/Overide/Cataloginventory/Stock.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-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); Mage::register('magesms_stock_item_'.$i670253c23c6fcba76bc4256a88fdd8fbc1041039, $i6e09c956df8f33f0146b262c4774ff2fe53579bd->getData()); } parent::correctItemsQty($i035599939f2d68a8936ff060ff10cbf982274764, $i18f5dd94efe6ea5893731db7537fa44426b4bba8, $i1db7e26fa11aa195a8425de5fe96b99a8a8eda0e); return $this; } }
app/code/community/Topefekt/Magesms/Model/Ownnumbersender.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-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'); } }
app/code/community/Topefekt/Magesms/Model/Routes.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-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 { 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) { $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='.$i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->user.'&password='.$i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->passwd.'&area='.$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 validate() { $ieeea3fa58a065e13acdb42aab551831a98e9444c = array(); $i0d09b2a4f282150bf47b02f9f3d82586fe313844 = Mage::helper('magesms'); 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/Sms.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-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; protected $_routes_type = array( 1 => 'admin', 2 => 'customer', 3 => 'customer', 4 => 'customer'); public function _construct() { $this->setData(array( 'recipient' => new Varien_Data_Collection(), 'message' => '', 'subject' => '', 'unicode' => false, 'sendlater' => false, 'type' => 4, 'priority' => true, 'unique' => false, 'adminId' => 0, 'customerId' => 0, 'recipientName' => '' )); parent::_construct(); } public function send() { $i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18 = Mage::getSingleton('magesms/smsprofile'); try { $ibdd27a8dd714410289189d318feb96fe6ed8e07f = array(); if (!strlen($this->getMessage())) { $ibdd27a8dd714410289189d318feb96fe6ed8e07f[] = Mage::helper('magesms')->__('Fill in SMS text.'); } if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) Mage::throwException($ibdd27a8dd714410289189d318feb96fe6ed8e07f[0]); if ($this->getSendlater()) { $i8284e7e828b5452004207db69edd7aa7ff0703ab = Mage::getModel('core/date')->gmtTimestamp(); if ($i8284e7e828b5452004207db69edd7aa7ff0703ab >= $this->getSendlater()) $ibdd27a8dd714410289189d318feb96fe6ed8e07f[] = Mage::helper('magesms')->__('Wrong time of SMS sending.'); } if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) Mage::throwException($ibdd27a8dd714410289189d318feb96fe6ed8e07f[0]); if (!count($this->getRecipient())) $ibdd27a8dd714410289189d318feb96fe6ed8e07f[] = Mage::helper('magesms')->__('Recipients found: 0'); if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) Mage::throwException($ibdd27a8dd714410289189d318feb96fe6ed8e07f[0]); $icd14fe4ea296b55b8ecbf19d2fd7bfef3a511519 = html_entity_decode($this->getMessage(), ENT_QUOTES, 'UTF-8'); $if295547318143e26fc7026b92d58e3d1eec229db = Mage::helper('magesms')->countSms($icd14fe4ea296b55b8ecbf19d2fd7bfef3a511519, $this->getUnicode()); if (!$i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->simulatesms && count($this->getRecipient())*$if295547318143e26fc7026b92d58e3d1eec229db*0.05 > $i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->credit) $ibdd27a8dd714410289189d318feb96fe6ed8e07f[] = Mage::helper('magesms')->__('You do not have enough credit to send SMS to all ') .count($this->getRecipient()).Mage::helper('magesms')->__(' recipients.'); if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) Mage::throwException($ibdd27a8dd714410289189d318feb96fe6ed8e07f[0]); $i854b57231c05dbaa7f22331dbaed4152a402d2f1 = new Zend_Locale_Data(); $i065c883e3f45e58104d21f8196ee3fe9bd2f513d = $i854b57231c05dbaa7f22331dbaed4152a402d2f1->getList('en-EN', 'phonetoterritory'); $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2 = array('number'=>array(), 'isms'=>array(), 'sendertype'=>array(), 'senderID'=>array(), 'admin_id'=>array(), 'customer_id'=>array()); foreach($this->getRecipient() as $i90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802) { $i39404799a9171a012cb8b15cd8f27b347aa44a5f = $i90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getNumber(); $i037b855bc01175f2c77d5c3e19eda9a0003feff4 = $i90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getCountry() ? $i90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getCountry() : ''; $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd = ''; if ($i037b855bc01175f2c77d5c3e19eda9a0003feff4 && $i065c883e3f45e58104d21f8196ee3fe9bd2f513d[$i037b855bc01175f2c77d5c3e19eda9a0003feff4] && !(strpos($i39404799a9171a012cb8b15cd8f27b347aa44a5f, '+') === 0 || strpos($i39404799a9171a012cb8b15cd8f27b347aa44a5f, '00') === 0)) { if (strpos($i39404799a9171a012cb8b15cd8f27b347aa44a5f, '0') === 0) $i39404799a9171a012cb8b15cd8f27b347aa44a5f = substr($i39404799a9171a012cb8b15cd8f27b347aa44a5f, 1); $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd = $i065c883e3f45e58104d21f8196ee3fe9bd2f513d[$i037b855bc01175f2c77d5c3e19eda9a0003feff4]; $i39404799a9171a012cb8b15cd8f27b347aa44a5f = $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd.$i39404799a9171a012cb8b15cd8f27b347aa44a5f; } $i813c950729f632ca03f8c203c0a769de5e8bdf29 = Mage::helper('magesms')->prepareNumber($i39404799a9171a012cb8b15cd8f27b347aa44a5f, $this->_routes_type[$this->getType()], $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd); 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'][] = $i90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getAdminId(); $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customer_id'][] = $i90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getCustomerId(); $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][] = $i90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getRecipient(); } } if ($i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->simulatesms) { foreach($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'] as $i670253c23c6fcba76bc4256a88fdd8fbc1041039 => $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b = Mage::getModel('magesms/smshistory'); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNumber('+'.$if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setDate(date('Y-m-d H:i:s')); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setText($icd14fe4ea296b55b8ecbf19d2fd7bfef3a511519); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::SIMULATION); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSender($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039]); $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->setTotal($if295547318143e26fc7026b92d58e3d1eec229db); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSubject($this->getSubject()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setAdminId($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['admin_id'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setCustomerId($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customer_id'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setRecipient($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->save(); } if (count($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'])) Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('SMS was sent (simulation).')); } else { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'username='.$i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->user.'&password='.$i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->passwd .'&unicode='.($this->getUnicode() ? 1 : 0).'&data='.$icd14fe4ea296b55b8ecbf19d2fd7bfef3a511519; if ($this->getPriority()) $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= '&action=sendsms&number='.$if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'][0] .'&isms='.$if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['isms'][0].'&sender='.$if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][0]; else $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= '&action=sendsmsall&number='.implode(';', $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number']) .'&isms='.implode(';', $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['isms']).'&sender='.implode(';', $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID']); if ($this->getSendlater()) $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= '&datelater='.$this->getSendlater(); $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getModel('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322, false); if (!empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720)) { if (strpos($i55dd4e7042a1f9031b84f07f04c37165ce3d0720, 'QQQ___QQQ') !== false) $id18c7e5bc71d5242a8b8cc24d43559e5dccbddb5 = explode("QQQ___QQQ", $i55dd4e7042a1f9031b84f07f04c37165ce3d0720); else $id18c7e5bc71d5242a8b8cc24d43559e5dccbddb5 = array($i55dd4e7042a1f9031b84f07f04c37165ce3d0720); foreach($id18c7e5bc71d5242a8b8cc24d43559e5dccbddb5 as $i670253c23c6fcba76bc4256a88fdd8fbc1041039 => $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $i17c20960d197486b19dc890665362a4f2fd6f24a = Mage::getModel('magesms/api')->parser($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89, '__'); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b = Mage::getModel('magesms/smshistory'); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNumber('+'.$if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setDate(date('Y-m-d H:i:s')); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setText($icd14fe4ea296b55b8ecbf19d2fd7bfef3a511519); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::ERROR); if (isset($i17c20960d197486b19dc890665362a4f2fd6f24a['data'][1])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setPrice($i17c20960d197486b19dc890665362a4f2fd6f24a['data'][1]); if (isset($i17c20960d197486b19dc890665362a4f2fd6f24a['data'][2])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setCredit($i17c20960d197486b19dc890665362a4f2fd6f24a['data'][2]); if (isset($i17c20960d197486b19dc890665362a4f2fd6f24a['data'][0])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSmsid($i17c20960d197486b19dc890665362a4f2fd6f24a['data'][0]); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSender($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039]); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['admin_id'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setAdminId($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['admin_id'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setUnicode($this->getUnicode()); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customer_id'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setCustomerId($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customer_id'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039]); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setRecipient($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setUnicode($this->getUnicode()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setType($this->getType()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setTotal($if295547318143e26fc7026b92d58e3d1eec229db); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSubject($this->getSubject()); if ($i17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 1 || $i17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 11) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::SENT); } elseif ($i17c20960d197486b19dc890665362a4f2fd6f24a['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 ($i17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3 && $i17c20960d197486b19dc890665362a4f2fd6f24a['datasrc'] == 9) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('wrong number or unavailable')); } elseif ($i17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3 && $i17c20960d197486b19dc890665362a4f2fd6f24a['datasrc'] == 15) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('unauthorized senderID in confirmation sms')); } elseif ($i17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3 && $i17c20960d197486b19dc890665362a4f2fd6f24a['datasrc'] == 10) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('low credit for sending sms')); } elseif ($i17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3 && $i17c20960d197486b19dc890665362a4f2fd6f24a['datasrc'] == 22) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('unicode is not supported')); } elseif ($i17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3 && $i17c20960d197486b19dc890665362a4f2fd6f24a['datasrc'] == 23) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('message duplicity')); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::DUPLICATE); } elseif ($i17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__($i17c20960d197486b19dc890665362a4f2fd6f24a['error'])); } elseif ($i17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 4) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('')); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customerID'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setCustomerId($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customerID'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039]); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setRecipient($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039]); } else { continue; } $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->save(); } 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()); } } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); } } public function setRecipient($ia61712c27ea241bd7a543dc2b02ea572274d0322) { if (is_string($ia61712c27ea241bd7a543dc2b02ea572274d0322)) { $if66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setNumber($ia61712c27ea241bd7a543dc2b02ea572274d0322); $this->getRecipient()->addItem($if66cdb02406b60b7d525f1fed0b5904ce5586ee6); } elseif (is_array($ia61712c27ea241bd7a543dc2b02ea572274d0322)) { foreach ($ia61712c27ea241bd7a543dc2b02ea572274d0322 as $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { if (!trim($iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d)) continue; $if66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setNumber(trim($iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d)); $this->getRecipient()->addItem($if66cdb02406b60b7d525f1fed0b5904ce5586ee6); } } return $this; } public function addRecipient($i39404799a9171a012cb8b15cd8f27b347aa44a5f, $ia61712c27ea241bd7a543dc2b02ea572274d0322 = array()) { $if66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setNumber($i39404799a9171a012cb8b15cd8f27b347aa44a5f); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322['country'])) $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setCountry($ia61712c27ea241bd7a543dc2b02ea572274d0322['country']); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322['customerId'])) $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setCustomerId($ia61712c27ea241bd7a543dc2b02ea572274d0322['customerId']); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322['adminId'])) $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setAdminId($ia61712c27ea241bd7a543dc2b02ea572274d0322['adminId']); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322['recipient'])) $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setRecipient($ia61712c27ea241bd7a543dc2b02ea572274d0322['recipient']); $this->getRecipient()->addItem($if66cdb02406b60b7d525f1fed0b5904ce5586ee6); return $this; } public function status($i7e9551ab4470830f87be4f9ff5edc75013bc9257 = false) { $i2e68560d8e15e3c18bb400939778a6bf1ae47190 = array(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::SENT); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_sent.png'); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('SENT to recipient')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$if66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $if66cdb02406b60b7d525f1fed0b5904ce5586ee6; $if66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::ERROR); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_canceled.gif'); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('ERROR')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$if66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $if66cdb02406b60b7d525f1fed0b5904ce5586ee6; $if66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::DELIVERED); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_accepted.gif'); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('DELIVERED to recipient')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$if66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $if66cdb02406b60b7d525f1fed0b5904ce5586ee6; $if66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::UNAVAILABLE); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_buffered.png'); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('RECIPIENT UNAVAILABLE')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$if66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $if66cdb02406b60b7d525f1fed0b5904ce5586ee6; $if66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::SIMULATION); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_simulation.png'); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('SIMULATION')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$if66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $if66cdb02406b60b7d525f1fed0b5904ce5586ee6; $if66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::SCHEDULED); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_scheduled.png'); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('SCHEDULED')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$if66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $if66cdb02406b60b7d525f1fed0b5904ce5586ee6; $if66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::DELETED); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_deleted.png'); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('DELETED')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$if66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $if66cdb02406b60b7d525f1fed0b5904ce5586ee6; $if66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::DND); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_donotdisturb.png'); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('DO NOT DISTURB registry (DND)')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$if66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $if66cdb02406b60b7d525f1fed0b5904ce5586ee6; $if66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::DUPLICATE); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_duplicate.png'); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('DUPLICATE')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$if66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $if66cdb02406b60b7d525f1fed0b5904ce5586ee6; if ($i7e9551ab4470830f87be4f9ff5edc75013bc9257 === false) return $i2e68560d8e15e3c18bb400939778a6bf1ae47190; elseif (isset($i2e68560d8e15e3c18bb400939778a6bf1ae47190[$i7e9551ab4470830f87be4f9ff5edc75013bc9257])) return $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$i7e9551ab4470830f87be4f9ff5edc75013bc9257]; return false; } }
app/code/community/Topefekt/Magesms/Model/Smshistory.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-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'); } }
app/code/community/Topefekt/Magesms/Model/Smsprofile.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-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='.$this->user->user.'&password='.$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 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-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(); } }
app/code/community/Topefekt/Magesms/Model/System/Config/Lang.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-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' => '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' => 'tr', 'label' => 'Turkish', ), ); } }
app/code/community/Topefekt/Magesms/Model/Textsender.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-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'); } }
app/code/community/Topefekt/Magesms/Model/Variables.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-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'); } }
app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/AboutController.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-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 Mage_Adminhtml_Controller_Action { private $v3a81d7d700dc6d1b4279ed33db8d01cd2cae8ed9; protected function _construct() { } public function preDispatch() { return parent::preDispatch(); } public function indexAction() { $this->loadLayout(); $this->_setActiveMenu('magesms/about'); $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(); } }
app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/AdminsmsController.php ADDED
@@ -0,0 +1,16 @@