mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-23 03:17:23 +08:00
upload add hr
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.7.24');
|
||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2022-09-01');
|
||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2022-09-03');
|
||||
defined('IN_TRACKER') || define('IN_TRACKER', false);
|
||||
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
|
||||
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
|
||||
|
||||
@@ -301,8 +301,9 @@ function format_urls($text, $newWindow = false) {
|
||||
function format_comment($text, $strip_html = true, $xssclean = false, $newtab = true, $imageresizer = true, $image_max_width = 700, $enableimage = true, $enableflash = true , $imagenum = -1, $image_max_height = 0, $adid = 0)
|
||||
{
|
||||
global $lang_functions;
|
||||
global $CURUSER, $SITENAME, $BASEURL, $enableattach_attachment;
|
||||
global $CURUSER, $SITENAME, $BASEURL;
|
||||
global $tempCode, $tempCodeCount;
|
||||
$enableattach_attachment = get_setting('attachment.enableattach');
|
||||
$tempCode = array();
|
||||
$tempCodeCount = 0;
|
||||
$imageresizer = $imageresizer ? 1 : 0;
|
||||
@@ -322,7 +323,7 @@ function format_comment($text, $strip_html = true, $xssclean = false, $newtab =
|
||||
}
|
||||
|
||||
$originalBbTagArray = array('[siteurl]', '[site]','[*]', '[b]', '[/b]', '[i]', '[/i]', '[u]', '[/u]', '[pre]', '[/pre]', '[/color]', '[/font]', '[/size]', " ");
|
||||
$replaceXhtmlTagArray = array(get_protocol_prefix().$BASEURL, $SITENAME, '<img class="listicon listitem" src="pic/trans.gif" alt="list" />', '<b>', '</b>', '<i>', '</i>', '<u>', '</u>', '<pre>', '</pre>', '</span>', '</font>', '</font>', ' ');
|
||||
$replaceXhtmlTagArray = array(get_protocol_prefix().get_setting('basic.BASEURL'), get_setting('basic.SITENAME'), '<img class="listicon listitem" src="pic/trans.gif" alt="list" />', '<b>', '</b>', '<i>', '</i>', '<u>', '</u>', '<pre>', '</pre>', '</span>', '</font>', '</font>', ' ');
|
||||
$s = str_replace($originalBbTagArray, $replaceXhtmlTagArray, $s);
|
||||
|
||||
$originalBbTagArray = array("/\[font=([^\[\(&\\;]+?)\]/is", "/\[color=([#0-9a-z]{1,15})\]/is", "/\[color=([a-z]+)\]/is", "/\[size=([1-7])\]/is");
|
||||
|
||||
@@ -339,6 +339,9 @@ $insert = [
|
||||
'technical_info' => $_POST['technical_info'] ?? '',
|
||||
'cover' => $cover,
|
||||
];
|
||||
if (isset($_POST['hr']) && isset(\App\Models\Torrent::$hrStatus[$_POST['hr']]) && user_can('torrent_hr')) {
|
||||
$insert['hr'] = $_POST['hr'];
|
||||
}
|
||||
$id = \Nexus\Database\NexusDB::insert('torrents', $insert);
|
||||
|
||||
//$ret = sql_query("INSERT INTO torrents (filename, owner, visible, anonymous, name, size, numfiles, type, url, small_descr, descr, ori_descr, category, source, medium, codec, audiocodec, standard, processing, team, save_as, sp_state, added, last_action, nfo, info_hash, pt_gen, technical_info) VALUES (".sqlesc($fname).", ".sqlesc($CURUSER["id"]).", 'yes', ".sqlesc($anonymous).", ".sqlesc($torrent).", ".sqlesc($totallen).", ".count($filelist).", ".sqlesc($type).", ".sqlesc($url).", ".sqlesc($small_descr).", ".sqlesc($descr).", ".sqlesc($descr).", ".sqlesc($catid).", ".sqlesc($sourceid).", ".sqlesc($mediumid).", ".sqlesc($codecid).", ".sqlesc($audiocodecid).", ".sqlesc($standardid).", ".sqlesc($processingid).", ".sqlesc($teamid).", ".sqlesc($dname).", ".sqlesc($sp_state) .
|
||||
|
||||
@@ -180,6 +180,11 @@ JS;
|
||||
tr($lang_upload['row_show_uploader'], "<input type=\"checkbox\" name=\"uplver\" value=\"yes\" />".$lang_upload['checkbox_hide_uploader_note'], 1);
|
||||
}
|
||||
tr($lang_functions['text_tags'], (new \App\Repositories\TagRepository())->renderCheckbox(), 1);
|
||||
if (get_setting('hr.mode') == \App\Models\HitAndRun::MODE_MANUAL && user_can('torrent_hr')) {
|
||||
$hrRadio = sprintf('<label><input type="radio" name="hr" value="0"%s />NO</label>', '');
|
||||
$hrRadio .= sprintf('<label><input type="radio" name="hr" value="1"%s />YES</label>', '');
|
||||
tr('H&R', $hrRadio, 1);
|
||||
}
|
||||
?>
|
||||
<tr><td class="toolbox" align="center" colspan="2"><b><?php echo $lang_upload['text_read_rules']?></b> <input id="qr" type="submit" class="btn" value="<?php echo $lang_upload['submit_upload']?>" /></td></tr>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user