Changeset 253 for trunk/client/modules/Elezioni/index.php
- Timestamp:
- Mar 12, 2018, 8:53:21 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/modules/Elezioni/index.php
r241 r253 15 15 $_GET : $_POST; 16 16 17 17 include("pdoquery.php"); 18 18 if (isset($param['rss'])) $rss=intval($param['rss']); else $rss='0'; 19 19 if (isset($param['xls'])) $xls=intval($param['xls']); else $xls='0'; … … 24 24 if (isset($param['id_cons_gen'])) $id_cons_gen=intval($param['id_cons_gen']); else 25 25 { 26 $res = mysql_query("SELECT id_cons FROM ".$prefix."_ele_comuni where id_comune='$id_comune' ", $dbi); 27 list($id_cons_pred)=mysql_fetch_row($res); 28 $res = mysql_query("SELECT id_cons_gen FROM ".$prefix."_ele_cons_comune where id_cons='$id_cons_pred' ", $dbi); 29 list($id_cons_gen)=mysql_fetch_row($res); 26 $id_cons_gen=dbpredefinita(); 27 30 28 } 31 29 if (isset($param['op'])) $op=$param['op']; else $op=''; … … 62 60 $ordine=htmlentities($ordine); 63 61 64 $ res = mysql_query("SELECT id_conf FROM ".$prefix."_ele_cons_comune where id_cons_gen='$id_cons_gen' and id_comune='$id_comune'" , $dbi);65 list($hondt) = mysql_fetch_row($res); 66 67 $sql = "SELECT t3.genere,t1.tipo_cons,t1.descrizione,t2.id_cons_gen FROM ".$prefix."_ele_consultazione as t1, ".$prefix."_ele_cons_comune as t2, ".$prefix."_ele_tipo as t3 where t1.tipo_cons=t3.tipo_cons and t2.id_comune=$id_comune and t1.id_cons_gen=t2.id_cons_gen and t2.id_cons_gen='$id_cons_gen' and t2.chiusa!='2' "; 68 $ res = mysql_query("$sql",$dbi);69 $t ot=mysql_num_rows($res);70 if ($tot>0 and $id_cons_gen>0) { 71 $sql = "SELECT t3.genere,t1.tipo_cons,t1.descrizione,t2.id_cons_gen FROM ".$prefix."_ele_consultazione as t1, ".$prefix."_ele_cons_comune as t2, ".$prefix."_ele_tipo as t3 where t1.tipo_cons=t3.tipo_cons and t2.id_comune=$id_comune and t1.id_cons_gen=t2.id_cons_gen and t2.id_cons_gen='$id_cons_gen' and t2.chiusa!='2'";72 }else{ 73 $sql = "SELECT t3.genere,t1.tipo_cons,t1.descrizione,t2.id_cons_gen FROM ".$prefix."_ele_consultazione as t1, ".$prefix."_ele_cons_comune as t2, ".$prefix."_ele_tipo as t3 where t1.tipo_cons=t3.tipo_cons and t2.id_comune=$id_comune and t1.id_cons_gen=t2.id_cons_gen and t2.chiusa!='2' order by t1.data_fine desc limit 0,1 "; 74 } 75 $res = mysql_query("$sql",$dbi); 76 if ($res) list($genere,$tipo_cons,$descr_cons,$id_cons_gen) = mysql_fetch_row($res); 62 $hondt = dbvalorehondt(); 63 64 $res=dbselectcons(); 65 66 $genere=$res['genere']; 67 $tipo_cons=$res['tipo_cons']; 68 $descr_cons=$res['descrizione']; 69 $id_cons_gen=$res['id_cons_gen']; 70 echo "descr:$descr_cons"; 71 72 73 74 ########## 77 75 78 76 if ($tipo_cons!=3) $limite=0;
Note:
See TracChangeset
for help on using the changeset viewer.