forked from ZugBahnHof/MPOS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replaced latin1_german_ci to latin1_general_ci in table collations Added a commented out statement for default Admin user in inc/database.sql ZugBahnHof#3
- Loading branch information
Showing
8 changed files
with
112 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
Dies wird ein Kassensystem, basierend auf *Material Design* mit dem Framework *Materialize*. | ||
This will be a POS system based on *[Material Design](https://material.io/)* with the *[Materialize](https://materializecss.com/)* framework. | ||
|
||
## Vorraussetzungen: | ||
* Einen Webserver mit **MySQL** und **PHP5+** | ||
* A Webserver with **MySQL** and **PHP5+** | ||
|
||
## Setup: | ||
* In MySQL den SQL-Code aus der Datei `database.sql` ausführen, ggf. eigenen Nutzer erstellen. | ||
* Im Ordner `inc` die Datei `config.example.php` in `config.inc.php` umbenennen und mit der Verbindung zur Datenbank ausfüllen. | ||
* Execute the SQL code from the file `inc/database.sql` in MySQL; create your own DB *user* if necessary. | ||
* In the `inc` folder, copy the `config.example.php` file to `config.inc.php` and fill it in with the connection details of the desired MPOS database. | ||
* A default Admin user is available (commented out) in the `inc/database.sql` file with *user* as `[email protected]` and *password* as `password` | ||
* Register a new user at `register.php` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
$db_host = ""; | ||
$db_name = ""; | ||
$db_user = ""; | ||
$db_host = "localhost"; | ||
$db_name = "mpos"; | ||
$db_user = "root"; | ||
$db_pass = ""; | ||
$pdo = new PDO( "mysql:host=$db_host;dbname=$db_name", $db_user, $db_pass ); | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,28 @@ | ||
-- 1. Eine Datenbank anlegen, welche mit latin1_german1_ci kollatiert ist! | ||
-- 2. Folgende Codeblöcke nacheinander in dieser Datenbank ausführen | ||
-- 1. Create a latin1 database that is collated with latin1_general_ci for English or utf8 database with utf8_unicode_ci! | ||
-- 2. Execute the following SQL statements in succession in this database | ||
-- 3. Default Admin account is "[email protected]" with password as "password" - commented out | ||
-- 4. Register custom user at register.php | ||
|
||
CREATE TABLE IF NOT EXISTS `users` ( | ||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT, | ||
`email` varchar(255) COLLATE utf8_unicode_ci NOT NULL, | ||
`passwort` varchar(255) COLLATE utf8_unicode_ci NOT NULL, | ||
`vorname` varchar(255) COLLATE utf8_unicode_ci NOT NULL, | ||
`nachname` varchar(255) COLLATE utf8_unicode_ci NOT NULL, | ||
`email` varchar(255) NOT NULL, | ||
`passwort` varchar(255) NOT NULL, | ||
`vorname` varchar(255) NOT NULL, | ||
`nachname` varchar(255) NOT NULL, | ||
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
`updated_at` timestamp NULL DEFAULT NULL, | ||
`passwortcode` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, | ||
`passwortcode` varchar(255) DEFAULT NULL, | ||
`passwortcode_time` timestamp NULL DEFAULT NULL, | ||
PRIMARY KEY (`id`), UNIQUE (`email`) | ||
PRIMARY KEY (`id`), | ||
UNIQUE (`email`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; | ||
|
||
|
||
CREATE TABLE `securitytokens` ( | ||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY, | ||
`user_id` int(10) NOT NULL, | ||
`identifier` varchar(255) COLLATE utf8_unicode_ci NOT NULL, | ||
`securitytoken` varchar(255) COLLATE utf8_unicode_ci NOT NULL, | ||
`identifier` varchar(255) NOT NULL, | ||
`securitytoken` varchar(255) NOT NULL, | ||
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; | ||
|
||
|
@@ -30,32 +33,35 @@ CREATE TABLE `money` ( | |
`balance` double NOT NULL, | ||
`updated_by` int(10) unsigned NOT NULL, | ||
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_german1_ci; | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; | ||
|
||
|
||
CREATE TABLE IF NOT EXISTS `articles` ( | ||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT, | ||
`name` varchar(255) COLLATE latin1_german1_ci NOT NULL, | ||
`description` varchar(255) COLLATE latin1_german1_ci NOT NULL, | ||
`name` varchar(255) NOT NULL, | ||
`description` varchar(255) NOT NULL, | ||
`barcode` int(10) unsigned NOT NULL, | ||
`price` double NOT NULL, | ||
`quantity` int(10) unsigned DEFAULT NULL, | ||
`color` VARCHAR( 7 ) NOT NULL, | ||
PRIMARY KEY (`id`), UNIQUE (`barcode`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_german1_ci; | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; | ||
|
||
CREATE TABLE IF NOT EXISTS `company` ( | ||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT, | ||
`name` varchar(255) COLLATE latin1_german1_ci NOT NULL, | ||
`street` varchar(255) COLLATE latin1_german1_ci NOT NULL, | ||
`name` varchar(255) NOT NULL, | ||
`street` varchar(255) NOT NULL, | ||
`number` int(10) unsigned NOT NULL, | ||
`postcode` int(10) unsigned NOT NULL, | ||
`city` varchar(255) COLLATE latin1_german1_ci NOT NULL, | ||
`state` varchar(255) COLLATE latin1_german1_ci NOT NULL, | ||
`email` varchar(255) COLLATE latin1_german1_ci NOT NULL, | ||
`city` varchar(255) NOT NULL, | ||
`state` varchar(255) NOT NULL, | ||
`email` varchar(255) NOT NULL, | ||
`tel` int(10) unsigned NOT NULL, | ||
`logo` varchar(255) COLLATE latin1_german1_ci NOT NULL, | ||
`logo` varchar(255) NOT NULL, | ||
PRIMARY KEY (`id`), UNIQUE (`name`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_german1_ci; | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; | ||
|
||
INSERT INTO `MPOS`.`company` (`id`, `name`, `street`, `number`, `postcode`, `city`, `state`, `email`, `tel`, `logo`) VALUES (NULL, 'Name', 'Street', '0', '12345', 'City', 'Singapore', '[email protected]', '1234567890', 'logo/logo.svg'); | ||
|
||
-- INSERT INTO `users` (`id`, `email`, `passwort`, `vorname`, `nachname`, `created_at`, `updated_at`, `passwortcode`, `passwortcode_time`) VALUES (NULL,'[email protected]','$2y$10$Lao5kA4bLUeNZIOC0HSK2.z8v4lUL3tYQ0Uq6f0YUH1w2UF0JkNVm','System','Administrator','2020-06-26 22:06:59',NULL,NULL,NULL); | ||
|
||
INSERT INTO `MPOS`.`company` (`id`, `name`, `street`, `number`, `postcode`, `city`, `state`, `email`, `tel`, `logo`) VALUES (NULL, 'Name', 'Straße', '0', '12345', 'Stadt', 'Deutschland', '[email protected]', '1234567890', 'logo/logo.svg'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,9 @@ | ||
<?php | ||
$site_title = "Startseite"; | ||
$site_title = "Home"; | ||
include 'inc/header.inc.php'; | ||
?> | ||
<h1 class="<?= $site_color_accent_text ?>">Herzlich Willkommen bei MPOS!</h1> | ||
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna | ||
aliqua. | ||
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. | ||
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. | ||
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> | ||
<h1 class="<?= $site_color_accent_text ?>">Cordial Welcome to MPOS!</h1> | ||
<p>MPOS is a mobile centric Point of Sale application running on a PHP/MySQL enabled Web Server.</p> | ||
<?php | ||
include 'inc/footer.inc.php'; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.