Location: PHPKode > projects > KSMS bulk sms manager > ksms-e1.2.35/plugin/gateway/kanl_geturl.php
<?
// -------------------------------------------------------------------------//
// KSMS ^ Short Message System Manager										//
// -------------------------------------------------------------------------//
// Based on "DBSMS" (C) 2002 Paolo Remonato									//
// Copyright (C) 2002-2006 Paolo Remonato									//
// KSMS-PROJECT HOME  :  http://ksms.sourceforge.net/						//
// -------------------------------------------------------------------------//
//   Please,do not delete these lines	^^^									//
// -------------------------------------------------------------------------//
/*
  This program is free software; you can redistribute it and/or modify it under the terms
  of the GNU General Public License as published by the Free Software Foundation.
  The software is provided "as is" without any express or implied warranty of any kind,
  Including warranties of noninfringement, merchantability, or fitness for a particular purpose.  
*/
/* 	2005 06 16		|*/

include "config.inc";

$t = $_GET['t'];
$q = $_GET['q'];
$a = $_GET['a'];

if ($t && $q && $a)
{
    $sms_datetime = trim($t);
    $sms_sender = trim($q);
    $message = trim($a);
    $array_target_code = explode(" ",$message);
    $target_code = strtoupper(trim($array_target_code[0]));
    $message = $array_target_code[1];
    for ($i=2;$i<count($array_target_code);$i++)
    {
	$message .= " ".$array_target_code[$i];
    }
    // collected:
    // $sms_datetime, $sms_sender, $target_code, $message
    setsmsincomingaction($sms_datetime,$sms_sender,$target_code,$message);
}


// check incoming SMS for available codes
// and sets the action


function setsmsincomingaction($sms_datetime,$sms_sender,$target_code,$message)
{
    $ok = false;
	
		$getquery = "INSERT INTO gwkannel_geturl (smslog_id,sms_datetime,sms_sender,target_code,ksmsmessage,kannel_dlr_type)"
					. " VALUES ('$smslog_id','$sms_datetime','$sms_sender','$target_code','$ksmsmessage','$kannel_dlr_type')";
		if (!$db->Execute($getquery)) 
			{
			echo "<table bgcolor='#ffff00' width=\"100%\"><tr><td>DB ERROR: " . $db->ErrorMsg() . "</td></tr></table>";
            break;
         	}
    return $ok;
}


?>
Return current item: KSMS bulk sms manager