alter table `idx_bad_link` change `bad_link_id` `bad_link_id` mediumint(9) unsigned NOT NULL auto_increment;
alter table `idx_bad_link` change `link_id` `link_id` mediumint(9) unsigned NOT NULL default '0';

alter table `idx_category` change `category_id` `category_id` mediumint(9) unsigned NOT NULL auto_increment;
alter table `idx_category` change `parent_id` `parent_id` mediumint(9) unsigned NOT NULL default '0';
alter table `idx_category` change `related` `related` mediumint(9) NOT NULL default '0';
alter table `idx_category` add `premium_price` double default NULL;
alter table `idx_category` add `sponsored_price` double default NULL;

alter table `idx_checkurl` change `date` `date` date NOT NULL default '0000-00-00';
alter table `idx_checkurl` add `live` char(1) NOT NULL default '';
alter table `idx_checkurl` add `reciprocal_found` char(1) NOT NULL default '';
alter table `idx_checkurl` add PRIMARY KEY  (`link_id`);

CREATE TABLE `idx_invoice` (
  `invoice_id` varchar(10) NOT NULL default '',
  `invoice_date` date default NULL,
  `due_date` date default NULL,
  `invoiced_to` text,
  `service` varchar(255) default NULL,
  `description` text,
  `total` double(8,2) default NULL,
  `comment` text,
  `paid` char(1) default NULL,
  `paid_date` date default NULL,
  `email` varchar(255) default NULL,
  PRIMARY KEY  (`invoice_id`)
);

CREATE TABLE `idx_invoice_config` (
  `company` varchar(255) default NULL,
  `contact` varchar(255) default NULL,
  `address` text,
  `phone` varchar(255) default NULL,
  `email` varchar(255) default NULL,
  `currency` varchar(255) default NULL
);

alter table `idx_link` change `link_id` `link_id` mediumint(9) unsigned NOT NULL auto_increment;
alter table `idx_link` change `category_id` `category_id` mediumint(9) unsigned NOT NULL default '0';
alter table `idx_link` change `cat1` `cat1` mediumint(9) NOT NULL default '0';
alter table `idx_link` change `cat2` `cat2` mediumint(9) NOT NULL default '0';
alter table `idx_link` add `reciprocal_url` varchar(255) default NULL AFTER `suspended`;

alter table `idx_link_temp` change `vid` `vid` mediumint(9) unsigned NOT NULL auto_increment;
alter table `idx_link_temp` change `link_id` `link_id` mediumint(9) default NULL;
alter table `idx_link_temp` change `cat1` `cat1` mediumint(9) NOT NULL default '0';
alter table `idx_link_temp` change `cat2` `cat2` mediumint(9) NOT NULL default '0';
alter table `idx_link_temp` add `reciprocal_url` varchar(255) default NULL AFTER `suspended`;

CREATE TABLE `idx_link_temp_user` (
  `vid` mediumint(9) unsigned NOT NULL default '0',
  `username` varchar(20) NOT NULL default '',
  PRIMARY KEY  (`vid`)
);

CREATE TABLE `idx_link_user` (
  `link_id` mediumint(9) unsigned NOT NULL default '0',
  `username` varchar(20) NOT NULL default '',
  PRIMARY KEY  (`link_id`)
);

CREATE TABLE `idx_notification` (
  `username` varchar(20) NOT NULL default '',
  `category_id` mediumint(9) NOT NULL default '0'
);

CREATE TABLE `idx_paid_listing` (
  `link_id` mediumint(9) unsigned NOT NULL default '0',
  `premium` char(1) default NULL,
  `sponsored` char(1) default NULL,
  `expire` datetime default NULL,
  `paid` char(1) default NULL,
  PRIMARY KEY  (`link_id`)
);

CREATE TABLE `idx_payment_history` (
  `payment_id` int(10) unsigned NOT NULL auto_increment,
  `username` varchar(255) default NULL,
  `type` varchar(255) default NULL,
  `detail` text,
  `amount` double default NULL,
  `time` datetime default NULL,
  PRIMARY KEY  (`payment_id`)
);

alter table `idx_review` change `review_id` `review_id` mediumint(9) unsigned NOT NULL auto_increment;
alter table `idx_review` change `link_id` `link_id` mediumint(9) unsigned NOT NULL default '0';
alter table `idx_review` add `name` varchar(20) default NULL;
alter table `idx_review` add `email` varchar(100) default NULL;

alter table `idx_searchlog` change `result` `result` mediumint(9) unsigned default NULL;

alter table `idx_sessions` add `EXPIREREF` varchar(64) default NULL;

CREATE TABLE `idx_pagerank` (
  `link_id` mediumint(8) unsigned NOT NULL default '0',
  `engine` char(1) NOT NULL default '',
  `rank` tinyint(4) NOT NULL default '0',
  `last_update` date NOT NULL default '0000-00-00',
  PRIMARY KEY  (`link_id`,`engine`)
);

CREATE TABLE `idx_custom_field` (
  `field_name` varchar(32) NOT NULL default '',
  `field_text` varchar(64) NOT NULL default '',
  `field_type` enum('TEXT','TEXTAREA','SELECT','MULTISELECT','CHECKBOX','RADIO','FILE','IMAGE','DATE','DATETIME') NOT NULL default 'TEXT',
  `field_option` text NOT NULL,
  `field_img_width` INT(10) unsigned NOT NULL default '0',
  `field_img_height` INT(10) unsigned NOT NULL default '0',
  `field_file_size` INT(10) unsigned NOT NULL default '0',
  `field_file_extension` varchar(64) NOT NULL default '',
  `required` char(1) NOT NULL default '0',
  `searchable` char(1) NOT NULL default '1',
  `permission` char(1) NOT NULL default '0'
);

insert into `idx_invoice_config`
    (company, contact, address, phone, email, currency) values
    ('Your website / Company', 'Billing Department', 'Your address', 'Your phone #', 'Billing<name@yourdomain.com>', '$');

alter table `idx_category` add `basic_price` double unsigned NOT NULL default '0' after `order_num`;
alter table `idx_category` change `premium_price` `premium_price` double unsigned NOT NULL default '0';
alter table `idx_category` change `sponsored_price` `sponsored_price` double unsigned NOT NULL default '0';

alter table `idx_invoice_config` change `currency` `currency_symbol` varchar(255) default '$';
alter table `idx_invoice_config` add `currency_code` varchar(255) default 'USD';

alter table `idx_link` change `suspended` `suspended` char(1) NOT NULL default '0';
alter table `idx_link` change `bid` `bid` smallint(6) NOT NULL default '0';
alter table `idx_link` drop `sp_cat`;
alter table `idx_link` drop `sp_cat_date_limit`;
alter table `idx_link` drop `sp_cat_order`;
alter table `idx_link_temp` change `suspended` `suspended` char(1) NOT NULL default '0';
alter table `idx_link_temp` change `bid` `bid` smallint(6) NOT NULL default '0';
alter table `idx_link_temp` drop `sp_cat`;
alter table `idx_link_temp` drop `sp_cat_date_limit`;
alter table `idx_link_temp` drop `sp_cat_order`;

alter table `idx_users` drop `theme`;
alter table `idx_users` drop `nol_category`;
alter table `idx_users` drop `nol_search`;

drop table `idx_category_in_order`;

CREATE TABLE `idx_tags` (
  `tag` varchar(64) NOT NULL default '',
  `category_id` mediumint(8) unsigned NOT NULL default '0',
  `total` int(11) NOT NULL default '0',
  PRIMARY KEY  (`tag`,`category_id`)
);

alter table `idx_link_temp` add `spam` char(1) NOT NULL default '0' after `vid`;

CREATE TABLE `idx_badwords` (
  `word` varchar(100) NOT NULL default ''
);


#  
# Table structure for table 'idx_email_template' 
#  

DROP TABLE IF EXISTS `idx_email_template`;
CREATE TABLE `idx_email_template` (
  `email_template_id` int(10) unsigned NOT NULL auto_increment,
  `name` varchar(255) default NULL,
  `subject` varchar(255) default NULL,
  `body` text,
  `altbody` text,
  PRIMARY KEY  (`email_template_id`)
);


#  
# Dumping data for table 'idx_email_template' 
#  

