HEX
Server: Apache
System: Linux 185.122.168.184.host.secureserver.net 5.14.0-570.52.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Oct 15 06:39:08 EDT 2025 x86_64
User: barbeatleanalyti (1024)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: /home/barbeatleanalyti/public_html/manage.beatleanalytics.com/manage.php 21-12-2018
<?php

	ob_start();
	//session_start();
	
	require_once("site/include/config.php");
	require_once("site/include/functions.php");
	require_once("site/include/dbClass.php");
	require_once("site/include/storeconfig.php");
	
	$objDB = new MySQLCN();
	
	$objDB->ClientID = FetchClientID();
	$objDB->MasterAdminID = FetchMasterAdminID();
	
	
	if($pg != "error" && $pg != "login" && $pg != 'messageuser'){
		//CheckUserLoginOrNot();
	}
	
	/* CREATE OBJECT OF STORE CONFIG to find out the store id */ 
	$storeconfig = new storeconfig();
	$storeconfigdata = $storeconfig->find_storeid(); 
	
	$error_path = "http://".$_SERVER['HTTP_HOST'].'/';
	define('ERROR_PATH',$error_path);
	error_reporting(0);
	if(count($storeconfigdata) > 0)
	{
		$StoreName 			=  $storeconfigdata[0]['StoreName'];
		$StoreDisplayName 	=  $storeconfigdata[0]['StoreDisplayName'];
		
		define("ADMIN_PATH", SERVERROOT_IMAGE."admin/site_images/".$StoreName."/");
		
		$appconfigdata = $storeconfig->fetch_appconfig();
		for($i=0; $i<count($appconfigdata);$i++)
		{
			if(!define($appconfigdata[$i]['ConfigName'],$appconfigdata[$i]['ConfigValue']) )
				define($appconfigdata[$i]['ConfigName'], $appconfigdata[$i]['ConfigValue']);
		}
	}

	define("_IMAGEPATH_",SERVERROOT_IMAGE."theme/".SITE_THEME."/images");

	$date = strftime("%Y-%m-%d", time());	
	
	if(empty($_REQUEST['pg']))
		$page = "error.php";
	else if(isset($_REQUEST['pg']))
		$page = $_REQUEST['pg'].".php";
	else
		$page = "error.php";
		
	// replace the file name content
	$clsName = str_replace(".php","",$page);
	$clsName = str_replace("-","_",$clsName);
	
	// Check the model file is exists or not.
	if(file_exists(INCLUDE_PATH."/".$page) || fopen(INCLUDE_PATH."/".$page,r) ){
		// include the model(include) file 
		include(INCLUDE_PATH."/".$page);
	
	}else{
		// Return post data
		ReturnPostFormData($ValidateArr = array(),"error.html","<span class='error-msg'>Model file <strong>".$pg.">>".$page."</strong> does not exist !</span>",1);
	}
	
	// Check the controler file is exists or not.
	if(file_exists(SCRIPT_PATH."/".$page) || fopen(SCRIPT_PATH."/".$page,r) ){
		// Include controller(script) file. 
		include_once(SCRIPT_PATH."/".$page);

		
	}else{
		// Post return data if controller file not exists.
		ReturnPostFormData($ValidateArr = array(),"error.html","<span class='error-msg'>Controller file <strong>".$pg."</strong> does not exist !</span>",1);
	}
	

	// Check controller class is exist or not
	if (class_exists("script_".$clsName)) {
			$clsNameContr = "script_".$clsName;

			// Create new object for controller file.
			$objDB->objController = new $clsNameContr($_REQUEST);

	}else{
	
		// Return post date if controller class does not exists.
		ReturnPostFormData($ValidateArr = array(),"error.html","<span class='error-msg'>Controller class <strong>".$clsNameContr."</strong> does not found !</span>",1);

	}	
		
	// Check model class exists or not.
	if (class_exists("include_".$clsName)) {
			//$objContr = "objC_{$clsName}";
			$clsNameModel = "include_".$clsName;
			
			
			// Create new object for model class.			
			$objDB->objModel = new $clsNameModel();
			
	}else{
		// Return post data if model file not exists.
		ReturnPostFormData($ValidateArr = array(),"error.html","<span class='error-msg'>Model class <strong>".$clsNameModel."</strong> does not found !</span>",1);
		
	}


	if( method_exists($objDB->objController,'Process') ){

		$objDB->objController->Process();
		
	}
	else{
		ReturnPostFormData($ValidateArr = array(),"error.html","<span class='error-msg'> <strong> Process </strong> method does not exist for <strong>".$pg."</strong> file !</span>",1);
	}

	
	$objDB->close();
?>