Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
StyleSheet Name
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / Torrent Trader / v3 Support

2022-10-04 22:00:20
Hello!!

I try to add the name of the theme in the balloon user mode.


//$stylesheet
$stylesheet = SQL_Query_exec("SELECT name FROM stylesheets WHERE id='$StyleSheet' ORDER BY name") or die(mysqli_error($GLOBALS["DBconnector"]));
$styleSheet = $user["stylesheet"];
$arr_styleSheet = mysqli_fetch_assoc($styleSheet);
$stylesheet_name = $arr_styleSheet["name"];


<div align=center style=font-size:14px;font-family:Papyrus;><b>Thème Utilisez: </b>".$UClass["stylesheet"]."</div>


it just gives me the ID and I want the name  😞
Last edited by spiritblue on 2022-10-04 22:02:12
2022-10-04 22:20:49
Its not catching $StyleSheet variable. Move that variable before the query.

Each line in PHP is parsed with the data collected from position 0 - current line. Which means, ensure your variables are initialized and hold default values or it will never see them at current position.
2022-10-07 22:14:20
BIG THANKS STorrents2020 for your help which is always appreciated! lol

I did some test and I had to submit a sql backup 🤣

Shoutbox:
<?php
require_once("backend/functions.php");
dbconn();
loggedinonly();

//block righ and left column
#$site_config["RIGHTNAV"] = false; //Activate=true OR false

stdhead(T_("SHOUTBOX"));

