first commit

This commit is contained in:
Eric Li
2025-06-13 12:09:50 +08:00
commit b12cd07419
545 changed files with 39389 additions and 0 deletions

View File

@ -0,0 +1,32 @@
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h1 style="text-align: center;">
客服專線
</h1>
</div>
</div>
<div style="height:20px;">&nbsp;</div>
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<ul>
<li>
執行單位:雷科斯國際有限公司
</li>
<li>
電話:(02) 2297-0109
</li>
<li>
Email<a href="mailto:info@shibasays.com" target="_blank">info@shibasays.com</a>
</li>
</ul>
</div>
</div>
</div>
@endsection

View File

@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>
<head>
<title>桃園市政府衛生局-定期追蹤不落拍-健康管理醫起來-網站通知</title>
</head>
<body>
<h1>{{ $data['title'] }}</h1>
<hr>
<pre>
{{ $data['body'] }}
</pre>
<p>&nbsp;</p>
<p>活動網站網址:<a href="https://health.goodcake.tw/" target="_blank">https://health.goodcake.tw/</a></p>
<p>- Ⓒ2025 桃園市政府衛生局-定期追蹤不落拍-健康管理醫起來-活動網站 -</p>
</body>
</html>

View File

@ -0,0 +1,53 @@
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h1 style="text-align: center;">
常見問題
</h1>
</div>
</div>
<div style="height:20px;">&nbsp;</div>
@php
foreach ($dataRows as $row)
{
$img_memo = '';
$img_src = '/assets/img/news-item-a01.jpg';
$imgs = $row->photos;
// $imgs = array_filter($row['photos'], function($v) {
// return $v['is_selected'] == true;
// });
if (count($imgs) > 0)
{
foreach($imgs as $img)
{
//$img_memo = $img['comment'];
$img_src = URL::asset('/storage/'.$img['file_path']);
break;
}
}
@endphp
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h2>{{ $row->title }}</h2>
<h5>發佈時間 <time>{{ date('Y-m-d h:i', strtotime($row->post_at)) }}</time></h5>
<img src="{{ $img_src }}" alt="{{ $img_memo }}" width="100%" height="auto">
<p>&nbsp;</p>
<div>
{!! $row->body !!}
</div>
</div>
</div>
<div style="height: 20px;">&nbsp;</div>
@php
}
@endphp
</div>
@endsection

View File

@ -0,0 +1,159 @@
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h1 style="text-align: center;">
反轉代謝新人生 皮蛇疫苗加碼補
</h1>
</div>
</div>
<div style="height:20px;">&nbsp;</div>
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h3>健康達標再加碼→帶狀皰疹疫苗補助5,000元!</h3>
<p>
桃園市政府為鼓勵高齡市民積極參與健康管理、防治代謝症候群,
提供自費帶狀皰疹疫苗補助方案。只要達成健康指標,
即可申請高額補助,名額有限,請把握機會!
</p>
<h3>一、活動規則</h3>
<ol>
<li>
活動期間<br>
114 1 1 日至 9 30 日止
</li>
<li>
活動對象<br>
設籍桃園市且年滿50歲代謝症候群防治計畫個案。
</li>
<li>
活動方式<br>
步驟一|至桃園市代謝症候群防治計畫診所追蹤。<br>
步驟二代謝症候群指標達標請醫師於記錄小卡「註4」處核章並取得檢查報告(<a href="{{asset('assets/doc/114health-exam-form.pdf')}}" target="_blank">格式下載</a>)<br>
步驟三|資料上傳活動平台。<br>
紀錄小卡(核章)<br>
身分證正反面<br>
114年度內兩份代謝症候群指標達標之檢查報告
</li>
<li>
活動好禮<br>
<span style="color:red;">前50名</span>經審核合格者,
每人補助<span style="color:red;">5,000</span>帶狀皰疹疫苗(自費項目)
</li>
</ol>
<h3>二、注意事項</h3>
<ol>
<li>
依上傳時間排序進行審核,每人補助<span style="color:red;">一次</span>
</li>
<li>
代謝症候群指標<br>
<table style="border: solid 1px gray; font-size:1.0em">
<tr>
<td>項目</td>
<td>&nbsp;</td>
<td>標準值</td>
</tr>
<tr style="border: solid 1px gray">
<td>腰圍</td>
<td>&nbsp;</td>
<td>男性 90 公分/女性 80 公分,或 BMI 27</td>
</tr>
<tr style="border: solid 1px gray">
<td>飯前血糖</td>
<td>&nbsp;</td>
<td> 100 mg/dL</td>
</tr>
<tr style="border: solid 1px gray">
<td>血壓</td>
<td>&nbsp;</td>
<td>收縮壓 130 mmHg舒張壓 85 mmHg</td>
</tr>
<tr style="border: solid 1px gray">
<td>三酸甘油脂</td>
<td>&nbsp;</td>
<td> 150 mg/dL</td>
</tr>
<tr style="border: solid 1px gray">
<td>高密度脂蛋白膽固醇(HDL)</td>
<td>&nbsp;</td>
<td>男性 > 40 mg/dL女性 > 50 mg/dL</td>
</tr>
</table>
</li>
</ol>
<p>&nbsp;</p>
<a class="btn btn-success" href="{{asset('assets/images/health_allowance_comic_01.jpg')}}" target="_blank">下載懶人包(另開視窗)</a>
<a class="btn btn-success" href="{{asset('assets/images/health_allowance_intro_01.jpg')}}" target="_blank">下載簡章(另開視窗)</a>
</div>
</div>
<div>&nbsp;</div>
<div class="row justify-content-center">
<div class="col-md-8 main-area">
@if ($enable)
<span style="">
<input type="checkbox" class="form-check-input" id="regAgree1" required>
<label class="form-check-label" for="regAgree1">本人設籍於桃園市</label>
</span><br>
<span style="">
<input type="checkbox" class="form-check-input" id="regAgree" required>
<label class="form-check-label" for="regAgree">本人同意 &nbsp; <a href="/picm" target="_blank">「桃園市政府個人資料收集辦法」</a></label>
</span>
<div>&nbsp;</div>
<button id="btnFillForm" class="btn btn-primary">前往報名</button>
@else
<p>活動已載止</p>
@endif
<div>&nbsp;</div>
<button id="btnSearch" class="btn btn-primary">查詢審核狀態</button>
</div>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="staticBackdrop" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-body">
<button type="button" id="staticBackdrop-btn-close" class="btn-close" data-bs-dismiss="modal" aria-label="關閉"></button>
<label for="staticBackdrop-btn-close">
<img src="{{asset('assets/images/health_allowance_comic_01.jpg')}}" width="100%">
</label>
</div>
</div>
</div>
</div>
@endsection
@section('script')
<script>
$(document).ready(function(){
$('#staticBackdrop').modal('show');
$('#btnFillForm').click(function(){
if (!$('#regAgree1').is(':checked')) {
alert('請勾選「本人設籍於桃園市」');
return;
}
if (!$('#regAgree').is(':checked')) {
alert('請勾選「本人同意 桃園市政府個人資料收集辦法」');
return;
}
window.location='/health_allowance_fill_form';
});
$('#btnSearch').click(function(){
window.location='/health_allowance_check';
});
});
</script>
@endsection

View File

@ -0,0 +1,67 @@
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h1 style="text-align: center;">
反轉代謝新人生 皮蛇疫苗加碼補
</h1>
</div>
</div>
<div style="height:20px;">&nbsp;</div>
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h2 style="text-align: center;">查詢審核狀態</h2>
<p>&nbsp;</p>
<form id="dataForm" method="POST" action="/health_allowance_check" enctype="multipart/form-data" style="font-size: 1.4em; ">
@csrf
@if ($errors->any())
<div class="text-left mt-3 alert alert-block alert-dismissible alert-danger">
<!--<span type="button" class="close" data-bs-dismiss="alert">×</span>-->
<ul>
@foreach ($errors->all() as $error)
@if ($error)
<li>{{ $error }}</li>
@endif
@endforeach
</ul>
</div>
@endif
@if ($message = Session::get('success'))
<div class="text-left mt-3 alert alert-block alert-dismissible alert-success ">
<!--<span type="button" class="close" data-bs-dismiss="alert">×</span>-->
<strong>{{ $message }}</strong>
</div>
@endif
<div class="card">
<div class="card-body">
<div class="mb-3">
<label for="regIdNumber" class="form-label">身份證字號後4碼</label>
<input type="text" class="form-control" id="regTwid" name="twid" required value="{{ old('twid') }}" placeholder="範例6789">
</div>
<div class="mb-3">
<label for="regPhone" class="form-label">行動電話後4碼</label>
<input type="text" class="form-control" id="regPhone" name="phone" required value="{{ old('phone') }}" placeholder="範例1111">
</div>
<div class="mb-3">
&nbsp;
</div>
<button type="submit" class="btn btn-primary">送出查詢</button>
</div>
</div>
</form>
</div>
</div>
</div>
@endsection

View File

