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


PHP VFilter::get方法代码示例

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


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

示例1: die

<?php

defined('_VALID') or die('Restricted Access!');
if ($config['game_module'] == '0') {
    die;
}
require $config['BASE_DIR'] . '/classes/filter.class.php';
require $config['BASE_DIR'] . '/include/adodb/adodb.inc.php';
require $config['BASE_DIR'] . '/include/compat/json.php';
require $config['BASE_DIR'] . '/classes/pagination.class.php';
require $config['BASE_DIR'] . '/include/dbconn.php';
$code = array();
if (isset($_POST['game_id']) && isset($_POST['page'])) {
    $filter = new VFilter();
    $gid = $filter->get('game_id', 'INTEGER');
    $page = $filter->get('page', 'INTEGER');
    $uid = isset($_SESSION['uid']) ? intval($_SESSION['uid']) : NULL;
    $sql = "SELECT COUNT(CID) AS total_comments FROM game_comments WHERE GID = " . $gid . " AND status = '1'";
    $rsc = $conn->execute($sql);
    $total = $rsc->fields['total_comments'];
    $pagination = new Pagination(10, $page);
    $limit = $pagination->getLimit($total);
    $sql = "SELECT c.CID, c.UID, c.comment, c.addtime, s.username, s.photo, s.gender\n                       FROM game_comments AS c, signup AS s\n                       WHERE c.GID = " . $gid . " 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('game/' . $gid, 'p_game_comments_' . $gid . '_');
    $page_link_b = $pagination->getPagination('game/' . $gid, 'pp_game_comments_' . $gid . '_');
    $start_num = $pagination->getStartItem();
    $end_num = $pagination->getEndItem();
    $code[] = '<div class="blinkp">';
    $code[] = $lang['global.showing'] . ' <strong>' . $start_num . '</strong> ' . $lang['global.to'] . ' <strong>' . $end_num . '</strong> ' . $lang['global.of'] . ' <strong>' . $total . '</strong> ' . $lang['global.comments'] . '.';
开发者ID:humor-zo,项目名称:chaofan,代码行数:31,代码来源:game_pagination.php

示例2: die

<?php

defined('_VALID') or die('Restricted Access!');
require $config['BASE_DIR'] . '/classes/filter.class.php';
require $config['BASE_DIR'] . '/include/compat/json.php';
require $config['BASE_DIR'] . '/include/adodb/adodb.inc.php';
require $config['BASE_DIR'] . '/include/dbconn.php';
$data = array('status' => 0, 'msg' => '');
if (isset($_POST['video_id'])) {
    $filter = new VFilter();
    $video_id = $filter->get('video_id', 'INTEGER');
    if (isset($_SESSION['uid'])) {
        $sql = "SELECT VID FROM favourite WHERE VID = " . $video_id . " AND UID = " . intval($_SESSION['uid']) . " LIMIT 1";
        $conn->execute($sql);
        if ($conn->Affected_Rows() == 1) {
            $data['msg'] = show_err($lang['ajax.favorite_video_exists']);
        } else {
            $sql = "SELECT VID FROM video WHERE VID = " . $video_id . " AND UID = " . intval($_SESSION['uid']) . " LIMIT 1";
            $conn->execute($sql);
            if ($conn->Affected_Rows() == 1) {
                $data['msg'] = show_err($lang['ajax.favorite_video_self']);
            } else {
                $sql = "INSERT INTO favourite SET VID = " . $video_id . ", UID = " . intval($_SESSION['uid']);
                $conn->execute($sql);
                $sql = "UPDATE video SET fav_num = fav_num+1 WHERE VID = " . $video_id . " LIMIT 1";
                $conn->execute($sql);
                $data['msg'] = show_msg($lang['ajax.favorite_video_success']);
                $data['status'] = 1;
            }
        }
    } else {
开发者ID:humor-zo,项目名称:chaofan,代码行数:31,代码来源:favorite_video.php

示例3: die

<?php

defined('_VALID') or die('Restricted Access!');
require $config['BASE_DIR'] . '/classes/filter.class.php';
require $config['BASE_DIR'] . '/include/adodb/adodb.inc.php';
require $config['BASE_DIR'] . '/include/dbconn.php';
require $config['BASE_DIR'] . '/include/compat/json.php';
$data = array('status' => 1, 'msg' => '');
if (isset($_POST['user_id'])) {
    if (isset($_SESSION['uid'])) {
        $uid = intval($_SESSION['uid']);
        $filter = new VFilter();
        $user_id = $filter->get('user_id', 'INTEGER');
        if ($uid == $user_id) {
            $data['msg'] = show_err('Invalid request!?');
        } else {
            $sql = "SELECT UID FROM video_subscribe WHERE UID = " . $uid . " AND SUID = " . $user_id . " LIMIT 1";
            $conn->execute($sql);
            if ($conn->Affected_Rows() != 1) {
                $data['msg'] = show_err($lang['ajax.remove_sub_exists']);
            } else {
                $data['status'] = 1;
                $data['msg'] = show_msg($lang['ajax.remove_sub_success']);
                $sql = "DELETE FROM video_subscribe WHERE UID = " . $uid . " AND SUID = " . $user_id . " LIMIT 1";
                $conn->execute($sql);
                $sql = "UPDATE signup SET popularity = popularity-1, points = points-2 WHERE UID = " . $uid . " LIMIT 1";
                $conn->execute($sql);
            }
        }
    } else {
        $data['msg'] = show_err($lang['ajax.remove_sub_login']);
开发者ID:humor-zo,项目名称:chaofan,代码行数:31,代码来源:remove_subscriber.php

示例4: die

<?php

defined('_VALID') or die('Restricted Access!');
require $config['BASE_DIR'] . '/classes/filter.class.php';
require $config['BASE_DIR'] . '/include/adodb/adodb.inc.php';
require $config['BASE_DIR'] . '/include/dbconn.php';
if (isset($_POST['friend_id'])) {
    if (isset($_SESSION['uid'])) {
        $filter = new VFilter();
        $uid = intval($_SESSION['uid']);
        $fid = $filter->get('friend_id', 'INTEGER');
        $sql = "SELECT UID FROM friends WHERE UID = " . $uid . " AND FID = " . $fid . " AND status = 'Pending' LIMIT 1";
        $conn->execute($sql);
        if ($conn->Affected_Rows() == 1) {
            $sql = "DELETE FROM friends WHERE UID = " . $uid . " AND FID = " . $fid . " LIMIT 1";
            $conn->execute($sql);
            $sql = "UPDATE signup SET total_friends = total_friends-1, popularity = popularity-2 WHERE UID = " . $uid . " LIMIT 1";
            $conn->execute($sql);
            $sql = "UPDATE signup SET points = points-2 WHERE UID = " . $fid . " LIMIT 1";
            $conn->execute($sql);
            $message = $lang['ajax.reject_friend_success'];
            $sql = "SELECT u.username, u.email, p.friend_request FROM signup AS u, users_prefs AS p \n                               WHERE u.UID = " . $fid . " AND u.UID = p.UID LIMIT 1";
            $rs = $conn->execute($sql);
            if ($conn->Affected_Rows() === 1 && $rs->fields['friend_request'] == '1') {
                $to = $rs->fields['email'];
                $receiver = $rs->fields['username'];
                $sql = "SELECT username FROM signup WHERE UID = " . $uid . " LIMIT 1";
                $rs = $conn->execute($sql);
                if ($conn->Affected_Rows() === 1) {
                    $username = $rs->fields['username'];
                    require $config['BASE_DIR'] . '/classes/email.class.php';
开发者ID:ecr007,项目名称:pr0n,代码行数:31,代码来源:reject_friend.php

示例5: die

<?php

defined('_VALID') or die('Restricted Access!');
if ($config['game_module'] == '0') {
    die;
}
require $config['BASE_DIR'] . '/classes/filter.class.php';
require $config['BASE_DIR'] . '/include/compat/json.php';
require $config['BASE_DIR'] . '/include/adodb/adodb.inc.php';
require $config['BASE_DIR'] . '/include/dbconn.php';
require $config['BASE_DIR'] . '/include/function_user.php';
$response = array('status' => 0, 'msg' => '', 'debug' => '');
if (isset($_POST['game_id'])) {
    if (isset($_SESSION['uid'])) {
        $filter = new VFilter();
        $gid = $filter->get('game_id', 'INTEGER');
        $uid = intval($_SESSION['uid']);
        $sql = "SELECT UID FROM game WHERE GID = " . $gid . " LIMIT 1";
        $rs = $conn->execute($sql);
        if ($conn->Affected_Rows() === 1) {
            $game = $rs->getrows();
            if ($uid == $game[0][0]) {
                deleteGame($gid);
                $response['status'] = 1;
                $response['msg'] = show_msg_mb($lang['ajax.delete_game_success']);
            } else {
                $response['msg'] = show_err_mb($lang['ajax.delete_game_failed']);
            }
        } else {
            $response['msg'] = show_err_mb($lang['ajax.delete_game_failed']);
        }
开发者ID:humor-zo,项目名称:chaofan,代码行数:31,代码来源:delete_game.php

示例6: die

<?php

defined('_VALID') or die('Restricted Access!');
Auth::checkAdmin();
// If Posted
if (isset($_POST['submit_media_mp4'])) {
    $filter = new VFilter();
    //config settings
    $iphone_convert = $filter->get('iphone_convert', 'INTEGER');
    //db settings
    $iphone_ovc_profile = $filter->get('iphone_ovc_profile');
    $iphone_resize_base = $filter->get('iphone_resize_base');
    $iphone_resize_width = $filter->get('iphone_resize_width', 'INTEGER');
    $iphone_resize_height = $filter->get('iphone_resize_height', 'INTEGER');
    $iphone_ref_bitrate = $filter->get('iphone_ref_bitrate', 'INTEGER');
    $iphone_ref_type = $filter->get('iphone_ref_type');
    $iphone_blackbars = $filter->get('iphone_blackbars', 'INTEGER');
    $iphone_encodepass = $filter->get('iphone_encodepass', 'INTEGER');
    $iphone_audio_sampling = $filter->get('iphone_audio_sampling', 'INTEGER');
    $iphone_audio_bitrate = $filter->get('iphone_audio_bitrate', 'INTEGER');
    // Set Defaults
    $iphone_ovc_profile = $iphone_ovc_profile == '' ? 'standard' : $iphone_ovc_profile;
    $iphone_resize_base = $iphone_resize_base == '' ? 'both' : $iphone_resize_base;
    $iphone_resize_width = $iphone_resize_width == '' ? '480' : $iphone_resize_width;
    $iphone_resize_height = $iphone_resize_height == '' ? '320' : $iphone_resize_height;
    $iphone_ref_bitrate = $iphone_ref_bitrate == '' ? '1500' : $iphone_ref_bitrate;
    $iphone_ref_type = $iphone_ref_type == '' ? 'standard' : $iphone_ref_type;
    $iphone_encodepass = $iphone_encodepass == '1' ? '1' : '2';
    $iphone_blackbars = $iphone_blackbars == '0' ? '0' : '1';
    $iphone_audio_sampling = $iphone_audio_sampling == '' ? '48000' : $iphone_audio_sampling;
    $iphone_audio_bitrate = $iphone_audio_bitrate == '' ? '128' : $iphone_audio_bitrate;
开发者ID:humor-zo,项目名称:chaofan,代码行数:31,代码来源:iphone.php

示例7: elseif

    $conn->execute($sql);
    if ($conn->Affected_Rows() != 1) {
        $access = false;
        $_URL = $config['BASE_URL'] . '/error/private_messages_friends';
    }
} elseif ($config['private_msgs'] == 'disabled') {
    $access = false;
    $_URL = $config['BASE_URL'] . '/error/private_messages_disabled';
}
if (!$access) {
    VRedirect::go($_URL);
}
require $config['BASE_DIR'] . '/classes/filter.class.php';
require $config['BASE_DIR'] . '/classes/validation.class.php';
$filter = new VFilter();
$subject = $filter->get('s', 'STRING', 'GET');
$compose = array('receiver' => '', 'friend' => '', 'subject' => $subject, 'body' => '', 'save_outbox' => 1, 'send_self' => 0);
if (isset($query['1']) && $query['1'] != '') {
    $valid = new VValidation();
    if ($valid->usernameExists($query['1'])) {
        $compose['receiver'] = $query['1'];
    }
}
if (isset($_POST['send_mail'])) {
    $valid = new VValidation();
    $receiver = $filter->get('receiver');
    $friend = $filter->get('receiver_friend');
    $subject = $filter->get('subject');
    $body = $filter->process(trim($_POST['body']), array('a'), array('href'));
    if ($receiver == '') {
        if ($friend != '') {
开发者ID:ecr007,项目名称:pr0n,代码行数:31,代码来源:compose.php

示例8: die

<?php

defined('_VALID') or die('Restricted Access!');
Auth::checkAdmin();
//include($config['BASE_DIR'].'/include/function_conversions.php');
if (isset($_POST['submit_media_mp4'])) {
    $filter = new VFilter();
    //config settings
    $hd_convert = $filter->get('hd_convert', 'INTEGER');
    //db settings
    $condition_value = $filter->get('condition_value', 'INTEGER');
    $hd_ovc_profile = $filter->get('hd_ovc_profile');
    $hd_resize_base = $filter->get('hd_resize_base');
    $hd_resize_width = $filter->get('hd_resize_width', 'INTEGER');
    $hd_resize_height = $filter->get('hd_resize_height', 'INTEGER');
    $hd_ref_bitrate = $filter->get('hd_ref_bitrate', 'INTEGER');
    $hd_ref_type = $filter->get('hd_ref_type');
    $hd_blackbars = $filter->get('hd_blackbars', 'INTEGER');
    $hd_encodepass = $filter->get('hd_encodepass', 'INTEGER');
    $hd_audio_sampling = $filter->get('hd_audio_sampling', 'INTEGER');
    $hd_audio_bitrate = $filter->get('hd_audio_bitrate', 'INTEGER');
    //prep
    $hd_ovc_profile = $hd_ovc_profile == '' ? 'standard' : $hd_ovc_profile;
    $hd_resize_base = $hd_resize_base == '' ? 'both' : $hd_resize_base;
    $hd_resize_width = $hd_resize_width == '' ? '640' : $hd_resize_width;
    $hd_resize_height = $hd_resize_height == '' ? '480' : $hd_resize_height;
    $hd_ref_bitrate = $hd_ref_bitrate == '' ? '1500' : $hd_ref_bitrate;
    $hd_ref_type = $hd_ref_type == '' ? 'standard' : $hd_ref_type;
    $hd_encodepass = $hd_encodepass == '1' ? '1' : '2';
    $hd_blackbars = $hd_blackbars == '0' ? '0' : '1';
    $hd_audio_sampling = $hd_audio_sampling == '' ? '48000' : $hd_audio_sampling;
开发者ID:humor-zo,项目名称:chaofan,代码行数:31,代码来源:mp4.php

示例9: die

<?php

defined('_VALID') or die('Restricted Access!');
Auth::checkAdmin();
if (isset($_POST['submit_media_mp4'])) {
    $filter = new VFilter();
    //db settings
    $flv_ovc_profile = $filter->get('flv_ovc_profile');
    $flv_resize_base = $filter->get('flv_resize_base');
    $flv_resize_width = $filter->get('flv_resize_width', 'INTEGER');
    $flv_resize_height = $filter->get('flv_resize_height', 'INTEGER');
    $flv_ref_bitrate = $filter->get('flv_ref_bitrate', 'INTEGER');
    $flv_ref_type = $filter->get('flv_ref_type');
    $flv_blackbars = $filter->get('flv_blackbars', 'INTEGER');
    $flv_encodepass = $filter->get('flv_encodepass', 'INTEGER');
    $flv_audio_sampling = $filter->get('flv_audio_sampling', 'INTEGER');
    $flv_audio_bitrate = $filter->get('flv_audio_bitrate', 'INTEGER');
    //prep
    $flv_ovc_profile = $flv_ovc_profile == '' ? 'standard' : $flv_ovc_profile;
    $flv_resize_base = $flv_resize_base == '' ? 'both' : $flv_resize_base;
    $flv_resize_width = $flv_resize_width == '' ? '480' : $flv_resize_width;
    $flv_resize_height = $flv_resize_height == '' ? '320' : $flv_resize_height;
    $flv_ref_bitrate = $flv_ref_bitrate == '' ? '1500' : $flv_ref_bitrate;
    $flv_ref_type = $flv_ref_type == '' ? 'standard' : $flv_ref_type;
    $flv_encodepass = $flv_encodepass == '1' ? '1' : '2';
    $flv_blackbars = $flv_blackbars == '0' ? '0' : '1';
    $flv_audio_sampling = $flv_audio_sampling == '' ? '48000' : $flv_audio_sampling;
    $flv_audio_bitrate = $flv_audio_bitrate == '' ? '128' : $flv_audio_bitrate;
    if ($flv_ref_bitrate == '') {
        $errors[] = 'Video Bit-rate for converted videos cannot be left blank!';
    } elseif (!is_numeric($flv_ref_bitrate)) {
开发者ID:ecr007,项目名称:pr0n,代码行数:31,代码来源:flv.php

示例10: die

<?php

defined('_VALID') or die('Restricted Access!');
if ($config['game_module'] == '0') {
    die;
}
require $config['BASE_DIR'] . '/classes/filter.class.php';
require $config['BASE_DIR'] . '/include/adodb/adodb.inc.php';
require $config['BASE_DIR'] . '/include/compat/json.php';
require $config['BASE_DIR'] . '/include/dbconn.php';
$data = array('msg' => '', 'status' => 0, 'debug' => '');
if (isset($_POST['parent_id']) && isset($_POST['comment_id'])) {
    if (isset($_SESSION['uid'])) {
        $filter = new VFilter();
        $uid = intval($_SESSION['uid']);
        $cid = $filter->get('comment_id', 'INTEGER');
        $gid = $filter->get('parent_id', 'INTEGER');
        $sql = "DELETE FROM game_comments WHERE UID = " . $uid . " AND GID = " . $gid . " AND CID = " . $cid . " LIMIT 1";
        $conn->execute($sql);
        if ($conn->Affected_Rows() == 1) {
            $data['status'] = 1;
            $sql = "UPDATE game SET total_comments = total_comments-1 WHERE GID = " . $gid . " LIMIT 1";
            $conn->execute($sql);
            $data['msg'] = $lang['ajax.comment_delete_success'];
        } else {
            $data['msg'] = $lang['ajax.comment_delete_failed'];
        }
    } else {
        $data['msg'] = $lang['ajax.comment_delete_login'];
    }
} else {
开发者ID:humor-zo,项目名称:chaofan,代码行数:31,代码来源:game_comment_delete.php

示例11: die

defined('_VALID') or die('Restricted Access!');
require $config['BASE_DIR'] . '/classes/auth.class.php';
require $config['BASE_DIR'] . '/classes/filter.class.php';
if ($config['blog_module'] == '0') {
    VRedirect::go($config['BASE_URL'] . '/error/page_invalid');
}
$auth = new Auth();
$auth->check();
$uid = intval($_SESSION['uid']);
$username = $_SESSION['username'];
$blog_title = NULL;
$blog_content = NULL;
if (isset($_POST['blog_add_submit'])) {
    $filter = new VFilter();
    $title = $filter->get('blog_title');
    $content = $_POST['blog_content'];
    if ($title == '') {
        $errors[] = $lang['blog.edit_title_empty'];
        $err['title'] = 1;
    } elseif (strlen($title) > 100) {
        $errors[] = $lang['blog.edit_title_big'];
        $err['title'] = 1;
    } else {
        $blog_title = $title;
    }
    if ($content == '') {
        $errors[] = $lang['blog.edit_content_empty'];
        $err['content'] = 1;
    } elseif (strlen($content) > 3000) {
        $errors[] = $lang['blog.edit_content_big'];
开发者ID:humor-zo,项目名称:chaofan,代码行数:30,代码来源:add.php

示例12: VFilter

    die;
}
if (isset($_POST['add_photos_submit'])) {
    $photos = 0;
    $filter = new VFilter();
    $image = new VImageConv();
    foreach ($_FILES as $key => $values) {
        if ($values['tmp_name'] != '') {
            if (is_uploaded_file($values['tmp_name']) && ($check = getimagesize($values['tmp_name']))) {
                $ext = strtolower(substr($values['name'], strrpos($values['name'], '.') + 1));
                if (!check_image($values['tmp_name'], $ext)) {
                    continue;
                }
                $photo_expl = explode('_', $key);
                $photo_nr = $photo_expl['1'];
                $caption = $filter->get('caption_' . $photo_nr);
                $sql_add = NULL;
                if ($caption != '') {
                    $sql_add = ", caption = '" . mysql_real_escape_string($caption) . "'";
                }
                $sql = "INSERT INTO photos SET AID = " . $aid . $sql_add;
                $conn->execute($sql);
                $photo_id = mysql_insert_id();
                $src = $values['tmp_name'];
                $dst = $config['BASE_DIR'] . '/media/photos/tmb/' . $photo_id . '.jpg';
                list($width, $height) = getimagesize($src);
                $crop_w = min($width, $height);
                $crop_h = $crop_w;
                if ($width > $height) {
                    $crop_x = floor(($width - $crop_w) / 2);
                    $crop_y = 0;
开发者ID:humor-zo,项目名称:chaofan,代码行数:31,代码来源:addphotos.php

示例13: constructQuery

function constructQuery()
{
    global $smarty;
    $query = array();
    $query_count = "SELECT COUNT(f.UID) AS total_users FROM signup AS u, users_flags AS f WHERE f.UID = u.UID";
    $query_select = "SELECT u.*, f.RID, f.reason, f.message, f.addtime, f.flag_id\n                           FROM signup AS u, users_flags AS f\n                           WHERE f.UID = u.UID";
    $query_option = array();
    $option_orig = array('username' => '', 'email' => '', 'country' => '', 'name' => '', 'gender' => '', 'relation' => '', 'sort' => 'u.UID', 'order' => 'DESC', 'display' => 10);
    $all = isset($_GET['all']) ? intval($_GET['all']) : 0;
    if ($all == 1) {
        unset($_SESSION['search_users_option']);
    }
    $option = isset($_SESSION['search_users_flagged_option']) ? $_SESSION['search_users_flagged_option'] : $option_orig;
    if (isset($_POST['search_videos'])) {
        global $config;
        require $config['BASE_DIR'] . '/classes/filter.class.php';
        $filter = new VFilter();
        $option['username'] = $filter->get('username');
        $option['email'] = $filter->get('email');
        $option['country'] = $filter->get('country');
        $option['name'] = $filter->get('name');
        $option['gender'] = $filter->get('gender');
        $option['relation'] = $filter->get('relation');
        $option['sort'] = $filter->get('sort');
        $option['order'] = $filter->get('order');
        $option['display'] = $filter->get('display', 'INTEGER');
        if ($option['username'] != '') {
            $query_option[] = " AND u.username LIKE '%" . mysql_real_escape_string($option['username']) . "%'";
        }
        if ($option['email'] != '') {
            $query_option[] = " AND u.email LIKE '%" . mysql_real_escape_string($option['email']) . "%'";
        }
        if ($option['country'] != '') {
            $query_option[] = " AND u.country LIKE '%" . mysql_real_escape_string($option['country']) . "%'";
        }
        if ($option['name'] != '') {
            $query_option[] = " AND ( u.fname LIKE '%" . mysql_real_escape_string($option['name']) . "%' OR u.lname LIKE '%" . mysql_real_escape_string($option['name']) . "%'";
        }
        if ($option['gender'] != '') {
            $query_option[] = " AND u.gender = '" . mysql_real_escape_string($option['gender']) . "'";
        }
        if ($option['relation'] != '') {
            $query_option[] = " AND u.relation = '" . mysql_real_escape_string($option['relation']) . "'";
        }
        $_SESSION['search_users_flagged_option'] = $option;
    }
    $query_option[] = " ORDER BY " . $option['sort'] . " " . $option['order'];
    $query['select'] = $query_select . implode(' ', $query_option);
    $query['count'] = $query_count . implode(' ', $query_option);
    $query['page_items'] = $option['display'];
    $smarty->assign('option', $option);
    return $query;
}
开发者ID:humor-zo,项目名称:chaofan,代码行数:53,代码来源:flagged.php

示例14: die

defined('_VALID') or die('Restricted Access!');
require $config['BASE_DIR'] . '/classes/auth.class.php';
require $config['BASE_DIR'] . '/classes/filter.class.php';
if ($config['blog_module'] == '0') {
    VRedirect::go($config['BASE_URL'] . '/error/page_invalid');
}
$auth = new Auth();
$auth->check();
$uid = intval($_SESSION['uid']);
$username = $_SESSION['username'];
$blog_title = NULL;
$blog_content = NULL;
if (isset($_POST['blog_edit_submit'])) {
    $filter = new VFilter();
    $title = $filter->get('blog_title');
    $content = $filter->get('blog_content');
    if ($title == '') {
        $errors[] = $lang['blog.edit_title_empty'];
        $err['title'] = 1;
    } elseif (strlen($title) > 100) {
        $errors[] = $lang['blog.edit_title_big'];
        $err['title'] = 1;
    } else {
        $blog_title = $title;
    }
    if ($content == '') {
        $errors[] = $lang['blog.edit_content_empty'];
        $err['content'] = 1;
    } elseif (strlen($content) > 3000) {
        $errors[] = $lang['blog.edit_content_big'];
开发者ID:humor-zo,项目名称:chaofan,代码行数:30,代码来源:edit.php

示例15: die

<?php

defined('_VALID') or die('Restricted Access!');
require $config['BASE_DIR'] . '/classes/filter.class.php';
$filter = new VFilter();
$mail_id = $filter->get('id', 'INTEGER', 'GET');
if (!$mail_id) {
    VRedirect::go($config['BASE_URL'] . '/error/mail_missing');
}
$sql = "SELECT m.mail_id, m.sender, m.receiver, m.subject, m.body, s.photo, s.gender\n               FROM mail AS m, signup AS s\n               WHERE ( m.sender = '" . mysql_real_escape_string($username) . "' OR m.receiver = '" . mysql_real_escape_string($username) . "' )\n               AND m.mail_id = " . $mail_id . " AND m.sender = s.username AND m.status = '1'\n               LIMIT 1";
$rs = $conn->execute($sql);
if (!$conn->Affected_Rows()) {
    VRedirect::go($config['BASE_URL'] . '/error/mail_missing');
}
$mail = $rs->getrows();
$mail = $mail['0'];
$sql = "UPDATE mail SET readed = '1' WHERE mail_id = " . $mail_id . " LIMIT 1";
$conn->execute($sql);
$smarty->assign('mail', $mail);
开发者ID:ecr007,项目名称:pr0n,代码行数:19,代码来源:read.php


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