[ 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 31 // initialize Mootools for autocomplete 32 initMootoolsAutocompleter(); 33 34 35 ?> 36 <form action="include/inc_act/act_ftptakeover.php" method="post" name="ftptakeover" id="ftptakeover"> 37 <table width="538" border="0" cellpadding="0" cellspacing="0" summary=""> 38 <tr><td colspan="6" class="title"><?php echo $BL['be_ftptakeover_title'] ?></td></tr> 39 <tr><td colspan="6" class="title"><img src="img/leer.gif" alt="" width="1" height="4" /></td> 40 </tr> 41 <tr bgcolor="#92A1AF"><td colspan="6"><img src="img/leer.gif" alt="" width="1" height="1" /></td> 42 </tr> 43 <tr bgcolor="#D9DEE3"> 44 <td width="35" align="center" class="v09"><?php echo $BL['be_ftptakeover_mark'] ?></td> 45 <td width="1" bgcolor="#F2F3F5"><img src="img/leer.gif" alt="" width="1" height="14" /></td> 46 <td width="21"><img src="img/leer.gif" alt="" width="21" height="1" /></td> 47 <td width="400" class="v09"><?php echo $BL['be_ftptakeover_available'] ?></td> 48 <td width="1" bgcolor="#F2F3F5"><img src="img/leer.gif" alt="" width="1" height="1" /></td> 49 <td width="80" align="right" class="v09"><?php echo $BL['be_ftptakeover_size'] ?> </td> 50 </tr> 51 <tr bgcolor="#92A1AF"><td colspan="6" bgcolor="#D9DEE3"><img src="img/leer.gif" alt="" width="1" height="1" /></td> 52 </tr> 53 <?php 54 //Browse FTP Open Directory 55 $handle = @opendir(PHPWCMS_ROOT.$phpwcms["ftp_path"]); 56 $fx = 0; 57 $fxsg = 0; 58 while ($file = @readdir ($handle)) 59 { 60 if($file != "." && $file != ".." && $file{0} != '.') { 61 if(!is_dir($file) && $fxs = filesize(PHPWCMS_ROOT.$phpwcms["ftp_path"].$file)) { 62 $fxb = ($fx % 2) ? " bgColor=\"#F9FAFB\"" : ""; 63 $fxsg += $fxs; 64 $fxe = extimg(which_ext($file)); 65 // there is a big problem with special chars on Mac OS X and seems Windows too 66 $filename = (PHPWCMS_CHARSET != 'utf-8' && phpwcms_seems_utf8($file)) ? str_replace('?', '', utf8_decode($file)) : $file; 67 $filename = html_specialchars($filename); 68 ?> 69 <tr<?php echo $fxb ?>> 70 <td align="center"><input name="ftp_mark[<?php echo $fx ?>]" type="checkbox" id="ftp_mark_<?php echo $fx ?>" value="1" class="ftp_mark" /></td> 71 <td bgcolor="#D9DEE3"><img src="img/leer.gif" alt="" width="1" height="17" /></td> 72 <td align="center"><img src="img/icons/small_<?php echo $fxe ?>" alt="" width="13" height="11" /></td> 73 <td class="v10"><?php echo $filename ?></td> 74 75 <td bgcolor="#D9DEE3"><img src="img/leer.gif" alt="" width="1" height="1" /></td> 76 <td align="right" class="v10"> 77 <?php echo fsizelong($fxs) ?> 78 <input name="ftp_file[<?php echo $fx ?>]" type="hidden" value="<?php echo base64_encode($file) ?>" /> 79 <input name="ftp_filename[<?php echo $fx ?>]" type="hidden" value="<?php echo $filename ?>" /> 80 </td> 81 </tr> 82 <?php $fx++; 83 } 84 } 85 } 86 @closedir($handle); 87 88 if(!$fx) { 89 ?> 90 <tr> 91 <td colspan="5" class="dir"> <?php echo $BL['be_ftptakeover_nofile'] ?></td> 92 <td><img src="img/leer.gif" alt="" width="1" height="17" /></td> 93 </tr> 94 <?php 95 } else { 96 ?> 97 <tr bgcolor="#92A1AF"><td colspan="6" bgcolor="#D9DEE3"><img src="img/leer.gif" alt="" width="1" height="1" /></td> 98 </tr> 99 100 <tr bgcolor="#EAEDF0"> 101 <td align="center" class="subnavactive"><input name="toggle" type="checkbox" id="toggle" value="1" title="<?php echo $BL['be_ftptakeover_all'] ?>" /></td> 102 <td bgcolor="#D9DEE3"><img src="img/leer.gif" alt="" width="1" height="17" /></td> 103 <td> </td> 104 <td class="v10"><?php echo $BL['be_ftptakeover_all'] ?></td> 105 <td bgcolor="#D9DEE3"><img src="img/leer.gif" alt="" width="1" height="1" /></td> 106 <td align="right" class="v10"><?php echo fsizelong($fxsg) ?> </td> 107 </tr> 108 <tr bgcolor="#92A1AF"><td colspan="6"><img src="img/leer.gif" alt="" width="1" height="1" /></td> 109 </tr> 110 <?php 111 } 112 ?> 113 <tr bgcolor="#D9DEE3"> 114 <td><img src="img/leer.gif" alt="" width="35" height="1" /></td> 115 <td><img src="img/leer.gif" alt="" width="1" height="1" /></td> 116 <td><img src="img/leer.gif" alt="" width="21" height="1" /></td> 117 <td><img src="img/leer.gif" alt="" width="400" height="1" /></td> 118 <td><img src="img/leer.gif" alt="" width="1" height="1" /></td> 119 <td><img src="img/leer.gif" alt="" width="80" height="1" /></td> 120 </tr> 121 </table><?php 122 //Nur Zeigen wenn Dateien vorhanden 123 if($fx) { 124 ?><table width="538" border="0" cellpadding="0" cellspacing="0" summary=""> 125 <tr bgcolor="#D9DEE3"><td colspan="2" valign="top"><img src="img/leer.gif" alt="" width="1" height="5" /></td> 126 </tr> 127 <tr bgcolor="#D9DEE3"> 128 <td width="67" align="right" class="v09"><?php echo $BL['be_ftptakeover_directory'] ?>: </td> 129 <td width="471" class="v10"><select name="file_dir" id="file_dir" class="v11 width400"> 130 <option value="0"><?php echo $BL['be_ftptakeover_rootdir'] ?></option> 131 <?php dir_menu(0, 0, $db, "+", $_SESSION["wcs_user_id"], "+") ?> 132 </select></td> 133 </tr> 134 <tr bgcolor="#D9DEE3"><td colspan="2" valign="top"><img src="img/leer.gif" alt="" width="1" height="5" /></td> 135 </tr> 136 <tr bgcolor="#D9DEE3"><td colspan="2" valign="top"><img src="img/leer.gif" alt="" width="538" height="1" /></td> 137 </tr> 138 <tr bgcolor="#F9FAFB"><td colspan="2" valign="top"><img src="img/leer.gif" alt="" width="1" height="6" /></td> 139 </tr> 140 <?php 141 142 //Auswahlliste vordefinierte Keywörter 143 $sql = "SELECT * FROM ".DB_PREPEND."phpwcms_filecat WHERE fcat_deleted=0 ORDER BY fcat_sort, fcat_name"; 144 if($result = mysql_query($sql, $db) or die("error while browsing file categories for selecting keywords")) { 145 $k = ""; 146 while($row = mysql_fetch_array($result)) { 147 if(get_filecat_childcount ($row["fcat_id"], $db)) { 148 149 $ke = ''; 150 if(!empty($file_error["keywords"][$row["fcat_id"]])) { 151 $ke = "<img src=\"img/symbole/error.gif\" width=\"8\" height=\"9\" alt=\"\" /> "; 152 } 153 $k .= "<tr>\n<td class=\"f10b\">".$ke.html_specialchars($row["fcat_name"]).": </td>\n"; 154 $k .= "<td><select name=\"file_keywords[".$row["fcat_id"]."]\" class=\"v11\">\n"; 155 $k .= "<option value=\"".(($row["fcat_needed"])?"0_".$row["fcat_needed"]."\">".$BL['be_ftptakeover_needed']:'0">'.$BL['be_ftptakeover_optional'])."</option>\n"; 156 157 $ksql = "SELECT * FROM ".DB_PREPEND."phpwcms_filekey WHERE fkey_deleted=0 AND fkey_cid=".$row["fcat_id"]." ORDER BY fkey_name"; 158 if($kresult = mysql_query($ksql, $db) or die("error while listing file keywords")) { 159 while($krow = mysql_fetch_array($kresult)) { 160 $k .= "<option value=\"".$krow["fkey_id"]."\""; 161 if(isset($file_keywords[$row["fcat_id"]]) && $file_keywords[$row["fcat_id"]] == $krow["fkey_id"]) { 162 $k .= " selected"; 163 } 164 $k .= ">".html_specialchars($krow["fkey_name"])."</option>\n"; 165 } 166 mysql_free_result($kresult); 167 } 168 169 $k .= "</select></td>\n</tr>\n"; 170 $k .= "<tr>\n<td colspan=\"2\"><img src=\"img/leer.gif\" width=\"1\" height=\"2\"></td>\n</tr>\n"; 171 172 } 173 } 174 mysql_free_result($result); 175 } 176 177 ?> 178 <tr bgcolor="#F9FAFB"> 179 <td align="right" valign="top" class="v09"><img src="img/leer.gif" alt="" width="1" height="13" /><?php echo $BL['be_ftptakeover_keywords'] ?>: </td> 180 <td><table border="0" cellpadding="0" cellspacing="0" summary=""> 181 <?php if($k) echo $k; ?> 182 <tr> 183 <td class="f10b"><?php echo $BL['be_ftptakeover_additional'] ?>: </td> 184 <td><input name="file_shortinfo" type="text" class="v11 width300" id="file_shortinfo" size="40" maxlength="250" /></td> 185 </tr> 186 </table> 187 </td> 188 </tr> 189 <tr bgcolor="#F9FAFB"><td colspan="2" valign="top"><img src="img/leer.gif" alt="" width="1" height="6" /></td> 190 </tr> 191 <tr bgcolor="#D9DEE3"><td colspan="2" valign="top"><img src="img/leer.gif" alt="" width="538" height="1" /></td> 192 </tr> 193 <tr><td colspan="2" valign="top"><img src="img/leer.gif" alt="" width="1" height="8" /></td> 194 </tr> 195 <tr> 196 <td align="right" valign="top" class="v09"><img src="img/leer.gif" alt="" width="1" height="13" /><?php echo $BL['be_ftptakeover_longinfo'] ?>: </td> 197 <td valign="top"><textarea name="file_longinfo" cols="40" rows="10" class="v11 width400" id="file_longinfo"></textarea></td> 198 </tr> 199 200 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="3"></td></tr> 201 202 203 <tr> 204 <td align="right" class="v09"><?php echo $BL['be_copyright'] ?>: </td> 205 <td><input name="file_copyright" type="text" id="file_copyright" size="40" class="v11 width400" maxlength="255" value="" /></td> 206 </tr> 207 208 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="3" /></td></tr> 209 210 <tr> 211 <td align="right" class="v09"> <?php echo $BL['be_tags'] ?>: </td> 212 <td><input name="file_tags" type="text" id="file_tags" size="40" class="v11 width400" maxlength="255" value="" /></td> 213 </tr> 214 215 <tr><td colspan="2" valign="top"><img src="img/leer.gif" alt="" width="1" height="9" /></td> 216 </tr> 217 <tr> 218 <td align="right" class="v09"><?php echo $BL['be_ftptakeover_status'] ?>: </td> 219 <td><table border="0" cellpadding="1" cellspacing="0" bgcolor="#E6EAED" summary=""> 220 <tr> 221 <td><input name="file_aktiv" type="checkbox" id="file_aktiv" value="1" /></td> 222 <td class="v10"><strong><label for="file_aktiv"><?php echo $BL['be_ftptakeover_active'] ?></label></strong> </td> 223 <td><input name="file_public" type="checkbox" id="file_public" value="1" /></td> 224 <td class="v10"><strong><label for="file_public"><?php echo $BL['be_ftptakeover_public'] ?></label></strong> </td> 225 <td bgcolor="#FFFFFF"><img src="img/leer.gif" width="5" height="1" alt="" /></td> 226 <td><input name="file_replace" type="checkbox" id="file_replace" value="1" /></td> 227 <td class="v10"><strong><label for="file_replace"><?php echo $BL['be_file_replace'] ?></label></strong></td> 228 229 <td class="v10"><img src="img/leer.gif" alt="" width="10" height="19" /></td> 230 </tr> 231 </table> 232 </td> 233 </tr> 234 <tr><td colspan="2" align="right" class="v09"><img src="img/leer.gif" alt="" width="1" height="12" /></td> 235 </tr> 236 <tr> 237 <td width="67" valign="top"><input name="file_aktion" type="hidden" id="file_aktion" value="1" /></td> 238 <td><input name="Submit" type="submit" class="button10" value="<?php echo $BL['be_ftptakeover_button'] ?>" /></td> 239 </tr> 240 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="15" /></td> 241 </tr> 242 <tr bgcolor="#92A1AF"><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="1" /></td> 243 </tr> 244 </table> 245 <?php } ?> 246 </form> 247 <script type="text/javascript"> 248 <!-- 249 window.addEvent('domready', function(){ 250 251 /* Autocompleter for keywords (=tags) */ 252 var searchKeyword = $('file_tags'); 253 if(searchKeyword) { 254 var indicator = new Element('span', {'class': 'autocompleter-loading', 'styles': {'display': 'none'}}).setHTML('').injectAfter(searchKeyword); 255 var completer = new Autocompleter.Ajax.Json(searchKeyword, 'include/inc_act/ajax_connector.php', { 256 multi: true, 257 maxChoices: 30, 258 autotrim: true, 259 minLength: 0, 260 allowDupes: false, 261 postData: {action: 'category', method: 'json'}, 262 onRequest: function(el) { 263 indicator.setStyle('display', ''); 264 }, 265 onComplete: function(el) { 266 indicator.setStyle('display', 'none'); 267 } 268 }); 269 } 270 271 if($('toggle')) { 272 $('toggle').addEvent('click', function() { 273 274 var toggle_var = this.checked ? 1 : 0; 275 276 $$('input.ftp_mark').each( function(el) { 277 278 el.checked = toggle_var ? true : false; 279 280 }); 281 282 }); 283 } 284 285 286 }); 287 288 //--> 289 </script>
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 |