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


PHP cmtx_sanitize函数代码示例

本文整理汇总了PHP中cmtx_sanitize函数的典型用法代码示例。如果您正苦于以下问题:PHP cmtx_sanitize函数的具体用法?PHP cmtx_sanitize怎么用?PHP cmtx_sanitize使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: cmtx_check_csrf_form_key

<div class="warning"><?php 
    echo CMTX_MSG_DEMO;
    ?>
</div>
<div style="clear: left;"></div>
<?php 
} else {
    if (isset($_POST['submit'])) {
        cmtx_check_csrf_form_key();
        $powered_by = $_POST['powered_by'];
        if (isset($_POST['powered_by_new_window'])) {
            $powered_by_new_window = 1;
        } else {
            $powered_by_new_window = 0;
        }
        $powered_by_san = cmtx_sanitize($powered_by);
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$powered_by_san}' WHERE `title` = 'powered_by'");
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$powered_by_new_window}' WHERE `title` = 'powered_by_new_window'");
        ?>
<div class="success"><?php 
        echo CMTX_MSG_SAVED;
        ?>
</div>
<div style="clear: left;"></div>
<?php 
    }
}
?>

<p />
开发者ID:GTAWWEKID,项目名称:tsiserver.us,代码行数:30,代码来源:layout_powered.php

示例2: cmtx_clean_form_defaults

function cmtx_clean_form_defaults()
{
    //clean default form field values
    global $cmtx_default_name, $cmtx_default_email, $cmtx_default_website, $cmtx_default_town, $cmtx_default_country, $cmtx_default_rating, $cmtx_default_comment;
    //globalise variables
    //remove " character
    $cmtx_default_name = str_replace('"', '', $cmtx_default_name);
    $cmtx_default_email = str_replace('"', '', $cmtx_default_email);
    $cmtx_default_website = str_replace('"', '', $cmtx_default_website);
    $cmtx_default_town = str_replace('"', '', $cmtx_default_town);
    $cmtx_default_country = str_replace('"', '', $cmtx_default_country);
    $cmtx_default_rating = str_replace('"', '', $cmtx_default_rating);
    //remove invalid characters
    $cmtx_default_name = preg_replace('/[^\\p{L}&\\-\'. 0-9]/u', '', $cmtx_default_name);
    // \p{L} (any kind of letter from any language)
    $cmtx_default_email = filter_var($cmtx_default_email, FILTER_SANITIZE_EMAIL);
    $cmtx_default_website = cmtx_url_encode_spaces($cmtx_default_website);
    $cmtx_default_website = filter_var($cmtx_default_website, FILTER_SANITIZE_URL);
    $cmtx_default_town = preg_replace('/[^\\p{L}&\\-\'. ]/u', '', $cmtx_default_town);
    $cmtx_default_country = preg_replace('/[^\\p{L}&\\-\'. ]/u', '', $cmtx_default_country);
    $cmtx_default_rating = preg_replace('/[^1-5]/', '', $cmtx_default_rating);
    //convert to HTML entities
    $cmtx_default_name = cmtx_sanitize($cmtx_default_name, true, false);
    $cmtx_default_email = cmtx_sanitize($cmtx_default_email, true, false);
    $cmtx_default_website = cmtx_sanitize($cmtx_default_website, true, false);
    $cmtx_default_town = cmtx_sanitize($cmtx_default_town, true, false);
    $cmtx_default_country = cmtx_sanitize($cmtx_default_country, true, false);
    $cmtx_default_rating = cmtx_sanitize($cmtx_default_rating, true, false);
    $cmtx_default_comment = cmtx_sanitize($cmtx_default_comment, true, false);
}
开发者ID:GTAWWEKID,项目名称:tsiserver.us,代码行数:30,代码来源:form.php

示例3: cmtx_check_csrf_form_key

<div class="warning"><?php 
        echo CMTX_MSG_DEMO;
        ?>
