H69UNtblNBNpha2dtB1Odn8qYp1Qk5NK2gi7yfceofo9N
/
home
/
ymswebso
/
public_html
/
postads
/
control
/
Nama File / Folder
Size
Action
Wp
--
NONE
css
--
NONE
ddlevelsfiles
--
NONE
editor
--
NONE
images
--
NONE
includes
--
NONE
js
--
NONE
Thumbs.db
5.5KB
Hapus
Edit
Rename
ad_business_listing_search.php
19.885KB
Hapus
Edit
Rename
as-edit-main-image.php
1.42KB
Hapus
Edit
Rename
edit-ad_listing.php
24.004KB
Hapus
Edit
Rename
edit-city-process.php
1.946KB
Hapus
Edit
Rename
edit-city.php
5.485KB
Hapus
Edit
Rename
edit-featured_listing.php
22.988KB
Hapus
Edit
Rename
edit-list-silver-process.php
5.944KB
Hapus
Edit
Rename
edit-states-process.php
1.985KB
Hapus
Edit
Rename
edit-sub-category.php
6.637KB
Hapus
Edit
Rename
fckeditor_php4.php
6.037KB
Hapus
Edit
Rename
feature_ad_edit-process.php
4.382KB
Hapus
Edit
Rename
gold_deal_update_process.php
2.608KB
Hapus
Edit
Rename
gold_sub_image_edit.php
1.733KB
Hapus
Edit
Rename
header.php
7.578KB
Hapus
Edit
Rename
index.php
4.549KB
Hapus
Edit
Rename
main-business-list.php
14.005KB
Hapus
Edit
Rename
main-delite_listing.php
0.502KB
Hapus
Edit
Rename
manage-city.php
5.684KB
Hapus
Edit
Rename
manage-expired-featured.php
18.887KB
Hapus
Edit
Rename
manage-users.php
14.106KB
Hapus
Edit
Rename
new_business-process.php
4.474KB
Hapus
Edit
Rename
news-letter-mail.php
2.75KB
Hapus
Edit
Rename
notfound.php
1.504KB
Hapus
Edit
Rename
send-customer-email-process.php
0.662KB
Hapus
Edit
Rename
send-customer-email.php
2.841KB
Hapus
Edit
Rename
set-expiry-admin.php
3.732KB
Hapus
Edit
Rename
showmaincategories.php
0.455KB
Hapus
Edit
Rename
silver_deal_process.php
1.005KB
Hapus
Edit
Rename
silver_deal_update_process.php
2.641KB
Hapus
Edit
Rename
video-upload-process.php
0.9KB
Hapus
Edit
Rename
<?php include("includes/session.php"); ?> <?php include("checkextension.php"); ?> <?php include("includes/login-verify.php"); ?> <?php include("includes/connection.php"); ?> <?php include("fckeditor.php"); ?> <?php $todays_date = date("Y-m-d"); $today = strtotime($todays_date); $rand_value= $_GET['rand_value']; $listing_id= $_GET['id']; $img= $_GET['img']; $search_text=$_GET['listing_id']; $search_text1=urlencode($search_text); $search_text=ltrim($search_text); $search_text=rtrim($search_text); //////////////////////////////////////////////////////////////////////////////////////////////////// $check_if_numeric=is_numeric($search_text); if($check_if_numeric==1) { $keyword_q1="and id = '$search_text'"; } else { $kt=split(" ",$search_text); // generating for ad title while(list($key,$val)=each($kt)){ if($val<>" " and strlen($val) > 0){$q .= " ad_title like '%$val%' or";}} $keyword_q=substr($q,0,(strLen($q)-3)); $keyword_q1=" and ".$keyword_q; } if($search_text!="") { $keyword_query=$keyword_q1; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Administration - PostAds.com.au</title> <link rel="stylesheet" href="css/stylesheet.css" type="text/css" /> <link rel="stylesheet" type="text/css" href="ddlevelsfiles/ddlevelsmenu-base.css" /> <link rel="stylesheet" type="text/css" href="ddlevelsfiles/ddlevelsmenu-topbar.css" /> <link rel="stylesheet" type="text/css" href="ddlevelsfiles/ddlevelsmenu-sidebar.css" /> <script type="text/javascript" src="ddlevelsfiles/ddlevelsmenu.js"></script> <script language="javascript" src="switchmenu.js" type="text/javascript"></script> <?php $tbl_name=" business_ads"; //your table name // How many adjacent pages should be shown on each side? $adjacents = 3; /* First get total number of rows in data table. If you have a WHERE clause in your query, make sure you mirror it here. */ $query = "SELECT COUNT(*) as num FROM $tbl_name where listing_type = 'ad' and ad_order = '2' and membership_status = 0 order by id desc"; $total_pages = mysql_fetch_array(mysql_query($query)); $total_pages = $total_pages[num]; /* Setup vars for query. */ $targetpage = "manage-expired-featured.php?"; //your file name (the name of this file) $limit = 15; //how many items to show per page $page = $_GET['page']; if($page) $start = ($page - 1) * $limit; //first item to display on this page else $start = 0; //if no page var is given, set start to 0 //echo "SELECT * FROM $tbl_name where listing_type = 'ad' $keyword_query order by id desc LIMIT $start, $limit"; if ($_REQUEST['listing_id']!="") $result = mysql_query("SELECT * FROM $tbl_name where listing_type = 'ad' $keyword_query and ad_order = '2' and membership_status = 0 order by id desc LIMIT $start, $limit"); else $result = mysql_query("SELECT * FROM $tbl_name where listing_type = 'ad' and ad_order = '2' and membership_status = 0 order by id desc LIMIT $start, $limit"); $num=mysql_num_rows($result); /* Setup page vars for display. */ if ($page == 0) $page = 1; //if no page var is given, default to 1. $prev = $page - 1; //previous page is page - 1 $next = $page + 1; //next page is page + 1 $lastpage = ceil($total_pages/$limit); //lastpage is = total pages / items per page, rounded up. $lpm1 = $lastpage - 1; //last page minus 1 /* Now we apply our rules and draw the pagination object. We're actually saving the code to a variable in case we want to draw it more than once. */ $pagination = ""; if($lastpage > 1) { $pagination .= "<div class=\"pagination\">"; //previous button if ($page > 1) $pagination.= "<a href=\"$targetpage&page=$prev\">« previous</a>"; else $pagination.= "<span class=\"disabled\">« previous</span>"; //pages if ($lastpage < 7 + ($adjacents * 2)) //not enough pages to bother breaking it up { for ($counter = 1; $counter <= $lastpage; $counter++) { if ($counter == $page) $pagination.= "<span class=\"current\">$counter</span>"; else $pagination.= "<a href=\"$targetpage&page=$counter\">$counter</a>"; } } elseif($lastpage > 5 + ($adjacents * 2)) //enough pages to hide some { //close to beginning; only hide later pages if($page < 1 + ($adjacents * 2)) { for ($counter = 1; $counter < 4 + ($adjacents * 2); $counter++) { if ($counter == $page) $pagination.= "<span class=\"current\">$counter</span>"; else $pagination.= "<a href=\"$targetpage&page=$counter\">$counter</a>"; } $pagination.= "..."; $pagination.= "<a href=\"$targetpage&page=$lpm1\">$lpm1</a>"; $pagination.= "<a href=\"$targetpage&page=$lastpage\">$lastpage</a>"; } //in middle; hide some front and some back elseif($lastpage - ($adjacents * 2) > $page && $page > ($adjacents * 2)) { $pagination.= "<a href=\"$targetpage&page=1\">1</a>"; $pagination.= "<a href=\"$targetpage&page=2\">2</a>"; $pagination.= "..."; for ($counter = $page - $adjacents; $counter <= $page + $adjacents; $counter++) { if ($counter == $page) $pagination.= "<span class=\"current\">$counter</span>"; else $pagination.= "<a href=\"$targetpage&page=$counter\">$counter</a>"; } $pagination.= "..."; $pagination.= "<a href=\"$targetpage&page=$lpm1\">$lpm1</a>"; $pagination.= "<a href=\"$targetpage&page=$lastpage\">$lastpage</a>"; } //close to end; only hide early pages else { $pagination.= "<a href=\"$targetpage&page=1\">1</a>"; $pagination.= "<a href=\"$targetpage&page=2\">2</a>"; $pagination.= "..."; for ($counter = $lastpage - (2 + ($adjacents * 2)); $counter <= $lastpage; $counter++) { if ($counter == $page) $pagination.= "<span class=\"current\">$counter</span>"; else $pagination.= "<a href=\"$targetpage&page=$counter\">$counter</a>"; } } } //next button if ($page < $counter - 1) $pagination.= "<a href=\"$targetpage&page=$next\">next »</a>"; else $pagination.= "<span class=\"disabled\">next »</span>"; $pagination.= "</div>\n"; } ?> <?php include("menu-files.php"); ?> </head> <body> <?php include("header.php"); ?> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="355" valign="top"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td> </td> </tr> <tr> <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="39%" height="30"><h1><img src="images/customer-icon.png" width="16" height="16" /> Manage Expired Featured Ad Lisitings</h1></td> </tr> </table></td> </tr> <tr> <td bgcolor="#DFDFDF" height="4"></td> </tr> <tr> <td height="12" align="center" class="message"> </td> </tr> </table> <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="48%" align="left" class="mainText"><strong><?php echo "Showing Page ".$page." of ".$lastpage.", Total Expired Ads featured listing: ".$total_pages; ?></strong></td> <td width="52%" align="right"><?php echo $pagination; ?></td> </tr> <tr> <td> </td> <td> </td> </tr> </table> <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#CCCCCC"> <tr> <td width="6%" align="center" nowrap="nowrap" class="mainText" style="background-image:url(images/tdbg.gif); background-repeat:repeat-x;"><strong> ID</strong></td> <td width="17%" align="center" nowrap="nowrap" class="mainText" style="background-image:url(images/tdbg.gif); background-repeat:repeat-x;"><strong> Logo/Image </strong></td> <td width="27%" height="21" align="left" class="mainText" style="background-image:url(images/tdbg.gif); background-repeat:repeat-x; padding-left:12px;"><strong>Listing Info.</strong></td> <td width="21%" height="21" align="center" class="mainText" style="background-image:url(images/tdbg.gif); background-repeat:repeat-x; padding-left:12px;"><strong>Location</strong></td> <td width="14%" align="center" class="mainText" style="background-image:url(images/tdbg.gif); background-repeat:repeat-x;"><strong>Active </strong></td> <td width="21%" align="center" class="mainText" style="background-image:url(images/tdbg.gif); background-repeat:repeat-x;"><strong>Action</strong></td> </tr> <?php if($num >0) { while($row=mysql_fetch_array($result)) { $id=$row['id']; $listing_type=$row['listing_type']; $result_member = mysql_query("select * from listings_membership where listing_id = '$id' and status = '0' "); $num_membership = mysql_num_rows($result_member); while($member = mysql_fetch_array($result_member)) { $membership_end_date=$member['membership_end_date']; $expiration_date = strtotime($membership_end_date); $date_created=explode(' ',$membership_end_date); $date_created1=explode('-',$date_created[0]); $dateArray_time1=explode(' ',$created); $dateArray_time=explode(':',$dateArray_time1[1]); $day_numeric=$date_created1[2]; $month_numeric=$date_created1[1]; $year_numeric=$date_created1[0]; $month_listing_created = date( 'M', mktime(0, 0, 0, $month_numeric) ); @$listing_expire_date = $month_listing_created."-".$day_numeric."-".$year_numeric." ".date('g:i a', mktime($dateArray_time[0], $dateArray_time[1])); } $ad_order=$row['ad_order']; $ad_id=$row['id']; $rand_value=$row['rand_value']; $ad_title=$row['ad_title']; $ad_name_output = str_replace(" ","-",strtolower($ad_title)); $main_category=$row['main_category']; $sub_category=$row['sub_category']; $status=$row['status']; $ad_email = $row['ad_email']; $description=htmlspecialchars_decode($row['description']); $ad_discription = preg_replace("/<[^>]+\>/i", "", $description); if(strlen($ad_discription)>50) { $dot=".."; } else { $dot=""; } $business_ad_image=$row['business_ad_image']; $created=$row['created']; $date_created=explode(' ',$created); $date_created1=explode('-',$date_created[0]); $dateArray_time1=explode(' ',$created); $dateArray_time=explode(':',$dateArray_time1[1]); $day_numeric=$date_created1[2]; $month_numeric=$date_created1[1]; $year_numeric=$date_created1[0]; $month_listing_created = date('M', mktime(0, 0, 0, $month_numeric) ); $listing_date_format = $month_listing_created."-".$day_numeric."-".$year_numeric." ".date('g:i a', mktime($dateArray_time[0], $dateArray_time[1])); if($row['building_name']!="") { $building_name=$row['building_name']." "; } else { $building_name=""; } if($row['unit_level']!="") { $unit_level=$row['unit_level']." "; } else { $unit_level=""; } if($row['street_number']!="") { $street_number=$row['street_number']." "; } else { $street_number=""; } if($row['street_name']!="") { $street_name=$row['street_name']." "; } else { $street_name=""; } if($row['street_type']!="") { $street_type=$row['street_type']." "; } else { $street_type=""; } if($row['suberb']!="") { $suberb=$row['suberb']." "; } else { $suberb=""; } if($row['city']!="") { $city=$row['city']." "; $city_name_output = str_replace(" ","-",strtolower($row['city'])); } else { $city=""; $city_name_output=""; } /////////// fetching the state name //////////// $result_state = mysql_query("select * from states_australia where id = '".$row['state']."'"); while($row_state = mysql_fetch_array($result_state)) { $state_name=$row_state['name']; $state_code=$row_state['state_code']; } ////////////////////////////////////////////// if($row['state']!="") { $state=$state_code." "; } else { $state=""; } if($row['post_code']!="") { $post_code=$row['post_code']; } else { $post_code=""; } $full_address=$building_name.$unit_level.$street_number.$street_name.$street_type.$suberb.$city.$state.$post_code; $local_phone=$row['local_phone']; $national_phone=$row['national_phone']; $mobile_phone=$row['mobile_phone']; $fax_number=$row['fax_number']; if($row['preferred_contact_number']=="local_phone") { $preferred_contact_number=$local_phone; } elseif($row['preferred_contact_number']=="national_phone") { $preferred_contact_number=$national_phone; } elseif($row['preferred_contact_number']=="mobile_phone") { $preferred_contact_number=$mobile_phone; } if($ad_email=='') { $member_id = $row['member_id']; $member_eamil_sql = mysql_query("SELECT email_id FROM members_info WHERE id='".$member_id."'"); $member_eamil_result = mysql_fetch_assoc($member_eamil_sql); $ad_email = $member_eamil_result['email_id']; } ?> <?php if($expiration_date < $today) { ?> <tr> <td height="25" align="center" bgcolor="#FFFFFF" class="mainText"><?php echo $id; ?></td> <td height="24" align="center" bgcolor="#FFFFFF" class="mainText"><img src="/show_image?filename=imgs/<?php echo $business_ad_image; ?>&width=76&height=76" /></td> <td align="left" bgcolor="#FFFFFF" class="mainText" style="padding-left:12px;"><a href="/ad/<?php echo $id; ?>/<?php echo $ad_name_output; ?>/<?php echo $city_name_output; ?>" target="_blank"><?php echo $ad_title; ?></strong></a><br /> <?php echo substr($ad_discription, 0, 50).$dot; ?>r<br /> <?php if($preferred_contact_number=="mobile_phone or national_phone or local_phone ") { ?> <img src="images/phone.png" width="16" height="16" align="absmiddle" /><?php echo $preferred_contact_number; ?> <?php } ?> <br /> <span><strong>Posted by</strong> : <a href="total_listing_ad_user?id=<?php echo $member_id; ?>"><?php echo $ad_email; ?></a></span></td> <td align="center" bgcolor="#FFFFFF" class="mainText" style="padding-left:12px;"><?php echo $city_name_output; ?>,<?php echo $state_name; ?> <br /> <br /> Date Posted:<br /> <strong><?php echo $listing_date_format; ?></strong></td> <td align="center" valign="middle" bgcolor="#FFFFFF" class="mainText"><?php if($status=="0") { ?> <a href="manage-featured?ad_business_id=<?php echo $id; ?>&mode=updatestatus&status=1" style="color:#009933">Active</a> | <b>Inactive</b> <?php } else { ?> <b>Active</b> | <a href="manage-featured?ad_business_id=<?php echo $id; ?>&mode=updatestatus&status=0" style="color:#FF0000">Inactive</a> <?php } ?> <?php $views = mysql_query("select * from views_listing where listing_id ='$id' and listing_type ='$listing_type'"); $views_user=mysql_num_rows($views); { ?> Views: <strong><?php echo $views_user; ?></strong> <?php } ?> <br /> <?php if($num_membership!=0) { ?> <br /> <br /> <?php if ($expiration_date < $today) { ?> <span style="color:#000000; font-weight:bold;">Expiry Date:</span> <span style="color:#FF0000;">EXPIRED</span> <?php }else { ?> <span style="color:#0066FF; font-weight:bold;">Expiring On:</span> <span style="color:#000000;"><?php echo $listing_expire_date; ?></span></td> <?php }?> <?php }?> <td align="center" valign="middle" bgcolor="#FFFFFF" class="smallText"><span style="color:#000000; font-size:11px;">Convert to:</span> <a href="/control/paid-ad-listing?cid=<?php echo $id; ?>">Featured</a> <input type="button" class="button" value="Write A Message" onclick=window.open("send-customer-email?email=<?php echo $ad_email; ?>&redirect=manage-expired-featured","Ratting","width=675,height=400,left=400,top=250,toolbar=0,status=0,resizable=no,"); /></td> </tr> <?php }?> <?php }}else {?> <tr> <td height="25" align="center" bgcolor="#FFFFFF" class="mainText" colspan="8">No record found.</td> </tr> <?php } ?> </table> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> </td> <td> </td> </tr> <tr> <td width="48%" align="left" class="mainText"><strong><?php echo "Showing Page ".$page." of ".$lastpage.", Total Expired Ads Featured listing: ".$total_pages; ?></strong></td> <td width="52%" align="right"><div class="pagination"><?php echo $pagination; ?></div></td> </tr> </table></td> </tr> </table> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td class="footer-strip"></td> </tr> <tr> <td height="1"></td> </tr> <tr> <td align="center" valign="top" class="footer"><span class="maintext"><br /> Copyright © 2012 PostAds.com.au Australia. All rights reserved.<br /> Reproduction in whole or in part in any form or medium without express written permission is prohibited.</span></td> </tr> </table></td> </tr> </table> </body> </html>