<?
// Funzione che controlla la presenza di numeri nella stringa
function controlla_stringa($stringa)
{
$l=strlen($stringa);
for ($i=0;$i<=$l-1;$i++)
{
$car=substr($stringa,$i,1);
if (is_numeric($car))
{
return 1;
break;
}
}
}
// Funzione che controlla il codistat
function controlla_codistat($cod)
{
$car=substr($cod,0,1);
if (!(is_string($car)))
{
return 1;
}
else
{
$car=substr($cod,1,3);
if (!(is_numeric($car)))
{
return 1;
}
if (is_numeric($cod))
return 1;
}
}
// Funzione che stampa l'intestazione completa della pagina
function stampa_intestazione($funzione,$ct,$ns,$cs)
{
print"<body bgcolor='white'>";
print("<table border=0 width='100%'>
<tr>
<td align ='center' bgcolor='$ct'><strong><font size='5'>REGISTRO ON LINE</font></strong></td>
</tr>
<tr>
<td align ='center'><strong><font size='6' color='$ct'>$ns</font></strong></td>
</tr>
<tr>
<td align ='center'><strong><font size='5' color='$ct'>$cs</font></strong></td>
</tr>
<tr>
<td align ='center' bgcolor='$ct'><strong><font size='+1'>$funzione</font></strong></td>
</tr>
</table> <br><br>");
}
// Funzione che stampa l'intestazione ridotta della pagina
function stampa_testata($funzione,$ct,$ns,$cs)
{
print"<body bgcolor='white'>";
print("<table border=0 width='100%'>
<tr>
<td align ='center' bgcolor='$ct'>
<strong><font size='4'>REGISTRO ON LINE - </font></strong>
<font size='4'>$ns</font>
</td>
</tr>
<tr>
<td align ='left'><font size='4' color='$ct'>$funzione</font></td>
</tr>
</table> <br><br>");
}
// Funzione che stampa il pedice della pagina
function stampa_piede($ct)
{
print("<table border=0 width='100%' bgcolor='$ct'>
<tr>
<td align='right' width='50%'>
<img src='../immagini/logo.gif' width='50' height='50'>
</td>
<td align='left' width='50%'>
<font size='2'>LAMPSchool Rel. 0.3<br>(C)2005 - GPL ITIS Luigi Di Maggio</font>
</td>
</tr>
</table>
<br><br></body></html>");
}