</div>
<div style="clear: left;"></div>
<?php 
    } else {
        if (isset($_POST['submit'])) {
            cmtx_check_csrf_form_key();
            if (isset($_POST['enabled'])) {
                $akismet_enabled = 1;
            } else {
                $akismet_enabled = 0;
            }
            $akismet_key = $_POST['akismet_key'];
            $akismet_key_san = cmtx_sanitize($akismet_key);
            cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$akismet_enabled}' WHERE `title` = 'akismet_enabled'");
            cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$akismet_key_san}' WHERE `title` = 'akismet_key'");
            ?>
<div class="success"><?php 
            echo CMTX_MSG_SAVED;
            ?>
</div>
<div style="clear: left;"></div>
<?php 
        }
    }
    ?>

<p />
开发者ID:GTAWWEKID,项目名称:tsiserver.us,代码行数:30,代码来源:settings_akismet.php

示例4: cmtx_sanitize

echo $cmtx_ratings;
?>
<p />
<label class='edit_comment'><?php 
echo CMTX_FIELD_LABEL_COMMENT;
?>
</label> <div style="margin-left:78px; width:650px"> <textarea name="comment" cols="39" rows="6"><?php 
echo cmtx_sanitize($comment, true, false);
?>
</textarea> </div>
<p />
<label class='edit_comment'><?php 
echo CMTX_FIELD_LABEL_ADMIN;
?>
</label> <div style="margin-left:78px; width:650px"> <textarea name="reply" cols="39" rows="6"><?php 
echo cmtx_sanitize($reply, true, false);
?>
</textarea> </div>

<br /><hr class="separator"/><br />

<label class='edit_comment'><?php 
echo CMTX_FIELD_LABEL_PAGE;
?>
</label> <select name="page_id">
<?php 
$pages = cmtx_db_query("SELECT * FROM `" . $cmtx_mysql_table_prefix . "pages` ORDER BY `id` ASC");
while ($page = cmtx_db_fetch_assoc($pages)) {
    ?>
<option value='<?php 
    echo $page['id'];
开发者ID:GTAWWEKID,项目名称:tsiserver.us,代码行数:31,代码来源:edit_comment.php

示例5: cmtx_check_csrf_form_key

    ?>
</div>
<div style="clear: left;"></div>
<?php 
} else {
    if (isset($_POST['submit'])) {
        cmtx_check_csrf_form_key();
        $subscriber_confirmation_subject = $_POST['subscriber_confirmation_subject'];
        $subscriber_confirmation_from_name = $_POST['subscriber_confirmation_from_name'];
        $subscriber_confirmation_from_email = $_POST['subscriber_confirmation_from_email'];
        $subscriber_confirmation_reply_to = $_POST['subscriber_confirmation_reply_to'];
        $email_content = $_POST['email_content'];
        $subscriber_confirmation_subject_san = cmtx_sanitize($subscriber_confirmation_subject);
        $subscriber_confirmation_from_name_san = cmtx_sanitize($subscriber_confirmation_from_name);
        $subscriber_confirmation_from_email_san = cmtx_sanitize($subscriber_confirmation_from_email);
        $subscriber_confirmation_reply_to_san = cmtx_sanitize($subscriber_confirmation_reply_to);
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$subscriber_confirmation_subject_san}' WHERE `title` = 'subscriber_confirmation_subject'");
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$subscriber_confirmation_from_name_san}' WHERE `title` = 'subscriber_confirmation_from_name'");
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$subscriber_confirmation_from_email_san}' WHERE `title` = 'subscriber_confirmation_from_email'");
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$subscriber_confirmation_reply_to_san}' WHERE `title` = 'subscriber_confirmation_reply_to'");
        $file = '../includes/emails/' . cmtx_setting('language_frontend') . '/user/custom/subscriber_confirmation.txt';
        $handle = fopen($file, 'w');
        fputs($handle, $email_content);
        fclose($handle);
        ?>
<div class="success"><?php 
        echo CMTX_MSG_SAVED;
        ?>
</div>
<div style="clear: left;"></div>
<?php 
开发者ID:GTAWWEKID,项目名称:tsiserver.us,代码行数:31,代码来源:settings_email_editor_user_subscriber_confirmation.php

示例6: cmtx_check_csrf_form_key

    ?>
