示例#1
0
文件: vote.php 项目: nerfqxx/wowqxweb
");
								</SCRIPT>
								<?php 
        }
        if (mysql_num_rows($check) > 0) {
            $last_vote = mysql_fetch_assoc($check);
            $whenIcanvote = strtotime($last_vote['date']) + 12 * 60 * 60;
            // + 12 Hours
            if (time() >= $whenIcanvote) {
                vote();
                $voted = 1;
            } else {
                $voted = 0;
            }
        } else {
            vote();
            $voted = 1;
        }
        echo '					
								<div class="subsection">
									<div class="middle">';
        if ($voted == 1) {
            echo '!!!';
        } else {
            echo '??!';
        }
        echo '
									</div>
									<div class="right">
										<h2 class="caption">' . $Vote['Vote21'] . '</h2>';
        if ($voted == 1) {
示例#2
0
<?php

define('PUN_ROOT', './');
require PUN_ROOT . 'include/common.php';
if (!$pun_user['g_read_board']) {
    message($lang_common['No view']);
}
$to = isset($_GET['to']) ? intval($_GET['to']) : 0;
if ($to > 0) {
    echo vote($to, intval($_GET['vote']));
    exit;
}
$id = isset($_GET['id']) ? intval($_GET['id']) : 0;
if ($id < 1) {
    message($lang_common['Bad request']);
}
$q = $db->fetch_row($db->query('
    SELECT COUNT(1), (SELECT COUNT(1) FROM `' . $db->prefix . 'karma` WHERE `vote` = "-1" AND `to` = ' . $id . ') FROM `' . $db->prefix . 'karma` WHERE `vote` = "1" AND `to` = ' . $id));
$karma['plus'] = intval($q[0]);
$karma['minus'] = intval($q[1]);
$karma['karma'] = $karma['plus'] - $karma['minus'];
unset($q);
$num_hits = $karma['plus'] + $karma['minus'];
$num_pages = ceil($num_hits / $pun_user['disp_posts']);
$p = !isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $num_pages ? 1 : $_GET['p'];
$start = ($p - 1) * $pun_user['disp_posts'];
if (isset($_GET['action']) && $_GET['action'] == 'all') {
    $p = $num_pages + 1;
    $pun_user['disp_posts'] = $num_hits;
    $start = 0;
}
示例#3
0
文件: poll.php 项目: Blaz3r/webSPELL
            } else {
                $isintern = '';
            }
            $title = $ds['titel'];
            eval("\$poll_head = \"" . gettemplate("poll_head") . "\";");
            echo $poll_head;
            for ($n = 1; $n <= 10; $n++) {
                if ($ds['o' . $n]) {
                    $options[] = $ds['o' . $n];
                }
            }
            $n = 1;
            foreach ($options as $option) {
                $option = $option;
                eval("\$poll_content = \"" . gettemplate("poll_content") . "\";");
                echo $poll_content;
                $n++;
            }
            $pollID = $ds['pollID'];
            eval("\$poll_foot = \"" . gettemplate("poll_foot") . "\";");
            echo $poll_foot;
        }
    } else {
        echo $_language->module['no_active_poll'] . '<br /><br />&#8226; <a href="index.php?site=polls">' . $_language->module['show_polls'] . '</a>';
    }
}
if (!isset($pollID)) {
    $pollID = '';
}
vote($pollID);
示例#4
0
    $rounds = array();
    for ($i = 1; $i <= 6; $i++) {
        array_push($rounds, $i);
    }
    foreach ($rounds as $roundvalue) {
        if ($roundvalue == $round) {
            echo '<option value="' . $roundvalue . '" selected="' . $roundvalue . '"> Round ' . $roundvalue . '</option>' . "\n";
        } else {
            echo '<option value="' . $roundvalue . '"> Round ' . $roundvalue . '</option>' . "\n";
        }
    }
    ?>
			</select>
		</center>
		<br>
			</form>
