function sms_deal($mobile,$content){ //if(!Utility::IsMobile(trim($mobile))) exit; $count_str = getStringLength($content); $num_str_sms = (1*$count_str)/67;//短信按照每条67个字计算 $table = new Table('smslog'); $table->mobile = trim($mobile); $table->smslog = trim($content); $table->number = ceil($num_str_sms); $table->sms_time = strtotime('now'); $insert = $table->Insert(array('mobile', 'smslog', 'number','sms_time')); return $insert; }
<?php require_once dirname(dirname(__FILE__)) . '/app.php'; need_login(); if (is_post() && isset($_POST['giftpay'])) { if (!$_POST['from'] || !$_POST['to'] || !$_POST['amount']) { Session::Set('error', 'Please do not submit it untill finished.'); } $table = new Table('gift_card', $_POST); $table->code = Utility::GenSecret(8, 'mix'); $table->email = $_POST['gift_card']['delivery']['email_address']; $table->create_time = time(); $table->user_id = $login_user_id; $order_id = $table->Insert(array('user_id', 'from', 'to', 'message', 'amount', 'code', 'email', 'create_time', 'paytype')); if (!$order_id || !($order = Table::Fetch('gift_card', $order_id))) { die('404 Not Found'); } $randno = rand(1000, 9999); $total_money = moneyit($order['amount']); /* micdim: paypal support */ if ($order['paytype'] == 'paypal') { /* credit pay $credit = moneyit($order['origin'] - $total_money); if ($order['credit']!=$credit) { Table::UpdateCache('order', $order_id, array('credit'=>$credit,)); } end */ $_input_charset = 'utf-8'; //$service = 'create_direct_pay_by_user'; // what does it mean?? $partner = $INI['paypal']['mid']; $security_code = $INI['paypal']['sec'];
<?php require_once dirname(dirname(__FILE__)) . '/app.php'; if ($_POST) { verify_captcha('verifyfeedback', WEB_ROOT . '/feedback/seller.php'); if (!$_POST['content'] || !$_POST['title'] || !$_POST['contact']) { Session::Set('error', '请完成表单后再提交'); redirect(WEB_ROOT . '/feedback/seller.php'); } $table = new Table('feedback', $_POST); $table->city_id = abs(intval($city['id'])); $table->create_time = time(); $table->category = 'seller'; $table->title = htmlspecialchars($table->title); $table->content = htmlspecialchars($table->content); $table->contact = htmlspecialchars($table->contact); $table->Insert(array('city_id', 'title', 'contact', 'content', 'create_time', 'category')); redirect(WEB_ROOT . '/feedback/success.php'); } $pagetitle = '商务合作'; include template("feedback_seller");
<?php require_once(dirname(dirname(__FILE__)) . '/app.php'); if ($_POST) { verify_captcha('verifyfeedback', WEB_ROOT . '/feedback/seller.php'); if (!$_POST['content'] || !$_POST['title'] || !$_POST['contact']) { Session::Set('error', '请完成表单后再提交'); redirect( WEB_ROOT . '/feedback/seller.php'); } $table = new Table('feedback', $_POST); $table->city_id = abs(intval($city['id'])); $table->create_time = time(); $table->category = 'seller'; $table->title = htmlspecialchars($table->title); $table->content = htmlspecialchars($table->content); $table->contact = htmlspecialchars($table->contact); $table->sjhm = htmlspecialchars($table->sjhm); $table->tgsjmc = htmlspecialchars($table->tgsjmc); $table->hzlx = htmlspecialchars($table->hzlx); $table->Insert(array( 'city_id', 'title', 'contact', 'content','sjhm','tgsjmc','hzlx', 'create_time', 'category' )); redirect( WEB_ROOT . '/feedback/success.php'); } $pagetitle = '商务合作'; include template("feedback_seller");
<?php require_once dirname(dirname(__FILE__)) . '/app.php'; need_login(); if ($_POST) { /*verify_captcha('verifyfeedback', WEB_ROOT . '/feedback/suggest.php');*/ if (!$_POST['money']) { Session::Set('error', '请完成表单后再提交'); redirect(WEB_ROOT . '/account/withdraw.php'); } $table = new Table('apply', $_POST); $table->type = 'withdraw'; $table->user_id = $login_user_id; $table->status = 'ask'; $table->money = abs($table->money); $table->direction = 'yuanlu'; $table->create_time = time(); $table->Insert(array('user_id', 'type', 'status', 'money', 'create_time')); redirect(WEB_ROOT . '/account/withdraw.php'); } $withdrawdoing = Table::Count('apply', array('user_id' => $login_user['id'], 'type' => 'withdraw', 'status' => 'ask'), 'money'); $pagetitle = '余额提现'; include template('account_withdraw');
$gorder = new Table('order_gift', $_POST); if ($table->id) { $gorder->order_id = $table->id; } else { $gorder->order_id = $flag; } if ($_POST['gift']['delivery'] == 'print') { $gorder->delivery = 'print'; } else { $gorder->email = $_POST['gift']['delivery']['email_address']; $gorder->delivery = 'email'; } if ($giftorder) { $gorder->Update($ginsert); } else { $gorder->Insert($ginsert); } $fromgift = true; Utility::Redirect(WEB_ROOT . "/team/buy.php?id={$team['id']}&billing=true&fromgift=true"); } Utility::Redirect(WEB_ROOT . "/order/check.php?id={$table->id}"); } Utility::Redirect(WEB_ROOT . "/order/check.php?id={$flag}"); } } if (!isset($buyforfriend) && !isset($fromgift)) { $ex_con = array('user_id' => $login_user_id, 'team_id' => $team['id'], 'isgift' => 'N'); $order = DB::LimitQuery('order', array('condition' => $ex_con, 'one' => true)); //each user per day per buy if (!$order) { $order = array();