</div>
<div style="clear: left;"></div>
<?php 
} else {
    if (isset($_POST['submit'])) {
        cmtx_check_csrf_form_key();
        $subscriber_notification_reply_subject = $_POST['subscriber_notification_reply_subject'];
        $subscriber_notification_reply_from_name = $_POST['subscriber_notification_reply_from_name'];
        $subscriber_notification_reply_from_email = $_POST['subscriber_notification_reply_from_email'];
        $subscriber_notification_reply_reply_to = $_POST['subscriber_notification_reply_reply_to'];
        $email_content = $_POST['email_content'];
        $subscriber_notification_reply_subject_san = cmtx_sanitize($subscriber_notification_reply_subject);
        $subscriber_notification_reply_from_name_san = cmtx_sanitize($subscriber_notification_reply_from_name);
        $subscriber_notification_reply_from_email_san = cmtx_sanitize($subscriber_notification_reply_from_email);
        $subscriber_notification_reply_reply_to_san = cmtx_sanitize($subscriber_notification_reply_reply_to);
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$subscriber_notification_reply_subject_san}' WHERE `title` = 'subscriber_notification_reply_subject'");
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$subscriber_notification_reply_from_name_san}' WHERE `title` = 'subscriber_notification_reply_from_name'");
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$subscriber_notification_reply_from_email_san}' WHERE `title` = 'subscriber_notification_reply_from_email'");
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$subscriber_notification_reply_reply_to_san}' WHERE `title` = 'subscriber_notification_reply_reply_to'");
        $file = '../includes/emails/' . cmtx_setting('language_frontend') . '/user/custom/subscriber_notification_reply.txt';
        $handle = fopen($file, 'w');
        fputs($handle, $email_content);
        fclose($handle);
        ?>
<div class="success"><?php 
        echo CMTX_MSG_SAVED;
        ?>
</div>
<div style="clear: left;"></div>
<?php 
开发者ID:jonathancromie,项目名称:ifb299,代码行数:31,代码来源:settings_email_editor_user_subscriber_notification_reply.php

示例7: cmtx_check_csrf_form_key

<div class="warning"><?php 
    echo CMTX_MSG_DEMO;
    ?>
</div>
<div style="clear: left;"></div>
<?php 
} else {
    if (isset($_POST['bulk_delete']) && isset($_POST['bulk'])) {
        cmtx_check_csrf_form_key();
        $items = $_POST['bulk'];
        $count = count($items);
        $success = 0;
        $failure = 0;
        for ($i = 0; $i < $count; $i++) {
            $id = $items[$i];
            $id = cmtx_sanitize($id);
            if (cmtx_db_num_rows(cmtx_db_query("SELECT * FROM `" . $cmtx_mysql_table_prefix . "admins` WHERE `is_super` = '1' AND `id` = '{$id}'"))) {
                $failure++;
            } else {
                cmtx_db_query("DELETE FROM `" . $cmtx_mysql_table_prefix . "admins` WHERE `id` = '{$id}'");
                $success++;
            }
        }
        if ($success == 1) {
            ?>
<div class="success"><?php 
            echo CMTX_MSG_ADMIN_BULK_DELETED;
            ?>
</div><?php 
        }
        if ($success > 1) {
开发者ID:jonathancromie,项目名称:ifb299,代码行数:31,代码来源:manage_administrators.php

示例8: cmtx_check_csrf_form_key

    echo CMTX_MSG_DEMO;
    ?>
</div>
<div style="clear: left;"></div>
<?php 
} else {
    if (isset($_POST['submit'])) {
        cmtx_check_csrf_form_key();
        $sort_order_fields = $_POST['sort_order_fields'];
        $sort_order_captchas = $_POST['sort_order_captchas'];
        $sort_order_checkboxes = $_POST['sort_order_checkboxes'];
        $sort_order_buttons = $_POST['sort_order_buttons'];
        $sort_order_fields_san = cmtx_sanitize($sort_order_fields);
        $sort_order_captchas_san = cmtx_sanitize($sort_order_captchas);
        $sort_order_checkboxes_san = cmtx_sanitize($sort_order_checkboxes);
        $sort_order_buttons_san = cmtx_sanitize($sort_order_buttons);
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$sort_order_fields_san}' WHERE `title` = 'sort_order_fields'");
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$sort_order_captchas_san}' WHERE `title` = 'sort_order_captchas'");
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$sort_order_checkboxes_san}' WHERE `title` = 'sort_order_checkboxes'");
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$sort_order_buttons_san}' WHERE `title` = 'sort_order_buttons'");
        ?>
