secretkey="ytrewKJHGL"; /* Min/Max 10 Char Allowed */ $this->stringlimit=7; /* Limit for string */ $this->hotel_keystr='h'; $this->attraction_keystr='a'; $this->state_keystr='s'; $this->city_keystr='c'; $this->country_keystr='v'; $this->hotel_review_keystr='z'; $this->attraction_review_keystr='x'; $this->city_review_keystr='p'; /* Variables for creating Alphabetic string end */ $this->table_name; $this->emailid; $this->subject; $this->headers; $this->rpp = 10; $this->rpp1 =10; $this->rpp2 =5; // define('Super_Admin_Path' , 'http://www.hotelswale.com/admin/super_admin/'); // define('Admin_User_Path' , 'http://www.traveldhamaka.com/admin/admin/'); define('Super_Admin_Path' , 'http://192.168.1.69/travel-dhamaka-admin/super_admin/'); define('Admin_User_Path' , 'http://192.168.1.69/travel-dhamaka-admin/admin/'); $this->userPostedData = array(); $this->DB_HOST = 'localhost'; $this->DB_USER = 'econeed_orgadmin' ; $this->DB_PASSWORD = 'T]ZWg?FJPHAQ' ; $this->DB_NAME = 'econeed_found' ; /* $this->DB_HOST = 'localhost'; $this->DB_USER = 'hotelswa_hotelsw' ; $this->DB_PASSWORD = '5!OpR5?DWl%^' ; $this->DB_NAME = 'hotelswa_hotelswale' ; */ $hostName = $this->DB_HOST ; $userName = $this->DB_USER ; $password = $this->DB_PASSWORD ; $dbName = $this->DB_NAME ; $this->OpenConnection($hostName , $userName , $password , $dbName); return $this->table_name ; } // Function for commonclass End // Function for set table name Start function setTable($name) { $this->table_name = $name; } // Function for set table name End // Open Database Connection Function start function OpenConnection($hostName , $userName , $password , $dbName) { $link = mysqli_connect($hostName, $userName, $password)or die("Connection Error"); mysqli_select_db($link, $dbName); //mysqli_select_db($dbName); return $link; } // Open Database Connection Function End // Function for retrive Distinct Data from datatbae start function selectdist ($que) { $sql1= $que; $result = mysql_query( $sql1 ) or mysql_error(); return $result ; } function selectsubSql ($que, $pageNum='' , $orderBy='' , $sortOrder='') { $sql1= $que; if( trim($groupBy) ) $sql1 .= " GROUP BY ".$groupBy ; if( trim($orderBy) ) $sql1 .= " ORDER BY ".$orderBy." ".$sortOrder ; if( $pageNum ) $sql1 .= " LIMIT ".$this->queryLimit( $pageNum ) ; $result = mysql_query( $sql1 ) or mysql_error() ; return $result ; } // Function for retrive Distinct Data from datatbae end // Function for retrive Data from datatbae start function selectSql($condition='',$coloums='', $pageNum='', $pageRecord='', $orderBy='' , $sortOrder='', $groupBy='', $limit='' , $rand='',$limit1='') { $mysqli = new mysqli("localhost", "econeed_orgadmin", "T]ZWg?FJPHAQ", "econeed_found"); $pos=substr($condition,0,6); // echo $condition; die; if($pos=='select' || $pos=='SELECT') { $sql=$condition; } else if($pos=='CREATE') { $sql=$condition; } else { if( trim($coloums) ) $sql = " SELECT ".$coloums." FROM `".$this->table_name."`"; else $sql = " SELECT * FROM `".$this->table_name."`" ; if( trim($condition) ) $sql .= " WHERE ".$condition ; if( trim($groupBy) ) $sql .= " GROUP BY ".$groupBy ; if( trim($orderBy) ) $sql .= " ORDER BY ".$orderBy." ".$sortOrder ; if(trim($rand)) $sql .= " ORDER BY RAND()"; if( trim($limit) ) { if(trim($limit1)) $sql .= " LIMIT ".$limit1.", ".$limit; else $sql .= " LIMIT 0, ".$limit; } if( $pageNum ) $sql .= " LIMIT ".$this->queryLimit($pageNum,$pageRecord ); } // $result = mysql_query( $sql ) or mysql_error(); // echo "jjj--".$sql; die; $result = $mysqli->query($sql); // $result=$result->fetch_assoc(); return $result ; } function selectSqlAdmin( $condition='', $pageNum='' , $orderBy='' , $sortOrder='', $groupBy='', $limit='' , $rand='', $limit1='') { if( trim($condition) ) $sql = " SELECT * FROM `".$this->table_name."` WHERE ".$condition ; else $sql = " SELECT * FROM `".$this->table_name."`" ; if( trim($groupBy) ) $sql .= " GROUP BY ".$groupBy ; if( trim($orderBy) ) $sql .= " ORDER BY ".$orderBy." ".$sortOrder ; if(trim($rand)) $sql .= " ORDER BY RAND()"; if( trim($limit) ) $sql .= " LIMIT ".$limit1.", ".$limit; if( $pageNum ) $sql .= " LIMIT ".$this->queryLimit( $pageNum ) ; $result = mysql_query( $sql ) or mysql_error() ; return $result ; } function selectSql1( $condition='', $pageNum='' , $orderBy='' , $sortOrder='', $groupBy='', $limit='' , $rand='') { if( trim($condition) ) $sql = " SELECT * FROM `".$this->table_name."` WHERE ".$condition ; else $sql = " SELECT * FROM `".$this->table_name."`" ; if( trim($groupBy) ) $sql .= " GROUP BY ".$groupBy ; if( trim($orderBy) ) $sql .= " ORDER BY ".$orderBy." ".$sortOrder ; if(trim($rand)) $sql .= " ORDER BY RAND()"; if( trim($limit) ) $sql .= " LIMIT 0, ".$limit; if( $pageNum ) $sql .= " LIMIT ".$this->queryLimit2( $pageNum ) ; //echo $sql."
" ; $result = mysql_query( $sql ) or mysql_error() ; return $result ; } // Function for retrive Data from datatbae end // Function For queryLimit for paging queryLimit1 start function queryLimit($pageNumber) { if( trim($pageNumber) ) { $pgnumber = ($pageNumber - 1) * $this->rpp1 ; } else $pgnumber = 0 ; return $pgnumber." , ".$this->rpp1 ; } // Function For queryLimit for paging queryLimit1 end // Function For queryLimit for paging queryLimit2 start function queryLimit2($pageNumber) { if( trim($pageNumber) ) { $pgnumber = ($pageNumber - 1) * $this->rpp2 ; } else $pgnumber = 0 ; return $pgnumber." , ".$this->rpp2 ; } // Function For queryLimit for paging queryLimit2 end // Function For queryLimit for paging queryLimit3 start function queryLimit3($pageNumber) { if( trim($pageNumber) ) { $pgnumber = ($pageNumber - 1) * $this->rpp2 ; } else $pgnumber = 0 ; return $pgnumber." , ".$this->rpp2 ; } // Function For queryLimit for paging queryLimit1 end // Function for geting page list number start function pageListNumber( $pageNumber ) { if( $pageNumber == 1 || !trim($pageNumber) ) $counter = 1 ; else $counter = ( ( $pageNumber - 1 ) * $this->rpp ) + 1 ; return $counter ; } // Function for geting page list number end // function for getting affected rows by last query start function getAffectedRows($resultSet) { $count = mysqli_num_rows($resultSet); return $count; } // function for getting affected rows by last query end // function for Retrive data from database start function fetchData($resultset) { $data = array(); // $data[]= $resultset->fetch_assoc(); while($row = $resultset->fetch_assoc()) { $data[] = $row; } return $data; } // function for Retrive data from database end // function for Insert Data start function insertData() { $mysqli = new mysqli("localhost", "econeed_orgadmin", "T]ZWg?FJPHAQ", "econeed_found"); $cols = "" ; $vals = "" ; foreach( $this->userPostedData as $key=>$value ) { if($key!="PHPSESSID") { $cols .= str_replace("txt" , "" , $key)."," ; $vals .= "'".$value ."'," ; } } $cols = substr($cols , 0 , strlen($cols)-1) ; $vals = substr($vals , 0 , strlen($vals)-1) ; //$this->sql = "INSERT INTO ".$this->table_name. " ( ".$cols." ) VALUES "." ( ". $vals ." ) " ; $inssql = "INSERT INTO ".$this->table_name. " ( ".$cols." ) VALUES "." ( ". $vals ." ) " ; if(!mysqli_query($mysqli,$inssql)) { $insert= mysqli_error() ; //die() ; } else { $insert = "success" ; } return $insert ; } // function for Insert Data end function updateData1($condition) { $cols = ""; $vals = ""; foreach($this->userPostedData as $key=>$value) { $cols .= $key ."=".$key."+'".$value."',"; } $cols = substr($cols, 0 ,strlen($cols)-1); $this->sql = "update ".$this->table_name." set ".$cols."where ".$condition; $result = mysql_query($this->sql); if(mysql_error()) { echo mysql_error() ; die() ; } else { $insert = "success" ; } return $insert ; } // Function for Update Data start function updateData($condition) { $mysqli = new mysqli("localhost", "econeed_orgadmin", "T]ZWg?FJPHAQ", "econeed_found"); $cols = ""; $vals = ""; foreach($this->userPostedData as $key=>$value) { $cols .= $key ."='".$value."',"; } $cols = substr($cols, 0 ,strlen($cols)-1); // $this->sql = "update ".$this->table_name." set ".$cols."where ".$condition; $ups = "update ".$this->table_name." set ".$cols."where ".$condition; $result = mysqli_query($mysqli,$ups); if(mysqli_error()) { echo mysqli_error() ; die() ; } else { $insert = "success" ; } return $insert ; } // Function for Update Data end // Function for geting all the variables which are post/get start function getRequestedData() { if($_GET && empty($_POST)) $GetVar = $_GET ; else $GetVar = $_POST ; $GetVar = $GetVar ; return $GetVar ; } // Function for geting all the variables which are post/get end // Function fro Redirect to next page start function redirect($page) { echo ""; } // Function fro Redirect to next page end //Function for Session Validation start function validation() { if(ereg("admin/" , $_SERVER['PHP_SELF'])) { if(isset($_SESSION['admin_id'])) { $sessionset = true; }else{ $sessionset = false; } }else{ if(isset($_SESSION['uid'])) { $sessionset = true; }else{ $sessionset = false; } } return $sessionset; } //Function for Session Validation end // Function for Logout Session start function logoutadmin() { session_destroy(); echo ""; } // Function for Logout Session end // Function for delete data start function deleteData($condition) { $mysqli = new mysqli("localhost", "econeed_orgadmin", "T]ZWg?FJPHAQ", "econeed_found"); //$this->sql = "delete from ".$this->table_name." where ".$condition; $delQuery = "delete from ".$this->table_name." where ".$condition; $result = mysqli_query($mysqli,$delQuery); if(mysqli_error()) { echo mysqli_error(); die(); }else{ $insert = "success"; } return $insert; } // Function for delete data end // Function for vaidate session start function validsession() { if(isset($_SESSION['admin_id'])) { $sessionset = true; }else{ echo ""; } return $sessionset; } function validsession_adminuser() { if(isset($_SESSION['admin_user'])) { $sessionset = true; }else{ echo ""; } return $sessionset; } function validsession_supervisoruser() { if(isset($_SESSION['supervisor_user'])) { $sessionset = true; }else{ echo ""; } return $sessionset; } // Function for vaidate session end // function for display pagination start 1st function displayPaging($num , $currentPage , $currentNum , $showCounter='') { if($num>$this->rpp) { $ct = $num / $this->rpp ; $ct = ceil($ct) ; if( $currentPage > 1 ) $pagingPrevious = "" ; else $pagingPrevious = "" ; if($currentPage < $ct && $ct > 5) $pagingEnd = " ..." ; else $pagingEnd = "" ; if($currentPage > 6 ) $pagingStart = "... " ; else $pagingStart = "" ; if( $currentPage < 5 && $ct > 5) { $cct = 5 ; $start = 1 ; } else if($currentPage < 5 && $ct < 5) { $cct = $ct ; $start = 1 ; } else { $start = $currentPage - 5 ; if($start == 0 ) $start = 1 ; $cct = $currentPage ; } for($i=$start;$i<=$cct;$i++) { if($currentPage == $i || !trim($currentPage) && $i == 1) $paging .= " $i" ; else $paging .= "" ; } if( trim($currentPage) == "" ) $currentPage++ ; if( $currentPage < $ct ) $pagingNext = "" ; else $pagingNext = "" ; $paging = $pagingPrevious.$pagingStart.$paging.$pagingEnd.$pagingNext ; } else { $paging = "" ; } if( $currentNum ) { $currentShowRange = (($currentPage - 1) * $this->rpp)?(($currentPage - 1) * $this->rpp)+1 :1 ; $totalRecordNumber = ( ( $currentPage - 1 ) * $this->rpp ) + $currentNum ; if( !trim($showCounter) ) $showingRecords = "" ; } else $showingRecords = "" ; ////// display number of records and pagination /* $finalPagination = "" ; $finalPagination .= " ".$showingRecords." " ; $finalPagination .= "".$paging ."" ;*/ //PAGINATION CHANGES BY VIVEK /* $finalPagination = "" ; $finalPagination .= " ".$showingRecords." " ; */ $finalPagination .= $paging ; return $finalPagination ; } // function for display pagination end 1st // function for display pagination start 2nd function displayPaging2($num , $currentPage , $currentNum , $showCounter='') { if($num>$this->rpp1) { $ct = $num / $this->rpp1 ; $ct = ceil($ct) ; if( $currentPage > 1 ) $pagingPrevious = "" ; else $pagingPrevious = "" ; if($currentPage < $ct && $ct > 5) $pagingEnd = " ..." ; else $pagingEnd = "" ; if($currentPage > 6 ) $pagingStart = "... " ; else $pagingStart = "" ; if( $currentPage < 5 && $ct > 5) { $cct = 5 ; $start = 1 ; } else if($currentPage < 5 && $ct < 5) { $cct = $ct ; $start = 1 ; } else { $start = $currentPage - 5 ; if($start == 0 ) $start = 1 ; $cct = $currentPage ; } for($i=$start;$i<=$cct;$i++) { if($currentPage == $i || !trim($currentPage) && $i == 1) $paging .= " $i; | " ; else $paging .= "" ; } if( trim($currentPage) == "" ) $currentPage++ ; if( $currentPage < $ct ) $pagingNext = "" ; else $pagingNext = ">>" ; $paging = $pagingPrevious.$pagingStart.$paging.$pagingEnd.$pagingNext ; } else { $paging = "" ; } if( $currentNum ) { $currentShowRange = (($currentPage - 1) * $this->rpp1)?(($currentPage - 1) * $this->rpp1)+1 :1 ; $totalRecordNumber = ( ( $currentPage - 1 ) * $this->rpp1 ) + $currentNum ; if( !trim($showCounter) ) $showingRecords = "" ; } else $showingRecords = "" ; ////// display number of records and pagination /* $finalPagination = "" ; $finalPagination .= " ".$showingRecords." " ;*/ $finalPagination .= "$paging" ; return $finalPagination ; } // function for display pagination end 2nd // function for display pagination start 3rd function displayPaging3($num , $currentPage , $currentNum , $showCounter='') { if($num>$this->rpp2) { $ct = $num / $this->rpp2 ; $ct = ceil($ct) ; if( $currentPage > 1 ) { $pagingFirst = "" ; $pagingPrevious = "" ; } else $pagingPrevious = "Previous" ; if($currentPage < $ct && $ct > 10) $pagingEnd = " ..." ; else $pagingEnd = "" ; if($currentPage > 8 ) $pagingStart = "... " ; else $pagingStart = "" ; if( $currentPage < 10 && $ct > 10) { $cct = 10 ; $start = 1 ; } else if($currentPage < 10 && $ct < 10) { $cct = $ct ; $start = 1 ; } else { $start = $currentPage - 10 ; if($start == 0 ) $start = 1 ; $cct = $currentPage ; } for($i=$start;$i<=$cct;$i++) { if($currentPage == $i || !trim($currentPage) && $i == 1) $paging .= " $i;" ; else $paging .= "" ; } if( trim($currentPage) == "" ) $currentPage++ ; if( $currentPage < $ct ) { $pagingNext = ""; $pagingLast = ""; } else $pagingNext = "Next" ; $paging = $pagingFirst.$pagingPrevious.$pagingStart.$paging.$pagingEnd.$pagingNext.$pagingLast ; } else { $paging = "" ; } if( $currentNum ) { $currentShowRange = (($currentPage - 1) * $this->rpp2)?(($currentPage - 1) * $this->rpp2)+1 :1 ; $totalRecordNumber = ( ( $currentPage - 1 ) * $this->rpp2 ) + $currentNum ; if( !trim($showCounter) ) $showingRecords = "" ; } else $showingRecords = "" ; ////// display number of records and pagination $finalPagination = "" ; $finalPagination .= " ".$showingRecords." " ; $finalPagination .= "".$paging ."" ; return $finalPagination ; } // function for display pagination end 3rd // Another function for paging style start function displayPaging5($num , $currentPage , $currentNum , $showCounter='') { if($num>$this->rpp1) { $ct = $num / $this->rpp1 ; $ct = ceil($ct) ; if( $currentPage > 1 ) $pagingPrevious = ""; else $pagingPrevious = "Previous" ; if($currentPage < $ct && $ct > 5) $pagingEnd = " ..." ; else $pagingEnd = "" ; if($currentPage > 6 ) $pagingStart = "... " ; else $pagingStart = "" ; if( $currentPage < 5 && $ct > 5) { $cct = 5 ; $start = 1 ; } else if($currentPage < 5 && $ct < 5) { $cct = $ct ; $start = 1 ; } else { $start = $currentPage - 5 ; if($start == 0 ) $start = 1 ; $cct = $currentPage ; } for($i=$start;$i<=$cct;$i++) { if($currentPage == $i || !trim($currentPage) && $i == 1) $paging .= " $i;" ; else $paging .= "" ; } if( trim($currentPage) == "" ) $currentPage++ ; if( $currentPage < $ct ) $pagingNext = "" ; else $pagingNext = "Next" ; $paging = $pagingPrevious.$pagingStart.$paging.$pagingEnd.$pagingNext ; } else { $paging = "" ; } if( $currentNum ) { $currentShowRange = (($currentPage - 1) * $this->rpp1)?(($currentPage - 1) * $this->rpp1)+1 :1 ; $totalRecordNumber = ( ( $currentPage - 1 ) * $this->rpp1 ) + $currentNum ; if( !trim($showCounter) ) $showingRecords = "" ; } else $showingRecords = "" ; ////// display number of records and pagination $finalPagination = "" ; $finalPagination .= " ".$showingRecords." " ; $finalPagination .= "".$paging ."" ; return $finalPagination ; } function displayPagingStyle($num , $currentPage , $currentNum) { if($num>$this->rpp1) { $ct = $num / $this->rpp1 ; $ct = ceil($ct) ; if( $currentPage > 1 ) $pagingPrevious ='« Previous '; else $pagingPrevious = '
« Previous
' ; if($currentPage < $ct && $ct > 5) $pagingEnd = "" ; else $pagingEnd = "" ; if($currentPage > 5 ) $pagingStart = "" ; else $pagingStart = "" ; if( $currentPage < 5 && $ct > 5) { $cct = 5 ; $start = 1 ; } else if($currentPage < 5 && $ct <= 5 ) { $cct = $ct ; $start = 1 ; } else { $start = $currentPage - 4 ; if($start <= 0 ) $start = 1 ; $cct = $currentPage ; } for($i=$start;$i<=$cct;$i++) { if($currentPage == $i || !trim($currentPage) && $i == 1) $paging .= ''.$i.''; else $paging .= ''.$i.''; } if( trim($currentPage) == "" ) $currentPage++ ; if( $currentPage < $ct ) $pagingNext = 'Next » '; else $pagingNext = 'Next »'; $paging = $pagingPrevious.$pagingStart.$paging.$pagingEnd.$pagingNext ; } else { $paging = "" ; } if( $currentNum ) { $currentShowRange = (($currentPage - 1) * $this->rpp1)?(($currentPage - 1) * $this->rpp1)+1 :1 ; $totalRecordNumber = ( ( $currentPage - 1 ) * $this->rpp1 ) + $currentNum ; // $showingRecords = "Showing Records : ".$currentShowRange." To ".$totalRecordNumber." OF ".$num ; } else $showingRecords = "" ; $finalPagination .= $paging ; return $finalPagination ; } function searchfriend_paging($num , $currentPage , $currentNum) { if($num>$this->rpp1) { $ct = $num / $this->rpp1 ; $ct = ceil($ct) ; if( $currentPage > 1 ) $pagingPrevious ='« Previous '; else $pagingPrevious = '« Previous' ; if($currentPage < $ct && $ct > 5) $pagingEnd = "" ; else $pagingEnd = "" ; if($currentPage > 5 ) $pagingStart = "" ; else $pagingStart = "" ; if( $currentPage < 5 && $ct > 5) { $cct = 5 ; $start = 1 ; } else if($currentPage < 5 && $ct <= 5 ) { $cct = $ct ; $start = 1 ; } else { $start = $currentPage - 4 ; if($start <= 0 ) $start = 1 ; $cct = $currentPage ; } for($i=$start;$i<=$cct;$i++) { if($currentPage == $i || !trim($currentPage) && $i == 1) $paging .= ''.$i.''; else $paging .= ''.$i.''; } if( trim($currentPage) == "" ) $currentPage++ ; if( $currentPage < $ct ) $pagingNext = 'Next » '; else $pagingNext = 'Next »'; $paging = $pagingPrevious.$pagingStart.$paging.$pagingEnd.$pagingNext ; } else { $paging = "" ; } if( $currentNum ) { $currentShowRange = (($currentPage - 1) * $this->rpp1)?(($currentPage - 1) * $this->rpp1)+1 :1 ; $totalRecordNumber = ( ( $currentPage - 1 ) * $this->rpp1 ) + $currentNum ; // $showingRecords = "Showing Records : ".$currentShowRange." To ".$totalRecordNumber." OF ".$num ; } else $showingRecords = "" ; $finalPagination .= $paging ; return $finalPagination ; } // Another function for paging style end /* Paging for review start (vikrant) */ function review_paging($num , $currentPage , $currentNum) { if($num>$this->rpp2) { $ct = $num / $this->rpp2 ; $ct = ceil($ct) ; if( $currentPage > 1 ) $pagingPrevious ='« Previous '; else $pagingPrevious = '« Previous' ; if($currentPage < $ct && $ct > 5) $pagingEnd = "" ; else $pagingEnd = "" ; if($currentPage > 5 ) $pagingStart = "" ; else $pagingStart = "" ; if( $currentPage < 5 && $ct > 5) { $cct = 5 ; $start = 1 ; } else if($currentPage < 5 && $ct <= 5 ) { $cct = $ct ; $start = 1 ; } else { $start = $currentPage - 4 ; if($start <= 0 ) $start = 1 ; $cct = $currentPage ; } for($i=$start;$i<=$cct;$i++) { if($currentPage == $i || !trim($currentPage) && $i == 1) $paging .= ''.$i.''; else $paging .= ''.$i.''; } if( trim($currentPage) == "" ) $currentPage++ ; if( $currentPage < $ct ) $pagingNext = 'Next » '; else $pagingNext = 'Next »'; $paging = $pagingPrevious.$pagingStart.$paging.$pagingEnd.$pagingNext ; } else { $paging = "" ; } if( $currentNum ) { $currentShowRange = (($currentPage - 1) * $this->rpp2)?(($currentPage - 1) * $this->rpp2)+1 :1 ; $totalRecordNumber = ( ( $currentPage - 1 ) * $this->rpp2 ) + $currentNum ; // $showingRecords = "Showing Records : ".$currentShowRange." To ".$totalRecordNumber." OF ".$num ; } else $showingRecords = "" ; $finalPagination .= $paging ; return $finalPagination ; } /* Paging for review end (vikrant) */ /* Paging for review start (vikrant) */ function state_review_paging($num , $currentPage , $currentNum) { if($num>$this->rpp2) { $ct = $num / $this->rpp2 ; $ct = ceil($ct) ; if( $currentPage > 1 ) $pagingPrevious ='« Previous '; else $pagingPrevious = '« Previous' ; if($currentPage < $ct && $ct > 5) $pagingEnd = "" ; else $pagingEnd = "" ; if($currentPage > 5 ) $pagingStart = "" ; else $pagingStart = "" ; if( $currentPage < 5 && $ct > 5) { $cct = 5 ; $start = 1 ; } else if($currentPage < 5 && $ct <= 5 ) { $cct = $ct ; $start = 1 ; } else { $start = $currentPage - 4 ; if($start <= 0 ) $start = 1 ; $cct = $currentPage ; } for($i=$start;$i<=$cct;$i++) { if($currentPage == $i || !trim($currentPage) && $i == 1) $paging .= ''.$i.''; else $paging .= ''.$i.''; } if( trim($currentPage) == "" ) $currentPage++ ; if( $currentPage < $ct ) $pagingNext = 'Next » '; else $pagingNext = 'Next »'; $paging = $pagingPrevious.$pagingStart.$paging.$pagingEnd.$pagingNext ; } else { $paging = "" ; } if( $currentNum ) { $currentShowRange = (($currentPage - 1) * $this->rpp2)?(($currentPage - 1) * $this->rpp2)+1 :1 ; $totalRecordNumber = ( ( $currentPage - 1 ) * $this->rpp2 ) + $currentNum ; // $showingRecords = "Showing Records : ".$currentShowRange." To ".$totalRecordNumber." OF ".$num ; } else $showingRecords = "" ; $finalPagination .= $paging ; return $finalPagination ; } /* Paging for review end (vikrant) */ /* Paging for review start (vikrant) */ function hotel_review_paging($num , $currentPage , $currentNum) { if($num>$this->rpp2) { $ct = $num / $this->rpp2 ; $ct = ceil($ct) ; if( $currentPage > 1 ) $pagingPrevious ='« Previous '; else $pagingPrevious = '« Previous' ; if($currentPage < $ct && $ct > 5) $pagingEnd = "" ; else $pagingEnd = "" ; if($currentPage > 5 ) $pagingStart = "" ; else $pagingStart = "" ; if( $currentPage < 5 && $ct > 5) { $cct = 5 ; $start = 1 ; } else if($currentPage < 5 && $ct <= 5 ) { $cct = $ct ; $start = 1 ; } else { $start = $currentPage - 4 ; if($start <= 0 ) $start = 1 ; $cct = $currentPage ; } for($i=$start;$i<=$cct;$i++) { if($currentPage == $i || !trim($currentPage) && $i == 1) $paging .= ''.$i.''; else $paging .= ''.$i.''; } if( trim($currentPage) == "" ) $currentPage++ ; if( $currentPage < $ct ) $pagingNext = 'Next » '; else $pagingNext = 'Next »'; $paging = $pagingPrevious.$pagingStart.$paging.$pagingEnd.$pagingNext ; } else { $paging = "" ; } if( $currentNum ) { $currentShowRange = (($currentPage - 1) * $this->rpp2)?(($currentPage - 1) * $this->rpp2)+1 :1 ; $totalRecordNumber = ( ( $currentPage - 1 ) * $this->rpp2 ) + $currentNum ; // $showingRecords = "Showing Records : ".$currentShowRange." To ".$totalRecordNumber." OF ".$num ; } else $showingRecords = "" ; $finalPagination .= $paging ; return $finalPagination ; } /* Paging for review end (vikrant) */ /* Paging for review start (vikrant) */ function touristplace_review_paging($num , $currentPage , $currentNum) { if($num>$this->rpp2) { $ct = $num / $this->rpp2 ; $ct = ceil($ct) ; if( $currentPage > 1 ) $pagingPrevious ='« Previous '; else $pagingPrevious = '« Previous' ; if($currentPage < $ct && $ct > 5) $pagingEnd = "" ; else $pagingEnd = "" ; if($currentPage > 5 ) $pagingStart = "" ; else $pagingStart = "" ; if( $currentPage < 5 && $ct > 5) { $cct = 5 ; $start = 1 ; } else if($currentPage < 5 && $ct <= 5 ) { $cct = $ct ; $start = 1 ; } else { $start = $currentPage - 4 ; if($start <= 0 ) $start = 1 ; $cct = $currentPage ; } for($i=$start;$i<=$cct;$i++) { if($currentPage == $i || !trim($currentPage) && $i == 1) $paging .= ''.$i.''; else $paging .= ''.$i.''; } if( trim($currentPage) == "" ) $currentPage++ ; if( $currentPage < $ct ) $pagingNext = 'Next » '; else $pagingNext = 'Next »'; $paging = $pagingPrevious.$pagingStart.$paging.$pagingEnd.$pagingNext ; } else { $paging = "" ; } if( $currentNum ) { $currentShowRange = (($currentPage - 1) * $this->rpp2)?(($currentPage - 1) * $this->rpp2)+1 :1 ; $totalRecordNumber = ( ( $currentPage - 1 ) * $this->rpp2 ) + $currentNum ; // $showingRecords = "Showing Records : ".$currentShowRange." To ".$totalRecordNumber." OF ".$num ; } else $showingRecords = "" ; $finalPagination .= $paging ; return $finalPagination ; } /* Paging for review end (vikrant) */ /* Paging for review start (vikrant) */ function restaurant_review_paging($num , $currentPage , $currentNum) { if($num>$this->rpp2) { $ct = $num / $this->rpp2 ; $ct = ceil($ct) ; if( $currentPage > 1 ) $pagingPrevious ='« Previous '; else $pagingPrevious = '« Previous' ; if($currentPage < $ct && $ct > 5) $pagingEnd = "" ; else $pagingEnd = "" ; if($currentPage > 5 ) $pagingStart = "" ; else $pagingStart = "" ; if( $currentPage < 5 && $ct > 5) { $cct = 5 ; $start = 1 ; } else if($currentPage < 5 && $ct <= 5 ) { $cct = $ct ; $start = 1 ; } else { $start = $currentPage - 4 ; if($start <= 0 ) $start = 1 ; $cct = $currentPage ; } for($i=$start;$i<=$cct;$i++) { if($currentPage == $i || !trim($currentPage) && $i == 1) $paging .= ''.$i.''; else $paging .= ''.$i.''; } if( trim($currentPage) == "" ) $currentPage++ ; if( $currentPage < $ct ) $pagingNext = 'Next » '; else $pagingNext = 'Next »'; $paging = $pagingPrevious.$pagingStart.$paging.$pagingEnd.$pagingNext ; } else { $paging = "" ; } if( $currentNum ) { $currentShowRange = (($currentPage - 1) * $this->rpp2)?(($currentPage - 1) * $this->rpp2)+1 :1 ; $totalRecordNumber = ( ( $currentPage - 1 ) * $this->rpp2 ) + $currentNum ; // $showingRecords = "Showing Records : ".$currentShowRange." To ".$totalRecordNumber." OF ".$num ; } else $showingRecords = "" ; $finalPagination .= $paging ; return $finalPagination ; } /* Paging for review end (vikrant) */ /* Paging for review start (vikrant) */ function travelagent_review_paging($num , $currentPage , $currentNum) { if($num>$this->rpp2) { $ct = $num / $this->rpp2 ; $ct = ceil($ct) ; if( $currentPage > 1 ) $pagingPrevious ='« Previous '; else $pagingPrevious = '« Previous' ; if($currentPage < $ct && $ct > 5) $pagingEnd = "" ; else $pagingEnd = "" ; if($currentPage > 5 ) $pagingStart = "" ; else $pagingStart = "" ; if( $currentPage < 5 && $ct > 5) { $cct = 5 ; $start = 1 ; } else if($currentPage < 5 && $ct <= 5 ) { $cct = $ct ; $start = 1 ; } else { $start = $currentPage - 4 ; if($start <= 0 ) $start = 1 ; $cct = $currentPage ; } for($i=$start;$i<=$cct;$i++) { if($currentPage == $i || !trim($currentPage) && $i == 1) $paging .= ''.$i.''; else $paging .= ''.$i.''; } if( trim($currentPage) == "" ) $currentPage++ ; if( $currentPage < $ct ) $pagingNext = 'Next » '; else $pagingNext = 'Next »'; $paging = $pagingPrevious.$pagingStart.$paging.$pagingEnd.$pagingNext ; } else { $paging = "" ; } if( $currentNum ) { $currentShowRange = (($currentPage - 1) * $this->rpp2)?(($currentPage - 1) * $this->rpp2)+1 :1 ; $totalRecordNumber = ( ( $currentPage - 1 ) * $this->rpp2 ) + $currentNum ; // $showingRecords = "Showing Records : ".$currentShowRange." To ".$totalRecordNumber." OF ".$num ; } else $showingRecords = "" ; $finalPagination .= $paging ; return $finalPagination ; } /* Paging for review end (vikrant) */ // Hotel Paging Start /* paging for user panel reviews start */ function userpanel_review_paging($num , $currentPage , $currentNum) { if($num>$this->rpp1) { $ct = $num / $this->rpp1 ; $ct = ceil($ct) ; if( $currentPage > 1 ) $pagingPrevious ='« Previous '; else $pagingPrevious = '« Previous' ; if($currentPage < $ct && $ct > 5) $pagingEnd = "" ; else $pagingEnd = "" ; if($currentPage > 5 ) $pagingStart = "" ; else $pagingStart = "" ; if( $currentPage < 5 && $ct > 5) { $cct = 5 ; $start = 1 ; } else if($currentPage < 5 && $ct <= 5 ) { $cct = $ct ; $start = 1 ; } else { $start = $currentPage - 4 ; if($start <= 0 ) $start = 1 ; $cct = $currentPage ; } for($i=$start;$i<=$cct;$i++) { if($currentPage == $i || !trim($currentPage) && $i == 1) $paging .= ''.$i.''; else $paging .= ''.$i.''; } if( trim($currentPage) == "" ) $currentPage++ ; if( $currentPage < $ct ) $pagingNext = 'Next » '; else $pagingNext = 'Next »'; $paging = $pagingPrevious.$pagingStart.$paging.$pagingEnd.$pagingNext ; } else { $paging = "" ; } if( $currentNum ) { $currentShowRange = (($currentPage - 1) * $this->rpp1)?(($currentPage - 1) * $this->rpp1)+1 :1 ; $totalRecordNumber = ( ( $currentPage - 1 ) * $this->rpp1 ) + $currentNum ; // $showingRecords = "Showing Records : ".$currentShowRange." To ".$totalRecordNumber." OF ".$num ; } else $showingRecords = "" ; $finalPagination .= $paging ; return $finalPagination ; } /* paging for user panel reviews end */ // Hotel Paging Start function hotelpaging($num , $currentPage , $currentNum) { if($num>$this->rpp1) { $ct = $num / $this->rpp1 ; $ct = ceil($ct) ; if( $currentPage > 1 ) $pagingPrevious ='« Previous '; else $pagingPrevious = '« Previous' ; if($currentPage < $ct && $ct > 5) $pagingEnd = "" ; else $pagingEnd = "" ; if($currentPage > 5 ) $pagingStart = "" ; else $pagingStart = "" ; if( $currentPage < 5 && $ct > 5) { $cct = 5 ; $start = 1 ; } else if($currentPage < 5 && $ct <= 5 ) { $cct = $ct ; $start = 1 ; } else { $start = $currentPage - 4 ; if($start <= 0 ) $start = 1 ; $cct = $currentPage ; } for($i=$start;$i<=$cct;$i++) { if($currentPage == $i || !trim($currentPage) && $i == 1) $paging .= ''.$i.''; else $paging .= ''.$i.''; } if( trim($currentPage) == "" ) $currentPage++ ; if( $currentPage < $ct ) $pagingNext = 'Next » '; else $pagingNext = 'Next »'; $paging = $pagingPrevious.$pagingStart.$paging.$pagingEnd.$pagingNext ; } else { $paging = "" ; } if( $currentNum ) { $currentShowRange = (($currentPage - 1) * $this->rpp1)?(($currentPage - 1) * $this->rpp1)+1 :1 ; $totalRecordNumber = ( ( $currentPage - 1 ) * $this->rpp1 ) + $currentNum ; // $showingRecords = "Showing Records : ".$currentShowRange." To ".$totalRecordNumber." OF ".$num ; } else $showingRecords = "" ; $finalPagination .= $paging ; return $finalPagination ; } function search_hotelpaging($num , $currentPage , $currentNum) { if($num>$this->rpp1) { $ct = $num / $this->rpp1 ; $ct = ceil($ct) ; if( $currentPage > 1 ) $pagingPrevious ='« Previous '; else $pagingPrevious = '« Previous' ; if($currentPage < $ct && $ct > 5) $pagingEnd = "" ; else $pagingEnd = "" ; if($currentPage > 5 ) $pagingStart = "" ; else $pagingStart = "" ; if( $currentPage < 5 && $ct > 5) { $cct = 5 ; $start = 1 ; } else if($currentPage < 5 && $ct <= 5 ) { $cct = $ct ; $start = 1 ; } else { $start = $currentPage - 4 ; if($start <= 0 ) $start = 1 ; $cct = $currentPage ; } for($i=$start;$i<=$cct;$i++) { if($currentPage == $i || !trim($currentPage) && $i == 1) $paging .= ''.$i.''; else $paging .= ''.$i.''; } if( trim($currentPage) == "" ) $currentPage++ ; if( $currentPage < $ct ) $pagingNext = 'Next » '; else $pagingNext = 'Next »'; $paging = $pagingPrevious.$pagingStart.$paging.$pagingEnd.$pagingNext ; } else { $paging = "" ; } if( $currentNum ) { $currentShowRange = (($currentPage - 1) * $this->rpp1)?(($currentPage - 1) * $this->rpp1)+1 :1 ; $totalRecordNumber = ( ( $currentPage - 1 ) * $this->rpp1 ) + $currentNum ; // $showingRecords = "Showing Records : ".$currentShowRange." To ".$totalRecordNumber." OF ".$num ; } else $showingRecords = "" ; $finalPagination .= $paging ; return $finalPagination ; } function search_citypaging($num , $currentPage , $currentNum) { if($num>$this->rpp1) { $ct = $num / $this->rpp1 ; $ct = ceil($ct) ; if( $currentPage > 1 ) $pagingPrevious ='« Previous '; else $pagingPrevious = '« Previous' ; if($currentPage < $ct && $ct > 5) $pagingEnd = "" ; else $pagingEnd = "" ; if($currentPage > 5 ) $pagingStart = "" ; else $pagingStart = "" ; if( $currentPage < 5 && $ct > 5) { $cct = 5 ; $start = 1 ; } else if($currentPage < 5 && $ct <= 5 ) { $cct = $ct ; $start = 1 ; } else { $start = $currentPage - 4 ; if($start <= 0 ) $start = 1 ; $cct = $currentPage ; } for($i=$start;$i<=$cct;$i++) { if($currentPage == $i || !trim($currentPage) && $i == 1) $paging .= ''.$i.''; else $paging .= ''.$i.''; } if( trim($currentPage) == "" ) $currentPage++ ; if( $currentPage < $ct ) $pagingNext = 'Next » '; else $pagingNext = 'Next »'; $paging = $pagingPrevious.$pagingStart.$paging.$pagingEnd.$pagingNext ; } else { $paging = "" ; } if( $currentNum ) { $currentShowRange = (($currentPage - 1) * $this->rpp1)?(($currentPage - 1) * $this->rpp1)+1 :1 ; $totalRecordNumber = ( ( $currentPage - 1 ) * $this->rpp1 ) + $currentNum ; // $showingRecords = "Showing Records : ".$currentShowRange." To ".$totalRecordNumber." OF ".$num ; } else $showingRecords = "" ; $finalPagination .= $paging ; return $finalPagination ; } function search_travelagentpaging($num , $currentPage , $currentNum) { if($num>$this->rpp1) { $ct = $num / $this->rpp1 ; $ct = ceil($ct) ; if( $currentPage > 1 ) $pagingPrevious ='« Previous '; else $pagingPrevious = '« Previous' ; if($currentPage < $ct && $ct > 5) $pagingEnd = "" ; else $pagingEnd = "" ; if($currentPage > 5 ) $pagingStart = "" ; else $pagingStart = "" ; if( $currentPage < 5 && $ct > 5) { $cct = 5 ; $start = 1 ; } else if($currentPage < 5 && $ct <= 5 ) { $cct = $ct ; $start = 1 ; } else { $start = $currentPage - 4 ; if($start <= 0 ) $start = 1 ; $cct = $currentPage ; } for($i=$start;$i<=$cct;$i++) { if($currentPage == $i || !trim($currentPage) && $i == 1) $paging .= ''.$i.''; else $paging .= ''.$i.''; } if( trim($currentPage) == "" ) $currentPage++ ; if( $currentPage < $ct ) $pagingNext = 'Next » '; else $pagingNext = 'Next »'; $paging = $pagingPrevious.$pagingStart.$paging.$pagingEnd.$pagingNext ; } else { $paging = "" ; } if( $currentNum ) { $currentShowRange = (($currentPage - 1) * $this->rpp1)?(($currentPage - 1) * $this->rpp1)+1 :1 ; $totalRecordNumber = ( ( $currentPage - 1 ) * $this->rpp1 ) + $currentNum ; // $showingRecords = "Showing Records : ".$currentShowRange." To ".$totalRecordNumber." OF ".$num ; } else $showingRecords = "" ; $finalPagination .= $paging ; return $finalPagination ; } function search_touristplacepaging($num , $currentPage , $currentNum) { if($num>$this->rpp1) { $ct = $num / $this->rpp1 ; $ct = ceil($ct) ; if( $currentPage > 1 ) $pagingPrevious ='« Previous '; else $pagingPrevious = '« Previous' ; if($currentPage < $ct && $ct > 5) $pagingEnd = "" ; else $pagingEnd = "" ; if($currentPage > 5 ) $pagingStart = "" ; else $pagingStart = "" ; if( $currentPage < 5 && $ct > 5) { $cct = 5 ; $start = 1 ; } else if($currentPage < 5 && $ct <= 5 ) { $cct = $ct ; $start = 1 ; } else { $start = $currentPage - 4 ; if($start <= 0 ) $start = 1 ; $cct = $currentPage ; } for($i=$start;$i<=$cct;$i++) { if($currentPage == $i || !trim($currentPage) && $i == 1) $paging .= ''.$i.''; else $paging .= ''.$i.''; } if( trim($currentPage) == "" ) $currentPage++ ; if( $currentPage < $ct ) $pagingNext = 'Next » '; else $pagingNext = 'Next »'; $paging = $pagingPrevious.$pagingStart.$paging.$pagingEnd.$pagingNext ; } else { $paging = "" ; } if( $currentNum ) { $currentShowRange = (($currentPage - 1) * $this->rpp1)?(($currentPage - 1) * $this->rpp1)+1 :1 ; $totalRecordNumber = ( ( $currentPage - 1 ) * $this->rpp1 ) + $currentNum ; // $showingRecords = "Showing Records : ".$currentShowRange." To ".$totalRecordNumber." OF ".$num ; } else $showingRecords = "" ; $finalPagination .= $paging ; return $finalPagination ; } function search_restaurantpaging($num , $currentPage , $currentNum) { if($num>$this->rpp1) { $ct = $num / $this->rpp1 ; $ct = ceil($ct) ; if( $currentPage > 1 ) $pagingPrevious ='« Previous '; else $pagingPrevious = '« Previous' ; if($currentPage < $ct && $ct > 5) $pagingEnd = "" ; else $pagingEnd = "" ; if($currentPage > 5 ) $pagingStart = "" ; else $pagingStart = "" ; if( $currentPage < 5 && $ct > 5) { $cct = 5 ; $start = 1 ; } else if($currentPage < 5 && $ct <= 5 ) { $cct = $ct ; $start = 1 ; } else { $start = $currentPage - 4 ; if($start <= 0 ) $start = 1 ; $cct = $currentPage ; } for($i=$start;$i<=$cct;$i++) { if($currentPage == $i || !trim($currentPage) && $i == 1) $paging .= ''.$i.''; else $paging .= ''.$i.''; } if( trim($currentPage) == "" ) $currentPage++ ; if( $currentPage < $ct ) $pagingNext = 'Next » '; else $pagingNext = 'Next »'; $paging = $pagingPrevious.$pagingStart.$paging.$pagingEnd.$pagingNext ; } else { $paging = "" ; } if( $currentNum ) { $currentShowRange = (($currentPage - 1) * $this->rpp1)?(($currentPage - 1) * $this->rpp1)+1 :1 ; $totalRecordNumber = ( ( $currentPage - 1 ) * $this->rpp1 ) + $currentNum ; // $showingRecords = "Showing Records : ".$currentShowRange." To ".$totalRecordNumber." OF ".$num ; } else $showingRecords = "" ; $finalPagination .= $paging ; return $finalPagination ; } /* Paging for review start (vikrant) */ function paging($num , $currentPage , $currentNum,$rpp='',$callfunction='') { if(trim($rpp)) $rpp=$rpp; else $rpp=10; if(trim($callfunction)) $callfunction=$callfunction; else $callfunction='getpage'; if($num>$rpp) { $ct = $num / $rpp ; $ct = ceil($ct) ; if( $currentPage > 1 ) $pagingPrevious ='
  • « Previous
  • '; else $pagingPrevious = '' ; // $pagingPrevious = '
  • « Previous
  • ' ; if($currentPage < $ct && $ct > 5) $pagingEnd = '
  • ...
  • ' ; else $pagingEnd = "" ; if($currentPage > 5 ) $pagingStart = '
  • ...
  • ' ; else $pagingStart = "" ; if( $currentPage < 5 && $ct > 5) { $cct = 5 ; $start = 1 ; } else if($currentPage < 5 && $ct <= 5 ) { $cct = $ct ; $start = 1 ; } else { $start = $currentPage - 4 ; if($start <= 0 ) $start = 1 ; $cct = $currentPage ; } for($i=$start;$i<=$cct;$i++) { if($currentPage == $i || !trim($currentPage) && $i == 1) $paging .= '
  • '.$i.'
  • '; else $paging .= '
  • '.$i.'
  • '; } if( trim($currentPage) == "" ) $currentPage++ ; if( $currentPage < $ct ) $pagingNext = '
  • Next »
  • '; else // $pagingNext = '
  • Next »
  • '; $pagingNext = ''; $paging = $pagingPrevious.$pagingStart.$paging.$pagingEnd.$pagingNext ; } else { $paging = "" ; } if( $currentNum ) { $currentShowRange = (($currentPage - 1) * $rpp)?(($currentPage - 1) * $rpp)+1 :1 ; $totalRecordNumber = ( ( $currentPage - 1 ) * $rpp ) + $currentNum ; } else $showingRecords = "" ; $finalPagination .= $paging ; return $finalPagination ; } /* Restaurant Paging start */ function restaurantpaging($num , $currentPage , $currentNum) { if($num>$this->rpp1) { $ct = $num / $this->rpp1 ; $ct = ceil($ct) ; if( $currentPage > 1 ) $pagingPrevious ='« Previous '; else $pagingPrevious = '« Previous' ; if($currentPage < $ct && $ct > 5) $pagingEnd = "" ; else $pagingEnd = "" ; if($currentPage > 5 ) $pagingStart = "" ; else $pagingStart = "" ; if( $currentPage < 5 && $ct > 5) { $cct = 5 ; $start = 1 ; } else if($currentPage < 5 && $ct <= 5 ) { $cct = $ct ; $start = 1 ; } else { $start = $currentPage - 4 ; if($start <= 0 ) $start = 1 ; $cct = $currentPage ; } for($i=$start;$i<=$cct;$i++) { if($currentPage == $i || !trim($currentPage) && $i == 1) $paging .= ''.$i.''; else $paging .= ''.$i.''; } if( trim($currentPage) == "" ) $currentPage++ ; if( $currentPage < $ct ) $pagingNext = 'Next » '; else $pagingNext = 'Next »'; $paging = $pagingPrevious.$pagingStart.$paging.$pagingEnd.$pagingNext ; } else { $paging = "" ; } if( $currentNum ) { $currentShowRange = (($currentPage - 1) * $this->rpp1)?(($currentPage - 1) * $this->rpp1)+1 :1 ; $totalRecordNumber = ( ( $currentPage - 1 ) * $this->rpp1 ) + $currentNum ; // $showingRecords = "Showing Records : ".$currentShowRange." To ".$totalRecordNumber." OF ".$num ; } else $showingRecords = "" ; $finalPagination .= $paging ; return $finalPagination ; } function restaurantpaging_name($num , $currentPage , $currentNum) { if($num>$this->rpp1) { $ct = $num / $this->rpp1 ; $ct = ceil($ct) ; if( $currentPage > 1 ) $pagingPrevious ='« Previous '; else $pagingPrevious = '« Previous' ; if($currentPage < $ct && $ct > 5) $pagingEnd = "" ; else $pagingEnd = "" ; if($currentPage > 5 ) $pagingStart = "" ; else $pagingStart = "" ; if( $currentPage < 5 && $ct > 5) { $cct = 5 ; $start = 1 ; } else if($currentPage < 5 && $ct <= 5 ) { $cct = $ct ; $start = 1 ; } else { $start = $currentPage - 4 ; if($start <= 0 ) $start = 1 ; $cct = $currentPage ; } for($i=$start;$i<=$cct;$i++) { if($currentPage == $i || !trim($currentPage) && $i == 1) $paging .= ''.$i.''; else $paging .= ''.$i.''; } if( trim($currentPage) == "" ) $currentPage++ ; if( $currentPage < $ct ) $pagingNext = 'Next » '; else $pagingNext = 'Next »'; $paging = $pagingPrevious.$pagingStart.$paging.$pagingEnd.$pagingNext ; } else { $paging = "" ; } if( $currentNum ) { $currentShowRange = (($currentPage - 1) * $this->rpp1)?(($currentPage - 1) * $this->rpp1)+1 :1 ; $totalRecordNumber = ( ( $currentPage - 1 ) * $this->rpp1 ) + $currentNum ; // $showingRecords = "Showing Records : ".$currentShowRange." To ".$totalRecordNumber." OF ".$num ; } else $showingRecords = "" ; $finalPagination .= $paging ; return $finalPagination ; } /* Restaurant Paging end */ // Hotel Paging End /* Travel agent paging start */ function travelagentpaging($num , $currentPage , $currentNum) { if($num>$this->rpp1) { $ct = $num / $this->rpp1 ; $ct = ceil($ct) ; if( $currentPage > 1 ) $pagingPrevious ='« Previous '; else $pagingPrevious = '« Previous' ; if($currentPage < $ct && $ct > 5) $pagingEnd = "" ; else $pagingEnd = "" ; if($currentPage > 5 ) $pagingStart = "" ; else $pagingStart = "" ; if( $currentPage < 5 && $ct > 5) { $cct = 5 ; $start = 1 ; } else if($currentPage < 5 && $ct <= 5 ) { $cct = $ct ; $start = 1 ; } else { $start = $currentPage - 4 ; if($start <= 0 ) $start = 1 ; $cct = $currentPage ; } for($i=$start;$i<=$cct;$i++) { if($currentPage == $i || !trim($currentPage) && $i == 1) $paging .= ''.$i.''; else $paging .= ''.$i.''; } if( trim($currentPage) == "" ) $currentPage++ ; if( $currentPage < $ct ) $pagingNext = 'Next » '; else $pagingNext = 'Next »'; $paging = $pagingPrevious.$pagingStart.$paging.$pagingEnd.$pagingNext ; } else { $paging = "" ; } if( $currentNum ) { $currentShowRange = (($currentPage - 1) * $this->rpp1)?(($currentPage - 1) * $this->rpp1)+1 :1 ; $totalRecordNumber = ( ( $currentPage - 1 ) * $this->rpp1 ) + $currentNum ; // $showingRecords = "Showing Records : ".$currentShowRange." To ".$totalRecordNumber." OF ".$num ; } else $showingRecords = "" ; $finalPagination .= $paging ; return $finalPagination ; } function travelagentpaging_name($num , $currentPage , $currentNum) { if($num>$this->rpp1) { $ct = $num / $this->rpp1 ; $ct = ceil($ct) ; if( $currentPage > 1 ) $pagingPrevious ='« Previous '; else $pagingPrevious = '« Previous' ; if($currentPage < $ct && $ct > 5) $pagingEnd = "" ; else $pagingEnd = "" ; if($currentPage > 5 ) $pagingStart = "" ; else $pagingStart = "" ; if( $currentPage < 5 && $ct > 5) { $cct = 5 ; $start = 1 ; } else if($currentPage < 5 && $ct <= 5 ) { $cct = $ct ; $start = 1 ; } else { $start = $currentPage - 4 ; if($start <= 0 ) $start = 1 ; $cct = $currentPage ; } for($i=$start;$i<=$cct;$i++) { if($currentPage == $i || !trim($currentPage) && $i == 1) $paging .= ''.$i.''; else $paging .= ''.$i.''; } if( trim($currentPage) == "" ) $currentPage++ ; if( $currentPage < $ct ) $pagingNext = 'Next » '; else $pagingNext = 'Next »'; $paging = $pagingPrevious.$pagingStart.$paging.$pagingEnd.$pagingNext ; } else { $paging = "" ; } if( $currentNum ) { $currentShowRange = (($currentPage - 1) * $this->rpp1)?(($currentPage - 1) * $this->rpp1)+1 :1 ; $totalRecordNumber = ( ( $currentPage - 1 ) * $this->rpp1 ) + $currentNum ; // $showingRecords = "Showing Records : ".$currentShowRange." To ".$totalRecordNumber." OF ".$num ; } else $showingRecords = "" ; $finalPagination .= $paging ; return $finalPagination ; } /* Travel agent paging end */ // Hotel Paging Start function hotelpaging_name_locality($num , $currentPage , $currentNum) { if($num>$this->rpp1) { $ct = $num / $this->rpp1 ; $ct = ceil($ct) ; if( $currentPage > 1 ) $pagingPrevious ='« Previous '; else $pagingPrevious = '« Previous' ; if($currentPage < $ct && $ct > 5) $pagingEnd = "" ; else $pagingEnd = "" ; if($currentPage > 5 ) $pagingStart = "" ; else $pagingStart = "" ; if( $currentPage < 5 && $ct > 5) { $cct = 5 ; $start = 1 ; } else if($currentPage < 5 && $ct <= 5 ) { $cct = $ct ; $start = 1 ; } else { $start = $currentPage - 4 ; if($start <= 0 ) $start = 1 ; $cct = $currentPage ; } for($i=$start;$i<=$cct;$i++) { if($currentPage == $i || !trim($currentPage) && $i == 1) $paging .= ''.$i.''; else $paging .= ''.$i.''; } if( trim($currentPage) == "" ) $currentPage++ ; if( $currentPage < $ct ) $pagingNext = 'Next » '; else $pagingNext = 'Next »'; $paging = $pagingPrevious.$pagingStart.$paging.$pagingEnd.$pagingNext ; } else { $paging = "" ; } if( $currentNum ) { $currentShowRange = (($currentPage - 1) * $this->rpp1)?(($currentPage - 1) * $this->rpp1)+1 :1 ; $totalRecordNumber = ( ( $currentPage - 1 ) * $this->rpp1 ) + $currentNum ; // $showingRecords = "Showing Records : ".$currentShowRange." To ".$totalRecordNumber." OF ".$num ; } else $showingRecords = "" ; $finalPagination .= $paging ; return $finalPagination ; } // Hotel Paging End /* tourist place paging start */ function touristplacepaging($num , $currentPage , $currentNum) { if($num>$this->rpp1) { $ct = $num / $this->rpp1 ; $ct = ceil($ct) ; if( $currentPage > 1 ) $pagingPrevious ='« Previous '; else $pagingPrevious = '« Previous' ; if($currentPage < $ct && $ct > 5) $pagingEnd = "" ; else $pagingEnd = "" ; if($currentPage > 5 ) $pagingStart = "" ; else $pagingStart = "" ; if( $currentPage < 5 && $ct > 5) { $cct = 5 ; $start = 1 ; } else if($currentPage < 5 && $ct <= 5 ) { $cct = $ct ; $start = 1 ; } else { $start = $currentPage - 4 ; if($start <= 0 ) $start = 1 ; $cct = $currentPage ; } for($i=$start;$i<=$cct;$i++) { if($currentPage == $i || !trim($currentPage) && $i == 1) $paging .= ''.$i.''; else $paging .= ''.$i.''; } if( trim($currentPage) == "" ) $currentPage++ ; if( $currentPage < $ct ) $pagingNext = 'Next » '; else $pagingNext = 'Next »'; $paging = $pagingPrevious.$pagingStart.$paging.$pagingEnd.$pagingNext ; } else { $paging = "" ; } if( $currentNum ) { $currentShowRange = (($currentPage - 1) * $this->rpp1)?(($currentPage - 1) * $this->rpp1)+1 :1 ; $totalRecordNumber = ( ( $currentPage - 1 ) * $this->rpp1 ) + $currentNum ; // $showingRecords = "Showing Records : ".$currentShowRange." To ".$totalRecordNumber." OF ".$num ; } else $showingRecords = "" ; $finalPagination .= $paging ; return $finalPagination ; } /* tourist place paging end */ // Another function for paging style start function displayPagingStyle1($num , $currentPage , $currentNum) { if($num>$this->rpp2) { $ct = $num / $this->rpp2 ; $ct = ceil($ct) ; if( $currentPage > 1 ) $pagingPrevious = "Previous" ; else $pagingPrevious = "Previous" ; if($currentPage < $ct && $ct > 5) $pagingEnd = " ..." ; else $pagingEnd = "" ; if($currentPage > 5 ) $pagingStart = "... " ; else $pagingStart = "" ; if( $currentPage < 5 && $ct > 5) { $cct = 5 ; $start = 1 ; } else if($currentPage < 5 && $ct <= 5 ) { $cct = $ct ; $start = 1 ; } else { $start = $currentPage - 4 ; if($start <= 0 ) $start = 1 ; $cct = $currentPage ; } for($i=$start;$i<=$cct;$i++) { if($currentPage == $i || !trim($currentPage) && $i == 1) $paging .= " $i;" ; else $paging .= " $i;" ; } if( trim($currentPage) == "" ) $currentPage++ ; if( $currentPage < $ct ) $pagingNext = "Next" ; else $pagingNext = "Next" ; $paging = $pagingPrevious.$pagingStart.$paging.$pagingEnd.$pagingNext ; } else { $paging = "" ; } if( $currentNum ) { $currentShowRange = (($currentPage - 1) * $this->rpp2)?(($currentPage - 1) * $this->rpp2)+1 :1 ; $totalRecordNumber = ( ( $currentPage - 1 ) * $this->rpp2 ) + $currentNum ; // $showingRecords = "Showing Records : ".$currentShowRange." To ".$totalRecordNumber." OF ".$num ; } else $showingRecords = "" ; ////// display number of records and pagination $finalPagination = "" ; $finalPagination .= " ".$showingRecords." " ; $finalPagination .= "".$paging ."" ; return $finalPagination ; } // Another function for paging style end // Function for alternate css for row start function getClassName($count) { if( $count % 2 == 0 ) $class = "alternateList" ; else $class = "List" ; return $class ; } /* Function for creating Alphabetic string Start Coded By : Vikrant S. Ghan */ function get_array($key) { $encode_arr[]=''; for ($i=0; $isecretkey; $stringlimit1=$this->stringlimit; $encode_arr=$this->get_array($secretkey1); if (strlen($id)<$stringlimit1) { $temp_count=$stringlimit1-strlen($id); $tempid=""; for ($i=0; $i<$temp_count; $i++) { $tempid.=0; } $id=$tempid.$id; } $temp_str=''; for ($i=0; $isecretkey; $encode_arr=$this->get_array($secretkey1); $temp_str=''; for ($i=0; $i=1) { if($encode_arr[$j]==$temp) { $temp_str.=$j;} } else { if(($encode_arr[$j]!=$encode_arr[0])) { if($encode_arr[$j]==$temp) { $temp_str.=$j;} } } } } return $temp_str; } /* Function for creating Alphabetic string End */ // Function for alternate css for row end function chkUrl($pageName,$commStr,$cnt) { $this->setTable('pageurl'); $cond = "name='".$pageName."'"; $result = $this->selectSql($cond); $count = $this->getAffectedRows($result); if($count>=1) { if($commStr=='~') { return 'error'; } else { $name=$commStr; $cnt++; if($cnt==1) $pageName.="-".$name; else if($cnt<=50) { $tmppageName=explode("-",$pageName); $tmplen=strlen($tmppageName[count($tmppageName)-1]); $pageName=substr($pageName,0,strlen($pageName)-$tmplen); $pageName.=$cnt; } $this->setTable('pageurl'); $cond = "name='".$pageName."'"; $result = $this->selectSql($cond); $count = $this->getAffectedRows($result); if($count>=1) { if($cnt<=50) return $this->chkUrl($pageName,$tableTypeId,$cnt); else return "error"; } else return $pageName; } } else return $pageName; } function genrateUrl($name) { $name=str_replace("'","",$name); $name=str_replace("-","",$name); $name=str_replace("(","",$name); $name=str_replace(")","",$name); $name=str_replace(",","",$name); $name=str_replace("!","",$name); $name=str_replace("-","",$name); $name=str_replace(".","-",$name); $tempName=explode(" ",$name); $tempNameStr=''; for($i=0; $i
    Fatal error: Class 'commonclass' not found in /home/econeeds/public_html/include/classObj.php on line 5