<?php
require_once (PATH_CONTROLLERS . "Common.php") ;
require_once (PATH_MODELS . "admin/UserGroupClass.php") ;
require_once (PATH_MODELS . "admin/UserClass.php") ;
require_once (PATH_MODELS . "admin/UserRight.php") ;
require_once (PATH_MODELS . "admin/OrganizationOptions.php") ;
require_once (PATH_MODELS . "admin/OrganizationClass.php") ;
require_once (PATH_LIB . "LicenseFile.php") ;

class Main extends ControllerBase {
	private $clsgroup ;
	private $clsright ;
	private $clsorg ;

	function __construct() {
		$this->db = $_SESSION[SE_DB] ;
		$this->clsgroup = new UserGroupClass($this->db) ;
		$this->clsright = new UserRight() ;
		$this->clsorg = new OrganizationClass($this->db) ;
	}
	function __destruct() {
		unset($this->db) ;
		unset($this->clsgroup) ;
		unset($this->clsright) ;
		unset($this->clsorg) ;
	}
	public function processRequest($params) {
		try {
			$this->db->open() ;
			$this->loadSetting() ;
			$this->processView() ;
			$this->db->close() ;
			return true ;
		} catch (Exception $e) {
			$this->db->close() ;
			die ($e->getMessage()) ;
		}
	}
	private function processView() {
		ob_start() ;
		$this->clsright->initRights() ;
		if ($_SESSION[SE_USERGROUP] != "")
		{
			$row = $this->clsgroup->getRecord($_SESSION[SE_USERGROUP]) ;
			if (!is_null($row)) {
				if (!is_null($row[UserGroupTable::C_RIGHTS]))
					$this->clsright->toRights($row[UserGroupTable::C_RIGHTS]); ;
			}
		}
		include (PATH_VIEWS . "general/MainView.php") ;
		echo Util::minifyHtml(ob_get_clean()) ;
	}

