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


PHP functions::display_pagination方法代码示例

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


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

示例1: mysql_result

                } else {
                    $sql = '';
                    $nav = '';
                }
                //Получаем список контактов
                $total = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_contact`\n\t\t\t        LEFT JOIN `users` ON `cms_contact`.`from_id`=`users`.`id`\n\t\t\t        WHERE `cms_contact`.`user_id`='" . $user_id . "'\n\t\t\t        AND `cms_contact`.`type`='2'\n\t\t\t        AND `cms_contact`.`friends`='1'\n\t\t\t        AND `cms_contact`.`ban`!='1'{$sql}\n\t\t\t    "), 0);
                if ($total) {
                    $req = mysql_query("SELECT `users`.* FROM `cms_contact`\n\t\t\t\t        LEFT JOIN `users` ON `cms_contact`.`from_id`=`users`.`id`\n\t\t\t\t        WHERE `cms_contact`.`user_id`='" . $user_id . "'\n\t\t\t\t        AND `cms_contact`.`type`='2'\n\t\t\t\t        AND `cms_contact`.`friends`='1'\n\t\t\t\t        AND `cms_contact`.`ban`!='1'{$sql}\n\t\t\t\t        ORDER BY `cms_contact`.`time` DESC\n\t\t\t\t        LIMIT " . $start . "," . $kmess);
                    for ($i = 0; ($row = mysql_fetch_assoc($req)) !== FALSE; ++$i) {
                        echo $i % 2 ? '<div class="list1">' : '<div class="list2">';
                        $subtext = '<a href="../mail/index.php?act=write&amp;id=' . $row['id'] . '">' . $lng['write'] . '</a> | <a href="profile.php?act=friends&amp;do=delete&amp;id=' . $row['id'] . '">' . $lng['delete'] . '</a> | <a href="../mail/index.php?act=ignor&amp;id=' . $row['id'] . '&amp;add">' . $lng_profile['add_ignor'] . '</a>';
                        $count_message = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_mail` WHERE ((`user_id`='{$row['id']}' AND `from_id`='{$user_id}') OR (`user_id`='{$user_id}' AND `from_id`='{$row['id']}')) AND `sys`!='1' AND `spam`!='1' AND `delete`!='{$user_id}';"), 0);
                        $new_count_message = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_mail` WHERE `cms_mail`.`user_id`='{$row['id']}' AND `cms_mail`.`from_id`='{$user_id}' AND `read`='0' AND `sys`!='1' AND `spam`!='1' AND `delete`!='{$user_id}';"), 0);
                        $arg = array('header' => '(' . $count_message . ($new_count_message ? '/<span class="red">+' . $new_count_message . '</span>' : '') . ')', 'sub' => $subtext);
                        echo functions::display_user($row, $arg);
                        echo '</div>';
                    }
                } else {
                    echo '<div class="menu"><p>' . $lng['list_empty'] . '</p></div>';
                }
                echo '<div class="phdr">' . $lng['total'] . ': ' . $total . '</div>';
                if ($total > $kmess) {
                    echo '<p>' . functions::display_pagination('profile.php?act=friends' . $nav . '&amp;', $start, $total, $kmess) . '</p>' . '<p><form action="profile.php" method="get">' . '<input type="hidden" name="act" value="friends"/>' . ($nav ? '<input type="hidden" name="sort" value="' . $sort . '"/>' : '') . '<input type="text" name="page" size="2"/>' . '<input type="submit" value="' . $lng['to_page'] . ' &gt;&gt;"/></form></p>';
                }
                if ($set_mail['cat_friends']) {
                    echo '<div class="menu"><form action="profile.php?act=friends" method="post"><div>' . '<select name="sort">' . '<option value="0">Все</option>' . '<option value="1"' . ($sort == 1 ? ' selected="selected"' : '') . '>' . $lng_profile['friend'] . '</option>' . '<option value="2"' . ($sort == 2 ? ' selected="selected"' : '') . '>' . $lng_profile['classfriend'] . '</option>' . '<option value="3"' . ($sort == 3 ? ' selected="selected"' : '') . '>' . $lng_profile['colleague'] . '</option>' . '<option value="4"' . ($sort == 4 ? ' selected="selected"' : '') . '>' . $lng_profile['best_friend'] . '</option>' . '<option value="5"' . ($sort == 5 ? ' selected="selected"' : '') . '>' . $lng_profile['classmate'] . '</option>' . '<option value="6"' . ($sort == 6 ? ' selected="selected"' : '') . '>' . $lng_profile['relative'] . '</option>' . '</select>' . '<input type="submit" value="' . $lng_profile['sea_friends'] . ' &gt;&gt;"/></div></form></div>';
                }
        }
        echo '<p><a href="profile.php?act=office">' . $lng['personal'] . '</a></p>';
    }
}
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:friends.php

示例2: mb_substr

                $tx = mb_substr(strip_tags($tx), 0, 90);
                $tx = "<br/>{$tx}...";
            } else {
                $tx = "<br/>{$tx}";
            }
        } else {
            $tx = "";
        }
        echo '<img src="' . $filesroot . '/img/' . $imt . '" alt=""/><a href="?act=view&amp;file=' . $newf['id'] . '">' . htmlentities($newf['name'], ENT_QUOTES, 'UTF-8') . '</a> (' . $fsz . ' кб)' . $tx . '<br/>';
        $nadir = $newf['refid'];
        $pat = "";
        while ($nadir != "") {
            $dnew = mysql_query("select * from `download` where type = 'cat' and id = '" . $nadir . "'");
            $dnew1 = mysql_fetch_array($dnew);
            $pat = "{$dnew1['text']}/{$pat}";
            $nadir = $dnew1['refid'];
        }
        $l = mb_strlen($pat);
        $pat1 = mb_substr($pat, 0, $l - 1);
        echo "[{$pat1}]</div>";
        ++$i;
    }
    echo '<div class="phdr">' . $lng['total'] . ': ' . $total . '</div>';
    if ($total > 10) {
        echo '<p>' . functions::display_pagination('index.php?act=new&amp;', $start, $total, $kmess) . '</p>';
        echo '<p><form action="index.php" method="get"><input type="hidden" value="new" name="act" /><input type="text" name="page" size="2"/><input type="submit" value="' . $lng['to_page'] . ' &gt;&gt;"/></form></p>';
    }
} else {
    echo '<p>' . $lng['list_empty'] . '</p>';
}
echo "<p><a href='index.php?'>" . $lng['back'] . "</a></p>";
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:new.php

示例3: while

             $i = 1;
             while (($row = mysql_fetch_assoc($req)) !== false) {
                 echo $i % 2 ? '<div class="list1">' : '<div class="list2">';
                 if (file_exists('../files/blogs/ico_cat_' . $row['id'] . '.jpg') !== false) {
                     echo '<a href="index.php?act=animes&amp;mod=ico&amp;id=' . $row['id'] . '"><img style="margin: 0 0 -3px 0;border: 0px;" src="../files/blogs/ico_cat_' . $row['id'] . '.jpg" alt="" width="16" height="16"/></a>&#160;';
                 }
                 echo htmlentities($row['name'], ENT_QUOTES, 'UTF-8') . ' <a href="../blogs/index.php?id=' . $row['id'] . '">&raquo;</a>';
                 echo '<div class="sub">
      <a href="manage.php?act=up&amp;id=' . $row['id'] . '">Keatas</a> | <a href="manage.php?act=down&amp;id=' . $row['id'] . '">Kebawah</a> | <a href="manage.php?act=edit&amp;id=' . $row['id'] . '">Edit</a> | <a href="manage.php?act=delete&amp;id=' . $row['id'] . '">Hapus</a>
      </div>';
                 echo '</div>';
                 ++$i;
             }
             echo '<div class="phdr">Total Kategori: ' . $total . '</div>';
             if ($total > $kmess) {
                 echo '<p>' . functions::display_pagination('manage.php?', $start, $total, $kmess) . '</p>';
                 echo '<p><form action="index.php" method="get">
      <input type="hidden" name="act" value="mod_news"/>
      <input type="text" name="page" size="2"/>
      <input type="submit" value="' . $lng['to_page'] . ' &gt;&gt;"/></form></p>';
             }
         } else {
             echo '<div class="rmenu">Tidak ada kategori</div>';
         }
         echo '<div class="gmenu"><form action="manage.php?act=add" method="post"><input type="submit" value="Tambah kategori" /></form></div>';
         if ($total) {
             echo '<div class="gmenu"><form action="nulis.php" method="post"><input type="submit" value="Tambah Blogs" /></form></div>';
             echo '<div class="bmenu"><a href="manage.php?act=list">List Anime</a></div>';
             echo '<div class="bmenu"><a href="manage.php?act=clear">Hapus Blog</a></div>';
         }
 }
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:manage.php

示例4: defined

* @package     JohnCMS
* @link        http://johncms.com
* @copyright   Copyright (C) 2008-2011 JohnCMS Community
* @license     LICENSE.txt (see attached file)
* @version     VERSION.txt (see attached file)
* @author      http://johncms.com/about
*/
defined('_IN_JOHNCMS') or die('Error: restricted access');
$textl = $lng['users_list'];
$headmod = 'userlist';
require '../incfiles/head.php';
/*
-----------------------------------------------------------------
Выводим список пользователей
-----------------------------------------------------------------
*/
$total = mysql_result(mysql_query("SELECT COUNT(*) FROM `users`"), 0);
echo '<div class="phdr"><a href="index.php"><b>' . $lng['community'] . '</b></a> | ' . $lng['users_list'] . '</div>';
if ($total > $kmess) {
    echo '<div class="topmenu">' . functions::display_pagination('index.php?act=userlist&amp;', $start, $total, $kmess) . '</div>';
}
$req = mysql_query("SELECT `id`, `name`, `sex`, `lastdate`, `datereg`, `status`, `rights`, `ip`, `browser`, `rights` FROM `users` WHERE `preg` = 1 ORDER BY `datereg` DESC LIMIT {$start}, {$kmess}");
for ($i = 0; ($res = mysql_fetch_assoc($req)) !== false; $i++) {
    echo $i % 2 ? '<div class="list2">' : '<div class="list1">';
    echo functions::display_user($res) . '</div>';
}
echo '<div class="phdr">' . $lng['total'] . ': ' . $total . '</div>';
if ($total > $kmess) {
    echo '<div class="topmenu">' . functions::display_pagination('index.php?act=userlist&amp;', $start, $total, $kmess) . '</div>' . '<p><form action="index.php?act=userlist" method="post">' . '<input type="text" name="page" size="2"/>' . '<input type="submit" value="' . $lng['to_page'] . ' &gt;&gt;"/>' . '</form></p>';
}
echo '<p><a href="search.php">' . $lng['search_user'] . '</a><br />' . '<a href="index.php">' . $lng['back'] . '</a></p>';
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:userlist.php

示例5: mysql_query

if ($total > $kmess) {
    echo '<div class="topmenu">' . functions::display_pagination('index.php?act=online&amp;' . ($mod ? 'mod=' . $mod . '&amp;' : ''), $start, $total, $kmess) . '</div>';
}
if ($total) {
    $req = mysql_query($sql_list . "{$start}, {$kmess}");
    $i = 0;
    while (($res = mysql_fetch_assoc($req)) !== false) {
        if ($res['id'] == core::$user_id) {
            echo '<div class="gmenu">';
        } else {
            echo $i % 2 ? '<div class="list2">' : '<div class="list1">';
        }
        $arg['stshide'] = 1;
        $arg['header'] = ' <span class="gray">(';
        if ($mod == 'history') {
            $arg['header'] .= functions::display_date($res['sestime']);
        } else {
            $arg['header'] .= $res['movings'] . ' - ' . functions::timecount(time() - $res['sestime']);
        }
        $arg['header'] .= ')</span><br /><img src="../images/info.png" width="16" height="16" align="middle" />&#160;' . functions::display_place($res['id'], $res['place']);
        echo functions::display_user($res, $arg);
        echo '</div>';
        ++$i;
    }
} else {
    echo '<div class="menu"><p>' . $lng['list_empty'] . '</p></div>';
}
echo '<div class="phdr">' . $lng['total'] . ': ' . $total . '</div>';
if ($total > $kmess) {
    echo '<div class="topmenu">' . functions::display_pagination('index.php?act=online&amp;' . ($mod ? 'mod=' . $mod . '&amp;' : ''), $start, $total, $kmess) . '</div>' . '<p><form action="index.php?act=online' . ($mod ? '&amp;mod=' . $mod : '') . '" method="post">' . '<input type="text" name="page" size="2"/>' . '<input type="submit" value="' . $lng['to_page'] . ' &gt;&gt;"/>' . '</form></p>';
}
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:online.php

示例6: long2ip

        case 1:
            echo ' Kil ';
            break;
    }
    $ontime = $mass1['lastdate'];
    $ontime2 = $ontime + 300;
    if (time() > $ontime2) {
        echo '<font color="#FF0000"> [Off]</font>';
    } else {
        echo '<font color="#00AA00"> [ON]</font>';
    }
    echo '(' . functions::display_date($mass['time']) . ')<br/>';
    if ($set_user['smileys']) {
        $tekst = functions::smileys($mass['text'], $mass1['rights'] >= 1 ? 1 : 0);
    } else {
        $tekst = $mass['text'];
    }
    echo "{$tekst}<br/>";
    if ($rights == 5 || $rights >= 6) {
        echo long2ip($mass['ip']) . " - {$mass['soft']}<br/><a href='index.php?act=del&amp;id=" . $mass['id'] . "'>" . $lng['delete'] . "</a>";
    }
    echo '</div>';
    ++$i;
}
echo '<div class="phdr">' . $lng['total'] . ': ' . $countm . '</div>';
// Навигация по страницам
if ($countm > $kmess) {
    echo '<p>' . functions::display_pagination('index.php?act=komm&amp;id=' . $id . '&amp;', $start, $countm, $kmess) . '</p>';
    echo '<p><form action="index.php" method="get"><input type="hidden" name="act" value="komm"/><input type="hidden" name="id" value="' . $id . '"/><input type="text" name="page" size="2"/><input type="submit" value="' . $lng['to_page'] . ' &gt;&gt;"/></form></p>';
}
echo '<p><a href="?id=' . $id . '">' . $lng['back'] . '</a></p>';
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:komm.php

示例7: implode

            //print_r($outmass);
            $out .= $post;
            $out .= '<div class="sub"><a href="index.php?act=delete&amp;id=' . $row['id'] . '">' . $lng['delete'] . '</a></div>';
            $out .= '</div>';
        }
        //Ставим метку о прочтении
        if ($mass_read) {
            $result = implode(',', $mass_read);
            mysql_query("UPDATE `cms_mail` SET `read`='1' WHERE `from_id`='{$user_id}' AND `sys`='1' AND `id` IN (" . $result . ")");
        }
    } else {
        $out .= '<div class="menu"><p>' . $lng['list_empty'] . '</p></div>';
    }
    $out .= '<div class="phdr">' . $lng['total'] . ': ' . $total . '</div>';
    if ($total > $kmess) {
        $out .= '<div class="topmenu">' . functions::display_pagination('index.php?act=systems&amp;', $start, $total, $kmess) . '</div>';
        $out .= '<p><form action="index.php" method="get">
			<input type="hidden" name="act" value="systems"/>
			<input type="text" name="page" size="2"/>
			<input type="submit" value="' . $lng['to_page'] . ' &gt;&gt;"/></form></p>';
    }
}
$textl = $lng['mail'];
require_once '../incfiles/head.php';
echo '<div class="phdr"><b>' . $lng_mail['systems_messages'] . '</b></div>';
echo $out;
echo '<p>';
if ($total) {
    echo '<a href="index.php?act=systems&amp;mod=clear">' . $lng_mail['clear_messages'] . '</a><br/>';
}
echo '<a href="../users/profile.php?act=office">' . $lng['personal'] . '</a></p>';
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:systems.php

示例8: date

                echo $i % 2 ? '<div class="list2">' : '<div class="list1">';
                echo '<img src="../images/' . ($remain > 0 ? 'red' : 'green') . '.gif" width="16" height="16" align="left" />&#160;' . '<b>' . $lng_ban['ban_' . $res['ban_type']] . '</b>' . ' <span class="gray">(' . date("d.m.Y / H:i", $res['ban_while']) . ')</span>' . '<br />' . functions::checkout($res['ban_reason']) . '<div class="sub">';
                if ($rights > 0) {
                    echo '<span class="gray">' . $lng_ban['ban_who'] . ':</span> ' . $res['ban_who'] . '<br />';
                }
                echo '<span class="gray">' . $lng['term'] . ':</span> ' . ($period < 86400000 ? functions::timecount($period) : $lng_ban['ban_time_before_cancel']);
                if ($remain > 0) {
                    echo '<br /><span class="gray">' . $lng['remains'] . ':</span> ' . functions::timecount($remain);
                }
                // Меню отдельного бана
                $menu = array();
                if ($rights >= 7 && $remain > 0) {
                    $menu[] = '<a href="profile.php?act=ban&amp;mod=cancel&amp;user=' . $user['id'] . '&amp;ban=' . $res['id'] . '">' . $lng_ban['ban_cancel_do'] . '</a>';
                }
                if ($rights == 9) {
                    $menu[] = '<a href="profile.php?act=ban&amp;mod=delete&amp;user=' . $user['id'] . '&amp;ban=' . $res['id'] . '">' . $lng_ban['ban_delete_do'] . '</a>';
                }
                if (!empty($menu)) {
                    echo '<div>' . functions::display_menu($menu) . '</div>';
                }
                echo '</div></div>';
                ++$i;
            }
        } else {
            echo '<div class="menu"><p>' . $lng['list_empty'] . '</p></div>';
        }
        echo '<div class="phdr">' . $lng['total'] . ': ' . $total . '</div>';
        if ($total > $kmess) {
            echo '<p>' . functions::display_pagination('profile.php?act=ban&amp;user=' . $user['id'] . '&amp;', $start, $total, $kmess) . '</p>' . '<p><form action="profile.php?act=ban&amp;user=' . $user['id'] . '" method="post">' . '<input type="text" name="page" size="2"/>' . '<input type="submit" value="' . $lng['to_page'] . ' &gt;&gt;"/></form></p>';
        }
}
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:ban.php

示例9: __construct


//.........这里部分代码省略.........
                             mysql_query("DELETE FROM `" . $this->comments_table . "` WHERE `id` = '" . $this->item . "'");
                         }
                         // Вычитаем баллы из статистики пользователя
                         $req_u = mysql_query("SELECT * FROM `users` WHERE `id` = '" . $res['user_id'] . "'");
                         if (mysql_num_rows($req_u)) {
                             $res_u = mysql_fetch_assoc($req_u);
                             $count = $res_u['komm'] > $count ? $res_u['komm'] - $count : 0;
                             mysql_query("UPDATE `users` SET `komm` = '{$count}' WHERE `id` = '" . $res['user_id'] . "'");
                         }
                         // Обновляем счетчик комментариев
                         $this->msg_total(1);
                     }
                     header('Location: ' . str_replace('&amp;', '&', $this->url));
                 } else {
                     echo '<div class="phdr"><a href="' . $this->url . '"><b>' . $arg['title'] . '</b></a> | ' . core::$lng['delete'] . '</div>' . '<div class="rmenu"><p>' . core::$lng['delete_confirmation'] . '<br />' . '<a href="' . $this->url . '&amp;mod=del&amp;item=' . $this->item . '&amp;yes">' . core::$lng['delete'] . '</a> | ' . '<a href="' . $this->url . '">' . core::$lng['cancel'] . '</a><br />' . '<div class="sub">' . core::$lng['clear_user_msg'] . '<br />' . '<span class="red"><a href="' . $this->url . '&amp;mod=del&amp;item=' . $this->item . '&amp;yes&amp;all">' . core::$lng['clear'] . '</a></span>' . '</div></p></div>' . '<div class="phdr"><a href="' . $this->url . '">' . core::$lng['back'] . '</a></div>';
                 }
             }
             break;
         default:
             if (!empty($arg['context_top'])) {
                 echo $arg['context_top'];
             }
             /*
             -----------------------------------------------------------------
             Добавляем новый комментарий
             -----------------------------------------------------------------
             */
             if (!$this->ban && !functions::is_ignor($this->owner) && isset($_POST['submit']) && ($message = $this->msg_check(1)) !== false) {
                 if (empty($message['error'])) {
                     // Записываем комментарий в базу
                     $this->add_comment($message['text']);
                     $this->total = $this->msg_total(1);
                     $_SESSION['code'] = $message['code'];
                 } else {
                     // Показываем ошибки, если есть
                     echo functions::display_error($message['error']);
                     $this->total = $this->msg_total();
                 }
             } else {
                 $this->total = $this->msg_total();
             }
             /*
             -----------------------------------------------------------------
             Показываем форму ввода
             -----------------------------------------------------------------
             */
             if (!$this->ban && !functions::is_ignor($this->owner)) {
                 echo $this->msg_form();
             }
             /*
             -----------------------------------------------------------------
             Показываем список комментариев
             -----------------------------------------------------------------
             */
             echo '<div class="phdr"><b>' . $arg['title'] . '</b></div>';
             if ($this->total > $kmess) {
                 echo '<div class="topmenu">' . functions::display_pagination($this->url . '&amp;', $start, $this->total, $kmess) . '</div>';
             }
             if ($this->total) {
                 $req = mysql_query("SELECT `" . $this->comments_table . "`.*, `" . $this->comments_table . "`.`id` AS `subid`, `users`.`rights`, `users`.`lastdate`, `users`.`sex`, `users`.`status`, `users`.`datereg`, `users`.`id`\n                    FROM `" . $this->comments_table . "` LEFT JOIN `users` ON `" . $this->comments_table . "`.`user_id` = `users`.`id`\n                    WHERE `sub_id` = '" . $this->sub_id . "' ORDER BY `subid` DESC LIMIT {$start}, {$kmess}");
                 $i = 0;
                 while (($res = mysql_fetch_assoc($req)) !== false) {
                     $attributes = unserialize($res['attributes']);
                     $res['name'] = $attributes['author_name'];
                     $res['ip'] = $attributes['author_ip'];
                     $res['ip_via_proxy'] = isset($attributes['author_ip_via_proxy']) ? $attributes['author_ip_via_proxy'] : 0;
                     $res['browser'] = $attributes['author_browser'];
                     echo $i % 2 ? '<div class="list2">' : '<div class="list1">';
                     $menu = array($this->access_reply ? '<a href="' . $this->url . '&amp;mod=reply&amp;item=' . $res['subid'] . '">' . core::$lng['reply'] . '</a>' : '', $this->access_edit ? '<a href="' . $this->url . '&amp;mod=edit&amp;item=' . $res['subid'] . '">' . core::$lng['edit'] . '</a>' : '', $this->access_delete ? '<a href="' . $this->url . '&amp;mod=del&amp;item=' . $res['subid'] . '">' . core::$lng['delete'] . '</a>' : '');
                     $text = functions::checkout($res['text'], 1, 1);
                     if (core::$user_set['smileys']) {
                         $text = functions::smileys($text, $res['rights'] >= 1 ? 1 : 0);
                     }
                     if (isset($attributes['edit_count'])) {
                         $text .= '<br /><span class="gray"><small>' . core::$lng['edited'] . ': <b>' . $attributes['edit_name'] . '</b>' . ' (' . functions::display_date($attributes['edit_time']) . ') <b>' . '[' . $attributes['edit_count'] . ']</b></small></span>';
                     }
                     if (!empty($res['reply'])) {
                         $reply = functions::checkout($res['reply'], 1, 1);
                         if (core::$user_set['smileys']) {
                             $reply = functions::smileys($reply, $attributes['reply_rights'] >= 1 ? 1 : 0);
                         }
                         $text .= '<div class="' . ($attributes['reply_rights'] ? '' : 'g') . 'reply"><small>' . '<a href="' . core::$system_set['homeurl'] . '/users/profile.php?user=' . $attributes['reply_id'] . '"><b>' . $attributes['reply_name'] . '</b></a>' . ' (' . functions::display_date($attributes['reply_time']) . ')</small><br/>' . $reply . '</div>';
                     }
                     $user_arg = array('header' => ' <span class="gray">(' . functions::display_date($res['time']) . ')</span>', 'body' => $text, 'sub' => functions::display_menu($menu), 'iphide' => core::$user_rights ? false : true);
                     echo functions::display_user($res, $user_arg);
                     echo '</div>';
                     ++$i;
                 }
             } else {
                 echo '<div class="menu"><p>' . core::$lng['list_empty'] . '</p></div>';
             }
             echo '<div class="phdr">' . core::$lng['total'] . ': ' . $this->total . '</div>';
             if ($this->total > $kmess) {
                 echo '<div class="topmenu">' . functions::display_pagination($this->url . '&amp;', $start, $this->total, $kmess) . '</div>' . '<p><form action="' . $this->url . '" method="post">' . '<input type="text" name="page" size="2"/>' . '<input type="submit" value="' . core::$lng['to_page'] . ' &gt;&gt;"/>' . '</form></p>';
             }
             if (!empty($arg['context_bottom'])) {
                 echo $arg['context_bottom'];
             }
     }
 }
开发者ID:chegestar,项目名称:catroxs,代码行数:101,代码来源:comments.php

示例10: foreach

                $pos = 100;
            }
            $name = $res['name'];
            $text = functions::checkout(mb_substr($res['text'], $pos - 100, 400), 1);
            if ($search_t) {
                foreach ($array as $val) {
                    $name = ReplaceKeywords($val, $name);
                }
            } else {
                foreach ($array as $val) {
                    $text = ReplaceKeywords($val, $text);
                }
            }
            echo '<b><a href="index.php?id=' . $res['id'] . '">' . $name . '</a></b><br />' . $text . ' <div class="sub"><span class="gray">' . $lng_lib['added'] . ':</span> ' . $res['avtor'] . ' <span class="gray">(' . functions::display_date($res['time']) . ')</span><br />' . '<span class="gray">' . $lng_lib['reads'] . ':</span> ' . $res['count'] . '</div></div>';
            ++$i;
        }
    } else {
        echo '<div class="rmenu"><p>' . $lng['search_results_empty'] . '</p></div>';
    }
    echo '<div class="phdr">' . $lng['total'] . ': ' . $total . '</div>';
    if ($total > $kmess) {
        echo '<div class="topmenu">' . functions::display_pagination('search.php?' . ($search_t ? 't=1&amp;' : '') . 'search=' . urlencode($search) . '&amp;', $start, $total, $kmess) . '</div>' . '<p><form action="search.php?' . ($search_t ? 't=1&amp;' : '') . 'search=' . urlencode($search) . '" method="post">' . '<input type="text" name="page" size="2"/>' . '<input type="submit" value="' . $lng['to_page'] . ' &gt;&gt;"/>' . '</form></p>';
    }
} else {
    if ($error) {
        echo functions::display_error($error);
    }
    echo '<div class="phdr"><small>' . $lng['search_help'] . '</small></div>';
}
echo '<p>' . ($search ? '<a href="search.php">' . $lng['search_new'] . '</a><br />' : '') . '<a href="index.php">' . $lng['library'] . '</a></p>';
require '../incfiles/end.php';
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:search.php

示例11: mysql_query

    case 'ip':
        $sort = 'ip';
        echo '<a href="index.php?act=usr&amp;sort=id">ID</a> | <a href="index.php?act=usr&amp;sort=nick">' . $lng['nick'] . '</a> | IP</div>';
        $order = '`ip` ASC';
        break;
    default:
        $sort = 'id';
        echo 'ID | <a href="index.php?act=usr&amp;sort=nick">' . $lng['nick'] . '</a> | <a href="index.php?act=usr&amp;sort=ip">IP</a></div>';
        $order = '`id` ASC';
}
$req = mysql_query("SELECT COUNT(*) FROM `users`");
$total = mysql_result($req, 0);
$req = mysql_query("SELECT * FROM `users` WHERE `preg` = 1 ORDER BY {$order} LIMIT " . $start . ", " . $kmess);
$i = 0;
while (($res = mysql_fetch_assoc($req)) !== false) {
    $link = '';
    if ($rights >= 7) {
        $link .= '<a href="../users/profile.php?act=edit&amp;user=' . $res['id'] . '">' . $lng['edit'] . '</a> | <a href="index.php?act=usr_del&amp;id=' . $res['id'] . '">' . $lng['delete'] . '</a> | ';
    }
    $link .= '<a href="../users/profile.php?act=ban&amp;mod=do&amp;user=' . $res['id'] . '">' . $lng['ban_do'] . '</a>';
    echo $i % 2 ? '<div class="list2">' : '<div class="list1">';
    echo functions::display_user($res, array('header' => '<b>ID:' . $res['id'] . '</b>', 'sub' => $link));
    echo '</div>';
    ++$i;
}
echo '<div class="phdr">' . $lng['total'] . ': ' . $total . '</div>';
if ($total > $kmess) {
    echo '<div class="topmenu">' . functions::display_pagination('index.php?act=usr&amp;sort=' . $sort . '&amp;', $start, $total, $kmess) . '</div>';
    echo '<p><form action="index.php?act=usr&amp;sort=' . $sort . '" method="post"><input type="text" name="page" size="2"/><input type="submit" value="' . $lng['to_page'] . ' &gt;&gt;"/></form></p>';
}
echo '<p><a href="index.php?act=search_user">' . $lng['search_user'] . '</a><br /><a href="index.php">' . $lng['admin_panel'] . '</a></p>';
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:usr.php

示例12: mysql_query

    if ($total) {
        if ($mod == 'history') {
            $req = mysql_query("SELECT `cms_users_iphistory`.*, `users`.`name`, `users`.`rights`, `users`.`lastdate`, `users`.`sex`, `users`.`status`, `users`.`datereg`, `users`.`id`, `users`.`browser`\n                FROM `cms_users_iphistory` LEFT JOIN `users` ON `cms_users_iphistory`.`user_id` = `users`.`id`\n                WHERE `cms_users_iphistory`.`ip` BETWEEN {$ip1} AND {$ip2} OR `cms_users_iphistory`.`ip_via_proxy` BETWEEN {$ip1} AND {$ip2}\n                GROUP BY `users`.`id`\n                ORDER BY `ip` ASC, `name` ASC LIMIT {$start}, {$kmess}\n            ");
        } else {
            $req = mysql_query("SELECT * FROM `users`\n            WHERE `ip` BETWEEN {$ip1} AND {$ip2} OR `ip_via_proxy` BETWEEN {$ip1} AND {$ip2}\n            ORDER BY `ip` ASC, `name` ASC LIMIT {$start}, {$kmess}");
        }
        $i = 0;
        while (($res = mysql_fetch_assoc($req)) !== false) {
            echo $i % 2 ? '<div class="list2">' : '<div class="list1">';
            echo functions::display_user($res, array('iphist' => 1));
            echo '</div>';
            ++$i;
        }
    } else {
        echo '<div class="menu"><p>' . $lng['not_found'] . '</p></div>';
    }
    echo '<div class="phdr">' . $lng['total'] . ': ' . $total . '</div>';
    if ($total > $kmess) {
        // Навигация по страницам
        echo '<div class="topmenu">' . functions::display_pagination('index.php?act=search_ip' . ($mod == 'history' ? '&amp;mod=history' : '') . '&amp;search=' . urlencode($search) . '&amp;', $start, $total, $kmess) . '</div>' . '<p><form action="index.php?act=search_ip' . ($mod == 'history' ? '&amp;mod=history' : '') . '&amp;search=' . urlencode($search) . '" method="post">' . '<input type="text" name="page" size="2"/><input type="submit" value="' . $lng['to_page'] . ' &gt;&gt;"/>' . '</form></p>';
    }
    echo '<p><a href="index.php?act=search_ip">' . $lng['search_new'] . '</a><br /><a href="index.php">' . $lng['admin_panel'] . '</a></p>';
} else {
    // Выводим сообщение об ошибке
    if ($error) {
        echo functions::display_error($error);
    }
    // Инструкции для поиска
    echo '<div class="phdr">' . $lng['search_ip_help'] . '</div>';
    echo '<p><a href="index.php">' . $lng['admin_panel'] . '</a></p>';
}
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:search_ip.php

示例13:

     }
 } else {
     echo '<div class="menu"><p>' . $lng['list_empty'] . '</p></div>';
 }
 echo '<div class="phdr">';
 if ($totalcat > 0) {
     echo $lng_dl['folders'] . ': ' . $totalcat;
 }
 echo '&#160;&#160;';
 if ($totalfile > 0) {
     echo $lng_dl['files'] . ': ' . $totalfile;
 }
 echo '</div>';
 // Постраничная навигация
 if ($total > $kmess) {
     echo '<p>' . functions::display_pagination('index.php?cat=' . $cat . '&amp;', $start, $total, $kmess) . '</p>';
 }
 if ($rights == 4 || $rights >= 6) {
     ////////////////////////////////////////////////////////////
     // Выводим ссылки на модерские функции                    //
     ////////////////////////////////////////////////////////////
     echo '<p><div class="func">';
     echo '<a href="?act=makdir&amp;cat=' . $cat . '">' . $lng_dl['make_folder'] . '</a><br/>';
     if (!empty($_GET['cat'])) {
         $delcat = mysql_query("select * from `download` where type = 'cat' and refid = '" . $cat . "';");
         $delcat1 = mysql_num_rows($delcat);
         if ($delcat1 == 0) {
             echo '<a href="index.php?act=delcat&amp;cat=' . $cat . '">' . $lng_dl['delete_folder'] . '</a><br />';
         }
         echo '<a href="index.php?act=ren&amp;cat=' . $cat . '">' . $lng_dl['rename_folder'] . '</a><br />';
         echo '<a href="index.php?act=select&amp;cat=' . $cat . '">' . $lng_dl['upload_file'] . '</a><br />';
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:index.php

示例14: mysql_result

        /*
        -----------------------------------------------------------------
        Список постов Форума
        -----------------------------------------------------------------
        */
        $total = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum` WHERE `user_id` = '" . $user['id'] . "' AND `type` = 'm'" . ($rights >= 7 ? '' : " AND `close`!='1'")), 0);
        echo '<div class="phdr"><b>' . $lng['forum'] . '</b>: ' . $lng['messages'] . '</div>';
        if ($total > $kmess) {
            echo '<div class="topmenu">' . functions::display_pagination('profile.php?act=activity&amp;user=' . $user['id'] . '&amp;', $start, $total, $kmess) . '</div>';
        }
        $req = mysql_query("SELECT * FROM `forum` WHERE `user_id` = '" . $user['id'] . "' AND `type` = 'm' " . ($rights >= 7 ? '' : " AND `close`!='1'") . " ORDER BY `id` DESC LIMIT {$start}, {$kmess}");
        if (mysql_num_rows($req)) {
            $i = 0;
            while ($res = mysql_fetch_assoc($req)) {
                $topic = mysql_fetch_assoc(mysql_query("SELECT * FROM `forum` WHERE `id` = '" . $res['refid'] . "'"));
                $section = mysql_fetch_assoc(mysql_query("SELECT * FROM `forum` WHERE `id` = '" . $topic['refid'] . "'"));
                $category = mysql_fetch_assoc(mysql_query("SELECT * FROM `forum` WHERE `id` = '" . $section['refid'] . "'"));
                $text = mb_substr($res['text'], 0, 300);
                $text = functions::checkout($text, 2, 1);
                $text = preg_replace('#\\[c\\](.*?)\\[/c\\]#si', '<div class="quote">\\1</div>', $text);
                echo ($i % 2 ? '<div class="list2">' : '<div class="list1">') . '<a href="' . $set['homeurl'] . '/forum/index.php?id=' . $topic['id'] . '">' . $topic['text'] . '</a>' . '<br />' . $text . '...<a href="' . $set['homeurl'] . '/forum/index.php?act=post&amp;id=' . $res['id'] . '"> &gt;&gt;</a>' . '<div class="sub">' . '<a href="' . $set['homeurl'] . '/forum/index.php?id=' . $category['id'] . '">' . $category['text'] . '</a> | ' . '<a href="' . $set['homeurl'] . '/forum/index.php?id=' . $section['id'] . '">' . $section['text'] . '</a>' . '<br /><span class="gray">(' . functions::display_date($res['time']) . ')</span>' . '</div></div>';
                ++$i;
            }
        } else {
            echo '<div class="menu"><p>' . $lng['list_empty'] . '</p></div>';
        }
}
echo '<div class="phdr">' . $lng['total'] . ': ' . $total . '</div>';
if ($total > $kmess) {
    echo '<div class="topmenu">' . functions::display_pagination('profile.php?act=activity' . ($mod ? '&amp;mod=' . $mod : '') . '&amp;user=' . $user['id'] . '&amp;', $start, $total, $kmess) . '</div>' . '<p><form action="profile.php?act=activity&amp;user=' . $user['id'] . ($mod ? '&amp;mod=' . $mod : '') . '" method="post">' . '<input type="text" name="page" size="2"/>' . '<input type="submit" value="' . $lng['to_page'] . ' &gt;&gt;"/>' . '</form></p>';
}
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:activity.php

