protected void Page_Load(object sender, EventArgs e) { try { if (Session[Macros.SESSION_KEY].ToString() == "" || Session[Macros.SESSION_KEY].ToString() == null) { Response.Redirect("Default.aspx"); } else { if (Request.QueryString.Get("skey") == "" || Request.QueryString.Get("skey") == null) { Response.Redirect("Default.aspx"); } else { Queryparam = Cryptography.GetK_Decrypt(Request.QueryString.Get("skey").ToString()); string[] session_arr = Session[Macros.SESSION_KEY].ToString().Split(','); bool bcheck = false; if (Convert.ToInt32(session_arr[0]) == Macros.iSUPER_ADMIN) { bcheck = DB_Querys.IsSitekeyAvailable(Queryparam); } else { bcheck = DB_Querys.IsSitekeyAvailable(Queryparam, session_arr[session_arr.Length - 1]); } if (bcheck) { // } else { Response.Redirect("Default.aspx"); } } } } catch { Response.Redirect("Default.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { if ((Request.QueryString.Get("auth") != "" && Request.QueryString.Get("auth") != null) && (Request.QueryString.Get("skey") != "" && Request.QueryString.Get("skey") != null) && (Request.QueryString.Get("fid") != "" && Request.QueryString.Get("fid") != null) && (Request.QueryString.Get("uid") != "" && Request.QueryString.Get("uid") != null) && (Request.QueryString.Get("op") != "" && Request.QueryString.Get("op") != null)) { iauth = Convert.ToInt32(Cryptography.GetK_Decrypt(Request.QueryString.Get("auth"))); iSiteKey = Convert.ToInt32(Cryptography.GetK_Decrypt(Request.QueryString.Get("skey"))); iFileId = Convert.ToInt32(Cryptography.GetK_Decrypt(Request.QueryString.Get("fid"))); sMailId = Cryptography.Decrypt(Request.QueryString.Get("uid")); iOutProcess = Convert.ToInt32(Cryptography.GetK_Decrypt(Request.QueryString.Get("op"))); try { AccesptRequest(iauth, iSiteKey, iFileId, sMailId, iOutProcess); Message.Text = "<h2>Now this " + sMailId + " user can download the file.</h2>"; } catch { Message.Text = "<h2>Something went wrong...</h2>"; } } }
/* protected void btn_Click(object sender, EventArgs e) * { * // Button btn = (Button)sender; * HtmlInputButton btn = (HtmlInputButton)sender; * string str = btn.ID; * }*/ protected void Page_Load(object sender, EventArgs e) { //btn1.ServerClick += new EventHandler(btn_Click); try { GTICLOUD.navbar.dropstring = ""; string skey = Cryptography.GetK_Decrypt(Request.QueryString.Get("skey").ToString()); string[] session_arr = Session[Macros.SESSION_KEY].ToString().Split(','); sFileInfo = DB_Querys.GetFileConfigId(Convert.ToInt32(skey)); try { if (Session[Macros.SESSION_KEY].ToString() == "" || Session[Macros.SESSION_KEY].ToString() == null) { if (Convert.ToInt32(session_arr[0]) == Macros.iSUPER_ADMIN) { Response.Redirect("Default.aspx"); } else { Response.Redirect("authenticate.aspx"); } } else { //get all data accornding Session[Macros.SESSION_SITE_KEY].ToString() // Response.Write("<h3>"+heddinfld.Value+"</h3>"); string st = skey; //string[] session_arr = Session[Macros.SESSION_KEY].ToString().Split(','); sitekey = Convert.ToInt32(st); bool bcheck = false; if (Convert.ToInt32(session_arr[0]) == Macros.iSUPER_ADMIN) { bcheck = DB_Querys.IsSitekeyAvailable(st); } else { bcheck = DB_Querys.IsSitekeyAvailable(st, session_arr[session_arr.Length - 1]); } if (bcheck) { // } else { if (Convert.ToInt32(session_arr[0]) == Macros.iSUPER_ADMIN) { Response.Redirect("Default.aspx"); } else { Response.Redirect("authenticate.aspx"); } } //int view = (Convert.ToInt32(st.ToCharArray()[0]) - 33); // Response.Write("<h3>" + st + "</h3>"); GTICLOUD.navbar.dropstring += " <li><a href='#!'>Settings</a></li>"; GTICLOUD.navbar.dropstring += " <li><a href='#!'>Logout</a></li>"; } string permission_level = session_arr[0]; string mailId = session_arr[1]; int FileId = 0; if (sFileInfo == "") { FileId = 0; ConfigLinkBtn.Visible = false; } else { FileId = Convert.ToInt32(sFileInfo.Split(',')[0]); } ArrayList VerifyArr = DB_Querys.IsVerifiedByAdmin(sitekey, permission_level, mailId, FileId); if (VerifyArr[0].Equals(true) && VerifyArr[1].Equals(false)) { ProcessLabel.Visible = false; NowDownload.Visible = true; download_msg.Visible = false; ConfigLinkBtn.Visible = false; refresh.Visible = false; } if (VerifyArr[0].Equals(false) && VerifyArr[1].Equals(true)) { ProcessLabel.Visible = true; NowDownload.Visible = false; ConfigLinkBtn.Visible = false; download_msg.Visible = true; refresh.Visible = true; } } catch (Exception ex) { if (Convert.ToInt32(session_arr[0]) == Macros.iSUPER_ADMIN) { Response.Redirect("Default.aspx"); } else { Response.Redirect("authenticate.aspx"); } } } catch { Response.Redirect("Default.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { iSkey = Convert.ToInt32(Cryptography.GetK_Decrypt(Request.QueryString.Get("skey"))); }
protected void Page_Load(object sender, EventArgs e) { try { sSession = Session[Macros.SESSION_KEY].ToString().Split(','); if ((Session[Macros.SESSION_KEY].ToString() != null && Session[Macros.SESSION_KEY].ToString() != "") && (sSession[0] == Macros.iSUPER_ADMIN.ToString())) { string skey = Request.QueryString.Get("skey"); int iSkey = 0; if (skey != "" && skey != null) { iSkey = Convert.ToInt32(Cryptography.GetK_Decrypt(skey)); string query = "select * from accessControl where sitekey='" + iSkey + "'"; SqlDataReader dbr = DB_Querys.GetAuntherizedUserData(query); if (dbr.HasRows == false) { // } else { autherizedLabel.Text += @"<table> <thead> <tr> <th>ID</th> <th>Site Key</th> <th>Email</th> <th>Category</th> <th>Authentication Key</th> <th>Authenticated</th> <th>Name</th> <th>Created</th> <th>Updated</th> <th>Permission Level</th> </tr> </thead> <tbody> "; while (dbr.Read()) { autherizedLabel.Text += "<tr>"; for (int i = 0; i < dbr.FieldCount; i++) { autherizedLabel.Text += "<td>" + dbr[i].ToString() + "</td>"; } autherizedLabel.Text += "<td><a class='waves-effect waves-light btn authbtn' uid='" + dbr[0].ToString() + "' skey='" + dbr[1].ToString() + "' >DeActive</a>"; autherizedLabel.Text += "</tr>"; } autherizedLabel.Text += @" </tbody> </table>"; } } } else { Response.Redirect("Error.aspx"); } } catch { Response.Redirect("Error.aspx"); } }