?> <span class="btn-group pull-right"> <a class="btn" onClick="order(<?php echo $product->id; ?> , '<?php echo ucfirst($product->name); ?> ', <?php echo $product->qty; ?> , <?php echo $product->type; ?> , <?php echo getSupplierID($product->sid); ?> )"><i class="icon-file"></i> Request</a> </span> <?php } ?> </td> </tr> <?php } ?> </tbody> </table> </form> <div class="modal hide fade" id="order">
function processFile($path) { $content = file_get_contents($path); $lines = explode("\n", $content); $header = explode(VALUE_SEPARATOR, $lines[0]); //for($i = 0; $i < count($header); $i++) // echo $header[$i] . "<br>"; //echo $content; for ($i = 1; $i < count($lines); $i++) { $oneLine = explode(VALUE_SEPARATOR, addslashes($lines[$i])); $supplierID = getSupplierID($oneLine[0]); $categoryID = getCategoryID($oneLine[1]); $producyTypeID = getProductTypeID($oneLine[2]); $producyID = getProduct($supplierID, $categoryID, $producyTypeID, $oneLine[3], $oneLine[4], $oneLine[5], $oneLine[6]); /* echo "$oneLine[0] ($supplierID)<br>"; echo "$oneLine[1] ($categoryID)<br>"; echo "$oneLine[2] ($producyTypeID)<br>"; echo "$oneLine[3] ($producyID)<br>"; */ } echo "<hr>\n\n"; }