• Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About ziptrx

  1. Php Sql Help

    I was given a script, that needed some modification made to it, and I am in need of some assistance. I am having difficulties inserting some data into a table in the database. I am also hoping someone could clarify some of the code for me. Here is the code for the sign up page, and although it is broken with code tags, the code is all in order. <? session_start(); $page="signup"; include"header.php"; include"mysql.php"; include"config.php"; print" <h2>Creating an account</h2> <p class=\"post-by\">on $sitename</p> "; if($_SESSION['loggedin']==1) { print"<center>You are already signed up, and logged in.</center>"; } else { if($_POST['username']) { if($_POST['promo'] == "Your Promo Code Here") { $sm+=100; } $referal=$_POST['ref']; $username=$_POST['username']; $email=$_POST['email']; $paypal=$_POST['paypal']; $username=str_replace(array("<", ">"), array("&lt;", "&gt;"), $username); $email=str_replace(array("<", ">"), array("&lt;", "&gt;"), $email); $paypal=str_replace(array("<", ">"), array("&lt;", "&gt;"), $paypal); $referal=str_replace(array("<", ">"), array("&lt;", "&gt;"), $referal); $q=mysql_query("SELECT * FROM users WHERE username='{$username}'",$c); What does the above section do exactly? if(mysql_num_rows($q)) { die("<center>Username already in use.</br>Choose another.</center>"); } if('{$username}' == '$referal') { die("<center>You cannot refer yourself.</center>"); } else if($_POST['password'] != $_POST['cpassword']) { die("<center>Your passwords did not match.</br>Please go back and try again.</center>"); } else { $_POST['ref'] = abs((int) $_POST['ref']); $ip = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; $q=mysql_query("SELECT * FROM users WHERE userIP='$ip' OR signupIP='$ip'",$c); if(mysql_num_rows($q)) { die("<center>You are not allowed to create more than one account per IP address.</center></br> <center> If you are using a proxy please disable it and try again.</center></br> <center>We apologize for the inconvenience.</center>"); } if(isset($_POST['ref'])) { $q=mysql_query("SELECT * FROM users WHERE `username`='$referal'",$c); $r=mysql_fetch_array($q); $f=mysql_query("SELECT * FROM users WHERE `username`='$referal'",$c); $gangs=mysql_num_rows($f); Does the above even serve a purpose? Reason I ask, is I can not find $gangs being used anywhere. if(mysql_num_rows($q)==0) { $referal=""; } if(mysql_num_rows($f)!=0) { $tref=mysql_query("SELECT * FROM users WHERE `username`='$referal'",$c); $theref=mysql_fetch_array($tref); mysql_query("UPDATE users SET referrals=referrals+1, current_balance=current_balance+$refbonus, total_earned=total_earned+.50 WHERE id='{$theref['id']}'",$c); } } $time=time(); $emailcheck=md5(rand(100000,999999)); $password=md5($_POST['password']); mysql_query("INSERT INTO users VALUES ('','{$username}','$password','0','{$email}','$emailcheck','','{$paypal}','','$ip','$ip','$time','$signupbonus','$signupbonus','0','0','$referal','');",$c) or die(mysql_error()); I know the above section is for inserting the data into the USERS table. I am trying to get $referal to also be inserted into the REFERRERS table, which has the following field; username. $i=mysql_insert_id($c); What does the above do? I can not find $i being used anywhere. mail( $email, "Account Registered on $sitename", <remove email part to shorten post> print" <br><br><br><center>Your account has been successfully created.<br>Thank you for joining $sitename<br><br> &gt; <a href=\"index.php\">Back To $sitename</a></center> "; } } else { print" <center> <form action=\"signup.php\" method=\"post\"> <i>Username</i><br><input type=\"text\" name=\"username\"><br> <i>E-Mail</i><br><input type=\"text\" name=\"email\"><br> <i>Password</i><br><input type=\"password\" name=\"password\"><br> <i>Confirm Password</i><br><input type=\"password\" name=\"cpassword\"><br> <i>Paypal Email</i><br><input type=\"text\" name=\"paypal\"><br> <i>Referrer</i>: $ref<input type=\"hidden\" name=\"ref\" value=\"$ref\"><br><br> <input type=\"submit\" class=\"button\" value=\"Sign Up\"></form><br /> </center> "; } } include"side.php"; include"footer.php"; ?> The purpose for entering the users.referrer to referrer.username is there will be a script that when a member completes a project, his/her referrer will be given a credit. I figure that I would need the referrer table, for this, or could is possible to do a users.referrer = users.username? I could be wrong on all this... Thanks in advance for any help. If any additional info is needed, please let me know. signup.php
  2. Nice program, but few bugs. The systray icon never appears for me, even with the option enabled. The tooltip, "Blend is running.....", constantly appears minimizing games. Any way to fix the later? I don't care for the icon.
  3. Sarah Media, frontrow clone

    You need iTunes.
  4. VideoShelf RC1

    Cool. I wasn't referring to it loading to the systray, but the ability to be minimized to the systray like Winamp has.
  5. VideoShelf RC1

    You may not see the need for the icon, but I know, myself and others do not always like having programs clutter their taskbar or desktop. In the previous version, there was a menu the would display when you right clicked, not on a DVD, that displayed the option to 'Hide'. This would allow the program to minimized to the taskbar, but in my case to the desktop. From there I could close the program without the need for using task manager. So maybe my question should have been more along the lines of "Is it possible to add the 'Hide' feature to the existing menu or the ability to minimize to the systray?"
  6. VideoShelf RC1

    No problem helping out. If you need anymore on other apps, just let me know. Always willing to lend a hand to those who are aimed at the "free world". Keep up the good work. I would use the taskbar, except I don't have one in Litestep. Just a suggestion, but is it possible to add a systray icon with a menu holding 'Quit' on it?
  7. VideoShelf RC1

    Good job on fixing everything I found. Still a couple of things I spotted. 1) Science-Fiction category does not work because in the ini file, it is listed as Sci-Fi. If you change Sci-Fi to Science-Fiction, then the movies appear under the category. 2) Missing the right click menu for exiting or hiding the program. 3) Still doesn't want to quit on its own. Have to use task manager. Other then those things, excellent job!
  8. I may have missed this but when I play a CD with Winamp, it displays the last artist and album that was played. Is it possible to have CAD display an art for CD playing?
  9. Sarah Media, frontrow clone

    I subscribed, but not sure I filled it out correctly.
  10. A few new programs from Four13 Designs

    After I installed Real Alternative, RadioFree is working now. Thank you.
  11. A few new programs from Four13 Designs

    I'm having the same problem on the same exact OS and language. Config File [StationCollection] StationCount=6 StationNameList=Radioio - Eclectic|Radioio - Jam|Triple J|Triple M|Triple R|WXPN - 88.5 FM| StationName0=Radioio - Eclectic StationAddress0= StationName1=Radioio - Jam StationAddress1= StationName2=Triple J StationAddress2= StationName3=Triple M StationAddress3= StationName4=Triple R StationAddress4= StationName5=WXPN - 88.5 FM StationAddress5=
  12. A few new programs from Four13 Designs

    Looks good. Can't wait to check out RadioFree.
  13. DeskPhoto Beta 2

    One thing I have noticed, is that when using TopDesk, DeskPhoto appears when switching applications; even when set to 'Desktop'. Anyway to prevent this from happening? According to the creators of TopDesk, applications only appear in the program if they appear in the taskbar. I use Litestep, therefore I don't use a taskbar, so I can not tell if DeskPhoto appears there or not.
  14. Winamp CD Case RC 1

    I doesn't bother me, since I don't use the notifier but I figured I would point it out. The reason being is the cropping is more than noticable on some, such as Handel 68, 69 and 72. It crops most of the bottom off. See crappy screenshot.
  15. Winamp CD Case RC 1

    Just thought I would point this out, but the cropping for these fonts cut part of the shadowing; Handel: 36, 40, 47, 68, 69, 72, 76 Default: 36, 69, 76 Comic: 30, 36, 40