Readme add Telegram

This commit is contained in:
xiaomlove
2022-02-23 15:19:09 +08:00
parent d8cc4dc972
commit 28a99fef5d
5 changed files with 25 additions and 7 deletions

View File

@@ -27,3 +27,4 @@ Complete PT website building solution. Based on NexusPHP + Laravel Framework + E
## More information
Blog[https://nexusphp.org](https://nexusphp.org/)
Documentation[https://doc.nexusphp.org](https://doc.nexusphp.org/en/)
Telegram: [https://t.me/nexusphp](https://t.me/nexusphp)

View File

@@ -23,15 +23,11 @@
- Mysql: 5.7最新版或以上版本
- Redis1.0.0或以上版本
## 捐赠
此程序由个人维护,如果对你有帮助,可以请我喝杯咖啡。感谢以下捐赠者:
**初心、陌路つ**
## 更多信息
博客:[https://nexusphp.org](http://nexusphp.org/)
论坛:[https://discuss.nexusphp.org](https://discuss.nexusphp.org/)
文档:[https://doc.nexusphp.org](http://doc.nexusphp.org/)
Telegram: [https://t.me/nexusphp](https://t.me/nexusphp)
QQ群: [764452568](https://jq.qq.com/?_wv=1027&k=IbltZcIx)
![扫码加入](http://demo.nexusphp.org/attachments/202105/20210508190106ed3a3620fc34ab12660586652bc74e34.png)

View File

@@ -12,6 +12,7 @@ use App\Models\SearchBox;
use App\Models\Snatch;
use App\Models\User;
use App\Repositories\ExamRepository;
use App\Repositories\HitAndRunRepository;
use App\Repositories\SearchBoxRepository;
use App\Repositories\TorrentRepository;
use App\Repositories\UserRepository;
@@ -57,7 +58,8 @@ class Test extends Command
*/
public function handle()
{
$r = User::query()->first()->seed_points;
$rep = new HitAndRunRepository();
$r = $rep->getStatusStats(1)->get(2);
dd($r);
}

View File

@@ -239,4 +239,23 @@ class HitAndRunRepository extends BaseRepository
return true;
}
public function getStatusStats($uid, $formatted = true)
{
$results = HitAndRun::query()->where('uid', $uid)
->selectRaw('status, count(*) as counts')
->groupBy('status')
->get()
->pluck('counts', 'status');
if ($formatted) {
return sprintf(
'%s/%s/%s',
$results->get(HitAndRun::STATUS_INSPECTING, 0),
$results->get(HitAndRun::STATUS_UNREACHED, 0),
Setting::get('hr.ban_user_when_counts_reach')
);
}
return $results;
}
}

View File

@@ -2489,7 +2489,7 @@ else {
<font class='color_downloaded'> <?php echo $lang_functions['text_downloaded'] ?></font> <?php echo mksize($CURUSER['downloaded'])?>
<font class='color_active'><?php echo $lang_functions['text_active_torrents'] ?></font> <img class="arrowup" alt="Torrents seeding" title="<?php echo $lang_functions['title_torrents_seeding'] ?>" src="pic/trans.gif" /><?php echo $activeseed?> <img class="arrowdown" alt="Torrents leeching" title="<?php echo $lang_functions['title_torrents_leeching'] ?>" src="pic/trans.gif" /><?php echo $activeleech?>&nbsp;&nbsp;
<font class='color_connectable'><?php echo $lang_functions['text_connectable'] ?></font><?php echo $connectable?> <?php echo maxslots();?>
<?php if(\App\Models\HitAndRun::getIsEnabled()) { ?><font class='color_bonus'>H&R: </font> <?php echo sprintf('[<a href="myhr.php">%s/%s</a>]', get_row_count('hit_and_runs', "where uid = {$CURUSER['id']} and status = 3"), get_setting('hr.ban_user_when_counts_reach'))?><?php }?>
<?php if(\App\Models\HitAndRun::getIsEnabled()) { ?><font class='color_bonus'>H&R: </font> <?php echo sprintf('[<a href="myhr.php">%s</a>]', (new \App\Repositories\HitAndRunRepository())->getStatusStats($CURUSER['id']))?><?php }?>
<?php if(get_user_class() >= UC_SYSOP) { ?> [<a href="/admin" target="_blank"><?php echo $lang_functions['text_management_system'] ?></a>]<?php }?>
</span>
</td>