Редакция 654 | Весь файл | Учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS
Редакция 654 | Редакция 655 | ||
---|---|---|---|
Строка 643... | Строка 643... | ||
643 | $query .= ")"; |
643 | $query .= ")"; |
644 | $rq =& $this->db->query($query); |
644 | $rq =& $this->db->query($query); |
645 | while ($rq->fetchInto($sections)) { |
645 | while ($rq->fetchInto($sections)) { |
646 | $show .= $sections["secname"]." "; |
646 | $show .= $sections["secname"]." "; |
647 | }
|
647 | }
|
- | 648 | $show .= "\n\n"; |
|
- | 649 | ||
- | 650 | // Репозитории обновлений
|
|
- | 651 | $query = "SELECT * FROM ".$this->prefix."repository r "; |
|
- | 652 | $query .= "JOIN ".$this->prefix."protos p ON r.proto_id=p.proto_id "; |
|
- | 653 | $query .= "JOIN ".$this->prefix."rephost h ON r.rhost_id=h.rhost_id "; |
|
- | 654 | $query .= "JOIN ".$this->prefix."repfolder f ON r.rfolder_id=f.rfolder_id "; |
|
- | 655 | $query .= "JOIN ".$this->prefix."version v ON r.version=v.version_id "; |
|
- | 656 | $query .= "JOIN ".$this->prefix."rtype t ON r.rtype_id=t.rtype_id "; |
|
- | 657 | $query .= "JOIN ".$this->prefix."repscheme s ON r.scheme_id=s.scheme_id "; |
|
- | 658 | $query .= "WHERE v.version_id='".$data["version_id"]."' AND r.rtype_id='2'"; |
|
- | 659 | $rq =& $this->db->query($query); |
|
- | 660 | while ($rq->fetchInto($updates)) { |
|
- | 661 | // Формируем type proto://host/folder
|
|
- | 662 | $show .= "# ".$this->secure->checkStr($updates["rtype"],1)."\n"; |
|
- | 663 | $show .= $this->secure->checkStr($dist["type"],1)." ".$this->secure->checkStr($updates["proto"],1).$this->secure->checkStr($updates["rhost"],1).$this->secure->checkStr($updates["rfolder"],1); |
|
- | 664 | $dvname = str_replace("{DIST}",$this->secure->checkStr($dist["vcodename"],1),$this->secure->checkStr($updates["scheme"],1)); |
|
- | 665 | // Формируем distname
|
|
- | 666 | $show .= " ".$dvname." "; |
|
- | 667 | // Формируем sections
|
|
- | 668 | $query = "SELECT * FROM ".$this->prefix."section s "; |
|
- | 669 | $query .= "JOIN ".$this->prefix."sect2rep r ON s.sect_id=r.sect_id "; |
|
- | 670 | $query .= "WHERE r.rep_id='".$base["rep_id"]."' AND ("; |
|
- | 671 | for($i=0;$i<count($data["section"]);$i++) { |
|
- | 672 | $query .= "s.sect_id='".$data["section"][$i]."' "; |
|
- | 673 | if ($i<count($data["section"])-1) { |
|
- | 674 | $query .= " OR "; |
|
- | 675 | }
|
|
- | 676 | }
|
|
- | 677 | $query .= ")"; |
|
- | 678 | $rq =& $this->db->query($query); |
|
- | 679 | while ($rq->fetchInto($sections)) { |
|
- | 680 | $show .= $sections["secname"]." "; |
|
- | 681 | }
|
|
- | 682 | $show .= "\n"; |
|
- | 683 | }
|
|
648 | $show .= "\n"; |
684 | $show .= "\n"; |
649 | 685 | ||
650 | }
|
686 | }
|
651 | 687 | ||
652 | return $show; |
688 | return $show; |