Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> Converting/Creating Modules
Author Message
draxx
Involved
Involved



Joined: Nov 19, 2003
Posts: 282

PostPosted: Sun Jun 21, 2009 12:24 pm Reply with quote

Does someone have a copy of this module that actually displays the thumbnails?

I have tried for 3 days to get these thumbnails to display properly. It would seem layout.php and functions.php don't coexist with RN ?

Anyone?
 
View user's profile Send private message
Unit1
Worker
Worker



Joined: Oct 26, 2004
Posts: 134
Location: Boston

PostPosted: Sun Jun 21, 2009 6:12 pm Reply with quote

sexycoder wrote:
I saw one Video Stream module working properly at bestbuildpc.net

Check it out, maybe they can share it with you. Shocked


I would not give one red cent to this Thief.. Every thing on that site was stolen from others hard work and he claims it as his own. We had a similar discussion before with him under another name here so I do not want to start that up again. I would not put any thing from that site on any site Twisted Evil let alone pay for some others hard work to him.

_________________
* 5 Simple rules to be happy: * Free Your Heart from Hatred * Free Your Mind from Worries * Live Simply * Give More * Expect Less. 
View user's profile Send private message
Dawg
RavenNuke(tm) Development Team



Joined: Nov 07, 2003
Posts: 928

PostPosted: Sun Jun 21, 2009 10:59 pm Reply with quote

Layout.....

Code:
<?php

/************************************************************************/
/* PHP-NUKE: Advanced Content Management System                         */
/* ============================================                         */
/*                                                                      */
/* Video Stream Module for PHP-Nuke with many features                  */
/*                                                                      */
/* Copyright (c) 2006 by Scott Cariss (Brady)                           */
/* http://www.steezmatic-designs.com                                    */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
///////////////////////////////////////////
/////Layout by Q @ www.3c0x1.net///////////
///////////////////////////////////////////
if (!eregi("modules.php", $_SERVER['SCRIPT_NAME'])) {
   die ("You can't access this file directly...");
}
global $dbi, $user;
include('header.php');
include('modules/Video_Stream/javascript.php');
//echo "<link href=\"modules/Video_Stream/css.css\" rel=\"stylesheet\" type=\"text/css\">\n";


OpenTable3();
 echo"<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">"
  . "<tr>"

   ."<td>\n";

   echo "<center>[ ";
   echo "<a href=\"modules.php?name=Video_Stream\">Video Home</a> ";
   if($submitED == 1) {
   echo "| <a href=\"javascript:loadadd()\">Submit Video</a> ";
   }
   echo "| <a href=\"modules.php?name=Video_Stream&amp;page=search\">Search Videos</a> ";
   echo "| <a href=\"contact.html\">Video Feedback</a> ";
   echo "| <a href=\"recommend.html\">Recommend</a>";
   echo "]</center>"
  . "   </td>"
  . "   </tr>"
  . "   </table>";

sortandsearch();
echo "<hr /><br />\n";

if (($d == "") || ($d == 0)) {
   $d = 1;
}
$sqld = $d - 1;
$sqld *= $limit;
$result = $db->sql_query("SELECT * FROM ".$prefix."_video_stream ".$sortby2." ".$sortby1." LIMIT $sqld,$limit");
$rowvid = $db->sql_numrows($result);
$result2 = $db->sql_query("SELECT * FROM ".$prefix."_video_stream ".$sortby2." ".$sortby1."");
$rowvid2 = $db->sql_numrows($result2);


