Files
Testing/suggestions-test.php

92 lines
2.9 KiB
PHP
Raw Permalink Normal View History

2026-11-17 16:15:01 -05:00
<?php
/* $Id: index.php 8 2009-01-11 06:02:53Z john $ */
$page="general";
include("header.php");
function general()
{ global $user, $url, $database;
if($_GET["view"]=="popular")
{
$query=$database->database_query("SELECT * FROM bateworldcom_zips.suggestions ORDER BY votes DESC");
}
elseif($_GET["view"]=="inprogress")
{
$query=$database->database_query("SELECT * FROM bateworldcom_zips.suggestions WHERE status=1 ORDER BY votes DESC");
}
elseif($_GET["view"]=="rejected")
{
$query=$database->database_query("SELECT * FROM bateworldcom_zips.suggestions WHERE status=3 ORDER BY votes DESC");
}
elseif($_GET["view"]=="completed")
{
$query=$database->database_query("SELECT * FROM bateworldcom_zips.suggestions WHERE status=2 ORDER BY votes DESC");
}
else
{
$_GET["view"]="new";
$query=$database->database_query("SELECT * FROM bateworldcom_zips.suggestions ORDER BY id DESC");
}
?>
<table cellpadding="0" cellspacing="0">
<tbody><tr>
<td valign="bottom"><table cellpadding="0" cellspacing="0"><tbody><tr><td class="profile_tab<?php if($_GET["view"]=="new"){echo "2";}?>" id="" ><a href="suggestions.php?view=new">New</a></td></tr></tbody></table></td>
<td valign="bottom"><table cellpadding="0" cellspacing="0"><tbody><tr><td class="profile_tab<?php if($_GET["view"]=="popular"){echo "2";}?>" id="" ><a href="suggestions.php?view=popular">Popular</a></td></tr></tbody></table></td>
<td valign="bottom"><table cellpadding="0" cellspacing="0"><tbody><tr><td class="profile_tab<?php if($_GET["view"]=="inprogress"){echo "2";}?>" id="" ><a href="suggestions.php?view=inprogress" style="width:100px;">In Progress</a></td></tr></tbody></table></td>
<td valign="bottom"><table cellpadding="0" cellspacing="0"><tbody><tr><td class="profile_tab<?php if($_GET["view"]=="rejected"){echo "2";}?>" id="" ><a href="suggestions.php?view=rejected">Rejected</a></td></tr></tbody></table></td>
<td valign="bottom"><table cellpadding="0" cellspacing="0"><tbody><tr><td class="profile_tab<?php if($_GET["view"]=="completed"){echo "2";}?>" id="" ><a href="suggestions.php?view=completed">Completed</a></td></tr></tbody></table></td>
<td width="100%" class="profile_tab_end">&nbsp;</td>
</tr>
</tbody></table>
<div class="profile_content">
<?php while($row=$database->database_fetch_array($query))
{
?>
<div>
<div style="width:100px; float:left; text-align:center;">
<?php echo $row["votes"];?><br />
votes<br /><input type="button" value="Vote">
</div>
<a href="suggestion.php?id=<?php echo $row["id"];?>"><?php echo $row["suggestion"];?></a>
<?php echo $row["moreinfo"];?>
<div class="clear clearfix"></div>
</div>
<?php
}
?>
</div>
<? }
include("footer.php");
?>