Esempio n. 1
0
                unset($iData, $xml);
            }
            // make sure we found something before we continue
            if (!rewardsFound($items)) {
                echo 'No rewards were found.';
                $cache->close();
                exit;
            }
            // now we need to build the actual html
            $language = new wowhead_language();
            $language->loadLanguage($lang);
            $html = '';
            foreach ($items as $key => $standing) {
                if (sizeof($standing) > 0) {
                    $html .= '<table class="faction-table" cellspacing="0" cellpadding="2">';
                    $html .= '<tr><th>' . $language->words[$key] . '</th></tr>';
                    $html .= '<tr><td>';
                    foreach ($standing as $item) {
                        $html .= "<div style=\"padding-left: 5px; display: block;\"><div class=\"iconsmall\" style=\"background: url(" . $item['icon'] . ") no-repeat scroll 4px 4px; top: 5px;\"><div class=\"tile\"><a href=\"" . $item['url'] . "\" target=\"_blank\" /></a></div></div><span style=\"height: 20px; display: inline; padding-top: 3px;\"><a class=\"q" . $item['quality'] . "\" href=\"" . $item['url'] . "\" target=\"_blank\">[" . $item['name'] . "]</a></span></div>\n";
                    }
                    $html .= '</tr></td></table><br />';
                }
            }
            $cache->saveFactionRewards($html, $id, $lang);
            print $html;
        }
    } else {
        print stripslashes($result['rewards']);
    }
}
$cache->close();