@ -0,0 +1,304 @@
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h1 style="text-align: center;">
反轉代謝新人生 皮蛇疫苗加碼補
</h1>
</div>
</div>
<div style="height:20px;">&nbsp;</div>
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h2 style="text-align: center;">報名表單</h2>
<form id="dataForm" method="POST" action="/health_allowance_fill_form" enctype="multipart/form-data" style="font-size: 1.4em; ">
@csrf
@if ($errors->any())
<div class="text-left mt-3 alert alert-block alert-dismissible alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
@if ($message = Session::get('success'))
<div class="text-left mt-3 alert alert-block alert-dismissible alert-success ">
<strong>{{ $message }}</strong>
</div>
@endif
<div class="card">
<div class="card-body">
<div class="mb-3">
<label for="regHospitalName" class="form-label">就醫院所</label>
<input type="text" class="form-control" id="regHospitalName" name="hospital_name" required value="{{ old('hospital_name') }}" placeholder="範例XX醫院">
</div>
<div class="mb-3">
<label for="regName" class="form-label">姓名</label>
<input type="text" class="form-control" id="regName" name="name" required value="{{ old('name') }}" placeholder="範例:王大明">
</div>
<div class="mb-3">
<label for="regIdNumber" class="form-label">身份證字號</label>
<input type="text" class="form-control" id="regTwid" name="twid" required value="{{ old('twid') }}" placeholder="範例H123456789">
</div>
<div class="mb-3">
<label for="regPhone" class="form-label">行動電話</label>
<input type="text" class="form-control" id="regPhone" name="phone" required value="{{ old('phone') }}" placeholder="範例09xxxxxxxx">
</div>
<div class="mb-3">
<label for="regEmail" class="form-label">電子信箱</label>
<input type="email" class="form-control" id="regEmail" name="email" required value="{{ old('email') }}" placeholder="範例your_name@example.com">
</div>
<div class="mb-3">
<label for="regAddress" class="form-label">收件地址</label>
<div class="city-selector-set input-group mb-3">
<select class="county form-control" required></select>
<select class="district form-control" required></select>
<input class="zipcode form-control" type="text" size="3" readonly placeholder="郵遞區號">
<input class="district_area form-control" type="text" size="10" name="district_area" required value="{{ old('district_area') }}" placeholder="XX里">
</div>
<input type="text" class="street form-control" name="street" required value="{{ old('street') }}" placeholder="範例縣府路1號">
<input type="hidden" class="form-control" id="regAddress" name="address" required value="{{ old('address') }}">
</div>
<div class="mb-3">
<label class="form-label">記錄小卡</label>
<div class="input-group mb-3">
<button type="button" class="btn btn-outline-secondary btnBase64">選擇檔案</button>
<input type="text" class="form-control infoBase64" disabled="disabled" required placeholder="點擊選擇檔案(JPG、PNG、PDF檔案)">
</div>
<input type="file" class="fileBase64" accept="image/*,.pdf" style="display: none;">
<input type="hidden" class="hFileTypeBase64" name="fileRecordCardFileType" value="{{ old('fileRecordCardFileType') }}" >
<input type="hidden" class="hFileNameBase64" name="fileRecordCardFileName" value="{{ old('fileRecordCardFileName') }}" >
<input type="hidden" class="hFileBase64" name="fileRecordCardBase64" value="{{ old('fileRecordCardBase64') }}">
</div>
<div class="mb-3">
<label class="form-label">身分證正面</label>
<div class="input-group mb-3">
<button type="button" class="btn btn-outline-secondary btnBase64">選擇檔案</button>
<input type="text" class="form-control infoBase64" disabled="disabled" required placeholder="點擊選擇檔案(JPG、PNG、PDF檔案)">
</div>
<input type="file" class="fileBase64" accept="image/*,.pdf" style="display: none;">
<input type="hidden" class="hFileTypeBase64" name="fileTwidFrontFileType" value="{{ old('fileTwidFrontFileType') }}" >
<input type="hidden" class="hFileNameBase64" name="fileTwidFrontFileName" value="{{ old('fileTwidFrontFileName') }}" >
<input type="hidden" class="hFileBase64" name="fileTwidFrontBase64" value="{{ old('fileTwidFrontBase64') }}">
</div>
<div class="mb-3">
<label class="form-label">身分證反面</label>
<div class="input-group mb-3">
<button type="button" class="btn btn-outline-secondary btnBase64">選擇檔案</button>
<input type="text" class="form-control infoBase64" disabled="disabled" required placeholder="點擊選擇檔案(JPG、PNG、PDF檔案)">
</div>
<input type="file" class="fileBase64" accept="image/*,.pdf" style="display: none;">
<input type="hidden" class="hFileTypeBase64" name="fileTwidBackFileType" value="{{ old('fileTwidBackFileType') }}" >
<input type="hidden" class="hFileNameBase64" name="fileTwidBackFileName" value="{{ old('fileTwidBackFileName') }}" >
<input type="hidden" class="hFileBase64" name="fileTwidBackBase64" value="{{ old('fileTwidBackBase64') }}">
</div>
<div class="mb-3" style="color:red;">
114年2次間隔10周以上符合補助條件之檢驗檢查報告
</div>
<div class="mb-3">
<label class="form-label">檢驗檢查報告1</label>
<div class="input-group mb-3">
<button type="button" class="btn btn-outline-secondary btnBase64">選擇檔案</button>
<input type="text" class="form-control infoBase64" disabled="disabled" required placeholder="點擊選擇檔案(JPG、PNG、PDF檔案)">
</div>
<input type="file" class="fileBase64" accept="image/*,.pdf" style="display: none;">
<input type="hidden" class="hFileTypeBase64" name="fileExam1stFileType" value="{{ old('fileExam1stFileType') }}" >
<input type="hidden" class="hFileNameBase64" name="fileExam1stFileName" value="{{ old('fileExam1stFileName') }}" >
<input type="hidden" class="hFileBase64" name="fileExam1stBase64" value="{{ old('fileExam1stBase64') }}">
</div>
<div class="mb-3">
<label class="form-label">檢驗檢查報告2</label>
<div class="input-group mb-3">
<button type="button" class="btn btn-outline-secondary btnBase64">選擇檔案</button>
<input type="text" class="form-control infoBase64" disabled="disabled" required placeholder="點擊選擇檔案(JPG、PNG、PDF檔案)">
</div>
<input type="file" class="fileBase64" accept="image/*,.pdf" style="display: none;">
<input type="hidden" class="hFileTypeBase64" name="fileExam2ndFileType" value="{{ old('fileExam2ndFileType') }}" >
<input type="hidden" class="hFileNameBase64" name="fileExam2ndFileName" value="{{ old('fileExam2ndFileName') }}" >
<input type="hidden" class="hFileBase64" name="fileExam2ndBase64" value="{{ old('fileExam2ndBase64') }}">
</div>
<div class="mb-3">
&nbsp;
</div>
<button type="submit" class="btn btn-primary">提交審核</button>
</div>
</div>
</form>
<p>&nbsp;</p>
</div>
</div>
</div>
@endsection
@section('script')
<script>
$(document).ready(function(){
$('#regTwid').on('change', function(){
var val = $(this).val();
val = toHalfWidth(val);
val = val.toUpperCase();
if (verifyId(val)) {
$(this).val(val);
} else {
alert('請輸入正確身份證字號');
$(this).val('');
}
});
$('#regEmail').on('change', function(){
var val = $(this).val();
val = toHalfWidth(val);
$(this).val(val);
});
$('#regPhone').on('change', function(){
const phoneRegex = /^09\d{8}$/;
var phone = $(this).val();
phone = toHalfWidth(phone);
if (!phoneRegex.test(phone)) {
alert('請輸入正確格式 09xxxxxxxx');
$(this).val('');
} else {
$(this).val(phone);
}
});
var tcs = new TwCitySelector({
el: '.city-selector-set',
elCounty: '.county', // 在 el 裡查找 element
elDistrict: '.district', // 在 el 裡查找 element
elZipcode: '.zipcode' // 在 el 裡查找 element
});
var addr = $('#regAddress').val();
if (addr) {
setTimeout(() => {
var addrs = addr.split(' ');
if (addrs.length == 5) {
$('.zipcode').val(addrs[0]);
tcs.setValue(addrs[1], addrs[2]);
$('.district_area').val(addrs[3]);
$('.street').val(addrs[4]);
}
}, 500);
}
$('.district_area').on('change', function(){
var district_area = $('.district_area').val();
district_area = toHalfWidth(district_area);
district_area = district_area.split(" ").join("");
if (district_area.substr(district_area.length - 1) != '里') {
alert('請填寫完整「XX里」');
$('.district_area').val('');
}
});
$('.county,.district,.zipcode,.district_area,.street').on('change', function(){
setTimeout(() => {
var country = $('.county').val();
var district = $('.district').val();
var zip = $('.zipcode').val();
var district_area = $('.district_area').val();
var street = $('.street').val();
district_area = toHalfWidth(district_area);
district_area = district_area.split(" ").join("");
street = toHalfWidth(street);
street = street.split(" ").join("");
$('.district_area').val(district_area);
$('.street').val(street);
$('#regAddress').val(`${zip} ${country} ${district} ${district_area} ${street}`);
}, 1);
});
$('.fileBase64').each(function(idx, elem) {
var pElem = $(elem).parent();
var btn = $(pElem).find('.btnBase64')[0];
var info = $(pElem).find('.infoBase64')[0];
var hFile = $(pElem).find('.hFileBase64')[0];
var hFileName = $(pElem).find('.hFileNameBase64')[0];
var hFileType = $(pElem).find('.hFileTypeBase64')[0];
var fn = $(hFileName).val();
if (fn) {
$(info).val(`已選擇檔案:${fn}`);
var previewElem = null;
if (fn.split('.').pop() == 'pdf') {
previewElem = $('<embed class="preview" type="application/pdf" width="300" height="150"></embed>');
} else {
previewElem = $('<img class="preview" height="150" />');
}
$(previewElem).appendTo(pElem);
$(previewElem).attr('src', $(hFileType).val() + ',' + $(hFile).val());
}
$(btn).click(function() {
$(elem).click();
});
$(elem).on('change', function(){
const file = this.files[0];
if (file) {
if (file.size > (1024*1024*5)) {
alert('超過可上傳的檔案容量(5MB),請重新選擇。');
return;
}
if (!(file.type === 'image/png' ||
file.type === 'image/jpeg' ||
file.type === 'application/pdf'))
{
alert('請選擇正確的檔案格式上傳(.jpg/.jpeg/.png/.pdf)。');
return;
}
$(pElem).find('.preview').remove();
const reader = new FileReader();
reader.onload = function(e) {
const bodys = e.target.result.split(',');
$(hFileType).val(bodys[0]);
$(hFile).val(bodys[1]);
$(hFileName).val(file.name);
$(info).val(`已選擇檔案:${file.name}`);
var previewElem = null;
if (file.name.split('.').pop() == 'pdf') {
previewElem = $('<embed class="preview" type="application/pdf" width="300" height="150"></embed>');
} else {
previewElem = $('<img class="preview" height="150" />');
}
$(previewElem).appendTo(pElem);
$(previewElem).attr('src', e.target.result);
};
reader.readAsDataURL(file);
}
});
});
});
</script>
@endsection

View File

@ -0,0 +1,31 @@
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h1 style="text-align: center;">
反轉代謝新人生 皮蛇疫苗加碼補
</h1>
</div>
</div>
<div style="height:20px;">&nbsp;</div>
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h2 style="text-align: center;">登記成功!!</h2>
<p>&nbsp;</p>
<div class="nav-item-3">
<a class="nav-link" href="https://forms.gle/LHvHDzRS6EgGsRHGA" target="_blank"> 滿意度調查</a>
</div>
</div>
</div>
</div>
@endsection

View File

@ -0,0 +1,54 @@
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h1 style="text-align: center;">
健康資訊
</h1>
</div>
</div>
<div style="height:20px;">&nbsp;</div>
@php
foreach ($dataRows as $row)
{
$img_memo = '';
$img_src = '/assets/img/news-item-a01.jpg';
$imgs = $row->photos;
// $imgs = array_filter($row['photos'], function($v) {
// return $v['is_selected'] == true;
// });
if (count($imgs) > 0)
{
foreach($imgs as $img)
{
//$img_memo = $img['comment'];
$img_src = URL::asset('/storage/'.$img['file_path']);
break;
}
}
@endphp
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h2>{{ $row->title }}</h2>
<h5>發佈時間 <time>{{ date('Y-m-d h:i', strtotime($row->post_at)) }}</time></h5>
<img src="{{ $img_src }}" alt="{{ $img_memo }}" width="100%" height="auto">
<p>&nbsp;</p>
<div>
{!! $row->body !!}
</div>
</div>
</div>
<div style="height: 20px;">&nbsp;</div>
@php
}
@endphp
</div>
@endsection

View File

@ -0,0 +1,117 @@
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h1 style="text-align: center;">
健康知識學起來 輕鬆領取桃園幣
</h1>
</div>
</div>
<div style="height:20px;">&nbsp;</div>
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h3>健康識能有獎徵答活動</h3>
<p>
為提升市民慢性病防治識能,
透過線上答題互動學習正確衛教資訊,
全數答對即可獲得桃園幣!
</p>
<h3>一、活動規則</h3>
<ol>
<li>
活動期間<br>
114 6 12 日至 9 30 日(名額上限為 5,000 名)。
</li>
<li>
參加對象<br>
持有桃園市民卡的民眾。
</li>
<li>
參加方式<br>
步驟一|進入活動平台指定頁面(串接至桃園市民卡)。<br>
步驟二完成5題衛教問答。<br>
步驟三|答題次數不限,直到全數答對為止。
</li>
<li>
活動好禮<br>
全數答對者可獲得50點桃園幣限額5,000名)。
</li>
<li>
活動提醒<br>
同一市民卡僅限兌換一次獎勵。<br>
得獎者名單將公布於活動平台,桃園幣將自動匯入 APP 帳戶。
</li>
</ol>
<h3>二、注意事項</h3>
<ol>
<li>
桃園幣將自動匯入帳號,同一帳號僅限<span style="color:red;">兌換一次</span>獎勵。
</li>
<li>
活動<span style="color:red;">結束</span><span style="color:red;">額滿</span>時,
答題<span style="color:red;">入口將自動關閉</span>
</li>
</ol>
<p>&nbsp;</p>
<a class="btn btn-success" href="{{asset('assets/images/health_literacy_comic_01.jpg')}}" target="_blank">下載懶人包(另開視窗)</a>
<a class="btn btn-success" href="{{asset('assets/images/health_literacy_intro_01.jpg')}}" target="_blank">下載簡章(另開視窗)</a>
</div>
</div>
<div>&nbsp;</div>
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h3 style="text-align: center;">
活動參加辦法
</h3>
<h3 style="text-align: center;">
第一步 - 下載桃園市民卡APP
</h3>
<h3 style="text-align: center;">
<img src="{{asset('assets/images/app_ios.png')}}" height="36" />
<img src="{{asset('assets/images/app_aos.png')}}" height="36" />
</h3>
<h3 style="text-align: center;">
<img src="{{asset('assets/images/TYAPP-Download-QRcode.png')}}" height="150" />
</h3>
<h3 style="text-align: center;">
第二步 - 註冊桃園市民卡APP會員
</h3>
<h3 style="text-align: center;">
<img src="{{asset('assets/images/TYAPP-Reg-Info.jpg')}}" height="150" />
</h3>
</div>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="staticBackdrop" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-body">
<button type="button" id="staticBackdrop-btn-close" class="btn-close" data-bs-dismiss="modal" aria-label="關閉"></button>
<label for="staticBackdrop-btn-close">
<img src="{{asset('assets/images/health_literacy_comic_01.jpg')}}" width="100%">
</label>
</div>
</div>
</div>
</div>
@endsection
@section('script')
<script>
$(document).ready(function(){
$('#staticBackdrop').modal('show');
});
</script>
@endsection

View File

@ -0,0 +1,21 @@
@extends('layouts.app')
@section('content')
<img src="{{asset('assets/images/main-banner_960x480.png')}}" width="100%">
@endsection
@section('script')
<script>
$(document).ready(function(){
setTimeout(() => {
if (window.innerWidth < 768) {
$('.navbar-toggler').click();
}
}, 500);
});
</script>
@endsection

View File

@ -0,0 +1,204 @@
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h1 style="text-align: center;">
健康達標GO 大獎汽車不是夢
</h1>
</div>
</div>
<div style="height:20px;">&nbsp;</div>
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h3>得健康、拿大獎!抽汽車就是這麼簡單</h3>
<p>
只要您符合活動對象並於活動期間改善健康狀況即達標,
不僅生活品質升級,
獎品也Level Up
</p>
<h3>一、活動規則</h3>
<ol>
<li>
活動期間<br>
114 1 1 日至 9 30 日止。
</li>
<li>
活動對象<br>
設籍桃園市,並於桃園市醫療院所參與下列任一計畫或方案者:<br>
代謝症候群防治計畫<br>
糖尿病及初期慢性腎臟病照護整合方案
</li>
<li>
活動方式<br>
步驟一|至桃園市醫療院所追蹤。<br>
步驟二|健康達標並請醫師於記錄小卡對應疾病處核章、並取得檢查報告(<a href="{{asset('assets/doc/114health-exam-form.pdf')}}" target="_blank">格式下載</a>)<br>
步驟三|資料上傳活動平台。<br>
  記錄小卡(核章)<br>
  身分證正反面<br>
  檢查報告
