当前位置: 首页>>代码示例>>PHP>>正文


PHP XoopsPageNav::renderNav方法代码示例

本文整理汇总了PHP中XoopsPageNav::renderNav方法的典型用法代码示例。如果您正苦于以下问题:PHP XoopsPageNav::renderNav方法的具体用法?PHP XoopsPageNav::renderNav怎么用?PHP XoopsPageNav::renderNav使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在XoopsPageNav的用法示例。


在下文中一共展示了XoopsPageNav::renderNav方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: listAction

 function listAction()
 {
     echo '<h3>' . _AD_OPENID_LANG_ASSOC . '</h3>';
     echo '<p>' . _AD_OPENID_LANG_ASSOC_DESC . '</p>';
     echo '<table border=1>';
     echo '<tr><th>' . _AD_OPENID_LANG_PATTERN . '</th><th>' . _AD_OPENID_LANG_ISSUED;
     echo '</th><th colspan="2"></th></tr>';
     $start = isset($_GET['start']) ? intval($_GET['start']) : 0;
     if ($records =& $this->_handler->getObjects(30, $start)) {
         foreach ($records as $r) {
             $server_url = $r->get4Show('server_url');
             $expire = $r->get('issued') + $r->get('life') < time();
             $issued = formatTimestamp($r->get('issued'), 'm/d H:i');
             echo '<tr><td>';
             echo $server_url;
             echo '</td><td>';
             echo $expire ? '<font color="#808080">' . $issued . '</font>' : $issued;
             echo '</td><td>';
             echo '<a href="' . XOOPS_URL . '/modules/openid/admin/index.php?controller=filter&op=new&auth=1&pattern=' . $server_url . '">' . _AD_OPENID_LANG_ALLOW . '</a>';
             echo '</td><td>';
             echo '<a href="' . XOOPS_URL . '/modules/openid/admin/index.php?controller=filter&op=new&auth=0&pattern=' . $server_url . '">' . _AD_OPENID_LANG_DENY . '</a>';
             echo '</td></tr>';
         }
         echo '</table>';
         require_once XOOPS_ROOT_PATH . '/class/pagenav.php';
         $pageNav = new XoopsPageNav($this->_handler->getCount(), 30, $start, 'start', 'controller=' . $this->_control);
         echo $pageNav->renderNav();
         echo '<p><a href="' . $this->_url . '&op=garbage">' . _AD_OPENID_LANG_CLEANUP . '</a></p>';
     } else {
         echo '</table>';
         echo '<p>' . $this->_handler->getError() . '</p>';
     }
 }
开发者ID:nouphet,项目名称:rata,代码行数:33,代码来源:assoc.php

示例2: listAction

    function listAction()
    {
        $start = isset($_GET['start']) ? intval($_GET['start']) : 0;
        require_once XOOPS_ROOT_PATH . '/class/pagenav.php';
        $pageNav = new XoopsPageNav($this->_handler->getCount(), 30, $start);
        $nav_html = $pageNav->renderNav();
        echo '
<h3>' . _AD_OPENID_LANG_IDENTIFIER . '</h3>
<p><a href="' . $this->_url . '&op=new">' . _AD_OPENID_LANG_NEW . '</a></p>
' . $nav_html . '
<table border=1>
 <tr>
  <th><a href="' . $this->_url . '&sort=claimed_id">Claimed ID</a></th>
  <th><a href="' . $this->_url . '&sort=uid">' . _AD_OPENID_LANG_USER . '</a></th>
  <th></th>
  <th><a href="' . $this->_url . '&sort=local_id">OP-Local ID</a></th>
  <th>Display ID</th><th>' . _AD_OPENID_LANG_GROUPS . '</th><th></th>
 </tr>
';
        switch (@$_GET['sort']) {
            case 'claimed_id':
            case 'uid':
            case 'local_id':
                $sort = $_GET['sort'];
                break;
            default:
                $sort = null;
        }
        if (!($identifiers =& $this->_handler->getObjects(30, $start, $sort))) {
            echo '</table>';
            echo '<p>' . $this->_handler->getError() . '</p>';
            return;
        }
        $uids = array();
        foreach ($identifiers as $identifier) {
            $uids[] = $identifier->get('uid');
        }
        require_once XOOPS_ROOT_PATH . '/modules/openid/class/member.php';
        $member = new Openid_Member();
        $users =& $member->getUsers($uids);
        $mode = array(_AD_OPENID_LANG_INACTIVE, _AD_OPENID_LANG_PRIVATE, _AD_OPENID_LANG_OPEN2MEMBER, _AD_OPENID_LANG_PUBLIC);
        foreach ($identifiers as $identifier) {
            $uid = intval($identifier->get('uid'));
            $uname = is_object($users[$uid]) ? '<a href="' . XOOPS_URL . '/userinfo.php?uid=' . $uid . '">' . $users[$uid]->getVar('uname') . '(' . $uid . ')</a>' : 'Deleted user' . '(' . $uid . ')';
            echo '
<tr>
 <td><a href="' . $this->_url . '&op=edit&id=' . $identifier->get4Show('id') . '">' . $identifier->get4Show('claimed_id') . '</a></td>
 <td>' . $uname . '</td>
 <td>' . $mode[$identifier->get('omode')] . '</td>
 <td>' . $identifier->get4Show('local_id') . '</td>
 <td>' . $identifier->get4Show('displayid') . '</td>
 <td>' . $member->getGroups($uid, ', ') . '</td>
 <td><a href="' . $this->_url . '&op=delete&id=' . $identifier->get4Show('id') . '">' . _DELETE . '</a></td>
</tr>';
        }
        echo '</table>';
        echo $nav_html;
    }
