mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-02-21 04:39:02 +00:00
Empty commit
This commit is contained in:
parent
019c241d08
commit
13b30d96c8
@ -8,12 +8,17 @@
|
||||
* @param string $Str
|
||||
* @return true if $Str numeric
|
||||
*/
|
||||
function is_number($Str) {
|
||||
$Return = true;
|
||||
if ($Str < 0) { $Return = false; }
|
||||
// We're converting input to a int, then string and comparing to original
|
||||
$Return = ($Str == strval(intval($Str)) ? true : false);
|
||||
return $Return;
|
||||
if (PHP_INT_SIZE === 4) {
|
||||
function is_number($Str) {
|
||||
if ($Str[0] == '-' || $Str[0] == '+') { // Leading plus/minus signs are ok
|
||||
$Str[0] = 0;
|
||||
}
|
||||
return ltrim($Str, "0..9") === '';
|
||||
}
|
||||
} else {
|
||||
function is_number($Str) {
|
||||
return $Str == strval(intval($Str));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -535,18 +535,17 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
}
|
||||
/** End run search query and collect results **/
|
||||
|
||||
$HideFilter = isset($LoggedUser['ShowTorFilter']) && $LoggedUser['ShowTorFilter'] == 0;
|
||||
// This is kinda ugly, but the enormous if paragraph was really hard to read
|
||||
$AdvancedSearch = !empty($_GET['action']) && $_GET['action'] == "advanced";
|
||||
$AdvancedSearch |= !empty($LoggedUser['SearchType']) && (empty($_GET['action']) || $_GET['action'] == "advanced");
|
||||
$AdvancedSearch &= check_perms('site_advanced_search');
|
||||
|
||||
if ($AdvancedSearch) {
|
||||
$Debug->log_var(1, 'Advanced search');
|
||||
$Action = 'action=advanced';
|
||||
$HideBasic = ' hidden';
|
||||
$HideAdvanced = '';
|
||||
} else {
|
||||
$Debug->log_var(1, 'Basic search');
|
||||
$Action = 'action=basic';
|
||||
$HideBasic = '';
|
||||
$HideAdvanced = ' hidden';
|
||||
@ -561,7 +560,7 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
<h2>Torrents</h2>
|
||||
</div>
|
||||
<form class="search_form" name="torrents" method="get" action="">
|
||||
<div class="box filter_torrents <?=$AdvancedSearch ? 'ft_advanced' : 'ft_basic'?>">
|
||||
<div class="box filter_torrents">
|
||||
<div class="head">
|
||||
<strong>
|
||||
<span id="ft_basic_text" class="<?=$HideBasic?>">Basic /</span>
|
||||
@ -571,16 +570,16 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
search
|
||||
</strong>
|
||||
<span style="float: right;">
|
||||
<a href="#" onclick="return toggleTorrentSearch(0);" id="ft_toggle" class="brackets">Hide</a>
|
||||
<a href="#" onclick="return toggleTorrentSearch(0);" id="ft_toggle" class="brackets"><?=$HideFilter ? 'Show' : 'Hide'?></a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="pad" id="ft_container">
|
||||
<div id="ft_container" class="pad<?=$HideFilter ? ' hidden' : ''?>">
|
||||
<table class="layout">
|
||||
<tr id="artist_name" class="ftr_advanced<?=$HideAdvanced?>">
|
||||
<td class="label">Artist name:</td>
|
||||
<td colspan="3" class="ft_artistname">
|
||||
<input type="text" spellcheck="false" size="40" name="artistname" class="inputtext smaller fti_advanced" value="<?Format::form('artistname')?>" />
|
||||
<input type="hidden" name="action" value="advanced" class="fti_advanced" />
|
||||
<input type="hidden" name="action" value="advanced" class="fti_advanced"<?=$AdvancedSearch ? '' : ' disabled="disabled"'?> />
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="album_torrent_name" class="ftr_advanced<?=$HideAdvanced?>">
|
||||
@ -829,10 +828,7 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?
|
||||
|
||||
|
||||
if ($TorrentCount == 0) {
|
||||
$DB->query("SELECT
|
||||
tags.Name,
|
||||
|
@ -78,7 +78,7 @@ function checked($Checked) {
|
||||
<input type="hidden" name="userid" value="<?=$UserID?>" />
|
||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||
</div>
|
||||
<table cellpadding="6" cellspacing="1" border="0" width="100%" class="layout border">
|
||||
<table cellpadding="6" cellspacing="1" border="0" width="100%" class="layout border user_options">
|
||||
<tr class="colhead_dark">
|
||||
<td colspan="2">
|
||||
<strong>Site preferences</strong>
|
||||
@ -187,12 +187,18 @@ function checked($Checked) {
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label"><strong>Browse page tag list</strong></td>
|
||||
<td class="label"><strong>Torrent search</strong></td>
|
||||
<td>
|
||||
<select name="showtags" id="showtags">
|
||||
<option value="1"<? if ($SiteOptions['ShowTags'] == 1) { ?> selected="selected"<? } ?>>Open by default.</option>
|
||||
<option value="0"<? if ($SiteOptions['ShowTags'] == 0) { ?> selected="selected"<? } ?>>Closed by default.</option>
|
||||
</select>
|
||||
<ul class="options_list nobullet">
|
||||
<li>
|
||||
<input type="checkbox" name="showtfilter" id="showtfilter"<?=!isset($SiteOptions['ShowTorFilter']) || $SiteOptions['ShowTorFilter'] ? ' checked="checked"' : ''?>/>
|
||||
<label for="showtfilter">Show filter</label>
|
||||
</li>
|
||||
<li>
|
||||
<input type="checkbox" name="showtags" id="showtags"<?Format::selected("ShowTags", 1, "checked", $SiteOptions);?>/>
|
||||
<label for="showtags">Show tag list</label>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -27,7 +27,6 @@
|
||||
$Val->SetFields('postsperpage',1,"number","You forgot to select your posts per page option.",array('inarray'=>array(25,50,100)));
|
||||
//$Val->SetFields('hidecollage',1,"number","You forgot to select your collage option.",array('minlength'=>0,'maxlength'=>1));
|
||||
$Val->SetFields('collagecovers',1,"number","You forgot to select your collage option.");
|
||||
$Val->SetFields('showtags',1,"number","You forgot to select your show tags option.",array('minlength'=>0,'maxlength'=>1));
|
||||
$Val->SetFields('avatar',0,"regex","You did not enter a valid avatar url.",array('regex'=>"/^".IMAGE_REGEX."$/i"));
|
||||
$Val->SetFields('email',1,"email","You did not enter a valid email address.");
|
||||
$Val->SetFields('irckey',0,"string","You did not enter a valid IRCKey, must be between 6 and 32 characters long.",array('minlength'=>6,'maxlength'=>32));
|
||||
@ -187,6 +186,7 @@
|
||||
$Options['PostsPerPage'] = (int) $_POST['postsperpage'];
|
||||
//$Options['HideCollage'] = (!empty($_POST['hidecollage']) ? 1 : 0);
|
||||
$Options['CollageCovers'] = empty($_POST['collagecovers']) ? 0 : $_POST['collagecovers'];
|
||||
$Options['ShowTorFilter'] = empty($_POST['showtfilter']) ? 0 : 1;
|
||||
$Options['ShowTags'] = (!empty($_POST['showtags']) ? 1 : 0);
|
||||
$Options['AutoSubscribe'] = (!empty($_POST['autosubscribe']) ? 1 : 0);
|
||||
$Options['DisableSmileys'] = (!empty($_POST['disablesmileys']) ? 1 : 0);
|
||||
|
@ -55,12 +55,8 @@
|
||||
</div>
|
||||
<div class="sidebar">
|
||||
<div class="box">
|
||||
<div class="head">Table of Contents</div>
|
||||
<div class="body">
|
||||
<?=$TOC?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box pad center">
|
||||
<div class="head">Search</div>
|
||||
<div class="pad">
|
||||
<form class="search_form" name="articles" action="wiki.php" method="get">
|
||||
<input type="hidden" name="action" value="search" />
|
||||
<input
|
||||
@ -73,6 +69,13 @@
|
||||
<br style="line-height:10px;" />
|
||||
<strong><a href="wiki.php?action=browse" class="brackets">Browse articles</a></strong>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="head">Table of Contents</div>
|
||||
<div class="body">
|
||||
<?=$TOC?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box box_info pad">
|
||||
<ul>
|
||||
<li>
|
||||
|
@ -66,9 +66,12 @@ function Edit_Form(post,key) {
|
||||
}
|
||||
|
||||
function Cancel_Edit(postid) {
|
||||
$('#reply_box').toggle();
|
||||
$('#bar' + postid).raw().innerHTML = $('#bar' + postid).raw().oldbar;
|
||||
$('#content' + postid).raw().innerHTML = $('#bar' + postid).raw().cancel;
|
||||
var answer = confirm("Are you sure you want to cancel?");
|
||||
if (answer) {
|
||||
$('#reply_box').toggle();
|
||||
$('#bar' + postid).raw().innerHTML = $('#bar' + postid).raw().oldbar;
|
||||
$('#content' + postid).raw().innerHTML = $('#bar' + postid).raw().cancel;
|
||||
}
|
||||
}
|
||||
|
||||
function Preview_Edit(postid) {
|
||||
|
@ -20,12 +20,15 @@
|
||||
|
||||
if($(this).val() == TOASTY) {
|
||||
$('#pushservice_title').text("Device ID");
|
||||
$('#pushusername_title').text("Username");
|
||||
}
|
||||
else if($(this).val() == PUSHOVER) {
|
||||
$('#pushservice_title').text("Token");
|
||||
$('#pushusername_title').text("User Key");
|
||||
}
|
||||
else {
|
||||
$('#pushservice_title').text("API Key");
|
||||
$('#pushusername_title').text("Username");
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -731,6 +731,12 @@ ul .invitetree {
|
||||
margin: 10px 2px;
|
||||
}
|
||||
|
||||
/* Layout (User options) */
|
||||
|
||||
.user_options .options_list li {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Layout (MISC) */
|
||||
|
||||
.left_poll {
|
||||
|
@ -1389,18 +1389,21 @@ h3 {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
#user #userform {
|
||||
#userform {
|
||||
padding: 20px 0 0 0;
|
||||
}
|
||||
|
||||
#userform select#stylesheet,
|
||||
#userform select#searchtype,
|
||||
#userform select#discogview,
|
||||
#userform select#hidecollage,
|
||||
#userform select#showtags {
|
||||
.user_options select#stylesheet,
|
||||
.user_options select#searchtype,
|
||||
.user_options select#discogview,
|
||||
.user_options select#hidecollage{
|
||||
width: 130px;
|
||||
}
|
||||
|
||||
.user_options .options_list {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#user .linkbox,
|
||||
#artist .linkbox,
|
||||
#collage .linkbox,
|
||||
|
@ -813,6 +813,12 @@ ul .invitetree {
|
||||
margin: 10px 2px;
|
||||
}
|
||||
|
||||
/* Layout (User options) */
|
||||
|
||||
.user_options .options_list li {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Layout (MISC) */
|
||||
|
||||
.left_poll {
|
||||
|
@ -709,6 +709,12 @@ ul .invitetree {
|
||||
margin: 10px 2px;
|
||||
}
|
||||
|
||||
/* Layout (User options) */
|
||||
|
||||
.user_options .options_list li {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Layout (MISC) */
|
||||
|
||||
.left_poll {
|
||||
|
@ -219,6 +219,7 @@ table tr.colhead_dark td{background:#555; border:0}
|
||||
#user #styleurl{width:40% !important}
|
||||
#user table textarea{width:98% !important}
|
||||
#user table tr td.center strong{display:block}
|
||||
.user_options .options_list{padding: 0;}
|
||||
|
||||
/* FORUMS */
|
||||
#forums h3{margin:15px 0}
|
||||
|
@ -209,6 +209,7 @@ table tr.colhead_dark td{background:#555; border:0}
|
||||
#user #styleurl{width:40% !important}
|
||||
#user table textarea{width:98% !important}
|
||||
#user table tr td.center strong{display:block}
|
||||
.user_options .options_list{padding: 0;}
|
||||
|
||||
/* FORUMS */
|
||||
#forums h3{margin:15px 0}
|
||||
|
@ -891,6 +891,12 @@ ul .invitetree {
|
||||
background: transparent !important; outline: 0
|
||||
}
|
||||
|
||||
/* Layout (User options) */
|
||||
|
||||
.user_options .options_list li {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Layout (MISC) */
|
||||
|
||||
.poll{list-style:none; padding:10px; margin:5px}
|
||||
|
@ -1498,18 +1498,21 @@ h3 {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
#user #userform {
|
||||
#userform {
|
||||
padding: 20px 0 0 0;
|
||||
}
|
||||
|
||||
#userform select#stylesheet,
|
||||
#userform select#searchtype,
|
||||
#userform select#discogview,
|
||||
#userform select#hidecollage,
|
||||
#userform select#showtags {
|
||||
.user_options select#stylesheet,
|
||||
.user_options select#searchtype,
|
||||
.user_options select#discogview,
|
||||
.user_options select#hidecollage{
|
||||
width: 130px;
|
||||
}
|
||||
|
||||
.user_options .options_list {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#user .linkbox,
|
||||
#artist .linkbox,
|
||||
#collage .linkbox,
|
||||
|
@ -709,6 +709,9 @@ table tr td.unread_locked_sticky {
|
||||
padding-top:20px;
|
||||
text-transform:uppercase;
|
||||
}
|
||||
.user_options .options_list {
|
||||
padding:0;
|
||||
}
|
||||
#site_debug {
|
||||
width:950px;
|
||||
margin:0 auto;
|
||||
|
Loading…
Reference in New Issue
Block a user