insert  into `idx_email_template`(`email_template_id`,`name`,`subject`,`body`,`altbody`) values (1,'add_ok','Resource Added','<div style=\"font-weight:bold;\">Thank you for your submission to <%$site_name%></div>\r\n<p>\r\n<div style=\"float:left;width:200px;\">Resource ID</div>\r\n<div style=\"float:left;width:10px;\"> : </div>\r\n<div style=\"float:left;width:200px;\"><%$link_id%></div>\r\n<div style=\"float:left;width:200px;\">Title</div>\r\n<div style=\"float:left;width:10px;\"> : </div>\r\n<div style=\"float:left;width:200px;\"><%$title%></div>\r\n<div style=\"float:left;width:200px;\">Url</div>\r\n<div style=\"float:left;width:10px;\">  : </div>\r\n<div style=\"float:left;width:200px;\"><%$url%></div>\r\n<div style=\"float:left;width:200px;\">Description </div>\r\n<div style=\"float:left;width:10px;\"> : </div>\r\n<div style=\"float:left;width:200px;\"><%$description%></div>\r\n<div style=\"float:left;width:200px;\">Category </div>\r\n<div style=\"float:left;width:10px;\"> : </div>\r\n<div style=\"float:left;width:200px;\"><%$category%></div>\r\n<div style=\"float:left;width:200px;\">Contact name</div>\r\n<div style=\"float:left;width:10px;\"> : </div>\r\n<div style=\"float:left;width:200px;\"><%$contact_name%></div>\r\n<div style=\"float:left;width:200px;\">Email</div>\r\n<div style=\"float:left;width:10px;\">  : </div>\r\n<div style=\"float:left;width:200px;\"><%$email%></div>\r\n<div style=\"float:left;width:200px;\">Password </div>\r\n<div style=\"float:left;width:10px;\"> : </div>\r\n<div style=\"float:left;width:200px;\"><%$password%></div>\r\n<p>\r\nYour link has been added.\r\n<p>\r\n<p>\r\nRegards,\r\n<p>\r\n<%$site_name%> Team\r\n','Thank you for your submission to <%$site_name%>\r\nResource ID  : <%$link_id%>\r\nTitle        : <%$title%>\r\nUrl          : <%$url%>\r\nDescription  : <%$description%>\r\nCategory     : <%$category%>\r\nContact name : <%$contact_name%>\r\nEmail        : <%$email%>\r\nPassword     : <%$password%>\r\nYour link has been added.\r\nRegards,\r\n<%$site_name%> Team'),(2,'add_ok_editor','Resource Added','<div style=\"font-family:arial;font-size:12px;\">\r\nThere\'s a new submission to <b><%$site_name%></b>.\r\n<p>\r\n<p>\r\n<table cellspacing=0 cellpadding=0>\r\n<tr><td style=\"width:100px;\">Resource ID</td><td style=\"width:10px;\">:</td><td ><%$link_id%></td></tr>\r\n<tr><td style=\"width:100px;\">Title</td><td style=\"width:10px;\">:</td><td ><%$title%></td></tr>\r\n<tr><td style=\"width:100px;\">Url</td><td style=\"width:10px;\">:</td><td ><%$url%></td></tr>\r\n<tr><td style=\"width:100px;\">Description</td><td style=\"width:10px;\">:</td><td ><%$description%></td></tr>\r\n<tr><td style=\"width:100px;\">Category</td><td style=\"width:10px;\">:</td><td ><%$category%></td></tr>\r\n<tr><td style=\"width:100px;\">Contact name</td><td style=\"width:10px;\">:</td><td ><%$contact_name%></td></tr>\r\n<tr><td style=\"width:100px;\">Email/td><td style=\"width:10px;\">:</td><td ><%$email%></td></tr>\r\n</table>\r\n<p>\r\nThe category permissions allow webmasters to add/modify links without needing approval.\r\nThe link has been added.\r\n<p>\r\n<p>\r\nRegards,\r\n<p>\r\n<%$site_name%> Team\r\n</div>','There\'s a new submission to <%$site_name%>.\r\nResource ID  : <%$link_id%>\r\nTitle        : <%$title%>\r\nUrl          : <%$url%>\r\nDescription  : <%$description%>\r\nCategory     : <%$category%>\r\nContact name : <%$contact_name%>\r\nEmail        : <%$email%>\r\nThe category permissions allow webmasters to add/modify links without needing approval.\r\nThe link has beed added.\r\nRegards,\r\n<%$site_name%> Team\r\n'),(3,'add_ok_subscriber','Resource Added','<div style=\"font-family:arial;font-size:12px;\">\r\nYou are receiving this email because you have a subscription for update notifications in <b><%$category%></b> category.\r\n<p>\r\nThere\'s a new submission to <b><%$site_name%><b>.\r\n<p>\r\n<table cellspacing=0 cellpadding=0>\r\n<tr><td style=\"width:100px;\">Resource ID</td><td style=\"width:10px;\">:</td><td ><%$link_id%></td></tr>\r\n<tr><td style=\"width:100px;\">Title</td><td style=\"width:10px;\">:</td><td ><%$title%></td></tr>\r\n<tr><td style=\"width:100px;\">Url</td><td style=\"width:10px;\">:</td><td ><%$url%></td></tr>\r\n<tr><td style=\"width:100px;\">Description</td><td style=\"width:10px;\">:</td><td ><%$description%></td></tr>\r\n<tr><td style=\"width:100px;\">Category</td><td style=\"width:10px;\">:</td><td ><%$category%></td></tr>\r\n<tr><td style=\"width:100px;\">Contact name</td><td style=\"width:10px;\">:</td><td ><%$contact_name%></td></tr>\r\n</table>\r\n<p>\r\n<p>\r\nRegards,\r\n<p>\r\n<b><%$site_name%></b> Team\r\n</div>','You are receiving this email because you have a subscription for update notifications in <%$category%> category.\r\nThere\'s a new submission to <%$site_name%>.\r\nResource ID  : <%$link_id%>\r\nTitle        : <%$title%>\r\nUrl          : <%$url%>\r\nDescription  : <%$description%>\r\nCategory     : <%$category%>\r\nContact name : <%$contact_name%>\r\nRegards,\r\n<%$site_name%> Team\r\n'),(4,'add_pending','Pending Resource','<div style=\"font-family:arial;font-size:12px;\">\r\nThank you for your submission to <b><%$site_name%></b>.\r\n<p>\r\n<table cellspacing=0 cellpadding=0>\r\n<tr><td style=\"width:100px;\">Title</td><td style=\"width:10px;\">:</td><td ><%$title%></td></tr>\r\n<tr><td style=\"width:100px;\">Url</td><td style=\"width:10px;\">:</td><td ><%$url%></td></tr>\r\n<tr><td style=\"width:100px;\">Description</td><td style=\"width:10px;\">:</td><td ><%$description%></td></tr>\r\n<tr><td style=\"width:100px;\">Category</td><td style=\"width:10px;\">:</td><td ><%$category%></td></tr>\r\n<tr><td style=\"width:100px;\">Contact name</td><td style=\"width:10px;\">:</td><td ><%$contact_name%></td></tr>\r\n<tr><td style=\"width:100px;\">Email</td><td style=\"width:10px;\">:</td><td ><%$email%></td></tr>\r\n</table>\r\n<p>\r\n<p>\r\nYour link will be reviewed by our team. We will contact you as soon <br>\r\nas we have reviewed your link.\r\n<p>\r\n<p>\r\nRegards,\r\n<p>\r\n<b><%$site_name%></b> Team\r\n</div>','Thank you for your submission to <%$site_name%>.\r\nTitle        : <%$title%>\r\nUrl          : <%$url%>\r\nDescription  : <%$description%>\r\nCategory     : <%$category%>\r\nContact name : <%$contact_name%>\r\nEmail        : <%$email%>\r\nYour link will be reviewed by our team. We will contact you as soon \r\nas we have reviewed your link.\r\nRegards,\r\n<%$site_name%> Team\r\n'),(5,'add_pending_editor','Pending Resource','<div style=\"font-family:arial;font-size:12px;\">\r\nThere\'s a new submission to <b><%$site_name%></b>.\r\n<p>\r\n<table cellspacing=0 cellpadding=0>\r\n<tr><td style=\"width:100px;\">Title</td><td style=\"width:10px;\">:</td><td ><%$title%></td></tr>\r\n<tr><td style=\"width:100px;\">Url</td><td style=\"width:10px;\">:</td><td ><%$url%></td></tr>\r\n<tr><td style=\"width:100px;\">Description</td><td style=\"width:10px;\">:</td><td ><%$description%></td></tr>\r\n<tr><td style=\"width:100px;\">Category</td><td style=\"width:10px;\">:</td><td ><%$category%></td></tr>\r\n<tr><td style=\"width:100px;\">Contact name</td><td style=\"width:10px;\">:</td><td ><%$contact_name%></td></tr>\r\n<tr><td style=\"width:100px;\">Email</td><td style=\"width:10px;\">:</td><td ><%$email%></td></tr>\r\n</table>\r\n<p>\r\n<p>\r\nYou need to review this link here:<br>\r\n<label style=\"margin-left:10px;\"><a href=\"<%$site_url%>/cp/editor_link_validate.php\"><%$site_url%>/cp/editor_link_validate.php</a></label>\r\n<p>\r\n<p>\r\nRegards,\r\n<p>\r\n<b><%$site_name%></b> Team\r\n</div>\r\n','There\'s a new submission to <%$site_name%>.\r\nTitle        : <%$title%>\r\nUrl          : <%$url%>\r\nDescription  : <%$description%>\r\nCategory     : <%$category%>\r\nContact name : <%$contact_name%>\r\nEmail        : <%$email%>\r\nYou need to review this link here:\r\n<%$site_url%>/cp/editor_link_validate.php\r\nRegards,\r\n<%$site_name%> Team\r\n'),(6,'approved','Editor Approved.','<div style=\"font-family:arial;font-size:12px;\">\r\nYour submission at <b><%$site_name%></b> has been approved.\r\n<p>\r\n<table cellspacing=0 cellpadding=0>\r\n<tr><td style=\"width:100px;\">Resource ID</td><td style=\"width:10px;\">:</td><td ><%$link_id%></td></tr>\r\n<tr><td style=\"width:100px;\">Title</td><td style=\"width:10px;\">:</td><td ><%$title%></td></tr>\r\n<tr><td style=\"width:100px;\">Url</td><td style=\"width:10px;\">:</td><td ><%$url%></td></tr>\r\n<tr><td style=\"width:100px;\">Description</td><td style=\"width:10px;\">:</td><td ><%$description%></td></tr>\r\n<tr><td style=\"width:100px;\">Category</td><td style=\"width:10px;\">:</td><td ><%$category%></td></tr>\r\n<tr><td style=\"width:100px;\">Contact name</td><td style=\"width:10px;\">:</td><td ><%$contact_name%></td></tr>\r\n<tr><td style=\"width:100px;\">Email</td><td style=\"width:10px;\">:</td><td ><%$email%></td></tr>\r\n<tr><td style=\"width:100px;\">Password </td><td style=\"width:10px;\">:</td><td ><%$password%></td></tr>\r\n</table>\r\n<p>\r\n<p>\r\nRegards,\r\n<p>\r\n<b><%$site_name%></b> Team\r\n</div>','Your submission at <%$site_name%> has been approved.\r\nResource ID  : <%$link_id%>\r\nTitle        : <%$title%>\r\nUrl          : <%$url%>\r\nDescription  : <%$description%>\r\nCategory     : <%$category%>\r\nContact name : <%$contact_name%>\r\nEmail        : <%$email%>\r\nPassword     : <%$password%>\r\nRegards,\r\n<%$site_name%> Team\r\n'),(7,'approved_editor','Link approved','<div style=\"font-family:arial;font-size:12px;\">\r\nThe following submission has been approved.\r\n<p>\r\n<table cellspacing=0 cellpadding=0>\r\n<tr><td style=\"width:100px;\">Resource ID</td><td style=\"width:10px;\">:</td><td ><%$link_id%></td></tr>\r\n<tr><td style=\"width:100px;\">Title</td><td style=\"width:10px;\">:</td><td ><%$title%></td></tr>\r\n<tr><td style=\"width:100px;\">Url</td><td style=\"width:10px;\">:</td><td ><%$url%></td></tr>\r\n<tr><td style=\"width:100px;\">Description</td><td style=\"width:10px;\">:</td><td ><%$description%></td></tr>\r\n<tr><td style=\"width:100px;\">Category</td><td style=\"width:10px;\">:</td><td ><%$category%></td></tr>\r\n<tr><td style=\"width:100px;\">Contact name</td><td style=\"width:10px;\">:</td><td ><%$contact_name%></td></tr>\r\n<tr><td style=\"width:100px;\">Email</td><td style=\"width:10px;\">:</td><td ><%$email%></td></tr>\r\n</table>\r\n<p>\r\n<p>\r\nRegards,\r\n<p>\r\n<b><%$site_name%></b> Team\r\n</div>','The following submission has been approved.\r\nResource ID  : <%$link_id%>\r\nTitle        : <%$title%>\r\nUrl          : <%$url%>\r\nDescription  : <%$description%>\r\nCategory     : <%$category%>\r\nContact name : <%$contact_name%>\r\nEmail        : <%$email%>\r\nRegards,\r\n<%$site_name%> Team\r\n'),(8,'approved_subscriber','link_approved','<div style=\"font-family:arial;font-size:12px;\">\r\nYou are receiving this email because you have a subscription for update notifications in <b><%$category%></b> category.\r\n<p>\r\nThe following submission has been approved.\r\n<p>\r\n<table cellspacing=0 cellpadding=0>\r\n<tr><td style=\"width:100px;\">Resource ID</td><td style=\"width:10px;\">:</td><td ><%$link_id%></td></tr>\r\n<tr><td style=\"width:100px;\">Title</td><td style=\"width:10px;\">:</td><td ><%$title%></td></tr>\r\n<tr><td style=\"width:100px;\">Url</td><td style=\"width:10px;\">:</td><td ><%$url%></td></tr>\r\n<tr><td style=\"width:100px;\">Description</td><td style=\"width:10px;\">:</td><td ><%$description%></td></tr>\r\n<tr><td style=\"width:100px;\">Category</td><td style=\"width:10px;\">:</td><td ><%$category%></td></tr>\r\n<tr><td style=\"width:100px;\">Contact name</td><td style=\"width:10px;\">:</td><td ><%$contact_name%></td></tr>\r\n</table>\r\n<p>\r\n<p>\r\nRegards,\r\n<p>\r\n<b><%$site_name%></b> Team\r\n</div>','You are receiving this email because you have a subscription for update notifications in <%$category%> category.\r\nThe following submission has been approved.\r\nResource ID  : <%$link_id%>\r\nTitle        : <%$title%>\r\nUrl          : <%$url%>\r\nDescription  : <%$description%>\r\nCategory     : <%$category%>\r\nContact name : <%$contact_name%>\r\nRegards,\r\n<%$site_name%> Team\r\n'),(9,'bad_link_editor','Broken link report','<div style=\"font-family:arial;font-size:12px;\">\r\nThere\'s a new bad link report submission to <b><%$site_name%></b>.\r\n<p>\r\n<table cellspacing=0 cellpadding=0>\r\n<tr><td style=\"width:100px;\">Title</td><td style=\"width:10px;\">:</td><td ><%$title%></td></tr>\r\n<tr><td style=\"width:100px;\">Url</td><td style=\"width:10px;\">:</td><td ><%$url%></td></tr>\r\n<tr><td style=\"width:100px;\">Description</td><td style=\"width:10px;\">:</td><td ><%$description%></td></tr>\r\n<tr><td style=\"width:100px;\">Category</td><td style=\"width:10px;\">:</td><td ><%$category%></td></tr>\r\n<tr><td style=\"width:100px;\">Name</td><td style=\"width:10px;\">:</td><td ><%$r_name%></td></tr>\r\n<tr><td style=\"width:100px;\">Email</td><td style=\"width:10px;\">:</td><td ><%$email%></td></tr>\r\n<tr><td style=\"width:100px;\">Error type</td><td style=\"width:10px;\">:</td><td ><%$type_val%></td></tr>\r\n</table>\r\n<p>\r\nThis report has been added in your administrator area.<br>\r\nPlease review this report here:<br>\r\n<a href=\"<%$site_url%>/admin/link_bad.php\"><%$site_url%>/admin/link_bad.php</a>\r\n<p>\r\n<p>\r\nRegards,\r\n<p>\r\n<b><%$site_name%></b> Team\r\n</div>','There\'s a new bad link report submission to <%$site_name%>.\r\nTitle       : <%$title%>\r\nUrl         : <%$url%>\r\nDescription : <%$description%>\r\nCategory    : <%$category%>\r\nName        : <%$r_name%>\r\nEmail       : <%$r_email%>\r\nError type  : <%$type_val%>\r\nThis report has been added in your administrator area.\r\nPlease review this report here:\r\n<%$site_url%>/admin/link_bad.php\r\nRegards,\r\n<%$site_name%> Team\r\n'),(10,'become_editor_approved','Editor Approved.','<div style=\"font-family:arial;font-size:12px;\">\r\nYour request to become an editor at <b><%$site_name%></b> has been approved.\r\n<p>\r\n<table cellspacing=0 cellpadding=0>\r\n<tr><td style=\"width:100px;\">Username</td><td style=\"width:10px;\">:</td><td ><%$username%></td></tr>\r\n<tr><td style=\"width:100px;\">Name </td><td style=\"width:10px;\">:</td><td ><%$name%></td></tr>\r\n<tr><td style=\"width:100px;\">Email</td><td style=\"width:10px;\">:</td><td ><%$email%></td></tr>\r\n<tr><td style=\"width:100px;\">Category </td><td style=\"width:10px;\">:</td><td ><%$category%></td></tr>\r\n</table>\r\n<p>\r\n<p>\r\nRegards,\r\n<p>\r\n<b><%$site_name%></b> Team\r\n</div>','Your request to become an editor at <%$site_name%> has been approved.\r\nUsername  : <%$username%>\r\nName      : <%$name%>\r\nEmail     : <%$email%>\r\nCategory  : <%$category%>\r\nRegards,\r\n<%$site_name%> Team\r\n'),(11,'become_editor_pending','Request to become an editor','<div style=\"font-family:arial;font-size:12px;\">\r\nThank you for your request to become an editor at <b><%$site_name%></b>.\r\n<p>\r\n<table cellspacing=0 cellpadding=0>\r\n<tr><td style=\"width:100px;\">Username</td><td style=\"width:10px;\">:</td><td ><%$username%></td></tr>\r\n<tr><td style=\"width:100px;\">Name </td><td style=\"width:10px;\">:</td><td ><%$name%></td></tr>\r\n<tr><td style=\"width:100px;\">Email</td><td style=\"width:10px;\">:</td><td ><%$email%></td></tr>\r\n<tr><td style=\"width:100px;\">Category </td><td style=\"width:10px;\">:</td><td ><%$category%></td></tr>\r\n</table>\r\n<p>\r\nYour request will be processed soon.\r\n<p>\r\n<p>\r\nRegards,\r\n<p>\r\n<b><%$site_name%></b> Team\r\n</div>','Thank you for your request to become an editor at <%$site_name%>.\r\nUsername  : <%$username%>\r\nName      : <%$name%>\r\nEmail     : <%$email%>\r\nCategory  : <%$category%>\r\nYour request will be processed soon.\r\nRegards,\r\n<%$site_name%> Team\r\n'),(12,'become_editor_pending_admin','Request to become an editor','<div style=\"font-family:arial;font-size:12px;\">\r\nThere\'s a new request to become an editor at <b><%$site_name%></b>.\r\n<p>\r\n<table cellspacing=0 cellpadding=0>\r\n<tr><td style=\"width:100px;\">Username</td><td style=\"width:10px;\">:</td><td ><%$username%></td></tr>\r\n<tr><td style=\"width:100px;\">Name </td><td style=\"width:10px;\">:</td><td ><%$name%></td></tr>\r\n<tr><td style=\"width:100px;\">Email</td><td style=\"width:10px;\">:</td><td ><%$email%></td></tr>\r\n<tr><td style=\"width:100px;\">Category </td><td style=\"width:10px;\">:</td><td ><%$category%></td></tr>\r\n</table>\r\n<p>\r\nPlease review editor request here:\r\n  <label style=\"margin-left:10px;\"><a href=\"<%$site_url%>/admin/index.php\"><%$site_url%>/admin/index.php</a></label>\r\n<p>\r\n<p>\r\nRegards,\r\n<p>\r\n<b><%$site_name%></b> Team\r\n</div>','There\'s a new request to become an editor at <%$site_name%>.\r\nUsername  : <%$username%>\r\nName      : <%$name%>\r\nEmail     : <%$email%>\r\nCategory  : <%$category%>\r\nPlease review editor requests here:\r\n<%$site_url%>/admin/index.php\r\nRegards,\r\n<%$site_name%> Team\r\n'),(13,'become_editor_rejected','Editor Rejected.','<div style=\"font-family:arial;font-size:12px;\">\r\nYour request to become an editor at <b><%$site_name%></b> has been rejected.\r\n<p>\r\n<table cellspacing=0 cellpadding=0>\r\n<tr><td style=\"width:100px;\">Username</td><td style=\"width:10px;\">:</td><td ><%$username%></td></tr>\r\n<tr><td style=\"width:100px;\">Name </td><td style=\"width:10px;\">:</td><td ><%$name%></td></tr>\r\n<tr><td style=\"width:100px;\">Email</td><td style=\"width:10px;\">:</td><td ><%$email%></td></tr>\r\n<tr><td style=\"width:100px;\">Category </td><td style=\"width:10px;\">:</td><td ><%$category%></td></tr>\r\n</table>\r\n<p>\r\n<p>\r\nRegards,\r\n<p>\r\n<b><%$site_name%></b> Team\r\n</div>','Your request to become an editor at <%$site_name%> has been rejected.\r\nUsername  : <%$username%>\r\nName      : <%$name%>\r\nEmail     : <%$email%>\r\nCategory  : <%$category%>\r\nRegards,\r\n<%$site_name%> Team\r\n'),(14,'inv_ask_payment','<%$company%>, Invoice #<%$invoice_id%>','<div style=\"font-family:arial;font-size:12px;\">\r\nAn invoice has been created, and is available for viewing at the following URL:<br>\r\n<label><a href=\"<%$site_url%>/invoice.php?id=<%$invoice_id%>\"><%$site_url%>/invoice.php?id=<%$invoice_id%></a></label>\r\n<p>\r\nIf you should have any questions, please do not hesitate to contact us.<br>\r\nThank you for your business.\r\n<p>\r\n<p>\r\nRegards,\r\n<p>\r\n<b><%$site_name%></b> Team\r\n</div>','An invoice has been created, and is available for viewing at the following URL:\r\n<%$site_url%>/invoice.php?id=<%$invoice_id%>\r\nIf you should have any questions, please do not hesitate to contact us.\r\nThank you for your business.\r\nRegards,\r\n<%$site_name%> Team\r\n'),(15,'mailing_list_sub','Mailing list subscription','<div style=\"font-family:arial;font-size:12px;\">\r\nThank you. Your email address, <b><%$email%></b> has been added to our mailing list.\r\n<p>\r\n<p>\r\nRegards,\r\n<p>\r\n<%$site_name%> Team\r\n</div>','Thank you. Your email address, <%$email%> has been added to our mailing list.\r\nRegards,\r\n<%$site_name%> Team\r\n'),(16,'mailing_list_sub_confirm','Mailing list validation code','<div style=\"font-family:arial;font-size:12px;\">\r\nWe received your subscription request onto our mailing list.<br>\r\nPlease confirm your subscription here:<br>\r\n<label style=\"margin-left:50px;\"><a href=\"<%$confirm_url%>\"><%$confirm_url%></a></label>\r\n<p>\r\n<p>\r\nRegards,\r\n<p>\r\n<b><%$site_name%></b> Team\r\n</div>','We received your subscription request onto our mailing list.\r\nPlease confirm your subscription here:\r\n<%$confirm_url%>\r\nRegards,\r\n<%$site_name%> Team\r\n'),(17,'modify_ok','Resource Modified','<div style=\"font-family:arial;font-size:12px;\">\r\nThank you for your submission to <b><%$site_name%></b>.\r\n<table cellspacing=0 cellpadding=0>\r\n<tr><td style=\"width:100px;\">Title</td><td style=\"width:10px;\">:</td><td ><%$title%></td></tr>\r\n<tr><td style=\"width:100px;\">Url</td><td style=\"width:10px;\">:</td><td ><%$url%></td></tr>\r\n<tr><td style=\"width:100px;\">Description</td><td style=\"width:10px;\">:</td><td ><%$description%></td></tr>\r\n<tr><td style=\"width:100px;\">Category</td><td style=\"width:10px;\">:</td><td ><%$category%></td></tr>\r\n<tr><td style=\"width:100px;\">Contact name</td><td style=\"width:10px;\">:</td><td ><%$contact_name%></td></tr>\r\n<tr><td style=\"width:100px;\">Email/td><td style=\"width:10px;\">:</td><td ><%$email%></td></tr>\r\n</table>\r\n<p>\r\nYour link has been changed.\r\n<p>\r\n<p>\r\nRegards,\r\n<p>\r\n<b><%$site_name%></b> Team\r\n</div>','Thank you for your submission to <%$site_name%>.\r\nTitle        : <%$title%>\r\nUrl          : <%$url%>\r\nDescription  : <%$description%>\r\nCategory     : <%$category%>\r\nContact name : <%$contact_name%>\r\nEmail        : <%$email%>\r\nYour link has been changed.\r\nRegards,\r\n<%$site_name%> Team\r\n'),(18,'modify_ok_editor','Resource Modified','<div style=\"font-family:arial;font-size:12px;\">\r\nThere\'s a new submission to <%$site_name%>.\r\nTitle        : <%$title%>\r\nUrl          : <%$url%>\r\nDescription  : <%$description%>\r\nCategory     : <%$category%>\r\nContact name : <%$contact_name%>\r\nEmail        : <%$email%>\r\nThe category permissions allow webmasters to add/modify links without approval.\r\nThe link has been modified.\r\n<p>\r\n<p>\r\nRegards,\r\n<p>\r\n<b><%$site_name%></b> Team\r\n</div>','There\'s a new submission to <%$site_name%>.\r\nTitle        : <%$title%>\r\nUrl          : <%$url%>\r\nDescription  : <%$description%>\r\nCategory     : <%$category%>\r\nContact name : <%$contact_name%>\r\nEmail        : <%$email%>\r\nThe category permissions allow webmasters to add/modify links without approval.\r\nThe link has been modified.\r\nRegards,\r\n<%$site_name%> Team\r\n'),(19,'modify_ok_subscriber','Resource Modified','<div style=\"font-family:arial;font-size:12px;\">\r\nYou are receiving this email because you have a subscription for update notifications in <b><%$category%></b> category.\r\n<p>\r\nThere\'s a new submission to <b><%$site_name%></b>.\r\n<p>\r\n<table cellspacing=0 cellpadding=0>\r\n<tr><td style=\"width:100px;\">Title</td><td style=\"width:10px;\">:</td><td ><%$title%></td></tr>\r\n<tr><td style=\"width:100px;\">Url</td><td style=\"width:10px;\">:</td><td ><%$url%></td></tr>\r\n<tr><td style=\"width:100px;\">Description</td><td style=\"width:10px;\">:</td><td ><%$description%></td></tr>\r\n<tr><td style=\"width:100px;\">Category</td><td style=\"width:10px;\">:</td><td ><%$category%></td></tr>\r\n<tr><td style=\"width:100px;\">Contact name</td><td style=\"width:10px;\">:</td><td ><%$contact_name%></td></tr>\r\n</table>\r\n<p>\r\n<p>\r\nRegards,\r\n<p>\r\n<b><%$site_name%></b> Team\r\n</div>','You are receiving this email because you have a subscription for update notifications in <%$category%> category.\r\nThere\'s a new submission to <%$site_name%>.\r\nTitle        : <%$title%>\r\nUrl          : <%$url%>\r\nDescription  : <%$description%>\r\nCategory     : <%$category%>\r\nContact name : <%$contact_name%>\r\nRegards,\r\n<%$site_name%> Team\r\n'),(20,'modify_pending','Resource Modified','<div style=\"font-family:arial;font-size:12px;\">\r\nThank you for your submission to <b><%$site_name%><b>.\r\n<p>\r\n<table cellspacing=0 cellpadding=0>\r\n<tr><td style=\"width:100px;\">Title</td><td style=\"width:10px;\">:</td><td ><%$title%></td></tr>\r\n<tr><td style=\"width:100px;\">Url</td><td style=\"width:10px;\">:</td><td ><%$url%></td></tr>\r\n<tr><td style=\"width:100px;\">Description</td><td style=\"width:10px;\">:</td><td ><%$description%></td></tr>\r\n<tr><td style=\"width:100px;\">Category</td><td style=\"width:10px;\">:</td><td ><%$category%></td></tr>\r\n<tr><td style=\"width:100px;\">Contact name</td><td style=\"width:10px;\">:</td><td ><%$contact_name%></td></tr>\r\n<tr><td style=\"width:100px;\">Email</td><td style=\"width:10px;\">:</td><td ><%$email%></td></tr>\r\n</table>\r\n<p>\r\nYour link will be reviewed by our team. We will contact you as soon <br>\r\nas we have reviewed your link.\r\n<p>\r\n<p>\r\nRegards,\r\n<p>\r\n<b><%$site_name%></b> Team\r\n</div>','Thank you for your submission to <%$site_name%>.\r\nTitle        : <%$title%>\r\nUrl          : <%$url%>\r\nDescription  : <%$description%>\r\nCategory     : <%$category%>\r\nContact name : <%$contact_name%>\r\nEmail        : <%$email%>\r\nYour link will be reviewed by our team. We will contact you as soon \r\nas we have reviewed your link.\r\nRegards,\r\n<%$site_name%> Team\r\n'),(21,'modify_pending_editor','Resource Modified','<div style=\"font-family:arial;font-size:12px;\">\r\nThere\'s a new submission to <b><%$site_name%></b>.\r\n<p>\r\n<table cellspacing=0 cellpadding=0>\r\n<tr><td style=\"width:100px;\">Title</td><td style=\"width:10px;\">:</td><td ><%$title%></td></tr>\r\n<tr><td style=\"width:100px;\">Url</td><td style=\"width:10px;\">:</td><td ><%$url%></td></tr>\r\n<tr><td style=\"width:100px;\">Description</td><td style=\"width:10px;\">:</td><td ><%$description%></td></tr>\r\n<tr><td style=\"width:100px;\">Category</td><td style=\"width:10px;\">:</td><td ><%$category%></td></tr>\r\n<tr><td style=\"width:100px;\">Contact name</td><td style=\"width:10px;\">:</td><td ><%$contact_name%></td></tr>\r\n<tr><td style=\"width:100px;\">Email</td><td style=\"width:10px;\">:</td><td ><%$email%></td></tr>\r\n</table>\r\n<p>\r\n<p>\r\nYou need to review this link here:<br>\r\n<label style=\"margin-left:10px;\"><a href=\"<%$site_url%>/cp/editor_link_validate.php\"><%$site_url%>/cp/editor_link_validate.php</a></label>\r\n<p>\r\n<p>\r\nRegards,\r\n<p>\r\n<b><%$site_name%></b> Team\r\n</div>\r\n','There\'s a new submission to <%$site_name%>.\r\nTitle        : <%$title%>\r\nUrl          : <%$url%>\r\nDescription  : <%$description%>\r\nCategory     : <%$category%>\r\nContact name : <%$contact_name%>\r\nEmail        : <%$email%>\r\nYou need to review this link here:\r\n<%$site_url%>/cp/editor_link_validate.php\r\nRegards,\r\n<%$site_name%> Team\r\n'),(22,'register_confirm','Registration','<div style=\"font-family:arial;font-size:12px;\">\r\nThanks for joining <b><%$site_name%><b>.\r\n<p>\r\n<table cellspacing=0 cellpadding=0>\r\n<tr><td style=\"width:100px;\">Username</td><td style=\"width:10px;\">:</td><td ><%$username%></td></tr>\r\n<tr><td style=\"width:100px;\">Password</td><td style=\"width:10px;\">:</td><td ><%$password%></td></tr>\r\n</table>\r\n<p>\r\n<p>\r\nPlease confirm your registration here:<br>\r\n<label style=\"margin-left:10px;\"><A href=\"<%$site_url%>/register.php?u=<%$username%>&v=<%$vcode%>&pflag=cf\"><%$site_url%>/register.php?u=<%$username%>&v=<%$vcode%>&pflag=cf</a></label>\r\n<p>\r\n<p>\r\nSincerely,\r\n<p>\r\n<b><%$site_name%></b> Team\r\n</div>','Thanks for joining <%$site_name%>.\r\nUsername : <%$username%>\r\nPassword : <%$password%>\r\nPlease confirm your registration here:\r\n<%$site_url%>/register.php?u=<%$username%>&v=<%$vcode%>&pflag=cf\r\nSincerely,\r\n<%$site_name%> Team\r\n'),(23,'register_ok','Registration','<div style=\"font-family:arial;font-size:12px;\">\r\nThanks for joining <b><%$site_name%></b>.\r\n<p>\r\n<table cellspacing=0 cellpadding=0>\r\n<tr><td style=\"width:100px;\">Username</td><td style=\"width:10px;\">:</td><td ><%$username%></td></tr>\r\n<tr><td style=\"width:100px;\">Password</td><td style=\"width:10px;\">:</td><td ><%$password%></td></tr>\r\n</table>\r\n<p>\r\nSincerely,\r\n<p>\r\n<p>\r\n<b><%$site_name%></b> Team\r\n</div>','Thanks for joining <%$site_name%>.\r\nUsername : <%$username%>\r\nPassword : <%$password%>\r\nSincerely,\r\n<%$site_name%> Team\r\n'),(24,'rejected','Your submission has been rejected','<div style=\"font-family:arial;font-size:12px;\">\r\nYour submission has been rejected.<br>\r\nThis may be caused by one of the following reason:\r\n<p>\r\n<ul>\r\n<li>adult material</li>\r\n<li>the site is under construction</li>\r\n<li>the topic is not related with our directory</li>\r\n</ul>\r\n</p>\r\n<table cellspacing=0 cellpadding=0>\r\n<tr><td style=\"width:100px;\">Title</td><td style=\"width:10px;\">:</td><td ><%$title%></td></tr>\r\n<tr><td style=\"width:100px;\">Url</td><td style=\"width:10px;\">:</td><td ><%$url%></td></tr>\r\n<tr><td style=\"width:100px;\">Description</td><td style=\"width:10px;\">:</td><td ><%$description%></td></tr>\r\n<tr><td style=\"width:100px;\">Category</td><td style=\"width:10px;\">:</td><td ><%$category%></td></tr>\r\n<tr><td style=\"width:100px;\">Contact name</td><td style=\"width:10px;\">:</td><td ><%$contact_name%></td></tr>\r\n<tr><td style=\"width:100px;\">Email/td><td style=\"width:10px;\">:</td><td ><%$email%></td></tr>\r\n</table>\r\n<p>\r\n<p>\r\nRegards,\r\n<p>\r\n<b><%$site_name%></b> Team\r\n</div>','Your submission has been rejected.\r\nThis may caused by one of the following reasons:\r\n- adult material\r\n- the site is under construction\r\n- the topic is not related with our directory\r\nTitle        : <%$title%>\r\nUrl          : <%$url%>\r\nDescription  : <%$description%>\r\nCategory     : <%$category%>\r\nContact name : <%$contact_name%>\r\nEmail        : <%$email%>\r\nRegards,\r\n<%$site_name%> Team\r\n'),(25,'rejected_editor','Link rejected','<div style=\"font-family:arial;font-size:12px;\">\r\nThe following submission has been rejected.\r\n<p>\r\n<table cellspacing=0 cellpadding=0>\r\n<tr><td style=\"width:100px;\">Title</td><td style=\"width:10px;\">:</td><td ><%$title%></td></tr>\r\n<tr><td style=\"width:100px;\">Url</td><td style=\"width:10px;\">:</td><td ><%$url%></td></tr>\r\n<tr><td style=\"width:100px;\">Description</td><td style=\"width:10px;\">:</td><td ><%$description%></td></tr>\r\n<tr><td style=\"width:100px;\">Category</td><td style=\"width:10px;\">:</td><td ><%$category%></td></tr>\r\n<tr><td style=\"width:100px;\">Contact name</td><td style=\"width:10px;\">:</td><td ><%$contact_name%></td></tr>\r\n<tr><td style=\"width:100px;\">Email</td><td style=\"width:10px;\">:</td><td ><%$email%></td></tr>\r\n</table>\r\n<p>\r\n<p>\r\nRegards,\r\n<p>\r\n<b><%$site_name%></b> Team\r\n</div>\r\n','The following submission has been rejected.\r\nTitle        : <%$title%>\r\nUrl          : <%$url%>\r\nDescription  : <%$description%>\r\nCategory     : <%$category%>\r\nContact name : <%$contact_name%>\r\nEmail        : <%$email%>\r\nRegards,\r\n<%$site_name%> Team\r\n'),(26,'review_pending_editor','Pending Review','<div style=\"font-family:arial;font-size:12px;\">\r\nThere\'s a new review to <b><%$site_name%></b>.\r\n<p>\r\n<table cellspacing=0 cellpadding=0>\r\n<tr><td style=\"width:100px;\">Title</td><td style=\"width:10px;\">:</td><td ><%$title%></td></tr>\r\n<tr><td style=\"width:100px;\">Url</td><td style=\"width:10px;\">:</td><td ><%$url%></td></tr>\r\n<tr><td style=\"width:100px;\">Description</td><td style=\"width:10px;\">:</td><td ><%$description%></td></tr>\r\n<tr><td style=\"width:100px;\">Category</td><td style=\"width:10px;\">:</td><td ><%$category%></td></tr>\r\n</table>\r\n<p>\r\n<table cellspacing=0 cellpadding=0>\r\n<tr><td style=\"width:100px;\">Username</td><td style=\"width:10px;\">:</td><td ><%$username%></td></tr>\r\n<tr><td style=\"width:100px;\">Subject</td><td style=\"width:10px;\">:</td><td ><%$rev_subject%></td></tr>\r\n<tr><td style=\"width:100px;\">Rating</td><td style=\"width:10px;\">:</td><td ><%$rev_rating%></td></tr>\r\n<tr><td style=\"width:100px;\">Review</td><td style=\"width:10px;\">:</td><td ><%$rev_review%></td></tr>\r\n</table>\r\n<p>\r\n<p>\r\nPlease review it here:<br>\r\n<label style=\"margin-left:10px;\"><a href=\"<%$site_url%>/cp/\"><%$site_url%>/cp/</a></label>\r\n<p>\r\n<p>\r\nRegards,\r\n<p>\r\n<b><%$site_name%></b> Team\r\n</div>\r\n','There\'s new review to <%$site_name%>.\r\nTitle       : <%$title%>\r\nUrl         : <%$url%>\r\nDescription : <%$description%>\r\nCategory    : <%$category%>\r\nUsername    : <%$username%>\r\nSubject     : <%$rev_subject%>\r\nRating      : <%$rev_rating%>\r\nReview      : <%$rev_review%>\r\nPlease review it here:\r\n<%$site_url%>/cp/\r\nRegards,\r\n<%$site_name%> Team\r\n'),(27,'send_pwd_link','Your resource password','<div style=\"font-family:arial;font-size:12px;\">\r\nHere is your password for <b><%$title%></b> (<a href=\"<%$url%>\"><%$url%></a>)\r\n<p>\r\nPassword : <%$password%>\r\n<p>\r\n<p>\r\nRegards,\r\n<p>\r\n<b><%$site_name%></b> Team\r\n</div>','Here is your password for <%$title%> (<%$url%>)\r\nPassword : <%$password%>\r\nRegards,\r\n<%$site_name%> Team\r\n'),(28,'send_pwd_login','Your login password','<div style=\"font-family:arial;font-size:12px;\">\r\nHere is your username and password:\r\n<p>\r\n<table cellspacing=0 cellpadding=0>\r\n<tr><td style=\"width:100px;\">Username</td><td style=\"width:10px;\">:</td><td ><%$username%></td></tr>\r\n<tr><td style=\"width:100px;\">Password</td><td style=\"width:10px;\">:</td><td ><%$password%></td></tr>\r\n</table>\r\n<p>\r\n<p>\r\nRegards,\r\n<p>\r\n<b><%$site_name%></b> Team\r\n</div>','Here is your username and password:\r\nUsername : <%$username%>\r\nPassword : <%$password%>\r\nRegards,\r\n<%$site_name%> Team\r\n'),(29,'send_pwd_reset','Password reset request','<div style=\"font-family:arial;font-size:12px;\">\r\nWe received a request to reset your password.<br>\r\nPlease visit this URL to proceed:<br>\r\n<label style=\"margin-left:10px;\"><a href=\"<%$site_url%>/reset_pwd.php?u=<%$username%>&hash=<%$hash%>\"><%$site_url%>/reset_pwd.php?u=<%$username%>&hash=<%$hash%></a></label>\r\n<p>\r\n<p>\r\nRegards,\r\n<p>\r\n<b><%$site_name%></b> Team\r\n</div>','We received a request to reset your password.\r\nPlease visit this URL to proceed:\r\n<%$site_url%>/reset_pwd.php?u=<%$username%>&hash=<%$hash%>\r\nRegards,\r\n<%$site_name%> Team\r\n'),(30,'suggest_category','Category suggestion','<div style=\"font-family:arial;font-size:12px;\">\r\nCategory suggestion for <b><%$site_name%></b>.\r\n<p>\r\nParent               : <%$parent%>\r\nCategory Name        : <%$cat_name%>\r\nCategory Description : <%$cat_desc%>\r\n<p>\r\n<p>\r\nRegards,\r\n<p>\r\n<b><%$site_name%></b> Team\r\n</div>','Category suggestion for <%$site_name%>.\r\nParent               : <%$parent%>\r\nCategory Name        : <%$cat_name%>\r\nCategory Description : <%$cat_desc%>\r\nRegards,\r\n<%$site_name%> Team\r\n'),(31,'tell_friend_favorite','Your friend has shared his/her favorite listing','<div style=\"font-family:arial;font-size:12px;\">\r\nHi <%$friend_name%>,\r\n<p>\r\nI\'d like to share my favorite listing at <b><%$site_name%></b> (<a href=\"<%$site_url%>\"><%$site_url%></a>).<br>\r\nI hope you like them and find them useful.\r\n<p>\r\n<p>\r\n<%$fav_item%>\r\n<p>\r\n<p>\r\nSincerely,\r\n<p>\r\n<p>\r\n<%$my_name%> <<%$my_email%>>\r\n</div>','Hi <%$friend_name%>,\r\nI\'d like to share my favorite listings at <%$site_name%> (<%$site_url%>).\r\nI hope you like them and find them useful.\r\n<%$fav_item%>\r\nSincerely,\r\n<%$my_name%> <<%$my_email%>>\r\n'),(32,'tell_friend_favorite_rows',NULL,'<div style=\"font-family:arial;font-size:12px;\">\r\n<table cellspacing=0 cellpadding=0>\r\n<tr><td style=\"width:100px;\">Title</td><td style=\"width:10px;\">:</td><td ><%$title%></td></tr>\r\n<tr><td style=\"width:100px;\">Url</td><td style=\"width:10px;\">:</td><td ><%$url%></td></tr>\r\n<tr><td style=\"width:100px;\">Description</td><td style=\"width:10px;\">:</td><td ><%$description%></td></tr>\r\n</table>\r\n</div>\r\n','Title       : <%$title%>\r\nUrl         : <%$url%>\r\nDescription : <%$description%>\r\n'),(33,'tell_friend_link','Your friend recommended a link','<div style=\"font-family:arial;font-size:12px;\">\r\nHi <b><%$friend_name%></b>,\r\n<p>\r\nI found a good website that you may find interesting.\r\n<p>\r\n<div>\r\n<label style=\"float:left;width:100px;\">Website</label><label style=\"float:left;\"> : <b><%$title%></b></label>\r\n</div>\r\n<div style=\"clear:both;\">\r\n<label style=\"clear:both;float:left;width:100px;\">Url </label><label style=\"float:left;\"> : <a href=\"<%$url%>\"><%$url%></a></label>\r\n</div>\r\n<p style=\"clear:both;\">\r\nI found this website from <%$site_name%> (<a href=\"<%$site_url%>\"><%$site_url%></a>).\r\n<p>\r\n<p>\r\nSincerely,\r\n<p>\r\n<%$my_name%> <<%$my_email%>>\r\n</div>\r\n','Hi <%$friend_name%>,\r\nI found a good website that you may find interesting.\r\nWebsite : <%$title%>\r\nUrl     : <%$url%>\r\nI found this website from <%$site_name%> (<%$site_url%>).\r\nSincerely,\r\n<%$my_name%> <<%$my_email%>>\r\n'),(34,'tell_friend_website','hi <%$friend_name%>, I found a good website that you may find interesting','<div style=\"font-family:arial;font-size:12px;\">\r\nHi <b><%$friend_name%></b>,\r\n<p>\r\nI found good website that you may find interesting. The website is <b><%$site_name%></b> (<a href=\"<%$site_url%>\"><%$site_url%></a>).\r\n<p>\r\n<p>\r\nSincerely,\r\n<p>\r\n<%$my_name%> <<%$my_email%>>\r\n</div>','Hi <%$friend_name%>,\r\nI found a good website that you may find interesting. The website is <%$site_name%> (<%$site_url%>).\r\nSincerely,\r\n<%$my_name%> <<%$my_email%>>\r\n');