//////////////////////////////////////////////
// If videos are in the DB then they are displayed.
$qn=0;
if ($rowvid != "0") {
   echo "<table align=\"center\" width=\"97%\" border=\"0\">";
   while($row = $db->sql_fetchrow( $result )) {
   
   $qvidid = $row['vidid'];
   $qcomments = $db->sql_query("SELECT * FROM ".$prefix."_comments where vidid = ".qvidid." LIMIT $sqld,$limit");
$rowvid = $db->sql_numrows($qcoments);


   /////////////////////
   if ($qn == 1) {
   echo "<td width=\"50%\">";
   $qn=0;
   } else {
   echo "<tr><td width=\"50%\">";
   $qn=1;
   }
   /////////////////////
      $userav = $row['user'];
      if ($row['rating'] == "") {$rating = "0";} else {$rating = $row['rating'];}
      $id = $row['id'];
      echo "<table  width=\"100%\" border=\"1\"><tr><td>";
      echo "<table  width=\"100%\" border=\"0\"><tr><td width=\"175\">";
         $image = $row['imgurl'];
if(getimagesize($image) == false) {
      /////////
   //   echo "<table width=\"100%\" border=\"1\"><td>";

         echo "<a href=\"modules.php?name=Video_Stream&amp;page=watch&amp;id=".$row['id']."&amp;d=".$d."\"><img src=\"modules/Video_Stream/images/noimage.gif\" border=\"0\" width=\"175\" height=\"150\" alt=\"".$row['vidname']."\" /></a>\n";
      } else{
         echo "<a href=\"modules.php?name=Video_Stream&amp;page=watch&amp;id=".$row['id']."&amp;d=".$d."\"><img src=\"".$image."\" border=\"0\" width=\"175\" height=\"150\" alt=\"".$row['vidname']."\" /></a>\n";
      }
      echo "</td><td>";
            //category($id);

      echo "<a href=\"modules.php?name=Video_Stream&amp;page=watch&amp;id=".$row['id']."&amp;d=".$d."\">".$row['vidname']."</a>";
      echo "<br /> Posted by ".$row['user']." <a href=\"modules.php?name=Video_Stream&amp;page=search&amp;search=user:".$row['user']."\">["._MOREFROMUSER."]</a>\n";
      echo "<br /><strong>".$row['date']."</strong>";

      echo "<br />" .$row['description']. "" ;
      echo "<br /><b>"._VIEWS.":</b> ".$row['views']."&nbsp;\n";
   //   $image = $row['imgurl'];
      echo "<td width=\"100\">";
      category($id);
      echo "</td></tr></table></td></tr></table><br/>";
      ///////
      if ($qn == 1) {   echo "</td>"; }
   }

   echo "</tr></table><br/>";
////////////////////////////////////////////////////
//ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ

   $pages   = ceil($rowvid2 / $limit);
   echo "<table width=\"100%\"  border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n";
   echo "  <tr>\n";
   echo "    <td width=\"30%\">\n";
   if ($d > 1) {
      $p = $d - 1;
      echo "      <div align=\"left\"><a href=\"modules.php?name=Video_Stream&amp;d=".$p."\">"._PREVIOUS."</a></div>\n";
   } else {
      echo "      &nbsp;\n";
   }
   echo "    </td>\n";
   echo "    <td width=\"40%\"><div align=\"center\">\n";
   pagesnav($d, $pages);
   echo "      <br />"._PAGE." ".$d."/".$pages."</div>\n";
   echo "    </td>\n";
   echo "    <td width=\"30%\">\n";
   if ($d < $pages) {
      $d += 1;
      echo "      <div align=\"right\"><a href=\"modules.php?name=Video_Stream&amp;d=".$d."\">"._NEXT."</a></div>\n";
   } else {
      echo "&nbsp;\n";
   }
   echo "  </td></tr></table><br/><br/>\n";

   
} else {

   // If no videos have been added then user is told no videos
   echo "<center>"._NOVIDSINDB."</center>\n";
}

stats();








CloseTable3();











echo "<br />\n";












// END OF COPYRIGHT

include('footer.php');
?>
 
View user's profile Send private message
Dawg







PostPosted: Sun Jun 21, 2009 11:01 pm Reply with quote

Functions....

Code:
<?php

/************************************************************************/
/* PHP-NUKE: Advanced Content Management System                         */
/* ============================================                         */
/*                                                                      */
/* Video Stream Module for PHP-Nuke with many features                  */
/*                                                                      */
/* Copyright (c) 2006 by Scott Cariss (Brady)                           */
/* http://www.steezmatic-designs.com                                    */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
// Settings
$settings = $db->sql_query("SELECT * FROM ".$prefix."_video_stream_settings WHERE id=1");
$srow = $db->sql_fetchrow($settings);
$commentEDDD = $srow['commentED'];
$commentVVV = $srow['commentV'];
$sendED = $srow['sendED'];
$sendV = $srow['sendV'];
$brokenED = $srow['brokenED'];
$brokenV = $srow['brokenV'];
$submitED = $srow['submitED'];
$submitV = $srow['submitV'];
$submitC = $srow['submitC'];
$ratingED = $srow['ratingED'];
$ratingV = $srow['ratingV'];
$viewV = $srow['viewV'];
$downloadED = $srow['downloadED'];
$downloadV = $srow['downloadV'];
$embededED = $srow['embededED'];
$embededV = $srow['embededV'];
$limit = $srow['limitvids'];
$disclaimersigned = $HTTP_COOKIE_VARS["vs_disclaimer"];
// Plugins
include('modules/Video_Stream/plugins/index.php');

