├── version
├── hooks.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
├── afterregistrarregistration.php
├── clientadd.php
├── acceptorder.php
├── clientchangepassword.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_first.php
├── invoicepaymentreminder_third.php
├── invoicepaymentreminder_second.php
└── domainrenewalnotice.php
├── senders
├── ucuzsmsal.php
├── hemenposta.php
├── bytehand.php
├── clickatell.php
├── onetouch.php
├── routesms.php
├── evmaksms.php
├── dakiksms.php
├── msg91.php
├── mutlucell.php
├── birsms.php
├── netgsm.php
└── smsgateway.php
├── lang
├── turkish.php
├── russian.php
└── english.php
├── README.md
├── smsclass.php
└── aktuel_sms.php
/version:
--------------------------------------------------------------------------------
1 | 1.1.8
2 |
--------------------------------------------------------------------------------
/hooks.php:
--------------------------------------------------------------------------------
1 | getHooks();
16 |
17 | foreach($hooks as $hook){
18 | add_hook($hook['hook'], 1, $hook['function'], "");
19 | }
--------------------------------------------------------------------------------
/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 | $class = new AktuelSms();
13 | $template = $class->getTemplateDetails(__FUNCTION__);
14 | if($template['active'] == 0){
15 | return null;
16 | }
17 | $settings = $class->getSettings();
18 | if(!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']){
19 | return null;
20 | }
21 | $admingsm = explode(",",$template['admingsm']);
22 |
23 | foreach($admingsm as $gsm){
24 | if(!empty($gsm)){
25 | $class->setGsmnumber(trim($gsm));
26 | $class->setUserid(0);
27 | $class->setMessage($template['template']);
28 | $class->send();
29 | }
30 | }
31 | }
32 | }
33 | return $hook;
--------------------------------------------------------------------------------
/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 | $class = new AktuelSms();
13 | $template = $class->getTemplateDetails(__FUNCTION__);
14 | if($template['active'] == 0){
15 | return null;
16 | }
17 | $settings = $class->getSettings();
18 | if(!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']){
19 | return null;
20 | }
21 | $admingsm = explode(",",$template['admingsm']);
22 |
23 | $template['variables'] = str_replace(" ","",$template['variables']);
24 | $replacefrom = explode(",",$template['variables']);
25 | $replaceto = array($args['username']);
26 | $message = str_replace($replacefrom,$replaceto,$template['template']);
27 |
28 | foreach($admingsm as $gsm){
29 | if(!empty($gsm)){
30 | $class->setGsmnumber( trim($gsm));
31 | $class->setUserid(0);
32 | $class->setMessage($message);
33 | $class->send();
34 | }
35 | }
36 | }
37 | }
38 |
39 | return $hook;
40 |
--------------------------------------------------------------------------------
/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 | $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['subject']);
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 |
--------------------------------------------------------------------------------
/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 | $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['subject']);
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 |
--------------------------------------------------------------------------------
/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 | $class = new AktuelSms();
13 | $template = $class->getTemplateDetails(__FUNCTION__);
14 | if($template['active'] == 0){
15 | return null;
16 | }
17 | $settings = $class->getSettings();
18 | if(!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']){
19 | return null;
20 | }
21 | $admingsm = explode(",",$template['admingsm']);
22 |
23 | $template['variables'] = str_replace(" ","",$template['variables']);
24 | $replacefrom = explode(",",$template['variables']);
25 | $replaceto = array($args['params']['sld'].".".$args['params']['tld']);
26 | $message = str_replace($replacefrom,$replaceto,$template['template']);
27 |
28 | foreach($admingsm as $gsm){
29 | if(!empty($gsm)){
30 | $class->setGsmnumber( trim($gsm));
31 | $class->setUserid(0);
32 | $class->setMessage($message);
33 | $class->send();
34 | }
35 | }
36 | }
37 | }
38 |
39 | return $hook;
--------------------------------------------------------------------------------
/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 | $class = new AktuelSms();
13 | $template = $class->getTemplateDetails(__FUNCTION__);
14 | if($template['active'] == 0){
15 | return null;
16 | }
17 | $settings = $class->getSettings();
18 | if(!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']){
19 | return null;
20 | }
21 | $admingsm = explode(",",$template['admingsm']);
22 |
23 | $template['variables'] = str_replace(" ","",$template['variables']);
24 | $replacefrom = explode(",",$template['variables']);
25 | $replaceto = array($args['params']['sld'].".".$args['params']['tld']);
26 | $message = str_replace($replacefrom,$replaceto,$template['template']);
27 |
28 | foreach($admingsm as $gsm){
29 | if(!empty($gsm)){
30 | $class->setGsmnumber( trim($gsm));
31 | $class->setUserid(0);
32 | $class->setMessage($message);
33 | $class->send();
34 | }
35 | }
36 | }
37 | }
38 |
39 | return $hook;
--------------------------------------------------------------------------------
/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 | $class = new AktuelSms();
13 | $template = $class->getTemplateDetails(__FUNCTION__);
14 | if($template['active'] == 0){
15 | return null;
16 | }
17 | $settings = $class->getSettings();
18 | if(!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']){
19 | return null;
20 | }
21 | $admingsm = explode(",",$template['admingsm']);
22 |
23 | $template['variables'] = str_replace(" ","",$template['variables']);
24 | $replacefrom = explode(",",$template['variables']);
25 | $replaceto = array($args['params']['sld'].".".$args['params']['tld']);
26 | $message = str_replace($replacefrom,$replaceto,$template['template']);
27 |
28 | foreach($admingsm as $gsm){
29 | if(!empty($gsm)){
30 | $class->setGsmnumber( trim($gsm));
31 | $class->setUserid(0);
32 | $class->setMessage($message);
33 | $class->send();
34 | }
35 | }
36 | }
37 | }
38 |
39 | return $hook;
--------------------------------------------------------------------------------
/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 | $class = new AktuelSms();
13 | $template = $class->getTemplateDetails(__FUNCTION__);
14 | if($template['active'] == 0){
15 | return null;
16 | }
17 | $settings = $class->getSettings();
18 | if(!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']){
19 | return null;
20 | }
21 | $admingsm = explode(",",$template['admingsm']);
22 |
23 | $template['variables'] = str_replace(" ","",$template['variables']);
24 | $replacefrom = explode(",",$template['variables']);
25 | $replaceto = array($args['params']['sld'].".".$args['params']['tld']);
26 | $message = str_replace($replacefrom,$replaceto,$template['template']);
27 |
28 | foreach($admingsm as $gsm){
29 | if(!empty($gsm)){
30 | $class->setGsmnumber( trim($gsm));
31 | $class->setUserid(0);
32 | $class->setMessage($message);
33 | $class->send();
34 | }
35 | }
36 | }
37 | }
38 |
39 | return $hook;
40 |
--------------------------------------------------------------------------------
/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 | $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 | $userSql = "SELECT `a`.`id`,`a`.`firstname`, `a`.`lastname`, `b`.`value` as `gsmnumber`
25 | FROM `tblclients` as `a`
26 | JOIN `tblcustomfieldsvalues` as `b` ON `b`.`relid` = `a`.`id`
27 | JOIN `tblcustomfieldsvalues` as `c` ON `c`.`relid` = `a`.`id`
28 | WHERE `a`.`id` = '".$args['userid']."'
29 | AND `b`.`fieldid` = '".$settings['gsmnumberfield']."'
30 | AND `c`.`fieldid` = '".$settings['wantsmsfield']."'
31 | AND `c`.`value` = 'on'
32 | LIMIT 1";
33 | $result = mysql_query($userSql);
34 | $num_rows = mysql_num_rows($result);
35 |
36 | if($num_rows == 1){
37 | $UserInformation = mysql_fetch_assoc($result);
38 |
39 | $template['variables'] = str_replace(" ","",$template['variables']);
40 | $replacefrom = explode(",",$template['variables']);
41 | $replaceto = array($UserInformation['firstname'],$UserInformation['lastname']);
42 | $message = str_replace($replacefrom,$replaceto,$template['template']);
43 |
44 | foreach($admingsm as $gsm){
45 | if(!empty($gsm)){
46 | $class->setGsmnumber( trim($gsm));
47 | $class->setUserid(0);
48 | $class->setMessage($message);
49 | } $class->send();
50 | }
51 | }
52 | }
53 | }
54 |
55 | return $hook;
56 |
--------------------------------------------------------------------------------
/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 | $class = new AktuelSms();
17 | $template = $class->getTemplateDetails(__FUNCTION__);
18 | if($template['active'] == 0){
19 | return null;
20 | }
21 | $settings = $class->getSettings();
22 | if(!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']){
23 | return null;
24 | }
25 |
26 | $userSql = "SELECT `a`.`id`,`a`.`firstname`, `a`.`lastname`, `b`.`value` as `gsmnumber`
27 | FROM `tblclients` as `a`
28 | JOIN `tblcustomfieldsvalues` as `b` ON `b`.`relid` = `a`.`id`
29 | JOIN `tblcustomfieldsvalues` as `c` ON `c`.`relid` = `a`.`id`
30 | WHERE `a`.`id` = '".$args['params']['userid']."'
31 | AND `b`.`fieldid` = '".$settings['gsmnumberfield']."'
32 | AND `c`.`fieldid` = '".$settings['wantsmsfield']."'
33 | AND `c`.`value` = 'on'
34 | LIMIT 1";
35 | $result = mysql_query($userSql);
36 | $num_rows = mysql_num_rows($result);
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'],$args['params']['sld'].".".$args['params']['tld']);
43 | $message = str_replace($replacefrom,$replaceto,$template['template']);
44 |
45 | $class->setGsmnumber($UserInformation['gsmnumber']);
46 | $class->setUserid($args['params']['userid']);
47 | $class->setMessage($message);
48 | $class->send();
49 | }
50 |
51 | }
52 | }
53 |
54 | return $hook;
--------------------------------------------------------------------------------
/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 | $class = new AktuelSms();
17 | $template = $class->getTemplateDetails(__FUNCTION__);
18 | if($template['active'] == 0){
19 | return null;
20 | }
21 | $settings = $class->getSettings();
22 | if(!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']){
23 | return null;
24 | }
25 |
26 | $userSql = "SELECT `a`.`id`,`a`.`firstname`, `a`.`lastname`, `b`.`value` as `gsmnumber`
27 | FROM `tblclients` as `a`
28 | JOIN `tblcustomfieldsvalues` as `b` ON `b`.`relid` = `a`.`id`
29 | JOIN `tblcustomfieldsvalues` as `c` ON `c`.`relid` = `a`.`id`
30 | WHERE `a`.`id` = '".$args['params']['userid']."'
31 | AND `b`.`fieldid` = '".$settings['gsmnumberfield']."'
32 | AND `c`.`fieldid` = '".$settings['wantsmsfield']."'
33 | AND `c`.`value` = 'on'
34 | LIMIT 1";
35 | $result = mysql_query($userSql);
36 | $num_rows = mysql_num_rows($result);
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'],$args['params']['sld'].".".$args['params']['tld']);
43 | $message = str_replace($replacefrom,$replaceto,$template['template']);
44 |
45 | $class->setGsmnumber($UserInformation['gsmnumber']);
46 | $class->setUserid($args['params']['userid']);
47 | $class->setMessage($message);
48 | $class->send();
49 | }
50 |
51 | }
52 | }
53 |
54 | return $hook;
--------------------------------------------------------------------------------
/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 | $class = new AktuelSms();
17 | $template = $class->getTemplateDetails(__FUNCTION__);
18 | if($template['active'] == 0){
19 | return null;
20 | }
21 | $settings = $class->getSettings();
22 | if(!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']){
23 | return null;
24 | }
25 |
26 | $userSql = "SELECT `a`.`id`,`a`.`firstname`, `a`.`lastname`, `b`.`value` as `gsmnumber`
27 | FROM `tblclients` as `a`
28 | JOIN `tblcustomfieldsvalues` as `b` ON `b`.`relid` = `a`.`id`
29 | JOIN `tblcustomfieldsvalues` as `c` ON `c`.`relid` = `a`.`id`
30 | WHERE `a`.`id` = '".$args['userid']."'
31 | AND `b`.`fieldid` = '".$settings['gsmnumberfield']."'
32 | AND `c`.`fieldid` = '".$settings['wantsmsfield']."'
33 | AND `c`.`value` = 'on'
34 | LIMIT 1";
35 | $result = mysql_query($userSql);
36 | $num_rows = mysql_num_rows($result);
37 |
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['email'],$args['password']);
44 | $message = str_replace($replacefrom,$replaceto,$template['template']);
45 |
46 | $class->setGsmnumber($UserInformation['gsmnumber']);
47 | $class->setMessage($message);
48 | $class->setUserid($args['userid']);
49 | $class->send();
50 | }
51 | }
52 | }
53 |
54 | return $hook;
--------------------------------------------------------------------------------
/senders/ucuzsmsal.php:
--------------------------------------------------------------------------------
1 | message = $this->utilmessage($message);
6 | $this->gsmnumber = $this->utilgsmnumber($gsmnumber);
7 | }
8 |
9 | function send(){
10 | if($this->gsmnumber == "numbererror"){
11 | $log[] = ("Number format error.".$this->gsmnumber);
12 | $error[] = ("Number format error.".$this->gsmnumber);
13 | return null;
14 | }
15 | $params = json_decode($this->params);
16 |
17 | $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";
18 |
19 | $result = file_get_contents($url);
20 | $return = $result;
21 | $log[] = ("Sunucudan dönen cevap: ".$result);
22 |
23 | $result = explode("|",$result);
24 | if($result[0]=="OK"){
25 | $log[] = ("Message sent.");
26 | }else{
27 | $log[] = ("Mesaj gönderilemedi. Hata: $return");
28 | $error[] = ("Mesaj gönderilirken hata oluştu. Hata: $return");
29 | }
30 |
31 | return array(
32 | 'log' => $log,
33 | 'error' => $error,
34 | 'msgid' => $result[1],
35 | );
36 | }
37 | function balance(){
38 | return null;
39 | }
40 | function report($msgid){
41 | return null;
42 | }
43 |
44 | //You can spesifically convert your gsm number. See netgsm for example
45 | function utilgsmnumber($number){
46 | if (strlen($number) == 10) {
47 |
48 | } elseif (strlen($number) == 11) {
49 | $number = substr($number,1,strlen($number));
50 | } elseif (strlen($number) == 12) {
51 | $number = substr($number,2,strlen($number));
52 | }
53 |
54 | if (substr($number, 0, 1) != "5") {
55 | return "numbererror";
56 | }
57 | return $number;
58 | }
59 |
60 | //You can spesifically convert your message
61 | function utilmessage($message){
62 | return $message;
63 | }
64 | }
65 |
66 | return array(
67 | 'value' => 'ucuzsmsal',
68 | 'label' => 'Ucuz Sms Al',
69 | 'fields' => array(
70 | 'user','pass'
71 | )
72 | );
--------------------------------------------------------------------------------
/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 | $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` IN (SELECT userid FROM tblorders WHERE id = '".$args['orderid']."')
32 | AND `b`.`fieldid` = '".$settings['gsmnumberfield']."'
33 | AND `c`.`fieldid` = '".$settings['wantsmsfield']."'
34 | AND `c`.`value` = 'on'
35 | LIMIT 1";
36 |
37 | $result = mysql_query($userSql);
38 | $num_rows = mysql_num_rows($result);
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['orderid']);
45 | $message = str_replace($replacefrom,$replaceto,$template['template']);
46 |
47 |
48 | $class->setGsmnumber($UserInformation['gsmnumber']);
49 | $class->setUserid($UserInformation['id']);
50 | $class->setMessage($message);
51 | $class->send();
52 | }
53 | }
54 | }
55 |
56 | return $hook;
--------------------------------------------------------------------------------
/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 | $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 | if($num_rows == 1){
39 | $UserInformation = mysql_fetch_assoc($result);
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 | $class->setGsmnumber($UserInformation['gsmnumber']);
46 | $class->setUserid($UserInformation['id']);
47 | $class->setMessage($message);
48 | $class->send();
49 | }
50 | }
51 | }
52 |
53 | return $hook;
--------------------------------------------------------------------------------
/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 | $class = new AktuelSms();
18 | $template = $class->getTemplateDetails(__FUNCTION__);
19 |
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 tbltickets WHERE id = '".$args['ticketid']."')
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'],$args['subject']);
44 | $message = str_replace($replacefrom,$replaceto,$template['template']);
45 | $class->setGsmnumber($UserInformation['gsmnumber']);
46 | $class->setMessage($message);
47 | $class->setUserid($UserInformation['id']);
48 | $class->send();
49 | }
50 | }
51 | }
52 |
53 | return $hook;
54 |
--------------------------------------------------------------------------------
/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 | $class = new AktuelSms();
18 | $template = $class->getTemplateDetails(__FUNCTION__);
19 |
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.tid,b.id as userid,b.firstname,b.lastname,`c`.`value` as `gsmnumber` FROM `tbltickets` 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['ticketid']."'
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'],$UserInformation['tid']);
47 | $message = str_replace($replacefrom,$replaceto,$template['template']);
48 | $class->setGsmnumber($UserInformation['gsmnumber']);
49 | $class->setMessage($message);
50 | $class->setUserid($UserInformation['userid']);
51 | $class->send();
52 | }
53 | }
54 | }
55 |
56 | return $hook;
57 |
--------------------------------------------------------------------------------
/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)";
--------------------------------------------------------------------------------
/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 | $class = new AktuelSms();
17 | $template = $class->getTemplateDetails(__FUNCTION__);
18 | if($template['active'] == 0){
19 | return null;
20 | }
21 | $settings = $class->getSettings();
22 | if(!$settings['api'] || !$settings['apiparams'] || !$settings['gsmnumberfield'] || !$settings['wantsmsfield']){
23 | return null;
24 | }
25 |
26 | $userSql = "SELECT `a`.`id`,`a`.`firstname`, `a`.`lastname`, `b`.`value` as `gsmnumber`
27 | FROM `tblclients` as `a`
28 | JOIN `tblcustomfieldsvalues` as `b` ON `b`.`relid` = `a`.`id`
29 | JOIN `tblcustomfieldsvalues` as `c` ON `c`.`relid` = `a`.`id`
30 | WHERE `a`.`id` = '".$args['params']['userid']."'
31 | AND `b`.`fieldid` = '".$settings['gsmnumberfield']."'
32 | AND `c`.`fieldid` = '".$settings['wantsmsfield']."'
33 | AND `c`.`value` = 'on'
34 | LIMIT 1";
35 | $result = mysql_query($userSql);
36 | $num_rows = mysql_num_rows($result);
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'],$args['params']['sld'].".".$args['params']['tld']);
43 | $message = str_replace($replacefrom,$replaceto,$template['template']);
44 |
45 | $class->setGsmnumber($UserInformation['gsmnumber']);
46 | $class->setUserid($args['params']['userid']);
47 | $class->setMessage($message);
48 | $class->send();
49 | }
50 | }
51 | }
52 |
53 | return $hook;
54 |
--------------------------------------------------------------------------------
/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 | $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 = "
28 | SELECT a.duedate,b.id as userid,b.firstname,b.lastname,`c`.`value` as `gsmnumber` FROM `tblinvoices` as `a`
29 | JOIN tblclients as b ON b.id = a.userid
30 | JOIN `tblcustomfieldsvalues` as `c` ON `c`.`relid` = `a`.`userid`
31 | JOIN `tblcustomfieldsvalues` as `d` ON `d`.`relid` = `a`.`userid`
32 | WHERE a.id = '".$args['invoiceid']."'
33 | AND `c`.`fieldid` = '".$settings['gsmnumberfield']."'
34 | AND `d`.`fieldid` = '".$settings['wantsmsfield']."'
35 | AND `d`.`value` = 'on'
36 | LIMIT 1
37 | ";
38 |
39 | $result = mysql_query($userSql);
40 | $num_rows = mysql_num_rows($result);
41 | if($num_rows == 1){
42 | $UserInformation = mysql_fetch_assoc($result);
43 |
44 | $template['variables'] = str_replace(" ","",$template['variables']);
45 | $replacefrom = explode(",",$template['variables']);
46 | $replaceto = array($UserInformation['firstname'],$UserInformation['lastname'],$class->changeDateFormat($UserInformation['duedate']),$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 |
--------------------------------------------------------------------------------
/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 | $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 |
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']);
52 | $message = str_replace($replacefrom,$replaceto,$template['template']);
53 |
54 | $class->setGsmnumber($UserInformation['gsmnumber']);
55 | $class->setUserid($args['params']['clientsdetails']['userid']);
56 | $class->setMessage($message);
57 | $class->send();
58 | }
59 | }
60 | }
61 |
62 | return $hook;
--------------------------------------------------------------------------------
/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 | $type = $args['params']['producttype'];
17 |
18 | if($type == "hostingaccount"){
19 | $class = new AktuelSms();
20 | $template = $class->getTemplateDetails(__FUNCTION__);
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 | }else{
29 | return null;
30 | }
31 |
32 | $userSql = "SELECT `a`.`id`,`a`.`firstname`, `a`.`lastname`, `b`.`value` as `gsmnumber`
33 | FROM `tblclients` as `a`
34 | JOIN `tblcustomfieldsvalues` as `b` ON `b`.`relid` = `a`.`id`
35 | JOIN `tblcustomfieldsvalues` as `c` ON `c`.`relid` = `a`.`id`
36 | WHERE `a`.`id` = '".$args['params']['clientsdetails']['userid']."'
37 | AND `b`.`fieldid` = '".$settings['gsmnumberfield']."'
38 | AND `c`.`fieldid` = '".$settings['wantsmsfield']."'
39 | AND `c`.`value` = 'on'
40 | LIMIT 1";
41 |
42 | $result = mysql_query($userSql);
43 | $num_rows = mysql_num_rows($result);
44 | if($num_rows == 1){
45 | $UserInformation = mysql_fetch_assoc($result);
46 |
47 | $template['variables'] = str_replace(" ","",$template['variables']);
48 | $replacefrom = explode(",",$template['variables']);
49 | $replaceto = array($UserInformation['firstname'],$UserInformation['lastname'],$args['params']['domain']);
50 | $message = str_replace($replacefrom,$replaceto,$template['template']);
51 |
52 | $class->setGsmnumber($UserInformation['gsmnumber']);
53 | $class->setUserid($args['params']['clientsdetails']['userid']);
54 | $class->setMessage($message);
55 | $class->send();
56 | }
57 | }
58 | }
59 | return $hook;
--------------------------------------------------------------------------------
/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 | $type = $args['params']['producttype'];
17 |
18 | if($type == "hostingaccount"){
19 | $class = new AktuelSms();
20 | $template = $class->getTemplateDetails(__FUNCTION__);
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 | }else{
29 | return null;
30 | }
31 |
32 | $userSql = "SELECT `a`.`id`,`a`.`firstname`, `a`.`lastname`, `b`.`value` as `gsmnumber`
33 | FROM `tblclients` as `a`
34 | JOIN `tblcustomfieldsvalues` as `b` ON `b`.`relid` = `a`.`id`
35 | JOIN `tblcustomfieldsvalues` as `c` ON `c`.`relid` = `a`.`id`
36 | WHERE `a`.`id` = '".$args['params']['clientsdetails']['userid']."'
37 | AND `b`.`fieldid` = '".$settings['gsmnumberfield']."'
38 | AND `c`.`fieldid` = '".$settings['wantsmsfield']."'
39 | AND `c`.`value` = 'on'
40 | LIMIT 1";
41 |
42 | $result = mysql_query($userSql);
43 | $num_rows = mysql_num_rows($result);
44 | if($num_rows == 1){
45 | $UserInformation = mysql_fetch_assoc($result);
46 |
47 | $template['variables'] = str_replace(" ","",$template['variables']);
48 | $replacefrom = explode(",",$template['variables']);
49 | $replaceto = array($UserInformation['firstname'],$UserInformation['lastname'],$args['params']['domain']);
50 | $message = str_replace($replacefrom,$replaceto,$template['template']);
51 |
52 | $class->setGsmnumber($UserInformation['gsmnumber']);
53 | $class->setUserid($args['params']['clientsdetails']['userid']);
54 | $class->setMessage($message);
55 | $class->send();
56 | }
57 | }
58 | }
59 | return $hook;
60 |
--------------------------------------------------------------------------------
/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)";
--------------------------------------------------------------------------------
/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'] = "Developed By EvMak Tanzania Thanks to Aktüel - 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)";
--------------------------------------------------------------------------------
/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 | $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 = "
28 | SELECT a.total,a.duedate,b.id as userid,b.firstname,b.lastname,`c`.`value` as `gsmnumber` FROM `tblinvoices` as `a`
29 | JOIN tblclients as b ON b.id = a.userid
30 | JOIN `tblcustomfieldsvalues` as `c` ON `c`.`relid` = `a`.`userid`
31 | JOIN `tblcustomfieldsvalues` as `d` ON `d`.`relid` = `a`.`userid`
32 | WHERE a.id = '".$args['invoiceid']."'
33 | AND `c`.`fieldid` = '".$settings['gsmnumberfield']."'
34 | AND `d`.`fieldid` = '".$settings['wantsmsfield']."'
35 | AND `d`.`value` = 'on'
36 | LIMIT 1
37 | ";
38 |
39 | $result = mysql_query($userSql);
40 | $num_rows = mysql_num_rows($result);
41 | if($num_rows == 1){
42 | $UserInformation = mysql_fetch_assoc($result);
43 | $template['variables'] = str_replace(" ","",$template['variables']);
44 | $replacefrom = explode(",",$template['variables']);
45 | $replaceto = array($UserInformation['firstname'],$UserInformation['lastname'],$class->changeDateFormat($UserInformation['duedate']),$UserInformation['total'],$args['invoiceid']);
46 | $message = str_replace($replacefrom,$replaceto,$template['template']);
47 |
48 | $class->setGsmnumber($UserInformation['gsmnumber']);
49 | $class->setMessage($message);
50 | $class->setUserid($UserInformation['userid']);
51 | $class->send();
52 | }
53 | }
54 | }
55 |
56 | return $hook;
57 |
--------------------------------------------------------------------------------
/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 | if($args['type'] == "reminder"){
19 | $class = new AktuelSms();
20 | $template = $class->getTemplateDetails(__FUNCTION__);
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 | }else{
29 | return false;
30 | }
31 |
32 | $userSql = "
33 | SELECT a.duedate,b.id as userid,b.firstname,b.lastname,`c`.`value` as `gsmnumber` FROM `tblinvoices` as `a`
34 | JOIN tblclients as b ON b.id = a.userid
35 | JOIN `tblcustomfieldsvalues` as `c` ON `c`.`relid` = `a`.`userid`
36 | JOIN `tblcustomfieldsvalues` as `d` ON `d`.`relid` = `a`.`userid`
37 | WHERE a.id = '".$args['invoiceid']."'
38 | AND `c`.`fieldid` = '".$settings['gsmnumberfield']."'
39 | AND `d`.`fieldid` = '".$settings['wantsmsfield']."'
40 | AND `d`.`value` = 'on'
41 | LIMIT 1
42 | ";
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 | $template['variables'] = str_replace(" ","",$template['variables']);
49 | $replacefrom = explode(",",$template['variables']);
50 | $replaceto = array($UserInformation['firstname'],$UserInformation['lastname'],$class->changeDateFormat($UserInformation['duedate']));
51 | $message = str_replace($replacefrom,$replaceto,$template['template']);
52 |
53 | $class->setGsmnumber($UserInformation['gsmnumber']);
54 | $class->setMessage($message);
55 | $class->setUserid($UserInformation['userid']);
56 | $class->send();
57 | }
58 | }
59 | }
60 |
61 | return $hook;
--------------------------------------------------------------------------------
/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 | $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'],$args['params']['username'],$args['params']['password']);
51 | $message = str_replace($replacefrom,$replaceto,$template['template']);
52 |
53 |
54 | $class->setGsmnumber($UserInformation['gsmnumber']);
55 | $class->setUserid($args['params']['clientsdetails']['userid']);
56 | $class->setMessage($message);
57 | $class->send();
58 | }
59 | }
60 | }
61 | return $hook;
62 |
--------------------------------------------------------------------------------
/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 | $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'],$args['params']['username'],$args['params']['password']);
51 | $message = str_replace($replacefrom,$replaceto,$template['template']);
52 |
53 |
54 | $class->setGsmnumber($UserInformation['gsmnumber']);
55 | $class->setUserid($args['params']['clientsdetails']['userid']);
56 | $class->setMessage($message);
57 | $class->send();
58 | }
59 | }
60 | }
61 | return $hook;
62 |
--------------------------------------------------------------------------------
/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 | if($args['type'] == "firstoverdue"){
19 | $class = new AktuelSms();
20 | $template = $class->getTemplateDetails(__FUNCTION__);
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 | }else{
29 | return false;
30 | }
31 |
32 | $userSql = "
33 | SELECT a.duedate,b.id as userid,b.firstname,b.lastname,`c`.`value` as `gsmnumber` FROM `tblinvoices` as `a`
34 | JOIN tblclients as b ON b.id = a.userid
35 | JOIN `tblcustomfieldsvalues` as `c` ON `c`.`relid` = `a`.`userid`
36 | JOIN `tblcustomfieldsvalues` as `d` ON `d`.`relid` = `a`.`userid`
37 | WHERE a.id = '".$args['invoiceid']."'
38 | AND `c`.`fieldid` = '".$settings['gsmnumberfield']."'
39 | AND `d`.`fieldid` = '".$settings['wantsmsfield']."'
40 | AND `d`.`value` = 'on'
41 | LIMIT 1
42 | ";
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 | $template['variables'] = str_replace(" ","",$template['variables']);
49 | $replacefrom = explode(",",$template['variables']);
50 | $replaceto = array($UserInformation['firstname'],$UserInformation['lastname'],$class->changeDateFormat($UserInformation['duedate']));
51 |
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;
--------------------------------------------------------------------------------
/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 | if($args['type'] == "thirdoverdue"){
19 | $class = new AktuelSms();
20 | $template = $class->getTemplateDetails(__FUNCTION__);
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 | }else{
29 | return false;
30 | }
31 |
32 | $userSql = "
33 | SELECT a.duedate,b.id as userid,b.firstname,b.lastname,`c`.`value` as `gsmnumber` FROM `tblinvoices` as `a`
34 | JOIN tblclients as b ON b.id = a.userid
35 | JOIN `tblcustomfieldsvalues` as `c` ON `c`.`relid` = `a`.`userid`
36 | JOIN `tblcustomfieldsvalues` as `d` ON `d`.`relid` = `a`.`userid`
37 | WHERE a.id = '".$args['invoiceid']."'
38 | AND `c`.`fieldid` = '".$settings['gsmnumberfield']."'
39 | AND `d`.`fieldid` = '".$settings['wantsmsfield']."'
40 | AND `d`.`value` = 'on'
41 | LIMIT 1
42 | ";
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'],$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;
63 |
--------------------------------------------------------------------------------
/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 | if($args['type'] == "secondoverdue"){
19 | $class = new AktuelSms();
20 | $template = $class->getTemplateDetails(__FUNCTION__);
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 | }else{
29 | return false;
30 | }
31 |
32 | $userSql = "
33 | SELECT a.duedate,b.id as userid,b.firstname,b.lastname,`c`.`value` as `gsmnumber` FROM `tblinvoices` as `a`
34 | JOIN tblclients as b ON b.id = a.userid
35 | JOIN `tblcustomfieldsvalues` as `c` ON `c`.`relid` = `a`.`userid`
36 | JOIN `tblcustomfieldsvalues` as `d` ON `d`.`relid` = `a`.`userid`
37 | WHERE a.id = '".$args['invoiceid']."'
38 | AND `c`.`fieldid` = '".$settings['gsmnumberfield']."'
39 | AND `d`.`fieldid` = '".$settings['wantsmsfield']."'
40 | AND `d`.`value` = 'on'
41 | LIMIT 1
42 | ";
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'],$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;
63 |
--------------------------------------------------------------------------------
/senders/hemenposta.php:
--------------------------------------------------------------------------------
1 | message = $this->utilmessage($message);
6 | $this->gsmnumber = $this->utilgsmnumber($gsmnumber);
7 | }
8 |
9 | function send(){
10 | if($this->gsmnumber == "numbererror"){
11 | $log[] = ("Number format error.".$this->gsmnumber);
12 | $error[] = ("Number format error.".$this->gsmnumber);
13 | return null;
14 | }
15 |
16 | $params = $this->getParams();
17 |
18 | $postUrl = "http://sms.modexi.com/service/sendxml";
19 | $xmlString="
", " ", $result);
86 | $result = "$result | $result2[1] TL";
87 |
88 | return $result;
89 | }else{
90 | return null;
91 | }
92 | }
93 |
94 | function report($msgid){
95 | $params = $this->getParams();
96 |
97 | if($params->user && $params->pass && $msgid){
98 | $url = "http://api.netgsm.com.tr/httpbulkrapor.asp?usercode=$params->user&password=$params->pass&bulkid=$msgid&type=0&status=";
99 | //status değiştiriliyor
100 | $url1 = $url."1";
101 | $result = file_get_contents($url1);
102 | if($result != "30" && $result != "60"){
103 | return "success";
104 | }else{
105 | return "error";
106 | }
107 | }else{
108 | return null;
109 | }
110 | }
111 |
112 | function utilgsmnumber($number){
113 | if (strlen($number) == 10) {
114 | $number = '90' . $number;
115 | } elseif (strlen($number) == 11) {
116 | $number = '9' . $number;
117 | }
118 |
119 | if (substr($number, 0, 3) != "905") {
120 | return "error";
121 | }
122 |
123 | return $number;
124 | }
125 |
126 | //You can spesifically convert your message
127 | function utilmessage($message){
128 | $changefrom = array('ı', 'İ', 'ü', 'Ü', 'ö', 'Ö', 'ğ', 'Ğ', 'ç', 'Ç','ş','Ş');
129 | $changeto = array('i', 'I', 'u', 'U', 'o', 'O', 'g', 'G', 'c', 'C','s','S');
130 | $message = str_replace($changefrom, $changeto, $message);
131 | return $message;
132 | }
133 | }
134 |
135 | return array(
136 | 'value' => 'netgsm',
137 | 'label' => 'NetGsm',
138 | 'fields' => array(
139 | 'user','pass'
140 | )
141 | );
142 |
--------------------------------------------------------------------------------
/senders/smsgateway.php:
--------------------------------------------------------------------------------
1 | message = $this->utilmessage($message);
10 | $this->gsmnumber = $this->utilgsmnumber($gsmnumber);
11 | }
12 |
13 | function createContact ($name,$number) {
14 | return $this->makeRequest('/api/v3/contacts/create','POST',['name' => $name, 'number' => $number]);
15 | }
16 |
17 | function getContacts ($page=1) {
18 | return $this->makeRequest('/api/v3/contacts','GET',['page' => $page]);
19 | }
20 |
21 | function getContact ($id) {
22 | return $this->makeRequest('/api/v3/contacts/view/'.$id,'GET');
23 | }
24 |
25 |
26 | function getDevices ($page=1)
27 | {
28 | return $this->makeRequest('/api/v3/devices','GET',['page' => $page]);
29 | }
30 |
31 | function getDevice ($id)
32 | {
33 | return $this->makeRequest('/api/v3/devices/view/'.$id,'GET');
34 | }
35 |
36 | function getMessages($page=1)
37 | {
38 | return $this->makeRequest('/api/v3/messages','GET',['page' => $page]);
39 | }
40 |
41 | function getSingleMessage($id)
42 | {
43 | return $this->makeRequest('/api/v3/messages/view/'.$id,'GET');
44 | }
45 |
46 | function sendMessageToNumber($to, $message, $device, $options=[]) {
47 | $query = array_merge(['number'=>$to, 'message'=>$message, 'device' => $device], $options);
48 | return $this->makeRequest('/api/v3/messages/send','POST',$query);
49 | }
50 |
51 | function sendMessageToManyNumbers ($to, $message, $device, $options=[]) {
52 | $query = array_merge(['number'=>$to, 'message'=>$message, 'device' => $device], $options);
53 | return $this->makeRequest('/api/v3/messages/send','POST', $query);
54 | }
55 |
56 | function sendMessageToContact ($to, $message, $device, $options=[]) {
57 | $query = array_merge(['contact'=>$to, 'message'=>$message, 'device' => $device], $options);
58 | return $this->makeRequest('/api/v3/messages/send','POST', $query);
59 | }
60 |
61 | function sendMessageToManyContacts ($to, $message, $device, $options=[]) {
62 | $query = array_merge(['contact'=>$to, 'message'=>$message, 'device' => $device], $options);
63 | return $this->makeRequest('/api/v3/messages/send','POST', $query);
64 | }
65 |
66 | function sendManyMessages ($data) {
67 | $query['data'] = $data;
68 | return $this->makeRequest('/api/v3/messages/send','POST', $query);
69 | }
70 |
71 | private function makeRequest ($url, $method, $fields=[]) {
72 | $params = $this->getParams();
73 |
74 | $fields['email'] = $params->email;
75 | $fields['password'] = $params->pass;
76 |
77 | $url = smsGateway::$baseUrl.$url;
78 |
79 | $fieldsString = http_build_query($fields);
80 |
81 |
82 | $ch = curl_init();
83 |
84 | if($method == 'POST')
85 | {
86 | curl_setopt($ch,CURLOPT_POST, count($fields));
87 | curl_setopt($ch,CURLOPT_POSTFIELDS, $fieldsString);
88 | }
89 | else
90 | {
91 | $url .= '?'.$fieldsString;
92 | }
93 |
94 | curl_setopt($ch, CURLOPT_URL,$url);
95 | curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
96 | curl_setopt($ch, CURLOPT_HEADER , false); // we want headers
97 | curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
98 |
99 | $result = curl_exec ($ch);
100 |
101 | $return['response'] = json_decode($result,true);
102 |
103 | if($return['response'] == false)
104 | $return['response'] = $result;
105 |
106 | $return['status'] = curl_getinfo($ch, CURLINFO_HTTP_CODE);
107 |
108 | curl_close ($ch);
109 |
110 | return $return;
111 | }
112 |
113 |
114 | function send(){
115 |
116 | if($this->gsmnumber == "numbererror"){
117 | $log[] = ("Number format error.".$this->gsmnumber);
118 | $error[] = ("Number format error.".$this->gsmnumber);
119 | return null;
120 | }
121 | $params = $this->getParams();
122 |
123 | // check list of devices and get the first one:
124 | $getDevicesresult = $this->getDevices();
125 | $json_string = json_encode($getDevicesresult, JSON_PRETTY_PRINT);
126 | $deviceID = $getDevicesresult['response']['result']['data'][0]['id'];
127 | if (!$deviceID) {
128 | $log[] = "Can not get deviceID. error : ".$json_string;
129 | $error[] = "Can not get deviceID. error: ".$json_string;
130 | }
131 |
132 | // the mess number and content:
133 | $number = $this->gsmnumber;
134 | $message = $this->message;
135 | $options = [
136 | 'expires_at' => strtotime('+20 minutes') // Cancel the message in 1 hour if the message is not yet sent
137 | ];
138 |
139 | // call API to send message:
140 | $result = $this->sendMessageToNumber($number, $message, $deviceID, $options);
141 | $json_string = json_encode($result, JSON_PRETTY_PRINT);
142 |
143 | $log[] = "Request send message: ".$message . 'to number: '.$number;
144 |
145 | $return = $result;
146 | $log[] = "smsGateway server response returned: ".$json_string;
147 |
148 |
149 | if ($result['response']['success']) {
150 | $this->addLog("Call API success.");
151 | $log[] = "Call API success.";
152 | $Status = $result['response']['result']['success'][0]['status'];
153 | $send_at = date('Y-m-d h:i:s',$result['response']['result']['success'][0]['send_at']);
154 |
155 | if ($result['response']['result']['success']['error']=="") {
156 | $messid = $result['response']['result']['success'][0]['id'];
157 | $this->addLog("Message id: " . $messid . " was sent at" . $send_at . " Status: ".$Status);
158 | $log[] = "Message id: " . $messid . " sent at: " . $send_at . " Status: ".$Status;
159 | }elseif($result['response']['result']['fails']['errors']) {
160 | $error = json_encode($result['response']['result']['fails']['errors'], JSON_PRETTY_PRINT);
161 | $log[] = "Error when sending message. error : ".$error;
162 | $error[] = "An error occurred while sending messages. error: ".$error;
163 | }else{
164 | $log[] = "Unable to send message. error : ".$json_string;
165 | $error[] = "An error occurred while sending messages. error: ".$json_string;
166 | }
167 | }else{
168 | $log[] = "Unable to send message. error : ".$json_string;
169 | $error[] = "An error occurred while sending messages. error: ".$json_string;
170 | }
171 | return array(
172 | 'log' => $log,
173 | 'error' => $error,
174 | 'msgid' => $messid,
175 | );
176 | }
177 |
178 | function balance(){
179 | // check list of devices and get the first one:
180 | $getDevicesresult = $this->getDevices();
181 | $DeviceID = $getDevicesresult['response']['result']['data'][0]['id'];
182 | $Devicename = $getDevicesresult['response']['result']['data'][0]['name'];
183 | $Devicemake = $getDevicesresult['response']['result']['data'][0]['make'];
184 | $Devicemodel = $getDevicesresult['response']['result']['data'][0]['model'];
185 | $Devicenumber = $getDevicesresult['response']['result']['data'][0]['number'];
186 | $battery = $getDevicesresult['response']['result']['data'][0]['battery'];
187 | $Devicesignal = $getDevicesresult['response']['result']['data'][0]['signal'];
188 | $Devicewifi = $getDevicesresult['response']['result']['data'][0]['wifi'];
189 | $device_info = 'ID: '.$DeviceID.' | '.'Name: '.$Devicename. ' '.$Devicemake.' '.$Devicemodel.' | '.'Number: '.$Devicenumber.' | '.'Battery: '.$battery.' | '.'Devicesignal: '.$Devicesignal.' | '.'Devicewifi: '.$Devicewifi;
190 |
191 | if ($device_info) {
192 | return $device_info;
193 | }else {
194 | return 'Can not get Device\'s info';
195 | }
196 | }
197 |
198 | function report($msgid){
199 | $id = $msgid;
200 | $result = $this->getSingleMessage($id);
201 |
202 | if ($result['response']['success']) {
203 | $status = $result['response']['result']['status'];
204 | // $report = 'Status: ' . $status . '. Error' . $result['response']['result']['error'];
205 | return $status;
206 | }else {
207 | return 'Unknown';
208 | }
209 | }
210 |
211 | function utilgsmnumber($number){
212 | $params = $this->getParams();
213 | $countrycode = $params->countrycode;
214 | $Cnumber = $countrycode . substr($number, 1);
215 | return $Cnumber;
216 | }
217 |
218 | function utilmessage($message){
219 | // $params = $this->getParams();
220 | // $sign = $params->sign
221 | // $message = $message . ' ' . $sign
222 | return $message;
223 | }
224 | }
225 |
226 | return array(
227 | 'value' => 'smsgateway',
228 | 'label' => 'SMS Gateway',
229 | 'fields' => array(
230 | 'email','pass','countrycode'
231 | )
232 | );
233 |
--------------------------------------------------------------------------------
/smsclass.php:
--------------------------------------------------------------------------------
1 | gsmnumber = $this->util_gsmnumber($gsmnumber);
27 | }
28 |
29 | /**
30 | * @return mixed
31 | */
32 | public function getGsmnumber(){
33 | return $this->gsmnumber;
34 | }
35 |
36 | /**
37 | * @param mixed $message
38 | */
39 | public function setMessage($message){
40 | $this->message = $this->util_convert($message);
41 | }
42 |
43 | /**
44 | * @return mixed
45 | */
46 | public function getMessage(){
47 | return $this->message;
48 | }
49 |
50 | /**
51 | * @param int $userid
52 | */
53 | public function setUserid($userid){
54 | $this->userid = $userid;
55 | }
56 |
57 | /**
58 | * @return int
59 | */
60 | public function getUserid(){
61 | return $this->userid;
62 | }
63 |
64 | /**
65 | * @return array
66 | */
67 | public function getParams(){
68 | $settings = $this->getSettings();
69 | $params = json_decode($settings['apiparams']);
70 | return $params;
71 | }
72 |
73 | /**
74 | * @return mixed
75 | */
76 | public function getSender(){
77 | $settings = $this->getSettings();
78 | if(!$settings['api']){
79 | $this->addError("Geçerli bir api seçilmedi");
80 | $this->addLog("Geçerli bir api seçilmedi");
81 | return false;
82 | }else{
83 | return $settings['api'];
84 | }
85 | }
86 |
87 | /**
88 | * @return array
89 | */
90 | public function getSettings(){
91 | $result = select_query("mod_aktuelsms_settings", "*");
92 | return mysql_fetch_array($result);
93 | }
94 |
95 | function send(){
96 | $sender_function = strtolower($this->getSender());
97 | if($sender_function == false){
98 | return false;
99 | }else{
100 | $params = $this->getParams();
101 | $message = $this->message;
102 | $message .= " ".$params->signature;
103 |
104 | $this->addLog("Params: ".json_encode($params));
105 | $this->addLog("To: ".$this->getGsmnumber());
106 | $this->addLog("Message: ".$message);
107 | $this->addLog("SenderClass: ".$sender_function);
108 |
109 | include_once("senders/".$sender_function.".php");
110 | $sender = new $sender_function(trim($message),$this->getGsmnumber());
111 | $result = $sender->send();
112 |
113 | foreach($result['log'] as $log){
114 | $this->addLog($log);
115 | }
116 | if($result['error']){
117 | foreach($result['error'] as $error){
118 | $this->addError($error);
119 | }
120 |
121 | $this->saveToDb($result['msgid'],'error',$this->getErrors(),$this->getLogs());
122 | return false;
123 | }else{
124 | $this->saveToDb($result['msgid'],'',null,$this->getLogs());
125 | return true;
126 | }
127 | }
128 | }
129 |
130 | function getBalance(){
131 | $sender_function = strtolower($this->getSender());
132 | if($sender_function == false){
133 | return false;
134 | }else{
135 | include_once("senders/".$sender_function.".php");
136 | $sender = new $sender_function("","");
137 | return $sender->balance();
138 | }
139 | }
140 |
141 | function getReport($msgid){
142 | $result = mysql_query("SELECT sender FROM mod_aktuelsms_messages WHERE msgid = '$msgid' LIMIT 1");
143 | $result = mysql_fetch_array($result);
144 |
145 | $sender_function = strtolower($result['sender']);
146 | if($sender_function == false){
147 | return false;
148 | }else{
149 | include_once("senders/".$sender_function.".php");
150 | $sender = new $sender_function("","");
151 | return $sender->report($msgid);
152 | }
153 | }
154 |
155 | function getSenders(){
156 | if ($handle = opendir(dirname(__FILE__).'/senders')) {
157 | while (false !== ($entry = readdir($handle))) {
158 | if(substr($entry,strlen($entry)-4,strlen($entry)) == ".php"){
159 | $file[] = require_once('senders/'.$entry);
160 | }
161 | }
162 | closedir($handle);
163 | }
164 | return $file;
165 | }
166 |
167 | function getHooks(){
168 | if ($handle = opendir(dirname(__FILE__).'/hooks')) {
169 | while (false !== ($entry = readdir($handle))) {
170 | if(substr($entry,strlen($entry)-4,strlen($entry)) == ".php"){
171 | $file[] = require_once('hooks/'.$entry);
172 | }
173 | }
174 | closedir($handle);
175 | }
176 | return $file;
177 | }
178 |
179 | function saveToDb($msgid,$status,$errors = null,$logs = null){
180 | $now = date("Y-m-d H:i:s");
181 | $table = "mod_aktuelsms_messages";
182 | $values = array(
183 | "sender" => $this->getSender(),
184 | "to" => $this->getGsmnumber(),
185 | "text" => $this->getMessage(),
186 | "msgid" => $msgid,
187 | "status" => $status,
188 | "errors" => $errors,
189 | "logs" => $logs,
190 | "user" => $this->getUserid(),
191 | "datetime" => $now
192 | );
193 | insert_query($table, $values);
194 |
195 | $this->addLog("Mesaj veritabanına kaydedildi");
196 | }
197 |
198 | /* Main message convert function. Will be removed next release */
199 | function util_convert($message){
200 | $changefrom = array('ı', 'İ', 'ü', 'Ü', 'ö', 'Ö', 'ğ', 'Ğ', 'ç', 'Ç','ş','Ş');
201 | $changeto = array('i', 'I', 'u', 'U', 'o', 'O', 'g', 'G', 'c', 'C','s','S');
202 | return str_replace($changefrom, $changeto, $message);
203 | }
204 |
205 | /* Default number format */
206 | function util_gsmnumber($number){
207 | $replacefrom = array('-', '(',')', '.', ',', '+', ' ');
208 | $number = str_replace($replacefrom, '', $number);
209 |
210 | return $number;
211 | }
212 |
213 | public function addError($error){
214 | $this->errors[] = $error;
215 | }
216 |
217 | public function addLog($log){
218 | $this->logs[] = $log;
219 | }
220 |
221 | /**
222 | * @return array
223 | */
224 | public function getErrors()
225 | {
226 | $res = '';
227 | foreach($this->errors as $d){
228 | $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 |