Beispiel #1
0
function award_lib_get_awards($db_game, $awardIDs = array())
{
    if (sizeof($awardIDs)) {
        $awardIDs = implode(",", $awardIDs);
        $sql = "SELECT * FROM Awards WHERE awardID IN ({$awardIDs}) ORDER BY awardID ASC";
    } else {
        $sql = "SELECT * FROM Awards ORDER BY awardID ASC";
    }
    $result = $db_game->query($sql);
    if (!$result) {
        return FALSE;
    }
    $awards = array();
    while ($row = $result->nextRow()) {
        $row['awards_img_path'] = AWARDS_IMG_PATH;
        $row['description_short'] = lib_shorten_html(lib_bb_decode($row['description']), 64);
        $awards[] = $row;
    }
    return $awards;
}
Beispiel #2
0
function Module_Awards_show_edit($row)
{
    $template = tmpl_open("modules/Module_Awards/templates/edit.ihtml");
    $row['description'] = lib_bb_decode($row['description']);
    tmpl_set($template, '/', $row);
    return tmpl_parse($template);
}