</li>
<li>
活動好禮<br>
經審核合格者,<span style="color:red;">皆可獲得抽獎資格</span>
</li>
</ol>
<h3>二、注意事項</h3>
<p>&nbsp;&nbsp;每人僅限<span style="color:red;">一次</span>獲獎機會,若重複獲獎則以<span style="color:red;">首次中獎品項為主</span></p>
<p>&nbsp;</p>
<a class="btn btn-success" href="{{asset('assets/images/improved_health_comic_01.jpg')}}" target="_blank">下載懶人包(另開視窗)</a>
<a class="btn btn-success" href="{{asset('assets/images/improved_health_intro_01.jpg')}}" target="_blank">下載簡章(另開視窗)</a>
</div>
</div>
<div>&nbsp;</div>
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h3>
活動獎項
</h3>
<table style="border: solid 1px gray">
<tr>
<td colspan="2">獎品內容</td>
<!--<td width="20%">單價</td>-->
<td width="10%">數量</td>
</tr>
<tr style="border: solid 1px gray">
<td>中華三菱汽車OUTLANDER 2.4L</td>
<td style="padding:5px;"><img src="{{asset('assets/images/prize/car.jpg')}}" width="80%"></td>
<!--<td></td>-->
<td>1</td>
</tr>
<tr style="border: solid 1px gray">
<td>eReady電動機車</td>
<td style="padding:5px;"><img src="{{asset('assets/images/prize/emotor.png')}}" width="80%"></td>
<!--<td></td>-->
<td>3</td>
</tr>
<tr style="border: solid 1px gray">
<td>iPhone 16 Pro 128G</td>
<td style="padding:5px;"><img src="{{asset('assets/images/prize/iphone.png')}}" width="80%"></td>
<!--<td></td>-->
<td>3</td>
</tr>
<tr style="border: solid 1px gray">
<td>Apple Watch Series 10</td>
<td style="padding:5px;"><img src="{{asset('assets/images/prize/watch.jpg')}}" width="80%"></td>
<!--<td></td>-->
<td>3</td>
</tr>
<tr style="border: solid 1px gray">
<td>PHILIPS 數位海星氣炸鍋 4.1L-小白</td>
<td style="padding:5px;"><img src="{{asset('assets/images/prize/airfryer.png')}}" width="80%"></td>
<!--<td></td>-->
<td>10</td>
</tr>
<tr style="border: solid 1px gray">
<td>URBAN XCAPE 腳踏車</td>
<td style="padding:5px;"><img src="{{asset('assets/images/prize/bike.jpg')}}" width="80%"></td>
<!--<td></td>-->
<td>5</td>
</tr>
<tr style="border: solid 1px gray">
<td>新台幣2000元等值商品卡</td>
<td style="padding:5px;"><img src="{{asset('assets/images/prize/giftcard-2000.jpg')}}" width="80%"></td>
<!--<td></td>-->
<td>100</td>
</tr>
<tr style="border: solid 1px gray">
<td>新台幣1000元等值商品卡</td>
<td style="padding:5px;"><img src="{{asset('assets/images/prize/giftcard-1000.png')}}" width="80%"></td>
<!--<td></td>-->
<td>100</td>
</tr>
<tr style="border: solid 1px gray">
<td>新台幣500元等值商品卡</td>
<td style="padding:5px;"><img src="{{asset('assets/images/prize/giftcard-500.png')}}" width="80%"></td>
<!--<td></td>-->
<td>100</td>
</tr>
<tr style="border: solid 1px gray">
<td>福爾益康語音型2合1血糖血壓測試系統+血糖試片
<br>型號TD-3261G / 4G傳輸版本
<br>血糖試片TD-3261 / 50片裝
</td>
<td style="padding:5px;"><img src="{{asset('assets/images/prize/td-3261g.jpg')}}" width="80%"></td>
<!--<td></td>-->
<td>175</td>
</tr>
</table>
</div>
</div>
<div>&nbsp;</div>
<div class="row justify-content-center">
<div class="col-md-8 main-area">
@if ($enable)
<span style="">
<input type="checkbox" class="form-check-input" id="regAgree1" required>
<label class="form-check-label" for="regAgree1">本人設籍於桃園市</label>
</span><br>
<span style="">
<input type="checkbox" class="form-check-input" id="regAgree" required>
<label class="form-check-label" for="regAgree">本人同意 &nbsp; <a href="/picm" target="_blank">「桃園市政府個人資料收集辦法」</a></label>
</span>
<div>&nbsp;</div>
<button id="btnFillForm" class="btn btn-primary">前往報名</button>
@else
<p>活動已載止</p>
@endif
<div>&nbsp;</div>
<button id="btnSearch" class="btn btn-primary">查詢審核狀態</button>
</div>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="staticBackdrop" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-body">
<button type="button" id="staticBackdrop-btn-close" class="btn-close" data-bs-dismiss="modal" aria-label="關閉"></button>
<label for="staticBackdrop-btn-close">
<img src="{{asset('assets/images/improved_health_comic_01.jpg')}}" width="100%">
</label>
</div>
</div>
</div>
</div>
@endsection
@section('script')
<script>
$(document).ready(function(){
$('#staticBackdrop').modal('show');
$('#btnFillForm').click(function(){
if (!$('#regAgree1').is(':checked')) {
alert('請勾選「本人設籍於桃園市」');
return;
}
if (!$('#regAgree').is(':checked')) {
alert('請勾選「本人同意 桃園市政府個人資料收集辦法」');
return;
}
window.location='/improved_health_fill_form';
});
$('#btnSearch').click(function(){
window.location='/improved_health_check';
});
});
</script>
@endsection

View File

@ -0,0 +1,65 @@
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h1 style="text-align: center;">
健康達標GO 大獎汽車不是夢
</h1>
</div>
</div>
<div style="height:20px;">&nbsp;</div>
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h2 style="text-align: center;">查詢審核狀態</h2>
<p>&nbsp;</p>
<form id="dataForm" method="POST" action="/improved_health_check" enctype="multipart/form-data" style="font-size: 1.4em; ">
@csrf
@if ($errors->any())
<div class="text-left mt-3 alert alert-block alert-dismissible alert-danger">
<!--<span type="button" class="close" data-bs-dismiss="alert">×</span>-->
<ul>
@foreach ($errors->all() as $error)
@if ($error)
<li>{{ $error }}</li>
@endif
@endforeach
</ul>
</div>
@endif
@if ($message = Session::get('success'))
<div class="text-left mt-3 alert alert-block alert-dismissible alert-success ">
<!--<span type="button" class="close" data-bs-dismiss="alert">×</span>-->
<strong>{{ $message }}</strong>
</div>
@endif
<div class="card">
<div class="card-body">
<div class="mb-3">
<label for="regIdNumber" class="form-label">身份證字號後4碼</label>
<input type="text" class="form-control" id="regTwid" name="twid" required value="{{ old('twid') }}" placeholder="範例6789">
</div>
<div class="mb-3">
<label for="regPhone" class="form-label">行動電話後4碼</label>
<input type="text" class="form-control" id="regPhone" name="phone" required value="{{ old('phone') }}" placeholder="範例1111">
</div>
<div class="mb-3">
&nbsp;
</div>
<button type="submit" class="btn btn-primary">送出查詢</button>
</div>
</div>
</form>
</div>
</div>
</div>
@endsection

View File

@ -0,0 +1,287 @@
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h1 style="text-align: center;">
健康達標GO 大獎汽車不是夢
</h1>
</div>
</div>
<div style="height:20px;">&nbsp;</div>
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h2 style="text-align: center;">報名表單</h2>
<form id="dataForm" method="POST" action="/improved_health_fill_form" enctype="multipart/form-data" style="font-size: 1.4em; ">
@csrf
@if ($errors->any())
<div class="text-left mt-3 alert alert-block alert-dismissible alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
@if ($message = Session::get('success'))
<div class="text-left mt-3 alert alert-block alert-dismissible alert-success ">
<strong>{{ $message }}</strong>
</div>
@endif
<div class="card">
<div class="card-body">
<div class="mb-3">
<label for="regHospitalName" class="form-label">就醫院所</label>
<input type="text" class="form-control" id="regHospitalName" name="hospital_name" required value="{{ old('hospital_name') }}" placeholder="範例XX醫院">
</div>
<div class="mb-3">
<label for="regName" class="form-label">姓名</label>
<input type="text" class="form-control" id="regName" name="name" required value="{{ old('name') }}" placeholder="範例:王大明">
</div>
<div class="mb-3">
<label for="regIdNumber" class="form-label">身份證字號</label>
<input type="text" class="form-control" id="regTwid" name="twid" required value="{{ old('twid') }}" placeholder="範例H123456789">
</div>
<div class="mb-3">
<label for="regPhone" class="form-label">行動電話</label>
<input type="text" class="form-control" id="regPhone" name="phone" required value="{{ old('phone') }}" placeholder="範例09xxxxxxxx">
</div>
<div class="mb-3">
<label for="regEmail" class="form-label">電子信箱</label>
<input type="email" class="form-control" id="regEmail" name="email" required value="{{ old('email') }}" placeholder="範例your_name@example.com">
</div>
<div class="mb-3">
<label for="regAddress" class="form-label">收件地址</label>
<div class="city-selector-set input-group mb-3">
<select class="county form-control" required></select>
<select class="district form-control" required></select>
<input class="zipcode form-control" type="text" size="3" readonly placeholder="郵遞區號">
<input class="district_area form-control" type="text" size="10" name="district_area" required value="{{ old('district_area') }}" placeholder="XX里">
</div>
<input type="text" class="street form-control" name="street" required value="{{ old('street') }}" placeholder="範例縣府路1號">
<input type="hidden" class="form-control" id="regAddress" name="address" required value="{{ old('address') }}">
</div>
<div class="mb-3">
<label class="form-label">記錄小卡</label>
<div class="input-group mb-3">
<button type="button" class="btn btn-outline-secondary btnBase64">選擇檔案</button>
<input type="text" class="form-control infoBase64" disabled="disabled" required placeholder="點擊選擇檔案(JPG、PNG、PDF檔案)">
</div>
<input type="file" class="fileBase64" accept="image/*,.pdf" style="display: none;">
<input type="hidden" class="hFileTypeBase64" name="fileRecordCardFileType" value="{{ old('fileRecordCardFileType') }}" >
<input type="hidden" class="hFileNameBase64" name="fileRecordCardFileName" value="{{ old('fileRecordCardFileName') }}" >
<input type="hidden" class="hFileBase64" name="fileRecordCardBase64" value="{{ old('fileRecordCardBase64') }}">
</div>
<div class="mb-3">
<label class="form-label">身分證正面</label>
<div class="input-group mb-3">
<button type="button" class="btn btn-outline-secondary btnBase64">選擇檔案</button>
<input type="text" class="form-control infoBase64" disabled="disabled" required placeholder="點擊選擇檔案(JPG、PNG、PDF檔案)">
</div>
<input type="file" class="fileBase64" accept="image/*,.pdf" style="display: none;">
<input type="hidden" class="hFileTypeBase64" name="fileTwidFrontFileType" value="{{ old('fileTwidFrontFileType') }}" >
<input type="hidden" class="hFileNameBase64" name="fileTwidFrontFileName" value="{{ old('fileTwidFrontFileName') }}" >
<input type="hidden" class="hFileBase64" name="fileTwidFrontBase64" value="{{ old('fileTwidFrontBase64') }}">
</div>
<div class="mb-3">
<label class="form-label">身分證反面</label>
<div class="input-group mb-3">
<button type="button" class="btn btn-outline-secondary btnBase64">選擇檔案</button>
<input type="text" class="form-control infoBase64" disabled="disabled" required placeholder="點擊選擇檔案(JPG、PNG、PDF檔案)">
</div>
<input type="file" class="fileBase64" accept="image/*,.pdf" style="display: none;">
<input type="hidden" class="hFileTypeBase64" name="fileTwidBackFileType" value="{{ old('fileTwidBackFileType') }}" >
<input type="hidden" class="hFileNameBase64" name="fileTwidBackFileName" value="{{ old('fileTwidBackFileName') }}" >
<input type="hidden" class="hFileBase64" name="fileTwidBackBase64" value="{{ old('fileTwidBackBase64') }}">
</div>
<div class="mb-3">
<label class="form-label">檢查報告</label>
<div class="input-group mb-3">
<button type="button" class="btn btn-outline-secondary btnBase64">選擇檔案</button>
<input type="text" class="form-control infoBase64" disabled="disabled" required placeholder="點擊選擇檔案(JPG、PNG、PDF檔案)">
</div>
<input type="file" class="fileBase64" accept="image/*,.pdf" style="display: none;">
<input type="hidden" class="hFileTypeBase64" name="fileExamFileType" value="{{ old('fileExamFileType') }}" >
<input type="hidden" class="hFileNameBase64" name="fileExamFileName" value="{{ old('fileExamFileName') }}" >
<input type="hidden" class="hFileBase64" name="fileExamBase64" value="{{ old('fileExamBase64') }}">
</div>
<div class="mb-3">
&nbsp;
</div>
<button type="submit" class="btn btn-primary">提交審核</button>
</div>
</div>
</form>
<p>&nbsp;</p>
</div>
</div>
</div>
@endsection
@section('script')
<script>
$(document).ready(function(){
$('#regTwid').on('change', function(){
var val = $(this).val();
val = toHalfWidth(val);
val = val.toUpperCase();
if (verifyId(val)) {
$(this).val(val);
} else {
alert('請輸入正確身份證字號');
$(this).val('');
}
});
$('#regEmail').on('change', function(){
var val = $(this).val();
val = toHalfWidth(val);
$(this).val(val);
});
$('#regPhone').on('change', function(){
const phoneRegex = /^09\d{8}$/;
var phone = $(this).val();
phone = toHalfWidth(phone);
if (!phoneRegex.test(phone)) {
alert('請輸入正確格式 09xxxxxxxx');
$(this).val('');
} else {
$(this).val(phone);
}
});
var tcs = new TwCitySelector({
el: '.city-selector-set',
elCounty: '.county', // 在 el 裡查找 element
elDistrict: '.district', // 在 el 裡查找 element
elZipcode: '.zipcode' // 在 el 裡查找 element
});
var addr = $('#regAddress').val();
if (addr) {
setTimeout(() => {
var addrs = addr.split(' ');
if (addrs.length >= 5) {
$('.zipcode').val(addrs[0]);
tcs.setValue(addrs[1], addrs[2]);
$('.district_area').val(addrs[3]);
$('.street').val(addrs[4]);
}
}, 500);
}
$('.district_area').on('change', function(){
var district_area = $('.district_area').val();
district_area = toHalfWidth(district_area);
district_area = district_area.split(" ").join("");
if (district_area.substr(district_area.length - 1) != '里') {
alert('請填寫完整「XX里」');
$('.district_area').val('');
}
});
$('.county,.district,.zipcode,.district_area,.street').on('change', function(){
setTimeout(() => {
var country = $('.county').val();
var district = $('.district').val();
var zip = $('.zipcode').val();
var district_area = $('.district_area').val();
var street = $('.street').val();
district_area = toHalfWidth(district_area);
district_area = district_area.split(" ").join("");
street = toHalfWidth(street);
street = street.split(" ").join("");
$('.district_area').val(district_area);
$('.street').val(street);
$('#regAddress').val(`${zip} ${country} ${district} ${district_area} ${street}`);
}, 1);
});
$('.fileBase64').each(function(idx, elem) {
var pElem = $(elem).parent();
var btn = $(pElem).find('.btnBase64')[0];
var info = $(pElem).find('.infoBase64')[0];
var hFile = $(pElem).find('.hFileBase64')[0];
var hFileName = $(pElem).find('.hFileNameBase64')[0];
var hFileType = $(pElem).find('.hFileTypeBase64')[0];
var fn = $(hFileName).val();
if (fn) {
$(info).val(`已選擇檔案:${fn}`);
var previewElem = null;
if (fn.split('.').pop() == 'pdf') {
previewElem = $('<embed class="preview" type="application/pdf" width="300" height="150"></embed>');
} else {
previewElem = $('<img class="preview" height="150" />');
}
$(previewElem).appendTo(pElem);
$(previewElem).attr('src', $(hFileType).val() + ',' + $(hFile).val());
}
$(btn).click(function() {
$(elem).click();
});
$(elem).on('change', function(){
const file = this.files[0];
if (file) {
if (file.size > (1024*1024*5)) {
alert('超過可上傳的檔案容量(5MB),請重新選擇。');
return;
}
if (!(file.type === 'image/png' ||
file.type === 'image/jpeg' ||
file.type === 'application/pdf'))
{
alert('請選擇正確的檔案格式上傳(.jpg/.jpeg/.png/.pdf)。');
return;
}
$(pElem).find('.preview').remove();
const reader = new FileReader();
reader.onload = function(e) {
const bodys = e.target.result.split(',');
$(hFileType).val(bodys[0]);
$(hFile).val(bodys[1]);
$(hFileName).val(file.name);
$(info).val(`已選擇檔案:${file.name}`);
var previewElem = null;
if (file.name.split('.').pop() == 'pdf') {
previewElem = $('<embed class="preview" type="application/pdf" width="300" height="150"></embed>');
} else {
previewElem = $('<img class="preview" height="150" />');
}
$(previewElem).appendTo(pElem);
$(previewElem).attr('src', e.target.result);
};
reader.readAsDataURL(file);
}
});
});
});
</script>
@endsection

