Jump to content

elementz

Members
  • Posts

    36
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

elementz's Achievements

Member

Member (2/5)

0

Reputation

  1. <?php /*************************************************************************** * page_header.php * ------------------- * begin : Saturday, Feb 13, 2001 * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * * $Id: page_header.php,v 1.106.2.25 2005/10/30 15:17:14 acydburn Exp $ * * ***************************************************************************/ /*************************************************************************** * * 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, or * (at your option) any later version. * ***************************************************************************/ if ( !defined('IN_PHPBB') ) { die("Hacking attempt"); } define('HEADER_INC', TRUE); $timeout = 1; $pvpgn = array( 'check' => true, // Should we check the status of the PvPGN server? (true or false) 'ip' => '127.0.0.1', // IP of the PvPGN server 'port' => 6112, // Port of the PvPGN server ); $output = ''; if ($pvpgn['check']) { if ($fp = @fsockopen($pvpgn['ip'], $pvpgn['port'], $errno, $errstr, $timeout)) { fclose($fp); $output .= "<p>\n"; $output .= "Diablo realm is <font color="#00FF00">online</font>\n"; $output .= "</p>\n"; } else { $output .= "<p>\n"; $output .= "Diablo realm is <font color="#FF0000">offline</font>\n"; $output .= "</p>\n"; } } test
  2. Yah remember now, but now I get this :(. [b]Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/elementz/public_html/create.php on line 36 Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/elementz/public_html/create.php on line 105 Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/elementz/public_html/create.php on line 175[/b]
  3. [code]<? // Admin username and password to reach // the show user stats found at // admin.php. $auser = $apass = // Your free hosting site's domain name. // Don't include the www. or http://. $udomain = yourdomain.com // Please don't change this unless you // know what you are doing. $host = localhost // Your WHM username $user = username // Your WHM access hash. Look at google // for what this means. $accesshash = // The plan name in WHM that you want // to give for free hosting. // Normally this is your whm username // then _ then the plan found in WHM. $acctplan = username_plan // Your email, this will be used as // a reply for your hosting users. $aemail = youremail@yourdomain.com // Your name, this will just be in // the email sent to your users. $name = Luke // The nameservers for your domain. // These will be used for users // who register with their own // domain. $ns1 = ns1.yourdomain.com $ns2 = ns2.yourdomain.com ?>[/code] This is my config code.
  4. Any forum or comment systems tutorials around? If so then please link them. Thankyou, Luke
  5. [quote author=hackerkts link=topic=101649.msg402431#msg402431 date=1153740371] Example: [code]SELECT * FROM members ORDER BY id DESC LIMIT 10[/code] [/quote] Does that get the 10 most newest members? also how do I get them by top ten points, say the points row is called points, how do I get the top ten members with the highest points?
  6. Now I get: [b]Parse error: syntax error, unexpected T_VARIABLE in /home/elementz/public_html/config.php on line 7[/b]
  7. [quote author=Orio link=topic=101645.msg402426#msg402426 date=1153739605] In create.php, change this: $edmn = $domain To: $edmn = $domain[b];[/b] Orio. [/quote] Will the rest work now?
  8. How do I show the newest ten table rows added to a MySQL database so I can show the 10 newest signed members that have signed up. Also how do I show the top ten points scored out of the members when one of the table rows is points. Please help me :D Thankyou, Luke
  9. This is new.php: [code]<html> <head> <title>New Account :: Index</title> <link rel="stylesheet" type="text/css" href="sheet.css" /> </head> <body> <table align="center" width="600" bgcolor="#41FBFD" border="2" bordercolor="#0113FC"> <form action="create.php" method="POST"> <tr align="center"> <td width="50%"> <font size="4"><b>Email:</b><br>Please enter a real email address.</font> </td> <td width="50%"> <input type="text" name="email" class="form"> </td> </tr> <tr align="center"> <td width="50%"> <font size="4"><b>Domain:</b><br>Please don't include the http:// or www., For subdomain please enter the domain aspect i.e. yourname would be entered for yourname.<?php echo $udomain ?>.</font> </td> <td width="50%"> <input type="text" name="dmn" class="form"> </td> </tr> <tr align="center"> <td width="50%"> <font size="4"><b>&nbsp;</b></font> </td> <td width="50%"> <select name="dmntype" class="form">   <option value ="subd">SubDomain</option>   <option value ="dom">Domain</option> </select> </td> </tr> <tr align="center"> <td width="50%"> <font size="4"><b>Username:</b><br>Maximum of 8 letters, please only use letters and numbers.</font> </td> <td width="50%"> <input type="text" name="user" class="form"> </td> </tr> <tr align="center"> <td colspan="2"> <input type="submit" name="Submit" value="Create" class="form"> </td> </tr> </form> </table> </body> </html>[/code] And this is create.php: [code]<? include("config.php"); include("connect.php"); require '/usr/local/cpanel/Cpanel/Accounting.php.inc'; $email=$_POST['email']; $domain=$_POST['dmn']; $user=$_POST['user']; $dmntype = $_POST['dmntype']; switch($var){ case "subd" : $edmn= '$domain.$udomain'; break; case "dom" : $edmn= '$domain'; break; }   function randomkeys($length)   {   $pattern = "1234567890abcdefghijklmnopqrstuvwxyz";   for($i=0;$i<$length;$i++)   {     $key .= $pattern{rand(0,35)};   }   return $key;   } $pass = randomkeys(8); $sql="SELECT * FROM `email` WHERE email='$email'"; $result=mysql_query($sql); if(mysql_num_rows($result)==0){   } else{   ?> <html> <head> <title>New Account :: Index</title> <link rel="stylesheet" type="text/css" href="sheet.css" /> </head> <body>   <table align="center" width="600" bgcolor="#41FBFD" border="2" bordercolor="#0113FC"> <form action="create.php" method="POST"> <tr align="center"> <td width="50%"> <font size="4"><b>Email:</b><br>Please enter a real email address.</font><br> <font size="3" color="red">The email <?php echo $email ?> already exists</font> </td> <td width="50%"> <input type="text" name="email" class="form"> </td> </tr> <tr align="center"> <td width="50%"> <font size="4"><b>Domain:</b><br>Please don't include the http:// or www., For subdomain please enter the domain aspect i.e. yourname would be entered for yourname.<?php echo $udomain ?>.</font> </td> <td width="50%"> <input type="text" name="dmn" class="form"> </td> </tr> <tr align="center"> <td width="50%"> <font size="4"><b>&nbsp;</b></font> </td> <td width="50%"> <select name="dmntype" class="form">   <option value ="subd">SubDomain</option>   <option value ="dom">Domain</option> </select> </td> </tr> <tr align="center"> <td width="50%"> <font size="4"><b>Username:</b><br>Maximum of 8 letters, please only use letters and numbers.</font> </td> <td width="50%"> <input type="text" name="user" class="form"> </td> </tr> <tr align="center"> <td colspan="2"> <input type="submit" name="Submit" value="Create" class="form"> </td> </tr> </form> </table> </body> </html> <? exit; }; $sql="SELECT * FROM `domain` WHERE domain='$edmn'"; $result=mysql_query($sql); if(mysql_num_rows($result)==0){ } else{   ?>     <html> <head> <title>New Account :: Index</title> <link rel="stylesheet" type="text/css" href="sheet.css" /> </head> <body>   <table align="center" width="600" bgcolor="#41FBFD" border="2" bordercolor="#0113FC"> <form action="create.php" method="POST"> <tr align="center"> <td width="50%"> <font size="4"><b>Email:</b><br>Please enter a real email address.</font> </td> <td width="50%"> <input type="text" name="email" class="form"> </td> </tr> <tr align="center"> <td width="50%"> <font size="4"><b>Domain:</b><br>Please don't include the http:// or www., For subdomain please enter the domain aspect i.e. yourname would be entered for yourname.<?php echo $udomain ?>.</font><br> <font size="3" color="red">The domain <?php echo $edmn ?> already exists</font> </td> <td width="50%"> <input type="text" name="dmn" class="form"> </td> </tr> <tr align="center"> <td width="50%"> <font size="4"><b>&nbsp;</b></font> </td> <td width="50%"> <select name="dmntype" class="form">   <option value ="subd">SubDomain</option>   <option value ="dom">Domain</option> </select> </td> </tr> <tr align="center"> <td width="50%"> <font size="4"><b>Username:</b><br>Maximum of 8 letters, please only use letters and numbers.</font> </td> <td width="50%"> <input type="text" name="user" class="form"> </td> </tr> <tr align="center"> <td colspan="2"> <input type="submit" name="Submit" value="Create" class="form"> </td> </tr> </form> </table> </body> </html> <? exit; }; $sql="SELECT * FROM `user` WHERE user='$user'"; $result=mysql_query($sql); if(mysql_num_rows($result)==0){ } else{   ?>     <html> <head> <title>New Account :: Index</title> <link rel="stylesheet" type="text/css" href="sheet.css" /> </head> <body>   <table align="center" width="600" bgcolor="#41FBFD" border="2" bordercolor="#0113FC"> <form action="create.php" method="POST"> <tr align="center"> <td width="50%"> <font size="4"><b>Email:</b><br>Please enter a real email address.</font> </td> <td width="50%"> <input type="text" name="email" class="form"> </td> </tr> <tr align="center"> <td width="50%"> <font size="4"><b>Domain:</b><br>Please don't include the http:// or www., For subdomain please enter the domain aspect i.e. yourname would be entered for yourname.<?php echo $udomain ?>.</font><br> </td> <td width="50%"> <input type="text" name="dmn" class="form"> </td> </tr> <tr align="center"> <td width="50%"> <font size="4"><b>&nbsp;</b></font> </td> <td width="50%"> <select name="dmntype" class="form">   <option value ="subd">SubDomain</option>   <option value ="dom">Domain</option> </select> </td> </tr> <tr align="center"> <td width="50%"> <font size="4"><b>Username:</b><br>Maximum of 8 letters, please only use letters and numbers.</font><br> <font size="3" color="red">The username <?php echo $user ?> already exists</font> </td> <td width="50%"> <input type="text" name="user" class="form"> </td> </tr> <tr align="center"> <td colspan="2"> <input type="submit" name="Submit" value="Create" class="form"> </td> </tr> </form> </table> </body> </html> <? exit; }; $edmn = $domain $query = INSERT INTO contacts VALUES ('','$email','$domain','$user'); createacct ($host,$user,$accesshash,0,$domain,$user,$pass,$acctplan); $subject = 'New Free Hosting Account At $udomain.'; $message = 'Welcome to $udomain \n\n Your free hosting account has been automatically created. \n\n Your account info is the following: \n\n Username: $user \n Password: $pass \n Domain/Subdomain: $domain \n Cpanel: $domain/cpanel \n\n If you have your own domain then set the nameservers to the following: \n\n $ns1 \n $ns2 \n\n Thankyou for choosing us as your free host, \n $name'; $headers = 'From: $aemail' . "\r\n" .           'Reply-To: $aemail' . "\r\n" . mail($email, $subject, $message, $headers); mysql_query($query); mysql_close(); ?>[/code] When I try to create a new account via new.php then onto create.php it comes up with the error: [b]Parse error: syntax error, unexpected T_VARIABLE in /home/elementz/public_html/create.php on line 244[/b] Can you please fix that and check through the script to see if all is well? Thankyou, Luke
  10. How would I go about making a live chat between 2 registered users. I am making an RPG site and wanted to know how to allow two users to request a chat with each other and then to actually being able to chat. I want them to be able to press close image and the connection closes or when the browser is closed, any ideas on how to do this?
  11. [!--quoteo(post=385967:date=Jun 20 2006, 09:33 PM:name=elementz)--][div class=\'quotetop\']QUOTE(elementz @ Jun 20 2006, 09:33 PM) [snapback]385967[/snapback][/div][div class=\'quotemain\'][!--quotec--] also can you do more than 1 mysql search at once like: [code][/code] $sql="SELECT * FROM `emails` WHERE email='$email'"; "SELECT * FROM `domain` WHERE email='$edmn'"; "SELECT * FROM `user` WHERE email='$user'"; $result=mysql_query($sql); if(mysql_num_rows($result)==0){ } else{ }; [/quote] ??
  12. also can you do more than 1 mysql search at once like: [code][/code] $sql="SELECT * FROM `emails` WHERE email='$email'"; "SELECT * FROM `domain` WHERE email='$edmn'"; "SELECT * FROM `user` WHERE email='$user'"; $result=mysql_query($sql); if(mysql_num_rows($result)==0){ } else{ };
  13. can i just leave the if part blank and the else part an error in it. will it continue the script if I leave the if part blank?
×
×
  • 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.