0% found this document useful (0 votes)
2 views

trust coding

Uploaded by

Sankari Selvaraj
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

trust coding

Uploaded by

Sankari Selvaraj
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 68

6.

CODING
AdminLogin.aspx
<%@PageLanguage="C#"AutoEventWireup="true"MasterPageFile="~/
Administrator.master" CodeFile="AdminLogin.aspx.cs" Inherits="AdminLogin" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit"
TagPrefix="cc1" %>
<asp:Content ContentPlaceHolderID="tpalogin" runat="server">
<asp:Label style="position:absolute; top: 216px; left: 445px;" ID="Label1"
runat="server" Text="Administrator" Font-Size="14pt"
Font-Names="Verdana" Font-Bold="True"
ForeColor="#CC3300"></asp:Label>
<asp:Panel style="position:absolute; width: 360px; top: 258px; left: 259px; height: 207px;"
ID="Panel1" runat="server" BorderWidth="4px" BorderColor="#CC3300"
BorderStyle="Solid">
<asp:Label style="position:absolute; top: 35px; left: 21px;" ID="Label2" runat="server"
Font-Bold="True" Font-Names="Verdana" Font-Size="Medium"
Text="Admin Id"></asp:Label>
<asp:TextBox style="position:absolute; top: 35px; left: 146px; width: 185px; height: 25px;
text-align: center;" ID="TextBox1" runat="server" Font-Names="Bookman Old Style" Font-
Size="16"></asp:TextBox>
<asp:Label style="position:absolute; top: 95px; left: 21px;" ID="Label3"
runat="server" Font-Bold="True" Font-Names="Verdana" Font-Size="Medium"
Text="Password"></asp:Label>
<asp:TextBox style="position:absolute; top: 95px; left: 146px; width: 185px; height: 25px;"
ID="TextBox2" runat="server" TextMode="Password"
Font-Names="Bookman Old Style" Font-Size="16"></asp:TextBox>
<asp:Button STYLE="position:absolute; background-color: Transparent; background-image:
url('Images/red.jpg'); top: 149px; left: 72px; width: 97px; height: 32px;"
ID="Button1" runat="server" Text="Submit" Font-Size="15pt" ForeColor="#CC3300"
Font-Names="Imprint MT Shadow" onclick="Button1_Click" Font-Bold="True" />
<asp:Button STYLE="position:absolute; background-color: Transparent; background-image:
url('Images/red.jpg'); top: 149px; left: 187px; width: 97px; height: 32px;"
ID="Button2" runat="server" Text="Clear" Font-Size="15pt" ForeColor="#CC3300"
Font-Names="Imprint MT Shadow" onclick="Button2_Click" Font-Bold="True" />
</asp:Panel><asp:LinkButton ID="LinkButton3" runat="server" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black" STYLE="position:absolute; top: 434px; left: 764px; width: 149px;"
PostBackUrl="~/Default.aspx">Back to Home</asp:LinkButton>
<cc1:DropShadowExtender ID="DropShadowExtender1" runat="server" Opacity=".1"
TargetControlID="Panel1" Rounded="true" Radius="3"> </cc1:DropShadowExtender>
<cc1:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" runat="server"
WatermarkCssClass="watermarked" WatermarkText="Administrator ID"
TargetControlID="Textbox1">
</cc1:TextBoxWatermarkExtender><cc1:TextBoxWatermarkExtender
ID="TextBoxWatermarkExtender2" runat="server" WatermarkCssClass="watermarked"
WatermarkText="Password" TargetControlID="Textbox2">
</cc1:TextBoxWatermarkExtender><asp:ScriptManager ID="ScriptManager1"
runat="server"></asp:ScriptManager></asp:Content>
AdminLogin.aspx.cs

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
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;
using System.Xml.Linq;
public partial class AdminLogin : System.Web.UI.Page
{
string upid, uppwd;
protected void Button1_Click(object sender, EventArgs e)
{
upid = TextBox1.Text.ToUpper();
uppwd = TextBox2.Text.ToUpper();
if (TextBox1.Text == "") {
string myStringVariable1 = string.Empty;
myStringVariable1 = "Enter Administrator ID";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true); }
else
{
if (TextBox2.Text == "")
{
string myStringVariable1 = string.Empty;
myStringVariable1 = "Enter Administrator Password";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);
}
else
{
if (upid == "ADMIN" && uppwd == "ADMIN")
{ Response.Redirect("CloudReport.aspx"); }
else
{
string myStringVariable1 = string.Empty;
myStringVariable1 = "Enter Administrator ID/Password Correcly.";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);
}}}}
protected void Button2_Click(object sender, EventArgs e)
{TextBox1.Text = "";
TextBox2.Text = "";
}}
AdminOwnerDetails.aspx.cs

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
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;
using System.Xml.Linq;
using System.Data.SqlClient;
public partial class AdminOwnerDetails : System.Web.UI.Page
{
SqlConnectioncon=new
SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]);
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
SqlDataAdapter adp = new SqlDataAdapter("Select ownerid from Registration", con);
DataSet ds = new DataSet();
adp.Fill(ds);
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
DropDownList1.Items.Add(ds.Tables[0].Rows[i]["ownerid"].ToString());
}}}
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
if (DropDownList1.SelectedItem.Text == "--Select--")
{
Panel2.Visible = false;
}
else
{
Panel2.Visible = true;
SqlDataAdapter adp = new SqlDataAdapter("Select * from Registration where ownerid='" +
DropDownList1.SelectedItem.Text + "'", con);
DataSet ds = new DataSet(); adp.Fill(ds);
Label5.Text = ds.Tables[0].Rows[0]["oid"].ToString();
Label8.Text = ds.Tables[0].Rows[0]["ownerid"].ToString();
Label11.Text = ds.Tables[0].Rows[0]["gender"].ToString();
Label14.Text = ds.Tables[0].Rows[0]["age"].ToString();
Label17.Text = ds.Tables[0].Rows[0]["mobile"].ToString();
Label20.Text = ds.Tables[0].Rows[0]["emailid"].ToString();
Label23.Text = ds.Tables[0].Rows[0]["date"].ToString();
}}}
AdminOwnerDetails.aspx

<%@ Page Language="C#" AutoEventWireup="true"


