- Joined
- Apr 26, 2008
- Messages
- 281
- Reaction score
- 34
Code:
function NOW() {
return date('Y-m-d H:i:s');
}
if($_SERVER['REMOTE_ADDR'] == $mobio_remote_addr || 1) {
$sms_reply = 'Greshka. Accounta e nevaliden ili ne e napisan pravelno';
$conn = mssql_connect($db_serv, $db_user, $db_pass);
if($conn) {
mssql_select_db($db_name);
mssql_query("UPDATE MEMB_CREDITS SET credits=credits+'$credits_to_add' WHERE memb___id='$item'");
/*$time = NOW();
$res = mssql_query("INSERT INTO SMSLOG (memb___id, fromnum, time, sum) VALUES
('$item', '$fromnum', '$time', '$sum')");*/
$res = mssql_query("SELECT credits FROM MEMB_CREDITS WHERE memb___id='$item'");
if(mssql_num_rows($res)>0) {
$row = mssql_fetch_row($res);
$sms_reply = "Uspeshno sa zaredeni {$credits_to_add} credita na acc {$item} .Veche imate {$row[0]} credita.";
}
}
file("http://mobio.bg/paynotify/pnsendsms.php?servID=$servID&tonum=$fromnum&extid=$extid&message=".urlencode($sms_reply));
}
Искам да попитам как да задействам тази функция
Code:
/*$time = NOW();
$res = mssql_query("INSERT INTO SMSLOG (memb___id, fromnum, time, sum) VALUES
('$item', '$fromnum', '$time', '$sum')");*/