[Openfirst-cvscommit] base index.php,1.3,1.4
Brought to you by:
xtimg
From: <i-...@us...> - 2003-10-23 22:40:03
|
Update of /cvsroot/openfirst/base In directory sc8-pr-cvs1:/tmp/cvs-serv31043 Modified Files: index.php Log Message: A new look and several bug fixes. Index: index.php =================================================================== RCS file: /cvsroot/openfirst/base/index.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** index.php 13 Sep 2003 20:17:54 -0000 1.3 --- index.php 23 Oct 2003 22:37:36 -0000 1.4 *************** *** 42,83 **** } ! echo("<th>Features</th><td>$headers</td></tr>"); ! if(function_exists("shownews")) { ! echo("<tr><th>News</th> ! <td>" . shownews(5) . "</td>"); } ! if (is_readable("guestbook/")) { ! $qu = ofirst_dbquery("SELECT guest, date FROM ofirst_guestbook ORDER BY guest LIMIT 5;"); ! while($q = ofirst_dbfetch_object($qu)) { ! echo("<sub><strong><a href='/guestbook/' target='_content'>$q->guest</a></strong><br>$q->date</sub><br>"); ! } ! } elseif (is_readable("news/")) { ! $qu = ofirst_dbquery("SELECT title, poster, date FROM ofirst_news ORDER BY ID desc LIMIT 5;"); ! while($q = ofirst_dbfetch_object($qu)) { ! echo("<sub><strong><a href='$home$basepath/news' target='_content' >$q->title</a></strong> - $q->poster<br>$q->date</sub><br>"); ! } ! } elseif (is_readable("manual/")) { ! $qu = ofirst_dbquery("SELECT document, title FROM ofirst_manual GROUP BY document;"); ! while($q = ofirst_dbfetch_object($qu)) { ! echo("<sub><a href='$home$basepath/manual' target='_content'>$q->document</a> - $q->title</sub><br>"); ! } ! } elseif (is_readable("guestbook/")) { ! if(function_exists("emoticon_preview") == true) { ! emoticon_preview(); ! } else { ! echo("Emoticons have not been enabled."); ! } ! } elseif (is_readable("awards/")) { $qu = ofirst_dbquery("SELECT AwardName FROM ofirst_awards;"); ! while($q = ofirst_dbfetch_object($qu)) { ! echo("<sub><a href='$home$basepath/awards' target='_content'>$q->AwardName</a></sub><br>"); } ! } ! ?> ! </tr> ! </table> ! <?php include($footer); ?> --- 42,103 ---- } ! echo("<tr valign=top>"); ! echo("<th>Welcome to $title Web Site!</th>"); ! echo("<td rowspan=3 valign=top>"); ! if(isset($user->user)){ ! echo("<table width=200><tr><th>Welcome</th><td class=sub>Welcome, ".ucfirst($user->user)."!</td></tr></table><br />"); } ! if(function_exists("latest_posts")) { ! echo("<table width=200><tr><th>Latest Posts in Forum</th></tr><tr><td>"); ! latest_posts(5); ! echo("</td></tr></table><br />"); ! } ! ! if (is_readable("guestbook/")) { ! $qu = ofirst_dbquery("SELECT guest, date FROM ofirst_guestbook ORDER BY guest LIMIT 5;"); ! if(ofirst_dbnum_rows($qu)!=0){ ! echo("<table width=200><tr><th>Guestbook</th></tr><tr><td><div>Last records in our <a href=\"$basepath/guestbook\">guestbook</a>: </div>"); ! while($q = ofirst_dbfetch_object($qu)) { ! echo("<sub><strong><a href='/guestbook/' target='_content'>$q->guest</a></strong><br>$q->date</sub><br>"); ! } ! echo("</td></tr></table><br />"); ! } ! } ! if (is_readable("awards/")) { $qu = ofirst_dbquery("SELECT AwardName FROM ofirst_awards;"); ! if(ofirst_dbnum_rows($qu)!=0){ ! echo("<table width=200><tr><th>Awards</th></tr><tr><td><div>Our team has received the following <a href=\"$basepath/awards\">awards</a>: </div>"); ! while($q = ofirst_dbfetch_object($qu)) { ! echo("<sub><a href='$basepath/awards' target='_content'>$q->AwardName</a></sub><br>"); ! } ! echo("</td></tr></table><br />"); } ! } ! echo("<table width=200><tr><th>Features</th></tr><tr><td><div>This portal has the following features: </div> ! <ul>".str_replace(" |"," ",str_replace("»","<li>",$headers))."</ul></td></tr></table><br />"); ! if(function_exists("get_visitors")) { ! echo("<table width=200><tr><th>Stats</th></tr><tr><td><div>Website <a href=\"$basepath/logger/stats.php\">usage statistics</a>: </div>"); ! echo("<sub><strong>".get_totalpages()." pages served to ".get_visitors()." visitors</strong></sub>"); ! echo("</td></tr></table><br />"); ! } ! echo("</td></tr>"); ! echo("<tr><td class=sub>Welcome to the $title portal.</td></tr>"); ! echo("<tr><td valign=top>"); ! if(function_exists("shownews")) { ! echo("<h2 style=\"margin-bottom:0px;margin-top:15px\">Latest News</h2>"); ! $admin=false; ! if (isset($user->membertype)){ ! $admin=($user->membertype == "administrator"); ! } ! shownews(5,$admin); ! //are there more news? ! if(ofirst_dbnum_rows(ofirst_dbquery("SELECT * FROM ofirst_news"))>5){ ! echo("<div align=right>[ <b><a href=\"$basepath/news/index.php?show=all\">More News</a></b> ]</div>"); ! } ! } ! echo(" </td></tr></table>"); ! include($footer); ?> |