Редакция 502 | К новейшей редакции | Весь файл | Не учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS
Редакция 502 | Редакция 504 | ||
---|---|---|---|
Строка 147... | Строка 147... | ||
147 | while ($rq->fetchInto($element)) { |
147 | while ($rq->fetchInto($element)) { |
148 | $show .= ',{value:"'.$this->secure->checkInt($element["dist_id"]).'",text:"'.$this->secure->checkStr($element["distname"],1).'"}'; |
148 | $show .= ',{value:"'.$this->secure->checkInt($element["dist_id"]).'",text:"'.$this->secure->checkStr($element["distname"],1).'"}'; |
149 | }
|
149 | }
|
150 | $show .= ']'; |
150 | $show .= ']'; |
151 | break; |
151 | break; |
- | 152 | case 'innerhtml': |
|
- | 153 | $show = "<select id='".$name."' name='".$name."'>\n"; |
|
- | 154 | while ($rq->fetchInto($element)) { |
|
- | 155 | $show .= "<option value='".$this->secure->checkInt($element["dist_id"])."'>".$this->secure->checkStr($element["distname"],1)."</option>\n"; |
|
- | 156 | }
|
|
- | 157 | $show .= "</select>"; |
|
- | 158 | break; |
|
152 | }
|
159 | }
|
153 | return $show; |
160 | return $show; |
154 | }
|
161 | }
|
155 | 162 | ||
156 | /**
|
163 | /**
|
Строка 520... | Строка 527... | ||
520 | }
|
527 | }
|
521 | 528 | ||
522 | return $result; |
529 | return $result; |
523 | }
|
530 | }
|
524 | 531 | ||
- | 532 | /**
|
|
- | 533 | * Показ формы редактирования версии дистрибутива или его списка
|
|
- | 534 | *
|
|
- | 535 | * @author Alexander Wolf
|
|
- | 536 | * @category Core
|
|
- | 537 | *
|
|
- | 538 | * @param string $name
|
|
- | 539 | * @param string $actor
|
|
- | 540 | * @param integer $versionID
|
|
- | 541 | * @return string
|
|
- | 542 | */
|
|
525 | public function showDistVerstionsEditor($name, $actor, $versionID = 0) { |
543 | public function showDistVersionsEditor($name, $actor, $versionID = 0) { |
526 | if ($versionID == 0) { |
544 | if ($versionID == 0) { |
527 | $query = "SELECT * FROM ".$this->prefix."version v JOIN ".$this->prefix."distribution d ON v.dist_id=d.dist_id ORDER BY d.dist_id,v.version ASC"; |
545 | $query = "SELECT * FROM ".$this->prefix."version v JOIN ".$this->prefix."distribution d ON v.dist_id=d.dist_id ORDER BY d.dist_id,v.version ASC"; |
528 | $rq =& $this->db->query($query); |
546 | $rq =& $this->db->query($query); |
529 | $show = "<ul>\n"; |
547 | $show = "<ul>\n"; |
530 | while ($rq->fetchInto($element)) { |
548 | while ($rq->fetchInto($element)) { |
Строка 546... | Строка 564... | ||
546 | $show .= "<div class='inputbox'><input type='submit' value=' Править '></div></fieldset></form>\n"; |
564 | $show .= "<div class='inputbox'><input type='submit' value=' Править '></div></fieldset></form>\n"; |
547 | }
|
565 | }
|
548 | return $show; |
566 | return $show; |
549 | }
|
567 | }
|
550 | 568 | ||
- | 569 | public function showDistVersionsForm($name, $actor, $versionID = 0) { |
|
- | 570 | $show = "<form action='".$actor."' method='post'>"; |
|
- | 571 | if ($versionID == 0) { |
|
- | 572 | $show .= "<fieldset><legend>Добавить описание новой версии дистрибутива</legend>\n"; |
|
- | 573 | $show .= "<input type='hidden' name='mode' value='".$name."-add'>\n"; |
|
- | 574 | $show .= "<div class='inputbox'><label for='distname'>Дистрибутив:</label> ".$this->showDistributionList("distname", "", "", "innerhtml") ."</div>\n"; |
|
- | 575 | $show .= "<div class='inputbox'><label for='vname'>Название версии:</label> <input type='text' name='vname' value=''></div>\n"; |
|
- | 576 | $show .= "<div class='inputbox'><label for='version'>Номер версии:</label> <input type='text' name='version' value=''></div>\n"; |
|
- | 577 | $show .= "<div class='inputbox'><label for='vcodename'>Кодовое имя версии:</label> <input type='text' name='vcodename' value=''></div>\n"; |
|
- | 578 | $show .= "<div class='inputbox'><input type='submit' value=' Добавить '></div></fieldset>\n"; |
|
- | 579 | } else { |
|
- | 580 | $show .= "<fieldset><legend>Удалить описание существующей версии дистрибутива</legend>\n"; |
|
- | 581 | $show .= "<input type='hidden' name='mode' value='".$name."-delete'>\n"; |
|
- | 582 | $show .= "<input type='hidden' name='".$name."ID' value='".$versionID."'>\n"; |
|
- | 583 | $show .= "<div class='inputbox'><label for='distname'>Дистрибутив:</label> <input type='text' name='distname' value='".$this->secure->checkStr($element["distname"],1)."' readonly='readonly'></div>\n"; |
|
- | 584 | $show .= "<div class='inputbox'><label for='vname'>Название версии:</label> <input type='text' name='vname' value='".$this->secure->checkStr($element["vname"],1)."' readonly='readonly'></div>\n"; |
|
- | 585 | $show .= "<div class='inputbox'><label for='version'>Номер версии:</label> <input type='text' name='version' value='".$this->secure->checkStr($element["version"],1)."' readonly='readonly'></div>\n"; |
|
- | 586 | $show .= "<div class='inputbox'><label for='vcodename'>Кодовое имя версии:</label> <input type='text' name='vcodename' value='".$this->secure->checkStr($element["vcodename"],1)."' readonly='readonly'></div>\n"; |
|
- | 587 | $show .= "<div class='inputbox'><input type='submit' value=' Удалить '></div></fieldset>\n"; |
|
- | 588 | }
|
|
- | 589 | $show .= "</form>"; |
|
- | 590 | ||
- | 591 | return $show; |
|
- | 592 | }
|
|
- | 593 | ||
551 | }
|
594 | }
|
552 | 595 | ||
553 | ?>
|
596 | ?>
|
554 | 597 |