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


PHP xyz_trim_deep函数代码示例

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


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

示例1: xyz_ptp_logs

function xyz_ptp_logs()
{
    $_POST = stripslashes_deep($_POST);
    $_GET = stripslashes_deep($_GET);
    $_POST = xyz_trim_deep($_POST);
    $_GET = xyz_trim_deep($_GET);
    require dirname(__FILE__) . '/header.php';
    require dirname(__FILE__) . '/logs.php';
    require dirname(__FILE__) . '/footer.php';
}
开发者ID:jcolson,项目名称:pebbletimelinepublish,代码行数:10,代码来源:menu.php

示例2: xyz_cfm_ajax_delete_element

function xyz_cfm_ajax_delete_element()
{
    global $wpdb;
    if ($_POST) {
        $_POST = stripslashes_deep($_POST);
        $_POST = xyz_trim_deep($_POST);
        $formId = $_POST['formId'];
        $elementId = $_POST['elementId'];
        $wpdb->query($wpdb->prepare("DELETE FROM " . $wpdb->prefix . "xyz_cfm_form_elements WHERE id= %d AND form_id= %d", $elementId, $formId));
    }
    die;
}
开发者ID:pratiksharadake,项目名称:Europe4u,代码行数:12,代码来源:ajax-delete-element.php

示例3: xyz_trim_deep

 function xyz_trim_deep($value)
 {
     if (is_array($value)) {
         $value = array_map('xyz_trim_deep', $value);
     } elseif (is_object($value)) {
         $vars = get_object_vars($value);
         foreach ($vars as $key => $data) {
             $value->{$key} = xyz_trim_deep($data);
         }
     } else {
         $value = trim($value);
     }
     return $value;
 }
开发者ID:DylanGroenewoud,项目名称:PVNG,代码行数:14,代码来源:xyz-functions.php

示例4: xyz_trim_deep

<?php

