當前位置: 首頁>>代碼示例>>PHP>>正文


PHP gcms::aliasName方法代碼示例

本文整理匯總了PHP中gcms::aliasName方法的典型用法代碼示例。如果您正苦於以下問題:PHP gcms::aliasName方法的具體用法?PHP gcms::aliasName怎麽用?PHP gcms::aliasName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在gcms的用法示例。


在下文中一共展示了gcms::aliasName方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: array

     $keywords = gcms::getTags($_POST["write_keywords_{$value}"]);
     $description = $db->sql_trim($_POST, "write_description_{$value}");
     if ($topic != '') {
         $save = array();
         $save['topic'] = $topic;
         $save['keywords'] = $db->sql_clean(gcms::cutstring(preg_replace('/[\'\\"\\r\\n\\s]{1,}/isu', ' ', $keywords == '' ? gcms::getTags($_POST["write_topic_{$value}"]) : $keywords), 255));
         $save['description'] = gcms::cutstring(gcms::html2txt($description == '' ? $_POST["write_detail_{$value}"] : $description), 255);
         $save['detail'] = gcms::ckDetail($_POST["write_detail_{$value}"]);
         $save['language'] = $value;
         $save['relate'] = $relate == '' ? $save['keywords'] : $relate;
         $details[$value] = $save;
         $alias_topic = $alias_topic == '' ? $alias : $alias_topic;
     }
 }
 $save = array();
 $save['alias'] = gcms::aliasName($_POST['write_alias']);
 // id ที่แก้ไข
 $id = gcms::getVars($_POST, 'write_id', 0);
 $module_id = gcms::getVars($_POST, 'module_id', 0);
 if ($id > 0) {
     // ตรวจสอบโมดูล หรือ เรื่องที่เลือก (แก้ไข)
     $sql = "SELECT I.`id`,I.`module_id`,M.`module`,M.`config`,I.`picture`,I.`member_id`";
     $sql .= " FROM `" . DB_MODULES . "` AS M";
     $sql .= " INNER JOIN `" . DB_INDEX . "` AS I ON I.`module_id`=M.`id` AND I.`id`='{$id}' AND I.`index`='0'";
     $sql .= " WHERE M.`id`='{$module_id}' AND M.`owner`='document'";
     $sql .= " LIMIT 1";
 } else {
     // ตรวจสอบโมดูล (ใหม่)
     $sql = "SELECT `id` AS `module_id`,`module`,`config`";
     $sql .= ",(SELECT MAX(`id`)+1 FROM `" . DB_INDEX . "` WHERE `module_id`='{$module_id}') AS `id`";
     $sql .= " FROM `" . DB_MODULES . "`";
開發者ID:phannack,項目名稱:GCMS,代碼行數:31,代碼來源:admin_write_save.php


注:本文中的gcms::aliasName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。