Exemplo n.º 1
0
<div id="left">
	<div class="box orange text">
		<div id="drafting_header" alt="Drafting!" /></div>
		<div id="drafterlist">
			<?php 
echo drafterList($draft_id);
?>
		</div>
		<?php 
echo draftPacks($draft_info);
?>
			<form action="draft.php" method="post" name="leavedraft">
				<input type="hidden" name="action" value="leave_draft" />
				<input type="hidden" name="id" value="<?php 
echo $ID;
?>
" />
			<img onclick="javascript:if(confirm('Sure you want to leave this draft?')) document.leavedraft.submit();"  id="leavebutton" src="<?php 
echo $path;
?>
/images/button_leavedraft.png" onmouseover="this.src='../images/button_leavedraft_hover.png';" onmouseout="this.src='../images/button_leavedraft.png';" class="pointer" alt="Leave!" />
		</form>
	</div>
</div>
<div id="middle">
	<?php 
if (!$_SESSION["md_userid"]) {
    ?>
		<h1>This draft is still open</h1>
		<h2><span class="orange">Login in order to join this draft!</span></h2>
		<?php 
Exemplo n.º 2
0
function removeSeat($_draft_id)
{
    $objResponse = new xajaxResponse();
    #how many are in the draft?
    $players = mysql_num_rows(mysql_query("SELECT fk_user_id FROM md_draft2user WHERE fk_draft_id = {$_draft_id}"));
    mysql_query("UPDATE md_draft SET max_players = max_players - 1 WHERE max_players > {$players} AND draft_status = 0 AND pk_draft_id = {$_draft_id}");
    $draft_info = mysql_fetch_array(mysql_query("SELECT * FROM md_draft\n\t\tWHERE pk_draft_id = {$_draft_id}"));
    $drafterlist = drafterList($_draft_id);
    $objResponse->assign("drafterlist", "innerHTML", $drafterlist);
    if ($players == $draft_info["max_players"]) {
        $objResponse->redirect("draft.php?id=" . $_draft_id);
    }
    return $objResponse;
}