freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

asp論壇的畢業(yè)設(shè)計(jì)(編輯修改稿)

2025-07-25 07:52 本頁(yè)面
 

【文章內(nèi)容簡(jiǎn)介】 rId = null。 string isadmin = null。 int UserQx=0。 String connstring = ()。 String strSql = SELECT UserId FROM Users WHERE UserName=39。 + strUserName + 39。 and UserPwd=39。 + strPassWord + 39。//根據(jù)用戶名和密碼來(lái)查詢用戶的ID String strSql2 = SELECT IsAdmin FROM Users WHERE UserName=39。 + strUserName + 39。 and UserPwd=39。 + strPassWord + 39。//根據(jù)用戶名和密碼來(lái)查詢用戶是否為管理的的標(biāo)志 String strSql3 = SELECT UserQx FROM Users WHERE UserName=39。 + strUserName + 39。 and UserPwd=39。 + strPassWord + 39。//查詢用戶的權(quán)限 string strSql4 = update Users set UserOnline=39。 + 1 + 39。,UserIp=39。 + ip + 39。WHERE UserName=39。 + strUserName + 39。 and UserPwd=39。 + strPassWord + 39。 SqlConnection conn = new SqlConnection(connstring)。 SqlCommand cmd = new SqlCommand()。 = conn。//設(shè)置連接 SqlDataReader reader。 try { ()。 = strSql。 reader = ()。 if (()) { strUserId =reader[UserId].ToString()。//獲取編號(hào)UserId ()。 if (()) { String alerts = 該用戶不存在!。 (script(39。 + alerts + 39。)/script)。 } else { = strSql2。 reader = ()。 if (()) { isadmin = reader[IsAdmin].ToString()。//獲取是否是管理員 ()。 } = strSql3。 reader = ()。 if (()) { UserQx = (reader[UserQx].ToString())。//獲取權(quán)限 ()。 } = strSql4。 int result = ()。//修改部分信息 Session[user_qx] = UserQx。//往Session里賦值 Session[user_id] = strUserId。 Session[user_name] = strUserName。 //是否是管理員,用于前臺(tái)主框架是否顯示管理 Session[IsAdmin] = isadmin。 ()。//成功跳轉(zhuǎn) } } } catch(Exception ex) { ( 意外關(guān)閉)。 ()。 } finally { ()。 } }}圖12 Asp_netBBS論壇注冊(cè)頁(yè)面3. 該論壇注冊(cè)頁(yè)面如下圖所示:該頁(yè)面為用戶注冊(cè)頁(yè)面,用戶按要求填完后可進(jìn)行注冊(cè),若用戶想添加頭像則可以輸入頭像網(wǎng)絡(luò)地址或頭像本地所在位置,進(jìn)行頭像上傳。若點(diǎn)擊重置則清空所有文本框內(nèi)容,進(jìn)行重新輸入。其頁(yè)面實(shí)現(xiàn)代碼如下所示:……public partial class Jion : { //獲取數(shù)據(jù)庫(kù)連接字符串 DataHelper helper = new DataHelper()。 private string user_Name1, pwd1, user_1,ip,pic。 int id = 0。 public void Add_user() { string strconnection = ()。 string selectSQL = select max(UserId) as MaxId from Users。 SqlConnection conn = new SqlConnection(strconnection)。 SqlCommand cmd = new SqlCommand(selectSQL, conn)。 SqlDataReader reader。 try { ()。 reader = ()。 if (()) { id = (reader[MaxId].ToString()) + 1。//取標(biāo)號(hào)最大值 Item()。 ()。 } ()。 } catch (Exception ex) { ()。 } finally { ()。 } ()。 } public void Item() //插入元素 { string strconnection = ()。 user_Name1 = 。 pwd1 = 。 pic = 。 user_1 = 。 String insert = insert into Users(UserId,UserName,UserPwd,UserEmail,UserPic)values(39。 + id + 39。,39。 + user_Name1 + 39。,39。 + pwd1 + 39。,39。 + user_1 + 39。,39。 + pic + 39。)。 SqlConnection conn = new SqlConnection(strconnection)。 try { ()。 SqlCommand cmd = new SqlCommand(insert, conn)。 int result=()。 } catch (Exception ex) { ()。 } finally { ()。 } ()。 } protected void Page_Load(object sender, EventArgs e) { } protected void Button2_Click(object sender, EventArgs e) //注冊(cè)按鈕觸發(fā)事件 { if (( == ) || ( == )) //判斷用戶名和密碼是否為空 { string alerts = 用戶名和密碼不能為空!。 (script(39。 + alerts + 39。)/script)。 } else if ( != ) { string alerts = 兩次輸入的密碼不一致!。 (script(39。 + alerts + 39。)/script)。 } else { Add_user()。 } } protected void Button1_Click(object sender, EventArgs e) { //檢測(cè)該用戶是否已經(jīng)存在 string sql = select UserId from Users where UserName=39。++39。 string strconnection = ()。 SqlConnection conn = new SqlConnection(strconnection)。 SqlCommand cmd = new SqlCommand(sql, conn)。 SqlDataReader reader。 try { ()。 reader=()。 if (()) { ()。 (script(39。該用戶已經(jīng)存在39。)/script)。 } else { (script(39。該用戶可以使用39。)/script)。 } } catch(Exception ex) { ()。 } finally { ()。 } }}圖13 Asp_netBBS論壇發(fā)帖頁(yè)面4. 該論壇發(fā)帖頁(yè)面如下圖所示。該頁(yè)面為用戶發(fā)表帖子頁(yè)面,若用戶未登錄則自動(dòng)跳轉(zhuǎn)到用戶登錄界面,提示用戶登錄,若用戶已登錄,則可以進(jìn)行發(fā)帖,按重置按鈕后則清空所有文本框。該論壇發(fā)帖頁(yè)面后臺(tái)實(shí)現(xiàn)代碼如下所示:……public partial class SentPost : { //獲取數(shù)據(jù)庫(kù)連接字符串 DataHelper helper = new DataHelper()。 protected void Page_Load(object sender, EventArgs e) { //驗(yàn)證是否有用戶登錄 if (Session[user_id] == null) { ()。 } } //發(fā)表提交按鈕事件 protected void Button1_Click(object sender, EventArgs e)
點(diǎn)擊復(fù)制文檔內(nèi)容
研究報(bào)告相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1