Example #1
0
function flux_get_default_bmp_data()
{
    $filename = sprintf('%s/emblem/%s', FLUX_DATA_DIR, Flux::config('MissingEmblemBMP'));
    if (file_exists($filename)) {
        return file_get_contents($filename);
    }
}
 function getCashPoints($account_id, $server)
 {
     $cp_tbl = Flux::config('FluxTables.cashpoints');
     $sql = "SELECT value FROM {$cp_tbl} WHERE account_id = ? AND key = '#CASHPOINTS'";
     $sth = $server->connection->getStatement($sql);
     $sth->execute(array((int) $account_id));
     return $sth->rowCount() ? (int) $sth->fetch()->value : 0;
 }
Example #3
0
 /**
  * Checks whether the server is up and running (accepting connections).
  * Will return true/false based on the server status.
  *
  * @return bool Returns true if server is running, false if not.
  * @access public
  */
 public function isUp()
 {
     $addr = $this->config->getAddress();
     $port = $this->config->getPort();
     $sock = @fsockopen($addr, $port, $errno, $errstr, (int) Flux::config('ServerStatusTimeout'));
     if (is_resource($sock)) {
         fclose($sock);
         return true;
     } else {
         return false;
     }
 }
Example #4
0
 public function execute(array $inputParameters = array())
 {
     $res = $this->stmt->execute($inputParameters);
     Flux::$numberOfQueries++;
     if ((int) $this->stmt->errorCode()) {
         $info = $this->stmt->errorInfo();
         self::$errorLog->puts('[SQLSTATE=%s] Err %s: %s', $info[0], $info[1], $info[2]);
         if (Flux::config('DebugMode')) {
             $message = sprintf('MySQL error (SQLSTATE: %s, ERROR: %s): %s', $info[0], $info[1], $info[2]);
             throw new Flux_Error($message);
         }
     }
     return $res;
 }
Example #5
0
 public function __construct($name, $addonDir = null)
 {
     $this->name = $name;
     $this->addonDir = is_null($addonDir) ? FLUX_ADDON_DIR . "/{$name}" : $addonDir;
     $this->configDir = "{$this->addonDir}/config";
     $this->moduleDir = "{$this->addonDir}/modules";
     $this->themeDir = "{$this->addonDir}/themes/" . Flux::config('ThemeName');
     $files = array('addonConfig' => "{$this->configDir}/addon.php", 'accessConfig' => "{$this->configDir}/access.php");
     foreach ($files as $configName => $filename) {
         if (file_exists($filename)) {
             $this->{$configName} = Flux::parseConfigFile($filename);
         }
         if (!$this->{$configName} instanceof Flux_Config) {
             $tempArr = array();
             $this->{$configName} = new Flux_Config($tempArr);
         }
     }
     // Use new language system for messages (also supports addons).
     $this->messagesConfig = Flux::parseLanguageConfigFile($name);
 }
Example #6
0
 public function __construct()
 {
     if (!self::$errLog) {
         self::$errLog = new Flux_LogFile(FLUX_DATA_DIR . '/logs/errors/mail/' . date('Ymd') . '.log');
     }
     if (!self::$log) {
         self::$log = new Flux_LogFile(FLUX_DATA_DIR . '/logs/mail/' . date('Ymd') . '.log');
     }
     $this->pm = $pm = new PHPMailer();
     $this->errLog = self::$errLog;
     $this->log = self::$log;
     if (Flux::config('MailerUseSMTP')) {
         $pm->IsSMTP();
         if (is_array($hosts = Flux::config('MailerSMTPHosts'))) {
             $hosts = implode(';', $hosts);
         }
         $pm->Host = $hosts;
         if ($user = Flux::config('MailerSMTPUsername')) {
             $pm->SMTPAuth = true;
             if (Flux::config('MailerSMTPUseTLS')) {
                 $pm->SMTPSecure = 'tls';
             }
             if (Flux::config('MailerSMTPUseSSL')) {
                 $pm->SMTPSecure = 'ssl';
             }
             if ($port = Flux::config('MailerSMTPPort')) {
                 $pm->Port = (int) $port;
             }
             $pm->Username = $user;
             if ($pass = Flux::config('MailerSMTPPassword')) {
                 $pm->Password = $pass;
             }
         }
     }
     // From address.
     $pm->From = Flux::config('MailerFromAddress');
     $pm->FromName = Flux::config('MailerFromName');
     // Always use HTML.
     $pm->IsHTML(true);
 }
Example #7
0
 /**
  * Check CSRF validity
  * @param string $name identifier
  * @param array $storage check : $_POST / $_GET / ect.
  * @param string $error reference to overwrite if something to say
  * @return bool PASS
  * @access public
  */
 public static function csrfValidate($name, $storage, &$error)
 {
     // Missing session token
     if (!isset(self::$session['CSRF_' . $name])) {
         $error = Flux::message('SecurityNeedSession');
         return false;
     }
     // Missing origin token
     if (!isset($storage[$name])) {
         $error = Flux::message('SecurityNeedToken');
         return false;
     }
     // Get back hash, clean up session
     $hash = self::$session['CSRF_' . $name];
     unset(self::$session['CSRF_' . $name]);
     // Invalid token
     if ($storage[$name] !== $hash) {
         $error = Flux::message('SecuritySessionInvalid');
         return false;
     }
     // PASS
     return true;
 }
Example #8
0
if (count($_POST)) {
    $prev = (bool) $params->get('_preview');
    $to = trim($params->get('to'));
    $subject = trim($params->get('subject'));
    $body = trim($params->get('body'));
    if (!$to) {
        $errorMessage = Flux::message('MailerEnterToAddress');
    } elseif (!$subject) {
        $errorMessage = Flux::message('MailerEnterSubject');
    } elseif (!$body) {
        $errorMessage = Flux::message('MailerEnterBodyText');
    } elseif (!Flux_Security::csrfValidate('Mailer', $_POST, $error)) {
        $errorMessage = $error;
    }
    if (empty($errorMessage)) {
        if ($prev) {
            require_once 'markdown/markdown.php';
            $preview = Markdown($body);
        } else {
            require_once 'Flux/Mailer.php';
            $mail = new Flux_Mailer();
            $opts = array('_ignoreTemplate' => true, '_useMarkdown' => true);
            if ($mail->send($to, $subject, $body, $opts)) {
                $session->setMessageData(sprintf(Flux::message('MailerEmailHasBeenSent'), $to));
                $this->redirect();
            } else {
                $errorMessage = Flux::message('MailerFailedToSend');
            }
        }
    }
}
Example #9
0
<?php