global $commentEDDD, $commentVVV, $sendED, $sendV, $brokenED, $brokenV, $downloadED, $submitED, $submitV, $submitC, $ratingED, $ratingV, $viewV, $downloadV, $limit, $sortby1, $sortby2, $word, $avmaxwidth, $avmaxheight, $vs_plugins, $disclaimersigned, $regcatanon, $embededED, $embededV, $page, $d, $searchtd;

// Users username
cookiedecode($user);
$looker = $cookie[1];
if ($looker == "") {
   $looker = "Anonymous";
}
global $looker;

// Check to see if they are admin
global $admin;
if (!is_array($admin)) {
   $admin2 = base64_decode($admin);
   $admin2 = explode(":", $admin2);
   $aid = "$admin2[0]";
} else {
   $aid = "$admin[0]";
}
$sql = "SELECT radminsuper FROM ".$prefix."_authors WHERE aid='$aid'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
if ($row['radminsuper'] == 1) {
   $isvidstreamadmin = 1;
} else {
   $isvidstreamadmin = 0;
}
// ******************************

function avatars($userav) {
   global $db, $prefix;
   
   $resultav = $db->sql_query("SELECT * FROM ".$prefix."_users WHERE username='$userav'");
   $rowav = $db->sql_fetchrow($resultav);
   $row_avatar = $rowav['user_avatar'];

   $sql = "SELECT * FROM ".$prefix."_video_stream_settings";
   $result = $db->sql_query($sql);
   $conf = $db->sql_fetchrow($result);

   // Find avatar path
   // modules/Forums/images/avatars/gallery
   $sql = "SELECT * FROM ".$prefix."_bbconfig WHERE config_name='avatar_gallery_path'";
   $result = $db->sql_query($sql);
   $avatar_gallery_path = $db->sql_fetchrow($result);
   // modules/Forums/images/avatars
   $sql = "SELECT * FROM ".$prefix."_bbconfig WHERE config_name='avatar_path'";
   $result = $db->sql_query($sql);
   $avatar_path = $db->sql_fetchrow($result);
   if (eregi('http://',$row_avatar) == TRUE) {
      // offsite avatars
      $imageSize = @getimagesize("$row_avatar");
      // width check
      if ($imageSize[0] > $conf['avmaxwidth']) {
         $width = "width=\"".$conf['avmaxwidth']."\"";
      } else {
         $width = "width=\"$imageSize[0]\"";
      }
      // height check
      if ($imageSize[1] > $conf['avmaxheight']) {
         $height = "height=\"".$conf['avmaxheight']."\"";
      } else {
         $height = "height=\"$imageSize[1]\"";
      }
      $AvatarFound = "<img $width $height src=\"$row_avatar\" alt=\"\" />";
   } else {
      $agp = "$avatar_gallery_path[config_value]/$row_avatar";
      $ap = "$avatar_path[config_value]/$row_avatar";
      if (file_exists($agp) == TRUE) {
         $imageSize = getimagesize("$agp");
         // width check
         if ($imageSize[0] > $conf['avmaxwidth']) {
            $width = "width=\"".$conf['avmaxwidth']."\"";
         } else {
            $width = "width=\"$imageSize[0]\"";
         }
         // height check
         if ($imageSize[1] > $conf['avmaxheight']) {
            $height = "height=\"".$conf['avmaxheight']."\"";
         } else {
            $height = "height=\"$imageSize[1]\"";
         }
         $AvatarFound = "<img $width $height src=\"$avatar_gallery_path[config_value]/$row_avatar\" alt=\"\" />";
      } elseif (file_exists($ap) == TRUE) {
         $imageSize = getimagesize("$ap");
         // width check
         if ($imageSize[0] > $conf['avmaxwidth']) {
            $width = "width=\"".$conf['avmaxwidth']."\"";
         } else {
            $width = "width=\"$imageSize[0]\"";
         }
         // height check
         if ($imageSize[1] > $conf['avmaxheight']) {
            $height = "height=\"".$conf['avmaxheight']."\"";
         } else {
            $height = "height=\"$imageSize[1]px\"";
         }
         $AvatarFound = "<img $width $height src=\"$avatar_path[config_value]/$row_avatar\" alt=\"\" />";
      } else {
         $imageSize = getimagesize("modules/Video_Stream/images/blank.gif");
         // width check
         if ($imageSize[0] > $conf['avmaxwidth']) {
            $width = "width=\"".$conf['avmaxwidth']."\"";
         } else {
            $width = "width=\"$imageSize[0]px\"";
         }
         // height check
         if ($imageSize[1] > $conf['avmaxheight']) {
            $height = "height=\"".$conf['avmaxheight']."\"";
         } else {
            $height = "height=\"$imageSize[1]\"";
         }
         $AvatarFound = "<img $width $height src=\"modules/Video_Stream/images/blank.gif\" alt=\"\" />";
      }
   }
   echo $AvatarFound;
}

