?? sys_time0.c
字號:
#include <stdio.h>#include <stdlib.h>#include <string.h>#include "cgi_def.h"#include "cgi_err.h"#include "cgi-lib.h"#include "html-lib.h"#include "parser.h"#include "h_var.h"static int r2t_local_date(char buf[CGI_BUF_LEN],char **buf1);static int r2t_local_time(char buf[CGI_BUF_LEN],char **buf1);static int r2t_cor_time_way(char buf[CGI_BUF_LEN],char **buf1);static int r2t_manu_config(char buf[CGI_BUF_LEN],char **buf1);static int r2t_sync_computer(char buf[CGI_BUF_LEN],char **buf1);static int r2t_sync_net_server(char buf[CGI_BUF_LEN],char **buf1);static int r2t_manu_year(char buf[CGI_BUF_LEN],char **buf1);static int r2t_manu_month(char buf[CGI_BUF_LEN],char **buf1);static int r2t_manu_day(char buf[CGI_BUF_LEN],char **buf1);static int r2t_manu_hour(char buf[CGI_BUF_LEN],char **buf1);static int r2t_manu_minute(char buf[CGI_BUF_LEN],char **buf1);static int r2t_manu_second(char buf[CGI_BUF_LEN],char **buf1);static int r2t_sync_comp_date(char buf[CGI_BUF_LEN],char **buf1);static int r2t_sync_comp_time(char buf[CGI_BUF_LEN],char **buf1);static int r2t_collate_server(char buf[CGI_BUF_LEN],char **buf1);static int r2t_time_zone(char buf[CGI_BUF_LEN],char **buf1);static int r2t_zone_mode_manu_en(char buf[CGI_BUF_LEN],char **buf1);static int r2t_zone_mode_freq_en(char buf[CGI_BUF_LEN],char **buf1);static int r2t_zone_mode_freq(char buf[CGI_BUF_LEN],char **buf1);static int r2t_message(char buf[CGI_BUF_LEN],char **buf1);static int t2r_local_date(const char *value,int index);static int t2r_local_time(const char *value,int index);static int t2r_cor_time_way(const char *value,int index);static int t2r_manu_year(const char *value,int index);static int t2r_manu_month(const char *value,int index);static int t2r_manu_day(const char *value,int index);static int t2r_manu_hour(const char *value,int index);static int t2r_manu_minute(const char *value,int index);static int t2r_manu_second(const char *value,int index);static int t2r_sync_comp_date(const char *value,int index);static int t2r_sync_comp_time(const char *value,int index);static int t2r_collate_server(const char *value,int index);static int t2r_time_zone(const char *value,int index);static int t2r_zone_mode(const char *value,int index);static int t2r_zone_mode_freq(const char *value,int index);static int t2r_message(const char *value,int index);/*typedef struct sys_time_conf{ char local_date[MAX_LOCAL_DATE_LEN]; //當(dāng)?shù)厝掌?/span> char local_time[MAX_LOCAL_TIME_LEN]; //當(dāng)?shù)貢r間 int cor_time_way; //設(shè)置時間方式 int manu_year; //手工設(shè)置年 int manu_month; //手工設(shè)置月 int manu_day; //手工設(shè)置日 int manu_hour; //手工設(shè)置小時 int manu_minute; //手工設(shè)置分鐘 int manu_second; //手工設(shè)置秒鐘 char sync_comp_date[MAX_SYNC_COMP_DATE_LEN]; //與此計算機同步日期 char sync_comp_time[MAX_SYNC_COMP_TIME_LEN]; //與此計算機同步時間 char collate_server[MAX_COLLATE_SERVER_LEN]; //網(wǎng)絡(luò)校時服務(wù)器 int time_zone; //時區(qū)選擇 int zone_mode; //時區(qū)模式 int zone_mode_freq; //時區(qū)模式頻率 }SYS_TIME_CONF;*/static keyfun_tab key_fun_tab[]={ {"local_date",r2t_local_date,t2r_local_date}, {"local_time",r2t_local_time,t2r_local_time}, {"cor_time_way",r2t_cor_time_way,t2r_cor_time_way}, {"manu_config",r2t_manu_config,NULL}, {"sync_computer",r2t_sync_computer,NULL}, {"sync_net_server",r2t_sync_net_server,NULL}, {"manu_year",r2t_manu_year,t2r_manu_year}, {"manu_month",r2t_manu_month,t2r_manu_month}, {"manu_day",r2t_manu_day,t2r_manu_day}, {"manu_hour",r2t_manu_hour,t2r_manu_hour}, {"manu_minute",r2t_manu_minute,t2r_manu_minute}, {"manu_second",r2t_manu_second,t2r_manu_second},// {"sync_comp_date",r2t_sync_comp_date,t2r_sync_comp_date}, // {"sync_comp_time",r2t_sync_comp_time,t2r_sync_comp_time}, {"collate_server",r2t_collate_server,t2r_collate_server}, {"time_zone",r2t_time_zone,t2r_time_zone}, {"zone_mode",NULL,t2r_zone_mode}, {"zone_mode_manu_en",r2t_zone_mode_manu_en,NULL}, {"zone_mode_freq_en",r2t_zone_mode_freq_en,NULL}, {"zone_mode_freq",r2t_zone_mode_freq,t2r_zone_mode_freq}, {"message",r2t_message,t2r_message}, {NULL,NULL,NULL}};/******CGI code here******/#include "sys_time_cgi.c"/*************************/
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -