Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php /** * @ PHP 5.6 * @ Decoder version : 1.0.0.4 * @ Release on : 24.03.2018 ..
Decoded Output download
<?php
/**
* @ PHP 5.6
* @ Decoder version : 1.0.0.4
* @ Release on : 24.03.2018
* @ Website : http://EasyToYou.eu
*
* @ Zend guard decoder PHP 5.6
**/
echo '<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.6/js/jquery.fancybox.min.js"></script>' . "
" . '<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/velocity/1.4.3/velocity.min.js"></script>' . "
" . '<link rel="stylesheet" href="https://cdn.jsdelivr.net/fancybox/2.1.5/jquery.fancybox.min.css"/>' . "
";
!isLoggedIn() ? redirect(1, 'login') : NULL;
canAccessModule($_SESSION['username'], 'wheeloffortune', 'block');
echo "
" . '<div class="sub-page-title">' . "
" . ' <div id="title">' . "
" . ' <h1>' . lang('module_titles_txt_3', true) . '<p></p><span></span></h1>' . "
" . ' </div>' . "
" . '</div>';
if (check_value($_GET['sub']) && ($_GET['sub'] == 'history')) {
echo "
" . '<div class="container_2 account" align="center">' . "
" . ' <div class="cont-image">' . "
" . ' <div class="container_3 account_sub_header">' . "
" . ' <div class="grad">' . "
" . ' <div class="page-title"><p>' . lang('wheeloffortune_txt_1', true) . '</p></div>' . "
" . ' <div class="sub-active-page">' . lang('wheeloffortune_txt_11', true) . '</div>' . "
" . ' <a href="' . __BASE_URL__ . 'usercp/wheeloffortune" style="background-image: none;padding: 9px 12px 10px 10px">' . lang('wheeloffortune_txt_12', true) . '</a>' . "
" . ' <a href="' . __BASE_URL__ . 'usercp">' . lang('global_module_1', true) . '</a>' . "
" . ' </div>' . "
" . ' </div>' . "
" . ' <div class="page-desc-holder"></div>' . "
" . ' ' . "
" . ' <div class="account-wide" align="center">' . "
" . ' <table width="100%" class="irq">' . "
" . ' <tr>' . "
" . ' <th>' . lang('wheeloffortune_txt_20', true) . '</th>' . "
" . ' <th>' . lang('wheeloffortune_txt_24', true) . '</th>' . "
" . ' <th>' . lang('wheeloffortune_txt_21', true) . '</th>' . "
" . ' </tr>';
$history = $dB->query_fetch('SELECT TOP 50 * FROM IMPERIAMUCMS_WHEEL_OF_FORTUNE WHERE AccountID = ? ORDER BY date DESC', array($_SESSION['username']));
if (is_array($history)) {
foreach ($history as $thisRow) {
echo "
" . ' <tr>' . "
" . ' <td>' . date($config['time_date_format'], strtotime($thisRow['date'])) . '</td>' . "
" . ' <td>' . $thisRow['reward_title'] . '</td>' . "
" . ' <td>';
if (0 < $thisRow['price']) {
echo $thisRow['price'] . ' ';
switch ($thisRow['price_type']) {
case 1:
$currencyName = lang('currency_platinum', true);
break;
case 2:
$currencyName = lang('currency_gold', true);
break;
case 3:
$currencyName = lang('currency_silver', true);
break;
case 4:
$currencyName = lang('currency_wcoinc', true);
break;
case -4:
$currencyName = lang('currency_wcoinp', true);
break;
case 5:
$currencyName = lang('currency_gp', true);
break;
case 6:
$currencyName = 'Zen';
break;
case 7:
$currencyName = 'Jewel of Bless';
break;
case 8:
$currencyName = 'Jewel of Soul';
break;
case 9:
$currencyName = 'Jewel of Life';
break;
case 10:
$currencyName = 'Jewel of Chaos';
break;
case 11:
$currencyName = 'Jewel of Harmony';
break;
case 12:
$currencyName = 'Jewel of Creation';
break;
case 13:
$currencyName = 'Jewel of Guardian';
break;
}
$query = (, array($thisRow['price_type']));
$currencyName = $query['name'];
break;
echo $currencyName;
}
else {
echo lang('wheeloffortune_txt_23', true);
}
echo "
" . ' </td>' . "
" . ' </tr>';
}
}
else {
echo "
" . ' <tr>' . "
" . ' <td colspan="3" align="center">';
message('info', lang('wheeloffortune_txt_22', true));
echo "
" . ' </td>' . "
" . ' </tr>';
}
echo "
" . ' </table>' . "
" . ' </div>' . "
" . ' </div>' . "
" . '</div>';
}
else {
echo "
" . '<div class="container_2 account" align="center">' . "
" . ' <div class="cont-image">' . "
" . ' <div class="container_3 account_sub_header">' . "
" . ' <div class="grad">' . "
" . ' <div class="page-title"><p>' . lang('wheeloffortune_txt_1', true) . '</p></div>' . "
" . ' <a href="' . __BASE_URL__ . 'usercp/wheeloffortune?sub=history" style="background-image: none;padding: 9px 12px 10px 10px">' . lang('wheeloffortune_txt_10', true) . '</a>' . "
" . ' <a href="' . __BASE_URL__ . 'usercp">' . lang('global_module_1', true) . '</a>' . "
" . ' </div>' . "
" . ' </div>' . "
" . ' <div class="page-desc-holder">';
$intervalInfo = false;
if ((mconfig('enabled_month_day_start') != '-1') && (mconfig('enabled_month_day_end') != '-1')) {
if (mconfig('enabled_month_day_start') == mconfig('enabled_month_day_end')) {
echo sprintf(lang('wheeloffortune_txt_4', true), sprintf(lang('wheeloffortune_txt_5', true), mconfig('enabled_month_day_start')), sprintf(lang('wheeloffortune_txt_9', true), mconfig('enabled_hour_start'), mconfig('enabled_hour_end')));
}
else {
echo sprintf(lang('wheeloffortune_txt_4', true), sprintf(lang('wheeloffortune_txt_6', true), mconfig('enabled_month_day_start'), mconfig('enabled_month_day_end')), sprintf(lang('wheeloffortune_txt_9', true), mconfig('enabled_hour_start'), mconfig('enabled_hour_end')));
}
$intervalInfo = true;
}
if ((mconfig('enabled_week_day_start') != '-1') && (mconfig('enabled_week_day_end') != '-1')) {
if (mconfig('enabled_week_day_start') == mconfig('enabled_week_day_end')) {
echo sprintf(lang('wheeloffortune_txt_4', true), sprintf(lang('wheeloffortune_txt_7', true), returnDayName(mconfig('enabled_week_day_start'))), sprintf(lang('wheeloffortune_txt_9', true), mconfig('enabled_hour_start'), mconfig('enabled_hour_end')));
}
else {
echo sprintf(lang('wheeloffortune_txt_4', true), sprintf(lang('wheeloffortune_txt_8', true), returnDayName(mconfig('enabled_week_day_start')), returnDayName(mconfig('enabled_week_day_end'))), sprintf(lang('wheeloffortune_txt_9', true), mconfig('enabled_hour_start'), mconfig('enabled_hour_end')));
}
$intervalInfo = true;
}
if ((lang('wheeloffortune_txt_13', true) != NULL) && (lang('wheeloffortune_txt_13', true) != '')) {
if ($intervalInfo) {
echo '<br><br>';
}
echo lang('wheeloffortune_txt_13', true);
}
$totalCurrency = 0;
switch (mconfig('price_type')) {
case 1:
if (config('MEMB_CREDITS_MEMUONLINE', true)) {
$totalCurrency = $dB2->query_fetch_single('SELECT platinum FROM MEMB_CREDITS WHERE memb___id = ?', array($_SESSION['username']));
}
else {
$totalCurrency = $dB->query_fetch_single('SELECT platinum FROM MEMB_CREDITS WHERE memb___id = ?', array($_SESSION['username']));
}
$totalCurrency = $totalCurrency['platinum'];
$currencyName = lang('currency_platinum', true);
break;
case 2:
if (config('MEMB_CREDITS_MEMUONLINE', true)) {
$totalCurrency = $dB2->query_fetch_single('SELECT gold FROM MEMB_CREDITS WHERE memb___id = ?', array($_SESSION['username']));
}
else {
$totalCurrency = $dB->query_fetch_single('SELECT gold FROM MEMB_CREDITS WHERE memb___id = ?', array($_SESSION['username']));
}
$totalCurrency = $totalCurrency['gold'];
$currencyName = lang('currency_gold', true);
break;
case 3:
if (config('MEMB_CREDITS_MEMUONLINE', true)) {
$totalCurrency = $dB2->query_fetch_single('SELECT silver FROM MEMB_CREDITS WHERE memb___id = ?', array($_SESSION['username']));
}
else {
$totalCurrency = $dB->query_fetch_single('SELECT silver FROM MEMB_CREDITS WHERE memb___id = ?', array($_SESSION['username']));
}
$totalCurrency = $totalCurrency['silver'];
$currencyName = lang('currency_silver', true);
break;
case 4:
if (100 <= config('server_files_season', true)) {
$totalCurrency = $dB->query_fetch_single('SELECT WCoin FROM T_InGameShop_Point WHERE AccountID = ?', array($username));
$totalCurrency = $totalCurrency['WCoin'];
}
else {
$totalCurrency = $dB->query_fetch_single('SELECT WCoinC FROM T_InGameShop_Point WHERE AccountID = ?', array($username));
$totalCurrency = $totalCurrency['WCoinC'];
}
$currencyName = lang('currency_wcoinc', true);
break;
case -4:
$totalCurrency = $dB->query_fetch_single('SELECT WCoinP FROM T_InGameShop_Point WHERE AccountID = ?', array($username));
$totalCurrency = $totalCurrency['WCoinP'];
$currencyName = lang('currency_wcoinp', true);
break;
case 5:
$totalCurrency = $dB->query_fetch_single('SELECT GoblinPoint FROM T_InGameShop_Point WHERE AccountID = ?', array($username));
$totalCurrency = $totalCurrency['GoblinPoint'];
$currencyName = lang('currency_gp', true);
break;
case 6:
$totalCurrency = $dB->query_fetch_single('SELECT zen FROM IMPERIAMUCMS_WEB_BANK WHERE AccountID = ?', array($username));
$totalCurrency = $totalCurrency['zen'];
$currencyName = 'Zen';
break;
case 7:
$totalCurrency = $dB->query_fetch_single('SELECT bless FROM IMPERIAMUCMS_WEB_BANK WHERE AccountID = ?', array($username));
$totalCurrency = $totalCurrency['bless'];
$currencyName = 'Jewel of Bless';
break;
case 8:
$totalCurrency = $dB->query_fetch_single('SELECT soul FROM IMPERIAMUCMS_WEB_BANK WHERE AccountID = ?', array($username));
$totalCurrency = $totalCurrency['soul'];
$currencyName = 'Jewel of Soul';
break;
case 9:
$totalCurrency = $dB->query_fetch_single('SELECT life FROM IMPERIAMUCMS_WEB_BANK WHERE AccountID = ?', array($username));
$totalCurrency = $totalCurrency['life'];
$currencyName = 'Jewel of Life';
break;
case 10:
$totalCurrency = $dB->query_fetch_single('SELECT chaos FROM IMPERIAMUCMS_WEB_BANK WHERE AccountID = ?', array($username));
$totalCurrency = $totalCurrency['chaos'];
$currencyName = 'Jewel of Chaos';
break;
case 11:
$totalCurrency = $dB->query_fetch_single('SELECT harmony FROM IMPERIAMUCMS_WEB_BANK WHERE AccountID = ?', array($username));
$totalCurrency = $totalCurrency['harmony'];
$currencyName = 'Jewel of Harmony';
break;
case 12:
$totalCurrency = $dB->query_fetch_single('SELECT creation FROM IMPERIAMUCMS_WEB_BANK WHERE AccountID = ?', array($username));
$totalCurrency = $totalCurrency['creation'];
$currencyName = 'Jewel of Creation';
break;
case 13:
$totalCurrency = $dB->query_fetch_single('SELECT guardian FROM IMPERIAMUCMS_WEB_BANK WHERE AccountID = ?', array($username));
$totalCurrency = $totalCurrency['guardian'];
$currencyName = 'Jewel of Guardian';
break;
}
$query = (, array($currencyId));
$dbName = str_replace(' ', '_', $query['name']);
$totalCurrency = $dB->query_fetch_single('SELECT ' . $dbName . ' FROM IMPERIAMUCMS_WEB_BANK WHERE AccountID = ?', array($username));
$totalCurrency = $totalCurrency[$dbName];
$query = $dB->query_fetch_single('SELECT name FROM IMPERIAMUCMS_WEB_BANK_CUSTOM WHERE ident = ?', array($thisRow['price_type']));
$currencyName = $query['name'];
break;
echo '<p>' . sprintf(lang('wheeloffortune_txt_25', true), mconfig('price'), $currencyName) . '</p>';
echo '<p>' . sprintf(lang('wheeloffortune_txt_26', true), $totalCurrency, $currencyName) . '</p>';
echo "
" . ' </div>';
if (mconfig('active')) {
if (__LICENSE__) {
$General = new General();
$General->checkModuleLicense('wheeloffortune');
$General->checkLocalModuleLicense('wheeloffortune');
}
$time = time();
$todayStart = date('Y-m-d 00:00:00', $time);
$todayEnd = date('Y-m-d 23:59:59', $time);
$currentMonthDay = date('j', $time);
$currentWeekDay = date('N', $time);
$currentHour = date('G', $time);
$monthDay_start = mconfig('enabled_month_day_start');
$monthDay_end = mconfig('enabled_month_day_end');
$weekDay_start = mconfig('enabled_week_day_start');
$weekDay_end = mconfig('enabled_week_day_end');
$hour_start = mconfig('enabled_hour_start');
$hour_end = mconfig('enabled_hour_end');
$check_monthDay = false;
$check_weekDay = false;
$check_hour = false;
if (($monthDay_start == '-1') && ($monthDay_end == '-1')) {
$check_monthDay = true;
}
else if (($monthDay_start <= $currentMonthDay) && ($currentMonthDay <= $monthDay_end)) {
$check_monthDay = true;
}
if (($weekDay_start == '-1') && ($weekDay_end == '-1')) {
$check_weekDay = true;
}
else if (($weekDay_start <= $currentWeekDay) && ($currentWeekDay <= $weekDay_end)) {
$check_weekDay = true;
}
if (($hour_start <= $currentHour) && ($currentHour < $hour_end)) {
$check_hour = true;
}
if (!($check_monthDay && $check_weekDay && $check_hour)) {
message('info', lang('wheeloffortune_txt_16', true));
}
echo "
" . ' <div class="container_3 account-wide" align="center" style="padding-top: 20px; padding-bottom: 1px;">';
$totalItems = mconfig('items');
$degreesPerItem = 360 / $totalItems;
$circleCount = mconfig('circle_count');
$circleDegrees = $circleCount * 360;
$intervalMin = mconfig('interval_min');
$intervalMax = mconfig('interval_max');
echo "
" . ' <style>' . "
" . ' .hide {' . "
" . ' display: none;' . "
" . ' }' . "
" . ' ';
$circle = 1758.4000000000001;
if ($totalItems == 6) {
$cssLeft = '-100px';
}
else if ($totalItems == 8) {
$cssLeft = '-59px';
}
else if ($totalItems == 10) {
$cssLeft = '-38px';
}
else if ($totalItems == 12) {
$cssLeft = '-22px';
}
else if ($totalItems == 14) {
$cssLeft = '-10px';
}
else if ($totalItems == 16) {
$cssLeft = '-2px';
}
else {
$cssLeft = 0;
}
echo "
" . ' .itembg {' . "
" . ' top: 0;' . "
" . ' width: 0;' . "
" . ' height: 0;' . "
" . ' border-left: ' . ($circle / $totalItems / 1.8500000000000001) . 'px solid transparent;' . "
" . ' border-right: ' . ($circle / $totalItems / 1.8500000000000001) . 'px solid transparent;' . "
" . ' border-top: 268px solid rgba(62, 46, 38, 1);' . "
" . ' left: ' . $cssLeft . ';' . "
" . ' }';
$i = 0;
while ($i < $totalItems) {
echo "
" . ' .wheel li:nth-child(' . ($i + 1) . ') {' . "
" . ' -webkit-transform: rotate(' . ($i * $degreesPerItem) . 'deg);' . "
" . ' -moz-transform: rotate(' . ($i * $degreesPerItem) . 'deg);' . "
" . ' -ms-transform: rotate(' . ($i * $degreesPerItem) . 'deg);' . "
" . ' -o-transform: rotate(' . ($i * $degreesPerItem) . 'deg);' . "
" . ' transform: rotate(' . ($i * $degreesPerItem) . 'deg);';
echo "
" . ' }';
++$i;
}
echo ' .wheel li:nth-child(odd) img {' . "
" . ' -webkit-opacity: 0.8;' . "
" . ' -moz-opacit: 0.8;' . "
" . ' opacity: 0.8;' . "
" . ' }' . "
" . ' </style>' . "
" . ' <div class="skills-wheel">' . "
" . ' <ul class="wheel">' . "
" . ' ';
$hiddenPopups = '';
$i = 0;
$rewards = mconfig('rewards');
if (is_array($rewards['reward'])) {
foreach ($rewards['reward'] as $thisReward) {
if (($thisReward['@attributes']['custombg'] == '1') && ($thisReward['@attributes']['bgcolor'] != NULL) && ($thisReward['@attributes']['bgcolor'] != '')) {
$customBg = ' style="border-top: 268px solid #' . $thisReward['@attributes']['bgcolor'] . ';"';
}
else {
$customBg = '';
}
echo "
" . ' <li>' . "
" . ' <img class="itembg" src="' . __PATH_TEMPLATE__ . 'style/images/triangle1.png"' . $customBg . ' />' . "
" . ' <a href="#item' . $i . '" title="' . $thisReward['@attributes']['title'] . '" class="fancybox">' . "
" . ' <img src="' . __PATH_TEMPLATE__ . 'img/items/' . $thisReward['@attributes']['img'] . '" title="' . $thisReward['@attributes']['title'] . '" />' . "
" . ' </a>' . "
" . ' </li>';
$hiddenPopups .= "
" . ' <div id="item' . $i . '" class="hide">' . "
" . ' <h2>' . lang('wheeloffortune_txt_3', true) . '</h2>' . "
" . ' <p>' . $thisReward['@attributes']['title'] . '</p>' . "
" . ' <p>' . $thisReward['@attributes']['desc'] . '</p>' . "
" . ' </div>';
++$i;
}
}
echo ' </ul>' . "
" . ' <a href="#/" id="spin" title="';
lang('wheeloffortune_txt_2', false);
echo '"' . "
" . ' class="btn">';
lang('wheeloffortune_txt_2', false);
echo '</a>' . "
" . ' </div>' . "
" . ' ';
if (!($check_monthDay && $check_weekDay && $check_hour)) {
echo '<div style="width: 600px; height: 560px; background: rgba(0, 0, 0, .5); z-index: 9999; position: relative; margin-top: -584px; margin-bottom: 20px; border-radius: 20px;"></div>';
}
echo $hiddenPopups;
echo "
" . '<script>' . "
" . 'var _target, _deg = 0;' . "
" . 'var request;' . "
" . 'function startAnimation(serverMsg) {' . "
" . ' // start animation' . "
" . ' // reset opacity of all segments to 1' . "
" . ' $(".fancybox").parent("li").velocity({' . "
" . ' opacity: 1' . "
" . ' }, {' . "
" . ' duration: 100,' . "
" . ' complete: function () {' . "
" . ' $(".wheel").velocity({' . "
" . ' rotateZ: "-" + _deg + "deg"' . "
" . ' }, {' . "
" . ' duration: 15000,' . "
" . ' easing: "easeInOutQuart",' . "
" . ' complete: function (elements) {' . "
" . ' ' . "
" . ' //alert("success: " + serverMsg);' . "
" . ' ' . "
" . ' // after spinning animation is completed, set opacity of target segment\'s parent' . "
" . ' $(".fancybox").parent("li").eq(_target).velocity({' . "
" . ' opacity: 0.4' . "
" . ' }, {' . "
" . ' duration: 1000,' . "
" . ' // after opacity is completed, fire targeted segment in fancybox' . "
" . ' complete: function () {' . "
" . ' //$(".fancybox").eq(_target).trigger("click");' . "
" . ' $(".page-desc-holder").after("<div class=\'container_3 green wide fading-notification\' align=\'left\'><span class=\'error_icons success\'></span><p>' . lang('notification_success', true) . ' " + serverMsg + "</p></div>"); ' . "
" . ' enableFading();' . "
" . ' $("#spin").removeClass("spinDisabled");' . "
" . ' } // third animation completed' . "
" . ' }); // nested velocity 2' . "
" . ' } // second animation completed' . "
" . ' }); // nested velocity 1' . "
" . ' } // first animation completed' . "
" . ' }); // velocity' . "
" . '}' . "
" . 'function enableFading() {' . "
" . ' var delay = 10000;' . "
" . ' $(\'.fading-notification\').each(function(){' . "
" . ' $(this).delay(delay).fadeOut(500);' . "
" . ' delay = delay + 500;' . "
" . ' });' . "
" . '}' . "
" . '$(document).ready(function ($) {' . "
" . ' $(".skills-wheel .btn").on("click", function (e) {' . "
" . ' $("#spin").addClass("spinDisabled");' . "
" . ' // Abort any pending request' . "
" . ' if (request) {' . "
" . ' request.abort();' . "
" . ' }' . "
" . ' request = $.ajax({' . "
" . ' url: "' . __BASE_URL__ . 'ajax/wheeloffortune.php",' . "
" . ' type: "post", ' . "
" . ' data: "deg=" + _deg,' . "
" . ' success: function(data) {' . "
" . ' var jsonData = JSON.parse(data);' . "
" . ' //alert("success: " + data);' . "
" . ' if (jsonData.error) {' . "
" . ' $(".page-desc-holder").after("<div class=\'container_3 red wide fading-notification\' align=\'left\'><span class=\'error_icons attention\'></span><p>' . lang('notification_error', true) . ' " + jsonData.error + "</p></div>"); ' . "
" . ' enableFading();' . "
" . ' $("#spin").removeClass("spinDisabled");' . "
" . ' } else {' . "
" . ' _deg = jsonData.deg;' . "
" . ' _target = jsonData.target;' . "
" . ' startAnimation(jsonData.msg);' . "
" . ' }' . "
" . ' }' . "
" . ' });' . "
" . ' return false;' . "
" . ' }); // click' . "
" . ' // initialize fancybox' . "
" . ' $(".fancybox").fancybox({' . "
" . ' maxWidth: "85%"' . "
" . ' });' . "
" . '}); // ready' . "
" . '</script>';
echo "
" . ' </div>';
}
else {
message('error', lang('error_47', true));
}
echo "
" . ' </div>' . "
" . '</div>';
}
?>
Did this file decode correctly?
Original Code
<?php
/**
* @ PHP 5.6
* @ Decoder version : 1.0.0.4
* @ Release on : 24.03.2018
* @ Website : http://EasyToYou.eu
*
* @ Zend guard decoder PHP 5.6
**/
echo '<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.6/js/jquery.fancybox.min.js"></script>' . "\r\n" . '<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/velocity/1.4.3/velocity.min.js"></script>' . "\r\n" . '<link rel="stylesheet" href="https://cdn.jsdelivr.net/fancybox/2.1.5/jquery.fancybox.min.css"/>' . "\r\n";
!isLoggedIn() ? redirect(1, 'login') : NULL;
canAccessModule($_SESSION['username'], 'wheeloffortune', 'block');
echo "\r\n" . '<div class="sub-page-title">' . "\r\n" . ' <div id="title">' . "\r\n" . ' <h1>' . lang('module_titles_txt_3', true) . '<p></p><span></span></h1>' . "\r\n" . ' </div>' . "\r\n" . '</div>';
if (check_value($_GET['sub']) && ($_GET['sub'] == 'history')) {
echo "\r\n" . '<div class="container_2 account" align="center">' . "\r\n" . ' <div class="cont-image">' . "\r\n" . ' <div class="container_3 account_sub_header">' . "\r\n" . ' <div class="grad">' . "\r\n" . ' <div class="page-title"><p>' . lang('wheeloffortune_txt_1', true) . '</p></div>' . "\r\n" . ' <div class="sub-active-page">' . lang('wheeloffortune_txt_11', true) . '</div>' . "\r\n" . ' <a href="' . __BASE_URL__ . 'usercp/wheeloffortune" style="background-image: none;padding: 9px 12px 10px 10px">' . lang('wheeloffortune_txt_12', true) . '</a>' . "\r\n" . ' <a href="' . __BASE_URL__ . 'usercp">' . lang('global_module_1', true) . '</a>' . "\r\n" . ' </div>' . "\r\n" . ' </div>' . "\r\n" . ' <div class="page-desc-holder"></div>' . "\r\n" . ' ' . "\r\n" . ' <div class="account-wide" align="center">' . "\r\n" . ' <table width="100%" class="irq">' . "\r\n" . ' <tr>' . "\r\n" . ' <th>' . lang('wheeloffortune_txt_20', true) . '</th>' . "\r\n" . ' <th>' . lang('wheeloffortune_txt_24', true) . '</th>' . "\r\n" . ' <th>' . lang('wheeloffortune_txt_21', true) . '</th>' . "\r\n" . ' </tr>';
$history = $dB->query_fetch('SELECT TOP 50 * FROM IMPERIAMUCMS_WHEEL_OF_FORTUNE WHERE AccountID = ? ORDER BY date DESC', array($_SESSION['username']));
if (is_array($history)) {
foreach ($history as $thisRow) {
echo "\r\n" . ' <tr>' . "\r\n" . ' <td>' . date($config['time_date_format'], strtotime($thisRow['date'])) . '</td>' . "\r\n" . ' <td>' . $thisRow['reward_title'] . '</td>' . "\r\n" . ' <td>';
if (0 < $thisRow['price']) {
echo $thisRow['price'] . ' ';
switch ($thisRow['price_type']) {
case 1:
$currencyName = lang('currency_platinum', true);
break;
case 2:
$currencyName = lang('currency_gold', true);
break;
case 3:
$currencyName = lang('currency_silver', true);
break;
case 4:
$currencyName = lang('currency_wcoinc', true);
break;
case -4:
$currencyName = lang('currency_wcoinp', true);
break;
case 5:
$currencyName = lang('currency_gp', true);
break;
case 6:
$currencyName = 'Zen';
break;
case 7:
$currencyName = 'Jewel of Bless';
break;
case 8:
$currencyName = 'Jewel of Soul';
break;
case 9:
$currencyName = 'Jewel of Life';
break;
case 10:
$currencyName = 'Jewel of Chaos';
break;
case 11:
$currencyName = 'Jewel of Harmony';
break;
case 12:
$currencyName = 'Jewel of Creation';
break;
case 13:
$currencyName = 'Jewel of Guardian';
break;
}
$query = (, array($thisRow['price_type']));
$currencyName = $query['name'];
break;
echo $currencyName;
}
else {
echo lang('wheeloffortune_txt_23', true);
}
echo "\r\n" . ' </td>' . "\r\n" . ' </tr>';
}
}
else {
echo "\r\n" . ' <tr>' . "\r\n" . ' <td colspan="3" align="center">';
message('info', lang('wheeloffortune_txt_22', true));
echo "\r\n" . ' </td>' . "\r\n" . ' </tr>';
}
echo "\r\n" . ' </table>' . "\r\n" . ' </div>' . "\r\n" . ' </div>' . "\r\n" . '</div>';
}
else {
echo "\r\n" . '<div class="container_2 account" align="center">' . "\r\n" . ' <div class="cont-image">' . "\r\n" . ' <div class="container_3 account_sub_header">' . "\r\n" . ' <div class="grad">' . "\r\n" . ' <div class="page-title"><p>' . lang('wheeloffortune_txt_1', true) . '</p></div>' . "\r\n" . ' <a href="' . __BASE_URL__ . 'usercp/wheeloffortune?sub=history" style="background-image: none;padding: 9px 12px 10px 10px">' . lang('wheeloffortune_txt_10', true) . '</a>' . "\r\n" . ' <a href="' . __BASE_URL__ . 'usercp">' . lang('global_module_1', true) . '</a>' . "\r\n" . ' </div>' . "\r\n" . ' </div>' . "\r\n" . ' <div class="page-desc-holder">';
$intervalInfo = false;
if ((mconfig('enabled_month_day_start') != '-1') && (mconfig('enabled_month_day_end') != '-1')) {
if (mconfig('enabled_month_day_start') == mconfig('enabled_month_day_end')) {
echo sprintf(lang('wheeloffortune_txt_4', true), sprintf(lang('wheeloffortune_txt_5', true), mconfig('enabled_month_day_start')), sprintf(lang('wheeloffortune_txt_9', true), mconfig('enabled_hour_start'), mconfig('enabled_hour_end')));
}
else {
echo sprintf(lang('wheeloffortune_txt_4', true), sprintf(lang('wheeloffortune_txt_6', true), mconfig('enabled_month_day_start'), mconfig('enabled_month_day_end')), sprintf(lang('wheeloffortune_txt_9', true), mconfig('enabled_hour_start'), mconfig('enabled_hour_end')));
}
$intervalInfo = true;
}
if ((mconfig('enabled_week_day_start') != '-1') && (mconfig('enabled_week_day_end') != '-1')) {
if (mconfig('enabled_week_day_start') == mconfig('enabled_week_day_end')) {
echo sprintf(lang('wheeloffortune_txt_4', true), sprintf(lang('wheeloffortune_txt_7', true), returnDayName(mconfig('enabled_week_day_start'))), sprintf(lang('wheeloffortune_txt_9', true), mconfig('enabled_hour_start'), mconfig('enabled_hour_end')));
}
else {
echo sprintf(lang('wheeloffortune_txt_4', true), sprintf(lang('wheeloffortune_txt_8', true), returnDayName(mconfig('enabled_week_day_start')), returnDayName(mconfig('enabled_week_day_end'))), sprintf(lang('wheeloffortune_txt_9', true), mconfig('enabled_hour_start'), mconfig('enabled_hour_end')));
}
$intervalInfo = true;
}
if ((lang('wheeloffortune_txt_13', true) != NULL) && (lang('wheeloffortune_txt_13', true) != '')) {
if ($intervalInfo) {
echo '<br><br>';
}
echo lang('wheeloffortune_txt_13', true);
}
$totalCurrency = 0;
switch (mconfig('price_type')) {
case 1:
if (config('MEMB_CREDITS_MEMUONLINE', true)) {
$totalCurrency = $dB2->query_fetch_single('SELECT platinum FROM MEMB_CREDITS WHERE memb___id = ?', array($_SESSION['username']));
}
else {
$totalCurrency = $dB->query_fetch_single('SELECT platinum FROM MEMB_CREDITS WHERE memb___id = ?', array($_SESSION['username']));
}
$totalCurrency = $totalCurrency['platinum'];
$currencyName = lang('currency_platinum', true);
break;
case 2:
if (config('MEMB_CREDITS_MEMUONLINE', true)) {
$totalCurrency = $dB2->query_fetch_single('SELECT gold FROM MEMB_CREDITS WHERE memb___id = ?', array($_SESSION['username']));
}
else {
$totalCurrency = $dB->query_fetch_single('SELECT gold FROM MEMB_CREDITS WHERE memb___id = ?', array($_SESSION['username']));
}
$totalCurrency = $totalCurrency['gold'];
$currencyName = lang('currency_gold', true);
break;
case 3:
if (config('MEMB_CREDITS_MEMUONLINE', true)) {
$totalCurrency = $dB2->query_fetch_single('SELECT silver FROM MEMB_CREDITS WHERE memb___id = ?', array($_SESSION['username']));
}
else {
$totalCurrency = $dB->query_fetch_single('SELECT silver FROM MEMB_CREDITS WHERE memb___id = ?', array($_SESSION['username']));
}
$totalCurrency = $totalCurrency['silver'];
$currencyName = lang('currency_silver', true);
break;
case 4:
if (100 <= config('server_files_season', true)) {
$totalCurrency = $dB->query_fetch_single('SELECT WCoin FROM T_InGameShop_Point WHERE AccountID = ?', array($username));
$totalCurrency = $totalCurrency['WCoin'];
}
else {
$totalCurrency = $dB->query_fetch_single('SELECT WCoinC FROM T_InGameShop_Point WHERE AccountID = ?', array($username));
$totalCurrency = $totalCurrency['WCoinC'];
}
$currencyName = lang('currency_wcoinc', true);
break;
case -4:
$totalCurrency = $dB->query_fetch_single('SELECT WCoinP FROM T_InGameShop_Point WHERE AccountID = ?', array($username));
$totalCurrency = $totalCurrency['WCoinP'];
$currencyName = lang('currency_wcoinp', true);
break;
case 5:
$totalCurrency = $dB->query_fetch_single('SELECT GoblinPoint FROM T_InGameShop_Point WHERE AccountID = ?', array($username));
$totalCurrency = $totalCurrency['GoblinPoint'];
$currencyName = lang('currency_gp', true);
break;
case 6:
$totalCurrency = $dB->query_fetch_single('SELECT zen FROM IMPERIAMUCMS_WEB_BANK WHERE AccountID = ?', array($username));
$totalCurrency = $totalCurrency['zen'];
$currencyName = 'Zen';
break;
case 7:
$totalCurrency = $dB->query_fetch_single('SELECT bless FROM IMPERIAMUCMS_WEB_BANK WHERE AccountID = ?', array($username));
$totalCurrency = $totalCurrency['bless'];
$currencyName = 'Jewel of Bless';
break;
case 8:
$totalCurrency = $dB->query_fetch_single('SELECT soul FROM IMPERIAMUCMS_WEB_BANK WHERE AccountID = ?', array($username));
$totalCurrency = $totalCurrency['soul'];
$currencyName = 'Jewel of Soul';
break;
case 9:
$totalCurrency = $dB->query_fetch_single('SELECT life FROM IMPERIAMUCMS_WEB_BANK WHERE AccountID = ?', array($username));
$totalCurrency = $totalCurrency['life'];
$currencyName = 'Jewel of Life';
break;
case 10:
$totalCurrency = $dB->query_fetch_single('SELECT chaos FROM IMPERIAMUCMS_WEB_BANK WHERE AccountID = ?', array($username));
$totalCurrency = $totalCurrency['chaos'];
$currencyName = 'Jewel of Chaos';
break;
case 11:
$totalCurrency = $dB->query_fetch_single('SELECT harmony FROM IMPERIAMUCMS_WEB_BANK WHERE AccountID = ?', array($username));
$totalCurrency = $totalCurrency['harmony'];
$currencyName = 'Jewel of Harmony';
break;
case 12:
$totalCurrency = $dB->query_fetch_single('SELECT creation FROM IMPERIAMUCMS_WEB_BANK WHERE AccountID = ?', array($username));
$totalCurrency = $totalCurrency['creation'];
$currencyName = 'Jewel of Creation';
break;
case 13:
$totalCurrency = $dB->query_fetch_single('SELECT guardian FROM IMPERIAMUCMS_WEB_BANK WHERE AccountID = ?', array($username));
$totalCurrency = $totalCurrency['guardian'];
$currencyName = 'Jewel of Guardian';
break;
}
$query = (, array($currencyId));
$dbName = str_replace(' ', '_', $query['name']);
$totalCurrency = $dB->query_fetch_single('SELECT ' . $dbName . ' FROM IMPERIAMUCMS_WEB_BANK WHERE AccountID = ?', array($username));
$totalCurrency = $totalCurrency[$dbName];
$query = $dB->query_fetch_single('SELECT name FROM IMPERIAMUCMS_WEB_BANK_CUSTOM WHERE ident = ?', array($thisRow['price_type']));
$currencyName = $query['name'];
break;
echo '<p>' . sprintf(lang('wheeloffortune_txt_25', true), mconfig('price'), $currencyName) . '</p>';
echo '<p>' . sprintf(lang('wheeloffortune_txt_26', true), $totalCurrency, $currencyName) . '</p>';
echo "\r\n" . ' </div>';
if (mconfig('active')) {
if (__LICENSE__) {
$General = new General();
$General->checkModuleLicense('wheeloffortune');
$General->checkLocalModuleLicense('wheeloffortune');
}
$time = time();
$todayStart = date('Y-m-d 00:00:00', $time);
$todayEnd = date('Y-m-d 23:59:59', $time);
$currentMonthDay = date('j', $time);
$currentWeekDay = date('N', $time);
$currentHour = date('G', $time);
$monthDay_start = mconfig('enabled_month_day_start');
$monthDay_end = mconfig('enabled_month_day_end');
$weekDay_start = mconfig('enabled_week_day_start');
$weekDay_end = mconfig('enabled_week_day_end');
$hour_start = mconfig('enabled_hour_start');
$hour_end = mconfig('enabled_hour_end');
$check_monthDay = false;
$check_weekDay = false;
$check_hour = false;
if (($monthDay_start == '-1') && ($monthDay_end == '-1')) {
$check_monthDay = true;
}
else if (($monthDay_start <= $currentMonthDay) && ($currentMonthDay <= $monthDay_end)) {
$check_monthDay = true;
}
if (($weekDay_start == '-1') && ($weekDay_end == '-1')) {
$check_weekDay = true;
}
else if (($weekDay_start <= $currentWeekDay) && ($currentWeekDay <= $weekDay_end)) {
$check_weekDay = true;
}
if (($hour_start <= $currentHour) && ($currentHour < $hour_end)) {
$check_hour = true;
}
if (!($check_monthDay && $check_weekDay && $check_hour)) {
message('info', lang('wheeloffortune_txt_16', true));
}
echo "\r\n" . ' <div class="container_3 account-wide" align="center" style="padding-top: 20px; padding-bottom: 1px;">';
$totalItems = mconfig('items');
$degreesPerItem = 360 / $totalItems;
$circleCount = mconfig('circle_count');
$circleDegrees = $circleCount * 360;
$intervalMin = mconfig('interval_min');
$intervalMax = mconfig('interval_max');
echo "\r\n" . ' <style>' . "\r\n" . ' .hide {' . "\r\n" . ' display: none;' . "\r\n" . ' }' . "\r\n\r\n" . ' ';
$circle = 1758.4000000000001;
if ($totalItems == 6) {
$cssLeft = '-100px';
}
else if ($totalItems == 8) {
$cssLeft = '-59px';
}
else if ($totalItems == 10) {
$cssLeft = '-38px';
}
else if ($totalItems == 12) {
$cssLeft = '-22px';
}
else if ($totalItems == 14) {
$cssLeft = '-10px';
}
else if ($totalItems == 16) {
$cssLeft = '-2px';
}
else {
$cssLeft = 0;
}
echo "\r\n" . ' .itembg {' . "\r\n" . ' top: 0;' . "\r\n" . ' width: 0;' . "\r\n" . ' height: 0;' . "\r\n" . ' border-left: ' . ($circle / $totalItems / 1.8500000000000001) . 'px solid transparent;' . "\r\n" . ' border-right: ' . ($circle / $totalItems / 1.8500000000000001) . 'px solid transparent;' . "\r\n" . ' border-top: 268px solid rgba(62, 46, 38, 1);' . "\r\n" . ' left: ' . $cssLeft . ';' . "\r\n" . ' }';
$i = 0;
while ($i < $totalItems) {
echo "\r\n" . ' .wheel li:nth-child(' . ($i + 1) . ') {' . "\r\n" . ' -webkit-transform: rotate(' . ($i * $degreesPerItem) . 'deg);' . "\r\n" . ' -moz-transform: rotate(' . ($i * $degreesPerItem) . 'deg);' . "\r\n" . ' -ms-transform: rotate(' . ($i * $degreesPerItem) . 'deg);' . "\r\n" . ' -o-transform: rotate(' . ($i * $degreesPerItem) . 'deg);' . "\r\n" . ' transform: rotate(' . ($i * $degreesPerItem) . 'deg);';
echo "\r\n" . ' }';
++$i;
}
echo ' .wheel li:nth-child(odd) img {' . "\r\n" . ' -webkit-opacity: 0.8;' . "\r\n" . ' -moz-opacit: 0.8;' . "\r\n" . ' opacity: 0.8;' . "\r\n" . ' }' . "\r\n" . ' </style>' . "\r\n\r\n" . ' <div class="skills-wheel">' . "\r\n" . ' <ul class="wheel">' . "\r\n" . ' ';
$hiddenPopups = '';
$i = 0;
$rewards = mconfig('rewards');
if (is_array($rewards['reward'])) {
foreach ($rewards['reward'] as $thisReward) {
if (($thisReward['@attributes']['custombg'] == '1') && ($thisReward['@attributes']['bgcolor'] != NULL) && ($thisReward['@attributes']['bgcolor'] != '')) {
$customBg = ' style="border-top: 268px solid #' . $thisReward['@attributes']['bgcolor'] . ';"';
}
else {
$customBg = '';
}
echo "\r\n" . ' <li>' . "\r\n" . ' <img class="itembg" src="' . __PATH_TEMPLATE__ . 'style/images/triangle1.png"' . $customBg . ' />' . "\r\n" . ' <a href="#item' . $i . '" title="' . $thisReward['@attributes']['title'] . '" class="fancybox">' . "\r\n" . ' <img src="' . __PATH_TEMPLATE__ . 'img/items/' . $thisReward['@attributes']['img'] . '" title="' . $thisReward['@attributes']['title'] . '" />' . "\r\n" . ' </a>' . "\r\n" . ' </li>';
$hiddenPopups .= "\r\n" . ' <div id="item' . $i . '" class="hide">' . "\r\n" . ' <h2>' . lang('wheeloffortune_txt_3', true) . '</h2>' . "\r\n" . ' <p>' . $thisReward['@attributes']['title'] . '</p>' . "\r\n" . ' <p>' . $thisReward['@attributes']['desc'] . '</p>' . "\r\n" . ' </div>';
++$i;
}
}
echo ' </ul>' . "\r\n\r\n" . ' <a href="#/" id="spin" title="';
lang('wheeloffortune_txt_2', false);
echo '"' . "\r\n" . ' class="btn">';
lang('wheeloffortune_txt_2', false);
echo '</a>' . "\r\n" . ' </div>' . "\r\n\r\n" . ' ';
if (!($check_monthDay && $check_weekDay && $check_hour)) {
echo '<div style="width: 600px; height: 560px; background: rgba(0, 0, 0, .5); z-index: 9999; position: relative; margin-top: -584px; margin-bottom: 20px; border-radius: 20px;"></div>';
}
echo $hiddenPopups;
echo "\r\n" . '<script>' . "\r\n" . 'var _target, _deg = 0;' . "\r\n" . 'var request;' . "\r\n\r\n" . 'function startAnimation(serverMsg) {' . "\r\n" . ' // start animation' . "\r\n" . ' // reset opacity of all segments to 1' . "\r\n" . ' $(".fancybox").parent("li").velocity({' . "\r\n" . ' opacity: 1' . "\r\n" . ' }, {' . "\r\n" . ' duration: 100,' . "\r\n" . ' complete: function () {' . "\r\n" . ' $(".wheel").velocity({' . "\r\n" . ' rotateZ: "-" + _deg + "deg"' . "\r\n" . ' }, {' . "\r\n" . ' duration: 15000,' . "\r\n" . ' easing: "easeInOutQuart",' . "\r\n" . ' complete: function (elements) {' . "\r\n" . ' ' . "\r\n" . ' //alert("success: " + serverMsg);' . "\r\n" . ' ' . "\r\n" . ' // after spinning animation is completed, set opacity of target segment\'s parent' . "\r\n" . ' $(".fancybox").parent("li").eq(_target).velocity({' . "\r\n" . ' opacity: 0.4' . "\r\n" . ' }, {' . "\r\n" . ' duration: 1000,' . "\r\n" . ' // after opacity is completed, fire targeted segment in fancybox' . "\r\n" . ' complete: function () {' . "\r\n" . ' //$(".fancybox").eq(_target).trigger("click");' . "\r\n" . ' $(".page-desc-holder").after("<div class=\'container_3 green wide fading-notification\' align=\'left\'><span class=\'error_icons success\'></span><p>' . lang('notification_success', true) . ' " + serverMsg + "</p></div>"); ' . "\r\n" . ' enableFading();' . "\r\n" . ' $("#spin").removeClass("spinDisabled");' . "\r\n" . ' } // third animation completed' . "\r\n" . ' }); // nested velocity 2' . "\r\n" . ' } // second animation completed' . "\r\n" . ' }); // nested velocity 1' . "\r\n" . ' } // first animation completed' . "\r\n" . ' }); // velocity' . "\r\n" . '}' . "\r\n\r\n" . 'function enableFading() {' . "\r\n" . ' var delay = 10000;' . "\r\n" . ' $(\'.fading-notification\').each(function(){' . "\r\n" . ' $(this).delay(delay).fadeOut(500);' . "\r\n" . ' delay = delay + 500;' . "\r\n" . ' });' . "\r\n" . '}' . "\r\n\r\n" . '$(document).ready(function ($) {' . "\r\n" . ' $(".skills-wheel .btn").on("click", function (e) {' . "\r\n" . ' $("#spin").addClass("spinDisabled");' . "\r\n" . ' // Abort any pending request' . "\r\n" . ' if (request) {' . "\r\n" . ' request.abort();' . "\r\n" . ' }' . "\r\n" . ' request = $.ajax({' . "\r\n" . ' url: "' . __BASE_URL__ . 'ajax/wheeloffortune.php",' . "\r\n" . ' type: "post", ' . "\r\n" . ' data: "deg=" + _deg,' . "\r\n" . ' success: function(data) {' . "\r\n" . ' var jsonData = JSON.parse(data);' . "\r\n" . ' //alert("success: " + data);' . "\r\n" . ' if (jsonData.error) {' . "\r\n" . ' $(".page-desc-holder").after("<div class=\'container_3 red wide fading-notification\' align=\'left\'><span class=\'error_icons attention\'></span><p>' . lang('notification_error', true) . ' " + jsonData.error + "</p></div>"); ' . "\r\n" . ' enableFading();' . "\r\n" . ' $("#spin").removeClass("spinDisabled");' . "\r\n" . ' } else {' . "\r\n" . ' _deg = jsonData.deg;' . "\r\n" . ' _target = jsonData.target;' . "\r\n" . ' startAnimation(jsonData.msg);' . "\r\n" . ' }' . "\r\n" . ' }' . "\r\n" . ' });' . "\r\n" . ' return false;' . "\r\n" . ' }); // click' . "\r\n\r\n" . ' // initialize fancybox' . "\r\n" . ' $(".fancybox").fancybox({' . "\r\n" . ' maxWidth: "85%"' . "\r\n" . ' });' . "\r\n" . '}); // ready' . "\r\n" . '</script>';
echo "\r\n" . ' </div>';
}
else {
message('error', lang('error_47', true));
}
echo "\r\n" . ' </div>' . "\r\n" . '</div>';
}
?>
Function Calls
| None |
Stats
| MD5 | 092fc2f57bfd2c115fc8797acea7adaf |
| Eval Count | 0 |
| Decode Time | 107 ms |