[ Index ]

PHP Cross Reference of phpwcms V1.5.0 _r431 (28.01.12)

title

Body

[close]

/include/inc_lib/content/ -> cnt8.readform.inc.php (source)

   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  // ----------------------------------------------------------------
  25  // obligate check for phpwcms constants
  26  if (!defined('PHPWCMS_ROOT')) {
  27     die("You Cannot Access This Script Directly, Have a Nice Day.");
  28  }
  29  // ----------------------------------------------------------------
  30  
  31  
  32  
  33  // Content Type Link Articles
  34  
  35  $content['alink']['alink_template']        = clean_slweg($_POST["calink_template"]);
  36  $content['alink']['alink_allowedtags']    = slweg($_POST["calink_allowedtags"]);
  37  $content['alink']['alink_id']            = (isset($_POST["calink"]) && is_array($_POST["calink"])) ? $_POST["calink"] : array();
  38  $content['alink']['alink_level']        = (isset($_POST["calink_level"]) && is_array($_POST["calink_level"])) ? $_POST["calink_level"] : array();
  39  
  40  // article select type
  41  $content['alink']['alink_type']            = intval($_POST['calink_type']);
  42  if($content['alink']['alink_type'] > 21) $content['alink']['alink_type'] = 0;
  43  
  44  // summary wordlimit
  45  $content['alink']['alink_wordlimit']    = intval($_POST['calink_wordlimit']);
  46  
  47  // handle teaser for columns
  48  $content['alink']['alink_columns']        = empty($_POST['calink_columns']) ? 0 : intval($_POST['calink_columns']);
  49  
  50  // link against structure level link for single articles
  51  $content['alink']['alink_categoryalias'] = empty($_POST['calink_categoryalias']) ? 0 : 1;
  52  
  53  // max auto article
  54  $content['alink']['alink_max']            = intval($_POST['calink_max']);
  55  
  56  // image settings
  57  $content['alink']['alink_width']        = intval($_POST['calink_width']);
  58  $content['alink']['alink_height']        = intval($_POST['calink_height']);
  59  $content['alink']['alink_zoom']            = empty($_POST['calink_zoom']) ? 0 : 1;
  60  $content['alink']['alink_unique']        = empty($_POST['calink_unique']) ? 0 : 1;
  61  $content['alink']['alink_crop']            = empty($_POST['calink_crop']) ? 0 : 1;
  62  $content['alink']['alink_prio']            = empty($_POST['calink_prio']) ? 0 : 1;
  63  
  64  if( empty($_POST['calink_andor']) ) {
  65      $content['alink']['alink_andor'] = 'OR';
  66  } else {
  67      $content['alink']['alink_andor'] = in_array($_POST['calink_andor'], array('OR', 'AND', 'NOT') ) ? $_POST['calink_andor'] : 'OR';
  68  }
  69  
  70  $content['alink']['alink_category']        = convertStringToArray( clean_slweg($_POST['calink_category']) );
  71  
  72  if(empty($content['alink']['alink_width'])) $content['alink']['alink_width'] = '';
  73  if(empty($content['alink']['alink_height'])) $content['alink']['alink_height'] = '';
  74  if(empty($content['alink']['alink_wordlimit'])) $content['alink']['alink_wordlimit'] = '';
  75  if(empty($content['alink']['alink_max'])) $content['alink']['alink_max'] = '';
  76  
  77  
  78  foreach($content['alink']['alink_id'] as $key => $value) {
  79      $value = intval($value);
  80      if($value) {
  81          $content['alink']['alink_id'][$key] = $value;
  82      } else {
  83          unset($content['alink']['alink_id'][$key]);
  84      }
  85  }
  86  
  87  ?>


Generated: Sun Jan 29 16:31:14 2012 Cross-referenced by PHPXref 0.7.1