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


PHP functions::smileys方法代码示例

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


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

示例1:

            echo ' Mod ';
            break;
        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>';
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:komm.php

示例2: mysql_query

            // Счетчик просмотров
            if (!mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_album_views` WHERE `user_id` = '{$user_id}' AND `file_id` = '" . $res['id'] . "'"), 0)) {
                mysql_query("INSERT INTO `cms_album_views` SET `user_id` = '{$user_id}', `file_id` = '" . $res['id'] . "', `time` = '" . time() . "'");
                $views = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_album_views` WHERE `file_id` = '" . $res['id'] . "'"), 0);
                mysql_query("UPDATE `cms_album_files` SET `views` = '{$views}' WHERE `id` = '" . $res['id'] . "'");
            }
        } else {
            /*
            -----------------------------------------------------------------
            Предпросмотр изображения в списке
            -----------------------------------------------------------------
            */
            echo '<a href="album.php?act=show&amp;al=' . $al . '&amp;img=' . $res['id'] . '&amp;user=' . $user['id'] . '&amp;view"><img src="../files/users/album/' . $user['id'] . '/' . $res['tmb_name'] . '" /></a>';
        }
        if (!empty($res['description'])) {
            echo '<div class="gray">' . functions::smileys(functions::checkout($res['description'], 1)) . '</div>';
        }
        echo '<div class="sub">';
        if ($user['id'] == $user_id || core::$user_rights >= 6) {
            echo functions::display_menu(array('<a href="album.php?act=image_edit&amp;img=' . $res['id'] . '&amp;user=' . $user['id'] . '">' . $lng['edit'] . '</a>', '<a href="album.php?act=image_move&amp;img=' . $res['id'] . '&amp;user=' . $user['id'] . '">' . $lng['move'] . '</a>', '<a href="album.php?act=image_delete&amp;img=' . $res['id'] . '&amp;user=' . $user['id'] . '">' . $lng['delete'] . '</a>'));
            if ($user['id'] == $user_id && $view) {
                echo ' | <a href="album.php?act=show&amp;al=' . $al . '&amp;user=' . $user['id'] . '&amp;view&amp;img=' . $res['id'] . '&amp;profile">' . $lng_profile['photo_profile'] . '</a>';
            }
        }
        echo vote_photo($res) . '<div class="gray">' . $lng['count_views'] . ': ' . $res['views'] . ', ' . $lng['count_downloads'] . ': ' . $res['downloads'] . '</div>' . '<div class="gray">' . $lng['date'] . ': ' . functions::display_date($res['time']) . '</div>' . '<a href="album.php?act=comments&amp;img=' . $res['id'] . '">' . $lng['comments'] . '</a> (' . $res['comm_count'] . ')<br />' . '<a href="album.php?act=image_download&amp;img=' . $res['id'] . '">' . $lng['download'] . '</a>' . '</div></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,代码来源:show.php

