当前位置: 首页>>代码示例>>PHP>>正文


PHP gpFiles::cleanText方法代码示例

本文整理汇总了PHP中gpFiles::cleanText方法的典型用法代码示例。如果您正苦于以下问题:PHP gpFiles::cleanText方法的具体用法?PHP gpFiles::cleanText怎么用?PHP gpFiles::cleanText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gpFiles的用法示例。


在下文中一共展示了gpFiles::cleanText方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: SaveContent

 function SaveContent()
 {
     global $langmessage;
     $content =& $_POST['content'];
     gpFiles::cleanText($content);
     $this->config['content'] = $content;
     if ($this->SaveConfig()) {
         message($langmessage['SAVED']);
     } else {
         message($langmessage['OOPS']);
     }
 }
开发者ID:VTAMAGNO,项目名称:gpEasy-CMS,代码行数:12,代码来源:AdminProtect.php

示例2: Save404

 function Save404()
 {
     $text =& $_POST['gpcontent'];
     gpFiles::cleanText($text);
     $this->error_data['404_TEXT'] = $text;
     if ($this->SaveData_Message()) {
         return true;
     }
     $this->Edit404($text);
     return false;
 }
开发者ID:VTAMAGNO,项目名称:gpEasy-CMS,代码行数:11,代码来源:admin_missing.php

示例3: SaveInline

 /**
  * Save an inline edit
  *
  */
 function SaveInline()
 {
     global $page, $langmessage;
     $page->ajaxReplace = array();
     $post_index = $_REQUEST['id'];
     $posts = $this->GetPostFile($post_index, $post_file);
     if ($posts === false) {
         message($langmessage['OOPS']);
         return;
     }
     $content =& $_POST['gpcontent'];
     gpFiles::cleanText($content);
     $posts[$post_index]['content'] = $content;
     //save to data file
     if (!gpFiles::SaveArray($post_file, 'posts', $posts)) {
         message($langmessage['OOPS']);
         return false;
     }
     $page->ajaxReplace[] = array('ck_saved', '', '');
     message($langmessage['SAVED']);
     return true;
 }
开发者ID:rizub4u,项目名称:gpEasy-CMS,代码行数:26,代码来源:SimpleBlogCommon.php

示例4: SectionFromPost_Gallery

 /**
  * Save Gallery Content
  *
  */
 static function SectionFromPost_Gallery(&$section)
 {
     if (empty($_POST['images'])) {
         $section['content'] = '<ul class="gp_gallery"><li class="gp_to_remove"></li></ul>';
         return;
     }
     ob_start();
     echo '<ul class="gp_gallery">';
     foreach ($_POST['images'] as $i => $image) {
         $thumb_path = common::ThumbnailPath($image);
         $caption = $_POST['captions'][$i];
         gpFiles::cleanText($caption);
         echo '<li>';
         echo '<a class="gallery_gallery" title="' . htmlspecialchars($caption) . '" data-arg="gallery_gallery" href="' . $image . '" data-cmd="gallery">';
         echo '<img src="' . $thumb_path . '" alt="" /></a>';
         echo '<div class="caption">';
         echo $caption;
         echo '</div>';
         echo '</li>';
     }
     echo '</ul>';
     $section['content'] = ob_get_clean();
     $section['images'] = $_POST['images'];
     $section['captions'] = $_POST['captions'];
 }
开发者ID:GedionChang,项目名称:gpEasy-CMS,代码行数:29,代码来源:editing.php

示例5: SaveSection_Text

 /**
  * Used by slideshow addons
  * @deprecated 3.6rc4
  *
  */
 function SaveSection_Text($section)
 {
     global $config;
     $content =& $_POST['gpcontent'];
     gpFiles::cleanText($content);
     $this->file_sections[$section]['content'] = $content;
     if ($config['resize_images']) {
         gp_edit::ResizeImages($this->file_sections[$section]['content'], $this->file_sections[$section]['resized_imgs']);
     }
     return true;
 }
开发者ID:Bomberus,项目名称:gpEasy-CMS,代码行数:16,代码来源:editing_page.php

示例6: SavePost

 /**
  * Save a post
  *
  */
 static function SavePost($post_index, $post)
 {
     global $gpAdmin;
     gpFiles::cleanText($post['content']);
     $post['username'] = $gpAdmin['username'];
     $post_file = SimpleBlogCommon::PostFilePath($post_index);
     if (!gpFiles::SaveArray($post_file, 'post', $post)) {
         message($langmessage['OOPS'] . ' (Post not saved)');
         return false;
     }
     //remove from old data file
     $posts = SimpleBlogCommon::GetPostFile($post_index, $post_file);
     if (isset($posts[$post_index])) {
         unset($posts[$post_index]);
         gpFiles::SaveArray($post_file, 'posts', $posts);
     }
     return true;
 }
开发者ID:Typesetter,项目名称:Simple-Blog,代码行数:22,代码来源:SimpleBlogPage.php

示例7: SaveExtra

 /**
  * Save the posted content for an extra content area
  *
  */
 function SaveExtra()
 {
     global $langmessage, $page;
     //for ajax responses
     $page->ajaxReplace = array();
     if (empty($_REQUEST['file'])) {
         message($langmessage['OOPS']);
         return false;
     }
     $title = gp_edit::CleanTitle($_REQUEST['file']);
     $file = $this->folder . '/' . $title . '.php';
     $text =& $_POST['gpcontent'];
     gpFiles::cleanText($text);
     if (!gpFiles::SaveFile($file, $text)) {
         message($langmessage['OOPS']);
         $this->EditExtra();
         return false;
     }
     $page->ajaxReplace[] = array('ck_saved', '', '');
     message($langmessage['SAVED']);
     $this->areas[$title] = $title;
     return true;
 }
开发者ID:rizub4u,项目名称:gpEasy-CMS,代码行数:27,代码来源:admin_extra.php


注:本文中的gpFiles::cleanText方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。