if($rights_group!='reception' && $rights_group!='rentals' ){
include 'breadcrumbs.php';
}
?>
include 'settings/ace_settings.php';
if($rights_group=='rentals' ){
include 'index_rentals.php';
}else{
//========================Home Page =============
if(strlen($page)<=0){
if($rights_group==""){
include 'guest/guest_menu.php';
include 'guest/home.php';
}else{
include 'tasks/visitors_menu.php';
if($rights_group!='agent'){
include 'tasks/visitors_find.php';
}
include 'tasks/visitors_home.php';
}
}
if($page=='salesagreement'){
include 'project_agreement.php';
}
if($page=='admin'){
include 'admin/admin_home.php';
}
if($page=='calls'){
include 'mcom/3cxreport.php';
}
if($page=="checker"){
include 'mainstaffchecker/checker_home.php';
}
if($page=='budget'){
include 'budget/budget_home.php';
}
if($page=='utility'){
include 'utils/utils.php';
}
//========================Accounting Page=============
if($page=='consult'){
include 'dpt_consult/work_home.php';
}
if($page=='hr-checker'){
include 'hr_checker/hr_home.php';
}if($page=='mlm_sale'){
include 'mlm_sale/mlm_home.php';
}if($page=='cashier'){
include 'cashier/cashier_home.php';
}
//constructionn page
if($page=='construction'){
include 'construction/construction_home.php';
}
//+++ Sales ++///
if($page=='sales'){
include 'sales/sales_home.php';
}
if($page=='utility'){
include 'utility/utilhome.php';
}
//renting
if($page=='renting'){
include 'project_rentals/project_rental_home.php';
}
//========================Accounting Page=============
if($page=='accounts'){
include 'accounts/acc_home.php';
}
if($page=='acc_finance'){
include 'finance/finance_home.php';
}
//========================Banking Page=============
if($page=='bank'){
// if($list_view ==0 ){
// include 'restricted_page.php';
// }else{
// include 'accounts/acc_menu.php';
include 'banking/banking_home.php';
// }
}
//===========================ict ======================
if($page=='ict'){
include 'dpt_ict/ict_home.php';
}
//===========================hr admin ======================
if($page=='hradmin'){
include 'hradmin/hr_home.php';
include'hradmin/add_hrcomm.php';
}
if($page=='supprofile'){
include 'accounts/supplier_approval.php';
}
if($page=='support'){
include 'support/support.php';
}
//===========================Checker ======================
if($page=='checker'){
include 'checker/checker_home.php';
}
//emails
if($page=='email'){
include 'mcom/emails.php';
}
//============================Task Manager========================
if($page=='tasks'){
if($task_action != 'new' && $task_action != 'tedit' && $task_action != 'view' && $task_action != 'tlist' ){
include 'tasks/visitors_menu.php';
}
if($task_action == '' ){
if($rights_group!='agent'){
include 'tasks/visitors_find.php';
}
include 'tasks/visitors_home.php';
}
if($task_action == 'sitevisit'){
include 'tasks/sitevisits.php';
}
if($task_action == 'vlist'){
if($rights_group!='agent'){
//include 'tasks/visitors_find.php';
}
include 'tasks/visitors_list.php';
}
if($task_action == 'tlist'){
include 'tasks/task_list.php';
}
if($task_action == 'checkin' || $task_action == 'vedit' ){
if($rights_group!='agent'){
include 'tasks/visitors_find.php';
}
include 'tasks/visitors_form.php';
}
if($task_action == 'new' || $task_action == 'tedit' ){
include 'tasks/task_form.php';
}
if($task_action == 'view'){
include 'tasks/task_details.php';
}
if($task_action == 'visitor'){
if($rights_group!='agent'){
include 'tasks/visitors_find.php';
}
include 'tasks/visitors_details.php';
}
if($task_action == 'refresh'){
include 'tasks/visitor_refreshments.php';
}
if($task_action == 'report'){
if($url_value[2]=="export"){
include 'tasks/visit_reports.php';
}else{
include 'tasks/visits_report_form.php';
include 'tasks/visits_report.php';
}
}
if($task_action == 'checker'){
include 'tasks/tasks_report_form.php';
if($carrier_id > 0 ){
include 'tasks/tasks_report.php';
}
}
if($task_action == 'logoff'){
include 'tasks/logoff.php';
}
}
//========================= Planner ============================
if($page=='planner'){
include 'planner.php';
}
//========================Projects Page=============
if($page=='project'){
if($list_view ==0 ){
include 'restricted_page.php';
}else{
if($listed_for=='Rent'){
$pdirectory = 'rentals';
}else{
$pdirectory = 'projects';
}
if($project_action=='open'){
include $pdirectory.'/open_units.php';
}else{
if($project_action=='all' || $project_action=='allclients'){
if($project_action=='allclients'){
include $pdirectory.'/all_clients_list.php';
}else{
include $pdirectory.'/all_projects_dashboard.php';
}
}else{
include $pdirectory.'/project_home.php';
}
}
}
}
//============================Campaigns Page========================
if($page=='campaign'){
if($campaign_view=='1'){
if($camp_action == '' || $camp_action=='home'){
include 'campaigns/campaign_home.php';
}
if($campaign_add=='1'){
if($camp_action=='new' || $camp_action=='links' || $camp_action=='perfomance'){
include 'campaigns/campaign_details.php';
}
}else{
include 'restricted_page.php';
}
if($camp_action=='list'){
include 'campaigns/campaigns_list.php';
}
if($camp_action=='analysis'){
include 'campaigns/campaign_analysis_list.php';
}
}else{
include 'restricted_page.php';
}
$lead_id='';
}
if($page=='reconcile-receivables'){
include 'banking/receivable_reconcilliation.php';
/*
if($rights_group=='admin'){
}else{
include 'restricted_page.php';
}*/
}
if($page=='requisition'){
include 'requisition/requisition.php';
/*
if($rights_group=='admin'){
}else{
include 'restricted_page.php';
}*/
}
//============================Leads Page========================
if($user_id=='26' || $user_id =='75' || $user_id =='71'|| $user_id =='160' || $user_id =='194'){
if($page=='lead'){
if($project_id !='' ){
include 'projects/project_menu.php';
}
if($lead_view ==0 ){
include 'restricted_page.php';
}else{
if($lead_action=='assign' && $project_id !='' ){
include 'reports/report_all_form.php';
include 'reports/report_all_leads.php';
}
if($lead_action=='author'){
include 'reports/report_author_form.php';
include 'reports/report_author_leads.php';
}
if($lead_action=='reminder'){
include 'reports/report_reminders_form.php';
include 'reports/report_reminders_list.php';
}
if($lead_action!='author' && $lead_action!='assign' && $lead_action!='reminder' ){
if($lead_id != 0){
include 'leads_details.php';
}else{
if($lead_view == 0){
include 'form_live_search.php';
}
include 'leads_table.php';
}
}
}
}
}
else{
if($page=='lead'){
if($project_id !='' ){
include 'projects/project_menu.php';
}
if($lead_view == 0 ){
include 'restricted_page.php';
}else{
if($lead_id != 0){
include 'leads_details.php';
}else{
// include 'leads_reports_header.php';
include 'leads_table.php';
}
}
}
}
//============================Clients Page========================
if($page=='partners'){
if($client_action!='archive'){
include 'projects/project_menu.php';
}
if($client_view == 0 && $client_booked == 0 ){
include 'restricted_page.php';
}else{
//===============by pass to remove
// if($user_id==160
if($user_id==160 || $user_id==194 || $user_id==75 || $user_id==71
|| $user_id =='141' || $user_id ==203 || $user_id == 26
)
{ $cl_directory='clients/';}else{ $cl_directory=''; }
//===============
if($client_id != 0 && $client_action!='archive'){
if($listed_for=='Sale'){
include 'client_details.php';
}
if($listed_for=='Rent'){
include 'tenants/tenant_details.php';
}
}else{
if($client_action=='documents'){
include $cl_directory.'clients_documents_excel.php';
include 'clients_documents_list.php';
}
if($client_action=='goodwill'){
include 'clients_goodwill.php';
}
if($client_action=='archive'){
if($archive_id > 0){
include 'carchive/archive_details.php';
}else{
include 'carchive/archive_list.php';
}
}
if($client_action!='documents' && $client_action!='archive' && $client_action!='goodwill' ){
if($listed_for=='Sale'){
include $cl_directory.'clients_table.php';
}
if($listed_for=='Rent'){
include 'tenants/tenants_list.php';
}
}
}
}
}
//============================New Client Page========================
if($page=='client'){
include 'projects/project_menu.php';
if($lead_add ==0 ){
include 'restricted_page.php';
}else
{
include 'form_new_lead.php';
}
}
if($page=='event'){
if($lead_type=='reports'){
//include 'projects/project_menu.php';
include 'tasks/event_report.php';
}else{
//include 'projects/project_menu.php';
include 'tasks/event_reception.php';
}
}
//============================Lead Report Page========================
if($page=='report'){
if($user_group != 'AGENT'){
include 'reports/reports_home.php';
}else{
include 'restricted_page.php';
}
}
//============================Banner Page========================
if($page=='banner'){
include 'form_banner_image.php';
}
//============================Projects Page========================
if($page=='listing'){
include 'form_register_listing.php';
}
if($page=='uploads'){
if($image_edit=='edit'){
include 'form_image_edit.php';
}else{
include 'form_image_load.php';
}
}
//============================Project View========================
if($page=='view'){
include 'projects/project_menu.php';
include 'listing_view.php';
}
//============================Mass Comm========================
if($page=='mcom'){
if($comm_bulksms ==0 && $comm_bulkemail ==0 ){
include 'restricted_page.php';
}else{
include 'mcom/mcom_index.php';
}
}
//============================Image Uploads Page========================
if($page=='gallery'){
if($gallery_action == 'all' || $gallery_action == ''){
include 'gallery_table.php';
}
if($gallery_action == 'view'){
include 'gallery_view.php';
}
if($gallery_action == 'new' || $gallery_action == 'edit' || $gallery_action == 'images' ){
include 'form_image_load.php';
}
}
//============================User Profile Page========================
if($page=='profile'){
$member_id = $user_id;
include 'account_profile.php';
}
//============================Register Users Page========================
if($page=='newmen'){
if($user_add==0){
include 'restricted_page.php';
}
else{
include 'account_users.php';
}
}
//============================Register Users Page========================
if($page=='agents'){
if($user_add==0){
include 'restricted_page.php';
}else{
if($agent_action == 'new'){
include 'account_agents.php';
}
if($agent_action == 'list' ){
include 'agents_list.php';
}
if($agent_action == 'view'){
include 'agent_details.php';
}
if($agent_action == 'commissions'){
include 'agent_monthly_comm.php';
}
if($agent_action == 'units'){
include 'agent_units.php';
}
if($agent_action == 'applications'){
include 'agent_applications.php';
}
if($agent_action == 'approve'){
include 'agent_approve.php';
}
}
}
//============================User Profile Page========================
if($page=='users'){
if($user_view==0){
include 'restricted_page.php';
}else{
if($member_id != 0 && is_numeric($member_id)){
include 'hradmin/user_details.php';
}else{
if($user_action=='fines'){
include 'users_fines_list.php';
}else{
include 'users_list.php';
}
}
}
}
//============================Content ========================
if($page=='blog' || $page=='video' || $page=='news' || $page=='aboutus' ){
if($co_action == '' || $co_action == 'all'){
include 'content_list.php';
}
if($co_action == 'new' || $co_action == 'edit'){
include 'content_form.php';
}
if($co_action == 'view'){
include 'content_view.php';
}
}
//============================Help Page========================
if($page=='help'){
if(!is_numeric($help_id) && $help_action !='form'){
include 'help/help_home.php';
}else{
if($help_action=='form'){
include 'help/help_form.php';
}else{
include 'help/help_view.php';
}
}
}
//============================Settings Page========================
if($page=='settings'){
if($rights_group=='admin'){
include 'settings/settings_home.php';
}else{
include 'restricted_page.php';
}
}
}//End if not rental
?>