mirror of https://github.com/itflow-org/itflow
Moved most of the config vars to SQL settings table more work on settings
This commit is contained in:
parent
c470333faa
commit
a478a51489
|
|
@ -2,7 +2,7 @@
|
|||
<?php if($num_contacts > 0){ ?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="?client_id=<?php echo $client_id; ?>&tab=contacts">
|
||||
<i class="fa fa-2x fa-users"></i><br>
|
||||
<i class="fa fa-users"></i><br>
|
||||
Contacts<br>
|
||||
<span class="badge badge-pill badge-light"><?php echo $num_contacts; ?></span>
|
||||
</a>
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
<?php if($num_locations > 0){ ?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="?client_id=<?php echo $client_id; ?>&tab=locations">
|
||||
<i class="fa fa-2x fa-map-marker"></i><br>
|
||||
<i class="fa fa-map-marker"></i><br>
|
||||
Locations<br>
|
||||
<span class="badge badge-pill badge-fark"><?php echo $num_locations; ?></span>
|
||||
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
<?php if($num_assets > 0){ ?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="?client_id=<?php echo $client_id; ?>&tab=assets">
|
||||
<i class="fa fa-2x fa-tag"></i><br>
|
||||
<i class="fa fa-tag"></i><br>
|
||||
Assets<br>
|
||||
<span class="badge badge-pill badge-dark"><?php echo $num_assets; ?></span>
|
||||
</a>
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
<?php if($num_vendors > 0){ ?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="?client_id=<?php echo $client_id; ?>&tab=vendors">
|
||||
<i class="fa fa-2x fa-building"></i><br>
|
||||
<i class="fa fa-building"></i><br>
|
||||
Vendors<br>
|
||||
<span class="badge badge-pill badge-secondary"><?php echo $num_vendors; ?></span>
|
||||
</a>
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
<?php if($num_logins > 0){ ?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="?client_id=<?php echo $client_id; ?>&tab=logins">
|
||||
<i class="fa fa-2x fa-key"></i><br>
|
||||
<i class="fa fa-key"></i><br>
|
||||
Logins<br>
|
||||
<span class="badge badge-pill badge-dark"><?php echo $num_logins; ?></span>
|
||||
</a>
|
||||
|
|
@ -48,7 +48,7 @@
|
|||
<?php if($num_networks > 0){ ?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="?client_id=<?php echo $client_id; ?>&tab=networks">
|
||||
<i class="fa fa-2x fa-network-wired"></i><br>
|
||||
<i class="fa fa-network-wired"></i><br>
|
||||
Networks<br>
|
||||
<span class="badge badge-pill badge-dark"><?php echo $num_networks; ?></span>
|
||||
</a>
|
||||
|
|
@ -57,7 +57,7 @@
|
|||
<?php if($num_domains > 0){ ?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="?client_id=<?php echo $client_id; ?>&tab=domains">
|
||||
<i class="fa fa-2x fa-globe"></i><br>
|
||||
<i class="fa fa-globe"></i><br>
|
||||
Domains<br>
|
||||
<span class="badge badge-pill badge-dark"><?php echo $num_domains; ?></span>
|
||||
</a>
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
<?php if($num_applications > 0){ ?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="?client_id=<?php echo $client_id; ?>&tab=applications">
|
||||
<i class="fa fa-2x fa-box"></i><br>
|
||||
<i class="fa fa-box"></i><br>
|
||||
Applications<br>
|
||||
<span class="badge badge-pill badge-dark"><?php echo $num_applications; ?></span>
|
||||
</a>
|
||||
|
|
@ -75,7 +75,7 @@
|
|||
<?php if($num_invoices > 0){ ?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="?client_id=<?php echo $client_id; ?>&tab=invoices">
|
||||
<i class="fa fa-2x fa-file"></i><br>
|
||||
<i class="fa fa-file"></i><br>
|
||||
Invoices<br>
|
||||
<span class="badge badge-pill badge-dark"><?php echo $num_invoices; ?></span>
|
||||
</a>
|
||||
|
|
@ -84,7 +84,7 @@
|
|||
<?php if($num_recurring > 0){ ?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="?client_id=<?php echo $client_id; ?>&tab=recurring">
|
||||
<i class="fa fa-2x fa-copy"></i><br>
|
||||
<i class="fa fa-copy"></i><br>
|
||||
Recurring<br>
|
||||
<span class="badge badge-pill badge-dark"><?php echo $num_recurring; ?></span>
|
||||
</a>
|
||||
|
|
@ -93,7 +93,7 @@
|
|||
<?php if($num_quotes > 0){ ?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="?client_id=<?php echo $client_id; ?>&tab=quotes">
|
||||
<i class="fa fa-2x fa-file-o"></i><br>
|
||||
<i class="fa fa-file-o"></i><br>
|
||||
Quotes<br>
|
||||
<span class="badge badge-pill badge-dark"><?php echo $num_quotes; ?></span>
|
||||
</a>
|
||||
|
|
@ -102,7 +102,7 @@
|
|||
<?php if($num_files > 0){ ?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="?client_id=<?php echo $client_id; ?>&tab=files">
|
||||
<i class="fa fa-2x fa-paperclip"></i><br>
|
||||
<i class="fa fa-paperclip"></i><br>
|
||||
Files<br>
|
||||
<span class="badge badge-pill badge-dark"><?php echo $num_files; ?></span>
|
||||
</a>
|
||||
|
|
@ -111,7 +111,7 @@
|
|||
<?php if($num_notes > 0){ ?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="?client_id=<?php echo $client_id; ?>&tab=notes">
|
||||
<i class="fa fa-2x fa-edit"></i><br>
|
||||
<i class="fa fa-edit"></i><br>
|
||||
Notes<br>
|
||||
<span class="badge badge-pill badge-dark"><?php echo $num_notes; ?></span>
|
||||
</a>
|
||||
|
|
|
|||
49
config.php
49
config.php
|
|
@ -13,38 +13,35 @@
|
|||
$config_date_format = "Y-m-d";
|
||||
$config_time_format = "h:ia";
|
||||
$config_no_records = "There is nothing here!";
|
||||
$config_default_expenes_account = "";
|
||||
$config_default_invoice_account = "";
|
||||
$config_default_expense_account = "";
|
||||
$config_default_payment_account = "";
|
||||
$config_default_net_terms = "";
|
||||
|
||||
$config_start_page = "clients.php";
|
||||
$sql = mysqli_query($mysqli,"SELECT * FROM settings");
|
||||
$row = mysqli_fetch_array($sql);
|
||||
|
||||
$config_company_name = "PittPC";
|
||||
$config_company_address = "123 PittPC Street";
|
||||
$config_company_city = "Pittsburgh";
|
||||
$config_company_state = "PA";
|
||||
$config_company_zip = "15205";
|
||||
$config_company_phone = "412-500-9434";
|
||||
$config_company_site = "pittpc.com";
|
||||
|
||||
$config_invoice_logo = "/uploads/invoice_logo.png";
|
||||
$config_invoice_footer = "Please make checks payable to PittPC<br>Visit us at pittpc.com";
|
||||
|
||||
//Mail Settings (Host must require TLS Support)
|
||||
$config_smtp_host = "mail.pittpc.com";
|
||||
$config_smtp_username = "";
|
||||
$config_smtp_password = "";
|
||||
$config_smtp_port = 587;
|
||||
$config_mail_from_email = "";
|
||||
$config_mail_from_name = "Automated Billing Department";
|
||||
$config_start_page = $row['config_start_page'];
|
||||
$config_company_name = $row['config_company_name'];
|
||||
$config_company_address = $row['config_company_address'];
|
||||
$config_company_city = $row['config_company_city'];
|
||||
$config_company_state = $row['config_company_state'];
|
||||
$config_company_zip = $row['config_company_zip'];
|
||||
$config_company_phone = $row['config_company_phone'];
|
||||
$config_company_site = $row['config_company_site'];
|
||||
$config_next_invoice_number = $row['config_next_invoice_number'];
|
||||
$config_invoice_logo = $row['config_invoice_logo'];
|
||||
$config_invoice_footer = $row['config_invoice_footer'];
|
||||
$config_smtp_host = $row['config_smtp_host'];
|
||||
$config_smtp_username = $row['config_smtp_username'];
|
||||
$config_smtp_password = $row['config_smtp_password'];
|
||||
$config_smtp_port = $row['config_smtp_port'];
|
||||
$config_mail_from_email = $row['config_mail_from_email'];
|
||||
$config_mail_from_name = $row['config_mail_from_name'];
|
||||
$config_account_balance_threshold = $row['config_account_balance_threshold'];
|
||||
|
||||
$_SESSION['alert_message'] = '';
|
||||
$_SESSION['alert_type'] = "warning";
|
||||
|
||||
$config_account_balance_threshold = 200;
|
||||
|
||||
|
||||
|
||||
$net_terms_array = array(
|
||||
'0'=>'On Reciept',
|
||||
'7'=>'7 Days',
|
||||
|
|
@ -141,4 +138,4 @@
|
|||
'Other'
|
||||
);
|
||||
|
||||
?>
|
||||
?>
|
||||
57
db.sql
57
db.sql
|
|
@ -44,7 +44,7 @@ CREATE TABLE `alerts` (
|
|||
`alert_date` date NOT NULL,
|
||||
`alert_ack_date` date NOT NULL,
|
||||
PRIMARY KEY (`alert_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
|
@ -120,7 +120,7 @@ CREATE TABLE `client_contacts` (
|
|||
`location_id` int(11) NOT NULL,
|
||||
`client_id` int(11) NOT NULL,
|
||||
PRIMARY KEY (`client_contact_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
|
@ -214,7 +214,7 @@ CREATE TABLE `client_notes` (
|
|||
`client_note_body` text NOT NULL,
|
||||
`client_id` int(11) NOT NULL,
|
||||
PRIMARY KEY (`client_note_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
|
@ -279,6 +279,23 @@ CREATE TABLE `expenses` (
|
|||
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `files`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `files`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `files` (
|
||||
`file_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`file_type` varchar(200) NOT NULL,
|
||||
`reference_file_name` varchar(200) NOT NULL,
|
||||
`file_name` varchar(200) NOT NULL,
|
||||
`client_id` int(11) NOT NULL,
|
||||
PRIMARY KEY (`file_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `invoice_history`
|
||||
--
|
||||
|
|
@ -435,6 +452,38 @@ CREATE TABLE `recurring_invoices` (
|
|||
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `settings`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `settings`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `settings` (
|
||||
`config_default_expense_account` varchar(200) NOT NULL,
|
||||
`config_default_payment_account` varchar(200) NOT NULL,
|
||||
`config_default_net_terms` varchar(200) NOT NULL,
|
||||
`config_start_page` varchar(200) NOT NULL,
|
||||
`config_company_name` varchar(200) NOT NULL,
|
||||
`config_company_address` varchar(200) NOT NULL,
|
||||
`config_company_city` varchar(200) NOT NULL,
|
||||
`config_company_state` varchar(200) NOT NULL,
|
||||
`config_company_zip` varchar(200) NOT NULL,
|
||||
`config_company_phone` varchar(200) NOT NULL,
|
||||
`config_company_site` varchar(200) NOT NULL,
|
||||
`config_smtp_host` varchar(200) NOT NULL,
|
||||
`config_smtp_username` varchar(200) NOT NULL,
|
||||
`config_smtp_password` varchar(200) NOT NULL,
|
||||
`config_smtp_port` varchar(200) NOT NULL,
|
||||
`config_mail_from_email` varchar(200) NOT NULL,
|
||||
`config_mail_from_name` varchar(200) NOT NULL,
|
||||
`config_account_balance_threshold` varchar(200) NOT NULL,
|
||||
`config_invoice_logo` varchar(200) NOT NULL,
|
||||
`config_invoice_footer` text NOT NULL,
|
||||
`config_next_invoice_number` int(11) NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `transfers`
|
||||
--
|
||||
|
|
@ -498,4 +547,4 @@ CREATE TABLE `vendors` (
|
|||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2019-04-19 16:03:26
|
||||
-- Dump completed on 2019-04-23 15:11:59
|
||||
|
|
|
|||
61
post.php
61
post.php
|
|
@ -13,10 +13,67 @@ require_once $mpdf_path . '/vendor/autoload.php';
|
|||
use PHPMailer\PHPMailer\PHPMailer;
|
||||
use PHPMailer\PHPMailer\Exception;
|
||||
|
||||
|
||||
|
||||
$todays_date = date('Y-m-d');
|
||||
|
||||
if(isset($_POST['edit_general_settings'])){
|
||||
|
||||
$config_start_page = strip_tags(mysqli_real_escape_string($mysqli,$_POST['config_start_page']));
|
||||
$config_account_balance_threshold = strip_tags(mysqli_real_escape_string($mysqli,$_POST['config_account_balance_threshold']));
|
||||
|
||||
mysqli_query($mysqli,"UPDATE settings SET config_start_page = '$config_start_page', config_account_balance_threshold = '$config_account_balance_threshold'");
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
|
||||
}
|
||||
|
||||
if(isset($_POST['edit_company_settings'])){
|
||||
|
||||
$config_company_name = strip_tags(mysqli_real_escape_string($mysqli,$_POST['config_company_name']));
|
||||
$config_company_address = strip_tags(mysqli_real_escape_string($mysqli,$_POST['config_company_address']));
|
||||
$config_company_city = strip_tags(mysqli_real_escape_string($mysqli,$_POST['config_company_city']));
|
||||
$config_company_state = strip_tags(mysqli_real_escape_string($mysqli,$_POST['config_company_state']));
|
||||
$config_company_zip = strip_tags(mysqli_real_escape_string($mysqli,$_POST['config_company_zip']));
|
||||
$config_company_phone = strip_tags(mysqli_real_escape_string($mysqli,$_POST['config_company_phone']));
|
||||
$config_company_site = strip_tags(mysqli_real_escape_string($mysqli,$_POST['config_company_site']));
|
||||
if($_FILES['file']['tmp_name']!='') {
|
||||
$path = "uploads/";
|
||||
$path = $path . basename( $_FILES['file']['name']);
|
||||
$file_name = basename($path);
|
||||
move_uploaded_file($_FILES['file']['tmp_name'], $path);
|
||||
}
|
||||
|
||||
|
||||
mysqli_query($mysqli,"UPDATE settings SET config_company_name = '$config_company_name', config_company_address = '$config_company_address', config_company_city = '$config_company_city', config_company_state = '$config_company_state', config_company_zip = '$config_company_zip', config_company_phone = '$config_company_phone', config_company_site = '$config_company_site' config_invoice_logo = '$path'");
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
|
||||
}
|
||||
|
||||
if(isset($_POST['edit_mail_settings'])){
|
||||
|
||||
$config_smtp_host = strip_tags(mysqli_real_escape_string($mysqli,$_POST['config_smtp_host']));
|
||||
$config_smtp_username = strip_tags(mysqli_real_escape_string($mysqli,$_POST['config_smtp_username']));
|
||||
$config_smtp_password = strip_tags(mysqli_real_escape_string($mysqli,$_POST['config_smtp_password']));
|
||||
|
||||
mysqli_query($mysqli,"UPDATE settings SET config_smtp_host = '$config_smtp_host', config_smtp_username = '$config_smtp_username', config_smtp_password = '$config_smtp_password'");
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
|
||||
}
|
||||
|
||||
if(isset($_POST['edit_invoice_settings'])){
|
||||
|
||||
$config_next_invoice_number = intval($_POST['config_next_invoice_number']);
|
||||
$config_mail_from_email = strip_tags(mysqli_real_escape_string($mysqli,$_POST['config_mail_from_email']));
|
||||
$config_mail_from_name = strip_tags(mysqli_real_escape_string($mysqli,$_POST['config_mail_from_name']));
|
||||
$config_invoice_footer = strip_tags(mysqli_real_escape_string($mysqli,$_POST['config_invoice_footer']));
|
||||
|
||||
mysqli_query($mysqli,"UPDATE settings SET config_next_invoice_number = '$config_next_invoice_number', config_mail_from_email = '$config_mail_from_email', config_mail_from_name = '$config_mail_from_name', config_invoice_footer = '$config_invoice_footer'");
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
|
||||
}
|
||||
|
||||
if(isset($_POST['add_user'])){
|
||||
|
||||
$name = strip_tags(mysqli_real_escape_string($mysqli,$_POST['name']));
|
||||
|
|
|
|||
|
|
@ -0,0 +1,88 @@
|
|||
<?php include("header.php"); ?>
|
||||
|
||||
<?php include("settings-nav.php"); ?>
|
||||
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
<h6 class="float-left mt-1"><i class="fa fa-building"></i> Company Settings</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form class="p-3" action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||
<div class="form-group">
|
||||
<label>Company Name</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-building"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="config_company_name" placeholder="Company Name" value="<?php echo $config_company_name; ?>" required autofocus>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Address</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-map-marker"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="config_company_address" placeholder="Street Address" value="<?php echo $config_company_address; ?>" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>City</label>
|
||||
<input type="text" class="form-control" name="config_company_city" placeholder="City" value="<?php echo $config_company_city; ?>" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>State</label>
|
||||
<select class="form-control" name="config_company_state" required>
|
||||
<option value="">Select a state...</option>
|
||||
<?php foreach($states_array as $state_abbr => $state_name) { ?>
|
||||
<option <?php if($config_company_state == $state_abbr) { echo "selected"; } ?> value="<?php echo $state_abbr; ?>"><?php echo $state_name; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Zip</label>
|
||||
<input type="text" class="form-control" name="config_company_zip" placeholder="Zip Code" value="<?php echo $config_company_zip; ?>" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Phone</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-phone"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="config_company_phone" placeholder="Phone Number" value="<?php echo $config_company_phone; ?>" data-inputmask="'mask': '999-999-9999'" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Website</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-globe"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="config_company_site" placeholder="Website address https://" value="<?php echo $config_company_site; ?>" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<img class="img-fluid" src="<?php echo $config_invoice_logo; ?>">
|
||||
|
||||
<div class="form-group mb-5">
|
||||
<label>Logo</label>
|
||||
<input type="file" class="form-control-file" name="file">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
|
||||
<button type="submit" name="edit_company_settings" class="btn btn-primary">Save</button>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include("footer.php");
|
||||
|
|
@ -1,78 +1,36 @@
|
|||
<?php include("header.php"); ?>
|
||||
|
||||
<?php $sql = mysqli_query($mysqli,"SELECT * FROM accounts ORDER BY account_id DESC"); ?>
|
||||
|
||||
<?php include("settings-nav.php"); ?>
|
||||
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
<h6 class="float-left mt-1"><i class="fa fa-building"></i> Company Settings</h6>
|
||||
<h6 class="float-left mt-1"><i class="fa fa-cog"></i> General Settings</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form class="p-3" action="post.php" method="post" autocomplete="off">
|
||||
<div class="form-group">
|
||||
<label>Company Name</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-building"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="name" placeholder="Company Name" required autofocus>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Address</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-map-marker"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="address" placeholder="Street Address" required>
|
||||
</div>
|
||||
<label>Starting Page</label>
|
||||
<select class="form-control" name="config_start_page" required>
|
||||
<option value="dashboard.php">Dashboard</option>
|
||||
<option value="clients.php">Clients</option>
|
||||
<option value="invoices.php">Invoices</option>
|
||||
<option value="expenses.php">Expenses</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>City</label>
|
||||
<input type="text" class="form-control" name="city" placeholder="City" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>State</label>
|
||||
<select class="form-control" name="state">
|
||||
<option value="">Select a state...</option>
|
||||
<?php foreach($states_array as $state_abbr => $state_name) { ?>
|
||||
<option value="<?php echo $state_abbr; ?>"><?php echo $state_name; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Phone</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-phone"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="phone" placeholder="Phone Number" data-inputmask="'mask': '999-999-9999'" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Website</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-globe"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="site" placeholder="Website address https://" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-5">
|
||||
<label>Logo</label>
|
||||
<input type="file" class="form-control-file" name="logo">
|
||||
<label>Account Threshold</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-university"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="config_account_balance_threshold" placeholder="Set an alert for dollar amount" value="<?php echo $config_account_balance_threshold; ?>" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<button type="submit" name="add_client_contact" class="btn btn-primary">Save</button>
|
||||
<button type="submit" name="edit_general_settings" class="btn btn-primary">Save</button>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
<?php include("header.php"); ?>
|
||||
|
||||
<?php $sql = mysqli_query($mysqli,"SELECT * FROM accounts ORDER BY account_id DESC"); ?>
|
||||
|
||||
<?php include("settings-nav.php"); ?>
|
||||
|
||||
<div class="card mb-3">
|
||||
|
|
@ -17,7 +15,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-barcode"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="next_number" placeholder="Next Invoice Number" required autofocus>
|
||||
<input type="text" class="form-control" name="config_next_invoice_number" placeholder="Next Invoice Number" value="<?php echo $config_next_invoice_number; ?>" required autofocus>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -27,7 +25,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-envelope"></i></span>
|
||||
</div>
|
||||
<input type="email" class="form-control" name="email" placeholder="Email Address" required>
|
||||
<input type="email" class="form-control" name="config_mail_from_email" placeholder="Email Address" value="<?php echo $config_mail_from_email; ?>" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -37,27 +35,24 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-user"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="name_from" placeholder="Name" required>
|
||||
<input type="text" class="form-control" name="config_mail_from_name" placeholder="Name" value="<?php echo $config_mail_from_name; ?>" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Send Overdue Reminders</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-user"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="name_from" placeholder="Name" required>
|
||||
</div>
|
||||
<label>Invoice Footer</label>
|
||||
<textarea class="form-control" rows="4" name="config_invoice_footer"><?php echo $config_invoice_footer; ?></textarea>
|
||||
</div>
|
||||
|
||||
<img class="img-fluid" src="uploads/invoice_logo.png">
|
||||
|
||||
<div class="form-group mb-5">
|
||||
<label>Logo</label>
|
||||
<input type="file" class="form-control-file" name="logo">
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
<button type="submit" name="edit_settings_invoice" class="btn btn-primary">Save</button>
|
||||
<button type="submit" name="edit_invoice_settings" class="btn btn-primary">Save</button>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
<?php include("header.php"); ?>
|
||||
|
||||
<?php $sql = mysqli_query($mysqli,"SELECT * FROM accounts ORDER BY account_id DESC"); ?>
|
||||
|
||||
<?php include("settings-nav.php"); ?>
|
||||
|
||||
<div class="card mb-3">
|
||||
|
|
@ -16,7 +14,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-server"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="smtp_host" placeholder="Mail Server Address" required autofocus>
|
||||
<input type="text" class="form-control" name="config_smtp_host" placeholder="Mail Server Address" value="<?php echo $config_smtp_host; ?>" required autofocus>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -26,7 +24,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-user"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="username" placeholder="Username" required>
|
||||
<input type="text" class="form-control" name="config_smtp_username" placeholder="Username" value="<?php echo $config_smtp_username; ?>" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -36,12 +34,12 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-lock"></i></span>
|
||||
</div>
|
||||
<input type="password" class="form-control" name="password" placeholder="Password" required>
|
||||
<input type="password" class="form-control" name="config_smtp_password" placeholder="Password" value="<?php echo $config_smtp_password; ?>" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
<button type="submit" name="add_client_contact" class="btn btn-primary">Save</button>
|
||||
<button type="submit" name="edit_mail_settings" class="btn btn-primary">Save</button>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,14 @@
|
|||
<ul class="nav nav-pills nav-fill mb-3">
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="settings-general.php">
|
||||
<i class="fa fa-2x fa-cog"></i><br>
|
||||
Company
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="settings-company.php">
|
||||
<i class="fa fa-2x fa-building"></i><br>
|
||||
Company
|
||||
</a>
|
||||
|
|
|
|||
Loading…
Reference in New Issue