Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
laravel-guardian-for-Zhang
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
YONG-LIN SU
laravel-guardian-for-Zhang
Commits
1f00a78c
Commit
1f00a78c
authored
Sep 10, 2020
by
陳芷妤
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加上驗證頁面
parent
e5614e1c
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
170 additions
and
95 deletions
+170
-95
DeviceController.php
app/Http/Controllers/DeviceController.php
+36
-31
PersonController.php
app/Http/Controllers/PersonController.php
+39
-27
PersonGroupController.php
app/Http/Controllers/PersonGroupController.php
+26
-28
Device.blade.php
resources/views/Device.blade.php
+7
-1
Device_group.blade.php
resources/views/Device_group.blade.php
+7
-1
Device_relation.blade.php
resources/views/Device_relation.blade.php
+7
-1
Device_type.blade.php
resources/views/Device_type.blade.php
+7
-0
Person.blade.php
resources/views/Person.blade.php
+7
-1
Person_Attendance.blade.php
resources/views/Person_Attendance.blade.php
+6
-1
Person_Comparison.blade.php
resources/views/Person_Comparison.blade.php
+7
-1
Person_Group.blade.php
resources/views/Person_Group.blade.php
+7
-1
Person_Insert.blade.php
resources/views/Person_Insert.blade.php
+7
-1
Person_Search_Group.blade.php
resources/views/Person_Search_Group.blade.php
+7
-1
No files found.
app/Http/Controllers/DeviceController.php
View file @
1f00a78c
This diff is collapsed.
Click to expand it.
app/Http/Controllers/PersonController.php
View file @
1f00a78c
This diff is collapsed.
Click to expand it.
app/Http/Controllers/PersonGroupController.php
View file @
1f00a78c
...
...
@@ -15,7 +15,7 @@ class PersonGroupController extends Controller
use
AuthorizesRequests
,
DispatchesJobs
,
ValidatesRequests
;
//人員群組首頁
public
function
Group_index
()
public
function
Group_index
(
Request
$request
)
{
$devices
=
array
();
$groups
=
array
();
...
...
@@ -52,14 +52,14 @@ class PersonGroupController extends Controller
//$personGer=array();
//$personGer=explode(',',"$persondata");
//$data =array('name' => 'ray','age' => 25);
return
view
(
"Person_Search_Group"
,
[
"title"
=>
"人員群組"
,
"groups"
=>
$groups
,
"camera_list"
=>
$camera_list
,
"rowdata"
=>
$rowdata
]);
$username
=
$request
->
session
()
->
get
(
'Tusername'
);
return
view
(
"Person_Search_Group"
,
[
"title"
=>
"人員群組"
,
"groups"
=>
$groups
,
"camera_list"
=>
$camera_list
,
"rowdata"
=>
$rowdata
,
"msg"
=>
$username
]);
}
//新增人員群組
public
function
insert_Group
(
Request
$request
)
{
$server_ip
=
"192.168.6.240"
;
$server_port
=
"5000"
;
$devices
=
array
();
$groups
=
array
();
$camera_list
=
array
(
"Enabled"
=>
array
());
...
...
@@ -113,14 +113,12 @@ class PersonGroupController extends Controller
}
else
{
$error_msg
=
"請填寫群組名稱,未新增成功"
;
}
return
$this
->
Group_index
()
->
with
([
"error_msg"
=>
$error_msg
]);
return
$this
->
Group_index
(
$request
)
->
with
([
"error_msg"
=>
$error_msg
]);
}
//搜尋人員群組
public
function
search_Group
(
Request
$request
)
{
$server_ip
=
"192.168.6.240"
;
$server_port
=
"5000"
;
$devices
=
array
();
$groups
=
array
();
$camera_list
=
array
(
"Enabled"
=>
array
());
...
...
@@ -178,10 +176,11 @@ class PersonGroupController extends Controller
}
else
{
$msg
=
"以下為查詢結果"
;
}
$username
=
$request
->
session
()
->
get
(
'Tusername'
);
if
(
$msg
!=
null
)
{
return
view
(
"Person_Search_Group"
,
[
"title"
=>
"人員群組"
,
"groups"
=>
$groups
,
"camera_list"
=>
$camera_list
,
"rowdata"
=>
$rowdata
,
"error_msg"
=>
$msg
]);
return
view
(
"Person_Search_Group"
,
[
"title"
=>
"人員群組"
,
"groups"
=>
$groups
,
"camera_list"
=>
$camera_list
,
"rowdata"
=>
$rowdata
,
"error_msg"
=>
$msg
,
"msg"
=>
$username
]);
}
else
{
return
view
(
"Person_Search_Group"
,
[
"title"
=>
"人員群組"
,
"groups"
=>
$groups
,
"camera_list"
=>
$camera_list
,
"rowdata"
=>
$rowdata
]);
return
view
(
"Person_Search_Group"
,
[
"title"
=>
"人員群組"
,
"groups"
=>
$groups
,
"camera_list"
=>
$camera_list
,
"rowdata"
=>
$rowdata
,
"msg"
=>
$username
]);
}
}
...
...
@@ -189,8 +188,7 @@ class PersonGroupController extends Controller
//修改人員群組
public
function
modify_Group
(
Request
$request
)
{
$server_ip
=
"192.168.6.240"
;
$server_port
=
"5000"
;
$username
=
$request
->
session
()
->
get
(
'Tusername'
);
$devices
=
array
();
$groups
=
array
();
$camera_list
=
array
(
"Enabled"
=>
array
());
...
...
@@ -228,7 +226,7 @@ class PersonGroupController extends Controller
$stuat
=
2
;
}
else
{
$msg
=
"請輸入修改內容"
;
return
$this
->
Group_index
()
->
with
([
"error_msg"
=>
$msg
]);
return
$this
->
Group_index
(
$request
)
->
with
([
"error_msg"
=>
$msg
]);
}
}
if
(
$stuat
!=
2
){
...
...
@@ -246,10 +244,10 @@ class PersonGroupController extends Controller
]);
$msg
=
"修改成功"
;
return
$this
->
Group_index
()
->
with
([
"error_msg"
=>
$msg
]);
return
$this
->
Group_index
(
$request
)
->
with
([
"error_msg"
=>
$msg
]);
}
else
{
$msg
=
"已有重複群組名稱"
;
return
$this
->
Group_index
()
->
with
([
"error_msg"
=>
$msg
]);
return
$this
->
Group_index
(
$request
)
->
with
([
"error_msg"
=>
$msg
]);
}
}
...
...
@@ -257,8 +255,7 @@ class PersonGroupController extends Controller
//刪除人員群組
public
function
delete_Group
(
Request
$request
)
{
$server_ip
=
"192.168.6.240"
;
$server_port
=
"5000"
;
if
(
$request
->
selectedId
!=
null
)
{
$client
=
new
\GuzzleHttp\Client
();
$id
=
$request
->
selectedId
;
...
...
@@ -274,10 +271,10 @@ class PersonGroupController extends Controller
array_push
(
$error_ids
,
$id
);
}
}
return
$this
->
Group_index
();
return
$this
->
Group_index
(
$request
);
}
else
{
$msg
=
"未選擇刪除群組名稱"
;
return
$this
->
Group_index
()
->
with
([
"error_msg"
=>
$msg
]);
return
$this
->
Group_index
(
$request
)
->
with
([
"error_msg"
=>
$msg
]);
}
}
...
...
@@ -285,8 +282,7 @@ class PersonGroupController extends Controller
//人員群組首頁
public
function
index_Group
(
Request
$request
)
{
$server_ip
=
"192.168.6.240"
;
$server_port
=
"5000"
;
$username
=
$request
->
session
()
->
get
(
'Tusername'
);
$groups
=
array
();
$camera_list
=
array
(
"Enabled"
=>
array
());
// 取得 Device 資料
...
...
@@ -328,7 +324,7 @@ class PersonGroupController extends Controller
));
}
$msg
=
"群組無相關人員"
;
return
view
(
"Person_Group"
,
[
"title"
=>
"人員群組管理"
,
"groups"
=>
$groups
,
"camera_list"
=>
$camera_list
,
"rowdata"
=>
$rowdata
,
"rowdata2"
=>
$rowdata2
,
"error_msg"
=>
$msg
]);
return
view
(
"Person_Group"
,
[
"title"
=>
"人員群組管理"
,
"groups"
=>
$groups
,
"camera_list"
=>
$camera_list
,
"rowdata"
=>
$rowdata
,
"rowdata2"
=>
$rowdata2
,
"error_msg"
=>
$msg
,
"msg"
=>
$username
]);
}
if
(
$persongroupid
!=
null
and
$jsondata
[
"Data"
]
!=
null
)
{
if
(
$persongroupid
!=
null
and
$jsondata
[
"Data"
]
!=
null
)
{
...
...
@@ -394,7 +390,7 @@ class PersonGroupController extends Controller
}
}
// dd($rowdata);
return
view
(
"Person_Group"
,
[
"title"
=>
"人員群組管理"
,
"groups"
=>
$groups
,
"camera_list"
=>
$camera_list
,
"rowdata"
=>
$rowdata
,
"rowdata2"
=>
$rowdata2
]);
return
view
(
"Person_Group"
,
[
"title"
=>
"人員群組管理"
,
"groups"
=>
$groups
,
"camera_list"
=>
$camera_list
,
"rowdata"
=>
$rowdata
,
"rowdata2"
=>
$rowdata2
,
"msg"
=>
$username
]);
}
}
}
...
...
@@ -511,6 +507,7 @@ class PersonGroupController extends Controller
}*/
public
function
search_personGroup
(
Request
$request
)
{
$username
=
$request
->
session
()
->
get
(
'Tusername'
);
$groups
=
array
();
$camera_list
=
array
(
"Enabled"
=>
array
());
// 取得 Device 資料
...
...
@@ -556,10 +553,10 @@ class PersonGroupController extends Controller
));
}
$msg
=
"群組無相關人員"
;
return
view
(
"Person_Group"
,
[
"title"
=>
"人員群組管理"
,
"groups"
=>
$groups
,
"camera_list"
=>
$camera_list
,
"rowdata"
=>
$rowdata
,
"rowdata2"
=>
$rowdata2
,
"error_msg"
=>
$msg
]);
return
view
(
"Person_Group"
,
[
"title"
=>
"人員群組管理"
,
"groups"
=>
$groups
,
"camera_list"
=>
$camera_list
,
"rowdata"
=>
$rowdata
,
"rowdata2"
=>
$rowdata2
,
"error_msg"
=>
$msg
,
"msg"
=>
$username
]);
}
else
{
$msg
=
"群組無相關人員"
;
return
view
(
"Person_Group"
,
[
"title"
=>
"人員群組管理"
,
"groups"
=>
$groups
,
"camera_list"
=>
$camera_list
,
"rowdata"
=>
$rowdata
,
"rowdata2"
=>
$rowdata2
,
"error_msg"
=>
$msg
]);
return
view
(
"Person_Group"
,
[
"title"
=>
"人員群組管理"
,
"groups"
=>
$groups
,
"camera_list"
=>
$camera_list
,
"rowdata"
=>
$rowdata
,
"rowdata2"
=>
$rowdata2
,
"error_msg"
=>
$msg
,
"msg"
=>
$username
]);
}
}
if
(
$persongroupid
!=
null
and
$jsondata
[
"Data"
]
!=
null
){
...
...
@@ -625,10 +622,10 @@ class PersonGroupController extends Controller
}
}
//dd($rowdata);
return
view
(
"Person_Group"
,
[
"title"
=>
"人員群組管理"
,
"groups"
=>
$groups
,
"camera_list"
=>
$camera_list
,
"rowdata"
=>
$rowdata
,
"rowdata2"
=>
$rowdata2
]);
return
view
(
"Person_Group"
,
[
"title"
=>
"人員群組管理"
,
"groups"
=>
$groups
,
"camera_list"
=>
$camera_list
,
"rowdata"
=>
$rowdata
,
"rowdata2"
=>
$rowdata2
,
"msg"
=>
$username
]);
}
else
{
$msg
=
"請選擇搜尋群組"
;
return
$this
->
Group_index
()
->
with
([
"error_msg"
=>
$msg
]);
return
$this
->
Group_index
(
$request
)
->
with
([
"error_msg"
=>
$msg
]);
}
}
...
...
@@ -863,10 +860,11 @@ class PersonGroupController extends Controller
));
}
}
$username
=
$request
->
session
()
->
get
(
'Tusername'
);
if
(
$msg
!=
null
)
{
return
view
(
"Person_Group"
,
[
"title"
=>
"人員群組管理"
,
"groups"
=>
$groups
,
"camera_list"
=>
$camera_list
,
"rowdata"
=>
$rowdata
,
"rowdata2"
=>
$rowdata3
,
"error_msg"
=>
$msg
]);
return
view
(
"Person_Group"
,
[
"title"
=>
"人員群組管理"
,
"groups"
=>
$groups
,
"camera_list"
=>
$camera_list
,
"rowdata"
=>
$rowdata
,
"rowdata2"
=>
$rowdata3
,
"error_msg"
=>
$msg
,
"msg"
=>
$username
]);
}
else
{
return
view
(
"Person_Group"
,
[
"title"
=>
"人員群組管理"
,
"groups"
=>
$groups
,
"camera_list"
=>
$camera_list
,
"rowdata"
=>
$rowdata
,
"rowdata2"
=>
$rowdata3
]);
return
view
(
"Person_Group"
,
[
"title"
=>
"人員群組管理"
,
"groups"
=>
$groups
,
"camera_list"
=>
$camera_list
,
"rowdata"
=>
$rowdata
,
"rowdata2"
=>
$rowdata3
,
"msg"
=>
$username
]);
}
...
...
resources/views/Device.blade.php
View file @
1f00a78c
...
...
@@ -63,7 +63,13 @@
@endif
</div>
</div>
<p></p>
<form method="
GET
" action="
{{
Route
(
"user_logout"
)
}}
">
<div class="
col
-
12
">
<label style="
text
-
align
:
left
;
font
-
size
:
16
px
;
color
:
#ffffff">使用者:{{$msg}} </label>
<
input
class
="
btn
btn
-
outline
-
light
" style="
font
-
size
:
16
px
;
text
-
align
:
center
" type="
submit
" id="
logout
" name="
logout
" value="
登出
" >
</div>
</form>
</div>
{{--攝影機 畫面區--}}
<div id="
Screen
-
aria
" class="
col
-
md
-
10
" style="
background
:
darkgray
">
...
...
resources/views/Device_group.blade.php
View file @
1f00a78c
...
...
@@ -62,7 +62,13 @@
@endif
</div>
</div>
<p></p>
<form method="
GET
" action="
{{
Route
(
"user_logout"
)
}}
">
<div class="
col
-
12
">
<label style="
text
-
align
:
left
;
font
-
size
:
16
px
;
color
:
#ffffff">使用者:{{$msg}} </label>
<
input
class
="
btn
btn
-
outline
-
light
" style="
font
-
size
:
16
px
;
text
-
align
:
center
" type="
submit
" id="
logout
" name="
logout
" value="
登出
" >
</div>
</form>
</div>
{{--攝影機 畫面區--}}
<div id="
Screen
-
aria
" class="
col
-
md
-
10
" style="
background
:
darkgray
">
...
...
resources/views/Device_relation.blade.php
View file @
1f00a78c
...
...
@@ -61,7 +61,13 @@
@endif
</div>
</div>
<p></p>
<form method="
GET
" action="
{{
Route
(
"user_logout"
)
}}
">
<div class="
col
-
12
">
<label style="
text
-
align
:
left
;
font
-
size
:
16
px
;
color
:
#ffffff">使用者:{{$msg}} </label>
<
input
class
="
btn
btn
-
outline
-
light
" style="
font
-
size
:
16
px
;
text
-
align
:
center
" type="
submit
" id="
logout
" name="
logout
" value="
登出
" >
</div>
</form>
</div>
{{--攝影機 畫面區--}}
<div id="
Screen
-
aria
" class="
col
-
md
-
10
" style="
background
:
darkgray
">
...
...
resources/views/Device_type.blade.php
View file @
1f00a78c
...
...
@@ -63,6 +63,13 @@
@endif
</div>
</div>
<p></p>
<form method="
GET
" action="
{{
Route
(
"user_logout"
)
}}
">
<div class="
col
-
12
">
<label style="
text
-
align
:
left
;
font
-
size
:
16
px
;
color
:
#ffffff">使用者:{{$msg}} </label>
<
input
class
="
btn
btn
-
outline
-
light
" style="
font
-
size
:
16
px
;
text
-
align
:
center
" type="
submit
" id="
logout
" name="
logout
" value="
登出
" >
</div>
</form>
</div>
{{--攝影機 畫面區--}}
<div id="
Screen
-
aria
" class="
col
-
md
-
10
" style="
background
:
darkgray
">
...
...
resources/views/Person.blade.php
View file @
1f00a78c
...
...
@@ -115,7 +115,13 @@
@endif
</div>
</div>
<p></p>
<form method="
GET
" action="
{{
Route
(
"user_logout"
)
}}
">
<div class="
col
-
12
">
<label style="
text
-
align
:
left
;
font
-
size
:
16
px
;
color
:
#ffffff">使用者:{{$msg}} </label>
<
input
class
="
btn
btn
-
outline
-
light
" style="
font
-
size
:
16
px
;
text
-
align
:
center
" type="
submit
" id="
logout
" name="
logout
" value="
登出
" >
</div>
</form>
</div>
{{--攝影機 畫面區--}}
<div id="
Screen
-
aria
" class="
col
-
md
-
10
" style="
background
:
darkgray
">
...
...
resources/views/Person_Attendance.blade.php
View file @
1f00a78c
...
...
@@ -97,7 +97,12 @@
@endif
</div>
</div>
<form method="
GET
" action="
{{
Route
(
"user_logout"
)
}}
">
<div class="
col
-
12
">
<label style="
text
-
align
:
left
;
font
-
size
:
16
px
;
color
:
#ffffff">使用者:{{$msg}} </label>
<
input
class
="
btn
btn
-
outline
-
light
" style="
font
-
size
:
16
px
;
text
-
align
:
center
" type="
submit
" id="
logout
" name="
logout
" value="
登出
" >
</div>
</form>
</div>
{{--攝影機 畫面區--}}
<div id="
Screen
-
aria
" class="
col
-
md
-
10
" style="
background
:
darkgray
">
...
...
resources/views/Person_Comparison.blade.php
View file @
1f00a78c
...
...
@@ -102,7 +102,13 @@
@endif
</div>
</div>
<p></p>
<form method="
GET
" action="
{{
Route
(
"user_logout"
)
}}
">
<div class="
col
-
12
">
<label style="
text
-
align
:
left
;
font
-
size
:
16
px
;
color
:
#ffffff">使用者:{{$msg}} </label>
<
input
class
="
btn
btn
-
outline
-
light
" style="
font
-
size
:
16
px
;
text
-
align
:
center
" type="
submit
" id="
logout
" name="
logout
" value="
登出
" >
</div>
</form>
</div>
{{--攝影機 畫面區--}}
<div id="
Screen
-
aria
" class="
col
-
md
-
10
" style="
background
:
darkgray
">
...
...
resources/views/Person_Group.blade.php
View file @
1f00a78c
...
...
@@ -99,7 +99,13 @@
@endif
</div>
</div>
<p></p>
<form method="
GET
" action="
{{
Route
(
"user_logout"
)
}}
">
<div class="
col
-
12
">
<label style="
text
-
align
:
left
;
font
-
size
:
16
px
;
color
:
#ffffff">使用者:{{$msg}} </label>
<
input
class
="
btn
btn
-
outline
-
light
" style="
font
-
size
:
16
px
;
text
-
align
:
center
" type="
submit
" id="
logout
" name="
logout
" value="
登出
" >
</div>
</form>
</div>
{{--攝影機 畫面區--}}
<div id="
Screen
-
aria
" class="
col
-
md
-
10
" style="
background
:
darkgray
">
...
...
resources/views/Person_Insert.blade.php
View file @
1f00a78c
...
...
@@ -71,7 +71,13 @@
@endif
</div>
</div>
<p></p>
<form method="
GET
" action="
{{
Route
(
"user_logout"
)
}}
">
<div class="
col
-
12
">
<label style="
text
-
align
:
left
;
font
-
size
:
16
px
;
color
:
#ffffff">使用者:{{$msg}} </label>
<
input
class
="
btn
btn
-
outline
-
light
" style="
font
-
size
:
16
px
;
text
-
align
:
center
" type="
submit
" id="
logout
" name="
logout
" value="
登出
" >
</div>
</form>
</div>
{{--攝影機 畫面區--}}
<div id="
Screen
-
aria
" class="
col
-
md
-
8
" style="
background
:
darkgray
">
...
...
resources/views/Person_Search_Group.blade.php
View file @
1f00a78c
...
...
@@ -98,7 +98,13 @@
@endif
</div>
</div>
<p></p>
<form method="
GET
" action="
{{
Route
(
"user_logout"
)
}}
">
<div class="
col
-
12
">
<label style="
text
-
align
:
left
;
font
-
size
:
16
px
;
color
:
#ffffff">使用者:{{$msg}} </label>
<
input
class
="
btn
btn
-
outline
-
light
" style="
font
-
size
:
16
px
;
text
-
align
:
center
" type="
submit
" id="
logout
" name="
logout
" value="
登出
" >
</div>
</form>
</div>
{{--攝影機 畫面區--}}
<div id="
Screen
-
aria
" class="
col
-
md
-
10
" style="
background
:
darkgray
">
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment