<?php $root = substr($_SERVER["DOCUMENT_ROOT"], 0, -1); require_once "{$root}/Class/Database.php"; require_once "{$root}/Function/DataTime.php"; require_once "{$root}/Class/XlsExport.php"; $d = new Database("localhost", "gestore", "polipo", "gestione"); $r = $d->GetRows("*", "view_call", "", "", "data_att limit 50", 1); // Send Header header('Content-type: application/vnd.ms-excel'); header("Content-Type: application/force-download"); header("Content-Type: application/octet-stream"); header("Content-Type: application/download"); header("Content-Disposition: attachment;filename=PROVA.xls"); echo "<table style=\"width: 100%;\">"; echo "<tr>\n\t\t<td>N.Call</td>\n\t\t<td>Data Chisura</td>\n\t\t<td>Cliente</td>\n\t\t<td>CITY</td>\n\t\t<td>Tecnico</td>\n\t\t<td>Tipo Call</td>\n\t\t<td>Note</td>\n\t\t<td>Economico</td>\n\t</tr>"; foreach ($r as $key => $field) { if ($field['n_pdl'] > "1") { $economico = floatval($field['econ']) * floatval($field['n_pdl']); $compenso = floatval($field['prz']) * floatval($field['n_pdl']); } else { $economico = floatval($field['econ']); $compenso = floatval($field['prz']); } echo "<tr>"; echo "<td>" . $field['n_call'] . "</td>"; echo "<td>" . Inverti_Data($field['data_att']) . "</td>"; echo "<td>" . $field['cliente'] . "</td>"; echo "<td>" . $field['Comune'] . " (" . $field['Targa'] . ")" . "</td>"; echo "<td>" . $field['tecnico'] . "</td>"; echo "<td>" . $field['tipo'] . "</td>";
color: red; } .ok { font-size : 9pt; font-weight : bold; color: green; } </style> <?php require_once "../php/Database_4.6.32.php"; require_once "../php/Report.php"; echo "Debug => Test Class Page <br />"; $d = new Database("localhost", "xxx", "xxx", "xxx"); $r = new Report(); $Campi = $d->GetRows("u.user, t.tipo, s.stato, s.id_stato", "tab_utenti u, tab_tipi t, tab_stato_utente s", "u.tipo = t.id_tipo AND s.id_stato = u.id_stato", "", "user", 0); ?> <table style="width: 100%;" border="1"> <?php // Header: $r->Fields = array("Utente:", "Tipo:", "Stato:|center"); $r->RenderCell(); // Results: foreach ($Campi as $key => $field) { if ($field['id_stato'] == "2") { $r->RowStyle = " class=\"err\""; } else { $r->RowStyle = " class=\"ok\""; } $r->Fields = $field;
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. */ !--> <head> <meta charset="utf-8"> </head> <body> <?php $root = substr($_SERVER['DOCUMENT_ROOT'], 0, -1); require_once "{$root}/Class/Database.php"; echo "Debug => Test Class Page <br />"; $d = new Database("localhost", "gestore", "polipo", "gestione"); $d->GetRows("*", "tab_utenti", "", "", "1 limit 10", 1); $d->DrawControl("text", "prova", "controllo di prova"); //~ $d->ReportHeader = "th,Data:,left|th,User:|th,Tipo:|th,Ip:|th,Action:"; //~ $d->ReportFields = "td,data|td,user|td,tipo|td,ip|td,action"; ?> <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?> "> <table style="width: 100%;" class="dettaglio"> <?php //$d->DrawReport(); ?> </table> </form>
* along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. */ !--> <head> <meta charset="utf-8"> </head> <body> <?php $root = substr($_SERVER['DOCUMENT_ROOT'], 0, -1); require_once "{$root}/Class/Database.php"; $d = new Database("localhost", "gestore", "polipo", "gestione"); $Results = $d->GetRows("*", "tab_comuni", "", "", "", 1); //~ echo "<pre> Results"; //~ print_r($Results); //~ echo "</pre>"; foreach ($Results as $key => $field) { //~ echo "[Debug]: KEY: $key <br />"; $Valori = $field; $Valori['Comune'] = ucfirst(strtolower($field['Comune'])); $Valori['Prov'] = ucfirst(strtolower($field['Prov'])); //~ echo "<pre>"; //~ print_r($Valori); //~ echo "</pre>"; $Status = $d->UpdateRow($Valori, "", "tab_comuni", "ID = '" . $Valori['ID'] . "'"); echo "[Debug][" . $Valori['ID'] . "]: {$Status} <br />"; } ?>
<?php error_reporting(E_ALL); global $d; global $start; $root = substr($_SERVER['DOCUMENT_ROOT'], 0, -1); $start = time(); require_once "{$root}/Class/Database.php"; $d = new Database("localhost", "dde_user", "dde_pass", "adde_db"); /* $d = new Database("localhost", "rollout", "rollout", "db_rollout_2010"); */ $info = $d->GetRows("count(id_session) as count", "tab_session", "user_agent != ''", "", "", 1); echo "[Debug]: Update Remaining: " . $info[0]['count'] . " <br />"; $result = $d->GetRows("id_session, user_agent", "tab_session", "user_agent != ''", "", "id_session desc limit 1000", 0); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <style> body, table { font-family: sans-serif; font-style: normal; font-size : 9pt; } </style> </head> <!-- <table border="1" style="width: 100%;"> <tr>
<?php session_start(); error_reporting(E_ALL); $root = substr($_SERVER['DOCUMENT_ROOT'], 0, -1); require_once "{$root}/Class/Database.php"; $db_host = "localhost"; $db_user = "******"; $db_password = "******"; $db_name = "db_rollout_2010"; $d = new Database("localhost", "rollout", "rollout", "db_rollout_2010"); $gruppi = $d->GetRows("gruppo", "tab_menu", "perm like '%" . $_SESSION['id_tipo'] . "%'", "gruppo", "gruppo", 1); ?>
<!DOCTYPE html> <style type="text/css"> body { font-size: 10pt; font-family: monospace; } </style> <?php require_once '../php/Database.php'; $d = new Database("localhost", "gestore", "polipo", "db_sla"); DEFINE("DEST_TABLE", "tab_switch"); $Actions = array('alssqol' => 'tab_alssqol'); foreach ($Actions as $key => $value) { // recupero l'id del menu $Menus = $d->GetRows("id_menu, titolo", "tab_menu", "act = '{$key}'", "", "", 1); // echo "<pre> Menus"; // print_r($Menus); // echo "</pre>"; // INSERT INTO tab_switch ( id_menu, descrizione, tabella, id_tabella, nome_campo, etichetta, tipo_campo) // VALUES ( '48', 'Anamnesi familiare', 'tab_anamnesi_familiare', 'id_anamnesi', 'sla', 'Sla', ''); $temp_array = $d->Query("describe {$value}", 1); // echo "<pre> temp_array"; // print_r($temp_array); // echo "</pre>"; foreach ($temp_array as $fkey => $fvalue) { if ($fvalue['Field'] == "id_generalita" || $fvalue['Field'] == "data_insert" || preg_match("(id_.*)", $fvalue['Field'])) { // salta quei campi continue; } $QString = "INSERT INTO " . DEST_TABLE; $QString .= "( id_menu, descrizione, tabella, id_tabella, ";
<?php mysql_connect("localhost", "gestore", "polipo") or die("Could not connect: " . mysql_error()); mysql_select_db("db_sla"); $result = mysql_query("SELECT * from tab_menu"); echo "[Debug]: {$result} <br />"; global $d; global $start; $root = substr($_SERVER['DOCUMENT_ROOT'], 0, -1); require_once "{$root}/prog_sla/classi/Database.php"; $start = time(); $d = new Database("localhost", "gestore", "polipo", "db_sla"); $Risultati = $d->GetRows("*", "tab_comuni", "", "", "", 1); //~ echo "<pre>"; //~ print_r(); //~ echo "</pre>";
<?php $root = substr($_SERVER['DOCUMENT_ROOT'], 0, -1); require_once "{$root}/Class/Database.php"; $d = new Database("localhost", "gestore", "polipo", "db_rollout_2010", "postgresql"); $rows = array(); $rows = $d->GetRows("den, cod_fil, citta", "tab_filiali", "cod_fil != ''", "", "citta, den", 0); /* $d->GetRows("*", "view_connections", "aaa = 'dsdg'dfhdfh' and x like '%2%df'g'", "", "data desc limit 30", 1); $d->ReportHeader = "th,Data:,left|th,User:|th,Tipo:|th,Ip:|th,Action:"; $d->ReportFields = "td,data|td,user|td,tipo|td,ip|td,action"; */ /* echo "[Debug]: $db <br />"; echo "[Debug]: pg_connection_status: " . pg_connection_status($db). " <br />"; $res = pg_query($db, "select * from tab_aree order by area"); echo "[Debug]: res: $res <br />"; echo "[Debug]: pg_last_error: " . pg_last_error($db) . " <br />"; */ //$rows = pg_fetch_all($res); /* echo "<pre>"; print_r($rows); echo "</pre>"; */ ?> <table border="1" style="width: 100%;"> <tr>