From 3083cd206834b9ee589934a9472ffb8ff129fed6 Mon Sep 17 00:00:00 2001
From: tongyifan <565813476@qq.com>
Date: Mon, 20 May 2019 21:15:17 +0800
Subject: [PATCH] for [url], it's unnecessary..? (I'm not sure...)
---
catdetail_editoffers.php | 34 ++++++++++++++++++++--------------
catdetail_edittorrents.php | 34 ++++++++++++++++++++--------------
include/functions.php | 4 ++--
js/client.js | 6 +++---
showcategorydetail.php | 10 ++++++++--
sql/pt.sql | 6 ++++--
upload2.php | 14 ++++++++++++++
7 files changed, 71 insertions(+), 37 deletions(-)
create mode 100644 upload2.php
diff --git a/catdetail_editoffers.php b/catdetail_editoffers.php
index 0c73c40..1fdb52c 100644
--- a/catdetail_editoffers.php
+++ b/catdetail_editoffers.php
@@ -48,8 +48,14 @@ function tr_textcheckbox($x, $y, $listname, $z = "", $star = "")
$num = count($listarray);
$show = "
$star ";
foreach ($listarray as $row) {
- $id = $y . $row['id'];
- $show .= "";
+ if (substr_count($row['name'], ''))
+ $show .= str_replace('', '', $row['name']);
+ elseif ($row['name'] == '')
+ $show .= " ";
+ else {
+ $id = $y . $row['id'];
+ $show .= "";
+ }
}
$show .= " |
";
@@ -102,31 +108,31 @@ function tr_textradio($x, $y, $listname, $z = "", $star = "")
$resolution = $row['resolution'];
if ($catid == 401) {
- $imdbnum = $row['imdbnum'];
+// $imdbnum = $row['imdbnum'];
tr_text("中文名", "cname", $cname, $star);
tr_text("英文名", "ename", $ename, $star . "英文名为0day名,如:The.Kings.Speech.2010.BDRip.XviD-AMIABLE");
//tr_text("Imdb编号","imdbnum",$imdbnum,"如:tt0120815");
- tr_text("发行时间", "issuedate", $issuedate, $star);
- tr_textcheckbox("电影语言", "language", "langtvseries", $language, $star);
+// tr_text("发行时间", "issuedate", $issuedate, $star);
+// tr_textcheckbox("电影语言", "language", "langtvseries", $language, $star);
//tr_textcheckbox("电影类别","specificcat","catmovie",$specificcat,$star);
- tr_textradio("电影文件格式", "format", "formatmovie", $format, $star);
- tr_select("字幕情况", "subsinfo", $subsinfo, $star);
+// tr_textradio("电影文件格式", "format", "formatmovie", $format, $star);
+// tr_select("字幕情况", "subsinfo", $subsinfo, $star);
tr_textcheckbox("制作国家/地区", "district", "districtmovie", $district, $star);
} elseif ($catid == "402") {
- $tvalias = $row['tvalias'];
- $tvseasoninfo = $row['tvseasoninfo'];
+// $tvalias = $row['tvalias'];
+// $tvseasoninfo = $row['tvseasoninfo'];
tr_text("中文名", "cname", $cname, $star);
tr_text("英文名", "ename", $ename);
- tr_text("别名", "tvalias", $tvalias);
- tr_text("剧集季度信息", "tvseasoninfo", $tvseasoninfo);
+// tr_text("别名", "tvalias", $tvalias);
+// tr_text("剧集季度信息", "tvseasoninfo", $tvseasoninfo);
tr_textcheckbox("剧集类型", "specificcat", "catseries", $specificcat, $star);
- tr_textcheckbox("剧集文件格式", "format", "formattvseries", $format);
- tr_select("字幕情况", "subsinfo", $subsinfo);
- tr_textcheckbox("剧集语言", "language", "langtvseries", $language, $star);
+// tr_textcheckbox("剧集文件格式", "format", "formattvseries", $format);
+// tr_select("字幕情况", "subsinfo", $subsinfo);
+// tr_textcheckbox("剧集语言", "language", "langtvseries", $language, $star);
} elseif ($catid == "403") {
$tvshowscontent = $row['tvshowscontent'];
$tvshowsguest = $row['tvshowsguest'];
diff --git a/catdetail_edittorrents.php b/catdetail_edittorrents.php
index b75ada3..4f8c588 100644
--- a/catdetail_edittorrents.php
+++ b/catdetail_edittorrents.php
@@ -48,8 +48,14 @@ function tr_textcheckbox($x, $y, $listname, $z = "", $star = "")
$num = count($listarray);
$show = "$star ";
foreach ($listarray as $row) {
- $id = $y . $row['id'];
- $show .= "";
+ if (substr_count($row['name'], ''))
+ $show .= str_replace('', '', $row['name']);
+ elseif ($row['name'] == '')
+ $show .= " ";
+ else {
+ $id = $y . $row['id'];
+ $show .= "";
+ }
}
$show .= " |
";
@@ -102,31 +108,31 @@ function tr_textradio($x, $y, $listname, $z = "", $star = "")
$resolution = $row['resolution'];
if ($catid == 401) {
- $imdbnum = $row['imdbnum'];
+// $imdbnum = $row['imdbnum'];
tr_text("中文名", "cname", $cname, $star);
tr_text("英文名", "ename", $ename, $star . "英文名为0day名,如:The.Kings.Speech.2010.BDRip.XviD-AMIABLE");
//tr_text("Imdb编号","imdbnum",$imdbnum,"如:tt0120815");
- tr_text("发行时间", "issuedate", $issuedate, $star);
- tr_textcheckbox("电影语言", "language", "langtvseries", $language, $star);
+ //tr_text("发行时间", "issuedate", $issuedate, $star);
+ //tr_textcheckbox("电影语言", "language", "langtvseries", $language, $star);
//tr_textcheckbox("电影类别","specificcat","catmovie",$specificcat,$star);
- tr_textradio("电影文件格式", "format", "formatmovie", $format, $star);
- tr_select("字幕情况", "subsinfo", $subsinfo, $star);
+ //tr_textradio("电影文件格式", "format", "formatmovie", $format, $star);
+ //tr_select("字幕情况", "subsinfo", $subsinfo, $star);
tr_textcheckbox("制作国家/地区", "district", "districtmovie", $district, $star);
} elseif ($catid == "402") {
- $tvalias = $row['tvalias'];
- $tvseasoninfo = $row['tvseasoninfo'];
+// $tvalias = $row['tvalias'];
+// $tvseasoninfo = $row['tvseasoninfo'];
tr_text("中文名", "cname", $cname, $star);
tr_text("英文名", "ename", $ename);
- tr_text("别名", "tvalias", $tvalias);
- tr_text("剧集季度信息", "tvseasoninfo", $tvseasoninfo);
+ //tr_text("别名", "tvalias", $tvalias);
+ //tr_text("剧集季度信息", "tvseasoninfo", $tvseasoninfo);
tr_textcheckbox("剧集类型", "specificcat", "catseries", $specificcat, $star);
- tr_textcheckbox("剧集文件格式", "format", "formattvseries", $format);
- tr_select("字幕情况", "subsinfo", $subsinfo);
- tr_textcheckbox("剧集语言", "language", "langtvseries", $language, $star);
+ //tr_textcheckbox("剧集文件格式", "format", "formattvseries", $format);
+ //tr_select("字幕情况", "subsinfo", $subsinfo);
+ //tr_textcheckbox("剧集语言", "language", "langtvseries", $language, $star);
} elseif ($catid == "403") {
$tvshowscontent = $row['tvshowscontent'];
$tvshowsguest = $row['tvshowsguest'];
diff --git a/include/functions.php b/include/functions.php
index b5ca55f..f316b26 100755
--- a/include/functions.php
+++ b/include/functions.php
@@ -576,10 +576,10 @@ function format_comment($text, $strip_html = true, $xssclean = false, $newtab =
return formatUrl($matches[1], ($newtab == true ? 1 : 0), $matches[2], 'faqlink');
}
};
- $s = preg_replace_callback("/\[url=([^\[\s\"'\(\)]+?)\](.+?)\[\/url\]/i", $anon_formatUrl_Callback_with_adid, $s);
+ $s = preg_replace_callback("/\[url=([^\[\s]+?)\](.+?)\[\/url\]/i", $anon_formatUrl_Callback_with_adid, $s);
// [url]http://www.example.com[/url]
- $s = preg_replace_callback("/\[url\]([^\[\s\"'\(\)]+?)\[\/url\]/i", function ($matches) use ($newtab) {
+ $s = preg_replace_callback("/\[url\]([^\[\s]+?)\[\/url\]/i", function ($matches) use ($newtab) {
return formatUrl($matches[1], ($newtab == true ? 1 : 0), '', 'faqlink');
}, $s);
diff --git a/js/client.js b/js/client.js
index c448f45..ca5d953 100644
--- a/js/client.js
+++ b/js/client.js
@@ -56,9 +56,9 @@ function getcheckboxvalue(textid,number) {
Q.value = "";
for (var i=1;i<=number;i++) {
- id = textid + i;
+ var id = textid + i;
var e = document.getElementById(id);
- if ( e.checked == true) {
+ if ( e !== null && e.checked === true) {
Q.value = Q.value + e.value + "/"
}
}
@@ -92,7 +92,7 @@ function QueryString()
//构造参数对象并初始化
var name,value,i;
var str=location.href;//获得浏览器地址栏URL串
- var num=str.indexOf("?")
+ var num=str.indexOf("?");
str=str.substr(num+1);//截取“?”后面的参数串
var arrtmp=str.split("&");//将各参数分离形成参数数组
for(i=0;i < arrtmp.length;i++)
diff --git a/showcategorydetail.php b/showcategorydetail.php
index 817a44e..8bc494d 100644
--- a/showcategorydetail.php
+++ b/showcategorydetail.php
@@ -34,8 +34,14 @@ function tr_textcheckbox($x, $y, $z, $star = "")
$num = count($listarray);
$show = "$star ";
foreach ($listarray as $row) {
- $id = $y . $row['id'];
- $show .= "";
+ if (substr_count($row['name'], ''))
+ $show .= str_replace('', '', $row['name']);
+ elseif ($row['name'] == '')
+ $show .= " ";
+ else {
+ $id = $y . $row['id'];
+ $show .= "";
+ }
}
$show .= " |
";
diff --git a/sql/pt.sql b/sql/pt.sql
index 0722fe9..e2e537a 100755
--- a/sql/pt.sql
+++ b/sql/pt.sql
@@ -2350,7 +2350,9 @@ CREATE TABLE `torrents` (
`bonus_sale` enum('2up_free','2x_half','2up','free','half_down','normal') NOT NULL DEFAULT 'normal',
`exclusive` enum('yes','no') NOT NULL DEFAULT 'no',
`tjuptrip` enum('yes','no') NOT NULL DEFAULT 'no',
- `connectable` varchar(11) DEFAULT '-/-/-'
+ `connectable` varchar(11) DEFAULT '-/-/-',
+ `douban_id` int(10) UNSIGNED DEFAULT NULL,
+ `douban_rating` varchar(5) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
@@ -2959,7 +2961,7 @@ ALTER TABLE `files`
-- 表的索引 `formatanime`
--
ALTER TABLE `formatanime`
- ADD PRIMARY KEY (`name`);
+ ADD PRIMARY KEY (`id`);
--
-- 表的索引 `formatdocum`
diff --git a/upload2.php b/upload2.php
new file mode 100644
index 0000000..35d1806
--- /dev/null
+++ b/upload2.php
@@ -0,0 +1,14 @@
+