( ′∀`)σ≡σ☆))Д′)レ(゚∀゚;)ヘ=З=З=Зε≡(ノ´_ゝ`)ノ
<?php
include("protect.php");
if (empty($page)) {
$page = 0;
}
include('Connections/videoondemand.php');
require("DbSql2.inc.php");
require("NewsSql2.inc.php");
$db = new NewsSQL();
$widget = 96;
if($_GET["recsnorep"]) {
$recsnorep=$_GET["recsnorep"];
$data=trim($recsnorep);
$videouser = $_SESSION['euserid'];
$ex=explode(" ",$data);
$size=sizeof($ex);
for($i=0;$i<$size;$i++) {
$id=trim($ex[$i]);
$db->delnewsrep($id,$VideoPath);
}
}
page_protect();
$VideoPath = "uploads/live/";
$live_img = 'uploads/images/';
$videouser = $_SESSION['euserid'];
if($_GET["recsno"]) {
$recsno=$_GET["recsno"];
$data=trim($recsno);
$videouser = $_SESSION['euserid'];
$ex=explode(" ",$data);
$size=sizeof($ex);
for($i=0;$i<$size;$i++) {
$id=trim($ex[$i]);
$db->delAllReport($id,$VideoPath);
}
header("Location: ./content.php?msg=Successfully+deleted");
}
function sizeinput($input, $len){
(int)$len;
(string)$input;
$n = substr($input, 0,$len);
$ret = trim($n);
$out = htmlentities($ret, ENT_QUOTES);
return $out;
}
function checkfile($input){
$ext = array('mpg', 'wma', 'mov', 'flv', 'mp4', 'm4v', 'avi', 'qt', 'wmv', 'rm', '3gp', 'mpeg', 'divx', 'moov', 'asf', 'swf', 'vob');
$extfile = substr($input['name'],-4);
$extfile = explode('.',$extfile);
$good = array();
$extfile = $extfile[1];
if(in_array($extfile, $ext)){
$good['safe'] = true;
$good['ext'] = $extfile;
}else{
$good['safe'] = false;
}
return $good;
}
//no error reporting
//@error_reporting(0);
if (empty($page)){
$page = 0;
}
$record = 10;
// generate paging here
if ($Delnews2==$admin_yes) {
$newsid = $db->base64url_decode($newsid);
$db->delnews2($newsid,$VideoPath);
}
if ($Delnews==$admin_yes) {
$newsid = $db->base64url_decode($newsid);
$db->delnews($newsid,$VideoPath);
}
if (!empty($editthumb)) {
$tempuserfile = $_FILES['userfile']['tmp_name'];
$tempuserfile_name = $_FILES['userfile']['name'];
if ((!empty($tempuserfile)) && (!empty($tempuserfile_name))) {
$userfile = $tempuserfile;
$userfile_name = $tempuserfile_name;
}
if ((!empty($userfile)) && (!empty($userfile_name))) {
$videouser = $_SESSION['euserid'];
$userfile_name = preg_replace('/[\ ]/', '-', $userfile_name);
$userfile_name = $videouser.rand(455,78787).$userfile_name;
$dest1 = $live_img.$userfile_name;
copy($userfile, $dest1);
$starting_image = imagecreatefromjpeg("$live_img$userfile_name");
$width = imagesx($starting_image);
$height = imagesy($starting_image);
$thumb_width = 130;
$thumb_height = 80;
$thumb_image = imagecreatetruecolor($thumb_width, $thumb_height);
imagecopyresampled($thumb_image, $starting_image, 0, 0, 0, 0, $thumb_width, $thumb_height, $width, $height);
imagejpeg($thumb_image, "$live_img$userfile_name");
$db->addThumb($newsid,$userfile_name,$live_img);
}}
if (!empty($addnews)) {
$_POST = filter($_POST);
$title = mysqli_real_escape_string($link,$title);
$content = mysqli_real_escape_string($link,$content);
$description = mysqli_real_escape_string($link,$description);
$keywords = mysqli_real_escape_string($link,$keywords);
$newsid = $db->updateContent($title,$content,$keywords,$isdisplay,$description,$vcat,$slug,$episodeid);
}
if (!empty($editnewsr)) {
$_POST = filter($_POST);
$mytitle = mysqli_real_escape_string($link,$mytitle);
$content = mysqli_real_escape_string($link,$content);
$description = mysqli_real_escape_string($link,$description);
$keywords = mysqli_real_escape_string($link,$keywords);
$db->editnewsr($catalogid,$mytitle,$content,$keywords,$isdisplay,$description,$vcat,$summary,$thumb,$newsid,$slug,$episodeid);
$db->editslugr($newsid,$slug,$mytitle,$str);
header("Location: content.php?msg=content+edited+Successfully!");
}
if (!empty($editnewsr2)) {
$_POST = filter($_POST);
$mytitle = mysqli_real_escape_string($link,$mytitle);
$content = mysqli_real_escape_string($link,$content);
$description = mysqli_real_escape_string($link,$description);
$keywords = mysqli_real_escape_string($link,$keywords);
$db->editnewsr2($catalogid,$mytitle,$content,$keywords,$isdisplay,$description,$vcat,$summary,$thumb,$newsid,$slug,$episodeid);
$db->editslugr($newsid,$slug,$mytitle,$str);
header("Location: content.php?msg=content+edited+Successfully!");
}
if (!empty($editmyreport)) {
$_POST = filter($_POST);
$mytitle = mysqli_real_escape_string($link,$mytitle);
$content = mysqli_real_escape_string($link,$content);
$description = mysqli_real_escape_string($link,$description);
$keywords = mysqli_real_escape_string($link,$keywords);
$db->editmyreport($catalogid,$mytitle,$content,$keywords,$newsid);
$db->editslugr($newsid,$slug,$mytitle,$str);
header("Location: content.php?msg=Content+Edited+Successfully!");
}
if (!empty($DP1)) {
$db->del_Video($newsid,$VideoPath);
}
$result = $db->getcatalognewsreport($page,$record,$catid);
?><?php
function text_limit($str,$limit=10)
{
if(stripos($str," "))
{
$ex_str=explode(" ",$str);
if(count($ex_str)>$limit)
{
for($i=0;$i<$limit;$i++)
{
$str_s.=$ex_str[$i]." ";
}
return $str_s;
}
else{
return $str;
}
}else{
return $str;
}
}
$page_limit = $record ;
if (!isset($_GET['page']) )
{ $start=0; } else
{ $start = ($_GET['page'] - 1) * $page_limit; }
$rs_all = mysqli_query("select count(*) as total_all from reporta where catalogid=$videouser") or die(mysql_error());
list($allvids) = mysql_fetch_row($rs_all);?>
<style type="text/css">
.style1 {
color: #009900;
font-weight: bold;
}
.even {
color:#000;
font-weight:bold
}
.odd { background-color:#000;
opacity:.50; *filter:alpha(opacity=50);
color:#000 }
</style><style type="text/css">
<!--
.style9 {font-size: 12}
-->
</style> <style type="text/css">
<!--
.style4 { font-size: 16px;
font-weight: bold;
}
.style13 {
font-size: 10px
}
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
}
body {
margin-left: 0px;
margin-top: 0px;
}
.style14 {font-size: 14px}
.style15 {
color: #99CC00;
font-weight: bold;
}
a:link {
color: #000;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #000;
}
a:hover {
text-decoration: none;
color: #000;
}
a:active {
text-decoration: none;
color: #000;
}
-->
</style>
<?php
if (empty($result)) {
?>
<div align="right" style="margin-top:100px"> <img src="images/reporta2.png" width="150" />
</div><br />
<br />
<span class="style14" style="color:#000"><img src="images/error.gif" alt="not uploaded" align="texttop" hspace="2" />You have not uploaded any content yet. Click <strong>browse</strong> on the left to get started.<br />
<br />
<span class="style15" style="color:#000">The Content you upload will appear here automatically</span></span><br />
<br /> <br />
<span class="style4" style="color:#000"><strong>Reporta lets you</strong>:</span><br />
<span style="color:#000">-Share News or content that matter to you to this channel<br />
-Experience content reported by people like you<br />
-Share your news with the world </p></span>
<?php /*?> <strong style="color:#000"><a href="EzikiReporta.php" target="_blank">What kind of videos and Photos we DONT accept </a></strong><br />
<strong style="color:#000"><a href="EzikiReporta.php" target="_blank">Eziki Reporta Best Practices</a></strong><br />
<strong style="color:#000"><a href="EzikiReporta.php" target="_blank">What makes a good video or photo?</a></strong><br />
<strong style="color:#000"><a href="EzikiReporta.php" target="_blank">What kind of content is welcome on Reporta?</a></strong><br /><?php */?>
<?php }
?>
<?php
if (!empty($result)) {?>
<div id="loading" align="left"> </div>
<script type="text/javascript" src="js/ezikiLoadRemote.js"></script>
<script type="text/javascript" src="js/ajax.js"></script>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery-ui.min.js"></script>
<script language="JavaScript" type="text/javascript" src="eziki_framework.js"></script>
<!-- <script language="JavaScript" type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
--> <script type="text/javascript">
$(function() {
$(".delbutton").click(function(){
var del_id = element.attr("id");
var info = 'id=' + del_id;
if(confirm("Sure you want to delete this update? There is NO undo!"))
{
$.ajax({
type: "POST",
url: "ezikiframework.php",
data: info,
success: function(){
}
});
$(this).parents(".record").animate({ backgroundColor: "#fbc7c7" }, "fast")
.animate({ opacity: "hide" }, "slow");
}
return false;
});
});
</script>
<script type="text/javascript" src="v/scripts/multiplereporta.js"> </script>
<div id="insert_response5" style=" color:#4d90b4;font:Arial, Helvetica, sans-serif; font-size:11px;"></div> <div id="insert_response66" style=" color:#4d90b4;font:Arial, Helvetica, sans-serif; font-size:11px;"></div>
<?php } ?>
<form action="" method="post">
<table width="680" border="0" cellpadding="0" cellspacing="0" >
<?php
if (!empty($result)) {?>
<tr>
<td height="26" colspan="3"><table width="100%" border="0" style="margin:2px;" cellpadding="0" cellspacing="0">
<tr>
<td width="146"></td>
<td width="77"></td>
</tr>
<span style="font-size:13px">
<strong style="font-size:18px;color:#39F;">My Content | </strong><span style="color:#000"><a href="accountreporta.php?nani=<?php echo $widget;?>">My Settings </a></span>| <input name="topcheckbox" type="checkbox" class="check " id="topcheckbox" onClick="selectall();" value="ON"><span style="color:#000"> Select All</span> | <a href="javascript:goDelx()"> Delete</a> |<a href="content.php"> Refresh</a> | <?php
$pagenext = $page+1;
$result1 = $db->getcatalognewsreport($pagenext,$record,$catid);
if ($page!=0)
{
$pagepre = $page-1;
print "<a href=\"$PHP_SELF?page=$pagepre&catid=$catid#a\">Back </a> ";
}
/* if ($allvids > $page_limit)
{
$total_pages = ceil($allvids/$page_limit);
echo " ";
$i = 0;
while ($i < $total_pages)
{
$page_no = $i+1;
echo "<a href=\"$PHP_SELF?page=$page_no#a\">$page_no</a> ";
$i++;
}
echo "";
} */
if (!empty($result1))
{
print " <a href=\"$PHP_SELF?page=$pagenext&catid=$catid#a\">Next</a> ";
}
?>
</span>
</td>
</tr>
<tr>
<td colspan="3" align="left">
<table width="100%"><tr>
<td width="22"></td>
<td width="100%" valign="middle"><div align="left" class="style9"><strong><span class="style6 style6"></span></strong></div></td>
<td width="155" valign="middle"><div align="left" class="style9"></div></td>
<td width="52" valign="middle"><div align="left" class="style9"><strong><span class="style6 style6"> </span></strong></div></td>
<td width="40" valign="middle"><div align="center" class="style9"><strong>
<?php
$newsid = $db->base64url_encode($newsid); ?>
<?php
switch($isdisplay){
case "1":
?>
<?php
break;
case "0":
?>
<a href="nmgeditreport.php?newsid=<?php print "$newsid"; ?>" class="en_b style6 style6">Edit</a>
<?php
break;
}
?>
</strong></div></td>
</tr></table>
<ul class="sort" style="padding-left:0px">
<?php foreach ($result as $key => $val) {
$newsid = stripslashes($val["newsid"]);
$catalogid = stripslashes($val["catalogid"]);
$title = stripslashes($val["title"]);
$original = stripslashes($val["original"]);
$viewnum = stripslashes($val["viewnum"]);
$isdisplay = stripslashes($val["isdisplay"]);
$adddate = stripslashes($val["adddate"]);
$content = stripslashes($val["content"]);
$cataname = $db->getcatalognamebyid($catalogid);
$newsid2 = $newsid;
?>
<div id="box<?php print "$newsid"; ?>">
<li id="<?php print "$newsid"; ?>" style=" width:680px; display:inline;border-bottom:dotted #666 1px; text-decoration:none">
<table width="680" cellspacing="0" cellpadding="0">
<tr class="<?=($c++%2==1) ? 'odd' : 'even' ?>">
<td width="20"><input name="<?php print "$newsid"; ?>" type="checkbox" class="check style9"></td>
<td width="64" valign="middle">
<?php
switch($isdisplay){
case "1":
?>
<?php
break;
case "0":
?>
<a href="nmgeditreport.php?newsid=<?php print "$newsid"; ?>" class="en_b style6 style6">Edit</a>
<?php
break;
}
?>
<img src="taswira.php?width=80&height=40&cropratio=2:1&image=/v/uploads/raw/<?php print "$original"; ?>" alt="edit thumb" width="80" height="40" hspace="2" vspace="2"/></td>
<td width="100%" valign="middle"><div align="left" class="style9"><span class="style6 style6"><?php print text_limit($title,8); ?>...</span></div></td>
<?php
$newsid = $db->base64url_encode($newsid); ?>
<?php if (!empty($content))
{?>
<td width="39" valign="middle"><div align="left" class="style9"><span class="style6 style6">
<?php
switch($isdisplay){
case "1":
?> <?php /*?>View<?php */?>
<?php
break;
}
?></span></div></td>
<td width="46" valign="middle" style="padding-right:10px"><div align="center" class="style9">
<span class="style6 style6">
<?php
switch($isdisplay){
case "3":
?>
<img src="images/integration.png" alt="Being reviewed" />
<?php
break;
case "1":
?>
<img src="images/okay.png" alt="featured" />
<?php
break;
case "0":
?>
</span>
<div class="style1"><span class="style6 style6"><img src="no.png" alt="not featured" /> </span></div>
<span class="style6 style6">
<?php
break;
}
?>
</span></div></td>
<td width="40" valign="middle" style="padding-right:10px"><a href="editreport.php?newsid=<?php print "$newsid"; ?>" class="en_b style6 style6 style13"><strong>Edit</strong></a>
<?php /*?>
<a href="#" id="<?php print "$newsid"; ?>" class="delbutton"><img src="cancel.png" alt="delete" /></a>
<?php */?>
</td><?php } else
{?>
<td valign="middle" colspan="3" style="padding-right:10px"> <a href="editreport.php?newsid=<?php print "$newsid"; ?>" class="en_b style6 style6 style13"> <img src="images/error.gif" alt="Edit" width="15" hspace="5" align="texttop"/>Update</a></td>
<?php }?>
</tr></table>
</li> </div>
<?php
}
}
?>
</ul> </td>
</tr>
<td width="146"></tr>
</table>
</form>
<h4>
<?php
/* $pagenext = $page+1;
$result1 = $db->getcatalognewsreport($pagenext,$record,$catid);
if ($page!=0)
{
$pagepre = $page-1;
print "<a href=\"$PHP_SELF?page=$pagepre&catid=$catid#a\">< Back </a> ";
}
if ($allvids > $page_limit)
{
$total_pages = ceil($allvids/$page_limit);
echo " ";
$i = 0;
while ($i < $total_pages)
{
$page_no = $i+1;
echo "<a href=\"$PHP_SELF?page=$page_no#a\">$page_no</a> ";
$i++;
}
echo "";
}
if (!empty($result1))
{
print " <a href=\"$PHP_SELF?page=$pagenext&catid=$catid#a\">Next ></a> ";
}*/
?></h4>
<form action="javascript:sorteddata()" id="sform" method="post">
<input name="mode" type="hidden" value="sortdata" size="60" id="mode">
<input name="sortdata" id="sortdata" type="hidden" value="" />
</form>