alter table `idx_payment_history` change `username` `contact_name` varchar(255) default NULL;  
alter table `idx_payment_history` add `email` varchar(255) default NULL after `contact_name`;  
alter table `idx_payment_history` add `invoice_id` varchar(10) default NULL after `time`;  

CREATE TABLE `idx_discount_coupon` (                                               
   `coupon_id` int(11) NOT NULL auto_increment,                                     
   `coupon_code` varchar(255) default NULL,               
   `coupon_value` varchar(50) default NULL,               
   `link_type` varchar(255) default NULL,                 
   `start_date` date default NULL,                                                  
   `expired_date` date default NULL,                                                
   `expired_usage` int(11) default NULL,                                            
   `usage_count` int(11) default NULL,                                              
   PRIMARY KEY  (`coupon_id`)                                                       
);


CREATE TABLE `idx_category_suggession` (                                            
   `id_cat_suggession` int(11) NOT NULL auto_increment,                              
   `parent_id` int(11) default NULL,                                                 
   `name` varchar(255) default NULL,                       
   `category_description` text ,                            
   `date` datetime default NULL,                                                     
   PRIMARY KEY  (`id_cat_suggession`)                                                
);

CREATE TABLE `idx_plugin` (                                                        
      `plugin_id` int(11) NOT NULL auto_increment,                                     
      `name` varchar(255) default NULL,                      
      `plugin_file` varchar(255) default NULL,               
      `status` enum('0','1') default NULL,                   
      `option_plugin` text,                   
      PRIMARY KEY  (`plugin_id`)                                                       
); 

