コード例 #1
0
ファイル: admin_ckeditor.php プロジェクト: Knuzen/gpEasy-CMS
 /**
  * Show a CKEditor instance
  *
  */
 function Example()
 {
     //echo '<table style="width:100%"><tr><td style="width:300px">';
     $content = '<h3>Lorem Ipsum</h3> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed tempor lectus id lectus laoreet scelerisque.</p><p>Vestibulum suscipit, lectus a feugiat facilisis, enim arcu fringilla nisi, et scelerisque nibh sapien in quam. Vivamus sit amet elementum nibh. Donec id ipsum nibh. Aliquam ligula nulla, condimentum sit amet consectetur eu, sagittis id ligula. In felis justo, feugiat et luctus sit amet, feugiat eget odio. Nullam suscipit mollis ipsum nec ultrices. Praesent ut lacus lorem. Fusce adipiscing arcu vitae dui ullamcorper a imperdiet felis dignissim. Maecenas eget tortor mi.</p>';
     gp_edit::UseCK($content);
     //echo '</td><td>';
     //echo '<div id="available_icons"></div>';
     //echo '</td></table>';
 }
コード例 #2
0
 function EditExtra()
 {
     global $langmessage;
     $title = gp_edit::CleanTitle($_REQUEST['file']);
     if (empty($title)) {
         message($langmessage['OOPS']);
         return false;
     }
     $data = gpOutput::ExtraContent($title);
     echo '<form action="' . common::GetUrl('Admin_Extra', 'file=' . $title) . '" method="post">';
     echo '<h2>';
     echo common::Link('Admin_Extra', $langmessage['theme_content']);
     echo ' &#187; ' . str_replace('_', ' ', $title) . '</h2>';
     echo '<input type="hidden" name="cmd" value="save" />';
     gp_edit::UseCK($data['content']);
     echo '<input type="submit" name="" value="' . $langmessage['save'] . '" class="gpsubmit" />';
     echo '<input type="submit" name="cmd" value="' . $langmessage['cancel'] . '" class="gpcancel"/>';
     echo '</form>';
     return true;
 }
コード例 #3
0
ファイル: common.php プロジェクト: Knuzen/gpEasy-CMS
 /**
  * @deprecated 3.0
  * Use gp_edit::UseCK();
  */
 static function UseCK($contents, $name = 'gpcontent', $options = array())
 {
     trigger_error('Deprecated Function');
     includeFile('tool/editing.php');
     gp_edit::UseCK($contents, $name, $options);
 }
コード例 #4
0
ファイル: admin_missing.php プロジェクト: VTAMAGNO/gpEasy-CMS
 function Edit404($text = false)
 {
     global $langmessage;
     if ($text === false) {
         if (isset($this->error_data['404_TEXT'])) {
             $text = $this->error_data['404_TEXT'];
         } else {
             $text = special_missing::DefaultContent();
         }
     }
     echo '<h2>' . $langmessage['Link Errors'] . ' &#187; ' . $langmessage['404_Page'] . '</h2>';
     echo '<form action="' . common::GetUrl('Admin_Missing') . '" method="post">';
     echo '<input type="hidden" name="cmd" value="save404" />';
     gp_edit::UseCK($text);
     echo '<input type="submit" name="" value="' . $langmessage['save'] . '" class="gpsubmit"/>';
     echo ' <input type="submit" name="cmd" value="' . $langmessage['cancel'] . '" class="gpcancel"/>';
     echo '</form>';
     echo '<table class="bordered">';
     echo '<tr><th>';
     echo $langmessage['Useful Variables'];
     echo '</th>';
     echo '<th>';
     echo '&nbsp;';
     echo '</th>';
     echo '</tr>';
     echo '<tr><td>';
     echo '{{Similar_Titles}}';
     echo '</td>';
     echo '<td>';
     echo $langmessage['Similar_Titles'];
     echo '</td>';
     echo '</tr></table>';
 }
コード例 #5
0
ファイル: common.php プロジェクト: rizub4u/gpEasy-CMS
 /**
  * @deprecated
  * Use gp_edit::UseCK();
  */
 function UseCK($contents, $name = 'gpcontent', $options = array())
 {
     includeFile('tool/editing.php');
     return gp_edit::UseCK($contents, $name, $options);
 }
コード例 #6
0
 /**
  * Display form for submitting posts (new and edit)
  *
  */
 function PostForm(&$array, $cmd = 'save_new', $post_id = false)
 {
     global $langmessage;
     includeFile('tool/editing.php');
     $array += array('title' => '', 'content' => '', 'subtitle' => '', 'isDraft' => false, 'categories' => array());
     $array['title'] = SimpleBlogCommon::Underscores($array['title']);
     echo '<form action="' . SimpleBlogCommon::PostUrl($post_id) . '" method="post">';
     echo '<table style="width:100%">';
     echo '<tr><td>';
     echo 'Title';
     echo '</td><td>';
     echo '<input type="text" name="title" value="' . $array['title'] . '" />';
     echo '</td></tr>';
     echo '<tr><td>';
     echo 'Sub-Title';
     echo '</td><td>';
     echo '<input type="text" name="subtitle" value="' . $array['subtitle'] . '" />';
     echo '</td></tr>';
     echo '<tr><td>';
     echo 'Draft';
     echo '</td><td>';
     echo '<input type="checkbox" name="isDraft" value="on" ';
     if ($array['isDraft']) {
         echo 'checked="true"';
     }
     echo '" />';
     echo '</td></tr>';
     $this->show_category_list($post_id, $array);
     echo '<tr><td colspan="2">';
     gp_edit::UseCK($array['content'], 'content');
     echo '</td></tr>';
     echo '<tr><td colspan="2">';
     echo '<input type="hidden" name="cmd" value="' . $cmd . '" />';
     echo '<input type="hidden" name="id" value="' . $post_id . '" />';
     echo '<input type="submit" name="" value="' . $langmessage['save'] . '" /> ';
     echo '<input type="submit" name="cmd" value="' . $langmessage['cancel'] . '" />';
     echo '</td></tr>';
     echo '</table>';
     echo '</form>';
 }
