├── LICENCE ├── README.md ├── modules └── addons │ └── aktuel_sms │ ├── aktuel_sms.php │ ├── hooks.php │ ├── hooks │ ├── AdminLogin.php │ ├── AfterModuleChangePackage.php │ ├── AfterModuleChangePassword.php │ ├── ClientLogin_admin.php │ ├── acceptorder.php │ ├── aftermodulecreate_hosting.php │ ├── aftermodulesuspend.php │ ├── aftermoduleunsuspend.php │ ├── afterregistrarregistration.php │ ├── afterregistrarregistration_admin.php │ ├── afterregistrarregistrationfailed.php │ ├── afterregistrarregistrationfailed_admin.php │ ├── afterregistrarrenewal.php │ ├── afterregistrarrenewal_admin.php │ ├── afterregistrarrenewalfailed_admin.php │ ├── clientadd.php │ ├── clientadd_admin.php │ ├── clientchangepassword.php │ ├── domainrenewalnotice.php │ ├── invoicecreated.php │ ├── invoicepaid.php │ ├── invoicepaymentreminder_first.php │ ├── invoicepaymentreminder_reminder.php │ ├── invoicepaymentreminder_second.php │ ├── invoicepaymentreminder_third.php │ ├── ticketadminreply.php │ ├── ticketclose.php │ ├── ticketopen_admin.php │ └── ticketuserreply_admin.php │ ├── lang │ ├── english.php │ ├── russian.php │ └── turkish.php │ ├── senders │ ├── SmsSenderInterface.php │ ├── birsms.php │ ├── bytehand.php │ ├── clickatell.php │ ├── dakiksms.php │ ├── hemenposta.php │ ├── msg91.php │ ├── mutlucell.php │ ├── netgsm.php │ ├── onetouch.php │ ├── routesms.php │ ├── sendsmsro.php │ ├── smsgateway.php │ └── ucuzsmsal.php │ └── smsclass.php └── version.txt /LICENCE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | AktuelSistem-WhmcsSmsAddon Copyright (C) 2012 Aktuel Sistem ve Bilgi Teknolojileri 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | DEPRECATED!!! DEVELOPMENT DOESN'T CONTINUE ANYMORE. NOBODY KNOWS IF IT WORKS WITH LATEST WHMCS VERSION. SORRY ABOUT THAT. 2 | ====================================================================== 3 | 4 | 5 | ENGLISH 6 | ======= 7 | 8 | WHMCS Sms Module 9 | --------------- 10 | 11 | Open Source SMS Module for WHMCS Automation. 12 | 13 | Installation 14 | --------------- 15 | 16 | * Upload files to your WHMCS root. 17 | * Go to Admin Area. Enter Menu->Setup->Addon Modules and Activate Aktuel Sms 18 | * After saving changes, give privigle to admin groups that you want at same page. 19 | * Go to Menu->Setup->Custom Client Fields 20 | * Add a field: name=Send Sms, type= Tick box, Show on Order Form=check. (This field will be shown at register page. If user do not check this field, SMS will not send to this user) 21 | * Add a field: name=GSM Number, type=Text Box, Show on Order Form=check. (This field will be shown at register page. Sms will send to this value that user fills.) 22 | 23 | * Enter Menu->Addons->Aktuel Sms 24 | * Write WHMCS Path and Select SMS Gateway. Write your api details. 25 | 26 | 27 | Supported SMS Gateways 28 | --------------- 29 | 30 | * ClickAtell (Global) 31 | * NetGsm (Turkey) 32 | * UcuzSmsAl (Turkey) 33 | * Mutlucell (Turkey) 34 | * Dakik SMS (Turkey) 35 | * msg91.com (India) 36 | * bytehand.com (Global, Russian) 37 | * 1sms.com.tr (Türkiye) 38 | * smsGateway.me (Global -> use your own android device to send SMS via API call) 39 | * SendSms.ro (Romania, Global) 40 | 41 | Supported Hooks 42 | --------------- 43 | 44 | * ClientChangePassword: Send sms to user if changes account password 45 | * TicketAdminReply: Send sms to user if admin replies user's ticket 46 | * ClientAdd: Send sms when user register 47 | * AfterRegistrarRegistration: Send sms to user when domain registred succesfully 48 | * AfterRegistrarRenewal: Send sms to user when domain renewed succesfully 49 | * AfterModuleCreate_SharedAccount: Send sms to user when hosting account created. 50 | * AfterModuleCreate_ResellerAccount: Send sms to user when reseller account created. 51 | * AcceptOrder: Send sms to user when order accepted manually or automatically. 52 | * DomainRenewalNotice: Remaining to the end of {x} days prior to the domain's end time, user will be get a message. 53 | * InvoicePaymentReminder: If there is a payment that not paid, user will be get a information message. 54 | * InvoicePaymentReminder_FirstOverdue: Invoice payment first for seconds overdue. 55 | * InvoicePaymentReminder_secondoverdue: Invoice payment second for seconds overdue. 56 | * InvoicePaymentReminder_thirdoverdue: Invoice payment third for seconds overdue. 57 | * AfterModuleSuspend: Send sms after hosting account suspended. 58 | * AfterModuleUnsuspend: Send sms after hosting account unsuspended. 59 | * InvoiceCreated: Send sms every invoice creation. 60 | * AfterModuleChangePassword: After module change password. 61 | * InvoicePaid: Whenyou have paidthe billsends a message. 62 | 63 | Contribute Plugin 64 | --------------- 65 | 66 | You are free (as freedom) to add new hooks, functions, issues, gateways etc. Just fork plugin, change what do you want and send pull request. 67 | 68 | Contributors 69 | ---------- 70 | 71 | * [Guven Atbakan](http://github.com/shibby) 72 | * [Turgay Coşkun](http://github.com/adalim61) 73 | * [Hakan Ersu](https://github.com/hakanersu) 74 | 75 | 76 | TURKISH 77 | ======= 78 | 79 | WHMCS Sms Eklentisi 80 | --------------- 81 | 82 | WHMCS için açık kaynak kodlu, SMS gönderme eklentisidir. Eklenti ücretsizdir. 83 | 84 | Kurulum 85 | --------------- 86 | 87 | * Dosyaları WHMCS klasörünüze yükleyin. 88 | * Admin sayfasına gidin. Menu->Setup->Addon Modules (Menü->Ayarlar->Ek Modüller) sayfasına gidin ve Aktuel Sms eklentisini aktifleştirin. 89 | * Kaydettikten sonra, aynı sayfada admin gruplarına yetki vermeyi unutmayın. 90 | * Menu->Setup->Custom Client Fields (Menü->Ayarlar->Müşteri Alanları) sayfasına gidin. 91 | * Yeni Bir Alan Ekleyin: name=Mesaj almak istiyor musunuz?, type= Tick box, Show on Order Form=check. (Bu alan, müşteriye kayıt sayfasında gösterilecek. Müşteri bu alanı işaretlemezse, sms gönderilmeyecek) 92 | * Yeni bir alan ekleyin: name=GSM Numarası, type=Text Box, Show on Order Form=check. (Bu alan, müşteriye kayıt sayfasında gösterilecek. Sms, müşterinin buraya girdiği değere gönderilecek) 93 | 94 | * Menu->Addons->Aktuel Sms (Menü->Eklentiler->Aktuel Sms) Eklentinin sayfasına gidin. 95 | * WHMCS yolunuzu yazın ve SMS göndermek için gönderici seçin. Daha sonra api detaylarınızı yazın. 96 | 97 | 98 | Desteklenen SMS Firmaları 99 | ---------------------- 100 | 101 | * ClickAtell (Global) 102 | * NetGsm (Türkiye) 103 | * UcuzSmsAl (Türkiye) 104 | * Mutlucell (Türkiye) 105 | * Dakik SMS (Türkiye) 106 | * msg91.com (Hindistan) 107 | * bytehand.com (Global, Russian) 108 | * 1sms.com.tr (Türkiye) 109 | * smsGateway.me (Global -> use your own android device to send SMS via API call) 110 | * SendSms.ro (Romania, Global) 111 | 112 | 113 | Desteklenen Hook'lar 114 | --------------- 115 | 116 | * ClientChangePassword: Müşterinin şifresi değiştiğinde sms gönderilir. 117 | * TicketAdminReply: Admin, müşterinin destek talebini yanıtladığında, müşteriye sms gönderilir. 118 | * ClientAdd: Müşteri kayıt olduğunda, hoşgeldiniz mesajı gönderilir. 119 | * AfterRegistrarRegistration: Domain başarıyla kayıt olduğunda, müşteriye bilgi mesajı gönderilir. 120 | * AfterRegistrarRenewal: Domain başarıyla yenilendiğinde, müşteriye bilgi mesajı gönderilir. 121 | * AfterModuleCreate_SharedAccount: Hosting hesabı oluşturulduğunda müşteriye kullanıcı adı ve şifrelerle birlikte bilgi mesajı gönderilir. 122 | * AfterModuleCreate_ResellerAccount: Reseller hesabı oluşturulduğunda müşteriye kullanıcı adı ve şifrelerle birlikte bilgi mesajı gönderilir. 123 | * AcceptOrder: Müşterinin siparişi onaylandığında, müşteriye bilgi mesajı gönderilir. 124 | * DomainRenewalNotice: Domainin süresinin dolmasına {x} gün kala müşteriye bilgilendirme mesajı gönderilir. {x: Eklentide belirleyebilisiniz.) 125 | * InvoicePaymentReminder: Eğer ödenmemiş bir fatura varsa müşteriye bilgi mesajı gönderilir. 126 | * InvoicePaymentReminder_FirstOverdue: Eğer fatura ödemesinin günü geçtiyse müşteriye bilgi mesajı gönderilir. 127 | * InvoicePaymentReminder_secondoverdue: Ödenmemiş faturanın ikinci zaman aşımında mesaj gönderir. 128 | * InvoicePaymentReminder_thirdoverdue: Ödenmemiş faturanın üçüncü zaman aşımında mesaj gönderir. 129 | * AfterModuleSuspend: Hosting hesabı suspend edilirse bilgi mesajı gönderilir. 130 | * AfterModuleUnsuspend: Hosting hesabı unsuspend edilirse bilgi mesajı gönderilir. 131 | * InvoiceCreated: Sistem yeni fatura oluşturursa bilgi mesajı gönderilir. 132 | * AfterModuleChangePassword: Hosting hesabı şifresi değiştiğinde gönderir. 133 | * InvoicePaid: Faturanız ödendiğinde mesaj gönderir. 134 | 135 | Katkıda bulun 136 | --------------- 137 | 138 | Yeni hook, fonksiyon, sms gönderici ve diğer bütün herşeyde özgürsünüz. Eklentiyi çoğaltın (fork) ve yaptığınız değişiklikler için Pull Request gönderin. 139 | 140 | Katkıda bulunanlar 141 | ---------- 142 | 143 | * [Güven Atbakan](http://github.com/shibby) 144 | * [Turgay Coşkun](http://github.com/adalim61) 145 | * [Hakan Ersu](https://github.com/hakanersu) 146 | 147 | Bazı Ekran Görüntüleri 148 | -------------- 149 | 150 | [![General Settings](http://i.imgur.com/ai5e1hos.png)](http://i.imgur.com/ai5e1ho.png) 151 | [![Sms Templates](http://i.imgur.com/PUksoY9s.png)](http://i.imgur.com/PUksoY9.png) 152 | [![Send Manual Sms](http://i.imgur.com/EJNwpwIs.png)](http://i.imgur.com/EJNwpwI.png) 153 | 154 | 155 | 156 | -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/aktuel_sms.php: -------------------------------------------------------------------------------- 1 | "Aktuel Sms", 17 | "description" => "WHMCS Sms Addon. You can see details from: https://github.com/AktuelSistem/WHMCS-SmsModule", 18 | "version" => "1.1.8", 19 | "author" => "Aktüel Sistem ve Bilgi Teknolojileri", 20 | "language" => "turkish", 21 | ); 22 | return $configarray; 23 | } 24 | 25 | function aktuel_sms_activate() 26 | { 27 | 28 | $query = "CREATE TABLE IF NOT EXISTS `mod_aktuelsms_messages` (`id` int(11) NOT NULL AUTO_INCREMENT,`sender` varchar(40) NOT NULL,`to` varchar(15) DEFAULT NULL,`text` text,`msgid` varchar(50) DEFAULT NULL,`status` varchar(10) DEFAULT NULL,`errors` text,`logs` text,`user` int(11) DEFAULT NULL,`datetime` datetime NOT NULL,PRIMARY KEY (`id`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;"; 29 | mysql_query($query); 30 | 31 | $query = "CREATE TABLE IF NOT EXISTS `mod_aktuelsms_settings` (`id` int(11) NOT NULL AUTO_INCREMENT,`api` varchar(40) CHARACTER SET utf8 NOT NULL,`apiparams` varchar(500) CHARACTER SET utf8 NOT NULL,`wantsmsfield` int(11) DEFAULT NULL,`gsmnumberfield` int(11) DEFAULT NULL,`dateformat` varchar(12) CHARACTER SET utf8 DEFAULT NULL,`version` varchar(6) CHARACTER SET utf8 DEFAULT NULL,PRIMARY KEY (`id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;"; 32 | mysql_query($query); 33 | 34 | $query = "INSERT INTO `mod_aktuelsms_settings` (`api`, `apiparams`, `wantsmsfield`, `gsmnumberfield`,`dateformat`, `version`) VALUES ('', '', 0, 0,'%d.%m.%y','1.1.3');"; 35 | mysql_query($query); 36 | 37 | $query = "CREATE TABLE IF NOT EXISTS `mod_aktuelsms_templates` (`id` int(11) NOT NULL AUTO_INCREMENT,`name` varchar(50) CHARACTER SET utf8 NOT NULL,`type` enum('client','admin') CHARACTER SET utf8 NOT NULL,`admingsm` varchar(255) CHARACTER SET utf8 NOT NULL,`template` varchar(240) CHARACTER SET utf8 NOT NULL,`variables` varchar(500) CHARACTER SET utf8 NOT NULL,`active` tinyint(1) NOT NULL,`extra` varchar(3) CHARACTER SET utf8 NOT NULL,`description` text CHARACTER SET utf8,PRIMARY KEY (`id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;"; 38 | mysql_query($query); 39 | 40 | //Creating hooks 41 | require_once("smsclass.php"); 42 | $class = new AktuelSms(); 43 | $class->checkHooks(); 44 | 45 | return array('status' => 'success', 'description' => 'Aktuel Sms succesfully activated :)'); 46 | } 47 | 48 | function aktuel_sms_deactivate() 49 | { 50 | 51 | $query = "DROP TABLE `mod_aktuelsms_templates`"; 52 | mysql_query($query); 53 | $query = "DROP TABLE `mod_aktuelsms_settings`"; 54 | mysql_query($query); 55 | $query = "DROP TABLE `mod_aktuelsms_messages`"; 56 | mysql_query($query); 57 | 58 | return array('status' => 'success', 'description' => 'Aktuel Sms succesfully deactivated :('); 59 | } 60 | 61 | function aktuel_sms_upgrade($vars) 62 | { 63 | $version = $vars['version']; 64 | 65 | switch ($version) { 66 | case "1": 67 | case "1.0.1": 68 | $sql = "ALTER TABLE `mod_aktuelsms_messages` ADD `errors` TEXT NULL AFTER `status` ;ALTER TABLE `mod_aktuelsms_templates` ADD `description` TEXT NULL ;ALTER TABLE `mod_aktuelsms_messages` ADD `logs` TEXT NULL AFTER `errors` ;"; 69 | mysql_query($sql); 70 | case "1.1": 71 | $sql = "ALTER TABLE `mod_aktuelsms_settings` CHANGE `apiparams` `apiparams` VARCHAR( 500 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ;"; 72 | mysql_query($sql); 73 | case "1.1.1": 74 | case "1.1.2": 75 | $sql = "ALTER TABLE `mod_aktuelsms_settings` ADD `dateformat` VARCHAR(12) NULL AFTER `gsmnumberfield`;UPDATE `mod_aktuelsms_settings` SET dateformat = '%d.%m.%y';"; 76 | mysql_query($sql); 77 | case "1.1.3": 78 | case "1.1.4": 79 | $sql = "ALTER TABLE `mod_aktuelsms_templates` CHANGE `name` `name` VARCHAR( 50 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,CHANGE `type` `type` ENUM( 'client', 'admin' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,CHANGE `admingsm` `admingsm` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,CHANGE `template` `template` VARCHAR( 240 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,CHANGE `variables` `variables` VARCHAR( 500 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,CHANGE `extra` `extra` VARCHAR( 3 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,CHANGE `description` `description` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ;"; 80 | mysql_query($sql); 81 | $sql = "ALTER TABLE `mod_aktuelsms_settings` CHANGE `api` `api` VARCHAR( 40 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,CHANGE `apiparams` `apiparams` VARCHAR( 500 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,CHANGE `dateformat` `dateformat` VARCHAR( 12 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,CHANGE `version` `version` VARCHAR( 6 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ;"; 82 | mysql_query($sql); 83 | $sql = "ALTER TABLE `mod_aktuelsms_messages` CHANGE `sender` `sender` VARCHAR( 40 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,CHANGE `to` `to` VARCHAR( 15 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,CHANGE `text` `text` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,CHANGE `msgid` `msgid` VARCHAR( 50 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,CHANGE `status` `status` VARCHAR( 10 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,CHANGE `errors` `errors` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,CHANGE `logs` `logs` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ;"; 84 | mysql_query($sql); 85 | 86 | $sql = "ALTER TABLE `mod_aktuelsms_templates` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;"; 87 | mysql_query($sql); 88 | $sql = "ALTER TABLE `mod_aktuelsms_settings` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;"; 89 | mysql_query($sql); 90 | $sql = "ALTER TABLE `mod_aktuelsms_messages` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;"; 91 | mysql_query($sql); 92 | case "1.1.5": 93 | case "1.1.6": 94 | case "1.1.7": 95 | break; 96 | 97 | } 98 | 99 | $class = new AktuelSms(); 100 | $class->checkHooks(); 101 | } 102 | 103 | function aktuel_sms_output($vars) 104 | { 105 | $modulelink = $vars['modulelink']; 106 | $version = $vars['version']; 107 | $LANG = $vars['_lang']; 108 | putenv("TZ=Europe/Istanbul"); 109 | 110 | $class = new AktuelSms(); 111 | 112 | $tab = $_GET['tab']; 113 | echo ' 114 | 124 | '; 125 | if (!isset($tab) || $tab == "settings") { 126 | /* UPDATE SETTINGS */ 127 | if ($_POST['params']) { 128 | $update = array( 129 | "api" => $_POST['api'], 130 | "apiparams" => json_encode($_POST['params']), 131 | 'wantsmsfield' => $_POST['wantsmsfield'], 132 | 'gsmnumberfield' => $_POST['gsmnumberfield'], 133 | 'dateformat' => $_POST['dateformat'] 134 | ); 135 | update_query("mod_aktuelsms_settings", $update, ""); 136 | } 137 | /* UPDATE SETTINGS */ 138 | 139 | $settings = $class->getSettings(); 140 | $apiparams = json_decode($settings['apiparams']); 141 | 142 | /* CUSTOM FIELDS START */ 143 | $where = array( 144 | "fieldtype" => array("sqltype" => "LIKE", "value" => "tickbox"), 145 | "showorder" => array("sqltype" => "LIKE", "value" => "on") 146 | ); 147 | $result = select_query("tblcustomfields", "id,fieldname", $where); 148 | $wantsms = ''; 149 | while ($data = mysql_fetch_array($result)) { 150 | if ($data['id'] == $settings['wantsmsfield']) { 151 | $selected = 'selected="selected"'; 152 | } else { 153 | $selected = ""; 154 | } 155 | $wantsms .= ''; 156 | } 157 | 158 | $where = array( 159 | "fieldtype" => array("sqltype" => "LIKE", "value" => "text"), 160 | "showorder" => array("sqltype" => "LIKE", "value" => "on") 161 | ); 162 | $result = select_query("tblcustomfields", "id,fieldname", $where); 163 | $gsmnumber = ''; 164 | while ($data = mysql_fetch_array($result)) { 165 | if ($data['id'] == $settings['gsmnumberfield']) { 166 | $selected = 'selected="selected"'; 167 | } else { 168 | $selected = ""; 169 | } 170 | $gsmnumber .= ''; 171 | } 172 | /* CUSTOM FIELDS FINISH HIM */ 173 | 174 | $classers = $class->getSenders(); 175 | $classersoption = ''; 176 | $classersfields = ''; 177 | foreach ($classers as $classer) { 178 | $classersoption .= ''; 179 | if ($settings['api'] == $classer['value']) { 180 | foreach ($classer['fields'] as $field) { 181 | $classersfields .= 182 | ' 183 | ' . $LANG[$field] . ' 184 | 185 | '; 186 | } 187 | } 188 | } 189 | 190 | echo ' 191 | 198 |
199 | 200 |
201 | 202 | 203 | 204 | 205 | 210 | 211 | 212 | 213 | 214 | 215 | ' . $classersfields . ' 216 | 217 | 218 | 219 | 220 | 221 | 222 | 227 | 228 | 229 | 230 | 231 | 236 | 237 | 238 | 239 | 240 | 241 | 242 |
' . $LANG['sender'] . ' 206 | 209 |
' . $LANG['senderid'] . ' e.g: AktuelHost
' . $LANG['signature'] . ' e.g: www.aktuelsistem.com
' . $LANG['wantsmsfield'] . ' 223 | 226 |
' . $LANG['gsmnumberfield'] . ' 232 | 235 |
' . $LANG['dateformat'] . ' e.g: %d.%m.%y (27.01.2014)
243 |
244 |

245 |
246 | '; 247 | } elseif ($tab == "templates") { 248 | if ($_POST['submit']) { 249 | $where = array("type" => array("sqltype" => "LIKE", "value" => $_GET['type'])); 250 | $result = select_query("mod_aktuelsms_templates", "*", $where); 251 | while ($data = mysql_fetch_array($result)) { 252 | if ($_POST[$data['id'] . '_active'] == "on") { 253 | $tmp_active = 1; 254 | } else { 255 | $tmp_active = 0; 256 | } 257 | $update = array( 258 | "template" => $_POST[$data['id'] . '_template'], 259 | "active" => $tmp_active 260 | ); 261 | 262 | if (isset($_POST[$data['id'] . '_extra'])) { 263 | $update['extra'] = trim($_POST[$data['id'] . '_extra']); 264 | } 265 | if (isset($_POST[$data['id'] . '_admingsm'])) { 266 | $update['admingsm'] = $_POST[$data['id'] . '_admingsm']; 267 | $update['admingsm'] = str_replace(" ", "", $update['admingsm']); 268 | } 269 | update_query("mod_aktuelsms_templates", $update, "id = " . $data['id']); 270 | } 271 | } 272 | 273 | echo '
274 | 275 |
276 | 277 | '; 278 | $where = array("type" => array("sqltype" => "LIKE", "value" => $_GET['type'])); 279 | $result = select_query("mod_aktuelsms_templates", "*", $where); 280 | 281 | while ($data = mysql_fetch_array($result)) { 282 | if ($data['active'] == 1) { 283 | $active = 'checked = "checked"'; 284 | } else { 285 | $active = ''; 286 | } 287 | $desc = json_decode($data['description']); 288 | if (isset($desc->$LANG['lang'])) { 289 | $name = $desc->$LANG['lang']; 290 | } else { 291 | $name = $data['name']; 292 | } 293 | echo ' 294 | 295 | 296 | 299 | '; 300 | echo ' 301 | 302 | 303 | 304 | 305 | '; 306 | echo ' 307 | 308 | 309 | 310 | 311 | '; 312 | 313 | if (!empty($data['extra'])) { 314 | echo ' 315 | 316 | 317 | 320 | 321 | '; 322 | } 323 | if ($_GET['type'] == "admin") { 324 | echo ' 325 | 326 | 327 | 331 | 332 | '; 333 | } 334 | echo ' 335 | 336 | '; 337 | } 338 | echo ' 339 | 340 |
' . $name . ' 297 | 298 |
' . $LANG['active'] . '
' . $LANG['parameter'] . '' . $data['variables'] . '
' . $LANG['ekstra'] . ' 318 | 319 |
' . $LANG['admingsm'] . ' 328 | 329 | ' . $LANG['admingsmornek'] . ' 330 |

341 |
342 |

343 |
'; 344 | 345 | } elseif ($tab == "messages") { 346 | if (!empty($_GET['deletesms'])) { 347 | $smsid = (int)$_GET['deletesms']; 348 | $sql = "DELETE FROM mod_aktuelsms_messages WHERE id = '$smsid'"; 349 | mysql_query($sql); 350 | } 351 | echo ' 352 | 360 | 361 |
362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | '; 376 | 377 | // Getting pagination values. 378 | $page = isset($_GET['page']) ? (int)$_GET['page'] : 1; 379 | $limit = (isset($_GET['limit']) && $_GET['limit'] <= 50) ? (int)$_GET['limit'] : 10; 380 | $start = ($page > 1) ? ($page * $limit) - $limit : 0; 381 | $order = isset($_GET['order']) ? $_GET['order'] : 'DESC'; 382 | /* Getting messages order by date desc */ 383 | $sql = "SELECT `m`.*,`user`.`firstname`,`user`.`lastname` 384 | FROM `mod_aktuelsms_messages` as `m` 385 | JOIN `tblclients` as `user` ON `m`.`user` = `user`.`id` 386 | ORDER BY `m`.`datetime` {$order} limit {$start},{$limit}"; 387 | $result = mysql_query($sql); 388 | $i = 0; 389 | 390 | //Getting total records 391 | $total = "SELECT count(id) as toplam FROM `mod_aktuelsms_messages`"; 392 | $sonuc = mysql_query($total); 393 | $sonuc = mysql_fetch_array($sonuc); 394 | $toplam = $sonuc['toplam']; 395 | 396 | //Page calculation 397 | $sayfa = ceil($toplam / $limit); 398 | 399 | while ($data = mysql_fetch_array($result)) { 400 | if ($data['msgid'] && $data['status'] == "") { 401 | $status = $class->getReport($data['msgid']); 402 | mysql_query("UPDATE mod_aktuelsms_messages SET status = '$status' WHERE id = " . $data['id'] . ""); 403 | } else { 404 | $status = $data['status']; 405 | } 406 | 407 | $i++; 408 | echo ' 409 | 410 | 411 | 412 | 413 | 414 | 415 | '; 416 | } 417 | /* Getting messages order by date desc */ 418 | 419 | echo ' 420 | 421 |
#' . $LANG['client'] . '' . $LANG['gsmnumber'] . '' . $LANG['message'] . '' . $LANG['datetime'] . '' . $LANG['status'] . '
' . $data['id'] . '' . $data['firstname'] . ' ' . $data['lastname'] . '' . $data['to'] . '' . $data['text'] . '' . $data['datetime'] . '' . $LANG[$status] . 'Delete
422 | 423 | '; 424 | $list = ""; 425 | for ($a = 1; $a <= $sayfa; $a++) { 426 | $selected = ($page == $a) ? 'selected="selected"' : ''; 427 | $list .= ""; 428 | } 429 | echo "
"; 430 | 431 | } elseif ($tab == "sendbulk") { 432 | $settings = $class->getSettings(); 433 | 434 | if (!empty($_POST['client'])) { 435 | $userinf = explode("_", $_POST['client']); 436 | $userid = $userinf[0]; 437 | $gsmnumber = $userinf[1]; 438 | 439 | $class->setGsmnumber($gsmnumber); 440 | $class->setMessage($_POST['message']); 441 | $class->setUserid($userid); 442 | 443 | $result = $class->send(); 444 | if ($result == false) { 445 | echo $class->getErrors(); 446 | } else { 447 | echo $LANG['smssent'] . ' ' . $gsmnumber; 448 | } 449 | 450 | if ($_POST["debug"] == "ON") { 451 | $debug = 1; 452 | } 453 | } 454 | 455 | $userSql = "SELECT `a`.`id`,`a`.`firstname`, `a`.`lastname`, `b`.`value` as `gsmnumber` 456 | FROM `tblclients` as `a` 457 | JOIN `tblcustomfieldsvalues` as `b` ON `b`.`relid` = `a`.`id` 458 | JOIN `tblcustomfieldsvalues` as `c` ON `c`.`relid` = `a`.`id` 459 | WHERE `b`.`fieldid` = '" . $settings['gsmnumberfield'] . "' 460 | AND `c`.`fieldid` = '" . $settings['wantsmsfield'] . "' 461 | AND `c`.`value` = 'on' order by `a`.`firstname`"; 462 | $clients = ''; 463 | $result = mysql_query($userSql); 464 | while ($data = mysql_fetch_array($result)) { 465 | $clients .= ''; 466 | } 467 | echo ' 468 | '; 501 | echo '
502 | 503 |
504 | 505 | 506 | 507 | 508 | 515 | 516 | 517 | 518 | 521 | 522 | 523 | 524 | 525 | 526 | 527 |
' . $LANG['client'] . ' 509 |
510 | 514 |
' . $LANG['mesaj'] . ' 519 | 520 |
' . $LANG['debug'] . '
528 |
529 |

530 |
'; 531 | 532 | if (isset($debug)) { 533 | echo $class->getLogs(); 534 | } 535 | } elseif ($tab == "update") { 536 | $currentversion = file_get_contents("https://raw.github.com/AktuelSistem/WHMCS-SmsModule/master/version.txt"); 537 | echo '
'; 538 | if ($version != $currentversion) { 539 | echo $LANG['newversion']; 540 | } else { 541 | echo $LANG['uptodate'] . '

'; 542 | } 543 | echo '
'; 544 | } 545 | 546 | $credit = $class->getBalance(); 547 | if ($credit) { 548 | echo ' 549 |
550 | ' . $LANG['credit'] . ': ' . $credit . ' 551 |
'; 552 | } 553 | 554 | echo $LANG['lisans']; 555 | } 556 | -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/hooks.php: -------------------------------------------------------------------------------- 1 | getHooks(); 17 | 18 | foreach ($hooks as $hook) { 19 | add_hook($hook['hook'], 1, $hook['function'], ""); 20 | } -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/hooks/AdminLogin.php: -------------------------------------------------------------------------------- 1 | 'AdminLogin', 4 | 'function' => 'AdminLogin_admin', 5 | 'type' => 'admin', 6 | 'extra' => '', 7 | 'defaultmessage' => '{username}, Yonetici paneline giris yapti.', 8 | 'variables' => '{username}' 9 | ); 10 | if (!function_exists('AdminLogin_admin')) { 11 | function AdminLogin_admin($args) 12 | { 13 | $class = new AktuelSms(); 14 | $template = $class->getTemplateDetails(__FUNCTION__); 15 | if ($template['active'] == 0) { 16 | return null; 17 | } 18 | $settings = $class->getSettings(); 19 | if (!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']) { 20 | return null; 21 | } 22 | $admingsm = explode(",", $template['admingsm']); 23 | 24 | $template['variables'] = str_replace(" ", "", $template['variables']); 25 | $replacefrom = explode(",", $template['variables']); 26 | $replaceto = array($args['username']); 27 | $message = str_replace($replacefrom, $replaceto, $template['template']); 28 | 29 | foreach ($admingsm as $gsm) { 30 | if (!empty($gsm)) { 31 | $class->setGsmnumber(trim($gsm)); 32 | $class->setUserid(0); 33 | $class->setMessage($message); 34 | $class->send(); 35 | } 36 | } 37 | } 38 | } 39 | 40 | return $hook; 41 | -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/hooks/AfterModuleChangePackage.php: -------------------------------------------------------------------------------- 1 | 'AfterModuleChangePackage', 4 | 'function' => 'AfterModuleChangePackage', 5 | 'description' => array( 6 | 'turkish' => 'Paket değişikliğinde mesaj gönderir', 7 | 'english' => 'After module Change Package' 8 | ), 9 | 'type' => 'client', 10 | 'extra' => '', 11 | 'defaultmessage' => 'Sayin {firstname} {lastname}, ürün/hizmet paketiniz degistirildi. ({domain})', 12 | 'variables' => '{firstname},{lastname},{domain}' 13 | ); 14 | if (!function_exists('AfterModuleChangePackage')) { 15 | function AfterModuleChangePackage($args) 16 | { 17 | $type = $args['params']['producttype']; 18 | 19 | if ($type == "hostingaccount") { 20 | $class = new AktuelSms(); 21 | $template = $class->getTemplateDetails(__FUNCTION__); 22 | if ($template['active'] == 0) { 23 | return null; 24 | } 25 | $settings = $class->getSettings(); 26 | if (!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']) { 27 | return null; 28 | } 29 | } else { 30 | return null; 31 | } 32 | 33 | $userSql = "SELECT `a`.`id`,`a`.`firstname`, `a`.`lastname`, `b`.`value` as `gsmnumber` 34 | FROM `tblclients` as `a` 35 | JOIN `tblcustomfieldsvalues` as `b` ON `b`.`relid` = `a`.`id` 36 | JOIN `tblcustomfieldsvalues` as `c` ON `c`.`relid` = `a`.`id` 37 | WHERE `a`.`id` = '" . $args['params']['clientsdetails']['userid'] . "' 38 | AND `b`.`fieldid` = '" . $settings['gsmnumberfield'] . "' 39 | AND `c`.`fieldid` = '" . $settings['wantsmsfield'] . "' 40 | AND `c`.`value` = 'on' 41 | LIMIT 1"; 42 | 43 | $result = mysql_query($userSql); 44 | $num_rows = mysql_num_rows($result); 45 | if ($num_rows == 1) { 46 | $UserInformation = mysql_fetch_assoc($result); 47 | 48 | $template['variables'] = str_replace(" ", "", $template['variables']); 49 | $replacefrom = explode(",", $template['variables']); 50 | $replaceto = array($UserInformation['firstname'], $UserInformation['lastname'], $args['params']['domain']); 51 | $message = str_replace($replacefrom, $replaceto, $template['template']); 52 | 53 | $class->setGsmnumber($UserInformation['gsmnumber']); 54 | $class->setUserid($args['params']['clientsdetails']['userid']); 55 | $class->setMessage($message); 56 | $class->send(); 57 | } 58 | } 59 | } 60 | return $hook; 61 | -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/hooks/AfterModuleChangePassword.php: -------------------------------------------------------------------------------- 1 | 'AfterModuleChangePassword', 4 | 'function' => 'AfterModuleChangePassword', 5 | 'description' => array( 6 | 'turkish' => 'Hosting hesabı şifresi değiştiğinde gönderir', 7 | 'english' => 'After module change password' 8 | ), 9 | 'type' => 'client', 10 | 'extra' => '', 11 | 'defaultmessage' => 'Sayin {firstname} {lastname}, {domain} hizmetinin hosting sifresi basariyla degisti. KullaniciAdi: {username} Sifre: {password}', 12 | 'variables' => '{firstname}, {lastname}, {domain}, {username}, {password}' 13 | ); 14 | if (!function_exists('AfterModuleChangePassword')) { 15 | function AfterModuleChangePassword($args) 16 | { 17 | 18 | $type = $args['params']['producttype']; 19 | 20 | if ($type == "hostingaccount") { 21 | $class = new AktuelSms(); 22 | $template = $class->getTemplateDetails(__FUNCTION__); 23 | if ($template['active'] == 0) { 24 | return null; 25 | } 26 | $settings = $class->getSettings(); 27 | if (!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']) { 28 | return null; 29 | } 30 | } else { 31 | return null; 32 | } 33 | 34 | $userSql = "SELECT `a`.`id`,`a`.`firstname`, `a`.`lastname`, `b`.`value` as `gsmnumber` 35 | FROM `tblclients` as `a` 36 | JOIN `tblcustomfieldsvalues` as `b` ON `b`.`relid` = `a`.`id` 37 | JOIN `tblcustomfieldsvalues` as `c` ON `c`.`relid` = `a`.`id` 38 | WHERE `a`.`id` = '" . $args['params']['clientsdetails']['userid'] . "' 39 | AND `b`.`fieldid` = '" . $settings['gsmnumberfield'] . "' 40 | AND `c`.`fieldid` = '" . $settings['wantsmsfield'] . "' 41 | AND `c`.`value` = 'on' 42 | LIMIT 1"; 43 | 44 | $result = mysql_query($userSql); 45 | $num_rows = mysql_num_rows($result); 46 | if ($num_rows == 1) { 47 | $UserInformation = mysql_fetch_assoc($result); 48 | 49 | $template['variables'] = str_replace(" ", "", $template['variables']); 50 | $replacefrom = explode(",", $template['variables']); 51 | $replaceto = array($UserInformation['firstname'], $UserInformation['lastname'], $args['params']['domain'], $args['params']['username'], $args['params']['password']); 52 | $message = str_replace($replacefrom, $replaceto, $template['template']); 53 | 54 | 55 | $class->setGsmnumber($UserInformation['gsmnumber']); 56 | $class->setUserid($args['params']['clientsdetails']['userid']); 57 | $class->setMessage($message); 58 | $class->send(); 59 | } 60 | } 61 | } 62 | return $hook; 63 | -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/hooks/ClientLogin_admin.php: -------------------------------------------------------------------------------- 1 | 'ClientLogin', 4 | 'function' => 'ClientLogin_admin', 5 | 'type' => 'admin', 6 | 'extra' => '', 7 | 'defaultmessage' => '({firstname} {lastname}), Siteye giris yapti', 8 | 'variables' => '{firstname},{lastname}' 9 | ); 10 | 11 | if (!function_exists('ClientLogin_admin')) { 12 | function ClientLogin_admin($args) 13 | { 14 | $class = new AktuelSms(); 15 | $template = $class->getTemplateDetails(__FUNCTION__); 16 | if ($template['active'] == 0) { 17 | return null; 18 | } 19 | $settings = $class->getSettings(); 20 | if (!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']) { 21 | return null; 22 | } 23 | $admingsm = explode(",", $template['admingsm']); 24 | 25 | $userSql = "SELECT `a`.`id`,`a`.`firstname`, `a`.`lastname`, `b`.`value` as `gsmnumber` 26 | FROM `tblclients` as `a` 27 | JOIN `tblcustomfieldsvalues` as `b` ON `b`.`relid` = `a`.`id` 28 | JOIN `tblcustomfieldsvalues` as `c` ON `c`.`relid` = `a`.`id` 29 | WHERE `a`.`id` = '" . $args['userid'] . "' 30 | AND `b`.`fieldid` = '" . $settings['gsmnumberfield'] . "' 31 | AND `c`.`fieldid` = '" . $settings['wantsmsfield'] . "' 32 | AND `c`.`value` = 'on' 33 | LIMIT 1"; 34 | $result = mysql_query($userSql); 35 | $num_rows = mysql_num_rows($result); 36 | 37 | if ($num_rows == 1) { 38 | $UserInformation = mysql_fetch_assoc($result); 39 | 40 | $template['variables'] = str_replace(" ", "", $template['variables']); 41 | $replacefrom = explode(",", $template['variables']); 42 | $replaceto = array($UserInformation['firstname'], $UserInformation['lastname']); 43 | $message = str_replace($replacefrom, $replaceto, $template['template']); 44 | 45 | foreach ($admingsm as $gsm) { 46 | if (!empty($gsm)) { 47 | $class->setGsmnumber(trim($gsm)); 48 | $class->setUserid(0); 49 | $class->setMessage($message); 50 | } 51 | $class->send(); 52 | } 53 | } 54 | } 55 | } 56 | 57 | return $hook; 58 | -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/hooks/acceptorder.php: -------------------------------------------------------------------------------- 1 | 'AcceptOrder', 4 | 'function' => 'AcceptOrder_SMS', 5 | 'description' => array( 6 | 'turkish' => 'Sipariş onaylandığında mesaj gönderir', 7 | 'english' => 'After order accepted' 8 | ), 9 | 'type' => 'client', 10 | 'extra' => '', 11 | 'defaultmessage' => 'Sayin {firstname} {lastname}, {orderid} numarali siparisiniz onaylanmistir. ', 12 | 'variables' => '{firstname},{lastname},{orderid}' 13 | ); 14 | if (!function_exists('AcceptOrder_SMS')) { 15 | function AcceptOrder_SMS($args) 16 | { 17 | 18 | $class = new AktuelSms(); 19 | $template = $class->getTemplateDetails(__FUNCTION__); 20 | if ($template['active'] == 0) { 21 | return null; 22 | } 23 | $settings = $class->getSettings(); 24 | if (!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']) { 25 | return null; 26 | } 27 | 28 | $userSql = "SELECT `a`.`id`,`a`.`firstname`, `a`.`lastname`, `b`.`value` as `gsmnumber` 29 | FROM `tblclients` as `a` 30 | JOIN `tblcustomfieldsvalues` as `b` ON `b`.`relid` = `a`.`id` 31 | JOIN `tblcustomfieldsvalues` as `c` ON `c`.`relid` = `a`.`id` 32 | WHERE `a`.`id` IN (SELECT userid FROM tblorders WHERE id = '" . $args['orderid'] . "') 33 | AND `b`.`fieldid` = '" . $settings['gsmnumberfield'] . "' 34 | AND `c`.`fieldid` = '" . $settings['wantsmsfield'] . "' 35 | AND `c`.`value` = 'on' 36 | LIMIT 1"; 37 | 38 | $result = mysql_query($userSql); 39 | $num_rows = mysql_num_rows($result); 40 | if ($num_rows == 1) { 41 | $UserInformation = mysql_fetch_assoc($result); 42 | 43 | $template['variables'] = str_replace(" ", "", $template['variables']); 44 | $replacefrom = explode(",", $template['variables']); 45 | $replaceto = array($UserInformation['firstname'], $UserInformation['lastname'], $args['orderid']); 46 | $message = str_replace($replacefrom, $replaceto, $template['template']); 47 | 48 | 49 | $class->setGsmnumber($UserInformation['gsmnumber']); 50 | $class->setUserid($UserInformation['id']); 51 | $class->setMessage($message); 52 | $class->send(); 53 | } 54 | } 55 | } 56 | 57 | return $hook; -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/hooks/aftermodulecreate_hosting.php: -------------------------------------------------------------------------------- 1 | 'AfterModuleCreate', 4 | 'function' => 'AfterModuleCreate_Hosting', 5 | 'description' => array( 6 | 'turkish' => 'Hosting hesabı oluşturulduktan sonra mesaj gönderir', 7 | 'english' => 'After hosting create' 8 | ), 9 | 'type' => 'client', 10 | 'extra' => '', 11 | 'defaultmessage' => 'Sayin {firstname} {lastname}, {domain} icin hosting hizmeti aktif hale getirilmistir. KullaniciAdi: {username} Sifre: {password}', 12 | 'variables' => '{firstname}, {lastname}, {domain}, {username}, {password}' 13 | ); 14 | if (!function_exists('AfterModuleCreate_Hosting')) { 15 | function AfterModuleCreate_Hosting($args) 16 | { 17 | 18 | $type = $args['params']['producttype']; 19 | 20 | if ($type == "hostingaccount") { 21 | $class = new AktuelSms(); 22 | $template = $class->getTemplateDetails(__FUNCTION__); 23 | if ($template['active'] == 0) { 24 | return null; 25 | } 26 | $settings = $class->getSettings(); 27 | if (!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']) { 28 | return null; 29 | } 30 | } else { 31 | return null; 32 | } 33 | 34 | $userSql = "SELECT `a`.`id`,`a`.`firstname`, `a`.`lastname`, `b`.`value` as `gsmnumber` 35 | FROM `tblclients` as `a` 36 | JOIN `tblcustomfieldsvalues` as `b` ON `b`.`relid` = `a`.`id` 37 | JOIN `tblcustomfieldsvalues` as `c` ON `c`.`relid` = `a`.`id` 38 | WHERE `a`.`id` = '" . $args['params']['clientsdetails']['userid'] . "' 39 | AND `b`.`fieldid` = '" . $settings['gsmnumberfield'] . "' 40 | AND `c`.`fieldid` = '" . $settings['wantsmsfield'] . "' 41 | AND `c`.`value` = 'on' 42 | LIMIT 1"; 43 | 44 | $result = mysql_query($userSql); 45 | $num_rows = mysql_num_rows($result); 46 | if ($num_rows == 1) { 47 | $UserInformation = mysql_fetch_assoc($result); 48 | 49 | $template['variables'] = str_replace(" ", "", $template['variables']); 50 | $replacefrom = explode(",", $template['variables']); 51 | $replaceto = array($UserInformation['firstname'], $UserInformation['lastname'], $args['params']['domain'], $args['params']['username'], $args['params']['password']); 52 | $message = str_replace($replacefrom, $replaceto, $template['template']); 53 | 54 | 55 | $class->setGsmnumber($UserInformation['gsmnumber']); 56 | $class->setUserid($args['params']['clientsdetails']['userid']); 57 | $class->setMessage($message); 58 | $class->send(); 59 | } 60 | } 61 | } 62 | return $hook; 63 | -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/hooks/aftermodulesuspend.php: -------------------------------------------------------------------------------- 1 | 'AfterModuleSuspend', 4 | 'function' => 'AfterModuleSuspend', 5 | 'description' => array( 6 | 'turkish' => 'Bir hizmet duraklatıldığında mesaj gönderir', 7 | 'english' => 'After module suspended' 8 | ), 9 | 'type' => 'client', 10 | 'extra' => '', 11 | 'defaultmessage' => 'Sayin {firstname} {lastname}, hizmetiniz duraklatildi. ({domain})', 12 | 'variables' => '{firstname},{lastname},{domain}' 13 | ); 14 | if (!function_exists('AfterModuleSuspend')) { 15 | function AfterModuleSuspend($args) 16 | { 17 | 18 | $type = $args['params']['producttype']; 19 | 20 | if ($type == "hostingaccount") { 21 | $class = new AktuelSms(); 22 | $template = $class->getTemplateDetails(__FUNCTION__); 23 | if ($template['active'] == 0) { 24 | return null; 25 | } 26 | $settings = $class->getSettings(); 27 | if (!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']) { 28 | return null; 29 | } 30 | } else { 31 | return null; 32 | } 33 | 34 | 35 | $userSql = "SELECT `a`.`id`,`a`.`firstname`, `a`.`lastname`, `b`.`value` as `gsmnumber` 36 | FROM `tblclients` as `a` 37 | JOIN `tblcustomfieldsvalues` as `b` ON `b`.`relid` = `a`.`id` 38 | JOIN `tblcustomfieldsvalues` as `c` ON `c`.`relid` = `a`.`id` 39 | WHERE `a`.`id` = '" . $args['params']['clientsdetails']['userid'] . "' 40 | AND `b`.`fieldid` = '" . $settings['gsmnumberfield'] . "' 41 | AND `c`.`fieldid` = '" . $settings['wantsmsfield'] . "' 42 | AND `c`.`value` = 'on' 43 | LIMIT 1"; 44 | 45 | $result = mysql_query($userSql); 46 | $num_rows = mysql_num_rows($result); 47 | if ($num_rows == 1) { 48 | $UserInformation = mysql_fetch_assoc($result); 49 | 50 | $template['variables'] = str_replace(" ", "", $template['variables']); 51 | $replacefrom = explode(",", $template['variables']); 52 | $replaceto = array($UserInformation['firstname'], $UserInformation['lastname'], $args['params']['domain']); 53 | $message = str_replace($replacefrom, $replaceto, $template['template']); 54 | 55 | $class->setGsmnumber($UserInformation['gsmnumber']); 56 | $class->setUserid($args['params']['clientsdetails']['userid']); 57 | $class->setMessage($message); 58 | $class->send(); 59 | } 60 | } 61 | } 62 | 63 | return $hook; -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/hooks/aftermoduleunsuspend.php: -------------------------------------------------------------------------------- 1 | 'AfterModuleUnsuspend', 4 | 'function' => 'AfterModuleUnsuspend', 5 | 'description' => array( 6 | 'turkish' => 'Bir hizmet tekrar başlatıldığında mesaj gönderir', 7 | 'english' => 'After module unsuspend' 8 | ), 9 | 'type' => 'client', 10 | 'extra' => '', 11 | 'defaultmessage' => 'Sayin {firstname} {lastname}, hizmetiniz tekrar aktiflestirildi. ({domain})', 12 | 'variables' => '{firstname},{lastname},{domain}' 13 | ); 14 | if (!function_exists('AfterModuleUnsuspend')) { 15 | function AfterModuleUnsuspend($args) 16 | { 17 | $type = $args['params']['producttype']; 18 | 19 | if ($type == "hostingaccount") { 20 | $class = new AktuelSms(); 21 | $template = $class->getTemplateDetails(__FUNCTION__); 22 | if ($template['active'] == 0) { 23 | return null; 24 | } 25 | $settings = $class->getSettings(); 26 | if (!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']) { 27 | return null; 28 | } 29 | } else { 30 | return null; 31 | } 32 | 33 | $userSql = "SELECT `a`.`id`,`a`.`firstname`, `a`.`lastname`, `b`.`value` as `gsmnumber` 34 | FROM `tblclients` as `a` 35 | JOIN `tblcustomfieldsvalues` as `b` ON `b`.`relid` = `a`.`id` 36 | JOIN `tblcustomfieldsvalues` as `c` ON `c`.`relid` = `a`.`id` 37 | WHERE `a`.`id` = '" . $args['params']['clientsdetails']['userid'] . "' 38 | AND `b`.`fieldid` = '" . $settings['gsmnumberfield'] . "' 39 | AND `c`.`fieldid` = '" . $settings['wantsmsfield'] . "' 40 | AND `c`.`value` = 'on' 41 | LIMIT 1"; 42 | 43 | $result = mysql_query($userSql); 44 | $num_rows = mysql_num_rows($result); 45 | if ($num_rows == 1) { 46 | $UserInformation = mysql_fetch_assoc($result); 47 | 48 | $template['variables'] = str_replace(" ", "", $template['variables']); 49 | $replacefrom = explode(",", $template['variables']); 50 | $replaceto = array($UserInformation['firstname'], $UserInformation['lastname'], $args['params']['domain']); 51 | $message = str_replace($replacefrom, $replaceto, $template['template']); 52 | 53 | $class->setGsmnumber($UserInformation['gsmnumber']); 54 | $class->setUserid($args['params']['clientsdetails']['userid']); 55 | $class->setMessage($message); 56 | $class->send(); 57 | } 58 | } 59 | } 60 | return $hook; -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/hooks/afterregistrarregistration.php: -------------------------------------------------------------------------------- 1 | 'AfterRegistrarRegistration', 4 | 'function' => 'AfterRegistrarRegistration', 5 | 'description' => array( 6 | 'turkish' => 'Bir domain kayıt edildikten sonra mesaj gönderir', 7 | 'english' => 'After domain registration' 8 | ), 9 | 'type' => 'client', 10 | 'extra' => '', 11 | 'defaultmessage' => 'Sayin {firstname} {lastname}, alan adiniz basariyla kayit edildi. ({domain})', 12 | 'variables' => '{firstname},{lastname},{domain}' 13 | ); 14 | if (!function_exists('AfterRegistrarRegistration')) { 15 | function AfterRegistrarRegistration($args) 16 | { 17 | $class = new AktuelSms(); 18 | $template = $class->getTemplateDetails(__FUNCTION__); 19 | if ($template['active'] == 0) { 20 | return null; 21 | } 22 | $settings = $class->getSettings(); 23 | if (!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']) { 24 | return null; 25 | } 26 | 27 | $userSql = "SELECT `a`.`id`,`a`.`firstname`, `a`.`lastname`, `b`.`value` as `gsmnumber` 28 | FROM `tblclients` as `a` 29 | JOIN `tblcustomfieldsvalues` as `b` ON `b`.`relid` = `a`.`id` 30 | JOIN `tblcustomfieldsvalues` as `c` ON `c`.`relid` = `a`.`id` 31 | WHERE `a`.`id` = '" . $args['params']['userid'] . "' 32 | AND `b`.`fieldid` = '" . $settings['gsmnumberfield'] . "' 33 | AND `c`.`fieldid` = '" . $settings['wantsmsfield'] . "' 34 | AND `c`.`value` = 'on' 35 | LIMIT 1"; 36 | $result = mysql_query($userSql); 37 | $num_rows = mysql_num_rows($result); 38 | if ($num_rows == 1) { 39 | $UserInformation = mysql_fetch_assoc($result); 40 | 41 | $template['variables'] = str_replace(" ", "", $template['variables']); 42 | $replacefrom = explode(",", $template['variables']); 43 | $replaceto = array($UserInformation['firstname'], $UserInformation['lastname'], $args['params']['sld'] . "." . $args['params']['tld']); 44 | $message = str_replace($replacefrom, $replaceto, $template['template']); 45 | 46 | $class->setGsmnumber($UserInformation['gsmnumber']); 47 | $class->setUserid($args['params']['userid']); 48 | $class->setMessage($message); 49 | $class->send(); 50 | } 51 | 52 | } 53 | } 54 | 55 | return $hook; -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/hooks/afterregistrarregistration_admin.php: -------------------------------------------------------------------------------- 1 | 'AfterRegistrarRegistration', 4 | 'function' => 'AfterRegistrarRegistration_admin', 5 | 'type' => 'admin', 6 | 'extra' => '', 7 | 'defaultmessage' => 'Yeni domain kayit edildi. {domain}', 8 | 'variables' => '{domain}' 9 | ); 10 | if (!function_exists('AfterRegistrarRegistration_admin')) { 11 | function AfterRegistrarRegistration_admin($args) 12 | { 13 | $class = new AktuelSms(); 14 | $template = $class->getTemplateDetails(__FUNCTION__); 15 | if ($template['active'] == 0) { 16 | return null; 17 | } 18 | $settings = $class->getSettings(); 19 | if (!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']) { 20 | return null; 21 | } 22 | $admingsm = explode(",", $template['admingsm']); 23 | 24 | $template['variables'] = str_replace(" ", "", $template['variables']); 25 | $replacefrom = explode(",", $template['variables']); 26 | $replaceto = array($args['params']['sld'] . "." . $args['params']['tld']); 27 | $message = str_replace($replacefrom, $replaceto, $template['template']); 28 | 29 | foreach ($admingsm as $gsm) { 30 | if (!empty($gsm)) { 31 | $class->setGsmnumber(trim($gsm)); 32 | $class->setUserid(0); 33 | $class->setMessage($message); 34 | $class->send(); 35 | } 36 | } 37 | } 38 | } 39 | 40 | return $hook; -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/hooks/afterregistrarregistrationfailed.php: -------------------------------------------------------------------------------- 1 | 'AfterRegistrarRegistrationFailed', 4 | 'function' => 'AfterRegistrarRegistrationFailed', 5 | 'description' => array( 6 | 'turkish' => 'Domain kayıt edilirken hata oluşursa mesaj gönderilir', 7 | 'english' => 'After domain registration failed' 8 | ), 9 | 'type' => 'client', 10 | 'extra' => '', 11 | 'defaultmessage' => 'Sayin {firstname} {lastname}, alan adiniz kayit edilemedi. En kisa surede lutfen bizimle iletisime gecin ({domain})', 12 | 'variables' => '{firstname},{lastname},{domain}' 13 | ); 14 | if (!function_exists('AfterRegistrarRegistrationFailed')) { 15 | function AfterRegistrarRegistrationFailed($args) 16 | { 17 | $class = new AktuelSms(); 18 | $template = $class->getTemplateDetails(__FUNCTION__); 19 | if ($template['active'] == 0) { 20 | return null; 21 | } 22 | $settings = $class->getSettings(); 23 | if (!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']) { 24 | return null; 25 | } 26 | 27 | $userSql = "SELECT `a`.`id`,`a`.`firstname`, `a`.`lastname`, `b`.`value` as `gsmnumber` 28 | FROM `tblclients` as `a` 29 | JOIN `tblcustomfieldsvalues` as `b` ON `b`.`relid` = `a`.`id` 30 | JOIN `tblcustomfieldsvalues` as `c` ON `c`.`relid` = `a`.`id` 31 | WHERE `a`.`id` = '" . $args['params']['userid'] . "' 32 | AND `b`.`fieldid` = '" . $settings['gsmnumberfield'] . "' 33 | AND `c`.`fieldid` = '" . $settings['wantsmsfield'] . "' 34 | AND `c`.`value` = 'on' 35 | LIMIT 1"; 36 | $result = mysql_query($userSql); 37 | $num_rows = mysql_num_rows($result); 38 | if ($num_rows == 1) { 39 | $UserInformation = mysql_fetch_assoc($result); 40 | 41 | $template['variables'] = str_replace(" ", "", $template['variables']); 42 | $replacefrom = explode(",", $template['variables']); 43 | $replaceto = array($UserInformation['firstname'], $UserInformation['lastname'], $args['params']['sld'] . "." . $args['params']['tld']); 44 | $message = str_replace($replacefrom, $replaceto, $template['template']); 45 | 46 | $class->setGsmnumber($UserInformation['gsmnumber']); 47 | $class->setUserid($args['params']['userid']); 48 | $class->setMessage($message); 49 | $class->send(); 50 | } 51 | } 52 | } 53 | 54 | return $hook; 55 | -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/hooks/afterregistrarregistrationfailed_admin.php: -------------------------------------------------------------------------------- 1 | 'AfterRegistrarRegistrationFailed', 4 | 'function' => 'AfterRegistrarRegistrationFailed_admin', 5 | 'type' => 'admin', 6 | 'extra' => '', 7 | 'defaultmessage' => 'Domain kayit edilirken hata olustu. {domain}', 8 | 'variables' => '{domain}' 9 | ); 10 | if (!function_exists('AfterRegistrarRegistrationFailed_admin')) { 11 | function AfterRegistrarRegistrationFailed_admin($args) 12 | { 13 | $class = new AktuelSms(); 14 | $template = $class->getTemplateDetails(__FUNCTION__); 15 | if ($template['active'] == 0) { 16 | return null; 17 | } 18 | $settings = $class->getSettings(); 19 | if (!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']) { 20 | return null; 21 | } 22 | $admingsm = explode(",", $template['admingsm']); 23 | 24 | $template['variables'] = str_replace(" ", "", $template['variables']); 25 | $replacefrom = explode(",", $template['variables']); 26 | $replaceto = array($args['params']['sld'] . "." . $args['params']['tld']); 27 | $message = str_replace($replacefrom, $replaceto, $template['template']); 28 | 29 | foreach ($admingsm as $gsm) { 30 | if (!empty($gsm)) { 31 | $class->setGsmnumber(trim($gsm)); 32 | $class->setUserid(0); 33 | $class->setMessage($message); 34 | $class->send(); 35 | } 36 | } 37 | } 38 | } 39 | 40 | return $hook; 41 | -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/hooks/afterregistrarrenewal.php: -------------------------------------------------------------------------------- 1 | 'AfterRegistrarRenewal', 4 | 'function' => 'AfterRegistrarRenewal', 5 | 'description' => array( 6 | 'turkish' => 'Domain yenilendikten sonra mesaj gönderir', 7 | 'english' => 'After domain renewal' 8 | ), 9 | 'type' => 'client', 10 | 'extra' => '', 11 | 'defaultmessage' => 'Sayin {firstname} {lastname}, alan adiniz basariyla yenilendi. ({domain})', 12 | 'variables' => '{firstname},{lastname},{domain}' 13 | ); 14 | if (!function_exists('AfterRegistrarRenewal')) { 15 | function AfterRegistrarRenewal($args) 16 | { 17 | $class = new AktuelSms(); 18 | $template = $class->getTemplateDetails(__FUNCTION__); 19 | if ($template['active'] == 0) { 20 | return null; 21 | } 22 | $settings = $class->getSettings(); 23 | if (!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']) { 24 | return null; 25 | } 26 | 27 | $userSql = "SELECT `a`.`id`,`a`.`firstname`, `a`.`lastname`, `b`.`value` as `gsmnumber` 28 | FROM `tblclients` as `a` 29 | JOIN `tblcustomfieldsvalues` as `b` ON `b`.`relid` = `a`.`id` 30 | JOIN `tblcustomfieldsvalues` as `c` ON `c`.`relid` = `a`.`id` 31 | WHERE `a`.`id` = '" . $args['params']['userid'] . "' 32 | AND `b`.`fieldid` = '" . $settings['gsmnumberfield'] . "' 33 | AND `c`.`fieldid` = '" . $settings['wantsmsfield'] . "' 34 | AND `c`.`value` = 'on' 35 | LIMIT 1"; 36 | $result = mysql_query($userSql); 37 | $num_rows = mysql_num_rows($result); 38 | if ($num_rows == 1) { 39 | $UserInformation = mysql_fetch_assoc($result); 40 | 41 | $template['variables'] = str_replace(" ", "", $template['variables']); 42 | $replacefrom = explode(",", $template['variables']); 43 | $replaceto = array($UserInformation['firstname'], $UserInformation['lastname'], $args['params']['sld'] . "." . $args['params']['tld']); 44 | $message = str_replace($replacefrom, $replaceto, $template['template']); 45 | 46 | $class->setGsmnumber($UserInformation['gsmnumber']); 47 | $class->setUserid($args['params']['userid']); 48 | $class->setMessage($message); 49 | $class->send(); 50 | } 51 | 52 | } 53 | } 54 | 55 | return $hook; -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/hooks/afterregistrarrenewal_admin.php: -------------------------------------------------------------------------------- 1 | 'AfterRegistrarRenewal', 4 | 'function' => 'AfterRegistrarRenewal_admin', 5 | 'type' => 'admin', 6 | 'extra' => '', 7 | 'defaultmessage' => 'Domain yenilendi. {domain}', 8 | 'variables' => '{domain}' 9 | ); 10 | if (!function_exists('AfterRegistrarRenewal_admin')) { 11 | function AfterRegistrarRenewal_admin($args) 12 | { 13 | $class = new AktuelSms(); 14 | $template = $class->getTemplateDetails(__FUNCTION__); 15 | if ($template['active'] == 0) { 16 | return null; 17 | } 18 | $settings = $class->getSettings(); 19 | if (!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']) { 20 | return null; 21 | } 22 | $admingsm = explode(",", $template['admingsm']); 23 | 24 | $template['variables'] = str_replace(" ", "", $template['variables']); 25 | $replacefrom = explode(",", $template['variables']); 26 | $replaceto = array($args['params']['sld'] . "." . $args['params']['tld']); 27 | $message = str_replace($replacefrom, $replaceto, $template['template']); 28 | 29 | foreach ($admingsm as $gsm) { 30 | if (!empty($gsm)) { 31 | $class->setGsmnumber(trim($gsm)); 32 | $class->setUserid(0); 33 | $class->setMessage($message); 34 | $class->send(); 35 | } 36 | } 37 | } 38 | } 39 | 40 | return $hook; -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/hooks/afterregistrarrenewalfailed_admin.php: -------------------------------------------------------------------------------- 1 | 'AfterRegistrarRenewalFailed', 4 | 'function' => 'AfterRegistrarRenewalFailed_admin', 5 | 'type' => 'admin', 6 | 'extra' => '', 7 | 'defaultmessage' => 'Domain yenilenirken hata olustu. {domain}', 8 | 'variables' => '{domain}' 9 | ); 10 | if (!function_exists('AfterRegistrarRenewalFailed_admin')) { 11 | function AfterRegistrarRenewalFailed_admin($args) 12 | { 13 | $class = new AktuelSms(); 14 | $template = $class->getTemplateDetails(__FUNCTION__); 15 | if ($template['active'] == 0) { 16 | return null; 17 | } 18 | $settings = $class->getSettings(); 19 | if (!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']) { 20 | return null; 21 | } 22 | $admingsm = explode(",", $template['admingsm']); 23 | 24 | $template['variables'] = str_replace(" ", "", $template['variables']); 25 | $replacefrom = explode(",", $template['variables']); 26 | $replaceto = array($args['params']['sld'] . "." . $args['params']['tld']); 27 | $message = str_replace($replacefrom, $replaceto, $template['template']); 28 | 29 | foreach ($admingsm as $gsm) { 30 | if (!empty($gsm)) { 31 | $class->setGsmnumber(trim($gsm)); 32 | $class->setUserid(0); 33 | $class->setMessage($message); 34 | $class->send(); 35 | } 36 | } 37 | } 38 | } 39 | 40 | return $hook; -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/hooks/clientadd.php: -------------------------------------------------------------------------------- 1 | 'ClientAdd', 4 | 'function' => 'ClientAdd', 5 | 'description' => array( 6 | 'turkish' => 'Müşteri kayıt olduktan sonra mesaj gönderir', 7 | 'english' => 'After client register' 8 | ), 9 | 'type' => 'client', 10 | 'extra' => '', 11 | 'defaultmessage' => 'Sayin {firstname} {lastname}, AktuelHost a kayit oldugunuz icin tesekkur ederiz. Email: {email} Sifre: {password}', 12 | 'variables' => '{firstname},{lastname},{email},{password}' 13 | ); 14 | if (!function_exists('ClientAdd')) { 15 | function ClientAdd($args) 16 | { 17 | $class = new AktuelSms(); 18 | $template = $class->getTemplateDetails(__FUNCTION__); 19 | if ($template['active'] == 0) { 20 | return null; 21 | } 22 | $settings = $class->getSettings(); 23 | if (!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']) { 24 | return null; 25 | } 26 | 27 | $userSql = "SELECT `a`.`id`,`a`.`firstname`, `a`.`lastname`, `b`.`value` as `gsmnumber` 28 | FROM `tblclients` as `a` 29 | JOIN `tblcustomfieldsvalues` as `b` ON `b`.`relid` = `a`.`id` 30 | JOIN `tblcustomfieldsvalues` as `c` ON `c`.`relid` = `a`.`id` 31 | WHERE `a`.`id` = '" . $args['userid'] . "' 32 | AND `b`.`fieldid` = '" . $settings['gsmnumberfield'] . "' 33 | AND `c`.`fieldid` = '" . $settings['wantsmsfield'] . "' 34 | AND `c`.`value` = 'on' 35 | LIMIT 1"; 36 | $result = mysql_query($userSql); 37 | $num_rows = mysql_num_rows($result); 38 | 39 | if ($num_rows == 1) { 40 | $UserInformation = mysql_fetch_assoc($result); 41 | 42 | $template['variables'] = str_replace(" ", "", $template['variables']); 43 | $replacefrom = explode(",", $template['variables']); 44 | $replaceto = array($UserInformation['firstname'], $UserInformation['lastname'], $args['email'], $args['password']); 45 | $message = str_replace($replacefrom, $replaceto, $template['template']); 46 | 47 | $class->setGsmnumber($UserInformation['gsmnumber']); 48 | $class->setMessage($message); 49 | $class->setUserid($args['userid']); 50 | $class->send(); 51 | } 52 | } 53 | } 54 | 55 | return $hook; -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/hooks/clientadd_admin.php: -------------------------------------------------------------------------------- 1 | 'ClientAdd', 4 | 'function' => 'ClientAdd_admin', 5 | 'type' => 'admin', 6 | 'extra' => '', 7 | 'defaultmessage' => 'Sitenize yeni musteri kayit oldu.', 8 | 'variables' => '' 9 | ); 10 | if (!function_exists('ClientAdd_admin')) { 11 | function ClientAdd_admin($args) 12 | { 13 | $class = new AktuelSms(); 14 | $template = $class->getTemplateDetails(__FUNCTION__); 15 | if ($template['active'] == 0) { 16 | return null; 17 | } 18 | $settings = $class->getSettings(); 19 | if (!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']) { 20 | return null; 21 | } 22 | $admingsm = explode(",", $template['admingsm']); 23 | 24 | foreach ($admingsm as $gsm) { 25 | if (!empty($gsm)) { 26 | $class->setGsmnumber(trim($gsm)); 27 | $class->setUserid(0); 28 | $class->setMessage($template['template']); 29 | $class->send(); 30 | } 31 | } 32 | } 33 | } 34 | return $hook; -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/hooks/clientchangepassword.php: -------------------------------------------------------------------------------- 1 | 'ClientChangePassword', 4 | 'function' => 'ClientChangePassword', 5 | 'description' => array( 6 | 'turkish' => 'Müşteri şifresini değiştirdiğinde mesaj gönderir', 7 | 'english' => 'After client change password' 8 | ), 9 | 'type' => 'client', 10 | 'extra' => '', 11 | 'variables' => '{firstname},{lastname}', 12 | 'defaultmessage' => 'Sayin {firstname} {lastname}, sifreniz degistirildi. Eger bu islemi siz yapmadiysaniz lutfen bizimle iletisime gecin.', 13 | ); 14 | 15 | if (!function_exists('ClientChangePassword')) { 16 | function ClientChangePassword($args) 17 | { 18 | $class = new AktuelSms(); 19 | $template = $class->getTemplateDetails(__FUNCTION__); 20 | if ($template['active'] == 0) { 21 | return null; 22 | } 23 | $settings = $class->getSettings(); 24 | if (!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']) { 25 | return null; 26 | } 27 | 28 | $userSql = "SELECT `a`.`id`,`a`.`firstname`, `a`.`lastname`, `b`.`value` as `gsmnumber` 29 | FROM `tblclients` as `a` 30 | JOIN `tblcustomfieldsvalues` as `b` ON `b`.`relid` = `a`.`id` 31 | JOIN `tblcustomfieldsvalues` as `c` ON `c`.`relid` = `a`.`id` 32 | WHERE `a`.`id` = '" . $args['userid'] . "' 33 | AND `b`.`fieldid` = '" . $settings['gsmnumberfield'] . "' 34 | AND `c`.`fieldid` = '" . $settings['wantsmsfield'] . "' 35 | AND `c`.`value` = 'on' 36 | LIMIT 1"; 37 | $result = mysql_query($userSql); 38 | $num_rows = mysql_num_rows($result); 39 | if ($num_rows == 1) { 40 | $UserInformation = mysql_fetch_assoc($result); 41 | $template['variables'] = str_replace(" ", "", $template['variables']); 42 | $replacefrom = explode(",", $template['variables']); 43 | $replaceto = array($UserInformation['firstname'], $UserInformation['lastname']); 44 | $message = str_replace($replacefrom, $replaceto, $template['template']); 45 | 46 | $class->setGsmnumber($UserInformation['gsmnumber']); 47 | $class->setUserid($UserInformation['id']); 48 | $class->setMessage($message); 49 | $class->send(); 50 | } 51 | } 52 | } 53 | 54 | return $hook; -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/hooks/domainrenewalnotice.php: -------------------------------------------------------------------------------- 1 | 'DailyCronJob', 4 | 'function' => 'DomainRenewalNotice', 5 | 'description' => array( 6 | 'turkish' => 'Domainin yenilenmesine {x} gün kala mesaj gönderir', 7 | 'english' => 'Donmain renewal notice before {x} days ago' 8 | ), 9 | 'type' => 'client', 10 | 'extra' => '15', 11 | 'defaultmessage' => 'Sayin {firstname} {lastname}, {domain} alanadiniz {expirydate}({x} gun sonra) tarihinde sona erecektir. Yenilemek icin sitemizi ziyaret edin. www.aktuelhost.com', 12 | 'variables' => '{firstname}, {lastname}, {domain},{expirydate},{x}' 13 | ); 14 | if (!function_exists('DomainRenewalNotice')) { 15 | function DomainRenewalNotice($args) 16 | { 17 | 18 | $class = new AktuelSms(); 19 | $template = $class->getTemplateDetails(__FUNCTION__); 20 | if ($template['active'] == 0) { 21 | return null; 22 | } 23 | $settings = $class->getSettings(); 24 | if (!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']) { 25 | return null; 26 | } 27 | 28 | $extra = $template['extra']; 29 | $sqlDomain = "SELECT `userid` , `domain` , `expirydate` 30 | FROM `tbldomains` 31 | WHERE `status` = 'Active'"; 32 | $resultDomain = mysql_query($sqlDomain); 33 | while ($data = mysql_fetch_array($resultDomain)) { 34 | $tarih = explode("-", $data['expirydate']); 35 | $yesterday = mktime(0, 0, 0, $tarih[1], $tarih[2] - $extra, $tarih[0]); 36 | $today = date("Y-m-d"); 37 | if (date('Y-m-d', $yesterday) == $today) { 38 | $userSql = "SELECT `a`.`id` as userid,`a`.`firstname`, `a`.`lastname`, `b`.`value` as `gsmnumber` 39 | FROM `tblclients` as `a` 40 | JOIN `tblcustomfieldsvalues` as `b` ON `b`.`relid` = `a`.`id` 41 | JOIN `tblcustomfieldsvalues` as `c` ON `c`.`relid` = `a`.`id` 42 | WHERE `a`.`id` = '" . $data['userid'] . "' 43 | AND `b`.`fieldid` = '" . $settings['gsmnumberfield'] . "' 44 | AND `c`.`fieldid` = '" . $settings['wantsmsfield'] . "' 45 | AND `c`.`value` = 'on' 46 | LIMIT 1"; 47 | 48 | $result = mysql_query($userSql); 49 | $num_rows = mysql_num_rows($result); 50 | if ($num_rows == 1) { 51 | $UserInformation = mysql_fetch_assoc($result); 52 | $template['variables'] = str_replace(" ", "", $template['variables']); 53 | $replacefrom = explode(",", $template['variables']); 54 | $replaceto = array($UserInformation['firstname'], $UserInformation['lastname'], $data['domain'], $data['expirydate'], $extra); 55 | $message = str_replace($replacefrom, $replaceto, $template['template']); 56 | 57 | $class->setGsmnumber($UserInformation['gsmnumber']); 58 | $class->setMessage($message); 59 | $class->setUserid($UserInformation['userid']); 60 | $class->send(); 61 | } 62 | } 63 | } 64 | } 65 | } 66 | return $hook; -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/hooks/invoicecreated.php: -------------------------------------------------------------------------------- 1 | 'InvoiceCreated', 4 | 'function' => 'InvoiceCreated', 5 | 'description' => array( 6 | 'turkish' => 'Yeni bir fatura oluşturulduğunda mesaj gönderir', 7 | 'english' => 'After invoice created' 8 | ), 9 | 'type' => 'client', 10 | 'extra' => '', 11 | 'defaultmessage' => 'Sayin {firstname} {lastname}, {duedate} son odeme tarihli {total} TL tutarinda bir fatura olusturulmustur. Fatura Numarasi: {invoiceid}. Detayli bilgi icin sitemizi ziyaret edin.', 12 | 'variables' => '{firstname}, {lastname}, {duedate}, {total}, {invoiceid}' 13 | ); 14 | if (!function_exists('InvoiceCreated')) { 15 | function InvoiceCreated($args) 16 | { 17 | 18 | $class = new AktuelSms(); 19 | $template = $class->getTemplateDetails(__FUNCTION__); 20 | if ($template['active'] == 0) { 21 | return null; 22 | } 23 | $settings = $class->getSettings(); 24 | if (!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']) { 25 | return null; 26 | } 27 | 28 | $userSql = " 29 | SELECT a.total,a.duedate,b.id as userid,b.firstname,b.lastname,`c`.`value` as `gsmnumber` FROM `tblinvoices` as `a` 30 | JOIN tblclients as b ON b.id = a.userid 31 | JOIN `tblcustomfieldsvalues` as `c` ON `c`.`relid` = `a`.`userid` 32 | JOIN `tblcustomfieldsvalues` as `d` ON `d`.`relid` = `a`.`userid` 33 | WHERE a.id = '" . $args['invoiceid'] . "' 34 | AND `c`.`fieldid` = '" . $settings['gsmnumberfield'] . "' 35 | AND `d`.`fieldid` = '" . $settings['wantsmsfield'] . "' 36 | AND `d`.`value` = 'on' 37 | LIMIT 1 38 | "; 39 | 40 | $result = mysql_query($userSql); 41 | $num_rows = mysql_num_rows($result); 42 | if ($num_rows == 1) { 43 | $UserInformation = mysql_fetch_assoc($result); 44 | $template['variables'] = str_replace(" ", "", $template['variables']); 45 | $replacefrom = explode(",", $template['variables']); 46 | $replaceto = array($UserInformation['firstname'], $UserInformation['lastname'], $class->changeDateFormat($UserInformation['duedate']), $UserInformation['total'], $args['invoiceid']); 47 | $message = str_replace($replacefrom, $replaceto, $template['template']); 48 | 49 | $class->setGsmnumber($UserInformation['gsmnumber']); 50 | $class->setMessage($message); 51 | $class->setUserid($UserInformation['userid']); 52 | $class->send(); 53 | } 54 | } 55 | } 56 | 57 | return $hook; 58 | -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/hooks/invoicepaid.php: -------------------------------------------------------------------------------- 1 | 'InvoicePaid', 4 | 'function' => 'InvoicePaid', 5 | 'description' => array( 6 | 'turkish' => 'Faturanız ödendiğinde mesaj gönderir', 7 | 'english' => 'Whenyou have paidthe billsends a message.' 8 | ), 9 | 'type' => 'client', 10 | 'extra' => '', 11 | 'defaultmessage' => 'Sayin {firstname} {lastname}, {duedate} son odeme tarihli faturaniz odenmistir. Odeme icin tesekkur ederiz.', 12 | 'variables' => '{firstname}, {lastname}, {duedate},{invoiceid}' 13 | ); 14 | if (!function_exists('InvoicePaid')) { 15 | function InvoicePaid($args) 16 | { 17 | 18 | $class = new AktuelSms(); 19 | $template = $class->getTemplateDetails(__FUNCTION__); 20 | if ($template['active'] == 0) { 21 | return null; 22 | } 23 | $settings = $class->getSettings(); 24 | if (!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']) { 25 | return null; 26 | } 27 | 28 | $userSql = " 29 | SELECT a.duedate,b.id as userid,b.firstname,b.lastname,`c`.`value` as `gsmnumber` FROM `tblinvoices` as `a` 30 | JOIN tblclients as b ON b.id = a.userid 31 | JOIN `tblcustomfieldsvalues` as `c` ON `c`.`relid` = `a`.`userid` 32 | JOIN `tblcustomfieldsvalues` as `d` ON `d`.`relid` = `a`.`userid` 33 | WHERE a.id = '" . $args['invoiceid'] . "' 34 | AND `c`.`fieldid` = '" . $settings['gsmnumberfield'] . "' 35 | AND `d`.`fieldid` = '" . $settings['wantsmsfield'] . "' 36 | AND `d`.`value` = 'on' 37 | LIMIT 1 38 | "; 39 | 40 | $result = mysql_query($userSql); 41 | $num_rows = mysql_num_rows($result); 42 | if ($num_rows == 1) { 43 | $UserInformation = mysql_fetch_assoc($result); 44 | 45 | $template['variables'] = str_replace(" ", "", $template['variables']); 46 | $replacefrom = explode(",", $template['variables']); 47 | $replaceto = array($UserInformation['firstname'], $UserInformation['lastname'], $class->changeDateFormat($UserInformation['duedate']), $args['invoiceid']); 48 | $message = str_replace($replacefrom, $replaceto, $template['template']); 49 | 50 | $class->setGsmnumber($UserInformation['gsmnumber']); 51 | $class->setMessage($message); 52 | $class->setUserid($UserInformation['userid']); 53 | $class->send(); 54 | } 55 | } 56 | } 57 | 58 | return $hook; 59 | -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/hooks/invoicepaymentreminder_first.php: -------------------------------------------------------------------------------- 1 | 'InvoicePaymentReminder', 4 | 'function' => 'InvoicePaymentReminder_Firstoverdue', 5 | 'description' => array( 6 | 'turkish' => 'Ödenmemiş faturanın ilk zaman aşımında mesaj gönderir', 7 | 'english' => 'Invoice payment reminder for first overdue' 8 | ), 9 | 'type' => 'client', 10 | 'extra' => '', 11 | 'defaultmessage' => 'Sayin {firstname} {lastname}, {duedate} son odeme tarihli bir faturaniz bulunmaktadir. Detayli bilgi icin sitemizi ziyaret edin. www.aktuelhost.com', 12 | 'variables' => '{firstname}, {lastname}, {duedate}' 13 | ); 14 | 15 | if (!function_exists('InvoicePaymentReminder_Firstoverdue')) { 16 | function InvoicePaymentReminder_Firstoverdue($args) 17 | { 18 | 19 | if ($args['type'] == "firstoverdue") { 20 | $class = new AktuelSms(); 21 | $template = $class->getTemplateDetails(__FUNCTION__); 22 | if ($template['active'] == 0) { 23 | return null; 24 | } 25 | $settings = $class->getSettings(); 26 | if (!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']) { 27 | return null; 28 | } 29 | } else { 30 | return false; 31 | } 32 | 33 | $userSql = " 34 | SELECT a.duedate,b.id as userid,b.firstname,b.lastname,`c`.`value` as `gsmnumber` FROM `tblinvoices` as `a` 35 | JOIN tblclients as b ON b.id = a.userid 36 | JOIN `tblcustomfieldsvalues` as `c` ON `c`.`relid` = `a`.`userid` 37 | JOIN `tblcustomfieldsvalues` as `d` ON `d`.`relid` = `a`.`userid` 38 | WHERE a.id = '" . $args['invoiceid'] . "' 39 | AND `c`.`fieldid` = '" . $settings['gsmnumberfield'] . "' 40 | AND `d`.`fieldid` = '" . $settings['wantsmsfield'] . "' 41 | AND `d`.`value` = 'on' 42 | LIMIT 1 43 | "; 44 | 45 | $result = mysql_query($userSql); 46 | $num_rows = mysql_num_rows($result); 47 | if ($num_rows == 1) { 48 | $UserInformation = mysql_fetch_assoc($result); 49 | $template['variables'] = str_replace(" ", "", $template['variables']); 50 | $replacefrom = explode(",", $template['variables']); 51 | $replaceto = array($UserInformation['firstname'], $UserInformation['lastname'], $class->changeDateFormat($UserInformation['duedate'])); 52 | 53 | $message = str_replace($replacefrom, $replaceto, $template['template']); 54 | 55 | $class->setGsmnumber($UserInformation['gsmnumber']); 56 | $class->setMessage($message); 57 | $class->setUserid($UserInformation['userid']); 58 | $class->send(); 59 | } 60 | } 61 | } 62 | 63 | return $hook; -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/hooks/invoicepaymentreminder_reminder.php: -------------------------------------------------------------------------------- 1 | 'InvoicePaymentReminder', 4 | 'function' => 'InvoicePaymentReminder_Reminder', 5 | 'description' => array( 6 | 'turkish' => 'Ödenmemiş fatura için bilgi mesajı gönderir', 7 | 'english' => 'Invoice payment reminder' 8 | ), 9 | 'type' => 'client', 10 | 'extra' => '', 11 | 'defaultmessage' => 'Sayin {firstname} {lastname}, {duedate} son odeme tarihli bir faturaniz bulunmaktadir. Detayli bilgi icin sitemizi ziyaret edin. www.aktuelhost.com', 12 | 'variables' => '{firstname}, {lastname}, {duedate}' 13 | ); 14 | 15 | if (!function_exists('InvoicePaymentReminder_Reminder')) { 16 | function InvoicePaymentReminder_Reminder($args) 17 | { 18 | 19 | if ($args['type'] == "reminder") { 20 | $class = new AktuelSms(); 21 | $template = $class->getTemplateDetails(__FUNCTION__); 22 | if ($template['active'] == 0) { 23 | return null; 24 | } 25 | $settings = $class->getSettings(); 26 | if (!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']) { 27 | return null; 28 | } 29 | } else { 30 | return false; 31 | } 32 | 33 | $userSql = " 34 | SELECT a.duedate,b.id as userid,b.firstname,b.lastname,`c`.`value` as `gsmnumber` FROM `tblinvoices` as `a` 35 | JOIN tblclients as b ON b.id = a.userid 36 | JOIN `tblcustomfieldsvalues` as `c` ON `c`.`relid` = `a`.`userid` 37 | JOIN `tblcustomfieldsvalues` as `d` ON `d`.`relid` = `a`.`userid` 38 | WHERE a.id = '" . $args['invoiceid'] . "' 39 | AND `c`.`fieldid` = '" . $settings['gsmnumberfield'] . "' 40 | AND `d`.`fieldid` = '" . $settings['wantsmsfield'] . "' 41 | AND `d`.`value` = 'on' 42 | LIMIT 1 43 | "; 44 | 45 | $result = mysql_query($userSql); 46 | $num_rows = mysql_num_rows($result); 47 | if ($num_rows == 1) { 48 | $UserInformation = mysql_fetch_assoc($result); 49 | $template['variables'] = str_replace(" ", "", $template['variables']); 50 | $replacefrom = explode(",", $template['variables']); 51 | $replaceto = array($UserInformation['firstname'], $UserInformation['lastname'], $class->changeDateFormat($UserInformation['duedate'])); 52 | $message = str_replace($replacefrom, $replaceto, $template['template']); 53 | 54 | $class->setGsmnumber($UserInformation['gsmnumber']); 55 | $class->setMessage($message); 56 | $class->setUserid($UserInformation['userid']); 57 | $class->send(); 58 | } 59 | } 60 | } 61 | 62 | return $hook; -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/hooks/invoicepaymentreminder_second.php: -------------------------------------------------------------------------------- 1 | 'InvoicePaymentReminder', 4 | 'function' => 'InvoicePaymentReminder_secondoverdue', 5 | 'description' => array( 6 | 'turkish' => 'Ödenmemiş faturanın ikinci zaman aşımında mesaj gönderir', 7 | 'english' => 'Invoice payment second for first overdue' 8 | ), 9 | 'type' => 'client', 10 | 'extra' => '', 11 | 'defaultmessage' => 'Sayin {firstname} {lastname}, {duedate} son odeme tarihli gecikmis bir faturaniz bulunmaktadir. Detayli bilgi icin sitemizi ziyaret edin.', 12 | 'variables' => '{firstname}, {lastname}, {duedate}' 13 | ); 14 | 15 | if (!function_exists('InvoicePaymentReminder_secondoverdue')) { 16 | function InvoicePaymentReminder_secondoverdue($args) 17 | { 18 | 19 | if ($args['type'] == "secondoverdue") { 20 | $class = new AktuelSms(); 21 | $template = $class->getTemplateDetails(__FUNCTION__); 22 | if ($template['active'] == 0) { 23 | return null; 24 | } 25 | $settings = $class->getSettings(); 26 | if (!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']) { 27 | return null; 28 | } 29 | } else { 30 | return false; 31 | } 32 | 33 | $userSql = " 34 | SELECT a.duedate,b.id as userid,b.firstname,b.lastname,`c`.`value` as `gsmnumber` FROM `tblinvoices` as `a` 35 | JOIN tblclients as b ON b.id = a.userid 36 | JOIN `tblcustomfieldsvalues` as `c` ON `c`.`relid` = `a`.`userid` 37 | JOIN `tblcustomfieldsvalues` as `d` ON `d`.`relid` = `a`.`userid` 38 | WHERE a.id = '" . $args['invoiceid'] . "' 39 | AND `c`.`fieldid` = '" . $settings['gsmnumberfield'] . "' 40 | AND `d`.`fieldid` = '" . $settings['wantsmsfield'] . "' 41 | AND `d`.`value` = 'on' 42 | LIMIT 1 43 | "; 44 | 45 | $result = mysql_query($userSql); 46 | $num_rows = mysql_num_rows($result); 47 | if ($num_rows == 1) { 48 | $UserInformation = mysql_fetch_assoc($result); 49 | 50 | $template['variables'] = str_replace(" ", "", $template['variables']); 51 | $replacefrom = explode(",", $template['variables']); 52 | $replaceto = array($UserInformation['firstname'], $UserInformation['lastname'], $class->changeDateFormat($UserInformation['duedate'])); 53 | $message = str_replace($replacefrom, $replaceto, $template['template']); 54 | 55 | $class->setGsmnumber($UserInformation['gsmnumber']); 56 | $class->setMessage($message); 57 | $class->setUserid($UserInformation['userid']); 58 | $class->send(); 59 | } 60 | } 61 | } 62 | 63 | return $hook; 64 | -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/hooks/invoicepaymentreminder_third.php: -------------------------------------------------------------------------------- 1 | 'InvoicePaymentReminder', 4 | 'function' => 'InvoicePaymentReminder_thirdoverdue', 5 | 'description' => array( 6 | 'turkish' => 'Ödenmemiş faturanın üçüncü zaman aşımında mesaj gönderir', 7 | 'english' => 'Invoice payment third for first overdue' 8 | ), 9 | 'type' => 'client', 10 | 'extra' => '', 11 | 'defaultmessage' => 'Sayin {firstname} {lastname}, {duedate} son odeme tarihli gecikmis bir faturaniz bulunmaktadir. Detayli bilgi icin sitemizi ziyaret edin.', 12 | 'variables' => '{firstname}, {lastname}, {duedate}' 13 | ); 14 | 15 | if (!function_exists('InvoicePaymentReminder_thirdoverdue')) { 16 | function InvoicePaymentReminder_thirdoverdue($args) 17 | { 18 | 19 | if ($args['type'] == "thirdoverdue") { 20 | $class = new AktuelSms(); 21 | $template = $class->getTemplateDetails(__FUNCTION__); 22 | if ($template['active'] == 0) { 23 | return null; 24 | } 25 | $settings = $class->getSettings(); 26 | if (!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']) { 27 | return null; 28 | } 29 | } else { 30 | return false; 31 | } 32 | 33 | $userSql = " 34 | SELECT a.duedate,b.id as userid,b.firstname,b.lastname,`c`.`value` as `gsmnumber` FROM `tblinvoices` as `a` 35 | JOIN tblclients as b ON b.id = a.userid 36 | JOIN `tblcustomfieldsvalues` as `c` ON `c`.`relid` = `a`.`userid` 37 | JOIN `tblcustomfieldsvalues` as `d` ON `d`.`relid` = `a`.`userid` 38 | WHERE a.id = '" . $args['invoiceid'] . "' 39 | AND `c`.`fieldid` = '" . $settings['gsmnumberfield'] . "' 40 | AND `d`.`fieldid` = '" . $settings['wantsmsfield'] . "' 41 | AND `d`.`value` = 'on' 42 | LIMIT 1 43 | "; 44 | 45 | $result = mysql_query($userSql); 46 | $num_rows = mysql_num_rows($result); 47 | if ($num_rows == 1) { 48 | $UserInformation = mysql_fetch_assoc($result); 49 | 50 | $template['variables'] = str_replace(" ", "", $template['variables']); 51 | $replacefrom = explode(",", $template['variables']); 52 | $replaceto = array($UserInformation['firstname'], $UserInformation['lastname'], $class->changeDateFormat($UserInformation['duedate'])); 53 | $message = str_replace($replacefrom, $replaceto, $template['template']); 54 | 55 | $class->setGsmnumber($UserInformation['gsmnumber']); 56 | $class->setMessage($message); 57 | $class->setUserid($UserInformation['userid']); 58 | $class->send(); 59 | } 60 | } 61 | } 62 | 63 | return $hook; 64 | -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/hooks/ticketadminreply.php: -------------------------------------------------------------------------------- 1 | 'TicketAdminReply', 4 | 'function' => 'TicketAdminReply', 5 | 'description' => array( 6 | 'turkish' => 'Bir ticket güncellendiğinde mesaj gönderir', 7 | 'english' => 'After ticket replied by admin' 8 | ), 9 | 'type' => 'client', 10 | 'extra' => '', 11 | 'variables' => '{firstname},{lastname},{ticketsubject}', 12 | 'defaultmessage' => 'Sayin {firstname} {lastname}, ({ticketsubject}) konu baslikli destek talebiniz yanitlandi.', 13 | ); 14 | 15 | if (!function_exists('TicketAdminReply')) { 16 | function TicketAdminReply($args) 17 | { 18 | $class = new AktuelSms(); 19 | $template = $class->getTemplateDetails(__FUNCTION__); 20 | 21 | if ($template['active'] == 0) { 22 | return null; 23 | } 24 | $settings = $class->getSettings(); 25 | if (!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']) { 26 | return null; 27 | } 28 | 29 | $userSql = "SELECT `a`.`id`,`a`.`firstname`, `a`.`lastname`, `b`.`value` as `gsmnumber` 30 | FROM `tblclients` as `a` 31 | JOIN `tblcustomfieldsvalues` as `b` ON `b`.`relid` = `a`.`id` 32 | JOIN `tblcustomfieldsvalues` as `c` ON `c`.`relid` = `a`.`id` 33 | WHERE `a`.`id` IN (SELECT userid FROM tbltickets WHERE id = '" . $args['ticketid'] . "') 34 | AND `b`.`fieldid` = '" . $settings['gsmnumberfield'] . "' 35 | AND `c`.`fieldid` = '" . $settings['wantsmsfield'] . "' 36 | AND `c`.`value` = 'on' 37 | LIMIT 1"; 38 | $result = mysql_query($userSql); 39 | $num_rows = mysql_num_rows($result); 40 | if ($num_rows == 1) { 41 | $UserInformation = mysql_fetch_assoc($result); 42 | $template['variables'] = str_replace(" ", "", $template['variables']); 43 | $replacefrom = explode(",", $template['variables']); 44 | $replaceto = array($UserInformation['firstname'], $UserInformation['lastname'], $args['subject']); 45 | $message = str_replace($replacefrom, $replaceto, $template['template']); 46 | $class->setGsmnumber($UserInformation['gsmnumber']); 47 | $class->setMessage($message); 48 | $class->setUserid($UserInformation['id']); 49 | $class->send(); 50 | } 51 | } 52 | } 53 | 54 | return $hook; 55 | -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/hooks/ticketclose.php: -------------------------------------------------------------------------------- 1 | 'TicketClose', 4 | 'function' => 'TicketClose', 5 | 'description' => array( 6 | 'turkish' => 'Ticket kapatıldığında mesaj gönderir.', 7 | 'english' => 'When the ticket is closed it sends a message.' 8 | ), 9 | 'type' => 'client', 10 | 'extra' => '', 11 | 'defaultmessage' => 'Sayin {firstname} {lastname}, ({ticketno}) numarali ticket kapatilmistir.', 12 | 'variables' => '{firstname}, {lastname}, {ticketno}', 13 | ); 14 | 15 | if (!function_exists('TicketClose')) { 16 | function TicketClose($args) 17 | { 18 | $class = new AktuelSms(); 19 | $template = $class->getTemplateDetails(__FUNCTION__); 20 | 21 | if ($template['active'] == 0) { 22 | return null; 23 | } 24 | $settings = $class->getSettings(); 25 | if (!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']) { 26 | return null; 27 | } 28 | 29 | $userSql = " 30 | SELECT a.tid,b.id as userid,b.firstname,b.lastname,`c`.`value` as `gsmnumber` FROM `tbltickets` as `a` 31 | JOIN tblclients as b ON b.id = a.userid 32 | JOIN `tblcustomfieldsvalues` as `c` ON `c`.`relid` = `a`.`userid` 33 | JOIN `tblcustomfieldsvalues` as `d` ON `d`.`relid` = `a`.`userid` 34 | WHERE a.id = '" . $args['ticketid'] . "' 35 | AND `c`.`fieldid` = '" . $settings['gsmnumberfield'] . "' 36 | AND `d`.`fieldid` = '" . $settings['wantsmsfield'] . "' 37 | AND `d`.`value` = 'on' 38 | LIMIT 1 39 | "; 40 | 41 | $result = mysql_query($userSql); 42 | $num_rows = mysql_num_rows($result); 43 | if ($num_rows == 1) { 44 | $UserInformation = mysql_fetch_assoc($result); 45 | $template['variables'] = str_replace(" ", "", $template['variables']); 46 | $replacefrom = explode(",", $template['variables']); 47 | $replaceto = array($UserInformation['firstname'], $UserInformation['lastname'], $UserInformation['tid']); 48 | $message = str_replace($replacefrom, $replaceto, $template['template']); 49 | $class->setGsmnumber($UserInformation['gsmnumber']); 50 | $class->setMessage($message); 51 | $class->setUserid($UserInformation['userid']); 52 | $class->send(); 53 | } 54 | } 55 | } 56 | 57 | return $hook; 58 | -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/hooks/ticketopen_admin.php: -------------------------------------------------------------------------------- 1 | 'TicketOpen', 4 | 'function' => 'TicketOpen_admin', 5 | 'type' => 'admin', 6 | 'extra' => '', 7 | 'defaultmessage' => 'Yeni bir ticket acildi. ({subject})', 8 | 'variables' => '{subject}' 9 | ); 10 | 11 | if (!function_exists('TicketOpen_admin')) { 12 | function TicketOpen_admin($args) 13 | { 14 | $class = new AktuelSms(); 15 | $template = $class->getTemplateDetails(__FUNCTION__); 16 | if ($template['active'] == 0) { 17 | return null; 18 | } 19 | $settings = $class->getSettings(); 20 | if (!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']) { 21 | return null; 22 | } 23 | $admingsm = explode(",", $template['admingsm']); 24 | 25 | $template['variables'] = str_replace(" ", "", $template['variables']); 26 | $replacefrom = explode(",", $template['variables']); 27 | $replaceto = array($args['subject']); 28 | $message = str_replace($replacefrom, $replaceto, $template['template']); 29 | 30 | foreach ($admingsm as $gsm) { 31 | if (!empty($gsm)) { 32 | $class->setGsmnumber(trim($gsm)); 33 | $class->setUserid(0); 34 | $class->setMessage($message); 35 | $class->send(); 36 | } 37 | } 38 | } 39 | } 40 | 41 | return $hook; 42 | -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/hooks/ticketuserreply_admin.php: -------------------------------------------------------------------------------- 1 | 'TicketUserReply', 4 | 'function' => 'TicketUserReply_admin', 5 | 'type' => 'admin', 6 | 'extra' => '', 7 | 'defaultmessage' => 'Bir ticket musteri tarafindan guncellendi. ({subject})', 8 | 'variables' => '{subject}' 9 | ); 10 | 11 | if (!function_exists('TicketUserReply_admin')) { 12 | function TicketUserReply_admin($args) 13 | { 14 | $class = new AktuelSms(); 15 | $template = $class->getTemplateDetails(__FUNCTION__); 16 | if ($template['active'] == 0) { 17 | return null; 18 | } 19 | $settings = $class->getSettings(); 20 | if (!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']) { 21 | return null; 22 | } 23 | $admingsm = explode(",", $template['admingsm']); 24 | 25 | $template['variables'] = str_replace(" ", "", $template['variables']); 26 | $replacefrom = explode(",", $template['variables']); 27 | $replaceto = array($args['subject']); 28 | $message = str_replace($replacefrom, $replaceto, $template['template']); 29 | 30 | foreach ($admingsm as $gsm) { 31 | if (!empty($gsm)) { 32 | $class->setGsmnumber(trim($gsm)); 33 | $class->setUserid(0); 34 | $class->setMessage($message); 35 | $class->send(); 36 | } 37 | } 38 | } 39 | } 40 | 41 | return $hook; 42 | -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/lang/english.php: -------------------------------------------------------------------------------- 1 | Github page for download new version.

