Ejemplo n.º 1
0
/**
 * Obtiene la cadena de posición actual del objeto
 */
function rmdp_get_location($idc)
{
    global $xoopsDB;
    list($id, $nombre, $parent) = $xoopsDB->fetchRow($xoopsDB->query("SELECT id_cat, nombre, parent FROM " . $xoopsDB->prefix('rmdp_categos') . " WHERE id_cat='{$idc}'"));
    if ($parent > 0) {
        $rtn .= rmdp_get_location($parent);
    }
    $rtn .= "<a href='categos.php?id=" . $id . "'>{$nombre}</a> &gt; ";
    return $rtn;
}
Ejemplo n.º 2
0
    $xoopsOption['template_main'] = 'rmdp_shots.html';
    /**
     * Obtenemos las pantallas de una descarga
     **/
    $result = $xoopsDB->query("SELECT * FROM " . $xoopsDB->prefix('rmdp_shots') . " WHERE id_soft='{$id}'");
    while ($row = $xoopsDB->fetchArray($result)) {
        $fecha = date($xoopsModuleConfig['dateformat'], $row['fecha']);
        $isnew = rmdp_element_isnew($row['fecha'], $xoopsModuleConfig['shotnew']);
        $xoopsTpl->append('shots', array('id' => $row['id_shot'], 'small' => $row['small'], 'link' => rmdp_shot_link($row['id_shot'], $row['big']), 'desc' => $row['text'], 'fecha' => $fecha, 'isnew' => $isnew, 'hits' => $row['hits']));
    }
    $xoopsTpl->assign('img_width', $xoopsModuleConfig['imgshotsw']);
}
// Obtenemos las descargas patrocinadas
rmdp_get_sponsor();
rmdp_get_favorites(0);
rmdp_get_popular(0);
// Creamos la barra de localización
$location_bar = "<a href='" . XOOPS_URL . "/modules/rmdp/'>" . $xoopsModuleConfig['rmdptitle'] . "</a> &gt; ";
list($idc, $nombre) = $xoopsDB->fetchRow($xoopsDB->query("SELECT id_cat, nombre FROM " . $xoopsDB->prefix("rmdp_software") . " WHERE id_soft='{$id}'"));
$location_bar .= rmdp_get_location($idc);
$location_bar .= '<a href="down.php?id=' . $id . '">' . $nombre . '</a> &gt; ';
$location_bar .= '<a href="shots.php?id=' . $id . '">' . _RMDP_LOCATION_SHOT . '</a>';
$xoopsTpl->assign('location_bar', $location_bar);
// Opciones de lenguaje
$xoopsTpl->assign('lng_shotsof', sprintf(_RMDP_DOWN_SHOTS, rmdp_download_name($id)));
$xoopsTpl->assign('total_cols', $xoopsModuleConfig['shotcols']);
$xoopsTpl->assign('lang_download_now', _RMDP_DOWNLOAD_NOW);
$xoopsTpl->assign('lang_our_favorites', _RMDP_OUR_FAVORITES);
$xoopsTpl->assign('lang_popular_soft', _RMDP_POPULAR_SOFT);
$xoopsTpl->assign('lng_favmsg', sprintf(_RMDP_FAVORITE_TEXT, $xoopsModuleConfig['favo_downs']));
include 'footer.php';