porn streaming

Started by cm27, June 16, 2011, 05:56:11 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

cm27

Thanks to stoner for the youtube mod I tried to rewrite it for porntube lol

sql
CREATE TABLE IF NOT EXISTS `porntubevideo` (
  `id` bigint(20) NOT NULL auto_increment,
  `link` varchar(100) NOT NULL,
  `name` varchar(100) NOT NULL,
  `addedby` varchar(100) NOT NULL,
  `addtime` datetime NOT NULL,
  `viewed` bigint(10) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=20 ;


porntube.php

<?php
require_once(dirname(__FILE__).DIRECTORY_SEPARATOR.'include'.DIRECTORY_SEPARATOR.'bittorrent.php');
require 
INCL_DIR.'user_functions.php';
require 
INCL_DIR.'bbcode_functions.php';
require 
INCL_DIR.'html_functions.php';
dbconn();
//maxcoder();

loggedinorreturn();
$lang array_mergeload_language('global') );
if (isset(
$_GET["id"] )){
$id = (int)$_GET["id"];
if (
$CURUSER['class'] >= UC_MODERATOR){
mysql_query("DELETE FROM porntubevideo WHERE id= $id") or sqlerr(__FILE____LINE__);
}
else{
stderr("Sorry...""You are not authorized!");
}
}
if (
$_SERVER["REQUEST_METHOD"] == "POST" && (isset($_POST["add"])))
{
if ((!isset(
$_POST["link"])) || (!isset($_POST["name"])))
stderr("Sorry...""Missing form data.");

$name mysql_real_escape_string($_POST["name"]);
$user $CURUSER["username"];
$link mysql_real_escape_string($_POST['link']);
$link "http://www.porntube.com/w/".$link."";
$poster ='';
mysql_query("INSERT INTO porntube  (link, poster, name, addedby, addtime) VALUES('$link', '$poster', '$name', '$user',NOW())") or sqlerr(__FILE____LINE__);

$message "Trailer:[url={$INSTALLER09['baseurl']}/porntube.php]".htmlspecialchars($name)."[/url] was just uploaded by " htmlspecialchars($user) . "";
autoshout($message);
}
$HTMLOUT ='';

$HTMLOUT .="<div class='headline'>TRAILERS</div><div class='headbody'>";
$watch "";
if ((isset(
$_POST["watch"]))){
$watch $_POST["watch"];
sql_query("update porntubevideo set viewed = viewed +1 where link = '$watch'");
$HTMLOUT .='<center><iframe src="'.$watch.'" align="center" name="games" width="780" height="430" scrolling="no"></iframe></center>';}
$HTMLOUT .='<h2><b>PORNTUBE LIST</b></h2>';
$HTMLOUT .='<form name="linker" method="post" action="porntube.php"><table cellpadding="4" cellspacing="0" border="0" style="width:100%">
'
;
$query='SELECT * FROM `porntubevideo` ORDER BY name';
$sql=mysql_query($query);
while(
$row=mysql_fetch_array($sql)){
    
$poster=$row['poster'];
    
$link=$row['link'];
    
$name=$row['name'];
$viewed=$row['viewed'];
    
$del=($CURUSER['class']>=UC_MODERATOR || $CURUSER['id']===$row['addedby'])?' [ <a href="porntube.php?action=del&amp;id='.$row['id'].'"><font color="red">Delete</font></a> ]':'';
  $newlink="<a href=\"$link\">$name</a>$del";



$HTMLOUT .='<tr><td>'.$name.''.$del.' Viewed '.$viewed.' times<input type="radio" name="watch" value="'.$link.'" /><input type=\'submit\' name=\'second\' value=\'Watch\' /></td></tr>
'
;

 if (($row["poster"]))
  
$HTMLOUT .= "<tr><td><img src='".$row["poster"]."' width='100' height='250' alt='Poster' title='Poster' /></td></tr>";
  else
  
$HTMLOUT .= "<tr><td><img src='./pic/noposter.png' width='100' height='250' alt='Poster' title='Poster' /></td></tr>";

}
$HTMLOUT .='</table></form><br />';

if (
$CURUSER['class'] >= UC_SYSOP){


$HTMLOUT .='<div><form name="adder" method="post" action="porntube.php">
For URL : "http://www.porntube.com/videos/qppuuQrklHg"<br />
just put : qppuuQrklHg  in link
<br />
<table cellpadding="4" cellspacing="0" border="0" style="width:100%">
<tr><td>Link:</td><td><input type="text" name="link" size="45" /></td></tr>
<tr><td>Name:</td><td><input type="text" name="name" size="45" /></td></tr>
<tr><td>Poster:</td><td><input type="text" name="poster" size="45" /></td></tr>
<tr><td colspan="2" style="text-align:center">
<button class="btn" type="submit" name="add"> Okay </button></td></tr>

</table></form></div></div>'
;



}
echo 
stdhead('YouTube') . $HTMLOUT stdfoot();
?>


Can someone look at this because I get a blank white page. I thought it would be pretty easy just replace a few lines of code with new ones lol 

S O  S

help :D :D

Thanks
Never fall to those that just sit there.. Always look for the way to the top even if you have to code it your self and mistakes and all... quote from BonZO...