string ls_serial = ""
string ls_newserial
string ls_incname
string ls_temp
string ls_temp1 = ""
string ls_temp2
string ls_delayday
integer li_num
integer li_ifor
integer li_worknum
integer li_acsnum
long li_pass
long li_dognumber
string ls_versionid
string ls_inc_id
string ls_inc_name
string ls_setup_date
string ls_database_date
string ls_other01
string ls_other02
string ls_other03
string ls_other04
string ls_other05
string ls_other06
string ls_other07
string ls_other08
string ls_sourcekey = "SOFTLYSOFT"
string ls_worknum
double ld_dognum
string ls_delay1
string ls_delay2
nvo_ez_md5 nuo_fun
nvo_hd_register nov_register
ls_serial = ls_serial + trim(tab_1.tabpage_1.sle_r1.text)
ls_serial = ls_serial + trim(tab_1.tabpage_1.sle_r2.text)
ls_serial = ls_serial + trim(tab_1.tabpage_1.sle_r3.text)
ls_serial = ls_serial + trim(tab_1.tabpage_1.sle_r4.text)
ls_serial = ls_serial + trim(tab_1.tabpage_1.sle_r5.text)
if len(ls_serial) <> 25 then
return -1
end if
ls_temp2 = mid(ls_serial,2,23)
for li_ifor = 1 to 12 step 1
ls_temp1 = ls_temp1 + mid(ls_temp2,li_ifor,1) + mid(ls_temp2,li_ifor + 12,1)
next
ls_incname = trim(tab_1.tabpage_1.sle_inc.text)
li_num = len(ls_incname)
if li_num > 100 then
f_mess("公司名称过长,请重新输入")
return -1
end if
li_pass = g_fun_var.yyyyyy6(ls_incname,7)
nov_register = create nvo_hd_register
li_dognumber = nov_register.uf_get_dognumber(true)
if li_dognumber <= 0 then
destroy(nov_register)
return -1
end if
li_acsnum = nov_register.uf_get_regtype()
if li_acsnum <= 0 then
destroy(nov_register)
return -1
end if
destroy(nov_register)
li_worknum = (75084 - long(mid(ls_temp1,15,5))) / 255
if li_worknum <= 0 then
f_mess("注册码输入有误请检查!")
return -1
end if
ls_worknum = string(255 ^ 2 - 255 * li_worknum,"00000")
if not g_fun_var.yyyyyy4(ls_worknum) then
f_mess_err("注册码输入有误请检查!")
return -1
end if
select isnull ( count ( j# ) , 0 ) from sys_zd using sqlca;
/* SQL Parameters List
0-> :li_num
*/
li_num = f_num_isnull(li_num)
if li_worknum < li_num then
g_fun_var.ii_worknum = li_worknum
f_mess("现有站点数比注册的站点数多请先注销部分工作站!")
openwithparm(w_mach_init,"1")
return -1
end if
ls_delayday = string((long(left(trim(ls_temp1),4)) - 1028) / 9)
if ((integer(ls_delayday) < 0) or (integer(ls_delayday) >= 1000)) then
f_mess("注册码输入有误请检查!")
return -1
end if
ld_dognum = double(li_dognumber) ^ 2
ls_temp1 = g_fun_var.encrystrhexex(string(ld_dognum,"0000000000"),ls_sourcekey)
ls_delay1 = string(long(ls_delayday) * 9 + 1028,"0000")
ls_delay2 = string(long(ls_delayday) * 7 + 2583,"0000")
ls_worknum = string(75084 - 255 * li_worknum,"00000")
ls_newserial = ls_delay1 + string(g_fun_var.yyyyyy6(mid(ls_temp1,1,16),li_acsnum),"00000") + string(g_fun_var.yyyyyy6(mid(ls_temp1,17,16),li_acsnum),"00000") + ls_worknum + ls_delay2
ls_temp1 = ""
ls_temp2 = ""
li_num = len(ls_newserial)
for li_ifor = 1 to li_num step 2
ls_temp1 = ls_temp1 + mid(ls_newserial,li_ifor,1)
ls_temp2 = ls_temp2 + mid(ls_newserial,li_ifor + 1,1)
next
ls_newserial = ls_temp1 + ls_temp2
ls_newserial = g_fun_var.uf_getother(left(ls_newserial,12)) + ls_newserial + g_fun_var.uf_getother(right(ls_newserial,12))
if ls_newserial = ls_serial then
ls_other01 = g_fun_var.wf_reg_source(string(integer(ls_delayday)),ls_sourcekey)
ls_other02 = g_fun_var.uf_register("SYSOFT",ls_sourcekey)
ls_other03 = g_fun_var.encrystrhexex(string(today(),"yyyy-mm-dd"),ls_sourcekey)
ls_other04 = nuo_fun.of_compute(string(today(),"yyyy-mm-dd"))
ls_other05 = g_fun_var.wf_reg_source(string(li_dognumber),ls_sourcekey)
ls_temp = string(g_fun_var.getnum4())
ls_other06 = g_fun_var.wf_reg_source(ls_temp,ls_sourcekey)
ls_other07 = nuo_fun.of_compute(ls_temp)
ls_database_date = g_fun_var.encrystrhexex(ls_delayday,string(li_dognumber))
ls_inc_id = string(li_pass)
ls_other08 = g_fun_var.encrystrhexex(ls_incname,ls_sourcekey)
update sys_manager Set setup_date =' ' , other01 =' ' , other02 =' ' , other03 =' ' , other04 =' ' , other05 =' ' , other06 =' ' , other07 =' ' , other08 =' ' , inc_id =' ' , inc_name =' ' using sqlca;
/* SQL Parameters List
0-> :ls_other03
1-> :ls_other01
2-> :ls_other02
3-> :ls_other03
4-> :ls_other04
5-> :ls_other05
6-> :ls_other06
7-> :ls_other07
8-> :ls_other08
9-> :ls_inc_id
10-> :ls_incname
*/
if sqlca.sqlcode = 0 then
commit using sqlca;
else
f_mess("注册失败:" + sqlca.sqlerrtext)
rollback using sqlca;
return -1
end if
g_jfm = trim(tab_1.tabpage_1.sle_inc.text)
update sys_hs_info set mc =' ' , hw# =0 , other04 =' ' Where bx# =20000 using sqlca;
/* SQL Parameters List
0-> :g_jfm
1-> :li_pass
2-> :ls_database_date
*/
commit using sqlca;
is_openpara = "1"
g_fun_var.ib_registered = true
g_fun_var.ii_worknum = li_worknum
if isvalid(w_m_mdi) then
w_m_mdi.title = g_fun_var.gs_apptitle + g_fun_var.gs_version + "[" + g_jfm + "]"
end if
setprofilestring(gs_path + "\" + gs_oemfile,"公司信息","公司名称",g_jfm)
setprofilestring(gs_path + "\" + gs_oemfile,"公司信息","公司简称",g_jfm)
f_mess("注册成功!~r谢谢您使用本软件!")
return 1
else
f_mess_err("注册码输入有误请检查!")
return -1
end if
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!