Practical Assessment – Recreational Marine Driver Licence

Practical Assessment – Personal Watercraft Licence

Safety on a Jetski

 

 

 

 

Photo Gallery

query($query)); $total_pages = $total_pages[num]; /* Setup vars for query. */ $targetpage = $_SERVER['PHP_SELF']; //your file name (the name of this file) $page = $_GET['page']; if($page) $start = ($page - 1) * $limit; //first item to display on this page else $start = 0; //if no page var is given, set start to 0 /* Get data. */ if ($action=="Search") { $sql = "SELECT * FROM products WHERE (itemname LIKE '%$searchfor%' or itemcode LIKE '%$searchfor%' or itemdesc LIKE '%$searchfor%' or itemdesc2 LIKE '%$searchfor%' or itemdesc3 LIKE '%$searchfor%' or itemdesc4 LIKE '%$searchfor%' or itemdesc5 LIKE '%$searchfor%' or keywords LIKE '%$searchfor%') and itemcat != '1' LIMIT $start, $limit"; $extraparams="&searchfor=$searchfor"; } elseif ($action=="Specials") $sql="SELECT * FROM products WHERE specialproduct='Yes' ORDER BY itemname LIMIT $start, $limit"; elseif ($action=="NewProducts") $sql="SELECT * FROM products WHERE newproduct='Yes' ORDER BY itemname LIMIT $start, $limit"; else $sql="SELECT * FROM products WHERE itemcat='$cat' or itemcat2='$cat' or itemcat3='$cat' or itemcat4='$cat' or itemcat5='$cat' ORDER BY priority,itemname LIMIT $start, $limit"; $CatResult = $conn->query($sql); /* Setup page vars for display. */ if ($page == 0) $page = 1; //if no page var is given, default to 1. $prev = $page - 1; //previous page is page - 1 $next = $page + 1; //next page is page + 1 $lastpage = ceil($total_pages/$limit); //lastpage is = total pages / items per page, rounded up. $lpm1 = $lastpage - 1; //last page minus 1 /* Now we apply our rules and draw the pagination object. We're actually saving the code to a variable in case we want to draw it more than once. */ if ($_GET['Test']=="Yes") echo "SQL: $sql
"; $pagination = ""; if($lastpage > 1){ $pagination1 .= "
\n
    \n"; $pagination1 .= "
  • Pages:
  • \n"; //previous button //if ($page > 1) // $pagination1.= "Prev | "; //else // $pagination1.= "Prev | "; if ($lastpage < 7 + ($adjacents * 2)) { //not enough pages to bother breaking it up for ($counter = 1; $counter <= $lastpage; $counter++) { if ($counter == $page) $pagination1.= "
  • $counter
  • \n"; else $pagination1.= "
  • $counter
  • \n"; } } elseif($lastpage > 5 + ($adjacents * 2)) { //enough pages to hide some //close to beginning; only hide later pages if($page < 1 + ($adjacents * 2)) { for ($counter = 1; $counter < 4 + ($adjacents * 2); $counter++) { if ($counter == $page) $pagination1.= "
  • $counter
  • \n"; else $pagination1.= "
  • $counter
  • \n"; } $pagination1.= "
  • ...
  • "; $pagination1.= "
  • $lpm1
  • \n"; $pagination1.= "
  • $lastpage
  • \n"; } //in middle; hide some front and some back elseif($lastpage - ($adjacents * 2) > $page && $page > ($adjacents * 2)) { $pagination1.= "
  • 1
  • \n"; $pagination1.= "
  • 2
  • \n"; $pagination1.= "
  • ...
  • "; for ($counter = $page - $adjacents; $counter <= $page + $adjacents; $counter++) { if ($counter == $page) $pagination1.= "
  • $counter
  • \n"; else $pagination1.= "
  • $counter
  • \n"; } $pagination1.= "
  • ...
  • "; $pagination1.= "
  • $lpm1
  • \n"; $pagination1.= "
  • $lastpage
  • \n"; } //close to end; only hide early pages else { $pagination1.= "
  • 1
  • \n"; $pagination1.= "
  • 2
  • \n"; $pagination1.= "
  • ...
  • "; for ($counter = $lastpage - (2 + ($adjacents * 2)); $counter <= $lastpage; $counter++) { if ($counter == $page) $pagination1.= "
  • $counter
  • \n"; else $pagination1.= "
  • $counter
  • \n"; } } } //next button //if ($page < $counter - 1) //$pagination1.= " | Next"; //else // $pagination1.= " | Next"; $pagination1.= "