MasterPageFile="~/TPAMasterPage.master" CodeFile="AdminOwnerDetails.aspx.cs"
Inherits="AdminOwnerDetails" %>
<asp:Content ContentPlaceHolderID="AdminOwnerDetails" runat="server">
<asp:Panel Style="position: absolute; top: 106px; left: 22px; height: 18px; width: 959px;"
ID="Panel1" runat="server">
<font size="4" face="Bookman old style" color="white">
<marquee style="position: absolute; top: -1px; left: 10px; width: 940px;" behavior="scroll"
direction="left" scrollamount="15">Client Details !</marquee>
</font></asp:Panel>
<asp:Label style="position:absolute; top: 205px; left: 21px;" ID="Label1"
runat="server" Font-Italic="True" Font-Bold="True"
Font-Names="Verdana" Font-Size="X-Large" Text="Client Details!!!"
ForeColor="#CC3300" BackColor="#FFFFCC"></asp:Label>
<asp:Label style="position: absolute; top: 270px; left: 75px;" ID="Label2"
runat="server" Text="Select Client Name" Font-Bold="false" Font-Italic="False"
Font-Names="Baskerville Old Face" Font-Size="Large"></asp:Label>
<asp:DropDownList style="position: absolute; top: 301px; left: 70px; height: 25px; width:
176px;"
ID="DropDownList1" runat="server" Font-Bold="True"
Font-Names="Baskerville Old Face" Font-Size="Large" AutoPostBack="True"
onselectedindexchanged="DropDownList1_SelectedIndexChanged" >
<asp:ListItem Text="--Select--" Value="--Select--" Selected="True"></asp:ListItem>
</asp:DropDownList>
<asp:Panel style="position: absolute; top: 306px; left: 254px; height: 388px; width: 433px;"
ID="Panel2" runat="server" Visible="false" BorderWidth="2"
BorderColor="#CC3300">
<asp:Label style="position: absolute; top: 40px; left: 45px;" ID="Label3"
runat="server" Text="Client ID" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 40px; left: 180px;" ID="Label4"
runat="server" Text=":" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 40px; left: 240px;" ID="Label5"
runat="server" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 93px; left: 45px;" ID="Label6"
runat="server" Text="Client Name" Font-Names="Rockwell"
FontSize="Large"></asp:Label>
<asp:Label style="position: absolute; top: 93px; left: 180px;" ID="Label7"
runat="server" Text=":" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 93px; left: 240px;" ID="Label8"
runat="server" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 146px; left: 45px;" ID="Label9"
runat="server" Text="Gender" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 146px; left: 180px;" ID="Label10"
runat="server" Text=":" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 146px; left: 240px;" ID="Label11"
runat="server" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 199px; left: 45px;" ID="Label12"
runat="server" Text="Age" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 199px; left: 180px;" ID="Label13"
runat="server" Text=":" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 199px; left: 240px;" ID="Label14"
runat="server" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 252px; left: 45px;" ID="Label15"
runat="server" Text="Mobile" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 252px; left: 180px;" ID="Label16"
runat="server" Text=":" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 252px; left: 240px;" ID="Label17"
runat="server" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 305px; left: 45px;" ID="Label18"
runat="server" Text="Emailid" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 305px; left: 180px;" ID="Label19"
runat="server" Text=":" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 305px; left: 240px;" ID="Label20"
runat="server" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 358px; left: 45px;" ID="Label21"
runat="server" Text="Date" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 358px; left: 180px;" ID="Label22"
runat="server" Text=":" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 358px; left: 240px;" ID="Label23"
runat="server" Font-Names="Rockwell" Font-Size="Large"></asp:Label></asp:Panel>
<asp:LinkButton ID="LinkButton2" runat="server"
STYLE="position:absolute; top: 435px; left: 755px;" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black" PostBackUrl="~/tpaverify.aspx" >Alert Message</asp:LinkButton>
<asp:LinkButton ID="LinkButton1" runat="server" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black" PostBackUrl="~/KeyResponses.aspx"
STYLE="position:absolute; top: 475px; left: 755px; width: 161px;">Key
Responses</asp:LinkButton>
<asp:LinkButton ID="LinkButton5" runat="server" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black" PostBackUrl="~/Intruderdetails.aspx"
STYLE="position:absolute; top: 515px; left: 755px; width: 176px;">Intruder
Details</asp:LinkButton>
<asp:LinkButton ID="LinkButton4" runat="server" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black" PostBackUrl="~/AdminOwnerDetails.aspx"
STYLE="position:absolute; top: 555px; left: 755px; width: 161px;">Client
Details</asp:LinkButton>
<asp:LinkButton ID="LinkButton3" runat="server" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black"
STYLE="position:absolute; top: 595px; left: 755px; width: 149px;"
PostBackUrl="~/Default.aspx">Signout</asp:LinkButton>
</asp:Content>
ClientRegistration.aspx
<%@PageLanguage="C#"AutoEventWireup="true"MasterPageFile="~/
ClientMasterPage.master" CodeFile="ClientRegistration.aspx.cs"
Inherits="ClientRegistration" %>
<asp:Content ContentPlaceHolderID="ClientRegistration" runat="server">
<asp:LinkButton ID="LinkButton2" runat="server"
STYLE="position:absolute; top: 435px; left: 755px;" Font-Bold="True"
Font-Size="Large" Font-Underline="False"
ForeColor="Black" onclick="LinkButton2_Click"
Font-Names="Segoe Condensed">Client Login</asp:LinkButton>
<asp:LinkButton ID="LinkButton1" runat="server" Font-Bold="True"
Font-Size="Large" Font-Underline="False"
ForeColor="Black"
STYLE="position:absolute; top: 475px; left: 755px; width: 213px;"
onclick="LinkButton1_Click" Font-Names="Segoe Condensed">Client
Registration</asp:LinkButton>
<asp:LinkButton ID="LinkButton3" runat="server" Font-Bold="True"
Font-Size="Large" Font-Underline="False"
ForeColor="Black"
STYLE="position:absolute; top: 515px; left: 755px; width: 149px;"
PostBackUrl="~/Default.aspx" Font-Names="Segoe Condensed">Back to
Home</asp:LinkButton>
<asp:Label style="position:absolute; top: 201px; left: 310px; right: 650px; height: 36px;"
ID="Label13" runat="server" Font-Names="Tunga" Font-Size="X-Large"
Text="User Sign In:" Font-Bold="True" ForeColor="#990000"></asp:Label>
<asp:Label style="position:absolute; top: 209px; left: 510px; right: 296px; height: 28px;"
ID="Label9" runat="server" Font-Names="Tunga" Font-Size="X-Large"
Text="Cloud Account Registration:" Font-Bold="True" ForeColor="#990000"></asp:Label>
<asp:Panel style="position:absolute; width: 414px; top: 267px; left: 286px; height: 405px;"
ID="Panel1" runat="server" BorderWidth="5px"
BorderColor="#CC3300" BackColor="#FEE8E0" BorderStyle="Double">
<asp:Label ID="Label2" runat="server" Font-Bold="True" Font-Names="Verdana"
Font-Size="Small" ForeColor="#990000"
style="position:absolute; top: 35px; left: 68px;" Text="Client Id"></asp:Label>
<asp:TextBox style="position:absolute; top: 35px; left: 219px; width: 163px; height: 24px;
text-align: center;" ID="TextBox1" runat="server" Font-Names="Verdana" Font-
Size="Small" Font-Bold="True"></asp:TextBox>
<asp:Label style="position:absolute; top: 75px; left: 68px;" ID="Label3"
runat="server" Font-Names="Verdana" Font-Size="Small"
Font-Bold="True" ForeColor="#990000" Text="Password"></asp:Label>
<asp:TextBox style="position:absolute; top: 75px; left: 219px; width: 163px; height: 24px;
text-align: center;"
ID="TextBox2" runat="server" TextMode="Password"
Font-Names="Verdana" Font-Size="Small" Font-Bold="True"></asp:TextBox>
<asp:Label style="position:absolute; top: 115px; left: 68px;" ID="Label4"
runat="server" Font-Names="Verdana" Font-Size="Small"
Font-Bold="True" ForeColor="#990000" Text="Gender"></asp:Label>
<asp:RadioButtonList RepeatDirection="Horizontal"
style="position:absolute; top: 115px; left: 219px; width: 236px;"
Font-Bold="True" Font-Names="Verdana" Font-Size="Small" ID="RadioButtonList1"
runat="server">
<asp:ListItem Text="Male" Value="Male"></asp:ListItem>
<asp:ListItem Text="Female" Value="Female"></asp:ListItem>
</asp:RadioButtonList>
<asp:Label style="position:absolute; top: 155px; left: 68px;" ID="Label5"
runat="server" Font-Names="Verdana" Font-Size="Small"
Font-Bold="True" ForeColor="#990000"
Text="Age" ></asp:Label><asp:TextBox MaxLength="3"
OnKeyPress="ValidateNumeric()" style="position:absolute; top: 155px; left: 219px; width:
163px; height: 24px; text-align: center;" Font-Names="Verdana" Font-Size="Small"
ID="TextBox3" runat="server" Font-Bold="True"></asp:TextBox>
<asp:Label style="position:absolute; top: 195px; left: 68px;" ID="Label6"
runat="server" Font-Names="Verdana" Font-Size="Small"
Font-Bold="True" ForeColor="#990000"
Text="Phone"></asp:Label>
<asp:TextBox MaxLength="14" OnKeyPress="ValidateNumeric()"
style="position:absolute; top: 195px; left: 219px; width: 163px; height: 24px; text-align:
center;" Font-Names="Verdana" Font-Size="Small" ID="TextBox4" runat="server"
Font-Bold="True"></asp:TextBox><asp:Label style="position:absolute; top: 235px; left:
68px;" ID="Label7" runat="server" Font-Names="Verdana" Font-Size="Small" Font-
Bold="True" ForeColor="#990000" Text="Email ID"></asp:Label><asp:TextBox
style="position:absolute; top: 235px; left: 219px; width: 163px; height: 24px; text-align:
center;" Font-Names="Verdana" Font-Size="Small" ID="TextBox5" runat="server" Font-
Bold="True"></asp:TextBox> <asp:Label style="position:absolute; top: 275px; left: 68px;"
ID="Label8"runat="server" Font-Names="Verdana" Font-Size="Small" Font-Bold="True"
ForeColor="#990000" Text="Date"></asp:Label>
<asp:TextBox Enabled="false"
style="position:absolute; top: 275px; left: 219px; width: 163px; height: 24px; text-align:
center;" Font-Names="Verdana" Font-Size="Small" ID="TextBox6" runat="server"
Font-Bold="True"></asp:TextBox>
<asp:Button STYLE="position:absolute; background-color: Transparent; background-image:
url('Images/btnadmin1.jpg'); top: 337px; left: 140px; width: 78px; height: 27px;"
ID="Button1" runat="server" Text="Submit" Font-Names="Verdana" Font-Size="Medium"
Font-Bold="True" ForeColor="#CC3300" onclick="Button1_Click"
BackColor="White" /><asp:Button STYLE="position:absolute; background-color:
Transparent; background-image: url('Images/btnadmin1.jpg'); top: 338px; left: 258px; width:
80px; height: 27px;"ID="Button2" runat="server" Text="Clear" Font-Names="Verdana"
Font-Size="Medium"Font-Bold="True" ForeColor="#CC3300" onclick="Button2_Click"
BackColor="White" /><br />
</asp:Panel><asp:Panel style="position:absolute; width: 288px; top: 275px; left: 307px;
height: 249px;" ID="Panel2" runat="server" BorderWidth="5px" BackColor="White"
BorderColor="#990000" BorderStyle="Groove">
<asp:Label style="position:absolute; top: 35px; left: 11px;" ID="Label1"
runat="server" Font-Bold="True" Font-Names="Verdana" Font-Size="Small"
Text="Client Id" ForeColor="#CC6600"></asp:Label>
<asp:TextBox style="position:absolute; top: 34px; left: 107px; width: 166px; height: 24px;
text-align: center;" ID="TextBox7" runat="server" Font-Names="Verdana" Font-
Size="Small" Font-Bold="True"></asp:TextBox>
<asp:Label style="position:absolute; top: 85px; left: 14px;" ID="Label10"
runat="server" Font-Bold="True" Font-Names="Verdana" Font-Size="Small"
Text="Password" ForeColor="#CC6600"></asp:Label>
<asp:TextBox style="position:absolute; top: 79px; left: 107px; width: 166px; height: 24px;
text-align: center;" ID="TextBox8" runat="server" TextMode="Password"
Font-Names="Verdana" Font-Size="Small" Font-Bold="True"></asp:TextBox>
<asp:Button STYLE="position:absolute; background-image: url('Images/red1.jpg'); top:
179px; left: 0px; width: 288px; height: 33px;" ID="Button7" runat="server" Text="Click
here to send keygen key" Font-Size="13pt" ForeColor="#CC0000" Font-Names="Imprint
MT Shadow" onclick="Button7_Click" BackColor="White" Font-Bold="True"/>
<asp:Button ID="Button3" runat="server" BackColor="White"
Font-Names="Imprint MT Shadow" Font-Size="15pt" ForeColor="#CC0000"
onclick="Button3_Click" STYLE="position: absolute; background-image:
url('Images/red1.jpg'); top: 124px; left: 37px; width: 88px; height: 31px;" Text="Sign in"
Font-Bold="True" />
<asp:Button STYLE="position:absolute; background-image: url('Images/red1.jpg'); top:
125px; left: 155px; width: 88px; height: 31px;"
ID="Button4" runat="server" Text="Clear" Font-Size="15pt" ForeColor="#CC0000"
Font-Names="Imprint MT Shadow" onclick="Button4_Click" BackColor="White"
Font-Bold="True" /><asp:Label ID="Label14" runat="server"
style="position:absolute; top: 220px; left: 130px;" Text="Label"
Font-Bold="True" Font-Names="Imprint MT Shadow" Font-Underline="False"
ForeColor="#FF9900"></asp:Label></asp:Panel>
<asp:Panel style="position:absolute; width: 318px; top: 259px; left: 400px; height: 155px;"
ID="Panel3" runat="server" BorderWidth="2" BackColor="White"
BorderColor="#FF3300">
<asp:ImageButton style="position:absolute; top: 1px; left: 267px"
ID="ImageButton2" runat="server" ImageUrl="~/Images/close.jpg" Height="25"
Width="25" onclick="ImageButton2_Click"/>
<asp:Label style="position:absolute; top: 0px; left: -1px; height: 20px;" Font-Size="Small"
ID="Label11" runat="server" Text="Public Auditability Key is sent to your mail !"
ForeColor="Red" Visible="False" Font-Bold="True"></asp:Label>
<asp:Label style="position:absolute; top: 25px; left: 2px; height: 20px;" Font-Size="Small"
ID="Label12" runat="server" Text="Public Auditability Key" Visible="False"
Font-Bold="True" Font-Names="Verdana"></asp:Label>
<asp:TextBox ID="TextBox9" runat="server" Font-Bold="True" Font-Names="Verdana"
Font-Size="Small" style="position:absolute; top: 44px; left: 3px; height: 24px; width: 176px;
text-align: center;" TextMode="Password" Visible="False"></asp:TextBox>
<asp:Button style="position:absolute; background-color: Transparent; background-image:
url('Images/red1.jpg'); top: 89px; left: 10px; height: 27px; width: 57px;"
ID="Button5" runat="server" Text="Sign in" onclick="Button5_Click"
CausesValidation="false" ForeColor="#993300" Font-Size="12pt" Font-Names="Imprint
MT Shadow" Visible="False" BackColor="White" Font-Bold="True"/>
<asp:Button style="position:absolute; background-color: Transparent; background-image:
url('Images/red1.jpg'); top: 91px; left: 94px; height: 27px; width: 59px;"
ID="Button6" runat="server" Text="Cancel" CausesValidation="false"
ForeColor="#993300" Font-Size="12pt" Font-Names="Imprint MT Shadow"
onclick="Button6_Click" Visible="False" BackColor="#CCCCCC" Font-Bold="True"/>
<asp:LinkButton ID="LinkButton4" runat="server" onclick="LinkButton4_Click"
ToolTip="Click &amp; Get Security Key" Font-Bold="True">Get Key
Offline</asp:LinkButton>
</asp:Panel></asp:Content>
ClientRegistration.aspx.cs

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
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;
using System.Xml.Linq;
using System.Data.SqlClient;
using System.IO;
using System.Net;
using System.Net.Mail;
using System.Text;
using System.Security.Cryptography;
public partial class ClientRegistration : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]);
Class1 cs = new Class1();
int ownerid, Securitykey = 0;
string owrid, yes, yes1;
string owrid1, owrpwd, yes2,blacked;
string pas1;
string gMailAccount = "[email protected]";
string password = "alliswell1";
string to;
string subject = "secret key for login";
string message;
string Securitykey1;
string ranno,ranno1;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
TextBox6.Text = DateTime.Now.ToShortDateString();
TextBox3.Attributes.Add("OnKeyPress", "ValidateNumeric()");
TextBox4.Attributes.Add("OnKeyPress", "ValidateNumeric()");
Panel1.Visible = false;
Label9.Visible = false;
Panel2.Visible = false;
Panel3.Visible = false;
Label13.Visible = false;
Button7.Visible = false;
}
ownerid = cs.idgeneration();
}
protected void Button1_Click(object sender, EventArgs e)
{
if (TextBox1.Text == "")
{
string myStringVariable1 = string.Empty;
myStringVariable1 = "Enter Client ID.";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);
}
else
{
if (TextBox2.Text == "")
{
string myStringVariable1 = string.Empty;
myStringVariable1 = "Enter Client Password.";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);}
else {
if (RadioButtonList1.SelectedIndex == -1)
{
string myStringVariable1 = string.Empty;
myStringVariable1 = "Select Gender";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);}
else
{
if (TextBox3.Text == "")
{
string myStringVariable1 = string.Empty;
myStringVariable1 = "Enter your age.";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);
}
else
{
if (TextBox4.Text == "")
{
string myStringVariable1 = string.Empty;
myStringVariable1 = "Enter your contact number.";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);
}
else
{
if (TextBox5.Text == "")
{
string myStringVariable1 = string.Empty;
myStringVariable1 = "Enter your Email ID.";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true); }
else
{
SqlDataAdapter adp = new SqlDataAdapter("select * from Registration", con);
DataSet ds = new DataSet();
adp.Fill(ds);
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
owrid = ds.Tables[0].Rows[i]["ownerid"].ToString();
if (owrid == TextBox1.Text)
{yes = "yes";
goto Outer;}
else
{yes = "no";}}
Outer:
yes1 = "yes";
if (yes != "yes")
{
SqlCommand cmd = new SqlCommand();
con.Open();
cmd.Connection = con;
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "SPRegistration";
cmd.Parameters.Add("@oid", SqlDbType.Int, 0);
cmd.Parameters["@oid"].Value = ownerid;
cmd.Parameters.Add("@ownerid", SqlDbType.VarChar, 50);
cmd.Parameters["@ownerid"].Value = TextBox1.Text;
cmd.Parameters.Add("@ownerpwd", SqlDbType.NVarChar, 50);
cmd.Parameters["@ownerpwd"].Value = TextBox2.Text;
cmd.Parameters.Add("@gender", SqlDbType.NVarChar, 10);
cmd.Parameters["@gender"].Value = RadioButtonList1.SelectedItem.Text;
cmd.Parameters.Add("@age", SqlDbType.Int, 3);
cmd.Parameters["@age"].Value = TextBox3.Text;
cmd.Parameters.Add("@mobile", SqlDbType.BigInt, 15);
cmd.Parameters["@mobile"].Value = TextBox4.Text;
cmd.Parameters.Add("@emailid", SqlDbType.NVarChar, 50);
cmd.Parameters["@emailid"].Value = TextBox5.Text;
cmd.Parameters.Add("@date", SqlDbType.NVarChar, 10);cmd.Parameters["@date"].Value
= TextBox6.Text;

cmd.Parameters.Add("@securitykey", SqlDbType.NVarChar, 5);


cmd.Parameters["@securitykey"].Value = Securitykey;
cmd.Parameters.Add("@Rank", SqlDbType.NVarChar, 5);
cmd.Parameters["@Rank"].Value = "0";
cmd.Parameters.Add("@Black", SqlDbType.NVarChar, 5);
cmd.Parameters["@Black"].Value = "True";
cmd.Parameters.Add("@Count", SqlDbType.NVarChar, 5);
cmd.Parameters["@Count"].Value = "0";
cmd.Parameters.Add("@RolesAuditor", SqlDbType.NVarChar, 5);
cmd.Parameters["@RolesAuditor"].Value = "Roles Auditor Bending";
cmd.ExecuteNonQuery();
//NetworkCredential loginInfo = new NetworkCredential(gMailAccount, password);
//MailMessage msg = new MailMessage();
//msg.From = new MailAddress(gMailAccount);
//msg.To.Add(new MailAddress(TextBox5.Text));
//msg.Subject = subject;
//msg.Body = message;
//msg.IsBodyHtml = true;
//SmtpClient client = new SmtpClient("smtp.gmail.com");
//client.EnableSsl = true;
//client.UseDefaultCredentials = false;
//client.Credentials = loginInfo;
//client.Send(msg);
//MailMessage mail = new MailMessage();
//mail.To = TextBox5.Text;
//mail.From = gMailAccount;
//mail.Subject = "secret key";
//mail.Body = "this is my test email body";
//mail.BodyFormat = MailFormat.Html;
////mail.Priority = MailPriority.Normal;
//SmtpMail.SmtpServer = "localhost"; //your real server goes here
//SmtpMail.Send(mail);
MsgBox.Show("Registered Successfully");
}
else
{
string myStringVariable1 = string.Empty;
myStringVariable1 = "This Client ID Already Exists.";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);
}}}}}}}}
protected void Button2_Click(object sender, EventArgs e)
{
TextBox1.Text = "";
TextBox2.Text = "";
RadioButtonList1.SelectedIndex = -1;
TextBox3.Text = "";
TextBox4.Text = "";
TextBox5.Text = "";
}
protected void LinkButton2_Click(object sender, EventArgs e)
{ Label9.Visible = false;
Panel1.Visible = false;
Panel2.Visible = true;
Label13.Visible = true;}
protected void LinkButton1_Click(object sender, EventArgs e)
{
Label9.Visible = true;
Panel1.Visible = true;
Panel2.Visible = false;
Label13.Visible = false;
}
protected void Button3_Click(object sender, EventArgs e)
{
Session["pas"] = TextBox8.Text;
if (TextBox7.Text == "")
{
string myStringVariable1 = string.Empty;
myStringVariable1 = "Enter Client ID";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);
}
else
{
if (TextBox8.Text == "")
{
string myStringVariable1 = string.Empty;
myStringVariable1 = "Enter Client Password";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);
}
else
{
SqlDataAdapter adp = new SqlDataAdapter("select * from Registration", con);
DataSet ds = new DataSet();
adp.Fill(ds);
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{

owrid1 = ds.Tables[0].Rows[i]["ownerid"].ToString();
owrpwd = ds.Tables[0].Rows[i]["ownerpwd"].ToString();
blacked = ds.Tables[0].Rows[i]["Black"].ToString();
if (TextBox7.Text == owrid1 && TextBox8.Text == owrpwd && blacked=="True")
{

yes2 = "yes";
con.Open();
SqlCommand blsa = new SqlCommand("Update Registration set Count='0' where ownerid='"
+ TextBox7.Text + "'", con);
blsa.ExecuteNonQuery();
con.Close();
}}
if (yes2 == "yes")
{
Session["ownerid"] = TextBox7.Text;
//Response.Redirect("OwnerMain.aspx");
//Panel2.Visible = true;
Button7.Visible = true;
//this.Button1.Attributes.Add("onclick", "javascript:return OpenPopup()");
//onClick="genericPopup(this.href,300,300,no)"
//Response.Write("<script>window.close()</script>");
}
else
{
SqlDataAdapter adpb = new SqlDataAdapter("select ownerid,Count from Registration where
ownerid='"+ TextBox7.Text+"'", con);
DataSet dsb = new DataSet();
adpb.Fill(dsb);
Label14.Text=dsb.Tables[0].Rows[0]["Count"].ToString();
if ("0" == Label14.Text)
{
con.Open();
SqlCommand bla = new SqlCommand("Update Registration set Count=Count+1 where
ownerid='" + TextBox7.Text + "'", con);
bla.ExecuteNonQuery();
con.Close();
string count = string.Empty;
count = "Enter Clientid/Password Correctly.";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + Label14.Text + "');",
true);
}
if ("1" == Label14.Text)
{
con.Open();
SqlCommand bla = new SqlCommand("Update Registration set Count=Count+1 where
ownerid='" + TextBox7.Text + "'", con);
bla.ExecuteNonQuery();
con.Close();
string count = string.Empty;
count = "Enter Clientid/Password Correctly.";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + Label14.Text + "');",
true);
}
if ("2" == Label14.Text)
{con.Open();
SqlCommand bla = new SqlCommand("Update Registration set Count=Count+1 where
ownerid='" + TextBox7.Text + "'", con);
bla.ExecuteNonQuery();
con.Close();
string count = string.Empty;
count = "Enter Clientid/Password Correctly.";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + Label14.Text + "');",
true);
}
if ("3" == Label14.Text)
{
con.Open();
SqlCommand bla = new SqlCommand("Update Registration set Count=Count+1 where
ownerid='" + TextBox7.Text + "'", con);
bla.ExecuteNonQuery();
con.Close();
Label14.Text = "your Account Blacked";
string count = string.Empty;
count = "Enter Clientid/Password Correctly.";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + Label14.Text + "');",
true);
}
else
{
con.Open();
SqlCommand blsa = new SqlCommand("Update Registration set Black='Black' where
ownerid='" + TextBox7.Text + "'", con);
blsa.ExecuteNonQuery();
con.Close();
}
string myStringVariable1 = string.Empty;
myStringVariable1 = "Enter Clientid/Password Correctly.";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);}}}}
protected void Button4_Click(object sender, EventArgs e)
{ TextBox7.Text = "";
TextBox8.Text = ""; }
protected void Button7_Click(object sender, EventArgs e)
{
Panel3.Visible = true;
Button7.Visible = false;
pas1 = (string)Session["pas"];
if (TextBox7.Text == ""){
string myStringVariable1 = string.Empty;
myStringVariable1 = "Enter Client ID";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);}
else
{
if (pas1 == "")
{string myStringVariable1 = string.Empty;
myStringVariable1 = "Enter Client Password";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);}
else{
SqlDataAdapter adp = new SqlDataAdapter("select * from Registration", con);
DataSet ds = new DataSet();
adp.Fill(ds);
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
owrid = ds.Tables[0].Rows[i]["oid"].ToString();
owrid1 = ds.Tables[0].Rows[i]["ownerid"].ToString();
owrpwd = ds.Tables[0].Rows[i]["ownerpwd"].ToString();
if (TextBox7.Text == owrid1 && pas1 == owrpwd)
{
Random val = new Random();
int rno = val.Next(12345, 54321);
ranno = Convert.ToString(rno);
ranno1 = Encrypt(ranno);
Session["rendomnum"] = ranno1;
con.Open();
SqlCommand cmd = new SqlCommand("update Registration set securitykey='" + ranno1 +
"'where oid='" + owrid + "'", con);
cmd.ExecuteNonQuery();
con.Close();
message = "<hr><br>Hello " + "<b>" + owrid + " ! </b><br><br>" + "Your Login Security
Key is : " + "<b>" + ranno1 + "</b>";
to = ds.Tables[0].Rows[i]["emailid"].ToString();
NetworkCredential loginInfo = new NetworkCredential(gMailAccount, password);
MailMessage msg = new MailMessage();
msg.From = new MailAddress(gMailAccount);
msg.To.Add(new MailAddress(to));
msg.Subject = subject;
msg.Body = message;
msg.IsBodyHtml = true;
try{
SmtpClient client = new SmtpClient("smtp.gmail.com");
client.EnableSsl = true;
client.UseDefaultCredentials = false;
client.Credentials = loginInfo;
client.Send(msg);}
catch (Exception ex){
Console.WriteLine(ex);
Label11.Text = "OFFLINE : Failure Sending Mail !";
LinkButton4.Visible = true;}
yes2 = "yes";
}}
if (yes2 == "yes"){
Session["ownerid"] = TextBox7.Text;
Panel3.Visible = true; Label11.Visible = true;
TextBox9.Visible = true; Label12.Visible = true;
Button5.Visible = true; Button6.Visible = true; Button7.Visible = false;
}
else
{string myStringVariable1 = string.Empty;
myStringVariable1 = "Enter Clientid/Password Correctly.";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);
}}}}
protected void Button5_Click(object sender, EventArgs e)
{Securitykey1 = (string)Session["rendomnum"];
if (TextBox9.Text == Securitykey1)
{Session.Remove("rendomnum");
con.Open();
SqlCommand blsas = new SqlCommand("Update Registration set Rank=Rank+1 where
securitykey='" + TextBox9.Text + "'", con);
blsas.ExecuteNonQuery();
con.Close();
Response.Redirect("OwnerFileUpload.aspx");}
else{
TextBox9.Text = "";
//Response.Redirect("OwnerLogin.aspx");
string myStringVariable1 = string.Empty;
myStringVariable1 = "You are not authenticated. Plz try again once.";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);}}
protected void Button6_Click(object sender, EventArgs e)
{TextBox9.Text = "";}
protected void LinkButton4_Click(object sender, EventArgs e)
{
Panel3.Visible = true; Label11.Visible = true;
TextBox9.Visible = true; Label12.Visible = true;
Button5.Visible = true; Button6.Visible = true; Button7.Visible = false;
TextBox9.Text = (string)Session["rendomnum"];
string myStringVariable1 = string.Empty;
myStringVariable1 = "Your Login Public Key is : " + (string)Session["rendomnum"] ;
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);}
protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
{
Panel3.Visible = false; Label11.Visible = false;
Label12.Visible = false; TextBox9.Visible = false;
Button5.Visible = false; Button6.Visible = false;
Button7.Visible = true; Panel2.Visible = true;
}
private string Encrypt(string clearText)
{
string EncryptionKey = "MAKV2SPBNI99212";
//byte[] Key = Encoding.UTF8.GetBytes("asdf!@#$1234ASDF");
byte[] clearBytes = Encoding.Unicode.GetBytes(clearText);
using (Aes encryptor = Aes.Create())
{
Rfc2898DeriveBytes pdb = new Rfc2898DeriveBytes(EncryptionKey, new byte[] { 0x49,
0x76, 0x61, 0x6e, 0x20, 0x4d, 0x65, 0x64, 0x76, 0x65, 0x64, 0x65, 0x76 });
encryptor.Key = pdb.GetBytes(32);
encryptor.IV = pdb.GetBytes(16);
using (MemoryStream ms = new MemoryStream())
{
using (CryptoStream cs = new CryptoStream(ms, encryptor.CreateEncryptor(),
CryptoStreamMode.Write))
{cs.Write(clearBytes, 0, clearBytes.Length);
cs.Close();}
clearText = Convert.ToBase64String(ms.ToArray());
}}return clearText;}}
CloudReport.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CloudReport.aspx.cs"


