system: Linux mars.sprixweb.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
<?PHP
class Model_MUserManager
{
function showUserManager()
{
if(isset($_POST['find']))
{
$icd=$_POST['txtidcard'];
$username=$_POST['txtusername'];
$email=$_POST['txtemail'];
$country=$_POST['country'];
$type=$_POST['type'];
$select="select * from members_table where members_country='India'";
if($icd!='')
$select.=" and members_icard like'$icd' ";
if($username!='')
$select.=" and members_name like'$username' ";
if($email!='')
$select.=" and members_state like '%$email%'";
if($country!='')
$select.=" and members_country='$country'";
if($type!='')
$select.=" and members_city='$type'";
// exit();
if($username=='' && $email=='' && $country=='' && $type=='' && $icd=='')
{
header('Location:?do=members');
//$select.=" members_status='1' and members_verified='1' and ";
}
//echo $select;exit();
$obj=new Bin_Query();
$obj->executeQuery($select);
return Display_DUserManager::showUserManager($obj->records,$countryname,0,0,0,0,0,0,0);
$pagesize=10;
if(isset($_GET['size']))
{
$pagesize=$_GET['size'];
}
if(isset($_GET['page']))
{
$start = trim($_GET['page']-1) * $pagesize;
$end = $pagesize;
}
else
{
$start = 0;
$end = $pagesize;
}
$total=0;
$query_string = split('&size',$_SERVER['QUERY_STRING']);
$obj=new Bin_Query();
$sql="select * from members_table order by members_icard";
$obj->executeQuery($sql);
$total = ceil($obj->totrows/ $pagesize);
if($obj->totrows<=$pagesize)
{
$sql1="select * from members_table LIMIT $start,$end";
$obj2=new Bin_Query();
$obj2->executeQuery($sql1);
return Display_DUserManager::showUserManager($obj2->records,$countryname,1,$this->data['paging'],$this->data['prev'],$this->data['next'],$start,$total,$query_string[0]);
}
else
{
$tmp = new Lib_Paging('classic',array('totalpages'=>$total, 'length'=>10),'pagination');
$this->data['paging'] = $tmp->output;
$this->data['prev'] =$tmp->prev;
$this->data['next'] = $tmp->next;
$sql1 = "select * from members_table order by members_icard LIMIT $start,$end";
$obj2 = new Bin_Query();
$obj2->executeQuery($sql1);
return Display_DUserManager::showUserManager($obj2->records,$countryname,1,$this->data['paging'],$this->data['prev'],$this->data['next'],$start,$total,$query_string[0]);
}
}
}
function showTemporary()
{
$pagesize=10;
if(isset($_GET['size']))
{
$pagesize=$_GET['size'];
}
if(isset($_GET['page']))
{
$start = trim($_GET['page']-1) * $pagesize;
$end = $pagesize;
}
else
{
$start = 0;
$end = $pagesize;
}
$total=0;
$query_string = split('&size',$_SERVER['QUERY_STRING']);
$obj=new Bin_Query();
$sql="select * from members_table order by members_icard where members_membership='0'";
$obj->executeQuery($sql);
$total = ceil($obj->totrows/ $pagesize);
if($obj->totrows<=$pagesize)
{
$sql1="select * from members_table where members_membership='0' LIMIT $start,$end";
$obj2=new Bin_Query();
$obj2->executeQuery($sql1);
return Display_DUserManager::showUserManager($obj2->records,$countryname,1,$this->data['paging'],$this->data['prev'],$this->data['next'],$start,$total,$query_string[0]);
}
else
{
$tmp = new Lib_Paging('classic',array('totalpages'=>$total, 'length'=>10),'pagination');
$this->data['paging'] = $tmp->output;
$this->data['prev'] =$tmp->prev;
$this->data['next'] = $tmp->next;
$sql1 = "select * from members_table order by members_icard LIMIT $start,$end";
$obj2 = new Bin_Query();
$obj2->executeQuery($sql1);
return Display_DUserManager::showUserManager($obj2->records,$countryname,1,$this->data['paging'],$this->data['prev'],$this->data['next'],$start,$total,$query_string[0]);
}
}
function showPermanent()
{
$pagesize=10;
if(isset($_GET['size']))
{
$pagesize=$_GET['size'];
}
if(isset($_GET['page']))
{
$start = trim($_GET['page']-1) * $pagesize;
$end = $pagesize;
}
else
{
$start = 0;
$end = $pagesize;
}
$total=0;
$query_string = split('&size',$_SERVER['QUERY_STRING']);
$obj=new Bin_Query();
$sql="select * from members_table where members_membership='1'";
$obj->executeQuery($sql);
$total = ceil($obj->totrows/ $pagesize);
if($obj->totrows<=$pagesize)
{
$sql1="select * from members_table where members_membership='1' order by members_icard ASC LIMIT $start,$end";
$obj2=new Bin_Query();
$obj2->executeQuery($sql1);
return Display_DUserManager::showUserManager($obj2->records,$countryname,1,$this->data['paging'],$this->data['prev'],$this->data['next'],$start,$total,$query_string[0]);
}
else
{
$tmp = new Lib_Paging('classic',array('totalpages'=>$total, 'length'=>10),'pagination');
$this->data['paging'] = $tmp->output;
$this->data['prev'] =$tmp->prev;
$this->data['next'] = $tmp->next;
$sql1 = "select * from members_table where members_membership='1' order by members_icard ASC LIMIT $start,$end";
$obj2 = new Bin_Query();
$obj2->executeQuery($sql1);
return Display_DUserManager::showUserManager($obj2->records,$countryname,1,$this->data['paging'],$this->data['prev'],$this->data['next'],$start,$total,$query_string[0]);
}
}
function showSuspended()
{
$pagesize=10;
if(isset($_GET['size']))
{
$pagesize=$_GET['size'];
}
if(isset($_GET['page']))
{
$start = trim($_GET['page']-1) * $pagesize;
$end = $pagesize;
}
else
{
$start = 0;
$end = $pagesize;
}
$total=0;
$query_string = split('&size',$_SERVER['QUERY_STRING']);
$obj=new Bin_Query();
$sql="select * from members_table order by members_icard DESC where members_membership='2'";
$obj->executeQuery($sql);
$total = ceil($obj->totrows/ $pagesize);
if($obj->totrows<=$pagesize)
{
$sql1="select * from members_table where members_membership='2' order by members_icard ASC LIMIT $start,$end";
$obj2=new Bin_Query();
$obj2->executeQuery($sql1);
return Display_DUserManager::showUserManager($obj2->records,$countryname,1,$this->data['paging'],$this->data['prev'],$this->data['next'],$start,$total,$query_string[0]);
}
else
{
$tmp = new Lib_Paging('classic',array('totalpages'=>$total, 'length'=>10),'pagination');
$this->data['paging'] = $tmp->output;
$this->data['prev'] =$tmp->prev;
$this->data['next'] = $tmp->next;
$sql1 = "select * from members_table order by members_icard DESC LIMIT $start,$end";
$obj2 = new Bin_Query();
$obj2->executeQuery($sql1);
return Display_DUserManager::showUserManager($obj2->records,$countryname,1,$this->data['paging'],$this->data['prev'],$this->data['next'],$start,$total,$query_string[0]);
}
}
function showTerminated()
{
$pagesize=10;
if(isset($_GET['size']))
{
$pagesize=$_GET['size'];
}
if(isset($_GET['page']))
{
$start = trim($_GET['page']-1) * $pagesize;
$end = $pagesize;
}
else
{
$start = 0;
$end = $pagesize;
}
$total=0;
$query_string = split('&size',$_SERVER['QUERY_STRING']);
$obj=new Bin_Query();
$sql="select * from members_table order by members_icard DESC where members_membership='3'";
$obj->executeQuery($sql);
$total = ceil($obj->totrows/ $pagesize);
if($obj->totrows<=$pagesize)
{
$sql1="select * from members_table where members_membership='3' order by members_icard ASC LIMIT $start,$end";
$obj2=new Bin_Query();
$obj2->executeQuery($sql1);
return Display_DUserManager::showUserManager($obj2->records,$countryname,1,$this->data['paging'],$this->data['prev'],$this->data['next'],$start,$total,$query_string[0]);
}
else
{
$tmp = new Lib_Paging('classic',array('totalpages'=>$total, 'length'=>10),'pagination');
$this->data['paging'] = $tmp->output;
$this->data['prev'] =$tmp->prev;
$this->data['next'] = $tmp->next;
$sql1 = "select * from members_table order by members_icard DESC LIMIT $start,$end";
$obj2 = new Bin_Query();
$obj2->executeQuery($sql1);
return Display_DUserManager::showUserManager($obj2->records,$countryname,1,$this->data['paging'],$this->data['prev'],$this->data['next'],$start,$total,$query_string[0]);
}
}
function showDisMiss()
{
$pagesize=10;
if(isset($_GET['size']))
{
$pagesize=$_GET['size'];
}
if(isset($_GET['page']))
{
$start = trim($_GET['page']-1) * $pagesize;
$end = $pagesize;
}
else
{
$start = 0;
$end = $pagesize;
}
$total=0;
$query_string = split('&size',$_SERVER['QUERY_STRING']);
$obj=new Bin_Query();
$sql="select * from members_table order by members_icard DESC where members_membership='4'";
$obj->executeQuery($sql);
$total = ceil($obj->totrows/ $pagesize);
if($obj->totrows<=$pagesize)
{
$sql1="select * from members_table where members_membership='4' order by members_icard ASC LIMIT $start,$end";
$obj2=new Bin_Query();
$obj2->executeQuery($sql1);
return Display_DUserManager::showUserManager($obj2->records,$countryname,1,$this->data['paging'],$this->data['prev'],$this->data['next'],$start,$total,$query_string[0]);
}
else
{
$tmp = new Lib_Paging('classic',array('totalpages'=>$total, 'length'=>10),'pagination');
$this->data['paging'] = $tmp->output;
$this->data['prev'] =$tmp->prev;
$this->data['next'] = $tmp->next;
$sql1 = "select * from members_table members_membership='4' order by members_icard DESC LIMIT $start,$end";
$obj2 = new Bin_Query();
$obj2->executeQuery($sql1);
return Display_DUserManager::showUserManager($obj2->records,$countryname,1,$this->data['paging'],$this->data['prev'],$this->data['next'],$start,$total,$query_string[0]);
}
}
function showDied()
{
$pagesize=10;
if(isset($_GET['size']))
{
$pagesize=$_GET['size'];
}
if(isset($_GET['page']))
{
$start = trim($_GET['page']-1) * $pagesize;
$end = $pagesize;
}
else
{
$start = 0;
$end = $pagesize;
}
$total=0;
$query_string = split('&size',$_SERVER['QUERY_STRING']);
$obj=new Bin_Query();
$sql="select * from members_table order by members_icard DESC where members_membership='5'";
$obj->executeQuery($sql);
$total = ceil($obj->totrows/ $pagesize);
if($obj->totrows<=$pagesize)
{
$sql1="select * from members_table where members_membership='5' order by members_icard ASC LIMIT $start,$end";
$obj2=new Bin_Query();
$obj2->executeQuery($sql1);
return Display_DUserManager::showUserManager($obj2->records,$countryname,1,$this->data['paging'],$this->data['prev'],$this->data['next'],$start,$total,$query_string[0]);
}
else
{
$tmp = new Lib_Paging('classic',array('totalpages'=>$total, 'length'=>10),'pagination');
$this->data['paging'] = $tmp->output;
$this->data['prev'] =$tmp->prev;
$this->data['next'] = $tmp->next;
$sql1 = "select * from members_table order by members_icard DESC LIMIT $start,$end";
$obj2 = new Bin_Query();
$obj2->executeQuery($sql1);
return Display_DUserManager::showUserManager($obj2->records,$countryname,1,$this->data['paging'],$this->data['prev'],$this->data['next'],$start,$total,$query_string[0]);
}
}
Function showView()
{
$id=$_GET['id'];
$obj=new Bin_Query();
$sql="select * from members_table where members_icard='$id'";
$obj->executeQuery($sql);
return Display_DUserManager::showViewDetails($obj->records);
}
Function showViewMember()
{
$id=$_GET['id'];
$obj=new Bin_Query();
$sql="select * from members_table where members_under='$id'";
$obj->executeQuery($sql);
return Display_DUserManager::showViewMember($obj->records);
}
}
?>