ok

Mini Shell

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

<?php

//////////////////////////////////////////////////////////////
//===========================================================
// email_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 editplans_theme(){

global $theme, $globals, $user, $l, $langs, $error, $themes, $plans, $done, $unserplan, $acl, $_users, $_cpplan, $allcatwise, $_resellers, $loaded_scripts, $nupanel;

softheader($l['ap_<title>']);

echo '<form accept-charset="'.$globals['charset'].'" name="editplan" method="post" action="">
<div class="container-fluid">
<div class="sai_heading">
	<div class="col-sm-12 text-center">
		<span style="display: inline-block; position:relative; top:5px;">
			<i class="fa sai-projectman fa-1x"></i>
		</span>
		<span>'.$l['ep_title'].'</span>
	</div>
</div><br />

<div class="sai_hr"></div><br />'.(empty($globals['lictype']) ? '<div class="sai_notebox">'.$l['ap_feature_not_available'].'</div>' : '');

echo '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[
ids = new Array("'.implode('", "', is_array($_users) ? array_keys($_users) : array()).'");
function checkalluser(checker){	
	for(x in ids){
		$_("users_"+ids[x]).checked = checker.checked;
		changebg(ids[x], "users_");
	}
};

var ids1 = new Array("'.implode('", "', is_array($themes) ? array_keys($themes) : array()).'");
function checkallsoftware(checker){	
	for(x in ids1){
		$_("themes_"+ids1[x]).checked = checker.checked;
		changebg(ids1[x],"themes_");
	}	
};

ids2 = new Array("'.implode('", "', is_array($_resellers) ? array_keys($_resellers) : array()).'");
function checkallreseller(checker){	
	for(x in ids2){
		$_("resellers_"+ids2[x]).checked = checker.checked;
		changebg(ids2[x], "resellers_");
	}	
};

ids3 = new Array("'.implode('", "', is_array($_cpplan) ? array_keys($_cpplan) : array()).'");
function checkallcpplan(checker){	
	for(x in ids3){
		$_("cpplan_"+ids3[x]).checked = checker.checked;
		changebg(ids3[x], "cpplan_");
	}	
};

function selectchkbox(id, type){
	if($_(type+id).checked){
		$_(type+id).checked = false;
	}else{
		$_(type+id).checked = true;
	}
	//change td background color
	changebg(id, type);
}

function changebg(id, type){
	
	try{
		if($_(type+id).checked){
			
			$("#td_"+id).addClass("script_selected");
			
		}else{
			
			$("#td_"+id).removeClass("script_selected");
		}
	}catch(e){}
};

var ids4 = new Array("'.implode('", "', is_array($unserplan['themes']) ? array_keys($unserplan['themes']) : array()).'");

function checkall(){
	
	// for users
	for(x in ids){	
		changebg(ids[x],"users_");
	}
	
	// for scripts
	for(x in ids1){	
		changebg(ids1[x],"themes_");		
	}
	
	// for resellers_
	for(x in ids2){	
		changebg(ids2[x],"resellers_");
	}
	// for cpplan_
	for(x in ids3){	
		changebg(ids3[x],"cpplan_");
	}
	
	// for $unserplan
	for(x in ids4){		
		changebg(ids4[x],"themes_");
	}
};

addonload("checkall();");
// ]]>
</script>';
	
$unserplan['show_name'] = $unserplan['name'];
$planpages = $unserplan['pages'];
$planblogs = $unserplan['blogs'];
$plansites = $unserplan['sites'];
$plan_new_sites = $unserplan['newsites'];
$planbackups = $unserplan['backups'];

// Just to show proper name in text box
if(defined('SOFTRESELLER')){
	$unserplan['show_name'] = str_replace('reseller_'.SOFTRESELLER.'_', '', $unserplan['name']);
}

/*  $reseller $user*/

error_handle($error);

if(!empty($done)){
	echo '<div class="alert alert-warning text-center"><img src="'.$theme['images'].'success.gif" /> &nbsp; '.$l['ap_done'].'</div>';
}

echo '<div class="sai_form_head">'.$l['ap_planhead'].'</div>
	<div class="sai_form">
		<div class="row">
			<div class="col-sm-5">
				<label for="planname" class="sai_head">'.$l['ap_planname'].'</label><br />
				<span class="sai_exp2">'.$l['ap_exp_plan'].'</span>
			</div>
			<div class="col-sm-5">
			'.(defined('SOFTRESELLER') ? 'reseller_'.SOFTRESELLER.'_' : '').'
			<input type="text" class="form-control" name="planname" size="40" value="'.POSTval('planname', $unserplan['show_name']).'">
			</div>
		</div>
	</div><br />';
	
	// Are there control panel plans
