Skip to content

Commit

Permalink
fix: 修复#20的一些bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tongyifan committed Jun 17, 2019
1 parent 91e4126 commit d3e64dc
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 36 deletions.
34 changes: 20 additions & 14 deletions catdetail_editoffers.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,14 @@ function tr_textcheckbox($x, $y, $listname, $z = "", $star = "")
$num = count($listarray);
$show = "<tr class=\"rowfollow\" ><td class=\"no_border\" valign=\"top\" align=\"right\"><label><strong>" . $x . "</strong><input type=\"text\" size=\"50\" maxlength=\"100\" id=\"" . $y . "\" name=\"" . $y . "\" value=\"" . $z . "\"></label>$star<br>";
foreach ($listarray as $row) {
$id = $y . $row['id'];
$show .= "<label><INPUT id=" . $id . " type=checkbox value=" . $row['name'] . " name=" . $row['name'] . " onClick=getcheckboxvalue('" . $y . "'," . $num . ")>" . $row['name'] . "</label>";
if (substr_count($row['name'], '<text>'))
$show .= str_replace('<text>', '', $row['name']);
elseif ($row['name'] == '<linebreak>')
$show .= "<br />";
else {
$id = $y . $row['id'];
$show .= "<label><input id=" . $id . " type=checkbox value=" . $row['name'] . " name=" . $row['name'] . " onClick=getcheckboxvalue('" . $y . "'," . $num . ")>" . $row['name'] . "</label>";
}
}
$show .= "</td></tr><div class=\"clear1\"></div>";

Expand Down Expand Up @@ -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'];
Expand Down
36 changes: 21 additions & 15 deletions catdetail_edittorrents.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,14 @@ function tr_textcheckbox($x, $y, $listname, $z = "", $star = "")
$num = count($listarray);
$show = "<tr class=\"rowfollow\" ><td class=\"no_border\" valign=\"top\" align=\"right\"><label><strong>" . $x . "</strong><input type=\"text\" size=\"50\" maxlength=\"100\" id=\"" . $y . "\" name=\"" . $y . "\" value=\"" . $z . "\"></label>$star<br>";
foreach ($listarray as $row) {
$id = $y . $row['id'];
$show .= "<label><INPUT id=" . $id . " type=checkbox value=" . $row['name'] . " name=" . $row['name'] . " onClick=getcheckboxvalue('" . $y . "'," . $num . ")>" . $row['name'] . "</label>";
if (substr_count($row['name'], '<text>'))
$show .= str_replace('<text>', '', $row['name']);
elseif ($row['name'] == '<linebreak>')
$show .= "<br />";
else {
$id = $y . $row['id'];
$show .= "<label><input id=" . $id . " type=checkbox value=" . $row['name'] . " name=" . $row['name'] . " onClick=getcheckboxvalue('" . $y . "'," . $num . ")>" . $row['name'] . "</label>";
}
}
$show .= "</td></tr><div class=\"clear1\"></div>";

Expand Down Expand Up @@ -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'];
Expand All @@ -141,7 +147,7 @@ function tr_textradio($x, $y, $listname, $z = "", $star = "")
tr_textcheckbox("国家/地区", "district", "districttvshows", $district);
tr_select("字幕情况", "subsinfo", $subsinfo);
tr_textcheckbox("节目语言", "language", "langtvshows", $language);
tr_textradio("节目格式", "format", "formattvshows", $format, "格式");
tr_textradio("节目格式", "format", "formattvshows", $format);

tr_text("备注", "tvshowsremarks", $tvshowsremarks);
} elseif ($catid == "404") {
Expand Down
6 changes: 3 additions & 3 deletions js/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 + "/"
}
}
Expand Down Expand Up @@ -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++)
Expand Down
10 changes: 8 additions & 2 deletions showcategorydetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,14 @@ function tr_textcheckbox($x, $y, $z, $star = "")
$num = count($listarray);
$show = "<tr class=\"rowfollow\" ><td class=\"no_border\" valign=\"top\" align=\"right\"><label><strong>" . $x . "</strong><input type=\"text\" size=\"50\" maxlength=\"100\" id=\"" . $y . "\" name=\"" . $y . "\"></label>$star<br>";
foreach ($listarray as $row) {
$id = $y . $row['id'];
$show .= "<label><input id=" . $id . " type=checkbox value=" . $row['name'] . " name=" . $row['name'] . " onClick=getcheckboxvalue('" . $y . "'," . $num . ") />" . $row['name'] . "</label>";
if (substr_count($row['name'], '<text>'))
$show .= str_replace('<text>', '', $row['name']);
elseif ($row['name'] == '<linebreak>')
$show .= "<br />";
else {
$id = $y . $row['id'];
$show .= "<label><input id=" . $id . " type=checkbox value=" . $row['name'] . " name=" . $row['name'] . " onClick=getcheckboxvalue('" . $y . "'," . $num . ") />" . $row['name'] . "</label>";
}
}
$show .= "</td></tr><div class=\"clear1\"></div>";

Expand Down
2 changes: 1 addition & 1 deletion sql/pt.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2960,7 +2960,7 @@ ALTER TABLE `files`
-- 表的索引 `formatanime`
--
ALTER TABLE `formatanime`
ADD PRIMARY KEY (`name`);
ADD PRIMARY KEY (`id`);

--
-- 表的索引 `formatdocum`
Expand Down
2 changes: 1 addition & 1 deletion takeupload.php
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ function hex_esc2($matches)
// $result = sql_query("SELECT * FROM subsinfo WHERE id = " . $subsinfo);
// $result_ = mysql_fetch_array($result);
// $nameset .= "[" . $result_ ['name'] . "]";
}
// }
}
if ($catid == 403) {
$tvshowscontent = (trimcomma($_POST ["tvshowscontent"]));
Expand Down

0 comments on commit d3e64dc

Please sign in to comment.