<h3>Products</h3> <?php foreach ($products as $key => $value) //render product ProductRender($products[$key]); ?> </div> <div style = "width:300px; margin-left:20px; float:left; border:2px #333 dotted"> <h3>My Basket</h3><br /> <?php echo KoolScripting::Start();?> <updatepanel id="basket"> <content> <?php if (isset($_POST['addItem']) && $_POST['addItem'] != "") $_SESSION['basket'][] = $_POST['addItem']; //add product to basket if (isset($_POST['removeItem']) && $_POST['removeItem'] != "") array_splice($_SESSION['basket'],FindBasket($_POST['removeItem']),1); //remove product from basket echo "<b>Total Cost:</b> $".TotalCost()."<br />"; //show total cost foreach ($_SESSION['basket'] as $value) //render product in basket BasketProductRender(FindProduct($value)); ?> <br/> <input type="hidden" id="addItem" name = "addItem" value = "" /> <input type="hidden" id="removeItem" name = "removeItem" value = "" /> </content> <loading image="<?php echo $KoolControlsFolder ?>/KoolAjax/loading/5.gif" /> </updatepanel> <?php echo KoolScripting::End();?> </div> <br style="clear:both" /> </div>
<h3>My Basket</h3><br /> <?php echo KoolScripting::Start(); ?> <updatepanel id="basket"> <content> <?php if (isset($_POST['addItem']) && $_POST['addItem'] != "") { $_SESSION['basket'][] = $_POST['addItem']; } //add product to basket if (isset($_POST['removeItem']) && $_POST['removeItem'] != "") { array_splice($_SESSION['basket'], FindBasket($_POST['removeItem']), 1); } //remove product from basket echo "<b>Total Cost:</b> \$" . TotalCost() . "<br />"; //show total cost foreach ($_SESSION['basket'] as $value) { //render product in basket BasketProductRender(FindProduct($value)); } ?> <br/> <input type="hidden" id="addItem" name = "addItem" value = "" /> <input type="hidden" id="removeItem" name = "removeItem" value = "" /> </content> <loading image="<?php echo $KoolControlsFolder; ?> /KoolAjax/loading/5.gif" /> </updatepanel>
$separator_count = $separator_count + $separator; $unit_scale = $unit_scale + $unit; } $unit_scale_print = "£" . number_format($unit_scale); $pdf->Cell(0, 3, $unit_scale_print, 0, 1); $pdf->SetDrawColor(0, 0, 0); $pdf->SetTextColor(0, 0, 0); $pdf->SetY($current_y); $pdf->SetFont($format_font, '', 9); $pdf->Cell(0, 5, $proj_title, 0, 1, L, 0, $proj_link); $pdf->SetFont($format_font, '', 6); $pdf->SetX(10); $pdf->Cell(0, 6, '', 0, 1); SetBar2("no"); // Insert a line showing the PROJECT TOTAL if this is a new project we're about to start TotalCost($proj_id, $bar_scale, $bar_width_standard); // Now a bar which shows the unassigned work $sql_cost_unassigned = " SELECT SUM(ts_cost_factored) FROM intranet_timesheet WHERE `ts_stage_fee` = 0 AND `ts_project`= {$proj_id}"; $result_cost_unassigned = mysql_query($sql_cost_unassigned, $conn) or die(mysql_error()); $array_cost_unassigned = mysql_fetch_array($result_cost_unassigned); $cost_unassigned = $array_cost_unassigned['SUM(ts_cost_factored)']; $project_cost_total = $project_cost_total + $cost_unassigned; // if ($cost_unassigned = 0) { $cost_unassigned = $effectively_zero; } if ($cost_unassigned > 0) { $bar_width = $cost_unassigned / $bar_scale * $bar_width_standard; $pdf->SetTextColor(150, 150, 150); $cost_unassigned = str_replace("£", "£", MoneyFormat($cost_unassigned)) . " [Unassigned]"; $pdf->SetFont($format_font, '', 6); $pdf->Cell(0, 0.5, '', 0, 1); $pdf->Cell(13, 4, '', 0, 0); SetBarPurple();