예제 #1
0
파일: edit.php 프로젝트: yonkon/diplom
$frm->Label("Направление (факультет)", 10, $ypos);
$frm->Label("Дисциплина", 190, $ypos);
$ypos += 20;
$s = $frm->Select(10, $ypos, 160, array(0 => array("name" => "-выберите-")) + $data_napravl, "name", $order_info["napr_id"]);
//6
$s->linkName = "napr";
$t = $frm->Hidden(isset($data_discip[$order_info["disc_id"]]) ? $order_info["disc_id"] : $order_info["disc_user"]);
// 8
$t->linkName = "disc_usr";
$t->class = 'discipline_select2';
$disciplines = Discipline::findAll();
foreach ($disciplines as &$discipline) {
    $discipline['authors_qt'] = Disciplines::getAuthorsQt($discipline['id']);
}
unset($discipline);
page_AddScriptText('var disciplines = ' . json_encode($disciplines) . ';');
$ypos += 30;
$frm->Label("Тема работы", 10, $ypos);
$ypos += 20;
$t = $frm->TextArea(10, $ypos, 625, 60, $order_info["subject"]);
//9
$t->linkName = "subj";
$t->AddValidator(new CGUI_VALIDATOR_NOEMPTY());
$t->AddValidator(new CGUI_VALIDATOR_MAXLEN(512));
$ypos += 70;
$frm->Label("Дата сдачи", 10, $ypos);
$frm->Label("Практика", 110, $ypos);
$frm->Label("Число страниц", 230, $ypos);
$frm->Label("Число источников", 360, $ypos);
$ypos += 20;
$t = $frm->DatePic(10, $ypos, 80, $order_info['time_kln']);
예제 #2
0
파일: add.php 프로젝트: yonkon/diplom
     // При выборе запрашиваем сколько он должен и подставляем
     $selector_order = $s;
     $ypos += 20;
 } else {
     kln_search_modal();
     $frm->Label("Клиент", 10, $ypos);
     $s = $frm->Select(10, $ypos += 20, 500, array(0 => "-выберите-") + kln_getlist(), "", "");
     //0
     $s->linkName = "klient";
     $s->AddValidator(new CGUI_VALIDATOR_NOZERO());
     $s->AddJsEvent("change", "document.location.href='?section=vis&subsection=1&kln=' + jQuery('#" . $s->idname . "').val(); ");
     $b = $frm->Button("Найти", 520, $ypos - 2, 70);
     $b->Event = 'jQuery("#' . $GUI->Vars["kln_search_modal_form"]->idname . '").modal();';
     //$b = $frm->Button("Инфо", 520, $ypos-2, 70);
     //$b->Event = 'var id= jQuery("#'.$s->idname.'").val(); if(id!=0) window.open("?section=kln&subsection=4&edit="+id);';
     page_AddScriptText("custom_klient_select_event = function(id){ jQuery('#" . $s->idname . "').val(id); };");
     $ypos += 20;
 }
 $frm->VLine(10, $ypos += 20, 580);
 $frm->Label("Цель встречи:", 10, $ypos += 20);
 // get mat
 $t = $frm->TextArea(25, $ypos += 20, 560, 80, isset($_SESSION["make_visit_tmp"]["about"]) ? $_SESSION["make_visit_tmp"]["about"] : "");
 $t->AddValidator(new CGUI_VALIDATOR_NOEMPTY());
 $t->linkName = "about";
 $ypos += 80;
 $frm->Label("Деньги:", 10, $ypos += 20);
 $s = $frm->Select(20, $ypos += 20, 100, array(1 => "получить", -1 => "вернуть"), "", isset($_SESSION["make_visit_tmp"]["money_dir"]) ? $_SESSION["make_visit_tmp"]["money_dir"] : 1);
 $s->linkName = "money_dir";
 $frm->Label("сумма: ", 130, $ypos + 3);
 $t = $frm->Text(180, $ypos, 100, isset($_SESSION["make_visit_tmp"]["summa"]) ? $_SESSION["make_visit_tmp"]["summa"] : "");
 $t->linkName = "summa";
예제 #3
0
파일: gui_form.php 프로젝트: yonkon/diplom
 function GetHTML()
 {
     page_AddScriptText("var " . $this->idname . "_sel_row = -1;");
     $out = "";
     $out .= "<div class='cgui_form_text'  style='margin-left:" . $this->left . "px; margin-top: " . $this->top . "px; width:" . $this->width . "px'>" . "\n";
     $out .= parent::GetHTML() . "\n";
     $out .= "<input type='hidden' name='" . $this->name . "' id='" . $this->idname . "'>" . "\n";
     $out .= "<div class='cgui_form_gridbox' style='width: " . $this->width . "px; height: " . $this->height . "px'><table id='" . $this->idname . "_table' cellpadding=2 cellspacing=0>" . "\n";
     $ir = 0;
     foreach ($this->rows as $r) {
         $out .= "<tr id='" . $this->idname . "_" . $ir . "' onmouseover='jQuery(this).addClass(\"ovr\");' onmouseout='jQuery(this).removeClass(\"ovr\");' onclick='cgui_form_gridsel_click(\"" . $this->idname . "\", " . $ir . ", " . $this->idname . "_sel_row); " . $this->idname . "_sel_row = " . $ir . "'>" . "\n";
         $ic = 0;
         foreach ($this->cols as $c) {
             $w = "";
             if (@$c["width"]) {
                 $w = "width: " . $c["width"];
             }
             $out .= "<td style='" . $w . "' id='" . $this->idname . "_" . $ir . "_" . $ic . "'>" . $r[$c["key"]] . "</td>" . "\n";
             $ic++;
         }
         $out .= "</tr>" . "\n";
         $ir++;
     }
     $out .= "</table></div>" . "\n";
     $out .= "</div>" . "\n";
     return $out;
 }