Przeglądaj źródła

Minor Fixes

This is mostly fixes for warnings or notices that appear with max error
reporting. There's still othr stuff, but this'll do for now.

Form_table_class: Uses the old, PHP-4 constructor method which is now
deprecated.
Refreshed: Same as above, used the PHP-4 constructor method. PHP 5.3 and
above is supported. So, no need to use much, much, older method.

lib_remote: Set the default timeout in the constructor method to match
that of what was commited in 6e1629f , and changed the remote_dirlistfm
method from having a function within the public method to utilize the
callback arguement.

view: Added a better check for the installation file removal. $admins
will either be false or an empty array. This prevents the script
attempting to delete the file every page load if the file doesn't exist.

show_users: Added single quotes around the user_id key to prevent a
notice.

TS3Admin: getRemoteServers returns false is there's no servers. Added a
check to make sure there is remote servers - if there's not, display a
message. Added a translation.

FTP Users: getRemoteServers returns false is there's no servers. And as
such you cannot add FTP users. So display a message to the user
notifying them about this.

is_numeric being passed to array_walk in this fashion was always
returning true, however generates muliple warnings. Now, array_filter is
used and the count value of that is used. Which also removes the need
for the first check.

Status: Added a check for the GD extension for the bar.php images. If GD
isn't loaded, the images won't be displayed but the other components
are. A message will be displayed telling the user that GD is required.
Added translations.
Adjokip 9 lat temu
rodzic
commit
54fbe7b7ef

+ 11 - 9
includes/form_table_class.php

@@ -56,30 +56,32 @@
 }
 </style>
 <?php
