Ignore:
Timestamp:
May 14, 2021, 2:00:23 PM (3 years ago)
Author:
roby
Message:

Aggiornamento per compatibilità con php7.4

File:
1 edited

Legend:

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

    r344 r347  
    88/* widget cerca candidato
    99  by luciano apolito 2015 */
    10 
    11 
     10# http://localhost/ele3/trunk/client/modules.php?cognome=vince&id_comune=58047&op=gruppo&name=Elezioni&file=index&id_cons_gen=66
     11# http://localhost/ele3/trunk/client/modules.php?op=gruppo&name=Elezioni&id_comune=58047&file=index&id_cons_gen=66
    1212if (!defined('MODULE_FILE')) {
    1313    die ("You can't access this file dirrectly...");
    1414}
    15 global $id_comune;
     15global $id_comune,$id_cons_gen,$op;
    1616
    1717# validatore form
    1818echo '
    19  <script type="text/javascript">
     19 <script>
    2020function validateForm()
    2121        {
     
    3131
    3232# form
    33 echo '
     33#$url=$_SERVER['REQUEST_URI']; // url della pagina per il reload
     34
     35echo "
    3436                <div><h5>Cerca il candidato</h5> 
    35                 <form method="post" name="form_candi" action="" onsubmit="return validateForm()" >
     37                <form method=\"get\" name=\"form_candi\" action=\"modules.php\" onsubmit='return validateForm()' >
    3638                Inserisci il cognome o/e il nome intero del candidato da cercare<br/>
    37                 <input type="text" name="cognome" maxlength="30" size="10" value="">';
    38 echo "<input type=\"hidden\" name=\"id_comune\" value=\"$id_comune\">";
    39 echo    '<input type="submit" value="Cerca">
     39                <input type=\"text\" name=\"cognome\" maxlength=\"30\" size=\"10\" value=\"\">";
     40echo "<input type=\"hidden\" name=\"id_comune\" value=\"$id_comune\"><input type=\"hidden\" name=\"op\" value=\"$op\"><input type=\"hidden\" name=\"name\" value=\"Elezioni\"><input type=\"hidden\" name=\"file\" value=\"index\"><input type=\"hidden\" name=\"id_cons_gen\" value=\"$id_cons_gen\">";
     41echo    "<input type=\"submit\" value=\"Cerca\">
    4042                </form>
    4143                </div>
    42 ';
    43 
    44 if(isset($_SESSION['cerca_cand'])) $cerca_cand=$_SESSION['cerca_cand']; else $cerca_cand="";
    45 echo $cerca_cand;
    46 $_SESSION['cerca_cand']='';
     44";
    4745
    4846
    49 $url=$_SERVER['REQUEST_URI']; // url della pagina per il reload
     47
     48
    5049
    5150$param=strtolower($_SERVER['REQUEST_METHOD']) == 'get' ? $_GET : $_POST;
    5251if (isset($param['cognome'])) $cognome=addslashes($param['cognome']); else $cognome='';
    5352$chiave="$cognome";
    54 global $id_comune;
    55 
     53$cerca_cand="";
     54$_SESSION['cerca_cand']='';
    5655
    5756if($cognome!=''){
     
    101100                $sezioni=$res4->rowCount();
    102101                $cerca_cand .= "<div style=\"text-align:left\"><hr/>";
    103                 $cerca_cand .= "<img src=\"modules.php?name=Elezioni&amp;file=foto&amp;id_lista=$id_lista\" width=\"30\" heigth=\"30\" align=\"left\">";
     102                $cerca_cand .= "<img src=\"modules.php?name=Elezioni&amp;file=foto&amp;id_lista=$id_lista\" alt=\"foto\" style=\"width:30px; text-align:left;\">";
    104103
    105104                if($tipo_consul!='4'){ // non Ú circoscrizione
     
    117116
    118117        $_SESSION['cerca_cand']=$cerca_cand;
    119         header("location:$url ");
     118#       header("location:$url");
    120119        //$cognome='';
    121120}
    122 
     121if(isset($_SESSION['cerca_cand'])) $cerca_cand=$_SESSION['cerca_cand']; else $cerca_cand="";
     122echo $cerca_cand;
     123$_SESSION['cerca_cand']='';
    123124
    124125
Note: See TracChangeset for help on using the changeset viewer.