<?php

session_start();
include '../Connections/homebank_conecta.php';
require_once 'auth.php';
verificaAuth($_SESSION['codusuarioadm'], 'Consultar OS');
$currentPage = $_SERVER["PHP_SELF"];
mysql_select_db($database_homebank_conecta, $homebank_conecta);
$query_tipos = "SELECT destiposervsol AS tipos, codtiposervsol,codtiposol FROM  tiposervsolicitacao ORDER BY destiposervsol";
$tipos = mysql_query($query_tipos, $homebank_conecta) or die(mysql_error());
$row_tipos = mysql_fetch_assoc($tipos);
$totalRows_tipos = mysql_num_rows($tipos);
$query_produtos = "SELECT codtiposol,destiposol FROM tiposolicitacao ORDER BY destiposol";
$produtos = mysql_query($query_produtos, $homebank_conecta) or die(mysql_error());
$row_produtos = mysql_fetch_assoc($produtos);
$totalRows_produtos = mysql_num_rows($produtos);
mysql_select_db($database_homebank_conecta, $homebank_conecta);
$query_tecnico = "SELECT tecnicoresp.nomtecnicoresp, tecnicoresp.codtecnicoresp FROM tecnicoresp ORDER BY tecnicoresp.nomtecnicoresp";
$tecnico = mysql_query($query_tecnico, $homebank_conecta) or die(mysql_error());
$row_tecnico = mysql_fetch_assoc($tecnico);
$totalRows_tecnico = mysql_num_rows($tecnico);
$colname_consulta = "-1";
if (isset($_POST['cod_solicitacao'])) {
    $colname_consulta = get_magic_quotes_gpc() ? $_POST['cod_solicitacao'] : addslashes($_POST['cod_solicitacao']);
}
$colname2_consulta = "0";
if (isset($_POST['cod_tipo'])) {
    $colname2_consulta = get_magic_quotes_gpc() ? $_POST['cod_tipo'] : addslashes($_POST['cod_tipo']);
}
$colname3_consulta = "-1";
if (isset($_POST['contacorrente'])) {
Example #2
0
<?php

session_start();
include_once "../Connections/homebank_conecta.php";
require_once "auth.php";
include_once 'enviaemail.php';
verificaAuth($_SESSION['codusuarioadm'], 'Concluir OS');
if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
    {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
        $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
        switch ($theType) {
            case "text":
                $theValue = $theValue != "" ? "'" . $theValue . "'" : "NULL";
                break;
            case "long":
            case "int":
                $theValue = $theValue != "" ? intval($theValue) : "NULL";
                break;
            case "double":
                $theValue = $theValue != "" ? "'" . doubleval($theValue) . "'" : "NULL";
                break;
            case "date":
                $theValue = $theValue != "" ? "'" . $theValue . "'" : "NULL";
                break;
            case "defined":
                $theValue = $theValue != "" ? $theDefinedValue : $theNotDefinedValue;
                break;
        }
        return $theValue;