开发者ID:nouphet,项目名称:rata,代码行数:58,代码来源:identifier.php

示例3: links_stat

function links_stat($type)
{
    global $xoopsDB, $xoopsModuleConfig;
    $labs = array('m' => array(_AM_LTYPE_MEDIA, 'm'), 'a' => array(_AM_LTYPE_DOCUMENT, 'a'));
    echo "<div><em>" . _AM_SUMMARY_TYPE . "</em> ";
    foreach ($labs as $k => $lab) {
        echo " &nbsp; ";
        if ($type == $k) {
            echo "[<b>" . $lab[0] . "</b>]";
        } else {
            echo "<a href='summary.php?type=" . $lab[1] . "'>" . $lab[0] . "</a>";
        }
    }
    echo "</div>\n";
    $res = $xoopsDB->query(sql_stat($type, true));
    list($count) = $xoopsDB->fetchRow($res);
    $start = isset($_GET['start']) ? intval($_GET['start']) : 0;
    $max = $xoopsModuleConfig['max_rows'];
    $res = $xoopsDB->query(sql_stat($type), $max, $start);
    $nav = new XoopsPageNav($count, $max, $start, "start", 'type=' . $type);
    echo "<table width='100%'>\n";
    echo "<tr><td>" . _AM_COUNT . " " . $count . "</td><td>";
    if ($count > $max) {
        echo ' &nbsp; ' . _AM_PAGE . ' ' . $nav->renderNav();
    }
    echo "</td><td align='right'>[<a href='summary.php?type={$type}&export=csv'>" . _AM_EXPORT_FILE . "</a>]</td></tr>\n";
    echo "</table>\n";
    echo "<table cellspacing='1' class='outer'>\n";
    $head = array(_AM_TITLE, _AM_LINKNAME, "URL", _AM_HITS);
    echo "<tr><th>" . join("</th><th>", $head) . "</th></tr>\n";
    $n = 0;
    $lmax = 35;
    while ($data = $xoopsDB->fetchArray($res)) {
        $bg = $n++ % 2 ? 'even' : 'odd';
        $mid = $data['mid'];
        $url = $data['url'];
        $aurl = htmlspecialchars(get_upload_url($mid, $url));
        $title = "<a href='../detail.php?mid={$mid}'>" . htmlspecialchars($data['title']) . "</a>";
        $link = htmlspecialchars($data['name']);
        $hits = $data['hits'];
        if (strlen($url) < $lmax) {
            $aname = $url;
        } else {
            $aname = '...' . substr($url, 3 - $lmax);
        }
        echo "<tr class='{$bg}'><td>{$title}</td><td>{$link}</td><td>" . "<a href='{$aurl}'>" . htmlspecialchars($aname) . "</a></td><td align='right'>{$hits}</td></tr>\n";
    }
    echo "</table>\n";
}
开发者ID:nbuy,项目名称:xoops-modules-medialinks,代码行数:49,代码来源:summary.php

示例4: user_index

function user_index($start = 0)
{
    global $xoopsTpl, $xoopsUser, $xoopsConfig, $limit;
    $myts =& MyTextSanitizer::getInstance();
    include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
    $this_handler =& xoops_getModuleHandler('user', 'subscribers');
    $module_handler =& xoops_getHandler('module');
    $query = isset($_POST['query']) ? $_POST['query'] : null;
    $xoopsTpl->assign('query', $query);
    $criteria = null;
    if (!is_null($query)) {
        $criteria = new Criteria('user_email', $myts->addSlashes($query) . '%', 'LIKE');
    }
    $count = $this_handler->getCount($criteria);
    $xoopsTpl->assign('count', $count);
    $mHandler =& xoops_getHandler('member');
    $users_count = $mHandler->getUserCount(new Criteria('level', 0, '>'));
    $xoopsTpl->assign('users_count', $users_count);
    $xoopsTpl->assign('total_count', $users_count + $count);
    $criteria = new CriteriaCompo($criteria);
    $criteria->setSort('user_id');
    $criteria->setOrder('DESC');
    $criteria->setStart($start);
    $criteria->setLimit($limit);
    $objs = $this_handler->getObjects($criteria);
    unset($criteria);
    if ($count > 0) {
        if ($count > $limit) {
            include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
            $nav = new XoopsPageNav($count, $limit, $start, 'start', 'op=list');
            $xoopsTpl->assign('pag', '<div style="float:left; padding-top:2px;" align="center">' . $nav->renderNav() . '</div>');
        } else {
            $xoopsTpl->assign('pag', '');
        }
    } else {
        $xoopsTpl->assign('pag', '');
    }
    include_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
    $countries = XoopsLists::getCountryList();
    foreach ($objs as $obj) {
        $objArray = $obj->toArray();
        $objArray['user_country'] = $countries[$objArray['user_country']];
        $xoopsTpl->append('objs', $objArray);
        unset($objArray);
    }
    $xoopsTpl->assign('add_form', user_form());
    return $xoopsTpl->fetch(XOOPS_ROOT_PATH . '/modules/subscribers/templates/static/subscribers_admin_user.html');
}
开发者ID:trabisdementia,项目名称:xuups,代码行数:48,代码来源:admin_user.php

