//TODO: make sure to is not before from - can be jquery validation $where = "xdate between '" . $date_from . "' AND '" . $date_to . "'"; //header("Location: http://localhost/var/etl/bin/categories/tool/assign1.html"); //echo "submitted."; $data = $oInvoiceList->getData($where, $groupby, $orderby); $errors = $oInvoiceList->getErrors(); if (!empty($errors)) { // deal with error message(s) } } if ($_GET) { echo "yo mama: " . $_GET['po']; $where = "xourpo = '" . $_GET['po'] . "'"; $groupby = ""; $data = NULL; $data = $oInvoiceParts->getData($where, $groupby, $orderby); $errors = $oInvoiceParts->getErrors(); if (!empty($errors)) { // deal with error message(s) } } echo $where; echo "<html><head>"; echo '<link type="text/css" href="../includes/jquery-ui-1.8.19.custom/css/smoothness/jquery-ui-1.8.19.custom.css" rel="Stylesheet" />'; echo '<script type="text/javascript" src="../includes/jquery-ui-1.8.19.custom/js/jquery-1.7.2.min.js"></script>'; echo '<script type="text/javascript" src="../includes/jquery-ui-1.8.19.custom/js/jquery-ui-1.8.19.custom.min.js"></script>'; echo '<script type="text/javascript" src="../report.js"></script>'; echo "</head><body style='font-family: Arial, sans-serif; font-size: 12px;'>"; echo '<div><form id="form1" method="post" action="report_test_o.php">'; echo '<div id="select-date">'; echo '<label for="date-from">Date from: </label><input id="date-from" name="date-from" type="text" value="" />';
error_reporting(E_ALL); require_once 'std.table.class.inc'; require_once 'db.inc'; require_once 'error.inc'; include 'PaInvoice.class.inc'; $dbobject = new PaInvoice(); // if $where is null then all rows will be retrieved //$where = "column='value'"; $where = ""; // user may specify a particular page to be displayed /* if (isset($_GET['pageno'])) { $dbobject->setPageno($_GET['pageno']); } // if */ $data = $dbobject->getData($where); $errors = $dbobject->getErrors(); if (!empty($errors)) { // deal with error message(s) } // if foreach ($data as $row) { var_dump($row); //echo array_keys($data); foreach ($row as $field => $value) { //var_dump($value); //var_dump($field); } // foreach } // foreach
<?php //Error reporting ini_set('display_errors', 1); error_reporting(E_ALL); //load Mage require_once "/var/www/html/magento/app/Mage.php"; Mage::app(); $config_info = parse_ini_file('/var/www/html/magento/paGateway/paGateway.ini', true); require_once 'classes/std.table.class.inc'; require_once 'classes/db.inc'; require_once 'classes/error.inc'; include 'classes/PaInvoice.class.inc'; $dbobject = new PaInvoice(); $data = $dbobject->getData($where, $orderby); $errors = $dbobject->getErrors(); if (!empty($errors)) { // deal with error message(s) }