[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] sms inc/class.sms.inc.php inc/class.soconfig.in...
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] sms inc/class.sms.inc.php inc/class.soconfig.in... |
Date: |
Thu, 25 May 2006 19:47:10 +0000 |
CVSROOT: /sources/phpgroupware
Module name: sms
Branch:
Changes by: Sigurd Nes <address@hidden> 06/05/25 19:47:10
Modified files:
inc : class.sms.inc.php class.soconfig.inc.php
class.uisms.inc.php config.php
inc/plugin/gateway/gnokii: fn.php
setup : default_records.inc.php setup.inc.php
tables_current.inc.php tables_update.inc.php
Removed files:
inc/plugin/gateway/gnokii: config.php manage.php
Log message:
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/sms/inc/class.sms.inc.php.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/sms/inc/class.soconfig.inc.php.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/sms/inc/class.uisms.inc.php.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/sms/inc/config.php.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/sms/inc/plugin/gateway/gnokii/fn.php.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/sms/setup/default_records.inc.php.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/sms/setup/setup.inc.php.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/sms/setup/tables_current.inc.php.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/sms/setup/tables_update.inc.php.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
Patches:
Index: sms/inc/class.sms.inc.php
diff -u sms/inc/class.sms.inc.php:1.8 sms/inc/class.sms.inc.php:1.9
--- sms/inc/class.sms.inc.php:1.8 Mon May 22 13:31:57 2006
+++ sms/inc/class.sms.inc.php Thu May 25 19:47:10 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package sms
* @subpackage sms
- * @version $Id: class.sms.inc.php,v 1.8 2006/05/22 13:31:57 sigurdne
Exp $
+ * @version $Id: class.sms.inc.php,v 1.9 2006/05/25 19:47:10 sigurdne
Exp $
*/
/**
@@ -26,27 +26,27 @@
// SMS command security parameter
$feat_command_path[bin] = $apps_path[base]."/bin";
- $GLOBALS['phpgw_info']['sms_config']['apps_path'] = $apps_path;
- $GLOBALS['phpgw_info']['sms_config']['feat_command_path'] =
$feat_command_path;
+ $GLOBALS['phpgw_info']['sms_config']['common']['apps_path'] =
$apps_path;
+ $GLOBALS['phpgw_info']['sms_config']['common']['feat_command_path'] =
$feat_command_path;
- if(!$GLOBALS['phpgw_info']['sms_config']['gateway_module'])
+ if(!$GLOBALS['phpgw_info']['sms_config']['common']['gateway_module'])
{
include_once(PHPGW_APP_INC . SEP . 'config.php');
}
- if (file_exists($apps_path[inc] . SEP . 'plugin' . SEP . 'gateway' .
SEP . $GLOBALS['phpgw_info']['sms_config']['gateway_module']. "/fn.php"))
+ if (file_exists($apps_path[inc] . SEP . 'plugin' . SEP . 'gateway' .
SEP . $GLOBALS['phpgw_info']['sms_config']['common']['gateway_module'].
"/fn.php"))
{
- include_once($apps_path[inc] . SEP . 'plugin' . SEP . 'gateway'
. SEP. $GLOBALS['phpgw_info']['sms_config']['gateway_module']. "/fn.php");
+ include_once($apps_path[inc] . SEP . 'plugin' . SEP . 'gateway'
. SEP. $GLOBALS['phpgw_info']['sms_config']['common']['gateway_module'].
"/fn.php");
}
else
{
- if (!$GLOBALS['phpgw_info']['sms_config']['gateway_module'])
+ if
(!$GLOBALS['phpgw_info']['sms_config']['common']['gateway_module'])
{
- die ("ERROR: Gateway module '" .
$GLOBALS['phpgw_info']['sms_config']['gateway_module'] . "' does not exists -
please contact system administrator");
+ die ("ERROR: Gateway module '" .
$GLOBALS['phpgw_info']['sms_config']['common']['gateway_module'] . "' does not
exists - please contact system administrator");
}
else
{
- die("ERROR: No selected gateway module available - please
contact system administrator");
+ die("ERROR: No selected gateway module available -
please contact system administrator");
}
}
@@ -56,14 +56,14 @@
function sms_()
{
- $this->apps_config =
$GLOBALS['phpgw_info']['sms_config']['apps_config'];
- $this->apps_path =
$GLOBALS['phpgw_info']['sms_config']['apps_path'];
- $this->feat_command_path =
$GLOBALS['phpgw_info']['sms_config']['feat_command_path'];
- $this->gateway_module =
$GLOBALS['phpgw_info']['sms_config']['gateway_module'];
- $this->gateway_number =
$GLOBALS['phpgw_info']['sms_config']['gateway_number'];
- $this->web_title =
$GLOBALS['phpgw_info']['sms_config']['web_title'];
- $this->email_service =
$GLOBALS['phpgw_info']['sms_config']['email_service'];
- $this->email_footer =
$GLOBALS['phpgw_info']['sms_config']['email_footer'];
+ $this->apps_config =
$GLOBALS['phpgw_info']['sms_config']['common']['apps_config'];
+ $this->apps_path =
$GLOBALS['phpgw_info']['sms_config']['common']['apps_path'];
+ $this->feat_command_path =
$GLOBALS['phpgw_info']['sms_config']['common']['feat_command_path'];
+ $this->gateway_module =
$GLOBALS['phpgw_info']['sms_config']['common']['gateway_module'];
+ $this->gateway_number =
$GLOBALS['phpgw_info']['sms_config']['common']['gateway_number'];
+ $this->web_title =
$GLOBALS['phpgw_info']['sms_config']['common']['web_title'];
+ $this->email_service =
$GLOBALS['phpgw_info']['sms_config']['common']['email_service'];
+ $this->email_footer =
$GLOBALS['phpgw_info']['sms_config']['common']['email_footer'];
$this->reserved_codes =
$GLOBALS['phpgw_info']['sms_config']['reserved_codes'];
Index: sms/inc/class.soconfig.inc.php
diff -u sms/inc/class.soconfig.inc.php:1.3 sms/inc/class.soconfig.inc.php:1.4
--- sms/inc/class.soconfig.inc.php:1.3 Wed May 24 13:32:33 2006
+++ sms/inc/class.soconfig.inc.php Thu May 25 19:47:10 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package sms
* @subpackage config
- * @version $Id: class.soconfig.inc.php,v 1.3 2006/05/24 13:32:33
sigurdne Exp $
+ * @version $Id: class.soconfig.inc.php,v 1.4 2006/05/25 19:47:10
sigurdne Exp $
*/
/**
@@ -22,6 +22,7 @@
var $db;
var $db2;
var $account;
+ var $config_data;
function soconfig()
{
@@ -36,6 +37,31 @@
$this->like = $this->db->like;
}
+
+ function read_repository()
+ {
+ $sql = "SELECT phpgw_sms_config_type.name as type,
value as config_value, phpgw_sms_config_attrib.name as config_name "
+ . " FROM phpgw_sms_config_value $this->join
phpgw_sms_config_attrib ON "
+ . " phpgw_sms_config_value.attrib_id =
phpgw_sms_config_attrib.id AND "
+ . " phpgw_sms_config_value.type_id =
phpgw_sms_config_attrib.type_id"
+ . " $this->join phpgw_sms_config_type ON
phpgw_sms_config_value.type_id = phpgw_sms_config_type.id";
+
+ $this->db->query($sql,__LINE__,__FILE__);
+ while ($this->db->next_record())
+ {
+ $test =
@unserialize($this->db->f('config_value'));
+ if($test)
+ {
+
$this->config_data[$this->db->f('type')][$this->db->f('config_name')] = $test;
+ }
+ else
+ {
+
$this->config_data[$this->db->f('type')][$this->db->f('config_name')] =
$this->db->f('config_value');
+ }
+ }
+ }
+
+
function read_type($data)
{
if(is_array($data))
Index: sms/inc/class.uisms.inc.php
diff -u sms/inc/class.uisms.inc.php:1.9 sms/inc/class.uisms.inc.php:1.10
--- sms/inc/class.uisms.inc.php:1.9 Tue May 23 13:02:12 2006
+++ sms/inc/class.uisms.inc.php Thu May 25 19:47:10 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package sms
* @subpackage sms
- * @version $Id: class.uisms.inc.php,v 1.9 2006/05/23 13:02:12 sigurdne
Exp $
+ * @version $Id: class.uisms.inc.php,v 1.10 2006/05/25 19:47:10 sigurdne
Exp $
*/
/**
@@ -44,9 +44,9 @@
$this->account =
$GLOBALS['phpgw_info']['user']['account_id'];
$this->bocommon =
CreateObject($this->currentapp.'.bocommon');
// $this->bocategory =
CreateObject($this->currentapp.'.bocategory');
- $this->config =
CreateObject('phpgwapi.config');
+ $this->config =
CreateObject('sms.soconfig');
$this->config->read_repository();
- $this->gateway_number =
$this->config->config_data['gateway_number'];
+ $this->gateway_number =
$this->config->config_data['common']['gateway_number'];
$this->bo =
CreateObject($this->currentapp.'.bosms',False);
$this->acl =
CreateObject('phpgwapi.acl');
$this->menu =
CreateObject($this->currentapp.'.menu');
Index: sms/inc/config.php
diff -u sms/inc/config.php:1.1 sms/inc/config.php:1.2
--- sms/inc/config.php:1.1 Tue May 16 19:45:49 2006
+++ sms/inc/config.php Thu May 25 19:47:10 2006
@@ -3,17 +3,22 @@
$web_title = 'test';
$email_footer = 'Mobile Portal System';
- $config = CreateObject('phpgwapi.config','sms');
+ $config = CreateObject('sms.soconfig');
$config->read_repository();
- $GLOBALS['phpgw_info']['sms_config']['reserved_codes'] =
$config->config_data['reserved_codes'];
+ $GLOBALS['phpgw_info']['sms_config'] = $config->config_data;
+ $reserved_codes = array
("PV","BC","GET","PUT","INFO","SAVE","DEL","LIST","RETR","POP3","SMTP","BROWSE","NEW","SET","POLL","VOTE","REGISTER","REG","DO","USE","EXECUTE","EXEC","RUN","ACK");
+ $GLOBALS['phpgw_info']['sms_config']['reserved_codes'] =
$reserved_codes;
+
+//_debug_array($GLOBALS['phpgw_info']['sms_config']);
+
//$GLOBALS['phpgw_info']['sms_config']['web_title'] =
$config->config_data['web_title'];
- $GLOBALS['phpgw_info']['sms_config']['email_service'] =
$config->config_data['email_service'];
- $GLOBALS['phpgw_info']['sms_config']['email_footer'] =
$config->config_data['email_footer'];
- $GLOBALS['phpgw_info']['sms_config']['datetime_now'] = $datetime_now;
- $GLOBALS['phpgw_info']['sms_config']['gateway_module'] =
$config->config_data['gateway_module'];
- $GLOBALS['phpgw_info']['sms_config']['gateway_number'] =
$config->config_data['gateway_number'];
- $GLOBALS['phpgw_info']['sms_config']['email_footer'] =
$config->config_data['email_footer'];
+ //$GLOBALS['phpgw_info']['sms_config']['email_service'] =
$config->config_data['email_service'];
+ //$GLOBALS['phpgw_info']['sms_config']['email_footer'] =
$config->config_data['email_footer'];
+ //$GLOBALS['phpgw_info']['sms_config']['datetime_now'] = $datetime_now;
+ $GLOBALS['phpgw_info']['sms_config']['gateway_module'] =
$config->config_data['common']['gateway_module'];
+ $GLOBALS['phpgw_info']['sms_config']['gateway_number'] =
$config->config_data['common']['gateway_number'];
+ //$GLOBALS['phpgw_info']['sms_config']['email_footer'] =
$config->config_data['email_footer'];
$GLOBALS['phpgw_info']['sms_config']['gnokii_cfg'] =
$config->config_data['gnokii_cfg'];
?>
Index: sms/inc/plugin/gateway/gnokii/fn.php
diff -u sms/inc/plugin/gateway/gnokii/fn.php:1.3
sms/inc/plugin/gateway/gnokii/fn.php:1.4
--- sms/inc/plugin/gateway/gnokii/fn.php:1.3 Wed May 17 20:23:25 2006
+++ sms/inc/plugin/gateway/gnokii/fn.php Thu May 25 19:47:10 2006
@@ -7,8 +7,8 @@
$this->db = $GLOBALS['phpgw']->db;
$this->db2 = clone($this->db);
$this->sms_();
- $this->gnokii_param[name]=
$GLOBALS['phpgw_info']['sms_config']['gateway_module'];
- $this->gnokii_param[path]=
$GLOBALS['phpgw_info']['sms_config']['gnokii_cfg'];
+ // $this->gnokii_param[name]=
$GLOBALS['phpgw_info']['sms_config']['common']['gateway_module'];
+ $this->gnokii_param[path]=
$GLOBALS['phpgw_info']['sms_config']['gnokii']['gnokii_cfg'];
}
function gw_customcmd()
Index: sms/setup/default_records.inc.php
diff -u sms/setup/default_records.inc.php:1.4
sms/setup/default_records.inc.php:1.5
--- sms/setup/default_records.inc.php:1.4 Thu May 18 13:27:59 2006
+++ sms/setup/default_records.inc.php Thu May 25 19:47:10 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package sms
* @subpackage setup
- * @version $Id: default_records.inc.php,v 1.4 2006/05/18 13:27:59
sigurdne Exp $
+ * @version $Id: default_records.inc.php,v 1.5 2006/05/25 19:47:10
sigurdne Exp $
*/
@@ -17,11 +17,12 @@
* @package property
*/
+
$GLOBALS['phpgw_setup']->oProc->query("DELETE from phpgw_acl_location
WHERE appname ='sms'");
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_acl_location
(appname,id, descr) VALUES ('sms', '.', 'Top')");
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_acl_location
(appname,id, descr, allow_grant) VALUES ('sms', '.inbox', 'InBox',1)");
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_acl_location
(appname,id, descr, allow_grant) VALUES ('sms', '.outbox', 'OutBox',1)");
-
+/*
$GLOBALS['phpgw_setup']->oProc->query("DELETE from phpgw_config WHERE
config_app='sms'");
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_config
(config_app, config_name, config_value) VALUES ('sms','gnokii_cfg',
'/usr/local')");
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_config
(config_app, config_name, config_value) VALUES ('sms','email_service',
'address@hidden')");
@@ -30,13 +31,90 @@
$reserved_codes = serialize(array
("PV","BC","GET","PUT","INFO","SAVE","DEL","LIST","RETR","POP3","SMTP","BROWSE","NEW","SET","POLL","VOTE","REGISTER","REG","DO","USE","EXECUTE","EXEC","RUN","ACK"));
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_config
(config_app, config_name, config_value) VALUES ('sms','reserved_codes',
'$reserved_codes')");
+*/
+// -- start config
+
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_type (id,name, descr) VALUES ('1', 'common', 'common config
values')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_type (id,name, descr) VALUES ('2', 'gnokii', 'The gnokii
Gateway')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_type (id,name, descr) VALUES ('3', 'clickatell', 'The
clickatell Gateway')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_type (id,name, descr) VALUES ('4', 'uplink', 'The Uplink
Gateway')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_type (id,name, descr) VALUES ('5', 'kannel', 'The Kannel
Gateway')");
+
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_attrib (type_id,id,input_type,name, descr) VALUES ('1',
'1','listbox', 'gateway_module', 'Active gateway module')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_attrib (type_id,id,input_type,name, descr) VALUES ('1', '2',
'text', 'gateway_number', 'Gateway number')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_attrib (type_id,id,input_type,name, descr) VALUES ('2', '1',
'text', 'gnokii_cfg', 'Gnokii Installation Path')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_attrib (type_id,id,input_type,name, descr) VALUES (3, 1,
'text', 'api_id', 'Clickatell API ID')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_attrib (type_id,id,input_type,name, descr) VALUES (3, 2,
'text', 'username', 'Clickatell username')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_attrib (type_id,id,input_type,name, descr) VALUES (3, 3,
'text', 'password', 'Clickatell password')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_attrib (type_id,id,input_type,name, descr) VALUES (3, 4,
'text', 'sender', 'Clickatell Global Sender')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_attrib (type_id,id,input_type,name, descr) VALUES (3, 5,
'text', 'send_url', 'Clickatell API URL')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_attrib (type_id,id,input_type,name, descr) VALUES (3, 6,
'text', 'incoming_path', 'Clickatell Incoming Path')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_attrib (type_id,id,input_type,name, descr) VALUES (3, 7,
'text', 'credit', 'What is this')");
+
+
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_attrib (type_id,id,input_type,name, descr) VALUES (4, 1,
'text', 'master', 'Uplink Master URL')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_attrib (type_id,id,input_type,name, descr) VALUES (4, 2,
'text', 'username', 'Uplink username')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_attrib (type_id,id,input_type,name, descr) VALUES (4, 3,
'text', 'password', 'Uplink password')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_attrib (type_id,id,input_type,name, descr) VALUES (4, 4,
'text', 'global_sender', 'Uplink Global Sender')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_attrib (type_id,id,input_type,name, descr) VALUES (4, 5,
'text', 'incoming_path', 'Uplink Incoming Path')");
+
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_attrib (type_id,id,input_type,name, descr) VALUES (5, 1,
'text', 'username', 'Kannel username')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_attrib (type_id,id,input_type,name, descr) VALUES (5, 2,
'text', 'password', 'Kannel password')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_attrib (type_id,id,input_type,name, descr) VALUES (5, 3,
'text', 'global_sender', 'Kannel global sender')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_attrib (type_id,id,input_type,name, descr) VALUES (5, 4,
'text', 'bearerbox_host', 'Kannel bearerbox_host')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_attrib (type_id,id,input_type,name, descr) VALUES (5, 5,
'text', 'sendsms_port', 'Kannel Send SMS Port')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_attrib (type_id,id,input_type,name, descr) VALUES (5, 6,
'text', 'playsms_web', 'Playsms Web URL')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_attrib (type_id,id,input_type,name, descr) VALUES (5, 7,
'text', 'incoming_path', 'Kannel incoming path')");
+
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_choice (type_id,attrib_id,id,value) VALUES (1, 1, 1,
'gnokii')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_choice (type_id,attrib_id,id,value) VALUES (1, 1, 2,
'clickatell')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_choice (type_id,attrib_id,id,value) VALUES (1, 1, 3,
'uplink')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_choice (type_id,attrib_id,id,value) VALUES (1, 1, 4,
'kannel')");
+
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_value (type_id,attrib_id,id,value) VALUES (1, 1, 1,
'gnokii')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_value (type_id,attrib_id,id,value) VALUES (1, 2, 1,
'99999999')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_value (type_id,attrib_id,id,value) VALUES (2, 1, 1,
'/usr/local')");
+
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_value (type_id,attrib_id,id,value) VALUES (3, 1, 1,
'123456')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_value (type_id,attrib_id,id,value) VALUES (3, 2, 1,
'playsms')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_value (type_id,attrib_id,id,value) VALUES (3, 3, 1, 'pwd')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_value (type_id,attrib_id,id,value) VALUES (3, 4, 1,
'PlaySMS')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_value (type_id,attrib_id,id,value) VALUES (3, 5, 1,
'http://api.clickatell.com/http')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_value (type_id,attrib_id,id,value) VALUES (3, 6, 1,
'usr/local')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_value (type_id,attrib_id,id,value) VALUES (3, 7, 1, '10')");
+
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_value (type_id,attrib_id,id,value) VALUES (4, 1, 1,
'http://cpanel.smsrakyat.net')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_value (type_id,attrib_id,id,value) VALUES (4, 2, 1,
'playsms')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_value (type_id,attrib_id,id,value) VALUES (4, 3, 1, 'pwd')");
+
+// $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_value (type_id,attrib_id,id,value) VALUES (4, 4, 1, '')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_value (type_id,attrib_id,id,value) VALUES (4, 5, 1,
'/usr/local')");
+
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_value (type_id,attrib_id,id,value) VALUES (5, 1, 1,
'playsms')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_value (type_id,attrib_id,id,value) VALUES (5, 2, 1, 'pwd')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_value (type_id,attrib_id,id,value) VALUES (5, 3, 1, '92824')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_value (type_id,attrib_id,id,value) VALUES (5, 4, 1,
'127.0.0.1')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_value (type_id,attrib_id,id,value) VALUES (5, 5, 1, '13131')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_value (type_id,attrib_id,id,value) VALUES (5, 6, 1,
'http://localhost/~playsms')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_value (type_id,attrib_id,id,value) VALUES (5, 7, 1,
'/usr/local')");
+
+
+// -- end config
+
+// $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_gwmodclickatell_config
(cfg_name,cfg_api_id,cfg_username,cfg_password,cfg_sender,cfg_send_url,cfg_incoming_path,cfg_credit)
VALUES
('clickatell','123456','playsms','pwd','PlaySMS','http://api.clickatell.com/http','/usr/local',10)");
+// $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_gwmodTemplate_config (cfg_name,cfg_path) VALUES
('template','/usr/local')");
+// $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_gwmodUplink_config
(cfg_name,cfg_master,cfg_username,cfg_password,cfg_global_sender,cfg_incoming_path)
VALUES
('uplink','http://cpanel.smsrakyat.net','playsms','pwd','','/usr/local')");
+// $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_gwmodgnokii_config (cfg_name, cfg_path) VALUES ('gnokii',
'/usr/local')");
+// $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_gwmodkannel_config (cfg_name, cfg_incoming_path, cfg_username,
cfg_password, cfg_global_sender, cfg_bearerbox_host, cfg_sendsms_port,
cfg_playsms_web) VALUES ('kannel', '/usr/local', 'playsms', 'pwd', '92824',
'127.0.0.1', '13131', 'http://localhost/~playsms')");
+// $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_tblconfig_main (cfg_web_title, cfg_email_service, cfg_email_footer,
cfg_gateway_module, cfg_gateway_number) VALUES ('PlaySMS MPS (Mobile Portal
System)', 'address@hidden', 'PlaySMS MPS (Mobile Portal System)', 'gnokii',
'')");
+
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_gwmodUplink (up_local_slid,up_remote_slid,up_status) VALUES
(3,259,1)");
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_featautoreply (uid, autoreply_code) VALUES (1,'HELP')");
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_featautoreply_scenario
(autoreply_id,autoreply_scenario_param1,autoreply_scenario_param2,autoreply_scenario_param3,autoreply_scenario_param4,autoreply_scenario_param5,autoreply_scenario_param6,autoreply_scenario_param7,autoreply_scenario_result)
VALUES (1,'INTERNET','DOWN','','','','','','Please contact sysadmin via phone:
+62 21 8613027')");
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_featautoreply_scenario
(autoreply_id,autoreply_scenario_param1,autoreply_scenario_param2,autoreply_scenario_param3,autoreply_scenario_param4,autoreply_scenario_param5,autoreply_scenario_param6,autoreply_scenario_param7,autoreply_scenario_result)
VALUES (1,'WEBMAIL','PASSWORD','ERROR','','','','','Please use forgot password
link, and follow given instructions')");
-
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_sms_featboard
(uid,board_code,board_forward_email,board_pref_template) VALUES
(1,'PHP','address@hidden','<font color=black
size=-1><b>##SENDER##</b></font><br><font color=black
size=-2><i>##DATETIME##</i></font><br><font color=black
size=-1>##MESSAGE##</font>')");
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_featcommand (uid,command_code,command_exec) VALUES
(1,'UPTIME','/home/playsms/public_html/beta/bin/uptime.sh ##SMSSENDER##')");
@@ -44,38 +122,18 @@
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_sms_featpoll
(uid,poll_title,poll_code,poll_enable) VALUES (1,'Which do you prefer
?','PREFER',1)");
-
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_featpoll_choice (poll_id,choice_title,choice_code) VALUES (1,'Love
Without Sex','LWS')");
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_featpoll_choice (poll_id,choice_title,choice_code) VALUES (1,'Sex
Without Love','SWL')");
- $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_gwmodclickatell_config
(cfg_name,cfg_api_id,cfg_username,cfg_password,cfg_sender,cfg_send_url,cfg_incoming_path,cfg_credit)
VALUES
('clickatell','123456','playsms','pwd','PlaySMS','http://api.clickatell.com/http','/usr/local',10)");
-
- $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_gwmodTemplate_config (cfg_name,cfg_path) VALUES
('template','/usr/local')");
-
- $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_gwmodUplink (up_local_slid,up_remote_slid,up_status) VALUES
(3,259,1)");
-
- $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_gwmodUplink_config
(cfg_name,cfg_master,cfg_username,cfg_password,cfg_global_sender,cfg_incoming_path)
VALUES
('uplink','http://cpanel.smsrakyat.net','playsms','pwd','','/usr/local')");
-
- $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_gwmodgnokii_config (cfg_name, cfg_path) VALUES ('gnokii',
'/usr/local')");
-
-
- $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_gwmodkannel_config (cfg_name, cfg_incoming_path, cfg_username,
cfg_password, cfg_global_sender, cfg_bearerbox_host, cfg_sendsms_port,
cfg_playsms_web) VALUES ('kannel', '/usr/local', 'playsms', 'pwd', '92824',
'127.0.0.1', '13131', 'http://localhost/~playsms')");
-
- $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_tblconfig_main (cfg_web_title, cfg_email_service, cfg_email_footer,
cfg_gateway_module, cfg_gateway_number) VALUES ('PlaySMS MPS (Mobile Portal
System)', 'address@hidden', 'PlaySMS MPS (Mobile Portal System)', 'gnokii',
'')");
-
-
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_tblsmsoutgoing ( flag_deleted, uid, p_gateway, p_src, p_dst,
p_footer, p_msg, p_datetime, p_status, p_gpid, p_credit, p_sms_type, unicode)
VALUES ( 0, 1, 'gnokii', '+628568809027', '+628562283138', ' - anton', 'Hi u
there, good morning!!', '2004-12-12 2:39:13', 0, 0, 0, 'text', 0)");
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_tblsmsoutgoing ( flag_deleted, uid, p_gateway, p_src, p_dst,
p_footer, p_msg, p_datetime, p_status, p_gpid, p_credit, p_sms_type, unicode)
VALUES ( 0, 1, 'gnokii', '+628568809027', '+628562205510', ' - anton', 'Hi u
there, good morning!!', '2004-12-12 2:39:13', 0, 0, 0, 'text', 0)");
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_tblsmsoutgoing ( flag_deleted, uid, p_gateway, p_src, p_dst,
p_footer, p_msg, p_datetime, p_update, p_status, p_gpid, p_credit, p_sms_type,
unicode) VALUES ( 0, 1, 'uplink', '+628568809027', '+628568809027', '- anton',
'Hello my dear me, testing testing the message', '2004-12-12 2:54:12',
'2004-12-12 2:55:11', 1, 0, 0, 'text', 0)");
-
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_tblsmstemplate ( uid, t_title, t_text) VALUES ( 1, 'Good morning',
'Hi u there, good morning!!')");
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_tblsmstemplate ( uid, t_title, t_text) VALUES ( 1, 'Good night have a
sweet dream', 'Hi sweetheart, good night and have a sweet dream :*')");
-
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_sms_tbluser (
status, ticket, username, password, name, mobile, email, sender, dailysms,
gender, age, address, city, state, country, birthday, marital, education,
zipcode, junktimestamp) VALUES (2, 'd0b3239a5da9504a1a38f7745790c3c4', 'admin',
'admin', 'Administrator', '+628568809027', 'address@hidden', '- anton', 0, 1,
0, 'Jl. Pangkalan Jati II no. 19 Kalimalang', 'Jakarta Timur', 'DKI Jakarta',
132, '1979-02-14', 1, 1, '13620', '1102793982')");
-
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_tbluser_country (country_id, country_name) VALUES (1,
'Afghanistan')");
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_tbluser_country (country_id, country_name) VALUES (2, 'Albania')");
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_tbluser_country (country_id, country_name) VALUES (3, 'Algeria')");
@@ -242,7 +300,6 @@
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_tbluser_country (country_id, country_name) VALUES (332, 'Jersey')");
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_tbluser_country (country_id, country_name) VALUES (334, 'OTHER
(unlisted)')");
-
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_tblusergroupphonebook ( uid, gp_name, gp_code) VALUES ( 1, 'Friends',
'FR')");
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_tbluserphonebook ( gpid, uid, p_num, p_desc, p_email) VALUES ( 1, 1,
'+628562283138', 'Nero', 'address@hidden')");
@@ -251,7 +308,5 @@
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_tbluserphonebook ( gpid, uid, p_num, p_desc, p_email) VALUES ( 1, 1,
'+122334455', 'Morfren', 'address@hidden')");
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_tbluserphonebook ( gpid, uid, p_num, p_desc, p_email) VALUES ( 1, 1,
'+628568809027', 'My Self', 'address@hidden')");
-
-
?>
Index: sms/setup/setup.inc.php
diff -u sms/setup/setup.inc.php:1.3 sms/setup/setup.inc.php:1.4
--- sms/setup/setup.inc.php:1.3 Mon May 22 08:50:44 2006
+++ sms/setup/setup.inc.php Thu May 25 19:47:10 2006
@@ -6,7 +6,7 @@
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package sms
* @subpackage setup
- * @version $Id: setup.inc.php,v 1.3 2006/05/22 08:50:44 sigurdne Exp $
+ * @version $Id: setup.inc.php,v 1.4 2006/05/25 19:47:10 sigurdne Exp $
*/
$setup_info['sms']['name'] = 'sms';
@@ -46,14 +46,14 @@
'phpgw_sms_featpoll_choice',
'phpgw_sms_featpoll_result',
'phpgw_sms_gwmodclickatell_apidata',
- 'phpgw_sms_gwmodclickatell_config',
- 'phpgw_sms_gwmodgnokii_config',
- 'phpgw_sms_gwmodkannel_config',
+// 'phpgw_sms_gwmodclickatell_config',
+// 'phpgw_sms_gwmodgnokii_config',
+// 'phpgw_sms_gwmodkannel_config',
'phpgw_sms_gwmodkannel_dlr',
- 'phpgw_sms_gwmodtemplate_config',
+// 'phpgw_sms_gwmodtemplate_config',
'phpgw_sms_gwmoduplink',
- 'phpgw_sms_gwmoduplink_config',
- 'phpgw_sms_tblconfig_main',
+// 'phpgw_sms_gwmoduplink_config',
+// 'phpgw_sms_tblconfig_main',
'phpgw_sms_tblsmsincoming',
'phpgw_sms_tblsmsoutgoing',
'phpgw_sms_tblsmstemplate',
Index: sms/setup/tables_current.inc.php
diff -u sms/setup/tables_current.inc.php:1.5
sms/setup/tables_current.inc.php:1.6
--- sms/setup/tables_current.inc.php:1.5 Wed May 24 13:32:33 2006
+++ sms/setup/tables_current.inc.php Thu May 25 19:47:10 2006
@@ -7,7 +7,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package sms
* @subpackage setup
- * @version $Id: tables_current.inc.php,v 1.5 2006/05/24 13:32:33
sigurdne Exp $
+ * @version $Id: tables_current.inc.php,v 1.6 2006/05/25 19:47:10
sigurdne Exp $
*/
@@ -177,7 +177,7 @@
'uc' => array()
),
- 'phpgw_sms_gwmodclickatell_config' => array(
+/* 'phpgw_sms_gwmodclickatell_config' => array(
'fd' => array(
'cfg_name' => array('type' => 'varchar',
'precision' => 20,'nullable' => True,'default' => 'gnokii'),
'cfg_api_id' => array('type' => 'varchar',
'precision' => 20,'nullable' => True),
@@ -221,7 +221,7 @@
'ix' => array(),
'uc' => array()
),
-
+*/
'phpgw_sms_gwmodkannel_dlr' => array(
'fd' => array(
'kannel_dlr_id' => array('type' =>
'auto','nullable' => False),
@@ -234,7 +234,7 @@
'uc' => array()
),
- 'phpgw_sms_gwmodtemplate_config' => array(
+/* 'phpgw_sms_gwmodtemplate_config' => array(
'fd' => array(
'cfg_name' => array('type' => 'varchar',
'precision' => 20,'nullable' => False),
'cfg_path' => array('type' => 'varchar',
'precision' => 250,'nullable' => False)
@@ -244,7 +244,7 @@
'ix' => array(),
'uc' => array()
),
-
+*/
'phpgw_sms_gwmoduplink' => array(
'fd' => array(
'up_id' => array('type' => 'auto','nullable' =>
False),
@@ -257,7 +257,7 @@
'ix' => array(),
'uc' => array()
),
-
+/*
'phpgw_sms_gwmoduplink_config' => array(
'fd' => array(
'cfg_name' => array('type' => 'varchar',
'precision' => 20,'nullable' => True),
@@ -286,7 +286,7 @@
'ix' => array(),
'uc' => array()
),
-
+*/
'phpgw_sms_tblsmsincoming' => array(
'fd' => array(
'in_id' => array('type' => 'auto','nullable' =>
False),
@@ -451,6 +451,7 @@
'fd' => array(
'type_id' => array('type' => 'int','precision'
=> 4,'nullable' => False),
'id' => array('type' => 'int', 'precision' =>
4,'nullable' => False),
+ 'input_type' => array('type' => 'varchar',
'precision' => 10,'nullable' => False),
'name' => array('type' => 'varchar',
'precision' => 50,'nullable' => False),
'descr' => array('type' => 'varchar',
'precision' => 200,'nullable' => true)
),
Index: sms/setup/tables_update.inc.php
diff -u sms/setup/tables_update.inc.php:1.2 sms/setup/tables_update.inc.php:1.3
--- sms/setup/tables_update.inc.php:1.2 Wed May 24 13:32:33 2006
+++ sms/setup/tables_update.inc.php Thu May 25 19:47:10 2006
@@ -6,13 +6,13 @@
* @copyright Copyright (C) 2003-2005 Free Software Foundation, Inc.
http://www.fsf.org/
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
- * @package hrm
+ * @package sms
* @subpackage setup
- * @version $Id: tables_update.inc.php,v 1.2 2006/05/24 13:32:33
sigurdne Exp $
+ * @version $Id: tables_update.inc.php,v 1.3 2006/05/25 19:47:10
sigurdne Exp $
*/
/**
- * Update hrm version from 0.9.17.000 to 0.9.17.001
+ * Update sms version from 0.9.17.000 to 0.9.17.001
*/
$test[] = '0.9.17.501';
@@ -94,8 +94,8 @@
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_value (type_id,attrib_id,id,value) VALUES (1, 2, 1,
'99999999')");
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_sms_config_value (type_id,attrib_id,id,value) VALUES (2, 1, 1,
'/usr/local')");
- $GLOBALS['setup_info']['hrm']['currentver'] = '0.9.17.502';
+ $GLOBALS['setup_info']['sms']['currentver'] = '0.9.17.502';
$GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit();
- return $GLOBALS['setup_info']['hrm']['currentver'];
+ return $GLOBALS['setup_info']['sms']['currentver'];
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] sms inc/class.sms.inc.php inc/class.soconfig.in...,
Sigurd Nes <=