Please visit this page after file transfer finished.

"; 5 | $_ADDONLANG['uptodate'] = "Your addon is up to date."; 6 | $_ADDONLANG['save'] = "Save"; 7 | $_ADDONLANG['gsmnumberfield'] = "GSM/Mobile Number Field (Custom client field)"; 8 | $_ADDONLANG['wantsmsfield'] = "Subscribe SMS Field (Custom client field)"; 9 | $_ADDONLANG['user'] = "Username"; 10 | $_ADDONLANG['pass'] = "Password"; 11 | $_ADDONLANG['apiid'] = "API ID"; 12 | $_ADDONLANG['email'] = "Email"; 13 | $_ADDONLANG['countrycode'] = "Country Code Prefix"; 14 | $_ADDONLANG['senderid'] = "SenderID(Title)"; 15 | $_ADDONLANG['dateformat'] = "Date Format"; 16 | $_ADDONLANG['sender'] = "Sender"; 17 | $_ADDONLANG['settings'] = "Settings"; 18 | $_ADDONLANG['signature'] = "Signature"; 19 | $_ADDONLANG['clientsmstemplates'] = "Client Templates"; 20 | $_ADDONLANG['adminsmstemplates'] = "Admin Templates"; 21 | $_ADDONLANG['sendsms'] = "Send SMS"; 22 | $_ADDONLANG['messages'] = "Sent Messages"; 23 | $_ADDONLANG['update'] = "Update"; 24 | $_ADDONLANG['smssent'] = "