<?php 
    echo "<div class=\"center\"><strong>Round " . $round . "</strong></div>";
    if ($action == "view") {
        view_matches($round);
    } elseif ($action == "write") {
        vote($match, $band, true, $round);
    } elseif ($action == "close") {
        close_match($match, $round);
    }
    ?>
  </div>
</div> <!-- end of row div -->
<?php 
}
require "partials/_footer.php";
示例#5
0
<?php

define('DarkCoreCMS', TRUE);
include 'config.php';
include 'functions/vote_functions.php';
include 'functions/global_functions.php';
if (isset($_GET['user']) && isset($_GET['siteid'])) {
    $user = $_GET['user'];
    $siteid = $_GET['siteid'];
    $site_data = getSite_data_byID($siteid);
    if (isset($site_data['postback']) && $site_data['postback'] != NULL) {
        header('Location: ' . $site_data['link'] . $site_data['postback'] . $user);
    } else {
        $do_vote = vote($user, $siteid);
        if ($do_vote != 0) {
            $date = new DateTime();
            $cur_time = $date->getTimestamp();
            $day_number = idate('w', $cur_time);
            if ($day_number == 6 || $day_number == 0) {
                add_points($user, $site_data['end_week_points']);
            } else {
                add_points($user, $site_data['points']);
            }
            header('Location: ../user?done=1');
        }
        header('Location: ' . $site_data['link']);
    }
} else {
    header('Location: ../');
}
示例#6
0
$expression = $winduid ? 'v.uid=' . pwEscape($winduid) : 'v.username='******'modify' && !$readvote['modifiable']) {
    Showmsg('vote_not_modify');
}
$voters = $readvote['voters'];
$special = 'read_vote';
$vote_close = $read['state'] || $readvote['timelimit'] && $timestamp - $read['postdate'] > $readvote['timelimit'] * 86400 ? 1 : 0;
$tpc_date = get_date($read['postdate']);
$tpc_endtime = $readvote['timelimit'] ? get_date($read['postdate'] + $readvote['timelimit'] * 86400) : 0;
$regdatelimit = $readvote['regdatelimit'] ? get_date($readvote['regdatelimit'], 'Y-m-d') : '';
$creditlimit = !empty($readvote['creditlimit']) ? unserialize($readvote['creditlimit']) : '';
if ($creditlimit) {
    require_once R_P . 'require/credit.php';
}
vote($readvote);
function vote($readvote)
{
    global $db, $votetype, $ifview, $votedb, $votesum, $action, $viewvoter, $tid, $admincheck, $vote_close;
    $votearray = unserialize($readvote['voteopts']);
    $votetype = $readvote['multiple'] ? 'checkbox' : 'radio';
    $votesum = 0;
    $votedb = $voter = array();
    $ifview = $viewvoter == 'yes' ? 'no' : 'yes';
    foreach ($votearray as $key => $option) {
        $votesum += $option[1];
    }
    if ($viewvoter == 'yes') {
        $query = $db->query("SELECT username,vote FROM pw_voter WHERE tid=" . pwEscape($tid) . " LIMIT 500");
        while ($rt = $db->fetch_array($query)) {
            $voter[$rt['vote']] .= "<span class=bold>{$rt['username']}</span>" . ' ';
示例#7
0
 case 'editqueue':
     if (isset($_SESSION['logged_in']) && $_SESSION['level'] <= USER_ADMIN) {
         edit_quote($page[0], $page[1], $page[2]);
     }
     break;
 case 'users':
     if (isset($_SESSION['logged_in']) && $_SESSION['level'] <= USER_SUPERUSER) {
         edit_users($page[1], $page[2]);
     }
     break;
 case 'ajaxvote':
 case 'vote':
     if (isset($CONFIG['login_required']) && $CONFIG['login_required'] == 1 && !isset($_SESSION['logged_in'])) {
         break;
     }
     vote($page[1], $page[2], $page[0] === 'ajaxvote');
     break;
 case 'voters':
     if (isset($_SESSION['logged_in']) && $_SESSION['level'] <= USER_ADMIN) {
         show_quote_voters($page[1]);
     }
     break;
 case 'reorder':
     if (isset($_SESSION['logged_in']) && $_SESSION['level'] <= USER_SUPERUSER) {
         reorder_quotes();
     }
     break;
 case 'spam':
     if (isset($_SESSION['logged_in']) && $_SESSION['level'] <= USER_ADMIN) {
         show_spam();
     }
示例#8
0
        }
        // menue
        // set hide menue
        if (isset($_GET["h"])) {
            $_SESSION['h'] = $_GET["h"];
        }
        $menue = menue();
        $log = menue2();
        // user and programm
        $user = $db->real_escape_string($_SESSION['us']);
        $programm = "";
        if (isset($_GET["p"])) {
            $programm = $_GET["p"];
        }
        // save vote
        vote($db);
        // which fotos & display
        $uploader = next_foto($db, $programm);
        // menue with settings
        $settings = menue3();
    }
    // end logged in
    $db->close();
}
?>

