[ Index ]

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

title

Body

[close]

/include/inc_tmpl/content/ -> cnt26.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  //recipe
  32  
  33  unset($_SESSION['filebrowser_image_target']);
  34  
  35  // base values
  36  if(empty($content['recipe']['calorificvalue_add']))        $content['recipe']['calorificvalue_add']    = '';
  37  if(empty($content['recipe']['preparation']))            $content['recipe']['preparation']            = '';
  38  if(empty($content['recipe']['ingredients']))            $content['recipe']['ingredients']            = '';
  39  if(empty($content['recipe']['time_add']))                $content['recipe']['time_add']                = '';
  40  if(empty($content['recipe']['category']))                $content['recipe']['category']                = '';
  41  if(empty($content['recipe']['severity']))                $content['recipe']['severity']                = 1;
  42  
  43  
  44  // retrieve all available keywords
  45  $content['recipe']['get_keywords'] = _dbQuery('SELECT acontent_text FROM '.DB_PREPEND.'phpwcms_articlecontent WHERE acontent_type=26 AND acontent_trash=0');
  46  $content['recipe']['all_keywords'] = '';
  47  if($content['recipe']['get_keywords']) {
  48      foreach($content['recipe']['get_keywords'] as $temp_val) {
  49          if($temp_val['acontent_text']) {
  50              if($content['recipe']['all_keywords']) $content['recipe']['all_keywords'] .= ', ';
  51              $content['recipe']['all_keywords'] .= $temp_val['acontent_text'];
  52          }
  53      }
  54  }
  55  $content['recipe']['all_keywords'] = convertStringToArray($content['recipe']['all_keywords']);
  56  
  57  ?>
  58  <!-- 
  59  <link href="../../inc_css/phpwcms.css" rel="stylesheet" type="text/css">
  60  <table cellspacing="0" cellpadding="0" border="0" bgcolor="#FFFFFF" width="440">
  61   
  62  //-->
  63  
  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  <?php
  67  
  68  if(count($content['recipe']['all_keywords'])) {
  69  
  70      echo '<tr><td>&nbsp;</td><td>';
  71      echo '<table cellpadding="0" cellspacing="0" border="0" bgcolor="#E7E8EB"><tr><td style="padding:2px;">';
  72      echo '<select name="ph1" id="ph1" class="v10" ';
  73      echo 'onChange="insertAtCursorPos(document.articlecontent.recipe_category, ';
  74      echo '\', \'+document.articlecontent.ph1.options[document.articlecontent.ph1.selectedIndex].value);">';
  75      
  76      foreach($content['recipe']['all_keywords'] as $temp_val) {
  77          $temp_val = html_specialchars($temp_val);
  78          echo '    <option value="'.$temp_val.'">'.$temp_val.'</option>'.LF;
  79      }
  80      
  81      echo '</select></td>';
  82      echo '<td><img src="img/button/go04.gif" width="15" height="15" title="Insert" border="0" ';
  83      echo 'onclick="insertAtCursorPos(document.articlecontent.recipe_category, ';
  84      echo '\', \'+document.articlecontent.ph1.options[document.articlecontent.ph1.selectedIndex].value);" style="margin:3px;">';
  85      echo '</td></tr></table></td></tr>'.LF;
  86  
  87  }
  88  ?>
  89  <tr>
  90    <td align="right" valign="top" class="chatlist"><img src="img/leer.gif" alt="" width="1" height="13"><?php echo $BL['be_ftptakeover_keywords'] ?>:&nbsp;</td>
  91    <td valign="top"><textarea name="recipe_category" id="recipe_category" cols="40" rows="2" class="f11" style="width:440px"><?php echo html_specialchars($content['recipe']['category']) ?></textarea></td>
  92  </tr>
  93  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="6"></td></tr>
  94  <tr>
  95      <td align="right" class="chatlist"><?php echo $BL['be_admin_struct_template'] ?>:&nbsp;</td>
  96      <td><select name="recipe_template" id="recipe_template" class="f11b">
  97  <?php
  98  
  99  // templates for recipes
 100  $tmpllist = get_tmpl_files(PHPWCMS_TEMPLATE.'inc_cntpart/recipe');
 101  if(is_array($tmpllist) && count($tmpllist)) {
 102      foreach($tmpllist as $val) {
 103          if(isset($content['recipe']['template']) && $val == $content['recipe']['template']) {
 104              $selected_val = ' selected="selected"';
 105          } else {
 106              $selected_val = '';
 107          }
 108          $val = htmlspecialchars($val);
 109          echo '    <option value="' . $val . '"' . $selected_val . '>' . $val . '</option>' . LF;
 110      }
 111  }
 112  
 113  ?>                  
 114          </select></td>
 115  </tr>
 116  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8"></td></tr>
 117  <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt=""></td></tr>
 118  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8"></td></tr>
 119  <tr>
 120    <td align="right" valign="top" class="chatlist"><img src="img/leer.gif" alt="" width="1" height="13">Zutaten:&nbsp;</td>
 121    <td valign="top"><textarea name="recipe_ingredients" id="recipe_ingredients" cols="40" rows="6" class="f11" style="width:440px"><?php echo html_specialchars($content['recipe']['ingredients']) ?></textarea></td>
 122  </tr>
 123  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="4"></td></tr>
 124  <tr>
 125      <td align="right" class="chatlist">Zuber.Zeit:&nbsp;</td>
 126      <td><table border="0" cellpadding="0" cellspacing="0" summary="">
 127          <tr>
 128              <td><input name="recipe_time" type="text" id="recipe_time" class="f11" style="width:35px;" value="<?php echo empty($content['recipe']['time']) ? '' : intval($content['recipe']['time']) ?>" onkeyup="this.value=int_only(this.value);" size="5" /></td>
 129              <td class="chatlist" style="width:60px;">&nbsp;<?php echo $BL['be_date_minutes'] ?>&nbsp;</td>
 130              <td align="right" class="chatlist" style="width:75px;"><?php echo $BL['be_cnt_additional'] ?>:&nbsp;</td>
 131              <td><input name="recipe_time_add" type="text" id="recipe_time_add" class="f11" style="width:250px;" value="<?php echo html_specialchars($content['recipe']['time_add']) ?>" size="40" /></td>
 132          </tr>
 133      </table></td>
 134  </tr>
 135  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="4"></td></tr>
 136  <tr>
 137      <td align="right" class="chatlist">N&auml;hrwert:&nbsp;</td>
 138      <td><table border="0" cellpadding="0" cellspacing="0" summary="">
 139          <tr>
 140              <td><input name="recipe_calorificvalue" type="text" id="recipe_calorificvalue" class="f11" style="width:35px;" value="<?php echo empty($content['recipe']['calorificvalue']) ? '' : intval($content['recipe']['calorificvalue']) ?>" size="5" onkeyup="this.value=int_only(this.value);" /></td>
 141              <td class="chatlist" style="width:60px;">&nbsp;kJ&nbsp;</td>
 142              <td align="right" class="chatlist" style="width:75px;"><?php echo $BL['be_cnt_additional'] ?>:&nbsp;</td>
 143              <td><input name="recipe_calorificvalue_add" type="text" id="recipe_calorificvalue_add" class="f11" style="width:250px;" value="<?php echo html_specialchars($content['recipe']['calorificvalue_add']) ?>" size="40" /></td>
 144          </tr>
 145      </table></td>
 146  </tr>
 147  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="4"></td></tr>
 148  <tr>
 149    <td align="right" class="chatlist">Schwierigkeit:&nbsp;</td>
 150    <td valign="top"><table border="0" cellpadding="0" cellspacing="0" bgcolor="#E7E8EB" summary="">
 151        <tr>
 152          <td><input name="recipe_severity" id="recipe_severity_1" type="radio" value="1" <?php is_checked(1, $content['recipe']['severity']); ?>></td>
 153          <td class="v10"><label for="recipe_severity_1">1</label>&nbsp;&nbsp;</td>
 154          <td><input name="recipe_severity" id="recipe_severity_2" type="radio" value="2" <?php is_checked(2, $content['recipe']['severity']); ?>></td>
 155          <td class="v10"><label for="recipe_severity_2">2</label>&nbsp;&nbsp;</td>
 156          <td><input name="recipe_severity" id="recipe_severity_3" type="radio" value="3" <?php is_checked(3, $content['recipe']['severity']); ?>></td>
 157          <td class="v10"><label for="recipe_severity_3">3</label>&nbsp;&nbsp;</td>
 158          <td><input name="recipe_severity" id="recipe_severity_4" type="radio" value="4" <?php is_checked(4, $content['recipe']['severity']); ?>></td>
 159          <td class="v10"><label for="recipe_severity_4">4</label>&nbsp;&nbsp;</td>
 160          <td><input name="recipe_severity" id="recipe_severity_5" type="radio" value="5" <?php is_checked(5, $content['recipe']['severity']); ?>></td>
 161          <td class="v10"><label for="recipe_severity_5">5</label>&nbsp;</td>
 162          <td style="height: 22px;">&nbsp;</td>
 163        </tr>
 164      </table></td>
 165  </tr>
 166  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8"></td></tr>
 167  <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt=""></td></tr>
 168  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="4"></td></tr>
 169  <tr><td colspan="2" class="chatlist">Zubereitung:&nbsp;</td></tr>
 170  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="2"></td></tr>
 171  <tr><td colspan="2" align="center"><?php
 172  
 173  $wysiwyg_editor = array(
 174      'value'        => $content['recipe']['preparation'],
 175      'field'        => 'recipe_preparation',
 176      'height'    => '250px',
 177      'width'        => '536px',
 178      'rows'        => '10',
 179      'editor'    => $_SESSION["WYSIWYG_EDITOR"],
 180      'lang'        => 'en'
 181  );
 182  
 183  include (PHPWCMS_ROOT.'/include/inc_lib/wysiwyg.editor.inc.php');
 184  
 185  ?></td></tr>
 186  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10"></td></tr>
 187  <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt=""></td></tr>
 188  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10"></td></tr>
 189  <!--  </table>-->


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