Commit d250488f authored by Danny SMc's avatar Danny SMc

Updated cloud, core files for ticketing system, adding functional ticketing...

Updated cloud, core files for ticketing system, adding functional ticketing system, updated feed and added start of settings page.
parent da25ab06
......@@ -22,6 +22,7 @@ local paths = {
"main/main.updates.lua";
"main/main.help.lua";
"main/main.finder.lua";
"main/main.settings.lua";
"apps/apps.main.lua";
"apps/apps.all.lua";
"apps/apps.view.lua";
......@@ -34,6 +35,7 @@ local paths = {
"apps/apps.owned.lua";
"apps/apps.upload.lua";
"apps/apps.update.lua";
"apps/apps.packages.lua";
"apps/apps.edit.lua";
"profile/profile.main.lua";
"profile/profile.view.lua";
......@@ -41,11 +43,19 @@ local paths = {
"feed/feed.view.lua";
"cloud/cloud.main.lua";
"mail/mail.main.lua";
"chat/chat.main.lua";
"chat/chat.personal.lua";
"chat/chat.group.lua";
"chat/chat.global.lua";
"chat/chat.info.lua";
"tickets/tickets.main.lua";
"tickets/tickets.list.lua";
"tickets/tickets.create.lua";
"tickets/tickets.view.lua";
"account/account.login.lua";
"account/account.register.lua";
"account/account.logout.lua";
"account/account.manage.lua";
"apps/apps.packages.lua";
"snippets/snippets.main.lua";
"snippets/snippets.all.lua";
"snippets/snippets.view.lua";
......
--[[
Name: chat.global
Desc: Main chat global viewer
--]]
function program.chat.global()
base.screen.colour("white")
program.draw.menubar("Chat: Global")
base.draw.box(1, 51, 19, 1, " ", "grey", "grey")
base.draw.textr("Exit ", 19, false, "red", "grey")
local messages = {};
local function render()
end
local function update()
end
while true do
local args = { os.pullEvent() }
if args[1] == "timer" then
program.draw.menubar("Chat: Global")
elseif args[1] == "mouse_click" then
if args[4] >= 1 and args[4] <= 2 then
program.draw.menu.handler("Chat: Global", args[3], args[4])
elseif (args[3] >= 47 and args[3] <= 50) and args[4] == 19 then
base.thread.remove("Profile")
base.thread.switch("Home")
end
end
end
end
\ No newline at end of file
--[[
Name: chat.group
Desc: Main chat group viewer
--]]
function program.chat.group(screen)
if screen == "list" then
base.screen.colour("white")
program.draw.menubar("Chat: Group")
base.draw.box(1, 51, 19, 1, " ", "grey", "grey")
base.draw.textr("Exit ", 19, false, "red", "grey")
while true do
local args = { os.pullEvent() }
if args[1] == "timer" then
program.draw.menubar("Chat: Group")
elseif args[1] == "mouse_click" then
if args[4] >= 1 and args[4] <= 2 then
program.draw.menu.handler("Chat: Group", args[3], args[4])
elseif (args[3] >= 47 and args[3] <= 50) and args[4] == 19 then
base.thread.remove("Profile")
base.thread.switch("Home")
end
end
end
elseif screen == "view" then
base.screen.colour("white")
program.draw.menubar("Chat: Group::View")
base.draw.box(1, 51, 19, 1, " ", "grey", "grey")
base.draw.textr("Exit ", 19, false, "red", "grey")
while true do
local args = { os.pullEvent() }
if args[1] == "timer" then
program.draw.menubar("Chat: Group::View")
elseif args[1] == "mouse_click" then
if args[4] >= 1 and args[4] <= 2 then
program.draw.menu.handler("Chat: Group::View", args[3], args[4])
elseif (args[3] >= 47 and args[3] <= 50) and args[4] == 19 then
base.thread.remove("Profile")
base.thread.switch("Home")
end
end
end
end
end
\ No newline at end of file
--[[
Name: chat.info
Desc: Main chat information menu
--]]
function program.chat.info()
base.screen.colour("white")
program.draw.menubar("Chat: Info")
base.draw.box(1, 51, 19, 1, " ", "grey", "grey")
base.draw.textr("Back ", 19, false, "red", "grey")
local text = "The chat rooms are a beta feature to the DiscoverApp, that in essence will allow you to live chat to other users. You can participate in the global chat, a group chat that you can make or join, and public user to user messages. Please note that group chat is a public feature, which means groups will be listed when wanting to join one, this is only for while it is in beta, then private chats will be enabled. The chat is for users wishing to send messages to other members as well as join in with live chat! The chat supports timestamps also, to show when a message was sent, please understand that this is based of the server location which is GMT+1. Any ideas you wish to see, just send me a message on the CCForums, I am \'DannySMc\' or send me a ticket on the DiscoverApp. If you wish to work on the development of the Discover App, just send me a message also and I can look at adding you onto the git repository.";
local scroll = 0; local content = base.data.wordwrap(text, 49)
local function render()
for i=1, 14 do
if scroll+i <= #content then
base.draw.box(1, 51, i+3, 1, " ", "white", "white")
base.draw.textl(" " .. tostring(content[i+scroll]), i+3, false, "cyan", "white")
end
end
end
render();
while true do
local args = { os.pullEvent() }
if args[1] == "timer" then
program.draw.menubar("Chat: Info")
elseif args[1] == "mouse_click" then
if args[4] >= 1 and args[4] <= 2 then
program.draw.menu.handler("Chat: Info", args[3], args[4])
elseif (args[3] >= 47 and args[3] <= 50) and args[4] == 19 then
program.chat.main()
end
elseif args[1] == "mouse_scroll" then
if args[2] == -1 then
if scroll > 0 then
scroll = scroll - 1
render();
end
elseif args[2] == 1 then
if #content > 14+scroll then
scroll = scroll + 1
render();
end
end
end
end
end
\ No newline at end of file
--[[
Name: chat.main
Desc: Main chat menu
--]]
function program.chat.main()
base.screen.colour("white")
program.draw.menubar("Chat: Main")
base.draw.box(1, 51, 19, 1, " ", "grey", "grey")
base.draw.textr("Exit ", 19, false, "red", "grey")
base.draw.textl(" About", 19, false, "orange", "grey")
local count = 0;
local options = {"Global Chat", "Group Chat", "Personal Message"};
for i=1, 22 do base.draw.box(i, 1, 3, 16, false, "lightGrey", "lightGrey"); end
for i=1, (#options*2), 2 do
count = count + 1;
base.draw.box(2, 20, i+3, 1, " ", "orange", "orange");
base.draw.texta(options[count], 3, i+3, false, "white", "orange");
end
while true do
local args = { os.pullEvent() }
if args[1] == "timer" then
program.draw.menubar("Chat: Main")
elseif args[1] == "mouse_click" then
if args[4] >= 1 and args[4] <= 2 then
program.draw.menu.handler("Chat: Main", args[3], args[4])
elseif (args[3] >= 47 and args[3] <= 50) and args[4] == 19 then
base.thread.remove("Profile")
base.thread.switch("Home")
elseif (args[3] >= 2 and args[3] <= 6) and args[4] == 19 then
program.chat.info()
elseif (args[3] >= 2 and args[3] <= 21) and args[4] == 4 then
program.chat.global()
elseif (args[3] >= 2 and args[3] <= 21) and args[4] == 6 then
program.chat.group("list")
elseif (args[3] >= 2 and args[3] <= 21) and args[4] == 8 then
program.chat.personal("list")
end
end
end
end
\ No newline at end of file
--[[
Name: chat.personal
Desc: Main chat personal viewer
--]]
function program.chat.personal()
if screen == "list" then
base.screen.colour("white")
program.draw.menubar("Chat: Personal")
base.draw.box(1, 51, 19, 1, " ", "grey", "grey")
base.draw.textr("Exit ", 19, false, "red", "grey")
while true do
local args = { os.pullEvent() }
if args[1] == "timer" then
program.draw.menubar("Chat: Personal")
elseif args[1] == "mouse_click" then
if args[4] >= 1 and args[4] <= 2 then
program.draw.menu.handler("Chat: Personal", args[3], args[4])
elseif (args[3] >= 47 and args[3] <= 50) and args[4] == 19 then
base.thread.remove("Profile")
base.thread.switch("Home")
end
end
end
elseif screen == "view" then
base.screen.colour("white")
program.draw.menubar("Chat: Personal::View")
base.draw.box(1, 51, 19, 1, " ", "grey", "grey")
base.draw.textr("Exit ", 19, false, "red", "grey")
while true do
local args = { os.pullEvent() }
if args[1] == "timer" then
program.draw.menubar("Chat: Personal::View")
elseif args[1] == "mouse_click" then
if args[4] >= 1 and args[4] <= 2 then
program.draw.menu.handler("Chat: Personal::View", args[3], args[4])
elseif (args[3] >= 47 and args[3] <= 50) and args[4] == 19 then
base.thread.remove("Profile")
base.thread.switch("Home")
end
end
end
end
end
\ No newline at end of file
......@@ -27,7 +27,7 @@ function program.cloud.main()
base.draw.box(1, 51, 19, 1, " ", "grey", "grey")
base.draw.texta("- Local Files -", 5, 3, false, "lightGrey", "white")
base.draw.texta("- Remote Files -", 32, 3, false, "lightGrey", "white")
base.draw.textr("Scroll Enabled ", 19, false, "orange", "grey")
base.draw.textr("Exit ", 19, false, "orange", "grey")
local function runr(rscroll)
if #filelist > 0 then
......@@ -70,6 +70,12 @@ function program.cloud.main()
elseif args[1] == "mouse_click" then
if args[4] >= 1 and args[4] <= 2 then
program.draw.menu.handler("Cloud", args[3], args[4])
elseif (args[3] >= 47 and args[3] <= 50) and args[4] == 19 then
base.thread.remove("Cloud")
if not base.thread.find("Home") then
base.thread.create("Home", program.main.home)
end
base.thread.switch("Home")
elseif (args[3] == 22) and (args[4] >= 4 and args[4] <= 17) then
-- Push local file
local curid = args[4] - 4 + lscroll
......
......@@ -5,7 +5,7 @@
tArgs = { ... }
program = {}; program.core = {}; program.apps = {}; program.snippets = {}; program.cloud = {}; program.mail = {}; program.feed = {}; program.draw = {}; program.main = {}; program.draw.menu = {}; program.chat = {}; program.account = {}; program.profile = {};
program = {}; program.core = {}; program.apps = {}; program.snippets = {}; program.cloud = {}; program.mail = {}; program.feed = {}; program.draw = {}; program.main = {}; program.draw.menu = {}; program.chat = {}; program.account = {}; program.profile = {}; program.tickets = {};
Plugin = {};
Internal = {
......@@ -21,6 +21,7 @@ Internal = {
};
Config = {
Path = ".DiscoverConfig";
Block = false;
};
Plugins = {
Enabled = true;
......
......@@ -3,6 +3,82 @@
Desc: Used for general functions / setup for the core application
--]]
-- Run Shutdown Phase
function program.core.shutdown()
print("Program closed")
-- Draw screen
base.screen.colour("white")
base.draw.textc("DiscoverApp::Shutdown", 2, false, "grey", "white")
local text = "Thank you for using the DiscoverApp!! Created by FluxDev / DannySMc";
for k,v in ipairs(base.data.wordwrap(text, 47)) do
base.draw.textc(v, k+7, false, "cyan", "white")
end
local function log(text)
base.draw.box(1, 51, 16, 1, " ", "white", "white")
base.draw.textc(text .. "...", 16, false, "lightGrey", "white")
sleep(0.5)
end
log("Closing program")
-- Remove all threads
log("Stopping processes")
threads = {};
base.thread.exit();
-- Log out DiscoverAPI
log("Logging out of Discover Network")
if Discover.User:LoggedIn() then
Discover.User:Logout();
end
-- Unlock os.pullEvent
log("Unlock termination block")
if Internal.Config.Block then
os.pullEvent = os.oldPullEvent
end
log("Clearing screen, returning")
term.clear();
term.setCursorPos(1,1)
end
-- Run Reboot Phase
function program.core.reboot()
-- Draw screen
base.screen.colour("white")
base.draw.textc("DiscoverApp::Shutdown", 2, false, "grey", "white")
local text = "Thank you for using the DiscoverApp!! Created by FluxDev / DannySMc";
for k,v in ipairs(base.data.wordwrap(text, 47)) do
base.draw.textc(v, k+7, false, "cyan", "white")
end
local function log(text)
base.draw.box(1, 51, 16, 1, " ", "white", "white")
base.draw.textc(text .. "...", 16, false, "lightGrey", "white")
sleep(0.5)
end
log("Restarting")
-- Remove all threads
log("Stopping processes")
threads = {};
base.thread.exit();
-- Log out DiscoverAPI
log("Logging out of Discover Network")
if Discover.User:LoggedIn() then
Discover.User:Logout();
end
-- Unlock os.pullEvent
log("Unlock termination block")
if Internal.Config.Block then
os.pullEvent = os.oldPullEvent
end
log("Clearing screen, restarting")
term.clear();
term.setCursorPos(1,1)
program.core.init();
end
\ No newline at end of file
......@@ -60,6 +60,12 @@ Internal.Icons = {
{"2:2: ","2:2: ","2:2: ","2:2: ","2:2: ","2:2: ","2:2: ","2:2: ","2:2: ","2:e: ","2:e: ","2:0: ","2:0: ","2:2: "};
{"2:2: ","2:2: ","2:2: ","2:2: ","2:2: ","2:2: ","2:2: ","2:2: ","2:2: ","2:2: ","2:2: ","2:c: ","2:2: ","2:2: "};
};
["tickets"] = {
{"2:2: ","2:2: ","2:2: ","2:2: ","2:2: ","2:2: ","2:2: ","2:2: ","2:2: ","2:2: ","2:2: ","2:2: ","2:2: ","2:2: "};
{"2:2: ","f:2:T","f:2:i","f:2:c","f:2:k","f:2:e","f:2:t","f:2:s","2:2: ","f:0:B","f:0:u","f:0:g","f:0:1","2:2: "};
{"2:2: ","2:2: ","2:2: ","2:2: ","2:2: ","2:2: ","2:2: ","2:2: ","2:2: ","f:0:e","f:0:t","f:0:c","2:0: ","2:2: "};
{"2:2: ","2:2: ","2:2: ","2:2: ","2:2: ","2:2: ","2:2: ","2:2: ","2:2: ","2:2: ","2:2: ","2:2: ","2:2: ","2:2: "};
};
["newsFeed"] = {
{"e:e: ","e:e: ","e:e: ","e:e: ","e:e: ","e:e: ","e:e: ","e:e: ","e:e: ","e:e: ","e:8: ","e:8: ","e:8: ","e:e: "};
{"e:e: ","f:e:N","f:e:e","f:e:w","f:e:s","e:e: ","e:e: ","e:e: ","e:e: ","e:e: ","e:7: ","e:7: ","e:8: ","e:e: "};
......
......@@ -243,6 +243,28 @@ Discover = {
end
end;
};
Tickets = {
Create = function( self, title, message )
local query = "cmd=ticket-create&key=" .. textutils.urlEncode(tostring(Discover.User.Data.AuthKey)) .. "&title=" .. textutils.urlEncode(tostring(title)) .. "&message=" .. textutils.urlEncode(tostring(message));
local req = http.post(Discover.Data.Urls.Store, query, Discover.Data.Headers)
local req = textutils.unserialize(req.readAll())
if req.status then
return unpack({true, req.message})
else
return unpack({false, req.error})
end
end;
List = function( self )
local query = "cmd=ticket-list";
local req = http.post(Discover.Data.Urls.Store, query, Discover.Data.Headers)
local req = textutils.unserialize(req.readAll())
if req.status then
return unpack({true, req.data})
else
return unpack({false, "Could not list tickets"})
end
end;
};
Chat = {
Send = function( self, ctype, cid, message )
-- ChatID can be username, group or 'global'
......
This diff is collapsed.
......@@ -14,7 +14,8 @@ function program.feed.view(page)
base.draw.box(1, 51, 10, 1, " ", "white", "white")
base.draw.box(1, 51, 19, 1, " ", "grey", "grey")
base.draw.textl(" Create Post", 19, false, "lightBlue", "grey")
base.draw.textr("Refresh ", 19, false, "lightBlue", "grey")
base.draw.textc("Refresh", 19, false, "orange", "grey")
base.draw.textr("Exit ", 19, false, "red", "grey")
local function parse()
feed = {}; table.insert(feed, ":B:")
......@@ -66,7 +67,7 @@ function program.feed.view(page)
if not status then
base.gui.alert("Could not create new post")
sleep(1)
store.social.feed()
program.feed.view()
end
base.gui.alert("Submitted!"); sleep(0.5);
base.gui.alert("Updating feed..."); sleep(0.5)
......@@ -78,7 +79,7 @@ function program.feed.view(page)
base.thread.switch("Home")
end
parse(); render();
elseif (args[3] >= 44 and args[3] <= 50) and args[4] == 19 then
elseif (args[3] >= 20 and args[3] <= 30) and args[4] == 19 then
base.gui.alert("Downloading feed, please wait..."); sleep(0.5)
status, feeddata = Discover.Feed:List()
if not status then
......@@ -88,6 +89,12 @@ function program.feed.view(page)
base.thread.switch("Home")
end
parse(); render();
elseif (args[3] >= 47 and args[3] <= 50) and args[4] == 19 then
base.thread.remove("Feed")
if not base.thread.find("Home") then
base.thread.create("Home", program.main.home)
end
base.thread.switch("Home")
end
elseif args[1] == "mouse_scroll" then
if args[2] == -1 then
......
function program.mail.main(page, arg)
function program.mail.main(page, arg, arg2)
if (page == "create") then
base.screen.colour("white")
program.draw.menubar("Mail: Create")
......@@ -22,6 +22,12 @@ function program.mail.main(page, arg)
base.draw.texta("> " .. arg, 8, 5, false, "red", "white")
recipient = arg;
end
-- Add subject
if arg2 then
base.draw.box(8, 36, 8, 1, " ", "white", "white")
base.draw.texta("> " .. arg2, 8, 8, false, "red", "white")
subject = tostring(arg2)
end
while true do
local args = { os.pullEvent() }
......@@ -197,7 +203,6 @@ function program.mail.main(page, arg)
tMessage = base.data.wordwrap(mail_data['message'], 47);
end
local f = fs.open("out.lua", "w"); f.write(textutils.serialize(mail_data)); f.close()
if mail_data['attachments']:len() > 5 then
base.draw.textc("Download attachment", 18, false, "lightGrey", "white")
end
......@@ -223,7 +228,7 @@ function program.mail.main(page, arg)
elseif (args[3] >= 2 and args[3] <= 5) and args[4] == 19 then
program.mail.main()
elseif (args[3] >= 46 and args[3] <= 50) and args[4] == 19 then
program.mail.main("create", mail_data['sender'])
program.mail.main("create", mail_data['sender'], mail_data['subject'])
elseif (args[3] >= 22 and args[3] <= 28) and (args[4] == 19) then
base.gui.alert("Deleting...")
local status = Discover.Mail:Delete(mail_data['id'])
......
......@@ -8,6 +8,7 @@ function program.main.alerts()
program.draw.menubar("Alerts")
base.draw.box(1, 51, 19, 1, " ", "grey", "grey")
base.draw.textl(" " .. #Internal.Alerts .. " alert(s)", 19, false, "lightBlue", "grey")
base.draw.textr("Exit ", 19, false, "red", "grey")
local scroll = 0
local function run(scroll)
......@@ -35,6 +36,12 @@ function program.main.alerts()
elseif args[1] == "mouse_click" then
if args[4] >= 1 and args[4] <= 2 then
program.draw.menu.handler("Alerts", args[3], args[4])
elseif (args[3] >= 47 and args[3] <= 50) and args[4] == 19 then
base.thread.remove("Alerts")
if not base.thread.find("Home") then
base.thread.create("Home", program.main.home)
end
base.thread.switch("Home")
elseif (args[3] >= 1 and args[3] <= 48) and (args[4] >= 4 and args[4] <= 17) then
local y = args[4]-3+scroll
if #Internal.Alerts >= y then
......
......@@ -9,6 +9,7 @@ function program.main.finder()
local functions = {}; local scroll = 0;
base.draw.box(1, 51, 19, 1, " ", "grey", "grey")
base.draw.textr("Exit ", 19, false, "orange", "grey")
local function export(data, id)
for k,v in pairs(data) do
......@@ -61,6 +62,12 @@ function program.main.finder()
elseif args[1] == "mouse_click" then
if args[4] >= 1 and args[4] <= 2 then
program.draw.menu.handler("Finder", args[3], args[4])
elseif (args[3] >= 47 and args[3] <= 50) and args[4] == 19 then
base.thread.remove("Finder")
if not base.thread.find("Home") then
base.thread.create("Home", program.main.home)
end
base.thread.switch("Home")
end
elseif args[1] == "mouse_scroll" then
if args[2] == -1 then
......
......@@ -89,6 +89,13 @@ function program.main.home()
["thrd_name"] = "Account";
["req_login"] = true;
};
{
["icon_name"] = "tickets";
["base_func"] = "tickets";
["func_name"] = "main";
["thrd_name"] = "Tickets";
["req_login"] = true;
};
{
["icon_name"] = "settings";
["base_func"] = "main";
......@@ -149,6 +156,7 @@ function program.main.home()
end
base.draw.textl(" Page: " .. tostring(page) .. " / " .. tostring(pages), screeny, false, "cyan", "grey")
base.draw.textr("Finder ", screeny, false, "orange", "grey")
base.draw.textc("Quit", screeny, false, "red", "grey")
end
render();
......@@ -168,6 +176,9 @@ function program.main.home()
base.thread.create("Finder", program.main.finder)
end
base.thread.switch("Finder")
elseif (args[3] >= 22 and args[3] <= 28) and args[4] == 19 then
base.thread.create("Shutdown", program.core.shutdown)
base.thread.switch("Shutdown")
elseif (args[3] >= 1 and args[3] <= screenx) and (args[4] >= 3 and args[4] <= screeny-1) then
local cpage = page * 9 - 9
if (args[3] >= 3 and args[3] <= 16) and (args[4] >= 4 and args[4] <= 7) then
......
--[[
Name: main.settings
Desc: System settings function
--]]
function program.main.settings()
base.screen.colour("white")
program.draw.menubar("Settings: Menu")
while true do
local args = { os.pullEvent() }
if args[1] == "timer" then
program.draw.menubar("Settings: Menu")
elseif args[1] == "mouse_click" then
if args[4] >= 1 and args[4] <= 2 then
program.draw.menu.handler("Settings: Menu", args[3], args[4])
end
end
end
end
\ No newline at end of file
......@@ -23,6 +23,7 @@
$mail = "cc__store_mail";
$feed = "cc__store_feed";
$profile = "cc__store_profiles";
$tickets = "cc__store_tickets";
// Get command
$cmd = checkString($_POST['cmd']);
......@@ -948,6 +949,11 @@
/* Get and escape / check data */
$message = luaescape(checkString($_POST['message']));
if (empty($message)) {
echo '{["status"]=false;["error"]="Post was empty!";}';
die();
}
/* Get Username */
$user = getfield($key, "username");
$sentdate = date("H:i d-m-Y");
......@@ -1080,6 +1086,47 @@
break;
case 'ticket-list';
/* Select all apps with the correct receiver*/
$sql = "SELECT * FROM `$tickets` ORDER BY `id` DESC";
$result = $conn->query($sql);
$data = $result->fetch_all(MYSQLI_ASSOC);
echo '{["status"]=true;["data"]={';
foreach ($data as $key) {
echo "{['id']='" . $key['id'] . "';";
echo "['author']='" . $key['author'] . "';";
echo "['title']='" . $key['title'] . "';";
echo "['status']='" . $key['status'] . "';";
echo "['ntime']='" . $key['ntime'] . "';";
echo "['message']='" . base64_decode($key['message']) . "';};";
}
echo "};}";
break;
case 'ticket-create';
$key = checkString($_POST['key']);
$title = luaescape(checkString($_POST['title']));
$message = base64_encode(luaescape(checkString($_POST['message'])));
$stamp = date('H:i Y/m/d');
if (validatekey($key)) {
$user = getfield($key, "username");
/* Select all apps with the correct receiver*/
$sql = "INSERT INTO `$tickets` (title, message, ntime, status, author) VALUES ('$title','$message','$stamp','false','$user')";
if ($conn->query($sql) === true) {
echo '{["status"]=true;["message"]="New ticket was created";}';
} else {
echo '{["status"]=false;["error"]="Could not create new ticket";}';
}
}
break;
default:
echo '{["status"]=false;["error"]="No command supplied";}';
break;
......
--[[
Name: tickets.create
Desc: Tickets create screen
--]]
function program.tickets.create()
base.screen.colour("white")
program.draw.menubar("Tickets: Create")
base.draw.box(1, 51, 19, 1, " ", "grey", "grey")
base.draw.textr("Back ", 19, false, "red", "grey")
base.draw.textl(" List Tickets", 19, false, "lightBlue", "grey")
base.draw.textc("Reset Form", 19, false, "orange", "grey")
local text = "When creating a ticket, make sure to explain yourself clearly, any bugs, please tell me the steps you took so I can reproduce the error. Also include any error messages given."
for k,v in ipairs(base.data.wordwrap(text, 49)) do
base.draw.textc(v, k+3, false, "cyan", "white")
end
base.draw.texta("Title:", 8, 9, false, "lightGrey", "white")
base.draw.box(8, 36, 10, 1, " ", "cyan", "cyan")
base.draw.texta("Message:", 8, 12, false, "lightGrey", "white")
base.draw.box(8, 36, 13, 1, " ", "cyan", "cyan")
base.draw.textc(" Create Ticket ", 16, false, "white", "cyan")
while true do
local args = { os.pullEvent() }
if args[1] == "timer" then
program.draw.menubar("Tickets: Create")