this webengine is a joke , because i buy it with license and i wait him to fixed 4 days:| .
webengine i said me wait 2-3 hours and i wait 4 days=))
Printable View
this webengine is a joke , because i buy it with license and i wait him to fixed 4 days:| .
webengine i said me wait 2-3 hours and i wait 4 days=))
I create the admin account and as I enter the admin panel?
http://i.imgur.com/EeKJ9q5.png
i want this in mucore
Who can make a Module or code for MuCore?
the header guys (: reemp
\img\bgtile.jpg
http://puu.sh/bW4z8/c8ca474596.jpg
//////////// edit
i need online players phpscript plz
http://puu.sh/bWChP/40fb79dece.jpg
Where can i place custom template ?
sorry for stupid question
Hello profit not even fix the error admincp says 404 not found trying to enter, someone help me fix it?
all SQL query is this
Server: Msg 170, Level 15, State 1, Line 9
Line 9: Incorrect syntax near '('.
im using SQL2000
and xampp 1.7.1
and how to install this?
where to paste Files?
tnx
anyone have this site supports with zTeam?
thanks.
Who have custom reset system with stats reset(Count of Reset x Points for all class)?
Ex.
For DW/DK/Elf/Sum = 300 x Resets,
For MG = 350 x Resets,
For DL = 400 x Resets,
For RF = 350 x Resets.
http://i.imgur.com/Oy9J0pW.png
How to Fix This?
Webengine has not live update? need to run cron.bat now and then o be updated?:blink:
Hello friends RZ, this day come to make the following query, apparently the record, it is configured for MD5 mode register, and creating an account, shoot me the error:
[SQL 42000] [odbc 4121] > [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot find either column "dbo" or the user-defined function or aggregate "dbo.fn_md5", or the name is ambiguous. (SQLExecute[4121] at ext\pdo_odbc\odbc_stmt.c:133)
The line in the PHP log is as follows:
As could remove MD5 registry? :?:Quote:
<?php
class common {
public function registerAccount($username,$password,$cpassword,$email) {
global $dB,$dB2;
if(check_value($username) && check_value($password) && check_value($cpassword) && check_value($email)) {
// Filters
if(!Validator::UsernameLength($username)) {
message('error', lang('error_5',true));
return;
}
if(!Validator::AlphaNumeric($username)) {
message('error', lang('error_6',true));
return;
}
if(!Validator::PasswordLength($password)) {
message('error', lang('error_7',true));
return;
}
if($password != $cpassword) {
message('error', lang('error_8',true));
return;
}
if(!Validator::Email($email)) {
message('error', lang('error_9',true));
return;
}
loadModuleConfigs('register');
if(!$this->userExists($username)) {
if(!$this->emailExists($email)) {
if(mconfig('verify_email')) {
if($this->checkUsernameEVS($username)) {
message('error', lang('error_10',true));
return;
}
if($this->checkEmailEVS($email)) {
message('error', lang('error_11',true));
return;
}
$verificationKey = $this->createRegistrationVerification($username,$password,$email);
if(check_value($verificationKey)) {
$register_account = true;
}
} else {
$info = array($username, $password, 'test', '111111111111', '0', '0', '1', $email, date('m/d/Y'), date('m/d/Y'), '2005-01-03', '2005-01-03', '1', md5($username));
$query = "INSERT INTO "._TBL_MI_." (memb___id, memb__pwd, memb_name, sno__numb, bloc_code, ctl1_code, mail_chek, mail_addr, appl_days, modi_days, out__days, true_days, confirmed, activation_id) VALUES ('".$info[0]."', [dbo].[fn_md5]('".$info[1]."','".$info[0]."'), '".$info[2]."', '".$info[3]."', '".$info[4]."', '".$info[5]."', '".$info[6]."', '".$info[7]."', '".$info[8]."', '".$info[9]."', '".$info[10]."', '".$info[11]."', '".$info[12]."', '".$info[13]."')";
if(config('SQL_USE_2_DB',false)) {
$register_account = $dB2->query($query);
} else {
$register_account = $dB->query($query);
}
}
if($register_account) {
if(mconfig('verify_email')) {
$this->sendRegistrationVerificationEmail($username,$email,$verificationKey);
message('success', lang('success_18',true));
} else {
if(mconfig('send_welcome_email')) {
$this->sendWelcomeEmail($username,$email);
}
message('success', lang('success_1',true));
}
redirect(2,'login/',5);
} else {
message('error', lang('error_22',true));
}
} else {
message('error', lang('error_11',true));
}
} else {
message('error', lang('error_10',true));
}
} else {
message('error', lang('error_4',true));
}
}
public function changePasswordProcess($id,$username,$password,$new_password,$confirm_new_password) {
if(check_value($password) && check_value($new_password) && check_value($confirm_new_password)) {
if($this->validateUser($username,$password)) {
if(Validator::PasswordLength($new_password)) {
if($new_password == $confirm_new_password) {
if(!$this->accountOnline($username)) {
// Update Password
if($this->changePassword($id,$username,$new_password)) {
/* success message */
message('success', lang('success_2',true));
/* send email with new password */
if(config('email_system_active',true)) {
$accountData = $this->accountInformation($id);
$email_titles = config('email_titles',true);
$mail = new PHPMailer();
$smtpCONF = gconfig('smtp',true);
if($smtpCONF['active']) {
$mail->IsSMTP();
$mail->SMTPAuth = true;
$mail->Host = $smtpCONF['smtp_host'];
$mail->Port = $smtpCONF['smtp_port'];
$mail->Username = $smtpCONF['smtp_user'];
$mail->Password = $smtpCONF['smtp_pass'];
}
$email_strings = array('{USERNAME}','{NEW_PASSWORD}');
$email_replace = array($username,$new_password);
$email_template = emailTemplate('CHANGE_PASSWORD');
if($email_template) {
$build_template = replaceMultiTextStrings($email_template,$email_strings,$email_replace);
$body = $build_template;
$mail->SetFrom(config('email_send_from',true), config('email_send_from_name',true));
$address = $accountData[_CLMN_EMAIL_];
$mail->AddAddress($address);
$mail->Subject = $email_titles['CHANGE_PASSWORD'];
$mail->MsgHTML($body);
if($mail->Send()) {
/* success message */
message('',lang('success_4',true),'NOTE:');
}
}
}
} else {
message('error', lang('error_23',true));
}
} else {
message('error', lang('error_14',true));
}
} else {
message('error', lang('error_8',true));
}
} else {
message('error', lang('error_7',true));
}
} else {
message('error', lang('error_13',true));
}
} else {
message('error', lang('error_4',true));
}
}
public function changePasswordProcess_verifyEmail($id,$username,$password,$new_password,$confirm_new_password,$ip_address) {
if(check_value($password) && check_value($new_password) && check_value($confirm_new_password)) {
if($this->validateUser($username,$password)) {
if(Validator::PasswordLength($new_password)) {
if($new_password == $confirm_new_password) {
if(!$this->accountOnline($username)) {
if(!$this->hasActivePasswordChangeRequest($id)) {
/* account data */
$auth_code = rand(111111,999999);
$accountData = $this->accountInformation($id);
$link = $this->generatePasswordChangeVerificationURL($id,$auth_code);
if(is_array($accountData)) {
/* add request to database */
$add_request = $this->addPasswordChangeRequest($id,$new_password,$auth_code);
if($add_request) {
/* send email with new password */
$email_titles = config('email_titles',true);
$mail = new PHPMailer();
$smtpCONF = gconfig('smtp',true);
if($smtpCONF['active']) {
$mail->IsSMTP();
$mail->SMTPAuth = true;
$mail->Host = $smtpCONF['smtp_host'];
$mail->Port = $smtpCONF['smtp_port'];
$mail->Username = $smtpCONF['smtp_user'];
$mail->Password = $smtpCONF['smtp_pass'];
}
$email_strings = array('{USERNAME}','{DATE}','{IP_ADDRESS}','{LINK}','{EXPIRATION_TIME}');
$email_replace = array($username,date("m/d/Y @ j:i a"),$ip_address,$link,mconfig('change_password_request_timeout'));
$email_template = emailTemplate('CHANGE_PASSWORD_EMAIL_VERIFICATION');
if($email_template) {
$build_template = replaceMultiTextStrings($email_template,$email_strings,$email_replace);
$body = $build_template;
$mail->SetFrom(config('email_send_from',true), config('email_send_from_name',true));
$address = $accountData[_CLMN_EMAIL_];
$mail->AddAddress($address);
$mail->Subject = $email_titles['CHANGE_PASSWORD_EMAIL_VERIFICATION'];
$mail->MsgHTML($body);
}
if($mail->Send()) {
// success message
message('success', lang('success_3',true));
} else {
message('error', lang('error_20',true));
}
} else {
message('error', lang('error_21',true));
}
} else {
message('error', lang('error_21',true));
}
} else {
message('error', lang('error_19',true));
}
} else {
message('error', lang('error_14',true));
}
} else {
message('error', lang('error_8',true));
}
} else {
message('error', lang('error_7',true));
}
} else {
message('error', lang('error_13',true));
}
} else {
message('error', lang('error_4',true));
}
}
public function changePasswordVerificationProcess($user_id,$auth_code) {
global $dB,$dB2;
if(check_value($user_id) && check_value($auth_code)) {
$userid = Decode_id($user_id);
$authcode = Decode_id($auth_code);
$check = $dB->query_fetch_single("SELECT * FROM "._TBL_CHANGEPASSWORD_REQUEST_." WHERE user_id = '$userid'");
if(is_array($check)) {
loadModuleConfigs('usercp.mypassword');
$request_timeout = mconfig('change_password_request_timeout') * 3600;
$request_date = $check['request_date'] + $request_timeout;
if($request_date > time()) {
if($check['auth_code'] == $authcode) {
$accountData = $this->accountInformation($userid);
$username = $accountData[_CLMN_USERNM_];
$new_password = Decode($check['new_password']);
if(!$this->accountOnline($username)) {
// Update Password
$change_password = $this->changePassword($userid,$username,$new_password);
if($change_password) {
/* send email with new password */
$email_titles = config('email_titles',true);
$mail = new PHPMailer();
$smtpCONF = gconfig('smtp',true);
if($smtpCONF['active']) {
$mail->IsSMTP();
$mail->SMTPAuth = true;
$mail->Host = $smtpCONF['smtp_host'];
$mail->Port = $smtpCONF['smtp_port'];
$mail->Username = $smtpCONF['smtp_user'];
$mail->Password = $smtpCONF['smtp_pass'];
}
$email_strings = array('{USERNAME}','{NEW_PASSWORD}');
$email_replace = array($username,$new_password);
$email_template = emailTemplate('CHANGE_PASSWORD');
if($email_template) {
$build_template = replaceMultiTextStrings($email_template,$email_strings,$email_replace);
$body = $build_template;
$mail->SetFrom(config('email_send_from',true), config('email_send_from_name',true));
$address = $accountData[_CLMN_EMAIL_];
$mail->AddAddress($address);
$mail->Subject = $email_titles['CHANGE_PASSWORD'];
$mail->MsgHTML($body);
$mail->Send();
}
// Clear Password Change Request
$this->removePasswordChangeRequest($userid);
// Success Message
message('success', lang('success_5',true));
} else {
// unknown error
message('error', lang('error_29',true));
}
} else {
// account online
message('error', lang('error_28',true));
}
} else {
// bad auth code
message('error', lang('error_27',true));
}
} else {
// expired
message('error', lang('error_26',true));
}
} else {
// doesnt exist
message('error', lang('error_25',true));
}
} else {
// invalid data
message('error', lang('error_24',true));
}
}
public function passwordRecoveryProcess($email,$ip_address) {
if($this->emailExists($email)) {
$user_id = $this->retrieveUserIDbyEmail($email);
if(Validator::Number($user_id)) {
$accountData = $this->accountInformation($user_id);
if(is_array($accountData)) {
/* Account Recovery Code */
$arc = $this->generateAccountRecoveryCode($accountData[_CLMN_MEMBID_],$accountData[_CLMN_USERNM_]);
/* Account Recovery URL */
$aru = $this->generateAccountRecoveryLink($accountData[_CLMN_MEMBID_],$accountData[_CLMN_EMAIL_],$arc);
/* Send EMAIL to user */
$email_titles = config('email_titles',true);
$mail = new PHPMailer();
$smtpCONF = gconfig('smtp',true);
if($smtpCONF['active']) {
$mail->IsSMTP();
$mail->SMTPAuth = true;
$mail->Host = $smtpCONF['smtp_host'];
$mail->Port = $smtpCONF['smtp_port'];
$mail->Username = $smtpCONF['smtp_user'];
$mail->Password = $smtpCONF['smtp_pass'];
}
$email_strings = array(
'{USERNAME}',
'{DATE}',
'{IP_ADDRESS}',
'{LINK}'
);
$email_replace = array(
$accountData[_CLMN_USERNM_],
date("m/d/Y @ j:i a"),
$ip_address,
$aru
);
$email_template = emailTemplate('PASSWORD_RECOVERY_REQUEST');
if($email_template) {
$build_template = replaceMultiTextStrings($email_template,$email_strings,$email_replace);
$body = $build_template;
$mail->SetFrom(config('email_send_from',true), config('email_send_from_name',true));
$address = $accountData[_CLMN_EMAIL_];
$mail->AddAddress($address);
$mail->Subject = $email_titles['PASSWORD_RECOVERY_REQUEST'];
$mail->MsgHTML($body);
if(!$mail->Send()) {
// could not send email (unknown error)
message('error', lang('error_23',true));
} else {
/* success message */
message('success', lang('success_6',true));
}
} else {
// bad email template, cannot send email (unknown error)
message('error', lang('error_23',true));
}
} else {
// could not retrieve account data (unknown error)
message('error', lang('error_23',true));
}
} else {
// could not retrieve user id (unknown error)
message('error', lang('error_23',true));
}
} else {
// no email or invalid email
message('error', lang('error_30',true));
}
}
public function passwordRecoveryVerificationProcess($ui,$ue,$key) {
if(check_value($ui) && check_value($ue) && check_value($key)) {
$user_id = Decode($ui); // decoded user id
$user_email = Decode($ue); // decoded email address
if(Validator::Number($user_id)) {
if($this->emailExists($user_email)) {
$accountData = $this->accountInformation($user_id);
if(is_array($accountData)) {
$username = $accountData[_CLMN_USERNM_];
$gen_key = $this->generateAccountRecoveryCode($user_id,$username);
/* compare keys */
if($key == $gen_key) {
/* update user password */
$new_password = rand(11111111,99999999);
$update_pass = $this->changePassword($user_id,$username,$new_password);
if($update_pass) {
/* send email with new password */
$email_titles = config('email_titles',true);
$mail = new PHPMailer();
$smtpCONF = gconfig('smtp',true);
if($smtpCONF['active']) {
$mail->IsSMTP();
$mail->SMTPAuth = true;
$mail->Host = $smtpCONF['smtp_host'];
$mail->Port = $smtpCONF['smtp_port'];
$mail->Username = $smtpCONF['smtp_user'];
$mail->Password = $smtpCONF['smtp_pass'];
}
$email_strings = array(
'{USERNAME}',
'{NEW_PASSWORD}'
);
$email_replace = array(
$username,
$new_password
);
$email_template = emailTemplate('PASSWORD_RECOVERY_COMPLETED');
if($email_template) {
$build_template = replaceMultiTextStrings($email_template,$email_strings,$email_replace);
$body = $build_template;
$mail->SetFrom(config('email_send_from',true), config('email_send_from_name',true));
$address = $accountData[_CLMN_EMAIL_];
$mail->AddAddress($address);
$mail->Subject = $email_titles['PASSWORD_RECOVERY_COMPLETED'];
$mail->MsgHTML($body);
if(!$mail->Send()) {
// could not send email (unknown error)
message('error', lang('error_23',true));
} else {
/* success message */
message('success', lang('success_7',true));
}
} else {
// bad email template, cannot send email (unknown error)
message('error', lang('error_23',true));
}
} else {
message('error', lang('error_23',true));
}
} else {
message('error', lang('error_31',true));
}
} else {
message('error', lang('error_31',true));
}
} else {
message('error', lang('error_31',true));
}
} else {
message('error', lang('error_31',true));
}
} else {
message('error', lang('error_31',true));
}
}
public function masterKeyRecoveryProcess($user_id) {
global $dB,$dB2,$_COOKIE;
if(check_value($user_id)) {
if(!check_value($_COOKIE['webengine_masterkey'])) {
$accountData = $this->accountInformation($user_id);
if(check_value($accountData[_CLMN_MASTER_KEY_])) {
if(!$this->accountOnline($accountData[_CLMN_USERNM_])) {
/* send email with new password */
$username = $accountData[_CLMN_USERNM_];
$email_titles = config('email_titles',true);
$mail = new PHPMailer();
$smtpCONF = gconfig('smtp',true);
if($smtpCONF['active']) {
$mail->IsSMTP();
$mail->SMTPAuth = true;
$mail->Host = $smtpCONF['smtp_host'];
$mail->Port = $smtpCONF['smtp_port'];
$mail->Username = $smtpCONF['smtp_user'];
$mail->Password = $smtpCONF['smtp_pass'];
}
$email_strings = array('{USERNAME}','{CURRENT_MASTERKEY}');
$email_replace = array($username,$accountData[_CLMN_MASTER_KEY_]);
$email_template = emailTemplate('MASTER_KEY_RECOVERY');
if($email_template) {
$build_template = replaceMultiTextStrings($email_template,$email_strings,$email_replace);
$body = $build_template;
$mail->SetFrom(config('email_send_from',true), config('email_send_from_name',true));
$address = $accountData[_CLMN_EMAIL_];
$mail->AddAddress($address);
$mail->Subject = $email_titles['MASTER_KEY_RECOVERY'];
$mail->MsgHTML($body);
if(!$mail->Send()) {
// could not send email (unknown error)
message('error', lang('error_23',true));
} else {
/* success message */
message('success', lang('success_16',true));
/* set cookie for request limit */
setcookie("webengine_masterkey", $username, time()+3600); /* expire in 1 hour */
}
} else {
// bad email template, cannot send email (unknown error)
message('error', lang('error_23',true));
}
} else {
message('error', lang('error_14',true));
}
} else {
message('error', lang('error_49',true));
}
} else {
message('error', lang('error_50',true));
}
} else {
message('error', lang('error_23',true));
}
}
public function emailExists($email) {
global $dB,$dB2;
if(!Validator::Email($email)) { $error = true; }
if(!$error) {
debug('pass');
$query = "SELECT * FROM "._TBL_MI_." WHERE "._CLMN_EMAIL_." = '$email'";
if(config('SQL_USE_2_DB',false)) {
$check = $dB2->query_fetch_single($query);
} else {
$check = $dB->query_fetch_single($query);
}
if(is_array($check)) {
return true;
} else {
return false;
}
} else {
return false;
}
}
public function userExists($username) {
global $dB,$dB2;
if(!Validator::UsernameLength($username)) { $error = true; }
if(!Validator::AlphaNumeric($username)) { $error = true; }
if(!$error) {
$query = "SELECT * FROM "._TBL_MI_." WHERE "._CLMN_USERNM_." = '$username'";
if(config('SQL_USE_2_DB',false)) {
$check = $dB2->query_fetch_single($query);
} else {
$check = $dB->query_fetch_single($query);
}
if(is_array($check)) {
return true;
} else {
return false;
}
} else {
return false;
}
}
public function validateUser($username,$password) {
global $dB,$dB2;
if(!Validator::UsernameLength($username)) { $error = true; }
if(!Validator::AlphaNumeric($username)) { $error = true; }
if(!Validator::PasswordLength($password)) { $error = true; }
if(!$error) {
$query = "SELECT * FROM "._TBL_MI_." WHERE "._CLMN_USERNM_." = '$username' AND "._CLMN_PASSWD_." = '$password'";
if(config('SQL_USE_2_DB',false)) {
$check = $dB2->query_fetch_single($query);
} else {
$check = $dB->query_fetch_single($query);
}
if(is_array($check)) {
return true;
} else {
return false;
}
} else {
return false;
}
}
public function retrieveUserID($username) {
global $dB,$dB2;
if(!Validator::UsernameLength($username)) { $error = true; }
if(!Validator::AlphaNumeric($username)) { $error = true; }
if(!$error) {
$query = "SELECT "._CLMN_MEMBID_." FROM "._TBL_MI_." WHERE "._CLMN_USERNM_." = '$username'";
if(config('SQL_USE_2_DB',false)) {
$data = $dB2->query_fetch_single($query);
} else {
$data = $dB->query_fetch_single($query);
}
if(is_array($data)) {
return $data[_CLMN_MEMBID_];
} else {
return null;
}
} else {
return null;
}
}
public function retrieveUserIDbyEmail($email) {
global $dB,$dB2;
if($this->emailExists($email)) {
$query = "SELECT "._CLMN_MEMBID_." FROM "._TBL_MI_." WHERE "._CLMN_EMAIL_." = '$email'";
if(config('SQL_USE_2_DB',false)) {
$data = $dB2->query_fetch_single($query);
} else {
$data = $dB->query_fetch_single($query);
}
if(is_array($data)) {
return $data[_CLMN_MEMBID_];
} else {
return null;
}
} else {
return null;
}
}
public function accountInformation($id) {
global $dB,$dB2;
if(!Validator::Number($id)) { $error = true; }
if(!$error) {
$query = "SELECT * FROM "._TBL_MI_." WHERE "._CLMN_MEMBID_." = '$id'";
if(config('SQL_USE_2_DB',false)) {
$data = $dB2->query_fetch_single($query);
} else {
$data = $dB->query_fetch_single($query);
}
if(is_array($data)) {
return $data;
} else {
return false;
}
} else {
return false;
}
}
public function accountOnline($username) {
global $dB,$dB2;
if(!Validator::UsernameLength($username)) { $error = true; }
if(!Validator::AlphaNumeric($username)) { $error = true; }
if(!$error) {
$query = "SELECT "._CLMN_CONNSTAT_." FROM "._TBL_MS_." WHERE "._CLMN_USERNM_." = '$username'";
if(config('SQL_USE_2_DB',false)) {
$data = $dB2->query_fetch_single($query);
} else {
$data = $dB->query_fetch_single($query);
}
if(is_array($data)) {
if($data[_CLMN_CONNSTAT_] == 1) {
return true;
} else {
return false;
}
} else {
return false;
}
} else {
return false;
}
}
public function changePassword($id,$username,$new_password) {
global $dB,$dB2;
if(!Validator::Number($id)) { $error = true; }
if(!Validator::UsernameLength($username)) { $error = true; }
if(!Validator::AlphaNumeric($username)) { $error = true; }
if(!Validator::PasswordLength($new_password)) { $error = true; }
if(!$error) {
$query = "UPDATE "._TBL_MI_." SET "._CLMN_PASSWD_." = [dbo].[fn_md5]('$new_password','$username') WHERE "._CLMN_MEMBID_." = '$id'";
if(config('SQL_USE_2_DB',false)) {
$change_password = $dB2->query($query);
} else {
$change_password = $dB->query($query);
}
if($change_password) {
return true;
} else {
return false;
}
} else {
return false;
}
}
public function addPasswordChangeRequest($user_id,$new_password,$auth_code) {
global $dB;
if(check_value($user_id) && check_value($new_password)) {
if(Validator::PasswordLength($new_password)) {
$data = array(
$user_id,
Encode($new_password),
$auth_code,
time()
);
$add_request = $dB->query("INSERT INTO "._TBL_CHANGEPASSWORD_REQUEST_." (user_id,new_password,auth_code,request_date) VALUES (?, ?, ?, ?)", $data);
if($add_request) {
return true;
} else {
return false;
}
} else {
return false;
}
} else {
return false;
}
}
public function hasActivePasswordChangeRequest($user_id) {
global $dB;
$check = $dB->query_fetch_single("SELECT * FROM "._TBL_CHANGEPASSWORD_REQUEST_." WHERE user_id = '$user_id'");
if(is_array($check)) {
$request_timeout = mconfig('change_password_request_timeout') * 3600;
$request_date = $check['request_date'] + $request_timeout;
if(time() > $request_date) {
$this->removePasswordChangeRequest($user_id);
return false;
} else {
return true;
}
} else {
return false;
}
}
public function removePasswordChangeRequest($user_id) {
global $dB;
$query = $dB->query("DELETE FROM "._TBL_CHANGEPASSWORD_REQUEST_." WHERE user_id = '$user_id'");
if($query) {
return true;
} else {
return false;
}
}
public function generatePasswordChangeVerificationURL($user_id,$auth_code) {
$build_url = __BASE_URL__;
$build_url .= 'verifyemail/';
$build_url .= '?op='; // operation
$build_url .= Encode_id(1);
$build_url .= '&uid=';
$build_url .= Encode_id($user_id);
$build_url .= '&ac=';
$build_url .= Encode_id($auth_code);
return $build_url;
}
public function addCredits($userid,$amount,$check_online=true,$custom=false,$custom_database="MuOnline",$custom_table="MEMB_INFO",$custom_column="cspoints",$column_user="memb___id",$custom_user_identifier=1) {
global $dB,$dB2;
// Filters
if(!check_value($userid)) { return; }
if(!check_value($amount)) { return; }
if(!Validator::Number($amount)) { return; }
if(!Validator::Number($userid)) { return; }
// retrieve account data
$accountData = $this->accountInformation($userid);
if(!is_array($accountData)) { return; }
// Online Check
if($check_online) {
if($this->accountOnline($accountData[_CLMN_USERNM_])) {
return;
}
}
if(!$custom) {
// REGULAR CREDITS SEND
if(config('add_credits_to_temp',true)) {
$query = "UPDATE "._TBL_MI_." SET "._CLMN_CREDITS_TEMP_." = "._CLMN_CREDITS_TEMP_." + $amount WHERE "._CLMN_MEMBID_." = '$userid'";
} else {
$query = "UPDATE "._TBL_MI_." SET "._CLMN_CREDITS_." = "._CLMN_CREDITS_." + $amount WHERE "._CLMN_MEMBID_." = '$userid'";
}
if(config('SQL_USE_2_DB',false)) {
$reward = $dB2->query($query);
} else {
$reward = $dB->query($query);
}
if($reward) {
return true;
}
} else {
// CUSTOM CREDITS SEND
// custom database
switch($custom_database) {
case "MuOnline":
$dataBase = $dB;
break;
case "Me_MuOnline":
$dataBase = $dB2;
break;
default:
$dataBase = $dB;
break;
}
// build query
$query = "UPDATE $custom_table SET $custom_column = $custom_column + ? WHERE $column_user = ?";
// user identifier
if($custom_user_identifier == 1) {
$userIdentifier = $accountData[_CLMN_USERNM_];
} else {
$userIdentifier = $userid;
}
// run query
$reward = $dataBase->query($query, array($amount, $userIdentifier));
if($reward) {
return true;
}
}
}
public function substractCredits($userid,$amount) {
global $dB,$dB2;
if(check_value($userid) && check_value($amount) && Validator::Number($amount) && Validator::Number($userid)) {
$userData = $this->accountInformation($userid);
if(is_array($userData)) {
$accountCredits = $userData[_CLMN_CREDITS_];
if($accountCredits >= $amount) {
$query = "UPDATE "._TBL_MI_." SET "._CLMN_CREDITS_." = "._CLMN_CREDITS_." - $amount WHERE "._CLMN_MEMBID_." = $userid";
if(config('SQL_USE_2_DB',false)) {
$deduct = $dB2->query($query);
} else {
$deduct = $dB->query($query);
}
if($deduct) {
return true;
} else {
return false;
}
} else {
return false;
}
} else {
return false;
}
} else {
// unknown error (incomplete data) or reward amount is not number
return false;
}
}
public function blockAccount($userid) {
global $dB,$dB2;
if(check_value($userid) && Validator::Number($userid)) {
$query = "UPDATE "._TBL_MI_." SET "._CLMN_BLOCCODE_." = 1 WHERE "._CLMN_MEMBID_." = '$userid'";
if(config('SQL_USE_2_DB',false)) {
$block = $dB2->query($query);
} else {
$block = $dB->query($query);
}
if($block) {
return true;
} else {
return false;
}
} else {
return false;
}
}
public function paypal_transaction($transaction_id,$user_id,$payment_amount,$paypal_email,$order_id) {
global $dB;
if(check_value($transaction_id) && check_value($user_id) && check_value($payment_amount) && check_value($paypal_email) && check_value($order_id)) {
if(Validator::Number($user_id)) {
$data = array(
$transaction_id,
$user_id,
$payment_amount,
$paypal_email,
time(),
1,
$order_id
);
$add = $dB->query("INSERT INTO "._TBL_PAYPAL_." (transaction_id, user_id, payment_amount, paypal_email, transaction_date, transaction_status, order_id) VALUES (?, ?, ?, ?, ?, ?, ?)", $data);
if($add) {
return true;
} else {
return false;
}
} else {
return false;
}
} else {
return false;
}
}
public function paypal_transaction_reversed_updatestatus($order_id) {
global $dB;
if(check_value($order_id)) {
$update = $dB->query("UPDATE "._TBL_PAYPAL_." SET transaction_status = 0 WHERE order_id = '$order_id'");
if($update) {
return true;
} else {
return false;
}
} else {
return false;
}
}
function addRewardItem($character_name,$item_data_array) {
global $dB;
if(check_value($character_name) && check_value($item_data_array) && is_array($item_data_array)) {
$data = array(
$character_name,
$item_data_array[0],
$item_data_array[1],
$item_data_array[2],
$item_data_array[3],
$item_data_array[4],
$item_data_array[5],
$item_data_array[6],
$item_data_array[7],
$item_data_array[8],
$item_data_array[9]
);
$addItems = $dB->query("INSERT INTO "._TBL_REWARD_ITEM_." (name,iGroup,iIndex,iLevel,iDur,iLuck,iSkill,iExc,iSet,iSock,iOpt) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", $data);
if($addItems) {
return true;
} else {
return false;
}
} else {
return false;
}
}
public function retrieveAccountIPs($username) {
global $dB;
if(check_value($username)) {
if($this->userExists($username)) {
$query = $dB->query_fetch("SELECT IP FROM "._TBL_LOGEX_." WHERE AccountId = '$username' GROUP BY IP");
if(is_array($query)) {
return $query;
} else {
return false;
}
} else {
return false;
}
} else {
return false;
}
}
public function generateAccountRecoveryCode($user_id,$username) {
if(check_value($user_id) && check_value($username)) {
return md5($user_id . $username . config('encryption_hash',true) . date("m-d-Y"));
} else {
return null;
}
}
public function generateAccountRecoveryLink($user_id,$email,$recovery_code) {
if(check_value($user_id) && check_value($recovery_code)) {
$user_id_encoded = Encode($user_id);
$email_encoded = Encode($email);
$build_url = __BASE_URL__;
$build_url .= 'forgotpassword/';
$build_url .= '?ui=';
$build_url .= $user_id_encoded;
$build_url .= '&ue=';
$build_url .= $email_encoded;
$build_url .= '&key=';
$build_url .= $recovery_code;
return $build_url;
} else {
return false;
}
}
public function updateVipTimeStamp($userid,$new_timestamp) {
global $dB,$dB2;
$query = "UPDATE "._TBL_MI_." SET "._CLMN_VIP_STAMP_." = '$new_timestamp' WHERE "._CLMN_MEMBID_." = '$userid'";
if(config('SQL_USE_2_DB',false)) {
$update = $dB2->query($query);
} else {
$update = $dB->query($query);
}
if($update) {
return true;
} else {
return false;
}
}
private function sendWelcomeEmail($username,$email) {
$mail = new PHPMailer();
$smtpCONF = gconfig('smtp',true);
if($smtpCONF['active']) {
$mail->IsSMTP();
$mail->SMTPAuth = true;
$mail->Host = $smtpCONF['smtp_host'];
$mail->Port = $smtpCONF['smtp_port'];
$mail->Username = $smtpCONF['smtp_user'];
$mail->Password = $smtpCONF['smtp_pass'];
}
$email_strings = array('{USERNAME}');
$email_replace = array($username);
$email_template = emailTemplate('WELCOME_EMAIL');
if($email_template) {
$build_template = replaceMultiTextStrings($email_template,$email_strings,$email_replace);
$body = $build_template;
$mail->SetFrom(config('email_send_from',true), config('email_send_from_name',true));
$mail->AddAddress($email);
$email_titles = config('email_titles',true);
$mail->Subject = $email_titles['WELCOME_EMAIL'];
$mail->MsgHTML($body);
$mail->Send();
}
}
private function createRegistrationVerification($username,$password,$email) {
global $dB;
$key = uniqid();
$query = $dB->query("INSERT INTO WEBENGINE_REGISTER_ACCOUNT (registration_account,registration_password,registration_email,registration_date,registration_ip,registration_key) VALUES (?,?,?,?,?,?)", array($username, Encode($password), $email, time(), $_SERVER['REMOTE_ADDR'], $key));
if($query) {
return $key;
}
}
private function sendRegistrationVerificationEmail($username,$email,$key) {
$verificationLink = __BASE_URL__.'verifyemail/?op='.Encode_id(2).'&user='.Encode($username).'&key='.$key;
$mail = new PHPMailer();
$smtpCONF = gconfig('smtp',true);
if($smtpCONF['active']) {
$mail->IsSMTP();
$mail->SMTPAuth = true;
$mail->Host = $smtpCONF['smtp_host'];
$mail->Port = $smtpCONF['smtp_port'];
$mail->Username = $smtpCONF['smtp_user'];
$mail->Password = $smtpCONF['smtp_pass'];
}
$email_strings = array('{USERNAME}','{LINK}');
$email_replace = array($username,$verificationLink);
$email_template = emailTemplate('WELCOME_EMAIL_VERIFICATION');
if($email_template) {
$build_template = replaceMultiTextStrings($email_template,$email_strings,$email_replace);
$body = $build_template;
$mail->SetFrom(config('email_send_from',true), config('email_send_from_name',true));
$mail->AddAddress($email);
$email_titles = config('email_titles',true);
$mail->Subject = $email_titles['WELCOME_EMAIL_VERIFICATION'];
$mail->MsgHTML($body);
$mail->Send();
}
}
public function verifyRegistrationProcess($username,$key) {
global $dB,$dB2;
$verifyKey = $dB->query_fetch_single("SELECT * FROM WEBENGINE_REGISTER_ACCOUNT WHERE registration_account = ? AND registration_key = ?", array($username,$key));
if($verifyKey && is_array($verifyKey)) {
// create account
$info = array($verifyKey['registration_account'], Decode($verifyKey['registration_password']), 'test', '111111111111', '0', '0', '1', $verifyKey['registration_email'], date('m/d/Y'), date('m/d/Y'), '2005-01-03', '2005-01-03', '1', md5($verifyKey['registration_account']));
$query = "INSERT INTO "._TBL_MI_." (memb___id, memb__pwd, memb_name, sno__numb, bloc_code, ctl1_code, mail_chek, mail_addr, appl_days, modi_days, out__days, true_days, confirmed, activation_id) VALUES ('".$info[0]."', [dbo].[fn_md5]('".$info[1]."','".$info[0]."'), '".$info[2]."', '".$info[3]."', '".$info[4]."', '".$info[5]."', '".$info[6]."', '".$info[7]."', '".$info[8]."', '".$info[9]."', '".$info[10]."', '".$info[11]."', '".$info[12]."', '".$info[13]."')";
if(config('SQL_USE_2_DB',false)) {
$register_account = $dB2->query($query);
} else {
$register_account = $dB->query($query);
}
if($register_account) {
// delete verification
$this->deleteRegistrationVerification($username);
// send welcome email
$this->sendWelcomeEmail($verifyKey['registration_account'],$verifyKey['registration_email']);
// success message
message('success', 'welcome!');
redirect(2,'login/',5);
} else {
message('error', 'some error');
}
} else {
redirect();
}
}
private function deleteRegistrationVerification($username) {
global $dB;
$delete = $dB->query("DELETE FROM WEBENGINE_REGISTER_ACCOUNT WHERE registration_account = ?", array($username));
if($delete) {
return true;
}
}
// Check if an username exists in the email verification system
private function checkUsernameEVS($username) {
global $dB;
$result = $dB->query_fetch_single("SELECT * FROM WEBENGINE_REGISTER_ACCOUNT WHERE registration_account = ?", array($username));
if($result && is_array($result)) {
loadModuleConfigs('register');
$timelimit = $result['registration_date']+mconfig('verification_timelimit')*60*60;
if($timelimit < time()) {
$this->deleteRegistrationVerification($username);
return false;
} else {
return true;
}
}
}
// Check if an email exists in the email verification system
private function checkEmailEVS($email) {
global $dB;
$result = $dB->query_fetch_single("SELECT * FROM WEBENGINE_REGISTER_ACCOUNT WHERE registration_email = ?", array($email));
if($result && is_array($result)) {
loadModuleConfigs('register');
$timelimit = $result['registration_date']+mconfig('verification_timelimit')*60*60;
if($timelimit < time()) {
$this->deleteRegistrationVerification($result['registration_account']);
return false;
} else {
return true;
}
}
}
public function isIpBlocked($ip) {
global $dB;
if(Validator::Ip($ip)) {
$check = $dB->query_fetch_single("SELECT * FROM WEBENGINE_BLOCKED_IP WHERE block_ip = ?", array($ip));
if($check && is_array($check)) {
return true;
}
}
}
public function blockIpAddress($ip,$user) {
global $dB;
if(!check_value($user)) { return; }
if(!$this->isIpBlocked($ip)) {
$block = $dB->query("INSERT INTO WEBENGINE_BLOCKED_IP (block_ip,block_by,block_date) VALUES (?,?,?)", array($ip,$user,time()));
if($block) {
return true;
}
}
}
public function retrieveBlockedIPs() {
global $dB;
return $dB->query_fetch("SELECT * FROM WEBENGINE_BLOCKED_IP ORDER BY id DESC");
}
public function unblockIpAddress($id) {
global $dB;
$unblock = $dB->query("DELETE FROM WEBENGINE_BLOCKED_IP WHERE id = ?", array($id));
if($unblock) {
return true;
}
}
}
?>
NO OPTION TO ENABLE/DISABLE to all modules??? how to fix this?
Sample:
http://i61.tinypic.com/11hv5tw.png
Just tested, working fine...
http://i.imgur.com/JckIdLJ.jpg
how about this? only top level is working the rest not working
http://i61.tinypic.com/2zinaqr.jpg
If you have any problems and you can't handle them alone, buy official version from Lautaro.
i have this problem
PDOException: could not find driver
can somebody help me pls
add modules and lost the login and throws me the error that I have permission from the administrator does not return after leaving the login anymore
Someone help me it still says server is offline
is the Votereward module compatible on eX802 by zTeam?
I tried everything but not work for me.
the querys is for sql server 2008? i have sql server 2000 but not running.
If the license can not be validated, your hosting along with the WebEngine will be taken down according to law :) Don't waste your time ;)
how to add webshop?
website offline
Help please
i have iis 7
guild ranking not working ?
also Castle Siege after some hours is hided not showing no more any ideas?
Hi, Im tryng to use this site.
I have WebHosting. I only can see "Website offline"
And if I want to see errors: PDOException: could not find driver
Can anyone help me?Quote:
// SQL DATA
$config['SQL_DB_HOST'] = 'IP-VPS';
$config['SQL_DB_NAME'] = 'MuOnline';
$config['SQL_DB_2_NAME'] = 'Me_MuOnline';
$config['SQL_DB_USER'] = 'USER';
$config['SQL_DB_PASS'] = 'PASSWORD';
$config['SQL_DB_PORT'] = '1433';
$config['SQL_USE_2_DB'] = false;
$config['SQL_PDO_DRIVER'] = 1; // 1= dblib (default) || 2= sqlsrv || 3= odbc
how to change the header?
and why is the logo and the castle owner not showing?
Attachment 149075
noob question
how to change template?
After i try register .. I dont understund in md5 nothink much.. I need enable md5? And how i can enable it!
[SQL 42000] [odbc 2812] > [Microsoft][ODBC SQL Server Driver][SQL Server]Could not find stored procedure 'master.dbo.XP_MD5_EncodeKeyVal'. (SQLExecute[2812] at ext\pdo_odbc\odbc_stmt.c:133)
Add this to SQL:
Quote:
USE [master]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[XP_MD5_EncodeKeyVal]') and OBJECTPROPERTY(id, N'IsExtendedProc') = 1)
exec sp_dropextendedproc N'[dbo].[XP_MD5_EncodeKeyVal]'
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS OFF
GO
exec sp_addextendedproc N'XP_MD5_EncodeKeyVal', N'WZ_MD5_MOD.dll'
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[XP_MD5_CheckValue]') and OBJECTPROPERTY(id, N'IsExtendedProc') = 1)
exec sp_dropextendedproc N'[dbo].[XP_MD5_CheckValue]'
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS OFF
GO
exec sp_addextendedproc N'XP_MD5_CheckValue', N'WZ_MD5_MOD.dll'
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
USE [MuOnline]
CREATE FUNCTION [dbo].[fn_md5] (@data VARCHAR(10), @data2 VARCHAR(10))
RETURNS BINARY(16) AS
BEGIN
DECLARE @hash BINARY(16)
EXEC master.dbo.XP_MD5_EncodeKeyVal @data, @data2, @hash OUT
RETURN @hash
END
Im not shure but i think my DB is not suporting MD5 option.. maby im not corect.. I use TT 11.70.28.. is posible use this web on this filles?
Thank you very much for your time and answers!
By chance you have the psd template Default?
There any way to add this lateral menu, the default template?
Sorry for the inconvenience. Thanks for your time!
http://i58.tinypic.com/21ms37a.jpg
need one Video Guide ?
what is ?Quote:
Quote:
SQL 42S22] [odbc 207] > [Microsoft][ODBC SQL Server Driver]
[SQL Server]Invalid column name 'activation_id'.
(SQLExecute[207] at ext\pdo_odbc\odbc_stmt.c:133)
2 thinks
1. Can connect to my Admincp or to my user
2. Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\modules\news.php on line 84
How to fix that?
Check includes/config.php, here you must add admin users. After that when you will login with admin account, in the top right corner you will see "AdminCP". This warning is because you don't have any news so foreach function gets NULL as parameter. Add news and it will disappear.
Man Look
I try Edit From admincp My ranking or Eny Modules
Eror: ERROR: Could not load requested rankings.
- - - Updated - - -
At admincp eror : NOTE: The admincp module settings feature is still in BETA stage, so please, if a text box requires a number, make sure you add a number (same if it requires text only). And make sure you DO NOT leave any field empty!
But then : SUCCESS! Settings successfully saved.
Make sure that website has right privileges on the required files.
@ Jacubb please provide me a Sql Scripts to read the database statistic like total number o registered account, total number of character created and total number of guild created.
http://i57.tinypic.com/25iql2b.jpg
But don't use it on website with high traffic. If you have high traffic, you will have to cache this information and add cron job for it.PHP Code:$users = $dB->query_fetch_single("SELECT COUNT(memb___id) as users FROM MEMB_INFO");
echo $users['users'];
$chars = $dB->query_fetch_single("SELECT COUNT(Name) as chars FROM Character");
echo $chars['chars'];
$guilds = $dB->query_fetch_single("SELECT COUNT(G_Name) as guilds FROM Guild");
echo $guilds['guilds'];
How to ix this?
if i set the config.ini like this database order.
the result is. cant register and cant login the existing account.Quote:
$config['SQL_DB_NAME'] = 'MuOnline';
$config['SQL_DB_2_NAME'] = 'Me_MuOnline';
ERROR: We could not create your account, please contact the Administrator.
If the Databases order is Me__Muonline set 1st.
the result is i can register and login but the UserCP all module not working.Quote:
$config['SQL_DB_NAME'] = 'Me_MuOnline';
$config['SQL_DB_2_NAME'] = 'MuOnline';
reset character = ERROR: Your account has no characters.
unstuck character = ERROR: Your account has no characters.
Add stats = ERROR: Your account has no characters.
etc.
Hello im having this problem almost 2 days and still can't figure it out,
ERROR" website offline"
im using sql 2008 r2 32 bit, xampp 1.7.1 and already tried it to 1.7.3 still website offline
i already configure C:\xampp\htdocs\includes\ config.php
i already edit the php.iniQuote:
// SQL DATA$config['SQL_DB_HOST'] = 'Jhervin\Jhervin'; - i already triend localhost and 127.0.0.1 and my wan i.p
$config['SQL_DB_NAME'] = 'MuOnline';
$config['SQL_DB_2_NAME'] = 'MuOnline';
$config['SQL_DB_USER'] = 'sa';
$config['SQL_DB_PASS'] = 'example123';
$config['SQL_DB_PORT'] = '1433';
$config['SQL_USE_2_DB'] = false;
$config['SQL_PDO_DRIVER'] = 3; // 1= dblib (default) || 2= sqlsrv || 3= odbc - already tried to put 1 and 2 and now the 3 but still wont work
Quote:
;extension=php_pdo_firebird.dllextension=php_pdo_mssql.dll
extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_oci8.dll
extension=php_pdo_odbc.dll -already remove the ;
;extension=php_pdo_sqlite.dll
extension=php_perl.dll
extension=php_pgsql.dll
;extension=php_phpdoc.dll
;extension=php_pop3.dll
;extension=php_printer.dll
i hope someone can help me with this problem, thanks
So, now you know what's the problem. Btw, I can recommend to use newer XAMPP with WebEngine andw edit PHP settings.
Quote:
Required PHP Modules, Extensions & Settings:
short_open_tag = On
php-bcmath
OpenSSL
[Linux] php-pdo_dblib
cURL
[Windows] PDO sqlsrv driver
[Windows] PDO ODBC driver
now im using 1.0.7 PL1
and now my problem is this im trying to register a new account
my registering problem is now solve my problem now is when im logging in it says
Quote:
ERROR: You have reached the maximum number of login failures, therefore your account has been temporarily disabled to login to the website.
I say thank you for good release.
Help pls i get this error when i try to login with admin
invalid acc or pass try 1/5
anyone can teach me how to enable statistic sidebar
Ive got this error, when im trying to register using MD5 Mode. how to fix?
[SQL 42000] [odbc 4121] > [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot find either column "dbo" or the user-defined function or aggregate "dbo.fn_md5", or the name is ambiguous. (SQLExecute[4121] at ext\pdo_odbc\odbc_stmt.c:254)
Thanks
XAMMP someone sends me to run this site please?
@jacubb
I try everythink i still "webstie offline"
You can tomorrow can help on skype and teamwiever ?
Add Me mikro55
Please Help me :(
https://forum.ragezone.com/cache.php...aff48ddda8.jpg
Chinese character name garbled, other normal
How to solve
Having problem with the cron job, it works fine until someone goes online in game and everything on cron wont work at all,