//Bannir MP / Comment / Download / Upload / Shoutbox with Rebound account
if ($CURUSER["shoutboxbanned"] == "yes" ) {
show_error_msg(T_("ERROR"), "<b><center>".T_("YOU_ARE")." ".T_("SHOUTBOX_BANNED")."</center></b>");
} else {
if ($site_config['SHOUTBOX'] && !($CURUSER['hideshoutbox'] == 'yes')){
require_once("backend/smilies.php");  
require_once("shoutfun_new.php");  

// Birthday by ArcticWolf and UFFEN01
   $today = date("Y-m-d");
   $date = date("m-d");
   $sql = SQL_Query_exec("SELECT id,`username`, `birthday` FROM `users` WHERE `birthday` LIKE '%-$date' ORDER BY `username` ASC");
   begin_frame(T_("BIRTHFAY_BIRTHDAY_OF_THE_DAY"));
   if (mysqli_num_rows($sql) > 0) {
   print "<center><img src='images/birthday/birthday.png' width='500px' height='120px' /><hr class='barre'/></center><center>";
   while($row = mysqli_fetch_assoc($sql))
echo'<font size="2"><a href="account-details.php?id='.$row['id'].'">'.class_user($row['username']).'</a> ('.($today-$row['birthday']).' '.T_("BIRTHFAY_YEARS").') ✴ </font> ';
   echo"</center>";
   }else{
   print("<i>".T_("BIRTHFAY_NO_MEMBER_BIRTHDAY_TODAY")."</i>");
}
end_frame();    
// End Birthday

begin_frame("Shoutbox ".$site_config['SITENAME']." ⚟");
// Online in Offline by spiritblue// style='display:table-cell;overflow:initial;vertical-align:middle;'
   $datetime = get_date_time(gmtime() - 180);//minute
$username = ( $anon == 'yes' || $CURUSER['privacy'] == 'strong' ) ? 'Anonymous' : class_user($CURUSER['username']);
   $query = SQL_Query_exec("SELECT `id`, `class`, `username`, `last_access` FROM `users` WHERE enabled = 'yes' AND status = 'confirmed' AND privacy !='strong' AND UNIX_TIMESTAMP('".get_date_time()."') - UNIX_TIMESTAMP(users.last_access) <= 900");// pour 15 minute


// News Member
if (!$site_config["MEMBERSONLY"] || $CURUSER) {
#begin_block(T_("NEWEST_MEMBERS"));

$expire = 600; // time in seconds
if (($rows = $TTCache->Get("newestmember_block", $expire)) === false) {
$res = SQL_Query_exec("SELECT id, username FROM users WHERE enabled = 'yes' AND status='confirmed' AND privacy != 'strong' ORDER BY id DESC LIMIT 5");
$rows = array();

while ($row = mysqli_fetch_assoc($res))
$rows[] = $row;

$TTCache->Set("newestmember_block", $rows, $expire);
}


if (!$rows) {
echo T_("NOTHING_FOUND");
} else {
echo "<center>La Bienvenue A Tous Nos Nouveaux Membres<hr/></center> ";
echo "<div id='nMember' class='bMenu'><ul>\n";
foreach ($rows as $row) {
echo "<li><a href='account-details.php?id=$row[id]'>" .class_user($row["username"]). "".$country."</a><font color='#fff'>,</font></li>\n";
}
echo "</ul></div>\n";
}

#end_block();
}
//End News User


// For class
#$query = SQL_Query_exec("SELECT `id`,  `class`, `username`, `last_access` FROM `users` WHERE `class` >= 2 AND `enabled` = 'yes' AND `status` = 'confirmed'");

#echo '<center><iframe name="lcd_frame" src="/LCD/lcd.php" width="84%" height="39" style="border: 5px groove Silver;text-align: center; " frameborder="0" marginheight="0" marginwidth="0" scrolling="no" align="center"></iframe></center><br/>';

#echo "<div align='center'><table class='onlinebg' border='0' cellpadding='30' cellspacing='5' align='center'><tr><td id='online' style='display: inline-block;line-height:25px;'>";
   //echo "<center><font color='AliceBlue' size='4'>⇙ Les Membres En Lignes ⇘</font></center><hr/> ";
#while ($row = mysqli_fetch_array($query)){

   #echo "<a href=account-details.php?id=".$row["id"]."'> <img src='images/button_o".($row["last_access"] > $datetime ? "n":"ff")."line.png' border='0' height=15 width=20> <b>".class_user($row["username"])."</b> | ";
#}

#echo "</td></tr></table></center><br/>";
//echo "<br/><br/>";
//End

     function smile() {
 
           print "<div align='center'><table cellpadding='3' cellspacing='3'><tr>";
 
           global $smilies, $count;
           reset($smilies);
 
           while ((list($code, $url) = thisEach($smilies)) && $count<19) {
                     print("\n   <td><a href=\"javascript: SmileIT('".str_replace("'","\'",$code)."')\">
                           <img border=\"0\" src=\"images/smilies/$url\" alt=\"$code\" style='vertical-align: middle;'/></a></td>");
                           
                     $count++;
           }

           // Fleche open
//
           print '<td> <a href="javascript: Pophistory()" data-title="Histoire / Modéré"><img src="images/ajshoutbox/historique.gif" width="28" height="28" border="0" class="form" alt="Histoire / Modéré" align="top" alt="" style="vertical-align: middle;"/></a>  <a href="javascript:show_hide(\'sextra\');" style="vertical-align: middle;" data-title="Plus !?"><img src="./images/ajshoutbox/down.gif" alt="Plus" border="0" style="vertical-align: middle;"/></a></td></tr></table></div>';
     }
 

   function smileextra() {
print("<div class='ttable_head'>");

     global $smilies;
     reset($smilies);

           #getting smilies
           while (list($code, $url) = thisEach($smilies)) {
                   print("\n<a href=\"javascript: SmileIT('".str_replace("'","\'",$code)."')\">
                              <img border=\"0\" src=\"images/smilies/$url\" alt=\"$code\" /></a>");

           #$count++;
           }
print("</div>");
   }

// Nouveau MP
/*
if ($CURUSER) {
   //check for new pm's
   $res = SQL_Query_exec("SELECT COUNT(*) FROM messages WHERE receiver=" . $CURUSER["id"] . " and unread='yes' AND location IN ('in','both')");
   $arr = mysqli_fetch_row($res);
   $unreadmail = $arr[0];
   if ($unreadmail)
   print("<font color='#ff0000' size='5' class='blink'><b><center>Vous Avez </font><a href='mailbox.php?inbox' target='_blank'><font color='LightGreen' size='5'> $unreadmail </font></a><font color='#ff0000' size='5' class='blink'> Nouveau MP </center></b></a><hr/></font>  ");
}
*/

if (!$site_config["MEMBERSONLY"] || $CURUSER) {

// USERS ONLINE
#begin_block(T_("ONLINE_USERS"));
echo "<div class='table_head' align='center' style='psdding: 12px;'>".T_("ONLINE_USERS")."</div>";
$file = "".$site_config["cache_dir"]."/cache_usersonlineblock.txt";
$expire = 1; // time in seconds
if (file_exists($file) &&
   filemtime($file) > (time() - $expire)) {
   $usersonlinerecords = unserialize(file_get_contents($file));
}else{
   //$usersonlinequery = mysql_query("SELECT id, username, class, privacy FROM users WHERE privacy !='strong' AND UNIX_TIMESTAMP('" . get_date_time() . "') - UNIX_TIMESTAMP(users.last_access) < 900") or die(mysql_error());
   $usersonlinequery = SQL_Query_exec("SELECT id, username, class, privacy, country, last_access FROM users WHERE UNIX_TIMESTAMP('" . get_date_time() . "') - UNIX_TIMESTAMP(users.last_access) < 900") or die(mysqli_error($GLOBALS["DBconnector"]));

   while ($usersonlinerecord = mysqli_fetch_array($usersonlinequery) ) {
       $usersonlinerecords[] = $usersonlinerecord;
   }
   $OUTPUT = serialize($usersonlinerecords);
   $fp = fopen($file,"w");
   fputs($fp, $OUTPUT);
   fclose($fp);
} // end else


   // Age
$birthday = date("d.m.Y", strtotime($birthday));
   // End Age

// Depart
if ($usersonlinerecords == ""){
   echo "...Aucun Membre Pour Le Moment !";
}else{
   foreach ($usersonlinerecords as $id=>$row) {    
$UClass=mysqli_fetch_array(SQL_Query_exec("SELECT username, level, avatar, added, uploaded, downloaded, privacy, birthday, clients, title, last_access, stylesheet, donated FROM users JOIN groups ON users.class=groups.group_id WHERE users.id='$row[id]'"));

   // Avatar
       $donor = $UClass["donated"] > 0 ? "<img src=".$site_config['SITEURL']."/images/star.png height=35 width=25 title='Donateur ! ♥' alt='Donateur'>" : "";
       $avatar2 = htmlspecialchars($UClass["avatar"]);
   if (!$avatar2) {
   $avatar2 = "".$site_config["SITEURL"]."/images/default_avatar.png";
   // End Avatar

   // Country @SPIRITBLUE v3.1
       $tara = htmlspecialchars($row["country"]);
       $res2 = SQL_Query_exec("SELECT name, flagpic FROM countries WHERE id='$tara' LIMIT 1") or die(mysqli_error($GLOBALS["DBconnector"]));

           if (mysqli_num_rows($res2) == 1) {
               $arr2 = mysqli_fetch_assoc($res2);
               #$country = "<b>" . $arr2['name'] . "</b>";
$country = '<img src='.$site_config["SITEURL"]."/images/countries/".$arr2["flagpic"].' height=20 width=20 border=0 />';
               } else {
$country = "<img src=$site_config[SITEURL]/images/countries/unknown.gif height=18 width=24 border=0 title=" . htmlspecialchars($arr2['name']) . " alt=" . htmlspecialchars($arr2['name']) . " />";

   }// End Country

#$title = strip_tags($_POST["title"]);
#$updateset[] = "title = ".sqlesc($title);


//$stylesheet
$stylesheet = SQL_Query_exec("SELECT name FROM stylesheets WHERE id='$stylesheet' ORDER BY name") or die(mysqli_error($GLOBALS["DBconnector"]));
$arr_stylesheet = mysqli_fetch_assoc($stylesheet);
#$stylesheet = $arr_stylesheet["name"];
$stylesheet = $user["stylesheet"];
#if (is_valid_id($stylesheet))
#$stylesheet = $_POST["stylesheet"];

}//Acces membre [MEMBERSONLY]


   if ($UClass["privacy"] != "strong") {
echo "<a href='account-details.php?id=$row[id]'><font color=\"$UClass[Color]\" onMouseover=\"return overlib('<table height=100 width=450 class=BG id=TBGM cellspacing=0 cellpadding=5 align=center><tr><td class=ttable_head colspan=2 align=center style=line-height:100%;padding-top:10px;>" .($arr['warned'] == "yes" ? " <img src=" .$site_config["SITEURL"]. "/images/warn.png border=0 alt=Avertissement>" : "")." " .($arr['enabled'] == "no" ? " <img src=/images/disabled.png border=0 alt=Compte Désactivé!>" : "")." " .($arr['donated'] == "yes" ? "<img src=" .$site_config["SITEURL"]. "/images/star.png height=35 width=25 border=0 alt='Soutien Le CrazySpirits'>" : "") . " " .$country. " " .$row["username"]. "  <hr /></td></tr><tr valign=top><td><center><img class=avatar src=$avatar2><hr /></center><blockcode><div align=center style=font-size:14px;font-family:Papyrus;><b>Mon Titre: </b>".format_comment($UClass["title"])."</div><div align=center style=font-size:14px;font-family:Papyrus;><b>Grade: </b>" .$UClass["level"]."</div><div align=center style=font-size:14px;font-family:Papyrus;><b>Inscrit Le: </b>" .htmlspecialchars(utc_to_tz($UClass["added"])). "</div><div align=center style=font-size:14px;font-family:Papyrus;><b>Partager: </b>" .mksize($UClass["uploaded"]). "</div><div align=center style=font-size:14px;font-family:Papyrus;><b>Télécharger: </b>" .mksize($UClass["downloaded"]). "</div><div align=center style=font-size:14px;font-family:Papyrus;><b>Contribution: </b>" .$UClass["donated"]. " $</div><div align=center style=font-size:14px;font-family:Papyrus;><b>Anniversaire: </b>" .format_comment($UClass["birthday"]). "</div><div align=center style=font-size:14px;font-family:Papyrus;><b>Client: </b>" .$UClass["clients"]. " </div><div align=center style=font-size:14px;font-family:Papyrus;><b>Thème Utilisez: </b>".$UClass["stylesheet"]."</div></blockcode></td></tr></table>')\"; onMouseout=\"return nd()\"><a href=account-details.php?id=".$row["id"]."'> <img src='images/button_o".($row["last_access"] > $datetime ? "n":"ff")."line.png' border='0' height=15 width=20> <b>".class_user($row["username"])."</b></font></a>,\n";
   } else{
       echo "<a href='account-details.php?id=$row[id]'><font color=\"$UClass[Color]\" onMouseover=\"return overlib('<table class=BG id=TBGM width=242 cellspacing=0 cellpadding=5 align=center><tr><td class=ttable_head colspan=2 align=center>" .($arr['warned'] == "yes" ? " <img src=" .$site_config["SITEURL"]. "/images/warn.png border=0 alt=Avertissement>" : "")." " .($arr['enabled'] == "no" ? " <img src=/images/disabled.png border=0 alt=Compte Désactivé!>" : "")." " .($arr['donated'] == "yes" ? "<img src=" . $site_config["SITEURL"] . "/images/star.png height=35 width=25 border=0 alt='Donateur'>" : "")." $online ".$row["username"]."</td></tr><tr valign=top><td><center><img class=avatar src=$avatar2><hr /></center><div align=center><font color=Crimson size=5 title=Champs Obligatoires !>⚠</font> <font size=2><b>Ce membre a choisi<br> de garder ses informations privées.</b></font><hr /></td></tr></table>')\"; onMouseout=\"return nd()\"><a href=account-details.php?id=".$row["id"]."'> <img src='images/button_o".($row["last_access"] > $datetime ? "n":"ff")."line.png' border='0' height=15 width=20> <b>".class_user($row["username"])."</b></font></a>,\n";                                                  
   }
   }
}
#end_block();
}

?>
<!--Visite sur le site
<table width="50%" align="center"><tr><td class="ttable_head" colspan="2" align="center" style="line-height:100%;padding-top:14px;vertical-align:middle;">Le CrazySpirits a été visité..
<?php
/************************************************************************/
/* HITS COUNTER                                                    */
/* ===========================                                          */
/*                                                                      */
/*   CODED BY FOZ FOR TORRENT-TRADER - http://www.basslinebeats.co.uk               */
/*                                                                      */
/************************************************************************/
## --  START OF CONFIG SECTION  --  ##

$counterstyle = "images";   # Enter images or text
$imagetype = "5";           # 1 to 10 = The type of image to display (SEE README FILE)
$imagefolder = "images/digits";    # The full path to the images directory.
## --  END OF CONFIG SECTION  --  ##

$hitslog = "cache/cache_hits.txt";      # Path to the hits file, leave alone if in the same directory
## Get the hitslog file ready
$hits = file($hitslog);
$hits = $hits[0] + 1;

## Opening the hits file and write the number of hits:
$fp = fopen($hitslog, "w");
fwrite($fp, $hits);

## Text counter, print the number of hits
if ($counterstyle == "text") { print $hits; }

## If Image Counter, get the required type and print them out.
if ($counterstyle == "images") {
$digit = strval($hits);
for ($i = 0; $i < strlen($hits); $i++) {
print "<img src=\"$imagefolder/$imagetype/$digit[$i].GIF\">";
               }
       }

?>
<br/><br/></td></tr></table>
-->

<hr class="barre"><center>⚒ Couleurs et Grades ⚒</center><hr/>
   <script src="js/ajshoutbox.js" language="Javascript" type="text/javascript"></script>
   <table align="center" class="ajshoutboxbackground" width="98%"><tr>
   <td align="center">
    <div align="center"><b><font color="SandyBrown">Membre</font> ∫ <font color="#cd5df3">Super Membre</font> ∫ <font color="Gold">V.I.P</font> ∫ <font color="MediumSeaGreen">Partageur</font> ∫ <font color="Aqua">Modérateur</font> ∫ <font color="GreenYellow">Pro Modérateur</font> ∫ <font color="Crimson">Administrateur</font> ∫ <font color="SteelBlue">Fondateur</font></b></br>
<hr class="barre"/>
<!--<p class="microsoft marquee"><span><?php echo "".T_("SHOUTINFO").""; ?></span></p>--></div></div>
           <div id="shoutheader">
           <form id="chatForm" name="chatForm" onsubmit="return false;" action="">        
               <input type="hidden" name="name" id="name" value="<?php echo $CURUSER["username"] ?>" />
               <input type="hidden" name="uid" id="uid" value="<?php echo $CURUSER["id"] ?>" />

<?php
//Fin

// Jour-mois-annee-heure By SPIRITBLUE
function datefr($arg){
date_default_timezone_set('America/Montreal'); //us et Canada presentment // date et heure en europe changer pour Europe/Paris
$script_tz = date_default_timezone_get(); // fuseau par defaut
$NomDuJour = array ("Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi");
$NomDuMois = array ("janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre");
$lejour = date("d",$arg);
$lemois = date("m",$arg);
$ladatefr=$NomDuJour[ date('w',$arg) ]." ";
if($lejour==01){$ladatefr.=" 1er "; }
else if($lejour<10){$ladatefr.=" $lejour[1] "; }
else { $ladatefr.=date (" d ",$arg); }
$ladatefr.=$NomDuMois[ date($lemois - 1) ]." ".date('Y | H:i');
return $ladatefr;

}
//-exemple :
echo "<center><div><i>Nous sommes ". datefr(mktime())."</i></div></font></center><br />";
//$hier=()-3600*24;
// End


?>
       <table align="center" width="98%"><tr>
           <td align="center">

<script language="javascript">
       <!--
       function popupcentree(page,largeur,hauteur,options)
       {
       var top=(screen.height-hauteur)/2;
       var left=(screen.width-largeur)/2;
       window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
       }
       //-->
</script>
<!--popup gif <a href='javascript:popupcentree("gif.php",890,790,"menubar=no,scrollbars=yes,statusbar=no")'><input type="button" value="<?php echo T_("GIF"); ?>" /></a> -->
<!--- End JS --->

           <div class="block_smilles ttable_head"><?php echo smile();?></div>
           <span style="display: none;" id="sextra"><?php echo shoutfun('chatForm','chatbarText');?></span>
<span style="display: none;" id="sextra1"><br/><?php echo smileextra();?></span>
<br/>
           <input type="text" size="105" maxlength="500" placeholder="✍ Ajouter votre texte ici stp !" name="chatbarText" id="chatbarText" onblur="checkStatus('');" onfocus="checkStatus('active');" />
           <input onclick="sendComment();" type="submit" id="submit" name="submit" value="Go Envoyer !"/><br/><br/>
       </td>
       </tr>
   </table>
   </form>
   </div>

    <div id="chat">
     <div id="chatoutput">
           <ul id="outputList">
               <center>
               <span class="name" style="font-size:27px;font-family: Papyrus;color:#FFF;"><b>Le <?php echo $site_config["SITENAME"];?>Je Vous Souhaite La Bienvenue !✌</b> <br/><hr class="barre"/></span>
               <center><div class="loader"></div></center>
               </center>
           </ul>
     </div>
       
   </div>
   </td>
       </tr>

   </table><br/>
   <?php
// Fin De Frame Connexion

?>
   <!--<script language="Javascript">
   $(".toggle").on("click", function () {
       $(".marquee").toggleClass("microsoft");
   })
   </script>-->
   <script language="Javascript">
   function show_hide(sextra)
   {
     if(document.getElementById(sextra))
     {
           if(document.getElementById(sextra).style.display == 'none')
           {
             document.getElementById(sextra).style.display = 'inline';
           }
           else
           {
             document.getElementById(sextra).style.display = 'none';
           }
     }
   }
   function show_hide(sextra1)
   {
     if(document.getElementById(sextra1))
     {
           if(document.getElementById(sextra1).style.display == 'none')
           {
             document.getElementById(sextra1).style.display = 'inline';
           }
           else
           {
             document.getElementById(sextra1).style.display = 'none';
           }
     }
   }
   </script>
   </center>
   <?php
}


//Today's Birthdays
$today = date("Y-m-d");
$date = date("m-d");
$res = SQL_Query_exec("SELECT username, dob FROM `users` WHERE dob LIKE '%-$date' ORDER BY username ASC");
if (mysqli_num_rows($res) > 0) {
print("<div class='ttable_head' width='100%' align='center'>".T_("BIRTHDAY")."</div>");
print "<i><b>Le membre(s) suivant fêtent leur anniversaire aujourd'hui:</b></i><br /><br />";
while($row = mysqli_fetch_array($res)) echo "? ".class_user($CURUSER["username"])." {".($today-$row['dob'])."}  ";
}
// End Users birthday
print("<br /><br />");
//===| End Users Online |===//



end_frame();
}