示例3: htmlentities

         $pos1 = 100;
     }
     if (($pos2 = mb_strpos($tmp, ' ')) === false) {
         $pos2 = 100;
     }
     $int_lenght = $symbols + ($pos1 >= $pos2 ? $pos2 : $pos1) - $int_start;
 }
 // Заголовок статьи
 echo '<div class="phdr"><b>' . htmlentities($zag['name'], ENT_QUOTES, 'UTF-8') . '</b></div>';
 if ($count_pages > 1) {
     echo '<div class="topmenu">' . functions::display_pagination('index.php?id=' . $id . '&amp;', $start, $count_pages, 1) . '</div>';
 }
 // Текст статьи
 $text = functions::checkout(mb_substr($req['text'], $int_start, $int_lenght), 1, 1);
 if ($set_user['smileys']) {
     $text = functions::smileys($text, $rights ? 1 : 0);
 }
 echo '<div class="list2">' . $text . '</div>';
 // Ссылка на комментарии
 if ($set['mod_lib_comm'] || $rights >= 7) {
     $km = mysql_query("select `id` from `lib` where type = 'komm' and refid = '" . $id . "'");
     $km1 = mysql_num_rows($km);
     $comm_link = "<a href='index.php?act=komm&amp;id=" . $id . "'>" . $lng['comments'] . "</a> ({$km1})";
 } else {
     $comm_link = '&#160;';
 }
 echo '<div class="phdr">' . $comm_link . '</div>';
 if ($count_pages > 1) {
     echo '<div class="topmenu">' . functions::display_pagination('index.php?id=' . $id . '&amp;', $start, $count_pages, 1) . '</div><div class="topmenu">' . '<form action="index.php?id=' . $id . '" method="post">' . '<input type="text" name="page" size="2"/>' . '<input type="submit" value="' . $lng['to_page'] . ' &gt;&gt;"/>' . '</form></div>';
 }
 if ($rights == 5 || $rights >= 6) {
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:index.php

示例4: mysql_fetch_assoc

    $res_r = mysql_fetch_assoc($req_r);
    $req_c = mysql_query("SELECT * FROM `forum` WHERE `id` = '" . $res_r['refid'] . "'");
    $res_c = mysql_fetch_assoc($req_c);
    require '../incfiles/head.php';
    if ($datauser['postforum'] == 0) {
        if (!isset($_GET['yes'])) {
            $lng_faq = core::load_lng('faq');
            echo '<p>' . $lng_faq['forum_rules_text'] . '</p>';
            echo '<p><a href="index.php?act=nt&amp;id=' . $id . '&amp;yes">' . $lng_forum['agree'] . '</a> | <a href="index.php?id=' . $id . '">' . $lng_forum['not_agree'] . '</a></p>';
            require '../incfiles/end.php';
            exit;
        }
    }
    $msg_pre = functions::checkout($msg, 1, 1);
    if ($set_user['smileys']) {
        $msg_pre = functions::smileys($msg_pre, $datauser['rights'] ? 1 : 0);
    }
    $msg_pre = preg_replace('#\\[c\\](.*?)\\[/c\\]#si', '<div class="quote">\\1</div>', $msg_pre);
    echo '<div class="phdr"><a href="index.php?id=' . $id . '"><b>' . $lng['forum'] . '</b></a> | ' . $lng_forum['new_topic'] . '</div>';
    if ($msg && $th && !isset($_POST['submit'])) {
        echo '<div class="list1"><img src="../theme/default/images/op.gif" border="0" alt="op" /> <span style="font-weight: bold">' . $th . '</span></div>' . '<div class="list2">' . functions::display_user($datauser, array('iphide' => 1, 'header' => '<span class="gray">(' . functions::display_date(time()) . ')</span>', 'body' => $msg_pre)) . '</div>';
    }
    echo '<form name="form" action="index.php?act=nt&amp;id=' . $id . '" method="post">' . '<div class="gmenu">' . '<p><h3>' . $lng['section'] . '</h3>' . '<a href="index.php?id=' . $res_c['id'] . '">' . $res_c['text'] . '</a> | <a href="index.php?id=' . $res_r['id'] . '">' . $res_r['text'] . '</a></p>' . '<p><h3>' . $lng_forum['new_topic_name'] . '</h3>';
    echo '<select name="tiento">
			<option value="0">No Prefix</option>
			<option value="1">Discuss</option>
			<option value="2">Share</option>
			<option value="3">Info</option>
			<option value="4">Tutorial</option>
			<option value="5">Help</option>
			<option value="6">Ask</option>
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:nt.php

示例5: array_chunk

         $smileys = array_chunk($smileys, $kmess, TRUE);
         if ($start) {
             $key = ($start - $start % $kmess) / $kmess;
             $smileys_view = $smileys[$key];
             if (!count($smileys_view)) {
                 $smileys_view = $smileys[0];
             }
             $smileys = $smileys_view;
         } else {
             $smileys = $smileys[0];
         }
     }
     $i = 0;
     foreach ($smileys as $value) {
         $smile = ':' . $value . ':';
         echo ($i % 2 ? '<div class="list2">' : '<div class="list1">') . '<input type="checkbox" name="delete_sm[]" value="' . $value . '" />&#160;' . functions::smileys($smile, $rights >= 1 ? 1 : 0) . '&#160;' . $smile . ' ' . $lng['lng_or'] . ' ' . functions::trans($smile) . '</div>';
         $i++;
     }
     if ($total) {
         echo '<div class="rmenu"><input type="submit" name="delete" value=" ' . $lng['delete'] . ' "/></div></form>';
     } else {
         echo '<div class="menu"><p>' . $lng['list_empty'] . '<br /><a href="faq.php?act=smileys">' . $lng['add_smileys'] . '</a></p></div>';
     }
     echo '<div class="phdr">' . $lng['total'] . ': ' . $total . ' / ' . $user_smileys . '</div>';
     if ($total > $kmess) {
         echo '<div class="topmenu">' . functions::display_pagination('faq.php?act=my_smileys&amp;', $start, $total, $kmess) . '</div>';
     }
     echo '<p>' . ($total ? '<a href="faq.php?act=set_my_sm&amp;clean">' . $lng['clear'] . '</a><br />' : '') . '<a href="' . $_SESSION['ref'] . '">' . $lng['back'] . '</a></p>';
     break;
 case 'set_my_sm':
     /*
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:faq.php

示例6: array

                 $post = functions::smileys($post, $res['rights'] >= 1 ? 1 : 0);
             }
         } else {
             // Для гостей обрабатываем имя и фильтруем ссылки
             $res['name'] = functions::checkout($res['name']);
             $post = functions::antilink(functions::checkout($res['text'], 0, 2));
         }
         if ($res['edit_count']) {
             // Если пост редактировался, показываем кем и когда
             $post .= '<br /><span class="gray"><small>Изм. <b>' . $res['edit_who'] . '</b> (' . functions::display_date($res['edit_time']) . ') <b>[' . $res['edit_count'] . ']</b></small></span>';
         }
         if (!empty($res['otvet'])) {
             // Ответ Администрации
             $otvet = functions::checkout($res['otvet'], 1, 1);
             if ($set_user['smileys']) {
                 $otvet = functions::smileys($otvet, 1);
             }
             $post .= '<div class="reply"><b>' . $res['admin'] . '</b>: (' . functions::display_date($res['otime']) . ')<br/>' . $otvet . '</div>';
         }
         if ($rights >= 6) {
             $subtext = '<a href="index.php?act=otvet&amp;id=' . $res['gid'] . '">' . $lng['reply'] . '</a>' . ($rights >= $res['rights'] ? ' | <a href="index.php?act=edit&amp;id=' . $res['gid'] . '">' . $lng['edit'] . '</a> | <a href="index.php?act=delpost&amp;id=' . $res['gid'] . '">' . $lng['delete'] . '</a>' : '');
         } else {
             $subtext = '';
         }
         $arg = array('header' => $text, 'body' => '<div class="textx">' . $post . '</div>', 'sub' => $subtext);
         echo functions::display_user($res, $arg);
         echo '</div>';
     }
 } else {
     echo '<div class="menu"><p>' . $lng['guestbook_empty'] . '</p></div>';
 }
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:index.php

示例7: auto_bb

    public static function auto_bb($form, $field)
    {
        if (self::$is_mobile) {
            return false;
        }
        $colors = array('ffffff', 'bcbcbc', '708090', '6c6c6c', '454545', 'fcc9c9', 'fe8c8c', 'fe5e5e', 'fd5b36', 'f82e00', 'ffe1c6', 'ffc998', 'fcad66', 'ff9331', 'ff810f', 'd8ffe0', '92f9a7', '34ff5d', 'b2fb82', '89f641', 'b7e9ec', '56e5ed', '21cad3', '03939b', '039b80', 'cac8e9', '9690ea', '6a60ec', '4866e7', '173bd3', 'f3cafb', 'e287f4', 'c238dd', 'a476af', 'b53dd2');
        $i = 1;
        $font_color = '<table><tr>';
        $bg_color = '<table><tr>';
        foreach ($colors as $value) {
            $font_color .= '<a href="javascript:tag(\'[color=#' . $value . ']\', \'[/color]\', \'\');" style="background-color:#' . $value . ';"></a>';
            $bg_color .= '<a href="javascript:tag(\'[bg=#' . $value . ']\', \'[/bg]\', \'\');" style="background-color:#' . $value . ';"></a>';
            if (!($i % sqrt(count($colors)))) {
                $font_color .= '</tr><tr>';
                $bg_color .= '</tr><tr>';
            }
            ++$i;
        }
        $font_color .= '</tr></table>';
        $bg_color .= '</tr></table>';
        $smileys = !empty(self::$user_data['smileys']) ? unserialize(self::$user_data['smileys']) : '';
        if (!empty($smileys)) {
            $res_sm = '';
            $bb_smileys = '<small><a href="' . self::$system_set['homeurl'] . '/pages/faq.php?act=my_smileys" class="omenu">' . self::$lng['edit_list'] . '</a></small><br />';
            foreach ($smileys as $value) {
                $res_sm .= '<a href="javascript:tag(\':\', \'' . $value . '\', \'\');">:' . $value . '</a> ';
            }
            $bb_smileys .= functions::smileys($res_sm, self::$user_data['rights'] >= 1 ? 1 : 0);
        } else {
            $bb_smileys = '<small><a href="' . self::$system_set['homeurl'] . '/pages/faq.php?act=smileys">' . self::$lng['add_smileys'] . '</a></small>';
        }
        $out = '<style>
		.bb_hide{background-color: rgba(178,178,178,0.5); padding: 5px; border-radius: 3px; border: 1px solid #708090; display: none; overflow: auto; max-width: 300px; max-height: 150px; position: absolute;}
		.bb_opt:hover .bb_hide{display: block;}
		.bb_color a {float:left;  width:9px; height:9px; margin:1px; border: 1px solid black;}
		</style>
		<script language="JavaScript" type="text/javascript">
		function tag(text1, text2, text3) {
		if ((document.selection)) {
		document.' . $form . '.' . $field . '.focus();
		document.' . $form . '.document.selection.createRange().text = text3+text1+document.' . $form . '.document.selection.createRange().text+text2+text3;
		} else if(document.forms[\'' . $form . '\'].elements[\'' . $field . '\'].selectionStart!=undefined) {
		var element = document.forms[\'' . $form . '\'].elements[\'' . $field . '\'];
		var str = element.value;
		var start = element.selectionStart;
		var length = element.selectionEnd - element.selectionStart;
		element.value = str.substr(0, start) + text3 + text1 + str.substr(start, length) + text2 + text3 + str.substr(start + length);
		} else document.' . $form . '.' . $field . '.value += text3+text1+text2+text3;}</script>
		<a href="javascript:tag(\'[b]\', \'[/b]\', \'\')"><img src="' . self::$system_set['homeurl'] . '/images/bb/bold.gif" alt="b" title="' . self::$lng['tag_bold'] . '" border="0"/></a>
		<a href="javascript:tag(\'[i]\', \'[/i]\', \'\')"><img src="' . self::$system_set['homeurl'] . '/images/bb/italics.gif" alt="i" title="' . self::$lng['tag_italic'] . '" border="0"/></a>
		<a href="javascript:tag(\'[u]\', \'[/u]\', \'\')"><img src="' . self::$system_set['homeurl'] . '/images/bb/underline.gif" alt="u" title="' . self::$lng['tag_underline'] . '" border="0"/></a> | 
		<a href="javascript:tag(\'[left]\', \'[/left]\', \'\')"><img src="' . self::$system_set['homeurl'] . '/images/bb/text_align_left.png" alt="url" title="text align left" border="0"/></a>
		<a href="javascript:tag(\'[center]\', \'[/center]\', \'\')"><img src="' . self::$system_set['homeurl'] . '/images/bb/text_align_center.png" alt="url" title="text align center" border="0"/></a>
		<a href="javascript:tag(\'[right]\', \'[/right]\', \'\')"><img src="' . self::$system_set['homeurl'] . '/images/bb/text_align_right.png" alt="url" title="text align right" border="0"/></a> | 
		<a href="javascript:tag(\'[s]\', \'[/s]\', \'\')"><img src="' . self::$system_set['homeurl'] . '/images/bb/strike.gif" alt="s" title="' . self::$lng['tag_strike'] . '" border="0"/></a>
		<a href="javascript:tag(\'[*]\', \'[/*]\', \'\')"><img src="' . self::$system_set['homeurl'] . '/images/bb/list.gif" alt="s" title="' . self::$lng['tag_list'] . '" border="0"/></a> | 
		<a href="javascript:tag(\'[c]\', \'[/c]\', \'\')"><img src="' . self::$system_set['homeurl'] . '/images/bb/quote.gif" alt="quote" title="' . self::$lng['tag_quote'] . '" border="0"/></a>
		<a href="javascript:tag(\'[php]\', \'[/php]\', \'\')"><img src="' . self::$system_set['homeurl'] . '/images/bb/php.gif" alt="cod" title="' . self::$lng['tag_code'] . '" border="0"/></a>
		<a href="javascript:tag(\'[code]\', \'[/code]\', \'\')"><img src="' . self::$system_set['homeurl'] . '/images/bb/code.png" alt="url" title="code" border="0"/></a> | 
		<a href="javascript:tag(\'[img]\', \'[/img]\', \'\')"><img src="' . self::$system_set['homeurl'] . '/images/bb/img.gif" alt="img" title="images" border="0"/></a>
		<a href="javascript:tag(\'[hide]\', \'[/hide]\', \'\')"><img src="' . self::$system_set['homeurl'] . '/images/bb/hide.gif" alt="cod" title="Hide untuk member saja" border="0"/></a>
		<a href="javascript:tag(\'[url=]\', \'[/url]\', \'\')"><img src="' . self::$system_set['homeurl'] . '/images/bb/link.gif" alt="url" title="' . self::$lng['tag_link'] . '" border="0"/></a>
		<a href="javascript:tag(\'[youtube]\', \'[/youtube]\', \'\')"><img src="' . self::$system_set['homeurl'] . '/images/bb/youtube.png" alt="url" title="youtube video" border="0"/></a>
		<a href="javascript:tag(\'[spoiler]\', \'[/spoiler]\', \'\')"><img src="' . self::$system_set['homeurl'] . '/images/bb/sp.png" alt="b" title="Spoiler" border="0"/></a>
		<span class="bb_opt" style="display: inline-block; cursor:pointer">
		<img src="' . self::$system_set['homeurl'] . '/images/bb/color.gif" onmouseover="this.src=\'' . self::$system_set['homeurl'] . '/images/bb/color_on.gif\'" onmouseout="this.src=\'' . self::$system_set['homeurl'] . '/images/bb/color.gif\'" alt="color" title="' . self::$lng['color_bg'] . '" border="0"/>
		<div class="bb_hide bb_color">' . $font_color . '</div></span>
		<span class="bb_opt" style="display: inline-block; cursor:pointer">
		<img src="' . self::$system_set['homeurl'] . '/images/bb/color_bg.gif" onmouseover="this.src=\'' . self::$system_set['homeurl'] . '/images/bb/color_bg_on.gif\'" onmouseout="this.src=\'' . self::$system_set['homeurl'] . '/images/bb/color_bg.gif\'" alt="color" title="' . self::$lng['color_text'] . '" border="0"/>
		<div class="bb_hide bb_color">' . $bg_color . '</div></span>';
        if (self::$user_id) {
            $out .= ' <span class="bb_opt" style="display: inline-block; cursor:pointer"><img src="' . self::$system_set['homeurl'] . '/images/bb/smileys.gif" alt="sm" title="' . self::$lng['smileys'] . '" border="0"/>
			<div class="bb_hide">' . $bb_smileys . '</div></span>';
        }
        $out .= ' <span class="bb_opt" style="display: inline-block; cursor:pointer"> <a href="' . self::$system_set['homeurl'] . '/pages/img.php">
		<img src="' . self::$system_set['homeurl'] . '/images/bb/im.gif" alt="url" title="' . self::$lng['tag_link'] . '" border="0"/></a>
		<div class="bb_hide">To insert an image in a message, you necessary upload it to our server, to do this, use
		<a href="' . self::$system_set['homeurl'] . '/pages/upload_img.php" class="green"><b>image uploader</b></a>.
		After uploading image you get a code image, with which will be able to insert it into the message</div></span>';
        return $out . '';
    }
开发者ID:chegestar,项目名称:catroxs,代码行数:81,代码来源:bbcode.php

示例8: news

 private function news()
 {
     global $lng;
     if ($this->settings['view'] > 0) {
         $reqtime = $this->settings['days'] ? time() - $this->settings['days'] * 86400 : 0;
         $req = mysql_query("SELECT * FROM `news` WHERE `time` > '{$reqtime}' ORDER BY `time` DESC LIMIT " . $this->settings['quantity']);
         if (mysql_num_rows($req) > 0) {
             $i = 0;
             $news = '';
             while (($res = mysql_fetch_array($req)) !== false) {
                 $text = $res['text'];
                 // Если текст больше заданного предела, обрезаем
                 if (mb_strlen($text) > $this->settings['size']) {
                     $text = mb_substr($text, 0, $this->settings['size']);
                     $text = htmlentities($text, ENT_QUOTES, 'UTF-8');
                     $text .= ' <a href="news/index.php">' . $lng['next'] . '...</a>';
                 } else {
                     $text = htmlentities($text, ENT_QUOTES, 'UTF-8');
                 }
                 // Если включены переносы, то обрабатываем
                 if ($this->settings['breaks']) {
                     $text = str_replace("\r\n", "<br/>", $text);
                 }
                 // Обрабатываем тэги
                 if ($this->settings['tags']) {
                     $text = bbcode::tags($text);
                 } else {
                     $text = bbcode::notags($text);
                 }
                 // Обрабатываем смайлы
                 if ($this->settings['smileys']) {
                     $text = functions::smileys($text);
                 }
                 // Определяем режим просмотра заголовка - текста
                 $news .= '<div class="news"><div class ="textx">';
                 switch ($this->settings['view']) {
                     case 2:
                         $news .= '<a href="news/index.php">' . $res['name'] . '</a>';
                         break;
                     case 3:
                         $news .= $text;
                         break;
                     default:
                         $news .= '<b>' . $res['name'] . '</b><br />' . $text;
                 }
                 // Ссылка на каменты
                 if (!empty($res['kom']) && $this->settings['view'] != 2 && $this->settings['kom'] == 1) {
                     $mes = mysql_query("SELECT COUNT(*) FROM `forum` WHERE `type` = 'm' AND `refid` = '" . $res['kom'] . "'");
                     $komm = mysql_result($mes, 0) - 1;
                     if ($komm >= 0) {
                         $news .= '<br /><a href="../forum/?id=' . $res['kom'] . '">' . $lng['discuss'] . '</a> (' . $komm . ')';
                     }
                 }
                 $news .= '</div></div>';
                 ++$i;
             }
             return $news;
         } else {
             return false;
         }
     }
 }
开发者ID:chegestar,项目名称:catroxs,代码行数:62,代码来源:mainpage.php

示例9: htmlspecialchars

            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="index.php?act=smileys"><b>' . $lng['smileys'] . '</b></a> | ' . htmlspecialchars($name_cat) . '</div>';
        echo '<div class="omenu"><a href="?act=smileys&amp;do=' . $do . '&amp;mod=upload">Upload</a></div>';
        $dir = glob($c . '*.{gif,jpg,png}', GLOB_BRACE);
        $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']);
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:smileys.php

示例10: mysql_query

if ($id) {
    $query = mysql_query("SELECT `animes`.*, `animes_cat`.`name` as `catname`, `animes_cat`.`id` as `catid` FROM `animes` LEFT JOIN `animes_cat` ON `animes`.`refid`=`animes_cat`.`id` WHERE `animes`.`id`='{$id}'" . ($rights < 7 ? " AND `animes`.`time`<='" . time() . "'" : "") . " LIMIT 1;");
    if (mysql_num_rows($query)) {
        //&#1055;&#1086;&#1082;&#1072;&#1079;&#1099;&#1074;&#1072;&#1077;&#1084; &#1085;&#1086;&#1074;&#1086;&#1089;&#1090;&#1100;
        $res1 = mysql_fetch_assoc($query);
        $textl = 'Blogs | ' . htmlentities($res1['name'], ENT_QUOTES, 'UTF-8');
        require_once '../incfiles/head.php';
        echo '<div class="phdr"><h3>' . htmlentities($res1['name'], ENT_QUOTES, 'UTF-8') . '</h3></div>';
        echo '<div class="list1">';
        //&#1042;&#1099;&#1074;&#1086;&#1076;&#1080;&#1084; &#1082;&#1072;&#1088;&#1090;&#1080;&#1085;&#1082;&#1091;
        if (file_exists('../files/blogs/anime_icon_' . $id . '.jpg') !== false) {
            echo '<center><img style="float: center; margin: 5px 6px 2px 2px; border: 0px;" src="../files/blogs/anime_icon_' . $id . '.jpg" alt=""width="176" height="144"/>&#160<br>';
        }
        $text = functions::checkout($res1['text'], 1, 1);
        if ($set_user['smileys']) {
            $text = functions::smileys($text);
        }
        echo '<div class="textx">';
        echo $text;
        echo '</div>';
        echo '<div style="clear:both;"></div></div>';
        //&#1054;&#1073;&#1088;&#1072;&#1073;&#1072;&#1090;&#1099;&#1074;&#1072;&#1077;&#1084; &#1075;&#1086;&#1083;&#1086;&#1089;&#1086;&#1074;&#1072;&#1085;&#1080;&#1077;
        if (isset($_POST['plus_x']) || isset($_POST['plus_y'])) {
            if ($res1['user_id'] == $user_id) {
                $_SESSION['error'] = '<div class="list1 red">Anda tidak boleh menilai blog sendiri!</div>';
            } else {
                $plus = mysql_result(mysql_query("SELECT COUNT(*) FROM `animes_rating` WHERE `news`='{$id}' AND `user_id`='{$user_id}' LIMIT 1;"), 0);
                if ($plus) {
                    $_SESSION['error'] = '<div class="list1 red">Penilaian sudah diterima!</div>';
                } else {
                    mysql_query("INSERT INTO `animes_rating` SET\n               `news`='{$id}',\n               `user_id`='{$user_id}', `golos`='1';");
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:komen.php

示例11: mysql_query

         return functions::display_date($var[1]);
     }
     if ($total > $kmess) {
         $out .= '<div class="topmenu">' . functions::display_pagination('index.php?act=systems&amp;', $start, $total, $kmess) . '</div>';
     }
     $req = mysql_query("SELECT * FROM `cms_mail` WHERE `from_id`='{$user_id}' AND `sys`='1' AND `delete`!='{$user_id}' ORDER BY `time` DESC LIMIT " . $start . "," . $kmess);
     $mass_read = array();
     for ($i = 0; ($row = mysql_fetch_assoc($req)) !== FALSE; ++$i) {
         $out .= $i % 2 ? '<div class="list1">' : '<div class="list2">';
         if ($row['read'] == 0 && $row['from_id'] == $user_id) {
             $mass_read[] = $row['id'];
         }
         $post = $row['text'];
         $post = functions::checkout($post, 1, 1);
         if ($set_user['smileys']) {
             $post = functions::smileys($post);
         }
         $out .= '<strong>' . functions::checkout($row['them']) . '</strong> (' . functions::display_date($row['time']) . ')<br />';
         $post = preg_replace_callback("/{TIME=(.+?)}/usi", 'time_parce', $post);
         //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>';
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:systems.php

示例12: defined

////////////////////////////////////////////////////////////////////////////////
// JohnCMS                Mobile Content Management System                    //
// Project site:          http://johncms.com                                  //
// Support site:          http://gazenwagen.com                               //
////////////////////////////////////////////////////////////////////////////////
// Lead Developer:        Oleg Kasyanov   (AlkatraZ)  alkatraz@gazenwagen.com //
// Development Team:      Eugene Ryabinin (john77)    john77@gazenwagen.com   //
//                        Dmitry Liseenko (FlySelf)   flyself@johncms.com     //
////////////////////////////////////////////////////////////////////////////////
*/
defined('_IN_JOHNCMS') or die('Error: restricted access');
/*
-----------------------------------------------------------------
Подробная информация, контактные данные
-----------------------------------------------------------------
*/
$textl = htmlspecialchars($user['name']) . ': ' . $lng['information'];
require '../incfiles/head.php';
echo '<div class="phdr"><a href="profile.php?user=' . $user['id'] . '"><b>' . $lng['profile'] . '</b></a> | ' . $lng['information'] . '</div>';
if ($user['id'] == $user_id || $rights >= 7 && $rights > $user['rights']) {
    echo '<div class="topmenu"><a href="profile.php?act=edit&amp;user=' . $user['id'] . '">' . $lng['edit'] . '</a></div>';
}
echo '<div class="user"><p>' . functions::display_user($user, array('iphide' => 1)) . '</p></div>' . '<div class="list2"><p>' . '<h3><img src="../images/contacts.png" width="16" height="16" class="left" />&#160;' . $lng_profile['personal_data'] . '</h3>' . '<ul>';
if (file_exists('../files/users/photo/' . $user['id'] . '_small.jpg')) {
    echo '<a href="../files/users/photo/' . $user['id'] . '.jpg"><img src="../files/users/photo/' . $user['id'] . '_small.jpg" alt="' . $user['name'] . '" border="0" /></a>';
}
echo '<li><span class="gray">' . $lng_profile['name'] . ':</span> ' . (empty($user['imname']) ? '' : $user['imname']) . '</li>' . '<li><span class="gray">' . $lng_profile['birt'] . ':</span> ' . (empty($user['dayb']) ? '' : sprintf("%02d", $user['dayb']) . '.' . sprintf("%02d", $user['monthb']) . '.' . $user['yearofbirth']) . '</li>' . '<li><span class="gray">' . $lng_profile['city'] . ':</span> ' . (empty($user['live']) ? '' : $user['live']) . '</li>' . '<li><span class="gray">' . $lng_profile['about'] . ':</span> ' . (empty($user['about']) ? '' : '<br />' . functions::smileys(bbcode::tags($user['about']))) . '</li>' . '</ul></p><p>' . '<h3><img src="../images/mail.png" width="16" height="16" class="left" />&#160;' . $lng_profile['communication'] . '</h3><ul>' . '<li><span class="gray">' . $lng_profile['phone_number'] . ':</span> ' . (empty($user['mibile']) ? '' : $user['mibile']) . '</li>' . '<li><span class="gray">E-mail:</span> ';
if (!empty($user['mail']) && $user['mailvis'] || $rights >= 7 || $user['id'] == $user_id) {
    echo $user['mail'] . ($user['mailvis'] ? '' : '<span class="gray"> [' . $lng_profile['hidden'] . ']</span>');
}
echo '</li>' . '<li><span class="gray">ICQ:</span> ' . (empty($user['icq']) ? '' : $user['icq']) . '</li>' . '<li><span class="gray">Skype:</span> ' . (empty($user['skype']) ? '' : $user['skype']) . '</li>' . '<li><span class="gray">Jabber:</span> ' . (empty($user['jabber']) ? '' : $user['jabber']) . '</li>' . '<li><span class="gray">' . $lng_profile['site'] . ':</span> ' . (empty($user['www']) ? '' : bbcode::tags($user['www'])) . '</li>' . '</ul></p></div>' . '<div class="phdr"><a href="profile.php?user=' . $user['id'] . '">' . $lng['back'] . '</a></div>';
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:info.php

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

