Current Path : /home/c247essa/public_html/

Linux c22487.sgvps.net 3.12.18-clouder0 #1 SMP Tue Oct 9 18:14:47 EEST 2018 x86_64

Upload File :
Current File : /home/c247essa/public_html/check_details.php
<?php
include 'backend.php';
page_protect();

foreach($_GET as $key => $value) {
	$get[$key] = filter($value);
}
$dep_email = mysql_real_escape_string($get['getDptName']); // departmant detals

if(isset($get['cmd']) && $get['cmd'] == 'checkDepName') {
$availability = mysql_query("select dep_name from departments where dep_email = '$dep_email'") or die(mysql_error());
$rows_availability = mysql_fetch_array($availability);
$dep_name = $rows_availability['dep_name'] ;
	if( $dep_name <>'' ){
	echo $dep_name;
	} 
	else{
	echo 'Department  not yet set';
	}
	exit();
}
$get_dep_dt = mysql_real_escape_string($get['getDepDetails']); //admin details

if(isset($get['cmd']) && $get['cmd'] == 'checkDeptID') {
if($get_dep_dt <> $site_email){
$id_availability = mysql_query("select id from mu_members where email = '$get_dep_dt'") or die(mysql_error());
$row_id = mysql_fetch_array($id_availability);
echo $the_dep_id = $row_id['id'] ;
}else{
list($get_adm_set_id) = mysql_fetch_row(mysql_query("select id from mu_members where role = 'admin'")); // 
echo $the_dep_id = $get_adm_set_id;
}
	exit();
}

$get_dep_dt2 = mysql_real_escape_string($get['getDepDetails2']); //admin details

if(isset($get['cmd']) && $get['cmd'] == 'checkDeptID2') {
if($get_dep_dt2 <> $site_email){
$id_availability = mysql_query("select id from mu_members where email = '$get_dep_dt2'") or die(mysql_error());
$row_id2 = mysql_fetch_array($id_availability);
echo $the_dep_id2 = $row_id2['id'] ;
}else{
list($get_adm_set_id2) = mysql_fetch_row(mysql_query("select id from mu_members where role = 'admin'")); // 
echo $the_dep_id2 = $get_adm_set_id2;
}
	exit();
}

$get_admin = mysql_real_escape_string($get['getAdminDetails']); //admin details

if(isset($get['cmd']) && $get['cmd'] == 'checkAdminID') {
$id_availability = mysql_query("select id from mu_members where email = '$get_admin'") or die(mysql_error());
$row_id = mysql_fetch_array($id_availability);
echo $admin_id = $row_id['id'] ;
	exit();
}

$sub_admin = mysql_real_escape_string($get['getSubAdminDetails']); //sub admin details

if(isset($get['cmd']) && $get['cmd'] == 'checkSubAdminID') {
$id_availability = mysql_query("select id from mu_members where email = '$sub_admin'") or die(mysql_error());
$row_id = mysql_fetch_array($id_availability);
echo $sub_admin_id = $row_id['id'] ;
	exit();
}

$writer = mysql_real_escape_string($get['getWriterDetails']); //writer details

if(isset($get['cmd']) && $get['cmd'] == 'checkWriterID') {
$id_availability = mysql_query("select id from mu_members where email = '$writer'") or die(mysql_error());
$row_id = mysql_fetch_array($id_availability);
echo $w_id = $row_id['id'] ;
	exit();
}

$client = mysql_real_escape_string($get['getClientDetails']); //client details

if(isset($get['cmd']) && $get['cmd'] == 'checkClientID') {
$id_availability_c = mysql_query("select id from mu_members where email = '$client'") or die(mysql_error());
$row_id_c = mysql_fetch_array($id_availability_c);
echo $c_id = $row_id_c['id'] ;
	exit();
}
?>