• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP ym_get函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: get_button_code

 function get_button_code($pack, $user_id)
 {
     get_currentuserinfo();
     global $current_user;
     if ($current_user->ID == 0) {
         $current_user = ym_get_user_by_username(ym_get('username'));
     }
     $currency_codes = array('AUD' => '036', 'CAD' => '124', 'JPY' => '392', 'GBP' => '826', 'USD' => '840', 'EUR' => '978');
     if (array_key_exists(ym_get_currency($pack['id']), $currency_codes)) {
         $code = $currency_codes[ym_get_currency($pack['id'])];
     } else {
         return;
     }
     $data = array('clientAccnum' => $this->clientAccnum, 'clientSubacc' => $this->clientSubacc, 'formName' => $this->formname, 'customer_fname' => get_user_meta($current_user->ID, 'first_name', TRUE), 'customer_lname' => get_user_meta($current_user->ID, 'last_name', TRUE), 'email' => $current_user->user_email);
     if (isset($pack['id']) && $pack['id']) {
         // convert to days
         switch ($pack['duration_type']) {
             case 'y':
                 $duration = $pack['duration'] * 365;
                 break;
             case 'm':
                 $duration = $pack['duration'] * 30;
                 break;
             default:
                 $duration = $pack['duration'];
         }
         $data = array_merge($data, array('formPrice' => $pack['cost'], 'formPeriod' => $duration, 'currencyCode' => $code));
         if ($pack['trial_on']) {
             $data['formPrice'] = $pack['trial_cost'];
             // convert to days
             switch ($pack['trial_duration_type']) {
                 case 'y':
                     $duration = $pack['trial_duration'] * 365;
                     break;
                 case 'm':
                     $duration = $pack['trial_duration'] * 30;
                     break;
                 default:
                     $duration = $pack['trial_duration'];
             }
             $data['formPeriod'] = $duration;
         }
         if (isset($pack['num_cycles']) && $pack['num_cycles'] != 1) {
             // recur
             //				unset($data['formPrice'], $data['formPeriod']);
             $data['formRecurringPrice'] = $pack['cost'];
             $data['formRecurringPeriod'] = $duration;
             $data['formRebills'] = $pack['num_cycles'] == 0 ? 99 : $pack['num_cycles'];
             // gen formdigest
             $data['formDigest'] = md5($data['formPrice'] . $data['formPeriod'] . $data['formRecurringPrice'] . $data['formRecurringPeriod'] . $data['formRebills'] . $code . $this->md5salt);
         } else {
             // gen formdigest
             $data['formDigest'] = md5($data['formPrice'] . $data['formPeriod'] . $code . $this->md5salt);
         }
         $data['custom'] = 'buy_subscription_' . $pack['id'] . '_' . $user_id;
     }
     return $data;
 }
开发者ID:AdultStack,项目名称:ap-members,代码行数:58,代码来源:ym_ccbill.php


示例2: ym_logs_search_users

function ym_logs_search_users()
{
    ym_ajax_superuser_check();
    $users = get_users('search=*' . like_escape(ym_get('q')) . '*');
    foreach ($users as $user) {
        echo $user->user_login . "\n";
    }
    die;
}
开发者ID:AdultStack,项目名称:ap-members,代码行数:9,代码来源:ym-admin_ajax_functions.include.php


示例3: init

 function init()
 {
     global $ym_sys, $ym_crons_that_exist;
     if ($ym_sys->enable_manual_cron) {
         foreach ($ym_crons_that_exist as $cron_job) {
             if ($cron_job['core'] != 2 && wp_get_schedule($cron_job['task'])) {
                 // clear
                 wp_clear_scheduled_hook($cron_job['task']);
             }
         }
     } else {
         foreach ($ym_crons_that_exist as $cron_job) {
             if ($cron_job['core'] != 2 && !wp_get_schedule($cron_job['task'])) {
                 // needs to be scheduled
                 $now = time();
                 $next = mktime($cron_job['time'][0], $cron_job['time'][1], 0, date('n', $now), date('j', $now), date('Y', $now));
                 // next, schedule, action_name
                 wp_schedule_event($next, $cron_job['schedule'], $cron_job['task']);
             }
         }
     }
     // check for manual call
     if (ym_get('ym_cron_do', FALSE)) {
         // has call
         $task = ym_get('ym_cron_job', FALSE);
         if ($task) {
             $tasks = array($task => 1);
         } else {
             $tasks = $ym_crons_that_exist;
         }
         foreach ($tasks as $task => $data) {
             echo 'do ' . $task . "\n";
             do_action($task, -1);
         }
         echo "\n";
         echo 1;
         die;
     }
 }