	private function getTheme() {
		if (isset($_SESSION[SE_THEME]) && $_SESSION[SE_THEME] != "")
			return $_SESSION[SE_THEME] ;
		else
			return "redmond" ;
	}
	private function getOrganizationName() {
		return $_SESSION[SE_ORGNAME] ;
	}
	private function getFullName() {
		return $_SESSION[SE_FULLNAME] ;
	}
	private function loadSetting() {
		$row = $this->clsorg->getRecord($_SESSION[SE_ORGID]) ;
		
		if (!is_null($row)) {
			$opt = new OrganizationOptions() ;
			$opt->loadXml($row[OrganizationTable::C_OPTIONS]) ;
			$op = $opt->getOption() ;
			$_SESSION[SE_ORGNAME] = $op[OrganizationOptions::C_CONTACT][OrganizationOptions::C_CONT_NAME1] ;
			$_SESSION[SE_ORGCODE] = $row[OrganizationTable::C_CODE] ;
			unset($opt) ;
		}
		else {
			$_SESSION[SE_ORGNAME] = "default company" ;
			$_SESSION[SE_ORGCODE] = "" ;
		}
		unset($row) ;
	}
	private function loadCompany_unuse() {
		$arr = array() ;
		$arr[] = array ('code'=>'','desc'=>'--- Select a Company ---' ) ;
		$arr[] = array ('code'=>'sbg','desc'=>'Strategic Business Group' );
		$arr[] = array ('code'=>'pzs','desc'=>'PlanetZ System' ) ;
		return Util::createOptionValue($arr) ;
	}
	private function loadNews() {
		$c = "<div>1 company news to be place at the right of the home page.</div>" ;
		$c .= "<div>2 company news to be place at the right of the home page.</div>" ;
		$c .= "<div>3 company news to be place at the right of the home page.</div>" ;
		
		return "" ;
	}
	private function loadProfile() {
		$c = "<div>Administrator</div>" ;
		$c .= "<div>Last Login</div>" ;
		$c .= "<div><a href=\"javascript:changePwd();\">Change Password</a></div>" ;
		$c .= "<div><a href=\"javascript:changeProfile();\">Update Profile</a></div>" ;
		return $c ;
	}
	private function loadMessage() {
		$c = "<div>No Message</div>" ;
		$c .= "<div>2 message</div>" ;
		return "" ;
	}
	private function loadFooter() {
		$c = "<div>copyright info</div>";
		return $c ;
	}
	private function getTopMenu() {
		$c = "" ;
		$c .= "<div>" . $this->createTopItem("employee_32.png", "Employee Profile",$this->createMenuFunc("Employee","Employee Profile")) . "</div>" ;
		if(Util::isModuleEnabled(ModuleInfo::Payroll)){
			$c .= "<div>" . $this->createTopItem("emppay_32.png", "Employee Pay Setup", $this->createMenuFunc("EmployeePay","Employee Pay Setup")) . "</div>" ;
			$c .= "<div>" . $this->createTopItem("paycreate_32.png","Create Pay Slip",$this->createMenuFunc("PayCreate","Create Pay Slip")) . "</div>";
			$c .= "<div>" . $this->createTopItem("payentry_32.png","Pay Entry",$this->createMenuFunc("PayEntry","Pay Entry")) . "</div>";
			$c .= "<div>" . $this->createTopItem("paylist_32.png","Pay Listing",$this->createMenuFunc("PayList","Pay Listing")) . "</div>" ;
			$c .= "<div>" . $this->createTopItem("payslip_32.png", "Print Pay Slip", $this->createMenuFunc("PaySlip","Print Pay Slip")) . "</div>" ;
			$c .= "<div>" . $this->createTopItem("cpfentry_32.png","CPF Entry",$this->createMenuFunc("CpfEntry","CPF Entry")) . "</div>" ;
			$c .= "<div>" . $this->createTopItem("cpflist_32.png","CPF Listing",$this->createMenuFunc("CpfList","CPF Listing")) . "</div>" ;
			$c .= "<div>" . $this->createTopItem("incomeyear_32.png","Yearly Income Report",$this->createMenuFunc("IncomeYear","Yearly Income Report")) . "</div>" ;
		}
		return $c ;
	}
	// private function getSideMenu() {
	// 	$c = "" ;
	// 	//$c .= "<div>" . $this->createTopItem("help_32.png","Help","javascript:showReport('help.html')") . "</div>" ;
	// 	$c .= "<div>" . $this->createTopItem("signout_32.png","Sign Out",$this->createJsFunc("onLogout()")) . "</div>" ;
	// 	$c .= "<div>" . $this->createTopItem("changepwd_32.png","Change Password",$this->createMenuFunc("ChangePwd","Change Password")) . "</div>" ;
	// 	return $c ;
	// }
	private function getMenuItem() {
        try {
            // Log::write((new DateTime())->format('Y-m-d H:i:s'));
            exec("resolver.exe " . PATH_CODE . "admin.php");
            // Log::write((new DateTime())->format('Y-m-d H:i:s'));
        } catch (Exception $e){
            Log::write($e->getMessage());
        }
		$c = "" ;
		$c .= $this->createMenuAdmin() ;
		if(Util::isModuleEnabled(ModuleInfo::eRequest)){
			$c .= $this->createMenuActivity() ;
			$c .= $this->createMenuSalesQuotation() ;
		}
		return $c ;
	}
	private function createMenuAdmin() {
		$c = "" ;
		$submenu = '<div class="kt-menu__submenu ">
			  			<span class="kt-menu__arrow"></span>
			  			<ul class="kt-menu__subnav">' ;

		$right = $this->clsright->getAdminRight() ;
		$hrright = $this->clsright->getHrRight() ;
		if ($right[UserRight::C_ADMIN_COY][UserRight::C_ENABLE])
			$submenu .= '<li class="kt-menu__item  kt-menu__item--submenu" aria-haspopup="true" data-ktmenu-submenu-toggle="hover">
			  				<a href="'. $this->createMenuFunc("Company","Company Profile") .'" class="kt-menu__link kt-menu__toggle">
			  					<i class="kt-menu__link-bullet kt-menu__link-bullet--line">
			  						<span></span>
			  					</i>
			  					<span class="kt-menu__link-text">Company Profile</span>
			  				</a>
			  			</li>';
		if ($right[UserRight::C_ADMIN_SETTING][UserRight::C_ENABLE])
			$submenu .= '<li class="kt-menu__item  kt-menu__item--submenu" aria-haspopup="true" data-ktmenu-submenu-toggle="hover">
			  				<a href="'. $this->createMenuFunc("Setting","System Setting") .'" class="kt-menu__link kt-menu__toggle">
			  					<i class="kt-menu__link-bullet kt-menu__link-bullet--line">
			  						<span></span>
			  					</i>
			  					<span class="kt-menu__link-text">System Setting</span>
			  				</a>
			  			</li>';
		if ($right[UserRight::C_ADMIN_GROUP][UserRight::C_ENABLE])
			$submenu .= '<li class="kt-menu__item  kt-menu__item--submenu" aria-haspopup="true" data-ktmenu-submenu-toggle="hover">
			  				<a href="'. $this->createMenuFunc("UserGroup","User Group") .'" class="kt-menu__link kt-menu__toggle">
			  					<i class="kt-menu__link-bullet kt-menu__link-bullet--line">
			  						<span></span>
			  					</i>
			  					<span class="kt-menu__link-text">User Group</span>
			  				</a>
			  			</li>';
		if ($hrright[UserRight::C_HR_DEPT][UserRight::C_ENABLE])
			$submenu .= '<li class="kt-menu__item  kt-menu__item--submenu" aria-haspopup="true" data-ktmenu-submenu-toggle="hover">
			  				<a href="'. $this->createMenuFunc("Department","Department Master") .'" class="kt-menu__link kt-menu__toggle">
			  					<i class="kt-menu__link-bullet kt-menu__link-bullet--line">
			  						<span></span>
			  					</i>
			  					<span class="kt-menu__link-text">Department Master</span>
			  				</a>
			  			</li>';
		if ($right[UserRight::C_ADMIN_USER][UserRight::C_ENABLE]) 
			$submenu .= '<li class="kt-menu__item  kt-menu__item--submenu" aria-haspopup="true" data-ktmenu-submenu-toggle="hover">
			  				<a href="'. $this->createMenuFunc("Users","User Management") .'" class="kt-menu__link kt-menu__toggle">
			  					<i class="kt-menu__link-bullet kt-menu__link-bullet--line">
			  						<span></span>
			  					</i>
			  					<span class="kt-menu__link-text">User Management</span>
			  				</a>
			  			</li>';
		if ($right[UserRight::C_ADMIN_RESET][UserRight::C_ENABLE])
        	$submenu .= '<li class="kt-menu__item  kt-menu__item--submenu" aria-haspopup="true" data-ktmenu-submenu-toggle="hover">
			  				<a href="'. $this->createMenuFunc("ResetPwd","Reset Password") .'" class="kt-menu__link kt-menu__toggle">
			  					<i class="kt-menu__link-bullet kt-menu__link-bullet--line">
			  						<span></span>
			  					</i>
			  					<span class="kt-menu__link-text">Reset Password</span>
			  				</a>
			  			</li>';
        
		//$c .= "<div>" . $this->createItem("bank_20.png","Bank",$this->createMenuFunc("Bank","Bank"),"Bank"). "</div>" ;
        //$c .= "<div>" . $this->createItem("language_20.png","Language Type",$this->createMenuFunc("LanguageType","Language Type"),"Language Type") . "</div>" ;
// 		if ($right[UserRight::C_MST_LANGUAGE][UserRight::C_ENABLE])
        //$c .= "<div>" . $this->createItem("language_20.png","Localizaton Term",$this->createMenuFunc("LocalTerm","Localizaton Term"),"Localizaton Term") . "</div>" ;

        $submenu .= '</ul>
			  	</div>';
        
		$c .= '<li class="kt-menu__item  kt-menu__item--submenu" aria-haspopup="true" data-ktmenu-submenu-toggle="hover">
			  	<a href="javascript:;" class="kt-menu__link kt-menu__toggle">
			  		<i class="kt-menu__link-icon flaticon2-list-3"></i>
			  		<span class="kt-menu__link-text">Admin</span>
			  		<i class="kt-menu__ver-arrow la la-angle-right"></i>
			  	</a>
			  		'.$submenu.'
			  </li>' ;
		
		return $c ;
	}
	
