diff --git a/include/constants.php b/include/constants.php index 44a727e8..545c2e7e 100644 --- a/include/constants.php +++ b/include/constants.php @@ -1,6 +1,6 @@ ..value = ''; +} + function winop() { windop = window.open("moresmilies.php?form=&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) { global $lang_functions; + global $iv; + if ($iv !== 'yes') { + return true; + } $query = sprintf("SELECT * FROM regimages WHERE imagehash='%s' AND imagestring='%s'", mysql_real_escape_string($imagehash), mysql_real_escape_string($imagestring)); diff --git a/lang/chs/lang_functions.php b/lang/chs/lang_functions.php index b9b3b29f..b1481d43 100644 --- a/lang/chs/lang_functions.php +++ b/lang/chs/lang_functions.php @@ -296,7 +296,7 @@ $lang_functions = array 'text_please_download_something_within' => "请在", 'text_inactive_account_be_deleted' => "内做些下载。没有流量的用户会被删除账号。", 'text_attendance' => '[签到得魔力]', - 'text_attended' => '[签到已得%u, 补签卡:%d]', + 'text_attended' => '[签到已得%u, 补签卡: %d]', 'imdb_cache_dir_can_not_create' => 'imdb 缓存目录无法创建', 'imdb_cache_dir_is_not_writeable' => 'imdb 缓存目录不可写', 'imdb_photo_dir_can_not_create' => 'imdb 图片目录无法创建', diff --git a/lang/cht/lang_functions.php b/lang/cht/lang_functions.php index 9f07d43d..2841098d 100644 --- a/lang/cht/lang_functions.php +++ b/lang/cht/lang_functions.php @@ -298,7 +298,7 @@ $lang_functions = array 'text_please_download_something_within' => "請在", 'text_inactive_account_be_deleted' => "內做些下載。沒有流量的用戶會被移除賬號。", 'text_attendance' => '[簽到得魔力]', - 'text_attended' => '[簽到已得%u, 補簽卡:%d]', + 'text_attended' => '[簽到已得%u, 補簽卡: %d]', 'text_pt_gen_douban_url_note' => "(來自 douban 的鏈接。如電影 Transformers 的鏈接是 https://movie.douban.com/subject/1794171/)", 'row_pt_gen_imdb_url' => "PT-Gen imdb 鏈接", 'text_pt_gen_imdb_url_note' => "(來自 imdb 的鏈接。如電影 Transformers 的鏈接是 https://www.imdb.com/title/tt0418279/)", diff --git a/lang/en/lang_functions.php b/lang/en/lang_functions.php index 45caea7e..3b4dad73 100644 --- a/lang/en/lang_functions.php +++ b/lang/en/lang_functions.php @@ -298,7 +298,7 @@ $lang_functions = array 'text_please_download_something_within' => "Please download something within ", 'text_inactive_account_be_deleted' => ". Inactive accounts (with no transfer amount) will be deleted.", '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", 'text_pt_gen_douban_url_note' => "(URL taken from douban. e.g. for movie Transformers the URL is https://movie.douban.com/subject/1794171//)", 'row_pt_gen_imdb_url' => "PT-Gen imdb link", diff --git a/public/ajax.php b/public/ajax.php index ad428827..21090651 100644 --- a/public/ajax.php +++ b/public/ajax.php @@ -68,3 +68,9 @@ function removeUserLeechWarn($params) return $rep->removeLeechWarn($CURUSER['id'], $params['uid']); } +function getOffer($params) +{ + $offer = \App\Models\Offer::query()->findOrFail($params['id']); + return $offer->toArray(); +} + diff --git a/public/upload.php b/public/upload.php index e08b7ec8..b2a6c2a7 100644 --- a/public/upload.php +++ b/public/upload.php @@ -149,6 +149,28 @@ stdhead($lang_upload['head_upload']); $offer .= ""; $offer .= ""; tr($lang_upload['row_your_offer']. (!$uploadfreely && !$allowspecial ? "*" : ""), $offer.$lang_upload['text_please_select_offer'] , 1); + $getOfferJs = <<where('username', 'like', "%{$q}%"); } -$total = $query->toBase()->getCountForPagination(); -$page = $_REQUEST['page'] ?? 1; -$perPage = 20; -$rows = $query->forPage($page, $perPage)->orderBy('id', 'desc')->get()->toArray(); -list($paginationTop, $paginationBottom, $limit) = pager($perPage, $total, "?"); +$total = (clone $query)->count(); +$perPage = 50; +list($paginationTop, $paginationBottom, $limit, $offset) = pager($perPage, $total, "?"); +$rows = (clone $query)->offset($offset)->take($perPage)->orderBy('id', 'desc')->get()->toArray(); $header = [ 'id' => 'ID', 'uid' => 'UID',