[ 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 // 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 31 //Wenn neues Verzeichnis angelegt werden soll 32 //if(isset($_GET["mkdir"]) || intval($_POST["dir_aktion"])) { 33 $dir_aktiv = 1; 34 $dir_public = 0; 35 $dir_newname = ''; 36 $dir_longinfo = ''; 37 $dir_gallery = 0; 38 $dir_pid = empty($_GET["mkdir"]) ? 0 : intval($_GET["mkdir"]); 39 $dir_sort = 0; 40 41 //Auswerten des Formulars 42 if(isset($_POST["dir_aktion"]) && intval($_POST["dir_aktion"]) == 1) { 43 $dir_pid = intval($_POST["dir_pid"]); 44 $dir_aktiv = empty($_POST["dir_aktiv"]) ? 0 : 1; 45 $dir_public = empty($_POST["dir_public"]) ? 0 : 1; 46 $dir_newname = clean_slweg($_POST["dir_newname"]); 47 $dir_longinfo = clean_slweg($_POST["dir_longinfo"]); 48 $dir_gallery = empty($_POST["dir_gallery"]) ? 0 : intval($_POST["dir_gallery"]); 49 $dir_sort = intval($_POST["dir_sort"]); 50 51 switch($dir_gallery) { 52 53 case 2: 54 case 3: break; 55 56 default: $dir_gallery = 0; 57 58 } 59 60 if(isEmpty($dir_newname)) $dir_error = 1; 61 //Eintragen des neuen verzeichnisnamens 62 if(!isset($dir_error)) { 63 $sql = "INSERT INTO ".DB_PREPEND."phpwcms_file (f_pid, f_uid, f_name, f_aktiv, f_public, ". 64 "f_created, f_kid, f_longinfo, f_gallerystatus, f_sort) VALUES (". 65 $dir_pid.", ". 66 $_SESSION["wcs_user_id"].", '". 67 aporeplace($dir_newname)."', ". 68 $dir_aktiv.", ". 69 $dir_public.", '". 70 time()."', 0, '".aporeplace($dir_longinfo)."', ".$dir_gallery.", ". 71 $dir_sort.")"; 72 if($result = mysql_query($sql, $db) or die ("error while writing new dir info")) { 73 headerRedirect(PHPWCMS_URL."phpwcms.php?do=files&f=0"); 74 } 75 } 76 } 77 //Ende Auswerten Formular 78 79 //Wenn ID angegeben, dann -> oder aber Root Verzeichnis 80 if($dir_pid) { 81 $sql = "SELECT f_id, f_name FROM ".DB_PREPEND."phpwcms_file WHERE f_id=".$dir_pid. 82 " AND f_uid=".$_SESSION["wcs_user_id"]." AND f_trash=0 AND f_kid=0 LIMIT 1"; 83 if($result = mysql_query($sql, $db) or die("error while reading parent folder name")) { 84 if($row = mysql_fetch_row($result)) { 85 $dir_parent_name = html_specialchars($row[1]); 86 $dir_pid = intval($row[0]); 87 } 88 } 89 } else { 90 $dir_parent_name = $BL['be_fpriv_rootdir']; 91 $dir_pid = 0; 92 } 93 94 95 ?> 96 <form action="phpwcms.php?do=files&f=0" method="post" name="createnewdir" id="createnewdir"> 97 <table width="538" border="0" cellpadding="0" cellspacing="0" bgcolor='#EBF2F4' summary=""> 98 <tr> 99 <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> 100 <td width="471"><img src="img/leer.gif" alt="" width="1" height="6" /></td> 101 </tr> 102 <tr><td class="title"><?php echo $BL['be_fpriv_title'] ?></td></tr> 103 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr> 104 <tr> 105 <td width="67" align="right" class="v09"><?php echo $BL['be_fpriv_inside'] ?>: </td> 106 <td class="v10"><strong><?php echo $dir_parent_name ?></strong></td> 107 </tr> 108 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="6" /></td></tr> 109 <tr><td colspan="2"><img src="img/lines/line-bluelight.gif" alt="" width="538" height="1" /></td></tr> 110 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="6" /></td></tr> 111 <?php if(isset($dir_error)) { ?> 112 <tr> 113 <td><img src="img/leer.gif" alt="" width="1" height="1" /></td> 114 <td class="v10"><strong style="color:#FF3300;"><?php echo $BL['be_fpriv_error'] ?></strong></td> 115 </tr> 116 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="2" /></td></tr> 117 <?php } ?> 118 <tr> 119 <td align="right" class="v09"><?php echo $BL['be_fpriv_name'] ?>: </td> 120 <td><input name="dir_newname" type="text" class="width440" id="dir_newname" value="<?php echo html_specialchars($dir_newname) ?>" size="40" maxlength="250" /></td> 121 </tr> 122 <tr><td colspan="2" valign="top"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr> 123 <tr> 124 <td align="right" valign="top" class="v09 tdtop4"><?php echo $BL['be_ftptakeover_longinfo'] ?>: </td> 125 <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> 126 </tr> 127 128 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr> 129 130 <tr> 131 <td align="right" class="v09"><?php echo $BL['be_gallery'] ?>: </td> 132 <td><select name="dir_gallery" id="dir_gallery"> 133 <option value="0"<?php is_selected(0, $dir_gallery) ?>>-</option> 134 <option value="2"<?php is_selected(2, $dir_gallery) ?>><?php echo $BL['be_gallery_root'] ?></option> 135 <option value="3"<?php is_selected(3, $dir_gallery) ?>><?php echo $BL['be_gallery_directory'] ?></option> 136 </select></td> 137 </tr> 138 139 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8"></td></tr> 140 141 <tr> 142 <td align="right" class="v09"> <?php echo $BL['be_cnt_sorting'] ?>: </td> 143 <td><input name="dir_sort" type="text" id="dir_sort" size="10" class="width50" maxlength="10" value="<?php echo intval($dir_sort) ?>" /></td> 144 </tr> 145 146 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr> 147 148 149 <tr> 150 <td align="right" class="v09"><?php echo $BL['be_fpriv_status'] ?>: </td> 151 <td><table border="0" cellpadding="0" cellspacing="0" summary=""> 152 <tr> 153 <td><input name="dir_aktiv" type="checkbox" id="dir_aktiv" value="1"<?php is_checked("1", $dir_aktiv) ?> /></td> 154 <td class="v10"><strong><label for="dir_aktiv"><?php echo $BL['be_ftptakeover_active'] ?></label></strong> </td> 155 156 <td><input name="dir_public" type="checkbox" id="dir_public" value="1"<?php is_checked("1", $dir_public) ?> /></td> 157 <td class="v10"><strong><label for="dir_public"><?php echo $BL['be_ftptakeover_public'] ?></label></strong></td> 158 </tr> 159 </table></td> 160 </tr> 161 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr> 162 <tr> 163 <td width="67" valign="top"><input name="dir_pid" type="hidden" id="dir_pid" value="<?php echo $dir_pid ?>" /> 164 <input name="dir_aktion" type="hidden" id="dir_aktion" value="1" /></td> 165 <td><input name="Submit" type="submit" class="button10" value="<?php echo $BL['be_fpriv_button'] ?>" /></td> 166 </tr> 167 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8" /></td></tr> 168 <tr><td colspan="2" bgcolor="#9BBECA"><img src="img/leer.gif" alt="" width="1" height="4" /></td></tr> 169 </table> 170 </form>
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 |