コード例 #1
0
ファイル: edit.php プロジェクト: humor-zo/chaofan
<?php

define('_VALID', true);
require 'include/config.php';
require 'include/function_global.php';
require 'include/function_smarty.php';
require 'classes/auth.class.php';
require 'classes/filter.class.php';
if ($config['video_module'] == '0') {
    VRedirect::go($config['BASE_URL'] . '/error/page_invalid');
}
if ($config['edit_videos'] == '0') {
    VRedirect::go($config['BASE_URL'] . '/error/page_invalid');
}
Auth::check();
$vid = get_request_arg('edit');
if (!$vid) {
    VRedirect::go($config['BASE_URL'] . '/error/video_missing');
}
$uid = (int) $_SESSION['uid'];
$sql = "SELECT VID FROM video WHERE VID = " . $vid . " AND UID = " . $uid . " AND active = '1' LIMIT 1";
$conn->execute($sql);
if ($conn->Affected_Rows()) {
    $categories = get_categories();
    if (isset($_POST['edit_submit'])) {
        $filter = new VFilter();
        $title = $filter->get('title');
        $keyword = $filter->get('keyword');
        $channel = $filter->get('channel', 'INTEGER');
        $type = $filter->get('type');
        $thumb = $filter->get('thumb', 'INTEGER');
コード例 #2
0
ファイル: static.php プロジェクト: humor-zo/chaofan
<?php

define('_VALID', true);
require 'include/config.php';
require 'include/function_global.php';
require 'include/function_smarty.php';
require 'classes/filter.class.php';
$page = NULL;
$pages_allowed = array('terms', 'privacy', 'dmca', '_2257', 'webmasters', 'advertise', 'faq');
$page = get_request_arg('static', 'STRING');
$template = 'static/' . $page;
switch ($page) {
    case 'faq':
        $self_title = 'Freqvently Asked Questions';
        $break;
    case 'terms':
        $self_title = 'Terms & Conditions';
        break;
    case 'privacy':
        $self_title = 'Privacy Policy';
        break;
    case 'dmca':
        $self_title = 'DMCA';
        break;
    case '_2257':
        $self_title = NULL;
        $template = 'static/2257';
        break;
    case 'webmasters':
        $self_title = 'Embed Videos';
        break;
コード例 #3
0
ファイル: video.php プロジェクト: humor-zo/chaofan
<?php

define('_VALID', true);
require 'include/config.php';
require 'include/function_global.php';
require 'include/function_smarty.php';
require 'classes/pagination.class.php';
if ($config['video_view'] == 'registered') {
    require 'classes/auth.class.php';
    Auth::check();
}
$vid = get_request_arg('video');
if (!$vid) {
    VRedirect::go($config['BASE_URL'] . '/error/video_missing');
}
$active = $config['approve'] == '1' ? " AND v.active = '1'" : NULL;
$sql = "SELECT v.VID, v.UID, v.title, v.channel, v.keyword, v.viewnumber, v.type,\n                      v.addtime, v.rate, v.likes, v.dislikes, v.ratedby, v.flvdoname, v.space, v.embed_code, v.width_sd, v.height_sd, v.hd, v.iphone,\n\t\t\t\t\t  u.username, u.photo, u.gender, u.fname\n               FROM video AS v, signup AS u WHERE v.VID = " . $vid . " AND v.UID = u.UID" . $active . " LIMIT 1";
$rs = $conn->execute($sql);
if ($conn->Affected_Rows() != 1) {
    VRedirect::go($config['BASE_URL'] . '/error/video_missing');
}
$hd = $rs->fields['hd'];
$video_width = $rs->fields['width_sd'];
$video_height = $rs->fields['height_sd'];
$player_width = 640;
$embed_width = 530;
$embed_auto_height = round(530 * ($video_height / $video_width));
if ($hd == 0) {
    $autoheight = round(640 * ($video_height / $video_width));
    $player_width = 640;
}
コード例 #4
0
ファイル: photo.php プロジェクト: ecr007/pr0n
<?php

define('_VALID', true);
require 'include/config.php';
require 'include/function_global.php';
require 'include/function_smarty.php';
require 'classes/pagination.class.php';
if ($config['photo_module'] == '0') {
    VRedirect::go($config['BASE_URL'] . '/error/page_invalid');
}
$pid = get_request_arg('photo');
if (!$pid) {
    VRedirect::go($config['BASE_URL'] . '/error/photo_missing');
}
$sql = "SELECT PID, AID, caption, rate, ratedby FROM photos WHERE PID = " . $pid . " AND status = '1' LIMIT 1";
$rs = $conn->execute($sql);
if ($conn->Affected_Rows() != 1) {
    VRedirect::go($config['BASE_URL'] . '/error/photo_missing');
}
$photo = $rs->getrows();
$photo = $photo['0'];
$aid = intval($photo['AID']);
$sql = "SELECT UID, name, type, tags FROM albums WHERE AID = " . $aid . " AND status = '1' LIMIT 1";
$rs = $conn->execute($sql);
if ($conn->Affected_Rows() != 1) {
    VRedirect::go($config['BASE_URL'] . '/error/album_missing');
}
$album = $rs->getrows();
$album = $album['0'];
$uid = intval($album['UID']);
$is_friend = true;
コード例 #5
-1
ファイル: notice.php プロジェクト: ecr007/pr0n
<?php

define('_VALID', true);
require 'include/config.php';
require 'include/function_global.php';
require 'include/function_smarty.php';
require 'include/function_notice.php';
require 'classes/pagination.class.php';
$NID = get_request_arg('notice');
if (!$NID) {
    VRedirect::go($config['BASE_URL'] . '/error');
}
$sql = "SELECT n.NID, n.UID, n.title, n.content, n.total_comments, n.addtime, s.username\n                   FROM notice AS n, signup AS s WHERE status ='1' AND n.UID = s.UID AND n.NID = " . $NID . " LIMIT 1";
$rs = $conn->execute($sql);
if ($conn->Affected_Rows() != 1) {
    VRedirect::go($config['BASE_URL'] . '/error/invalid_notice');
}
$notice = $rs->getrows();
$notice = $notice['0'];
$sql = "UPDATE notice SET total_views = total_views+1 WHERE NID = " . $NID . " LIMIT 1";
$conn->execute($sql);
$sql = "SELECT COUNT(CID) AS total_comments FROM notice_comments WHERE NID = " . $NID . " AND status = '1'";
$rsc = $conn->execute($sql);
$total = $rsc->fields['total_comments'];
$pagination = new Pagination(10);
$limit = $pagination->getLimit($total);
$sql = "SELECT c.CID, c.UID, c.comment, c.addtime, s.username, s.photo, s.gender\n                   FROM notice_comments AS c, signup AS s \n                   WHERE c.NID = " . $NID . " AND c.status = '1' AND c.UID = s.UID\n                   ORDER BY c.addtime DESC LIMIT " . $limit;
$rs = $conn->execute($sql);
$comments = $rs->getrows();
$page_link = $pagination->getPagination('notice/' . $NID, 'p_notice_comments_' . $NID . '_');
$page_link_b = $pagination->getPagination('notice/' . $NID, 'pp_notice_comments_' . $NID . '_');