Advertisement
plas71k

decoded_file 2

Nov 26th, 2012
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.07 KB | None | 0 0
  1. <?php
  2. function installation_process()
  3. {
  4.     global $wpdb;
  5.     $tables = array(
  6.         "CREATE TABLE IF NOT EXISTS `" . $wpdb->prefix . "popdom_campaigns` ( `id` int(25) NOT NULL auto_increment, `campaign` varchar(55) collate utf8_general_ci NOT NULL, `data` longtext collate utf8_general_ci NOT NULL, `pages` longtext collate utf8_general_ci NOT NULL, `desc` longtext collate utf8_general_ci NOT NULL, `analytics` longtext NOT NULL DEFAULT '', `active` int(25) NOT NULL DEFAULT 0, PRIMARY KEY (`id`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;",
  7.         "CREATE TABLE IF NOT EXISTS `" . $wpdb->prefix . "popdom_ab` ( `id` int(25) NOT NULL auto_increment, `campaigns` longtext collate utf8_general_ci NOT NULL, `schedule` longtext collate utf8_general_ci NOT NULL, `absettings` longtext collate utf8_general_ci NOT NULL, `astats` longtext collate utf8_general_ci NOT NULL, `name` varchar(55) collate utf8_general_ci NOT NULL, `description` longtext collate utf8_general_ci NOT NULL, `active` int(25) NOT NULL DEFAULT 0, PRIMARY KEY (`id`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;",
  8.         "CREATE TABLE IF NOT EXISTS `" . $wpdb->prefix . "popdom_mailing` ( `id` int(25) NOT NULL auto_increment, `name` varchar(55) collate utf8_general_ci NOT NULL, `description` longtext collate utf8_general_ci NOT NULL, `settings` longtext collate utf8_general_ci NOT NULL, PRIMARY KEY (`id`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;"
  9.     );
  10.     if (isset($_POST["popup_domination_activate"])) {
  11.         if ($_POST["popup_domination_activate"] == "true") {
  12.             require_once(ABSPATH . "wp-admin/includes/upgrade.php");
  13.             foreach ($tables as $table) {
  14.                 dbDelta($table);
  15.             }
  16.             $defaults = array(
  17.                 "show" => serialize(array(
  18.                     "everywhere" => "Y"
  19.                 )),
  20.                 "impression_count" => 0,
  21.                 "delay" => 0,
  22.                 "cookie_time" => 7,
  23.                 "promote" => "Y",
  24.                 "template" => "lightbox",
  25.                 "color" => "blue",
  26.                 "button_color" => "red",
  27.                 "new_window" => "N",
  28.                 "show_opt" => "open",
  29.                 "enabled" => "N",
  30.                 "version" => $this->version,
  31.                 "installed" => "Y",
  32.                 "v3installed" => "Y"
  33.             );
  34.             foreach ($defaults as $a => $b) {
  35.                 if (!$this->option($a))
  36.                     $this->update($a, $b);
  37.             }
  38.             include_once $this->plugin_path . "tpl/install/install_finish.php";
  39.         } else {
  40.             $error_code = $_POST["popup_domination_error"];
  41.             echo "<div class=\"updated\"><p>The order number you entered is invalid. Please contact <a href=\"http://popdom.desk.com/customer/portal/emails/new\">support</a>. [Error code: " . $error_code . "]</p></div>";
  42.             include_once $this->plugin_path . "tpl/install/install_start.php";
  43.         }
  44.     } else {
  45.         include_once $this->plugin_path . "tpl/install/install_start.php";
  46.     }
  47. }
  48. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement