mirror of
https://github.com/WhatCD/Gazelle.git
synced 2024-12-13 02:46:30 +00:00
Empty commit
This commit is contained in:
parent
a66eae15d6
commit
14e7756f23
@ -58,13 +58,13 @@ function get_file_extension($file_name) {
|
||||
|
||||
function invalid_error($Name) {
|
||||
global $Err;
|
||||
$Err = 'The torrent contained one or more invalid files ('.$Name.')';
|
||||
$Err = 'The torrent contained one or more invalid files ('.display_str($Name).')';
|
||||
|
||||
}
|
||||
|
||||
function forbidden_error($Name) {
|
||||
global $Err;
|
||||
$Err = 'The torrent contained one or more forbidden files ('.$Name.')';
|
||||
$Err = 'The torrent contained one or more forbidden files ('.display_str($Name).')';
|
||||
}
|
||||
|
||||
function character_error() {
|
||||
|
@ -89,7 +89,7 @@ public function connect() {
|
||||
public function error($Msg, $Halt = false) {
|
||||
global $Debug;
|
||||
$ErrorMsg = 'SphinxQL ('.$this->Ident.'): '.strval($Msg);
|
||||
$Debug->analysis('!dev SphinxQL Error', $ErrorMsg, 3600*24);
|
||||
$Debug->analysis('SphinxQL Error', $ErrorMsg, 3600*24);
|
||||
if($Halt === true && (DEBUG_MODE || check_perms('site_debug'))) {
|
||||
echo '<pre>'.display_str($ErrorMsg).'</pre>';
|
||||
die();
|
||||
|
@ -31,7 +31,6 @@
|
||||
</head>
|
||||
<body>
|
||||
<div id="head">
|
||||
<?=($SSL)?'<span>SSL</span>':''?>
|
||||
</div>
|
||||
<table id="maincontent">
|
||||
<tr>
|
||||
|
@ -50,4 +50,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
echo json_encode(array($FullName,$Suggestions,$Snatches,$ArtistIDs));
|
||||
echo json_encode(array(display_str($FullName),$Suggestions,$Snatches,$ArtistIDs));
|
||||
|
@ -45,18 +45,19 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Private Message:</td>
|
||||
<td/>
|
||||
<td>
|
||||
<textarea id="message" style="width: 95%;" tabindex="1" onkeyup="resize('message');" name="privatemessage" cols="90" rows="4"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="label">Edit Post:</td>
|
||||
<td>
|
||||
<textarea id="body" style="width: 95%;" tabindex="1" onkeyup="resize('body');" name="body" cols="90" rows="8"><?=$PostBody?></textarea>
|
||||
<br />
|
||||
<input type="submit" id="submit_button" value="Warn User" tabindex="1" />
|
||||
<input type="submit" id="submit_button" value="Warn User" tabindex="1" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<? show_footer(); ?>
|
||||
|
49
sections/log/sphinx.php
Normal file
49
sections/log/sphinx.php
Normal file
@ -0,0 +1,49 @@
|
||||
<?
|
||||
require(SERVER_ROOT.'/classes/class_sphinxql.php');
|
||||
|
||||
if(!empty($_GET['page']) && is_number($_GET['page'])) {
|
||||
$Page = min(SPHINX_MAX_MATCHES/LOG_ENTRIES_PER_PAGE, $_GET['page']);
|
||||
$Offset = ($Page-1)*LOG_ENTRIES_PER_PAGE;
|
||||
} else {
|
||||
$Page = 1;
|
||||
$Offset = 0;
|
||||
}
|
||||
if(empty($_GET['search']) || trim($_GET['search']) == '') {
|
||||
$Log = $DB->query("SELECT ID, Message, Time FROM log ORDER BY ID DESC LIMIT $Offset, ".LOG_ENTRIES_PER_PAGE);
|
||||
$NumResults = $DB->record_count();
|
||||
if(!$NumResults) {
|
||||
$TotalMatches = 0;
|
||||
} elseif($NumResults == LOG_ENTRIES_PER_PAGE) {
|
||||
// This is a lot faster than SQL_CALC_FOUND_ROWS
|
||||
$SphQL = new SPHINXQL_QUERY();
|
||||
$Result = $SphQL->select('id')->from('log, log_delta')->limit(0, 1, 1)->query();
|
||||
$Debug->log_var($Result, '$Result');
|
||||
$TotalMatches = min(SPHINX_MAX_MATCHES, $Result->get_meta('total_found'));
|
||||
} else {
|
||||
$TotalMatches = $NumResults + $Offset;
|
||||
}
|
||||
$QueryStatus = 0;
|
||||
} else {
|
||||
$Page = min(SPHINX_MAX_MATCHES/TORRENTS_PER_PAGE, $Page);
|
||||
$SphQL = new SPHINXQL_QUERY();
|
||||
$SphQL->select('id')
|
||||
->from('log, log_delta')
|
||||
->where_match($_GET['search'], 'message')
|
||||
->order_by('time', 'DESC')
|
||||
->limit($Offset, LOG_ENTRIES_PER_PAGE, $Offset+LOG_ENTRIES_PER_PAGE);
|
||||
|
||||
$Result = $SphQL->query();
|
||||
$Debug->log_var($Result, '$Result');
|
||||
$Debug->set_flag('Finished SphQL query');
|
||||
if($QueryStatus = $Result->Errno) {
|
||||
$QueryError = $Result->Error;
|
||||
}
|
||||
$NumResults = $Result->get_result_info('num_rows');
|
||||
$TotalMatches = min(SPHINX_MAX_MATCHES, $Result->get_meta('total_found'));
|
||||
if($NumResults > 0) {
|
||||
$LogIDs = $Result->collect('id');
|
||||
$Log = $DB->query("SELECT ID, Message, Time FROM log WHERE ID IN (".implode(',', $LogIDs).") ORDER BY ID DESC");
|
||||
} else {
|
||||
$Log = $DB->query("SET @nothing = 0");
|
||||
}
|
||||
}
|
@ -244,10 +244,10 @@ function log_attempt($UserID) {
|
||||
|
||||
if(isset($_POST['keeplogged']) && $_POST['keeplogged']) {
|
||||
$KeepLogged = 1;
|
||||
setcookie('session', $Cookie,time()+60*60*24*365,'/','',false);
|
||||
setcookie('session', $Cookie, time()+60*60*24*365, '/', '', $SSL, true);
|
||||
} else {
|
||||
$KeepLogged = 0;
|
||||
setcookie('session', $Cookie,0,'/','',false);
|
||||
setcookie('session', $Cookie, 0, '/', '', $SSL, true);
|
||||
}
|
||||
|
||||
//TODO: another tracker might enable this for donors, I think it's too stupid to bother adding that
|
||||
|
@ -43,24 +43,26 @@
|
||||
<option value="1">1 week</option>
|
||||
<option value="2">2 week</option>
|
||||
<option value="4">4 week</option>
|
||||
<? if(check_perms("users_mod")) {
|
||||
?>
|
||||
<? if(check_perms("users_mod")) { ?>
|
||||
<option value="8">8 week</option>
|
||||
<? }?>
|
||||
<? } ?>
|
||||
</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Private Message:</td>
|
||||
<td/>
|
||||
<td>
|
||||
<textarea id="message" style="width: 95%;" tabindex="1" onkeyup="resize('message');" name="privatemessage" cols="90" rows="4"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Edit Post:</td>
|
||||
<td> <textarea id="body" style="width: 95%;" tabindex="1" onkeyup="resize('body');" name="body" cols="90" rows="8"><?=$PostBody?></textarea>
|
||||
<br />
|
||||
<input type="submit" id="submit_button" value="Warn User" tabindex="1" />
|
||||
<td>
|
||||
<textarea id="body" style="width: 95%;" tabindex="1" onkeyup="resize('body');" name="body" cols="90" rows="8"><?=$PostBody?></textarea>
|
||||
<br />
|
||||
<input type="submit" id="submit_button" value="Warn User" tabindex="1" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<? show_footer(); ?>
|
||||
|
Loading…
Reference in New Issue
Block a user