Exemple #1
0
// 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";
} else {
    //$meta_tag_photo = "http://freelabel.net/images/fllogo.png";
}
$site_url = 'http://' . $_SERVER['SERVER_NAME'] . '/';
if (EVN == 'DEVELOPMENT' or $_GET['dev']) {
    echo EVN . '<pre>';
    print_r($site);
Exemple #2
0
$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'));
    }
} else {
    //   //$site['user'] = $user->init(,$_COOKIE);
    //   $site['user']['name'] = 'admin';
    //   $user_logged_in = new UserDashboard('admin');
    //   $site['user']['media'] = $user_logged_in->getUserMedia('admin');
}
$front_page_photos = $config->getPhotoAds($site['creator'], 'front');
shuffle($front_page_photos);
if ($user_name = Session::get('user_name')) {
    $upload_link = 'http://freelabel.net/upload/?uid=' . $user_name;
}
if (!strpos($_GET['url'], '/image/')) {
    // FRONT PAGE & NOT QUERY SETS!
    // $site['meta_tag_photo'] = $site['media']['photos']['front-page'][0]['image'];
    $user_name = $user_name_session;
}
include_once '/kunden/homepages/0/d643120834/htdocs/config/index.php';
$ud = new UserDashboard($_SESSION['user_name']);
$upload_options = $ud->getUserUploadOptions($user_name_session);
if (!isset($_POST['q'])) {
    // IF A FILTER QUERY IS NOT SET, SHOW THE USER PROFILE CONTROL PANEL
    include_once ROOT . 'submit/views/db/campaign_info.php';
    $iv = 'value="' . $_POST['q'] . '" ';
} else {
    $iv = '';
}
include_once ROOT . 'config/share.php';
// PULL USER DATA & MEDIA INTO A VARIABLE
$blog = new Blog();
$user_data = $ud->getUserMedia($_SESSION['user_name']);
echo '</div>';
?>
<a name='recent_post_wrapper'></a>
<a name='main_display_wrapper'></a>
<script type="text/javascript" src='http://freelabel.net/js/jquery.jeditable.js'></script>
<script type="text/javascript">
$(function() {
  $('.edit').editable('http://freelabel.net/submit/update.php',{
      id   : 'user_post_id',
      //type    : 'textarea',
      name : 'title'
    });
  $( "#user-track-search" ).submit(function( event ) {
      //alert( "Handler for .submit() called." );
      event.preventDefault();