Esempio n. 1
0
    } else {
        if ($tpl['result'] == 'need_promised_amount') {
            require_once ABSPATH . 'content/promised_amount_add.php';
        } else {
            if ($tpl['result'] == 'need_commission') {
                require_once ABSPATH . 'content/change_commission.php';
            } else {
                if ($tpl['result'] == 'full_mining_menu') {
                    $tpl['last_tx'] = get_last_tx($user_id, types_to_ids(array('new_user', 'new_miner', 'new_promised_amount', 'change_promised_amount', 'votes_miner', 'change_geolocation', 'votes_promised_amount', 'del_promised_amount', 'cash_request_out', 'cash_request_in', 'votes_complex', 'for_repaid_fix', 'new_holidays', 'actualization_promised_amounts', 'mining', 'new_miner_update', 'change_host', 'change_commission')), 3);
                    if (!empty($tpl['last_tx'])) {
                        $tpl['last_tx_formatted'] = make_last_txs($tpl['last_tx']);
                    }
                    require_once ABSPATH . 'templates/mining_menu.tpl';
                } else {
                    // сколько у нас осталось попыток стать майнером.
                    $count_attempt = ParseData::count_miner_attempt($db, $user_id, 'user_voting');
                    $variables = ParseData::get_variables($db, array('miner_votes_attempt'));
                    $tpl['miner_votes_attempt'] = $variables['miner_votes_attempt'] - $count_attempt;
                    // комментарии проголосовавших
                    $db->query(__FILE__, __LINE__, __FUNCTION__, __CLASS__, __METHOD__, 'SET NAMES latin1');
                    $res = $db->query(__FILE__, __LINE__, __FUNCTION__, __CLASS__, __METHOD__, '
		SELECT *
		FROM `' . DB_PREFIX . MY_PREFIX . 'my_comments`
		WHERE `comment` != "null" AND
					 `type` NOT IN ("arbitrator","seller")
		');
                    while ($row = $db->fetchArray($res)) {
                        $tpl['my_comments'][] = $row;
                    }
                    require_once ABSPATH . 'templates/upgrade.tpl';
                }