示例5: defacer_index

function defacer_index($start = 0, $limit = 0)
{
    global $xoopsTpl;
    $defacer =& DefacerDefacer::getInstance();
    $grouplist_handler =& xoops_gethandler('group');
    $grouplist = $grouplist_handler->getObjects(null, true);
    foreach (array_keys($grouplist) as $i) {
        $groups[$i] = $grouplist[$i]->getVar('name');
    }
    $xoopsTpl->assign('groups', $groups);
    $count = $defacer->getHandler('permission')->getCount();
    $xoopsTpl->assign('count', $count);
    $criteria = new CriteriaCompo();
    $criteria->setStart($start);
    $criteria->setLimit($limit);
    $objs = $defacer->getHandler('permission')->getObjects($criteria);
    if ($count > $limit) {
        include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
        $nav = new XoopsPageNav($count, $limit, $start, 'start', 'op=list');
        $xoopsTpl->assign('pagenav', '<div style="float:left; padding-top:2px;" align="center">' . $nav->renderNav() . '</div>');
    }
    foreach ($objs as $obj) {
        $item = $obj->getValues();
        $page = $defacer->getHandler('page')->get($obj->getVar('permission_id'));
        $item['module'] = $page->getVar('name');
        $item['permission_title'] = $page->getVar('page_title');
        $item['permission_url'] = $page->getVar('page_url');
        $item['permission_status'] = $page->getVar('page_status');
        if (substr($page->getVar('page_url'), -1) == '*') {
            $item['permission_vurl'] = 0;
        } else {
            if ($page->getVar('page_moduleid') == 1) {
                $item['permission_vurl'] = XOOPS_URL . '/' . $page->getVar('page_url');
            } else {
                $item['permission_vurl'] = XOOPS_URL . '/modules/' . $page->getVar('dirname') . '/' . $page->getVar('page_url');
            }
        }
        $xoopsTpl->append('items', $item);
    }
    $xoopsTpl->assign('form', defacer_form());
    return $xoopsTpl->fetch('db:defacer_admin_permission.html');
}
开发者ID:trabisdementia,项目名称:xuups,代码行数:42,代码来源:admin_permission.php

示例6: mymenus_admin_list

function mymenus_admin_list($start = 0)
{
    global $mymenusTpl, $limit;
    $myts =& MyTextSanitizer::getInstance();
    $this_handler =& xoops_getModuleHandler('menus', 'mymenus');
    $query = isset($_POST['query']) ? $_POST['query'] : null;
    $mymenusTpl->assign('query', $query);
    $criteria = new CriteriaCompo();
    if (!is_null($query)) {
        $crit = new CriteriaCompo(new Criteria('title', $myts->addSlashes($query) . '%', 'LIKE'));
        $criteria->add($crit);
    }
    $count = $this_handler->getCount($criteria);
    $mymenusTpl->assign('count', $count);
    $criteria->setStart($start);
    $criteria->setLimit($limit);
    $criteria->setSort('id');
    $criteria->setOrder('ASC');
    if ($count > 0) {
        if ($count > $limit) {
            xoops_load('XoopsPagenav');
            $nav = new XoopsPageNav($count, $limit, $start, 'start', 'op=list');
            $mymenusTpl->assign('pag', '<div style="float:left; padding-top:2px;" align="center">' . $nav->renderNav() . '</div>');
        } else {
            $mymenusTpl->assign('pag', '');
        }
        $objs = $this_handler->getObjects($criteria);
        foreach ($objs as $obj) {
            $objArray = $obj->getValues();
            $mymenusTpl->append('objs', $objArray);
            unset($objArray);
        }
        unset($criteria, $objs);
    } else {
        $mymenusTpl->assign('pag', '');
    }
    $mymenusTpl->assign('addform', mymenus_admin_form());
    return $mymenusTpl->fetch($GLOBALS['xoops']->path('modules/mymenus/templates/static/mymenus_admin_menus.html'));
}
开发者ID:trabisdementia,项目名称:xuups,代码行数:39,代码来源:admin_menus.php