Inherits="CloudReport" %>
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head runat="server">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Trust Enhanced Cryptographic Role-based Access Control for Secure Cloud Data
Storage</title><meta name="keywords" content="" />
<meta name="description" content="" />
<link href="default.css" rel="stylesheet" type="text/css" /></head>
<body bgcolor="#999966"><form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<div><div id="header"><div id="logo">
<center style="height: 72px; width: 820px"><asp:Label ID="Label2" runat="server"
Text="Trust Enhanced Cryptographic Role-based Access" Font-Bold="True"
Font-Size="XX-Large"></asp:Label><br />
<asp:Label ID="Label3" runat="server" Text="Control for Secure Cloud Data Storage" Font-
Bold="True"Font-Size="XX-Large"></asp:Label></center></div>
<asp:Image ID="Image8" runat="server"style="position:absolute; top: 224px; left: 952px;
width: 181px; height: 178px;"ImageUrl="~/images/user_search.png" />
<asp:Label ID="Label1" runat="server" Text="Owners Cloud Storage Server"
style="position:absolute; top: 173px; left: 407px; width: 276px; height: 28px;" Font-
Bold="True"Font-Names="Imprint MT Shadow" Font-Size="Large" ForeColor="Black">
</asp:Label></div><hr /><!-- end header --><!-- start page -->
<div id="wrapper"><div id="page"><div id="page-bgtop"><div id="page-bgbtm">
<center><rsweb:ReportViewer ID="ReportViewer1" runat="server"
style="position:absolute; top: 211px; left: 16px; width: 596px; margin-top: 0px;"
BackColor="#0000CC"Font-Names="Verdana"Font-
Size="8pt"InteractiveDeviceInfos="(Collection)"WaitMessageFont-Names="Verdana"
WaitMessageFont-Size="14pt"><LocalReport ReportPath="Report.rdlc">
<DataSources><rsweb:ReportDataSourceDataSourceId="ObjectDataSource1"
Name="DataSet1" /></DataSources></LocalReport></rsweb:ReportViewer>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
SelectMethod="GetData" TypeName="DataSet1TableAdapters.RegistrationTableAdapter">
</asp:ObjectDataSource><rsweb:ReportViewer ID="ReportViewer2" runat="server"
style="position:absolute; top: 213px; left: 613px;" BackColor="#FF6666"
Font-Names="Verdana" Font-Size="8pt" InteractiveDeviceInfos="(Collection)"
WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt" Width="652px">
<LocalReport ReportPath="Report2.rdlc"><DataSources>
<rsweb:ReportDataSource DataSourceId="ObjectDataSource2" Name="DataSet1" />
</DataSources></LocalReport></rsweb:ReportViewer><asp:ObjectDataSource
ID="ObjectDataSource2"runat="server"SelectMethod="GetData"
TypeName="DataSet1TableAdapters.filearchiveTableAdapter"></asp:ObjectDataSource>
</center></div></div></div></div><!-- end page --><!-- start footer --><div id="footer">
</div></div></form></body></html>
CloudReport.aspx.cs

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CloudReport.aspx.cs"


Inherits="CloudReport" %>
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head runat="server">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Trust Enhanced Cryptographic Role-based Access Control for Secure Cloud Data
Storage</title><meta name="keywords" content=""/><meta name="description"
content=""/><link href="default.css" rel="stylesheet" type="text/css" /></head>
<body bgcolor="#999966"><form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<div><div id="header"><div id="logo"><center style="height: 72px; width:
820px"><asp:Label ID="Label2" runat="server"Text="Trust Enhanced Cryptographic Role-
based Access" Font-Bold="True"Font-Size="XX-Large"></asp:Label><br />
<asp:Label ID="Label3" runat="server" Text="Control for Secure Cloud Data Storage" Font-
Bold="True" Font-Size="XX-Large"></asp:Label></center></div><asp:Image ID="Image8"
runat="server"style="position:absolute; top: 224px; left: 952px; width: 181px; height:
178px;"ImageUrl="~/images/user_search.png" />
<asp:Label ID="Label1" runat="server" Text="Owners Cloud Storage Server"
style="position:absolute; top: 173px; left: 407px; width: 276px; height: 28px;" Font-
Bold="True"Font-Names="Imprint MT Shadow" Font-Size="Large" ForeColor="Black" >
</asp:Label></div><hr /><!-- end header --><!-- start page --><div id="wrapper"><div
id="page"><div id="page-bgtop"><div id="page-bgbtm"><center><rsweb:ReportViewer
ID="ReportViewer1" runat="server"style="position:absolute; top: 211px; left: 16px; width:
596px; margin-top: 0px;" BackColor="#0000CC"Font-Names="Verdana" Font-Size="8pt"
InteractiveDeviceInfos="(Collection)"WaitMessageFont-Names="Verdana"
WaitMessageFont-Size="14pt"><LocalReport ReportPath="Report.rdlc"><DataSources>
<rsweb:ReportDataSource DataSourceId="ObjectDataSource1" Name="DataSet1" />
</DataSources></LocalReport></rsweb:ReportViewer>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"SelectMethod="GetData"
TypeName="DataSet1TableAdapters.RegistrationTableAdapter"></asp:ObjectDataSource>
<rsweb:ReportViewer ID="ReportViewer2" runat="server"
style="position:absolute; top: 213px; left: 613px;" BackColor="#FF6666"
Font-Names="Verdana" Font-Size="8pt" InteractiveDeviceInfos="(Collection)"
WaitMessageFont-Names="Verdana"
WaitMessageFont-Size="14pt" Width="652px">
<LocalReport ReportPath="Report2.rdlc"><DataSources>
<rsweb:ReportDataSource DataSourceId="ObjectDataSource2" Name="DataSet1" />
</DataSources></LocalReport></rsweb:ReportViewer>
<asp:ObjectDataSource ID="ObjectDataSource2" runat="server"
SelectMethod="GetData" TypeName="DataSet1TableAdapters.filearchiveTableAdapter">
</asp:ObjectDataSource>
</center></div></div></div></div><!-- end page --><!-- start footer -->
<div id="footer"></div></div>
</form></body></html>
Default.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"


Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--Design by Free CSS Templates
http://www.freecsstemplates.org
Released for free under a Creative Commons Attribution 2.5 License
Title : Undertaking
Version : 1.0
Released : 2010821
Description: A two-column web design, best for your personal and business blogging.-->
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Trust Enhanced Cryptographic Role-based Access Control for Secure Cloud Data
Storage</title><meta name="keywords" content=""/><meta name="description"
content=""/><link href="default.css" rel="stylesheet" type="text/css" />
</head><body bgcolor="#999966"><form id="form1" runat="server">
<!-- start header --><div id="header"><div id="logo">
<center style="height: 72px; width: 820px"><asp:Label ID="Label4" runat="server"
Text="Trust Enhanced Cryptographic Role-based Access" Font-Bold="True"
Font-Size="XX-Large"></asp:Label><br />
<asp:Label ID="Label5" runat="server" Text="Control for Secure Cloud Data Storage" Font-
Bold="True"Font-Size="XX-Large"></asp:Label>
<asp:ImageButton ID="ImageButton2" runat="server" CssClass="imgbtn"
style="position:relative; top: 42px; width: 80px; height: 34px; right: 20px;"
ImageUrl="~/images/User.png"PostBackUrl="~/ClientRegistration.aspx" /></center></div>
<asp:ImageButton ID="ImageButton1" runat="server" CssClass="imgbtn"
style="position:absolute; top: 86px; left: 165px; width: 74px; height: 34px; right: 845px;"
ImageUrl="~/images/Home.png" PostBackUrl="~/Default.aspx" />
<asp:ImageButton ID="ImageButton3" runat="server" CssClass="imgbtn"
style="position:absolute; top: 86px; width: 140px; height: 34px; left: 247px;"
ImageUrl="~/images/Administrator.png"PostBackUrl="~/AdminLogin.aspx" />
<asp:ImageButton ID="ImageButton4" runat="server" CssClass="imgbtn"
style="position:absolute; top: 86px; left: 393px; width: 140px; height: 36px; bottom: 403px;"
ImageUrl="~/images/Roles.png" PostBackUrl="~/Roleslogin.aspx" />
<asp:ImageButton ID="ImageButton5" runat="server" CssClass="imgbtn"
style="position:absolute; top: 86px; left: 539px; width: 140px; height: 36px;"
ImageUrl="~/images/Owners.png" PostBackUrl="~/tpalogin.aspx" />
<asp:Image ID="Image10" runat="server"style="position:absolute; top: 639px; left: 832px;
width: 181px; height: 178px;"ImageUrl="~/images/user_search.png" />
<asp:Image ID="Image9" runat="server"
style="position:absolute; top: 420px; left: 852px; width: 181px; height: 178px;"
ImageUrl="~/images/535061.png" />
<asp:Image ID="Image8" runat="server"
style="position:absolute; top: 214px; left: 852px; width: 181px; height: 178px;"
ImageUrl="~/images/user_edit.png" />
<asp:Image ID="Image6" runat="server"
style="position:absolute; top: 187px; left: 14px; width: 207px; height: 38px;"
ImageUrl="~/images/Architecture.png" />
<asp:Image ID="Image5" runat="server"
style="position:absolute; top: 478px; left: 16px; width: 207px; height: 38px;"
ImageUrl="~/images/Hierarchical RBAC.png" />
<asp:Image ID="Image7" runat="server"
style="position:absolute; top: 227px; left: 211px; width: 608px; height: 246px;"
ImageUrl="~/images/arcful11.png" />
<asp:Image ID="Image4" runat="server"
style="position:absolute; top: 695px; left: 365px; width: 379px; height: 152px;"
ImageUrl="~/images/Arc222tree.png" />
<asp:Image ID="Image2" runat="server"
style="position:absolute; top: 516px; left: 364px; width: 379px; height: 152px;"
ImageUrl="~/images/Arctrree333.png" />
<asp:Label ID="Label3" runat="server" Text="Trust Decision Engine"
style="position:absolute; top: 833px; left: 812px; width: 207px; height: 26px;"
Font-Bold="True" Font-Names="Imprint MT Shadow" Font-Size="Large"
ForeColor="Black" ></asp:Label>
<asp:Label ID="Label6" runat="server" Text="User Behavior Monitor"
style="position:absolute; top: 613px; left: 812px; width: 214px; height: 24px;"
Font-Bold="True" Font-Names="Imprint MT Shadow" Font-Size="Large"
ForeColor="Black" ></asp:Label>
<asp:Label ID="Label2" runat="server" Text="User Behavior Auditor"
style="position:absolute; top: 396px; left: 828px; width: 202px; height: 23px;"
Font-Bold="True" Font-Names="Imprint MT Shadow" Font-Size="Large"
ForeColor="Black" ></asp:Label>
<asp:Label ID="Label1" runat="server" Text="Cryptographic RBAC System"
style="position:absolute; top: 169px; left: 374px;" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="X-Large" ForeColor="Black"
></asp:Label>
<%--<asp:Panel Style="position: absolute; top: 945px; left: 17px; height: 29px; width:
959px;"
ID="Panel1" runat="server">
<font size="6" face="Bookman old style" color="yellow">
<marquee style="position: absolute; top: -1px; left: 10px; width: 940px; height: 38px;"
behavior="scroll"
direction="left" scrollamount="15">WWW.chennaisunday.com</marquee>
</font>
<font size="6" face="Bookman old style" color="yellow">
<marquee style="position: absolute; top: 40px; left: 6px; width: 940px; height: 39px;"
behavior="scroll"
direction="right" scrollamount="15">Contact us:9566137117</marquee></font>
</asp:Panel><font size="4" face="Bookman old style" color="yellow">
<marquee style="position: absolute; top: 0px; left: 7px; width: 940px; height: 26px;"
behavior="alternate"direction="left" scrollamount="5">WWW.chennaisunday.com || Contact
us:9566137117</marquee></font>--%>
</div><hr /><!-- end header --><!-- start page --><div id="wrapper"><div id="page"><div
id="page-bgtop"><div id="page-bgbtm"></div></div></div></div><!-- end page -->
<!-- start footer --><div id="footer"></div></form>
</body>
</html>
Default2.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs"


Inherits="Default2" %>
<%@ Register Assembly="System.Web.DataVisualization, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
<asp:Chart ID="Chart1" runat="server">
<Series>
<asp:Series Name="Series1">
</asp:Series>
</Series>
<ChartAreas>
<asp:ChartArea Name="ChartArea1">
</asp:ChartArea>
</ChartAreas>
</asp:Chart>
</form>
</body>
</html>
Down.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/ClientMasterPage.master"


