diff --git a/api.php b/api.php index 57e0276e..c62998f2 100644 --- a/api.php +++ b/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){ + + 0 + '; - } - - if(isset($_GET['phonebookbeta'])){ - - $myfile = fopen("phonebook.xml", "w"); - - $txt = ""; - - fwrite($myfile, $txt); - - $txt = "\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 = "\n - $client_name\n - \n - $client_phone\n - \n - \n"; + ?> + + + + + + + 1 + + - fwrite($myfile, $txt); - + "; - 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']; + + ?> + + + + + + + 2 + + + + '; } diff --git a/client.php b/client.php index 46d69177..8a385562 100644 --- a/client.php +++ b/client.php @@ -109,9 +109,14 @@ if(isset($_GET['client_id'])){ - +
+ diff --git a/invoice.php b/invoice.php index 60ef447a..6510b294 100644 --- a/invoice.php +++ b/invoice.php @@ -221,7 +221,7 @@ if(isset($_GET['invoice_id'])){ - + @@ -416,22 +416,13 @@ var productCosts = [ ]; -$('#item1').typeahead({ +$('#item').typeahead({ source: products, afterSelect: function(){ - $('#price').val( '' ); + $('#item').val( '' ); } }); -$('#item').typeahead({ - minLength: 3, - source: function (query, process) { - data: productCosts - - afterSelect: function(args){ - $('#price').val(args.cost ); - } -}); \ No newline at end of file diff --git a/settings-defaults.php b/settings-defaults.php index ce6089fa..b892d832 100644 --- a/settings-defaults.php +++ b/settings-defaults.php @@ -1,12 +1,10 @@ - -
-
Defaults Settings
+
Defaults Settings
@@ -14,9 +12,24 @@
- +
- +
@@ -24,9 +37,24 @@
- +
- +
@@ -34,19 +62,74 @@
- +
- + +
+ + +
+ +
+
+ +
+
- +
- +
- +
diff --git a/settings-nav.php b/settings-nav.php index dffcb8da..bf43bdad 100644 --- a/settings-nav.php +++ b/settings-nav.php @@ -32,6 +32,14 @@ + +