if(!empty($_cpplan)){
	echo '<div class="sai_form_head">
		'.$l['ap_cpanelplan'].'
	</div>
	<div class="sai_form">
		<span>'.$l['ap_cpplanselect'].'</span>
		<div class="row">
			<div class="col-sm-6">
				<span class="sai_head">'.$l['ap_select_all'].'<input type="checkbox" onclick="checkallcpplan(this);" /></span>
			</div>
			<div class="col-sm-6">
				<span class="sai_head">'.$l['ap_overwrite_settings'].'&nbsp;<input type="checkbox" name="cpplansetting"/></span>
			</div>
		</div><br />
		<div class="row">';
	foreach($_cpplan as $k => $v){
		echo '<div class="col-sm-3 script_choose" id="td_'.$k.'">
				<div class="row">
					<input type="checkbox" id="cpplan_'.$k.'" name="cpplan_'.$k.'" '.POSTchecked('cpplan_'.$k, (@$acl['cpplan'][$v['original_key']] == $unserplan['name'] ? $acl['cpplan'][$v['original_key']] : '')).' onclick="changebg(\''.$k.'\',\'cpplan_\');" />
					<a href="javascript:void(0)" style="text-decoration: none; " onclick="selectchkbox(\''.$k.'\',\'cpplan_\');"><font class="sai_bboxtxt">'.$v['original_key'].'</font></a>
				</div>
			</div>';
	}
	
	echo '</div><br />
	</div><br />';
}
	
if(!defined('SOFTRESELLER') && method_exists('nupanel', 'listresellers')){
	echo '<div class="sai_form_head">'.$l['ap_resellerselect'].'</div>
	<div class="sai_form">
		<span>'.$l['ap_exp_resellerselect'].'</span><br />
		<div class="row">
			<div class="col-sm-6">
				<span class="sai_head">'.$l['ap_select_all'].'<input type="checkbox" onclick="checkallreseller(this);" /></span>
			</div>
			<div class="col-sm-6">
				<span class="sai_head">'.$l['ap_overwrite_settings'].'&nbsp;<input type="checkbox" name="resellersetting"/></span>
			</div>
		</div><br />
		<div class="row">';
		
	foreach($_resellers as $k => $v){
	
		echo '<div class="col-sm-3 script_choose" id="td_'.$k.'">
				<div class="row">
					<input type="checkbox" id="resellers_'.$k.'" name="resellers_'.$k.'" '.POSTchecked('resellers_'.$k, (@$acl['users'][$v['original_key']] == $unserplan['name'] ? $acl['users'][$v['original_key']] : '')).' onclick="changebg(\''.$k.'\',\'resellers_\');"/>
					<img src="'.$theme['images'].'reseller15.png" style="margin-bottom:4px;">
					<a href="javascript:void(0)" style="text-decoration: none; " onclick="selectchkbox(\''.$k.'\',\'resellers_\');"><font class="sai_bboxtxt">'.$k.'</font></a>
				</div>
			</div>';
	
	}
	
	echo '</div><br />
	</div><br />';
}
	
	echo '<div class="sai_form_head">'.$l['ap_userselect'].'</div>
	<div class="sai_form">
		<span>'.$l['ap_exp_userselect'].'</span><br />
		<div class="row">
			<div class="col-sm-6">
				<span class="sai_head">'.$l['ap_select_all'].'<input type="checkbox" onclick="checkalluser(this);" /></span>
			</div>
			<div class="col-sm-6">
				<span class="sai_head">'.$l['ap_overwrite_settings'].'&nbsp;<input type="checkbox" name="usersetting" /></span>
			</div>
		</div><br />
		<div class="row">';
		
	foreach($_users as $k=>$v){			
		echo '<div class="col-sm-3 script_choose" id="td_'.$k.'">
			<div class="row">
				<input type="checkbox" id="users_'.$k.'" name="users_'.$k.'" '.POSTchecked('users_'.$k, (@$acl['users'][$v['original_key']] == $unserplan['name'] ? $acl['users'][$v['original_key']] : '')).' onclick="changebg(\''.$k.'\',\'users_\');" />
				<img src="'.$theme['images'].'user15.png" style="margin-bottom:4px;">
				<a href="javascript:void(0)" style="text-decoration: none; " onclick="selectchkbox(\''.$k.'\',\'users_\');"><font class="sai_bboxtxt">'.$v['original_key'].'</font></a>
			</div>
		</div>';	
	}
	
