Jump to content


Photo

Ajuda Com Sistema De Noticias Feito Por Mim!


  • Faça o login para participar
7 replies to this topic

#1 PlaynowGames

PlaynowGames

    12 Horas

  • Usuários
  • 184 posts
  • Sexo:Não informado

Posted 02/10/2004, 11:01

<?php
if (eregi("block-Not.php", $_SERVER['PHP_SELF'])) {
    Header("Location: index.php");
    die();
}

global $prefix, $db;

echo "<link rel='stylesheet' href='themes/proclassbasic/style/style_ud.css' type='text/css'>";
echo"<table width='480' border='0' cellspacing='0' cellpadding='0' height='14'>
  <tr>
    <td>
      <form method='post' action='http://webmail.criarsites.com.br:82/cgi-bin/openwebmail/openwebmail.pl?' target='_blank' enctype='application/x-www-form-urlencoded' name='login'>
        <table align=center border=0 cellspacing=0 cellpadding=0 width='100%' height='15%' class='borda_email'>
          <tr>
            <td align=right nowrap width='87' height='2'>
              <div align='left'><font size='2' face='Geneva, Arial, Helvetica, san-serif'><img src='themes/proclassbasic/images/seikogan_layout_index_01.jpg' width='81' height='23'></font></div>
            </td>
            <td align=right nowrap width='57' height='2'><font size='2' face='Geneva, Arial, Helvetica, san-serif'>E-mail:
              </font></td>
            <td align=left width='108' height='2'>
              <input type='text' name='loginname'  size='16' onChange='focuspwd()' style='background-color: rgb(204,204,204); border: 1px line'/>
            </td>
            <td align=left width='54' height='2'><font size='2' face='Geneva, Arial, Helvetica, san-serif'>Senha</font>:</td>
            <td align=left width='103' height='2'>
              <input type='password' name='password'  size='16' onChange='focusloginbutton()' style='background-color: rgb(204,204,204); border: 1px line' />
            </td>
            <td align=left width='50' height='2'>
              <div align='center'>
                <input type='submit' name='loginbutton' value='ok' style='background-color: rgb(204,204,204); border: 1px line' />
              </div>
            </td>
            <td align=left width='64' height='2'><font size='1' face='Geneva, Arial, Helvetica, san-serif'>lembrar</font></td>
            <td align=left width='256' height='2'>
              <input type='checkbox' name='rememberme' value='1' style='background-color: rgb(204,204,204); border: 1px line' />
            </td>
          </tr>
        </table>
        </form>
</td>
  </tr>
</table>";
$pid = intval($row['pid']);
$prefix0 = $db->sql_query("SELECT pid, title, page_header FROM " . $prefix . "_pages  WHERE active='1' ORDER BY pid DESC"  );
$k='1';
while ($row = $db->sql_fetchrow($prefix0) AND $k <=1 ){
$pid= intval($row['pid']);
$title = stripslashes($row['title']);

if($pid <= '100'){
echo "<table width='400' border='0' cellspacing='0' cellpadding='0'>
  <tr>
    <td class='topo_mestre'><a href='modules.php?name=Content&pa=showpage&pid=$pid'><font size='4' class='footmsg'>$title </font></a></td>
  </tr>
</table>";
}
$k=$k+1;
}
echo "<table width='8%' border='0' cellspacing='0' cellpadding='0' align='left'>
  <tr>
    <td><img src='$imagem' width='120' height='107' border='1'></td>
  </tr>
</table>";
$prefix1 = $db->sql_query("SELECT pid, title, page_header FROM " . $prefix . "_pages  WHERE active='1' ORDER BY pid DESC"  );
$k='1';
while ($row = $db->sql_fetchrow($prefix1) AND $k <=8) {
$pid = intval($row['pid']);
$title = stripslashes($row['title']);
if($pid <='100'){
echo "<table width='350' border='0' cellspacing='0' cellpadding='0'>
  <tr>
    <td width='26'><img src='themes/proclassbasic/images/seta_03.gif' width='14' height='5'></td>
    <td width='374' class='borda'><a href=modules.php?name=Content&pa=showpage&pid=$pid><font face='Geneva, Arial, Helvetica, san-serif' size='2'>$title</font></a></td>
  </tr>
</table>";

}
$k=$k+1;
}
echo"<br><br><table width='480' border='0' cellspacing='1' cellpadding='0' class='borda2'>
  <tr>
    <td width='11%' background='themes/proclassbasic/images/back_fundo.jpg'>
      <table width='99%' border='0' cellspacing='0' cellpadding='0' bgcolor='#FFFFFF'>
        <tr>
          <td width='9%' background='themes/proclassbasic/images/back_fundo.jpg' class='texto_corpo' height='2'><img src='themes/proclassbasic/images/bto_planos.jpg' width='100' height='16'>
          <td width='84%' height='2'> &nbsp;<span class='texto_letras'>&nbsp;&nbsp;<a href='modules.php?name=Planos'><span class='texto_letras'>Conhe&ccedil;a
            os planos de hospedagem que a Criar oferece</span></a>.</span></td>
          <td width='7%' background='themes/proclassbasic/images/back_fundo.jpg' height='2'>&nbsp;</td>
        </tr>
      </table>
    </td>
  </tr>
