Пример #1
0
 /**
  * @param null $start
  */
 protected function updateAlarm($start = null)
 {
     if (is_null($start)) {
         $start = $this->getNewDateTime();
     }
     if ((double) $this->stop->format('U.u') >= $start->format('U.u')) {
         $this->setAlarm($this->getNewDateTime($this->interval));
     } else {
         $this->finished();
     }
 }
Пример #2
0
 /**
  * return formatted date
  *
  * @author Kjell-Inge Gustafsson, kigkonsult <*****@*****.**>
  * @since 2.21.7 - 2015-03-07
  * @param string $format
  * @uses iCaldateTime::$dateFormat
  * @return string
  */
 public function format($format = null)
 {
     if (empty($format) && isset($this->dateFormat)) {
         $format = $this->dateFormat;
     }
     return parent::format($format);
 }
Пример #3
0
function PO_NO_generate($type_po, $datePO, $grandtot, $conn)
{
    $newDatePO = new dateTime($datePO);
    $kdAwal = $newDatePO->format('md-');
    $kdAwal_thn = $newDatePO->format('y');
    $grandtot = floatval($grandtot);
    // }
    if ($type_po == 'NONVAT') {
        $emptyPOSQL = "SELECT MIN(PO_NO) FROM MST_PO WHERE PO_NO LIKE '{$kdAwal}%' AND PO_STAT = 'INACT' AND PO_TYPE='{$type_po}' " . "AND TO_NUMBER(SUBSTR(PO_NO,6,2)) > 50 AND TO_NUMBER(SUBSTR(PO_NO,6,2)) <= 70 AND SUBSTR(PO_NO,(length(PO_NO)-1),2) = '" . $kdAwal_thn . "' ";
        $cekPOIdSql = "SELECT MAX(PO_NO) FROM MST_PO WHERE PO_NO LIKE '{$kdAwal}%' AND PO_STAT = 'ACT' AND PO_TYPE='{$type_po}' " . "AND TO_NUMBER(SUBSTR(PO_NO,6,2)) > 50 AND TO_NUMBER(SUBSTR(PO_NO,6,2)) <= 70 AND SUBSTR(PO_NO,(length(PO_NO)-1),2) = '" . $kdAwal_thn . "' ";
        if ($grandtot > 3000000) {
            $emptyPOSQL = "SELECT MIN(PO_NO) FROM MST_PO WHERE PO_NO LIKE '{$kdAwal}%' AND PO_STAT = 'INACT' AND PO_TYPE='{$type_po}' " . "AND TO_NUMBER(SUBSTR(PO_NO,6,2)) > 70 AND SUBSTR(PO_NO,(length(PO_NO)-1),2) = '" . $kdAwal_thn . "' ";
            $cekPOIdSql = "SELECT MAX(PO_NO) FROM MST_PO WHERE PO_NO LIKE '{$kdAwal}%' AND PO_STAT = 'ACT' AND PO_TYPE='{$type_po}' " . "AND TO_NUMBER(SUBSTR(PO_NO,6,2)) > 70 AND SUBSTR(PO_NO,(length(PO_NO)-1),2) = '" . $kdAwal_thn . "' ";
        }
    } else {
        $emptyPOSQL = "SELECT MIN(PO_NO) FROM MST_PO WHERE PO_NO LIKE '{$kdAwal}%' AND PO_STAT = 'INACT' AND PO_TYPE='{$type_po}' " . "AND TO_NUMBER(SUBSTR(PO_NO,6,2)) <= 50 AND SUBSTR(PO_NO,(length(PO_NO)-1),2) = '" . $kdAwal_thn . "' ";
        $cekPOIdSql = "SELECT MAX(PO_NO) FROM MST_PO WHERE PO_NO LIKE '{$kdAwal}%' AND PO_STAT = 'ACT' AND PO_TYPE='{$type_po}' " . "AND TO_NUMBER(SUBSTR(PO_NO,6,2)) <= 50 AND SUBSTR(PO_NO,(length(PO_NO)-1),2) = '" . $kdAwal_thn . "' ";
    }
    $emptyPO = SingleQryFld($emptyPOSQL, $conn);
    if ($emptyPO != "") {
        return $emptyPO;
    } else {
        //     echo "$cekPOIdSql<br>";
        $cekPOIdParse = oci_parse($conn, $cekPOIdSql);
        //oci_bind_by_name($cekPOIdParse, ":PONOMAX", $poNo);
        oci_execute($cekPOIdParse);
        $cekPOId = oci_fetch_array($cekPOIdParse)[0];
        // echo "$cekPOId - $type_po";
        if ($cekPOId == "" and $type_po == "VAT") {
            $num = 1;
            $num = str_pad($num, 2, "0", STR_PAD_LEFT);
        } elseif ($cekPOId == "" and $type_po == "NONVAT") {
            if ($grandtot > 3000000) {
                $num = 71;
            } else {
                $num = 51;
            }
        } else {
            $num = substr($cekPOId, 5);
            $num = substr($num, 0, -7);
            $num++;
            $num = str_pad($num, 2, "0", STR_PAD_LEFT);
        }
        //echo "$num";
        return $kdAwal . $num . '/WEN/' . $kdAwal_thn;
    }
}
Пример #4
0
 public function init()
 {
     $this->getHeader("date")->getCell()->addDecorator("callable", array("callable" => function ($context, $record) {
         $date = new \dateTime($record['date']);
         return "<a class='' href='" . $this->url()->fromRoute('front-raid-detail', array('key' => $this->get_key(), 'idRaid' => $record['idRaid'])) . "'><div style='height:100%;width:100%'> " . "{$date->format(' d/m/Y à h:i:s')}" . "</div></a>";
     }));
     $this->getHeader("note")->getCell()->addDecorator("callable", array("callable" => function ($context, $record) {
         //<a href=" $this->url('front-raid-detail', array('key' => $key, 'idRaid' => $aRaid['idRaid']));"><?php $this->escapeHtml($aRaid['note']); </a>
         return "<a class='' href='" . $this->url()->fromRoute('front-raid-detail', array('key' => $this->get_key(), 'idRaid' => $record['idRaid'])) . "'><div style='height:100%;width:100%'> " . "{$record['note']}" . "</div></a>";
     }));
 }
 public function index()
 {
     $this->language->load('payment/openpay_cards');
     $data['action'] = $this->url->link('payment/openpay_cards/confirm', '', 'SSL');
     $data['text_credit_card'] = $this->language->get('text_credit_card');
     $data['text_wait'] = $this->language->get('text_wait');
     $data['help_cvc_front'] = $this->language->get('help_cvc_front');
     $data['help_cvc_back'] = $this->language->get('help_cvc_back');
     $data['entry_cc_owner'] = $this->language->get('entry_cc_owner');
     $data['entry_cc_number'] = $this->language->get('entry_cc_number');
     $data['entry_cc_expire_date'] = $this->language->get('entry_cc_expire_date');
     $data['entry_cc_cvv2'] = $this->language->get('entry_cc_cvv2');
     $data['error_error'] = $this->language->get('error_error');
     $data['text_success_payment'] = $this->language->get('text_success_payment');
     $data['button_confirm'] = $this->language->get('button_confirm');
     $data['button_back'] = $this->language->get('button_back');
     $data['merchant_id'] = $this->getMerchantId();
     $data['public_key'] = $this->getPublicApiKey();
     $data['test_mode'] = $this->isTestMode();
     $data['months'] = array();
     $now = new dateTime('2000-01-01');
     for ($i = $now->format('n'), $interval = new DateInterval('P1M'); $i <= 12; $i++, $now->add($interval)) {
         $data['months'][] = array('text' => $now->format('m'), 'value' => $now->format('m'));
     }
     $data['year_expire'] = array();
     $now = new dateTime();
     for ($i = $now->format('y'), $interval = new DateInterval('P1Y'), $stop = $i + 10; $i <= $stop; $i++, $now->add($interval)) {
         $data['year_expire'][] = array('text' => $now->format('y'), 'value' => $now->format('y'));
     }
     if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/payment/openpay_cards.tpl')) {
         $this->template = $this->config->get('config_template') . '/template/payment/openpay_cards.tpl';
     } else {
         $this->template = 'default/template/payment/openpay_cards.tpl';
     }
     return $this->load->view($this->template, $data);
 }
