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


PHP Blog::getPhotoAds方法代码示例

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


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

示例1: Config

<?php

include_once '/kunden/homepages/0/d643120834/htdocs/config/index.php';
$site_url = 'http://' . $_SERVER['SERVER_NAME'] . '/';
/* HEADER THIS IS WHAT IT DOES:
 * builds the site variable
 * loads the user with the user session, and cookie data
 */
// LOAD WEBSITE APPLICATIONS
$app = new Config();
// LOAD SITE DATA
$config = new Blog($_SERVER['HTTP_HOST']);
$site = $config->getSiteData($config->site);
$site['media']['photos']['front-page'] = $config->getPhotoAds($site['creator'], 'freelabel front', 8);
$site['media']['photos']['ads'] = $config->getPhotoAds($site['creator'], 'current-promo', 10);
$r = rand(0, 6);
// echo '<pre>';
// var_dump($r);
// echo '<hr>';
// var_dump($site['media']['photos']['front-page']);
// exit;
/* load page title */
$site['page_title'] = $config->getPageTitle(strtoupper($_GET['url']));
// LOAD USER DATA
$user = new User();
if (isset($_SESSION) && count($_SESSION) > 0) {
    $site['user'] = $user->init($_SESSION, $_COOKIE);
    $user_logged_in = new UserDashboard(Session::get('user_name'));
    $site['user']['profile-photo'] = $profile_photo = $config->getProfilePhoto(Session::get('user_name'));
    if (isset($site['user']['name'])) {
        $site['user']['media'] = $user_data = $user_logged_in->getUserMedia(Session::get('user_name'));
开发者ID:mayoalexander,项目名称:fl-two,代码行数:31,代码来源:header.php

示例2: Blog

<?php

if (isset($_GET['url'])) {
    $post_id = str_replace('index/view/', '', $_GET['url']);
} else {
    echo 'no post id found!';
}
include_once '/kunden/homepages/0/d643120834/htdocs/config/index.php';
$config = new Blog();
$site = $config->getSiteData();
$post = $config->getPostByID($post_id);
$site['media']['photos'] = array_reverse($config->getPhotoAds($site['creator'], 'registration'));
$site['media']['studio'] = array_reverse($config->getPhotoAds($site['creator'], 'studio'));
$site['media']['artists'] = array_reverse($config->getPhotoAds($site['creator'], 'artist flyer'));
$site['media']['promos'] = array_reverse($config->getPhotoAds($site['creator'], 'current-promo'));
// $site['media']['credit'] = array_reverse($config->getPhotoAds($site['creator'], 'magazine'));
// $config->debug($post, true);
/* why */
$info['why'] = '';
foreach ($site['landing-info']['why'] as $key => $text) {
    $info['why'] .= '<li class="pricing-list-info">' . $text . '</li>';
}
$info['what'] = '';
foreach ($site['landing-info'] as $key => $text) {
    $info['what'] .= '<li class="pricing-list-info">' . $text . '</li>';
}
$info['benefits'] = '';
foreach ($site['landing-info']['benefits'] as $key => $text) {
    $info['benefits'] .= '<li class="pricing-list-info">' . $text . '</li>';
}
$info['how'] = '';
开发者ID:mayoalexander,项目名称:fl-two,代码行数:31,代码来源:view.php

示例3: Config

 * builds the site variable
 * loads the user with the user session, and cookie data
 *
 *
 */
// LOAD WEBSITE APPLICATIONS
$app = new Config();
// LOAD SITE DATA
$config = new Blog($_SERVER['HTTP_HOST']);
$site = $config->getSiteData($config->site);
if ($_GET['dev']) {
    $site['enviroment'] = 'PRODUCTION';
} else {
    $site['enviroment'] = 'LIVE';
}
$site['media']['photos']['front-page'] = $config->getPhotoAds($site['creator'], 'front');
// LOAD USER DATA
$user = new User();
if (isset($_SESSION) or isset($_COOKIE['fl-user-name'])) {
    $site['user'] = $user->init($_SESSION, $_COOKIE);
    $user_logged_in = new UserDashboard($site['user']['name']);
    $site['user']['profile-photo'] = $profile_photo = $user_logged_in->getProfilePhoto($site['user']['name']);
    $site['user']['media'] = $user_data = $user_logged_in->getUserMedia($site['user']['name'], 'all');
}
$front_page_photos = $config->getPhotoAds($site['creator'], 'front');
shuffle($front_page_photos);
if ($page_title == '') {
    $page_title = $site['title'];
}
if ($meta_tag_photo == '') {
    $meta_tag_photo = "http://freelabel.net/images/fllogo.png";
开发者ID:mayoalexander,项目名称:fl-two,代码行数:31,代码来源:index.php

示例4: Blog

<?php

include_once '/kunden/homepages/0/d643120834/htdocs/config/index.php';
$config = new Blog();
$site = $config->getSiteData();
$site['media']['photos'] = $config->getPhotoAds($site['creator'], 'registration');
$site['media']['studio'] = $config->getPhotoAds($site['creator'], 'register-feature');
$site['media']['studio'] = $config->getPhotoAds($site['creator'], 'freelabel front');
$site['media']['artists'] = $config->getPhotoAds($site['creator'], 'artist flyer');
$site['media']['promos'] = $config->getPhotoAds($site['creator'], 'current-promo');
// $site['media']['credit'] = array_reverse($config->getPhotoAds($site['creator'], 'magazine'));
/* why */
$info['why'] = '';
foreach ($site['landing-info']['why'] as $key => $text) {
    $info['why'] .= '<li class="pricing-list-info">' . $text . '</li>';
}
$info['what'] = '';
foreach ($site['landing-info'] as $key => $text) {
    $info['what'] .= '<li class="pricing-list-info">' . $text . '</li>';
}
$info['benefits'] = '';
foreach ($site['landing-info']['benefits'] as $key => $text) {
    $info['benefits'] .= '<li class="pricing-list-info">' . $text . '</li>';
}
$info['how'] = '';
foreach ($site['landing-info']['how'] as $key => $text) {
    $info['how'] .= '<li class="pricing-list-info">' . $text . '</li>';
}
?>
<!DOCTYPE html>
<html lang="en" class="no-js">
开发者ID:mayoalexander,项目名称:fl-two,代码行数:31,代码来源:register.php

示例5: Blog

<?php

include_once '/kunden/homepages/0/d643120834/htdocs/config/index.php';
$config = new Blog();
$photos = $config->getPhotoAds('admin', 'registration');
$i = 0;
foreach ($photos as $photo) {
    $photos[$i]['thumbnail'] = str_replace('server/php/files', 'server/php/files/thumbnail', $photo['image']);
    //echo $i.') '.$photos['thumbnail'];
    $i++;
}
?>
<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
	<meta charset="UTF-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>REGISTER // FREELABEL</title>
	<meta name="description" content="A simple content slider with depth-like zoom functionality" />
	<meta name="keywords" content="blueprint, template, slider, zoom, javascript, depth, 3d, css" />
	<meta name="author" content="Codrops" />
	<link rel="shortcut icon" href="http://freelabel.net/ico/favicon.ico">
	<!-- Feather Icons -->
	<link rel="stylesheet" type="text/css" href="<?php 
echo HTTP . 'artists/templates/ZoomSlider/';
?>
fonts/feather/style.css">
	<!-- General demo styles & header -->
	<link rel="stylesheet" type="text/css" href="<?php 
echo HTTP . 'artists/templates/ZoomSlider/';
开发者ID:mayoalexander,项目名称:fl-two,代码行数:31,代码来源:index.php

示例6: Blog

<?php

include_once '/kunden/homepages/0/d643120834/htdocs/config/index.php';
require ROOT . 'inc/conn.php';
$config = new Blog();
$current_page = 0;
$site = $config->getSiteData($config->site);
$site['media']['photos'] = $config->getPhotoAds($site['creator'], 'current-promo', 1);
$todays_date = date('Y-m-d');
$result = $conn->query('select * from twitter_data WHERE timestamp LIKE "%' . $todays_date . '%" ORDER BY `id` DESC');
$numb_soms_sent = count($result->fetchAll());
$leads_conversion = new Config();
/* DETECT HOW MANY POSTS CREATED TODAY */
$posted_today = null;
$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);
开发者ID:mayoalexander,项目名称:fl-two,代码行数:31,代码来源:leads.php

示例7: Blog

<?php

include_once '/kunden/homepages/0/d643120834/htdocs/config/index.php';
$config = new Blog();
$site = $config->getSiteData($config->site);
$site['media']['photos']['front-page'] = $config->getPhotoAds($site['creator'], 'freelabel front', 8);
// logo hack
$site['logo'] = 'http://freelabel.net/upload/server/php/upload/alex-mayo-logo-unicolor-150--395391985-.png';
$site['base_url'] = 'http://freelabel.net/landing/view/syn/';
?>
<!doctype html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang=""> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8" lang=""> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9" lang=""> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="en-US">
<!--<![endif]-->
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
	<title>Alexander Mayo</title>
	<meta name="description" content="Alexander Mayo">
	<meta name="keywords" content="html template, bootstrap, ui kit, sass" />
	<meta name="author" content="Alexander Mayo" />
	<!-- favicon generated by http://realfavicongenerator.net/ -->
	<link rel="apple-touch-icon" sizes="57x57" href="<?php 
echo $site['logo'];
?>
">
	<link rel="apple-touch-icon" sizes="60x60" href="<?php 
开发者ID:mayoalexander,项目名称:fl-two,代码行数:31,代码来源:header.php

示例8: Blog

<style type="text/css">
	.magazine-page {
		width: 100%;
	}
</style><?php 
include_once '/kunden/homepages/0/d643120834/htdocs/config/index.php';
$config = new Blog();
$mag = $config->getPhotoAds($site['creator'], 'magazine');
foreach ($mag as $key => $page) {
    echo '<img src="' . $page['image'] . '" class="magazine-page">';
}
开发者ID:mayoalexander,项目名称:fl-two,代码行数:11,代码来源:magazine.php


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