mirror of https://github.com/itflow-org/itflow
MySQL DB dump for addition of enable_cron
This commit is contained in:
parent
e114e61261
commit
acb6c19c70
3
db.sql
3
db.sql
|
|
@ -621,6 +621,7 @@ CREATE TABLE `settings` (
|
|||
`config_invoice_overdue_reminders` varchar(200) DEFAULT NULL,
|
||||
`config_quote_next_number` int(11) DEFAULT NULL,
|
||||
`config_quote_prefix` varchar(200) DEFAULT NULL,
|
||||
`config_enable_cron` int(1) NOT NULL,
|
||||
PRIMARY KEY (`company_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
|
@ -804,4 +805,4 @@ CREATE TABLE `vendors` (
|
|||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2019-08-14 11:11:26
|
||||
-- Dump completed on 2019-08-15 22:34:10
|
||||
|
|
|
|||
51
setup.php
51
setup.php
|
|
@ -43,19 +43,19 @@ if(isset($_POST['add_database'])){
|
|||
$lines = file($filename);
|
||||
// Loop through each line
|
||||
foreach ($lines as $line){
|
||||
// Skip it if it's a comment
|
||||
if(substr($line, 0, 2) == '--' || $line == '')
|
||||
continue;
|
||||
// Skip it if it's a comment
|
||||
if(substr($line, 0, 2) == '--' || $line == '')
|
||||
continue;
|
||||
|
||||
// Add this line to the current segment
|
||||
$templine .= $line;
|
||||
// If it has a semicolon at the end, it's the end of the query
|
||||
if(substr(trim($line), -1, 1) == ';'){
|
||||
// Perform the query
|
||||
mysqli_query($mysqli,$templine);
|
||||
// Reset temp variable to empty
|
||||
$templine = '';
|
||||
}
|
||||
// Add this line to the current segment
|
||||
$templine .= $line;
|
||||
// If it has a semicolon at the end, it's the end of the query
|
||||
if(substr(trim($line), -1, 1) == ';'){
|
||||
// Perform the query
|
||||
mysqli_query($mysqli,$templine);
|
||||
// Reset temp variable to empty
|
||||
$templine = '';
|
||||
}
|
||||
}
|
||||
|
||||
$_SESSION['alert_message'] = "Database successfully added";
|
||||
|
|
@ -68,23 +68,24 @@ if(isset($_POST['add_user'])){
|
|||
|
||||
include("config.php");
|
||||
|
||||
$name = strip_tags(mysqli_real_escape_string($mysqli,$_POST['name']));
|
||||
$email = strip_tags(mysqli_real_escape_string($mysqli,$_POST['email']));
|
||||
$password = md5(mysqli_real_escape_string($mysqli,$_POST['password']));
|
||||
$name = strip_tags(mysqli_real_escape_string($mysqli,$_POST['name']));
|
||||
$email = strip_tags(mysqli_real_escape_string($mysqli,$_POST['email']));
|
||||
$password = md5(mysqli_real_escape_string($mysqli,$_POST['password']));
|
||||
|
||||
if($_FILES['file']['tmp_name']!='') {
|
||||
$path = "uploads/users/";
|
||||
$path = $path . time() . basename( $_FILES['file']['name']);
|
||||
$file_name = basename($path);
|
||||
move_uploaded_file($_FILES['file']['tmp_name'], $path);
|
||||
}
|
||||
if($_FILES['file']['tmp_name']!='') {
|
||||
$path = "uploads/users/";
|
||||
$path = $path . time() . basename( $_FILES['file']['name']);
|
||||
$file_name = basename($path);
|
||||
move_uploaded_file($_FILES['file']['tmp_name'], $path);
|
||||
}
|
||||
|
||||
mysqli_query($mysqli,"INSERT INTO users SET name = '$name', email = '$email', password = '$password', avatar = '$path', created_at = NOW()");
|
||||
$user_id = mysqli_insert_id($mysqli);
|
||||
mysqli_query($mysqli,"INSERT INTO users SET name = '$name', email = '$email', password = '$password', avatar = '$path', created_at = NOW()");
|
||||
|
||||
$user_id = mysqli_insert_id($mysqli);
|
||||
|
||||
$_SESSION['alert_message'] = "User added";
|
||||
$_SESSION['alert_message'] = "User added";
|
||||
|
||||
header("Location: setup.php?company");
|
||||
header("Location: setup.php?company");
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue