? GR0V Shell

GR0V shell

Linux www.koreapackagetour.com 2.6.32-042stab145.3 #1 SMP Thu Jun 11 14:05:04 MSK 2020 x86_64

Path : /home/admin/domains/happytokorea.com/public_html/libs/
File Upload :
Current File : /home/admin/domains/happytokorea.com/public_html/libs/backoff_seo_tour.php

<?
class backoff_seo_tour extends MySql
{
	var $_Limit;
	var $_total;
	var $_Next_Page;
	var $_Start;
	var $_a;
	var $_z;
	var $_az;
	var $_link;
	var $_first_page_link;
	var $_previous_page_link;
	var $_last_page_link;
	var $_next_page_link;
	var $_Page;
	var $_total_links;
	function setOrder(){
			if($this->_Page==1){$count=$this->_total;return $count;}else{
			$cal_page=$this->_Page-1; 
			$perpage=$cal_page*$this->_Limit;
			$count=$this->_total-$perpage;
			return $count;
				}
	}
		function setOrderMin2Max(){
			if($this->_Page==1){$count=1; return $count;}else{
			$count=($this->_Page-1)*$this->_Limit;
			return $count;
				}

	}
	function setPage(){
	if($_GET['page']){$this->_Page = $_GET['page'];}else{$this->_Page = 1;}
	return $this->_Page;
	}

function MakeLinkNavigator($NEW_LINK,$LINK){
	$dot=explode(".",$_SERVER['REQUEST_URI']);
$url=explode("-",$dot[0]);
if($url[1]==''||$url[1]=='page'){
	$output.="tour-page-$LINK.html";
}else if($url[1]=='group'){
$output.="tour-group-".$url[2]."-page-$LINK.html";
	//tour-group-Hongkong-page-1.html
}else {
$output.="tour-".$url[1]."-page-$LINK.html";
}
		return $output;
		}//end function MakeLinkNavigato

		function total_links($total_link){
	if($total_link==""){
		$this->_total_links = 10;
	}else{ $this->_total_links=$total_link;}
			return 	$this->_total_links;
		}





function PageNavigator(){
 //Total links / navigator
	if($this->_total_links>$this->_Next_Page ){$this->_total_links=$this->_Next_Page;}
	$Ceil2total_links = ceil($this->_total_links/2);
	$Floor2total_links = floor($this->_total_links/2);

	$this->_first_page_link = $this->MakeLinkNavigator("page", 1);
	$this->_previous_page_link = $this->MakeLinkNavigator("page", $this->_Page-1);
	$this->_last_page_link = $this->MakeLinkNavigator("page", $this->_Next_Page );
	$this->_next_page_link = $this->MakeLinkNavigator("page", $this->_Page+1);

	$this->_a = 1;
	$this->_z = $this->_total_links;
	if( $this->_Next_Page<=$this->_total_links){
		$this->_z =  $this->_Next_Page;
	}else{
		if(isset($this->_Page) && ($this->_Page > $Ceil2total_links)){
			$this->_a = $this->_Page-$Floor2total_links;
			$this->_z = $this->_Page+$Floor2total_links;
		}
		if(isset($this->_Page) && ($this->_Page > ($this->_Limit-$Ceil2total_links))){
			$this->_a =  $this->_Next_Page-$this->_total_links+1;
			$this->_z =  $this->_Next_Page;
		}
	}
}//end function
function jump2page(){
	$output.="<form name=\"navigator1\" action=\"\" method='GET'>
Jump Page: 
<select style='width: 50px;' name=\"page\" id=\"page\" onChange=\"sort_data('x','x','x')\">";
		for($this->_az=1; $this->_az<= $this->_Next_Page; $this->_az++){
			if($this->_az==$this->_Page){$pgnr=' selected';}else{$pgnr='';}
			$output.= "<option value='{$this->_az}'{$pgnr}>{$this->_az}-{$this->_Next_Page}</option>";
		}
		$output.="</select>";
			if($_GET){
			foreach ($_GET as $key => $value){
				if($key != "Submit" && $key != "page"){
					$output.= "<input type='hidden' name='$key' value='$value'>\n";
				}
			}
		}
		$output.="</form>";
		return $output;
}//end jump
			function PageLink(){
$output.="หน้า |&nbsp;&nbsp;";
$show_links=$this->_total_links;
//$perpage=10; $perpage=$this->_Limit
$total_links=ceil($this->_total/$this->_Limit);//ปัดขึ้น
$center_link=ceil($this->_total_links/2);

if($this->_Page<=$center_link){//แสดงในหน้าแรก
    for($i=1;$i<$show_links+1;$i++){
		if($this->_Page==$i){
$output.= "<span class=\"seo_page_navigator_me\"> <a href='".$this->MakeLinkNavigator("page", $i)."' >{$i}</a> &nbsp;";
		}else{
$output.= "<span class=\"seo_page_navigator\"> <a href='".$this->MakeLinkNavigator("page", $i)."'>{$i}</a></span> &nbsp;";
		}
	}
}else if($total_links-$this->_Page<$center_link){//แสดงหน้าสุดท้าย
   for($i=($total_links-$show_links+1);$i<$total_links+1;$i++){
								if($this->_Page==$i){
$output.= "<span class=\"seo_page_navigator_me\"> <a href='".$this->MakeLinkNavigator("page", $i)."' >{$i}</a> &nbsp;";
		}else{
$output.= "<span class=\"seo_page_navigator\"> <a href='".$this->MakeLinkNavigator("page", $i)."'>{$i}</a></span> &nbsp;";
		}
					}
}else{//แสดงหน้ากลาง
	for($i=$this->_Page-$center_link;$i<$this->_Page;$i++){
									if($this->_Page==$i){
$output.= "<span class=\"seo_page_navigator_me\"> <a href='".$this->MakeLinkNavigator("page", $i)."' >{$i}</a> &nbsp;";
		}else{
$output.= "<span class=\"seo_page_navigator\"> <a href='".$this->MakeLinkNavigator("page", $i)."'>{$i}</a></span> &nbsp;";
		}
	}
for($i=$this->_Page;$i<($this->_Page+$center_link);$i++){
					
										if($this->_Page==$i){
$output.= "<span class=\"seo_page_navigator_me\"> <a href='".$this->MakeLinkNavigator("page", $i)."' >{$i}</a> &nbsp;";
		}else{
$output.= "<span class=\"seo_page_navigator\"> <a href='".$this->MakeLinkNavigator("page", $i)."'>{$i}</a></span> &nbsp;";
		}
}
}

return $output;
	}//end LinkPage
		function  PageLink2(){
			$output.="หน้า |&nbsp;&nbsp;";
			for($i=$this->_a; $i<=$this->_z; $i++){
			if($this->_Page == $i){
				$output.= "<span id='this_page'>{$i}</span> &nbsp; ";
			}else{
				$output.= " <a href='".$this->MakeLinkNavigator($_SERVER['PHP_SELF'], "page", $i, 1)."'>{$i}</a> &nbsp;";
			}
		}

		return $output;
		}//end