\n
\n"; } if (($Product_DisplayId=="999") and ($Product_Display_Other!="")) $Product_Display = $Product_Display_Other; else if ($Product_DisplayId !=""){ db_Rconnect(); $dfresult=$conn->query("SELECT display_file from product_display where display_id='$Product_DisplayId'"); while ($dfrow = mysqli_fetch_row($dfresult)){ $Product_Display = $dfrow[0]; } } db_connect(); $ajaxfile=substr($Product_Display,0,-4)."_ajax.php"; if (file_exists("$skins_root/$skindir/includes/productdisplay/$ajaxfile")) $ajaxfile="skins/$skindir/includes/productdisplay/$ajaxfile"; elseif (file_exists("includes/productdisplay/$ajaxfile")) $ajaxfile="includes/productdisplay/$ajaxfile"; $presult = $conn->query ( "SELECT * from prodextra" ); while ( $prow = mysqli_fetch_array ( $presult ) ) { $PreText = $prow ['pretext']; $AddCartBut = $prow ['addcartbut']; $AddCartButFile = $prow ['addcartbutother']; $SearchAmt = $prow ['searchamt ']; $HeaderImage = $prow ['HeaderImage']; $UseCodes = $prow ['UseCodes']; $MoreInfoBut = $prow ['moreinfobut']; $MoreInfoButFile = $prow ['moreinfobutother']; $UseRRP = $prow ['UseRRP']; $default_limit = $prow ['default_limit']; $StockMsg = $prow ['stockmsg']; $SpecialPreText = "Special Price"; } if ($AddCartBut != 0) { db_RConnect(); $dresult=$conn->query("SELECT display_pic from addcart_buttons where display_id=$AddCartBut"); while ($drow=mysqli_fetch_row($dresult)) { $AddCart_pic = $drow[0]; } db_connect(); } if ($MoreInfoBut != 0) { db_RConnect(); $dresult=$conn->query("SELECT display_pic from moreinfo_buttons where display_id=$MoreInfoBut"); while ($drow=mysqli_fetch_row($dresult)) { $MoreInfo_pic = $drow[0]; } db_connect(); } $cresult=$conn->query("SELECT cartheader, cartdisplay, cartdisplayother, buyertemplate, buyertemplateother, freight, freightother, usetax, taxcode, taxinclusive, taxvalue, currencycode, currencysymbol, currencysymbolother, cartheaderimage,currencysymbolposition from buyinggroups where buygroupid='$MMBuyGroups'"); while ( $crow = mysqli_fetch_array ( $cresult ) ) { $CartBody = str_replace ( "\n", "", stripslashes ( $crow ['cartheader'] ) ); $Cart_DisplayId = $crow ['cartdisplay']; $Cart_Display_Other = $crow ['cartdisplayother']; $Buyer_TemplateId = $crow ['buyertemplate']; $Buyer_Template_Other = $crow ['buyertemplateother']; $Freight_DisplayId = $crow ['freight']; $Freight_Display_Other = $crow ['freightother']; $BG_UseTax = $crow ['usetax']; $BG_TaxCode = $crow ['taxcode']; $BG_TaxInclusive = $crow ['taxinclusive']; $BG_TaxValue = $crow ['taxvalue']; $BG_CurrencyCode = $crow ['currencycode']; $BG_CurrencySymbol = $crow ['currencysymbol']; $BG_CurrencySymbolPosition = $crow ['currencysymbolposition']; $BG_CurrencySymbolOther = $crow ['currencysymbolother']; $CartHeaderImage = $crow ['cartheaderimage']; $BG_CurrencySymbolPosition = $crow ['currencysymbolposition']; } if ($action=="Search"){ $doand = "0"; $leadin = $_GET["leadin"]; if($leadin=="page") $searchfor = $_GET["searchfor"]; else $searchfor = $_POST["searchfor"]; if ($searchfor == "") $searchfor = $_GET["searchfor"]; db_Sconnect(); $DBName = $_SESSION["DBName"]; $result1=$conn->query("SELECT dispubliccart,dismemlogin,haswishlist FROM sitesettings where sitename='$DBName'"); $row1 = mysqli_fetch_array ( $result1 ); $dispubliccart = $row1 ['dispubliccart']; $dismemlogin = $row1 ['dismemlogin']; $haswishlist = $row1 ['haswishlist']; $title="Search Results"; $headertext="Search Results"; $offset=$_GET['offset']; $query="SELECT * FROM products WHERE (itemname LIKE '%$searchfor%' or itemcode LIKE '%$searchfor%' or itemdesc LIKE '%$searchfor%' or itemdesc2 LIKE '%$searchfor%' or itemdesc3 LIKE '%$searchfor%' or itemdesc4 LIKE '%$searchfor%' or itemdesc5 LIKE '%$searchfor%' or keywords LIKE '%$searchfor%') and itemcat != '1' ORDER BY ItemName LIMIT $start, $limit"; } elseif (isset ( $brand )) { $query = "SELECT * FROM products WHERE brandid='$brand' ORDER BY itemname LIMIT $start, $limit"; } elseif ($action=="Specials"){ $query="SELECT * FROM products WHERE specialproduct='Yes' ORDER BY itemname LIMIT $start, $limit"; } elseif ($action=="NewProducts"){ $query="SELECT * FROM products WHERE newproduct='Yes' ORDER BY itemname LIMIT $start, $limit"; }elseif ($action == "Featured") { $query = "SELECT * FROM products WHERE featured='Yes' ORDER BY itemname LIMIT $start, $limit"; } else { echo "
\n"; $cresult = $conn->query ( "select catname,cattext,catheading,catlimit,headimage,catcolor,catfontcolor from category where categoryid='$cat'" ); while ( $crow = mysqli_fetch_array ( $cresult ) ) { $CategoryName = $crow ['catname']; $BodyText = str_replace ( "\n", "", stripslashes ( $crow ['cattext'] ) ); $CatHeading = $crow ['catheading']; $limit = $crow ['catlimit']; $HeadImage = $crow ['headimage']; $tablecolor = $crow ['catcolor']; $tablefontcolor = $crow ['catfontcolor']; } $title =$CategoryName; $headertext=$CatHeading; if ($limit==0 or $limit=="") $limit=10; if ($BG_CurrencySymbolOther!="") $BG_CurrencySymbol = $BG_CurrencySymbolOther; if ($HeadImage != "") { $size = @GetImageSize("images/$HeadImage"); echo "
\n"; } else { if ($CatHeading and $DisplayPageHeader != "No") echo "

