
// --------------------- add new field  in type_statment  Pushed live---------- on 05.20.2014
INSERT INTO `flyup_test_db`.`type_statment` (
`id` ,
`statment` ,
`type` ,
`datetime`
)
VALUES (
NULL , 'bonus profit', '0', '2014-05-13 17:27:30'
);
// --------------------- add new bonus_audit_log table  ---------- on 05.20.2014
CREATE TABLE IF NOT EXISTS `bonus_audit_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `reason_type` int(20) NOT NULL,
  `user_id` int(255) NOT NULL,
  `created_id` int(255) NOT NULL,
  `detail` varchar(255) NOT NULL,
  `profit` tinyint(4) NOT NULL,
  `date` date NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;# MySQL returned an empty result set (i.e. zero rows).
// --------------------- add new product in products table  Pushed live---------- on 3.18.2014
INSERT INTO `flyup_live_db`.`products` (`code`, `name`, `comment`, `amount`, `actual_amount`, `expire_after_days`, `is_active`) VALUES (NULL, 'Smart Pack', NULL, '3500', '3500', '90', '1');
// --------------------- add gallery_img table  Pushed live---------- on 3.11.2014
CREATE TABLE IF NOT EXISTS `gallery_img` (
  `id` int(20) NOT NULL AUTO_INCREMENT,
  `gallery_id` int(20) NOT NULL,
  `img` varchar(200) NOT NULL,
  `p_title` varchar(200) NOT NULL,
  `p_detail` varchar(500) NOT NULL,
  `status` tinyint(4) NOT NULL,
  `datetime` datetime NOT NULL,
  PRIMARY KEY (`id`)
)
// --------------------- add gallery table  Pushed live---------- on 3.11.2014
CREATE TABLE IF NOT EXISTS `gallery` (
  `id` int(20) NOT NULL AUTO_INCREMENT,
  `title` varchar(300) NOT NULL,
  `status` tinyint(4) NOT NULL DEFAULT '1',
  `gallery_image` varchar(150) NOT NULL,
  `datetime` datetime NOT NULL,
  PRIMARY KEY (`id`)
)
// --------------------- update payment_log  Pushed live---------- on 3.10.2014
ALTER TABLE  `payment_log` ADD  `receiver_name` VARCHAR( 255 ) NULL DEFAULT NULL AFTER  `paid_date` ;
// --------------------- update payment_log  Pushed live---------- on 3.10.2014
ALTER TABLE  `payment_log` ADD  `paid_date` DATETIME NOT NULL AFTER  `paid_by` ;
// --------------------- update type_statement Pushed live---------- on 2.25.2014
INSERT INTO `type_statment` (`id`, `statment`, `type`, `datetime`) VALUES
(1, 'Fly Up Commission Made By Code<b>', 0, '2014-02-03 00:00:00'),
(2, 'Commission Made By New Introducer Code ', 0, '2014-02-04 00:00:00'),
(3, 'Direct Commission Made By Code', 0, '2014-02-04 00:00:00'),
(4, 'Deduct Amount From <b> Transfer Funds </b>And Introduce New Distributor Code<b> ', 0, '0000-00-00 00:00:00'),
(5, 'Renewal From Code ', 0, '0000-00-00 00:00:00'),
(6, 'Deduct Amount From Transfer Funds And Funds Transfer to Code ', 0, '0000-00-00 00:00:00'),
(7, 'Deduct Amount From Direct Balance Funds Transfer To Code', 0, '2014-02-04 00:00:00'),
(8, 'Funds Received From Code ', 0, '2014-02-04 00:00:00'),
(9, 'Deduct Amount From Transfer Funds Renewal Code', 0, '2014-02-04 00:00:00'),
(10, 'Deduct Amount From Direct Balance And Renewal Code ', 0, '2014-02-04 00:00:00'),
(11, 'Deduct Amount From Direct Balance Introduce New Distributor Code  ', 0, '2014-02-04 00:00:00'),
(12, 'Deduct Amount From Fly up balance And Renewal The Code ', 0, '2014-02-04 00:00:00'),
(13, 'Deduct Amount From Fly up Balance And Funds Transfer to Code ', 0, '2014-02-04 00:00:00'),
(14, 'Deduct Amount From Fly up Balance Introduce New Distributor Code ', 0, '2014-02-04 00:00:00'),
(15, 'Deduct Amount From Transfer Balance And You Receive Cash From Admin Code', 0, '2014-02-18 00:00:00'),
(16, 'Cash Paid To User Code', 0, '2014-02-19 00:00:00'),
(17, 'Deduct Amount From Odd Earning Balance And You Received Cash From Admin Code', 0, '2014-02-19 00:00:00'),
(18, 'Deduct Amount From Fly Up Earning Balance And You Received Cash From Admin Code', 0, '2014-02-19 00:00:00'),
(19, 'Cash Received From Super Admin', 0, '2014-02-19 00:00:00'),
(20, 'Transfer Balance To User', 0, '2014-02-20 00:22:30'),
(21, 'Transfer Balance By Admin To User Code', 0, '2014-02-20 00:00:00'),
(22, 'Received Balance By Admin From User Code', 0, '2014-02-20 00:00:00'),
(23, 'Introduce New Distributor User Code', 0, '2014-02-25 00:00:00');

// --------------------- add email_template Pushed live---------- on 2.24.2014
INSERT INTO `email_templates` (`id`, `subject`, `body`, `title`, `from_email`) VALUES
(1, 'Welcome to Fly Up.', '<table cellpadding=''5'' cellspacing=''0'' width=''612''>\n    <thead>\n        <tr>\n            <th width=''140''>\n    <div id=''logo''>\n        <img src=''http://flyup.iserver.purelogics.info/css/images/logo2.png'' width=''140px'' height =''115px'' alt=''logo'' />\n    </div>\n</th>\n<th>\n<h2>LETTER OF THANKS</h2>\n\n</th>\n</tr>\n</thead>\n<tfoot>\n<td colspan=''2'' align=''right''>\n    <br>\n    <small><b><i>(This is an auto generated document and no signature is required by FLY UP)</i></b></small>\n</td>\n</tfoot>\n<tbody>\n    <tr>\n        <td> DATE: </td>\n        <td>{FLYUP_DATE}</td>\n    </tr>                \n\n    <tr>\n        <td> NAME: </td>\n        <td>{FLYUP_NAME}</td>\n    </tr>                \n\n    <tr>\n        <td> CODE: </td>\n        <td>{FLYUP_CODE}</td>\n    </tr>                \n\n    <tr>\n        <td> PIN CODE: </td>\n        <td>{FLYUP_PIN}</td>\n    </tr>\n    <tr>\n        <td> PASSWORD: </td>\n        <td>{FLYUP_PASSWORD}</td>\n    </tr>\n    <tr>\n        <td> MOBILE #: </td>\n        <td>{FLYUP_MOBILE}</td>\n    </tr>\n\n\n    <tr>\n        <td colspan=''2''> <br> Dear Mr./Ms. {FLYUP_NAME}: </td>\n    </tr>                \n    <tr>\n        <td colspan=''2''>\n            <p align=''justify''>\n                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n\n                Congratulations! You joined Fly Up Pakistan. We confirm your Membership and \n                also confirming receipt of products purchasing value Rs. {FLYUP_PRICE} .<BR><b>Your code # {FLYUP_CODE} <BR>Password is {FLYUP_PASSWORD}. \n                    <BR>Pin is: {FLYUP_PIN}</b><BR> Please keep your code, password and pin strictly confidential and safe company is not responsible for any misuse of password or pin code.\n\n                You can use this code and password (conditions apply) for further correspondence and working with company. Your product will deliver on your given address with in a week.\n                Your future success belongs to your working Fly Up does not promise or guarantee any specific income or profit.\n\n\n\n            </p>\n            <p align=''justify''>\n                <br>\n                Signature of Introducer:_____________________ &nbsp;&nbsp;Signature of Distributor:_____________________\n            </p>\n        </td>\n    </tr>    \n</tbody>\n</table>', 'signUp', 'team@flyup.pk '),
(3, 'Ammount Transfer.', '<table cellpadding=''5'' cellspacing=''0'' width=''612''>\n    <thead>\n        <tr>\n            <th width=''140''>\n    <div id=''logo''>\n        <img src=''http://flyup.iserver.purelogics.info/css/images/logo2.png'' width=''140px'' height =''115px'' alt=''logo'' />\n    </div>\n</th>\n<th>\n<h2>Amount Transfer</h2>\n\n</th>\n</tr>\n</thead>\n<tfoot>\n<td colspan=''2'' align=''right''>\n    <br>\n    <small><b><i>(This is an auto generated document and no signature is required by FLY UP)</i></b></small>\n</td>\n</tfoot>\n<tbody>\n    <tr>\n        <td colspan=''2''> <br> Dear Mr./Ms. {USER_CODE2}: </td>\n    </tr>                \n    <tr>\n        <td colspan=''2''>\n            <p align=''justify''>\n                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n\n                You Transfer Rs. {AMOUNT}. To code # <b>{USER_CODE}</b>.\n                <br/>\n                <br/>\n                Thanks,\n            </p>\n            <p align=''justify''>\n                <br>\n                Signature of Introducer:_____________________ &nbsp;&nbsp;Signature of Distributor:_____________________\n            </p>\n        </td>\n    </tr>    \n</tbody>\n</table>', 'transfer', 'team@flyup.pk '),
(4, 'Account Subscription.', 'you renew account user code {USER_CODE} with amount {AMOUNT}<table cellpadding=''5'' cellspacing=''0'' width=''612''>\n    <thead>\n        <tr>\n            <th width=''140''>\n    <div id=''logo''>\n        <img src=''http://flyup.iserver.purelogics.info/css/images/logo2.png'' width=''140px'' height =''115px'' alt=''logo'' />\n    </div>\n</th>\n<th>\n<h2>Subscription</h2>\n\n</th>\n</tr>\n</thead>\n<tfoot>\n<td colspan=''2'' align=''right''>\n    <br>\n    <small><b><i>(This is an auto generated document and no signature is required by FLY UP)</i></b></small>\n</td>\n</tfoot>\n<tbody>\n    <tr>\n        <td colspan=''2''> <br> Dear Mr./Ms. {USER_CODE2}: </td>\n    </tr>                \n    <tr>\n        <td colspan=''2''>\n            <p align=''justify''>\n                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n\n                Your Subscription For Code <b>{USER_CODE}</b> With Amount Rs. {AMOUNT}.\n                <br/>\n                <br/>\n                Thanks,\n            </p>\n            <p align=''justify''>\n                <br>\n                Signature of Introducer:_____________________ &nbsp;&nbsp;Signature of Distributor:_____________________\n            </p>\n        </td>\n    </tr>    \n</tbody>\n</table>', 'renew', 'team@flyup.pk '),
(5, 'Email Change', '<table cellpadding=''5'' cellspacing=''0'' width=''612''>\n    <thead>\n        <tr>\n            <th width=''140''>\n    <div id=''logo''>\n        <img src=''http://flyup.iserver.purelogics.info/css/images/logo2.png'' width=''140px'' height =''115px'' alt=''logo'' />\n    </div>\n</th>\n<th>\n<h2>Email Change</h2>\n\n</th>\n</tr>\n</thead>\n<tfoot>\n<td colspan=''2'' align=''right''>\n    <br>\n    <small><b><i>(This is an auto generated document and no signature is required by FLY UP)</i></b></small>\n</td>\n</tfoot>\n<tbody>\n    <tr>\n        <td colspan=''2''> <br> Dear Mr./Ms. {USER_CODE}: </td>\n    </tr>                \n    <tr>\n        <td colspan=''2''>\n            <p align=''justify''>\n                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n\n                You Change your email your new email is. {EMAIL_CHANGE}</b>.\n                <br/>\n                <br/>\n                Thanks,\n            </p>\n            <p align=''justify''>\n                <br>\n                Signature of Introducer:_____________________ &nbsp;&nbsp;Signature of Distributor:_____________________\n            </p>\n        </td>\n    </tr>    \n</tbody>\n</table>', 'emailChange', 'team@flyup.pk '),
(6, 'Password Change', '<table cellpadding=''5'' cellspacing=''0'' width=''612''>\n    <thead>\n        <tr>\n            <th width=''140''>\n    <div id=''logo''>\n        <img src=''http://flyup.iserver.purelogics.info/css/images/logo2.png'' width=''140px'' height =''115px'' alt=''logo'' />\n    </div>\n</th>\n<th>\n<h2>Password Change</h2>\n\n</th>\n</tr>\n</thead>\n<tfoot>\n<td colspan=''2'' align=''right''>\n    <br>\n    <small><b><i>(This is an auto generated document and no signature is required by FLY UP)</i></b></small>\n</td>\n</tfoot>\n<tbody>\n    <tr>\n        <td colspan=''2''> <br> Dear Mr./Ms. {USER_CODE}: </td>\n    </tr>                \n    <tr>\n        <td colspan=''2''>\n            <p align=''justify''>\n                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n\n                You Change your passwrod your new password is. {PASSWORD_CHANGE}</b>.\n                <br/>\n                <br/>\n                Thanks,\n            </p>\n            <p align=''justify''>\n                <br>\n                Signature of Introducer:_____________________ &nbsp;&nbsp;Signature of Distributor:_____________________\n            </p>\n        </td>\n    </tr>    \n</tbody>\n</table>', 'passwordChange', 'team@flyup.pk '),
(7, 'Pin Change', '<table cellpadding=''5'' cellspacing=''0'' width=''612''>\n    <thead>\n        <tr>\n            <th width=''140''>\n    <div id=''logo''>\n        <img src=''http://flyup.iserver.purelogics.info/css/images/logo2.png'' width=''140px'' height =''115px'' alt=''logo'' />\n    </div>\n</th>\n<th>\n<h2>Pin Change</h2>\n\n</th>\n</tr>\n</thead>\n<tfoot>\n<td colspan=''2'' align=''right''>\n    <br>\n    <small><b><i>(This is an auto generated document and no signature is required by FLY UP)</i></b></small>\n</td>\n</tfoot>\n<tbody>\n    <tr>\n        <td colspan=''2''> <br> Dear Mr./Ms. {USER_CODE}: </td>\n    </tr>                \n    <tr>\n        <td colspan=''2''>\n            <p align=''justify''>\n                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n\n                You Change your pin your new pin is. {PIN_CHANGE}</b>.\n                <br/>\n                <br/>\n                Thanks,\n            </p>\n            <p align=''justify''>\n                <br>\n                Signature of Introducer:_____________________ &nbsp;&nbsp;Signature of Distributor:_____________________\n            </p>\n        </td>\n    </tr>    \n</tbody>\n</table>', 'pinChange', 'team@flyup.pk '),
(8, 'Reset Password', '<table cellpadding=''5'' cellspacing=''0'' width=''612''>\n    <thead>\n        <tr>\n            <th width=''140''>\n    <div id=''logo''>\n        <img src=''http://flyup.iserver.purelogics.info/css/images/logo2.png'' width=''140px'' height =''115px'' alt=''logo'' />\n    </div>\n</th>\n<th>\n<h2>Pin Change</h2>\n\n</th>\n</tr>\n</thead>\n<tfoot>\n<td colspan=''2'' align=''right''>\n    <br>\n    <small><b><i>(This is an auto generated document and no signature is required by FLY UP)</i></b></small>\n</td>\n</tfoot>\n<tbody>\n    <tr>\n        <td colspan=''2''> <br> Dear Mr./Ms. {USER_CODE2}: </td>\n    </tr>                \n    <tr>\n        <td colspan=''2''>\n            <p align=''justify''>\n                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n\n                To Change You Password Click . {VERIFICATION_URL}</b>.\n                <br/>\n                <br/>\n                Thanks,\n            </p>\n            <p align=''justify''>\n                <br>\n                Signature of Introducer:_____________________ &nbsp;&nbsp;Signature of Distributor:_____________________\n            </p>\n        </td>\n    </tr>    \n</tbody>\n</table>', 'fpassword', 'team@flyup.pk ');

// --------------------- add paid_by field in product_history table pushed live---------- on 2.22.2014
ALTER TABLE  `products_history` ADD  `paid_by` VARCHAR( 250 ) NULL DEFAULT NULL AFTER  `product_name` ;
// --------------------- add data_key field in customer table pushed live---------- on 2.22.2014
ALTER TABLE `customer` ADD `data_key` VARCHAR( 250 ) NULL DEFAULT NULL AFTER `k_relation` ;
// --------------------- add 14 to 22 types in type statment pushed live---------- on 2.22.2014
INSERT INTO `type_statment` (`id`, `statment`, `type`, `datetime`) VALUES
(1, 'Fly Up Comission made by code<b>', 0, '2014-02-03 00:00:00'),
(2, 'Comission Made By New Introducer Code ', 0, '2014-02-04 00:00:00'),
(3, 'Direct Comission Made By Code', 0, '2014-02-04 00:00:00'),
(4, 'Detect Amount From <b> Transfer Funds </b>And Introduce New Distributor Code<b>  ', 0, '0000-00-00 00:00:00'),
(5, 'Renewal From Code ', 0, '0000-00-00 00:00:00'),
(6, 'Detect Amount From Transfer funds And Funds Transfer to code ', 0, '0000-00-00 00:00:00'),
(7, 'Detect Amount From Direct balance Funds Transfer To Code', 0, '2014-02-04 00:00:00'),
(8, 'Funds Received From Code ', 0, '2014-02-04 00:00:00'),
(9, 'Detect Amount From Transfer Funds Renewal Code ', 0, '2014-02-04 00:00:00'),
(10, 'Detect Amount From Direct Balance And Renewal Code ', 0, '2014-02-04 00:00:00'),
(11, 'Detect Amount From Direct Balance Introduce New Distributor Code  ', 0, '2014-02-04 00:00:00'),
(12, 'Detect Amount From Fly up balance And Renewal The code ', 0, '2014-02-04 00:00:00'),
(13, 'Detect Amount From Fly up balance And Funds Transfer to Code ', 0, '2014-02-04 00:00:00'),
(14, 'Detect Amount From Fly up balance Introduce New Distributor Code ', 0, '2014-02-04 00:00:00'),
(15, 'Detect Amount From Transfer Balance And You Receive Cash From Admin Code', 0, '2014-02-18 00:00:00'),
(16, 'Paid Cash To User Code', 0, '2014-02-19 00:00:00'),
(17, 'Detect Amount From Odd Earning Balance And You Receive Cash From Admin Code', 0, '2014-02-19 00:00:00'),
(18, 'Detect Amount From Fly Up Earning Balance And You Receive Cash From Admin Code', 0, '2014-02-19 00:00:00'),
(19, 'Received Cash From Super Admin', 0, '2014-02-19 00:00:00'),
(20, 'Transfer Balance To user', 0, '2014-02-20 00:22:30'),
(21, 'Transfer Balance By Admin To User Code', 0, '2014-02-20 00:00:00'),
(22, 'Received Balance By Admin From User Code', 0, '2014-02-20 00:00:00');

-------------------------------- pushed Live On 17-2-2014----------------------------
-- phpMyAdmin SQL Dump
-- version 4.0.9
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Feb 17, 2014 at 04:20 PM
-- Server version: 5.6.14
-- PHP Version: 5.5.6

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 */;

--
-- Database: `flyup_online`
--

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

--
-- Table structure for table `admin_balance_history`
--

CREATE TABLE IF NOT EXISTS `admin_balance_history` (
  `balance_id` int(11) NOT NULL AUTO_INCREMENT,
  `user_code` int(255) NOT NULL,
  `date` datetime NOT NULL,
  `remaining_balance` int(11) NOT NULL,
  `new_balance` int(11) NOT NULL,
  PRIMARY KEY (`balance_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `admin_login`
