标签:io ar os sp java on cti 代码 bs
<?php
// 本类由系统自动生成,仅供测试用途
class IndexAction extends Action {
public function index(){
$this->display();
}
function into_add()
{
date_default_timezone_set(‘Asia/Shanghai‘);
$M=M("user");
$data=$_POST;
$data[‘in_date‘]=date(‘y-m-d H:i:s‘,time());
//print_r($data);exit;
$q=$M->add($data);
echo "<script language=‘javascript‘>alert(‘success‘);location.href=‘".__URL__."/user_list‘;</script>";
}
function user_list()
{
$M=M("user");
$data=$M->field(array("id","uname","email","fail"))->select();
//print_r($data);exit;
$this->assign("data",$data);
$this->display("userlist");
}
function user_delete()
{
$M=M("user");
$ID=$_GET[‘id‘];
$data=$M->where(array("id"=>$ID))->delete();
$this->display("userupdate");
echo "<script language=‘javascript‘>alert(‘success‘);location.href=‘".__URL__."/user_list‘;</script>";
}
}
标签:io ar os sp java on cti 代码 bs
原文地址:http://www.cnblogs.com/xiaoying1019/p/4104220.html