Jump to content

Zepo.

Members
  • Posts

    306
  • Joined

  • Last visited

    Never

Everything posted by Zepo.

  1. Zepo.

    Emailing

    Also the code still doesnt work, you dont have the email function anywhere in your script... i put it in, and no luck...
  2. Ok XSS completely fixed now, how else would i do that besides ip?
  3. Zepo.

    Emailing

    My server is weird. I never get any php warnings, and instead of getting php errors, i get a 500 error, which had made it very hard to develop on this server.
  4. Zepo.

    Emailing

    Thank you! Well the two functions are in two different files....so i cant do it like that.
  5. www.eliteladders.com/devlopment/ Please report any problems, errors, security issues, ect. please. Any ideas or comment would be greatly appreciated, if you would like to test the admincp them pm me.
  6. Zepo.

    Emailing

    This isnt working for some reason, and im not sure if you can email in loops like this...... Loop $emailq=mysql_query("SELECT name,email FROM teams"); while(list($name,$email)=mysql_fetch_row($emailq)){ $email[toname] ="$name"; $email[toemail] ="$email"; $email[subject] ="$send[subject]"; $email[fromname] ="{$_SESSION['rights']}"; $email[fromemail] ="$config[sitemail]"; $email[replyname] ="$name"; $email[replyemail] ="$email"; $email[body] ="$send[body]"; email($email); $sent.="Sending To $name..........Sent<br />"; } Email Function //E-Mail Function function email($email){ mail("$email[toname] <$email[toemail]>","$email[subject]","$email[body]", "From: $email[fromname] <$email[fromemail]>\nReply-To: $email[replyname] <$email[replyemail]>\nContent-type: text/plain\nX-Mailer: PHP/" . phpversion()); } No errors.
  7. http://eliteladders.com/devlopment/index.php Each news articles header is huge...i cant figure out why...
  8. Hmmm didnt trim it, but it did add and elipsis to the end...
  9. How do i take a variable say $name and trim it down to ohh, say 8 characters. Then have a ... after the name if it's trimmed.
  10. Im not sure if the query is written correctly... //Users Online Block $timeoutseconds = 300; $timestamp = time(); $timeout = $timestamp-$timeoutseconds; $uonline = mysql_num_rows(mysql_query("SELECT id FROM teams WHERE lastupdated>$timeout")); if($uonline == 1){ echo"There is $uonline team online."; }else{ echo"There is $uonline teams online."; } //End Users Online
  11. Forgot in the last code chunk $timeoutseconds ="300";
  12. Ok, now how would i go on to tackle pulling from the database's users last updated within 300 second.... any ideas? I was thinking something like this, but idk how to use inequalities like that... $timestamp = time(); $timeout = $timestamp-$timeoutseconds; $uonline = mysql_num_rows(mysql_query("SELECT teamid FROM teamsonline WHERE lastupdated>$timeout"));
  13. It works now... i just have to do the other parts of the code...thanks.
  14. //Last Active Update if(isset($_COOKIE['user'])){ $timestamp = time(); mysql_query("UPDATE teams SET lastactive='$timestamp' WHERE id='{$_COOKIE['user']}'") or die(mysql_error()); } Is the code The lastactive field is int(15) Doesnt wanna update for some reason... no errors either....weird.
  15. Still no errors..... i think imma come up with a better way for time.... $timestamp = time(); Then updating it with that...then it would be easier to work with later.
  16. mysql_query("UPDATE teams SET lastactive=NOW() WHERE id='{$_COOKIE['user']}'"); That gives no errors, but lastactive is still blank after updating.
  17. I actually like that idea better then the way ive started doing it, it seems more logical and database friendly. I might write a tut on it after im done.
  18. I never used inequalities in a mysql query before so idk why this isnt working... Gives the error Blah...right syntax to use near '' at line 1 $timeoutseconds = 300; $timestamp = time(); $timeout = $timestamp-$timeoutseconds; mysql_query("DELETE FROM teamsonline WHERE timestamp<$timeout") or die(mysql_error());
  19. Theres only about 2 scripts, one using sessions which i dont want to use, and the other one would kill the database... i was just wondering if anyone has their own way of doing it..
  20. Is there any tutorials on this? Liike it will list the users online and the guests and stuff.
  21. roopurt is correct. it was because of the group column. Once i renamed it, it worked. Thanks!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.