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


PHP string::translateSoft方法代码示例

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


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

示例1: _save

 function _save()
 {
     $page_id = params::get('page_id');
     db::table('pages');
     db::where('page_id', $page_id);
     $page = db::assoc();
     $page_folder_old = $page['page_folder'];
     $page_content = params::get('page_content');
     $page_folder = params::get('page_folder');
     $page_parent = params::get('page_parent');
     $page_dynamic = params::isCheck('page_dynamic');
     if ($page_dynamic == 1) {
         $page_folder = '[dynamic]';
     }
     $page_level = 0;
     if ($page_folder != '/') {
         $page_folder = string::translateSoft(string::clearBoth($page_folder));
         if ($page_parent == 0) {
             $page_folder = string::addSlashes($page_folder);
         } else {
             db::table('pages');
             db::where('page_id', $page_parent);
             $parent_folder = db::get('page_folder');
             $page_folder = $parent_folder . $page_folder . '/';
         }
         $page_level = count(explode('/', string::clearBoth($page_folder)));
     }
     db::table('pages');
     db::where('page_id', $page_id);
     db::update(array('page_date' => 'NOW()', 'page_title' => params::get('page_title'), 'page_header' => params::get('page_header'), 'tmpl_id' => params::get('tmpl_id'), 'page_parent' => $page_parent, 'page_keywords' => params::get('page_keywords'), 'page_descriptions' => params::get('page_descriptions'), 'page_map' => params::isCheck('page_map'), 'page_cache' => params::isCheck('page_cache'), 'page_pub' => params::isCheck('page_pub'), 'page_folder' => $page_folder, 'page_content' => $page_content[0], 'page_handler' => params::isCheck('page_handler'), 'page_dynamic' => $page_dynamic, 'page_level' => $page_level));
     db::table('menus_points');
     db::where('site_id', ADMIN_SITE_ID);
     db::where('point_link', $page_folder_old);
     db::update('point_link', $page_folder);
     if (events::detect('save')) {
         $date = date('Y-m-d H:i:s');
         self::saveVersion($date, $page_id, $page_content);
     }
     unset($page_content[0]);
     if ($page_content) {
         foreach ($page_content as $k => $v) {
             db::table('pages_content');
             db::where('content_id', $k);
             db::update('content', $v);
         }
     }
     $files = params::get('files_id');
     if ($files) {
         foreach ($files as $v) {
             db::table('pages_files');
             db::where('file_id', $v);
             db::update(array('page_id' => $page_id));
         }
     }
 }
开发者ID:rigidus,项目名称:ea,代码行数:55,代码来源:main.module.php


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