ok

Mini Shell

Direktori : /proc/self/root/proc/thread-self/root/usr/local/sitepad/www/www/www/themes/default/
Upload File :
Current File : //proc/self/root/proc/thread-self/root/usr/local/sitepad/www/www/www/themes/default/hf_theme.php

<?php

//////////////////////////////////////////////////////////////
//===========================================================
// hf_theme.php
//===========================================================
// SOFTACULOUS 
// Version : 1.1
// Inspired by the DESIRE to be the BEST OF ALL
// ----------------------------------------------------------
// Started by: Alons
// Date:       10th Jan 2009
// Time:       21:00 hrs
// Site:       http://www.softaculous.com/ (SOFTACULOUS)
// ----------------------------------------------------------
// Please Read the Terms of use at http://www.softaculous.com
// ----------------------------------------------------------
//===========================================================
// (c)Softaculous Inc.
//===========================================================
//////////////////////////////////////////////////////////////

if(!defined('SITEPAD') && !defined('SITEMUSH')){

	die('Hacking Attempt');

}

function js_url(){
	
	$js['givejs'] = func_get_args();
	return $GLOBALS['globals']['ind'].http_build_query($js).'&'.$GLOBALS['globals']['version'];
		
}

function softheader($title = '', $leftbody = true){

global $theme, $user, $logged_in, $globals, $l, $dmenus, $onload, $newslinks, $feeds, $nupanel, $iscripts, $catwise, $allcatwise, $soft, $classes_categories, $scripts, $apps, $apps_catwise;
	if(optGET('jsnohf')){
		return true;
	}
	//r_print($user['color_theme']);
	/* <script language="javascript" src="'.js_url('js/jquery.js', 'js/universal.js', 'js/suggest.js', 'js/smoothscroll.js', 'js/slider.js', 'js/dock.js').'" type="text/javascript"> </script> */
	$title = ((empty($title)) ? $globals['sn'] : $title);
	
	// Is there a Panel Header ?
	if(!empty($nupanel->pheader)){
		echo $nupanel->pheader;
	}
	
	//Lets echo the top headers
	echo '
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset='.$globals['charset'].'" />
	<meta name="keywords" content="softaculous, software" />
	<meta name="viewport" content="width=device-width,initial-scale=1.0" />
	<title>'.$title.'</title>
	<link rel="stylesheet" type="text/css" href="'.$theme['url'].'/bootstrap/css/bootstrap.css?'.$GLOBALS['globals']['version'].'" />
	<link rel="stylesheet" type="text/css" href="'.$theme['url'].'/style.css?'.$GLOBALS['globals']['version'].'" />
	<link rel="stylesheet" type="text/css" href="'.$theme['url'].'/font-awesome.css?'.$GLOBALS['globals']['version'].'" />
	<!--[if IE 7]>
	<link rel="stylesheet" type="text/css" href="'.$theme['url'].'/ie7.css?'.$GLOBALS['globals']['version'].'">
	<![endif]-->
	<!-- TODO: branding -->
	<link rel="shortcut icon" href="'.$theme['images'].'/favicon.ico" />';
	
	
	echo '<!--[if lt IE 9]>
	  <script src="'.$theme['url'].'/bootstrap/js/html5.min.js"></script>
	  <script src="'.$theme['url'].'/bootstrap/js/respond.min.js"></script>
	<![endif]-->
	<script language="javascript" src="'.$theme['url'].'/js/combined.js" type="text/javascript"> </script>
	<script language="javascript" src="'.$theme['url'].'/bootstrap/js/bootstrap.bundle.min.js" type="text/javascript"> </script>
	<script language="javascript" type="text/javascript"><!-- // --><![CDATA[
	</script>';		
echo '
</head>

<body onload="bodyonload();">';
	
echo '
	<table width="100%" cellspacing="0" cellpadding="0" border="0">
		<tr>
			<td>
				<table width="100%" border="0" cellspacing="0" cellpadding="0" class="soft_nav">								
					<tr>
						<td width="'.(!empty($nupanel->leftpanel_resize) ? '192' : '220').'" id="header_logo">
							<a href="'.$globals['ind'].'" style="margin:20px;white-space: nowrap;"><img src="'.(empty($globals['logo_url']) ? $theme['images'].'sitepad_48.png' : $globals['logo_url']).'" alt="" height="'.(!empty($nupanel->leftpanel_resize) ? '55' : '40').'" class="header_logo"/><span style="vertical-align: middle;font-size:30px;color:#fff;font-weight: normal;margin-left: 5px;">'.(!empty($globals['sm_brand']) ? $globals['sm_brand'] : 'SitePad' ).'</span></a>
						</td>';
						$top_bar = (!empty($globals['panel_hf']) && !empty($nupanel->can_shrink_nativeui) ? '<td width="40" align="center">&nbsp;&nbsp;<a href="javascript:set_pheader();" id="pheader_view" ><img src="'.$theme['images'].(empty($_COOKIE['pheader']) || $_COOKIE['pheader'] == 'yes' ? 'expand.png" title="'.$l['expand_view'].'"' : 'collapse.png" title="'.$l['collapse_view'].'"').'></a></td>'  : '');
						$pre_selected_ind = array('php', 'perl', 'java', 'python');						

						$top_bar .= '
						<td>&nbsp;</td>
						<td>&nbsp;</td>
						<td>&nbsp;</td>
						<td>&nbsp;</td>
						<td>&nbsp;</td>';
									
						$top_bar1 = (empty($globals['off_panel_link']) ? '<td align="center" width="32" class="someclass" title="'.$l['go_cpanel'].'"><a href="'.$nupanel->theme['panel_url'].'"><i class="fa sai-control_panel fa-2x"></i></a></td>' : '').'
						
						'.(!empty($user['apikey']) ? '<td align="center" width="32" class="someclass" title="'.$l['access_old_editor'].'"><a href="'.$globals['ind'].'act=sitemush"><i class="fa sai-pfx_icon fa-2x"></i></a></td>' : '').'

						<td align="center" width="32" class="someclass" title="'.$l['go_settings'].'"><a href="'.$globals['ind'].'act=settings"><i class="fa sai-settings fa-1x"></i></a></td>

						<td align="center" width="32" class="someclass" title="'.$l['backup_restore'].'"><a href="'.$globals['ind'].'act=backups"><i class="fa sai-backup fa-1x"></i></a></td>
						
						<td align="center" width="32" class="someclass" title="'.$l['go_support'].'"><a href="'.$globals['ind'].'act=help"><i class="fa sai-question fa-1x"></i></a></td>
						
						<td align="center" width="32" class="someclass" title="'.$l['go_logout'].'">
							<a href="'.$nupanel->theme['logout'].'"><i class="fa sai-logout fa-1x"></i></a>
						</td>
						<td align="center" width="100" class="someclass">
							&nbsp; '.$l['welcome'].' <b>'.(empty($nupanel->user['displayname']) ? $nupanel->user['name'] : $nupanel->user['displayname']).'</b>
						</td>';
						
							echo $top_bar.$top_bar1;
							
							echo '</tr>
				</table>
			</td>
		</tr>
	</table>
<script>
$(document).ready(function(){
	$(".someclass").tooltip();
});
</script>';
	
	// Body table
	echo '<table width="100%" cellspacing="0" cellpadding="0" border="0" > 
		<tr>
			
			<td width="220" valign="top" class="site-menu-header-td" rowspan="2">
				<div class="site-menu-header">
					<ul class="site-nav">
						<li>
							<a class="site-nav-link" href="'.$globals['index'].'act=dashboard"><i class="fa sai-dashboard fa-lg"></i>&nbsp;&nbsp;'.$l['dashboard'].'</a>
						</li>
						<li>
							<a class="site-nav-link" href="'.$globals['index'].'act=all_sites"><i class="fa sai-installations fa-lg"></i>&nbsp;&nbsp;'.$l['all_sites'].'</a>
						</li>
						<li>
							<a class="site-nav-link" href="'.$globals['index'].'act=new_site"><i class="fa sai-www fa-lg"></i>&nbsp;&nbsp;'.$l['add_sites'].'</a>
						</li>
						<li>
							<a class="site-nav-link" href="'.$globals['index'].'act=clone_site"><i class="fa sai-copy fa-lg"></i>&nbsp;&nbsp;'.$l['clone_sites'].'</a>
						</li>
						<li>
							<hr>
						</li>
						<li>
							<a class="site-nav-link" href="'.$nupanel->theme['domains_url'].'" target="_blank"><i class="fa sai-web_servers fa-lg"></i>&nbsp;&nbsp;'.$l['domains'].'</a>
						</li>
						<li>
							<a class="site-nav-link" href="'.$globals['index'].'act=import_site"><i class="fa sai-upload fa-lg"></i>&nbsp;&nbsp;'.$l['import_site'].'</a>
						</li>
					</ul>
				</div>
			</td>
			
			<td valign="top">';


	//Everything else will go here
	echo '
		<div id="softcontent">';
		
		if(!empty($user['apikey']) && empty($user['no_new_editor_alert']) && !empty($globals['sitepad_editor_new'])){
			
			$editor = $globals['sm_brand_editor'];
			if(empty($editor)){
				$editor = (empty($globals['sm_brand']) ? 'SitePad' : '').' Editor';
			}
			
			echo '
<script>
$(document).ready(function(){
	$("#newEditorModal").modal();
});

function dismiss_new_editor_alert(){
	
	return $.ajax({
		url: "'.$globals['index'].'act=settings&no_new_editor_alert=1&api=json",
		type: "GET",
		dataType: "json",
		success:function(data){
			$("#newEditorModal").modal("hide");
		}
	});
	
};

</script>

<!-- Modal -->
<div class="modal fade" id="newEditorModal" tabindex="-1" role="dialog" aria-labelledby="newEditorModalTitle" aria-hidden="true">
	<div class="modal-dialog modal-dialog-centered" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<h5 class="modal-title">'.lang_vars_name($l['new_editor_title'], array('editor' => $editor)).'</h5>
				<button type="button" class="close" data-dismiss="modal" aria-label="Close">
					<span aria-hidden="true">&times;</span>
				</button>
			</div>
			<div class="modal-body">
				'.lang_vars_name($l['new_editor_exp'], array('editor' => $editor)).'
			</div>
			<div class="modal-footer">
				<a href="'.$globals['index'].'act=sitemush" class="btn btn-info" role="button">'.$l['access_old_editor'].'</a>
				<button type="button" class="btn btn-primary" onclick="dismiss_new_editor_alert()">'.$l['dismiss'].'</button>
				<button type="button" class="btn btn-secondary" data-dismiss="modal">'.$l['close'].'</button>
			</div>
		</div>
	</div>
</div>';
			
		}
	
}