コード例 #7
0
ファイル: Posts.php プロジェクト: jozefkrz/gpEasy-CMS
 /**
  * Display form for submitting posts (new and edit)
  *
  * @param string $label
  * @param array $array
  * @param string $cmd
  * @param int|string $post_id
  */
 private function PostForm($label, &$array, $cmd = 'save_new', $post_id = null)
 {
     global $langmessage;
     includeFile('tool/editing.php');
     $array += array('title' => '', 'content' => '', 'subtitle' => '', 'isDraft' => false, 'categories' => array(), 'time' => time());
     if ($post_id) {
         $array += array('isDraft' => SimpleBlogCommon::AStrGet('drafts', $post_id));
     }
     $array['title'] = SimpleBlogCommon::Underscores($array['title']);
     $action = common::GetUrl('Admin_Blog');
     if ($post_id) {
         $action = common::GetUrl('Admin_Blog/' . $post_id);
     }
     echo '<form class="post_form" action="' . $action . '" method="post">';
     //save
     echo '<div style="float:right">';
     echo '<input type="hidden" name="cmd" value="' . $cmd . '" />';
     echo '<input class="gpsubmit" type="submit" name="" value="' . $langmessage['save'] . '" /> ';
     echo common::Link('Admin_Blog', $langmessage['cancel'], '', ' class="gpcancel"');
     if ($post_id) {
         echo SimpleBlogCommon::PostLink($post_id, 'View Post', '', 'target="_blank"');
     }
     echo '</div>';
     //heading
     echo '<h2 class="hmargin">' . $label . '</h2>';
     echo '<div class="sb_post_container cf">';
     echo '<div class="sb_post_container_right">';
     //title + sub-title
     echo '<div class="sb_edit_box">';
     echo '<div class="sb_edit_group">';
     echo '<label>Title</label>';
     echo '<input type="text" name="title" value="' . $array['title'] . '" required class="gpinput" />';
     echo '</div>';
     echo '<div class="sb_edit_group">';
     echo '<label>Sub-Title</label>';
     echo '<input type="text" name="subtitle" value="' . $array['subtitle'] . '" class="gpinput" />';
     echo '</div>';
     echo '</div>';
     //.sb_edit_box
     //draft + date
     echo '<div class="sb_edit_box">';
     echo '<div class="sb_edit_group">';
     echo '<label>';
     echo '<input type="checkbox" name="isDraft" value="on" data-cmd="DraftCheckbox" ';
     if ($array['isDraft']) {
         echo 'checked="true"';
     }
     echo '" /> Draft</label>';
     echo '</div>';
     $this->FieldPublish($array);
     echo '</div>';
     //categories
     echo '<div class="sb_edit_box">';
     echo '<div class="sb_edit_group">';
     self::ShowCategoryList($post_id, $array);
     echo '</div>';
     echo '</div>';
     echo '</div>';
     //.sb_container_right
     //content
     echo '<div class="sb_post_container_left">';
     gp_edit::UseCK($array['content'], 'content');
     echo '</div>';
     echo '</div>';
     //save
     echo '<div>';
     echo '</div>';
     echo '</form>';
 }
コード例 #8
0
ファイル: admin_extra.php プロジェクト: rizub4u/gpEasy-CMS
 function EditExtra()
 {
     global $langmessage;
     $title = gp_edit::CleanTitle($_REQUEST['file']);
     if (empty($title)) {
         message($langmessage['OOPS']);
         return false;
     }
     $file = $this->folder . '/' . $title . '.php';
     $content = '';
     if (file_exists($file)) {
         ob_start();
         include $file;
         $content = ob_get_clean();
     }
     echo '<form action="' . common::GetUrl('Admin_Extra', 'file=' . $title) . '" method="post">';
     echo '<h2>';
     echo common::Link('Admin_Extra', $langmessage['theme_content']);
     echo ' &gt; ' . str_replace('_', ' ', $title) . '</h2>';
     echo '<input type="hidden" name="cmd" value="save" />';
     gp_edit::UseCK($content);
     echo '<input type="submit" name="" value="' . $langmessage['save'] . '" class="gpsubmit" />';
     echo '<input type="submit" name="cmd" value="' . $langmessage['cancel'] . '" class="gpcancel"/>';
     echo '</form>';
     return true;
 }