当前位置: 首页>>代码示例>>PHP>>正文


PHP db_getsession函数代码示例

本文整理汇总了PHP中db_getsession函数的典型用法代码示例。如果您正苦于以下问题:PHP db_getsession函数的具体用法?PHP db_getsession怎么用?PHP db_getsession使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了db_getsession函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Header

 function Header()
 {
     //$dados = @pg_exec("select nomeinst,ender,munic,uf,telef,email,url,logo from db_config where codigo = ".@$GLOBALS["DB_instit"]);
     //$url = @pg_result($dados,0,"url");
     //global $nomeinst;
     //$nomeinst = pg_result($dados,0,"nomeinst");
     //global $ender;
     //$ender = pg_result($dados,0,"ender");
     $sql = "select nomeinst,bairro,cgc,ender,upper(munic) as munic,uf,telef,email,url,logo, db12_extenso\n\t\tfrom db_config \n\t\tinner join db_uf on db12_uf = uf\n\t\twhere codigo = " . db_getsession("DB_instit");
     $result = pg_query($sql);
     global $nomeinst;
     global $ender;
     global $munic;
     global $cgc;
     global $bairro;
     global $uf;
     //echo $sql;
     db_fieldsmemory($result, 0);
     /// seta a margem esquerda que veio do relatorio
     $S = $this->lMargin;
     $this->SetLeftMargin(10);
     $Letra = 'Times';
     $this->Image("imagens/files/logo_boleto.png", 95, 8, 24);
     //$this->Image('imagens/files/'.$logo,2,3,30);
     $this->Ln(35);
     $this->SetFont($Letra, '', 10);
     $this->MultiCell(0, 4, $db12_extenso, 0, "C", 0);
     $this->SetFont($Letra, 'B', 13);
     $this->MultiCell(0, 6, $nomeinst, 0, "C", 0);
     $this->SetFont($Letra, 'B', 12);
     $this->MultiCell(0, 4, @$GLOBALS["head1"], 0, "C", 0);
     $this->Ln(10);
     $this->SetLeftMargin($S);
 }
开发者ID:arendasistemasintegrados,项目名称:mateusleme,代码行数:34,代码来源:pdf2.php

示例2: Header

 function Header()
 {
     //$dados = @pg_exec("select nomeinst,ender,munic,uf,telef,email,url,logo from db_config where codigo = ".@$GLOBALS["DB_instit"]);
     //$url = @pg_result($dados,0,"url");
     //global $nomeinst;
     //$nomeinst = pg_result($dados,0,"nomeinst");
     //global $ender;
     //$ender = pg_result($dados,0,"ender");
     $sql = "select nomeinst,ender,upper(munic) as munic,uf,telef,email,url,logo from db_config where codigo = " . db_getsession("DB_instit");
     $result = pg_query($sql);
     global $nomeinst;
     global $ender;
     global $munic;
     //echo $sql;
     db_fieldsmemory($result, 0);
     $Letra = 'Times';
     $this->Image("imagens/files/logo_boleto.png", 95, 9, 24);
     //$this->Image('imagens/files/'.$logo,2,3,30);
     $this->Ln(35);
     $this->SetFont($Letra, '', 10);
     $this->MultiCell(0, 4, "ESTADO DO RIO GRANDE DO SUL", 0, "C", 0);
     $this->SetFont($Letra, 'B', 13);
     $this->MultiCell(0, 6, $nomeinst, 0, "C", 0);
     $this->SetFont($Letra, 'B', 12);
     $this->MultiCell(0, 4, @$GLOBALS["head1"], 0, "C", 0);
     $this->Ln(10);
 }
开发者ID:arendasistemasintegrados,项目名称:mateusleme,代码行数:27,代码来源:pdfdbpref.php

示例3: debitos_tipos_numcgm

function debitos_tipos_numcgm($numcgm)
{
    $instit = db_getsession("DB_instit");
    $sql = "select distinct t.k00_tipo,t.k00_descr,t.k00_marcado,b.k00_numcgm,t.k00_emrec,t.k00_agnum,t.k00_agpar\n          from arrenumcgm b\n                inner join arrecad a    on b.k00_numpre = a.k00_numpre\n                inner join arretipo t   on t.k00_tipo   = a.k00_tipo\n                inner join arreinstit n on n.k00_numpre = a.k00_numpre\n                  where b.k00_numcgm = {$numcgm} and n.k00_instit = {$instit}";
    // echo "<br> cgm = $sql <br> ";
    $result = pg_exec($sql) or die("Sql : " . pg_ErrorMessage());
    return pg_numrows($result) == 0 ? false : $result;
}
开发者ID:arendasistemasintegrados,项目名称:mateusleme,代码行数:8,代码来源:db_sql.php

示例4: __construct

 function __construct($iCodigoSimulacao)
 {
     $this->setCodigoSimulacao($iCodigoSimulacao);
     $oDaoIssSimulaCalculo = db_utils::getDao("isssimulacalculo");
     $sSqlIssSimulaCalculo = $oDaoIssSimulaCalculo->sql_query_file($iCodigoSimulacao);
     $rsIssSimulacaoCalculo = $oDaoIssSimulaCalculo->sql_record($sSqlIssSimulaCalculo);
     if ($oDaoIssSimulaCalculo->numrows == 0) {
         throw new Exception("[ Erro 1 ] - Não encontrados dados para processamento do calculo de simulação");
     }
     $oDadosSimulacao = db_utils::fieldsMemory($rsIssSimulacaoCalculo, 0);
     $this->setDataCalculo(date("Y-m-d", db_getsession("DB_datausu")));
     $this->setDataInicioAtividade($oDadosSimulacao->q130_datainicio);
     $this->setAtividadeCalculo();
     $this->setParametrosISSQN($this->getAnoCalculo());
 }
