mirror of
https://github.com/itflow-org/itflow
synced 2026-03-01 03:14:52 +00:00
Fixed adding new company
This commit is contained in:
@@ -11,6 +11,9 @@
|
|||||||
<!-- Page Content -->
|
<!-- Page Content -->
|
||||||
<h1>Blank Page</h1>
|
<h1>Blank Page</h1>
|
||||||
<hr>
|
<hr>
|
||||||
<p>This is a great starting point for new custom pages.</p>
|
<p>This is a great starting point for new custom pages.
|
||||||
|
|
||||||
|
<?php echo CURRENT_DATABASE_VERSION; ?>
|
||||||
|
</p>
|
||||||
|
|
||||||
<?php include("footer.php"); ?>
|
<?php include("footer.php"); ?>
|
||||||
4
post.php
4
post.php
@@ -465,7 +465,7 @@ if(isset($_POST['add_company'])){
|
|||||||
|
|
||||||
$company_id = mysqli_insert_id($mysqli);
|
$company_id = mysqli_insert_id($mysqli);
|
||||||
$config_base_url = mysqli_real_escape_string($mysqli,$_SERVER['HTTP_HOST'] . dirname($_SERVER['REQUEST_URI']));
|
$config_base_url = mysqli_real_escape_string($mysqli,$_SERVER['HTTP_HOST'] . dirname($_SERVER['REQUEST_URI']));
|
||||||
$config_api_key = keygen();
|
$current_database_version = CURRENT_DATABASE_VERSION;
|
||||||
|
|
||||||
mkdir("uploads/clients/$company_id");
|
mkdir("uploads/clients/$company_id");
|
||||||
mkdir("uploads/expenses/$company_id");
|
mkdir("uploads/expenses/$company_id");
|
||||||
@@ -517,7 +517,7 @@ if(isset($_POST['add_company'])){
|
|||||||
//Set User Company Permissions
|
//Set User Company Permissions
|
||||||
mysqli_query($mysqli,"INSERT INTO user_companies SET user_id = $session_user_id, company_id = $company_id");
|
mysqli_query($mysqli,"INSERT INTO user_companies SET user_id = $session_user_id, company_id = $company_id");
|
||||||
|
|
||||||
mysqli_query($mysqli,"INSERT INTO settings SET company_id = $company_id, config_invoice_prefix = 'INV-', config_invoice_next_number = 1, config_recurring_prefix = 'REC-', config_recurring_next_number = 1, config_invoice_overdue_reminders = '1,3,7', config_quote_prefix = 'QUO-', config_quote_next_number = 1, config_api_key = '$config_api_key', config_recurring_auto_send_invoice = 1, config_default_net_terms = 7, config_send_invoice_reminders = 1, config_enable_cron = 0, config_ticket_next_number = 1, config_base_url = '$config_base_url'");
|
mysqli_query($mysqli,"INSERT INTO settings SET company_id = $company_id, config_current_database_version = '$current_database_version', config_invoice_prefix = 'INV-', config_invoice_next_number = 1, config_recurring_prefix = 'REC-', config_recurring_next_number = 1, config_invoice_overdue_reminders = '1,3,7', config_quote_prefix = 'QUO-', config_quote_next_number = 1, config_recurring_auto_send_invoice = 1, config_default_net_terms = 7, config_send_invoice_reminders = 1, config_enable_cron = 0, config_ticket_next_number = 1, config_base_url = '$config_base_url'");
|
||||||
|
|
||||||
//Create Some Data
|
//Create Some Data
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user