if (!defined('FLUX_ROOT')) {
    exit;
}
//$this->loginRequired();
$title = 'Viewing Item';
require_once 'Flux/TemporaryTable.php';
if ($server->isRenewal) {
    $fromTables = array("{$server->charMapDatabase}.item_db_re", "{$server->charMapDatabase}.item_db2_re");
} else {
    $fromTables = array("{$server->charMapDatabase}.item_db", "{$server->charMapDatabase}.item_db2");
}
$tableName = "{$server->charMapDatabase}.items";
$tempTable = new Flux_TemporaryTable($server->connection, $tableName, $fromTables);
$shopTable = Flux::config('FluxTables.ItemShopTable');
$itemID = $params->get('id');
/* ITEM SHOP */
try {
    $sql = 'select * from shops_sells s left join npcs n on s.id_shop = n.id where s.item = ?';
    $sth = $server->connection->getStatement($sql);
    $sth->execute(array($itemID));
    if ((int) $sth->stmt->errorCode()) {
        throw new Flux_Error('db not found');
    }
    $itemShop = $sth->fetchAll();
} catch (Exception $e) {
    $itemShop = false;
}
/* ITEM SHOP */
$col = 'items.id AS item_id, name_english AS identifier, ';
Example #10
0
<?php

if (!defined('FLUX_ROOT')) {
    exit;
}
$title = 'Email Changes';
$changeTable = Flux::config('FluxTables.ChangeEmailTable');
$sqlpartial = "LEFT JOIN {$server->loginDatabase}.login ON login.account_id = log.account_id ";
$sqlpartial .= 'WHERE 1=1 ';
$bind = array();
// Email change searching.
$requestAfter = $params->get('request_after_date');
$requestBefore = $params->get('request_before_date');
$changeAfter = $params->get('change_after_date');
$changeBefore = $params->get('change_before_date');
$accountID = trim($params->get('account_id'));
$username = trim($params->get('username'));
$oldEmail = trim($params->get('old_email'));
$newEmail = trim($params->get('new_email'));
$requestIP = trim($params->get('request_ip'));
$changeIP = trim($params->get('change_ip'));
if ($requestAfter) {
    $sqlpartial .= 'AND request_date >= ? ';
    $bind[] = $requestAfter;
}
if ($requestBefore) {
    $sqlpartial .= 'AND request_date <= ? ';
    $bind[] = $requestBefore;
}
if ($accountID) {
    $sqlpartial .= 'AND log.account_id = ? ';
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    if (is_null($errorMessage)) {
        $sql = "INSERT INTO {$server->loginDatabase}.{$vfp_sites} VALUES (NULL, ?, ?, ?, ?, ?, ?, ?)";
        $sth = $server->connection->getStatement($sql);
        if ($imageurl === "") {
            $imageurl = NULL;
        }
        if ($uploadimg['error'] > 0) {
            $uploadimg = NULL;
        }
        $bind = array($votename, $voteurl, $voteinterval, $votepoints, $filename, $imageurl, date(Flux::config('DateTimeFormat')));
        if ($sth->execute($bind)) {
            $successMessage = Flux::message("SuccessVoteSite");
        } else {
            $errorMessage = Flux::message("FailedToAdd");
        }
    }
}
Example #12
0
        ?>
</td>
				<td><?php 
        echo htmlspecialchars(Flux::message('TLStatus' . $trow->status));
        ?>
</td>
				<td><?php 
        echo date(Flux::config('DateFormat'), strtotime($trow->created));
        ?>
</td>
			</tr>
		<?php 
    }
    ?>
		</tbody>
	</table>
<?php 
} else {
    ?>
	<p>
		<?php 
    echo htmlspecialchars(Flux::message('TLNoTasks'));
    ?>
<br/><br/>
		<a href="<?php 
    echo $this->url('tasks', 'createnew');
    ?>
">Create a Task</a>
	</p>
<?php 
}
Example #13
0
			</select>.
			<?php 
    }
    ?>
			<form action="<?php 
    echo $this->urlWithQs;
    ?>
