Verzeichnisstruktur phpBB-1.0.0
- Veröffentlicht
- 15.12.2000
So funktioniert es
|
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
index.php
001 <?php
002 /***************************************************************************
003 index.php - description
004 -------------------
005 begin : Sat June 17 2000
006 copyright : (C) 2000 by James Atkinson
007 email : james@totalgeek.org
008
009 $Id: index.php,v 1.28 2000/11/18 05:41:54 thefinn Exp $
010
011 ***************************************************************************/
012
013 /***************************************************************************
014 *
015 * This program is free software; you can redistribute it and/or modify
016 * it under the terms of the GNU General Public License as published by
017 * the Free Software Foundation; either version 2 of the License, or
018 * (at your option) any later version.
019 *
020 ***************************************************************************/
021 include('extention.inc');
022 include('functions.'.$phpEx);
023 include('config.'.$phpEx);
024 require("auth.$phpEx");
025 $pagetitle = "Forum Index";
026 $pagetype = "index";
027 include('page_header.'.$phpEx);
028
029 $sql = "SELECT * FROM catagories ORDER BY cat_order";
030 if(!$result = mysql_query($sql, $db))
031 die("<font size=+1>An Error Occured</font><hr>phpBB was unable to query the forums database");
032 ?>
033
034 <TABLE BORDER="0" WIDTH="<?php echo $TableWidth?>" CELLPADDING="1" CELLSPACING="0" ALIGN="CENTER" VALIGN="TOP"><TR><TD BGCOLOR="<?php echo $table_bgcolor?>">
035 <TABLE BORDER="0" CELLPADDING="1" CELLSPACING="1" WIDTH="100%">
036 <TR BGCOLOR="<?php echo $color1?>" ALIGN="LEFT">
037 <TD BGCOLOR="<?php echo $color1?>" ALIGN="CENTER" VALIGN="MIDDLE"> </TD>
038 <TD><FONT FACE="<?php echo $FontFace?>" SIZE="<? echo $FontSize1?>" COLOR="<?php echo $textcolor?>"><B>Forum</B></font></TD>
039 <TD ALIGN="CENTER"><FONT FACE="<?php echo $FontFace?>" SIZE="<? echo $FontSize1?>" COLOR="<?php echo $textcolor?>"><B>Topics</B></font></TD>
040 <TD ALIGN="CENTER"><FONT FACE="<?php echo $FontFace?>" SIZE="<? echo $FontSize1?>" COLOR="<?php echo $textcolor?>"><B>Posts</B></font></TD>
041 <TD ALIGN="CENTER"><FONT FACE="<?php echo $FontFace?>" SIZE="<? echo $FontSize1?>" COLOR="<?php echo $textcolor?>"><B>Last Post</B></font></TD>
042 <TD ALIGN="CENTER"><FONT FACE="<?php echo $FontFace?>" SIZE="<? echo $FontSize1?>" COLOR="<?php echo $textcolor?>"><B>Moderator</B></font></TD>
043 </TR>
044
045 <?php
046 $row = @mysql_fetch_array($result);
047 do {
048 if($viewcat && $row[cat_id] == $viewcat) {
049 $sub_sql = "SELECT f.* FROM forums f WHERE f.cat_id = '$row[cat_id]' ORDER BY forum_id";
050 }
051 else if($viewcat && $row[cat_id] != $viewcat) {
052 $title = stripslashes($row[cat_title]);
053 echo "<TR ALIGN=\"LEFT\" VALIGN=\"TOP\"><TD COLSPAN=6 BGCOLOR=\"$color1\"><FONT FACE=\"$FontFace\" SIZE=\"$FontSize2\" COLOR=\"$textcolor\"><B><a href=\"$PHP_SELF?viewcat=$row[cat_id]\">$title</a></B></FONT></TD></TR>";
054 continue;
055 }
056 else if(!$viewcat) {
057 $sub_sql = "SELECT f.* FROM forums f WHERE f.cat_id = '$row[cat_id]' ORDER BY forum_id";
058 }
059
060 if(!$sub_result = mysql_query($sub_sql, $db))
061 die("<font size=+1>An Error Occured</font><hr>phpBB was unable to query the forums database");
062 if($myrow = mysql_fetch_array($sub_result)) {
063 $title = stripslashes($row[cat_title]);
064 echo "<TR ALIGN=\"LEFT\" VALIGN=\"TOP\"><TD COLSPAN=6 BGCOLOR=\"$color1\"><FONT FACE=\"$FontFace\" SIZE=\"$FontSize2\" COLOR=\"$textcolor\"><B><a href=\"$PHP_SELF?viewcat=$row[cat_id]\">$title</a></B></FONT></TD></TR>";
065 do {
066 $last_post = get_last_post($myrow[forum_id], $db, "forum");
067 list($last_post_datetime, $null) = split("by", $last_post);
068 list($last_post_date, $last_post_time) = split(" ", $last_post_datetime);
069 list($year, $month, $day) = explode("-", $last_post_date);
070 list($hour, $min) = explode(":", $last_post_time);
071 $last_post_time = mktime($hour, $min, 0, $month, $day, $year);
072
073 echo "<TR ALIGN=\"LEFT\" VALIGN=\"TOP\">";
074 $total_topics = get_total_topics($myrow[forum_id], $db);
075 if((($last_visit - $last_post_time) < 600) && $last_post != "No posts") {
076 echo "<TD BGCOLOR=\"$color1\" ALIGN=\"CENTER\" VALIGN=\"MIDDLE\" WIDTH=5%><IMG SRC=\"$newposts_image\"></TD>";
077 }
078 else {
079 echo "<TD BGCOLOR=\"$color1\" ALIGN=\"CENTER\" VALIGN=\"MIDDLE\" WIDTH=5%><IMG SRC=\"$folder_image\"></TD>";
080 }
081 $name = stripslashes($myrow[forum_name]);
082 echo "<TD BGCOLOR=\"$color2\"><FONT FACE=\"$FontFace\" SIZE=\"$FontSize2\" COLOR=\"$textcolor\"><a href=\"viewforum.$phpEx?forum=$myrow[forum_id]\">$name</a></font>\n";
083 $desc = stripslashes($myrow[forum_desc]);
084 echo "<br><FONT FACE=\"$FontFace\" SIZE=\"$FontSize1\" COLOR=\"$textcolor\">$desc</font></TD>\n";
085 echo "<TD BGCOLOR=\"$color1\" WIDTH=5% ALIGN=\"CENTER\" VALIGN=\"MIDDLE\"><FONT FACE=\"$FontFace\" SIZE=\"$FontSize2\" COLOR=\"$textcolor\">$total_topics</font></TD>\n";
086 $total_posts = get_total_posts($myrow[forum_id], $db, "forum");
087 echo "<TD BGCOLOR=\"$color2\" WIDTH=5% ALIGN=\"CENTER\" VALIGN=\"MIDDLE\"><FONT FACE=\"$FontFace\" SIZE=\"$FontSize2\" COLOR=\"$textcolor\">$total_posts</font></TD>\n";
088 echo "<TD BGCOLOR=\"$color1\" WIDTH=15% ALIGN=\"CENTER\" VALIGN=\"MIDDLE\"><FONT FACE=\"$FontFace\" SIZE=\"$FontSize1\" COLOR=\"$textcolor\">$last_post</font></TD>\n";
089 $forum_moderators = get_moderators($myrow[forum_id], $db);
090 echo "<TD BGCOLOR=\"$color2\" WIDTH=5% ALIGN=\"CENTER\" VALIGN=\"MIDDLE\" NOWRAP><FONT FACE=\"$FontFace\" SIZE=\"-2\" COLOR=\"$textcolor\">";
091 $count = 0;
092 while(list($null, $mods) = each($forum_moderators)) {
093 while(list($mod_id, $mod_name) = each($mods)) {
094 if($count > 0)
095 echo ", ";
096 if(!($count % 2) && $count != 0)
097 echo "<BR>";
098 echo "<a href=\"bb_profile.$phpEx?mode=view&user=$mod_id\">$mod_name</a>";
099 $count++;
100 }
101 }
102 echo "</font></td></tr>\n";
103 } while($myrow = mysql_fetch_array($sub_result));
104 }
105 } while($row = mysql_fetch_array($result));
106
107 ?>
108 </TABLE></TD></TR></TABLE>
109 <TABLE ALIGN="CENTER" BORDER="0" WIDTH="<?php echo $TableWidth?>"><TR><TD>
110 <FONT FACE="<?php echo $FontFace?>" SIZE="<? echo $FontSize1?>" COLOR="<?php echo $textcolor?>">
111 <IMG SRC="<?php echo $newposts_image?>"> = New Posts since your last visit.
112 <BR><IMG SRC="<?php echo $folder_image?>"> = No New Posts since your last visit.
113 </FONT></TD></TR></TABLE>
114
115 <?php
116 require('page_tail.'.$phpEx);
117 ?>
118
119