alter table `idx_link` change `hits` `hits` mediumint(9) NOT NULL default '0';


CREATE TABLE IF NOT EXISTS `idx_default_field` (
  `field_name` varchar(64) NOT NULL,
  `required` char(1) NOT NULL,
  `visible` char(1) NOT NULL default '1',
  `searchable` char(1) NOT NULL default '1'
);


INSERT INTO `idx_default_field` (`field_name`, `required`, `visible`, `searchable`) VALUES
('title', '1', '1', '1'),
('url', '1', '1', '1'),
('description', '1', '1', '1'),
('keywords', '1', '1', '0'),
('contact_name', '1', '1', '1'),
('email', '1', '1', '1'),
('reciprocal_url', '0', '1', '1');



CREATE TABLE IF NOT EXISTS `idx_cronjobs` (
  `cronjobs_id` int(11) NOT NULL auto_increment,
  `cronjobs_name` varchar(255) default NULL,
  `filename` varchar(255) NOT NULL,
  `schedule` varchar(255) NOT NULL,
  `time` datetime NOT NULL,
  `execution` varchar(1) NOT NULL,
  PRIMARY KEY  (`cronjobs_id`)
);

INSERT INTO `idx_cronjobs` (`cronjobs_id`, `cronjobs_name`, `filename`, `schedule`, `time`, `execution`) VALUES
(1, NULL, 'clear_templates_c.php', '1,*,*,*,*', '0000-00-00 00:00:00', ''),
(2, NULL, 'update_tag_cloud.php', '*,24,*,*,*', '0000-00-00 00:00:00', ''),
(3, NULL, 'clear_rss_cache.php', '*,24,*,*,*', '0000-00-00 00:00:00', '');

