[Openfirst-cvscommit] base index.php,1.15,1.16
Brought to you by:
xtimg
From: Astronouth7303 <ast...@us...> - 2005-06-29 21:20:56
|
Update of /cvsroot/openfirst/base In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7818 Modified Files: index.php Log Message: Mostly improved module support, also some outstanding commits. Index: index.php =================================================================== RCS file: /cvsroot/openfirst/base/index.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** index.php 27 May 2005 16:07:51 -0000 1.15 --- index.php 29 Jun 2005 21:20:41 -0000 1.16 *************** *** 1,122 **** ! <?php ! /* ! * openFIRST.base - index.php ! * ! * Copyright (C) 2003, ! * openFIRST Project ! * Original Author: Tim Ginn <tim...@po...> ! * ! * This program is free software; you can redistribute it and/or modify ! * it under the terms of the GNU General Public License as published by ! * the Free Software Foundation; either version 2 of the License, or ! * (at your option) any later version. ! * ! * This program is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! * GNU General Public License for more details. ! * This program is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! * GNU General Public License for more details. ! * ! * You should have received a copy of the GNU General Public License ! * along with this program; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! * ! */ ! ! // Purpose: provide a basic starting point for the OpenFIRST web portal. ! ! require_once("includes/globals.php"); ! include($Header); ! ! $count = 0; ! global $Modules; ! ?> ! <h1>openFIRST Web Portal</h1> ! <table> ! <tr> ! <?php ! if(isset($Headers) == false) { ! echo("You may: <a href='config/'>login to configure openFIRST options</a>."); ! } ! ! 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/") && ofirst_dbnum_rows(ofirst_dbquery("SELECT * FROM ofirst_config WHERE modulename='guestbook' AND active='1';")) > 0) { ! $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/") && ofirst_dbnum_rows(ofirst_dbquery("SELECT * FROM ofirst_config WHERE modulename='awards' AND active='1';")) > 0) { ! $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 />"); ! } ! } ! ! # Features ! echo ' ! <table width=200> ! <tr><th>Features</th></tr> ! <tr><td><div>This portal has the following features: </div> ! '; ! echo '<ul> ! '; ! foreach($Modules as $code=>$mod) { ! if ($mod->getActive() ! #&& $mod->getShowOnMenu() ! ) { ! echo '<li><a href="'.htmlentities("$BasePath/$code").'">'.htmlentities($mod->getName()).'</a></li> ! '; ! } ! } ! echo '</ul>'; ! ! echo '</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 class=\"right\">[ <b><a href=\"$BasePath/news/index.php?show=all\">More News</a></b> ]</div>"); ! } ! } ! echo(" </td></tr></table>"); ! ! include($Footer); ! ?> --- 1,124 ---- ! <?php ! /* ! * openFIRST.base - index.php ! * ! * Copyright (C) 2003, ! * openFIRST Project ! * Original Author: Tim Ginn <tim...@po...> ! * ! * This program is free software; you can redistribute it and/or modify ! * it under the terms of the GNU General Public License as published by ! * the Free Software Foundation; either version 2 of the License, or ! * (at your option) any later version. ! * ! * This program is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! * GNU General Public License for more details. ! * This program is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! * GNU General Public License for more details. ! * ! * You should have received a copy of the GNU General Public License ! * along with this program; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! * ! */ ! ! // Purpose: provide a basic starting point for the OpenFIRST web portal. ! ! require_once("includes/globals.php"); ! include($Header); ! ! $count = 0; ! global $Modules; ! ?> ! <h1>openFIRST Web Portal</h1> ! <table> ! <tr> ! <?php ! if(isset($Headers) == false) { ! echo("You may: <a href='config/'>login to configure openFIRST options</a>."); ! } ! ! 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/") && ofirst_dbnum_rows(ofirst_dbquery("SELECT * FROM ofirst_config WHERE modulename='guestbook' AND active='1';")) > 0) { ! $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/") && ofirst_dbnum_rows(ofirst_dbquery("SELECT * FROM ofirst_config WHERE modulename='awards' AND active='1';")) > 0) { ! $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 />"); ! } ! } ! ! # Features ! echo ' ! <table width=200> ! <tr><th>Features</th></tr> ! <tr><td><div>This portal has the following features: </div> ! '; ! echo '<ul> ! '; ! foreach($ogModuleManager->getDirs() as $dir) { ! $mod =& $ogModuleManager->getModuleFromDir($dir); ! if ($mod->getActive() ! #&& $mod->getShowOnMenu() ! ) { ! echo '<li><a href="'.htmlentities("$BasePath/$dir").'">'.htmlentities($mod->getName()).'</a></li> ! '; ! } ! } ! echo '</ul>'; ! ! echo '</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 class=\"right\">[ <b><a href=\"$BasePath/news/index.php?show=all\">More News</a></b> ]</div>"); ! } ! } ! echo(" </td></tr></table>"); ! ! include($Footer); ! ?> |