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
User Posts

Go to Profile

bookmarks — 2021-11-24 21:56:15 in v3 Support
Hello

i have sql error with bookmarks.php file for line # 21
SQL error:
 Database Error in bookmarks.php on line 21: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY torrents.id DESC LIMIT 0,25' at line 1. Query was: SELECT bookmarks.id as bookmarkid, users.username, users.id as owner, torrents.id, torrents.name, torrents.type, torrents.comments, torrents.leechers, torrents.seeders, ROUND (torrents.ratingsum / torrents.numratings) AS rating, categories.name AS cat_name, categories.image AS cat_pic, torrents.save_as, torrents.numfiles, torrents.added, torrents.filename, torrents.size, torrents.views, torrents.visible, torrents.hits, torrents.times_completed, torrents.category FROMmarks LEFT JOIN torrents ON bookmarks.torrents = torrents.id LEFT JOIN users on torrents.owner = users.id LEFT JOIN categories ON torrents.category = categories.id WHERE bookmarks.userid = ORDER BY torrents.id DESC LIMIT 0.25. 


Original ligne:
 list ($ pagertop, $ pagerbottom, $ limit) = pager (25, $ count, "bookmarks.php?");
$ res = SQL_Query_exec ("SELECT bookmarks.id as bookmarkid, users.username, users.id as owner, torrents.id, torrents.name, torrents.type, torrents.comments, torrents.leechers, torrents.seeders, ROUND (torrents .ratingsum / torrents.numratings) AS rating, categories.name AS cat_name, categories.image AS cat_pic, torrents.save_as, torrents.numfiles, torrents.added, torrents.filename, torrents.size, torrents.views, torrents.visible, torrents.hits, torrents.times_completed, torrents.category FROM bookmarks LEFT JOIN torrents ON bookmarks.torrentid = torrents.id LEFT JOIN users on torrents.owner = users.id LEFT JOIN categories ON torrents.category = categories.id WHERE bookmarks.userid = $ user ORDER BY torrents.id DESC $ limit ") or die (mysqli_error ($ GLOBALS [" DBconnector "]));


Thank you for your help  :smile
Autoplay video — 2021-11-20 14:03:09 in v3 Support
hi djlive

at the end of the line of your <embed, <iframe <param tag you will add flashVars=“playerVars=autoPlay=yes”

Example fonctions.php:
    // [video]YouTube Vids url[/video]
      $s = preg_replace("/\[video\][^\s'\"<>]*youtube.com.*v=([^\s'\"<>]+)\[\/video\]/ims", "<paramb style=\"width:680px; height:440px;\" name=\"movie\" value=\"https://www.youtube.com/v/&autoplay=1\\1\" flashVars=“playerVars=autoPlay=yes” allowFullScreen=\"true\"></param><embed class=\"youtube\" src=\"https://www.youtube.com/v/&autoplay=1\\1\" flashVars=“playerVars=autoPlay=yes” type=\"application/x-shockwave-flash\" width=\"700\" height=\"380\"></embed>", $s);


it works for me it should be the same for you , does the same on functions file, bbcode if needed or other  :smile
Résolu !  :bomb
<?php
require_once("backend/functions.php");
dbconn(true);

