Example #1
0
 static function GetAvailableMoney()
 {
     $initial_money = CSettingManager::GetSetting(CSettingManager::INITIAL_MONEY);
     $total_payment = self::GetTotalPayment();
     $total_receipt = self::GetTotalReceipt();
     return $initial_money - $total_payment + $total_receipt;
 }
Example #2
0
function show_setting_form()
{
    $initialMoney = CSettingManager::GetSetting(CSettingManager::INITIAL_MONEY);
    $lastCheckTime = CSettingManager::GetSetting(CSettingManager::LAST_CHECK_TIME);
    $settingForm = new SettingForm($initialMoney, $lastCheckTime);
    $settingForm->Show();
}
function list_setting()
{
    $initalMoney = CSettingManager::GetSetting(CSettingManager::INITIAL_MONEY);
    $lastCheckTime = CSettingManager::GetSetting(CSettingManager::LAST_CHECK_TIME);
    ?>
<form action="setting.php" method="post">
<input type="hidden" name="action_type" value="submit_edit"/>

<table border="0">
	<tr>
		<td>Initial money</td>
		<td>
			<input type="text" name="InitialMoney" 
				value="<?php 
    echo $initalMoney;
    ?>
"/>
		</td>
	</tr>
	<tr>
		<td>Last check time</td>
		<td>
			<?php 
    showTimeBox("setting_lastchecktime", $lastCheckTime);
    ?>
		</td>
	</tr>
	<tr>
		<td>&nbsp;</td>
		<td><input type="submit" value="Save" /></td>
	</tr>
</table>
</form>
<?php 
}