本文整理汇总了PHP中feed::getProStatus方法的典型用法代码示例。如果您正苦于以下问题:PHP feed::getProStatus方法的具体用法?PHP feed::getProStatus怎么用?PHP feed::getProStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类feed
的用法示例。
在下文中一共展示了feed::getProStatus方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isset
$loggedIn->username = isset($_SESSION['username']) ? $_SESSION['username'] : $_COOKIE['username'];
$loggedIn->password = isset($_SESSION['password']) ? $_SESSION['password'] : $_COOKIE['password'];
$verify = $loggedIn->verify();
// If user is authed successfully
if ($verify['username']) {
$feed = new feed();
$feed->db = $db;
$feed->url = $CONF['url'];
$feed->user = $verify;
$feed->id = $verify['idu'];
$feed->username = $verify['username'];
$feed->per_page = $settings['perpage'];
$feed->art_size = $settings['artsize'];
$feed->art_format = $settings['artformat'];
$feed->paypalapp = $settings['paypalapp'];
$feed->track_size_total = $feed->getProStatus($feed->id, 1) ? $settings['protracktotal'] : $settings['tracksizetotal'];
$feed->track_size = $feed->getProStatus($feed->id, 1) ? $settings['protracksize'] : $settings['tracksize'];
$feed->track_format = $settings['trackformat'];
$feed->time = $settings['time'];
// Set the $x to output the value via JS
$x = 1;
$update = $feed->updateTrack($_POST, 1);
}
}
}
if ($x == 1) {
?>
<script language="javascript" type="text/javascript">
window.top.window.stopUpload('<?php
echo str_replace(array("\r", "\n"), "", $update[0]);
?>
示例2: PageMain
function PageMain()
{
global $TMPL, $LNG, $CONF, $db, $loggedIn, $settings;
if (isset($_SESSION['username']) && isset($_SESSION['password']) || isset($_COOKIE['username']) && isset($_COOKIE['password'])) {
$verify = $loggedIn->verify();
if (empty($verify['username'])) {
// If fake cookies are set, or they are set wrong, delete everything and redirect to home-page
$loggedIn->logOut();
header("Location: " . $CONF['url'] . "/index.php?a=welcome");
} else {
$feed = new feed();
$feed->db = $db;
$feed->url = $CONF['url'];
$feed->user = $verify;
$feed->id = $verify['idu'];
$feed->username = $verify['username'];
$feed->time = $settings['time'];
$feed->updateStatus($verify['offline']);
$TMPL_old = $TMPL;
$TMPL = array();
$skin = new skin('track/edit');
$rows = '';
$TMPL['url'] = $CONF['url'];
$TMPL['page_title'] = $LNG['upload'];
$TMPL['form_url'] = $CONF['url'] . '/requests/post_track.php';
$feed->art_size = $settings['artsize'];
$feed->art_format = $settings['artformat'];
$feed->paypalapp = $settings['paypalapp'];
$feed->track_size_total = $feed->getProStatus($feed->id, 1) ? $settings['protracktotal'] : $settings['tracksizetotal'];
$feed->track_size = $feed->getProStatus($feed->id, 1) ? $settings['protracksize'] : $settings['tracksize'];
$feed->track_format = $settings['trackformat'];
$TMPL['art'] = 'default.png';
$date = explode('-', $TMPL['release']);
$TMPL['years'] = generateDateForm(0, $date[0]);
$TMPL['months'] = generateDateForm(1, $date[1]);
$TMPL['days'] = generateDateForm(2, $date[2]);
// Se the download to off by default
$TMPL['doff'] = ' selected="selected"';
// Set the visiblity to public by default
$TMPL['pon'] = ' selected="selected"';
if ($TMPL['license'] == 0) {
$TMPL['ar'] = 'checked';
} else {
$TMPL['cc'] = 'checked';
$license = str_split($TMPL['license']);
$TMPL['nc'] = $license[1];
$TMPL['nd_sa'] = $license[2];
}
$TMPL['display'] = 'inhert';
$TMPL['onclick'] = 'startUpload()';
$TMPL['btntext'] = $LNG['upload'];
$rows = $skin->make();
$skin = new skin('upload/sidebar');
$sidebar = '';
$TMPL['statistics'] = $feed->sidebarStatistics(null, 2);
$TMPL['go_pro'] = $feed->goProMessage(1, 1);
$sidebar = $skin->make();
$TMPL = $TMPL_old;
unset($TMPL_old);
$TMPL['rows'] = $rows;
$TMPL['sidebar'] = $sidebar;
}
} else {
// If the session or cookies are not set, redirect to home-page
header("Location: " . $CONF['url'] . "/index.php?a=welcome");
}
if (isset($_GET['logout']) == 1) {
$loggedIn->logOut();
header("Location: " . $CONF['url'] . "/index.php?a=welcome");
}
$TMPL['url'] = $CONF['url'];
$TMPL['title'] = $LNG['upload'] . ' - ' . $settings['title'];
$skin = new skin('upload/content');
return $skin->make();
}
示例3: PageMain
function PageMain()
{
global $TMPL, $LNG, $CONF, $db, $loggedIn, $settings;
if (!$settings['paypalapp']) {
header("Location: " . $CONF['url'] . "/index.php?a=welcome");
}
if (isset($_SESSION['username']) && isset($_SESSION['password']) || isset($_COOKIE['username']) && isset($_COOKIE['password'])) {
$verify = $loggedIn->verify();
if (empty($verify['username'])) {
// If fake cookies are set, or they are set wrong, delete everything and redirect to home-page
$loggedIn->logOut();
header("Location: " . $CONF['url'] . "/index.php?a=welcome");
}
}
// Start the music feed
$feed = new feed();
$feed->db = $db;
$feed->url = $CONF['url'];
$feed->user = $verify;
$feed->id = $verify['idu'];
$feed->username = $verify['username'];
$proAccount = $feed->getProStatus($feed->id, 0);
$TMPL_old = $TMPL;
$TMPL = array();
// Get the PayPal settings
$PayPalMode = $settings['paypalsand'] ? '.sandbox' : '';
// Decide whether whether the request is for sandbox or live
$PayPalCurrencyCode = $settings['currency'];
// Paypal Currency Code
$PayPalReturnURL = $CONF['url'] . '/index.php?a=pro&type=successful';
//Point to process.php page
$PayPalCancelURL = $CONF['url'] . '/index.php?a=pro&type=canceled';
// Canceling URL if user clicks cancel
$paypal = new paypalApi();
$paypal->username = $settings['paypaluser'];
// PayPal API Username
$paypal->password = $settings['paypalpass'];
// Paypal API password
$paypal->signature = $settings['paypalsign'];
// Paypal API Signature
$skin = new skin('pro/gopro');
$rows = '';
// If the user is logged-in
if ($feed->id) {
if (isset($_POST['plan']) && !$proAccount) {
$ItemName = $_POST["plan"] == 1 ? sprintf($LNG['pro_year'], $settings['title']) : sprintf($LNG['pro_month'], $settings['title']);
//Item Name
$ItemPrice = $_POST["plan"] == 1 ? $settings['proyear'] : $settings['promonth'];
//Item Price
$ItemNumber = $_POST["plan"] == 1 ? md5(1) : md5(0);
//Item Number
$ItemDesc = $_POST["plan"] == 1 ? sprintf($LNG['pro_year'], $settings['title']) : sprintf($LNG['pro_month'], $settings['title']);
//Item Number
$ItemQty = 1;
// Item Quantity
$ItemTotalPrice = $ItemPrice * $ItemQty;
//(Item Price x Quantity = Total) Get total amount of product;
// Parameters for SetExpressCheckout, which will be sent to PayPal
$params = array('METHOD' => 'SetExpressCheckout', 'RETURNURL' => $PayPalReturnURL, 'CANCELURL' => $PayPalCancelURL, 'PAYMENTREQUEST_0_PAYMENTACTION' => 'SALE', 'L_PAYMENTREQUEST_0_NAME0' => $ItemName, 'L_PAYMENTREQUEST_0_NUMBER0' => $ItemNumber, 'L_PAYMENTREQUEST_0_DESC0' => $ItemDesc, 'L_PAYMENTREQUEST_0_AMT0' => $ItemPrice, 'L_PAYMENTREQUEST_0_QTY0' => $ItemQty, 'NOSHIPPING' => 0, 'PAYMENTREQUEST_0_ITEMAMT' => $ItemTotalPrice, 'PAYMENTREQUEST_0_AMT' => $ItemPrice, 'PAYMENTREQUEST_0_CURRENCYCODE' => $PayPalCurrencyCode, 'PAYMENTREQUEST_0_ALLOWEDPAYMENTMETHOD' => 'InstantPaymentOnly', 'LOCALECODE' => 'US', 'LOGOIMG' => $CONF['url'] . '/' . $CONF['theme_url'] . '/images/logo_black.png', 'CARTBORDERCOLOR' => 'FFFFFF', 'ALLOWNOTE' => 0);
// Store the selected plan
$_SESSION['SelectedPlan'] = $_POST['plan'];
$_SESSION['ItemName'] = $ItemName;
//Item Name
$_SESSION['ItemPrice'] = $ItemPrice;
//Item Price
$_SESSION['ItemNumber'] = $ItemNumber;
//Item Number
$_SESSION['ItemDesc'] = $ItemDesc;
//Item Number
$_SESSION['ItemQty'] = $ItemQty;
// Item Quantity
$_SESSION['ItemTotalPrice'] = $ItemTotalPrice;
//(Item Price x Quantity = Total) Get total amount of product;
// Execute SetExpressCheckOut method to create the payment token and PayerID
$paypalResponse = $paypal->post('SetExpressCheckout', $params, $PayPalMode);
//Respond according to message we receive from Paypal
if (strtoupper($paypalResponse["ACK"]) == "SUCCESS") {
// Generat the PayPal payment url with the response Token
$paypalurl = 'https://www' . $PayPalMode . '.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=' . $paypalResponse["TOKEN"] . '';
// Redirect to PayPal payment page
header('Location: ' . $paypalurl);
} else {
// If the payment is not successful
$TMPL['error'] = notificationBox('error', '<strong>' . urldecode($paypalResponse['L_SHORTMESSAGE0'] . '</strong>: ' . $paypalResponse['L_LONGMESSAGE0']));
}
} elseif ($_GET['type'] == 'canceled' && !$proAccount) {
// If the payment has been canceled
$TMPL['error'] = notificationBox('error', $LNG['payment_error_1']);
} elseif ($_GET['type'] == 'successful' && !$proAccount) {
$skin = new skin('pro/gopro');
$rows = '';
// If the token and PayerID has been returned by the Return URL
if (isset($_GET["token"]) && isset($_GET["PayerID"])) {
$token = $_GET["token"];
$payer_id = $_GET["PayerID"];
// Get the selected plan
$ItemName = $_SESSION['ItemName'];
//Item Name
$ItemPrice = $_SESSION['ItemPrice'];
//Item Price
//.........这里部分代码省略.........