Sh3ll
OdayForums


Server : Apache
System : Linux profile 3.10.0-1160.88.1.el7.x86_64 #1 SMP Tue Mar 7 15:41:52 UTC 2023 x86_64
User : apache ( 48)
PHP Version : 8.0.28
Disable Function : NONE
Directory :  /var/www/html/mmishra/erp-7-6-18/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //var/www/html/mmishra/erp-7-6-18/upload.php.bak
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  	<title>ERP @ IIITA</title>
	<base href="https://erp.iiita.ac.in/" />
	<meta charset="utf-8">
  	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<meta name="description" content="enterprise resource planning, institute resource planning, iiita resource planning" />
	<meta name="author" content="Dr. M.K. Mishra, System Analyst" />
	
	<link rel='SHORTCUT ICON' href="images/logo.ico" />
	<link rel="stylesheet" type="text/css" href="css/erp_style.css" media="screen" />
	<link rel="stylesheet" type="text/css" href="css/erp_menu.css" media="screen" />
	<link rel="stylesheet" type="text/css" href="css/calendar.css" media="screen" />
	<link rel="stylesheet" type="text/css" href="css/fontawesome-all.css" media="screen" />

  	<script type="text/javascript" src="js/calendar.js"></script>
	<script type="text/javascript" src="js/fontawesome-all.js"></script>
	<script type="text/javascript" src="js/jquery.min.js"></script>
	<script type="text/javascript" src="js/erp_ajax.js"></script>
	<!--<script type="text/javascript" src="js/jquery-1.10.2.js"></script>-->
</head>
<body style="background: url(images/banner6.jpg); background-size: 100% 50; background-repeat: no-repeat; background-position: left top;">
<?php
// This is the requirements for ERP Framework
session_start();

$url = isset($_SERVER['PATH_INFO']) ? explode('/', ltrim($_SERVER['PATH_INFO'],'/')) : '/';

if ($url[0] == '/') {
	header("Location: /");

} else if ($url[0] != '' && $url[1] != ''  && $url[2] != ''  && $url[3] != '' ) {
	// incoming request format /app/menu/action/tuple
	// app is application MVC to be invoked
	// menu is MVC method to be called
	// action is MVC action to be performed
	// tuple is record no. the MVC action is performed on
	//echo $_SERVER['PATH_INFO'];

    $app 	= $url[0]; 	// The first element should be an application controller
    $menu 	= $url[1];	// The second element should be a view method
    $action = $url[2];	// The third element should be a model action
    $tuple 	= $url[3];	// The fourth element should be a tuple 
    
    //$appParams = array_slice($url, 3); 
    // Initiate the appropriate controller and render the required view
    // Check if controller exists. NB: it is needed to check for model and view too
    
	if ($app != 'erp') {
		// include parent class files prior to child class file
		require_once(__DIR__.'/models/erp_model.php');
		require_once(__DIR__.'/controllers/erp_controller.php');
		require_once(__DIR__.'/views/erp_view.php');
	}
    $appModel 		= __DIR__.'/models/'.$app.'_model.php';
    $appController 	= __DIR__.'/controllers/'.$app.'_controller.php';
    $appView 		= __DIR__.'/views/'.$app.'_view.php';
    
    if (file_exists($appController) && file_exists($appModel) && file_exists($appView)) {

        require_once($appModel);
        require_once($appController);
        require_once($appView);

        $modelName      	= $app.'Model';
        $controllerName 	= $app.'Controller';
        $viewName       	= $app.'View';

        $appModel       	= new $modelName();
        $appController  	= new $controllerName($appModel);
        $appView        	= new $viewName($appController, $appModel);

		// set controllers appID and menuID
		$appController->app 	= $app;
		$appController->menu 	= $menu;
		$appController->action 	= $action;
		$appController->tuple 	= $tuple;
		// then we call the method via the view, dynamic call of the view
		$viewMethod = $app.ucwords($menu); // first and second parameter
		
		// render ERP Header
		print $appView->erpBanner();
		print $appView->erpHeader();
		print "<div class='contentbar' id='contentbar'>";
		print $appView->$viewMethod($action, $tuple); // third and fourth parameter    	
		print "</div>";
		
		print $appView->erpFooter();
	} else {
		print "Controller for this application does not exist.";
	}   		
} else {
	print 'ERP reports undesired URL ' .$_SERVER['PATH_INFO'];
}

?>
</body>
</html>


ZeroDay Forums Mini