Changeset 1026
- Timestamp:
- 01/01/10 23:21:13 (14 years ago)
- Location:
- branches/monitor-improvement
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/monitor-improvement/oscam-http.c
r1024 r1026 726 726 void send_oscam_user_config_edit(struct templatevars *vars, FILE *f, struct uriparams *params){ 727 727 struct s_auth *account, *ptr; 728 char *user = getParam(params, "user"); 728 char *user;// = getParam(params, "user"); 729 730 if (strcmp(getParam(params, "action"), "Save As") == 0) { 731 user = getParam(params, "newuser"); 732 printf("%s\n",user); 733 } 734 else user = getParam(params, "user"); 735 729 736 int i, j; 730 737 … … 743 750 } 744 751 memset(account, 0, sizeof(struct s_auth)); 745 752 strncpy((char *)account->usr, user, sizeof(account->usr)-1); 746 753 account->au=(-1); 747 754 account->monlvl=cfg->mon_level; … … 752 759 account->ac_users=cfg->ac_users; 753 760 account->ac_penalty=cfg->ac_penalty; 754 761 account->ac_idx = account->ac_idx + 1; 755 762 #endif 756 763 tpl_addVar(vars, 1, "MESSAGE", "<b>New user has been added with default settings</b><BR>"); … … 761 768 } 762 769 763 if( strcmp(getParam(params, "action"), "execute") == 0){770 if((strcmp(getParam(params, "action"), "Save") == 0) || (strcmp(getParam(params, "action"), "Save As") == 0)){ 764 771 char servicelabels[255]=""; 765 772 //clear group -
branches/monitor-improvement/oscam-http.h
r1024 r1026 156 156 <form action=\"user_edit.html\" method=\"get\">\n\ 157 157 <input name=\"user\" type=\"hidden\" value=\"##USERNAME##\">\n\ 158 <input name=\"action\" type=\"hidden\" value=\"execute\">\n\159 158 <TABLE cellspacing=\"0\">\n\ 160 159 <TR>\n\ … … 228 227 ##TPLUSEREDITANTICASC##\ 229 228 <TR>\n\ 230 <TD > </TD>\n\231 <TD align=\" right\"><input type=\"submit\" value=\"Save Settings\" title=\"Save settingsand reload users\"></TD>\n\229 <TD align=\"center\"><input type=\"submit\" name=\"action\" value=\"Save\" title=\"Save settings and reload users\"></TD>\n\ 230 <TD align=\"center\"><input name=\"newuser\" type=\"text\" size=\"20\" maxlength=\"20\" title=\"Enter new username if you want to clone this user\"> <input type=\"submit\" name=\"action\" value=\"Save As\" title=\"Save as new user and reload users\"></TD>\n\ 232 231 </TR>\n\ 233 232 </TABLE>\n\
Note:
See TracChangeset
for help on using the changeset viewer.