Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Reikia pagalbos del headerio

Parašė NxS· 2008 Lap. 16 16:11:45
#1

Sveiki, reiktu pagalvos kurioje vietoje ideti koda, kad rodytu naujausius ir populiariausius siuntinius nes kiek talpinu 1 klaida meto kazkas galunei ne tas stai failo kodas i kuri noriu italpinti:

<?php
global $theme_width,$settings,$aidlink,$locale,$userdata,$db_prefix;
echo "<table width='$theme_width' border='0' align='center' cellpadding='0' cellspacing='0' background='".THEME."images/done.jpg' height='299' style='background-repeat: no-repeat;'>
      <tr>
        <td valign='bottom' style='padding-left:80px;' width='725'>
      <a href='".BASEDIR."index.php'><img src='".THEME."images/hb1.png' border='0' alt='Pagrindinis'></a>
      <a href='".BASEDIR."forum/index.php'><img src='".THEME."images/hb2.png' border='0' alt='Forumas'></a>
      <a href='".BASEDIR."search.php'><img src='".THEME."images/hb3.png' border='0' alt='Paie&#240;ka'></a>
      </td>

      <td width='235' style='padding-right:90px; padding-top:20px;'  valign='middle'>";
      if (iMEMBER) {
   $msg_count = dbcount("(message_id)", "messages", "message_to='".$userdata['user_id']."' AND message_read='0'AND message_folder='0'");
   echo "<table width='235' border='0' cellspacing='2' cellpadding='2'>
  <tr>
    <td>\n";
   if ($userdata['user_avatar'] != "") {
   echo "<center><img src='".BASEDIR."images/avatars/".$userdata['user_avatar']."' width='100' height='100' style='border:1px'></center>\n";
   } else {
   echo "<center><img src='".THEME."images/noavatar.gif' width='100' height='100' border='0'></center>\n";
   }
   echo "</td>
    <td valign='top'><img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."edit_profile.php' class='side'>Redaguoti profil&#225;</a><br>
   <img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."profile.php?lookup=".$userdata['user_id']."' class='side'>A&#240; i&#240; &#240;alies</a><br>
<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."messages.php' class='side'>&#222;inut&#235;s [naujø: <b><span style='color:#990000'>".sprintf($msg_count)."</span></b>]</a><br>
<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."members.php' class='side'>Nariai</a><br>\n";
   if (iADMIN && (iUSER_RIGHTS != "" || iUSER_RIGHTS != "C")) {
      echo "<img src='".THEME."images/bullet.gif' alt=''> <a href='".ADMIN."index.php".$aidlink."' class='side'>Administracija</a><br>\n";
   }
   echo "<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."setuser.php?logout=yes' class='side'>".$locale['084']."</a><br><br>
   <b><span class='ip'>IP: </span></b>";
   $userip = $_SERVER['REMOTE_ADDR'];
      $host = gethostbyaddr($userip);
      echo "<span class='ip'>".$userip."</span><br /></td></tr></table>\n";
   } else {
   echo "<table width='170' border='0' cellspacing='0' cellpadding='0' align='center'><form name='loginform' method='post' action='".FUSION_SELF."'>
  <tr>
    <td align='right' class='ip'>Vardas: </td>
    <td>&nbsp;<input type='text' name='user_name' class='textbox' style='width:100px;filter:alpha(opacity=70)'></td>
  </tr>
  <tr>
    <td align='right' class='ip'>".$locale['062'].": </td>
    <td>&nbsp;<input type='password' name='user_pass' class='textbox' style='width:100px;filter:alpha(opacity=70)'></td>
  </tr>
  <tr>
    <td align='right'><input type='checkbox' name='remember_me' value='y'></td>
    <td>&nbsp;<input type='submit' name='login' value='Prisijungti' class='button'></td>
  </tr>
  </form>\n";
   if ($settings['enable_registration']) {
      echo "<a href=".BASEDIR."register.php>Registracija</a> / <a href=".BASEDIR."lostpassword.php>Slapta&#254;odis</a>\n";
   }
   echo"</table>\n";
}
echo "</td>
      </tr>
    </table>\n";
echo"</td></tr><tr></tr><tr><td></td></tr></table>";
    echo "<table width='100%' cellspacing='0' cellpadding='0' class='sub-header' style='border-right: solid #b5b5b5 1px; border-left: solid #b5b5b5 1px;' >\n<tr>";
   echo "<td>\n";
   echo ($i == 0 ? "&nbsp;" : "")."</td>";
   echo "</td></tr></table>\n";
   echo "<table width='100%' border='0' cellpadding='0' cellspacing='0' bgcolor='#FFFFFF'>
</table>\n";
   echo "<table width='100%' cellpadding='4' bgcolor='#F8F8F8' cellspacing='0' border='0'><tr>";   
   
    ?>




o stai ka noriu italpinti turbut nera klaidu:

echo"<td width='40%'>";
 $result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_datestamp DESC LIMIT 0,5");
 if (dbrows($result) != 0) {
  echo "<table width='100%'>";
  while ($data = dbarray($result)) {
   echo "<tr>
    <td class='small'>
     <img src='".THEME."images/bullet.gif'>
     <a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."' title='".$data['download_title']."' class='side'>".trimlink($data['download_title'], 23)."</a>
    </td>
    <td align='right'>".$data['download_count']."</td>
   </tr>";
  }
  echo "</table>";
 } else {
  echo "<div style='text-align:center'>".$locale['004']."</div>\n";
 }

echo "</td><td width='60%' style='padding-left:80px;' >";

$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_count DESC LIMIT 0,5");
   if (dbrows($result) != 0) {
echo "<table  width='100%'>";
      while ($data = dbarray($result)) {
         echo "<tr>
            <td class='small'>
                    <img src='".THEME."images/bullet.gif'>
               <a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."' title='".$data['download_title']."' class='side'>".trimlink($data['download_title'], 23)."</a>
            </td>
            <td align='right'>".$data['download_count']."</td>
         </tr>";
      }
      echo "</table>";
   } else {
      echo "<div style='text-align:center'>".$locale['004']."</div>\n";
   }



padek jei kas supranta iskarta dekoju :)

Redagavo NxS· 2008 Lap. 16 17:11:31

Parašė xripas· 2008 Lap. 16 17:11:14
#2

https://webdnd.com/readarticle.p...cle_id=100
Cia yra to ko tau reikia kaip suprantu

Parašė NxS· 2008 Lap. 16 18:11:36
#3

Prisegu faila as i ji noriu italpinti populiariausi ir siunciamiausi siuntiniai galit darasyt ta koda nes nesigaudau kiek meginu vis meto error'a

o kru daviai nuoroda ten grybas :)

Dekoju is anksto

Redagavo NxS· 2008 Lap. 16 18:11:25

Parašė xripas· 2008 Lap. 16 18:11:51
#4

Ten ne grybas kazkada bandziau ir isejo pasistenk ir iseis ;)

Parašė NxS· 2008 Lap. 16 18:11:24
#5

xripas ten tas kodas net nepanasu i sita
xripas parašė:
Ten ne grybas kazkada bandziau ir isejo pasistenk ir iseis ;)


tenai nepanasu i header.php nes theme.php includinta i header.php

Redagavo NxS· 2008 Lap. 16 18:11:39

Parašė NxS· 2008 Lap. 16 19:11:29
#6

Atnaujinu thema nes ziuriu niekas nebemato

Redagavo NxS· 2008 Lap. 16 19:11:54