[ Index ]

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

title

Body

[close]

/include/inc_tmpl/content/ -> cnt89.inc.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  // content 89: poll         jens
  32  
  33  $caption_box = '';
  34  $img_thumbs = '';
  35  $imgx = 0;
  36  
  37  if(!isset($content['poll_list'])) {
  38      $content['poll_list'] = array(
  39              'width' => '',
  40              'height' => '',
  41              'zoom' => 0,
  42          );
  43  }
  44  if(empty($content["poll_form"])) {
  45      $content["poll_form"] = array();
  46  }
  47  
  48  
  49  if(!empty($content["poll_form"]["choice"]) && is_array($content["poll_form"]["choice"]) && count($content["poll_form"]["choice"])) {
  50      foreach($content["poll_form"]["choice"] as $key => $value) {
  51          $caption_box .= html_specialchars($content["poll_form"]["choice"][$key])."\n";
  52      }
  53  } else {
  54      $content["poll_form"]["choice"] = array();
  55  }
  56  
  57  ?>
  58  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5"></td></tr>
  59  <tr>
  60      <td align="right" class="chatlist">Class:&nbsp;</td>
  61      <td><input name="cpoll_buttonstyle" type="text" class="f11" id="cpoll_buttonstyle" style="width: 250px;" value="<?php echo html_specialchars($content['poll_text']['poll_buttonstyle']) ?>" /></td>
  62  </tr>
  63  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="1"></td></tr>
  64  <tr>
  65      <td align="right" class="chatlist">Button:&nbsp;</td>
  66      <td><input name="cpoll_buttontext" type="text" class="f11" id="cpoll_buttontext" style="width: 250px;" value="<?php echo html_specialchars($content['poll_text']['poll_buttontext']) ?>" /></td>
  67  </tr>
  68  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10"></td></tr>
  69  <tr>
  70    <td align="right" valign="top" class="chatlist"><img src="img/leer.gif" alt="" width="1" height="13"><?php echo 'choices' ?>:&nbsp;</td>
  71    <td valign="top"><textarea name="cpoll_caption" cols="40" rows="8" wrap="off" class="f11" id="cpoll_caption" style="width: 440px;"><?php echo $caption_box; ?></textarea></td>
  72  </tr>
  73  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10"></td></tr>
  74  <tr>
  75      <td align="right" valign="top" class="chatlist"><img src="img/leer.gif" alt="" width="1" height="13"><?php echo $BL['be_cnt_image'] ?>:&nbsp;</td>
  76      <td valign="top">
  77      <table border="0" cellpadding="0" cellspacing="0" summary="">
  78      <tr>
  79          <td valign="top">
  80          <select name="cimage_list[]" size="<?php echo is_array($content["poll_select"]) && count($content["poll_select"]) ? count($content["poll_select"])+5 : 5 ?>" multiple class="f11" id="cimage_list" style="width: 300px;">
  81  <?php
  82  
  83  if(isset($content['poll_list']['images']) && is_array($content['poll_list']['images']) && count($content['poll_list']['images'])) {
  84      foreach($content['poll_list']['images'] as $key => $value) {
  85      
  86          // 0   :1       :2   :3        :4    :5     :6      :7       :8
  87          // dbid:filename:hash:extension:width:height:caption:position:zoom
  88          $thumb_image = get_cached_image(
  89                          array(    "target_ext"    =>    $content['poll_list']['images'][$key][3],
  90                                  "poll_name"    =>    $content['poll_list']['images'][$key][2] . '.' . $content['poll_list']['images'][$key][3],
  91                                  "thumb_name"    =>    md5(    $content['poll_list']['images'][$key][2].
  92                                                              $phpwcms["img_list_width"].
  93                                                              $phpwcms["img_list_height"].
  94                                                              $phpwcms["sharpen_level"]
  95                                                          )
  96                                )
  97                              );
  98  
  99          if($thumb_image != false) 
 100          {
 101              echo '<option value="' . $content['poll_list']['images'][$key][0] . '">';
 102              $img_name = html_specialchars($content['poll_list']['images'][$key][1]);
 103              echo $img_name . "</option>\n";
 104  
 105              if($imgx == 4) {
 106                  $img_thumbs .= '<br><img src="img/leer.gif" alt="" border="0" width="1" height="2"><br>';
 107                  $imgx = 0;
 108              }
 109              if($imgx) {
 110                  $img_thumbs .= '<img src="img/leer.gif" alt="" border="0" width="2" height="1">';
 111              }
 112              $img_thumbs .= '<img src="'.PHPWCMS_IMAGES.$thumb_image[0].'" border="0" '.$thumb_image[3].' alt="'.$img_name.'" title="'.$img_name.'">';
 113  
 114              $imgx++;
 115          }
 116      }
 117  }
 118  
 119  ?>
 120  </select></td>
 121  <td valign="top"><img src="img/leer.gif" alt="" width="5" height="1"></td>
 122  <td valign="top">
 123  <a href="javascript:;" title="<?php echo $BL['be_cnt_openimagebrowser'] ?>" onclick="tmt_winOpen('filebrowser.php?opt=1&amp;target=nolist','imageBrowser','width=380,height=300,left=8,top=8,scrollbars=yes,resizable=yes',1)"> <img src="img/button/open_image_button.gif" alt="" width="20" height="15" border="0"></a><br /><img src="img/leer.gif" alt="" width="1" height="4"><br /><a href="javascript:;" title="<?php echo $BL['be_cnt_sortup'] ?>" onclick="moveOptionUp(document.articlecontent.cimage_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.cimage_list);"><img src="img/button/image_pos_down.gif" alt="" width="10" height="9" border="0"></a><br /><img src="img/leer.gif" alt="" width="1" height="4"><br /><a href="javascript:;" onclick="removeSelectedOptions(document.articlecontent.cimage_list);" title="<?php echo $BL['be_cnt_delimage'] ?>"><img src="img/button/del_image_button1.gif" alt="" width="20" height="15" border="0"></a></td>
 124  </tr>
 125  </table>
 126                  
 127  <?php
 128  
 129  if($img_thumbs) 
 130  { 
 131      echo '<table border="0" cellspacing="0" cellpadding="0">
 132          <tr><td style="padding-bottom:3px;"><img src="img/leer.gif" width="1" height="5"><br>'.$img_thumbs.'</td></tr>
 133          </table>';
 134  }
 135  
 136  ?>
 137  </td>
 138  </tr>
 139  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5"></td></tr>
 140  <tr>
 141    <td align="right" class="chatlist"><?php echo $BL['be_cnt_maxw'] ?>:&nbsp;</td>
 142    <td valign="top">
 143     <table border="0" cellpadding="0" cellspacing="0" summary="">
 144       <tr>
 145          <td><input name="cpoll_width" type="text" class="f11b" id="cpoll_width" style="width: 50px;" size="3" maxlength="3" onKeyUp="if(!parseInt(this.value*1)) this.value='';" value="<?php echo $content['poll_list']['width'] ?>"></td>
 146          <td class="chatlist">&nbsp;&nbsp;<?php echo $BL['be_cnt_maxh'] ?>:&nbsp;</td>
 147          <td><input name="cpoll_height" type="text" class="f11b" id="cpoll_height" style="width: 50px;" size="3" maxlength="3" onKeyUp="if(!parseInt(this.value*1)) this.value='';" value="<?php echo $content['poll_list']['height'] ?>"></td>
 148          <td class="chatlist">&nbsp;px&nbsp;&nbsp;</td>
 149          <td bgcolor="#E7E8EB"><input name="cpoll_zoom" type="checkbox" id="cpoll_zoom" value="1" <?php is_checked(1, $content['poll_list']['zoom']); ?>></td>
 150        <td bgcolor="#E7E8EB" class="v10">&nbsp;<?php echo $BL['be_cnt_enlarge'] ?>&nbsp;</td>
 151        <td bgcolor="#E7E8EB"><img src="img/leer.gif" alt="" width="6" height="15"></td>
 152        </tr>
 153      </table></td>
 154  </tr>
 155  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10"></td></tr>
 156  
 157  


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