30,10 → 30,28 |
$ID = $_GET["id"]; |
if(isset($ID)){ |
list($mirror,$dist,$vers,$repstring) = split(",",$ID); |
if(isset($repstring)){ |
if(!empty($mirror)){$status=1;}; |
if(!empty($dist)){$status=2;}; |
if(!empty($vers)){$status=3;}; |
if(!empty($repstring)){ |
$status=4; |
$reps = split("-",$repstring); |
}; |
}elseif(!empty($mirror)){ |
$location="./classic.php?id=".$mirror; |
if(!empty($dist)){$location.=",".$dist;} |
if(!empty($vers)){$location.=",".$vers;} |
if(!empty($reps)){ |
for ($i=0;$i<count($reps);$i++) { |
$shortreps .= $reps[$i]; |
if ($i<count($reps)-1) { |
$shortreps .= "-"; |
} |
} |
$location.=",".$shortreps; |
} |
header("Location: ".$location); |
exit; |
} |
$infomsg = array( _("Step"), _("Next step"), _("Mirror selection"), _("Choosing a distribution"), _("Choosing a version of distribution"), _("Selection of repositories"), _("Get sources.list") ); |
|
92,24 → 110,18 |
$result = "<p>"._("Copy this strings into file")." <span id='sourceslist'>/etc/apt/sources.list</span>:</p><pre>"; |
$result .= $core->getSourceList($dist,$vers,$reps,$db); |
$result .= "</pre>"; |
for ($i=0;$i<count($reps);$i++) { |
$getreps .= $reps[$i]; |
if ($i<count($reps)-1) { |
$getreps .= "-"; |
} |
} |
$result = $info.$result."<p><a href='./get.php?id=".$dist.",".$vers.",".$getreps."'>".$infomsg[6]."</a></p>"; |
$result = $info.$result."<p><a href='./get.php?id=".$dist.",".$vers.",".$repstring."'>".$infomsg[6]."</a></p>"; |
|
$link="<div class='sllink'><a title='"._("Link to this sources.list")."' href=./classic.php?id=".$mirror.",".$dist.",".$vers.",".$getreps.">#</a></div>"; |
$link="<div class='sllink'><a title='"._("Link to this sources.list")."' href=./classic.php?id=".$mirror.",".$dist.",".$vers.",".$repstring.">#</a></div>"; |
break; |
} |
|
if ($status==3){$link='<div class="sllink"><a title="Ссылка на этот source.list" href=./classic.php?id='.$dist.",".$vers.",".$getreps.'>#</a></div>';} |
if ($status==3){$link='<div class="sllink"><a title="Ссылка на этот source.list" href=./classic.php?id='.$dist.",".$vers.",".$repstring.'>#</a></div>';} |
$steps="<a href='classic.php'>".$infomsg[0]." 0</a> ::"; |
if ($status>0){ $steps .= "<a href='classic.php?step=1&m=".$mirr."'> ".$infomsg[0]." 1</a> ::"; } else { $steps.=" ".$infomsg[0]." 1 ::"; } |
if ($status>1){ $steps .= "<a href='classic.php?step=2&m=".$mirr."&d=".$dist."'> ".$infomsg[0]." 2</a> ::"; } else{ $steps.=" ".$infomsg[0]." 2 ::"; } |
if ($status>2){ $steps .= "<a href='classic.php?step=3&m=".$mirr."&d=".$dist."&v=".$vers."'> ".$infomsg[0]." 3</a> ::"; } else { $steps.=" ".$infomsg[0]." 3 ::"; } |
if ($status>3){ $steps .= '<a href=./classic.php?id='.$mirror.','.$dist.','.$vers.','.$getreps.'>'.$infomsg[0].' 4</a>'; } else { $steps.=" ".$infomsg[0]." 4"; } |
if ($status>0){ $steps .= "<a href='classic.php?id=".$mirror."'> ".$infomsg[0]." 1</a> ::"; } else { $steps.=" ".$infomsg[0]." 1 ::"; } |
if ($status>1){ $steps .= "<a href='classic.php?id=".$mirror.",".$dist."'> ".$infomsg[0]." 2</a> ::"; } else{ $steps.=" ".$infomsg[0]." 2 ::"; } |
if ($status>2){ $steps .= "<a href='classic.php?id=".$mirror.",".$dist.",".$vers."'> ".$infomsg[0]." 3</a> ::"; } else { $steps.=" ".$infomsg[0]." 3 ::"; } |
if ($status>3){ $steps .= '<a href=./classic.php?id='.$mirror.','.$dist.','.$vers.','.$repstring.'>'.$infomsg[0].' 4</a>'; } else { $steps.=" ".$infomsg[0]." 4"; } |
|
$smarty->assign('feedaddr',$_SERVER["HTTP_HOST"].dirname($_SERVER["PHP_SELF"])); |
$smarty->assign('stepinfo',$infomsg[0]); |