topical media & game development
portal-xml-getdb.php
<?php
if(tabellen = mysql_list_tables( "mwg400-dbs");
mysql_select_db("mwg400-dbs") or die ("Verdorie, kan de database
niet openen");
if(date = date("d-m-Y, H:i:s",now = mktime();
echo '<?xml version="1.0" encoding="iso-8859-1" ?>';
/*
echo '<?xml-stylesheet type="text/xsl" href="style.xsl"?>';
*/
echo "<document>
<author>S. Bankras</author>
<date>"._GET['table']."</table>
<description></description>
";
_GET['table']);
while (result)) {
echo "<item>\n";
foreach(key => key)){
value);
if(key.">".key.">\n";
}
}
}
echo "</item>\n";
}
print("</document>\n");
} else {
/*
Tellertje en loop om de tabellen te tonen.
*/
echo "<fieldset><legend><b>List of all tables in the database</b></legend>";
i < mysql_num_rows(t_name[tabellen, t_name[t_name[i++;
}
echo "</fieldset>";
mysql_free_result (_GET['table']){
?>
<hr />
Created for MMC2007
<div>
<img
src="http://www.w3.org/Icons/valid-xhtml10"
alt="Valid XHTML 1.0 Transitional" height="31" width="88" /></a>
</div>
</body>
</html>
<?php
}
function strip(text = str_replace("–", "-",text = str_replace("â", "NULL",text = str_replace("Â", "NULL",text = htmlentities(text;
}
?>
(C) A. Eliëns
2/9/2007
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.