subject);?>
on date));?>post));?>
$_SERVER['REMOTE_ADDR'], "user_agent"=> $_SERVER['HTTP_USER_AGENT'], "referrer"=> $_SERVER['HTTP_REFERER'], "blog"=> get_option('home'), "comment_author"=> rawurlencode($name), "comment_author_email"=> rawurlencode($email), "comment_author_url"=> "http://", "comment_content"=> str_replace("%20", "+", rawurlencode($subject))."+".str_replace("%20", "+", rawurlencode($post)), "comment_type"=> "", "user_ID"=> $userID ); $query_string = ''; foreach ($spamcheck as $k=>$v){ $query_string .= $k.'='.urlencode(stripslashes($v)).'&'; } // into akismet's spam protection if (function_exists('ksd_http_post')){ $response = ksd_http_post($query_string, $ksd_api_host, '/1.1/comment-check', $ksd_api_port); if ('true' == $response[1]){ return true; } } return false; } function adm_modify_process(){ global $_GET, $_POST, $table_prefix, $PHP_SELF, $wpdb; $liststatuses = array(active=>'Open',inactive=>'Closed',readonly=>'Read-Only'); $wpcSettings = get_option('wpClassified_data'); $loadpage = true; switch ($_GET['adm_action']){ case "deleteAd": $loadpage = delete_ad(); break; case "deleteImg": $loadpage = delete_img(); break; case "deleteAdSubject": $loadpage = delete_ad_subject(); break; case "activateAd": activate_ad($_GET['aid']); unset($_GET['aid']); break; case "activateAdSubject": activate_ad_subject($_GET['asid']); unset($_GET['asid']); break; case "stickyAdSubject": set_sticky_ad_subject($_GET['asid']); unset($_GET['asid']); break; case "move": _move(); $loadpage = false; break; case "moveAd": move_ad(); unset($_GET['asid']); $loadpage = true; break; case "saveAd": save_ad(); break; case "editAdSubject": edit_ad_subject(); $loadpage = false; break; case "editAd": edit_ad(); $loadpage = false; break; } if ($msg!=''){ ?>
0 && $loadpage==true){ $sql = "SELECT ADS.*, L.name as l_name, C.name as c_name, L.lists_id FROM {$table_prefix}wpClassified_ads_subjects ADS, {$table_prefix}wpClassified_lists L, {$table_prefix}wpClassified_categories C WHERE ADS.ads_subjects_list_id = L.lists_id AND C.categories_id = L.wpClassified_lists_id AND ADS.ads_subjects_id = ".$_GET['asid']; $adsInfo = $wpdb->get_row($sql, ARRAY_A); $ads = $wpdb->get_results("SELECT * FROM {$table_prefix}wpClassified_ads LEFT JOIN {$table_prefix}users ON {$table_prefix}users.ID = {$table_prefix}wpClassified_ads.author WHERE {$table_prefix}wpClassified_ads.ads_ads_subjects_id = '".($_GET['asid'])."' ORDER BY {$table_prefix}wpClassified_ads.date ASC"); ?>
back to previous page back to main page
post));?>
|
ads_id."&file=".$f."\">Delete Image | ";
}
?>
back to previous page back to main page
No Image Available!"; } } ?> 0 && $loadpage==true){ $lists = $wpdb->get_row("SELECT * FROM {$table_prefix}wpClassified_lists LEFT JOIN {$table_prefix}wpClassified_categories ON {$table_prefix}wpClassified_categories.categories_id = {$table_prefix}wpClassified_lists.wpClassified_lists_id WHERE {$table_prefix}wpClassified_lists.lists_id = '".($_GET['lid'])."'", ARRAY_A); // list ads if (!$_GET['start']){ $_GET['start'] = 0; } $sql = "SELECT {$table_prefix}wpClassified_ads_subjects.*, {$table_prefix}wpClassified_ads.ads_id, {$table_prefix}wpClassified_ads.status as adstatus FROM {$table_prefix}wpClassified_ads_subjects LEFT JOIN {$table_prefix}users ON {$table_prefix}users.ID = {$table_prefix}wpClassified_ads_subjects.author LEFT JOIN {$table_prefix}wpClassified_ads ON {$table_prefix}wpClassified_ads.ads_ads_subjects_id = {$table_prefix}wpClassified_ads_subjects.ads_subjects_id WHERE {$table_prefix}wpClassified_ads_subjects.ads_subjects_list_id = '".($_GET['lid'])."' AND {$table_prefix}wpClassified_ads_subjects.status != 'deleted' ORDER BY {$table_prefix}wpClassified_ads_subjects.sticky ASC, {$table_prefix}wpClassified_ads_subjects.date DESC"; $ads = $wpdb->get_results($sql); $numAds = $wpdb->get_var("SELECT count(*) FROM {$table_prefix}wpClassified_ads_subjects WHERE ads_subjects_list_id = '".($_GET['lid'])."' AND status != 'deleted'"); ?>back to previous page back to main page
| subject;?> | views;?> | date);?> |
| Category/List | Ads | Status | |
|---|---|---|---|
name;?> |
|||
| (status]; ?>) name;?> | lists_id; $adsCount = $wpdb->get_var($sql); echo $adsCount; ?> | status;?> | |
query("UPDATE {$table_prefix}wpClassified_ads SET post = '".$html."', subject='".$sbj."' WHERE ads_id = '".(int)$_GET['aid']."'"); $sql = "UPDATE {$table_prefix}wpClassified_ads_subjects SET subject='".$sbj."' WHERE ads_subjects_id=".$_POST['ads_subjects_id']; $wpdb->query($sql); } $msg = "Ad Saved"; return $msg; } function move_ad(){ global $_GET, $_POST, $wpdb, $table_prefix; list($olst, $ocat) = split(' -> ', $_POST['lstCatNames']); $wpdb->query("UPDATE {$table_prefix}wpClassified_ads_subjects SET ads_subjects_list_id = '".$_POST['adLid']."' WHERE ads_subjects_id = '".$_GET['asid']."'"); /* $wpdb->query("UPDATE {$table_prefix}wpClassified_ads SET ads_ads_subjects_id = '".$_POST['adLid']."' WHERE ads_ads_subjects_id = '".$_GET['asid']."'"); */ $asid = $wpdb->get_row("SELECT * FROM {$table_prefix}wpClassified_ads_subjects WHERE ads_subjects_id = '".$_GET['asid']."'"); $lids = $wpdb->get_row("SELECT * FROM {$table_prefix}wpClassified_lists WHERE wpClassified_lists_id = '".$_GET['lid']."'"); $newLids = $wpdb->get_row("SELECT * FROM {$table_prefix}wpClassified_lists WHERE wpClassified_lists_id = '".$_POST['adLid']."'"); if($lids->ads_status!='0'){ $oldStatus = $lids->ads_status-1; }else{ $oldStatus = $lids->ads_status; } $oldAd = $lids->ads-$asids->ads; $old_views_count = $lids->ads_views-$asids->views; $newLidStatus = $newLids->ads_status+1; $newAd = $newLids->ads+$asids->ads; $newadView = $newLids->ads_views+$asids->views; $wpdb->query("UPDATE {$table_prefix}wpClassified_lists SET ads_status = '".$oldStatus."', ads = '".$oldAd."', ads_views = '".$old_views_count."' WHERE wpClassified_lists_id = '".$_GET['lid']."'"); $wpdb->query("UPDATE {$table_prefix}wpClassified_lists SET ads_status = '".$newLidStatus."', ads = '".$newAd."', ads_views = '".$newadView."' WHERE wpClassified_lists_id = '".$_POST['adLid']."'"); $msg = "Ad moved to: ".$_POST['lstCatNames']; return $msg; } function _move(){ global $_GET, $_POST, $wpdb, $table_prefix, $PHP_SELF; ?>
back to previous page back to main page