[Release]Reg page for server without sql

01/30/2009 22:01 koio#1
ok here is a reg page for a server with .ini or .acc or ... accounts:
__________________________________________________ ________
how to use?
change
Code:
  define ("AccountFilesPath", "acc\\");
to your server account folder
like
Code:
  define ("AccountFilesPath", "C:\server\acc\\");
to your source-account folder localtion
change at
Code:
  define ("AccountFilesEnding", ".acc");
the .acc to the ending for u account files
__________________________________________________ ________
u can se the page at:
[Only registered and activated users can see links. Click Here To Register...]
__________________________________________________ ________

Code:
reg.php
Code:
<?php // Constants
  define ("MaxNameLength", 32);
  define ("WrongChars", "\r\n"); // Type other Chars, which shouldn't be in the Names, behind \r\n, but before "
  define ("AccountFilesPath", "acc\\");
  define ("AccountFilesEnding", ".acc");
?>

<html>
  <body>
    <h1>Registration</h1>
    
    <?php // New Account?
      If (IsSet($_GET["account"])) {
        // Variables
        $Account = $_GET["account"];
        $AllRight = True;
        
        // Wrong Chars?
        For ($I=0; $I<StrLen(WrongChars); $I++) {
          If (StrPos($Account, SubStr(WrongChars,$I,1))) {
            Echo "<p>Your Name musn't contain the char \"".SubStr(WrongChars,$I,1)."\"</p>";
            $AllRight = False;
          }
        }
        
        // File Exists?
        If (file_exists(AccountFilesPath.$Account.AccountFilesEnding)) {
          Echo "<p>This Account already exists!</p>";
          $AllRight = False;
        }
        
        // All Right?
        If ($AllRight) {
          // File-Data
          $Text  = "[Account]\r\n";
          $Text .= "AccountID=$Account\r\n";
          $Text .= "Password=\r\n";
          $Text .= "LogonType=2\r\n";
          $Text .= "LogonCount=0\r\n";
          $Text .= "Status=0\r\n";
          $Text .= "Charr=\r\n";
          $Text .= "Online=0\r\n";
          
          // Create File
          File_Put_Contents (AccountFilesPath.$Account.AccountFilesEnding, $Text);
          
          // Check File
          if(!file_exists(AccountFilesPath.$Account.AccountFilesEnding)) {
            echo "<p>Error!</p>";
          }
          
          Echo "<p>This Account is created succesfully!</p>";
        }
      }
    ?>
    
    <form action="" type=post>
      <label for="name">Account-Name:</label> <input type=text id="name" name="account" size=20 maxlength=<?php Echo MaxNameLength; ?> /><br>
      <button type=submit>Register</button>
    </form>
    
    <hr />
    <i><small>Echi-hp.de (<a href="http://www.echi-hp.de/" target=blank>http://www.echi-hp.de/</a>) :)</small></i>
  </body>
</html>
__________________________________________________ ________
credits goes to
[Only registered and activated users can see links. Click Here To Register...]
01/30/2009 22:59 zane203#2
nice man, not gonna use it though, no need for it atm.

+ an extra bonus at the preview up front =p, so many people skip that...

keep up the good work.
01/31/2009 09:58 koio#3
thanks
02/01/2009 03:17 kinshi88#4
Very nice
02/01/2009 03:19 hio77#5
very nice :)
02/16/2009 00:29 Rofa300#6
i really was askin about that
04/27/2009 09:35 doku66655#7
Could someone give me a hint how to do that? I don't need the whole guide.
Thanks

// EDIT Please help me I'm waiting for the answer the whole day!
04/27/2009 17:09 Pete1990#8
Yea i dont understand this one bit can someone maybe help me with this reg page?
04/27/2009 21:19 CoAttack#9
you have to first have a LOTF converted into ini source... or a self made ini source
04/27/2009 22:34 doku66655#10
I already have it >< Why should I post here when I don't have LOTF converted to .ini? This release is unclear for me, so maybe someone could help?
04/27/2009 23:43 Pete1990#11
Yea same
how to use?
change
Code:

define ("AccountFilesPath", "acc\\");

to your server account folder
like
Code:

define ("AccountFilesPath", "C:\server\acc\\");

to your source-account folder localtion
change at
Code:

define ("AccountFilesEnding", ".acc");

the .acc to the ending for u account files

Only thing i dont understand
04/28/2009 00:28 CoAttack#12
Quote:
Originally Posted by doku66655 View Post
I already have it >< Why should I post here when I don't have LOTF converted to .ini? This release is unclear for me, so maybe someone could help?
i dont see how its unclear if you had lotf converted to ini you would see where you accounts and characters things are.
05/02/2009 09:04 Panquque#13
Quote:
Originally Posted by Pete1990 View Post
Yea same
how to use?
change
Code:

define ("AccountFilesPath", "acc\\");

to your server account folder
like
Code:

define ("AccountFilesPath", "C:\server\acc\\");

to your source-account folder localtion
change at
Code:

define ("AccountFilesEnding", ".acc");

the .acc to the ending for u account files

Only thing i dont understand
i didnt undertand that either
any help?
05/02/2009 14:42 PeTe Ninja#14
Quote:
Originally Posted by Panquque View Post
i didnt undertand that either
any help?
Ok lets say your accounts on your desktop so for that file path you would put


C:\Documents and Settings\PeTe\Desktop\Source\CoServerProject\bin\d ebug\accounts
05/02/2009 19:45 Panquque#15
Quote:
Originally Posted by PeTe Ninja View Post
Ok lets say your accounts on your desktop so for that file path you would put


C:\Documents and Settings\PeTe\Desktop\Source\CoServerProject\bin\d ebug\accounts
so it would be like

define ("C:\Documents and Settings\PeTe\Desktop\Source\CoServerProject\bin\d ebug\accounts", "acc\\");



define ("C:\Documents and Settings\PeTe\Desktop\Source\CoServerProject\bin\d ebug\accounts", ".acc");

but with my path?