// Last forum post on index
begin_frame("Message Récent Du Forum");
print("<i><b>  Derniers articles sur le forum...</b></i><br/>");
print("<table class='table_table' align='center' width=97%' cellpadding='1' cellspacing='0' border='0'><tr>".
"<td class='ttable_head' align='left' width='95%'> <b>Titre</b> </td>".
"<td class='ttable_head' align='center' width='52'> <b> Répondu </b> </td>".
"<td class='ttable_head' align='center' width='54'> <b> Des Vues </b> </td>".
"<td class='ttable_head' align='center' width='95'> <b>  Auteur(e)  </b> </td>".
"<td class='ttable_head' align='right' width='95'> <b> Dernier Commentaire </b></td>".
"</tr>");

/// HERE GOES THE QUERY TO RETRIEVE DATA FROM THE DATABASE AND WE START LOOPING ///
$for = SQL_Query_exec("SELECT * FROM forum_topics ORDER BY lastpost DESC LIMIT 10");

while ($topicarr = mysqli_fetch_assoc($for)) {
// Set minclass
$res = SQL_Query_exec("SELECT name,minclassread,guest_read FROM forum_forums WHERE id=$topicarr[forumid]") or sqlerr();
$forum = mysqli_fetch_assoc($res);

if (get_user_class() >= $forum["minclassread"] || $forum["guest_read"] == "yes") {
$forumname = "<a href=?action=viewforum&forumid=$topicarr[forumid]><b>" . htmlspecialchars($forum["name"]) . "</b></a>";

$topicid = $topicarr["id"];
$topic_title = stripslashes($topicarr["subject"]);
$topic_userid = $topicarr["userid"];
// Topic Views
$views = $topicarr["views"];
// End

/// GETTING TOTAL NUMBER OF POSTS ///
$res = SQL_Query_exec("SELECT COUNT(*) FROM forum_posts WHERE topicid=$topicid") or sqlerr(__FILE__, __LINE__);
$arr = mysqli_fetch_row($res);
$posts = $arr[0];
$replies = max(0, $posts - 1);

/// GETTING USERID AND DATE OF LAST POST ///
$res = SQL_Query_exec("SELECT * FROM forum_posts WHERE topicid=$topicid ORDER BY id DESC LIMIT 1") or sqlerr(__FILE__, __LINE__);
$arr = mysqli_fetch_assoc($res);
$postid = 0 + $arr["id"];
$userid = 0 + $arr["userid"];
$added = "<nobr>" . $arr["added"] . "</nobr>";

/// GET NAME OF LAST POSTER ///
$res = SQL_Query_exec("SELECT id, username FROM users WHERE id=$userid") or sqlerr(__FILE__, __LINE__);
if (mysqli_num_rows($res) == 1) {
$arr = mysqli_fetch_assoc($res);
$username = "<a href=account-details.php?id=$userid>".class_user($arr['username'])."</a>";
}
else
$username = "Inconnu[$topic_userid]";

/// GET NAME OF THE AUTHOR ///
$res = SQL_Query_exec("SELECT username FROM users WHERE id=$topic_userid") or sqlerr(__FILE__, __LINE__);
if (mysqli_num_rows($res) == 1) {
$arr = mysqli_fetch_assoc($res);
$author = "<a href=account-details.php?id=$topic_userid>".class_user($arr['username'])."</a>";
}
else
$author = "Inconnu[$topic_userid]";

/// GETTING THE LAST INFO AND MAKE THE TABLE ROWS ///
$r = SQL_Query_exec("SELECT lastpostread FROM forum_readposts WHERE userid=$userid AND topicid=$topicid") or sqlerr(__FILE__, __LINE__);
$a = mysqli_fetch_row($r);
$new = !$a || $postid > $a[0];
$subject = "<a href=forums.php?action=viewtopic&topicid=$topicid><b>" . stripslashes(encodehtml($topicarr["subject"])) . "</b></a>";

print("<tr class='table_col2'>
<td style='padding-right: 25px;'>  $subject</td>".
"<td class='table_col2' align='center'>$replies</td>" .
"<td class='table_col2' align='center'>$views</td>" .
"<td class='table_col2' align='center'>$author</td>" .
"<td class='table_col2' align='right'><nobr><small>Par $username<br>$added</small></nobr></td>");

print("</tr>");
} // while
}

print("</table><br>");
end_frame();
// End forum


stdfoot();

Last edited by spiritblue on 2022-10-09 14:42:42
2022-10-09 14:39:09
update

$style = SQL_Query_exec("SELECT * from stylesheets ORDER BY id DESC");
$style_sa = array();

while ($style_a = mysqli_fetch_assoc($style)){
$style_id = $style_a["id"];
$style_name = $style_a["name"];
$style_sa[$style_name] = $style_id;
}


he just sees the same theme name for all 😕


...thanks in advance for your help !
Last edited by spiritblue on 2022-10-09 14:42:01
2022-10-16 18:10:25
RÉSOLU!! 😉
2022-10-16 22:00:24
Glad it is working! Cheers  😎
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 2
  • Members: 0
  • Guests online: 2
  • Comments: 3
  • Messages: 1,728