global $wpdb;
if ($_POST) {
    $_POST = xyz_trim_deep($_POST);
    $_POST = stripslashes_deep($_POST);
    if ($_POST['xyz_cfm_SmtpHostName'] != "" && $_POST['xyz_cfm_SmtpEmailAddress'] != "" && $_POST['xyz_cfm_SmtpPassword'] != "" && $_POST['xyz_cfm_SmtpPortNumber'] != "" && $_POST['xyz_cfm_SmtpSecuirity'] != "") {
        $xyz_cfm_SmtpAuthentication = $_POST['xyz_cfm_SmtpAuthentication'];
        $xyz_cfm_SmtpHostName = $_POST['xyz_cfm_SmtpHostName'];
        $xyz_cfm_SmtpEmailAddress = $_POST['xyz_cfm_SmtpEmailAddress'];
        $xyz_cfm_SmtpPassword = $_POST['xyz_cfm_SmtpPassword'];
        $xyz_cfm_SmtpPortNumber = $_POST['xyz_cfm_SmtpPortNumber'];
        $xyz_cfm_SmtpSecuirity = $_POST['xyz_cfm_SmtpSecuirity'];
        $xyz_cfm_hiddenSmtpId = $_POST['xyz_cfm_hiddenSmtpId'];
        $blockedAccount_cfm = 0;
        if (isset($_POST['xyz_cfm_SmtpSetDefault']) && $_POST['xyz_cfm_SmtpSetDefault'] == "on") {
            $xyz_cfm_SmtpSetDefault = 1;
            $queryDefaultChecking = $wpdb->get_results($wpdb->prepare("SELECT status FROM " . $wpdb->prefix . "xyz_cfm_sender_email_address WHERE id= %d ", $xyz_cfm_hiddenSmtpId));
            $queryDefaultChecking = $queryDefaultChecking[0];
            if ($queryDefaultChecking->status == 1) {
                $wpdb->query('UPDATE ' . $wpdb->prefix . 'xyz_cfm_sender_email_address SET set_default="0"');
            } else {
                $blockedAccount_cfm = 1;
            }
        } else {
            $xyz_cfm_SmtpSetDefault = 0;
        }
        $xyz_cfm_smtpAccountCount = $wpdb->query($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "xyz_cfm_sender_email_address WHERE user= '%s' AND id!= %d LIMIT %d,%d", $xyz_cfm_SmtpEmailAddress, $xyz_cfm_hiddenSmtpId, 0, 1));
        if ($xyz_cfm_smtpAccountCount == 0) {
            if ($blockedAccount_cfm == 0) {
                $wpdb->update($wpdb->prefix . 'xyz_cfm_sender_email_address', array('authentication' => $xyz_cfm_SmtpAuthentication, 'host' => $xyz_cfm_SmtpHostName, 'user' => $xyz_cfm_SmtpEmailAddress, 'password' => $xyz_cfm_SmtpPassword, 'port' => $xyz_cfm_SmtpPortNumber, 'security' => $xyz_cfm_SmtpSecuirity, 'set_default' => $xyz_cfm_SmtpSetDefault), array('id' => $xyz_cfm_hiddenSmtpId));
开发者ID:pratiksharadake,项目名称:Europe4u,代码行数:31,代码来源:smtp_edit.php

示例5: stripslashes_deep

<?php

$_REQUEST = stripslashes_deep($_REQUEST);
$email_res = array();
$email = '';
if (isset($_REQUEST['search'])) {
    $_REQUEST = xyz_trim_deep($_REQUEST);
    global $wpdb;
    $email = strip_tags($_REQUEST['search']);
    if ($email != '') {
        $email_res = $wpdb->get_results('SELECT ea.id,ea.email,em.status  FROM ' . $wpdb->prefix . 'xyz_em_email_address ea  INNER JOIN ' . $wpdb->prefix . 'xyz_em_address_list_mapping em
ON ea.id=em.ea_id  WHERE email LIKE "%' . $email . '%"  ORDER BY email  LIMIT 0,' . get_option('xyz_em_limit'));
    }
}
?>

<div>

	<h2>Search Emails</h2>
	<form method="post">
		<table class="widefat" style="width: 98%;">

			<tr valign="top" class="alternate">
				<td scope="row"><label for="xyz_em_emails">Enter search term</label>
				</td>
				
				<td><input type="text" name="search" value="<?php 
echo $email;
?>
">
				</td>
开发者ID:subhadip-sahoo,项目名称:wp-projectB,代码行数:31,代码来源:search_emails.php

示例6: display_form

function display_form($id)
{
    global $wpdb;
    $pluginName = 'xyz-wp-contact-form/xyz-wp-contact-form.php';
    if (!is_plugin_active('wp-recaptcha/wp-recaptcha.php') && !is_plugin_active($pluginName)) {
        require_once dirname(XYZ_CFM_PLUGIN_FILE) . "/recaptcha/recaptchalib.php";
    }
    $folderName = md5(uniqid(microtime()) . $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT']);
    $msg_after_submit = '';
    $elementType = '';
    $messageBody = '';
    $script = '';
    $scriptStart = '';
    $scriptClose = '';
    $scriptDate = '';
    $styleDate = '';
    $scriptInclude = '';
    $dateFlag = 0;
    $captchaFlag = 0;
    $errorFlagMandatory = 0;
    $errorFlagEmail = 0;
    $captchaFlagError = 0;
    $emailErrorElementIdArray = array();
    $uploadFileNameArray = array();
    $fileOptionsArray = array();
    $fileTypeErrorFlag = 0;
    $fileTypeSizeFlag = 0;
    $acceptablefileTypes = '';
    $targetfolder = '';
    $xyz_cfm_senderEmail = '';
    $xyz_cfm_mailSentFlag = 0;
    $individualFormSubmitFlag = 0;
    $clearForm = '';
    $jQueryScriptStart = '<script>jQuery(document).ready(function(){';
    $jQueryScript = '';
    $jQueryScriptClose = '});</script>';
    /*set email for newsletter subscription*/
    $newsletterEmail = '';
    $customFields = array();
    $postArray = array();
    /*set email for newsletter subscription*/
    if (is_array($id)) {
        $formId = $id['id'];
        if (!isset($GLOBALS['xyz_cfm_' . $formId])) {
            $GLOBALS['xyz_cfm_' . $formId] = 1;
        } else {
            $GLOBALS['xyz_cfm_' . $formId]++;
        }
        $xyz_cfm_form_counter = "_" . $GLOBALS['xyz_cfm_' . $formId];
        $formAllData = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "xyz_cfm_form WHERE id= %d ", $formId));
        if (count($formAllData)) {
            $formAllData = $formAllData[0];
            if ($_POST && isset($_POST['xyz_cfm_frmName' . $xyz_cfm_form_counter]) && $_POST['xyz_cfm_frmName' . $xyz_cfm_form_counter] == $formAllData->name) {
                $_POST = stripslashes_deep($_POST);
                $_POST = xyz_trim_deep($_POST);
            }
            $messageBody = $formAllData->form_content;
            //Contact email settings
            $toEmail = $formAllData->to_email;
            $email_to = array();
            $email_to_list = explode(',', $toEmail);
            foreach ($email_to_list as $keyToemail => $valueToemail) {
                if (is_email($valueToemail)) {
                    $email_to[] = $valueToemail;
                }
            }
            $emailCC = $formAllData->cc_email;
            $email_cc = array();
            $email_cc_list = explode(',', $emailCC);
            foreach ($email_cc_list as $keyCCemail => $valueCCemail) {
                if (is_email($valueCCemail)) {
                    $email_cc[] = $valueCCemail;
                }
            }
            $emailBCC = $formAllData->bcc_email;
            $email_bcc = array();
            $email_bcc_list = explode(',', $emailBCC);
            foreach ($email_bcc_list as $keyBCCemail => $valueBCCemail) {
                if (is_email($valueCCemail)) {
                    $email_bcc[] = $valueBCCemail;
                }
            }
            $xyz_cfm_senderEmail = $formAllData->from_email;
            // if php mail() is used
            $email_senderName = $formAllData->sender_name;
            $mailSubject = $formAllData->mail_subject;
            $mailBody = $formAllData->mail_body;
            //Reply email settings
            $email_replySenderEmail = $formAllData->reply_sender_email;
            // if php mail() is used
            $email_senderReplyName = $formAllData->reply_sender_name;
            $mailReplayToEmail = $formAllData->to_email_reply;
            $mailReplaySubject = $formAllData->reply_subject;
            $mailReplayBody = $formAllData->reply_body;
            $mailRedirectionLink = $formAllData->redirection_link;
            $res = preg_match_all("/\\[(email|text|date|submit|textarea|dropdown|checkbox|radiobutton|file|captcha)[-][0-9]{1,11}\\]/", $formAllData->form_content, $match);
            if ($res) {
                if ($_POST && isset($_POST['xyz_cfm_frmName' . $xyz_cfm_form_counter]) && $_POST['xyz_cfm_frmName' . $xyz_cfm_form_counter] == $formAllData->name) {
                    $individualFormSubmitFlag = 1;
                    // to handle scenarios where same element names are present in multiple forms in same page
//.........这里部分代码省略.........
开发者ID:pratiksharadake,项目名称:Europe4u,代码行数:101,代码来源:create-contact-form.php

示例7: xyz_cfm_ajax_insert_element

function xyz_cfm_ajax_insert_element()
{
    global $wpdb;
    // echo '<pre>';
    // print_r($_POST);die;
    if ($_POST) {
        $_POST = stripslashes_deep($_POST);
        $_POST = xyz_trim_deep($_POST);
        $id = $_REQUEST['id'];
        if ($id == 1) {
            $required = $_POST['required'];
            $elementName = str_replace(' ', '', $_POST['elementName']);
            $elementNameTest = str_replace('_', '', $elementName);
            if (ctype_alnum($elementNameTest) && ctype_alpha($elementNameTest[0])) {
                $className = $_POST['className'];
                $maxlength = abs(intval($_POST['maxlength']));
                if ($maxlength == 0) {
                    $maxlength = '';
                }
                $defaultValue = $_POST['defaultValue'];
                $formId = $_POST['formId'];
                $elementType = 1;
                $element_count = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "xyz_cfm_form_elements WHERE element_name= '%s' AND form_id= %d LIMIT %d,%d", $elementName, $formId, 0, 1));
                if (count($element_count) == 0) {
                    $wpdb->insert($wpdb->prefix . 'xyz_cfm_form_elements', array('form_id' => $formId, 'element_diplay_name' => '', 'element_name' => $elementName, 'element_type' => $elementType, 'element_required' => $required, 'css_class' => $className, 'max_length' => $maxlength, 'default_value' => $defaultValue, 'cols' => '', 'rows' => '', 'options' => '', 'file_size' => '', 'file_type' => '', 're_captcha' => 0, 'client_view_check_radio_line_break_count' => 0, 'client_view_multi_select_drop_down' => 0), array('%d', '%s', '%s', '%d', '%d', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%d', '%d', '%d'));
                    $lastElementId = $wpdb->insert_id;
                    echo "Copy this code and paste it into the form left.<br/>Code is [text-" . $lastElementId . "]";
                } else {
                    echo "<font color=red>Element name already exists.</font>";
                }
            } else {
                echo "<font color=red>Form element name must start with alphabet and must be alphanumeric .</font>";
            }
        }
        if ($id == 2) {
            $required = $_POST['required'];
            $elementName = str_replace(' ', '', $_POST['elementName']);
            $elementNameTest = str_replace('_', '', $elementName);
            if (ctype_alnum($elementNameTest) && ctype_alpha($elementNameTest[0])) {
                $className = $_POST['className'];
                $maxlength = abs(intval($_POST['maxlength']));
                if ($maxlength == 0) {
                    $maxlength = '';
                }
                $defaultValue = $_POST['defaultValue'];
                $formId = $_POST['formId'];
                $elementType = 2;
                $element_count = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "xyz_cfm_form_elements WHERE element_name= '%s' AND form_id= %d LIMIT %d,%d", $elementName, $formId, 0, 1));
                if (count($element_count) == 0) {
                    $wpdb->insert($wpdb->prefix . 'xyz_cfm_form_elements', array('form_id' => $formId, 'element_diplay_name' => '', 'element_name' => $elementName, 'element_type' => $elementType, 'element_required' => $required, 'css_class' => $className, 'max_length' => $maxlength, 'default_value' => $defaultValue, 'cols' => '', 'rows' => '', 'options' => '', 'file_size' => '', 'file_type' => '', 're_captcha' => 0, 'client_view_check_radio_line_break_count' => 0, 'client_view_multi_select_drop_down' => 0), array('%d', '%s', '%s', '%d', '%d', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%d', '%d', '%d'));
                    $lastElementId = $wpdb->insert_id;
                    echo "Copy this code and paste it into the form left.<br/>Code is [email-" . $lastElementId . "]";
                } else {
                    echo "<font color=red>Element name already exists.</font>";
                }
            } else {
                echo "<font color=red>Form element name must start with alphabet and must be alphanumeric .</font>";
            }
        }
        if ($id == 3) {
            $required = $_POST['required'];
            $elementName = str_replace(' ', '', $_POST['elementName']);
            $elementNameTest = str_replace('_', '', $elementName);
            if (ctype_alnum($elementNameTest) && ctype_alpha($elementNameTest[0])) {
                $className = $_POST['className'];
                $collength = abs(intval($_POST['collength']));
                if ($collength == 0) {
                    $collength = '';
                }
                $rowlength = abs(intval($_POST['rowlength']));
                if ($rowlength == 0) {
                    $rowlength = '';
                }
                $defaultValue = $_POST['defaultValue'];
                $formId = $_POST['formId'];
                $elementType = 3;
                $element_count = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "xyz_cfm_form_elements WHERE element_name= '%s' AND form_id= %d LIMIT %d,%d", $elementName, $formId, 0, 1));
                if (count($element_count) == 0) {
                    $wpdb->insert($wpdb->prefix . 'xyz_cfm_form_elements', array('form_id' => $formId, 'element_diplay_name' => '', 'element_name' => $elementName, 'element_type' => $elementType, 'element_required' => $required, 'css_class' => $className, 'cols' => $collength, 'rows' => $rowlength, 'default_value' => $defaultValue, 'max_length' => '', 'options' => '', 'file_size' => '', 'file_type' => '', 're_captcha' => 0, 'client_view_check_radio_line_break_count' => 0, 'client_view_multi_select_drop_down' => 0), array('%d', '%s', '%s', '%d', '%d', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%d', '%d', '%d'));
                    $lastElementId = $wpdb->insert_id;
                    echo "Copy this code and paste it into the form left.<br/>Code is [textarea-" . $lastElementId . "]";
                } else {
                    echo "<font color=red>Element name already exists.</font>";
                }
            } else {
                echo "<font color=red>Form element name must start with alphabet and must be alphanumeric .</font>";
            }
        }
        if ($id == 4) {
            $required = $_POST['required'];
            $elementName = str_replace(' ', '', $_POST['elementName']);
            $elementNameTest = str_replace('_', '', $elementName);
            if (ctype_alnum($elementNameTest) && ctype_alpha($elementNameTest[0])) {
                $className = $_POST['className'];
                $options = xyz_cfm_trimOptions($_POST['options']);
                $defaultValue = xyz_cfm_trimOptions($_POST['defaultValue']);
                $multipleSelect = $_POST['multipleSelect'];
                $formId = $_POST['formId'];
                $elementType = 4;
                $element_count = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "xyz_cfm_form_elements WHERE element_name= '%s' AND form_id= %d LIMIT %d,%d", $elementName, $formId, 0, 1));
//.........这里部分代码省略.........
开发者ID:pratiksharadake,项目名称:Europe4u,代码行数:101,代码来源:ajax-insert-element.php


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