echo '</div></div><br />
<div class="sai_form_head">'.$l['ap_sitesettings'].'</div>
	<div class="sai_form">
		<div class="row">
			<div class="col-sm-6">
				<label for="planpages" class="sai_head">'.$l['ap_planpages'].'</label><br />
				<span class="sai_exp2">'.$l['ap_exp_planpages'].'</span>
			</div>
			<div class="col-sm-4 disbale_arrows">
				<input type="number" class="form-control" name="planpages" id="planpages" min="0" size="40" value="'.POSTval('planpages', $planpages ).'">
			</div>
		</div><br /><br />
		<div class="row">
			<div class="col-sm-6">
				<label for="planblogs" class="sai_head">'.$l['ap_planblogs'].'</label><br />
				<span class="sai_exp2">'.$l['ap_exp_planblogs'].'</span>
			</div>
			<div class="col-sm-4 disbale_arrows">
				<input type="number" class="form-control" name="planblogs" id="planblogs" min="0" size="40" value="'.POSTval('planblogs', $planblogs ).'">
			</div>
		</div><br /><br />
		<div class="row">
			<div class="col-sm-6">
				<label for="plansites" class="sai_head">'.$l['ap_plansites'].'</label><br />
				<span class="sai_exp2">'.$l['ap_exp_plansites'].'</span>
			</div>
			<div class="col-sm-4 disbale_arrows">
				<input type="number" class="form-control" name="plansites" id="plansites" min="0" size="40" value="'.POSTval('plansites', $plansites ).'">
			</div>
		</div><br /><br />
		<div class="row">';
			
echo '</div></div><br />
<div class="sai_form_head">'.$l['ap_new_sitesettings'].'</div>
	<div class="sai_form">
		<div class="row">
			<div class="col-sm-6">
				<label for="plan_new_sites" class="sai_head">'.$l['ap_plansites'].'</label><br />
				<span class="sai_exp2">'.$l['ap_exp_plansites'].'</span>
			</div>
			<div class="col-sm-4 disbale_arrows">
				<input type="number" class="form-control" name="plan_new_sites" id="plan_new_sites" min="0" size="40" value="'.POSTval('plan_new_sites', $plan_new_sites).'">
			</div>
		</div><br /><br />
		<div class="row">
			<div class="col-sm-6">
				<label for="planbackups" class="sai_head">'.$l['ap_planbackups'].'</label><br />
				<span class="sai_exp2">'.$l['ap_exp_planblogs'].'</span>
			</div>
			<div class="col-sm-4 disbale_arrows">
				<input type="number" class="form-control" name="planbackups" id="planbackups" min="0" size="40" value="'.POSTval('planbackups', $planbackups).'">
			</div>
		</div><br /><br />
		<div class="row">';
		
	echo '</div>
	</div><br />
	<div class="sai_form_head">'.$l['ap_scriptselect'].'</div>
	<div class="sai_form">
		<span>'.$l['ap_exp_scriptselect'].'</span><br />
		<span class="sai_head">'.$l['ap_select_all'].'<input type="checkbox" onclick="checkallsoftware(this);" /></span>
		<table width="100%">
			<tr><td colspan="12">
				<table width="100%">';
				$i = 0;
				foreach($themes as $k => $v){
				
					if(is_int($i/5)){
						echo '<tr>';
					}
		
					echo '<td width="20%" class="script_choose" id="td_'.$k.'">
						<table width="95%" style="margin-top:10px;">
						<tr>
						<td width="8%">
							<input type="checkbox" id="themes_'.$k.'" name="themes_'.$k.'" '.POSTchecked('themes_'.$k, !empty($unserplan['themes'][$k])).'  onclick="changebg(\''.$k.'\',\'themes_\');"/>
						</td>
						<td>
							<a href="javascript:void(0)" style="text-decoration: none; " onclick="selectchkbox(\''.$k.'\',\'themes_\');" ><font class="sai_bboxtxt">'.$v['name'].'</font></a>
						</td>
						</tr>
						</table>
					</td>';															
					$i++;
					
					if(is_int($i/5)){	
						echo '</tr>';					
					}	
				}
				
			echo '</table>
			</td></tr></table>
			<br /><br />';
	
echo '<p align="center"><input type="submit" name="saveplan" value="'.$l['ap_saveplan'].'" class="flat-butt" /></p>
	'.(empty($globals['lictype']) ? '<div class="notebox">'.$l['ap_feature_not_available'].'</div>' : '').'<br />
	</div>	
</div>
</form><br />';

softfooter();

}

?>

Zerion Mini Shell 1.0