コード例 #1
0
function GetAccountSection($res = '', $type)
{
    if ($type != 1) {
        //1 is Domestic Traffic
        if (!empty($res['id'])) {
            $account = GetCompanyAccount($res['id']);
            $data .= '
				<fieldset>
					<legend>ანგარიშწორება</legend>
			
					<table width="90%" class="dialog-form-table">
						<tr>
							<td style="width: 200px;"><label for="pay_method">ანგარიშსწორების ფორმა</label></td>
							<td style="width: 150px;"><label for="pay_nided">სულ გადასახდელი</label></td>
							<td style="width: 150px;"><label for="payed">გადახდილი</label></td>
							<td style="width: 300px;"><label for="pay_needed_date">დავალიანების გადახდის თარიღი</label></td>
						</tr>
						<tr>
							<td>
								<select id="pay_method" class="idls">' . PayMethod($account['pay_method']) . '</select>
							</td>
							<td>
								<input type="text" id="pay_nided" class="idle price" disabled="disabled" onblur="this.className=\'idle price\'" onfocus="this.className=\'activeField price\'" value="' . $res['full_amount'] . '" />
							</td>
							<td>
								<input type="text" id="payed" class="idle price" onblur="this.className=\'idle price\'" onfocus="this.className=\'activeField price\'" value="' . $account['payed'] . '" />
							</td>
							<td>
								<input type="text" id="pay_needed_date" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $account['pay_needed_date'] . '" />
							</td>
						</tr>
					</table>
				</fieldset>
				';
        }
    }
    return $data;
}
コード例 #2
0
            $finalprice = round($tprice / 30 * (30 - $tmpdate) + 0.5) + $tprice * ($term - 1);
        } else {
            $finalprice = $tprice * $term;
        }
    }
    return $finalprice;
}
function error()
{
    include "header.php";
    OpenTable();
    echo "<BR><div align=center><font color=FF0000><B>Error: Please Go Back and Complete All Required Fields!</B></font></div><BR>";
    CloseTable();
}
if ($_GET['action'] == 'PayMethod') {
    PayMethod();
} else {
    if (isset($_GET['sid'])) {
        if (isset($_POST['submit'])) {
            $iserror = '0';
            $sql = "SELECT id FROM " . $prefix . "_hosting_order_data WHERE pid = '" . $_GET['sid'] . "' AND required = '1' AND type = 'UserInput'";
            $result = $db->sql_query($sql);
            while ($row = $db->sql_fetchrow($result)) {
                if ($_POST['option' . $row['id']] == "") {
                    $iserror = '1';
                }
            }
            if ($iserror == '1') {
                error();
            } else {
                Pay();