⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sys_time0.c

📁 使用C语言的cgi程序
💻 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];			//当地日期	char local_time[MAX_LOCAL_TIME_LEN];			//当地时间	int  cor_time_way;								//设置时间方式	int  manu_year;									//手工设置年	int  manu_month;								//手工设置月	int  manu_day;									//手工设置日	int  manu_hour;									//手工设置小时	int  manu_minute;								//手工设置分钟	int  manu_second;								//手工设置秒钟	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];		//网络校时服务器	int  time_zone;										//时区选择	int  zone_mode;										//时区模式	int  zone_mode_freq;								//时区模式频率	}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"/*************************/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -