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

PHP ym_post函数代码示例

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

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



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

示例1: yss_s3_save

function yss_s3_save()
{
    // saving
    get_currentuserinfo();
    global $wpdb, $current_user, $yss_db, $yss_post_assoc;
    $user = $current_user->ID;
    $file = ym_post('s3_file_select');
    $file = explode('/', $file);
    $bucket = array_shift($file);
    $resource = implode('/', $file);
    $account_types = ym_post('account_types');
    if (is_array($account_types)) {
        $account_types = implode('||', $account_types);
    } else {
        $account_types = '';
    }
    $members = isset($_POST['memberonly']);
    if ($id = ym_post('s3s_id')) {
        $sql = "UPDATE " . $yss_db . " SET\n\t\t\t\t\tbucket = '" . $bucket . "'\n\t\t\t\t\t, resource_path = '" . $resource . "'\n\t\t\t\t\t, postDate = NOW()\n\t\t\t\t\t, user = '" . $user . "'\n\t\t\t\t\t, members = '" . $members . "'\n\t\t\t\t\t, account_types = '" . mysql_real_escape_string($account_types) . "'\n\t\t\t\tWHERE id = " . $id;
        $wpdb->query($sql);
        $sql = 'DELETE FROM ' . $yss_post_assoc . '
				WHERE s3_id = ' . $id;
        $wpdb->query($sql);
    } else {
        if ($bucket && $resource) {
            $sql = "INSERT INTO " . $yss_db . " (bucket, resource_path, postDate, user, members, account_types)\n\t\t\t\t\tVALUES (\n\t\t\t\t\t\t'" . $bucket . "'\n\t\t\t\t\t\t, '" . $resource . "'\n\t\t\t\t\t\t, NOW()\n\t\t\t\t\t\t, '" . $user . "'\n\t\t\t\t\t\t, '" . $members . "'\n\t\t\t\t\t\t, '" . mysql_real_escape_string($account_types) . "'\n\t\t\t\t\t)";
            $wpdb->query($sql);
            $id = $wpdb->insert_id;
            if ($id) {
                ym_display_message(__('New video created Successfully', 'yss'));
            } else {
                ym_display_message(__('Failed video Creation ', 'yss'));
            }
        } else {
            ym_display_message(__('No Resource and/or Bucket specified', 'yss'), 'error');
        }
    }
    if ($id) {
        if ($link_ids = ym_post('link_to_post_id')) {
            foreach ($link_ids as $post_id) {
                $sql = 'INSERT INTO ' . $yss_post_assoc . ' (s3_id, post_id)
					VALUES (' . $id . ', ' . $post_id . ')';
                $wpdb->query($sql);
            }
        }
    }
}
开发者ID:AdultStack,项目名称:ap-members,代码行数:47,代码来源:yss_resource_functions.includes.php


示例2: ym_register_default

/**
Default Registration when modified is off
*/
function ym_register_default($user_id)
{
    global $wpdb;
    if (!isset($_SESSION['error_on_page'])) {
        $pack_id = ym_get_default_pack();
        if (!($user_pass = ym_post('ym_password'))) {
            $user_pass = substr(md5(uniqid(microtime())), 0, 7);
        }
        $user_pass_md5 = md5($user_pass);
        $wpdb->query("UPDATE {$wpdb->users} SET user_pass = '{$user_pass_md5}' WHERE ID = '{$user_id}'");
        wp_new_user_notification($user_id, $user_pass);
        // redirect to ym_subscribe
        $userdata = get_userdata($user_id);
        $redirect = add_query_arg(array('username' => $userdata->user_login, 'ym_subscribe' => 1), get_option('siteurl'));
        if ($redirector = ym_post('ym_redirector', ym_post('redirect_to'))) {
            $redirect = add_query_arg(array('redirector' => $redirector), $redirect);
        }
        $redirect = add_query_arg(array('pack_id' => $pack_id), $redirect);
        wp_redirect($redirect);
        exit;
    }
}
开发者ID:AdultStack,项目名称:ap-members,代码行数:25,代码来源:ym-register.include.php


示例3: tos_submit

 function tos_submit()
 {
     global $ym_version_resp;
     $version_id = ym_post('tosversion');
     $choice = ym_post('tos');
     if ($choice == 'Continue') {
         if (!is_email(ym_post('confirm_email'))) {
             return new WP_Error('email', __('You must provide a valid Email Address', 'ym'));
         }
         if (!ym_post('tickbox')) {
             return new WP_Error('terms', __('You must check the Acceptance Tick Box', 'ym'));
         }
         // accepted
         update_option('ym_tos_version_accepted', $version_id);
         $connection_string = YM_TOS_INFORM_URL . '&email=' . rawurlencode(ym_post('confirm_email'));
         $connection_string .= '&nmp_tos_accept=yes&tos_version_id=' . $version_id . '&choice=' . $choice;
         ym_remote_request($connection_string);
     } else {
         delete_option('ym_license_key');
         delete_option('ym_tos_version_accepted');
         echo '<script>window.location=\'' . $ym_version_resp->tos->tos_no_url . '\';</script>';
         exit;
     }
 }
开发者ID:AdultStack,项目名称:ap-members,代码行数:24,代码来源:ym-auth.class.php


示例4: date

        echo '<td>' . date(YM_DATE, $transaction->unixtime) . '</td>';
        echo '</tr>';
    }
    echo '</table>';
    echo '</div>';
    return;
}
if ($user_id) {
    $user = get_userdata($user_id);
    echo '<p>' . sprintf(__('Showing Log Information for <strong>%s</strong>', 'ym'), $user->user_login) . '</p>';
}
echo ym_end_box();
$start = 0;
$limit = 50;
$cur = ym_post('start');
if (ym_post('next')) {
    $start = $cur + $limit;
}
if (ym_post('back')) {
    $start = $cur - $limit;
    if ($start < 0) {
        $start = 0;
    }
}
//$user_id = FALSE;
$order_by = 'id DESC';
$deleted = TRUE;
if ($user_id) {
    ym_show_timeline_log(false, $user_id, $limit, $start, $order_by, $deleted);
}
echo '</div>';
开发者ID:AdultStack,项目名称:ap-members,代码行数:31,代码来源:ym-logs.php


示例5: ym_fbook_init


