Редакция 496 | К новейшей редакции | Весь файл | Не учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS
Редакция 496 | Редакция 497 | ||
---|---|---|---|
Строка 520... | Строка 520... | ||
520 | }
|
520 | }
|
521 | 521 | ||
522 | return $result; |
522 | return $result; |
523 | }
|
523 | }
|
524 | 524 | ||
525 | public function showDistVerstionsEditor($name, $actor, $list = 1) { |
525 | public function showDistVerstionsEditor($name, $actor, $versionID = 0) { |
526 | if ($list == 1) { |
526 | 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"; |
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"; |
528 | $rq =& $this->db->query($query); |
528 | $rq =& $this->db->query($query); |
529 | $show = "<ul>\n"; |
529 | $show = "<ul>\n"; |
530 | while ($rq->fetchInto($element)) { |
530 | while ($rq->fetchInto($element)) { |
531 | $show .= "<li>[<a href='".$actor."?mode=versions&action=edit&uuid=".$this->secure->checkInt($element["version_id"])."'>править</a>][<a href='".$actor."?mode=versions&action=delete&uuid=".$this->secure->checkInt($element["version_id"])."'>удалить</a>] ".$this->secure->checkStr($element["distname"],1)." ".$this->secure->checkStr($element["version"],1)." “<em>".$this->secure->checkStr($element["vname"],1)."</em>”</li>\n"; |
531 | $show .= "<li>[<a href='".$actor."?mode=versions&action=edit&uuid=".$this->secure->checkInt($element["version_id"])."'>править</a>][<a href='".$actor."?mode=versions&action=delete&uuid=".$this->secure->checkInt($element["version_id"])."'>удалить</a>] ".$this->secure->checkStr($element["distname"],1)." ".$this->secure->checkStr($element["version"],1)." “<em>".$this->secure->checkStr($element["vname"],1)."</em>”</li>\n"; |
532 | }
|
532 | }
|
533 | $show .= "</ul>"; |
533 | $show .= "</ul>"; |
534 | } else { |
534 | } else { |
- | 535 | $query = "SELECT * FROM ".$this->prefix."version v JOIN ".$this->prefix."distribution d ON v.dist_id=d.dist_id WHERE v.version_id='".$versionID."'"; |
|
- | 536 | $rq =& $this->db->query($query); |
|
- | 537 | $rq->fetchInto($element); |
|
- | 538 | $show = "<form action='".$actor."' method='post'>\n"; |
|
- | 539 | $show .= "<input type='hidden' name='mode' value='".$name."'>\n"; |
|
- | 540 | $show .= "<input type='text' name='vname' value='".$this->secure->checkStr($element["vname"],1)."'>\n"; |
|
535 | - | ||
- | 541 | $show .= "<input type='text' name='version' value='".$this->secure->checkStr($element["version"],1)."'>\n"; |
|
- | 542 | $show .= "<input type='text' name='vcodename' value='".$this->secure->checkStr($element["vcodename"],1)."'>\n"; |
|
- | 543 | $show .= "<input type='submit' value=' Править '></form>\n"; |
|
536 | }
|
544 | }
|
537 | return $show; |
545 | return $show; |
538 | }
|
546 | }
|
539 | 547 | ||
540 | }
|
548 | }
|