//field avalable in table "EMAILS"
const char *usrfield[]={
"email",
+ "passwd",
"space",
"mxspace",
(char *)0
if ((locval=getvalue(sql,rs,0,usrfield[i]))==(char *)0)
continue;
switch (i) {
- case 0 :
+ case 0 : //user email
usr->email=strdup(locval);
break;
- case 1 :
+ case 1 : //user passwd
+ usr->passwd=strdup(locval);
+ break;
+ case 2 : //user used space
usr->space=atoi(locval);
break;
- case 2 :
+ case 3 : //user max space available
usr->mxspace=atoi(locval);
break;
default :
//structure about user within the database
typedef struct {
char *email; //user emails
- u_long space; //user space used;
+ char *passwd; //user password
+ u_long space; //user space used
u_long mxspace; //user maximun space
}USRTYP;