AutoEventWireup="true" CodeFile="down.aspx.cs" Inherits="down" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ClientRegistration" Runat="Server">
</asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="OwnerFileUpload"
Runat="Server"></asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="packetsending" Runat="Server">
</asp:Content><asp:Content ID="Content4" ContentPlaceHolderID="Download"
Runat="Server"></asp:Content><asp:Content ID="Content5"
ContentPlaceHolderID="Download1" Runat="Server"></asp:Content>
<asp:Content ID="Content6" runat="server"contentplaceholderid="ContentPlaceHolder1">
<p><asp:Button ID="Button1" runat="server" onclick="Button1_Click1"
Text="Button"style="z-index: 1; left: 330px; top: 228px; position: absolute"
Width="292px"/></p><asp:TextBox ID="TextBox1" runat="server"
style="z-index: 1; left: 404px; top: 276px; position: absolute"></asp:TextBox>
&nbsp;<asp:GridView ID="ggt" CssClass="Gridview" runat="server"
AutoGenerateColumns="False" DataKeyNames="FilePath" CellPadding="4"
ForeColor="#333333" GridLines="None"style="z-index: 1; left: 200px; top: 326px; position:
absolute; height: 168px; width: 423px" ><EditRowStyle BackColor="#999999" />
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" ForeColor="#284775" /><Columns>
<asp:BoundField DataField="fid" HeaderText="fid" />
<asp:BoundField DataField="filepath" HeaderText="ffilename" />
<asp:BoundField DataField="fowner" HeaderText="File Owner" />
<asp:BoundField DataField="fenccryptokey" HeaderText="Genproof key" />
<asp:BoundField DataField="fdatetime" HeaderText="Date" />
<asp:TemplateField HeaderText="filePath">
<ItemTemplate>
<asp:LinkButton ID="lnkDownload" runat="server" Text="Download"
OnClick="lnkDownload_Click"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
<SortedAscendingCellStyle BackColor="#E9E7E2" />
<SortedAscendingHeaderStyle BackColor="#506C8C" />
<SortedDescendingCellStyle BackColor="#FFFDF8" />
<SortedDescendingHeaderStyle BackColor="#6F8DAE" />
</asp:GridView>
</p>
<asp:Button ID="Button2" runat="server" onclick="Button2_Click"
style="z-index: 1; left: 1012px; top: 435px; position: absolute"
Text="Back To Home" />
</asp:Content>
Down.aspx.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;
public partial class down : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(@"Data Source=SHANKARI;Initial Catalog=Trust
Enhanced Cryptographic;Integrated Security=True");
SqlCommand cmd = new SqlCommand();
protected void Page_Load(object sender, EventArgs e)
{
TextBox1.Visible = false; Button1.Visible = false;
con.Open();
SqlCommand cmd = new SqlCommand("select
fid,ffilename,fowner,fenccryptokey,fdatetime,filepath from filearchive where
keystatus='Sent'", con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds); con.Close();
ggt.DataSource = ds;
ggt.DataBind(); }
protected void lnkDownload_Click(object sender, EventArgs e)
{
LinkButton lnkbtn = sender as LinkButton;
GridViewRow gvrow = lnkbtn.NamingContainer as GridViewRow;
string filePath = ggt.DataKeys[gvrow.RowIndex].Value.ToString();
Response.ContentType = "image/jpg";
Response.AddHeader("Content-Disposition", "attachment;filename=\"" + filePath + "\"");
Response.TransmitFile(filePath);
Response.End(); }
protected void Button1_Click1(object sender, EventArgs e)
{
//con.Open();
//SqlCommand cmd = new SqlCommand("select
fid,ffilename,fowner,fenccryptokey,fdatetime,filepath from filearchive where
keystatus='Sent'", con);
//SqlDataAdapter da = new SqlDataAdapter(cmd);
//DataSet ds = new DataSet();
//da.Fill(ds); //con.Close();
//ggt.DataSource = ds;
//ggt.DataBind();
}
protected void Button2_Click(object sender, EventArgs e)
{Response.Redirect("default.aspx");}}
Download.aspx

<%@ Page Language="C#" AutoEventWireup="true"


MasterPageFile="~/ClientMasterPage.master" CodeFile="Download.aspx.cs"
Inherits="Download" %>
<asp:Content ContentPlaceHolderID="Download" runat="server">
<asp:Panel Style="position: absolute; top: 110px; left: 89px; height: 18px; width: 959px;"
ID="Panel1" runat="server">
<font size="4" face="Bookman old style" color="white">
<marquee style="position: absolute; top: -10px; left: -106px; width: 940px; margin-bottom:
0px;" behavior="scroll" direction="left" scrollamount="15">Alert Message !</marquee>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<br /><br /><br /></font></asp:Panel>
<asp:Label style="position:absolute; top: 211px; left: 365px; width: 405px;" ID="Label1"
runat="server" Font-Italic="False" Font-Bold="True"
Font-Names="Britannic Bold" Font-Size="X-Large" Text="TPA issuing files to download"
ForeColor="#0000CC" ></asp:Label>
<asp:GridView style="position: absolute; top: 256px; left: 277px; width: 599px;"
ID="GridView1" runat="server" AutoGenerateColumns="False"
CellPadding="4" ForeColor="#333333" AllowPaging="True" PageSize="15"
onpageindexchanging="GridView1_PageIndexChanging" GridLines="None" >
<RowStyle BackColor="#FFFBD6" ForeColor="#333333" /><Columns>
<asp:BoundField DataField="fid" HeaderText="File ID" />
<asp:BoundField DataField="ffilename" HeaderText="File Name" />
<asp:BoundField DataField="fowner" HeaderText="File Owner" />
<asp:BoundField DataField="fenccryptokey" HeaderText="Genproof key" />
<asp:BoundField DataField="fdatetime" HeaderText="Date" />
<asp:HyperLinkField HeaderText="Download" Text="Download"
DataNavigateUrlFields="fid" DataNavigateUrlFormatString="down.aspx?ID={0}" />
</Columns><FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#FFCC66" ForeColor="#333333"
HorizontalAlign="Center" /><SelectedRowStyle BackColor="#FFCC66" ForeColor="Navy"
Font-Bold="True" /><HeaderStyle BackColor="#990000" Font-Bold="True"
ForeColor="White" /><AlternatingRowStyle BackColor="White" /></asp:GridView>
<%-- <asp:LinkButton ID="LinkButton2" runat="server"
STYLE="position:absolute; top: 435px; left: 755px;" Font-Bold="False"
Font-Names="Snap ITC" Font-Size="Large" Font-Underline="False"
ForeColor="White" PostBackUrl="~/tpaverify.aspx" >Alert Message</asp:LinkButton>
<asp:LinkButton ID="LinkButton1" runat="server" Font-Bold="False"
Font-Names="Snap ITC" Font-Size="Large" Font-Underline="False"
ForeColor="White" PostBackUrl="~/KeyResponses.aspx"
STYLE="position:absolute; top: 475px; left: 755px; width: 161px;">Key
Responses</asp:LinkButton>
<asp:LinkButton ID="LinkButton3" runat="server" Font-Bold="False"
Font-Names="Snap ITC" Font-Size="Large" Font-Underline="False"
ForeColor="White" PostBackUrl="~/Default.aspx"
STYLE="position:absolute; top: 515px; left: 755px; width: 149px;">Back to
Home</asp:LinkButton>--%>
</asp:Content>

Download.aspx.cs

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
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;
using System.Xml.Linq;
using System.Data.SqlClient;
public partial class Download : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]);
protected void Page_Load(object sender, EventArgs e)
{SqlDataAdapter adp1 = new SqlDataAdapter("Select * from filearchive where
keystatus='Sent'", con); DataSet ds1 = new DataSet(); adp1.Fill(ds1);
if (ds1.Tables[0].Rows.Count > 0)
{GridView1.DataSource = ds1; GridView1.DataBind();}
else
{MsgBox.Show("TPA doesn't sent any files to download");}
Session["owner"] = ds1.Tables[0].Rows[0]["fowner"].ToString();
Session["fid1"] = ds1.Tables[0].Rows[0]["fid"].ToString();
Session["fname"] = ds1.Tables[0].Rows[0]["ffilename"].ToString();}
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{GridView1.PageIndex = e.NewPageIndex; bindgrid();}
public void bindgrid()
{SqlDataAdapter adp1 = new SqlDataAdapter("Select * from filearchive where
keystatus='Sent'", con);
DataSet ds1 = new DataSet(); adp1.Fill(ds1);
if (ds1.Tables[0].Rows.Count > 0)
{GridView1.DataSource = ds1; GridView1.DataBind();}
else
{MsgBox.Show("TPA doesn't send any files to download");}
Session["owner"] = ds1.Tables[0].Rows[0]["fowner"].ToString();
Session["fid1"] = ds1.Tables[0].Rows[0]["fid"].ToString();
Session["fname"] = ds1.Tables[0].Rows[0]["ffilename"].ToString();}
protected void LinkButton1_Click(object sender, EventArgs e)
{LinkButton lnkbtn = sender as LinkButton;
GridViewRow gvrow = lnkbtn.NamingContainer as GridViewRow;
string filePath = GridView1.DataKeys[gvrow.RowIndex].Value.ToString();
Response.ContentType = "image/jpg";
Response.AddHeader("Content-Disposition", "attachment;filename=\"" + filePath + "\"");
Response.TransmitFile(Server.MapPath(filePath));
Response.End();}}
IntruderDetails.aspx

<%@ Page Language="C#" AutoEventWireup="true"


MasterPageFile="~/TPAMasterPage.master" CodeFile="Intruderdetails.aspx.cs"
Inherits="Intruderdetails" %>
<asp:Content ContentPlaceHolderID="Intruderdetails" runat="server">
<asp:Panel Style="position: absolute; top: 106px; left: 22px; height: 18px; width: 959px;"
ID="Panel1" runat="server">
<font size="4" face="Bookman old style" color="white">
<marquee style="position: absolute; top: -1px; left: 10px; width: 940px;" behavior="scroll"
direction="left" scrollamount="15">Alert Message !</marquee></font></asp:Panel>
<asp:Label style="position:absolute; top: 201px; left: 22px;" ID="Label1"
runat="server" Font-Italic="True" Font-Bold="True"
Font-Names="Britannic Bold" Font-Size="X-Large" Text="Intruder Alerts"
ForeColor="#CC3300" BackColor="#FFFFCC"></asp:Label>
<asp:GridView style="position: absolute; top: 256px; left: 87px; width: 599px;"
ID="GridView1" runat="server" AutoGenerateColumns="False"
CellPadding="4" ForeColor="#333333" AllowPaging="True" PageSize="15"
onpageindexchanging="GridView1_PageIndexChanging" GridLines="None" >
<RowStyle BackColor="#FFFBD6" ForeColor="#333333" /><Columns>
<asp:BoundField DataField="fid" HeaderText="File ID" />
<asp:BoundField DataField="ffilename" HeaderText="File Name" />
<asp:BoundField DataField="fext" HeaderText="File Type" />
<asp:BoundField DataField="fowner" HeaderText="File Owner" />
<asp:BoundField DataField="fdatetime" HeaderText="Date" />
<asp:BoundField DataField="totalbytes" HeaderText="Total Bytes" /></Columns>
<FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#FFCC66" ForeColor="Navy" Font-Bold="True" />
<HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" /> </asp:GridView>
<asp:LinkButton ID="LinkButton2" runat="server" STYLE="position:absolute; top: 435px;
left: 755px;" Font-Bold="True" Font-Names="Imprint MT Shadow" Font-Size="Large"
Font-Underline="False" ForeColor="Black" PostBackUrl="~/tpaverify.aspx" >Alert
Message</asp:LinkButton> <asp:LinkButton ID="LinkButton1" runat="server" Font-
Bold="True" Font-Names="Imprint MT Shadow" Font-Size="Large" Font-
Underline="False" ForeColor="Black" PostBackUrl="~/KeyResponses.aspx"
STYLE="position:absolute; top: 475px; left: 755px; width: 177px;">Key
Responses</asp:LinkButton><asp:LinkButton ID="LinkButton6" runat="server" Font-
Bold="True"Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black" PostBackUrl="~/Intruderdetails.aspx"
STYLE="position:absolute; top: 515px; left: 755px; width: 176px;">Intruder
Details</asp:LinkButton><asp:LinkButton ID="LinkButton4" runat="server" Font-
Bold="True"Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black" PostBackUrl="~/AdminOwnerDetails.aspx"
STYLE="position:absolute; top: 555px; left: 755px; width: 161px;">Client
Details</asp:LinkButton><asp:LinkButton ID="LinkButton3" runat="server" Font-
Bold="True"Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black" PostBackUrl="~/Default.aspx"STYLE="position:absolute; top: 625px;
left: 755px; width: 149px;">Back to Home</asp:LinkButton></asp:Content>
IntruderDetails.aspx.cs

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
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;
using System.Xml.Linq;
using System.Data.SqlClient;
public partial class Intruderdetails : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]);
protected void Page_Load(object sender, EventArgs e)
{
SqlDataAdapter adp1 = new SqlDataAdapter("Select * from filearchive where
fmodify='Block'", con);
DataSet ds1 = new DataSet();
adp1.Fill(ds1);
if (ds1.Tables[0].Rows.Count > 0)
{
GridView1.DataSource = ds1;
GridView1.DataBind();
}
else
{MsgBox.Show("No Intruder Alerts Found");
}}
public void bindgrid()
{
SqlDataAdapter adp1 = new SqlDataAdapter("Select * from filearchive where
fmodify='Block'", con);
DataSet ds1 = new DataSet();
adp1.Fill(ds1);
if (ds1.Tables[0].Rows.Count > 0)
{GridView1.DataSource = ds1;
GridView1.DataBind();}
else
{MsgBox.Show("No Intruder Alerts Found");}
}
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridView1.PageIndex = e.NewPageIndex;
bindgrid();
}}

KeyResponses.aspx

<%@ Page Language="C#" AutoEventWireup="true"


MasterPageFile="~/TPAMasterPage.master" CodeFile="KeyResponses.aspx.cs"
Inherits="KeyResponses" %>
<asp:Content ContentPlaceHolderID="KeyResponses" runat="server">
<asp:Panel Style="position: absolute; top: 106px; left: 22px; height: 18px; width: 959px;"
ID="Panel1" runat="server">
<font size="4" face="Bookman old style" color="white">
<marquee style="position: absolute; top: -1px; left: 10px; width: 940px;" behavior="scroll"
direction="left" scrollamount="15">Alert Message !</marquee>
</font></asp:Panel>
<asp:Label style="position:absolute; top: 201px; left: 22px;" ID="Label1"
runat="server" Font-Italic="True" Font-Bold="True"
Font-Names="Britannic Bold" Font-Size="X-Large" Text="Key Responses:"
ForeColor="#CC3300" BackColor="#FFFFCC"></asp:Label>
<asp:GridView style="position: absolute; top: 256px; left: 87px; width: 599px;"
ID="GridView1" runat="server" AutoGenerateColumns="False"
CellPadding="4" ForeColor="#333333"AllowPaging="True" PageSize="15"
onpageindexchanging="GridView1_PageIndexChanging" GridLines="None" >
<RowStyle BackColor="#FFFBD6" ForeColor="#333333" /><Columns>
<asp:BoundField DataField="fid" HeaderText="File ID" />
<asp:BoundField DataField="ffilename" HeaderText="File Name" />
<asp:BoundField DataField="fowner" HeaderText="File Owner" />
<asp:BoundField DataField="fenccryptokey" HeaderText="GenProof key" />
<asp:BoundField DataField="fdatetime" HeaderText="Date" />
<asp:HyperLinkField HeaderText="View" Text="View" DataNavigateUrlFields="fid"
DataNavigateUrlFormatString="keyResponses1.aspx?ID={0}" /></Columns>
<FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#FFCC66" ForeColor="#333333"
HorizontalAlign="Center" /><SelectedRowStyle BackColor="#FFCC66" ForeColor="Navy"
Font-Bold="True" /><HeaderStyle BackColor="#990000" Font-Bold="True"
ForeColor="White" /><AlternatingRowStyle BackColor="White" /></asp:GridView>
<asp:LinkButton ID="LinkButton2" runat="server"
STYLE="position:absolute; top: 435px; left: 755px;" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black" PostBackUrl="~/tpaverify.aspx" >Alert Message</asp:LinkButton>
<asp:LinkButton ID="LinkButton1" runat="server" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black" PostBackUrl="~/KeyResponses.aspx"
STYLE="position:absolute; top: 475px; left: 755px; width: 161px;">Key
Responses</asp:LinkButton><asp:LinkButton ID="LinkButton5" runat="server" Font-
Bold="True"Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black" PostBackUrl="~/Intruderdetails.aspx"
STYLE="position:absolute; top: 515px; left: 755px; width: 172px;">Intruder
Details</asp:LinkButton><asp:LinkButton ID="LinkButton4" runat="server" Font-
Bold="True"Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black" PostBackUrl="~/AdminOwnerDetails.aspx"STYLE="position:absolute;
top: 555px; left: 755px; width: 161px;">Client Details</asp:LinkButton></asp:Content>
KeyResponses.aspx.cs

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
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;
using System.Xml.Linq;
using System.Data.SqlClient;
public partial class KeyResponses : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]);
protected void Page_Load(object sender, EventArgs e)
{
SqlDataAdapter adp1 = new SqlDataAdapter("Select * from filearchive where
serverview='View'", con);
DataSet ds1 = new DataSet();
adp1.Fill(ds1);
if (ds1.Tables[0].Rows.Count > 0)
{GridView1.DataSource = ds1;
GridView1.DataBind();
}
else
{
MsgBox.Show("No KeyResponse Found");
}}
public void bindgrid()
{
SqlDataAdapter adp1 = new SqlDataAdapter("Select * from filearchive where
serverview='View'", con);
DataSet ds1 = new DataSet();
adp1.Fill(ds1);
if (ds1.Tables[0].Rows.Count > 0)
{GridView1.DataSource = ds1;
GridView1.DataBind();}
else
{MsgBox.Show("No KeyResponse Found");
}}
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridView1.PageIndex = e.NewPageIndex;
bindgrid();
}}
OwnerCentralRepository.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/ServerMasterPage.master"


AutoEventWireup="true" CodeFile="OwnerCentralRepository.aspx.cs"
Inherits="OwnerCentralRepository" %>
<asp:Content ID="Content1" ContentPlaceHolderID="serververify" runat="server">
<asp:Panel Style="position: absolute; top: 206px; left: 22px; height: 293px; width: 846px;
overflow:scroll"ID="Panel1" runat="server">
<font size="4" face="Bookman old style" color="white">
<marquee style="position: absolute; top: -1px; left: 10px; width: 940px;" behavior="scroll"
direction="left" scrollamount="15">File Interaction History Central Repository !</marquee>
</font><br /><br /><br /><center>
<asp:GridView ID="GridView1" runat="server"BackColor="#DEBA84"
BorderColor="#DEBA84" BorderWidth="1px"CellPadding="3" Font-Bold="True"
BorderStyle="None" CellSpacing="2"Font-Names="Times New Roman" Font-
Size="Medium" ForeColor="#0000CC">
<Columns>
<asp:TemplateField HeaderText="Fales"><ItemTemplate>
<asp:LinkButton ID="btnlinkAccepted" runat="server"onclick="btnlinkAccepted_Click"
Font-Bold="True"Font-Names="Imprint MT Shadow" Font-Size="Medium">Trust Data
Black</asp:LinkButton></ItemTemplate></asp:TemplateField>
</Columns>
<FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
<HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
<PagerStyle ForeColor="#8C4510"HorizontalAlign="Center" />
<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
<SelectedRowStyle BackColor="#738A9C" ForeColor="White" Font-Bold="True" />
</asp:GridView></center>
</asp:Panel><br />
<asp:Label style="position:absolute; top: 211px; left: 382px;" ID="Label1"
runat="server" Font-Italic="False" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="X-Large" Text="Certificate Authority"
ForeColor="#CC3300"></asp:Label>
<asp:LinkButton ID="LinkButton2" runat="server"
STYLE="position:absolute; top: 435px; left: 885px; width: 243px;" Font-Bold="True"
Font-Size="Large" Font-Underline="False"
ForeColor="Black" PostBackUrl="~/serververify.aspx" >key Request
Message</asp:LinkButton>
<asp:LinkButton ID="LinkButton3" runat="server" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black"
STYLE="position:absolute; top: 472px; left: 895px; width: 149px;"
PostBackUrl="~/Default.aspx">Back to Home</asp:LinkButton>
</asp:Content>
OwnerCentralRepository.aspx.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Configuration;
using System.Data;
public partial class OwnerCentralRepository : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]);
protected void Page_Load(object sender, EventArgs e)
{
try
{
if (!IsPostBack)
{
SqlDataAdapter sda = new SqlDataAdapter("select
fid,fsubject,ffilename,fsizeinkb,fdatetime,fowner,tpaview,serverview,keystatus from
Registration", con);
DataSet ds = new DataSet();
sda.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
}}
catch (Exception ex)
{
MsgBox.Show("Time out");
}}
protected void btnlinkAccepted_Click(object sender, EventArgs e)
{
try
{
con.Open();
GridViewRow gr = ((sender as LinkButton).NamingContainer as GridViewRow);
Session["oid"] = gr.Cells[1].Text.Trim();
SqlCommand cmdA = new SqlCommand("Update filearchive set Black='Trust Data Black'
where oid='" + gr.Cells[1].Text.Trim() + "'", con);
cmdA.ExecuteNonQuery();
con.Close();
}
catch (Exception ex)
{
ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(),
Guid.NewGuid().ToString(), "alert(''Invalid Authenticate');", true);
}}}
OwnerFileUpload.aspx

<%@ Page Language="C#" AutoEventWireup="true"