View File

@ -0,0 +1,29 @@
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h1 style="text-align: center;">
健康達標GO 大獎汽車不是夢
</h1>
</div>
</div>
<div style="height:20px;">&nbsp;</div>
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h2 style="text-align: center;">登記成功!!</h2>
<p>&nbsp;</p>
<div class="nav-item-3">
<a class="nav-link" href="https://forms.gle/LHvHDzRS6EgGsRHGA" target="_blank"> 滿意度調查</a>
</div>
</div>
</div>
</div>
@endsection

View File

@ -0,0 +1,212 @@
@php
@endphp
<!doctype html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="canonical" href="{{ $current = url()->current() }}">
<!-- CSRF Token -->
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>{{ config('app.name', 'Laravel') }}</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.14.0/themes/base/jquery-ui.css">
<script src="https://code.jquery.com/ui/1.14.0/jquery-ui.js"></script>
<script src="https://cdn.jsdelivr.net/npm/tw-city-selector@2.1.2/dist/tw-city-selector.min.js" integrity="sha256-hZYD69DCuACzSTM46JaQmmUGaGACVGasofM9IWItwdo=" crossorigin="anonymous"></script>
<!-- Fonts -->
<link rel="dns-prefetch" href="//fonts.bunny.net">
<link href="https://fonts.bunny.net/css?family=Nunito" rel="stylesheet">
<!-- Scripts -->
@vite(['resources/sass/app.scss', 'resources/js/app.js'])
@yield('style')
<script>
function verifyId(id) {
id = id.trim();
verification = id.match("^[A-Z][12]\\d{8}$")
if(!verification){
return false
}
let conver = "ABCDEFGHJKLMNPQRSTUVXYWZIO"
let weights = [1, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1]
id = String(conver.indexOf(id[0]) + 10) + id.slice(1);
checkSum = 0
for (let i = 0; i < id.length; i++) {
c = parseInt(id[i])
w = weights[i]
checkSum += c * w
}
return checkSum % 10 == 0
}
function toHalfWidth(str) {
if (typeof str !== 'string') return str;
const fullWidthMap = {
' ': ' ', // 全形空格
};
return str.replace(/[\uFF01-\uFF5E\u3000]/g, function(char) {
if (char === ' ') return fullWidthMap[' '];
return String.fromCharCode(char.charCodeAt(0) - 0xFEE0);
});
}
</script>
</head>
<body>
<div id="app">
<!-- <nav class="navbar navbar-expand-md navbar-light bg-white shadow-sm"> -->
<div class="top-bar">
<div class="top-bar-inner">
<div class="top-bar-logo" onclick="window.location='https://dph.tycg.gov.tw/'" title="回到桃園市政府衛生局">&nbsp;</div>
<div class="top-bar-banner" onclick="window.location='/'" title="回到活動首頁">&nbsp;</div>
</div>
</div>
<!--
<div class="menu-bar">
<div class="menu-bar-inner">
<div class="menu-bar-item menu-bar-item-1">
<a class="nav-link" href="/health_literacy">
健康識能有獎徵答
</a>
</div>
<div class="menu-bar-item menu-bar-item-2">
<a class="nav-link" href="/metabolism">
代謝起跑拿好禮
</a>
</div>
<div class="menu-bar-item menu-bar-item-3">
<a class="nav-link" href="/improved_health">
改善健康拿大獎
</a>
</div>
<div class="menu-bar-item menu-bar-item-4">
<a class="nav-link" href="/health_allowance">
身體健康有補助
</a>
</div>
</div>
</div>
-->
<!--<div class="navbar-bg" style="display:block;">-->
<nav class="navbar navbar-expand-md navbar-light ">
<div class="container navbar-container">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="{{ __('Toggle navigation') }}">
<span class="navbar-toggler-icon"></span><span style="font-size:0.7em">選單</span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<!-- Left Side Of Navbar -->
<ul class="navbar-nav me-auto main-btns">
<li class="nav-item nav-btn0">
&nbsp;
</li>
<li class="nav-item nav-btn1">
<a class="nav-link" href="/health_literacy">
健康知識學起來 輕鬆領取桃園幣
</a>
</li>
<li class="nav-item nav-btn2">
<a class="nav-link" href="/metabolism">
符合代謝新收案 早鳥報名最划算
</a>
</li>
<li class="nav-item nav-btn3">
<a class="nav-link" href="/improved_health">
健康達標GO 大獎汽車不是夢
</a>
</li>
<li class="nav-item nav-btn4">
<a class="nav-link" href="/health_allowance">
反轉代謝新人生 皮蛇疫苗加碼補
</a>
</li>
<li class="nav-item"><hr style="width:80%; margin: 0 auto;"></li>
<li class="nav-item nav-btn5">
<a class="nav-link" href="/news">
最新消息
</a>
</li>
<li class="nav-item nav-btn6">
<a class="nav-link" href="/health_infos">
健康資訊
</a>
</li>
<li class="nav-item nav-btn7">
<a class="nav-link" href="/notices">
注意事項
</a>
</li>
<li class="nav-item nav-btn8">
<a class="nav-link" href="/faqs">
常見問題
</a>
</li>
</ul>
</div>
</div>
</nav>
<!--</div>-->
<div class="main-content">
<div class="main-content-inner">
@yield('content')
<div style="height: 20px;">&nbsp;</div>
<div class="container nav-item-3-container">
<div class="row justify-content-center">
<div class="col-md-3 text-align-center">
<div class="nav-item-3">
<a class="nav-link" href="/news"> 最新消息</a>
</div>
</div>
<div class="col-md-3 text-align-center">
<div class="nav-item-3">
<a class="nav-link" href="/health_infos"> 健康資訊</a>
</div>
</div>
<div class="col-md-3 text-align-center">
<div class="nav-item-3">
<a class="nav-link" href="/notices"> 注意事項</a>
</div>
</div>
<div class="col-md-3 text-align-center">
<div class="nav-item-3">
<a class="nav-link" href="/faqs"> 常見問題</a>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="footer-bar">
<div class="footer-bar-inner">
<div class="footer-bar-item footer-bar-item-1 text-center"><a class="nav-link" href="/link">友站連結</a></div>
<div class="footer-bar-item footer-bar-item-2 text-center"><a class="nav-link" href="/contact_us">客服專線</a></div>
<div class="footer-bar-item footer-bar-item-3 text-center"><a class="nav-link" href="/picm">隱私政策</a></div>
</div>
<div style="height:10px;">&nbsp;</div>
<div class="justify-content-center">
<div class="footer text-center">
Ⓒ2025版權所有 桃園市政府衛生局
</div>
</div>
</div>
</div>
@yield('script')
</body>
</html>

View File

@ -0,0 +1,35 @@
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h1 style="text-align: center;">
友站連結
</h1>
</div>
</div>
<div style="height:20px;">&nbsp;</div>
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<ul>
<li>
桃園市政府:<a href="https://www.tycg.gov.tw/" target="_blank">https://www.tycg.gov.tw/</a>
</li>
<li>
桃園市政府衛生局官方FB<a href="https://zh-tw.facebook.com/tychbfans" target="_blank">https://zh-tw.facebook.com/tychbfans</a>
</li>
<li>
桃園市政府衛生局健康生活網:<a href="https://healthlife.tycg.gov.tw/" target="_blank">https://healthlife.tycg.gov.tw/</a>
</li>
<li>
桃園市政府衛生局無菸網:<a href="https://nosmoking.tycg.gov.tw/" target="_blank">https://nosmoking.tycg.gov.tw/</a>
</li>
</ul>
</div>
</div>
</div>
@endsection

View File

@ -0,0 +1,152 @@
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h1 style="text-align: center;">
符合代謝新收案 早鳥報名最划算
</h1>
</div>
</div>
<div style="height:20px;">&nbsp;</div>
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h3>代謝症候群防治計畫|好禮二重送!</h3>
<p>
為鼓勵代謝症候群收案條件
(血壓偏高、血糖偏高、血脂偏高、腰圍過粗、好的膽固醇不足)
5項中符合3項且尚待收案者加入計畫進行健康管理
在活動期間新被收案且完成資料上傳,
即可獲得禮券並參加抽獎!
</p>
<h3>一、活動規則</h3>
<ol>
<li>
活動期間<br>
114 1 1 日至 9 30 日止。
</li>
<li>
活動對象<br>
設籍桃園市,並於活動期間於桃園市代謝症候群防治計畫診所新被收案之民眾。
</li>
<li>
活動方式<br>
步驟一|至桃園市代謝症候群防治計畫診所就診。<br>
步驟二新被收案並請醫師於記錄小卡「註3」處核章。<br>
步驟三|資料上傳活動平台。<br>
  記錄小卡(核章)<br>
  身分證正反面
</li>
<li>
活動好禮<br>
(1) 5,000 名經審核合格者,即可獲得 200 電子禮券。<br>
(2) 經審核合格者,皆可獲得抽獎資格。
</li>
</ol>
<h3>二、注意事項</h3>
<p>&nbsp;&nbsp;依上傳時間排序進行審核,電子禮券每人限領一次。</p>
<p>&nbsp;</p>
<a class="btn btn-success" href="{{asset('assets/images/metabolism_comic_01.jpg')}}" target="_blank">下載懶人包(另開視窗)</a>
<a class="btn btn-success" href="{{asset('assets/images/metabolism_intro_01.jpg')}}" target="_blank">下載簡章(另開視窗)</a>
</div>
</div>
<div>&nbsp;</div>
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h3>
活動獎項
</h3>
<table style="border: solid 1px gray">
<tr>
<td colspan="2">獎品內容</td>
<!--<td width="20%">單價</td>-->
<td width="10%">數量</td>
</tr>
<tr style="border: solid 1px gray">
<td>福爾益康語音型2合1血糖血壓測試系統+血糖試片
<br>型號TD-3261G / 4G傳輸版本
<br>血糖試片TD-3261 / 50片裝
</td>
<td style="padding:5px;"><img src="{{asset('assets/images/prize/td-3261g.jpg')}}" width="80%"></td>
<!--<td></td>-->
<td>5</td>
</tr>
<tr style="border: solid 1px gray">
<td>iPhone 16 Pro 128G</td>
<td style="padding:5px;"><img src="{{asset('assets/images/prize/iphone.png')}}" width="80%"></td>
<!--<td></td>-->
<td>5</td>
</tr>
</table>
</div>
</div>
<div>&nbsp;</div>
<div class="row justify-content-center">
<div class="col-md-8 main-area">
@if ($enable)
<span style="">
<input type="checkbox" class="form-check-input" id="regAgree1" required>
<label class="form-check-label" for="regAgree1">本人設籍於桃園市</label>
</span><br>
<span style="">
<input type="checkbox" class="form-check-input" id="regAgree" required>
<label class="form-check-label" for="regAgree">本人同意 &nbsp; <a href="/picm" target="_blank">「桃園市政府個人資料收集辦法」</a></label>
</span>
<div>&nbsp;</div>
<button id="btnFillForm" class="btn btn-primary">前往報名</button>
@else
<p>活動已載止</p>
@endif
<div>&nbsp;</div>
<button id="btnSearch" class="btn btn-primary">查詢審核狀態</button>
</div>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="staticBackdrop" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-body">
<button type="button" id="staticBackdrop-btn-close" class="btn-close" data-bs-dismiss="modal" aria-label="關閉"></button>
<label for="staticBackdrop-btn-close">
<img src="{{asset('assets/images/metabolism_comic_01.jpg')}}" width="100%">
</label>
</div>
</div>
</div>
</div>
@endsection
@section('script')
<script>
$(document).ready(function(){
$('#staticBackdrop').modal('show');
$('#btnFillForm').click(function(){
if (!$('#regAgree1').is(':checked')) {
alert('請勾選「本人設籍於桃園市」');
return;
}
if (!$('#regAgree').is(':checked')) {
alert('請勾選「本人同意 桃園市政府個人資料收集辦法」');
return;
}
window.location='/metabolism_fill_form';
});
$('#btnSearch').click(function(){
window.location='/metabolism_check';
});
});
</script>
@endsection

View File

@ -0,0 +1,64 @@
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h1 style="text-align: center;">
符合代謝新收案 早鳥報名最划算
</h1>
</div>
</div>
<div style="height:20px;">&nbsp;</div>
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h2 style="text-align: center;">查詢審核狀態</h2>
<p>&nbsp;</p>
<form id="dataForm" method="POST" action="/metabolism_check" enctype="multipart/form-data" style="font-size: 1.4em; ">
@csrf
@if ($errors->any())
<div class="text-left mt-3 alert alert-block alert-dismissible alert-danger">
<!--<span type="button" class="close" data-bs-dismiss="alert">×</span>-->
<ul>
@foreach ($errors->all() as $error)
@if ($error)
<li>{{ $error }}</li>
@endif
@endforeach
</ul>
</div>
@endif
@if ($message = Session::get('success'))
<div class="text-left mt-3 alert alert-block alert-dismissible alert-success ">
<!--<span type="button" class="close" data-bs-dismiss="alert">×</span>-->
<strong>{{ $message }}</strong>
</div>
@endif
<div class="card">
<div class="card-body">
<div class="mb-3">
<label for="regIdNumber" class="form-label">身份證字號後4碼</label>
<input type="text" class="form-control" id="regTwid" name="twid" required value="{{ old('twid') }}" placeholder="範例6789">
</div>
<div class="mb-3">
<label for="regPhone" class="form-label">行動電話後4碼</label>
<input type="text" class="form-control" id="regPhone" name="phone" required value="{{ old('phone') }}" placeholder="範例1111">
</div>
<div class="mb-3">
&nbsp;
</div>
<button type="submit" class="btn btn-primary">送出查詢</button>
</div>
</div>
</form>
</div>
</div>
</div>
@endsection

View File

@ -0,0 +1,279 @@
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h1 style="text-align: center;">
符合代謝新收案 早鳥報名最划算
</h1>
</div>
</div>
<div style="height:20px;">&nbsp;</div>
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h2 style="text-align: center;">報名表單</h2>
<form id="dataForm" method="POST" action="/metabolism_fill_form" enctype="multipart/form-data" style="font-size: 1.4em; ">
@csrf
@if ($errors->any())
<div class="text-left mt-3 alert alert-block alert-dismissible alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
@if ($message = Session::get('success'))
<div class="text-left mt-3 alert alert-block alert-dismissible alert-success ">
<strong>{{ $message }}</strong>
</div>
@endif
<div class="card">
<div class="card-body">
<div class="mb-3">
<label for="regHospitalName" class="form-label">就醫院所</label>
<input type="text" class="form-control" id="regHospitalName" name="hospital_name" required value="{{ old('hospital_name') }}" placeholder="範例XX醫院">
</div>
<div class="mb-3">
<label for="regName" class="form-label">姓名</label>
<input type="text" class="form-control" id="regName" name="name" required value="{{ old('name') }}" placeholder="範例:王大明">
</div>
<div class="mb-3">
<label for="regIdNumber" class="form-label">身份證字號</label>
<input type="text" class="form-control" id="regTwid" name="twid" required value="{{ old('twid') }}" placeholder="範例H123456789">
</div>
<div class="mb-3">
<label for="regPhone" class="form-label">行動電話</label>
<input type="text" class="form-control" id="regPhone" name="phone" required value="{{ old('phone') }}" placeholder="範例09xxxxxxxx">
</div>
<div class="mb-3">
<label for="regEmail" class="form-label">電子信箱</label>
<input type="email" class="form-control" id="regEmail" name="email" required value="{{ old('email') }}" placeholder="範例your_name@example.com">
</div>
<div class="mb-3">
<label for="regAddress" class="form-label">收件地址</label>
<div class="city-selector-set input-group mb-3">
<select class="county form-control" required></select>
<select class="district form-control" required></select>
<input class="zipcode form-control" type="text" size="3" readonly placeholder="郵遞區號">
<input class="district_area form-control" type="text" size="10" name="district_area" required value="{{ old('district_area') }}" placeholder="XX里">
</div>
<input type="text" class="street form-control" name="street" required value="{{ old('street') }}" placeholder="範例縣府路1號">
<input type="hidden" class="form-control" id="regAddress" name="address" required value="{{ old('address') }}">
</div>
<div class="mb-3">
<label class="form-label">記錄小卡</label>
<div class="input-group mb-3">
<button type="button" class="btn btn-outline-secondary btnBase64">選擇檔案</button>
<input type="text" class="form-control infoBase64" disabled="disabled" required placeholder="點擊選擇檔案(JPG、PNG、PDF檔案)">
</div>
<input type="file" class="fileBase64" accept="image/*,.pdf" style="display: none;">
<input type="hidden" class="hFileTypeBase64" name="fileRecordCardFileType" value="{{ old('fileRecordCardFileType') }}" >
<input type="hidden" class="hFileNameBase64" name="fileRecordCardFileName" value="{{ old('fileRecordCardFileName') }}" >
<input type="hidden" class="hFileBase64" name="fileRecordCardBase64" value="{{ old('fileRecordCardBase64') }}">
</div>
<div class="mb-3">
<label class="form-label">身分證正面</label>
<div class="input-group mb-3">
<button type="button" class="btn btn-outline-secondary btnBase64">選擇檔案</button>
<input type="text" class="form-control infoBase64" disabled="disabled" required placeholder="點擊選擇檔案(JPG、PNG、PDF檔案)">
</div>
<input type="file" class="fileBase64" accept="image/*,.pdf" style="display: none;">
<input type="hidden" class="hFileTypeBase64" name="fileTwidFrontFileType" value="{{ old('fileTwidFrontFileType') }}" >
<input type="hidden" class="hFileNameBase64" name="fileTwidFrontFileName" value="{{ old('fileTwidFrontFileName') }}" >
<input type="hidden" class="hFileBase64" name="fileTwidFrontBase64" value="{{ old('fileTwidFrontBase64') }}">
</div>
<div class="mb-3">
<label class="form-label">身分證反面</label>
<div class="input-group mb-3">
<button type="button" class="btn btn-outline-secondary btnBase64">選擇檔案</button>
<input type="text" class="form-control infoBase64" disabled="disabled" required placeholder="點擊選擇檔案(JPG、PNG、PDF檔案)">
</div>
<input type="file" class="fileBase64" accept="image/*,.pdf" style="display: none;">
<input type="hidden" class="hFileTypeBase64" name="fileTwidBackFileType" value="{{ old('fileTwidBackFileType') }}" >
<input type="hidden" class="hFileNameBase64" name="fileTwidBackFileName" value="{{ old('fileTwidBackFileName') }}" >
<input type="hidden" class="hFileBase64" name="fileTwidBackBase64" value="{{ old('fileTwidBackBase64') }}">
</div>
<div class="mb-3">
&nbsp;
</div>
<button type="submit" class="btn btn-primary">提交審核</button>
</div>
</div>
</form>
<p>&nbsp;</p>
</div>
</div>
</div>
@endsection
@section('script')
<script>
$(document).ready(function(){
$('#regTwid').on('change', function(){
var val = $(this).val();
val = toHalfWidth(val);
val = val.toUpperCase();
if (verifyId(val)) {
$(this).val(val);
} else {
alert('請輸入正確身份證字號');
$(this).val('');
}
});
$('#regEmail').on('change', function(){
var val = $(this).val();
val = toHalfWidth(val);
$(this).val(val);
});
$('#regPhone').on('change', function(){
const phoneRegex = /^09\d{8}$/;
var phone = $(this).val();
phone = toHalfWidth(phone);
if (!phoneRegex.test(phone)) {
alert('請輸入正確格式 09xxxxxxxx');
$(this).val('');
} else {
$(this).val(phone);
}
});
var tcs = new TwCitySelector({
el: '.city-selector-set',
elCounty: '.county', // 在 el 裡查找 element
elDistrict: '.district', // 在 el 裡查找 element
elZipcode: '.zipcode' // 在 el 裡查找 element
});
var addr = $('#regAddress').val();
if (addr) {
setTimeout(() => {
var addrs = addr.split(' ');
if (addrs.length == 5) {
$('.zipcode').val(addrs[0]);
tcs.setValue(addrs[1], addrs[2]);
$('.district_area').val(addrs[3]);
$('.street').val(addrs[4]);
}
}, 500);
}
$('.district_area').on('change', function(){
var district_area = $('.district_area').val();
district_area = toHalfWidth(district_area);
district_area = district_area.split(" ").join("");
if (district_area.substr(district_area.length - 1) != '里') {
alert('請填寫完整「XX里」');
$('.district_area').val('');
}
});
$('.county,.district,.zipcode,.district_area,.street').on('change', function(){
setTimeout(() => {
var country = $('.county').val();
var district = $('.district').val();
var zip = $('.zipcode').val();
var district_area = $('.district_area').val();
var street = $('.street').val();
district_area = toHalfWidth(district_area);
district_area = district_area.split(" ").join("");
street = toHalfWidth(street);
street = street.split(" ").join("");
$('.district_area').val(district_area);
$('.street').val(street);
$('#regAddress').val(`${zip} ${country} ${district} ${district_area} ${street}`);
}, 1);
});
$('.fileBase64').each(function(idx, elem) {
var pElem = $(elem).parent();
var btn = $(pElem).find('.btnBase64')[0];
var info = $(pElem).find('.infoBase64')[0];
var hFile = $(pElem).find('.hFileBase64')[0];
var hFileName = $(pElem).find('.hFileNameBase64')[0];
var hFileType = $(pElem).find('.hFileTypeBase64')[0];
var fn = $(hFileName).val();
if (fn) {
$(info).val(`已選擇檔案:${fn}`);
var previewElem = null;
if (fn.split('.').pop() == 'pdf') {
previewElem = $('<embed class="preview" type="application/pdf" width="300" height="150"></embed>');
} else {
previewElem = $('<img class="preview" height="150" />');
}
$(previewElem).appendTo(pElem);
$(previewElem).attr('src', $(hFileType).val() + ',' + $(hFile).val());
}
$(btn).click(function() {
$(elem).click();
});
$(elem).on('change', function(){
const file = this.files[0];
if (file) {
if (file.size > (1024*1024*5)) {
alert('超過可上傳的檔案容量(5MB),請重新選擇。');
return;
}
if (!(file.type === 'image/png' ||
file.type === 'image/jpeg' ||
file.type === 'application/pdf'))
{
alert('請選擇正確的檔案格式上傳(.jpg/.jpeg/.png/.pdf)。');
return;
}
$(pElem).find('.preview').remove();
const reader = new FileReader();
reader.onload = function(e) {
const bodys = e.target.result.split(',');
$(hFileType).val(bodys[0]);
$(hFile).val(bodys[1]);
$(hFileName).val(file.name);
$(info).val(`已選擇檔案:${file.name}`);
var previewElem = null;
if (file.name.split('.').pop() == 'pdf') {
previewElem = $('<embed class="preview" type="application/pdf" width="300" height="150"></embed>');
} else {
previewElem = $('<img class="preview" height="150" />');
}
$(previewElem).appendTo(pElem);
$(previewElem).attr('src', e.target.result);
};
reader.readAsDataURL(file);
}
});
});
});
</script>
@endsection

View File

@ -0,0 +1,29 @@
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h1 style="text-align: center;">
符合代謝新收案 早鳥報名最划算
</h1>
</div>
</div>
<div style="height:20px;">&nbsp;</div>
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h2 style="text-align: center;">登記成功!!</h2>
<p>&nbsp;</p>
<div class="nav-item-3">
<a class="nav-link" href="https://forms.gle/LHvHDzRS6EgGsRHGA" target="_blank"> 滿意度調查</a>
</div>
</div>
</div>
</div>
@endsection

View File

@ -0,0 +1,54 @@
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h1 style="text-align: center;">
最新消息
</h1>
</div>
</div>
<div style="height:20px;">&nbsp;</div>
@php
foreach ($dataRows as $row)
{
$img_memo = '';
$img_src = '/assets/img/news-item-a01.jpg';
$imgs = $row->photos;
// $imgs = array_filter($row['photos'], function($v) {
// return $v['is_selected'] == true;
// });
if (count($imgs) > 0)
{
foreach($imgs as $img)
{
//$img_memo = $img['comment'];
$img_src = URL::asset('/storage/'.$img['file_path']);
break;
}
}
@endphp
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h5>#{{ $row->newsCatalog->name }}</h5>
<h2>{{ $row->title }}</h2>
<h5>發佈時間 <time>{{ date('Y-m-d h:i', strtotime($row->post_at)) }}</time></h5>
<img src="{{ $img_src }}" alt="{{ $img_memo }}" width="100%" height="auto">
<p>&nbsp;</p>
<div>
{!! $row->body !!}
</div>
</div>
</div>
<div style="height: 20px;">&nbsp;</div>
@php
}
@endphp
</div>
@endsection

View File

@ -0,0 +1,53 @@
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h1 style="text-align: center;">
注意事項
</h1>
</div>
</div>
<div style="height:20px;">&nbsp;</div>
@php
foreach ($dataRows as $row)
{
$img_memo = '';
$img_src = '/assets/img/news-item-a01.jpg';
$imgs = $row->photos;
// $imgs = array_filter($row['photos'], function($v) {
// return $v['is_selected'] == true;
// });
if (count($imgs) > 0)
{
foreach($imgs as $img)
{
//$img_memo = $img['comment'];
$img_src = URL::asset('/storage/'.$img['file_path']);
break;
}
}
@endphp
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h2>{{ $row->title }}</h2>
<h5>發佈時間 <time>{{ date('Y-m-d h:i', strtotime($row->post_at)) }}</time></h5>
<img src="{{ $img_src }}" alt="{{ $img_memo }}" width="100%" height="auto">
<p>&nbsp;</p>
<div>
{!! $row->body !!}
</div>
</div>
</div>
<div style="height: 20px;">&nbsp;</div>
@php
}
@endphp
</div>
@endsection

