Exemplo n.º 1
0
    		         <input type="input" value="" name="text" />
                     <input name="ACT" type="submit" value="Aggiungi" />
               </form>
           </td>
       </tr>
';
for ($i = 0; $i < $index['num']; $i++) {
    echo '
       <tr>
           <td width="40" align="center" valign="middle">' . $index['ID'][$i] . '</td>
           <td width="100" align="center">' . $index['word'][$i] . '</td>
           <td width="300" align="center" valign="middle">
		       <form action="Indici.php" method="post" name="Mod">
    		         <input name="ID" type="hidden" value="' . $index['ID'][$i] . '" />
                     <input type="input" value="" name="text" />
                     <input name="ACT" type="submit" value="Modifica" />
               </form>
		       <form action="Indici.php" method="post" name="Canc">
    		         <input name="ID" type="hidden" value="' . $index['ID'][$i] . '" />
                     <input name="ACT" type="submit" value="Cancella" />
               </form>
           </td>
       </tr>
       ';
}
echo '
</table>
</div>
';
DBtoAR::disConnect();
Exemplo n.º 2
0
function RandIndex()
{
    global $var;
    if ($var['idx']['gon']) {
        DBtoAR::$colonne = array('ID', 'word');
        DBtoAR::$dove = '';
        DBtoAR::$valori = '';
        DBtoAR::$tabella = 'index';
        $var['idx']['data'] = DBtoAR::select();
        $var['idx']['randK'] = range(0, $var['idx']['data']['num'] - 1);
        shuffle($var['idx']['randK']);
        $var['idx']['gon'] = false;
    }
    if ($var['idx']['data']['num'] == 0) {
        echo 'no data';
    } else {
        echo $var['idx']['data']['word'][$var['idx']['randK'][$var['idx']['round']]];
        $var['idx']['round']++;
        if ($var['idx']['round'] == $var['idx']['data']['num']) {
            $var['idx']['round'] = 0;
        }
    }
}