-- phpMyAdmin SQL Dump
-- version 3.5.5
-- http://www.phpmyadmin.net
--
-- Gazda: localhost
-- Timp de generare: 14 Dec 2014 la 10:16
-- Versiune server: 5.5.40-36.1
-- Versiune PHP: 5.4.23

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Baza de date: `stevow_radu`
--

-- --------------------------------------------------------

--
-- Structura de tabel pentru tabelul `app_campaigns`
--

CREATE TABLE IF NOT EXISTS `app_campaigns` (
  `unique` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `unique_user` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `unique_admin` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `unique_tags` varchar(250) COLLATE utf8_unicode_ci NOT NULL,
  `unique_countries` varchar(250) COLLATE utf8_unicode_ci NOT NULL,
  `unique_agents` varchar(250) COLLATE utf8_unicode_ci NOT NULL,
  `name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `campaign_cost` int(1) NOT NULL,
  `budget` varchar(12) COLLATE utf8_unicode_ci NOT NULL,
  `budget_remain` varchar(12) COLLATE utf8_unicode_ci NOT NULL,
  `bid` float NOT NULL,
  `limit` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `limit_remain` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `capping` int(10) NOT NULL,
  `ad_type` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `ad_destination` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `ad_content` text COLLATE utf8_unicode_ci NOT NULL,
  `html_content` int(1) NOT NULL,
  `valid` int(1) NOT NULL,
  `default` int(1) NOT NULL,
  `date` date NOT NULL,
  KEY `unique` (`unique`),
  KEY `valid` (`valid`),
  KEY `ad_type` (`ad_type`),
  KEY `default` (`default`),
  KEY `limit_remain` (`limit_remain`),
  KEY `budget_remain` (`budget_remain`),
  KEY `unique_categories` (`unique_tags`),
  KEY `unique_countries` (`unique_countries`),
  KEY `unique_agents` (`unique_agents`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Structura de tabel pentru tabelul `app_categories`
--

CREATE TABLE IF NOT EXISTS `app_categories` (
  `unique` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `name` varchar(35) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Structura de tabel pentru tabelul `app_config`
--

CREATE TABLE IF NOT EXISTS `app_config` (
  `term` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `value` varchar(100) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Salvarea datelor din tabel `app_config`
--

INSERT INTO `app_config` (`term`, `value`) VALUES
('upload_size', '500000'),
('platform_title', 'Spotway Ad Server'),
('platform_logo', 'http://live.getspotway.com/light/app_images/logo.png'),
('platform_favicon', 'http://live.getspotway.com/server/app_images/favicon.png'),
('watermark', '1'),
('watermark_title', 'Ad by Spotway'),
('color_b_body', 'ecf0f1'),
('color_b_menu', '34495e'),
('color_c_menutitle', '6f869e'),
('color_b_header', 'ecf0f1'),
('color_c_header', '3d3d3d'),
('color_bo_menubutton', 'bdc3c7'),
('color_b_menubutton', 'none'),
('color_b_info', '4aa3df'),
('color_b_info_btn', '34495e'),
('color_c_info_btn', 'ecf0f1'),
('color_b_h_info_btn', '111111'),
('color_c_h_info_btn', 'ecf0f1'),
('color_c_info', 'ecf0f1'),
('color_b_btn', '34495e'),
('color_c_btn', 'ecf0f1'),
('color_b_h_btn', '111111'),
('color_c_h_btn', 'ecf0f1'),
('color_bo_btn', '1b2938'),
('color_bo_h_btn', '1b2938'),
('color_b_h_acc', '4aa3df'),
('color_c_h_acc', 'ecf0f1'),
('color_c_sub', 'ecf0f1'),
('color_b_sub', '2c3e50'),
('color_c_h_sub', 'ecf0f1'),
('color_b_h_sub', '1c2936'),
('color_bo_acc', '2c3e50'),
('color_c_acc', 'ecf0f1'),
('color_b_h_menubutton', 'ffffff'),
('color_bo_header', '2d76a7'),
('language', 'english.php'),
('watermark_color', 'ffffff'),
('watermark_text_color', '34495e'),
('watermark_url', 'http://getspotway.com');

-- --------------------------------------------------------

--
-- Structura de tabel pentru tabelul `app_count_imp`
--

CREATE TABLE IF NOT EXISTS `app_count_imp` (
  `verify_hash` int(32) NOT NULL,
  `unique_tag` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `unique_publisher` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `unique_ad` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `unique_advertiser` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `ip` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `click` int(1) NOT NULL,
  `country` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `browser` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `url` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `income` float NOT NULL,
  `outcome` float NOT NULL,
  `cap` int(5) NOT NULL,
  `capping_remain` int(5) NOT NULL,
  `date` date NOT NULL,
  `time` varchar(6) COLLATE utf8_unicode_ci NOT NULL,
  KEY `unique_tag` (`unique_tag`),
  KEY `unique_ad` (`unique_ad`),
  KEY `ip` (`ip`),
  KEY `cap` (`cap`),
  KEY `capping_remain` (`capping_remain`),
  KEY `date` (`date`),
  KEY `verify_hash` (`verify_hash`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Structura de tabel pentru tabelul `app_daily_agents`
--

CREATE TABLE IF NOT EXISTS `app_daily_agents` (
  `unique_user` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `unique_type` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `user_type` int(1) NOT NULL,
  `browser` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `impressions` int(11) NOT NULL,
  `clicks` int(11) NOT NULL,
  `money` varchar(12) COLLATE utf8_unicode_ci NOT NULL,
  `date` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Structura de tabel pentru tabelul `app_daily_country`
--

CREATE TABLE IF NOT EXISTS `app_daily_country` (
  `unique_user` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `unique_type` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `user_type` int(1) NOT NULL,
  `country` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `impressions` int(11) NOT NULL,
  `clicks` int(11) NOT NULL,
  `money` varchar(12) COLLATE utf8_unicode_ci NOT NULL,
  `date` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Structura de tabel pentru tabelul `app_daily_imp`
--

CREATE TABLE IF NOT EXISTS `app_daily_imp` (
  `unique_user` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `unique_type` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `user_type` int(1) NOT NULL,
  `impressions` int(11) NOT NULL,
  `clicks` int(11) NOT NULL,
  `money` varchar(12) COLLATE utf8_unicode_ci NOT NULL,
  `date` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Structura de tabel pentru tabelul `app_daily_pages`
--

CREATE TABLE IF NOT EXISTS `app_daily_pages` (
  `unique_user` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `unique_type` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `user_type` int(1) NOT NULL,
  `url` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
  `impressions` int(10) NOT NULL,
  `clicks` int(10) NOT NULL,
  `money` varchar(12) COLLATE utf8_unicode_ci NOT NULL,
  `date` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Structura de tabel pentru tabelul `app_informations`
--

CREATE TABLE IF NOT EXISTS `app_informations` (
  `unique` int(11) NOT NULL AUTO_INCREMENT,
  `content` text COLLATE utf8_unicode_ci NOT NULL,
  `date` date NOT NULL,
  PRIMARY KEY (`unique`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Structura de tabel pentru tabelul `app_payments`
--

CREATE TABLE IF NOT EXISTS `app_payments` (
  `unique` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `payment_id` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
  `unique_user` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `payment_type` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `payment_method` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `amount` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `status` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `payment_date` varchar(28) COLLATE utf8_unicode_ci NOT NULL,
  `date` varchar(28) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Structura de tabel pentru tabelul `app_payments_details`
--

CREATE TABLE IF NOT EXISTS `app_payments_details` (
  `unique` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `first_name` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `last_name` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `bank_name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `bank_swift` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `iban` varchar(40) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Structura de tabel pentru tabelul `app_sent_emails`
--

CREATE TABLE IF NOT EXISTS `app_sent_emails` (
  `unique` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `unique_user` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `content` text COLLATE utf8_unicode_ci NOT NULL,
  `type` int(1) NOT NULL,
  `viewed` int(1) NOT NULL,
  `date` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `subject` varchar(50) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Structura de tabel pentru tabelul `app_sizes`
--

CREATE TABLE IF NOT EXISTS `app_sizes` (
  `unique` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `width` int(5) NOT NULL,
  `height` int(5) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Structura de tabel pentru tabelul `app_tags`
--

CREATE TABLE IF NOT EXISTS `app_tags` (
  `unique` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `unique_user` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `unique_admin` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `unique_category` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `website` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `tag_cost` int(1) NOT NULL,
  `tag_type` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
  `ad_type` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `valid` int(1) NOT NULL,
  `date` date NOT NULL,
  KEY `unique` (`unique`),
  KEY `unique_category` (`unique_category`),
  KEY `tag_cost` (`tag_cost`),
  KEY `tag_cost_2` (`tag_cost`),
  KEY `ad_type` (`ad_type`),
  KEY `valid` (`valid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Structura de tabel pentru tabelul `app_users`
--

CREATE TABLE IF NOT EXISTS `app_users` (
  `unique` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `unique_refered` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `user_type` int(1) NOT NULL,
  `user_rights` int(1) NOT NULL,
  `balance` varchar(12) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `password` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `publisher_share` int(3) NOT NULL,
  `valid` int(1) NOT NULL,
  `verified` int(1) NOT NULL,
  `date` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Structura de tabel pentru tabelul `app_users_details`
--

CREATE TABLE IF NOT EXISTS `app_users_details` (
  `unique` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `first_name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `last_name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `country` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `adress` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `city` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `zipcode` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `phone` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `is_company` int(1) NOT NULL,
  `company_name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `company_tax_number` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `company_adress` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `company_country` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `company_city` varchar(50) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Structura de tabel pentru tabelul `app_users_notifications`
--

CREATE TABLE IF NOT EXISTS `app_users_notifications` (
  `unique` int(11) NOT NULL AUTO_INCREMENT,
  `unique_user` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `content` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
  `type` int(1) NOT NULL,
  `viewed` int(1) NOT NULL,
  `date` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`unique`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Structura de tabel pentru tabelul `app_users_preferences`
--

CREATE TABLE IF NOT EXISTS `app_users_preferences` (
  `unique` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `notif_admin` int(1) NOT NULL,
  `notif_system` int(1) NOT NULL,
  `notif_information` int(1) NOT NULL,
  `notif_important` int(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
