コード例 #1
0
ファイル: relatorio.gti.php プロジェクト: silloty/vox
 public function Header()
 {
     require_once "../config.cls.php";
     $config = new clsConfig();
     //$this->Image('../visao/imagens/logo.jpg',10,8,33);
     $this->Image('../visao/imagens/logovox.jpg', 160, 10, 40);
     $this->SetFont('Arial', 'B', 10);
     $this->Cell(201, 10, 'VOX SISTEMA DE OUVIDORIA', 0, 0, 'L');
     $this->Ln(5);
     $this->Cell(205, 10, $config->GetNomeInstituicao(), 0, 0, 'L');
     $this->Ln(2);
     $this->Cell(220, 10, '_____________________________________________________________________', 0, 0, 'L');
     $this->Ln(8);
     $this->SetFont('Arial', '', 12);
     $this->Cell(165, 10, $this->nome, 0, 0, 'L');
     $this->Ln(5);
     $this->SetFont('Arial', '', $this->tam_fonte_cab);
     $this->Cell(0, 10, '________________________________________________________________________________________________________________________', 0, 0, 'L');
     $this->Ln(4);
     //ajustando cabeçalho
     $tam = count($this->cabecalho);
     $cab = "";
     for ($i = 0; $i <= $tam - 1; $i++) {
         $tamCampo = strlen($this->cabecalho[$i]);
         if ($tamCampo < $this->tamanho[$i]) {
             $comp = str_pad($this->cabecalho[$i], $this->tamanho[$i] - $tamCampo, " ", STR_PAD_RIGHT);
         }
         $cab .= $comp;
     }
     $this->Cell(0, 10, $cab, 0, 0, 'L');
     $this->Ln(1);
     $this->Cell(0, 10, '________________________________________________________________________________________________________________________', 0, 0, 'L');
     $this->Ln();
 }
コード例 #2
0
ファイル: clsUpload.php プロジェクト: akswosn/tossi
 function FileUpload($upData, $org_name, $filepath, $ext, $type)
 {
     $cls_config = new clsConfig();
     $this->DEFAULT_WIDTH = $cls_config->GetDefaultWidth($type);
     @move_uploaded_file($upData, $org_name);
     $this->ResizeImage($org_name, $filepath, $ext);
     // ?낅줈?쒗썑 ?댁쟾 ?뚯씪 ??젣 ?섏옄..
     //unlink($org_name);
 }
コード例 #3
0
ファイル: save_flash.php プロジェクト: akswosn/tossi
 public function ThumImg($path, $c_uid)
 {
     $destPath = $path . ".jpg";
     $cls_up = new clsUpload();
     $cls_up->MakeThum($path, $destPath, ".jpg");
     $cls_config = new clsConfig();
     $c_host = $cls_config->GetRealServerIp();
     $c_url = $cls_config->GetRealServerPage();
     $c_url .= "image" . "&id={$c_uid}" . "&rurl=" . $cls_config->GetReturnUrl();
     $arrData = split("id=testfile&", $c_url);
     $c_url = $arrData[0] . $arrData[1];
     $cls_MultiUp = new clsMultiUp();
     $result = $cls_MultiUp->MultiPartUpload($c_host, $c_url, $destPath);
     // 썸네일 이미지.
     $this->thum_path = $result;
     //unlink($destPath);
     #echo $result;
 }
コード例 #4
0
ファイル: email.gti.php プロジェクト: silloty/vox
 function Enviar($de, $para, $assunto, $nome_remetente)
 {
     require_once '../config.cls.php';
     $config = new clsConfig();
     /*
     		$msg = implode("n", $this->parts);
             
     		if(!mail($para, $assunto, $msg, "From: $nome_remetente\nContent-Type: text/html; charset=iso-8859-1"))
     		{
     			return false;
     		}
     		else
     		{
     			return true;
     		}
     */
     //if(($para=="") || ($para==0))
     //{
     //	$para="*****@*****.**";
     //}
     $msg = implode("n", $this->parts);
     $email = new PHPMailer();
     $email->IsSMTP();
     $email->Host = $config->GetEmailHost();
     $email->SMTPAuth = true;
     $email->Username = $config->GetEmailOuvidoria();
     $email->Password = $config->GetEmailSenha();
     $email->From = $de;
     $email->CharSet = "UTF-8";
     $email->SMTPSecure = "tls";
     $email->FromName = $nome_remetente;
     $email->Subject = $assunto;
     $email->IsHtml(true);
     $email->AddAddress($para, $para);
     $email->Body = $msg;
     $email->SMTP_PORT = 587;
     $email->AltBody = $msg;
     if (!$email->Send()) {
         return false;
     } else {
         return true;
     }
     //echo print_r($email->ErrorInfo);
 }