// Function to display top navigation
function vsnavtop() {
   global $sitename, $d, $submitED;

   echo "<center><FONT class=option>".$sitename." .::. "._VIDEOCOLECTION."</FONT></center><br />";
   echo "<center>[ ";
   echo "<a href=\"modules.php?name=Video_Stream\">Home</a> ";
   if($submitED == 1) {
   echo "| <a href=\"javascript:loadadd()\">Submit Video</a> ";
   }
   echo "| <a href=\"modules.php?name=Video_Stream&amp;page=search\">Search</a> ";
   echo "| <a href=\"feedback.html\">Feedback</a> ";
   echo "| <a href=\"recommend.html\">Recommend</a> ";
   echo "]</center>";

   echo "<br />";
}

// Function to display catergory details
function category($id) {
   global $db, $prefix, $VSimgdata;
   
   //get category id
   $category = $db->sql_query("SELECT category FROM ".$prefix."_video_stream WHERE id=$id");
   $rowcat = $db->sql_fetchrow($category);
   $category = $rowcat['category'];
   //get category data
   $getcat = $db->sql_query("SELECT * FROM ".$prefix."_video_stream_categories WHERE id=$category");
   $catdata = $db->sql_fetchrow($getcat);
   $parentid = $catdata['parent'];
   if($parentid == 0) {
      findcatpic($category);
   } else {
      $fullcategory = "<a href=\"modules.php?name=Video_Stream&amp;categoryby=".$category."\">".$catdata['name']."</a>";
   }
   
   // Do this untill we get to base category
   while ($parentid != 0) {
      $loopcat = $db->sql_query("SELECT * FROM ".$prefix."_video_stream_categories WHERE id=$parentid");
      $loopdata = $db->sql_fetchrow($loopcat);
      $parentid = $loopdata['parent'];
      $category = $loopdata['id'];
      if($parentid == 0) {
         findcatpic($category);
      } else {
         $fullcategory = "<a href=\"modules.php?name=Video_Stream&amp;categoryby=".$category."\">".$loopdata['name']."</a><br />".$fullcategory."";
      }
   }
   echo "      "._CATEGORY.":<br />".$VSimgdata."".$fullcategory."\n";   
}

function findcatpic($id) {
   global $db, $prefix, $VSimgdata;
   
   $result = $db->sql_query("SELECT * FROM ".$prefix."_video_stream_categories WHERE id=$id");
   $row = $db->sql_fetchrow($result);
   
   if($row['imgurl'] == "") {
      $VSimgdata = "<a href=\"modules.php?name=Video_Stream&amp;categoryby=".$id."\">".$row['name']."</a><br />";
   } else {
      $VSimgdata = "<a href=\"modules.php?name=Video_Stream&amp;categoryby=".$id."\"><img src=\"".$row['imgurl']."\" alt=\"".$row['name']."\" border=\"0\" /></a><br />";
   }
}

