623,32 → 623,34 |
$query .= "JOIN ".$this->prefix."repscheme s ON r.scheme_id=s.scheme_id "; |
$query .= "WHERE v.version_id='".$data["version_id"]."' AND r.rtype_id='1'"; |
$rq =& $this->db->query($query); |
$rq->fetchInto($base); |
// Формируем type proto://host/folder |
$show .= "# ".$this->secure->checkStr($base["repinfo"],1)."\n"; |
if ($base["repkey"]!="") { |
$show .= "# Установка ключа: ".$this->secure->checkStr($base["repkey"],1)."\n"; |
if ($rq->numRows()>0) { |
$rq->fetchInto($base); |
// Формируем type proto://host/folder |
$show .= "# ".$this->secure->checkStr($base["repinfo"],1)."\n"; |
if ($base["repkey"]!="") { |
$show .= "# Установка ключа: ".$this->secure->checkStr($base["repkey"],1)."\n"; |
} |
$show .= $this->secure->checkStr($dist["type"],1)." ".$this->secure->checkStr($base["proto"],1).$this->secure->checkStr($base["rhost"],1).$this->secure->checkStr($base["rfolder"],1); |
$dvname = str_replace("{DIST}",$this->secure->checkStr($dist["vcodename"],1),$this->secure->checkStr($base["scheme"],1)); |
// Формируем distname |
$show .= " ".$dvname." "; |
// Формируем sections |
$query = "SELECT * FROM ".$this->prefix."section s "; |
$query .= "JOIN ".$this->prefix."sect2rep r ON s.sect_id=r.sect_id "; |
$query .= "WHERE r.rep_id='".$base["rep_id"]."' AND ("; |
for($i=0;$i<count($data["section"]);$i++) { |
$query .= "s.sect_id='".$data["section"][$i]."' "; |
if ($i<count($data["section"])-1) { |
$query .= " OR "; |
} |
} |
$query .= ")"; |
$rq =& $this->db->query($query); |
while ($rq->fetchInto($sections)) { |
$show .= $sections["secname"]." "; |
} |
$show .= "\n\n"; |
} |
$show .= $this->secure->checkStr($dist["type"],1)." ".$this->secure->checkStr($base["proto"],1).$this->secure->checkStr($base["rhost"],1).$this->secure->checkStr($base["rfolder"],1); |
$dvname = str_replace("{DIST}",$this->secure->checkStr($dist["vcodename"],1),$this->secure->checkStr($base["scheme"],1)); |
// Формируем distname |
$show .= " ".$dvname." "; |
// Формируем sections |
$query = "SELECT * FROM ".$this->prefix."section s "; |
$query .= "JOIN ".$this->prefix."sect2rep r ON s.sect_id=r.sect_id "; |
$query .= "WHERE r.rep_id='".$base["rep_id"]."' AND ("; |
for($i=0;$i<count($data["section"]);$i++) { |
$query .= "s.sect_id='".$data["section"][$i]."' "; |
if ($i<count($data["section"])-1) { |
$query .= " OR "; |
} |
} |
$query .= ")"; |
$rq =& $this->db->query($query); |
while ($rq->fetchInto($sections)) { |
$show .= $sections["secname"]." "; |
} |
$show .= "\n\n"; |
|
// Репозитории обновлений и третьих лиц |
$query = "SELECT * FROM ".$this->prefix."repository r "; |
667,27 → 669,29 |
} |
$query .= ") ORDER BY r.rtype_id ASC"; |
$req =& $this->db->query($query); |
while ($req->fetchInto($updates)) { |
// Формируем type proto://host/folder |
$show .= "# ".$this->secure->checkStr($updates["repinfo"],1)."\n"; |
if ($updates["repkey"]!="") { |
$show .= "# Установка ключа: ".$this->secure->checkStr($updates["repkey"],1)."\n"; |
if ($req->numRows()>0) { |
while ($req->fetchInto($updates)) { |
// Формируем type proto://host/folder |
$show .= "# ".$this->secure->checkStr($updates["repinfo"],1)."\n"; |
if ($updates["repkey"]!="") { |
$show .= "# Установка ключа: ".$this->secure->checkStr($updates["repkey"],1)."\n"; |
} |
$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); |
$dvname = str_replace("{DIST}",$this->secure->checkStr($dist["vcodename"],1),$this->secure->checkStr($updates["scheme"],1)); |
// Формируем distname |
$show .= " ".$dvname." "; |
// Формируем sections |
$query = "SELECT * FROM ".$this->prefix."section s "; |
$query .= "JOIN ".$this->prefix."sect2rep r ON s.sect_id=r.sect_id "; |
$query .= "WHERE r.rep_id='".$updates["rep_id"]."'"; |
$rq =& $this->db->query($query); |
while ($rq->fetchInto($sections)) { |
$show .= $sections["secname"]." "; |
} |
$show .= "\n\n"; |
} |
$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); |
$dvname = str_replace("{DIST}",$this->secure->checkStr($dist["vcodename"],1),$this->secure->checkStr($updates["scheme"],1)); |
// Формируем distname |
$show .= " ".$dvname." "; |
// Формируем sections |
$query = "SELECT * FROM ".$this->prefix."section s "; |
$query .= "JOIN ".$this->prefix."sect2rep r ON s.sect_id=r.sect_id "; |
$query .= "WHERE r.rep_id='".$updates["rep_id"]."'"; |
$rq =& $this->db->query($query); |
while ($rq->fetchInto($sections)) { |
$show .= $sections["secname"]." "; |
} |
$show .= "\n\n"; |
$show .= "\n"; |
} |
$show .= "\n"; |
} else { |
// Базовый репозиторий |
$query = "SELECT * FROM ".$this->prefix."repository r "; |
699,35 → 703,37 |
$query .= "JOIN ".$this->prefix."repscheme s ON r.scheme_id=s.scheme_id "; |
$query .= "WHERE v.version_id='".$data["version_id"]."' AND r.rtype_id='1'"; |
$rq =& $this->db->query($query); |
$rq->fetchInto($base); |
// Формируем type proto://host/folder |
$show .= "# ".$this->secure->checkStr($base["repinfo"],1)."\n"; |
$show .= $this->secure->checkStr($dist["type"],1)." "; |
if ($base["sign_id"]!=0) { |
$query = "SELECT * FROM ".$this->prefix."signs WHERE sign_id='".$base["sign_id"]."'"; |
$rq =& $this->db->query($query); |
$rq->fetchInto($sign); |
$show .= "[".$this->secure->checkStr($sign["sname"],1)."] "; |
} |
$show .= $this->secure->checkStr($base["proto"],1).$this->secure->checkStr($base["rhost"],1).$this->secure->checkStr($base["rfolder"],1)." "; |
$show .= $this->secure->checkStr($base["scheme"],1)." "; |
if ($rq->numRows()>0) { |
$rq->fetchInto($base); |
// Формируем type proto://host/folder |
$show .= "# ".$this->secure->checkStr($base["repinfo"],1)."\n"; |
$show .= $this->secure->checkStr($dist["type"],1)." "; |
if ($base["sign_id"]!=0) { |
$query = "SELECT * FROM ".$this->prefix."signs WHERE sign_id='".$base["sign_id"]."'"; |
$rq =& $this->db->query($query); |
$rq->fetchInto($sign); |
$show .= "[".$this->secure->checkStr($sign["sname"],1)."] "; |
} |
$show .= $this->secure->checkStr($base["proto"],1).$this->secure->checkStr($base["rhost"],1).$this->secure->checkStr($base["rfolder"],1)." "; |
$show .= $this->secure->checkStr($base["scheme"],1)." "; |
|
// Формируем sections |
$query = "SELECT * FROM ".$this->prefix."section s "; |
$query .= "JOIN ".$this->prefix."sect2rep r ON s.sect_id=r.sect_id "; |
$query .= "WHERE r.rep_id='".$base["rep_id"]."' AND ("; |
for($i=0;$i<count($data["section"]);$i++) { |
$query .= "s.sect_id='".$data["section"][$i]."' "; |
if ($i<count($data["section"])-1) { |
$query .= " OR "; |
} |
// Формируем sections |
$query = "SELECT * FROM ".$this->prefix."section s "; |
$query .= "JOIN ".$this->prefix."sect2rep r ON s.sect_id=r.sect_id "; |
$query .= "WHERE r.rep_id='".$base["rep_id"]."' AND ("; |
for($i=0;$i<count($data["section"]);$i++) { |
$query .= "s.sect_id='".$data["section"][$i]."' "; |
if ($i<count($data["section"])-1) { |
$query .= " OR "; |
} |
} |
$query .= ")"; |
$rq =& $this->db->query($query); |
while ($rq->fetchInto($sections)) { |
$show .= $sections["secname"]." "; |
} |
$show .= "\n\n"; |
} |
$query .= ")"; |
$rq =& $this->db->query($query); |
while ($rq->fetchInto($sections)) { |
$show .= $sections["secname"]." "; |
} |
$show .= "\n\n"; |
|
// Репозитории обновлений и третьих лиц |
$query = "SELECT * FROM ".$this->prefix."repository r "; |
746,29 → 752,31 |
} |
$query .= ") ORDER BY r.rtype_id ASC"; |
$req =& $this->db->query($query); |
while ($req->fetchInto($updates)) { |
// Формируем type proto://host/folder |
$show .= "# ".$this->secure->checkStr($updates["repinfo"],1)."\n"; |
$show .= $this->secure->checkStr($dist["type"],1)." "; |
if ($updates["sign_id"]!=0) { |
$query = "SELECT * FROM ".$this->prefix."signs WHERE sign_id='".$base["sign_id"]."'"; |
$rqs =& $this->db->query($query); |
$rqs->fetchInto($sign); |
$show .= "[".$this->secure->checkStr($sign["sname"],1)."] "; |
if ($req->numRows()>0) { |
while ($req->fetchInto($updates)) { |
// Формируем type proto://host/folder |
$show .= "# ".$this->secure->checkStr($updates["repinfo"],1)."\n"; |
$show .= $this->secure->checkStr($dist["type"],1)." "; |
if ($updates["sign_id"]!=0) { |
$query = "SELECT * FROM ".$this->prefix."signs WHERE sign_id='".$base["sign_id"]."'"; |
$rqs =& $this->db->query($query); |
$rqs->fetchInto($sign); |
$show .= "[".$this->secure->checkStr($sign["sname"],1)."] "; |
} |
$show .= $this->secure->checkStr($updates["proto"],1).$this->secure->checkStr($updates["rhost"],1).$this->secure->checkStr($updates["rfolder"],1)." "; |
$show .= $this->secure->checkStr($updates["scheme"],1)." "; |
// Формируем sections |
$query = "SELECT * FROM ".$this->prefix."section s "; |
$query .= "JOIN ".$this->prefix."sect2rep r ON s.sect_id=r.sect_id "; |
$query .= "WHERE r.rep_id='".$updates["rep_id"]."'"; |
$rq =& $this->db->query($query); |
while ($rq->fetchInto($sections)) { |
$show .= $sections["secname"]." "; |
} |
$show .= "\n\n"; |
} |
$show .= $this->secure->checkStr($updates["proto"],1).$this->secure->checkStr($updates["rhost"],1).$this->secure->checkStr($updates["rfolder"],1)." "; |
$show .= $this->secure->checkStr($updates["scheme"],1)." "; |
// Формируем sections |
$query = "SELECT * FROM ".$this->prefix."section s "; |
$query .= "JOIN ".$this->prefix."sect2rep r ON s.sect_id=r.sect_id "; |
$query .= "WHERE r.rep_id='".$updates["rep_id"]."'"; |
$rq =& $this->db->query($query); |
while ($rq->fetchInto($sections)) { |
$show .= $sections["secname"]." "; |
} |
$show .= "\n\n"; |
$show .= "\n"; |
} |
$show .= "\n"; |
} |
|
$HTTPHeader1 = "Content-length: ".strlen($show); |