Merge branch 'promotion' into php8

This commit is contained in:
xiaomlove
2021-05-26 21:46:01 +08:00
16 changed files with 155 additions and 74 deletions
+4 -2
View File
@@ -508,7 +508,7 @@ function begin_main_frame($caption = "", $center = false, $width = 100)
if ($center) if ($center)
$tdextra .= " align=\"center\""; $tdextra .= " align=\"center\"";
$width = 940 * $width /100; $width = 1200 * $width /100;
print("<table class=\"main\" width=\"".$width."\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">" . print("<table class=\"main\" width=\"".$width."\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">" .
"<tr><td class=\"embedded\" $tdextra>"); "<tr><td class=\"embedded\" $tdextra>");
@@ -2338,6 +2338,8 @@ if ($CURUSER){
<script type="text/javascript" src="domTT.js<?php echo $cssupdatedate?>"></script> <script type="text/javascript" src="domTT.js<?php echo $cssupdatedate?>"></script>
<script type="text/javascript" src="domTT_drag.js<?php echo $cssupdatedate?>"></script> <script type="text/javascript" src="domTT_drag.js<?php echo $cssupdatedate?>"></script>
<script type="text/javascript" src="fadomatic.js<?php echo $cssupdatedate?>"></script> <script type="text/javascript" src="fadomatic.js<?php echo $cssupdatedate?>"></script>
<script type="text/javascript" src="jquery-1.12.4.min.js<?php echo $cssupdatedate?>"></script>
<script type="text/javascript">jQuery.noConflict();</script>
</head> </head>
<body> <body>
<table class="head" cellspacing="0" cellpadding="0" align="center"> <table class="head" cellspacing="0" cellpadding="0" align="center">
@@ -2375,7 +2377,7 @@ if ($enabledonation == 'yes'){?>
</tr> </tr>
</table> </table>
<table class="mainouter" width="982" cellspacing="0" cellpadding="5" align="center"> <table class="mainouter" width="1200" cellspacing="0" cellpadding="5" align="center">
<tr><td id="nav_block" class="text" align="center"> <tr><td id="nav_block" class="text" align="center">
<?php if (!$CURUSER) { ?> <?php if (!$CURUSER) { ?>
<a href="login.php"><font class="big"><b><?php echo $lang_functions['text_login'] ?></b></font></a> / <a href="signup.php"><font class="big"><b><?php echo $lang_functions['text_signup'] ?></b></font></a> <a href="login.php"><font class="big"><b><?php echo $lang_functions['text_login'] ?></b></font></a> / <a href="signup.php"><font class="big"><b><?php echo $lang_functions['text_signup'] ?></b></font></a>
+1 -1
View File
@@ -383,7 +383,7 @@ begin_main_frame();
list($pagertop, $pagerbottom, $limit) = pager($perpage, $num, "?"); list($pagertop, $pagerbottom, $limit) = pager($perpage, $num, "?");
$res = sql_query("SELECT * FROM advertisements ORDER BY id DESC ".$limit) or sqlerr(__FILE__, __LINE__); $res = sql_query("SELECT * FROM advertisements ORDER BY id DESC ".$limit) or sqlerr(__FILE__, __LINE__);
?> ?>
<table border="1" cellspacing="0" cellpadding="5" width="940"> <table border="1" cellspacing="0" cellpadding="5" width="<?=MAIN_WIDTH?>">
<tr> <tr>
<td class="colhead"><?php echo $lang_admanage['col_enabled']?></td> <td class="colhead"><?php echo $lang_admanage['col_enabled']?></td>
<td class="colhead"><?php echo $lang_admanage['col_name']?></td> <td class="colhead"><?php echo $lang_admanage['col_name']?></td>
+5 -5
View File
@@ -163,7 +163,7 @@ function print_sub_category_list($type)
list($pagertop, $pagerbottom, $limit) = pager($perpage, $num, "?"); list($pagertop, $pagerbottom, $limit) = pager($perpage, $num, "?");
$res = sql_query("SELECT * FROM ".$dbtablename." ORDER BY id DESC ".$limit) or sqlerr(__FILE__, __LINE__); $res = sql_query("SELECT * FROM ".$dbtablename." ORDER BY id DESC ".$limit) or sqlerr(__FILE__, __LINE__);
?> ?>
<table border="1" cellspacing="0" cellpadding="5" width="940"> <table border="1" cellspacing="0" cellpadding="5" width="97%">
<tr> <tr>
<td class="colhead"><?php echo $lang_catmanage['col_id']?></td> <td class="colhead"><?php echo $lang_catmanage['col_id']?></td>
<td class="colhead"><?php echo $lang_catmanage['col_name']?></td> <td class="colhead"><?php echo $lang_catmanage['col_name']?></td>
@@ -401,7 +401,7 @@ if ($action == 'view')
list($pagertop, $pagerbottom, $limit) = pager($perpage, $num, "?"); list($pagertop, $pagerbottom, $limit) = pager($perpage, $num, "?");
$res = sql_query("SELECT * FROM ".$dbtablename." ORDER BY id ASC ".$limit) or sqlerr(__FILE__, __LINE__); $res = sql_query("SELECT * FROM ".$dbtablename." ORDER BY id ASC ".$limit) or sqlerr(__FILE__, __LINE__);
?> ?>
<table border="1" cellspacing="0" cellpadding="5" width="940"> <table border="1" cellspacing="0" cellpadding="5" width="97%">
<tr> <tr>
<td class="colhead"><?php echo $lang_catmanage['col_id']?></td> <td class="colhead"><?php echo $lang_catmanage['col_id']?></td>
<td class="colhead"><?php echo $lang_catmanage['col_name']?></td> <td class="colhead"><?php echo $lang_catmanage['col_name']?></td>
@@ -455,7 +455,7 @@ print($pagerbottom);
list($pagertop, $pagerbottom, $limit) = pager($perpage, $num, "?"); list($pagertop, $pagerbottom, $limit) = pager($perpage, $num, "?");
$res = sql_query("SELECT * FROM ".$dbtablename." ORDER BY id ASC ".$limit) or sqlerr(__FILE__, __LINE__); $res = sql_query("SELECT * FROM ".$dbtablename." ORDER BY id ASC ".$limit) or sqlerr(__FILE__, __LINE__);
?> ?>
<table border="1" cellspacing="0" cellpadding="5" width="940"> <table border="1" cellspacing="0" cellpadding="5" width="97%">
<tr> <tr>
<td class="colhead"><?php echo $lang_catmanage['col_id']?></td> <td class="colhead"><?php echo $lang_catmanage['col_id']?></td>
<td class="colhead"><?php echo $lang_catmanage['col_name']?></td> <td class="colhead"><?php echo $lang_catmanage['col_name']?></td>
@@ -501,7 +501,7 @@ print($pagerbottom);
list($pagertop, $pagerbottom, $limit) = pager($perpage, $num, "?"); list($pagertop, $pagerbottom, $limit) = pager($perpage, $num, "?");
$res = sql_query("SELECT * FROM ".$dbtablename." ORDER BY id ASC ".$limit) or sqlerr(__FILE__, __LINE__); $res = sql_query("SELECT * FROM ".$dbtablename." ORDER BY id ASC ".$limit) or sqlerr(__FILE__, __LINE__);
?> ?>
<table border="1" cellspacing="0" cellpadding="5" width="940"> <table border="1" cellspacing="0" cellpadding="5" width="97%">
<tr> <tr>
<td class="colhead"><?php echo $lang_catmanage['col_id']?></td> <td class="colhead"><?php echo $lang_catmanage['col_id']?></td>
<td class="colhead"><?php echo $lang_catmanage['col_name']?></td> <td class="colhead"><?php echo $lang_catmanage['col_name']?></td>
@@ -554,7 +554,7 @@ print($pagerbottom);
$res = sql_query("SELECT ".$dbtablename.".*, searchbox.name AS catmodename, caticons.name as icon_name FROM ".$dbtablename." LEFT JOIN searchbox ON ".$dbtablename.".mode=searchbox.id left join caticons on caticons.id = $dbtablename.icon_id ORDER BY ".$dbtablename.".mode ASC, ".$dbtablename.".id ASC ".$limit) or sqlerr(__FILE__, __LINE__); $res = sql_query("SELECT ".$dbtablename.".*, searchbox.name AS catmodename, caticons.name as icon_name FROM ".$dbtablename." LEFT JOIN searchbox ON ".$dbtablename.".mode=searchbox.id left join caticons on caticons.id = $dbtablename.icon_id ORDER BY ".$dbtablename.".mode ASC, ".$dbtablename.".id ASC ".$limit) or sqlerr(__FILE__, __LINE__);
?> ?>
<table border="1" cellspacing="0" cellpadding="5" width="940"> <table border="1" cellspacing="0" cellpadding="5" width="97%">
<tr> <tr>
<td class="colhead"><?php echo $lang_catmanage['col_id']?></td> <td class="colhead"><?php echo $lang_catmanage['col_id']?></td>
<td class="colhead"><?php echo $lang_catmanage['col_mode']?></td> <td class="colhead"><?php echo $lang_catmanage['col_mode']?></td>
+1 -1
View File
@@ -55,7 +55,7 @@ else {
$s=htmlspecialchars($row["name"]).($sp_torrent ? "&nbsp;&nbsp;&nbsp;".$sp_torrent : ""); $s=htmlspecialchars($row["name"]).($sp_torrent ? "&nbsp;&nbsp;&nbsp;".$sp_torrent : "");
print("<h1 align=\"center\" id=\"top\">".$s."</h1>\n"); print("<h1 align=\"center\" id=\"top\">".$s."</h1>\n");
print("<table width=\"940\" cellspacing=\"0\" cellpadding=\"5\">\n"); print("<table width=\"97%\" cellspacing=\"0\" cellpadding=\"5\">\n");
$url = "edit.php?id=" . $row["id"]; $url = "edit.php?id=" . $row["id"];
if (isset($_GET["returnto"])) { if (isset($_GET["returnto"])) {
+77 -3
View File
@@ -53,7 +53,7 @@ else {
print("<input type=\"hidden\" name=\"id\" value=\"$id\" />"); print("<input type=\"hidden\" name=\"id\" value=\"$id\" />");
if (isset($_GET["returnto"])) if (isset($_GET["returnto"]))
print("<input type=\"hidden\" name=\"returnto\" value=\"" . htmlspecialchars($_GET["returnto"]) . "\" />"); print("<input type=\"hidden\" name=\"returnto\" value=\"" . htmlspecialchars($_GET["returnto"]) . "\" />");
print("<table border=\"1\" cellspacing=\"0\" cellpadding=\"5\" width=\"940\">\n"); print("<table border=\"1\" cellspacing=\"0\" cellpadding=\"5\" width=\"97%\">\n");
print("<tr><td class='colhead' colspan='2' align='center'>".htmlspecialchars($row["name"])."</td></tr>"); print("<tr><td class='colhead' colspan='2' align='center'>".htmlspecialchars($row["name"])."</td></tr>");
tr($lang_edit['row_torrent_name']."<font color=\"red\">*</font>", "<input type=\"text\" style=\"width: 650px;\" name=\"name\" value=\"" . htmlspecialchars($row["name"]) . "\" />", 1); tr($lang_edit['row_torrent_name']."<font color=\"red\">*</font>", "<input type=\"text\" style=\"width: 650px;\" name=\"name\" value=\"" . htmlspecialchars($row["name"]) . "\" />", 1);
if ($smalldescription_main == 'yes') if ($smalldescription_main == 'yes')
@@ -148,11 +148,23 @@ else {
tr($lang_functions['text_tags'], torrentTags($row['tags'], 'checkbox'), 1); tr($lang_functions['text_tags'], torrentTags($row['tags'], 'checkbox'), 1);
tr($lang_edit['row_check'], "<input type=\"checkbox\" name=\"visible\"" . ($row["visible"] == "yes" ? " checked=\"checked\"" : "" ) . " value=\"1\" /> ".$lang_edit['checkbox_visible']."&nbsp;&nbsp;&nbsp;".(get_user_class() >= $beanonymous_class || get_user_class() >= $torrentmanage_class ? "<input type=\"checkbox\" name=\"anonymous\"" . ($row["anonymous"] == "yes" ? " checked=\"checked\"" : "" ) . " value=\"1\" />".$lang_edit['checkbox_anonymous_note']."&nbsp;&nbsp;&nbsp;" : "").(get_user_class() >= $torrentmanage_class ? "<input type=\"checkbox\" name=\"banned\"" . (($row["banned"] == "yes") ? " checked=\"checked\"" : "" ) . " value=\"yes\" /> ".$lang_edit['checkbox_banned'] : ""), 1); tr($lang_edit['row_check'], "<input type=\"checkbox\" name=\"visible\"" . ($row["visible"] == "yes" ? " checked=\"checked\"" : "" ) . " value=\"1\" /> ".$lang_edit['checkbox_visible']."&nbsp;&nbsp;&nbsp;".(get_user_class() >= $beanonymous_class || get_user_class() >= $torrentmanage_class ? "<input type=\"checkbox\" name=\"anonymous\"" . ($row["anonymous"] == "yes" ? " checked=\"checked\"" : "" ) . " value=\"1\" />".$lang_edit['checkbox_anonymous_note']."&nbsp;&nbsp;&nbsp;" : "").(get_user_class() >= $torrentmanage_class ? "<input type=\"checkbox\" name=\"banned\"" . (($row["banned"] == "yes") ? " checked=\"checked\"" : "" ) . " value=\"yes\" /> ".$lang_edit['checkbox_banned'] : ""), 1);
if (get_user_class()>= $torrentsticky_class || (get_user_class() >= $torrentmanage_class && $CURUSER["picker"] == 'yes')){ if (get_user_class()>= $torrentsticky_class || (get_user_class() >= $torrentmanage_class && $CURUSER["picker"] == 'yes')){
$pickcontent = ""; $pickcontent = $pickcontentPrefix = "";
if(get_user_class() >= $torrentonpromotion_class)
{
$pickcontent .= "<b>".$lang_edit['row_special_torrent'].":&nbsp;</b>"."<select name=\"sel_spstate\" style=\"width: 100px;\">" .promotion_selection($row["sp_state"], 0). "</select>&nbsp;&nbsp;&nbsp;".'<select name="promotion_time_type" onchange="if (this.value == \'2\') {document.getElementById(\'promotion_until_note\').style.display = \'\';} else {document.getElementById(\'promotion_until_note\').style.display = \'none\';}"><option value="0"'.($row['promotion_time_type'] == 0 ? ' selected="selected"' : '').'>'.$lang_edit['select_use_global_setting'].'</option><option value="1"'.($row['promotion_time_type'] == 1 ? ' selected="selected"' : '').'>'.$lang_edit['select_forever'].'</option><option value="2"'.($row['promotion_time_type'] == 2 ? ' selected="selected"' : '').'>'.$lang_edit['select_until'].'</option></select><span id="promotion_until_note"'.($row['promotion_time_type'] == 2 ? '' : ' style="display: none;"').'>';
$pickcontent .= '<input type="text" id="promotionuntiltime" name="promotionuntil" style="width: 120px;" value="'.($row['promotion_until'] > $row['added'] ? $row['promotion_until'] : '').'" />';
$pickcontent .= '&nbsp;('.$lang_edit['text_ie_for'].'<select name="promotionaddedtime" onchange="document.getElementById(\'promotionuntiltime\').value=this.value;"><option value="'.($row['promotion_until'] > $row['added'] ? $row['promotion_until'] : '').'">'.$lang_edit['text_keep_current'].'</option>';
foreach (array(900, 1800, 3600, 5400, 7200, 14400, 21600, 28800, 43200, 64800, 86400, 129600, 259200, 604800, 1296000, 2592000, 7776000, 15552000, 31104000) as $seconds) {
$pickcontent .= getAddedTimeOption(strtotime($row['added']), $seconds);
}
$pickcontent .= '</select>)&nbsp;'.$lang_edit['text_promotion_until_note'].'</span>&nbsp;&nbsp;';
}
if(get_user_class()>=$torrentsticky_class) if(get_user_class()>=$torrentsticky_class)
{ {
$pickcontent .= "<b>".$lang_edit['row_special_torrent'].":&nbsp;</b>"."<select name=\"sel_spstate\" style=\"width: 100px;\">" .promotion_selection($row["sp_state"], 0). "</select>&nbsp;&nbsp;&nbsp;"; if ($pickcontent) {
$pickcontent .= "<br />";
}
$pickcontent .= "<b>".$lang_edit['row_torrent_position'].":&nbsp;</b>"."<select name=\"sel_posstate\" style=\"width: 100px;\">" . $pickcontent .= "<b>".$lang_edit['row_torrent_position'].":&nbsp;</b>"."<select name=\"sel_posstate\" style=\"width: 100px;\">" .
"<option" . (($row["pos_state"] == "normal") ? " selected=\"selected\"" : "" ) . " value=\"0\">".$lang_edit['select_normal']."</option>" . "<option" . (($row["pos_state"] == "normal") ? " selected=\"selected\"" : "" ) . " value=\"0\">".$lang_edit['select_normal']."</option>" .
"<option" . (($row["pos_state"] == "sticky") ? " selected=\"selected\"" : "" ) . " value=\"1\">".$lang_edit['select_sticky']."</option>" . "<option" . (($row["pos_state"] == "sticky") ? " selected=\"selected\"" : "" ) . " value=\"1\">".$lang_edit['select_sticky']."</option>" .
@@ -160,6 +172,7 @@ else {
} }
if(get_user_class()>=$torrentmanage_class && $CURUSER["picker"] == 'yes') if(get_user_class()>=$torrentmanage_class && $CURUSER["picker"] == 'yes')
{ {
if ($pickcontent) $pickcontent .= '<br />';
$pickcontent .= "<b>".$lang_edit['row_recommended_movie'].":&nbsp;</b>"."<select name=\"sel_recmovie\" style=\"width: 100px;\">" . $pickcontent .= "<b>".$lang_edit['row_recommended_movie'].":&nbsp;</b>"."<select name=\"sel_recmovie\" style=\"width: 100px;\">" .
"<option" . (($row["picktype"] == "normal") ? " selected=\"selected\"" : "" ) . " value=\"0\">".$lang_edit['select_normal']."</option>" . "<option" . (($row["picktype"] == "normal") ? " selected=\"selected\"" : "" ) . " value=\"0\">".$lang_edit['select_normal']."</option>" .
"<option" . (($row["picktype"] == "hot") ? " selected=\"selected\"" : "" ) . " value=\"1\">".$lang_edit['select_hot']."</option>" . "<option" . (($row["picktype"] == "hot") ? " selected=\"selected\"" : "" ) . " value=\"1\">".$lang_edit['select_hot']."</option>" .
@@ -188,5 +201,66 @@ else {
print("<tr><td class=\"toolbox\" colspan=\"2\" align=\"center\"><input type=\"submit\" style='height: 25px' value=\"".$lang_edit['submit_delete_it']."\" /></td></tr>\n"); print("<tr><td class=\"toolbox\" colspan=\"2\" align=\"center\"><input type=\"submit\" style='height: 25px' value=\"".$lang_edit['submit_delete_it']."\" /></td></tr>\n");
print("</table>"); print("</table>");
print("</form>\n"); print("</form>\n");
$json_sticky_series = json_encode(array(4, 6, 12, 24, 36, 48, 72, 168, 360));
echo <<<EOT
<script>
jQuery(function($){
var date_format = function (date) {
var seperator1 = "-";
var seperator2 = ":";
var month = date.getMonth() + 1;
var strDate = date.getDate();
var strHour = date.getHours();
var strMinute = date.getMinutes();
var strSecond = date.getSeconds();
if (month >= 1 && month <= 9) {
month = "0" + month;
}
if (strDate >= 0 && strDate <= 9) {
strDate = "0" + strDate;
}
if (strHour >= 0 && strHour <= 9) strHour = "0" + strHour;
if (strMinute >= 0 && strMinute <= 9) strMinute = "0" + strMinute;
if (strSecond >= 0 && strSecond <= 9) strSecond = "0" + strSecond;
return date.getFullYear() + seperator1 + month + seperator1 + strDate
+ " " + strHour + seperator2 + strMinute
+ seperator2 + strSecond;
}
var pos_until_select = $("#pos_until_select");
var pos_until = $("#pos_until");
$("#pos_group").change(function(){
if($(this).val() == 0){
pos_until.hide();
pos_until_select.hide();
}else{
pos_until.show();
pos_until_select.show();
}
}).change();
var series = $json_sticky_series;
series.forEach(function(elem){
var label = elem >= 72 ? parseInt(parseInt(elem) / 24) + "{$lang_functions['text_day']}" : elem + "{$lang_functions['text_hour']}";
pos_until_select.append('<option value="' + elem + '">' + label + '</option>');
});
pos_until_select.change(function(){
var value = $(this).val();
if(value == -1){
pos_until.val("0000-00-00 00:00:00").attr("readonly", true);
}else if(value == 0){
pos_until.attr("readonly", false);
}else if(value > 0){
var curr = pos_until.val();
var d = new Date(Date.now() + 3600000 * value);
pos_until.attr("readonly", true).val(date_format(d));
}
}).change();
});
</script>
EOT;
} }
stdfoot(); stdfoot();
function getAddedTimeOption($timeStamp, $addSeconds) {
$timeStamp += $addSeconds;
$timeString = date("Y-m-d H:i:s", $timeStamp);
return '<option value="'.$timeString.'">'.mkprettytime($addSeconds).'</option>';
}
+5 -5
View File
@@ -611,7 +611,7 @@ if ($action == "viewtopic")
//------ Print table //------ Print table
begin_main_frame(); begin_main_frame();
print("<table border=\"0\" class=\"main\" cellspacing=\"0\" cellpadding=\"5\" width=\"940\"><tr>\n"); print("<table border=\"0\" class=\"main\" cellspacing=\"0\" cellpadding=\"5\" width=\"97%\"><tr>\n");
print("<td class=\"embedded\" width=\"99%\">&nbsp;&nbsp;".$lang_forums['there_is']."<b>".$views."</b>".$lang_forums['hits_on_this_topic']); print("<td class=\"embedded\" width=\"99%\">&nbsp;&nbsp;".$lang_forums['there_is']."<b>".$views."</b>".$lang_forums['hits_on_this_topic']);
print("</td>\n"); print("</td>\n");
print("<td class=\"embedded nowrap\" width=\"1%\" align=\"right\">"); print("<td class=\"embedded nowrap\" width=\"1%\" align=\"right\">");
@@ -1109,7 +1109,7 @@ if ($action == "viewforum")
if (!$maypost) if (!$maypost)
print("<p><i>".$lang_forums['text_unpermitted_starting_new_topics']."</i></p>\n"); print("<p><i>".$lang_forums['text_unpermitted_starting_new_topics']."</i></p>\n");
print("<table border=\"0\" class=\"main\" cellspacing=\"0\" cellpadding=\"5\" width=\"940\"><tr>\n"); print("<table border=\"0\" class=\"main\" cellspacing=\"0\" cellpadding=\"5\" width=\"97%\"><tr>\n");
print("<td class=\"embedded\" width=\"90%\">"); print("<td class=\"embedded\" width=\"90%\">");
print($forummoderators ? "&nbsp;&nbsp;<img class=\"forum_mod\" src=\"pic/trans.gif\" alt=\"Moderator\" title=\"".$lang_forums['col_moderator']."\">&nbsp;".$forummoderators : ""); print($forummoderators ? "&nbsp;&nbsp;<img class=\"forum_mod\" src=\"pic/trans.gif\" alt=\"Moderator\" title=\"".$lang_forums['col_moderator']."\">&nbsp;".$forummoderators : "");
print("</td><td class=\"embedded nowrap\" width=\"1%\">"); print("</td><td class=\"embedded nowrap\" width=\"1%\">");
@@ -1119,7 +1119,7 @@ if ($action == "viewforum")
print("</tr></table>\n"); print("</tr></table>\n");
if ($numtopics > 0) if ($numtopics > 0)
{ {
print("<table border=\"1\" cellspacing=\"0\" cellpadding=\"5\" width=\"940\">"); print("<table border=\"1\" cellspacing=\"0\" cellpadding=\"5\" width=\"97%\">");
print("<tr><td class=\"colhead\" align=\"center\" width=\"99%\">".$lang_forums['col_topic']."</td><td class=\"colhead\" align=\"center\"><a href=\"".htmlspecialchars("?action=viewforum&forumid=".$forumid.$addparam."&sort=".(isset($_GET["sort"]) && $_GET["sort"] == 'firstpostdesc' ? "firstpostasc" : "firstpostdesc"))."\" title=\"".(isset($_GET["sort"]) && $_GET["sort"] == 'firstpostdesc' ? $lang_forums['title_order_topic_asc'] : $lang_forums['title_order_topic_desc'])."\">".$lang_forums['col_author']."</a></td><td class=\"colhead\" align=\"center\">".$lang_forums['col_replies']."/".$lang_forums['col_views']."</td><td class=\"colhead\" align=\"center\"><a href=\"".htmlspecialchars("?action=viewforum&forumid=".$forumid.$addparam."&sort=".(isset($_GET["sort"]) && $_GET["sort"] == 'lastpostasc' ? "lastpostdesc" : "lastpostasc"))."\" title=\"".(isset($_GET["sort"]) && $_GET["sort"] == 'lastpostasc' ? $lang_forums['title_order_post_desc'] : $lang_forums['title_order_post_asc'])."\">".$lang_forums['col_last_post']."</a></td>\n"); print("<tr><td class=\"colhead\" align=\"center\" width=\"99%\">".$lang_forums['col_topic']."</td><td class=\"colhead\" align=\"center\"><a href=\"".htmlspecialchars("?action=viewforum&forumid=".$forumid.$addparam."&sort=".(isset($_GET["sort"]) && $_GET["sort"] == 'firstpostdesc' ? "firstpostasc" : "firstpostdesc"))."\" title=\"".(isset($_GET["sort"]) && $_GET["sort"] == 'firstpostdesc' ? $lang_forums['title_order_topic_asc'] : $lang_forums['title_order_topic_desc'])."\">".$lang_forums['col_author']."</a></td><td class=\"colhead\" align=\"center\">".$lang_forums['col_replies']."/".$lang_forums['col_views']."</td><td class=\"colhead\" align=\"center\"><a href=\"".htmlspecialchars("?action=viewforum&forumid=".$forumid.$addparam."&sort=".(isset($_GET["sort"]) && $_GET["sort"] == 'lastpostasc' ? "lastpostdesc" : "lastpostasc"))."\" title=\"".(isset($_GET["sort"]) && $_GET["sort"] == 'lastpostasc' ? $lang_forums['title_order_post_desc'] : $lang_forums['title_order_post_asc'])."\">".$lang_forums['col_last_post']."</a></td>\n");
@@ -1229,7 +1229,7 @@ if ($action == "viewforum")
} // while } // while
//print("</table>\n"); //print("</table>\n");
//print("<table border=\"0\" cellspacing=\"0\" cellpadding=\"5\" width=\"940\">"); //print("<table border=\"0\" cellspacing=\"0\" cellpadding=\"5\" width=\"97%\">");
print("<tr><td align=\"left\">\n"); print("<tr><td align=\"left\">\n");
print("<form method=\"get\" action=\"forums.php\"><b>".$lang_forums['text_fast_search']."</b><input type=\"hidden\" name=\"action\" value=\"viewforum\" /><input type=\"hidden\" name=\"forumid\" value=\"".$forumid."\" /><input type=\"text\" style=\"width: 180px\" name=\"search\" />&nbsp;<input type=\"submit\" value=\"".$lang_forums['text_go']."\" /></form>"); print("<form method=\"get\" action=\"forums.php\"><b>".$lang_forums['text_fast_search']."</b><input type=\"hidden\" name=\"action\" value=\"viewforum\" /><input type=\"hidden\" name=\"forumid\" value=\"".$forumid."\" /><input type=\"text\" style=\"width: 180px\" name=\"search\" />&nbsp;<input type=\"submit\" value=\"".$lang_forums['text_go']."\" /></form>");
print("</td>"); print("</td>");
@@ -1393,7 +1393,7 @@ if ($action == "search")
$res = sql_query("SELECT posts.id, posts.topicid, posts.userid, posts.added, topics.subject, topics.hlcolor, forums.id AS forumid, forums.name AS forumname FROM posts LEFT JOIN topics ON posts.topicid = topics.id LEFT JOIN forums ON topics.forumid = forums.id WHERE forums.minclassread <= ".sqlesc(get_user_class())." AND ((topics.subject $extraSql AND posts.id=topics.firstpost) OR posts.body $extraSql) ORDER BY posts.id DESC $limit") or sqlerr(__FILE__, __LINE__); $res = sql_query("SELECT posts.id, posts.topicid, posts.userid, posts.added, topics.subject, topics.hlcolor, forums.id AS forumid, forums.name AS forumname FROM posts LEFT JOIN topics ON posts.topicid = topics.id LEFT JOIN forums ON topics.forumid = forums.id WHERE forums.minclassread <= ".sqlesc(get_user_class())." AND ((topics.subject $extraSql AND posts.id=topics.firstpost) OR posts.body $extraSql) ORDER BY posts.id DESC $limit") or sqlerr(__FILE__, __LINE__);
print($pagertop); print($pagertop);
print("<table border=\"1\" cellspacing=\"0\" cellpadding=\"5\" width=\"940\">\n"); print("<table border=\"1\" cellspacing=\"0\" cellpadding=\"5\" width=\"97%\">\n");
print("<tr><td class=\"colhead\" align=\"center\">".$lang_forums['col_post']."</td><td class=\"colhead\" align=\"center\" width=\"70%\">".$lang_forums['col_topic']."</td><td class=\"colhead\" align=\"left\">".$lang_forums['col_forum']."</td><td class=\"colhead\" align=\"left\">".$lang_forums['col_posted_by']."</td></tr>\n"); print("<tr><td class=\"colhead\" align=\"center\">".$lang_forums['col_post']."</td><td class=\"colhead\" align=\"center\" width=\"70%\">".$lang_forums['col_topic']."</td><td class=\"colhead\" align=\"left\">".$lang_forums['col_forum']."</td><td class=\"colhead\" align=\"left\">".$lang_forums['col_posted_by']."</td></tr>\n");
while ($post = mysql_fetch_array($res)) while ($post = mysql_fetch_array($res))
+1 -1
View File
@@ -181,7 +181,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") {
?> ?>
<h1 align="center"><?php echo $lang_getrss['text_rss_feeds']?></h1> <h1 align="center"><?php echo $lang_getrss['text_rss_feeds']?></h1>
<form method="post" action="getrss.php"> <form method="post" action="getrss.php">
<table cellspacing="1" cellpadding="5" width="940"> <table cellspacing="1" cellpadding="5" width="97%">
<tr> <tr>
<td class="rowhead"><?php echo $lang_getrss['row_categories_to_retrieve']?> <td class="rowhead"><?php echo $lang_getrss['row_categories_to_retrieve']?>
</td> </td>
+1 -1
View File
@@ -117,7 +117,7 @@ $limit";
print("<h1 align=\"center\">".$count.$lang_ipsearch['text_users_used_the_ip'].$ip."</h1>"); print("<h1 align=\"center\">".$count.$lang_ipsearch['text_users_used_the_ip'].$ip."</h1>");
print("<table width=940 border=1 cellspacing=0 cellpadding=5 align=center>\n"); print("<table width=1200 border=1 cellspacing=0 cellpadding=5 align=center>\n");
print("<tr><td class=colhead align=center><a class=colhead href=\"?ip=$ip&mask=$mask&order=username\">".$lang_ipsearch['col_username']."</a></td>". print("<tr><td class=colhead align=center><a class=colhead href=\"?ip=$ip&mask=$mask&order=username\">".$lang_ipsearch['col_username']."</a></td>".
"<td class=colhead align=center><a class=colhead href=\"?ip=$ip&mask=$mask&order=last_ip\">".$lang_ipsearch['col_last_ip']."</a></td>". "<td class=colhead align=center><a class=colhead href=\"?ip=$ip&mask=$mask&order=last_ip\">".$lang_ipsearch['col_last_ip']."</a></td>".
"<td class=colhead align=center><a class=colhead href=\"?ip=$ip&mask=$mask&order=last_access\">".$lang_ipsearch['col_last_access']."</a></td>". "<td class=colhead align=center><a class=colhead href=\"?ip=$ip&mask=$mask&order=last_access\">".$lang_ipsearch['col_last_access']."</a></td>".
+5
View File
File diff suppressed because one or more lines are too long
+3 -3
View File
@@ -123,7 +123,7 @@ if (isset($do)) {
$bonus = number_format($CURUSER['seedbonus'], 1); $bonus = number_format($CURUSER['seedbonus'], 1);
if (!$action) { if (!$action) {
print("<table align=\"center\" width=\"940\" border=\"1\" cellspacing=\"0\" cellpadding=\"3\">\n"); print("<table align=\"center\" width=\"97%\" border=\"1\" cellspacing=\"0\" cellpadding=\"3\">\n");
print("<tr><td class=\"colhead\" colspan=\"4\" align=\"center\"><font class=\"big\">".$SITENAME.$lang_mybonus['text_karma_system']."</font></td></tr>\n"); print("<tr><td class=\"colhead\" colspan=\"4\" align=\"center\"><font class=\"big\">".$SITENAME.$lang_mybonus['text_karma_system']."</font></td></tr>\n");
if ($msg) if ($msg)
print("<tr><td align=\"center\" colspan=\"4\"><font class=\"striking\">". $msg ."</font></td></tr>"); print("<tr><td align=\"center\" colspan=\"4\"><font class=\"striking\">". $msg ."</font></td></tr>");
@@ -220,7 +220,7 @@ for ($i=1; $i <=9; $i++)
print("</table><br />"); print("</table><br />");
?> ?>
<table width="940" cellpadding="3"> <table width="97%" cellpadding="3">
<tr><td class="colhead" align="center"><font class="big"><?php echo $lang_mybonus['text_what_is_karma'] ?></font></td></tr> <tr><td class="colhead" align="center"><font class="big"><?php echo $lang_mybonus['text_what_is_karma'] ?></font></td></tr>
<tr><td class="text" align="left"> <tr><td class="text" align="left">
<?php <?php
@@ -469,7 +469,7 @@ if ($action == "exchange") {
nexus_redirect("" . get_protocol_prefix() . "$BASEURL/mybonus.php?do=transfer"); nexus_redirect("" . get_protocol_prefix() . "$BASEURL/mybonus.php?do=transfer");
} }
else{ else{
print("<table width=\"940\"><tr><td class=\"colhead\" align=\"left\" colspan=\"2\"><h1>".$lang_mybonus['text_oups']."</h1></td></tr>"); print("<table width=\"97%\"><tr><td class=\"colhead\" align=\"left\" colspan=\"2\"><h1>".$lang_mybonus['text_oups']."</h1></td></tr>");
print("<tr><td align=\"left\"></td><td align=\"left\">".$lang_mybonus['text_not_enough_karma']."<br /><br /></td></tr></table>"); print("<tr><td align=\"left\"></td><td align=\"left\">".$lang_mybonus['text_not_enough_karma']."<br /><br /></td></tr></table>");
} }
} }
+2 -2
View File
@@ -144,7 +144,7 @@ if (isset($_GET['off_details']) && $_GET["off_details"]){
stdhead($lang_offers['head_offer_detail_for']." \"".$s."\""); stdhead($lang_offers['head_offer_detail_for']." \"".$s."\"");
print("<h1 align=\"center\" id=\"top\">".htmlspecialchars($s)."</h1>"); print("<h1 align=\"center\" id=\"top\">".htmlspecialchars($s)."</h1>");
print("<table width=\"940\" cellspacing=\"0\" cellpadding=\"5\">"); print("<table width=\"97%\" cellspacing=\"0\" cellpadding=\"5\">");
$offertime = gettime($num['added'],true,false); $offertime = gettime($num['added'],true,false);
if ($CURUSER['timetype'] != 'timealive') if ($CURUSER['timetype'] != 'timealive')
$offertime = $lang_offers['text_at'].$offertime; $offertime = $lang_offers['text_at'].$offertime;
@@ -353,7 +353,7 @@ if (isset($_GET["edit_offer"]) && $_GET["edit_offer"]) {
$title = htmlspecialchars(trim($s)); $title = htmlspecialchars(trim($s));
print("<form id=\"compose\" method=\"post\" name=\"compose\" action=\"?id=".$id."&amp;take_off_edit=1\">". print("<form id=\"compose\" method=\"post\" name=\"compose\" action=\"?id=".$id."&amp;take_off_edit=1\">".
"<table width=\"940\" cellspacing=\"0\" cellpadding=\"3\"><tr><td class=\"colhead\" align=\"center\" colspan=\"2\">".$lang_offers['text_edit_offer']."</td></tr>"); "<table width=\"97%\" cellspacing=\"0\" cellpadding=\"3\"><tr><td class=\"colhead\" align=\"center\" colspan=\"2\">".$lang_offers['text_edit_offer']."</td></tr>");
tr($lang_offers['row_type']."<font color=\"red\">*</font>", $s2, 1); tr($lang_offers['row_type']."<font color=\"red\">*</font>", $s2, 1);
tr($lang_offers['row_title']."<font color=\"red\">*</font>", "<input type=\"text\" style=\"width: 650px\" name=\"name\" value=\"".$title."\" />", 1); tr($lang_offers['row_title']."<font color=\"red\">*</font>", "<input type=\"text\" style=\"width: 650px\" name=\"name\" value=\"".$title."\" />", 1);
tr($lang_offers['row_post_or_photo'], "<input type=\"text\" name=\"picture\" style=\"width: 650px\" value='' /><br />".$lang_offers['text_link_to_picture'], 1); tr($lang_offers['row_post_or_photo'], "<input type=\"text\" name=\"picture\" style=\"width: 650px\" value='' /><br />".$lang_offers['text_link_to_picture'], 1);
+1 -1
View File
@@ -24,7 +24,7 @@ $action = isset($_POST['action']) ? $_POST['action'] : 'showmenu';
$allowed_actions = array('basicsettings','mainsettings','smtpsettings','securitysettings','authoritysettings','tweaksettings', 'botsettings','codesettings','bonussettings','accountsettings','torrentsettings', 'attachmentsettings', 'advertisementsettings', 'savesettings_basic', 'savesettings_main','savesettings_smtp','savesettings_security','savesettings_authority','savesettings_tweak','savesettings_bot','savesettings_code','savesettings_bonus', 'savesettings_account','savesettings_torrent', 'savesettings_attachment', 'savesettings_advertisement', 'showmenu'); $allowed_actions = array('basicsettings','mainsettings','smtpsettings','securitysettings','authoritysettings','tweaksettings', 'botsettings','codesettings','bonussettings','accountsettings','torrentsettings', 'attachmentsettings', 'advertisementsettings', 'savesettings_basic', 'savesettings_main','savesettings_smtp','savesettings_security','savesettings_authority','savesettings_tweak','savesettings_bot','savesettings_code','savesettings_bonus', 'savesettings_account','savesettings_torrent', 'savesettings_attachment', 'savesettings_advertisement', 'showmenu');
if (!in_array($action, $allowed_actions)) if (!in_array($action, $allowed_actions))
$action = 'showmenu'; $action = 'showmenu';
$notice = "<h1 align=\"center\"><a class=\"faqlink\" href=\"settings.php\">".$lang_settings['text_website_settings']."</a></h1><table cellspacing=\"0\" cellpadding=\"10\" width=\"940\"><tr><td colspan=\"2\" style='padding: 10px; background: black' align=\"center\"> $notice = "<h1 align=\"center\"><a class=\"faqlink\" href=\"settings.php\">".$lang_settings['text_website_settings']."</a></h1><table cellspacing=\"0\" cellpadding=\"10\" width=\"97%\"><tr><td colspan=\"2\" style='padding: 10px; background: black' align=\"center\">
<font color=\"white\">".$lang_settings['text_configuration_file_saving_note']." <font color=\"white\">".$lang_settings['text_configuration_file_saving_note']."
</font></td></tr>"; </font></td></tr>";
+1 -1
View File
@@ -871,7 +871,7 @@ if (isset($searchstr))
elseif ($sectiontype == $browsecatmode) elseif ($sectiontype == $browsecatmode)
stdhead($lang_torrents['head_torrents']); stdhead($lang_torrents['head_torrents']);
else stdhead($lang_torrents['head_music']); else stdhead($lang_torrents['head_music']);
print("<table width=\"940\" class=\"main\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td class=\"embedded\">"); print("<table width=\"97%\" class=\"main\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td class=\"embedded\">");
displayHotAndClassic(); displayHotAndClassic();
+1 -1
View File
@@ -37,7 +37,7 @@ stdhead($lang_upload['head_upload']);
<?php <?php
print("<p align=\"center\">".$lang_upload['text_red_star_required']."</p>"); print("<p align=\"center\">".$lang_upload['text_red_star_required']."</p>");
?> ?>
<table border="1" cellspacing="0" cellpadding="5" width="940"> <table border="1" cellspacing="0" cellpadding="5" width="97%">
<tr> <tr>
<td class='colhead' colspan='2' align='center'> <td class='colhead' colspan='2' align='center'>
<?php echo $lang_upload['text_tracker_url'] ?>: &nbsp;&nbsp;&nbsp;&nbsp;<b><?php echo get_protocol_prefix() . $announce_urls[0]?></b> <?php echo $lang_upload['text_tracker_url'] ?>: &nbsp;&nbsp;&nbsp;&nbsp;<b><?php echo get_protocol_prefix() . $announce_urls[0]?></b>
+1 -1
View File
@@ -64,7 +64,7 @@ else{
?> ?>
<div style="margin-top: 8px"> <div style="margin-top: 8px">
<?php <?php
print("<table border=\"1\" cellspacing=\"0\" cellpadding=\"5\" align=\"center\" width=\"940\"><tr>"); print("<table border=\"1\" cellspacing=\"0\" cellpadding=\"5\" align=\"center\" width=\"97%\"><tr>");
print("<td class=\"colhead\">".$lang_uploaders['col_username']."</td>"); print("<td class=\"colhead\">".$lang_uploaders['col_username']."</td>");
print("<td class=\"colhead\">".$lang_uploaders['col_torrents_size']."</td>"); print("<td class=\"colhead\">".$lang_uploaders['col_torrents_size']."</td>");
print("<td class=\"colhead\">".$lang_uploaders['col_torrents_num']."</td>"); print("<td class=\"colhead\">".$lang_uploaders['col_torrents_num']."</td>");
+7 -7
View File
@@ -161,7 +161,7 @@ if ($action){
} }
usercpmenu ("personal"); usercpmenu ("personal");
print ("<table border=0 cellspacing=0 cellpadding=5 width=940>"); print ("<table border=0 cellspacing=0 cellpadding=5 width=1200>");
if ($type == 'saved') if ($type == 'saved')
print("<tr><td colspan=2 class=\"heading\" valign=\"top\" align=\"center\"><font color=red>".$lang_usercp['text_saved']."</font></td></tr>\n"); print("<tr><td colspan=2 class=\"heading\" valign=\"top\" align=\"center\"><font color=red>".$lang_usercp['text_saved']."</font></td></tr>\n");
@@ -395,7 +395,7 @@ if ($showprocessing) $processings = searchbox_item_list("processings");
if ($showteam) $teams = searchbox_item_list("teams"); if ($showteam) $teams = searchbox_item_list("teams");
if ($showaudiocodec) $audiocodecs = searchbox_item_list("audiocodecs"); if ($showaudiocodec) $audiocodecs = searchbox_item_list("audiocodecs");
} }
print ("<table border=0 cellspacing=0 cellpadding=5 width=940>"); print ("<table border=0 cellspacing=0 cellpadding=5 width=1200>");
form ("tracker"); form ("tracker");
if ($type == 'saved') if ($type == 'saved')
print("<tr><td colspan=2 class=\"heading\" valign=\"top\" align=\"center\"><font color=red>".$lang_usercp['text_saved']."</font></td></tr>\n"); print("<tr><td colspan=2 class=\"heading\" valign=\"top\" align=\"center\"><font color=red>".$lang_usercp['text_saved']."</font></td></tr>\n");
@@ -639,7 +639,7 @@ tr_small($lang_usercp['row_funbox'],"<input type=checkbox name=showfb".($CURUSER
} }
stdhead($lang_usercp['head_control_panel'].$lang_usercp['head_forum_settings'],true); stdhead($lang_usercp['head_control_panel'].$lang_usercp['head_forum_settings'],true);
usercpmenu ("forum"); usercpmenu ("forum");
print ("<table border=0 cellspacing=0 cellpadding=5 width=940>"); print ("<table border=0 cellspacing=0 cellpadding=5 width=1200>");
form ("forum"); form ("forum");
if ($type == 'saved') if ($type == 'saved')
print("<tr><td colspan=2 class=\"heading\" valign=\"top\" align=\"center\"><font color=red>".$lang_usercp['text_saved']."</font></td></tr>\n"); print("<tr><td colspan=2 class=\"heading\" valign=\"top\" align=\"center\"><font color=red>".$lang_usercp['text_saved']."</font></td></tr>\n");
@@ -794,7 +794,7 @@ EOD;
} }
stdhead($lang_usercp['head_control_panel'].$lang_usercp['head_security_settings']); stdhead($lang_usercp['head_control_panel'].$lang_usercp['head_security_settings']);
usercpmenu ("security"); usercpmenu ("security");
print ("<table border=0 cellspacing=0 cellpadding=5 width=940>"); print ("<table border=0 cellspacing=0 cellpadding=5 width=1200>");
if ($type == 'save') { if ($type == 'save') {
print("<form method=post action=usercp.php><input type=hidden name=action value=security><input type=hidden name=type value=confirm>"); print("<form method=post action=usercp.php><input type=hidden name=action value=security><input type=hidden name=type value=confirm>");
$resetpasskey = $_POST["resetpasskey"]; $resetpasskey = $_POST["resetpasskey"];
@@ -863,7 +863,7 @@ if ($forumposts)
$percentages = round($forumposts*100/$postcount, 3)."%"; $percentages = round($forumposts*100/$postcount, 3)."%";
} }
?> ?>
<table border="0" cellspacing="0" cellpadding="5" width=940> <table border="0" cellspacing="0" cellpadding="5" width=1200>
<?php <?php
tr_small($lang_usercp['row_join_date'], $joindate, 1); tr_small($lang_usercp['row_join_date'], $joindate, 1);
tr_small($lang_usercp['row_email_address'], $CURUSER['email'], 1); tr_small($lang_usercp['row_email_address'], $CURUSER['email'], 1);
@@ -890,13 +890,13 @@ if ($forumposts)
tr($lang_usercp['row_forum_posts'], $forumposts." [<a href=\"userhistory.php?action=viewposts&id=".$CURUSER['id']."\" title=\"".$lang_usercp['link_view_posts']."\">".$lang_usercp['text_view']."</a>] (".$dayposts.$lang_usercp['text_posts_per_day']."; ".$percentages.$lang_usercp['text_of_total_posts'].")", 1); tr($lang_usercp['row_forum_posts'], $forumposts." [<a href=\"userhistory.php?action=viewposts&id=".$CURUSER['id']."\" title=\"".$lang_usercp['link_view_posts']."\">".$lang_usercp['text_view']."</a>] (".$dayposts.$lang_usercp['text_posts_per_day']."; ".$percentages.$lang_usercp['text_of_total_posts'].")", 1);
?> ?>
</table> </table>
<table border="0" cellspacing="0" cellpadding="5" width=940> <table border="0" cellspacing="0" cellpadding="5" width=1200>
<?php <?php
print("<td align=center class=tabletitle><b>".$lang_usercp['text_recently_read_topics']."</b></td>"); print("<td align=center class=tabletitle><b>".$lang_usercp['text_recently_read_topics']."</b></td>");
?> ?>
</table> </table>
<?php <?php
print("<table border=0 cellspacing=0 cellpadding=3 width=940><tr>". print("<table border=0 cellspacing=0 cellpadding=3 width=1200><tr>".
"<td class=colhead align=left width=80%>".$lang_usercp['col_topic_title']."</td>". "<td class=colhead align=left width=80%>".$lang_usercp['col_topic_title']."</td>".
"<td class=colhead align=center><nobr>".$lang_usercp['col_replies']."/".$lang_usercp['col_views']."</nobr></td>". "<td class=colhead align=center><nobr>".$lang_usercp['col_replies']."/".$lang_usercp['col_views']."</nobr></td>".
"<td class=colhead align=center>".$lang_usercp['col_topic_starter']."</td>". "<td class=colhead align=center>".$lang_usercp['col_topic_starter']."</td>".