<?php


include_once("_config_.php");
	

class dbconnectpluging
{
	protected $_useradminid;
	protected $_uadpaswords;
		
	
	private function connt(){
		$conf = new config();
	 	return $conf->_conni();
	}
	
	public function _auth($uid, $upass)
	{
			//$mysqli = new mysqli("localhost", "root", "","suprcost"); 
		//$sl = $mysqli -> query("SELECT _admnnm, _scrwrdz FROM cpn_admstrx where '".$this->userid($uid)."' = _admnnm AND '".$this->upass($upass)."' = _scrwrdz AND us_rstuts = 0 limit 0,1");		
		$sl = mysqli_query($this->connt(),"SELECT _admnnm, _scrwrdz FROM cpn_admstrx where '".$this->userid($uid)."' = _admnnm AND '".$this->upass($upass)."' = _scrwrdz AND us_rstuts = 0 limit 0,1");
		if(mysqli_num_rows($sl) == 1) {
		return true;
		}else{
		return false;
		}
	}
	
	
	public function _memberSelect($uid, $upass)
	{
			$conf = new config();	//$mysqli = new mysqli("localhost", "root", "","suprcost");
		$sl = mysqli_query($this->connt(), "SELECT _admnnm, _scrwrdz FROM cpn_admstrx 
		where '".$this->userid($uid)."' = _admnnm AND '".$this->upass($upass)."' = _scrwrdz AND _unk_ky = 0 limit 0,1");
		if(mysqli_num_rows($sl) == 1) {
		return true;
		}else{
		return false;
		}
	}
	// mysqli_
	private function userid($uid)
	{
		$this->_useradminid = $uid;
		return $this->_useradminid;
	}
	
	private function upass($upass)
	{
		$this->_uadpaswords = $upass;
		return $this->_uadpaswords;
	}
} // end class
?>