<!DOCTYPE html> <?php include_once './class.php'; session_start(); if ($_SESSION['user'] === TRUE) { } else { header('location:login.php'); } $db = new accounts(); $insert_transection = new transection(); if ($_POST) { if ($_POST['tr_type'] === '0') { $db->credit_account($_POST['in_amount'], $_POST['in_ac_id']); $cat_id = $_POST['exp_cat_id']; } else { $db->debit_account($_POST['in_amount'], $_POST['in_ac_id']); $cat_id = 13; } $insert_transection->new_transection($_POST['in_date'], $_POST['tr_type'], $_POST['in_des'], $_POST['in_amount'], $cat_id, $_POST['in_ac_id']); } ?> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0"/> <title>Alpha</title> <!-- CSS --> <?php include_once './theme-part/top_head.php'; ?>
<?php include_once './class.php'; session_start(); if ($_SESSION['user'] === TRUE) { } else { header('location:login.php'); } $db = new accounts(); $insert_transection = new transection(); $transfer_records = new tranfer(); if ($_POST) { $transfer_records->new_transfer($_POST['tr_date'], $_POST['tr_amount'], $_POST['tr_des'], $_POST['tr_ac_id_from'], $_POST['tr_ac_id_to']); $insert_transection->new_transection($_POST['tr_date'], 1, $_POST['tr_des'], $_POST['tr_amount'], 15, $_POST['tr_ac_id_to']); $insert_transection->new_transection($_POST['tr_date'], 0, $_POST['tr_des'], $_POST['tr_amount'], 15, $_POST['tr_ac_id_from']); $db->credit_account($_POST['tr_amount'], $_POST['tr_ac_id_from']); $db->debit_account($_POST['tr_amount'], $_POST['tr_ac_id_to']); } ?> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0"/> <title>Alpha</title> <!-- CSS --> <?php include_once './theme-part/top_head.php'; ?> </head> <body> <?php