本文整理汇总了PHP中NewsletterControls::js_redirect方法的典型用法代码示例。如果您正苦于以下问题:PHP NewsletterControls::js_redirect方法的具体用法?PHP NewsletterControls::js_redirect怎么用?PHP NewsletterControls::js_redirect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NewsletterControls
的用法示例。
在下文中一共展示了NewsletterControls::js_redirect方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: NewsletterControls
<?php
require_once NEWSLETTER_INCLUDES_DIR . '/controls.php';
$controls = new NewsletterControls();
$module = NewsletterUsers::instance();
if ($controls->is_action('save')) {
$controls->data['status'] = 'C';
$controls->data['sex'] = 'n';
$user = $module->save_user($controls->data);
if ($user === false) {
$controls->errors = 'This email already exists.';
} else {
$controls->js_redirect($module->get_admin_page_url('edit') . '&id=' . $user->id);
return;
}
}
?>
<div class="wrap">
<?php
$help_url = 'http://www.thenewsletterplugin.com/plugins/newsletter/subscribers-module';
?>
<?php
include NEWSLETTER_DIR . '/header-new.php';
?>
<div id="newsletter-title">
<?php
include NEWSLETTER_DIR . '/users/menu.inc.php';
?>
<h2>New subscriber</h2>
</div>
示例2: email
if (!isset($controls->data['list_' . $i])) {
$controls->data['list_' . $i] = 0;
}
}
$controls->data['id'] = $id;
$r = $module->save_user($controls->data);
if ($r === false) {
$controls->errors = 'Unable to update, may be the email (if changed) is duplicated.';
} else {
$controls->messages = 'Updated.';
$controls->data = $module->get_user($id, ARRAY_A);
}
}
if ($controls->is_action('delete')) {
$module->delete_user($id);
$controls->js_redirect($module->get_admin_page_url('index'));
return;
}
if (!$controls->is_action()) {
$controls->data = $module->get_user($id, ARRAY_A);
}
$options_profile = get_option('newsletter_profile');
?>
<div class="wrap">
<?php
$help_url = 'http://www.thenewsletterplugin.com/plugins/newsletter/subscribers-module';
?>
<?php
include NEWSLETTER_DIR . '/header-new.php';
?>