HCFC WAPka
HTTP Costum Free Config | AkunSSH | Download | Tutorial | Tools Service | Searching Video and File Sharing.
]=]
print(string.format(title_html))
function firstToUpper(str)
return (str:gsub("^%l", string.upper))
end
local category = req.script_filename
local category = category:gsub("-", " ")
local category = firstToUpper(category)
index_header = "Category : " .. category
html.title = "index_header"
raw_uri = req.uri
forum_id = tonumber(string.match(raw_uri, "/category/(%d+)"))
if (req.get.page == nil) then pagenumber = "1" else pagenumber = req.get.page end
local param_post = {
page = pagenumber,
forumid = forum_id,
limit = 10,
order = "DESC"
}
local is_ok, postlist = api.post_info(param_post)
if (postlist[0] == nil) then empty_post = 1 end
if (empty_post == 1) then post_entry = 'No pages found' else post_entry = '' end
local index_html = [=[
%s
%s
]=]
print(string.format(index_html, index_header, post_entry));
local post_index_html = [[
]]
print(html.render_tag(post_index_html, postlist, true));
print("
")
print("")
local param_paging = {
page = pagenumber + 1,
limit = 10,
order = "DESC"
}
local is_ok, paging = api.post_info(param_paging)
if (paging[0] == nil) then next_page = "style=\"pointer-events:none;\"" else next_page = "" end
if (pagenumber == "1") then prev_page = "style=\"pointer-events:none;\"" else prev_page="" end
local paging_html = [=[