//.........这里部分代码省略.........
        echo '<script type="text/javascript">top.location.href="' . $r . '";</script>';
        exit;
    }
    // Ping check to see if facebook exists and is alive
    // Most commonly analytics
    if (ym_get('ymfbook')) {
        $_SESSION['in_facebook'] = 1;
    }
    if ($_SESSION['in_facebook']) {
        wp_enqueue_script('ym-fb', site_url('wp-content/plugins/ym_facebook/js/fb.js'), array('jquery'), YM_FB_PLUGIN_VERSION);
        wp_enqueue_style('ym-fb-login', site_url('wp-content/plugins/ym_facebook/css/ym_fbook_login.css'), array(), YM_FB_PLUGIN_VERSION);
    }
    // height controls
    if ($facebook_settings->iframe_size == 'scrollbars') {
        if ($facebook_settings->iframe_size_height) {
            define('YM_FBOOK_HEIGHT', 'FB.Canvas.setSize({height: ' . $facebook_settings->iframe_size_height . '});');
        } else {
            define('YM_FBOOK_HEIGHT', '');
            // height of window-ish
        }
    } else {
        define('YM_FBOOK_HEIGHT', 'FB.Canvas.setAutoResize();');
    }
    // width controls
    if (isset($_SESSION['in_facebook_page']) && $_SESSION['in_facebook_page']) {
        $width = 450;
    } else {
        $width = 600;
    }
    define('YM_FBOOK_WIDTH', $width);
    /********************************************/
    /* post or session
    	/********************************************/
    if (ym_post('signed_request', false)) {
        // landed in facebook from the outside world
        // store the request
        $_SESSION['facebook_signed_request'] = $_POST['signed_request'];
        // set in facebook here as we are defo. in facebook
        // cant do it on data uncode as we could be on the main site
        // using a wordpress side facebook like wall
        // for example
        $_SESSION['in_facebook'] = TRUE;
        // if in_facebook then redirect there
        // if in_facebook and in_facebook_page then go to page
        // if in_facebook_page only do nothing (as not in facebook)
        $_SESSION['facebook_signed_request'] = $_POST['signed_request'];
    }
    /********************************************/
    /* force
    	/********************************************/
    if ($facebook_settings->force_facebook && !$_SESSION['in_facebook']) {
        // force
        $_SESSION['in_facebook'] = 1;
        if ($facebook_settings->page_url) {
            $_SESSION['in_facebook_page'] = 1;
        }
        header('Location: ' . ym_fbook_oauth_go());
        //header('Location: ' . ($facebook_settings->page_url ? YM_FBOOK_PAGE_TARGET : YM_FBOOK_APP_TARGET));
        exit;
    }
    /********************************************/
    /* interupt for auth
    	/********************************************/
    // check for a get code
    if (ym_get('code')) {
        // landed with a code
开发者ID:AdultStack,项目名称:ap-members,代码行数:67,代码来源:ym_facebook_auth.php


示例6: ym_user_profile_form

function ym_user_profile_form()
{
    get_currentuserinfo();
    global $current_user, $wpdb;
    $updated = false;
    $action = ym_post('ym_action');
    if ($action == 'ym_user_profile_update') {
        include 'wp-admin/includes/user.php';
        include 'wp-includes/registration.php';
        do_action('personal_options_update', $current_user->ID);
        $errors = edit_user($current_user->ID);
        if (!is_wp_error($errors)) {
            $html = '<p>' . __('Your Profile has been updated') . '</p>';
            $html .= '<meta http-equiv="refresh" content="3" />';
            return $html;
        }
    }
    $html = '';
    if (isset($errors) && is_wp_error($errors)) {
        $html .= '<div class="error"><p>' . implode("</p>\n<p>", $errors->get_error_messages()) . '</p></div>';
    } else {
        if (ym_get('updated')) {
            $html .= '<div id="message" class="updated"><p><strong>' . __('User updated.') . '</strong></p></div>';
        }
    }
    if (!function_exists(_wp_get_user_contactmethods)) {
        function _wp_get_user_contactmethods()
        {
            $user_contactmethods = array('aim' => __('AIM'), 'yim' => __('Yahoo IM'), 'jabber' => __('Jabber / Google Talk'));
            return apply_filters('user_contactmethods', $user_contactmethods);
        }
    }
    $html .= '
<form action="" method="post">
	<input type="hidden" name="ym_action" value="ym_user_profile_update" />
	
<table class="form-table">
	<tr><td colspan="2"><h3>' . __('Name') . '</h3></td></tr>
	<tr>
		<th><label for="first_name">' . __('First Name') . '</label></th>
		<td><input type="text" name="first_name" id="first_name" value="' . esc_attr($current_user->user_firstname) . '" class="regular-text" /></td>
	</tr>

	<tr>
		<th><label for="last_name">' . __('Last Name') . '</label></th>
		<td><input type="text" name="last_name" id="last_name" value="' . esc_attr($current_user->user_lastname) . '" class="regular-text" /></td>
	</tr>

	<tr>
		<th><label for="nickname">' . __('Nickname') . ' <span class="description">' . __('(required)') . '</span></label></th>
		<td><input type="text" name="nickname" id="nickname" value="' . esc_attr($current_user->nickname) . '" class="regular-text" /></td>
	</tr>

	<tr>
		<th><label for="display_name">' . __('Display name publicly as') . '</label></th>
		<td>
			<select name="display_name" id="display_name">
			';
    $public_display = array();
    $public_display['display_username'] = $current_user->user_login;
    $public_display['display_nickname'] = $current_user->nickname;
    if (!empty($profileuser->first_name)) {
        $public_display['display_firstname'] = $current_user->first_name;
    }
    if (!empty($profileuser->last_name)) {
        $public_display['display_lastname'] = $current_user->last_name;
    }
    if (!empty($profileuser->first_name) && !empty($current_user->last_name)) {
        $public_display['display_firstlast'] = $current_user->first_name . ' ' . $current_user->last_name;
        $public_display['display_lastfirst'] = $current_user->last_name . ' ' . $current_user->first_name;
    }
    if (!in_array($current_user->display_name, $public_display)) {
        // Only add this if it isn't duplicated elsewhere
        $public_display = array('display_displayname' => $current_user->display_name) + $public_display;
    }
    $public_display = array_map('trim', $public_display);
    $public_display = array_unique($public_display);
    foreach ($public_display as $id => $item) {
        $html .= '<option id="' . $id . '" value="' . esc_attr($item) . '"' . selected($current_user->display_name, $item, FALSE) . '>' . $item . '</option>';
    }
    $html .= '
			</select>
		</td>
	</tr>
	<tr><td colspan="2">
<h3>' . __('Contact Info') . '</h3>
	</td></tr>
<tr>
	<th><label for="email">' . __('E-mail') . ' <span class="description">' . __('(required)') . '</span></label></th>
	<td><input type="text" name="email" id="email" value="' . esc_attr($current_user->user_email) . '" class="regular-text" />
	';
    $new_email = get_option($current_user->ID . '_new_email');
    if ($new_email && $new_email != $current_user->user_email) {
        $html .= '
	<div class="updated inline">
	<p>' . sprintf(__('There is a pending change of your e-mail to <code>%1$s</code>. <a href="%2$s">Cancel</a>'), $new_email['newemail'], esc_url(admin_url('profile.php?dismiss=' . $current_user->ID . '_new_email'))) . '</p>
	</div>
		';
    }
    $html .= '
//.........这里部分代码省略.........
开发者ID:AdultStack,项目名称:ap-members,代码行数:101,代码来源:ym_functions.include.php


示例7: wp_ajax_ym_quick_orphan

function wp_ajax_ym_quick_orphan()
{
    ym_ajax_superuser_check();
    $user_id = ym_post('ym_quick_orphan_user_id');
    if ($user_id) {
        $ym_user = new YourMember_User($user_id);
        if ($ym_user->parent_id) {
            ym_group_membership_delete_child_from_parent($user_id, $ym_user->parent_id);
            echo '
<script type="text/javascript">
jQuery(\'.ym_user_orphan_' . $user_id . '\').parents(\'tr\').slideUp(function() {
	jQuery(this).remove();
});
</script>
';
            die;
        }
    }
    echo 'N';
    die;
}
开发者ID:AdultStack,项目名称:ap-members,代码行数:21,代码来源:ym-admin_ajax_functions.include.php


示例8: ym_export_users_do_headers

function ym_export_users_do_headers($data, $format)
{
    global $ym_export_did_headers, $xls_row_counter;
    $path = trailingslashit(ym_post('backup_temp_path'));
    $offset = ym_post('offset', 0);
    $headers = ym_post('bkheaders') ? true : false;
    if (!$ym_export_did_headers && !$offset) {
        $ym_export_did_headers = TRUE;
        if ($headers) {
            $row = array();
            foreach ($data as $key => $trash) {
                $row[] = $key;
            }
            // write this row out
            ym_export_users_do_chunk($path, array($row), $format);
            $xls_row_counter = 1;
        }
    } else {
        if ($offset) {
            $xls_row_counter = $offset;
            if ($headers) {
                $xls_row_counter++;
            }
        }
    }
}
开发者ID:AdultStack,项目名称:ap-members,代码行数:26,代码来源:ym-data_output.include.php


示例9: additional_pack_fields

 function additional_pack_fields()
 {
     $items = array();
     $items[] = array('name' => 'zombaio_price_id', 'label' => __('Zombaio Price ID', 'ym'), 'caption' => __('If unsure, just put the <strong>Join Form URL</strong> here', 'ym'), 'type' => 'text');
     // catch
     if (ym_post('zombaio_price_id')) {
         $entry = ym_post('zombaio_price_id');
         if (FALSE !== strpos($entry, 'zombaio.com')) {
             //https://secure.zombaio.com/?287653677.1384296.ZOM
             list($crap, $zombaio, $com_crap, $id, $zom) = explode('.', $entry);
             $_POST['zombaio_price_id'] = $id;
         }
     }
     return $items;
 }
开发者ID:AdultStack,项目名称:ap-members,代码行数:15,代码来源:ym_zombaio.php


示例10: additional_pack_fields

 function additional_pack_fields()
 {
     $items = array();
     $items[] = array('name' => '2checkout_startupfee', 'label' => __('2Checkout StartUp Fee', 'ym'), 'caption' => __('2Checkout Supports a StartUp Fee. You can set this for this package here', 'ym'), 'type' => 'text');
     if (ym_post('2checkout_startupfee')) {
         $_POST['2checkout_startupfee'] = preg_replace('/[^\\d\\.]/', '', $_POST['2checkout_startupfee']);
         $_POST['2checkout_startupfee'] = number_format($_POST['2checkout_startupfee'], 2, '.', '');
     }
     return $items;
 }
开发者ID:AdultStack,项目名称:ap-members,代码行数:10,代码来源:ym_2checkout.php


示例11: settings

 function settings(&$break)
 {
     global $ym_formgen, $mm;
     $break = TRUE;
     if ($_POST) {
         if ($apikey = ym_post('apikey')) {
             // verify
             ym_box_top($this->name . ' Settings API Key: Result');
             $this->class_construct($apikey);
             echo '<p>';
             if ($this->construct->error != 'ok') {
                 echo 'Error: ' . $this->construct->error;
             } else {
                 $this->options->apikey = $apikey;
                 $this->options->client = '';
                 $this->saveoptions();
                 echo '</p><p>ApiKey was saved</p>';
                 ym_box_bottom();
                 echo '<meta http-equiv="refresh" content="5" />';
                 return;
             }
             echo '</p>';
             ym_box_bottom();
         }
         if ($client = ym_post('client')) {
             // verify
             ym_box_top($this->name . ' Settings Client: Result');
             $this->class_construct($apikey, $client);
             echo '<p>';
             if ($this->construct->error != 'ok') {
                 echo 'Error: ' . $this->construct->error;
             } else {
                 $this->options->client = $client;
                 $this->saveoptions();
                 echo '</p><p>Client was saved</p>';
                 ym_box_bottom();
                 echo '<meta http-equiv="refresh" content="5" />';
                 return;
             }
             echo '</p>';
             ym_box_bottom();
         }
     }
     // the settings page
     if ($this->options->apikey) {
         ym_box_top($this->name . ' Settings API Key', TRUE, TRUE);
     } else {
         ym_box_top($this->name . ' Settings API Key');
     }
     echo '<form action="" method="post">';
     echo '<table class="form-table">';
     echo $ym_formgen->render_form_table_text_row($this->name . ' API Key', 'apikey', $this->options->apikey, 'Your ' . $this->name . ' API Key');
     echo '</table>';
     echo '<p style="text-align: right;"><input type="submit" value="' . __('Save API Key') . '"</p>';
     echo '</form>';
     ym_box_bottom();
     if ($this->options->apikey) {
         if ($this->options->client) {
             ym_box_top($this->name . ' Settings Client', TRUE, TRUE);
         } else {
             ym_box_top($this->name . ' Settings Client');
         }
         $clients = $this->get_clients(TRUE);
         echo '<form action="" method="post">';
         echo '<table class="form-table">';
         $ym_formgen->render_combo_from_array_row('Client To Send Via', 'client', $clients, $this->options->client);
         echo '</table>';
         echo '<p style="text-align: right;"><input type="submit" value="' . __('Save Client') . '"</p>';
         echo '</form>';
         ym_box_bottom();
         if ($this->options->client) {
             // rest of form
             if ($_POST) {
                 foreach (mailmanager_get_recipients() as $list => $text) {
                     if ($value = ym_post($list)) {
                         $this->associations->{$list} = $value;
                     } else {
                         if ($this->associations->{$list}) {
                             unset($this->associations->{$list});
                         }
                     }
                 }
                 $this->saveassociations();
                 ym_box_top($this->name);
                 echo '<p>' . __('Associations were updated') . '</p>';
                 ym_box_bottom();
                 ym_box_top('Syncing with ' . $this->name);
                 echo '<pre>';
                 $this->sync_with_gateway();
                 echo '</pre>';
                 ym_box_bottom();
             }
             echo '<form action="" method="post">';
             ym_box_top('List Associations');
             $lists = $this->get_lists(TRUE);
             echo '<table class="form-table">';
             foreach (mailmanager_get_recipients() as $list => $text) {
                 echo $ym_formgen->render_combo_from_array_row($text, $list, $lists, $this->associations->{$list}, 'Select a ' . $this->name . ' List to associate with');
             }
             echo '</table>';
//.........这里部分代码省略.........
开发者ID:AdultStack,项目名称:ap-members,代码行数:101,代码来源:campaign_monitor.php


示例12: ym_post

$ym_year_email_date = ym_post('ym_year_email_date');
$ym_hour_email_date = ym_post('ym_hour_email_date');
$ym_min_email_date = ym_post('ym_min_email_date');
$recipient_list = ym_post('recipient_list');
do_action('mailmanager_broadcast_precontent');
if ($ym_month_email_date) {
    $time = array($ym_month_email_date, $ym_date_email_date, $ym_year_email_date, $ym_hour_email_date, $ym_min_email_date);
} else {
    $time = time();
}
if (!$email_id && (!$email_content || !$email_subject) && $_POST) {
    ym_box_top(__('Broadcast Error', 'ym_mailmanager'));
    echo '<p>' . __('You must provide a Email to send or fill in the a email content and subject', 'ym_mailmanager') . '</p>';
    ym_box_bottom();
} else {
    if (ym_post('submit')) {
        // swotch the time back to unix time
        if (is_array($time)) {
            $value = array();
            $value['month'] = array_shift($time);
            $value['date'] = array_shift($time);
            $value['year'] = array_shift($time);
            $value['hour'] = array_shift($time);
            $value['min'] = array_shift($time);
            $time = mktime($value['hour'], $value['min'], 0, $value['month'], $value['date'], $value['year']);
        }
        global $wpdb;
        do_action('mailmanager_broadcast_create', $email_id, $email_subject, $email_content, $recipient_list, $time);
        if (defined('STOP_BROADCAST')) {
            return;
        }
开发者ID:AdultStack,项目名称:ap-members,代码行数:31,代码来源:broadcast.php


示例13: 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


示例14: ym_email_message_save

 function ym_email_message_save()
 {
     $invoice = new ym_invoice();
     $invoice->invoice_email_subject = ym_post('invoice_email_subject');
     $invoice->invoice_email_message = ym_post('invoice_email_message');
     $invoice->save();
 }
开发者ID:AdultStack,项目名称:ap-members,代码行数:7,代码来源:ym_invoice.php


示例15: ym_box_bottom

		</div>
';
                    }
                }
            }
        }
        echo '
	</fieldset>
</form>
';
        echo '</div></div>';
        ym_box_bottom();
        break;
    case 'update_facebook_widget':
        update_option('ym_register_flow_fb_app_id', ym_post('ym_register_flow_fb_app_id'));
        update_option('ym_register_flow_fb_secret', ym_post('ym_register_flow_fb_secret'));
        ym_display_message(__('Updated Register Flow Facebook Register Widget', 'ym'));
    default:
        ym_box_top(__('Registration Flows', 'ym'));
        echo '<p>' . __('You can create custom Registration Flows for use with the [ym_register] shortcode', 'ym') . '</p>';
        echo '<table class="form-table widefat">
<tr>
	<th>' . __('Flow ID', 'ym') . '</th>
	<th>' . __('Flow Name', 'ym') . '</th>
	<th>' . __('Pages in Flow', 'ym') . '</td>
	<th></th>
</tr>
';
        $query = 'SELECT * FROM ' . $flows_table . ' ORDER BY flow_id ASC';
        foreach ($wpdb->get_results($query) as $row) {
            echo '<tr>';
开发者ID:AdultStack,项目名称:ap-members,代码行数:31,代码来源:ym-membership-registration_flows.php


示例16: ym_start_box

if (!get_option('yss_user_key') || !get_option('yss_secret_key')) {
    echo ym_start_box('Error');
    echo '<p>You need to provide your S3 User and Secret Keys, please visit the the Settings tab to do so.</p>';
    echo ym_end_box();
} else {
    if (in_array($action, array('stream', 'dload'))) {
        // distro select
        yss_s3_distribution($action, ym_request('id'));
    } else {
        if (in_array($action, array('add', 'edit'))) {
            yss_s3_edit($_REQUEST['id']);
        } else {
            if ($action == 'delete') {
                yss_s3_delete();
            }
            if (ym_post('submit_edit_s3')) {
                yss_s3_save();
            }
            yss_s3_list();
        }
    }
}
function yss_s3_distribution($type, $id)
{
    global $ym_formgen, $yss_cloudfront, $yss_db, $wpdb;
    // file details
    $s3file = yss_get($id);
    if ($_POST) {
        // here we go
        $distro = $_POST['distro'];
        list($can, $oai, $bucket, $file, $domain, $type) = explode('|', $distro);
开发者ID:AdultStack,项目名称:ap-members,代码行数:31,代码来源:yss_content.php


示例17: ym_tos_checks

function ym_tos_checks()
{
    global $ym_version_resp, $ym_auth;
    $key = ym_post('registration_email', FALSE);
    $tos_result = FALSE;
    $ym_tos_version_accepted = get_option('ym_tos_version_accepted', 0);
    if ($ym_tos_version_accepted < $ym_version_resp->tos->tos_version_id) {
        if (ym_post('activate_plugin') == 'tosterms') {
            // submitted form
            $tos_result = $ym_auth->tos_submit();
            if (!is_wp_error($tos_result) && $key) {
                // reload for recon
                ym_check_version(TRUE);
                ym_activate_last_step($key);
            }
        }
        // Show FORM
        echo '
<div class="wrap" id="poststuff">
	<h2>' . YM_ADMIN_NAME . '</h2>';
        ym_box_top(__('The End User License has been Updated', 'ym'));
        if (is_wp_error($tos_result)) {
            echo '<div id="message" class="error ym_auth">';
            echo '<div style="margin: 5px 0px; color:red; font-weight:bold;">';
            echo $tos_result->get_error_message();
            echo '</div></div>';
        }
        echo '<iframe src="' . $ym_version_resp->tos->tos_text_url . '" style="width: 100%; height: 500px;"></iframe>';
        echo '<p style="float: right;"><a href="' . $ym_version_resp->tos->tos_text_url . '">' . __('Download EULA', 'ym') . '</a></p>';
        echo '
	<form action="" method="post">
		<fieldset>
			<table class="form-table" style="width: 50%; margin: 10px auto; text-align: center;" >
				<tr>
					<td>
			<label for="confirm_email">' . __('Please confirm your Email', 'ym') . '</label>
					</td><td>
			<input type="email" name="confirm_email" id="confirm_email" value="' . ym_post('confirm_email') . '" style="width: 300px;" />
			<input type="hidden" name="registration_email" value="' . ym_post('registration_email') . '" />
					</td>
				</tr>
				<tr>
					<td colspan="2">

			<p>' . __('To continue you must accept the terms of this agreement:', 'ym') . '</p>
				<input type="hidden" name="activate_plugin" value="tosterms" />
				<input type="hidden" name="tosversion" value="' . $ym_version_resp->tos->tos_version_id . '" />
					</td>
				</tr><tr>
					<td colspan="2">
						<label for="tickbox">' . __('I accept the terms of this agreement:', 'ym') . '</label>
						<input type="checkbox" name="tickbox" id="tickbox" value="ticked" />
					</td>
				</tr><tr>
					<td colspan="2">
						<p class="submit" style="text-align: center;">
							<input type="submit" class="button-secondary" name="tos" value="Uninstall" />
							<input type="submit" class="button-primary" name="tos" value="Continue" style="font-weight: 700;" />
						</p>
					</td>
				</tr>
			</table>
		</fieldset>
	</form>';
        ym_box_bottom();
        echo '
</div>
';
    } else {
        if ($key) {
            // TOS OK/already accepted
            ym_activate_last_step($key);
        } else {
            return FALSE;
        }
    }
    return TRUE;
}
开发者ID:AdultStack,项目名称:ap-members,代码行数:78,代码来源:ym-initialise.include.php


示例18: ym_import_users_from_csv

function ym_import_users_from_csv()
{
    if (ym_post('ym_start_import')) {
        if ($_FILES['upload']['error'] != 4) {
            $time = time();
            // since we don't need to keep the file, may as well leave it in tmp!
            $file = $_FILES['upload']['tmp_name'];
            $data_check = TRUE;
            $data_valid = FALSE;
            $import_array = array();
            $headers = array();
            $row = 0;
            if (($handle = fopen($file, "r")) !== FALSE) {
                $data_valid = TRUE;
                while (($data = fgetcsv($handle)) !== FALSE) {
                    if ($data_check) {
                        $headers = $data;
                        $data_check = FALSE;
                    } else {
                        foreach ($data as $index => $item) {
                            $import_array[$row][$headers[$index]] = $item;
                        }
                        $row++;
                    }
                }
            }
            if (!$data_valid) {
                echo '<div id="message" class="error"><p>' . __('Not a Valid CSV File I can handle', 'ym') . '</p></div>';
                return;
            } else {
                $total_success = 0;
                $total_fail = 0;
                $messages = '';
                // user add loop
                foreach ($import_array as $index => $record) {
                    $user = new YourMember_User();
                    // pass it to the pre built create function
                    // no password is exported by the export function
                    $smflag = FALSE;
                    if ($record['smflag']) {
                        $smflag = $record['smflag'];
                    }
                    $package = array();
                    $pack_id = '';
                    if (!$record['pack_id'] || !$record['package_id']) {
                        $package = array('account_type' => $record['account_type'], 'duration' => $record['duration'], 'duration_type' => $record['duration_type']);
                        if ($record['expire_date']) {
                            $package['expire_date'] = $record['expire_date'];
                        }
                    } else {
                        if ($record['pack_id']) {
                            $pack_id = $record['pack_id'];
                        }
                        if ($record['package_id']) {
                            $pack_id = $record['package_id'];
                        }
                    }
                    $password = false;
                    if ($record['password'] || $record['ym_password']) {
                        if ($record['password']) {
                            $password = $record['password'];
                        }
                        if ($record['ym_password']) {
                            $password = $record['password'];
                        }
                    }
                    $expire_date = false;
                    if ($record['expire_date']) {
                        $expire_date = $record['expire_date'];
                    }
                    //Setting package expiry date outside of the package
                    /*
                     * must be true
                     * export does not export the password
                     * so a new one must be generated and sent to the user
                     */
                    // custom fields will ignore stuff that doens't match
                    // run it
                    if ($record['user_email']) {
                        $result = $user->create($record['user_email'], $record['pack_id'], $smflag, $record['user_login'], $password, $record, $package, $expire_date);
                        if (is_wp_error($result)) {
                            $total_fail++;
                            $messages .= $index . '-' . $record['user_login'] . ': ' . $result->get_error_message() . '<br />';
                        } else {
                            $total_success++;
                        }
                    } else {
                        $total_fail++;
                        $messages .= 'No Email address for user, skipping user <br />';
                    }
                    unset($user);
                }
                @ym_log_transaction(11, date(YM_DATE, $time) . ' User import began. added: ' . $total_success . ', failed to add: ' . $total_fail, get_current_user_id());
                echo '<div id="message" class="updated"><p><strong>' . date(YM_DATE, $time) . ' User import began. added: ' . $total_success . ', failed to add: ' . $total_fail . '</strong></p></div>';
                if ($messages) {
                    echo '<div id="message" class="error"><p>' . $messages . '</p></div>';
                }
            }
            // clean up
            unlink($file);
//.........这里部分代码省略.........
开发者ID:AdultStack,项目名称:ap-members,代码行数:101,代码来源:ym-data_import.include.php


示例19: ym_post

         $wpdb->query($sql);
     }
 case 'enable':
     if ($id = ym_get('tseries')) {
         $sql = 'UPDATE ' . $wpdb->prefix . 'mm_series SET enabled = 1 WHERE id = ' . $id;
         $wpdb->query($sql);
         if (!$wpdb->rows_affected) {
             $sql = 'UPDATE ' . $wpdb->prefix . 'mm_series SET enabled = 0 WHERE id = ' . $id;
             $wpdb->query($sql);
         }
     }
 case 'assoc':
     if ($add_id = ym_post('email_id')) {
         $series_id = ym_post('series');
         if ($add_id && $series_id) {
             $delay = ym_post('delay');
             $sql = 'INSERT INTO ' . $wpdb->prefix . 'mm_email_in_series(series_id, email_id, delay_days) VALUES (' . $series_id . ', ' . $add_id . ', ' . $delay . ')';
             $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);
         }
开发者ID:AdultStack,项目名称:ap-members,代码行数:31,代码来源:series.php


示例20: settings

    function settings(&$break)
    {
        global $ym_formgen, $mm;
        $break = TRUE;
        if ($_POST['distro_code']) {
            // going for connect
            //This code is actually just an application key, application secret, request token, token secret, and oauth_verifier, delimited by pipes (|).
            list($key, $secret, $request_token, $token_secret, $oauth_verifier) = explode('|', $_POST['distro_code']);
            // rebuild with keys
            $this->class_construct($key, $secret);
          

鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP yn函数代码示例发布时间:2022-05-23
下一篇:
PHP ym_get函数代码示例发布时间: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