<div class="success"><?php 
        echo CMTX_MSG_SAVED;
        ?>
</div>
<div style="clear: left;"></div>
<?php 
    }
}
?>
开发者ID:jonathancromie,项目名称:ifb299,代码行数:30,代码来源:layout_form_order.php

示例9: cmtx_error_reporting

cmtx_error_reporting('includes/logs/errors.log');
/* Time Zone */
cmtx_set_time_zone(cmtx_setting('time_zone'));
$ip_address = cmtx_get_ip_address();
//get user's IP address
if (isset($_POST['id']) && isset($_POST['rating'])) {
    $id = $_POST['id'];
    if (!ctype_digit($id)) {
        die;
    }
    $id = cmtx_sanitize($id, true, true);
    $rating = $_POST['rating'];
    if (!preg_match('/[1-5]/', $rating)) {
        die;
    }
    $rating = cmtx_sanitize($rating, true, true);
    //check if page exists
    $query = cmtx_db_query("SELECT * FROM `" . $cmtx_mysql_table_prefix . "pages` WHERE `id` = '{$id}'");
    $count = cmtx_db_num_rows($query);
    if ($count == 0) {
        echo CMTX_RATE_NO_PAGE;
        return;
    }
    //check if user has already rated as a poster
    $query = cmtx_db_query("SELECT * FROM `" . $cmtx_mysql_table_prefix . "comments` WHERE `page_id` = '{$id}' AND `ip_address` = '{$ip_address}' AND `rating` != '0'");
    $count = cmtx_db_num_rows($query);
    if ($count > 0) {
        echo CMTX_RATE_ALREADY_RATED;
        return;
    }
    //check if user has already rated as a guest
开发者ID:GTAWWEKID,项目名称:tsiserver.us,代码行数:31,代码来源:rate.php

示例10: cmtx_add_viewer

function cmtx_add_viewer()
{
    //add viewer to database
    global $cmtx_mysql_table_prefix, $cmtx_reference, $cmtx_url, $cmtx_is_admin;
    //globalise variables
    cmtx_unban_viewer();
    //unban viewer if requested by admin
    if (cmtx_setting('viewers_enabled') && !$cmtx_is_admin) {
        //if viewers feature is enabled and viewer is not admin
        $ip_address = cmtx_get_ip_address();
        $user_agent = cmtx_get_user_agent();
        $page_reference = cmtx_sanitize($cmtx_reference, true, true);
        $page_url = cmtx_sanitize($cmtx_url, true, true);
        $timestamp = time();
        $timeout = $timestamp - cmtx_setting('viewers_timeout');
        cmtx_db_query("DELETE FROM `" . $cmtx_mysql_table_prefix . "viewers` WHERE `timestamp` < '{$timeout}'");
        cmtx_db_query("DELETE FROM `" . $cmtx_mysql_table_prefix . "viewers` WHERE `ip_address` = '{$ip_address}'");
        cmtx_db_query("INSERT INTO `" . $cmtx_mysql_table_prefix . "viewers` (`user_agent`, `ip_address`, `page_reference`, `page_url`, `timestamp`) VALUES ('{$user_agent}', '{$ip_address}', '{$page_reference}', '{$page_url}', '{$timestamp}')");
    }
}
开发者ID:jonathancromie,项目名称:ifb299,代码行数:20,代码来源:page.php

示例11: cmtx_check_csrf_form_key

<?php 
if (isset($_POST['submit']) && cmtx_setting('is_demo')) {
    ?>
<div class="warning"><?php 
    echo CMTX_MSG_DEMO;
    ?>
</div>
<div style="clear: left;"></div>
<?php 
} else {
    if (isset($_POST['submit'])) {
        cmtx_check_csrf_form_key();
        $language_frontend = $_POST['language_frontend'];
        $language_backend = $_POST['language_backend'];
        $language_frontend_san = cmtx_sanitize($language_frontend);
        $language_backend_san = cmtx_sanitize($language_backend);
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$language_frontend_san}' WHERE `title` = 'language_frontend'");
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$language_backend_san}' WHERE `title` = 'language_backend'");
        ?>
<div class="success"><?php 
        echo CMTX_MSG_SAVED;
        ?>
</div>
<div style="clear: left;"></div>
<?php 
    }
}
?>