SMS Sent"; 25 | $_ADDONLANG['client'] = "Client"; 26 | $_ADDONLANG['selectclient'] = "Select client"; 27 | $_ADDONLANG['message'] = "Message"; 28 | $_ADDONLANG['debug'] = "Print log"; 29 | $_ADDONLANG['send'] = "Send"; 30 | $_ADDONLANG['debugsonuc'] = "Result"; 31 | $_ADDONLANG['gsmnumber'] = "GSM Number"; 32 | $_ADDONLANG['datetime'] = "Date Time"; 33 | $_ADDONLANG['status'] = "Status"; 34 | $_ADDONLANG['delete'] = "Delete"; 35 | $_ADDONLANG['parameter'] = "Parameter:"; 36 | $_ADDONLANG['active'] = "Activate"; 37 | $_ADDONLANG['ekstra'] = "Extra {x}"; 38 | $_ADDONLANG['admingsm'] = "Admin GSM Numbers"; 39 | $_ADDONLANG['admingsmornek'] = "Seperate numbers with comma Etc. 5321232525,5331002020"; 40 | $_ADDONLANG['lisans'] = "Aktüel Sistem ve Bilgi Teknolojileri - Github Page"; 41 | $_ADDONLANG['credit'] = "Remaining Credit"; 42 | 43 | $_ADDONLANG['error'] = "Error"; 44 | $_ADDONLANG['pending'] = "Pending"; 45 | $_ADDONLANG['sent'] = "Sent"; 46 | $_ADDONLANG['success'] = "Success"; 47 | 48 | $_ADDONLANG['authkey'] = "Authentication Key"; 49 | $_ADDONLANG['route'] = "SMS Delivery Route (e.g: 4)"; 50 | $_ADDONLANG['flash'] = "Flash SMS (Yes=1/No=0)"; 51 | $_ADDONLANG['unicode'] = "Unicode SMS (Yes=1/No=0)"; 52 | $_ADDONLANG['ignoreNdnc'] = "Ignore NDNC Numbers? (Yes=1/No=0)"; -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/lang/russian.php: -------------------------------------------------------------------------------- 1 | страничку на Github для загрузки новой версии.

