Untracking backupfiles
[mod_lotto.git] / tmpl / default_dispTLDS.php~
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?php
/**
 * @subpackage	mod_lotto
 * @copyright	Copyright (C) 2012 Ben Tasker . All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */


// no direct access
defined('_JEXEC') or die;
JHtml::_('behavior.keepalive');




?>
<div id="dispLDs">
<?php

if (!empty($_POST['modlottoLuckyDips'])){
$luckdips = $_POST['modlottoLuckyDips'];
}else{
$luckdips = 1;
}


// Output LuckyDips
$LuckyDips = $lotto->generateTBluckydip($luckdips);
?>

<h3>Thunderball Lucky Dip</h3>

<table class="modlottoLDs">

<?php
// Cycle through each one
foreach ($LuckyDips as $dip){
  if (empty($dip)){ continue; }
echo "<tr class=\"latestresult\">";
  // Cycle through the array

    foreach ($dip as $ball){
	    $class = rand(1,6);
	    echo "<td class=\"TBball$class\">$ball</td>";
	    }
	  
echo "</tr>\n";

	      
  }
unset($LuckyDips);

?>
</table>


<?php if ($params->get('GenTLDs')){?>
<form name="modlottoLDs" method="POST">

Generate <select class="LottoSelect" id="LuckyDipsSelect" name="modlottoLuckyDips">
<?php
$X = 1;
while ($X <= 10){

echo "<option value=\"$X\">$X</option>";
$X++;
}

?>
</select> Lucky Dips.
<input type="submit" class="LottoSubmit" value="Generate">

<input type="hidden" name="option" value="<?php echo JRequest::getVar('option');?>">
<input type="hidden" name="task" value="<?php echo JRequest::getVar('task');?>">
<input type="hidden" name="view" value="<?php echo JRequest::getVar('view');?>">
<input type="hidden" name="layout" value="<?php echo JRequest::getVar('layout');?>">


</form>
<?php 
// End Gen Lucky Dip
}
?> 
</div>