Location: PHPKode > projects > BBViewer > BBViewerApp/bbviewer/admin/index.php
<?PHP

require('config.php');
require('connect.php');
require('/library/webserver/auth.inc');

?>

<TITLE><?php echo $domain ?> - Admin Utilities</TITLE>

<? INCLUDE("admintop.inc")?>

<IMG SRC='../images/new_admin.gif' BORDER='0' style="POSITION: absolute; TOP: 0px; LEFT: 0px; Z-INDEX: 25">
<IMG USEMAP="#babybrynteson" SRC='../images/new_title.gif' border='0' style="POSITION: absolute; TOP: 70px; LEFT: 0px; Z-INDEX: 25">


<?php

$result = mysql_query("SELECT * FROM news ORDER BY id DESC",$db);

$result2 = mysql_query("SELECT * FROM pics ORDER BY id DESC",$db);

$result3 = mysql_query("SELECT * FROM video ORDER BY id DESC",$db);

?>

<div class="news" style="POSITION: absolute; TOP: 125px; LEFT: 5px; Z-INDEX: 25; WIDTH: 650px">

<h3>Add Tools</h3>

<table width="100%" border=0>

<tr>

<td width='550'>

<a href="addnews.php">Add News Items</a>

</td>

</tr>

<tr>

<td width='550'>

<a href="addpic.php">Upload a New Picture</a>

</td>

</tr>

<tr>

<td width='550'>

<a href="addvideo.php">Upload a New Video</a>

</td>

</tr>

</table>

<h3>Edit News:</h3><p>

<table width="100%" border=0>

<?php

if ($myrow = mysql_fetch_array($result)) {

  do {
  
    printf("<tr>\n");
    
    printf("<td width='550'>\n");
    
    printf("%s - %s\n", $myrow["subject"], $myrow["postdate"]);
    
    printf("<td width='50'>\n");    

    printf("<a href=\"editnews.php?id=%s\">Edit</a><br>\n", $myrow["id"]);
    
    printf("<td width='50'>\n");    

    printf("<a href=\"deletenews.php?id=%s\">Delete</a><br>\n", $myrow["id"]);

  } while ($myrow = mysql_fetch_array($result));

} else {

  echo "Sorry, no records were found!";	

}

?>

</table>

<h3>Edit Pictures:</h3><p>

<table width="100%" border=0>

<?php

if ($myrow2 = mysql_fetch_array($result2)) {

  do {
  
    printf("<tr>\n");
    
    printf("<td width='550'>\n");
    
    printf("%s - %s\n", $myrow2["short"], $myrow2["postdate"]);
    
    printf("<td width='50'>\n");    

    printf("<a href=\"editpic.php?id=%s\">Edit</a><br>\n", $myrow2["id"]);
    
    printf("<td width='50'>\n");    

    printf("<a href=\"deletepic.php?id=%s\">Delete</a><br>\n", $myrow2["id"]);

  } while ($myrow2 = mysql_fetch_array($result2));

} else {

  echo "Sorry, no records were found!";	

}

?>

</table>

<h3>Edit Videos:</h3><p>

<table width="100%" border=0>

<?php

if ($myrow3 = mysql_fetch_array($result3)) {

  do {
  
    printf("<tr>\n");
    
    printf("<td width='550'>\n");
    
    printf("%s - %s\n", $myrow3["short"], $myrow3["postdate"]);
    
    printf("<td width='50'>\n");    

    printf("<a href=\"editvideo.php?id=%s\">Edit</a><br>\n", $myrow3["id"]);
    
    printf("<td width='50'>\n");    

    printf("<a href=\"deletevideo.php?id=%s\">Delete</a><br>\n", $myrow3["id"]);

  } while ($myrow3 = mysql_fetch_array($result3));

} else {

  echo "Sorry, no records were found!";	

}

?>

</table>

<? INCLUDE("../bottom.inc")?>

</div>

Return current item: BBViewer