File: testa.php

package info (click to toggle)
odontolinux 0.6.1-6
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,128 kB
  • ctags: 566
  • sloc: php: 4,137; sh: 262; makefile: 46
file content (90 lines) | stat: -rw-r--r-- 2,852 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<? include("demo.php");?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <title>OdontoLinux!</title>

   <style type="text/css">
                  <!-- 
	A {text-decoration: none; }
	td {font-family: Lucida, Helvetica, Arial ; font-size: 10pt }
	th {font-family: Lucida, Helvetica, Arial ; font-size: 10pt }
	.piccolo {  font-family: Lucida, Helvetica, Arial, sans-serif; font-size: 8pt; font-style: normal; font-weight: normal }
                  -->
                </style>
 </head>



<BODY MARGINWIDTH="0" MARGINHEIGHT="0" LEFTMARGIN="0" RIGHTMARGIN="0" TOPMARGIN="0"
      BGCOLOR="#FFFFFF" TEXT="#000000" 
      LINK="#6495ed" VLINK="#6495ed" ALINK="#6495ed">

<?

// **************************************************************
// ****************** LOCALE DEFINITION ******************
// **************************************************************

setlocale (LC_ALL, "$langua");
// Specify location of translation tables
bindtextdomain ("odontolinux", "/usr/share/locale");
// Choose domain
textdomain ("odontolinux");
?>

  <TABLE CELLSPACING="0" CELLPADDING="1" BORDER="0" WIDTH="100%">
   <TR>
    <TD ALIGN="LEFT" BGCOLOR="#000000" COLSPAN ="3">

<FONT COLOR="#ffFFff"> <? print (date ("l dS of F Y h:i:s A")); ?>
<?
   $dbserver = "127.0.0.1";
   $dbport   = "5432";
   $database = "odontolinux";
   $conn = pg_Connect("host=$dbserver port=$dbport dbname=$database ");
   if (!$conn) {
                echo "Si &egrave; verificato un errore.\n";
                exit;
               } // Errore accesso al database
   pg_Exec($conn,"SET DATESTYLE TO 'European';");
   $esito = pg_Exec($conn,
            "SELECT cognome, nome FROM anagrafica WHERE id LIKE '$idpz';");
   if (!$esito) {
                 echo "Si &egrave; verificato un errore.\n";
                 exit;
                 } // Errore interrogazione database yes
   $num = pg_NumRows($esito);
   $i = 0;
   while ($i < $num) {
                      echo "&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;<font color=\"#FF0000\">OdontoLinux!</font>&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<B><FONT color=\"#FFFFFF\">";
                      echo pg_Result($esito, $i, "cognome");
                      echo "&nbsp;";
                      echo pg_Result($esito, $i, "nome");
                      echo "&nbsp;(";
                      echo $idpz;
                      echo ")</FONT></B>";
                      $i++;
                     } // Estrazione delle righe dell'interrogazione
?>



     </B>
</TD>

   </TR>

   <TR>
    <TD WIDTH="100" VALIGN="TOP">

<? include("tabella_menu_sn.php");?>

<FORM METHOD="post" ACTION="ricercapaziente.php"><INPUT NAME="cognome" SIZE="8"><BR>
<? echo "<INPUT TYPE=\"submit\" VALUE=\"";
echo gettext ("Find");
echo "\"></FORM>"; ?>

    </TD>
    <TD ALIGN="CENTER" VALIGN="TOP">