示例15: count

        $total = count($dir);
        for ($i = $start; $i < $page * $kmess && $i < $total; $i++) {
            $smiley = explode('/', $dir[$i]);
            $smiley = array_pop($smiley);
            $format = functions::format($smiley);
            $smiley_code = str_replace('.' . $format, '', strtolower($smiley));
            echo $i % 2 ? '<div class="menu">' : '<div class="menu">';
            echo functions::smileys(':' . $smiley_code . '') . ' :' . $smiley_code . '<br />
<a href="?act=smileys&amp;mod=unlink&amp;do=' . $do . '&amp;smiley=' . $smiley . '">' . $lng['delete'] . '</a>
| <a href="?act=smileys&amp;mod=rename&amp;do=' . $do . '&amp;smiley=' . $smiley . '">' . $lng['edit'] . '</a>';
            echo '</div>';
        }
        echo '<div class="phdr">' . $lng['total'] . ': ' . $total . '</div></div>';
        if ($total > $kmess) {
            echo '<div class="topmenu"><form action="?act=smileys&amp;do=' . $do . '&amp;mod=show_cat" method="post">
' . functions::display_pagination('?act=smileys&amp;do=' . $do . '&amp;mod=show_cat&amp;', $start, $total, $kmess) . '
<input type="text" name="page" size="2"/><input type="submit" value="Go!"/></form></div>';
        }
        break;
    case 'upload':
        $c = '../images/smileys/user/' . $do . '/';
        if (!is_dir($c)) {
            echo functions::display_error($lng['error_wrong_data']);
            echo '<p><a href="index.php">' . $lng['admin_panel'] . '</a></p>';
            require_once '../incfiles/end.php';
            exit;
        }
        $name_cat = $lng_smileys[$do] ? $lng_smileys[$do] : $do;
        echo '<div class="mainblok"><div class="phdr"><a href="?act=smileys&amp;do=' . $do . '&amp;mod=show_cat"><b>' . htmlspecialchars($name_cat) . '</b></a>
| Upload</div>';
        if (isset($_POST['submit'])) {
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:smileys.php


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