" method="post" name="preferred_server_form" style="display: none">
				<input type="hidden" name="preferred_server" value="" />
			</form>
			</span>
		</td>
		<td bgcolor="#e1eaf3"></td>
	</tr>
	<?php 
    if (!empty($adminMenuItems) && Flux::config('AdminMenuNewStyle')) {
        ?>
	<?php 
        $mItems = array();
        foreach ($adminMenuItems as $menuItem) {
            $mItems[] = sprintf('<a href="%s">%s</a>', $menuItem['url'], $menuItem['name']);
        }
        ?>
	<tr>
		<td bgcolor="#e1eaf3"></td>
		<td bgcolor="#e1eaf3" valign="middle" class="loginbox-admin-menu">
			<strong>Admin</strong>: <?php 
        echo implode(' • ', $mItems);
        ?>
		</td>
		<td bgcolor="#e1eaf3"></td>
Example #14
0
<?php

return array('YesLabel' => 'Yes', 'NoLabel' => 'No', 'NoteLabel' => 'Note', 'GenderTypeMale' => 'Male', 'GenderTypeFemale' => 'Female', 'GenderTypeServer' => 'Server', 'RefreshSecurityCode' => 'Refresh Security Code', 'NoneLabel' => 'None', 'NeverLabel' => 'Never', 'NotApplicableLabel' => 'Not Applicable', 'UnknownLabel' => 'Unknown', 'IsEqualToLabel' => 'is equal to', 'IsGreaterThanLabel' => 'is greater than', 'IsLessThanLabel' => 'is less than', 'AllLabel' => 'All', 'SearchLabel' => 'Search…', 'GoBackLabel' => 'Go back to previous page…', 'SearchButton' => 'Search', 'ResetButton' => 'Reset', 'FilterButton' => 'Filter', 'NotAcceptingDonations' => "We're sorry, but we are currently not accepting any donations.  We apologize for the inconvenience.", 'FoundSearchResults' => 'Found a total of %d record(s) across %d page(s).  Displaying result(s) %d-%d.', 'LoginToDonate' => 'Please log-in to make a donation.', 'UnknownCharacter' => 'No such character found.', 'AccountIdLabel' => 'Account ID', 'AccountLevelLabel' => 'Account Level', 'AccountStateLabel' => 'Account State', 'CreditBalanceLabel' => 'Credit Balance', 'UsernameLabel' => 'Username', 'PasswordLabel' => 'Password', 'EmailAddressLabel' => 'E-mail', 'GenderLabel' => 'Gender', 'LoginCountLabel' => 'Login Count', 'LastLoginDateLabel' => 'Last Login Date', 'LastUsedIpLabel' => 'Last Used IP', 'AccountStateNormal' => 'Normal', 'AccountStatePending' => 'Pending', 'AccountStatePermBanned' => 'Permanently Banned', 'AccountStateTempBanLbl' => 'Temporarily Banned', 'AccountStateTempBanned' => 'Temp. Banned (unban: %s)', 'OnlineLabel' => 'Online', 'OfflineLabel' => 'Offline', 'ItemIdLabel' => 'Item ID', 'ItemNameLabel' => 'Item Name', 'ItemAmountLabel' => 'Amount', 'ItemIdentifyLabel' => 'Identified', 'ItemRefineLabel' => 'Refined', 'ItemBrokenLabel' => 'Broken', 'ItemCard0Label' => 'Card 0', 'ItemCard1Label' => 'Card 1', 'ItemCard2Label' => 'Card 2', 'ItemCard3Label' => 'Card 3', 'EmailChangeTitle' => 'Change E-mail', 'EnterEmailAddress' => 'Please enter an e-mail address.', 'EmailCannotBeSame' => 'Your new e-mail cannot be the same as your current.', 'EmailAlreadyRegistered' => "The e-mail address you've entered is already registered to another account.", 'EmailChangeSent' => 'An e-mail has been sent to your new address with a link that will confirm the change.', 'EmailAddressChanged' => 'Your e-mail address has been changed!', 'EmailChangeFailed' => 'Failed to change e-mail address.  Please try again later.', 'EmailChangeHeading' => 'Change E-mail', 'EmailChangeInfo' => 'If you would like to change the e-mail address registered under your account, you can fill out the below form.', 'EmailChangeInfo2' => 'After submitting the form, you will be required to confirm your new e-mail address (an e-mail will be sent to the new address with a link).', 'EmailChangeLabel' => 'New E-mail Address', 'EmailChangeInputNote' => 'Must be a valid e-mail address!', 'EmailChangeButton' => 'Change E-mail Address', 'PasswordChangeTitle' => 'Change Password', 'NeedCurrentPassword' => 'Please enter your current password.', 'NeedNewPassword' => 'Please enter your new password.', 'OldPasswordInvalid' => "The password you provided doesn't match the one we have on record.", 'ConfirmNewPassword' => 'Please confirm your new password.', 'NewPasswordSameAsOld' => 'New password cannot be the same as your current password.', 'PasswordHasBeenChanged' => 'Your password has been changed, please log-in again.', 'FailedToChangePassword' => 'Failed to change your password.  Please contact an admin.', 'PasswordChangeHeading' => 'Change Your Password', 'PasswordChangeInfo' => 'Please enter your current password, then enter the new password you would like to use and re-enter it to confirm.', 'CurrentPasswordLabel' => 'Current Password', 'NewPasswordLabel' => 'New Password', 'NewPasswordConfirmLabel' => 'Re-enter New Password', 'PasswordChangeNote' => 'Please be sure to enter the correct information.', 'PasswordChangeNote2' => 'After changing your password, you will be logged out.', 'PasswordChangeButton' => 'Change Password', 'GenderChangeTitle' => 'Change Gender', 'GenderChangeBadChars' => 'You cannot change your gender if any of your characters is a: %s', 'GenderChanged' => 'Your gender has been changed and %d credit(s) have been deducted from your account.', 'GenderChangedForFree' => 'Your gender has been changed.', 'GenderChangeHeading' => 'Change Your Gender', 'GenderChangeCost' => 'Gender changes cost %s credit(s).', 'GenderChangeBalance' => 'Your current balance is %s credit(s).', 'GenderChangeNoFunds' => 'You do not have enough credits to perform a gender change at this time.', 'GenderChangeCharInfo' => 'You cannot change gender if you have the follow character jobs: %s', 'GenderChangeSubHeading' => 'Please make sure you want to really change!', 'GenderChangeFormText' => 'Would you like to change your gender to %s?', 'GenderChangeConfirm' => 'Are you absolutely sure you want to change your gender?', 'GenderChangeButton' => 'Yes, do it please.', 'AccountConfirmTitle' => 'Confirm Account', 'AccountConfirmUnban' => 'Account has been confirmed and activated.', 'AccountConfirmMessage' => 'Your account has been confirmed and activated, you may now log-in.', 'EmailConfirmTitle' => 'Confirm E-mail', 'EmailConfirmFailed' => 'There has been a technical difficulty while updating your e-mail address, please contact an admin.', 'EmailConfirmChanged' => 'Your e-mail address has been changed!', 'AccountCreateTitle' => 'Create an Account', 'AccountConfirmBan' => 'Awaiting account activation: %s', 'AccountCreateEmailSent' => 'An e-mail has been sent containing account activation details, please check your e-mail and activate your account to log-in.', 'AccountCreateFailed' => 'Your account has been created, but unfortunately we failed to send an e-mail due to technical difficulties. Please contact a staff member and request for assistance.', 'AccountCreated' => 'Congratulations, you have been registered successfully and automatically logged in.', 'AccountCreateHeading' => 'Register', 'AccountCreateTerms' => 'Terms of Service', 'AccountCreateInfo' => 'Please read our %s (ToS) before registering for an account, to ensure that you understand the rules of holding an account with our private Ragnarok Online game server.', 'AccountCreateInfo2' => 'By clicking "Create My Account", you agree to be bound by our %s.', 'AccountCreateGenderInfo' => "The gender you choose here will affect your in-game character's gender!", 'AccountServerLabel' => 'Server', 'AccountUsernameLabel' => 'Your Username', 'AccountPasswordLabel' => 'Your Password', 'AccountPassConfirmLabel' => 'Confirm Password', 'AccountEmailLabel' => 'E-mail Address', 'AccountGenderLabel' => 'Gender', 'AccountSecurityLabel' => 'Security Code', 'AccountCreateButton' => 'Create My Account', 'InvalidLoginServer' => 'Invalid login server selected, please try again with a valid server.', 'InvalidLoginCredentials' => 'Invalid login credentials, please verify that you typed the correct info and try again.', 'UnexpectedLoginError' => 'Unexpected error occurred, please try again or report to an admin.', 'CriticalLoginError' => 'Something bad happened.  Report to an administrator ASAP.', 'UsernameAlreadyTaken' => "The username you've chosen has already been taken by another user.", 'UsernameTooShort' => sprintf('Your username should be around %d to %d characters long.', Flux::config('MinUsernameLength'), Flux::config('MaxUsernameLength')), 'UsernameTooLong' => sprintf('Your username should be around %d to %d characters long.', Flux::config('MinUsernameLength'), Flux::config('MaxUsernameLength')), 'PasswordTooShort' => sprintf('Your password should be around %d to %d characters long.', Flux::config('MinPasswordLength'), Flux::config('MaxPasswordLength')), 'PasswordTooLong' => sprintf('Your password should be around %d to %d characters long.', Flux::config('MinPasswordLength'), Flux::config('MaxPasswordLength')), 'PasswordsDoNotMatch' => "Your passwords do not match, please make sure that you'ved typed them both correctly.", 'EmailAddressInUse' => "The e-mail address you've entered is already registered to another account.  Please use a different e-mail address.", 'InvalidEmailAddress' => "The e-mail address you've entered is not in a valid e-mail address format.", 'InvalidGender' => 'Gender should be "M" or "F"', 'InvalidServer' => "The server you've selected does not exist.", 'InvalidSecurityCode' => 'Please enter the security code correctly.', 'CriticalRegisterError' => 'Something bad happened.  Report to an administrator ASAP.', 'AccountEditTitle' => 'Modify Account', 'AccountEditTitle2' => 'Modifying My Account', 'AccountEditTitle3' => 'Modifiying Account (%s)', 'CannotModifyOwnLevel' => 'You cannot modify your own account level.', 'CannotModifyAnyLevel' => 'You cannot modify account levels.', 'CannotModifyLevelSoHigh' => 'You cannot set an account level to be higher than your own.', 'CannotModifyBalance' => 'You cannot modify account balances.', 'InvalidLastLoginDate' => 'Invalid last login date.', 'AccountModified' => 'Account has been modified.', 'AccountEditHeading' => 'Modify Account', 'AccountEditButton' => 'Modify Account', 'AccountEditNotFound' => 'No such account.', 'AccountIndexTitle' => 'List Accounts', 'AccountIndexHeading' => 'Accounts', 'LoginBetweenLabel' => 'Login Between', 'AccountIndexNotFound' => 'No such account.', 'LoginTitle' => 'Log In', 'LoginHeading' => 'Log In', 'LoginButton' => 'Log In', 'LoginPageMakeAccount' => 'Don\'t have an account? <a href="%s">Create one!</a>', 'TemporarilyBanned' => 'Your account is temporarily banned.', 'PermanentlyBanned' => 'Your account is permanently banned.', 'IpBanned' => 'The IP address you are behind is banned.', 'PendingConfirmation' => 'Your account is pending e-mail confirmation.', 'LogoutTitle' => 'Logout', 'LogoutHeading' => 'Logout', 'LogoutInfo' => 'You are now logged out.', 'LogoutInfo2' => 'Please wait a moment while you are <a href="%s">redirected</a>…', 'ResendTitle' => 'Resend Confirmation E-mail', 'ResendEnterUsername' => 'Please enter your account username.', 'ResendEnterEmail' => 'Please enter your e-mail address.', 'ResendFailed' => 'Failed to resend confirmation code.', 'ResendEmailSent' => 'Your confirmation code has been resent, please check your e-mail and proceed to activate your account.', 'ResendHeading' => 'Resend Confirmation E-mail', 'ResendInfo' => 'Please enter your account name and e-mail address you used during the registration of the account to have us resend your confirmation e-mail.', 'ResendServerLabel' => 'Registered Server', 'ResendAccountLabel' => 'Account Username', 'ResendEmailLabel' => 'E-mail Address', 'ResendServerInfo' => 'This is the server the account was registered on.', 'ResendAccountInfo' => 'This is the account name you registered.', 'ResendEmailInfo' => 'This is the e-mail address you used during the registration of the above account.', 'ResendButton' => 'Resend Confirmation E-mail', 'ResetPassTitle' => 'Reset Password', 'ResetPassEnterAccount' => 'Please enter your account username.', 'ResetPassEnterEmail' => 'Please enter your e-mail address.', 'ResetPassFailed' => 'Failed to send reset password e-mail.', 'ResetPassEmailSent' => 'An e-mail has been sent with details on how to reset your password.', 'ResetPassTitle' => 'Reset Password', 'ResetPassInfo' => 'If you lost your password, you can re-set it by entering the e-mail address you used to register your account.', 'ResetPassInfo2' => 'An e-mail will then be sent to the specified address with a link allowing you to reset your password, therefore a valid e-mail address is required.', 'ResetPassServerLabel' => 'Registered Server', 'ResetPassAccountLabel' => 'Account Username', 'ResetPassEmailLabel' => 'E-mail Address', 'ResetPassServerInfo' => 'This is the server the account was registered on.', 'ResetPassAccountInfo' => 'This is the account name you registered.', 'ResetPassEmailInfo' => 'This is the e-mail address you used during the registration of the above account.', 'ResetPassButton' => 'Send Reset Password E-mail', 'ResetPwTitle' => 'Reset Password', 'ResetPwFailed' => 'Failed to re-set password, please try again later.', 'ResetPwDone' => 'Your password has been reset and an e-mail containing your new password has been sent to you.', 'ResetPwDone2' => 'Your password has been reset, but we failed to deliver the e-mail containing your new password.  Please reset again to resolve this issue.', 'TransferTitle' => 'Transfer Donation Credits', 'TransferGreaterThanOne' => 'You can only transfer credits in amounts greater than 1.', 'TransferEnterCharName' => 'You must input the character name of who will receive the credits.', 'TransferNoCharExists' => "Character '%s' does not exist. Please make sure you typed it correctly.", 'TransferNoBalance' => 'You do not have a sufficient balance to make the transfer.', 'TransferUnexpectedError' => 'Unexpected error occurred.', 'TransferSuccessful' => 'Credits have been transferred!', 'TransferHeading' => 'Transfer Donation Credits', 'TransferSubHeading' => 'Credits will be transferred to a character on the %s server.', 'TransferInfo' => 'You currently have %s credit(s).', 'TransferInfo2' => 'Enter the amount you would like to transfer and the character name belonging to the account you would like your credits transferred to.', 'TransferAmountLabel' => 'Amount of Credits', 'TransferCharNameLabel' => 'Character Name', 'TransferAmountInfo' => 'This is the amount of credits you would like to send.', 'TransferCharNameInfo' => 'This is the character name of who will be receiving the credits.', 'TransferConfirm' => 'Are you sure you want to do this?', 'TransferButton' => 'Transfer', 'TransferNoCredits' => 'You have no credits available in your account.', 'ModifyAccountLink' => 'Modify Account', 'AccountViewTitle' => 'View Account', 'AccountViewTitle2' => 'Viewing Account (%s)', 'AccountViewTitle3' => 'Viewing My Account', 'AccountTempBanFailed' => 'Failed to temporarily ban account.', 'AccountPermBanFailed' => 'Failed to permanently ban account.', 'AccountTempBanUnauth' => 'You are unauthorized to place temporary bans on this account.', 'AccountPermBanUnauth' => 'You are unauthorized to place permanent bans on this account.', 'AccountLiftTempBan' => 'Account has been unbanned.', 'AccountLiftPermBan' => 'Account has been unbanned.', 'AccountLiftBanUnauth' => "You are unauthorized to remove this account's ban status.", 'AccountViewHeading' => 'Viewing Account', 'AccountViewDonateLink' => '(Donate!)', 'AccountViewTempBanLabel' => 'Temporary Ban', 'AccountViewPermBanLabel' => 'Permanent Ban', 'AccountViewUnbanLabel' => 'Remove Ban', 'AccountBanReasonLabel' => 'Reason:', 'AccountBanUntilLabel' => 'Ban Until:', 'AccountTempBanButton' => 'Ban Account', 'AccountPermBanButton' => 'Permanently Ban Account', 'AccountTempUnbanButton' => 'Remove Temporary Ban', 'AccountPermUnbanButton' => 'Remove Permanent Ban', 'AccountBanConfirm' => 'Are you sure?', 'AccountBanLogSubHeading' => 'Ban Log for %s (recent to oldest)', 'BanLogBanTypeLabel' => 'Ban Type', 'BanLogBanDateLabel' => 'Ban Date', 'BanLogBanReasonLabel' => 'Ban Reason', 'BanLogBannedByLabel' => 'Banned By', 'BanLogBannedByCP' => 'Control Panel', 'BanTypeUnbanned' => 'Unbanned', 'BanTypePermBanned' => 'Permanently Banned', 'BanTypeTempBanned' => 'Temporarily Banned', 'AccountViewCharSubHead' => 'Characters on %s', 'AccountViewSlotLabel' => 'Slot', 'AccountViewCharLabel' => 'Character Name', 'AccountViewClassLabel' => 'Job Class', 'AccountViewLvlLabel' => 'Base Level', 'AccountViewJlvlLabel' => 'Job Level', 'AccountViewZenyLabel' => 'Zeny', 'AccountViewGuildLabel' => 'Guild', 'AccountViewStatusLabel' => 'Status', 'AccountViewPrefsLabel' => 'Preferences', 'CharModifyPrefsLink' => 'Modify Preferences', 'AccountViewNoChars' => 'This account has no characters on %s.', 'AccountViewStorage' => 'Storage Items of %s', 'AccountViewStorageCount' => '%s has %s storage item(s).', 'AccountViewNoStorage' => 'There are no storage items on this account.', 'AccountViewNotFound' => "Records indicate that the account you're trying to view does not exist.", 'XferLogTitle' => 'Credit Transfer History', 'XferLogHeading' => 'Credit Transfer History', 'XferLogReceivedSubHead' => 'Transfers: Received', 'XferLogSentSubHead' => 'Transfers: Sent', 'XferLogCreditsLabel' => 'Credits', 'XferLogFromLabel' => 'From E-mail', 'XferLogDateLabel' => 'Transfer Date', 'XferLogCharNameLabel' => 'To Character', 'XferLogNotReceived' => 'You have not received any credit transfers.', 'XferLogNotSent' => 'You have not sent any credit transfers.', 'CantResetLookWhenOnline' => 'Cannot reset look while %s is online.', 'ResetLookSuccessful' => "%s's look has been reset!", 'ResetLookFailed' => "Failed to reset %s's look.", 'CantResetPosWhenOnline' => 'Cannot reset position while %s is online.', 'CantResetFromCurrentMap' => "You cannot reset %s's position from the current map.", 'ResetPositionSuccessful' => "%s's position has been reset!", 'ResetPositionFailed' => "Failed to reset %s's position.", 'MissingActionTitle' => 'Missing Action', 'MissingActionHeading' => 'Missing Action!', 'MissingActionModLabel' => 'Module:', 'MissingActionActLabel' => 'Action:', 'MissingActionReqLabel' => 'Request URI:', 'MissingActionLocLabel' => 'File system location:', 'MissingViewTitle' => 'Missing View', 'MissingViewHeading' => 'Missing View!', 'MissingViewModLabel' => 'Module:', 'MissingViewActLabel' => 'Action:', 'MissingViewReqLabel' => 'Request URI:', 'MissingViewLocLabel' => 'File system location:', 'HistoryCpLoginTitle' => 'Control Panel Logins', 'HistoryCpLoginHeading' => 'Control Panel Logins', 'HistoryLoginDateLabel' => 'Login Date/Time', 'HistoryIpAddrLabel' => 'IP Address', 'HistoryErrorCodeLabel' => 'Error Code', 'HistoryNoCpLogins' => 'No control panel login attempts found.', 'HistoryEmailTitle' => 'E-Mail Changes', 'HistoryEmailHeading' => 'E-Mail Changes', 'HistoryEmailRequestDate' => 'Request Date/Time', 'HistoryEmailRequestIp' => 'Request IP', 'HistoryEmailOldAddress' => 'Old E-Mail', 'HistoryEmailNewAddress' => 'New E-Mail', 'HistoryEmailChangeDate' => 'Change Date', 'HistoryEmailChangeIp' => 'Change IP', 'HistoryNoEmailChanges' => 'No e-mail change attempts found.', 'HistoryGameLoginTitle' => 'Game Logins', 'HistoryGameLoginHeading' => 'Game Logins', 'HistoryRepsCodeLabel' => 'Response Code', 'HistoryLogMessageLabel' => 'Log Message', 'HistoryNoGameLogins' => 'No in-game login attempts found.', 'HistoryIndexTitle' => 'My Account History', 'HistoryIndexHeading' => 'My Account History', 'HistoryIndexInfo' => 'Here you can view past account activity of your account.', 'HistoryIndexInfo2' => 'Please select an action from the menu.', 'IpbanAddTitle' => 'Add IP Ban', 'IpbanEnterIpPattern' => 'Please input an IP address or pattern.', 'IpbanInvalidPattern' => 'Invalid IP address or pattern.', 'IpbanEnterReason' => 'Please enter a reason for the IP ban.', 'IpbanSelectUnbanDate' => 'Unban date is required.', 'IpbanFutureDate' => 'Unban date must be specified to a future date.', 'IpbanAlreadyBanned' => 'A matching IP (%s) has already been banned.', 'IpbanPatternBanned' => "The IP address/pattern '%s' has been banned.", 'IpbanAddFailed' => 'Failed to add IP ban.', 'IpbanAddHeading' => 'Add IP Ban', 'IpbanIpAddressLabel' => 'IP Address', 'IpbanReasonLabel' => 'Ban Reason', 'IpbanUnbanDateLabel' => 'Unban Date', 'IpbanIpAddressInfo' => 'You may specify a pattern such as 218.139.*.*', 'IpbanAddButton' => 'Add IP Ban', 'IpbanEditTitle' => 'Modify IP Ban', 'IpbanEditFailed' => 'Failed to modify IP ban.', 'IpbanEditHeading' => 'Modify IP Ban', 'IpbanEditButton' => 'Modify IP Ban', 'IpbanListTitle' => 'IP Ban List', 'IpbanListHeading' => 'IP Ban List', 'IpbanBannedIpLabel' => 'Banned IP', 'IpbanBanDateLabel' => 'Ban Date', 'IpbanBanReasonLabel' => 'Ban Reason', 'IpbanBanExpireLabel' => 'Ban Expiration Date', 'IpbanModifyLink' => 'Modify', 'IpbanUnbanButton' => 'Unban Selected', 'IpbanListNoBans' => 'There are currently no IP bans.', 'IpbanNothingToUnban' => 'Nothing to unban.', 'IpbanUnbanned' => 'Lifted selected IP ban(s)!', 'MailerTitle' => 'Form Mailer', 'MailerHeading' => 'Form Mailer', 'MailerEnterToAddress' => 'Please enter a "to" address.', 'MailerEnterSubject' => 'Please enter a subject.', 'MailerEnterBodyText' => 'Please enter some body text.', 'MailerEmailHasBeenSent' => 'Your e-mail has been successfully sent to %s.', 'MailerFailedToSend' => 'The mailer system failed to send the e-mail.  This could be a misconfiguration.', 'MailerInfo' => 'You may use the below mail form to send an e-mail using the control panel.', 'MailerFromLabel' => 'From', 'MailerToLabel' => 'To', 'MailerSubjectLabel' => 'Subject', 'MailerBodyLabel' => 'Body', 'MailerBodyInfo' => 'Body is in Markdown syntax.', 'MainPageHeading' => 'Flux Control Panel', 'MainPageInfo' => "If you are seeing this page, it's likely that you've successfully installed Flux.", 'MainPageInfo2' => "Would you like to change this page? Well, here's how you can:", 'MainPageStep1' => 'Open "%s" in your text editor.', 'MainPageStep2' => 'Edit the file from your editor and save your changes.', 'MainPageThanks' => 'Thanks for using Flux!', 'PageNotFoundTitle' => '404 Page Not Found', 'PageNotFoundHeading' => 'Page Not Found', 'PageNotFoundInfo' => 'The page you have requested was not found on our server.  Please check the address and make sure it is correct, and try again.', 'DisallowedDuringWoE' => 'The page you have requested is not accessible during WoE.', 'ReloadTitle' => 'Reload Databases', 'ReloadHeading' => 'Reload Databases', 'ReloadInfo' => 'You may reload the server databases here.', 'ReloadInfo2' => 'Please select the database that you would like to reload from the available actions.', 'ReloadMobSkillsTitle' => 'Reload Mob Skills', 'ReloadMobSkillsHeading' => 'Reload Mob Skills', 'ReloadMobSkillsError1' => '%s is not readable.', 'ReloadMobSkillsError2' => '%s is not readable.', 'ReloadMobSkillsError3' => '%s is not writable.', 'ReloadMobSkillsInfo' => 'Mob skills database has been successfully reloaded! (%s bytes written)', 'ServerInfoTitle' => 'Server Information', 'ServerInfoHeading' => 'Server Information', 'ServerInfoText' => "Here you'll find various server information.", 'ServerInfoSubHeading' => 'Information for %s', 'ServerInfoSubHeading2' => 'Job Class Information for %s', 'ServerInfoAccountLabel' => 'Accounts', 'ServerInfoCharLabel' => 'Characters', 'ServerInfoGuildLabel' => 'Guilds', 'ServerInfoPartyLabel' => 'Parties', 'ServerInfoZenyLabel' => 'Zeny', 'ServerStatusTitle' => 'Current Server Status', 'ServerStatusHeading' => 'Server Status', 'ServerStatusInfo' => "Understanding the online and offline status of each server can help you understand how an issue can relate to your problem. For example, if the login server is offline it means that you won't be able to log into the game. The character server and map servers are necessary for the actual gameplay past the point of logging in.", 'ServerStatusServerLabel' => 'Server', 'ServerStatusLoginLabel' => 'Login Server', 'ServerStatusCharLabel' => 'Character Server', 'ServerStatusMapLabel' => 'Map Server', 'ServerStatusOnlineLabel' => 'Players Online', 'TermsTitle' => 'Terms of Service', 'TermsHeading' => 'Terms of Service', 'TermsInfo' => 'Please read before creating an account!', 'TermsInfo2' => "FOR CONTROL PANEL ADMINISTRATOR:  You may add your server's ToS in this view file directly.  The location of the view file is: %s", 'UnauthorizedTitle' => 'Unauthorized', 'UnauthorizedHeading' => 'Unauthorized', 'UnauthorizedInfo' => 'You are unauthorized to view this page. <a href="%s">Redirecting…</a>', 'WoeTitle' => 'WoE Hours', 'WoeHeading' => 'War of Emperium Hours', 'WoeInfo' => "Below are the WoE hours for %s.  These hours are subject to change at anytime, but let's hope not.", 'WoeServerTimeInfo' => 'The current server time is:', 'WoeServerLabel' => 'Servers', 'WoeTimesLabel' => 'War of Emperium Times', 'WoeNotScheduledInfo' => 'There are no scheduled WoE hours.');
Example #15
0
<?php

if (!defined('FLUX_ROOT')) {
    exit;
}
$this->loginRequired(Flux::message('LoginToDonate'));
$title = 'Fazer Uma Doação';
$donationAmount = false;
if (count($_POST) && $params->get('setamount')) {
    $minimum = Flux::config('PagSeguroMin');
    $amount = (double) $params->get('amount');
    if (!$amount || $amount < $minimum) {
        $errorMessage = sprintf('A quantidade de doação deve ser maior ou igual a %s R$!', $this->formatCurrency($minimum));
    } else {
        $donationAmount = $amount;
    }
}
if (!$params->get('setamount') && $params->get('resetamount')) {
    $this->redirect($this->url);
}
Example #16
0
<?php 
}
?>

