Ir para conteúdo
Fórum Script Brasil

PJotah

Membros
  • Total de itens

    6
  • Registro em

  • Última visita

Sobre PJotah

  • Data de Nascimento 10/10/1984

Contatos

  • Website URL
    http://www.colegiosaopauloma.com.br/

Perfil

  • Gender
    Male
  • Location
    SLZ/MA

PJotah's Achievements

0

Reputação

  1. PJotah

    Galeria de fotos

    Refiz uma parte do codigo e arrumei esse problema via css, o problema é que o retorno não tava ficando centralizado, criei uma classe css só pra ele e resolveu! Vlw!
  2. PJotah

    Galeria de fotos

    Ola galera, de novo venho pedir uma ajudinha basica, tenho um codigo de galeria de fotos, onde os ultimos albuns aparecem na pagina principal, só que esses albuns aparecem na horizontal e eu gostaria que fosse na vertical, já tentei alterar varias vezes, mas só bagunca o codigo! segue o codigo: <?php require_once('../Connections/conection.php'); ?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } $maxRows_rsAlbum = 25; $pageNum_rsAlbum = 0; if (isset($_GET['pageNum_rsAlbum'])) { $pageNum_rsAlbum = $_GET['pageNum_rsAlbum']; } $startRow_rsAlbum = $pageNum_rsAlbum * $maxRows_rsAlbum; mysql_select_db($database_conection, $conection); $query_rsAlbum = "SELECT * FROM Albuns ORDER BY IDAlbum DESC"; $query_limit_rsAlbum = sprintf("%s LIMIT %d, %d", $query_rsAlbum, $startRow_rsAlbum, $maxRows_rsAlbum); $rsAlbum = mysql_query($query_limit_rsAlbum, $conection) or die(mysql_error()); $row_rsAlbum = mysql_fetch_assoc($rsAlbum); if (isset($_GET['totalRows_rsAlbum'])) { $totalRows_rsAlbum = $_GET['totalRows_rsAlbum']; } else { $all_rsAlbum = mysql_query($query_rsAlbum); $totalRows_rsAlbum = mysql_num_rows($all_rsAlbum); } $totalPages_rsAlbum = ceil($totalRows_rsAlbum/$maxRows_rsAlbum)-1; ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>iSimples Slide</title> <style type="text/css"> <!-- body { background-image: url(interface/gradtab.png); background-repeat: repeat-x; margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; background-color: #000000; } .style1 { font-family: Geneva, Arial, Helvetica, sans-serif; font-weight: bold; font-size: medium; } .style2 { font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 10px; color: #333333; } .style5 {font-size: 10px; color: #333333; } .highslide img { border: 2px solid silver; } .highslide:hover img { border-color: gray; } .highslide-image { border-width: 2px; border-style: solid; border-color: black black #202020 black; background: gray; } --> </style></head> <body> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="10">&nbsp;</td> <td>&nbsp;</td> <td width="10">&nbsp;</td> </tr> <tr> <td width="10">&nbsp;</td> <td align="center"><span class="style1">CLIQUE NO ÁLBUM QUE DESEJA VER AS FOTOS</span></td> <td width="10">&nbsp;</td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>&nbsp;</td> <td align="center"><table border="0"> <tr> <?php do { // horizontal looper version 3 ?> <td align="center"><a href="fotos.php?IDAlbum=<?php echo $row_rsAlbum['IDAlbum']; ?>"><img src="imagens/capa/<?php echo $row_rsAlbum['Capa']; ?>" border="0" class="highslide-image" /></a><a href="fotos.php?IDAlbum=<?php echo $row_rsAlbum['IDAlbum']; ?>"></a><a href="fotos.php?IDAlbum=<?php echo $row_rsAlbum['IDAlbum']; ?>"><br /> </a><span class="style2"><a href="fotos.php?IDAlbum=<?php echo $row_rsAlbum['IDAlbum']; ?>" class="style2"><?php echo $row_rsAlbum['Desc']; ?></a></span><span class="style5"><a href="fotos.php?IDAlbum=<?php echo $row_rsAlbum['IDAlbum']; ?>"></a></span><a href="fotos.php?IDAlbum=<?php echo $row_rsAlbum['IDAlbum']; ?>"><br /> </a></td> <?php $row_rsAlbum = mysql_fetch_assoc($rsAlbum); if (!isset($nested_rsAlbum)) { $nested_rsAlbum= 1; } if (isset($row_rsAlbum) && is_array($row_rsAlbum) && $nested_rsAlbum++ % 5==0) { echo "</tr><tr>"; } } while ($row_rsAlbum); //end horizontal looper version 3 ?> </tr> </table></td> <td>&nbsp;</td> </tr> <tr> <td width="10">&nbsp;</td> <td>&nbsp;</td> <td width="10">&nbsp;</td> </tr> </table> </body> </html> <?php mysql_free_result($rsAlbum); ?> desde já obrigado!
  3. PJotah

    Data e hora no site

    Vlw mais uma vez, problema corrigido, reescrevi o codigo! O problema era só esse mesmo, depois de meia noite não aparecia mais a hora, por causa desse erro!
  4. PJotah

    Data e hora no site

    Mais uma vez estou aqui pra pedir uma ajuda basica. Coloquei no site que estou desenvolvendo um codigo de data e hora, simples, que faz a saudacao ao usuario de acordo com a hora. Segue o codigo abaixo, o probleme é que estava funcionando perfeitamente, e simplesmente parou de funcionar. não fiz nenhuma alteracao no codigo e nem no index. O problema é no arquivo ou no servidor? index.php <? include('noticias/admin/config/conexao.php'); header('Content-Type: text/html; charset=utf-8'); */registro de data----------------------------------------- $data=date('d/m/Y'); $hora=date('H'); $minutos=date('i'); $segundos=date('s'); -------------------------------------------------------------- ?> <title>Colégio São Paulo</title> </head> <body> <table width="963" height="107" border="0" align="center" class="estilotopo"> <tr> <td><table width="953" height="100" border="0" class="estilotopo2"> <tr> <td width="70">&nbsp;</td> <td width="70">&nbsp;</td> <td width="70">&nbsp;</td> <td width="70">&nbsp;</td> <td width="349">&nbsp;</td> <td width="53">&nbsp;</td> <td width="120">&nbsp;</td> <td width="117">&nbsp;</td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td><a href="#" class="classe2">Webmail</a></td> <td><a href="#" class="classe2">Boletím</a></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td colspan="3"> */impressao da data ----------------------------------------------------------------------------------- <? if($hora>=12 && $hora<18) { echo("Boa Tarde, hoje é $data - $hora:$minutos:$segundos"); } if($hora>=18 && $hora<24) { echo("Boa Noite, hoje é $data - $hora:$minutos:$segundos"); } if($hora>=24 && $hora<12) { echo("Bom Dia, hoje é $data - $hora:$minutos:$segundos"); } ?> ------------------------------------------------------------------------------------------------------------ </td> </tr> </table></td> </tr> </table> <tr> <td width="963"><table width="963" border="0" height="24" align="center" class="estilomenu"> <tr class="menucsp"> <td width="73"><a href="index.php" class="classe1">Home</a></td> <td width="95">O Colégio</td> <td width="111">Pedagógico</td> <td width="103">Legislação</td> <td width="95">Notícias</td> <td width="128">Galeria de Fotos</td> <td width="85">Serviços</td> </tr> </table></td> </tr> <table width="963" border="0" align="center"> <tr> <td width="727"><table width="717" height="255" border="0"> <tr> <td height="20">&nbsp;</td> </tr> <tr> <td><table width="715" border="0" height="255"> <tr> <td><IFRAME name=noticiasindex marginWidth=0 marginHeight=0 src="noticias/noticias-index.php" frameBorder=0 width=715 height=300 scrolling="no"></IFRAME></td> </tr> </table></td> </tr> </table> <table width="717" border="0"> <tr> <td height="98">&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> </table> <p>&nbsp;</p></td> <td width="241"><table width="230" height="159" border="0"> <tr> <td><table width="230" border="0"> <tr> <td class="colun_notis"><table width="228" border="0"> <tr> <td>Ultimas Noticias:</td> </tr> </table></td> </tr> <tr> <td class="colun_notis"><? $query_noticias = "select * from tbl_noticias where status = '1' limit 8"; $rs_noticias = mysql_query($query_noticias); while($campo_noticias = mysql_fetch_array($rs_noticias)){ $id_noticia = $campo_noticias['id_noticia']; $data_noticia = $campo_noticias['data']; $titulo_noticia = $campo_noticias['titulo']; $descricao_noticia = $campo_noticias['descricao']; $texto_noticia = $campo_noticias['msg']; $fonte_noticia = $campo_noticias['legenda']; $imagem_noticia = $campo_noticias['nome_arquivo']; ?> <b><img src="imagens/seta_laranja.gif" width="7" height="7" alt="seta" /> <?= $data_noticia; ?> </b>: <a href="noticias/noticias-descricao.php?id_noticia=<?= $id_noticia;?>" title="<?= $descricao_noticia; ?>" class="classe1"> <?= $descricao_noticia; ?> </a></td> </tr> </table> <span class="colun_notis"> <?}?> </span></td> </tr> </table> <p>&nbsp;</p></td> </tr> </table> <table width="963" border="0" align="center"> <tr> <td class="rodape">© Copyright 2011, Direitos reservados ao Colégio São Paulo</td> </tr> </table> <p>&nbsp;</p> </body> </html>
  5. PJotah

    Logar com usuario e senha

    Problema resolvido, muito obrigado pela ajuda!
  6. Ola pessoal, estou tendo uma dificuldade e gostaria da ajuda de vocês se possivel! eu tenho um script de boletim escolar, é simples porem é suficiente pra mim! O meu problema é que ele tem uma pagina principal onde o aluno digita o numero da matricula e ve o boletim, só que eu gostaria que alem do numero da matricula o aluno também tenha que digitar uma senha, por que se não qualquer pessoal pode ver o boletim de qualquer um, mas eu não consigo modificar o codigo pra incluir o pedido de senha. segue abaixo o codigo: principal.php <div id="ConteudoQuatro"> <table width="90%" class="combordas"> <?php $conf_matricula = $_POST['busca_matricula']; if($conf_matricula == ""){ echo <<<Eoform <form method="POST" action="principal"> Digite a matrícula do(a) aluno(a) <br/> <input type="text" name="busca_matricula" size="20" /> <input type="submit" value="Consultar" /> </form> Eoform; }elseif($conf_matricula != ""){ //Seleciona os dados $consulta = "SELECT * FROM $tabela_alunos where matricula ='".$conf_matricula."'"; $resultado = mysql_query($consulta) or die ("<p class='cor_alert'>Não foi possível realizar a consulta.</p>"); //se o numero de registro for 0 retorna para o form if(mysql_num_rows($resultado)==0){ header("location:princpal"); } while (list($id,$matricula,$senha,$nome,$sobrenome,$email,$endereco,$bairro,$sexo,$serie,$turno,$turma,$data_nascimento, $estado,$cidade,$pai,$mae,$data_cadastro, $hora_cadastro,$telefone,$nivel_acesso,$ativo,$cookie,$foto,$observacoes) = mysql_fetch_array($resultado)) { echo <<<eof <tr> <th colspan="7"><h2 class="centro"> Boletim Escolar </h2> </th> </tr> <tr> <th colspan="7" align="center"> Dados do(a) aluno(a) </th> </tr> <tr> <td>Matricula:</td> <td>$matricula</td> <td> Nome: </td> <td colspan="7"> <strong> $nome $sobrenome </strong></td> </tr> <tr> <td>Série:</td> <td>$serie.ª</td> <td>Turma:</td> <td colspan="2">$turma</td> <td>Turno:</td> <td colspan="2">$turno</td> </tr> <tr> <td>Pai:</td> <td colspan="3">$pai</td><td>Mãe:</td> <td colspan="3">$mae</td> </tr> <tr> <td>Endereço:</td> <td colspan="8">$endereco $bairro. $cidade/$estado. Tel.:$telefone</td> </tr> eof; } ?> <tr> <th colspan="7"> Notas do(a) aluno(a) </th> </tr> <tr> <td>Disciplinas</td><td>I unidade</td><td>II unidade</td><td>III unidade</td><td>IV unidade</td><td> Média </td><td> Situação </td> </tr> <?php //Seleciona os dados $consulta = "SELECT DISTINCT $tabela_notas.*,$tabela_disciplinas.* FROM $tabela_notas,$tabela_disciplinas where $tabela_disciplinas.id_disciplina=$tabela_notas.id_disciplina && $tabela_notas.matricula ='".$conf_matricula."'"; $resultado = mysql_query($consulta) or die ("<p class='cor_alert'>Não foi possível realizar a consulta.</p>".mysql_error()); //se o numero de registro for 0 retorna para o form if(mysql_num_rows($resultado)== 0){ echo "<p class='cor_alerta'>Não existem notas cadastradas, até o momento!</p>"; } while (list($cod,$matricula,$id_disciplina,$media,$situacao,$falta,$unid1,$unid2,$unid3,$unid4,$f_unid1,$f_unid2,$f_unid3,$f_unid4, $id_disciplina,$disciplina,$serie,$turma,$ano,$professor,$aulas_previstas,$aulas_dadas) = mysql_fetch_array($resultado)) { //Verifica se o aluno ta aprovado ou não $ap_rp = $media >=7? "<span class='cor_alerta_positivo'>Aprovado </span>": "<span class='cor_alerta'>Reprovado</span>"; //Diferencia notas menores que 5 das maiores $unid1 = $unid1 <5 ? "<span class='cor_alerta'>$unid1</span>": "<span class='cor_alerta_positivo'>$unid1</span>"; $unid2 = $unid2 <5 ? "<span class='cor_alerta'>$unid2</span>": "<span class='cor_alerta_positivo'>$unid2</span>"; $unid3 = $unid3 <5 ? "<span class='cor_alerta'>$unid3</span>": "<span class='cor_alerta_positivo'>$unid3</span>"; $unid4 = $unid4 <5 ? "<span class='cor_alerta'>$unid4</span>": "<span class='cor_alerta_positivo'>$unid4</span>"; $media = $media <5 ? "<span class='cor_alerta'>$media</span>": "<span class='cor_alerta_positivo'>$media</span>"; //Imprime os dados echo "<tr> <td class='combordas'>$disciplina</td><td class='combordas'><strong>$unid1</strong></td> <td class='combordas'><strong>$unid2</strong></td><td class='combordas'><strong>$unid3</strong></td> <td class='combordas'><strong>$unid4</strong></td><td class='combordas'> <strong>$media</strong> </td> <td class='combordas'><strong>$ap_rp</strong> </td> </tr>"; } }else{ //se n digitar a matricula retorna para o form header("location:principal"); } ?> </table> </div>
×
×
  • Criar Novo...