function IsEven($number){ $result = $number % 2; if($result == 0){ return true; }else{ return false; } } // ###################################################### START NEXT PREV ###################################################### function NextPrevPart_01($query,$projects_per_page,$set_projects_per_page='') { global $p,$sa,$broi_rez,$pro_from,$_GET,$count_projects,$count_projects_all,$count_pages,$global,$countsp; $countsp=intval($countsp); $result=mysql_query($query,$global); $broi_rez = mysql_num_rows($result); if($sa){ $projects_per_page = $broi_rez+1; } if(!$_GET['p'] or $_GET['p']==0) { $p=0; $pro_from = $p; } else { $pro_from = (($p-1)*$projects_per_page); } $query2 = $query.' LIMIT '.$pro_from.','.$projects_per_page; $count_projects = $broi_rez; $count_projects_all = &$count_projects; if($countsp){ $count_pages = $count_projects / $countsp; } return $query2; } ?> function printNextPrev($projects_per_page){ global $m, $p, $sa, $broi_rez, $pro_from, $_GET, $count_projects,$count_projects_all,$count_pages,$order,$prodid,$pc,$category,$SRT_LANG,$G_LABELS,$countsp,$br_nex_prev_per,$br_nex_prev_per_conf; $countsp=intval($countsp); if($sa!=1 ) { $add_to_qs = '&p_number='.$_GET['p_number']; if(!$p){ $p=1; } if($countsp<$count_projects) { if($_GET['forder']){ $add_forder = '&forder='.$_GET['forder']; } if($_GET['countsp']){ $add_countsp = '&countsp='.$_GET['countsp']; } if($_GET['id']){ $add_id = '&id='.$_GET['id']; } if($count_pages > $br_nex_prev_per_conf){ if(IsEven($br_nex_prev_per)){ $br_p=($br_nex_prev_per/2)-1; $br_n=($br_nex_prev_per/2); } else{ $br_p=$br_n=($br_nex_prev_per-1)/2; } }else{ $br_nex_prev_per=$count_pages; } ?> =$G_LABELS[3]?>
if(($p)>1){ ?> |
if($count_pages > $br_nex_prev_per_conf){
if(!$_GET['p'] or $_GET['p']<$br_n){
$cp=1;
$br_nex_prev_per=$br_nex_prev_per;
}
else{
$br_nex_prev_per=$_GET['p']+$br_n;
if($br_nex_prev_per>$count_pages){
$br_nex_prev_per=ceil($count_pages);
}
$cp=$_GET['p']-$br_p;
if(($_GET['p']+$br_n) > $count_pages){
$cp=ceil($count_pages)-$br_nex_prev_per_conf+1;
}
}
}else{ $cp=1; }
for($cp; $cp<$br_nex_prev_per+1;$cp++) {
?> | | if($cp!=$p){ ?>mofade="bg" mosc="#DFD9CD" moec="#F6F3EE"> } ?> if($cp==$p){ ?> | width="14px;" align="center" class="link_np_on" =$_GET['p']==$cp ? 'style="background:#F6F3EE"':''?> mofade="bg" mosc="#DFD9CD" moec="#F6F3EE"> } ?> echo $cp; ?> if($cp==$p){ ?> | } ?> if($cp!=$p){ ?> } ?> } ?>| | =$G_LABELS[12]?>
![]() | } ?>