View File

@ -0,0 +1,79 @@
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<h1 style="text-align: center;">
桃園市政府衛生局 <br>
個人資料蒐集聲明暨同意書
</h1>
</div>
</div>
<div style="height:20px;">&nbsp;</div>
<div class="row justify-content-center">
<div class="col-md-8 main-area">
<p>
桃園市政府衛生局(以下稱本局) 依據個人資料保護法(以下稱個資法)第八條第一項規定,向臺端告知下列事項,請詳閱:
</p>
<ol class="no-number-ol">
<li>
一、個人資料蒐集、處理及利用之目的:<br>
本局基於辦理 114 年「慢性病防治管理暨多元行銷宣導」,蒐集、處理及利用您的個人資料,
均依個人資料保護法及相關 法令之規定辦理。
</li>
<li>
二、個人資料之類別:<br>
<ol class="no-number-ol">
<li>
()基本資料:<br>
包括姓名、身分證字號、出生年月日、性別、聯絡資訊等。
</li>
<li>
()檢檢報告及健康紀錄小卡<br>
應活動類別提供相關檢查報告之數值。
</li>
</ol>
</li>
<li>
三、個人資料處理及利用:<br>
<ol class="no-number-ol">
<li>
()期間<br>
除法令另有規定辦理之個人資料保存期限外,
以完成上開蒐集、處理及利用之目的或本局執行業務所必須之期間為利用期間。
</li>
<li>
()對象<br>
本局及雷科斯國際有限公司
</li>
<li>
()方式<br>
為完成上開蒐集、處理及利用之目的所採取合法及合理之方式。
</li>
</ol>
</li>
<li>
四、本聲明暨同意書若有未盡事宜,依個人資料保護法或其他相關法律之規 定辦理。<br>
每人最高補助 5,000 帶狀皰疹疫苗(自費項目)
</li>
<li>
五、您瞭解此一同意書符合個人資料保護法及相關法規之要求,具有書面同 意本局蒐集、處理及利用您個人資料之效果。
</li>
</ol>
<p>
我已詳閱本同意書,瞭解並同意受此同意書之拘束,
另在符合上述告知事項 範圍內,
提供個人資料(視需要提供姓名、性別、年齡、聯絡電話、 通訊地址、紀錄小卡、健檢報告)
願意者請點選同意。
</p>
</div>
</div>
</div>
@endsection

View File

@ -0,0 +1,38 @@
<!-- iframe field -->
@include('crud::fields.inc.wrapper_start')
<label>{!! $field['label'] !!}</label>
<br>
<a href="{{ $field['url'] }}" target="_blank" class="btn btn-success">檔案另開新視窗</a>
<br>
@include('crud::fields.inc.translatable_icon')
@if(isset($field['url']) && !empty($field['url']))
@if (strpos($field['url'], ".pdf") !== false)
<embed style="border: solid gray 1px"
src="{{ $field['url'] }}"
width="{{ $field['width'] ?? '' }}"
height="{{ $field['height'] ?? '' }}"
frameborder="0"
allowfullscreen
@if(isset($field['extra_attributes']))
@foreach($field['extra_attributes'] as $key => $value)
{{ $key }}="{{ $value }}"
@endforeach
@endif
></embed>
@else
<img style="border: solid gray 1px"
src="{{ $field['url'] }}"
height="{{ $field['height'] ?? '' }}"
></embed>
@endif
@if(isset($field['hint']))
<p class="help-block">{!! $field['hint'] !!}</p>
@endif
@else
<p class="text-muted">沒有可以顯示內容。</p>
@endif
</div>
@include('crud::fields.inc.wrapper_start')

View File

@ -0,0 +1,20 @@
{{-- This file is used for menu items by any Backpack v6 theme --}}
<li class="nav-item"><a class="nav-link" href="{{ backpack_url('dashboard') }}"><i class="la la-home nav-icon"></i> {{ trans('backpack::base.dashboard') }}</a></li>
<x-backpack::menu-item title="使用者" icon="la la-question" :link="backpack_url('user')" />
<hr>
<x-backpack::menu-item :title="trans('backpack::crud.file_manager')" icon="la la-files-o" :link="backpack_url('elfinder')" />
<hr>
<!--<x-backpack::menu-item title="News catalogs" icon="la la-question" :link="backpack_url('news-catalog')" />-->
<x-backpack::menu-item title="最新消息" icon="la la-question" :link="backpack_url('news')" />
<!--<x-backpack::menu-item title="Health info catalogs" icon="la la-question" :link="backpack_url('health-info-catalog')" />-->
<x-backpack::menu-item title="健康資訊" icon="la la-question" :link="backpack_url('health-info')" />
<!--<x-backpack::menu-item title="Notice catalogs" icon="la la-question" :link="backpack_url('notice-catalog')" />-->
<x-backpack::menu-item title="注意事項" icon="la la-question" :link="backpack_url('notice')" />
<!--<x-backpack::menu-item title="Faq catalogs" icon="la la-question" :link="backpack_url('faq-catalog')" />-->
<x-backpack::menu-item title="常見問題" icon="la la-question" :link="backpack_url('faq')" />
<hr>
<x-backpack::menu-item title="活動設定" icon="la la-question" :link="backpack_url('event-registration-info')" />
<x-backpack::menu-item title="活動:符合代謝新收案" icon="la la-question" :link="backpack_url('event-metabolism')" />
<x-backpack::menu-item title="活動健康達標GO" icon="la la-question" :link="backpack_url('event-improved-health')" />
<x-backpack::menu-item title="活動:反轉代謝新人生" icon="la la-question" :link="backpack_url('event-health-allowance')" />

View File

@ -0,0 +1,67 @@
<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">
<head>
@include('vendor.elfinder.common_scripts')
@include('vendor.elfinder.common_styles')
<!-- elFinder initialization (REQUIRED) -->
<script type="text/javascript" charset="utf-8">
// Helper function to get parameters from the query string.
function getUrlParam(paramName) {
var reParam = new RegExp('(?:[\?&]|&amp;)' + paramName + '=([^&]+)', 'i') ;
var match = window.location.search.match(reParam) ;
return (match && match.length > 1) ? match[1] : '' ;
}
$().ready(function() {
var funcNum = getUrlParam('CKEditorFuncNum');
var theme = 'default';
var elf = $('#elfinder').elfinder({
// set your elFinder options here
@if($locale)
lang: '{{ $locale }}', // locale
@endif
customData: {
_token: '{{ csrf_token() }}'
},
url: '{{ route("elfinder.connector") }}', // connector URL
soundPath: '{{ Basset::getUrl(base_path("vendor/studio-42/elfinder/sounds")) }}',
getFileCallback : function(file) {
window.opener.CKEDITOR.tools.callFunction(funcNum, file.url);
window.close();
},
themes: {
default : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-gray.json',
dark : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-default.json',
},
theme: theme
},
function(fm, extraObj) {
fm.bind('open', function() {
setElFinderColorMode();
});
}).elfinder('instance');
function isElfinderInDarkMode() {
return typeof window.parent?.colorMode !== 'undefined' && window.parent.colorMode.result === 'dark';
}
function setElFinderColorMode() {
theme = isElfinderInDarkMode() ? 'dark' : 'default';
let instance = $('#elfinder').elfinder('instance');
instance.changeTheme(theme).storage('theme', theme);
}
});
</script>
</head>
<body>
<!-- Element where elFinder will be created (REQUIRED) -->
<div id="elfinder"></div>
</body>
</html>

View File

@ -0,0 +1,83 @@
<!DOCTYPE html>
<html lang="<?= app()->getLocale() ?>">
<head>
<meta charset="utf-8">
<title>elFinder 2.0</title>
<!-- jQuery and jQuery UI (REQUIRED) -->
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
<!-- elFinder CSS (REQUIRED) -->
<link rel="stylesheet" type="text/css" href="<?= asset($dir.'/css/elfinder.min.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset($dir.'/css/theme.css') ?>">
<!-- elFinder JS (REQUIRED) -->
<script src="<?= asset($dir.'/js/elfinder.min.js') ?>"></script>
<?php if ($locale) { ?>
<!-- elFinder translation (OPTIONAL) -->
<script src="<?= asset($dir."/js/i18n/elfinder.$locale.js") ?>"></script>
<?php } ?>
<!-- elFinder initialization (REQUIRED) -->
<script type="text/javascript" charset="utf-8">
// Helper function to get parameters from the query string.
function getUrlParam(paramName) {
var reParam = new RegExp('(?:[\?&]|&amp;)' + paramName + '=([^&]+)', 'i') ;
var match = window.location.search.match(reParam) ;
return (match && match.length > 1) ? match[1] : '' ;
}
$().ready(function() {
var funcNum = getUrlParam('CKEditorFuncNum');
var theme = 'default';
var elf = $('#elfinder').elfinder({
// set your elFinder options here
<?php if ($locale) { ?>
lang: '<?= $locale ?>', // locale
<?php } ?>
customData: {
_token: '<?= csrf_token() ?>'
},
url: '<?= route('elfinder.connector') ?>', // connector URL
soundPath: '<?= asset($dir.'/sounds') ?>',
getFileCallback : function(file) {
window.opener.CKEDITOR.tools.callFunction(funcNum, file.url);
window.close();
},
themes: {
default : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-gray.json',
dark : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-default.json',
},
theme: theme
},
function(fm, extraObj) {
fm.bind('open', function() {
setElFinderColorMode();
});
}).elfinder('instance');
function isElfinderInDarkMode() {
return typeof window.parent?.colorMode !== 'undefined' && window.parent.colorMode.result === 'dark';
}
function setElFinderColorMode() {
theme = isElfinderInDarkMode() ? 'dark' : 'default';
let instance = $('#elfinder').elfinder('instance');
instance.changeTheme(theme).storage('theme', theme);
}
});
</script>
</head>
<body>
<!-- Element where elFinder will be created (REQUIRED) -->
<div id="elfinder"></div>
</body>
</html>

View File

@ -0,0 +1,21 @@
{{-- jQuery (REQUIRED) --}}
@if (!isset ($jquery) || (isset($jquery) && $jquery == true))
@basset('https://unpkg.com/jquery@3.6.1/dist/jquery.min.js')
@endif
{{-- jQuery UI and Smoothness theme --}}
@bassetArchive('https://github.com/jquery/jquery-ui/archive/refs/tags/1.13.2.tar.gz', 'jquery-ui-1.13.2')
@basset('jquery-ui-1.13.2/jquery-ui-1.13.2/dist/themes/smoothness/jquery-ui.min.css')
@basset('jquery-ui-1.13.2/jquery-ui-1.13.2/dist/jquery-ui.min.js')
{{-- elFinder JS (REQUIRED) --}}
@bassetArchive('https://github.com/Studio-42/elFinder/archive/refs/tags/2.1.64.tar.gz', 'elfinder-2.1.64')
@basset('elfinder-2.1.64/elFinder-2.1.64/js/elfinder.min.js')
{{-- elFinder translation (OPTIONAL) --}}
@if($locale)
@basset('https://cdnjs.cloudflare.com/ajax/libs/elfinder/2.1.64/js/i18n/elfinder.'.$locale.'.min.js')
@endif
{{-- elFinder sounds --}}
@basset(base_path('vendor/studio-42/elfinder/sounds/rm.wav'))

View File

@ -0,0 +1,89 @@
<meta charset="utf-8">
<title>File Manager</title>
{{-- elFinder CSS (REQUIRED) --}}
@php
$themeStylesheetVersion = '3.0.0';
@endphp
@bassetArchive('https://github.com/Studio-42/elFinder/archive/refs/tags/2.1.64.tar.gz', 'elfinder-2.1.64')
@basset('elfinder-2.1.64/elFinder-2.1.64/css/elfinder.min.css')
@basset('https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme@'.$themeStylesheetVersion.'/Material/css/theme.min.css')
@basset('https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme@'.$themeStylesheetVersion.'/Material/images/loading.svg', false)
@basset('https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme@'.$themeStylesheetVersion.'/Material/font/material.eot', false)
@basset('https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme@'.$themeStylesheetVersion.'/Material/font/material.svg', false)
@basset('https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme@'.$themeStylesheetVersion.'/Material/images/icons-big.svg', false)
@basset('https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme@'.$themeStylesheetVersion.'/Material/images/icons-small.svg', false)
@basset('https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme@'.$themeStylesheetVersion.'/Material/font/material.woff', false)
@basset('https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme@'.$themeStylesheetVersion.'/Material/font/material.ttf', false)
@basset('https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme@'.$themeStylesheetVersion.'/Material/font/material.woff2', false)
@bassetBlock('elfinderThemeSwitcherScript.js')
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function() {
function getElfinderStyleSheet(main = true) {
let themeStylesheetVersion = '{{$themeStylesheetVersion}}';
const regex = new RegExp(main ? `RobiNN1\/elFinder-Material-Theme@${themeStylesheetVersion}\/Material\/css\/theme\.min\.css` : `RobiNN1\/elFinder-Material-Theme@${themeStylesheetVersion}\/Material\/css\/theme-gray\.min\.css`);
const linkElements = document.querySelectorAll('link[rel="stylesheet"]');
// Find the main elfinder stylesheet
let selectedLinkElement;
for (const linkElement of linkElements) {
if (regex.test(linkElement.href)) {
selectedLinkElement = linkElement;
break;
}
}
return selectedLinkElement;
}
function addElfinderLightStylesheet() {
let themeLightAsset = `{{ Basset::basset('https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme@'.$themeStylesheetVersion.'/Material/css/theme-gray.min.css') }}`;
const match = themeLightAsset.match(/<link\s+href="([^"]+)"/i);
if (match && match.length > 1) {
let mainStyleSheet = getElfinderStyleSheet();
let lightStyleSheet = getElfinderStyleSheet(false);
// if found append the light mode css to the main theme stylesheet
if (mainStyleSheet && ! lightStyleSheet) {
let themeLight = document.createElement('link');
themeLight.href = match[1];
themeLight.rel = 'stylesheet';
themeLight.type = 'text/css';
mainStyleSheet.insertAdjacentElement('afterend', themeLight);
}
}
}
let colorMode = window.parent.colorMode?.result ?? window.colorMode?.result ?? false;
if(colorMode !== 'dark') {
addElfinderLightStylesheet();
}
// register a color mode change event so that we remove
// the light stylesheet when the color mode change
if(colorMode) {
let colorModeClass = window.parent.colorMode ?? window.colorMode;
colorModeClass.onChange(function(scheme) {
let getMainStylesheet = scheme === 'dark' ? false : true;
let selectedLinkElement = getElfinderStyleSheet(getMainStylesheet);
if (! selectedLinkElement) {
return true;
}
// in case we switched to dark mode, remove the ligth theme css
if(scheme === 'dark') {
selectedLinkElement.parentNode.removeChild(selectedLinkElement);
return true;
}
addElfinderLightStylesheet()
});
}
// we dont want to style the body when elfinder is loaded as a component in a backpack view
// we pass true when loading elfinder inside an iframe to style the iframe body.
@if($styleBodyElement ?? false)
// use the topbar and footbar darker color as the background to ease transitions
document.getElementsByTagName('body')[0].style.background = '#061325';
document.getElementsByTagName('body')[0].style.opacity = 1;
@endif
});
</script>
@endBassetBlock

