Esempio n. 1
0
            $sql_public_private = "AND public_private = 'public'";
            $sql_pagination = "public_private = 'public'";
        }
        //echo "show_private_content " . $show_private_content . " user_id " . $user_id . " owner id " . $owners_id . " blog id " . $blog_id . " sql " . $public_private;
        break;
}
// end switch
//______________________________________________________________________________________________
//___Audio______________________________________________________________________________________
$enable_audio = $config["enabled_features_audio"] == 'yes' ? 1 : 0;
$files_array = array('audio.php', 'audio_selector.php', 'audio_uploader.php', 'audio.php', 'play_audio.php', 'comments_audio.php', 'comments_audio_ajax.php');
if (in_array($calling_file, $files_array) && $enable_audio == 0) {
    $error_messages = $config['error_26'];
    generic_error($error_messages);
}
//______________________________________________________________________________________________
//___Images______________________________________________________________________________________
$enable_images = $config["enabled_features_images"] == 'yes' ? 1 : 0;
$files_array = array('albums.php', 'album_view.php', 'album_ajax.php', 'comments_image_ajax.php', 'image_uploader.php');
if (in_array($calling_file, $files_array) && $enable_images == 0) {
    $error_messages = $config['error_26'];
    generic_error($error_messages);
}
//______________________________________________________________________________________________
//___Blogs______________________________________________________________________________________
$enable_blogs = $config["enabled_features_blogs"] == 'yes' ? 1 : 0;
$files_array = array('blogs.php', 'blog_reply_ajax.php', 'read_blog.php');
if (in_array($calling_file, $files_array) && $enable_blogs == 0) {
    $error_messages = $config['error_26'];
    generic_error($error_messages);
}
Esempio n. 2
0
<?php

///////////////////////////////////////////////////////////////////////////////////////
// PHPmotion                                                http://www.phpmotion.com //
///////////////////////////////////////////////////////////////////////////////////////
// License: You are not to sell or distribute this software without permission       //
// Help and support please visit http://www.phpmotion.com                            //
// Copyright reserved                                                                //
///////////////////////////////////////////////////////////////////////////////////////
include_once 'classes/config.php';
generic_error('item could not be found or has been deleted');
Esempio n. 3
0
function required_post($variables)
{
    global $session;
    foreach ($variables as $var) {
        if (!isset($_POST[$var])) {
            $session->log(sprintf('JSON API POST with missing variable: %s', $var));
            generic_error('not_enough_parameters');
        }
    }
}
Esempio n. 4
0
    }
}
//////////////////////////////////////////////////// end album //////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////// view image called ///////////////////////////////////////////////////////////////////////
// image called e.g index.htm or index_ajax.htm
if ($image_id) {
    // if image called called GET ALBUM ID
    $album_sql = "SELECT gallery_id FROM images WHERE indexer = {$image_id} AND approved ='yes'";
    $album_query = @mysql_query($album_sql);
    $album_result = @mysql_fetch_array($album_query);
    $image_gallery_id = $album_result['gallery_id'];
    $greybox_sql = "SELECT * FROM images WHERE gallery_id = {$image_gallery_id} AND approved ='yes'";
    $greybox_query = @mysql_query($greybox_sql);
    $result_loader = array();
    // Is Active / Found
    mysql_num_rows($album_query) > 0 ? null : generic_error($config['error_11']);
    // load image array for full size greybox view
    while ($greybox_result = @mysql_fetch_array($greybox_query)) {
        $album_member_id = $greybox_result['user_id'];
        $show_title[] = $greybox_result['title'];
        $title_seo[] = $greybox_result['title_seo'];
        $full_view = $greybox_result['image_id'];
        $img_id[] = $greybox_result['indexer'];
        $full_url = $config['site_base_url'] . '/addons/albums/images/' . $full_view;
        $album_images[] = $full_url;
        $thunbs_full_url = $config['site_base_url'] . '/addons/albums/thumbs/' . $full_view;
        $thumbs_loader[] = $thunbs_full_url;
        list($width, $height) = getimagesize("addons/albums/images/{$full_view}");
        $page_display_small_width = 100;
        $page_display_small_height = 100;
        if ($width < $page_display_small_width && $height < $page_display_small_height) {
Esempio n. 5
0
    $active = $result['approved'];
    $public_private = $result['public_private'];
    $allow_embedding = $result['allow_embedding'];
    $member_id = $result['user_id'];
}
if (!empty($result)) {
    $showdetails = 1;
}
//record view time in views_tracker table
@media_views_tracker($audio, 'audios');
if ($active != "yes" || empty($result)) {
    $codes_internal = 111;
    $proceed = false;
}
if ($public_private == "private" && $user_id != $member_id) {
    generic_error($config['error_12']);
    //$codes_internal = 112;
    $proceed = false;
}
if ($allow_embedding == 'no') {
    $show_embed = 0;
} else {
    $show_embed = 1;
}
//show
if ($proceed == true) {
    $title = $result['title'];
    $title_seo = $result['title_seo'];
    $artist = $result['artist'];
    $description = $result['description'];
    $tags = $result['tags'];
Esempio n. 6
0
    //the url to be put in links - EDIT ME
    $additional_url_variable = '/comments/';
    //add addtions information that goes in query string here , e.g. '&load=groups&friends=all' - EDIT ME
    @(include_once $include_base . '/includes/pagination.inc.php');
    //PAGINATION PLUS >> end
}
//----------------------------------------------------------
$limit = $config['see_more_limits'];
//lit for all the small box type layous calls
//see more group videos --------------------------------------
if ($which_one == 'groupsvideos') {
    $group_id = mysql_real_escape_string($_GET['gid']);
    //check if group id specified
    if ($group_id == '' || !is_numeric($group_id)) {
        $message = $config['error_11'];
        generic_error($message);
        //item could not be found
    }
    //Pagination
    $pagination = pagination("SELECT * FROM group_videos WHERE group_id = {$group_id}", $limit);
    $set_limit = $pagination[0]['set_limit'];
    $total_pages = $pagination[0]['total_pages'];
    $current_page = $pagination[0]['current_page'];
    $total_records = $pagination[0]['total_records'];
    $next_page = $pagination[0]['next_page'];
    //use in html navigation (src)
    $prev_page = $pagination[0]['prev_page'];
    //use in html navigation (src)
    $nl = $pagination[0]['nl'];
    //use in html navigation: next>>
    $pl = $pagination[0]['pl'];