function sortandsearch() {
   global $db, $prefix, $sortby1, $sortby2, $word, $searchtd, $page, $d;
   session_start();
   if($page == "") {
      $_SESSION['finalsearch'] = "";
      $_SESSION['search'] = "";
   }
// Search Types
   if (strstr($_GET['search'], 'user:') !== false) {
      $_SESSION['search'] = $_GET['search'];
      $type = 3;
   }
   if (strstr($_POST['search'], 'user:') !== false) {
      $_SESSION['search'] = $_POST['search'];
      $type = 3;
   }
   if (strstr($_POST['search'], 'title:') !== false) {
      $_SESSION['search'] = $_POST['search'];
      $type = 1;
   }
   if (strstr($_POST['search'], 'description:') !== false) {
      $_SESSION['search'] = $_POST['search'];
      $type = 2;
   }
   if (($type == "") && ($_POST['search'])) {
      $type = 1;
      $_SESSION['search'] = $_POST['search'];
   }
   if (strstr($_SESSION['search'], 'user:') !== false) {
      $type = 3;
   }
   if (strstr($_SESSION['search'], 'title:') !== false) {
      $type = 1;
   }
   if (strstr($_SESSION['search'], 'description:') !== false) {
      $type = 2;
   }   
// ***********
   
   // Get the final search word to be used
   if ($type == 3) {
      $_SESSION['finalsearch'] = str_replace('user:', '', $_SESSION['search']);
      $searchtd = "user";
   } elseif ($type == 1) {
      $_SESSION['finalsearch'] = str_replace('title:', '', $_SESSION['search']);
      $searchtd = "vidname";
   } else {
      $_SESSION['finalsearch'] = str_replace('description:', '', $_SESSION['search']);
      $searchtd = "description";
   }
   $word = $_SESSION['finalsearch'];
   // *************************************
   if($_POST['search']) {
      $d = 1;
   }
   if ($_GET['categoryby'] != "") {
      $_SESSION['categoryby'] = $_GET['categoryby'];
   }
   if ($_POST['sortvids']) {
      $d = 1;
      $_SESSION['orderby'] = $_POST['orderby'];
      $_SESSION['categoryby'] = $_POST['categoryby'];
   }
   if (($_SESSION['orderby'] == 0) || ($_SESSION['orderby'] == "")) {$sortby1 = "ORDER BY id DESC";}
   if ($_SESSION['orderby'] == 1) {$sortby1 = "ORDER BY id ASC";}
   if ($_SESSION['orderby'] == 2) {$sortby1 = "ORDER BY rating/rates DESC";}
   if ($_SESSION['orderby'] == 3) {$sortby1 = "ORDER BY views DESC";}
   if ($_SESSION['orderby'] == 4) {$sortby1 = "ORDER BY vidname ASC";}
   if (($_SESSION['categoryby'] == 0) || ($_SESSION['categoryby'] == "")) {$sortby2 = "WHERE request=0";}
   if (($_SESSION['categoryby'] != 0) && ($_SESSION['categoryby'] != "")) {$sortby2 = "WHERE request=0 AND category='".$_SESSION['categoryby']."'";}
   $selectby2 = $_SESSION['categoryby'];
   $selected1[$_SESSION['orderby']] = "selected";
   $selected2[$_SESSION['categoryby']] = "selected";
   $getcat = $db->sql_query("SELECT * FROM ".$prefix."_video_stream_categories");
      echo "    <form name=\"order\" method=\"post\" action=\"\">\n";
   echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"10\">\n";
   echo "  <tr valign=\"top\">\n";
   echo "    <td nowrap=\"nowrap\">\n";


   echo "      <b>"._ORDERVIDS.":</b><br />\n";
   echo "      <select name=\"orderby\">\n";
   echo "        <option value=\"0\" ".$selected1[0].">"._NEWEST."</option>\n";
   echo "        <option value=\"1\" ".$selected1[1].">"._OLDEST."</option>\n";
   echo "        <option value=\"2\" ".$selected1[2].">"._HIGHESTR."</option>\n";
   echo "        <option value=\"3\" ".$selected1[3].">"._MOSTVIEW."</option>\n";
   echo "        <option value=\"4\" ".$selected1[4].">"._ALPHABETICALLY."</option>\n";
   echo "      </select>\n";
   echo "    </td>\n";
   echo "    <td nowrap=\"nowrap\">\n";
   echo "      <b>"._DISPLAYCATEGORY.":</b><br />\n";
   echo "      <select name=\"categoryby\">\n";
   echo "        <option value=\"0\" ".$selected2[0].">"._ALL."</option>\n";
   $result9 = $db->sql_query("SELECT * FROM ".$prefix."_video_stream_categories");
   while($row9 = $db->sql_fetchrow($result9)) {
      $cid2 = intval($row9['id']);
      $ctitle2 = $row9['name'];
      $parentid2 = intval($row9['parent']);
      if ($parentid2!=0) {
         $ctitle2 = getparent($parentid2,$ctitle2);
      }
      echo "        <option value=\"$cid2\" ".$selected2[$cid2].">$ctitle2</option>\n";
   }
   echo "      </select>\n";
   echo "    </td>\n";
   echo "    <td nowrap=\"nowrap\">\n";
   echo "      <br /><input type=\"submit\" name=\"sortvids\" value=\""._SORT."\" />\n";
   echo "    </td><td width=\"100%\" nowrap=\"nowrap\"></tr></table></form>\n";
   
   echo "   <form name=\"search\" method=\"post\" action=\"modules.php?name=Video_Stream&amp;page=search\">\n";
   echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"300\"><tr>\n";

   echo "    <td nowrap=\"nowrap\">\n";
   echo "      <div align=\"center\"><b>"._SEARCHVIDS."</b><br />\n";
   echo "      <input name=\"search\" type=\"text\" size=\"35\" value=\"".$_SESSION['search']."\" /></div>\n";
   echo "    </td>\n";
   echo "    <td nowrap=\"nowrap\">\n";
   echo "      <br /><input type=\"submit\" name=\"searchvid\" value=\""._SEARCH."\" />\n";
   echo "    </td>\n";
   echo "  </tr>\n";
   echo "</table><br /></form>\n";
   unset($selected1);
   unset($selected2);
}

