Esempio n. 1
0
        //adding from all 'no' videos
        if ($_POST['ac' . $buf->id] != '') {
            $vid = new publishedvideos();
            $vid->username = $buf->username;
            $vid->videolink = $buf->videolink;
            $vid->comment = $buf->comment;
            $vid->save();
            $post = videos::model()->findByPk($buf->id);
            $post->moderation = 'yes';
            //$post->id=$b+1;
            $post->save();
            header("Refresh:0");
        }
        //delete if bad
        if ($_POST['ca' . $buf->id] != '') {
            $post = videos::model()->findByPk($buf->id);
            $post->delete();
            header("Refresh:0");
        }
        $disre = '<br/><form action="http://play-now.ua/index.php/site/admin" method="post">  <input style="visibility:hidden;width:10px;" name="ac' . $buf->id . '" type="text" size="15" maxlength="16" value="yes"><input type="submit" onclick="fade_out_yes()" name="control" value="publish"></form><br/><form action="http://play-now.ua/index.php/site/admin" method="post"><input style="width:10px;visibility:hidden;" name="ca' . $buf->id . '" type="text" size="15" maxlength="16" value="nope"><input type="submit" onclick="fade_out_yes()" name="control" value="reject"></form> <br/>';
        echo '<div style="padding:20px;border-bottom:2px solid black;"><i>From: </i>' . $buf->username . '<br/><iframe width="400" height="300" src="' . $buf->videolink . '" frameborder="0" allowfullscreen></iframe><br/> 	' . $buf->comment . '<br/>' . $disre . '</div><br/>';
    }
}
/*$enta = new videos;
	if($_POST['ac'] != ''){
	$enta->moderation=$_POST['ac'];
	$enta->save(false);}*/
echo '<h3><b>= Edit video =</b></h3><br/>';
$numsz = 0;
$a = 0;
$arr = array();