コード例 #5
0
ファイル: Init_parsing.php プロジェクト: akswosn/tossi
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// 2. key 값과 localkey값을 encrpty하여 실제 사용할 key를 생성 하자..
$dummy_key = $_GET['key'];
$cls_sec = new clsSecurity();
// real_key 실제 사용할 key.
$real_key = $cls_sec->encrypt($static_key, $dummy_key);
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// 3. method 의 값이 무엇인지 decrpty 하자
$method = $cls_sec->decrypt($method, $real_key);
/////////////////////////////////////////////////////////////////////////////
// 4. date 및 서버 url
if ($method == "rup") {
    // url
    $cls_config = new clsConfig();
    $c_hostname = $cls_config->GetIp();
    $c_virtualname = $cls_config->GetVirturalName();
    // date
    $cls_folder = new clsFolder();
    $c_date = $cls_folder->GetDateString();
    $result = sprintf("http://%s%s/,{$c_date}", $c_hostname, $c_virtualname, $c_date);
    echo "c_data={$result}";
    // 5. 이미지 업로드
} else {
    if ($method == "up") {
        $c_filename = $_GET['filename'];
        $c_filename = $cls_sec->decrypt($c_filename, $real_key);
        $c_type = $_GET['type'];
        if ($c_type != "image" || $c_type != "swf") {
            $c_type = $cls_sec->decrypt($c_type, $real_key);
コード例 #6
0
ファイル: fechadas_detalhes.exe.php プロジェクト: silloty/vox
<?php

require_once "../config.cls.php";
require_once "../controle/valida.gti.php";
$valida = new gtiValidacao();
$config = new clsConfig();
$metodo = $_POST['txtMetodo'];
$codigo = $_POST['txtCodigo'];
switch ($metodo) {
    //ALTERAÇÕES-----------------------------------------------
    case 'alterar':
        $tipo = $_POST['dpdTipo'];
        $status = $_POST['dpdStatus'];
        $visualizado = $_POST['txtVisualizado'];
        if ($valida->GetErro() == true) {
            echo $valida->GetMensagem();
        } else {
            //ALTERANDO
            require_once "../modelo/manifestacao.cls.php";
            $manifestacao = new clsManifestacao();
            $manifestacao->SetCodigo($codigo);
            $manifestacao->SetCodigoTipo($tipo);
            $manifestacao->SetCodigoStatus($status);
            $manifestacao->SetVisualizado($visualizado);
            $manifestacao->DesmarcarComoVisto();
            $manifestacao->AlterarFechadas();
            $config->ConfirmaOperacao('fechadas.frm.php', "Manifestacao alterada com sucesso!");
        }
        break;
}
コード例 #7
0
ファイル: Init_parsing.php プロジェクト: akswosn/tossi
         $c_ext = ".jpg";
         $srcpath = $c_folder . $c_name;
         // . ".".$c_ext;// . $ext;
     } else {
         $c_ext = ".jpg";
         $srcpath = $c_folder . $c_name;
         // . $ext;
     }
     $destpath = $c_folder . $c_name;
     if ($_FILES['Filedata']['name']) {
         $cls_upload = new clsUpload();
         $cls_upload->FileUpload($_FILES['Filedata']['tmp_name'], $srcpath, $destpath, $c_ext, $c_type);
     } else {
         echo "error :", $destpath;
     }
     $cls_config = new clsConfig();
     // 로컬 path -> url 경로로..
     // $destURL = "http://app.na4.com/usr/20070101/img.png"
     $destURL = $cls_config->GetURL($destpath);
     echo $destURL, $destpath;
     // 6. flash에서 이미지(low data)를 받아서 서버에 저장
 } else {
     if ($method == "saveup") {
         $c_uid = $_GET['uid'];
         if ($c_uid == "null") {
             $c_uid = "a0000145";
         }
         $c_type = $_GET['type'];
         $c_type = $cls_sec->decrypt($c_type, $real_key);
         if ($c_type == "image") {
             $c_ext = "jpg";
コード例 #8
0
ファイル: index.php プロジェクト: nemcko/b2b
<?php

if (session_id()) {
    if (isset($_COOKIE['PHPSESSID']) && !empty($_COOKIE['PHPSESSID'])) {
        session_id($_COOKIE['PHPSESSID']);
    } elseif (isset($_GET['PHPSESSID']) && !empty($_GET['PHPSESSID'])) {
        session_id($_GET['PHPSESSID']);
    } else {
        header('Location: index.php');
        exit(0);
    }
}
session_start();
if ($_POST && $_POST["ac"] == "log") {
    require_once 'api/config.php';
    $cfgobj = new clsConfig();
    $config = $cfgobj->getData("cfgusers", "api/");
    foreach ($config as $usr) {
        if ($usr['UserName'] == $_POST["usr"] && $usr['UserPassword'] == $_POST["pwd"]) {
            $_SESSION["logged"] = $_POST["usr"];
            break;
        }
    }
    // $_SESSION["logged"]=$_POST["usr"];
    header("Location: ./");
} elseif ($_POST && $_POST["ac"] == "exit") {
    unset($_SESSION["logged"]);
    header("Location: ./");
}
?>
コード例 #9
0
ファイル: clientela.exe.php プロジェクト: silloty/vox
            require_once "../config.cls.php";
            $clientela = new clsClientela();
            $clientela->SetCodigo($codigo);
            $clientela->SetNome($nome);
            $clientela->Alterar();
            $config = new clsConfig();
            $config->ConfirmaOperacao("clientela.frm.php", "Registro alterado com sucesso!");
        }
        break;
        //INSERÇÕES-------------------------------------------------
    //INSERÇÕES-------------------------------------------------
    case 'novo':
        require_once "../controle/valida.gti.php";
        $codigo = $_POST['txtCodigo'];
        $nome = utf8_encode($_POST['txtNome']);
        $valida = new gtiValidacao();
        $valida->ValidaCampoRequerido($nome, 'nome');
        if ($valida->GetErro() == true) {
            echo $valida->GetMensagem();
        } else {
            require_once "../modelo/clientela.cls.php";
            require_once "../config.cls.php";
            $clientela = new clsClientela();
            $clientela->SetCodigo($codigo);
            $clientela->SetNome($nome);
            $clientela->Salvar();
            $config = new clsConfig();
            $config->ConfirmaOperacao("clientela.frm.php", "Registro salvo com sucesso!");
        }
        break;
}
コード例 #10
0
ファイル: firefox.frm.php プロジェクト: silloty/vox
<?php

require_once "../config.cls.php";
$config = new clsConfig();
?>

<!DOCTYPE HTML>
<html lang="pt-BR"><head>

<meta http-equiv="Content-Language" content="pt-BR">
<link rel="stylesheet" type="text/css" href="imagens/firefox/content_002.css" media="all">
<link rel="stylesheet" type="text/css" href="imagens/firefox/content.css" title="Cavendish" media="screen">
<link rel="stylesheet" type="text/css" href="imagens/firefox/template.css" media="screen">
<link rel="stylesheet" type="text/css" href="imagens/firefox/template_002.css" title="Cavendish" media="screen">
<link rel="stylesheet" type="text/css" href="imagens/firefox/br.css" media="screen">
<link rel="stylesheet" type="text/css" href="imagens/firefox/print.css" media="print">
<script type="text/javascript" src="imagens/firefox/misc.js"></script>
<title>Por que a GTI recomenda o Mozilla Firefox</title>
<link rel="shortcut icon" type="image/png" href="http://br.mozdev.org/images/html/ffico.png">
<link rel="alternate" type="application/atom+xml" href="http://feeds.feedburner.com/br-moz" title="Novidades do br.mozdev">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="imagens/firefox/index.css">
<style type="text/css">
<!--
.style2 {font-size: large}
.style3 {color: #FFFFFF; font-weight: bold;}
.style4 {
	font-size: medium;
	font-weight: bold;
	color: #6633FF;
}
コード例 #11
0
ファイル: abertas_detalhes.exe.php プロジェクト: silloty/vox
<?php

require_once "../config.cls.php";
require_once "../controle/valida.gti.php";
$valida = new gtiValidacao();
$config = new clsConfig();
$metodo = $_POST['txtMetodo'];
$codigo = $_POST['txtCodigo'];
switch ($metodo) {
    //ALTERAÇÕES-----------------------------------------------
    case 'salvar':
        $tipo = $_POST['dpdTipo'];
        $clientela = $_POST['dpdClientela'];
        $visualizado = $_POST['txtVisualizado'];
        if ($valida->GetErro() == true) {
            echo $valida->GetMensagem();
        } else {
            //ALTERANDO
            require_once "../modelo/manifestacao.cls.php";
            $manifestacao = new clsManifestacao();
            $manifestacao->SetCodigo($codigo);
            $manifestacao->SetCodigoTipo($tipo);
            $manifestacao->SetCodigoClientela($clientela);
            $manifestacao->SetVisualizado($visualizado);
            $manifestacao->Alterar();
            $config->ConfirmaOperacao('abertas.frm.php', "Manifestacao alterada com sucesso!");
        }
        break;
        //ENCAMINHAR
    //ENCAMINHAR
    case 'encaminhar':
コード例 #12
0
ファイル: conexao.gti.php プロジェクト: silloty/vox
 /**
  * -------------------------------------------------------------------------------
  * Metodo para ser usado com a string montada diretamente no codigo. Abra a classe
  * gtiConexao.class.php para editar essas informacoes.
  *---------------------------------------------------------------------------------
  *PARAMETROS (nenhum)*/
 public function gtiDefineConexao()
 {
     $conf = new clsConfig();
     $this->m_host = $conf->GetHost();
     $this->m_usuario = $conf->GetUsuario();
     $this->m_senha = $conf->GetSenha();
     $this->m_esquema = $conf->GetEsquema();
     $this->m_driver = $conf->GetDriver();
 }
コード例 #13
0
ファイル: consulta.exe.php プロジェクト: silloty/vox
<?php

session_start();
require_once "../modelo/manifestacao.cls.php";
require_once "../config.cls.php";
require_once "../controle/valida.gti.php";
require_once "../funcao.php";
$resposta = anti_injection($_POST['txtResposta']);
$registro = $_SESSION['vox_registro'];
//Campo Hidden
$valida = new gtiValidacao();
$valida->ValidaCampoRequerido($resposta, 'resposta');
if ($valida->GetErro() == true) {
    echo $valida->GetMensagem();
} else {
    $manifestacao = new clsManifestacao();
    $manifestacao->SetRegistro($registro);
    $manifestacao->Consultar($registro);
    $manifestacao->SetFeedback(addslashes($resposta));
    $manifestacao->EnviarFeedback();
    $manifestacao->DesmarcarComoVisto();
    $config = new clsConfig();
    $config->ConfirmaOperacao('consulta.frm.php', "A ouvidoria agradece a sua colaboracao!");
}
コード例 #14
0
ファイル: inicial.exe.php プロジェクト: silloty/vox
<?php

require_once "../modelo/usuario.cls.php";
require_once "../config.cls.php";
require_once "../funcao.php";
$config = new clsConfig();
$login = anti_injection($_POST['txtLogin']);
$senha = anti_injection($_POST['txtSenha']);
$usuario = new clsUsuario();
$msg = "Login ou Senha incorretos!";
if ($usuario->Autentica($login, $senha) == true) {
    $_SESSION['vox_codigo'] = $usuario->GetCodigo();
    header("location: admin.frm.php");
    exit;
}
$config->Logout(false);
$config->ConfirmaOperacao($config->GetPaginaPrincipal(), $msg);
コード例 #15
0
ファイル: manifestacao.cls.php プロジェクト: silloty/vox
    public function ReenviarEmail($cod_depto, $cod_andamento)
    {
        require_once "../modelo/departamento.cls.php";
        require_once "../controle/email.gti.php";
        require_once "../config.cls.php";
        $departamento = new clsDepartamento();
        $config = new clsConfig();
        $email = new gtiMail();
        $con = new gtiConexao();
        $departamento->SetCodigo($cod_depto);
        $departamento->Consultar();
        $SQL = ' SELECT registro 
		FROM andamento 
		WHERE andamento_id = ' . $cod_andamento;
        //WHERE ref_departamento = '.$cod_depto.'
        //AND ref_manifestacao = '.$cod_manifestacao.';';
        $con->gtiConecta();
        $tbl = $con->gtiPreencheTabela($SQL);
        $con->gtiDesconecta();
        foreach ($tbl as $chave => $linha) {
            $reg_andamento = $linha['registro'];
        }
        //TEXTO QUE SERA ENVIADO VIA EMAIL PARA O DEPARTAMENTO
        $texto_email = '
		<table width="100%" border="1">
  <tr>
    <td><div align="center"><strong>A OUVIDORIA NECESSITA DE SUA RESPOSTA</strong></div></td>
  </tr>
  <tr>
    <td><p align="center">--------------------------------------------------------------------------------------------------------------------------</p>
    <p align="justify">Caro respons&aacute;vel pelo(a) <strong>' . utf8_decode($departamento->GetNome()) . '</strong>, encaminho a V.Sa. a presente manifesta&ccedil;&atilde;o para que analise a sua proced&ecirc;ncia e import&acirc;ncia, e solicito a gentileza de apresentar, o mais breve poss&iacute;vel, seu parecer &agrave; Se&ccedil;&atilde;o de Ouvidoria, que responder&aacute; diretamente ao manifestante ou enviar&aacute; o processo a outro departamento caso seja necess&aacute;rio.	</p>
    <p align="justify">Para dar seu parecer, entre no endere&ccedil;o:</p>
    <p align="justify">
	<a href="' . $config->GetRaiz() . '/visao/acompanha_depto.frm.php">' . $config->GetRaiz() . '/visao/acompanha_depto.frm.php</a>
	</p>
    <p align="justify">e digite o c&oacute;digo do seu ticket que &eacute; 
	<span style="font-size: large;	color: #FF0000;	font-weight: bold;">' . $reg_andamento . '</span></p>
    <p align="justify">Favor n&atilde;o retornar esse email</p>
	<p align="justify">Este email foi reenviado</p>
    <p align="justify">Atenciosamente</p>
    <p align="justify">&quot;Ouvidoria do ' . utf8_encode($config->GetNomeInstituicao()) . '</p>
    <p align="center">--------------------------------------------------------------------------------------------------------------------------</p>
    </td>
  </tr>
  <tr>
    <td><div align="center">
      <p><strong>VOX - Sistema de Ouvidoria</strong></p>
      <p><strong>' . utf8_encode($config->GetNomeInstituicao()) . '</strong></p>
    </div></td>
  </tr>
</table>
		';
        $email->AdicionarTexto($texto_email);
        if ($email->Enviar($config->GetEmailOuvidoria(), $departamento->GetEmail(), utf8_encode('Existe uma manifestação para o seu departamento (Reenvio de email)'), $config->GetEmailOuvidoria()) == false) {
            $this->DeletaAndamento($reg_andamento);
            $config->ExibeErro($config->GetPaginaRetorno(), "Erro ao enviar o email para o departamento");
        }
    }
コード例 #16
0
        require_once "../modelo/manifestacao.cls.php";
        require_once "../config.cls.php";
        require_once "../controle/valida.gti.php";
        $resp_final = utf8_encode($_POST['txtRespostaFinal']);
        $valida = new gtiValidacao();
        $valida->ValidaCampoRequerido($resp_final, 'resposta final');
        if ($valida->GetErro() == true) {
            echo $valida->GetMensagem();
        } else {
            $manifestacao = new clsManifestacao();
            $manifestacao->SetCodigo($codigo);
            $manifestacao->ConsultarPorCodigo();
            $manifestacao->SetRespostaFinal(addslashes($resp_final));
            $manifestacao->Finalizar();
            $config = new clsConfig();
            $config->ConfirmaOperacao('andamento.frm.php', "Manifestacao Finalizada!");
        }
        break;
    case 'reenviar':
        require_once "../modelo/manifestacao.cls.php";
        require_once "../config.cls.php";
        $cod = explode(":", $codigo);
        $cod_departamento = $cod[0];
        $cod_manifestacao = $cod[1];
        $cod_andamento = $cod[2];
        $manifestacao = new clsManifestacao();
        $manifestacao->ReenviarEmail($cod_departamento, $cod_andamento);
        $config = new clsConfig();
        $config->ConfirmaOperacao('andamento_detalhes.frm.php?codigo=' . $cod_manifestacao, "Email enviado com sucesso!");
        break;
}
コード例 #17
0
ファイル: tipo.exe.php プロジェクト: silloty/vox
            $tipo->SetVisivel($visivel);
            $tipo->Alterar();
            $config = new clsConfig();
            $config->ConfirmaOperacao("tipo.frm.php", "Registro alterado com sucesso!");
        }
        break;
        //INSERÇÕES-------------------------------------------------
    //INSERÇÕES-------------------------------------------------
    case 'novo':
        require_once "../controle/valida.gti.php";
        $codigo = $_POST['txtCodigo'];
        $nome = utf8_encode($_POST['txtNome']);
        $visivel = $_POST['dpdVisivel'];
        $valida = new gtiValidacao();
        $valida->ValidaCampoRequerido($nome, 'nome');
        $valida->ValidaDPD($visivel, 'visivel');
        if ($valida->GetErro() == true) {
            echo $valida->GetMensagem();
        } else {
            require_once "../modelo/tipo.cls.php";
            require_once "../config.cls.php";
            $tipo = new clsTipo();
            $tipo->SetCodigo($codigo);
            $tipo->SetNome($nome);
            $tipo->SetVisivel($visivel);
            $tipo->Salvar();
            $config = new clsConfig();
            $config->ConfirmaOperacao("tipo.frm.php", "Registro salvo com sucesso!");
        }
        break;
}
コード例 #18
0
ファイル: clsBitmapSave.php プロジェクト: akswosn/tossi
 public function BitmapData2Jpg($lowdata, $path)
 {
     //$data = $GLOBALS["HTTP_RAW_POST_DATA"];
     if (is_null($lowdata)) {
         echo "No data was sent";
     } else {
         $file = fopen($path, "w") or die("Can't open file");
         if (!fwrite($file, $lowdata)) {
             echo "Error writing to file";
         }
         fclose($file);
         $cls_config = new clsConfig();
         $url_path = trim($cls_config->GetURL($path));
         list($width, $height) = getImageSize($path);
         #$filesize = filesize($path);
         // org
         # filename
         $pos = strrpos($url_path, "/") + 1;
         $file_name = substr($url_path, $pos);
         // 640x480
         $img_width = 640;
         $img_height = 640;
         $src_ext = ".jpg";
         $out_ext = ".jpg";
         $pos = stripos($path, $src_ext);
         $file_path = substr($path, 0, $pos);
         $destPath = $file_path . $out_ext;
         $clsResize = new clsUpload();
         $clsResize->ImageResize_Ex($path, $destPath, $img_width, $img_height, $out_ext);
         chmod($destPath, 0755);
         list($width, $height) = getImageSize($destPath);
         $ret_str = sprintf("aaa&msg=%d+%d+%s", $width, $height, $file_name);
         // tossi customization
         //
         $image_info = getimagesize($destPath);
         // get source image width/height
         //
         $sw = $image_info[0];
         $sh = $image_info[1];
         // 40x30 (Thumbnail image for wap)
         $dw = 40;
         $dh = 30;
         $destPath = $file_path . "_w4.png";
         $cmd = " -resize '{$dw}x{$dh}!' -type Palette -depth 8 {$destPath}";
         // 176x240
         $dw = $sw;
         $dh = $sh;
         $this->calc_resize($dw, $dh, 140, 120, true);
         $destPath = $file_path . "_w1.png";
         $cmd = " -resize {$dw}x{$dh} -type Palette -depth 8 -write {$destPath}" . $cmd;
         // 240x320
         $dw = $sw;
         $dh = $sh;
         $this->calc_resize($dw, $dh, 220, 180, true);
         $destPath = $file_path . "_w2.png";
         $cmd = " -resize {$dw}x{$dh} -type Palette -depth 8 -write {$destPath}" . $cmd;
         // 320x240
         $dw = $sw;
         $dh = $sh;
         $this->calc_resize($dw, $dh, 220, 180, true);
         $destPath = $file_path . "_w3.png";
         $cmd = " -resize {$dw}x{$dh} -type Palette -depth 8 -write {$destPath}" . $cmd;
         $cmd_path = "convert";
         if (file_exists("/usr/local/bin/convert")) {
             $cmd_path = "/usr/local/bin/convert";
         } else {
             if (file_exists("/usr/bin/convert")) {
                 $cmd_path = "/usr/bin/convert";
             }
         }
         $cmd = "{$cmd_path} {$path} " . $cmd;
         $cmd_out = array();
         $ret_val = 0;
         $ret = exec($cmd, $cmd_out, $ret_val);
         chmod(substr($path, 0, $pos) . "_w1.png", 0755);
         chmod(substr($path, 0, $pos) . "_w2.png", 0755);
         chmod(substr($path, 0, $pos) . "_w3.png", 0755);
         chmod(substr($path, 0, $pos) . "_w4.png", 0755);
         // test for $ret_val
         /*
         			// 140x120
         			$img_width = 140;
         			$img_height = 120;
         			$src_ext = ".jpg";			
         			$out_ext = ".png";
         			$pos = stripos($path, $src_ext);
         			$destPath  = substr($path, 0, $pos)."_w1".$out_ext;
         			
         			$clsResize->ImageResize($path, $destPath, $img_width, $img_height, $out_ext );
         			
         			#$url_path = trim($cls_config->GetURL($destPath));			
         			
         			# 220 x 180
         			$img_width = 220;
         			$img_height = 180;
         			$src_ext = ".jpg";			
         			$out_ext = ".png";
         			$pos = stripos($path, $src_ext);
         			$destPath  = substr($path, 0, $pos)."_w2".$out_ext;
         			
         			$clsResize->ImageResize($path, $destPath, $img_width, $img_height, $out_ext );
         			
         			#$url_path = trim($cls_config->GetURL($destPath));			
         			
         			# 300 x 240
         			$img_width = 300;
         			$img_height = 240;
         			
         			$src_ext = ".jpg";			
         			$out_ext = ".png";
         			$pos = stripos($path, $src_ext);
         			$destPath  = substr($path, 0, $pos)."_w3".$out_ext;
         			
         			$clsResize->ImageResize($path, $destPath, $img_width, $img_height, $out_ext );
         			
         			#$url_path = trim($cls_config->GetURL($destPath));			
         
         			//echo $ret_str;
         */
         return $ret_str;
     }
 }
コード例 #19
0
ファイル: usuario.exe.php プロジェクト: silloty/vox
     $arr = $usuario->ListaUsuarioArray();
     $lista = $xml->ArrayParaXML($arr);
     echo $lista;
     break;
     //EXCLUSÕES------------------------------------------------
 //EXCLUSÕES------------------------------------------------
 case 'excluir':
     if ($codigo != 1) {
         require_once "../modelo/usuario.cls.php";
         $usuario = new clsUsuario();
         $usuario->Excluir($codigo);
         $config = new clsConfig();
         $config->ConfirmaOperacao("usuario.frm.php", "Registro excluido com sucesso!");
     } else {
         require_once "../config.cls.php";
         $config = new clsConfig();
         $config->ConfirmaOperacao("usuario.frm.php", "Você não pode excluir o usuário administrador!");
     }
     break;
     //ALTERAÇÕES-----------------------------------------------
 //ALTERAÇÕES-----------------------------------------------
 case 'altera':
     require_once "../controle/valida.gti.php";
     $codigo = $_POST['txtCodigo'];
     $nome = utf8_encode($_POST['txtNome']);
     $login = utf8_encode($_POST['txtLogin']);
     $senha = utf8_encode($_POST['txtSenha']);
     $senha2 = utf8_encode($_POST['txtSenha2']);
     $codigo_usuario = $_SESSION['vox_codigo'];
     $valida = new gtiValidacao();
     $valida->ValidaCampoRequerido($nome, 'nome');
コード例 #20
0
ファイル: modo_manifestando.exe.php プロジェクト: silloty/vox
<?php 
session_start();
if (isset($_POST['txtMetodo'])) {
    $metodo = $_POST['txtMetodo'];
}
switch ($metodo) {
    //ENVIAR-------------------------------------------------
    case 'enviar':
        require_once "../controle/valida.gti.php";
        require_once "../controle/hora.gti.php";
        require_once "../controle/data.gti.php";
        require_once "../funcao.php";
        require_once "../config.cls.php";
        $config = new clsConfig();
        $clientela = anti_injection($_POST['dpdClientela']);
        $tipo = anti_injection($_POST['dpdTipo']);
        $email = anti_injection($_POST['txtEmail']);
        $identificacao = anti_injection($_POST['dpdIdentificacao']);
        $nome = anti_injection($_POST['txtNome']);
        $cpf = anti_injection($_POST['txtCPF']);
        $telefone = anti_injection($_POST['txtTelefone']);
        $assunto = anti_injection($_POST['txtAssunto']);
        $manifestacao = anti_injection($_POST['txtManifestacao']);
        $razao = anti_injection($_POST['txtRazao']);
        $endereco = anti_injection($_POST['txtEndereco']);
        $seguranca = anti_injection($_POST['txtSeguranca']);
        //GUARDANDO VALORES NA SESSÃO
        $_SESSION['vox_email'] = $email;
        $_SESSION['vox_nome'] = $nome;
        $_SESSION['vox_cpf'] = $cpf;
        $_SESSION['vox_telefone'] = $telefone;
コード例 #21
0
ファイル: departamento.exe.php プロジェクト: silloty/vox
            $config = new clsConfig();
            $config->ConfirmaOperacao("departamento.frm.php", "Registro alterado com sucesso!");
        }
        break;
        //INSERÇÕES-------------------------------------------------
    //INSERÇÕES-------------------------------------------------
    case 'novo':
        require_once "../controle/valida.gti.php";
        $codigo = $_POST['txtCodigo'];
        $nome = utf8_encode($_POST['txtNome']);
        $email = utf8_encode($_POST['txtEmail']);
        $descricao = utf8_encode($_POST['txtDescricao']);
        $valida = new gtiValidacao();
        $valida->ValidaCampoRequerido($nome, 'nome');
        $valida->ValidaCampoRequerido($email, 'email');
        if ($valida->GetErro() == true) {
            echo $valida->GetMensagem();
        } else {
            require_once "../modelo/departamento.cls.php";
            require_once "../config.cls.php";
            $departamento = new clsDepartamento();
            $departamento->SetCodigo($codigo);
            $departamento->SetNome($nome);
            $departamento->SetEmail($email);
            $departamento->SetDescricao($descricao);
            $departamento->Salvar();
            $config = new clsConfig();
            $config->ConfirmaOperacao("departamento.frm.php", "Registro salvo com sucesso!");
        }
        break;
}
コード例 #22
0
ファイル: inicial.frm.php プロジェクト: silloty/vox
<?php

