( ′∀`)σ≡σ☆))Д′)レ(゚∀゚;)ヘ=З=З=Зε≡(ノ´_ゝ`)ノ
<?php
include("protect.php");
include('Connections/videoondemand.php');
require("DbSql.inc.php");
require("NewsSql.inc.php");
$db = new NewsSQL($DBName);
$tandau = yaw($tandau, "qiu3ggrubfabffuwhfuiwhfiwgfiub");
$tandao = yaw($tandao, "qiu3ggrubfabffuwhfuiwhfiwgfiub");
$mode=$_GET["mode"];
if($mode=="sortdata") {
$sortdata=$_GET["sortdata"];
$data=explode(',',str_replace('li','',$_GET['sortdata']));
$data=explode(',',str_replace('box','',$_GET['sortdata']));
$sortuser = $_SESSION['euserid'];
// Getting the number of objects
list($tot_objects) = mysql_fetch_array(mysqli_query("SELECT COUNT(*) FROM usercontent where catalogid=$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 `usercontent` (newsid,positions) '.$str.' ON DUPLICATE KEY UPDATE positions = VALUES(positions)');
//mysqli_query('DELETE FROM ilikethis WHERE topicid=0');
echo "Arrangement Updated Succesfully";
}
if($mode=="unfeature") {
$newsid=$_GET["newsid"];
mysqli_query("update reporta set isdisplay=0 where newsid='$newsid'") or die(mysql_error());
echo "<span >No</span>";
}
if($mode=="unpublish") {
$newsid=$_GET["newsid"];
mysqli_query("update usercontent set isdisplay=0 where newsid='$newsid'") or die(mysql_error());
echo "<span class=style1>No</span>";
}
if($mode=="feature") {
$newsid=$_GET["newsid"];
mysqli_query("update reporta set isdisplay=1 where newsid='$newsid'") or die(mysql_error());
echo "Yes";
/*
$result4 = mysqli_query("select * from reporta where newsid = '$newsid' order by newsid;");
while($row4 = mysql_fetch_assoc($result4))
{
$content = $row4["content"];
if (empty($content))
{
$newside = $db->base64url_encode($newsid);?>
<a href="editreporta.php?newsid=<?php print "$newside"; ?>">Enter Desc. here </a>
<?php }
else
{
mysqli_query("update reporta set isdisplay=3 where newsid='$newsid'") or die(mysql_error());
echo "Yes";
}
}*/
}
if($mode=="publish") {
$newsid=$_GET["newsid"];
$result4 = mysqli_query("select * from usercontent where newsid = '$newsid' order by newsid;");
while($row4 = mysql_fetch_assoc($result4))
{
$content = $row4["content"];
if (empty($content))
{
$newside = $db->base64url_encode($newsid);?>
<?php /*?><a href="editvideo.php?newsid=<?php print "$newside"; ?>">Enter Desc. here </a> <?php */?>
<?php mysqli_query("update usercontent set isdisplay=1 where newsid='$newsid'") or die(mysql_error());
echo "Yes";?>
<?php }
else
{
mysqli_query("update usercontent set isdisplay=1 where newsid='$newsid'") or die(mysql_error());
echo "Yes";
}
}
}
if($mode=="restore") {
$newsid=$_GET["newsid"];
mysqli_query("update usercontent set isdisplay=0 where newsid='$newsid'") or die(mysql_error());
echo "Restored";
}
if($_GET['cmd'] == 'ban')
{
mysqli_query("update users set banned='1' where catalogid='$_GET[id]'");
//header("Location: $ret");
echo "yes";
exit();
}
if($_GET['cmd'] == 'unban')
{
mysqli_query("update users set banned='0' where catalogid='$_GET[id]'");
echo "no";
//header("Location: $ret");
// exit();
}
if($_POST['id'])
{
$id=$_POST['id'];
$sql = "delete from reporta where newsid='$id'";
mysqli_query( $sql);
}