示例7: defacer_index

function defacer_index($start = 0, $limit = 0, $query = '')
{
    global $xoopsTpl;
    $defacer =& DefacerDefacer::getInstance();
    $xoopsTpl->assign('query', $query);
    $criteria = new CriteriaCompo();
    if (!empty($query)) {
        $myts =& MyTextSanitizer::getInstance();
        $criteria->add(new Criteria('page_title', $myts->addSlashes($query) . '%', 'LIKE'));
    }
    $count = $defacer->getHandler('page')->getCount($criteria);
    $xoopsTpl->assign('count', $count);
    $criteria->setStart($start);
    $criteria->setLimit($limit);
    $criteria->setSort('name');
    $criteria->setOrder('ASC');
    $objs = $defacer->getHandler('page')->getObjects($criteria);
    if ($count > $limit) {
        include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
        $nav = new XoopsPageNav($count, $limit, $start, 'start', 'op=list');
        $xoopsTpl->assign('pagenav', '<div style="float:left; padding-top:2px;" align="center">' . $nav->renderNav() . '</div>');
    }
    foreach ($objs as $obj) {
        $item = $obj->getValues();
        if (substr($obj->getVar('page_url'), -1) == '*') {
            $item['page_vurl'] = 0;
        } else {
            if ($obj->getVar('page_moduleid') == 1) {
                $item['page_vurl'] = XOOPS_URL . '/' . $obj->getVar('page_url');
            } else {
                $item['page_vurl'] = XOOPS_URL . '/modules/' . $obj->getVar('dirname') . '/' . $obj->getVar('page_url');
            }
        }
        $xoopsTpl->append('items', $item);
    }
    $xoopsTpl->assign('form', defacer_form());
    return $xoopsTpl->fetch('db:defacer_admin_page.html');
}
开发者ID:trabisdementia,项目名称:xuups,代码行数:38,代码来源:admin_page.php

示例8: waiting_index

function waiting_index($start = 0)
{
    global $xoopsTpl, $xoopsUser, $xoopsConfig, $limit;
    include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
    include_once XOOPS_ROOT_PATH . '/modules/subscribers/include/functions.php';
    subscribers_sendEmails();
    $this_handler =& xoops_getModuleHandler('waiting', 'subscribers');
    $count = $this_handler->getCount();
    $xoopsTpl->assign('count', $count);
    $criteria = new CriteriaCompo();
    $criteria->setSort('wt_priority DESC, wt_created');
    $criteria->setOrder('ASC');
    $criteria->setStart($start);
    $criteria->setLimit($limit);
    $objs = $this_handler->getObjects($criteria);
    if ($count > 0) {
        if ($count > $limit) {
            include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
            $nav = new XoopsPageNav($count, $limit, $start, 'start', 'op=list');
            $xoopsTpl->assign('pag', '<div style="float:left; padding-top:2px;" align="center">' . $nav->renderNav() . '</div>');
        } else {
            $xoopsTpl->assign('pag', '');
        }
    } else {
        $xoopsTpl->assign('pag', '');
    }
    include_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
    $countries = XoopsLists::getCountryList();
    foreach ($objs as $obj) {
        $objArray = $obj->toArray();
        $objArray['wt_created'] = formatTimestamp($objArray['wt_created']);
        $xoopsTpl->append('objs', $objArray);
        unset($objArray);
    }
    return $xoopsTpl->fetch(XOOPS_ROOT_PATH . '/modules/subscribers/templates/static/subscribers_admin_waiting.html');
}
开发者ID:trabisdementia,项目名称:xuups,代码行数:36,代码来源:admin_waiting.php

