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_invoice_overdue_reminders` varchar(200) DEFAULT NULL,
|
||||||
`config_quote_next_number` int(11) DEFAULT NULL,
|
`config_quote_next_number` int(11) DEFAULT NULL,
|
||||||
`config_quote_prefix` varchar(200) DEFAULT NULL,
|
`config_quote_prefix` varchar(200) DEFAULT NULL,
|
||||||
|
`config_enable_cron` int(1) NOT NULL,
|
||||||
PRIMARY KEY (`company_id`)
|
PRIMARY KEY (`company_id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
@ -804,4 +805,4 @@ CREATE TABLE `vendors` (
|
||||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
/*!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);
|
$lines = file($filename);
|
||||||
// Loop through each line
|
// Loop through each line
|
||||||
foreach ($lines as $line){
|
foreach ($lines as $line){
|
||||||
// Skip it if it's a comment
|
// Skip it if it's a comment
|
||||||
if(substr($line, 0, 2) == '--' || $line == '')
|
if(substr($line, 0, 2) == '--' || $line == '')
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Add this line to the current segment
|
// Add this line to the current segment
|
||||||
$templine .= $line;
|
$templine .= $line;
|
||||||
// If it has a semicolon at the end, it's the end of the query
|
// If it has a semicolon at the end, it's the end of the query
|
||||||
if(substr(trim($line), -1, 1) == ';'){
|
if(substr(trim($line), -1, 1) == ';'){
|
||||||
// Perform the query
|
// Perform the query
|
||||||
mysqli_query($mysqli,$templine);
|
mysqli_query($mysqli,$templine);
|
||||||
// Reset temp variable to empty
|
// Reset temp variable to empty
|
||||||
$templine = '';
|
$templine = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$_SESSION['alert_message'] = "Database successfully added";
|
$_SESSION['alert_message'] = "Database successfully added";
|
||||||
|
|
@ -68,23 +68,24 @@ if(isset($_POST['add_user'])){
|
||||||
|
|
||||||
include("config.php");
|
include("config.php");
|
||||||
|
|
||||||
$name = strip_tags(mysqli_real_escape_string($mysqli,$_POST['name']));
|
$name = strip_tags(mysqli_real_escape_string($mysqli,$_POST['name']));
|
||||||
$email = strip_tags(mysqli_real_escape_string($mysqli,$_POST['email']));
|
$email = strip_tags(mysqli_real_escape_string($mysqli,$_POST['email']));
|
||||||
$password = md5(mysqli_real_escape_string($mysqli,$_POST['password']));
|
$password = md5(mysqli_real_escape_string($mysqli,$_POST['password']));
|
||||||
|
|
||||||
if($_FILES['file']['tmp_name']!='') {
|
if($_FILES['file']['tmp_name']!='') {
|
||||||
$path = "uploads/users/";
|
$path = "uploads/users/";
|
||||||
$path = $path . time() . basename( $_FILES['file']['name']);
|
$path = $path . time() . basename( $_FILES['file']['name']);
|
||||||
$file_name = basename($path);
|
$file_name = basename($path);
|
||||||
move_uploaded_file($_FILES['file']['tmp_name'], $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()");
|
mysqli_query($mysqli,"INSERT INTO users SET name = '$name', email = '$email', password = '$password', avatar = '$path', created_at = NOW()");
|
||||||
$user_id = mysqli_insert_id($mysqli);
|
|
||||||
|
$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