-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
152 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,11 @@ | |
Contributors: minimus | ||
Donate link: https://load.payoneer.com/[email protected] | ||
Tags: ad, adbrite, adgridwork, adify, admin, adpinion, adroll, ads, adsense, adserver, advertisement, advertising, affiliate, banner, banners, chitika, cj, commercial, commission, crispads, dfp, google, income, junction, link, manager, media, money, plugin, random, referral, revenue, rotator, seo, server, shoppingads, widget, widgetbucks, yahoo, ypn | ||
Requires at least: 3.3 | ||
Tested up to: 3.4.1 | ||
Stable tag: 1.7.57 | ||
Requires at least: 3.5 | ||
Tested up to: 3.7 | ||
Stable tag: 1.7.63 | ||
|
||
Advertisment rotation system with a flexible logic of displaying advertisements. | ||
Advertisement rotation system with a flexible logic of displaying advertisements. | ||
|
||
== Description == | ||
|
||
|
@@ -82,6 +82,14 @@ No questions now... | |
|
||
== Changelog == | ||
|
||
= 1.7.63 = | ||
* Some bugs (Ads Block style, Click Tracker) are resolved. | ||
= 1.7.61 = | ||
* Some bugs are resolved. | ||
= 1.7.60 = | ||
* Minor bug is resolved (Ads Places List) | ||
= 1.7.58 = | ||
* Major bug is resolved (bug of database creating, not database updating) | ||
= 1.7.57 = | ||
* Data updating bugs of editors are fixed. Thanks to **Latibro** | ||
* Control of Error Log is added | ||
|
@@ -159,6 +167,14 @@ No questions now... | |
|
||
== Upgrade Notice == | ||
|
||
= 1.7.63 = | ||
Some bugs (Ads Block style, Click Tracker) are resolved. | ||
= 1.7.61 = | ||
Some bugs are resolved. | ||
= 1.7.60 = | ||
Minor bug is resolved (Ads Places List) | ||
= 1.7.58 = | ||
Major bug is resolved (bug of database creating, not database updating) | ||
= 1.7.57 = | ||
Data updating bugs of editors are fixed. Thanks to **Latibro**. | ||
Control of Error Log is added. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<?php | ||
/** | ||
* Author: minimus | ||
* Date: 24.10.13 | ||
* Time: 12:14 | ||
*/ | ||
|
||
define('DOING_AJAX', true); | ||
|
||
if (!isset( $_POST['action'])) die('-1'); | ||
if (isset( $_POST['level'] )) { | ||
$rootLevel = intval($_POST['level']); | ||
$root = dirname( __FILE__ ); | ||
for( $i = 0; $i < $rootLevel; $i++ ) $root = dirname( $root ); | ||
} | ||
else $root = dirname(dirname(dirname(dirname(__FILE__)))); | ||
|
||
ini_set('html_errors', 0); | ||
|
||
define('SHORTINIT', true); | ||
|
||
require_once( $root . '/wp-load.php' ); | ||
|
||
global $wpdb; | ||
|
||
$oTable = $wpdb->prefix . 'options'; | ||
$oSql = "SELECT $oTable.option_value FROM $oTable WHERE $oTable.option_name = 'blog_charset'"; | ||
$charset = $wpdb->get_var($oSql); | ||
|
||
//Typical headers | ||
@header("Content-Type: application/json; charset=$charset"); | ||
@header( 'X-Robots-Tag: noindex' ); | ||
|
||
send_nosniff_header(); | ||
nocache_headers(); | ||
|
||
$action = !empty($_POST['action']) ? 'sam_ajax_' . stripslashes($_POST['action']) : false; | ||
|
||
//A bit of security | ||
$allowed_actions = array( | ||
'sam_ajax_sam_click', | ||
'sam_ajax_sam_show' | ||
); | ||
|
||
if(in_array($action, $allowed_actions)){ | ||
switch($action) { | ||
case 'sam_ajax_sam_click': | ||
$out = null; | ||
if(isset($_POST['sam_ad_id'])) { | ||
$adId = $_POST['sam_ad_id']; | ||
$aId = explode('_', $adId); | ||
$id = (integer) $aId[1]; | ||
} | ||
else $id = -100; | ||
|
||
if($id > 0) { | ||
$aTable = $wpdb->prefix . "sam_ads"; | ||
|
||
$aSql = "UPDATE $aTable SET $aTable.ad_clicks = $aTable.ad_clicks+1 WHERE $aTable.id = %d;"; | ||
$result = $wpdb->query($wpdb->prepare($aSql, $id)); | ||
if($result === 1) { | ||
$out = array('id' => $id, 'result' => $result, 'charset' => $charset); | ||
wp_send_json_success( $out ); | ||
} | ||
else wp_send_json_error(array('id' => $id, 'sql' => $wpdb->last_query, 'error' => $wpdb->last_error)); | ||
} | ||
else wp_send_json_error(array('id' => $id)); | ||
break; | ||
|
||
case 'sam_ajax_sam_show': | ||
|
||
break; | ||
} | ||
} | ||
else wp_send_json_error(array('error' => 'Not allowed action')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.