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


PHP gcms::ckClean方法代碼示例

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


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

示例1: header

<?php

// admin/mailto.php
header("content-type: text/html; charset=UTF-8");
// inint
include '../bin/inint.php';
$ret = array();
// ตรวจสอบ referer และ สมาชิก
if (gcms::isReferer() && gcms::isMember()) {
    if (isset($_SESSION['login']['account']) && $_SESSION['login']['account'] == 'demo') {
        $ret['error'] = 'EX_MODE_ERROR';
    } else {
        // ค่าที่ส่งมา
        $topic = htmlspecialchars(trim($_POST['email_subject']));
        $detail = gcms::ckClean($_POST['email_detail']);
        $reciever = htmlspecialchars(trim($_POST['email_reciever']));
        if (gcms::isAdmin()) {
            $sender = $db->getRec(DB_USER, $_POST['email_from']);
        } else {
            $sender = $_SESSION['login'];
        }
        // ตรวจสอบค่าที่ส่งมา
        if ($sender['email'] == '') {
            $ret['error'] = 'ACTION_ERROR';
        } elseif ($reciever == '') {
            $ret['error'] = 'RECIEVER_EMPTY';
            $ret['input'] = 'email_reciever';
        } elseif ($sender == $reciever) {
            $ret['error'] = 'ACTION_ERROR';
        } elseif ($topic == '') {
            $ret['error'] = 'TOPIC_EMPTY';
開發者ID:goragod,項目名稱:php-framework-benchmark,代碼行數:31,代碼來源:mailto.php

示例2: header

<?php

// modules/edocument/write_save.php
header("content-type: text/html; charset=UTF-8");
// inint
include '../../bin/inint.php';
$ret = array();
// ตรวจสอบ referer
if (gcms::isReferer() && gcms::isMember()) {
    // ค่าที่ส่งมา
    $save['document_no'] = $db->sql_trim_str($_POST, 'edocument_no');
    $save['topic'] = $db->sql_trim_str($_POST, 'edocument_topic');
    $save['detail'] = gcms::ckClean($_POST['edocument_detail']);
    if (isset($_POST['edocument_reciever'])) {
        $save['reciever'] = implode(',', $_POST['edocument_reciever']);
    }
    $id = gcms::getVars($_POST, 'write_id', 0);
    $file = $_FILES['edocument_file'];
    // ตรวจสอบค่าที่ส่งมา
    $error = false;
    $input = false;
    if ($id > 0) {
        // แก้ไข
        $sql = "SELECT D.*,M.`module`";
        $sql .= " FROM `" . DB_EDOCUMENT . "` AS D";
        $sql .= " INNER JOIN `" . DB_MODULES . "` AS M ON M.`id`=D.`module_id`";
        $sql .= " WHERE D.`id`='{$id}' AND M.`owner`='edocument' LIMIT 1";
    } else {
        // ใหม่
        $sql = "SELECT M.`module`,M.`id` AS `module_id`";
        $sql .= ",(SELECT MAX(`id`) FROM `" . DB_EDOCUMENT . "` WHERE `module_id`=M.`id`) AS `id`";
開發者ID:phannack,項目名稱:GCMS,代碼行數:31,代碼來源:write_save.php


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