当前位置: 首页>>代码示例>>PHP>>正文


PHP optGET函数代码示例

本文整理汇总了PHP中optGET函数的典型用法代码示例。如果您正苦于以下问题:PHP optGET函数的具体用法?PHP optGET怎么用?PHP optGET使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了optGET函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: java_theme

function java_theme()
{
    global $user, $globals, $l, $theme, $softpanel, $iscripts, $catwise, $error, $scripts, $allcatwise;
    global $software, $soft, $info, $settings, $init_tab, $dbtype, $dbs, $installed, $__settings, $setupcontinue, $installations, $notes, $cron, $datadir, $ajaxdb, $ajaxdbexists, $overwrite_option, $protocols, $nopackage, $www, $ajaxhttpsexists, $ajaxhttps, $new_insid;
    if (optGET('notify')) {
        get_softaculous_file('http://www.softaculous.com/notifyversion.php?softid="' . $soft . '"');
        echo 1;
        return true;
    }
    if (optGET('ajaxdownload') && !empty($nopackage)) {
        // Try to download the package
        if (method_exists($softpanel, 'updatesoftwares')) {
            $softpanel->updatesoftwares($soft, 0, 0, 1);
            echo 1;
            return true;
        }
        // False call
        echo 0;
        return false;
    }
    // Give the staus
    if (optGET('ajaxstatus')) {
        $_status = soft_progress(optGET('ajaxstatus'));
        $tmp_status = unserialize($_status[1]);
        $_status[1] = $tmp_status['current_status'];
        if (!empty($_status)) {
            echo implode('|', $_status);
            return true;
        }
        // False call
        echo 0;
        return false;
    }
    if (!empty($ajaxdb)) {
        echo $ajaxdbexists;
        return true;
    }
    if (!empty($ajaxhttps)) {
        echo $ajaxhttpsexists;
        return true;
    }
    // Auto Installation responses
    if (isset($_GET['autoinstall'])) {
        // Installed successfully
        if (!empty($installed)) {
            echo 'installed';
            return true;
        }
        // Are there errors
        if (!empty($error)) {
            echo serialize($error);
            return false;
        }
    }
    //First add the installation info
    if (empty($installed)) {
        $random_username = true;
        // This is to see if a script has predefined username and cannot be changed
        foreach ($settings as $ik => $iv) {
            if ($ik == 'hidden') {
                continue;
            }
            foreach ($iv as $ikk => $ivv) {
                if ($ikk == 'admin_username' && preg_match('/disabled=\\"disabled\\"/ie', $ivv['tag'])) {
                    $random_username = false;
                }
            }
        }
        $info['install'] = '<div id="fadeout_div"><form accept-charset="' . $globals['charset'] . '" name="installsoftware" method="post" action="" onsubmit="return checkform();" id="installsoftware">

' . error_handle($error, "100%", 0, 1) . '

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

function toggle_advoptions(){
	if ($("#advoptions").is(":hidden")){
		$("#advoptions").slideDown("slow");
		$("#advoptions_toggle_plus").attr("src", "' . $theme['images'] . 'minus_new.gif");
	}
	else{
		$("#advoptions").slideUp("slow");
		$("#advoptions_toggle_plus").attr("src", "' . $theme['images'] . 'plus_new.gif");
	}
}

function plus_onmouseover(){
	$("#plus").attr("src", "' . $theme['images'] . 'plus_hover.gif");
}

function plus_onmouseout(){
	$("#plus").attr("src", "' . $theme['images'] . 'plus.gif");
}

function display_pass_strength(score, per){
	
	var lang;
	//disp_per = $("#pass-strength-hidden").val();
	
	if(typeof per == "undefined") per = 0;
	
//.........这里部分代码省略.........
开发者ID:Hezkibel,项目名称:soft,代码行数:101,代码来源:java_theme.php

示例2: restore_theme

function restore_theme()
{
    global $user, $globals, $l, $theme, $softpanel, $iscripts, $catwise, $error, $scripts, $_insid, $dbexist, $restored, $datadir, $wwwdir;
    global $backups, $deleted, $soft, $backupinfo;
    // Give the staus
    if (optGET('ajaxstatus')) {
        $_status = soft_progress(optGET('ajaxstatus'));
        $tmp_status = unserialize($_status[1]);
        $_status[1] = $tmp_status['current_status'];
        if (!empty($_status)) {
            echo implode('|', $_status);
            return true;
        }
        // False call
        echo 0;
        return false;
    }
    softheader($l['<title>']);
    echo '
	<div id="install_win">';
    if (!empty($restored)) {
        echo '
			<div class="bg"><br />
				<div class="alert alert-warning">
					<center><img src="' . $theme['images'] . 'notice.gif" /> &nbsp; ' . $l['restore'] . '
					<center><b><a href="' . script_link($soft) . '&highlight=' . $backupinfo['insid'] . '&postact=restore"></a></b></center></center>
				</div>
				<br />
				<center><b><a href="' . script_link($soft) . '" class="sai_head">' . $l['return'] . '</a></b></center><br /><br />
			</div>
		
			<!--PROC_DONE-->';
    } else {
        echo '
			<div id="fadeout_div">
				<form accept-charset="' . $globals['charset'] . '" name="restore" method="post" action="" onsubmit="return checkform();" id="restore">
				
					<script language="javascript" type="text/javascript"><!-- // --><![CDATA[
					function checkform(dosubmit){
						var conf = confirm(\'' . $l['confirm_restore'] . '\');
						if(conf){
							$_("restorebtn").disabled = true;
							if(useprog){
						
								// Send a request to check the status
								progressbar.start();
								
								// Return false so that the form is not submitted
								return false;
							
								// This is OLD School !
							}
							
							return true;
						}else{
							return false;
						}
					}	
					
					var progressbar = {
						timer: 0,
						total_width: 0,	
						status_key: "",
						synctimer: 0,
						fadeout_div: "#fadeout_div",
						win_div: "#install_win",
						progress_div: "#progress_bar",
						formid: "#restore",
						frequency: 8000,
						
						current: function(){
							try{
								var tmp_cur = Math.round(parseInt($_("progress_color").width)/parseInt($_("table_progress").width)*100);
								if(tmp_cur > 100){
									tmp_cur = 99;
								}
								return tmp_cur;
							}catch(e){
								return -1;	
							}
						},
						
						reset: function(){ try{
							clearTimeout(this.timer);
							$_("progress_color").width = 1;
						}catch(e){ }},
						
						move: function(dest, speed, todo){ try{
							var cur = this.current();
							if(cur < 0){
								clearTimeout(this.timer);
								return false;
							}
							var cent = cur + 1;
							var new_width = cent/100*this.total_width;
							if(new_width < 1){
								new_width = 1;
							}
							//alert(new_width+" "+dest+" "+cent);
							
//.........这里部分代码省略.........
开发者ID:Hezkibel,项目名称:soft,代码行数:101,代码来源:restore_theme.php

示例3: apache_conf_theme

function apache_conf_theme()
{
    global $theme, $globals, $user, $l, $langs, $skins, $error, $saved, $done, $filename, $iapps, $web_server;
    // For updating entir file
    if (optGET('ajaxapache')) {
        if (!empty($error)) {
            echo '0' . current($error);
            return false;
        }
        if (!empty($done)) {
            echo '1' . $l['change_final_file'];
            return true;
        }
    }
    softheader($l['<title>']);
    if ($web_server == '18') {
        echo '<br /><center class="sai_tit"><img src="' . $theme['a_images'] . 'nginx_conf.gif" />&nbsp;' . $l['nginxhead'] . '</center><br />';
    } elseif ($web_server == '60') {
        echo '<br /><center class="sai_tit"><img src="' . $theme['a_images'] . 'lighttpd_conf.gif" />&nbsp;' . $l['lighttpdhead'] . '</center><br />';
    } else {
        echo '<br /><center class="sai_tit"><img src="' . $theme['a_images'] . 'apache_conf.gif" />&nbsp;' . $l['apachehead'] . '</center><br />';
    }
    echo '<script language="javascript" src="' . js_url('js/combined.js') . '" type="text/javascript"></script>
	<script language="javascript" type="text/javascript"><!-- // --><![CDATA[

	var message_box = function(){			
		return {
			show_message: function(title, body , image) {			
				var okbutton = \'<input  style="width:75px" class="sai_submit" type="button" onclick="message_box.close_message();" value="OK" />\';
				if(image == "1"){
					var img = \'<img src="' . $theme['images'] . 'error.gif" />\';
				}else{
					var img = \'<img src="' . $theme['images'] . 'confirm.gif" />\';			
				}
									
				if(jQuery(\'.sai_message_box\').html() === null) {
					var message = \'<div class="sai_message_box"><table border="0" cellpadding="8" width="100%" height="100%"><tr ><td rowspan="2" width="40%" > \'+ img + \'</td><td width="60%" class ="msg_tr1">\' +  title + \'</td></tr><tr class ="msg_tr2"><td style="text-align:left">\' + body + \'</td></tr><tr ><td colspan="2" class ="msg_tr3">\' + okbutton + \'</td></tr></table></div>\';
					jQuery(document.body).append( message );								
					jQuery(".sai_message_box").css("top", jQuery("html, body").scrollTop() + 150);
					jQuery(\'.sai_message_box\').show(\'slow\');
				}else{
					var message =\' <table border="0" width="100%" cellpadding="8" height="100%"><tr ><td rowspan="2" width="40%">\'+ img +  \'</td><td widt="60%" class ="msg_tr1">\' + title + \'</td></tr><tr class ="msg_tr2"><td style="text-align:left">\' + body + \'</td></tr><tr ><td colspan="2" class ="msg_tr3">\' + okbutton + \'</td></tr></table>\';				
					jQuery(\'.sai_message_box\').css(\'top\', jQuery($(jQuery.browser.webkit ? "body": "html")).scrollTop() + 150);
					jQuery(\'.sai_message_box\').show(\'slow\');
					jQuery(\'.sai_message_box\').html( message );
				}
			},
			close_message: function() {				
				jQuery(\'.sai_message_box\').hide(\'fast\');
				window.location=window.location;
			}
		}
	}();

	$(document).ready(function(){		
		
		// For updating entire file
		$("#saveapache").click(function(){					
			
			$("#save_apache").css("display", "");					
			$.ajax({
				type: "POST",
				url: window.location+"&ajaxapache=1&saveapache=1",					
				data: $("#editphpini").serialize(),
				
				// Checking for error
				success: function(data){
					
					$("#save_apache").css("display", "none");
					var result = data.substring(0,1);
					if(result == "1"){							
						var msg = data.substring(1);
						message_box.show_message( "Done ",msg,2);																					
					}
					if(result == "0"){							
						var msg = data.substring(1);
						message_box.show_message( "Error",msg,1);
					}
				},
				error: function() {
					message_box.show_message("Error",\'' . $l['connect_error'] . '\',1);						
				}															
			});	
			return false;												
		});	
	});	
	
	// ]]></script>';
    $linecount = count(file($filename));
    echo '<form accept-charset="' . $globals['charset'] . '" name="editemailsettings" method="post" action="" id="editphpini">
		<div style="height:400px; width:700px; overflow:auto; border: 2px solid #CCC; margin:0px auto; ">
			<table border="0" cellpadding="8" cellspacing="8" width="700px" align="center" class="sai_divroundshad">
				<tr>
					<td style="background-color:#CCC;vertical-align:top;font-size:12px;">';
    for ($i = 1; $i <= $linecount; $i++) {
        echo $i . "<br />";
    }
    echo '</td><td nowrap="nowrap"><textarea style=" overflow:hidden; font-size:12px; border:none; resize: none;" WRAP=OFF name="apache_data" id="apache_data" rows=' . $linecount . ' cols=120 >' . htmlentities(file_get_contents($filename), ENT_QUOTES, "UTF-8") . '</textarea>
					</td>
				</tr>
//.........这里部分代码省略.........
开发者ID:Hezkibel,项目名称:soft,代码行数:101,代码来源:apache_conf_theme.php

示例4: browse_themes_theme

function browse_themes_theme()
{
    global $user, $globals, $l, $theme, $softpanel, $iscripts, $catwise, $error, $edit, $settings;
    global $insid, $edited, $software, $soft, $scripts, $purchased, $owned_themes;
    softheader($l['<title>']);
    // If generate order call
    if (optGET('generate_order')) {
        $order_id = get_softaculous_file($globals['apipfx'] . 'fetch.php?apikey=' . $user['pfxapi_key'] . '&email=' . $user['email'] . '&pid=' . optGET('theme_id') . '&giveinfo=generate_order&index=' . rawurlencode($globals['index']));
        echo json_encode($order_id);
        return true;
    }
    echo '
<script id="paypal_js"></script>
<script language="javascript" type="text/javascript"><!-- // --><![CDATA[

function plus_onmouseover(ele){
	$("#"+ele.id+"_plus").attr("src", "' . $theme['images'] . 'plus_hover.gif");
}

function plus_onmouseout(ele){
	$("#"+ele.id+"_plus").attr("src", "' . $theme['images'] . 'plus.gif");
}

var length;
var deduct;
var payment_timer;
var dg;
var owned_theme = new Array("' . implode('", "', array_values($owned_themes)) . '");

var screen_width = $(window).width();

if(screen_width < 1024){
	length = 3;
	deduct = 20;
}else{
	length = 4;
	deduct = 20;
}

' . (empty($user['pfxapi_key']) ? 'var api_key = 0;' : 'var api_key = 1;') . '
' . (empty($globals['eu_themes_premium']) ? 'var premium = 0;' : 'var premium = "' . $globals['eu_themes_premium'] . '";') . '

function show_pay(){
	
	//alert(arguments[0] +" -- "+arguments[1]+" -- "+arguments[2]+" -- "+arguments[3]);
	//alert($("#paypal_js").attr("src"))
	
	$("#display_theme").fadeOut(100);
	$("#loading").show();
	
	// We will have to create an order now
	$.ajax({
		type: "GET",
		url: window.location+"&generate_order=1&ajax=1&jsnohf=1&theme_id="+arguments[1],
		success: function(data){
			//alert(data)
			var order_id = $.parseJSON(data);
			$("#custom").val(order_id);
			$("#loading").hide();
			$("#display_theme").fadeIn(100);
			$("#pfxpay").bPopup();			
		}	
	});
	
	$.getScript("https://www.paypalobjects.com/js/external/dg.js", function( data, textStatus, jqxhr ) {
		//alert(data +" -- "+textStatus+" -- "+jqxhr)
		
		if(textStatus == "success"){
			dg = new PAYPAL.apps.DGFlow({
				// HTML ID of form submit buttons that call setEC
				trigger:"submit_pay",
				expType:"instant"
			});
		}
	});
	
	// Now set the variable for sending the data
	$("#item_name").val(arguments[0]);
	$("#item_number").val(arguments[1]);
	$("#amount").val(arguments[2]);
	$("#item_price").html(arguments[2]);
	
	$("#submit_pay").click(function(){
		
		/*var timer = setInterval(function() {   
			if(dg.isOpen() !== true) {  
				clearInterval(timer);  
				alert("closed");
			}  
		}, 30000);*/
		$("#pfxpay").bPopup().close();
	});
	
	$(".b-close").click(function(){
		
	});
}

function show_selected_theme(){
	
//.........这里部分代码省略.........
开发者ID:Hezkibel,项目名称:soft,代码行数:101,代码来源:browse_themes_theme.php

示例5: ftpmanage_theme

function ftpmanage_theme()
{
    global $user, $globals, $l, $theme, $softpanel, $iscripts, $catwise, $error, $scripts, $ftp_list, $done, $tuser;
    // for delete
    if (optGET('ajaxdel')) {
        if (!empty($error)) {
            echo '0' . current($error);
            return false;
        }
        if (!empty($done)) {
            echo '1' . $l['delete'];
            return true;
        }
    }
    $__tmp = explode(':', !empty($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'localhost');
    $__ip = $__tmp[0];
    softheader($l['<title>']);
    echo '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[
			// For msgbox
			var message_box = function() {			
				return {
					show_message: function(title, body , image) {			
						var okbutton = \'<input  style="width:75px" class="sai_submit" type="button" onclick="message_box.close_message();" value="OK" />\';
						if(image == "1"){
							var img = \'<img src="' . $theme['images'] . 'error.gif" />\';
						}else{
							var img = \'<img src="' . $theme['images'] . 'confirm.gif" />\';			
						}					
						if(jQuery(\'.sai_message_box\').html() === null) {
							var message = \'<div class="sai_message_box"><table border="0" cellpadding="8" width="100%" height="100%"><tr ><td rowspan="2" width="40%" > \'+ img + \'</td><td width="60%" class ="msg_tr1">\' +  title + \'</td></tr><tr class ="msg_tr2"><td style="text-align:left">\' + body + \'</td></tr><tr ><td colspan="2" class ="msg_tr3">\' + okbutton + \'</td></tr></table></div>\';
							jQuery(document.body).append( message );								
							jQuery(\'.sai_message_box\').css(\'top\', jQuery(\'html, body\').scrollTop() + 150);
							jQuery(\'.sai_message_box\').show(\'slow\');
						}else{
							var message =\' <table border="0" width="100%" cellpadding="8" height="100%"><tr ><td rowspan="2" width="40%">\'+ img +  \'</td><td widt="60%" class ="msg_tr1">\' + title + \'</td></tr><tr class ="msg_tr2"><td style="text-align:left">\' + body + \'</td></tr><tr ><td colspan="2" class ="msg_tr3">\' + okbutton + \'</td></tr></table>\';				
							jQuery(\'.sai_message_box\').css(\'top\', jQuery(\'html, body\').scrollTop() + 150);
							jQuery(\'.sai_message_box\').show(\'slow\');
							jQuery(\'.sai_message_box\').html( message );
						}
					},
					delete_message: function(title, body ,did) {								
						var yesbutton = \'<input type="button" style="width:75px" onclick="message_box.yes_close_message(\\\'\'+did+\'\\\');" value="YES" class="sai_submit"/>\';
						var nobutton = \'<input type="button" style="width:75px" onclick="message_box.no_close_message();" value="NO" class="sai_submit" />\';
						var img = \'<img src="' . $theme['images'] . 'remove_big.gif" />\';
						if(jQuery(\'.sai_message_box\').html() === null) {
							var message = \'<div class="sai_message_box"><table border="0" cellpadding="8" width="100%" height="100%"><tr height="60%" ><td rowspan="2" width="40%" > \'+ img + \'</td><td width="60%" class ="msg_tr1" height="10%">\' +  title + \'</td></tr><tr ><td style="text-align:left" height="60%" cellpading="2" class ="msg_tr2">\' + body + \'</td></tr><tr ><td colspan="2" class ="msg_tr3" >\' + yesbutton + \'&nbsp; &nbsp; \' + nobutton + \'</td></tr></table></div>\';				
							jQuery(document.body).append( message );								
							jQuery(\'.sai_message_box\').css(\'top\', jQuery(\'html, body\').scrollTop() + 150);
							jQuery(\'.sai_message_box\').show(\'slow\');
						}else{
							var message = \' <table  border="0" cellpadding="8" width="100%" height="100%"><tr height="60%" ><td rowspan="2" width="40%">\'+ img +  \'</td><td widt="60%" class ="msg_tr1" height="10%">\' + title + \'</td></tr><tr><td style="text-align:left" height="60%" cellpading="2" class ="msg_tr2">\' + body + \'</td></tr><tr ><td colspan="2" class ="msg_tr3" >\' + yesbutton + \'&nbsp; &nbsp; \' + nobutton + \'</td></tr></table>\'
							jQuery(\'.sai_message_box\').css(\'top\', jQuery(\'html, body\').scrollTop() + 150);
							jQuery(\'.sai_message_box\').show(\'slow\');
							jQuery(\'.sai_message_box\').html( message );
						}
					},
					close_message: function() {
						jQuery(\'.sai_message_box\').hide(\'fast\');
					},
					yes_close_message: function(did) {						
						$(\'#did\'+did).attr("src","' . $theme['images'] . 'progress.gif");						
						jQuery(\'.sai_message_box\').hide(\'fast\');
						$.ajax({				
							type: "POST",				
							url: window.location+"&ajaxdel=1&delete_fuser_id="+did,				
							// checking for error
							success: function(data){								
								var result = data.substring(0,1);					
								var msg = data.substring(1);
								if(result == "1"){
									message_box.show_message( "Delete ",msg,2);
									$("#tr"+did).fadeOut(2000);																														
								}
								if(result == "0"){
									message_box.show_message( "Error ",msg,1);																																			
								}
							},				
							error: function(request,error) {
								message_box.show_message("Error",\'' . $l['connect_error'] . '\',1);					
							}
						});					
					},
					no_close_message: function() {
						jQuery(\'.sai_message_box\').hide(\'fast\');			
					}
				}
			}();
				
			$(document).ready(function(){	
				$(".sai_altrowstable tr").mouseover(function(){
					var old_class = $(this).attr("class");		
					$(this).attr("class", "sai_tr_bgcolor");		
					$(this).mouseout(function(){
						$(this).attr("class", old_class);
					});
				});
				
				// fro deleting record
				$(".delete").click(function() {	
					var did = $(this).attr(\'id\');
//.........这里部分代码省略.........
开发者ID:Hezkibel,项目名称:soft,代码行数:101,代码来源:ftpmanage_theme.php

示例6: userindex_theme

function userindex_theme()
{
    global $theme, $globals, $softpanel, $user, $l, $updates_available, $iscripts, $scripts, $info, $cscripts;
    if ($globals['softpanel'] == 'webuzo') {
        $usage = array();
        $usage['cpu'] = $softpanel->cpu();
        $usage['ram'] = $softpanel->ram();
        $usage['disk'] = $softpanel->disk();
        $usage['bandwidth'] = $softpanel->bandwidth();
        if (optGET('ajax')) {
            echo 'var server_cpu = [
				{ label: "Used",  data: ' . $usage['cpu']['percent'] . '},
				{ label: "Free",  data: ' . $usage['cpu']['percent_free'] . '}
			];
			
			var server_ram = [
				{ label: "Used",  data: ' . $usage['ram']['used'] . '},
				{ label: "Free",  data: ' . $usage['ram']['free'] . '}
			];
			
			var server_disk = [
				{ label: "Used",  data: ' . $usage['disk']['total']['used_gb'] . '},
				{ label: "Free",  data: ' . $usage['disk']['total']['free_gb'] . '}
			];
			
			var server_bandwidth = [
				{ label: "Used",  data: ' . (empty($usage['bandwidth']['used_gb']) ? 0.01 : $usage['bandwidth']['used_gb']) . '},
				{ label: "Free",  data: ' . (empty($usage['bandwidth']['free_gb']) ? $usage['bandwidth']['used_gb'] * 100 : $usage['bandwidth']['free_gb']) . '}
			];';
            return true;
        }
    }
    $__tmp = explode(':', !empty($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'localhost');
    $globals['HTTP_HOST'] = $__tmp[0];
    softheader($l['<title>'], 'js');
    /*For native UI support*/
    if (!empty($softpanel->pheader)) {
        if (substr_count($_SERVER['REQUEST_URI'], 'paper_lantern') > 0) {
            echo '
			<style>
				.row_usi {
				padding-left: 100px;
				padding-right: 5px;
				}
				
				.row_usi_warn {
				padding-left: 110px;
				padding-right: 30px;
				}
				
				.sai_inputs_cls input{
				width:280px;
				}
				
				.sai_suggestions_cls{
				width:280px;
				}
				
				.row_usi_cls {
				padding-left: 50px;
				}
				
				@media screen and (min-width: 980px) and (max-width: 1279px){
					.row_usi{
					padding-left: 35px;
					padding-right: 0;
					}
					
					.row_usi_warn{
					padding-left: 55px;
					padding-right: 0;
					}
				}
				
				@media screen and (min-width: 800px) and (max-width: 980px){
					.row_usi{
					padding: 0 20px;
					}
					
					.row_usi_warn{
					padding-left: 30px;
					padding-right: 5px;
					}
					
					.sai_inputs_cls input{
					width:250px;
					}
					
					.sai_suggestions_cls{
					width:250px;
					}
				}
				
				@media screen and (min-width: 768px) and (max-width: 799px){
					.row_usi{
					padding: 0 115px;
					}
					
					.row_usi_warn{
					padding-left: 130px;
//.........这里部分代码省略.........
开发者ID:Hezkibel,项目名称:soft,代码行数:101,代码来源:userindex_theme.php

示例7: ftp_connections_theme

function ftp_connections_theme()
{
    global $user, $globals, $l, $theme, $softpanel, $iscripts, $catwise, $error, $scripts, $ftp_list, $done, $tuser;
    // Ajax response for deleting a ftp connection
    if (optGET('ajaxdel')) {
        // Error
        if (!empty($error)) {
            echo '0' . current($error);
            return false;
        }
        // Success
        if (!empty($done)) {
            echo '1' . $l['delete'];
            return true;
        }
    }
    softheader($l['<title>']);
    echo '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[
			// For msgbox
			var message_box = function() {			
				return {
					show_message: function(title, body , image) {			
						var okbutton = \'<input  style="width:75px" class="sai_graybluebut" type="button" onclick="message_box.close_message();" value="OK" />\';
						if(image == "1"){
							var img = \'<img src="' . $theme['images'] . 'error.gif" />\';
						}else{
							var img = \'<img src="' . $theme['images'] . 'confirm.gif" />\';			
						}					
						if(jQuery(\'.sai_message_box\').html() === null) {
							var message = \'<div class="sai_message_box"><table border="0" cellpadding="8" width="100%" height="100%"><tr ><td rowspan="2" width="40%" > \'+ img + \'</td><td width="60%" class ="msg_tr1">\' +  title + \'</td></tr><tr class ="msg_tr2"><td style="text-align:left">\' + body + \'</td></tr><tr ><td colspan="2" class ="msg_tr3">\' + okbutton + \'</td></tr></table></div>\';
							jQuery(document.body).append( message );								
							jQuery(\'.sai_message_box\').css(\'top\', jQuery($(jQuery.browser.webkit ? "body": "html")).scrollTop() + 150);
							jQuery(\'.sai_message_box\').show(\'slow\');
						}else{
							var message =\' <table border="0" width="100%" cellpadding="8" height="100%"><tr ><td rowspan="2" width="40%">\'+ img +  \'</td><td widt="60%" class ="msg_tr1">\' + title + \'</td></tr><tr class ="msg_tr2"><td style="text-align:left">\' + body + \'</td></tr><tr ><td colspan="2" class ="msg_tr3">\' + okbutton + \'</td></tr></table>\';				
							jQuery(\'.sai_message_box\').css(\'top\', jQuery($(jQuery.browser.webkit ? "body": "html")).scrollTop() + 150);
							jQuery(\'.sai_message_box\').show(\'slow\');
							jQuery(\'.sai_message_box\').html( message );
						}
					},
					delete_message: function(title, body ,did) {								
						var yesbutton = \'<input type="button" style="width:75px" onclick="message_box.yes_close_message(\\\'\'+did+\'\\\');" value="YES" class="sai_graybluebut"/>\';
						var nobutton = \'<input type="button" style="width:75px" onclick="message_box.no_close_message();" value="NO" class="sai_graybluebut" />\';
						var img = \'<img src="' . $theme['images'] . 'remove_big.gif" />\';
						if(jQuery(\'.sai_message_box\').html() === null) {
							var message = \'<div class="sai_message_box"><table border="0" cellpadding="8" width="100%" height="100%"><tr height="60%" ><td rowspan="2" width="40%" > \'+ img + \'</td><td width="60%" class ="msg_tr1" height="10%">\' +  title + \'</td></tr><tr ><td style="text-align:left" height="60%" cellpading="2" class ="msg_tr2">\' + body + \'</td></tr><tr ><td colspan="2" class ="msg_tr3" >\' + yesbutton + \'&nbsp; &nbsp; \' + nobutton + \'</td></tr></table></div>\';				
							jQuery(document.body).append( message );								
							jQuery(\'.sai_message_box\').css(\'top\', jQuery($(jQuery.browser.webkit ? "body": "html")).scrollTop() + 150);
							jQuery(\'.sai_message_box\').show(\'slow\');
						}else{
							var message = \' <table  border="0" cellpadding="8" width="100%" height="100%"><tr height="60%" ><td rowspan="2" width="40%">\'+ img +  \'</td><td widt="60%" class ="msg_tr1" height="10%">\' + title + \'</td></tr><tr><td style="text-align:left" height="60%" cellpading="2" class ="msg_tr2">\' + body + \'</td></tr><tr ><td colspan="2" class ="msg_tr3" >\' + yesbutton + \'&nbsp; &nbsp; \' + nobutton + \'</td></tr></table>\'
							jQuery(\'.sai_message_box\').css(\'top\', jQuery($(jQuery.browser.webkit ? "body": "html")).scrollTop() + 150);
							jQuery(\'.sai_message_box\').show(\'slow\');
							jQuery(\'.sai_message_box\').html( message );
						}
					},
					close_message: function() {
						jQuery(\'.sai_message_box\').hide(\'fast\');
					},
					yes_close_message: function(did){
						$(\'#did\'+did).attr("src","' . $theme['images'] . 'progress.gif");
						jQuery(\'.sai_message_box\').hide(\'fast\');
						$.ajax({
							type: "POST",
							url: window.location+"&ajaxdel=1&ftp_connection_pid="+did,
							// Checking the results
							success: function(data){
								var result = data.substring(0,1);
								var msg = data.substring(1);
								if(result == "1"){
									message_box.show_message( "Delete ",msg,2);
									$("#tr"+did).fadeOut(2000);
								}
								if(result == "0"){
									message_box.show_message( "Error ",msg,1);
								}
							},
							error: function(request,error){
								message_box.show_message("Error",\'' . $l['connect_error'] . '\',1);
							}
						});
					},
					no_close_message: function(){
						jQuery(\'.sai_message_box\').hide(\'fast\');
					}
					
				}
			}();
				
			$(document).ready(function(){
				
				$(".sai_altrowstable tr").mouseover(function(){
					
					var old_class = $(this).attr("class");
					$(this).attr("class", "sai_tr_bgcolor");
					
					$(this).mouseout(function(){
						$(this).attr("class", old_class);
					});
					
//.........这里部分代码省略.........
开发者ID:Hezkibel,项目名称:soft,代码行数:101,代码来源:ftp_connections_theme.php

示例8: sslcsr_theme

function sslcsr_theme()
{
    global $user, $globals, $l, $theme, $softpanel, $error, $done, $domain_list, $domain_name, $csr_list, $detailcsr;
    // For delete
    if (optGET('ajaxdel')) {
        if (!empty($error)) {
            echo '0' . current($error);
            return false;
        }
        if (!empty($done)) {
            echo '1' . $l['delete'];
            showcert();
            return true;
        }
    }
    // For detail
    if (optGET('ajaxdetail')) {
        if (!empty($error)) {
            echo '0' . current($error);
            return false;
        }
        if (!empty($done)) {
            showdetail();
            return true;
        }
    }
    softheader($l['<title>']);
    error_handle($error, '100%');
    if (!empty($done)) {
        echo '<div class="sai_success">' . $done . '</div>';
    }
    echo '<center class="sai_tit"><img src="' . $theme['a_images'] . 'sslcsr.gif" />&nbsp;' . $l['lbl_head'] . '</center>';
    if (empty($domain_list)) {
        echo ' <center ><h2>' . $l['no_key_file'] . '</h2></center>';
    } else {
        echo '<div id="showrectab">';
        showcert();
        echo '</div>
	<div id="detailrectab" style="display:none">';
        echo '</div><br /><br />
		
		<form accept-charset="' . $globals['charset'] . '" name="createssl" method="post" action="">
		<table border="0" cellpadding="8" cellspacing="8" width="700px" align="center" class="sai_divroundshad" style="padding-left:15px; padding-top:15px;" >
		<tr>
			<td>
				<span class="sai_head">' . $l['key'] . '</span><br />
			</td>	
			<td>
				<select class="input" name="selectkey" id="selectkey">';
        foreach ($domain_list as $key => $value) {
            $ext = get_extension($value);
            if ($ext == 'key') {
                $file = get_filename($value);
                if (!in_array($file . '.csr', $csr_list)) {
                    echo '<option value=' . $file . '>' . $file . '</option>';
                }
            }
        }
        echo '<option value=newkey>' . $l['genrate'] . '</option>';
        echo '</select>
			</td>
		</tr>
		<tr>
			<td>
				<span class="sai_head">' . $l['domain'] . '</span><br />
				<span class="sai_exp">' . $l['domain_desc'] . '</span></td>
			</td>
			<td>
				<input type="text" name="domain" id="domain" size="30" ' . (!empty($error) ? 'value="' . POSTval('domain', '') . '"' : '') . ' />
			</td>
		</tr>	
		<tr>
			<td width="40%">
				<span class="sai_head">' . $l['country'] . '</span><br />
				<span class="sai_exp">' . $l['country_desc'] . '</span></td>
			<td>
				<input type="text" name="country" id="country" size="30" ' . (!empty($error) ? 'value="' . POSTval('country', '') . '"' : '') . ' />
			</td>
		</tr>
		<tr>
			<td width="40%">
				<span class="sai_head">' . $l['state'] . '</span><br />
				<span class="sai_exp">' . $l['state_desc'] . '</span></td>
			<td>
				<input type="text" name="state" id="state" size="30" ' . (!empty($error) ? 'value="' . POSTval('state', '') . '"' : '') . ' />
			</td>
		</tr>
		
		<tr>
			<td width="40%">
				<span class="sai_head">' . $l['locality'] . '</span><br />
				<span class="sai_exp">' . $l['locality_desc'] . '</span></td>
			<td>
				<input type="text" name="locality" id="locality" size="30" ' . (!empty($error) ? 'value="' . POSTval('locality', '') . '"' : '') . ' />
			</td>
		</tr>
		<tr>
			<td width="40%">
				<span class="sai_head">' . $l['organisation'] . '</span><br />
				<span class="sai_exp">' . $l['organisation_desc'] . '</span></td>
//.........这里部分代码省略.........
开发者ID:Hezkibel,项目名称:soft,代码行数:101,代码来源:sslcsr_theme.php

示例9: pass_protect_dir_theme

function pass_protect_dir_theme()
{
    global $user, $globals, $l, $theme, $softpanel, $iscripts, $catwise, $error, $done;
    // For Delete
    if (optGET('ajaxdel')) {
        if (!empty($error)) {
            echo '{err}' . current($error) . '{/err}';
            return false;
        }
        if (!empty($done)) {
            echo '{suc}' . $l['delete'] . '{/suc}';
            return true;
        }
    }
    // For Adding a Record
    if (optGET('add_pass_protect')) {
        if (!empty($error)) {
            echo '{err}' . current($error) . '{/err}';
            return false;
        }
        if (!empty($done)) {
            echo '{suc}' . $l['add_pass_protect'] . '{/suc}';
            show_protected_user_accts();
            return true;
        }
    }
    softheader($l['<title>']);
    echo '
<center class="sai_tit">
	<img src="' . $theme['a_images'] . 'email_account.gif" />&nbsp;' . $l['lbl_head'] . '
</center>

<form accept-charset="' . $globals['charset'] . '" action="" method="post" name="frm_protect_dir" id="frm_protect_dir">

	<table border="0" cellpadding="8" cellspacing="8" width="700px" align="center" class="sai_divroundshad" style="padding-left:15px; padding-top:15px;" >
	<tr>
		<td width="35%">
			<span class="sai_head">' . $l['dir_path'] . '</span><br />
			<span class="sai_exp">' . $l['exp_dir_path'] . '</span>
		</td>
		<td>
			' . $softpanel->user['homedir'] . '/<input type="text" name="dir_path" id="dir_path" size="30"  value="' . stripslashes(POSTval('dir_path', 'public_html/')) . '" onfocus="" />
		</td>
	</tr>
	<tr>
		<td width="35%">
			<span class="sai_head">' . $l['dir_name'] . '</span><br />
			<span class="sai_exp">' . $l['exp_dir_name'] . '</span>
		</td>
		<td>
			<input type="text" name="dir_name" id="dir_name" size="30" size="30" value="' . POSTval('dir_name', '') . '" />
		</td>
	</tr>
	<tr>
		<td width="35%">
			<span class="sai_head">' . $l['username'] . '</span><br />
			<span class="sai_exp">' . $l['exp_username'] . '</span>
		</td>
		<td>
			<input type="text" name="username" id="username" size="30" size="30" value="' . POSTval('username', '') . '" />
		</td>
	</tr>
	<tr>
		<td>
			<span class="sai_head">' . $l['password'] . '</span><br />
			<span class="sai_exp">' . $l['exp_password'] . '</span>
		</td>
		<td>
			<input type="password" name="password" id="password" size="30" value="" />
		</td>
	</tr>
	<tr>
		<td>
			<span class="sai_head">' . $l['re_password'] . '</span><br />
			<span class="sai_exp">' . $l['exp_re_password'] . '</span>
		</td>
		<td>
			<input type="password" name="re_password" id="re_password" size="30" value="" />
		</td>
	</tr>
	<tr>
		<td colspan="2">
			<p align="center">
				<input type="hidden" name="add_pass_protect" value="1" />
				<input type="submit" style="cursor:pointer" value="' . $l['submit_pass_protect'] . '" name="submit_pass_protect" class="sai_graybluebut" id="submit_pass_protect" />&nbsp;<img id="add_pass_proc_loader" src="' . $theme['images'] . 'progress.gif" style="display:none" />
			</p>
		</td>
	</tr>
	</table>
</form>

<center>
	</br></br>
	<span class="sai_head">' . $l['record_table'] . '<br /><br />
</center>

<div id="showrectab">';
    show_protected_user_accts();
    echo '</div>

//.........这里部分代码省略.........
开发者ID:Hezkibel,项目名称:soft,代码行数:101,代码来源:pass_protect_dir_theme.php

示例10: classes_theme

function classes_theme()
{
    global $user, $globals, $l, $theme, $softpanel, $iscripts, $catwise, $error, $scripts;
    global $software, $cid, $info, $settings, $init_tab, $overwrite_option, $dbs, $installed, $__settings, $setupcontinue, $installations, $notes, $show_installtype, $protocols, $nopackage;
    // Give the staus
    if (optGET('ajaxstatus')) {
        $_status = soft_progress(optGET('ajaxstatus'));
        $tmp_status = unserialize($_status[1]);
        $_status[1] = $tmp_status['current_status'];
        if (!empty($_status)) {
            echo implode('|', $_status);
            return true;
        }
        // False call
        echo 0;
        return false;
    }
    //First add the installation info
    if (empty($installed)) {
        $info['install'] = '<div id="fadeout_div"><form accept-charset="' . $globals['charset'] . '" name="installsoftware" method="post" action="" onsubmit="return checkform();" id="installsoftware" class="form-horizontal">
						' . error_handle($error, "100%", 0, 1) . '
						
<script language="javascript" src="' . $theme['url'] . '/js/jquery-ui-custom.js?' . $GLOBALS['globals']['version'] . '" type="text/javascript"></script>
<script language="javascript" type="text/javascript"><!-- // --><![CDATA[

function checkform(dosubmit){
	try{
		if(!formcheck()){
			return false;
		}
	}catch(e){
		//Do nothing
	}
	$_("softsubmitbut").disabled = true;
	
	if(!get_package()){
		return false;
	}
	
	if(useprog){
		
		// Send a request to check the status
		progressbar.start();
		
		// Return false so that the form is not submitted
		return false;
	
	// This is OLD School !
	}else{		
		if(dosubmit == 1){			
			$_("installsoftware").submit();	
		}
		show_msg("' . $l['installing'] . '");
	}
	
	return true;
	
};

function toggle_advoptions(){
	if ($("#advoptions").is(":hidden")){
		$("#advoptions").slideDown("slow");
		$("#advoptions_toggle_plus").attr("src", "' . $theme['images'] . 'minus_new.gif");
	}
	else{
		$("#advoptions").slideUp("slow");
		$("#advoptions_toggle_plus").attr("src", "' . $theme['images'] . 'plus_new.gif");
	}
}

function plus_onmouseover(){
	$("#plus").attr("src", "' . $theme['images'] . 'plus_hover.gif");
}

function plus_onmouseout(){
	$("#plus").attr("src", "' . $theme['images'] . 'plus.gif");
}

var progressbar = {
	timer: 0,
	total_width: 0,	
	status_key: "",
	synctimer: 0,
	fadeout_div: "#fadeout_div",
	win_div: "#install_win",
	progress_div: "#progress_bar",
	formid: "#installsoftware",
	frequency: 8000,
	
	current: function(){
		try{
			var tmp_cur = Math.round(parseInt($_("progress_color").width)/parseInt($_("table_progress").width)*100);
			if(tmp_cur > 100){
				tmp_cur = 99;
			}
			return tmp_cur;
		}catch(e){
			return -1;	
		}
	},
//.........这里部分代码省略.........
开发者ID:Hezkibel,项目名称:soft,代码行数:101,代码来源:classes_theme.php

示例11: csf_conf_theme

function csf_conf_theme()
{
    global $user, $globals, $iscripts, $l, $theme, $softpanel, $csf_conf, $done, $error;
    // For Updating Entire File
    if (optGET('ajaxcsf')) {
        // Error
        if (!empty($error)) {
            echo '0' . current($error);
            return false;
        }
        // Success
        if (!empty($done)) {
            echo '1' . $l['change_final_file'];
            return true;
        }
    }
    softheader($l['<title>']);
    error_handle($error, '100%');
    $linecount = count($csf_conf['all']);
    echo '<center><div class="sai_heading"><img src="' . $theme['a_images'] . 'firewalls.gif"  alt=""  />&nbsp;' . $l['lbl_head'] . '</div>
	<form accept-charset="' . $globals['charset'] . '" name="editemailsettings" method="post" action="" id="editcsf">
	<table border="0" cellpadding="8" cellspacing="8" width="700px" align="center" class="sai_divroundshad" style="padding:15px;" >	
		<tr>
			<td>
				<span class="sai_head">' . $l['file_part'] . '</span>&nbsp;&nbsp;<br />
			</td>	
			<td>
				<select class="input" name="select_section" id="select_section">';
    echo '<option value=all>All</option>';
    foreach ($csf_conf['part'] as $key => $value) {
        $test = explode(" ", $value['name']);
        echo '<option value=' . trim($test[0]) . '-' . trim($test[1]) . '>' . $value['name'] . '</option>';
    }
    echo '</select> &nbsp;<img id="create_err_log" src="' . $theme['images'] . 'progress.gif" style="display:none"></td>	
		</tr>				
	</table>
	<br /><br />
	<div id="all" style="height:400px; width:700px; overflow:auto; border: 2px solid #CCC; margin:0px auto;" class="ContentDivs">
		<table border="0" cellpadding="8" cellspacing="8" width="700px" align="center" class="sai_divroundshad">
			<tr>
				<td style="background-color:#CCC;vertical-align:top;font-size:12px;">';
    for ($i = 1; $i <= $linecount; $i++) {
        echo $i . "<br />";
    }
    echo '</td>
			<td nowrap="nowrap"><textarea style=" overflow:hidden; font-size:12px; border:none; resize: none;" WRAP=OFF name="csf_data_all" id="csf_data_all" rows=' . $linecount . ' cols=120 >' . htmlentities(implode($csf_conf['all']), ENT_QUOTES, "UTF-8") . '</textarea>
				</td>
			</tr>
		</table>
	</div>';
    foreach ($csf_conf['part'] as $key => $value) {
        $test = explode(" ", $value['name']);
        $parts = trim($test[0]) . '-' . trim($test[1]);
        echo '<div id=' . $parts . ' style="height:400px; width:700px; overflow:auto; border: 2px solid #CCC; margin:0px auto; display:none;" class="ContentDivs" >
		<table border="0" cellpadding="8" cellspacing="8" width="700px" align="center" class="sai_divroundshad">
			<tr>
				<td style="background-color:#CCC;vertical-align:top;font-size:12px;">';
        $k = 0;
        for ($i = $value['startpoint']; $i <= $value['endpoint']; $i++) {
            echo $i . "<br />";
            $temp_data[$parts][$k] = $csf_conf['all'][$i];
            $k++;
        }
        echo '</td>
			<td nowrap="nowrap"><textarea style=" overflow:hidden; font-size:12px; border:none; resize: none;" WRAP=OFF name="csf_data_' . $parts . '" id="csf_data_' . $parts . '" rows=' . count($temp_data[$parts]) . ' cols=120 >' . htmlentities(implode($temp_data[$parts]), ENT_QUOTES, "UTF-8") . '</textarea>
				</td>
			</tr>
		</table>
	</div>';
    }
    echo '<p align="center">
		<input type="submit" value="' . $l['save'] . '" name="savecsf" class="sai_graybluebut" id="savecsf" /> &nbsp;<img id="save_csf" src="' . $theme['images'] . 'progress.gif" style="display:none">
	</p><br />
	<p align="center">' . $l['note'] . '</p>
	</form>';
    echo '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[
		
	$(document).ready(function(){
		
		// For 
		$("#select_section").change( function() {
			var new_id = $("#select_section").val();
			$(".ContentDivs:visible").fadeOut("fast");
			$("#"+new_id).fadeIn("slow");
		});				
			
		// For updating entire file
		$("#savecsf").click(function(){
			
			$("#save_csf").css("display", "");
			var new_id = $("#select_section").val();		
			
			$.ajax({
				type: "POST",
				url: window.location+"&ajaxcsf=1&savecsf=1",
				data: "csfdata=csf_data_"+new_id+"&"+$("#editcsf").serialize(),
				
				// Checking for error
				success: function(data){
					$("#save_csf").css("display", "none");
//.........这里部分代码省略.........
开发者ID:Hezkibel,项目名称:soft,代码行数:101,代码来源:csf_conf_theme.php

示例12: listdomains_theme

function listdomains_theme()
{
    global $theme, $globals, $user, $l, $langs, $error, $done, $softpanel, $listdomains;
    if (optGET('ajaxdel')) {
        if (!empty($error)) {
            echo '0' . current($error);
            return false;
        }
        if (!empty($done)) {
            echo '1' . $l['delete'];
            return true;
        }
    }
    // Ajax part for update privaliges
    if (optGET('ajaxedit')) {
        if (!empty($error)) {
            echo '0 ' . current($error);
            return false;
        }
        if (!empty($done)) {
            echo '1' . $l['domain_edited'];
            showdomains();
            return true;
        }
    }
    // Privaliges page for popup
    if (optGET('editdomain')) {
        $eowner = POST('owner');
        $eusername = POST('username');
        $edomain = POST('domain');
        $epath = POST('path');
        $ereplace_path = POST('replace_path');
        $ebackup_dir = POST('backup_dir');
        $edata_dir = POST('data_dir');
        echo '<style type="text/css">
		.ui_titlebar {
			padding: 0.4em 1em;
			background-color: #CCCCCC;
			border: 1px solid #AAAAAA;
			color: #222222;
			font-weight: bold;
			border-radius: 4px;
		}
		
		.sai_popup_add {
			width:500px;
			height:460px;
			position:absolute;
			top:50%;
			left:50%;
			margin:0 auto;
			display:none;
			background:#FFFFFF;
			border:#666 1px solid;
			padding:5px;
		}
		
		.close {
			float:right;
			position:relative;
			z-index:99999;
			margin:3px 6px 0;
		}
		#scroller-body {		
			width=100%;
			padding-bottom:30px;
			height: 100%;
		}
	</style>
	<script language="javascript" type="text/javascript" ><!-- // --><![CDATA[	
		$(document).ready(function(){
			
			$("#submitdomain").click(function() {
			
				var eusername = $("#eusername").val();
				var edomain = $("#edomain").val();
				var oldedomain = $("#oldedomain").val();
				var epath = $("#epath").val();
				var ereplace_path = $("#ereplace_path").val();
				var ebackup_dir = $("#ebackup_dir").val();
				var edata_dir = $("#edata_dir").val();
				
				$("#comsg").css("display", "none");
				$("#ermsg").css("display", "none");
				
				var w_l = window.location.toString();
				if(w_l.indexOf("#") > 0){
					w_l = w_l.substring(0, w_l.indexOf("#"));
				}
				$.ajax({
					type: "POST",
					url: w_l+"&submitdomain=1&ajaxedit=1",
					data: "feusername="+eusername+"&fedomain="+edomain+"&foldedomain="+oldedomain+"&fepath="+epath+"&fereplace_path="+ereplace_path+"&febackup_dir="+ebackup_dir+"&fedata_dir="+edata_dir,
					
					// checking for error
					success: function(data){
						var result = data.substring(0,1);
						if(result == "1"){
						var msg = data.substring(1,data.indexOf("<table"));
						var output = data.substring(data.indexOf("<table"));
//.........这里部分代码省略.........
开发者ID:Hezkibel,项目名称:soft,代码行数:101,代码来源:listdomains_theme.php

示例13: reporterror

# SOFTACULOUS RESELLER PANEL IS DISABLED
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if (!empty($globals['disable_reseller_panel']) && defined('SOFTRESELLER')) {
    reporterror($l['disable_reseller_admin_t'], $l['disable_reseller_admin'], $l['disable_reseller_admin_t']);
}
//////////////
// LETS START
//////////////
// Is it an API call ??
if (isset($_GET['api'])) {
    $globals['theme_folder'] = 'api';
}
$start_time = microtime_float();
//Time Stops for no one
if (empty($act)) {
    $act = optGET('act');
}
switch ($act) {
    //The DEFAULT Page
    default:
        include_once $globals['adminfiles'] . '/adminindex.php';
        adminindex();
        break;
        //The categories
    //The categories
    case 'categories':
        include_once $globals['adminfiles'] . '/categories.php';
        categories();
        break;
        //The Settings
    //The Settings
开发者ID:Git-Host,项目名称:AMPPS,代码行数:31,代码来源:admin_index.php

示例14: apps_installations_theme

function apps_installations_theme()
{
    global $user, $globals, $l, $theme, $softpanel, $error, $apps;
    if (!empty($user['apps_ins']) && optGET('api')) {
        _api($user['apps_ins'], optGET('api'));
        return;
    }
    softheader($l['<title>']);
    error_handle($error, '100%');
    if (optGET('showupdates')) {
        echo '<center class="sai_anotice">
<a href="' . $globals['ind'] . 'act=apps_installations">' . $l['showing_only'] . ' ' . $l['see_all'] . '</a>
</center>
<br />';
    }
    // For APPS INSTALLATION LIST
    ksort($user['apps_ins']);
    echo '<br /><br /><center>
	<span class="sai_newhead">' . $l['apps_ins'] . '</span>
</center><br /><br />';
    echo '<table border="0" cellpadding="2" cellspacing="0" width="100%" >
<tr>
	<td><b>' . $l['path'] . '</b></td>
	<td width="180"><b>' . $l['ins_time'] . '</b></td>
	<td width="80"><b>' . $l['version'] . '</b></td>
	<td width="120"><b>' . $l['options'] . '</b></td>
</tr>
</table>
';
    $i = 1;
    $th = 0;
    if (count($user['apps_ins']) > 0) {
        //r_print($user['apps_ins']);
        echo '<table border="0" cellpadding="5" cellspacing="0" width="100%" class="sai_altrowstable">';
        foreach ($user['apps_ins'] as $k => $v) {
            foreach ($v as $ik => $iv) {
                if ($th == 0) {
                    echo '<tr>
				<th colspan="5">' . $apps[$iv['aid']]['name'] . '</th>
			</tr>';
                }
                echo '<tr id="trid' . $ik . '" class="' . ($i % 2 == 0 ? "sai_evenrowcolor" : "sai_oddrowcolor") . '">
			<td>' . (empty($iv['path']['base']) ? $l['default_apps_base'] : $iv['path']['base']) . '</td>
			<td width="180">' . datify($iv['itime']) . '</td>
			<td width="80">' . $iv['version'] . '</td>
			<td width="120"><a href="' . $globals['ind'] . 'act=apps&app=' . $iv['aid'] . '" title="' . $l['remove'] . '"><img src="' . $theme['images'] . 'remove.gif" /></a>&nbsp;<input type="checkbox" name="ainsids[]" value="' . $iv['aid'] . '">
			</td>
		</tr>';
                $i++;
                $th = 1;
            }
            $th = 0;
        }
        echo '</table><br /><br />
	
<p align="right">
		' . $l['with_selected'] . ': 
		<select name="multi_options_apps" id="multi_options_apps">
			<option name="todo_apps" id="todo_apps" value="0">---</option>
			<option name="todo_apps" id="todo_apps" value="mult_rem">' . $l['remove_apps'] . '</option>
		</select>
		<input type="button" value="' . $l['go'] . '" onclick="show_confirm_apps()">
		<br />
	</p>
	<div id="rem_div_apps"></div>
	
<script language="javascript" type="text/javascript"><!-- // --><![CDATA[
ainsids = new Array();
removed = new Object();

function show_confirm_apps(){
	
	ainsids = new Array();
	removed = new Object();
	
	if($_("multi_options_apps").value != "mult_rem"){
		return false;
	}

	// Build the list of Installations to remove
	var field = document.getElementsByName(\'ainsids[]\');
		ainsids = new Array();
		var c = 0;
		for(i = 0; i < field.length; i++){
			if(field[i].checked == true){
				ainsids[c] = field[i].value;
				c++;
			}
		
	}
	//alert(ainsids);
	
	if(c == 0){
		alert("' . $l['no_sel_inst'] . '");
		return false;
	}
	
	var r = confirm("' . $l['del_insid'] . '");
	if(r != true){
		return false;
//.........这里部分代码省略.........
开发者ID:Hezkibel,项目名称:soft,代码行数:101,代码来源:apps_installations_theme.php

示例15: top14_theme

function top14_theme()
{
    global $theme, $globals, $user, $l, $langs, $skins, $error, $saved, $categories, $iscripts, $updates_available, $allcatwise, $scripts, $cscripts;
    $top = array();
    foreach ($scripts as $k => $v) {
        if (empty($iscripts[$k])) {
            continue;
        }
        $top[$k] = $v['ratings'] * $v['votes'];
    }
    // Sorting according to top ratings
    arsort($top);
    //To fill up the scripts if less than 7 are selected by admin
    $ext_fill = array();
    $ext_fill = $top;
    if (file_exists($globals['path'] . '/conf/top_scripts.php')) {
        $top = unserialize(file_get_contents($globals['path'] . '/conf/top_scripts.php'));
    }
    // If Admin has checked Append scripts than only append the scripts. Otherwise Only Selected Scripts will be displayed.
    if (count($top) < 7 && !empty($globals['append_apps'])) {
        foreach ($ext_fill as $k => $v) {
            $top[$k] = $k;
        }
        array_unique($top);
    }
    //r_print($globals);
    if (!empty($globals['show_cscript_in_top'])) {
        //r_print($top_custom_list);
        foreach ($cscripts as $ck => $cv) {
            if (array_key_exists($ck, $iscripts)) {
                $top_custom[$ck] = $ck;
            }
        }
        $tmp_top = $top;
        // Do we need to add any other default scripts ?
        if (!empty($top_custom)) {
            $top = $top_custom;
        }
        if (!empty($tmp_top)) {
            $top += $tmp_top;
        }
    }
    foreach ($scripts as $k => $v) {
        // We have to remove the scripts which are not enabled AND yet coming from top_scripts.php (i.e. Admin have saved it from top scripts)
        if (!array_key_exists($k, $iscripts) && !empty($top[$k])) {
            unset($top[$k]);
        }
        if (empty($iscripts[$k]) || !empty($scripts[$k]['parent']) && !empty($iscripts[$scripts[$k]['parent']])) {
            continue;
        }
        $top[$k] = $v['ratings'] * $v['votes'];
    }
    //r_print($top);
    $updates_available = 0;
    foreach ($user['ins'] as $insid => $soft) {
        if (!empty($iscripts[$soft['sid']])) {
            if (is_upgradable($insid)) {
                $updates_available++;
            }
        }
    }
    $cat_image_path = 'themes/default/images/cats/';
    if ($globals['softpanel'] == 'directadmin') {
        $fullurl = 'CMD_PLUGINS/softaculous';
        $cat_image_path = 'images/themes/default/images/cats/';
    } elseif ($globals['softpanel'] == 'cpanel') {
        $fullurl = 'softaculous';
    } elseif ($globals['softpanel'] == 'plesk') {
        $fullurl = '/modules/softaculous';
    } else {
        $fullurl = 'http://localhost/ampps';
    }
    $cat_width = 24;
    $cat_height = 40;
    if ($globals['theme'] != 'default' && substr_count($_SERVER['REQUEST_URI'], 'paper_lantern') > 0) {
        $cat_image_path = 'themes/default/';
        if ($globals['softpanel'] == 'directadmin') {
            $fullurl = 'CMD_PLUGINS/softaculous';
            $cat_image_path = 'images/themes/default/';
        } elseif ($globals['softpanel'] == 'cpanel') {
            $fullurl = 'softaculous';
        } elseif ($globals['softpanel'] == 'plesk') {
            $fullurl = '/modules/softaculous';
        } else {
            $fullurl = 'http://localhost/ampps';
        }
        $cat_width = 90;
        $cat_height = 40;
    }
    $custome_width = optGET('width');
    $no_cat = !empty($globals['disable_cats']) ? $globals['disable_cats'] : optGET('nocat');
    $my_ins = !empty($globals['enable_myins']) ? $globals['enable_myins'] : optGET('noins');
    if ($globals['softpanel'] == 'plesk') {
        $width = '450px';
        $s_width = '455px';
    } else {
        $width = 'auto';
        $s_width = 'auto';
    }
    if (!empty($custome_width) && is_numeric($custome_width)) {
//.........这里部分代码省略.........
开发者ID:Hezkibel,项目名称:soft,代码行数:101,代码来源:top14_theme.php


注:本文中的optGET函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。