Search Box and easy to read LoadMod listings

master
Rubenwardy 2012-08-25 15:13:41 +01:00
parent 17eb521caf
commit ed7ca13329
3 changed files with 25 additions and 3 deletions

View File

@ -3,13 +3,22 @@ echo "<table width=\"100%\"><tr><th colspan=2>Mod Name</th><th>Populatity</th><t
$query= mysql_real_escape_string ($query);
$res = mysql_query("SELECT * FROM mods WHERE tags LIKE '%$query%' ORDER BY likes DESC",$handle) or SQLerror("MySQL Query Error","Error on searching database.mods.tags for '$query'");
$alternate=1;
// Get projects loop
while ($hash = mysql_fetch_assoc($res)){
echo "<tr><td width=16><img width=16 height=16 src=\"images/topicicon_read.jpg\" /></td><td><a href=\"viewmod.php?id={$hash['mod_id']}\">{$hash['name']}</a><br />by {$hash['owner']}</td>";
if ($alternate==0){
$bgcolor="#FFFFFF";
}else{
$bgcolor="#FFFFBD";
}
echo "<tr bgcolor=\"$bgcolor\"><td width=16><img width=16 height=16 src=\"images/topicicon_read.jpg\" /></td><td><a href=\"viewmod.php?id={$hash['mod_id']}\">{$hash['name']}</a><br />by {$hash['owner']}</td>";
echo "<td>{$hash['likes']}</td>";
echo "<td>{$hash['tags']}</td>";
echo "<td>{$hash['license']}</td></tr>\n";
$alternate=1-$alternate;
}
echo "</table>";
?>

3
scripts/pagefooter.php Normal file
View File

@ -0,0 +1,3 @@
</div>
</body>
</html>

View File

@ -4,7 +4,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
<meta name="Generator" content="Serif WebPlus X5 (13.0.3.029)">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8">
<title><?php echo $page_title ?></title>
<title><?php echo $page_title ?> - Minetest Mods</title>
<meta name="keywords" content="">
<meta name="author" content="Andrew Ward">
<meta name="copyright" content="Copyright &#xA9; to Andrew Ward">
@ -21,7 +21,7 @@
<!--The Header-->
<img src="<?php echo $serverpath;?>/images/header.png" width="900" height="100" border="0" alt="" style="position:absolute;left:0px;top:0px;">
<div id="userbar" style="text-align:right;position:relative;left:700px;top:50px;width:180px"><?php
<div id="userbar" style="text-align:right;position:relative;left:710px;top:70px;width:180px;height=30px;"><?php
if (is_logged_in()){
echo $_SESSION['user']." - <a href=\"$serverpath/logout.php\"><font color=\"#FFFFFF\"><u>Log Out</u></font></a>";
}else{
@ -29,5 +29,15 @@ if (is_logged_in()){
}
?></div>
<div id="userbar" style="text-align:left;position:relative;left:10px;top:55px;width:180px;height=30px;"><?php
echo "<a href=\"$serverpath/index.php\"><font color=\"#FFFFFF\"><u>Home</u></font></a>";
?></div>
<div style="position:relative;left:570px;top:80px;width:400px;">
<form method="get" action="<?php echo $serverpath;?>/search.php">
Search Mods: <input type="text" name="id"> <input type="submit" value="Search">
</form>
</div>
<!--Content Div-->
<div style="position:relative;left:5px;top:110px">