?>
<link rel="stylesheet" type="text/css" href="<?php echo $site_config["SITEURL"]; ?>/themes/SB_SHERIF/carroussel/carroussel.css?v=1" media="all" charset="utf-8"/>
<script src="<?php echo $site_config["SITEURL"]; ?>/js/jquery.min.js"></script>
<script type="text/javascript">
(function () {
   $.fn.infiniteCarousel = function () {
       function repeat(str, n) {
           return new Array( n + 1 ).join(str);
       }
       
       return this.each(function () {
           // magic!
           var $wrapper = $('> div', this).css('overflow', 'hidden'),
               $slider = $wrapper.find('> ul').width(9999),
               $items = $slider.find('> li'),
               $single = $items.filter(':first')
               
               singleWidth = $single.outerWidth(),
               visible = Math.ceil($wrapper.innerWidth() / singleWidth),
               currentPage = 1,
               pages = Math.ceil($items.length / visible);
               
           /* TASKS */
           
           // 1. pad the pages with empty element if required
           if ($items.length % visible != 0) {
               // pad
               $slider.append(repeat('<li class="empty" />', visible - ($items.length % visible)));
               $items = $slider.find('> li');
           }
           
           // 2. create the carousel padding on left and right (cloned)
           $items.filter(':first').before($items.slice(-visible).clone().addClass('cloned'));
           $items.filter(':last').after($items.slice(0, visible).clone().addClass('cloned'));
           $items = $slider.find('> li');
           
           // 3. reset scroll
           $wrapper.scrollLeft(singleWidth * visible);
           
           // 4. paging function
           function gotoPage(page) {
               var dir = page < currentPage ? -1 : 1,
                   n = Math.abs(currentPage - page),
                   left = singleWidth * dir * visible * n;
               
               $wrapper.filter(':not(:animated)').animate({
                   scrollLeft : '+=' + left
               }, 500, function () {
                   // if page == last page - then reset position
                   if (page > pages) {
                       $wrapper.scrollLeft(singleWidth * visible);
                       page = 1;
                   } else if (page == 0) {
                       page = pages;
                       $wrapper.scrollLeft(singleWidth * visible * pages);
                   }
                   
                   currentPage = page;
               });
           }
           
           // 5. insert the back and forward link
           $wrapper.after('<a href="#" class="arrow back" border=0><</a><a href="#" class="arrow forward" border=0>></a> ');
           
           // 6. bind the back and forward links
           $('a.back', this).click(function () {
               gotoPage(currentPage - 1);
               return false;
           });
           
           $('a.forward', this).click(function () {
               gotoPage(currentPage + 1);
               return false;
           });
           
           $(this).bind('goto', function (event, page) {
               gotoPage(page);
           });
           
           // THIS IS NEW CODE FOR THE AUTOMATIC INFINITE CAROUSEL
           $(this).bind('next', function () {
               gotoPage(currentPage + 1);
           });
       });
   };
})(jQuery);

$(document).ready(function () {
   // THIS IS NEW CODE FOR THE AUTOMATIC INFINITE CAROUSEL
   var autoscrolling = true;
   
   $('.infiniteCarousel').infiniteCarousel().mouseover(function () {
       autoscrolling = false;
   }).mouseout(function () {
       autoscrolling = true;
   });
   
   setInterval(function () {
       if (autoscrolling) {
           $('.infiniteCarousel').trigger('next');
       }
   }, 10000);
});

</script>

<?php
// TORRENT XXX MONTRER-CACHER BY GOLLUM
if( $CURUSER['xxx_filter'] == 'yes'){
$ressa = SQL_Query_exec("SELECT * FROM xxx_filter");
while($datas =  mysqli_fetch_array($ressa)){
$wherex .= "AND categories.id != '".$datas["cat"]."' ";
}
}
// END TORRENT XXX MONTRER-CACHER
if ($CURUSER["class"] >= "0") {
{
$query = "SELECT torrents.id, torrents.anon, torrents.recommended, torrents.exclusif, torrents.announce, torrents.category, torrents.leechers, torrents.nfo, torrents.seeders, torrents.name, torrents.times_completed, torrents.image1, torrents.size, torrents.added, torrents.comments, torrents.numfiles, torrents.filename, torrents.owner, torrents.external, torrents.freeleech, categories.name AS cat_name, categories.image AS cat_pic, categories.parent_cat AS cat_parent, users.username, users.privacy, IF(torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id WHERE image1 <> '' AND visible = 'yes'  AND banned = 'no' $wherex ORDER BY sticky ASC, id DESC LIMIT 40";
   #$query="SELECT id, name, image1, seeders, leechers, category, size FROM torrents WHERE image1 <> '$wherex' ORDER BY added DESC limit 40";
   $result=SQL_Query_exec($query);
   $num = mysqli_num_rows($result);
   {
  ?>
   <div class="infiniteCarousel">
     <div class="wrapper">
       <ul>

       <?php
           while($row = mysqli_fetch_assoc($result))
   {    
   $t_name = substr(htmlspecialchars($row['name']), 0, 17)."...";
   $res = SQL_Query_exec("SELECT name FROM categories WHERE id=$row[category]");
   $arr = mysqli_fetch_assoc($res);
   $cat = $arr["name"];
   $name=$row["name"];
$images=$row["image1"];
$seed=$row["seeders"];
$leech=$row["leechers"];
 ?>
       <li>
<a href="torrents-details.php?id=<?php echo $row["id"]; ?>" target="_top" title="<?=$name?> | <?=$cat?>" onmouseover=" onmouseout="return nd();"><img src="uploads/images/<?=$row["image1"] ?>" height="150" width="110" class="cover_img"></a>
<br/>
<img src='images/arrow_up.png' height='12' title='Seeders' border='0'/><span style='color:#80FF00;'><?=$seed?></span>
<span class="colortexte"> | </span>
<img src='images/arrow_down.png' height='12' title='Leechers' border='0'/><span style='color:#FF0000;'><?=$leech?></span>
       <br/>
   <br/><span style="color:#F0F8FF;font-size:10pt;border:1px solid #D3D8D8;padding:3px;"><?=$cat?></span>
<br/>
<br/>
   </li>
   <?php
   }
 ?>
       </ul>        
     </div>
   </div>
<?php
   }
}
}
?>


