From f175ef642ae4a194d5c1a672397b78ccb371bf68 Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Sun, 29 Sep 2019 22:38:10 -0600 Subject: [PATCH] Add some basic core features --- .gitignore | 4 +- README.md | 75 ++-------- action.php | 76 ++++++++++ composer.json | 3 +- composer.lock | 39 +++++- database.mwb | Bin 0 -> 15184 bytes langs/en/actions.json | 8 ++ langs/en/cards.json | 4 + langs/en/machines.json | 17 +++ langs/en/messages.json | 5 + langs/en/titles.json | 4 +- langs/messages.php | 16 +++ lib/Client.lib.php | 28 ++++ lib/Clients.lib.php | 69 +++++++++ lib/Component.lib.php | 183 ++++++++++++++++++++++++ lib/Machine.lib.php | 206 +++++++++++++++++++++++++++ lib/required_public.php | 104 ++++++++++++++ nbproject/mpllicense.txt | 10 ++ nbproject/project.properties | 6 +- nbproject/project.xml | 2 +- pages.php | 32 ++++- pages/addevent.php | 45 ++++++ pages/editcomponent.php | 84 +++++++++++ pages/editmachine.php | 61 ++++++++ pages/form.php | 26 ---- pages/home.php | 37 ++++- pages/machines.php | 84 +++++++++++ pages/viewmachine.php | 189 +++++++++++++++++++++++++ public/index.php | 239 +++++++++++++++++++++++++++++++ settings.template.php | 14 +- static/css/datatables.min.css | 21 +++ static/css/tables.css | 120 ++++++++++++++++ static/js/datatables.min.js | 257 ++++++++++++++++++++++++++++++++++ static/js/machines.js | 34 +++++ 34 files changed, 1993 insertions(+), 109 deletions(-) create mode 100644 database.mwb create mode 100644 langs/en/actions.json create mode 100644 langs/en/cards.json create mode 100644 langs/en/machines.json create mode 100644 langs/en/messages.json create mode 100644 lib/Client.lib.php create mode 100644 lib/Clients.lib.php create mode 100644 lib/Component.lib.php create mode 100644 lib/Machine.lib.php create mode 100644 lib/required_public.php create mode 100644 nbproject/mpllicense.txt create mode 100644 pages/addevent.php create mode 100644 pages/editcomponent.php create mode 100644 pages/editmachine.php delete mode 100644 pages/form.php create mode 100644 pages/machines.php create mode 100644 pages/viewmachine.php create mode 100644 public/index.php create mode 100644 static/css/datatables.min.css create mode 100644 static/css/tables.css create mode 100644 static/js/datatables.min.js create mode 100644 static/js/machines.js diff --git a/.gitignore b/.gitignore index 07fe371..2a3479b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ vendor settings.php nbproject/private -*.sync-conflict* \ No newline at end of file +*.sync-conflict* +.directory +*.bak \ No newline at end of file diff --git a/README.md b/README.md index 07c89a7..39d0d02 100644 --- a/README.md +++ b/README.md @@ -1,71 +1,16 @@ -Business App Template -===================== +MachineManager +============== -This is an empty (but fully functional) PHP application. It is designed to -integrate with AccountHub, an account management web interface. AccountHub manages -user credentials and account data, and is accessed by this app via [a simple API](http://docs.netsyms.com/docs/AccountHub/API%20Documentation/). +A simple tool for repair shops and IT service providers to manage client devices, +including scheduled services (such as updates) and repair status +(with client-viewable tracking, similar to package tracking). -[Codacy badge](https://www.codacy.com/app/Netsyms/BusinessAppTemplate?utm_source=github.com&utm_medium=referral&utm_content=Netsyms/BusinessAppTemplate&utm_campaign=Badge_Grade) +Features +-------- -Program Structure ------------------ - -### Folders -* api - An API framework. See api/apisettings.php below. -* api/actions - A place to put your API actions. -* langs - Translations and alert messages. - The language files that are loaded depends on the value of `LANGUAGE` in `settings.php`. - All .json files in a language folder are parsed and loaded into the dictionary (use via `$Strings->get('some key')`). -* lib - A good place to put helper functions that you don't want "in the way". All files that end with `.lib.php` are automatically loaded. -* pages - What it looks like. If you go into `pages.php` and define a page with the name `foo`, there should be a `foo.php` in here. - The app checks before loading, so it will give a friendly 404 error if it doesn't find your page. - Woe to you if you delete `home.php` or `404.php`, as those are assumed to exist for fallback behavior. -* static - CSS, JavaScript, fonts, images... -* vendor - If you don't know what this is about, or you don't have it, you need to read up on Composer. Right now. - -### Files -* settings.template.php - App configuration. Copy to `settings.php` and customize. Documented with inline comments. -* app.php - Handles the web part of the app. If you have problems with too many items on the navbar, change `$navbar_breakpoint`. - To change the navbar colors, find and edit `