├── version.txt
├── modules
└── addons
│ └── aktuel_sms
│ ├── hooks.php
│ ├── senders
│ ├── SmsSenderInterface.php
│ ├── sendsmsro.php
│ ├── ucuzsmsal.php
│ ├── hemenposta.php
│ ├── bytehand.php
│ ├── routesms.php
│ ├── clickatell.php
│ ├── onetouch.php
│ ├── dakiksms.php
│ ├── netgsm.php
│ ├── msg91.php
│ ├── mutlucell.php
│ ├── birsms.php
│ └── smsgateway.php
│ ├── hooks
│ ├── clientadd_admin.php
│ ├── AdminLogin.php
│ ├── ticketopen_admin.php
│ ├── ticketuserreply_admin.php
│ ├── afterregistrarrenewal_admin.php
│ ├── afterregistrarregistration_admin.php
│ ├── afterregistrarrenewalfailed_admin.php
│ ├── afterregistrarregistrationfailed_admin.php
│ ├── ClientLogin_admin.php
│ ├── afterregistrarrenewal.php
│ ├── clientadd.php
│ ├── acceptorder.php
│ ├── clientchangepassword.php
│ ├── afterregistrarregistration.php
│ ├── ticketadminreply.php
│ ├── ticketclose.php
│ ├── afterregistrarregistrationfailed.php
│ ├── invoicepaid.php
│ ├── aftermodulesuspend.php
│ ├── aftermoduleunsuspend.php
│ ├── AfterModuleChangePackage.php
│ ├── invoicecreated.php
│ ├── invoicepaymentreminder_reminder.php
│ ├── aftermodulecreate_hosting.php
│ ├── AfterModuleChangePassword.php
│ ├── invoicepaymentreminder_third.php
│ ├── invoicepaymentreminder_first.php
│ ├── invoicepaymentreminder_second.php
│ └── domainrenewalnotice.php
│ ├── lang
│ ├── turkish.php
│ ├── russian.php
│ └── english.php
│ ├── smsclass.php
│ └── aktuel_sms.php
├── README.md
└── LICENCE
/version.txt:
--------------------------------------------------------------------------------
1 | 1.1.8
2 |
--------------------------------------------------------------------------------
/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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_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/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 = "
", " ", $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/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 | '';
248 | foreach ($this->errors as $d) {
249 | $res .= "
Debug Result
| # | 366 |' . $LANG['client'] . ' | 367 |' . $LANG['gsmnumber'] . ' | 368 |' . $LANG['message'] . ' | 369 |' . $LANG['datetime'] . ' | 370 |' . $LANG['status'] . ' | 371 |372 | |
|---|---|---|---|---|---|---|
| ' . $data['id'] . ' | 410 |' . $data['firstname'] . ' ' . $data['lastname'] . ' | 411 |' . $data['to'] . ' | 412 |' . $data['text'] . ' | 413 |' . $data['datetime'] . ' | 414 |' . $LANG[$status] . ' | 415 |