UPDATE 20 / 11 / 2021
small error — 2021-11-17 22:20:18 in v3 Support
indeed it gives me lanteur to replicate, ok, I withdraw ... thank you! MicroMonkey  :thumb
small error — 2021-11-16 22:08:56 in v3 Support
gang, I just see that it will be to do the same for VIP, anon, visible for the addition of "intval"?  :unsure

$updateset[] = "vip = '" . intval($_POST["vip"] ? "yes" : "no") . "'";
$updateset[] = "anon = '" . intval($_POST["anon"] ? "yes" : "no") . "'";
$updateset[] = "visible = '" . intval($_POST["visible"] ? "yes" : "no") . "'";


..thank you for confirming the validation of my change  :giggle
small error — 2021-11-16 00:13:39 in v3 Support
Update in torrents-edit.php by dj live (Thanks) :thumb
Replace for:  
    // FreeLeech
   if ($CURUSER["edit_torrents"] == "yes")
$updateset[] = "freeleech = '".intval($_POST["freeleech"])."'"; // UPDATE TTV3 BY MicroMonkey  
       #$updateset[] = "freeleech = '".$_POST["freeleech"]."'";
need a thumbs up to not see the 3x images on the carousel, thanks

<?php
require_once("backend/functions.php");
dbconn(true);

?>
<link rel="stylesheet" type="text/css" href="<?php echo $site_config["SITEURL"]; ?>/themes/SB_SHERIF/carroussel/carroussel.css?v=1" media="all" charset="utf-8"/>
<script src="<?php echo $site_config["SITEURL"]; ?>/js/jquery.min.js"></script>
<script type="text/javascript">
(function () {
   $.fn.infiniteCarousel = function () {
       function repeat(str, n) {
           return new Array( n + 1 ).join(str);
       }
       
       return this.each(function () {
           // magic!
           var $wrapper = $('> div', this).css('overflow', 'hidden'),
               $slider = $wrapper.find('> ul').width(9999),
               $items = $slider.find('> li'),
               $single = $items.filter(':first')
               
               singleWidth = $single.outerWidth(),
               visible = Math.ceil($wrapper.innerWidth() / singleWidth),
               currentPage = 1,
               pages = Math.ceil($items.length / visible);
               
           /* TASKS */
           
           // 1. pad the pages with empty element if required
           if ($items.length % visible != 0) {
               // pad
               $slider.append(repeat('<li class="empty" />', visible - ($items.length % visible)));
               $items = $slider.find('> li');
           }
           
           // 2. create the carousel padding on left and right (cloned)
           $items.filter(':first').before($items.slice(-visible).clone().addClass('cloned'));
           $items.filter(':last').after($items.slice(0, visible).clone().addClass('cloned'));
           $items = $slider.find('> li');
           
           // 3. reset scroll
           $wrapper.scrollLeft(singleWidth * visible);
           
           // 4. paging function
           function gotoPage(page) {
               var dir = page < currentPage ? -1 : 1,
                   n = Math.abs(currentPage - page),
                   left = singleWidth * dir * visible * n;
               
               $wrapper.filter(':not(:animated)').animate({
                   scrollLeft : '+=' + left
               }, 500, function () {
                   // if page == last page - then reset position
                   if (page > pages) {
                       $wrapper.scrollLeft(singleWidth * visible);
                       page = 1;
                   } else if (page == 0) {
                       page = pages;
                       $wrapper.scrollLeft(singleWidth * visible * pages);
                   }
                   
                   currentPage = page;
               });
           }
           
           // 5. insert the back and forward link
           $wrapper.after('<a href="#" class="arrow back" border=0><</a><a href="#" class="arrow forward" border=0>></a> ');
           
           // 6. bind the back and forward links
           $('a.back', this).click(function () {
               gotoPage(currentPage - 1);
               return false;
           });
           
           $('a.forward', this).click(function () {
               gotoPage(currentPage + 1);
               return false;
           });
           
           $(this).bind('goto', function (event, page) {
               gotoPage(page);
           });
           
           // THIS IS NEW CODE FOR THE AUTOMATIC INFINITE CAROUSEL
           $(this).bind('next', function () {
               gotoPage(currentPage + 1);
           });
       });
   };
})(jQuery);

