# Income-Positions printRow(array("<div align=\"center\"><h2>INCOME</h2></div>"), "", "1,2"); foreach ($income_salary_elements_array_desc as $key => $value) { makeTextField("salary_field_" . $key, $edit_salary["{$key}"], "{$value}", 10, "onFocus=\"editIncomeField(this.value)\" onChange=\"changedIncomeField(this.value) \""); $income_sum += $edit_salary["{$key}"]; } makeStaticField("income_sum", $income_sum, "Income Sum:", "", 11); # Expense-Positions printRow(array("<div align=\"center\"><h2>EXPENSE</h2></div>"), "", "1,2"); foreach ($expense_salary_elements_array_desc as $key => $value) { makeTextField("salary_field_" . $key, $edit_salary["{$key}"], "{$value}", 10, "onFocus=\"editExpenseField(this.value)\" onChange=\"changedExpenseField(this.value) \""); $expense_sum += $edit_salary["{$key}"]; } makeStaticField("expense_sum", $expense_sum, "Expense Sum:", "", 11); printRow(array("<hr>"), "", "1,2"); makeStaticField("total_sum", $income_sum - $expense_sum, "Total Sum:", "", 14); makeSpecialSubmitter("submit", "onClick='this.form.submitnow.value=\"1\"'"); endPrettyTable(); closeForm(); ?> </td> </table> <?php } else { $personal_array = get_personal_array(); openForm("selectemployee", $PHP_SELF); beginPrettyTable("2", "select Employee"); makeDropBox("emp_id3", $personal_array, "Employer Name"); makeSubmitter(); endPrettyTable(); closeForm();
<?php $db = getDBConnection(); $employer_array = get_personal_array(); openForm("loan_form", $PHP_SELF, "onSubmit=\"return confirmSubmit()\""); beginPrettyTable("2", "enter {$loan_type} entry"); makeHiddenField("type", $type); makeDropBox("emp_id3", $employer_array, "Employers Name"); startRow(); makePlainTextField("loan_dt", "", "Loan Santion Dt.", 10); makePlainTextField("loan_start", "", "Deduction Start Dt.", 10, "onChange=\"checkdate(this.value) && updateFields()\""); endRow(); startRow(); makePlainTextField("inst_no", "", "Instalment No", 6, "onChange=\"updateFields()\""); makePlainStaticField("loan_end", "", "Loan End Dt.", 10); endRow(); makeStaticField("interest_rate", "{$interest_rate}" . "%", "Interest Rate", 6); startRow(); makePlainTextField("loan_amt", "", "Loan Amount", 10, "onChange=\"updateFields()\""); makePlainStaticField("int_amt", "", "Total Interest", 10); endRow(); startRow(); makePlainStaticField("int_rate", "", "Inst Amount", 10); makePlainStaticField("tot_amt", "", "Total Amount", 10); endRow(); makeSubmitter(); endPrettyTable(); closeForm(); # the table above has to be closed echo "</td> </table>"; } endDocument();
beginPrettyTable("2", $customer_thing); if ($customer_row["Company"] != "") { makeStaticField($lCompany, $customer_row["Company"]); } makeStaticField($lAddress, $customer_row["Address"]); # Silly little hack to add a second line to a info display, I haven't # had to do this anywhere but here, so I wront write a function for it echo "<tr><td> </td><td><div class='data'>{$second_address}</div></td></tr>\n"; makeStaticField($lPhone, $customer_row["Telephone"]); if (strlen($customer_row["Fax"]) >= 5) { makeStaticField($lFax, $customer_row["Fax"]); } if (strlen($customer_row["CCNumber"]) >= 16) { makeStaticField($lCCNumber, $customer_row["CCNumber"]); } makeStaticField($lEmail, "<a href=\"mailto:" . $customer_row["Email"] . "\" class='mailto'>" . $customer_row["Email"] . "</a>"); endPrettyTable(); echo " </td>\n"; echo " <td> </td>\n"; echo " <td valign=top>\n"; $affectedcount = mysql_num_rows($account_result); beginPrettyTable("7", "{$affectedcount} {$lAccounts}"); beginBorderedTable("7"); if ($account_row) { echo " <tr>\n"; echo " <td><b> {$lID} </b></td> <td><b>{$lDescription}</b></td> <td><b>{$lStatus}</b></td> <td><b>{$lCharged}</b></td><td><b>{$lMonthsRunning}</b></td><td><b>{$lTotalPrice}</b></td><td><b>{$lActions}</b></td>\n"; echo " </tr>\n"; do { if ($class == "odd") { $class = "even"; } else {