Example #1
0
function umonizeGh($inp)
{
    return perToEnNums(umonize($inp));
}
Example #2
0
function edit_item($id, $feild, $value)
{
    if ($feild == "id") {
        mysql_class::ex_sql("select * from `customer_daryaft` where `id` = {$id}", $q);
        if ($r = mysql_fetch_array($q)) {
            if ((int) $r["sanad_typ"] != -1) {
                echo "update `customer_daryaft` set `tozihat` = '{$value}' where `id` = {$id}";
                mysql_class::ex_sqlx("update `customer_daryaft` set `tozihat` = '{$value}' where `id` = {$id}");
            }
        }
    } else {
        if ($feild == "mablagh") {
            mysql_class::ex_sqlx("update `customer_daryaft` set `mablagh` = '" . umonize($value) . "' where `id` = {$id}");
        } else {
            mysql_class::ex_sqlx("update `customer_daryaft` set `{$feild}` = '{$value}' where `id` = {$id}");
        }
    }
}
                                        <td class="showgrid_row_td_reserve" readonly="readonly">{$poorsant}</td>
                                        <td class="showgrid_row_td_reserve" readonly="readonly">{$khal}</td>
                                </tr>
tmp1;
                }
                $radif = enToPerNums(perToEnNums($radif) + 1);
            }
        }
        if ($inf > 0) {
            $infants = <<<infa
\t\t\t\t<tr class="showgrid_row_even" >
\t\t\t\t\t<th colspan='8' class="showgrid_row_td_reserve_reserve" >نوزاد</th>
\t\t\t\t</tr>
infa;
            for ($i = 0; $i < $inf; $i++) {
                $khal = enToPerNums(monize(perToEnNums(umonize($inf_ghimat)) - perToEnNums(umonize($poorsant))));
                if ($ticket_type == 1) {
                    $infants .= <<<tmp2
\t\t\t\t<tr class="showgrid_row_odd">
\t\t\t\t\t<td class="showgrid_row_td_reserve" >{$radif}</td>
\t\t\t\t\t<td >نام و نام‌خانوادگی:</td>
\t\t\t\t\t<td  colspan='2'  class="showgrid_row_td_reserve" style='width:autp;text-align:right;' ><input type='text' name='inf_lname_{$i}' id='inf_lname_{$i}' class='inp'  style="width:400px;"/></td>
\t\t\t\t\t<td><select class='inp' name='inf_gender_{$i}' ><option value='1' >مذکر</option><option value='0' >مؤنث</option></select></td>
\t\t\t\t\t<td>جنسیت</td>
\t\t\t\t\t<td class="showgrid_row_td_reserve" >شماره تیکت</td>
                                        <td class="showgrid_row_td_reserve" ><input type='text' name='inf_shomare_{$i}' id='inf_shomare_{$i}' class='inp'  /></td>
\t\t\t\t\t<td class="showgrid_row_td_reserve" readonly="readonly">{$inf_ghimat}</td>
                                        <td class="showgrid_row_td_reserve" readonly="readonly">{$poorsant}</td>
                                        <td class="showgrid_row_td_reserve" readonly="readonly">{$khal}</td>
\t\t\t\t</tr>
tmp2;
Example #4
0
function edit_item($id, $feild, $value)
{
    $mysql = new mysql_class();
    if ($feild == "id") {
        $mysql->ex_sql("select * from `customer_daryaft` where `id` = {$id}", $q);
        if (isset($q[0])) {
            if ((int) $q[0]["sanad_typ"] != -1) {
                echo "update `customer_daryaft` set `tozihat` = '{$value}' where `id` = {$id}";
                $mysql->ex_sqlx("update `customer_daryaft` set `tozihat` = '{$value}' where `id` = {$id}");
            }
        }
    } else {
        if ($feild == "mablagh") {
            $mysql->ex_sqlx("update `customer_daryaft` set `mablagh` = '" . umonize($value) . "' where `id` = {$id}");
        } else {
            $mysql->ex_sqlx("update `customer_daryaft` set `{$feild}` = '{$value}' where `id` = {$id}");
        }
    }
}