| [ PHPXref.com ] | [ Generated: Sun Jul 20 19:57:11 2008 ] | [ PHP-Update 2.7 ] |
| [ Index ] [ Variables ] [ Functions ] [ Classes ] [ Constants ] [ Statistics ] | ||
[Summary view] [Print] [Text view]
1 <? 2 extract($HTTP_POST_FILES); 3 extract($HTTP_POST_VARS); 4 extract($HTTP_GET_VARS); 5 extract($HTTP_COOKIE_VARS); 6 $adminsect = 1; 7 include "protection.php"; 8 if(file_exists("languages/$language.php")) include "languages/$language.php"; 9 else { 10 echo "<b>Critical error</b><br>Language file <i>$language</i> could not be found.<p>"; 11 exit; 12 } 13 $pagetitle = "$sitetitle $split $title_uploads"; 14 $thispagetitle = "$title_uploads"; 15 if(file_exists("../code/templates/$template}_h.php") && file_exists("../code/templates/$template}_f.php")) { 16 $tempfilename = "../code/templates/$template}_h.php"; 17 $handle = fopen($tempfilename, "r"); 18 $temp = fread($handle, filesize ($tempfilename)); 19 fclose($handle); 20 include "../code/menucode.php"; 21 include "../code/parsetemplate.php"; 22 parsetemplate($temp, $menucode, $thispagetitle, $pagetitle); 23 if($rights[7] == "1") { 24 25 echo "<b>$title_uploads</b><br><img src=\"../gfx/blank.gif\" width=1 height=6><br>"; 26 27 if(isset($userfile)) { 28 $filename = basename($_FILES['userfile']['name']); 29 30 if($_FILES['userfile']['size'] <= 0) $err = 1; 31 elseif(!@move_uploaded_file($_FILES['userfile']['tmp_name'], "../" . $_POST['filecat'] . "/$filename")) $err = 2; 32 else chmod("../" . $_POST['filecat'] . "/$filename", 0666); 33 34 if($err == 1) echo "<b>$txt_error</b><br>$txt_notfound<br><img src=\"../gfx/blank.gif\" width=1 height=6><br>$txt_home<p>"; 35 elseif($err == 2) echo "<b>$txt_error</b><br>$txt_notup<br><img src=\"../gfx/blank.gif\" width=1 height=6><br>$txt_home<p>"; 36 else echo "$txt_up<br><img src=\"../gfx/blank.gif\" width=1 height=6><br>$txt_home<p>"; 37 38 } 39 else { 40 echo "<table border=0 cellspacing=1 cellpadding=2 class=filebg><form method=\"post\" enctype=\"multipart/form-data\" action=\"uploads.php\"> 41 <tr><td class=filelist align=right>$txt_filename:</td><td class=filelist><input type=file name=userfile></td></tr> 42 <tr><td class=filelist align=right>$txt_cat:</td><td class=filelist><input type=radio name=filecat value=gfx CHECKED> gfx/ <input type=radio name=filecat value=files> files/</td></tr> 43 <tr><td colspan=2 class=filelist align=center><input type=submit value=\"$txt_upload\"></td></tr> 44 </form></table>"; 45 } 46 } 47 else echo "<b>$txt_error</b><br>$txt_norights<br><img src=\"../gfx/blank.gif\" width=1 height=6><br>$txt_home<p>"; 48 $tempfilename = "../code/templates/$template}_f.php"; 49 $handle = fopen($tempfilename, "r"); 50 $temp = fread($handle, filesize ($tempfilename)); 51 fclose($handle); 52 parsetemplate($temp, $menucode, $thispagetitle, $pagetitle); 53 } 54 else echo "<b>$txt_error</b><br>$txt_tempnofound<p>"; 55 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| [ Powered by PHPXref - Served by Debian GNU/Linux ] |