После обновления обязательно зайдите на эту вкладку еще раз.

"; 5 | $_ADDONLANG['uptodate'] = "Ваша версия актуальна."; 6 | $_ADDONLANG['save'] = "Сохранить"; 7 | $_ADDONLANG['gsmnumberfield'] = "GSM/Номер телефона (Доп. поле)"; 8 | $_ADDONLANG['wantsmsfield'] = "Чекбокс на подписку (Доп. поле)"; 9 | $_ADDONLANG['user'] = "Пользователь (ID)"; 10 | $_ADDONLANG['pass'] = "Пароль (ключ)"; 11 | $_ADDONLANG['apiid'] = "API ID (ID приложения)"; 12 | $_ADDONLANG['senderid'] = "Имя отправителя (Sender ID)"; 13 | $_ADDONLANG['dateformat'] = "Формат даты"; 14 | $_ADDONLANG['sender'] = "Сервис"; 15 | $_ADDONLANG['settings'] = "Настройки"; 16 | $_ADDONLANG['signature'] = "Подпись"; 17 | $_ADDONLANG['clientsmstemplates'] = "Шаблоны клиентов"; 18 | $_ADDONLANG['adminsmstemplates'] = "Шаблоны администраторов"; 19 | $_ADDONLANG['sendsms'] = "Отправить SMS"; 20 | $_ADDONLANG['messages'] = "Отправленные сообщения"; 21 | $_ADDONLANG['update'] = "Обновить"; 22 | $_ADDONLANG['smssent'] = "