+
 class FormTable {
 
 	
-	function FormTable()
+	public function __construct()
 	{
 		$this->i = 0;
 	}
 
-	function start_form($action, $method = "post", $extra = "")
+	public function start_form($action, $method = "post", $extra = "")
 	{
 		echo "<div align='center'>";
 		echo "<form action='".$action."' method='".$method."' $extra >";
 	}
-	function start_table()
+
+	public function start_table()
 	{
 		echo "<table class='center'>";
 	}
 
-	function add_field_hidden($name, $value)
+	public function add_field_hidden($name, $value)
 	{
 		echo "<input type='hidden' name='".$name."' value='".@$value."'/>";
 	}
 
-	function add_field($type, $name, $value, $size = 50, $extra = "")
+	public function add_field($type, $name, $value, $size = 50, $extra = "")
 	{
 		echo "<tr><td align='right'><label for='".$name."'>".get_lang($name).":</label></td>";
 		echo "<td align='left'>";
@@ -132,7 +134,7 @@ class FormTable {
 		}
 	}
 
-	function add_custom_field($name,$data,$td_extra = "")
+	public function add_custom_field($name,$data,$td_extra = "")
 	{
 		echo "<tr><td align='right' $td_extra><label for='".$name."'>".get_lang($name).":</label></td>";
 		echo "<td align='left'>".$data."</td>\n";
@@ -148,17 +150,17 @@ class FormTable {
 		}
 	}
 
-	function end_table()
+	public function end_table()
 	{
 		echo "</table>";
 	}
 
-	function add_button($type,$name,$value)
+	public function add_button($type,$name,$value)
 	{
 		echo "<p class='center'><input type='$type' name='$name' value='$value' /></p>";
 	}
 
-	function end_form()
+	public function end_form()
 	{
 		echo "</form>";
 		echo "</div>";

+ 6 - 8
includes/lib_remote.php

@@ -38,7 +38,7 @@ class OGPRemoteLibrary
 	private $enc;
 	private $timeout;
 
-	function __construct($host,$port,$encryption_key,$timeout = 2)
+	public function __construct($host,$port,$encryption_key,$timeout = 5)
 	{
 		$this->host = $host;
 		$this->port = $port;
@@ -48,7 +48,7 @@ class OGPRemoteLibrary
 		$this->timeout = $timeout;
 	}
 
-	function __destruct()
+	public function __destruct()
 	{
 	}
 
@@ -486,12 +486,10 @@ class OGPRemoteLibrary
 			return -2;
 		if ( $response == 1 )
 			return array();
-		
-		function base_64_decode_filename(&$item, $key){
-			if( $key == 'filename' ) $item = base64_decode($item);
-		}
-		
-		array_walk_recursive($response, 'base_64_decode_filename');
+
+		array_walk_recursive($response, function (&$item, $key) {
+			if ($key == 'filename')$item = base64_decode($item);
+		});
 		
 		return $response;
 	}

+ 1 - 1
includes/refreshed.php

@@ -39,7 +39,7 @@ class refreshed
 	private $url;
 	private $pos;
 	
-	public function refreshed()
+	public function __construct()
 	{
 		$this->url = array();
 		$this->pos = 0;

+ 6 - 4
includes/view.php

@@ -134,6 +134,7 @@ class OGPView {
 		// Include jQuery, jQuery UI, and our global CSS file in the header code
 		$this->header_code .= '<link rel="stylesheet" href="js/jquery/ui/jquery-ui.min.css">';
 		$this->header_code .= '<script type="text/javascript" src="js/jquery/jquery.min.js"></script><script type="text/javascript" src="js/jquery/ui/jquery-ui.min.js"></script>';
+		$this->header_code .= '<script type="text/javascript" src="js/global.js"></script>';
 		$this->header_code .= '<link rel="stylesheet" href="css/global.css">';
 		
         $buffer = ob_get_contents();
@@ -177,8 +178,9 @@ class OGPView {
         $footer = "";
 
         if ( is_object($db) && array_key_exists( "OGPDatabase", class_parents($db) ) ) {
-            $footer .= "<div class=\"footer center\">".get_lang_f('cur_theme',@$panel_settings['theme'])."<br />".get_lang('copyright')." &copy; <a href=\"http://www.opengamepanel.org\">Open Game Panel</a> " . date("Y") . " - ".get_lang('all_rights_reserved').".<br />v".@$panel_settings['ogp_version']." - ".
-                $db->getNbOfQueries()." ".get_lang('queries_executed')."</div>";
+            $footer .= "<div class=\"footer center\">";
+            $footer .= get_lang_f('cur_theme', !empty($_SESSION['users_theme']) ? $_SESSION['users_theme'] : @$panel_settings['theme']) . " - " . $db->getNbOfQueries()." ".get_lang('queries_executed');
+            $footer .= "<br />".get_lang('copyright')." &copy; <a href=\"http://www.opengamepanel.org\">Open Game Panel</a> " . date("Y") . " - ".get_lang('all_rights_reserved')." - <span class='versionInfo'>".get_lang('show_version')."</span><br /><div class='inline-block OGPVersionArea'><span class='version hide'>" . get_lang('version') . ":</span>&nbsp; <span class='hide versionNumber'>".@$panel_settings['ogp_version']."</span> <span class='copyVersionResult'></span></div></div>";
         }
         else
         {
@@ -194,8 +196,8 @@ class OGPView {
 			// Attempt to automatically delete the install file only if an admin user has already been created and exists
 			if(is_object($db)){
 				$admins = $db->getAdmins();
-				if(isset($admins) && is_array($admins) && count($admins) > 0){
-					@unlink($filename);
+				if (file_exists($filename) && is_array($admins) && !empty($admins)) {
+					unlink($filename);
 				}
 			}
 			

+ 2 - 0
lang/English/global.php

@@ -122,4 +122,6 @@ define('set_expiration_date', "Set expiration date");
 define('admin_dsi', "DSi Settings");
 define('user_dsi', "DSi");
 define('list_dsi', "DSi List");
+define('no_remote_servers', "There is no known remote servers! Add a server to use this function.");
+
 ?>

+ 1 - 0
lang/English/modules/TS3Admin.php

@@ -169,4 +169,5 @@ define('temp_folder_not_writable', "The templates folder (%s) is not writable.")
 define('unassign_from_subuser', "Unassign from subuser.");
 define('assign_to_subuser', "Assign to subuser.");
 define('select_subuser', "Select subuser.");
+define('no_ts3_servers_assigned_to_account', "You have no servers assigned to your account.");
 ?>

+ 1 - 1
lang/English/modules/settings.php

@@ -45,7 +45,7 @@ define('feed_enable_info', "If your webhost has a firewall blocking the query po
 define('feed_url', "Feed URL");
 define('feed_url_info', "GrayCube.com is sharing a LGSL feed on the URL:<br><b>http://www.greycube.co.uk/lgsl/feed/lgsl_files/lgsl_feed.php</b>");
 define('charset', "Character Encoding");
-define('charset_info', "UTF8, ISO, ASCII, etc... Left it blank to use ISO encoding.");
+define('charset_info', "UTF8, ISO, ASCII, etc... Leave it blank to use ISO encoding.");
 define('steam_user', "Steam User");
 define('steam_user_info', "This user is needed to log in to steam for download some new games like CS:GO.");
 define('steam_pass', "Steam Password");

+ 2 - 0
lang/English/modules/status.php

@@ -35,4 +35,6 @@ define('storage_total', "Disk Space");
 define('storage_used', "Used");
 define('storage_free', "Free Space");
 define('process_monitor', "Process Monitor");
+define('status_extension_required', "Extension Required");
+define('gd_info', "PHP Extension <a href=\"http://php.net/manual/en/image.installation.php\">GD</a> is required to generate these bar images!");
 ?>

+ 22 - 15
modules/TS3Admin/TS3Admin.php

@@ -36,21 +36,28 @@ function exec_ogp_module()
 		if( isset( $_GET['changevServer'] ) OR  !isset( $_SESSION['ts3_ip'] ))
 		{
 			$remote_servers = $db->getRemoteServers();
-			echo "<form action='home.php?m=TS3Admin' method='GET'>
-				 <input type='hidden' name='m' value='". $_GET['m'] . "' />
-				 <table class='center'>
-				 <tr>
-				 <td class='left'>
-				 <select onchange=".'"this.form.submit()"'." name='rserver_id'>
-				 <option></option>\n";
-			foreach ( $remote_servers as $server )
-			{
-				echo "<option value='".$server['remote_server_id']."'>".
-					$server['remote_server_name']." (".$server['agent_ip'].")</option>\n";
+
+			if ($remote_servers !== false) {
+				echo "<form action='home.php?m=TS3Admin' method='GET'>
+					 <input type='hidden' name='m' value='". $_GET['m'] . "' />
+					 <table class='center'>
+					 <tr>
+					 <td class='left'>
+					 <select onchange=".'"this.form.submit()"'." name='rserver_id'>
+					 <option></option>\n";
+				foreach ( $remote_servers as $server )
+				{
+					echo "<option value='".$server['remote_server_id']."'>".
+						$server['remote_server_name']." (".$server['agent_ip'].")</option>\n";
+				}
+				echo "</select>
+					  </form>
+					  </td></tr></table>";
+
+			} else {
+				echo get_lang('no_remote_servers');
+				
 			}
-			echo "</select>
-				  </form>
-				  </td></tr></table>";
 		}
 		
 		if( isset( $_GET['rserver_id'] ) )
@@ -112,7 +119,7 @@ function exec_ogp_module()
 			}
 			else
 			{
-				echo "There are no TS3 servers assigned to your account.";
+				echo get_lang('no_ts3_servers_assigned_to_account');
 				return;
 			}
 		}

+ 129 - 123
modules/ftp/ftp_admin.php

@@ -98,145 +98,151 @@ function exec_ogp_module()
 	echo "<h2>" . ftp_admin . "</h2>";
 	
 	$servers = $db->getRemoteServers();
-	
-	echo "<tr><td colspan='3' >
-		<form method=POST >
-		<table class='center' style='width:100%' ><tr>
-		<td>". remote_server ." <select style='width:250px' name='remote_server_id' >";
-		
-	foreach ( $servers as $server_row )
-	{
-		echo "<option value='" . $server_row['remote_server_id'] . "' >" . $server_row['remote_server_name'] . " (" . $server_row['agent_ip'] . ":" . $server_row['agent_port'] . ")</option>";
-	}
-	
-	echo "</select>
-			</td>
-			<td>". login ."<input type=text name='ftp_login' /></td>
-			<td>". password ."<input type=text name='ftp_password' /></td>
-			<td>". full_path ."<input type=text name='full_path' /></td>
-		  </tr>
-		  <tr>
-			<td colspan=4 ><input style='width:100%;' type=submit name='add_ftp_user' value='". add_ftp_account ."' /></td>
-		  </tr>
-		 </table>
-		 </form>
-		 </td></tr>";
-?>
-<table id="servermonitor" class="tablesorter">
-			<thead> 
-			<tr> 
-				<th class="header" ></th><th><?php print_lang('remote_server'); ?></th><th><?php print_lang('login'); ?></th><th><?php print_lang('server_name'); ?></th><th><?php print_lang('full_path'); ?></th> 
-			</tr> 
-			</thead> 
-			<tbody>
-<?php		
-	foreach ( $servers as $server_row )
-	{
-		$remote = new OGPRemoteLibrary($server_row['agent_ip'],$server_row['agent_port'],$server_row['encryption_key'],$server_row['timeout']);
 
-		$host_stat = $remote->status_chk();
+	if ($servers !== false) {
 		
-		$status = ( $host_stat === 0 or  $host_stat === -1 ) ? "<span class='failure'>". offline ."</span>" : "<span class='success'>". online ."</span>";
-				
-		if( $host_stat === 1)
-		{			
-			$ftp_accounts_list = $remote->ftp_mgr("list");
-			$ftp_accounts = explode("\n", $ftp_accounts_list);
-			foreach($ftp_accounts as $ftp_account)
-			{
-				if( !empty($ftp_account))
-				{
-					list($ftp_login, $ftp_path) = explode("\t", $ftp_account);
-					$ftp_login = trim($ftp_login);
-					$home_info = $db->getHomeByFtpLogin($server_row['remote_server_id'], $ftp_login);
-					$expandme = ( ( isset($_POST['ftp_login']) and $ftp_login == strip_real_escape_string($_POST['ftp_login']) ) AND ( isset($_POST['remote_server_id']) and $home_info['remote_server_id'] == $_POST['remote_server_id'] ) ) ? "expandme" : "";
-					$home_name = isset( $home_info['home_name'] ) ? $home_info['home_name'] : $ftp_path;
-					echo "<tr class='maintr $expandme'><td class='collapsible' ></td><td>".$server_row['remote_server_name']." (".$server_row['agent_ip'].")</td><td><b class='failure' >$ftp_login</td><td>" . htmlentities($home_name) . "</td><td>$ftp_path</td></tr>
-						  <tr class='expand-child' ><td colspan='4' >
-						  <form method=POST >
-						  <table>";
-						  
-					$account_details = $remote->ftp_mgr("show",$ftp_login);
+		echo "<tr><td colspan='3' >
+			<form method=POST >
+			<table class='center' style='width:100%' ><tr>
+			<td>". remote_server ." <select style='width:250px' name='remote_server_id' >";
+			
+		foreach ( $servers as $server_row )
+		{
+			echo "<option value='" . $server_row['remote_server_id'] . "' >" . $server_row['remote_server_name'] . " (" . $server_row['agent_ip'] . ":" . $server_row['agent_port'] . ")</option>";
+		}
+		
+		echo "</select>
+				</td>
+				<td>". login ."<input type=text name='ftp_login' /></td>
+				<td>". password ."<input type=text name='ftp_password' /></td>
+				<td>". full_path ."<input type=text name='full_path' /></td>
+			  </tr>
+			  <tr>
+				<td colspan=4 ><input style='width:100%;' type=submit name='add_ftp_user' value='". add_ftp_account ."' /></td>
+			  </tr>
+			 </table>
+			 </form>
+			 </td></tr>";
+	?>
+	<table id="servermonitor" class="tablesorter">
+				<thead> 
+				<tr> 
+					<th class="header" ></th><th><?php print_lang('remote_server'); ?></th><th><?php print_lang('login'); ?></th><th><?php print_lang('server_name'); ?></th><th><?php print_lang('full_path'); ?></th> 
+				</tr> 
+				</thead> 
+				<tbody>
+	<?php		
+		foreach ( $servers as $server_row )
+		{
+			$remote = new OGPRemoteLibrary($server_row['agent_ip'],$server_row['agent_port'],$server_row['encryption_key'],$server_row['timeout']);
+
+			$host_stat = $remote->status_chk();
+			
+			$status = ( $host_stat === 0 or  $host_stat === -1 ) ? "<span class='failure'>". offline ."</span>" : "<span class='success'>". online ."</span>";
 					
-					$ftp_account_detail_list = explode("\n",$account_details);
-										
-					foreach($ftp_account_detail_list as $detail_line)
+			if( $host_stat === 1)
+			{			
+				$ftp_accounts_list = $remote->ftp_mgr("list");
+				$ftp_accounts = explode("\n", $ftp_accounts_list);
+				foreach($ftp_accounts as $ftp_account)
+				{
+					if( !empty($ftp_account))
 					{
-						if( !empty($detail_line))
+						list($ftp_login, $ftp_path) = explode("\t", $ftp_account);
+						$ftp_login = trim($ftp_login);
+						$home_info = $db->getHomeByFtpLogin($server_row['remote_server_id'], $ftp_login);
+						$expandme = ( ( isset($_POST['ftp_login']) and $ftp_login == strip_real_escape_string($_POST['ftp_login']) ) AND ( isset($_POST['remote_server_id']) and $home_info['remote_server_id'] == $_POST['remote_server_id'] ) ) ? "expandme" : "";
+						$home_name = isset( $home_info['home_name'] ) ? $home_info['home_name'] : $ftp_path;
+						echo "<tr class='maintr $expandme'><td class='collapsible' ></td><td>".$server_row['remote_server_name']." (".$server_row['agent_ip'].")</td><td><b class='failure' >$ftp_login</td><td>" . htmlentities($home_name) . "</td><td>$ftp_path</td></tr>
+							  <tr class='expand-child' ><td colspan='4' >
+							  <form method=POST >
+							  <table>";
+							  
+						$account_details = $remote->ftp_mgr("show",$ftp_login);
+						
+						$ftp_account_detail_list = explode("\n",$account_details);
+											
+						foreach($ftp_account_detail_list as $detail_line)
 						{
-							list($key,$value) = explode(" : ",$detail_line);
-							$key = trim($key);
-							$value = trim($value);
-							$blacklist = array("Login", "Password", "UID", "GID", "ftp_user_id", "username", 
-											   "username_prefix", "password", "sys_userid", "sys_groupid", 
-											   "sys_perm_user", "sys_perm_group", "sys_perm_other", 
-											   "server_id", "parent_domain_id", "uid", "gid" );
-							if( in_array($key, $blacklist) )
-								continue;
-							if($value[strlen($value)-1] == ')')
+							if( !empty($detail_line))
 							{
-								$value_parts = explode(" ", $value);
-								if(is_numeric($value_parts[0]))
+								list($key,$value) = explode(" : ",$detail_line);
+								$key = trim($key);
+								$value = trim($value);
+								$blacklist = array("Login", "Password", "UID", "GID", "ftp_user_id", "username", 
+												   "username_prefix", "password", "sys_userid", "sys_groupid", 
+												   "sys_perm_user", "sys_perm_group", "sys_perm_other", 
+												   "server_id", "parent_domain_id", "uid", "gid" );
+								if( in_array($key, $blacklist) )
+									continue;
+								if(substr($value, -1) == ')')
 								{
-									if(count($value_parts) > 1)
+									$value_parts = explode(" ", $value);
+									if(is_numeric($value_parts[0]))
 									{
-										$value = array_shift($value_parts);
-										$advert = implode(" ", $value_parts);
+										if(count($value_parts) > 1)
+										{
+											$value = array_shift($value_parts);
+											$advert = implode(" ", $value_parts);
+										}
 									}
-								}
-								else
-								{
-									$first_pos = array_shift($value_parts);
-									$parts = preg_split('/:|-/', $first_pos);
-									if(count($parts) == 2 and array_walk($parts, 'is_numeric'))
+									else
 									{
-										$value = $first_pos;
-										$advert = implode(" ", $value_parts);
+										$first_pos = array_shift($value_parts);
+										$parts = preg_split('/:|-/', $first_pos);
+										if(count(array_filter($parts, 'is_numeric') === 2))
+										{
+											$value = $first_pos;
+											$advert = implode(" ", $value_parts);
+										}
 									}
 								}
+								if ($key == "Allowed local  IPs" or $key == "ul_ratio" or $key == "ForceSsl" or ( count($ftp_account_detail_list) == 4 and $key == "Directory" ) )
+									echo "</table>\n</td><td>\n<table>\n";
+								if ($key == "Directory" )
+									$value = str_replace( "/./", "", $value );
+								if($key == "Username")
+									$readOnly = true;
+								echo "<tr><td>$key</td><td>
+										  <input type=text name='$key' value='$value' ";
+								
+								if(isset($readOnly) && ($readOnly)){
+									echo "readonly ";
+								}
+								if(isset($advert))
+									echo "/>".
+										 "</td><td>$advert</td></tr>\n";
+								else
+									echo "/>".
+										 "</td></tr>\n";
+								unset($readOnly, $key, $value, $advert);
 							}
-							if ($key == "Allowed local  IPs" or $key == "ul_ratio" or $key == "ForceSsl" or ( count($ftp_account_detail_list) == 4 and $key == "Directory" ) )
-								echo "</table>\n</td><td>\n<table>\n";
-							if ($key == "Directory" )
-								$value = str_replace( "/./", "", $value );
-							if($key == "Username")
-								$readOnly = true;
-							echo "<tr><td>$key</td><td>
-									  <input type=text name='$key' value='$value' ";
-							
-							if(isset($readOnly) && ($readOnly)){
-								echo "readonly ";
-							}
-							if(isset($advert))
-								echo "/>".
-									 "</td><td>$advert</td></tr>\n";
-							else
-								echo "/>".
-									 "</td></tr>\n";
-							unset($readOnly, $key, $value, $advert);
 						}
+						echo "<tr>
+								<td colspan='2' >
+								 <center>
+								  <input type=hidden name='remote_server_id' value='".$server_row['remote_server_id']."'/>
+								  <input type=hidden name='ftp_login' value=\"" . str_replace('"', '&quot;', $ftp_login) . "\"/>
+								  <input type=submit name='edit_ftp_user' value='". change_account_details ."' />
+								 </center>
+								</td>
+								<td>
+								   <input type='image' name='del_ftp_user' onsubmit='submit-form();' src='modules/administration/images/remove.gif'>". remove_account ."</input>
+								</td>
+							  </tr>
+							 </table>
+							 </form>
+							 </td>
+							</tr>";
 					}
-					echo "<tr>
-							<td colspan='2' >
-							 <center>
-							  <input type=hidden name='remote_server_id' value='".$server_row['remote_server_id']."'/>
-							  <input type=hidden name='ftp_login' value=\"" . str_replace('"', '&quot;', $ftp_login) . "\"/>
-							  <input type=submit name='edit_ftp_user' value='". change_account_details ."' />
-							 </center>
-							</td>
-							<td>
-							   <input type='image' name='del_ftp_user' onsubmit='submit-form();' src='modules/administration/images/remove.gif'>". remove_account ."</input>
-							</td>
-						  </tr>
-						 </table>
-						 </form>
-						 </td>
-						</tr>";
+					
 				}
-				
-			}
-		}			
-		
+			}	// end: host_stat === 1
+			
+		}	// end: foreach $servers as $server_row
+
+	} else {
+		echo get_lang('no_remote_servers');
 	}
 	echo "</tbody>";	
 	echo "</table>\n";

+ 52 - 39
modules/status/status.php

@@ -70,47 +70,60 @@ function exec_ogp_module()
 			   </div>
 			  </div>";
 	}
-	if ($modulecpu == "1" and $nocpushow != "1") 
-	{
-		echo "<div id=\"column4\" style=\"width:49.5%;float:right;margin-top:1%;\" >
-			   <div class=\"dragbox bloc rounded\">
-			   <h4>".get_lang('cpu_usage')."</h4>
-			   <div class=\"dragbox-content\">";
-		ksort($cores);
-		foreach($cores as $cpu => $percent)
-		{		 
-			echo "<b>CPU" . $cpu . " ".get_lang('cpu_load').": " . $percent . " %</b><br>
-				  <img src=\"modules/status/include/bar.php?rating=" . $percent . "\" style=\"width:100%;border:1px solid tranparent;\" />";
+
+	if (extension_loaded('gd')) {
+
+		if ($modulecpu == "1" and $nocpushow != "1") 
+		{
+			echo "<div id=\"column4\" style=\"width:49.5%;float:right;margin-top:1%;\" >
+				   <div class=\"dragbox bloc rounded\">
+				   <h4>".get_lang('cpu_usage')."</h4>
+				   <div class=\"dragbox-content\">";
+			ksort($cores);
+			foreach($cores as $cpu => $percent)
+			{		 
+				echo "<b>CPU" . $cpu . " ".get_lang('cpu_load').": " . $percent . " %</b><br>
+					  <img src=\"modules/status/include/bar.php?rating=" . $percent . "\" style=\"width:100%;border:1px solid tranparent;\" />";
+			}
+		
+			echo '</div>
+				  </div>
+				 </div>';
 		}
-	
-		echo '</div>
-			  </div>
-			 </div>';
-	}
-	if ($modulememory == "1") {
-		echo "<div id=\"column4\" style=\"width:49.5%;float:left;margin-top:1%;\" >
-		    <div class=\"dragbox bloc rounded\" >
-		    <h4>".get_lang('ram_usage')."</h4>
-		     <div class=\"dragbox-content\">
-		     <b>".get_lang('ram_used').": " . $ramusage . "<br></b>
-		     <img src=\"modules/status/include/bar.php?rating=" . $rampercent . "\" style=\"width:100%;border:1px solid tranparent;\">
-		     </div>
-		    </div></div>";
-	}
-	if ($modulestorage == "1") 
-	{
-		echo "<div id=\"column4\" style=\"width:100%;float:left;margin-top:1%;\" >
-			   <div class=\"dragbox bloc rounded\" >
-			   <h4>".get_lang('storage_space')."</h4>
-			    <div class=\"dragbox-content\">
-			    <b>".get_lang('storage_total').": " . $diskspace . "<br>
-			    ".get_lang('storage_used').": " . $diskinuse . "<br>
-			    <img src= \"modules/status/include/bar.php?rating=" . $hddbarusage . "\" style=\"width:100%;border:1px solid tranparent;\"><br>
-			    ".get_lang('storage_free').": " . $hddfreespace . "</b>
-			    </div>
-			   </div>
-			  </div>";
+		if ($modulememory == "1") {
+			echo "<div id=\"column4\" style=\"width:49.5%;float:left;margin-top:1%;\" >
+			    <div class=\"dragbox bloc rounded\" >
+			    <h4>".get_lang('ram_usage')."</h4>
+			     <div class=\"dragbox-content\">
+			     <b>".get_lang('ram_used').": " . $ramusage . "<br></b>
+			     <img src=\"modules/status/include/bar.php?rating=" . $rampercent . "\" style=\"width:100%;border:1px solid tranparent;\">
+			     </div>
+			    </div></div>";
+		}
+		if ($modulestorage == "1") 
+		{
+			echo "<div id=\"column4\" style=\"width:100%;float:left;margin-top:1%;\" >
+				   <div class=\"dragbox bloc rounded\" >
+				   <h4>".get_lang('storage_space')."</h4>
+				    <div class=\"dragbox-content\">
+				    <b>".get_lang('storage_total').": " . $diskspace . "<br>
+				    ".get_lang('storage_used').": " . $diskinuse . "<br>
+				    <img src= \"modules/status/include/bar.php?rating=" . $hddbarusage . "\" style=\"width:100%;border:1px solid tranparent;\"><br>
+				    ".get_lang('storage_free').": " . $hddfreespace . "</b>
+				    </div>
+				   </div>
+				  </div>";
+		}
+
+	} else {
+		echo "<div id=\"column4\" style=\"width:100%;float:left;margin-top:1%;\"
+			<div class=\"dragbox bloc rounded\">
+				<h4>".get_lang('status_extension_required')."</h4>
+				<div class=\"dragbox-content\"><center><b>".get_lang('gd_info')."</b></center></div>
+			</div>
+		</div>";
 	}
+
 	if($modulesystemtasks == "1"){
 		echo "<div id=\"column4\" style=\"width:100%;float:left;margin-top:1%;\" >
 				<div class=\"dragbox bloc rounded\" >

+ 1 - 1
modules/user_admin/show_users.php

@@ -71,7 +71,7 @@ function exec_ogp_module() {
 		}else{
 			print "subusersShowHide";
 		}
-        print "' uid='" . $row[user_id] . "'";
+        print "' uid='" . $row['user_id'] . "'";
         if(!empty($ownedBy)){
 			print "ownedby='" . $ownedBy . "'";
 		}