[ Index ]

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

title

Body

[close]

/include/inc_tmpl/content/ -> cnt8.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  //link article
  31  
  32  if(!isset($content['alink']['alink_id']) && isset($row["acontent_alink"])) {
  33      $content['alink']['alink_id']    = explode(':', $row["acontent_alink"]);
  34  } elseif(!isset($row["acontent_alink"])) {
  35      $content['alink']['alink_id']    = array();
  36  }
  37  if(empty($content['alink']['alink_template'])) {
  38      $content['alink']['alink_template'] = '';
  39  }
  40  if(empty($content['alink']['alink_type'])) {
  41      $content['alink']['alink_type'] = 0;
  42  }
  43  if(empty($content['alink']['alink_level']) || !is_array($content['alink']['alink_level'])) {
  44      $content['alink']['alink_level'] = array();
  45  }
  46  if(empty($content['alink']['alink_unique'])) {
  47      $content['alink']['alink_unique'] = 0;
  48  }
  49  if(!isset($content['alink']['alink_allowedtags'])) {
  50      $content['alink']['alink_allowedtags']    = '<b><i><u><s><strong>';
  51  }
  52  if(empty($content['alink']['alink_crop'])) {
  53      $content['alink']['alink_crop'] = 0;
  54  }
  55  if(empty($content['alink']['alink_prio'])) {
  56      $content['alink']['alink_prio'] = 0;
  57  }
  58  if(empty($content['alink']['alink_category']) || !is_array($content['alink']['alink_category'])) {
  59      $content['alink']['alink_category'] = array();
  60  }
  61  if(empty($content['alink']['alink_category'])) {
  62      $content['alink']['alink_andor'] = 'OR';
  63  }
  64  
  65  $BE['HEADER']['contentpart.js'] = getJavaScriptSourceLink('include/inc_js/contentpart.js');
  66  
  67  // necessary JavaScript libraries
  68  initMootools();
  69  initMootoolsAutocompleter();
  70  
  71  ?>
  72  <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1" /></td></tr>
  73  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="6" /></td></tr>
  74  
  75  <tr>
  76      <td align="right" class="chatlist"><?php echo $BL['be_admin_struct_template'] ?>:&nbsp;</td>
  77      <td><select name="calink_template" id="calink_template" class="f11b">
  78  <?php
  79  
  80      echo '<option value="">'.$BL['be_admin_tmpl_default'].' &lt;ul&gt;&lt;li&gt;</option>'.LF;
  81  
  82  // templates for forum
  83  $tmpllist = get_tmpl_files(PHPWCMS_TEMPLATE.'inc_cntpart/teaser');
  84  if(is_array($tmpllist) && count($tmpllist)) {
  85      foreach($tmpllist as $val) {
  86          $vals = '';
  87          if($val == $content['alink']['alink_template']) $vals= ' selected="selected"';
  88          $val = html_specialchars($val);
  89          echo '<option value="'.$val.'"'.$vals.'>'.$val."</option>\n";
  90      }
  91  }
  92                    
  93  ?>                  
  94      </select></td>
  95  </tr>
  96  
  97  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="6" /></td></tr>
  98  
  99  <tr>
 100      <td align="right" class="chatlist"><?php echo $BL['be_article_rendering'] ?>:&nbsp;</td>
 101      <td><table border="0" cellpadding="0" cellspacing="0" summary="" bgcolor="#E7E8EB">
 102      <tr>
 103          <td><input type="checkbox" name="calink_unique" id="calink_unique" value="1"<?php is_checked(1, $content['alink']['alink_unique']) ?> /></td>
 104          <td class="chatlist"><label for="calink_unique">&nbsp;<?php echo $BL['be_unique_teaser_entry'] ?>&nbsp;&nbsp;</label></td>  
 105      </tr>
 106      </table>
 107      </td>
 108  </tr>
 109  
 110  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="6" /></td></tr>
 111  
 112  <tr>
 113      <td align="right" class="chatlist"><?php echo $BL['be_article_asummary'] ?>:&nbsp;</td>
 114      <td><table border="0" cellpadding="0" cellspacing="0" summary="">
 115      <tr>
 116          <td><input name="calink_wordlimit" type="text" id="calink_wordlimit" class="f11b" style="width: 35px" value="<?php 
 117              echo empty($content['alink']['alink_wordlimit']) ? '' : $content['alink']['alink_wordlimit']; 
 118              ?>" size="3" maxlength="5" /></td>
 119          <td class="chatlist">&nbsp;<?php echo $BL['be_cnt_results_wordlimit'] ?></td>  
 120      </tr>
 121      </table>
 122      </td>
 123  </tr>
 124  
 125  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>
 126  
 127  <tr>
 128      <td align="right" class="chatlist"><?php echo $BL['be_allowed_tags'] ?>:&nbsp;</td>
 129      <td><input name="calink_allowedtags" type="text" id="calink_allowedtags" class="f11b" style="width: 420px" value="<?php echo html_specialchars($content['alink']['alink_allowedtags']); ?>" size="20" /></td>
 130  </tr>
 131  
 132  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="6" /></td></tr>
 133  
 134  <tr>
 135      <td align="right" class="chatlist"><?php echo $BL['be_cnt_image'] ?>:&nbsp;</td>
 136      <td valign="top"><table border="0" cellpadding="0" cellspacing="0" summary="">
 137          <tr>
 138              <td align="right" class="chatlist"><?php echo $BL['be_cnt_maxw'] ?>:&nbsp;</td>
 139              <td><input name="calink_width" type="text" class="f11b" id="calink_width" style="width: 35px;" size="3" maxlength="3" onkeyup="if(!parseInt(this.value)) this.value='';" value="<?php echo empty($content['alink']['alink_width']) ? '' : $content['alink']['alink_width']; ?>" /></td>
 140              <td class="chatlist">&nbsp;&nbsp;<?php echo $BL['be_cnt_maxh'] ?>:&nbsp; </td>
 141              <td><input name="calink_height" type="text" class="f11b" id="calink_height" style="width: 35px;" size="3" maxlength="3" onkeyup="if(!parseInt(this.value)) this.value='';" value="<?php echo empty($content['alink']['alink_height']) ? '' : $content['alink']['alink_height']; ?>" /></td>
 142              <td class="chatlist">&nbsp;px&nbsp;&nbsp;&nbsp;</td>
 143              
 144              <td><input type="checkbox" name="calink_crop" id="calink_crop" value="1" <?php is_checked(1, $content['alink']['alink_crop']); ?> /></td>
 145              <td class="v10 chatlist"><label for="calink_crop" class="checkbox"><?php echo $BL['be_image_crop'] ?></label></td>
 146              
 147          </tr>
 148          </table></td>
 149  </tr>
 150  
 151  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8" /></td></tr>
 152  <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1" /></td></tr>
 153  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8" /></td></tr>
 154  
 155  <tr>
 156      <td align="right" class="chatlist"><?php echo $BL['be_cnt_ecardform_selector'] ?>:&nbsp;</td>
 157      <td valign="top"><table cellpadding="0" cellspacing="0" border="0" summary="">
 158          <tr>
 159              <td><select name="calink_type" class="f11b" id="calink_type" onchange="showHide_TeaserArticleSelection(this.options[this.selectedIndex].value)">
 160          
 161          <optgroup label="<?php echo $BL['be_sorted']; ?>">
 162          
 163          <option value="0"<?php is_selected(0, $content['alink']['alink_type']) ?>><?php echo $BL['be_admin_struct_ordermanual'] ?></option>
 164          <option value="1"<?php is_selected(1, $content['alink']['alink_type']) ?>><?php echo $BL['be_admin_struct_orderdate'].', '.$BL['be_admin_struct_orderdesc'] ?></option>
 165          <option value="2"<?php is_selected(2, $content['alink']['alink_type']) ?>><?php echo $BL['be_admin_struct_orderdate'].', '.$BL['be_admin_struct_orderasc'] ?></option>
 166          <option value="3"<?php is_selected(3, $content['alink']['alink_type']) ?>><?php echo $BL['be_admin_struct_orderchangedate'].', '.$BL['be_admin_struct_orderdesc'] ?></option>
 167          <option value="4"<?php is_selected(4, $content['alink']['alink_type']) ?>><?php echo $BL['be_admin_struct_orderchangedate'].', '.$BL['be_admin_struct_orderasc'] ?></option>
 168          <option value="5"<?php is_selected(5, $content['alink']['alink_type']) ?>><?php echo $BL['be_article_cnt_start'].', '.$BL['be_admin_struct_orderdesc'] ?></option>
 169          <option value="6"<?php is_selected(6, $content['alink']['alink_type']) ?>><?php echo $BL['be_article_cnt_start'].', '.$BL['be_admin_struct_orderasc'] ?></option>
 170          <option value="7"<?php is_selected(7, $content['alink']['alink_type']) ?>><?php echo $BL['be_article_cnt_end'].', '.$BL['be_admin_struct_orderdesc'] ?></option>
 171          <option value="8"<?php is_selected(8, $content['alink']['alink_type']) ?>><?php echo $BL['be_article_cnt_end'].', '.$BL['be_admin_struct_orderasc'] ?></option>
 172          
 173          <option value="18"<?php is_selected(18, $content['alink']['alink_type']) ?>><?php echo $BL['be_article_atitle'].', '.$BL['be_admin_struct_orderdesc'] ?></option>
 174          <option value="19"<?php is_selected(19, $content['alink']['alink_type']) ?>><?php echo $BL['be_article_atitle'].', '.$BL['be_admin_struct_orderasc'] ?></option>
 175          
 176          </optgroup>
 177          
 178          <optgroup label="<?php echo $BL['be_random']; ?>">
 179          
 180          <option value="9"<?php is_selected(9, $content['alink']['alink_type']) ?>><?php echo $BL['be_random'] ?></option>
 181          
 182          </optgroup>
 183  
 184          <optgroup label="<?php echo $BL['be_random'].', '.$BL['be_sorted']; ?>">
 185          
 186          <option value="10"<?php is_selected(10, $content['alink']['alink_type']) ?>><?php echo $BL['be_random'].', '.$BL['be_admin_struct_orderdate'].', '.$BL['be_admin_struct_orderdesc'] ?></option>
 187          <option value="11"<?php is_selected(11, $content['alink']['alink_type']) ?>><?php echo $BL['be_random'].', '.$BL['be_admin_struct_orderdate'].', '.$BL['be_admin_struct_orderasc'] ?></option>
 188          <option value="12"<?php is_selected(12, $content['alink']['alink_type']) ?>><?php echo $BL['be_random'].', '.$BL['be_admin_struct_orderchangedate'].', '.$BL['be_admin_struct_orderdesc'] ?></option>
 189          <option value="13"<?php is_selected(13, $content['alink']['alink_type']) ?>><?php echo $BL['be_random'].', '.$BL['be_admin_struct_orderchangedate'].', '.$BL['be_admin_struct_orderasc'] ?></option>
 190          <option value="14"<?php is_selected(14, $content['alink']['alink_type']) ?>><?php echo $BL['be_random'].', '.$BL['be_article_cnt_start'].', '.$BL['be_admin_struct_orderdesc'] ?></option>
 191          <option value="15"<?php is_selected(15, $content['alink']['alink_type']) ?>><?php echo $BL['be_random'].', '.$BL['be_article_cnt_start'].', '.$BL['be_admin_struct_orderasc'] ?></option>
 192          <option value="16"<?php is_selected(16, $content['alink']['alink_type']) ?>><?php echo $BL['be_random'].', '.$BL['be_article_cnt_end'].', '.$BL['be_admin_struct_orderdesc'] ?></option>
 193          <option value="17"<?php is_selected(17, $content['alink']['alink_type']) ?>><?php echo $BL['be_random'].', '.$BL['be_article_cnt_end'].', '.$BL['be_admin_struct_orderasc'] ?></option>        
 194  
 195          <option value="20"<?php is_selected(20, $content['alink']['alink_type']) ?>><?php echo $BL['be_random'].', '.$BL['be_article_atitle'].', '.$BL['be_admin_struct_orderdesc'] ?></option>
 196          <option value="21"<?php is_selected(21, $content['alink']['alink_type']) ?>><?php echo $BL['be_random'].', '.$BL['be_article_atitle'].', '.$BL['be_admin_struct_orderasc'] ?></option>
 197  
 198          
 199          </optgroup>
 200          
 201              </select></td>
 202              <td>&nbsp;&nbsp;</td>        
 203              <td bgcolor="#e7e8eb" id="prio0"><input type="checkbox" name="calink_prio" id="calink_prio" value="1"<?php is_checked(1, $content['alink']['alink_prio']) ?> /></td>
 204              <td bgcolor="#e7e8eb" id="prio1"><label for="calink_prio">&nbsp;<?php echo $BL['be_use_prio'] ?>&nbsp;&nbsp;</label></td>
 205          </tr>
 206          </table></td>
 207  </tr>
 208  
 209  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8" /></td></tr>
 210  
 211  <tr id="calink_manual_0"<?php if($content['alink']['alink_type']) echo ' style="display:none"'; ?>>
 212  <td align="right" valign="top" class="chatlist tdtop3"><?php echo $BL['be_selection'] ?>:&nbsp;</td>
 213  <td style="padding-bottom:3px;"><table border="0" cellpadding="0" cellspacing="0" summary="">
 214  
 215      <tr>
 216          <td rowspan="2"><select name="calink[]" size="8" multiple="multiple" class="f11 listrow" id="calink" style="width: 420px" ondblclick="moveSelectedOptions(teaser_items,source_items,true);">
 217  <?php
 218            //Auslesen der kompletten Public Artikel
 219            $sql  = "SELECT article_id, article_title, acat_name, acat_alias, article_cid ";
 220          $sql .= "FROM ".DB_PREPEND."phpwcms_article ar ";
 221          $sql .= "LEFT JOIN ".DB_PREPEND."phpwcms_articlecat ac ON ar.article_cid = ac.acat_id ";
 222          $sql .= "WHERE ar.article_public = 1 AND ar.article_deleted = 0 ";
 223          $sql .= "GROUP BY ar.article_id, ar.article_title, ac.acat_name ";
 224          $sql .= "ORDER BY ar.article_title;";
 225  
 226          $carticle_list = '';
 227          $carticle_link = $content['alink']['alink_id'];
 228          if($result = mysql_query($sql, $db) or die("error while reading complete article/articlecategory list")) {
 229              while($row = mysql_fetch_row($result)) {
 230                  $k  = 0;
 231                  $k1 = $BL['be_cnt_sitelevel'].': '.html_specialchars($row[2]); //$BL['be_admin_page_articlename']
 232                  if(empty($row[4])) {
 233                      $row[2] = $indexpage['acat_name'];
 234                      $row[3] = $indexpage['acat_alias'];
 235                  }
 236                  $alias_add  = ' ('.html_specialchars($row[2]);
 237                  if(!empty($row[3])) {
 238                      $alias_add .= '/'.html_specialchars($row[3]);
 239                  }
 240                  $alias_add .= ')';
 241                  foreach($content['alink']['alink_id'] as $key => $value) {
 242                      
 243                      if($row[0] == $value) {
 244                          $carticle_link[$key]  = '    <option value="'.$row[0].'" title="'.$k1;
 245                          $carticle_link[$key] .= '">'.html_specialchars($row[1]).$alias_add.'</option>'.LF;
 246                          unset($content['alink']['alink_id'][$key]);
 247                          $k = 1;
 248                      } 
 249                  
 250                  }
 251                  
 252                  if(!$k) {
 253                      $carticle_list .= '    <option value="'.$row[0].'" title="'.$k1;
 254                      $carticle_list .= '">'.html_specialchars($row[1]).$alias_add.'</option>'.LF;
 255                  }
 256              }
 257            }
 258          
 259          echo implode(LF, $carticle_link);
 260          
 261        ?>
 262          </select></td>
 263      
 264          <td rowspan="2">&nbsp;</td>
 265          <td valign="top">
 266          <a href="#" title="<?php echo $BL['be_cnt_sortup'] ?>" onclick="moveOptionUp(teaser_items);return false;"><img src="img/button/list_pos_up.gif" alt="" width="15" height="15" border="0" /></a>
 267          <br />
 268          <a href="#" title="<?php echo $BL['be_cnt_sortdown'] ?>" onclick="moveOptionDown(teaser_items);return false;"><img src="img/button/list_pos_down.gif" alt="" width="15" height="15" border="0" /></a></td>
 269      </tr>
 270      <tr>
 271        <td valign="bottom"><a href="#" title="<?php echo $BL['be_cnt_removearticleto'] ?>" onclick="moveSelectedOptions(teaser_items,source_items,false);return false;"><img src="img/button/del_image_button.gif" alt="" width="15" height="15" border="0" /></a></td>
 272       </tr>
 273      </table></td>
 274  </tr>
 275  <tr id="calink_manual_1"<?php if($content['alink']['alink_type']) echo ' style="display:none"'; ?>>  
 276      <td align="right" valign="top" class="chatlist" style="padding-top:3px;"><?php echo $BL['be_cnt_articles'] ?>:&nbsp;</td>
 277        <td><table border="0" cellpadding="0" cellspacing="0" summary="">
 278  
 279      <tr>
 280          <td><select name="calinklist" size="16" multiple="multiple" class="f11 listrow" id="calinklist" style="width:420px;" ondblclick="moveSelectedOptions(source_items,teaser_items,false);">
 281        <?php echo $carticle_list; ?>
 282                    </select></td>
 283        
 284        <td>&nbsp;</td>
 285        <td valign="top"><a href="#" title="<?php echo $BL['be_cnt_movearticleto'] ?>" onclick="moveSelectedOptions(source_items,teaser_items,false);return false"><img src="img/button/list_copy.gif" alt="" width="15" height="15" border="0" /></a></td>
 286      </tr>
 287      </table></td>
 288  </tr>
 289  
 290  
 291  <tr id="calink_auto_0"<?php if(!$content['alink']['alink_type']) echo ' style="display:none"'; ?>>
 292      <td align="right" valign="top" class="chatlist" style="padding-top:3px;"><?php echo $BL['be_cnt_rssfeed_max'] ?>:&nbsp;</td>
 293      <td><table border="0" cellpadding="0" cellspacing="0" summary="">
 294      
 295      <tr>
 296          <td><input name="calink_max" type="text" id="calink_max" class="f11b" style="width: 35px" value="<?php 
 297              echo empty($content['alink']['alink_max']) ? '' : $content['alink']['alink_max']; 
 298              ?>" size="5" maxlength="5" /></td>
 299          <td class="chatlist">&nbsp;<?php echo $BL['be_cnt_articles'] ?></td>
 300      </tr>
 301      
 302      </table></td>
 303  </tr>
 304  <tr id="calink_auto_1"<?php if(!$content['alink']['alink_type']) echo ' style="display:none"'; ?>>
 305      <td align="right" valign="top" class="chatlist" style="padding-top:6px;"><?php echo $BL['be_cnt_sitelevel'] ?>:&nbsp;</td>
 306      <td style="padding-top:3px;"><select name="calink_level[]" size="15" multiple="multiple" class="f11 optionhover" id="calink_level" style="width: 440px">
 307  <?php
 308                              
 309                  echo '<option value="0"';
 310                  if(in_array(0, $content['alink']['alink_level'])) echo ' selected="selected"';
 311                  echo '>'.html_specialchars($indexpage['acat_name']).'</option>'.LF;
 312                  struct_select_list(0, 0, $content['alink']['alink_level']);
 313  ?>
 314      </select></td>
 315  </tr>
 316  
 317  
 318  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="6" /></td></tr>
 319  
 320  <tr>
 321      <td align="right" class="chatlist"><?php echo $BL['be_tags'] ?>:&nbsp;</td>
 322      <td><table cellpadding="0" cellspacing="0" border="0" summary="">
 323          <tr>
 324              <td><input type="text" name="calink_category" id="calink_category" value="<?php echo html_specialchars(implode(', ', $content['alink']['alink_category'])) ?>" class="width350 bold" /></td>
 325              <td>&nbsp;&nbsp;</td>
 326              <td><select name="calink_andor" id="calink_andor">
 327                  
 328                  <option value="OR"<?php is_selected('OR', $content['alink']['alink_andor']) ?>><?php echo $BL['be_fsearch_or'] ?></option>
 329                  <option value="AND"<?php is_selected('AND', $content['alink']['alink_andor']) ?>><?php echo $BL['be_fsearch_and'] ?></option>
 330                  <option value="NOT"<?php is_selected('NOT', $content['alink']['alink_andor']) ?>><?php echo $BL['be_fsearch_not'] ?></option>
 331              
 332              </select></td>
 333          </tr>
 334          </table></td>        
 335  </tr>
 336  
 337  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8" /><script type="text/javascript">
 338  <!--
 339  
 340  window.addEvent('domready', function(){
 341                                       
 342      /* Autocompleter for categories/tags */
 343      var searchCategory = $('calink_category');
 344      var indicator2 = new Element('span', {'class': 'autocompleter-loading', 'styles': {'display': 'none'}}).setHTML('').injectAfter($('calink_andor'));
 345      var completer2 = new Autocompleter.Ajax.Json(searchCategory, 'include/inc_act/ajax_connector.php', {
 346          multi: true,
 347          maxChoices: 30,
 348          autotrim: true,
 349          minLength: 0,
 350          allowDupes: false,
 351          postData: {action: 'category', method: 'json'},
 352          onRequest: function(el) {
 353              indicator2.setStyle('display', '');
 354          },
 355          onComplete: function(el) {
 356              indicator2.setStyle('display', 'none');
 357          }
 358      });
 359  
 360  });
 361  
 362  var teaser_items = $('calink');
 363  var source_items = $('calinklist');
 364  
 365  //-->
 366  </script></td></tr>
 367  <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1" /></td></tr>
 368  


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