UPDATE `hb_configuration` SET `value` = '4.0.4' WHERE `setting`= 'Version';
##########
INSERT INTO `hb_reports` (`id`, `type`, `name`, `query`, `options`) VALUES (NULL, 'Support', '15 clients with highest number of tickets', 'SELECT
 t.client_id AS `Client ID`,
 COUNT(t.id) AS `Total tickets`,
 CONCAT(cd.firstname,'' '',cd.lastname) AS `Client`,
 cd.datecreated AS `Client since`
FROM hb_tickets t JOIN
 hb_client_details cd ON (cd.id=t.client_id)

GROUP BY t.client_id
ORDER BY `Total tickets` DESC
LIMIT 15', '1'),
(NULL, 'Clients', 'List all suspended accounts with their suspension dates', 'SELECT\r\n a.id AS `Account ID`,\r\n MAX(s.`date`) AS `Suspension Date`,\r\n a.client_id AS `Client ID`,\r\n CONCAT(cd.firstname,'' '',cd.lastname) AS `Client`,\r\n a.`domain` AS `Account Domain`,\r\n a.date_created AS `Creation date`,\r\n a.billingcycle AS `Billing cycle`,\r\n a.username AS `Username`\r\nFROM\r\n     hb_accounts a JOIN\r\n     hb_client_details cd ON (cd.id=a.client_id) JOIN\r\n     `hb_account_logs` s ON (s.account_id=a.id)\r\nWHERE\r\n     a.status=''Suspended''\r\n    AND s.`event`=''AccountSuspend'' \r\n    AND s.`result`=''1''\r\nGROUP BY a.id\r\nORDER BY `Suspension Date` DESC', 1);
##########
REPLACE INTO `hb_client_fields` (`code`, `name`, `field_type`, `default_value`, `type`, `options`, `description`, `sort_order`, `expression`) VALUES 
('language', '_none', 'Input', '', 'All', 47, '', 0, NULL),
('notes', '_none', 'Input', '', 'All', 47, '', 0, NULL),
('datecreated', '_none', 'Input', '', 'All', 47, '', 0, NULL),
('comapny', '_none', 'Input', '', 'All', 47, '', 0, NULL);
##########
REPLACE INTO `hb_language_locales` (`language_id`,`section`,`keyword`,`value`)
SELECT id, 'cart', 'pricinginfo','Pricing info' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'promotionalcode','Promotional code' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'code','Code' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'customize','Customize' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'nocustomizations','There are no customization options' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'coupon_code','Coupon Code' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'remove_coupon','Remove coupon' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'config_then_checkout','Confiure your choosen server, then proceed to checkout' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'serverdetails','Server Details' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'serverconfiguration','Server Configuration' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'planincludes','Plan Includes' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'addcouponcode','Add Coupon Code' FROM hb_language WHERE target='user'
UNION SELECT id, 'global', 'paymentdetails','Payment details' FROM hb_language WHERE target='user'
UNION SELECT id, 'global', 'payment','Payment' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'planname','Plan name' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'subproduct','Sub-product' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'quicklinks','Quick links' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'chooseyourplan','Choose your plan' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'yourconfiguration','Your configuration' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'totalprice','Total price' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'hotfeatures','Hot Features' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'donthaveaccount','Don\'t have an account' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'planselect','Plan Select' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'best','Best' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'serviceconfiguration','Service Configuration' FROM hb_language WHERE target='user'
UNION SELECT id, 'global', 'contnue','Contnue' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'tellmemore','Tell me more' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'haventfoundstilllooking','Still haven\'t found what are you looking for' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'leaveusamessage','Leave us a message' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'yourcartisempty','Your cart is empty' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'next','Next' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'notincluded','Not included' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'changebillingcycle','Change billing cycle' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'changecurrency','Change currency' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'continuetostep','Continue to step' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'server','Server' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'startingat','Starting at' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'networkconfiguration','Network Configuration' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'software','Software' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'confirmation','Confirmation' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'submityourorder','Submit your order' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'seemoreoptions','see more options' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'hardwaresettings','Hardware settings' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'ipsbandwidth','IPs & bandwidth' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'oscontrolpanel','OS & Control Panel' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'serveraddons','Server Addons' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'finishorder','Finish Order' FROM hb_language WHERE target='user'
UNION SELECT id, 'global', 'configure','Configure' FROM hb_language WHERE target='user'
UNION SELECT id, 'global', 'dedicatedserver','dedicated server' FROM hb_language WHERE target='user'
UNION SELECT id, 'global', 'allservers','All servers' FROM hb_language WHERE target='user'
UNION SELECT id, 'global', 'bestselling','Best selling' FROM hb_language WHERE target='user'
UNION SELECT id, 'global', 'configuration','Configuration' FROM hb_language WHERE target='user'
UNION SELECT id, 'global', 'other','Other' FROM hb_language WHERE target='user'
UNION SELECT id, 'global', 'cart','Cart' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'newcustomerq','New customer?' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'returningcustomerq','Returning customer?' FROM hb_language WHERE target='user'
UNION SELECT id, 'global', 'startchat','Start a Chat' FROM hb_language WHERE target='user'
UNION SELECT id, 'global', 'writemessage','Write a message' FROM hb_language WHERE target='user'
UNION SELECT id, 'global', 'fax','Fax' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'getintouch','Get in touch' FROM hb_language WHERE target='user'
UNION SELECT id, 'global', 'from','from' FROM hb_language WHERE target='user'
UNION SELECT id, 'global', 'add','Add' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'ram','Ram' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'storagespace','Storage Space' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'bandwidth','Bandwidth' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'pselectbilling','Please select billing options' FROM hb_language WHERE target='user'
UNION SELECT id, 'global', 'registered','Registered' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'serverpricing','Server & Pricing' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'afterchoise','After server selection, product configuration will appear for more options to choose' FROM hb_language WHERE target='user'
UNION SELECT id, 'global', 'min','min' FROM hb_language WHERE target='user'
UNION SELECT id, 'global', 'max','max' FROM hb_language WHERE target='user'
UNION SELECT id, 'global', 'setupyourplan','Setup Your Plan' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'whyus','Why Us' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'readaboutus','Read about us' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'planselection','Plan Selection' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'movingslider','Select your plan by moving slider' FROM hb_language WHERE target='user'
UNION SELECT id, 'global', 'to','to' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'plans','plans' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'aboutplan','About plan' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'predefiniedplans','Predefinied plans' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'selectthisplan','Select this plan' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'backto','back to' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'thankyouforchoosing','Thank you for choosing' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'moreservices','More services' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'selectcategory','Select Category' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'quicksetup','Quick and easy setup' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'yourtotalprice','Your total price' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'planconfiguration','Plan Configuration' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'orderyourplan','Order your plan' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'selectyourplan','Select your plan' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'step','Step' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'chooseyourcertificate','Choose your certificate' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'submit_csr','Submit Certificate Signing Request' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'currentselection','Current Selection' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'existingcustomer','Existing customer?' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'loginonaccount','Login to your account' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'contactinformation','Contact information' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'customerinfo','Customer info' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'aboutcompany','About company' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'bulkdomaintransfer','Bulk Domain Transfer' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'enterdomains','Enter domain names you wish to transfer, 1 name per line' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'example','Example' FROM hb_language WHERE target='user'
UNION SELECT id, 'cart', 'checkingstatus','Checking status...' FROM hb_language WHERE target='user';