MasterPageFile="~/ClientMasterPage.master" CodeFile="OwnerFileUpload.aspx.cs"
ValidateRequest="false" Inherits="OwnerFileUpload" %>
<asp:Content ContentPlaceHolderID="OwnerFileUpload" runat="server">
<asp:Panel Style="position: absolute; top: 106px; left: 22px; height: 18px; width: 959px;"
ID="Panel1" runat="server">
<font size="4" face="Bookman old style" color="white">
<marquee style="position: absolute; top: -1px; left: 10px; width: 940px;" behavior="scroll"
direction="left" scrollamount="15">Upload Files !</marquee>
</font>
</asp:Panel>
<asp:Label style="position:absolute; top: 203px; left: 390px; height: 35px;" ID="Label1"
runat="server" Font-Italic="True" Font-Bold="True"
Font-Names="Century Schoolbook" Font-Size="XX-Large" Text="File Upload"
ForeColor="#993300" ></asp:Label>
<asp:LinkButton ID="LinkButton5" runat="server" Font-Bold="True"
Font-Names="Times New Roman" Font-Size="Large" Font-Underline="False"
ForeColor="Red" STYLE="position:absolute; top: 545px; left: 755px; width: 149px;"
PostBackUrl="~/UserttoRolesauditor.aspx" >Roles Auditer</asp:LinkButton>
<asp:Panel style="position:absolute; top: 251px; left: 266px; height: 290px; width: 430px;"
ID="Panel2" runat="server" BorderColor="#CC3300"
BorderStyle="Solid" BorderWidth="5px" >
<asp:Label style="position:absolute; top: 42px; left: 29px;" ID="Label3"
runat="server" Text="File ID : " Font-Bold="True"
Font-Names="Times New Roman" Font-Size="Large" ForeColor="Red"></asp:Label>
<asp:Label style="position:absolute; top: 40px; left: 140px;" ID="Label4"
runat="server" Font-Bold="True" Font-Names="Times New Roman"
Font-Size="Larger"></asp:Label>
<asp:Label ID="Label5" runat="server" Font-Bold="True"
style="position:absolute; top: 100px; left: 20px;" Text="Subject : "
Font-Names="Times New Roman" Font-Size="Large" ForeColor="Red"></asp:Label>
<asp:TextBox style="position:absolute; top: 100px; left: 140px; width: 190px; text-align:
center;"Font-Names="Bookman Old Style" ID="TextBox2" runat="server"></asp:TextBox>
<asp:Label style="position:absolute; top: 160px; left: 15px;" ID="Label2"
runat="server" Text="Upload File : " Font-Bold="True"
Font-Names="Times New Roman" Font-Size="Large" ForeColor="Red"></asp:Label>
<asp:FileUpload style="position:absolute; top: 160px; left: 140px; height: 24px; width:
221px;"ID="FileUpload1" runat="server" />
<asp:Label style="position:absolute; top: 250px; left: 67px; width: 327px;" ID="Label7"
runat="server" Font-Size="Medium"ForeColor="#B4045F" Font-Bold="True" Font-
Names="Verdana"></asp:Label></asp:Panel>
<asp:LinkButton ID="LinkButton2" runat="server"
STYLE="position:absolute; top: 435px; left: 755px;" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="#FF3300" PostBackUrl="~/ClientRegistration.aspx" >File
Upload</asp:LinkButton><asp:Label ID="Label8" runat="server" Text="Label"
Visible="False"></asp:Label><asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager></asp:Content>
OwnerFileUpload.aspx.cs

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
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;
using System.Xml.Linq;
using System.Diagnostics;
using System.Text;
using System.Security.Cryptography;
using System.IO;
using System.Net;
using System.Net.Mail;
using System.Data.SqlClient;
public partial class OwnerFileUpload : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]);
Class1 cs = new Class1();
Cryptography cr = new Cryptography();
float sessionfilesize;
string totalbytes;
string gMailAccount = "[email protected]";
string password = "project5";
string to;
string subject = "Cryptography Encryption Key";
string message;
string ownerid, filePath, filename, filesize, fileext, date;
string cryptographykey, fileenccryptographykey;
float filesiz = 0f;
string splitfilesize, checkfilename, yes, yes1, binary1, binary1enc, singlefilesize,s1;
string fverify = "NO", fmodify = "", fdownload = "Block", keyrequest = "Null", emailid;
protected void Page_Load(object sender, EventArgs e)
{if (!IsPostBack){
Label4.Text = Convert.ToString(cs.idgeneration1());
Label7.Visible = false;}
ownerid = (string)Session["ownerid"];}
protected void Button3_Click(object sender, EventArgs e)
{if (Label1.Text == "OK"){
//Button2.Text = "Check..";
//Label7.Text = "File Uploaded Status..";
//Label7.ForeColor = System.Drawing.ColorTranslator.FromHtml("#B4045F");}
else{
filename = System.IO.Path.GetFileName(FileUpload1.FileName);
if (filename == ""){
string myStringVariable1 = string.Empty;
myStringVariable1 = "select any one file";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);}
//File Upload TextBox is Empty?
Else
{
//filePath = Request.PhysicalApplicationPath + "Uploads/" +
System.IO.Path.GetFileName(AsyncFileUpload1.FileName);
//AsyncFileUpload1.SaveAs(filePath);
//byte[] filebytes = new byte[AsyncFileUpload1.PostedFile.InputStream.Length + 1];
//AsyncFileUpload1.PostedFile.InputStream.Read(filebytes, 0, filebytes.Length);
////byte[] filebytes = new byte[AsyncFileUpload1.PostedFile.InputStream.Length];
//fileext = System.IO.Path.GetExtension(AsyncFileUpload1.PostedFile.FileName);
filePath = Request.PhysicalApplicationPath + "Uploads/" +
System.IO.Path.GetFileName(FileUpload1.FileName);
FileUpload1.SaveAs(filePath);
byte[] filebytes = new byte[FileUpload1.PostedFile.InputStream.Length];
FileUpload1.PostedFile.InputStream.Read(filebytes, 0, filebytes.Length);
//byte[] filebytes = new byte[AsyncFileUpload1.PostedFile.InputStream.Length];
fileext = System.IO.Path.GetExtension(FileUpload1.PostedFile.FileName);
filesiz = (float)FileUpload1.PostedFile.ContentLength / 1024;
filesize = Convert.ToString(filesiz) + " KB";
date = Convert.ToString(DateTime.Now.ToShortDateString());
totalbytes = Convert.ToString(FileUpload1.PostedFile.ContentLength);
Session["totalbytes"] = totalbytes;
sessionfilesize = (float)FileUpload1.PostedFile.ContentLength / 9;
Session["Filecontent"] = sessionfilesize;
singlefilesize = Convert.ToString(FileUpload1.PostedFile.ContentLength / 9);
s1 = Convert.ToString(singlefilesize);
Random val = new Random();
int rno = val.Next(12345, 54321);
cryptographykey = Convert.ToString(rno);
fileenccryptographykey = cr.Encrypt(cryptographykey);
//splitfilesize = Convert.ToString(filesiz);
//for (int i = 0; i < splitfilesize.Length; i++)
//{
// char c = splitfilesize[i];
// string binary = Convert.ToString(c, 2);
// binary1 = binary1 + binary;
//}
//binary1enc = cr.Encrypt(binary1);
//TextBox3.Text = binary1;
//Label9.Visible = true;
//TextBox3.Visible = true;
if (TextBox2.Text == ""){
string myStringVariable1 = string.Empty;
myStringVariable1 = "Enter File Subject.";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);}
//File Subject TextBox is Empty?
else{
SqlDataAdapter adp = new SqlDataAdapter("select * from filearchive", con);
DataSet ds = new DataSet();
adp.Fill(ds);
for (int i = 0; i < ds.Tables[0].Rows.Count; i++){
checkfilename = ds.Tables[0].Rows[i]["ffilename"].ToString();
if (checkfilename == filename)
{
yes = "yes";
goto Outer;}
else{
yes = "no";
}}
Outer:
yes1 = "yes";
if (yes != "yes")
{
con.Open();
SqlCommand cmd = new SqlCommand("insert into filearchive values('" + Label4.Text + "','"
+ TextBox2.Text + "','" + filePath + "',@files,'" + filename + "','" + fileext + "','" + filesize +
"','" + date + "','" + ownerid + "','" + fileenccryptographykey + "','" + binary1enc + "','" +
fverify + "','" + fmodify + "','" + fdownload + "','" + keyrequest + "','" + totalbytes + "','" +
sessionfilesize + "','" + singlefilesize + "','','','','','','','','','','','','','','','','','','','','','','')", con);
cmd.Parameters.AddWithValue("@files", filebytes);
cmd.ExecuteNonQuery();
con.Close();
//filename = "";
Session["fid1"] = Label4.Text;
Label7.Text = "File Uploaded Successfully..";
Label7.Visible = true;
//Button2.Text = "OK";
Label7.ForeColor = System.Drawing.ColorTranslator.FromHtml("#088A08");
//ModalPopupExtender1.Show();
//Panel3.Visible = true;
//SqlDataAdapter adp1 = new SqlDataAdapter("select * from Registration where ownerid='"
+ (string)Session["ownerid"] + "'", con);
//DataSet ds1 = new DataSet();
//adp1.Fill(ds1);
//emailid = ds1.Tables[0].Rows[0]["emailid"].ToString();
//message = "<hr><br>" + "File Name : <b>" + filename + " ! </b><br><br>" +
"Cryptography Encryption Key is : " + "<b>" + fileenccryptographykey + "</b>";
//to = emailid;
//NetworkCredential loginInfo = new NetworkCredential(gMailAccount, password);
//MailMessage msg = new MailMessage();
//msg.From = new MailAddress(gMailAccount);
//msg.To.Add(new MailAddress(to));
//msg.Subject = subject;
//msg.Body = message;
//msg.IsBodyHtml = true;

//try
//{
// Label6.Visible = true;
// Label6.ForeColor = System.Drawing.ColorTranslator.FromHtml("#226116");
// Label6.Text = "File Cryptography Encryption Key Sent To Mail !";
// SmtpClient client = new SmtpClient("smtp.gmail.com");
// client.EnableSsl = true;
// client.UseDefaultCredentials = false;
// client.Credentials = loginInfo;
// client.Send(msg);
//}
//catch (Exception ex)
//{
// Label6.Visible = true;
// Label6.ForeColor = System.Drawing.ColorTranslator.FromHtml("#fa0505");
// Console.WriteLine(ex);
// Label6.Text = "OFFLINE : Failure Sending Mail !";
//}
}
else{
string myStringVariable1 = string.Empty;
myStringVariable1 = "This File Name Already Exists.";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);
}}
Page_Load(null, EventArgs.Empty);
}}}
protected void Button1_Click(object sender, EventArgs e)
{
TextBox2.Text = "";
//TextBox3.Visible = false;
}
protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
{
//Label6.Visible = false;
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
Response.Redirect("packetsending.aspx");
}
protected void LinkButton4_Click(object sender, EventArgs e)
{
Response.Redirect("Download.aspx");
}
}

OwnerInteractionHistory.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/ServerMasterPage.master"


AutoEventWireup="true" CodeFile="OwnerInteractionHistory.aspx.cs"
Inherits="OwnerInteractionHistory" %>
<asp:Content ID="Content1" ContentPlaceHolderID="serververify" runat="server">
<asp:Panel Style="position: absolute; top: 206px; left: 22px; height: 293px; width: 846px;
overflow:scroll"ID="Panel1" runat="server">
<font size="4" face="Bookman old style" color="white">
<marquee style="position: absolute; top: -1px; left: 10px; width: 940px;" behavior="scroll"
direction="left" scrollamount="15">Interaction History Central Repository !</marquee>
</font><br /><br /><br /><center>
<asp:GridView ID="GridView1" runat="server"
BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px"
CellPadding="2" ForeColor="Black" GridLines="None" Font-Bold="True">
<AlternatingRowStyle BackColor="PaleGoldenrod" />
<Columns>
<asp:TemplateField HeaderText="Fales">
<ItemTemplate>
<asp:LinkButton ID="btnlinkAccepted" runat="server"
onclick="btnlinkAccepted_Click" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Medium">Trust Decision
Black</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<FooterStyle BackColor="Tan" />
<HeaderStyle BackColor="Tan" Font-Bold="True" />
<PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue"
HorizontalAlign="Center" />
<SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
</asp:GridView></center>
</asp:Panel>
<br />
<asp:Label style="position:absolute; top: 211px; left: 382px;" ID="Label1"
runat="server" Font-Italic="False" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="X-Large" Text="User Account"
ForeColor="#CC3300"></asp:Label>
<asp:LinkButton ID="LinkButton2" runat="server"
STYLE="position:absolute; top: 435px; left: 885px; width: 243px;" Font-Bold="True"
Font-Size="Large" Font-Underline="False"
ForeColor="Black" PostBackUrl="~/serververify.aspx" >key Request
Message</asp:LinkButton>
<asp:LinkButton ID="LinkButton3" runat="server" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black"
STYLE="position:absolute; top: 472px; left: 895px; width: 149px;"
PostBackUrl="~/Default.aspx">Back to Home</asp:LinkButton>
</asp:Content>

OwnerInteractionHistory.aspx.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Configuration;
using System.Data;
public partial class OwnerInteractionHistory : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]);
protected void Page_Load(object sender, EventArgs e)
{
try
{
if (!IsPostBack)
{
SqlDataAdapter sda = new SqlDataAdapter("select
oid,ownerid,gender,age,mobile,emailid,date,Black,Rank,RolesAuditor from Registration",
con);
DataSet ds = new DataSet();
sda.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
}}
catch (Exception ex)
{
MsgBox.Show("Time out");
}}
protected void btnlinkAccepted_Click(object sender, EventArgs e)
{
try
{
con.Open();
GridViewRow gr = ((sender as LinkButton).NamingContainer as GridViewRow);
Session["oid"] = gr.Cells[1].Text.Trim();
SqlCommand cmdA = new SqlCommand("Update Registration set Black='Trust Decision
Black' where oid='" + gr.Cells[1].Text.Trim() + "'", con);
cmdA.ExecuteNonQuery();
con.Close();
}
catch (Exception ex)
{
ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(),
Guid.NewGuid().ToString(), "alert(''Invalid Authenticate');", true);
}}}
PacketSending.aspx

<%@ Page Language="C#" AutoEventWireup="true"


