$current = $i == $page ? ' class="active"' : ''; echo '<li' . $current . '><a href="' . $newurl . '&p=' . $i . '">' . $i . '</a></li>'; } ?> </ul> </nav> </div> <div class="row"> <div class="col-md-3"> <div style="display: block; width: 100%; overflow: hidden;"> <h4>Marques</h4> <div class="list-group"> <?php $newurl = $url . $toaddurl['capacity'] . $toaddurl['color']; foreach (Brand::getBrandList() as $brand) { $active = $sort['brand'] == strtolower($brand->name) ? ' active' : ''; echo '<a href="' . $newurl . '&brand=' . strtolower($brand->name) . '" class="list-group-item' . $active . '">' . $brand->name . '</a>'; } ?> </div> </div> <div style="display: block; width: 100%; overflow: hidden;"> <h4>Couleur</h4> <ul style="list-style: none; margin: 0; padding: 0; width: 195px;"> <?php $newurl = $url . $toaddurl['brand'] . $toaddurl['capacity']; foreach (Color::getColorList() as $color) { $unactive = $sort['color'] != $color->id ? ' class="unactive"' : ''; echo '<li style="float: left; margin: 0 0 10px 10px;"><a href="' . $newurl . '&color=' . strtolower($color->id) . '" ' . $unactive . 'style="background: ' . $color->hex . '; border: 1px solid #ededed; display: inline-block; width: 30px; height: 30px; border-radius: 30px;" title="' . $color->name . '"></a></li>'; }
} if (isset($_GET['onlyapproved'])) { $supp->setValue('onlyapproved', $_GET['onlyapproved']); } if (isset($_GET['class'])) { $class = 'class="required"'; } else { $class = ''; } $supp->createSupplierList(); $sel = new selectlist('Supplier_ID', $supp->getSupplierList(), 'Select Supplier', 'Supplier_ID', 'Supplier_Name', $class, ''); break; case 'brand': $brand = new Brand(); $brand->createBrandList(); $sel = new selectlist('Brand_ID', $brand->getBrandList(), 'Select Brand', 'Brand_ID', 'Brand_Description', '', ''); break; case 'ttype': $ttype = new TType(); $ttype->createTypeList(); if (isset($_GET['ttypeid'])) { $sid = $_GET['ttypeid']; } else { $sid = ''; } $sel = new selectlist('Tool_Type_ID', $ttype->getTypeList(), 'Select Tool Type', 'Tool_Type_ID', 'Tool_Type', '', $sid); break; case 'tbodytype': $tbodytype = new Tbodytype(); $tbodytype->createTypeList(); if (isset($_GET['tbodytypeid'])) {
function showToolBodyUI() { if ($this->toolbodyid == '') { echo <<<_END \t\t\t<fieldset> \t\t\t\t<legend>Tool Body Details</legend> \t\t\t\t<p> \t\t\t\t<label>Tool Body Description</label> \t\t\t\t<input id="tooldesc" name="tooldesc" size="25" required/> \t\t\t\t</p> \t\t\t\t<p> \t\t\t\t<label>Manufacturres's Part NO</label> \t\t\t\t<input id="mfgpartno" name="mfgpartno" size="25" required/> \t\t\t\t</p> \t\t\t\t<p> \t\t\t <label>Cutting Dia/ Holding Dia Max (Dc)</label> \t\t\t <input id="cdiameter" name="cdiameter" size="25" class="number"/> \t\t\t </p> \t\t\t <p> \t\t\t <label>Shank Diameter (Ds)</label> \t\t\t <input id="sdiameter" name="sdiameter" size="25" class="number"/> \t\t\t </p> \t\t\t\t<p> \t\t\t <label>Neck Diameter (Dn)</label> \t\t\t <input id="ndiameter" name="ndiameter" size="25" class="number"/> \t\t\t </p> \t\t\t <p> \t\t\t <label>Neck Length/Reach (NL)</label> \t\t\t <input id="reach" name="reach" size="25" class="number"/> \t\t\t </p> \t\t\t <p> \t\t\t <label>Flute Length (FL)</label> \t\t\t <input id="flutelength" name="flutelength" size="25" class="required number"/> \t\t\t </p> \t\t\t <p> \t\t\t <label>Overall Length (OAL)</label> \t\t\t <input id="tooloal" name="tooloal" size="25" class="number"/> \t\t\t </p> \t\t\t <p> \t\t\t <label>No Of Cutting Edges</label> \t\t\t <input id="noofflutes" name="noofflutes" size="25" class="number"/> \t\t\t </p> _END; if ($this->bodytypeid == 4) { echo <<<_END \t\t\t <p> \t\t\t <label>Max Radial Depth (Tmax)</label> \t\t\t <input id="tmax" name="tmax" size="25" class="number" class="required"/> \t\t\t </p> _END; } echo <<<_END \t\t\t <p> \t\t\t <label>Tool Body Material</label> \t\t\t <input type="text" id="toolmaterial" name="toolmaterial" size="25"/> \t\t\t </p> \t\t\t <p> \t\t\t <label>Tool Remarks</label> \t\t\t <input id="toolremarks" name="toolremarks" size="25"/> \t\t\t </p> \t\t\t <p> \t\t\t <label>Min Stock Qty</label> \t\t\t <input id="minimumstock" name="minimumstock" size="25" class="number"/> \t\t\t </p> \t\t <p> \t\t\t <label>Select Tool Preview Image/File</label> \t\t\t\t<input name="preview[]" type="file" multiple="true"/> \t\t\t\t</p> \t\t\t\t</fieldset> \t\t\t <p> \t\t\t <input class="submit" type="submit" value="Save"/> \t\t\t </p> _END; } else { $db = Database::getInstance(); $cxn = $db->getConnection(); $q = "SELECT * FROM ToolBody WHERE ToolBody_ID={$this->toolbodyid}"; if (!($res = $cxn->query($q))) { echo "error :", $cxn->error; } else { $row = mysqli_fetch_assoc($res); echo <<<_END \t\t\t<fieldset> \t\t\t\t<legend>Tool Body Details</legend> \t\t\t\t<p> \t\t\t\t<label>Select Tool Body</label> _END; $brand = new Brand(); $brand->createBrandList(); $sel = new selectlist('Brand_ID_E', $brand->getBrandList(), 'Select Brand', 'Brand_ID', 'Brand_Description', '', $row['Brand_ID']); echo <<<_END \t\t\t\t<p> \t\t\t\t<label>Tool Body Description</label> \t\t\t\t<input id="tooldesc" name="tooldesc" size="25" required value="{$row['Tool_Desc']}"/> \t\t\t\t</p> \t\t\t\t<p><label>Tool Body ID</label>{$this->toolbodyid}</p> \t\t\t\t<p> \t\t\t\t<label>Manufacturres's Part NO</label> \t\t\t\t<input id="mfgpartno" name="mfgpartno" size="25" required value="{$row['Mfg_Part_NO']}"/> \t\t\t\t</p> \t\t\t\t<p> \t\t\t <label>Cutting Dia / MAx Holding Dia (Dc)</label> \t\t\t <input id="cdiameter" name="cdiameter" size="25" class="number" value="{$row['Cutting_Dia']}"/> \t\t\t </p> \t\t\t <p> \t\t\t <label>Shank Diameter (Ds)</label> \t\t\t <input id="sdiameter" name="sdiameter" size="25" class="number" value="{$row['Shank_Dia']}"/> \t\t\t </p> \t\t\t\t<p> \t\t\t <label>Neck Diameter (Dn)</label> \t\t\t <input id="ndiameter" name="ndiameter" size="25" class="number" value="{$row['Neck_Dia']}"/> \t\t\t </p> \t\t\t <p> \t\t\t <label>Neck Length/Reach (NL)</label> \t\t\t <input id="reach" name="reach" size="25" class="number" value="{$row['Neck_Length']}"/> \t\t\t </p> \t\t\t <p> \t\t\t <label>Flute Length (FL)</label> \t\t\t <input id="flutelength" name="flutelength" size="25" class="required number" value="{$row['Tool_FL']}"/> \t\t\t </p> \t\t\t <p> \t\t\t <p> \t\t\t <label>Overall Length (OAL)</label> \t\t\t <input id="tooloal" name="tooloal" size="25" class="number" value="{$row['Tool_OAL']}"/> \t\t\t </p> \t\t\t <p> \t\t\t <label>No Of Cutting Edges</label> \t\t\t <input id="noofflutes" name="noofflutes" size="25" class="number" value="{$row['No_Of_Edges']}"/> \t\t\t </p> _END; if ($this->bodytypeid == 4) { echo <<<_END \t\t\t <p> \t\t\t <label>Max Radial Depth (Tmax)</label> \t\t\t <input id="tmax" name="tmax" size="25" class="number" class="required" value="{$row['T_Max']}"/> \t\t\t </p> _END; } echo <<<_END \t\t\t <p> \t\t\t <label>Tool Material</label> \t\t\t <input type="text" id="toolmaterial" name="toolmaterial" size="25" value="{$row['Material']}"/> \t\t\t </p> \t\t\t <p> \t\t\t <label>Tool Remarks</label> \t\t\t <input id="toolremarks" name="toolremarks" size="25" value="{$row['Tool_Remarks']}"/> \t\t\t </p> \t\t\t <p> \t\t\t <label>Min Stock Qty</label> \t\t\t <input id="minimumstock" name="minimumstock" size="25" class="number" value="{$row['Min_Stock_Qty']}"/> \t\t\t </p> \t\t <p> \t\t\t <label>Select Tool Preview Image/File</label> \t\t\t\t<input name="preview[]" type="file" multiple="true"/> \t\t\t\t</p> \t\t\t\t</fieldset> \t\t\t <p> \t\t\t <input class="submit" type="submit" value="Save"/> \t\t\t </p> _END; self::listPreviewImage(); } } }