// Get 10 random vids
function tenrandvids($id) {
   global $db, $prefix, $d;
   $result = $db->sql_query("SELECT * FROM ".$prefix."_video_stream WHERE id!='".$id."' AND request=0 ORDER BY RAND() LIMIT 10");
   if(($rows = $db->sql_numrows($result)) != 0) {
      echo "<br /><center>\n";
      echo "<table width=\"250\" border=\"0\" cellspacing=\"0\" cellpadding=\"5\">\n";
      echo "  <tr>\n";
      while($row = $db->sql_fetchrow($result)) {
         $image = $row['thumbimg'];
         echo "    <td>\n";
         echo "      <table border=\"2\" cellspacing=\"0\" cellpadding=\"0\">\n";
         echo "        <tr>\n";
         if($image == "") {
            echo "          <td><a href=\"modules.php?name=Video_Stream&amp;page=watch&amp;id=".$row['id']."&amp;d=".$d."\"><img src=\"modules/Video_Stream/images/noimage_sm.gif\" border=\"0\" width=\"50\" height=\"37\" alt=\"".$row['vidname']."\"/></a></td>";
         } else{
            echo "          <td><a href=\"modules.php?name=Video_Stream&amp;page=watch&amp;id=".$row['id']."&amp;d=".$d."\"><img src=\"".$image."\" border=\"0\" width=\"50\" height=\"37\" alt=\"".$row['vidname']."\"/></a></td>";
         }
         echo "        </tr>\n";
         echo "      </table>\n";
         echo "    </td>\n";
      }
      echo "  </tr>\n";
      echo "</table>\n";
      echo "</center>\n";
   }
}

//Stats Function
function stats() {
   global $db, $prefix, $sitename;

   echo "<div align=\"center\"><FONT class=title>".$sitename." "._VIDEOCOLECTION." "._STATISTICS."</FONT></div><br />\n";
   
   $result = $db->sql_query("SELECT * FROM ".$prefix."_video_stream WHERE request=0");
   $totalvids = $db->sql_numrows($result);
   while ($row = $db->sql_fetchrow($result)) {
      $totalviews += $row['views'];
      $totalrates += $row['rates'];
      $totalrating += $row['rating'];
   }
   $result = $db->sql_query("SELECT * FROM ".$prefix."_video_stream_comments");
   $totalcomments = $db->sql_numrows($result);
   
   @$averageviews = $totalviews / $totalvids;
   @$averagecomments = $totalcomments / $totalvids;
   @$averagerating = $totalrating / $totalrates;
      echo "<div align=\"center\">";
   echo ""._WECURRENTHAVE." <b>".$totalvids."</b> "._VS_VIDEOS."<br />\n";
   echo ""._WITHALLVIDSHAD." <b>".$totalviews."</b> "._VS_VIEWS."<br />\n";
   echo ""._ONAVERAGE." <b>".number_format($averageviews, 2)."</b> "._VIEWSPERVID."<br />\n";
   echo ""._INTOTALHAVE." <b>".$totalcomments."</b> "._VS_COMMS."<br />\n";
   echo ""._ONAVERAGE." <b>".number_format($averagecomments, 2)."</b> "._COMMSPERVID."<br />\n";
   echo ""._ALLTOGETHERHAD." <b>".$totalrates."</b> "._VS_RATES."<br />\n";
   echo ""._AVERAGERATEPV." <b>".number_format($averagerating, 2)."</b><br />\n";
echo "</div><br />\n";
}

