[Openfirst-cvscommit] members adduser.php,1.6,1.7 divisions.php,1.5,1.6 index.php,1.10,1.11 links.ph
Brought to you by:
xtimg
Update of /cvsroot/openfirst/members In directory sc8-pr-cvs1:/tmp/cvs-serv30919 Modified Files: adduser.php divisions.php index.php links.php logout.php profile.php skills.php updateprofile.php web.php workspace.php Log Message: Replace include() with include_once() where appropriate Index: adduser.php =================================================================== RCS file: /cvsroot/openfirst/members/adduser.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** adduser.php 9 Nov 2003 02:51:32 -0000 1.6 --- adduser.php 23 Nov 2003 19:07:28 -0000 1.7 *************** *** 27,32 **** */ // Include system globals and headers ! include("../config/globals.php"); ! include($header); // Check if member registering is an administrator --- 27,32 ---- */ // Include system globals and headers ! include_once("../config/globals.php"); ! include_once($header); // Check if member registering is an administrator *************** *** 183,185 **** showlogin(); } ! include($footer); ?> --- 183,185 ---- showlogin(); } ! include_once($footer); ?> Index: divisions.php =================================================================== RCS file: /cvsroot/openfirst/members/divisions.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** divisions.php 9 Nov 2003 02:51:32 -0000 1.5 --- divisions.php 23 Nov 2003 19:07:28 -0000 1.6 *************** *** 27,32 **** */ // Include system globals and headers ! include("../config/globals.php"); ! include($header); ?> <h1>Team Divisions/Groups</h1> --- 27,32 ---- */ // Include system globals and headers ! include_once("../config/globals.php"); ! include_once($header); ?> <h1>Team Divisions/Groups</h1> *************** *** 75,77 **** ?> </table><br> ! <?php include($footer); ?> --- 75,77 ---- ?> </table><br> ! <?php include_once($footer); ?> Index: index.php =================================================================== RCS file: /cvsroot/openfirst/members/index.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** index.php 23 Nov 2003 15:45:30 -0000 1.10 --- index.php 23 Nov 2003 19:07:28 -0000 1.11 *************** *** 26,31 **** * */ ! include("../config/globals.php"); ! include($header); if(isset($user->user)) { --- 26,31 ---- * */ ! include_once("../config/globals.php"); ! include_once($header); if(isset($user->user)) { *************** *** 53,55 **** showlogin(); } ! include($footer); ?> --- 53,55 ---- showlogin(); } ! include_once($footer); ?> Index: links.php =================================================================== RCS file: /cvsroot/openfirst/members/links.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** links.php 23 Aug 2003 20:31:16 -0000 1.2 --- links.php 23 Nov 2003 19:07:28 -0000 1.3 *************** *** 26,31 **** * */ ! include("../config/globals.php"); ! include($header); if (isset($_POST["ncategory"]) == true && isset($user->user) == true && $_POST["ncategory"] != "") { --- 26,31 ---- * */ ! include_once("../config/globals.php"); ! include_once($header); if (isset($_POST["ncategory"]) == true && isset($user->user) == true && $_POST["ncategory"] != "") { *************** *** 88,90 **** showlogin(); } ! include($footer); ?> --- 88,90 ---- showlogin(); } ! include_once($footer); ?> Index: logout.php =================================================================== RCS file: /cvsroot/openfirst/members/logout.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** logout.php 15 Oct 2003 00:16:02 -0000 1.6 --- logout.php 23 Nov 2003 19:07:28 -0000 1.7 *************** *** 26,31 **** * */ ! include("../config/globals.php"); ! include($header); if(isset($user->user)) { --- 26,31 ---- * */ ! include_once("../config/globals.php"); ! include_once($header); if(isset($user->user)) { *************** *** 37,39 **** showlogin(); } ! include($footer); ?> --- 37,39 ---- showlogin(); } ! include_once($footer); ?> Index: profile.php =================================================================== RCS file: /cvsroot/openfirst/members/profile.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** profile.php 23 Nov 2003 19:04:04 -0000 1.19 --- profile.php 23 Nov 2003 19:07:28 -0000 1.20 *************** *** 27,32 **** */ // Include system globals and headers ! include("../config/globals.php"); ! include($header); ?> <h1>Members Profiles</h1> --- 27,32 ---- */ // Include system globals and headers ! include_once("../config/globals.php"); ! include_once($header); ?> <h1>Members Profiles</h1> *************** *** 267,270 **** } } ! include($footer); ?> --- 267,270 ---- } } ! include_once($footer); ?> Index: skills.php =================================================================== RCS file: /cvsroot/openfirst/members/skills.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** skills.php 23 Aug 2003 20:31:16 -0000 1.3 --- skills.php 23 Nov 2003 19:07:28 -0000 1.4 *************** *** 26,31 **** * */ ! include("../config/globals.php"); ! include($header); if(isset($user->user)) { --- 26,31 ---- * */ ! include_once("../config/globals.php"); ! include_once($header); if(isset($user->user)) { *************** *** 149,151 **** showlogin(); } ! include($footer); ?> --- 149,151 ---- showlogin(); } ! include_once($footer); ?> Index: updateprofile.php =================================================================== RCS file: /cvsroot/openfirst/members/updateprofile.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** updateprofile.php 22 Nov 2003 11:25:13 -0000 1.9 --- updateprofile.php 23 Nov 2003 19:07:28 -0000 1.10 *************** *** 27,32 **** */ // Include system globals and headers ! include("../config/globals.php"); ! include($header); // Check if user is a member --- 27,32 ---- */ // Include system globals and headers ! include_once("../config/globals.php"); ! include_once($header); // Check if user is a member *************** *** 189,192 **** </form> <?php ! include($footer); ?> --- 189,192 ---- </form> <?php ! include_once($footer); ?> Index: web.php =================================================================== RCS file: /cvsroot/openfirst/members/web.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** web.php 23 Aug 2003 20:31:16 -0000 1.2 --- web.php 23 Nov 2003 19:07:28 -0000 1.3 *************** *** 26,30 **** * */ ! include("../config/globals.php"); echo("<p><strong>Disclaimer:</strong> This page is not maintained by the administration of the rest of the site. The opinions and views expressed here are those of the author and are not necessarily the views and opinions of the administration.</p>"); --- 26,30 ---- * */ ! include_once("../config/globals.php"); echo("<p><strong>Disclaimer:</strong> This page is not maintained by the administration of the rest of the site. The opinions and views expressed here are those of the author and are not necessarily the views and opinions of the administration.</p>"); Index: workspace.php =================================================================== RCS file: /cvsroot/openfirst/members/workspace.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** workspace.php 26 Oct 2003 04:20:01 -0000 1.12 --- workspace.php 23 Nov 2003 19:07:28 -0000 1.13 *************** *** 26,30 **** * */ ! include("../config/globals.php"); --- 26,30 ---- * */ ! include_once("../config/globals.php"); *************** *** 54,58 **** } } else { ! include($header); } --- 54,58 ---- } } else { ! include_once($header); } *************** *** 77,85 **** fputs($fi, $_POST["newdata"]); fclose($fi); ! die(include($footer)); } elseif (isset($_POST["action"]) == true && $_POST["action"] == "setperm") { ofirst_dbquery("UPDATE ofirst_workspace_files SET permissions='" . $_POST["userperm"] . $_POST["groupperm"] . $_POST["otherperm"] . "' WHERE name='" . $_POST["file"] . "' AND owner='" . $_POST["owner"] . "' AND location='" . $_POST["filepath"] . "';"); echo("Permissions on file "" . $_POST["file"] . "" have been modified. [ <a href='workspace.php'>Return to workspace</a> ]"); ! die(include($footer)); } if(isset($_POST["action"]) == true && $_POST["action"] == "makedirectory") { --- 77,85 ---- fputs($fi, $_POST["newdata"]); fclose($fi); ! die(include_once($footer)); } elseif (isset($_POST["action"]) == true && $_POST["action"] == "setperm") { ofirst_dbquery("UPDATE ofirst_workspace_files SET permissions='" . $_POST["userperm"] . $_POST["groupperm"] . $_POST["otherperm"] . "' WHERE name='" . $_POST["file"] . "' AND owner='" . $_POST["owner"] . "' AND location='" . $_POST["filepath"] . "';"); echo("Permissions on file "" . $_POST["file"] . "" have been modified. [ <a href='workspace.php'>Return to workspace</a> ]"); ! die(include_once($footer)); } if(isset($_POST["action"]) == true && $_POST["action"] == "makedirectory") { *************** *** 88,92 **** echo("Sub directory Created [<a href='workspace.php?filepath=$filepath'>Return to Workspace</a> ]"); ! die(include($footer)); } --- 88,92 ---- echo("Sub directory Created [<a href='workspace.php?filepath=$filepath'>Return to Workspace</a> ]"); ! die(include_once($footer)); } *************** *** 95,107 **** if($_GET["action"] == "delete" && isset($_GET["confirmed"]) == false && $_GET["owner"] == $user->user) { echo("Are you sure you want to delete "" . $_GET["file"] . "" in the " . $_GET["filepath"] . " directory?<br><a href='workspace.php?confirmed=true&file=" . $_GET["file"] . "&action=delete&filepath=" . $_GET["filepath"] . "'>Yes, I'm sure</a> <a href='workspace.php'>No, I've changed my mind</a>"); ! die(include($footer)); } elseif($_GET["action"] == "delete" && isset($_GET["confirmed"]) == true) { $del = ofirst_dbquery("DELETE FROM ofirst_workspace_files WHERE name='" . $_GET["file"] . "' AND owner='$user->user' AND location='" . $_GET["filepath"] . "';"); unlink($ws->virtfspath . "/" . $_GET["file"]); echo("The file <strong>"" . $_GET["file"] . ""</strong> has been deleted. [ <a href='workspace.php'>Workspace</a> ]"); ! die(include($footer)); } elseif($_GET["action"] == "delete" && $_GET["owner"] != $user->user && isset($_GET["owner"]) == true) { echo("You cannot delete files which you do not own. [ <a href='workspace.php'>Return to workspace</a> ]"); ! die(include($footer)); } // Handle directory deletion --- 95,107 ---- if($_GET["action"] == "delete" && isset($_GET["confirmed"]) == false && $_GET["owner"] == $user->user) { echo("Are you sure you want to delete "" . $_GET["file"] . "" in the " . $_GET["filepath"] . " directory?<br><a href='workspace.php?confirmed=true&file=" . $_GET["file"] . "&action=delete&filepath=" . $_GET["filepath"] . "'>Yes, I'm sure</a> <a href='workspace.php'>No, I've changed my mind</a>"); ! die(include_once($footer)); } elseif($_GET["action"] == "delete" && isset($_GET["confirmed"]) == true) { $del = ofirst_dbquery("DELETE FROM ofirst_workspace_files WHERE name='" . $_GET["file"] . "' AND owner='$user->user' AND location='" . $_GET["filepath"] . "';"); unlink($ws->virtfspath . "/" . $_GET["file"]); echo("The file <strong>"" . $_GET["file"] . ""</strong> has been deleted. [ <a href='workspace.php'>Workspace</a> ]"); ! die(include_once($footer)); } elseif($_GET["action"] == "delete" && $_GET["owner"] != $user->user && isset($_GET["owner"]) == true) { echo("You cannot delete files which you do not own. [ <a href='workspace.php'>Return to workspace</a> ]"); ! die(include_once($footer)); } // Handle directory deletion *************** *** 130,134 **** } echo("The sub directory <strong>"" . $_GET["directory"] . ""</strong> has been deleted. [ <a href='workspace.php'>Workspace</a> ]"); ! die(include($footer)); } elseif($_GET["action"] == "removedirectory" && isset($_GET["confirmed"]) == false) { echo("Are you sure you want to delete "" . $_GET["directory"] . "" in the " . $_GET["filepath"] . " directory? This <strong>will also remove all --- 130,134 ---- } echo("The sub directory <strong>"" . $_GET["directory"] . ""</strong> has been deleted. [ <a href='workspace.php'>Workspace</a> ]"); ! die(include_once($footer)); } elseif($_GET["action"] == "removedirectory" && isset($_GET["confirmed"]) == false) { echo("Are you sure you want to delete "" . $_GET["directory"] . "" in the " . $_GET["filepath"] . " directory? This <strong>will also remove all *************** *** 136,140 **** <br><a href='workspace.php?confirmed=true&directory=" . $_GET["directory"] . "&action=removedirectory&filepath=" . $_GET["filepath"] . "'>Yes, I'm sure</a> <a href='workspace.php'>No, I've changed my mind</a>"); ! die(include($footer)); } --- 136,140 ---- <br><a href='workspace.php?confirmed=true&directory=" . $_GET["directory"] . "&action=removedirectory&filepath=" . $_GET["filepath"] . "'>Yes, I'm sure</a> <a href='workspace.php'>No, I've changed my mind</a>"); ! die(include_once($footer)); } *************** *** 225,229 **** </table>"); echo("<p>[ <a href='workspace.php'>Return to workspace</a> ]</p>"); ! die(include($footer)); } --- 225,229 ---- </table>"); echo("<p>[ <a href='workspace.php'>Return to workspace</a> ]</p>"); ! die(include_once($footer)); } *************** *** 253,257 **** <tr><th>Description</th><td>$fi->description</td></tr> </table><p><a href='workspace.php?view=true&" . $_SERVER["QUERY_STRING"] . "'>Proceed to view this file</a> | <a href='workspace.php'>Return to workspace</a></p>"); ! die(include($footer)); } } --- 253,257 ---- <tr><th>Description</th><td>$fi->description</td></tr> </table><p><a href='workspace.php?view=true&" . $_SERVER["QUERY_STRING"] . "'>Proceed to view this file</a> | <a href='workspace.php'>Return to workspace</a></p>"); ! die(include_once($footer)); } } *************** *** 268,272 **** $uf = ofirst_dbquery("INSERT INTO ofirst_workspace_files (size, location, owner, division, permissions, date, description, filetype, name) VALUES('" .( filesize("$ws->virtfspath/" . $_POST["filepath"] . "/$name") / 1024). "', '" . $_POST["filepath"] . "', '$user->user', '" . $_POST["division"] . "', '" . $_POST["userperm"] . $_POST["groupperm"] . $_POST["otherperm"] . "', '" . date('D M d Y h:m:s') . "', '" . $_POST["description"] . "', '" . strtolower(substr($name, strrpos($name, ".") +1)) . "', '$name');"); echo("File "$name" has been uploaded successfully. [ <a href='workspace.php'>Workspace</a> | <a href='workspace.php?file=$name&action=view&filepath=" . $_POST["filepath"] ."'>View</a> ]"); ! die(include($footer)); } ?> --- 268,272 ---- $uf = ofirst_dbquery("INSERT INTO ofirst_workspace_files (size, location, owner, division, permissions, date, description, filetype, name) VALUES('" .( filesize("$ws->virtfspath/" . $_POST["filepath"] . "/$name") / 1024). "', '" . $_POST["filepath"] . "', '$user->user', '" . $_POST["division"] . "', '" . $_POST["userperm"] . $_POST["groupperm"] . $_POST["otherperm"] . "', '" . date('D M d Y h:m:s') . "', '" . $_POST["description"] . "', '" . strtolower(substr($name, strrpos($name, ".") +1)) . "', '$name');"); echo("File "$name" has been uploaded successfully. [ <a href='workspace.php'>Workspace</a> | <a href='workspace.php?file=$name&action=view&filepath=" . $_POST["filepath"] ."'>View</a> ]"); ! die(include_once($footer)); } ?> *************** *** 485,487 **** showlogin(); } ! include($footer); ?> --- 485,487 ---- showlogin(); } ! include_once($footer); ?> |