Ignore:
Timestamp:
Mar 13, 2018, 9:26:23 PM (6 years ago)
Author:
roby
Message:

adeguata la funzione di installazione al php7

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/client/modules/Elezioni/blocchi/cerca_candidato.php

    r238 r254  
    1313    die ("You can't access this file dirrectly...");
    1414}
     15global $id_comune;
    1516
    1617# validatore form
     
    3435                <form method="post" name="form_candi" action="" onsubmit="return validateForm()" >
    3536                Inserisci il cognome o/e il nome intero del candidato da cercare<br/>
    36                 <input type="text" name="cognome" maxlength="30" size="10" value="">
    37                 <input type="submit" value="Cerca">
     37                <input type="text" name="cognome" maxlength="30" size="10" value="">';
     38echo "<input type=\"hidden\" name=\"id_comune\" value=\"$id_comune\">";
     39echo    '<input type="submit" value="Cerca">
    3840                </form>
    3941                </div>
    4042';
    4143
    42 $cerca_cand=$_SESSION['cerca_cand'];
     44if(isset($_SESSION['cerca_cand'])) $cerca_cand=$_SESSION['cerca_cand']; else $cerca_cand="";
    4345echo $cerca_cand;
    4446$_SESSION['cerca_cand']='';
     
    6668        }
    6769
    68         $sql_cand= mysql_query("SELECT * FROM ".$prefix."_ele_candidati  where (cognome like '%$cognome%' $numeratore nome like '%$nome%') OR (cognome like '%$nome%'
    69         $numeratore nome like '%$cognome%')", $dbi);
    70         $num_tot = mysql_num_rows($sql_cand);
    71         $res = mysql_query("SELECT * FROM ".$prefix."_ele_candidati  where (cognome like '%$cognome%' $numeratore nome like '%$nome%') OR (cognome like '%$nome%'         $numeratore nome like '%$cognome%') ORDER BY id_cand DESC LIMIT 0,7", $dbi);
     70        $sql_cand= mysql_query("SELECT * FROM ".$prefix."_ele_candidati  where ((cognome like '%$cognome%' $numeratore nome like '%$nome%') OR (cognome like '%$nome%'
     71        $numeratore nome like '%$cognome%')) and id_cons in(select id_cons from ".$prefix."_ele_cons_comune where id_comune='$id_comune')", $dbi);
     72        $num_tot = mysql_num_rows($sql_cand); 
     73        $res = mysql_query("SELECT * FROM ".$prefix."_ele_candidati  where ((cognome like '%$cognome%' $numeratore nome like '%$nome%') OR (cognome like '%$nome%'        $numeratore nome like '%$cognome%'))  and id_cons in(select id_cons from ".$prefix."_ele_cons_comune where id_comune='$id_comune') ORDER BY id_cand DESC LIMIT 0,7", $dbi);
    7274        while (list($id_cand,$id_cons2,$id_lista,$cognome,$nome,$note,$simbolo,$num_candidato) = mysql_fetch_row($res)) {
    7375                $res1 = mysql_query("SELECT id_cons_gen FROM ".$prefix."_ele_cons_comune  where id_cons='$id_cons2'" , $dbi);   
Note: See TracChangeset for help on using the changeset viewer.