<form action="<?php 
echo $this->urlWithQs;
?>
" method="post" class="generic-form">
	<table class="generic-form-table">
		<tr>
			<th><label for="email"><?php 
echo htmlspecialchars(Flux::message('EmailChangeLabel'));
?>
</label></th>
			<td><input type="text" name="email" id="email" /></td>
			<td><p><?php 
echo htmlspecialchars(Flux::message('EmailChangeInputNote'));
?>
</p></td>
		</tr>
		<tr>
			<td colspan="2" align="right">
				<input type="submit" value="<?php 
echo htmlspecialchars(Flux::message('EmailChangeButton'));
?>
" />
			</td>
			<td></td>
		</tr>
	</table>
</form>
Example #17
0
		<?php 
        } else {
            ?>
			<?php 
            echo htmlspecialchars($change->change_ip);
            ?>
		<?php 
        }
        ?>
		</td>
	</tr>
	<?php 
    }
    ?>
</table>
</div>
<?php 
    echo $paginator->getHTML();
} else {
    ?>
<p>
	<?php 
    echo htmlspecialchars(Flux::message('HistoryNoPassChanges'));
    ?>
	<a href="javascript:history.go(-1)"><?php 
    echo htmlspecialchars(Flux::message('GoBackLabel'));
    ?>
</a>
</p>
<?php 
}
Example #18
0
                        echo $this->linkToCharacter($cart_item->char_id, $cart_item->char_name, $session->serverName) . "'s";
                        ?>
						<?php 
                    } else {
                        ?>
							<?php 
                        echo htmlspecialchars($cart_item->char_name . "'s");
                        ?>
						<?php 
                    }
                    ?>
					<?php 
                } else {
                    ?>
						<span class="not-applicable"><?php 
                    echo htmlspecialchars(Flux::message('UnknownLabel'));
                    ?>
</span>'s
					<?php 
                }
                ?>
				<?php 
            }
            ?>
				<?php 
            if ($item->card0 == 255 && array_key_exists($item->card1 % 1280, $itemAttributes)) {
                ?>
					<?php 
                echo htmlspecialchars($itemAttributes[$item->card1 % 1280]);
                ?>
				<?php 
<?php

if (!defined('FLUX_ROOT')) {
    exit;
}
$this->loginRequired();
$vfp_sites = Flux::config('FluxTables.vfp_sites');
$vfp_logs = Flux::config('FluxTables.vfp_logs');
$errorMessage = NULL;
// delete voting site
if (isset($_POST['id'])) {
    $id = (int) $params->get('id');
    $sql = "DELETE FROM {$server->loginDatabase}.{$vfp_sites} WHERE id = ?";
    $sth = $server->connection->getStatement($sql);
    $sth->execute(array($id));
    if (!$sth->rowCount()) {
        $errorMessage = Flux::message("VoteSiteDeleteFailed");
    }
    $sql = "DELETE FROM {$server->loginDatabase}.{$vfp_logs} WHERE sites_id = ?";
    $sth = $server->connection->getStatement($sql);
    $sth->execute(array($id));
    if (is_null($errorMessage)) {
        $successMessage = Flux::message("VoteSiteDeleteSuccess");
    }
}
// fetch all voting sites
$sql = "SELECT * FROM {$server->loginDatabase}.{$vfp_sites}";
$sth = $server->connection->getStatement($sql);
$sth->execute();
$votesites_res = $sth->fetchAll();
Example #20
0
 /**
  *
  */
 public function monsterMode($mode)
 {
     $modes = Flux::monsterModeToArray($mode);
     $array = array();
     foreach (Flux::config('MonsterModes')->toArray() as $bit => $name) {
         if (in_array($bit, $modes)) {
             $array[] = $name;
         }
     }
     return $array;
 }
Example #21
0
<?php 
/* Tasklist Addon
 * Created and maintained by Akkarin
 * Current Version: 1.00.04
 */
if (!defined('FLUX_ROOT')) {
    exit;
}
$this->loginRequired();
$option = trim($params->get('option'));
$staffid = trim($params->get('staffid'));
$tbls = Flux::config('FluxTables.TaskListStaffTable');
if (isset($option) && $option == 'delete') {
    $sth = $server->connection->getStatement("DELETE FROM {$server->loginDatabase}.{$tbls} WHERE account_id = ?");
    $sth->execute(array($staffid));
    $this->redirect($this->url('tasks', 'staffsettings'));
}
if (isset($_POST['account_id'])) {
    $ssql = $server->connection->getStatement("SELECT * FROM {$server->loginDatabase}.{$tbls} WHERE account_id = ?");
    $ssql->execute(array($_POST['account_id']));
    $staff = $ssql->fetchAll();
    if ($staff) {
        $session->setMessageData('Account already exists!');
        $this->redirect($this->url('tasks', 'staffsettings'));
    } else {
        if (!isset($_POST['emailalerts']) || $_POST['emailalerts'] == NULL) {
            $_POST['emailalerts'] = '0';
        }
        $sqla = "INSERT INTO {$server->loginDatabase}.{$tbls} (account_id, account_name, preferred_name, emailalerts) ";
        $sqla .= "VALUES (?, ?, ?, ?)";
        $stha = $server->connection->getStatement($sqla);
Example #22
0
    echo htmlspecialchars(Flux::message('ServerStatusCharLabel'));
    ?>
</td>
		<td class="status"><?php 
    echo htmlspecialchars(Flux::message('ServerStatusMapLabel'));
    ?>
</td>
		<td class="status"><?php 
    echo htmlspecialchars(Flux::message('ServerStatusOnlineLabel'));
    ?>
</td>
		<?php 
    if (isset($peak)) {
        ?>
			<td class="status"><?php 
        echo htmlspecialchars(Flux::message('ServerStatusPeakLabel'));
        ?>
</td>
		<?php 
    }
    ?>
	</tr>
	<?php 
    foreach ($gameServers as $serverName => $gameServer) {
        ?>
	<tr>
		<th class="server"><?php 
        echo htmlspecialchars($serverName);
        ?>
</th>
		<td class="status"><?php 
Example #23
0
    $idsLT = implode(', ', array_fill(0, count($groupsLT), '?'));
    $sql .= "AND login.group_id IN ({$idsLT})";
    $bind = array_merge($bind, $groupsLT);
}
if ($days = Flux::config('ZenyRankingThreshold')) {
    $sql .= 'AND TIMESTAMPDIFF(DAY, login.lastlogin, NOW()) <= ? ';
    $bind[] = $days * 24 * 60 * 60;
}
$groupsGEQ = AccountLevel::getGroupID((int) $auth->getGroupLevelToHideFromZenyRank, '>=');
if (!empty($groupsGEQ)) {
    $ids = implode(', ', array_fill(0, count($groupsGEQ), '?'));
    $check1 = "AND login.group_id IN ({$ids})";
    $bind = array_merge($bind, $groupsGEQ);
}
if (!empty($groupsLT)) {
    $check2 = "OR login.group_id IN ({$idsLT})";
    $bind = array_merge($bind, $groupsLT);
}
// Whether or not the character is allowed to hide themselves from the Zeny Ranking.
if (isset($check1) && isset($check2)) {
    $sql .= "AND (((hide_from_zr.value IS NULL OR hide_from_zr.value = 0) {$check1}) {$check2}) ";
}
if (!is_null($jobClass)) {
    $sql .= "AND ch.class = ? ";
    $bind[] = $jobClass;
}
$sql .= "ORDER BY ch.zeny DESC, ch.base_level DESC, ch.base_exp DESC, ch.job_level DESC, ch.job_exp DESC, ch.char_id ASC ";
$sql .= "LIMIT " . (int) Flux::config('ZenyRankingLimit');
$sth = $server->connection->getStatement($sql);
$sth->execute($bind);
$chars = $sth->fetchAll();
Example #24
0
<?php

if (!defined('FLUX_ROOT')) {
    exit;
}
$title = 'Map Statistics';
$bind = array();
$sql = "SELECT last_map AS map_name, COUNT(last_map) AS player_count FROM {$server->charMapDatabase}.`char` ";
if (($hideLevel = (int) Flux::config('HideFromMapStats')) > 0 && !$auth->allowedToSeeHiddenMapStats) {
    $sql .= "LEFT JOIN {$server->loginDatabase}.login ON `char`.account_id = login.account_id ";
}
$sql .= "WHERE online > 0 ";
if ($hideLevel > 0 && !$auth->allowedToSeeHiddenMapStats) {
    $sql .= "AND login.level < ? ";
    $bind[] = $hideLevel;
}
$sql .= " GROUP BY map_name, online HAVING player_count > 0 ORDER BY map_name ASC";
$sth = $server->connection->getStatement($sql);
$sth->execute($bind);
$maps = $sth->fetchAll();
Example #25
0
            if ($item->card1) {
                $cardIDs[] = $item->card1;
                $item->cardsOver++;
            }
            if ($item->card2) {
                $cardIDs[] = $item->card2;
                $item->cardsOver++;
            }
            if ($item->card3) {
                $cardIDs[] = $item->card3;
                $item->cardsOver++;
            }
            if ($item->card0 == 254 || $item->card0 == 255 || $item->card0 == -256 || $item->cardsOver < 0) {
                $item->cardsOver = 0;
            }
        }
        if ($cardIDs) {
            $ids = implode(',', array_fill(0, count($cardIDs), '?'));
            $sql = "SELECT id, name_japanese FROM {$server->charMapDatabase}.items WHERE id IN ({$ids})";
            $sth = $server->connection->getStatement($sql);
            $sth->execute($cardIDs);
            $temp = $sth->fetchAll();
            if ($temp) {
                foreach ($temp as $card) {
                    $cards[$card->id] = $card->name_japanese;
                }
            }
        }
    }
    $itemAttributes = Flux::config('Attributes')->toArray();
}
Example #26
0
</p>
				<p class="important"><?php 
echo htmlspecialchars(Flux::message('PasswordChangeNote2'));
?>
</p>
			</td>
		</tr>
		<tr>
			<th><label for="newpass"><?php 
echo htmlspecialchars(Flux::message('NewPasswordLabel'));
?>
</label></th>
			<td><input type="password" name="newpass" id="newpass" value="" /></td>
		</tr>
		<tr>
			<th><label for="confirmnewpass"><?php 
echo htmlspecialchars(Flux::message('NewPasswordConfirmLabel'));
?>
</label></th>
			<td><input type="password" name="confirmnewpass" id="confirmnewpass" value="" /></td>
		</tr>
		<tr>
			<td colspan="2" align="right">
				<input type="submit" value="<?php 
echo htmlspecialchars(Flux::message('PasswordChangeButton'));
?>
" />
			</td>
		</tr>
	</table>
</form>
Example #27
0
		...
		<label for="banned_by">Banned By:</label>
		<input type="text" name="banned_by" id="banned_by" value="<?php 
echo htmlspecialchars($params->get('banned_by'));
?>
" />
		...
		<label for="ban_type">Ban Type:</label>
		<select name="ban_type" id="ban_type">
			<option value=""<?php 
if (!($ban_type = $params->get('ban_type'))) {
    echo ' selected="selected"';
}
?>
><?php 
echo htmlspecialchars(Flux::message('AllLabel'));
?>
</option>
			<option value="unban"<?php 
