function event_espresso_gateways_options()
{
global $active_gateways;
$active_gateways = get_option('event_espresso_active_gateways', array());
?>
<div id="event_reg_theme" class="wrap">
<div id="icon-options-event" class="icon32"></div>
<h2><?php
_e('Manage Payment Gateways', 'event_espresso');
?>
</h2>
<?php
ob_start();
?>
<div id="payment_settings" class="meta-box-sortables ui-sortables">
<?php
$gateways_glob = glob(EVENT_ESPRESSO_PLUGINFULLPATH . "gateways/*/settings.php");
$upload_gateways_glob = glob(EVENT_ESPRESSO_GATEWAY_DIR . '*/settings.php');
if (!is_array($upload_gateways_glob)) {
$upload_gateways_glob = array();
}
foreach ($upload_gateways_glob as $upload_gateway) {
$pos = strpos($upload_gateway, 'gateways');
$sub = substr($upload_gateway, $pos);
foreach ($gateways_glob as &$gateway) {
$pos2 = strpos($gateway, 'gateways');
$sub2 = substr($gateway, $pos2);
if ($sub == $sub2) {
$gateway = $upload_gateway;
}
}
unset($gateway);
}
$gateways = array_merge($upload_gateways_glob, $gateways_glob);
$gateways = array_unique($gateways);
foreach ($gateways as $gateway) {
require_once $gateway;
}
do_action('action_hook_espresso_display_gateway_settings');
if (file_exists(EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/gateway_developer.php')) {
require_once EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/gateway_developer.php';
}
global $espresso_premium;
if ($espresso_premium != true) {
?>
<h2><?php
_e('Need more payment options?', 'event_espresso');
?>
<a href="http://eventespresso.com/features/payment-options/" target="_blank"><?php
_e('Upgrade Now!', 'event_espresso');
?>
</a></h2>
<?php
}
?>
</div><!-- / .meta-box-sortables -->
<?php
$post_content = ob_get_clean();
espresso_choose_layout('', event_espresso_display_right_column(), $post_content);
?>
</div><!-- / #wrap -->
<div id="button_image" style="display:none">
<h2><?php
_e('Button Image URL', 'event_espresso');
?>
</h2>
<p><?php
_e('A default payment button is provided. A custom payment button may be used, choose your image or upload a new one, and just copy the "file url" here (optional.)', 'event_espresso');
?>
</p>
</div>
<div id="bypass_confirmation" style="display:none">
<h2><?php
_e('Bypassing the Confirmation Page', 'event_espresso');
?>
</h2>
<p><?php
_e('This will allow you to send your customers directly to the payment gateway of your choice.', 'event_espresso');
?>
</p>
</div>
<div id="force_ssl_return" style="display:none">
<h2><?php
_e('Force HTTPS on Return URL', 'event_espresso');
?>
</h2>
<p><?php
_e('Forces the gateway provider to send the customer back to the return page -- or pull the return page from the site -- using HTTPS. This is required in some instances to prevent a warning that the page the user is going to is not secure.', 'event_espresso');
?>
</p>
</div>
<div id="display_header" style="display:none">
<h2><?php
_e('Display a Form Header', 'event_espresso');
?>
</h2>
<p><?php
_e('Select if you would like to display a header above the payment form.', 'event_espresso');
?>
</p>
//.........这里部分代码省略.........
function event_espresso_gateways_options()
{
global $active_gateways;
$active_gateways = get_option('event_espresso_active_gateways', array());
?>
<div id="event_reg_theme" class="wrap">
<div id="icon-options-event" class="icon32"></div>
<h2><?php
_e('Manage Payment Gateways', 'event_espresso');
?>
</h2>
<?php
ob_start();
?>
<div id="payment_settings" class="meta-box-sortables ui-sortables">
<?php
$gateways_glob = glob(EVENT_ESPRESSO_PLUGINFULLPATH . "gateways/*/settings.php");
$upload_gateways_glob = glob(EVENT_ESPRESSO_GATEWAY_DIR . '*/settings.php');
if (!is_array($upload_gateways_glob)) {
$upload_gateways_glob = array();
}
foreach ($upload_gateways_glob as $upload_gateway) {
$pos = strpos($upload_gateway, 'gateways');
$sub = substr($upload_gateway, $pos);
foreach ($gateways_glob as &$gateway) {
$pos2 = strpos($gateway, 'gateways');
$sub2 = substr($gateway, $pos2);
if ($sub == $sub2) {
$gateway = $upload_gateway;
}
}
unset($gateway);
}
$gateways = array_merge($upload_gateways_glob, $gateways_glob);
$gateways = array_unique($gateways);
foreach ($gateways as $gateway) {
require_once $gateway;
}
do_action('action_hook_espresso_display_gateway_settings');
if (file_exists(EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/gateway_developer.php')) {
require_once EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/gateway_developer.php';
}
global $espresso_premium;
if ($espresso_premium != true) {
?>
<h2><?php
_e('Need more payment options?', 'event_espresso');
?>
<a href="http://eventespresso.com/download/" target="_blank"><?php
_e('Upgrade Now!', 'event_espresso');
?>
</a></h2>
<?php
}
?>
</div><!-- / .meta-box-sortables -->
<?php
$post_content = ob_get_clean();
espresso_choose_layout('', event_espresso_display_right_column(), $post_content);
?>
</div><!-- / #wrap -->
<div id="button_image" style="display:none">
<h2><?php
_e('Button Image URL', 'event_espresso');
?>
</h2>
<p><?php
_e('A default payment button is provided. A custom payment button may be used, choose your image or upload a new one, and just copy the "file url" here (optional.)', 'event_espresso');
?>
</p>
</div>
<div id="bypass_confirmation" style="display:none">
<h2><?php
_e('Bypassing the Confirmation Page', 'event_espresso');
?>
</h2>
<p><?php
_e('This will allow you to send your customers directly to the payment gateway of your choice.', 'event_espresso');
?>
</p>
</div>
<div id="force_ssl_return" style="display:none">
<h2><?php
_e('Force HTTPS on Return URL', 'event_espresso');
?>
</h2>
<p><?php
_e('Forces the gateway provider to send the customer back to the return page -- or pull the return page from the site -- using HTTPS. This is required in some instances to prevent a warning that the page the user is going to is not secure.', 'event_espresso');
?>
</p>
</div>
<div id="display_header" style="display:none">
<h2><?php
_e('Display a Form Header', 'event_espresso');
?>
</h2>
<p><?php
_e('Select if you would like to display a header above the payment form.', 'event_espresso');
?>
</p>
//.........这里部分代码省略.........
//.........这里部分代码省略.........
?>
</tbody>
</table>
<div>
<p><input type="checkbox" name="sAll" onclick="selectAll(this)" />
<strong>
<?php
_e('Check All', 'event_espresso');
?>
</strong>
<input type="hidden" name="action" value="delete_question" />
<input name="delete_question" type="submit" class="button-secondary" id="delete_question" value="<?php
_e('Delete Question', 'event_espresso');
?>
" style="margin-left:10px 0 0 10px;" onclick="return confirmDelete();">
<a style="margin-left:5px"class="button-secondary" href="admin.php?page=form_groups"><?php
_e('Question Groups', 'event_espresso');
?>
</a>
<a style="margin-left:5px"class="button-secondary thickbox" href="#TB_inline?height=400&width=500&inlineId=question_info">Help</a>
<a style="margin-left:5px"class="<?php
echo $button_style;
?>
" href="admin.php?page=form_builder&action=new_question"><?php
_e('Add New Question', 'event_espresso');
?>
</a>
</p>
</div>
</form>
<?php
$main_post_content = ob_get_clean();
espresso_choose_layout($main_post_content, event_espresso_display_right_column());
?>
</div>
<div id="question_info" class="pop-help" style="display:none">
<div class="TB-ee-frame">
<h2><?php
_e('Manage Questions Overview', 'event_espresso');
?>
</h2>
<p><?php
_e('The <code>Questions</code> page shows your list of available questions to add to your registration forms for events', 'event_espresso');
?>
</p>
<p><?php
_e('Use the add new question button at the top of the page to create a new question to add to the list ', 'event_espresso');
?>
<a href="admin.php?page=form_builder&action=new_question"><?php
_e('Add New Question', 'event_espresso');
?>
</a></p>
<p><?php
_e('Once you have a built a list of questions you may further organize your questions into <code>Groups.</code> These', 'event_espresso');
?>
<a href="admin.php?page=form_groups"><?php
_e('Question Groups ', 'event_espresso');
?>
</a><?php
_e('allow you to easily and conveniently add a group to a registration that will have a pre populated set of questions, this is especially handy when creating many registration forms, saving time, by being able to re-use specific groups of questions repetedly.', 'event_espresso');
?>
</p>
</div>
请发表评论