// Function for subcategories
function getparent($parentid,$title) {
   global $prefix, $db;
   $parentid = intval(trim($parentid));
   $row = $db->sql_fetchrow($db->sql_query("SELECT * FROM ".$prefix."_video_stream_categories where id='$parentid'"));
   $cid = intval($row['id']);
   $ptitle = $row['name'];
   $pparentid = $row['parent'];
   if ($ptitle=="$title") $title=$title;
   elseif ($ptitle!="") $title=$ptitle."/".$title;
   if ($pparentid!=0) {
      $title=getparent($pparentid,$title);
   }
   return $title;
}

// Function to handle updating user points
function userpointsVS($id) {
   global $prefix, $db, $looker;
   // Anon dont get points
   if($looker != "Anonymous") {
      // Get the current users points
      $result = $db->sql_query("SELECT points FROM ".$prefix."_users WHERE username='$looker'");
      $row = $db->sql_fetchrow($result);
      $points = $row['points'];
      // Get points to be given
      $result = $db->sql_query("SELECT points FROM ".$prefix."_video_stream_points WHERE id='$id'");
      $row = $db->sql_fetchrow($result);
      $pointstoadd = $row['points'];
      // Add points together and save to DB
      $points += $pointstoadd;
      $result = $db->sql_query("UPDATE ".$prefix."_users SET points='$points' WHERE username='$looker'");   
   }
}

// Function to handle the page number navigation
function pagesnav($d, $pages) {
   
   $pageB = $d;
   $pageF = $d;
   $countB = 0;
   $content = "";
   
   if ($_GET['page'] == "search") {
      $navlink = "modules.php?name=Video_Stream&page=search";
   } else {
      $navlink = "modules.php?name=Video_Stream";
   }
   
   while (($countB != 3) && ($pageB != 1)) {
      $countB += 1;
      $pageB -= 1;
      $content = "<a href=\"".$navlink."&amp;d=$pageB\">$pageB</a> ".$content."";
   }
   
   $content = "".$content." <a href=\"".$navlink."&amp;d=$d\">[$d]</a>";
   
   $count2 = 3;
   $remainder = 3 - $countB;
   $count2 += $remainder;
   $countF = 0;
   
   while (($countF != $count2) && ($pageF != $pages)) {
      $countF += 1;
      $pageF += 1;
      $content = "".$content." <a href=\"".$navlink."&amp;d=$pageF\">$pageF</a>";
   }
   echo "      ".$content."\n";
}

// Function for the video image plus plugin image
function videoimageplugin($id, $image, $plugin, $d, $vidname) {
   global $vs_plugins;
   
   // Video image find
   if(image == "") {
      $image = "<img style=\"position: absolute; top: 0; right: 0; z-index: 1\" src=\"modules/Video_Stream/images/noimage.gif\" border=\"0\" width=\"175\" height=\"150\" alt=\"".$vidname."\">";
   } else{
      $image = "<img style=\"position: absolute; top: 0; right: 0; z-index: 1\" src=\"".$image."\" border=\"0\" width=\"175\" height=\"150\" alt=\"".$vidname."\">";
   }
   // Plugin image find
   $plugin_info = explode('::', $vs_plugins[$plugin]);
   if($plugin_info[2] == "") {
      $plugin = "";
   } else {
      $plugin = "<img style=\"position: absolute; top: 0; right: 0; z-index: 2\" src=\"".$plugin_info[2]."\" border=\"0\" alt=\"".$plugin_info[0]."\">";
   }
   // Final Output
   echo "          <td><div style=\"position: relative; width: 175px; height: 150;\"><a href=\"modules.php?name=Video_Stream&amp;page=watch&amp;id=".$id."&amp;d=".$d."\">".$image . $plugin."</a></div></td>\n";
}

