1 Star 3 Fork 2

mojie126/HDCN-PT

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
limit.php 41.78 KB
一键复制 编辑 原始数据 按行查看 历史
mojie126 提交于 2016-11-03 17:20 . 清除新种标记按钮样式调整
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115
<?php
require_once("include/bittorrent.php");
require_once("memcache.php");
dbconn(true);
require_once(get_langfile_path("edit.php"));
require_once(get_langfile_path("torrents.php"));
loggedinorreturn();
parked();
secrity();
limitsecrity();
if (get_user_class() < $viewlimit) {
systemsecrity();
} elseif (get_user_class() < $freeviewlimit && $CURUSER['onlimit'] == 'no') {
stderr("错误", "您的权限不足以查看禁区内容,请在“控制台”->“安全设定”->“显示禁区”中勾选并付费开启。");
}
if ($showextinfo['imdb'] == 'yes') {
require_once ("imdb/imdb.class.php");
require_once("imdb/douban.php");
}
//check searchbox
$sourcelid = (int) $_GET['cat'];
$sectiontype = $browsecatmode;
$showsubcat = get_searchbox_value($sectiontype, 'showsubcat'); //whether show subcategory (i.e. sources, codecs) or not
$showsource = get_searchbox_value($sectiontype, 'showsource'); //whether show sources or not
$showmedium = get_searchbox_value($sectiontype, 'showmedium'); //whether show media or not
$showcodec = get_searchbox_value($sectiontype, 'showcodec'); //whether show codecs or not
$showstandard = get_searchbox_value($sectiontype, 'showstandard'); //whether show standards or not
$showprocessing = get_searchbox_value($sectiontype, 'showprocessing'); //whether show processings or not
$showteam = get_searchbox_value($sectiontype, 'showteam'); //whether show teams or not
$showaudiocodec = get_searchbox_value($sectiontype, 'showaudiocodec'); //whether show audio codec or not
$catsperrow = get_searchbox_value($sectiontype, 'catsperrow'); //show how many cats per line in search box
$catpadding = get_searchbox_value($sectiontype, 'catpadding'); //padding space between categories in pixel
if ($CURUSER) {
if ($CURUSER['clearnew'] == 1 && $_GET['clearnew'] == 1) {
//$USERUPDATESET[] = "limit_last_browse = " . TIMENOW;
sql_query("UPDATE users SET limit_last_browse = " . time() . " WHERE id = " . $CURUSER['id']);
//echo "<script>location.href='limit.php';</script>";
} elseif ($CURUSER['clearnew'] != 1) {
$USERUPDATESET[] = "limit_last_browse = " . TIMENOW;
}
}
$cats = genrelistlimit($sectiontype);
if ($showsubcat) {
if ($showsource)
$sources = searchbox_item_list("sources", $sourcelid);
if ($showmedium)
$media = searchbox_item_list("media");
if ($showcodec)
$codecs = searchbox_item_list("codecs");
if ($showstandard)
$standards = searchbox_item_list("standards");
if ($showprocessing)
$processings = searchbox_item_list("processings");
if ($showteam)
$teams = searchbox_item_list("teams");
if ($showaudiocodec)
$audiocodecs = searchbox_item_list("audiocodecs");
}
$go = new Trans; //调用繁简转换类
$searchstr_ori = htmlspecialchars(trim($_GET["search"]));
$searchstr = mysql_real_escape_string(trim($_GET["search"]));
if (empty($searchstr))
unset($searchstr);
// sorting by MarkoStamcar
if ($_GET['sort'] && $_GET['type']) {
$column = '';
$ascdesc = '';
switch ($_GET['sort']) {
case '1': $column = "name";
break;
case '2': $column = "numfiles";
break;
case '3': $column = "comments";
break;
case '4': $column = "added";
break;
case '5': $column = "size";
break;
case '6': $column = "times_completed";
break;
case '7': $column = "seeders";
break;
case '8': $column = "leechers";
break;
case '9': $column = "owner";
break;
default: $column = "id";
break;
}
switch ($_GET['type']) {
case 'asc': $ascdesc = "ASC";
$linkascdesc = "asc";
break;
case 'desc': $ascdesc = "DESC";
$linkascdesc = "desc";
break;
default: $ascdesc = "DESC";
$linkascdesc = "desc";
break;
}
if ($column == "owner") {
$orderby = "ORDER BY marrow DESC, pos_state DESC, torrents.anonymous, users.username " . $ascdesc;
} else {
$orderby = "ORDER BY marrow DESC, pos_state DESC, torrents." . $column . " " . $ascdesc;
}
$pagerlink = "sort=" . intval($_GET['sort']) . "&type=" . $linkascdesc . "&";
} else {
$orderby = "ORDER BY marrow DESC, pos_state DESC, torrents.added DESC";
//$orderby = "ORDER BY marrow DESC, pos_state DESC, torrents.id DESC";
$pagerlink = "";
}
$addparam = "";
$wherea = array();
$wherecatina = array();
if ($showsubcat) {
if ($showsource)
$wheresourceina = array();
if ($showmedium)
$wheremediumina = array();
if ($showcodec)
$wherecodecina = array();
if ($showstandard)
$wherestandardina = array();
if ($showprocessing)
$whereprocessingina = array();
if ($showteam)
$whereteamina = array();
if ($showaudiocodec)
$whereaudiocodecina = array();
}
//----------------- start whether show torrents from all sections---------------------//
if ($_GET)
$allsec = 0 + $_GET["allsec"];
else
$allsec = 0;
if ($allsec == 1) { //show torrents from all sections
$addparam .= "allsec=1&";
}
// ----------------- end whether ignoring section ---------------------//
// ----------------- start bookmarked ---------------------//
if ($_GET)
$inclbookmarked = 0 + $_GET["inclbookmarked"];
elseif ($CURUSER['notifs']) {
if (strpos($CURUSER['notifs'], "[inclbookmarked=0]") !== false)
$inclbookmarked = 0;
elseif (strpos($CURUSER['notifs'], "[inclbookmarked=1]") !== false)
$inclbookmarked = 1;
elseif (strpos($CURUSER['notifs'], "[inclbookmarked=2]") !== false)
$inclbookmarked = 2;
} else
$inclbookmarked = 0;
if (!in_array($inclbookmarked, array(0, 1, 2))) {
$inclbookmarked = 0;
write_log("User " . $CURUSER["username"] . "," . $CURUSER["ip"] . " is hacking inclbookmarked field in" . $_SERVER['SCRIPT_NAME'], 'mod');
}
if ($inclbookmarked == 0) { //all(bookmarked,not)
$addparam .= "inclbookmarked=0&";
} elseif ($inclbookmarked == 1) { //bookmarked
$addparam .= "inclbookmarked=1&";
if (isset($CURUSER))
$wherea[] = "torrents.id IN (SELECT torrentid FROM bookmarks WHERE userid=" . $CURUSER['id'] . ")";
}
elseif ($inclbookmarked == 2) { //not bookmarked
$addparam .= "inclbookmarked=2&";
if (isset($CURUSER))
$wherea[] = "torrents.id NOT IN (SELECT torrentid FROM bookmarks WHERE userid=" . $CURUSER['id'] . ")";
}
// ----------------- end bookmarked ---------------------//
if (!isset($CURUSER) || get_user_class() < $seebanned_class)
$wherea[] = "( ( banned != 'yes' ) OR ( banned = 'yes' AND owner = '" . $CURUSER["id"] . "' ) )";
// ----------------- start include dead ---------------------//
if (isset($_GET["incldead"]))
$include_dead = 0 + $_GET["incldead"];
elseif ($CURUSER['notifs']) {
if (strpos($CURUSER['notifs'], "[incldead=0]") !== false)
$include_dead = 0;
elseif (strpos($CURUSER['notifs'], "[incldead=1]") !== false)
$include_dead = 1;
elseif (strpos($CURUSER['notifs'], "[incldead=2]") !== false)
$include_dead = 2;
else
$include_dead = 1;
} else
$include_dead = 1;
if (!in_array($include_dead, array(0, 1, 2))) {
$include_dead = 0;
write_log("User " . $CURUSER["username"] . "," . $CURUSER["ip"] . " is hacking incldead field in" . $_SERVER['SCRIPT_NAME'], 'mod');
}
if ($include_dead == 0) { //all(active,dead)
$addparam .= "incldead=0&";
} elseif ($include_dead == 1) { //active
$addparam .= "incldead=1&";
$wherea[] = "visible = 'yes'";
} elseif ($include_dead == 2) { //dead
$addparam .= "incldead=2&";
$wherea[] = "visible = 'no'";
}
// ----------------- end include dead ---------------------//
if ($_GET)
$special_state = 0 + $_GET["spstate"];
elseif ($CURUSER['notifs']) {
if (strpos($CURUSER['notifs'], "[spstate=0]") !== false)
$special_state = 0;
elseif (strpos($CURUSER['notifs'], "[spstate=1]") !== false)
$special_state = 1;
elseif (strpos($CURUSER['notifs'], "[spstate=2]") !== false)
$special_state = 2;
elseif (strpos($CURUSER['notifs'], "[spstate=3]") !== false)
$special_state = 3;
elseif (strpos($CURUSER['notifs'], "[spstate=4]") !== false)
$special_state = 4;
elseif (strpos($CURUSER['notifs'], "[spstate=5]") !== false)
$special_state = 5;
elseif (strpos($CURUSER['notifs'], "[spstate=6]") !== false)
$special_state = 6;
elseif (strpos($CURUSER['notifs'], "[spstate=7]") !== false)
$special_state = 7;
} else
$special_state = 0;
if (!in_array($special_state, array(0, 1, 2, 3, 4, 5, 6, 7))) {
$special_state = 0;
write_log("User " . $CURUSER["username"] . "," . $CURUSER["ip"] . " is hacking spstate field in " . $_SERVER['SCRIPT_NAME'], 'mod');
}
if ($special_state == 0) { //all
$addparam .= "spstate=0&";
} elseif ($special_state == 1) { //normal
$addparam .= "spstate=1&";
$wherea[] = "sp_state = 1";
if (get_global_sp_state() == 1) {
$wherea[] = "sp_state = 1";
}
} elseif ($special_state == 2) { //free
$addparam .= "spstate=2&";
if (get_global_sp_state() == 1) {
$wherea[] = "sp_state = 2";
} elseif (get_global_sp_state() == 2) {
$wherea[] = "sp_state = 2";
}
} elseif ($special_state == 3) { //2x up
$addparam .= "spstate=3&";
if (get_global_sp_state() == 1) { //only sp state
$wherea[] = "sp_state = 3";
} elseif (get_global_sp_state() == 3) { //all
$wherea[] = "sp_state = 3";
}
} elseif ($special_state == 4) { //2x up and free
$addparam .= "spstate=4&";
if (get_global_sp_state() == 1) { //only sp state
$wherea[] = "sp_state = 4";
} elseif (get_global_sp_state() == 4) { //all
$wherea[] = "sp_state = 4";
}
} elseif ($special_state == 5) { //half down
$addparam .= "spstate=5&";
if (get_global_sp_state() == 1) { //only sp state
$wherea[] = "sp_state = 5";
} elseif (get_global_sp_state() == 5) { //all
$wherea[] = "sp_state = 5";
}
} elseif ($special_state == 6) { //half down
$addparam .= "spstate=6&";
if (get_global_sp_state() == 1) { //only sp state
$wherea[] = "sp_state = 6";
} elseif (get_global_sp_state() == 6) { //all
$wherea[] = "sp_state = 6";
}
} elseif ($special_state == 7) { //30% down
$addparam .= "spstate=7&";
if (get_global_sp_state() == 1) { //only sp state
$wherea[] = "sp_state = 7";
} elseif (get_global_sp_state() == 7) { //all
$wherea[] = "sp_state = 7";
}
}
$category_get = 0 + $_GET["cat"];
$source_get = 0 + $_GET["source"];
if ($showsubcat) {
if ($showmedium)
$medium_get = 0 + $_GET["medium"];
if ($showcodec)
$codec_get = 0 + $_GET["codec"];
if ($showstandard)
$standard_get = 0 + $_GET["standard"];
if ($showprocessing)
$processing_get = 0 + $_GET["processing"];
if ($showteam)
$team_get = 0 + $_GET["team"];
if ($showaudiocodec)
$audiocodec_get = 0 + $_GET["audiocodec"];
}
$all = 0 + $_GET["all"];
if (!$all) {
if (!$_GET && $CURUSER['notifs']) {
$all = true;
foreach ($cats as $cat) {
$all &= $cat[id];
$mystring = $CURUSER['notifs'];
$findme = '[cat' . $cat['id'] . ']';
$search = strpos($mystring, $findme);
if ($search === false)
$catcheck = false;
else
$catcheck = true;
if ($catcheck) {
$wherecatina[] = $cat[id];
$addparam .= "cat$cat[id]=1&";
}
}
if ($showsubcat) {
if ($showsource)
foreach ($sources as $source) {
$all &= $source[id];
$mystring = $CURUSER['notifs'];
$findme = '[sou' . $source['id'] . ']';
$search = strpos($mystring, $findme);
if ($search === false)
$sourcecheck = false;
else
$sourcecheck = true;
if ($sourcecheck) {
$wheresourceina[] = $source[id];
$addparam .= "source$source[id]=1&";
}
}
if ($showmedium)
foreach ($media as $medium) {
$all &= $medium[id];
$mystring = $CURUSER['notifs'];
$findme = '[med' . $medium['id'] . ']';
$search = strpos($mystring, $findme);
if ($search === false)
$mediumcheck = false;
else
$mediumcheck = true;
if ($mediumcheck) {
$wheremediumina[] = $medium[id];
$addparam .= "medium$medium[id]=1&";
}
}
if ($showcodec)
foreach ($codecs as $codec) {
$all &= $codec[id];
$mystring = $CURUSER['notifs'];
$findme = '[cod' . $codec['id'] . ']';
$search = strpos($mystring, $findme);
if ($search === false)
$codeccheck = false;
else
$codeccheck = true;
if ($codeccheck) {
$wherecodecina[] = $codec[id];
$addparam .= "codec$codec[id]=1&";
}
}
if ($showstandard)
foreach ($standards as $standard) {
$all &= $standard[id];
$mystring = $CURUSER['notifs'];
$findme = '[sta' . $standard['id'] . ']';
$search = strpos($mystring, $findme);
if ($search === false)
$standardcheck = false;
else
$standardcheck = true;
if ($standardcheck) {
$wherestandardina[] = $standard[id];
$addparam .= "standard$standard[id]=1&";
}
}
if ($showprocessing)
foreach ($processings as $processing) {
$all &= $processing[id];
$mystring = $CURUSER['notifs'];
$findme = '[pro' . $processing['id'] . ']';
$search = strpos($mystring, $findme);
if ($search === false)
$processingcheck = false;
else
$processingcheck = true;
if ($processingcheck) {
$whereprocessingina[] = $processing[id];
$addparam .= "processing$processing[id]=1&";
}
}
if ($showteam)
foreach ($teams as $team) {
$all &= $team[id];
$mystring = $CURUSER['notifs'];
$findme = '[tea' . $team['id'] . ']';
$search = strpos($mystring, $findme);
if ($search === false)
$teamcheck = false;
else
$teamcheck = true;
if ($teamcheck) {
$whereteamina[] = $team[id];
$addparam .= "team$team[id]=1&";
}
}
if ($showaudiocodec)
foreach ($audiocodecs as $audiocodec) {
$all &= $audiocodec[id];
$mystring = $CURUSER['notifs'];
$findme = '[aud' . $audiocodec['id'] . ']';
$search = strpos($mystring, $findme);
if ($search === false)
$audiocodeccheck = false;
else
$audiocodeccheck = true;
if ($audiocodeccheck) {
$whereaudiocodecina[] = $audiocodec[id];
$addparam .= "audiocodec$audiocodec[id]=1&";
}
}
}
}
// when one clicked the cat, source, etc. name/image
elseif ($category_get && $source_get == 0) {
int_check($category_get, true, true, true);
$wherecatina[] = $category_get;
$addparam .= "cat=$category_get&";
} elseif ($medium_get) {
int_check($medium_get, true, true, true);
$wheremediumina[] = $medium_get;
$addparam .= "medium=$medium_get&";
} elseif ($source_get) {
int_check($source_get, true, true, true);
$wheresourceina[] = $source_get;
$addparam .= "source=$source_get&";
} elseif ($codec_get) {
int_check($codec_get, true, true, true);
$wherecodecina[] = $codec_get;
$addparam .= "codec=$codec_get&";
} elseif ($standard_get) {
int_check($standard_get, true, true, true);
$wherestandardina[] = $standard_get;
$addparam .= "standard=$standard_get&";
} elseif ($processing_get) {
int_check($processing_get, true, true, true);
$whereprocessingina[] = $processing_get;
$addparam .= "processing=$processing_get&";
} elseif ($team_get) {
int_check($team_get, true, true, true);
$whereteamina[] = $team_get;
$addparam .= "team=$team_get&";
} elseif ($audiocodec_get) {
int_check($audiocodec_get, true, true, true);
$whereaudiocodecina[] = $audiocodec_get;
$addparam .= "audiocodec=$audiocodec_get&";
} else { //select and go
$all = True;
foreach ($cats as $cat) {
$all &= $_GET["cat$cat[id]"];
if ($_GET["cat$cat[id]"]) {
$wherecatina[] = $cat[id];
$addparam .= "cat$cat[id]=1&";
}
}
if ($showsubcat) {
if ($showsource)
foreach ($sources as $source) {
$all &= $_GET["source$source[id]"];
if ($_GET["source$source[id]"]) {
$wheresourceina[] = $source[id];
$addparam .= "source$source[id]=1&";
}
}
if ($showmedium)
foreach ($media as $medium) {
$all &= $_GET["medium$medium[id]"];
if ($_GET["medium$medium[id]"]) {
$wheremediumina[] = $medium[id];
$addparam .= "medium$medium[id]=1&";
}
}
if ($showcodec)
foreach ($codecs as $codec) {
$all &= $_GET["codec$codec[id]"];
if ($_GET["codec$codec[id]"]) {
$wherecodecina[] = $codec[id];
$addparam .= "codec$codec[id]=1&";
}
}
if ($showstandard)
foreach ($standards as $standard) {
$all &= $_GET["standard$standard[id]"];
if ($_GET["standard$standard[id]"]) {
$wherestandardina[] = $standard[id];
$addparam .= "standard$standard[id]=1&";
}
}
if ($showprocessing)
foreach ($processings as $processing) {
$all &= $_GET["processing$processing[id]"];
if ($_GET["processing$processing[id]"]) {
$whereprocessingina[] = $processing[id];
$addparam .= "processing$processing[id]=1&";
}
}
if ($showteam)
foreach ($teams as $team) {
$all &= $_GET["team$team[id]"];
if ($_GET["team$team[id]"]) {
$whereteamina[] = $team[id];
$addparam .= "team$team[id]=1&";
}
}
if ($showaudiocodec)
foreach ($audiocodecs as $audiocodec) {
$all &= $_GET["audiocodec$audiocodec[id]"];
if ($_GET["audiocodec$audiocodec[id]"]) {
$whereaudiocodecina[] = $audiocodec[id];
$addparam .= "audiocodec$audiocodec[id]=1&";
}
}
}
}
}
if ($all) {
//stderr("in if all","");
$wherecatina = array();
if ($showsubcat) {
$wheresourceina = array();
$wheremediumina = array();
$wherecodecina = array();
$wherestandardina = array();
$whereprocessingina = array();
$whereteamina = array();
$whereaudiocodecina = array();
}
$addparam .= "";
}
//stderr("", count($wherecatina)."-". count($wheresourceina));
if (count($wherecatina) > 1)
$wherecatin = implode(",", $wherecatina);
elseif (count($wherecatina) == 1)
$wherea[] = "category = $wherecatina[0]";
if ($showsubcat) {
if ($showsource || $_GET['source'] != '') {
if (count($wheresourceina) > 1)
$wheresourcein = implode(",", $wheresourceina);
elseif (count($wheresourceina) == 1)
$wherea[] = "source = $wheresourceina[0]";
}
if ($showmedium) {
if (count($wheremediumina) > 1)
$wheremediumin = implode(",", $wheremediumina);
elseif (count($wheremediumina) == 1)
$wherea[] = "medium = $wheremediumina[0]";
}
if ($showcodec) {
if (count($wherecodecina) > 1)
$wherecodecin = implode(",", $wherecodecina);
elseif (count($wherecodecina) == 1)
$wherea[] = "codec = $wherecodecina[0]";
}
if ($showstandard) {
if (count($wherestandardina) > 1)
$wherestandardin = implode(",", $wherestandardina);
elseif (count($wherestandardina) == 1)
$wherea[] = "standard = $wherestandardina[0]";
}
if ($showprocessing) {
if (count($whereprocessingina) > 1)
$whereprocessingin = implode(",", $whereprocessingina);
elseif (count($whereprocessingina) == 1)
$wherea[] = "processing = $whereprocessingina[0]";
}
}
if ($showteam) {
if (count($whereteamina) > 1)
$whereteamin = implode(",", $whereteamina);
elseif (count($whereteamina) == 1)
$wherea[] = "team = $whereteamina[0]";
}
if ($showaudiocodec) {
if (count($whereaudiocodecina) > 1)
$whereaudiocodecin = implode(",", $whereaudiocodecina);
elseif (count($whereaudiocodecina) == 1)
$wherea[] = "audiocodec = $whereaudiocodecina[0]";
}
$wherebase = $wherea;
if (isset($searchstr)) {
if (!$_GET['notnewword']) {
insert_limitsuggest($searchstr, $CURUSER['id']);
$notnewword = "";
} else {
$notnewword = "notnewword=1&";
}
$search_mode = 0 + $_GET["search_mode"];
if (!in_array($search_mode, array(0, 1, 2))) {
$search_mode = 0;
write_log("用户" . $CURUSER["username"] . "IP" . $CURUSER["ip"] . "试图攻击搜索系统", 'mod');
}
$search_area = 0 + $_GET["search_area"];
if ($search_area == 4) {
$searchstr = (int) parse_imdb_id($searchstr);
}
$like_expression_array = array();
unset($like_expression_array);
switch ($search_mode) {
case 0 : //与
case 1 : {//或
if ($search_area != 4)
$searchstr = str_replace(".", " ", $searchstr);
$searchstr_exploded = explode(" ", $searchstr);
$searchstr_exploded_count = 0;
foreach ($searchstr_exploded as $searchstr_element) {
$searchstr_element = trim($searchstr_element); // furthur trim to ensure that multi space seperated words still work
if (!$searchstr_element)
continue;
if ($searchstr_exploded_count >= 10) // 每次最多查询10个关键字
break;
$searchstr_exploded_count++;
if ($search_area == 4) {
$searchstr_element = (int) parse_imdb_id($searchstr_element);
$like_expression_array[] = " = " . ($searchstr_element ? $searchstr_element : "'-1'");
} else
$like_expression_array[] = (substr($searchstr_element, 0, 1) == '!' ? " NOT" : "") . " LIKE '%" . (substr($searchstr_element, 0, 1) == '!' ? substr($searchstr_element, 1, strlen($searchstr_element)) : $searchstr_element) . "%'";
}
if (!$like_expression_array)
$like_expression_array[] = " LIKE '%'";
break;
}
case 2 : {//精准
$like_expression_array[] = " LIKE '%" . $searchstr . "%'";
break;
}
}
$ANDOR = ($search_mode == 0 ? " AND " : " OR "); // only affects mode 0 and mode 1
switch ($search_area) {
case 0 : // torrent name
{
foreach ($like_expression_array as &$like_expression_array_element) {
$searchword1 = $go->t2c($searchstr); //简体
$searchword2 = $go->c2t($searchstr); //繁体
if (preg_match('/[\ \.]/', $searchstr)) {
$like_expression_array_element = "(torrents.name" . $like_expression_array_element . " OR torrents.small_descr" . $like_expression_array_element . ")";
} else {
$like_expression_array_element = "(torrents.name LIKE '%" . $searchword1 . "%' OR torrents.name LIKE '%" . $searchword2 . "%' OR torrents.small_descr LIKE '%" . $searchword1 . "%' OR torrents.small_descr LIKE '%" . $searchword2 . "%')";
}
}
$wherea[] = implode($ANDOR, $like_expression_array);
break;
}
case 1 : // torrent description
{
foreach ($like_expression_array as &$like_expression_array_element)
$like_expression_array_element = "torrents.descr" . $like_expression_array_element;
$wherea[] = implode($ANDOR, $like_expression_array);
break;
}
/*
case 2 : // torrent small description
{
foreach ($like_expression_array as &$like_expression_array_element)
$like_expression_array_element = "torrents.small_descr" . $like_expression_array_element;
$wherea[] = implode($ANDOR, $like_expression_array);
break;
}
*
*/
case 3 : // torrent uploader
{
foreach ($like_expression_array as &$like_expression_array_element)
$like_expression_array_element = "users.username" . $like_expression_array_element;
if (!isset($CURUSER)) { // not registered user, only show not anonymous torrents
$wherea[] = implode($ANDOR, $like_expression_array) . " AND torrents.anonymous = 'no'";
} else {
if (get_user_class() > $torrentmanage_class) { // moderator or above, show all
$wherea[] = implode($ANDOR, $like_expression_array);
} else { // only show normal torrents and anonymous torrents from hiself
$wherea[] = "(" . implode($ANDOR, $like_expression_array) . " AND torrents.anonymous = 'no') OR (" . implode($ANDOR, $like_expression_array) . " AND torrents.anonymous = 'yes' AND users.id=" . $CURUSER["id"] . ") ";
}
}
break;
}
case 4 : // imdb url
foreach ($like_expression_array as &$like_expression_array_element)
$like_expression_array_element = "torrents.url" . $like_expression_array_element;
$wherea[] = implode($ANDOR, $like_expression_array);
break;
default : // unkonwn
{
$search_area = 0;
$wherea[] = "torrents.name LIKE '%" . $searchstr . "%'";
write_log("用户" . $CURUSER["username"] . "IP" . $CURUSER["ip"] . "试图攻击搜索系统", 'mod');
break;
}
}
$addparam .= "search_area=" . $search_area . "&";
$addparam .= "search=" . rawurlencode($searchstr) . "&" . $notnewword;
$addparam .= "search_mode=" . $search_mode . "&";
}
//$where = implode(" AND ", $wherea);
if ($wherea)
$where = "( " . implode(" ) AND ( ", $wherea) . " )";
if ($wherecatin)
$where .= ($where ? " AND " : "") . "category IN(" . $wherecatin . ")";
if ($showsubcat) {
if ($wheresourcein)
$where .= ($where ? " AND " : "") . "source IN(" . $wheresourcein . ")";
if ($wheremediumin)
$where .= ($where ? " AND " : "") . "medium IN(" . $wheremediumin . ")";
if ($wherecodecin)
$where .= ($where ? " AND " : "") . "codec IN(" . $wherecodecin . ")";
if ($wherestandardin)
$where .= ($where ? " AND " : "") . "standard IN(" . $wherestandardin . ")";
if ($whereprocessingin)
$where .= ($where ? " AND " : "") . "processing IN(" . $whereprocessingin . ")";
if ($whereteamin)
$where .= ($where ? " AND " : "") . "team IN(" . $whereteamin . ")";
if ($whereaudiocodecin)
$where .= ($where ? " AND " : "") . "audiocodec IN(" . $whereaudiocodecin . ")";
}
if ($allsec == 1 || $enablespecial != 'yes') {
if ($where != "")
$where = "WHERE $where AND torrents.category >= '424' AND torrents.banned != 'yes' ";
else
$where = "WHERE torrents.category >= '424' AND torrents.banned != 'yes'";
$sql = "SELECT COUNT(*) FROM torrents " . ($search_area == 3 || $column == "owner" ? "LEFT JOIN users ON torrents.owner = users.id " : "") . $where;
}
else {
if ($where != "")
$where = "WHERE $where AND categories.mode = '$sectiontype' AND torrents.category >= '424' AND torrents.banned != 'yes'";
else
$where = "WHERE categories.mode = '$sectiontype' AND torrents.category >= '424' AND torrents.banned != 'yes'";
$sql = "SELECT COUNT(*), categories.mode FROM torrents LEFT JOIN categories ON category = categories.id " . ($search_area == 3 || $column == "owner" ? "LEFT JOIN users ON torrents.owner = users.id " : "") . $where . " GROUP BY categories.mode";
}
$res = sql_query($sql) or die(mysql_error());
$count = 0;
while ($row = mysql_fetch_array($res))
$count += $row[0];
if ($CURUSER["torrentsperpage"])
$torrentsperpage = (int) $CURUSER["torrentsperpage"];
elseif ($torrentsperpage_main)
$torrentsperpage = $torrentsperpage_main;
else
$torrentsperpage = 50;
if ($count) {
if ($addparam != "") {
if ($pagerlink != "") {
if ($addparam{strlen($addparam) - 1} != ";") { // & = &amp;
$addparam = $addparam . "&" . $pagerlink;
} else {
$addparam = $addparam . $pagerlink;
}
}
} else {
//stderr("in else","");
$addparam = $pagerlink;
}
//stderr("addparam",$addparam);
//echo $addparam;
list($pagertop, $pagerbottom, $limit) = pager($torrentsperpage, $count, "?" . $addparam);
$where = $where ? "$where AND torrents.status = 'normal' AND torrents.category >= '424'" : "WHERE torrents.status = 'normal' AND torrents.category >= '424'";
if ($allsec == 1 || $enablespecial != 'yes') {
$query = "SELECT torrents.* FROM torrents " . ($search_area == 3 || $column == "owner" ? "LEFT JOIN users ON torrents.owner = users.id " : "") . " $where $orderby $limit";
} else {
$query = "SELECT torrents.* FROM torrents " . ($search_area == 3 || $column == "owner" ? "LEFT JOIN users ON torrents.owner = users.id " : "") . " LEFT JOIN categories ON torrents.category=categories.id $where $orderby $limit";
}
$res = sql_query($query) or die(mysql_error());
} else
unset($res);
if (isset($searchstr))
stdhead($lang_torrents['head_search_results_for'] . $searchstr_ori);
elseif ($sectiontype == $browsecatmode)
stdhead($lang_torrents['head_torrents']);
else
stdhead($lang_torrents['head_music']);
print("<table width=\"95%\" class=\"main\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td class=\"embeddeds\">");
if ($allsec != 1 || $enablespecial != 'yes') { //do not print searchbox if showing bookmarked torrents from all sections;
?>
<form method="get" name="searchbox">
<table border="1" class="searchbox" cellspacing="0" cellpadding="5" width="950" align="center">
<tbody>
<tr>
<td class="colhead" align="center" colspan="2"><a href="javascript: klappe_news('searchboxmain')"><img class="plus" src="pic/trans.gif" id="picsearchboxmain" alt="Show/Hide" /><?php echo $lang_torrents['text_search_box'] ?></a></td>
</tr>
</tbody>
<tbody id="ksearchboxmain" style="display:none">
<tr>
<td class="rowfollow" align="left">
<table>
<?php
function printcat($name, $listarray, $cbname, $wherelistina, $btname, $showimg = false) {
global $catpadding, $catsperrow, $lang_torrents, $CURUSER, $CURLANGDIR, $catimgurl;
print("<tr><td class=\"embedded\" colspan=\"" . $catsperrow . "\" align=\"left\"><b>" . $name . "</b></td></tr><tr>");
if ($_GET['cat'] + 0)
echo "<input type=\"hidden\" id=\"cat\" name=\"cat\" value=\"$_GET[cat]\" />";
if ($_GET['source'] + 0)
echo "<input type=\"hidden\" id=\"source\" name=\"source\" value=\"$_GET[source]\" />";
$i = 0;
foreach ($listarray as $list) {
if ($i && $i % $catsperrow == 0) {
print("</tr><tr>");
}
//print("<td align=\"left\" class=\"bottom\" style=\"padding-bottom: 4px; padding-left: ".$catpadding."px;\">".($showimg ? return_category_image($list[id], "?") : "<a title=\"" .$list[name] . "\" href=\"?".$cbname."=".$list[id]."\">".$list[name]."</a>")."</td>\n");
print("<td align=\"left\" class=\"bottom\" style=\"padding-bottom: 4px; padding-left: " . $catpadding . "px;\"><input type=\"checkbox\" id=\"" . $cbname . $list[id] . "\" name=\"" . $cbname . $list[id] . "\"" . (in_array($list[id], $wherelistina) ? " checked=\"checked\"" : "") . " value=\"1\" />" . ($showimg ? return_category_image($list[id], "?") : "<a title=\"" . $list[name] . "\" href=\"?" . $cbname . "=" . $list[id] . "\">" . $list[name] . "</a>") . "</td>\n");
$i++;
}
$checker = "<input name=\"" . $btname . "\" value='" . $lang_torrents['input_check_all'] . "' class=\"btn medium\" type=\"button\" onclick=\"javascript:SetChecked('" . $cbname . "','" . $btname . "','" . $lang_torrents['input_check_all'] . "','" . $lang_torrents['input_uncheck_all'] . "',-1,10)\" />";
print("<td colspan=\"2\" class=\"bottom\" align=\"left\" style=\"padding-left: 15px\">" . $checker . "</td>\n");
print("</tr>");
}
function printcatone($name, $listarray, $cbname, $wherelistina, $btname, $showimg = false) {
global $catpadding, $catsperrow, $lang_torrents, $CURUSER, $CURLANGDIR, $catimgurl;
//print("<tr><td class=\"embedded\" colspan=\"".$catsperrow."\" align=\"left\"><b>".$name."</b></td></tr><tr bgcolor=#00AA55>");
print("<tr bgcolor=#009955>");
$i = 0;
foreach ($listarray as $list) {
if ($i && $i % $catsperrow == 0) {
print("</tr><tr>");
}
print("<td align=\"left\" class=\"bottom\" style=\"padding-bottom: 4px; padding-left: " . $catpadding . "px;\">" . ($showimg ? return_category_image($list[id], "?") : "&nbsp<a title=\"" . $list[name] . "\" href=\"?" . $cbname . "=" . $list[id] . "\"><b>" . $list[name] . "</b></a>&nbsp") . "</td>\n");
$i++;
}
print("</tr>");
}
printcat($lang_torrents['text_category'], $cats, "cat", $wherecatina, "cat_check", true);
if ($showsubcat) {
if ($showsource && $sourcelid != 0) {
?>
</tbody></table>
<table border="1" class="searchbox" cellspacing="0" cellpadding="5" align="center"><tbody>
<?php
printcatone($lang_torrents['text_source'], $sources, "cat=" . $sourcelid . "&source", $wheresourceina, "source_check");
?>
</tbody></table>
<table border="1" class="searchbox" cellspacing="0" cellpadding="5" width="100%"><tbody>
<?php
}
if ($showmedium)
printcat($lang_torrents['text_medium'], $media, "medium", $wheremediumina, "medium_check");
if ($showcodec)
printcat($lang_torrents['text_codec'], $codecs, "codec", $wherecodecina, "codec_check");
if ($showaudiocodec)
printcat($lang_torrents['text_audio_codec'], $audiocodecs, "audiocodec", $whereaudiocodecina, "audiocodec_check");
if ($showstandard)
printcat($lang_torrents['text_standard'], $standards, "standard", $wherestandardina, "standard_check");
if ($showprocessing)
printcat($lang_torrents['text_processing'], $processings, "processing", $whereprocessingina, "processing_check");
if ($showteam)
printcat($lang_torrents['text_team'], $teams, "team", $whereteamina, "team_check");
}
?>
</table>
</td>
<td class="rowfollow" valign="middle">
<table>
<tr>
<td class="bottom" style="padding: 1px;padding-left: 10px">
<font class="medium"><?php echo $lang_torrents['text_show_dead_active'] ?></font>
</td>
</tr>
<tr>
<td class="bottom" style="padding: 1px;padding-left: 10px">
<select class="med" name="incldead" style="width: 100px;">
<option value="0"><?php echo $lang_torrents['select_including_dead'] ?></option>
<option value="1"<?php print($include_dead == 1 ? " selected=\"selected\"" : ""); ?>><?php echo $lang_torrents['select_active'] ?></option>
<option value="2"<?php print($include_dead == 2 ? " selected=\"selected\"" : ""); ?>><?php echo $lang_torrents['select_dead'] ?></option>
</select>
</td>
</tr>
<tr>
<td class="bottom" style="padding: 1px;padding-left: 10px">
<br />
</td>
</tr>
<tr>
<td class="bottom" style="padding: 1px;padding-left: 10px">
<font class="medium"><?php echo $lang_torrents['text_show_special_torrents'] ?></font>
</td>
</tr>
<tr>
<td class="bottom" style="padding: 1px;padding-left: 10px">
<select class="med" name="spstate" style="width: 100px;">
<option value="0"><?php echo $lang_torrents['select_all'] ?></option>
<?php echo promotion_selection($special_state, 0) ?>
</select>
</td>
</tr>
<tr>
<td class="bottom" style="padding: 1px;padding-left: 10px">
<br />
</td>
</tr>
<tr>
<td class="bottom" style="padding: 1px;padding-left: 10px">
<font class="medium"><?php echo $lang_torrents['text_show_bookmarked'] ?></font>
</td>
</tr>
<tr>
<td class="bottom" style="padding: 1px;padding-left: 10px">
<select class="med" name="inclbookmarked" style="width: 100px;">
<option value="0"><?php echo $lang_torrents['select_all'] ?></option>
<option value="1"<?php print($inclbookmarked == 1 ? " selected=\"selected\"" : ""); ?>><?php echo $lang_torrents['select_bookmarked'] ?></option>
<option value="2"<?php print($inclbookmarked == 2 ? " selected=\"selected\"" : ""); ?>><?php echo $lang_torrents['select_bookmarked_exclude'] ?></option>
</select>
</td>
</tr>
</table>
</td>
</tr>
</tbody>
<tbody id="torrents_tbody">
<tr>
<td class="rowfollow" align="center">
<table>
<tr>
<td class="embedded">
<?php echo $lang_torrents['text_search'] ?>
</td>
<td class="embedded">
<table>
<tr>
<td class="embedded">
<input id="searchinput" name="search" type="text" value="<?php echo $searchstr_ori ?>" autocomplete="off" style="width: 200px" ondblclick="suggest(event.keyCode, this.value);" onkeyup="suggest(event.keyCode, this.value);" onkeypress="return noenter(event.keyCode);"/>
<script src="limitsuggest.js" type="text/javascript"></script>
<div id="suggcontainer" style="text-align: left; width:100px; display: none;">
<div id="suggestions" style="width:204px; border: 1px solid rgb(119, 119, 119); cursor: default; position: absolute; color: rgb(0,0,0); background-color: rgb(255, 255, 255);"></div>
</div>
</td>
</tr>
</table>
</td>
<td class="embedded">
<?php echo "&nbsp;" . $lang_torrents['text_in'] ?>
<select name="search_area">
<option value="0"><?php echo $lang_torrents['select_title'] ?></option>
<option value="1"<?php print($_GET["search_area"] == 1 ? " selected=\"selected\"" : ""); ?>><?php echo $lang_torrents['select_description'] ?></option>
<?php
/* if ($smalldescription_main == 'yes'){
?>
<option value="2"<?php print($_GET["search_area"] == 2 ? " selected=\"selected\"" : ""); ?>><?php echo $lang_torrents['select_small_description'] ?></option>
<?php
} */
?>
<option value="3"<?php print($_GET["search_area"] == 3 ? " selected=\"selected\"" : ""); ?>><?php echo $lang_torrents['select_uploader'] ?></option>
<option value="4"<?php print($_GET["search_area"] == 4 ? " selected=\"selected\"" : ""); ?>><?php echo $lang_torrents['select_imdb_url'] ?></option>
</select>
<?php echo $lang_torrents['text_with'] ?>
<select name="search_mode" style="width: 60px;">
<option value="0"><?php echo $lang_torrents['select_and'] ?></option>
<option value="1"<?php echo $_GET["search_mode"] == 1 ? " selected=\"selected\"" : "" ?>><?php echo $lang_torrents['select_or'] ?></option>
<option value="2"<?php echo $_GET["search_mode"] == 2 ? " selected=\"selected\"" : "" ?>><?php echo $lang_torrents['select_exact'] ?></option>
</select>
<?php echo $lang_torrents['text_mode'] ?>
</td>
</tr>
<?php
$Cache->new_page('hot_search_limit', 3670, true);
if (!$Cache->get_page()) {
$secs = 3 * 24 * 60 * 60;
$dt = sqlesc(date("Y-m-d H:i:s", (TIMENOW - $secs)));
$dt2 = sqlesc(date("Y-m-d H:i:s", (TIMENOW - $secs * 2)));
sql_query("DELETE FROM limitsuggest WHERE adddate <" . $dt2) or sqlerr();
$searchres = sql_query("SELECT keywords, COUNT(DISTINCT userid) AS count FROM limitsuggest WHERE adddate > " . $dt . " GROUP BY keywords ORDER BY count DESC LIMIT 15") or sqlerr();
$hotcount = 0;
$hotsearch = "";
while ($searchrow = mysql_fetch_assoc($searchres)) {
$hotsearch .= "<a href=\"" . htmlspecialchars("?search=" . rawurlencode($searchrow["keywords"]) . "&notnewword=1") . "\"><u>" . $searchrow["keywords"] . "</u></a>&nbsp;&nbsp;";
$hotcount += mb_strlen($searchrow["keywords"], "UTF-8");
if ($hotcount > 60)
break;
}
$Cache->add_whole_row();
if ($hotsearch)
print("<tr><td class=\"embedded\" colspan=\"3\">&nbsp;&nbsp;" . $hotsearch . "</td></tr>");
$Cache->end_whole_row();
$Cache->cache_page();
}
echo $Cache->next_row();
?>
</table>
</td>
<td id="torrents_td" class="rowfollow" align="center">
<input type="submit" class="btn" value="<?php echo $lang_torrents['submit_go'] ?>" />
</td>
</tr>
<?php if ($CURUSER['clearnew'] == 1) { ?>
<tr style="height:25px;width:100%;text-align:center"><td colspan="2"><a href="?clearnew=1" class="button button-glow button-border button-rounded button-primary">清除新种标记</a></td></tr>
<?php } ?>
</tbody>
</table>
</form>
<?php
}
if ($Advertisement->enable_ad()) {
$belowsearchboxad = $Advertisement->get_ad('belowsearchbox');
echo "<div align=\"center\" style=\"margin-top: 10px\" id=\"ad_belowsearchbox\">" . $belowsearchboxad[0] . "</div>";
}
if ($inclbookmarked == 1) {
print("<h1 align=\"center\">" . get_username($CURUSER['id']) . $lang_torrents['text_s_bookmarked_torrent'] . "</h1>");
} elseif ($inclbookmarked == 2) {
print("<h1 align=\"center\">" . get_username($CURUSER['id']) . $lang_torrents['text_s_not_bookmarked_torrent'] . "</h1>");
}
if ($ratioless == 'no') {
print("<p align=\"center\"><a href=\"?spstate=2\" target=\"_self\" title=\"查看免费种子\" style=\"color: rgb(0, 0, 0);\"><font class=\"free\"><b>Free</b></font></a> | <a href=\"?spstate=3\" target=\"_self\" title=\"查看两倍上传种子\" style=\"color: rgb(0, 0, 0);\"><font class=\"twoup\"><b>2x</b></font></a> | <a href=\"?spstate=4\" target=\"_self\" title=\"查看免费且两倍上传种子\"><font class=\"twoupfree\"><b>2xFree</b></font></a> | <a href=\"?spstate=5\" target=\"_self\" title=\"查看50%下载种子\"><font class=\"halfdown\"><b>50%</b></font></a> | <a href=\"?spstate=6\" target=\"_self\" title=\"查看50%下载且两倍上传种子\"><font class=\"twouphalfdown\"><b>2x50%</b></font></a> | <a href=\"?spstate=7\" target=\"_self\" title=\"查看30%下载种子\"><font class=\"thirtypercent\"><b>30%</b></font></a></p>");
} else {
print("<p align=\"center\"><a href=\"?spstate=3\" target=\"_self\" title=\"查看两倍上传种子\" style=\"color: rgb(0, 0, 0);\"><font class=\"twoupfree\"><b>2x</b></font></a></p>");
}
if ($count) {
print($pagertop);
print("<form action=\"delete.php?recycle_mode=recycle\" method=\"post\">");
if ($sectiontype == $browsecatmode)
torrenttable($res, "torrents");
elseif ($sectiontype == $specialcatmode)
torrenttable($res, "music");
else
torrenttable($res, "bookmarks");
print($pagerbottom);
} else {
if (isset($searchstr)) {
print("<br />");
stdmsg($lang_torrents['std_search_results_for'] . $searchstr_ori . "\"", $lang_torrents['std_try_again']);
} else {
stdmsg($lang_torrents['std_nothing_found'], $lang_torrents['std_no_active_torrents']);
}
}
print("</td></tr></table>");
print("<div id=\"delete_form\" style=\"display:none\">");
print("<table border=\"1\" cellspacing=\"0\" cellpadding=\"5\">\n");
print("<tr><td class=\"colhead\" align=\"left\" style='padding-bottom: 3px' colspan=\"2\">" . $lang_edit['text_delete_torrent'] . "</td></tr>");
tr("<input name=\"reasontype\" type=\"radio\" value=\"1\" />&nbsp;" . $lang_edit['radio_dead'], $lang_edit['text_dead_note'], 1);
tr("<input name=\"reasontype\" type=\"radio\" value=\"2\" />&nbsp;" . $lang_edit['radio_dupe'], "<input type=\"text\" style=\"width: 200px\" name=\"reason[]\" />", 1);
tr("<input name=\"reasontype\" type=\"radio\" value=\"3\" />&nbsp;" . $lang_edit['radio_nuked'], "<input type=\"text\" style=\"width: 200px\" name=\"reason[]\" />", 1);
tr("<input name=\"reasontype\" type=\"radio\" value=\"4\" />&nbsp;" . $lang_edit['radio_rules'], "<input type=\"text\" style=\"width: 200px\" name=\"reason[]\" />" . $lang_edit['text_req'], 1);
tr("<input name=\"reasontype\" type=\"radio\" value=\"5\" checked=\"checked\" />&nbsp;" . $lang_edit['radio_other'], "<input type=\"text\" style=\"width: 200px\" name=\"reason[]\" />" . $lang_edit['text_req'], 1);
print("<tr><td class=\"toolbox\" colspan=\"2\" align=\"center\"><input type=\"submit\" style='height: 25px' value=\"移入回收站\" /></td></tr>");
?>
</table>
</div>
</form>
<script type="text/javascript">
$("#delete").click(function () {
$(this).attr("disabled", "disabled");
$("#delete_form").slideDown();
});
function checkAll()
{
$(".checkbox").each(function () {
this.checked = true;
});
}
function reverseCheck()
{
$(".checkbox").each(function () {
this.checked = !this.checked;
});
}
</script>
<?php
stdfoot();
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/mojie126/HDCN-PT.git
git@gitee.com:mojie126/HDCN-PT.git
mojie126
HDCN-PT
HDCN-PT
master

搜索帮助