MasterPageFile="~/ClientMasterPage.master" CodeFile="packetsending.aspx.cs"
Inherits="packet_sending" %>
<asp:Content ContentPlaceHolderID="packetsending" runat="server"><center>
<asp:Panel style="position:absolute; top: 245px; left: 298px; height: 570px; width: 610px;"
ID="Panel3" runat="server" BorderColor="Brown" BorderWidth="1">
<asp:Label style="position:absolute; top: 12px; left: 507px; height: 24px; width: 71px;"
ID="Label41"runat="server" Text="Status" Font-Size="13pt"Font-Names="Nina" Font-
Bold="True" ForeColor="#990000"Font-Underline="True"></asp:Label>
<asp:Label ID="Label40" runat="server" Font-Bold="True" Font-Names="Nina"
Font-Size="13pt" Font-Underline="True" ForeColor="#990000"style="position:absolute;
top: 12px; left: 312px; height: 24px; width: 100px;"Text="Binary Value"></asp:Label>
<asp:Label ID="Label39" runat="server" Font-Bold="True" Font-Names="Nina"
Font-Size="13pt" Font-Underline="True" ForeColor="#990000"style="position:absolute;
top: 12px; left: 166px; height: 24px; width: 111px;"Text="Secret System"></asp:Label>
<asp:Label ID="Label38" runat="server" Font-Bold="True" Font-Names="Nina"
Font-Size="13pt" Font-Underline="True" ForeColor="#990000"style="position:absolute;
top: 12px; left: 52px; height: 24px; width: 71px;"Text="Levels"></asp:Label>
<asp:Label ID="Label13" runat="server" Font-Bold="True"Font-Names="Nina" Font-
Size="13pt" ForeColor="Black"style="position:absolute; top: 50px; left: 50px; height: 24px;
width: 71px;"Text="Level1"></asp:Label>
<asp:Label style="position:absolute; top: 90px; left: 50px; height: 24px; width: 71px;"
ID="Label14"runat="server" Text="Level2" Font-Size="13pt"Font-Names="Nina" Font-
Bold="True" ForeColor="Black"></asp:Label>
<asp:Label style="position:absolute; top: 130px; left: 50px; height: 24px; width: 71px;"
ID="Label15"runat="server" Text="Level3" Font-Size="13pt"
Font-Names="Nina" Font-Bold="True" ForeColor="Black"></asp:Label>
<asp:Label style="position:absolute; top: 170px; left: 50px; height: 24px; width: 71px;"
ID="Label16"runat="server" Text="Level4" Font-Size="13pt"
Font-Names="Nina" Font-Bold="True" ForeColor="Black"></asp:Label>
<asp:Label style="position:absolute; top: 210px; left: 50px; height: 24px; width: 71px;"
ID="Label17"runat="server" Text="Level5" Font-Size="13pt"
Font-Names="Nina" Font-Bold="True" ForeColor="Black"></asp:Label>
<asp:Label style="position:absolute; top: 250px; left: 50px; height: 24px; width: 71px;"
ID="Label18"runat="server" Text="Level6" Font-Size="13pt"
Font-Names="Nina" Font-Bold="True" ForeColor="Black"></asp:Label>
<asp:Label style="position:absolute; top: 290px; left: 50px; height: 24px; width: 71px;"
ID="Label19"runat="server" Text="Level7" Font-Size="13pt"
Font-Names="Nina" Font-Bold="True" ForeColor="Black"></asp:Label>
<asp:Label style="position:absolute; top: 330px; left: 50px; height: 24px; width: 71px;"
ID="Label20runat="server" Text="Level8" Font-Size="13pt"
Font-Names="Nina" Font-Bold="True" ForeColor="Black"></asp:Label>
<asp:Label style="position:absolute; top: 370px; left: 50px; height: 24px; width: 71px;"
ID="Label21"runat="server" Text="Level9" Font-Size="13pt"
Font-Names="Nina" Font-Bold="True" ForeColor="Black"></asp:Label>
<asp:Label ID="Label25" runat="server" Font-Names="Courier New"
ForeColor="#FF3300"style="position:absolute; top: 50px; left: 485px; width: 124px; height:
20px;"></asp:Label>
<asp:Label style="position:absolute; top: 90px; left: 485px; width: 124px; height: 20px;"
ID="Label26"runat="server" Font-Names="Courier New"
ForeColor="#FF3300"></asp:Label><asp:Label style="position:absolute; top: 130px; left:
485px; width: 124px; height: 20px;" ID="Label27"runat="server" Font-Names="Courier
New" ForeColor="#FF3300"></asp:Label><asp:Label style="position:absolute; top: 170px;
left: 485px; width: 124px; height: 20px;" ID="Label28"runat="server" Font-Names="Courier
New" ForeColor="#FF3300"></asp:Label><asp:Label style="position:absolute; top: 210px;
left: 485px; width: 124px; height: 20px;" ID="Label29"runat="server" Font-Names="Courier
New" ForeColor="#FF3300"></asp:Label><asp:Label style="position:absolute; top: 250px;
left: 485px; width: 124px; height: 20px;" ID="Label30"runat="server" Font-Names="Courier
New" ForeColor="#FF3300"></asp:Label><asp:Label style="position:absolute; top: 290px;
left: 485px; width: 124px; height: 20px;" ID="Label31"runat="server" Font-Names="Courier
New" ForeColor="#FF3300"></asp:Label><asp:Label style="position:absolute; top: 330px;
left: 485px; width: 124px; height: 20px;" ID="Label32"runat="server" Font-Names="Courier
New" ForeColor="#FF3300"></asp:Label><asp:Label style="position:absolute; top: 370px;
left: 485px; width: 124px; height: 20px;" ID="Label33"runat="server" Font-Names="Courier
New" ForeColor="#FF3300"></asp:Label>
<asp:CheckBox style="position:absolute; top: 402px; left: 230px;"ID="CheckBox1"
runat="server" Text="Packet Loss" Font-Bold="true"Font-Italic="false" Visible="False"/>
<asp:Button ID="btnSend" runat="server"style="position:absolute; top: 427px; left: 231px;
width: 82px; height: 30px;"Text="Send" BackColor="#FFCCCC" ForeColor="#CC3300"
Font-Size="13"Font-Names="Bookman Old Style" onclick="btnSend_Click" Font-
Bold="true"/><asp:Label style="position:absolute; top: 447px; left: 35px;" ID="Label3"
runat="server" Text="Note:" ForeColor="Black" Font-Underline="True"></asp:Label>
<asp:Label style="position:absolute; top: 473px; left: 67px; height: 24px; width: 160px;"
ID="Label23"runat="server" Text="Each Level is: " Font-Size="Medium" Font-Bold="True"
Font-Names="Verdana"></asp:Label><asp:Label style="position:absolute; top: 471px; left:
226px; height: 24px; width: 160px;" ID="Label24" runat="server" Font-Size="13pt" Font-
Names="Times New Roman"ForeColor="Red"></asp:Label><asp:Label ID="Label1"
runat="server" Font-Size="Medium"style="position:absolute; top: 513px; left: 63px; height:
24px; width: 160px;"Text="Total Level is: " Font-Bold="True" Font-
Names="Verdana"></asp:Label><asp:Label style="position:absolute; top: 510px; left:
230px; height: 24px; width: 160px;" ID="Label2" runat="server" Font-Size="13pt" Font-
Names="Times New Roman"ForeColor="Red"></asp:Label><asp:TextBox ID="TextBox1"
runat="server"style="position:absolute; top: 50px; left: 143px; text-align: center;"
ontextchanged="TextBox1_TextChanged" AutoPostBack="True"></asp:TextBox>
<asp:TextBox ID="TextBox2" runat="server"style="position:absolute; top: 90px; left:
143px; text-align: center;" AutoPostBack="True"ontextchanged="TextBox2_TextChanged">
</asp:TextBox><asp:TextBox ID="TextBox3" runat="server"style="position:absolute; top:
130px; left: 143px; text-align: center;"
AutoPostBack="True"ontextchanged="TextBox3_TextChanged" ></asp:TextBox>
<asp:TextBox ID="TextBox4" runat="server"style="position:absolute; top: 170px; left:
143px; text-align: center;" AutoPostBack="True"ontextchanged="TextBox4_TextChanged">
</asp:TextBox><asp:TextBox ID="TextBox5" runat="server"style="position:absolute; top:
210px; left: 143px; text-align: center;" AutoPostBack="True"
ontextchanged="TextBox5_TextChanged" ></asp:TextBox><asp:TextBox ID="TextBox6"
runat="server"style="position:absolute; top: 250px; left: 143px; text-align: center;"
AutoPostBack="True"ontextchanged="TextBox6_TextChanged" ></asp:TextBox>
<asp:TextBox ID="TextBox7" runat="server"style="position:absolute; top: 290px; left:
143px; text-align: center;" AutoPostBack="True"
ontextchanged="TextBox7_TextChanged" ></asp:TextBox>
<asp:TextBox ID="TextBox8" runat="server"
style="position:absolute; top: 330px; left: 143px; text-align: center;" AutoPostBack="True"
ontextchanged="TextBox8_TextChanged" ></asp:TextBox>
<asp:TextBox ID="TextBox9" runat="server"
style="position:absolute; top: 370px; left: 143px; text-align: center;" AutoPostBack="True"
ontextchanged="TextBox9_TextChanged" ></asp:TextBox>
<asp:Label style="position:absolute; top: 50px; left: 297px; width: 123px; height: 20px;"
ID="Label4"runat="server" Font-Names="Courier New"
ForeColor="#660033"></asp:Label>
<asp:Label style="position:absolute; top: 90px; left: 297px; width: 123px; height: 20px;"
ID="Label5"runat="server" Font-Names="Courier New"
ForeColor="#660033"></asp:Label>
<asp:Label style="position:absolute; top: 130px; left: 297px; width: 123px; height: 20px;"
ID="Label6" runat="server" Font-Names="Courier New"
ForeColor="#660033"></asp:Label>
<asp:Label style="position:absolute; top: 170px; left: 297px; width: 123px; height: 20px;"
ID="Label7" runat="server" Font-Names="Courier New"
ForeColor="#660033"></asp:Label>
<asp:Label style="position:absolute; top: 210px; left: 297px; width: 123px; height: 20px;"
ID="Label8" runat="server" Font-Names="Courier New"
ForeColor="#660033"></asp:Label>
<asp:Label style="position:absolute; top: 250px; left: 297px; width: 123px; height: 20px;"
ID="Label9" runat="server" Font-Names="Courier New"
ForeColor="#660033"></asp:Label>
<asp:Label style="position:absolute; top: 290px; left: 297px; width: 123px; height: 20px;"
ID="Label10" runat="server" Font-Names="Courier New"
ForeColor="#660033"></asp:Label>
<asp:Label style="position:absolute; top: 330px; left: 297px; width: 123px; height: 20px;"
ID="Label11" runat="server" Font-Names="Courier New"
ForeColor="#660033"></asp:Label>
<asp:Label style="position:absolute; top: 370px; left: 297px; width: 123px; height: 20px;"
ID="Label12" runat="server" Font-Names="Courier New"
ForeColor="#660033"></asp:Label></asp:Panel>
<asp:LinkButton ID="LinkButton1" runat="server"STYLE="position:absolute; top: 432px;
left: 1015px;" Font-Bold="True"ForeColor="Red" PostBackUrl="~/Default.aspx"
Font-Names="Imprint MT Shadow" Font-Size="X-Large" >Download</asp:LinkButton>
<asp:LinkButton ID="LinkButton2" runat="server"STYLE="position:absolute; top: 467px;
left: 1024px; margin-bottom: 0px;" Font-Bold="True"Font-Names="Imprint MT Shadow"
Font-Size="Large" Font-Underline="False"ForeColor="Red" PostBackUrl="~/Default.aspx"
>Signout</asp:LinkButton>
<asp:Label style="position:absolute; top: 205px; left: 139px; width: 906px; height: 26px;"
ID="Label37"runat="server" Font-Names="Verdana" ForeColor="Blue"
Font-Bold="True" Font-Size="Large">TRUST ISSUES IN USING CRYPTOGRAPHIC
RBAC SCHEMES IN SECURE CLOUD STORAGE</asp:Label>
<asp:Label style="position:absolute; top: 418px; left: 849px;" ID="Label36"
runat="server" Text="." Visible="false"></asp:Label>
</center>
</asp:Content>

PacketSending.aspx.cs

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
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;
using System.Xml.Linq;
using System.Data.SqlClient;
public partial class packet_sending : System.Web.UI.Page
{
float addsplit=0;
string tr, binary1, binary1enc, binary1enc1, binary1enc2, binary1enc3, binary1enc4,
binary1enc5, binary1enc6, binary1enc7, binary1enc8;
int count = 0;
float eachfilesize = 0f;
float efsize = 0f;
string totalbytes;
string rannum;
string p1, binary2, binary3, binary4, binary5, binary6, binary7, binary8, binary9;
string p2,p3,p4,p5;
string splitfilesize, splitfilesize1, splitfilesize2, splitfilesize3, splitfilesize4, splitfilesize5,
splitfilesize6, splitfilesize7, splitfilesize8;
Cryptography cr = new Cryptography();
string cryptographykey, fileenccryptographykey;
float filesiz = 0f;
SqlConnection con = new
SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]);
protected void Page_Load(object sender, EventArgs e)
{if (!IsPostBack)
{Label25.Visible = false;
Label26.Visible = false;
Label27.Visible = false;
Label28.Visible = false;
Label29.Visible = false;
Label30.Visible = false;
Label31.Visible = false;
Label32.Visible = false;
Label33.Visible = false;
TextBox1.Visible = false;
TextBox2.Visible = false;
TextBox3.Visible = false;
TextBox4.Visible = false;
TextBox5.Visible = false;
TextBox6.Visible = false;
TextBox7.Visible = false;
TextBox8.Visible = false;
TextBox9.Visible = false;}}
protected void btnSend_Click(object sender, EventArgs e)
{try{
totalbytes = Convert.ToString(Session["totalbytes"]);
Label2.Text = Convert.ToString(Session["totalbytes"]) + " bytes";
eachfilesize = (float)Session["Filecontent"];
Label24.Text = Convert.ToString(Session["Filecontent"]) + " bytes";
Session["c"] = count;
if (Label36.Visible == false)
{if (Label27.Visible == false)
{if (CheckBox1.Checked == false)
{if (Label25.Visible == false)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label13.BackColor = System.Drawing.Color.Green;
//Label25.Visible = true;
//Label25.Text = "Block1 Sent ";
System.Threading.Thread.Sleep(1000);
TextBox1.Visible = true;
goto outer;}
if (Label25.Visible == true)
{
if (Label14.BackColor != System.Drawing.Color.Green)
{
//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label14.BackColor = System.Drawing.Color.Green;
//Label26.Visible = true;
//Label26.Text = "Block2 Sent";
System.Threading.Thread.Sleep(1000);
TextBox2.Visible = true;
goto outer;}}
if (Label26.Visible == true)
{
//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label15.BackColor = System.Drawing.Color.Green;
//Label27.Visible = true;
//Label27.Text = "Block3 Sent";
System.Threading.Thread.Sleep(1000);
TextBox3.Visible = true;
//goto outer;}
CheckBox1.Enabled = true;
Label27.Visible = true;}
else
{
if (CheckBox1.Checked == true)
{count++;
update();
Random val = new Random();
int rno = val.Next(1, 3);
rannum = Convert.ToString(rno);
if (rannum == "1")
{Label13.BackColor = System.Drawing.Color.Red;
Label25.Visible = true;
Label25.Text = "Level1 Corrupted";
string myStringVariable1 = string.Empty;
myStringVariable1 = "First Level is Corrupted";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);}
else
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label13.BackColor = System.Drawing.Color.Green;
//Label25.Visible = true;
//Label25.Text = "Block1 sent";
System.Threading.Thread.Sleep(1000);
goto outer;}
if (rannum == "2")
{Label14.BackColor = System.Drawing.Color.Red;
Label26.Visible = true;
Label26.Text = "Level2 Corrupted";
string myStringVariable1 = string.Empty;
myStringVariable1 = "Second Level is Corrupted";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);}
else{
//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label14.BackColor = System.Drawing.Color.Green;
//Label26.Visible = true;
//Label26.Text = "Block2 sent";
System.Threading.Thread.Sleep(1000);
goto outer;}
if (rannum == "3")
{Label15.BackColor = System.Drawing.Color.Red;
Label27.Visible = true;
Label27.Text = "Level3 Corrupted";
string myStringVariable1 = string.Empty;
myStringVariable1 = "Third Level is Corrupted";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);}
else
{
//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label15.BackColor = System.Drawing.Color.Green;
//Label27.Visible = true;
//Label27.Text = "Block3 sent";
System.Threading.Thread.Sleep(1000);
goto outer;}
CheckBox1.Checked = false;
CheckBox1.Enabled = false;}}}
else
{if (Label30.Visible == false)
{if (CheckBox1.Checked == false)
{if (Label25.Visible == false)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label13.BackColor = System.Drawing.Color.Green;
//Label25.Visible = true;
//Label25.Text = "Block1 sent";
System.Threading.Thread.Sleep(1000);
goto outer;}
if (Label25.Visible == true)
{if (Label14.BackColor != System.Drawing.Color.Green){
//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label14.BackColor = System.Drawing.Color.Green;
//Label26.Visible = true;
//Label26.Text = "Block2 sent";
System.Threading.Thread.Sleep(1000);
TextBox2.Visible = true;
goto outer;}}
if (Label26.Visible == true)
{if (Label15.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label15.BackColor = System.Drawing.Color.Green;
//Label27.Visible = true;
//Label27.Text = "Block3 sent";
System.Threading.Thread.Sleep(1000);
TextBox3.Visible = true;
goto outer;}}
if (Label27.Visible == true)
{if (Label16.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label16.BackColor = System.Drawing.Color.Green;
//Label28.Visible = true;
//Label28.Text = "Block4 sent";
System.Threading.Thread.Sleep(1000);
TextBox4.Visible = true;
goto outer;}}
if (Label28.Visible == true)
{if (Label17.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label17.BackColor = System.Drawing.Color.Green;
//Label29.Visible = true;
//Label29.Text = "Block5 sent";
System.Threading.Thread.Sleep(1000);
TextBox5.Visible = true;
goto outer;}}
if (Label29.Visible == true){
if (Label18.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label18.BackColor = Syste
m.Drawing.Color.Green;
//Label30.Visible = true;
//Label30.Text = "Block6 sent";
System.Threading.Thread.Sleep(1000);
TextBox6.Visible = true;
goto outer;}}
CheckBox1.Enabled = true;
//Label36.Visible = true;}
else
{count++;
update();
Session["c"] = count;
Random val = new Random();
int rno = val.Next(1, 3);
rannum = Convert.ToString(rno);
if (Label25.Visible == false)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label13.BackColor = System.Drawing.Color.Green;
//Label25.Visible = true;
//Label25.Text = "Block1 sent";
System.Threading.Thread.Sleep(1000);
TextBox1.Visible = true;
goto outer;}
if (Label25.Visible == true)
{if (Label14.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label14.BackColor = System.Drawing.Color.Green;
//Label26.Visible = true;
//Label26.Text = "Block2 sent";
System.Threading.Thread.Sleep(1000);
TextBox2.Visible = true;
goto outer;}}
if (Label26.Visible == true)
{if (Label15.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label15.BackColor = System.Drawing.Color.Green;
//Label27.Visible = true;
//Label27.Text = "Block3 sent";
System.Threading.Thread.Sleep(1000);
TextBox3.Visible = true;
goto outer;}}
if (rannum == "1")
{Label16.BackColor = System.Drawing.Color.Red;
Label28.Visible = true;
Label28.Text = "Level4 Corrupted";
string myStringVariable1 = string.Empty;
myStringVariable1 = "Fourth Packet is Corrupted";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);}
else
{if (Label16.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label16.BackColor = System.Drawing.Color.Green;
//Label28.Visible = true;
//Label28.Text = "Block4 Sent";
System.Threading.Thread.Sleep(1000);
TextBox4.Visible = true;
goto outer;}}
if (rannum == "2")
{Label17.BackColor = System.Drawing.Color.Red;
Label29.Visible = true;
Label29.Text = "Level5 Corrupted";
string myStringVariable1 = string.Empty;
myStringVariable1 = "Fifth Level is Corrupted";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);}
else
{if (Label17.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label17.BackColor = System.Drawing.Color.Green;
//Label29.Visible = true;
//Label29.Text = "Block5 Sent";
System.Threading.Thread.Sleep(1000);
TextBox5.Visible = true;
goto outer;}}
if (rannum == "3")
{Label18.BackColor = System.Drawing.Color.Red;
Label30.Visible = true;
Label30.Text = "Level6 Corrupted";
string myStringVariable1 = string.Empty;
myStringVariable1 = "Sixth Level is Corrupted";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);}
else{
if (Label18.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label18.BackColor = System.Drawing.Color.Green;
//Label30.Visible = true;
//Label30.Text = "Block6 Sent ";
System.Threading.Thread.Sleep(1000);
TextBox6.Visible = true;
goto outer;}}
CheckBox1.Checked = false;
CheckBox1.Enabled = false;}}
else
{if (Label36.Visible == false)
{if (CheckBox1.Checked == false)
{if (Label25.Visible == false)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label13.BackColor = System.Drawing.Color.Green;
//Label25.Visible = true;
//Label25.Text = "Block1 Sent";
System.Threading.Thread.Sleep(1000);
TextBox1.Visible = true;
goto outer;}
if (Label25.Visible == true)
{if (Label14.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label14.BackColor = System.Drawing.Color.Green;
//Label26.Visible = true;
//Label26.Text = "Block2 Sent";
System.Threading.Thread.Sleep(1000);
TextBox2.Visible = true;
goto outer;}}
if (Label26.Visible == true)
{if (Label15.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label15.BackColor = System.Drawing.Color.Green;
//Label27.Visible = true;
//Label27.Text = "Block3 Sent";
System.Threading.Thread.Sleep(1000);
TextBox3.Visible = true;
goto outer;}}
if (Label27.Visible == true)
{if (Label16.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label16.BackColor = System.Drawing.Color.Green;
//Label28.Visible = true;
//Label28.Text = "Block4 Sent";
System.Threading.Thread.Sleep(1000);
TextBox4.Visible = true;
goto outer;}}
if (Label28.Visible == true)
{if (Label17.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label17.BackColor = System.Drawing.Color.Green;
//Label29.Visible = true;
//Label29.Text = "Block5 Sent";
System.Threading.Thread.Sleep(1000);
TextBox5.Visible = true;
goto outer;}}
if (Label30.Visible == false)
{if (Label18.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label18.BackColor = System.Drawing.Color.Green;
//Label30.Visible = true;
//Label30.Text = "Block6 Sent";
System.Threading.Thread.Sleep(1000);
TextBox6.Visible = true;
goto outer;}}
if (Label30.Visible == true)
{if (Label19.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label19.BackColor = System.Drawing.Color.Green;
//Label31.Visible = true;
//Label31.Text = "Block7 Sent";
System.Threading.Thread.Sleep(1000);
TextBox7.Visible = true;
goto outer;}}
if (Label31.Visible == true)
{if (Label20.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label20.BackColor = System.Drawing.Color.Green;
//Label32.Visible = true;
//Label32.Text = "Block8 Sent";
System.Threading.Thread.Sleep(1000);
TextBox8.Visible = true;
goto outer;}}
if (Label32.Visible == true)
{if (Label21.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label21.BackColor = System.Drawing.Color.Green;
//Label33.Visible = true;
//Label33.Text = "Block9 Sent";
System.Threading.Thread.Sleep(1000);
TextBox9.Visible = true;
goto outer;}}
//con.Open();
//SqlDataAdapter adp = new SqlDataAdapter("select * from filearchive where fid='" +
(string)Session["fid1"] + "'", con);
//DataSet ds = new DataSet();
//adp.Fill(ds);
//p1 = ds.Tables[0].Rows[0]["fowner"].ToString();
////SqlCommand c1 = new SqlCommand("select * from Sentfiles where Sendornot='" +
sendornotnull + "'", con);
////p2 = Convert.ToString(c1.ExecuteScalar());
//p3 = ds.Tables[0].Rows[0]["FID"].ToString();
//if(count==0)
//{
//if ((int)Session["c"] > 0)
//{
// sendornotnull = "Corrupted";
//}
//else
//{
// sendornotnull = "Success";
//}
// }
//SqlCommand cmd1 = new SqlCommand("Update Sentfiles set Sendornot='" +
sendornotnull + "'where FID='" + (string)Session["f"] + "'", con);
//cmd1.ExecuteNonQuery();
CheckBox1.Enabled = true;
Label36.Visible = true;
con.Close();}
else{
count++;
update();
Random val = new Random();
int rno = val.Next(1, 3);
rannum = Convert.ToString(rno);
if (Label25.Visible == false)
{if (Label13.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label13.BackColor = System.Drawing.Color.Green;
//Label25.Visible = true;
//Label25.Text = "Block1 Sent";
System.Threading.Thread.Sleep(1000);
TextBox1.Visible = true;
goto outer;}}
if (Label25.Visible == true)
{if (Label14.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label14.BackColor = System.Drawing.Color.Green;
//Label26.Visible = true;
//Label26.Text = "Block2 Sent";
System.Threading.Thread.Sleep(1000);
TextBox2.Visible = true;
goto outer;}}
if (Label26.Visible == true)
{if (Label15.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label15.BackColor = System.Drawing.Color.Green;
//Label27.Visible = true;
//Label27.Text = "Block3 Sent";
System.Threading.Thread.Sleep(1000);
TextBox3.Visible = true;
goto outer; }}
if (Label27.Visible == true)
{if (Label16.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label16.BackColor = System.Drawing.Color.Green;
//Label28.Visible = true;
//Label28.Text = "Block4 Sent";
System.Threading.Thread.Sleep(1000);
TextBox4.Visible = true;
goto outer;}}
if (Label28.Visible == true)
{if (Label17.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label17.BackColor = System.Drawing.Color.Green;
//Label29.Visible = true;
//Label29.Text = "Block5 Sent";
System.Threading.Thread.Sleep(1000);
TextBox5.Visible = true;
goto outer;}}
if (Label30.Visible == false)
{if (Label18.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label18.BackColor = System.Drawing.Color.Green;
//Label30.Visible = true;
//Label30.Text = "Block6 Sent";
System.Threading.Thread.Sleep(1000);
TextBox6.Visible = true;
goto outer;}}
if (rannum == "1")
{Label19.BackColor = System.Drawing.Color.Red;
Label31.Visible = true;
Label31.Text = "Level7 Corrupted";
string myStringVariable1 = string.Empty;
myStringVariable1 = "Seventh Level is Corrupted";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true); }
else
{ if (Label19.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label19.BackColor = System.Drawing.Color.Green;
//Label31.Visible = true;
//Label31.Text = "Block7 Sent";
System.Threading.Thread.Sleep(1000);
TextBox7.Visible = true;
goto outer;}}
if (rannum == "2")
{Label20.BackColor = System.Drawing.Color.Red;
Label32.Visible = true;
Label32.Text = "Level8 Corrupted";
string myStringVariable1 = string.Empty;
myStringVariable1 = "Eighth Level is Corrupted";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true); }
else
{if (Label20.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label20.BackColor = System.Drawing.Color.Green;
//Label32.Visible = true;
//Label32.Text = "Block8 Sent";
System.Threading.Thread.Sleep(1000);
TextBox8.Visible = true;
goto outer;}}
if (rannum == "3")
{Label21.BackColor = System.Drawing.Color.Red;
Label33.Visible = true;
Label33.Text = "Level9 Corrupted";
string myStringVariable1 = string.Empty;
myStringVariable1 = "Ninth Level is Corrupted";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true); }
else{
if (Label21.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label21.BackColor = System.Drawing.Color.Green;
//Label33.Visible = true;
//Label33.Text = "Block9 Sent ";
System.Threading.Thread.Sleep(1000);
TextBox9.Visible = true;
goto outer;}}
//con.Open();
//SqlDataAdapter adp = new SqlDataAdapter("select * from Sentfiles", con);
//DataSet ds = new DataSet();
//adp.Fill(ds);
//SqlCommand c1 = new SqlCommand("select * from Sentfiles where Sendornot='" +
sendornotnull + "'", con);
//p4 = Convert.ToString(c1.ExecuteScalar());
//p5 = ds.Tables[0].Rows[0]["FID"].ToString();
//string senornot = "CORRUPTED";
//SqlCommand cmd1 = new SqlCommand("Update Sentfiles set Sendornot='" + senornot +
"'where FID='" + p3 + "'", con);
//cmd1.ExecuteNonQuery();
CheckBox1.Checked = false;
CheckBox1.Enabled = false;}}}}}
outer:
tr = "";}
catch(Exception ex)
{MsgBox.Show("Time Out, Go back Update Data");}}
public void update()
{
con.Open();
SqlCommand cmd1 = new SqlCommand("Update filearchive set Sendornot='Success',s1='" +
TextBox1.Text + "',s2='" + TextBox2.Text + "',s3='" + TextBox3.Text + "',s4='" +
TextBox4.Text + "',s5='" + TextBox5.Text + "',s6='" + TextBox6.Text + "',s7='" +
TextBox7.Text + "',s8='" + TextBox8.Text + "',s9='" + TextBox9.Text + "',m1='" +
Label4.Text + "',m2='" + Label5.Text + "',m3='" + Label6.Text + "',m4='" + Label7.Text +
"',m5='" + Label8.Text + "',m6='" + Label9.Text + "',m7='" + Label10.Text + "',m8='" +
Label11.Text + "',m9='" + Label12.Text + "' where fid='" + (string)Session["fid1"] + "'",
con);
cmd1.ExecuteNonQuery();
con.Close();}
protected void TextBox1_TextChanged(object sender, EventArgs e)
{
Random val = new Random();
int rno = val.Next(12345, 54321);
cryptographykey = Convert.ToString(rno);
fileenccryptographykey = cr.Encrypt(cryptographykey);
splitfilesize = TextBox1.Text;
for (int i = 0; i < splitfilesize.Length; i++)
{char c = splitfilesize[i];
string binary = Convert.ToString(c, 2);
binary1 = binary1 + binary;}
binary1enc = cr.Encrypt(binary1);
Label4.Text = binary1;
System.Threading.Thread.Sleep(1000);
Label25.Visible = true;
Label25.Text = "Block1 Sent ";}
protected void TextBox2_TextChanged(object sender, EventArgs e)
{splitfilesize1 = TextBox2.Text;
for (int i1 = 0; i1 < splitfilesize1.Length; i1++)
{char c1 = splitfilesize1[i1];
string binar1 = Convert.ToString(c1, 2);
binary2 = binary2 + binar1;}
binary1enc1 = cr.Encrypt(binary2);
Label5.Text = binary2;
System.Threading.Thread.Sleep(1000);
Label26.Visible = true;
Label26.Text = "Block2 Sent";}
protected void TextBox3_TextChanged(object sender, EventArgs e)
{splitfilesize2 = TextBox3.Text;
for (int i2 = 0; i2 < splitfilesize2.Length; i2++)
{char c2 = splitfilesize2[i2];
string binar2 = Convert.ToString(c2, 2);
binary3 = binary3 + binar2;}
binary1enc2 = cr.Encrypt(binary3);
Label6.Text = binary3;
System.Threading.Thread.Sleep(1000);
Label27.Visible = true;
Label27.Text = "Block3 Sent";
//System.Threading.Thread.Sleep(1000);
//string myStringVariable1 = string.Empty;
//myStringVariable1 = "First part is Completed.Currently " + addsplit + " bytes are sent
successfully. ";
//ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1
+ "');", true);}
protected void TextBox4_TextChanged(object sender, EventArgs e)
{splitfilesize3 = TextBox4.Text;
for (int i3 = 0; i3 < splitfilesize3.Length; i3++)
{char c3 = splitfilesize3[i3];
string binar3 = Convert.ToString(c3, 2);
binary4 = binary4 + binar3;}
binary1enc3 = cr.Encrypt(binary4);
Label7.Text = binary4;
System.Threading.Thread.Sleep(1000);
Label28.Visible = true;
Label28.Text = "Block4 Sent";}
protected void TextBox5_TextChanged(object sender, EventArgs e)
{splitfilesize4 = TextBox5.Text;
for (int i4 = 0; i4 < splitfilesize4.Length; i4++)
{char c4 = splitfilesize4[i4];
string binar4 = Convert.ToString(c4, 2);
binary5 = binary5 + binar4;}
binary1enc4 = cr.Encrypt(binary5);
Label8.Text = binary5;
System.Threading.Thread.Sleep(1000);
Label29.Visible = true;
Label29.Text = "Block5 Sent";}
protected void TextBox6_TextChanged(object sender, EventArgs e)
{splitfilesize5 = TextBox6.Text;
for (int i5 = 0; i5 < splitfilesize5.Length; i5++)
{char c5 = splitfilesize5[i5];
string binar5 = Convert.ToString(c5, 2);
binary6 = binary6 + binar5;}
binary1enc5 = cr.Encrypt(binary6);
Label9.Text = binary6;
System.Threading.Thread.Sleep(1000);
Label30.Visible = true;
Label30.Text = "Block6 Sent";
//System.Threading.Thread.Sleep(1000);
//string myStringVariable3 = string.Empty;
//myStringVariable3 = "Second part is Completed.Currently " + addsplit + " bytes are sent
successfully. ";
//ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable3
+ "');", true);}
protected void TextBox7_TextChanged(object sender, EventArgs e)
{splitfilesize6 = TextBox7.Text;
for (int i6 = 0; i6 < splitfilesize6.Length; i6++)
{char c6 = splitfilesize6[i6];
string binar6 = Convert.ToString(c6, 2);
binary7 = binary7 + binar6;}
binary1enc6 = cr.Encrypt(binary7);
Label10.Text = binary7;
System.Threading.Thread.Sleep(1000);
Label31.Visible = true; Label31.Text = "Block7 Sent";}
protected void TextBox8_TextChanged(object sender, EventArgs e)
{splitfilesize7 = TextBox8.Text;
for (int i7 = 0; i7 < splitfilesize7.Length; i7++)
{char c7 = splitfilesize7[i7];
string binar7 = Convert.ToString(c7, 2);
binary8 = binary8 + binar7;}
binary1enc7 = cr.Encrypt(binary8); Label11.Text = binary8;
System.Threading.Thread.Sleep(1000);
Label32.Visible = true; Label32.Text = "Block8 Sent";}
protected void TextBox9_TextChanged(object sender, EventArgs e)
{splitfilesize8 = TextBox9.Text;
for (int i8 = 0; i8 < splitfilesize8.Length; i8++)
{char c8 = splitfilesize8[i8];
string binar8 = Convert.ToString(c8, 2);
binary9 = binary9 + binar8;} binary1enc8 = cr.Encrypt(binary9);
Label12.Text = binary9;
System.Threading.Thread.Sleep(1000);
Label33.Visible = true; Label33.Text = "Block9 Sent";
System.Threading.Thread.Sleep(1000);
MsgBox.Show("File Sent to Server with Metadata key & Alert Sent to TPA ");update();
//string myStringVariable3 = string.Empty;
//myStringVariable3 = "File Sent to Server with Metadata key \n Alert Sent to TPA";
//ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable3
+ "');", true);}}

