Location: PHPKode > projects > JACR - Just Another Checkbook Register > jacr_0.0.4/index.php
<?php
require_once 'jacr-platform/platform.inc.php';
$userId = new Users();

if (isset($_GET['tag'])){
		echo '[]';
	die;
	}
showHeader();
if (isset($_GET['a']) )
	$_GET['a'] = $_GET['a'];	
$Account = New Jacr_account;
if (!isset($_GET['a']) ){
  $accounts = $Account->sellectAccount();
  }
else {
	
	$Account->setAccount($_GET['a']);
	$Account->Transactions = new Jacr_transaction($_GET['a']);
	if(isset($_POST['id']) && isset($_POST['save']))
	{
		$updateValues = $_POST;
		$updateValues['amount'] = $_POST['deposit'] - $_POST['withdrawal'];
		$Account->Transactions->updateRecord($updateValues);
	}
	elseif(isset($_POST['id']) && isset($_POST['delete']))
	{
		$Account->Transactions->deleteRecord(Array('id' => $_POST['id']));
	}
	elseif(isset($_POST['addnew']))
	{
		$insertValues = $_POST;
		$insertValues['amount'] = $_POST['deposit'] - $_POST['withdrawal'];
		$Account->Transactions->insertRecord($insertValues);
	}
	if (isset($_GET['new']) )
	{
		$Account->Transactions->newTransaction();
	}
	elseif (isset($_GET['taggedID']) )
	{
		
		$Jacr_tags = new Tags($_GET['taggedID'], "transactions");
		$Jacr_tags->tagForm('a='.$_GET['a']);
		//$Account->Transactions->
	}
	else{
		$accounts = $Account->showAccount();
	}
	
}

showFooter();;

?>
Return current item: JACR - Just Another Checkbook Register