예제 #1
0
function list_setting($config)
{
    $initalMoney = get_setting($config, 'InitialMoney');
    $lastCheckTime = get_setting($config, 'LastCheckTime');
    ?>
<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['Value'];
    ?>
"/>
		</td>
	</tr>
	<tr>
		<td>Last check time</td>
		<td>
			<?php 
    showTimeBox("setting_lastchecktime", $lastCheckTime['Value']);
    ?>
		</td>
	</tr>
	<tr>
		<td>&nbsp;</td>
		<td><input type="submit" value="Save" /></td>
	</tr>
</table>
</form>
<?php 
}
예제 #2
0
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 
}
예제 #3
0
function show_filter_form($config)
{
    $filters = $_SESSION['filters'];
    ?>
<h4>Filter</h4>
<form action="detail.php" method="post">
<input type="hidden" name="action_type" value="filter"/>
<table width="600" border="0" cellspacing="0">
	<!-- CATEGORY -->
	<tr>		
		<td>
			<input type="checkbox" name="enable_filter[]" value="category"
				<?php 
    if (isset($filters['categories'])) {
        echo "checked='checked'";
    }
    ?>
			>Category</input>
		</td>
		<td>
			<?php 
    $category_list = get_category_list($config);
    foreach ($category_list as $cate) {
        echo "<input type='checkbox' name='category_filter[]' ";
        echo "value='" . $cate["Id"] . "' ";
        if (isset($filters['categories'])) {
            foreach ($filters['categories'] as $cate_filter) {
                if ($cate["Id"] == $cate_filter) {
                    echo "checked='checked'";
                    break;
                }
            }
        }
        echo "/>" . $cate["Name"] . " ";
    }
    ?>
		</td>
	</tr>
	
	<!-- DETAIL -->
	<tr>
		<td width="130">
			<input type="checkbox" name="enable_filter[]" value="detail"
				<?php 
    if (isset($filters['detail'])) {
        echo "checked='checked'";
    }
    ?>
			>Detail</input>
		</td>
		<td>
			<input type="text" name="detail_text"
				<?php 
    if (isset($filters['detail'])) {
        echo "value='" . $filters['detail'] . "'";
    }
    ?>
			/>
		</td>
	</tr>
	
	<!-- FROM DATE -->
	<tr>
		<td>
			<input type="checkbox" name="enable_filter[]" value="from_date"
				<?php 
    if (isset($filters['from_date'])) {
        echo "checked='checked'";
    }
    ?>
			>From date</input>
		</td>
		<td>
			<?php 
    if (isset($filters['from_date'])) {
        showTimeBox("filter_detail_from_date", $filters['from_date']);
    } else {
        showTimeBox("filter_detail_from_date", 0);
    }
    ?>
		</td>
	</tr>	
	
	<!-- TO DATE -->
	<tr>
		<td>
			<input type="checkbox" name="enable_filter[]" value="to_date"
				<?php 
    if (isset($filters['to_date'])) {
        echo "checked='checked'";
    }
    ?>
			>To date</input>
		</td>
		<td>
			<?php 
    if (isset($filters['to_date'])) {
        showTimeBox("filter_detail_to_date", $filters['to_date']);
    } else {
        showTimeBox("filter_detail_to_date", 0);
    }
    ?>
		</td>
	</tr>
	
	<!-- FROM AMOUNT -->
	<tr>
		<td>
			<input type="checkbox" name="enable_filter[]" value="from_amount"
				<?php 
    if (isset($filters['from_amount'])) {
        echo "checked='checked'";
    }
    ?>
			>From amount</input>
		</td>
		<td>
			<input type="text" name="amount_from_filter"
				<?php 
    if (isset($filters['from_amount'])) {
        echo "value='" . $filters['from_amount'] . "'";
    }
    ?>
			/>
		</td>
	</tr>
	
	<!-- TO AMOUNT -->
	<tr>
		<td>
			<input type="checkbox" name="enable_filter[]" value="to_amount"
				<?php 
    if (isset($filters['to_amount'])) {
        echo "checked='checked'";
    }
    ?>
			>To amount</input>
		</td>
		<td>
			<input type="text" name="amount_to_filter"
				<?php 
    if (isset($filters['to_amount'])) {
        echo "value='" . $filters['to_amount'] . "'";
    }
    ?>
			/>
		</td>
	</tr>
	
	<!-- DESCRIPTION -->
	<tr>
		<td>
			<input type="checkbox" name="enable_filter[]" value="description"
				<?php 
    if (isset($filters['description'])) {
        echo "checked='checked'";
    }
    ?>
			>Description</input>
		</td>
		<td>
			<input type="text" name="desc_text"
				<?php 
    if (isset($filters['description'])) {
        echo "value='" . $filters['description'] . "'";
    }
    ?>
			/>
		</td>
	</tr>
	<tr>
		<td>&nbsp;</td>
		<td>
			<input type="submit" value="Filter" />
		</td>
	</tr>
</table>
</form>
<?php 
}