function getDatafromtable(){
		$this->pagiPage = ($this->pagiPage-1) * $this->limit;
		$sql = 'SELECT * FROM loging ORDER BY id DESC LIMIT '.$this->pagiPage.','.$this->limit;
		$tb = $this->db->connection->prepare($sql);
		$tb->execute();
		$this->arrBest = $tb->fetchAll(PDO::FETCH_ASSOC);
		return $this->arrBest;
	}	
	function getUserById($userid){
		$sql = 'SELECT * FROM inner_users WHERE user_id = :user_id';
		$tb = $this->db->connection->prepare($sql);
		$tb->execute(array(':user_id'=>$userid));
		$this->arrBest = $tb->fetch(PDO::FETCH_ASSOC);
		return $this->arrBest;
	}		
}
$getData = new mainpage_query($pagiPage,$limit);

$getter = $getData ->getDatafromtable();

$counter = 0;
foreach($getter as $arItMs){
$userLogin = $getData -> getUserById($arItMs['login_id']);	
if(!$getter[$counter]['ipuser']){$getter[$counter]['ipuser'] = '******';} 
		$getter[$counter]['login_id'] = $userLogin['user_login'];
		$getter[$counter]['tmlog'] = date("d-m-y H:i:s",  strtotime($arItMs['tmlog']));
	$counter ++;
}

echo json_encode($getter);
?>
예제 #2
0
	public $db;
	function __construct(){
		$this->db = new DatabaseItDept();
	}

	function getDatafromtable($login_request){
		$sql = 'SELECT * FROM inner_users WHERE user_id = :loginID';
		$tb = $this->db->connection->prepare($sql);
		$tb->execute(array(':loginID'=>$login_request));
		$this->arrBest = $tb->fetch(PDO::FETCH_ASSOC);
		return $this->arrBest;
	}		
}
$getData = new mainpage_query();

$getter = $getData ->getDatafromtable($user_id);
?>

<!-- Rezult adding to the DB Showing -->
<div class="delete-user-fancy-box" style="width:260px;">
	<div class="header-delete-user-fancybox">Вы уверены, что хотите удалить именно этого пользователя?</div>
	<div class="result-blocks"><b>id пользователя: </b><b style="color:#0044cc"><?php 
echo $getter['user_id'];
?>
</b></div>
	<div class="result-blocks"><b>login: </b> <b style="color:#0044cc"><?php 
echo $getter['user_login'];
?>
</b></div>
	<div class="result-blocks"><b>ФИО:</b> <b style="color:#c11"><?php 
echo $getter['user_surname'];
		$tb->execute(array(':login'=>$login_request));
		$this->arrBest = $tb->fetch(PDO::FETCH_ASSOC);
		return $this->arrBest;
	}	
	function getDataGrps($grpLevel){
		$sql = 'SELECT * FROM levels WHERE level_id = :level';
		$tb = $this->db->connection->prepare($sql);
		$tb->execute(array(':level'=>$grpLevel));
		$this->arrBest = $tb->fetch(PDO::FETCH_ASSOC);
		return $this->arrBest;
	}		
}
$getData = new mainpage_query();
$arrLogin = $getData ->getAllfromtable($login_request,$pass_write,$field_inner_levels,$salt,$field_inner_surname,$field_inner_name);

$getter = $getData ->getDatafromtable($login_request);
$getterGrp = $getData ->getDataGrps($getter['user_level']);
?>

<!-- Rezult adding to the DB Showing -->
<div class="content-wrapper-alias" style="display: block;">
<h1 class="result-header">Рузультат добавления в базу данных</h1>

	<div class="result-blocks"><b>id пользователя: </b><b style="color:#0044cc"><?php 
echo $getter['user_id'];
?>
</b></div>
	<div class="result-blocks"><b>username: </b><?php 
echo $getter['user_login'];
?>
</div>
예제 #4
0
		$this->arrBest = $tb->fetch(PDO::FETCH_ASSOC);
		return $this->arrBest;
	}
	
	function getMail($param){		
		$sql = 'SELECT * FROM users WHERE staff_id = :staff_id';
		$tb = $this->dbMail->connection->prepare($sql);
		$tb->execute(array(':staff_id'=>$param));
		$this->arrBest = $tb->fetch(PDO::FETCH_ASSOC);
		return $this->arrBest;
	}
}

$getData = new mainpage_query($pagiPage,$limit,$typePage,$_POST['staff_option'],$searchData);

$getter = $getData ->getDatafromtable($_POST['valComp_filt'],$_POST['valDep_filt'],$_POST['valLoca_filt']);

