Viewing file: listTopics.inc.php3 (2.62 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?
require("$mysqlCall");
if(checkSuperSession($superSession, $REMOTE_ADDR))
{
include("include/rootGui.inc.php3");
$userId = getUserSUId($superSession);
$userInfo = getUserInfo($userId);
if(($userInfo[SuperUser]==1) && ($userInfo[manageTopics]==1) && ($userInfo[active]==1))
{
$query = sqlQuery($seg, $topics);
$mysql_result = mysql_query($query, $mysql_link);
$rows=countRows($news);
if($rows>0)
{
navGen($seg, $topics, "index.php3?mode=listTopics&superSession=$superSession");
}
while(($row = mysql_fetch_row($mysql_result)))
{
$ID = $row[0];
$title = $row[1];
$info = $row[2];
$imageID = $row[3];
print("<table width=70% border=0 cellpadding=3 cellspacing=0 >");
print("<tr><td bgcolor=$border_colour align=center>");
print("<table width=100% border=0 cellpadding=5 cellspacing=0 >");
printf("<tr>\n");
print("<td bgcolor=$table_colour2 width=100%>\n");
print("<b>$title:</b>\n");
print("$info");
print("</td>");
print("<td rowspan=2 bgcolor=$table_colour>");
print("<form method=\"post\" action=\"index.php3?mode=addTopic&superSession=$superSession&ID=$ID&del=1\">");
print("<input type=submit value=Del></form>");
print("<form method=\"post\" action=\"index.php3?mode=addTopic&superSession=$superSession&ID=$ID&edit=1\">");
print("<input type=hidden name=title value=\"$title\"><input type=hidden name=info value=\"$info\"><input type=hidden name=imageID value=\"$imageID\"> <input type=submit value=Edit></form>");
print("</td>");
printf("</tr>\n");
printf("<tr>\n");
print("<td bgcolor=$bgcolour>\n");
if($imageID!=0)
{
print("<img src=\"imageShow.php3?id=$imageID\">");
}
else
{
print("No image selected");
}
print("</td>\n");
print("</tr>\n");
print("</table>");
print("<tr><td>");
print("</table>");
print("<br><br>");
}
if($rows>0)
{
navGen($seg, $topics, "index.php3?mode=listTopics&superSession=$superSession");
}
}
else
{
print("You do no thave access to this function");
}
include("include/guiBase.inc.php3");
}
else
{
/* session is bad */
print("Bad Session ID ($superSession)!<BR>\n");
$superSession = "";
}
?>
|