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


PHP DisplayErrors函数代码示例

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


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

示例1: espresso_process_paypal_pro

function espresso_process_paypal_pro($payment_data)
{
    extract($payment_data);
    global $wpdb;
    // Included required files.
    require_once 'includes/paypal.nvp.class.php';
    $paypal_pro_settings = get_option('event_espresso_paypal_pro_settings');
    $sandbox = $paypal_pro_settings['paypal_pro_use_sandbox'];
    // Setup PayPal object
    $PayPalConfig = array('Sandbox' => $sandbox, 'APIUsername' => $paypal_pro_settings['paypal_api_username'], 'APIPassword' => $paypal_pro_settings['paypal_api_password'], 'APISignature' => $paypal_pro_settings['paypal_api_signature']);
    $PayPal = new Espresso_PayPal($PayPalConfig);
    // Populate data arrays with order data.
    $DPFields = array('paymentaction' => 'Sale', 'ipaddress' => $_SERVER['REMOTE_ADDR'], 'returnfmfdetails' => '1');
    $CCDetails = array('creditcardtype' => $_POST['creditcardtype'], 'acct' => $_POST['card_num'], 'expdate' => $_POST['expmonth'] . $_POST['expyear'], 'cvv2' => $_POST['cvv'], 'startdate' => '', 'issuenumber' => '');
    $PayerInfo = array('email' => $_POST['email'], 'payerid' => '', 'payerstatus' => '', 'business' => '');
    $PayerName = array('salutation' => '', 'firstname' => $_POST['first_name'], 'middlename' => '', 'lastname' => $_POST['last_name'], 'suffix' => '');
    $BillingAddress = array('street' => $_POST['address'], 'street2' => '', 'city' => $_POST['city'], 'state' => $_POST['state'], 'countrycode' => 'US', 'zip' => $_POST['zip'], 'phonenum' => empty($_POST['phone']) ? '' : $_POST['phone']);
    $ShippingAddress = array('shiptoname' => '', 'shiptostreet' => '', 'shiptostreet2' => '', 'shiptocity' => '', 'shiptostate' => '', 'shiptozip' => '', 'shiptocountrycode' => '', 'shiptophonenum' => '');
    $PaymentDetails = array('amt' => $payment_data['total_cost'], 'currencycode' => $paypal_pro_settings['currency_format'], 'itemamt' => '', 'shippingamt' => '', 'handlingamt' => '', 'taxamt' => '', 'desc' => stripslashes_deep($event_name), 'custom' => '', 'invnum' => '', 'notifyurl' => '');
    $OrderItems = array();
    $Item = array('l_name' => stripslashes_deep($event_name), 'l_desc' => stripslashes_deep($event_name), 'l_amt' => $_POST['amount'], 'l_number' => '', 'l_qty' => '1', 'l_taxamt' => '', 'l_ebayitemnumber' => '', 'l_ebayitemauctiontxnid' => '', 'l_ebayitemorderid' => '');
    array_push($OrderItems, $Item);
    // Wrap all data arrays into a single, "master" array which will be passed into the class function.
    $PayPalRequestData = array('DPFields' => $DPFields, 'CCDetails' => $CCDetails, 'PayerName' => $PayerName, 'BillingAddress' => $BillingAddress, 'PaymentDetails' => $PaymentDetails, 'OrderItems' => $OrderItems);
    $PayPalResult = $PayPal->DoDirectPayment($PayPalRequestData);
    $payment_data['payment_status'] = 'Incomplete';
    $payment_data['txn_type'] = 'PayPal Pro';
    $payment_data['txn_id'] = 0;
    $payment_data['txn_details'] = serialize($_REQUEST);
    $payment_data = apply_filters('filter_hook_espresso_prepare_event_link', $payment_data);
    $payment_data = apply_filters('filter_hook_espresso_get_total_cost', $payment_data);
    $Errors = GetErrors($PayPalResult);
    if (!empty($PayPalResult)) {
        unset($PayPalResult['REQUESTDATA']['CREDITCARDTYPE']);
        unset($PayPalResult['REQUESTDATA']['ACCT']);
        unset($PayPalResult['REQUESTDATA']['EXPDATE']);
        unset($PayPalResult['REQUESTDATA']['CVV2']);
        unset($PayPalResult['RAWREQUEST']);
        $payment_data['txn_id'] = $PayPalResult['TRANSACTIONID'];
        $payment_data['txn_details'] = serialize($PayPalResult);
        if (!APICallSuccessful($PayPalResult['ACK'])) {
            DisplayErrors($Errors);
        } else {
            $payment_data['payment_status'] = 'Completed';
        }
    } else {
        ?>
		<p><?php 
        _e('There was no response from PayPal.', 'event_espresso');
        ?>
</p>
		<?php 
    }
    //add_action('action_hook_espresso_email_after_payment', 'espresso_email_after_payment');
    return $payment_data;
}
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:56,代码来源:DoDirectPayment.php