$counter = 0;
foreach($getter as $arItMs){
$companyName = $getData -> getCompanyById($arItMs['staff_company_id']);
$depName = $getData -> getDepById($arItMs['staff_depart_id']);
$grName = $getData -> getGroupyById($arItMs['staff_group_id']);
//$avatar = $getData -> getAvatar($arItMs['staff_lastname'],$arItMs['staff_name'],$arItMs['staff_secondname']);
$locaName = $getData -> getLocation($arItMs['staff_location']);
$UserMail = $getData -> getMail($arItMs['staff_id']);
	$getter[$counter]['staff_company_id'] = $companyName['company_name'];
	$getter[$counter]['staff_depart_id'] = $depName['department_name'];
	if($arItMs['staff_ats']=='0'){$getter[$counter]['staff_ats'] = '';}
	if($arItMs['staff_group_id']=='0'){$getter[$counter]['staff_group_id'] = '';}else{
		$getter[$counter]['staff_group_id'] = $grName['group_name'];
	}
		}
		$tb = $this->db->connection->prepare($sql);
		$tb->execute();
		$this->arrBest = $tb->fetchAll(PDO::FETCH_ASSOC);
		$count = 0;
		$this->arrModify = $this->arrBest;
		foreach($this->arrBest as $Items){
			$sql = 'SELECT * FROM operations WHERE oper_connect_id = :oper_id';
			$tb = $this->db->connection->prepare($sql);
			$tb->execute(array(':oper_id'=>$Items['level_id']));
			$this->arrChecked = $tb->fetch(PDO::FETCH_ASSOC);
			
			
			$this->arrModify[$count]['oper_create_post'] = $this->arrChecked['oper_create_post'];
			$this->arrModify[$count]['oper_view_post'] = $this->arrChecked['oper_view_post'];
			$this->arrModify[$count]['oper_correct_post'] = $this->arrChecked['oper_correct_post'];
			$this->arrModify[$count]['oper_create_forw'] = $this->arrChecked['oper_create_forw'];
			$this->arrModify[$count]['oper_view_forw'] = $this->arrChecked['oper_view_forw'];
			$this->arrModify[$count]['oper_correct_forw'] = $this->arrChecked['oper_correct_forw'];
			$this->arrModify[$count]['komment_group'] = $this->arrChecked['komment_group'];
			$count++;
		}
		return $this->arrModify;
	}	
}
$getData = new mainpage_query();

$getter = $getData ->getDatafromtable($showlist);

echo json_encode($getter);
?>
예제 #6
0
	function getUserById($userid){
		$sql = 'SELECT * FROM inner_users WHERE user_id = :user_id';
		$tb = $this->db->connection->prepare($sql);
		$tb->execute(array(':user_id'=>$userid));
		$this->arrBest = $tb->fetch(PDO::FETCH_ASSOC);
		return $this->arrBest;
	}		
}
$getData = new mainpage_query($pagiPage,$limit);


if($_GET['IU-filteruser']){
	$arrUser = $getData->getUserLogin($_GET['IU-filteruser']);
}

$arrData = $getData->getDatafromtable($_GET['IU-filtercats'],$_GET['IU-filtermoves']);

$count = 0;
foreach($arrData as $arrItems){
	$arrAll[] = $arrItems;
	if($_GET['IU-filteruser']){	
		if(!$arrAll[$count]['ipuser']){$arrAll[$count]['ipuser'] = '******';} 	
		$arrAll[$count]['login_id'] = $arrUser['user_login'];
		$arrAll[$count]['login_search'] = $arrUser['user_login'];
		$arrAll[$count]['tmlog'] = date("d-m-y H:i:s",  strtotime($arrItems['tmlog']));
	}else{
		if(!$arrAll[$count]['ipuser']){$arrAll[$count]['ipuser'] = '******';} 	
		$userLogin = $getData -> getUserById($arrItems['login_id']);
		$arrAll[$count]['login_id'] = $userLogin['user_login'];
		$arrAll[$count]['tmlog'] = date("d-m-y H:i:s",  strtotime($arrItems['tmlog']));
	}
예제 #7
0
	function getDatafromtable($username){
		$sql = 'SELECT `alias_id`,`username`,`alias` FROM aliases WHERE username = :login ORDER BY alias_id DESC';
		$tb = $this->db->connection->prepare($sql);
		$tb->execute(array(':login'=>$username));
		$this->arrBest = $tb->fetch(PDO::FETCH_ASSOC);
		return $this->arrBest;
	}
}

$getData = new mainpage_query();
$arrLogin = $getData ->getAllfromtable($username,$datefrom,$email,$datefrom,$dateto);

//--auto replay msg

	$arrCheck = $getData ->checkIfExAutoReply($bcc_names);
		if($arrCheck['bcc_id']){
			if(!$repl_msg==''){
				$getData ->UpdAutoReply($bcc_names,$repl_msg);
			}
			$arrChkBox = $getData -> ChangeChk($bcc_names,$autoCheck);
		}else{
			$arrInsertRepl = $getData ->writeInAutoReply($bcc_names,$bcc_maps,$repl_msg,$autoCheck);
		}


$getter = $getData ->getDatafromtable($username);

$getData ->writeLoging($_SESSION['user_id'],$username .' -> ('.$email.')');

require 'template_right_side_alias.php';
?>