• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

One Free Premium Day - HELP ME!

siwy696

New Member
Joined
Jul 28, 2008
Messages
59
Reaction score
0
Location
Poland
Hi, i have problem with give one day premium for free for all new accounts, when i log on new account and i see i have one day of pacc, and when i relog pacc expired... Please help me!
 
I dont understand what u want say me but i add 1 premday in table "accounts" (to default 1) so when i make new account, this account have 1 day of premium but when log this day expired
 
Edit: sorry i need it more its account_create.php:

<?php
/*
Copyright (C) 2007 - 2008 Nicaw

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.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
include ("../include.inc.php");

//retrieve post data
$form = new Form('newaccount');
//check if any data was submited
if ($form->exists()){
//image verification
if ($form->validated()){
//email formating rules
if (AAC::ValidEmail($form->attrs['email'])){

$account = new Account();
do
$account->setAttr('accno', rand(100000,999999));
while ($account->exists());
//set account atrributes
$accno = $account->getAttr('accno');
if ($form->attrs['haslo'] == $form->attrs['potwierdz'] && AAC::ValidPassword($form->attrs['haslo']))
$password = $form->attrs['haslo'];
else
$password = substr(str_shuffle('qwertyuipasdfhjklzxcvbnm123456789'), 0, 6);
$account->setPassword($password);
$account->setAttr('email',$form->attrs['email']);
//create the account
$account->save();

if ($cfg['Email_Validate']){
$body = "Tu sa twoje dane logowania <a href=\"http://$cfg[server_url]/\">$cfg[server_name]</a><br/>
<b>Numer Konta:</b> $accno<br/>
<b>Haslo:</b> $password<br/>
<br/>
Powered by <a href=\"http://nicaw.net/\">Nicaw AAC</a>";
//send the email
require_once("../extensions/class.phpmailer.php");

$mail = new PHPMailer();
$mail->IsSMTP();
$mail->IsHTML(true);
$mail->Host = $cfg['SMTP_Host'];
$mail->Port = $cfg['SMTP_Port'];
$mail->SMTPAuth = $cfg['SMTP_Auth'];
$mail->Username = $cfg['SMTP_User'];
$mail->Password = $cfg['SMTP_Password'];

$mail->From = $cfg['SMTP_From'];
$mail->AddAddress($form->attrs['email']);

$mail->Subject = $cfg['server_name'].' - Login Details';
$mail->Body = $body;

if ($mail->Send()){
//create new message
$msg = new IOBox('message');
$msg->addMsg('Twoje dane logowania zostaly przeslane do '.$form->attrs['email']);
$msg->addClose('Finish');
$msg->show();
}else
$error = "Mailer Error: " . $mail->ErrorInfo;

}else{
//create new message
$msg = new IOBox('message');
$msg->addMsg('Zapisz swoje dane logowania:');
$msg->addInput('Numer Konta','text',$accno,50,true);
$msg->addInput('Haslo','text',$password,50,true);
$msg->addMsg('Mozesz sie teraz zalogowac i zalozyc nowa postac.');
$msg->addClose('Finish');
$msg->show();
$account->logAction('Created');
}
}else{ $error = "Zly adres e-mail";}
}else{ $error = "Zly kod z obrazka";}
if (!empty($error)){
//create new message
$msg = new IOBox('message');
$msg->addMsg($error);
$msg->addReload('<< Cofnij');
$msg->addClose('OK');
$msg->show();
}
}else{
//create new form
$form = new IOBox('newaccount');
$form->target = $_SERVER['PHP_SELF'];
$form->addLabel('Utworz Konto');
$form->addInput('email');
$form->addInput('haslo','password');
$form->addInput('potwierdz','password');
$form->addCaptcha();
$form->addClose('Anuluj');
$form->addSubmit('Dalej >>');
$form->show();
}?>
 
Last edited:
Back
Top