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


PHP functions::display_menu方法代码示例

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


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

示例1: array

 -----------------------------------------------------------------
 Отображаем Гостевую, или Админ клуб
 -----------------------------------------------------------------
 */
 if (!$set['mod_guest']) {
     echo '<div class="alarm">' . $lng['guestbook_closed'] . '</div>';
 }
 echo '<div class="phdr"><b>' . $lng['guestbook'] . '</b></div>';
 if ($rights > 0) {
     $menu = array();
     $menu[] = isset($_SESSION['ga']) ? '<a href="index.php?act=ga">' . $lng['guestbook'] . '</a>' : '<b>' . $lng['guestbook'] . '</b>';
     $menu[] = isset($_SESSION['ga']) ? '<b>' . $lng['admin_club'] . '</b>' : '<a href="index.php?act=ga&amp;do=set">' . $lng['admin_club'] . '</a>';
     if ($rights >= 7) {
         $menu[] = '<a href="index.php?act=clean">' . $lng['clear'] . '</a>';
     }
     echo '<div class="topmenu">' . functions::display_menu($menu) . '</div>';
 }
 // Форма ввода нового сообщения
 if (($user_id || $set['mod_guest'] == 2) && !isset($ban['1']) && !isset($ban['13'])) {
     $token = mt_rand(1000, 100000);
     $_SESSION['token'] = $token;
     echo '<div class="gmenu"><form name="form" action="index.php?act=say" method="post">';
     if (!$user_id) {
         echo $lng['name'] . ' (max 25):<br/><input type="text" name="name" maxlength="25"/><br/>';
     }
     echo '<b>' . $lng['message'] . '</b> <small>(max 5000)</small>:<br/>';
     if (!$is_mobile) {
         echo bbcode::auto_bb('form', 'msg');
     }
     echo '<textarea rows="' . $set_user['field_h'] . '" name="msg"></textarea><br/>';
     if ($set_user['translit']) {
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:index.php

示例2: defined

 * @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 = htmlspecialchars($user['name']) . ': ' . $lng_profile['activity'];
require '../incfiles/head.php';
echo '<div class="phdr"><a href="profile.php?user=' . $user['id'] . '"><b>' . $lng['profile'] . '</b></a> | ' . $lng_profile['activity'] . '</div>';
$menu = array(!$mod ? '<b>' . $lng['messages'] . '</b>' : '<a href="profile.php?act=activity&amp;user=' . $user['id'] . '">' . $lng['messages'] . '</a>', $mod == 'topic' ? '<b>' . $lng['themes'] . '</b>' : '<a href="profile.php?act=activity&amp;mod=topic&amp;user=' . $user['id'] . '">' . $lng['themes'] . '</a>', $mod == 'comments' ? '<b>' . $lng['comments'] . '</b>' : '<a href="profile.php?act=activity&amp;mod=comments&amp;user=' . $user['id'] . '">' . $lng['comments'] . '</a>');
echo '<div class="topmenu">' . functions::display_menu($menu) . '</div>' . '<div class="user"><p>' . functions::display_user($user, array('iphide' => 1)) . '</p></div>';
switch ($mod) {
    case 'comments':
        /*
        -----------------------------------------------------------------
        Список сообщений в Гостевой
        -----------------------------------------------------------------
        */
        $total = mysql_result(mysql_query("SELECT COUNT(*) FROM `guest` WHERE `user_id` = '" . $user['id'] . "'" . ($rights >= 1 ? '' : " AND `adm` = '0'")), 0);
        echo '<div class="phdr"><b>' . $lng['comments'] . '</b></div>';
        if ($total > $kmess) {
            echo '<div class="topmenu">' . functions::display_pagination('profile.php?act=activity&amp;mod=comments&amp;user=' . $user['id'] . '&amp;', $start, $total, $kmess) . '</div>';
        }
        $req = mysql_query("SELECT * FROM `guest` WHERE `user_id` = '" . $user['id'] . "'" . ($rights >= 1 ? '' : " AND `adm` = '0'") . " ORDER BY `id` DESC LIMIT {$start}, {$kmess}");
        if (mysql_num_rows($req)) {
            $i = 0;
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:activity.php

示例3: 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

示例4: mysql_result

    if ($new_mail) {
        $list[] = '<a href="' . $home . '/mail/index.php?act=new">' . $lng['mail'] . '</a> (+' . $new_mail . ')';
    }
    if ($datauser['comm_count'] > $datauser['comm_old']) {
        $list[] = '<a href="' . core::$system_set['homeurl'] . '/users/profile.php?act=guestbook&amp;user=' . $user_id . '">' . $lng['guestbook'] . '</a> (' . ($datauser['comm_count'] - $datauser['comm_old']) . ')';
    }
    $new_album_comm = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_album_files` WHERE `user_id` = '" . core::$user_id . "' AND `unread_comments` = 1"), 0);
    if ($new_album_comm) {
        $list[] = '<a href="' . core::$system_set['homeurl'] . '/users/album.php?act=top&amp;mod=my_new_comm">' . $lng['albums_comments'] . '</a>';
    }
    //menampilkan notifikasi forum
    if ($datauser['journal_forum']) {
        $list[] = '<a href="' . core::$system_set['homeurl'] . '/users/journal.php"> Forum</a>&#160;(' . $datauser['journal_forum'] . ')';
    }
    if (!empty($list)) {
        echo '<div class="rmenu">' . $lng['unread'] . ': ' . functions::display_menu($list, ', ') . '</div>';
    }
}
/*
-----------------------------------------------------------------
Qchat
-----------------------------------------------------------------
*/
/*
if (($user_id) && !$ban['1'] && !$ban['12']){
$php_self=$_SERVER['PHP_SELF'];
*/
if ($user_id) {
    if ($headmod != "users" || $headmod == 'users' && $act) {
        if ($headmod != "guestbook" || $headmod == 'guestbook' && $act) {
            if ($headmod != "quickchat" || $headmod == 'quickchat' && $act) {
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:head_shout.php

示例5: header

            exit;
        } else {
            if (!$_POST['delch']) {
                header('Location: index.php?act=languages&mod=phrases&language=' . $language . '&module=' . $name_module . '&symbol=' . $symbol . '&start=' . $start);
                exit;
            }
            foreach ($_POST['delch'] as $key) {
                $mass_dell[] = ini_file::key_filter($key);
            }
            $_SESSION['mass_dell'] = $mass_dell;
            echo '<div class="phdr"><b>' . $lng_list[$language] . '</b>: <a href="index.php?act=languages&amp;mod=phrases&amp;language=' . $language . '&amp;module=' . $name_module . '&amp;symbol=' . $symbol . '"><b>' . $panel_lng['phrases'] . '</b></a> | ' . $panel_lng['reset'] . '</div>' . '<div class="rmenu"><p>' . $panel_lng['phrase_resets'] . '</p>' . '<p><form name="form" action="?act=languages&amp;mod=massdel_phrase&amp;language=' . $language . '&amp;module=' . $name_module . '&amp;symbol=' . $symbol . '&amp;start=' . $start . '&amp;yes" method="POST">' . '<input type="submit" name="submit" value="' . $lng['continue'] . '"/>&#160;' . '</form></p>' . '</div>' . '<div class="phdr"><a href="?act=languages&amp;mod=phrases&amp;language=' . $language . '&amp;module=' . $name_module . '&amp;start=' . $start . '"><b>' . $lng['back'] . '</b></a></div>' . '<p><a href="index.php">' . $lng['admin_panel'] . '</a></p>';
        }
        break;
    default:
        /*
        -----------------------------------------------------------------
        Выводим список доступных языков
        -----------------------------------------------------------------
        */
        echo '<div class="phdr"><a href="index.php"><b>' . $lng['admin_panel'] . '</b></a> | ' . $lng['language_default'] . '</div>';
        if ($do == 'error') {
            echo '<div class="rmenu"><b>' . $panel_lng['error'] . '!</b></div>';
        }
        echo '<div class="menu"><form action="index.php?act=languages&amp;mod=set" method="post"><p>';
        echo '<table><tr><td>&nbsp;</td><td style="padding-bottom:4px"><h3>' . $lng['language_system'] . '</h3></td></tr>';
        foreach ($lng_desc as $key => $val) {
            $lng_menu = array(!empty($val['author']) ? '<span class="gray">' . $lng['author'] . ':</span> ' . $val['author'] : '', !empty($val['author_email']) ? '<span class="gray">E-mail:</span> ' . $val['author_email'] : '', !empty($val['author_url']) ? '<span class="gray">URL:</span> ' . $val['author_url'] : '', !empty($val['description']) ? '<span class="gray">' . $lng['description'] . ':</span> ' . $val['description'] : '');
            echo '<tr>' . '<td valign="top"><input type="radio" value="' . $key . '" name="iso" ' . ($key == $set['lng'] ? 'checked="checked"' : '') . '/></td>' . '<td style="padding-bottom:6px">' . (file_exists('../images/flags/' . $key . '.gif') ? '<img src="../images/flags/' . $key . '.gif" alt=""/>&#160;' : '') . '<a href="index.php?act=languages&amp;mod=module&amp;language=' . $key . '"><b>' . $val['name'] . '</b></a>&#160;<span class="green">[' . $key . ']</span>' . '<div class="sub">' . functions::display_menu($lng_menu, '<br />') . '</div></td>' . '</tr>';
        }
        echo '<tr><td>&nbsp;</td><td><input type="submit" name="submit" value="' . $lng['save'] . '" /></td></tr>' . '</table></p>' . '</form></div>' . '<div class="phdr">' . $lng['total'] . ': <b>' . count($lng_desc) . '</b></div>' . '<p><a href="index.php?act=languages&amp;refresh">' . $lng['refresh_descriptions'] . '</a><br /><a href="index.php">' . $lng['admin_panel'] . '</a></p>';
}
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:languages.php

示例6: isset

     }
     echo '<div class="phdr">' . $lng['total'] . ': ' . $total . '</div>';
     if ($total > $kmess) {
         echo '<p>' . functions::display_pagination('profile.php?act=karma&amp;mod=new&amp;', $start, $total, $kmess) . '</p>' . '<p><form action="profile.php?act=karma&amp;mod=new" method="post">' . '<input type="text" name="page" size="2"/>' . '<input type="submit" value="' . $lng['to_page'] . ' &gt;&gt;"/></form></p>';
     }
     echo '<p><a href="profile.php">' . $lng['profile'] . '</a></p>';
     break;
 default:
     /*
     -----------------------------------------------------------------
     Главная страница Кармы, список отзывов
     -----------------------------------------------------------------
     */
     $type = isset($_GET['type']) ? abs(intval($_GET['type'])) : 0;
     $menu = array($type == 2 ? '<b>' . $lng_karma['all'] . '</b>' : '<a href="profile.php?act=karma&amp;user=' . $user['id'] . '&amp;type=2">' . $lng_karma['all'] . '</a>', $type == 1 ? '<b>' . $lng_karma['positive'] . '</b>' : '<a href="profile.php?act=karma&amp;user=' . $user['id'] . '&amp;type=1">' . $lng_karma['positive'] . '</a>', !$type ? '<b>' . $lng_karma['negative'] . '</b>' : '<a href="profile.php?act=karma&amp;user=' . $user['id'] . '">' . $lng_karma['negative'] . '</a>');
     echo '<div class="phdr"><a href="profile.php?user=' . $user['id'] . '"><b>' . $lng['profile'] . '</b></a> | ' . $lng['karma'] . '</div>' . '<div class="topmenu">' . functions::display_menu($menu) . '</div>' . '<div class="user"><p>' . functions::display_user($user, array('iphide' => 1)) . '</p></div>';
     $karma = $user['karma_plus'] - $user['karma_minus'];
     if ($karma > 0) {
         $images = ($user['karma_minus'] ? ceil($user['karma_plus'] / $user['karma_minus']) : $user['karma_plus']) > 10 ? '2' : '1';
         echo '<div class="gmenu">';
     } else {
         if ($karma < 0) {
             $images = ($user['karma_plus'] ? ceil($user['karma_minus'] / $user['karma_plus']) : $user['karma_minus']) > 10 ? '-2' : '-1';
             echo '<div class="rmenu">';
         } else {
             $images = 0;
             echo '<div class="menu">';
         }
     }
     echo '<table  width="100%"><tr><td width="22" valign="top"><img src="' . $set['homeurl'] . '/images/k_' . $images . '.gif"/></td><td>' . '<b>' . $lng['karma'] . ' (' . $karma . ')</b>' . '<div class="sub">' . '<span class="green">' . $lng['vote_for'] . ' (' . $user['karma_plus'] . ')</span> | ' . '<span class="red">' . $lng['vote_against'] . ' (' . $user['karma_minus'] . ')</span>';
     echo '</div></td></tr></table></div>';
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:karma.php

示例7: unset

/*
-----------------------------------------------------------------
Список альбомов юзера
-----------------------------------------------------------------
*/
if (isset($_SESSION['ap'])) {
    unset($_SESSION['ap']);
}
echo '<div class="phdr"><a href="album.php"><b>' . $lng['photo_albums'] . '</b></a> | ' . $lng['personal_2'] . '</div>';
$req = mysql_query("SELECT * FROM `cms_album_cat` WHERE `user_id` = '" . $user['id'] . "' " . ($user['id'] == $user_id || $rights >= 6 ? "" : "AND `access` > 1") . " ORDER BY `sort` ASC");
$total = mysql_num_rows($req);
if ($user['id'] == $user_id && $total < $max_album || $rights >= 7) {
    echo '<div class="topmenu"><a href="album.php?act=edit&amp;user=' . $user['id'] . '">' . $lng_profile['album_create'] . '</a></div>';
}
echo '<div class="user"><p>' . functions::display_user($user, array('iphide' => 1)) . '</p></div>';
if ($total) {
    $i = 0;
    while ($res = mysql_fetch_assoc($req)) {
        $count = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_album_files` WHERE `album_id` = '" . $res['id'] . "'"), 0);
        echo ($i % 2 ? '<div class="list2">' : '<div class="list1">') . '<img src="../images/album-' . $res['access'] . '.gif" width="16" height="16" class="left" />&#160;' . '<a href="album.php?act=show&amp;al=' . $res['id'] . '&amp;user=' . $user['id'] . '"><b>' . functions::checkout($res['name']) . '</b></a>&#160;(' . $count . ')';
        if ($user['id'] == $user_id || $rights >= 6 || !empty($res['description'])) {
            $menu = array('<a href="album.php?act=sort&amp;mod=up&amp;al=' . $res['id'] . '&amp;user=' . $user['id'] . '">' . $lng['up'] . '</a>', '<a href="album.php?act=sort&amp;mod=down&amp;al=' . $res['id'] . '&amp;user=' . $user['id'] . '">' . $lng['down'] . '</a>', '<a href="album.php?act=edit&amp;al=' . $res['id'] . '&amp;user=' . $user['id'] . '">' . $lng['edit'] . '</a>', '<a href="album.php?act=delete&amp;al=' . $res['id'] . '&amp;user=' . $user['id'] . '">' . $lng['delete'] . '</a>');
            echo '<div class="sub">' . (!empty($res['description']) ? '<div class="gray">' . functions::checkout($res['description'], 1, 1) . '</div>' : '') . ($user['id'] == $user_id || $rights >= 6 ? functions::display_menu($menu) : '') . '</div>';
        }
        echo '</div>';
        ++$i;
    }
} else {
    echo '<div class="menu"><p>' . $lng['list_empty'] . '</p></div>';
}
echo '<div class="phdr">' . $lng['total'] . ': ' . $total . '</div>';
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:list.php

示例8: __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

示例9: array

         echo '<div class="gmenu">' . $lng['settings_saved'] . '</div>';
     }
     if (isset($_GET['reset']) || empty($set_forum)) {
         $set_forum = array();
         $set_forum['farea'] = 0;
         $set_forum['upfp'] = 0;
         $set_forum['preview'] = 1;
         $set_forum['postclip'] = 1;
         $set_forum['postcut'] = 2;
         mysql_query("UPDATE `users` SET `set_forum` = '" . mysql_real_escape_string(serialize($set_forum)) . "' WHERE `id` = '{$user_id}'");
         echo '<div class="rmenu">' . $lng['settings_default'] . '</div>';
     }
     echo '<form action="profile.php?act=settings&amp;mod=forum" method="post">' . '<div class="menu"><p><h3>' . $lng_set['main_settings'] . '</h3>' . '<input name="upfp" type="checkbox" value="1" ' . ($set_forum['upfp'] ? 'checked="checked"' : '') . ' />&#160;' . $lng_set['sorting_return'] . '<br/>' . '<input name="farea" type="checkbox" value="1" ' . ($set_forum['farea'] ? 'checked="checked"' : '') . ' />&#160;' . $lng_set['field_on'] . '<br/>' . '<input name="preview" type="checkbox" value="1" ' . ($set_forum['preview'] ? 'checked="checked"' : '') . ' />&#160;' . $lng['preview'] . '<br/>' . '</p><p><h3>' . $lng_set['clip_first_post'] . '</h3>' . '<input type="radio" value="2" name="postclip" ' . ($set_forum['postclip'] == 2 ? 'checked="checked"' : '') . '/>&#160;' . $lng_set['always'] . '<br />' . '<input type="radio" value="1" name="postclip" ' . ($set_forum['postclip'] == 1 ? 'checked="checked"' : '') . '/>&#160;' . $lng_set['in_not_read'] . '<br />' . '<input type="radio" value="0" name="postclip" ' . (!$set_forum['postclip'] ? 'checked="checked"' : '') . '/>&#160;' . $lng_set['never'] . '</p><p><h3>' . $lng_set['scrap_of_posts'] . '</h3>' . '<input type="radio" value="1" name="postcut" ' . ($set_forum['postcut'] == 1 ? 'checked="checked"' : '') . '/>&#160;' . $lng_set['500_symbols'] . '<br />' . '<input type="radio" value="2" name="postcut" ' . ($set_forum['postcut'] == 2 ? 'checked="checked"' : '') . '/>&#160;' . $lng_set['1000_symbols'] . '<br />' . '<input type="radio" value="3" name="postcut" ' . ($set_forum['postcut'] == 3 ? 'checked="checked"' : '') . '/>&#160;' . $lng_set['3000_symbols'] . '<br />' . '<input type="radio" value="0" name="postcut" ' . (!$set_forum['postcut'] ? 'checked="checked"' : '') . '/>&#160;' . $lng_set['not_to_cut_off'] . '<br />' . '</p><p><input type="submit" name="submit" value="' . $lng['save'] . '"/></p></div></form>' . '<div class="phdr"><a href="profile.php?act=settings&amp;mod=forum&amp;reset">' . $lng['reset_settings'] . '</a></div>' . '<p><a href="../forum/index.php">' . $lng['to_forum'] . '</a></p>';
     break;
 default:
     echo '<div class="phdr"><b>' . $lng['settings'] . '</b> | ' . $lng['common_settings'] . '</div>' . '<div class="topmenu">' . functions::display_menu($menu) . '</div>';
     if (isset($_POST['submit'])) {
         /*
         -----------------------------------------------------------------
         Записываем новые настройки, заданные пользователем
         -----------------------------------------------------------------
         */
         $set_user['timeshift'] = isset($_POST['timeshift']) ? intval($_POST['timeshift']) : 0;
         $set_user['avatar'] = isset($_POST['avatar']);
         $set_user['smileys'] = isset($_POST['smileys']);
         $set_user['translit'] = isset($_POST['translit']);
         $set_user['digest'] = isset($_POST['digest']);
         $set_user['direct_url'] = isset($_POST['direct_url']);
         $set_user['field_h'] = isset($_POST['field_h']) ? abs(intval($_POST['field_h'])) : 3;
         $set_user['kmess'] = isset($_POST['kmess']) ? abs(intval($_POST['kmess'])) : 10;
         $set_user['quick_go'] = isset($_POST['quick_go']);
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:settings.php

示例10: mysql_query

 echo '<div class="phdr"><a href="index.php"><b>' . $lng['forum'] . '</b></a> | ' . $lng_forum['unread_last_10'] . '</div>';
 $req = mysql_query("SELECT * FROM `forum` WHERE `type` = 't' AND `close` != '1' ORDER BY `time` DESC LIMIT 10");
 if (mysql_num_rows($req)) {
     for ($i = 0; $res = mysql_fetch_assoc($req); ++$i) {
         $q3 = mysql_query("select `id`, `refid`, `text` from `forum` where type='r' and id='" . $res['refid'] . "' LIMIT 1");
         $razd = mysql_fetch_assoc($q3);
         $q4 = mysql_query("select `id`, `refid`, `text` from `forum` where type='f' and id='" . $razd['refid'] . "' LIMIT 1");
         $frm = mysql_fetch_assoc($q4);
         $nikuser = mysql_query("SELECT `from`, `time` FROM `forum` WHERE `type` = 'm' AND `close` != '1' AND `refid` = '" . $res['id'] . "'ORDER BY `time` DESC");
         $colmes1 = mysql_num_rows($nikuser);
         $cpg = ceil($colmes1 / $kmess);
         $nam = mysql_fetch_assoc($nikuser);
         echo $i % 2 ? '<div class="list2">' : '<div class="list1">';
         // Значки
         $icons = array($res['vip'] ? '<img src="../theme/' . $set_user['skin'] . '/images/pt.gif" alt=""/>' : '', $res['realid'] ? '<img src="../theme/' . $set_user['skin'] . '/images/rate.gif" alt=""/>' : '', $res['edit'] ? '<img src="../theme/' . $set_user['skin'] . '/images/tz.gif" alt=""/>' : '');
         echo functions::display_menu($icons, '&#160;', '&#160;');
         echo '<a href="index.php?id=' . $res['id'] . '">' . $res['text'] . '</a>&#160;[' . $colmes1 . ']';
         if ($cpg > 1) {
             echo '&#160;<a href="index.php?id=' . $res['id'] . '&amp;clip&amp;page=' . $cpg . '">&gt;&gt;</a>';
         }
         echo '<br/><div class="sub"><a href="index.php?id=' . $razd['id'] . '">' . $frm['text'] . '&#160;/&#160;' . $razd['text'] . '</a><br />';
         echo $res['from'];
         if (!empty($nam['from'])) {
             echo '&#160;/&#160;' . $nam['from'];
         }
         echo ' <span class="gray">' . date("d.m.y / H:i", $nam['time']) . '</span>';
         echo '</div></div>';
     }
 } else {
     echo '<div class="menu"><p>' . $lng['list_empty'] . '</p></div>';
 }
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:new.php

示例11: mysql_result

 /*
 -----------------------------------------------------------------
 Выводим список пользователей, ожидающих подтверждения регистрации
 -----------------------------------------------------------------
 */
 $total = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `preg` = '0'"), 0);
 if ($total > $kmess) {
     echo '<div class="topmenu">' . functions::display_pagination('index.php?act=reg&amp;', $start, $total, $kmess) . '</div>';
 }
 if ($total) {
     $req = mysql_query("SELECT * FROM `users` WHERE `preg` = '0' ORDER BY `id` DESC LIMIT {$start},{$kmess}");
     $i = 0;
     while (($res = mysql_fetch_assoc($req)) !== false) {
         $link = array('<a href="index.php?act=reg&amp;mod=approve&amp;id=' . $res['id'] . '">' . $lng['approve'] . '</a>', '<a href="index.php?act=reg&amp;mod=del&amp;id=' . $res['id'] . '">' . $lng['delete'] . '</a>', '<a href="index.php?act=reg&amp;mod=delip&amp;ip=' . $res['ip'] . '">' . $lng['reg_del_ip'] . '</a>');
         echo $i % 2 ? '<div class="list2">' : '<div class="list1">';
         echo functions::display_user($res, array('header' => '<b>ID:' . $res['id'] . '</b>', 'sub' => functions::display_menu($link)));
         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=reg&amp;', $start, $total, $kmess) . '</div>' . '<p><form action="index.php?act=reg" method="post">' . '<input type="text" name="page" size="2"/>' . '<input type="submit" value="' . $lng['to_page'] . ' &gt;&gt;"/>' . '</form></p>';
 }
 echo '<p>';
 if ($total) {
     echo '<a href="index.php?act=reg&amp;mod=massapprove">' . $lng['reg_approve_all'] . '</a><br /><a href="index.php?act=reg&amp;mod=massdel">' . $lng['reg_del_all'] . '</a><br />';
 }
 echo '<a href="index.php">' . $lng['admin_panel'] . '</a></p>';
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:reg.php

示例12: defined

* @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_JOHNADM') or die('Error: restricted access');
$error = array();
$search_post = isset($_POST['search']) ? trim($_POST['search']) : false;
$search_get = isset($_GET['search']) ? rawurldecode(trim($_GET['search'])) : false;
$search = $search_post ? $search_post : $search_get;
if (isset($_GET['ip'])) {
    $search = trim($_GET['ip']);
}
$menu = array(!$mod ? '<b>' . $lng['ip_actual'] . '</b>' : '<a href="index.php?act=search_ip&amp;search=' . rawurlencode($search) . '">' . $lng['ip_actual'] . '</a>', $mod == 'history' ? '<b>' . $lng['ip_history'] . '</b>' : '<a href="index.php?act=search_ip&amp;mod=history&amp;search=' . rawurlencode($search) . '">' . $lng['ip_history'] . '</a>');
echo '<div class="phdr"><a href="index.php"><b>' . $lng['admin_panel'] . '</b></a> | ' . $lng['ip_search'] . '</div>' . '<div class="topmenu">' . functions::display_menu($menu) . '</div>' . '<form action="index.php?act=search_ip" method="post"><div class="gmenu"><p>' . '<input type="text" name="search" value="' . functions::checkout($search) . '" />' . '<input type="submit" value="' . $lng['search'] . '" name="submit" /><br />' . '</p></div></form>';
if ($search) {
    if (strstr($search, '-')) {
        /*
        -----------------------------------------------------------------
        Обрабатываем диапазон адресов
        -----------------------------------------------------------------
        */
        $array = explode('-', $search);
        $ip = trim($array[0]);
        if (!core::ip_valid($ip)) {
            $error[] = $lng['error_firstip'];
        } else {
            $ip1 = ip2long($ip);
        }
        $ip = trim($array[1]);
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:search_ip.php

示例13: mysql_query

        if (core::$user_id) {
            $req = mysql_query("SELECT * FROM `cms_users_data` WHERE `user_id` = '" . core::$user_id . "' AND `key` = 'forum_search' LIMIT 1");
            if (mysql_num_rows($req)) {
                $res = mysql_fetch_assoc($req);
                $history = unserialize($res['val']);
                // Добавляем запрос в историю
                if ($to_history && !in_array($search, $history)) {
                    if (count($history) > 20) {
                        array_shift($history);
                    }
                    $history[] = $search;
                    mysql_query("UPDATE `cms_users_data` SET\n                        `val` = '" . mysql_real_escape_string(serialize($history)) . "'\n                        WHERE `user_id` = '" . core::$user_id . "' AND `key` = 'forum_search'\n                        LIMIT 1\n                    ");
                }
                sort($history);
                foreach ($history as $val) {
                    $history_list[] = '<a href="search.php?search=' . urlencode($val) . '">' . htmlspecialchars($val) . '</a>';
                }
                // Показываем историю запросов
                echo '<div class="topmenu">' . '<b>' . core::$lng['search_history'] . '</b> <span class="red"><a href="search.php?act=reset">[x]</a></span><br />' . functions::display_menu($history_list) . '</div>';
            } elseif ($to_history) {
                $history[] = $search;
                mysql_query("INSERT INTO `cms_users_data` SET\n                    `user_id` = '" . core::$user_id . "',\n                    `key` = 'forum_search',\n                    `val` = '" . mysql_real_escape_string(serialize($history)) . "'\n                ");
            }
        }
        // Постраничная навигация
        if (isset($total) && $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>';
        }
        echo '<p>' . ($search ? '<a href="search.php">' . $lng['search_new'] . '</a><br />' : '') . '<a href="index.php">' . $lng['forum'] . '</a></p>';
}
require '../incfiles/end.php';
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:search.php

示例14: count

$headmod = 'online';
$textl = $lng['online'];
//$lng_online = core::load_lng('online');
require '../incfiles/head.php';
/*
-----------------------------------------------------------------
Menunjukan yang online
-----------------------------------------------------------------
*/
$menu[] = !$mod ? '<b>' . $lng['users'] . '</b>' : '<a href="index.php?act=online">' . $lng['users'] . '</a>';
$menu[] = $mod == 'history' ? '<b>' . $lng['history'] . '</b>' : '<a href="index.php?act=online&amp;mod=history">' . $lng['history'] . '</a> ';
if (core::$user_rights) {
    $menu[] = $mod == 'guest' ? '<b>' . $lng['guests'] . '</b>' : '<a href="index.php?act=online&amp;mod=guest">' . $lng['guests'] . '</a>';
    $menu[] = $mod == 'ip' ? '<b>' . $lng['ip_activity'] . '</b>' : '<a href="index.php?act=online&amp;mod=ip">' . $lng['ip_activity'] . '</a>';
}
echo '<div class="phdr"><b>' . $lng['who_on_site'] . '</b></div>' . '<div class="topmenu">' . functions::display_menu($menu) . '</div>';
switch ($mod) {
    case 'ip':
        // Daftar IP yang aktif, dengan hits counter
        $ip_array = array_count_values(core::$ip_count);
        $total = count($ip_array);
        if ($start >= $total) {
            //Memperbaiki permintaan ke halaman tidak ada
            $start = max(0, $total - ($total % $kmess == 0 ? $kmess : $total % $kmess));
        }
        $end = $start + $kmess;
        if ($end > $total) {
            $end = $total;
        }
        arsort($ip_array);
        $i = 0;
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:online.php

示例15: htmlspecialchars

 if (!empty($res['color'])) {
     $name = '<span style="color:#' . $res['color'] . '">' . $name . '</span>';
 }
 // Если было задано начертание шрифта, то применяем
 $font = $res['bold'] ? 'font-weight: bold;' : false;
 $font .= $res['italic'] ? ' font-style:italic;' : false;
 $font .= $res['underline'] ? ' text-decoration:underline;' : false;
 if ($font) {
     $name = '<span style="' . $font . '">' . $name . '</span>';
 }
 ////////////////////////////////////////////////////////////
 // Выводим рекламмную ссылку с атрибутами                 //
 ////////////////////////////////////////////////////////////
 echo '<p><img src="../images/' . ($res['to'] ? 'red' : 'green') . '.gif" width="16" height="16" class="left"/>&#160;' . '<a href="' . htmlspecialchars($res['link']) . '">' . htmlspecialchars($res['link']) . '</a>&nbsp;[' . $res['count'] . ']<br />' . $name . '</p>';
 $menu = array('<a href="index.php?act=ads&amp;mod=up&amp;id=' . $res['id'] . '">' . $lng['up'] . '</a>', '<a href="index.php?act=ads&amp;mod=down&amp;id=' . $res['id'] . '">' . $lng['down'] . '</a>', '<a href="index.php?act=ads&amp;mod=edit&amp;id=' . $res['id'] . '">' . $lng['edit'] . '</a>', '<a href="index.php?act=ads&amp;mod=del&amp;id=' . $res['id'] . '">' . $lng['delete'] . '</a>', '<a href="index.php?act=ads&amp;mod=show&amp;id=' . $res['id'] . '">' . ($res['to'] ? $lng['to_show'] : $lng['hide']) . '</a>');
 echo '<div class="sub">' . '<div>' . functions::display_menu($menu) . '</div>' . '<p><span class="gray">' . $lng['installation_date'] . ':</span> ' . functions::display_date($res['time']) . '<br />' . '<span class="gray">' . $lng['placing'] . ':</span>&nbsp;' . $array_placing[$res['layout']] . '<br />' . '<span class="gray">' . $lng['to_show'] . ':</span>&nbsp;' . $array_show[$res['view']];
 // Вычисляем условия договора на рекламу
 $agreement = array();
 $remains = array();
 if (!empty($res['count_link'])) {
     $agreement[] = $res['count_link'] . ' ' . $lng['transitions_n'];
     $remains_count = $res['count_link'] - $res['count'];
     if ($remains_count > 0) {
         $remains[] = $remains_count . ' ' . $lng['transitions_n'];
     }
 }
 if (!empty($res['day'])) {
     $agreement[] = functions::timecount($res['day'] * 86400);
     $remains_count = $res['day'] * 86400 - (time() - $res['time']);
     if ($remains_count > 0) {
         $remains[] = functions::timecount($remains_count);
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:ads.php


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