$(document).ready(function () {
   // THIS IS NEW CODE FOR THE AUTOMATIC INFINITE CAROUSEL
   var autoscrolling = true;
   
   $('.infiniteCarousel').infiniteCarousel().mouseover(function () {
       autoscrolling = false;
   }).mouseout(function () {
       autoscrolling = true;
   });
   
   setInterval(function () {
       if (autoscrolling) {
           $('.infiniteCarousel').trigger('next');
       }
   }, 10000);
});

</script>

<?php

if ($CURUSER["class"] >= "0") {
{
   $query="SELECT id, name, image1 , seeders,leechers, category, size FROM torrents WHERE image1 <> '' ORDER BY added DESC limit 40";
   $result=SQL_Query_exec($query);
   $num = mysqli_num_rows($result);
   {
  ?>
   <div class="infiniteCarousel">
     <div class="wrapper">
       <ul>

       <?php
           while($row = mysqli_fetch_assoc($result))
     {
// TORRENT XXX MONTRER-CACHER BY GOLLUM
if( $CURUSER['xxx_filter'] == 'yes'){
$ressa = SQL_Query_exec("SELECT * FROM xxx_filter");
while($datas =  mysqli_fetch_array($ressa)){
$wherex .= "AND categories.id != '".$datas["cat"]."' ";
}
}
// END TORRENT XXX MONTRER-CACHER    
      $t_name = substr(htmlspecialchars($row['name']), 0, 17)."...";
      $res = SQL_Query_exec("SELECT name FROM categories WHERE id=$row[category] $wherex");
      $arr = mysqli_fetch_assoc($res);
      $cat = $arr["name"];
      $name=$row["name"];
  $images=$row["image1"];
  $seed=$row["seeders"];
  $leech=$row["leechers"];
 ?>
       <li>
<a href="torrents-details.php?id=<?php echo $row["id"]; ?>" target="_top" title="<?=$name?> | <?=$cat?>" onmouseover=" onmouseout="return nd();"><img src="uploads/images/<?=$row["image1"] ?>" height="150" width="110" class="cover_img"></a>
<br/>
<img src='images/arrow_up.png' height='12' title='Seeders' border='0'/><span style='color:#80FF00;'><?=$seed?></span>
<span class="colortexte"> | </span>
<img src='images/arrow_down.png' height='12' title='Leechers' border='0'/><span style='color:#FF0000;'><?=$leech?></span>
       <br/>
   <br/><span style="color:#F0F8FF;font-size:10pt;border:1px solid #D3D8D8;padding:3px;"><?=$cat?></span>
<br/>
<br/>
   </li>
      <?php
    }
 ?>
       </ul>        
     </div>
   </div>
<?php
    }
   }
 }

?>
invite — 2021-11-10 22:05:51 in v3 Support
Thank you all, appreciated!   :thumb
Error come — 2021-11-09 22:50:04 in v3 Support
M8 M-Jay  :bomb  thank you all is well now.

Merci beaucoup !  :thumb

(ps: je vous oublie pas pour vous ajouter des themes pour tt)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(ps: I will not forget you to add you themes for tt)
Error come — 2021-11-08 22:57:21 in v3 Support
:thumb m8

for The news: I corrected for the id in tid but the edition of news returns me on detail of torretn ?, it does not hold tale of the deletion of message of the news