<p />
开发者ID:GTAWWEKID,项目名称:tsiserver.us,代码行数:30,代码来源:settings_language.php

示例12: cmtx_check_csrf_form_key

    ?>
</div>
<div style="clear: left;"></div>
<?php 
} else {
    if (isset($_POST['submit'])) {
        cmtx_check_csrf_form_key();
        $admin_new_ban_subject = $_POST['admin_new_ban_subject'];
        $admin_new_ban_from_name = $_POST['admin_new_ban_from_name'];
        $admin_new_ban_from_email = $_POST['admin_new_ban_from_email'];
        $admin_new_ban_reply_to = $_POST['admin_new_ban_reply_to'];
        $email_content = $_POST['email_content'];
        $admin_new_ban_subject_san = cmtx_sanitize($admin_new_ban_subject);
        $admin_new_ban_from_name_san = cmtx_sanitize($admin_new_ban_from_name);
        $admin_new_ban_from_email_san = cmtx_sanitize($admin_new_ban_from_email);
        $admin_new_ban_reply_to_san = cmtx_sanitize($admin_new_ban_reply_to);
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$admin_new_ban_subject_san}' WHERE `title` = 'admin_new_ban_subject'");
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$admin_new_ban_from_name_san}' WHERE `title` = 'admin_new_ban_from_name'");
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$admin_new_ban_from_email_san}' WHERE `title` = 'admin_new_ban_from_email'");
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$admin_new_ban_reply_to_san}' WHERE `title` = 'admin_new_ban_reply_to'");
        $file = '../includes/emails/' . cmtx_setting('language_frontend') . '/admin/custom/new_ban.txt';
        $handle = fopen($file, 'w');
        fputs($handle, $email_content);
        fclose($handle);
        ?>
<div class="success"><?php 
        echo CMTX_MSG_SAVED;
        ?>
</div>
<div style="clear: left;"></div>
<?php 
开发者ID:GTAWWEKID,项目名称:tsiserver.us,代码行数:31,代码来源:settings_email_editor_admin_new_ban.php

示例13: cmtx_sanitize

            $default_notify = 1;
        } else {
            $default_notify = 0;
        }
        if (isset($_POST['default_remember'])) {
            $default_remember = 1;
        } else {
            $default_remember = 0;
        }
        $default_name_san = cmtx_sanitize($default_name);
        $default_email_san = cmtx_sanitize($default_email);
        $default_website_san = cmtx_sanitize($default_website);
        $default_town_san = cmtx_sanitize($default_town);
        $default_country_san = cmtx_sanitize($default_country);
        $default_rating_san = cmtx_sanitize($default_rating);
        $default_comment_san = cmtx_sanitize($default_comment);
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$default_name_san}' WHERE `title` = 'default_name'");
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$default_email_san}' WHERE `title` = 'default_email'");
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$default_website_san}' WHERE `title` = 'default_website'");
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$default_town_san}' WHERE `title` = 'default_town'");
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$default_country_san}' WHERE `title` = 'default_country'");
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$default_rating_san}' WHERE `title` = 'default_rating'");
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$default_comment_san}' WHERE `title` = 'default_comment'");
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$default_notify}' WHERE `title` = 'default_notify'");
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$default_remember}' WHERE `title` = 'default_remember'");
        ?>
<div class="success"><?php 
        echo CMTX_MSG_SAVED;
        ?>
</div>
<div style="clear: left;"></div>
开发者ID:jonathancromie,项目名称:ifb299,代码行数:31,代码来源:layout_form_defaults.php