开发者ID:AdultStack,项目名称:ap-members,代码行数:39,代码来源:ym-cron.include.php


示例4: ym_depricated_replace_tag

function ym_depricated_replace_tag($function, $matches, $argument = false)
{
    get_currentuserinfo();
    global $current_user, $user_data, $ym_user;
    $return = '';
    switch ($function) {
        //Checks User Account usage: [user_account_is#Member]
        // TODO: 11.0.8 deprecate in favour of ym_user_is
        case 'user_account_is':
            _doing_it_wrong(__FUNCTION__, 'Use ym_user_is shortcode', '11.0.6');
            $argument = str_replace('+', ' ', $argument);
            $user_id = false;
            if (ym_get('token') && ym_use_rss_token()) {
                $user = ym_get_user_by_token(ym_get('token'));
                $user_id = $user->ID;
            }
            if (strtolower(ym_get_user_account_type($user_id)) == strtolower($argument) || current_user_can('edit_posts')) {
                $return = $matches;
            }
            break;
    }
    return do_shortcode(stripslashes($return));
}
开发者ID:AdultStack,项目名称:ap-members,代码行数:23,代码来源:ym_deprecated.php


示例5: ym_app_loaded

function ym_app_loaded()
{
    ym_firesale_maintain_tiers();
    if (is_admin()) {
        ym_app_check_version();
        // download interrupt
        if (ym_get('app_download', FALSE)) {
            global $ym_app_version_resp;
            $ym_app_version_resp->checkForUpdates();
            $state = get_option($ym_app_version_resp->optionName);
            $download_url = $state->update->download_url;
            header('Location: ' . $download_url);
            exit;
        }
        add_filter('ym_navigation', 'ym_app_menu');
        add_action('ym_additional_context_help', 'ym_app_context_help');
        add_action('admin_head', 'ym_app_styles');
    }
    add_action('login_head', 'ym_firesale_subs');
    add_filter('ym_additional_code', 'ym_firesale_ppp', 10, 3);
    // ppp packs has widget toooo, so can't hook to additional
    add_action('wp_head', 'ym_firesale_ppp_packs');
    add_shortcode('app_counter', 'ym_fire_shortcode_parse');
}
开发者ID:AdultStack,项目名称:ap-members,代码行数:24,代码来源:ym_app.php


