<?php
include("head.php");
$nopl = mysql_fetch_array(mysql_query("SELECT birthday FROM ibwf_users WHERE id='".$uid."'"));
$uage = getage($nopl[0]);
if($uage>17){
$pid = $_GET["pid"];
addonline(getuid_sid($sid),"Main Page","http://wapirate.net/wml/pornfactory.php?action=main");
//////////////////////////////////////////
if($action=="main")
{
$funny = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM porn_factory WHERE type='1' AND approved='1'"));
$sexy = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM porn_factory WHERE type='2' AND approved='1'"));
$hardcore = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM porn_factory WHERE type='3' AND approved='1'"));
$extreme = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM porn_factory WHERE type='4' AND approved='1'"));
$funnya = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM porn_factory WHERE type='1' AND approved='0'"));
$sexya = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM porn_factory WHERE type='2' AND approved='0'"));
$hardcorea = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM porn_factory WHERE type='3' AND approved='0'"));
$extremea = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM porn_factory WHERE type='4' AND approved='0'"));
$report = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM porn_factory WHERE reported!='0'"));
$link = "pornfactory.php?action=list&type";
$off = "&off=1";
echo "<card id=\"main\" title=\"wapirate\">";
?>
<p align="center">
<img src="/smilies/boobies.gif" alt=""/><br/>
<br/><br/>
<a href="pornfactory.php?action=about">About</a><br/>
</p>
<p>
<a href="<?=$link?>=1">Funny [<?=$funny[0]?>]</a><br/>
<a href="<?=$link?>=2">Sexy [<?=$sexy[0]?>]</a><br/>
<a href="<?=$link?>=3">Hardcore [<?=$hardcore[0]?>]</a><br/>
<a href="<?=$link?>=4">Extreme [<?=$extreme[0]?>]</a> (Enter at own risk)<br/><br/>
<?
if(isstatus10(getuid_sid($sid))){
?>
<b>To Be Approved</b><br/>
<a href="<?=$link?>=1<?=$off?>">Funny [<?=$funnya[0]?>]</a><br/>
<a href="<?=$link?>=2<?=$off?>">Sexy [<?=$sexya[0]?>]</a><br/>
<a href="<?=$link?>=3<?=$off?>">Hardcore [<?=$hardcorea[0]?>]</a><br/>
<a href="<?=$link?>=4<?=$off?>">Extreme [<?=$extremea[0]?>]</a><br/><br/>
<a href="pornfactory.php?action=dead">Reported [<?=$report[0]?>]</a><br/>
<?
}
?>
</p>
<p align="center">
<a href="pornfactory.php?action=add">Add Porn</a><br/><br/>
<?
echo "<br/><a href=\"index.php?action=main\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "</card>";
}
//////////////////////////////
else if($action=="about")
{
echo "<card id=\"main\" title=\"wapirate\">";
?>
<p align="center">
<img src="/smilies/boobies.gif" alt=""/><br/>
<br/><br/>
Porn Factory Was made for those of you who want to stay anonymous and still have the chance to post porn<br/>
All Porn and media types will be excepted except for child porn and animal porn which will result in an instant Ban<br/>
So if you are Offened easily Stay away from the extreme list<br/>
Only direct links(url) Will Be excepted!<br/>
All items will be validated before it shows in lists<br/>
You will also Get Download Rep each time your file is viewed.<br/>
Need An Uploader? then <a href="http://wapirate.wen.ru/upload/x.html">Click Here</a><br/>
Note: After uploading just type the name of your file into the url box eg:<br/>
Url: <input value="niceporn.gif"/><br/>
And Our System will sort the address out for you!<br/>
P.s. Have Fun!<br/>
<?
echo "<a href=\"pornfactory.php?action=main\">Porn Factory</a><br/>";
echo "<br/><a href=\"index.php?action=main\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "</card>";
}
////////////////////////////////////////
else if($action=="list")
{
$off = $_GET["off"];
$type = $_GET["type"];
if($off!=""){
$off = "&off=1";
}
echo "<card id=\"main\" title=\"wapirate\">";
if($page=="" || $page<=0)$page=1;
if($off!=""){
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM porn_factory WHERE type='".$type."' AND approved='0'"));
}else{
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM porn_factory WHERE type='".$type."' AND approved='1'"));
}
$num_items = $noi[0]; //changable
$items_per_page= 20;
$num_pages = ceil($num_items/$items_per_page);
if($page>$num_pages)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
if($num_items>0)
{
//changable sql
if($off!=""){
$sql = "
SELECT id, title, itemurl, views FROM porn_factory WHERE type='".$type."' AND approved='0' ORDER BY id DESC
LIMIT $limit_start, $items_per_page
";
}else{
$sql = "
SELECT id, title, itemurl, views FROM porn_factory WHERE type='".$type."' AND approved='1' ORDER BY id DESC
LIMIT $limit_start, $items_per_page
";
}
echo "<p>";
$items = mysql_query($sql);
echo mysql_error();
while ($item = mysql_fetch_array($items))
{
$text = htmlspecialchars($item[1]);
$text = getspam($text);
$ext = getext($item[2]);
$ime = getextimg($ext);
if($item[3]==1){
$view = "1 View";
}else{
$view = "$item[3] Views";
}
echo "<a href=\"pornfactory.php?action=show&pid=$item[0]$off\">$ime $text</a>.$ext ($view)<br/>";
}
echo "</p>";
echo "<p align=\"center\">";
if($page > 1){
$prev = ($page - 1);
echo "<a href=\"pornfactory.php?action=$action&page=$prev&type=$type$off\">Previous</a> ";
}
if($page < $num_pages){
$next = ($page + 1);
echo "<a href=\"pornfactory.php?action=$action&page=$next&type=$type$off\">Next</a><br/>";
}
echo "<br/>$page/$num_pages<br/>";
if($num_pages>2)
{
$rets = "Jump To Page: <input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"pornfactory.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"off\" value=\"$off\"/>";
$rets .= "<postfield name=\"type\" value=\"$type\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor><br/>";
echo $rets;
}
}else{
echo "<p align=\"center\">";
echo "<b>No Porn At Preset Time!</b><br/>";
}
echo "<a href=\"pornfactory.php?action=main\">Porn Factory</a><br/>";
echo "<br/><a href=\"index.php?action=main\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "</card>";
}
//////////////////////////////
else if($action=="show")
{
$item = mysql_fetch_array(mysql_query("SELECT title, itemurl, approved, description, uid, colour FROM porn_factory WHERE id='".$pid."'"));
$ext = getext($item[1]);
$ext = strtolower($ext);
if($item[5]!=""){
$col = "&c=$item[5]";
}
if(($ext=="jpg")||($ext=="jpeg")||($ext=="png")||($ext=="bmp")){
$download = "<a href=\"full.php?image=$item[1]$col\"><img src=\"thumb.php?image=$item[1]$col\" alt=\"$item[0]\"/><br/>Download</a><br/>";
}else if($ext=="gif"){
$download = "<a href=\"$item[1]\"><img src=\"thumb.php?image=$item[1]$col\" alt=\"$item[0]\"/><br/>Download</a><br/>";
}else{
$download = "<a href=\"$item[1]\">Download </a><br/>";
}
$text = htmlspecialchars($item[0]);
$text = getspam($text);
if($uid!=$item[4]){
mysql_query("UPDATE porn_factory SET views=views+1 WHERE id='".$pid."'");
mysql_query("UPDATE ibwf_users SET rep=rep+1 WHERE id='".$item[4]."'");
}
echo "<card id=\"main\" title=\"wapirate\">";
?>
<p align="center">
<?
$des = parsepm($item[3], $sid,$nothing,$item[4]);
echo "$des<br/><br/>";
echo $download;
echo "<br/><br/>";
?>
<?
if($off!=""){
$off = "&off=1";
}
echo "<a href=\"pornfactory.php?action=report&pid=$pid\">Report As Broken</a><br/>";
if((isstatus10(getuid_sid($sid)))&&($uid!=3944)){
$nick = getnick_uid($item[4]);
echo "Posted by <a href=\"index.php?action=viewuser&who=$item[4]\">$nick</a><br/>";
if($item[2]==0){
echo "<a href=\"pornfactory.php?action=online&pid=$pid&online=1$off\">Approve</a><br/>";
}else{
echo "<a href=\"pornfactory.php?action=online&pid=$pid&online=0\">Broken</a><br/>";
}
echo "<a href=\"pornfactory.php?action=add&pid=$pid\">Edit</a><br/>";
echo "<a href=\"pornfactory.php?action=del&pid=$pid\">Delete</a><br/>";
}
echo "<a href=\"pornfactory.php?action=list&type=$type$off\">List</a><br/>";
echo "<a href=\"pornfactory.php?action=main\">Media</a><br/>";
echo "<br/><a href=\"index.php?action=main\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "</card>";
}
//////////////////////////////
else if($action=="add")
{
$rad = mysql_fetch_array(mysql_query("SELECT name, itemurl, description, type FROM porn_factory WHERE id='".$mid."'"));
$button = "Add";
if($pid!=""){
$pid = "&pid=$pid";
$button = "Edit";
}
echo "<card id=\"main\" title=\"wapirate\">";
echo "<p align=\"center\">";
echo "Title: <input name=\"name\" maxlength=\"50\" value=\"$rad[0]\"/><br/>";
echo "Url: <input name=\"url\" maxlength=\"255\" value=\"$rad[1]\"/><br/>";
echo "Description: <input name=\"des\" maxlength=\"255\" value=\"$rad[2]\"/><br/>";
echo "Type: <select name=\"type\">";
echo "<option value=\"1\">Funny</option>";
echo "<option value=\"2\">Sexy</option>";
echo "<option value=\"3\">Hardcore</option>";
echo "<option value=\"4\">Extreme</option>";
echo "</select><br/>";
if($pid!=""){
echo "Text Colour: <select name=\"colour\">";
echo "<option value=\"\">Black</option>";
echo "<option value=\"w\">White</option>";
echo "<option value=\"r\">Red</option>";
echo "<option value=\"b\">Blue</option>";
echo "</select><br/>";
}
echo "<anchor>$button";
echo "<go href=\"pornfactory.php?action=add2$pid\" method=\"post\">";
echo "<postfield name=\"name\" value=\"$(name)\"/>";
echo "<postfield name=\"url\" value=\"$(url)\"/>";
echo "<postfield name=\"des\" value=\"$(des)\"/>";
echo "<postfield name=\"type\" value=\"$(type)\"/>";
echo "<postfield name=\"colour\" value=\"$(colour)\"/>";
echo "</go></anchor>";
echo "</p>";
echo "<p align=\"center\">";
echo "<a href=\"pornfactory.php?action=main\">Porn Factory</a><br/>";
echo "<br/><a href=\"index.php?action=main\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "</card>";
}
/////////////////////////////////////////
else if($action=="add2")
{
echo "<card id=\"main\" title=\"wapirate\">";
echo "<p align=\"center\">";
$name = $_POST["name"];
$url = $_POST["url"];
$type = $_POST["type"];
$des = $_POST["des"];
$colour = $_POST["colour"];
if(substr_count($url,"http://")<1){
$url = "http://ultijenx.wen.ru/files/$url";
}
if($pid!=""){
if(isstatus10(getuid_sid($sid))){
$res = mysql_query("UPDATE porn_factory SET approved='0', description='".$des."', itemurl='".$url."', title='".$name."', type='".$type."' WHERE id='".$pid."'");
$what = "Edited";
}
}else{
$res = mysql_query("INSERT INTO porn_factory SET uid='".$uid."', approved='0', description='".$des."', itemurl='".$url."', title='".$name."', type='".$type."'");
$what = "Added";
}
if($res){
echo "<img src=\"images/ok.gif\" alt=\"0\"/><br/>";
echo "<b>Porn $what Successfully!</b><br/>";
}else{
echo "Fuck a Duck somethings wrong lol<br/>";
}
echo "<a href=\"pornfactory.php?action=main\">Porn Factory</a><br/>";
echo "<br/><a href=\"index.php?action=main\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "</card>";
}
//////////////////////////////
else if($action=="online")
{
if(isstatus10(getuid_sid($sid))){
$online = $_GET["online"];
echo "<card id=\"main\" title=\"wapirate\">";
?>
<p align="center">
<?
$rad = mysql_query("UPDATE porn_factory SET approved='".$online."' WHERE id='".$pid."'");
if($rad){
echo "<img src=\"images/ok.gif\" alt=\"0\"/><br/>";
echo "<b>Porn Updated Successfully!</b><br/>";
}else{
echo "Fuck a Duck somethings wrong lol<br/>";
}
if($off!=""){
$off = "&off=1";
}
echo "<a href=\"pornfactory.php?action=list&type=$type$off\">List</a><br/>";
echo "<a href=\"pornfactory.php?action=main\">Porn Factory</a><br/>";
echo "<br/><a href=\"index.php?action=main\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "</card>";
}
}
//////////////////////////////
else if($action=="report")
{
$un = $_GET["un"];
echo "<card id=\"main\" title=\"wapirate\">";
?>
<p align="center">
<?
if($un==1){
$uid =0;
}
$rad = mysql_query("UPDATE porn_factory SET reported='".$uid."' WHERE id='".$pid."'");
if($rad){
echo "<img src=\"images/ok.gif\" alt=\"0\"/><br/>";
echo "<b>Reported Successfully!</b><br/>";
}else{
echo "Fuck a Duck somethings wrong lol<br/>";
}
if($off!=""){
$off = "&off=1";
}
echo "<a href=\"pornfactory.php?action=list&type=$type$off\">List</a><br/>";
echo "<a href=\"pornfactory.php?action=main\">Porn Factory</a><br/>";
echo "<br/><a href=\"index.php?action=main\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "</card>";
}
//////////////////////////////
else if($action=="dead")
{
if(isstatus10(getuid_sid($sid))){
echo "<card id=\"main\" title=\"wapirate\">";
?>
<p align="center">
<?
$sql = "SELECT id, title, itemurl, reported FROM porn_factory WHERE reported!='0'";
$items = mysql_query($sql);
echo mysql_error();
while ($item = mysql_fetch_array($items))
{
$nick = getnick_uid($item[3]);
$unreport = "<a href=\"pornfactory.php?action=report&pid=$item[0]&un=1\">[Un-Report] </a>";
$del = "<a href=\"pornfactory.php?action=del&pid=$item[0]\">[Delete]</a>";
echo "<a href=\"$item[2]\">$item[1] </a><br/>Reported By <a href=\"index.php?action=viewuser&who=$item[3]\">$nick</a> $unreport $del<br/><br/>";
}
echo "<a href=\"pornfactory.php?action=main\">Porn Factory</a><br/>";
echo "<br/><a href=\"index.php?action=main\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "</card>";
}
}
//////////////////////////////
else if($action=="del")
{
if(isstatus10(getuid_sid($sid))){
echo "<card id=\"main\" title=\"wapirate\">";
?>
<p align="center">
<?
$rad = mysql_query("DELETE FROM porn_factory WHERE id='".$pid."'");
if($rad){
echo "<img src=\"images/ok.gif\" alt=\"0\"/><br/>";
echo "<b>Porn Deleted Successfully!</b><br/>";
}else{
echo "Fuck a Duck somethings wrong lol<br/>";
}
if($off!=""){
$off = "&off=1";
}
echo "<a href=\"pornfactory.php?action=list&type=$type$off\">List</a><br/>";
echo "<a href=\"pornfactory.php?action=main\">Porn Factory</a><br/>";
echo "<br/><a href=\"index.php?action=main\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "</card>";
}
}
/////////////////////////////////////////////////////////
else{
addonline(getuid_sid($sid),"Lost In Media","");
echo "<card id=\"main\" title=\"wapirate\">";
echo "<p align=\"center\">";
echo "Nothing To Show Here lol!<br/><br/>";
echo "<br/><a href=\"index.php?action=main\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "</card>";
}
}
else{
addonline(getuid_sid($sid),"I Need To Grow Up!","");
echo "<card id=\"main\" title=\"wapirate\">";
echo "<p align=\"center\">";
echo "Nothing To Show Here lol!<br/><br/>";
echo "<br/><a href=\"index.php?action=main\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "</card>";
}
?>
</wml>