• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP sql_db类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: array

 function &getServiceInstance($name, $servicedir = NULL)
 {
     global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype;
     static $instances = array();
     static $db;
     if (!isset($db)) {
         require_once dirname(__FILE__) . '/../includes/db/' . $dbtype . '.php';
         $db = new sql_db();
         $db->sql_connect($dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist);
         if (!$db->db_connect_id) {
             message_die(CRITICAL_ERROR, "Could not connect to the database", $db);
         }
     }
     if (!isset($instances[$name])) {
         if (isset($serviceoverrules[$name])) {
             $name = $serviceoverrules[$name];
         }
         if (!class_exists($name)) {
             if (!isset($servicedir)) {
                 $servicedir = dirname(__FILE__) . '/';
             }
             require_once $servicedir . strtolower($name) . '.php';
         }
         $instances[$name] = call_user_func(array($name, 'getInstance'), $db);
     }
     return $instances[$name];
 }
开发者ID:kidwellj,项目名称:scuttle,代码行数:27,代码来源:servicefactory.php


示例2: substr

$phpEx = substr(strrchr(__FILE__, '.'), 1);
$phpbb_root_path = './../';
include $phpbb_root_path . 'config.' . $phpEx;
require $phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.' . $phpEx;
require $phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx;
include $phpbb_root_path . 'includes/functions.' . $phpEx;
define('ACL_NEVER', 0);
define('ACL_YES', 1);
define('ACL_NO', -1);
define('ACL_GROUPS_TABLE', $table_prefix . 'acl_groups');
define('ACL_OPTIONS_TABLE', $table_prefix . 'acl_options');
define('ACL_USERS_TABLE', $table_prefix . 'acl_users');
define('GROUPS_TABLE', $table_prefix . 'groups');
define('USERS_TABLE', $table_prefix . 'users');
$cache = new acm();
$db = new sql_db();
// Connect to DB
$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false);
// auth => is_local, is_global
$f_permissions = array('f_' => array(1, 0), 'f_list' => array(1, 0), 'f_read' => array(1, 0), 'f_post' => array(1, 0), 'f_reply' => array(1, 0), 'f_edit' => array(1, 0), 'f_user_lock' => array(1, 0), 'f_delete' => array(1, 0), 'f_bump' => array(1, 0), 'f_poll' => array(1, 0), 'f_vote' => array(1, 0), 'f_votechg' => array(1, 0), 'f_announce' => array(1, 0), 'f_sticky' => array(1, 0), 'f_attach' => array(1, 0), 'f_download' => array(1, 0), 'f_icons' => array(1, 0), 'f_bbcode' => array(1, 0), 'f_smilies' => array(1, 0), 'f_img' => array(1, 0), 'f_flash' => array(1, 0), 'f_sigs' => array(1, 0), 'f_search' => array(1, 0), 'f_email' => array(1, 0), 'f_print' => array(1, 0), 'f_ignoreflood' => array(1, 0), 'f_postcount' => array(1, 0), 'f_noapprove' => array(1, 0), 'f_report' => array(1, 0), 'f_subscribe' => array(1, 0));
$m_permissions = array('m_' => array(1, 1), 'm_edit' => array(1, 1), 'm_delete' => array(1, 1), 'm_move' => array(1, 1), 'm_lock' => array(1, 1), 'm_split' => array(1, 1), 'm_merge' => array(1, 1), 'm_approve' => array(1, 1), 'm_unrate' => array(1, 1), 'm_auth' => array(1, 1), 'm_ip' => array(1, 1), 'm_info' => array(1, 1));
$a_permissions = array('a_' => array(0, 1), 'a_server' => array(0, 1), 'a_board' => array(0, 1), 'a_clearlogs' => array(0, 1), 'a_words' => array(0, 1), 'a_icons' => array(0, 1), 'a_bbcode' => array(0, 1), 'a_attach' => array(0, 1), 'a_email' => array(0, 1), 'a_styles' => array(0, 1), 'a_user' => array(0, 1), 'a_useradd' => array(0, 1), 'a_userdel' => array(0, 1), 'a_ranks' => array(0, 1), 'a_ban' => array(0, 1), 'a_names' => array(0, 1), 'a_group' => array(0, 1), 'a_groupadd' => array(0, 1), 'a_groupdel' => array(0, 1), 'a_forum' => array(0, 1), 'a_forumadd' => array(0, 1), 'a_forumdel' => array(0, 1), 'a_prune' => array(0, 1), 'a_auth' => array(0, 1), 'a_authmods' => array(0, 1), 'a_authadmins' => array(0, 1), 'a_authusers' => array(0, 1), 'a_authgroups' => array(0, 1), 'a_authdeps' => array(0, 1), 'a_backup' => array(0, 1), 'a_restore' => array(0, 1), 'a_search' => array(0, 1), 'a_events' => array(0, 1), 'a_cron' => array(0, 1));
$u_permissions = array('u_' => array(0, 1), 'u_sendemail' => array(0, 1), 'u_readpm' => array(0, 1), 'u_sendpm' => array(0, 1), 'u_sendim' => array(0, 1), 'u_hideonline' => array(0, 1), 'u_viewonline' => array(0, 1), 'u_viewprofile' => array(0, 1), 'u_chgavatar' => array(0, 1), 'u_chggrp' => array(0, 1), 'u_chgemail' => array(0, 1), 'u_chgname' => array(0, 1), 'u_chgpasswd' => array(0, 1), 'u_chgcensors' => array(0, 1), 'u_search' => array(0, 1), 'u_savedrafts' => array(0, 1), 'u_download' => array(0, 1), 'u_attach' => array(0, 1), 'u_sig' => array(0, 1), 'u_pm_attach' => array(0, 1), 'u_pm_bbcode' => array(0, 1), 'u_pm_smilies' => array(0, 1), 'u_pm_download' => array(0, 1), 'u_pm_edit' => array(0, 1), 'u_pm_printpm' => array(0, 1), 'u_pm_emailpm' => array(0, 1), 'u_pm_forward' => array(0, 1), 'u_pm_delete' => array(0, 1), 'u_pm_img' => array(0, 1), 'u_pm_flash' => array(0, 1));
echo "<p><b>Determining existing permissions</b></p>\n";
$sql = 'SELECT auth_option_id, auth_option FROM ' . ACL_OPTIONS_TABLE;
$result = $db->sql_query($sql);
$remove_auth_options = array();
while ($row = $db->sql_fetchrow($result)) {
    if (!in_array($row['auth_option'], array_keys(${substr($row['auth_option'], 0, 2) . 'permissions'}))) {
        $remove_auth_options[$row['auth_option']] = $row['auth_option_id'];
    }
开发者ID:BackupTheBerlios,项目名称:phpbb-hu-svn,代码行数:31,代码来源:add_permissions.php


示例3: array

if (defined('NV_IS_FLOOD_BLOCKER') and NV_IS_FLOOD_BLOCKER == 1 and !$nv_Request->isset_request('admin', 'session') and (!$nv_Request->isset_request('second', 'get') or $nv_Request->isset_request('second', 'get') and $client_info['is_myreferer'] != 1)) {
    require_once NV_ROOTDIR . '/includes/core/flood_blocker.php';
}
//Xac dinh borwser cua client
$client_info['browser'] = $client_info['is_bot'] ? array('key' => "Unknown", 'name' => 'Unknown') : array_combine(array('key', 'name'), explode("|", nv_getBrowser(NV_USER_AGENT, NV_ROOTDIR . '/includes/ini/br.ini')));
//Xac dinh OS cua client
$client_info['client_os'] = $client_info['is_bot'] ? array('key' => "Robot", 'name' => $client_info['bot_info']['name']) : array_combine(array('key', 'name'), explode("|", nv_getOs(NV_USER_AGENT, NV_ROOTDIR . '/includes/ini/os.ini')));
//Captcha
if ($nv_Request->isset_request('scaptcha', 'get')) {
    include_once NV_ROOTDIR . "/includes/core/captcha.php";
}
//Bat dau phien lam viec cua MySQL
require_once NV_ROOTDIR . '/includes/class/mysql.class.php';
$db_config['new_link'] = NV_MYSQL_NEW_LINK;
$db_config['persistency'] = NV_MYSQL_PERSISTENCY;
$db = new sql_db($db_config);
if (!empty($db->error)) {
    $die = !empty($db->error['user_message']) ? $db->error['user_message'] : $db->error['message'];
    $die .= !empty($db->error['code']) ? ' (Code: ' . $db->error['code'] . ')' : '';
    trigger_error($die, 256);
}
unset($db_config['dbpass']);
//Ten cac table cua CSDL dung chung cho he thong
define('NV_AUTHORS_GLOBALTABLE', $db_config['prefix'] . '_authors');
define('NV_GROUPS_GLOBALTABLE', $db_config['prefix'] . '_groups');
define('NV_USERS_GLOBALTABLE', $db_config['prefix'] . '_users');
define('NV_SESSIONS_GLOBALTABLE', $db_config['prefix'] . '_sessions');
define('NV_LANGUAGE_GLOBALTABLE', $db_config['prefix'] . '_language');
define('NV_BANNERS_CLIENTS_GLOBALTABLE', $db_config['prefix'] . '_banners_clients');
define('NV_BANNERS_PLANS_GLOBALTABLE', $db_config['prefix'] . '_banners_plans');
define('NV_BANNERS_ROWS_GLOBALTABLE', $db_config['prefix'] . '_banners_rows');
开发者ID:syphuonglam,项目名称:creative-portal,代码行数:31,代码来源:mainfile.php


示例4: page_header

             $check_exts = 'mysql';
             $check_other = 'mysql';
             break;
         case 'postgres':
             $check_exts = 'pgsql';
             $check_other = 'pgsql';
             break;
     }
     if (!extension_loaded($check_exts) && !extension_loaded($check_other)) {
         page_header($lang['Install'], '');
         page_error($lang['Installer_Error'], $lang['Install_No_Ext']);
         page_footer();
         exit;
     }
     include $phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx;
     $db = new sql_db($dbhost, $dbuser, $dbpasswd, $dbname, false);
     if (!$db->db_connect_id) {
         message_die(CRITICAL_ERROR, "Could not connect to the database");
     }
 }
 $dbms_schema = 'schemas/' . $available_dbms[$dbms]['SCHEMA'] . '_schema.sql';
 $dbms_basic = 'schemas/' . $available_dbms[$dbms]['SCHEMA'] . '_basic.sql';
 $remove_remarks = $available_dbms[$dbms]['COMMENTS'];
 $delimiter = $available_dbms[$dbms]['DELIM'];
 $delimiter_basic = $available_dbms[$dbms]['DELIM_BASIC'];
 if ($install_step == 1) {
     if ($upgrade != 1) {
         if ($dbms != 'msaccess') {
             // Load in the sql parser
             include $phpbb_root_path . 'includes/sql_parse.' . $phpEx;
             // Ok we have the db info go ahead and read in the relevant schema
开发者ID:BackupTheBerlios,项目名称:phpbbsfp,代码行数:31,代码来源:install.php


示例5: sql_db

<?php

include_once "login.php";
//print_r($_REQUEST);
$db = new sql_db(DB_HOST, DB_USER, DB_PWD, DB_NAME, false);
if (!$db->db_connect_id) {
    die("Impossibile connettersi al database");
}
$object = $_POST["obj"];
$id = $_POST["id"];
$azione = $_POST["action"];
$sql = "select distinct zona.nome_tavola as id from vincoli.zona left join vincoli.tavola on(zona.nome_tavola=tavola.nome_tavola) where zona.nome_vincolo= '{$id}' and tavola.cdu=1;";
$db->sql_query($sql);
print_debug($sql);
$ris = $db->sql_fetchrowset();
for ($i = 0; $i < count($ris); $i++) {
    $out[] = "{id:'" . $ris[$i]["id"] . "',name:'" . $ris[$i]["id"] . "'}";
}
header("Content-Type: text/plain; Charset=UTF-8");
$debug = "{id:'{$object}',values:[" . implode(',', $out) . "]}";
print_debug($debug);
echo $debug;
开发者ID:mamogmx,项目名称:praticaweb-alghero,代码行数:22,代码来源:rpc_vincoli_cdu.php


示例6: dirname

{
	define('IP_ROOT_PATH', dirname(dirname($argv[0])) . '/');
}

define('IN_ICYPHOENIX', true);
if (!defined('IP_ROOT_PATH')) define('IP_ROOT_PATH', './');
if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));

@set_time_limit(0);
@ini_set('memory_limit', '32M');

require(IP_ROOT_PATH . 'config.' . PHP_EXT);
define('SQL_LAYER', 'mysql4');
require(IP_ROOT_PATH . 'includes/db/mysql.' . PHP_EXT);

$db = new sql_db($dbhost, $dbuser, $dbpasswd, $dbname, false);
if(!$db->db_connect_id)
{
	trigger_error('Database connection failed', E_USER_ERROR);
}

// HTML HEADER - BEGIN
echo("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n");
echo("<html xmlns=\"http://www.w3.org/1999/xhtml\">\n");
echo("<head>\n");
echo("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n");
echo("<meta name=\"author\" content=\"Icy Phoenix Team\" />\n");
echo("<title>Icy Phoenix :: UTF-8 Conversion</title>\n");
echo("</head>\n");
echo("<body>\n");
echo("<div style=\"font-family: 'Lucida Grande', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif; font-size: 10px;\">\n");
开发者ID:ALTUN69,项目名称:icy_phoenix,代码行数:31,代码来源:convert_utf8.php


示例7: sql_db

<?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


示例8: sql_db

<?php

if ($_POST["numero"]) {
    $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 id from pe.avvioproc where numero='" . $_POST["numero"] . "';";
    $db->sql_query($sql);
    $pratica = $db->sql_fetchfield("id");
    if ($pratica) {
        $sql = "\n\t\tDELETE FROM oneri.calcolati WHERE PRATICA={$pratica};\n\t\tDELETE FROM oneri.fidi WHERE PRATICA={$pratica};\n\t\tDELETE FROM oneri.monetizzazione WHERE PRATICA={$pratica};\n\t\tDELETE FROM oneri.rate WHERE PRATICA={$pratica};\n\t\tDELETE FROM oneri.totali WHERE PRATICA={$pratica};\n\t\tDELETE FROM pe.abitabi WHERE PRATICA={$pratica};\n\t\tDELETE FROM pe.allegati WHERE PRATICA={$pratica};\n\t\tDELETE FROM pe.asservimenti WHERE PRATICA={$pratica};\n\t\tDELETE FROM pe.asservimenti_map WHERE PRATICA={$pratica};\n\t\tDELETE FROM pe.avvioproc WHERE PRATICA={$pratica};\n\t\tDELETE FROM pe.cterreni WHERE PRATICA={$pratica};\n\t\tDELETE FROM pe.curbano WHERE PRATICA={$pratica};\n\t\tDELETE FROM pe.file_allegati WHERE PRATICA={$pratica};\n\t\tDELETE FROM pe.indirizzi WHERE PRATICA={$pratica};\n\t\tDELETE FROM pe.infodia WHERE PRATICA={$pratica};\n\t\tDELETE FROM pe.integrazioni WHERE PRATICA={$pratica};\n\t\tDELETE FROM pe.iter WHERE PRATICA={$pratica};\n\t\tDELETE FROM pe.lavori WHERE PRATICA={$pratica};\n\t\tDELETE FROM pe.menu WHERE PRATICA={$pratica};\n\t\tDELETE FROM pe.parametri_prog WHERE PRATICA={$pratica};\n\t\tDELETE FROM pe.pareri WHERE PRATICA={$pratica};\n\t\tDELETE FROM pe.progetto WHERE PRATICA={$pratica};\n\t\tDELETE FROM pe.proroga WHERE PRATICA={$pratica};\n\t\tDELETE FROM pe.soggetti WHERE PRATICA={$pratica};\n\t\tDELETE FROM pe.sopralluoghi WHERE PRATICA={$pratica};\n\t\tDELETE FROM pe.titolo WHERE PRATICA={$pratica};\n\t\tDELETE FROM pe.vincoli WHERE PRATICA={$pratica};\n\t\tDELETE FROM pe.volture WHERE PRATICA={$pratica};\n\t\t";
        $result = $db->sql_query($sql);
        if ($result) {
            echo "pratica eliminata con successo";
        }
    }
}
开发者ID:mamogmx,项目名称:praticaweb-alghero,代码行数:18,代码来源:db.pe.elimina.php


示例9: sql_db

<?php

//Gestione della rateizzazione calcolo delle rate
//DA RIVEDERE LE GESTIONE DEI DATI STATICI es titolo
//DA PERSONALIZZARE SULLE ESIGENZE DEL COMUNE
//echo "calcolo della rateizzazione";
//print_r($_POST);
$db = new sql_db(DB_HOST, DB_USER, DB_PWD, DB_NAME, false);
if (!$db->db_connect_id) {
    die("Impossibile connettersi al database");
}
$campo_cc = $_POST["scade_cc"];
$campo_oneri = $_POST["scade_oneri"];
$tipo = trim($_POST["tipo"]);
$data_rata1 = $_POST["data_rata1"];
if ($campo_cc and $campo_oneri) {
    $sql = "select titolo." . $campo_cc . " as scade_cc, titolo." . $campo_oneri . " as scade_oneri,monet,cc,(b1-scb1) as b1,(b2-scb2) as b2 from oneri.totali,pe.titolo where oneri.totali.pratica=pe.titolo.pratica and pe.titolo.pratica={$idpratica}";
    if (!$db->sql_query($sql)) {
        print_debug($sql);
    }
    //$db->sql_query($sql);
    //echo "<p>$sql</p>";
    //$db->sql_fetchrow();
}
$oneri = 1;
if ($oneri) {
    $sql = "select * from oneri.e_rata_calcolo where tipo='{$tipo}' order by rata";
    print_debug($sql);
    if (!$db->sql_query($sql)) {
        print_debug($sql);
    }
开发者ID:mamogmx,项目名称:praticaweb-alghero,代码行数:31,代码来源:db.oneri.calcolarate.php


示例10: elseif

    $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") {
    $tipo = "modelli";
}
if ($_REQUEST["form"]) {
    $form = $_REQUEST["form"];
}
if ($tipo == "modelli") {
    /*SELEZIONE DELLE VISTE DAL DATABASE*/
    $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 'Seleziona -->' as nome,'' as tipo,'Seleziona -->' as alias_nome,'' as descrizione,1 as ord) UNION (SELECT DISTINCT nome_vista as nome,tipo,alias_nome_vista,descrizione_vista,2 as ord FROM stp.colonne) order by ord,nome;";
    $db->sql_query($sql);
    $tables = $db->sql_fetchlist('nome');
    $types = $db->sql_fetchlist('tipo');
    $alias = $db->sql_fetchlist('alias_nome');
    for ($i = 0; $i < count($tables); $i++) {
        $value = $types[$i] . "." . $tables[$i];
        $tmp = explode("_", $tables[$i]);
        $str_name = ucwords($alias[$i]);
        $print_options .= "\t\t\t\t\t\t\t\t\t<option value=\"{$value}\">{$str_name}</option>\n";
    }
    $sql = "SELECT CASE (tipo) WHEN 'FUNCTION' THEN 'FN_'||nome_vista ELSE nome_vista end as nome,nome as \t\tcolonna,alias_nome as alias_colonna,descrizione,visibile,tipo FROM stp.colonne WHERE visibile=1 order by nome_vista,nome;";
开发者ID:mamogmx,项目名称:praticaweb-alghero,代码行数:31,代码来源:stp.editor.php


示例11: 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


示例12: sql_db

?>
<html>
<head>
<title>Pratiche recenti</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>
</head>
<body link="#0000FF" vlink="#0000FF" alink="#0000FF">
<?php 
include "./inc/inc.page_header.php";
?>
<H2 class=blueBanner>Ultime pratiche aperte</H2>
<?php 
$userid = $_SESSION["USER_ID"];
$db = new sql_db(DB_HOST, DB_USER, DB_PWD, DB_NAME, false);
if (!$db->db_connect_id) {
    die("Impossibile connettersi al dadabase");
}
$db->sql_query("select pratica from pe.recenti where utente={$userid} order by data desc");
$elenco_pratiche = $db->sql_fetchlist("pratica");
$prat_max = count($elenco_pratiche);
if (!$elenco_pratiche) {
    print "<p>Nessuna pratica aperta di recente dall'utente<p></body></html>";
    exit;
}
$offset = 0;
include "pe.elenco_pratiche.php";
?>
				<input  name=""  id="" class="hexfield1"  type="button" value="  Chiudi  " onClick="javascript:window.open('index.php','indexPraticaweb');window.close()"></td>
</BODY>
开发者ID:mamogmx,项目名称:praticaweb-alghero,代码行数:31,代码来源:pe.recenti.php


示例13: elseif

            if ($ricerca["tipo_pratica"] == 1) {
                $arr_cond[] = "report._tipo_pratica BETWEEN 11000 AND 11999";
            } elseif ($ricerca["tipo_pratica"] == 2) {
                $arr_cond[] = "report._tipo_pratica BETWEEN 10000 AND 10999";
            } elseif ($ricerca["tipo_pratica"] > 2) {
                $arr_cond[] = "report._tipo_pratica = " . $ricerca["tipo_pratica"] . "";
            }
        }
        if (is_array($arr_cond)) {
            $cond = "(" . implode(") AND (", $arr_cond) . ")";
        }
        $tabella = new Tabella_h("admin/report", 'view');
        $nrows = $tabella->set_dati("{$cond} order by substr(report.numero,4,1),substr(report.numero,5,3),substr(report.numero,1,3)");
    }
}
$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 0 as id, 'Seleziona ===>' as opzione) UNION (SELECT 1 as id, 'Tutti i Permessi di Costruire' as opzione) UNION (SELECT 2 as id, 'Tutte le D.I.A.' as opzione) UNION (SELECT distinct id,nome as opzione FROM pe.e_tipopratica order by opzione);";
$db->sql_query($sql);
print_debug($sql);
$tipo_pratica = $db->sql_fetchrowset();
$sel_tipo_pratica = "";
foreach ($tipo_pratica as $val) {
    $s = $_POST["tipo_pratica"] && $_POST["tipo_pratica"] == $val["id"] ? "selected" : "";
    $sel_tipo_pratica .= "<option value=\"" . $val["id"] . "\" {$s}>" . $val["opzione"] . "</option>";
}
?>
<html>
<head>
开发者ID:mamogmx,项目名称:praticaweb-alghero,代码行数:31,代码来源:admin.report.php


