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


PHP sql_db::sql_fetchfield方法代码示例

本文整理汇总了PHP中sql_db::sql_fetchfield方法的典型用法代码示例。如果您正苦于以下问题:PHP sql_db::sql_fetchfield方法的具体用法?PHP sql_db::sql_fetchfield怎么用?PHP sql_db::sql_fetchfield使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sql_db的用法示例。


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

示例1: elseif

<?php

if ($_POST["azione"] == "Chiudi") {
    $active_form = "clp.iter.php?comm_paesaggio=1&pratica={$idpratica}";
} elseif ($_POST["azione"] == "Elimina") {
    $db = new sql_db(DB_HOST, DB_USER, DB_PWD, DB_NAME, false);
    if (!$db->db_connect_id) {
        die("Impossibile connettersi al database " . DB_NAME);
    }
    $sql = "SELECT stampe from ce.iter where id=" . $_POST["idriga"];
    $db->sql_query($sql);
    $id_stampa = $db->sql_fetchfield("stampe");
    $sql = "DELETE FROM stp.stampe WHERE id={$id_stampa};";
    $db->sql_query($sql);
    include_once "./db/db.savedata.php";
} else {
    include_once "./db/db.savedata.php";
    $sql = "UPDATE ce.iter SET nota=nota_edit WHERE id={$lastid};";
    $db->sql_query($sql);
}
开发者ID:mamogmx,项目名称:praticaweb-alghero,代码行数:20,代码来源:db.clp.iter.php

示例2: addslashes

$sql = "SELECT id,nome,descrizione FROM stp.css order by ordine";
$db->sql_query($sql);
$css_nome = $db->sql_fetchlist('nome');
$css_desc = $db->sql_fetchlist('descrizione');
$css_id = $db->sql_fetchlist('id');
for ($i = 0; $i < count($css_desc); $i++) {
    $css_desc[$i] = addslashes(trim($css_desc[$i]));
}
/*GESTIONE DEL FILE*/
if ($_REQUEST["file"]) {
    $file = $_REQUEST["file"];
    $tipo = $_REQUEST["tipo"];
} elseif ($_REQUEST["id_doc"]) {
    $sql = "SELECT file_doc FROM stp.stampe WHERE id=" . $_REQUEST['id_doc'];
    $db->sql_query($sql);
    $file = $db->sql_fetchfield('file_doc');
    $tipo = "documenti";
    $id_doc = $_REQUEST["id_doc"];
    $id = $_REQUEST["id"];
} elseif ($_REQUEST["id_modelli"]) {
    $id_modelli = $_REQUEST["id_modelli"];
    $sql = "SELECT e_modelli.nome,form,testohtml,css_id,definizione,css.descrizione as css_desc FROM stp.e_modelli LEFT JOIN stp.css on (css_id=css.id) WHERE e_modelli.id={$id_modelli}";
    $db->sql_query($sql);
    $file = $db->sql_fetchfield('nome');
    $form = $db->sql_fetchfield('form');
    $testo = $db->sql_fetchfield('testohtml');
    $css_modello = $db->sql_fetchfield('css_id');
    $definizione = $db->sql_fetchfield('definizione');
    $mess_css = $db->sql_fetchfield('css_desc');
    $tipo = "modelli";
} elseif ($_REQUEST["mode"] == "new") {
开发者ID:mamogmx,项目名称:praticaweb-alghero,代码行数:31,代码来源:stp.editor.php

示例3: die

include_once "../login.php";
error_reporting(E_ERROR);
//if(!$dbconn->connection_id){
$dbconn = new sql_db(DB_HOST, DB_USER, DB_PWD, DB_NAME, false);
if (!$dbconn->db_connect_id) {
    die("Impossibile connettersi al database");
}
//}
if ($_REQUEST['id_doc']) {
    $idDoc = $_REQUEST['id_doc'];
    $testo = $_REQUEST['testo'];
    $testo = html_entity_decode($testo);
    $sql = "SELECT file_doc,definizione,css.nome,print_type,stampe.form,stampe.pratica,c.testo as footer,d.testo as header,d.margin as mtop,c.margin as mbottom FROM stp.stampe left join stp.e_modelli on(stampe.modello=e_modelli.id) left join stp.css on(css_id=css.id) left join stp.e_intestazioni c on(footer=c.id) left join stp.e_intestazioni d on(header=d.id) WHERE stampe.id={$idDoc};";
    $dbconn->sql_query($sql);
    $pratica = $dbconn->sql_fetchfield('pratica');
    $file = $dbconn->sql_fetchfield('file_doc');
    $definizione = $dbconn->sql_fetchfield('definizione');
    $css_name = $dbconn->sql_fetchfield('nome');
    $form = $dbconn->sql_fetchfield('form');
    $footer = $dbconn->sql_fetchfield("footer");
    $header = $dbconn->sql_fetchfield("header");
    $mbottom = $dbconn->sql_fetchfield("mbottom");
    $mtop = $dbconn->sql_fetchfield("mtop");
    $is_cdu = $form == 'cdu.vincoli' ? 1 : 0;
    $infoFile = pathinfo($file);
    $nome = $infoFile["filename"];
    $ext = $infoFile["extension"];
    //print mb_detect_encoding($testo,"UTF-8, ISO-8859-1,ISO-8859-15");
    $testo = utf8_encode($testo);
    $pr = new pratica($pratica, $is_cdu);
开发者ID:mamogmx,项目名称:praticaweb-alghero,代码行数:30,代码来源:xSaveDocument.php

示例4: die

<?php

include "login.php";
include "./src/fckeditor/fckeditor.php";
/*GESTIONE DEL FILE*/
if ($_REQUEST["id_doc"]) {
    $db = new sql_db(DB_HOST, DB_USER, DB_PWD, DB_NAME, false);
    if (!$db->db_connect_id) {
        die("Impossibile connettersi al database");
    }
    $sql = "SELECT file_doc,definizione,css.nome,print_type FROM stp.stampe left join stp.e_modelli on(stampe.modello=e_modelli.id) left join stp.css on(css_id=css.id) WHERE stampe.id=" . $_REQUEST['id_doc'];
    $db->sql_query($sql);
    $file = $db->sql_fetchfield('file_doc');
    $definizione = $db->sql_fetchfield('definizione');
    $css_name = $db->sql_fetchfield('nome');
    $modal = $db->sql_fetchfield('print_type');
    $tipo = "documenti";
    $id_doc = $_REQUEST["id_doc"];
    $id = $_REQUEST["id"];
}
if ($_REQUEST["form"]) {
    $form = $_REQUEST["form"];
}
$dir = STAMPE;
$action = "window.opener.focus();window.close();";
$f = LIB . 'HTML_ToPDF.conf';
$handle = fopen($f, "r");
$conf = fread($handle, filesize($f));
fclose($handle);
if ($_POST["azione"] and $_POST["azione"] !== "Annulla") {
    $testo = stripslashes(htmlentities($_POST["testo"]));
开发者ID:mamogmx,项目名称:praticaweb-alghero,代码行数:31,代码来源:stp.editor_documenti.fck.php

示例5: die

<?php

//if(!defined("comune")) return;
require_once "login.php";
$db = new sql_db(DB_HOST, DB_USER, DB_PWD, DB_NAME, false);
if (!$db->db_connect_id) {
    die("Impossibile connettersi al database");
}
$oggi = date("d-m-Y");
$dataoneri = date("d/m/Y");
$pratica = $_REQUEST['pratica'];
$sql = "SELECT numero,coalesce(data_prot,data_presentazione) as data from pe.avvioproc where pratica={$pratica}";
$db->sql_query($sql);
$numero = $db->sql_fetchfield('numero');
//$dataoneri=$db->sql_fetchfield('data');
$query = "SELECT * FROM oneri.parametri where '{$dataoneri}'::date BETWEEN datein AND coalesce(dateed,CURRENT_DATE);";
$result = $db->sql_query($query);
//if(!$result){echo "SQL Error - ".mysql_error()."<br>".$query;return;}
$row = $db->sql_fetchrow($result);
$costo_base = $row['costo_base'];
$qbase = $row['quota_base'];
$classe = $row['classe_comune'];
$quota = $row['corrispettivo'];
$delibera = $row['delibera'];
$sql = "SELECT case when (not coalesce(piva,'')='') then coalesce(ragsoc,'') else coalesce(cognome,'')||' '||coalesce(nome,'') end as nominativo FROM pe.soggetti WHERE richiedente=1 and pratica={$pratica};";
$db->sql_query($sql);
$ris = $db->sql_fetchlist('nominativo');
$nominativi = implode('; ', $ris);
$sql = "SELECT coalesce(via,'')||' '||coalesce(civico,'') as indirizzi FROM pe.indirizzi WHERE pratica={$pratica};";
$db->sql_query($sql);
$ris = $db->sql_fetchlist('indirizzi');
开发者ID:mamogmx,项目名称:praticaweb-alghero,代码行数:31,代码来源:oneri.calcolo.c_monetario.php

示例6: values

            $sql = "insert into cdu.mappali (pratica,sezione,foglio,mappale) values ({$idpratica},{$sezione},{$foglio},{$mappale})";
            $result = $db->sql_query($sql);
        }
    }
}
if ($azione == "Elimina") {
    if ($_POST["active_form"] == "cdu.richiesta.php") {
        $id = $_POST["id"];
        $sql = "delete from cdu.mappali where id in(select q.id from cdu.mappali as p,cdu.mappali as q where p.foglio=q.foglio and p.mappale=q.mappale and p.id={$id});";
        $db->sql_query($sql);
    } else {
        if ($_POST["active_form"] == "cdu.vincoli.php") {
            $id = $_POST["idriga"];
            $sql_count = "SELECT coalesce(count(*),0) as quantita FROM cdu.mappali where pratica={$idpratica} and foglio='{$foglio}' and mappale='{$mappale}'";
            $db->sql_query($sql_count);
            $quantita = $db->sql_fetchfield('quantita');
            if ($quantita > 1) {
                $sql = "delete from cdu.mappali where id={$id}";
                print_debug($sql);
                $db->sql_query($sql);
            } else {
                if (NEW_VINCOLI == 1) {
                    $sql = "update cdu.mappali set sezione=NULL,vincolo=NULL,zona=NULL,tavola=NULL,perc_area='0' where id={$id}";
                } else {
                    $sql = "update cdu.mappali set sezione=NULL,vincolo=NULL,zona=NULL,perc_area='0' where id={$id}";
                }
                print_debug($sql);
                $db->sql_query($sql);
            }
        }
    }
开发者ID:mamogmx,项目名称:praticaweb-alghero,代码行数:31,代码来源:db.cdu.vincoli.php

示例7: elseif

            $is_save_ok = 0;
            //echo $sql;
        }
        if ($debug) {
            echo "{$sql}<br>";
        }
    }
} elseif ($modo == "delete") {
    $db = new sql_db(DB_HOST, DB_USER, DB_PWD, DB_NAME, false);
    if (!$db->db_connect_id) {
        die("Impossibile connettersi al database");
    }
    foreach ($_POST as $key => $val) {
        if ($val == "id" and $key != $_SESSION["USER_ID"]) {
            $sql = "SELECT permessi FROM admin.users WHERE userid={$key};";
            $db->sql_query($sql);
            $livello_utente = $db->sql_fetchfield("permessi");
            if ($livello_utente >= $_SESSION["PERMESSI"]) {
                $cond .= " userid={$key} OR";
            }
        }
    }
    if ($cond) {
        $cond = substr($cond, 0, strlen($cond) - 3);
        $sql = "DELETE FROM admin.users WHERE {$cond};";
        $db->sql_query($sql);
        if ($debug) {
            echo "{$sql}<br>";
        }
    }
}
开发者ID:mamogmx,项目名称:praticaweb-alghero,代码行数:31,代码来源:registra.php