RolesLogin.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/TPAMasterPage.master"


AutoEventWireup="true" CodeFile="Roleslogin.aspx.cs" Inherits="Roleslogin" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit"
TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="AdminLogin" runat="server">
<asp:Label style="position:absolute; top: 216px; left: 445px;" ID="Label1"
runat="server" Text="Roles" Font-Size="14pt"Font-Names="Verdana" Font-Bold="True"
ForeColor="#CC3300"></asp:Label>
<asp:Panel style="position:absolute; width: 360px; top: 258px; left: 369px; height: 207px;"
ID="Panel1" runat="server" BorderWidth="4px" BorderColor="#CC3300"
BorderStyle="Solid">
<asp:Label style="position:absolute; top: 35px; left: 21px;" ID="Label2"
runat="server" Font-Bold="True" Font-Names="Verdana" Font-Size="Medium"
Text="Admin Id"></asp:Label>
<asp:TextBox style="position:absolute; top: 35px; left: 146px; width: 185px; height: 25px;
text-align: center;"ID="TextBox1" runat="server" Font-Names="Bookman Old Style" Font-
Size="16"></asp:TextBox>
<asp:Label style="position:absolute; top: 95px; left: 21px;" ID="Label3"
runat="server" Font-Bold="True" Font-Names="Verdana" Font-Size="Medium"
Text="Password"></asp:Label>
<asp:TextBox style="position:absolute; top: 95px; left: 146px; width: 185px; height: 25px;"
ID="TextBox2" runat="server" TextMode="Password"
Font-Names="Bookman Old Style" Font-Size="16"></asp:TextBox>
<asp:Button STYLE="position:absolute; background-color: Transparent; background-image:
url('Images/red.jpg'); top: 149px; left: 72px; width: 97px; height: 32px;"
ID="Button1" runat="server" Text="Submit" Font-Size="15pt" ForeColor="#CC3300"
Font-Names="Imprint MT Shadow" onclick="Button1_Click" Font-Bold="True" />
<asp:Button STYLE="position:absolute; background-color: Transparent; background-image:
url('Images/red.jpg'); top: 149px; left: 187px; width: 97px; height: 32px;"
ID="Button2" runat="server" Text="Clear" Font-Size="15pt" ForeColor="#CC3300"
Font-Names="Imprint MT Shadow" onclick="Button2_Click" Font-Bold="True" />
</asp:Panel>
<asp:LinkButton ID="LinkButton3" runat="server" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black" STYLE="position:absolute; top: 434px; left: 764px; width: 149px;"
PostBackUrl="~/Default.aspx">Back to Home</asp:LinkButton>
<cc1:DropShadowExtender ID="DropShadowExtender1" runat="server" Opacity=".1"
TargetControlID="Panel1" Rounded="true" Radius="3">
</cc1:DropShadowExtender>
<cc1:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" runat="server"
WatermarkCssClass="watermarked" WatermarkText="Roles ID"
TargetControlID="Textbox1"></cc1:TextBoxWatermarkExtender>
<cc1:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender2" runat="server"
WatermarkCssClass="watermarked" WatermarkText="Password"
TargetControlID="Textbox2"></cc1:TextBoxWatermarkExtender>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
</asp:Content>
RolesLogin.aspx.cs

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
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;
using System.Xml.Linq;
public partial class Roleslogin : System.Web.UI.Page
{ string upid, uppwd;
protected void Button1_Click(object sender, EventArgs e)
{
upid = TextBox1.Text.ToUpper();
uppwd = TextBox2.Text.ToUpper();
if (TextBox1.Text == "")
{
string myStringVariable1 = string.Empty;
myStringVariable1 = "Enter Roles ID";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);
}
else
{
if (TextBox2.Text == "")
{string myStringVariable1 = string.Empty;
myStringVariable1 = "Enter Roles Password";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);}
else
{
if (upid == "ROLES" && uppwd == "ROLES")
{Response.Redirect("tpaverify.aspx");}
else
{
string myStringVariable1 = string.Empty;
myStringVariable1 = "Enter Roles ID/Password Correcly.";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);
}}}}
protected void Button2_Click(object sender, EventArgs e)
{
TextBox1.Text = "";
TextBox2.Text = "";
}}
RolesUserAccountAuditor.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/TPAMasterPage.master"