示例14: sql_db

<?php

include_once "login.php";
$tabpath = "pe";
$notfound = 0;
//Attenzione funzione relazione tra il file elenco e
$pratichexpagina = 5;
$offset = 0;
$db = new sql_db(DB_HOST, DB_USER, DB_PWD, DB_NAME, false);
if (!$db->db_connect_id) {
    die("Impossibile connettersi al database");
}
if (isset($_POST["pag"])) {
    //pagina con i risultati al primo giro faccio tutta la query poi mi porto dietro l'array delle pratiche trovate
    $pagenum = $_POST["pag"];
    $pratichexpagina = $_POST["xpag"];
    $elenco = $_POST["elenco"];
    $criterio = $_POST["criterio"];
    if (!isset($elenco)) {
        //se non ho ancora fatto la query la costruisco
        include_once "./db/db.pe.queryricerca.php";
        //echo $sqlRicerca;
        $db->sql_query($sqlRicerca);
        //trovo l'elenco degli id delle pratiche che mi interessano
        $elenco_pratiche = $db->sql_fetchlist("pratica");
        if ($elenco_pratiche) {
            $elenco = implode(",", $elenco_pratiche);
        }
        $_SESSION["RICERCA"] = $_POST;
    } else {
        //sono al secondo giro ho l'elenco delle pratiche per la query
开发者ID:mamogmx,项目名称:praticaweb-alghero,代码行数:31,代码来源:pe.ricerca.php


示例15: sql_db

}
require_once $currentconfig;
// Do we have template specific settings?
if (isset($_SESSION['template'])) {
    $template = $_SESSION['template'];
}
$templateconfig = "templates/" . $template . "/config.php";
if (file_exists($templateconfig)) {
    include $templateconfig;
}
if (!isset($main_width)) {
    $main_width = 800;
}
global $coddb;
if ($coddb == null) {
    $coddb = new sql_db($db_host, $db_user, $db_pass, $db_db, false);
    if (!$coddb->db_connect_id) {
        die("Could not connect to the database");
    }
}
function time2ymd($time, $char = '-')
{
    return date(implode($char, array('Y', 'm', 'd')), $time);
}
if (isset($_GET['id'])) {
    $plid = $_GET['id'];
    $query = "SELECT {$t['b3_clients']}.name, ctime.id, ctime.gone, ctime.came\n              FROM {$t['b3_clients']}, ctime, {$t['players']} \n              WHERE {$t['players']}.id = \"{$plid}\"\n              AND {$t['players']}.client_id = {$t['b3_clients']}.id\n              AND {$t['b3_clients']}.guid = ctime.guid\n              ORDER BY ctime.id DESC";
} else {
    if (isset($_GET['dbid'])) {
        $plid = $_GET['dbid'];
        $query = "SELECT {$t['b3_clients']}.name, ctime.id, ctime.gone, ctime.came\n              FROM {$t['b3_clients']}, ctime\n              WHERE {$t['b3_clients']}.id = \"{$plid}\"\n              AND {$t['b3_clients']}.guid = ctime.guid\n              ORDER BY ctime.id DESC";
开发者ID:redrock,项目名称:xlrstats-web-v2,代码行数:31,代码来源:inc_activitygraph.php


示例16: sql_db

<?php

include_once "config/config.php";
$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);
}
//print_r($_POST);
//print_r($_FILES);
$descr = $_POST['descrizione'];
$propr = $_POST['propr'];
$uploaddir = getcwd() . "/modelli/";
$err_msg = "errore nel caricamento del file!";
if (move_uploaded_file($_FILES['myfile']['tmp_name'], $uploaddir . $_FILES['myfile']['name'])) {
    list($nome, $ext) = explode(".", $_FILES['myfile']['name']);
    $sql = "SELECT * FROM stp.e_modelli WHERE nome='" . $_FILES['myfile']['name'] . "' AND form='{$form}' and proprietario='{$propr}'";
    if ($db->sql_query($sql)) {
        $elenco_modelli = $db->sql_fetchrowset();
        $nrighe = $db->sql_numrows();
        if ($nrighe === 0) {
            $nome .= "." . $ext;
            $sql = "INSERT INTO stp.e_modelli(nome,form,descrizione,proprietario) VALUES('{$nome}','{$form}','{$descr}','{$propr}')";
            if (!$db->sql_query($sql)) {
                //echo "caricamento non riuscito di :".$_FILES['myfile']['name']."<br>$sql<br>";
                $err_msg = "caricamento del modello " . $_FILES['myfile']['name'] . " non riuscito!";
            } else {
                unset($err_msg);
            }
        } else {
            $err_msg = "Il modello " . $_FILES['myfile']['name'] . " è già presente!";
        }
开发者ID:mamogmx,项目名称:praticaweb-alghero,代码行数:31,代码来源:db.stp.carica_modello_old.php


示例17: ini_set

<?php

/*
                                                          |
+---------------------------------------------------------------------------+
*/
//error_reporting (0);
ini_set('display_errors', 'On');
// Support Database
require_once 'classes/db.class.php';
$db = new sql_db();
$db->getConnect();
// Core
require_once 'classes/core.class.php';
$core = new Core();
// Global
$url = $core->url;
$conf = $core->conf;
$form = $core->form;
$mess = $core->mess;
$error_mess = $core->error_mess;
$user = $core->user;
// Controller
require_once 'pages/controller.php';
$db->connectClose();
开发者ID:RushCode,项目名称:oxDesk,代码行数:25,代码来源:index.php


示例18: stripslashes

$testo = stripslashes(htmlentities($_POST["testo"]));
$testo = preg_replace('|<head>(.+)</head>|Umi', "", $testo);
$id = $_POST["id"];
$id_doc = $_POST["id_doc"];
$id_modelli = $_REQUEST["id_modelli"];
$nomemodello = $_POST["file"];
$css_modello = $_POST["css"];
//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;
开发者ID:mamogmx,项目名称:praticaweb-alghero,代码行数:30,代码来源:db.stp.editor.php


示例19: sql_db

					primary: "ui-icon-circle-triangle-w"
					},
				label:"Annulla"	
			}).click(function(){
				document.location='praticaweb.php?comm=1&pratica=<?php 
        echo $idcomm;
        ?>
&active_form=ce.ordinegiorno.php';
			});
		</script>
	</form>
		
		<?php 
        // Eseguo cancellazione della pratica dalla commissione
        if ($idpratica) {
            $db = new sql_db(DB_HOST, DB_USER, DB_PWD, DB_NAME, false);
            if (!$db->db_connect_id) {
                die("Impossibile connettersi al database");
            }
            $sql = "DELETE FROM pe.pareri WHERE ente=(SELECT tipo_comm FROM ce.commissione WHERE id={$idcomm}) and data_rich=(SELECT data_convocazione FROM ce.commissione WHERE id={$idcomm}) and pratica={$idpratica}";
            if (!$db->sql_query($sql)) {
                echo "ERRORE NELLA CANCELLAZIONE DELLA PRATICA <br>{$sql}<br>";
            }
            print_debug($sql);
        }
        $tabella_h = new Tabella_h($file_config, $modo);
        $tabella_h->set_titolo("Elenco pratiche da discutere");
        $tabella_h->get_titolo();
        $tabella_h->set_dati("pratica > 0");
        ?>
	<form name="cancella" method="post" action="ce.ordinegiorno.php">
