%@ Page language="C#" explicit="true" %>
<%
string ServerName = System.Net.Dns.GetHostName();
string datetime = DateTime.Now.Year.ToString() + "-" + (DateTime.Now.Month + 100).ToString().Substring(1, 2) + "-" + (DateTime.Now.Day + 100).ToString().Substring(1, 2) + "T" + (DateTime.Now.Hour + 100).ToString().Substring(1, 2) + ":" + (DateTime.Now.Minute + 100).ToString().Substring(1, 2) + ":" + (DateTime.Now.Second + 100).ToString().Substring(1, 2) + ".0Z";
HttpContext.Current.Response.Write("" + "\r\n");
HttpContext.Current.Response.Write("" + "\r\n");
HttpContext.Current.Response.Write("" + "\r\n");
string Whichfolder = HttpContext.Current.Server.MapPath("rdp\\") + "/";
string[] allfiles = System.IO.Directory.GetFiles(Whichfolder);
foreach (string eachfile in allfiles)
{
string extfile = eachfile.Substring(eachfile.Length - 4, 4);
if (extfile.ToLower() == ".rdp")
{
if (!(GetRDPvalue(eachfile, "full address:s:") == ""))
{
string basefilename = eachfile.Substring(Whichfolder.Length, eachfile.Length - Whichfolder.Length - 4);
string appalias = GetRDPvalue(eachfile, "remoteapplicationprogram:s:");
string apptitle = GetRDPvalue(eachfile, "remoteapplicationname:s:");
string appicon = basefilename + ".ico";
string appicon32 = basefilename + ".png";
string apprdpfile = basefilename + ".rdp";
string appresourceid = appalias;
string appftastring = GetRDPvalue(eachfile, "remoteapplicationfileextensions:s:");
string appfulladdress = GetRDPvalue(eachfile, "full address:s:");
string rdptype = "RemoteApp";
if (appalias == "")
{
rdptype = "Desktop";
appalias = basefilename;
apptitle = basefilename;
appresourceid = basefilename;
}
else
{
rdptype = "RemoteApp";
}
DateTime filedatetimeraw = System.IO.File.GetLastWriteTime(eachfile);
string filedatetime = DateTime.Now.Year.ToString() + "-" + (filedatetimeraw.Month + 100).ToString().Substring(1,2) + "-" + (filedatetimeraw.Day + 100).ToString().Substring(1,2) + "T" + (filedatetimeraw.Hour + 100).ToString().Substring(1,2) + ":" + (filedatetimeraw.Minute + 100).ToString().Substring(1,2) + ":" + (filedatetimeraw.Second + 100).ToString().Substring(1,2) + ".0Z";
HttpContext.Current.Response.Write("" + "\r\n");
HttpContext.Current.Response.Write("" + "\r\n");
HttpContext.Current.Response.Write("" + "\r\n");
if (System.IO.File.Exists(HttpContext.Current.Server.MapPath("icon32/" + appicon32)))
{
HttpContext.Current.Response.Write("" + "\r\n");
}
HttpContext.Current.Response.Write("" + "\r\n");
if (appftastring != "")
{
HttpContext.Current.Response.Write("" + "\r\n");
string[] appftaarray = appftastring.Split(',');
foreach(string filetype in appftaarray)
{
string docicon = basefilename + "." + filetype + ".ico";
HttpContext.Current.Response.Write("" + "\r\n");
HttpContext.Current.Response.Write("" + "\r\n");
HttpContext.Current.Response.Write("" + "\r\n");
HttpContext.Current.Response.Write("" + "\r\n");
HttpContext.Current.Response.Write("" + "\r\n");
}
HttpContext.Current.Response.Write("" + "\r\n");
}
else
{
HttpContext.Current.Response.Write("" + "\r\n");
}
HttpContext.Current.Response.Write("" + "\r\n");
HttpContext.Current.Response.Write("" + "\r\n");
HttpContext.Current.Response.Write("" + "\r\n");
HttpContext.Current.Response.Write("" + "\r\n");
HttpContext.Current.Response.Write("" + "\r\n");
HttpContext.Current.Response.Write("" + "\r\n");
HttpContext.Current.Response.Write("" + "\r\n");
}
}
}
HttpContext.Current.Response.Write("" + "\r\n");
HttpContext.Current.Response.Write("" + "\r\n");
HttpContext.Current.Response.Write("" + "\r\n");
HttpContext.Current.Response.Write("" + "\r\n");
HttpContext.Current.Response.Write("" + "\r\n");
HttpContext.Current.Response.Write("" + "\r\n");
%>