本文整理汇总了PHP中achievementinfo2函数的典型用法代码示例。如果您正苦于以下问题:PHP achievementinfo2函数的具体用法?PHP achievementinfo2怎么用?PHP achievementinfo2使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了achievementinfo2函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: unset
unset($achievements);
$rows = $DB->select('
SELECT a.id, a.faction, a.name_loc?d AS name, a.description_loc?d AS description, a.category, a.points, s.iconname, z.areatableID
FROM ?_spellicons s, ?_achievement a
LEFT JOIN (?_zones z) ON a.map != -1 AND a.map = z.mapID
WHERE
a.icon = s.id
{ AND a.category = ? }
GROUP BY a.id
ORDER BY a.`order` ASC
', $_SESSION['locale'], $_SESSION['locale'], isset($category) ? $category : DBSIMPLE_SKIP);
if ($rows) {
$achievements = array();
$achievements['data'] = array();
foreach ($rows as $row) {
$achievements['data'][] = achievementinfo2($row);
}
if (isset($category)) {
$catrow = $DB->selectRow('
SELECT c1.id, c1.name_loc?d AS name, c2.id AS id2
FROM ?_achievementcategory c1
LEFT JOIN (?_achievementcategory c2) ON c1.parentAchievement != -1 AND c1.parentAchievement = c2.id
WHERE
c1.id = ?
', $_SESSION['locale'], $category);
if ($catrow) {
$achievements['category1'] = $catrow['id'];
$achievements['category2'] = $catrow['id2'];
$achievements['category'] = $catrow['name'];
}
}
示例2: JOIN
SELECT a.id, a.faction, a.name_loc?d AS name, a.description_loc?d AS description, a.category, a.points, s.iconname, z.areatableID
FROM ?_spellicons s, ?_achievementcriteria c, ?_achievement a
LEFT JOIN (?_zones z) ON a.map != -1 AND a.map = z.mapID
WHERE
a.icon = s.id
AND a.id = c.refAchievement
AND c.type IN (?a)
AND c.value1 = ?d
GROUP BY a.id
ORDER BY a.name_loc?d
', $_SESSION['locale'], $_SESSION['locale'], array(ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST), $quest['entry'], $_SESSION['locale']);
if ($rows) {
$quest['criteria_of'] = array();
foreach ($rows as $row) {
allachievementsinfo2($row['id']);
$quest['criteria_of'][] = achievementinfo2($row);
}
}
// Награды и благодарности, присылаемые почтой
if ($quest['RewMailTemplateId']) {
if (!($quest['mailrewards'] = loot('mail_loot_template', $quest['RewMailTemplateId']))) {
unset($quest['mailrewards']);
}
}
if ($quest['RewMailDelaySecs']) {
$quest['maildelay'] = sec_to_time($quest['RewMailDelaySecs']);
}
save_cache(QUEST_PAGE, $cache_key, $quest);
}
global $page;
$page = array('Mapper' => false, 'Book' => false, 'Title' => $quest['Title'] . ' - ' . $smarty->get_config_vars('Quests'), 'tab' => 0, 'type' => 5, 'typeid' => $quest['entry'], 'path' => path(0, 5));
示例3: JOIN
SELECT a.id, a.faction, a.name_loc?d AS name, a.description_loc?d AS description, a.category, a.points, s.iconname, z.areatableID
FROM ?_spellicons s, ?_achievementcriteria c, ?_achievement a
LEFT JOIN (?_zones z) ON a.map != -1 AND a.map = z.mapID
WHERE
a.icon = s.id
AND a.id = c.refAchievement
AND c.type IN (?a)
AND c.value1 = ?d
GROUP BY a.id
ORDER BY a.name_loc?d
', $_SESSION['locale'], $_SESSION['locale'], array(ACHIEVEMENT_CRITERIA_TYPE_GAIN_REPUTATION), $faction['entry'], $_SESSION['locale']);
if ($rows) {
$faction['criteria_of'] = array();
foreach ($rows as $row) {
allachievementsinfo2($row['id']);
$faction['criteria_of'][] = achievementinfo2($row);
}
}
save_cache(FACTION_PAGE, $cache_key, $faction);
}
}
$page = array('Mapper' => false, 'Book' => false, 'Title' => $faction['name'] . ' - ' . $smarty->get_config_vars('Factions'), 'tab' => 0, 'type' => 8, 'typeid' => $faction['entry'], 'path' => path(0, 7, $faction['category2'], $faction['category']));
$smarty->assign('page', $page);
// Комментарии
$smarty->assign('comments', getcomments($page['type'], $page['typeid']));
// Данные о квесте
$smarty->assign('faction', $faction);
// Количество MySQL запросов
$smarty->assign('mysql', $DB->getStatistics());
// Загружаем страницу
$smarty->display('faction.tpl');
示例4: JOIN
SELECT a.id, a.faction, a.name_loc?d AS name, a.description_loc?d AS description, a.category, a.points, s.iconname, z.areatableID
FROM ?_spellicons s, ?_achievementcriteria c, ?_achievement a
LEFT JOIN (?_zones z) ON a.map != -1 AND a.map = z.mapID
WHERE
a.icon = s.id
AND a.id = c.refAchievement
AND c.type IN (?a)
AND c.value1 = ?d
GROUP BY a.id
ORDER BY a.name_loc?d
', $_SESSION['locale'], $_SESSION['locale'], array(ACHIEVEMENT_CRITERIA_TYPE_USE_GAMEOBJECT, ACHIEVEMENT_CRITERIA_TYPE_FISH_IN_GAMEOBJECT), $object['entry'], $_SESSION['locale']);
if ($rows) {
$object['criteria_of'] = array();
foreach ($rows as $row) {
allachievementsinfo2($row['id']);
$object['criteria_of'][] = achievementinfo2($row);
}
}
// Положения объектофф:
$object['position'] = position($object['entry'], 'gameobject');
// Исправить type, чтобы подсвечивались event-овые объекты
if ($object['position']) {
foreach ($object['position'] as $z => $zone) {
foreach ($zone['points'] as $p => $pos) {
if ($pos['type'] == 0 && ($events = event_find(array('object_guid' => $pos['guid'])))) {
$names = array_select_key(event_name($events), 'name');
$object['position'][$z]['points'][$p]['type'] = 4;
$object['position'][$z]['points'][$p]['events'] = implode(", ", $names);
}
}
}
示例5: JOIN
// Цель критерии
$rows = $DB->select('
SELECT a.id, a.faction, a.name_loc?d AS name, a.description_loc?d AS description, a.category, a.points, s.iconname, z.areatableID
FROM ?_spellicons s, ?_achievementcriteria c, ?_achievement a
LEFT JOIN (?_zones z) ON a.map != -1 AND a.map = z.mapID
WHERE
a.icon = s.id
AND a.id = c.refAchievement
AND c.type IN (?a)
AND c.value1 = ?d
GROUP BY a.id
ORDER BY a.name_loc?d
', $_SESSION['locale'], $_SESSION['locale'], array(ACHIEVEMENT_CRITERIA_TYPE_OWN_ITEM, ACHIEVEMENT_CRITERIA_TYPE_USE_ITEM, ACHIEVEMENT_CRITERIA_TYPE_LOOT_ITEM, ACHIEVEMENT_CRITERIA_TYPE_EQUIP_ITEM), $item['entry'], $_SESSION['locale']);
if ($rows) {
$item['criteria_of'] = array();
foreach ($rows as $row) {
allachievementsinfo2($row['id']);
$item['criteria_of'][] = achievementinfo2($row);
}
}
save_cache(ITEM_PAGE, $cache_key, $item);
}
global $page;
$page = array('Mapper' => false, 'Book' => false, 'Title' => $item['name'] . ' - ' . $smarty->get_config_vars('Items'), 'tab' => 0, 'type' => 3, 'typeid' => $item['entry'], 'path' => path(0, 0, $item['type'], $item['subclass'], $item['classs']));
$smarty->assign('page', $page);
// Комментарии
$smarty->assign('comments', getcomments($page['type'], $page['typeid']));
// Количество MySQL запросов
$smarty->assign('mysql', $DB->getStatistics());
$smarty->assign('item', $item);
$smarty->display('item.tpl');
示例6: JOIN
$rows = $DB->select('
SELECT a.id, a.faction, a.name_loc?d AS name, a.description_loc?d AS description, a.category, a.points, s.iconname, z.areatableID
FROM ?_spellicons s, ?_achievementcriteria c, ?_achievement a
LEFT JOIN (?_zones z) ON a.map != -1 AND a.map = z.mapID
WHERE
a.icon = s.id
AND a.id = c.refAchievement
AND c.type IN (?a)
AND c.value1 = ?d
GROUP BY a.id
ORDER BY a.name_loc?d
', $_SESSION['locale'], $_SESSION['locale'], array(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET2, ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL, ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL2, ACHIEVEMENT_CRITERIA_TYPE_LEARN_SPELL), $spell['entry'], $_SESSION['locale']);
if ($rows) {
$spell['criteria_of'] = array();
foreach ($rows as $row) {
allachievementsinfo2($row['id']);
$spell['criteria_of'][] = achievementinfo2($row);
}
}
save_cache(SPELL_PAGE, $cache_key, $spell);
}
}
global $page;
$page = array('Mapper' => false, 'Book' => false, 'Title' => $spell['name'] . ' - ' . $smarty->get_config_vars('Spells'), 'tab' => 0, 'type' => 6, 'typeid' => $spell['entry'], 'path' => path(0, 1));
$smarty->assign('page', $page);
// Комментарии
$smarty->assign('comments', getcomments($page['type'], $page['typeid']));
// Количество MySQL запросов
$smarty->assign('mysql', $DB->getStatistics());
$smarty->assign('spell', $spell);
$smarty->display('spell.tpl');
示例7: foreach
FROM ?_itemset
WHERE name_loc' . $_SESSION['locale'] . ' LIKE ?
LIMIT ' . $AoWoWconf["limit"] . '
', $nsearch);
foreach ($rows as $row) {
$found['itemset'][] = itemsetinfo2($row);
}
// Достижения
$rows = $DB->select('
SELECT *
FROM ?_achievement
WHERE name_loc' . $_SESSION['locale'] . ' LIKE ?
LIMIT ' . $AoWoWconf["limit"] . '
', $nsearch);
foreach ($rows as $row) {
$found['achievement'][] = achievementinfo2($row);
}
// Ищем спеллы
$rows = $DB->select('
SELECT ?#, spellID
FROM ?_spell s, ?_spellicons i
WHERE
s.spellname_loc' . $_SESSION['locale'] . ' like ?
AND i.id = s.spellicon
LIMIT ' . $AoWoWconf["limit"] . '
', $spell_cols[2], $nsearch);
foreach ($rows as $row) {
$found['spell'][] = spellinfo2($row);
}
}
$keys = array_keys($found);