Code:<?php
//Calloway's Pro version 1.0a install MYSQL Tables
require("config.php");
mysql_connect($dbhost, $dbuname, $dbpass);
@mysql_select_db($dbname);
//////////////////////////////////////////////////////////////////////////////
//For security purposes delete this file after database tables are installed!!
//////////////////////////////////////////////////////////////////////////////
$query = "CREATE TABLE CCart_categories (".
"cid int(11) NOT NULL auto_increment,".
"cat varchar(150) NOT NULL default '',".
"maincat varchar(150) NOT NULL default '',".
"catdes varchar(250) default 'YES',".
"pid int(11) NOT NULL default '0',".
"image text NOT NULL,".
"PRIMARY KEY (cid))";
mysql_query($query)or die("<center>Error Creating CCart_categories: </center>".mysql_error());
$query1 = "CREATE TABLE CCart_products (".
"pid int(11) NOT NULL auto_increment,".
"name varchar(20) NOT NULL,".
"des text NOT NULL,".
"catid int(11) NOT NULL default '0',".
"pnum text NOT NULL default '',".
"imageloc text NOT NULL,".
"imgw tinyint(4) NOT NULL,".
"imgh tinyint(4) NOT NULL,".
"ialt text NOT NULL,".
"ptype text NOT NULL,".
"a1 text NOT NULL,".
"listp text NOT NULL,".
"per tinytext NOT NULL,".
"p1 tinyint(4) NOT NULL,".
"t1 tinytext NOT NULL,".
"a3 text NOT NULL,".
"p3 tinyint(4) NOT NULL,".
"t3 tinytext NOT NULL,".
"s1 text NOT NULL,".
"as2 text NOT NULL,".
"extra text NOT NULL,".
"stock text NOT NULL,".
"opta text NOT NULL,".
"optb text NOT NULL,".
"optc text NOT NULL,".
"optd text NOT NULL,".
"opte text NOT NULL,".
"optf text NOT NULL,".
"optg text NOT NULL,".
"opth text NOT NULL,".
"opti text NOT NULL,".
"optj text NOT NULL,".
"optk text NOT NULL,".
"optl text NOT NULL,".
"optm text NOT NULL,".
"optn text NOT NULL,".
"optiona text NOT NULL,".
"optionb text NOT NULL,".
"optionc text NOT NULL,".
"optiond text NOT NULL,".
"optione text NOT NULL,".
"optionf text NOT NULL,".
"optiong text NOT NULL,".
"optionh text NOT NULL,".
"optioni text NOT NULL,".
"optionj text NOT NULL,".
"optionk text NOT NULL,".
"optionl text NOT NULL,".
"optionm text NOT NULL,".
"optionn text NOT NULL,".
"optname text NOT NULL,".
"optionname text NOT NULL,".
"a2 text NOT NULL,".
"p2 text NOT NULL,".
"t2 text NOT NULL,".
"heavyitem tinytext NOT NULL,".
"specials tinytext NOT NULL,".
"specialprice tinytext NOT NULL,".
"specialsavings tinytext NOT NULL,".
"whatsnew tinytext NOT NULL,".
"pshowcase tinytext NOT NULL,".
"mann text NOT NULL,".
"mani text NOT NULL,".
"PRIMARY KEY (pid))";
mysql_query($query1) or die("<center>Error1 Creating CCart_products:</center> ".mysql_error());
$query2 = "CREATE TABLE CCart_config (".
"id int(11) NOT NULL auto_increment,".
"emailid text NOT NULL,".
"logourl text NOT NULL,".
"returnurl text NOT NULL,".
"cancelurl text NOT NULL,".
"purchaseimg text NOT NULL,".
"recurringimg text NOT NULL,".
"viewcartimg text NOT NULL,".
"addcartimg text NOT NULL,".
"viewcart tinytext NOT NULL,".
"layout text NOT NULL,".
"nukeadd tinytext NOT NULL,".
"rtsidebar tinytext NOT NULL,".
"ver tinytext NOT NULL,".
"images tinytext NOT NULL,".
"ccolumns tinytext NOT NULL,".
"subcolumns tinytext NOT NULL,".
"specialcolumns tinytext NOT NULL,".
"whatsnewcolumns tinytext NOT NULL,".
"showcasecolumns tinytext NOT NULL,".
"symbolid tinyint(4) NOT NULL default '1',".
"cartcolor tinytext NOT NULL,".
"ppimg tinytext NOT NULL,".
"note text NOT NULL,".
"inn tinytext NOT NULL,".
"productpage tinytext NOT NULL,".
"specialbox tinytext NOT NULL,".
"whatsnewbox tinytext NOT NULL,".
"showcasebox tinytext NOT NULL,".
"bphone text NOT NULL,".
"bemail text NOT NULL,".
"bhours text NOT NULL,".
"PRIMARY KEY (id))";
mysql_query($query2) or die("<center>Error2 Creating CCart_config:</center> ".mysql_error());
//////////////////////////////////////////////////////////////////////////////
//$query2 = "INSERT INTO CCart_config VALUES ('1', 'orders@theguitarfiles.com', 'logo url here', 'http://www.theguitarfiles.com',
'http://www.theguitarfiles.com', '', 'https://www.paypal.com/images/x-click-but24.gif', 'https://www.paypal.com/images/view_cart_02.gif',
'https://www.paypal.com/images/x-click-but23.gif', 'on', '', 'on', 'off', 'CCart Version 1.0a Pro', 'on', '2', '3', '2', '1', '2', 1, '0',
'off', 'How did you hear about us', '0', '5', 'on', 'on', 'on', '302-875-2990', 'orders@theguitarfiles.com', '(Mon-Fri 12-5 EST)')";
$query2 = "INSERT INTO `CCart_config` (`id`, `emailid`, `logourl`, `returnurl`, `cancelurl`, `purchaseimg`, `recurringimg`, `viewcartimg`,
`addcartimg`, `viewcart`, `layout`, `nukeadd`, `rtsidebar`, `ver`, `images`, `ccolumns`, `subcolumns`, `specialcolumns`, `whatsnewcolumns`,
`showcasecolumns`, `symbolid`, `cartcolor`, `ppimg`, `note`, `inn`, `productpage`, `specialbox`, `whatsnewbox`, `showcasebox`, `bphone`,
`bemail`, `bhours`) VALUES (1, 'orders@theguitarfiles.com', '', 'http://www.theguitarfiles.com', 'http://www.theguitarfiles.com', '',
'https://www.paypal.com/images/x-click-but24.gif', 'https://www.paypal.com/images/view_cart_02.gif',
'https://www.paypal.com/images/x-click-but23.gif', 'on', '', 'on', 'off', 'CCart Version 1.0a Pro', 'on', '2', '3', '2', '1', '2', 1, '0',
'off', 'How did you hear about us', '0', '5', 'on', 'on', 'on', '302-875-2990', 'orders@theguitarfiles.com', '(Mon-Fri 12-5 EST) ')";
//$query2 = "INSERT INTO `CCart_config` ('id', 'emailid', 'logourl', 'returnurl', 'cancelurl', 'purchaseimg', 'recurringimg', 'viewcartimg',
'addcartimg', 'viewcart', 'layout', 'nukeadd', 'rtsidebar', 'ver', 'images', 'ccolumns', 'subcolumns', 'specialcolumns', 'whatsnewcolumns',
'showcasecolumns', 'symbolid', 'cartcolor', 'ppimg', 'note', 'inn', 'productpage', 'specialbox', 'whatsnewbox', 'showcasebox', 'bphone',
'bemail', 'bhours') VALUES (1, 'orders@theguitarfiles.com', '', 'http://www.theguitarfiles.com', 'http://www.theguitarfiles.com', '',
'https://www.paypal.com/images/x-click-but24.gif', 'https://www.paypal.com/images/view_cart_02.gif',
'https://www.paypal.com/images/x-click-but23.gif', 'on', '', 'on', 'off', 'CCart Version 1.0a Pro', 'on', '2', '3', '2', '1', '2', 1, '0',
'off', 'How did you hear about us', '0', '5', 'on', 'on', 'on', '000-000-0000', 'orders@yoursite.com', '(Mon-Fri 8-4 EST)')";
mysql_query($query2) or die("<center>Error: Inserting Config Details:</center> ".mysql_error());
//////////////////////////////////////////////////////////////////////////////
$sql4 = "CREATE TABLE CCart_currency (".
"id int(11) NOT NULL auto_increment,".
"code tinytext NOT NULL,".
"symbol tinytext NOT NULL,".
"PRIMARY KEY (id))";
mysql_query($sql4) or die("Error4 Creating CCart_currency: ".mysql_error());
//////////////////////////////////////////////////////////////////////////////
$sql7 = "INSERT INTO CCart_currency VALUES ('1', 'USD', '$')";
mysql_query($sql7) or die("Error7 Inserting currency Details: ".mysql_error());
$sql8 = "INSERT INTO CCart_currency VALUES ('2', 'EUR', '€')";
mysql_query($sql8) or die("Error8 Inserting currency Details: ".mysql_error());
$sql9 = "INSERT INTO CCart_currency VALUES ('3', 'GBP', '£')";
mysql_query($sql9) or die("Error9 Inserting currency Details: ".mysql_error());
$sql10 = "INSERT INTO CCart_currency VALUES ('4', 'CAD', '$')";
mysql_query($sql10) or die("Error10 Inserting currency Details: ".mysql_error());
$sql11 = "INSERT INTO CCart_currency VALUES ('5', 'JPY', '¥')";
mysql_query($sql11) or die("Error11 Inserting currency Details: ".mysql_error());
////////////////////////////////////////////////////////////////////////////////////
echo "<Center>Good News...<h2>CALLOWAY'S CART PRO (ver 1.0a)</h2> <br>Tables Were Installed Sucessfully. <br><br>Enjoy this version and future updates/releases<br> at: <a href=\"http://www.theguitarfiles.com/CC/CallowaysCart\">www.theguitarfiles.com/CC/CallowaysCart</a>";
echo "<br><br>Thanks <br>Brian Calloway<br><br></center>";
//END
?>
|