( ′∀`)σ≡σ☆))Д′)レ(゚∀゚;)ヘ=З=З=Зε≡(ノ´_ゝ`)ノ HEX
HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux mail.thebrand.ai 6.8.0-107-generic #107-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 13 19:51:50 UTC 2026 x86_64
User: www-data (33)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: /var/www/html/tmpr/../tmpr/..//tmpr/../tmpr/..//tmpr/../pages/sortilike.php
<?php 


if($_POST['sortdata'])
{
	echo "ffffffffffffffffff";// The data arrives as a comma-separated string,
	// so we extract each post ids:
	$data=explode(',',str_replace('li','',$_POST['sortdata']));
 $sortuser = $_SESSION['euserid'];

	// Getting the number of objects
	list($tot_objects) = mysql_fetch_array(mysqli_query($link,"select COUNT(*) FROM gocart where topicid=$sortuser" ));

	if(count($data)!=$tot_objects);

	foreach($data as $k=>$v)
	{
		// Building the sql query:
		$str[]='('.(int)$v.','.($tot_objects-$k).')';
	}
	
	$str = 'VALUES'.join(',',$str);
	$sortuser = $_SESSION['euserid'];
	mysqli_query('INSERT INTO `gocart` (id,positions) '.$str.' ON DUPLICATE KEY UPDATE positions = VALUES(positions)');
mysqli_query('DELETE FROM gocart WHERE topicid=0');

 print $str;
	
}










if($_POST['sortrated'])
{
	// The data arrives as a comma-separated string,
	// so we extract each post ids:
	$data=explode(',',str_replace('li','',$_POST['sortrated']));
 $sortuser = $_SESSION['euserid'];
	// Getting the number of objects
	list($tot_objects) = mysql_fetch_array(mysqli_query($link,"select COUNT(*) FROM ratedilike where topicidr=$sortuser"));
 
	if(count($data)!=$tot_objects) ;

	foreach($data as $k=>$v)
	{
		// Building the sql query:
		$str[]='('.(int)$v.','.($tot_objects-$k).')';
	}
	
	$str = 'VALUES'.join(',',$str);
	

	mysqli_query('INSERT INTO `ratedilike` (rid,positions) '.$str.' ON DUPLICATE KEY UPDATE positions = VALUES(positions)');
	mysqli_query('DELETE FROM ratedilike WHERE topicid=0');

}

?>