luci/libs/luci-lib-nixio/axTLS/www/lua/test_cookies.lua
Jo-Philipp Wich 1bb4822dca Rework LuCI build system
* Rename subdirectories to their repective OpenWrt package names
 * Make each LuCI module its own standalone package
 * Deploy a shared luci.mk which is used by each module Makefile

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-08 16:26:20 +01:00

14 baris
344 B
Lua

local cookies = require"cgilua.cookies"
CL_COOKIE = "cgilua_cookie"
local test = cookies.get (CL_COOKIE)
cookies.set (CL_COOKIE, os.date())
cgilua.htmlheader ()
cgilua.put ([[
<h1>Testing Cookies library</h1>
]]..CL_COOKIE..' = '..tostring(test)..[[<br>
Assigning current date to cookie!<br>
Reload this script to check cookie's value!
]])