[ Index ] |
PHP Cross Reference of phpwcms V1.4.3 _r380 (23.11.09) |
[Summary view] [Print] [Text view]
1 <?php 2 /************************************************************************************* 3 Copyright notice 4 5 (c) 2002-2009 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 /** 24 * Sept. 2009 25 * enhancement to enable phpwcms filebrowser support in FCK Editor 26 * based on concept and work of Markus Köhl <www.pagewerkstatt.ch> 27 */ 28 29 session_start(); 30 31 $phpwcms = array(); 32 $phpwcms_root = dirname(__FILE__); 33 $js_files_all = array(); 34 $js_files_select = array(); 35 36 require($phpwcms_root.'/config/phpwcms/conf.inc.php'); 37 require ($phpwcms_root.'/include/inc_lib/default.inc.php'); 38 39 if( empty($_SESSION["wcs_user_lang"]) ) { 40 41 session_destroy(); 42 headerRedirect( PHPWCMS_URL ); 43 44 } else { 45 46 require (PHPWCMS_ROOT.'/include/inc_lang/backend/en/lang.ext.inc.php'); 47 $cust_lang = PHPWCMS_ROOT.'/include/inc_lang/backend/' . strtolower(substr($_SESSION["wcs_user_lang"], 0, 2)) . '/lang.ext.inc.php'; 48 if(is_file($cust_lang)) { 49 include($cust_lang); 50 } 51 52 } 53 54 // set target for article summary/list image 55 if(isset($_GET['target'])) { 56 57 switch($_GET['target']) { 58 59 case 'list': $_SESSION['filebrowser_image_target'] = '_list_'; 60 break; 61 62 default: $_SESSION['filebrowser_image_target'] = '_'; 63 } 64 65 } elseif(empty($_SESSION['filebrowser_image_target'])) { 66 67 $_SESSION['filebrowser_image_target'] = '_'; 68 69 } 70 71 if(isset($_GET['entry_id'])) { 72 $_SESSION['filebrowser_image_entry_id'] = preg_replace('/[^a-z0-9_]/', '', $_GET['entry_id']); 73 } 74 75 require_once (PHPWCMS_ROOT.'/include/inc_lib/dbcon.inc.php'); 76 require_once (PHPWCMS_ROOT.'/include/inc_lib/general.inc.php'); 77 78 checkLogin(); 79 80 require_once (PHPWCMS_ROOT.'/include/inc_lib/backend.functions.inc.php'); 81 require_once (PHPWCMS_ROOT.'/include/inc_lib/imagick.convert.inc.php'); 82 83 $js_aktion = (isset($_GET["opt"])) ? intval($_GET["opt"]) : 0; 84 85 switch($js_aktion) { 86 87 case 0: 88 case 1: 89 case 3: 90 case 7: 91 case 8: 92 case 5: 93 case 11: $titel = $BL['IMAGE_TITLE']; 94 $filetype = $BL['IMAGE_FILES']; 95 break; 96 97 case 4: 98 case 9: 99 case 10: $titel = $BL['FILE_TITLE']; 100 $filetype = $BL['FILES']; 101 break; 102 103 case 2: 104 case 6: $titel = $BL['MEDIA_TITLE']; 105 $filetype = $BL['MEDIA_FILES']; 106 break; 107 108 } 109 110 if(isset($folder)) unset($folder); 111 if(isset($_SESSION["folder"])) $folder = $_SESSION["folder"]; 112 if(isset($_GET["folder"])) { 113 list($folder_id, $folder_value) = explode('|', $_GET["folder"]); 114 $folder[$folder_id] = intval($folder_value); 115 $_SESSION["folder"] = $folder; //Rückgabe des Aktuellen Array mit Aufolderwerten in die Session 116 } 117 $_SESSION["list_zaehler"] = 0; //Zähler für die Public-Listenfunktion setzen 118 119 //Checken, welcher Ordner aktiv 120 if(isset($_GET["files"])) { 121 122 $_SESSION["imgdir"] = intval($_GET["files"]); 123 124 } elseif(!isset($_SESSION["imgdir"])) { 125 126 $_SESSION["imgdir"] = 0; 127 128 } else { 129 130 $_SESSION["imgdir"] = intval($_SESSION["imgdir"]); 131 132 } 133 134 //Feststellen, ob überhaupt Dateien/Ordner des Users vorhanden sind 135 $sql = "SELECT COUNT(f_id) FROM ".DB_PREPEND."phpwcms_file WHERE f_public=1 AND f_aktiv=1 AND f_trash=0 LIMIT 1"; 136 //"f_uid=".$_SESSION["wcs_user_id"]." AND f_trash=0 LIMIT 1;"; 137 if($result = mysql_query($sql, $db) or die ("error while counting private files")) { 138 if($row = mysql_fetch_row($result)) $count_user_files = $row[0]; 139 mysql_free_result($result); 140 } 141 142 ?> 143 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 144 <html xmlns="http://www.w3.org/1999/xhtml"> 145 <head> 146 147 <title><?php echo $titel ?></title> 148 149 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 150 <meta http-equiv="Expires" content="0" /> 151 <meta http-equiv="Pragma" content="no-cache" /> 152 <meta http-equiv="cache-control" content="no-cache" /> 153 <script src="include/inc_js/phpwcms.js" type="text/javascript"></script> 154 <script src="include/inc_js/filebrowser.js" type="text/javascript"></script> 155 <link href="include/inc_css/phpwcms.css" rel="stylesheet" type="text/css" /> 156 <style type="text/css">body{margin:5px;}</style> 157 158 </head> 159 160 <body> 161 <table summary="" border="0" cellspacing="0" cellpadding="0"> 162 <tr> 163 <td bgcolor="#7C98A2"><img src="img/leer.gif" alt="" width="1" height="1" border="0" /></td> 164 <td rowspan="4"><img src="img/leer.gif" alt="" width="5" height="1" border="0" /></td> 165 <td bgcolor="#7C98A2"><img src="img/leer.gif" alt="" width="1" height="1" border="0" /></td> 166 </tr> 167 <tr> 168 <td bgcolor="#7C98A2" class="msgreiter"> <?php echo $BL['FOLDER_LIST'] ?> </td> 169 <td bgcolor="#7C98A2" class="msgreiter"> <?php echo $filetype ?> </td> 170 </tr> 171 <tr> 172 <td bgcolor="#7C98A2"><img src="img/leer.gif" alt="" width="1" height="1" border="0" /></td> 173 <td bgcolor="#7C98A2"><img src="img/leer.gif" alt="" width="1" height="1" border="0" /></td> 174 </tr> 175 <tr> 176 <td valign="top"><?php 177 178 if(isset($count_user_files) && $count_user_files) { //Wenn überhaupt Public-Dateien vorhanden, dann Listing 179 180 echo '<table summary="" bgColor="#FCFDFD" border="0" cellspacing="0" cellpadding="0">'."\n"; 181 182 //Anzeige des Festplattensymbols 183 $dirname = $BL['ROOT_DIR']; 184 if(!isset($folder[0])) { 185 $folder[0] = 0; 186 } 187 $folder_status = true_false($folder[0]); 188 $count_sql = "SELECT COUNT(f_id) FROM ".DB_PREPEND."phpwcms_file WHERE f_pid=0 AND f_public=1 AND f_aktiv=1 AND f_trash=0 LIMIT 1"; 189 190 if($count_result = mysql_query($count_sql, $db)) { 191 if($count_row = mysql_fetch_row($count_result)) { 192 $count = '<img src="img/leer.gif" height="1" width="2" alt="" border="0" /><a href="filebrowser.php?opt='.$js_aktion.'&folder=0'. 193 '%7C'.$folder_status.'">'.on_off($folder_status, $dirname, 0).'</a>'; 194 $count_wert = $count_row[0]; 195 } 196 mysql_free_result($count_result); 197 } 198 199 // define current directory name 200 $current_dirname = $dirname; 201 202 $dirname = "<a href=\"filebrowser.php?opt=".$js_aktion."&files=0\" title=\"".$BL['SHOW_FILES']."\">".$dirname."</a>"; 203 $bgcol = (isset($row["f_id"]) && $row["f_id"] == $_SESSION["imgdir"]) ? ' bgcolor="#FED83F"' : ''; 204 205 echo '<tr'.$bgcol.'><td colspan="2"><img src="img/leer.gif" height="2" width="1" border="0" alt="" /></td></tr>'.LF; //Abstand vor 206 echo '<tr'.$bgcol.'><td class="msglist" nowrap="nowrap">'; 207 echo $count.'<img src="img/leer.gif" height="1" width="4" border="0" alt="" /><img src="img/icons/harddisk_16x11.gif" border="0" alt="" />'; //Zellinhalt 1. Spalte 208 echo '<img src="img/leer.gif" height="1" width="4" alt="" border="0" />'.$dirname.'</td><td><img src="img/leer.gif" height="1" width="5" border="0" alt="" /></td></tr>'.LF; 209 //Aufbau trennende Tabellen-Zeile 210 echo '<tr'.$bgcol.'><td colspan="2"><img src="img/leer.gif" height="1" width="1" border="0" alt="" /></td></tr>'.LF; //Abstand nach 211 echo '<tr bgcolor="#CDDEE4"><td colspan="2"><img src="img/leer.gif" height="1" width="1" border="0" alt="" /></td></tr>'.LF; 212 213 //Wenn überhaupt Ordner für User vorhanden, dann Listing 214 if(!$folder_status && $count_wert) { 215 folder_list(0, $db, 18, "filebrowser.php?opt=".$js_aktion."&"); 216 } 217 218 echo '</table>'; 219 } else { 220 echo "no files available"; 221 } 222 223 ?></td> 224 <td valign="top"><?php 225 226 //Tabelle 227 228 echo '<table summary="" bgColor="#FFFFFF" width="100%" border="0" cellspacing="0" cellpadding="0">'.LF; 229 $file_sql = "SELECT * FROM ".DB_PREPEND."phpwcms_file WHERE f_pid=".$_SESSION["imgdir"]." AND "; 230 switch($js_aktion) { 231 232 case 6: $file_sql .= "f_ext IN ('swf', 'mp3', 'flv', 'jpg', 'png', 'gif') AND "; 233 break; 234 235 case 8: $entry_id = empty($_SESSION['filebrowser_image_entry_id']) ? '' : $_SESSION['filebrowser_image_entry_id']; 236 case 7: $file_sql .= "f_ext IN ('jpg', 'png', 'gif') AND "; 237 break; 238 239 240 case 2: $default_ext = "f_ext IN ('aif', 'aiff', 'mov', 'movie', 'mp3', 'mpeg', 'mpeg4', "; 241 $default_ext .= "'mpeg2', 'wav', 'swf', 'ram', 'ra', 'wma', 'wmv', "; 242 $default_ext .= "'avi', 'au', 'midi', 'moov', 'rm', 'rpm', 'mid', 'midi')"; 243 244 if(!empty($phpwcms["multimedia_ext"])) { 245 246 $allowed_ext = convertStringToArray(strtolower($phpwcms["multimedia_ext"])); 247 if(count($allowed_ext)) { 248 $default_ext = "f_ext IN ('".implode("', '", $allowed_ext) . "')"; 249 } 250 251 } 252 253 $file_sql .= $default_ext." AND "; 254 255 break; 256 257 } 258 $file_sql .= "f_public=1 AND f_aktiv=1 "; 259 $file_sql .= "AND f_kid=1 AND f_trash=0 ORDER BY f_sort, f_name"; 260 261 if($file_result = mysql_query($file_sql, $db) or die ("error while listing files<br />".html_entities($file_sql))) { 262 $file_durchlauf = 0; 263 264 if(empty($_SESSION['image_browser_article'])) { 265 $target_form = 'articlecontent'; 266 } else { 267 $target_form = 'article'; 268 } 269 270 while($file_row = mysql_fetch_array($file_result)) { 271 $filename = html_specialchars($file_row["f_name"]); 272 273 $thumb_image = true; 274 if( $js_aktion != 2 && $js_aktion != 4 && $js_aktion != 9 && $js_aktion != 10 ) { 275 // check if file can have thumbnail - if so it can be choosen for usage 276 $thumb_image = get_cached_image( 277 array( "target_ext" => $file_row["f_ext"], 278 "image_name" => $file_row["f_hash"] . '.' . $file_row["f_ext"], 279 "thumb_name" => md5($file_row["f_hash"].$phpwcms["img_list_width"].$phpwcms["img_list_height"].$phpwcms["sharpen_level"]) 280 ) 281 ); 282 } 283 284 if($thumb_image != false || $js_aktion == 6) { 285 286 $js_files_select[$file_durchlauf] = ' [' . $file_durchlauf .', ' . $file_row["f_id"] . ', "' . $filename . '"]'; 287 $add_all = false; 288 289 switch($js_aktion) { 290 case 0: $jst = empty($_SESSION['filebrowser_image_target']) ? '_' : $_SESSION['filebrowser_image_target']; 291 292 $js = "window.opener.document.".$target_form.".cimage".$jst."name.value='".$filename."';"; 293 $js .= "window.opener.document.".$target_form.".cimage".$jst."id.value='".$file_row["f_id"]."';"; 294 break; 295 296 case 2: $js = "window.opener.document.articlecontent.cmedia_name.value='".$filename."';"; 297 $js .= "window.opener.document.articlecontent.cmedia_id.value='".$file_row["f_id"]."';"; 298 break; 299 300 case 6: $js = "window.opener.setIdName('".$file_row["f_id"]."', '".$filename."');"; 301 break; 302 303 case 7: $js = "window.opener.setImgIdName('".$file_row["f_id"]."', '".$filename."');"; 304 break; 305 306 case 8: $js = "window.opener.setImgIdName('".$entry_id."', '".$file_row["f_id"]."', '".$filename."');"; 307 break; 308 309 case 4: $js = "addFile(window.opener.document.articlecontent.cfile_list,'".$filename."','".$file_row["f_id"]."');"; 310 $js_files_all[] = $js; 311 $add_all = true; 312 break; 313 314 case 9: $js = "window.opener.addFile('".$file_row["f_id"]."', '".$filename."');"; 315 $js_files_all[] = $js; 316 $add_all = true; 317 break; 318 319 case 5: $js = "addFile(window.opener.img_field,'".$filename."','".$file_row["f_id"]."');"; 320 $js_files_all[] = $js; 321 $add_all = true; 322 break; 323 324 //mod 325 case 10: $js = "window.opener.SetUrl('download.php?f=".$file_row["f_hash"] . "&target=0');"; 326 break; 327 328 case 11: $js = "window.opener.SetUrl('image_resized.php?format=" . $file_row["f_ext"]. "&q=85&imgfile=filearchive/".$file_row["f_hash"] . '.' . $file_row["f_ext"]. "');"; 329 330 //$js = "window.opener.SetUrl('img/cmsimage.php?xxx".$phpwcms['jpg_quality']."/".$file_row["f_hash"] . '.' . $file_row["f_ext"]. "');"; 331 break; 332 333 default: $js = "addFile(window.opener.document.articlecontent.cimage_list,'".$filename."','".$file_row["f_id"]."');"; 334 $js_files_all[] = $js; 335 $add_all = true; 336 } 337 338 // show "add all files" 339 if($file_durchlauf === 0 && $add_all) { 340 341 echo ' 342 <tr id="addAllFilesLink"> 343 <td colspan="4" class="add_all_files"><a href="#" onclick="addAllFiles();return false;" title="' . $BL['ADD_ALL_FILES'] . '">' . 344 $BL['ADD_ALL_FILES'] . ' 345 <img src="img/button/add_9x9a.gif" alt="" border="0" /> 346 </a></td> 347 </tr> 348 <tr> 349 <td colspan="4" bgcolor="#CDDEE4"><img src="img/leer.gif" alt="" border="0" /></td> 350 </tr> 351 '; 352 353 } 354 355 echo '<tr><td colspan="4"><img src="img/leer.gif" width="1" height="2" border="0" alt="" /></td></tr>'.LF; 356 echo "<tr>\n<td><img src=\"img/icons/small_".extimg($file_row["f_ext"])."\" border=\"0\" alt=\"\" hspace=\"3\" vspace=\"1\" /></td>\n"; 357 358 if($js_aktion != 4 && $js_aktion != 10) { 359 echo "<td class=\"msglist\">".$filename."</td>\n<td><img src=\"img/leer.gif\" width=\"5\" height=\"1\" alt=\"\" border=\"0\" />"; 360 } else { 361 echo "<td class=\"msglist\"><a href=\"#\" onclick=\"".$js."tmt_winControl('self','close()');\">".$filename."</a></td>\n<td>"; 362 } 363 364 echo "<a href=\"#\" onclick=\"".$js."return false;\" title=\"".$BL['TAKE_IMAGE']."\">"; 365 echo "<img src=\"img/button/add_9x9a.gif\" border=\"0\" alt=\"\" hspace=\"5\" vspace=\"2\" /></a></td>\n"; 366 echo "<td><img src=\"img/leer.gif\" alt=\"\" border=\"0\" /></td>\n</tr>\n"; 367 echo "<tr><td colspan=\"4\"><img src=\"img/leer.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\" /></td></tr>\n"; 368 if(!empty($thumb_image[0]) && in_array( $js_aktion, array(0, 1, 3, 5, 6, 7, 8, 10, 11) ) ) { 369 echo "<tr><td> </td>\n<td colspan=\"3\"><a href=\"#\" onclick=\"".$js; 370 echo "tmt_winControl('self','close()');\">"; 371 echo '<img src="'.PHPWCMS_IMAGES . $thumb_image[0] .'" border="0" '.$thumb_image[3].' alt="" />'; 372 echo "</a></td>\n</tr>\n"; 373 } 374 echo "<tr><td colspan=\"4\"><img src=\"img/leer.gif\" width=\"1\" height=\"2\" alt=\"\" border=\"0\" /></td></tr>\n"; 375 echo "<tr><td colspan=\"4\" bgcolor=\"#CDDEE4\"><img src=\"img/leer.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\" /></td></tr>\n"; 376 $file_durchlauf++; 377 } 378 379 } 380 if(!$file_durchlauf) { //Abschluss der Filelisten-Tabelle 381 echo "<tr><td colspan=\"4\"><img src=\"img/leer.gif\" width=\"3\" height=\"2\" alt=\"\" border=\"0\" /></td></tr>\n"; 382 echo "<tr><td colspan=\"4\" class=\"msglist\"> ".$BL['NO_FILE']." </td></tr>\n"; 383 echo "<tr><td colspan=\"4\"><img src=\"img/leer.gif\" width=\"3\" height=\"2\" alt=\"\" border=\"0\" /></td></tr>\n"; 384 } 385 } //Ende Liste Dateien 386 387 echo "</table>"; 388 389 if( count($js_files_select) ) { 390 391 echo LF . '<script type="text/javascript">'; 392 echo LF . '<!--' . LF; 393 394 echo 'var files_all = new Array(' . LF; 395 echo implode(','.LF, $js_files_select); 396 echo LF . ' );'; 397 echo LF . 'var files_total = ' . $file_durchlauf . ';'; 398 399 echo LF . LF; 400 echo 'function addAllFiles() {'; 401 echo LF . ' '; 402 echo implode(LF . ' ', $js_files_all); 403 echo LF . ' //if(closewin == true) tmt_winControl("self","close()");'; 404 echo LF . ' getObjectById("addAllFilesLink").style.display = "none";'; 405 echo LF . ' if(confirm("' . str_replace('{VAL}', $current_dirname, $BL['ADD_ALL_CONFIRM']) . '")) tmt_winControl("self","close()");'; 406 echo LF . '}' . LF; 407 408 echo LF . '//-->'; 409 echo LF . '</script>' . LF; 410 411 412 } 413 414 ?></td> 415 </tr> 416 </table> 417 </body> 418 </html> 419 <?php 420 421 //function folder_list($pid, $dbcon, $vor, $zieldatei, $userID) { 422 function folder_list($pid, $dbcon, $vor, $zieldatei) { 423 global $current_dirname; 424 $folder = $_SESSION["folder"]; 425 $pid = intval($pid); 426 $sql = "SELECT f_id, f_name, f_aktiv, f_public FROM ".DB_PREPEND."phpwcms_file WHERE ". 427 "f_pid=".intval($pid)." AND f_public=1 AND f_aktiv=1 AND ". 428 "f_kid=0 AND f_trash=0 ORDER BY f_sort, f_name"; //"f_uid=".intval($userID)." AND ". 429 $result = mysql_query($sql, $dbcon); 430 while($row = mysql_fetch_array($result)) { 431 432 $dirname = html_specialchars($row["f_name"]); 433 434 //Ermitteln des Aufolderwertes 435 if(!isset($folder[$row["f_id"]])) $folder[$row["f_id"]] = 0; 436 $folder_status = true_false($folder[$row["f_id"]]); 437 438 //Ermitteln, ob überhaupt abhängige Dateien/Ordner existieren 439 $count_sql = "SELECT COUNT(f_id) FROM ".DB_PREPEND."phpwcms_file WHERE ". 440 "f_pid=".$row["f_id"]. 441 " AND f_public=1 AND f_aktiv=1 AND ". 442 "f_trash=0 LIMIT 1"; 443 if($count_result = mysql_query($count_sql, $dbcon)) { 444 if($count_row = mysql_fetch_row($count_result)) { 445 $count = '<img src="img/leer.gif" height="1" width="2" alt="" border="0" /><a href="'.$zieldatei."folder=".$row["f_id"]. 446 '%7C'.$folder_status.'">'.on_off($folder_status, $dirname, 0).'</a>'; 447 $count_wert = $count_row[0]; 448 } 449 mysql_free_result($count_result); 450 } 451 452 $dirname = '<a href="'.$zieldatei."files=".$row["f_id"].'" title="'.$GLOBALS['BL']['SHOW_FILES1'].'">'. $dirname . '</a>'; 453 454 if($row["f_id"] == $_SESSION["imgdir"]) { 455 $bgcol = ' bgcolor="#FED83F"'; 456 $current_dirname = $row["f_name"]; 457 } else { 458 $bgcol = ''; 459 } 460 461 //Aufbau der Zeile 462 echo "<tr".$bgcol."><td colspan=\"2\"><img src=\"img/leer.gif\" height=\"2\" width=\"1\" alt=\"\" border=\"0\" /></td></tr>\n"; //Abstand vor 463 echo "<tr".$bgcol."><td class=\"msglist\" nowrap=\"nowrap\">"; 464 echo $count."<img src=\"img/leer.gif\" height=\"1\" width=\"".($vor+6)."\" border=\"0\" alt=\"\" /><img src=\"img/icons/folder_zu.gif\" border=\"0\" alt=\"\" />"; //Zellinhalt 1. Spalte 465 echo "<img src=\"img/leer.gif\" height=\"1\" width=\"5\" alt=\"\" border=\"0\" />".$dirname."</td><td><img src=\"img/leer.gif\" height=\"1\" width=\"5\" alt=\"\" border=\"0\" /></td></tr>\n"; 466 //Aufbau trennende Tabellen-Zeile 467 echo "<tr".$bgcol."><td colspan=\"2\"><img src=\"img/leer.gif\" height=\"1\" width=\"1\" alt=\"\" border=\"0\" /></td></tr>\n"; //Abstand nach 468 echo "<tr bgcolor=\"#CDDEE4\"><td colspan=\"2\"><img src=\"img/leer.gif\" height=\"1\" width=\"1\" alt=\"\" border=\"0\" /></td></tr>\n"; //Trennlinie<img src='img/lines/line-lightgrey-dotted-538.gif'> 469 470 //Weiter, wenn Unterstruktur 471 if(!$folder_status && $count_wert) { 472 folder_list($row["f_id"], $dbcon, $vor+18, $zieldatei); //, $userID 473 } 474 475 //Zaehler mitführen 476 $_SESSION["list_zaehler"]++; 477 } 478 mysql_free_result($result); 479 } 480 481 function on_off($wert, $string, $art = 1) { 482 //Erzeugt das Status-Zeichen für Klapp-Auf/Zu 483 //Wenn Art = 1 dann als Zeichen, ansonsten als Bild 484 if($wert) { 485 if($art == 1) { 486 return "+"; 487 } else { 488 return "<img src=\"img/symbols/klapp_zu.gif\" border=\"0\" alt=\"\" title=\"".$GLOBALS['BL']['OPEN_DIR'].": ".$string."\" />"; 489 } 490 } else { 491 if($art == 1) { 492 return "-"; 493 } else { 494 return "<img src=\"img/symbols/klapp_auf.gif\" border=\"0\" alt=\"\" title=\"".$GLOBALS['BL']['CLOSE_DIR'].": ".$string."\" />"; 495 } 496 } 497 } 498 499 function true_false($wert) { 500 //Wechselt den Wahr/Falsch wert zum Gegenteil: 1=>0 und 0=>1 501 if(intval($wert)) { return 0; } else { return 1; } 502 } 503 504 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Dec 30 05:55:15 2009 | Cross-referenced by PHPXref 0.7 |