PageRenderTime 29ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/include/inc_tmpl/content/cnt1.inc.php

http://phpwcms.googlecode.com/
PHP | 205 lines | 157 code | 33 blank | 15 comment | 10 complexity | d7666e42cdb4eb386efab8915d12d7eb MD5 | raw file
Possible License(s): AGPL-1.0, LGPL-2.1, ISC, MIT, LGPL-3.0, GPL-2.0, MPL-2.0-no-copyleft-exception, LGPL-2.0, BSD-3-Clause
  1. <?php
  2. /**
  3. * phpwcms content management system
  4. *
  5. * @author Oliver Georgi <oliver@phpwcms.de>
  6. * @copyright Copyright (c) 2002-2013, Oliver Georgi
  7. * @license http://opensource.org/licenses/GPL-2.0 GNU GPL-2
  8. * @link http://www.phpwcms.de
  9. *
  10. **/
  11. // ----------------------------------------------------------------
  12. // obligate check for phpwcms constants
  13. if (!defined('PHPWCMS_ROOT')) {
  14. die("You Cannot Access This Script Directly, Have a Nice Day.");
  15. }
  16. // ----------------------------------------------------------------
  17. //image with text
  18. $template_default['article']['image_default_width'] = isset($template_default['article']['image_default_width']) ? $template_default['article']['image_default_width'] : '' ;
  19. $template_default['article']['image_default_height']= isset($template_default['article']['image_default_height']) ? $template_default['article']['image_default_height'] : '' ;
  20. if(empty($content['cimage']['cimage_crop'])) {
  21. $content['cimage']['cimage_crop'] = 0;
  22. }
  23. ?>
  24. <tr><td colspan="2" class="rowspacer0x7"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr>
  25. <tr>
  26. <td align="right" class="chatlist"><?php echo $BL['be_admin_struct_template']; ?>:&nbsp;</td>
  27. <td><select name="template" id="template" class="f11b">
  28. <?php
  29. echo '<option value="">'.$BL['be_admin_tmpl_default'].'</option>'.LF;
  30. // templates for frontend login
  31. $tmpllist = get_tmpl_files(PHPWCMS_TEMPLATE.'inc_cntpart/imagetext');
  32. if(is_array($tmpllist) && count($tmpllist)) {
  33. foreach($tmpllist as $val) {
  34. $selected_val = (isset($content["template"]) && $val == $content["template"]) ? ' selected="selected"' : '';
  35. $val = html_specialchars($val);
  36. echo ' <option value="' . $val . '"' . $selected_val . '>' . $val . '</option>' . LF;
  37. }
  38. }
  39. ?>
  40. </select></td>
  41. </tr>
  42. <tr><td colspan="2" class="rowspacer7x7"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr>
  43. <tr><td colspan="2" class="chatlist">&nbsp;<?php echo $BL['be_cnt_htmltext'] ?>:&nbsp;</td></tr>
  44. <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr>
  45. <tr><td colspan="2" align="center"><?php
  46. $wysiwyg_editor = array(
  47. 'value' => isset($content["text"]) ? $content["text"] : '',
  48. 'field' => 'ctext',
  49. 'height' => '650px',
  50. 'width' => '536px',
  51. 'rows' => '15',
  52. 'editor' => $_SESSION["WYSIWYG_EDITOR"],
  53. 'lang' => 'en'
  54. );
  55. include(PHPWCMS_ROOT.'/include/inc_lib/wysiwyg.editor.inc.php');
  56. ?></td></tr>
  57. <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td></tr>
  58. <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" /></td></tr>
  59. <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td></tr>
  60. <tr>
  61. <td align="right" class="chatlist"><?php echo $BL['be_cnt_image'] ?>:&nbsp;</td>
  62. <td valign="top"><table border="0" cellpadding="0" cellspacing="0" summary="">
  63. <tr>
  64. <td><input name="cimage_name" type="text" id="cimage_name" class="f11b" style="width: 300px; color: #727889;" value="<?php echo isset($content["image_name"]) ? html_specialchars($content["image_name"]) : '' ?>" size="40" maxlength="250" onfocus="this.blur()" /></td>
  65. <td><img src="img/leer.gif" alt="" width="3" height="1" /><a href="javascript:;" title="<?php echo $BL['be_cnt_openimagebrowser'] ?>" onclick="openFileBrowser('filebrowser.php?opt=0&amp;target=nolist')"><img src="img/button/open_image_button.gif" alt="" width="20" height="15" border="0" /></a></td>
  66. <td><img src="img/leer.gif" alt="" width="3" height="1" /><a href="javascript:;" title="<?php echo $BL['be_cnt_delimage'] ?>" onclick="document.articlecontent.cimage_name.value='';document.articlecontent.cimage_id.value='0';this.blur();return false;"><img src="img/button/del_image_button.gif" alt="" width="15" height="15" border="0" /></a>
  67. <input name="cimage_id" type="hidden" value="<?php echo isset($content["image_id"]) ? $content["image_id"] : '' ?>" /></td>
  68. </tr>
  69. </table></td>
  70. </tr>
  71. <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>
  72. <tr>
  73. <td align="right" class="chatlist"><?php echo $BL['be_cnt_position'] ?>:&nbsp;</td>
  74. <td valign="top"><table border="0" cellpadding="0" cellspacing="0" summary="">
  75. <tr>
  76. <td><select name="cimage_pos" class="f10" id="cimage_pos" onchange="changeImagePosMenu();">
  77. <option value="0" <?php
  78. if(!isset($content["image_pos"])) $content["image_pos"] = 0;
  79. is_selected(0, $content["image_pos"]) ?>><?php echo $BL['be_cnt_pos0'] ?></option>
  80. <option value="1" <?php is_selected(1, $content["image_pos"]) ?>><?php echo $BL['be_cnt_pos1'] ?></option>
  81. <option value="2" <?php is_selected(2, $content["image_pos"]) ?>><?php echo $BL['be_cnt_pos2'] ?></option>
  82. <option value="3" <?php is_selected(3, $content["image_pos"]) ?>><?php echo $BL['be_cnt_pos3'] ?></option>
  83. <option value="4" <?php is_selected(4, $content["image_pos"]) ?>><?php echo $BL['be_cnt_pos4'] ?></option>
  84. <option value="5" <?php is_selected(5, $content["image_pos"]) ?>><?php echo $BL['be_cnt_pos5'] ?></option>
  85. <option value="6" <?php is_selected(6, $content["image_pos"]) ?>><?php echo $BL['be_cnt_pos6'] ?></option>
  86. <option value="7" <?php is_selected(7, $content["image_pos"]) ?>><?php echo $BL['be_cnt_pos7'] ?></option>
  87. <option value="8" <?php is_selected(8, $content["image_pos"]) ?>><?php echo $BL['be_cnt_pos8'] ?></option>
  88. <option value="9" <?php is_selected(9, $content["image_pos"]) ?>><?php echo $BL['be_cnt_pos9'] ?></option>
  89. </select></td>
  90. <td><img src="img/leer.gif" alt="" width="3" height="1" /></td>
  91. <td><img src="img/symbole/content_selected.gif" alt="" name="imgpos0" width="7" height="10" id="imgpos0" /></td>
  92. <td><a href="javascript:;" onclick="changeImagePos(0);this.blur();return false;" title="<?php echo $BL['be_cnt_pos0i'] ?>"><img src="img/button/image_pos0.gif" alt="" width="15" height="15" border="0" /></a></td>
  93. <td><img src="img/leer.gif" alt="" name="imgpos1" width="7" height="10" id="imgpos1" /></td>
  94. <td><a href="javascript:;" onclick="changeImagePos(1);this.blur();return false;" title="<?php echo $BL['be_cnt_pos1i'] ?>"><img src="img/button/image_pos1.gif" alt="" width="15" height="15" border="0" /></a></td>
  95. <td><img src="img/leer.gif" alt="" name="imgpos2" width="7" height="10" id="imgpos2" /></td>
  96. <td><a href="javascript:;" onclick="changeImagePos(2);this.blur();return false;" title="<?php echo $BL['be_cnt_pos2i'] ?>"><img src="img/button/image_pos2.gif" alt="" width="15" height="15" border="0" /></a></td>
  97. <td><img src="img/leer.gif" alt="" name="imgpos3" width="7" height="10" id="imgpos3" /></td>
  98. <td><a href="javascript:;" onclick="changeImagePos(3);this.blur();return false;" title="<?php echo $BL['be_cnt_pos3i'] ?>"><img src="img/button/image_pos3.gif" alt="" width="15" height="15" border="0" /></a></td>
  99. <td><img src="img/leer.gif" alt="" name="imgpos4" width="7" height="10" id="imgpos4" /></td>
  100. <td><a href="javascript:;" onclick="changeImagePos(4);this.blur();return false;" title="<?php echo $BL['be_cnt_pos4i'] ?>"><img src="img/button/image_pos4.gif" alt="" width="15" height="15" border="0" /></a></td>
  101. <td><img src="img/leer.gif" alt="" name="imgpos5" width="7" height="10" id="imgpos5" /></td>
  102. <td><a href="javascript:;" onclick="changeImagePos(5);this.blur();return false;" title="<?php echo $BL['be_cnt_pos5i'] ?>"><img src="img/button/image_pos5.gif" alt="" width="15" height="15" border="0" /></a></td>
  103. <td><img src="img/leer.gif" alt="" name="imgpos6" width="7" height="10" id="imgpos6" /></td>
  104. <td><a href="javascript:;" onclick="changeImagePos(6);this.blur();return false;" title="<?php echo $BL['be_cnt_pos6i'] ?>"><img src="img/button/image_pos6.gif" alt="" width="15" height="15" border="0" /></a></td>
  105. <td><img src="img/leer.gif" alt="" name="imgpos7" width="7" height="10" id="imgpos7" /></td>
  106. <td><a href="javascript:;" onclick="changeImagePos(7);this.blur();return false;" title="<?php echo $BL['be_cnt_pos7i'] ?>"><img src="img/button/image_pos7.gif" alt="" width="15" height="15" border="0" /></a></td>
  107. <td><img src="img/leer.gif" alt="" name="imgpos8" width="7" height="10" id="imgpos8" /></td>
  108. <td><a href="javascript:;" onclick="changeImagePos(8);this.blur();return false;" title="<?php echo $BL['be_cnt_pos8i'] ?>"><img src="img/button/image_pos8.gif" alt="" width="15" height="15" border="0" /></a></td>
  109. <td><img src="img/leer.gif" alt="" name="imgpos9" width="7" height="10" id="imgpos9" /></td>
  110. <td><a href="javascript:;" onclick="changeImagePos(9);this.blur();return false;" title="<?php echo $BL['be_cnt_pos9i'] ?>"><img src="img/button/image_pos9.gif" alt="" width="15" height="15" border="0" /></a></td>
  111. </tr>
  112. </table><script language="JavaScript" type="text/javascript">
  113. <!--
  114. changeImagePos(<?php echo intval($content["image_pos"]); ?>);
  115. //-->
  116. </script></td>
  117. </tr>
  118. <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="6" /></td></tr>
  119. <tr>
  120. <td align="right" class="chatlist"><?php echo $BL['be_cnt_maxw'] ?>:&nbsp;</td>
  121. <td valign="top"><table border="0" cellpadding="0" cellspacing="0" summary="">
  122. <tr>
  123. <td><input name="cimage_width" type="text" class="f11b" id="cimage_width" style="width: 50px;" size="4" maxlength="4" onkeyup="if(!parseInt(this.value)) this.value='';" value="<?php echo empty($content["image_width"]) ? $template_default['article']['image_default_width'] : $content["image_width"] ?>" /></td>
  124. <td class="chatlist">&nbsp;&nbsp;<?php echo $BL['be_cnt_maxh'] ?>:&nbsp; </td>
  125. <td><input name="cimage_height" type="text" class="f11b" id="cimage_height" style="width: 50px;" size="4" maxlength="4" onkeyup="if(!parseInt(this.value)) this.value='';" value="<?php echo empty($content["image_height"]) ? $template_default['article']['image_default_height'] : $content["image_height"] ?>" /></td>
  126. <td class="chatlist">&nbsp;px&nbsp;&nbsp;&nbsp;</td>
  127. <td><input type="checkbox" name="cimage_crop" id="cimage_crop" value="1" <?php is_checked(1, $content['cimage']['cimage_crop']); ?> /></td>
  128. <td class="v10"><label for="cimage_crop" class="checkbox"><?php echo $BL['be_image_crop'] ?></label></td>
  129. </tr>
  130. </table></td> </tr>
  131. <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="6" /></td></tr>
  132. <tr>
  133. <td align="right" class="chatlist"><?php echo $BL['be_cnt_behavior'] ?>:&nbsp;</td>
  134. <td valign="top"><table border="0" cellpadding="0" cellspacing="0" summary="">
  135. <tr>
  136. <td><input name="cimage_zoom" type="checkbox" id="cimage_zoom" value="1" <?php is_checked(1, empty($content["image_zoom"]) ? 0 : 1); ?> /></td>
  137. <td class="v10"><label for="cimage_zoom" class="checkbox"><?php echo $BL['be_cnt_enlarge'] ?></label></td>
  138. <td>&nbsp;</td>
  139. <td><input name="cimage_lightbox" type="checkbox" id="cimage_lightbox" value="1" <?php is_checked(1, empty($content['cimage']['cimage_lightbox']) ? 0 : 1); ?> onchange="if(this.checked){getObjectById('cimage_zoom').checked=true;}" /></td>
  140. <td class="v10"><label for="cimage_lightbox" class="checkbox"><?php echo $BL['be_cnt_lightbox'] ?></label></td>
  141. <td>&nbsp;</td>
  142. <td><input name="cimage_nocaption" type="checkbox" id="cimage_nocaption" value="1" <?php is_checked(1, empty($content['cimage']['cimage_nocaption']) ? 0 : 1); ?> /></td>
  143. <td class="v10"><label for="cimage_nocaption" class="checkbox"><?php echo $BL['be_cnt_imglist_nocaption'] ?></label></td>
  144. </tr>
  145. </table>
  146. </td>
  147. </tr>
  148. <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="6" /></td></tr>
  149. <tr>
  150. <td align="right" valign="top" class="chatlist"><img src="img/leer.gif" alt="" width="1" height="13" /><?php echo $BL['be_cnt_caption'] ?>:&nbsp;</td>
  151. <td valign="top"><table border="0" cellpadding="0" cellspacing="0" summary="">
  152. <tr>
  153. <td valign="top"><textarea name="cimage_caption" cols="30" rows="4" class="f11" id="cimage_caption" style="width: 300px;"><?php echo isset($content["image_caption"]) ? html_specialchars($content["image_caption"]) : '' ?></textarea></td>
  154. <td valign="top"><img src="img/leer.gif" alt="" width="15" height="1" /></td>
  155. <td valign="top"><?php
  156. if(isset($content["image_hash"])) {
  157. $thumb_image = get_cached_image(
  158. array( "target_ext" => $content["image_ext"],
  159. "image_name" => $content["image_hash"] . '.' . $content["image_ext"],
  160. "thumb_name" => md5($content["image_hash"].$phpwcms["img_list_width"].$phpwcms["img_list_height"].$phpwcms["sharpen_level"])
  161. )
  162. );
  163. if($thumb_image != false) {
  164. echo '<img src="'.PHPWCMS_IMAGES . $thumb_image[0] .'" border="0" '.$thumb_image[3].'>';
  165. }
  166. }
  167. ?></td>
  168. </tr>
  169. </table></td>
  170. </tr>
  171. <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8" /></td></tr>
  172. <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" /></td></tr>