$err = $GLOBALS['db']->errorInfo(); echo '<hr>' . $strsql . '<hr>Error: ' . $err[2]; exit; } if (isset($_REQUEST['lastId'])) { echo $GLOBALS['db']->lastInsertId(); } else { echo $strsql; } exit; } //JGET //********************************************** if (isset($_REQUEST['jGet'])) { jCnn(); echo jGet($_REQUEST['jGet']); exit; } // NUMINVOICE //********************************************** if (isset($_REQUEST['numInvoice'])) { jCnn(); $strsql = "update invoiceSeries set number=number+1 where serie='" . $_REQUEST['serie'] . "'"; $results = $GLOBALS['db']->exec($strsql); $strsql = "select number from invoiceSeries where serie='" . $_REQUEST['serie'] . "'"; $results = $GLOBALS['db']->query($strsql); if ($results) { $results = $results->fetch(); echo $results['number']; } exit;
$strsql = $strsql . " WHERE (date BETWEEN '{$from}' AND '{$to}')"; if ($serie > '-') { $strsql = $strsql . " AND serie='{$serie}'"; } if ($type > '-') { $strsql = $strsql . " AND type='{$type}'"; } if ($idPayType > '-') { $strsql = $strsql . " AND idPayType={$idPayType}"; } if ($valorBuscar > '') { $strsql = $strsql . " AND number>={$valorBuscar}"; } $strsql = $strsql . " ORDER BY date DESC LIMIT 100;"; $strExport = '../../../cgi_bin/phpfun.php?toXls=' . urlencode(base64_encode($strsql)); $tmp = jGet('select idPrint || \',\' || ticket from home limit 1'); list($idPrint, $ticket) = explode(',', $tmp); ?> <html> <head> <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"> <meta content="es" http-equiv="Content-Language"> <link href="../../../cgi_bin/jss/jss.css" rel="stylesheet" type="text/css"> <script src="../../../cgi_bin/jss/jss.js" type="text/javascript"></script> <script src="../../../cgi_bin/jss/jssCalendar.js" type="text/javascript"></script> <base target="_self"> <title>Invoices</title> <script type="text/javascript"> jss.Init=function(){ var strsql='<?php
<?php require '../../phpFun.php'; if (isset($_REQUEST['keyMaster'])) { $keyMaster = $_REQUEST['keyMaster']; } if (isset($_REQUEST['id'])) { $id = $_REQUEST['id']; } if (isset($_REQUEST['table'])) { $table = $_REQUEST['table']; } jCnn(); //------------------------------------------------- //images //------------------------------------------------- $imgFile = file_get_contents('php://input'); $exist = jGet("select idImage from images where keyName='{$keyMaster}' and id={$id} limit 1"); if ($exist) { $strsql = "update [images] set [image]=:img where idImage={$exist}"; $results = $GLOBALS['db']->prepare($strsql); } else { $strsql = "insert into [images] ([tableName], [keyName], [id], [image]) values('{$table}', '{$keyMaster}', {$id}, :img)"; $results = $GLOBALS['db']->prepare($strsql); } $results->bindParam(':img', $imgFile, PDO::PARAM_LOB); $results->execute(); //if (!$results){$err=$GLOBALS['db']->errorInfo(); echo $err[2].'<br>';} //echo $strsql;
require "../../../cgi_bin/phpFun.php"; require "../languages/language.php"; jCnn(); //------------------------------------------------- // Parametros Member //------------------------------------------------- $table = "members"; $keyMaster = "idMember"; $buscaPor = 'surName'; //------------------------------------------------- //el registro quiere ser eliminado //------------------------------------------------- if (isset($_REQUEST["eliminar"])) { $strsql = 'delete from members where idMember=' . $_SESSION['idMember']; $results = $GLOBALS['db']->exec($strsql); $_SESSION['idMember'] = jGet('select idMember from members where idCompany=' . $_SESSION['idCompany'] . ' LIMIT 1'); unset($_REQUEST["eliminar"]); header("Location: " . $_SERVER['PHP_SELF']); exit; } //------------------------------------------------- //recoge el puntero //------------------------------------------------- if (isset($_REQUEST["id"])) { $_SESSION['idMember'] = $_REQUEST["id"]; } if ($_SESSION['idMember'] < '0') { $_SESSION['idMember'] = '0'; } $script = 'putFmt();'; require '../tables/tableImg.php';
jCnn(); //------------------------------------------------- //Logos //------------------------------------------------- if (isset($_REQUEST['logo1'])) { $logo = '1'; } if (isset($_REQUEST['logo2'])) { $logo = '2'; } if (isset($_REQUEST['logo3'])) { $logo = '3'; } if (isset($_FILES["file"])) { $imgFile = file_get_contents($_FILES["file"]["tmp_name"]); $exist = jGet("select id from images where [tableName]='home' and [id]={$logo}"); if ($exist) { $strsql = "update [images] set [image]=:img where id={$exist}"; $results = $GLOBALS['db']->prepare($strsql); } else { $strsql = 'insert into [images] ([tableName], [keyName], [image], [id]) values("home", "images", :img, ' . $logo . ');'; $results = $GLOBALS['db']->prepare($strsql); } $results->bindParam(':img', $imgFile, PDO::PARAM_LOB); $results->execute(); } $strImg1 = '../../../cgi_bin/phpFun.php?getImg=base64&strsql=' . base64_encode('SELECT [image] from [images] WHERE [tableName]=\'home\' and [id] = 1'); $strImg2 = '../../../cgi_bin/phpFun.php?getImg=base64&strsql=' . base64_encode('SELECT [image] from [images] WHERE [tableName]=\'home\' and [id] = 2'); $strImg3 = '../../../cgi_bin/phpFun.php?getImg=base64&strsql=' . base64_encode('SELECT [image] from [images] WHERE [tableName]=\'home\' and [id] = 3'); ?> <html>
<?php //------------------------------------------------- //images //------------------------------------------------- if (isset($_FILES["file"])) { $imgFile = file_get_contents($_FILES["file"]["tmp_name"]); $exist = jGet("select id from images where [tableName]='{$table}' and [id]=" . $_SESSION[$keyMaster]); if ($exist) { $strsql = "update [images] set [image]=:img where id={$exist}"; $results = $GLOBALS['db']->prepare($strsql); } else { $strsql = 'insert into [images] ([tableName], [keyName], [image], [id]) values("' . $table . '", "' . $keyMaster . '", :img, ' . $_SESSION[$keyMaster] . ');'; $results = $GLOBALS['db']->prepare($strsql); } $results->bindParam(':img', $imgFile, PDO::PARAM_LOB); $results->execute(); } //------------------------------------------------- //Salva los Cambios //------------------------------------------------- if (isset($_POST["save"])) { $_SESSION[$keyMaster] = saveForm($table, $keyMaster, $_SESSION[$keyMaster]); } //------------------------------------------------- //Eliminar //------------------------------------------------- if (isset($_REQUEST["eliminar"])) { $strsql = 'delete from ' . $table . ' where ' . $keyMaster . '=' . $_SESSION[$keyMaster]; $results = $GLOBALS['db']->exec($strsql); $strsql = "delete from images where tableName='{$table}' and id=" . $_SESSION[$keyMaster];
/* if ($_FILES["file"]["error"] > 0) { echo "Error: " . $_FILES["file"]["error"] . "<br>"; } else{ echo "Upload: " . $_FILES["file"]["name"] . "<br>"; echo "Type: " . $_FILES["file"]["type"] . "<br>"; echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br>"; echo "Stored in: " . $_FILES["file"]["tmp_name"]; } */ if (isset($_FILES["file"])) { if ($_SESSION['idProduct'] == 0) { $_SESSION['idProduct'] = saveForm('products', 'idProduct', $_SESSION['idProduct']); } $imgFile = file_get_contents($_FILES["file"]["tmp_name"]); $exist = jGet("select id from images where [tableName]='products' and [id]=" . $_SESSION['idProduct']); if ($exist) { $strsql = "update [images] set [image]=:img where id={$exist}"; $results = $GLOBALS['db']->prepare($strsql); } else { $strsql = 'insert into [images] ([tableName], [keyName], [image], [id]) values("products", "idProduct", :img, ' . $_SESSION['idProduct'] . ');'; $results = $GLOBALS['db']->prepare($strsql); } $results->bindParam(':img', $imgFile, PDO::PARAM_LOB); $results->execute(); } else { //------------------------------------------------- //Captura el puntero //------------------------------------------------- if (isset($_REQUEST['idProduct'])) { $_SESSION['idProduct'] = $_REQUEST['idProduct'];
<?php require "../../../cgi_bin/phpFun.php"; require "../languages/language.php"; jCnn(); $id = '0'; if (isset($_REQUEST["id"])) { $id = $_REQUEST["id"]; } $strsql = "select * from [home] limit 1"; $defaults = $GLOBALS['db']->query($strsql); $defaults = $defaults->fetch(); $agent = jGet('select name from agents where idAgent=' . $_SESSION['idAgent']); $client = jGet('select company from companies where idCompany=' . $defaults['idClient']); ?> <html> <head> <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"> <meta content="es" http-equiv="Content-Language"> <title>ticketing</title> <link href="../../../cgi_bin/jss/jss.css" rel="stylesheet" type="text/css"> <script src="../../../cgi_bin/jss/jss.js" type="text/javascript"></script> <script src="../../../cgi_bin/jss/jssCalendar.js" type="text/javascript"></script> <script src="ticket.js" type="text/javascript"></script> <base target="_self"> <script type="text/javascript"> var dataProduct, idFamily=0, vWin, oldValue, oldCellValue; var db='<?php echo $_SESSION["domain"]; ?>
<?php require_once "../../../cgi_bin/phpFun.php"; require_once "../languages/language.php"; jCnn(); //------------------------------------------------- // Captura de Parametros //------------------------------------------------- //on error resume next $valorBuscar = ''; if (isset($_REQUEST["valorBuscar"])) { $valorBuscar = $_REQUEST["valorBuscar"]; } $idModel = jGet('select invoice from home limit 1'); if ($idModel == '-') { $idModel = '0'; } $printInvoice = '../reports/docs/parsec.php?idKey=idInvoice&idModel=' . $idModel . '&id='; if (isset($_POST["serie"])) { $serie = $_POST["serie"]; } else { $serie = '-'; } if (isset($_POST["payType"])) { $payType = $_POST["payType"]; } else { $payType = '-'; } $from = strftime('%Y-%m-%d', strtotime("-1 month")); if (isset($_POST["from"])) { $from = strftime('%Y-%m-%d', strtotime($_POST["from"]));
<img alt="" src="../../images/calendar16.gif" style="width: 16px; height: 16px"> <?php echo _INVOICE . _ . _DATE; ?> :</td> <td style="width: 1%; text-align: right;"> <input class="jss-Boton" name="buscar" onclick="javascript: makeInvoices();" type="button" value="<?php echo _BILL; ?> "></td> </tr> <tr> <td> <select id="idModel" class="jss-FieldAuto" name="idModel" size="1"> <?php echo putOptions('select idModel, title from [docsModel] order by title ', jGet('select invoice from home')); ?> </select></td> <td colspan="2"> <input id="dateInvoice" class="jss-DatePicker" maxlength="12" name="dateInvoice" size="12" style="width: 100%" value="<?php echo $dateInvoice; ?> "></td> </tr> </table> </form> </td> </tr> <tr> <td> <form method="post" name="frmSearch" style="margin: 0px;" target="_self">