</table>";


//SELECT  * FROM TABELA ORDER BY rand() LIMIT 1
$pid = intval($row['pid']);
$case0 = $db->sql_query("SELECT pid, title, page_header FROM nuke_pages WHERE pid = '$pid' ORDER BY pid DESC");
$k='1';
while ($row = $db->sql_fetchrow($case0) AND $k <=1){
$pid = intval($row['pid']);
$title = stripslashes($row['title']);
$page_header = $row['page_header'];

echo "<br><table width='240' border='0' cellspacing='0' cellpadding='0' align='left'>
  <tr>
    <td width='55' background='themes/proclassbasic/images/top_news.gif'>
      <div align='center'><font color='#FFFFFF'><b class='letras_home'><a href='modules.php?name=Content&pa=showpage&pid=$pid'>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$title</a></b></font></div>
    </td>
    <td bgcolor='#999999' width='185'><font color='#FFFFFF'><b class='letras_home'>&nbsp;</b></font></td>
  </tr>
  <tr background='themes/proclassbasic/images/back_0.jpg'>
    <td class='borda3' colspan='2'><font face='Geneva, Arial, Helvetica, san-serif' size='2' color='#000000'>$page_header</font></td>
  </tr>
</table>";
$k=$k+1;
}


$case1 = $db->sql_query("SELECT pid, title, page_header FROM nuke_pages WHERE pid = '$pid' ORDER BY pid DESC");
$k='1';
while ($row = $db->sql_fetchrow($case1) AND $k <=1){
$pid = intval($row['pid']);
$title = stripslashes($row['title']);
$page_header = $row['page_header'];
if($pid <= '100'){
echo "<table width='240' border='0' cellspacing='0' cellpadding='0' align='left'>
  <tr>
    <td width='55' background='themes/proclassbasic/images/top_news.gif'>
      <div align='center'><font color='#FFFFFF'><b class='letras_home'><a href='modules.php?name=Content&pa=showpage&pid=$pid'>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$title</a></b></font></div>
    </td>
    <td bgcolor='#999999' width='185'><font color='#FFFFFF'><b class='letras_home'>&nbsp;</b></font></td>
  </tr>
  <tr background='themes/proclassbasic/images/back_0.jpg'>
    <td class='borda3' colspan='2'><font face='Geneva, Arial, Helvetica, san-serif' size='2' color='#000000'>$page_header</font></td>
  </tr>
</table>";
}
$k=$k+1;
}
$case2 = $db->sql_query("SELECT pid, title, page_header FROM " . $prefix . "_pages WHERE active='1' ORDER BY pid DESC");
$k='1';
while ($row = $db->sql_fetchrow($case2) AND $k <=1 ){
$pid = intval($row['pid']);
$title = stripslashes($row['title']);
$page_header = $row['page_header'];
if($pid >= '8'){
echo "<br><br><br><br><br><table width='160' border='0' cellspacing='0' cellpadding='0' align='left'>
  <tr>
    <td bgcolor='#CCCCCC' width='240'>
      <div align='center'><font color='#FFFFFF'><b class='letras_home'><a href='modules.php?name=Content&pa=showpage&pid=$pid'>
        </a></b></font></div>
      <font color='#FFFFFF'><b class='letras_home'>&nbsp;<a href='modules.php?name=Content&pa=showpage&pid=$pid'>$title</a></b></font></td>
  </tr>
  <tr>
    <td class='borda3' background='themes/proclassbasic/images/back_0.jpg'><font face='Geneva, Arial, Helvetica, san-serif' size='2' color='#000000'>$page_header</font></td>
  </tr>
</table>


";
}
$k=$k+1;
}

$case3 = $db->sql_query("SELECT pid, title, page_header FROM " . $prefix . "_pages WHERE active='1' ORDER BY pid DESC");
$k='1';
while ($row = $db->sql_fetchrow($case3) AND $k <=1){
$pid = intval($row['pid']);
$title = stripslashes($row['title']);
$page_header = $row['page_header'];
if($pid <= '100'){
echo "<table width='160' border='0' cellspacing='0' cellpadding='0' align='left'>
  <tr>
    <td bgcolor='#CCCCCC' width='240'>
      <div align='center'><font color='#FFFFFF'><b class='letras_home'><a href='modules.php?name=Content&pa=showpage&pid=$pid'>
        </a></b></font></div>
      <font color='#FFFFFF'><b class='letras_home'>&nbsp;<a href='modules.php?name=Content&pa=showpage&pid=$pid'>$title</a></b></font></td>
  </tr>
  <tr>
    <td class='borda3' background='themes/proclassbasic/images/back_0.jpg'><font face='Geneva, Arial, Helvetica, san-serif' size='2' color='#000000'>$page_header</font></td>
  </tr>
</table>

";
}
$k=$k+1;
}

