fixed warnings

This commit is contained in:
Steve Alberty
2001-06-10 12:54:32 +00:00
parent d1b7dd79a3
commit 36bdf5345e
3 changed files with 36 additions and 9 deletions

View File

@@ -123,7 +123,7 @@ if($server == 0) {
// case that there are multiple servers and '$cfgServerDefault = 0' // case that there are multiple servers and '$cfgServerDefault = 0'
// is set. // is set.
$cfgServer = array(); $cfgServer = array();
} else { } else if (isset($cfgServers[$server])){
// Otherwise, set up $cfgServer and do the usual login stuff. // Otherwise, set up $cfgServer and do the usual login stuff.
$cfgServer = $cfgServers[$server]; $cfgServer = $cfgServers[$server];
@@ -284,6 +284,9 @@ if($server == 0) {
define("MYSQL_MINOR_VERSION", substr($row["version"], 5)); //skip the . define("MYSQL_MINOR_VERSION", substr($row["version"], 5)); //skip the .
//END - Additional Version Info - 2 May 2001 - Robbat2 //END - Additional Version Info - 2 May 2001 - Robbat2
} }
else{
echo $strHostEmpty;
}
// ----------------------------------------------------------------- // -----------------------------------------------------------------
@@ -481,7 +484,7 @@ function get_table_def($db, $table, $crlf)
// Steve Alberty's patch for complete table dump, // Steve Alberty's patch for complete table dump,
// modified by Lem9 to allow older MySQL versions to continue to work // modified by Lem9 to allow older MySQL versions to continue to work
if(MYSQL_MAJOR_VERSION == "3.23"){ if(MYSQL_MAJOR_VERSION == "3.23" && intval(MYSQL_MINOR_VERSION) > 20){
$result=mysql_query("show create table $db.$table"); $result=mysql_query("show create table $db.$table");
if ($result!=false && mysql_num_rows($result)>0){ if ($result!=false && mysql_num_rows($result)>0){
$tmpres=mysql_fetch_array($result); $tmpres=mysql_fetch_array($result);
@@ -764,6 +767,8 @@ function get_bookmarks_param() {
global $cfgServer; global $cfgServer;
global $server; global $server;
$cfgBookmark=false;
$i=1; $i=1;
while($i<=sizeof($cfgServers)) { while($i<=sizeof($cfgServers)) {
if($cfgServer['adv_auth']) { if($cfgServer['adv_auth']) {
@@ -823,6 +828,26 @@ function delete_bookmarks($db, $cfgBookmark, $id) {
$cfgBookmark=get_bookmarks_param(); $cfgBookmark=get_bookmarks_param();
function format_byte_down($value){
$returnvalue=$value;
$unit="Byte";
if ($value>1000000000000){
$value=$value/1073741824;
$unit="GB";
}
else if ($value >= 1000000000){
$value=$value/1048576;
$unit="MB";
}
else if ($value >= 1000000){
$value=round($value/1024);
$unit="KB";
}
$returnvalue=number_format($value,0,',','.');
return array($returnvalue,$unit);
}
} // $__LIB_INC__ } // $__LIB_INC__
// ----------------------------------------------------------------- // -----------------------------------------------------------------
?> ?>

View File

@@ -49,7 +49,7 @@ for($i=0;$i<mysql_num_rows($table_def);$i++)
{ {
$row_table_def = mysql_fetch_array($table_def); $row_table_def = mysql_fetch_array($table_def);
$field = $row_table_def["Field"]; $field = $row_table_def["Field"];
if(($row_table_def['Type'] == "datetime") AND ($row[$field] == "")) if($row_table_def['Type'] == "datetime" && empty($row[$field]))
$row[$field] = date("Y-m-d H:i:s", time()); $row[$field] = date("Y-m-d H:i:s", time());
$len = @mysql_field_len($result,$i); $len = @mysql_field_len($result,$i);
@@ -159,12 +159,14 @@ for($i=0;$i<mysql_num_rows($table_def);$i++)
$size = min(4, count($set)); $size = min(4, count($set));
echo "<td><input type=\"hidden\" name=\"fields[$field]\" value=\"\$set\$\">"; echo "<td><input type=\"hidden\" name=\"fields[$field]\" value=\"\$set\$\">";
echo "<select name=field_${field}[] size=$size multiple>\n"; echo "<select name=field_${field}[] size=$size multiple>\n";
for($j=0; $j<count($set);$j++) $countset=count($set);
for($j=0; $j<$countset;$j++)
{ {
echo '<option value="'.htmlspecialchars(substr($set[$j], 1, -1)).'"'; $subset=substr($set[$j], 1, -1);
if($vset[substr($set[$j], 1, -1)]) echo '<option value="'.htmlspecialchars($subset).'"';
if(isset($vset[$subset]) && $vset[$subset])
echo " selected"; echo " selected";
echo ">".htmlspecialchars(substr($set[$j], 1, -1))."\n"; echo ">".htmlspecialchars($subset)."\n";
} }
echo "</select></td>"; echo "</select></td>";
} }

View File

@@ -33,8 +33,8 @@ if(!isset($param) || $param[0] == "") {
</select><br> </select><br>
<div align="left"> <div align="left">
<ul><li><?php echo $strDisplay; ?> <input type="text" size=4 name="sessionMaxRows" value=<?php echo $cfgMaxRows; ?>> <ul><li><?php if (isset($strDisplay)) echo $strDisplay; ?> <input type="text" size=4 name="sessionMaxRows" value=<?php echo $cfgMaxRows; ?>>
<?php echo $strLimitNumRows; ?> <?php if (isset($strLimitNumRows)) echo $strLimitNumRows; ?>
<li><?php echo $strAddSearchConditions; ?><br> <li><?php echo $strAddSearchConditions; ?><br>
<input type="text" name="where"> <?php print show_docu("manual_Reference.html#Functions");?><br> <input type="text" name="where"> <?php print show_docu("manual_Reference.html#Functions");?><br>