View File

@ -0,0 +1,47 @@
@extends(backpack_view('blank'))
@section('after_scripts')
@include('vendor.elfinder.common_scripts')
@include('vendor.elfinder.common_styles')
<!-- elFinder initialization (REQUIRED) -->
<script type="text/javascript" charset="utf-8">
// Documentation for client options:
// https://github.com/Studio-42/elFinder/wiki/Client-configuration-options
$(document).ready(function() {
$('#elfinder').elfinder({
// set your elFinder options here
@if($locale)
lang: '{{ $locale }}', // locale
@endif
customData: {
_token: '{{ csrf_token() }}'
},
url : '{{ route("elfinder.connector") }}', // connector URL
soundPath: '{{ Basset::getUrl(base_path("vendor/studio-42/elfinder/sounds")) }}',
cssAutoLoad : false,
});
});
</script>
@endsection
@php
$breadcrumbs = [
trans('backpack::crud.admin') => url(config('backpack.base.route_prefix'), 'dashboard'),
trans('backpack::crud.file_manager') => false,
];
@endphp
@section('header')
<section class="container-fluid" bp-section="page-header">
<h1 bp-section="page-heading">{{ trans('backpack::crud.file_manager') }}</h1>
</section>
@endsection
@section('content')
<!-- Element where elFinder will be created (REQUIRED) -->
<div id="elfinder"></div>
@endsection

View File

@ -0,0 +1,72 @@
<!DOCTYPE html>
<html lang="<?= app()->getLocale() ?>">
<head>
<meta charset="utf-8">
<title>elFinder 2.0</title>
<!-- jQuery and jQuery UI (REQUIRED) -->
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
<!-- elFinder CSS (REQUIRED) -->
<link rel="stylesheet" type="text/css" href="<?= asset($dir.'/css/elfinder.min.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset($dir.'/css/theme.css') ?>">
<!-- elFinder JS (REQUIRED) -->
<script src="<?= asset($dir.'/js/elfinder.min.js') ?>"></script>
<?php if ($locale) { ?>
<!-- elFinder translation (OPTIONAL) -->
<script src="<?= asset($dir."/js/i18n/elfinder.$locale.js") ?>"></script>
<?php } ?>
<!-- elFinder initialization (REQUIRED) -->
<script type="text/javascript" charset="utf-8">
// Documentation for client options:
// https://github.com/Studio-42/elFinder/wiki/Client-configuration-options
$().ready(function() {
var theme = 'default';
$('#elfinder').elfinder({
// set your elFinder options here
<?php if ($locale) { ?>
lang: '<?= $locale ?>', // locale
<?php } ?>
customData: {
_token: '<?= csrf_token() ?>'
},
url : '<?= route('elfinder.connector') ?>', // connector URL
soundPath: '<?= asset($dir.'/sounds') ?>',
themes: {
default : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-gray.json',
dark : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-default.json',
},
theme: theme
},
function(fm, extraObj) {
fm.bind('open', function() {
setElFinderColorMode();
});
});
function isElfinderInDarkMode() {
return typeof window.parent?.colorMode !== 'undefined' && window.parent.colorMode.result === 'dark';
}
function setElFinderColorMode() {
theme = isElfinderInDarkMode() ? 'dark' : 'default';
let instance = $('#elfinder').elfinder('instance');
instance.changeTheme(theme).storage('theme', theme);
}
});
</script>
</head>
<body>
<!-- Element where elFinder will be created (REQUIRED) -->
<div id="elfinder"></div>
</body>
</html>

View File

@ -0,0 +1,88 @@
<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">
<head>
@include('vendor.elfinder.common_scripts')
@include('vendor.elfinder.common_styles')
<script type="text/javascript">
$().ready(function () {
var theme = 'default';
var elf = $('#elfinder').elfinder({
// set your elFinder options here
@if($locale)
lang: '{{ $locale }}', // locale
@endif
customData: {
_token: '{{ csrf_token() }}'
},
url: '{{ route("elfinder.connector") }}', // connector URL
soundPath: '{{ Basset::getUrl(base_path("vendor/studio-42/elfinder/sounds")) }}',
resizable: false,
ui: ['toolbar', 'path','stat'],
onlyMimes: [{{ $mimeTypes }}],
rememberLastDir : false,
height: 300,
defaultView: 'list',
getFileCallback: function (file) {
window.parent.processSelectedFile(file, '{{ $input_id }}');
console.log(file);
},
uiOptions : {
// toolbar configuration
toolbar : [
['home', 'up'],
['upload'],
['quicklook'],
],
// directories tree options
tree : {
// expand current root on init
openRootOnLoad : true,
// auto load current dir parents
syncTree : true
},
// navbar options
navbar : {
minWidth : 150,
maxWidth : 500
},
// current working directory options
cwd : {
// display parent directory in listing as ".."
oldSchool : false
}
},
themes: {
default : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-gray.json',
dark : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-default.json',
},
theme: theme
},
function(fm, extraObj) {
fm.bind('open', function() {
setElFinderColorMode();
});
}).elfinder('instance');
function isElfinderInDarkMode() {
return typeof window.parent?.colorMode !== 'undefined' && window.parent.colorMode.result === 'dark';
}
function setElFinderColorMode() {
theme = isElfinderInDarkMode() ? 'dark' : 'default';
let instance = $('#elfinder').elfinder('instance');
instance.changeTheme(theme).storage('theme', theme);
}
});
</script>
</head>
<body style="margin: 0;">
<!-- Element where elFinder will be created (REQUIRED) -->
<div id="elfinder"></div>
</body>
</html>

View File

@ -0,0 +1,106 @@
<!DOCTYPE html>
<html lang="<?= app()->getLocale() ?>">
<head>
<meta charset="utf-8">
<title>elFinder 2.0</title>
<!-- jQuery and jQuery UI (REQUIRED) -->
<link rel="stylesheet" type="text/css" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/themes/smoothness/jquery-ui.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
<!-- elFinder CSS (REQUIRED) -->
<link rel="stylesheet" type="text/css" href="<?= asset($dir.'/css/elfinder.min.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset($dir.'/css/theme.css') ?>">
<!-- elFinder JS (REQUIRED) -->
<script src="<?= asset($dir.'/js/elfinder.min.js') ?>"></script>
<?php if ($locale) { ?>
<!-- elFinder translation (OPTIONAL) -->
<script src="<?= asset($dir."/js/i18n/elfinder.$locale.js") ?>"></script>
<?php } ?>
<!-- Include jQuery, jQuery UI, elFinder (REQUIRED) -->
<script type="text/javascript">
$().ready(function () {
var theme = 'default';
var elf = $('#elfinder').elfinder({
// set your elFinder options here
<?php if ($locale) { ?>
lang: '<?= $locale ?>', // locale
<?php } ?>
customData: {
_token: '<?= csrf_token() ?>'
},
url: '<?= route('elfinder.connector') ?>', // connector URL
soundPath: '<?= asset($dir.'/sounds') ?>',
resizable: false,
ui: ['toolbar', 'path','stat'],
onlyMimes: [<?= $mimeTypes ?>],
rememberLastDir : false,
height: 300,
defaultView: 'list',
getFileCallback: function (file) {
window.parent.processSelectedFile(file, '<?= $input_id?>');
console.log(file);
},
uiOptions : {
// toolbar configuration
toolbar : [
['home', 'up'],
['upload'],
['quicklook'],
],
// directories tree options
tree : {
// expand current root on init
openRootOnLoad : true,
// auto load current dir parents
syncTree : true
},
// navbar options
navbar : {
minWidth : 150,
maxWidth : 500
},
// current working directory options
cwd : {
// display parent directory in listing as ".."
oldSchool : false
}
},
themes: {
default : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-gray.json',
dark : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-default.json',
},
theme: theme
},
function(fm, extraObj) {
fm.bind('open', function() {
setElFinderColorMode();
});
}).elfinder('instance');
function isElfinderInDarkMode() {
return typeof window.parent?.colorMode !== 'undefined' && window.parent.colorMode.result === 'dark';
}
function setElFinderColorMode() {
theme = isElfinderInDarkMode() ? 'dark' : 'default';
let instance = $('#elfinder').elfinder('instance');
instance.changeTheme(theme).storage('theme', theme);
}
});
</script>
</head>
<body style="margin: 0;">
<!-- Element where elFinder will be created (REQUIRED) -->
<div id="elfinder"></div>
</body>
</html>

View File

@ -0,0 +1,63 @@
<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">
<head>
@include('vendor.elfinder.common_scripts')
@include('vendor.elfinder.common_styles', ['styleBodyElement' => true])
<style type="text/css">
.elfinder-workzone {
min-height: max-content !important;
}
#elfinder {
height: 100% !important;
width: 100% !important;
top:0;
left: 0;
}
</style>
<script type="text/javascript">
$(document).ready(function () {
let elfinderConfig = {
cssAutoLoad : false,
speed: 100,
// set your elFinder options here
@if($locale)
lang: '{{ $locale }}', // locale
@endif
customData: {
_token: '{{ csrf_token() }}'
},
url: '{{ route("elfinder.connector") }}', // connector URL
soundPath: '{{ Basset::getUrl(base_path("vendor/studio-42/elfinder/sounds")) }}',
resizable: false,
onlyMimes: @json(unserialize(urldecode(request('mimes'))), JSON_UNESCAPED_SLASHES),
commandsOptions: {
getfile: {
multiple: {{ request('multiple') ? 'true' : 'false' }},
oncomplete: 'destroy'
}
},
getFileCallback: (file) => {
@if (request()->has('multiple') && request()->input('multiple') == 1)
window.parent.processSelectedMultipleFiles(file, '{{ $input_id }}');
@else
window.parent.processSelectedFile(file.path, '{{ $input_id }}');
@endif
window.parent.jQuery.colorbox.close();
},
};
let elfinderOptions = window.parent.elfinderOptions ?? {};
var elf = $('#elfinder').elfinder({...elfinderConfig, ...elfinderOptions}).elfinder('instance');
document.getElementById('elfinder').style.opacity = 1;
});
</script>
</head>
<body style="margin:0;position:absolute;top:0;left:0;width:100%;height:100%;">
<!-- Element where elFinder will be created (REQUIRED) -->
<div id="elfinder" style="position:absolute;top:0;left:0;width:100%;height:100%;"></div>
</body>
</html>

View File

@ -0,0 +1,82 @@
<!DOCTYPE html>
<html lang="<?= app()->getLocale() ?>">
<head>
<meta charset="utf-8">
<title>elFinder 2.0</title>
<!-- jQuery and jQuery UI (REQUIRED) -->
<link rel="stylesheet" type="text/css" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/themes/smoothness/jquery-ui.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
<!-- elFinder CSS (REQUIRED) -->
<link rel="stylesheet" type="text/css" href="<?= asset($dir.'/css/elfinder.min.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset($dir.'/css/theme.css') ?>">
<!-- elFinder JS (REQUIRED) -->
<script src="<?= asset($dir.'/js/elfinder.min.js') ?>"></script>
<?php if ($locale) { ?>
<!-- elFinder translation (OPTIONAL) -->
<script src="<?= asset($dir."/js/i18n/elfinder.$locale.js") ?>"></script>
<?php } ?>
<!-- Include jQuery, jQuery UI, elFinder (REQUIRED) -->
<script type="text/javascript">
$().ready(function () {
var theme = 'default';
var elf = $('#elfinder').elfinder({
// set your elFinder options here
<?php if ($locale) { ?>
lang: '<?= $locale ?>', // locale
<?php } ?>
customData: {
_token: '<?= csrf_token() ?>'
},
url: '<?= route('elfinder.connector') ?>', // connector URL
soundPath: '<?= asset($dir.'/sounds') ?>',
dialog: {width: 900, modal: true, title: 'Select a file'},
resizable: false,
commandsOptions: {
getfile: {
oncomplete: 'destroy'
}
},
getFileCallback: function (file) {
window.parent.processSelectedFile(file.path, '<?= $input_id?>');
parent.jQuery.colorbox.close();
},
themes: {
default : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-gray.json',
dark : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-default.json',
},
theme: theme
},
function(fm, extraObj) {
fm.bind('open', function() {
setElFinderColorMode();
});
}).elfinder('instance');
function isElfinderInDarkMode() {
return typeof window.parent?.colorMode !== 'undefined' && window.parent.colorMode.result === 'dark';
}
function setElFinderColorMode() {
theme = isElfinderInDarkMode() ? 'dark' : 'default';
let instance = $('#elfinder').elfinder('instance');
instance.changeTheme(theme).storage('theme', theme);
}
});
</script>
</head>
<body>
<!-- Element where elFinder will be created (REQUIRED) -->
<div id="elfinder"></div>
</body>
</html>

