Jump to content


Celio TI C.

Member Since 30/12/2009
Offline Last Active 11/08/2011, 14:59
-----

Topics I've Started

Css Menu Com Separadore Imagens...

13/05/2011, 16:00

Quero retirar a o ultimo separador do meu menu... minha logica nao esta boa e sou nubie no CSS entao se alguem poder me ajudar thnx !


#navbar {
	margin: 0 auto;
	padding: 0;
	position: left;
	width: 750px;
	height: 28px;
	background: #9c0 url(images/nav-bg.png) 0 0 repeat-x;
	font: bold 12px tahoma, Arial, Helvetica, sans-serif;
}

#navbar ul {
	list-style-type:non;
	margin-left:auto; /*Manter alinhado com o navegador !!!*/
	margin-right:auto;/*Manter alinhado com o navegador !!!*/
    margin-top:0;
    display:table;
	
}

#navbar li {
	padding: 0 2px 0 0;
	margin: 0;
	float: left;
	background: url(images/nav-sep.png) 100% 0% no-repeat;
}


#navbar ul li a:link, #navbar ul li a:active, #navbar ul li a:visited {
	display: block;
	float: right;
	padding: 0 20px;
	height: 28px;
	line-height: 28px;
    color: #fff;
    text-decoration: none;
}

#navbar ul li a:hover {
	background: url(images/nav-bg.png) 0 100% repeat-x;
}

Quebra De Pagina Dentro De Uma Abela...

30/06/2010, 09:26

Pessoal Bom dia !!!

Olha tem como quebrar linha dentro de uma tabela como essa
<html>
<head>
<title>Controle de Conexão</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
	<table border="1"><tr>
		<td><b>ID</b></td>
		<td><b>Data</b></td>
		<td><b>Horario</b></td>
		<td><b>Site (URL)</b></td>
		<td><b>Usuario</b></td>
		<td><b>Ip Maquina</b></td>
	</tr>
		<?php
//Iniciando a função para ciar as tabelas e iniciar a pesquisa
function fetch_records($table_name, $fields){
include 'conexao.php';
// começando a partir de
$do_dia = "28";
$do_mes = "05";
// até ...
$ate_dia = "29";
$ate_mes = "05";
$query = "SELECT traffic.id, traffic.date, traffic.time, traffic.url, traffic.authuser, hostnames.hostname 
						FROM traffic,hostnames
						WHERE (traffic.ip = hostnames.ip) AND (traffic.date BETWEEN '2010-05-28' AND '2010-05-29') AND (traffic.authuser LIKE '%celio.ribeiro%') ";
//laça para gerar os dados nas tabelas.
$resultado = mysql_query($query,$conexao);
	if($resultado)
    {
		if(mysql_num_rows($resultado) == 0)
		{
			return "nao a dados no seu database";  
		}
			Else 
			{
				while($arr = mysql_fetch_array($resultado, MYSQL_ASSOC))
				{
					$table .= "\t\t<tr>\n";
						foreach ($arr as $val_col) 
						{
							$table .= "\t\t\t".'<td>'.$val_col.'</td>'."\n";
						}
						$table .= "\t\t</tr>\n";                                       
				}
				$table .= "</table>";
				return $table;
        }
			mysql_free_result($run);       
    }
                                                
        //while ($linha = mysql_fetch_array($resultado)) 
		return "erro ao criar tabela.";
 }
        //chamando a função com tabela e dados.                                     
		$table = "traffic,hostnames";
        $cols = array("traffic.id","traffic.date","traffic.time","traffic.url","traffic.authuser","hostnames.hostname",);  //traffic.id, traffic.date, traffic.time, traffic.url, traffic.authuser, hostnames.hostname
        echo fetch_records($table, $cols);
						
	//	mysql_closed($conexao)
		?>
</table>
</table>
</body>
</html>

estou apanhando com isso aqui...

[Ajuda] Buscar Por Data

28/06/2010, 13:42

Estou tentando tentando tentando mas nao consigo fazer um select para buscar por data...


<html>
<head>
<title>Controle de Conexão</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
	<table border="1"><tr>
		<td><b>ID</b></td>
		<td><b>Data</b></td>
		<td><b>Nome</b></td>
		<td><b>Cache</b></td>
		<td><b>Fora de Cache</b></td>
		<td><b>ID do Site</b></td>
		<td><b>Sumario de tempo</b></td>
	</tr>
		<?php
			
function fetch_records($table_name, $fields){
			include 'conexao.php';
			// começando a partir de
$do_dia = "28";
$do_mes = "05";

// até ...
$ate_dia = "29";
$ate_mes = "05";

				//include 'execulta_sql.php';
				// Fazendo uma consulta SQL e retornando os resultados em uma tabela HTML id, date, userID, inCache, outCache, sitesID, summaryTime
					//$query = "SELECT 'traffic'.id, 'traffic'.date, 'traffic'.time, 'traffic'.bytes, 'traffic'.url, 'traffic'.authuser, 'hostnames'.id, 'hostnames'.hostnames 
					//FROM traffic, hostnames WHERER traffic.id = hostnames.id";
					//$query = 	"SELECT trafficSummaries.id,trafficSummaries.date, hostnames.hostname 
								//FROM trafficSummaries,hostnames WHERE trafficSummaries.data LIKE '%2010-05-28%' AND trafficSummaries.id = hostnames.id";
					/*$query = "SELECT trafficSummaries.* FROM trafficSumaries 
									WHERE DATA_FORMAT(data, '%m-%d')
									BETWEEN DATA_FORMAT('2010-$do_mes-$do_dia','%m-%d')
									AND DATA_FORMAT('2010-$ate_mes-$ate_dia','%m-%d')";*/
					$query = "SELECT * FROM trafficSummaries WHERE data BETWEEN '05-28' AND '05-29'";
					$resultado = mysql_query($query,$conexao);
											
						if($resultado)
						{
						if(mysql_num_rows($resultado) == 0){
                                return "nao a dados no seu database";  
						}
							Else {
								while($arr = mysql_fetch_array($resultado, MYSQL_ASSOC)){
									$table .= "\t\t<tr>\n";
										foreach ($arr as $val_col) 
										{
											$table .= "\t\t\t".'<td>'.$val_col.'</td>'."\n";
										}
										$table .= "\t\t</tr>\n";                                       
								}
								$table .= "</table>";
								return $table;
							}
							mysql_free_result($run);       
						}
						
						//while ($linha = mysql_fetch_array($resultado)) 
						return "erro ao criar tabela.";
 }
						{
		?>
   		<tr>
			<td><?php echo $linha['id']; ?></td>
			<td><?php echo $linha['date']; ?></td>
			<td><?php echo $linha['userID']; ?></td>
			<td><?php echo $linha['inCache']; ?></td>
			<td><?php echo $linha['outCache']; ?></td>
			<td><?php echo $linha['siteID']; ?></td>
			<td><?php echo $linha['summaryTime']; ?></td>

		</tr>
		<?php
						}
						//$table = "product_master";
        //$cols = array("id","date","userID","inCache","outCache","sitesID","summaryTime","ase",);
        echo fetch_records($table, $cols);
						
		//mysql_closed($conexao)
		?>
</table>
</table>
</body>
 </html>

resolvi meu problema mas agora quando eu coloco o seguinte comando...

$query = "SELECT traffic.id, traffic.date, traffic.time, traffic.url, traffic.authuser, hostnames.hostname FROM traffic,hostnames 
							WHERE traffic.date BETWEEN '2010-05-28' AND '2010-05-29'";



o sistema ultrapassa o tempo limite ....

e nao retorna nada....

eu queria fazer algo tipo isso...


$query = "SELECT traffic.id, traffic.date, traffic.time, traffic.url, traffic.authuser, hostnames.hostname FROM traffic,hostnames 
							WHERE traffic.date BETWEEN '2010-05-28' AND '2010-05-29'
WHERE traffic.ip = hostnames.ip";

O Que A De Errado ?''

21/06/2010, 17:35

pessoal segue meu codigo...

conexao.php
<?php
$host="ip:11000"; //porta
$usuario="XXX";
$senha="XXX";
$nome_banco="mysar";
if (!($conexao = @mysql_conect("$host","$usuario","$senha"))){
echo"<p align='center'> Erro ao conectar ao banco!</p>";
exit;}
if (!($nome_banco=@mysql_select_db("$nome_banco", $conexao))){
echo"<p aling='center'>Erro ao selecionar o banco!!"<//p>;
exit;}



?>


consulta_sql.php
<?php 
function execulta_sql($sql,$conexao){
if (empty($sql)or !($conexao)))
return 0;
if (!($resposta=@mysql_query($sql, $conexao)))
{echo"<p aling='center'>Erro na execulção do comando</p>"
exit;}
return $resposta;}?>



Listar.php lista em uma tabela os dados.... deveria...

<html>
      <head>
      <title></title>
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
      </head>
      <body>
    
<table border="1"><tr>
   <td><b>ID</b></td>
   <td><b>Data</b></td>
   <td><b>Nome</b></td>
   <td><b>Cache</b></td>
   <td><b>Fora de Cache</b></td>
   <td><b>ID do Site</b></td>
   <td><b>Sumario de tempo</b></td>
</tr>
<?php
include 'conexao.php';
include 'consulta_sql.php';
// Fazendo uma consulta SQL e retornando os resultados em uma tabela HTML id, date, userID, inCache, outCache, sitesID, summaryTime
$query = "SELECT id,date,userID,inCache,outCache,sitesID,summaryTime FROM guestbook ORDER BY id";
$resultado = mysql_query($query,$conexao);
while ($linha = mysql_fetch_array($resultado)) {
   ?>
   
   <tr>
      <td><? echo $linha['id']; ?></td>
      <td><? echo $linha['date']; ?></td>
      <td><? echo $linha['userID']; ?></td>
	  <td><? echo $linha['inCache']; ?></td>
	  <td><? echo $linha['outCache']; ?></td>
 	  <td><? echo $linha['siteID']; ?></td>
	  <td><? echo $linha['summaryTime']; ?></td>

   </tr>
<?php
   }

?>
 </table>
 </table>
 </body>
 </html>


a tabela esta saindo em branco sem nem um dado;;; mao esta dando erro nem nada... e como se nao tivessse dados... detalhe a tabela tem muitos dados ...

IPB Skin By Virteq