当前位置: 首页>>代码示例>>PHP>>正文


PHP Blog::getUserData方法代码示例

本文整理汇总了PHP中Blog::getUserData方法的典型用法代码示例。如果您正苦于以下问题:PHP Blog::getUserData方法的具体用法?PHP Blog::getUserData怎么用?PHP Blog::getUserData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Blog的用法示例。


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

示例1: playVideo

<style>
	video {
		border:none;
		border-radius: 2px;
		cursor: pointer;
		box-shadow: 5px 5px 20px #101010;
	}
</style><?php 
include_once '/kunden/homepages/0/d643120834/htdocs/config/index.php';
$config = new Blog($_SERVER['HTTP_HOST']);
// add these stats in here somehwere in the layout
$stats = $config->getStatsByUser($site['user']['name']);
$current_page = '0';
$user = $config->getUserData($site['user']['name']);
$files = $config->getVideosByUser('admin', 1);
echo $config->display_feed($files, true, 0);
$files = $config->getVideosByUser('admin', 6);
echo $config->display_feed($files, false, 0);
// echo $files['posts'];
// var_dump($files);
?>
<script>
function playVideo(elem) {
	elem.get(0).play();
	elem.get(0).volume = 0.5;
}

$('video').bind('click',function(){
	// alert('now playing video');
	playVideo($(this));
	$('video').unbind('hover');
开发者ID:mayoalexander,项目名称:fl-two,代码行数:31,代码来源:tv.php

示例2: Blog

$config = new Blog($_SERVER['HTTP_HOST']);
// get all users
// $users = $config->getUsers();
$users = $config->getFollowing(Session::get('user_name'));
?>
<style>
	.card-social {
		min-height:200px;
		padding:2em;
	}
</style>
<?php 
// var_dump($users);
$select_user = '<panel name="receiver">';
foreach ($users as $key => $user) {
    $userdata = $config->getUserData($user['following']);
    if ($userdata['photo'] == '') {
        $photo = 'https://myspace.com/common/images/user.png';
    } else {
        $photo = $userdata['photo'];
    }
    $select_user .= '<div value="' . $user['following'] . '" class="card card-inverse card-social text-center col-md-4">

			<a href="http://freelabel.net/u/' . $user['following'] . '" target="_blank">
				<img src="' . $photo . '" height="90" width="90" alt="Avatar" class="img-circle">
				<h4>' . $user['following'] . '</h4>
			</a>
			<button class="btn btn-danger-outline unfollow-trigger" data-user="' . $user['following'] . '" data-username="' . $user['user_name'] . '">Unfollow</button>
			<div class="card-block container">
		      <div class="row">
		        <div class="col-md-4 card-stat">
开发者ID:mayoalexander,项目名称:fl-two,代码行数:31,代码来源:following.php

示例3: Blog

$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'];
        } elseif ($post_date == $two_days_ago) {
            $two_days_ago_arr[] = $value['blogtitle'];
        } elseif ($post_date == $three_days_ago) {
            $three_days_ago_arr[] = $value['blogtitle'];
开发者ID:mayoalexander,项目名称:fl-two,代码行数:31,代码来源:analytics.php

示例4:

if (isset($_POST['following'])) {
    if ($config->checkIfAlreadyFollowing($_POST['user_name'], $_POST['following']) == false) {
        echo $config->add_relationship($_POST);
    } else {
        echo 'ALREADY FOLLOWING THIS USER!';
    }
    // var_dump($_POST);
    // echo 'okay 2 bizznes';
    exit;
}
$users = $config->getUsers();
$user_name = Session::get('user_name');
// var_dump($users);
$select_user = '<panel name="receiver">';
foreach ($users as $key => $user) {
    $userdata = $config->getUserData($user['user_name']);
    if ($userdata['photo'] == '') {
        $photo = 'https://myspace.com/common/images/user.png';
    } else {
        $photo = $userdata['photo'];
    }
    $select_user .= '<div value="' . $user['following'] . '" class="card card-inverse card-social text-center col-md-4">

	<a href="http://freelabel.net/u/' . $user['following'] . '" target="_blank">
		<img src="' . $photo . '" height="90" width="90" alt="Avatar" class="img-circle">
		<h4>' . $user['user_name'] . '</h4>
	</a>
	<button data-user="' . $user['user_name'] . '" data-username="' . $user_name . '" class="follow-trigger btn btn-sm btn-success-outline">Follow</button>
	<div class="card-block container">
      <div class="row">
        <div class="col-md-6 card-stat">
开发者ID:mayoalexander,项目名称:fl-two,代码行数:31,代码来源:follow.php

示例5: date

$result = mysqli_query($con, "SELECT * \nFROM  `users` \nWHERE  `user_name` LIKE  '%" . $uid . "%'\nLIMIT 1");
while ($row = mysqli_fetch_assoc($result)) {
    $user['settings'] = $row;
    include_once ROOT . 'inc/connection.php';
    $result = mysqli_query($con, "SELECT * FROM  `user_profiles` WHERE  `id` =  '" . $uid . "' LIMIT 1");
    if ($row = mysqli_fetch_assoc($result)) {
        // echo 'found!';
        $user['profile'] = $row;
        $user['media']['feed'] = $config->getPostsByUser(0, 24, $_GET['uid']);
        //print_r($user);
    } else {
        echo 'Not Found';
    }
}
/* GET USER PROFILE DATA */
$user['profile'] = $config->getUserData($uid);
$meta_tag_photo = str_replace(' ', '%20', $row['image']);
include_once ROOT . 'inc/connection.php';
$result = mysqli_query($con, "SELECT * FROM  `images` WHERE  `user_name` = '" . $_GET['uid'] . "' AND `type` NOT LIKE '%private%' ORDER BY `id` DESC LIMIT 10");
$i = 0;
while ($row = mysqli_fetch_assoc($result)) {
    $todays_date = date('Ymd_H:i');
    $id = $row['id'];
    $title = $row['title'];
    $user_name = $row['user_name'];
    $desc = $row['desc'];
    $image = $row['image'];
    $twitpic = $row['twitpic'];
    $bae_description = $row['bae_description'];
    $date = $todays_date;
    if ($bae_description == false) {
开发者ID:mayoalexander,项目名称:fl-two,代码行数:31,代码来源:profile.php


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