Viewing file: addpoll.php (8.41 KB) -rw-rw-rw- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
$v[1] = $var1;
$v[2] = $var2;
$v[3] = $var3;
$v[4] = $var4;
$v[5] = $var5;
$v[6] = $var6;
$v[7] = $var7;
$v[8] = $var8;
$v[9] = $var9;
$v[10] = $var10;
$v[11] = $var11;
$v[12] = $var12;
$v[13] = $var13;
$v[14] = $var14;
$v[15] = $var15;
$v[16] = $var16;
$v[17] = $var17;
$v[18] = $var18;
$v[19] = $var19;
$v[20] = $var20;
$v[21] = $var21;
$v[22] = $var22;
$v[23] = $var23;
$v[24] = $var24;
$v[25] = $var25;
$v[26] = $var26;
$v[27] = $var27;
$v[28] = $var28;
$v[29] = $var29;
$v[30] = $var30;
$v[31] = $var31;
$vn = 1;
$sum = 0;
$sum1 = 0;
$sum2 = 0;
$sum3 = 0;
foreach ($v as $res) {
include('conexion.php');
if ($vn <= 8) {
$sum = $sum + $res;
}
if ($vn > 8 and $vn <= 12) {
$sum1 = $sum1 + $res;
}
if ($vn > 12 and $vn <= 22) {
$sum2 = $sum2 + $res;
}
if ($vn > 22) {
$sum3 = $sum3 + $res;
}
$nam = "var" . $vn;
$query ="insert into encuesta values ('','$nam','$user','$res')";
$result = mysql_query($query,$db);
$vn++;
}
$sum=($sum/8) * 4;
$sum1=($sum1/4) * 3;
$sum2=($sum2/10) * 2;
$sum3=$sum3/9;
$sum = $sum + $sum1 + $sum2 + $sum3;
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Encuesta de Estres</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="4">
<tr>
<td width="25%"> </td>
<td width="50%" bgcolor="#0099CC">
<div align="center"><font color="#FFFFFF" size="3" face="Verdana, Arial, Helvetica, sans-serif"><strong>Encuesta
del Nivel de Estres (DAMA)</strong></font></div></td>
<td width="25%"> </td>
</tr>
<tr>
<td width="25%"> </td>
<td width="50%"><p align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Resultado
de la adición de la encuesta.</font></p>
<table width="100%" border="1" cellpadding="8" cellspacing="0" bordercolor="#0099CC">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="4">
<tr>
<td width="24%" rowspan="2"><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Usuario:<br>
<strong>ADOMAN </strong></font></div></td>
<td><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Su
Resultado es:</font></div></td>
</tr>
<tr>
<td valign="middle" bgcolor="#A8D3FF">
<div align="center"><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong><font color="#0099CC" size="4"><?php echo $sum; ?></font></strong><br>
</font></div>
</td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" border="1" cellpadding="8" cellspacing="0" bordercolor="#0099CC">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="4">
<tr>
<td colspan="2" rowspan="2"><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">GENERAL
DE <br>
TODA LA <br>
POBLACIÓN</font></div></td>
<td colspan="4"><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">POR
NIVELES DE CARGOS</font></div></td>
</tr>
<tr>
<td width="15%" valign="top" bgcolor="#333333"> <div align="center"><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>1</strong><br>
DIRECTIVO<br>
</font></div></td>
<td width="21%" bgcolor="#333333"> <div align="center"><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>2</strong><br>
PERSONAL CALIFICADO<br>
</font></div></td>
<td width="19%" bgcolor="#333333"> <div align="center"><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>3</strong><br>
P. ADMITIVO AUXILIAR<br>
</font></div></td>
<td width="21%" bgcolor="#333333"> <div align="center"><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>4</strong><br>
P. NO CALIF. OPERARIO<br>
</font></div></td>
</tr>
<tr>
<td width="14%"><font color="#FF0000" size="2" face="Verdana, Arial, Helvetica, sans-serif">ESTRÉS
ALTO</font></td>
<td width="10%"><div align="center"><font color="#999999" size="2" face="Verdana, Arial, Helvetica, sans-serif">18
a 56</font></div></td>
<td><div align="center"><font color="#999999" size="2" face="Verdana, Arial, Helvetica, sans-serif">17
a 56</font></div></td>
<td><div align="center"><font color="#999999" size="2" face="Verdana, Arial, Helvetica, sans-serif">17
a 56</font></div></td>
<td><div align="center"><font color="#999999" size="2" face="Verdana, Arial, Helvetica, sans-serif">19
a 56</font></div></td>
<td><div align="center"><font color="#999999" size="2" face="Verdana, Arial, Helvetica, sans-serif">12
a 56</font></div></td>
</tr>
<tr>
<td><font color="#FFCC00" size="2" face="Verdana, Arial, Helvetica, sans-serif">ESTRÉS
MEDIO</font></td>
<td><div align="center"><font color="#999999" size="2" face="Verdana, Arial, Helvetica, sans-serif">5
a 17</font></div></td>
<td><div align="center"><font color="#999999" size="2" face="Verdana, Arial, Helvetica, sans-serif">5
a 16</font></div></td>
<td><div align="center"><font color="#999999" size="2" face="Verdana, Arial, Helvetica, sans-serif">5
a 16</font></div></td>
<td><div align="center"><font color="#999999" size="2" face="Verdana, Arial, Helvetica, sans-serif">5
a 18</font></div></td>
<td><div align="center"><font color="#999999" size="2" face="Verdana, Arial, Helvetica, sans-serif">3
a 11</font></div></td>
</tr>
<tr>
<td><font color="#66CC00" size="2" face="Verdana, Arial, Helvetica, sans-serif">ESTRÉS
BAJO</font></td>
<td><div align="center"><font color="#999999" size="2" face="Verdana, Arial, Helvetica, sans-serif">0
a 4</font></div></td>
<td><div align="center"><font color="#999999" size="2" face="Verdana, Arial, Helvetica, sans-serif">0
a 4</font></div></td>
<td><div align="center"><font color="#999999" size="2" face="Verdana, Arial, Helvetica, sans-serif">0
a 4</font></div></td>
<td><div align="center"><font color="#999999" size="2" face="Verdana, Arial, Helvetica, sans-serif">0
a 4</font></div></td>
<td><div align="center"><font color="#999999" size="2" face="Verdana, Arial, Helvetica, sans-serif">0
a 2</font></div></td>
</tr>
</table></td>
</tr>
</table>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>NIVEL
1</strong> = DIRECTIVO<br>
<strong>NIVEL 2</strong> = PERSONAL CALIFICADO<br>
<strong>NIVEL 3</strong> = PERSONAL ADMINISTRATIVO AUXILIAR<br>
<strong>NIVEL 4</strong> = PERSONAL NO CALIFICADO / OPERARIO</font><br>
</p>
</td>
<td width="25%"> </td>
</tr>
<tr>
<td width="25%"> </td>
<td width="50%"><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Departamento
Técnico Administrativo del Medio Ambiente<br>
<strong>DAMA</strong>,<em> Bogotá</em><br>
2004 </font></div></td>
<td width="25%"> </td>
</tr>
</table>
</body>
</html>
|