[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] sms/bin config_SD config_VASK receipt_service_a...
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] sms/bin config_SD config_VASK receipt_service_a... |
Date: |
Mon, 13 Aug 2007 12:52:33 +0000 |
CVSROOT: /sources/phpgroupware
Module name: sms
Changes by: Sigurd Nes <sigurdne> 07/08/13 12:52:33
Added files:
bin : config_SD config_VASK
receipt_service_agreement.php
Log message:
Receipts from mobilephones of items of service agreements
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/sms/bin/config_SD?cvsroot=phpgroupware&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/sms/bin/config_VASK?cvsroot=phpgroupware&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/sms/bin/receipt_service_agreement.php?cvsroot=phpgroupware&rev=1.1
Patches:
Index: config_SD
===================================================================
RCS file: config_SD
diff -N config_SD
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ config_SD 13 Aug 2007 12:52:32 -0000 1.1
@@ -0,0 +1,30 @@
+<?php
+ /**
+ * phpGroupWare - sms: A SMS Gateway
+ *
+ * @author Sigurd Nes <address@hidden>
+ * @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 sms
+ * @subpackage sms
+ * @version $Id: config_SD,v 1.1 2007/08/13 12:52:32 sigurdne Exp $
+ */
+
+ /**
+ * Description
+ * @package sms
+ * Config values for SMS-command "SD" - short for "noxious animal in
Norwegian" - as example - as it is configured at BBB
+ */
+
+ $agreement_id = 31793;
+ $id_field = 'location_code';
+ $target_field = 'kvittering';
+
+ $filter = "WHERE agreement_id = $agreement_id AND location_code ilike
'" . $param[0] . "%'";
+
+ $this->db->query("SELECT id FROM fm_s_agreement_attribute WHERE
column_name = '$target_field' AND attrib_detail=2",__LINE__,__FILE__);
+ $this->db->next_record();
+ $attrib_id = $this->db->f('id');
+
+?>
Index: config_VASK
===================================================================
RCS file: config_VASK
diff -N config_VASK
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ config_VASK 13 Aug 2007 12:52:32 -0000 1.1
@@ -0,0 +1,30 @@
+<?php
+ /**
+ * phpGroupWare - sms: A SMS Gateway
+ *
+ * @author Sigurd Nes <address@hidden>
+ * @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 sms
+ * @subpackage sms
+ * @version $Id: config_VASK,v 1.1 2007/08/13 12:52:32 sigurdne Exp $
+ */
+
+ /**
+ * Description
+ * @package sms
+ * Config values for SMS-command "VASK" - cleaning in Norwegian - as
example - as it is configured at BBB
+ */
+
+ $agreement_id = '';
+ $id_field = 'location_code';
+ $target_field = 'kvittering';
+
+ $filter = "WHERE agreement_id = $agreement_id AND location_code ilike
'" . $param[0] . "%'";
+
+ $this->db->query("SELECT id FROM fm_s_agreement_attribute WHERE
column_name = '$target_field' AND attrib_detail=2",__LINE__,__FILE__);
+ $this->db->next_record();
+ $attrib_id = $this->db->f('id');
+
+?>
Index: receipt_service_agreement.php
===================================================================
RCS file: receipt_service_agreement.php
diff -N receipt_service_agreement.php
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ receipt_service_agreement.php 13 Aug 2007 12:52:32 -0000 1.1
@@ -0,0 +1,38 @@
+<?php
+ /**
+ * phpGroupWare - sms: A SMS Gateway
+ *
+ * @author Sigurd Nes <address@hidden>
+ * @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 sms
+ * @subpackage sms
+ * @version $Id: receipt_service_agreement.php,v 1.1 2007/08/13 12:52:32
sigurdne Exp $
+ */
+
+ /**
+ * Description
+ * @package sms
+ */
+
+ $param = explode(' ' , $command_param);
+
+ include(PHPGW_SERVER_ROOT . SEP . 'sms' . SEP . 'bin' . SEP .
'config_' . strtoupper(basename($command_code)));
+ $sql = "SELECT id from fm_s_agreement_detail $filter";
+
+ $this->db->query($sql,__LINE__,__FILE__);
+ if($this->db->next_record() && $agreement_id && $attrib_id)
+ {
+ $id = $this->db->f('id');
+ $value = $sms_datetime . ' (' . $sms_sender . ')';
+
+ $this->db->query("UPDATE fm_s_agreement_detail set
$target_field = '$value' WHERE agreement_id = $agreement_id AND id=$id"
,__LINE__,__FILE__);
+ $historylog =
CreateObject('property.historylog','s_agreement');
+ $historylog->account = 6;
+ $historylog->add('SO',$agreement_id ,$sms_sender,False,
$attrib_id,strtotime($sms_datetime),$id);
+ $command_output = 'success';
+ $this->account = 6;
+ $this->websend2pv('Admin',$sms_sender,'Takk for det! - Melding
er mottatt','text','0');
+ }
+
- [Phpgroupware-cvs] sms/bin config_SD config_VASK receipt_service_a...,
Sigurd Nes <=