コード例 #1
0
ファイル: faction.php プロジェクト: ubick/lorekeepers.org
     }
     $xml = simplexml_load_string($iData, 'SimpleXMLElement', LIBXML_NOCDATA);
     if ($xml->error == '') {
         $items[$standings[(int) $match[10]]][] = array('name' => (string) $xml->item->name, 'id' => (string) $xml->item['id'], 'quality' => (string) $xml->item->quality['id'], 'lang' => $lang, 'icon' => 'http://static.wowhead.com/images/icons/small/' . strtolower($xml->item->icon) . '.jpg', 'url' => getDomain($lang) . '?item=' . (string) $xml->item['id']);
     }
     $rLine = str_replace($match[0], '', $rLine);
     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;
コード例 #2
0
ファイル: recruit.php プロジェクト: ubick/lorekeepers.org
    $val = max($one, $two, $three);
    if ($val == $one) {
        return $armory_image_url . 'images/talents/' . $class . '/1.gif';
    } elseif ($val == $two) {
        return $armory_image_url . 'images/talents/' . $class . '/2.gif';
    } else {
        return $armory_image_url . 'images/talents/' . $class . '/3.gif';
    }
}
$slot_ids = array('ammo', 'head', 'neck', 'shoulder', 'shirt', 'chest', 'belt', 'legs', 'feet', 'wrist', 'gloves', 'ring1', 'ring2', 'trinket1', 'trinket2', 'back', 'main_hand', 'off_hand', 'ranged', 'tabard');
// ten man raid ids
$raid_ten = array(1876, 622, 562, 564, 566, 568, 576, 4396, 2888, 2892, 2890, 2886, 2894, 3917, 3918, 4531, 4529, 4527, 4530, 4528, 4532, 4628, 4630, 4631, 4583, 4629, 4636);
// twenty-five man raid ids
$raid_twenty_five = array(625, 623, 563, 565, 567, 569, 577, 4397, 2889, 2893, 2891, 2887, 2895, 3916, 3812, 4604, 4606, 4607, 4597, 4605, 4608, 4632, 4634, 4635, 4584, 4633, 4637);
$wowhead_url = WHP_LANG == 'en' ? 'http://www.wowhead.com/' : 'http://' . strtolower(WHP_LANG) . '.wowhead.com/';
$language = new wowhead_language();
$language->loadLanguage(WHP_LANG);
// get the shizzle from $_GET
$mode = urldecode($_GET['mode']);
$name = urldecode($_GET['name']);
$realm = !array_key_exists('realm', $_GET) ? $recruit_realm : urldecode($_GET['realm']);
$region = !array_key_exists('region', $_GET) ? $recriot_region : urldecode($_GET['region']);
// connect to mysql and select the database
$conn = mysql_connect(WHP_DB_HOST, WHP_DB_USER, WHP_DB_PASS) or die(mysql_error());
mysql_select_db(WHP_DB_NAME) or die(mysql_error());
if ($name == '') {
    print 'No name provided.';
    mysql_close($conn);
    exit;
}
if ($mode == '') {