示例8: isset

$active_form = "ce.esiti_commissione.php";
$tabpath = "ce";
$file_config = "{$tabpath}/esiti_commissione";
$modo = isset($_REQUEST["mode"]) ? $_REQUEST["mode"] : 'view';
$idcomm = $_REQUEST["pratica"];
//print_r($_REQUEST);
$tornaacasa = "\n\t<script language=javascript>\n\t\tparent.location='index.php';\n\t</script>";
if ($modo == "edit" || $modo == "view") {
    $db = new sql_db(DB_HOST, DB_USER, DB_PWD, DB_NAME, false);
    if (!$db->db_connect_id) {
        die("Impossibile connettersi al database");
    }
    $sql = "SELECT numero FROM pe.pareri left join pe.avvioproc on pareri.pratica=avvioproc.pratica WHERE pareri.id=" . $_REQUEST["id_parere"];
    $db->sql_query($sql);
    print_debug($sql);
    $num = $db->sql_fetchfield("numero");
}
?>


<html>
<head>
<title>Pareri della commissione - <?php 
echo $titolo;
?>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<SCRIPT language="javascript" src="js/LoadLibs.js" type="text/javascript"></SCRIPT>
<SCRIPT>
	function link(id,prat){
开发者ID:mamogmx,项目名称:praticaweb-alghero,代码行数:31,代码来源:ce.esiti_commissione_paesaggio.php

示例9: die

require_once "login.php";
//print_r($_POST);
include "./lib/tabella_h.class.php";
$tabpath = "stp";
$tipo = $_REQUEST["tipo"];
$mod = $tipo == 'html' ? 'nuovo' : '';
$db = new sql_db(DB_HOST, DB_USER, DB_PWD, DB_NAME, false);
if (!$db->db_connect_id) {
    die("Impossibile connettersi al database");
}
if ($_POST["azione"]) {
    $idrow = $_POST["idriga"];
    $sql = "SELECT * FROM stp.e_modelli WHERE id={$idrow}";
    $db->sql_query($sql);
    $nome = $db->sql_fetchfield("nome");
    $file = MODELLI_DIR . $nome;
    @unlink($file);
    $sql = "delete from stp.e_modelli where id={$idrow}";
    $db->sql_query($sql);
}
?>
<html>
<head>
<title>ELENCO MODELLI DI STAMPA</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<SCRIPT language="javascript" src="js/LoadLibs.js" type="text/javascript"></SCRIPT>
<script language="javascript">
<?php 
if ($tipo == "html") {
开发者ID:mamogmx,项目名称:praticaweb-alghero,代码行数:30,代码来源:stp.elenco_modelli.php

示例10: die

<?php

$db = new sql_db(DB_HOST, DB_USER, DB_PWD, DB_NAME, false);
if (!$db->db_connect_id) {
    die("Impossibile connettersi al database");
}
if ($_POST["idpratica"]) {
    $pratiche = $_POST["idpratica"];
    $idcomm = $_POST["pratica"];
    //$numero=$_POST["numero"];
    $uid = $_SESSION['USER_ID'];
    $sql = "SELECT tipo_comm,data_convocazione FROM ce.commissione WHERE id={$idcomm};";
    $db->sql_query($sql);
    print_debug($sql);
    $tipo_comm = $db->sql_fetchfield("tipo_comm");
    $data = $db->sql_fetchfield("data_convocazione");
    for ($i = 0; $i < count($pratiche); $i++) {
        $tmsins = time();
        $sql = "INSERT INTO pe.pareri(pratica,ente,data_rich,data_ril,uidins,tmsins) VALUES(" . $pratiche[$i] . ",{$tipo_comm},'{$data}'::date,'{$data}'::date,{$uid},{$tmsins})";
        $db->sql_query($sql);
        print_debug($sql);
    }
}
$active_form = "ce.ordinegiorno_paesaggio.php?comm_paesaggio=1&pratica={$idpratica}";
开发者ID:mamogmx,项目名称:praticaweb-alghero,代码行数:24,代码来源:db.ce.ordinegiorno_paesaggio.php

示例11: die

 function change_menu($idpratica, $oldtipo, $newtipo)
 {
     if (!$idpratica) {
         return;
     }
     $db = new sql_db(DB_HOST, DB_USER, DB_PWD, DB_NAME, false);
     if (!$db->db_connect_id) {
         die("Impossibile connettersi al dadabase");
     }
     $sql = "select menu_list from pe.menu where pratica={$idpratica};";
     $result = $db->sql_query($sql);
     $oldmenu = $db->sql_fetchfield("menu_list");
     $pos = strpos($oldmenu, "#");
     if ($pos) {
         //ho aggiunto dei menu al menu originale
         $oldmenu = substr($oldmenu, $pos);
     } else {
         $oldmenu = "";
     }
     $db->sql_query("update pe.menu set menu_list=e_tipopratica.menu_default || '{$oldmenu}' from pe.e_tipopratica where e_tipopratica.id={$newtipo} and pratica={$idpratica};");
     unset($_SESSION["MENU_" . $this->tipo . "_{$idpratica}"]);
     //$db->sql_close();
 }
开发者ID:mamogmx,项目名称:praticaweb-alghero,代码行数:23,代码来源:menu.class.php

示例12: die

<?php

include_once "login.php";
$db = new sql_db(DB_HOST, DB_USER, DB_PWD, DB_NAME, false);
if (!$db->db_connect_id) {
    die("Impossibile connettersi al database");
}
$documento = $_REQUEST["documento"];
$tipo = $_REQUEST["tipo"];
if ($tipo == 'doc') {
    header("Content-Type: application/vnd.ms-word; Charset=UTF-8");
    header("Content-Disposition: inline; filename=file.doc");
}
$sql = "SELECT testohtml,file_doc,modello FROM stp.stampe WHERE id='{$documento}';";
if ($db->sql_query($sql)) {
    $nome = $db->sql_fetchfield('file_doc');
    $testo = $db->sql_fetchfield('testohtml');
    $modello = $db->sql_fetchfield('modello');
} else {
    echo "{$sql}";
}
$sql = "SELECT definizione,script FROM stp.e_modelli,stp.css WHERE e_modelli.id='{$modello}' and e_modelli.css_id=css.id;";
if ($db->sql_query($sql)) {
    $css_def = $db->sql_fetchfield('definizione');
    $css_script = $db->sql_fetchfield('script');
} else {
    echo "{$sql}";
}
?>

<html>
开发者ID:mamogmx,项目名称:praticaweb-alghero,代码行数:31,代码来源:documentoHTML.php

示例13: die

    die("Impossibile connettersi al database");
}
/*Ricerca dei valori*/
$sql = "SELECT pratica,numero,data_presentazione FROM pe.avvioproc {$cond} order by data_presentazione,numero;";
//echo "<p>$sql</p>";
$db->sql_query($sql);
$risultato = $db->sql_fetchrowset();
//include "./lib/stati.class.php";
for ($i = 0; $i < count($risultato); $i++) {
    $pratica = $risultato[$i]["pratica"];
    //$st=new Stati($pratica);
    //$st->get_stato();
    //$stato=$st->stato["descrizione"];
    $sql_ins = "SELECT tmsins FROM pe.avvioproc WHERE pratica={$pratica};";
    $db->sql_query($sql_ins);
    $tms = $db->sql_fetchfield("tmsins");
    if ($tms) {
        $data_ins[] = date("d/m/y", $tms);
    } else {
        $data_ins[] = "non disponibile";
    }
    /*Ricerca Destinazione d'uso*/
    $sql_dest_uso = "SELECT destuso1,destuso2 FROM pe.progetto WHERE pratica={$pratica};";
    $db->sql_query($sql_dest_uso);
    $ris_destuso[] = $db->sql_fetchrowset();
    /*Ricerca info Richiedenti*/
    $sql_rich = "SELECT app||' '||nominativo as nome FROM stp.richiedenti WHERE pratica={$pratica};";
    //echo "$sql_rich<br>";
    $db->sql_query($sql_rich);
    $ris_rich[] = $db->sql_fetchrowset();
    //print_r($ris_rich);
开发者ID:mamogmx,项目名称:praticaweb-alghero,代码行数:31,代码来源:db.admin.report.php

示例14: die

//ELENCO DEI TIPI DI TAG
$regexp_cicli = '|<span class="cicli">(.*)IN_CICLO(.*)</span>(.+)<span class="cicli">FI_CICLO</span>|Umi';
$regexp_if = '|<span class="se">INIZIO_SE</span>(.+)<span class="se">FINE_SE</span>|Umi';
$regexp_tag = '|<span class="valore">(.+)</span>|Umi';
$regexp_tag_obbl = '|<span class="obbligatori">(.+)</span>|Umi';
if ($_POST["azione"] == "Salva") {
    if (!$testo) {
        $db = new sql_db(DB_HOST, DB_USER, DB_PWD, DB_NAME, false);
        if (!$db->db_connect_id) {
            die("Impossibile connettersi al database");
        }
        $sql = "SELECT CASE WHEN coalesce(testohtml,'')='' THEN 0 ELSE 1 END as presente FROM stp.e_modelli WHERE nome='{$nomemodello}'";
        if (!$db->sql_query($sql)) {
            print_debug($sql, null, "modelli");
        }
        $presente = $db->sql_fetchfield('presente');
        if ($presente) {
            $testo = html_entity_decode($testo);
            //str_replace(chr(10),"",$testo);
            $testo = str_replace(chr(13), "", $testo);
            $testo = str_replace('/"', '"', $testo);
            $exist = 1;
            //$testo=$testo;
        } else {
            include "./lib/modelli.class.php";
            $model = new print_model($testo);
            $model->check();
            $model->save(0, $nomemodello, $form, $css_modello);
            //$testo='<head><LINK media="screen" href="./src/modelli.css" type="text/css" rel="stylesheet"></head>'.	$model->model."";
            $testo = $model->model;
        }
开发者ID:mamogmx,项目名称:praticaweb-alghero,代码行数:31,代码来源:db.stp.editor.php

示例15: VALUES

    if ($modo == "new") {
        if (defined('GC_PROJECT')) {
            if ($_SESSION["PERMESSI"] > 1 && $role == 1) {
                $errors["role"] = "Non si dispone dei diritti per assegnare questo ruolo all'utente";
            } else {
                include "./db/db.gisclientuser.php";
                $sql = "INSERT INTO admin.users(userid,app,cognome,nominativo,username,pwd,enc_pwd,permessi,attivato,num_tel,info,gruppi,data_creazione,gisclient) VALUES({$newUserId},'{$app}','{$cognome}','{$nominativo}','{$username}','{$pwd}','{$enc_pwd}',{$livello_utente},{$attivato},'{$tel}','{$info}','{$gruppi}',now(),{$gc});";
                $db->sql_query($sql);
                $id = $newUserId;
            }
        } else {
            $sql = "INSERT INTO admin.users(app,cognome,nominativo,username,pwd,enc_pwd,permessi,attivato,num_tel,info,gruppi,data_creazione,gisclient) VALUES('{$app}','{$cognome}','{$nominativo}','{$username}','{$pwd}','{$enc_pwd}',{$livello_utente},{$attivato},'{$tel}','{$info}','{$gruppi}',now(),{$gc});";
            if (!$errors) {
                $db->sql_query($sql);
                $db->sql_query("SELECT max(userid) as lastvalue FROM admin.users");
                $id = $db->sql_fetchfield("lastvalue");
            }
        }
    } else {
        $sql = "UPDATE admin.users SET app='{$app}',nominativo='{$nominativo}',cognome='{$cognome}',username='{$username}',pwd='{$pwd}',enc_pwd='{$enc_pwd}',gruppi='{$gruppi}',permessi='{$livello_utente}',attivato='{$attivato}',num_tel='{$tel}',info='{$info}',data_modifica=now(),gisclient={$gc} WHERE userid={$id}";
        if (!$errors) {
            $db->sql_query($sql);
        }
    }
    if (!$errors) {
        $modo = "view";
    }
} elseif ($azione == "Elimina") {
    if ($livello_utente < $_SESSION["PERMESSI"]) {
        $errors["permessi"] = "Non si dispone dei permessi necessari";
    }
开发者ID:mamogmx,项目名称:praticaweb-alghero,代码行数:31,代码来源:db.admin.utenti.php


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