mirror of https://github.com/itflow-org/itflow
tocuhed up avatar icon and placement on top nav
This commit is contained in:
parent
dfebcaedfe
commit
09e2ce4369
68
api.php
68
api.php
|
|
@ -36,7 +36,7 @@ if($_GET['api_key'] == $config_api_key){
|
|||
|
||||
}
|
||||
|
||||
if(isset($_GET['phonebookalpha'])){
|
||||
if(isset($_GET['phonebook'])){
|
||||
|
||||
header('Content-type: text/xml');
|
||||
header('Pragma: public');
|
||||
|
|
@ -57,46 +57,54 @@ if($_GET['api_key'] == $config_api_key){
|
|||
<Phone>
|
||||
<phonenumber><?php echo $client_phone; ?></phonenumber>
|
||||
</Phone>
|
||||
<Groups>
|
||||
<groupid>0</groupid>
|
||||
</Groups>
|
||||
</Contact>
|
||||
<?php
|
||||
}
|
||||
echo '</AddressBook>';
|
||||
|
||||
}
|
||||
|
||||
if(isset($_GET['phonebookbeta'])){
|
||||
|
||||
$myfile = fopen("phonebook.xml", "w");
|
||||
|
||||
$txt = "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
|
||||
|
||||
fwrite($myfile, $txt);
|
||||
|
||||
$txt = "<AddressBook>\n";
|
||||
|
||||
fwrite($myfile, $txt);
|
||||
$sql = mysqli_query($mysqli,"SELECT * FROM clients;");
|
||||
$sql = mysqli_query($mysqli,"SELECT * FROM contacts;");
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$client_name = $row['client_name'];
|
||||
$client_phone = $row['client_phone'];
|
||||
$vendor_name = $row['contact_name'];
|
||||
$vendor_phone = $row['contact_phone'];
|
||||
|
||||
$txt = "<Contact>\n
|
||||
<LastName>$client_name</LastName>\n
|
||||
<Phone>\n
|
||||
<phonenumber>$client_phone</phonenumber>\n
|
||||
</Phone>\n
|
||||
</Contact>\n";
|
||||
?>
|
||||
<Contact>
|
||||
<LastName><?php echo $contact_name; ?></LastName>
|
||||
<Phone>
|
||||
<phonenumber><?php echo $contact_phone; ?></phonenumber>
|
||||
</Phone>
|
||||
<Groups>
|
||||
<groupid>1</groupid>
|
||||
</Groups>
|
||||
</Contact>
|
||||
|
||||
fwrite($myfile, $txt);
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
$txt = "</AddressBook>";
|
||||
fwrite($myfile, $txt);
|
||||
fclose($myfile);
|
||||
$sql = mysqli_query($mysqli,"SELECT * FROM vendors;");
|
||||
|
||||
header("Location: phonebook.xml");
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$vendor_name = $row['vendor_name'];
|
||||
$vendor_phone = $row['vendor_phone'];
|
||||
|
||||
?>
|
||||
<Contact>
|
||||
<LastName><?php echo $vendor_name; ?></LastName>
|
||||
<Phone>
|
||||
<phonenumber><?php echo $vendor_phone; ?></phonenumber>
|
||||
</Phone>
|
||||
<Groups>
|
||||
<groupid>2</groupid>
|
||||
</Groups>
|
||||
</Contact>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
echo '</AddressBook>';
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -109,9 +109,14 @@ if(isset($_GET['client_id'])){
|
|||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if(!empty($client_phone)){
|
||||
?>
|
||||
<i class="fa fa-fw fa-phone text-secondary ml-1 mr-2 mb-2"></i> <?php echo $client_phone; ?>
|
||||
<br>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if(!empty($client_website)){
|
||||
?>
|
||||
|
|
|
|||
15
invoice.php
15
invoice.php
|
|
@ -221,7 +221,7 @@ if(isset($_GET['invoice_id'])){
|
|||
|
||||
<td></td>
|
||||
<td><input type="text" class="form-control typeahead" name="name" id="item"></td>
|
||||
<td><textarea class="form-control" rows="1" name="description"></textarea></td>
|
||||
<td><textarea class="form-control" id="description" rows="1" name="description"></textarea></td>
|
||||
<td><input type="text" class="form-control" style="text-align: center;" name="qty"></td>
|
||||
<td><input type="text" class="form-control" style="text-align: right;" id="price" name="price"></td>
|
||||
<td>
|
||||
|
|
@ -416,22 +416,13 @@ var productCosts = [
|
|||
|
||||
];
|
||||
|
||||
$('#item1').typeahead({
|
||||
$('#item').typeahead({
|
||||
source: products,
|
||||
afterSelect: function(){
|
||||
$('#price').val( '<?php echo $product_cost; ?>' );
|
||||
$('#item').val( '<?php echo $product_name; ?>' );
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$('#item').typeahead({
|
||||
minLength: 3,
|
||||
source: function (query, process) {
|
||||
data: productCosts
|
||||
|
||||
afterSelect: function(args){
|
||||
$('#price').val(args.cost );
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
@ -1,12 +1,10 @@
|
|||
<?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-cog"></i> Defaults Settings</h6>
|
||||
<h6 class="float-left mt-1"><i class="fa fa-cog mr-2"></i>Defaults Settings</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form class="p-3" action="post.php" method="post" autocomplete="off">
|
||||
|
|
@ -14,9 +12,24 @@
|
|||
<label>Transfer From Account</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-server"></i></span>
|
||||
<span class="input-group-text"><i class="fa fa-exchange-alt"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="smtp_host" placeholder="Mail Server Address" required autofocus>
|
||||
<select class="form-control selectpicker show-tick" name="config_default_transfer_from_account">
|
||||
<option value="">- Account -</option>
|
||||
<?php
|
||||
|
||||
$sql = mysqli_query($mysqli,"SELECT * FROM accounts");
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$account_id = $row['account_id'];
|
||||
$account_name = $row['account_name'];
|
||||
|
||||
?>
|
||||
<option value="<?php echo $account_id; ?>"><?php echo $account_name; ?></option>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -24,9 +37,24 @@
|
|||
<label>Transfer To Account</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-user"></i></span>
|
||||
<span class="input-group-text"><i class="fa fa-exchange-alt"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="username" placeholder="Username" required>
|
||||
<select class="form-control selectpicker show-tick" name="config_default_transfer_to_account">
|
||||
<option value="">- Account -</option>
|
||||
<?php
|
||||
|
||||
$sql = mysqli_query($mysqli,"SELECT * FROM accounts");
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$account_id = $row['account_id'];
|
||||
$account_name = $row['account_name'];
|
||||
|
||||
?>
|
||||
<option value="<?php echo $account_id; ?>"><?php echo $account_name; ?></option>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -34,19 +62,74 @@
|
|||
<label>Payment Account</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-user"></i></span>
|
||||
<span class="input-group-text"><i class="fa fa-credit-card"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="username" placeholder="Username" required>
|
||||
<select class="form-control selectpicker show-tick" name="config_default_payment_account">
|
||||
<option value="">- Account -</option>
|
||||
<?php
|
||||
|
||||
$sql = mysqli_query($mysqli,"SELECT * FROM accounts");
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$account_id = $row['account_id'];
|
||||
$account_name = $row['account_name'];
|
||||
|
||||
?>
|
||||
<option value="<?php echo $account_id; ?>"><?php echo $account_name; ?></option>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Expense Account</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-shopping-cart"></i></span>
|
||||
</div>
|
||||
<select class="form-control selectpicker show-tick" name="config_default_expense_account">
|
||||
<option value="">- Account -</option>
|
||||
<?php
|
||||
|
||||
$sql = mysqli_query($mysqli,"SELECT * FROM accounts");
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$account_id = $row['account_id'];
|
||||
$account_name = $row['account_name'];
|
||||
|
||||
?>
|
||||
<option value="<?php echo $account_id; ?>"><?php echo $account_name; ?></option>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-5">
|
||||
<label>Expense Account</label>
|
||||
<label>Default Calendar</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-user"></i></span>
|
||||
<span class="input-group-text"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="username" placeholder="Username" required>
|
||||
<select class="form-control selectpicker show-tick" name="config_default_calendar">
|
||||
<option value="">- Calendar -</option>
|
||||
<?php
|
||||
|
||||
$sql = mysqli_query($mysqli,"SELECT * FROM calendars");
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$calendar_id = $row['calendar_id'];
|
||||
$calendar_name = $row['calendar_name'];
|
||||
|
||||
?>
|
||||
<option value="<?php echo $cakendar_id; ?>"><?php echo $calendar_name; ?></option>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,14 @@
|
|||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link <?php if(basename($_SERVER["REQUEST_URI"]) == "settings-default.php") { echo "active"; } ?>"
|
||||
href="settings-default.php">
|
||||
<i class="fa fa-fw fa-2x fa-cog"></i><br>
|
||||
Defaults
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link <?php if(basename($_SERVER["REQUEST_URI"]) == "settings-invoice.php") { echo "active"; } ?>"
|
||||
href="settings-invoice.php">
|
||||
|
|
|
|||
20
top_nav.php
20
top_nav.php
|
|
@ -1,7 +1,5 @@
|
|||
<nav class="navbar navbar-expand navbar-dark bg-primary static-top">
|
||||
|
||||
|
||||
|
||||
<button class="btn btn-link btn-sm text-white order-1 order-sm-0" id="sidebarToggle" href="#">
|
||||
<i class="fas fa-bars"></i>
|
||||
</button>
|
||||
|
|
@ -23,7 +21,7 @@
|
|||
<li class="nav-item dropdown no-arrow mx-2">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="alertsDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<?php if($num_alerts > 0){ ?> <span class="badge badge-danger"><?php echo $num_alerts; ?></span> <?php } ?>
|
||||
<i class="fas fa-bell mt-2"></i>
|
||||
<i class="fas fa-fw fa-bell mt-1"></i>
|
||||
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="alertsDropdown">
|
||||
|
|
@ -35,11 +33,23 @@
|
|||
</li>
|
||||
<li class="nav-item dropdown no-arrow">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<img height="32" width="32" src="<?php echo "$session_avatar"; ?>" class="img-fluid rounded-circle"> <strong><?php echo "$session_name"; ?></strong>
|
||||
<?php if(!empty($session_avatar)){ ?>
|
||||
<img height="28" width="28" src="<?php echo "$session_avatar"; ?>" class="img-fluid rounded-circle">
|
||||
<?php }else{ ?>
|
||||
<i class="fa fa-fw fa-user mt-1"></i>
|
||||
<?php } ?>
|
||||
<strong><?php echo "$session_name"; ?></strong>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="userDropdown">
|
||||
<center>
|
||||
<img height="128" width="128" src="<?php echo "$session_avatar"; ?>" class="img-fluid rounded-circle">
|
||||
<?php if(!empty($session_avatar)){ ?>
|
||||
<img class="img-fluid rounded-circle" src="<?php echo $session_avatar; ?>" height="128" width="128">
|
||||
<?php }else{ ?>
|
||||
<span class="fa-stack fa-4x">
|
||||
<i class="fa fa-circle fa-stack-2x text-secondary"></i>
|
||||
<span class="fa fa-stack-1x text-white"><?php echo initials($session_name); ?></span>
|
||||
</span>
|
||||
<?php } ?>
|
||||
</center>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="settings-user.php"><i class="fa fa-fw fa-cog"></i> Settings</a>
|
||||
|
|
|
|||
Loading…
Reference in New Issue