示例#1
0
     }
     // Check if this is the first page.
     if ($page == 0) {
         $page = 1;
     }
     $topicCount = 0;
     $topicCount = DB_count($_TABLES['ff_topic'], array('pid', 'forum'), array(0, $forum));
     $numpages = ceil($topicCount / $show);
     $offset = ($page - 1) * $show;
 }
 $base_url = $_CONF['site_url'] . '/forum/index.php?forum=' . $forum . '&show=' . $show;
 $displaypostpages = '';
 $dt = new Date('now', $_USER['tzid']);
 $topiclisting = new Template($_CONF['path'] . 'plugins/forum/templates/');
 $topiclisting->set_file('topiclisting', 'topiclisting.thtml');
 $topiclisting->set_var(array('LANG_HOME' => $LANG_GF01['HOMEPAGE'], 'forum_home' => $LANG_GF01['INDEXPAGE'], 'navbreadcrumbsimg' => '<img src="' . _ff_getImage('nav_breadcrumbs') . '" alt=""/>', 'img_asc1' => '<img src="' . _ff_getImage('asc') . '" alt=""/>', 'img_asc2' => '<img src="' . _ff_getImage('asc') . '" alt=""/>', 'img_asc3' => '<img src="' . _ff_getImage('asc') . '" alt=""/>', 'img_asc4' => '<img src="' . _ff_getImage('asc') . '" alt=""/>', 'img_asc5' => '<img src="' . _ff_getImage('asc') . '" alt=""/>', 'img_desc1' => '<img src="' . _ff_getImage('desc') . '" alt=""/>', 'img_desc2' => '<img src="' . _ff_getImage('desc') . '" alt=""/>', 'img_desc3' => '<img src="' . _ff_getImage('desc') . '" alt=""/>', 'img_desc4' => '<img src="' . _ff_getImage('desc') . '" alt=""/>', 'img_desc5' => '<img src="' . _ff_getImage('desc') . '" alt=""/>', 'tooltip_style' => COM_getToolTipStyle()));
 switch ($sort) {
     case 1:
         if ($order == 0) {
             $sortOrder = "subject ASC";
             $topiclisting->set_var('img_asc1', '<img src="' . _ff_getImage('asc_on') . '" alt=""/>');
             $topiclisting->set_var('sort_subject', true);
             $topiclisting->set_var('sort_asc', true);
             $topiclisting->set_var('new_sort_order', '1');
         } else {
             $sortOrder = "subject DESC";
             $topiclisting->set_var('img_desc1', '<img src="' . _ff_getImage('desc_on') . '" alt=""/>');
             $topiclisting->set_var('sort_subject', true);
             $topiclisting->unset_var('sort_asc');
             $topiclisting->set_var('new_sort_order', '0');
         }
示例#2
0
function _mb_getListField_menulist($fieldname, $fieldvalue, $A, $icon_arr)
{
    global $_CONF, $_USER, $_TABLES, $LANG_ADMIN, $LANG_MB01, $LANG_MB_ADMIN, $LANG_ADMIN, $LANG_MB_MENU_TYPES;
    $retval = '';
    switch ($fieldname) {
        case 'menu_name':
            $elementDetails = $A['menu_name'] . '::';
            $elementDetails .= '<b>' . $LANG_MB01['type'] . ':</b><br/>' . $LANG_MB_MENU_TYPES[$A['menu_type']] . '<br/>';
            $retval = '<span style="cursor:pointer;" class="' . COM_getToolTipStyle() . '" title="' . $elementDetails . '">' . $A['menu_name'] . '</span>';
            break;
        case 'copy':
            $retval = '<a href="' . $_CONF['site_admin_url'] . '/menu.php?mode=clone&amp;id=' . $fieldvalue . '">' . '<img src="' . $_CONF['layout_url'] . '/images/copy.png" alt="' . $LANG_MB01['clone'] . '" />';
            break;
        case 'active':
            $retval = '<input class="menu-enabler" type="checkbox" name="enabledmenu[' . $A['menu_id'] . ']" onclick="submit()" value="1"' . ($A['active'] == 1 ? ' checked="checked"' : '') . '/>';
            break;
        case 'elements':
            $retval = '<a href="' . $_CONF['site_admin_url'] . '/menu.php?mode=menu&amp;menu=' . $A['menu_id'] . '">' . '<img src="' . $_CONF['layout_url'] . '/images/edit.png" alt="' . $LANG_MB01['edit'] . '">';
            break;
        case 'delete':
            if ($A['menu_id'] != 1 && $A['menu_id'] != 2 && $A['menu_id'] != 3) {
                $retval = '<a href="' . $_CONF['site_admin_url'] . '/menu.php?mode=deletemenu&amp;id=' . $A['menu_id'] . '" onclick="return confirm(\'' . $LANG_MB01['confirm_delete'] . '\');"><img src="' . $_CONF['layout_url'] . '/images/delete.png" alt="' . $LANG_MB01['delete'] . '"' . '/></a>';
            }
            break;
        case 'options':
            $retval = '<a href="' . $_CONF['site_admin_url'] . '/menu.php?mode=editmenu&amp;menuid=' . $A['menu_id'] . '">' . '<img src="' . $_CONF['layout_url'] . '/images/gear.png" height="16" width="16" alt="' . $LANG_MB01['options'] . '"/></a>';
            break;
        default:
            $retval = $fieldvalue;
            break;
    }
    return $retval;
}