printf(\作者:\出版社:\ printf(\馆藏:\可借:\
printf(\借书人信息|| %-6s%-10s%-6s%-7s%-7s%s\\n\\n\姓名:\性别:\学号:\
printf(\====\\n\
printf(\ printf(\继续搜索 [2].返回上一级菜单 [0].退出系统 \\n\
printf(\ printf(\请选择:\ scanf(\ while(1) {
switch(b1) {
case 1:goto A;break; case 2:return(back=1); case 0: {
system(\ printf(\
------------------------------------------------------------\\n\
printf(\感谢使用,再见! =- \\n\
printf(\
------------------------------------------------------------\\n\ exit(0); } } } } } }
int search_title(int back)//【按书名查询函数(管理员版)】 {
FILE *fp;
char title[100]; struct Book *p; int a1,b1;
A:system(\为一个标志位,用于返回本函数首界面 back=0; a1=0;
printf(\请输入书名:\
scanf(\
fp=fopen(\图书信息数据库.txt\
if(fp==NULL){printf(\数据库打开错误!请检查...\\n\ p=(struct Book*)malloc(LONG); while(!feof(fp)) {
fscanf(fp,\year,p->claim_number,p->unit_price,&p->collection,&p->can_borrow,p->student_name,p->sex,p->student_id,&p->number);
if(strcmp(title,p->title)==0) {
a1=1;
printf(\====\\n\\n\
printf(\编号:\索取号:\年份:\单价:\ printf(\书名:%s\\n\ printf(\%-6s%-12s%s%s\\n\\n\作者:\出版社:\ printf(\馆藏:\可借:\
printf(\借书人信息|| %-6s%-10s%-6s%-7s%-7s%s\\n\\n\姓名:\性别:\学号:\
printf(\====\\n\
} } if(a1==1) {
fclose(fp);
printf(\ printf(\继续搜索 [2].返回上一级菜单 [0].退出系统 \\n\
printf(\ printf(\请选择:\ scanf(\ while(1) {
switch(b1) {
case 1:goto A;break; case 2:return(back=1); case 0: {
system(\
printf(\
------------------------------------------------------------\\n\
printf(\感谢使用,再见! =- \\n\
printf(\
------------------------------------------------------------\\n\ exit(0); } } } }
if(a1==0) {
fclose(fp);
printf(\未找到与书名相符的图书!\\n\\n\
printf(\ printf(\继续搜索 [2].返回上一级菜单 [0].退出系统 \\n\
printf(\ printf(\请选择:\ scanf(\ while(1) {
switch(b1) {
case 1:goto A;break; case 2:return(back=1); case 0: {
system(\ printf(\
------------------------------------------------------------\\n\
printf(\感谢使用,再见! =- \\n\
printf(\
------------------------------------------------------------\\n\ exit(0); } } } } }
void search_menu()//【图书查询函数界面(管理员版)】 {
printf(\
printf(\ printf(\按图书编号查询 |\\n\ printf(\ printf(\按图书名称查询 |\\n\ printf(\ printf(\返回上一级菜单 |\\n\ printf(\ printf(\ printf(\请选择:\}
int book_delete(int back)//【图书信息删除函数】 {
FILE *fp;
char title[100],d[100]; struct Book n[1000]; int i,j;
struct Book *p; int a,b,c,e,f;
A:system(\为一个标志位,用于返回本函数首界面 back=0,i=0,j=0,b=0,a=0; printf(\请输入书名:\ scanf(\
fp=fopen(\图书信息数据库.txt\
if(fp==NULL){printf(\数据库打开错误!请检查...\\n\ p=(struct Book*)malloc(LONG); while(!feof(fp)) {
fscanf(fp,\year,p->claim_number,p->unit_price,&p->collection,&p->can_borrow,p->student_name,p->sex,p->student_id,&p->number);
if(strcmp(title,p->title)==0) {
a=1;
if(strcmp(p->student_name,\未知\
printf(\====\\n\\n\
printf(\编号:\索取号:\年份:\单价:\ printf(\书名:%s\\n\ printf(\%-6s%-12s%s%s\\n\\n\作者:\出版社:\ printf(\馆藏:\可借:\
printf(\借书人信息|| %-6s%-10s%-6s%-7s%-7s%s\\n\\n\姓名:\性别:\学号:\
printf(\====\\n\
} }
fclose(fp); if(b==1) {
fclose(fp);
printf(\此书正在出借,无法删除信息!\\n\\n\
printf(\ printf(\重新搜索 [2].返回管理员功能菜单 [0].退出系统 \\n\ printf(\ printf(\请选择:\ scanf(\ while(1) {
switch(b) {
case 1:goto A;break; case 2:return(back=1); case 0: {
system(\ printf(\
------------------------------------------------------------\\n\
printf(\感谢使用,再见! =- \\n\
printf(\
------------------------------------------------------------\\n\ exit(0); } } } }
if(a==1&&b!=1) {
printf(\确认删除?\\n\
printf(\ printf(\是 [2].否 \\n\ printf(\ scanf(\ while(1) {
switch(c) {