开发者ID:mamogmx,项目名称:praticaweb-alghero,代码行数:31,代码来源:ce.ordinegiorno.php


示例20: json_encode

 if (!isset($_POST['location'])) {
     $errors[] = 'location';
 }
 if (!isset($_POST['currency'])) {
     $errors[] = 'currency';
 }
 if (count($errors) > 0) {
     if ($is_ajax) {
         echo json_encode($errors);
         die;
     } else {
         include "form.php";
         exit;
     }
 }
 $db = new sql_db(DB_HOST, DB_USER, DB_PASS, DB_NAME);
 $created = time();
 $db->query("INSERT INTO members_changes SET\n\t\t\t\t            m_created = " . $created . ",\n\t\t\t\t            m_type = 'add',\n\t\t\t\t            m_state = 'awaiting',\n\t\t\t\t            m_nick = '" . $db->check($_POST["nick"]) . "',\n\t\t\t\t            m_name = '" . $db->check($_POST["name"] . " " . $_POST["surname"]) . "',\n\t\t\t\t            m_mail = '" . $db->check($_POST["email"]) . "',\n\t\t\t\t            m_address = '" . $db->check($_POST["address"] . ", " . $_POST["zip"] . " " . $_POST["city"] . ", " . $_POST["country"]) . "',\n\t\t\t\t            m_year = '" . $db->check($_POST["birth"]) . "',\n\t\t\t\t            m_jabber = '',\n\t\t\t\t            m_how = '" . $db->check($_POST["how"]) . "',\n\t\t\t\t            m_note = '" . $db->check($_POST["note"]) . "',\n\t\t\t\t            m_distribution = '" . $db->check($_POST["distribution"]) . "',\n\t\t\t\t            m_location = '" . $db->check($_POST["location"]) . "',\n\t\t\t\t            m_currency = '" . $db->check($_POST["currency"]) . "',\n\t\t\t\t            m_reason = '',\n\t\t\t\t            m_addr = '" . $db->check($_SERVER["REMOTE_ADDR"]) . "',\n\t\t\t\t            m_addr_reverse = '" . $db->check(gethostbyaddr($_SERVER["REMOTE_ADDR"])) . "',\n\t\t\t\t            m_last_mail_id = 1\n\t\t\t\t            ");
 $request_id = $db->insert_id();
 // Mail admins
 $admins = explode(",", cfg_get("mailer_requests_sendto"));
 $subject = cfg_get("mailer_requests_admin_sub");
 $text = cfg_get("mailer_requests_admin_text");
 $subject = str_replace("%request_id%", $request_id, $subject);
 $subject = str_replace("%type%", "add", $subject);
 $subject = str_replace("%state%", "awaiting", $subject);
 $subject = str_replace("%member_id%", "-", $subject);
 $subject = str_replace("%member%", "-", $subject);
 $subject = str_replace("%name%", $_POST["name"] . " " . $_POST["surname"], $subject);
 $text = str_replace("%created%", strftime("%Y-%m-%d %H:%M", $created), $text);
 $text = str_replace("%changed_at%", "-", $text);
开发者ID:Jakuje,项目名称:www.vpsfree.cz,代码行数:31,代码来源:prihlaska.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP sql_query类代码示例发布时间:2022-05-23
下一篇:
PHP sql类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap