Esempio n. 1
0
function kln_search_modal()
{
    global $GUI, $kln_module_root, $kln_search_modal_form;
    $GUI->tmpls[] = $kln_module_root . "searchkln.tmpl.php";
    $frm = $GUI->ModalFormEx("Поиск клиента", 770, 400);
    $frm->Nosubmit = true;
    $GUI->Vars["kln_search_modal_form"] = $frm;
    $d = kln_getlist();
    $s = $frm->GridSelect(10, 50, 750, 270, array(array("cap" => "Номер", "key" => "id", "width" => "40px; min-width: 40px;"), array("cap" => "Имя", "key" => "fio", "width" => "200px; min-width: 200px;"), array("cap" => "Почта", "key" => "email", "width" => "200px; min-width: 200px;"), array("cap" => "Телефон", "key" => "telnum", "width" => '150px; min-width: 150px;'), array("cap" => "Партнерский код", "key" => "referrer_code", "width" => '100px; min-width: 100px;')), kln_getrawlist());
    $frm->Label("№", 10, 5);
    $t1 = $frm->Text(10, 25, 40);
    $frm->Label("Имя", 55, 5);
    $t2 = $frm->Text(55, 25, 200);
    $frm->Label("Почта", 260, 5);
    $t3 = $frm->Text(260, 25, 200);
    $frm->Label("Телефон", 465, 5);
    $t4 = $frm->Text(465, 25, 150);
    $frm->Label("Партнерский код", 620, 5);
    $t5 = $frm->Text(620, 25, 110);
    $t1->AddJsEvent("keyup", $s->idname . "_sel_row = update_klient_search_filter('" . $s->idname . "', " . $s->idname . "_sel_row, '" . $t1->idname . "', '" . $t2->idname . "', '" . $t3->idname . "', '" . $t4->idname . "', '" . $t5->idname . "'); ");
    $t2->AddJsEvent("keyup", $s->idname . "_sel_row = update_klient_search_filter('" . $s->idname . "', " . $s->idname . "_sel_row, '" . $t1->idname . "', '" . $t2->idname . "', '" . $t3->idname . "', '" . $t4->idname . "', '" . $t5->idname . "'); ");
    $t3->AddJsEvent("keyup", $s->idname . "_sel_row = update_klient_search_filter('" . $s->idname . "', " . $s->idname . "_sel_row, '" . $t1->idname . "', '" . $t2->idname . "', '" . $t3->idname . "', '" . $t4->idname . "', '" . $t5->idname . "'); ");
    $t4->AddJsEvent("keyup", $s->idname . "_sel_row = update_klient_search_filter('" . $s->idname . "', " . $s->idname . "_sel_row, '" . $t1->idname . "', '" . $t2->idname . "', '" . $t3->idname . "', '" . $t4->idname . "', '" . $t5->idname . "'); ");
    $t5->AddJsEvent("keyup", $s->idname . "_sel_row = update_klient_search_filter('" . $s->idname . "', " . $s->idname . "_sel_row, '" . $t1->idname . "', '" . $t2->idname . "', '" . $t3->idname . "', '" . $t4->idname . "', '" . $t5->idname . "'); ");
    $b = $frm->Button("Выбрать", 200, 340, 80);
    $b->Event = 'var sr= ' . $s->idname . '_sel_row; if (sr != -1) {jQuery.modal.close(); var x = jQuery("#' . $s->idname . '_"+sr+"_0").text(); custom_klient_select_event(x);}';
    $b = $frm->Button("Отмена", 320, 340, 80);
    $b->Event = 'jQuery.modal.close();';
}
Esempio n. 2
0
}
page_scriptNeed('instant_edit.js', '/js/');
page_scriptNeed('color_picker.js', '/js/');
page_scriptNeed('jquery.colorPicker.js', '/js/simpleColorPicker/');
page_styleNeed('colorPicker.css', '/js/simpleColorPicker/');
global $data_users, $data_filials, $data_vuz, $data_payments, $data_napravl, $data_worktypes, $data_discip;
//////////// Filters
$Filter = $GUI->FltrCol("ord", "data_users:conf_ordfltr");
$Filter->SrcTable = TABLE_ORDERS;
$Filter->DstTable = "orders_tmp_" . $_SESSION["user"]["data"]["id"];
// Добавляем фильтры
if (!is_author($_SESSION['user']['data']['id'])) {
    $f = $Filter->AddFilter("CGUI_FilterSelect");
    $f->name = "Клиент";
    $f->keyid = "klient_id";
    $f->SetSelectData(kln_getrawlist(), "fio");
    $flt_kln_id = $f->id;
}
$f = $Filter->AddFilter("CGUI_FilterSelect");
$f->name = "Филиал";
$f->keyid = "filial_id";
$f->SetSelectData($data_filials, "name");
if (!is_author($_SESSION['user']['data']['id'])) {
    $createdFilter = $Filter->AddFilter("CGUI_FilterDate");
    $createdFilter->name = "Принят";
    $createdFilter->keyid = "created";
    $f = $Filter->AddFilter("CGUI_FilterSelect");
    $f->name = "Принял";
    $f->keyid = "creator_id";
    $f->SetSelectData($data_users, "fio");
}
Esempio n. 3
0
 }
 $s = $frm->Select(10, $ypos += 20, 300, $data_users1);
 $s->RowSize = 5;
 $s->linkName = 'employers';
 $frm->Label("c", 330, $ypos);
 $t = $frm->DatePic(350, $ypos, 100);
 $t->linkName = 'date_from';
 $frm->Label("по", 330, $ypos += 25);
 $t = $frm->DatePic(350, $ypos, 100);
 $t->linkName = 'date_to';
 $frm->Label("Направление", 330, $ypos += 25);
 $s = $frm->Select(330, $ypos += 20, 100, array(0 => "все", 1 => "входящие", 2 => "исходящие"));
 $s->linkName = 'direction';
 // С клиентами
 $clients1 = array();
 $clients = kln_getrawlist();
 foreach ($clients as $v) {
     if (db::get_single_value("SELECT COUNT(id) FROM " . TABLE_MESSAGES . " WHERE (addr='k" . $v["id"] . "' AND creator_id='u" . $id . "') OR (addr='u" . $id . "' AND creator_id='k" . $v["id"] . "')")) {
         $clients1[$v["id"]] = $v['fio'];
     }
 }
 if (count($clients1) > 1) {
     $clients1 = array(0 => "-любым-") + $clients1;
 }
 $t = $frm->Checkbox(10, $ypos += 30, false, 1);
 $t->linkName = 'with_clients';
 $frm->Label("Переписка с клиентами:", 30, $ypos);
 $s = $frm->Select(10, $ypos += 20, 480, $clients1);
 $s->RowSize = 10;
 $s->linkName = 'clients';
 $frm->VLine(10, $ypos += 200, 480);