|  | @@ -144,7 +144,6 @@ class UserController extends DooController {
 | 
	
		
			
				|  |  |  	function do_login() {
 | 
	
		
			
				|  |  |  		
 | 
	
		
			
				|  |  |  		$username = $this->get_args ( "username" );
 | 
	
		
			
				|  |  | -		
 | 
	
		
			
				|  |  |  		$password = $this->get_args ( "password" );
 | 
	
		
			
				|  |  |  		
 | 
	
		
			
				|  |  |  		$day = is_numeric ( $this->get_args ( "day" ) ) ? $this->get_args ( "day" ) : 1;
 | 
	
	
		
			
				|  | @@ -160,11 +159,9 @@ class UserController extends DooController {
 | 
	
		
			
				|  |  |  		$client = new client ( ZHSSO );
 | 
	
		
			
				|  |  |  		
 | 
	
		
			
				|  |  |  		if(filter_var($username, FILTER_VALIDATE_EMAIL)){
 | 
	
		
			
				|  |  | -			
 | 
	
		
			
				|  |  |  			$is_login = $client->zhsso_member_login ( $username, $password ,1);
 | 
	
		
			
				|  |  |  			
 | 
	
		
			
				|  |  |  		}else if($this->checkMobile($username)) {
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  			$is_login = $client->zhsso_member_login( $username, $password, 2 );
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  		}else{
 | 
	
	
		
			
				|  | @@ -350,7 +347,6 @@ class UserController extends DooController {
 | 
	
		
			
				|  |  |  	public function do_question_close() {
 | 
	
		
			
				|  |  |  		
 | 
	
		
			
				|  |  |  		$qid = is_numeric ( $this->params ['qid'] ) ? $this->params ['qid'] : 0;
 | 
	
		
			
				|  |  | -		
 | 
	
		
			
				|  |  |  		$rs = $this->asklogic->get_question_by_uqid ( $qid, $this->userinfo ['uid'] );
 | 
	
		
			
				|  |  |  		
 | 
	
		
			
				|  |  |  		if ($qid <= 0)
 | 
	
	
		
			
				|  | @@ -381,13 +377,11 @@ class UserController extends DooController {
 | 
	
		
			
				|  |  |  	public function do_best_answer() {
 | 
	
		
			
				|  |  |  		
 | 
	
		
			
				|  |  |  		$data ['qid'] = $this->get_args ( 'qid' );
 | 
	
		
			
				|  |  | -		
 | 
	
		
			
				|  |  |  		$data ['aid'] = $this->get_args ( 'aid' );
 | 
	
		
			
				|  |  |  		
 | 
	
		
			
				|  |  |  		$data ['comment'] = $this->get_args ( 'comment' );
 | 
	
		
			
				|  |  |  		
 | 
	
		
			
				|  |  |  		$rs = $this->asklogic->get_question_by_uqid ( $data ['qid'], $this->userinfo ['uid'] );
 | 
	
		
			
				|  |  | -		
 | 
	
		
			
				|  |  |  		$ans = $this->asklogic->get_answer_by_aqid ( $data ['aid'], $data ['qid'] );
 | 
	
		
			
				|  |  |  		
 | 
	
		
			
				|  |  |  		//操作权限的判定
 | 
	
	
		
			
				|  | @@ -407,15 +401,10 @@ class UserController extends DooController {
 | 
	
		
			
				|  |  |  			$this->Messager ( "请输入正确的值", "/" );
 | 
	
		
			
				|  |  |  		
 | 
	
		
			
				|  |  |  		$data ['quid'] = $rs ['authorid'];
 | 
	
		
			
				|  |  | -		
 | 
	
		
			
				|  |  |  		$data ['auid'] = $ans ['authorid'];
 | 
	
		
			
				|  |  | -		
 | 
	
		
			
				|  |  |  		$data ['title'] = $rs ['title'];
 | 
	
		
			
				|  |  | -		
 | 
	
		
			
				|  |  |  		$data ['price'] = $rs ['price'];
 | 
	
		
			
				|  |  | -		
 | 
	
		
			
				|  |  |  		$data ['username'] = $ans ['author'];
 | 
	
		
			
				|  |  | -		
 | 
	
		
			
				|  |  |  		$this->userlogic->set_best_answer ( $data );
 | 
	
		
			
				|  |  |  		
 | 
	
		
			
				|  |  |  		header ( 'Content-Type:text/html;charset=utf-8' );
 | 
	
	
		
			
				|  | @@ -442,13 +431,9 @@ class UserController extends DooController {
 | 
	
		
			
				|  |  |  			$this->Messager ( "请填写相关信息", "/question/add_vip" );
 | 
	
		
			
				|  |  |  		
 | 
	
		
			
				|  |  |  		$phone = $this->get_args ( 'phone' );
 | 
	
		
			
				|  |  | -		
 | 
	
		
			
				|  |  |  		$qq = $this->get_args ( 'qq' );
 | 
	
		
			
				|  |  | -		
 | 
	
		
			
				|  |  |  		$this->userlogic->update_vip_question ( $rs ['id'], $title, $description, $this->userinfo ['uid'], $phone, $qq );
 | 
	
		
			
				|  |  |  		
 | 
	
		
			
				|  |  | -		
 | 
	
		
			
				|  |  | -		
 | 
	
		
			
				|  |  |  		header ( 'Content-Type:text/html;charset=utf-8' );
 | 
	
		
			
				|  |  |  		@header ( "Location: " . WEB_SITE . "/messager?content=问题发起成功&url=/advisory_page/" . $rs ['id'] );
 | 
	
		
			
				|  |  |  	}
 | 
	
	
		
			
				|  | @@ -476,18 +461,13 @@ class UserController extends DooController {
 | 
	
		
			
				|  |  |  		$rs = $this->asklogic->get_vip_question_by_paid ( $this->userinfo ['uid'] );
 | 
	
		
			
				|  |  |  		
 | 
	
		
			
				|  |  |  		$data ['mod'] = 'askpost';
 | 
	
		
			
				|  |  | -		
 | 
	
		
			
				|  |  |  		$data ['price'] = $price;
 | 
	
		
			
				|  |  | -		
 | 
	
		
			
				|  |  |  		$data ['qq'] = $this->userinfo ['qq'];
 | 
	
		
			
				|  |  | -		
 | 
	
		
			
				|  |  |  		$data ['phone'] = $this->userinfo ['phone'];
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  		if (! empty ( $rs )) { //防止重复提交
 | 
	
		
			
				|  |  |  			$data ['qid'] = $rs ['id'];
 | 
	
		
			
				|  |  | -			
 | 
	
		
			
				|  |  |  			$data ['message'] = "您上一次付款后没有发布问题,故本次提问不做重复扣费";
 | 
	
		
			
				|  |  | -			
 | 
	
		
			
				|  |  |  			$this->render ( 'askPost_pay_2', $data );
 | 
	
		
			
				|  |  |  			
 | 
	
		
			
				|  |  |  			die ();
 | 
	
	
		
			
				|  | @@ -507,7 +487,6 @@ class UserController extends DooController {
 | 
	
		
			
				|  |  |  		
 | 
	
		
			
				|  |  |  		//确认付费
 | 
	
		
			
				|  |  |  		$data ['author'] = $this->userinfo ['username'];
 | 
	
		
			
				|  |  | -		
 | 
	
		
			
				|  |  |  		$data ['authorid'] = $this->userinfo ['uid'];
 | 
	
		
			
				|  |  |  		
 | 
	
		
			
				|  |  |  		$id = $this->userlogic->add_vip_question ( $data );
 | 
	
	
		
			
				|  | @@ -586,11 +565,8 @@ class UserController extends DooController {
 | 
	
		
			
				|  |  |  		$data ['title'] = $this->get_args ( 'title' );
 | 
	
		
			
				|  |  |  		// 防止xxs攻击
 | 
	
		
			
				|  |  |          $data['title'] = htmlspecialchars($data['title']);
 | 
	
		
			
				|  |  | -		
 | 
	
		
			
				|  |  |  		$data ['category_id'] = $this->get_args ( 'category_id' );
 | 
	
		
			
				|  |  | -		
 | 
	
		
			
				|  |  |  		$data ['description'] = stripcslashes ( $this->get_args ( 'description' ) );
 | 
	
		
			
				|  |  | -		
 | 
	
		
			
				|  |  |  		$data ['price'] = $this->get_args ( 'price' );
 | 
	
		
			
				|  |  |  		
 | 
	
		
			
				|  |  |  		if ($data ['price'] !== false) {
 | 
	
	
		
			
				|  | @@ -610,11 +586,11 @@ class UserController extends DooController {
 | 
	
		
			
				|  |  |  		if (empty ( $data ['title'] ) || (! is_numeric ( $data ['category_id'] )))
 | 
	
		
			
				|  |  |  			$this->Messager ( "问题发起不成功,请重新填写", "/question/add" );
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -		$id = $this->userlogic->add_question ( $data );
 | 
	
		
			
				|  |  | +		$id = $this->userlogic->add_examine_question ( $data );
 | 
	
		
			
				|  |  |  		$_SESSION['vc']='NULL';
 | 
	
		
			
				|  |  |  		if ($id) {
 | 
	
		
			
				|  |  |  			header ( 'Content-Type:text/html;charset=utf-8' );
 | 
	
		
			
				|  |  | -			@header ( "Location: " . WEB_SITE . "/messager?content=问题发起成功&url=/askpage/" . $id );
 | 
	
		
			
				|  |  | +			@header ( "Location: " . WEB_SITE . "/messager?content=问题发起成功,待审批通过&url=/" );
 | 
	
		
			
				|  |  |  		} else {
 | 
	
		
			
				|  |  |  			header ( 'Content-Type:text/html;charset=utf-8' );
 | 
	
		
			
				|  |  |  			@header ( "Location: " . WEB_SITE . "/messager?content=问题发起不成功,请重新填写&url=/question/add" );
 |