// Function for the adult discalimer system and registered only members
function adultcategory($id) {
   global $db, $prefix, $disclaimersigned, $looker, $regcatanon;
   $result = $db->sql_query("SELECT category FROM ".$prefix."_video_stream WHERE id='$id' LIMIT 1");
   $row = $db->sql_fetchrow($result);
   $category = $row['category'];
   $result = $db->sql_query("SELECT * FROM ".$prefix."_video_stream_categories WHERE id='$category' LIMIT 1");
   $row = $db->sql_fetchrow($result);
   $parent = $row['parent'];
   $adult = $row['adult'];
   $permission = $row['permission'];
   // Find parent category
   while ($parent != 0) {
      $result = $db->sql_query("SELECT * FROM ".$prefix."_video_stream_categories WHERE id='$parent' LIMIT 1");
      $row = $db->sql_fetchrow($result);
      $parent = $row['parent'];
      $adult = $row['adult'];
      $permission = $row['permission'];
   }
   // If adult = 1 then do checking
   if(($adult == 1) && ($disclaimersigned != 1)) {
      $returnurl = base64_encode($_SERVER['QUERY_STRING']);
      header("Location: modules.php?name=Video_Stream&page=disclaimer&rurl=".$returnurl."");
      die();
   }
   // If permission = 1 then do checking
   if(($permission == 1) && ($looker == "Anonymous")) {
      $regcatanon = 1;   
   }
}
?>
 
Dawg







PostPosted: Sun Jun 21, 2009 11:02 pm Reply with quote

Couple of "Notes"....

I use opentable3 for my stuff....You will need to change to opentable....

I also have a couple of blocks that I made if you ened them.

Dawg
 
Unit1







PostPosted: Mon Jun 22, 2009 11:08 am Reply with quote

sexycoder wrote:
Very Happy I guess you are jelous. In my opinion they have been working a lot there and I heard from another user they are giving a very nice support. They are very good testers, created many modules and fixed secutity issues. I remember very good pcnuke.com which used to get files from others modify them and make their own copyright.

Thief is the person who take your money and goes away. This people dont steal anything. They are there. Testing, working, creating new stuff.

I know Hammer from pcnuke. This guy took credit from Idiot Guide module and put his own copyright so I dont understand why you say they are stealing. Stealing are people who goes away with your money and dont give the right support. I dont know who you are but maybe you are friend from hammer I guess from pcnuke. I dont see any bad reason to call thieves to them. This is my opinion.


Sexycoder
I am not a friend at all of this guy hammer and no it has nothing to do with jealousy at all. I have nothing to gain from this guy hammer or anyone else I am just trying to help others.

My reply to the post was because I come here because this community of people are here looking for help in one way or another and one of the big part of that help here is trying to stop people from hacking their sites. When I see someone sending someone to a person’s site that in my eyes is a thief, cracker, hacker, and is using cracked version of a free software for profit for support then yes I will let others know what I see as they may not of know this . And I hope that I can help them before the send in any money and personal information to this person. Let alone let him into their computers.

If you take a few moments to look at his info on the net he is still joining cracker, hacker, and warez sites in April 2009. This person who also is using the name of system32 on his site has proven by his own actions and not by my words that he is a thief. Please take the time to investigate him on your own before you say he is not stealing anything when clearly his is.

I could put up many sites that he has been on thanking others for stolen programs he has gotten from them. But I will use his own site for one example of him asking for a fee for free software that has been cracked for him to help other for support from him

http://www.bestbuildpc.net/modules.php?name=Forums&file=viewtopic&t=531

He has even been banned by some of the other cracking sites he was on LOL now that is really bad having other thief’s banning him.

We are all here to help educate others so that they might not become victims of some unsavory people like him. So I say again to everyone DO NOT give any information, money, let him remote your system or give him the right time of day to him.

Have a safe day my friend
 
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Mon Jun 22, 2009 6:31 pm Reply with quote

I have moved some posts from here but the topic will remain locked because it's already been continued at http://www.ravenphpscripts.com/postt17816.html
 
View user's profile Send private message
Display posts from previous:       
Post new topic   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> Converting/Creating Modules

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©