<?php
|
|
class recharge_controller extends siteadmin_controller{
|
function index_action(){
|
if(isset($_POST['insert'])){
|
$OrderM = $this -> MODEL('companyorder');
|
|
$userarr = str_replace(',', ',', trim($_POST['userarr']));
|
$userarr = @explode(',',trim($userarr));
|
|
$post = array(
|
'fs' => intval($_POST['fs']),
|
'price_int' => trim($_POST['price_int']),
|
'remark' => trim($_POST['remark'])
|
);
|
|
$return = $OrderM -> PayMember($userarr,$post);
|
if($return['url']){
|
$this -> ACT_layer_msg($return['msg'],$return['errcode'],$_SERVER['HTTP_REFERER'],2,1);
|
}else{
|
$this -> ACT_layer_msg($return['msg'],$return['errcode']);
|
}
|
|
}else{
|
$RatingM = $this -> MODEL('rating');
|
$rating_list = $RatingM -> getList(array('category'=>1,'display'=>1),array('field'=>'id,name,service_price'));
|
|
$this -> yunset("rating_list",$rating_list);
|
}
|
$this -> siteadmin_tpl(array('admin_recharge'));
|
}
|
//后台开通会员
|
function comvip_action(){
|
$OrderM = $this -> MODEL('companyorder');
|
|
$post = array(
|
'username' => trim($_POST['username']),
|
'comname' => trim($_POST['comname']),
|
'ratingid' => intval($_POST['ratingid']),
|
'vipprice' => $_POST['vipprice'],
|
'leijia' => intval($_POST['leijia']),
|
'vipprice' => $_POST['vipprice']
|
);
|
|
$return = $OrderM -> ComVip($post);
|
if($return['url']){
|
$this -> ACT_layer_msg($return['msg'],$return['errcode'],$_SERVER['HTTP_REFERER'],2,1);
|
}else{
|
$this -> ACT_layer_msg($return['msg'],$return['errcode']);
|
}
|
}
|
function searchname_action(){
|
$name = $this -> post_trim($_POST['username']);
|
$OrderM = $this -> MODEL('companyorder');
|
$return = $OrderM -> SearchName($name);
|
echo json_encode($return);die;
|
}
|
function searchcom_action(){
|
$name = $this -> post_trim($_POST['comname']);
|
$OrderM = $this -> MODEL('companyorder');
|
$return = $OrderM -> SearchCom($name);
|
echo json_encode($return);die;
|
}
|
}
|
?>
|