ASP.NET Page /Admin/ViewLog.aspx (C#)
Uses Code Behind Page Page /Admin/ViewLog.aspx.cs (C#)
1: <%@ Page Language="C#" AutoEventWireup="True" Inherits="ViewLog" Codebehind="ViewLog.aspx.cs" %>  
2: <%@ Register Src="~/Controls/GoogleMapForASPNet.ascx" TagName="GoogleMapForASPNet" TagPrefix="uc1"%>  
3: <%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"  
4:     Namespace="System.Web.UI" TagPrefix="asp" %>  
5:   
6: <style type="text/css">  
7:       html, body, #map_canvas {  
8:         margin: 0;  
9:         padding: 0;  
10:         height: 100%;  
11:       }  
12:     </style>  
13:   
14: <script type="text/javascript" src="../Include/jquery.js"></script>  
15: <script type="text/javascript" src="../Include/jquery-1.7.2.min.js"></script>  
16:   
17: <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>  
18:   
19: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
20:   
21: <html xmlns="http://www.w3.org/1999/xhtml" >  
22: <head runat="server">  
23:     <title>Untitled Page</title>  
24: </head>  
25: <body onload="initialize()">  
26:       
27:     <form id="form1" runat="server">  
28:     <asp:ScriptManager ID="ScriptManager1" runat="server"/>  
29:   
30: <script type="text/javascript">  
31:     var map;  
32:     var infowindowLevel = 0;  
33:     var prm = Sys.WebForms.PageRequestManager.getInstance();  
34:     prm.add_initializeRequest(InitializeRequest);  
35:     prm.add_endRequest(EndRequest);  
36:   
37:     function InitializeRequest(sender, args) {  
38:     }  
39:   
40:     // fires after the partial update of UpdatePanel  
41:     function EndRequest(sender, args) {  
42:         initialize()  
43:     }  
44:   
45:     function initialize() {  
46:         //Center of the earth  
47:         var latlng = new google.maps.LatLng(24.324408, 12.216797);  
48:         var mapOptions = {  
49:             zoom: 2,  
50:             center: latlng,  
51:             mapTypeId: google.maps.MapTypeId.ROADMAP  
52:         };  
53:   
54:         map = new google.maps.Map(document.getElementById("map_canvas"),mapOptions);  
55:   
56:         setMarkers(map);  
57:   
58:     }  
59:   
60:   
61:     function setMarkers(map) {  
62:         var logs;  
63:   
64:         var OnlyRegisteredUsers = document.getElementById("<%=lstUserType.ClientID %>");  
65:         OnlyRegisteredUsers = OnlyRegisteredUsers.options[OnlyRegisteredUsers.selectedIndex].value;  
66:         if (OnlyRegisteredUsers == "1")  
67:             OnlyRegisteredUsers = true;  
68:         else  
69:             OnlyRegisteredUsers = false;  
70:   
71:         var LogArea = document.getElementById("<%=txtLogArea.ClientID %>").value;  
72:   
73:         var lstCountries = document.getElementById("<%=lstCountries.ClientID %>");  
74:         lstCountries=lstCountries.options[lstCountries.selectedIndex].value;  
75:   
76:         $.ajax({  
77:             type: "POST",  
78:             contentType: "application/json; charset=utf-8",  
79:             url: "/WebServices/LogService.asmx/GetLog",  
80:             data: "{OnlyRegisteredUsers:" + OnlyRegisteredUsers + ",LogArea:'" + LogArea + "',LogLocation:'" + lstCountries + "'}",  
81:             dataType: "json",  
82:             success: function (response) {  
83:                   
84:                 logs = response.d;  
85:                 for (var i = 0; i < logs.length; i++) {  
86:                     if (logs[i].LogLocation.toLowerCase() != "unknown") {  
87:                         var myLatLng = new google.maps.LatLng(logs[i].LogLatitude, logs[i].LogLongitude);  
88:                         var marker = new google.maps.Marker({  
89:                             position: myLatLng,  
90:                             map: map  
91:                         });  
92:                         marker.setTitle(logs[i].LogLocation);  
93:                         attachInfowindow(marker, logs[i].LogArea);  
94:                     }  
95:                 }  
96:             },  
97:             failure: function (msg) {  
98:                 $('#output').text(msg);  
99:             }  
100:         });  
101:     }  
102:   
103:   
104:     function attachInfowindow(marker, logArea) {  
105:         var infowindow = new google.maps.InfoWindow(  
106:       { content: logArea  
107:       });  
108:         google.maps.event.addListener(marker, 'click', function () {  
109:             infowindow.setZIndex(++infowindowLevel);  
110:             infowindow.open(map, marker);  
111:         });  
112:     }  
113:     function cmdClearLog_Click() {  
114:   
115:         $(document).ready(function () {  
116:             $.ajax  
117:             ({  
118:                 type: "POST",  
119:                 contentType: "application/json; charset=utf-8",  
120:                 url: "/WebServices/LogService.asmx/ClearLog",  
121:                 data: "{}",  
122:                 dataType: "json",  
123:                 success: function (response) {  
124:                     form1.submit();  
125:                 },  
126:                 failure: function (msg) {  
127:                     alert(msg);  
128:                 }  
129:             });  
130:         });  
131:   
132:   
133:     }  
134:     </script>  
135:   
136:     <div>  
137:         <embed hidden="true" src="~/Include/boing_x.wav" id="soundAlarm" runat="server">  
138:         </embed>    
139:               
140:         <asp:HyperLink ID="lblHome" runat="server" NavigateUrl="~/Admin/Default.aspx">Home</asp:HyperLink>   (* - Registered user)<br />  
141:   
142:         <asp:UpdatePanel runat="server" id="TimedPanel">  
143:         <Triggers>  
144:             <asp:AsyncPostBackTrigger controlid="UpdateTimer" eventname="Tick" />  
145:         </Triggers>  
146:         <ContentTemplate>  
147:             <asp:Timer runat="server" id="UpdateTimer" ontick="UpdateTimer_Tick"/>  
148:             <table>  
149:             <tr>  
150:                 <td>  
151: There is a limit of 150 source code lines in the evaluation version
152: There is a limit of 150 source code lines in the evaluation version
153: There is a limit of 150 source code lines in the evaluation version
154: There is a limit of 150 source code lines in the evaluation version
155: There is a limit of 150 source code lines in the evaluation version
156: There is a limit of 150 source code lines in the evaluation version
157: There is a limit of 150 source code lines in the evaluation version
158: There is a limit of 150 source code lines in the evaluation version
159: There is a limit of 150 source code lines in the evaluation version
160: There is a limit of 150 source code lines in the evaluation version
161: There is a limit of 150 source code lines in the evaluation version
162: There is a limit of 150 source code lines in the evaluation version
163: There is a limit of 150 source code lines in the evaluation version
164: There is a limit of 150 source code lines in the evaluation version
165: There is a limit of 150 source code lines in the evaluation version
166: There is a limit of 150 source code lines in the evaluation version
167: There is a limit of 150 source code lines in the evaluation version
168: There is a limit of 150 source code lines in the evaluation version
169: There is a limit of 150 source code lines in the evaluation version
170: There is a limit of 150 source code lines in the evaluation version
171: There is a limit of 150 source code lines in the evaluation version
172: There is a limit of 150 source code lines in the evaluation version
173: There is a limit of 150 source code lines in the evaluation version
174: There is a limit of 150 source code lines in the evaluation version
175: There is a limit of 150 source code lines in the evaluation version
176: There is a limit of 150 source code lines in the evaluation version
177: There is a limit of 150 source code lines in the evaluation version
178: There is a limit of 150 source code lines in the evaluation version
179: There is a limit of 150 source code lines in the evaluation version
180: There is a limit of 150 source code lines in the evaluation version
181: There is a limit of 150 source code lines in the evaluation version
182: There is a limit of 150 source code lines in the evaluation version
183: There is a limit of 150 source code lines in the evaluation version
184: There is a limit of 150 source code lines in the evaluation version
185: There is a limit of 150 source code lines in the evaluation version
186: There is a limit of 150 source code lines in the evaluation version
187: There is a limit of 150 source code lines in the evaluation version
188: There is a limit of 150 source code lines in the evaluation version
189: There is a limit of 150 source code lines in the evaluation version
190: There is a limit of 150 source code lines in the evaluation version
191: There is a limit of 150 source code lines in the evaluation version
192: There is a limit of 150 source code lines in the evaluation version
193: There is a limit of 150 source code lines in the evaluation version
194: There is a limit of 150 source code lines in the evaluation version
195: There is a limit of 150 source code lines in the evaluation version
196: There is a limit of 150 source code lines in the evaluation version
197: There is a limit of 150 source code lines in the evaluation version
198: There is a limit of 150 source code lines in the evaluation version
199: There is a limit of 150 source code lines in the evaluation version
200: There is a limit of 150 source code lines in the evaluation version
201: There is a limit of 150 source code lines in the evaluation version
202: There is a limit of 150 source code lines in the evaluation version
203: There is a limit of 150 source code lines in the evaluation version
204: There is a limit of 150 source code lines in the evaluation version
205: There is a limit of 150 source code lines in the evaluation version
206: There is a limit of 150 source code lines in the evaluation version
207: There is a limit of 150 source code lines in the evaluation version
208: There is a limit of 150 source code lines in the evaluation version
209: There is a limit of 150 source code lines in the evaluation version
210: There is a limit of 150 source code lines in the evaluation version
211: There is a limit of 150 source code lines in the evaluation version
212: There is a limit of 150 source code lines in the evaluation version
213: There is a limit of 150 source code lines in the evaluation version
214: There is a limit of 150 source code lines in the evaluation version
215: There is a limit of 150 source code lines in the evaluation version
216: There is a limit of 150 source code lines in the evaluation version
217: There is a limit of 150 source code lines in the evaluation version
218: There is a limit of 150 source code lines in the evaluation version
219: There is a limit of 150 source code lines in the evaluation version
220: There is a limit of 150 source code lines in the evaluation version
221: There is a limit of 150 source code lines in the evaluation version
222: There is a limit of 150 source code lines in the evaluation version
223: There is a limit of 150 source code lines in the evaluation version
224: There is a limit of 150 source code lines in the evaluation version
225: There is a limit of 150 source code lines in the evaluation version
226: There is a limit of 150 source code lines in the evaluation version
227: There is a limit of 150 source code lines in the evaluation version
228: There is a limit of 150 source code lines in the evaluation version
229: There is a limit of 150 source code lines in the evaluation version
230: There is a limit of 150 source code lines in the evaluation version
231: There is a limit of 150 source code lines in the evaluation version
232: There is a limit of 150 source code lines in the evaluation version
233: There is a limit of 150 source code lines in the evaluation version
234: There is a limit of 150 source code lines in the evaluation version
235: There is a limit of 150 source code lines in the evaluation version

.NET Documentation Tool is © 2002 - 2009 Winnersh Triangle Web Solutions Limited.