require_once "../config.cls.php";
require_once "../controle/browser.gti.php";
$config = new clsConfig();
$nav = trim($_SESSION['vox_nav']);
$config->Logout(false);
?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<link rel="shortcut icon" href="../favicon.ico">
    <title>:: VOX ::</title>
    <link href="estilo/estilo.css" rel="stylesheet" type="text/css" />
     <script src="js/validator.js" type="text/javascript"></script>
     <style type="text/css">
<!--
.style22 {
	color: #FFFFFF;
	font-weight: bold;
	font-family: Tahoma, Arial, sans-serif;
}
.style23 {font-family: Tahoma, Arial, sans-serif}
-->
     </style>
</head>
コード例 #23
0
ファイル: departamento.frm.php プロジェクト: silloty/vox
<?php

require_once "../config.cls.php";
require_once "../modelo/usuario.cls.php";
$config = new clsConfig();
if (isset($_SESSION['vox_codigo'])) {
    $admin = new clsUsuario();
    $admin->SelecionaPorCodigo(trim($_SESSION['vox_codigo']));
} else {
    $config->Logout(false);
    $config->ConfirmaOperacao($config->GetPaginaPrincipal(), "Você não tem permissão para acessar essa página!");
}
?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

   
<head>
    <title>&Aacute;rea Administrativa - VOX</title>
    <link href="estilo/estilo.css" rel="stylesheet" type="text/css" />
    
    <!-- ESTILO DATAGRID-->
	<link href="estilo/datagrid/dhtmlxgrid.css"  rel="stylesheet" type="text/css" />
	<link href="estilo/datagrid/dhtmlxgrid_skins.css" rel="stylesheet" type="text/css"  />
	<link href="estilo/datagrid/style.css" rel="stylesheet" type="text/css" />
	
    <!-- ESTILO JANELA -->
    <link href="css/themes/default.css" rel="stylesheet" type="text/css" />	