// Delete
if ($delete=='1'){
if ($CURUSER["delete_news"] == "no" && $type == "news" || $CURUSER["delete_torrents"] == "no" && $type == "torrent")  
show_error_msg(T_("ERROR"),T_("ERR_YOU_CANT_DO_THIS"),1);

$res = SQL_Query_exec("SELECT torrent, news FROM comments WHERE id=$id");
$row = mysqli_fetch_assoc($res);
if ($type == "torrent") {
if ($row["torrent"] > 0) {
SQL_Query_exec("UPDATE torrents SET comments = comments - 1 WHERE id = $row[torrent]");
$tid = $row['torrent'];
SQL_Query_exec("DELETE FROM comments WHERE id = $id");
      write_log($CURUSER['username']." a supprimer le ID: $id du commentaire.");
      autolink("torrents-details.php?id=$tid", 'Commentaire a été supprimé avec succès.');
      die();
}
   } else {
   $tid = $row['news'];
   SQL_Query_exec("DELETE FROM comments WHERE id = $id");
   write_log($CURUSER['username']." a supprimer le ID: $id du commentaire.");
   autolink("comments.php?type=news&id=$tid", 'commentaire supprimé avec succès.');
   die();
   }

}
// End Delete
Error come — 2021-11-07 21:26:57 in v3 Support
thank you M-jay the edition to work but I even have problem with the deletion

if ($delete=='1'){
if ($CURUSER["delete_news"] == "no" && $type == "news" || $CURUSER["delete_torrents"] == "no" && $type == "torrent")  
show_error_msg(T_("ERROR"),T_("ERR_YOU_CANT_DO_THIS"),1);

if ($type == "torrent") {
$res = SQL_Query_exec("SELECT torrent FROM comments WHERE id=$id");
$row = mysqli_fetch_assoc($res);
if ($row["torrent"] > 0) {
SQL_Query_exec("UPDATE torrents SET comments = comments - 1 WHERE id = $row[torrent]");
}
}

SQL_Query_exec("DELETE FROM comments WHERE id = $id");
write_log("<a href=account-details.php?id=".$CURUSER['id']."><b>".$CURUSER['username']."</a></b> a supprimé le ID du commentaires: <b>$id</b> Nouvelles du ID: [<a href=comments.php?type=news&id=$idback><b>$idback</b></a>]");
   autolink("comments.php?type=news&id=$id", "Commentaire a été supprimé avec succès.");
   #autolink("comments.php?type=news&id=$idback", "Commentaire a été supprimé avec succès.");
#write_log($CURUSER['username']." has deleted comment: ID: $id");
#show_error_msg(T_("COMPLETE"), "Comment deleted OK", 1);
}
Error come — 2021-11-07 20:10:53 in v3 Support
a big thank you.

Adding a comment and redirecting it after confirmation works fine, only the edition which loses my torrent ID and its comment which does not take and the change still works at the edition but does not redirect me as you can see it. preocedure from the first frame to the last frame.







Error come — 2021-11-07 16:09:48 in v3 Support
thanks  :thumb , but my id changes and returns me to invalid id error

Thank you for your help

comments.php:
<?php
require_once("backend/functions.php");
require_once("backend/bbcode.php");
dbconn();

if ($site_config["MEMBERSONLY"]) {
   loggedinonly();
}


$id = (int)$_GET["id"];
$type = $_GET["type"];
$edit = (int)$_GET["edit"];
$delete = (int)$_GET["delete"];
$dossier = $CURUSER['bbcode'];

if ($edit == 1 || $delete == 1 || $_GET["takecomment"] == 'yes') loggedinonly();

if (!isset($id) || !$id || ($type != "torrent" && $type != "news"))
show_error_msg(T_("ERROR"), T_("ERROR"), 1);