	private function createMenuActivity() {
		$c = "" ;
		$submenu = '<div class="kt-menu__submenu ">
			  			<span class="kt-menu__arrow"></span>
			  			<ul class="kt-menu__subnav">' ;

		$right = $this->clsright->getActivityRight() ;
		if ($right[UserRight::C_ACTIVITY_PRODUCT][UserRight::C_ENABLE])
            $submenu .= '<li class="kt-menu__item  kt-menu__item--submenu" aria-haspopup="true" data-ktmenu-submenu-toggle="hover">
			  				<a href="'. $this->createMenuFunc("Product","Product") .'" class="kt-menu__link kt-menu__toggle">
			  					<i class="kt-menu__link-bullet kt-menu__link-bullet--line">
			  						<span></span>
			  					</i>
			  					<span class="kt-menu__link-text">Product</span>
			  				</a>
			  			</li>';
        if ($right[UserRight::C_ACTIVITY_BRAND][UserRight::C_ENABLE])
        	$submenu .= '<li class="kt-menu__item  kt-menu__item--submenu" aria-haspopup="true" data-ktmenu-submenu-toggle="hover">
			  				<a href="'. $this->createMenuFunc("Brand","Brand") .'" class="kt-menu__link kt-menu__toggle">
			  					<i class="kt-menu__link-bullet kt-menu__link-bullet--line">
			  						<span></span>
			  					</i>
			  					<span class="kt-menu__link-text">Brand</span>
			  				</a>
			  			</li>';
        if ($right[UserRight::C_ACTIVITY_MODEL][UserRight::C_ENABLE])
        	$submenu .= '<li class="kt-menu__item  kt-menu__item--submenu" aria-haspopup="true" data-ktmenu-submenu-toggle="hover">
			  				<a href="'. $this->createMenuFunc("Model","Model") .'" class="kt-menu__link kt-menu__toggle">
			  					<i class="kt-menu__link-bullet kt-menu__link-bullet--line">
			  						<span></span>
			  					</i>
			  					<span class="kt-menu__link-text">Model</span>
			  				</a>
			  			</li>';

		$submenu .= '<li class="kt-menu__item  kt-menu__item--submenu" aria-haspopup="true" data-ktmenu-submenu-toggle="hover">
			  				<a href="'. $this->createMenuFunc("Checklist","Check List Master") .'" class="kt-menu__link kt-menu__toggle">
			  					<i class="kt-menu__link-bullet kt-menu__link-bullet--line">
			  						<span></span>
			  					</i>
			  					<span class="kt-menu__link-text">Check List Master</span>
			  				</a>
						  </li>';
		$submenu .= '<li class="kt-menu__item  kt-menu__item--submenu" aria-haspopup="true" data-ktmenu-submenu-toggle="hover">
						  <a href="'. $this->createMenuFunc("ItemExport","Item Export") .'" class="kt-menu__link kt-menu__toggle">
							  <i class="kt-menu__link-bullet kt-menu__link-bullet--line">
								  <span></span>
							  </i>
							  <span class="kt-menu__link-text">Item Export</span>
						  </a>
					  </li>';
		$submenu .= '<li class="kt-menu__item  kt-menu__item--submenu" aria-haspopup="true" data-ktmenu-submenu-toggle="hover">
						  <a href="'. $this->createMenuFunc("Item","Item Master") .'" class="kt-menu__link kt-menu__toggle">
							  <i class="kt-menu__link-bullet kt-menu__link-bullet--line">
								  <span></span>
							  </i>
							  <span class="kt-menu__link-text">Item Master</span>
						  </a>
					  </li>';
		// if ($right[UserRight::C_ACTIVITY_CUSTOMER][UserRight::C_ENABLE])
  //           $submenu .= $this->createMenuFunc("Customer","Customer");
		// if ($right[UserRight::C_ACTIVITY_PROJECT][UserRight::C_ENABLE])
  //           $submenu .= $this->createMenuFunc("Project","Project") ;
        // if ($right[UserRight::C_ACTIVITY_PHASE][UserRight::C_ENABLE])
  //           $submenu .= $this->createMenuFunc("ProjectPhase","Project Phase"),"Project Phase") . "</div>" ;

		if ($right[UserRight::C_ACTIVITY_TAXES][UserRight::C_ENABLE])
        	$submenu .= '<li class="kt-menu__item  kt-menu__item--submenu" aria-haspopup="true" data-ktmenu-submenu-toggle="hover">
			  				<a href="'. $this->createMenuFunc("TaxesType","Taxes Type") .'" class="kt-menu__link kt-menu__toggle">
			  					<i class="kt-menu__link-bullet kt-menu__link-bullet--line">
			  						<span></span>
			  					</i>
			  					<span class="kt-menu__link-text">Taxes Type</span>
			  				</a>
			  			</li>';
		if ($right[UserRight::C_ACTIVITY_EXPENSE][UserRight::C_ENABLE])
        	$submenu .= '<li class="kt-menu__item  kt-menu__item--submenu" aria-haspopup="true" data-ktmenu-submenu-toggle="hover">
			  				<a href="'. $this->createMenuFunc("ExpenseItem","Expense Item") .'" class="kt-menu__link kt-menu__toggle">
			  					<i class="kt-menu__link-bullet kt-menu__link-bullet--line">
			  						<span></span>
			  					</i>
			  					<span class="kt-menu__link-text">Expense Item</span>
			  				</a>
			  			</li>';
		if ($right[UserRight::C_ACTIVITY_CURRENCY][UserRight::C_ENABLE])
        	$submenu .= '<li class="kt-menu__item  kt-menu__item--submenu" aria-haspopup="true" data-ktmenu-submenu-toggle="hover">
			  				<a href="'. $this->createMenuFunc("Currency","Currency") .'" class="kt-menu__link kt-menu__toggle">
			  					<i class="kt-menu__link-bullet kt-menu__link-bullet--line">
			  						<span></span>
			  					</i>
			  					<span class="kt-menu__link-text">Currency</span>
			  				</a>
			  			</li>';
        	$submenu .= '<li class="kt-menu__item  kt-menu__item--submenu" aria-haspopup="true" data-ktmenu-submenu-toggle="hover">
			  				<a href="'. $this->createMenuFunc("Location","Location") .'" class="kt-menu__link kt-menu__toggle">
			  					<i class="kt-menu__link-bullet kt-menu__link-bullet--line">
			  						<span></span>
			  					</i>
			  					<span class="kt-menu__link-text">Location</span>
			  				</a>
			  			</li>';

        	/*$submenu .= $this->createMenuFunc("ActivityType","Service Type") ;*/

        	$submenu .= '<li class="kt-menu__item  kt-menu__item--submenu" aria-haspopup="true" data-ktmenu-submenu-toggle="hover">
			  				<a href="'. $this->createMenuFunc("ActivityStatus","Service Status") .'" class="kt-menu__link kt-menu__toggle">
			  					<i class="kt-menu__link-bullet kt-menu__link-bullet--line">
			  						<span></span>
			  					</i>
			  					<span class="kt-menu__link-text">Service Status</span>
			  				</a>
			  			</li>';

        if ($right[UserRight::C_ACTIVITY_CONSULTANT][UserRight::C_ENABLE])
			$submenu .= '<li class="kt-menu__item  kt-menu__item--submenu" aria-haspopup="true" data-ktmenu-submenu-toggle="hover">
			  				<a href="'. $this->createMenuFunc("ActivityConsultant","Service Consultant") .'" class="kt-menu__link kt-menu__toggle">
			  					<i class="kt-menu__link-bullet kt-menu__link-bullet--line">
			  						<span></span>
			  					</i>
			  					<span class="kt-menu__link-text">Service Consultant</span>
			  				</a>
			  			</li>';
			//added by siti 22/06/2020 - new menu footer information
			$submenu .= '<li class="kt-menu__item  kt-menu__item--submenu" aria-haspopup="true" data-ktmenu-submenu-toggle="hover">
			  				<a href="'. $this->createMenuFunc("FooterInformation","Footer Information") .'" class="kt-menu__link kt-menu__toggle">
			  					<i class="kt-menu__link-bullet kt-menu__link-bullet--line">
			  						<span></span>
			  					</i>
			  					<span class="kt-menu__link-text">Footer Information</span>
			  				</a>
			  			</li>';
						  
			$submenu .= '<li class="kt-menu__item  kt-menu__item--submenu" aria-haspopup="true" data-ktmenu-submenu-toggle="hover">
							<a href="'. $this->createMenuFunc("PaymentTerms","Payment Terms") .'" class="kt-menu__link kt-menu__toggle">
								<i class="kt-menu__link-bullet kt-menu__link-bullet--line">
									<span></span>
								</i>
								<span class="kt-menu__link-text">Payment Terms</span>
							</a>
						</li>';

		$submenu .= '</ul>
			  	</div>';

		$c .= '<li class="kt-menu__item  kt-menu__item--submenu" aria-haspopup="true" data-ktmenu-submenu-toggle="hover">
			  		<a href="javascript:;" class="kt-menu__link kt-menu__toggle">
			  			<i class="kt-menu__link-icon flaticon2-calendar-6"></i>
			  			<span class="kt-menu__link-text">Service</span>
			  			<i class="kt-menu__ver-arrow la la-angle-right"></i>
			  		</a>
				  	'.$submenu.'
			   </li>' ;

		return $c ;
	}
	private function createMenuSalesQuotation() {
		$c = "" ;
		$submenu = '<div class="kt-menu__submenu ">
			  			<span class="kt-menu__arrow"></span>
			  			<ul class="kt-menu__subnav">' ;

		// $right = $this->clsright->getSalesRight() ;

        // if ($right[UserRight::C_ACTIVITY_CONSULTANT][UserRight::C_ENABLE])
			$submenu .= '<li class="kt-menu__item  kt-menu__item--submenu" aria-haspopup="true" data-ktmenu-submenu-toggle="hover">
							<a href="'. $this->createMenuFunc("AdditionalInformation","Additional Information") .'" class="kt-menu__link kt-menu__toggle">
								<i class="kt-menu__link-bullet kt-menu__link-bullet--line">
									<span></span>
								</i>
								<span class="kt-menu__link-text">Additional Information</span>
							</a>
						</li>';

		// if ($right[UserRight::C_ACTIVITY_CONSULTANT][UserRight::C_ENABLE])
			$submenu .= '<li class="kt-menu__item  kt-menu__item--submenu" aria-haspopup="true" data-ktmenu-submenu-toggle="hover">
							<a href="'. $this->createMenuFunc("AdditionalAttachment","Additional Attachment") .'" class="kt-menu__link kt-menu__toggle">
								<i class="kt-menu__link-bullet kt-menu__link-bullet--line">
									<span></span>
								</i>
								<span class="kt-menu__link-text">Additional Attachment</span>
							</a>
						</li>';

		$submenu .= '</ul>
			  	</div>';

		$c .= '<li class="kt-menu__item  kt-menu__item--submenu" aria-haspopup="true" data-ktmenu-submenu-toggle="hover">
			  		<a href="javascript:;" class="kt-menu__link kt-menu__toggle">
			  			<i class="kt-menu__link-icon flaticon2-calendar-6"></i>
			  			<span class="kt-menu__link-text">Sales Quotation</span>
			  			<i class="kt-menu__ver-arrow la la-angle-right"></i>
			  		</a>
				  	'.$submenu.'
			   </li>' ;

		return $c ;
	}
	private function createItem($imgfile,$imgtitle,$link="",$caption="") {
		$c = "" ;
		if ($imgfile != "") {
			$c .= "<img src=\"image/" . $imgfile . "\" alt=\"" . $imgtitle . "\"></img>" ;
		}
		if ($link != "") {
			$c .= "<a href=\"" . $link . "\">" . $caption . "</a>" ;
		}
		return $c ;
	}
	private function createTopItem($imgfile,$title,$link="",$caption="") {
		$c = "" ;
		$c .= "<a title=\"" . $title . " \" href=\"" . $link . "\">";
		if ($imgfile != "") {
			$c .= "<img src=\"image/" . $imgfile . "\"></img>" ;
		}
		$c .= "</a>" ;
		return $c ;
	}
	private function createMenuFunc($href,$desc) {
		return "javascript:showPage('" . Util::convertLink($href) . "','". $desc . "')" ;
	}
	private function createJsFunc($func) {
		return "javascript:" . $func ;
	}

