本文整理汇总了PHP中trimlink函数的典型用法代码示例。如果您正苦于以下问题:PHP trimlink函数的具体用法?PHP trimlink怎么用?PHP trimlink使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了trimlink函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: replace_url
function replace_url($m)
{
// Get input url if any, if not get the content as a url but check if has a schema, if not add one
$this_url = !empty($m['url']) ? $m['url'] : (preg_match("#^((f|ht)tp(s)?://)#i", $m['content']) ? $m['content'] : "http://" . $m['content']);
// Trim only the default url
$content = empty($m['url']) ? trimlink($m['content'], 40) . (strlen($m['content']) > 40 ? substr($m['content'], strlen($m['content']) - 10, strlen($m['content'])) : '') : $m['content'];
return (fusion_get_settings('index_url_bbcode') ? "" : "<!--noindex-->") . "<a href='{$this_url}' target='_blank' " . (fusion_get_settings('index_url_bbcode') ? "" : "rel='nofollow' ") . "title='" . urldecode($this_url) . "'>" . $content . "</a>" . (fusion_get_settings('index_url_bbcode') ? "" : "<!--/noindex-->");
}
示例2: articles_admin_subcats
function articles_admin_subcats($id)
{
global $aidlink, $locale, $i, $data;
$sublist = "";
$result2 = dbquery("SELECT article_cat_id, article_cat_name, article_cat_description, article_cat_access FROM " . DB_ARTICLE_CATS . " WHERE article_cat_parent='" . (int) $id . "' ORDER BY article_cat_name");
while ($data2 = dbarray($result2)) {
$cell_color = $i % 2 == 0 ? "tbl1" : "tbl2";
$sublist .= "<tr>\n";
$sublist .= "<td class='{$cell_color}'><strong>-" . $data2['article_cat_name'] . "</strong><br />\n";
$sublist .= "<span class='small'>" . trimlink($data2['article_cat_description'], 45) . "</span></td>\n";
$sublist .= "<td align='center' width='1%' class='{$cell_color}' style='white-space:nowrap'>" . getgroupname($data2['article_cat_access']) . "</td>\n";
$sublist .= "<td align='center' width='1%' class='{$cell_color}' style='white-space:nowrap'><a href='" . FUSION_SELF . $aidlink . "&action=edit&cat_id=" . $data2['article_cat_id'] . "'>" . $locale['443'] . "</a> -\n";
$sublist .= "<a href='" . FUSION_SELF . $aidlink . "&action=delete&cat_id=" . $data2['article_cat_id'] . "' onclick=\"return confirm('" . $locale['450'] . "');\">" . $locale['444'] . "</a></td>\n";
$sublist .= "</tr>\n";
}
return $sublist;
}
示例3: render_dashboard
//.........这里部分代码省略.........
closeside();
echo "</div>\n";
}
echo "</div>\n";
echo "<div class='row'>\n";
echo "<div class='col-xs-12 co-sm-6 col-md-6 col-lg-3'>\n";
openside("<span class='text-smaller text-uppercase'><strong>" . $locale['283'] . "</strong></span><span class='pull-right badge'>" . number_format($infusions_count) . "</span>");
if ($infusions_count > 0) {
global $global_infusions;
echo "<div class='comment_content'>\n";
if (!empty($global_infusions)) {
foreach ($global_infusions as $inf_id => $inf_data) {
echo "<span class='badge m-b-10'>" . $inf_data['inf_title'] . "</span>\n";
}
}
echo "</div>\n";
closeside("" . (checkrights("I") ? "<div class='text-right text-uppercase'>\n<a class='text-smaller' href='" . ADMIN . "infusions.php" . $aidlink . "'>" . $locale['285'] . "</a><i class='entypo right-open-mini'></i></div>\n" : '') . "");
} else {
echo "<div class='text-center'>" . $locale['284'] . "</div>\n";
closeside();
}
// comments
echo "</div>\n<div class='col-xs-12 co-sm-6 col-md-6 col-lg-3'>\n";
openside("<span class='text-smaller text-uppercase'><strong>" . $locale['277'] . "</strong></span><span class='pull-right badge'>" . number_format($global_comments['rows']) . "</span>");
if (count($global_comments['data']) > 0) {
foreach ($global_comments['data'] as $i => $comment_data) {
echo "<!--Start Comment Item-->\n";
echo "<div data-id='{$i}' class='comment_content clearfix p-t-10 p-b-10' " . ($i > 0 ? "style='border-top:1px solid #ddd;'" : '') . " >\n";
echo "<div class='pull-left display-inline-block' style='margin-top:0px; margin-bottom:10px;'>" . display_avatar($comment_data, "25px", "", FALSE, "", "") . "</div>\n";
echo "<div id='comment_action-{$i}' class='btn-group pull-right display-none' style='position:absolute; right: 30px; margin-top:25px;'>\n\n\t\t\t\t<a class='btn btn-xs btn-default' title='" . $locale['274'] . "' href='" . ADMIN . "comments.php" . $aidlink . "&ctype=" . $comment_data['comment_type'] . "&comment_item_id=" . $comment_data['comment_item_id'] . "'><i class='entypo eye'></i></a>\n\t\t\t\t<a class='btn btn-xs btn-default' title='" . $locale['275'] . "' href='" . ADMIN . "comments.php" . $aidlink . "&action=edit&comment_id=" . $comment_data['comment_id'] . "&ctype=" . $comment_data['comment_type'] . "&comment_item_id=" . $comment_data['comment_item_id'] . "'><i class='entypo pencil'></i></a>\n\t\t\t\t<a class='btn btn-xs btn-default' title='" . $locale['276'] . "' href='" . ADMIN . "comments.php" . $aidlink . "&action=delete&comment_id=" . $comment_data['comment_id'] . "&ctype=" . $comment_data['comment_type'] . "&comment_item_id=" . $comment_data['comment_item_id'] . "'><i class='entypo trash'></i></a></div>\n";
echo "<strong>" . profile_link($comment_data['user_id'], $comment_data['user_name'], $comment_data['user_status']) . "</strong>\n";
echo "<span class='text-lighter'>" . $locale['273'] . "</span> <a href='" . sprintf($link_type[$comment_data['comment_type']], $comment_data['comment_item_id']) . "'><strong>" . $comments_type[$comment_data['comment_type']] . "</strong></a>";
echo "<br/>\n" . timer($comment_data['comment_datestamp']) . "<br/>\n";
echo "<span class='text-smaller text-lighter'>" . trimlink(parseubb($comment_data['comment_message']), 70) . "</span>\n";
echo "</div>\n";
echo "<!--End Comment Item-->\n";
}
if (isset($global_comments['comments_nav'])) {
echo "<div class='clearfix'>\n";
echo "<span class='pull-right text-smaller'>" . $global_comments['comments_nav'] . "</span>";
echo "</div>\n";
}
} else {
echo "<div class='text-center'>" . $global_comments['nodata'] . "</div>\n";
}
closeside();
echo "</div>\n<div class='col-xs-12 co-sm-6 col-md-6 col-lg-3'>\n";
// Ratings
openside("<span class='text-smaller text-uppercase'><strong>" . $locale['278'] . "</strong></span>");
if (count($global_ratings['data']) > 0) {
foreach ($global_ratings['data'] as $i => $ratings_data) {
echo "<!--Start Rating Item-->\n";
echo "<div class='comment_content clearfix p-t-10 p-b-10' " . ($i > 0 ? "style='border-top:1px solid #ddd;'" : '') . " >\n";
echo "<div class='pull-left display-inline-block' style='margin-top:0px; margin-bottom:10px;'>" . display_avatar($ratings_data, "25px", "", FALSE, "", "") . "</div>\n";
echo "<strong>" . profile_link($ratings_data['user_id'], $ratings_data['user_name'], $ratings_data['user_status']) . "</strong>\n";
echo "<span class='text-lighter'>" . $locale['273a'] . "</span>\n";
echo "<a href='" . sprintf($link_type[$ratings_data['rating_type']], $ratings_data['rating_item_id']) . "'><strong>" . $comments_type[$ratings_data['rating_type']] . "</strong></a>";
echo "<span class='text-lighter m-l-10'>" . str_repeat("<i class='fa fa-star fa-fw'></i>", $ratings_data['rating_vote']) . "</span>\n<br/>";
echo timer($ratings_data['rating_datestamp']) . "<br/>\n";
echo "</div>\n";
echo "<!--End Rating Item-->\n";
}
if (isset($global_ratings['ratings_nav'])) {
echo "<div class='clearfix'>\n";
echo "<span class='pull-right text-smaller'>" . $global_ratings['ratings_nav'] . "</span>";
echo "</div>\n";
示例4: dbcount
$rows = dbcount("(group_id)", DB_PREFIX . "fb_groups");
echo "<tr>\n<td class='tbl1 navtitle'" . ($rows ? " colspan='5'" : "") . ">" . $locale['uc250'] . "</td>\n</tr>\n";
if ($rows) {
echo "<tr>\n<td class='tbl2' style='font-weight:bold;'>" . $locale['uc251'] . "</td>\n";
echo "<td class='tbl2' style='font-weight:bold;' width='1%'>" . $locale['uc252'] . "</td>\n";
echo "<td class='tbl2' style='font-weight:bold;' width='1%'>" . $locale['uc253'] . "</td>\n";
echo "<td class='tbl2' style='font-weight:bold;white-space:nowrap' width='1%'>" . $locale['uc254'] . "</td>\n";
echo "<td class='tbl2' style='font-weight:bold; width:150px;'>" . $locale['uc255'] . "</td>\n</tr>\n";
$result = dbquery("select * from " . DB_PREFIX . "fb_groups fg\n\t\tleft join " . DB_USER_GROUPS . " g on fg.group_id=g.group_id\n\t\torder by fg.group_created desc");
while ($data = dbarray($result)) {
$members = dbquery("SELECT * FROM " . DB_USERS . " WHERE user_groups REGEXP('^\\\\.{$data['group_id']}\$|\\\\.{$data['group_id']}\\\\.|\\\\.{$data['group_id']}\$') or user_groups='" . $data['group_id'] . "' ORDER BY user_level DESC, user_name");
$members = dbrows($members);
$wallposts = dbcount("(comment_id)", DB_COMMENTS, "comment_type='g' and comment_item_id='" . $data['group_id'] . "'");
echo "<tr>\n<td class='tbl2' style='padding:7px;'><span style='font-size:13px;'><a href='" . FUSION_SELF . "?section=groups&view=" . $data['group_id'] . "' style='text-decoration:underline;'>" . $data['group_name'] . "</a></span>\n";
if ($data['group_description']) {
echo "<br />\n<span class='small'>" . trimlink($data['group_description'], 30) . "</span>\n";
}
echo "</td>\n";
echo "<td class='tbl1' style='white-space:nowrap;padding:7px;'>" . timePassed($data['group_created'], false) . "</td>\n";
echo "<td class='tbl2' style='text-align:center;padding:7px;'>{$members}</td>\n";
echo "<td class='tbl1' style='text-align:center;padding:7px;'>{$wallposts}</td>\n";
echo "<td class='tbl2' style='padding:7px;'>";
if ($wallposts) {
$latest = dbarray(dbquery("select c.*, u.* from " . DB_COMMENTS . " c\n\t\t\t\tleft join " . DB_USERS . " u on u.user_id=c.comment_name\n\t\t\t\twhere c.comment_type='g' and c.comment_item_id='" . $data['group_id'] . "' order by c.comment_datestamp desc limit 1"));
echo timepassed($latest['comment_datestamp']) . "<br />\n";
echo $locale['uc282'] . "<a href='" . BASEDIR . "profile.php?lookup=" . $latest['user_id'] . "'>" . showLabel($latest['user_id']) . "</a>\n";
} else {
echo $locale['uc281'];
}
echo "</td>\n</tr>\n";
}
示例5: dbquery
echo "<table cellpadding='0' cellspacing='1' width='400' class='tbl-border center'>\n";
$result = dbquery("SELECT article_cat_id, article_cat_name, article_cat_description, article_cat_access FROM " . DB_ARTICLE_CATS . " WHERE article_cat_parent='0' ORDER BY article_cat_name");
//subarticles
if (dbrows($result) != 0) {
$i = 0;
echo "<tr>\n";
echo "<td class='tbl2'>" . $locale['440'] . "</td>\n";
echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'>" . $locale['441'] . "</td>\n";
echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'>" . $locale['442'] . "</td>\n";
echo "</tr>\n";
while ($data = dbarray($result)) {
$cell_color = $i % 2 == 0 ? "tbl1" : "tbl2";
echo "<tr>\n";
echo "<td class='{$cell_color}'><strong>" . $data['article_cat_name'] . "</strong>\n";
if ($data['article_cat_description']) {
echo "<br /><span class='small'>" . trimlink($data['article_cat_description'], 45) . "</span></td>\n";
}
echo "<td align='center' width='1%' class='{$cell_color}' style='white-space:nowrap'>" . getgroupname($data['article_cat_access']) . "</td>\n";
echo "<td align='center' width='1%' class='{$cell_color}' style='white-space:nowrap'><a href='" . FUSION_SELF . $aidlink . "&action=edit&cat_id=" . $data['article_cat_id'] . "'>" . $locale['443'] . "</a> -\n";
echo "<a href='" . FUSION_SELF . $aidlink . "&action=delete&cat_id=" . $data['article_cat_id'] . "' onclick=\"return confirm('" . $locale['450'] . "');\">" . $locale['444'] . "</a></td>\n";
echo "</tr>\n";
echo articles_admin_subcats($data['article_cat_id']);
//subarticles
$i++;
}
echo "</table>\n";
} else {
echo "<tr><td align='center' class='tbl1'>" . $locale['445'] . "</td></tr>\n</table>\n";
}
closetable();
}
示例6: die
if (!defined("IN_FUSION")) {
die("Access Denied");
}
include LOCALE . LOCALESET . "search/forums.php";
$forum_list = "";
$current_cat = "";
$result = dbquery("SELECT f.forum_id, f.forum_name, f2.forum_name AS forum_cat_name\n FROM " . DB_FORUMS . " f\n INNER JOIN " . DB_FORUMS . " f2 ON f.forum_cat=f2.forum_id\n WHERE " . groupaccess('f.forum_access') . " AND f.forum_cat!='0' ORDER BY f2.forum_order ASC, f.forum_order ASC");
$sel = "";
$forum_list .= "<select name='forum_id' class='textbox'>";
$forum_list .= "<option value='0'{$sel}>" . $locale['f401'] . "</option>\n";
$rows2 = dbrows($result);
while ($data2 = dbarray($result)) {
if ($data2['forum_cat_name'] != $current_cat) {
if ($current_cat != "") {
$forum_list .= "</optgroup>\n";
}
$current_cat = $data2['forum_cat_name'];
$forum_list .= "<optgroup label='" . trimlink($data2['forum_cat_name'], 20) . "'>\n";
}
$sel = $data2['forum_id'] == $_GET['forum_id'] ? " selected='selected'" : "";
$forum_list .= "<option value='" . $data2['forum_id'] . "'{$sel}>" . trimlink($data2['forum_name'], 20) . "</option>\n";
}
if ($rows2) {
$forum_list .= "</optgroup>\n";
}
$forum_list .= "</select>";
$form_elements['forums']['enabled'] = array("datelimit", "fields1", "fields2", "fields3", "sort", "order1", "order2", "chars");
$form_elements['forums']['disabled'] = array();
$form_elements['forums']['display'] = array();
$form_elements['forums']['nodisplay'] = array();
$radio_button['forums'] = "<label><input type='radio' name='stype' value='forums'" . ($_GET['stype'] == "forums" ? " checked='checked'" : "") . " onclick=\"display(this.value)\" /> " . $locale['f400'] . "</label> " . $forum_list;
示例7: subcats
function subcats($id)
{
global $aidlink, $locale, $data;
$sublist = "";
$result2 = dbquery("SELECT download_cat_id, download_cat_name, download_cat_description, download_cat_access\r\n\tFROM " . DB_DOWNLOAD_CATS . " WHERE download_cat_parent='" . $id . "' ORDER BY download_cat_name");
while ($data2 = dbarray($result2)) {
$sublist .= "<tr>\n";
$sublist .= "<td class='tbl1'>--" . $data2['download_cat_name'];
if ($data2['download_cat_description']) {
$sublist .= "<br />\n<span class='small'>" . trimlink($data2['download_cat_description'], 45) . "</span>\n";
}
$sublist .= "</td>\n";
$sublist .= "<td align='center' width='1%' class='tbl1' style='white-space:nowrap'>" . getgroupname($data2['download_cat_access']) . "</td>\n";
$sublist .= "<td align='center' width='1%' class='tbl1' style='white-space:nowrap'><a href='" . FUSION_SELF . $aidlink . "&action=edit&cat_id=" . $data2['download_cat_id'] . "'>" . $locale['443'] . "</a> -\n";
$sublist .= "<a href='" . FUSION_SELF . $aidlink . "&action=delete&cat_id=" . $data2['download_cat_id'] . "' onclick=\"return confirm('" . $locale['450'] . "');\">" . $locale['444'] . "</a></td>\n";
$sublist .= "</tr>\n";
}
return $sublist;
}
示例8: Copyright
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) PHP-Fusion Inc
| https://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: latest_downloads_panel.php
| Author: PHP-Fusion Development Team
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) {
die("Access Denied");
}
openside($locale['global_032']);
$result = dbquery("SELECT td.download_id, td.download_title, td.download_cat, td.download_datestamp, td.download_visibility\n\t\t\tFROM " . DB_DOWNLOADS . " td\n\t\t\tINNER JOIN " . DB_DOWNLOAD_CATS . " tc ON td.download_cat=tc.download_cat_id\n\t\t\t" . (multilang_table("DL") ? "WHERE download_cat_language='" . LANGUAGE . "' AND" : "WHERE") . " " . groupaccess('download_visibility') . "\n\t\t\tORDER BY download_datestamp DESC LIMIT 0,5");
if (dbrows($result)) {
while ($data = dbarray($result)) {
echo THEME_BULLET . " <a href='" . INFUSIONS . "downloads/downloads.php?download_id=" . $data['download_id'] . "' title='" . $data['download_title'] . "' class='side'>" . trimlink($data['download_title'], 23) . "</a><br />\n";
}
} else {
echo "<div style='text-align:center'>" . $locale['global_033'] . "</div>\n";
}
closeside();
示例9: substr
echo "<tr><td align='center' class='tbl2'>";
$rtype = substr($reldata['kroax_url'], -3, 3);
if ($rtype == "mp3") {
$showimg = "<img src='" . INFUSIONS . "the_kroax/img/musicstream.jpg' width='50' height='30'>";
} elseif ($reldata['kroax_tumb']) {
$showimg = "<IMG SRC='" . $reldata['kroax_tumb'] . "' width='70' height='50'>";
} else {
$showimg = "<img src='" . INFUSIONS . "the_kroax/img/nopic.gif' width='70' height='50'>";
}
if (!isset($p)) {
$videolink = '<a href="' . INFUSIONS . 'the_kroax/embed.php?url=' . $reldata['kroax_id'] . '">';
} else {
$videolink = '<a href="#" onclick=window.open("' . INFUSIONS . 'the_kroax/embed.php?p=1&url=' . $reldata['kroax_id'] . '","Click","scrollbars=yes,resizable=yes,width=800,height=600")>';
}
echo "" . $videolink . "";
echo '' . $showimg . '<br>' . trimlink($reldata['kroax_titel'], 15) . '</a></td></tr>';
}
if ($kroaxsettings['kroax_set_keepalive'] == "1") {
$result_guest = dbrows(dbquery("SELECT * FROM " . $db_prefix . "kroax_activeusr WHERE movie_id='" . $data['kroax_id'] . "' AND member='0'"));
$result_total = dbrows(dbquery("SELECT * FROM " . $db_prefix . "kroax_activeusr WHERE movie_id='" . $data['kroax_id'] . "' AND member>='0'"));
$result_members = dbrows(dbquery("SELECT * FROM " . $db_prefix . "kroax_activeusr WHERE movie_id='" . $data['kroax_id'] . "' AND member>0"));
echo "<tr><td class='tbl2' align='center'><b>" . $locale['KROAXC724'] . "</b></td></tr>";
echo "<tr><td align='center' class='tbl2'>";
echo '' . $locale['KROAXC720'] . '' . $result_members . '
</td></tr>';
echo "<tr><td align='center' class='tbl2'>";
echo '' . $locale['KROAXC721'] . '' . $result_guest . '
</td></tr>';
echo "<tr><td align='center' class='tbl2'>";
echo ' ' . $locale['KROAXC722'] . '' . $result_total . ' ';
}
示例10: dbarray
if ($fb4['latest_post']) {
echo " <a";
if ($fb4['latest_popup']) {
$originalpost = dbarray(dbquery("select * from " . DB_POSTS . " where post_id='" . $data['thread_lastpostid'] . "' order by post_id asc limit 1"));
$post = trimlink(nl2br(stripinput(parseubb($originalpost['post_message']))), 200);
echo " title='header=[" . $locale['fb615'] . ":] body=[" . $post . "] delay=[0] fade=[on]'";
}
echo " href='" . FORUM . "viewthread.php?thread_id=" . $data['thread_id'] . "&pid=" . $data['thread_lastpostid'] . "#post_" . $data['thread_lastpostid'] . "'" . (!$fb4['latest_popup'] ? " title='" . $locale['fb615'] . "'" : "") . " class='small'>(<b>»</b>)</a>";
}
echo "<br />\n<a href='" . BASEDIR . "profile.php?lookup=" . $data['original_id'] . "' style='font-size:11px;'>" . showLabel($data['original_id'], false, "panel") . "</a><br />\n\t\t<span style='font-size:10px;'>" . $timepassed . "</span>\n\t\t</td>\n";
echo "<td width='20%' class='" . $row_color . "' style='text-align:right;white-space:nowrap'>\n\t\t" . timePassed($data['thread_lastpost'], false) . "<br />\n\t\tby <a href='" . BASEDIR . "profile.php?lookup=" . $data['thread_lastuser'] . "'>" . showLabel($data['thread_lastuser'], false, "panel") . "</a>";
if (!$fb4['latest_post']) {
echo " <a";
if ($fb4['latest_popup']) {
$originalpost = dbarray(dbquery("select * from " . DB_POSTS . " where post_id='" . $data['thread_lastpostid'] . "' order by post_id asc limit 1"));
$post = trimlink(nl2br(stripinput(parseubb($originalpost['post_message']))), 200);
echo " title='header=[" . ($data['thread_postcount'] - 1 > 0 ? "RE: " : "") . $data['thread_subject'] . "] body=[" . $post . "] delay=[0] fade=[on]'";
}
echo " href='" . FORUM . "viewthread.php?thread_id=" . $data['thread_id'] . "&pid=" . $data['thread_lastpostid'] . "#post_" . $data['thread_lastpostid'] . "' title='" . $locale['fb615'] . "'><b>»»</b></a>";
}
echo "</td>\n";
echo "<td width='1%' class='" . $row_color . "' style='text-align:center;white-space:nowrap'>" . $data['thread_views'] . "</td>\n";
echo "<td width='1%' class='" . $row_color . "' style='text-align:center;white-space:nowrap'>" . ($data['thread_postcount'] - 1) . "</td>\n";
echo "</tr>\n";
$i++;
}
echo "</table>\n";
if ($fb4['latest_popup']) {
echo "<script src='" . INFUSIONS . "fusionboard4/includes/js/boxover.js' type='text/javascript'></script>\n";
}
if ($fb4['latestscroll']) {
示例11: dbquery
// mFusion environment
$this_lang = LANGUAGE;
if (file_exists(INFUSIONS . "the_kroax/locale/" . $this_lang . ".php")) {
include INFUSIONS . "the_kroax/locale/" . $this_lang . ".php";
} else {
include INFUSIONS . "the_kroax/locale/English.php";
}
}
$read_settingskroax = dbquery("SELECT * FROM " . $db_prefix . "kroax_set");
if (dbrows($read_settingskroax) != 0) {
$settingskroax = dbarray($read_settingskroax);
$skroaxembed = $settingskroax['kroax_set_show'];
}
openside("" . $locale['KROAX803'] . "");
$result = dbquery("SELECT kroax_id,kroax_titel,kroax_url,kroax_date FROM " . $db_prefix . "kroax WHERE " . groupaccess('kroax_access') . " AND kroax_approval='' ORDER BY kroax_id DESC LIMIT 0,10");
if (dbrows($result) != 0) {
echo "<table width='100%' cellpadding='0' cellspacing='0'>";
while ($data = dbarray($result)) {
$itemsubject = trimlink($data['kroax_titel'], 22);
if ($skroaxembed == "1") {
echo "<tr>\n<td class='small'><img src='" . THEME . "images/bullet.gif'> <a href='" . INFUSIONS . "the_kroax/embed.php?url=" . $data['kroax_id'] . "'>{$itemsubject}</a><br> [" . showdate('forumdate', $data['kroax_date']) . "]</td>\n";
} else {
echo "<tr>\n<td class='small'><img src='" . THEME . "images/bullet.gif'> <a href='#' onclick=window.open('" . INFUSIONS . "the_kroax/embed.php?p=1&url=" . $data['kroax_id'] . "','Click','scrollbars=yes,resizable=yes,width=650,height=550')>{$itemsubject}</a><br> [" . showdate('forumdate', $data['kroax_date']) . "]</td>\n";
}
echo "</tr>\n";
}
echo "</table>";
} else {
echo "" . $locale['KROAX802'] . "";
}
closeside();
示例12: showcatlist
function showcatlist($parent = 0, $level = 0)
{
global $locale, $aidlink;
$result = dbquery("\n\tSELECT article_cat_id, article_cat_name, article_cat_description\n\tFROM " . DB_ARTICLE_CATS . "\n\tWHERE article_cat_parent='" . $parent . "'" . (multilang_table("AR") ? " AND article_cat_language='" . LANGUAGE . "'" : "") . "\n\tORDER BY article_cat_name");
$rows = dbrows($result);
if ($rows > 0) {
while ($data = dbarray($result)) {
$description = strip_tags(parse_textarea($data['article_cat_description']));
echo "<tr>\n";
echo "<td><strong>" . str_repeat("—", $level) . $data['article_cat_name'] . "</strong>\n";
if ($data['article_cat_description']) {
echo "<br />" . str_repeat("—", $level) . "<span class='small'>" . trimlink($description, 45) . "</span></td>\n";
}
echo "<td align='center' width='1%' style='white-space:nowrap'>\n\n\t\t\t<a href='" . clean_request("action=edit&cat_id=" . $data['article_cat_id'], array("section", "aid"), true) . "'>" . $locale['edit'] . "</a> -\n";
echo "<a href='" . clean_request("action=delete&cat_id=" . $data['article_cat_id'], array("section", "aid"), true) . "' onclick=\"return confirm('" . $locale['articles_0350'] . "');\">" . $locale['delete'] . "</a></td>\n";
echo "</tr>\n";
showcatlist($data['article_cat_id'], $level + 1);
}
}
}
示例13: str_replace
$album_title = str_replace("\n", "", $album_title);
$album_title = preg_replace("[\\[(.*?)\\]]", "", $album_title);
$album_title = preg_replace("<\\<(.*?)\\>>", "", $album_title);
$album_title = trimlink($album_title, 75);
$album_title = str_replace($enc, $dec, $album_title);
$album_description = str_replace("\r", "", $data['album_description']);
$album_description = str_replace("\n", "", $album_description);
$album_description = preg_replace("[\\[(.*?)\\]]", "", $album_description);
$album_description = preg_replace("<\\<(.*?)\\>>", "", $album_description);
$album_description = trimlink($album_description, 75);
$album_description = str_replace($enc, $dec, $album_description);
$photo_title = str_replace("\r", "", $data['photo_title']);
$photo_title = str_replace("\n", "", $photo_title);
$photo_title = preg_replace("[\\[(.*?)\\]]", "", $photo_title);
$photo_title = preg_replace("<\\<(.*?)\\>>", "", $photo_title);
$photo_title = trimlink($photo_title, 75);
$photo_title = str_replace($enc, $dec, $photo_title);
$album_title_font_size = !isset($_GET['full']) ? 3 : 5;
$album_descr_font_size = !isset($_GET['full']) ? 1 : 3;
$photo_title_font_size = !isset($_GET['full']) ? 1 : 3;
//album title
ImageString($image2 ? $image2 : $image, $album_title_font_size, 10, $mty1 - 1, $album_title, $black);
ImageString($image2 ? $image2 : $image, $album_title_font_size, 10, $mty1 + 1, $album_title, $black);
ImageString($image2 ? $image2 : $image, $album_title_font_size, 9, $mty1, $album_title, $black);
ImageString($image2 ? $image2 : $image, $album_title_font_size, 11, $mty1, $album_title, $black);
ImageString($image2 ? $image2 : $image, $album_title_font_size, 10, $mty1, $album_title, $color1);
//album info
ImageString($image2 ? $image2 : $image, $album_descr_font_size, 10, $mty2 - 1, $album_description, $black);
ImageString($image2 ? $image2 : $image, $album_descr_font_size, 10, $mty2 + 1, $album_description, $black);
ImageString($image2 ? $image2 : $image, $album_descr_font_size, 9, $mty2, $album_description, $black);
ImageString($image2 ? $image2 : $image, $album_descr_font_size, 11, $mty2, $album_description, $black);
示例14: renderSubforums
//.........这里部分代码省略.........
$forum_match = "\\|" . $data['forum_lastpost'] . "\\|" . $data['forum_id'];
if ($data['forum_lastpost'] > $lastvisited) {
if (iMEMBER && preg_match("({$forum_match}\\.|{$forum_match}\$)", $userdata['user_threads'])) {
$fim = "<img src='" . get_image("folder") . "' alt='" . $locale['561'] . "' />";
} else {
$fim = "<img src='" . get_image("foldernew") . "' alt='" . $locale['560'] . "' />";
}
} else {
$fim = "<img src='" . get_image("folder") . "' alt='" . $locale['561'] . "' />";
}
echo "<tr>\n";
echo "<td align='center' width='1%' class='tbl1' style='white-space:nowrap' style='padding:7px;'>{$fim}</td>\n";
$iconQuery = dbquery("select * from " . $db_prefix . "fb_forums where forum_id='" . $data['forum_id'] . "'");
if (dbrows($iconQuery)) {
$iconData = dbarray($iconQuery);
$ficon = $iconData['forum_icon'] !== "" ? $iconData['forum_icon'] : "folder.png";
} else {
$ficon = "folder.png";
}
if ($fb4['forum_icons']) {
$ficon = "<img src='" . INFUSIONS . "fusionboard4/images/forum_icons/{$ficon}' alt='' />";
echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap; padding:7px;'>{$ficon}</td>\n";
}
echo "<td class='tbl1' style='padding:5px;width:65%;'><a href='viewforum.php?forum_id=" . $data['forum_id'] . "' style='font-size:12px; text-decoration:underline; font-weight:bold;'>\n\t\t\t<!--forum_name_cell-->" . $data['forum_name'] . "</a><br />\n";
if ($data['forum_description'] || $moderators) {
echo "<span class='small'>" . $data['forum_description'] . ($data['forum_description'] && $moderators ? "<br />\n" : "");
echo ($moderators ? "<strong>" . $locale['411'] . "</strong>" . $moderators . "</span>\n" : "</span>\n") . "\n";
}
$c_res = dbquery("select * from " . DB_PREFIX . "forums f\n\t\t\tleft join " . DB_PREFIX . "fb_forums f2 on f2.forum_id=f.forum_id\n\t\t\twhere " . groupaccess("f.forum_access") . " AND f2.forum_parent='" . $data['forum_id'] . "'");
if (dbrows($c_res)) {
if ($fb4['subforum_view']) {
echo "<br /><span class='small'><strong>" . $locale['fb552'] . "</strong> ";
$i = dbrows($c_res);
while ($c_data = dbarray($c_res)) {
$i--;
echo "<a href='" . FORUM . "viewforum.php?forum_id=" . $c_data['forum_id'] . "'>" . $c_data['forum_name'] . "</a>";
if ($i > 0) {
echo ", ";
}
}
echo "</span>";
} else {
$counter = 0;
$rows = 3;
$sfimage1 = file_exists(THEME . "images/folder_open.png") ? THEME . "images/folder_open.png" : INFUSIONS . "fusionboard4/images/folder_open.png";
$sfimage2 = file_exists(THEME . "images/subforum.png") ? THEME . "images/subforum.png" : INFUSIONS . "fusionboard4/images/subforum.png";
echo "<br /><img src='{$sfimage1}' alt='' style='vertical-align:middle;'> <span class='small' style='font-weight:bold;'>" . $locale['fb552'] . "</span><br />";
echo "<table cellspacing='0' cellpadding='0' border='0' width='100%' style='padding-left:10px;'><tr>\n\t\t\t\t\t<td width='50%' class='small' style='padding-left:3px; padding-right:3px; vertical-align:top;'>";
while ($c_data = dbarray($c_res)) {
if ($counter != 0 && $counter % $rows == 0) {
echo "</td><td width='50%' class='small' style='padding-left:3px; padding-right:3px; vertical-align:top;'>\n";
}
$subforum = is_file(THEME . "images/subforum.png") ? THEME . "images/subforum.png" : INFUSIONS . "fusionboard4/images/subforum.png";
echo "<img src='{$sfimage2}' alt='' style='vertical-align:middle;'> \n\t\t\t\t\t\t<a href='" . FORUM . "viewforum.php?forum_id=" . $c_data['forum_id'] . "' class='small'>" . $c_data['forum_name'] . "</a><br />";
$counter++;
}
echo "</td></tr></table>";
}
}
echo "</td>\n";
echo "<td class='tbl2' style='white-space:nowrap; padding:5px;width:35%;'>";
$children = array();
$child_res = dbquery("select * from " . $db_prefix . "fb_forums f\n\t\t\tleft join " . $db_prefix . "forums f2 on f2.forum_id=f.forum_id\n\t\t\twhere " . groupaccess("f2.forum_access") . " and f.forum_parent='" . $data['forum_id'] . "'");
if (dbrows($child_res)) {
while ($child_data = dbarray($child_res)) {
array_push($children, $child_data['forum_id']);
findChildren($child_data['forum_id']);
}
}
if (count($children)) {
$where = "";
$counter = count($children);
foreach ($children as $child) {
$where .= "t.forum_id='{$child}' " . ($counter > 1 ? "OR " : "");
$counter--;
}
$childrenForums = dbquery("select * from " . $db_prefix . "threads t\n\t\t\t\tleft join " . $db_prefix . "users u on u.user_id=t.thread_lastuser\n\t\t\t\tleft join " . $db_prefix . "posts p on p.post_id=t.thread_lastpostid\n\t\t\t\twhere ({$where} OR t.forum_id='" . $data['forum_id'] . "') \n\t\t\t\torder by t.thread_lastpost desc limit 1");
if (!dbrows($childrenForums)) {
echo $locale['405'] . "</td>\n";
} else {
$childrenData = dbarray($childrenForums);
echo "<b><a href='viewthread.php?thread_id=" . $childrenData['thread_id'] . "' style='text-decoration:underline;'>" . trimlink($childrenData['thread_subject'], 30) . "</a></b><br />";
echo "" . $locale['406'] . "<a href='" . BASEDIR . "profile.php?lookup=" . $childrenData['thread_lastuser'] . "'>" . showLabel($childrenData['user_id'], false, "index") . "</a><br />\n\t\t\t\t\t<div align='right'>" . timePassed($childrenData['thread_lastpost'], false) . "\n\t\t\t\t\t<a href='" . FORUM . "viewthread.php?thread_id=" . $childrenData['thread_id'] . "&pid=" . $childrenData['thread_lastpostid'] . "#post_" . $childrenData['thread_lastpostid'] . "' title='Go To Last Post'><b>»</b></a></div></td>\n";
}
} else {
if ($data['forum_lastpost'] == 0) {
echo $locale['405'] . "</td>\n";
} else {
$threadData = dbarray(dbquery("select * from " . $db_prefix . "threads t\n\t\t\t\t\tleft join " . $db_prefix . "posts p on p.post_id=t.thread_lastpostid\n\t\t\t\t\twhere t.thread_lastpost='" . $data['forum_lastpost'] . "'"));
echo "<b><a href='viewthread.php?thread_id=" . $threadData['thread_id'] . "' style='text-decoration:underline;'>" . trimlink($threadData['thread_subject'], 30) . "</a></b><br />";
echo "" . $locale['406'] . "<a href='" . BASEDIR . "profile.php?lookup=" . $data['forum_lastuser'] . "' style='text-decoration:underline;'>" . showLabel($data['forum_lastuser'], false, "index") . "</a><br />\n\t\t\t\t\t<div align='right'>" . timePassed($data['forum_lastpost'], false) . "\n\t\t\t\t\t<a href='" . FORUM . "viewthread.php?thread_id=" . $threadData['thread_id'] . "&pid=" . $threadData['thread_lastpostid'] . "#post_" . $threadData['thread_lastpostid'] . "' title='Go To Last Post'><b>»</b></a></div></td>\n";
}
}
echo "<td align='center' width='1%' class='tbl1' style='white-space:nowrap'>" . $data['forum_threadcount'] . "</td>\n";
echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'>" . $data['forum_postcount'] . "</td>\n";
echo "</tr>\n";
}
echo "</table></div>";
}
}
示例15: Copyright
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) PHP-Fusion Inc
| https://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: latest_downloads_panel.php
| Author: PHP-Fusion Development Team
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) {
die("Access Denied");
}
openside($locale['global_032']);
$result = dbquery("SELECT td.download_id, td.download_title, td.download_cat, td.download_datestamp, td.download_visibility\n\t\t\tFROM " . DB_DOWNLOADS . " td\n\t\t\tINNER JOIN " . DB_DOWNLOAD_CATS . " tc ON td.download_cat=tc.download_cat_id\n\t\t\t" . (multilang_table("DL") ? "WHERE download_cat_language='" . LANGUAGE . "' AND" : "WHERE") . " " . groupaccess('download_visibility') . "\n\t\t\tORDER BY download_datestamp DESC LIMIT 0,5");
if (dbrows($result)) {
while ($data = dbarray($result)) {
$download_title = trimlink($data['download_title'], 23);
echo THEME_BULLET . " <a href='" . BASEDIR . "downloads.php?download_id=" . $data['download_id'] . "' title='" . $data['download_title'] . "' class='side'>" . $download_title . "</a><br />\n";
}
} else {
echo "<div style='text-align:center'>" . $locale['global_033'] . "</div>\n";
}
closeside();