示例9: createDir

        echo "<td class='even' align='center'> " . $approve . $clone . $modify . $delete . "</td>";
        echo "</tr>";
    }
} else {
    // that is, $numrows = 0, there's no entries yet
    echo "<tr>";
    echo "<td class='head' align='center' colspan= '7'>" . _AM_PUBLISHER_NOITEMSSEL . "</td>";
    echo "</tr>";
}
echo "</table>\n";
echo "<span style=\"color: #567; margin: 3px 0 18px 0; font-size: small; display: block; \">{$status_explaination}</span>";
$pagenav = new XoopsPageNav($numrows, $publisher->getConfig('idxcat_perpage'), $startentry, 'startentry', "statussel={$statussel}&amp;sortsel={$sortsel}&amp;ordersel={$ordersel}");
if ($publisher->getConfig('format_image_nav') == 1) {
    echo '<div style="text-align:right; background-color: white; margin: 10px 0;">' . $pagenav->renderImageNav() . '</div>';
} else {
    echo '<div style="text-align:right; background-color: white; margin: 10px 0;">' . $pagenav->renderNav() . '</div>';
}
// ENDs code to show active entries
PublisherUtils::closeCollapsableBar('allitemstable', 'allitemsicon');
// Close the collapsable div
$xoops->footer();
// auto create folders----------------------------------------
//TODO rename this function? And exclude image folder?
function createDir()
{
    // auto crate folders
    $thePath = PublisherUtils::getUploadDir();
    if (PublisherUtils::getPathStatus('root', true) < 0) {
        $thePath = PublisherUtils::getUploadDir();
        $res = PublisherUtils::mkdir($thePath);
        $msg = $res ? _AM_PUBLISHER_DIRCREATED : _AM_PUBLISHER_DIRNOTCREATED;
开发者ID:ming-hai,项目名称:XoopsCore,代码行数:31,代码来源:main.php

示例10: dirname

                if (in_array($fields[$i]->getVar('field_id'), $searchable_fields) && in_array($fields[$i]->getVar('field_type'), $searchable_types) && in_array($fields[$i]->getVar('field_name'), $searchvars)) {
                    $userarray["output"][] = $fields[$i]->getOutputValue($users[$k], $profiles[$k]);
                }
            }
            $GLOBALS['xoopsTpl']->append('users', $userarray);
            unset($userarray);
        }
        //Get captions
        $captions[] = _US_NICKNAME;
        $captions[] = _US_EMAIL;
        foreach (array_keys($fields) as $i) {
            if (in_array($fields[$i]->getVar('field_id'), $searchable_fields) && in_array($fields[$i]->getVar('field_type'), $searchable_types) && in_array($fields[$i]->getVar('field_name'), $searchvars)) {
                $captions[] = $fields[$i]->getVar('field_title');
            }
        }
        $GLOBALS['xoopsTpl']->assign('captions', $captions);
        if ($total_users > $limit) {
            $search_url[] = "op=results";
            $search_url[] = "order=" . $order;
            $search_url[] = "sortby=" . htmlspecialchars($_REQUEST['sortby']);
            $search_url[] = "limit=" . $limit;
            if (isset($search_url)) {
                $args = implode("&amp;", $search_url);
            }
            include_once $GLOBALS['xoops']->path('class/pagenav.php');
            $nav = new XoopsPageNav($total_users, $limit, $start, "start", $args);
            $GLOBALS['xoopsTpl']->assign('nav', $nav->renderNav(5));
        }
        break;
}
include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'footer.php';
开发者ID:BackupTheBerlios,项目名称:haxoo-svn,代码行数:31,代码来源:search.php

示例11: isset

echo "<td class='bg3' align='left'><b>" . _AM_SSECTION_ITEMDESC . "</b></td>";
echo "<td width='90' class='bg3' align='center'><b>" . _AM_SSECTION_CREATED . "</b></td>";
echo "<td width='60' class='bg3' align='center'><b>" . _AM_SSECTION_ACTION . "</b></td>";
echo "</tr>";
if ($totalitems > 0) {
    for ($i = 0; $i < $totalitemsOnPage; $i++) {
        $categoryObj =& $allcats[$itemsObj[$i]->categoryid()];
        $modify = "<a href='item.php?op=mod&amp;itemid=" . $itemsObj[$i]->itemid() . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/edit.gif' title='" . _AM_SSECTION_EDITITEM . "' alt='" . _AM_SSECTION_EDITITEM . "' /></a>";
        $delete = "<a href='item.php?op=del&amp;itemid=" . $itemsObj[$i]->itemid() . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/delete.gif' title='" . _AM_SSECTION_DELETEITEM . "' alt='" . _AM_SSECTION_DELETEITEM . "'/></a>";
        echo "<tr>";
        echo "<td class='head' align='center'>" . $itemsObj[$i]->itemid() . "</td>";
        echo "<td class='even' align='left'>" . $categoryObj->name() . "</td>";
        echo "<td class='even' align='left'>" . $itemsObj[$i]->getitemLink() . "</td>";
        echo "<td class='even' align='center'>" . $itemsObj[$i]->datesub('s') . "</td>";
        echo "<td class='even' align='center'> {$modify} {$delete} </td>";
        echo "</tr>";
    }
} else {
    $itemid = -1;
    echo "<tr>";
    echo "<td class='head' align='center' colspan= '7'>" . _AM_SSECTION_NOITEMS . "</td>";
    echo "</tr>";
}
echo "</table>\n";
echo "<br />\n";
$parentid = isset($_POST['parentid']) ? intval($_POST['parentid']) : 0;
$pagenav_extra_args = "op=mod&categoryid={$sel_cat}&parentid={$parentid}";
$pagenav = new XoopsPageNav($totalitems, $xoopsModuleConfig['perpage'], $startitem, 'startitem', $pagenav_extra_args);
echo '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>';
echo "<input type='button' name='button' onclick=\"location='item.php?op=mod&categoryid=" . $sel_cat . "'\" value='" . _AM_SSECTION_CREATEITEM . "'>&nbsp;&nbsp;";
echo "</div>";
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:displayitems.php