SMS отправлено"; 23 | $_ADDONLANG['client'] = "Клиент"; 24 | $_ADDONLANG['selectclient'] = "Выбрать клиента"; 25 | $_ADDONLANG['message'] = "Сообщение"; 26 | $_ADDONLANG['debug'] = "Включить логгировние (Debug mode)"; 27 | $_ADDONLANG['send'] = "Отправить"; 28 | $_ADDONLANG['debugsonuc'] = "Результат"; 29 | $_ADDONLANG['gsmnumber'] = "GSM номер"; 30 | $_ADDONLANG['datetime'] = "Время"; 31 | $_ADDONLANG['status'] = "Статус"; 32 | $_ADDONLANG['delete'] = "Удалить"; 33 | $_ADDONLANG['parameter'] = "Параметры:"; 34 | $_ADDONLANG['active'] = "Включить"; 35 | $_ADDONLANG['ekstra'] = "Экстра {x}"; 36 | $_ADDONLANG['admingsm'] = "Номера телефонов администраторов"; 37 | $_ADDONLANG['admingsmornek'] = "Указывать, разделяя запятой. Пример: 5321232525,5331002020"; 38 | $_ADDONLANG['lisans'] = "Разработка инициирована Aktüel Sistem ve Bilgi Teknolojileri - Страничка на Github"; 39 | $_ADDONLANG['credit'] = "Оставшиеся средства"; 40 | 41 | $_ADDONLANG['error'] = "Ошибка"; 42 | $_ADDONLANG['success'] = "Успешно"; 43 | 44 | $_ADDONLANG['authkey'] = "Ключ авторизации"; 45 | $_ADDONLANG['route'] = "Маршрут SMS (напр.: 4)"; 46 | $_ADDONLANG['flash'] = "Flash SMS (Yes=1/No=0)"; 47 | $_ADDONLANG['unicode'] = "Unicode SMS (Yes=1/No=0)"; 48 | $_ADDONLANG['ignoreNdnc'] = "Игнорировать NDNC номера? (Yes=1/No=0)"; -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/lang/turkish.php: -------------------------------------------------------------------------------- 1 | Github sayfamızdan indirebilirsiniz.

Lütfen dosyaları güncelledikten sonra bu sayfaya tekrar bakın.

"; 5 | $_ADDONLANG['uptodate'] = "Kullandığınız eklenti günceldir."; 6 | $_ADDONLANG['apiid'] = "API ID"; 7 | $_ADDONLANG['save'] = "Kaydet"; 8 | $_ADDONLANG['gsmnumberfield'] = "GSM Numara Alanı"; 9 | $_ADDONLANG['wantsmsfield'] = "SMS İsteği"; 10 | $_ADDONLANG['pass'] = "Şifre"; 11 | $_ADDONLANG['user'] = "Kullanıcı Adı"; 12 | $_ADDONLANG['senderid'] = "Başlık"; 13 | $_ADDONLANG['dateformat'] = "Tarih Formatı"; 14 | $_ADDONLANG['sender'] = "Gönderici"; 15 | $_ADDONLANG['settings'] = "Ayarlar"; 16 | $_ADDONLANG['signature'] = "Mesaj imzası"; 17 | $_ADDONLANG['clientsmstemplates'] = "Müşteri Hazır SMS leri"; 18 | $_ADDONLANG['adminsmstemplates'] = "Admin Hazır SMS leri"; 19 | $_ADDONLANG['sendsms'] = "Tek SMS Gönder"; 20 | $_ADDONLANG['messages'] = "Gönderilmiş SMS ler"; 21 | $_ADDONLANG['update'] = "Güncelle"; 22 | $_ADDONLANG['smssent'] = "