INSERT INTO `idx_email_template` (`email_template_id`, `name`, `subject`, `body`, `altbody`) VALUES
(35, 'send_activation_link', 'Your activation link', '<div style="font-family:arial;font-size:12px;">\r\nHere is your activation link\r\n<p>\r\nActivation Link  : <A href="<%$activation_link%>"><%$activation_link%></a>\r\n<p>\r\n<p>\r\nRegards,\r\n<p>\r\n<b><%$site_name%></b> Team\r\n</div>', 'Here is your activation link\r\nActivation Link  : <%$activation_link%>\r\nRegards,\r\n<%$site_name%> Team\r\n'),
(36, 'send_activated_account', 'Your account had been activated', '<div style="font-family:arial;font-size:12px;">\r\nYour account had been activated. Now you can login.\r\n<p>\r\nRegards,\r\n<p>\r\n<b><%$site_name%></b> Team\r\n</div>', 'Your account had been activated. Now you can login.\r\n\r\nRegards,\r\n<%$site_name%> Team\r\n');

ALTER TABLE `idx_custom_field` CHANGE `field_type` `field_type` ENUM( 'TEXT', 'TEXTAREA', 'SELECT', 'MULTISELECT', 'CHECKBOX', 'RADIO', 'FILE', 'IMAGE', 'DATE', 'DATETIME', 'RICHEDITOR' ) NOT NULL DEFAULT 'TEXT';