Пример #6
0
 /**
  * Renvoi vrai ou faux selon que l'établissement est ouvert à date (jour) indiquée
  *
  * @param      dateTime $dt
  * @return boolean false/true
  */
 public static function isJourneeOuverte($dt)
 {
     $jour_semaine = EdtHelper::$semaine_declaration[$dt->format("w")];
     $horaire_tab = EdtHorairesEtablissementPeer::retrieveAllEdtHorairesEtablissementArrayCopy();
     if (!isset($horaire_tab[$jour_semaine])) {
         //etab fermé
         return false;
     }
     //est-ce une période ouverte
     $edt_periode_courante = EdtCalendrierPeriodePeer::retrieveEdtCalendrierPeriodeActuelle($dt);
     if ($edt_periode_courante != null && ($edt_periode_courante->getEtabfermeCalendrier() == 0 || $edt_periode_courante->getEtabvacancesCalendrier() == 1)) {
         //etab fermé
         return false;
     }
     return true;
 }
Пример #7
0
 /**
  * * inserts this Notification into mySQL
  *
  * @param PDO $pdo pointer to PDO connection, by reference
  * @throws PDOException when mySQL related errors occur
  **/
 public function insert(PDO &$pdo)
 {
     // enforce the notificationId is null (i.e., don't insert a notification that already exists)
     if ($this->notificationId !== null) {
         throw new PDOException("not a new notification");
     }
     // create query template
     $query = "INSERT INTO notification(notificationId, alertId, emailStatus, notificationDateTime, notificationHandle, notificationContent)VALUES(:notificationId, :alertId, :emailStatus, :notificationDateTime, :notificationHandle, :notificationContent)";
     $statement = $pdo->prepare($query);
     // bind the member variables to the place holders in the template
     $formattedDate = $this->notificationDateTime->format("Y-m-d H:i:s");
     $parameters = array("notificationId" => $this->notificationId, "alertId" => $this->alertId, "emailStatus" => $this->emailStatus, "notificationDateTime" => $formattedDate, "notificationHandle" => $this->notificationHandle, "notificationContent" => $this->notificationContent);
     $statement->execute($parameters);
     // update the null notificationId with what mySQL just gave us
     $this->notificationId = intval($pdo->lastInsertId());
 }
Пример #8
0
 function get_chart()
 {
     $tanggal = array();
     $num_data = array();
     for ($i = 7; $i > 0; $i--) {
         $d = new dateTime("{$i} days ago");
         $tanggal[] = $d->format('d M');
         $num_data_po[] = getAll('purchase_order', array('created_on' => 'where/' . $d->format('Y-m-d')))->num_rows();
         $num_data_so[] = getAll('sales_order', array('created_on' => 'where/' . $d->format('Y-m-d')))->num_rows();
         $num_data_penerimaan[] = getAll('stok_penerimaan', array('created_on' => 'where/' . $d->format('Y-m-d')))->num_rows();
         $num_data_pengeluaran[] = getAll('stok_pengeluaran', array('created_on' => 'where/' . $d->format('Y-m-d')))->num_rows();
         $num_data_pembelian[] = getAll('pembelian', array('created_on' => 'where/' . $d->format('Y-m-d')))->num_rows();
         $num_data_penjualan[] = getAll('penjualan', array('created_on' => 'where/' . $d->format('Y-m-d')))->num_rows();
     }
     echo json_encode(array('tanggal' => $tanggal, 'num_data_po' => $num_data_po, 'num_data_pembelian' => $num_data_pembelian, 'num_data_so' => $num_data_so, 'num_data_penjualan' => $num_data_penjualan, 'num_data_penerimaan' => $num_data_penerimaan, 'num_data_pengeluaran' => $num_data_pengeluaran));
 }
Пример #9
0
	/**
	 * Filtre la requete sur les saisies qui chevauchent une plage de temps
	 *
	 * @param     dateTime $dt_debut
	 * @param     dateTime $dt_fin
	 *
	 * @return    AbsenceEleveSaisieQuery The current query, for fluid interface
	 */
        public function filterByPlageTemps($dt_debut = null, $dt_fin = null)
        {
	    if ($dt_debut != null && $dt_fin != null && $dt_debut->format('U') == $dt_fin->format('U')) {
		//on a pas une plage de temps mais deux fois le meme moment
		//on va renvoyer aussi les saisies qui debutent a ce momement
		$this->filterByFinAbs($dt_debut, Criteria::GREATER_THAN);
		$this->filterByDebutAbs($dt_fin, Criteria::LESS_EQUAL);
		return $this;
	    } else {
		if ($dt_debut != null) {
		    $this->filterByFinAbs($dt_debut, Criteria::GREATER_THAN);
		}
		if ($dt_fin != null) {
		    $this->filterByDebutAbs($dt_fin, Criteria::LESS_THAN);
		}
		return $this;
	    }
	    return $this;
        }
