Редакция 209 | Редакция 218 | К новейшей редакции | Весь файл | Учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS
Редакция 209 | Редакция 217 | ||
---|---|---|---|
Строка 23... | Строка 23... | ||
23 | 23 | ||
24 | require_once dirname(__FILE__)."/lib/init.php"; |
24 | require_once dirname(__FILE__)."/lib/init.php"; |
25 | $status = $secure->wrapInt($_GET["step"]); |
25 | $status = $secure->wrapInt($_GET["step"]); |
26 | $dist = $secure->wrapInt($_GET["d"]); |
26 | $dist = $secure->wrapInt($_GET["d"]); |
27 | $vers = $secure->wrapInt($_GET["v"]); |
27 | $vers = $secure->wrapInt($_GET["v"]); |
- | 28 | $reps = $_GET["r"]; |
|
28 | 29 | ||
29 | $query =& $db->query("SELECT * FROM distribution"); |
30 | $query =& $db->query("SELECT * FROM distribution"); |
30 | while ($query->fetchInto($data, DB_FETCHMODE_ASSOC)) { |
31 | while ($query->fetchInto($data, DB_FETCHMODE_ASSOC)) { |
31 | $linux .= "<p><input type='radio' name='d' value='".$data["dist_id"]."'><span class='".$secure->stripStr($data["distua"])."'>".$secure->stripStr($data["distname"])."</span></p>\n"; |
32 | $linux .= "<p><input type='radio' name='d' value='".$data["dist_id"]."'><span class='".$secure->stripStr($data["distua"])."'>".$secure->stripStr($data["distname"])."</span></p>\n"; |
32 | }
|
33 | }
|
Строка 46... | Строка 47... | ||
46 | }
|
47 | }
|
47 | }
|
48 | }
|
48 | 49 | ||
49 | if ($status==2) |
50 | if ($status==2) |
50 | {
|
51 | {
|
- | 52 | $repos = ""; |
|
51 | $repos=$core->getAddsRepList($dist,$vers,$db); |
53 | $repoz=$core->getRepList($dist,$vers,$db); |
- | 54 | for($i=0;$i<count($repoz[0]);$i++) { |
|
- | 55 | $repos.="<input type='hidden' name='d' value='".$dist."'><input type='hidden' name='v' value='".$vers."'>"; |
|
- | 56 | if ($resinfo["defaultrep"]==true){$ch="checked";} else{$ch="";} |
|
- | 57 | $repos.="<input type='checkbox' name='r[]' ".$ch." value='".$repoz[0][$i]."'>".$repoz[1][$i]." <em>(".$repoz[2][$i].")</em><br>"; |
|
- | 58 | }; |
|
52 | }
|
59 | }
|
53 | 60 | ||
54 | if ($status==3) { |
61 | if ($status==3) { |
55 | $query =& $db->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='$dist' AND v.version_id='$vers'"); |
62 | $query =& $db->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='$dist' AND v.version_id='$vers'"); |
56 | $query->fetchInto($infodist, DB_FETCHMODE_ASSOC); |
63 | $query->fetchInto($infodist, DB_FETCHMODE_ASSOC); |
57 | 64 | ||
58 | $distname = ""; |
65 | $distname = ""; |
59 | if ($infodist["vname"]!="") { |
66 | if ($infodist["vname"]!="") { |
60 | $distname = "“".$secure->stripStr($infodist["vname"])."”"; |
67 | $distname = "“".$secure->stripStr($infodist["vname"])."”"; |
61 | }
|
68 | }
|
62 | $info = "<h2>Доступные репозитории для <em class='".$secure->stripStr($infodist["distua"])."-em'>".$secure->stripStr($infodist["distname"])." ".$secure->stripStr($infodist["version"])." ".$distname."</em></h2>"; |
69 | $info = "<h2>Репозитории для <em class='".$secure->stripStr($infodist["distua"])."-em'>".$secure->stripStr($infodist["distname"])." ".$secure->stripStr($infodist["version"])." ".$distname."</em></h2>"; |
63 | $result = "<p>Скопируйте эти строки в файл <span id='sourceslist'>/etc/apt/sources.list</span>:</p><pre>"; |
70 | $result = "<p>Скопируйте эти строки в файл <span id='sourceslist'>/etc/apt/sources.list</span>:</p><pre>"; |
64 | $result .= $core->getRepList($dist,$vers,$db); |
71 | $result .= $core->getSourceList($dist,$vers,$reps,$db); |
65 | $result .= "</pre>"; |
72 | $result .= "</pre>"; |
66 | $result = $info.$result."<p><a href='./get.php?id=".$dist.",".$vers."'>Получить sources.list файлом</a></p>"; |
73 | $result = $info.$result."<p><a href='./get.php?id=".$dist.",".$vers."'>Получить sources.list файлом</a></p>"; |
67 | }
|
74 | }
|
68 | 75 | ||
69 | $smarty->assign('feedaddr',$_SERVER["HTTP_HOST"].dirname($_SERVER["PHP_SELF"])); |
76 | $smarty->assign('feedaddr',$_SERVER["HTTP_HOST"].dirname($_SERVER["PHP_SELF"])); |