// Includes the left menu on the left
include("../include/left_menu.php");
?>
|
![](/images/15.gif) |
if(isset($box_mode) == false || $box_mode != 'wo') {
?>
}
?>
function remain_cls($end_time) {
$timestamp=mktime(substr($end_time,8,2),substr($end_time,10,2),0,substr($end_time,4,2),substr($end_time,6,2),substr($end_time,2,2));
$now_time=time();
$remain_time = (int)$timestamp - (int)$now_time;
$t_res = getdate($timestamp);
if((int)$remain_time<=0){
$remain = "Closes";
}elseif($remain_time<3600){
$remain = $t_res[minutes]."m";
}elseif(($remain_time<86400)&&($remain_time>=3600)){
$h= (int)($remain_time/3600);
$m= (int)($remain_time%3600);
$remain = $h."h"." ".(int)($m/60)."m";
}elseif((int)$remain_time>86400){
$remain = $t_res[mday]." ".substr($t_res[month],0,3)." ".substr($t_res[weekday],0,3);
}
return $remain;
}
function remain_cls0($end_time) {
$timestamp=mktime(substr($end_time,8,2),substr($end_time,10,2),0,substr($end_time,4,2),substr($end_time,6,2),substr($end_time,2,2));
$remain01 = date("g:i a , d M y", $timestamp);
return $remain01;
}
function remain_cls1($end_time) { //for index3.php 204
$timestamp=mktime(substr($end_time,8,2),substr($end_time,10,2),0,substr($end_time,4,2),substr($end_time,6,2),substr($end_time,2,2));
$now_time=time();
$remain_time = (int)$timestamp - (int)$now_time;
$d= (int)($remain_time/86400);
$h= (int)($remain_time/3600);
$m= (int)($remain_time%3600);
$hh= (int)($remain_time%86400)/3600;
$hh = (int)$hh;
if((int)$remain_time<=0){
$remain = "closes";
}elseif($remain_time<3600){
$remain = $remain_time/60 ;
$remain = (int)$remain." min" ;
}elseif(($remain_time<86400)&&($remain_time>=3600)){
if($t_res[minutes]==0){
$remain = " ".$h." Hours"." ".(int)($m/60)." m"; //replace sec
}
}elseif((int)$remain_time>86400){
$remain = $d." days"." ".$hh." h"." ".(int)($m/60)." m";
}
return $remain;
}
function remain_cls2($end_time) { //for index3.php 535
$timestamp=mktime(substr($end_time,8,2),substr($end_time,10,2),0,substr($end_time,4,2),substr($end_time,6,2),substr($end_time,2,2));
$now_time=time();
$remain_time = (int)$timestamp - (int)$now_time;
$d= (int)($remain_time/86400);
$h= (int)($remain_time/3600);
$m= (int)($remain_time%3600);
$hh= (int)($remain_time%86400)/3600;
$hh = (int)$hh;
if((int)$remain_time<=0){
$remain = "closes";
}elseif($remain_time<3600){
$remain = $remain_time/60 ;
$remain = (int)$remain." min" ;
}elseif(($remain_time<86400)&&($remain_time>=3600)){
if($t_res[minutes]==0){
$remain = " ".$h." Hours"." ".(int)($m/60)." m"; //replace sec
}
}elseif((int)$remain_time>86400){
$remain = $d." days,"." ".$hh." hr,"." ".(int)($m/60)." mins";
}
return $remain;
}
function remain_cls3($end_time) {
$timestamp=mktime(substr($end_time,8,2),substr($end_time,10,2),0,substr($end_time,4,2),substr($end_time,6,2),substr($end_time,2,2));
$remain01 = date("G:i j/n/y", $timestamp);
return $remain01;
}
function remain_cls4($anum,$connect) {
$query_e="select * from auct_master_join where (anum='$anum' and join_gb='1') order by jnum desc";
// echo $query_e;
$result_e=mysqli_query($connect, $query_e,$connect);
$row_end=mysqli_fetch_array($result_e);
mysqli_free_result($result_e); $timestamp=mktime(substr($row_end[join_created],8,2),substr($row_end[join_created],10,2),0,substr($row_end[join_created],4,2),substr($row_end[join_created],6,2),substr($row_end[join_created],2,2));
$remain04 = date("G:i j/n/y", $timestamp);
return $remain04;
}
/////////////////////////////////////////////////////////////
function my_connect1($host,$id,$pass,$db)
{
$connect=mysqli_connect($host,$id,$pass);
mysqli_select_db($connect, $db);
return $connect;
}
/// local info
?>
if(isset($c) && $c) {
// Skips when it's used for the first depth category
$query = "select * from category where catedep=$cdep and catenum between ($c+1) and ($c+ $range_end) ORDER BY catename";
} else {
$query = "select * from category where catedep=$cdep ORDER BY catename";
}
$result = mysqli_query($connect, $query);
$total=mysqli_num_rows($result);
if(isset($first_cate) && $first_cate) {
$next_range_end = $range_end;
} else {
$range_len = strlen($range_end);
if($range_len >2) {
$next_range_end = substr($range_end,2);
} else {
$next_range_end = 0;
}
}
?>
for($i=0; $row_c=mysqli_fetch_array($result); $i++){
$catenum=$row_c['catenum'];
$catename=stripslashes($row_c['catename']);
$query3 = "select anum from auct_master where (delete_chk=1 and end_chk!='Y') and (catenum between '$catenum' and ('$catenum' + $next_range_end)) ";
$result3 = mysqli_query($connect, $query3);
$total_count = mysqli_num_rows($result3);
if(fmod($i,3) == 0) {
echo("
");
}
echo("
![](/images/point01.gif) |
");
if(isset($page_from) && $page_from == 'index') {
echo("$catename");
} else {
echo("$catename");
}
if(isset($listnum) && $total_count>$listnum){
echo "($total_count)";
}
echo("
|
");
if(fmod($i,3) == 0) {
if(isset($j) && $j == ($total -1)) {
echo("
|
");
} else {
echo("
|
");
}
} else if(fmod($i,3) == 2) {
echo("
");
} else if(fmod($i,3) == 1) {
if(isset($j) && $j == ($total -1)) {
echo("
|
");
} else {
echo("
|
");
}
}
}
// 1st column of Category ends
?>
|
//
// Searching by locations begins
//
?>
if((isset($state) && $state) || (isset($city) && $city) || (isset($town) && $town)) {
echo ("
");
}
//
// Searching by locations ends
//
$location_condt = "";
if(isset($town) && $town) {
$location_condt .= "town_no=".$town;
} else {
if(isset($city) && $city) {
$location_condt .= "city_no=".$city;
} else {
if(isset($state) && $state) {
$location_condt .= "state_no=".$state;
} else {
if(isset($f_left_country) && $f_left_country) {
$location_condt .= "country_no=".$left_country;
}
}
}
}
$where_in_qry = "";
if($location_condt) {
$where_in_qry .= $location_condt;
if(isset($keyword) && $keyword) {
include("../buying/keyword_search.php");
$where_in_qry .= " AND $query0";
}
} else {
if(isset($keyword) && $keyword) {
include("../buying/keyword_search.php");
$where_in_qry = "$query0";
}
}
?>
// Forming a query begins
$select="SELECT * FROM auct_master";
$current_time=date('YmdHis');
if(isset($sort2) && $sort2 == 'closed') {
$sort_2 = "(end_chk = 'Y')";
$selected2_closed=" selected";
} else {
$sort_2 = "(end_chk = '' AND delete_chk='1' )";
if(isset($sort2) && $sort2=="all"){
$sort_2 .= "";
$selected2_all=" selected";
} else if(isset($sort2) && $sort2=="buy_now"){
$sort_2 .= "AND ( auction='2' AND limit_amt !='0.00') ";
$selected2_bnw=" selected";
} else if(isset($sort2) && $sort2=="reserve"){
$sort_2 .= "AND ( auction='2' AND curr_amt >= reserve )";
$selected2_rm=" selected";
} else if(isset($sort2) && $sort2=="no_reserve"){
$sort_2 .= "AND ( auction='2' AND start_amt = reserve ) ";
$selected2_nr=" selected";
} else if(isset($sort2) && $sort2=="used") {
$sort_2 .= "AND ( used='2')";
$selected2_used=" selected";
} else if(isset($sort2) && $sort2=="new") {
$sort_2 .= "AND ( used='1')";
$selected2_new=" selected";
}
}
///category cate_limit
if(isset($c1) && $c1){
$cate_limit = "( catenum BETWEEN $c1 AND $c1+999999 )";
} elseif(isset($c2) && $c2){
$cate_limit = "( catenum BETWEEN $c2 AND $c2+9999 )";
} elseif(isset($c3) && $c3){
$cate_limit = "( catenum BETWEEN $c3 AND $c3+99 )";
} elseif(isset($c4) && $c4){
$cate_limit = "( catenum = $c4 )";
} else {
$cate_limit = "( catenum BETWEEN 1000000 AND 99000000 )";
}
if(isset($sort1) && $sort1=="all") {
$sort_1="";
$selected1_all=" selected";
} else if(isset($sort1) && $sort1=="title") {
$sort_1=" ORDER BY prod_name ASC";
$selected1_title=" selected";
} else if(isset($sort1) && $sort1=="low") {
if(isset($sort1) && $sort1 == 'buy_now') {
$sort_1=" ORDER BY limit_amt ASC";
} else {
$sort_1=" ORDER BY IF(auction='1',start_amt,curr_amt) ASC";
}
$selected1_low=" selected";
} else if(isset($sort1) && $sort1=="hight") {
if(isset($sort1) && $sort1 == 'buy_now') {
$sort_1=" ORDER BY limit_amt DESC";
} else {
$sort_1=" ORDER BY IF(auction='1',start_amt,curr_amt) DESC";
}
$selected1_hi=" selected";
} else if(isset($sort1) && $sort1=="hot") {
$sort_1=" ORDER BY binary(join_cnt) DESC";
$selected1_hot=" selected";
} else if(isset($sort1) && $sort1=="latest") {
$sort_1=" ORDER BY binary(auct_start) DESC";
$selected1_latest=" selected";
} else if(isset($sort1) && $sort1=="close") {
$sort_1=" ORDER BY binary(auct_end) ASC";
$selected1_closing=" selected";
} else {
$sort_1 = " ORDER BY premier ASC, binary(auct_end) ASC";
}
$cond = "";
if(isset($sort_2) && $sort_2) {
$cond .= " AND ".$sort_2;
}
if(isset($where_in_qry) && $where_in_qry) {
$cond .= " AND ".$where_in_qry;
}
if(($cate_limit && !$keyword) || ($cate_limit && $insearch==1 && $keyword)) {
$cond .= " AND ".$cate_limit;
}
if((isset($first_cate) && !$keyword) || (isset($first_cate) && $insearch ==1 && $keyword)) {
$cond .= " AND (frontp=1)";
}
if(isset($_REQUEST['userid']) && $_REQUEST['userid']) {
$cond .= " AND userid='".$_REQUEST['userid']."'";
}
$where_q = " WHERE 1".$cond;
$query_tatal=$select.$where_q.$sort_1; //category limit
//echo $query_tatal;
// Forming a query ends
///category transform
if(isset($c1) && $c1){ $catenum_l=$c1; }
elseif(isset($c2) && $c2){ $catenum_l=$c2; }
elseif(isset($c3) && $c3){ $catenum_l=$c3; }
elseif(isset($c4) && $c4){ $catenum_l=$c4; }
$town=$city=$state='';
if(isset($town) && $town){$town_l = "&town=".$town; }
if(isset($city) && $city){$city_l = "&city=".$city; }
if(isset($state) && $state){$state_l = "&state=".$state; }
$keyword=$insearch='';
if(isset($keyword) && $keyword){$keyword_l = "&keyword=".$keyword; }
if(isset($insearch) && $insearch){$insearch_l = "&insearch=".$insearch; }
if(isset($c1) && $c1){ $catetrans1 = "c1" ; $cate_num=$c1; }
elseif(isset($c2) && $c2){$catetrans1 = "c2" ; $cate_num=$c2; }
elseif(isset($c3) && $c3){$catetrans1 = "c3" ; $cate_num=$c3; }
elseif(isset($c4) && $c4){$catetrans1 = "c4" ; $cate_num=$c4; }
$pass_cate='';
if(isset($catetrans1) && $catetrans1) {
$pass_cate = $catetrans1."=".$cate_num."&";
}
// Sets a url for the shopinfo
$shop_url = "http://sh.totalinfo.co.nz".$_SERVER['PHP_SELF']."?".$pass_cate."state=$state&city=$city&town=$town&keyword=$keyword&insearch=$insearch";
?>
if($_SERVER['PHP_SELF'] != '/buying/seller.php') {
$gate_to = " ";
}
?>
////print_r($_REQUEST);
?>
|
![](/images/15.gif) |
|