本文整理汇总了PHP中Blog::getPromosByUser方法的典型用法代码示例。如果您正苦于以下问题:PHP Blog::getPromosByUser方法的具体用法?PHP Blog::getPromosByUser怎么用?PHP Blog::getPromosByUser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Blog
的用法示例。
在下文中一共展示了Blog::getPromosByUser方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: switch
$user_rating = '';
$name = $row['user_name'];
$user_account_type = $row['account_type'];
switch ($user_account_type) {
case 'freetrial':
//$user_account_type = '<span class="label label-warning">FreeTrial</span>';
break;
default:
//$user_account_type = '<span class="label label-danger">inactive</span>';
break;
}
$date_created = $row['user_creation_timestamp'];
$date_created_account = date('m/d', $date_created);
$showcase_date = date('m/d', strtotime("+ 10 days", $date_created));
$expiration_date = date('m/d', strtotime("+ 28 days", $date_created));
$promos = $config->getPromosByUser($name, 0);
if ($promos === NULL) {
$promos = 'No Promos Found!';
} else {
$promos = count($promos);
}
$user_id = $row['user_id'];
$user_email = $row['user_email'];
//<a href="mailto:">'.$user_email.'</a>
$user_email_link = '<a href="mailto:' . $user_email . '?subject="FREELABEL%20>' . $user_email . '</a>';
//
$user_twitter = $row['twitter'];
$user_notes = $row['notes'];
$user_rating = $row['rating'];
$active = $row['active'];
$client_profile = "http://x.freelabel.net/" . strtolower($twitter);
示例2: Config
// ---------- DEFAULT VIEWS & CONFIGURATIONS
//$access_token = $_SESSION['access_token'];
$config = new Config();
$blog = new Blog();
// ---------- DEFAULT VIEWS & CONFIGURATIONS
if (isset($_SESSION['user_name']) == false) {
session_start();
}
$access_token['oauth_token'] = '1018532587-qbLJXcpMzhvmFU0xHmmIF1SgSzzfC9CG0NccwXq';
$access_token['oauth_token_secret'] = 'ZZgJzwgPt7jpj3RVPrQYVv2u0E3PPvXRJD2yK9oTXa2r8';
$access_token['screen_name'] = 'FreeLabelNet';
$access_token['user_id'] = '1018532587';
$access_token['x_auth_expires'] = '0';
$_SESSION['access_token'] = $access_token;
$todays_date = date('Y-m-d H:i:s');
$promos_data = $blog->getPromosByUser('admin', 0, 'live-promo');
foreach ($promos_data as $value) {
$params[]['id'] = $value['id'];
$params[]['title'] = $value['title'];
}
$promos_data = $blog->build_dropdown($params, 'promo_id');
// /* debugging */
// if (isset($_GET)) {
// var_dump($_GET);
// }
// if (isset($_POST)) {
// var_dump($_POST);
// }
// start application
$leads_list = $config->getLeads();
$n = 0;
示例3: Blog
<?php
/* GET PAGE DATA */
if (isset($_GET['page'])) {
$current_page = $_GET['page'];
}
if (isset($_GET['tag']) or $tag !== '') {
$tag = $_GET['tag'];
} else {
$tag = NULL;
}
/* LOAD CONFIGURATION APP */
include_once '/kunden/homepages/0/d643120834/htdocs/config/index.php';
$config = new Blog();
$promos = $config->getPromosByUser('admin', $current_page, $tag);
echo $config->display_photos($promos, null, $current_page, $tag);
?>
<script type="text/javascript" src='http://freelabel.net/js/dashboard.js'></script>
<script type="text/javascript" src='http://freelabel.net/js/promos.js'></script>
示例4:
</div>
<!-- get user tags -->
<nav class="filter-option-panel btn-group" style="background-color:transparent;text-align:left;border-bottom:3px solid #303030;padding:2% 0%;">
<!-- <label>Filter by tags:</label> -->
<span class="fa fa-tag filter-by-icon"></span>
<?php
echo $config->get_user_tags(Session::get('user_name'), $current_tag);
?>
</nav>
<div id="promos_content">
<script type="text/javascript" src="http://freelabel.net/js/promos.js"></script>
<!-- display content -->
<?php
$promos = $config->getPromosByUser(Session::get('user_name'), 0, $current_tag);
echo $config->display_photos($promos, null, 0, $current_tag);
?>
</div>
示例5: date
$tp = $config->getPostsByUser(0, 1, 'admin');
foreach ($tp as $post) {
$post_date = date('m-d', strtotime($post['submission_date']));
$todays_date2 = date('m-d');
if ($post_date === $todays_date2) {
$posted_today = true;
}
}
if ($posted_today === true) {
$status[] = '<span class="text-success">BLOGS POSTED TODAY!</span>';
} else {
$status[] = '<span class="text-danger">NOT POSTED TODAY!</span>';
}
/* DETECT HOW MANY PROMOS POSTED TO DAY */
$posted_today = null;
$tpr = $config->getPromosByUser('admin', 0);
// $config->debug($tpr,1);
foreach ($tpr as $promo) {
$post_date = date('m-d', strtotime($promo['date_created']));
$todays_date2 = date('m-d');
if ($post_date === $todays_date2) {
$posted_today = true;
}
}
if ($posted_today === true) {
$status[] = '<span class="text-success">PROMOS CREATED TODAY!</span>';
} else {
$status[] = '<span class="text-danger">NO PROMOS CREATED TODAY</span>';
$status[] = '<a class="btn btn-success-outline btn-block pull-left" href="http://freelabel.net/users/dashboard/?ctrl=promos" target="_blank">ADD NEW PROMO</a>';
}
/* DETECT HOW MANY CLIENTS SIGNED UP TODAY */
示例6: Blog
<?php
include_once '/kunden/homepages/0/d643120834/htdocs/config/index.php';
$user_name = Session::get('user_name');
$config = new Blog();
$s = $config->getStatsByUser($user_name);
$stats = $s['count'];
$tracks = $config->getPostsByUser(0, 300, $user_name);
$events = $config->getEventsByUser($user_name, 500);
$promos = $config->getPromosByUser(Session::get('user_name'), 300);
$num_tracks = count($tracks);
$num_events = count($events);
$num_promos = count($promos);
if ($num_tracks == '300') {
$num_tracks = $num_tracks . "+";
}
// earnings calculator
$score = 0.001 * $stats * 0.001 * $num_tracks;
$photo = $config->getProfilePhoto($user_name);
$user = $config->getUserData($user_name);
if (isset($tracks)) {
foreach ($tracks as $key => $value) {
$post_date = date('m-d', strtotime($value['submission_date']));
$todays_date = date('m-d');
$yesterdays_date = date('m-d', '-1 day');
$two_days_ago = date('m-d', strtotime('-2 days', time()));
$three_days_ago = date('m-d', strtotime('-3 days', time()));
if ($post_date == $todays_date) {
$today[] = $value['blogtitle'];
} elseif ($post_date == $yesterdays_date) {
$yesterday[] = $value['blogtitle'];
示例7: date
$todays_date = date('Y-m-d');
$query = "SELECT * FROM templates \n WHERE date_created LIKE '{$todays_date}%'\n ORDER BY `id` DESC";
$result = mysqli_query($con, $query);
while ($row = mysqli_fetch_array($result)) {
//print_r($row);
$text = $row['text'];
$post_id = $row['id'];
$posts_to_tweet[] = $text;
}
}
// end of organic
print_r($tweets_to_tweet);
/* GET THE PROMOS */
/*$promos1 = $config->getPromosByUser('admin', 0, 'current-promo');
$promos2 = $config->getPromosByUser('admin', 1, 'current-promo');*/
$promos = $config->getPromosByUser('admin', 0, 'current-promo');
//array_merge($promos1, $promos2);
foreach ($promos as $promo) {
$new_tweets[] = $promo['title'] . ' | http://freelabel.net/users/index/image/' . $promo['id'];
$new_tweets[] = $promo['title'] . ' | http://freelabel.net/users/index/image/' . $promo['id'];
}
$posts_to_tweet = array_merge($posts_to_tweet, $new_tweets);
shuffle($posts_to_tweet);
$already_tweeted = array("0");
$i = 1;
echo "<h1>CAMPAIGNS</h1>";
echo '<ul class="list-group" style="">';
foreach ($posts_to_tweet as $tweet) {
// $twitter_user_data = $connectionRequest->users[$i]->screen_name;
// $user_twitter_name = $twitter_user_data->user->screen_name;
echo '