AutoEventWireup="true" CodeFile="RolesUseraccountauditor.aspx.cs"
Inherits="RolesUseraccountauditor" %>
<asp:Content ID="Content1" ContentPlaceHolderID="AdminOwnerDetails" runat="server">
<asp:Panel Style="position: absolute; top: 106px; left: 22px; height: 18px; width: 959px;"
ID="Panel1" runat="server">
<font size="4" face="Bookman old style" color="white">
<marquee style="position: absolute; top: -1px; left: 10px; width: 940px;" behavior="scroll"
direction="left" scrollamount="15">User Account List !</marquee></font></asp:Panel>
<asp:Label style="position:absolute; top: 219px; left: 321px;" ID="Label1"
runat="server" Font-Italic="False" Font-Bold="True"Font-Names="Imprint MT Shadow"
Font-Size="X-Large" Text="User Account Auditor!!!"ForeColor="#0000CC" ></asp:Label>
<asp:Label style="position: absolute; top: 270px; left: 75px;" ID="Label2"
runat="server" Text="Select User Name" Font-Bold="false" Font-Italic="False"
Font-Names="Baskerville Old Face" Font-Size="Large"></asp:Label>
<asp:DropDownList style="position: absolute; top: 301px; left: 70px; height: 25px; width:
176px;"ID="DropDownList1" runat="server" Font-Bold="True"
Font-Names="Baskerville Old Face" Font-Size="Large" AutoPostBack="True"
onselectedindexchanged="DropDownList1_SelectedIndexChanged" >
<asp:ListItem Text="--Select--" Value="--Select--" Selected="True"></asp:ListItem>
</asp:DropDownList>
<asp:Panel style="position: absolute; top: 306px; left: 254px; height: 440px; width: 433px;"
ID="Panel2" runat="server" Visible="false" BorderWidth="2"
BorderColor="#CC3300">
<asp:Label style="position: absolute; top: 40px; left: 45px;" ID="Label3"
runat="server" Text="Client ID" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 40px; left: 180px;" ID="Label4"
runat="server" Text=":" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 40px; left: 240px;" ID="Label5"
runat="server" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 93px; left: 45px;" ID="Label6"
runat="server" Text="Client Name" Font-Names="Rockwell"
Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 93px; left: 180px;" ID="Label7"
runat="server" Text=":" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 93px; left: 240px;" ID="Label8"
runat="server" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 146px; left: 45px;" ID="Label9"
runat="server" Text="Gender" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 146px; left: 180px;" ID="Label10"
runat="server" Text=":" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 146px; left: 240px;" ID="Label11"
runat="server" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 199px; left: 45px;" ID="Label12"
runat="server" Text="Age" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 199px; left: 180px;" ID="Label13"
runat="server" Text=":" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 199px; left: 240px;" ID="Label14"runat="server"
Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 252px; left: 45px;" ID="Label15"
runat="server" Text="Mobile" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 252px; left: 180px;" ID="Label16"
runat="server" Text=":" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 252px; left: 240px;" ID="Label17"
runat="server" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 305px; left: 45px;" ID="Label18"
runat="server" Text="Emailid" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 305px; left: 180px;" ID="Label19"
runat="server" Text=":" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 305px; left: 240px;" ID="Label20"
runat="server" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 358px; left: 45px;" ID="Label21"
runat="server" Text="Date" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 388px; left: 45px;" ID="Label25"
runat="server" Text="Roles" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 358px; left: 180px;" ID="Label22"
runat="server" Text=":" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 388px; left: 180px; right: 248px;" ID="Label26"
runat="server" Text=":" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 358px; left: 240px;" ID="Label23"
runat="server" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 388px; left: 240px; height: 19px; width: 139px;"
ID="Label27"runat="server" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:LinkButton ID="LinkButton7" runat="server"style="position:absolute; top: 450px; left:
-30px;" Font-Bold="True"Font-Names="Imprint MT Shadow" ForeColor="#0000CC"
onclick="LinkButton7_Click" Font-Size="X-Large" >RolesAuditor(True)</asp:LinkButton>
<asp:LinkButton ID="LinkButton8" runat="server"style="position:absolute; top: 450px; left:
220px; height: 26px; width: 243px;" Font-Bold="True"Font-Names="Imprint MT Shadow"
ForeColor="#0000CC"onclick="LinkButton8_Click" Font-Size="X-Large" >Roles
Auditor(Fales)</asp:LinkButton></asp:Panel>
<asp:LinkButton ID="LinkButton2" runat="server"STYLE="position:absolute; top: 435px;
left: 755px;" Font-Bold="True"Font-Names="Imprint MT Shadow" Font-Size="Large" Font-
Underline="False"ForeColor="Black" PostBackUrl="~/tpaverify.aspx" >Alert
Message</asp:LinkButton>
<asp:LinkButton ID="LinkButton1" runat="server" Font-Bold="True"Font-Names="Imprint
MT Shadow" Font-Size="Large" Font-Underline="False"ForeColor="Black"
PostBackUrl="~/KeyResponses.aspx"STYLE="position:absolute; top: 475px; left: 755px;
width: 161px;">Key Responses</asp:LinkButton>
<asp:LinkButton ID="LinkButton5" runat="server" Font-Bold="True"Font-Names="Imprint
MT Shadow" Font-Size="Large" Font-Underline="False"ForeColor="Black"
PostBackUrl="~/Intruderdetails.aspx"STYLE="position:absolute; top: 515px; left: 755px;
width: 176px;">Intruder Details</asp:LinkButton>
<asp:LinkButton ID="LinkButton4" runat="server" Font-Bold="True"Font-
Names="ImprintMT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black" PostBackUrl="~/AdminOwnerDetails.aspx"STYLE="position:absolute;
top: 555px; left: 755px; width: 161px;">ClientDetails</asp:LinkButton>
</asp:Content>
RolesUserAccountAuditor

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
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;
using System.Xml.Linq;
using System.Data.SqlClient;
public partial class RolesUseraccountauditor : System.Web.UI.Page
{SqlConnection con = new
SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]);
protected void Page_Load(object sender, EventArgs e)
{try
{if (!IsPostBack){Label24.Visible = false;
SqlDataAdapter adp = new SqlDataAdapter("Select ownerid from Registration", con);
DataSet ds = new DataSet();adp.Fill(ds);
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{DropDownList1.Items.Add(ds.Tables[0].Rows[i]["ownerid"].ToString());}}}
catch (Exception ex)
{MsgBox.Show("Time Out");}}
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{if (DropDownList1.SelectedItem.Text == "--Select--")
{Panel2.Visible = false;}else{
Panel2.Visible = true;
SqlDataAdapter adp = new SqlDataAdapter("Select * from Registration where ownerid='" +
DropDownList1.SelectedItem.Text + "'", con);
DataSet ds = new DataSet();adp.Fill(ds);
Label5.Text = ds.Tables[0].Rows[0]["oid"].ToString();
Label8.Text = ds.Tables[0].Rows[0]["ownerid"].ToString();
Label11.Text = ds.Tables[0].Rows[0]["gender"].ToString();
Label14.Text = ds.Tables[0].Rows[0]["age"].ToString();
Label17.Text = ds.Tables[0].Rows[0]["mobile"].ToString();
Label20.Text = ds.Tables[0].Rows[0]["emailid"].ToString();
Label23.Text = ds.Tables[0].Rows[0]["date"].ToString();
Label27.Text = ds.Tables[0].Rows[0]["RolesAuditor"].ToString();}}
protected void LinkButton7_Click(object sender, EventArgs e)
{con.Open();
SqlCommand bla = new SqlCommand("Update Registration set RolesAuditor='Roles Auditor
Successfully' where oid='" + Label5.Text + "'", con);
bla.ExecuteNonQuery();
Label24.Visible = true;
Label24.Text = "Hi "+Label8.Text+ " Roles Auditor Successfully";
con.Close();}}
ServerVerify.aspx

<%@ Page Language="C#" AutoEventWireup="true"


MasterPageFile="~/ServerMasterPage.master" CodeFile="serververify.aspx.cs"
Inherits="serververify" %>
<asp:Content ContentPlaceHolderID="serververify" runat="server">
<asp:Panel Style="position: absolute; top: 106px; left: 22px; height: 18px; width: 959px;"
ID="Panel1" runat="server"><font size="4" face="Bookman old style" color="white">
<marquee style="position: absolute; top: -1px; left: 10px; width: 940px;" behavior="scroll"
direction="left" scrollamount="15">Key Request Message !</marquee></font></asp:Panel>
<asp:Label style="position:absolute; top: 211px; left: 382px;" ID="Label1"
runat="server" Font-Italic="False" Font-Bold="True"Font-Names="Imprint MT Shadow"
Font-Size="X-Large" Text="Trust Decisio Owners Certificate"
ForeColor="#CC3300"></asp:Label><asp:GridView style="position: absolute; top: 256px;
left: 217px; width: 599px;"ID="GridView1" runat="server" AutoGenerateColumns="False"
CellPadding="4" ForeColor="#333333"AllowPaging="True" PageSize="15"
onpageindexchanging="GridView1_PageIndexChanging" GridLines="None" >
<RowStyle BackColor="#FFFBD6" ForeColor="#333333" /><Columns>
<asp:BoundField DataField="fid" HeaderText="File ID" />
<asp:BoundField DataField="ffilename" HeaderText="File Name" />
<asp:BoundField DataField="fext" HeaderText="File Type" />
<asp:BoundField DataField="fowner" HeaderText="File Owner" />
<asp:BoundField DataField="fdatetime" HeaderText="Date" />
<asp:BoundField DataField="totalbytes" HeaderText="Total Bytes" />
<asp:HyperLinkField HeaderText="Decision Authority" Text="Decision Authority"
DataNavigateUrlFields="fid"DataNavigateUrlFormatString="serververify1.aspx?ID={0}" />
</Columns><FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#FFCC66" ForeColor="#333333"HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#FFCC66" ForeColor="Navy" Font-Bold="True" />
<HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" /></asp:GridView><asp:LinkButton
ID="LinkButton2" runat="server"STYLE="position:absolute; top: 435px; left: 885px; width:
243px;" Font-Bold="True"Font-Size="Large" Font-Underline="False"ForeColor="Black"
PostBackUrl="~/serververify.aspx" >key Request Message</asp:LinkButton>
<asp:LinkButton ID="LinkButton1" runat="server"STYLE="position:absolute; top: 465px;
left: 885px; width: 243px;" Font-Bold="True"Font-Size="Large" Font-Underline="False"
ForeColor="Black" PostBackUrl="~/OwnerInteractionHistory.aspx" >User Interaction
History</asp:LinkButton><asp:LinkButton ID="LinkButton4"
runat="server"STYLE="position:absolute; top: 505px; left: 885px; width: 243px;" Font-
Bold="True"Font-Size="Large" Font-Underline="False"ForeColor="Black"
PostBackUrl="~/OwnerCentralRepository.aspx" >History
CentralRepository</asp:LinkButton><asp:LinkButton ID="LinkButton5" runat="server"
Font-Bold="True"Font-Names="Imprint MT Shadow" Font-Size="Large" Font-
Underline="False"ForeColor="Black"STYLE="position:absolute; top: 542px; left: 895px;
width: 149px;"PostBackUrl="~/CloudReport.aspx">User Report</asp:LinkButton>
<asp:LinkButton ID="LinkButton3" runat="server" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black"STYLE="position:absolute; top: 582px; left: 895px; width: 149px;"
PostBackUrl="~/Default.aspx">Back to Home</asp:LinkButton>
</asp:Content>
ServerVerify.aspx.cs

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
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;
using System.Xml.Linq;
using System.Data.SqlClient;
public partial class serververify : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]);
protected void Page_Load(object sender, EventArgs e)
{
SqlDataAdapter adp1 = new SqlDataAdapter("Select * from filearchive where tpaview
='View'", con);
DataSet ds1 = new DataSet();
adp1.Fill(ds1);
if (ds1.Tables[0].Rows.Count > 0)
{
GridView1.DataSource = ds1;
GridView1.DataBind();
}
else
{
MsgBox.Show("No Request Found");
}}
public void bindgrid()
{
SqlDataAdapter adp1 = new SqlDataAdapter("Select * from filearchive where tpaview
='View'", con);
DataSet ds1 = new DataSet();
adp1.Fill(ds1);
if (ds1.Tables[0].Rows.Count > 0)
{GridView1.DataSource = ds1;
GridView1.DataBind();}
else
{MsgBox.Show("No Request Found");}}
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridView1.PageIndex = e.NewPageIndex;
bindgrid();
}}
TpaVerify.aspx

<%@ Page Language="C#" AutoEventWireup="true"


MasterPageFile="~/TPAMasterPage.master" CodeFile="tpaverify.aspx.cs"
Inherits="tpaverify" %><asp:Content ContentPlaceHolderID="tpaverify" runat="server">
<asp:Panel Style="position: absolute; top: 106px; left: 22px; height: 18px; width: 959px;"
ID="Panel1" runat="server"><font size="4" face="Bookman old style" color="white">
<marquee style="position: absolute; top: -1px; left: 10px; width: 940px;" behavior="scroll"
direction="left" scrollamount="15">Alert Message !</marquee></font></asp:Panel>
<asp:Label style="position:absolute; top: 207px; left: 383px;" ID="Label1"
runat="server" Font-Italic="False" Font-Bold="True"Font-Names="Britannic Bold" Font-
Size="X-Large" Text="Alert Message"></asp:Label>
<asp:GridView style="position: absolute; top: 256px; left: 87px; width: 599px;"
ID="GridView1" runat="server" AutoGenerateColumns="False"
CellPadding="4" ForeColor="#333333"AllowPaging="True" PageSize="15"
onpageindexchanging="GridView1_PageIndexChanging" GridLines="None"
onselectedindexchanged="GridView1_SelectedIndexChanged" >
<RowStyle BackColor="#FFFBD6" ForeColor="#333333" /><Columns>
<asp:BoundField DataField="fid" HeaderText="File ID" />
<asp:BoundField DataField="ffilename" HeaderText="File Name" />
<asp:BoundField DataField="fext" HeaderText="File Type" />
<asp:BoundField DataField="fowner" HeaderText="File Owner" />
<asp:BoundField DataField="fdatetime" HeaderText="Date" />
<asp:BoundField DataField="totalbytes" HeaderText="Total Bytes" />
<asp:HyperLinkField HeaderText="Certificate Roles Auditor" Text="Certificate Roles
Auditor" DataNavigateUrlFields="fid" DataNavigateUrlFormatString="tpaverify1.aspx?
ID={0}" /></Columns>
<FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#FFCC66" ForeColor="#333333"HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#FFCC66" ForeColor="Navy" Font-Bold="True" />
<HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" /></asp:GridView>
<asp:LinkButton ID="LinkButton2" runat="server"
STYLE="position:absolute; top: 435px; left: 755px;" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black" PostBackUrl="~/tpaverify.aspx" >Alert Message</asp:LinkButton>
<asp:LinkButton ID="LinkButton1" runat="server" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black" PostBackUrl="~/KeyResponses.aspx"STYLE="position:absolute; top:
475px; left: 755px; width: 161px;">KeyResponses</asp:LinkButton>
<asp:LinkButton ID="LinkButton5" runat="server" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black" PostBackUrl="~/Intruderdetails.aspx"
STYLE="position:absolute; top: 515px; left: 755px; width: 172px;">Intruder
Details</asp:LinkButton><asp:LinkButton ID="LinkButton4" runat="server" Font-
Bold="True"Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black" PostBackUrl="~/AdminOwnerDetails.aspx"
STYLE="position:absolute; top: 555px; left: 755px; width: 161px;">Client
Details</asp:LinkButton>
</asp:Content>
TpaVerify.aspx.cs

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
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;
using System.Xml.Linq;
using System.Data.SqlClient;
public partial class tpaverify : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]);
protected void Page_Load(object sender, EventArgs e)
{
SqlDataAdapter adp1 = new SqlDataAdapter("Select * from filearchive where tpaview!
='View'", con);
DataSet ds1 = new DataSet();
adp1.Fill(ds1);
if (ds1.Tables[0].Rows.Count > 0)
{GridView1.DataSource = ds1;
GridView1.DataBind();}
else
{MsgBox.Show("No Request Found");}}
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{GridView1.PageIndex = e.NewPageIndex;
bindgrid();
update();}
public void bindgrid()
{SqlDataAdapter adp1 = new SqlDataAdapter("Select * from filearchive where tpaview!
='View'", con);
DataSet ds1 = new DataSet();
adp1.Fill(ds1);
if (ds1.Tables[0].Rows.Count > 0)
{GridView1.DataSource = ds1;
GridView1.DataBind();}
else
{MsgBox.Show("No Request Found");}}
public void update()
{SqlCommand cmd = new SqlCommand("update filearchieve set keystatus='sent' where
tpaview!=view", con);
cmd.ExecuteNonQuery();
con.Close();
}}
UserttoRolesauditor.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/ClientMasterPage.master"


AutoEventWireup="true" CodeFile="UserttoRolesauditor.aspx.cs"
Inherits="UserttoRolesauditor" %>
<asp:Content ID="Content1" ContentPlaceHolderID="OwnerFileUpload" runat="server">
<asp:Panel Style="position: absolute; top: 106px; left: 22px; height: 18px; width: 959px;"
ID="Panel1" runat="server"><font size="4" face="Bookman old style" color="white">
<marquee style="position: absolute; top: -1px; left: 10px; width: 940px;" behavior="scroll"
direction="left" scrollamount="15">Upload Files !</marquee></font></asp:Panel>
<asp:Label style="position:absolute; top: 203px; left: 390px; height: 35px;" ID="Label1"
runat="server" Font-Italic="True" Font-Bold="True"Font-Names="Century Schoolbook"
Font-Size="XX-Large" Text="File Upload"ForeColor="#993300" ></asp:Label>
<asp:Panel style="position:absolute; top: 251px; left: 266px; height: 290px; width: 430px;
overflow:scroll"ID="Panel2" runat="server" BorderColor="#CC3300"
BorderStyle="Solid" BorderWidth="5px" ><center>
<asp:GridView ID="GridView1" runat="server" BackColor="#DEBA84"
BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" CellPadding="3"
CellSpacing="2" onselectedindexchanged="GridView1_SelectedIndexChanged">
<FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
<HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
<PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
<SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
</asp:GridView></center></asp:Panel>
<asp:LinkButton ID="LinkButton2" runat="server"
STYLE="position:absolute; top: 435px; left: 755px;" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="#FF3300" PostBackUrl="~/ClientRegistration.aspx"
onclick="LinkButton2_Click" >FileUpload</asp:LinkButton>
<asp:LinkButton ID="LinkButton1" runat="server" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Red"STYLE="position:absolute; top: 475px; left: 755px; width: 153px; height:
23px;"onclick="LinkButton1_Click">Packet Sending</asp:LinkButton>
<asp:LinkButton ID="LinkButton4" runat="server" Font-Bold="True"
Font-Names="Times New Roman" Font-Size="Large" Font-Underline="False"
ForeColor="Red" STYLE="position:absolute; top: 515px; left: 755px; width: 149px;"
PostBackUrl="~/Default.aspx" >Download</asp:LinkButton>
<asp:LinkButton ID="LinkButton5" runat="server" Font-Bold="True"
Font-Names="Times New Roman" Font-Size="Large" Font-Underline="False"
ForeColor="Red" STYLE="position:absolute; top: 545px; left: 755px; width: 149px;"
PostBackUrl="~/UserttoRolesauditor.aspx" >Roles Auditer</asp:LinkButton>
<asp:LinkButton ID="LinkButton3" runat="server" Font-Bold="True"
Font-Names="Times New Roman" Font-Size="Large" Font-Underline="False"
ForeColor="Red"STYLE="position:absolute; top: 575px; left: 755px; width: 149px;"
PostBackUrl="~/Default.aspx">Back to Home</asp:LinkButton>
<asp:Label ID="Label8" runat="server" Text="Label" Visible="False"></asp:Label>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
</asp:Content>
UserttoRolesauditor.aspx.cs

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
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;
using System.Xml.Linq;
using System.Diagnostics;
using System.Text;
using System.Security.Cryptography;
using System.IO;
using System.Net;
using System.Net.Mail;
using System.Data.SqlClient;
public partial class UserttoRolesauditor : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]);
string ownerid;
protected void Page_Load(object sender, EventArgs e)
{
try{
if (!IsPostBack)
{
ownerid = (string)Session["ownerid"];
SqlDataAdapter sda = new SqlDataAdapter("select * from Registration where ownerid ='" +
ownerid + "'", con);
DataSet ds = new DataSet();
sda.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
}}
catch (Exception ex)
{
MsgBox.Show("Time out");
}}
protected void LinkButton2_Click(object sender, EventArgs e)
{Response.Redirect("OwnerFileUpload.aspx");}
protected void LinkButton1_Click(object sender, EventArgs e)
{
Response.Redirect("packetsending.aspx");
}}

You might also like