示例6: __

                $wpdb->query($sql);
                if ($wpdb->insert_id) {
                    echo '<p>' . __('Email Associated', 'ym_mailmanager') . '</p>';
                } else {
                    echo '<p>' . __('Email Failed to be Associated', 'ym_mailmanager') . '</p>';
                }
                ym_box_bottom();
                ym_box_top(__('Email Series', 'ym_mailmanager'));
            }
        } else {
            if ($del_id = ym_get('deleteid')) {
                $sql = 'DELETE FROM ' . $wpdb->prefix . 'mm_email_in_series WHERE id = ' . $del_id;
                $wpdb->query($sql);
            }
        }
        if ($series = ym_get('series')) {
            echo '<form action="" method="post">
			<input type="hidden" name="series" value="' . $series . '" />
			<table class="form-table">';
            $emails = mailmanager_get_emails(TRUE);
            if ($emails) {
                echo $ym_formgen->render_combo_from_array_row(__('Select Prior Email', 'ym_mailmanager'), 'email_id', $emails, '', __('Select a previously created email', 'ym_mailmanager'));
            }
            $days = array();
            for ($x = 0; $x <= 365; $x++) {
                $days[$x] = $x . ' Days';
            }
            echo $ym_formgen->render_combo_from_array_row(__('Select Delay', 'ym_mailmanager'), 'delay', $days, '', __('Select number of days between emails', 'ym_mailmanager'));
            echo '
			</table>
			<p style="text-align: right;">
开发者ID:AdultStack,项目名称:ap-members,代码行数:31,代码来源:series.php


示例7: __

        echo '</div>';
        return;
    default:
        if (ym_get('message')) {
            echo '<div id="message" class="updated fade"><p>';
        }
        if (ym_get('message') == 'ok') {
            echo __('Packages were updated', 'ym');
        }
        if (ym_get('message') == 'order') {
            echo __('Package order was updated', 'ym');
        }
        if (ym_get('message') == 'deleted') {
            echo __('The Pack was deleted', 'ym');
        }
        if (ym_get('message')) {
            echo '</p></div>';
        }
        ym_box_top('&nbsp');
        echo '<form action="' . $link . 'order" method="post" onsubmit="ym_process_sort();">';
        echo '<table class="form-table" id="sorttable">';
        $header = '<tr>
				<th style="width: 20px;">' . __('ID', 'ym') . '</th>
				<th>' . __('Label', 'ym') . '</th>
				<th>' . __('Cost', 'ym') . '</th>
				<th>' . __('Package Type', 'ym') . '</th>
				<th>' . __('WP Role', 'ym') . '</th>
				<th style="width: 40px;">' . __('Visible', 'ym') . '</th>
				<th style="width: 40px;">' . __('Group', 'ym') . '</th>
				<th style="width: 100px; text-align: center;">' . __('User Count', 'ym') . '</th>
				<th style="width: 20px;"></th><th style="width: 20px;"></th>
开发者ID:AdultStack,项目名称:ap-members,代码行数:31,代码来源:ym-membership-packages.php


示例8: foreach

    foreach ($available_modules as $entry => $modules_dir) {
        $class = rtrim($entry, '.php');
        require_once $modules_dir . '/' . $entry;
        $obj = new $class();
        $status = in_array($class, (array) $ym_active_modules) ? 'Active' : 'Inactive';
        $links = '';
        if ($status == 'Active') {
            if (method_exists($obj, 'load_options')) {
                $links .= '<a href="' . YM_ADMIN_URL . '&ym_page=' . ym_get('ym_page') . '&action=modules&mode=options&sel=' . $entry . '">' . __('Settings</a>', 'ym') . '</a>';
            }
            $links .= '<br />';
            if ($entry != 'ym_free.php') {
                $links .= '<a href="' . YM_ADMIN_URL . '&ym_page=' . ym_get('ym_page') . '&action=modules&mode=deactivate&sel=' . $entry . '">' . __('Deactivate', 'ym') . '</a>';
            }
        } else {
            $activate_url = YM_ADMIN_URL . '&ym_page=' . ym_get('ym_page') . '&action=modules&mode=activate&sel=' . $entry;
            $links = sprintf(__('<a href="%s">Activate</a>', 'ym'), $activate_url);
        }
        $desc = $obj->description;
        echo '
		<tr valign="top">
			<td valign="top" width="10%"><span style="font-size: 14px;">' . $obj->name . '</span></td>
			<td valign="top">' . strip_tags($desc) . '</td>
			<td valign="top" width="7%" style="color:' . ($status == 'Active' ? '#00AA00' : '#FF0000') . ';">' . $status;
        if (isset($obj->version)) {
            echo '<br />R: ' . preg_replace('/[^0-9]/', '', $obj->version);
        }
        echo '</td>
			<td width="8%" valign="top">' . $links . '</td>
		</tr>
		';
开发者ID:AdultStack,项目名称:ap-members,代码行数:31,代码来源:ym-payment-gateways.php


示例9: ym_coupon_update

function ym_coupon_update()
{
    $coupon_id = ym_get('coupon_id');
    $name = ym_post('name');
    $value = ym_post('value');
    $description = ym_post('description');
    $allowed = (ym_post('new_sub') ? '1' : '0') . (ym_post('upgrade') ? '1' : '0') . (ym_post('post') ? '1' : '0') . (ym_post('pack') ? '1' : '0');
    $usage_limit = ym_post('usage_limit');
    if (ym_post('save_coupon')) {
        ym_save_coupon($name, $value, $description, $allowed, $usage_limit);
    }
    if (ym_post('update_coupon')) {
        ym_edit_coupon($coupon_id, $name, $value, $description, $allowed, $usage_limit);
    }
    if (ym_get('delete_coupon')) {
        $coupon_id = ym_get('delete_coupon');
        ym_delete_coupon($coupon_id);
    }
}
开发者ID:AdultStack,项目名称:ap-members,代码行数:19,代码来源:ym_coupon_functions.include.php


示例10: get_button_code

 function get_button_code($pack, $user_id, $override_price = FALSE)
 {
     get_currentuserinfo();
     global $current_user, $ym_sys;
     $email = isset($current_user->user_email) ? $current_user->user_email : '';
     if (!$email) {
         if ($user = ym_get('username')) {
             $user = get_user_by('login', $user);
             $email = $user->user_email;
         }
     }
     $data = array('sid' => $this->merchant_sid, 'mode' => '2CO', 'demo' => $this->status == 'live' ? 'N' : 'Y', 'return_url' => site_url($this->cancel_url), 'skip_landing' => $this->skip_landing, 'li_1_type' => 'product', 'li_1_name' => isset($pack['item_name']) && $pack['item_name'] ? $pack['item_name'] : $ym_sys->item_name, 'li_1_quantity' => 1, 'li_1_price' => $override_price ? $override_price : $pack['cost'], 'email' => $email);
     $vat = FALSE;
     if (isset($pack['vat_applicable']) && $pack['vat_applicable'] || $ym_sys->global_vat_applicable) {
         if ($ym_sys->vat_rate) {
             $data = array_merge($data, array('li_2_product_id' => 'tax', 'li_2_description' => 'Tax for Product', 'li_2_type' => 'tax', 'li_2_name' => 'Tax', 'li_2_quantity' => 1, 'li_2_price' => $ym_sys->vat_rate));
             $vat = TRUE;
         }
     }
     if ($vat_rate = apply_filters('ym_vat_override', false, $user_id)) {
         $data = array_merge($data, array('li_2_product_id' => 'tax', 'li_2_description' => 'Tax for Product', 'li_2_type' => 'tax', 'li_2_name' => 'Tax', 'li_2_quantity' => 1, 'li_2_price' => $vat_rate));
         $vat = TRUE;
     }
     // addition per type
     if (isset($pack['num_cycles']) && $pack['num_cycles'] != 1 && $pack['duration_type']) {
         // subscription
         $data['li_1_product_id'] = 'buy_subscription_' . $pack['id'] . '_' . $user_id;
         // start up feed
         if (isset($pack['2checkout_startupfee']) && $pack['2checkout_startupfee']) {
             $data['li_1_startup_fee'] = $pack['2checkout_startupfee'];
         }
         // recurring
         // patch
         if ($pack['duration_type'] == 'd') {
             $pack['duration'] = number_format($pack['duration'] / 7, 0);
             $pack['duration_type'] == 'w';
         }
         $duration_str = array('w' => 'Week', 'm' => 'Month', 'y' => 'Year');
         $data = array_merge($data, array('li_1_duration' => $pack['num_cycles'] ? $pack['num_cycles'] : 'forever', 'li_1_recurrence' => $pack['duration'] . ' ' . $duration_str[$pack['duration_type']]));
         if ($vat) {
             $data['li_2_duration'] = $data['li_1_duration'];
             $data['li_2_recurrence'] = $data['li_1_recurrence'];
         }
     } else {
         // post/single
         if (isset($pack['id'])) {
             $data['li_1_product_id'] = 'buy_subscription_' . $pack['id'] . '_' . $user_id;
         } else {
             // post
             if (isset($pack['ppp_pack_id'])) {
                 $data['li_1_product_id'] = 'buy_bundle_' . $pack['ppp_pack_id'] . '_' . $user_id;
             } else {
                 if (isset($pack['ppp_adhoc_posts'])) {
                     $data['li_1_product_id'] = 'buy_post_' . implode(',', $pack['ppp_adhoc_posts']) . '_' . $user_id;
                 } else {
                     $data['li_1_product_id'] = 'buy_post_' . ($pack['post_id'] ? $pack['post_id'] : get_the_ID()) . '_' . $user_id;
                 }
             }
         }
     }
     $data['x_receipt_link_url'] = esc_html(site_url('?ym_process=' . $this->code));
     $data['custom_return_url'] = $this->redirectlogic($pack);
     return $data;
 }
开发者ID:AdultStack,项目名称:ap-members,代码行数:64,代码来源:ym_2checkout.php


示例11: do_process

 function do_process()
 {
     // IPN Handler
     echo __('One Moment... Processing', 'ym');
     if (!ym_get('msgType') || !ym_get('installation') || !ym_post('M_item_number')) {
         header('HTTP/1.1 400 Bad Request');
         echo 'Error in IPN. Missing msgType, installation or item_number.';
         exit;
     }
     if (ym_get('installation') != ym_post('installation') || ym_post('installation') != $this->inst_id) {
         header('HTTP/1.1 401 Unauthorized');
         echo 'Error in IPN. Missing installation ID or Invalid';
         exit;
     }
     if ($this->callbackPW && ym_post('callbackPW') != $this->callbackPW) {
         header('HTTP/1.1 401 Unauthorized');
         echo 'Error in IPN. Missing callbackPW or invalid.';
         exit;
     }
     $array = array('Merchant Cancelled', 'Customer Cancelled');
     if (ym_post('futurePayStatusChange') && in_array(ym_post('futurePayStatusChange'), $array)) {
         // expired!
         $this->common_process(ym_post('M_item_number'), ym_post('cost'), FALSE, FALSE);
     }
     if (ym_post('rawAuthCode') == 'A') {
         // && ym_post('rawAuthMessage') == 'authorised') {
         // pre 11 catch
         if (isset($_POST['M_custom'])) {
             // is pre
             list($duration, $amount, $currency, $user_id, $account_type, $duration_type) = explode('_', $_POST['M_custom']);
             global $ym_packs;
             foreach ($ym_packs->packs as $pack) {
                 if ((md5($pack['account_type']) == strtolower($account_type) || md5(strtolower($pack['account_type'])) == strtolower($account_type)) && $pack['cost'] == $amount && $pack['duration'] == $duration && strtolower($pack['duration_type']) == strtolower($duration_type)) {
                     $pack_id = $pack['id'];
                     break;
                 }
             }
             if ($pack_id) {
                 $item = 'buy_subscription_' . $pack_id . '_' . $test[3];
             } else {
                 $admin = get_userdata(1);
                 $admin_email = $admin->user_email;
                 ym_email($admin_email, 'YM 10 Packet failed', 'Could not determine what the user is buying after looping thru all packets Debug: <pre>' . print_r($_POST, TRUE)) . "\n\n\n" . print_r($ym_packs, TRUE) . '</pre>';
                 header('HTTP/1.1 400 Bad Request');
                 exit;
             }
         } else {
             $item = ym_post('M_item_number');
         }
         // success
         $this->common_process($item, ym_post('cost'), TRUE, FALSE);
         $url = ym_post('M_return');
         if (ym_post('futurePayId')) {
             list($buy, $what, $id, $user_id) = explode('_', $item);
             update_user_meta($user_id, 'ym_worldpay_futurepay_id', ym_post('futurePayId'));
         }
     } else {
         // must be C - cancelled payment
         // where go?
         if (isset($this->cancel_url) && $this->cancel_url) {
             $url = site_url($this->cancel_url);
         } else {
             $url = site_url('/');
         }
     }
     echo '<meta http-equiv="refresh" content="0;' . $url . '" />';
     exit;
 }
开发者ID:AdultStack,项目名称:ap-members,代码行数:68,代码来源:ym_worldpay.php


示例12: ym_check_for_gift_sub

function ym_check_for_gift_sub()
{
    global $wpdb;
    // gift sub
    if (ym_post('submit')) {
        if (ym_post('post_id')) {
            $sql = 'SELECT COUNT(id)
								FROM ' . $wpdb->prefix . 'posts_purchased
								WHERE
										user_id = ' . ym_post('user_id') . '
										AND post_id = ' . ym_post('post_id');
            if (!$wpdb->get_var($sql)) {
                $sql = 'INSERT INTO ' . $wpdb->prefix . 'posts_purchased (user_id, post_id, unixtime)
								VALUES (' . $_POST['user_id'] . ', ' . $_POST['post_id'] . ', UNIX_TIMESTAMP())';
                $wpdb->query($sql);
                ym_display_message(__('Post has been successfully gifted', 'ym'));
            } else {
                ym_display_message(__('User has already purchased that post', 'ym'), 'error');
            }
        } else {
            ym_display_message(__('Please select a post to gift before submitting the form', 'ym'), 'error');
        }
    }
    if (ym_get('delete')) {
        $sql = 'DELETE FROM ' . $wpdb->prefix . 'posts_purchased
							WHERE id=' . $_GET['delete'];
        if ($wpdb->query($sql)) {
            ym_display_message(__('Purchased post has been successfully deleted', 'ym'));
        }
    }
    // end
}
开发者ID:AdultStack,项目名称:ap-members,代码行数:32,代码来源:ym_individual_purchase_functions.include.php


示例13: ym_fbook_wp_login_form

<?php

if (ym_get('login', FALSE)) {
    ym_fbook_wp_login_form();
    return;
}
if (ym_get('ym_fb_profile', FALSE)) {
    ym_fbook_profile(TRUE);
    return;
}
//	query_posts();
if (have_posts()) {
    while (have_posts()) {
        the_post();
        echo '
<div class="post">
	<h2><a href="' . get_permalink() . '" rel="bookmark" title="Permanent Link to ' . the_title_attribute(array('echo' => false)) . '"';
        if ($facebook_settings->post_breakout) {
            echo ' target="_parent" ';
        }
        echo '>' . get_the_title() . '</a></h2>
';
        //		if ($facebook_settings->use_excerpt && !is_singular()) {
        //echo do_shortcode(get_the_excerpt());
        //			the_excerpt();
        //		} else {
        //echo do_shortcode(get_the_content());
        the_content();
        //		}
        echo ym_fbook_render_like_button(get_permalink(), 'post');
        echo '</div>';
开发者ID:AdultStack,项目名称:ap-members,代码行数:31,代码来源:loop.php


示例14: ym_display_mesage

if (isset($error) && !empty($error)) {
    ym_display_mesage($error, 'error');
}
if (isset($sort_msg) && !empty($sort_msg)) {
    ym_display_message($sort_msg);
}
if (isset($sort_error) && !empty($sort_error)) {
    ym_display_mesage($sort_error, 'error');
}
if (!$ym_sys->modified_registration) {
    ym_display_message(__('Modified registration is currently turned off. Custom fields will only show on the profile', 'ym'), 'error');
}
echo '
<div class="wrap" id="poststuff">
';
if (ym_get('mode') != 'edit') {
    echo ym_start_box('&nbsp;');
    echo '<form name="frm" action="" method="post" onsubmit="ym_process_custom_field_sort();">
 <table width="60%" border="0" cellpadding="5" cellspacing="5" align="center" class="form-table" id="sorttable">';
    $head = '
 <tr>
	<th scope="col">' . __('Enable', 'ym') . '</th>
 <th scope="col">' . __('ID', 'ym') . '</th>
 <th scope="col">' . __('Name', 'ym') . '</th>
 <th scope="col">' . __('Label', 'ym') . '</th>
 <th scope="col">' . __('Caption', 'ym') . '</th>
 <th scope="col">' . __('Type', 'ym') . '</th>
 <th scope="col">' . __('Required', 'ym') . '</th>
 <th scope="col">' . __('Read Only', 'ym') . '</th>
 <th scope="col">' . __('Profile Only', 'ym') . '</th>
 <th scope="col">' . __('Hide On Profile', 'ym') . '</th>
开发者ID:AdultStack,项目名称:ap-members,代码行数:31,代码来源:ym-members-customfields.php


示例15: save

 function save()
 {
     if (isset($this->version)) {
         unset($this->version);
         //never store the version
     }
     update_option($this->code, $this);
     if (ym_get('ym_page')) {
         echo '<div id="message" class="updated fade"><p>' . sprintf(__('Updated Settings for %s', 'ym'), $this->name) . '</div>';
     }
 }
开发者ID:AdultStack,项目名称:ap-members,代码行数:11,代码来源:ym-payment-gateway.class.php


示例16: ym_register_catch_gateway

function ym_register_catch_gateway()
{
    if (ym_get('gateway_return') && !ym_post('ym_did_gateway_return')) {
        // callback script
        $_GET['from_gateway'] = ym_get('gateway_return');
        ym_login_js();
        // continue
        echo '
<form action="" method="post" id="ym_register_flow_form">
	<input type="hidden" name="ym_register_flow_page" value="' . $_REQUEST['ym_register_flow_page'] . '" />
	<input type="hidden" name="ym_register_flow_next_page" value="' . $_REQUEST['ym_register_flow_next_page'] . '" />
	';
        if (!$_REQUEST['ym_register_flow_next_page']) {
            echo '<input type="hidden" name="flowcomplete" value="1" />';
        }
        echo '
	<input type="hidden" name="ym_did_gateway_return" value="1" />
	<input type="submit" value="' . __('Continue', 'ym') . '" />
</form>	

<script type="text/javascript">
	document.forms["ym_register_flow_form"].submit();
</script>
';
        exit;
    }
}
开发者ID:AdultStack,项目名称:ap-members,代码行数:27,代码来源:ym-register-flows.include.php


示例17: ym_loaded

function ym_loaded()
{
    // last globals
    global $current_user, $ym_user;
    get_currentuserinfo();
    if (is_user_logged_in()) {
        // as the user is logged in....
        $ym_user = new YourMember_User($current_user->ID);
    } else {
        // blank one
        $ym_user = new YourMember_User();
    }
    global $wpdb, $ym_auth, $ym_dl_db, $ym_dl_post_assoc, $ym_sys, $plugin_file;
    global $wp_upload, $ym_upload_root, $ym_upload_url;
    if (ym_get('ym_go') == 'support') {
        header('Location: ' . YM_SUPPORT_LINK);
        exit;
    }
    // TODO: tidy all these calls up again
    //Localization
    add_action('init', 'ym_load_lang');
    // admin bar
    add_action('init', 'ym_admin_nav');
    add_action('admin_bar_menu', 'ym_admin_bar', 90);
    // context help (help in the top right)
    if (is_admin()) {
        add_action('ym_pre_admin_loader', 'ym_database_updater', 10, 1);
        // interrupt?
        if (ym_request('do_munch')) {
            ym_admin_loader();
            exit;
        }
        // main drag
        add_action('admin_menu', 'ym_admin_page');
        //Plugin Panel Hooks
        add_filter('plugin_action_links', 'ym_action_link', 10, 2);
        // user edit
        add_action('user_edit_form_tag', 'ym_form_enctype');
        // conf bypasses
        ym_conf_bypass();
        //		add_action('load-toplevel_page_ym/admin/ym-index', 'ym_context_help');
        add_action('load-toplevel_page_' . YM_ADMIN_FUNCTION, 'ym_context_help');
        add_action('load-your-members_page_' . YM_ADMIN_DIR . 'ym-about', 'ym_context_help');
    } else {
        // SSL
        add_action('init', 'ym_go_ssl');
        add_action('posts_selection', 'ym_go_ssl_pages');
        if ($ym_sys->enable_metered) {
            add_action('init', 'ym_check_metered_access');
        }
        add_action('get_footer', 'ym_affiliate_link');
    }
    // call version check
    ym_check_version();
    if ($ym_auth->ym_check_key()) {
        $wp_upload = wp_upload_dir();
        if ($wp_upload['error']) {
            if (is_admin() && ym_get('page') == YM_ADMIN_FUNCTION && !ym_request('ym_page')) {
                echo '<div id="message" class="error"><p>' . $wp_upload['error'] . '</p></div>';
            }
        } else {
            $ym_upload_root = $wp_upload['path'];
            $ym_upload_url = $wp_upload['url'];
        }
        ym_create_log_constants();
        //Must be first for any logging that occurs from hereonin
        ym_suppress_enclosure_check();
        add_action('mod_rewrite_rules', 'ym_block_wp_login_action_register');
        add_action('admin_init', 'ym_block_wp_login_action_register_flush');
        if (!is_admin()) {
            ym_download_response();
            //checks for a download id in the url
            global $ym_manage_access;
            $ym_manage_access = new YourMember_Manage_Access();
            if ($ym_sys->protect_mode) {
                add_action('template_redirect', array($ym_manage_access, 'exit_check'));
            }
            add_shortcode('private', 'ym_shortcode_parse');
            add_shortcode('no_access', 'ym_shortcode_parse');
            add_shortcode('user_has_access', 'ym_shortcode_parse');
            add_shortcode('ym_user_profile', 'ym_edit_custom_field_standalone');
            add_shortcode('ym_rss_token', 'ym_get_rss_token');
            add_shortcode('ym_upgrade', 'ym_shortcode_parse');
            add_shortcode('ym_packs', 'ym_shortcode_parse');
            add_shortcode('private_or', 'ym_shortcode_parse');
            add_shortcode('private_and', 'ym_shortcode_parse');
            add_shortcode('ym_membership_content', 'ym_membership_content_shortcode');
            // TODO: Deprecate 11.0.6
            add_shortcode('user_account_is', 'ym_shortcode_parse');
            add_shortcode('private_username_is', 'ym_shortcode_parse');
            // Replace with
            add_shortcode('ym_user_is', 'ym_user_is');
            add_shortcode('ym_user_is_not', 'ym_user_is_not');
            add_shortcode('ym_user_custom_is', 'ym_user_custom_is');
            add_shortcode('ym_user_custom_is_not', 'ym_user_custom_is_not');
            add_shortcode('ym_profile', 'ym_get_user_profile');
            add_shortcode('ym_purchase_history', 'ym_get_user_purchase_history_shortcode');
            add_shortcode('ym_gateway_cancel', 'ym_get_user_unsub_button_gateway');
            add_shortcode('ym_gravatar', 'ym_gravatar_render');
            // start content
//.........这里部分代码省略.........
开发者ID:AdultStack,项目名称:ap-members,代码行数:101,代码来源:ym.php


示例18: do_action

            if ($this_job['core'] == 2) {
                // try for do_action
                do_action($cron_task);
                echo '<div class="updated" id="message"><p>';
                echo __('Task Complete', 'ym');
                echo '</p></div>';
            } else {
                echo '<div class="error" id="message"><p>';
                echo __('Could Not Execute Class Not Found', 'ym');
                echo '</p></div>';
            }
        }
    }
    return;
}
if (ym_get('reschedule', FALSE)) {
    echo '<div id="message" class="updated fade"><p>' . __('Rescheduling Tasks Complete', 'ym') . '</p></div>';
}
echo '<div class="wrap" id="poststuff">
<form action="" method="post">';
echo ym_box_top(__('Manual Cron Control', 'ym'));
echo '<table class="form-table">';
echo $ym_formgen->render_form_table_radio_row(__('Use Manual Cron (crontab) rather than WP Cron?', 'ym'), 'enable_manual_cron', $ym_sys->enable_manual_cron, __('For larger sites its recommended to set this to true and use crontab. The command is below. This will run YM Cron functions only not other WP Cron Tasks'));
echo '</table>';
echo '<p>' . __('Add the following line to your crontab if enabled, the first argument (59), is the minute, the second argument (23) the hour, together make up the time to run the task. More Information <a href="http://en.wikipedia.org/wiki/Cron#Predefined_scheduling_definitions">Here</a>', 'ym');
echo '<br /><pre>';
echo '59 23 * * * wget -O cronresult.html ' . site_url('?ym_cron_do=1');
echo '</pre><br /></p>';
echo '<p>' . __('Rather than Running all tasks, you can instead call a specific task', 'ym') . '</p>';
echo '<ul>';
foreach ($ym_crons_that_exist as $cron_job) {
开发者ID:AdultStack,项目名称:ap-members,代码行数:31,代码来源:ym-advanced-cron.php


示例19: get_option

    $connection_string = YM_DEACTIVATE_URL . '&email=' . get_option('ym_license_key');
    $response = ym_remote_request($connection_string);
    delete_option('ym_license_key');
    delete_option('ym_tos_version_accepted');
    if (ym_get('ym_uninstall')) {
        // nuke it all!
        ym_deactivate();
    }
    echo '<meta http-equiv="refresh" content="0;plugins.php?deactivate=true" />';
    exit;
}
// Database updates can be called on this hook
do_action('ym_pre_admin_loader');
get_currentuserinfo();
global $current_user, $ym_auth, $ym_res, $ym_sys;
$ym_page = ym_get('ym_page');
if ($ym_auth->ym_check_key()) {
    if (!ym_tos_checks()) {
        // no TOS stuff in progress
        echo '<div class="wrap"><h2>' . YM_ADMIN_NAME . '</h2>';
        // wizard
        ym_wizard_render();
        // loop
        ym_admin_menu();
        echo '<div style="clear: both; padding: 0px; margin: 0px;">';
        ym_admin_loader();
        echo '</div>';
        ym_admin_menu_end();
        // end
        echo '</div>';
    }
开发者ID:AdultStack,项目名称:ap-members,代码行数:31,代码来源:ym-index.php


示例20: mailmanager_unsub_check

function mailmanager_unsub_check()
{
    if (ym_get('ym_mm_action') == 'unsubscribe') {
        /*
        $current_settings = get_option('ym_other_mm_settings');
        if ($current_settings->mail_gateway != 'wp_mail') {
        	// hook
        	$callback = 'ym_mm_' . $current_settings->mail_gateway . '_unsub_block';
        	if (function_exists($callback)) {
        		$break = FALSE;
        		call_user_func($callback, $list, $user, &$break);
        		if ($break) {
        			return;
        		}
        	}
        }
        */
        $series = ym_get('series_id');
        $user = ym_get('user_id');
        if ($series && $user) {
            // the_content
            global $wpdb;
            $sql = 'SELECT recipient_list FROM ' . $wpdb->prefix . 'mm_user_series_assoc WHERE series_id = \'' . $series . '\'';
            $list = $wpdb->get_var($sql);
            $sql = 'INSERT INTO ' . $wpdb->prefix . 'mm_list_unsubscribe (list_name, user_id) VALUES (' . $list . ', ' . $user . ')';
            $wpdb->query($sql);
            $current_settings = get_option('ym_other_mm_settings');
            header('Location: ' . $current_settings->unsubscribe_page);
            exit;
        }
    }
}
开发者ID:AdultStack,项目名称:ap-members,代码行数:32,代码来源:mm_includes.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ym_post函数代码示例发布时间:2022-05-23
下一篇:
PHP ym_box_top函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap