[ Index ]

PHP Cross Reference of phpwcms V1.4.3 _r380 (23.11.09)

title

Body

[close]

/include/inc_tmpl/ -> files.ftptakeover.tmpl.php (source)

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


Generated: Wed Dec 30 05:55:15 2009 Cross-referenced by PHPXref 0.7