struct fil
{ char name[10];
unsigned long int size;
char type[3];
unsigned long int editime;
char content[210];
char handlers[10];
unsigned long int overdue;
} fil_list[Num];
void init_list();
void add();
void dele();
void list();
void save();
void load();
void help();
void edit();
void search();
void overdue_del();
int find();
int menu();
int menu_list();
int menu_search();
void ok() //系统主菜单
{char choice;
init_list();
load();
for( ; ; )
{choice = menu();
switch(choice)
{ case 1: add(); break;
case 2: edit(); break;
case 3: dele(); break;
case 4: list(); break;
case 5: save(); break;
case 6: load(); break;
case 7: search(); break;
case 8: overdue_del(); break;
case 0: exit(0);
}
}
}
void main() //主程序
{ ok();
}
void init_list() //序列定位
{register int t;
for(t=0; t<Num; t++)
fil_list[t].name[0] = '\0'; }
int time() //获取系统时间
{ long int data;
time_t t;
struct tm *tm;
char timea[30];
t = time(NULL);
tm = localtime(&t);
strcpy(timea,asctime(tm));
data=(timea[20]-48)*10000000+(timea[21]-48)*1000000+(timea[22]-48)*100000+(timea[23]-48)*10000+(timea[8]-48)*10+(timea[9]-48);
if (timea[4]=='J'&&timea[5]=='a') data+=1*100;
if (timea[4]=='F') data+=2*100;
if (timea[4]=='M'&&timea[6]=='r') data+=3*100;
if (timea[4]=='A'&&timea[5]=='p') data+=4*100;
if (timea[4]=='M'&&timea[6]=='y') data+=5*100;
if (timea[4]=='J'&&timea[6]=='n'&&timea[5]=='u') data+=6*100;
if (timea[4]=='J'&&timea[6]=='l'&&timea[5]=='u') data+=7*100;
if (timea[4]=='A'&&timea[6]=='g') data+=8*100;
if (timea[4]=='S') data+=9*100;
if (timea[4]=='O') data+=10*100;
if (timea[4]=='N') data+=11*100;
if (timea[4]=='D') data+=12*100;
return data;
}
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] 下一页