| [ Index ] |
|
Code source de Plume CMS 1.2.2 |
1 <?php 2 /* -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 3 /* 4 # ***** BEGIN LICENSE BLOCK ***** 5 # This file is part of Plume CMS, a website management application. 6 # Copyright (C) 2001-2005 Loic d'Anterroches and contributors. 7 # 8 # Plume CMS is free software; you can redistribute it and/or modify 9 # it under the terms of the GNU General Public License as published by 10 # the Free Software Foundation; either version 2 of the License, or 11 # (at your option) any later version. 12 # 13 # Plume CMS is distributed in the hope that it will be useful, 14 # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 # GNU General Public License for more details. 17 # 18 # You should have received a copy of the GNU General Public License 19 # along with this program; if not, write to the Free Software 20 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 21 # 22 # ***** END LICENSE BLOCK ***** */ 23 24 if (basename($_SERVER['SCRIPT_NAME']) == 'article-page-edit.php') exit; 25 26 /* ===================================================== * 27 * Preview of the content if some content is available * 28 * ===================================================== */ 29 $link = '<a tabindex="1" href="articles.php?resource_id=' 30 .$ar->f('resource_id').'">'.$ar->f('title').'</a>'; 31 32 if ($ar->pages->f('page_id') > 0) { 33 echo '<p>'.sprintf(__('Your are editing page %s of the article: %s.'), 34 '<strong>'.$ar->pages->f('page_number').'</strong>', $link).'</p>'; 35 } else { 36 echo '<p>'.sprintf(__('Your are adding a page to the article: %s.'), $link) 37 .'</p>'; 38 } 39 40 if (strlen($ar->getUnformattedContent('page_content', 'pages'))) { 41 echo '<div class="preview">'; 42 43 echo '<h1 class="title">'.$ar->getTextContent('page_title', 'pages') 44 .'</h1>'; 45 echo $ar->getFormattedContent('page_content', 'html', 'pages'); 46 echo "<hr class='invisible' id=\"zoubida\"/></div>\n\n"; 47 } 48 49 /* ================================================= * 50 * If is editable form to modify the page content * 51 * ================================================= */ 52 if ($is_editable) { 53 echo '<form action="articles.php" method="post" id="formPost" ' 54 .'onsubmit="return isReady(\'a_page_title\',\'' 55 .addslashes(__('The page must have a title.')).'\')">'; 56 echo "<p>\n"; 57 echo '<span class="nowrap"><label for="a_page_number" ' 58 .'style="display:inline">'.__('Number of the page').' ' 59 .$m->HelpLink('article', 'h-page-number').'</label>'."\n"; 60 echo form::combobox('a_page_number', $ar->getArrayPageList(), 61 $ar->pages->f('page_number'), '', 2); 62 echo '</span>'."\n"; 63 64 echo '<span class="nowrap"><label for="a_page_content_format" ' 65 .'style="display:inline">'.__('Format').' ' 66 .$m->HelpLink('article', 'h-format').'</label>'."\n"; 67 68 echo form::combobox('a_page_content_format', 69 array('HTML'=>'html','Wiki'=>'wiki'), 70 $ar->getContentFormat('page_content', 'pages'), 71 $m->user->getPref('content_format'),3) 72 .'</span>'."\n"; 73 74 echo "</p>\n"; 75 echo '<p><label for="a_page_title"><strong>'.__('Page title').'</strong> ' 76 .$m->HelpLink('article', 'h-page-title').'</label>'."\n"; 77 echo form::textField('a_page_title', 30, 255, 78 $ar->pages->f('page_title'), 4, 79 'style="width:100%"').'</p>'."\n"; 80 81 echo '<p>'."\n" 82 .'<span id="insert-img" class="bloc-droite"><img src="themes/'.$_px_theme 83 .'/images/ico_image.png" alt="" />' 84 .'<strong><a href="xmedia.php" accesskey="i" ' 85 .'onclick="popup(this.href+\'?mode=popup\'); return false;">' 86 .__('Insert an image or a file').'</a></strong></span>'; 87 echo '<label for="a_page_content"><strong>'.__('Page content').'</strong>' 88 .$m->HelpLink('article', 'h-page-content').'</label>'."\n"; 89 echo form::textArea('a_page_content', 60, 90 $m->user->getPref('article_textarea_page'), 91 $ar->getUnformattedContent('page_content', 'pages'), 5, 92 'style="width:100%"')."\n"; 93 echo '<span id="size-control" class="size-control">'."\n" 94 .'<input type="image" alt="'.__('shrink textarea').'" ' 95 .'name="decrease" value="-" src="themes/'.$_px_theme 96 .'/images/ico_shrink.png" accesskey="-" class="size-control" />'."\n" 97 .'<input type="image" alt="'.__('grow textarea').'" ' 98 .'name="increase" value="+" src="themes/'.$_px_theme 99 .'/images/ico_grow.png" accesskey="+" class="size-control" />'; 100 echo '</span>'."\n"; 101 echo '</p>'."\n"; 102 103 echo '<p><a href="articles.php?resource_id='.$ar->f('resource_id').'">' 104 .__('Back to the article').'</a></p>'."\n"; 105 106 echo '<p><input name="preview" tabindex="6" type="submit" class="submit" ' 107 .'value="'.__('Visualize [v]').'" accesskey="v" /> ' 108 .'<input name="publish" tabindex="7" type="submit" class="submit" ' 109 .'value="'.__('Save [s]').'" accesskey="s" />'."\n"; 110 echo form::hidden('op', 'page'); 111 echo form::hidden('resource_id', $ar->f('resource_id')); 112 113 if ($ar->getContentFormat('page_content', 'pages') == 'wiki') { 114 115 echo ' <input name="transform" tabindex="8" type="submit" ' 116 .'class="submit" value="'. __('Transform in XHTML').'" />'; 117 } 118 119 if ($ar->pages->f('page_id') > 0) { 120 echo ' <input name="delete" tabindex="9" type="submit" ' 121 .'class="submit" value="'. __('Delete').'" onclick="return '. 122 'window.confirm(\'' 123 .addslashes(__('Are you sure you want to delete this page?')) 124 .'\')" />'; 125 echo form::hidden('a_page_id', $ar->pages->f('page_id')); 126 } 127 echo '</p>'."\n"; 128 echo '</form>'."\n"; 129 echo '<h3><a onclick="openClose(\'wikihelp\',0); return false" ' 130 .'href="#"><img alt="'.__('show/hide').'" id="img_wikihelp" ' 131 .'src="themes/'.$_px_theme.'/images/plus.png" /></a>' 132 .__('Wiki syntax').'</h3>'."\n"; 133 echo '<div id="wikihelp" style="display: none;">' 134 .$m->getHelp('wiki-inline').'</div>'."\n"; 135 echo '<script type="text/javascript"><!-- '."\n" 136 .'openClose(\'wikihelp\',-1);'."\n" 137 .'//--></script>'; 138 }
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
| Généré le : Mon Nov 26 11:57:01 2007 | par Balluche grâce à PHPXref 0.7 |
|