diff --git a/client_events.php b/client_events.php index a4e35cc0..125741b4 100644 --- a/client_events.php +++ b/client_events.php @@ -6,7 +6,7 @@ if(isset($_GET['calendar_id'])){ ?> -
+
diff --git a/post.php b/post.php index 4ece8644..a4c8bd4e 100644 --- a/post.php +++ b/post.php @@ -13,6 +13,18 @@ require_once $mpdf_path . '/vendor/autoload.php'; use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; +if(isset($_GET['switch_company'])){ + $company_id = intval($_GET['switch_company']); + + $session_company_id = $company_id; + + $_SESSION['alert_type'] = "info"; + $_SESSION['alert_message'] = "Switched Companies!"; + + header("Location: " . $_SERVER["HTTP_REFERER"]); + +} + if(isset($_POST['add_user'])){ $name = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['name']))); diff --git a/setup.php b/setup.php index 6d13436b..490c2dc7 100644 --- a/setup.php +++ b/setup.php @@ -98,11 +98,11 @@ if(isset($_POST['add_database'])){ fwrite($myfile, $txt); - $txt = "\$mysqli = mysqli_connect(\$dbhost, \$dbusername, \$dbpassword, \$database);\n\n"; + $txt = "\$mysqli = mysqli_connect(\$dbhost, \$dbusername, \$dbpassword, \$database) or die('Database Connection Failed');\n\n"; fwrite($myfile, $txt); - $txt = "\$config_app_name = 'IT CRM';\n"; + $txt = "\$config_app_name = 'ITFlow';\n"; fwrite($myfile, $txt);