@@ -13,41 +13,40 @@ discard block |
||
13 | 13 | if ($_SERVER["REQUEST_METHOD"] == "POST") |
14 | 14 | { |
15 | 15 | if (isset ($_POST["Set_Disable_authentication"])) |
16 | - {$disable_authentication = $_POST["Set_Disable_authentication"];} |
|
16 | + {$disable_authentication = $_POST["Set_Disable_authentication"]; } |
|
17 | 17 | else |
18 | - {$disable_authentication = "False";} |
|
18 | + {$disable_authentication = "False"; } |
|
19 | 19 | |
20 | 20 | if (isset ($_POST["Set_Username"])) |
21 | - {$username = $_POST["Set_Username"];} |
|
21 | + {$username = $_POST["Set_Username"]; } |
|
22 | 22 | else |
23 | - {$username = "";} |
|
23 | + {$username = ""; } |
|
24 | 24 | |
25 | 25 | $default_account = $_POST["Default_Account"]; |
26 | 26 | |
27 | 27 | if (isset ($_POST["Set_Disable_payee"])) |
28 | - {$disable_payee = $_POST["Set_Disable_payee"];} |
|
28 | + {$disable_payee = $_POST["Set_Disable_payee"]; } |
|
29 | 29 | else |
30 | - {$disable_payee = "False";} |
|
30 | + {$disable_payee = "False"; } |
|
31 | 31 | |
32 | 32 | if (isset ($_POST["Set_Disable_category"])) |
33 | - {$disable_category = $_POST["Set_Disable_category"];} |
|
33 | + {$disable_category = $_POST["Set_Disable_category"]; } |
|
34 | 34 | else |
35 | - {$disable_category = "False";} |
|
35 | + {$disable_category = "False"; } |
|
36 | 36 | |
37 | 37 | $guid = $_POST["Set_Guid"]; |
38 | 38 | |
39 | 39 | if (isset($_POST["Set_Password"]) && $_POST["Set_Password"] !== "" && $_POST["Set_Password"] !== Null) |
40 | - {$password = hash("sha512", $_POST["Set_Password"]);} |
|
40 | + {$password = hash("sha512", $_POST["Set_Password"]); } |
|
41 | 41 | else |
42 | 42 | { |
43 | 43 | if (isset ($_POST["Set_Disable_authentication"])) |
44 | - {$password = "";} |
|
44 | + {$password = ""; } |
|
45 | 45 | else |
46 | - {$password = costant::login_password();} |
|
46 | + {$password = costant::login_password(); } |
|
47 | 47 | } |
48 | 48 | |
49 | - $parameterarray = array |
|
50 | - ( |
|
49 | + $parameterarray = array( |
|
51 | 50 | "disable_authentication"=> $disable_authentication, |
52 | 51 | "user_username" => $username, |
53 | 52 | "user_password" => $password, |
@@ -95,7 +94,7 @@ discard block |
||
95 | 94 | <div class="container"> |
96 | 95 | <?php |
97 | 96 | if (isset($const_username) AND isset($const_password)) |
98 | - {echo "<h3 class='text_align_center'>Edit settings</h3>";} |
|
97 | + {echo "<h3 class='text_align_center'>Edit settings</h3>"; } |
|
99 | 98 | else |
100 | 99 | { |
101 | 100 | echo "<br />"; |
@@ -117,47 +116,47 @@ discard block |
||
117 | 116 | //SECTION AUTHENTICATION |
118 | 117 | design::section_legened("Authentication"); |
119 | 118 | if ($const_disable_authentication == True) |
120 | - {design::settings_checkbox("Set_Disable_authentication",True,"Disable authentication (Not recommended)");} |
|
119 | + {design::settings_checkbox("Set_Disable_authentication", True, "Disable authentication (Not recommended)"); } |
|
121 | 120 | else |
122 | - {design::settings_checkbox("Set_Disable_authentication",False,"Disable authentication (Not recommended)");} |
|
121 | + {design::settings_checkbox("Set_Disable_authentication", False, "Disable authentication (Not recommended)"); } |
|
123 | 122 | |
124 | 123 | if (isset($const_username) && $const_disable_authentication == False) |
125 | - {design::settings("Username",$const_username,"","Text",True);} |
|
124 | + {design::settings("Username", $const_username, "", "Text", True); } |
|
126 | 125 | else |
127 | - {design::settings("Username","","Insert a new username","Text",True);} |
|
126 | + {design::settings("Username", "", "Insert a new username", "Text", True); } |
|
128 | 127 | |
129 | 128 | if (isset($const_password) && $const_disable_authentication == False) |
130 | - {design::settings_password("Password","To change insert a new password",False);} |
|
129 | + {design::settings_password("Password", "To change insert a new password", False); } |
|
131 | 130 | else |
132 | - {design::settings_password("Password","Insert a password",True);} |
|
131 | + {design::settings_password("Password", "Insert a password", True); } |
|
133 | 132 | |
134 | - design::settings_password("Confirm_Password","Confirm new password",False); |
|
133 | + design::settings_password("Confirm_Password", "Confirm new password", False); |
|
135 | 134 | echo "<br />"; |
136 | 135 | |
137 | 136 | //SECTION NEW TRANSACTIONS |
138 | 137 | design::section_legened("New transactions"); |
139 | 138 | if ($const_disable_payee == True) |
140 | - {design::settings_checkbox("Set_Disable_payee",True,"Disable payees management");} |
|
139 | + {design::settings_checkbox("Set_Disable_payee", True, "Disable payees management"); } |
|
141 | 140 | else |
142 | - {design::settings_checkbox("Set_Disable_payee",False,"Disable payees management");} |
|
141 | + {design::settings_checkbox("Set_Disable_payee", False, "Disable payees management"); } |
|
143 | 142 | |
144 | 143 | if ($const_disable_category == True) |
145 | - {design::settings_checkbox("Set_Disable_category",True,"Disable categories management");} |
|
144 | + {design::settings_checkbox("Set_Disable_category", True, "Disable categories management"); } |
|
146 | 145 | else |
147 | - {design::settings_checkbox("Set_Disable_category",False,"Disable categories management");} |
|
146 | + {design::settings_checkbox("Set_Disable_category", False, "Disable categories management"); } |
|
148 | 147 | |
149 | 148 | if (isset($const_defaultaccountname)) |
150 | - {design::settings_default_account($const_defaultaccountname);} |
|
149 | + {design::settings_default_account($const_defaultaccountname); } |
|
151 | 150 | else |
152 | - {design::settings_default_account("None");} |
|
151 | + {design::settings_default_account("None"); } |
|
153 | 152 | echo "<br />"; |
154 | 153 | |
155 | 154 | //SECTION DESKTOP INTEGRATION |
156 | 155 | design::section_legened("Desktop integration"); |
157 | 156 | if (isset($const_desktop_guid)) |
158 | - {design::settings("Guid",$const_desktop_guid,"","Text",True);} |
|
157 | + {design::settings("Guid", $const_desktop_guid, "", "Text", True); } |
|
159 | 158 | else |
160 | - {design::settings("Guid",security::generate_guid(),"","Text",True);} |
|
159 | + {design::settings("Guid", security::generate_guid(), "", "Text", True); } |
|
161 | 160 | |
162 | 161 | ?> |
163 | 162 | <script type="text/javascript"> |
@@ -13,36 +13,30 @@ discard block |
||
13 | 13 | if ($_SERVER["REQUEST_METHOD"] == "POST") |
14 | 14 | { |
15 | 15 | if (isset ($_POST["Set_Disable_authentication"])) |
16 | - {$disable_authentication = $_POST["Set_Disable_authentication"];} |
|
17 | - else |
|
16 | + {$disable_authentication = $_POST["Set_Disable_authentication"];} else |
|
18 | 17 | {$disable_authentication = "False";} |
19 | 18 | |
20 | 19 | if (isset ($_POST["Set_Username"])) |
21 | - {$username = $_POST["Set_Username"];} |
|
22 | - else |
|
20 | + {$username = $_POST["Set_Username"];} else |
|
23 | 21 | {$username = "";} |
24 | 22 | |
25 | 23 | $default_account = $_POST["Default_Account"]; |
26 | 24 | |
27 | 25 | if (isset ($_POST["Set_Disable_payee"])) |
28 | - {$disable_payee = $_POST["Set_Disable_payee"];} |
|
29 | - else |
|
26 | + {$disable_payee = $_POST["Set_Disable_payee"];} else |
|
30 | 27 | {$disable_payee = "False";} |
31 | 28 | |
32 | 29 | if (isset ($_POST["Set_Disable_category"])) |
33 | - {$disable_category = $_POST["Set_Disable_category"];} |
|
34 | - else |
|
30 | + {$disable_category = $_POST["Set_Disable_category"];} else |
|
35 | 31 | {$disable_category = "False";} |
36 | 32 | |
37 | 33 | $guid = $_POST["Set_Guid"]; |
38 | 34 | |
39 | 35 | if (isset($_POST["Set_Password"]) && $_POST["Set_Password"] !== "" && $_POST["Set_Password"] !== Null) |
40 | - {$password = hash("sha512", $_POST["Set_Password"]);} |
|
41 | - else |
|
36 | + {$password = hash("sha512", $_POST["Set_Password"]);} else |
|
42 | 37 | { |
43 | 38 | if (isset ($_POST["Set_Disable_authentication"])) |
44 | - {$password = "";} |
|
45 | - else |
|
39 | + {$password = "";} else |
|
46 | 40 | {$password = costant::login_password();} |
47 | 41 | } |
48 | 42 | |
@@ -61,8 +55,7 @@ discard block |
||
61 | 55 | { |
62 | 56 | various::update_configuration_file($parameterarray); |
63 | 57 | header("Location: landing.php"); |
64 | - } |
|
65 | - else |
|
58 | + } else |
|
66 | 59 | { |
67 | 60 | various::update_configuration_file($parameterarray); |
68 | 61 | header("Location: guide.php"); |
@@ -95,8 +88,7 @@ discard block |
||
95 | 88 | <div class="container"> |
96 | 89 | <?php |
97 | 90 | if (isset($const_username) AND isset($const_password)) |
98 | - {echo "<h3 class='text_align_center'>Edit settings</h3>";} |
|
99 | - else |
|
91 | + {echo "<h3 class='text_align_center'>Edit settings</h3>";} else |
|
100 | 92 | { |
101 | 93 | echo "<br />"; |
102 | 94 | echo "<p style='text-align:center'><img src='res\mmex.png' alt='Money Manager EX Logo' height='150' width='150' /></p>"; |
@@ -117,18 +109,15 @@ discard block |
||
117 | 109 | //SECTION AUTHENTICATION |
118 | 110 | design::section_legened("Authentication"); |
119 | 111 | if ($const_disable_authentication == True) |
120 | - {design::settings_checkbox("Set_Disable_authentication",True,"Disable authentication (Not recommended)");} |
|
121 | - else |
|
112 | + {design::settings_checkbox("Set_Disable_authentication",True,"Disable authentication (Not recommended)");} else |
|
122 | 113 | {design::settings_checkbox("Set_Disable_authentication",False,"Disable authentication (Not recommended)");} |
123 | 114 | |
124 | 115 | if (isset($const_username) && $const_disable_authentication == False) |
125 | - {design::settings("Username",$const_username,"","Text",True);} |
|
126 | - else |
|
116 | + {design::settings("Username",$const_username,"","Text",True);} else |
|
127 | 117 | {design::settings("Username","","Insert a new username","Text",True);} |
128 | 118 | |
129 | 119 | if (isset($const_password) && $const_disable_authentication == False) |
130 | - {design::settings_password("Password","To change insert a new password",False);} |
|
131 | - else |
|
120 | + {design::settings_password("Password","To change insert a new password",False);} else |
|
132 | 121 | {design::settings_password("Password","Insert a password",True);} |
133 | 122 | |
134 | 123 | design::settings_password("Confirm_Password","Confirm new password",False); |
@@ -137,26 +126,22 @@ discard block |
||
137 | 126 | //SECTION NEW TRANSACTIONS |
138 | 127 | design::section_legened("New transactions"); |
139 | 128 | if ($const_disable_payee == True) |
140 | - {design::settings_checkbox("Set_Disable_payee",True,"Disable payees management");} |
|
141 | - else |
|
129 | + {design::settings_checkbox("Set_Disable_payee",True,"Disable payees management");} else |
|
142 | 130 | {design::settings_checkbox("Set_Disable_payee",False,"Disable payees management");} |
143 | 131 | |
144 | 132 | if ($const_disable_category == True) |
145 | - {design::settings_checkbox("Set_Disable_category",True,"Disable categories management");} |
|
146 | - else |
|
133 | + {design::settings_checkbox("Set_Disable_category",True,"Disable categories management");} else |
|
147 | 134 | {design::settings_checkbox("Set_Disable_category",False,"Disable categories management");} |
148 | 135 | |
149 | 136 | if (isset($const_defaultaccountname)) |
150 | - {design::settings_default_account($const_defaultaccountname);} |
|
151 | - else |
|
137 | + {design::settings_default_account($const_defaultaccountname);} else |
|
152 | 138 | {design::settings_default_account("None");} |
153 | 139 | echo "<br />"; |
154 | 140 | |
155 | 141 | //SECTION DESKTOP INTEGRATION |
156 | 142 | design::section_legened("Desktop integration"); |
157 | 143 | if (isset($const_desktop_guid)) |
158 | - {design::settings("Guid",$const_desktop_guid,"","Text",True);} |
|
159 | - else |
|
144 | + {design::settings("Guid",$const_desktop_guid,"","Text",True);} else |
|
160 | 145 | {design::settings("Guid",security::generate_guid(),"","Text",True);} |
161 | 146 | |
162 | 147 | ?> |
@@ -193,8 +178,7 @@ discard block |
||
193 | 178 | echo ("<button type='button' id='EditSettings' name='EditSettings' class='btn btn-lg btn-success btn-block' onclick='check_password_match_and_submit(\"Set_Password\",\"Set_Confirm_Password\",\"login\")'>Edit Settings</button>"); |
194 | 179 | echo "<br />"; |
195 | 180 | echo ("<a href='landing.php' class='btn btn-lg btn-success btn-block'>Return to menu</a>"); |
196 | - } |
|
197 | - else |
|
181 | + } else |
|
198 | 182 | { |
199 | 183 | echo ("<button type='button' id='EditSettings' name='EditSettings' class='btn btn-lg btn-success btn-block' onclick='check_password_match_and_submit(\"Set_Password\",\"Set_Confirm_Password\",\"login\")'>Apply Settings</button>"); |
200 | 184 | } |
@@ -148,7 +148,7 @@ |
||
148 | 148 | echo "<h3 class='text_align_center'>No transaction inserted</h3>"; |
149 | 149 | echo "<br />"; |
150 | 150 | echo "<br />"; |
151 | - echo "<a href='new_transaction.php' class='btn btn-lg btn-success btn-block'>Insert new</a>"; |
|
151 | + echo "<a href='new_transaction.php' class='btn btn-lg btn-success btn-block'>Insert new</a>"; |
|
152 | 152 | echo "<br />"; |
153 | 153 | echo "<a href='landing.php' class='btn btn-lg btn-success btn-block'>Return to menu</a>"; |
154 | 154 | echo "<br />"; |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | <?php |
32 | 32 | |
33 | 33 | $recordmaxid = db_function::transaction_select_maxid(); |
34 | -if ($recordmaxid > 0 ) |
|
34 | +if ($recordmaxid > 0) |
|
35 | 35 | { |
36 | 36 | $resultarray = db_function::transaction_select_all_order_by_date(); |
37 | 37 | echo "<div class='container'>"; |
@@ -47,9 +47,9 @@ discard block |
||
47 | 47 | echo "<th>Type</th>"; |
48 | 48 | echo "<th>Account</th>"; |
49 | 49 | if (costant::disable_payee() == False) |
50 | - {echo "<th>Payee</th>";} |
|
50 | + {echo "<th>Payee</th>"; } |
|
51 | 51 | if (costant::disable_category() == False) |
52 | - {echo "<th>Category</th>";} |
|
52 | + {echo "<th>Category</th>"; } |
|
53 | 53 | echo "<th class = 'text_align_right'>Amount</th>"; |
54 | 54 | echo "<th class = 'text_align_center'>Notes</th>"; |
55 | 55 | echo "<th class = 'text_align_center'>Delete</th>"; |
@@ -68,42 +68,42 @@ discard block |
||
68 | 68 | |
69 | 69 | //DATE |
70 | 70 | $TrDateShow = $resultarray[$i]["Date"]; |
71 | - design::table_cell($TrDateShow,""); |
|
71 | + design::table_cell($TrDateShow, ""); |
|
72 | 72 | |
73 | 73 | //TYPE |
74 | 74 | $TrStatusShow = $resultarray[$i]["Status"]; |
75 | 75 | $TrTypeShow = $resultarray[$i]["Type"]; |
76 | 76 | $TrTypeShowFormatted = $TrTypeShow; |
77 | - design::table_cell("${TrStatusShow} - ${TrTypeShowFormatted}",""); |
|
77 | + design::table_cell("${TrStatusShow} - ${TrTypeShowFormatted}", ""); |
|
78 | 78 | |
79 | 79 | //ACCOUNT |
80 | 80 | $TrAccountShow = $resultarray[$i]["Account"]; |
81 | 81 | $TrToAccountShow = $resultarray[$i]["ToAccount"]; |
82 | 82 | if ($TrTypeShow == "Transfer") |
83 | 83 | { |
84 | - design::table_cell("<span data-toggle='tooltip' title='Transfer to: ${TrToAccountShow}' id='tooltip_account_${lineid}'>${TrAccountShow}</span>",""); |
|
84 | + design::table_cell("<span data-toggle='tooltip' title='Transfer to: ${TrToAccountShow}' id='tooltip_account_${lineid}'>${TrAccountShow}</span>", ""); |
|
85 | 85 | } |
86 | 86 | else |
87 | - {design::table_cell($TrAccountShow,"");} |
|
87 | + {design::table_cell($TrAccountShow, ""); } |
|
88 | 88 | |
89 | 89 | //PAYEE |
90 | 90 | $TrPayeeShow = $resultarray[$i]["Payee"]; |
91 | 91 | if (costant::disable_payee() == False) |
92 | - {design::table_cell($TrPayeeShow,"");} |
|
92 | + {design::table_cell($TrPayeeShow, ""); } |
|
93 | 93 | |
94 | 94 | //CATEGORY |
95 | 95 | $TrCategoryShow = $resultarray[$i]["Category"]; |
96 | 96 | $TrSubCategoryShow = $resultarray[$i]["SubCategory"]; |
97 | 97 | if (costant::disable_category() == False && $TrSubCategoryShow != "None") |
98 | 98 | { |
99 | - design::table_cell("<span data-toggle='tooltip' title='Subcategory: ${TrSubCategoryShow}' id='tooltip_category_${lineid}'>${TrCategoryShow}*</span>",""); |
|
99 | + design::table_cell("<span data-toggle='tooltip' title='Subcategory: ${TrSubCategoryShow}' id='tooltip_category_${lineid}'>${TrCategoryShow}*</span>", ""); |
|
100 | 100 | } |
101 | 101 | else if (costant::disable_category() == False) |
102 | - {design::table_cell($TrCategoryShow,"");} |
|
102 | + {design::table_cell($TrCategoryShow, ""); } |
|
103 | 103 | |
104 | 104 | //AMOUNT |
105 | - $TrAmountShow = number_format($resultarray[$i]["Amount"],2,",",""); |
|
106 | - design::table_cell($TrAmountShow,"text_align_right td_size_5"); |
|
105 | + $TrAmountShow = number_format($resultarray[$i]["Amount"], 2, ",", ""); |
|
106 | + design::table_cell($TrAmountShow, "text_align_right td_size_5"); |
|
107 | 107 | |
108 | 108 | //NOTES |
109 | 109 | $TrNotesShow = $resultarray[$i]["Notes"]; |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | $NotesHTMLCode .= "<span class='glyphicon glyphicon-info-sign' data-toggle='tooltip' title='${TrNotesShow}' id='tooltip_notes_${lineid}'></span> "; |
113 | 113 | if (attachments::get_number_of_attachments($lineid) > 0) |
114 | 114 | $NotesHTMLCode .= "<span class='glyphicon glyphicon-paperclip'></span>"; |
115 | - design::table_cell($NotesHTMLCode,"text_align_center"); |
|
115 | + design::table_cell($NotesHTMLCode, "text_align_center"); |
|
116 | 116 | |
117 | 117 | //DELETE |
118 | 118 | echo "<td class ='text_align_center'>"; |
@@ -108,10 +108,12 @@ |
||
108 | 108 | //NOTES |
109 | 109 | $TrNotesShow = $resultarray[$i]["Notes"]; |
110 | 110 | $NotesHTMLCode = ""; |
111 | - if ($TrNotesShow != "" && $TrNotesShow != "None") |
|
112 | - $NotesHTMLCode .= "<span class='glyphicon glyphicon-info-sign' data-toggle='tooltip' title='${TrNotesShow}' id='tooltip_notes_${lineid}'></span> "; |
|
113 | - if (attachments::get_number_of_attachments($lineid) > 0) |
|
114 | - $NotesHTMLCode .= "<span class='glyphicon glyphicon-paperclip'></span>"; |
|
111 | + if ($TrNotesShow != "" && $TrNotesShow != "None") { |
|
112 | + $NotesHTMLCode .= "<span class='glyphicon glyphicon-info-sign' data-toggle='tooltip' title='${TrNotesShow}' id='tooltip_notes_${lineid}'></span> "; |
|
113 | + } |
|
114 | + if (attachments::get_number_of_attachments($lineid) > 0) { |
|
115 | + $NotesHTMLCode .= "<span class='glyphicon glyphicon-paperclip'></span>"; |
|
116 | + } |
|
115 | 117 | design::table_cell($NotesHTMLCode,"text_align_center"); |
116 | 118 | |
117 | 119 | //DELETE |