Esempio n. 1
0
}
$body = '';
$start = $_POST['start_date'];
$start = strtotime($start);
$end = $_POST['end_date'];
$end = strtotime($end);
$result = query("SELECT * FROM account LEFT JOIN acct_type ON account.acct_type = acct_type.id");
$i = 0;
while ($row = mysql_fetch_array($result)) {
    $date = $row['d_opened'];
    $time = strtotime($date);
    if ($time >= $start && $time <= $end) {
        ++$i;
        $member_id = $row['emp_id'];
        $name = get_teller_name($member_id);
        $acct_no = $row['acct_no'];
        $acct_type = $row['name'];
        $monthly = $row['save_amt'];
        $amt_todate = $row['amt_todate'];
        $date = $row['d_opened'];
        $balance = $row['balance'];
        $body .= "<tbody>\n     <tr>\n     <td>{$i};</td>\n     <td>{$name};</td>\n     <td><a href=index.php?page=../dep_witd&id={$acct_no}>{$acct_no}</a></td>\n     <td>{$acct_type}</td>\n     <td>{$monthly}</td>\n     <td>{$amt_todate}</td>\n     <td>{$balance}</td>\n     <td>{$date}</td>\n\n     </tr>\n   </tbody>";
    }
}
$thrift = no_accounts($start, $end)[1];
$special = no_accounts($start, $end)[2];
$total = $thrift + $special;
$top = "\n<div class=box>\n<div class=box-body no-padding>\n<table class=table>\n  <thead>\n  <tr>\n\n    <td>\n      <strong><h4>ACCOUNT MONTHLY REPORT</h4></strong>\n    </td>\n  </tr>\n  </thead>\n  <tr>\n    <th>\n      Total Number Thrift\n    </th>\n    <td>{$thrift}</td>\n  </tr>\n  <tr>\n    <th>\n      Total Number Special\n    </th>\n    <td>{$special}</td>\n  </tr>\n  <tr>\n    <th>\n      Total Number of Accounts Opened\n    </th>\n    <td>{$total}</td>\n  </tr>\n</table>\n</div>\n</div>\n</div>\n<div class=box>\n  <div class=box-body>\n    <div class=box-header with-border>\n      <h3 class=box-title>Account Summary</h3>\n    </div>\n<table class=table>\n  <thead>\n    <tr>\n    <th>S/N</th>\n    <th>MEMBER NAME</th>\n    <th>ACCT NO</th>\n    <th>ACCT TYPE</th>\n    <th>MNTLY SAVINGS</th>\n    <th>AMT TODATE</th>\n    <th>BALANCE</th>\n    <th>DATE OPENED</th>\n    </tr>\n    </thead>\n";
$end = "</tbody></table></div>";
$htm = $top . $body . $end;
echo $htm;
Esempio n. 2
0
  </thead>
  <tr>
    <th>
      Total Number Thrift
    </th>
    <td><?php 
echo no_accounts()[1];
?>
</td>
  </tr>
  <tr>
    <th>
      Total Number Special
    </th>
    <td><?php 
echo no_accounts()[2];
?>
</td>
  </tr>
  <tr>
    <th>
      Total Number of Accounts Opened
    </th>
    <td><?php 
echo thrift_special_mnt(2)[2] + thrift_special_mnt(1)[2];
?>
</td>
  </tr>


</table>