[ Index ] |
PHP Cross Reference of phpwcms V1.5.0 _r431 (28.01.12) |
[Summary view] [Print] [Text view]
1 <?php 2 /************************************************************************************* 3 Copyright notice 4 5 (c) 2002-2012 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 // obligate check for phpwcms constants 25 if (!defined('PHPWCMS_ROOT')) { 26 die("You Cannot Access This Script Directly, Have a Nice Day."); 27 } 28 // ---------------------------------------------------------------- 29 30 //Auswerten des Formulars 31 if(isset($_POST["dir_aktion"]) && intval($_POST["dir_aktion"]) == 2) { 32 $dir_id = intval($_POST["dir_id"]); 33 $dir_aktiv = empty($_POST["dir_aktiv"]) ? 0 : 1; 34 $dir_public = empty($_POST["dir_public"]) ? 0 : 1; 35 $dir_newname = clean_slweg($_POST["dir_newname"]); 36 $dir_longinfo = clean_slweg($_POST["dir_longinfo"]); 37 $dir_gallery = empty($_POST["dir_gallery"]) ? 0 : intval($_POST["dir_gallery"]); 38 $dir_sort = intval($_POST["dir_sort"]); 39 40 switch($dir_gallery) { 41 42 case 2: 43 case 3: break; 44 45 default: $dir_gallery = 0; 46 47 } 48 49 if(isEmpty($dir_newname)) $dir_error = 1; 50 //Eintragen der aktualisierten Verzeichnisinfos 51 if(!isset($dir_error)) { 52 $sql = "UPDATE ".DB_PREPEND."phpwcms_file SET ". 53 "f_name='".aporeplace($dir_newname)."', ". 54 "f_aktiv=".$dir_aktiv.", ". 55 "f_public=".$dir_public.", ". 56 "f_longinfo='".aporeplace($dir_longinfo)."', ". 57 "f_created='".time()."', ". 58 "f_gallerystatus=".$dir_gallery.", ". 59 'f_sort='.$dir_sort.' '. 60 "WHERE f_kid=0 AND f_id=".$dir_id. 61 " AND f_uid=".intval($_SESSION["wcs_user_id"]); 62 if($result = mysql_query($sql, $db) or die ("error while updating dir info")) { 63 headerRedirect(PHPWCMS_URL."phpwcms.php?do=files&f=0"); 64 } 65 } 66 67 } else { 68 69 //Editieren des Verzeichnisses 70 $dir_id = empty($_GET["editdir"]) ? 0 : intval($_GET["editdir"]); 71 72 } 73 //Ende Auswerten Formular 74 75 //Wenn ID angegeben, dann -> oder aber Root Verzeichnis 76 if($dir_id) { 77 $sql = "SELECT f_id, f_name, f_aktiv, f_public, f_longinfo, f_gallerystatus, f_sort FROM ".DB_PREPEND."phpwcms_file WHERE f_id=".$dir_id. 78 " AND f_uid=".$_SESSION["wcs_user_id"]." AND f_trash=0 AND f_kid=0 LIMIT 1"; 79 if($result = mysql_query($sql, $db) or die("error while reading folder name")) { 80 if($row = mysql_fetch_row($result)) { 81 $dir_oldname = html_specialchars($row[1]); 82 $dir_id = intval($row[0]); 83 if(empty($_POST["dir_aktion"]) || (isset($_POST["dir_aktion"]) && intval($_POST["dir_aktion"]) != 2)) { 84 $dir_newname = $dir_oldname; 85 $dir_aktiv = $row[2]; 86 $dir_public = $row[3]; 87 $dir_longinfo = $row[4]; 88 $dir_gallery = $row[5]; 89 $dir_sort = $row[6]; 90 } 91 $ja = 1; 92 } 93 } 94 } 95 96 if(!empty($ja)) { 97 98 ?> 99 <form action="phpwcms.php?do=files&f=0" method="post" name="editdir" id="editdir"> 100 <table width="538" border="0" cellpadding="0" cellspacing="0" bgcolor='#EBF2F4' summary=""> 101 <tr> 102 <td width="67" rowspan="2" valign="top"><a href="phpwcms.php?do=files&f=0"><img src="img/button/close_reiter.gif" alt="" width="45" height="12" border="0" /></a></td> 103 <td width="471"><img src="img/leer.gif" alt="" width="1" height="6" /></td> 104 </tr> 105 <tr><td class="title"><?php echo $BL['be_fpriv_edittitle'] ?></td></tr> 106 <tr><td colspan="2" valign="top"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr> 107 <tr> 108 <td width="67" align="right" class="v09"><?php echo $BL['be_fpriv_name'] ?>: </td> 109 <td class="v10"><strong><?php echo $dir_oldname ?></strong></td> 110 </tr> 111 <tr><td colspan="2" valign="top"><img src="img/leer.gif" alt="" width="1" height="6" /></td></tr> 112 <tr><td colspan="2" valign="top"><img src="img/lines/line-bluelight.gif" alt="" width="538" height="1" /></td> 113 </tr> 114 <tr><td colspan="2" valign="top"><img src="img/leer.gif" alt="" width="1" height="6" /></td></tr> 115 <?php if(isset($dir_error)) { ?> 116 <tr> 117 <td align="right" class="v09"><img src="img/leer.gif" alt="" width="1" height="1" /></td> 118 <td class="v10"><strong style="color:#FF3300;"><?php echo $BL['be_fpriv_error'] ?></strong></td> 119 </tr> 120 <tr><td colspan="2" valign="top"><img src="img/leer.gif" alt="" width="1" height="2" /></td></tr> 121 <?php } ?> 122 <tr> 123 <td align="right" class="v09"><?php echo $BL['be_fpriv_newname'] ?>: </td> 124 <td><input name="dir_newname" type="text" class="width440" id="dir_newname" value="<?php echo html_specialchars($dir_newname) ?>" size="40" maxlength="250" /></td> 125 </tr> 126 <tr><td colspan="2" valign="top"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr> 127 <tr> 128 <td align="right" valign="top" class="v09 tdtop4"><?php echo $BL['be_ftptakeover_longinfo'] ?>: </td> 129 <td valign="top"><textarea name="dir_longinfo" cols="40" rows="6" class="v12 width440" id="dir_longinfo"><?php echo html_specialchars($dir_longinfo) ?></textarea></td> 130 </tr> 131 132 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr> 133 134 <tr> 135 <td align="right" class="v09"><?php echo $BL['be_gallery'] ?>: </td> 136 <td><select name="dir_gallery" id="dir_gallery"> 137 <option value="0"<?php is_selected(0, $dir_gallery) ?>>-</option> 138 <option value="2"<?php is_selected(2, $dir_gallery) ?>><?php echo $BL['be_gallery_root'] ?></option> 139 <option value="3"<?php is_selected(3, $dir_gallery) ?>><?php echo $BL['be_gallery_directory'] ?></option> 140 </select></td> 141 </tr> 142 143 144 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8"></td></tr> 145 146 <tr> 147 <td align="right" class="v09"> <?php echo $BL['be_cnt_sorting'] ?>: </td> 148 <td><input name="dir_sort" type="text" id="dir_sort" size="10" class="width50" maxlength="10" value="<?php echo intval($dir_sort) ?>" /></td> 149 </tr> 150 151 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr> 152 153 <tr> 154 <td align="right" class="v09"><?php echo $BL['be_fpriv_status'] ?>: </td> 155 <td><table border="0" cellpadding="0" cellspacing="0" summary=""> 156 <tr> 157 <td><input name="dir_aktiv" type="checkbox" id="dir_aktiv" value="1"<?php is_checked("1", $dir_aktiv) ?> /></td> 158 <td class="v10"><strong><?php echo $BL['be_ftptakeover_active'] ?></strong> </td> 159 <td><input name="dir_public" type="checkbox" id="dir_public" value="1"<?php is_checked("1", $dir_public) ?> /></td> 160 <td class="v10"><strong><?php echo $BL['be_ftptakeover_public'] ?></strong></td> 161 </tr> 162 </table></td> 163 </tr> 164 <tr><td colspan="2" align="right" class="v09"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr> 165 <tr> 166 <td width="67" valign="top"><input name="dir_id" type="hidden" id="dir_id" value="<?php echo $dir_id ?>" /> 167 <input name="dir_aktion" type="hidden" id="dir_aktion" value="2" /></td> 168 <td><input name="Submit" type="submit" class="button10" value="<?php echo $BL['be_fpriv_updatebutton'] ?>" /></td> 169 </tr> 170 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8" /></td></tr> 171 <tr><td colspan="2" bgcolor="#9BBECA"><img src="img/leer.gif" alt="" width="1" height="4" /></td></tr> 172 </table></form><?php } ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Jan 29 16:31:14 2012 | Cross-referenced by PHPXref 0.7.1 |