Skip to content

Commit

Permalink
index.php 套用語系
Browse files Browse the repository at this point in the history
  • Loading branch information
tadlearn committed Aug 15, 2021
1 parent 80ae667 commit 379c9f3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
18 changes: 9 additions & 9 deletions index.php
Expand Up @@ -34,7 +34,7 @@
case 'tad_signup_actions_store':
$id = Tad_signup_actions::store();
// header("location: {$_SERVER['PHP_SELF']}?id=$id");
redirect_header($_SERVER['PHP_SELF'] . "?id=$id", 3, "成功建立活動!");
redirect_header($_SERVER['PHP_SELF'] . "?id=$id", 3, _MD_TAD_SIGNUP_CREATE_SUCCESS);
exit;

//修改用表單
Expand All @@ -47,14 +47,14 @@
case 'tad_signup_actions_update':
Tad_signup_actions::update($id);
// header("location: {$_SERVER['PHP_SELF']}?id=$id");
redirect_header($_SERVER['PHP_SELF'] . "?id=$id", 3, "成功修改活動!");
redirect_header($_SERVER['PHP_SELF'] . "?id=$id", 3, _MD_TAD_SIGNUP_UPDATE_SUCCESS);
exit;

//刪除資料
case 'tad_signup_actions_destroy':
Tad_signup_actions::destroy($id);
// header("location: {$_SERVER['PHP_SELF']}");
redirect_header($_SERVER['PHP_SELF'], 3, "成功刪除活動!");
redirect_header($_SERVER['PHP_SELF'], 3, _MD_TAD_SIGNUP_DESTROY_SUCCESS);
exit;

//新增報名表單
Expand All @@ -66,7 +66,7 @@
case 'tad_signup_data_store':
$id = Tad_signup_data::store();
Tad_signup_data::mail($id, 'store');
redirect_header("{$_SERVER['PHP_SELF']}?op=tad_signup_data_show&id=$id", 3, "成功報名活動!");
redirect_header("{$_SERVER['PHP_SELF']}?op=tad_signup_data_show&id=$id", 3, _MD_TAD_SIGNUP_APPLY_SUCCESS);
break;

//顯示報名表
Expand All @@ -84,7 +84,7 @@
case 'tad_signup_data_update':
Tad_signup_data::update($id);
Tad_signup_data::mail($id, 'update');
redirect_header($_SERVER['PHP_SELF'] . "?op=tad_signup_data_show&id=$id", 3, "成功修改報名資料!");
redirect_header($_SERVER['PHP_SELF'] . "?op=tad_signup_data_show&id=$id", 3, _MD_TAD_SIGNUP_APPLY_UPDATE_SUCCESS);
exit;

//刪除報名資料
Expand All @@ -93,14 +93,14 @@
$signup = Tad_signup_data::get($id, $uid);
Tad_signup_data::destroy($id);
Tad_signup_data::mail($id, 'destroy', $signup);
redirect_header($_SERVER['PHP_SELF'] . "?id=$action_id", 3, "成功刪除報名資料!");
redirect_header($_SERVER['PHP_SELF'] . "?id=$action_id", 3, _MD_TAD_SIGNUP_APPLY_DESTROY_SUCCESS);
exit;

//更改錄取狀態
case 'tad_signup_data_accept':
Tad_signup_data::accept($id, $accept);
Tad_signup_data::mail($id, 'accept');
redirect_header($_SERVER['PHP_SELF'] . "?id=$action_id", 3, "成功設定錄取狀態!");
redirect_header($_SERVER['PHP_SELF'] . "?id=$action_id", 3, _MD_TAD_SIGNUP_ACCEPT_SUCCESS);
exit;

// 複製活動
Expand All @@ -117,7 +117,7 @@
//批次匯入 CSV
case 'tad_signup_data_import_csv':
Tad_signup_data::import_csv($id);
redirect_header("{$_SERVER['PHP_SELF']}?id=$id", 3, "成功匯入報名資料!");
redirect_header("{$_SERVER['PHP_SELF']}?id=$id", 3, _MD_TAD_SIGNUP_IMPORT_SUCCESS);
break;

//修改報名表單(Excel)
Expand All @@ -128,7 +128,7 @@
//批次匯入 Excel
case 'tad_signup_data_import_excel':
Tad_signup_data::import_excel($id);
redirect_header("{$_SERVER['PHP_SELF']}?id=$id", 3, "成功匯入報名資料!");
redirect_header("{$_SERVER['PHP_SELF']}?id=$id", 3, _MD_TAD_SIGNUP_IMPORT_SUCCESS);
break;

// 進行pdf的匯出設定
Expand Down
8 changes: 8 additions & 0 deletions language/tchinese_utf8/main.php
Expand Up @@ -14,6 +14,14 @@
define('_MD_TAD_SIGNUP_APPLY_DATE', '報名日期');
define('_MD_TAD_SIGNUP_IDENTITY', '身份');
define('_MD_TAD_SIGNUP_ADMIN', '活動報名管理');
define('_MD_TAD_SIGNUP_CREATE_SUCCESS', '成功建立活動!');
define('_MD_TAD_SIGNUP_UPDATE_SUCCESS', '成功修改活動!');
define('_MD_TAD_SIGNUP_DESTROY_SUCCESS', '成功刪除活動!');
define('_MD_TAD_SIGNUP_APPLY_SUCCESS', '成功報名活動!');
define('_MD_TAD_SIGNUP_APPLY_UPDATE_SUCCESS', '成功修改報名資料!');
define('_MD_TAD_SIGNUP_APPLY_DESTROY_SUCCESS', '成功刪除報名資料!');
define('_MD_TAD_SIGNUP_ACCEPT_SUCCESS', '成功設定錄取狀態!');
define('_MD_TAD_SIGNUP_IMPORT_SUCCESS', '成功匯入報名資料!');

// class\Tad_signup_data.php
define('_MD_TAD_SIGNUP_CANNOT_BE_MODIFIED', '查無報名無資料,無法修改');
Expand Down

0 comments on commit 379c9f3

Please sign in to comment.