コード例 #24
0
ファイル: clsFolder.php プロジェクト: akswosn/tossi
 public function __construct()
 {
     $cls_config = new clsConfig();
     $this->m_userFolder = $cls_config->GetUserFolder();
     $this->MakeFolder($this->m_userFolder);
 }
コード例 #25
0
ファイル: clsBitmapSave.php プロジェクト: akswosn/tossi
 public function BitmapData2Jpg($lowdata, $path)
 {
     //$data = $GLOBALS["HTTP_RAW_POST_DATA"];
     if (is_null($lowdata)) {
         echo "No data was sent";
     } else {
         $file = fopen($path, "w") or die("Can't open file");
         if (!fwrite($file, $lowdata)) {
             echo "Error writing to file";
         }
         fclose($file);
         chmod($filename, 0777);
         $cls_config = new clsConfig();
         $url_path = trim($cls_config->GetURL($path));
         list($width, $height) = getImageSize($path);
         #$filesize = filesize($path);
         // org
         # filename
         $pos = strrpos($url_path, "/") + 1;
         $file_name = substr($url_path, $pos);
         $ret_str = sprintf("aaa&msg=%d+%d+%s", $width, $height, $file_name);
         // 140x120
         $img_width = 640;
         $img_height = 640;
         $src_ext = ".jpg";
         $out_ext = ".jpg";
         $pos = stripos($path, $src_ext);
         $destPath = substr($path, 0, $pos) . "_w0" . $out_ext;
         $clsResize = new clsUpload();
         $clsResize->ImageResize_Ex($path, $destPath, $img_width, $img_height, $out_ext);
         // 140x120
         $img_width = 140;
         $img_height = 120;
         $src_ext = ".jpg";
         $out_ext = ".png";
         $pos = stripos($path, $src_ext);
         $destPath = substr($path, 0, $pos) . "_w1" . $out_ext;
         $clsResize->ImageResize($path, $destPath, $img_width, $img_height, $out_ext);
         #$url_path = trim($cls_config->GetURL($destPath));
         # 220 x 180
         $img_width = 220;
         $img_height = 180;
         $src_ext = ".jpg";
         $out_ext = ".png";
         $pos = stripos($path, $src_ext);
         $destPath = substr($path, 0, $pos) . "_w2" . $out_ext;
         $clsResize->ImageResize($path, $destPath, $img_width, $img_height, $out_ext);
         #$url_path = trim($cls_config->GetURL($destPath));
         # 300 x 240
         $img_width = 300;
         $img_height = 240;
         $src_ext = ".jpg";
         $out_ext = ".png";
         $pos = stripos($path, $src_ext);
         $destPath = substr($path, 0, $pos) . "_w3" . $out_ext;
         $clsResize->ImageResize($path, $destPath, $img_width, $img_height, $out_ext);
         #$url_path = trim($cls_config->GetURL($destPath));
         //echo $ret_str;
         return $ret_str;
     }
 }