开发者ID:arendasistemasintegrados,项目名称:mateusleme,代码行数:15,代码来源:SimulaCalculoInscricao.model.php

示例5: __construct

 function __construct()
 {
     /**
      * Declaramos as variáveis da classe de acordo com o que está configurado no arquivo config.mail.php
      */
     include_once 'libs/config.mail.php';
     $this->sUserMail = $sUser;
     $this->sPassMail = $sPass;
     $this->sHostMail = $sHost;
     $this->sPortMail = (int) $sPort;
     $this->sClass = (int) $sClass;
     $oConfigDBpref = db_utils::getDao("configdbpref");
     $rsConfigDBpref = $oConfigDBpref->sql_record($oConfigDBpref->sql_query_file(db_getsession('DB_instit'), "w13_emailadmin"));
     $this->sEmailFrom = db_utils::fieldsMemory($rsConfigDBpref, 0)->w13_emailadmin;
 }
开发者ID:arendasistemasintegrados,项目名称:mateusleme,代码行数:15,代码来源:db_mail_class.php

示例6: assinatura

 function assinatura($codigo, $default = '', $pos_paragrafo = "")
 {
     //#00#//assinatura
     //#10#//Este método é usado gerar a assinatura de acordo com o cadastro de assinaturas
     //#15#//assinatura($codigo,$default)
     //#20#//codigo  : codigo do tipo de assinatura da tabela db_tipodoc
     //#20#//default : string default que será impressa caso o código não seja encontrado
     //#20#//pos_paragrafo : qual será o paragrafo retornado, se retornar somente o primeiro, seria somente o nome da pessoa
     //#20#//, por exemplo  ( nome, carlos).  0 = nome, 1 = cargo , passar este parementro sempre entre aspas simples
     //#20#//na tabela.
     $result = pg_query("select db_paragrafo.*\n      \t        \t      from db_documento\n                      \t\t    inner join db_docparag on db03_docum = db04_docum\n                      \t\t    inner join db_paragrafo on db04_idparag = db02_idparag\n                 \t   \t  where db03_tipodoc = {$codigo} and\n                       \t\t         db03_instit  = " . db_getsession('DB_instit') . "\n                 \t\t  order by db02_descr\n                 \t\t");
     //db_criatabela($result);exit;
     $ass = $default;
     if (pg_numrows($result) > 0) {
         $ass = '';
         $ar = "";
         for ($i = 0; $i < pg_numrows($result); $i++) {
             $db02_texto = pg_result($result, $i, "db02_texto");
             $ass .= $ar . $db02_texto;
             $ar = "\r\n";
         }
         /* paragrafo : qual será o paragrafo retornado, se retornar somente o primeiro, seria somente o nome da pessoa 
          * por exemplo  ( nome, carlos).  0 = nome, 1 = cargo
          * aqui sobrescrevemos as variáveis acima ( codigo pobre )
          */
         if ($pos_paragrafo != "") {
             $ass = '';
             if (pg_numrows($result) > $pos_paragrafo) {
                 $db02_texto = pg_result($result, $pos_paragrafo, "db02_texto");
                 // retorna da posição paragrafo
                 $ass = $db02_texto;
             }
         }
         //------------------------------------------ * -------------------------------------
     }
     return $ass;
 }
开发者ID:arendasistemasintegrados,项目名称:mateusleme,代码行数:37,代码来源:assinatura.php

示例7: sql_query_virada_issqn

 function sql_query_virada_issqn($q81_codigo = null, $campos = "*", $ordem = null, $dbwhere = "")
 {
     $sql = "select ";
     if ($campos != "*") {
         $campos_sql = split("#", $campos);
         $virgula = "";
         for ($i = 0; $i < sizeof($campos_sql); $i++) {
             $sql .= $virgula . $campos_sql[$i];
             $virgula = ",";
         }
     } else {
         $sql .= $campos;
     }
     $sql .= " from tipcalc                                                            ";
     $sql .= "      inner join cadcalc     on q81_cadcalc = q85_codigo                 ";
     $sql .= "      inner join tipcalcexe  on q81_codigo  = q83_tipcalc                ";
     $sql .= "                            and q83_anousu  = " . db_getsession('DB_anousu');
     $sql .= "      inner join cadvencdesc on q83_codven  = q92_codigo                 ";
     $sql2 = "";
     if ($dbwhere == "") {
         if ($q81_codigo != null) {
             $sql2 .= " where tipcalc.q81_codigo = {$q81_codigo} ";
         }
     } else {
         if ($dbwhere != "") {
             $sql2 = " where {$dbwhere}";
         }
     }
     $sql .= $sql2;
     if ($ordem != null) {
         $sql .= " order by ";
         $campos_sql = split("#", $ordem);
         $virgula = "";
         for ($i = 0; $i < sizeof($campos_sql); $i++) {
             $sql .= $virgula . $campos_sql[$i];
             $virgula = ",";
         }
     }
     return $sql;
 }
开发者ID:arendasistemasintegrados,项目名称:mateusleme,代码行数:40,代码来源:db_tipcalc_classe.php

