[ Index ] |
PHP Cross Reference of phpwcms V1.4.7 _r403 (01.11.10) |
[Summary view] [Print] [Text view]
1 <?php 2 /************************************************************************************* 3 Copyright notice 4 5 (c) 2002-2010 Oliver Georgi (oliver@phpwcms.de) // All rights reserved. 6 7 This script is part of PHPWCMS. The PHPWCMS web content management system is 8 free software; you can redistribute it and/or modify it under the terms of 9 the GNU General Public License as published by the Free Software Foundation; 10 either version 2 of the License, or (at your option) any later version. 11 12 The GNU General Public License can be found at http://www.gnu.org/copyleft/gpl.html 13 A copy is found in the textfile GPL.txt and important notices to the license 14 from the author is found in LICENSE.txt distributed with these scripts. 15 16 This script is distributed in the hope that it will be useful, but WITHOUT ANY 17 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 18 PARTICULAR PURPOSE. See the GNU General Public License for more details. 19 20 This copyright notice MUST APPEAR in all copies of the script! 21 *************************************************************************************/ 22 23 // session_name('hashID'); 24 session_start(); 25 26 $phpwcms = array(); 27 require_once ('config/phpwcms/conf.inc.php'); 28 29 if(empty($_SESSION["wcs_user_lang"])) { 30 session_destroy(); 31 headerRedirect($phpwcms['site'].$phpwcms["root"]); 32 33 } else { 34 require ('include/inc_lang/backend/en/lang.ext.inc.php'); 35 $cust_lang = 'include/inc_lang/backend/'.substr($_SESSION["wcs_user_lang"],0,2).'/lang.ext.inc.php'; 36 if(is_file($cust_lang)) include($cust_lang); 37 } 38 require_once ('include/inc_lib/default.inc.php'); 39 require_once (PHPWCMS_ROOT.'/include/inc_lib/dbcon.inc.php'); 40 41 require_once ("include/inc_lib/general.inc.php"); 42 checkLogin(); 43 require_once ("include/inc_lib/backend.functions.inc.php"); 44 require_once ("include/inc_lib/imagick.convert.inc.php"); 45 require_once ("include/inc_lib/autolink.inc.php"); 46 47 $file_id = (isset($_GET["fid"])) ? intval($_GET["fid"]) : 0; 48 $public = (isset($_GET["public"])) ? true : false; 49 50 if($file_id) { 51 52 $file_key = get_list_of_file_keywords(); 53 54 if($public) { 55 //public file 56 $sql = "SELECT * FROM ".DB_PREPEND."phpwcms_file WHERE f_id=".$file_id." ". 57 "AND f_kid=1 AND f_trash=0 AND (f_public=1 OR ". 58 "f_uid=".$_SESSION["wcs_user_id"].") AND f_aktiv=1 LIMIT 1"; 59 } else { 60 //private file 61 $sql = "SELECT * FROM ".DB_PREPEND."phpwcms_file WHERE f_id=".$file_id. 62 " AND f_kid=1 AND (f_trash=0 OR f_trash=1) AND f_uid=".$_SESSION["wcs_user_id"]." LIMIT 1"; 63 } 64 if($result = mysql_query($sql, $db) or die("error")) { 65 if($row = mysql_fetch_assoc($result)) { 66 $filename = html_specialchars($row["f_name"]); 67 68 69 $thumb_image = get_cached_image( 70 array( "target_ext" => $row["f_ext"], 71 "image_name" => $row["f_hash"] . '.' . $row["f_ext"], 72 "thumb_name" => md5($row["f_hash"].'538538'.$phpwcms["sharpen_level"]), 73 "max_width" => 538, 74 "max_height" => 538 75 ) 76 ); 77 78 ?> 79 <html> 80 <head> 81 <title><?php echo $BL['FILEINFO_TITLE'] ?></title> 82 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo PHPWCMS_CHARSET ?>"> 83 <meta http-equiv="Expires" content="0"> 84 <meta http-equiv="Pragma" content="no-cache"> 85 <meta http-equiv="cache-control" content="no-cache"> 86 <meta name="robots" content="noindex, nofollow"> 87 <script src="include/inc_js/phpwcms.js" type="text/JavaScript"></script> 88 <?php 89 echo '<script type="text/javascript"> 90 function ResizeAndCenter(){ 91 var width = 590; 92 '; 93 if($thumb_image != false) { 94 echo ' 95 var height = screen.availHeight; 96 if(height < 490) { 97 height=420; 98 } else { 99 height=570; 100 } 101 '; 102 } else { 103 echo ' var height = 300;'; 104 } 105 106 echo ' 107 window.moveTo(5,5); 108 window.resizeTo(width,height); 109 } 110 </script> 111 '; 112 113 ?> 114 <link href="include/inc_css/phpwcms.css" rel="stylesheet" type="text/css" /> 115 </head> 116 117 <body text="#000000" link="#000000" vlink="#000000" alink="#000000" onLoad="ResizeAndCenter();"> 118 <table width="558" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#C1D2E2" summary=""> 119 <tr bgcolor="#C1D2E2"><td colspan="4"><img src="img/leer.gif" alt="" width="1" height="8"></td></tr> 120 <tr bgcolor="#C1D2E2"> 121 <td width="10"><img src="img/leer.gif" alt="" width="10" height="1"></td> 122 <td width="20"><img src='img/icons/small_<?php echo extimg($row["f_ext"]) ?>' alt="" border=0></td> 123 <td width="518" class="h14b"><strong><?php echo $filename ?></strong></td> 124 <td width="10"><img src="img/leer.gif" alt="" width="10" height="1"></td> 125 </tr> 126 <tr bgcolor="#C1D2E2"><td colspan="4"><img src="img/leer.gif" alt="" width="10" height="6"></td></tr> 127 <tr bgcolor="#363E57"><td colspan="4"><img src="img/leer.gif" alt="" width="1" height="1"></td></tr> 128 <tr><td colspan="4" bgcolor="#F5F8F9"><img src="img/leer.gif" alt="" width="1" height="5"></td></tr> 129 <tr> 130 <td bgcolor="#F5F8F9"><img src="img/leer.gif" alt="" width="1" height="1"></td> 131 <td bgcolor="#F5F8F9"><img src="img/leer.gif" alt="" width="1" height="1"></td> 132 <td bgcolor="#F5F8F9"><table width="518" border="0" cellpadding="0" cellspacing="0" summary=""> 133 <tr> 134 <td width="422" class="v10"><?php echo $BL['CREATED'] ?>: <strong><?php echo date($BL['DATE_FORMAT'], intval($row["f_created"])) ?></strong> <?php echo $BL['SIZE'] ?>: <strong><?php echo fsizelong($row["f_size"]) ?></strong></td> 135 <td width="96" align="right"><?php 136 if(!$row["f_trash"]) { 137 ?><a href="include/inc_act/act_download.php?dl=<?php 138 139 echo $row["f_id"]; 140 //download public file too 141 if($public) echo '&pl=1'; 142 143 ?>" target="_blank" title="<?php echo $BL['DOWNLOAD_FILE'].": ".$filename ?>"><img src="img/button/download_disc_large.gif" alt="" width="61" height="13" border="0"></a><?php 144 } else { 145 echo "<img src=\"img/button/file_in_trash.gif\" width=\"61\" height=\"13\" border=\"0\" title=\"".$BL['FILE_IN_TRASH']."\">"; 146 } 147 ?><img src="img/leer.gif" alt="" width="9" height="1"><img src="img/button/aktiv_12x13_<?php echo $row["f_aktiv"] ?>.gif" alt="" width="12" height="13"><img src="img/button/public_12x13_<?php echo $row["f_public"] ?>.gif" alt="" width="12" height="13"></td> 148 </tr> 149 </table></td> 150 <td bgcolor="#F5F8F9"><img src="img/leer.gif" alt="" width="1" height="1"></td> 151 </tr> 152 <tr><td colspan="4" bgcolor="#F5F8F9"><img src="img/leer.gif" alt="" width="1" height="5"></td></tr> 153 <tr><td colspan="4" bgcolor="#CDDEE4"><img src="img/leer.gif" alt="" width="1" height="1"></td></tr> 154 <tr><td colspan="4"><img src="img/leer.gif" alt="" width="1" height="5"></td></tr> 155 <tr> 156 <td><img src="img/leer.gif" alt="" width="1" height="5"></td> 157 <td><img src="img/leer.gif" alt="" width="1" height="5"></td> 158 <td class="v10"><?php echo $BL['KEYWORDS'].": ".html_specialchars($row["f_shortinfo"].add_keywords_to_search ($file_key, $row["f_keywords"])) ?></td> 159 <td><img src="img/leer.gif" alt="" width="1" height="5"></td> 160 </tr> 161 <tr><td colspan="4"><img src="img/leer.gif" alt="" width="1" height="5"></td></tr> 162 <?php 163 164 if($thumb_image != false) { 165 ?> 166 <tr><td colspan="4" bgcolor="#CDDEE4"><img src="img/leer.gif" alt="" width="1" height="1"></td></tr> 167 <tr><td colspan="4" bgcolor="#F5F8F9"><img src="img/leer.gif" alt="" width="1" height="5"></td></tr> 168 <tr> 169 <td bgcolor="#F5F8F9"><img src="img/leer.gif" alt="" width="1" height="1"></td> 170 <td colspan="2" align="center" bgcolor="#F5F8F9"><?php 171 172 echo '<img src="'.PHPWCMS_IMAGES . $thumb_image[0] .'" border="0" '.$thumb_image[3].'>'; 173 174 ?></td> 175 <td bgcolor="#F5F8F9"><img src="img/leer.gif" alt="" width="1" height="5"></td> 176 </tr> 177 <tr><td colspan="4" bgcolor="#F5F8F9"><img src="img/leer.gif" alt="" width="1" height="5"></td></tr> 178 <?php 179 } 180 if($row["f_longinfo"]) { 181 ?> 182 <tr><td colspan="4" bgcolor="#CDDEE4"><img src="img/leer.gif" alt="" width="1" height="1"></td></tr> 183 <tr><td colspan="4"><img src="img/leer.gif" alt="" width="1" height="5"></td></tr> 184 <tr> 185 <td><img src="img/leer.gif" alt="" width="1" height="5"></td> 186 <td><img src="img/leer.gif" alt="" width="1" height="5"></td> 187 <td class="v10"><?php echo nl2br(auto_link(html_specialchars($row["f_longinfo"]))) ?></td> 188 <td><img src="img/leer.gif" alt="" width="1" height="5"></td> 189 </tr> 190 <tr><td colspan="4"><img src="img/leer.gif" alt="" width="1" height="5"></td></tr> 191 <?php } ?> 192 <tr><td colspan="4" bgcolor="#CDDEE4"><img src="img/leer.gif" alt="" width="1" height="1"></td></tr> 193 <tr bgcolor="#EBF2F4"> 194 <td><img src="img/leer.gif" alt="" width="10" height="10"></td> 195 <td><img src="img/leer.gif" alt="" width="20" height="1"></td> 196 <td><img src="img/leer.gif" alt="" width="518" height="1"></td> 197 <td><img src="img/leer.gif" alt="" width="10" height="10"></td> 198 </tr> 199 </table> 200 </body> 201 </html> 202 <?php 203 } else { 204 $fehler = 1; 205 } 206 } else { 207 $fehler = 1; 208 } 209 } else { 210 $fehler = 1; 211 } 212 213 if(isset($fehler)) { 214 echo $BL['DOWNLOAD_ERR3']; 215 } 216 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Tue Nov 16 22:51:00 2010 | Cross-referenced by PHPXref 0.7 |