commit
a09513510b
@ -0,0 +1,65 @@
|
||||
#ifndef BOOKS_H_INCLUDED
|
||||
#define BOOKS_H_INCLUDED
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <conio.h>
|
||||
#include <windows.h>
|
||||
#include "user.h"
|
||||
#include "BOOKUI.h"
|
||||
#include "login.h"
|
||||
#include "admin.h"
|
||||
|
||||
//#define "轻小说" 0
|
||||
//#define "教育" 1
|
||||
//#define "文学" 2
|
||||
//#define "科幻" 3
|
||||
//#define "自然科学" 4
|
||||
//#define "外国文学" 5
|
||||
//#define "禁书" 6
|
||||
char *temp[1000];
|
||||
FILE *fp_BOOK;
|
||||
typedef struct memer_BOOK{
|
||||
char id[21]; //编号
|
||||
char name[21]; //书名
|
||||
char author[21]; //作者
|
||||
char type[21]; //类型 --->选项 类
|
||||
char publish[21]; //出版社
|
||||
int num; //数量 --->录入时查重,完全重复才++
|
||||
struct memer_BOOK *next;
|
||||
}BOOK;
|
||||
|
||||
char book1[21],book2[21],book3[21];
|
||||
int booknum;
|
||||
|
||||
int books();
|
||||
void newone_BOOK();
|
||||
int newok_BOOK(char*id,char*name,char*author,char*type,char*publish,int num);
|
||||
void showall_BOOK(int peo);
|
||||
void in_BOOK();
|
||||
void close_BOOK();
|
||||
void save_BOOK();
|
||||
void mpsort_BOOK();
|
||||
void book_function_info(int choice);//用户功能菜单
|
||||
void book_function_choose();//用户功能菜单的实现
|
||||
void book_type_menu_info(int choice);//书本的类型菜单
|
||||
int book_type_menu_choose();//书本的类型菜单的实现
|
||||
void new_info();
|
||||
void alter_BOOK_info();
|
||||
void alter_BOOK();
|
||||
void del_BOOK_info();
|
||||
void del_BOOK();
|
||||
void exchange_BOOK(char*,char*);
|
||||
void conshow_BOOK(int fun,int peo);
|
||||
void conshow_BOOK_choice(int peo);//0为user 1为admin
|
||||
void conshow_BOOK_menu(int choice);
|
||||
void borrowandreturn_BOOK_choice(int peo);//0为user 1为admin
|
||||
void borrowandreturn_BOOK_menu(int choice);
|
||||
void borrowandreturn_BOOK_info();
|
||||
void borrow_BOOK(int peo);
|
||||
void return_BOOK(int peo);
|
||||
void change_password();
|
||||
void back_BOOK(int peo);
|
||||
|
||||
#endif // BOOKS_H_INCLUDED
|
@ -0,0 +1,118 @@
|
||||
#include "BOOKUI.h"
|
||||
|
||||
char first[2][20] = {"登陆","注册"};
|
||||
char login_uesr[2][20] = {"普通用户登陆","管理员登陆"};
|
||||
|
||||
void Settitle(char *title)//设置控制台标题
|
||||
{
|
||||
SetConsoleTitle(title);
|
||||
}
|
||||
|
||||
|
||||
void setcolor(int forecolor,int bgcolor)
|
||||
{
|
||||
HANDLE win = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
SetConsoleTextAttribute(win,forecolor + bgcolor *0x10);
|
||||
}
|
||||
|
||||
void setposition(int x,int y)
|
||||
{
|
||||
HANDLE win = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
COORD pos = {x,y+3};
|
||||
SetConsoleCursorPosition(win,pos);
|
||||
}
|
||||
|
||||
void showtitle()//显示标题
|
||||
{
|
||||
setposition(LB,0);
|
||||
printf("--------------------------------------------------------------");
|
||||
setposition(LB,1);
|
||||
printf("|");
|
||||
setposition(LB+25,1);
|
||||
printf("学生选课系统");
|
||||
setposition(LB+61,1);
|
||||
printf("|");
|
||||
setposition(LB,2);
|
||||
printf("--------------------------------------------------------------");
|
||||
int i;
|
||||
for(i = 0; i < 8;i++){
|
||||
setposition(LB,START+i);
|
||||
printf("|");
|
||||
setposition(LB+61,START+i);
|
||||
printf("|");
|
||||
}
|
||||
setposition(LB,START+i);
|
||||
printf("--------------------------------------------------------------");
|
||||
}
|
||||
|
||||
void welcome()
|
||||
{
|
||||
int i,j = 0,k=-1;
|
||||
for(i = 0; i <= 1;i++,k++)
|
||||
{
|
||||
if(choice == i)
|
||||
setcolor(0,15);
|
||||
setposition(LB+28,START+i+k+3);
|
||||
printf("%s",first[j++]);
|
||||
setcolor(11,0);
|
||||
}
|
||||
}
|
||||
|
||||
void comuser(int t)//用户登陆类型选择
|
||||
{
|
||||
int i,j = 0,k=-1;
|
||||
for(i = 0; i <= 1;i++,k++)
|
||||
{
|
||||
if(t == i)
|
||||
setcolor(0,15);
|
||||
setposition(LB+25,START+i+k+3);
|
||||
printf("%s",login_uesr[j++]);
|
||||
setcolor(11,0);
|
||||
}
|
||||
}
|
||||
|
||||
void HideCursor() //隐藏光标
|
||||
{
|
||||
CONSOLE_CURSOR_INFO cursor_info = {1, 0};
|
||||
SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE), &cursor_info);
|
||||
}
|
||||
|
||||
|
||||
void HideCursor2() //光标
|
||||
{
|
||||
CONSOLE_CURSOR_INFO cursor_info = {1, 1};
|
||||
SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE), &cursor_info);
|
||||
}
|
||||
|
||||
void clean()
|
||||
{
|
||||
printf(" ");
|
||||
}
|
||||
|
||||
void player()
|
||||
{
|
||||
FILE *aim;
|
||||
if((aim=fopen("aim.txt","r"))==NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
char page[70][220];
|
||||
int i,hang=60;
|
||||
while(!feof(aim))
|
||||
{
|
||||
Sleep(33);
|
||||
HideCursor();
|
||||
for(i = 0; i < hang;i++)
|
||||
{
|
||||
fgets(page[i],209,aim);
|
||||
|
||||
}
|
||||
for(i = 10; i < hang-5; i++)
|
||||
{
|
||||
printf("%s",page[i]+10);
|
||||
}
|
||||
setposition(0,-3);
|
||||
}
|
||||
system("cls");
|
||||
Sleep(500);
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
#ifndef ADMIN_H_INCLUDED
|
||||
#define ADMIN_H_INCLUDED
|
||||
|
||||
#include "BOOKUI.h"
|
||||
#include "user.h"
|
||||
#include "BOOKS.h"
|
||||
#include "login.h"
|
||||
|
||||
FILE *FP_ADMIN;
|
||||
|
||||
struct admins{
|
||||
char id[20],pass[20];
|
||||
char book1[20],book2[20],book3[20];
|
||||
int booknum;
|
||||
};
|
||||
|
||||
typedef struct admins ADMINS;
|
||||
|
||||
ADMINS ADMIN;
|
||||
|
||||
void admin_BOOK_menu(int choice);
|
||||
void admin_BOOK_choice();
|
||||
void admin_BOOK_info();
|
||||
void admin_save();
|
||||
void change_admin_password();
|
||||
void change_user_all();
|
||||
void admin_menu_info();
|
||||
|
||||
#endif // ADMIN_H_INCLUDED
|
@ -0,0 +1 @@
|
||||
123 o o o 0
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -0,0 +1 @@
|
||||
001 C语言 27 自然科学 12 19 002 Python 30 自然科学 12 10 003 日语 20 语言类 5 40 字符串id 测试 27 策略 999 999
|
@ -0,0 +1 @@
|
||||
18408000921 123123 001 o o 1
|
@ -0,0 +1,137 @@
|
||||
# depslib dependency file v1.0
|
||||
1544181177 source:c:\users\15096\documents\c\hud\booklib\bookui.c
|
||||
"BOOKUI.h"
|
||||
|
||||
1544181176 c:\users\15096\documents\c\hud\booklib\bookui.h
|
||||
<stdio.h>
|
||||
<stdlib.h>
|
||||
<windows.h>
|
||||
"admin.h"
|
||||
|
||||
1544181177 source:c:\users\15096\documents\c\hud\booklib\main.c
|
||||
<stdio.h>
|
||||
<stdlib.h>
|
||||
<string.h>
|
||||
<conio.h>
|
||||
<windows.h>
|
||||
"BOOKUI.h"
|
||||
"user.h"
|
||||
|
||||
1544181176 source:c:\users\15096\documents\c\hud\booklib\user.c
|
||||
"user.h"
|
||||
"BOOKUI.h"
|
||||
"login.h"
|
||||
<string.h>
|
||||
|
||||
1544106355 c:\users\15096\documents\c\hud\booklib\user.h
|
||||
<conio.h>
|
||||
"BOOKUI.h"
|
||||
"admin.h"
|
||||
|
||||
1544181177 source:c:\users\15096\documents\c\hud\booklib\login.c
|
||||
<stdio.h>
|
||||
<stdlib.h>
|
||||
<string.h>
|
||||
<conio.h>
|
||||
<windows.h>
|
||||
"login.h"
|
||||
|
||||
1544101008 c:\users\15096\documents\c\hud\booklib\login.h
|
||||
"BOOKUI.h"
|
||||
"user.h"
|
||||
<time.h>
|
||||
"BOOKS.h"
|
||||
"admin.h"
|
||||
|
||||
1544181291 source:c:\users\15096\documents\c\hud\booklib\books.c
|
||||
"BOOKS.h"
|
||||
|
||||
1544104379 c:\users\15096\documents\c\hud\booklib\books.h
|
||||
<stdio.h>
|
||||
<stdlib.h>
|
||||
<string.h>
|
||||
<conio.h>
|
||||
<windows.h>
|
||||
"user.h"
|
||||
"BOOKUI.h"
|
||||
"login.h"
|
||||
"admin.h"
|
||||
|
||||
1544106477 c:\users\15096\documents\c\hud\booklib\admin.h
|
||||
"BOOKUI.h"
|
||||
"user.h"
|
||||
"BOOKS.h"
|
||||
"login.h"
|
||||
|
||||
1544181176 source:c:\users\15096\documents\c\hud\booklib\admin.c
|
||||
"admin.h"
|
||||
<string.h>
|
||||
|
||||
1546846940 source:c:\users\15096\documents\c\hud\图书管理系统\booklib\admin.c
|
||||
"admin.h"
|
||||
<string.h>
|
||||
|
||||
1544106477 c:\users\15096\documents\c\hud\图书管理系统\booklib\admin.h
|
||||
"BOOKUI.h"
|
||||
"user.h"
|
||||
"BOOKS.h"
|
||||
"login.h"
|
||||
|
||||
1546850546 c:\users\15096\documents\c\hud\图书管理系统\booklib\bookui.h
|
||||
<stdio.h>
|
||||
<stdlib.h>
|
||||
<windows.h>
|
||||
"admin.h"
|
||||
|
||||
1544106355 c:\users\15096\documents\c\hud\图书管理系统\booklib\user.h
|
||||
<conio.h>
|
||||
"BOOKUI.h"
|
||||
"admin.h"
|
||||
|
||||
1545410929 c:\users\15096\documents\c\hud\图书管理系统\booklib\books.h
|
||||
<stdio.h>
|
||||
<stdlib.h>
|
||||
<string.h>
|
||||
<conio.h>
|
||||
<windows.h>
|
||||
"user.h"
|
||||
"BOOKUI.h"
|
||||
"login.h"
|
||||
"admin.h"
|
||||
|
||||
1544101008 c:\users\15096\documents\c\hud\图书管理系统\booklib\login.h
|
||||
"BOOKUI.h"
|
||||
"user.h"
|
||||
<time.h>
|
||||
"BOOKS.h"
|
||||
"admin.h"
|
||||
|
||||
1546847405 source:c:\users\15096\documents\c\hud\图书管理系统\booklib\books.c
|
||||
"BOOKS.h"
|
||||
|
||||
1546852018 source:c:\users\15096\documents\c\hud\图书管理系统\booklib\bookui.c
|
||||
"BOOKUI.h"
|
||||
|
||||
1546847479 source:c:\users\15096\documents\c\hud\图书管理系统\booklib\login.c
|
||||
<stdio.h>
|
||||
<stdlib.h>
|
||||
<string.h>
|
||||
<conio.h>
|
||||
<windows.h>
|
||||
"login.h"
|
||||
|
||||
1546850608 source:c:\users\15096\documents\c\hud\图书管理系统\booklib\main.c
|
||||
<stdio.h>
|
||||
<stdlib.h>
|
||||
<string.h>
|
||||
<conio.h>
|
||||
<windows.h>
|
||||
"BOOKUI.h"
|
||||
"user.h"
|
||||
|
||||
1546846467 source:c:\users\15096\documents\c\hud\图书管理系统\booklib\user.c
|
||||
"user.h"
|
||||
"BOOKUI.h"
|
||||
"login.h"
|
||||
<string.h>
|
||||
|
@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<CodeBlocks_layout_file>
|
||||
<FileVersion major="1" minor="0" />
|
||||
<ActiveTarget name="Debug" />
|
||||
<File name="login.c" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="4829" topLine="164" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="admin.c" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5892" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="admin.h" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="398" topLine="1" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="BOOKUI.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="682" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="main.c" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="240" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="user.c" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2655" topLine="141" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="BOOKS.c" open="1" top="1" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="7884" topLine="255" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="BOOKS.h" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1841" topLine="42" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="user.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="315" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="BOOKUI.c" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="187" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="login.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="841" topLine="6" />
|
||||
</Cursor>
|
||||
</File>
|
||||
</CodeBlocks_layout_file>
|
Binary file not shown.
@ -0,0 +1 @@
|
||||
001 C语言 27 自然科学 12 19 002 Python 30 自然科学 12 10 003 日语 20 语言类 5 40 字符串id 测试 27 策略 999 999
|
@ -0,0 +1,34 @@
|
||||
#ifndef LOGIN_H_INCLUDED
|
||||
#define LOGIN_H_INCLUDED
|
||||
|
||||
#include "BOOKUI.h"
|
||||
#include "user.h"
|
||||
#include <time.h>
|
||||
#include "BOOKS.h"
|
||||
#include "admin.h"
|
||||
FILE *fp;
|
||||
typedef struct memer{
|
||||
char id[20],pass[20];
|
||||
char book1[20],book2[20],book3[20];
|
||||
int booknum;
|
||||
struct memer *next;
|
||||
}me;
|
||||
|
||||
me*change;
|
||||
me*user;
|
||||
|
||||
void newone();//输入新增用户
|
||||
int newok(char * aid,char * apass,char* book1,char* book2,char* book3,int booknum);//新增用户写入链表
|
||||
void showall();//展示
|
||||
void in();//从文件读取用户数据
|
||||
void close();//关闭文件
|
||||
void save();//储存现有数据
|
||||
int regist();//注册
|
||||
void info();//提示信息
|
||||
int space(char*);//空格检测
|
||||
int AI();//验证码
|
||||
int loginuser();//普通用户登陆
|
||||
void logininfo();//登陆提示
|
||||
void enter();//登陆的实际操作
|
||||
void ID();//筛选ID
|
||||
#endif // LOGIN_H_INCLUDED
|
@ -0,0 +1,24 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <conio.h>
|
||||
#include <windows.h>
|
||||
#include "BOOKUI.h"
|
||||
#include "user.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
HideCursor();
|
||||
choice = 0;
|
||||
setcolor(11,0);
|
||||
Settitle("|学生选课系统|");
|
||||
system("mode con cols=180 lines=50");
|
||||
player();
|
||||
system("mode con cols=105 lines=30");
|
||||
|
||||
showtitle();
|
||||
HideCursor();
|
||||
login1();//登录或注册的选择界面(进入程序的第一步)
|
||||
return 0;
|
||||
}
|
||||
|
@ -0,0 +1 @@
|
||||
18408000921 123123 001 o o 1
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,169 @@
|
||||
#include "user.h"
|
||||
#include "BOOKUI.h"
|
||||
#include "login.h"
|
||||
#include <string.h>
|
||||
|
||||
int login1()
|
||||
{
|
||||
system("cls");
|
||||
HideCursor();
|
||||
showtitle();
|
||||
while(1)
|
||||
{
|
||||
welcome();
|
||||
HideCursor();
|
||||
char a,b;
|
||||
b = getch();
|
||||
if(b==-32)
|
||||
a = getch();
|
||||
fflush(stdin);
|
||||
if(a == UP && b == -32)
|
||||
{
|
||||
choice--;
|
||||
}
|
||||
else if(a == DOWN && b == -32)
|
||||
{
|
||||
choice++;
|
||||
}
|
||||
else if(b==13){
|
||||
login2(choice);
|
||||
break;
|
||||
}
|
||||
else{
|
||||
setposition(19,12);
|
||||
printf("输入“↑”或“↓”,回车键确认");
|
||||
}
|
||||
if(choice<0) choice = 1;
|
||||
if(choice>1) choice = 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int login2(int k)
|
||||
{
|
||||
//k==0为登陆
|
||||
if(k == 0)
|
||||
{
|
||||
Settitle("|学生选课系统|登陆界面|");
|
||||
while(1)
|
||||
{
|
||||
comuser(choice);
|
||||
HideCursor();
|
||||
char a,b;
|
||||
b = getch();
|
||||
if(b == -32)
|
||||
a = getch();
|
||||
fflush(stdin);
|
||||
if(a == UP && b == -32)
|
||||
{
|
||||
choice--;
|
||||
}
|
||||
else if(a == DOWN && b == -32)
|
||||
{
|
||||
choice++;
|
||||
}
|
||||
else if(b==13){
|
||||
login3(choice);
|
||||
break;
|
||||
}
|
||||
else{
|
||||
setposition(LB,12);
|
||||
printf("输入“↑”或“↓”,回车键确认");
|
||||
}
|
||||
if(choice<0) choice = 1;
|
||||
if(choice>1) choice = 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//k==1为注册
|
||||
if(k == 1)
|
||||
{
|
||||
regist();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void login3(int k)
|
||||
{
|
||||
//k==0表示普通用户登陆
|
||||
if(k==0)
|
||||
{
|
||||
Settitle("|学生选课系统|登陆界面|普通用户登陆|");
|
||||
loginuser();
|
||||
}
|
||||
//k==1表示管理员登陆
|
||||
if(k==1)
|
||||
{
|
||||
Settitle("|学生选课系统|登陆界面|管理员登陆|");
|
||||
int lim = 5;
|
||||
while(lim--)
|
||||
{
|
||||
|
||||
if(!admin())
|
||||
{
|
||||
Sleep(300);
|
||||
setposition(LB,15);
|
||||
printf("你还剩%d次机会\n",lim);
|
||||
HideCursor();
|
||||
Sleep(1000);
|
||||
system("cls");
|
||||
showtitle();
|
||||
comuser(1);
|
||||
setposition(LB,12);
|
||||
HideCursor2();
|
||||
}
|
||||
else break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int admin()
|
||||
{
|
||||
Settitle("|学生选课系统|管理员登陆|");
|
||||
char adminpw[50];
|
||||
char adminpwr[50];
|
||||
system("cls");
|
||||
showtitle();
|
||||
comuser(1);
|
||||
setposition(LB,12);
|
||||
HideCursor2();
|
||||
printf("请输入管理员账号:");
|
||||
gets(ADMIN.id);
|
||||
if((fp = fopen(ADMIN.id,"r"))==NULL)
|
||||
{
|
||||
system("cls");
|
||||
printf("\n\n\t不存在该管理员!");
|
||||
printf("\n\n\t3秒后退出程序\n");
|
||||
Sleep(3000);
|
||||
exit(0);
|
||||
}
|
||||
if(fgetc(fp)==EOF)
|
||||
{
|
||||
printf("\n\n\t不安全的管理员!");
|
||||
printf("\n\n\t3秒后退出程序\n");
|
||||
Sleep(3000);
|
||||
exit(0);
|
||||
}
|
||||
rewind(fp);
|
||||
fscanf(fp,"%s",adminpwr);
|
||||
setposition(LB,13);
|
||||
printf("请输入管理员密码:");
|
||||
gets(adminpw);
|
||||
rewind(fp);
|
||||
setposition(LB,14);
|
||||
if(strcmp(adminpw,adminpwr) == 0)
|
||||
{
|
||||
fscanf(fp,"%s%s%s%s%d",ADMIN.pass,ADMIN.book1,ADMIN.book2,ADMIN.book3,&ADMIN.booknum);
|
||||
close();
|
||||
admin_BOOK_choice();
|
||||
return 1;
|
||||
}
|
||||
else if(strcmp(adminpw,adminpwr) != 0)
|
||||
{
|
||||
printf("密码错误");
|
||||
close();
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -0,0 +1,16 @@
|
||||
#ifndef USER_H_INCLUDED
|
||||
#define USER_H_INCLUDED
|
||||
|
||||
#include<conio.h>
|
||||
#include "BOOKUI.h"
|
||||
#include "admin.h"
|
||||
#define UP 72
|
||||
#define DOWN 80
|
||||
#define RIGHT 77
|
||||
#define LEFT 75
|
||||
int admin();//管理员登陆
|
||||
int login1(); //选择登陆或注册
|
||||
int login2(int); //进行登陆类型选择
|
||||
void login3(int); //进行登陆
|
||||
|
||||
#endif // USER_H_INCLUDED
|
Loading…
Reference in new issue