|
From: Yves G. <yg...@us...> - 2004-06-27 21:34:49
|
Update of /cvsroot/phpsqliteadmin/phpsqliteadmin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12141 Modified Files: index.php check_login.php login.class.php table_structure.php include.php dbconfig.php dbaction.php query.php config.php table_browse.php leftframe.php changelog.txt mainframe.php editdb.php Log Message: Converted from html 4.01 to xhtml 1.0 transitional (not that much changes have been necessary... :-) ) The alias configuration now always comes back to the mainframe, and not "_top" Misc. html fixes Index: index.php =================================================================== RCS file: /cvsroot/phpsqliteadmin/phpsqliteadmin/index.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- index.php 21 May 2004 17:05:03 -0000 1.2 +++ index.php 27 Jun 2004 21:34:36 -0000 1.3 @@ -4,23 +4,25 @@ require_once('include.php'); ?> -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"> -<html> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> <head> - <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> - <meta http-equiv="expires" content="0"> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" /> + <link href="phpsla.css" rel="stylesheet" type="text/css" /> <title>phpSQLiteAdmin</title> + <meta http-equiv="expires" content="0" /> + <meta http-equiv="pragma" content="no-cache" /> + <meta http-equiv="cache-control" content="no-cache" /> <script language="Javascript" src="javascript.txt" type="text/javascript"></script> - <link href="phpsla.css" rel="stylesheet" type="text/css"> </head> <frameset cols="150,*"> <!-- -<frame src="leftframe.php?<?=SID?>" name=tablelist scrolling=auto> -<frame src="mainframe.php?<?=SID?>" name=mainframe scrolling=auto> +<frame src="leftframe.php?<?=SID?>" name="tablelist" scrolling="auto" /> +<frame src="mainframe.php?<?=SID?>" name="mainframe" scrolling="auto" /> --> -<frame src="leftframe.php" name=tablelist scrolling=auto> -<frame src="mainframe.php" name=mainframe scrolling=auto> +<frame src="leftframe.php" name="tablelist" scrolling="auto" /> +<frame src="mainframe.php" name="mainframe" scrolling="auto" /> </frameset> </html> Index: changelog.txt =================================================================== RCS file: /cvsroot/phpsqliteadmin/phpsqliteadmin/changelog.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- changelog.txt 21 May 2004 19:25:42 -0000 1.3 +++ changelog.txt 27 Jun 2004 21:34:36 -0000 1.4 @@ -1,10 +1,12 @@ -phpSQLiteAdmin changelog +phpSQLiteAdmin changelog ( see http://phpsqliteadmin.sourceforge.net/ for more details) -(21.05.2004) +0.3 (xx.xx.2004) - added login - fixed session problem concerning database names - added field names on browse +- converted from html 4.01 to xhtml 1.0 transitional +- fixed the alias configurator to return always to the mainframe window and not the "_top" window 0.2 (05.03.2004) Index: editdb.php =================================================================== RCS file: /cvsroot/phpsqliteadmin/phpsqliteadmin/editdb.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- editdb.php 11 May 2004 18:23:20 -0000 1.1.1.1 +++ editdb.php 27 Jun 2004 21:34:36 -0000 1.2 @@ -19,7 +19,7 @@ $sysdbh->query("insert into databases (user,alias,path,description) values ({$alias->user},'{$alias->alias}','{$alias->path}','{$alias->description}')"); // do we really want this? $_SESSION['phpSQLiteAdmin_currentdb'] = $alias->path; - header("Location: index.php"); + header("Location: dbconfig.php"); exit; } @@ -39,7 +39,7 @@ if (isset($_POST['update'])) { $sysdbh->query("update databases set alias = '{$alias->alias}', path = '{$alias->path}', description = '{$alias->description}' where user = {$alias->user} and alias = '{$_POST[oldalias]}'"); - header("Location: index.php"); + header("Location: dbconfig.php"); exit; } @@ -48,43 +48,46 @@ $sysdbh->query("delete from databases where user = {$alias->user} and alias = '{$alias->alias}'"); //unlink($alias->path); nooooooo don't do that... $_SESSION['phpSQLiteAdmin_currentdb'] = ''; - header("Location: index.php"); + header("Location: dbconfig.php"); exit; } $type = text; echo<<<EOT -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<html> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> <head> - <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" /> + <link href="phpsla.css" rel="stylesheet" type="text/css" /> <title>phpSQLiteAdmin</title> - <meta http-equiv="expires" content="0"> - <script language="javascript" src="javascript.txt" type="text/javascript"></script> - <link href="phpsla.css" rel="stylesheet" type="text/css"> + <meta http-equiv="expires" content="0" /> + <meta http-equiv="pragma" content="no-cache" /> + <meta http-equiv="cache-control" content="no-cache" /> + <script language="Javascript" src="javascript.txt" type="text/javascript"></script> + <base target="mainframe" /> </head> <body class="right" onload="document.adddb.alias.focus();"> <h3>$title</h3> -<form name="adddb" action="editdb.php" method="post" target="_top"> -<input type="hidden" name="oldalias" value="{$_GET[alias]}"> +<form name="adddb" action="editdb.php" method="post"> +<input type="hidden" name="oldalias" value="{$_GET[alias]}" /> <table> -<tr><td class=label>Alias:</td><td><input type=text size=80 name=alias value="{$alias->alias}"></td></tr> -<tr><td class=label>Path on server:</td><td><input type=$type size=80 name=path value="{$alias->path}"></td></tr> -<tr><td class=label>Description:</td><td><input type=text size=80 name=description value="{$alias->description}"></td></tr> -<tr><td class=label></td><td class=label><input type=submit name=$action value="Save"> <input type=button value="Cancel" onClick="history.back();"></td></tr> -</form> +<tr><td class="label">Alias:</td><td><input type="text" size="80" name="alias" value="{$alias->alias}" /></td></tr> +<tr><td class="label">Path on server:</td><td><input type="$type" size="80" name="path" value="{$alias->path}" /></td></tr> +<tr><td class="label">Description:</td><td><input type="text" size="80" name="description" value="{$alias->description}" /></td></tr> +<tr><td class="label"></td><td class="label"><input type="submit" name="$action" value="Save" /> <input type="button" value="Cancel" onclick="history.back();" /></td></tr> </table> +</form> EOT; if (isset($_GET['alias'])) { echo<<<EOT -<br><br><br><br><br> -<form name=delete action=editdb.php method=post onsubmit="" target="_top"> -<input type=hidden name=user value="{$current_user}"> -<input type=hidden name=alias value="{$_GET[alias]}"> -<input type=submit name=delete value="Remove this alias"> +<br /><br /><br /><br /><br /> +<form name="delete" action="editdb.php" method="post" onsubmit=""> +<input type="hidden" name="use"r value="{$current_user}" /> +<input type="hidden" name="alias" value="{$_GET[alias]}" /> +<input type="submit" name="delete" value="Remove this alias" /> </form> EOT; } @@ -93,5 +96,4 @@ print "</body>\n"; print "</html>\n"; - ?> \ No newline at end of file Index: include.php =================================================================== RCS file: /cvsroot/phpsqliteadmin/phpsqliteadmin/include.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- include.php 11 May 2004 18:23:21 -0000 1.1.1.1 +++ include.php 27 Jun 2004 21:34:36 -0000 1.2 @@ -26,7 +26,7 @@ // connect to the system database -if (!is_writable('phpsla.sqlite')) die("<br>System database 'phpsla.sqlite' is not writeable by webserver account."); +if (!is_writable('phpsla.sqlite')) die("<br />System database 'phpsla.sqlite' is not writeable by webserver account."); $sysdbh =& new SPSQLite('phpsla.sqlite'); $current_db = $_SESSION['phpSQLiteAdmin_currentdb']; $current_user = 1; @@ -58,14 +58,14 @@ echo<<<EOT <div id="currentdb">Database: {$_SESSION['phpSQLiteAdmin_currentdb']}</div> <p class="sqliteversion">SQLite version: $sqliteversion</p> -<br> +<br /> <a href="mainframe.php" target="mainframe">Back</a> | <a href="table_structure.php?object=$current_table" target="mainframe">Structure</a> | <a href="table_browse.php?object=$current_table" target="mainframe">Browse</a> | <a href="query.php?object=$current_table" target="mainframe">Query</a> | <!--<a href="export.php?object=$current_table" target="mainframe">Export</a> |--> -<a href="dbaction.php?action=empty_table&object=$current_table" target="_top" onclick="return confirm_empty_table();">Empty</a> | -<a href="dbaction.php?action=drop_table&object=$current_table" target="_top" onclick="return confirm_drop_table();">Drop</a> +<a href="dbaction.php?action=empty_table&object=$current_table" target="_top" onclick="return confirm_empty_table();">Empty</a> | +<a href="dbaction.php?action=drop_table&object=$current_table" target="_top" onclick="return confirm_drop_table();">Drop</a> EOT; } @@ -75,8 +75,8 @@ <a href="table_structure.php?object=$current_table" target="mainframe">Structure</a> | <a href="table_browse.php?object=$current_table" target="mainframe">Browse</a> | <a href="query.php?object=$current_table" target="mainframe">Query</a> | -<a href="dbaction.php?action=empty_table&object=$current_table" target="_top" onclick="return confirm_empty_table();">Empty</a> | -<a href="dbaction.php?action=drop_table&object=$current_table" target="_top" onclick="return confirm_drop_table();">Drop</a> +<a href="dbaction.php?action=empty_table&object=$current_table" target="_top" onclick="return confirm_empty_table();">Empty</a> | +<a href="dbaction.php?action=drop_table&object=$current_table" target="_top" onclick="return confirm_drop_table();">Drop</a> EOT; } @@ -84,24 +84,24 @@ function print_index_action_links($current_index) { echo<<<EOT -<a href="dbaction.php?action=drop_index&object=$current_index" target="_top" onclick="return confirm_drop_index();">Drop</a> +<a href="dbaction.php?action=drop_index&object=$current_index" target="_top" onclick="return confirm_drop_index();">Drop</a> EOT; } function print_db_selector($current_db) { global $db_dir,$database,$sysdbh; - print "<form name=choosedb action=\"set_session.php\" method=post target=\"_top\">\n"; - print "<input type=hidden name=sessionname value=phpSQLiteAdmin_currentdb>\n"; - print "<select name=sessionvalue onchange=\"this.form.submit();\">\n"; + print "<form name=\"choosedb\" action=\"set_session.php\" method=\"post\" target=\"_top\">\n"; + print "<input type=\"hidden\" name=\"sessionname\" value=\"phpSQLiteAdmin_currentdb\" />\n"; + print "<select name=\"sessionvalue\" onchange=\"this.form.submit();\">\n"; $sysdbh->query("select alias,path from databases order by alias"); while($row = $sysdbh->fetchArray()) { - //print $row[0].'-'.$current_db."<br>\n"; + //print $row[0].'-'.$current_db."<br />\n"; if ($row[1] != $current_db) { print '<option value="'.$row[1].'">'.$row[0]."</option>\n"; } else { - print '<option value="'.$row[1].'" selected>'.$row[0]."</option>\n"; + print '<option value="'.$row[1].'" selected="selected">'.$row[0]."</option>\n"; } // dunno what this is for... remove it later $available_dbs[] = $row[0]; @@ -180,7 +180,7 @@ var $alias; var $path; var $description; - + function get($user,$alias) { // select here and return object return 0; @@ -205,4 +205,4 @@ $hm_dbpath[] = $hm_dbdir; $hm_dbpath = implode('/',$hm_dbpath); // hoster mode stuff ends here -?> +?> \ No newline at end of file Index: query.php =================================================================== RCS file: /cvsroot/phpsqliteadmin/phpsqliteadmin/query.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- query.php 11 May 2004 18:23:22 -0000 1.1.1.1 +++ query.php 27 Jun 2004 21:34:36 -0000 1.2 @@ -3,14 +3,16 @@ require_once('include.php'); ?> -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<html> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> <head> - <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" /> + <link href="phpsla.css" rel="stylesheet" type="text/css" /> <title>phpSQLiteAdmin</title> - <meta http-equiv="expires" content="0"> + <meta http-equiv="expires" content="0" /> + <meta http-equiv="pragma" content="no-cache" /> + <meta http-equiv="cache-control" content="no-cache" /> <script language="Javascript" src="javascript.txt" type="text/javascript"></script> - <link href="phpsla.css" rel="stylesheet" type="text/css"> </head> <body class="right"> <?php @@ -29,19 +31,19 @@ ?> -<form name=query method=post action="<?=$_SERVER['PHP_SELF']?>"> -<input type=hidden name=object value="<?=$current_table?>"> -<textarea name=sql rows=8 cols=80> +<form name="query" method="post" action="<?=$_SERVER['PHP_SELF']?>"> +<input type="hidden" name="object" value="<?=$current_table?>" /> +<textarea name="sql" rows="8" cols="80"> <?=$show?> -</textarea><br> -<input type=submit name=submit value="Execute SQL"> +</textarea><br /> +<input type="submit" name="submit" value="Execute SQL" /> </form> <?php if ($_POST['sql'] != '') { - print "<br><table>\n"; + print "<br /><table>\n"; //sqlite_escape_string($_POST['sql']); $userdbh->query(trim($_POST['sql'])); while($row = $userdbh->fetchArray()) { Index: leftframe.php =================================================================== RCS file: /cvsroot/phpsqliteadmin/phpsqliteadmin/leftframe.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- leftframe.php 21 May 2004 17:26:26 -0000 1.2 +++ leftframe.php 27 Jun 2004 21:34:36 -0000 1.3 @@ -3,24 +3,26 @@ require_once('include.php'); echo<<<EOT -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<html> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> <head> - <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" /> + <link href="phpsla.css" rel="stylesheet" type="text/css" /> <title>phpSQLiteAdmin</title> - <meta http-equiv="expires" content="0"> + <meta http-equiv="expires" content="0" /> + <meta http-equiv="pragma" content="no-cache" /> + <meta http-equiv="cache-control" content="no-cache" /> <script language="Javascript" src="javascript.txt" type="text/javascript"></script> - <link href="phpsla.css" rel="stylesheet" type="text/css"> - <base target="mainframe"> + <base target="mainframe" /> </head> -<body class=left> +<body class="left"> <a href="index.php" target="_top">Main</a> -<br> +<br /> <a href="dbconfig.php">Alias configuration</a> -<br> +<br /> <a href="login.php?logoff=1" target="_top">Logoff</a> -<br> -<br> +<br /> +<br /> EOT; print "<div class=\"list\">\n"; @@ -46,4 +48,4 @@ print "</html>\n"; -?> +?> \ No newline at end of file Index: config.php =================================================================== RCS file: /cvsroot/phpsqliteadmin/phpsqliteadmin/config.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- config.php 11 May 2004 18:23:16 -0000 1.1.1.1 +++ config.php 27 Jun 2004 21:34:36 -0000 1.2 @@ -6,9 +6,10 @@ $datetime_format = 'd.m.Y - H:i:s'; +// encoding for the php function "htmlentities", see http://www.php.net/htmlentities +$encoding = 'ISO-8859-15'; -// hoster mode stuff - +// hoster-mode stuff // in your directory structure, at which depth is the users directory // e.g. for /home/USER/public_html it would be 2 // e.g. for /home/webroot/users/USER/public_html it would be 4 Index: check_login.php =================================================================== RCS file: /cvsroot/phpsqliteadmin/phpsqliteadmin/check_login.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- check_login.php 21 May 2004 17:14:51 -0000 1.1 +++ check_login.php 27 Jun 2004 21:34:36 -0000 1.2 @@ -9,4 +9,4 @@ header("Location: login.php"); } -?> +?> \ No newline at end of file Index: mainframe.php =================================================================== RCS file: /cvsroot/phpsqliteadmin/phpsqliteadmin/mainframe.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- mainframe.php 11 May 2004 18:23:16 -0000 1.1.1.1 +++ mainframe.php 27 Jun 2004 21:34:36 -0000 1.2 @@ -3,17 +3,18 @@ require_once('include.php'); echo<<<EOT -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<html> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> <head> - <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" /> + <link href="phpsla.css" rel="stylesheet" type="text/css" /> <title>phpSQLiteAdmin</title> - <meta http-equiv="expires" content="0"> - <script language="javascript" src="javascript.txt" type="text/javascript"></script> - <link href="phpsla.css" rel="stylesheet" type="text/css"> - <base target="mainframe"> + <meta http-equiv="expires" content="0" /> + <meta http-equiv="pragma" content="no-cache" /> + <meta http-equiv="cache-control" content="no-cache" /> + <script language="Javascript" src="javascript.txt" type="text/javascript"></script> </head> -<body class=right> +<body class="right"> <div id="currentdb">Database: {$_SESSION['phpSQLiteAdmin_currentdb']}</div> EOT; @@ -28,7 +29,7 @@ $dbinfo = $userdbh->dbInfo(); print "<table id=\"dbinfotable\">\n"; -print "<tr><th colspan=2>Database file information</th></tr>\n"; +print "<tr><th colspan=\"2\">Database file information</th></tr>\n"; print "<tr><td>Size:</td><td>".($dbinfo['size']/1024)."KB</td></tr>\n"; print "<tr><td>Last modification:</td><td>".$dbinfo['last_mod']."</td></tr>\n"; @@ -39,7 +40,7 @@ print "<tr><td>Group:</td><td>".$group['name']."</td></tr>\n"; } -print "</table><br>\n"; +print "</table><br />\n"; print "<h3>Tables:</h3>\n"; @@ -56,12 +57,12 @@ print "</td></tr>\n"; } } -print "</table><br>\n"; +print "</table><br />\n"; */ +$userdbh->query("select name,upper(name) from SQLITE_MASTER where type = 'table' order by 2"); print "<table id=\"tabletable\">\n"; print "<tr><th>Name</th><th>Rows</th><th>Action</th></tr>\n"; -$userdbh->query("select name,upper(name) from SQLITE_MASTER where type = 'table' order by 2"); while($row = $userdbh->fetchArray()) { print "<tr><td>".$row[0]."</td>\n"; $userdbh2->query("select count(*) from $row[0]"); @@ -72,29 +73,26 @@ print_table_action_links($row[0]); print "</td></tr>\n"; } -print "</table><br>\n"; +print "</table><br />\n"; echo<<<EOT <h3>Database operations:</h3> - -<table class="blind"> -<form action="table_create.php" method=post onsubmit=""> -<tr> -<td>Create a new table named</td> -<td><input type=text name=tablename value="" size=20><td>with</td> -<td><input type=text name=columns value="" size=3> colums</td> -<td><input type=submit name=submit value="Go"></td> -</tr> +<ul> +<li> +<form action="table_create.php" method="post" onsubmit="">Create a new table named +<input type="text" name="tablename" value="" size="20" /> with +<input type="text" name="columns" value="" size="3" /> colums +<input type="submit" name="submit" value="Go" /> </form> - +</li> <!-- +<li> <form action="index_create.php" method=post onsubmit=""> -<tr> -<td>Create an index on table</td> -<td><select name=create_index>\n +Create an index on table +<select name="create_index">\n EOT; foreach($rows as $row) { @@ -102,23 +100,21 @@ } echo<<<EOT -</select></td> -<td colspan=3 align=right><input type=submit name=submit value="Go"></td> -</tr> -</form> +</select> +<input type="submit" name="submit" value="Go" /> +</li> --> -<tr><td colspan=5><a href="dbaction.php?action=schema" target="mainframe">Show Database schema</a></td></tr> -<tr><td colspan=5><a href="dbaction.php?action=vacuum" target="_top" onclick="return confirm_vacuum_db();">Vacuum Database</a></td></tr> +<li><a href="dbaction.php?action=schema" target="mainframe">Show Database schema</a></li> +<li><a href="dbaction.php?action=vacuum" target="_top" onclick="return confirm_vacuum_db();">Vacuum Database</a></li> EOT; -if ($current_db != 'phpsla.sqlite') print "<tr><td colspan=5><a href=\"dbaction.php?action=drop\" target=\"_top\" onclick=\"return confirm_drop_db();\">Drop Database</a></td></tr>\n"; - -print "</table>\n"; +if ($current_db != 'phpsla.sqlite') print "<li><a href=\"dbaction.php?action=drop\" target=\"_top\" onclick=\"return confirm_drop_db();\">Drop Database</a></li>\n"; +print "</ul>\n"; print "</body>\n"; print "</html>\n"; -?> +?> \ No newline at end of file Index: dbaction.php =================================================================== RCS file: /cvsroot/phpsqliteadmin/phpsqliteadmin/dbaction.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- dbaction.php 21 May 2004 17:28:14 -0000 1.2 +++ dbaction.php 27 Jun 2004 21:34:36 -0000 1.3 @@ -37,19 +37,21 @@ if ($action == 'schema') { echo<<<EOT -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<html> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> <head> - <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" /> + <link href="phpsla.css" rel="stylesheet" type="text/css" /> <title>phpSQLiteAdmin</title> - <meta http-equiv="expires" content="0"> - <script language="javascript" src="javascript.txt" type="text/javascript"></script> - <link href="phpsla.css" rel="stylesheet" type="text/css"> + <meta http-equiv="expires" content="0" /> + <meta http-equiv="pragma" content="no-cache" /> + <meta http-equiv="cache-control" content="no-cache" /> + <script language="Javascript" src="javascript.txt" type="text/javascript"></script> </head> -<body class=right> +<body class="right"> <div id="currentdb">Database: {$_SESSION['phpSQLiteAdmin_currentdb']}</div> <p class="sqliteversion">SQLite version: $sqliteversion</p> -<br> +<br /> <a href="mainframe.php" target="mainframe">Back</a>\n EOT; print "<h3>Database schema</h3>\n"; @@ -94,4 +96,4 @@ } -?> +?> \ No newline at end of file Index: login.class.php =================================================================== RCS file: /cvsroot/phpsqliteadmin/phpsqliteadmin/login.class.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- login.class.php 21 May 2004 17:24:34 -0000 1.1 +++ login.class.php 27 Jun 2004 21:34:36 -0000 1.2 @@ -6,9 +6,9 @@ { var $_user; var $_pass; - + // {{{ function login() - + function login($user, $pass) { $this->_user = $user; @@ -20,7 +20,7 @@ // {{{ function checkLogin() function checkLogin() - { + { $query = "SELECT * FROM users WHERE login = '$this->_user'"; $this->query($query); @@ -56,7 +56,7 @@ function updateLogin($pass) { $this->_pass = md5($pass); - + $query = "UPDATE users SET password = '$this->pass' WHERE login = '$this->user'"; $this->query($query); } @@ -69,7 +69,7 @@ { $query = "SELECT * FROM users"; $this->query($query); - + if ($this->numRows() == 0) { return true; } else { @@ -113,4 +113,4 @@ // }}} } -?> +?> \ No newline at end of file Index: dbconfig.php =================================================================== RCS file: /cvsroot/phpsqliteadmin/phpsqliteadmin/dbconfig.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- dbconfig.php 11 May 2004 18:23:20 -0000 1.1.1.1 +++ dbconfig.php 27 Jun 2004 21:34:36 -0000 1.2 @@ -3,17 +3,19 @@ require_once('include.php'); echo<<<EOT -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<html> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> <head> - <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" /> + <link href="phpsla.css" rel="stylesheet" type="text/css" /> <title>phpSQLiteAdmin</title> - <meta http-equiv="expires" content="0"> + <meta http-equiv="expires" content="0" /> + <meta http-equiv="pragma" content="no-cache" /> + <meta http-equiv="cache-control" content="no-cache" /> <script language="Javascript" src="javascript.txt" type="text/javascript"></script> - <link href="phpsla.css" rel="stylesheet" type="text/css"> - <base target="mainframe"> + <base target="mainframe" /> </head> -<body class=right onload="document.adddb.alias.focus();"> +<body class="right" onload="document.adddb.alias.focus();"> <a href="editdb.php">Add a new database alias</a> Index: table_browse.php =================================================================== RCS file: /cvsroot/phpsqliteadmin/phpsqliteadmin/table_browse.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- table_browse.php 21 May 2004 19:18:54 -0000 1.2 +++ table_browse.php 27 Jun 2004 21:34:36 -0000 1.3 @@ -3,16 +3,18 @@ require_once('include.php'); ?> -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<html> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> <head> - <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" /> + <link href="phpsla.css" rel="stylesheet" type="text/css" /> <title>phpSQLiteAdmin</title> - <meta http-equiv="expires" content="0"> + <meta http-equiv="expires" content="0" /> + <meta http-equiv="pragma" content="no-cache" /> + <meta http-equiv="cache-control" content="no-cache" /> <script language="Javascript" src="javascript.txt" type="text/javascript"></script> - <link href="phpsla.css" rel="stylesheet" type="text/css"> </head> -<body class=right> +<body class="right"> <?php print_top_links($_GET['object']); @@ -40,9 +42,9 @@ print "<tr>\n"; for ($i=0; $i<$nr_fields; $i++) { if (strlen($row[$i]) > 50) { - print '<td>'.substr($row[$i],0,50)."...</td>\n"; + print '<td>'.substr(htmlentities($row[$i],ENT_QUOTES,$encoding),0,50)."...</td>\n"; } else { - print "<td>$row[$i]</td>\n"; + print "<td>".htmlentities($row[$i],ENT_QUOTES,$encoding)."</td>\n"; } } print "</tr>\n"; @@ -54,4 +56,4 @@ print "</html>\n"; -?> +?> \ No newline at end of file Index: table_structure.php =================================================================== RCS file: /cvsroot/phpsqliteadmin/phpsqliteadmin/table_structure.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- table_structure.php 11 May 2004 18:23:22 -0000 1.1.1.1 +++ table_structure.php 27 Jun 2004 21:34:36 -0000 1.2 @@ -3,23 +3,25 @@ require_once('include.php'); ?> -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<html> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> <head> - <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" /> + <link href="phpsla.css" rel="stylesheet" type="text/css" /> <title>phpSQLiteAdmin</title> - <meta http-equiv="expires" content="0"> + <meta http-equiv="expires" content="0" /> + <meta http-equiv="pragma" content="no-cache" /> + <meta http-equiv="cache-control" content="no-cache" /> <script language="Javascript" src="javascript.txt" type="text/javascript"></script> - <link href="phpsla.css" rel="stylesheet" type="text/css"> </head> -<body class=right> +<body class="right"> <?php print_top_links($_GET['object']); print "<h3>Table '{$_GET['object']}'</h3>\n"; -print "<table border=1>\n"; +print "<table border=\"1\">\n"; print "<tr><th>Column</th><th>Type</th></tr>\n"; $userdbh->_setTableInfo($_GET['object']); $cols = $userdbh->getColsType(); @@ -46,7 +48,7 @@ */ if($nr_indexes > 0) { - print "<table border=1>\n"; + print "<table border=\"1\">\n"; print "<tr><th>Index name</th><th>On field(s)</th></tr>\n"; foreach($indexes as $row) { if(eregi("\((.*)\)", $row['sql'], $fields)) { @@ -58,7 +60,7 @@ } } print "</table>\n"; - + } else { print "<em>no indexes</em>\n"; |