Umui.c(用户管理实例)
文件中代码与webs-2-5\wwwdemo\um中的页面对应,
(addgroup.asp、addlimit.asp、adduser.asp、delgroup.asp、dellimit.asp、deluser.asp、dspuser.asp、loadcfg.asp、savecfg.asp、um.htm
)
是这些页面调用的form、asp函数,通过这些实例,有助于对用户管理的理解。
-----------------------------------------------------------------------------------------------------------------
void formDefineUserMgmt(void)
功能:定义页面要使用的form、asp函数
说明:
-----------------------------------------------------------------------------------------------------------------
static void formAddUser(webs_t wp, char_t *path, char_t *query)
功能:添加一个用户
说明:
-----------------------------------------------------------------------------------------------------------------
static void formDeleteUser(webs_t wp, char_t *path, char_t *query)
功能:删除一个用户
说明:
-----------------------------------------------------------------------------------------------------------------
static void formDisplayUser(webs_t wp, char_t *path, char_t *query)
功能:显示用户的信息
说明:
-----------------------------------------------------------------------------------------------------------------
static int aspGenerateUserList(int eid, webs_t wp, int argc, char_t **argv)
功能:列出所用的用户
说明:
-----------------------------------------------------------------------------------------------------------------
static void formAddGroup(webs_t wp, char_t *path, char_t *query)
功能:添加一个组
说明:
-----------------------------------------------------------------------------------------------------------------
static void formDeleteGroup(webs_t wp, char_t *path, char_t *query)
功能:删除一个组
说明:组在用时,不能删除,所以,只有将在这个组的所有用户删除之后,才能删除这个组。
-----------------------------------------------------------------------------------------------------------------
static int aspGenerateGroupList(int eid, webs_t wp, int argc, char_t **argv)
功能:列出所有的组
说明:
-----------------------------------------------------------------------------------------------------------------
static void formAddAccessLimit(webs_t wp, char_t *path, char_t *query)
功能:添加组对应的访问限制路径
说明:
-----------------------------------------------------------------------------------------------------------------
static void formDeleteAccessLimit(webs_t wp, char_t *path, char_t *query)
功能:删除组对应的访问限制路径
说明:
-----------------------------------------------------------------------------------------------------------------
static int aspGenerateAccessLimitList(int eid, webs_t wp, int argc, char_t **argv)
功能:显示所有的访问限制的列表
说明:
-----------------------------------------------------------------------------------------------------------------
static int aspGenerateAccessMethodList(int eid, webs_t wp, int argc, char_t **argv)
功能:显示访问方法的列表
说明:FULL ACCESS、BASIC ACCESS、DIGEST ACCESS、NO ACCESS
-----------------------------------------------------------------------------------------------------------------
static int aspGeneratePrivilegeList(int eid, webs_t wp, int argc, char_t **argv)
功能:显示访问权限的列表
说明:READ、EXECUTE、ADMINISTRATE
-----------------------------------------------------------------------------------------------------------------
static void formSaveUserManagement(webs_t wp, char_t *path, char_t *query)
功能:保存配置到umconfig.txt
说明:
-----------------------------------------------------------------------------------------------------------------
static void formLoadUserManagement(webs_t wp, char_t *path, char_t *query)
功能:将umconfig.txt文件中配置数据恢复到数据库中
说明:
-----------------------------------------------------------------------------------------------------------------
static void websMsgStart(webs_t wp)
功能:向浏览器中输出<body><h2>
说明:
-----------------------------------------------------------------------------------------------------------------
static void websMsgEnd(webs_t wp)
功能:向浏览器中输出</h2></body>
说明:
-----------------------------------------------------------------------------------------------------------------