#  
# Version IndexU Deluxe 1.22
#  

CREATE TABLE `idx_blocked_domain` (                                                 
  `blocked_id` int(11) NOT NULL auto_increment,                                     
  `blocked` varchar(255) default NULL,                    
  `type` enum('domain','ip') default NULL,                
  PRIMARY KEY  (`blocked_id`)                                                       
);

INSERT INTO `idx_blocked_domain` (`blocked_id`, `blocked`, `type`) VALUES
(1, 'buydomains.com', 'domain'),
(2, 'this-domain-for-sale.com ', 'domain'),
(3, 'oversee.net', 'domain'),
(4, 'eNom', 'domain'),
(5, 'sedoparking.com', 'domain');

                    
CREATE TABLE `idx_unavailable` (                                                    
 `idx_unavailable` int(11) NOT NULL auto_increment,                                
 `link_id` int(11) default NULL,                                                   
 `url` varchar(255) default NULL,                        
 `who_is` varchar(255) default NULL,                     
 `note` text ,                                            
 `date` datetime default NULL,                                                     
 PRIMARY KEY  (`idx_unavailable`)                                                  
);

CREATE TABLE `idx_unavailable_latest` (                           
  `idx_link` int(11) default NULL,                                
  `record_execution` int(11) default NULL                         
);


