#!/usr/local/perl/bin/ use CGI qw(:standard); use DBI; $query = new CGI; $task = $query->param('task'); if($task) { &$task; } else { &make_index; # &store_closed; } exit; ######## SUBS ######### sub store_closed { print "Content-Type: text/html\n\n"; print< The store will be closed until Tuesday April 27th

 

 

The store will be closed until Tuesday April 27th.
We have a new location and new contact information so please take note.

 

Thank You,

Kim Watzke

END } sub search { $search = $query->param('search'); &show_parts; } sub show_parts { $field = $query->param('field'); if($field eq "Bearings"){$heading = "Bearings and Seals";} else {$heading = $field;} if($search) {$heading = $search;} $column = $query->param('column'); $mysqlhost = "localhost"; $mysqluser = "kidka3"; $mysqlpasswd = "sd1234"; $mysqldb = "kidka3"; $dbh = DBI->connect( "DBI:mysql:$mysqldb:$mysqlhost", $mysqluser, $mysqlpasswd, { RaiseError => 1 }); print "Content-Type: text/html\n\n"; print < Performance Karting
 

PARTS CATEGORIES 

END $sqlquery = "SELECT distinct catagory from all_products"; $get_hosts = $dbh->prepare($sqlquery); $get_hosts->execute; while($hashref = $get_hosts-> fetchrow_hashref) { if($$hashref{catagory} eq "Bearings") {$real_name = "Bearings & Seals";} else {$real_name = $$hashref{catagory};} print "$real_name
"; } $sqlquery = "SELECT distinct title from all_products"; $get_hosts = $dbh->prepare($sqlquery); $get_hosts->execute; while($hashref = $get_hosts-> fetchrow_hashref) { print "$$hashref{title}
"; } $sqlquery = "SELECT distinct chapter from all_products where chapter != 'None'"; $get_hosts = $dbh->prepare($sqlquery); $get_hosts->execute; while($hashref = $get_hosts-> fetchrow_hashref) { print "$$hashref{chapter}
"; } print <

 

PARTS SEARCH:
$heading
 
C50 DRAWING

K80 DRAWING
END if($task eq "search") { $sqlquery = "SELECT *, CONCAT((((unit_cost * adjustment) + unit_cost) * mark_up) + ((unit_cost * adjustment) +unit_cost)) unit_price FROM all_products where invoice_description LIKE '%$search%' OR part_number LIKE '%$search%' OR web_description LIKE '%$search%' order by model,invoice_description"; $get_hosts = $dbh->prepare($sqlquery); $get_hosts->execute; while($hashref = $get_hosts-> fetchrow_hashref) { if ($$hashref{image}) { $image = "  "; } else { $image = "";} if("$$hashref{model}" ne "$tmp_model") { print<

$$hashref{model}

END $tmp_model = $$hashref{model}; } print ""; if ("$$hashref{web_description}" ne "$$hashref{invoice_description}") { print ""; } else{ print ""; } print ""; print ""; print < END print ""; print ""; print ""; if($$hashref{part_number} eq "C50ENG" || $$hashref{part_number} eq "K80 E" || $$hashref{part_number} eq "WMS-110") { print ""; print ""; } print ""; print ""; print< END } } else { $sqlquery = "SELECT *, CONCAT((((unit_cost * adjustment) + unit_cost) * mark_up) + ((unit_cost * adjustment) +unit_cost)) unit_price FROM all_products where $column = '$field' order by model,invoice_description"; $get_hosts = $dbh->prepare($sqlquery); $get_hosts->execute; while($hashref = $get_hosts-> fetchrow_hashref) { if ($$hashref{image}) { $image = "  "; } else { $image = "";} if("$$hashref{model}" ne "$tmp_model") { print<


$$hashref{model}

Part Number Description Price Purchase
$$hashref{part_number} $image$$hashref{invoice_description} $size_select $$hashref{invoice_description} $size_select $$hashref{unit_price}
END $tmp_model = $$hashref{model}; } print ""; if ("$$hashref{web_description}" ne "$$hashref{invoice_description}") { print ""; } else{ print ""; } print ""; print ""; print < END print ""; print ""; print ""; if($$hashref{part_number} eq "C50ENG" || $$hashref{part_number} eq "K80 E" || $$hashref{part_number} eq "WMS-110") { print ""; print ""; } print ""; print ""; print< END } } print <
Part Number Description Price Purchase
$$hashref{part_number} $image$$hashref{invoice_description} $size_select $$hashref{invoice_description} $size_select $$hashref{unit_price}
WE CARRY A COMPLETE LINE OF COMER AND TOP KART PARTS
END } ### end of show_parts sub routine sub make_index { $mysqlhost = "localhost"; $mysqluser = "kidka3"; $mysqlpasswd = "sd1234"; $mysqldb = "kidka3"; $dbh = DBI->connect( "DBI:mysql:$mysqldb:$mysqlhost", $mysqluser, $mysqlpasswd, { RaiseError => 1 }); print "Content-Type: text/html\n\n"; print < Performance Karting
 

PARTS CATEGORIES 

END $sqlquery = "SELECT distinct catagory from all_products"; $get_hosts = $dbh->prepare($sqlquery); $get_hosts->execute; while($hashref = $get_hosts-> fetchrow_hashref) { if($$hashref{catagory} eq "Bearings") {$real_name = "Bearings & Seals";} else {$real_name = $$hashref{catagory};} print "$real_name
"; } $sqlquery = "SELECT distinct chapter from all_products where chapter != 'None'"; $get_hosts = $dbh->prepare($sqlquery); $get_hosts->execute; while($hashref = $get_hosts-> fetchrow_hashref) { print "$$hashref{chapter}
"; } $sqlquery = "SELECT distinct title from all_products"; $get_hosts = $dbh->prepare($sqlquery); $get_hosts->execute; while($hashref = $get_hosts-> fetchrow_hashref) { print "$$hashref{title}
"; } print <
PARTS SEARCH:

 

$heading

 
C50 DRAWING

K80 DRAWING
Welcome to our parts department.  To the left are a variety of headings which will make it easier for you to locate the part you need.  The parts database is cross referenced so many parts will appear under more than one heading.  If you have any questions please give us a call at 248.669.8922.
 


WE CARRY A COMPLETE LINE OF COMER AND TOPKART PARTS

TOP SELLERS
C50 Rebuild Kit
Our C50 Rebuild Kit includes cryo treated Self-Aligning Bearings, Teflon Racing Seals, cryo treated Clutch Springs, a Ring Set and Gaskets. Everything needed to refresh your C50.  
 Kid Kart Axles
These are the HOT ticket in Performance axles. 25mm Kid kart, 30mm Cadet & 1-1/4" Kid Kart & Cadet Axles available. Ask about our NEW light weight PKT Brake System. Contact: Kim Watzke Ph 248.669.8922 / email kim\@pktaxles.com
Or visit us at www.pktaxles.com.
 Comet Clutch 

  As you can see this clutch has been drastically modified.  The shoes have been cut and heavier springs have been added.  The overall weight has been reduced by almost 100 grams and  with the larger springs the engagement rpms are increased dramatically.  This clutch is in no way legal for sanctioned events.
<DRUM NOT INCLUDED>

 NEW! PKT Lightweight Sprocket Carrier
END } exit;