示例12: XoopsPageNav

             if ($value == $images[$i]->getVar('imgcat_id')) {
                 $sel = ' selected="selected"';
             }
             echo '<option value="' . $value . '"' . $sel . '>' . $name . '</option>';
         }
         echo '</select></td></tr><tr><td class="head">' . _IMGWEIGHT . '</td><td class="odd"><input type="text" name="image_weight[]" value="' . $images[$i]->getVar('image_weight') . '" size="3" maxlength="4" /></td></tr><tr><td class="head">' . _IMGDISPLAY . '</td><td class="even"><input type="checkbox" name="image_display[]" value="1"';
         if ($images[$i]->getVar('image_display') == 1) {
             echo ' checked="checked"';
         }
         echo ' /></td></tr><tr><td class="head">&nbsp;</td><td class="odd"><a href="admin.php?fct=images&amp;op=delfile&amp;image_id=' . $i . '">' . _DELETE . '</a></td></tr></table><br />';
     }
     if ($imgcount > 0) {
         if ($imgcount > 20) {
             include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
             $nav = new XoopsPageNav($imgcount, 20, $start, 'start', 'fct=images&amp;op=listimg&amp;imgcat_id=' . $imgcat_id);
             echo '<div text-align="right">' . $nav->renderNav() . '</div>';
         }
         echo '<div style="text-align:center;"><input type="hidden" name="op" value="save" /><input type="hidden" name="fct" value="images" />' . $GLOBALS['xoopsSecurity']->getTokenHTML() . '<input type="submit" name="submit" value="' . _SUBMIT . '" /></div></form>';
     }
     xoops_cp_footer();
     exit;
 }
 if ($op == 'save') {
     if (!$GLOBALS['xoopsSecurity']->check()) {
         redirect_header('admin.php?fct=images', 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
     }
     $count = count($image_id);
     if ($count > 0) {
         $image_handler =& xoops_gethandler('image');
         $error = array();
         for ($i = 0; $i < $count; $i++) {
开发者ID:BackupTheBerlios,项目名称:soopa,代码行数:31,代码来源:main.php

示例13: dirname

                    exit;
                }
            }
        }
    }
}
//
// display stage
//
// query for listing
$rs = $db->query("SELECT count(lid) FROM {$log_table}");
list($numrows) = $db->fetchRow($rs);
$prs = $db->query("SELECT l.lid, l.uid, l.ip, l.agent, l.type, l.description, UNIX_TIMESTAMP(l.timestamp), u.uname FROM {$log_table} l LEFT JOIN " . $db->prefix("users") . " u ON l.uid=u.uid ORDER BY timestamp DESC LIMIT {$pos},{$num}");
// Page Navigation
$nav = new XoopsPageNav($numrows, $num, $pos, 'pos', "page=center&num={$num}");
$nav_html = $nav->renderNav(10);
// Number selection
$num_options = '';
$num_array = array(20, 100, 500, 2000);
foreach ($num_array as $n) {
    if ($n == $num) {
        $num_options .= "<option value='{$n}' selected='selected'>{$n}</option>\n";
    } else {
        $num_options .= "<option value='{$n}'>{$n}</option>\n";
    }
}
// beggining of Output
xoops_cp_header();
include dirname(__FILE__) . '/mymenu.php';
// title
echo "<h3 style='text-align:left;'>" . $xoopsModule->name() . "</h3>\n";
开发者ID:RanLee,项目名称:Xoops_demo,代码行数:31,代码来源:center.php

示例14: search


