<% local msg = {} if _SESSION["logined"] ~= nil and _SESSION["admin_readonly"] == 0 then local weblinks = _POST["weblinks"] local is_uplink = _POST["is_uplink"] or "0" local weblink_type = "download link" if is_uplink == "1" then weblink_type = "upload link" end c_DeleteWeblink(weblinks, is_uplink) c_AddAdminLog("administrator '".._SESSION["admin"].."' deleted "..weblink_type.." '"..weblinks.."' ",ADMIN_LOG_OK) rawset(msg, "code", 0) print(json.encode(msg)) else rawset(msg, "code", -1) rawset(msg, "error", "not logged in") print(json.encode(msg)) end %>