if ($edit=='1'){
$row = mysqli_fetch_assoc(SQL_Query_exec("SELECT user FROM comments WHERE id=$id"));

   if (($type == "torrent" && $CURUSER["edit_torrents"] == "no" || $type == "news" && $CURUSER["edit_news"] == "no") && $CURUSER['id'] != $row['user'])  
show_error_msg(T_("ERROR"),T_("ERR_YOU_CANT_DO_THIS"),1);

$save = (int)$_GET["save"];

if($save){
$text = sqlesc($_POST['text']);

$query="UPDATE comments SET text=$text WHERE id=$id";
$result=SQL_Query_exec($query);
write_log("<a href=account-details.php?id=".$CURUSER['id']."><b>".$CURUSER['username']."</a></b> ID a été édité pour se commentaire: <b>$id</b> du torrent: [<a href=torrents-details.php?id=$id><b>$id</b></a>]");
           autolink("torrents-details.php?id=$id", "Commentaire a été modifiée avec succès.");
           die();
#write_log($CURUSER['username']." a modifié le commentaire: ID:$id");
#show_error_msg(T_("COMPLETE"), "Commentaire Modifié !",1);
}

stdhead("Edit Comment");

$res = SQL_Query_exec("SELECT * FROM comments WHERE id=$id");
$arr = mysqli_fetch_array($res);

       begin_frame(T_("EDITCOMMENT"));
       print("<center><b>".T_("EDITCOMMENT")." </b><p>\n");
       print("<form method=\"post\" name=\"comment\" action=\"comments.php?type=$type&edit=1&save=1&id=$id\">\n");
       print textbbcode("comment","text",$dossier, htmlspecialchars($arr["text"]));
       print("<center><p><input type=\"submit\" value=\"Soumettre les modifications\" /></p></center></form></center>\n");
       end_frame();
       stdfoot();
       die();
#begin_frame(T_("EDITCOMMENT"));
#print("<center><b> ".T_("EDITCOMMENT")." </b><p>\n");
#print("<form method=\"post\" name=\"comment\" action=\"comments.php?type=$type&edit=1&save=1&id=$id\">\n");
#print textbbcode("comment","text", htmlspecialchars($arr["text"]));
#print("<p><input type=\"submit\" value=\"Submit Changes\" /></p></form></center>\n");
#end_frame();
#stdfoot();
#die();
}

if ($delete=='1'){
if ($CURUSER["delete_news"] == "no" && $type == "news" || $CURUSER["delete_torrents"] == "no" && $type == "torrent")  
show_error_msg(T_("ERROR"),T_("ERR_YOU_CANT_DO_THIS"),1);

if ($type == "torrent") {
$res = SQL_Query_exec("SELECT torrent FROM comments WHERE id=$id");
$row = mysqli_fetch_assoc($res);
if ($row["torrent"] > 0) {
SQL_Query_exec("UPDATE torrents SET comments = comments - 1 WHERE id = $row[torrent]");
}
}

SQL_Query_exec("DELETE FROM comments WHERE id = $id");
write_log("<a href=account-details.php?id=".$CURUSER['id']."><b>".$CURUSER['username']."</a></b> a supprimé le ID du commentaires: <b>$id</b> Nouvelles du ID: [<a href=comments.php?type=news&id=$idback><b>$idback</b></a>]");
   autolink("comments.php?type=news&id=$id", "Commentaire a été supprimé avec succès.");
   #autolink("comments.php?type=news&id=$idback", "Commentaire a été supprimé avec succès.");
#write_log($CURUSER['username']." has deleted comment: ID: $id");
#show_error_msg(T_("COMPLETE"), "Comment deleted OK", 1);
}


stdhead(T_("COMMENTS"));


//take comment add
if ($_GET["takecomment"] == 'yes'){
$body = $_POST['body'];

if (!$body)
show_error_msg(T_("ERROR"), T_("YOU_DID_NOT_ENTER_ANYTHING"), 1);

if ($type =="torrent"){
SQL_Query_exec("UPDATE torrents SET comments = comments + 1 WHERE id = $id");
}

SQL_Query_exec("INSERT INTO comments (user, ".$type.", added, text) VALUES (".$CURUSER["id"].", ".$id.", '" .get_date_time(). "', " . sqlesc($body).")");

if (mysqli_affected_rows($GLOBALS["DBconnector"]) == 1)
show_error_msg(T_("COMPLETED"), "Votre commentaire a été ajouté avec succès.", 0);
else
show_error_msg(T_("ERROR"), T_("UNABLE_TO_ADD_COMMENT"), 0);
}//end insert comment

//NEWS
if ($type =="news"){
$res = SQL_Query_exec("SELECT * FROM news WHERE id = $id");
$row = mysqli_fetch_array($res);

if (!$row){
show_error_msg(T_("ERROR"), "Nouvelles Id invalide", 0);
stdfoot();
}

begin_frame(T_("NEWS"));
echo htmlspecialchars($row['title']) . "<br /><br />".format_comment($row['body'])."<br />";
end_frame();

}