//.........这里部分代码省略.........
     //publisher_adminMenu(4, _AM_PUBLISHER_MIMETYPES . " > " . _AM_PUBLISHER_BUTTON_SEARCH);
     publisherOpenCollapsableBar('mimemsearchtable', 'mimesearchicon', _AM_PUBLISHER_MIME_SEARCH);
     if (!XoopsRequest::getString('mime_search', '', 'POST')) {
         echo "<form action='mimetypes.php?op=search' method='post'>";
         echo "<table width='100%' cellspacing='1' class='outer'>";
         echo "<tr><th colspan='2'>" . _AM_PUBLISHER_TEXT_SEARCH_MIME . '</th></tr>';
         echo "<tr><td class='head' width='20%'>" . _AM_PUBLISHER_TEXT_SEARCH_BY . "</td>\n        <td class='even'>\n        <select name='search_by'>";
         foreach ($aSortBy as $value => $text) {
             echo "<option value='{$value}'>{$text}</option>";
         }
         unset($value, $text);
         echo '</select>
     </td>
     </tr>';
         echo "<tr><td class='head'>" . _AM_PUBLISHER_TEXT_SEARCH_TEXT . "</td>\n        <td class='even'>\n        <input type='text' name='search_text' id='search_text' value='' />\n        </td>\n        </tr>";
         echo "<tr class='foot'>\n        <td colspan='2'>\n        <input type='submit' name='mime_search' id='mime_search' value='" . _AM_PUBLISHER_BUTTON_SEARCH . "' />\n        </td>\n        </tr>";
         echo '</table></form>';
     } else {
         $searchField = XoopsRequest::getString('search_by', '', 'POST');
         $searchText = XoopsRequest::getString('search_text', '', 'POST');
         $crit = new Criteria($searchField, "%{$searchText}%", 'LIKE');
         $crit->setSort($sort);
         $crit->setOrder($order);
         $crit->setLimit($limit);
         $crit->setStart($start);
         $mimeCount =& $publisher->getHandler('mimetype')->getCount($crit);
         $mimetypes =& $publisher->getHandler('mimetype')->getObjects($crit);
         $nav = new XoopsPageNav($mimeCount, $limit, $start, 'start', "op=search&amp;limit={$limit}&amp;order={$order}&amp;sort={$sort}&amp;mime_search=1&amp;search_by={$searchField}&amp;search_text={$searchText}");
         // Display results
         echo '<script type="text/javascript" src="' . PUBLISHER_URL . '/include/functions.js"></script>';
         echo "<table width='100%' cellspacing='1' class='outer'>";
         echo "<tr><td colspan='6' align='right'>";
         echo "<form action='" . PUBLISHER_ADMIN_URL . "/mimetypes.php?op=search' style='margin:0; padding:0;' method='post'>";
         echo '<table>';
         echo '<tr>';
         echo "<td align='right'>" . _AM_PUBLISHER_TEXT_SEARCH_BY . '</td>';
         echo "<td align='left'><select name='search_by'>";
         foreach ($aSearchBy as $value => $text) {
             $searchField == $value ? $selected = "selected='selected'" : ($selected = '');
             echo "<option value='{$value}' {$selected}>{$text}</option>";
         }
         unset($value, $text);
         echo '</select></td>';
         echo "<td align='right'>" . _AM_PUBLISHER_TEXT_SEARCH_TEXT . '</td>';
         echo "<td align='left'><input type='text' name='search_text' id='search_text' value='{$searchText}' /></td>";
         echo "<td><input type='submit' name='mime_search' id='mime_search' value='" . _AM_PUBLISHER_BUTTON_SEARCH . "' /></td>";
         echo '</tr></table></form></td></tr>';
         echo "<tr><td colspan='6'>";
         echo "<form action='" . PUBLISHER_ADMIN_URL . "/mimetypes.php?op=search' style='margin:0; padding:0;' method='post'>";
         echo "<table width='100%'>";
         echo "<tr><td align='right'>" . _AM_PUBLISHER_TEXT_SORT_BY . "\n        <select name='sort'>";
         foreach ($aSortBy as $value => $text) {
             $sort == $value ? $selected = "selected='selected'" : ($selected = '');
             echo "<option value='{$value}' {$selected}>{$text}</option>";
         }
         unset($value, $text);
         echo '</select>
     &nbsp;&nbsp;&nbsp;
     ' . _AM_PUBLISHER_TEXT_ORDER_BY . "\n        <select name='order'>";
         foreach ($aOrderBy as $value => $text) {
             $order == $value ? $selected = "selected='selected'" : ($selected = '');
             echo "<option value='{$value}' {$selected}>{$text}</option>";
         }
         unset($value, $text);
         echo '</select>
     &nbsp;&nbsp;&nbsp;
     ' . _AM_PUBLISHER_TEXT_NUMBER_PER_PAGE . "\n        <select name='limit'>";
         foreach ($aLimitBy as $value => $text) {
             $limit == $value ? $selected = "selected='selected'" : ($selected = '');
             echo "<option value='{$value}' {$selected}>{$text}</option>";
         }
         unset($value, $text);
         echo "</select>\n        <input type='submit' name='mime_sort' id='mime_sort' value='" . _AM_PUBLISHER_BUTTON_SUBMIT . "' />\n        <input type='hidden' name='mime_search' id='mime_search' value='1' />\n        <input type='hidden' name='search_by' id='search_by' value='{$searchField}' />\n        <input type='hidden' name='search_text' id='search_text' value='{$searchText}' />\n        </td>\n        </tr>";
         echo '</table>';
         echo '</td></tr>';
         if (count($mimetypes) > 0) {
             echo "<tr><th colspan='6'>" . _AM_PUBLISHER_TEXT_SEARCH_MIME . '</th></tr>';
             echo "<tr class='head'>\n            <td>" . _AM_PUBLISHER_MIME_ID . '</td>
         <td>' . _AM_PUBLISHER_MIME_NAME . "</td>\n            <td align='center'>" . _AM_PUBLISHER_MIME_EXT . "</td>\n            <td align='center'>" . _AM_PUBLISHER_MIME_ADMIN . "</td>\n            <td align='center'>" . _AM_PUBLISHER_MIME_USER . "</td>\n            <td align='center'>" . _AM_PUBLISHER_MINDEX_ACTION . '</td>
         </tr>';
             foreach ($mimetypes as $mime) {
                 echo "<tr class='even'>\n                <td><input type='checkbox' name='mimes[]' value='" . $mime->getVar('mime_id') . "' />" . $mime->getVar('mime_id') . '</td>
             <td>' . $mime->getVar('mime_name') . "</td>\n                <td align='center'>" . $mime->getVar('mime_ext') . "</td>\n                <td align='center'>\n                <a href='" . PUBLISHER_ADMIN_URL . '/mimetypes.php?op=updateMimeValue&amp;id=' . $mime->getVar('mime_id') . '&amp;mime_admin=' . $mime->getVar('mime_admin') . '&amp;limit=' . $limit . '&amp;start=' . $start . "'>\n                " . ($mime->getVar('mime_admin') ? $imagearray['online'] : $imagearray['offline']) . "</a>\n                </td>\n                <td align='center'>\n                <a href='" . PUBLISHER_ADMIN_URL . '/mimetypes.php?op=updateMimeValue&amp;id=' . $mime->getVar('mime_id') . '&amp;mime_user=' . $mime->getVar('mime_user') . '&amp;limit=' . $limit . '&amp;start=' . $start . "'>\n                " . ($mime->getVar('mime_user') ? $imagearray['online'] : $imagearray['offline']) . "</a>\n                </td>\n                <td align='center'>\n                <a href='" . PUBLISHER_ADMIN_URL . '/mimetypes.php?op=edit&amp;id=' . $mime->getVar('mime_id') . '&amp;limit=' . $limit . '&amp;start=' . $start . "'>" . $imagearray['editimg'] . "</a>\n                <a href='" . PUBLISHER_ADMIN_URL . '/mimetypes.php?op=delete&amp;id=' . $mime->getVar('mime_id') . '&amp;limit=' . $limit . '&amp;start=' . $start . "'>" . $imagearray['deleteimg'] . '</a>
             </td>
             </tr>';
             }
             //                unset($mime);
             echo "<tr class='foot'>\n            <td colspan='6' valign='top'>\n            <a href='http://www.filext.com' style='float: right;' target='_blank'>" . _AM_PUBLISHER_MIME_FINDMIMETYPE . "</a>\n            <input type='checkbox' name='checkAllMimes' value='0' onclick='selectAll(this.form,\"mimes[]\",this.checked);' />\n            <input type='submit' name='deleteMimes' id='deleteMimes' value='" . _AM_PUBLISHER_BUTTON_DELETE . "' />\n            <input type='submit' name='add_mime' id='add_mime' value='" . _AM_PUBLISHER_MIME_CREATEF . "' class='formButton' />\n            </td>\n            </tr>";
         } else {
             echo '<tr><th>' . _AM_PUBLISHER_TEXT_SEARCH_MIME . '</th></tr>';
             echo "<tr class='even'>\n            <td>" . _AM_PUBLISHER_TEXT_NO_RECORDS . '</td>
         </tr>';
         }
         echo '</table>';
         echo "<div id='pagenav'>" . $nav->renderNav() . '</div>';
     }
     publisherCloseCollapsableBar('mimesearchtable', 'mimesearchicon');
     //        include_once __DIR__ . '/admin_footer.php';
     xoops_cp_footer();
 }
