format( 'd M Y H:i' ); $time_now = strtotime("$dt"); function Duration($s, $e){ $timestamp = $e - $s; $years=floor($timestamp/(60*60*24*365));$timestamp%=60*60*24*365; $weeks=floor($timestamp/(60*60*24*7));$timestamp%=60*60*24*7; $days=floor($timestamp/(60*60*24));$timestamp%=60*60*24; $hrs=floor($timestamp/(60*60));$timestamp%=60*60; $mins=floor($timestamp/60);$secs=$timestamp%60; /* if ($years >= 1) { $str.= $years.' years '; } if ($weeks >= 1) { $str.= $weeks.' weeks '; } if ($days >= 1) { $str.=$days.' days '; } if ($hrs >= 1) { $str.=$hrs.' hours '; } if ($mins >= 1) { $str.=$mins.' minutes '; } */ //--------------------------------------------------- if($days < 1){ if ($hrs >= 1) { $str.=$hrs.' hours '; } if ($mins >= 1) { $str.=$mins.' minutes '; } }else{ $str = '2'; } return $str; } //----- ------ --------- ------- -------- -------- --------- -------- -------- ------- ------ --- function duration_last($s, $e){ $timestamp = $e - $s; $days=floor($timestamp/(60*60*24));$timestamp%=60*60*24; if ($days >= 1) { $str.=$days.' days '; } return $str; } //===================================================================== page navigation ==================================== $pr = $_REQUEST['pr']; if(!$pr) $pr = 20; $wn = $_REQUEST['page']; $w = (($wn*$pr)-$pr); $st = $w; if((!$st || ($st < 0))) $st = 0; $slr = round($st/$pr, 0)+2; $next = $st+$pr; if($st <= $pr) { $back = 0; }else{ $back = $st-$pr; } $pct = ($st/20)+1; if(!isset($_REQUEST['p'])){ $tit = ""; }else{ $tit = " - page ".$pct; } //===================================================================== page navigation end ==================================== $srt = "`ad_owner_email` = '$reg_user_mail' $sta"; $page_ulr = "http://www.dialindia.com/$crl"."$cat_url-c$cat_id"."p"; $sql_count = "SELECT * FROM `ad_details` WHERE $srt "; $result_count = mysql_query($sql_count) or die('Error, query failed category ' . mysql_error()); $count = mysql_num_rows($result_count); //============================================================================================================================= $sql_free = "SELECT * FROM `ad_details` WHERE `ad_owner_email` = '$reg_user_mail' AND `status` = '1'"; $result_free = mysql_query($sql_free) or die('Error, query failed category ' . mysql_error()); $count_free = mysql_num_rows($result_free); $sql_premium = "SELECT * FROM `ad_details` WHERE `ad_owner_email` = '$reg_user_mail' AND `payment` != '1/0' AND `status` = '1'"; $result_premium = mysql_query($sql_premium) or die('Error, query failed category ' . mysql_error()); $count_premium = mysql_num_rows($result_premium); $sql_expire = "SELECT * FROM `ad_details` WHERE `ad_owner_email` = '$reg_user_mail' AND `status` = '0'"; $result_expire = mysql_query($sql_expire) or die('Error, query failed category ' . mysql_error()); $count_expire = mysql_num_rows($result_expire); ?> My Ads - Dialindia Classifieds
You are here: Home > Admin
", $description); $description = ''; for($i = 0; $i < count($wordChunks); $i++){ $description .= "$wordChunks[$i] "; } $wordChunks = explode("
", $description); $description = ''; for($i = 0; $i < count($wordChunks); $i++){ $description .= "$wordChunks[$i] "; } $description = removetags($description); $description = substr($description, 0, 200); $ad_status = $rows[status]; $payment = $rows[payment]; $order_id = $rows[order_id]; $cate_id = $rows[category_id]; if($payment != '1/0'){ $cat_details = $sanformation->category_details($cate_id); $stp = $cat_details['one_month']; $ndp = $cat_details['two_month']; $rdp = $cat_details['three_month']; if($payment == '2/0' || $payment == '2/1'){ $ord_duration = '30'; $ord_price = $stp; }elseif($payment == '3/0' || $payment == '3/1'){ $ord_duration = '60'; $ord_price = $ndp; }elseif($payment == '4/0' || $payment == '4/1'){ $ord_duration = '90'; $ord_price = $rdp; } if($ad_status != 0){ $ord_details = "

ORDER ID : $order_id
Order Price : Rs. $ord_price/-
Premium status for : $ord_duration days"; }else{ $ord_details = ""; } }else{ $ord_details = ""; } $city_url_l = $rows['city_url']; $city_name_l = $rows['city_name']; $owner_contact_no = $rows['owner_contact_no']; $views = $rows['views']; $respons = $rows['respons']; $listing_approve_date = $rows['activated_on']; $listing_approve_date_disp = date("F j, Y, g:i a", $listing_approve_date); $images = $rows[photo]; $image_array = explode(",",$images); $count_array = count($image_array); if($count_array == '1' AND $images == ''){ $cnt = '0'; }else{ $cnt = $count_array; } if($rows[photo] != ''){ if($count_array == '0'){ $img = "http://medias.dialindia.com/".$rows[photo]; }else{ $img = "http://medias.dialindia.com/".$image_array[0]; } }else{ $img = "/images/noimage.gif"; } $duration = Duration($listing_approve_date, $time_now); if($duration != '2'){ $duro = $duration.' ago'; }else{ $duro = $listing_approve_date_disp; } $listing_expire_on = $rows['expire_on']; $listing_expire_on_disp = date("F j, Y, g:i a", $listing_expire_on); $duration_last = duration_last($time_now, $listing_expire_on); $locations = $rows[locations]; $locat = substr($locations, 0, -1); $locations_array = explode(",",$locations); if($locations != ''){ $loc = '

Location : '.$locat.'

'; }else{ $loc = ''; } $you_are = $rows[you_are]; $yr = substr($you_are, 1, 50); $yr = substr($yr, 0, -1); if($yr != ''){ $you = ''.$yr.''; }else{ $you = ''; } $price = $rows[price]; if($price != ''){ $pric = 'Rs. '.number_format($price).''; }else{ $pric = ''; } $add_url = "http://www.dialindia.com/$city_url_l/$title_url-v$ad_id.html"; if($plan == '1'){ $class = "whitebox"; }elseif($plan == '2'){ $class = 'yellowbox'; } ?>
...
City :
Mobile :
 
  • Ad ID :
  • |
  • Views:
  • |
  • Responses:
  • |
  • to Expire
  • Expiring today
Make it Live'; }else{ if($payment == '1/0'){ echo 'Make this ad premium'; }elseif($payment == '2/0' || $payment == '3/0' || $payment == '4/0'){ echo 'Payment pending'; }elseif($payment == '2/1' || $payment == '3/1' || $payment == '4/1'){ echo 'Premium Ads'; } } ?>
No ads yet"; } ?>