当前位置: 首页>>代码示例>>PHP>>正文


PHP item::out方法代码示例

本文整理汇总了PHP中item::out方法的典型用法代码示例。如果您正苦于以下问题:PHP item::out方法的具体用法?PHP item::out怎么用?PHP item::out使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在item的用法示例。


在下文中一共展示了item::out方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: search

 function search($search, $limit = 10, $page = 0)
 {
     global $roster;
     $first = $page * $limit;
     $sql = "SELECT `players`.`name`, `players`.`member_id`, `players`.`server`, `players`.`region`, `items`.*" . " FROM `" . $roster->db->table('items') . "` AS items,`" . $roster->db->table('players') . "` AS players" . " WHERE `items`.`member_id` = `players`.`member_id`" . " AND (`items`.`item_name` LIKE '%{$search}%' OR `items`.`item_tooltip` LIKE '%{$search}%')" . ($this->minlvl != '' ? " AND `items`.`level` >= '{$this->minlvl}'" : '') . ($this->maxlvl != '' ? " AND `items`.`level` <= '{$this->maxlvl}'" : '') . $this->quality_sql . " ORDER BY `items`.`item_name` ASC" . ($limit > 0 ? " LIMIT {$first}," . $limit : '') . ';';
     //calculating the search time
     $this->start_search = format_microtime();
     $result = $roster->db->query($sql);
     $this->stop_search = format_microtime();
     $this->time_search = $this->stop_search - $this->start_search;
     $nrows = $roster->db->num_rows($result);
     $x = $limit > $nrows ? $nrows : ($limit > 0 ? $limit : $nrows);
     if ($nrows > 0 && $limit > 0) {
         while ($x > 0) {
             $row = $roster->db->fetch($result);
             $icon = new item($row);
             $item['html'] = '<td class="SearchRowCell">' . $icon->out(true) . '</td>' . '<td class="SearchRowCell">' . $icon->requires_level . '</td>' . '<td class="SearchRowCell"><span style="color:#' . $icon->color . '">[' . $icon->name . ']</span></td>' . '<td class="SearchRowCellRight"><a href="' . makelink('char-info&amp;a=c:' . $row['member_id']) . '"><strong>' . $row['name'] . '</strong></a></td>';
             $this->add_result($item);
             unset($item);
             $x--;
         }
     } else {
         $this->result_count = $nrows;
     }
     $roster->db->free_result($result);
 }
开发者ID:Sajaki,项目名称:wowroster_dev,代码行数:26,代码来源:item.php