SMS Gönderildi"; 23 | $_ADDONLANG['client'] = "Müşteri"; 24 | $_ADDONLANG['selectclient'] = "Müşteri Seç"; 25 | $_ADDONLANG['message'] = "Mesaj"; 26 | $_ADDONLANG['debug'] = "Log Bilgilerini Yazdır"; 27 | $_ADDONLANG['send'] = "Gönder"; 28 | $_ADDONLANG['debugsonuc'] = "Sonuç"; 29 | $_ADDONLANG['gsmnumber'] = "GSM No"; 30 | $_ADDONLANG['datetime'] = "Tarih Saat"; 31 | $_ADDONLANG['status'] = "Durum"; 32 | $_ADDONLANG['delete'] = "Mesajı Sil"; 33 | $_ADDONLANG['parameter'] = "Parametre:"; 34 | $_ADDONLANG['active'] = "Aktifleştir"; 35 | $_ADDONLANG['ekstra'] = "Ekstra {x}"; 36 | $_ADDONLANG['admingsm'] = "Admin GSM Numaraları"; 37 | $_ADDONLANG['admingsmornek'] = "Telefon numaralarının arasına virgül koyun Örn. 5321232525,5331002020"; 38 | $_ADDONLANG['lisans'] = "Plugin by Aktüel Sistem ve Bilgi Teknolojileri"; 39 | $_ADDONLANG['credit'] = "Kalan bakiyeniz"; 40 | 41 | $_ADDONLANG['error'] = "Hata"; 42 | $_ADDONLANG['success'] = "Başarılı"; 43 | 44 | $_ADDONLANG['authkey'] = "Doğrulama Anahtarı"; 45 | $_ADDONLANG['route'] = "SMS Teslimat Güzergahı (e.g: 4)"; 46 | $_ADDONLANG['flash'] = "Flash SMS (Yes=1/No=0)"; 47 | $_ADDONLANG['unicode'] = "Unicode SMS (Yes=1/No=0)"; 48 | $_ADDONLANG['ignoreNdnc'] = "NDNC Numaraları görmezden? (Yes=1/No=0)"; -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/senders/SmsSenderInterface.php: -------------------------------------------------------------------------------- 1 | 5 | */ 6 | interface SmsSenderInterface 7 | { 8 | /** 9 | * SmsSenderInterface constructor. 10 | * @param string $message 11 | * @param string $gsmnumber 12 | */ 13 | public function __construct($message, $gsmnumber); 14 | 15 | /** 16 | * @return mixed 17 | */ 18 | public function send(); 19 | 20 | /** 21 | * @return mixed 22 | */ 23 | public function balance(); 24 | 25 | /** 26 | * @param $msgId 27 | * @return mixed 28 | */ 29 | public function report($msgId); 30 | 31 | /** 32 | * @param $number 33 | * @return mixed 34 | */ 35 | public function utilgsmnumber($number); 36 | 37 | /** 38 | * @param $message 39 | * @return mixed 40 | */ 41 | public function utilmessage($message); 42 | } -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/senders/birsms.php: -------------------------------------------------------------------------------- 1 | message = $this->utilmessage($message); 9 | $this->gsmnumber = $this->utilgsmnumber($gsmnumber); 10 | } 11 | 12 | public function send() 13 | { 14 | if ($this->gsmnumber == "numbererror") { 15 | $log[] = ("Number format error." . $this->gsmnumber); 16 | $error[] = ("Number format error." . $this->gsmnumber); 17 | return null; 18 | } 19 | $params = $this->getParams(); 20 | 21 | $xml_data = '' . 22 | '' . 23 | '' . 24 | '' . $params->pass . '' . 25 | '' . $params->user . '' . 26 | '' . 27 | 'Default' . 28 | '
' . 29 | '' . $params->senderid . '' . 30 | '
' . 31 | '' . $this->message . '' . 32 | '' . 33 | '' . $this->gsmnumber . '' . 34 | '' . 35 | '
'; 36 | 37 | $URL = "http://api.1sms.com.tr/v1/xml/syncreply/Submit"; 38 | $ch = curl_init($URL); 39 | curl_setopt($ch, CURLOPT_MUTE, 1); 40 | curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); 41 | curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); 42 | curl_setopt($ch, CURLOPT_POST, 1); 43 | curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml')); 44 | curl_setopt($ch, CURLOPT_POSTFIELDS, "$xml_data"); 45 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 46 | $result = curl_exec($ch); 47 | curl_close($ch); 48 | 49 | $simple = XMLToArray($result); 50 | $cvp = $simple["SUBMITRESPONSE"]["RESPONSE"]["STATUS"]["CODE"]; 51 | $msgID = $simple["SUBMITRESPONSE"]["RESPONSE"]["MESSAGEID"]; 52 | 53 | $log[] = ("Geri Dönüş Kodu: " . $cvp); 54 | 55 | if ($cvp != 200) { 56 | $log[] = ("Hata..Mesaj Gönderilemedi."); 57 | $error[] = ("Hata..Mesaj Gönderilemedi."); 58 | } else { 59 | $log[] = ("Mesaj Başarıyla Gönderildi."); 60 | } 61 | 62 | return array( 63 | 'log' => $log, 64 | 'error' => $error, 65 | 'msgid' => $msgID, 66 | ); 67 | } 68 | 69 | public function balance() 70 | { 71 | $params = $this->getParams(); 72 | if ($params->user && $params->pass) { 73 | $xml_data = 74 | '' . 75 | '' . 76 | '' . $params->pass . '' . 77 | '' . $params->user . '' . 78 | '' . 79 | ''; 80 | 81 | $URL = "http://api.1sms.com.tr/v1/xml/syncreply/GetBalance"; 82 | 83 | $ch = curl_init($URL); 84 | curl_setopt($ch, CURLOPT_MUTE, 1); 85 | curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); 86 | curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); 87 | curl_setopt($ch, CURLOPT_POST, 1); 88 | curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml')); 89 | curl_setopt($ch, CURLOPT_POSTFIELDS, "$xml_data"); 90 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 91 | $output = curl_exec($ch); 92 | curl_close($ch); 93 | 94 | $simple = XMLToArray($output); 95 | return substr($simple["GETBALANCERESPONSE"]["RESPONSE"]["BALANCE"]["MAIN"], 0, -5); 96 | } else { 97 | return null; 98 | } 99 | } 100 | 101 | public function report($msgid) 102 | { 103 | $params = $this->getParams(); 104 | if ($params->user && $params->pass && $msgid) { 105 | $xml_data = 106 | '' . 107 | '' . 108 | '' . $params->pass . '' . 109 | '' . $params->user . '' . 110 | '' . 111 | '' . $msgid . '' . 112 | ''; 113 | 114 | $URL = "http://api.1sms.com.tr/v1/xml/syncreply/Query"; 115 | 116 | $ch = curl_init($URL); 117 | curl_setopt($ch, CURLOPT_MUTE, 1); 118 | curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); 119 | curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); 120 | curl_setopt($ch, CURLOPT_POST, 1); 121 | curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml')); 122 | curl_setopt($ch, CURLOPT_POSTFIELDS, "$xml_data"); 123 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 124 | $output = curl_exec($ch); 125 | curl_close($ch); 126 | $simple = XMLToArray($output); 127 | $cvp = $simple["QUERYRESPONSE"]["RESPONSE"]["STATUS"]["CODE"]; 128 | if ($cvp == 200) { 129 | return "success"; 130 | } else { 131 | return "error"; 132 | } 133 | } else { 134 | return null; 135 | } 136 | } 137 | 138 | //You can spesifically convert your gsm number. See netgsm for example 139 | public function utilgsmnumber($number) 140 | { 141 | if (strlen($number) == 10) { 142 | $number = '90' . $number; 143 | } elseif (strlen($number) == 11) { 144 | $number = '9' . $number; 145 | } 146 | if (substr($number, 0, 3) != "905") { 147 | return "error"; 148 | } 149 | return $number; 150 | } 151 | 152 | //You can spesifically convert your message 153 | public function utilmessage($message) 154 | { 155 | return $message; 156 | } 157 | } 158 | 159 | return array( 160 | 'value' => 'birsms', 161 | 'label' => 'BirSMS', 162 | 'fields' => array( 163 | 'user', 'pass' 164 | ) 165 | ); 166 | 167 | -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/senders/bytehand.php: -------------------------------------------------------------------------------- 1 | message = $this->utilmessage($message); 9 | $this->gsmnumber = $this->utilgsmnumber($gsmnumber); 10 | } 11 | 12 | public function send() 13 | { 14 | if ($this->gsmnumber == "numbererror") { 15 | $log[] = ("Number format error." . $this->gsmnumber); 16 | $error[] = ("Number format error." . $this->gsmnumber); 17 | return null; 18 | } 19 | 20 | $params = $this->getParams(); 21 | 22 | 23 | $result = @file_get_contents('http://bytehand.com:3800/send?id=' . $params->user . '&key=' . $params->pass . '&to=' . urlencode($this->gsmnumber) . '&from=' . urlencode($params->senderid) . '&text=' . urlencode($this->message)); 24 | $result = json_decode($result); 25 | 26 | if ($result->status == 0) { 27 | $log[] = ("Message sent."); 28 | } else { 29 | $log[] = ("Error."); 30 | $error[] = ("Check status, looks like problem with a connection or credentials."); 31 | } 32 | 33 | return array( 34 | 'log' => $log, 35 | 'error' => $error, 36 | 'msgid' => $result->description, 37 | ); 38 | } 39 | 40 | public function balance() 41 | { 42 | $params = $this->getParams(); 43 | if ($params->user && $params->pass) { 44 | $result = @file_get_contents('http://bytehand.com:3800/balance?id=' . $params->user . '&key=' . $params->pass); 45 | $result = json_decode($result); 46 | 47 | if ($result->status == 0) { 48 | return $result->description; 49 | } else { 50 | return null; 51 | } 52 | } else { 53 | return null; 54 | } 55 | } 56 | 57 | public function report($msgid) 58 | { 59 | $params = $this->getParams(); 60 | if ($params->user && $params->pass && $msgid) { 61 | $result = @file_get_contents('http://bytehand.com:3800/status?id=' . $params->user . '&key=' . $params->pass . '&message=' . $msgid); 62 | $result = json_decode($result); 63 | if ($result->status == 0) { 64 | if ($result->description == 'DELIVERED' || $result->description == 'ACCEPTED') { 65 | return "success"; 66 | } else { 67 | return "error"; 68 | } 69 | } else { 70 | null; // Problem with a connection, not with SMS. 71 | } 72 | } else { 73 | return null; 74 | } 75 | 76 | } 77 | 78 | //You can spesifically convert your gsm number. See netgsm for example 79 | public function utilgsmnumber($number) 80 | { 81 | return $number; 82 | } 83 | 84 | //You can spesifically convert your message 85 | public function utilmessage($message) 86 | { 87 | return $message; 88 | } 89 | } 90 | 91 | return array( 92 | 'value' => 'bytehand', 93 | 'label' => 'ByteHand', 94 | 'fields' => array( 95 | 'user', 'pass' 96 | ) 97 | ); 98 | -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/senders/clickatell.php: -------------------------------------------------------------------------------- 1 | message = $this->utilmessage($message); 9 | $this->gsmnumber = $this->utilgsmnumber($gsmnumber); 10 | } 11 | 12 | public function send() 13 | { 14 | if ($this->gsmnumber == "numbererror") { 15 | $log[] = ("Number format error." . $this->gsmnumber); 16 | $error[] = ("Number format error." . $this->gsmnumber); 17 | return null; 18 | } 19 | 20 | $params = $this->getParams(); 21 | 22 | $baseurl = "http://api.clickatell.com"; 23 | 24 | $text = urlencode($this->message); 25 | $to = $this->gsmnumber; 26 | 27 | $url = "$baseurl/http/auth?user=$params->user&password=$params->pass&api_id=$params->apiid&from=$params->senderid"; 28 | $ret = file($url); 29 | $answer = is_array($ret) ? json_encode($ret) : $ret; 30 | $log[] = ("Answer from Clickatell: " . $answer); 31 | 32 | $sess = explode(":", $ret[0]); 33 | if ($sess[0] == "OK") { 34 | 35 | $sess_id = trim($sess[1]); // remove any whitespace 36 | $url = "$baseurl/http/sendmsg?session_id=$sess_id&to=$to&text=$text&from=$params->senderid"; 37 | 38 | $ret = file($url); 39 | $send = explode(":", $ret[0]); 40 | 41 | if ($send[0] == "ID") { 42 | $log[] = ("Message Sent."); 43 | } else { 44 | $answer = is_array($ret) ? json_encode($ret) : $ret; 45 | $log[] = ("Message could not sent. Error: $answer"); 46 | $error[] = ("Message could not sent. Error: $answer"); 47 | } 48 | } else { 49 | $answer = is_array($ret) ? json_encode($ret) : $ret; 50 | $log[] = ("Message could not sent. Error: $answer"); 51 | $error[] = ("Message could not sent. Error: $answer"); 52 | } 53 | 54 | return array( 55 | 'log' => $log, 56 | 'error' => $error, 57 | 'msgid' => $send[1], 58 | ); 59 | } 60 | 61 | public function balance() 62 | { 63 | $params = $this->getParams(); 64 | if ($params->user && $params->pass && $params->apiid) { 65 | $url = "http://api.clickatell.com/http/getbalance?api_id=$params->apiid&user=$params->user&password=$params->pass"; 66 | $result = file_get_contents($url); 67 | $result = explode(" ", $result); 68 | $cvp = $result[1]; 69 | if ($cvp == 001) { 70 | return null; 71 | } else { 72 | return $result[1]; 73 | } 74 | } else { 75 | return null; 76 | } 77 | } 78 | 79 | public function report($msgid) 80 | { 81 | $params = $this->getParams(); 82 | if ($params->user && $params->pass && $params->apiid && $msgid) { 83 | $url = "http://api.clickatell.com/http/querymsg?user=$params->user&password=$params->pass&api_id=$params->apiid&apimsgid=$msgid"; 84 | $result = file_get_contents($url); 85 | $result = explode(" ", $result); 86 | $cvp = $result[1]; 87 | if ($cvp == 001) { 88 | return "error"; 89 | } else { 90 | return "success"; 91 | } 92 | } else { 93 | return null; 94 | } 95 | } 96 | 97 | //You can spesifically convert your gsm number. See netgsm for example 98 | public function utilgsmnumber($number) 99 | { 100 | return $number; 101 | } 102 | 103 | //You can spesifically convert your message 104 | public function utilmessage($message) 105 | { 106 | return $message; 107 | } 108 | } 109 | 110 | return array( 111 | 'value' => 'clickatell', 112 | 'label' => 'ClickAtell', 113 | 'fields' => array( 114 | 'user', 'pass', 'apiid' 115 | ) 116 | ); 117 | -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/senders/dakiksms.php: -------------------------------------------------------------------------------- 1 | message = $this->utilmessage($message); 9 | $this->gsmnumber = $this->utilgsmnumber($gsmnumber); 10 | } 11 | 12 | public function send() 13 | { 14 | if ($this->gsmnumber == "numbererror") { 15 | $log[] = ("Number format error." . $this->gsmnumber); 16 | $error[] = ("Number format error." . $this->gsmnumber); 17 | return null; 18 | } 19 | 20 | $params = $this->getParams(); 21 | $xml_data = '' . 22 | '' . 23 | '' . 24 | '' . $params->user . '' . 25 | '' . $params->pass . '' . 26 | '' . 27 | '' . 28 | '' . $params->senderid . '' . 29 | '' . $this->message . '' . 30 | '' . $this->gsmnumber . '' . 31 | '' . 32 | ''; 33 | $URL = "http://www.dakiksms.com//api/xml_api.php"; 34 | $ch = curl_init($URL); 35 | curl_setopt($ch, CURLOPT_MUTE, 1); 36 | curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); 37 | curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); 38 | curl_setopt($ch, CURLOPT_POST, 1); 39 | curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml')); 40 | curl_setopt($ch, CURLOPT_POSTFIELDS, "$xml_data"); 41 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 42 | $result = curl_exec($ch); 43 | curl_close($ch); 44 | 45 | $return = $result; 46 | $log[] = ("Sunucudan dönen cevap: " . $result); 47 | 48 | $result = explode("|", $result); 49 | if ($result[0] == "OK") { 50 | $log[] = ("Mesaj Gönderildi."); 51 | } else { 52 | $log[] = ("Mesaj gönderilemedi. Hata: $return"); 53 | $error[] = ("Mesaj gönderilirken hata oluştu. Hata: $return"); 54 | } 55 | 56 | return array( 57 | 'log' => $log, 58 | 'error' => $error, 59 | 'msgid' => $result[1], 60 | ); 61 | } 62 | 63 | public function balance() 64 | { 65 | $params = $this->getParams(); 66 | if ($params->user && $params->pass) { 67 | $xml_data = '' . 68 | '' . 69 | '' . 70 | '' . $params->user . '' . 71 | '' . $params->pass . '' . 72 | '' . 73 | ''; 74 | 75 | $URL = "http://www.dakiksms.com/api/xml_bakiye.php"; 76 | $ch = curl_init($URL); 77 | curl_setopt($ch, CURLOPT_MUTE, 1); 78 | curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); 79 | curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); 80 | curl_setopt($ch, CURLOPT_POST, 1); 81 | curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml')); 82 | curl_setopt($ch, CURLOPT_POSTFIELDS, "$xml_data"); 83 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 84 | $output = curl_exec($ch); 85 | curl_close($ch); 86 | 87 | if (!$output) { 88 | return null; 89 | } else { 90 | return substr($output, 24, -1); 91 | } 92 | } else { 93 | return null; 94 | } 95 | } 96 | 97 | public function report($msgid) 98 | { 99 | $params = $this->getParams(); 100 | if ($params->user && $params->pass && $msgid) { 101 | $xml_data = '' . 102 | '' . 103 | '' . 104 | '' . $params->user . '' . 105 | '' . $params->pass . '' . 106 | '' . 107 | '' . 108 | '' . $msgid . '' . 109 | '' . 110 | ''; 111 | $URL = "http://www.dakiksms.com/api/xml_rapor.php"; 112 | $ch = curl_init($URL); 113 | curl_setopt($ch, CURLOPT_MUTE, 1); 114 | curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); 115 | curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); 116 | curl_setopt($ch, CURLOPT_POST, 1); 117 | curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml')); 118 | curl_setopt($ch, CURLOPT_POSTFIELDS, "$xml_data"); 119 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 120 | $output = curl_exec($ch); 121 | curl_close($ch); 122 | 123 | if ($output) { 124 | return "success"; 125 | } else { 126 | return "error"; 127 | } 128 | } else { 129 | return null; 130 | } 131 | } 132 | 133 | //You can spesifically convert your gsm number. See netgsm for example 134 | public function utilgsmnumber($number) 135 | { 136 | return $number; 137 | } 138 | 139 | //You can spesifically convert your message 140 | public function utilmessage($message) 141 | { 142 | return $message; 143 | } 144 | } 145 | 146 | return array( 147 | 'value' => 'dakiksms', 148 | 'label' => 'Dakik SMS', 149 | 'fields' => array( 150 | 'user', 'pass' 151 | ) 152 | ); 153 | -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/senders/hemenposta.php: -------------------------------------------------------------------------------- 1 | message = $this->utilmessage($message); 9 | $this->gsmnumber = $this->utilgsmnumber($gsmnumber); 10 | } 11 | 12 | public function send() 13 | { 14 | if ($this->gsmnumber == "numbererror") { 15 | $log[] = ("Number format error." . $this->gsmnumber); 16 | $error[] = ("Number format error." . $this->gsmnumber); 17 | return null; 18 | } 19 | 20 | $params = $this->getParams(); 21 | 22 | $postUrl = "http://sms.modexi.com/service/sendxml"; 23 | $xmlString = "$params->user$params->pass$params->senderid$this->message$this->gsmnumber"; 24 | 25 | $fields = $xmlString; 26 | $ch = curl_init(); 27 | curl_setopt($ch, CURLOPT_URL, $postUrl); 28 | curl_setopt($ch, CURLOPT_POST, 1); 29 | curl_setopt($ch, CURLOPT_POSTFIELDS, $fields); 30 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 31 | 32 | $result = curl_exec($ch); 33 | curl_close($ch); 34 | 35 | $return = $result; 36 | $log[] = ("Sunucudan dönen cevap: " . $result); 37 | 38 | if (preg_match('/(.*?)<\/status>(.*?)(.*?)<\/DESC>(.*?)(.*?)<\/package>/si', $result, $result_matches)) { 39 | $status_code = $result_matches[1]; 40 | $status_message = $result_matches[3]; 41 | $order_id = $result_matches[5]; 42 | 43 | if ($status_code > 0) { 44 | $log[] = ("Message sent."); 45 | } else { 46 | $log[] = ("Mesaj gönderilemedi. Hata: $status_message"); 47 | $error[] = ("Mesaj gönderilirken hata oluştu. Hata: $status_code"); 48 | } 49 | } else { 50 | $log[] = ("Mesaj gönderilemedi. Hata: $return"); 51 | $error[] = ("Mesaj gönderilirken hata oluştu. Hata: $return"); 52 | } 53 | 54 | return array( 55 | 'log' => $log, 56 | 'error' => $error, 57 | 'msgid' => $order_id, 58 | ); 59 | } 60 | 61 | public function balance() 62 | { 63 | return null; 64 | } 65 | 66 | public function report($msgid) 67 | { 68 | return null; 69 | } 70 | 71 | //You can spesifically convert your gsm number. See netgsm for example 72 | public function utilgsmnumber($number) 73 | { 74 | return $number; 75 | } 76 | 77 | //You can spesifically convert your message 78 | public function utilmessage($message) 79 | { 80 | return $message; 81 | } 82 | 83 | } 84 | 85 | return array( 86 | 'value' => 'hemenposta', 87 | 'label' => 'HemenPosta', 88 | 'fields' => array( 89 | 'user', 'pass' 90 | ) 91 | ); 92 | -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/senders/msg91.php: -------------------------------------------------------------------------------- 1 | message = $this->utilmessage($message); 9 | $this->gsmnumber = $this->utilgsmnumber($gsmnumber); 10 | } 11 | 12 | public function send() 13 | { 14 | if ($this->gsmnumber == "numbererror") { 15 | $log[] = ("Number format error." . $this->gsmnumber); 16 | $error[] = ("Number format error." . $this->gsmnumber); 17 | return null; 18 | } 19 | $params = $this->getParams(); 20 | 21 | //Your authentication key (Go to https://control.msg91.com/apidoc/) 22 | $authKey = $params->authkey; 23 | 24 | //Base URL 25 | //Composed of initial common portion of URL of SMS Gateway Provider 26 | $baseurl = "https://control.msg91.com"; 27 | 28 | //Sender ID, While using route 4 sender id should be 6 characters long. 29 | $senderId = trim($params->senderid); 30 | $senderId = substr($senderId, 0, 6); 31 | 32 | //Define route (SMS Delivery) 33 | //If route = 1 (Route 1 is Normal Route does not send sms to National Do Not Call registry(NDNC) Numbers and only before 9PM IST) 34 | //If route = 4 (Route 4 is Informative Route - 24 hours open) 35 | if (ctype_digit($params->route)) { 36 | $smsRoute = $params->route; 37 | } else { 38 | $smsRoute = 1; //Using Default route 1 if undefined in settings 39 | } 40 | 41 | //Define Message Type 42 | // Send Unicode Message 43 | // Yes = 1 / No = 0 (if No, Default is English) 44 | if (ctype_digit($params->unicode)) { 45 | $unicodeSupport = $params->unicode; 46 | } else { 47 | $unicodeSupport = 0; //Unicode support is disbaled if not defined in settings 48 | } 49 | 50 | // Send Flash Message (Dispay SMS directly on mobile screen) 51 | // Yes = 1 / No = 0 52 | if (ctype_digit($params->flash)) { 53 | $flashSupport = $params->flash; 54 | } else { 55 | $flashSupport = 0; //Flash SMS support is disabled by default if undefined in settings 56 | } 57 | 58 | // Ignore NDNC 59 | // Yes = 1 / No = 0 60 | // ignoreNdnc=1 (if you want system to ignore all NDNC Numbers, useful while using route 4) 61 | if (ctype_digit($params->ignoreNdnc)) { 62 | $ignoreNdnc = $params->ignoreNdnc; 63 | } else { 64 | $ignoreNdnc = 1; 65 | } 66 | 67 | $text = urlencode($this->message); 68 | $to = $this->gsmnumber; 69 | 70 | // Validation of connection to SMS Gateway Server 71 | $url = "$baseurl/api/validate.php?authkey=$authKey&type=$smsRoute"; //verify connetion to gateway server 72 | $ret = file($url); 73 | $log[] = ("Response returned from the server: " . $ret); 74 | 75 | $sess = explode(",", $ret[0]); 76 | if ($sess[0] == "Valid") { 77 | 78 | $url = "$baseurl/api/sendhttp.php?authkey=$authKey&mobiles=$to&message=$text&sender=$senderId&route=$smsRoute&unicode=$unicodeSupport&flash=$flashSupport"; 79 | echo $url; 80 | $ret = file($url); 81 | $send = array_map('trim', explode(":", $ret[0])); 82 | 83 | if ($send[0] != "CODE" && $send[0] != "Please") { 84 | $log[] = ("Message sent!"); 85 | } else { 86 | $log[] = ("Message could not be sent. Error: $ret"); 87 | $error[] = ("An error occurred while sending the message. Error: $ret"); 88 | } 89 | } else { 90 | $log[] = ("Message could not be sent. Authentication Error: $ret[0]"); 91 | $error[] = ("Authentication failed. $ret[0] "); 92 | } 93 | 94 | return array( 95 | 'log' => $log, 96 | 'error' => $error, 97 | 'msgid' => $send[0], 98 | ); 99 | } 100 | 101 | public function balance() 102 | { 103 | $params = $this->getParams(); 104 | if ($params->authkey && $params->route) { 105 | $baseurl = "https://control.msg91.com"; 106 | $url = "$baseurl/api/balance.php?authkey=$params->authkey&type=$params->route"; 107 | $result = file_get_contents($url); 108 | $result = array_map('trim', explode(":", $result)); 109 | $cvp = $result[1]; 110 | if ($cvp == 001 || $cvp == 002) { 111 | return null; 112 | } else { 113 | return $result[0]; 114 | } 115 | } else { 116 | return null; 117 | } 118 | } 119 | 120 | public function report($msgid) 121 | { 122 | $params = $this->getParams(); 123 | if ($params->authkey && $msgid) { 124 | $baseurl = "https://control.msg91.com"; 125 | $url = "$baseurl/api/check_delivery.php?authkey=$params->authkey&requestid=$msgid"; 126 | $result = file_get_contents($url); 127 | $result = array_map('trim', explode(":", $result)); 128 | $cvp = $result[1]; 129 | if ($cvp == 001 || $cvp == 002) { 130 | return "error"; 131 | } else { 132 | return "success"; 133 | } 134 | } else { 135 | return null; 136 | } 137 | } 138 | 139 | //You can spesifically convert your gsm number. See netgsm for example 140 | public function utilgsmnumber($number) 141 | { 142 | if (strlen($number) == 10) { 143 | $number = '91' . $number; 144 | } 145 | 146 | if (substr($number, 0, 2) != "91") { 147 | return "numbererror"; 148 | } 149 | 150 | return $number; 151 | } 152 | 153 | //You can spesifically convert your message 154 | public function utilmessage($message) 155 | { 156 | return $message; 157 | } 158 | } 159 | 160 | return array( 161 | 'value' => 'msg91', 162 | 'label' => 'msg91.com (India)', 163 | 'fields' => array( 164 | 'authkey', 'route', 'flash', 'unicode', 'ignoreNdnc' 165 | ) 166 | ); 167 | -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/senders/mutlucell.php: -------------------------------------------------------------------------------- 1 | message = $this->utilmessage($message); 9 | $this->gsmnumber = $this->utilgsmnumber($gsmnumber); 10 | } 11 | 12 | public function send() 13 | { 14 | if ($this->gsmnumber == "numbererror") { 15 | $log[] = ("Number format error." . $this->gsmnumber); 16 | $error[] = ("Number format error." . $this->gsmnumber); 17 | return null; 18 | } 19 | 20 | $params = $this->getParams(); 21 | 22 | $xml_data = '' . 23 | '' . 24 | '' . 25 | '' . $this->message . '' . 26 | '' . $this->gsmnumber . '' . 27 | '' . 28 | ''; 29 | $URL = "https://smsgw.mutlucell.com/smsgw-ws/sndblkex"; 30 | 31 | $ch = curl_init($URL); 32 | curl_setopt($ch, CURLOPT_MUTE, 1); 33 | curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); 34 | curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); 35 | curl_setopt($ch, CURLOPT_POST, 1); 36 | curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml')); 37 | curl_setopt($ch, CURLOPT_POSTFIELDS, "$xml_data"); 38 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 39 | $result = curl_exec($ch); 40 | curl_close($ch); 41 | $return = $result; 42 | $log[] = ("Geri Dönüş Kodu: " . $result); 43 | 44 | $result = explode(" ", $result); 45 | if ($result[0] == 20) { 46 | $log[] = ("Post edilen xml eksik veya hatalı."); 47 | $error[] = ("Post edilen xml eksik veya hatalı."); 48 | } elseif ($result[0] == 21) { 49 | $log[] = ("Kullanılan originatöre sahip değilsiniz."); 50 | $error[] = ("Kullanılan originatöre sahip değilsiniz."); 51 | } elseif ($result[0] == 22) { 52 | $log[] = ("Kontörünüz yetersiz."); 53 | $error[] = ("Kontörünüz yetersiz."); 54 | } elseif ($result[0] == 23) { 55 | $log[] = ("Kullanıcı adı ya da parolanız hatalı."); 56 | $error[] = ("Kullanıcı adı ya da parolanız hatalı."); 57 | } elseif ($result[0] == 24) { 58 | $log[] = ("Şu anda size ait başka bir işlem aktif."); 59 | $error[] = ("Şu anda size ait başka bir işlem aktif."); 60 | } elseif ($result[0] == 25) { 61 | $log[] = ("Bu hatayı alırsanız, işlemi 1-2 dk sonra tekrar deneyin."); 62 | $error[] = ("Bu hatayı alırsanız, işlemi 1-2 dk sonra tekrar deneyin."); 63 | } elseif ($result[0] == 30) { 64 | $log[] = ("Hesap Aktivasyonu sağlanmamış."); 65 | $error[] = ("Hesap Aktivasyonu sağlanmamış."); 66 | } else { 67 | $log[] = ("Mesaj Başarıyla Gönderildi."); 68 | } 69 | 70 | return array( 71 | 'log' => $log, 72 | 'error' => $error, 73 | 'msgid' => substr($result[0], 1, -4), 74 | ); 75 | } 76 | 77 | public function balance() 78 | { 79 | $params = $this->getParams(); 80 | if ($params->user && $params->pass) { 81 | $xml_data = '' . 82 | ''; 83 | $URL = "https://smsgw.mutlucell.com/smsgw-ws/gtcrdtex"; 84 | $ch = curl_init($URL); 85 | curl_setopt($ch, CURLOPT_MUTE, 1); 86 | curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); 87 | curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); 88 | curl_setopt($ch, CURLOPT_POST, 1); 89 | curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml')); 90 | curl_setopt($ch, CURLOPT_POSTFIELDS, "$xml_data"); 91 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 92 | $output = curl_exec($ch); 93 | curl_close($ch); 94 | 95 | $result = explode(" ", $output); 96 | if ($result[0] == 20) { 97 | return null; 98 | } elseif ($result[0] == 23) { 99 | return null; 100 | } else { 101 | return substr($output, 1, -2); 102 | } 103 | } else { 104 | return null; 105 | } 106 | } 107 | 108 | public function report($msgid) 109 | { 110 | $params = $this->getParams(); 111 | if ($params->user && $params->pass && $msgid) { 112 | $xml_data = '' . 113 | ''; 114 | $URL = "https://smsgw.mutlucell.com/smsgw-ws/gtblkrprtex"; 115 | $ch = curl_init($URL); 116 | curl_setopt($ch, CURLOPT_MUTE, 1); 117 | curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); 118 | curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); 119 | curl_setopt($ch, CURLOPT_POST, 1); 120 | curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml')); 121 | curl_setopt($ch, CURLOPT_POSTFIELDS, "$xml_data"); 122 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 123 | $output = curl_exec($ch); 124 | curl_close($ch); 125 | if ($output != 20 && $output != 23 && $output != 30) { 126 | return "success"; 127 | } else { 128 | return "error"; 129 | } 130 | } else { 131 | return null; 132 | } 133 | } 134 | 135 | //You can spesifically convert your gsm number. See netgsm for example 136 | public function utilgsmnumber($number) 137 | { 138 | return $number; 139 | } 140 | 141 | //You can spesifically convert your message 142 | public function utilmessage($message) 143 | { 144 | return $message; 145 | } 146 | } 147 | 148 | return array( 149 | 'value' => 'mutlucell', 150 | 'label' => 'MutluCell', 151 | 'fields' => array( 152 | 'user', 'pass' 153 | ) 154 | ); 155 | 156 | -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/senders/netgsm.php: -------------------------------------------------------------------------------- 1 | message = $this->utilmessage($message); 8 | $this->gsmnumber = $this->utilgsmnumber($gsmnumber); 9 | } 10 | 11 | public function send() 12 | { 13 | if ($this->gsmnumber == "numbererror") { 14 | $log[] = ("Number format error." . $this->gsmnumber); 15 | $error[] = ("Number format error." . $this->gsmnumber); 16 | return null; 17 | } 18 | $params = $this->getParams(); 19 | 20 | $url = "http://api.netgsm.com.tr/bulkhttppost.asp?usercode=$params->user&password=$params->pass&gsmno=$this->gsmnumber&message=" . urlencode($this->message) . "&msgheader=$params->senderid"; 21 | $log[] = "Request url: " . $url; 22 | $result = file_get_contents($url); 23 | 24 | $return = $result; 25 | $log[] = "Sunucudan dönen cevap: " . $result; 26 | 27 | $result = explode(" ", $result); 28 | if ($result[0] == "00" || $result[0] == "01" || $result[0] == "02") { 29 | $this->addLog("Message sent."); 30 | $log[] = "Message sent"; 31 | $msgid = $result[1]; 32 | $log[] = "Message id: " . $msgid; 33 | } elseif ($result[0] == "10") { 34 | $log[] = "Mesaj gönderilemedi. Hata: Telefon numarası hatalı"; 35 | $error[] = "Mesaj gönderilemedi. Hata: Telefon numarası hatalı"; 36 | } elseif ($result[0] == "20") { 37 | $log[] = "Mesaj gönderilemedi. Hata: mesaj metni boş veya çok uzun"; 38 | $error[] = "Mesaj gönderilemedi. Hata: mesaj metni boş veya çok uzun"; 39 | } elseif ($result[0] == "30") { 40 | $log[] = "Mesaj gönderilemedi. Hata: Kullanıcı bilgisi bulunamadı"; 41 | $error[] = "Mesaj gönderilemedi. Hata: Kullanıcı bilgisi bulunamadı"; 42 | } elseif ($result[0] == "40") { 43 | $log[] = "Mesaj gönderilemedi. Hata: Geçersiz mesaj başlığı"; 44 | $error[] = "Mesaj gönderilemedi. Hata: Geçersiz mesaj başlığı"; 45 | } elseif ($result[0] == "50") { 46 | $log[] = "Mesaj gönderilemedi. Hata: Kullanıcının kredisi yok"; 47 | $error[] = "Mesaj gönderilemedi. Hata: Kullanıcının kredisi yok"; 48 | } elseif ($result[0] == "60") { 49 | $log[] = "Mesaj gönderilemedi. Hata: Telefon numarası hiç tanımlanmamış"; 50 | $error[] = "Mesaj gönderilemedi. Hata: Telefon numarası hiç tanımlanmamış"; 51 | } elseif ($result[0] == "70") { 52 | $log[] = "Mesaj gönderilemedi. Hata: Mesaj başlığı hatalı"; 53 | $error[] = "Mesaj gönderilemedi. Hata: Mesaj başlığı hatalı"; 54 | } else { 55 | $log[] = "Mesaj gönderilemedi. Hata: $return"; 56 | $error[] = "Mesaj gönderilirken hata oluştu. Hata: $return"; 57 | } 58 | 59 | return array( 60 | 'log' => $log, 61 | 'error' => $error, 62 | 'msgid' => $msgid, 63 | ); 64 | } 65 | 66 | public function balance() 67 | { 68 | $params = $this->getParams(); 69 | 70 | if ($params->user && $params->pass) { 71 | $postUrl = "https://api.netgsm.com.tr/xmlpaketkampanya.asp"; 72 | $xmlString = "
Netgsm$params->user$params->pass1
"; 73 | // Kalan SMS Adedi Sorgula 74 | $fields = $xmlString; 75 | $ch = curl_init(); 76 | curl_setopt($ch, CURLOPT_URL, $postUrl); 77 | curl_setopt($ch, CURLOPT_POST, 1); 78 | curl_setopt($ch, CURLOPT_POSTFIELDS, $fields); 79 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 80 | $result = curl_exec($ch); 81 | curl_close($ch); 82 | 83 | $url = "http://api.netgsm.com.tr/get_kredi.asp?usercode=$params->user&password=$params->pass"; 84 | // Kalan TL Miktarı Sorgula 85 | $result2 = file_get_contents($url); 86 | $result2 = explode(" ", $result2); 87 | 88 | $result = str_replace("|", " ", $result); 89 | $result = str_replace("
", " ", $result); 90 | $result = "$result | $result2[1] TL"; 91 | 92 | return $result; 93 | } else { 94 | return null; 95 | } 96 | } 97 | 98 | public function report($msgid) 99 | { 100 | $params = $this->getParams(); 101 | 102 | if ($params->user && $params->pass && $msgid) { 103 | $url = "http://api.netgsm.com.tr/httpbulkrapor.asp?usercode=$params->user&password=$params->pass&bulkid=$msgid&type=0&status="; 104 | //status değiştiriliyor 105 | $url1 = $url . "1"; 106 | $result = file_get_contents($url1); 107 | if ($result != "30" && $result != "60") { 108 | return "success"; 109 | } else { 110 | return "error"; 111 | } 112 | } else { 113 | return null; 114 | } 115 | } 116 | 117 | public function utilgsmnumber($number) 118 | { 119 | if (strlen($number) == 10) { 120 | $number = '90' . $number; 121 | } elseif (strlen($number) == 11) { 122 | $number = '9' . $number; 123 | } 124 | 125 | if (substr($number, 0, 3) != "905") { 126 | return "error"; 127 | } 128 | 129 | return $number; 130 | } 131 | 132 | //You can spesifically convert your message 133 | public function utilmessage($message) 134 | { 135 | $changefrom = array('ı', 'İ', 'ü', 'Ü', 'ö', 'Ö', 'ğ', 'Ğ', 'ç', 'Ç', 'ş', 'Ş'); 136 | $changeto = array('i', 'I', 'u', 'U', 'o', 'O', 'g', 'G', 'c', 'C', 's', 'S'); 137 | $message = str_replace($changefrom, $changeto, $message); 138 | return $message; 139 | } 140 | } 141 | 142 | return array( 143 | 'value' => 'netgsm', 144 | 'label' => 'NetGsm', 145 | 'fields' => array( 146 | 'user', 'pass' 147 | ) 148 | ); 149 | -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/senders/onetouch.php: -------------------------------------------------------------------------------- 1 | message = $this->utilmessage($message); 8 | $this->gsmnumber = $this->utilgsmnumber($gsmnumber); 9 | } 10 | 11 | public function send() 12 | { 13 | if ($this->gsmnumber == "numbererror") { 14 | $log[] = ("Number format error." . $this->gsmnumber); 15 | $error[] = ("Number format error." . $this->gsmnumber); 16 | return null; 17 | } 18 | $params = $this->getParams(); 19 | 20 | $url = "http://api.ottbd.org/api/v3/sendsms/plain?user=$params->user&password=$params->pass&GSM=$this->gsmnumber&sender=$params->senderid&messagetext=" . urlencode($this->message) . ""; 21 | 22 | $log[] = "Request url: " . $url; 23 | $result = simplexml_load_file($url); 24 | 25 | $return = $result; 26 | $log[] = "server response returned: " . $result; 27 | 28 | 29 | if ($result->result[0]->status == "0") { 30 | $this->addLog("Message sent."); 31 | $log[] = "Message sent"; 32 | $msgid = $result->result[0]->messageid; 33 | $log[] = "Message id: " . $msgid; 34 | 35 | } elseif ($result->result[0]->status == "-1") { 36 | $log[] = "Error in processing the request "; 37 | $error[] = "Error in processing the request "; 38 | 39 | } elseif ($result->result[0]->status == "-2") { 40 | $log[] = "Not enough credit on a specific account "; 41 | $error[] = "Not enough credit on a specific account "; 42 | 43 | } elseif ($result->result[0]->status == "-3") { 44 | $log[] = "Targeted network is not covered on this account "; 45 | $error[] = "Targeted network is not covered on this account "; 46 | 47 | } elseif ($result->result[0]->status == "-5") { 48 | $log[] = "Invalid username or password "; 49 | $error[] = "Invalid username or password "; 50 | 51 | } elseif ($result->result[0]->status == "-6") { 52 | $log[] = "Destination address is missing "; 53 | $error[] = "Destination address is missing "; 54 | 55 | } elseif ($result->result[0]->status == "-10") { 56 | $log[] = "Username is missing "; 57 | $error[] = "Username is missing "; 58 | 59 | } elseif ($result->result[0]->status == "-11") { 60 | $log[] = "Password is missing "; 61 | $error[] = "Password is missing "; 62 | 63 | } elseif ($result->result[0]->status == "-13") { 64 | $log[] = "Number is not recognized by OneTouch platform "; 65 | $error[] = "Number is not recognized by OneTouch platform "; 66 | 67 | } elseif ($result->result[0]->status == "-33") { 68 | $log[] = "Duplicated MessageID "; 69 | $error[] = "Duplicated MessageID "; 70 | 71 | } elseif ($result->result[0]->status == "-34") { 72 | $log[] = "Sender name not allowed "; 73 | $error[] = "Sender name not allowed "; 74 | 75 | } else { 76 | $log[] = "Unable to send message. error : $return"; 77 | $error[] = "An error occurred while sending messages. error: $return"; 78 | } 79 | 80 | 81 | return array( 82 | 'log' => $log, 83 | 'error' => $error, 84 | 'msgid' => $msgid, 85 | ); 86 | } 87 | 88 | public function balance() 89 | { 90 | return null; 91 | } 92 | 93 | public function report($msgid) 94 | { 95 | return null; 96 | } 97 | 98 | 99 | public function utilgsmnumber($number) 100 | { 101 | return $number; 102 | } 103 | 104 | public function utilmessage($message) 105 | { 106 | return $message; 107 | } 108 | } 109 | 110 | return array( 111 | 'value' => 'onetouch', 112 | 'label' => 'OneTouchSMS', 113 | 'fields' => array( 114 | 'user', 'pass' 115 | ) 116 | ); 117 | -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/senders/routesms.php: -------------------------------------------------------------------------------- 1 | message = $this->utilmessage($message); 8 | $this->gsmnumber = $this->utilgsmnumber($gsmnumber); 9 | } 10 | 11 | public function send() 12 | { 13 | if ($this->gsmnumber == "numbererror") { 14 | $log[] = ("Number format error." . $this->gsmnumber); 15 | $error[] = ("Number format error." . $this->gsmnumber); 16 | return null; 17 | } 18 | $params = $this->getParams(); 19 | 20 | $url = "http://121.241.242.114:8080/bulksms/bulksms?username=$params->user&password=$params->pass&type=1&dlr=0&destination=$this->gsmnumber&source=$params->senderid&message=" . urlencode($this->message) . ""; 21 | $log[] = "Request url: " . $url; 22 | $result = file_get_contents($url); 23 | 24 | $return = $result; 25 | $log[] = "Sunucudan dönen cevap: " . $result; 26 | 27 | $result = explode("|", $result); 28 | if ($result[0] == "1701") { 29 | $this->addLog("Message sent."); 30 | $log[] = "Message sent"; 31 | $msgid = $result[2]; 32 | $log[] = "Message id: " . $msgid; 33 | } elseif ($result[0] == "1702") { 34 | $log[] = "Invalid URL Error, one of the parameters was not provided or left blank"; 35 | $error[] = "Invalid URL Error, one of the parameters was not provided or left blank"; 36 | } elseif ($result[0] == "1703") { 37 | $log[] = "Invalid value in username or password field "; 38 | $error[] = "Invalid value in username or password field "; 39 | } elseif ($result[0] == "1704") { 40 | $log[] = "Invalid value in type field "; 41 | $error[] = "Invalid value in type field "; 42 | } elseif ($result[0] == "1705") { 43 | $log[] = "Invalid message"; 44 | $error[] = "Invalid message"; 45 | } elseif ($result[0] == "1706") { 46 | $log[] = "Invalid Destination "; 47 | $error[] = "Invalid Destination "; 48 | } elseif ($result[0] == "1707") { 49 | $log[] = "Invalid Source (Sender) "; 50 | $error[] = ":Invalid Source (Sender) "; 51 | } elseif ($result[0] == "1708") { 52 | $log[] = "Invalid value for dlr field "; 53 | $error[] = "Invalid value for dlr field "; 54 | } elseif ($result[0] == "1709") { 55 | $log[] = "User validation failed "; 56 | $error[] = "User validation failed "; 57 | } elseif ($result[0] == "1710") { 58 | $log[] = "Internal Error "; 59 | $error[] = "Internal Error "; 60 | } elseif ($result[0] == "1025") { 61 | $log[] = "Insufficient Credit "; 62 | $error[] = "Insufficient Credit "; 63 | } else { 64 | $log[] = "Mesaj gönderilemedi. Hata: $return"; 65 | $error[] = "Mesaj gönderilirken hata oluştu. Hata: $return"; 66 | } 67 | 68 | return array( 69 | 'log' => $log, 70 | 'error' => $error, 71 | 'msgid' => $msgid, 72 | ); 73 | } 74 | 75 | public function balance() 76 | { 77 | return null; 78 | } 79 | 80 | public function report($msgid) 81 | { 82 | return null; 83 | } 84 | 85 | //You can spesifically convert your gsm number. See netgsm for example 86 | public function utilgsmnumber($number) 87 | { 88 | return $number; 89 | } 90 | 91 | //You can spesifically convert your message 92 | public function utilmessage($message) 93 | { 94 | return $message; 95 | } 96 | } 97 | 98 | return array( 99 | 'value' => 'routesms', 100 | 'label' => 'Route Sms', 101 | 'fields' => array( 102 | 'user', 'pass' 103 | ) 104 | ); -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/senders/sendsmsro.php: -------------------------------------------------------------------------------- 1 | 5 | */ 6 | class sendsmsro extends AktuelSms implements SmsSenderInterface 7 | { 8 | public function __construct($message, $gsmnumber) 9 | { 10 | $this->message = $this->utilmessage($message); 11 | $this->gsmnumber = $this->utilgsmnumber($gsmnumber); 12 | } 13 | 14 | public function send() 15 | { 16 | if ($this->gsmnumber == "numbererror") { 17 | $log[] = ("Number format error." . $this->gsmnumber); 18 | $error[] = ("Number format error." . $this->gsmnumber); 19 | return null; 20 | } 21 | $params = $this->getParams(); 22 | 23 | $url = "http://api.sendsms.ro/json?action=message_send&username={$params->user}&password={$params->pass}&to={$this->gsmnumber}&text=" . urlencode($this->message) . "&from=$params->senderid"; 24 | $log[] = "Request url: " . $url; 25 | $result = file_get_contents($url); 26 | 27 | $log[] = "Sunucudan dönen cevap: " . $result; 28 | 29 | $result = json_decode($result, true); 30 | if (isset($result['status']) && $result['status'] == 1) { 31 | $this->addLog("Message sent."); 32 | $log[] = "Message sent"; 33 | $msgid = $result['details']; 34 | $log[] = "Message id: " . $msgid; 35 | } else { 36 | $log[] = "ERROR: " . $result['message']; 37 | $error[] = "ERROR: " . $result['message']; 38 | } 39 | 40 | return array( 41 | 'log' => $log, 42 | 'error' => $error, 43 | 'msgid' => $msgid, 44 | ); 45 | } 46 | 47 | public function balance() 48 | { 49 | return null; 50 | } 51 | 52 | public function report($msgid) 53 | { 54 | return null; 55 | } 56 | 57 | //You can spesifically convert your gsm number. See netgsm for example 58 | public function utilgsmnumber($number) 59 | { 60 | return $number; 61 | } 62 | 63 | //You can spesifically convert your message 64 | public function utilmessage($message) 65 | { 66 | return $message; 67 | } 68 | } 69 | 70 | return array( 71 | 'value' => 'sendsmsro', 72 | 'label' => 'SendSms.ro', 73 | 'fields' => array( 74 | 'user', 'pass' 75 | ) 76 | ); -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/senders/smsgateway.php: -------------------------------------------------------------------------------- 1 | message = $this->utilmessage($message); 12 | $this->gsmnumber = $this->utilgsmnumber($gsmnumber); 13 | } 14 | 15 | public function createContact($name, $number) 16 | { 17 | return $this->makeRequest('/api/v3/contacts/create', 'POST', ['name' => $name, 'number' => $number]); 18 | } 19 | 20 | public function getContacts($page = 1) 21 | { 22 | return $this->makeRequest('/api/v3/contacts', 'GET', ['page' => $page]); 23 | } 24 | 25 | public function getContact($id) 26 | { 27 | return $this->makeRequest('/api/v3/contacts/view/' . $id, 'GET'); 28 | } 29 | 30 | 31 | public function getDevices($page = 1) 32 | { 33 | return $this->makeRequest('/api/v3/devices', 'GET', ['page' => $page]); 34 | } 35 | 36 | public function getDevice($id) 37 | { 38 | return $this->makeRequest('/api/v3/devices/view/' . $id, 'GET'); 39 | } 40 | 41 | public function getMessages($page = 1) 42 | { 43 | return $this->makeRequest('/api/v3/messages', 'GET', ['page' => $page]); 44 | } 45 | 46 | public function getSingleMessage($id) 47 | { 48 | return $this->makeRequest('/api/v3/messages/view/' . $id, 'GET'); 49 | } 50 | 51 | public function sendMessageToNumber($to, $message, $device, $options = []) 52 | { 53 | $query = array_merge(['number' => $to, 'message' => $message, 'device' => $device], $options); 54 | return $this->makeRequest('/api/v3/messages/send', 'POST', $query); 55 | } 56 | 57 | public function sendMessageToManyNumbers($to, $message, $device, $options = []) 58 | { 59 | $query = array_merge(['number' => $to, 'message' => $message, 'device' => $device], $options); 60 | return $this->makeRequest('/api/v3/messages/send', 'POST', $query); 61 | } 62 | 63 | public function sendMessageToContact($to, $message, $device, $options = []) 64 | { 65 | $query = array_merge(['contact' => $to, 'message' => $message, 'device' => $device], $options); 66 | return $this->makeRequest('/api/v3/messages/send', 'POST', $query); 67 | } 68 | 69 | public function sendMessageToManyContacts($to, $message, $device, $options = []) 70 | { 71 | $query = array_merge(['contact' => $to, 'message' => $message, 'device' => $device], $options); 72 | return $this->makeRequest('/api/v3/messages/send', 'POST', $query); 73 | } 74 | 75 | public function sendManyMessages($data) 76 | { 77 | $query['data'] = $data; 78 | return $this->makeRequest('/api/v3/messages/send', 'POST', $query); 79 | } 80 | 81 | private function makeRequest($url, $method, $fields = []) 82 | { 83 | $params = $this->getParams(); 84 | 85 | $fields['email'] = $params->email; 86 | $fields['password'] = $params->pass; 87 | 88 | $url = smsGateway::$baseUrl . $url; 89 | 90 | $fieldsString = http_build_query($fields); 91 | 92 | 93 | $ch = curl_init(); 94 | 95 | if ($method == 'POST') { 96 | curl_setopt($ch, CURLOPT_POST, count($fields)); 97 | curl_setopt($ch, CURLOPT_POSTFIELDS, $fieldsString); 98 | } else { 99 | $url .= '?' . $fieldsString; 100 | } 101 | 102 | curl_setopt($ch, CURLOPT_URL, $url); 103 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 104 | curl_setopt($ch, CURLOPT_HEADER, false); // we want headers 105 | curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); 106 | 107 | $result = curl_exec($ch); 108 | 109 | $return['response'] = json_decode($result, true); 110 | 111 | if ($return['response'] == false) 112 | $return['response'] = $result; 113 | 114 | $return['status'] = curl_getinfo($ch, CURLINFO_HTTP_CODE); 115 | 116 | curl_close($ch); 117 | 118 | return $return; 119 | } 120 | 121 | 122 | public function send() 123 | { 124 | 125 | if ($this->gsmnumber == "numbererror") { 126 | $log[] = ("Number format error." . $this->gsmnumber); 127 | $error[] = ("Number format error." . $this->gsmnumber); 128 | return null; 129 | } 130 | $params = $this->getParams(); 131 | 132 | // check list of devices and get the first one: 133 | $getDevicesresult = $this->getDevices(); 134 | $json_string = json_encode($getDevicesresult, JSON_PRETTY_PRINT); 135 | $deviceID = $getDevicesresult['response']['result']['data'][0]['id']; 136 | if (!$deviceID) { 137 | $log[] = "Can not get deviceID. error : " . $json_string; 138 | $error[] = "Can not get deviceID. error: " . $json_string; 139 | } 140 | 141 | // the mess number and content: 142 | $number = $this->gsmnumber; 143 | $message = $this->message; 144 | $options = [ 145 | 'expires_at' => strtotime('+20 minutes') // Cancel the message in 1 hour if the message is not yet sent 146 | ]; 147 | 148 | // call API to send message: 149 | $result = $this->sendMessageToNumber($number, $message, $deviceID, $options); 150 | $json_string = json_encode($result, JSON_PRETTY_PRINT); 151 | 152 | $log[] = "Request send message: " . $message . 'to number: ' . $number; 153 | 154 | $return = $result; 155 | $log[] = "smsGateway server response returned: " . $json_string; 156 | 157 | 158 | if ($result['response']['success']) { 159 | $this->addLog("Call API success."); 160 | $log[] = "Call API success."; 161 | $Status = $result['response']['result']['success'][0]['status']; 162 | $send_at = date('Y-m-d h:i:s', $result['response']['result']['success'][0]['send_at']); 163 | 164 | if ($result['response']['result']['success']['error'] == "") { 165 | $messid = $result['response']['result']['success'][0]['id']; 166 | $this->addLog("Message id: " . $messid . " was sent at" . $send_at . " Status: " . $Status); 167 | $log[] = "Message id: " . $messid . " sent at: " . $send_at . " Status: " . $Status; 168 | } elseif ($result['response']['result']['fails']['errors']) { 169 | $error = json_encode($result['response']['result']['fails']['errors'], JSON_PRETTY_PRINT); 170 | $log[] = "Error when sending message. error : " . $error; 171 | $error[] = "An error occurred while sending messages. error: " . $error; 172 | } else { 173 | $log[] = "Unable to send message. error : " . $json_string; 174 | $error[] = "An error occurred while sending messages. error: " . $json_string; 175 | } 176 | } else { 177 | $log[] = "Unable to send message. error : " . $json_string; 178 | $error[] = "An error occurred while sending messages. error: " . $json_string; 179 | } 180 | return array( 181 | 'log' => $log, 182 | 'error' => $error, 183 | 'msgid' => $messid, 184 | ); 185 | } 186 | 187 | public function balance() 188 | { 189 | // check list of devices and get the first one: 190 | $getDevicesresult = $this->getDevices(); 191 | $DeviceID = $getDevicesresult['response']['result']['data'][0]['id']; 192 | $Devicename = $getDevicesresult['response']['result']['data'][0]['name']; 193 | $Devicemake = $getDevicesresult['response']['result']['data'][0]['make']; 194 | $Devicemodel = $getDevicesresult['response']['result']['data'][0]['model']; 195 | $Devicenumber = $getDevicesresult['response']['result']['data'][0]['number']; 196 | $battery = $getDevicesresult['response']['result']['data'][0]['battery']; 197 | $Devicesignal = $getDevicesresult['response']['result']['data'][0]['signal']; 198 | $Devicewifi = $getDevicesresult['response']['result']['data'][0]['wifi']; 199 | $device_info = 'ID: ' . $DeviceID . ' | ' . 'Name: ' . $Devicename . ' ' . $Devicemake . ' ' . $Devicemodel . ' | ' . 'Number: ' . $Devicenumber . ' | ' . 'Battery: ' . $battery . ' | ' . 'Devicesignal: ' . $Devicesignal . ' | ' . 'Devicewifi: ' . $Devicewifi; 200 | 201 | if ($device_info) { 202 | return $device_info; 203 | } else { 204 | return 'Can not get Device\'s info'; 205 | } 206 | } 207 | 208 | public function report($msgid) 209 | { 210 | $id = $msgid; 211 | $result = $this->getSingleMessage($id); 212 | 213 | if ($result['response']['success']) { 214 | $status = $result['response']['result']['status']; 215 | // $report = 'Status: ' . $status . '. Error' . $result['response']['result']['error']; 216 | return $status; 217 | } else { 218 | return 'Unknown'; 219 | } 220 | } 221 | 222 | public function utilgsmnumber($number) 223 | { 224 | $params = $this->getParams(); 225 | $countrycode = $params->countrycode; 226 | $Cnumber = $countrycode . substr($number, 1); 227 | return $Cnumber; 228 | } 229 | 230 | public function utilmessage($message) 231 | { 232 | // $params = $this->getParams(); 233 | // $sign = $params->sign 234 | // $message = $message . ' ' . $sign 235 | return $message; 236 | } 237 | } 238 | 239 | return array( 240 | 'value' => 'smsgateway', 241 | 'label' => 'SMS Gateway', 242 | 'fields' => array( 243 | 'email', 'pass', 'countrycode' 244 | ) 245 | ); 246 | -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/senders/ucuzsmsal.php: -------------------------------------------------------------------------------- 1 | message = $this->utilmessage($message); 8 | $this->gsmnumber = $this->utilgsmnumber($gsmnumber); 9 | } 10 | 11 | public function send() 12 | { 13 | if ($this->gsmnumber == "numbererror") { 14 | $log[] = ("Number format error." . $this->gsmnumber); 15 | $error[] = ("Number format error." . $this->gsmnumber); 16 | return null; 17 | } 18 | $params = json_decode($this->params); 19 | 20 | $url = "http://www.ucuzsmsal.com/api/index.php?act=sendsms&user=" . $params->user . "&pass=" . $params->pass . "&orgin=" . $params->senderid . "&message=" . urlencode($this->message) . "&numbers=$this->gsmnumber"; 21 | 22 | $result = file_get_contents($url); 23 | $return = $result; 24 | $log[] = ("Sunucudan dönen cevap: " . $result); 25 | 26 | $result = explode("|", $result); 27 | if ($result[0] == "OK") { 28 | $log[] = ("Message sent."); 29 | } else { 30 | $log[] = ("Mesaj gönderilemedi. Hata: $return"); 31 | $error[] = ("Mesaj gönderilirken hata oluştu. Hata: $return"); 32 | } 33 | 34 | return array( 35 | 'log' => $log, 36 | 'error' => $error, 37 | 'msgid' => $result[1], 38 | ); 39 | } 40 | 41 | public function balance() 42 | { 43 | return null; 44 | } 45 | 46 | public function report($msgid) 47 | { 48 | return null; 49 | } 50 | 51 | //You can spesifically convert your gsm number. See netgsm for example 52 | public function utilgsmnumber($number) 53 | { 54 | if (strlen($number) == 10) { 55 | 56 | } elseif (strlen($number) == 11) { 57 | $number = substr($number, 1, strlen($number)); 58 | } elseif (strlen($number) == 12) { 59 | $number = substr($number, 2, strlen($number)); 60 | } 61 | 62 | if (substr($number, 0, 1) != "5") { 63 | return "numbererror"; 64 | } 65 | return $number; 66 | } 67 | 68 | //You can spesifically convert your message 69 | public function utilmessage($message) 70 | { 71 | return $message; 72 | } 73 | } 74 | 75 | return array( 76 | 'value' => 'ucuzsmsal', 77 | 'label' => 'Ucuz Sms Al', 78 | 'fields' => array( 79 | 'user', 'pass' 80 | ) 81 | ); -------------------------------------------------------------------------------- /modules/addons/aktuel_sms/smsclass.php: -------------------------------------------------------------------------------- 1 | gsmnumber = $this->util_gsmnumber($gsmnumber); 30 | } 31 | 32 | /** 33 | * @return mixed 34 | */ 35 | public function getGsmnumber() 36 | { 37 | return $this->gsmnumber; 38 | } 39 | 40 | /** 41 | * @param mixed $message 42 | */ 43 | public function setMessage($message) 44 | { 45 | $this->message = $this->util_convert($message); 46 | } 47 | 48 | /** 49 | * @return mixed 50 | */ 51 | public function getMessage() 52 | { 53 | return $this->message; 54 | } 55 | 56 | /** 57 | * @param int $userid 58 | */ 59 | public function setUserid($userid) 60 | { 61 | $this->userid = $userid; 62 | } 63 | 64 | /** 65 | * @return int 66 | */ 67 | public function getUserid() 68 | { 69 | return $this->userid; 70 | } 71 | 72 | /** 73 | * @return array 74 | */ 75 | public function getParams() 76 | { 77 | $settings = $this->getSettings(); 78 | $params = json_decode($settings['apiparams']); 79 | return $params; 80 | } 81 | 82 | /** 83 | * @return mixed 84 | */ 85 | public function getSender() 86 | { 87 | $settings = $this->getSettings(); 88 | if (!$settings['api']) { 89 | $this->addError("Geçerli bir api seçilmedi"); 90 | $this->addLog("Geçerli bir api seçilmedi"); 91 | return false; 92 | } else { 93 | return $settings['api']; 94 | } 95 | } 96 | 97 | /** 98 | * @return array 99 | */ 100 | public function getSettings() 101 | { 102 | $result = select_query("mod_aktuelsms_settings", "*"); 103 | return mysql_fetch_array($result); 104 | } 105 | 106 | function send() 107 | { 108 | $sender_function = strtolower($this->getSender()); 109 | if ($sender_function == false) { 110 | return false; 111 | } else { 112 | $params = $this->getParams(); 113 | $message = $this->message; 114 | $message .= " " . $params->signature; 115 | 116 | $this->addLog("Params: " . json_encode($params)); 117 | $this->addLog("To: " . $this->getGsmnumber()); 118 | $this->addLog("Message: " . $message); 119 | $this->addLog("SenderClass: " . $sender_function); 120 | 121 | include_once("senders/" . $sender_function . ".php"); 122 | $sender = new $sender_function(trim($message), $this->getGsmnumber()); 123 | $result = $sender->send(); 124 | 125 | foreach ($result['log'] as $log) { 126 | $this->addLog($log); 127 | } 128 | if ($result['error']) { 129 | foreach ($result['error'] as $error) { 130 | $this->addError($error); 131 | } 132 | 133 | $this->saveToDb($result['msgid'], 'error', $this->getErrors(), $this->getLogs()); 134 | return false; 135 | } else { 136 | $this->saveToDb($result['msgid'], '', null, $this->getLogs()); 137 | return true; 138 | } 139 | } 140 | } 141 | 142 | function getBalance() 143 | { 144 | $sender_function = strtolower($this->getSender()); 145 | if ($sender_function == false) { 146 | return false; 147 | } else { 148 | include_once("senders/" . $sender_function . ".php"); 149 | $sender = new $sender_function("", ""); 150 | return $sender->balance(); 151 | } 152 | } 153 | 154 | function getReport($msgid) 155 | { 156 | $result = mysql_query("SELECT sender FROM mod_aktuelsms_messages WHERE msgid = '$msgid' LIMIT 1"); 157 | $result = mysql_fetch_array($result); 158 | 159 | $sender_function = strtolower($result['sender']); 160 | if ($sender_function == false) { 161 | return false; 162 | } else { 163 | include_once("senders/" . $sender_function . ".php"); 164 | $sender = new $sender_function("", ""); 165 | return $sender->report($msgid); 166 | } 167 | } 168 | 169 | function getSenders() 170 | { 171 | if ($handle = opendir(dirname(__FILE__) . '/senders')) { 172 | while (false !== ($entry = readdir($handle))) { 173 | if (substr($entry, strlen($entry) - 4, strlen($entry)) == ".php") { 174 | $file[] = require_once('senders/' . $entry); 175 | } 176 | } 177 | closedir($handle); 178 | } 179 | return $file; 180 | } 181 | 182 | function getHooks() 183 | { 184 | if ($handle = opendir(dirname(__FILE__) . '/hooks')) { 185 | while (false !== ($entry = readdir($handle))) { 186 | if (substr($entry, strlen($entry) - 4, strlen($entry)) == ".php") { 187 | $file[] = require_once('hooks/' . $entry); 188 | } 189 | } 190 | closedir($handle); 191 | } 192 | return $file; 193 | } 194 | 195 | function saveToDb($msgid, $status, $errors = null, $logs = null) 196 | { 197 | $now = date("Y-m-d H:i:s"); 198 | $table = "mod_aktuelsms_messages"; 199 | $values = array( 200 | "sender" => $this->getSender(), 201 | "to" => $this->getGsmnumber(), 202 | "text" => $this->getMessage(), 203 | "msgid" => $msgid, 204 | "status" => $status, 205 | "errors" => $errors, 206 | "logs" => $logs, 207 | "user" => $this->getUserid(), 208 | "datetime" => $now 209 | ); 210 | insert_query($table, $values); 211 | 212 | $this->addLog("Mesaj veritabanına kaydedildi"); 213 | } 214 | 215 | /* Main message convert function. Will be removed next release */ 216 | function util_convert($message) 217 | { 218 | $changefrom = array('ı', 'İ', 'ü', 'Ü', 'ö', 'Ö', 'ğ', 'Ğ', 'ç', 'Ç', 'ş', 'Ş'); 219 | $changeto = array('i', 'I', 'u', 'U', 'o', 'O', 'g', 'G', 'c', 'C', 's', 'S'); 220 | return str_replace($changefrom, $changeto, $message); 221 | } 222 | 223 | /* Default number format */ 224 | function util_gsmnumber($number) 225 | { 226 | $replacefrom = array('-', '(', ')', '.', ',', '+', ' '); 227 | $number = str_replace($replacefrom, '', $number); 228 | 229 | return $number; 230 | } 231 | 232 | public function addError($error) 233 | { 234 | $this->errors[] = $error; 235 | } 236 | 237 | public function addLog($log) 238 | { 239 | $this->logs[] = $log; 240 | } 241 | 242 | /** 243 | * @return array 244 | */ 245 | public function getErrors() 246 | { 247 | $res = '

    '; 248 | foreach ($this->errors as $d) { 249 | $res .= "
  • $d
  • "; 250 | } 251 | $res .= '