コード例 #26
0
ファイル: acompanha_depto.exe.php プロジェクト: silloty/vox
<?php

require_once "../modelo/manifestacao.cls.php";
require_once "../config.cls.php";
require_once "../controle/valida.gti.php";
require_once "../funcao.php";
$reg_andamento = anti_injection($_POST['txtConsulta']);
$resposta = $_POST['txtResposta'];
$codigo = $_POST['txtCodigo'];
$valida = new gtiValidacao();
$valida->ValidaCampoRequerido($reg_andamento, 'registro');
$valida->ValidaCampoRequerido($resposta, 'resposta');
if ($valida->GetErro() == true) {
    echo $valida->GetMensagem();
} else {
    $manifestacao = new clsManifestacao();
    $manifestacao->SetResposta(addslashes($resposta));
    $manifestacao->Responder($reg_andamento);
    $manifestacao->SetCodigo($codigo);
    $manifestacao->DesmarcarComoVisto();
    $config = new clsConfig();
    $config->ConfirmaOperacao('acompanha_depto.frm.php', "Manifestacao respondida com sucesso!");
}
コード例 #27
0
<html>
<head>
<?php 
include "../../../config.cls.php";
$config = new clsConfig();
?>
<link rel="stylesheet" type="text/css" href="../../estilo/estilo.css">
<link rel="shortcut icon" href="../favicon.ico">
<link rel="stylesheet" type="text/css" href="../../estilo/menu_ajuda.css">
<style type="text/css">

