版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(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改?建¡§站?客¨ª戶(hù)¡ì信?息¡é 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. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 《從傳統(tǒng)到時(shí)尚》課件
- 七大洲四大洋的位置
- 山東省煙臺(tái)市招遠(yuǎn)市(五四學(xué)制)2024-2025學(xué)年九年級(jí)上學(xué)期期末考試道德與法治試卷(含答案)
- 2024年全國(guó)社會(huì)工作者初級(jí)職業(yè)水平《社會(huì)工作實(shí)務(wù)》考試題參考答案
- 單位管理制度展示合集【人事管理篇】
- 單位管理制度展示大合集職員管理十篇
- 定期報(bào)告:一月可能繼續(xù)震蕩偏強(qiáng)中小盤(pán)成長(zhǎng)占優(yōu)
- 2024-2030年中國(guó)偶氮顏料行業(yè)市場(chǎng)深度分析及發(fā)展趨勢(shì)預(yù)測(cè)報(bào)告
- 單位管理制度展示大合集職工管理篇十篇
- 單位管理制度品讀選集【員工管理篇】
- 網(wǎng)絡(luò)賭博、網(wǎng)絡(luò)借貸和網(wǎng)絡(luò)詐騙的危害
- 《中西醫(yī)的區(qū)別》課件
- RFID電子標(biāo)簽制作方法
- 智能制造企業(yè)數(shù)字化轉(zhuǎn)型建設(shè)方案
- 病理生理學(xué)課件脂代謝紊亂
- 教師幽默朗誦節(jié)目《我愛(ài)上班》
- 《細(xì)胞工程學(xué)》考試復(fù)習(xí)題庫(kù)(帶答案)
- 中學(xué)課堂教學(xué)評(píng)價(jià)量表
- 食堂食材配送以及售后服務(wù)方案
- 塊單項(xiàng)活動(dòng)教學(xué)材料教案丹霞地貌
- 青年人應(yīng)該如何樹(shù)立正確的人生觀
評(píng)論
0/150
提交評(píng)論