home *** CD-ROM | disk | FTP | other *** search
/ PC World 2001 March / PCWorld_2001-03_cd.bin / KOMUNIK / progweb / progweb.exe / phpnuke / html / admin / submissions.php < prev    next >
PHP Script  |  2000-12-05  |  3KB  |  78 lines

  1. <?PHP
  2.  
  3. ######################################################################
  4. # PHP-NUKE: Web Portal System
  5. # ===========================
  6. #
  7. # Copyright (c) 2000 by Francisco Burzi (fburzi@ncc.org.ve)
  8. # http://phpnuke.org
  9. #
  10. # This modules is the main administration part
  11. #
  12. # This program is free software. You can redistribute it and/or modify
  13. # it under the terms of the GNU General Public License as published by
  14. # the Free Software Foundation; either version 2 of the License.
  15. ######################################################################
  16.  
  17. if (!eregi("admin.php", $PHP_SELF)) { die ("Access Denied"); }
  18. $hlpfile = "manual/submissions.html";
  19. $result = mysql_query("select radminarticle, radminsuper from authors where aid='$aid'");
  20. list($radminarticle, $radminsuper) = mysql_fetch_row($result);
  21. if (($radminsurvey==1) OR ($radminsuper==1)) {
  22.  
  23. /*********************************************************/
  24. /* News Submissions                                      */
  25. /*********************************************************/
  26.  
  27. function submissions() {
  28.     global $hlpfile, $admin;
  29.     $dummy = 0;
  30.     
  31.     include ("header.php");
  32.     GraphicAdmin($hlpfile);
  33.     OpenTable();
  34.     $result = mysql_query("SELECT qid, subject, timestamp FROM queue order by timestamp");
  35.     if(mysql_num_rows($result) == 0) {
  36.         echo "<table width=\"100%\"><tr><td bgcolor=\"#cccccc\" align=\"center\"><b>".translate("No New Submissions")."</b></td></tr></table>";
  37.     } else {
  38.         echo "<center><font size=2><b>".translate("New Stories Submissions")."</b><form action=\"admin.php\" method=\"post\"><table width=\"100%\" border=1 bgcolor=CCCCCC>";
  39.         while (list($qid, $subject, $timestamp) = mysql_fetch_row($result)) {
  40.             $hour = "AM";
  41.             ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $timestamp, $datetime);
  42.             if ($datetime[4] > 12) { $datetime[4] = $datetime[4]-12; $hour = "PM"; }
  43.             $datetime = date(translate("datestring"), mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
  44.             echo "<tr>
  45.             <td align=middle><font SIZE=2> (<a href=admin.php?op=DeleteStory&qid=$qid>".translate("Delete")."</a>-<a href=admin.php?op=QautoStory&qid=$qid>Auto</a>) </td>
  46.             <td width=100%><font SIZE=3>";
  47.             if ($subject == "") {
  48.                 echo " <a href=\"admin.php?op=DisplayStory&qid=$qid\">".translate("No Subject")."</a></font>";
  49.             } else {
  50.                 echo " <a href=\"admin.php?op=DisplayStory&qid=$qid\">$subject</a></font>";
  51.             }
  52.             $timestamp = ereg_replace(" ", "@", $timestamp);
  53.             echo "</td><td align=right><font SIZE=2> $timestamp </font>
  54.             </td></tr>";
  55.             $dummy++;
  56.         }
  57.         if ($dummy < 1) {
  58.             echo "<tr><td bgcolor=\"#cccccc\" align=\"center\"><b>".translate("No New Submissions")."</b></form></td></tr></table>";
  59.         } else {
  60.             echo "</table></form>";
  61.         }
  62.     }
  63.     CloseTable();
  64.     include ("footer.php");
  65. }
  66.  
  67. switch ($op) {
  68.  
  69.     default:
  70.     submissions();
  71.     break;
  72.  
  73. }
  74.  
  75. } else {
  76.     echo "Access Denied";
  77. }
  78. ?>