Esempio n. 1
0
		$query = $db->query ( $sql );
		
		if ($db->num_rows ( $query )) {
			?>
			<table width="100%" cellpadding="0" cellspacing="0" border="0">
	<tr>
		<td height="10"></td>
	</tr>
	<tr>
		<td class="l3"></td>
	</tr>
		<?
			while ( $rows = $db->fetch_assoc ( $query ) ) {
				
				if (strlen ( $rows ['txtnome'] ) > 0) {
					$telefone = (formata_telefone ( $rows ['txttelefone'] ) != ('(00) 0000-0000')) ? formata_telefone ( $rows ['txttelefone'] ) : '';
					?>
				<tr id="clienteescolhido_bg_<?php 
echo $rows['idcliente'];
?>
"
		style="cursor: pointer; cursor: hand;"
		onclick="javascript:carrega_cliente_mostradados('<?php 
echo $rows['idcliente'];
?>
')">
		<td height="25" id="clienteescolhido_<?php 
echo $rows['idcliente'];
?>
">&nbsp;<img
			src="<?php 
Esempio n. 2
0
					$dtaniversario = explode ( '/', $rows ['dtaniversario'] );
					$dia = $dtaniversario [0];
					$mes = $dtaniversario [1];
				}
				
				if (strpos ( $rows ['dtaniversario'], '-' )) {
					$dtaniversario = explode ( '-', $rows ['dtaniversario'] );
					$dia = $dtaniversario [2];
					$mes = $dtaniversario [1];
				}
				$mktime = mktime ( 0, 0, 0, $mes, $dia, date ( "Y" ) );
				$rows ['dtaniversario'] = $dia . '/' . $mes;
				//$anos = calculateYearsOld($explo[2], $explo[1], $explo[0]);
				$telefone = formata_telefone ( $rows ['txttelefone'] );
				if (strlen ( $rows ['txtcelular'] ) > 0)
					$telefone .= ' / ' . formata_telefone ( $rows ['txtcelular'] );
				if (substr ( $telefone, 0, 3 ) == ' / ')
					$telefone = substr ( $telefone, 3 );
				
				$telefone = str_replace ( '(00) 0000-0000 / ', '', $telefone );
				$telefone = str_replace ( '(00) 0000-0000', '', $telefone );
				if (strlen ( $telefone ) <= 17)
					$telefone = str_replace ( '/', '', $telefone );
				
				$cor = ($cor == '#add4fb') ? '#f0f0f0' : '#add4fb';
				if ($dia == date ( 'd' ) && $mes == date ( 'm' ))
					$aniversariante = true;
				else
					$aniversariante = false;
				?>
						<tr bgcolor="<?php