




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、using system;using system.collections.generic;using system.web;using system.web.ui;using system.web.ui.webcontrols;using templatehelper;public partial class template_dabao_admin_addgoods : system.web.ui.page public string picpath = null; public string discription = "" aproductdal pdal = ne
2、w aproductdal(); private void getdropdownlist() system.data.datatable dt = pdal.getdropdownlist(); this.goodstypelist.datasource = dt; this.goodstypelist.datatextfield = "title" this.goodstypelist.datavaluefield = "identid" this.goodstypelist.databind(); private void initial() ge
3、tdropdownlist(); this.pid.value = request.querystring"id" this.ac.value = request.querystring"ac" protected void addgoods(object sender, eventargs e) try string _localsavedir = "/kindeditor/attached/image/" + server.urldecode(request.cookies"jianzhan""nam
4、e") + "/" string _phylocalsavedir = server.mappath(_localsavedir); int result = 0; product pmodel = new product(); pmodel.name = common.filter(this.title.value); pmodel.pic = common.filter(request.form"pic"); pmodel.content =getremotecontent(input.filter(request.form"di
5、scription"), _localsavedir, _phylocalsavedir, "", true); pmodel.price = common.filter(this.price.value); pmodel.goodstypeid = common.filter(this.goodstypelist.selectedvalue); pmodel.ishouye = common.filter(this.istop.value); pmodel.isuse = common.filter(this.isuse.value); pmodel.useri
6、d = common.filter(request.cookies"jianzhan""id"); if (this.ac.value = "edite") pmodel.id = int.parse(common.filter(this.pid.value); result = pdal.update(pmodel); else if (this.ac.value = "add") result = pdal.addgoods(pmodel); if (result > 0) this.tipmessage
7、.text = "<script>alert('操¨´作Á¡Â成¨¦功|')</script>" else this.tipmessage.text = "<script>alert('操¨´作Á¡Â失º¡ì敗㨹')</script>" catch (exception) this.tipmes
8、sage.text = "<script>alert('操¨´作Á¡Â失º¡ì敗㨹')</script>" public string getremotecontent(string _content, string _localsavedir, string _phylocalsavedir, string o1, bool remintf) remoteresource red = new remoteresource
9、(_content, _localsavedir, _phylocalsavedir, "", remintf); red.fileextends = new string "gif", "jpg", "bmp", "ico", "png", "jpeg", "swf", "rar", "zip", "cab", "doc", "rm",
10、 "ram", "wav", "mid", "mp3", "avi", "wmv" ; red.fetchresource(); return red.content; using system;using system.collections.generic;using system.web;using system.web.ui;using system.web.ui.webcontrols;using templatehelper;public partial clas
11、s template_dabao_admin_addmenu : system.web.ui.page amenudal mdal = new amenudal(); protected void page_load(object sender, eventargs e) if (!ispostback) getmenuinfo(request.querystring"id" = null ? "-1" : request.querystring"id"); protected void editemenu(object sender
12、, eventargs e) try templatehelper.menu mmodel = new templatehelper.menu(); mmodel.id = int.parse(common.filter(this.mid.value); mmodel.title = common.filter(this.txt_title.value.trim(); mmodel.pagename = common.filter(this.txt_name.value.trim()+".aspx"); mmodel.ismenu = common.filter(this.
13、ismenu.value); int result = mdal.editemenu(mmodel); if (result > 0) this.tipmessage.text = "<script>alert('操¨´作Á¡Â成¨¦功|')</script>" else this.tipmessage.text = "<script>alert('操¨´作Á¡Â失º
14、161;ì敗㨹')</script>" catch (exception) this.tipmessage.text = "<script>alert('操¨´作Á¡Â失º¡ì敗㨹')</script>" private void getmenuinfo(string id) system.data.datatable dt = mdal.getme
15、nuinfo(id); if (dt.rows.count>0) this.mid.value = dt.rows0"id".tostring(); this.txt_title.value = dt.rows0"title".tostring(); this.txt_name.value = dt.rows0"pagename".tostring().replace(".aspx",""); if (dt.rows0"ismenu".tostring()="
16、true") this.ismenu.selectedindex = 1; else this.ismenu.selectedindex = 0; using system;using system.collections.generic;using system.web;using system.web.ui;using system.web.ui.webcontrols;using templatehelper;public partial class template_dabao_admin_addnews : system.web.ui.page public string
17、content = "" anewsdal ndal = new anewsdal(); protected void page_load(object sender, eventargs e) if (!ispostback) getdropdownlist(); initial(); private void getdropdownlist() system.data.datatable dt = ndal.getdropdownlist(); this.newstypelist.datasource = dt; this.newstypelist.datatextfi
18、eld = "title" this.newstypelist.datavaluefield = "identid" this.newstypelist.databind(); private void initial() getdropdownlist(); this.pid.value = request.querystring"id" this.ac.value = request.querystring"ac" if (this.ac.value = "edite") this.tiji
19、ao.value = "編À¨¤輯-" system.data.datatable dt = ndal.getnewsinfo(this.pid.value); if (dt.rows.count > 0) this.title.value = dt.rows0"title".tostring(); this.content = dt.rows0"content".tostring(); this.newstypelist.selectedvalue = dt.rows0"typeid&q
20、uot;.tostring(); if (dt.rows0"istop".tostring() = "true") this.istop.selectedindex = 1; else this.istop.selectedindex = 0; if (dt.rows0"isuse".tostring() = "true") this.isuse.selectedindex = 1; else this.isuse.selectedindex = 0; this.source.value = dt.rows0&qu
21、ot;source".tostring(); else this.tijiao.value = "添¬¨ª加¨®" protected void addnews(object sender, eventargs e) try string _localsavedir = "/kindeditor/attached/image/" + server.urldecode(request.cookies"jianzhan""name") + "/&qu
22、ot; string _phylocalsavedir = server.mappath(_localsavedir); int result = 0; newsinfo nmodel = new newsinfo(); nmodel.title = common.filter(this.title.value); nmodel.content =getremotecontent(input.filter(request.form"content"), _localsavedir, _phylocalsavedir, "", true); nmodel.
23、typeid = common.filter(this.newstypelist.selectedvalue); nmodel.ishouye = common.filter(this.istop.value); nmodel.isuse = common.filter(this.isuse.value); nmodel.source = common.filter(this.source.value); nmodel.userid = common.filter(request.cookies"jianzhan""id"); if (this.ac.v
24、alue = "edite") nmodel.id = int.parse(common.filter(this.pid.value); result = ndal.update(nmodel); else if (this.ac.value = "add") result = ndal.addnews(nmodel); if (result > 0) this.tipmessage.text = "<script>alert('操¨´作Á¡Â成¨¦
25、功|')</script>" else this.tipmessage.text = "<script>alert('操¨´作Á¡Â失º¡ì敗㨹')</script>" catch (exception) this.tipmessage.text = "<script>alert('操¨´作Á¡Â失º
26、161;ì敗㨹')</script>" /遠(yuǎn)?程¨¬存ä?圖ª? public string getremotecontent(string _content, string _localsavedir, string _phylocalsavedir, string o1, bool remintf) remoteresource red = new remoteresource(_content, _localsavedir, _phylocalsavedir, "&
27、quot;, remintf); red.fileextends = new string "gif", "jpg", "bmp", "ico", "png", "jpeg", "swf", "rar", "zip", "cab", "doc", "rm", "ram", "wav", "mid",
28、 "mp3", "avi", "wmv" ; red.fetchresource(); return red.content; using system;using system.collections.generic;using system.web;using system.web.ui;using system.web.ui.webcontrols;using templatehelper;public partial class admin_addpartner : system.web.ui.page protected s
29、tring picpath = null; private string userid = null; private apartnerdal pdal = new apartnerdal(); protected void page_load(object sender, eventargs e) userid = request.cookies"jianzhan""userid" if (!ispostback) initial(); protected void addpartner(object sender, eventargs e) try
30、int result = 0; partner pmodel = new partner(); pmodel.title = this.title.value; pmodel.url = this.linkurl.value; pmodel.pic = request.form"pic" pmodel.isuse = this.isuse.value; pmodel.userid = userid; if (this.ac.value = "add") result = pdal.addpartner(pmodel); else pmodel.id =
31、this.partnerid.value; result = pdal.updatepartner(pmodel); if (result > 0) this.tipmessage.text = "<script>alert('操¨´作Á¡Â成¨¦功|')</script>" else this.tipmessage.text = "<script>alert('操¨´作Á¡Â失&
32、#186;¡ì敗㨹')</script>" catch (exception) this.tipmessage.text = "<script>alert('操¨´作Á¡Â失º¡ì敗㨹')</script>" private void initial() this.ac.value = request.querystring"ac
33、" = null ? "add" : request.querystring"ac" this.partnerid.value = request.querystring"id" = null ? "-1" : request.querystring"id" if (this.ac.value = "add") this.tijiao.value = "添¬¨ª加¨®" else this.tij
34、iao.value = "修t改?" system.data.datatable dt = pdal.getpartnerbyid(this.partnerid.value); if (dt.rows.count > 0) this.title.value = dt.rows0"title".tostring(); this.linkurl.value = dt.rows0"url".tostring(); picpath = dt.rows0"pic".tostring(); this.isuse.sele
35、ctedindex = dt.rows0"isuse".tostring() = "true" ? 1 : 0; using system;using system.collections.generic;using system.web;using system.web.ui;using system.web.ui.webcontrols;using system.data;using templatehelper;public partial class template_dabao_admin_adduser : system.web.ui.pag
36、e private aceesshelpers dbh = new aceesshelpers(); httpcookie usercookie = httpcontext.current.request.cookies"jianzhan" protected void page_load(object sender, eventargs e) if (!page.ispostback) if (request.querystring"id" != null) getdatabind(); txt_username.disabled = true; pr
37、otected void getdatabind() datatable dt = dbh.getdatabysql("select username,realname,userpass,email,phone from tb_userinfo where id=" + request.cookies"jianzhan""id"); if (dt.rows.count > 0) txt_username.value = dt.rows0"username".tostring(); txt_realname.v
38、alue = dt.rows0"realname".tostring(); txt_password.value = common.md5decrypt(dt.rows0"userpass".tostring(); txt_againpass.value = common.md5decrypt(dt.rows0"userpass".tostring(); txt_email.value = dt.rows0"email".tostring(); txt_phone.value = dt.rows0"pho
39、ne".tostring(); protected void btnadd_click(object sender, eventargs e) if (request.cookies"jianzhan" != null) if (txt_password.value != txt_againpass.value) registerstartupscript("提¬¨¢示º?", "<script>alert('兩¢?次ä?密¨¹碼?不?
40、一°?致?!ê?');</script>"); return; if (request.querystring"id" = null) int num = dbh.returnsql("insert into tb_userinfo (username,realname,userpass,email,phone,userid)values('" + txt_username.value.trim() + "','" + txt_realname.value +
41、"','" + common.md5encrypt(txt_password.value.trim() + "','" + txt_email.value + "','" + txt_phone.value + "'," + request.cookies"jianzhan""id" + ")"); if (num > 0) registerstartupscript("提¬
42、¨¢示º?", "<script>alert('添¬¨ª加¨®成¨¦功|!ê?');location.href='userlist.aspx'</script>"); else registerstartupscript("提¬¨¢示º?", "<script>alert('添¬¨ª
43、加¨®失º¡ì敗㨹!ê?');</script>"); else int num = dbh.returnsql("update tb_userinfo set realname='" + txt_realname.value + "',userpass='" + common.md5encrypt(txt_againpass.value) + "',email='" +
44、txt_email.value + "',phone='" + txt_phone.value + "',userid=" + request.cookies"jianzhan""id" + " where id=" + request.querystring"id"); if (num > 0) registerstartupscript("提¬¨¢示º?", "<sc
45、ript>alert('修t改?成¨¦功|!ê?');location.href='userlist.aspx'</script>"); else registerstartupscript("提¬¨¢示º?", "<script>alert('修t改?失º¡ì敗㨹!ê?');</script>"); using
46、system;using system.collections;using system.configuration;using system.data;using system.web;using system.web.security;using system.web.ui;using system.web.ui.htmlcontrols;using system.web.ui.webcontrols;using system.web.ui.webcontrols.webparts;public partial class admin_admin_top : system.web.ui.p
47、age protected void page_load(object sender, eventargs e) if (request.cookies"jianzhan" != null) username.innertext = request.cookies"jianzhan".values"name" using system;using system.collections.generic;using system.web;using system.web.ui;using system.web.ui.webcontrols
48、;using system.data;using templatehelper;/ public partial class admin_edituser : system.web.ui.page private aceesshelpers dbh = new aceesshelpers(); httpcookie usercookie = httpcontext.current.request.cookies"jianzhan" protected void page_load(object sender, eventargs e) if (!ispostback) da
49、tatable dt = dbh.getdatabysql("select username,realname,userpass,email,phone from tb_userinfo where id=" + request.cookies"jianzhan""id"); if (dt.rows.count > 0) lblusername.innertext = dt.rows0"username".tostring(); txt_realname.value = dt.rows0"realn
50、ame".tostring(); txt_password.value = common.md5decrypt(dt.rows0"userpass".tostring(); txt_againpass.value =common.md5encrypt(dt.rows0"userpass".tostring(); txt_email.value = dt.rows0"email".tostring(); txt_phone.value = dt.rows0"phone".tostring(); #regio
51、n 修t改?建¡§站?客¨ª戶¡ì信?息¡é protected void btnadd_click(object sender, eventargs e) if (request.cookies"jianzhan" != null) if (txt_password.value!=txt_againpass.value) registerstartupscript("提¬¨¢示º?", "<script>aler
52、t('兩¢?次ä?密¨¹碼?不?一°?致?!ê?');</script>"); return; int num = dbh.returnsql("update tb_userinfo set realname='" + txt_realname.value + "',userpass='" + common.md5encrypt(txt_againpass.value) + "',email='"
53、+ txt_email.value + "',phone='" + txt_phone.value + "' where id=" + request.cookies"jianzhan""id"); if (num > 0) registerstartupscript("提¬¨¢示º?", "<script>alert('修t改?成¨¦功|!ê?');</script>"); else registerstartupscript("提¬¨¢示º?", "<script>alert('修t改?失º¡ì敗㨹!ê?');</script>"); #endregionusing system;using system.collections.generic;using system.web;using s
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 伊犁職業(yè)技術(shù)學(xué)院《課程項(xiàng)目實(shí)踐》2023-2024學(xué)年第二學(xué)期期末試卷
- 泰州2025年江蘇泰州市第二人民醫(yī)院招聘衛(wèi)生專業(yè)技術(shù)人員21人筆試歷年參考題庫附帶答案詳解
- 上海中醫(yī)藥大學(xué)《神經(jīng)及精神病學(xué)》2023-2024學(xué)年第二學(xué)期期末試卷
- 廣元中核職業(yè)技術(shù)學(xué)院《金融衍生工具》2023-2024學(xué)年第二學(xué)期期末試卷
- 寧波工程學(xué)院《郵輪旅行管理》2023-2024學(xué)年第二學(xué)期期末試卷
- 天水師范學(xué)院《文化市場(chǎng)學(xué)》2023-2024學(xué)年第二學(xué)期期末試卷
- 沈陽化工大學(xué)《無機(jī)及分析化學(xué)2》2023-2024學(xué)年第二學(xué)期期末試卷
- 廣安職業(yè)技術(shù)學(xué)院《小學(xué)數(shù)學(xué)解題與競(jìng)賽研究》2023-2024學(xué)年第二學(xué)期期末試卷
- 資金補(bǔ)助合同范本
- Unit 1 Past and Present Welcome to the Unit 教學(xué)設(shè)計(jì) 2024-2025學(xué)年牛津譯林版八年級(jí)英語下冊(cè)
- 初中數(shù)學(xué)幾何《旋轉(zhuǎn)模型費(fèi)馬點(diǎn)》壓軸題含答案解析
- 康復(fù)健康小屋課件
- 《內(nèi)部審計(jì)程序》課件
- 江西省宜春市豐城市第九中學(xué)2024-2025學(xué)年九年級(jí)上學(xué)期第二次段考化學(xué)試卷(日新班)(無答案)
- 江蘇省2024-2025年跨地區(qū)職業(yè)學(xué)校職教高考一輪聯(lián)考(機(jī)械專業(yè)綜合理論試卷含答案)
- 2024年事業(yè)單位租車服務(wù)滿意度調(diào)查及改進(jìn)協(xié)議3篇
- 露天礦邊坡穩(wěn)定課件所有章節(jié)整合
- 運(yùn)用PDCA提高吞咽障礙患者護(hù)理措施落實(shí)率
- 《法學(xué)概論》課程教學(xué)大綱
- JGJ-T188-2009施工現(xiàn)場(chǎng)臨時(shí)建筑物技術(shù)規(guī)范
- 教師資格考試高級(jí)中學(xué)美術(shù)學(xué)科知識(shí)與教學(xué)能力試題與參考答案(2024年)
評(píng)論
0/150
提交評(píng)論