DROP TABLE IF EXISTS `admin`;
CREATE TABLE IF NOT EXISTS `admin` (
  `iAdminId` int(12) NOT NULL auto_increment,
  `vFirstName` varchar(150) NOT NULL,
  `vLastName` varchar(150) NOT NULL,
  `vEmail` varchar(255) NOT NULL,
  `vUserName` varchar(100) NOT NULL,
  `vPassword` varchar(100) NOT NULL,
  `vFromIP` varchar(20) NOT NULL default '',
  `dLastLogin` datetime NOT NULL default '0000-00-00 00:00:00',
  `dDate` date default NULL,
  `eStatus` enum('Active','Inactive') NOT NULL default 'Active',
  PRIMARY KEY  (`iAdminId`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

DROP TABLE IF EXISTS `image`;
CREATE TABLE IF NOT EXISTS `image` (
  `iImageId` int(12) NOT NULL auto_increment,
  `vImageUniqueId` varchar(30) NOT NULL,
  `eShowLogo` enum('Y','N') NOT NULL default 'Y',
  `vImageFile` varchar(255) NOT NULL,
  `vURL` varchar(500) NOT NULL,
  `vTitle` varchar(500) NOT NULL,
  `vArtist` varchar(500) NOT NULL,
  `eCustomTitle` enum('Y','N') NOT NULL default 'N',
  `eCustomTitleType` enum('T','I') NOT NULL COMMENT 'T = Text | I = Image',
  `vCustomTitle` varchar(500) NOT NULL,
  `vImage` varchar(100) NOT NULL,
  `tDescription1` text NOT NULL,
  `tDescription2` text NOT NULL,
  `tDescription3` text NOT NULL,
  `vTag` varchar(500) NOT NULL,
  `ePlayerFullScreen` enum('Y','N') NOT NULL default 'Y',
  `eTimmyURLBox` enum('Y','N') NOT NULL default 'N',
  `eShare` enum('Y','N') NOT NULL default 'N',
  `eAllowComment` enum('Y','N') NOT NULL default 'N',
  `eNameMandatory` enum('Y','N') NOT NULL default 'N',
  `eEmailMandatory` enum('Y','N') NOT NULL default 'N',
  `vName` varchar(50) NOT NULL,
  `vEmail` varchar(255) NOT NULL,
  `vPassword` varchar(50) NOT NULL,
  `eViewed` enum('Y','N') NOT NULL default 'N',
  `iViewed` int(12) NOT NULL,
  `eMonetize` enum('Y','N') NOT NULL default 'N',
  `eShowMoneyAd` enum('Y','N') NOT NULL default 'N',
  `eShowMoneyAdPos` enum('L','R') NOT NULL,
  `eShowWhiteHatAd` enum('Y','N') NOT NULL default 'N',
  `eShowWhiteHatAdPos` enum('L','R') NOT NULL,
  `eShowAutoRespoAd` enum('Y','N') NOT NULL default 'N',
  `eShowAutoRespoAdPos` enum('L','R') NOT NULL,
  `eShowDevCenterAd` enum('Y','N') NOT NULL default 'N',
  `eShowDevCenterAdPos` enum('L','R') NOT NULL,
  `vClickbankID` varchar(50) NOT NULL,
  `vIP` varchar(20) NOT NULL,
  `dModifiedDate` datetime NOT NULL,
  `dDate` datetime NOT NULL,
  `eStatus` enum('Active','Inactive') NOT NULL default 'Active',
  PRIMARY KEY  (`iImageId`),
  KEY `vEmail` (`vEmail`),
  KEY `vVideoUniqueId` (`vImageUniqueId`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

DROP TABLE IF EXISTS `image_comment`;
CREATE TABLE IF NOT EXISTS `image_comment` (
  `iImageCommentId` int(12) NOT NULL auto_increment,
  `iImageId` int(12) NOT NULL,
  `vName` varchar(100) NOT NULL,
  `vEmail` varchar(255) NOT NULL,
  `tComment` text NOT NULL,
  `vIP` varchar(20) NOT NULL,
  `dDate` datetime NOT NULL,
  `eStatus` enum('Active','Inactive') NOT NULL default 'Active',
  PRIMARY KEY  (`iImageCommentId`),
  KEY `iVideoId` (`iImageId`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;


DROP TABLE IF EXISTS `setting_sc`;
CREATE TABLE `setting_sc` (
  `vName` varchar(255) NOT NULL default '',
  `vDesc` varchar(255) NOT NULL default '',
  `vValue` text NOT NULL,
  `iOrderBy` tinyint(1) NOT NULL default '0',
  `eConfigType` enum('Admin Settings','Website Settings','Email','General','Meta Tag Informatioin','Branding') NOT NULL default 'General',
  `eDisplayType` enum('text','selectbox','textarea','checkbox','Image') NOT NULL default 'text',
  `eSource` enum('List','Query') default NULL,
  `vSourceValue` varchar(255) NOT NULL default '',
  `eSelectType` enum('Single','Multiple') NOT NULL default 'Single',
  `vDefValue` varchar(255) NOT NULL default '',
  `eStatus` enum('Active','Inactive') NOT NULL default 'Active',
  PRIMARY KEY  (`vName`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

# data

INSERT INTO `setting_sc` (`vName`, `vDesc`, `vValue`, `iOrderBy`, `eConfigType`, `eDisplayType`, `eSource`, `vSourceValue`, `eSelectType`, `vDefValue`, `eStatus`) VALUES
('ADMIN_PAGING_BOTTOM', 'Show Paging at Bottom in Admin', 'N', 10, 'General', 'checkbox', NULL, '', 'Single', 'Y', 'Inactive'),
('ADMIN_PAGING_TOP', 'Show Paging at Top in Admin', 'N', 9, 'General', 'checkbox', NULL, '', 'Single', 'Y', 'Inactive'),
('ADMIN_TITLE', 'Admin Title', '::. SmartAffiliateSite .:: [Admin Control Panel]', 1, 'Admin Settings', 'text', NULL, '', 'Single', '', 'Active'),
('ALPHA_SEARCH_BOTTOM', 'Show Alphabet Search at Bottom', 'N', 8, 'General', 'checkbox', NULL, '', 'Single', 'Y', 'Inactive'),
('ALPHA_SEARCH_TOP', 'Show Alphabet Search at Top', 'N', 7, 'General', 'checkbox', NULL, '', 'Single', 'Y', 'Inactive'),
('CPANEL_TITLE', 'Admin Heading', 'SmartAffiliateSite ', 2, 'Admin Settings', 'text', NULL, '', 'Single', '', 'Active'),
('FRONT_SITE_TITLE', 'Show Frontend Title', 'Test', 1, 'Website Settings', 'text', NULL, '', 'Single', '', 'Active'),
('PAGELIMIT', 'Page Limit (Admin Side)', '10', 6, 'General', 'text', NULL, '', 'Single', '10', 'Inactive'),
('RECLIMIT', 'No Of Records Per Page (Admin Side)', '10', 5, 'General', 'text', NULL, '', 'Single', '10', 'Inactive'),
('META_DESCRIPTION', 'Meta Description', '', 3, 'Meta Tag Informatioin', 'textarea', NULL, '', 'Single', '', 'Active'),
('META_KEYWORD', 'Meta Keyword', '', 2, 'Meta Tag Informatioin', 'textarea', NULL, '', 'Single', '', 'Active'),
('META_OTHER', 'Other SEO Related META TAGS', '<meta name="robots" content="index,follow">\r\n<META NAME="GOOGLEBOT" CONTENT="INDEX, FOLLOW">\r\n<meta name="revisit-after" content="2 days">\r\n<meta name="reply-to" content="">\r\n<meta name="document-classification" content="Internet">\r\n<meta name="document-type" content="Public">\r\n<meta name="document-rating" content="Safe for Kids">\r\n<meta name="document-distribution" content="Global">', 4, 'Meta Tag Informatioin', 'textarea', NULL, '', 'Single', '', 'Active'),
('GOOGLE_TRACKING_CODE', 'Google Tracking Code', '', 0, 'General', 'textarea', NULL, '', 'Single', '', 'Active'),
('HOME_PAGE_LOGO_IMG', 'Top Logo', '1293107208_1292861879_logo-2.png', 4, 'Website Settings', 'Image', NULL, '<B>jpg, jpeg, gif, png</B> [W:238px X 75px]', 'Single', '', 'Active'),
('HOME_PAGE_FACEBOOK_ICON', 'Facebook Icon', 'N', 11, 'Website Settings', 'checkbox', NULL, '', 'Single', '', 'Active'),
('HOME_PAGE_FACEBOOK_LINK', 'Facebook Link ', '', 12, 'Website Settings', 'text', NULL, '', 'Single', '', 'Active'),
('HOME_PAGE_TWITTER_ICON', 'Twitter Icon', 'N', 13, 'Website Settings', 'checkbox', NULL, '', 'Single', '', 'Active'),
('HOME_PAGE_TWITTER_LINK', 'Twitter Link ', '', 14, 'Website Settings', 'text', NULL, '', 'Single', '', 'Active'),
('HOME_PAGE_MYSPACE_ICON', 'Myspace Icon', 'N', 15, 'Website Settings', 'checkbox', NULL, '', 'Single', '', 'Active'),
('HOME_PAGE_MYSPACE_LINK', 'Myspace Link ', '', 16, 'Website Settings', 'text', NULL, '', 'Single', '', 'Active'),
('HOME_PAGE_BLOG_ICON', 'Blog Icon', 'N', 17, 'Website Settings', 'checkbox', NULL, '', 'Single', '', 'Active'),
('HOME_PAGE_BLOG_LINK', 'Blog Link ', '', 18, 'Website Settings', 'text', NULL, '', 'Single', '', 'Active'),
('TERMS_OF_USE_TITLE', 'Terms of Use Title', 'Terms of Use', 19, 'Website Settings', 'text', NULL, '', 'Single', '', 'Active'),
('TERMS_OF_USE_TEXT', 'Terms of Use Text', 'Do not upload any TV shows, music videos, music concerts, or commercials images without permission unless they consist entirely of content you created yourself. By clicking "Upload File", you state that this images does not violate our "Terms of Use" and that you own all copyrights in this images or have authorization to upload it.', 20, 'Website Settings', 'textarea', NULL, '', 'Single', '', 'Active'),
('TAG_LINE_TITLE', 'Tagline Title', '#1 Instant Viral Image Page', 2, 'Website Settings', 'text', NULL, '', 'Single', '', 'Active'),
('TOP_BANNER', 'Top Banner Image', '1292491013_top-banner.png', 6, 'Website Settings', 'Image', NULL, '<B>jpg, jpeg, gif, png</B> [W:710px X H:120px]', 'Single', '', 'Active'),
('LEFT_BANNER', 'Left Banner Image', '1292918873_left-banner.png', 9, 'Website Settings', 'Image', NULL, '<B>jpg, jpeg, gif, png</B> [W:120px X H:710px]', 'Single', '', 'Active'),
('COPYRIGHT_TEXT_ON_BOTTOM', 'Bottom of Site', 'Copyright 2010 TimBekkerdotcom <a href="http://www.InternetMarketingXL.com" target="_blank" style="font-size:10px;color:#000000;">http://www.InternetMarketingXL.com</a>', 21, 'Branding', 'textarea', NULL, '', 'Single', '', 'Active'),
('THEME', 'Theme', 'default', 1, 'General', 'text', NULL, '', 'Single', '', 'Inactive'),
('EMAIL_FOOTER', 'Email Footer', 'Best regards,\r\nSmartAffiliateSite Team', 2, 'Email', 'textarea', NULL, '', 'Single', '', 'Active'),
('EMAIL_FROM_NAME', 'Email From Text Display', 'Smart Affiliate', 1, 'Email', 'text', NULL, '', 'Single', '', 'Active'),
('EMAIL_ADMIN', 'Administrator Email ID', '', 3, 'Email', 'text', NULL, '', 'Single', '', 'Active'),
('UPLOAD_FILE_SIZE_LIMIT', 'Maximum File Size Upload', '3', 3, 'Website Settings', 'selectbox', 'List', '1,2,3,4,5', 'Single', '', 'Active'),
('TOP_BANNER_TYPE', 'Top Banner Type', 'Image', 5, 'Website Settings', 'selectbox', 'List', 'Customcode,Image', 'Single', '', 'Active'),
('TOP_BANNER_CUSTOM_CODE', 'Top banner Custom Code', '', 7, 'Website Settings', 'textarea', NULL, '', 'Single', '', 'Active'),
('LEFT_BANNER_TYPE', 'Left Banner Type', 'Image', 8, 'Website Settings', 'selectbox', 'List', 'Customcode,Image', 'Single', '', 'Active'),
('LEFT_BANNER_CUSTOMCODE', 'Left Banner Custom Code', '', 10, 'Website Settings', 'textarea', NULL, '', 'Single', '', 'Active'),
('LEFT_BANNER_LINK', 'Left Banner Link', '', 9, 'Website Settings', 'text', NULL, '', 'Single', '', 'Active'),
('TOP_BANNER_LINK', 'Top Banner Link', '', 6, 'Website Settings', 'text', NULL, '', 'Single', '', 'Active'),
('COMPANY_BRANDING', 'TimBekker Blue Corner Ad', 'Y', 0, 'Branding', 'checkbox', NULL, '', 'Single', '', 'Active');

INSERT INTO `admin` (`iAdminId`, `vFirstName`, `vLastName`, `vEmail`, `vUserName`, `vPassword`, `vFromIP`, `dLastLogin`, `dDate`, `eStatus`) VALUES
(1, 'First Name', 'Last Name', '', 'adm1n!34', 'Qadmin!34', '', '0000-00-00 00:00:00', '', 'Active'),
(2, 'First Name', 'Last Name', '', 'adm1n345', 'admin123', '', '0000-00-00 00:00:00', '', 'Active');