mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 12:30:49 +08:00
searchbox add size+seeders+leechers+times_completed+added
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.8.0');
|
||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2022-12-19');
|
||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2022-12-20');
|
||||
defined('IN_TRACKER') || define('IN_TRACKER', false);
|
||||
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
|
||||
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
|
||||
|
||||
@@ -6200,21 +6200,25 @@ TD;
|
||||
return $html;
|
||||
}
|
||||
|
||||
function datetimepicker_input($name, $value = '', $label = '')
|
||||
function datetimepicker_input($name, $value = '', $label = '', array $options = [])
|
||||
{
|
||||
\Nexus\Nexus::css('vendor/jquery-datetimepicker/jquery.datetimepicker.min.css', 'footer', true);
|
||||
\Nexus\Nexus::js('vendor/jquery-datetimepicker/jquery.datetimepicker.full.min.js', 'footer', true);
|
||||
$id = "datetime-picker-$name";
|
||||
$input = sprintf('%s<input type="text" id="%s" name="%s" value="%s" autocomplete="off" >', $label, $id, $name, $value);
|
||||
$lang = get_langfolder_cookie(true);
|
||||
if ($lang == 'zh_CN') {
|
||||
$lang = 'zh';
|
||||
}
|
||||
$lang = str_replace('_', '-', $lang);
|
||||
$js = <<<JS
|
||||
jQuery.datetimepicker.setLocale('{$lang}');
|
||||
$js = '';
|
||||
if (!empty($options['require_files'])) {
|
||||
\Nexus\Nexus::css('vendor/jquery-datetimepicker/jquery.datetimepicker.min.css', 'footer', true);
|
||||
\Nexus\Nexus::js('vendor/jquery-datetimepicker/jquery.datetimepicker.full.min.js', 'footer', true);
|
||||
$js = "jQuery.datetimepicker.setLocale('{$lang}');";
|
||||
}
|
||||
$id = "datetime-picker-$name";
|
||||
$input = sprintf('%s<input type="text" id="%s" name="%s" value="%s" autocomplete="off" style="%s">', $label, $id, $name, $value, $options['style'] ?? '');
|
||||
$format = $options['format'] ?? 'Y-m-d H:i';
|
||||
$js .= <<<JS
|
||||
jQuery("#{$id}").datetimepicker({
|
||||
format: 'Y-m-d H:i'
|
||||
format: '{$format}'
|
||||
})
|
||||
JS;
|
||||
\Nexus\Nexus::js($js, 'footer', false);
|
||||
|
||||
Reference in New Issue
Block a user