--

CREATE TABLE IF NOT EXISTS `admin_login` (
  `user_code` varchar(30) COLLATE latin1_general_ci NOT NULL,
  `pin` varchar(100) COLLATE latin1_general_ci NOT NULL,
  `password` varchar(30) COLLATE latin1_general_ci NOT NULL,
  `balance` varchar(255) COLLATE latin1_general_ci NOT NULL,
  `admin_type` int(100) NOT NULL DEFAULT '0',
  PRIMARY KEY (`user_code`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Dumping data for table `admin_login`
--

INSERT INTO `admin_login` (`user_code`, `pin`, `password`, `balance`, `admin_type`) VALUES
('512', '123', '123', '1000000000000000000000000000000000000', 1122),
('12', '123', '123', '0', 0);

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

--
-- Table structure for table `aloevera_results`
--

CREATE TABLE IF NOT EXISTS `aloevera_results` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(30) DEFAULT NULL,
  `description` text,
  `file` varchar(100) NOT NULL,
  `created_at` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `audit_log`
--

CREATE TABLE IF NOT EXISTS `audit_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `reason_type` int(20) NOT NULL,
  `user_id` int(255) NOT NULL,
  `created_id` int(255) NOT NULL,
  `detail` varchar(255) NOT NULL,
  `profit` tinyint(4) NOT NULL COMMENT '0=No ,1 =Yes',
  `date` date NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `authentication_failed_tracking`
--

CREATE TABLE IF NOT EXISTS `authentication_failed_tracking` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ip` varchar(30) NOT NULL,
  `access_name` varchar(30) NOT NULL,
  `date` datetime NOT NULL,
  `attempt_type` varchar(30) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `banners`
--

CREATE TABLE IF NOT EXISTS `banners` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `image_name` varchar(255) NOT NULL,
  `location` varchar(255) NOT NULL,
  `position` int(11) NOT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT '1',
  `date` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `commission_status_history`
--

CREATE TABLE IF NOT EXISTS `commission_status_history` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_code` int(11) NOT NULL,
  `total_commission` int(11) NOT NULL,
  `month` varchar(10) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL,
  `status` tinyint(4) NOT NULL,
  `paid_date` datetime DEFAULT NULL,
  `pairs` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `customer`
--

CREATE TABLE IF NOT EXISTS `customer` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `user_code` int(100) NOT NULL,
  `father_name` varchar(255) NOT NULL,
  `picture` varchar(255) NOT NULL,
  `pin` varchar(100) NOT NULL,
  `home_address` varchar(255) NOT NULL,
  `nationality` varchar(255) NOT NULL,
  `cnic` varchar(255) NOT NULL,
  `gender` tinyint(4) NOT NULL COMMENT '0 = female & 1 = male',
  `marital_status` varchar(20) DEFAULT NULL,
  `mobile_no` varchar(50) NOT NULL,
  `email` varchar(255) NOT NULL,
  `parent_id` int(20) NOT NULL,
  `type` int(4) NOT NULL COMMENT '1 = odd & 2 = even',
  `odd_childs` int(100) NOT NULL,
  `even_childs` int(100) NOT NULL,
  `odd_side_profit` int(200) NOT NULL,
  `even_side_profit` int(200) NOT NULL,
  `is_expire` tinyint(4) NOT NULL COMMENT '0 = no & 1 = yes',
  `is_active` tinyint(4) DEFAULT '0' COMMENT '0 = no,1=yes',
  `expired_on` date NOT NULL,
  `in_month` int(20) NOT NULL COMMENT '1 = odd & 2 = even',
  `at_level` int(200) NOT NULL,
  `depth_level` int(200) NOT NULL,
  `category` tinyint(4) NOT NULL COMMENT '0 = limited & 1 = unlimited',
  `total_balance` int(200) NOT NULL,
  `remaning_blance` int(200) NOT NULL,
  `courier_charges` tinyint(4) NOT NULL DEFAULT '0',
  `received` int(255) NOT NULL DEFAULT '0',
  `lost_blance` int(200) NOT NULL,
  `transfer_funds` int(250) NOT NULL DEFAULT '0',
  `join_date` datetime NOT NULL,
  `password` int(150) NOT NULL,
  `k_name` varchar(255) DEFAULT NULL,
  `k_cnic` varchar(111) DEFAULT NULL,
  `k_relation` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=785 ;

--
-- Dumping data for table `customer`
--

INSERT INTO `customer` (`id`, `name`, `user_code`, `father_name`, `picture`, `pin`, `home_address`, `nationality`, `cnic`, `gender`, `marital_status`, `mobile_no`, `email`, `parent_id`, `type`, `odd_childs`, `even_childs`, `odd_side_profit`, `even_side_profit`, `is_expire`, `is_active`, `expired_on`, `in_month`, `at_level`, `depth_level`, `category`, `total_balance`, `remaning_blance`, `courier_charges`, `received`, `lost_blance`, `transfer_funds`, `join_date`, `password`, `k_name`, `k_cnic`, `k_relation`) VALUES
(1, 'flyup', 1, 'skyaims', 'man.png', '1', '', '', '3320208000669', 1, NULL, '03467243877', 'ahsancheema1988@yahoo.com', 0, 1, 1, 0, 0, 0, 0, 1, '2050-12-20', 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, '2013-12-20 00:00:00', 123456, NULL, NULL, NULL),
(2, 'Company', 2, 'me', 'man.png', '1', 'lahore Pakistan', 'Pakistan', '352022222222', 1, 'single', '03216500222', 'ahsan.ali@purelogics.net', 1, 1, 0, 0, 0, 0, 0, 0, '2015-11-05', 0, 0, 0, 0, 1000000, 1000000, 0, 0, 0, 1000000, '2012-01-02 00:00:00', 1234, 'fakher', '352222202020202', 'father');

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

--
-- Table structure for table `email_templates`
--

CREATE TABLE IF NOT EXISTS `email_templates` (
  `id` int(255) NOT NULL AUTO_INCREMENT,
  `subject` varchar(255) NOT NULL,
  `body` varchar(255) NOT NULL,
  `title` varchar(100) NOT NULL,
  `from_email` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;

--
-- Dumping data for table `email_templates`
--

INSERT INTO `email_templates` (`id`, `subject`, `body`, `title`, `from_email`) VALUES
(1, 'hello', 'Hi,\nYou are register on flu Up you code is {FLYUP_CODE},Pin {FLYUP_PIN} and your password {FLYUP_PASSWORD} ', 'signUp', 'ahsan.ali@purelogics.net'),
(3, 'hello', 'hi\r\nyou transfer amount {AMOUNT} to User Code {USER_CODE}', 'transfer', 'ahsan.ali@purelogics.net'),
(4, 'hello', 'you renew account user code {USER_CODE} with amount {AMOUNT}', 'renew', 'ahsan.ali@purelogics.net');

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

--
-- Table structure for table `login_tracking`
--

CREATE TABLE IF NOT EXISTS `login_tracking` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ip_address` varchar(30) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL,
  `date` datetime NOT NULL,
  `access_name` varchar(30) CHARACTER SET latin1 COLLATE latin1_general_ci DEFAULT NULL,
  `access_password` varchar(30) CHARACTER SET latin1 COLLATE latin1_general_ci DEFAULT NULL,
  `status` binary(1) DEFAULT NULL,
  `type` varchar(30) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL,
  `created_at` date NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `news`
--

CREATE TABLE IF NOT EXISTS `news` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `news` varchar(10000) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL,
  `date` datetime NOT NULL,
  `status` tinyint(4) NOT NULL,
  `priority` int(11) NOT NULL DEFAULT '100',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `payment_log`
--

CREATE TABLE IF NOT EXISTS `payment_log` (
  `payment_id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `balance_type` varchar(100) COLLATE latin1_general_ci DEFAULT NULL,
  `amount` int(11) NOT NULL,
  `dabit` int(111) NOT NULL DEFAULT '0',
  `credit` int(111) NOT NULL DEFAULT '0',
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `type` varchar(255) COLLATE latin1_general_ci NOT NULL,
  `benifit_from` int(100) NOT NULL,
  `benifit_to` int(100) NOT NULL DEFAULT '0',
  PRIMARY KEY (`payment_id`),
  KEY `id` (`user_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=1194 ;

--
-- Dumping data for table `payment_log`
--

INSERT INTO `payment_log` (`payment_id`, `user_id`, `balance_type`, `amount`, `dabit`, `credit`, `date`, `type`, `benifit_from`, `benifit_to`) VALUES
(13, 2, NULL, 1000000, 1000000, 0, '2014-02-06 09:13:36', '8', 0, 0);

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

--
-- Table structure for table `products`
--

CREATE TABLE IF NOT EXISTS `products` (
  `code` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(100) COLLATE latin1_general_ci NOT NULL,
  `comment` varchar(250) COLLATE latin1_general_ci DEFAULT NULL,
  `amount` float NOT NULL,
  `actual_amount` float NOT NULL,
  `expire_after_days` int(255) NOT NULL,
  `is_active` int(11) NOT NULL,
  PRIMARY KEY (`code`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=41 ;

--
-- Dumping data for table `products`
--

INSERT INTO `products` (`code`, `name`, `comment`, `amount`, `actual_amount`, `expire_after_days`, `is_active`) VALUES
(38, 'Fly Up', NULL, 7000, 7000, 90, 1),
(40, 'Super Fly Up', NULL, 14000, 14000, 360, 1);

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

--
-- Table structure for table `products_history`
--

CREATE TABLE IF NOT EXISTS `products_history` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_code` varchar(100) COLLATE latin1_general_ci NOT NULL,
  `user_name` varchar(100) COLLATE latin1_general_ci NOT NULL,
  `resiver_name` varchar(200) COLLATE latin1_general_ci DEFAULT NULL,
  `is_paid` tinyint(4) NOT NULL,
  `date` datetime NOT NULL,
  `paid_date` datetime NOT NULL,
  `product_code` int(11) NOT NULL DEFAULT '2',
  `product_name` varchar(100) COLLATE latin1_general_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `renewal_history`
--

CREATE TABLE IF NOT EXISTS `renewal_history` (
  `renewalId` int(11) NOT NULL AUTO_INCREMENT,
  `id` varchar(50) NOT NULL,
  `amount` int(11) NOT NULL,
  `renewalTime` varchar(100) NOT NULL,
  PRIMARY KEY (`renewalId`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `sms_log`
--

CREATE TABLE IF NOT EXISTS `sms_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `receiver_no` varchar(30) NOT NULL,
  `message` text NOT NULL,
  `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0 for sent and 1 for not sent',
  `date` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `transaction_log`
--

CREATE TABLE IF NOT EXISTS `transaction_log` (
  `transaction_id` int(11) NOT NULL AUTO_INCREMENT,
  `parent_id` int(11) NOT NULL,
  `child_id` int(11) NOT NULL,
  `points` int(11) NOT NULL DEFAULT '0',
  `pairs` int(11) NOT NULL DEFAULT '0',
  `left_balance` int(11) NOT NULL DEFAULT '0',
  `right_balance` int(11) NOT NULL DEFAULT '0',
  `cancelled_pairs` int(11) NOT NULL,
  `pair_limit` int(11) NOT NULL DEFAULT '-1',
  `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `commission` int(11) NOT NULL,
  `position` tinyint(4) NOT NULL,
  PRIMARY KEY (`transaction_id`),
  KEY `parent_id` (`parent_id`),
  KEY `child_id` (`child_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `type_statment`
--

CREATE TABLE IF NOT EXISTS `type_statment` (
  `id` int(100) NOT NULL AUTO_INCREMENT,
  `statment` varchar(200) NOT NULL,
  `type` int(10) NOT NULL,
  `datetime` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=15 ;

--
-- Dumping data for table `type_statment`
--

INSERT INTO `type_statment` (`id`, `statment`, `type`, `datetime`) VALUES
(1, 'Fly Up Comission made by code<b>', 0, '2014-02-03 00:00:00'),
(2, 'Comission Made By New Introducer Code ', 0, '2014-02-04 00:00:00'),
(3, 'Direct Comission Made By Code', 0, '2014-02-04 00:00:00'),
(4, 'Detect Amount From <b> Transfer Funds </b>And Introduce New Distributor Code<b>  ', 0, '0000-00-00 00:00:00'),
(5, 'Renewal From Code ', 0, '0000-00-00 00:00:00'),
(6, 'Detect Amount From Transfer funds And Funds Transfer to code ', 0, '0000-00-00 00:00:00'),
(7, 'Detect Amount From Direct balance Funds Transfer To Code', 0, '2014-02-04 00:00:00'),
(8, 'Funds Received From Code ', 0, '2014-02-04 00:00:00'),
(9, 'Detect Amount From Transfer Funds Renewal Code ', 0, '2014-02-04 00:00:00'),
(10, 'Detect Amount From Direct Balance And Renewal Code ', 0, '2014-02-04 00:00:00'),
(11, 'Detect Amount From Direct Balance Introduce New Distributor Code  ', 0, '2014-02-04 00:00:00'),
(12, 'Detect Amount From Fly up balance And Renewal The code ', 0, '2014-02-04 00:00:00'),
(13, 'Detect Amount From Fly up balance And Funds Transfer to Code ', 0, '2014-02-04 00:00:00'),
(14, 'Detect Amount From Fly up balance Introduce New Distributor Code ', 0, '2014-02-04 00:00:00');

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

--
-- Table structure for table `vouchers`
--

CREATE TABLE IF NOT EXISTS `vouchers` (
  `voucher_id` int(11) NOT NULL AUTO_INCREMENT,
  `customer_id` int(11) NOT NULL,
  `customer_name` varchar(255) COLLATE latin1_general_ci NOT NULL,
  `date` datetime NOT NULL,
  `type` varchar(30) COLLATE latin1_general_ci NOT NULL,
  `amount` int(11) NOT NULL,
  `product_type` int(11) NOT NULL DEFAULT '1',
  `benefit_to` int(100) NOT NULL,
  `benefit_from` int(100) DEFAULT '0',
  PRIMARY KEY (`voucher_id`),
  KEY `customer_id` (`customer_id`),
  KEY `transfer_to_code` (`benefit_to`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=1 ;

/*!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 */;
