mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
Modified the way the app detects setup mode, added an alerts setting page and other minor fixes and cleanups
This commit is contained in:
27
setup.php
27
setup.php
@@ -1,7 +1,12 @@
|
||||
<?php
|
||||
|
||||
|
||||
include("config.php");
|
||||
include("functions.php");
|
||||
|
||||
if(!isset($config_enable_setup) or $config_enable_setup == 0){
|
||||
header("Location: login.php");
|
||||
}
|
||||
|
||||
$states_array = array(
|
||||
'AL'=>'Alabama',
|
||||
'AK'=>'Alaska',
|
||||
@@ -84,14 +89,8 @@ if(isset($_POST['add_database'])){
|
||||
|
||||
fwrite($myfile, $txt);
|
||||
|
||||
$txt = "?>";
|
||||
|
||||
fwrite($myfile, $txt);
|
||||
|
||||
fclose($myfile);
|
||||
|
||||
include("config.php");
|
||||
|
||||
// Name of the file
|
||||
$filename = 'db.sql';
|
||||
// Temporary variable, used to store current query
|
||||
@@ -191,6 +190,18 @@ if(isset($_POST['add_company_settings'])){
|
||||
|
||||
mysqli_query($mysqli,"INSERT INTO calendars SET calendar_name = 'Default', calendar_color = 'blue', calendar_created_at = NOW(), company_id = $company_id");
|
||||
|
||||
$myfile = fopen("config.php", "a");
|
||||
|
||||
$txt = "\$config_enable_setup = 0;\n\n";
|
||||
|
||||
fwrite($myfile, $txt);
|
||||
|
||||
$txt = "?>";
|
||||
|
||||
fwrite($myfile, $txt);
|
||||
|
||||
fclose($myfile);
|
||||
|
||||
header("Location: login.php");
|
||||
|
||||
}
|
||||
@@ -445,7 +456,7 @@ if(isset($_POST['add_company_settings'])){
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fab fa-fw fa-usps"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="config_company_zip" placeholder="Zip Code">
|
||||
<input type="text" class="form-control" name="config_company_zip" placeholder="Zip Code" data-inputmask="'mask': '99999'">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user