From 9f4948d778fcead501a4dd7393ae2136bea3ed88 Mon Sep 17 00:00:00 2001 From: zcy <290198252@qq.com> Date: Sun, 25 Dec 2022 01:05:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=BB=E9=A1=B5=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/Controllers/NewUi.php | 5 ++++- App/Models/Doc.php | 16 ++++++++++++---- App/Views/blog/article.html | 13 ++++++++++++- App/Views/blog/template/work.html | 6 ++++++ deploy.bat | 2 ++ public/index.php | 1 - 6 files changed, 36 insertions(+), 7 deletions(-) diff --git a/App/Controllers/NewUi.php b/App/Controllers/NewUi.php index c151693..f3a2705 100644 --- a/App/Controllers/NewUi.php +++ b/App/Controllers/NewUi.php @@ -98,8 +98,9 @@ class NewUi extends Controller $doc[0]['content'] = $markdown->body($doc[0]['content']); $doc[0]['toc'] = $markdown->contentsList(); $top5 = $docModel->top5Doc(); + $doc_history = $docModel->doc_history((int)$this->params[0]); + var_dump($doc_history); - foreach ($fisrtpage as $key => $value) { $obj['title'] = $value['title']; $obj['id'] = $value['id']; @@ -155,6 +156,8 @@ class NewUi extends Controller ]); } } + + function searchAction() { if (sizeof($this->querys) != 0) { diff --git a/App/Models/Doc.php b/App/Models/Doc.php index dcf0246..560fd59 100644 --- a/App/Models/Doc.php +++ b/App/Models/Doc.php @@ -89,6 +89,14 @@ class Doc extends Model $recv = $stmt->fetchAll(); return $recv; } + public function doc_history($doc_id){ + $result = []; + $db = static::getDB(); + print_r('select * from doc_history where doc_history.doc_id = '.$doc_id); + $stmt = $db->query('select * from doc_history where doc_history.doc_id = '.$doc_id); + $recv = $stmt->fetchAll(); + return $recv; + } public function top5Doc(){ $result = []; $db = static::getDB(); @@ -115,19 +123,19 @@ class Doc extends Model public function titleDoc($title){ $db = static::getDB(); - $stmt = $db->query('select * from doc where title = \''.$title.'\' and doc.is_public = 0'); + $stmt = $db->query('select * from doc_copy1 where title = \''.$title.'\''); $recv = $stmt->fetchAll(); return $recv; } public function titleLikeDoc($title){ $db = static::getDB(); - $stmt = $db->query('select title from doc where title like \'%'.$title.'%\' and doc.is_public = 0'); + $stmt = $db->query('select title from doc_copy1 where title like \'%'.$title.'%\' and doc.is_public = 0'); $recv = $stmt->fetchAll(); return $recv; } public function Count(){ $db = static::getDB(); - $stmt = $db->query('select count(*) from doc'); + $stmt = $db->query('select count(*) from doc_copy1'); $result = $stmt->fetchAll(); return $result; } @@ -139,7 +147,7 @@ class Doc extends Model } public function AllTitle(){ $db = static::getDB(); - $stmt = $db->query('select title from doc'); + $stmt = $db->query('select title from doc_copy1'); $result = $stmt->fetchAll(); return $result; } diff --git a/App/Views/blog/article.html b/App/Views/blog/article.html index a69ad94..36cd0fe 100644 --- a/App/Views/blog/article.html +++ b/App/Views/blog/article.html @@ -214,8 +214,19 @@ function expandNode(e) { {% for doc in docs %}
+ 深度学习验证工具 +
+