示例14: cmtx_check_csrf_form_key

    ?>
</div>
<div style="clear: left;"></div>
<?php 
} else {
    if (isset($_POST['submit'])) {
        cmtx_check_csrf_form_key();
        $admin_new_comment_okay_subject = $_POST['admin_new_comment_okay_subject'];
        $admin_new_comment_okay_from_name = $_POST['admin_new_comment_okay_from_name'];
        $admin_new_comment_okay_from_email = $_POST['admin_new_comment_okay_from_email'];
        $admin_new_comment_okay_reply_to = $_POST['admin_new_comment_okay_reply_to'];
        $email_content = $_POST['email_content'];
        $admin_new_comment_okay_subject_san = cmtx_sanitize($admin_new_comment_okay_subject);
        $admin_new_comment_okay_from_name_san = cmtx_sanitize($admin_new_comment_okay_from_name);
        $admin_new_comment_okay_from_email_san = cmtx_sanitize($admin_new_comment_okay_from_email);
        $admin_new_comment_okay_reply_to_san = cmtx_sanitize($admin_new_comment_okay_reply_to);
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$admin_new_comment_okay_subject_san}' WHERE `title` = 'admin_new_comment_okay_subject'");
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$admin_new_comment_okay_from_name_san}' WHERE `title` = 'admin_new_comment_okay_from_name'");
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$admin_new_comment_okay_from_email_san}' WHERE `title` = 'admin_new_comment_okay_from_email'");
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$admin_new_comment_okay_reply_to_san}' WHERE `title` = 'admin_new_comment_okay_reply_to'");
        $file = '../includes/emails/' . cmtx_setting('language_frontend') . '/admin/custom/new_comment_okay.txt';
        $handle = fopen($file, 'w');
        fputs($handle, $email_content);
        fclose($handle);
        ?>
<div class="success"><?php 
        echo CMTX_MSG_SAVED;
        ?>
</div>
<div style="clear: left;"></div>
<?php 
开发者ID:GTAWWEKID,项目名称:tsiserver.us,代码行数:31,代码来源:settings_email_editor_admin_new_comment_okay.php

示例15: cmtx_sanitize

            $rss_image_enabled = 1;
        } else {
            $rss_image_enabled = 0;
        }
        $rss_image_url = $_POST['rss_image_url'];
        $rss_image_width = $_POST['rss_image_width'];
        $rss_image_height = $_POST['rss_image_height'];
        if (isset($_POST['rss_most_recent_enabled'])) {
            $rss_most_recent_enabled = 1;
        } else {
            $rss_most_recent_enabled = 0;
        }
        $rss_most_recent_amount = $_POST['rss_most_recent_amount'];
        $rss_title_san = cmtx_sanitize($rss_title);
        $rss_link_san = cmtx_sanitize($rss_link);
        $rss_image_url_san = cmtx_sanitize($rss_image_url);
        $rss_image_width_san = (int) $rss_image_width;
        $rss_image_height_san = (int) $rss_image_height;
        $rss_most_recent_amount_san = (int) $rss_most_recent_amount;
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$show_rss}' WHERE `title` = 'show_rss'");
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$rss_title_san}' WHERE `title` = 'rss_title'");
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$rss_link_san}' WHERE `title` = 'rss_link'");
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$rss_image_enabled}' WHERE `title` = 'rss_image_enabled'");
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$rss_image_url_san}' WHERE `title` = 'rss_image_url'");
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$rss_image_width_san}' WHERE `title` = 'rss_image_width'");
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$rss_image_height_san}' WHERE `title` = 'rss_image_height'");
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$rss_most_recent_enabled}' WHERE `title` = 'rss_most_recent_enabled'");
        cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "settings` SET `value` = '{$rss_most_recent_amount_san}' WHERE `title` = 'rss_most_recent_amount'");
        ?>
<div class="success"><?php 
        echo CMTX_MSG_SAVED;
开发者ID:GTAWWEKID,项目名称:tsiserver.us,代码行数:31,代码来源:settings_rss.php


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