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
cmd: 

Direktori : /home/pfhr/public_html/admin/classes/Model/
Upload File :
Current File : /home/pfhr/public_html/admin/classes/Model/MHeader.php

<?php

class Model_MHeader
{
	function showTime()
	{
		$output=date("j M Y, g:i A"); 
		
		return $output;
	}
	
	function showAdmin()
	{
		$admin="SELECT admin_name FROM admin_table where admin_id=".$_SESSION['admin']['id'];
		$obj=new Bin_Query();
		$obj->executeQuery($admin);
		$output=$obj->records[0]['admin_name'];
			
		return $output;
	}
	
	function showAvatar()
	{
		$admin="SELECT admin_image FROM admin_table where admin_id=".$_SESSION['admin']['id'];
		$obj=new Bin_Query();
		$obj->executeQuery($admin);
		$output=$obj->records[0]['admin_image'];
			
		return $output;
	}
	
	function showQuickmenu()
	{
	    $sql="SELECT * FROM admin_quickmenu_table where admin_id=".$_SESSION['adminid'];
		$qry=new Bin_Query();
		$qry->executeQuery($sql);
		
		return Display_DHeader::showQuickmenu($qry->records);
		
	}

	function showHelpTips($do,$action)
	{
// echo $do;
// echo "<pre>";
// echo $action;
// exit;
		$do_name = trim($do);
		$action_name= trim($action);
		
		if(!empty($do_name))
		{
			$query = new Bin_Query();
			if($action_name == '')
				$action_name='';
			else
				$action_name=$action_name;
	
			$sql = "SELECT help_description FROM admin_help WHERE do_name='".$do_name."' and action_name='".$action_name."'";
			if($query->executeQuery($sql))
				return $query->records[0]['help_description'];
		}
	}

	function showRightHelp()
	{
	    $sql="SELECT * FROM admin_help order by rand() limit 0,4";
		$qry=new Bin_Query();
		$qry->executeQuery($sql);
		return $qry->records;
		//return Display_DHeader::showRightHelp($qry->records);
		
	}

	
	

}

?>