version 1.50, 2007/09/16 12:57:07 |
version 1.51, 2010/09/20 01:00:49 |
|
|
* http://platon.sk/projects/phpMyEdit/ |
* http://platon.sk/projects/phpMyEdit/ |
*/ |
*/ |
|
|
/* $Platon: phpMyEdit/phpMyEditSetup.php,v 1.49 2007-06-25 00:21:43 nepto Exp $ */ |
/* $Platon: phpMyEdit/phpMyEditSetup.php,v 1.50 2007-09-16 12:57:07 nepto Exp $ */ |
|
|
?> |
?> |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
Line 62 if (! defined('PHP_EOL')) { |
|
Line 62 if (! defined('PHP_EOL')) { |
|
$hn = @$_POST['hn']; |
$hn = @$_POST['hn']; |
$un = @$_POST['un']; |
$un = @$_POST['un']; |
$pw = @$_POST['pw']; |
$pw = @$_POST['pw']; |
if(strlen($_POST['db'])>0) $db = @$_POST['db']; |
$db = @$_POST['db']; |
if(strlen($_POST['tb'])>0) $tb = @$_POST['tb']; |
$tb = @$_POST['tb']; |
$id = @$_POST['id']; |
$id = @$_POST['id']; |
$submit = @$_POST['submit']; |
$submit = @$_POST['submit']; |
$options = @$_POST['options']; |
$options = @$_POST['options']; |
Line 74 $HTMLissues = @$_POST['HTMLissues']; |
|
Line 74 $HTMLissues = @$_POST['HTMLissues']; |
|
$CSSstylesheet = @$_POST['CSSstylesheet']; |
$CSSstylesheet = @$_POST['CSSstylesheet']; |
|
|
$phpExtension = '.php'; |
$phpExtension = '.php'; |
if (isset($baseFilename) && $baseFilename != '') { |
if (! empty($baseFilename)) { |
$phpFile = $baseFilename.$phpExtension; |
$phpFile = $baseFilename.$phpExtension; |
//$contentFile = $baseFilename.'Content.inc'; |
//$contentFile = $baseFilename.'Content.inc'; |
$contentFile = $baseFilename.'.php'; |
$contentFile = $baseFilename.'.php'; |
} elseif (isset($tb)) { |
} elseif (! empty($tb)) { |
$phpFile = $tb.$phpExtension; |
$phpFile = $tb.$phpExtension; |
//$contentFile = $tb.'Content.inc'; |
//$contentFile = $tb.'Content.inc'; |
$contentFile = $tb.'.php'; |
$contentFile = $tb.'.php'; |
Line 169 if ((!$dbl) or empty($submit)) { |
|
Line 169 if ((!$dbl) or empty($submit)) { |
|
if (!empty($submit)) { |
if (!empty($submit)) { |
echo '<h2>Sorry - login failed - please try again</h2>'.PHP_EOL; |
echo '<h2>Sorry - login failed - please try again</h2>'.PHP_EOL; |
} |
} |
if (! isset($hn)) { |
if (empty($hn)) { |
$hn = 'localhost'; |
$hn = 'localhost'; |
} |
} |
echo ' |
echo ' |
Line 194 if ((!$dbl) or empty($submit)) { |
|
Line 194 if ((!$dbl) or empty($submit)) { |
|
</table><br> |
</table><br> |
<input type="submit" name="submit" value="Submit"> |
<input type="submit" name="submit" value="Submit"> |
</form>'.PHP_EOL; |
</form>'.PHP_EOL; |
} else if (! isset($db)) { |
} else if (empty($db)) { |
$dbs = @mysql_list_dbs($dbl); |
$dbs = @mysql_list_dbs($dbl); |
$num_dbs = @mysql_num_rows($dbs); |
$num_dbs = @mysql_num_rows($dbs); |
echo '<h1>Please select a database</h1> |
echo '<h1>Please select a database</h1> |
Line 213 if ((!$dbl) or empty($submit)) { |
|
Line 213 if ((!$dbl) or empty($submit)) { |
|
<input type="submit" name="submit" value="Submit"> |
<input type="submit" name="submit" value="Submit"> |
<input type="submit" name="cancel" value="Cancel"> |
<input type="submit" name="cancel" value="Cancel"> |
</form>'.PHP_EOL; |
</form>'.PHP_EOL; |
} else if (!isset($tb)) { |
} else if (empty($tb)) { |
echo '<h1>Please select a table from database: '.htmlspecialchars($db).'</h1> |
echo '<h1>Please select a table from database: '.htmlspecialchars($db).'</h1> |
<form action="'.htmlspecialchars($self).'" method="POST"> |
<form action="'.htmlspecialchars($self).'" method="POST"> |
<input type="hidden" name="hn" value="'.htmlspecialchars($hn).'"> |
<input type="hidden" name="hn" value="'.htmlspecialchars($hn).'"> |
Line 233 if ((!$dbl) or empty($submit)) { |
|
Line 233 if ((!$dbl) or empty($submit)) { |
|
<input type="submit" name="submit" value="Submit"> |
<input type="submit" name="submit" value="Submit"> |
<input type="submit" name="cancel" value="Cancel"> |
<input type="submit" name="cancel" value="Cancel"> |
</form>'.PHP_EOL; |
</form>'.PHP_EOL; |
} else if (!isset($id)) { |
} else if (empty($id)) { |
echo ' <h1>Please select an identifier from table: '.htmlspecialchars($tb).'</h1> |
echo ' <h1>Please select an identifier from table: '.htmlspecialchars($tb).'</h1> |
<p> |
<p> |
This field will be used in change, view, copy and delete operations.<br> |
This field will be used in change, view, copy and delete operations.<br> |
Line 271 if ((!$dbl) or empty($submit)) { |
|
Line 271 if ((!$dbl) or empty($submit)) { |
|
<input type="submit" name="cancel" value="Cancel"> |
<input type="submit" name="cancel" value="Cancel"> |
</form>'.PHP_EOL; |
</form>'.PHP_EOL; |
|
|
} else if (!isset($options)) { |
} else if (empty($options)) { |
echo '<h1>Please select additional options</h1> |
echo '<h1>Please select additional options</h1> |
<form action="'.htmlspecialchars($self).'" method="POST"> |
<form action="'.htmlspecialchars($self).'" method="POST"> |
<input type="hidden" name="hn" value="'.htmlspecialchars($hn).'"> |
<input type="hidden" name="hn" value="'.htmlspecialchars($hn).'"> |