[ Index ]

PHP Cross Reference of phpwcms V1.4.7 _r403 (01.11.10)

title

Body

[close]

/include/inc_tmpl/content/ -> cnt7.inc.php (source)

   1  <?php
   2  /*************************************************************************************
   3     Copyright notice
   4     
   5     (c) 2002-2010 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  //file list
  32  
  33  if(empty($content["file_descr"])) $content["file_descr"] = '';
  34  $content['file']['direct_download'] = empty($content['file']['direct_download']) ? 0 : 1;
  35  
  36  
  37  ?>
  38  <tr>
  39      <td align="right" class="chatlist"><?php echo $BL['be_admin_struct_template'] ?>:&nbsp;</td>
  40      <td><select name="cfile_template" id="cfile_template" class="f11b">
  41  
  42  <?php
  43  
  44  echo '<option value="">'.$BL['be_admin_tmpl_default'].'</option>'.LF;
  45  
  46  // templates for recipes
  47  $tmpllist = get_tmpl_files(PHPWCMS_TEMPLATE.'inc_cntpart/filelist');
  48  if(is_array($tmpllist) && count($tmpllist)) {
  49      foreach($tmpllist as $val) {
  50          if(isset($content['file_template']) && $val == $content['file_template']) {
  51              $selected_val = ' selected="selected"';
  52          } else {
  53              $selected_val = '';
  54          }
  55          $val = htmlspecialchars($val);
  56          echo '    <option value="' . $val . '"' . $selected_val . '>' . $val . '</option>' . LF;
  57      }
  58  }
  59  
  60  ?>                  
  61          </select></td>
  62  </tr>
  63  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8"></td></tr>
  64  <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt=""></td></tr>
  65  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8"></td></tr>
  66  
  67  <tr>
  68    <td align="right" class="chatlist"><?php echo $BL['be_cnt_download'] ?>:&nbsp;</td>
  69    <td><table border="0" cellpadding="0" cellspacing="0" bgcolor="#E7E8EB" summary="">
  70        <tr>
  71         <td><input name="cfile_direct" id="cfile_direct" type="checkbox" value="1" <?php is_checked(1, $content['file']['direct_download']); ?>></td>
  72         <td class="v10"><label for="cfile_direct">&nbsp;<?php echo $BL['be_cnt_download_direct'] ?></label>&nbsp;&nbsp;</td>
  73         <td><img src="img/leer.gif" alt="" width="1" height="22"></td>    
  74        </tr>
  75        </table></td>
  76  </tr>
  77  
  78  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8"></td></tr>
  79  
  80  <tr>
  81    <td align="right" valign="top" class="chatlist"><img src="img/leer.gif" alt="" width="1" height="13"><?php echo $BL['be_cnt_files'] ?>:&nbsp;</td>
  82    <td valign="top"><table border="0" cellpadding="0" cellspacing="0" summary="">
  83      <tr>
  84        <td valign="top"><select name="cfile_list[]" size="8" multiple class="f11" id="cfile_list" style="width: 300px;">
  85        <?php
  86        if(isset($content["file_list"]) && is_array($content["file_list"]) && count($content["file_list"])) {
  87          $fx  = 0;
  88          $fxa = "";
  89          $fxb = array();
  90          foreach($content["file_list"] as $key => $value) {
  91              if($fx) $fxa .= " OR ";
  92              $fxa .= "f_id=".intval($value);
  93              $fxb[$key]["fid"] = intval($value);
  94              $fx++;
  95          }
  96          if($fx) {
  97              $file_sql = "SELECT f_id, f_name FROM ".DB_PREPEND."phpwcms_file WHERE f_public=1 AND f_aktiv=1".
  98                          " AND f_kid=1 AND f_trash=0 AND (".$fxa.");"; //f_uid=".$_SESSION["wcs_user_id"]
  99              if($file_result = mysql_query($file_sql, $db) or die ("error while retrieving file list file's info")) {
 100                  while($file_row = mysql_fetch_row($file_result)) {
 101                      foreach($fxb as $key => $value) {
 102                          if($fxb[$key]["fid"] == $file_row[0]) {
 103                              $fxb[$key]["fname"] = html_specialchars($file_row[1]);
 104                          }
 105                      }
 106                  }
 107              }
 108              foreach($fxb as $key => $value) {
 109                  if(!empty($fxb[$key]["fname"])) {
 110                      echo "<option value=\"".$fxb[$key]["fid"]."\">".$fxb[$key]["fname"]."</option>\n";
 111                  }
 112              }
 113              unset($fxb); unset($content["file_list"]);
 114          }
 115        }
 116        
 117        
 118        ?>
 119        </select></td>
 120        <td valign="top"><img src="img/leer.gif" alt="" width="5" height="1"></td>                                           <!-- browser_file.php //-->
 121        <td valign="top"><a href="javascript:;" title="<?php echo $BL['be_cnt_openfilebrowser'] ?>" onclick="tmt_winOpen('filebrowser.php?opt=4&amp;target=nolist','imageBrowser','width=380,height=300,left=8,top=8,scrollbars=yes,resizable=yes,status=yes',1)"><img src="img/button/open_image_button.gif" alt="" width="20" height="15" border="0"></a><br />
 122        <img src="img/leer.gif" alt="" width="1" height="4"><br />
 123        <a href="javascript:;" title="<?php echo $BL['be_cnt_sortup'] ?>" onclick="moveOptionUp(document.articlecontent.cfile_list);"><img src="img/button/image_pos_up.gif" alt="" width="10" height="9" border="0"></a><a href="javascript:;" title="<?php echo $BL['be_cnt_sortdown'] ?>" onclick="moveOptionDown(document.articlecontent.cfile_list);"><img src="img/button/image_pos_down.gif" alt="" width="10" height="9" border="0"></a><br />
 124        <img src="img/leer.gif" alt="" width="1" height="4"><br />
 125        <a href="javascript:;" onclick="removeSelectedOptions(document.articlecontent.cfile_list);" title="<?php echo $BL['be_cnt_delfile'] ?>"><img src="img/button/del_image_button1.gif" alt="" width="20" height="15" border="0"></a></td>
 126      </tr>
 127    </table></td>
 128    </tr>
 129  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5"></td></tr>
 130  <tr>
 131    <td align="right" valign="top" class="chatlist"><img src="img/leer.gif" alt="" width="1" height="13"><?php echo $BL['be_cnt_description'] ?>:&nbsp;</td>
 132    <td valign="top"><textarea name="cfile_descr" cols="40" rows="8" class="f11" id="cfile_descr" style="width: 440px;"><?php 
 133    
 134      if(!empty($content["file_descr"]) && ($content["file_descr"]{0} == "\r" || $content["file_descr"]{0} == "\n")) {
 135          echo ' ';
 136      }
 137      echo html_specialchars($content["file_descr"]); 
 138    
 139    ?></textarea></td>
 140  </tr>
 141  
 142  
 143  <tr><td colspan="2" class="rowspacer7x7"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr>
 144  
 145  <tr><td colspan="2" align="center"><?php
 146  
 147  $wysiwyg_editor = array(
 148      'value'        => isset($content["html"]) ? $content["html"] : '',
 149      'field'        => 'chtml',
 150      'height'    => '250px',
 151      'width'        => '536px',
 152      'rows'        => '15',
 153      'editor'    => $_SESSION["WYSIWYG_EDITOR"],
 154      'lang'        => 'en'
 155  );
 156  
 157  include (PHPWCMS_ROOT.'/include/inc_lib/wysiwyg.editor.inc.php');
 158  
 159  
 160  ?></td></tr>
 161  
 162  <tr><td colspan="2" class="rowspacer7x7"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr>


Generated: Tue Nov 16 22:51:00 2010 Cross-referenced by PHPXref 0.7