Example #1
0
function display_entry($pre, &$data, &$ents)
{
    static $n = 0;
    global $acts;
    $scid = $data['scid'];
    $cutid = $data['cutid'];
    $link = shortcut_script() . $cutid;
    $data['cutid'] = "<a href='{$link}'>{$cutid}</a>";
    $op = "<a href='index.php?op=edit&scid={$scid}'/>" . _EDIT . "</a> | <a href='index.php?op=del&scid={$scid}'>" . _DELETE . "</a>";
    $data['active'] = $acts[$data['active']];
    $url = $data['url'];
    $aurl = eval_url($url);
    if (strlen($url) > 40) {
        $url = substr($url, 0, 38) . "..";
    }
    $data['url'] = "<a href='{$aurl}'>{$url}</a>";
    $bg = ++$n % 2 ? "odd" : "even";
    $buf = "<tr class='{$bg}'>";
    foreach ($ents as $key => $lab) {
        $buf .= "<td>" . ($key == 'title' ? $pre : '') . $data[$key] . "</td>";
    }
    $buf .= "<td>{$op}</td></td></tr>\n";
    return $buf;
}
Example #2
0
<?php

# shortcut user main page
# $Id: index.php,v 1.2 2008/07/06 07:36:56 nobu Exp $
include "../../mainfile.php";
include "functions.php";
include XOOPS_ROOT_PATH . "/header.php";
$xoopsOption['template_main'] = 'shortcut_index.html';
$uid = is_object($xoopsUser) ? $xoopsUser->getVar('uid') : 0;
$xoopsTpl->assign('links', shortcut_links($uid, $thispage));
$xoopsTpl->assign('sc_script', shortcut_script());
include XOOPS_ROOT_PATH . "/footer.php";