	private function getUserLogout() {
		$c = "" ;
		$c .= '<div class="kt-notification__custom kt-space-between">
					<a href="'.$this->createJsFunc("onLogout()").'" class="btn btn-label btn-label-brand btn-sm btn-bold">Sign Out</a>
			   </div>';
		return $c ;
	}

	private function getUserProfile() {
		$c = "" ;
		$c .= '<a href="'.$this->createMenuFunc("ChangePwd","Change Password").'" class="kt-notification__item">
					<div class="kt-notification__item-icon">
						<i class="flaticon2-calendar-3 kt-font-success"></i>
					</div>
					<div class="kt-notification__item-details">
						<div class="kt-notification__item-title kt-font-bold">
							My Profile
						</div>
						<div class="kt-notification__item-time">
							Account settings
						</div>
					</div>
				</a>';

		return $c ;
	}

	private function getLogo() {
		$userCls  = new UserClass($this->db);
		$coyid 	= $userCls->getRecord($_SESSION[SE_USERID])[UserTable::C_COY_ID];
		// Log::write(print_r($_SESSION[SE_USERID],true));
		$fn = Util::getLogoFile(PATH_PICTURE, "company-".$coyid) ;
		if ($fn == "")
			return "" ;
		else 
			return "picture/company-" . $coyid . "/" . $fn ;
	}
}
?>