示例8: excluir

 function excluir($q12_classe = null, $dbwhere = null)
 {
     if ($dbwhere == null || $dbwhere == "") {
         $resaco = $this->sql_record($this->sql_query_file($q12_classe));
     } else {
         $resaco = $this->sql_record($this->sql_query_file(null, "*", null, $dbwhere));
     }
     if ($resaco != false || $this->numrows != 0) {
         for ($iresaco = 0; $iresaco < $this->numrows; $iresaco++) {
             $resac = db_query("select nextval('db_acount_id_acount_seq') as acount");
             $acount = pg_result($resac, 0, 0);
             $resac = db_query("insert into db_acountacesso values({$acount}," . db_getsession("DB_acessado") . ")");
             $resac = db_query("insert into db_acountkey values({$acount},304,'{$q12_classe}','E')");
             $resac = db_query("insert into db_acount values({$acount},57,304,'','" . AddSlashes(pg_result($resaco, $iresaco, 'q12_classe')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
             $resac = db_query("insert into db_acount values({$acount},57,305,'','" . AddSlashes(pg_result($resaco, $iresaco, 'q12_descr')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
             $resac = db_query("insert into db_acount values({$acount},57,6390,'','" . AddSlashes(pg_result($resaco, $iresaco, 'q12_fisica')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
             $resac = db_query("insert into db_acount values({$acount},57,6510,'','" . AddSlashes(pg_result($resaco, $iresaco, 'q12_calciss')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
             $resac = db_query("insert into db_acount values({$acount},57,9632,'','" . AddSlashes(pg_result($resaco, $iresaco, 'q12_integrasani')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
             $resac = db_query("insert into db_acount values({$acount},57,18324,'','" . AddSlashes(pg_result($resaco, $iresaco, 'q12_alvaraautomatico')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
         }
     }
     $sql = " delete from classe\n                    where ";
     $sql2 = "";
     if ($dbwhere == null || $dbwhere == "") {
         if ($q12_classe != "") {
             if ($sql2 != "") {
                 $sql2 .= " and ";
             }
             $sql2 .= " q12_classe = {$q12_classe} ";
         }
     } else {
         $sql2 = $dbwhere;
     }
     $result = db_query($sql . $sql2);
     if ($result == false) {
         $this->erro_banco = str_replace("\n", "", @pg_last_error());
         $this->erro_sql = " nao Excluído. Exclusão Abortada.\\n";
         $this->erro_sql .= "Valores : " . $q12_classe;
         $this->erro_msg = "Usuário: \\n\\n " . $this->erro_sql . " \\n\\n";
         $this->erro_msg .= str_replace('"', "", str_replace("'", "", "Administrador: \\n\\n " . $this->erro_banco . " \\n"));
         $this->erro_status = "0";
         $this->numrows_excluir = 0;
         return false;
     } else {
         if (pg_affected_rows($result) == 0) {
             $this->erro_banco = "";
             $this->erro_sql = " nao Encontrado. Exclusão não Efetuada.\\n";
             $this->erro_sql .= "Valores : " . $q12_classe;
             $this->erro_msg = "Usuário: \\n\\n " . $this->erro_sql . " \\n\\n";
             $this->erro_msg .= str_replace('"', "", str_replace("'", "", "Administrador: \\n\\n " . $this->erro_banco . " \\n"));
             $this->erro_status = "1";
             $this->numrows_excluir = 0;
             return true;
         } else {
             $this->erro_banco = "";
             $this->erro_sql = "Exclusão efetuada com Sucesso\\n";
             $this->erro_sql .= "Valores : " . $q12_classe;
             $this->erro_msg = "Usuário: \\n\\n " . $this->erro_sql . " \\n\\n";
             $this->erro_msg .= str_replace('"', "", str_replace("'", "", "Administrador: \\n\\n " . $this->erro_banco . " \\n"));
             $this->erro_status = "1";
             $this->numrows_excluir = pg_affected_rows($result);
             return true;
         }
     }
 }
开发者ID:arendasistemasintegrados,项目名称:mateusleme,代码行数:65,代码来源:db_classe_classe.php

示例9: excluir

 public function excluir($pc23_orcamforne = null, $pc23_orcamitem = null, $dbwhere = null)
 {
     $lSessaoDesativarAccount = db_getsession("DB_desativar_account", false);
     if (!isset($lSessaoDesativarAccount) || isset($lSessaoDesativarAccount) && $lSessaoDesativarAccount === false) {
         if (empty($dbwhere)) {
             $resaco = $this->sql_record($this->sql_query_file($pc23_orcamforne, $pc23_orcamitem));
         } else {
             $resaco = $this->sql_record($this->sql_query_file(null, null, "*", null, $dbwhere));
         }
         if ($resaco != false || $this->numrows != 0) {
             for ($iresaco = 0; $iresaco < $this->numrows; $iresaco++) {
                 $resac = db_query("select nextval('db_acount_id_acount_seq') as acount");
                 $acount = pg_result($resac, 0, 0);
                 $resac = db_query("insert into db_acountacesso values({$acount}," . db_getsession("DB_acessado") . ")");
                 $resac = db_query("insert into db_acountkey values({$acount},6378,'{$pc23_orcamforne}','E')");
                 $resac = db_query("insert into db_acountkey values({$acount},5517,'{$pc23_orcamitem}','E')");
                 $resac = db_query("insert into db_acount values({$acount},863,6378,'','" . AddSlashes(pg_result($resaco, $iresaco, 'pc23_orcamforne')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
                 $resac = db_query("insert into db_acount values({$acount},863,5517,'','" . AddSlashes(pg_result($resaco, $iresaco, 'pc23_orcamitem')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
                 $resac = db_query("insert into db_acount values({$acount},863,5518,'','" . AddSlashes(pg_result($resaco, $iresaco, 'pc23_valor')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
                 $resac = db_query("insert into db_acount values({$acount},863,6456,'','" . AddSlashes(pg_result($resaco, $iresaco, 'pc23_quant')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
                 $resac = db_query("insert into db_acount values({$acount},863,6831,'','" . AddSlashes(pg_result($resaco, $iresaco, 'pc23_obs')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
                 $resac = db_query("insert into db_acount values({$acount},863,7645,'','" . AddSlashes(pg_result($resaco, $iresaco, 'pc23_vlrun')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
                 $resac = db_query("insert into db_acount values({$acount},863,9205,'','" . AddSlashes(pg_result($resaco, $iresaco, 'pc23_validmin')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
                 $resac = db_query("insert into db_acount values({$acount},863,20855,'','" . AddSlashes(pg_result($resaco, $iresaco, 'pc23_percentualdesconto')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
             }
         }
     }
     $sql = " delete from pcorcamval\n                    where ";
     $sql2 = "";
     if (empty($dbwhere)) {
         if (!empty($pc23_orcamforne)) {
             if (!empty($sql2)) {
                 $sql2 .= " and ";
             }
             $sql2 .= " pc23_orcamforne = {$pc23_orcamforne} ";
         }
         if (!empty($pc23_orcamitem)) {
             if (!empty($sql2)) {
                 $sql2 .= " and ";
             }
             $sql2 .= " pc23_orcamitem = {$pc23_orcamitem} ";
         }
     } else {
         $sql2 = $dbwhere;
     }
     $result = db_query($sql . $sql2);
     if ($result == false) {
         $this->erro_banco = str_replace("\n", "", @pg_last_error());
         $this->erro_sql = "Valores dos itens do orçamento nao Excluído. Exclusão Abortada.\\n";
         $this->erro_sql .= "Valores : " . $pc23_orcamforne . "-" . $pc23_orcamitem;
         $this->erro_msg = "Usuário: \\n\\n " . $this->erro_sql . " \\n\\n";
         $this->erro_msg .= str_replace('"', "", str_replace("'", "", "Administrador: \\n\\n " . $this->erro_banco . " \\n"));
         $this->erro_status = "0";
         $this->numrows_excluir = 0;
         return false;
     } else {
         if (pg_affected_rows($result) == 0) {
             $this->erro_banco = "";
             $this->erro_sql = "Valores dos itens do orçamento nao Encontrado. Exclusão não Efetuada.\\n";
             $this->erro_sql .= "Valores : " . $pc23_orcamforne . "-" . $pc23_orcamitem;
             $this->erro_msg = "Usuário: \\n\\n " . $this->erro_sql . " \\n\\n";
             $this->erro_msg .= str_replace('"', "", str_replace("'", "", "Administrador: \\n\\n " . $this->erro_banco . " \\n"));
             $this->erro_status = "1";
             $this->numrows_excluir = 0;
             return true;
         } else {
             $this->erro_banco = "";
             $this->erro_sql = "Exclusão efetuada com Sucesso\\n";
             $this->erro_sql .= "Valores : " . $pc23_orcamforne . "-" . $pc23_orcamitem;
             $this->erro_msg = "Usuário: \\n\\n " . $this->erro_sql . " \\n\\n";
             $this->erro_msg .= str_replace('"', "", str_replace("'", "", "Administrador: \\n\\n " . $this->erro_banco . " \\n"));
             $this->erro_status = "1";
             $this->numrows_excluir = pg_affected_rows($result);
             return true;
         }
     }
 }
开发者ID:arendasistemasintegrados,项目名称:mateusleme,代码行数:77,代码来源:db_pcorcamval_classe.php

示例10: excluir

 function excluir($pc17_codigo = null, $dbwhere = null)
 {
     if ($dbwhere == null || $dbwhere == "") {
         $resaco = $this->sql_record($this->sql_query_file($pc17_codigo));
     } else {
         $resaco = $this->sql_record($this->sql_query_file(null, "*", null, $dbwhere));
     }
     if ($resaco != false || $this->numrows != 0) {
         for ($iresaco = 0; $iresaco < $this->numrows; $iresaco++) {
             $resac = db_query("select nextval('db_acount_id_acount_seq') as acount");
             $acount = pg_result($resac, 0, 0);
             $resac = db_query("insert into db_acountacesso values({$acount}," . db_getsession("DB_acessado") . ")");
             $resac = db_query("insert into db_acountkey values({$acount},6460,'{$pc17_codigo}','E')");
             $resac = db_query("insert into db_acount values({$acount},1061,6453,'','" . AddSlashes(pg_result($resaco, $iresaco, 'pc17_unid')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
             $resac = db_query("insert into db_acount values({$acount},1061,6459,'','" . AddSlashes(pg_result($resaco, $iresaco, 'pc17_quant')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
             $resac = db_query("insert into db_acount values({$acount},1061,6460,'','" . AddSlashes(pg_result($resaco, $iresaco, 'pc17_codigo')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
         }
     }
     $sql = " delete from solicitemunid\n                    where ";
     $sql2 = "";
     if ($dbwhere == null || $dbwhere == "") {
         if ($pc17_codigo != "") {
             if ($sql2 != "") {
                 $sql2 .= " and ";
             }
             $sql2 .= " pc17_codigo = {$pc17_codigo} ";
         }
     } else {
         $sql2 = $dbwhere;
     }
     $result = db_query($sql . $sql2);
     if ($result == false) {
         $this->erro_banco = str_replace("\n", "", @pg_last_error());
         $this->erro_sql = "Unidade/quantidade dos itens nao Excluído. Exclusão Abortada.\\n";
         $this->erro_sql .= "Valores : " . $pc17_codigo;
         $this->erro_msg = "Usuário: \\n\\n " . $this->erro_sql . " \\n\\n";
         $this->erro_msg .= str_replace('"', "", str_replace("'", "", "Administrador: \\n\\n " . $this->erro_banco . " \\n"));
         $this->erro_status = "0";
         $this->numrows_excluir = 0;
         return false;
     } else {
         if (pg_affected_rows($result) == 0) {
             $this->erro_banco = "";
             $this->erro_sql = "Unidade/quantidade dos itens nao Encontrado. Exclusão não Efetuada.\\n";
             $this->erro_sql .= "Valores : " . $pc17_codigo;
             $this->erro_msg = "Usuário: \\n\\n " . $this->erro_sql . " \\n\\n";
             $this->erro_msg .= str_replace('"', "", str_replace("'", "", "Administrador: \\n\\n " . $this->erro_banco . " \\n"));
             $this->erro_status = "1";
             $this->numrows_excluir = 0;
             return true;
         } else {
             $this->erro_banco = "";
             $this->erro_sql = "Exclusão efetuada com Sucesso\\n";
             $this->erro_sql .= "Valores : " . $pc17_codigo;
             $this->erro_msg = "Usuário: \\n\\n " . $this->erro_sql . " \\n\\n";
             $this->erro_msg .= str_replace('"', "", str_replace("'", "", "Administrador: \\n\\n " . $this->erro_banco . " \\n"));
             $this->erro_status = "1";
             $this->numrows_excluir = pg_affected_rows($result);
             return true;
         }
     }
 }
开发者ID:arendasistemasintegrados,项目名称:mateusleme,代码行数:62,代码来源:db_solicitemunid_classe.php

示例11: sql_query_deb

 function sql_query_deb($v14_certid = null, $v14_coddiv = null, $campos = "*", $ordem = null, $dbwhere = "", $instit = "")
 {
     if ($instit == "") {
         $instit = db_getsession('DB_instit');
     }
     $sql = "select ";
     if ($campos != "*") {
         $campos_sql = split("#", $campos);
         $virgula = "";
         for ($i = 0; $i < sizeof($campos_sql); $i++) {
             $sql .= $virgula . $campos_sql[$i];
             $virgula = ",";
         }
     } else {
         $sql .= $campos;
     }
     $sql .= " from certdiv ";
     $sql .= "      inner join divida\t\t  on divida.v01_coddiv = certdiv.v14_coddiv   ";
     $sql .= "                           and v01_instit = {$instit}\t\t\t\t\t\t\t\t\t\t  ";
     $sql .= "      left  join arrematric on divida.v01_numpre = arrematric.k00_numpre";
     $sql .= "      left  join arreinscr  on divida.v01_numpre = arreinscr.k00_numpre ";
     $sql .= "      inner join certid\t\t\ton certid.v13_certid = certdiv.v14_certid   ";
     $sql .= "                           and v13_instit = {$instit}\t\t\t\t\t\t\t\t\t\t  ";
     $sql .= "      inner join cgm\t\t\t  on cgm.z01_numcgm    = divida.v01_numcgm\t  ";
     $sql .= "      inner join proced\t\t  on proced.v03_codigo = divida.v01_proced\t\t";
     $sql2 = "";
     if ($dbwhere == "") {
         if ($v14_certid != null) {
             $sql2 .= " where certdiv.v14_certid = {$v14_certid} ";
         }
         if ($v14_coddiv != null) {
             if ($sql2 != "") {
                 $sql2 .= " and ";
             } else {
                 $sql2 .= " where ";
             }
             $sql2 .= " certdiv.v14_coddiv = {$v14_coddiv} ";
         }
     } else {
         if ($dbwhere != "") {
             $sql2 = " where {$dbwhere}";
         }
     }
     $sql .= $sql2;
     if ($ordem != null) {
         $sql .= " order by ";
         $campos_sql = split("#", $ordem);
         $virgula = "";
         for ($i = 0; $i < sizeof($campos_sql); $i++) {
             $sql .= $virgula . $campos_sql[$i];
             $virgula = ",";
         }
     }
     return $sql;
 }
开发者ID:arendasistemasintegrados,项目名称:mateusleme,代码行数:55,代码来源:db_certdiv_classe.php

示例12: sql_query

 function sql_query($k24_sequencia = null, $campos = "*", $ordem = null, $dbwhere = "")
 {
     $sql = "select ";
     if ($campos != "*") {
         $campos_sql = split("#", $campos);
         $virgula = "";
         for ($i = 0; $i < sizeof($campos_sql); $i++) {
             $sql .= $virgula . $campos_sql[$i];
             $virgula = ",";
         }
     } else {
         $sql .= $campos;
     }
     $sql .= " from cancdebitosprocreg ";
     $sql .= "      inner join cancdebitosreg  on  cancdebitosreg.k21_sequencia = cancdebitosprocreg.k24_cancdebitosreg";
     $sql .= "      inner join cancdebitosproc on  cancdebitosproc.k23_codigo = cancdebitosprocreg.k24_codigo";
     $sql .= "      inner join cancdebitos     on  cancdebitos.k20_codigo = cancdebitosreg.k21_codigo";
     $sql .= "                                and  cancdebitos.k20_instit = " . db_getsession("DB_instit");
     $sql .= "      inner join db_usuarios     on  db_usuarios.id_usuario = cancdebitosproc.k23_usuario";
     $sql2 = "";
     if ($dbwhere == "") {
         if ($k24_sequencia != null) {
             $sql2 .= " where cancdebitosprocreg.k24_sequencia = {$k24_sequencia} ";
         }
     } else {
         if ($dbwhere != "") {
             $sql2 = " where {$dbwhere}";
         }
     }
     $sql .= $sql2;
     if ($ordem != null) {
         $sql .= " order by ";
         $campos_sql = split("#", $ordem);
         $virgula = "";
         for ($i = 0; $i < sizeof($campos_sql); $i++) {
             $sql .= $virgula . $campos_sql[$i];
             $virgula = ",";
         }
     }
     return $sql;
 }
开发者ID:arendasistemasintegrados,项目名称:mateusleme,代码行数:41,代码来源:db_cancdebitosprocreg_classe.php

示例13: excluir

 function excluir($y07_sequencial = null, $dbwhere = null)
 {
     if ($dbwhere == null || $dbwhere == "") {
         $resaco = $this->sql_record($this->sql_query_file($y07_sequencial));
     } else {
         $resaco = $this->sql_record($this->sql_query_file(null, "*", null, $dbwhere));
     }
     if ($resaco != false || $this->numrows != 0) {
         for ($iresaco = 0; $iresaco < $this->numrows; $iresaco++) {
             $resac = db_query("select nextval('db_acount_id_acount_seq') as acount");
             $acount = pg_result($resac, 0, 0);
             $resac = db_query("insert into db_acountacesso values({$acount}," . db_getsession("DB_acessado") . ")");
             $resac = db_query("insert into db_acountkey values({$acount},8197,'{$y07_sequencial}','E')");
             $resac = db_query("insert into db_acount values({$acount},1380,8197,'','" . AddSlashes(pg_result($resaco, $iresaco, 'y07_sequencial')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
             $resac = db_query("insert into db_acount values({$acount},1380,8198,'','" . AddSlashes(pg_result($resaco, $iresaco, 'y07_aidof')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
             $resac = db_query("insert into db_acount values({$acount},1380,8199,'','" . AddSlashes(pg_result($resaco, $iresaco, 'y07_ip')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
             $resac = db_query("insert into db_acount values({$acount},1380,8200,'','" . AddSlashes(pg_result($resaco, $iresaco, 'y07_data')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
             $resac = db_query("insert into db_acount values({$acount},1380,8201,'','" . AddSlashes(pg_result($resaco, $iresaco, 'y07_hora')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
         }
     }
     $sql = " delete from aidofweb\n                    where ";
     $sql2 = "";
     if ($dbwhere == null || $dbwhere == "") {
         if ($y07_sequencial != "") {
             if ($sql2 != "") {
                 $sql2 .= " and ";
             }
             $sql2 .= " y07_sequencial = {$y07_sequencial} ";
         }
     } else {
         $sql2 = $dbwhere;
     }
     $result = db_query($sql . $sql2);
     if ($result == false) {
         $this->erro_banco = str_replace("\n", "", @pg_last_error());
         $this->erro_sql = "Dados da web da aidof nao Excluído. Exclusão Abortada.\\n";
         $this->erro_sql .= "Valores : " . $y07_sequencial;
         $this->erro_msg = "Usuário: \\n\\n " . $this->erro_sql . " \\n\\n";
         $this->erro_msg .= str_replace('"', "", str_replace("'", "", "Administrador: \\n\\n " . $this->erro_banco . " \\n"));
         $this->erro_status = "0";
         $this->numrows_excluir = 0;
         return false;
     } else {
         if (pg_affected_rows($result) == 0) {
             $this->erro_banco = "";
             $this->erro_sql = "Dados da web da aidof nao Encontrado. Exclusão não Efetuada.\\n";
             $this->erro_sql .= "Valores : " . $y07_sequencial;
             $this->erro_msg = "Usuário: \\n\\n " . $this->erro_sql . " \\n\\n";
             $this->erro_msg .= str_replace('"', "", str_replace("'", "", "Administrador: \\n\\n " . $this->erro_banco . " \\n"));
             $this->erro_status = "1";
             $this->numrows_excluir = 0;
             return true;
         } else {
             $this->erro_banco = "";
             $this->erro_sql = "Exclusão efetuada com Sucesso\\n";
             $this->erro_sql .= "Valores : " . $y07_sequencial;
             $this->erro_msg = "Usuário: \\n\\n " . $this->erro_sql . " \\n\\n";
             $this->erro_msg .= str_replace('"', "", str_replace("'", "", "Administrador: \\n\\n " . $this->erro_banco . " \\n"));
             $this->erro_status = "1";
             $this->numrows_excluir = pg_affected_rows($result);
             return true;
         }
     }
 }
开发者ID:arendasistemasintegrados,项目名称:mateusleme,代码行数:64,代码来源:db_aidofweb_classe.php

示例14: excluir

 function excluir($j23_anousu = null, $j23_matric = null, $dbwhere = null)
 {
     if ($dbwhere == null || $dbwhere == "") {
         $resaco = $this->sql_record($this->sql_query_file($j23_anousu, $j23_matric));
     } else {
         $resaco = $this->sql_record($this->sql_query_file(null, null, "*", null, $dbwhere));
     }
     if ($resaco != false || $this->numrows != 0) {
         for ($iresaco = 0; $iresaco < $this->numrows; $iresaco++) {
             $resac = db_query("select nextval('db_acount_id_acount_seq') as acount");
             $acount = pg_result($resac, 0, 0);
             $resac = db_query("insert into db_acountacesso values({$acount}," . db_getsession("DB_acessado") . ")");
             $resac = db_query("insert into db_acountkey values({$acount},591,'{$j23_anousu}','E')");
             $resac = db_query("insert into db_acountkey values({$acount},592,'{$j23_matric}','E')");
             $resac = db_query("insert into db_acount values({$acount},115,591,'','" . AddSlashes(pg_result($resaco, $iresaco, 'j23_anousu')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
             $resac = db_query("insert into db_acount values({$acount},115,592,'','" . AddSlashes(pg_result($resaco, $iresaco, 'j23_matric')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
             $resac = db_query("insert into db_acount values({$acount},115,593,'','" . AddSlashes(pg_result($resaco, $iresaco, 'j23_testad')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
             $resac = db_query("insert into db_acount values({$acount},115,594,'','" . AddSlashes(pg_result($resaco, $iresaco, 'j23_arealo')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
             $resac = db_query("insert into db_acount values({$acount},115,598,'','" . AddSlashes(pg_result($resaco, $iresaco, 'j23_areafr')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
             $resac = db_query("insert into db_acount values({$acount},115,601,'','" . AddSlashes(pg_result($resaco, $iresaco, 'j23_areaed')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
             $resac = db_query("insert into db_acount values({$acount},115,602,'','" . AddSlashes(pg_result($resaco, $iresaco, 'j23_m2terr')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
             $resac = db_query("insert into db_acount values({$acount},115,605,'','" . AddSlashes(pg_result($resaco, $iresaco, 'j23_vlrter')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
             $resac = db_query("insert into db_acount values({$acount},115,609,'','" . AddSlashes(pg_result($resaco, $iresaco, 'j23_aliq')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
             $resac = db_query("insert into db_acount values({$acount},115,618,'','" . AddSlashes(pg_result($resaco, $iresaco, 'j23_vlrisen')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
             $resac = db_query("insert into db_acount values({$acount},115,6834,'','" . AddSlashes(pg_result($resaco, $iresaco, 'j23_tipoim')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
             $resac = db_query("insert into db_acount values({$acount},115,6835,'','" . AddSlashes(pg_result($resaco, $iresaco, 'j23_manual')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
             $resac = db_query("insert into db_acount values({$acount},115,11024,'','" . AddSlashes(pg_result($resaco, $iresaco, 'j23_tipocalculo')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
         }
     }
     $sql = " delete from iptucalc\n                    where ";
     $sql2 = "";
     if ($dbwhere == null || $dbwhere == "") {
         if ($j23_anousu != "") {
             if ($sql2 != "") {
                 $sql2 .= " and ";
             }
             $sql2 .= " j23_anousu = {$j23_anousu} ";
         }
         if ($j23_matric != "") {
             if ($sql2 != "") {
                 $sql2 .= " and ";
             }
             $sql2 .= " j23_matric = {$j23_matric} ";
         }
     } else {
         $sql2 = $dbwhere;
     }
     $result = db_query($sql . $sql2);
     if ($result == false) {
         $this->erro_banco = str_replace("\n", "", @pg_last_error());
         $this->erro_sql = " nao Excluído. Exclusão Abortada.\\n";
         $this->erro_sql .= "Valores : " . $j23_anousu . "-" . $j23_matric;
         $this->erro_msg = "Usuário: \\n\\n " . $this->erro_sql . " \\n\\n";
         $this->erro_msg .= str_replace('"', "", str_replace("'", "", "Administrador: \\n\\n " . $this->erro_banco . " \\n"));
         $this->erro_status = "0";
         $this->numrows_excluir = 0;
         return false;
     } else {
         if (pg_affected_rows($result) == 0) {
             $this->erro_banco = "";
             $this->erro_sql = " nao Encontrado. Exclusão não Efetuada.\\n";
             $this->erro_sql .= "Valores : " . $j23_anousu . "-" . $j23_matric;
             $this->erro_msg = "Usuário: \\n\\n " . $this->erro_sql . " \\n\\n";
             $this->erro_msg .= str_replace('"', "", str_replace("'", "", "Administrador: \\n\\n " . $this->erro_banco . " \\n"));
             $this->erro_status = "1";
             $this->numrows_excluir = 0;
             return true;
         } else {
             $this->erro_banco = "";
             $this->erro_sql = "Exclusão efetuada com Sucesso\\n";
             $this->erro_sql .= "Valores : " . $j23_anousu . "-" . $j23_matric;
             $this->erro_msg = "Usuário: \\n\\n " . $this->erro_sql . " \\n\\n";
             $this->erro_msg .= str_replace('"', "", str_replace("'", "", "Administrador: \\n\\n " . $this->erro_banco . " \\n"));
             $this->erro_status = "1";
             $this->numrows_excluir = pg_affected_rows($result);
             return true;
         }
     }
 }
开发者ID:arendasistemasintegrados,项目名称:mateusleme,代码行数:79,代码来源:db_iptucalc_classe.php

示例15: excluir

 function excluir($it22_sequencial = null, $dbwhere = null)
 {
     if ($dbwhere == null || $dbwhere == "") {
         $resaco = $this->sql_record($this->sql_query_file($it22_sequencial));
     } else {
         $resaco = $this->sql_record($this->sql_query_file(null, "*", null, $dbwhere));
     }
     if ($resaco != false || $this->numrows != 0) {
         for ($iresaco = 0; $iresaco < $this->numrows; $iresaco++) {
             $resac = db_query("select nextval('db_acount_id_acount_seq') as acount");
             $acount = pg_result($resac, 0, 0);
             $resac = db_query("insert into db_acountacesso values({$acount}," . db_getsession("DB_acessado") . ")");
             $resac = db_query("insert into db_acountkey values({$acount},9001,'{$it22_sequencial}','E')");
             $resac = db_query("insert into db_acount values({$acount},1540,9001,'','" . AddSlashes(pg_result($resaco, $iresaco, 'it22_sequencial')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
             $resac = db_query("insert into db_acount values({$acount},1540,9002,'','" . AddSlashes(pg_result($resaco, $iresaco, 'it22_itbi')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
             $resac = db_query("insert into db_acount values({$acount},1540,9003,'','" . AddSlashes(pg_result($resaco, $iresaco, 'it22_setor')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
             $resac = db_query("insert into db_acount values({$acount},1540,9004,'','" . AddSlashes(pg_result($resaco, $iresaco, 'it22_quadra')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
             $resac = db_query("insert into db_acount values({$acount},1540,9005,'','" . AddSlashes(pg_result($resaco, $iresaco, 'it22_lote')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
             $resac = db_query("insert into db_acount values({$acount},1540,9006,'','" . AddSlashes(pg_result($resaco, $iresaco, 'it22_descrlograd')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
             $resac = db_query("insert into db_acount values({$acount},1540,9007,'','" . AddSlashes(pg_result($resaco, $iresaco, 'it22_numero')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
             $resac = db_query("insert into db_acount values({$acount},1540,9008,'','" . AddSlashes(pg_result($resaco, $iresaco, 'it22_compl')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
             $resac = db_query("insert into db_acount values({$acount},1540,13531,'','" . AddSlashes(pg_result($resaco, $iresaco, 'it22_matricri')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
             $resac = db_query("insert into db_acount values({$acount},1540,13533,'','" . AddSlashes(pg_result($resaco, $iresaco, 'it22_quadrari')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
             $resac = db_query("insert into db_acount values({$acount},1540,13534,'','" . AddSlashes(pg_result($resaco, $iresaco, 'it22_loteri')) . "'," . db_getsession('DB_datausu') . "," . db_getsession('DB_id_usuario') . ")");
         }
     }
     $sql = " delete from itbidadosimovel\n                    where ";
     $sql2 = "";
     if ($dbwhere == null || $dbwhere == "") {
         if ($it22_sequencial != "") {
             if ($sql2 != "") {
                 $sql2 .= " and ";
             }
             $sql2 .= " it22_sequencial = {$it22_sequencial} ";
         }
     } else {
         $sql2 = $dbwhere;
     }
     $result = db_query($sql . $sql2);
     if ($result == false) {
         $this->erro_banco = str_replace("\n", "", @pg_last_error());
         $this->erro_sql = "Dados do imovel nao Excluído. Exclusão Abortada.\\n";
         $this->erro_sql .= "Valores : " . $it22_sequencial;
         $this->erro_msg = "Usuário: \\n\\n " . $this->erro_sql . " \\n\\n";
         $this->erro_msg .= str_replace('"', "", str_replace("'", "", "Administrador: \\n\\n " . $this->erro_banco . " \\n"));
         $this->erro_status = "0";
         $this->numrows_excluir = 0;
         return false;
     } else {
         if (pg_affected_rows($result) == 0) {
             $this->erro_banco = "";
             $this->erro_sql = "Dados do imovel nao Encontrado. Exclusão não Efetuada.\\n";
             $this->erro_sql .= "Valores : " . $it22_sequencial;
             $this->erro_msg = "Usuário: \\n\\n " . $this->erro_sql . " \\n\\n";
             $this->erro_msg .= str_replace('"', "", str_replace("'", "", "Administrador: \\n\\n " . $this->erro_banco . " \\n"));
             $this->erro_status = "1";
             $this->numrows_excluir = 0;
             return true;
         } else {
             $this->erro_banco = "";
             $this->erro_sql = "Exclusão efetuada com Sucesso\\n";
             $this->erro_sql .= "Valores : " . $it22_sequencial;
             $this->erro_msg = "Usuário: \\n\\n " . $this->erro_sql . " \\n\\n";
             $this->erro_msg .= str_replace('"', "", str_replace("'", "", "Administrador: \\n\\n " . $this->erro_banco . " \\n"));
             $this->erro_status = "1";
             $this->numrows_excluir = pg_affected_rows($result);
             return true;
         }
     }
 }
开发者ID:arendasistemasintegrados,项目名称:mateusleme,代码行数:70,代码来源:db_itbidadosimovel_classe.php


注:本文中的db_getsession函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。