mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 03:57:22 +08:00
upload auto fill offer
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.7.11');
|
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.7.12');
|
||||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2022-05-23');
|
defined('RELEASE_DATE') || define('RELEASE_DATE', '2022-05-25');
|
||||||
defined('IN_TRACKER') || define('IN_TRACKER', true);
|
defined('IN_TRACKER') || define('IN_TRACKER', true);
|
||||||
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
|
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
|
||||||
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
|
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
|
||||||
|
|||||||
@@ -893,6 +893,11 @@ function doInsert(ibTag, ibClsTag, isSingle)
|
|||||||
return isClose;
|
return isClose;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function clearContent()
|
||||||
|
{
|
||||||
|
document.<?php echo $form?>.<?php echo $text?>.value = '';
|
||||||
|
}
|
||||||
|
|
||||||
function winop()
|
function winop()
|
||||||
{
|
{
|
||||||
windop = window.open("moresmilies.php?form=<?php echo $form?>&text=<?php echo $text?>","mywin","height=500,width=500,resizable=no,scrollbars=yes");
|
windop = window.open("moresmilies.php?form=<?php echo $form?>&text=<?php echo $text?>","mywin","height=500,width=500,resizable=no,scrollbars=yes");
|
||||||
@@ -1682,6 +1687,10 @@ function image_code () {
|
|||||||
|
|
||||||
function check_code ($imagehash, $imagestring, $where = 'signup.php',$maxattemptlog=false,$head=true) {
|
function check_code ($imagehash, $imagestring, $where = 'signup.php',$maxattemptlog=false,$head=true) {
|
||||||
global $lang_functions;
|
global $lang_functions;
|
||||||
|
global $iv;
|
||||||
|
if ($iv !== 'yes') {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
$query = sprintf("SELECT * FROM regimages WHERE imagehash='%s' AND imagestring='%s'",
|
$query = sprintf("SELECT * FROM regimages WHERE imagehash='%s' AND imagestring='%s'",
|
||||||
mysql_real_escape_string($imagehash),
|
mysql_real_escape_string($imagehash),
|
||||||
mysql_real_escape_string($imagestring));
|
mysql_real_escape_string($imagestring));
|
||||||
|
|||||||
@@ -296,7 +296,7 @@ $lang_functions = array
|
|||||||
'text_please_download_something_within' => "请在",
|
'text_please_download_something_within' => "请在",
|
||||||
'text_inactive_account_be_deleted' => "内做些下载。没有流量的用户会被删除账号。",
|
'text_inactive_account_be_deleted' => "内做些下载。没有流量的用户会被删除账号。",
|
||||||
'text_attendance' => '[签到得魔力]',
|
'text_attendance' => '[签到得魔力]',
|
||||||
'text_attended' => '[签到已得%u, 补签卡:%d]',
|
'text_attended' => '[签到已得%u, 补签卡: %d]',
|
||||||
'imdb_cache_dir_can_not_create' => 'imdb 缓存目录无法创建',
|
'imdb_cache_dir_can_not_create' => 'imdb 缓存目录无法创建',
|
||||||
'imdb_cache_dir_is_not_writeable' => 'imdb 缓存目录不可写',
|
'imdb_cache_dir_is_not_writeable' => 'imdb 缓存目录不可写',
|
||||||
'imdb_photo_dir_can_not_create' => 'imdb 图片目录无法创建',
|
'imdb_photo_dir_can_not_create' => 'imdb 图片目录无法创建',
|
||||||
|
|||||||
@@ -298,7 +298,7 @@ $lang_functions = array
|
|||||||
'text_please_download_something_within' => "請在",
|
'text_please_download_something_within' => "請在",
|
||||||
'text_inactive_account_be_deleted' => "內做些下載。沒有流量的用戶會被移除賬號。",
|
'text_inactive_account_be_deleted' => "內做些下載。沒有流量的用戶會被移除賬號。",
|
||||||
'text_attendance' => '[簽到得魔力]',
|
'text_attendance' => '[簽到得魔力]',
|
||||||
'text_attended' => '[簽到已得%u, 補簽卡:%d]',
|
'text_attended' => '[簽到已得%u, 補簽卡: %d]',
|
||||||
'text_pt_gen_douban_url_note' => "(來自 <strong><a href=\"https://www.douban.com/\">douban</a></strong> 的鏈接。如電影 <b>Transformers</b> 的鏈接是<b> https://movie.douban.com/subject/1794171/</b>)",
|
'text_pt_gen_douban_url_note' => "(來自 <strong><a href=\"https://www.douban.com/\">douban</a></strong> 的鏈接。如電影 <b>Transformers</b> 的鏈接是<b> https://movie.douban.com/subject/1794171/</b>)",
|
||||||
'row_pt_gen_imdb_url' => "PT-Gen imdb 鏈接",
|
'row_pt_gen_imdb_url' => "PT-Gen imdb 鏈接",
|
||||||
'text_pt_gen_imdb_url_note' => "(來自 <strong><a href=\"https://www.imdb.com//\">imdb</a></strong> 的鏈接。如電影 <b>Transformers</b> 的鏈接是<b> https://www.imdb.com/title/tt0418279/</b>)",
|
'text_pt_gen_imdb_url_note' => "(來自 <strong><a href=\"https://www.imdb.com//\">imdb</a></strong> 的鏈接。如電影 <b>Transformers</b> 的鏈接是<b> https://www.imdb.com/title/tt0418279/</b>)",
|
||||||
|
|||||||
@@ -298,7 +298,7 @@ $lang_functions = array
|
|||||||
'text_please_download_something_within' => "Please download something within ",
|
'text_please_download_something_within' => "Please download something within ",
|
||||||
'text_inactive_account_be_deleted' => ". Inactive accounts (with no transfer amount) will be deleted.",
|
'text_inactive_account_be_deleted' => ". Inactive accounts (with no transfer amount) will be deleted.",
|
||||||
'text_attendance' => '[Attend get bouns]',
|
'text_attendance' => '[Attend get bouns]',
|
||||||
'text_attended' => '[Attend got bouns %u, card:%d]',
|
'text_attended' => '[Attend got bouns %u, card: %d]',
|
||||||
'row_pt_gen_douban_url' => "PT-Gen douban link",
|
'row_pt_gen_douban_url' => "PT-Gen douban link",
|
||||||
'text_pt_gen_douban_url_note' => "(URL taken from <strong><a href=\"https://www.douban.com/\">douban</a></strong>. e.g. for movie <b>Transformers</b> the URL is <b> https://movie.douban.com/subject/1794171//</b>)",
|
'text_pt_gen_douban_url_note' => "(URL taken from <strong><a href=\"https://www.douban.com/\">douban</a></strong>. e.g. for movie <b>Transformers</b> the URL is <b> https://movie.douban.com/subject/1794171//</b>)",
|
||||||
'row_pt_gen_imdb_url' => "PT-Gen imdb link",
|
'row_pt_gen_imdb_url' => "PT-Gen imdb link",
|
||||||
|
|||||||
@@ -68,3 +68,9 @@ function removeUserLeechWarn($params)
|
|||||||
return $rep->removeLeechWarn($CURUSER['id'], $params['uid']);
|
return $rep->removeLeechWarn($CURUSER['id'], $params['uid']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getOffer($params)
|
||||||
|
{
|
||||||
|
$offer = \App\Models\Offer::query()->findOrFail($params['id']);
|
||||||
|
return $offer->toArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -149,6 +149,28 @@ stdhead($lang_upload['head_upload']);
|
|||||||
$offer .= "<option value=\"" . $offerrow["id"] . "\">" . htmlspecialchars($offerrow["name"]) . "</option>";
|
$offer .= "<option value=\"" . $offerrow["id"] . "\">" . htmlspecialchars($offerrow["name"]) . "</option>";
|
||||||
$offer .= "</select>";
|
$offer .= "</select>";
|
||||||
tr($lang_upload['row_your_offer']. (!$uploadfreely && !$allowspecial ? "<font color=red>*</font>" : ""), $offer.$lang_upload['text_please_select_offer'] , 1);
|
tr($lang_upload['row_your_offer']. (!$uploadfreely && !$allowspecial ? "<font color=red>*</font>" : ""), $offer.$lang_upload['text_please_select_offer'] , 1);
|
||||||
|
$getOfferJs = <<<JS
|
||||||
|
jQuery('select[name="offer"]').on("change", function () {
|
||||||
|
let id = this.value
|
||||||
|
if (id == 0) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let params = {action: "getOffer", params: {id: id}}
|
||||||
|
jQuery.post("ajax.php", params, function (response) {
|
||||||
|
console.log(response)
|
||||||
|
if (response.ret != 0) {
|
||||||
|
alert(response.msg)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
jQuery("#name").val(response.data.name)
|
||||||
|
clearContent()
|
||||||
|
doInsert(response.data.descr, '', false)
|
||||||
|
jQuery("#browsecat").val(response.data.category)
|
||||||
|
}, 'json')
|
||||||
|
})
|
||||||
|
JS;
|
||||||
|
\Nexus\Nexus::js($getOfferJs, 'footer', false);
|
||||||
|
|
||||||
}
|
}
|
||||||
//===end
|
//===end
|
||||||
|
|
||||||
|
|||||||
@@ -6,11 +6,10 @@ $q = $_REQUEST['q'] ?? '';
|
|||||||
if (!empty($q)) {
|
if (!empty($q)) {
|
||||||
$query->where('username', 'like', "%{$q}%");
|
$query->where('username', 'like', "%{$q}%");
|
||||||
}
|
}
|
||||||
$total = $query->toBase()->getCountForPagination();
|
$total = (clone $query)->count();
|
||||||
$page = $_REQUEST['page'] ?? 1;
|
$perPage = 50;
|
||||||
$perPage = 20;
|
list($paginationTop, $paginationBottom, $limit, $offset) = pager($perPage, $total, "?");
|
||||||
$rows = $query->forPage($page, $perPage)->orderBy('id', 'desc')->get()->toArray();
|
$rows = (clone $query)->offset($offset)->take($perPage)->orderBy('id', 'desc')->get()->toArray();
|
||||||
list($paginationTop, $paginationBottom, $limit) = pager($perPage, $total, "?");
|
|
||||||
$header = [
|
$header = [
|
||||||
'id' => 'ID',
|
'id' => 'ID',
|
||||||
'uid' => 'UID',
|
'uid' => 'UID',
|
||||||
|
|||||||
Reference in New Issue
Block a user