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


PHP Tool::Html_Special方法代碼示例

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


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

示例1: Html_Special

 static function Html_Special($date)
 {
     if (is_array($date)) {
         foreach ($date as $key => $value) {
             $string[Tool::Html_Special($key)] = Tool::Html_Special($value);
         }
         return $string;
     } elseif (is_object($date)) {
         foreach ($date as $key => $value) {
             $string->{$key} = Tool::Html_Special($value);
         }
         return $string;
     } else {
         return htmlspecialchars($date);
     }
 }
開發者ID:hachi-zzq,項目名稱:guest-cms,代碼行數:16,代碼來源:Tool.class.php

示例2: updateManage

 public function updateManage()
 {
     $this->username = Tool::Html_Special($_POST['admin_user']);
     $this->pass = sha1($_POST['admin_pass']);
     $this->level = $_POST['level'];
     $this->id = $_GET['id'];
     if (empty($this->pass)) {
         //如果密碼為空,那麽不修改密碼
         $sql = "update\r\n\t\t\t\t\t\t\t\t\t\tmanage\r\n\t\t\t\t\t\t\t\tset\r\n\t\t\t\t\t\t\t\t\t\tusername='{$this->username}',\r\n\t\t\t\t\t\t\t\t\t\tlevel='{$this->level}'\r\n\t\t\t\t\t\t\twhere\r\n\t\t\t\t\t\t\t\t\t\tid='{$_POST['id']}';";
     } else {
         //密碼不為空
         $sql = "update\r\n\t\t\t\t\t\t\t\t\t\t\t\tmanage \r\n\t\t\t\t\t\t\t\t\t\tset\r\n\t\t\t\t\t\t\t\t\t\t\t\t username='{$this->username}',\r\n\t\t\t\t\t\t\t\t\t\t\t\tpassword='{$this->pass}',\r\n\t\t\t\t\t\t\t\t\t\t\t\tlevel='{$this->level}'\r\n\t\t\t\t\t\t\t\t\t where \r\n\t\t\t\t\t\t\t\t\t\t\t\tid='{$_POST['id']}';";
     }
     $affected_rows = parent::add_up_de($sql);
     if ($affected_rows == 1) {
         Tool::alertLocation('恭喜你,修改成功', $_POST['prev_url']);
     } else {
         Tool::alertBack('很遺憾,修改失敗');
     }
 }
開發者ID:hachi-zzq,項目名稱:guest-cms,代碼行數:20,代碼來源:ManageModel.class.php

示例3: Add_Nav

 public function Add_Nav()
 {
     $this->sort = $this->Next_Nav_Id();
     $this->name = Tool::Html_Gpc(Tool::Html_Special($_POST['nav_name']));
     $this->info = Tool::Html_Special($_POST['nav_info']);
     $this->parid = $_POST['parid'];
     $sql = "insert into \r\n\t\t\t\t\t\t\t\t\t\t\tnav \r\n\t\t\t\t\t\t\t\t\t\t\t(name,\r\n\t\t\t\t\t\t\t\t\t\t\tinfo,\r\n\t\t\t\t\t\t\t\t\t\t\tparid,\r\n\t\t\t\t\t\t\t\t\t\t\tsort) \r\n\t\t\t\t\t\t\t\tvalues (\r\n\t\t\t\t\t\t\t\t\t\t\t'{$this->name}',\r\n\t\t\t\t\t\t\t\t\t\t\t'{$this->info}',\r\n\t\t\t\t\t\t\t\t\t\t\t'{$this->parid}',\r\n\t\t\t\t\t\t\t\t\t\t\t'{$this->sort}')";
     $affected_rows = parent::add_up_de($sql);
     if ($affected_rows == 1) {
         Tool::alertLocation('恭喜你,導航新增成功', 'nav.php?action=show');
     } else {
         Tool::alertBack('很遺憾,導航新增失敗');
     }
 }
開發者ID:hachi-zzq,項目名稱:guest-cms,代碼行數:14,代碼來源:NavModel.class.php


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