$PBExportHeader$w_email_rev.srw forward global type w_email_rev from w_publ_base end type type cb_back from uo_imflatbutton within w_email_rev end type type cb_sendother from uo_imflatbutton within w_email_rev end type type cb_pageup from uo_imflatbutton within w_email_rev end type type cb_pagedown from uo_imflatbutton within w_email_rev end type type cb_del from uo_imflatbutton within w_email_rev end type type cb_print from uo_imflatbutton within w_email_rev end type type st_1 from statictext within w_email_rev end type type st_2 from statictext within w_email_rev end type type st_3 from statictext within w_email_rev end type type st_4 from statictext within w_email_rev end type type st_5 from statictext within w_email_rev end type type st_6 from statictext within w_email_rev end type type st_senduser from statictext within w_email_rev end type type st_mailuser from statictext within w_email_rev end type type st_revdate from statictext within w_email_rev end type type st_subject from statictext within w_email_rev end type type st_mailaddress from statictext within w_email_rev end type type st_sendaddress from statictext within w_email_rev end type type lv_fj from uo_email_lv within w_email_rev end type type ole_1 from olecustomcontrol within w_email_rev end type type ln_bar from line within w_email_rev end type type ln_bar2 from line within w_email_rev end type type r_bar from rectangle within w_email_rev end type type ln_1 from line within w_email_rev end type type ln_2 from line within w_email_rev end type end forward global type w_email_rev from w_publ_base integer width = 3611 integer height = 2380 string title = "已接收邮件" boolean maxbox = true cb_back cb_back cb_sendother cb_sendother cb_pageup cb_pageup cb_pagedown cb_pagedown cb_del cb_del cb_print cb_print st_1 st_1 st_2 st_2 st_3 st_3 st_4 st_4 st_5 st_5 st_6 st_6 st_senduser st_senduser st_mailuser st_mailuser st_revdate st_revdate st_subject st_subject st_mailaddress st_mailaddress st_sendaddress st_sendaddress lv_fj lv_fj ole_1 ole_1 ln_bar ln_bar ln_bar2 ln_bar2 r_bar r_bar ln_1 ln_1 ln_2 ln_2 end type global w_email_rev w_email_rev type variables //s_edit_index_tran s_tran //long cur_row //long all_row //long cur_revid[] string fjfilepathname = 'fjtemp' //Boolean have_text = false //Boolean have_html = false boolean have_fj = false //long cur_mailtype = 0 uo_email obj_email s_email_set cur_set s_email_send s_send transaction Commit_Tran // 帐号表所有数据库 transaction fj_tran // 邮件附件数据库 string C_Sys_admsg_fj = 'Sys_admsg_fj' string C_u_email_fj = 'u_email_fj' string C_from_file = 'from_file' end variables forward prototypes public function integer wf_retrieve (long arg_revid, ref string arg_msg) public function integer wf_sethtml (string arg_html) public subroutine wf_blob_runfj (ref blob arg_blob, string arg_filename) public subroutine wf_blob_saveas (ref blob arg_blob, string arg_filename) public function integer wf_admsg_getfjblob (long arg_fjid, ref blob arg_fjblob, ref string arg_msg) public function integer wf_mail_getfjblob (long arg_fjid, ref blob arg_fjblob, string arg_msg) public subroutine wf_pic () end prototypes public function integer wf_retrieve (long arg_revid, ref string arg_msg);int rslt = 1 ///////////////////////// if obj_email.uf_get_send(arg_revid, s_send, arg_msg) <> 1 then rslt = 0 goto ext end if st_senduser.text = s_send.senduser st_sendaddress.text = s_send.sendaddress if s_send.mailtype = '收件' then st_mailuser.text = cur_set.mailuser st_mailaddress.text = cur_set.mailaddress else st_mailuser.text = obj_email.wf_ds_getuser(arg_revid) st_mailaddress.text = obj_email.wf_ds_getaddress(arg_revid) end if st_revdate.Text = String(s_send.revdate,'YYYY-MM-DD HH:MM') st_subject.text = s_send.subject wf_sethtml(s_send.htmlbody) lv_fj.DeleteItems( ) s_email_lvfj s_lvfj[] ListViewItem l_lvi long i if obj_email.uf_get_fj(s_send.sendid, s_lvfj, arg_msg, false) <> 1 then rslt = 0 goto ext end if for i = 1 to UPPERBOUND(s_lvfj) l_lvi.PictureIndex = 1 l_lvi.Label = s_lvfj[i].Filename l_lvi.Data = s_lvfj[i] lv_fj.additem(l_lvi) next have_fj = (UPPERBOUND(s_lvfj) > 0) lv_fj.visible = have_fj wf_pic() ext: this.triggerevent('resize') return rslt //String ls_mailuser //String ls_mailaddress //String ls_senduser //String ls_sendaddress //DateTime ld_revdate //String ls_subject //Blob lb_html, lb_text //String ls_text //String ls_html //String Pathname // /////清空 //Pathname = sys_cur_path + 'temp.html' //IF FileExists(Pathname) THEN FileDelete(Pathname) //st_senduser.Text = '' //st_mailuser.Text = '' //st_mailaddress.Text = '' //st_senduser.Text = '' //st_sendaddress.Text = '' //st_revdate.Text = '' //st_subject.Text = '' //have_text = FALSE //have_html = FALSE ////tab_1.tabpage_1.mle_text.Text = '' ////tab_1.tabpage_2.ole_html.Object.navigate('about:blank') //////读取 //ole_1.object.navigate('about:blank') // //SELECT u_email_rev.mailaddress, // u_email_rev.Subject, // u_email_rev.senduser, // u_email_rev.sendaddress, // u_email_rev.revdate, // u_email_set.mailuser, // u_email_rev.textBody, // u_email_rev.mailtype // INTO :ls_mailaddress, // :ls_subject, // :ls_senduser, // :ls_sendaddress, // :ld_revdate, // :ls_mailuser, // :ls_text, // :cur_mailtype // FROM u_email_rev, // u_email_set // WHERE ( u_email_rev.mailID = u_email_set.mailID ) AND // ( u_email_rev.revid = :arg_revid ) ; //IF sqlca.SQLCode <> 0 THEN // arg_msg = '读取已收邮件失败'+sqlca.SQLErrText // rslt = 0 // GOTO ext //END IF // //IF cur_mailtype = 0 THEN // IF obj_email.f_read(arg_revid,arg_msg) = 0 THEN // rslt = 0 // GOTO ext // END IF //END IF // // //st_senduser.Text = ls_senduser //st_mailuser.Text = ls_mailuser //st_mailaddress.Text = ls_mailaddress //st_senduser.Text = ls_senduser //st_sendaddress.Text = ls_sendaddress //st_revdate.Text = String(ld_revdate,'YYYY-MM-DD HH:MM') //st_subject.Text = ls_subject // // //IF IsNull(ls_text) OR len(trim(ls_text)) <= 0 THEN // //ELSE //// tab_1.tabpage_1.mle_text.Text = ls_text // have_text = TRUE //END IF // ////// //select datalength(htmltext) INTO :ll_size //from u_email_rev //where ( u_email_rev.revid = :arg_revid ); //if sqlca.sqlcode <> 0 then // rslt = 0 // arg_msg = '获取网页正文大小失败>>'+sqlca.SQLErrText // GOTO ext //END IF // //if ll_size > 2048 then // SELECTBLOB htmltext // INTO :lb_html // FROM u_email_rev // Where ( u_email_rev.revid = :arg_revid ) ; // IF sqlca.SQLCode <> 0 THEN // rslt = 0 // arg_msg = '下载网页正文失败>>'+sqlca.SQLErrText // GOTO ext // END IF //else // SELECT htmltext // INTO :ls_html // FROM u_email_rev // Where ( u_email_rev.revid = :arg_revid ) ; // IF sqlca.SQLCode <> 0 THEN // rslt = 0 // arg_msg = '下载网页正文失败>>'+sqlca.SQLErrText // GOTO ext // END IF // lb_html = blob(ls_html) //end if // ////ls_html = String(lb_html) //IF IsNull(lb_html) OR len(trim(string(lb_html))) <= 0 THEN // //ELSE // have_html = TRUE // //// // // //// tab_1.tabpage_2.ole_html.Object.navigate('file:///' + Pathname) //END IF // // //if have_html then // IF f_blobtofile(Pathname,lb_html,arg_msg) = 0 THEN // rslt = 0 // GOTO ext // END IF // DO WHILE Pos(Pathname,'\',1) > 0 // Pathname = Replace(Pathname,Pos(Pathname,'\',1),1,'/') // LOOP // ole_1.object.navigate('file:///' + Pathname) //elseif have_text then // lb_text = blob(f_texttohtml(ls_text)) // IF f_blobtofile(Pathname,lb_text,arg_msg) = 0 THEN // rslt = 0 // GOTO ext // END IF // DO WHILE Pos(Pathname,'\',1) > 0 // Pathname = Replace(Pathname,Pos(Pathname,'\',1),1,'/') // LOOP // ole_1.object.navigate('file:///' + Pathname) //end if // ////附件列表 //lv_fj.DeleteItems( ) //Long count,ls_i //listviewitem l_lvi //s_email_lvfj s_lvfj[] // //SELECT count(*) // INTO :count // FROM u_email_fj // Where ( u_email_fj.relid = :arg_revid AND u_email_fj.fjtype = 1 ); //IF count > 0 THEN // lv_fj.Visible = TRUE // have_fj = TRUE //ELSE // lv_fj.Visible = FALSE // have_fj = FALSE // GOTO ext //END IF // //DECLARE fj_cur CURSOR FOR // SELECT fjid, // filename, // filesize, // filetype // FROM u_email_fj // Where ( u_email_fj.relid = :arg_revid AND u_email_fj.fjtype = 1); //OPEN fj_cur; // //count = 1 //FETCH fj_cur INTO :s_lvfj[count].fjid,& // :s_lvfj[count].filename,& // :s_lvfj[count].filesize,& // :s_lvfj[count].FileType; //DO WHILE sqlca.SQLCode = 0 // count++ // FETCH fj_cur INTO :s_lvfj[count].fjid,& // :s_lvfj[count].filename,& // :s_lvfj[count].filesize,& // :s_lvfj[count].FileType; //LOOP // //count = count - 1 //CLOSE fj_cur; // // //FOR ls_i = 1 TO count // l_lvi.PictureIndex = 1 // // l_lvi.Label = s_lvfj[ls_i].Filename // l_lvi.Data = s_lvfj[ls_i] // lv_fj.InsertItem(ls_i,l_lvi) //NEXT // //ext: ////IF have_text AND have_html THEN //// tab_1.SelectTab (1) //// tab_1.tabpage_1.Visible = TRUE //// tab_1.tabpage_1.Visible = TRUE //// tab_1.tabpage_1.mle_text.Visible = TRUE //// tab_1.tabpage_2.ole_html.Visible = TRUE //// ////ELSEIF NOT have_text AND have_html THEN //// tab_1.SelectTab (2) //// tab_1.tabpage_1.Visible = FALSE //// tab_1.tabpage_2.Visible = TRUE //// tab_1.tabpage_1.mle_text.Visible = FALSE //// tab_1.tabpage_2.ole_html.Visible = TRUE //// ////ELSEIF have_text AND NOT have_html THEN //// tab_1.tabpage_1.Visible = TRUE //// tab_1.tabpage_2.Visible = FALSE //// tab_1.tabpage_1.mle_text.Visible = TRUE //// tab_1.tabpage_2.ole_html.Visible = FALSE //// tab_1.SelectTab (1) ////END IF // //lv_fj.Visible = have_fj // //THIS.TriggerEvent(Resize!) // // RETURN rslt end function public function integer wf_sethtml (string arg_html);do while isnull(ole_1.object.document.body) yield() loop //if isnull(ole_web.object.document.body) then // return 0 //end if if isnull(arg_html) then arg_html = '' ole_1.object.document.body.innerhtml = arg_html return 1 end function public subroutine wf_blob_runfj (ref blob arg_blob, string arg_filename);int rslt = 1 string ls_pathname string errmsg string lsNull setnull(lsNull) ls_pathname = sys_cur_path+fjfilepathname+'\'+arg_filename IF FileExists(ls_pathname) THEN FileDelete(ls_pathname) IF f_blobtofile(ls_pathname,arg_blob,errmsg) = 0 THEN rslt = 0 GOTO ext END IF //打开附件 ShellExecute32( Handle(THIS), lsNull, ls_pathname, lsNull, lsNull, 1 ) ext: IF rslt = 0 THEN MessageBox('系统提示',errmsg) END IF end subroutine public subroutine wf_blob_saveas (ref blob arg_blob, string arg_filename);long pos1, i string ls_filetypename string ls_filename string errmsg pos1 = Pos(arg_filename,'.',1) IF pos1 > 0 THEN ls_filetypename = Mid(arg_filename,pos1 + 1, len(arg_filename)) i = GetFileSaveName("另存为",arg_filename,ls_filename,"*","*."+ls_filetypename+",*."+ls_filetypename) ELSE ls_filetypename = '' i = GetFileSaveName("另存为",arg_filename,ls_filename,"*","*.*,*.*") END IF IF i = 1 AND Trim(arg_filename) <> '' THEN IF f_blobtofile(arg_filename,arg_blob,errmsg) = 0 THEN MessageBox('系统提示',errmsg) RETURN ELSE MessageBox('系统提示','附件保存成功!'+'~r~n'+'保存路径:'+arg_filename) END IF END IF end subroutine public function integer wf_admsg_getfjblob (long arg_fjid, ref blob arg_fjblob, ref string arg_msg);int rslt = 1 SELECTBLOB fileblob INTO :arg_fjblob FROM Sys_admsg_fj WHERE fjid = :arg_fjid using Commit_Tran; if Commit_Tran.sqlcode <> 0 then rslt = 0 arg_msg = '获取内部消息附件失败,' + Commit_Tran.sqlerrtext goto ext end if ext: return rslt end function public function integer wf_mail_getfjblob (long arg_fjid, ref blob arg_fjblob, string arg_msg);int rslt = 1 SELECTBLOB fileblob INTO :arg_fjblob FROM u_email_fj WHERE fjid = :arg_fjid using fj_tran; if fj_tran.sqlcode <> 0 then rslt = 0 arg_msg = '获取附件失败,' + fj_tran.sqlerrtext goto ext end if ext: return rslt end function public subroutine wf_pic ();oleobject images images = ole_1.Object.document.images Long ll_cnt ll_cnt = images.Length Long i,j oleobject lo String ls_url String ls_cid ListViewItem lvi s_email_lvfj lvfj Blob lb String ls_msg Boolean findpic = False String ls_filename FOR i = 0 To ll_cnt - 1 lo = images.Item(i) ls_url = lo.getAttribute("src") IF Lower(Mid(ls_url, 1, 4)) = 'cid:' THEN ls_cid = Mid(ls_url, 5) SetNull(lb) findpic = False FOR j = 1 To lv_fj.TotalItems() IF lv_fj.GetItem(j, lvi) = 1 THEN lvfj = lvi.Data IF lvfj.Filename <> ls_cid and lvfj.cid <> ls_cid THEN CONTINUE IF lvfj.FileType = C_Sys_admsg_fj THEN IF wf_admsg_getfjblob(lvfj.fjid, lb, ls_msg) <> 1 THEN EXIT END IF findpic = True ls_filename = lvfj.Filename ELSEIF lvfj.FileType = C_u_email_fj or lvfj.FileType = "" THEN IF wf_mail_getfjblob(lvfj.fjid, lb, ls_msg) <> 1 THEN EXIT END IF findpic = True ls_filename = lvfj.Filename END IF EXIT END IF NEXT IF findpic THEN ls_filename = sys_cur_path+fjfilepathname+'\'+ls_filename IF FileExists(ls_filename) THEN FileDelete(ls_filename) IF f_blobtofile(ls_filename,lb,ls_msg) = 0 THEN CONTINUE END IF lo.setAttribute("src", "file:///" + ls_filename) END IF END IF NEXT end subroutine on w_email_rev.create int iCurrent call super::create this.cb_back=create cb_back this.cb_sendother=create cb_sendother this.cb_pageup=create cb_pageup this.cb_pagedown=create cb_pagedown this.cb_del=create cb_del this.cb_print=create cb_print this.st_1=create st_1 this.st_2=create st_2 this.st_3=create st_3 this.st_4=create st_4 this.st_5=create st_5 this.st_6=create st_6 this.st_senduser=create st_senduser this.st_mailuser=create st_mailuser this.st_revdate=create st_revdate this.st_subject=create st_subject this.st_mailaddress=create st_mailaddress this.st_sendaddress=create st_sendaddress this.lv_fj=create lv_fj this.ole_1=create ole_1 this.ln_bar=create ln_bar this.ln_bar2=create ln_bar2 this.r_bar=create r_bar this.ln_1=create ln_1 this.ln_2=create ln_2 iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.cb_back this.Control[iCurrent+2]=this.cb_sendother this.Control[iCurrent+3]=this.cb_pageup this.Control[iCurrent+4]=this.cb_pagedown this.Control[iCurrent+5]=this.cb_del this.Control[iCurrent+6]=this.cb_print this.Control[iCurrent+7]=this.st_1 this.Control[iCurrent+8]=this.st_2 this.Control[iCurrent+9]=this.st_3 this.Control[iCurrent+10]=this.st_4 this.Control[iCurrent+11]=this.st_5 this.Control[iCurrent+12]=this.st_6 this.Control[iCurrent+13]=this.st_senduser this.Control[iCurrent+14]=this.st_mailuser this.Control[iCurrent+15]=this.st_revdate this.Control[iCurrent+16]=this.st_subject this.Control[iCurrent+17]=this.st_mailaddress this.Control[iCurrent+18]=this.st_sendaddress this.Control[iCurrent+19]=this.lv_fj this.Control[iCurrent+20]=this.ole_1 this.Control[iCurrent+21]=this.ln_bar this.Control[iCurrent+22]=this.ln_bar2 this.Control[iCurrent+23]=this.r_bar this.Control[iCurrent+24]=this.ln_1 this.Control[iCurrent+25]=this.ln_2 end on on w_email_rev.destroy call super::destroy destroy(this.cb_back) destroy(this.cb_sendother) destroy(this.cb_pageup) destroy(this.cb_pagedown) destroy(this.cb_del) destroy(this.cb_print) destroy(this.st_1) destroy(this.st_2) destroy(this.st_3) destroy(this.st_4) destroy(this.st_5) destroy(this.st_6) destroy(this.st_senduser) destroy(this.st_mailuser) destroy(this.st_revdate) destroy(this.st_subject) destroy(this.st_mailaddress) destroy(this.st_sendaddress) destroy(this.lv_fj) destroy(this.ole_1) destroy(this.ln_bar) destroy(this.ln_bar2) destroy(this.r_bar) destroy(this.ln_1) destroy(this.ln_2) end on event resize;call super::resize;ln_bar.EndX = THIS.Width ln_bar2.EndX = THIS.Width ln_1.EndX = THIS.Width ln_2.EndX = THIS.Width r_bar.Width = THIS.Width Long w_width,w_height w_width = 3602 w_height = 2300 IF newwidth < w_width THEN THIS.Width = w_width IF newheight < w_height THEN THIS.Height = w_height ole_1.Width = THIS.Width - 50 lv_fj.Width = ole_1.Width //ole_1.tabpage_1.mle_text.Width = ole_1.Width - 20 //ole_1.tabpage_2.ole_html.Width = ole_1.Width - 20 IF have_fj THEN ole_1.Height = THIS.Height - ole_1.Y - lv_fj.Height - 150 lv_fj.Visible = TRUE ELSE ole_1.Height = THIS.Height - ole_1.Y - 150 lv_fj.Visible = FALSE END IF lv_fj.y = ole_1.Y + ole_1.Height+ 5 //ole_1.tabpage_1.mle_text.Height = ole_1.Height - 100 //ole_1.tabpage_2.ole_html.Height = ole_1.Height - 100 end event event open;call super::open;Int rslt = 1 String arg_msg Int li_ifexit = 0 commit_tran = sqlca Long ll_ConnectionID IF sys_email_sqlca.DBHandle() > 0 THEN fj_tran = sys_email_sqlca ELSE MessageBox('系统提示','要使用邮件功能,请先定义邮件数据库') li_ifexit = 1 END IF IF li_ifexit = 0 THEN obj_email = CREATE uo_email obj_email.commit_tran = commit_tran obj_email.fj_tran = fj_tran cur_set = Message.PowerObjectParm IF cur_set.title<> "" THEN THIS.title=cur_set.title END IF IF cur_set.sendid <= 0 THEN rslt = 0 arg_msg = '非法唯一码' GOTO ext END IF IF wf_retrieve(cur_set.sendid, arg_msg) = 0 THEN rslt = 0 GOTO ext END IF ext: IF rslt = 0 THEN MessageBox('错误', arg_msg, stopsign!) cb_exit.PostEvent(Clicked!) END IF ELSE cb_exit.PostEvent(Clicked!) END IF end event event close;call super::close;destroy obj_email end event type cb_func from w_publ_base`cb_func within w_email_rev boolean visible = false integer x = 1426 integer width = 151 integer height = 164 end type type cb_exit from w_publ_base`cb_exit within w_email_rev integer x = 1033 integer width = 165 integer height = 164 integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type type cb_back from uo_imflatbutton within w_email_rev integer width = 165 integer height = 164 integer taborder = 20 boolean bringtotop = true string text = "回复" string normalpicname = "email_view4.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;s_email_set s_parm s_parm.mailid = cur_set.mailid s_parm.mailuser = cur_set.mailuser s_parm.mailaddress = cur_set.mailaddress s_parm.flag = 1 s_parm.revuser = st_mailuser.Text s_parm.revaddress = st_mailaddress.Text s_parm.relid = 0 s_parm.reltype = 3 s_parm.id=cur_set.sendid OpenWithParm(w_email_send_new,s_parm) end event type cb_sendother from uo_imflatbutton within w_email_rev integer x = 165 integer width = 165 integer height = 164 integer taborder = 30 boolean bringtotop = true string text = "转发" string normalpicname = "email_view5.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked; s_email_set s_parm s_parm.mailid = cur_set.mailid s_parm.mailuser = cur_set.mailuser s_parm.mailaddress = cur_set.mailaddress s_parm.flag = 2 s_parm.reltype = 0 s_parm.relid = s_send.sendid s_parm.title = s_send.subject s_parm.htmlbody = s_send.htmlbody s_parm.id=cur_set.sendid OpenWithParm(w_email_send_new,s_parm) end event type cb_pageup from uo_imflatbutton within w_email_rev integer x = 329 integer width = 187 integer height = 164 integer taborder = 40 boolean bringtotop = true string text = "前一封" string normalpicname = "p1.ICO" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;string ls_msg IF cur_set.cur = 1 THEN MessageBox('提示','当前邮件已经是第一封邮件!', Information!, OK! ) RETURN END IF cur_set.cur = cur_set.cur - 1 IF wf_retrieve(cur_set.arr[cur_set.cur],ls_msg) = 0 THEN MessageBox('错误',ls_msg,stopsign!,OK!) RETURN END IF end event type cb_pagedown from uo_imflatbutton within w_email_rev integer x = 517 integer width = 187 integer height = 164 integer taborder = 30 boolean bringtotop = true string text = "后一封" string normalpicname = "p4.ICO" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;string ls_msg IF cur_set.cur = UPPERBOUND(cur_set.arr) THEN MessageBox('提示','当前邮件已经是最后一封邮件!', Information!, OK! ) RETURN END IF cur_set.cur = cur_set.cur + 1 IF wf_retrieve(cur_set.arr[cur_set.cur],ls_msg) = 0 THEN MessageBox('错误',ls_msg,stopsign!,OK!) RETURN END IF end event type cb_del from uo_imflatbutton within w_email_rev integer x = 704 integer width = 165 integer height = 164 integer taborder = 40 boolean bringtotop = true string text = "删除" string normalpicname = "email_view6.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;IF MessageBox ("询问","是否确定要删除当前邮件吗",Question!,YesNo! ) = 2 THEN RETURN String ls_msg IF obj_email.f_del_move_msg(s_send.sendid ,ls_msg) = 0 THEN MessageBox('错误',ls_msg, StopSign!, OK! ) RETURN ELSE MessageBox('提示','删除邮件成功') END IF if UPPERBOUND(cur_set.arr) = 1 then Close(parent) end if long i long j = 0 long arr[] for i = 1 to UPPERBOUND(cur_set.arr) if i <> cur_set.cur then j++ arr[j] = cur_set.arr[i] end if next if cur_set.cur = UPPERBOUND(cur_set.arr) then cur_set.cur = cur_set.cur - 1 end if cur_set.arr = arr IF wf_retrieve(cur_set.arr[cur_set.cur],ls_msg) = 0 THEN MessageBox('错误',ls_msg,StopSign!,OK!) RETURN END IF // // //Long i //IF cur_row <> all_row THEN // FOR i = cur_row + 1 TO all_row // cur_revid[cur_row] = cur_revid[cur_row + 1] // NEXT //END IF // //all_row = all_row - 1 // //Boolean Find = TRUE //IF cur_row - 1 = 0 THEN // IF cur_row = all_row THEN // GOTO ext // ELSE // cur_row = cur_row + 1 // END IF //ELSE // cur_row = cur_row - 1 //END IF // // //ext: //IF Find THEN // IF wf_retrieve(cur_revid[cur_row],ls_msg) = 0 THEN // MessageBox('错误',ls_msg,StopSign!,OK!) // RETURN // END IF //ELSE // Close(PARENT) //END IF // // end event type cb_print from uo_imflatbutton within w_email_rev integer x = 869 integer width = 165 integer height = 164 integer taborder = 50 boolean bringtotop = true string text = "打印" string normalpicname = "print.BMP" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type type st_1 from statictext within w_email_rev integer x = 14 integer y = 208 integer width = 229 integer height = 48 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 string text = "发件人:" alignment alignment = right! boolean focusrectangle = false end type type st_2 from statictext within w_email_rev integer x = 1303 integer y = 208 integer width = 338 integer height = 56 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 string text = "发件人地址:" boolean focusrectangle = false end type type st_3 from statictext within w_email_rev integer x = 14 integer y = 288 integer width = 229 integer height = 48 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 string text = "收件人:" alignment alignment = right! boolean focusrectangle = false end type type st_4 from statictext within w_email_rev integer x = 1303 integer y = 288 integer width = 338 integer height = 56 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 string text = "收件人地址:" boolean focusrectangle = false end type type st_5 from statictext within w_email_rev integer x = 14 integer y = 384 integer width = 229 integer height = 56 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 string text = "日期:" alignment alignment = right! boolean focusrectangle = false end type type st_6 from statictext within w_email_rev integer x = 14 integer y = 472 integer width = 229 integer height = 56 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 string text = "主题:" alignment alignment = right! boolean focusrectangle = false end type type st_senduser from statictext within w_email_rev integer x = 256 integer y = 208 integer width = 992 integer height = 48 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 string text = "none" boolean focusrectangle = false end type type st_mailuser from statictext within w_email_rev integer x = 256 integer y = 288 integer width = 992 integer height = 48 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 string text = "none" boolean focusrectangle = false end type type st_revdate from statictext within w_email_rev integer x = 256 integer y = 384 integer width = 992 integer height = 48 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 string text = "none" boolean focusrectangle = false end type type st_subject from statictext within w_email_rev integer x = 256 integer y = 472 integer width = 3323 integer height = 48 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 string text = "none" boolean focusrectangle = false end type type st_mailaddress from statictext within w_email_rev integer x = 1632 integer y = 288 integer width = 1957 integer height = 48 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 string text = "none" boolean focusrectangle = false end type type st_sendaddress from statictext within w_email_rev integer x = 1632 integer y = 208 integer width = 1957 integer height = 48 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 string text = "none" boolean focusrectangle = false end type type lv_fj from uo_email_lv within w_email_rev integer y = 2048 integer width = 3086 integer height = 228 integer taborder = 30 boolean bringtotop = true string smallpicturename[] = {"p15drive_fdd.ico"} end type event doubleclicked; ListViewItem lvi s_email_lvfj lvfj blob lb string ls_msg if ins_index > 0 then if lv_fj.GetItem(ins_index, lvi) = 1 then lvfj = lvi.data if lvfj.filetype = C_u_email_fj then if obj_email.wf_mail_getfjblob(lvfj.fjid, lb, ls_msg) <> 1 then MessageBox('错误', ls_msg, stopsign!) return end if else return end if wf_blob_runfj(lb, lvfj.filename) end if end if //if cur_set.mailid > 0 then // call super::doubleclicked //else // 内部消息 // // //附件下载并打开 // String lsNull // setnull(lsNull) // integer rslt = 1 // string errmsg, ls_pathname // listviewitem l_lvi // s_email_lvfj s_lvfj // IF this.ins_index > 0 THEN // THIS.GetItem( this.ins_index, l_lvi) // s_lvfj = l_lvi.Data // this.ins_cur_fjid = s_lvfj.fjid // this.ins_cur_fjname = l_lvi.Label // IF this.ins_cur_fjname = '' THEN GOTO ext // ELSE // GOTO ext // END IF // //下载附件并打开 // ls_pathname = sys_cur_path+this.fjfilepathname+'\'+this.ins_cur_fjname // IF FileExists(ls_pathname) THEN FileDelete(ls_pathname) // IF this.ins_cur_fjid > 0 THEN // selectblob fileblob INTO :this.ls_filedata // from Sys_admsg_fj // where fjid = :this.ins_cur_fjid; // if sqlca.sqlcode <> 0 then // rslt = 0 // errmsg = '下载附件失败' // goto ext // end if // ELSE // this.ls_filedata = s_lvfj.fileblob // END IF // // IF f_blobtofile(ls_pathname,this.ls_filedata,errmsg) = 0 THEN // rslt = 0 // GOTO ext // END IF // // //打开附件 // ShellExecute32( Handle(THIS), lsNull, ls_pathname, lsNull, lsNull, 1 ) // // ext: // IF rslt = 0 THEN // MessageBox('系统提示',errmsg) // END IF // // // //end if end event event ue_saveas; ListViewItem lvi s_email_lvfj lvfj blob lb string ls_msg if ins_index > 0 then if lv_fj.GetItem(ins_index, lvi) = 1 then lvfj = lvi.data if lvfj.filetype = C_u_email_fj then if obj_email.wf_mail_getfjblob(lvfj.fjid, lb, ls_msg) <> 1 then MessageBox('错误', ls_msg, stopsign!) return end if else return end if wf_blob_saveas(lb, lvfj.filename) end if end if //if cur_set.mailid > 0 then // call super::ue_saveas// tv_fj.ue_saveas //else // // //附件另存为 // Integer i // Long ls_i,ls_j,ls_newrow,ls_filesize // String ls_Pathname,ls_filename // String errmsg,arg_msg // String ls_filetypename // Long pos1,lrow,rslt // String ls_para,ls_downarg[] // ls_Pathname = this.ins_cur_fjname // // //************************************************************* // // pos1 = Pos(this.ins_cur_fjname,'.',1) // IF pos1 > 0 THEN // ls_filetypename = Mid(this.ins_cur_fjname,pos1 + 1) // i = GetFileSaveName("另存为",ls_Pathname,ls_filename,"*","*."+ls_filetypename+",*."+ls_filetypename) // ELSE // ls_filetypename = '' // i = GetFileSaveName("另存为",ls_Pathname,ls_filename,"*","*.*,*.*") // END IF // // IF i = 1 AND Trim(ls_Pathname) <> '' THEN // selectblob fileblob INTO :ls_filedata // from Sys_admsg_fj // where fjid = :this.ins_cur_fjid; // if sqlca.sqlcode <> 0 then // MessageBox('系统提示', '下载附件失败') // return // end if // // IF f_blobtofile(ls_Pathname,ls_filedata,errmsg) = 0 THEN // MessageBox('系统提示',errmsg) // RETURN // ELSE // // MessageBox('系统提示','附件保存成功!'+'~r~n'+'保存路径:'+ls_Pathname) // END IF // END IF // // // // //end if end event type ole_1 from olecustomcontrol within w_email_rev event statustextchange ( string text ) event progresschange ( long progress, long progressmax ) event commandstatechange ( long command, boolean enable ) event downloadbegin ( ) event downloadcomplete ( ) event titlechange ( string text ) event propertychange ( string szproperty ) event beforenavigate2 ( oleobject pdisp, any url, any flags, any targetframename, any postdata, any headers, ref boolean cancel1 ) event newwindow2 ( ref oleobject ppdisp, ref boolean cancel1 ) event navigatecomplete2 ( oleobject pdisp, any url ) event documentcomplete ( oleobject pdisp, any url ) event onquit ( ) event onvisible ( boolean ocx_visible ) event ontoolbar ( boolean toolbar ) event onmenubar ( boolean menubar ) event onstatusbar ( boolean statusbar ) event onfullscreen ( boolean fullscreen ) event ontheatermode ( boolean theatermode ) event windowsetresizable ( boolean resizable1 ) event windowsetleft ( long left ) event windowsettop ( long top ) event windowsetwidth ( long ocx_width ) event windowsetheight ( long ocx_height ) event windowclosing ( boolean ischildwindow, ref boolean cancel1 ) event clienttohostwindow ( ref long cx, ref long cy ) event setsecurelockicon ( long securelockicon ) event filedownload ( ref boolean cancel1 ) event navigateerror ( oleobject pdisp, any url, any frame, any statuscode, ref boolean cancel1 ) event printtemplateinstantiation ( oleobject pdisp ) event printtemplateteardown ( oleobject pdisp ) event updatepagestatus ( oleobject pdisp, any npage, any fdone ) event privacyimpactedstatechange ( boolean bimpacted ) integer y = 556 integer width = 3067 integer height = 1488 integer taborder = 40 boolean bringtotop = true borderstyle borderstyle = stylelowered! boolean focusrectangle = false string binarykey = "w_email_rev.win" integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 end type event constructor;this.object.navigate('about:blank') end event type ln_bar from line within w_email_rev long linecolor = 268435456 integer linethickness = 4 integer beginy = 172 integer endx = 3200 integer endy = 172 end type type ln_bar2 from line within w_email_rev long linecolor = 16777215 integer linethickness = 4 integer beginx = 14 integer beginy = 176 integer endx = 3278 integer endy = 176 end type type r_bar from rectangle within w_email_rev long linecolor = 16777215 integer linethickness = 4 long fillcolor = 1073741824 integer x = 3351 integer width = 87 integer height = 68 end type event constructor;this.fillcolor = 14215660 this.linecolor = 14215660 this.x = -1 this.y = -1 this.height = ln_bar.beginy - 5 end event type ln_1 from line within w_email_rev long linecolor = 268435456 integer linethickness = 4 integer beginy = 548 integer endx = 3250 integer endy = 548 end type type ln_2 from line within w_email_rev long linecolor = 16777215 integer linethickness = 4 integer beginy = 552 integer endx = 3282 integer endy = 552 end type Start of PowerBuilder Binary Data Section : Do NOT Edit 01w_email_rev.bin 2300000a00e011cfd0e11ab1a1000000000000000000000000000000000003003e0009fffe000000060000000000000000000000010000000100000000000010000000000200000001fffffffe0000000000000000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdfffffffefffffffefffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff006f00520074006f004500200074006e00790072000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000050016ffffffffffffffff000000010000000000000000000000000000000000000000000000000000000040f375a001cea5f900000003000001800000000000500003004f0042005800430054005300450052004d0041000000000000000000000000000000000000000000000000000000000000000000000000000000000102001affffffff00000002ffffffff000000000000000000000000000000000000000000000000000000000000000000000000000000000000009c00000000004200500043004f00530058004f00540041005200450047000000000000000000000000000000000000000000000000000000000000000000000000000000000001001affffffffffffffff000000038856f96111d0340ac0006ba9a205d74f0000000040f375a001cea5f940f375a001cea5f9000000000000000000000000004f00430054004e004e00450053005400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001020012ffffffffffffffffffffffff000000000000000000000000000000000000000000000000000000000000000000000000000000030000009c000000000000000100000002fffffffe0000000400000005fffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 25ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000004c0000455a000026730000000000000000000000000000000000000000000000000000004c0000000000000000000000010057d0e011cf3573000869ae62122e2b00000008000000000000004c0002140100000000000000c046000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000002b0068006a0066006900660065006c00610070006800740061006e0065006d0027002b0000004c0000455a000026730000000000000000000000000000000000000000000000000000004c0000000000000000000000010057d0e011cf3573000869ae62122e2b00000008000000000000004c0002140100000000000000c04600000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000090009000a000d000900090049000900200046005f0066006c00620062006f006f0074006900660065006c006c0028005f0073006900660065006c0061006e0065006d006c002c002c00620073006c006d005f00670073002000290020003d0020003000480054004e0045000a000d0009000900090009004f00430054004e004e004900450055000a000d00090009004500090044004e00490020000d00460009000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 11w_email_rev.bin End of PowerBuilder Binary Data Section : No Source Expected After This Point