Редакция 198 | К новейшей редакции | Весь файл | Учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS
Редакция 198 | Редакция 201 | ||
---|---|---|---|
Строка 22... | Строка 22... | ||
22 | 22 | ||
23 | 23 | ||
24 | class Core { |
24 | class Core { |
25 | 25 | ||
26 | function getRepList($distro,$version,$dblink) { |
26 | function getRepList($distro,$version,$dblink) { |
- | 27 | // Fetch settings
|
|
27 | $query =& $dblink->query("SELECT * FROM settings"); |
28 | $query =& $dblink->query("SELECT * FROM settings"); |
28 | $settings = array(); |
29 | $settings = array(); |
29 | while ($query->fetchInto($setting, DB_FETCHMODE_ASSOC)) { |
30 | while ($query->fetchInto($setting, DB_FETCHMODE_ASSOC)) { |
30 | $settings[stripslashes($setting["opt"])] = stripslashes($setting["optvalue"]); |
31 | $settings[stripslashes($setting["opt"])] = stripslashes($setting["optvalue"]); |
31 | }; |
32 | }; |
- | 33 | // Fetch information about distribution
|
|
- | 34 | $query =& $dblink->query("SELECT * FROM version v JOIN distribution d ON d.dist_id=v.dist_id JOIN dtype p ON d.disttype=p.type_id WHERE v.dist_id='$distro' AND v.version_id='$version'"); |
|
- | 35 | $query->fetchInto($infodist, DB_FETCHMODE_ASSOC); |
|
- | 36 | // Fetch repos
|
|
32 | $repos=array_values($_GET); |
37 | $repos=array_values($_GET); |
33 | for ($i=3;$i<count($repos);$i++){ |
38 | for ($i=3;$i<count($repos);$i++){ |
34 | $pre=-1; //wtf? |
39 | $pre=-1; //wtf? |
35 | $id=(int)$repos[$i]; |
40 | $id=(int)$repos[$i]; |
36 | $sql =& $dblink->query('SELECT * FROM repository r JOIN ver2rep v ON r.rep_id=v.rep_id JOIN origin o ON o.orig_id=r.orig_id JOIN version v2 ON v.ver_id=v2.version_id JOIN scheme s ON s.scheme_id=r.scheme_id JOIN root r2 ON r2.root_id=r.root_id WHERE r.rep_id='.$id); |
41 | $sql =& $dblink->query("SELECT * FROM repository r JOIN ver2rep v ON r.rep_id=v.rep_id JOIN origin o ON o.orig_id=r.orig_id JOIN version v2 ON v.ver_id=v2.version_id JOIN scheme s ON s.scheme_id=r.scheme_id JOIN root r2 ON r2.root_id=r.root_id WHERE r.rep_id=".$id); |
37 | $sql->fetchInto($resinfo, DB_FETCHMODE_ASSOC); |
42 | $sql->fetchInto($resinfo, DB_FETCHMODE_ASSOC); |
38 | 43 | ||
39 | $repscheme = stripslashes($resinfo["scheme"]); |
44 | $repscheme = stripslashes($resinfo["scheme"]); |
40 | $querysect =& $dblink->query("SELECT * FROM section s JOIN sect2rep r ON s.sect_id=r.sect_id WHERE |
45 | $querysect =& $dblink->query("SELECT * FROM section s JOIN sect2rep r ON s.sect_id=r.sect_id WHERE r.rep_id='$resinfo[rep_id]'"); |
41 | r.rep_id='$resinfo[rep_id]'"); |
- | |
42 | $sections = ""; |
46 | $sections = ""; |
43 | while ($querysect->fetchInto($section,DB_FETCHMODE_ASSOC)) { |
47 | while ($querysect->fetchInto($section,DB_FETCHMODE_ASSOC)) { |
44 | $sections .= stripslashes($section["sectname"])." "; |
48 | $sections .= stripslashes($section["sectname"])." "; |
45 | }
|
49 | }
|
46 | $repscheme = str_replace("{TYPE}",stripslashes($infodist["type"]),$repscheme); |
50 | $repscheme = str_replace("{TYPE}",stripslashes($infodist["type"]),$repscheme); |