本文整理汇总了PHP中XoopsPageNav类的典型用法代码示例。如果您正苦于以下问题:PHP XoopsPageNav类的具体用法?PHP XoopsPageNav怎么用?PHP XoopsPageNav使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了XoopsPageNav类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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 " ";
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 ' ' . _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: XoopsPageNav
echo "<td class='even' align='left'>" . $categoryObj->getCategoryLink() . "</td>";
echo "<td class='even' align='left'>" . $itemsObj[$i]->getItemLink() . "</td>";
echo "<td class='even' align='center'>" . $itemsObj[$i]->datesub() . "</td>";
echo "<td class='even' align='center'>" . $statustxt . "</td>";
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}&sortsel={$sortsel}&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();
开发者ID:ming-hai,项目名称:XoopsCore,代码行数:31,代码来源:main.php
示例10: unset
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("&", $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&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&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 . "'> ";
echo "</div>";
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:displayitems.php
示例12: XoopsPageNav
$sel = '';
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"> </td><td class="odd"><a href="admin.php?fct=images&op=delfile&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&op=listimg&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();
开发者ID:BackupTheBerlios,项目名称:soopa,代码行数:31,代码来源:main.php
示例13: redirect_header
redirect_header("center.php?page=center", 2, _AM_MSG_REMOVED);
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
开发者ID:RanLee,项目名称:Xoops_demo,代码行数:31,代码来源:center.php
示例14: search
public static function search()
{
$publisher =& PublisherPublisher::getInstance();
global $limit, $start, $imagearray, $aSearchBy, $aOrderBy, $aLimitBy, $aSortBy;
if (XoopsRequest::getString('deleteMimes', '', 'POST')) {
$aMimes = XoopsRequest::getArray('mimes', array(), 'POST');
$crit = new Criteria('mime_id', '(' . implode($aMimes, ',') . ')', 'IN');
if ($publisher->getHandler('mimetype')->deleteAll($crit)) {
header('Location: ' . PUBLISHER_ADMIN_URL . "/mimetypes.php?limit={$limit}&start={$start}");
} else {
redirect_header(PUBLISHER_ADMIN_URL . "/mimetypes.php?limit={$limit}&start={$start}", 3, _AM_PUBLISHER_MESSAGE_DELETE_MIME_ERROR);
}
}
if (XoopsRequest::getString('add_mime', '', 'POST')) {
// header("Location: " . PUBLISHER_ADMIN_URL . "/mimetypes.php?op=add&start=$start&limit=$limit");
redirect_header(PUBLISHER_ADMIN_URL . "/mimetypes.php?op=add&start={$start}&limit={$limit}", 3, _AM_PUBLISHER_MIME_CREATEF);
// exit();
}
$order = XoopsRequest::getString('order', 'ASC', 'POST');
$sort = XoopsRequest::getString('sort', 'mime_name', 'POST');
publisherCpHeader();
//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&limit={$limit}&order={$order}&sort={$sort}&mime_search=1&search_by={$searchField}&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>
' . _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>
' . _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>
//.........这里部分代码省略.........
开发者ID:trabisdementia,项目名称:publisher,代码行数:101,代码来源:mimetypes.php
示例15: foreach
foreach ($postArray as $treeItem) {
$topic_handler->showTreeItem($xforumtopic, $treeItem);
if($treeItem['post_id'] == $post_id) $treeItem['subject'] = '<strong>'.$treeItem['subject'].'</strong>';
$xoopsTpl->append("topic_trees", array("post_id" => $treeItem['post_id'], "post_time" => $treeItem['post_time'], "post_image" => $treeItem['icon'], "post_title" => $treeItem['subject'], "post_prefix" => $treeItem['prefix'], "poster" => $treeItem['poster']));
}
unset($postArray);
}
}
else {
foreach ($postsArray as $eachpost) {
$xoopsTpl->append('topic_posts', $eachpost->showPost($isadmin));
}
if ( $total_posts > $xoopsModuleConfig['posts_per_page'] ) {
include XOOPS_ROOT_PATH.'/class/pagenav.php';
$nav = new XoopsPageNav($total_posts, $xoopsModuleConfig['posts_per_page'], $start, "start", 'topic_id='.$topic_id.'&viewmode='.$viewmode.'&order='.$order.'&type='.$type."&mode=".$mode);
$xoopsTpl->assign('forum_page_nav', $nav->renderNav(4));
} else {
$xoopsTpl->assign('forum_page_nav', '');
}
}
unset($postsArray);
$xoopsTpl->assign('topic_print_link', "print.php?form=1&topic_id=$topic_id&forum=".$forum_id."&order=$order&start=$start");
$admin_actions = array();
$ad_merge = "";
$ad_move = "";
$ad_delete = "";
$ad_lock = "";
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:viewtopic.php
示例16: unset
}
$users['user_level'] = $user->getVar("level");
$users['user_icq'] = $user->getVar("user_icq");
$users['user_aim'] = $user->getVar("user_aim");
$users['user_yim'] = $user->getVar("user_yim");
$users['user_msnm'] = $user->getVar("user_msnm");
$users['posts'] = $user->getVar("posts");
$xoops->tpl()->appendByRef('users', $users);
$xoops->tpl()->appendByRef('users_popup', $users);
unset($users, $user);
}
} else {
$xoops->tpl()->assign('users_no_found', true);
}
if ($users_count > $user_limit) {
$nav = new XoopsPageNav($users_count, $user_limit, $start, 'start', 'fct=users&op=default' . $requete_pagenav);
$xoops->tpl()->assign('nav', $nav->renderNav());
}
}
break;
}
// Call Footer
$xoops->footer();
/**
* addCriteria - add a criteria for a column enforcing XOOPS_MATCH_* rules
*
* @param CriteriaCompo $criteria A CriteriaCompo object to add to
* @param string $column column name
* @param int|string $value column value
* @param integer $match A XOOPS_MATCH_* value
*
开发者ID:redmexico,项目名称:XoopsCore,代码行数:31,代码来源:main.php
示例17: param
if (!$member_only && eguide_form_options('need_bind_uid', 0)) {
$member_only = true;
}
if (param('op', '') == 'users' || $member_only && !$uid) {
$xoopsOption['template_main'] = EGPREFIX . '_userssel.html';
include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
// search string
$s = param('search', '');
$cols = eguide_form_options('users_search_columns', 'uname,email');
$cond = $s ? "concat({$cols}) like " . $xoopsDB->quoteString("%{$s}%") : "1";
$cond = "FROM " . $xoopsDB->prefix('users') . " WHERE {$cond}";
$res = $xoopsDB->query("SELECT count(uid) {$cond}");
list($total) = $xoopsDB->fetchRow($res);
$start = param('start');
$max_list = $xoopsModuleConfig['max_list'];
$nav = new XoopsPageNav($total, $max_list, $start, "start", "eid={$eid}" . ($exid ? "&exid={$exid}" : '') . ($s ? "search={$s}" : ''));
$xoopsTpl->assign('users_total', $total);
if ($total > $max_list) {
$xoopsTpl->assign('navigation', $nav->renderNav());
}
$res = $xoopsDB->query("SELECT uid,{$cols} {$cond}", $max_list, $start);
$users = array();
if (empty($s)) {
$users[] = array('uid' => -1, 'uname' => $GLOBALS['xoopsConfig']['anonymous']);
}
while ($user = $xoopsDB->fetchArray($res)) {
$users[] = $user;
}
$labels = eguide_form_options('users_search_labels', '');
$lang = array('uname' => _MD_UNAME, 'email' => _MD_EMAIL);
$cols = explode(',', $cols);
开发者ID:nbuy,项目名称:xoops-modules-eguide,代码行数:31,代码来源:entry.php
-
dphi-official/Machine_Learning_Bootcamp
阅读:1364|2022-08-18
-
juven/maven-bash-completion: Maven Bash Auto Completion
阅读:823|2022-08-16
-
win7系统电脑使用过程中有不少朋友表示遇到过win7系统注册表编辑器打开的状况,当出现
阅读:764|2022-11-06
-
Use After Free in GitHub repository vim/vim prior to 9.0.0046.
阅读:597|2022-07-29
-
route101/mastoinker: Quick image view assistant for Mastodon client
阅读:926|2022-08-18
-
rootnroll/library: Playgrounds library
阅读:616|2022-08-15
-
0e0w · GitHub
阅读:430|2022-08-15
-
tgreyuk/typedoc-plugin-markdown: A plugin for TypeDoc that enables TypeScript AP
阅读:765|2022-08-18
-
台湾人的方言是“台湾话”,官方是“国语”,和普通话一样。小编一直觉得,大连话和台
阅读:315|2022-11-06
-
juankysoriano/MaterialLife: A Material Design styled Game of Life for Android
阅读:341|2022-08-17
|
请发表评论