當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。