.style3 {
	font-size: xx-large;
	font-weight: bold;
	color: #000000;
	font-family: Arial, Helvetica, sans-serif;
}
.style22 {font-family: Verdana, Arial, Helvetica, sans-serif}
.style25 {
	color: #244D23;
	font-weight: bold;
	font-size: 14px;
}
.style28 {
	font-size: 14px;
	color: #5AA024;
}
.style30 {font-size: 14px}


-->
コード例 #28
0
ファイル: modo_manifestando.frm.php プロジェクト: silloty/vox
<?php

session_start();
require_once "../modelo/tipo.cls.php";
require_once "../modelo/clientela.cls.php";
require_once "../config.cls.php";
$config = new clsConfig();
$quant = $config->GetQuantCharManifestacao();
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="../favicon.ico">
<title>VOX Sistema de Ouvidoria - Modo Manifestando - &quot;Fa&ccedil;a sua manifesta&ccedil;&atilde;o!!!&quot;</title>
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/ajax/modo_manifestando.ajax.js"></script>
<script type="text/javascript" src="js/mascara.js"></script>
<link href="estilo/estilo.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript">
function limiteTexto(limiteCampo, limiteContador, limite) {
	if (limiteCampo.value.length > limite) {
		limiteCampo.value = limiteCampo.value.substring(0, limite);
	} else {
		limiteContador.value = limite - limiteCampo.value.length;
	}
}
</script>
<style type="text/css">
<!--