searchbox model

This commit is contained in:
xiaomlove
2021-05-20 17:14:38 +08:00
parent 13097fa711
commit 51b3582090
5 changed files with 37 additions and 7 deletions

View File

@@ -1,11 +1,11 @@
English | [中文](/)
Complete PT website building solution. Based on NexusPHP + Laravel Framewwork + Element Plus.
Complete PT website building solution. Based on NexusPHP + Laravel Framework + Element Plus.
## Functional Features
- Upload seed
- Request seed
- Upload torrent
- Request torrent
- Subtitle
- Exam
- Attendance

View File

@@ -1,6 +1,6 @@
中文 | [English](/README-EN.md)
完整的 PT 建站解决方案。基于 NexusPHP + Laravel Framewwork + Element Plus。
完整的 PT 建站解决方案。基于 NexusPHP + Laravel Framework + Element Plus。
## 功能特性
- 发种
@@ -12,7 +12,7 @@
- 多语言
- 自动备份
- 管理后台
- json api
- Json api
- ....
## 系统要求

15
app/Models/Searchbox.php Normal file
View File

@@ -0,0 +1,15 @@
<?php
namespace App\Models;
class Searchbox extends NexusModel
{
protected $table = 'searchbox';
protected $fillable = [
'name', 'catsperrow', 'catpadding', 'showsubcat',
'showsource', 'showmedium', 'showcodec', 'showstandard', 'showprocessing', 'showteam', 'showaudiocodec',
'custom_fields', 'custom_fields_display_name', 'custom_fields_display'
];
}

View File

@@ -0,0 +1,15 @@
<?php
namespace App\Models;
class SearchboxField extends NexusModel
{
protected $table = 'searchbox_fields';
protected $fillable = ['searchbox_id', 'field_type', 'field_id', ];
public function searchbox()
{
return $this->belongsTo(Searchbox::class, 'searchbox_id');
}
}

View File

@@ -386,7 +386,7 @@ if ($action == 'view')
print_type_list($type);
?>
<div style="margin-top: 8px">
<?php
<?php
if (in_array($type, $validsubcattype)){
print_sub_category_list($type);
}
@@ -694,7 +694,7 @@ elseif($action == 'submit')
$showstandard = intval($_POST['showstandard'] ?? 0);
$showprocessing = intval($_POST['showprocessing'] ?? 0);
$showteam = intval($_POST['showteam'] ?? 0);
$showaudiocodec = $_POST['showaudiocodec'];
$showaudiocodec = intval($_POST['showaudiocodec'] ?? 0);
$updateset[] = "catsperrow=".sqlesc($catsperrow);
$updateset[] = "catpadding=".sqlesc($catpadding);
$updateset[] = "name=".sqlesc($name);