Esempio n. 1
0
$t = $frm->TextArea(10, $ypos += 20, 380, 60, $client_change_history["about_old"]);
//10
$t->linkName = "about";
/******************** before edit end ********************/
/******************** after edit start ********************/
$frm = $GUI->Form("Данные о клиенте после изменений", 400, $h);
$frm->VLine(10, $h - 80, 380);
$b = $frm->Button("Назад", 155, $h - 60, 100);
$b->Event = "document.location.href=\"?section=kln&subsection=2&kln_id=" . $_REQUEST['kln_id'] . "&action=history_table\"";
$ypos = 10;
$frm->Label("Имя", 10, $ypos);
$t = $frm->Text(10, $ypos += 20, 380, $client_change_history["fio_new"]);
//1
$t->linkName = "fio";
$frm->Label("Филиал", 10, $ypos += 30);
$t = $frm->Text(10, $ypos += 20, 380, get_filial_name($client_change_history["filial_id_new"]));
//1
$t->linkName = "filial_id";
if ($client_change_history['hpwd_old'] == $client_change_history['hpwd_new']) {
    $after_edit_pass = $before_edit_pass;
} else {
    $after_edit_pass = '******';
}
$frm->Label("Пароль", 10, $ypos += 30);
$t = $frm->Text(10, $ypos += 20, 380, $after_edit_pass);
//1
$t->linkName = "hpwd";
$frm->Label("Почта", 10, $ypos += 30);
$t = $frm->Text(10, $ypos += 20, 180, $client_change_history["email_new"]);
//4
$t->linkName = "email";
Esempio n. 2
0
    $i++;
}
$tbl->FilterMYSQL($result_filter);
$totals = db::get_arrays("\n  SELECT filial_id, SUM(`value`) as total_expenses\n  FROM " . TBL_PREF . $Filter->DstTable . "\n  WHERE " . $result_filter . "\n  GROUP BY filial_id\n");
if ($totals) {
    $stat_tbl = $GUI->Table("expenses_stat" . $n);
    $stat_tbl->Width = "50%";
    $column = $stat_tbl->NewColumn();
    $column->Caption = "Филиал";
    $column->Key = "id";
    $column = $stat_tbl->NewColumn();
    $column->Caption = "Общий расход";
    $column->Key = "total_expenses";
    if (is_director($_SESSION['user']['data']['id'])) {
        $column = $stat_tbl->NewColumn();
        $column->Caption = "Итого расход руководителя";
        $column->Key = "director_expenses";
    }
    foreach ($totals as $row) {
        $res = array();
        if ($row['filial_id'] == 0) {
            $res['id'] = 'Руководитель';
            $res['director_expenses'] = '';
        } else {
            $res['id'] = get_filial_name($row['filial_id']);
            $res['director_expenses'] = $row['total_expenses'] * (1 - db::get_single_value("SELECT consumption FROM " . TBL_PREF . "data_filials WHERE id = " . $row['filial_id']));
        }
        $res['total_expenses'] = $row['total_expenses'];
        $stat_tbl->AddRow($res);
    }
}