<?php

function dispPlayer() {

	$str = '<!-- main body -->
		<div id="main_body">
			<div id="left_side">
				<div id="newsbox">
					<h1><img alt="" src="images/puce.png" /> <strong>Liens</strong></h1>
					<ul><li></li>';

	/////// BEGIN TABLE DOWN ///////
	$str .= dispTableBegin("l i e n s", "95", 1);
	$str .= '			
		<TR valign=top>';
		$str .= dispContactsLinks();
		$str .= '
		</TR>	
	';						
	$str .= dispTableEnd();	

		$str .= '	</ul>
					</div>
				 </div>
				
				<div id="right_side">
					<div class="rightbox">
						<h1><img alt="" src="images/puce.png" /> <strong>Contactez nous</strong></h1>
						<ul>
							<li>';
							/////// BEGIN TABLE UP ///////
	$str .= dispTableBegin("c o n t a c t", "90", 1);
	$str .= '
		<tr>
		<td>
		<table width="100%" border="0" cellspacing="2" cellpadding="2">	
	';

	$str .= dispContactsAssoInfos();

	$str .= '
		</table>
		</td>
		</tr>
	';

	$str .= dispTableEnd();
					$str .= '</li>
						</ul>
					  </div>
   				</div>
				  
        		<div class="clr">&nbsp;</div>
		    </div>';	
	
echo $str;
}



function dispContactsAssoInfos() {


	$str = '';
	$result = getAssoInfos();

	if (mysql_num_rows($result)){

		$asso = mysql_fetch_array($result);

		////// NAME //////
		if ($asso["asso_name"]) {
			$str .= '<tr>
				<td align="center">
					<B><BIG>
					'.$asso["asso_name"].'
					</BIG></B>
				</td>
				</tr>
			';
		}

		//////  ADDRESS //////
		if ($asso["asso_address"]) {
			$str .= '<tr>
				<td align="center">
					'.$asso["asso_address"].'
				</td>
				</tr>
			';
		}

		////// MAIL //////
		if ($asso["asso_mail"] || $asso["asso_mail2"]) {

			////// SPACE //////
			$str .= '<tr><td> </td></tr>';

			$str .= '<tr>
				<td align="center">
				<table>
					<tr>
					<td align="right">
						<b>
						mail: &nbsp;
						</b>
					</td>
			';

			if ($asso["asso_mail"]) {
				$str .= '
					<td align="right">
					<B><BIG>
					<a href="mailto:'.$asso["asso_mail"].'" class="texte_link">'.$asso["asso_mail"].'</a>
					</BIG></B>
					</td>
				';
			}

			if ($asso["asso_mail"] && $asso["asso_mail2"]) {
				$str .= '<td  align="center">&nbsp ou &nbsp</td>';
			}

			if ($asso["asso_mail2"]) {
				$str .= '
					<td  align="left">
						<B><BIG>
						<a href="mailto:'.$asso["asso_mail2"].'" class="texte_link">'.$asso["asso_mail2"].'</a>
						</BIG></B>
					</td>
					</tr>
				';
			}
	
			$str .= '</tr>
				</td>
				</table>';
			
		}

		if ($asso["asso_phone"]) {

			////// SPACE //////
			$str .= '<tr><td> </td></tr>';

			////// PHONE //////
			$str .= '
				<tr>
				<td width="100%" align="center">
				<table>

					<TR>
					<TD align="right">
						<B>
						t&eacute;l&eacute;phone:	
						</B>
					</TD>

					<TD align="left">
					<small>
						'.$asso["asso_phone"].'
					</small>
					</TD>
				</TR>
				</table>
				</td>
				</tr>


			';

			if ($asso["asso_phone_comment"]) {
				$str .= '
					<TR>
					<TD align=center>
					<small>
						'.$asso["asso_phone_comment"].'
					</small>
					</TD>
					</TR>
				';

			}
		}

			////// SPACE //////
			$str .= '<tr><td> </td></tr>';

	}

	return ($str);
	
}



function dispContactsLinks() {

$str ='';

	$result = getAllLinks();
	if (mysql_num_rows($result)){

		while ($link = mysql_fetch_array($result)) {

		$str .= '

			<TR valign=top>
			<TD width="70">
				<a href="http://
				'.$link["link_link"].'
				" target=new class="texte_link">
				'.$link["link_link"].'
				</a>
			</TD>
			<TD>
				'.$link["link_comment"].'
			<BR>
			</TD>
			</TR>
			<TR><TD> <BR> </TD></TR>
		';
		}
	}

return($str);
}

?>