CREATE TABLE `idx_hook_place` (                                                      
  `hook_place_id` int(11) NOT NULL auto_increment,                                   
  `filename` varchar(255) default NULL,                    
  `hookname` varchar(255) default NULL,                    
  PRIMARY KEY  (`hook_place_id`)                                                     
);

CREATE TABLE `idx_set_hook_place` (                                                
  `set_hook_place_id` int(11) NOT NULL auto_increment,                             
  `plugin` varchar(255) default NULL,                    
  `set_hook_place` text,                                 
  PRIMARY KEY  (`set_hook_place_id`)                                               
);               

CREATE TABLE `idx_admin_menu` (
  `menu_id` int(11) NOT NULL auto_increment,
  `parent_id` int(11) default NULL,
  `menu_title` varchar(255) default NULL,
  `menu_url` varchar(255) default NULL,
  `order_number` int(11) default NULL,
  PRIMARY KEY  (`menu_id`)
);

/*Data for the table `idx_admin_menu` */

insert  into `idx_admin_menu`(`menu_id`,`parent_id`,`menu_title`,`menu_url`,`order_number`) values (1,0,'Categories','#',1),(2,0,'Links','#',2),(3,0,'Users','#',3),(4,0,'Editors','#',4),(5,0,'Invoices','#',5),(6,0,'Mailing System','#',6),(7,0,'Templates','#',7),(8,0,'Tools','#',8),(9,0,'Option','#',9),(10,0,'Database','#',10),(11,0,'Plugins','#',11),(12,1,'Add','cat_add.php',NULL),(13,1,'View / Edit / Delete','cat_view.php',NULL),(14,1,'Search','cat_search.php',NULL),(15,1,'Hidden Categories','cat_view_hidden.php',NULL),(16,1,'Registered Users Only','cat_view_registered_only.php',NULL),(17,1,'Set Default Price','cat_set_default_price.php',NULL),(18,1,'Check Category Structure','cat_struc.php',NULL),(19,1,'Update Category Path','cat_path_update.php',NULL),(20,1,'Pending Category','cat_pending_suggestion.php',NULL),(21,2,'Add','link_add.php',NULL),(22,2,'Search / Edit / Delete','link_search.php',NULL),(23,2,'Validate Links','link_validate.php',NULL),(24,2,'Spam Links','link_validate.php?spam=1',NULL),(25,2,'Validate Reviews','review_validate.php',NULL),(26,2,'Editor Pick Links','link_editor_pick.php',NULL),(27,2,'Premium Listing','link_premium_listing.php',NULL),(28,2,'Sponsored Listing','link_sponsored_listing.php',NULL),(29,2,'Suspended Listing','link_suspended_listing.php',NULL),(30,2,'Default Field','link_default_field.php',NULL),(31,2,'Custom Field','link_custom_field.php',NULL),(32,2,'Update Number of Links','app_update_nol.php',NULL),(33,2,'Update Tag Clouds','tag_cloud_update.php',NULL),(34,2,'Discount Coupon','coupon.php',NULL),(35,3,'Add','user_add.php',NULL),(36,3,'Search','user_search.php',NULL),(37,3,'View Unactive','user_active.php?pflag=Unactive',NULL),(38,3,'View Suspend','user_suspend.php',NULL),(39,3,'View All','user_active.php',NULL),(40,4,'Add','editor_add.php',NULL),(41,4,'Validate','editor_validate.php',NULL),(42,4,'View / Delete','cat_view.php',NULL),(43,5,'Configure','inv_config.php ',NULL),(44,5,'Create An Invoice','inv_create.php',NULL),(45,5,'Unpaid Invoice','inv_unpaid.php',NULL),(46,5,'Overdue Invoice','inv_overdue.php',NULL),(47,5,'Paid Invoice','inv_paid.php',NULL),(48,5,'Payment History','pay_history.php',NULL),(49,6,'Create Template','message_create.php',NULL),(50,6,'Send/Edit/Delete','message_view.php',NULL),(51,6,'Mailing List Subscribers','message_subscriber.php',NULL),(52,7,'Template Manager','template_manager.php',NULL),(53,7,'Import','template_import.php',NULL),(54,7,'Export','template_export.php',NULL),(55,7,'Email Template','email_template.php',NULL),(56,7,'Export Email Template','email_template_export.php',NULL),(57,7,'Import Email Template','email_template_import.php',NULL),(58,8,'Find Duplicate Link','link_duplicate.php',NULL),(59,8,'Broken Link Report','link_bad.php',NULL),(60,8,'Spider Link CheckUrl','checkurl_web.php',NULL),(61,8,'CheckUrl Result','link_checkurl.php',NULL),(62,8,'View Search Log','log_search.php',NULL),(63,8,'Bad Words Filter','badword_filter.php',NULL),(64,8,'Clear Template Cache','clear_templates_c.php',NULL),(65,8,'PHP Configuration','phpinfo.php',NULL),(66,8,'Sitemap Generator','sitemap.php',NULL),(67,8,'Cronjobs','cronjobs.php',NULL),(68,8,'Fetch Meta','fetch_meta.php',NULL),(69,8,'Hook Place','hook_place.php',NULL),(70,8,'Block Name server Domain','blocked_domain_list.php',NULL),(71,8,'Add Block Name server Domain','add_blocked_domain.php',NULL),(72,8,'Unavailable domain listing','unavailable_link_list.php',NULL),(73,9,'Setup','app_setup.php',NULL),(74,9,'Page Caching','app_page_caching.php',NULL),(75,9,'Mod-rewrite','app_mod_rewrite.php',NULL),(76,9,'Change Password','app_change_pwd.php',NULL),(77,10,'Import','db_import.php',NULL),(78,10,'Export','db_export.php',NULL),(79,10,'Backup','db_backup.php',NULL),(80,10,'Query','db_query.php',NULL),(81,10,'Find Replace','db_find_replace.php',NULL),(82,11,'View All','plugin_listing.php',NULL);
