<% include("checklogin.html") include("language.html") if _SESSION["username"] ~= nil and _SESSION["currentpath"] ~= nil then local dirname = _GET["dir"] local filename = _GET["filename"] local height = _GET["height"] or 520 local canwrite = false local filecontent = "" local nowdir = string.gsub(_SESSION["currentpath"],":{{","%[") nowdir = string.gsub(nowdir,"}}:","%]") if dirname == nil or dirname == "" or filename == nil or filename == "" then print("") exit(); end local status,filecontent,canwrite,charcode = c_GetFileContent(_SESSION["username"],filename,dirname) if status ~= 1 then print("") exit() end c_AddConnection(_SESSION["username"],nowdir,_REMOTE_IP,_SESSION_ID,"OPEN TEXTFILE") c_AddWebLog("Start editing text file '"..filename.."'",_SESSION_ID,DOMAIN_LOG_WEB_RESPOND) %> <%=filename%> <% if canwrite == true then print("") end %> <% else print("") end %>