Visualizzazione dei risultati da 1 a 10 su 21

Visualizzazione discussione

  1. #11
    codice:
    <form action="postconvocazione.php" method="post">
    <B>Ora di ritrovo</B></td>
               <input name="time" size=5 value="">
    
    <B>Luogo di ritrovo</B>
               <input name="place" size=15 value="">
    
    <B>Guardalinee</B>
              <select name="guarda" size="1"><option value=""></option>
                    <?php $giocatori = array_diff(scandir("$path"), array('pic', '..', '.'));
                        foreach ($giocatori as $giocatore) {
                            $giocatore_vis = $giocatore; $giocatore_vis = @str_replace("-", " ", $giocatore_vis);
                            $giocatore_vis = @str_replace(".php", "", $giocatore_vis);
                            $f = file_get_contents("$path/$giocatore"); echo "<option value=\"$giocatore\" > $giocatore_vis </option>"; } ?>
                    </select>
    
             <B>Giocatore</B></td>
              <select name="gioc1" size="1"><option value=""></option>
            <?php $giocatori = array_diff(scandir("$path"), array('pic', '..', '.'));
            foreach ($giocatori as $giocatore) {
                $giocatore_vis = $giocatore; $giocatore_vis = @str_replace("-", " ", $giocatore_vis);
                $giocatore_vis = @str_replace(".php", "", $giocatore_vis);
                $f = file_get_contents("$path/$giocatore"); echo "<option value=\"$giocatore\" > $giocatore_vis </option>"; } ?>
         </select>
    
             <B>Giocatore</B></td>
              <select name="gioc2" size="1"><option value=""></option>
            <?php $giocatori = array_diff(scandir("$path"), array('pic', '..', '.'));
            foreach ($giocatori as $giocatore) {
                $giocatore_vis = $giocatore; $giocatore_vis = @str_replace("-", " ", $giocatore_vis);
                $giocatore_vis = @str_replace(".php", "", $giocatore_vis);
                $f = file_get_contents("$path/$giocatore"); echo "<option value=\"$giocatore\" > $giocatore_vis </option>"; } ?>
         </select>
    
             <B>Giocatore</B></td>
              <select name="gioc3" size="1"><option value=""></option>
            <?php $giocatori = array_diff(scandir("$path"), array('pic', '..', '.'));
            foreach ($giocatori as $giocatore) {
                $giocatore_vis = $giocatore; $giocatore_vis = @str_replace("-", " ", $giocatore_vis);
                $giocatore_vis = @str_replace(".php", "", $giocatore_vis);
                $f = file_get_contents("$path/$giocatore"); echo "<option value=\"$giocatore\" > $giocatore_vis </option>"; } ?>
         </select>
    
             <B>Giocatore</B></td>
              <select name="gioc4" size="1"><option value=""></option>
            <?php $giocatori = array_diff(scandir("$path"), array('pic', '..', '.'));
            foreach ($giocatori as $giocatore) {
                $giocatore_vis = $giocatore; $giocatore_vis = @str_replace("-", " ", $giocatore_vis);
                $giocatore_vis = @str_replace(".php", "", $giocatore_vis);
                $f = file_get_contents("$path/$giocatore"); echo "<option value=\"$giocatore\" > $giocatore_vis </option>"; } ?>
         </select>
    
             <B>Giocatore</B></td>
              <select name="gioc5" size="1"><option value=""></option>
            <?php $giocatori = array_diff(scandir("$path"), array('pic', '..', '.'));
            foreach ($giocatori as $giocatore) {
                $giocatore_vis = $giocatore; $giocatore_vis = @str_replace("-", " ", $giocatore_vis);
                $giocatore_vis = @str_replace(".php", "", $giocatore_vis);
                $f = file_get_contents("$path/$giocatore"); echo "<option value=\"$giocatore\" > $giocatore_vis </option>"; } ?>
         </select>
    
    e via di seguito fino a gioc20...

    postconvocazione.php

    Codice PHP:
    <?php

        
    //Sostituisco le lettere accentate con le relativa entità html
        
    function cambia_acc($dato){
            
    $dato = @str_replace("\'""'"$dato);
            
    $dato = @str_replace('\"''"'$dato);
            return 
    $dato;
        }
        
        
    // Definizione dei path
        
    $path0 'public/tornei';


        
    // Collegamento tra variabile e input
        
    $time $_POST['time'];
        
    $place = @htmlspecialchars($place,ENT_QUOTES);
        
    $place cambia_acc($_POST['place']);
        
        
    $gioc1 $_POST['gioc1'];
        
    $gioc2 $_POST['gioc2'];
        
    $gioc3 $_POST['gioc3'];
        
    $gioc4 $_POST['gioc4'];
        
    $gioc5 $_POST['gioc5'];
        
    $gioc6 $_POST['gioc6'];
        
    $gioc7 $_POST['gioc7'];
        
    $gioc8 $_POST['gioc8'];
        
    $gioc9 $_POST['gioc9'];
        
    $gioc10 $_POST['gioc10'];
        
    $gioc11 $_POST['gioc11'];
        
    $gioc12 $_POST['gioc12'];
        
    $gioc13 $_POST['gioc13'];
        
    $gioc14 $_POST['gioc14'];
        
    $gioc15 $_POST['gioc15'];
        
    $gioc16 $_POST['gioc16'];
        
    $gioc17 $_POST['gioc17'];
        
    $gioc18 $_POST['gioc18'];
        
    $gioc19 $_POST['gioc19'];
        
    $gioc20 $_POST['gioc20'];
        
        
    $guarda $_POST['guarda'];
        
    $note $_POST['note'];
        
        
    $path $_POST['path'];
        
    $path "$path0/$path";
        
        
    $type $_POST['type'];
        
    $nome $_POST['nome'];
        
        
    // Scrivo le informazioni sul file di testo
        
    $f = @file_get_contents("$path");
        
    $file = @explode("|"$f);
        
        
    print_r($f); print_r($file);  
        
        
    // Dati partita
        
    $file[0];
        
    $file[1];    
        
    $file[2];    
        
    $file[3];    
        
    $file[4];    
        
    $file[5];    
        
    $file[6];    
        
    $file[7];    
        
    $file[8];    
        
    $file[9];    
        
    $file[10];    
        
        
    // Convocati
        
    $file[11] = $gioc1//
        
    $file[12] = $gioc2//
        
    $file[13] = $gioc3//
        
    $file[14] = $gioc4//
        
    $file[15] = $gioc5;
        
    $file[16] = $gioc6;
        
    $file[17] = $gioc7;
        
    $file[18] = $gioc8;
        
    $file[19] = $gioc9;
        
    $file[20] = $gioc10;
        
    $file[21] = $gioc11;
        
    $file[22] = $gioc12;
        
    $file[23] = $gioc13;
        
    $file[24] = $gioc14;
        
    $file[25] = $gioc15;
        
    $file[26] = $gioc16//
        
    $file[27] = $gioc17;
        
    $file[28] = $gioc18;
        
    $file[29] = $gioc19;
        
    $file[30] = $gioc20;
        
        
    $file[41] = $time;
        
    $file[42] = $place;
        
    $file[43] = $guarda;
        
    $file[44] = $note;
        
        
    $file[45];
            
        @
    file_put_contents($path"<?php/*|$file[1]|$file[2]|$file[3]|$file[4]|$file[5]|$file[6]|$file[7]|$file[8]|$file[9]|$file[10]|$file[11]|$file[12]|$file[13]|$file[14]|$file[15]|$file[16]|$file[17]|$file[18]|$file[19]|$file[20]|$file[21]|$file[22]|$file[23]|$file[24]|$file[25]|$file[26]|$file[27]|$file[28]|$file[29]|$file[30]|||||||||||$file[41]|$file[42]|$file[43]|$file[44]|*/?>");
            
        @
    fclose($path);
        
        echo 
    "
    <CENTER></br></br></br></br></br></br>
    <font color=\"#e4dece\"> Convocazioni inserite correttamente. </font></br></br>
    <h4><a href=\"/gestisci.php?page=gestisci_partite&t=
    $type&n=$nome\"> Torna </a></h4>
    </CENTER> "
    ;


    ?>
    Ultima modifica di Luca Crippa; 13-10-2014 a 15:59

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.