<?php

$startmsg = '';
$endmsg = '';
$microdata_domain = str_replace("www.", "", $ultra_domainname);
$microdata_host = $_SERVER['HTTP_HOST'];
if(str_replace('www.', '', $microdata_host) != str_replace('www.', '', $ultra_domainname)) $microdata_host .= "/" . $ultra_addonname;
$have_microdata = in_array($microdata_domain, $microdata_domains);

if(isset($_REQUEST['search'])) {
	$search = $_REQUEST['search'];
}
if(isset($_REQUEST['seri'])) {
	$seri = $_REQUEST['seri'];
}

$start = 0;
if(isset($_REQUEST['start'])) {
	$start = intval($_REQUEST['start']);
}

$seri = '';
if(isset($_REQUEST['seri'])) $seri = $_REQUEST['seri'];

$catdom_id = isset($_REQUEST['catdom_id']) ? intval($_REQUEST['catdom_id']) : $domain_id;

if(strlen($seri)>0){
	$search = base64_decode($search);
	$search = unserialize($search);
}
if($search['now']=="yes"){
	
	$is_hotel = false;
	if(str_replace('www.', '', $ultra_domainname) == "cyprus-hotel.com") {
		$is_hotel = true;
	}
	
	// Get domain category
	$q = "select * from wb_categories_domains where wb_domainname='".(str_replace("www.", "", $ultra_domainname))."';";
	$r = @mysql_query($q);
	if($r && mysql_num_rows($r) == 1) {
		$row = mysql_fetch_assoc($r);
		$wb_uid = $row['wb_uid'];
	}
	
	
	if (strlen($start)<1){
		$start=0;
	}
	$range=10;
	$catdom_idx = sprintf("%04.0f", $catdom_id);
	$query = "SELECT * FROM advertisment WHERE active='yes'";
	if(isset($search['keyword']) && $search['keyword']<>""){
		$query .=" AND (short_title_en LIKE '%{$search['keyword']}%' OR title_el LIKE '%{$search['keyword']}%' OR title_tr LIKE '%{$search['keyword']}%' OR description_en LIKE '%{$search['keyword']}%' OR description_el LIKE '%{$search['keyword']}%' OR description_tr LIKE '%{$search['keyword']}%' OR  email like '{$search['keyword']}' OR tel like '{$search['keyword']}' OR website LIKE '%{$search['keyword']}%' OR StreetName LIKE '%{$search['keyword']}%'  OR BuildingName LIKE '%{$search['keyword']}%' OR tel2 like '%{$search['keyword']}%' OR mobile like '%{$search['keyword']}%' OR mobile2 like '%{$search['keyword']}%' OR fax like '%{$search['keyword']}%' OR ContactPerson LIKE '%{$search['keyword']}%' OR Directors LIKE '%{$search['keyword']}%' OR Country LIKE '%{$search['keyword']}%' OR MemberOf LIKE '%{$search['keyword']}%' OR WebSiteTitle LIKE '%{$search['keyword']}%')";
	}
	
	if($domain_id<>611){
		if($domain_id<>"" && $domain_id>0){
			$query .=" AND ";
			// echo $domain_id;
			$domain_idx2 = sprintf("%04.0f", $domain_id);
			$query .=" (catdom_id LIKE '%$domain_idx2%'";
			$result_sub = mysql_query ("SELECT * FROM  domaincategories WHERE parent_id='$domain_id'");
			if (mysql_num_rows($result_sub) > 0){			  
				while($line_sub = mysql_fetch_array($result_sub)){ 
					$domain_idx2 = sprintf("%04.0f", $line_sub["catdom_id"]);
					$query .= " OR catdom_id LIKE '%$domain_idx2%' ";
				}
			}
			$query .=")";
		}
		//			  if($catdom_idS<>"" && $catdom_idS=="0"){$query .=" AND (catdom_id='' OR catdom_id=0)";}
		// echo $query;
	}
	
	//echo $query;
	
	
	
	$result = @mysql_query ($query);
	$NumberOfFields = 0;
	if ($result && mysql_num_rows($result) > 0){ 
		$NumberOfFields = mysql_num_rows($result);
		?>
		<section class="search-results">
			<header>
				<h1>
					<?php
					$search_title = stripslashes(trim($line_catdom_id["title_en"])) . ' Search';
					if(isset($filter_ids) && is_array($filter_ids) && count($filter_ids) > 0) {
						$qf = "select * from filters where filter_id in (".implode(",", $filter_ids).");";
						$rf = @mysql_query($qf);
						if($rf && mysql_num_rows($rf) > 0) {
							$rf_cnt = 0;
							while ($rowf = mysql_fetch_assoc($rf)) {
								if($rf_cnt == 0) {
									$search_title .= " " . stripslashes($rowf['title_en']);
								}
								else {
									$search_title .= ", " . stripslashes($rowf['title_en']);
								}
								$rf_cnt ++;
							}
						}
					}
					
					$webpage_title_en = $search_title;
					$meta['description'] = $search_title. '. ';
					?>
				
					<?php echo $search_title;?>
				</h1>
                <!--[/SocialShareButtons/]-->
			</header>
			<div class="content-body">
                <?php
                require_once(dirname(__FILE__) . "/../advanced_search/advanced_search.php");

                ?>
				<div>
				<?php 
				$count=0;
				$results = array();
				while($line = mysql_fetch_assoc($result)){
					
					$authorized_advert = false;
					if($line['active'] == "yes") $authorized_advert = true;
					// Check if advert belongs to this category
					/*
					if(isset($wb_uid) && strlen($wb_uid) == 16) {
						$q = "select * from wb_categories_adverts where wb_uid='$wb_uid' and wb_advert_uid='{$line['adv_code']}';";
						if(isset($_REQUEST['debug'])) echo "<br/>$q";
						$r = @mysql_query($q);
						if($r && mysql_num_rows($r) == 1) {
							$row = mysql_fetch_assoc($r);
							$wb_status = intval($row['wb_status']);
							
							if($wb_status == 1) $authorized_advert = true;
						}
					}
					*/
					
					
					if($domain_id != 611){
						
						if($authorized_advert) {
						
							$results[$count] = array();
							$results[$count]["order"]=0;
							$results[$count]["categ_order"]=0;
							$results[$count]["title_en"] = $line["title_en"];
							$results[$count]["advertisment_id"] = $line["advertisment_id"];
							
							$query_categtop = "SELECT * FROM domain_advertisment WHERE catdom_id ='$domain_id' AND advertisment_id='{$line['advertisment_id']}'";
							$result_categtop= mysql_query($query_categtop) or die(mysql_error());
							if(mysql_num_rows($result_categtop)>0){
								$line_categ_top = mysql_fetch_assoc($result_categtop);
								if($line_categ_top["category_top"]=="yes"){
									$results[$count]["order"]=10;
									$results[$count]["categ_order"]=$line_categ_top["category_top_order_seq"];
								}
								elseif($line_categ_top["active"]=="yes"){
									$results[$count]["order"]=8;
									$results[$count]["categ_order"]=$line_categ_top["order_seq"];
								}
							}
							else{
								$result_sub = mysql_query ("SELECT * FROM  domaincategories WHERE parent_id='$domain_id'");
								if (mysql_num_rows($result_sub) > 0){			  
									$query_categtop = "SELECT * FROM domain_advertisment WHERE advertisment_id='{$line['advertisment_id']}' AND (";
									$sub = 0;
									while($line_sub = mysql_fetch_array($result_sub)){ 
										$query_categtop .=" catdom_id = '{$line_sub['catdom_id']}' ";
										$sub++;
										if($sub<mysql_num_rows($result_sub)){
											$query_categtop .=" OR ";
										}
									}
									$query_categtop .= ")";
								}
								//echo $query_categtop;
								//echo "<br>";
								$result_categtop = mysql_query($query_categtop) or die(mysql_error());
								if(mysql_num_rows($result_categtop)>0){
									$line_categ_top=mysql_fetch_assoc($result_categtop);
									if($line_categ_top["category_top"]=="yes"){
										$results[$count]["order"]=6;
										$results[$count]["categ_order"]=$line_categ_top["category_top_order_seq"];
									}
									elseif($line_categ_top["active"]=="yes"){
										$results[$count]["order"]=4;
										$results[$count]["categ_order"]=$line_categ_top["order_seq"];
									}
								}
							}
							$count++;
						}
						else {
							$NumberOfFields = $NumberOfFields - 1;
						}
					}
					else {
						$results[$count] = array();
						$results[$count]["order"]=0;
						$results[$count]["categ_order"]=0;
						$results[$count]["title_en"] = stripslashes($line["short_title_en"]);
						$results[$count]["advertisment_id"] = $line["advertisment_id"];
						
						
						$query_categtop = "SELECT * FROM domain_advertisment WHERE category_top='yes' AND advertisment_id='{$line['advertisment_id']}'";
						$result_categtop= mysql_query($query_categtop) or die(mysql_error());
						if(mysql_num_rows($result_categtop)>0){
							$results[$count]["order"] = 10;
							$results[$count]["categ_order"] = 10;
						}
						else {
							$query_categtop = "SELECT * FROM domain_advertisment WHERE active='yes' AND advertisment_id='{$line['advertisment_id']}'";
							$result_categtop= mysql_query($query_categtop) or die(mysql_error());
							if(mysql_num_rows($result_categtop)>0){
								$results[$count]["order"] = 8;
								$results[$count]["categ_order"] = 8;
							}
						}
						
						$count++;
					}
					
				}
				
				$NumberOfFields = $count;
					
				$order = array();
				$categ_order = array();
				$title_en = array();
				$advertisment_id = array();
				foreach ($results as $key => $row) {
					$order["order_" . $key]  = intval($row['order']);
					$categ_order["corder_" . $key]  = intval($row['categ_order']);
					$title_en[$key] = $row['title_en'];
					$advertisment_id[$key] = $row['advertisment_id'];
				}
				
				//echo '<pre>', var_export($order, true), '</pre>';
				//echo '<pre>', var_export($categ_order, true), '</pre>';
				
				array_multisort($order, SORT_DESC, $categ_order, SORT_ASC, $title_en, SORT_ASC, SORT_STRING, $results);
				//echo '<pre>', var_export($results, true), '</pre>';
				
				$i=0;
				$order = array();
				$categ_order = array();
				$title_en = array();
				$advertisment_id = array();
				foreach ($results as $key => $row) {
					$order[$i]  = $row['order'];
					$categ_order[$i]  = $row['categ_order'];
					$title_en[$i] = $row['title_en'];
					$advertisment_id[$i] = $row['advertisment_id'];
					$i++;
				}
				//print_r($results); 
				
				if($NumberOfFields> ($start+$range) ){
					$end = $start+$range;
				}
				else{
					$end = $NumberOfFields;
				}
				
				$meta_keywords = array();
				$meta_strip_array = array(
					"cyprus", "limassol", "paphos", "larnaca", "famagusta", "ayia napa"
				);
				$meta_keywords [] = trim(str_ireplace($meta_strip_array, '', stripslashes(trim($line_catdom_id["title_en"]))));
				
				$click_count_paths = array();
				
				
				for($i=$start; $i<$end; $i++){
					//   echo $title_en[$i];
					//   echo "<br>";
					$query1 = "SELECT * FROM advertisment WHERE advertisment_id='{$advertisment_id[$i]}'";
					$result1=mysql_query($query1) or die(mysql_error());
					if(mysql_num_rows($result1)>0){
						$line = mysql_fetch_array($result1);
						//}
						$advert_active = ($line['active'] == "yes") ? true : false;
						//$shortNameURL = str_replace(' ','_',$line["short_title_en"]);
						//$shortNameURL = str_replace('&','*',$shortNameURL);
						$show_website = intval($line['show_website']);
						$shortNameURL = trim($line["title_tr"]);
						$shortNameALT = str_replace('"','',$line["short_title_en"]);

                        $thumbshot = trim($line['image']);
                        $thumbshot_file = dirname(__FILE__) . "/../../images/advertisments/advert_images/" . trim($line['image']);
                        $thumbshot_url = $protocol . $_SERVER['HTTP_HOST'] . "/images/advertisments/advert_images/" . trim($line['image']);
                        $has_thumbshot = ($thumbshot != "" && file_exists($thumbshot_file));

						$meta_keywords [] = $line["short_title_en"];
						
						if($i == $start) {
							$meta['description'] .= $line["short_title_en"];
						}
						else {
							$meta['description'] .= ', ' . $line["short_title_en"];
						}
						
						
						if($have_microdata) {
							//echo '<div  itemscope="itemscope" itemtype="http://schema.org/LocalBusiness">';
						}
						
						$click_link_id = 'adv_' . $line['advertisment_id'];
						$click_count_paths [$click_link_id] = 'click_count.php?link=' .'' . '&amp;type=www&amp;id=' . $line['advertisment_id'] . '&amp;domain=' . $line_domain["domainname"] .'&amp;domain_id=' . $domain_id. '&amp;click_from=s';
						
						?>
						<div class="box box-primary"  <?php echo ($have_microdata) ? 'itemscope="itemscope" itemtype="' . $microdata_types[$microdata_domain]['adverts']['type'] . '"' : '';?>>
							<?php
							if(!isset($_SESSION['user_id'])) {
								@mysql_query("UPDATE advertisment SET views=views+1 WHERE advertisment_id='{$line['advertisment_id']}';");
								// s stands for search
								count_views('adverts_stats_views', 'advertisment_id', $line['advertisment_id'], $domain_id, '', 's');
							}

							?>
                            <div class="box-header with-border">
							    <h2 <?php echo ($have_microdata) ? 'itemprop="name"':'';?>><?php echo trim(stripslashes($line["short_title_en"]));?></h2>
                            </div>
							<?php
							$location = array();
							$q = "select * from advertisment_locations where advertisment_id='{$advertisment_id[$i]}' and active='1' and main_location='1';";
							$r = @mysql_query($q);
							if($r && mysql_num_rows($r)>0) {
								$row = mysql_fetch_assoc($r);
								$location = $row;
							}
							?>
							<div class="box-body">
                                <div class="row no-margin">
                                    <div class="col-md-3 text-center search-result-logo">
                                        <?php

                                        $website_link = fix_url(trim($line['website']));

                                        if($website_link != "" && $show_website == 1){

                                            if($advert_active) {
                                                if($is_hotel) {
                                                    ?>
                                                    <span class="click-link flimg" rel="<?php echo $click_link_id;?>" extra_class="flimg">
                                                        <?php
                                                        if($has_thumbshot){
                                                            ?>
                                                            <img
                                                                src="<?php echo $thumbshot_url; ?>"
                                                                width="120" height="90" border="1"
                                                                alt="<?php echo $line['short_title_en'] . ' Website Screenshot'; ?>"
                                                                class="img-responsive img-thumbnail"/>
                                                            <?php
                                                        }
                                                        else {
                                                            ?>
                                                            <img
                                                                src="<?=$screenshot_url;?>w=120&h=90&url=<?php echo urlencode($website_link); ?>"
                                                                width="120" height="90" border="1"
                                                                alt="<?php echo $line['short_title_en'] . ' Website Screenshot'; ?>"
                                                                class="img-responsive img-thumbnail"/>
                                                            <?php
                                                        }
                                                        ?>
                                                    </span>
                                                    <?php
                                                }
                                                else {
                                                    ?>
                                                    <a class="flimg" href="click_count.php?link=<?php echo '';?>&amp;type=www&amp;id=<?php echo $line['advertisment_id'];?>&amp;domain=<?php echo $line_domain["domainname"];?>&amp;domain_id=<?php echo $domain_id;?>&amp;click_from=s" target="_blank">
                                                        <?php
                                                        if($has_thumbshot){
                                                            ?>
                                                            <img
                                                                src="<?php echo $thumbshot_url; ?>"
                                                                width="120" height="90" border="1"
                                                                alt="<?php echo $line['short_title_en'] . ' Website Screenshot'; ?>"
                                                                class="img-responsive img-thumbnail"/>
                                                            <?php
                                                        }
                                                        else {
                                                            ?>
                                                            <img
                                                                src="<?=$screenshot_url;?>w=120&h=90&url=<?php echo urlencode($website_link); ?>"
                                                                width="120" height="90" border="1"
                                                                alt="<?php echo $line['short_title_en'] . ' Website Screenshot'; ?>"
                                                                class="img-responsive img-thumbnail"/>
                                                            <?php
                                                        }
                                                        ?>
                                                    </a>
                                                    <?php
                                                }
                                            }
                                            else {
                                                ?>
                                                <?php
                                                if($has_thumbshot){
                                                    ?>
                                                    <img
                                                        src="<?php echo $thumbshot_url; ?>"
                                                        width="120" height="90" border="1"
                                                        alt="<?php echo $line['short_title_en'] . ' Website Screenshot'; ?>"
                                                        class="img-responsive img-thumbnail"/>
                                                    <?php
                                                }
                                                else {
                                                    ?>
                                                    <img
                                                        src="<?=$screenshot_url;?>w=120&h=90&url=<?php echo urlencode($website_link); ?>"
                                                        width="120" height="90" border="1"
                                                        alt="<?php echo $line['short_title_en'] . ' Website Screenshot'; ?>"
                                                        class="img-responsive img-thumbnail"/>
                                                    <?php
                                                }
                                                ?>
                                                <?php
                                            }
                                        }
                                        ?>
                                    </div>
                                    <div class="col-md-7 search-result-data">
                                        <table class="table">
                                            <tr>
                                                <td class="th">phone:</td>
                                                <td>
                                                    <span <?php echo ($have_microdata) ? 'itemprop="telephone"':'';?>>
                                                    <?php
                                                    if(isset($location['tel1']) && trim($location['tel1']) != ""){
                                                        echo $location['tel1'];
                                                    }
                                                    else {
                                                        echo 'n/a';
                                                    }
                                                    ?>
                                                    </span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="th">email:</td>
                                                <td>
                                                    <span <?php echo ($have_microdata) ? 'itemprop="email"':'';?>>
                                                    <?php
                                                    if(isset($location['email']) && trim($location['email']) != ""){
                                                        ?>
                                                        <a href="mailto:<?php echo trim($location['email']); ?>"><?php echo $location['email']; ?></a>
                                                        <?php
                                                    }
                                                    else {
                                                        echo 'n/a';
                                                    }
                                                    ?>
                                                    </span>
                                                </td>
                                            </tr>
                                            <?php
                                            if($show_website == 1) {
                                                ?>
                                                <tr>
                                                    <td class="th">website:</td>
                                                    <td>
                                                        <meta <?php echo ($have_microdata) ? 'itemprop="url"':'';?> content="<?php echo $website_link;?>">
                                                        <?php
                                                        if(trim($line['website']) != ""){
                                                            if($advert_active) {
                                                                if($is_hotel) {
                                                                    ?>
                                                                    <span class="click-link" rel="<?php echo $click_link_id;?>"><?php echo $line["website"];?></span>
                                                                    <?php
                                                                }
                                                                else {
                                                                    ?>
                                                                    <a href="click_count.php?link=<?php echo '';?>&amp;type=www&amp;id=<?php echo $line['advertisment_id'];?>&amp;domain=<?php echo $line_domain["domainname"];?>&amp;domain_id=<?php echo $domain_id;?>&amp;click_from=s" target="_blank"><?php echo $website_link;?></a>
                                                                    <?php
                                                                }
                                                            }
                                                            else {
                                                                echo $website_link;
                                                            }
                                                        }
                                                        else {
                                                            echo 'n/a';
                                                        }
                                                        ?>
                                                    </td>
                                                </tr>
                                                <?php
                                            }
                                            ?>
                                        </table>

                                    </div>
                                </div>

							</div>
                            <div class="box-footer">
							    <?php
								if(isset($_SESSION['user_id'])) {
									echo '<a href="../admin/advert_manager.php?advert_action=advert_edit_main&amp;advertisment_id=' . $line['advertisment_id'] . '" target="_blank">Edit</a> | ';
								}
								/* ?><a href="<?php echo $shortNameURL;?>" onclick="window.open('click_count.php?link=<?php echo $website_link;?>&amp;type=adv&amp;id=<?php echo $line['advertisment_id'];?>&amp;domain=<?php echo $line_domain["domainname"];?>&amp;domain_id=<?php echo $domain_id;?>&amp;click_from=s','','status=no, scrollbars=yes, width=526,height=339'); return false;" class="small10 adv_linkage">More about <?php echo trim(stripslashes($line["short_title_en"]));?></a></p> <? */
								?>
                                <a href="<?php echo $shortNameURL;?>" target="_blank" link="click_count.php?link=<?php echo '';?>&amp;type=adv&amp;id=<?php echo $line['advertisment_id'];?>&amp;domain=<?php echo $line_domain["domainname"];?>&amp;domain_id=<?php echo $domain_id;?>&amp;click_from=s" class="small10 adv_linkage">More about <?php echo trim(stripslashes($line["short_title_en"]));?></a>
                            </div>
						</div>
						<?php
						if($have_microdata) {
							echo '</div>';
						}
					}
				}
				?>
				</div>
			</div>
            <div class="search-results-pagination text-left">
                <div class="search-results-num">
                    <?php
                    $end = $NumberOfFields;
                    if($NumberOfFields > $start + $range) $end = $start + $range;
                    echo "Results <b>", ($start + 1), " - ", $end, "</b> out of <b>", $NumberOfFields, "</b>";
                    ?>
                </div>
                <nav>
                    <ul class="pagination">

                        <?php
                        $pagesrange = 2;
                        $pages = $NumberOfFields/$range;
                        $search = base64_encode(serialize($search));
                        if(($start/$range)<=$pagesrange){
                            $startrange=0;
                        }
                        else{
                            $startrange=$start/$range-$pagesrange;
                            $prev=$start-$range;
                            //$startmsg = '<li><a href="'.$homepage_url . '/'. '?start='.$prev.'&amp;search='.$search.'&amp;seri=111&amp;module_page=search" aria-label="Previous"><span aria-hidden="true">&laquo;</span></a></li>  <li><a href="'.$homepage_url . '/' . '?start=&amp;search='.$search.'&amp;seri=111&amp;module_page=search">1</a></li><li><a href="#">...</a></li>';
                            $startmsg = '<li><a href="'.$homepage_url . 'cyprus'. $prev .'">1</a></li><li><a href="#">...</a></li>';
                        }
                        if(($startrange+(2*$pagesrange)+1)>=$pages){
                            $endrange=$pages;
                        }
                        else{
                            $endrange=$startrange+(2*$pagesrange)+1;
                            $nex=$start+$range;
                            $endpage=ceil($pages);
                            $end=floor($pages)*$range;
                            //$endmsg =  '<li><a href="#">...</a></li>  <li><a href="'.$homepage_url . '/'.'?start=$end&amp;search=$search&amp;seri=111&amp;module_page=search">'.$endpage . '</a></li> <li><a href="'.$homepage_url . '/'. '?start=' . $nex . '&amp;search=' . $search . '&amp;seri=111&amp;module_page=search" aria-label="Next"><span aria-hidden="true">&raquo;</span></a>';
                            $endmsg =  '<li><a href="#">...</a></li>  <li><a href="'.$homepage_url . 'cyprus'. $end . '">'.$endpage . '</a></li> <li><a href="'.$homepage_url . 'cyprus'. $nex . '" aria-label="Next"><span aria-hidden="true">&raquo;</span></a>';
                        }
                        echo $startmsg;
                        for ($noofpage = $startrange; $noofpage < $endrange; $noofpage++) {
                        if ($start != $noofpage*$range){
                        /*Modification by Theodosis */
                        if ($search == 'YToyOntzOjc6ImtleXdvcmQiO3M6MDoiIjtzOjM6Im5vdyI7czozOiJ5ZXMiO30='){
                        ?>
                        <li><a href="cyprus<?php if ($noofpage > 0) echo $noofpage * $range; ?>">
                                <?php
                                }
                                else {
                                ?>
                                <li><a href="<?php echo $homepage_url . '/'; ?>?start=<?php echo $noofpage * $range; ?>&amp;search=<?php echo $search; ?>&amp;seri=111&amp;module_page=search">
                                        <?php
                                        }
                                        echo ($noofpage+1) . '</a></li>';
                                        }
                                        else {
                                            echo '<li class="active"><a href="#">' . ($noofpage+1) . '</a></li>';
                                        }
                                        }
                                        echo $endmsg;
                                        ?>


                    </ul>
                </nav>
            </div>

		</section>

		<script type="text/javascript">
		    var click_count_paths = <?php echo json_encode($click_count_paths);?>;
		</script>	
		
		<?php
        $optres['js'][] = $path . 'amodules/search/js/search.js';
	}
	else{
		?>
        <div class="alert alert-danger">

		    <p class="text-white"><b>No results</b><br>There are no listings in database with these criteria.</p>
        </div>
		<?php 
	}
}

if(isset($meta_keywords) && count($meta_keywords) > 0) {
	$meta['keywords'] = implode(", ", $meta_keywords) . ", " . $meta['keywords'];
}

if($start > 0) {
	$webpage_title_en .= " | Page " . ($start/10 + 1);
}
?>