<?PHP 
$cssSort1="";$cssSort2="";$cssSort3="";$cssSort4="";$cssSort5="";$cssSort6="";
$fileAnz=$PdfSumX;

$fileprosite=$fileprositePDF;
$sitespointX=$sitespointXPDF;
@$sortDx=$_GET["sortDx"];
if($sortDx == ""){$sortDx=1;}else{$sortDx=$sortDx;}

$sitesAnz=$fileAnz / $fileprosite;
$sitesAnz=ceil($sitesAnz);

@$sitesXx=$_GET["site"];
if($sitesXx == ""){$sitesXx=1;}else{$sitesXx=$sitesXx;}

$sitespoint1start=$sitesXx - $sitespointX;
$sitespoint1end=$sitesXx - 1;
$sitespoint2start=$sitesXx + 1;
$sitespoint2end=$sitesXx + $sitespointX;

$sitecheckstart=$sitespointX + 1;
$sitecheckend=$sitesAnz - $sitespointX;

if($sitespoint1start <= 1){
$sitespoint1start=1;
}else{
$sitespoint1start=$sitespoint1start;
}

if($sitesAnz <= $sitespoint2end){
$sitespoint2end=$sitesAnz;
}else{
$sitespoint2end=$sitespoint2end;
}

$NoXstartAnz=$fileprosite - 1;
$NoXstart=($sitesXx * $fileprosite) - $NoXstartAnz;
$NoXendAnz=$sitesXx * $fileprosite;
if($NoXendAnz >= $fileAnz){
$NoXend=$fileAnz;
}else{
$NoXend=$NoXendAnz;
}

if($sortDx == 1){
$cssSort1="condsitenav2b";
$navtext2z="$navtext2a $navtext2y";
}else
if($sortDx == 2){
$cssSort2="condsitenav2b";
$navtext2z="$navtext2b $navtext2y";
}else
if($sortDx == 3){
$cssSort3="condsitenav2b";
$navtext2z="$navtext2c $navtext2y";
}else
if($sortDx == 4){
$cssSort4="condsitenav2b";
$navtext2z="$navtext2d $navtext2y";
}else
if($sortDx == 5){
$cssSort5="condsitenav2b";
$navtext2z="$navtext2f $navtext2y";
}else
if($sortDx == 6){
$cssSort6="condsitenav2b";
$navtext2z="$navtext2e $navtext2y";
}else{
$cssSort3="condsitenav2a";
$navtext2z="$navtext2a $navtext2y";
}

$sorturl=$_SERVER["PHP_SELF"];

echo "
<div id='condT'>
<table class='wd100x'>
<tr>
<td>
<div class='cond1 padd-t2'>".$sitenavPdf." <b>".$NoXstart." - ".$NoXend."</b> [".$sitenavX." ".$fileAnz."]</div>

<div class='cond2x cond2z'>
<div class='cond2'>";include("./function/manage-pdf-nav-content.inc.php");echo "</div>
</div>
";

echo "
<div class='cond3 $cond3a'>
";
if($sitesXx <= $sitecheckstart){
}else{
echo "<span><a href='$sorturl?site=1&sortDx=$sortDx' class='condsitenav1a'>1</a></span>";
}

for($i=$sitespoint1start;$i <= $sitespoint1end;$i++)
{
if($i > $sitespoint1end)
{break;}
echo "<span><a href='$sorturl?site=$i&sortDx=$sortDx' class='condsitenav1a'>".$i."</a></span>";
}

echo "<span class='condsitenav1b'>".$sitesXx."</span>";

for ($i=$sitespoint2start;$i <= $sitespoint2end;$i++)
{
if($i > $sitespoint2end)
{break;}
echo "<span><a href='$sorturl?site=$i&sortDx=$sortDx' class='condsitenav1a'>".$i."</a></span>";
}

if($sitecheckend <= $sitesXx){
}else{
echo "<span><a href='$sorturl?site=$sitesAnz&sortDx=$sortDx' class='condsitenav1a'>".$sitesAnz."</a></span>";
}

echo "
</div>

<div class='cond2x cond2y'>
<div class='cond2'>";include("./function/manage-pdf-nav-content.inc.php");echo "</div>
</div>

<div class='clearX'></div>
</td>
</tr>
</table>
</div><!-- ./condT -->
";
?>