//TORRENT
if ($type =="torrent"){
$res = SQL_Query_exec("SELECT id, name FROM torrents WHERE id = $id");
$row = mysqli_fetch_array($res);

if (!$row){
show_error_msg(T_("ERROR"), "Nouveau Id invalide", 0);
stdfoot();
}
   echo "<center><table><tr><td width=50% height=50% class=ttable_head colspan=2 align=center style=line-height:100px;padding-top:14px;vertical-align:middle;font-size:20px;><b>".T_("COMMENTSFOR").":</b> <a href='torrents-details.php?id=".$row['id']."'>".htmlspecialchars($row['name'])."</a></td></tr></table></center><br />";
#echo "<center><b>".T_("COMMENTSFOR")."</b> <a href='torrents-details.php?id=".$row['id']."'>".htmlspecialchars($row['name'])."</a></center><br />";
}

begin_frame(T_("COMMENTS"));

$subres = SQL_Query_exec("SELECT COUNT(*) FROM comments WHERE $type = $id");
$subrow = mysqli_fetch_array($subres);
$commcount = $subrow[0];

if ($commcount) {
list($pagertop, $pagerbottom, $limit) = pager(10, $commcount, "comments.php?id=$id&type=$type&");
$commquery = "SELECT comments.id, text, user, comments.added, avatar, signature, username, title, class, uploaded, downloaded, privacy, donated FROM comments LEFT JOIN users ON comments.user = users.id WHERE $type = $id ORDER BY comments.id $limit";
$commres = SQL_Query_exec($commquery);
}else{
unset($commres);
}

if ($commcount) {
print($pagertop);
commenttable($commres, $type);
print($pagerbottom);
}else {
print("<br /><b>" .T_("NOCOMMENTS"). "</b><br />\n");
}

echo "<center>";
echo "<form name=\"comment\" method=\"post\" action=\"comments.php?type=$type&id=$id&takecomment=yes\">";
#echo textbbcode("comment","body")."<br />";
echo textbbcode("comment","body","$dossier")."<br />";
echo "<input type=\"submit\"  value=\"".T_("ADDCOMMENT")."\" />";
echo "</form></center>";

end_frame();

stdfoot();
?>
Error come — 2021-11-07 13:30:21 in v3 Support
I try to do the redirect after editing a message and he does not want to do this?

edit:

if($save){
$text = sqlesc($_POST['text']);

$query="UPDATE comments SET text=$text WHERE id=$id";
$result=SQL_Query_exec($query);
write_log("<a href=account-details.php?id=".$CURUSER['id']."><b>".$CURUSER['username']."</a></b> ID a été édité pour se commentaire: <b>$id</b> from torrent: [<a href=torrents-details.php?id=$idback><b>$idback</b></a>]");
autolink("torrents-details.php?id=$idback", "Commentaire a été modifiée avec succès.");
#write_log($CURUSER['username']." a modifié le commentaire: ID:$id");
#show_error_msg(T_("COMPLETE"), "Commentaire Modifié !",1);
}


deleted:

SQL_Query_exec("DELETE FROM comments WHERE id = $id");
write_log("<a href=account-details.php?id=".$CURUSER['id']."><b>".$CURUSER['username']."</a></b> a supprimé le ID du commentaires: <b>$id</b> Nouvelles du ID: [<a href=comments.php?type=news&id=$idback><b>$idback</b></a>]");
autolink("comments.php?type=news&id=$idback", "Commentaire a été supprimé avec succès.");
#write_log($CURUSER['username']." has deleted comment: ID: $id");
#show_error_msg(T_("COMPLETE"), "Comment deleted OK", 1);
}

]
Error come — 2021-11-07 13:10:20 in v3 Support
thank you M-jay, you put the chip in my ear and I tested the update file on V3 (github) and everything is fine again.

resolved!  :thumb
TorrentTrader 3.0 — 2021-11-07 12:52:34 in v3 Download
thanks M-jay :thumb
Error come — 2021-11-02 20:55:45 in v3 Support
Error comments torrent...

hello guys i have a mistake i can correct and i would love to have your support to fix it if it is possible !?
As soon as I make a comment and I do an update the message doubles and goes on!

possible that once updating the comment this double, triple, etc ...?

Thanks !  :giggle
:thumb thanks
Big thanks LokiThor2021 / MicroMonkey  :thumb
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: 1
  • Members: 0
  • Guests online: 1
  • Comments: 3
  • Messages: 1,728