Empty commit

This commit is contained in:
Git 2013-10-18 08:00:55 +00:00
parent 7b2b81dd0f
commit c2c3a83ea0
5 changed files with 46 additions and 37 deletions

View File

@ -770,6 +770,14 @@ CREATE TABLE `requests_votes` (
KEY `Bounty` (`Bounty`)
) ENGINE=InnoDB CHARSET utf8;
CREATE TABLE `sacrifice` (
`UserID` int(10) NOT NULL,
`Time` datetime NOT NULL,
`Sacrifice1` text NOT NULL,
`Sacrifice2` text NOT NULL,
`IsValid` tinyint(4) NOT NULL
) ENGINE=InnoDB CHARSET utf8;
CREATE TABLE `schedule` (
`NextHour` int(2) NOT NULL DEFAULT '0',
`NextDay` int(2) NOT NULL DEFAULT '0',
@ -982,7 +990,8 @@ CREATE TABLE `staff_answers` (
`UserID` int(10) NOT NULL,
`Answer` mediumtext,
`Date` datetime NOT NULL,
PRIMARY KEY (`QuestionID`,`UserID`)
PRIMARY KEY (`QuestionID`,`UserID`),
KEY `UserID` (`UserID`)
) ENGINE=InnoDB CHARSET utf8;
CREATE TABLE `staff_blog` (
@ -1019,7 +1028,9 @@ CREATE TABLE `staff_pm_conversations` (
`Date` datetime DEFAULT NULL,
`Unread` tinyint(1) DEFAULT NULL,
`ResolverID` int(11) DEFAULT NULL,
PRIMARY KEY (`ID`)
PRIMARY KEY (`ID`),
KEY `StatusAssigned` (`Status`,`AssignedToUser`),
KEY `StatusLevel` (`Status`,`Level`)
) ENGINE=InnoDB CHARSET utf8;
CREATE TABLE `staff_pm_messages` (

View File

@ -1,15 +1,10 @@
<?
include(SERVER_ROOT.'/classes/text.class.php');
$Text = new TEXT(true);
$ID = (int) $_POST['id'];
$ID = (int)$_GET['id'];
if (empty($ID)) {
die();
}
$UserID = (int) $_POST['userid'];
$Text = new TEXT(true);
$UserID = (int)$_GET['userid'];
$UserIDSQL = "";
if (!empty($UserID)) {
$UserIDSQL = " AND UserID != '$UserID' ";
@ -17,11 +12,8 @@
G::$DB->query("SELECT UserID, Answer, Date FROM staff_answers WHERE QuestionID = '$ID' $UserIDSQL ORDER BY DATE DESC");
$Answers = G::$DB->to_array();
?>
<div id="responses_for_<?=$ID?>" style="margin-left: 20px;">
<? foreach($Answers as $Answer) { ?>
$Answers = G::$DB->to_array(MYSQLI_ASSOC);
foreach($Answers as $Answer) { ?>
<div class="box box2">
<div class="head">
<span>
@ -33,4 +25,3 @@
</div>
</div>
<? } ?>
</div>

View File

@ -555,7 +555,7 @@ function filelist($Str) {
$Reported = false;
unset($ReportedTimes);
$Reports = $Cache->get_value('reports_torrent_'.$TorrentID);
$Reports = $Cache->get_value("reports_torrent_$TorrentID");
if ($Reports === false) {
$DB->query("
SELECT r.ID,
@ -573,7 +573,11 @@ function filelist($Str) {
if (count($Reports) > 0) {
$Reported = true;
include(SERVER_ROOT.'/sections/reportsv2/array.php');
$ReportInfo = "\n<table class=\"reportinfo_table\">\n\t<tr class=\"colhead_dark\" style=\"font-weight: bold;\">\n\t\t<td>This torrent has ".count($Reports).' active '.(count($Reports) > 1 ? 'reports' : 'report').":</td>\n\t</tr>";
$ReportInfo = '
<table class="reportinfo_table">
<tr class="colhead_dark" style="font-weight: bold;">
<td>This torrent has '.count($Reports).' active '.(count($Reports) > 1 ? 'reports' : 'report').":</td>
</tr>";
foreach ($Reports as $Report) {
list($ReportID, $ReporterID, $ReportType, $ReportReason, $ReportedTime) = $Report;

View File

@ -37,7 +37,8 @@
/* uTorrent Remote and various scripts redownload .torrent files periodically.
To prevent this retardation from blowing bandwidth etc., let's block it
if the .torrent file has been downloaded four times before */
if ((strpos($_SERVER['HTTP_USER_AGENT'], 'BTWebClient') !== false || strpos($_SERVER['HTTP_USER_AGENT'], 'Python-urllib') !== false)) {
$ScriptUAs = array('BTWebClient*', 'Python-urllib*', 'python-requests*');
if (Misc::in_array_partial($_SERVER['HTTP_USER_AGENT'], $ScriptUAs)) {
$DB->query("
SELECT 1
FROM users_downloads

View File

@ -1,13 +1,12 @@
$(document).ready(function() {
var open_responses =
$(".answer_link").click(function(e) {
e.preventDefault();
id = this.id;
var id = this.id;
$("#answer" + id).gtoggle();
});
$(".submit_button").click(function(e) {
id = this.id;
var id = this.id;
$.ajax({
type : "POST",
url : "questions.php?action=take_answer_question",
@ -25,10 +24,13 @@ $(document).ready(function() {
$(".view_responses").click(function(e) {
e.preventDefault();
id = this.id;
if ($("#responses_for_" + id).length == 0) {
var id = this.id;
var respDiv = $("#responses_for_" + id);
if (respDiv.length == 0) {
respDiv = $('<div id="responses_for_' + id + '" style="display: none; margin-left: 20px;"></div>');
$("#question" + id).after(respDiv);
$.ajax({
type : "POST",
type : "GET",
url : "questions.php?action=ajax_get_answers",
dataType : "html",
data : {
@ -36,10 +38,10 @@ $(document).ready(function() {
"userid" : $(this).data("gazelle-userid")
}
}).done(function(response) {
$("#question" + id).after(response);
respDiv.html(response).show();
});
} else {
$("#responses_for_" + id).remove();
respDiv.toggle();
}
});
});