View File

@ -0,0 +1,89 @@
<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">
<head>
@include('vendor.elfinder.common_scripts')
@include('vendor.elfinder.common_styles')
<!-- TinyMCE Popup class (REQUIRED) -->
<script type="text/javascript" src="{{ asset($dir.'/js/tiny_mce_popup.js') }}"></script>
<script type="text/javascript">
var FileBrowserDialogue = {
init: function() {
// Here goes your code for setting your custom things onLoad.
},
mySubmit: function (URL) {
var win = tinyMCEPopup.getWindowArg('window');
// pass selected file path to TinyMCE
win.document.getElementById(tinyMCEPopup.getWindowArg('input')).value = URL;
// are we an image browser?
if (typeof(win.ImageDialog) != 'undefined') {
// update image dimensions
if (win.ImageDialog.getImageData) {
win.ImageDialog.getImageData();
}
// update preview if necessary
if (win.ImageDialog.showPreviewImage) {
win.ImageDialog.showPreviewImage(URL);
}
}
// close popup window
tinyMCEPopup.close();
}
}
tinyMCEPopup.onInit.add(FileBrowserDialogue.init, FileBrowserDialogue);
$().ready(function() {
var theme = 'default';
var elf = $('#elfinder').elfinder({
// set your elFinder options here
@if($locale)
lang: '{{ $locale }}', // locale
@endif
customData: {
_token: '{{ csrf_token() }}'
},
url : '{{ route("elfinder.connector") }}', // connector URL
soundPath: '{{ Basset::getUrl(base_path("vendor/studio-42/elfinder/sounds")) }}',
getFileCallback: function(file) { // editor callback
FileBrowserDialogue.mySubmit(file.url); // pass selected file path to TinyMCE
},
themes: {
default : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-gray.json',
dark : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-default.json',
},
theme: theme
},
function(fm, extraObj) {
fm.bind('open', function() {
setElFinderColorMode();
});
}).elfinder('instance');
function isElfinderInDarkMode() {
return typeof window.parent?.colorMode !== 'undefined' && window.parent.colorMode.result === 'dark';
}
function setElFinderColorMode() {
theme = isElfinderInDarkMode() ? 'dark' : 'default';
let instance = $('#elfinder').elfinder('instance');
instance.changeTheme(theme).storage('theme', theme);
}
});
</script>
</head>
<body>
<!-- Element where elFinder will be created (REQUIRED) -->
<div id="elfinder"></div>
</body>
</html>

View File

@ -0,0 +1,105 @@
<!DOCTYPE html>
<html lang="<?= app()->getLocale() ?>">
<head>
<meta charset="utf-8">
<title>elFinder 2.0</title>
<!-- jQuery and jQuery UI (REQUIRED) -->
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
<!-- elFinder CSS (REQUIRED) -->
<link rel="stylesheet" type="text/css" href="<?= asset($dir.'/css/elfinder.min.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset($dir.'/css/theme.css') ?>">
<!-- elFinder JS (REQUIRED) -->
<script src="<?= asset($dir.'/js/elfinder.min.js') ?>"></script>
<!-- TinyMCE Popup class (REQUIRED) -->
<script type="text/javascript" src="<?= asset($dir.'/js/tiny_mce_popup.js') ?>"></script>
<?php if ($locale) { ?>
<!-- elFinder translation (OPTIONAL) -->
<script src="<?= asset($dir."/js/i18n/elfinder.$locale.js") ?>"></script>
<?php } ?>
<script type="text/javascript">
var FileBrowserDialogue = {
init: function() {
// Here goes your code for setting your custom things onLoad.
},
mySubmit: function (URL) {
var win = tinyMCEPopup.getWindowArg('window');
// pass selected file path to TinyMCE
win.document.getElementById(tinyMCEPopup.getWindowArg('input')).value = URL;
// are we an image browser?
if (typeof(win.ImageDialog) != 'undefined') {
// update image dimensions
if (win.ImageDialog.getImageData) {
win.ImageDialog.getImageData();
}
// update preview if necessary
if (win.ImageDialog.showPreviewImage) {
win.ImageDialog.showPreviewImage(URL);
}
}
// close popup window
tinyMCEPopup.close();
}
}
tinyMCEPopup.onInit.add(FileBrowserDialogue.init, FileBrowserDialogue);
$().ready(function() {
var theme = 'default';
var elf = $('#elfinder').elfinder({
// set your elFinder options here
<?php if ($locale) { ?>
lang: '<?= $locale ?>', // locale
<?php } ?>
customData: {
_token: '<?= csrf_token() ?>'
},
url : '<?= route('elfinder.connector') ?>', // connector URL
soundPath: '<?= asset($dir.'/sounds') ?>',
getFileCallback: function(file) { // editor callback
FileBrowserDialogue.mySubmit(file.url); // pass selected file path to TinyMCE
},
themes: {
default : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-gray.json',
dark : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-default.json',
},
theme: theme
},
function(fm, extraObj) {
fm.bind('open', function() {
setElFinderColorMode();
});
}).elfinder('instance');
function isElfinderInDarkMode() {
return typeof window.parent?.colorMode !== 'undefined' && window.parent.colorMode.result === 'dark';
}
function setElFinderColorMode() {
theme = isElfinderInDarkMode() ? 'dark' : 'default';
let instance = $('#elfinder').elfinder('instance');
instance.changeTheme(theme).storage('theme', theme);
}
});
</script>
</head>
<body>
<!-- Element where elFinder will be created (REQUIRED) -->
<div id="elfinder"></div>
</body>
</html>

View File

@ -0,0 +1,71 @@
<!DOCTYPE html>
<html>
<head>
@include('vendor.elfinder.common_scripts')
@include('vendor.elfinder.common_styles')
<!-- elFinder initialization (REQUIRED) -->
<script type="text/javascript">
var FileBrowserDialogue = {
init: function() {
// Here goes your code for setting your custom things onLoad.
},
mySubmit: function (URL) {
// pass selected file path to TinyMCE
parent.tinymce.activeEditor.windowManager.getParams().setUrl(URL);
// close popup window
parent.tinymce.activeEditor.windowManager.close();
}
}
$().ready(function() {
var theme = 'default';
var elf = $('#elfinder').elfinder({
// set your elFinder options here
@if($locale)
lang: '{{ $locale }}', // locale
@endif
customData: {
_token: '{{ csrf_token() }}'
},
url: '{{ route("elfinder.connector") }}', // connector URL
soundPath: '{{ Basset::getUrl(base_path("vendor/studio-42/elfinder/sounds")) }}',
getFileCallback: function(file) { // editor callback
FileBrowserDialogue.mySubmit(file.url); // pass selected file path to TinyMCE
},
themes: {
default : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-gray.json',
dark : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-default.json',
},
theme: theme
},
function(fm, extraObj) {
fm.bind('open', function() {
setElFinderColorMode();
});
}).elfinder('instance');
function isElfinderInDarkMode() {
return typeof window.parent?.colorMode !== 'undefined' && window.parent.colorMode.result === 'dark';
}
function setElFinderColorMode() {
theme = isElfinderInDarkMode() ? 'dark' : 'default';
let instance = $('#elfinder').elfinder('instance');
instance.changeTheme(theme).storage('theme', theme);
}
});
</script>
</head>
<body>
<!-- Element where elFinder will be created (REQUIRED) -->
<div id="elfinder"></div>
</body>
</html>

View File

@ -0,0 +1,86 @@
<!DOCTYPE html>
<html lang="<?= app()->getLocale() ?>">
<head>
<meta charset="utf-8">
<title>elFinder 2.0</title>
<!-- jQuery and jQuery UI (REQUIRED) -->
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
<!-- elFinder CSS (REQUIRED) -->
<link rel="stylesheet" type="text/css" href="<?= asset($dir.'/css/elfinder.min.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset($dir.'/css/theme.css') ?>">
<!-- elFinder JS (REQUIRED) -->
<script src="<?= asset($dir.'/js/elfinder.min.js') ?>"></script>
<?php if ($locale) { ?>
<!-- elFinder translation (OPTIONAL) -->
<script src="<?= asset($dir."/js/i18n/elfinder.$locale.js") ?>"></script>
<?php } ?>
<!-- elFinder initialization (REQUIRED) -->
<script type="text/javascript">
var FileBrowserDialogue = {
init: function() {
// Here goes your code for setting your custom things onLoad.
},
mySubmit: function (URL) {
// pass selected file path to TinyMCE
parent.tinymce.activeEditor.windowManager.getParams().setUrl(URL);
// close popup window
parent.tinymce.activeEditor.windowManager.close();
}
}
$().ready(function() {
var theme = 'default';
var elf = $('#elfinder').elfinder({
// set your elFinder options here
<?php if ($locale) { ?>
lang: '<?= $locale ?>', // locale
<?php } ?>
customData: {
_token: '<?= csrf_token() ?>'
},
url: '<?= route('elfinder.connector') ?>', // connector URL
soundPath: '<?= asset($dir.'/sounds') ?>',
getFileCallback: function(file) { // editor callback
FileBrowserDialogue.mySubmit(file.url); // pass selected file path to TinyMCE
},
themes: {
default : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-gray.json',
dark : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-default.json',
},
theme: theme
},
function(fm, extraObj) {
fm.bind('open', function() {
setElFinderColorMode();
});
}).elfinder('instance');
function isElfinderInDarkMode() {
return typeof window.parent?.colorMode !== 'undefined' && window.parent.colorMode.result === 'dark';
}
function setElFinderColorMode() {
theme = isElfinderInDarkMode() ? 'dark' : 'default';
let instance = $('#elfinder').elfinder('instance');
instance.changeTheme(theme).storage('theme', theme);
}
});
</script>
</head>
<body>
<!-- Element where elFinder will be created (REQUIRED) -->
<div id="elfinder"></div>
</body>
</html>

View File

@ -0,0 +1,55 @@
<!DOCTYPE html>
<html>
<head>
@include('vendor.elfinder.common_scripts')
@include('vendor.elfinder.common_styles', ['styleBodyElement' => true])
<!-- elFinder initialization (REQUIRED) -->
<script type="text/javascript">
$(document).ready(function () {
var FileBrowserDialogue = {
init: function() {
// Here goes your code for setting your custom things onLoad.
},
mySubmit: function (file) {
window.parent.postMessage({
mceAction: 'fileSelected',
data: {
file: file
}
}, '*');
}
};
let elfinderConfig = {
cssAutoLoad : false,
speed: 100,
// set your elFinder options here
@if($locale)
lang: '{{ $locale }}', // locale
@endif
customData: {
_token: '{{ csrf_token() }}'
},
url: '{{ route("elfinder.connector") }}', // connector URL
soundPath: '{{ Basset::getUrl(base_path("vendor/studio-42/elfinder/sounds")) }}',
getFileCallback: function(file) { // editor callback
FileBrowserDialogue.mySubmit(file); // pass selected file path to TinyMCE
},
height: $(window).height()
};
var elf = $('#elfinder').elfinder(elfinderConfig);
document.getElementById('elfinder').style.opacity = 1;
});
</script>
</head>
<body style="margin:0;top:0;left:0;bottom:0;width:100%;height:100%;">
<!-- Element where elFinder will be created (REQUIRED) -->
<div id="elfinder"></div>
</body>
</html>

View File

@ -0,0 +1,87 @@
<!DOCTYPE html>
<html lang="<?= app()->getLocale() ?>">
<head>
<meta charset="utf-8">
<title>elFinder 2.0</title>
<!-- jQuery and jQuery UI (REQUIRED) -->
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
<!-- elFinder CSS (REQUIRED) -->
<link rel="stylesheet" type="text/css" href="<?= asset($dir.'/css/elfinder.min.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset($dir.'/css/theme.css') ?>">
<!-- elFinder JS (REQUIRED) -->
<script src="<?= asset($dir.'/js/elfinder.min.js') ?>"></script>
<?php if ($locale) { ?>
<!-- elFinder translation (OPTIONAL) -->
<script src="<?= asset($dir."/js/i18n/elfinder.$locale.js") ?>"></script>
<?php } ?>
<!-- elFinder initialization (REQUIRED) -->
<script type="text/javascript">
var FileBrowserDialogue = {
init: function() {
// Here goes your code for setting your custom things onLoad.
},
mySubmit: function (file) {
window.parent.postMessage({
mceAction: 'fileSelected',
data: {
file: file
}
}, '*');
}
};
$().ready(function() {
var theme = 'default';
var elf = $('#elfinder').elfinder({
// set your elFinder options here
<?php if ($locale) { ?>
lang: '<?= $locale ?>', // locale
<?php } ?>
customData: {
_token: '<?= csrf_token() ?>'
},
url: '<?= route('elfinder.connector') ?>', // connector URL
soundPath: '<?= asset($dir.'/sounds') ?>',
getFileCallback: function(file) { // editor callback
FileBrowserDialogue.mySubmit(file); // pass selected file path to TinyMCE
},
themes: {
default : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-gray.json',
dark : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-default.json',
},
theme: theme
},
function(fm, extraObj) {
fm.bind('open', function() {
setElFinderColorMode();
});
}).elfinder('instance');
function isElfinderInDarkMode() {
return typeof window.parent?.colorMode !== 'undefined' && window.parent.colorMode.result === 'dark';
}
function setElFinderColorMode() {
theme = isElfinderInDarkMode() ? 'dark' : 'default';
let instance = $('#elfinder').elfinder('instance');
instance.changeTheme(theme).storage('theme', theme);
}
});
</script>
</head>
<body>
<!-- Element where elFinder will be created (REQUIRED) -->
<div id="elfinder"></div>
</body>
</html>