$case4 = $db->sql_query("SELECT pid, title, page_header FROM " . $prefix . "_pages WHERE active='1' ORDER BY pid DESC");
$k='1';
while ($row = $db->sql_fetchrow($case4) AND $k <=1){
$pid = intval($row['pid']);
$title = stripslashes($row['title']);
$page_header = $row['page_header'];
if($pid <= '100'){
echo "<table width='160' border='0' cellspacing='0' cellpadding='0' align='left'>
  <tr>
    <td bgcolor='#CCCCCC' width='240'>
      <div align='center'><font color='#FFFFFF'><b class='letras_home'><a href='modules.php?name=Content&pa=showpage&pid=$pid'>
        </a></b></font></div>
      <font color='#FFFFFF'><b class='letras_home'>&nbsp;<a href='modules.php?name=Content&pa=showpage&pid=$pid'>$title</a></b></font></td>
  </tr>
  <tr>
    <td class='borda3' background='themes/proclassbasic/images/back_0.jpg'><font face='Geneva, Arial, Helvetica, san-serif' size='2' color='#000000'>$page_header</font></td>
  </tr>
</table><br><br><br><br>";
}
$k=$k+1;
}
?>

Galera este é o codigo de meu sistema

01
Figura 01

02
Figura 02


Repare que o titulo repete na lista de noticias em baixo........o que eu queria é que ele passasse os valores em seguencia por noticia.....cada um ta numerado de forma decrescente...veeja na figura 01 que o ultimo ID 09 passa pra noticia de baixo com o ID 08......só que só acontece ai......depois não passa mais.......devia passa adiante...a noticia do lado seria o ID 07.....nas tabelas(html) de baixo seria 06 e por ai vai.....só que isso seria de uma forma decrescente para que a cada noticia adicionada seja atualizada.........vese vcsme entendem...desculpe a embolação no coddigo..to começando...

vlw!!

#2 magnum

magnum

    Eu chego lá! (12h)

  • Usuários
  • 271 posts
  • Sexo:Não informado
  • Localidade:Campina Grande - PB

Posted 02/10/2004, 12:30

Dá uma olhada nesse q eu fiz recentemente, acho q ta do jeito q vc quer.

Attached Files


Álvaro Magnum Barbosa Neto
WAM WebMedia
magnum@wamwebmedia.com.br

#3 PlaynowGames

PlaynowGames

    12 Horas

  • Usuários
  • 184 posts
  • Sexo:Não informado

Posted 04/10/2004, 08:57

ai magnum..este script não esta funcionando não...!!

tem um monte de letras embaraçadas quando acesso este arquivo!!

#4 magnum

magnum

    Eu chego lá! (12h)

  • Usuários
  • 271 posts
  • Sexo:Não informado
  • Localidade:Campina Grande - PB

Posted 04/10/2004, 09:50

Valeu velho, não entendo porque nao estou conseguindo enviar meus arquivos pro fórum.. :(
Álvaro Magnum Barbosa Neto
WAM WebMedia
magnum@wamwebmedia.com.br

#5 Goku Jr

Goku Jr

    Nilson

  • Usuários
  • 3757 posts
  • Sexo:Masculino

Posted 04/10/2004, 10:38

uhhh eu consegui visualizar normal !

use o WinRAR 3.3 , talves possa ajudar !!!

até + !
-----------------------------------------------------------------------
PALMEIRAS - Primeiro campeão do mundo em 1951

#6 Prog

Prog

    ...

  • Ex-Admins
  • 3761 posts
  • Sexo:Masculino
  • Localidade:Rio de Janeiro/RJ
  • Interesses:TI, Software Livre, Design Digital e Rock'n'Roll.

Posted 04/10/2004, 10:41

Esse lance dos arquivos anexos, eu consigo ver, no programa que eu utilizo eu faço assim:

Estou usando WinRAR.

- Abro o doc ZIP;
- aparece apenas um documento, sem extenção, se eu abro, aparece tudo embaralhado;
- Clico em ver;
- É aberta uma outra instancia do WinRAR, esta com os arquivos sendo mostrados corretamente;

Este poderia ser algum bug no Invision? Tenho observado que isto ocorre com a maioria dos arquivos compactados. Os arquivos parecem ser compactados novamente quando enviados como anexo.
------
Mero mortal!

#7 diogv

diogv

    Novato no fórum

  • Usuários
  • 12 posts
  • Sexo:Não informado

Posted 04/10/2004, 18:37

Faz o seguinte renomea o wam_sistema_noticias[1]
para wam_sistema_noticias[1].rar

#8 magnum

magnum

    Eu chego lá! (12h)

  • Usuários
  • 271 posts
  • Sexo:Não informado
  • Localidade:Campina Grande - PB

Posted 04/10/2004, 21:01

Obrigado pelas dicas (y)
Álvaro Magnum Barbosa Neto
WAM WebMedia
magnum@wamwebmedia.com.br




1 user(s) are reading this topic

0 membro(s), 1 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq