You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

64 lines
3.2 KiB

<?php
#設定系統名稱
$system_name = "day_off";
# 設定table schema
$sql = "
CREATE TABLE IF NOT EXISTS ". $system_name . "(
`id` int(11) NOT NULL AUTO_INCREMENT,
`day_off_no` varchar(30) DEFAULT NULL COMMENT '單據編號',
`day_off_type` varchar(3) DEFAULT NULL COMMENT '假別\r\n001=特休假\r\n002=補修\r\n003=公出假\r\n004公假',
`day_off_typename` text DEFAULT NULL COMMENT '假別名稱',
`start_date` date DEFAULT NULL COMMENT '開始日期與時間',
`end_date` date DEFAULT NULL COMMENT '結束日期與時間',
`substitute_id` varchar(10) DEFAULT NULL COMMENT '代理人員工號',
`substitute_name` varchar(255) DEFAULT NULL COMMENT '代理人員姓名',
`reason` text DEFAULT NULL COMMENT '請假原因',
`creater` varchar(10) DEFAULT NULL COMMENT '建檔人',
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '單據時間',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='請假單';
";
/* 設定html schema
格式:type(必填), label顯示名稱, name(需填), id, title停駐時的提示字, placeHolder輸入盒的提示字, value值, other其他屬性(checked required disabled)
範例如下:
text
password
textarea
file
multipleFile
hidden
checkbox
radio
option
*/
$html_schema = array(
array("type" => "text", "id" => "id", "label" => "ID", "placeHolder" => "", "value" => "", "others" => "disabled required"),
array("type" => "text", "id" => "day_off_no", "label" => "單據編號", "placeHolder" => "單據編號", "value" => "", "others" => "required"),
array("type" => "radio", "id" => "day_off_type", "label" => "假別", "placeHolder" => "假別",
"value" => array(
array("id" => "001", "label" => "特休假", "value" => "001", "others" => ""),
array("id" => "002", "label" => "補修", "value" => "002", "others" => ""),
array("id" => "003", "label" => "公出假", "value" => "003", "others" => ""),
array("id" => "004", "label" => "公假", "value" => "004", "others" => ""),
),
"others" => "required"),
array("type" => "text", "id" => "day_off_typename", "label" => "假別名稱", "placeHolder" => "", "value" => "", "others" => "requiredd"),
array("type" => "text", "id" => "start_date", "label" => "開始日期與時間", "placeHolder" => "", "value" => "", "others" => "required"),
array("type" => "text", "id" => "end_date", "label" => "結束日期與時間", "placeHolder" => "", "value" => "", "others" => "required"),
array("type" => "text", "id" => "substitute_id", "label" => "代理人員工號", "placeHolder" => "", "value" => "", "others" => "required"),
array("type" => "text", "id" => "substitute_name", "label" => "代理人員姓名", "placeHolder" => "", "value" => "", "others" => "required"),
array("type" => "text", "id" => "reason", "label" => "請假原因", "placeHolder" => "", "value" => "", "others" => "required"),
array("type" => "text", "id" => "creater", "label" => "建檔人", "placeHolder" => "", "value" => "", "others" => "required"),
array("type" => "text", "id" => "create_at", "label" => "單據時間", "placeHolder" => "", "value" => "", "others" => "required")
);
?>