示例2: array

    $roster->tpl->assign_block_vars('bankers', array('NAME' => $muleRow['member_name'], 'LINK' => makelink('&amp;mode=' . ($gbank_mode == 1 ? 'full' : 'inv') . '#c_' . $muleRow['member_id'])));
    // Parse the note field for possible html characters
    $prg_find = array('/"/', '/&/', '|\\>|', '|\\<|', "/\\n/");
    $prg_rep = array('&quot;', '&amp;', '&gt;', '&lt;', '<br />');
    $note = preg_replace($prg_find, $prg_rep, $muleRow['member_note']);
    $date_char_data_updated = date_char_updated($muleRow['dateupdatedutc']);
    $itemsOnMuleQuery = "SELECT i.*,LEFT(i.item_id, (LOCATE(':',i.item_id)-1)) AS real_itemid,sum(i.item_quantity) AS total_quantity" . " FROM `" . $roster->db->table('items') . "` AS i" . " WHERE " . $muleRow['member_id'] . " = i.member_id" . " AND i.item_parent!='bags'" . " AND i.item_parent!='equip'" . " AND (i.item_tooltip" . " NOT LIKE '%" . $roster->locale->wordings[$muleRow['clientLocale']]['tooltip_soulbound'] . "%'" . " OR i.item_tooltip" . " LIKE '%" . $roster->locale->wordings[$muleRow['clientLocale']]['tooltip_boe'] . "%')" . " GROUP BY real_itemid" . " ORDER BY i.item_name";
    $itemsOnMule = $roster->db->query($itemsOnMuleQuery);
    $roster->tpl->assign_block_vars('bank', array('ID' => $muleRow['member_id'], 'NAME' => $muleRow['member_name'], 'LINK' => makelink('char-info&amp;a=c:' . $muleRow['member_id']), 'NOTE' => $note, 'UPDATED' => $date_char_data_updated, 'MONEY_G' => $muleRow['gold'], 'MONEY_S' => $muleRow['silver'], 'MONEY_C' => $muleRow['copper'], 'S_ITEMS' => (bool) $roster->db->num_rows(), 'L_NO_INFO' => sprintf($roster->locale->act['gbank_not_loaded'], $muleRow['member_name'])));
    if ($itemsOnMule) {
        $column_counter = 1;
        $striping_counter = 1;
        while ($itemRow = $roster->db->fetch($itemsOnMule)) {
            $itemRow['item_quantity'] = $itemRow['total_quantity'];
            $item = new item($itemRow);
            $roster->tpl->assign_block_vars('bank.items', array('ITEM' => $item->out(), 'ITEM_TOOLTIP' => $item->html_tooltip, 'ROW_CLASS' => $roster->switch_row_class(), 'COUNT' => $column_counter));
            if ($column_counter == $columns) {
                $column_counter = 0;
            }
            $column_counter++;
        }
    }
}
$roster->tpl->set_handle('body', $addon['basename'] . '/guildbank.html');
$roster->tpl->display('body');
/**
 * Gets the last upload date for a character
 *
 * @param int $id | Member ID
 * @return string
 */
开发者ID:Sajaki,项目名称:wowroster_dev,代码行数:31,代码来源:index.php

示例3: explode

     echo '<td class="membersKeyRow' . $rownum . '">';
     echo '<div class="bagSlot">';
     $setpiecename = explode("|", $setpiece);
     // Modification for french localization, thx to Ansgar
     if (isset($SetAlternateName[$setpiecename[0]])) {
         $iquery = "SELECT * FROM `" . $items_table . "` WHERE (item_name = '" . $setpiecename[0] . "' OR item_name = '" . $SetAlternateName[$setpiecename[0]] . "')  AND member_id = '" . $row['member_id'] . "'";
     } else {
         $iquery = "SELECT * FROM `" . $items_table . "` WHERE item_name = '" . $setpiecename[0] . "' AND member_id = '" . $row['member_id'] . "'";
     }
     $iresult = $roster->db->query($iquery) or die_quietly($roster->db->error(), 'Database Error', __FILE__, __LINE__, $iquery);
     $idata = $roster->db->fetch($iresult, SQL_ASSOC);
     // if (!$idata) print "Empty idata"; else {print "\$idata = "; print_r($idata); }
     if ($idata) {
         $item = new item($idata);
         if ($item->name) {
             print $item->out();
         } else {
             echo '<center>N/A</center>';
         }
     } else {
         if ($setpiecename[0]) {
             echo '<span style="z-index: 1000;" onMouseover="return overlib(\'<span class=&quot;tooltipheader&quot; style=&quot;color:#0070dd; font-weight: bold&quot;>' . $setpiecename[0] . '</span><br><span class=&quot;tooltipline&quot; style=&quot;color:#ffffff; font-size: 10px;&quot;>' . $roster->locale->act['DropsFrom'] . ' <b>' . $setpiecename[1] . '</b></span><br><span class=&quot;tooltipline&quot; style=&quot;color:#ffffff; font-size: 10px;&quot;>' . $roster->locale->act['DropsIn'] . ' <b>' . $setpiecename[2] . '</b></span>\');" onMouseout="return nd();"><center>X</center></span>';
         } else {
             echo '<center>N/A</center>';
         }
     }
     echo '</td>' . "\n\n";
     echo '</div>';
     echo '</div>';
 }
 // Close the Row
开发者ID:Sajaki,项目名称:addons,代码行数:31,代码来源:index.php


注:本文中的item::out方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。