Пример #10
0
/**
* Utility function Compares two DateTime object, 
* Returns +1 if the first date is after, -1 if its before or 0 if they're the same
* Note: does not compare *times*. 
* Used to filter occurrances with udiff
*
* @access private
*  @ignore
* @since 1.0.0
* @see _eventorganiser_compare_datetime
*
* @param dateTime $date1 The first date to compare
* @param dateTime $date2 The second date to compare
* @return int 1 | 0 | -1
*/
function _eventorganiser_compare_dates($date1, $date2)
{
    //Don't wish to compare times
    if ($date1->format('Ymd') == $date2->format('Ymd')) {
        return 0;
    }
    return $date1 > $date2 ? 1 : -1;
}
            window.close();">
              <?php 
if ($_GET['type'] == "FABR" or $_GET['type'] == "FABR_REV") {
    ?>
            <table align="center" class="table-condensed table-bordered" cellspacing="0" cellpadding="0">
                <thead>
                    <tr class="hder">
                        <th colspan="3" style="text-align:left;"><img src="../../images/logo.jpg" height="45"></th>
                        <th colspan="9" style="font-size: 11px;"><b>LAPORAN HARIAN FABRIKASI <?php 
    if ($_GET['type'] == "FABR_REV") {
        echo "REVISI";
    }
    ?>
</b></th>
                        <th colspan="10"><b>TANGGAL DRAWING TURUN</b><br><b style="font-size: 11px;"><?php 
    echo $dt1->format('d-F-Y');
    ?>
</b></th>
                    </tr>
                    <tr>
                        <th colspan="12"><b>PROJECT : <?php 
    echo $PROJ_DESC;
    ?>
</b></th>
                        <th colspan="10"><b>CLIENT : <?php 
    echo $CLIENT_NAME;
    ?>
</b></th>
                    </tr>
                    <tr>
                        <th colspan="12"><b>JOB NO : <?php 
Пример #12
0
<?php

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * 
 * @package: tutoriales2014/fechas_dinamicas_datepicker/
 * @author: Luis Fernando Cázares <*****@*****.**>
 * @version Id: index.php 2014-07-01 23:00 _CazaresLuis_ ;
 * 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
session_name('tutorialesCazares2014');
session_start();
$root = '../';
// Incluimos la inicialización de la clase twig
include $root . 'includes/templateEngine.inc.php';
// creamos fechas inicial y final
$fechaInicio = new dateTime('NOW');
$fechaFinal = new dateTime('NOW +1 days');
// Realizamos el display de la plantilla
$twig->display('fechas_dinamicas_datepicker/layout.html', array("root" => $root, "fechaInicio" => $fechaInicio->format('d-m-Y'), "fechaFinal" => $fechaFinal->format('d-m-Y'), "title" => "Tutoriales cazaresluis.com", "footer" => 'cazaresluis.com | luis.f.cazares@gmail.com | Celular: 55 22 71 46 89 | <a href="http://www.cazaresluis.com" target="_blank">Blog</a> | <a href="https://www.youtube.com/user/luisfcazares/" target="_blank">Youtube Channel</a> | <a href="https://twitter.com/cazaresluis" target="_blank">Twitter</a> | <a href="https://plus.google.com/u/0/+LuisFernandoCázaresBulbarela/" target="_blank">Google +</a>'));
Пример #13
0
			<div class="col-md-9">
				<div class="horario table-responsive">
					<table class="table table-condensed table-bordered salida">
						<tr>
							<th>Nombre</th>
							<th>Hora de entrada</th>
							<th>Hora de salida</th>
							<th>Tiempo</th>
							<th>Hora de entrada</th>
							<th>Hora de salida</th>
							<th>Tiempo</th>
						</tr>
						<?php 
$dateTime = new dateTime("tomorrow");
$hoy = date("Y-m-d");
$tomorrow = $dateTime->format("Y-m-d");
include 'conexion.php';
$datos = "select idpersonal,nombre,apellidos,dia_entrada,hora_entrada,dia_salida,hora_salida,tiempo,despues_entrada,despues_salida,despues_tiempo from horario,personal where dia_entrada = '{$hoy}' and personal.idpersonal = horario.personal_idpersonal and (hora_salida or despues_salida) is not null order by hora_salida desc";
$horario = mysql_query($datos, $conexion) or die(mysql_error());
$totEmp = mysql_num_rows($horario);
while ($rows = mysql_fetch_assoc($horario)) {
    echo "<tr>";
    $nombre = $rows['nombre'] . " " . $rows['apellidos'];
    echo "<td>" . $nombre . "</td>";
    $hora_entrada = $rows['hora_entrada'];
    echo "<td>" . $hora_entrada . "</td>";
    $hora_salida = $rows['hora_salida'];
    echo "<td>" . $hora_salida . "</td>";
    $tiempo = $rows['tiempo'];
    echo "<td>" . $tiempo . "</td>";
    $hora_entrada = $rows['despues_entrada'];
Пример #14
0
        $_POST['tday'] = '28';
    }
    if (($_POST['tmonth'] == '04' or $_POST['tmonth'] == '06' or $_POST['tmonth'] == '09' or $_POST['tmonth'] == '11') and $_POST['tday'] == '31') {
        $_POST['tday'] = '30';
    }
    $end_date = new dateTime($_POST['tyear'] . $_POST['tmonth'] . $_POST['tday'] . $_POST['ttime'], $target_timezone);
    $end_date->setTimezone($UK_time);
    if ($_POST['timezone'] < 0) {
        $start_date->modify("+" . abs($_POST['timezone']) . " hour");
        $end_date->modify("+" . abs($_POST['timezone']) . " hour");
    } elseif ($_POST['timezone'] > 0) {
        $start_date->modify("-" . $_POST['timezone'] . " hour");
        $end_date->modify("-" . $_POST['timezone'] . " hour");
    }
    $tmp_start_date = $start_date->format("YmdHis");
    $tmp_end_date = $end_date->format("YmdHis");
    $timezone = $_POST['timezone'];
}
// Process the posted modules
$modules = array();
$first = true;
for ($i = 0; $i < $_POST['module_no']; $i++) {
    if (isset($_POST['mod' . $i])) {
        $module_code = module_utils::get_moduleid_from_id($_POST['mod' . $i], $mysqli);
        if ($first == true) {
            $first_module = $_POST['mod' . $i];
            $first = false;
        }
        $modules[$_POST['mod' . $i]] = $module_code;
    }
}
Пример #15
0
             $_POST['tday'] = '29';
         }
         if ($leap == false and $_POST['tmonth'] == '02' and ($_POST['tday'] == '29' or $_POST['tday'] == '30' or $_POST['tday'] == '31')) {
             $_POST['tday'] = '28';
         }
         if (($_POST['tmonth'] == '04' or $_POST['tmonth'] == '06' or $_POST['tmonth'] == '09' or $_POST['tmonth'] == '11') and $_POST['tday'] == '31') {
             $_POST['tday'] = '30';
         }
         $end_date = new dateTime($_POST['tyear'] . $_POST['tmonth'] . $_POST['tday'] . $_POST['thour'] . $_POST['tminute'], $target_timezone);
         $end_date->setTimezone($local_time);
         if ($_POST['timezone'] < 0) {
             $end_date->modify("+" . abs($_POST['timezone']) . " hour");
         } elseif ($_POST['timezone'] > 0) {
             $end_date->modify("-" . $_POST['timezone'] . " hour");
         }
         $properties->set_end_date($end_date->format('U'));
         $properties->set_raw_end_date($end_date->format('YmdHis'));
     }
 }
 $properties->set_timezone($_POST['timezone']);
 if (isset($_POST['calendar_year'])) {
     $calendar_year = $_POST['calendar_year'] == '' ? NULL : $_POST['calendar_year'];
     $properties->set_calendar_year($calendar_year);
 }
 if (isset($_POST['exam_duration_hours']) or isset($_POST['exam_duration_mins'])) {
     $exam_duration = 0;
     if (isset($_POST['exam_duration_hours'])) {
         $exam_duration += $_POST['exam_duration_hours'] * 60;
     }
     if (isset($_POST['exam_duration_mins'])) {
         $exam_duration += $_POST['exam_duration_mins'];
Пример #16
0
 /**
  * Save data to XML File
  *
  * @param DateTime $date
  * @param string   $lang
  * @param string   $data
  *
  * @return bool
  * @throws BnmException
  */
 protected function save(dateTime $date, $lang, $data)
 {
     if (!$this->cacheDir) {
         return false;
     }
     $dir = $this->getCacheDirWithLang($lang);
     $file = $dir . '/' . $date->format('Y-m-d') . '.xml';
     if (!is_dir($dir)) {
         if (!mkdir($dir, 0755, true)) {
             throw new BnmException(sprintf('Can not create cache directory %s', $dir));
         }
     }
     if (false === file_put_contents($file, $data, LOCK_EX)) {
         throw new BnmException('Error saving data');
     }
     return true;
 }
Пример #17
0
 public function payroll($year = null, $month = null)
 {
     if ($year == null) {
         $year = date('Y');
     }
     if ($month == null) {
         $month = date('m');
     }
     $this->view->year = $year;
     $date = new DateTime();
     $date->setDate($year, $month, 26);
     $date->setTime(0, 0, 0);
     $this->view->date = $date->format("F Y");
     $date->modify('+1 year');
     $this->view->nextYear = $date->format('Y');
     $date->modify('-2 year');
     $this->view->previousYear = $date->format('Y');
     $this->view->month = $date->format('m');
     $date->modify('-1 month');
     $this->view->previousMonth = $date->format('m');
     $date->modify('+2 month');
     $this->view->nextMonth = $date->format('m');
     $date2 = new DateTime();
     $date2->setDate($year, $month, 25);
     $date2->setTime(24, 0, 0);
     $interval = date_diff($date, $date2);
     $this->view->span = $interval->days;
     $reports = new reportModel($year, $month);
     $this->view->report = $reports->payroll($year, $month);
     $this->view->startDate = $date->format("F jS Y");
     $days = $interval->days - 1;
     $date->modify("+{$days} days");
     $this->view->endDate = $date->format("F jS Y");
     $date = new dateTime();
     $date->setDate($year, $month, 25);
     $this->view->currentDate = $date->format('Y-m-d');
     $this->view->previousDate = $date->modify('-1 month +1 day')->format('Y-m-d');
     $codes = new codeModel();
     $this->view->codes = $codes->allCodes();
 }
Пример #18
0
        $containerName = mysql_result($contNames, 0, "Name");
        if (!($quantity == 1)) {
            $bc = $containerName . "s";
        } else {
            $bc = $containerName;
        }
        $dateOfInsertion = new dateTime();
        $dateOfInsertion->setTimestamp(strtotime($timestamp));
        echo "<tr style='vertical-align:top;text-align:center;height:1em;margin-right:auto;margin-left:auto;background-color:";
        if ($productCounter % 2) {
            echo "#b3d9ff";
        } else {
            echo "white";
        }
        //every even row is this color
        echo "'>\r\n\t\t\t\t\t<td>" . $dateOfInsertion->format('d M Y') . "</td>\r\n\t\t\t\t\t<td>" . $productName . "</td>\r\n\t\t\t\t\t<td>" . $quantity . " " . $bc . "(" . $volume . "oz)</td>\r\n\t\t\t\t\t<td>" . $quantity * $volume . " oz</td>\r\n\t\t\t\t\t<td>" . $abv . "%</td>\r\n\t\t\t\t\t<td>\$" . $price . "</td>\r\n\t\t\t\t\t<td>\$" . number_format($price / ($quantity * $volume), 3) . "</td>\r\n\t\t\t\t\t<td>\$" . number_format($price / ($abv / 100 * ($quantity * $volume)), 3) . "</td>\r\n\t\t\t\t\t</tr>";
    } elseif (mysql_num_rows($proNameQuery) == 0) {
    }
    //a price in this town belongs to a product that does not match the search results. no big deal.
}
echo "</tbody></table>";
//insert the failed search result method after the price table
if (isset($_GET['search']) && $productCounter == 0) {
    //there were no search results returned
    if ($_GET['search'] == "") {
        echo "<h1 style='color:blue'>No Prices for " . $storeName . "</h1>";
    } else {
        echo "<h1 style='color:red'>No Result for Search: '" . $_GET['search'] . "'</h1>";
    }
}
echo "</center></form>\r\n\t\t</div>\r\n\t\t</div>\r\n\t\t</article>\t\t\t\t\t\t\t\t\r\n\t\t</main>";