程序中添加动态用户密码
生活随笔
收集整理的這篇文章主要介紹了
程序中添加动态用户密码
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
程序中往往會設置一個超級管理員工號,而這個工號是不寫入數據庫,直接編譯在程序中,
這樣做的目的一是為了方便了。
思路很簡單:添加sa,密碼為系統當前日期的月*日,然后在加上一常數888888。
如果輸入密碼正確,直接跳轉到用戶與密碼判斷語句之后。
?1string?ls_pass,ls_s1,ls_s2;
?2int?month_m,month_d,li_a,li_p;
?3month_m=month(today());
?4month_d=day(today());
?5ls_s1=right(string(month_m),1);
?6ls_s2=right(string(month_d),1);
?7ls_pass?=?string(month_m*month_d+888888);???//密碼的生成
?8li_a?=?len(sle_code.text);
?9li_p?=?len(sle_pass.text);?
10?//apptemp.opercode與apptemp.operpass?為輸入值?
11if?apptemp.opercode?=?'sa'?and?apptemp.operpass?=?ls_pass
12{???????
13???????apptemp.opername?=?"管理員";
14????????goto?ok?;????//直接跳轉判斷語句之后
15?}
這樣做的目的一是為了方便了。
思路很簡單:添加sa,密碼為系統當前日期的月*日,然后在加上一常數888888。
如果輸入密碼正確,直接跳轉到用戶與密碼判斷語句之后。
?1string?ls_pass,ls_s1,ls_s2;
?2int?month_m,month_d,li_a,li_p;
?3month_m=month(today());
?4month_d=day(today());
?5ls_s1=right(string(month_m),1);
?6ls_s2=right(string(month_d),1);
?7ls_pass?=?string(month_m*month_d+888888);???//密碼的生成
?8li_a?=?len(sle_code.text);
?9li_p?=?len(sle_pass.text);?
10?//apptemp.opercode與apptemp.operpass?為輸入值?
11if?apptemp.opercode?=?'sa'?and?apptemp.operpass?=?ls_pass
12{???????
13???????apptemp.opername?=?"管理員";
14????????goto?ok?;????//直接跳轉判斷語句之后
15?}
轉載于:https://www.cnblogs.com/zjy/archive/2006/05/21/405437.html
總結
以上是生活随笔為你收集整理的程序中添加动态用户密码的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 今天修改了数据库结构,XSD文件都要重新
- 下一篇: Atlas, AJAX