{*
  Template for the club detailview
  $Id: mkbet.tpl,v 1.00 2007/01/25 20:14:18
*}
<script src="javascript/prono.js" language="JavaScript" type="text/javascript"></script>
<div id="docpart_list_target">

<div id="docpart_list_target_loading">
Loading...
</div>

<div id="pagecontent">
<table width="100%" border="0" style="border:0px solid #000000; float:left;" cellspacing="0" cellpadding="5">
<tr>
	<td class="td-opt" colspan="2"><div id="title">{$bettable.title}</div></td>
</tr>
<tr>
	<td class="td-opt" colspan="2">{$lang.validation} {$bettable.date_deb} {$lang.to} {$bettable.date_fin_bet}</td>
</tr>
<tr>
	<td class="td-opt" colspan="2">{$lang.bettable_cost} : {$bettable.cost} {$lang.credits} : {$points}</td>
</tr>
<!-- content begin -->

  <tr>
      <td class="td-value">
			  {counter start=0 print=false name=matchcount}
			  <table width="100%" border="0" cellspacing="1" cellpadding="2">
			  
			  {if !$betdone and $openbet}
			  <form action="mkbet.php"  id="matchid" name="matchid" method="post">
			  <input type="hidden" name="id" id="id" value="{$id}" />
			  <input type="hidden" name="save" id="save" value="1" />
				  {foreach item=betdata from=$betlist}
				  {counter assign=count name=matchcount}
				  {cycle values="listeven,listodd" assign=CLASS print=false}
				  
				   <tr class="{$CLASS}">
						<td width="10"><b>{$count}</b></td>
						<td>{$betdata.compet}<input type="hidden" value="{$betdata.id}" name="betlist_{$count}"></td>
						<td align="right">{$betdata.dom}<input type="hidden" value="{if $betdata.pronostic}{$betdata.pronostic}{else}N{/if}" name="r_{$count}"></td>
						<td width="10"><a href="javascript:Change({$count},1,'classic');"><img src="templates/classic/images/{if $betdata.pronostic == 1}barre{else}1{/if}.gif" border="no" name="m{$count}_1" alt=""></a></td>
						<td width="10"><a href="javascript:Change({$count},0,'classic');"><img src="templates/classic/images/{if $betdata.pronostic == N}barre{else}n{/if}.gif" border="no" name="m{$count}_0" alt=""></a></td>
						<td width="10"><a href="javascript:Change({$count},2,'classic');"><img src="templates/classic/images/{if $betdata.pronostic == 2}barre{else}2{/if}.gif" border="no" name="m{$count}_2" alt=""></a></td>
						<td>{$betdata.ext}</td>
				   </tr>
				  {/foreach}
				  <tr>
					<td class="td-value" colspan="7">	
						<div id="barre-season">
						  <input style="width:100%;" type="submit" class="btn-search" value="{$lang.save}" id="savebutton" accesskey="s" />
						</div>
					</td>
				  </tr>
			   </form> 
			  {elseif $betdone and $openbet}
				  <form action="mkbet.php"  id="matchid" name="matchid" method="post">
					<input type="hidden" name="id" id="id" value="{$id}" />
					<input type="hidden" name="cancel" id="cancel" value="1" />
				  {foreach item=betdata from=$betlist}
				  {counter assign=count name=matchcount}
				  {cycle values="listeven,listodd" assign=CLASS print=false}
				  
				   <tr class="{$CLASS}">
						<td width="10"><b>{$count}</b></td>
						<td>{$betdata.compet}<input type="hidden" value="{$betdata.id}" name="betlist_{$count}"></td>
						<td align="right">{$betdata.dom}</td>
						<td width="10"><img src="templates/classic/images/{if $betdata.pronostic == 1}barre{else}1{/if}.gif" border="no" name="m{$count}_1" alt=""></td>
						<td width="10"><img src="templates/classic/images/{if $betdata.pronostic == N}barre{else}n{/if}.gif" border="no" name="m{$count}_0" alt=""></td>
						<td width="10"><img src="templates/classic/images/{if $betdata.pronostic == 2}barre{else}2{/if}.gif" border="no" name="m{$count}_2" alt=""></td>
						<td>{$betdata.ext}</td>
				   </tr>
				   {/foreach}
				    
					<tr>
					<td class="td-value" colspan="7">	
						<div id="barre-season">
						  <input style="width:100%;" type="submit" class="btn-search" value="{$lang.cancel}" id="savebutton" accesskey="s" />
						</div>
					</td>
				    </tr>
			   		</form>
				{elseif $bettable.paybet}
				  {counter start=0 print=false name=betwin}
			   	  {foreach item=betdata from=$betlist}
				  {counter assign=count name=matchcount}
				  {cycle values="listeven,listodd" assign=CLASS print=false}
				  
				   <tr class="{$CLASS}">
						<td width="10"><b>{$count}</b></td>
						<td>{$betdata.compet}</td>
						<td align="right">{$betdata.dom}</td>
						<td width="10"><img src="templates/classic/images/{if $betdata.pronostic == 1}barre{else}1{/if}.gif" border="no" name="m{$count}_1" alt=""></td>
						<td width="10"><img src="templates/classic/images/{if $betdata.pronostic == N}barre{else}n{/if}.gif" border="no" name="m{$count}_0" alt=""></td>
						<td width="10"><img src="templates/classic/images/{if $betdata.pronostic == 2}barre{else}2{/if}.gif" border="no" name="m{$count}_2" alt=""></td>
						<td>{$betdata.ext}</td>
						<td width="10">
						{if $betdata.buts_dom > $betdata.buts_ext}
							<img src="templates/classic/images/1_on.gif" border="no" name="m{$count}_2" alt="">
							{if $betdata.pronostic == '1'}{counter assign=betwin name=betwin}{/if}
						{elseif $betdata.buts_dom < $betdata.buts_ext}
							<img src="templates/classic/images/2_on.gif" border="no" name="m{$count}_2" alt="">
							{if $betdata.pronostic == '2'}{counter assign=betwin name=betwin}{/if}
						{elseif $betdata.buts_dom == $betdata.buts_ext}
							<img src="templates/classic/images/n_on.gif" border="no" name="m{$count}_2" alt="">
							{if $betdata.pronostic == 'N'}{counter assign=betwin name=betwin}{/if}
						{/if}
						</td>
				   </tr>
				   {/foreach}
				   
				   
			   {else}
			   	  {foreach item=betdata from=$betlist}
				  {counter assign=count name=matchcount}
				  {cycle values="listeven,listodd" assign=CLASS print=false}
				  
				   <tr class="{$CLASS}">
						<td width="10"><b>{$count}</b></td>
						<td>{$betdata.compet}</td>
						<td align="right">{$betdata.dom}</td>
						<td width="10"><img src="templates/classic/images/{if $betdata.pronostic == 1}barre{else}1{/if}.gif" border="no" name="m{$count}_1" alt=""></td>
						<td width="10"><img src="templates/classic/images/{if $betdata.pronostic == N}barre{else}n{/if}.gif" border="no" name="m{$count}_0" alt=""></td>
						<td width="10"><img src="templates/classic/images/{if $betdata.pronostic == 2}barre{else}2{/if}.gif" border="no" name="m{$count}_2" alt=""></td>
						<td>{$betdata.ext}</td>
						
				   </tr>
				   {/foreach}
					  
			  {/if}
			  </table>		
    </td>
	<td class="td-value">
		<table width="100%" border="0" cellspacing="1" cellpadding="2">
			<tr><td class="td-opt" colspan="2">{$lang.winprize}</td></tr>
			{section name=foo loop=$bettable.winrank+1 start=1 step=1}
			{cycle values="listeven,listodd" assign=CLASS print=false}
			<tr class="{$CLASS}">
				<td>{$winnertable[foo].rank} {$lang.goodpronos}</td>
				<td align="right">{$winnertable[foo].prize}</td>
			</tr>
			{/section}
			{if $bettable.paybet and $betdone}
			<tr><td class="td-opt" colspan="2">{$lang.youvegot} {$betwin} {$lang.goodpronos}</td></tr>
				{if !$bettable.goodprono}
				<form action="mkbet.php"  id="paybet" name="paybet" method="post">
				<input type="hidden" name="id" id="id" value="{$id}" />
				<input type="hidden" name="paybet" id="paybet" value="1" />
				<tr><td class="td-opt" colspan="2">
				<input style="width:100%;" type="submit" class="button" value="{$lang.paybet}" id="savebutton" accesskey="s" />
				</td></tr>
				</form>
				{else}
				<tr><td class="td-opt" colspan="2">
				{$lang.youvebeenpayed}
				</td></tr>
				{/if}
				
			{elseif $bettable.paybet and !$betdone}
			<tr><td class="td-opt" colspan="2">{$lang.youdontplay}</td></tr>
			{/if}
			
		</table>
	</td>
  </tr>
   
</table>
</div>
<!-- /showheader -->


</div>
<!-- /content -->

</div>
