Location: PHPKode > projects > NOLA > glacctadd.php
<? include('includes/main.php'); ?>
<? include('includes/glfunctions.php'); ?>
<? //GLACCTADD.PHP
	if ($accounttypeid) {
		if ($accounttypeid==40) $companyid=0; // retained earnings type ALWAYS applies to all companies
		$recordSet = &$conn->Execute('select id,description from accounttype where id='.$accounttypeid);
        if ($recordSet&&!$recordSet->EOF) echo texttitle("Account Type: ".$recordSet->fields[0]." - ".$recordSet->fields[1]);
		if ($name) { //add account
			glaccountadd($name, $companyid, $description, $accounttypeid, $summaryaccountid);
		} else { //ask for more info
			echo '<form action="glacctadd.php" method="post" name="mainform"><input type="hidden" name="accounttypeid" value="'.$accounttypeid.'"><input type="hidden" name="nonprintable" value="1"><table>';
			formglaccountadd($accounttypeid);
			echo '</table><br><br><input type="submit" value="Add"></form>';
		};
	} else { //select which account type 
		echo texttitle('Account Add');
		echo '<form action="glacctadd.php" method="post"><table>';
		formglaccounttypeselect('accounttypeid');
		echo '</table><input type="submit" value="Continue"></form>';
	};
?>
<? include('includes/footer.php'); ?>
Return current item: NOLA