function googleDirections_ver_ok($googleDirections_ver) { if (!isset($googleDirections_ver) || $googleDirections_ver < '010712') { // version 1.7.12 error_msg2('googleDirections.php', 'latest version of googleDirections plugin', 'googleDirections_tohere'); return 0; } else { return 1; } }
if (isset($_GET['imei']) && isset($_GET['qty'])) { $imei = $_GET['imei']; $qty = $_GET['qty']; $sql .= " and imei = '{$imei}'"; } else { if (isset($_GET['phone_no'])) { $phoneNo = $_GET['phone_no']; $sql .= " and ph.phone_no = '{$phoneNo}'"; } } $sql .= " group by ph.phone_no"; $result = $db->query($sql); if ($result) { while ($row = $db->fetch_array($result)) { if ($row['phoneState_no'] == 2) { die(error_msg2()); } if ($_GET['osarea'] == 0) { $price = $row['sprice']; } else { if ($_GET['osarea'] == 1) { $price = $row['oprice']; } } $imei = $row['imei']; $phoneName = $row['manufacturer'] . " " . $row['phone_name'] . " (" . $row['color'] . ")"; $total = $price * $qty; $discount = 0; $output_to_table = '<tr><td>' . $imei . '</td>' . '<td>' . $phoneName . '</td>' . '<td>' . $price . '</td>' . '<td>' . $qty . '</td>' . '<td>' . $discount . '</td>' . '<td>' . round($total, 1) . '</td>' . '</tr>'; } // end while