".$args['after_widget'];
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function makeNewTable () {
if($this->wpdb->get_var("show tables like '{$this->table_name}'") != $this->table_name) {
$sql = "CREATE TABLE " . $this->table_name . " (
id mediumint(9) NOT NULL AUTO_INCREMENT,
dtime timestamp NOT NULL,
name tinytext NOT NULL,
text text NOT NULL,
url VARCHAR(55) NOT NULL,
PRIMARY KEY id (id)
);";
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
dbDelta($sql);
$welcome_name = "Plugin";
$welcome_text = "Installation complete";
$insert = "INSERT INTO " . $this->table_name .
" ( name, text) " .
"VALUES ('" . $this->wpdb->escape($welcome_name) . "','" . $this->wpdb->escape($welcome_text) . "')";
$results = $this->wpdb->query( $insert );
add_option("jm_db_version", $this->jm_db_version);
}
else {
//print "Table already exists";
}
}
function save2DB() {
$results = $this->wpdb->query("DELETE FROM $this->table_name WHERE name='" . $this->wpdb->escape($this->optionName) . "'");
$results = $this->wpdb->query("INSERT INTO $this->table_name ( vb_title, name, text) "."VALUES ('" . $this->wpdb->escape($this->vb_title) . "','" . $this->wpdb->escape($this->optionName) . "','" . $this->wpdb->escape( $this->default_jscode) . "')");
}
function setOption() {
$this->default_jscode = $this->wpdb->get_var("SELECT text FROM $this->table_name WHERE name='" . $this->wpdb->escape($this->optionName) . "'");
$this->vb_title = $this->wpdb->get_var("SELECT vb_title FROM $this->table_name WHERE name='" . $this->wpdb->escape($this->optionName) . "'");
return $this->default_jscode;
}
function getOption() {
return $this->default_jscode;
}
function deleteOption() {
$results = $this->wpdb->query("DELETE FROM $this->table_name WHERE name='" . $this->wpdb->escape($this->optionName) . "'");
}
// ACTIVATION & DEACTIVATION: due to register_activation_hook failing on windows, work around performed
// activation via add_action('activate_'.$this->file, array(&$this, 'activationWP'));
function activationWP() {
$this->makeNewTable(1);
$this->save2DB();
}
function deactivationWP() {
$this->name_ar = $this->wpdb->get_col("SELECT name FROM $this->table_name");
foreach ($this->name_ar as $name) {
$this->optionName = $name;
register_sidebar_widget ($name,""); // same as unregister with empty string callback value
register_widget_control ($name,"");
$this->deleteOption(); // empty DB table
}
add_action('widgets_init',array(&$this, 'unregisterWidgets'));
}
function unregisterWidgets() {
// doesnt do anything on windows
foreach ($this->name_ar as $name) {
unregister_sidebar_widget($name);
unregister_sidebar_widget($name);
}
}
function admin_adview() {
print $this->getOption(). $this->getOption();
}
//////////////////////////////////////////////////////// AdFever Admin /////////////////////////////////////////////
function addHook() {
add_action('admin_menu',array(&$this, 'addSubMenu'));
}
function addSubMenu() {
add_options_page('AdFever settings', 'AdFever', 9, $this->file, array(&$this, 'displaySetting'));
}
function displaySetting($name="") {
$radios=array(
"left" => "Left",
"center" => "Center",
"right" => "Right"
);
$textarea= $this->fr_TextArea("adfever_jscode", 35, 10);
$inputtext= $this->fr_TextInput("maxads", 2) ;
$radio= $this->fr_Radio("pos", $radios);
$this->processPluginForm();
$this->optionName = ($name == "")?$this->horyzontalName:$name;
print <<
AdFever admin
{$this->formHeadMessage}
CNT;
}
function displaySettingV($name="",$no=1) {
$textarea= $this->fr_TextArea("adfever_jscode".$no, 35, 10);
$this->optionName = ($name == "")?$this->horyzontalName:$name; // useless must be set to vertical banner name
$inputtext= $this->fr_TextInput("vb_title{$no}", 25);
print <<
profité de cette premiere consultation cela en vaut vraiment la peine ce Monsieur est extra toute mes sinceres
félicitations il vous changeras la vie
(brigitte 38ans 51 Chalons en Champagne)
ce Monsieur à un talent fatastique et extraordinaire il à révéler mon passé qui etait enfoui depuis de nombreuse années cela m'a aidé à y voir plus clair un grand merci à vous.
(jean-marie 44ans 10 Troyes)
j'ai demandé à ce Monsieur de venir grace a ma femme puisque je souffrais d'une sciatique névralgie aigue avec son don demagnétiseuril à su me remettre sur pied rapidement alors que je n'y croyais pas du tout au départ il ai vrai que j'etait sceptique ce Monsieur doit continué je fait régulierement appel à lui des que j'en ai besoin un grand merci