</head>
<body>
	<center>
<?php 
// if menue
示例#9
0
    $fromUsername = $postObj->FromUserName;
    $toUsername = $postObj->ToUserName;
    $form_MsgType = $postObj->MsgType;
    $msgid = $postObj->MsgId;
    if ($form_MsgType == "event") {
        $form_Event = $postObj->Event;
        if ($form_Event == "subscribe") {
            $contentStr = "感谢您关注抵抗组织助手!\n游戏介绍请点击http://45.118.133.173/resistance.jpg\n输入“帮助”获取游戏指南。";
            $resultStr = sprintf($textTpl, $fromUsername, $toUsername, time(), $contentStr);
            echo $resultStr;
            exit;
        }
    } elseif ($form_MsgType == "text") {
        $form_content = trim($postObj->Content);
        if (preg_match($pattern_vote, $form_content)) {
            $feedback = vote($form_content, $fromUsername, $msgid);
        } elseif (preg_match($pattern_create, $form_content)) {
            $feedback = create($form_content, $fromUsername);
        } elseif (preg_match($pattern_room, $form_content)) {
            $feedback = room($form_content, $fromUsername);
        } else {
            $feedback = command($form_content, $fromUsername);
        }
        $resultStr = sprintf($textTpl, $fromUsername, $toUsername, time(), $feedback);
        echo $resultStr;
        exit;
    }
} else {
    echo "";
    exit;
}
示例#10
0
文件: name.php 项目: rexsuecia/nameit
    }
    return $result;
}
if (isset($_GET["suggestion"])) {
    $suggestion = $_GET["suggestion"];
    $motivation = "";
    $verification = "";
    if (isset($_GET["motivation"])) {
        $motivation = $_GET["motivation"];
    }
    if (isset($verification)) {
        $verification = $_GET["verification"];
    } else {
        header("Content-Type: application/json;charset=utf-8");
        die(json_encode(array("error" => "Missing validation")));
    }
    header("Content-Type: application/json;charset=utf-8");
    echo json_encode(array("result" => addSuggestion($suggestion, $verification, $motivation)));
}
if (isset($_GET["list"])) {
    header("Content-Type: application/json;charset=utf-8");
    echo json_encode(getSuggestions());
}
if (isset($_GET["vote"])) {
    header("Content-Type: application/json;charset=utf-8");
    echo json_encode(vote(filter_var($_GET["id"], FILTER_SANITIZE_NUMBER_INT)));
}
if (isset($_GET["votes"])) {
    header("Content-Type: application/json;charset=utf-8");
    echo json_encode(getVotes());
}
示例#11
0
文件: index.php 项目: nopuls/dzcp
                     $index = info(_vote_successful, "?action=show&amp;id=" . $_GET['id'] . "");
                 }
             }
             if (isset($userid)) {
                 $cookie = $userid;
             } else {
                 $cookie = "voted";
             }
         }
         set_cookie($prev . "vid_" . $_GET['id'], $cookie);
     }
 }
 if ($_GET['ajax'] == 1) {
     header("Content-type: text/html; charset=utf-8");
     include basePath . '/inc/menu-functions/vote.php';
     echo '<table class="navContent" cellspacing="0">' . vote(1) . '</table>';
     exit;
 }
 if ($_GET['what'] == "fvote") {
     if (empty($_POST['vote'])) {
         $index = error(_vote_no_answer);
     } else {
         $qry = db("SELECT * FROM " . $db['votes'] . "\n                 WHERE id = '" . intval($_GET['id']) . "'");
         $get = _fetch($qry);
         if (ipcheck("vid_" . $_GET['id'])) {
             $index = error(_error_voted_again, 1);
         } elseif ($get['closed'] == 1) {
             $index = error(_error_vote_closed, 1);
         } else {
             if (isset($userid)) {
                 $time = $userid;
示例#12
0
<?php

session_start();
require_once 'fns.php';
//投票业务逻辑处理
//从投票页面得到的变量
$username = $_SESSION['username'];
$user_id = get_user_id($username);
$opt = $_POST;
foreach ($opt as $key => $value) {
    // echo $key." and ".$value."<br>";
    $topic_id = $key;
    $ABC = $value;
    if (!is_user_voted($user_id, $topic_id)) {
        vote($user_id, $topic_id);
        //实现在user_topic表中添加项目,记录选票信息
        add_vote($topic_id, $ABC);
        //在opt表中实现选票数的增加
    } else {
        // do_html_header('投票失败');
        echo $topic_id . "号问题你已经投过票了,不能再投了" . "<br>";
        // do_html_URL('user_main.php','返回主界面');
        // do_html_footer();
        // exit;
    }
}
do_html_header('投票完成');
echo "投票完成!" . "<br>";
do_html_URL('user_main.php', '返回主界面');
do_html_footer();
?>
示例#13
0
<?php

define('DarkCoreCMS', TRUE);
include 'config.php';
include 'functions/vote_functions.php';
include 'functions/global_functions.php';
if (isset($_POST['pbid'])) {
    $site_data = getSite_data_byID(4);
    $do_vote = vote($_POST['pbid'], $_GET['siteid']);
    if ($day_number == 6 || $day_number == 0) {
        add_points($_POST['pbid'], $site_data['end_week_points']);
    } else {
        add_points($_POST['pbid'], $site_data['points']);
    }
} else {
    header('Location: ../');
}
示例#14
0
        echo "checked";
    }
    ?>
> 활성화
     <input type="radio" name="chk_info" value="off" <?php 
    if ($activation[0][0] == 2) {
        echo "checked";
    }
    ?>
> 비활성화 
     <input type="submit" value="Save" /><br /><br />
    </form>
    <?php 
    $radio = $_POST['chk_info'];
    if ($radio == 'off') {
        vote('admin', 1000);
    } else {
        if ($radio == 'on') {
            voteRESET();
        }
    }
    $activation = dietwar_status();
    ?>
    <div id="myCarousel" class="carousel slide" data-ride="carousel">
    <!-- Indicators -->
    <ol class="carousel-indicators">
      <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
      <?php 
    for ($i = 1; $i < $file_count; $i++) {
        ?>
          <li data-target="#myCarousel" data-slide-to="<?php 
示例#15
0
文件: vote.php 项目: bgianfo/rit-qdb
<?php

include "inc/config.php";
$id = filter_input(INPUT_POST, 'id', FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH | FILTER_FLAG_ENCODE_LOW);
if (is_null($id)) {
    die("The id is required");
} else {
    echo "Id:{$id}";
}
vote($id);
//$json_array = array('result'=>'test_okay');
//echo json_encode($json_array); exit;
require_once '../../../hotaru_settings.php';
require_once '../../../Hotaru.php';
// Not the cleanest way of getting to the root...
$h = new Hotaru();
$h->start();
$h->includeLanguage('vote', 'vote');
if ($h->cage->post->keyExists('post_id')) {
    $post_id = $h->cage->post->testInt('post_id');
    $vote_rating = $h->cage->post->testInt('rating');
    $user_ip = $h->cage->server->testIp('REMOTE_ADDR');
    $referer = $h->cage->post->testAlnum('referer');
    //get vote settings
    $vote_settings = unserialize($h->getSetting('vote_settings', 'vote'));
    vote($h, $post_id, $vote_rating, $user_ip, $referer, $vote_settings);
}
function vote($h, $post_id, $vote_rating, $user_ip, $referer, $vote_settings)
{
    // Only proceed if the user is logged in
    if (!$h->currentUser->loggedIn) {
        return false;
    }
    $user_id = $h->currentUser->id;
    // get vote history for this post:
    $sql = "SELECT vote_rating FROM " . TABLE_POSTVOTES . " WHERE vote_post_id = %d AND vote_user_id = %d AND vote_rating != %d";
    $voted = $h->db->get_var($h->db->prepare($sql, $post_id, $user_id, -999));
    if ($voted == $vote_rating) {
        // Repeat vote. Must be from a double-click. Return false and
        $json_array = array('result' => $h->lang['vote_already_voted']);
        echo json_encode($json_array);
//echo json_encode($json_array); exit;
require_once '../../../hotaru_settings.php';
require_once '../../../Hotaru.php';
// Not the cleanest way of getting to the root...
$h = new Hotaru();
$h->start();
$h->includeLanguage('updown_voting', 'updown_voting');
if ($h->cage->post->keyExists('post_id')) {
    $post_id = $h->cage->post->testInt('post_id');
    $vote_rating = $h->cage->post->testInt('rating');
    $user_ip = $h->cage->server->testIp('REMOTE_ADDR');
    $undo = false;
    // track whether we're adding a vote or undoing one.
    //get vote settings
    $updown_voting_settings = unserialize($h->getSetting('updown_voting_settings', 'updown_voting'));
    vote($h, $post_id, $vote_rating, $user_ip, $undo, $updown_voting_settings);
}
function vote($h, $post_id, $vote_rating, $user_ip, $undo, $updown_voting_settings)
{
    // Only proceed if the user is logged in
    if (!$h->currentUser->loggedIn) {
        return false;
    }
    $user_id = $h->currentUser->id;
    // get vote history for this post:
    $sql = "SELECT vote_rating FROM " . TABLE_POSTVOTES . " WHERE vote_post_id = %d AND vote_user_id = %d AND vote_rating != %d ORDER BY vote_updatedts DESC LIMIT 1";
    $voted = $h->db->get_var($h->db->prepare($sql, $post_id, $user_id, -999));
    if ($voted == $vote_rating) {
        // Repeat vote. Must be from a double-click. Return false and
        $json_array = array('result' => $h->lang['vote_already_voted']);
        echo json_encode($json_array);
示例#18
0
    case MONTER_REPONSE:
        if (!isset($_GET[NUM1]) || !isset($_GET[NUM2])) {
            $msg = ERROR_CORRUPTED_DATA;
        } else {
            if ($_GET[NUM2] == 1) {
                $msg = ALREADY_FIRST;
            } else {
                $msg = swap_reponse($_GET[NUM1], $_GET[NUM2], $_GET[NUM2] - 1);
            }
        }
        break;
    case VOTER:
        if (!isset($_POST[ID]) || !isset($_POST[REPONSE])) {
            $msg = ERROR_CORRUPTED_DATA;
        } else {
            $msg = vote($_POST[ID], $_POST[REPONSE]);
        }
        break;
    case OPEN_CLOSE:
        if (!isset($_GET[ID])) {
            $msg = ERROR_CORRUPTED_DATA;
        } else {
            $msg = open_close_sondage($_GET[ID]);
        }
        break;
    default:
        $msg = ERROR_CORRUPTED_DATA;
        break;
}
if ($msg != 1) {
    $_SESSION[MESSAGE_ERROR] = $msg;
示例#19
0
function handleVotes()
{
    $array = $_POST;
    if (isset($array["v"]) && isset($array["vs"])) {
        vote($array["vs"], $array["v"]);
    }
}
示例#20
0
$band_id = $_POST['band_id'];
/*----- CONTENT ------*/
?>

<div class="row">
  <div class="twelve columns">
	<a href="madness.php"><img src="images/mrm2016-banner.jpg" alt="Modern Rock Madness 2016" width="930px"></a>
    <div id="mrm_text">
  <p>Download your Modern Rock Madness <?php 
echo date('Y');
?>
 brackets <a href="https://od.lk/d/112332143_x1tm6/YNot_MRM2016_Bracket.pdf">here</a> and listen all week as Y-Not bands go head to head! Help your favorites advance to the next round by voting here, or if you're listening on the go, you can text your votes in to 267-293-YNOT.  Plus get more color commentary on each day's matches by visiting our partner site <a href=" http://www.tristateindie.com/category/y-not-radio/" target="_new">Tri State Indie</a>.</p>
    <p><strong>Want to sponsor a match?</strong> Some are still available <a href="/donate.php">here</a>.</p>
      <div class="social">
        <a href="https://twitter.com/share" class="twitter-share-button" data-text="Tune in now to @YNotRadio's Modern Rock Madness - 64 bands go head to head! #modernrockmadness" data-count="none" data-via="YNotRadio">Tweet</a><script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>
        <div class="fb-like" data-href="http://www.ynotradio.net/madness.php?2016" data-send="true" data-width="450" data-show-faces="false"></div>
      </div>
    </div>
<?php 
if ($band_id && $match_id) {
    vote($match_id, $band_id, false);
}
show_match($current_match['id']);
display_first_row();
display_bracket();
?>

  </div>
</div>
<?php 
require "partials/_footer.php";
示例#21
0
     break;
 case 'edit':
     if (isset($_SESSION['logged_in']) && $_SESSION['level'] <= USER_ADMIN) {
         edit_quote($page[1], $page[2]);
     }
     break;
 case 'users':
     if (isset($_SESSION['logged_in']) && $_SESSION['level'] <= USER_SUPERUSER) {
         edit_users($page[1], $page[2]);
     }
     break;
 case 'vote':
     if (isset($CONFIG['login_required']) && $CONFIG['login_required'] == 1 && !isset($_SESSION['logged_in'])) {
         break;
     }
     vote($page[1], $page[2]);
     break;
 case 'news':
     news_page();
     break;
 default:
     if (preg_match('/^[0-9]+(&[0-9]+)*$/', $_SERVER['QUERY_STRING'])) {
         $idlist = explode('&', $_SERVER['QUERY_STRING']);
         if (count($idlist) < 11) {
             $ids = array();
             $order = array();
             $idx = 0;
             foreach ($idlist as $id) {
                 $ids[] = 'id=' . $db->quote((int) $id);
                 $order[] = 'WHEN ' . $db->quote((int) $id) . ' THEN ' . $idx . ' ';
                 $idx++;
示例#22
0
<?php

require_once '../includes/mysql.php';
if (isset($_POST['action']) && isset($_POST['id']) && isset($_POST['db'])) {
    if ($_POST['action'] == 'up') {
        vote($_POST['db'], $_POST['id'], 1);
    } else {
        vote($_POST['db'], $_POST['id'], -1);
    }
    echo getVoteCount($_POST['db'], $_POST['id']);
}
示例#23
0
文件: vote.php 项目: shoko/vote
<?php

$mainpage = "index.php";
$msg = vote();
echo "<html>";
echo "<head>";
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">';
echo '<meta http-equiv="Refresh" content="5;index.php">';
echo "</head>";
echo "<body>";
echo $msg . "<br><br>";
echo "5秒でもとの";
echo "</body>";
echo "</html>";
exit;
function vote()
{
    $qfile = "data/question.txt";
    $datafile = "data/vote.dat";
    $cookiename = "VOTE";
    if (isset($_COOKIE[$cookiename])) {
        return "二重投稿はご遠慮ください";
    }
    //クッキーのセット
    setcookie($cookiename, "1");
    if (isset($_POST['quest'])) {
        $vote = trim($_POST['quest']);
        //質問ファイルを読み出す
        $n_vote = 0;
        $n_q = 0;
        $fn = fopen($qfile, "r");
示例#24
0
<?php

define('PUN_ROOT', '../');
require_once PUN_ROOT . 'include/common.php';
if (!$pun_user['g_read_board']) {
    wap_message($lang_common['No view']);
}
$to = isset($_GET['to']) ? (int) $_GET['to'] : null;
$id = isset($_GET['id']) ? (int) $_GET['id'] : null;
if (null !== $to) {
    vote($to, (int) @$_GET['vote']);
    $pid = isset($_GET['pid']) ? (int) $_GET['pid'] : null;
    if (null === $pid) {
        $id = $to;
    } else {
        wap_redirect('viewtopic.php?pid=' . $pid . '#p' . $pid);
        exit;
    }
}
// Наличие необходимых данных для работы скрипта
if (null === $id) {
    wap_message($lang_common['Bad request']);
}
$q = 'SELECT `group_id`, `username` ' . 'FROM `' . $db->prefix . 'users` ' . 'WHERE `id` = ' . $id;
$q = $db->query($q) or error('Unable to fetch username', __FILE__, __LINE__, $db->error());
// Если пользователя с таким id нет, то чью карму то показывать?
// Гостей не учитываем.
if (!($user = $db->fetch_assoc($q)) || PUN_GUEST == $user['group_id']) {
    wap_message($lang_common['Bad request']);
}
$subQ = '(SELECT COUNT(1) ' . 'FROM `' . $db->prefix . 'karma` ' . 'WHERE `vote` = "-1" ' . 'AND `to` = ' . $id . ')';
示例#25
0
<?php
if ($showvote == false){
?>
<center>
<div class="errorMsg"><b><?php echo $lang['chat_disable'] ?></b></div>
</center>
<?php
}else{
?>
<?php
initialize_user();
if($max_acc_points_per_day < 0)
	$max_acc_points_per_day = count($tab_sites);

if(isset($_POST["site"]))
	vote((int) $_POST["site"]);

if(isset($_POST["reward"]))
	$reward_message = chose_reward((int) $_POST["reward"]);
else if(isset($_POST["character"]))
	add_char_to_session((int) $_POST["character"]);

?>
<?php echo $lang['vote_desc1']; ?>
<div class="contentdiv">
<style type="text/css">
  div.noErrorMsg { width: 80%; height: 30px; line-height: 30px; font-size: 10pt; border: 2px solid #00ff24; background: #afffa9;}
  div.errorMsg { width: 80%; height: 30px; line-height: 30px; font-size: 10pt; border: 2px solid #e03131; background: #ff9090;}
  td.serverStatus1 { font-weight: bold; border-style: solid; border-width: 0px 1px 1px 0px; border-color: #D8BF95; }
  td.serverStatus2 { border-style: solid; border-width: 0px 1px 1px 0px; border-color: #D8BF95; }
  td.serverStatus3 { border-style: solid; border-width: 0px 1px 1px 0px; border-color: #D8BF95; background-color: #C3AD89; }
示例#26
0
    }
    foreach ($rounds as $roundvalue) {
        if ($roundvalue == $round) {
            echo '<option value="' . $roundvalue . '" selected="' . $roundvalue . '">Round ' . $roundvalue . '</option>' . "\n";
        } else {
            echo '<option value="' . $roundvalue . '">Round ' . $roundvalue . '</option>' . "\n";
        }
    }
    ?>
			</select>
		</center>
		<br>
			</form>
<?php 
    echo "<center><b>Round " . $round . "</b></center>";
    if ($action == "view") {
        view_matches($round);
    } elseif ($action == "write") {
        $match = $_GET['match'];
        $band = $_GET['band'];
        vote($match, $band, $round);
    } elseif ($action == "close") {
        $match = $_GET['match'];
        close_match($match, $round);
    }
    ?>
</div>

<?php 
}
require "ext/footer.php";
示例#27
0
<?php

require_once '../includes/mysql.php';
if (isset($_POST['action']) && isset($_POST['id']) && isset($_POST['db'])) {
    $c = $_POST['action'] == 'up' ? 1 : -1;
    vote($_POST['db'], $_POST['id'], $c);
    echo getVoteCount($_POST['db'], $_POST['id']);
}
示例#28
0
<br>
<?php 
builddiv_start(1, $lang['vote_system']);
// Initiate refresh, 20 seconds default
echo '<meta http-equiv=refresh content="20;url=?p=vote">';
if (isset($_POST["site"])) {
    vote($_POST["site"]);
}
echo $PAGE_DESC;
?>

<div class="contentdiv">
<style type="text/css">
  div.noErrorMsg { width: 80%; height: 30px; line-height: 30px; font-size: 10pt; border: 2px solid #00ff24; background: #afffa9;}
  div.errorMsg { width: 80%; height: 30px; line-height: 30px; font-size: 10pt; border: 2px solid #e03131; background: #ff9090;}
  td.serverStatus1 { font-weight: bold; border-style: solid; border-width: 0px 1px 1px 0px; border-color: #D8BF95; }
  td.serverStatus2 { border-style: solid; border-width: 0px 1px 1px 0px; border-color: #D8BF95; }
  td.serverStatus3 { border-style: solid; border-width: 0px 1px 1px 0px; border-color: #D8BF95; background-color: #C3AD89; }
  td.rankingHeader { color: #C7C7C7; font-size: 10pt; font-family: arial,helvetica,sans-serif; font-weight: bold; background-color: #2E2D2B; border-style: solid; border-width: 1px; border-color: #5D5D5D #5D5D5D #1E1D1C #1E1D1C; padding: 3px;}
</style>

<?php 
write_metalborder_header();
?>
    <table width="100%" cellpadding="3" cellspacing="0">
    <tbody>
        <tr>
            <td class="rankingHeader" colspan="3" align="center" nowrap="nowrap"><?php 
echo $lang['vote_acct_details'];
?>
</td>
示例#29
0
<?php

include_once 'db_connect.php';
include_once 'functions.php';
sec_session_start();
// Our custom secure way of starting a PHP session.
if (login_check($mysqli) == true) {
    ?>
    <?php 
    $poste = $mysqli->query("SELECT * FROM post WHERE grade IN (SELECT grade FROM members WHERE username='******'username']}')");
    while ($row = $poste->fetch_assoc()) {
        if (isset($_POST[str_replace(' ', '', $row['name'])], $_POST['submit'])) {
            $id = $_POST[str_replace(' ', '', $row['name'])];
            if (vote(mysqli_real_escape_string($mysqli, $id), $mysqli) == false) {
                goto end;
            }
        } else {
            // The correct POST variables were not sent to this page.
            error_log("Invalid post variables sent.");
            echo 'Invalid Request';
            exit(1);
        }
    }
    $qry = "UPDATE members SET hasvoted=True WHERE username='******'username']}';";
    $mysqli->query($qry);
    header('Location: vote_pass.php');
    exit(0);
    end:
    header('Location: logout.php');
} else {
    ?>