示例2: htmlsanitize

echo htmlsanitize($CFG['general']['name']);
?>
 :: Powered by OvBB" /></a></td>
	<td width="100%" align="left" valign="top" class="medium"><b><a href="index.php"><?php 
echo htmlsanitize($CFG['general']['name']);
?>
</a> &gt; <a href="admincp.php">Admin Control Panel</a> &gt; <a href="admincp.php?section=usergroups">Usergroups</a> &gt; Edit Usergroup</b></td>
</tr>
</table><br />

<?php 
// Admin CP menu.
PrintCPMenu();
// Display any errors.
if ($aError) {
    DisplayErrors($aError);
} else {
    echo '<br />';
}
?>

<form name="theform" action="admincp.php" method="post">
<input type="hidden" name="section" value="usergroups" />
<input type="hidden" name="action" value="edit" />
<input type="hidden" name="usergroupid" value="<?php 
echo $aUsergroup['id'];
?>
" />
<table cellpadding="4" cellspacing="1" border="0" bgcolor="<?php 
echo $CFG['style']['table']['bgcolor'];
?>
开发者ID:OvBB,项目名称:v1.0,代码行数:31,代码来源:editusergroup.tpl.php

示例3: totals_regenerate

            include_once 'version/2.0.1.php';
            include_once 'version/2.0.2.php';
            include_once 'version/2.0.3.php';
        }
        echo '<li>Regenerating the totals table</li>';
        totals_regenerate();
        echo '<li>Clearing /cache directory</li>';
        include_once '../internal/Smarty.class.php';
        $smarty = new Smarty();
        $smarty->config_dir = '';
        $smarty->compile_dir = "../cache";
        $smarty->template_dir = "../templates";
        $smarty->config_dir = "..";
        $smarty->clear_compiled_tpl();
        include mnminclude . 'admin_config.php';
        $config = new pliggconfig();
        $config->create_file("../settings.php");
        echo '</ul></p><div class="alert alert-info">' . $lang['IfNoError'] . '</div></p>';
        //end of if post submit is Yes.
    }
    //end of no errors
} else {
    echo DisplayErrors($errors);
    echo '<p>' . $lang['PleaseFix'] . '</p>';
}
echo '</div>';
// .well
$include = 'footer.php';
if (file_exists($include)) {
    include_once $include;
}
开发者ID:hyrmedia,项目名称:pligg-cms,代码行数:31,代码来源:upgrade1.php

示例4: addslashes

			</tr>
			
			<tr>
				<td><label></label></td>
				<td><input type="submit" class="btn btn-primary" name="Submit" value="' . $lang['CreateAdmin'] . '" /></td>
			</tr>
			
			<input type="hidden" name="language" value="' . addslashes(strip_tags($_REQUEST['language'])) . '">
			<input type="hidden" name="step" value="5">
		</form>
    </table>
	</div>
	';
}
mysql_query($sql, $conn);
if (isset($errors)) {
    $output = DisplayErrors($errors);
    $output .= '<p>' . $lang['Errors'] . '</p>';
}
if (function_exists("gd_info")) {
} else {
    $config = new pliggconfig();
    $config->var_id = 60;
    $config->var_value = "false";
    $config->store();
    $config->var_id = 69;
    $config->var_value = "false";
    $config->store();
}
echo $output;
echo '</div>';
开发者ID:bendroid,项目名称:pligg-cms,代码行数:31,代码来源:install4.php

示例5: espresso_process_paypal_pro

