[Openfirst-cvscommit] downloads getfile.php,1.1,1.2 index.php,1.1,1.2 notfound.php,1.1,1.2
Brought to you by:
xtimg
From: <xt...@us...> - 2003-11-23 17:28:22
|
Update of /cvsroot/openfirst/downloads In directory sc8-pr-cvs1:/tmp/cvs-serv10361 Modified Files: getfile.php index.php notfound.php Log Message: Change all occurances of include() to include_once(), correct some style issues, add mssql setup script Index: getfile.php =================================================================== RCS file: /cvsroot/openfirst/downloads/getfile.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** getfile.php 7 Oct 2003 01:33:23 -0000 1.1 --- getfile.php 23 Nov 2003 17:28:19 -0000 1.2 *************** *** 26,35 **** * */ ! include("../config/globals.php"); if(isset($_GET["id"])){ $id=$_GET["id"]; ! } ! else{ header("Location: notfound.php"); } --- 26,34 ---- * */ ! include_once("../config/globals.php"); if(isset($_GET["id"])){ $id=$_GET["id"]; ! } else{ header("Location: notfound.php"); } *************** *** 38,43 **** if (ofirst_dbnum_rows($query)==0){ header("Location: notfound.php"); ! } ! else { $file = ofirst_dbfetch_object($query); --- 37,41 ---- if (ofirst_dbnum_rows($query)==0){ header("Location: notfound.php"); ! } else { $file = ofirst_dbfetch_object($query); *************** *** 46,51 **** if(ereg("location:*",$file->FileData)){ header("Location: ".substr($file->FileData,9)); ! } ! else{ header("Content-type: ".$file->mime); echo(base64_decode($file->FileData)); --- 44,48 ---- if(ereg("location:*",$file->FileData)){ header("Location: ".substr($file->FileData,9)); ! } else{ header("Content-type: ".$file->mime); echo(base64_decode($file->FileData)); Index: index.php =================================================================== RCS file: /cvsroot/openfirst/downloads/index.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** index.php 7 Oct 2003 01:33:23 -0000 1.1 --- index.php 23 Nov 2003 17:28:19 -0000 1.2 *************** *** 27,32 **** */ ! include("../config/globals.php"); ! include($header); //whether to show images --- 27,32 ---- */ ! include_once("../config/globals.php"); ! include_once($header); //whether to show images *************** *** 74,79 **** if(($images)&&($cat->Icon!="")){ echo('<img border=0 align=absmiddle src="'.$basepath."/".$cat->Icon.'"> '); ! } ! else { echo("> "); } --- 74,78 ---- if(($images)&&($cat->Icon!="")){ echo('<img border=0 align=absmiddle src="'.$basepath."/".$cat->Icon.'"> '); ! } else { echo("> "); } *************** *** 82,92 **** echo("</table>"); } ! } ! else { $query = ofirst_dbquery("SELECT * FROM ofirst_downloadcat WHERE ID='".$category."'"); if(ofirst_dbnum_rows($query)==0){ echo("<div>The specified category does not exist</div>"); ! } ! else{ $cat = ofirst_dbfetch_object($query); echo("<h1>$cat->Category</h1>"); --- 81,89 ---- echo("</table>"); } ! } else { $query = ofirst_dbquery("SELECT * FROM ofirst_downloadcat WHERE ID='".$category."'"); if(ofirst_dbnum_rows($query)==0){ echo("<div>The specified category does not exist</div>"); ! } else { $cat = ofirst_dbfetch_object($query); echo("<h1>$cat->Category</h1>"); *************** *** 148,153 **** } echo("</tr>"); ! } ! else { break; } --- 145,149 ---- } echo("</tr>"); ! } else { break; } *************** *** 188,191 **** } ! include($footer); ?> --- 184,187 ---- } ! include_once($footer); ?> Index: notfound.php =================================================================== RCS file: /cvsroot/openfirst/downloads/notfound.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** notfound.php 7 Oct 2003 01:33:23 -0000 1.1 --- notfound.php 23 Nov 2003 17:28:19 -0000 1.2 *************** *** 27,36 **** */ ! include("../config/globals.php"); ! include($header); echo("<h1>File Not Found</h1>"); echo("<p>The file you were downloading cannot be found in the system.</p><p>If you followed a link on one of the pages, please report the broken link to the webmaster.</p>"); ! include($footer); ?> --- 27,36 ---- */ ! include_once("../config/globals.php"); ! include_once($header); echo("<h1>File Not Found</h1>"); echo("<p>The file you were downloading cannot be found in the system.</p><p>If you followed a link on one of the pages, please report the broken link to the webmaster.</p>"); ! include_once($footer); ?> |