$CatHeading

\n"; elseif ($CategoryName and $DisplayPageHeader != "No") echo "

$CategoryName

\n"; } echo $BodyText; echo "
\n"; // Close CategoryText if (!isset($cat)) $cat=$_GET['cat']; $sql="SELECT * FROM products WHERE itemcat='$cat' or itemcat2='$cat' or itemcat3='$cat' or itemcat4='$cat' or itemcat5='$cat' ORDER BY priority,itemname LIMIT $start, $limit"; } db_connect(); $CatResult = $conn->query($sql) or die("Cannot execute query\n"); $rows = mysqli_num_rows($CatResult); if (mysqli_num_rows($CatResult)== 0) echo"
Currently no items in this category.
\n"; else { echo $pagination1; echo " "; echo "
\n"; echo "\n"; $TableRow=1; while ($data = mysqli_fetch_array($CatResult)) { $itemid = $data ['itemid']; $itemname = stripslashes ( $data ['itemname'] ); $itemcode = $data ['itemcode']; $itemcat = $data ['itemcat']; $itemcat2 = $data ['itemcat2']; $itemcat3 = $data ['itemcat3']; $itemcat4 = $data ['itemcat4']; $itemcat5 = $data ['itemcat5']; $priority = $data ['priority']; $itemdesc = stripslashes ( $data ['itemdesc'] ); $itemdesc2 = stripslashes ( $data ['itemdesc2'] ); $itemdesc3 = stripslashes ( $data ['itemdesc3'] ); $itemdesc4 = stripslashes ( $data ['itemdesc4'] ); $itemdesc5 = stripslashes ( $data ['itemdesc5'] ); $itempic = $data ['itempic']; $thumbpic = $data ['thumbpic']; $producttype = $data ['product_type']; $ItemIsPOA = $data['ispoa']; $ass_filename = $data ['ass_filename']; $specialproduct = $data ['specialproduct']; $customfield1 = stripslashes ( $data ['customfield1'] ); $customfield2 = stripslashes ( $data ['customfield2'] ); $customfield3 = stripslashes ( $data ['customfield3'] ); $customfield4 = stripslashes ( $data ['customfield4'] ); $customfield5 = stripslashes ( $data ['customfield5'] ); $minpurchasews = $data ['minpurchasews']; $keywords = stripslashes ( $data ['keywords'] ); $stock_out = $data['stockout']; $rrppre = $data['opt3pre']; $rrpprice = $data['opt3price']; $rrpaft = $data['opt3aft']; $StockQty = $data['stockqty']; $PurchasedQty = $data['purchasedqty']; $FreightPoints = $data['freightpoints']; $ThumbAltText = stripslashes($data['thumbalttext']); $Brand_Id = $data['brandid']; $ItemIsPOA = $data['ispoa']; $ItemIsNOTAX = $data['isnotax']; $ViewedQty = $data['pageviews']; $ReorderQty = $data['reorderqty']; if ($producttype=="") $producttype="P"; $numvariations = 0; $result2 = $conn->query ( "SELECT * FROM buyinggroupprices WHERE buygroupid='$MMBuyGroups' and itemid='$itemid'" ); if (mysqli_num_rows ( $result2 ) == 1) { $row2 = mysqli_fetch_array ( $result2 ); $webpre = $row2 ['webpretext']; $webprice = $row2 ['webprice']; $webaft = $row2 ['webafttext']; $specialpre = $row2 ['specialpretext']; $specialprice = $row2 ['specialprice']; $specialaft = $row2 ['specialafttext']; } if ($webpre == "") $webpre = $PreText; if ($specialpre == "") $specialpre = $SpecialPreText; if ($TableRow == 1) echo "\n"; echo "\n"; echo "\n"; } db_connect(); echo "
\n"; $results=$conn->query("SELECT opt3price,specialprice,itemweight FROM products where itemid='$itemid'"); while ($rows = mysqli_fetch_array($results)) { $baseRRP = stripslashes($rows['opt3price']); $baseSpecial = stripslashes($rows['specialprice']); $baseWeight = stripslashes($rows['itemweight']); } $numvariations = countVariations($itemid); if ($numvariations >0) { // This product has variations - grab default values $results=$conn->query("SELECT * FROM variation_names where product_id='$itemid' ORDER BY variation_id"); while ($varrow = mysqli_fetch_array($results)) { $varidarray[] =$varrow['variation_id'][0]; $varnamearray[] =$varrow['variation_caption']; } if ($Product_Updated=="Yes") { $results=$conn->query("SELECT * FROM variations WHERE product_id ='$itemid' and variation='$VariationSelected'"); // grab info for current variation } else { $results=$conn->query("SELECT * FROM variations WHERE product_id ='$itemid' and isdefault='Yes'"); if (mysqli_num_rows($results)==0) $results=$conn->query("SELECT * FROM variations WHERE product_id ='$itemid' order by variation limit 1"); } while ($rows = mysqli_fetch_array($results)) { $variation_id = $rows['variation_id']; $code_override = $rows['code_override']; $rrp_override = $rows['rrp_override']; $special_override = $rows['special_override']; $weight_override = $rows['weight_override']; $variation = $rows['variation']; $na_override = $rows['na_override']; $StockQty = $rows['variation_quantity']; $isdefault = $rows['isdefault']; $ddownloadfname = $rows['ddownloadfname']; } $price_adjust_all = ""; $weight_adjust_all = ""; $varsplit = str_split($variation, 3); for ($i = 0; $i < count($varsplit); $i++) { $ThisVar = $varsplit[$i]; $ThisVarid = $varidarray[$i]; $ThisVarName = $varnamearray[$i]; $results=$conn->query("SELECT * FROM variation_options where product_id='$itemid' and variation_id='$ThisVarid' and variation='$ThisVar'"); while ($rows = mysqli_fetch_array($results)) { $variation_option = stripslashes($rows['variation_option']); $price_adjust = $rows['price_adjust']; $weight_adjust = $rows['weight_adjust']; $price_adjust_all=$price_adjust_all."|".$price_adjust; $weight_adjust_all=$weight_adjust_all."|".$weight_adjust; $result2s=$conn->query("SELECT price FROM variation_prices where product_id='$itemid' and variation='$variation' and buygroup_id='$MMBuyGroups'"); if (mysqli_num_rows($result2s) ==1) { $row2s = mysqli_fetch_array($result2s); $webprice = $row2s['price']; } else { $result2s=$conn->query("SELECT webprice FROM buyinggroupprices where itemid='$itemid' and buygroupid='$MMBuyGroups'"); if (mysqli_num_rows($result2s) ==1) { $row2s = mysqli_fetch_array($result2s); $webprice =number_format(adjustvalue($row2s['webprice'],$price_adjust_all),2); } } } } } $result3 = $conn->query("SELECT * FROM cartsettings"); $row3 = mysqli_fetch_array($result3); $WishList = $row3['wishlist']; echo "
\n"; if ($Product_Display!="") { if (file_exists("$skins_root/$skindir/includes/productdisplay/$Product_Display")) require("skins/$skindir/includes/productdisplay/$Product_Display"); elseif (file_exists("includes/productdisplay/$Product_Display")) { require("includes/productdisplay/$Product_Display"); } else echo "ERROR - Product Display $Product_Display does not exist."; // End Product Table } echo "
\n"; echo "
\n"; echo $pagination1; } ?>