function softfooter($bottom = false){

global $user, $conn, $dbtables, $logged_in, $globals, $l, $dmenus, $end_time, $start_time, $onload, $theme, $nupanel;

if(optGET('jsnohf')){
	return true;
}

$pageinfo = array();

echo '</div>'.(!empty($bottom) ? '<div id="error_handle_div" style="height:200px">&nbsp;</div>' : '').'
		</td>
	</tr>

	<tr>
		
		<td colspan="2" valign="bottom">
			<table width="100%" cellspacing="0" cellpadding="0" border="0"> 
				<tr>
					<td colspan="2" class="footer1">
						<table width="100%" cellspacing="0" cellpadding="0" border="0" >
							<tr>
								<td width="70" colspan="3">&nbsp;
								</td>
								<td align="center" class="foot1">
									'.$l['times_are'].(empty($globals['pgtimezone']) ? '' : ' '.($globals['pgtimezone'] > 0 ? '+' : '').$globals['pgtimezone']).'. '.$l['time_is'].' '.datify(time(), false).'.
								</td>
								<td align="right">
									<div class="top">
										<img src="'.$theme['images'].'top.png" class="someclass" alt="'.@$l['back_to_top'].'" title="'.@$l['back_to_top'].'" /> 
									</div>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</td>
	</tr>';
	
	//Bottom Footer
	echo '<tr style="background-color:#fff;">
		
		<td colspan="2" valign="bottom">
			<table width="100%" cellspacing="0" cellpadding="0" border="0"> 
				<tr>
					<td colspan="2" class="footer1">
						<table width="100%" cellspacing="0" cellpadding="0" border="0" >
							<tr>
								<td>&nbsp;</td>
								<td align="left" colspan="2">
									<div class="foot">&nbsp;&nbsp;'.copyright().'</div>
								</td>
								<td align="right" colspan="2">
									<div class="foot">'.(empty($pageinfo) ? '' : implode('&nbsp;&nbsp;|&nbsp;&nbsp;', $pageinfo)).'&nbsp;&nbsp;</div>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>';


if(!empty($theme['copyright'])){

	echo unhtmlentities($theme['copyright']);

}

echo '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[
function bodyonload(){
	'.(empty($onload) ? '' : 'eval(\''.implode(';', $onload).'\');').'
};';

echo '// ]]></script>';

// Is there a Panel Footer ?
if(!empty($nupanel->pfooter)){
	echo $nupanel->pfooter;
}

echo '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[

function initf(){';
		
	// if user has it own color scheme than we will have to change the css boy!';
	if(!empty($user['user_defined_color']) || !empty($globals['default_hf_bg']) || !empty($globals['default_cat_hover']) || !empty($globals['default_hf_text']) || !empty($globals['default_scriptname_text'])){
	
		// For changing background color of Footer
		if(!empty($user['color_theme']['left_panel_bg']) || !empty($globals['default_hf_bg'])){
			echo '
			$(".left_panel").css("background-image", "none");
			$(".left_panel").css("background-color", "'.(!empty($user['color_theme']['left_panel_bg']) ? $user['color_theme']['left_panel_bg'] : $globals['default_hf_bg']).'");';
			
		}
	}
echo '}// End of initf()

initf();

// ]]></script>';


echo '</body>
</html>';

}


function error_handle($error, $table_width = '100%', $center = false, $return = false){

global $l;
	
	$str = "";

	$table_width = preg_match('/%/is', $table_width) ? $table_width : $table_width.'px';

	//on error call the form
	if(!empty($error)){
		$str .= '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[		
		</script>';
		
		$str .= '<div class="alert alert-danger " style="width:'.$table_width.';'.(($center) ? 'margin:auto' : '').'"><a href="#" class="close" data-dismiss="alert">&times;</a><div>';
		$str .= '<p style="margin-top:4px; font-size:16px;">&nbsp;&nbsp;'.$l['following_errors_occured'].' :</p>
			<ul type="square" style="margin-top:-4px;">';
		
		foreach($error as $ek => $ev){
		
			$str .= '<li style="font-size:13px;">'.$ev.'</li>';
		
		}
		
		$str .= '</ul>
		</div></div>';
		
		if(empty($return)){
			echo $str;
		}else{
			return $str;	
		}
		
	}

}


//This will just echo that everything went fine
function success_message($message, $table_width = '100%', $center = false){

global $l;

	//on error call the form
	if(!empty($message)){
		
		echo '<table width="'.$table_width.'" cellpadding="2" cellspacing="1" class="sai_error" '.(($center) ? 'align="center"' : '' ).'>
			<tr>
			<td>
			'.$l['following_message'].' :
			<ul type="square">';
		
		foreach($message as $mk => $mv){
		
			echo '<li>'.$mv.'</li>';
		
		}
		
		
		echo '</ul>
			</td>
			</tr>
			</table>'.(($center) ? '</center>' : '' ).'
			<br />';
		
		
	}

}


function majorerror($title, $text, $heading = ''){

global $theme, $globals, $user, $l;

softheader(((empty($title)) ? $l['fatal_error'] : $title), false);

?>

<div class="card" style="width:70%;margin:auto;">
	<div class="card-heading" style="padding:5px;background-color:#F2DEDE;color:#A94442;"><h6><b><?php echo ((empty($heading)) ? $l['following_fatal_error'].':' : $heading);?></b></h6></div>
	<div class="card-body" align="center">
		<img src="<?php echo $theme['images'];?>error.png" alt="" />&nbsp;&nbsp;<font size="-1"><?php echo $text;?></font><br /><br />
	</div>
</div>

<?php

softfooter(true);

//We must return
return true;

}

function message($title, $heading = '', $icon, $text){

global $theme, $globals, $user, $l;

softheader(((empty($title)) ? $l['soft_message'] : $title), false);

?>

<center><br /><br />
<div class="sai_divroundshad" style="width:70%;margin:0px auto;">
<table width="100%" cellpadding="2" cellspacing="1" class="sai_cbor" align="center">
	
	<tr>
	<td class="cbg" align="left"  >
	<b><?php echo ((empty($heading)) ? $l['following_soft_message'].':' : $heading);?></b>
	</td>
	</tr>
	
	<tr>
	<td class="sai_bg" colspan="2" align="center">
	<img src="<?php echo $theme['images'].(empty($icon)?'info.gif':$icon);?>" alt="" />
	</td>
	</tr>
	
	<tr>
	<td class="sai_error" align="left"><?php echo $text;?><br />
	</td>
	</tr>

</table>
</div></center>
<br /><br /><br />

<?php

softfooter();

//We must return
return true;

}

?>

Zerion Mini Shell 1.0