function espresso_process_paypal_pro($payment_data)
{
    extract($payment_data);
    global $wpdb;
    // Included required files.
    require_once 'includes/paypal.nvp.class.php';
    $paypal_pro_settings = get_option('event_espresso_paypal_pro_settings');
    $sandbox = $paypal_pro_settings['paypal_pro_use_sandbox'];
    // Setup PayPal object
    $PayPalConfig = array('Sandbox' => $sandbox, 'APIUsername' => $paypal_pro_settings['paypal_api_username'], 'APIPassword' => $paypal_pro_settings['paypal_api_password'], 'APISignature' => $paypal_pro_settings['paypal_api_signature']);
    $PayPal = new PayPal($PayPalConfig);
    //Find the correct amount so that unsavory characters don't change it in the previous form
    $sql = "SELECT ea.amount_pd, ed.event_name FROM " . EVENTS_ATTENDEE_TABLE . " ea ";
    $sql .= "JOIN " . EVENTS_DETAIL_TABLE . " ed ";
    $sql .= "ON ed.id = ea.event_id ";
    $sql .= " WHERE registration_id = '" . espresso_registration_id($_POST['id']) . "' ";
    $sql .= " ORDER BY ea.id ASC LIMIT 1";
    $r = $wpdb->get_row($sql);
    if (!$r || $wpdb->num_rows == 0) {
        exit("Looks like something went wrong.  Please try again or notify the website administrator.");
    }
    // Populate data arrays with order data.
    $DPFields = array('paymentaction' => 'Sale', 'ipaddress' => $_SERVER['REMOTE_ADDR'], 'returnfmfdetails' => '1');
    $CCDetails = array('creditcardtype' => $_POST['creditcardtype'], 'acct' => $_POST['card_num'], 'expdate' => $_POST['expmonth'] . $_POST['expyear'], 'cvv2' => $_POST['cvv'], 'startdate' => '', 'issuenumber' => '');
    $PayerInfo = array('email' => $_POST['email'], 'payerid' => '', 'payerstatus' => '', 'business' => '');
    $PayerName = array('salutation' => '', 'firstname' => $_POST['first_name'], 'middlename' => '', 'lastname' => $_POST['last_name'], 'suffix' => '');
    $BillingAddress = array('street' => $_POST['address'], 'street2' => '', 'city' => $_POST['city'], 'state' => $_POST['state'], 'countrycode' => 'US', 'zip' => $_POST['zip'], 'phonenum' => empty($_POST['phone']) ? '' : $_POST['phone']);
    $ShippingAddress = array('shiptoname' => '', 'shiptostreet' => '', 'shiptostreet2' => '', 'shiptocity' => '', 'shiptostate' => '', 'shiptozip' => '', 'shiptocountrycode' => '', 'shiptophonenum' => '');
    $PaymentDetails = array('amt' => $r->amount_pd, 'currencycode' => $paypal_pro_settings['currency_format'], 'itemamt' => '', 'shippingamt' => '', 'handlingamt' => '', 'taxamt' => '', 'desc' => stripslashes_deep($r->event_name), 'custom' => '', 'invnum' => '', 'notifyurl' => '');
    $OrderItems = array();
    $Item = array('l_name' => stripslashes_deep($r->event_name), 'l_desc' => stripslashes_deep($r->event_name), 'l_amt' => $_POST['amount'], 'l_number' => '', 'l_qty' => '1', 'l_taxamt' => '', 'l_ebayitemnumber' => '', 'l_ebayitemauctiontxnid' => '', 'l_ebayitemorderid' => '');
    array_push($OrderItems, $Item);
    // Wrap all data arrays into a single, "master" array which will be passed into the class function.
    $PayPalRequestData = array('DPFields' => $DPFields, 'CCDetails' => $CCDetails, 'PayerName' => $PayerName, 'BillingAddress' => $BillingAddress, 'PaymentDetails' => $PaymentDetails, 'OrderItems' => $OrderItems);
    $PayPalResult = $PayPal->DoDirectPayment($PayPalRequestData);
    $payment_data['payment_status'] = 'Incomplete';
    $payment_data['txn_type'] = 'PPP';
    $payment_data['txn_id'] = 0;
    $payment_data['txn_details'] = serialize($_REQUEST);
    $payment_data = apply_filters('filter_hook_espresso_prepare_event_link', $payment_data);
    $payment_data = apply_filters('filter_hook_espresso_get_total_cost', $payment_data);
    $Errors = GetErrors($PayPalResult);
    if (!empty($PayPalResult)) {
        $payment_data['txn_id'] = $PayPalResult['TRANSACTIONID'];
        $payment_data['txn_details'] = serialize($PayPalResult);
        if (!APICallSuccessful($PayPalResult['ACK'])) {
            DisplayErrors($Errors);
        } else {
            $payment_data['payment_status'] = 'Completed';
        }
    } else {
        ?>
		<p><?php 
        _e('There was no response from Paypal.', 'event_espresso');
        ?>
</p>
		<?php 
    }
    $payment_data = apply_filters('filter_hook_espresso_update_attendee_payment_data_in_db', $payment_data);
    do_action('action_hook_espresso_email_after_payment', $payment_data);
    return $payment_data;
}
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:62,代码来源:DoDirectPayment.php


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