开发者ID:trabisdementia,项目名称:publisher,代码行数:101,代码来源:mimetypes.php

示例15: XoopsPageNav

				</td>
			<td width="10%" align="center" nowrap="nowrap">
				<strong><a href="moderate.php?forum='.$forum_id.'&amp;start='.$start.'&amp;sort=forum" title="Sort by expire">'._MD_SUSPEND_SCOPE.'</a></strong>
				</td>
			<td align="left">
				<strong>'._MD_SUSPEND_DESC.'</strong>
				</td>
			<td width="5%" align="center" nowrap="nowrap">
				<strong>'._DELETE.'</strong>
				</td>
		</tr>
	';
	if ( $moderate_count > $xoopsModuleConfig['topics_per_page']) {
		include XOOPS_ROOT_PATH.'/class/pagenav.php';
		$nav = new XoopsPageNav($all_topics, $xoopsModuleConfig['topics_per_page'], $start, "start", 'forum='.$forum_id.'&amp;sort='.$sortname);
		echo '<tr><td colspan="6">'.$nav->renderNav(4).'</td></tr>';
	}
	
	echo '</table><br /><br />';			
}

include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";
$forum_form = new XoopsThemeForm(_ADD, 'suspend', "moderate.php", 'post');
$forum_form->addElement(new XoopsFormText(_MD_SUSPEND_UID, 'uid', 20, 25));
$forum_form->addElement(new XoopsFormText(_MD_SUSPEND_IP, 'ip', 20, 25));
$forum_form->addElement(new XoopsFormText(_MD_SUSPEND_DURATION, 'expire', 20, 25, ''), true);
$forum_form->addElement(new XoopsFormText(_MD_SUSPEND_DESC, 'desc', 50, 255));
$forum_form->addElement(new XoopsFormHidden('forum', $forum_id));
$forum_form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, "submit"));
$forum_form->display();
include XOOPS_ROOT_PATH.'/footer.php';
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:moderate.php


注:本文中的XoopsPageNav::renderNav方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。