示例14: mysql_result

    for ($i = 0; $row = mysql_fetch_assoc($req); ++$i) {
        $count_message = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_mail`\n            WHERE `user_id`='{$row['id']}'\n            AND `from_id`='{$user_id}'\n            AND `delete`!='{$user_id}'\n            AND `sys`!='1'\n        "), 0);
        $last_msg = mysql_fetch_assoc(mysql_query("SELECT *\n            FROM `cms_mail`\n            WHERE `from_id`='{$user_id}'\n            AND `user_id` = '{$row['id']}'\n            AND `delete` != '{$user_id}'\n            ORDER BY `id` DESC\n            LIMIT 1"));
        if (mb_strlen($last_msg['text']) > 500) {
            $text = mb_substr($last_msg['text'], 0, 500);
            $text = functions::checkout($text, 1, 1);
            if ($set_user['smileys']) {
                $text = functions::smileys($text, $res['rights'] ? 1 : 0);
            }
            $text = bbcode::notags($text);
            $text .= '...<a href="index.php?act=write&amp;id=' . $row['id'] . '">' . $lng['continue'] . ' &gt;&gt;</a>';
        } else {
            // Или, обрабатываем тэги и выводим весь текст
            $text = functions::checkout($last_msg['text'], 1, 1);
            if ($set_user['smileys']) {
                $text = functions::smileys($text, $res['rights'] ? 1 : 0);
            }
        }
        $arg = array('header' => '<span class="gray">(' . functions::display_date($last_msg['time']) . ')</span>', 'body' => '<div style="font-size: small">' . $text . '</div>', 'sub' => '<p><a href="index.php?act=write&amp;id=' . $row['id'] . '"><b>' . $lng_mail['correspondence'] . '</b></a> (' . $count_message . ') | <a href="index.php?act=ignor&amp;id=' . $row['id'] . '&amp;add">Игнор</a> | <a href="index.php?act=deluser&amp;id=' . $row['id'] . '">' . $lng['delete'] . '</a></p>', 'iphide' => 1);
        if (!$last_msg['read']) {
            echo '<div class="gmenu">';
        } else {
            echo $i % 2 ? '<div class="list1">' : '<div class="list2">';
        }
        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>';
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:input.php

示例15: mysql_result

 </div>';
     }
     echo '<div class="phdr"><h3>Komentar</h3></div>';
     $total = mysql_result(mysql_query("SELECT COUNT(*) FROM `animes_comments` WHERE `refid`='{$id}';"), 0);
     if ($total) {
         if ($total > $kmess) {
             echo '<div class="topmenu">' . functions::display_pagination('index.php?act=comments&amp;id=' . $id . '&amp;', $start, $total, $kmess) . '</div>';
         }
         $i = 1;
         $req = mysql_query("SELECT `animes_comments`.*, `animes_comments`.`time` as `mtime`, `animes_comments`.`id` as `mid`, `users`.* FROM `animes_comments` LEFT JOIN `users` ON `animes_comments`.`user_id`=`users`.`id` WHERE `animes_comments`.`refid`='{$id}' ORDER BY `animes_comments`.`time` DESC LIMIT " . $start . "," . $kmess);
         while (($row = mysql_fetch_assoc($req)) !== false) {
             echo $i % 2 ? '<div class="list1">' : '<div class="list2">';
             $post = $row['text'];
             $post = functions::checkout($post, 1, 1);
             if ($set_user['smileys']) {
                 $post = functions::smileys($post, $row['rights'] >= 1 ? 1 : 0);
             }
             if ($row['reply']) {
                 $post .= '<div class="reply">' . functions::checkout($row['reply'], 1, 1) . '</div>';
             }
             if ($rights >= 7) {
                 $subtext = '<a href="index.php?act=comments&amp;mod=replay&amp;id=' . $id . '&amp;com=' . $row['mid'] . '">Jawab</a> | <a href="index.php?act=comments&amp;mod=delete&amp;id=' . $id . '&amp;com=' . $row['mid'] . '">Hapus</a>';
             } else {
                 $subtext = '';
             }
             $text = ' <span class="gray">(' . functions::display_date($row['mtime']) . ')</span>';
             $arg = array('header' => $text, 'body' => $post, 'sub' => $subtext);
             echo functions::display_user($row, $arg);
             echo '</div>';
             ++$i;
         }
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:comments.php


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