		function total_record(){
		$output.="ทั้งหมด&nbsp;".$this->_total."&nbsp;Record&nbsp;&nbsp;&nbsp;";
		$output.="หน้า {$this->_Page} / ".$this->_Next_Page."";
		return $output;
		}//end function jum2page
	
		function PreNext(){
	if( $this->_Next_Page > 1){
		if($this->_Page>1){
			
			$output.= "<a href='".$this->_first_page_link."'>First&nbsp;</a>";
			$output.= "<a href='".$this->_previous_page_link."'>Previous&nbsp;&nbsp;</a>";
		}else{	$output.= "First&nbsp;";
			$output.= "Previous&nbsp;&nbsp;";
		}
		if($this->_Page< $this->_Next_Page){
			$output.= "<a href='".$this->_next_page_link."'>Next&nbsp;</a>";
			$output.= "<a href='".$this->_last_page_link."'>Last</a>";
		}else{	$output.= "Next&nbsp;";
			$output.= "Last";
		}
	}else{$output.= "First&nbsp;";
			$output.= "Previous&nbsp;&nbsp;";
			$output.= "Next&nbsp;";
			$output.= "Last";
	}//end if $this->_Next_Page>1
	return $output;
}
function PerPageDropList(){
//$this->_link=$_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING'];
$list=array("5","10","15","20","25","30","35","40","45","50");
$output="
<form method=\"GET\" action=\"\" name=\"listpage\">
 <select size=\"1\" name=\"limit\"  onchange=\"document.listpage.submit()\">";
foreach($list as $key=>$value){
if($value==$this->_Limit){$pgnr=' selected';}else{$pgnr='';}
$output.= "<option value='{$value}'{$pgnr}>{$value}</option>";
}
if (!in_array($this->_Limit, $list)) {
	$output.="<option value='$this->_Limit' selected>$this->_Limit</option";
}
$output.="</select>";
if($_GET){
			foreach ($_GET as $key => $value){
				if($key != "Submit"&&$key!="limit"){
					$output.= "<input type='hidden' name='$key' value='$value'>\n";
				}
			}
		}
$output.="</form>";
return $output;
}
function set_per_page(){
	$output.="<form method=\"GET\" action=\"\" name=\"listpage2\">
	<table width=\"180\"><tr><td width=\"80\" align=\"left\"># Per Page</td><td width=\"100\" align=\"left\">
	<input type='textbox' name='limit' size=3 value=\"$this->_Limit\">
	<input type='Submit' value='  Ok  '>";
	if($_GET){
			foreach ($_GET as $key => $value){
				if($key != "Submit"&&$key!="limit"){
					$output.= "<input type='hidden' name='$key' value='$value'>\n";
				}
			}
		}
	$output.="</td></tr></table></form>";
return $output;
}
function setLimit($limit){
	global $_Limit;
	$this->_Limit=$_GET['limit'];
	if($this->_Limit==""){$this->_Limit=$_Limit;}
	if($this->_Limit==""){$this->_Limit=$limit;}
	$_SESSION['_Limit']=$this->_Limit;
	return $this->_Limit;
}

}//end class
?>

T1KUS90T
  root-grov@210.1.60.28:~$