本文整理汇总了PHP中c_ws_plugin__s2member_utils_dirs类的典型用法代码示例。如果您正苦于以下问题:PHP c_ws_plugin__s2member_utils_dirs类的具体用法?PHP c_ws_plugin__s2member_utils_dirs怎么用?PHP c_ws_plugin__s2member_utils_dirs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了c_ws_plugin__s2member_utils_dirs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
echo '<div class="ws-menu-page-hr"></div>' . "\n";
echo '<h3 style="margin:0;">Auto-Return Page Template (<a href="#" onclick="jQuery(\'div#ws-plugin--s2member-pro-paypal-return-page-template\').toggle(); return false;" class="ws-dotted-link">optional customizations</a>)</h3>' . "\n";
echo '<div id="ws-plugin--s2member-pro-paypal-return-page-template" style="display:none;">' . "\n";
echo '<p>With s2Member Pro installed, you have the ability to customize your <a href="' . esc_attr(site_url("/?s2member_paypal_return=1&s2member_paypal_proxy=paypal&s2member_paypal_proxy_use=x-preview")) . '" target="_blank" rel="external">Auto-Return Page Template</a>. If you are using PayPal Standard integration <em>(i.e. PayPal Buttons)</em>, each of your Customers are returned back to your site immediately after they complete checkout at PayPal. Your Auto-Return Page displays a message and instructions for the Customer. s2Member may change the message and instructions dynamically, based on what the Customer is actually doing <em>(i.e. based on the type of transaction that is taking place)</em>. So, although we do NOT recommend that you attempt to change the message and instructions presented dynamically by s2Member, you CAN certainly control the Header, and/or the overall appearance of s2Member\'s Auto-Return Page Template.</p>' . "\n";
echo '<p>The quickest/easiest way, is to simply add some HTML code in the box below. For instance, you might include an <img> tag with your logo. The box below, allows you to customize the Header section <em>(i.e. the top)</em> of s2Member\'s default Auto-Return Page Template. Everything else, including the textual response and other important details that each Customer needs to know about, are already handled dynamically by s2Member <em>(based on the type of transaction that is taking place)</em>. All you need to do is customize the Header with your logo and anything else you feel is important. Although this Header customization is completely optional, we recommend an <a href="http://www.w3schools.com/tags/tag_img.asp" target="_blank" rel="external"><img> tag</a>, with a logo that is around 300px wide. After you "Save All Changes" below, you may <a href="' . esc_attr(site_url("/?s2member_paypal_return=1&s2member_paypal_proxy=paypal&s2member_paypal_proxy_use=x-preview")) . '" target="_blank" rel="external">click this link to see what your Header looks like</a>.</p>' . "\n";
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-pro-paypal-return-template-header">' . "\n";
echo 'Auto-Return Page Template Header:' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<textarea name="ws_plugin__s2member_pro_paypal_return_template_header" id="ws-plugin--s2member-pro-paypal-return-template-header" rows="5" wrap="off" spellcheck="false">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_paypal_return_template_header"]) . '</textarea><br />' . "\n";
echo 'Any valid XHTML / JavaScript' . (is_multisite() && c_ws_plugin__s2member_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' (or even PHP)') . ' code will work just fine here.' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '</tbody>' . "\n";
echo '</table>' . "\n";
echo '<div class="ws-menu-page-hr"></div>' . "\n";
if (!is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site()) {
echo '<p>It is also possible to build your own Auto-Return Page Template, if you prefer. If you feel the need to create your own Auto-Return Page Template, please make a copy of s2Member\'s default template: <code>' . esc_html(c_ws_plugin__s2member_utils_dirs::doc_root_path($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir"] . "/includes/templates/returns/default-template.php")) . '</code>. Place your copy of this default template, inside your active WordPress theme directory, and name the file: <code>/paypal-return.php</code>. s2Member will automatically find your Auto-Return Page Template in this location, and s2Member will use your template, instead of the default. Further details are provided inside s2Member\'s default template file. Once your custom template file is in place, you may <a href="' . esc_attr(site_url("/?s2member_paypal_return=1&s2member_paypal_proxy=paypal&s2member_paypal_proxy_use=x-preview")) . '" target="_blank" rel="external">click this link to see what it looks like</a>.</p>' . "\n";
}
echo '<p>It is also possible to bypass s2Member\'s Auto-Return system all together, if you prefer. For further details, please read more about the <code>success=""</code> Shortcode Attribute for PayPal Buttons generated by s2Member. You will find details on this inside your Dashboard, under: <code>s2Member -› PayPal Buttons -› Shortcode Attributes (Explained)</code>. Please note: you will still need to configure your PayPal account for Auto-Return/PDT <em>(as instructed above)</em>. Then, you may use the <code>success=""</code> Attribute in your Shortcode, when/if you need it. In other words, if you use the <code>success=""</code> Attribute in your Shortcode, the initial redirection back to s2Member\'s default Auto-Return/PDT handler MUST still occur. However, instead of s2Member displaying an Auto-Return Template to the Customer, s2Member will silently redirect the Customer to the URL that you specified in the <code>success="http://..."</code> Attribute of your Shortcode, allowing you to take complete control over what happens next.</p>' . "\n";
echo '</div>' . "\n";
}
开发者ID:donwea,项目名称:nhap.org,代码行数:31,代码来源:paypal-ops-return-template.inc.php
示例2: load
/**
* Loads s2Member's text domain for translations.
*
* @package s2Member\Translations
* @since 110815
*
* @attaches-to ``add_action("init");``
*
* @return null
*/
public static function load()
{
load_plugin_textdomain("s2member", FALSE, c_ws_plugin__s2member_utils_dirs::rel_path(WP_PLUGIN_DIR, dirname(dirname(__FILE__)) . "/translations"));
load_plugin_textdomain("s2member");
// Allows `.mo` file to be loaded from the `/wp-content/plugins/s2member-[locale].mo`.
do_action("ws_plugin__s2member_during_translations_load", get_defined_vars());
add_filter("gettext", "c_ws_plugin__s2member_translations::translation_mangler", 10, 3);
}
开发者ID:novichkovv,项目名称:candoweightloss,代码行数:18,代码来源:translations.inc.php
示例3: S2FilePicker_init
function S2FilePicker_init()
{
if (is_plugin_active('s2member/s2member.php')) {
/**/
if (!is_dir($files_dir = $GLOBALS['WS_PLUGIN__']['s2member']['c']['files_dir'])) {
if (is_writable(dirname(c_ws_plugin__s2member_utils_dirs::strip_dir_app_data($files_dir)))) {
mkdir($files_dir, 0777, true);
}
}
/**/
if (is_dir($files_dir) && is_writable($files_dir)) {
if (!file_exists($htaccess = $files_dir . '/.htaccess') || !apply_filters('ws_plugin__s2member_preserve_files_dir_htaccess', false, get_defined_vars())) {
file_put_contents($htaccess, trim(c_ws_plugin__s2member_utilities::evl(file_get_contents($GLOBALS['WS_PLUGIN__']["s2member"]["c"]['files_dir_htaccess']))));
}
}
add_action('media_buttons', 'S2FilePicker_btn', 20);
add_action('media_upload_s2fpicker', 'S2FilePicker_media_upload_handler');
add_action('media_upload_type_S2FilePicker_frame', 'S2FilePicker_media_upload_content');
} else {
add_action('admin_notices', 'S2FilePicker_warning');
}
}
开发者ID:hiryu85,项目名称:s2member-secure-file-picker,代码行数:22,代码来源:s2member-secure-file-picker.php
示例4: s2sfu_initialization
function s2sfu_initialization()
{
$active_plugins = get_option('active_plugins');
$required_plugin = 's2member/s2member.php';
if (in_array($required_plugin, $active_plugins)) {
/**/
if (!is_dir($files_dir = $GLOBALS['WS_PLUGIN__']['s2member']['c']['files_dir'])) {
if (is_writable(dirname(c_ws_plugin__s2member_utils_dirs::strip_dir_app_data($files_dir)))) {
mkdir($files_dir, 0777, true);
}
}
/**/
if (is_dir($files_dir) && is_writable($files_dir)) {
if (!file_exists($htaccess = $files_dir . '/.htaccess') || !apply_filters('ws_plugin__s2member_preserve_files_dir_htaccess', false, get_defined_vars())) {
file_put_contents($htaccess, trim(c_ws_plugin__s2member_utilities::evl(file_get_contents($GLOBALS['WS_PLUGIN__']["s2member"]["c"]['files_dir_htaccess']))));
}
}
add_action('media_buttons', 's2sfu_media_button', 20);
add_action('media_upload_s2sfu', 's2sfu_media_upload_handler');
} else {
add_action('admin_notices', 's2sfu_warning');
}
}
开发者ID:hiryu85,项目名称:s2member-secure-file-uploader,代码行数:23,代码来源:s2member-secure-file-uploader.php
示例5: __construct
public function __construct()
{
echo '<div class="wrap ws-menu-page">' . "\n";
echo '<div class="ws-menu-page-toolbox">' . "\n";
c_ws_plugin__s2member_menu_pages_tb::display();
echo '</div>' . "\n";
echo '<h2>Log Files</h2>' . "\n";
echo '<table class="ws-menu-page-table">' . "\n";
echo '<tbody class="ws-menu-page-table-tbody">' . "\n";
echo '<tr class="ws-menu-page-table-tr">' . "\n";
echo '<td class="ws-menu-page-table-l">' . "\n";
do_action("ws_plugin__s2member_during_logs_page_before_left_sections", get_defined_vars());
if (apply_filters("ws_plugin__s2member_during_logs_page_during_left_sections_display_help", true, get_defined_vars())) {
do_action("ws_plugin__s2member_during_logs_page_during_left_sections_before_help", get_defined_vars());
echo '<div class="ws-menu-page-group" title="Getting Help">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-help">' . "\n";
echo '<h3>Getting Help w/ s2Member (Troubleshooting)</h3>' . "\n";
echo '<p>s2Member is pretty easy to setup and install initially. Most of the official documentation is right here in your Dashboard (i.e. there is a lot of inline documentation built into the software). That being said, it CAN take some time to master everything there is to know about s2Member\'s advanced features. If you need assistance with s2Member, please search the <a href="http://www.s2member.com/kb/" target="_blank" rel="external">s2Member Knowledge Base</a>, <a href="http://www.s2member.com/videos/" target="_blank" rel="external">Video Tutorials</a>, <a href="http://www.s2member.com/forums/" target="_blank" rel="external">Forums</a> and <a href="http://www.s2member.com/codex/" target="_blank" rel="external">Codex</a>. If you are planning to do something creative with s2Member, you might want to <a href="http://jobs.wordpress.net" target="_blank" rel="external">hire a freelance developer</a> to assist you.</p>' . "\n";
echo '<p><strong>See also:</strong> <a href="http://www.s2member.com/kb/common-troubleshooting-tips/" target="_blank" rel="external">s2Member Troubleshooting Guide</a> (please read this first if you\'re having trouble).</p>' . "\n";
echo '<div class="ws-menu-page-hr"></div>' . "\n";
echo '<h3>Testing Server Compatibility</h3>' . "\n";
echo '<p>Please download the <a href="http://www.s2member.com/r/server-check-tool/">s2Member Server Scanner</a>. Unzip, upload via FTP; then open in a browser for a full report.</p>' . "\n";
echo '<div class="ws-menu-page-hr"></div>' . "\n";
echo '<h3>Troubleshooting Payment Gateway Integrations</h3>' . "\n";
echo '<p>Please use the s2Member Log Viewer (below). Log files can be very helpful.</p>' . "\n";
echo '<div class="ws-menu-page-hr"></div>' . "\n";
echo '<h3>Search s2Member KB Articles, Forums, Codex and more<em>!</em></h3>' . "\n";
echo '<form method="get" action="http://www.s2member.com/quick-s.php" target="_blank" onsubmit="if(this.q.value === \'enter search terms...\') this.q.value = \'\';">' . "\n";
echo '<p><input type="text" name="q" value="enter search terms..." style="width:60%;" onfocus="if(this.value === \'enter search terms...\') this.value = \'\';" onblur="if(this.value === \'\') this.value = \'enter search terms...\';" /> <input type="submit" value="Search" style="font-size:120%; font-weight:normal;" /></p>' . "\n";
echo '</form>' . "\n";
do_action("ws_plugin__s2member_during_logs_page_during_left_sections_during_help", get_defined_vars());
echo '</div>' . "\n";
echo '</div>' . "\n";
do_action("ws_plugin__s2member_during_logs_page_during_left_sections_after_help", get_defined_vars());
}
if (apply_filters("ws_plugin__s2member_during_logs_page_during_left_sections_display_log_settings", true, get_defined_vars())) {
do_action("ws_plugin__s2member_during_logs_page_during_left_sections_before_log_settings", get_defined_vars());
echo '<div class="ws-menu-page-group" title="Logging Configuration">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-log-settings-section">' . "\n";
echo '<h3>Logging Configuration</h3>' . "\n";
echo '<div class="info">' . "\n";
echo '<p style="font-size:110%; margin-top:0;"><span>We HIGHLY recommend that you enable logging during your initial testing phase. Logs produce lots of useful details that can help in debugging. Logs can help you find issues in your configuration and/or problems that occur during processing. Enable logging here, and then view your log files below; in the s2Member Log Viewer.</span></p>' . "\n";
echo '<p style="font-size:110%; margin-bottom:0;"><span class="ws-menu-page-error">However, it is VERY IMPORTANT to disable logging once you go live. Log files may contain personally identifiable information, credit card numbers, secret API credentials, passwords and/or other sensitive information. We STRONGLY suggest that logging be disabled on a live site (for security reasons).</span></p>' . "\n";
echo '</div>' . "\n";
echo '<div class="notice" style="margin-bottom:0;">' . "\n";
echo '<p style="font-size:110%; margin-bottom:0;"><span>Regarding s2Member Security Badges. If debug logging is enabled, your site will NOT qualify for an s2Member Security Badge until you disable logging (and you must ALSO download, and then delete any existing log files). For further details, please see KB Article: <a href="http://www.s2member.com/kb/security-badges/" target="_blank" rel="external">s2Member Security Badges</a>.</span></p>' . "\n";
echo '</div>' . "\n";
echo '<div class="ws-menu-page-hr"></div>' . "\n";
do_action("ws_plugin__s2member_during_logs_page_during_left_sections_during_log_settings", get_defined_vars());
echo '<form method="post" name="ws_plugin__s2member_options_form" id="ws-plugin--s2member-options-form">' . "\n";
echo '<input type="hidden" name="ws_plugin__s2member_options_save" id="ws-plugin--s2member-options-save" value="' . esc_attr(wp_create_nonce("ws-plugin--s2member-options-save")) . '" />' . "\n";
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-gateway-debug-logs">' . "\n";
echo 'Enable Logging Routines?' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<input type="radio" name="ws_plugin__s2member_gateway_debug_logs" id="ws-plugin--s2member-gateway-debug-logs-0" value="0"' . (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["gateway_debug_logs"] ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-gateway-debug-logs-0">No</label> <input type="radio" name="ws_plugin__s2member_gateway_debug_logs" id="ws-plugin--s2member-gateway-debug-logs-1" value="1"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["gateway_debug_logs"] ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-gateway-debug-logs-1">Yes, enable debugging w/ HTTP, API, IPN & Return Page logging (and List Server API logs too).</label><br />' . "\n";
echo '<em>This enables logging overall. Includes s2Member HTTP, API, IPN and Return Page logging. Also logs any List Server integrations.</em><br />' . "\n";
echo '<em>* Use only for debugging. This should NEVER be enabled on a live site.<br />* The log files are stored here: <code>' . esc_html(c_ws_plugin__s2member_utils_dirs::doc_root_path($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir"])) . '</code></em>' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-gateway-debug-logs-extensive">' . "\n";
echo 'Enable Additional Logging Routines?' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<input type="radio" name="ws_plugin__s2member_gateway_debug_logs_extensive" id="ws-plugin--s2member-gateway-debug-logs-extensive-0" value="0"' . (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["gateway_debug_logs_extensive"] ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-gateway-debug-logs-extensive-0">No</label> <input type="radio" name="ws_plugin__s2member_gateway_debug_logs_extensive" id="ws-plugin--s2member-gateway-debug-logs-extensive-1" value="1"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["gateway_debug_logs_extensive"] ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-gateway-debug-logs-extensive-1">Yes, enable debugging w/ HTTP connection logging for ALL of WordPress.</label><br />' . "\n";
echo '<em>This enables HTTP connection logging for ALL of WordPress (quite extensive).<br />* Use only for debugging. This should NEVER be enabled on a live site.<br />* Creates the additional log file: <code>wp-http-api-debug.log</code></em>' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '</tbody>' . "\n";
echo '</table>' . "\n";
echo '<p class="submit" style="margin-top:20px;">' . "\n";
echo '<input type="submit" value="Update Logging Configuration" />' . "\n";
echo '</p>' . "\n";
echo '</form>' . "\n";
echo '</div>' . "\n";
echo '</div>' . "\n";
do_action("ws_plugin__s2member_during_logs_page_during_left_sections_after_log_settings", get_defined_vars());
}
if (apply_filters("ws_plugin__s2member_during_logs_page_during_left_sections_display_logs", true, get_defined_vars())) {
do_action("ws_plugin__s2member_during_logs_page_during_left_sections_before_logs", get_defined_vars());
echo '<div class="ws-menu-page-group" title="Logs Viewer" default-state="open">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-logs-section">' . "\n";
echo '<h3>Debugging Tools/Tips & Other Important Details (<a href="#" onclick="jQuery(\'div#ws-plugin--s2member-debugging-tips-details\').toggle(); return false;" class="ws-dotted-link">click here to toggle</a>)</h3>' . "\n";
echo '<div id="ws-plugin--s2member-debugging-tips-details" style="display:none;">' . "\n";
echo '<div class="ws-menu-page-hr"></div>' . "\n";
echo '<form method="post" onsubmit="if(!confirm(\'Archive all existing log files?\\n\\nAll of your current log files will be archived (e.g. they will simply be renamed with an ARCHIVED tag & date in their file name); and new log files will be created automatically the next time s2Member logs something on your installation.\\n\\nPlease click OK to confirm this action.\')) return false;">' . "\n";
echo '<input type="hidden" name="ws_plugin__s2member_logs_archive_start_fresh" value="' . esc_attr(wp_create_nonce("ws-plugin--s2member-logs-archive-start-fresh")) . '" />' . "\n";
echo '<input type="submit" value="Archive All Current Log Files" class="ws-menu-page-right ws-plugin--s2member-archive-logs-start-fresh-button" style="font-size:110%; font-weight:normal; clear:right; min-width:200px;" />' . "\n";
//.........这里部分代码省略.........
开发者ID:donwea,项目名称:nhap.org,代码行数:101,代码来源:logs.inc.php
示例6: uninstall
/**
* Uninstall routines for s2Member.
*
* @package s2Member\Installation
* @since 3.5
*/
public static function uninstall()
{
global $wpdb;
/** @var $wpdb wpdb */
global $current_site, $current_blog;
// Multisite.
do_action('ws_plugin__s2member_before_uninstall', get_defined_vars());
if ($GLOBALS['WS_PLUGIN__']['s2member']['o']['run_uninstall_routines']) {
c_ws_plugin__s2member_roles_caps::unlink_roles();
c_ws_plugin__s2member_files::remove_no_gzip_from_root_htaccess();
if (is_dir($files_dir = $GLOBALS['WS_PLUGIN__']['s2member']['c']['files_dir'])) {
if (file_exists($htaccess = $files_dir . '/.htaccess')) {
if (is_writable($htaccess)) {
unlink($htaccess);
}
}
@rmdir($files_dir) . @rmdir(c_ws_plugin__s2member_utils_dirs::strip_dir_app_data($files_dir));
}
if (is_dir($logs_dir = $GLOBALS['WS_PLUGIN__']['s2member']['c']['logs_dir'])) {
foreach (scandir($logs_dir) as $log_file) {
if (is_file($log_file = $logs_dir . '/' . $log_file)) {
if (is_writable($log_file)) {
unlink($log_file);
}
}
}
@rmdir($logs_dir) . @rmdir(c_ws_plugin__s2member_utils_dirs::strip_dir_app_data($logs_dir));
}
delete_option('ws_plugin__s2member_cache');
delete_option('ws_plugin__s2member_notices');
delete_option('ws_plugin__s2member_options');
delete_option('ws_plugin__s2member_configured');
delete_option('ws_plugin__s2member_activated_levels');
delete_option('ws_plugin__s2member_activated_version');
delete_option('ws_plugin__s2member_activated_mms_version');
if (is_multisite() && is_main_site()) {
delete_site_option('ws_plugin__s2member_options');
}
$wpdb->query("DELETE FROM `" . $wpdb->postmeta . "` WHERE `meta_key` LIKE '" . esc_sql(c_ws_plugin__s2member_utils_strings::like_escape('s2m_')) . "%'");
$wpdb->query("DELETE FROM `" . $wpdb->postmeta . "` WHERE `meta_key` LIKE '%" . esc_sql(c_ws_plugin__s2member_utils_strings::like_escape('_s2m_')) . "%'");
$wpdb->query("DELETE FROM `" . $wpdb->postmeta . "` WHERE `meta_key` LIKE '%" . esc_sql(c_ws_plugin__s2member_utils_strings::like_escape('s2member_')) . "%'");
$wpdb->query("DELETE FROM `" . $wpdb->usermeta . "` WHERE `meta_key` LIKE '" . esc_sql(c_ws_plugin__s2member_utils_strings::like_escape('s2m_')) . "%'");
$wpdb->query("DELETE FROM `" . $wpdb->usermeta . "` WHERE `meta_key` LIKE '%" . esc_sql(c_ws_plugin__s2member_utils_strings::like_escape('_s2m_')) . "%'");
$wpdb->query("DELETE FROM `" . $wpdb->usermeta . "` WHERE `meta_key` LIKE '%" . esc_sql(c_ws_plugin__s2member_utils_strings::like_escape('s2member_')) . "%'");
$wpdb->query("DELETE FROM `" . $wpdb->options . "` WHERE `option_name` LIKE '" . esc_sql(c_ws_plugin__s2member_utils_strings::like_escape('s2m_')) . "%'");
$wpdb->query("DELETE FROM `" . $wpdb->options . "` WHERE `option_name` LIKE '%" . esc_sql(c_ws_plugin__s2member_utils_strings::like_escape('_s2m_')) . "%'");
$wpdb->query("DELETE FROM `" . $wpdb->options . "` WHERE `option_name` LIKE '%" . esc_sql(c_ws_plugin__s2member_utils_strings::like_escape('s2member_')) . "%'");
do_action('ws_plugin__s2member_during_uninstall', get_defined_vars());
}
do_action('ws_plugin__s2member_after_uninstall', get_defined_vars());
}
开发者ID:adnandot,项目名称:intenseburn,代码行数:57,代码来源:installation.inc.php
示例7: alipay_ops_page
/**
* Builds the options panel for this Payment Gateway.
*
* @package s2Member\Menu_Pages
* @since 1.5
*
* @return null
*/
public static function alipay_ops_page()
{
c_ws_plugin__s2member_menu_pages::update_all_options();
// Updates options.
$logs_dir = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir"];
if (!is_dir($logs_dir) && is_writable(dirname(c_ws_plugin__s2member_utils_dirs::strip_dir_app_data($logs_dir)))) {
mkdir($logs_dir, 0777, true) . clearstatcache();
}
$htaccess = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir"] . "/.htaccess";
$htaccess_contents = trim(c_ws_plugin__s2member_utilities::evl(file_get_contents($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir_htaccess"])));
if (is_dir($logs_dir) && is_writable($logs_dir) && !file_exists($htaccess)) {
file_put_contents($htaccess, $htaccess_contents) . clearstatcache();
}
if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["gateway_debug_logs"]) {
if (!is_dir($logs_dir)) {
// If the security-enabled logs directory does not exist yet.
c_ws_plugin__s2member_admin_notices::display_admin_notice('The security-enabled logs directory (<code>' . esc_html(c_ws_plugin__s2member_utils_dirs::doc_root_path($logs_dir)) . '</code>) does not exist. Please create this directory manually & make it writable (chmod 777).', true);
} else {
if (!is_writable($logs_dir)) {
// If the logs directory is not writable yet.
c_ws_plugin__s2member_admin_notices::display_admin_notice('Permissions error. The security-enabled logs directory (<code>' . esc_html(c_ws_plugin__s2member_utils_dirs::doc_root_path($logs_dir)) . '</code>) is not writable. Please make this directory writable (chmod 777).', true);
}
}
if (!file_exists($htaccess)) {
// If the .htaccess file has not been created yet.
c_ws_plugin__s2member_admin_notices::display_admin_notice('The .htaccess protection file (<code>' . esc_html(c_ws_plugin__s2member_utils_dirs::doc_root_path($htaccess)) . '</code>) does not exist. Please create this file manually. Inside your .htaccess file, add this:<br /><pre>' . esc_html($htaccess_contents) . '</pre>', true);
} else {
if (!preg_match("/deny from all/i", file_get_contents($htaccess))) {
// Else if the .htaccess file does not offer the required protection.
c_ws_plugin__s2member_admin_notices::display_admin_notice('Unprotected. The .htaccess protection file (<code>' . esc_html(c_ws_plugin__s2member_utils_dirs::doc_root_path($htaccess)) . '</code>) does not contain <code>deny from all</code>. Inside your .htaccess file, add this:<br /><pre>' . esc_html($htaccess_contents) . '</pre>', true);
}
}
}
include_once dirname(dirname(dirname(dirname(__FILE__)))) . "/menu-pages/alipay-ops.inc.php";
return;
}
开发者ID:EliasGoldberg,项目名称:troop-sim,代码行数:44,代码来源:alipay-menu-pages.inc.php
示例8: deactivate
/**
* Deactivation routines for s2Member.
*
* @package s2Member\Installation
* @since 3.5
*
* @return null
*/
public static function deactivate()
{
global $wpdb;
/* Global database object reference. */
global $current_site, $current_blog;
/* Multisite. */
/**/
do_action("ws_plugin__s2member_before_deactivation", get_defined_vars());
/**/
if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["run_deactivation_routines"]) {
c_ws_plugin__s2member_roles_caps::unlink_roles();
/* Unlink Roles/Caps. */
/**/
if (is_dir($files_dir = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) {
if (file_exists($htaccess = $files_dir . "/.htaccess")) {
if (is_writable($htaccess)) {
unlink($htaccess);
}
}
/**/
@rmdir($files_dir) . @rmdir(c_ws_plugin__s2member_utils_dirs::strip_dir_app_data($files_dir));
}
/**/
if (is_dir($logs_dir = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir"])) {
foreach (scandir($logs_dir) as $log_file) {
if (is_file($log_file = $logs_dir . "/" . $log_file)) {
if (is_writable($log_file)) {
unlink($log_file);
}
}
}
/**/
@rmdir($logs_dir) . @rmdir(c_ws_plugin__s2member_utils_dirs::strip_dir_app_data($logs_dir));
}
/**/
delete_option("ws_plugin__s2member_cache");
delete_option("ws_plugin__s2member_notices");
delete_option("ws_plugin__s2member_options");
delete_option("ws_plugin__s2member_configured");
delete_option("ws_plugin__s2member_activated_levels");
delete_option("ws_plugin__s2member_activated_version");
delete_option("ws_plugin__s2member_activated_mms_version");
/**/
if (is_multisite() && is_main_site()) {
/* Site options? */
delete_site_option("ws_plugin__s2member_options");
}
/**/
$wpdb->query("DELETE FROM `" . $wpdb->options . "` WHERE `option_name` LIKE '%" . esc_sql(like_escape("s2member_")) . "%'");
$wpdb->query("DELETE FROM `" . $wpdb->options . "` WHERE `option_name` LIKE '" . esc_sql(like_escape("_transient_s2m_")) . "%'");
$wpdb->query("DELETE FROM `" . $wpdb->options . "` WHERE `option_name` LIKE '" . esc_sql(like_escape("_transient_timeout_s2m_")) . "%'");
$wpdb->query("DELETE FROM `" . $wpdb->postmeta . "` WHERE `meta_key` LIKE '%" . esc_sql(like_escape("s2member_")) . "%'");
$wpdb->query("DELETE FROM `" . $wpdb->usermeta . "` WHERE `meta_key` LIKE '%" . esc_sql(like_escape("s2member_")) . "%'");
/**/
do_action("ws_plugin__s2member_during_deactivation", get_defined_vars());
}
/**/
do_action("ws_plugin__s2member_after_deactivation", get_defined_vars());
/**/
return;
/* Return for uniformity. */
}
开发者ID:vinvinh315,项目名称:maintainwebsolutions.com,代码行数:70,代码来源:installation.inc.php
示例9: __construct
//.........这里部分代码省略.........
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<input type="radio" name="ws_plugin__s2member_paypal_sandbox" id="ws-plugin--s2member-paypal-sandbox-0" value="0"' . (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"] ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-paypal-sandbox-0">No</label> <input type="radio" name="ws_plugin__s2member_paypal_sandbox" id="ws-plugin--s2member-paypal-sandbox-1" value="1"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"] ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-paypal-sandbox-1">Yes, enable support for Sandbox testing.</label><br />' . "\n";
echo '<em>Only enable this if you\'ve provided Sandbox credentials above.<br />This puts the API, IPN, PDT and Form/Button Generators all into Sandbox mode.<br />See: <a href="http://s2member.com/r/paypal-developers/" target="_blank" rel="external">PayPal Developers</a></em>' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-paypal-btn-encryption">' . "\n";
echo 'Enable Button Encryption?' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<input type="radio" name="ws_plugin__s2member_paypal_btn_encryption" id="ws-plugin--s2member-paypal-btn-encryption-0" value="0"' . (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_btn_encryption"] ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-paypal-btn-encryption-0">No</label> <input type="radio" name="ws_plugin__s2member_paypal_btn_encryption" id="ws-plugin--s2member-paypal-btn-encryption-1" value="1"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_btn_encryption"] ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-paypal-btn-encryption-1">Yes, enable PayPal Button encryption.</label><br />' . "\n";
echo '<em>If enabled, all of your PayPal Button Shortcodes will produce <em>encrypted</em> PayPal Buttons. This improves security against fraudulent transactions. For extra security, you should update your PayPal account too, under: <strong>My Profile → Website Payment Preferences</strong>. You\'ll want to block all non-encrypted payments. <strong>Note:</strong> this will NOT work until you\'ve supplied s2Member with your PayPal Email Address, and also with your API Username/Password/Signature.</em>' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
if (!is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site()) {
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-gateway-debug-logs">' . "\n";
echo 'Enable Logging Routines?' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<input type="radio" name="ws_plugin__s2member_gateway_debug_logs" id="ws-plugin--s2member-gateway-debug-logs-0" value="0"' . (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["gateway_debug_logs"] ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-gateway-debug-logs-0">No</label> <input type="radio" name="ws_plugin__s2member_gateway_debug_logs" id="ws-plugin--s2member-gateway-debug-logs-1" value="1"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["gateway_debug_logs"] ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-gateway-debug-logs-1">Yes, enable debugging, with API, IPN & Return Page logging.</label><br />' . "\n";
echo '<em>This enables API, IPN and Return Page logging. The log files are stored here: <code>' . esc_html(c_ws_plugin__s2member_utils_dirs::doc_root_path($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir"])) . '</code></em><br />' . "\n";
echo '<em class="ws-menu-page-hilite">If you have any trouble, please review your s2Member log files for problems. See: <a href="' . esc_attr(admin_url("/admin.php?page=ws-plugin--s2member-logs")) . '">Log Viewer</a></em>' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<div class="info" style="margin-bottom:0;">' . "\n";
echo '<p style="margin-top:0;"><span>We highly recommend that you enable logging during your initial testing phase. Logs produce lots of useful details that can help in debugging. Logs can help you find issues in your configuration and/or problems during payment processing. See: <a href="' . esc_attr(admin_url("/admin.php?page=ws-plugin--s2member-logs")) . '">Log Files (Debug)</a>.</span></p>' . "\n";
echo '<p style="margin-bottom:0;"><span class="ws-menu-page-error">However, it is very important to disable logging once you go live. Log files may contain personally identifiable information, credit card numbers, secret API credentials, passwords and/or other sensitive information. We strongly suggest that logging be disabled on a live site (for security reasons).</span></p>' . "\n";
echo '</div>' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
}
echo '</tbody>' . "\n";
echo '</table>' . "\n";
echo '<div class="ws-menu-page-hr"></div>' . "\n";
echo '<p><em><strong>Sandbox Tip:</strong> If you\'re testing your site through a PayPal Sandbox account, please remember that Email Confirmations from s2Member will not be received after a test purchase. s2Member sends its Confirmation Emails to the PayPal Email Address of the Customer. Since PayPal Sandbox addresses are usually bogus (for testing), you will have to run live transactions before Email Confirmations from s2Member are received. That being said, all other s2Member functionality can be tested through a PayPal Sandbox account. Email Confirmations are the only hang-up.</em></p>' . "\n";
do_action("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_during_paypal_account_details_after_sandbox_tip", get_defined_vars());
echo '</div>' . "\n";
echo '</div>' . "\n";
do_action("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_after_paypal_account_details", get_defined_vars());
}
if (apply_filters("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_display_paypal_payflow_account_details", c_ws_plugin__s2member_utils_conds::pro_is_installed(), get_defined_vars())) {
do_action("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_before_paypal_payflow_account_details", get_defined_vars());
echo '<div class="ws-menu-page-group" title="Payflow Account Details">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-paypal-payflow-account-details-section">' . "\n";
echo '<a href="http://www.s2member.com/paypal" target="_blank"><img src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/paypal-logo.png" class="ws-menu-page-right" style="width:125px; height:125px; border:0;" alt="." /></a>' . "\n";
echo '<h3>Payflow Account Details (required, if using Payflow)</h3>' . "\n";
echo '<p>Newer PayPal Pro accounts (i.e., PayPal Pro w/ Payflow Edition), come with the Payflow API for Recurring Billing service. If you have a newer PayPal Pro account, and you wish to integrate PayPal\'s Recurring Billing service with s2Member Pro-Forms, you will need to fill in the details here. Providing Payflow API Credentials below, will automatically put s2Member\'s Recurring Billing integration through Pro-Forms into Payflow mode. Just fill in the details below, and you\'re ready to generate Pro-Forms that charge customers on a recurring basis. s2Member will use the Payflow Edition API instead of the older PayPal Pro DPRP service; which is being slowly phased out in favor of Payflow Edition APIs.</p>' . "\n";
echo '<p><em><strong>Payflow API Credentials:</strong> Once you have a PayPal Pro account, you\'ll need access to your <a href="http://s2member.com/r/paypal-profile-api-access/" target="_blank" rel="external">Payflow API Credentials</a>. Log into your PayPal account, and navigate to <strong>Profile → API Access (or → Request API Credentials)</strong>. From the available options, please choose "Payflow / API Access". You will need the following credentials: Username, Password, Partner, and Vendor.</em></p>' . "\n";
echo '<p><em><strong>Important Note:</strong> Supplying Payflow API Credentials here does not mean you can bypass other areas of s2Member\'s configuration; i.e., please supply s2Member with all of your PayPal account details. Your PayPal Pro (Payflow Edition) account is configured here, but up above you will need to configure other Account Details also.</em></p>' . "\n";
echo '<p><strong>See also:</strong> This KB article: <a href="http://s2member.com/kb-article/supported-paypal-account-types/" target="_blank" rel="external">PayPal Account Types</a>.</p>' . "\n";
do_action("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_during_paypal_payflow_account_details", get_defined_vars());
开发者ID:codeforest,项目名称:s2member,代码行数:67,代码来源:paypal-ops.inc.php
示例10: __construct
//.........这里部分代码省略.........
echo '<tr>' . "\n";
/**/
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-pro-ccbill-salt-key">' . "\n";
echo 'Triple DES Encryption Key:' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
/**/
echo '</tr>' . "\n";
echo '<tr>' . "\n";
/**/
echo '<td>' . "\n";
echo '<input type="password" autocomplete="off" name="ws_plugin__s2member_pro_ccbill_salt_key" id="ws-plugin--s2member-pro-ccbill-salt-key" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_ccbill_salt_key"]) . '" /><br />' . "\n";
echo 'ccBill® requires you to contact them via live chat for this Encryption Key. You will need to ask your ccBill® support representative for a Triple DES Encryption Key. Sometimes referred to as a Dynamic Pricing Salt. s2Member needs this Key in order to communicate with ccBill®, and to properly configure your Dynamic Pricing Form.' . "\n";
echo '</td>' . "\n";
/**/
echo '</tr>' . "\n";
/**/
if (!is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site()) {
echo '<tr>' . "\n";
/**/
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-gateway-debug-logs">' . "\n";
echo 'Enable Logging Routines?<br />' . "\n";
echo '<small><em class="ws-menu-page-hilite">* This setting applies universally. [ <a href="#" onclick="alert(\'This configuration option may ALSO appear under ( s2Member -> PayPal® Options ). Feel free to configure it here; but please remember that thi
|
请发表评论