<?php require_once "db/db_sms_class.php"; $content = $params['content']; $phonenumber = $params['phonenumber']; $time = time(); $client = $params['client']; $siteadmin = "joyme"; $data = array(); $sms_db = new CDBSms(); if (!$sms_db) { exit; } $id = $sms_db->insertSms($phonenumber, $content, $time, $siteadmin, $client); if ($id > 0) { echo '{"sms_status":"success"}'; } else { echo '{"login_status":"failed"}'; }
<?php require_once "db/db_sms_class.php"; $siteadmin = $params['siteadmin']; $data = array(); $sms_db = new CDBSms(); if (!$sms_db) { exit; } $smsinfo = $sms_db->querySmsInfoBySiteadmin($siteadmin); if (count($smsinfo) > 0) { echo json_encode($smsinfo); }
<?php require_once "db/db_sms_class.php"; $client = $params['client']; $data = array(); $sms_db = new CDBSms(); if (!$sms_db) { exit; } $smsinfo = $sms_db->querySmsInfoByClient($client); $data['sms'] = $smsinfo; if (count($smsinfo) > 0) { echo json_encode($data); }