<% if _SESSION["logined"] ~= nil then if _SESSION["admin_readonly"] ~= nil and _SESSION["admin_readonly"] == 1 then else if _SESSION["admin_nowpath"] == nil or _SESSION["admin_nowpath"] == "" then _SESSION["admin_nowpath"] = "/" end local newdir = _POST["dir"] if newdir ~= nil and newdir ~= "" then local fullpath = _SESSION["admin_nowpath"].."/"..newdir local CanMakedir = true if _SESSION["admin_basefolder"] ~= nil and _SESSION["admin_basefolder"] ~= "" then if c_StringLength(fullpath) < c_StringLength(_SESSION["admin_basefolder"]) then CanMakedir = false else if c_StringFind(fullpath, _SESSION["admin_basefolder"]) == -1 then CanMakedir = false end end end if CanMakedir == true then local result = c_MkDir(fullpath) if result == true then c_AddAdminLog("administrator '".._SESSION["admin"].."' created folder ["..fullpath.."].",ADMIN_LOG_OK) else c_AddAdminLog("administrator '".._SESSION["admin"].."' created folder ["..fullpath.."] failed.",ADMIN_LOG_ERROR) end end end end end %>