'; 252 | return $res; 253 | } 254 | 255 | /** 256 | * @return array 257 | */ 258 | public function getLogs() 259 | { 260 | $res = '

Debug Result

    '; 261 | foreach ($this->logs as $d) { 262 | $res .= "
  • $d
  • "; 263 | } 264 | $res .= '

'; 265 | return $res; 266 | } 267 | 268 | /* 269 | * Runs at addon install/update 270 | * This function controls that if there is any change at hooks files. Such as new hook, variable changes at hooks. 271 | */ 272 | function checkHooks($hooks = null) 273 | { 274 | if ($hooks == null) { 275 | $hooks = $this->getHooks(); 276 | } 277 | 278 | $i = 0; 279 | foreach ($hooks as $hook) { 280 | $sql = "SELECT `id` FROM `mod_aktuelsms_templates` WHERE `name` = '" . $hook['function'] . "' AND `type` = '" . $hook['type'] . "' LIMIT 1"; 281 | $result = mysql_query($sql); 282 | $num_rows = mysql_num_rows($result); 283 | if ($num_rows == 0) { 284 | if ($hook['type']) { 285 | $values = array( 286 | "name" => $hook['function'], 287 | "type" => $hook['type'], 288 | "template" => $hook['defaultmessage'], 289 | "variables" => $hook['variables'], 290 | "extra" => $hook['extra'], 291 | "description" => json_encode(@$hook['description']), 292 | "active" => 1 293 | ); 294 | insert_query("mod_aktuelsms_templates", $values); 295 | $i++; 296 | } 297 | } else { 298 | $values = array( 299 | "variables" => $hook['variables'] 300 | ); 301 | update_query("mod_aktuelsms_templates", $values, "name = '" . $hook['name'] . "'"); 302 | } 303 | } 304 | return $i; 305 | } 306 | 307 | function getTemplateDetails($template = null) 308 | { 309 | $where = array("name" => $template); 310 | $result = select_query("mod_aktuelsms_templates", "*", $where); 311 | $data = mysql_fetch_assoc($result); 312 | 313 | return $data; 314 | } 315 | 316 | function changeDateFormat($date = null) 317 | { 318 | $settings = $this->getSettings(); 319 | $dateformat = $settings['dateformat']; 320 | if (!$dateformat) { 321 | return $date; 322 | } 323 | 324 | $date = explode("-", $date); 325 | $year = $date[0]; 326 | $month = $date[1]; 327 | $day = $date[2]; 328 | 329 | $dateformat = str_replace(array("%d", "%m", "%y"), array($day, $month, $year), $dateformat); 330 | return $dateformat; 331 | } 332 | 333 | } 334 | -------------------------------------------------------------------------------- /version.txt: -------------------------------------------------------------------------------- 1 | 1.1.8 2 | --------------------------------------------------------------------------------