Fixed Alerts

This commit is contained in:
johnny@pittpc.com
2019-08-25 00:09:40 -04:00
parent 4e6e6a5d6a
commit ec2f9f02f1
6 changed files with 11 additions and 11 deletions

View File

@@ -13,7 +13,7 @@ CRM, Accounting and Invoicing System for small managed IT companies
* Apps * Apps
* Networks * Networks
* Files * Files
* Technical Notes * Documentation
* Invoicing * Invoicing
* Email Past Due Reminders * Email Past Due Reminders
* Auto Email Receipts upon payments * Auto Email Receipts upon payments
@@ -47,8 +47,10 @@ CRM, Accounting and Invoicing System for small managed IT companies
* Clone this repo * Clone this repo
* Create a Mysql database * Create a Mysql database
* Point your browser to setup.php fill in the info * Point your browser to the URL where you downloaded the crm
* Your Done! * Go through the Setup Process
* Login
* Start inputting some data
#### Requirements #### Requirements
* Webserver (Apache, NGINX) * Webserver (Apache, NGINX)
@@ -59,7 +61,6 @@ CRM, Accounting and Invoicing System for small managed IT companies
* PHP/MySQL * PHP/MySQL
* SB Admin Bootstrap CSS Framework * SB Admin Bootstrap CSS Framework
* fontawesome * fontawesome
* datatables
* chart.js * chart.js
* moments.js * moments.js
* Jquery * Jquery

View File

@@ -30,9 +30,6 @@
include("get_settings.php"); include("get_settings.php");
$_SESSION['alert_message'] = '';
$_SESSION['alert_type'] = "warning";
//Detects if using an apple device and uses apple maps instead of google //Detects if using an apple device and uses apple maps instead of google
$iPod = stripos($_SERVER['HTTP_USER_AGENT'],"iPod"); $iPod = stripos($_SERVER['HTTP_USER_AGENT'],"iPod");
$iPhone = stripos($_SERVER['HTTP_USER_AGENT'],"iPhone"); $iPhone = stripos($_SERVER['HTTP_USER_AGENT'],"iPhone");

View File

@@ -56,6 +56,7 @@ $config_default_net_terms = $row['config_default_net_terms'];
$config_recurring_auto_send_invoice = $row['config_recurring_auto_send_invoice']; $config_recurring_auto_send_invoice = $row['config_recurring_auto_send_invoice'];
$config_api_key = $row['config_api_key']; $config_api_key = $row['config_api_key'];
$config_base_url = $row['config_base_url'];
$config_enable_cron = $row['config_enable_cron']; $config_enable_cron = $row['config_enable_cron'];
$client_types_array = array( $client_types_array = array(

View File

@@ -35,4 +35,4 @@
<div id="content-wrapper"> <div id="content-wrapper">
<div class="container-fluid"> <div class="container">

View File

@@ -80,7 +80,7 @@
//Alert Feedback //Alert Feedback
if(!empty($_SESSION['alert_message'])){ if(!empty($_SESSION['alert_message'])){
?> ?>
<div class="alert alert-info" id="alert"> <div class="alert alert-success alert-<?php echo $_SESSION['alert_type']; ?>" id="alert">
<?php echo $_SESSION['alert_message']; ?> <?php echo $_SESSION['alert_message']; ?>
<button class='close' data-dismiss='alert'>&times;</button> <button class='close' data-dismiss='alert'>&times;</button>
</div> </div>

View File

@@ -86,7 +86,7 @@ if(isset($_POST['add_company'])){
mysqli_query($mysqli,"INSERT INTO settings SET company_id = $company_id, config_company_name = '$name', config_invoice_prefix = 'INV-', config_invoice_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 = 0, 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_company_name = '$name', config_invoice_prefix = 'INV-', config_invoice_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 = 0, config_enable_cron = 0, config_ticket_next_number = 1, config_base_url = '$config_base_url'");
$_SESSION['alert_message'] = "Company added"; $_SESSION['alert_message'] = "Company <ctrong>$name</strong> created!";
header("Location: companies.php"); header("Location: companies.php");
@@ -98,7 +98,7 @@ if(isset($_POST['edit_company'])){
mysqli_query($mysqli,"UPDATE companies SET company_name = '$name', company_updated_at = NOW() WHERE company_id = $company_id"); mysqli_query($mysqli,"UPDATE companies SET company_name = '$name', company_updated_at = NOW() WHERE company_id = $company_id");
$_SESSION['alert_message'] = "Company modified"; $_SESSION['alert_message'] = "Company <strong>$name</strong> updated!";
header("Location: companies.php"); header("Location: companies.php");
@@ -777,6 +777,7 @@ if(isset($_GET['delete_category'])){
mysqli_query($mysqli,"DELETE FROM categories WHERE category_id = $category_id"); mysqli_query($mysqli,"DELETE FROM categories WHERE category_id = $category_id");
$_SESSION['alert_message'] = "Category deleted"; $_SESSION['alert_message'] = "Category deleted";
$_SESSION['alert_type'] = "danger";
header("Location: " . $_SERVER["HTTP_REFERER"]); header("Location: " . $_SERVER["HTTP_REFERER"]);