";
+ $data['tpl']->assign("NEW_MEMBERS",$newMembers);
+
+
+
+
+ /* Parse and print */
+ $data[tpl]->parse(BODY, array("body"));
+ $data[tpl]->parse(INDEX, array("index"));
+ $data[tpl]->FastPrint("INDEX");
+?>
diff --git a/docroot/index.php b/docroot/index.php
index 700b869..e5cc007 100644
--- a/docroot/index.php
+++ b/docroot/index.php
@@ -14,7 +14,7 @@
$data['tpl']->assign("CVID","1738");
- $query = "SELECT vid,artist,title,thumb FROM videos ORDER BY vid DESC LIMIT 0,3";
+ $query = "SELECT vid,artist,title,thumb FROM videos WHERE status = 0 ORDER BY vid DESC LIMIT 0,3";
$res = mysql_query($query);
//$newVids = "
";
diff --git a/docroot/mass.php b/docroot/mass.php
index 95d4aa2..c89ce58 100644
--- a/docroot/mass.php
+++ b/docroot/mass.php
@@ -3,11 +3,11 @@
ini_set('include_path',"/usr/web/sites/tuve.tv/include/");
include("site.inc");
- $query = "SELECT firstname,lastname,email,active FROM users WHERE active = 1 AND email like 'cwolsen@domainatlantic.com'";
+ $query = "SELECT firstname,lastname,email,active FROM users WHERE active = 1";// AND email like 'cwolsen@domainatlantic.com'";
$res = mysql_query($query);
- $subject = "Thank You";
+ $subject = "TUv� News Update, May 2nd 2008";
for ($i = 0;$i < mysql_num_rows($res);$i++) {
$fName = mysql_result($res,$i,'firstname');
@@ -15,8 +15,7 @@
$email = mysql_result($res,$i,'email');
$active = mysql_result($res,$i,'active');
- $message = "$fName,
We just wanted to thank everyone for their support yesterday. We realize that we had some technical difficulties due to internet connectivity yesturday. Either way TUv� was a hit!!
We couldn't have done this without our members.
Thanks again,
The TUv� Team
\n";
-
+ $message = "Dear $fName,
Before we tell you about all the wonderful things happening with TUv�, we first want to thank you for your support and loyalty throughout our development process. We understand that there have been times where it has been a bit difficult to use TUv�, but you have stuck by us and we greatly appreciate that. Thank you!
Starting May 15th we're going to be running our first incentive program. This will be your chance to earn a FREE webcam, that's right FREE webcam. These webcams are very stylish and full of features such as video overlays and night vision lights. You will be receiving an update early next week, however it's quite simple all you have to do is refer 10 of your friends and have them set up their profile. Once all ten registrations are complete the webcam is yours.
Over the past month we've had our developers locked up in a very small room with nothing but their workstations and the pizza and beer we slipped under the door. In that time they have managed to add several new features to the site. These features are outlined below.
E-Mail System - To get into your e-mail just click the \"My Email\" link at the top of your TUv� page. This will open up the e-mail interface which will allow for you to read your mail, send mail, replay to mail and so on. Now to alleviate some confuse when composing new mails you can not type in a user name. As we try to take every effort to keep TUv� secure and rid of spam your to field is a list automatically populated with your buddies, this means that you can send mail to anyone on your buddies list on the Tuve network
\n
Live Broadcasting - To start a broadcast all you have to is click the \"Broadcast\" link at the top of your TUv� page. This will open up the broadcasting interface. From here you can choose to do things such as picture in picture or full screen as well as choose to record your broadcast for future reference.
\n
Widgets - We now have a built in widget system. This system allows for us as well as third party developers to build applications which can fully interact with the TUv� network. If you click the \"Widgets\" link at the top of your TUv� page you can use some of the widgets which we have provided for you. Some of the widgets provide are a CNN news reader, Paint program and a real-time multi-user white board (this rocks!).
\n
Buddy List - Now you have an easy way to see who you're buddies are, add new ones and even delete some old ones. Click the \"My Buddies\" link at the top of your TUv� page to open this interface.
\n
For your convenience under there Control Center we have provided a feedback tab. Please feel free to use it as often as you want. We love to hear from you with all of your suggestions, comments, and problem reports. Your feedback is sent instantly to our staff and gets reviewed in a timely manor.
For those of you who haven't had a chance yet, when you have a free moment please login and set up your profile. It's simple and will help enhance your TUv� experience. All you need to do is click the .My Profile. link at the top of your TUv� page. You can upload a photo or choose from one of our provided avatars, you can set up your location, type in a caption even put in some information about you.
The TUv� Team support@tuve.tv
\n";
send_mail("$fName $lName <$email>",$message,$subject,"support@tuve.tv","TUve Support");
}
diff --git a/docroot/people.php b/docroot/people.php
index 59ae61e..e447417 100644
--- a/docroot/people.php
+++ b/docroot/people.php
@@ -48,28 +48,10 @@
$data['tpl']->assign("SKEY",$data['skey']);
- $query = "SELECT uid,username,main_image,profile_image,caption,city,state_prov FROM users WHERE active = 1 AND (byear <= $syear AND byear >= $eyear) $gender $skey ORDER BY laston DESC";
-
- $res = mysql_query($query);
-
- $rows = mysql_num_rows($res);
-
- $data['tpl']->assign("TOTAL",$rows);
if (!$data['start'])
$data['start'] = 0;
- if ($data['start'] + 20 < $rows) {
- $end = $data['start'] + 20;
- $data['tpl']->assign("NEXT","/people.php?data[skey]=$data[skey]&data[sage]=$data[sage]&data[eage]=$data[eage]&data[start]=" . $end);
- }
- else {
- $end = $rows;
- $data['tpl']->assign("NEXT","/people.php?data[skey]=$data[skey]&data[sage]=$data[sage]&data[eage]=$data[eage]&data[start]=$data[start]");
- }
-
- $data['tpl']->assign("START",$data['start'] + 1);
- $data['tpl']->assign("END",$end);
if ($data['start'] - 20 >= 0)
$data['tpl']->assign("PREV","/people.php?data[skey]=$data[skey]&data[sage]=$data[sage]&data[eage]=$data[eage]&data[start]=" . ($data['start'] - 20));
@@ -78,7 +60,30 @@
$data[tpl]->define(array("row"=>"people-row.html"));
- for ($i = $data['start'];$i < $end;$i++) {
+ $end = $data['start'] + 20;
+
+ $data['tpl']->assign("END",$end);
+
+ $query = "SELECT SQL_CALC_FOUND_ROWS uid,username,main_image,profile_image,caption,city,state_prov FROM users WHERE active = 1 AND (byear <= $syear AND byear >= $eyear) $gender $skey ORDER BY laston DESC LIMIT $data[start],$end ";
+
+ $res = mysql_query($query);
+
+ $rows = mysql_num_rows($res);
+
+ $trows = mysql_result(mysql_query("SELECT FOUND_ROWS()"),0,'FOUND_ROWS()');
+
+ if ($data['start'] + 20 < $trows) {
+ $data['tpl']->assign("NEXT","/people.php?data[skey]=$data[skey]&data[sage]=$data[sage]&data[eage]=$data[eage]&data[start]=" . $end);
+ }
+ else {
+ $data['tpl']->assign("NEXT","/people.php?data[skey]=$data[skey]&data[sage]=$data[sage]&data[eage]=$data[eage]&data[start]=$data[start]");
+ }
+ $data['tpl']->assign("START",$data['start'] + 1);
+
+
+ $data['tpl']->assign("TOTAL",$trows);
+
+ for ($i = 0;$i < $rows;$i++) {
$uid = mysql_result($res,$i,'uid');
/* Set Profile Image */
diff --git a/docroot/profile.php b/docroot/profile.php
index 98a355f..c8bee28 100644
--- a/docroot/profile.php
+++ b/docroot/profile.php
@@ -105,7 +105,7 @@
else
$data['tpl']->assign("ONLINE","Currently Offline");
- $query = "SELECT vid,artist,title,thumb FROM videos WHERE oid = $uid ORDER BY vid DESC";
+ $query = "SELECT vid,artist,title,thumb FROM videos WHERE oid = $uid AND status = 0 ORDER BY vid DESC";
$result = mysql_query($query);
$rows = mysql_numrows($result);
diff --git a/docroot/register.php b/docroot/register.php
index a0f9959..7df28cb 100644
--- a/docroot/register.php
+++ b/docroot/register.php
@@ -54,15 +54,24 @@
$pImage = 2;
else
$pImage = 3;
-
- $query = "INSERT INTO users (firstname,lastname,postal_code,country,bmonth,bday,byear,email,username,password,gid,active,gender,profile_image) VALUES(\"$data[firstname]\",\"$data[lastname]\",\"$data[postal_code]\",\"$data[country]\",$data[bmonth],$data[bday],$data[byear],\"$data[email1]\",\"$data[username]\",\"$data[password1]\",3,$active,$data[gender],$pImage)";
+
+ $query = "SELECT state,city FROM zipcodes WHERE zip_code = $data[postal_code]";
+ $res = mysql_query($query);
+ if (mysql_numrows($res) > 0) {
+ $city = mysql_result($res,0,'city');
+ $state = mysql_result($res,0,'state');
+ $query = "INSERT INTO users (firstname,lastname,postal_code,country,bmonth,bday,byear,email,username,password,gid,active,gender,profile_image,city,state_prov) VALUES(\"$data[firstname]\",\"$data[lastname]\",\"$data[postal_code]\",\"$data[country]\",$data[bmonth],$data[bday],$data[byear],\"$data[email1]\",\"$data[username]\",\"$data[password1]\",3,$active,$data[gender],$pImage,'$city','$state')";
+ }
+ else
+ $query = "INSERT INTO users (firstname,lastname,postal_code,country,bmonth,bday,byear,email,username,password,gid,active,gender,profile_image) VALUES(\"$data[firstname]\",\"$data[lastname]\",\"$data[postal_code]\",\"$data[country]\",$data[bmonth],$data[bday],$data[byear],\"$data[email1]\",\"$data[username]\",\"$data[password1]\",3,$active,$data[gender],$pImage)";
+
mysql_query($query);
$message = "$data[firstname],
","New Registration","support@tuve.tv","TUve Support");
}
else {
$data['tpl']->define(array(body=>"/register.html"));
@@ -119,9 +128,9 @@
}
$data['tpl']->assign("COUNTRY",$country);
- if ($data['gender'] == 1)
+ if ($data['gender'] == 2)
$data['tpl']->assign("GENDER","");
- else if ($data['gender'] == 2)
+ else if ($data['gender'] == 1)
$data['tpl']->assign("GENDER","");
else
$data['tpl']->assign("GENDER","\n\n\n");
diff --git a/docroot/search.php b/docroot/search.php
index 8ef5e2e..c953f65 100644
--- a/docroot/search.php
+++ b/docroot/search.php
@@ -19,6 +19,7 @@
}
$data['tpl']->assign("SEARCH",$skey);
+/*
$gTypes = array('NA','Male','Female');
if ($data['stype'] == "people") {
@@ -40,10 +41,11 @@
$data['tpl']->assign("SROWS",$srows);
}
else if ($data['stype'] == "video") {
+*/
if ($data['rating'])
- $query = "SELECT vid,thumb,artist,title,length,count,username FROM videos v INNER JOIN users u ON v.oid = u.uid WHERE artist LIKE '%$skey%' OR title LIKE '%$skey%' AND rating <= $data[rating] ORDER BY artist,title";
+ $query = "SELECT vid,thumb,artist,title,length,count,username FROM videos v INNER JOIN users u ON v.oid = u.uid WHERE artist LIKE '%$skey%' OR title LIKE '%$skey%' AND rating <= $data[rating] ORDER BY artist,title LIMIT 0,40";
else
- $query = "SELECT vid,thumb,artist,title,length,count,username FROM videos v INNER JOIN users u ON v.oid = u.uid WHERE artist LIKE '%$skey%' OR title LIKE '%$skey%' AND rating < 4 ORDER BY artist,title";
+ $query = "SELECT vid,thumb,artist,title,length,count,username FROM videos v INNER JOIN users u ON v.oid = u.uid WHERE artist LIKE '%$skey%' OR title LIKE '%$skey%' AND rating < 4 ORDER BY artist,title LIMIT 0,40";
$res = mysql_Query($query);
for ($i = 0;$i < mysql_numrows($res);$i++) {
@@ -68,7 +70,7 @@
$data['tpl']->assign("TITLE",mysql_result($res,$i,'title'));
$data['tpl']->parse("SROWS",".vs-rows");
}
- }
+// }
/* Parse and print */
$data[tpl]->parse(BODY, array("body"));
diff --git a/docroot/videos.php b/docroot/videos.php
index ef768c3..a42d033 100644
--- a/docroot/videos.php
+++ b/docroot/videos.php
@@ -50,13 +50,15 @@
$data['tpl']->assign("SKEY",$data['skey']);
- $query = "SELECT vid,artist,title,thumb,count,length,username FROM videos v INNER JOIN users u ON v.oid = u.uid WHERE mType = 1 $skey AND rating <= 3 ORDER BY added DESC";
+ $query = "SELECT SQL_CALC_FOUND_ROWS vid,artist,title,thumb,count,length,username FROM videos v INNER JOIN users u ON v.oid = u.uid WHERE mType = 1 $skey AND rating <= 3 AND status = 0 ORDER BY added DESC LIMIT 0,20";
$res = mysql_query($query);
$rows = mysql_num_rows($res);
- $data['tpl']->assign("TOTAL",$rows);
+ $trows = mysql_result(mysql_query("SELECT FOUND_ROWS()"),0,'FOUND_ROWS()');
+
+ $data['tpl']->assign("TOTAL",$trows);
if ($rows > 40) {
$rows = 40;