Ejemplo n.º 1
0
function help($id)
{
    echo helpHtml($id);
}
Ejemplo n.º 2
0
function listplug_table_skinlist($template, $type)
{
    global $CONF, $DIR_SKINS, $manager;
    switch ($type) {
        case 'HEAD':
            echo "<th>" . _LISTS_NAME . "</th><th>" . _LISTS_DESC . "</th><th colspan='3'>" . _LISTS_ACTIONS . "</th>";
            break;
        case 'BODY':
            $current = $template['current'];
            echo '<td>';
            // use a special style for the default skin
            if ($current->sdnumber == $CONF['BaseSkin']) {
                echo '<strong>', htmlspecialchars($current->sdname), '</strong>';
            } else {
                echo htmlspecialchars($current->sdname);
            }
            echo '<br /><br />';
            echo _LISTS_TYPE, ': ', htmlspecialchars($current->sdtype);
            echo '<br />', _LIST_SKINS_INCMODE, ' ', $current->sdincmode == 'skindir' ? _PARSER_INCMODE_SKINDIR : _PARSER_INCMODE_NORMAL;
            if ($current->sdincpref) {
                echo '<br />', _LIST_SKINS_INCPREFIX, ' ', htmlspecialchars($current->sdincpref);
            }
            // add preview image when present
            if ($current->sdincpref && @file_exists($DIR_SKINS . $current->sdincpref . 'preview.png')) {
                echo '<br /><br />';
                $hasEnlargement = @file_exists($DIR_SKINS . $current->sdincpref . 'preview-large.png');
                if ($hasEnlargement) {
                    echo '<a href="', $CONF['SkinsURL'], htmlspecialchars($current->sdincpref), 'preview-large.png" title="' . _LIST_SKIN_PREVIEW_VIEWLARGER . '">';
                }
                $imgAlt = sprintf(_LIST_SKIN_PREVIEW, htmlspecialchars($current->sdname, ENT_QUOTES));
                echo '<img class="skinpreview" src="', $CONF['SkinsURL'], htmlspecialchars($current->sdincpref), 'preview.png" width="100" height="75" alt="' . $imgAlt . '" />';
                if ($hasEnlargement) {
                    echo '</a>';
                }
                if (@file_exists($DIR_SKINS . $current->sdincpref . 'readme.html')) {
                    $url = $CONF['SkinsURL'] . htmlspecialchars($current->sdincpref, ENT_QUOTES) . 'readme.html';
                    $readmeTitle = sprintf(_LIST_SKIN_README, htmlspecialchars($current->sdname, ENT_QUOTES));
                    echo '<br /><a href="' . $url . '" title="' . $readmeTitle . '">' . _LIST_SKIN_README_TXT . '</a>';
                }
            }
            echo "</td>";
            echo '<td class="availableSkinTypes">' . htmlspecialchars($current->sddesc);
            // show list of defined parts
            $r = sql_query('SELECT stype FROM ' . sql_table('skin') . ' WHERE sdesc=' . $current->sdnumber . ' ORDER BY ' . " stype NOT IN ('index', 'item', 'error', 'search', 'archive', 'archivelist', 'imagepopup', 'member') ASC , " . ' stype ASC');
            $types = array();
            while ($o = sql_fetch_object($r)) {
                array_push($types, $o->stype);
            }
            if (sizeof($types) > 0) {
                $friendlyNames = SKIN::getFriendlyNames();
                for ($i = 0; $i < sizeof($types); $i++) {
                    $type = $types[$i];
                    if (in_array($type, array('index', 'item', 'archivelist', 'archive', 'search', 'error', 'member', 'imagepopup'))) {
                        $types[$i] = '<li>' . helpHtml('skinpart' . $type) . ' <a href="index.php?action=skinedittype&amp;skinid=' . $current->sdnumber . '&amp;type=' . $type . '" tabindex="' . $template['tabindex'] . '">' . htmlspecialchars($friendlyNames[$type]) . "</a></li>";
                    } else {
                        $types[$i] = '<li>' . helpHtml('skinpartspecial') . ' <a href="index.php?action=skinedittype&amp;skinid=' . $current->sdnumber . '&amp;type=' . $type . '" tabindex="' . $template['tabindex'] . '">' . htmlspecialchars($friendlyNames[$type]) . "</a></li>";
                    }
                }
                echo '<br /><br />', _LIST_SKINS_DEFINED, ' <ul>', implode($types, ''), '</ul>';
            }
            echo "</td>";
            echo "<td style=\"white-space:nowrap\"><a href='index.php?action=skinedit&amp;skinid={$current->sdnumber}' tabindex='" . $template['tabindex'] . "'>" . _LISTS_EDIT . "</a></td>";
            $url = $manager->addTicketToUrl('index.php?action=skinclone&skinid=' . intval($current->sdnumber));
            echo "<td style=\"white-space:nowrap\"><a href='", htmlspecialchars($url), "' tabindex='" . $template['tabindex'] . "'>" . _LISTS_CLONE . "</a></td>";
            echo "<td style=\"white-space:nowrap\"><a href='index.php?action=skindelete&amp;skinid={$current->sdnumber}' tabindex='" . $template['tabindex'] . "'>" . _LISTS_DELETE . "</a></td>";
            break;
    }
}