if ($ban_type == 'unban') {
    echo ' selected="selected"';
}
?>
>Unban</option>
			<option value="ban"<?php 
if ($ban_type == 'ban') {
    echo ' selected="selected"';
}
?>
>Ban</option>
		</select>
Example #28
0
$tblcat = Flux::config('FluxTables.ServiceDeskCatTable');
$rep = $server->connection->getStatement("SELECT * FROM {$server->loginDatabase}.{$tbl} WHERE status != 'Closed' ORDER BY ticket_id DESC");
$rep->execute();
$ticketlist = $rep->fetchAll();
$rowoutput = NULL;
foreach ($ticketlist as $trow) {
    $catsql = $server->connection->getStatement("SELECT * FROM {$server->loginDatabase}.{$tblcat} WHERE cat_id = ?");
    $catsql->execute(array($trow->category));
    $catlist = $catsql->fetch();
    $rowoutput .= '<tr >
				<td><a href="' . $this->url('servicedesk', 'staffview', array('ticketid' => $trow->ticket_id)) . '" >' . $trow->ticket_id . '</a></td>
				<td>' . $trow->account_id . '</td>
				<td><a href="' . $this->url('servicedesk', 'staffview', array('ticketid' => $trow->ticket_id)) . '" >' . $trow->subject . '</a></td>
				<td><a href="' . $this->url('servicedesk', 'staffview', array('ticketid' => $trow->ticket_id)) . '" >
					' . $catlist->name . '</a></td>
				<td>
					<font color="' . Flux::config('Font' . $trow->status . 'Colour') . '"><strong>' . $trow->status . '</strong></font>
				</td>
				<td width="50">';
    if ($trow->lastreply == '0') {
        $rowoutput .= '<i>None</i>';
    } else {
        $rowoutput .= $trow->lastreply;
    }
    $rowoutput .= '</td>
				<td>
					' . Flux::message('SDGroup' . $trow->team) . '
				</td>
				<td>' . date(Flux::config('DateFormat'), strtotime($trow->timestamp)) . '</td>
			</tr>';
}
Example #29
0
$title = 'Retorno da Transação';
require_once Flux::config('PagSeguroLib');
$donateTable = Flux::config('FluxTables.DonateTable');
$tableBan = Flux::config('FluxTables.AccountBanTable');
$donatePromo = Flux::config('Promotion');
$initPromo = Flux::config('InitPromo');
$donateVar = Flux::config('PagSeguroVar');
$donateFlux = Flux::config('PagSeguroFlux');
$rate = Flux::config('rate');
$hercules = Flux::config('hercules');
if (count($_GET) && isset($_GET['transaction_id'])) {
    $transactionCode = str_replace(' ', '', strtoupper($_GET['transaction_id']));
    if (!preg_match('/^[A-Z 0-9]{8}[-]?[A-Z 0-9]{4}[-]?[A-Z 0-9]{4}[-]?[A-Z 0-9]{4}[-]?[A-Z 0-9]{12}$/', $transactionCode)) {
        $errorMessage = sprintf('Formato do código de transação incorreto! O formato deve ser: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX.');
    } else {
        $transactionCredencial = new PagSeguroAccountCredentials(Flux::config('EmailPagSeguro'), Flux::config('TokenPagseguro'));
        $transactionPagseguro = PagSeguroTransactionSearchService::searchByCode($transactionCredencial, $transactionCode);
        $donateStatus = $transactionPagseguro->getStatus()->getValue();
        $donateRef = $transactionPagseguro->getReference();
        $sql = "SELECT * FROM {$server->loginDatabase}.{$donateTable} WHERE payment_id = ?";
        $sth = $server->connection->getStatement($sql);
        $sth->execute(array($donateRef));
        $donate = $sth->fetch();
        $account = $donate->account_id;
        $donateVal = $donate->payment;
        $status = $donate->payment_status_pagseguro;
        if ($donateStatus != $status) {
            switch ($donateStatus) {
                case 1:
                    $sql = "UPDATE {$server->loginDatabase}.{$donateTable} ";
                    $sql .= "SET payment_code = ?, payment_status_pagseguro = ?, payment_status = ? ";
Example #30
0
<?php

if (!defined('FLUX_ROOT')) {
    exit;
}
$pages = Flux::config('FluxTables.CMSPagesTable');
$path = trim($params->get('path'));
$sql = "SELECT title, body, modified FROM {$server->loginDatabase}.{$pages} WHERE path = ?";
$sth = $server->connection->getStatement($sql);
$sth->execute(array($path));
$pages = $sth->fetchAll();
if ($pages) {
    foreach ($pages as $prow) {
        $title = $prow->title;
        $body = $prow->body;
        $modified = $prow->modified;
    }
} else {
    $this->redirect($this->url('main', 'index'));
}