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


PHP showratings函数代码示例

本文整理汇总了PHP中showratings函数的典型用法代码示例。如果您正苦于以下问题:PHP showratings函数的具体用法?PHP showratings怎么用?PHP showratings使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: render_article

 function render_article($subject, $article, $info)
 {
     global $locale;
     $category = "<a href='" . INFUSIONS . "articles/articles.php?cat_id=" . $info['cat_id'] . "'>" . $info['cat_name'] . "</a>\n";
     $comment = "<a href='" . INFUSIONS . "articles/articles.php?article_id=" . $info['article_id'] . "#comments'> " . format_word($info['article_comments'], $locale['fmt_comment']) . " </a>\n";
     echo render_breadcrumbs();
     echo "<!--pre_article-->";
     echo "<article>\n";
     echo "<div class='news-action text-right'>";
     echo "<a title='" . $locale['global_075'] . "' href='" . BASEDIR . "print.php?type=A&amp;item_id=" . $info['article_id'] . "'><i class='entypo print'></i></a>";
     echo !empty($info['edit_link']) ? "<a href='" . $info['edit_link'] . "' title='" . $locale['global_076'] . "' /><i class='entypo pencil'></i></a>\n" : '';
     echo "</div>\n";
     echo "<div class='news-info'>" . ucfirst($locale['posted']) . " <span class='news-date'>" . showdate("%d %b %Y", $info['article_date']) . "</span> " . $locale['in'] . " {$category} " . $locale['and'] . " {$comment}</div>\n";
     echo "<h2 class='news-title'>{$subject}</h2>";
     echo "<div class='article'>\n";
     echo ($info['article_breaks'] == "y" ? nl2br($article) : $article) . "<br />\n";
     echo "</div>\n";
     echo "<hr />\n";
     echo "<div class='news-user-info clearfix m-b-10'>\n";
     echo "<h4>" . $locale['about'] . " <a href='" . BASEDIR . "profile.php?lookup=" . $info['user_id'] . "'>" . $info['user_name'] . "</a>\n</h4>";
     echo "<div class='pull-left m-r-10'>" . display_avatar($info, '80px') . "</div>\n";
     echo "<strong>" . getuserlevel($info['user_level']) . "</strong><br/>\n";
     echo "<strong>" . $locale['joined'] . showdate('newsdate', $info['user_joined']) . "</strong><br/>\n";
     echo "</div>\n";
     echo "</article>";
     echo "<!--sub_article-->";
     echo $info['page_nav'];
     echo "<hr />\n";
     if ($info['article_allow_comments']) {
         showcomments("A", DB_ARTICLES, "article_id", $_GET['article_id'], INFUSIONS . "articles/articles.php?article_id=" . $_GET['article_id']);
     }
     if ($info['article_allow_ratings']) {
         showratings("A", $_GET['article_id'], INFUSIONS . "articles/articles.php?article_id=" . $_GET['article_id']);
     }
 }
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:35,代码来源:articles.php

示例2: render_post

function render_post($post)
{
    global $locale, $settings;
    opentable($post['alb_post_title']);
    echo "<div class='post-item'>";
    echo "<div class='post-body'>" . $post['alb_post_text'] . "</div>";
    echo "<div class='post-footer'>";
    echo "<img src='" . AL_BLOG_DIR . "asset/images/user.png' class='icon' /><a href='" . BASEDIR . "profile.php?lookup=" . $post['alb_post_user'] . "'>" . $post['user_name'] . "</a>";
    echo "<img src='" . AL_BLOG_DIR . "asset/images/category.png' class='icon' />" . ($post['alb_cat_title'] != '' ? "<a href='" . FUSION_SELF . "?p=view_category&id=" . $post['alb_post_cat'] . "'>" . $post['alb_cat_title'] . "</a>" : $locale['alb21']);
    echo "<img src='" . AL_BLOG_DIR . "asset/images/calendar.png' class='icon' />" . showdate("forumdate", $post['alb_post_datestamp']);
    echo "<img src='" . AL_BLOG_DIR . "asset/images/comments.png' class='icon' />" . $post['comments'];
    //echo " <a href='".FUSION_SELF."?p=view_post&id=".$post['alb_post_id']."'>".$locale['alb22']."</a>";
    echo "</div>";
    echo "</div>";
    closetable();
    require_once INCLUDES . "comments_include.php";
    showcomments("BL", DB_AL_BLOG_POSTS, "alb_post_id", $_GET['id'], FUSION_SELF . "?p=view_post&id=" . $_GET['id']);
    require_once INCLUDES . "ratings_include.php";
    showratings("B", $_GET['id'], FUSION_SELF . "?p=view_post&id=" . $_GET['id']);
}
开发者ID:SymbolixDEV,项目名称:AL-PHP-Fusion-Addons,代码行数:20,代码来源:functions.php

示例3: showdate

        echo $locale['433'] . showdate("shortdate", $data['photo_datestamp']) . "<br />\n";
        echo $locale['434'] . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . "<br />\n";
        echo $locale['454'] . "{$photo_size['0']} x {$photo_size['1']} " . $locale['455'] . "<br />\n";
        echo $locale['456'] . parsebytesize($settings['photo_watermark'] ? filesize(PHOTODIR . $data['photo_filename']) : filesize($photo_file)) . "<br />\n";
        $photo_comments = dbcount("(comment_id)", DB_COMMENTS, "comment_type='P' AND comment_item_id='" . (int) $_GET['photo_id'] . "'");
        echo ($photo_comments == 1 ? $locale['436b'] : $locale['436']) . $photo_comments . "<br />\n";
        echo $locale['437'] . ($data['count_votes'] > 0 ? str_repeat("<img src='" . get_image("star") . "' alt='*' style='vertical-align:middle' />", ceil($data['sum_rating'] / $data['count_votes'])) : $locale['438']) . "<br />\n";
        echo $locale['457'] . $data['photo_views'] . "\n</div>\n";
        closetable();
        if ($data['photo_allow_comments']) {
            require_once INCLUDES . "comments_include.php";
            showcomments("P", DB_PHOTOS, "photo_id", $_GET['photo_id'], FUSION_SELF . "?photo_id=" . $_GET['photo_id']);
        }
        if ($data['photo_allow_ratings'] && $settings['ratings_enabled'] == "1") {
            require INCLUDES . "ratings_include.php";
            showratings("P", $_GET['photo_id'], FUSION_SELF . "?photo_id=" . $_GET['photo_id']);
        }
    }
} elseif (isset($_GET['album_id']) && isnum($_GET['album_id'])) {
    define("PHOTODIR", PHOTOS . (!SAFEMODE ? "album_" . $_GET['album_id'] . "/" : ""));
    $result = dbquery("SELECT album_title, album_description, album_thumb, album_access\r\n\tFROM " . DB_PHOTO_ALBUMS . " WHERE album_id='" . (int) $_GET['album_id'] . "'");
    if (!dbrows($result)) {
        redirect(make_url(BASEDIR . FUSION_SELF, BASEDIR . "photogallery", "", ".html"));
    } else {
        $data = dbarray($result);
        if (!checkgroup($data['album_access'])) {
            redirect(make_url(BASEDIR . FUSION_SELF, BASEDIR . "photogallery", "", ".html"));
        } else {
            $rows = dbcount("(photo_id)", DB_PHOTOS, "album_id='" . (int) $_GET['album_id'] . "'");
            add_to_title($locale['global_201'] . $data['album_title']);
            opentable($locale['420']);
开发者ID:MichaelFichtner,项目名称:RadioLaFamilia,代码行数:31,代码来源:photogallery.php

示例4: make_url

            // Pimped: make_url, but no seo url-rewrite
        }
        if ($can_post) {
            echo "<a href='" . make_url(FORUM . "post.php?action=newthread&amp;forum_id=" . (int) $fdata['forum_id'], BASEDIR . "forum-newthread-" . (int) $fdata['forum_id'], "", ".html") . "'><img src='" . get_image("newthread") . "' alt='" . $locale['566'] . "' style='border:0px' /></a>\n</td>\n";
            // Pimped: make_url
        }
    }
    echo "</tr>\n</table>\n";
} else {
    whoishere_show("thread", $_GET['thread_id'], false);
    // Pimped: Who is here
}
// Thread Ratings
if ($settings['forum_ratings']) {
    require_once INCLUDES_RATING . "ratings_type_stars.php";
    showratings("F", (int) $_GET['thread_id']);
}
if ($rows != 0) {
    dbquery("UPDATE " . DB_THREADS . " SET thread_postcount='{$rows}', thread_lastpostid='{$last_post}', thread_views=thread_views+1 WHERE thread_id='" . (int) $_GET['thread_id'] . "'");
    if ($_GET['rowstart'] == 0 && $fdata['thread_poll'] == "1") {
        if (iMEMBER) {
            $presult = dbquery("SELECT tfp.forum_poll_title, tfp.forum_poll_votes, tfv.forum_vote_user_id FROM " . DB_FORUM_POLLS . " tfp\r\n\t\t\t\tLEFT JOIN " . DB_FORUM_POLL_VOTERS . " tfv\r\n\t\t\t\tON tfp.thread_id=tfv.thread_id AND forum_vote_user_id='" . (int) $userdata['user_id'] . "'\r\n\t\t\t\tWHERE tfp.thread_id='" . (int) $_GET['thread_id'] . "'");
        } else {
            $presult = dbquery("SELECT tfp.forum_poll_title, tfp.forum_poll_votes FROM " . DB_FORUM_POLLS . " tfp\r\n\t\t\t\tWHERE tfp.thread_id='" . (int) $_GET['thread_id'] . "'");
        }
        if (dbrows($presult)) {
            $pdata = dbarray($presult);
            $i = 1;
            if (iMEMBER) {
                echo "<form name='voteform' method='post' action='" . make_url(FUSION_SELF . "?forum_id=" . $fdata['forum_id'] . "&amp;thread_id=" . $_GET['thread_id'], BASEDIR . "forum-thread-" . $_GET['thread_id'] . "-", $fdata['thread_subject'], ".html") . "'>\n";
            }
开发者ID:MichaelFichtner,项目名称:RadioLaFamilia,代码行数:31,代码来源:viewthread.php

示例5: ob_start

    if (checkgroup($cp_data['page_access'])) {
        ob_start();
        eval("?>" . stripslashes($cp_data['page_content']) . "<?php ");
        $custompage = ob_get_contents();
        ob_end_clean();
        $custompage = preg_split("/<!?--\\s*pagebreak\\s*-->/i", $custompage);
        $pagecount = count($custompage);
        echo $custompage[$_GET['rowstart']];
    } else {
        echo "<div class='admin-message' style='text-align:center'><br /><img style='border:0px; vertical-align:middle;' src ='" . BASEDIR . "images/warn.png' alt=''/><br /> " . $locale['400'] . "<br /><a href='index.php' onclick='javascript:history.back();return false;'>" . $locale['403'] . "</a>\n<br /><br /></div>\n";
    }
} else {
    add_to_title($locale['global_200'] . $locale['401']);
    echo "<!--custompages-pre-content-->\n";
    opentable($locale['401']);
    echo "<div style='text-align:center'><br />\n" . $locale['402'] . "\n<br /><br /></div>\n";
}
closetable();
if (isset($pagecount) && $pagecount > 1) {
    echo "<div align='center' style='margin-top:5px;'>\n" . makepagenav($_GET['rowstart'], 1, $pagecount, 3, FUSION_SELF . "?page_id=" . $_GET['page_id'] . "&amp;") . "\n</div>\n";
}
echo "<!--custompages-after-content-->\n";
if (dbrows($cp_result) && checkgroup($cp_data['page_access'])) {
    if ($cp_data['page_allow_comments']) {
        showcomments("C", DB_CUSTOM_PAGES, "page_id", $_GET['page_id'], FUSION_SELF . "?page_id=" . $_GET['page_id']);
    }
    if ($cp_data['page_allow_ratings']) {
        showratings("C", $_GET['page_id'], FUSION_SELF . "?page_id=" . $_GET['page_id']);
    }
}
require_once THEMES . "templates/footer.php";
开发者ID:dioda,项目名称:phpfusion,代码行数:31,代码来源:viewpage.php

示例6: render_item

function render_item($item_id)
{
    global $aidlink, $locale, $settings, $golddata, $_REQUEST, $_POST, $_GET;
    include INCLUDES . "comments_include.php";
    include INCLUDES . "ratings_include.php";
    echo "<table width='100%' cellpadding='0' cellspacing='0' class='tbl-border'>\n<tr>\n";
    echo "<td valign='top' align='left'>\n";
    $result = dbquery("SELECT * FROM " . DB_UG3_USAGE . " LEFT JOIN (" . DB_UG3_CATEGORIES . ")\n\t\t\t\t ON (" . DB_UG3_CATEGORIES . ".cat_id = " . DB_UG3_USAGE . ".category)\n\t\t\t\t WHERE " . DB_UG3_USAGE . ".id = '" . $item_id . "'\n\t\t\t\t LIMIT 1");
    if (dbrows($result)) {
        $data = dbarray($result);
        if (checkgroup($data['cat_access'])) {
            echo "<table cellpadding='3' cellspacing='0' width='100%' class='tbl-border'>\n<tr>\n";
            echo "<td align='left' valign='top'>&nbsp;</td>\n";
            echo "<td algin='left' valign='top'><h3>" . $data['name'] . "</h3></td>\n";
            echo "</tr><tr>\n";
            echo "<td align='left' valign='top'><img src='" . GOLD_IMAGE_ITEM . $data['image'] . "' /></td>";
            echo "<td algin='left' valign='top'>" . $data['description'] . "<br/><br />\n";
            echo "<u>" . $locale['urg_shop_109'] . "</u> " . formatMoney($data['cost']) . "<br /><br />\n";
            echo "<u>" . $locale['urg_shop_117'] . "</u> " . $data['stock'] . "<br /><br />\n";
            if ($golddata['cash'] >= $data['cost']) {
                echo "<a href='index.php?op=shop_finalise&amp;id=" . $data['id'] . "&amp;return=" . urlencode(FUSION_SELF . "?op=shop_start&category=" . $data['category']) . "'>" . $locale['urg_shop_119'] . "</a>\n";
            } elseif ($data['stock'] == 0) {
                echo "<strong>" . $locale['urg_shop_120'] . "</strong>\n";
            } else {
                echo "<span style='color:red;'>" . sprintf($locale['urg_shop_121'] . " %s", formatMoney($data['cost'] - $golddata['cash'])) . "</span>\n";
            }
            echo "</td>\n";
            echo "</tr>\n</table>\n";
        } else {
            echo $locale['urg_shop_150'];
            pagerefresh('meta', 3, FUSION_SELF . '?op=shop_start');
        }
    } else {
        echo $locale['urg_shop_151'];
        pagerefresh('meta', 3, FUSION_SELF . '?op=shop_start');
    }
    echo "</td>\n";
    echo "<td valign='top' align='left' width='150px'>\n";
    echo "<table width='100%' cellpadding='3' cellspacing='3' class='tbl-border'>\n<tr>\n";
    echo "<td class='tbl2'><strong>" . $locale['urg_shop_152'] . "</strong></td>\n";
    echo "</tr>\n";
    $count = 0;
    $result = dbquery("SELECT ownerid FROM " . DB_UG3_INVENTORY . " WHERE itemid = '" . $item_id . "' AND ownerid != '" . $userdata['user_id'] . "' GROUP BY ownerid ORDER BY RAND()");
    if (dbrows($result)) {
        while ($data = dbarray($result)) {
            if ($count < 5) {
                $result2 = dbquery("SELECT itemid FROM " . DB_UG3_INVENTORY . " WHERE ownerid = '" . $data['ownerid'] . "' AND itemid != '" . $item_id . "' GROUP BY itemid ORDER BY RAND() LIMIT 5");
                while ($data2 = dbarray($result2)) {
                    if ($count < 5) {
                        $item = dbarray(dbquery("SELECT id, name, image FROM " . DB_UG3_USAGE . " WHERE id = '" . $data2['itemid'] . "' LIMIT 1"));
                        echo "<tr>\n";
                        echo "<td><img src='" . GOLD_IMAGE_ITEM . $item['image'] . "' alt='" . $data['itemname'] . "' width='15px' height='15px' align='left' /> \n";
                        echo "<a href='" . FUSION_SELF . "?op=shop_item&amp;id=" . $item['id'] . "'>" . trimlink($item['name'], 15) . "</a></td>\n";
                        echo "</tr>\n";
                        $count++;
                    } else {
                        break;
                    }
                }
            } else {
                break;
            }
        }
    } else {
        echo "<tr><td>" . $locale['urg_shop_153'] . "</td></tr>\n";
    }
    echo "</table>\n";
    echo "</td>\n</tr>\n</table>\n";
    echo "<div style='margin:5px'></div>\n";
    showcomments("S", DB_UG3_USAGE, "id", $_REQUEST['id'], FUSION_SELF . "?op=shop_item&amp;id=" . $_REQUEST['id']);
    showratings("S", $_REQUEST['id'], FUSION_SELF . "?op=shop_item&amp;id=" . $_REQUEST['id']);
}
开发者ID:simplyianm,项目名称:clububer,代码行数:72,代码来源:template.php

示例7: render_photo

 function render_photo($info)
 {
     global $locale, $userdata;
     opentable($locale['450']);
     echo render_breadcrumbs();
     echo "<!--pre_photo-->";
     echo "<a target='_blank' href='" . $info['photo_filename'] . "' class='photogallery_photo_link' title='" . (!empty($info['photo_title']) ? $info['photo_title'] : $info['photo_filename']) . "'><!--photogallery_photo_" . $_GET['photo_id'] . "-->";
     echo "<img class='img-responsive' style='margin:0 auto;' src='" . $info['photo_filename'] . "' alt='" . (!empty($info['photo_title']) ? $info['photo_title'] : $info['photo_filename']) . "' style='border:0px' class='photogallery_photo' />";
     echo "</a>\n";
     echo "<div class='clearfix'>\n";
     echo "<div class='btn-group pull-right m-t-20'>\n";
     echo isset($info['nav']['first']) ? "<a class='btn btn-default btn-sm' href='" . $info['nav']['first']['link'] . "' title='" . $info['nav']['first']['name'] . "'><i class='entypo to-start'></i></a>\n" : '';
     echo isset($info['nav']['prev']) ? "<a class='btn btn-default btn-sm' href='" . $info['nav']['prev']['link'] . "' title='" . $info['nav']['prev']['name'] . "'><i class='entypo left-dir'></i></a>\n" : '';
     echo isset($info['nav']['next']) ? "<a class='btn btn-default btn-sm' href='" . $info['nav']['next']['link'] . "' title='" . $info['nav']['next']['name'] . "'><i class='entypo right-dir'></i></a>\n" : '';
     echo isset($info['nav']['last']) ? "<a class='btn btn-default btn-sm' href='" . $info['nav']['last']['link'] . "' title='" . $info['nav']['last']['name'] . "'><i class='entypo to-end'></i></a>\n" : '';
     echo "</div>\n";
     echo "<div class='overflow-hide m-b-20'>\n";
     echo "<h2 class='photo_title m-b-0'>" . $info['photo_title'] . "</span>\n</h2>\n";
     if ($info['photo_description']) {
         echo "<span class='photo_description list-group-item'>" . $info['photo_description'] . "</span>";
     }
     echo "</div>\n";
     echo "<div class='list-group-item m-b-20'>\n";
     echo "<div class='row'>\n";
     echo "<div class='col-xs-12 col-sm-6 col-md-6 col-lg-6'>\n";
     echo "<strong>" . $locale['434'] . "</strong>" . profile_link($info['user_id'], $info['user_name'], $info['user_status']) . "<br/>\n";
     echo "<strong>" . $locale['433'] . "</strong><abbr title='" . showdate("shortdate", $info['photo_datestamp']) . "'>" . timer(time()) . "</abbr><br/>";
     echo "<strong>" . $locale['454'] . "</strong>" . $info['photo_size'][0] . " x " . $info['photo_size'][1] . " " . $locale['455'] . "<br/>\n";
     echo "<strong>" . $locale['456'] . "</strong>" . $info['photo_byte'];
     echo "</div><div class='col-xs-12 col-sm-6 col-md-6 col-lg-6'>\n";
     echo "<strong>" . $locale['457'] . "</strong>" . number_format($info['photo_views']) . "<br/>\n";
     echo "<strong>" . $locale['437'] . "</strong>" . $info['photo_ratings'] . "<br/>\n";
     echo "<strong>" . $locale['436'] . "</strong>" . $info['photo_comment'] . "<br/>\n";
     echo "</div>\n</div>\n";
     echo "</div>\n</div>\n";
     echo "<!--sub_photo-->";
     if ($info['photo_allow_comments']) {
         showcomments("P", DB_PHOTOS, "photo_id", $_GET['photo_id'], INFUSIONS . "gallery/gallery.php?photo_id=" . $_GET['photo_id']);
     }
     if ($info['photo_allow_ratings']) {
         showratings("P", $_GET['photo_id'], INFUSIONS . "gallery/gallery.php?photo_id=" . $_GET['photo_id']);
     }
     closetable();
 }
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:44,代码来源:gallery.php

示例8: itemoptions

        } else {
            echo "<div class='viewpage'>" . $custompage . "</div>";
        }
        echo itemoptions("CP", (int) $_GET['page_id']);
        // Pimped
    } else {
        echo "<div style='text-align:center'><br />\n" . $locale['400'] . "\n<br /><br /></div>\n";
    }
} else {
    add_to_title($locale['global_200'] . $locale['401']);
    opentable($locale['401']);
    echo "<div style='text-align:center'><br />\n" . $locale['402'] . "\n<br /><br /></div>\n";
}
closetable();
if (dbrows($cp_result) && checkgroup($cp_data['page_access'])) {
    if ($settings['enable_tags']) {
        require_once INCLUDES . "tag_include.php";
        // Pimped: tag
        echo show_tags((int) $_GET['page_id'], "C");
        // Pimped: tag
    }
    if ($cp_data['page_allow_comments']) {
        require_once INCLUDES . "comments_include.php";
        showcomments("C", DB_CUSTOM_PAGES, "page_id", (int) $_GET['page_id'], FUSION_SELF . "?page_id=" . (int) $_GET['page_id'], "page", "-", (int) $_GET['page_id'], "", "", "-", $cp_data['page_title']);
    }
    if ($cp_data['page_allow_ratings'] && $settings['ratings_enabled'] == "1") {
        require INCLUDES . "ratings_include.php";
        showratings("C", (int) $_GET['page_id'], FUSION_SELF . "?page_id=" . (int) $_GET['page_id'], "page-" . (int) $_GET['page_id'] . "-", $cp_data['page_title']);
    }
}
require_once TEMPLATES . "footer.php";
开发者ID:MichaelFichtner,项目名称:RadioLaFamilia,代码行数:31,代码来源:viewpage.php

示例9: get_image

            echo "&copy; " . $data['download_copyright'] . "<br />\n";
        }
        if ($data['download_version'] != "" || $data['download_license'] != "" || $data['download_os'] != "" || $data['download_copyright'] != "") {
            echo "</td>\n</tr>\n";
        }
        echo "</table>\n";
        echo "</td></tr>\n";
        echo "<tr>\n";
        echo "<td class='tbl1' colspan='2' style='text-align:center;'><hr />\n";
        echo "<strong>" . $locale['416'] . ":</strong><br />\n";
        echo "<a href='" . FUSION_SELF . "?cat_id=" . $data['download_cat'] . "&amp;file_id=" . $data['download_id'] . "' target='_blank'>" . get_image("download", $locale['416'], "border:none;", $locale['416']) . "</a>\n";
        if ($data['download_filesize'] != "") {
            echo "<br />(" . $data['download_filesize'] . ")\n";
        }
        echo "</td>\n</tr>\n";
        echo "</table>\n";
        echo "<!--sub_download_details-->\n";
        closetable();
        echo "<!--pre_download_comments-->\n";
        include INCLUDES . "comments_include.php";
        include INCLUDES . "ratings_include.php";
        if ($data['download_allow_comments']) {
            showcomments("D", DB_DOWNLOADS, "download_id", $_GET['download_id'], FUSION_SELF . "?cat_id=" . $data['download_cat'] . "&amp;download_id=" . $_GET['download_id']);
        }
        if ($data['download_allow_ratings']) {
            showratings("D", $_GET['download_id'], FUSION_SELF . "?cat_id=" . $data['download_cat'] . "&amp;download_id=" . $_GET['download_id']);
        }
    }
}
echo $dl_stats;
require_once THEMES . "templates/footer.php";
开发者ID:dioda,项目名称:phpfusion,代码行数:31,代码来源:downloads.php

示例10: ob_get_contents

    }
    $eval = ob_get_contents();
    ob_end_clean();
    $info['body'] = preg_split("/<!?--\\s*pagebreak\\s*-->/i", fusion_get_settings("tinymce_enabled") ? $eval : nl2br($eval));
    $info['count'] = count($info['body']);
    if ($info['count'] > 0) {
        if (isset($_GET['rowstart']) && $_GET['rowstart'] > $info['count']) {
            redirect(BASEDIR . "viewpage.php?page_id=" . $_GET['page_id']);
        }
        $info['pagenav'] = makepagenav($_GET['rowstart'], 1, $info['count'], 1, BASEDIR . "viewpage.php?page_id=" . $_GET['page_id'] . "&amp;") . "\n";
    }
    if ($cp_data['page_allow_comments']) {
        ob_start();
        showcomments("C", DB_CUSTOM_PAGES, "page_id", $_GET['page_id'], BASEDIR . "viewpage.php?page_id=" . $_GET['page_id']);
        $info['show_comments'] = ob_get_contents();
        ob_end_clean();
    }
    if ($cp_data['page_allow_ratings']) {
        ob_start();
        showratings("C", $_GET['page_id'], BASEDIR . "viewpage.php?page_id=" . $_GET['page_id']);
        $info['show_ratings'] = ob_get_contents();
        ob_end_clean();
    }
    unset($cp_data);
} else {
    add_to_title($locale['global_200'] . $locale['401']);
    $info['title'] = $locale['401'];
    $info['error'] = $locale['402'];
}
render_customPage($info);
require_once THEMES . "templates/footer.php";
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:31,代码来源:viewpage.php

示例11: count

        }
        $pagecount = count($article);
        $article_subject = stripslashes($data['article_subject']);
        $article_info = array("article_id" => $data['article_id'], "user_id" => $data['user_id'], "user_name" => $data['user_name'], "article_date" => $data['article_datestamp'], "article_breaks" => $data['article_breaks'], "article_comments" => dbcount("(comment_id)", DB_COMMENTS, "comment_type='A' AND comment_item_id='" . $data['article_id'] . "'"), "article_reads" => $data['article_reads'], "article_allow_comments" => $data['article_allow_comments']);
        add_to_title($locale['global_201'] . $article_subject);
        echo "<!--pre_article-->";
        render_article($article_subject, $article[$_GET['rowstart']], $article_info);
        echo "<!--sub_article-->";
        if ($pagecount > 1) {
            echo "<div align='center' style='margin-top:5px;'>\n" . makepagenav($_GET['rowstart'], 1, $pagecount, 3, FUSION_SELF . "?article_id=" . $_GET['article_id'] . "&amp;") . "\n</div>\n";
        }
        if ($data['article_allow_comments']) {
            showcomments("A", DB_ARTICLES, "article_id", $_GET['article_id'], FUSION_SELF . "?article_id=" . $_GET['article_id']);
        }
        if ($data['article_allow_ratings']) {
            showratings("A", $_GET['article_id'], FUSION_SELF . "?article_id=" . $_GET['article_id']);
        }
    } else {
        redirect(FUSION_SELF);
    }
} elseif (!isset($_GET['cat_id']) || !isnum($_GET['cat_id'])) {
    opentable($locale['400']);
    echo "<!--pre_article_idx-->\n";
    $result = dbquery("SELECT * FROM " . DB_ARTICLE_CATS . " WHERE " . groupaccess('article_cat_access') . " ORDER BY article_cat_name");
    $rows = dbrows($result);
    if ($rows) {
        $counter = 0;
        $columns = 2;
        echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
        while ($data = dbarray($result)) {
            if ($counter != 0 && $counter % $columns == 0) {
开发者ID:simplyianm,项目名称:clububer,代码行数:31,代码来源:articles.php

示例12: closetable

            echo "<td align='center' class='tbl2'>" . $data['addon_download_count'] . "</td>\n";
            echo "<td align='center' class='tbl2'>" . $sf_rating . "</td>\n</tr>";
        }
        echo "</table>\n";
        closetable();
    }
    // Addons Co-Authored by...
    $result = dbquery("SELECT * FROM " . DB_ADDONS . " WHERE addon_co_author_name = '" . $d_addons['addon_author_name'] . "' AND addon_id != '" . $d_addons['addon_id'] . "' AND addon_status = '0' ORDER BY addon_download_count DESC");
    if (dbrows($result) != 0) {
        opentable($locale['addondb513'] . $d_addons['addon_author_name']);
        echo "<table width='100%' border='0' cellpadding='0' cellspacing='1' class='tbl-border'><tr>\n";
        echo "<th class='forum-caption'><b>" . $locale['addondb403'] . "</b></th>\n\r\n\t<th class='forum-caption'><b>" . $locale['addondb401'] . "</b></th>\n\r\n\t<th class='forum-caption'><b>" . $locale['addondb405'] . "</b></th>\n\r\n\t<th class='forum-caption'><b>" . $locale['addondb422'] . "</b></td>\n\r\n\t<th class='forum-caption' width='120'><b>" . $locale['addondb412'] . "</b></td>\n</tr>\n";
        while ($data = dbarray($result)) {
            $sf_rating = str_repeat("<img src='" . ADDON_IMG . "star.png' alt='" . $locale['addondb414'] . "' />", $data['addon_approved_rating']);
            $cat_data = dbarray(dbquery("SELECT addon_cat_name FROM " . DB_ADDON_CATS . " WHERE addon_cat_id = '" . $data['addon_cat_id'] . "'"));
            echo "<tr>\n<td class='tbl2'>" . $cat_data['addon_cat_name'] . "</td>\n\r\n\t<td class='tbl2'>&nbsp;<a href='" . ADDON . "view.php?addon_id=" . $data['addon_id'] . "'> " . $data['addon_name'] . "</a></td>\n\r\n\t<td class='tbl2'>" . $data['addon_author_name'] . "</td>\n\r\n\t<td align='center' class='tbl2'>" . $data['addon_download_count'] . "</td>\n\r\n\t<td align='center' class='tbl2'>" . $sf_rating . "</td>\n</tr>\n";
        }
        echo "</table>\n";
        closetable();
    }
    showratings("M", $addon_id, FUSION_SELF . "?addon_id=" . $d_addons['addon_id']);
    if ($settings_global['set_addondb_comm'] == '0') {
        showcomments("M", DB_ADDONS, "addon_id", $d_addons['addon_id'], FUSION_SELF . "?addon_id=" . $d_addons['addon_id']);
    }
}
if (!iGUEST) {
    add_to_title($locale['addondb507'] . $locale['addondb508'] . $locale['addondb507'] . $d_addons['addon_name']);
} else {
    add_to_title($locale['addondb507'] . $locale['addondb508'] . $locale['addondb507']);
}
require_once THEMES . "templates/footer.php";
开发者ID:xXxthebeastxXx,项目名称:addondb,代码行数:31,代码来源:view.php

示例13: display_blog_item

    function display_blog_item($info)
    {
        global $locale, $blog_settings;
        add_to_head("<link rel='stylesheet' href='" . INFUSIONS . "blog/templates/css/blog.css' type='text/css'>");
        add_to_head("<link rel='stylesheet' href='" . INCLUDES . "jquery/colorbox/colorbox.css' type='text/css' media='screen' />");
        add_to_head("<script type='text/javascript' src='" . INCLUDES . "jquery/colorbox/jquery.colorbox.js'></script>");
        add_to_footer('<script type="text/javascript">
			$(document).ready(function() {
				$(".blog-image-overlay").colorbox({
					transition: "elasic",
					height:"100%",
					width:"100%",
					maxWidth:"98%",
					maxHeight:"98%",
					scrolling:false,
					overlayClose:true,
					close:false,
					photo:true,
					onComplete: function(result) {
						$("#colorbox").live("click", function(){
						$(this).unbind("click");
						$.fn.colorbox.close();
						});
					},
					onLoad: function () {
					}
			   });
			});
			</script>');
        ob_start();
        $data = $info['blog_item'];
        echo "<div class='clearfix'>\n\t\t\t\t<div class='btn-group pull-right'>\n\t\t\t\t<a class='btn btn-default btn-sm' href='" . $data['print_link'] . "'>" . $locale['print'] . "</a>";
        if ($data['admin_link']) {
            $admin_actions = $data['admin_link'];
            echo "<a class='btn btn-default btn-sm' href='" . $admin_actions['edit'] . "'>" . $locale['edit'] . "</a>\n";
            echo "<a class='btn btn-default btn-sm' href='" . $admin_actions['delete'] . "'>" . $locale['delete'] . "</a>\n";
        }
        echo "</div>";
        echo "<div class='overflow-hide'>\n\t\t\t\t<h2 class='strong m-t-0 m-b-0'>" . $data['blog_subject'] . "</h2>\n\t\t\t\t<div class='blog-category'>" . $data['blog_category_link'] . "</div>\n\t\t\t\t<div class='m-t-20 m-b-20'>" . $data['blog_post_author'] . " " . $data['blog_post_time'] . "</div>\n\t\t\t</div>\n\t\t</div>";
        echo "<div class='clearfix m-b-20'>\n";
        if ($data['blog_image']) {
            echo "<a class='m-10 " . $data['blog_ialign'] . " blog-image-overlay' href='" . $data['blog_image_link'] . "'>";
            echo "<img class='img-responsive' src='" . $data['blog_image_link'] . "' alt='" . $data['blog_subject'] . "' style='padding:5px; max-height:" . $blog_settings['blog_photo_h'] . "px; overflow:hidden;' />\n            </a>";
        }
        echo parse_textarea($data['blog_extended'], FALSE, FALSE);
        echo "</div>\n";
        if ($info['blog_nav']) {
            echo "<div class='clearfix m-b-20'>\n<div class='pull-right'>\n" . $info['blog_nav'] . "</div>\n</div>\n";
        }
        echo "<div class='m-b-20 well'>" . $data['blog_author_info'] . "</div>";
        if ($data['blog_allow_comments']) {
            echo "<hr /> " . showcomments("B", DB_BLOG, "blog_id", $_GET['readmore'], INFUSIONS . "blog/blog.php?readmore=" . $_GET['readmore']) . "";
        }
        if ($data['blog_allow_ratings']) {
            echo "<hr />  " . showratings("B", $_GET['readmore'], INFUSIONS . "blog/blog.php?readmore=" . $_GET['readmore']) . "";
        }
        $str = ob_get_contents();
        ob_end_clean();
        return $str;
    }
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:60,代码来源:blog.php

示例14: array

        if ($news_cat_image != "") {
            $news_news = $news_cat_image . $news_news;
        }
        $news_info = array("news_id" => (int) $_GET['readmore'], "user_id" => $data['user_id'], "user_name" => $data['user_name'], "user_status" => $data['user_status'], "news_date" => $data['news_datestamp'], "news_subject" => $data['news_subject'], "cat_id" => $data['news_cat'], "cat_name" => $data['news_cat_name'], "news_ext" => "n", "news_reads" => $data['news_reads'], "news_comments" => dbcount("(comment_id)", DB_COMMENTS, "comment_type='N' AND comment_item_id='" . (int) $_GET['readmore'] . "' AND comment_hidden='0'"), "news_allow_comments" => $data['news_allow_comments'], "news_sticky" => $data['news_sticky']);
        add_to_title($locale['global_201'] . $news_subject);
        set_meta('keywords', $data['news_keywords'], false);
        set_meta('description', trimlink($news_subject, 255), false);
        echo "<!--news_pre_readmore-->";
        render_news($news_subject, $news_news, $news_info);
        echo "<!--news_sub_readmore-->";
        if ($settings['enable_tags']) {
            require_once INCLUDES . "tag_include.php";
            echo show_tags((int) $_GET['readmore'], "N");
        }
        if ($data['news_allow_comments']) {
            require_once INCLUDES . "comments_include.php";
            showcomments("N", DB_NEWS, "news_id", (int) $_GET['readmore'], FUSION_SELF . "?readmore=" . (int) $_GET['readmore']);
        }
        if ($data['news_allow_ratings'] && $settings['ratings_enabled'] == "1") {
            require INCLUDES . "ratings_include.php";
            showratings("N", (int) $_GET['readmore'], FUSION_SELF . "?readmore=" . (int) $_GET['readmore']);
        }
        if ($settings['sharethis_news']) {
            $share_this = "news";
            require_once INCLUDES . "share_this_include.php";
        }
    } else {
        redirect(FUSION_SELF);
    }
}
require_once TEMPLATES . "footer.php";
开发者ID:MichaelFichtner,项目名称:RadioLaFamilia,代码行数:31,代码来源:news.php

示例15: render_news_item

    /**
     * News Item Page Template
     * @param $info
     */
    function render_news_item($info)
    {
        global $aidlink;
        $locale = fusion_get_locale();
        $news_settings = get_settings('news');
        $data = $info['news_item'];
        add_to_head("<link rel='stylesheet' href='" . INFUSIONS . "news/templates/css/news.css' type='text/css'>");
        add_to_head("<link rel='stylesheet' href='" . INCLUDES . "jquery/colorbox/colorbox.css' type='text/css' media='screen' />");
        add_to_head("<script type='text/javascript' src='" . INCLUDES . "jquery/colorbox/jquery.colorbox.js'></script>");
        add_to_footer('<script type="text/javascript">
			$(document).ready(function() {
				$(".news-image-overlay").colorbox({
					transition: "elasic",
					height:"100%",
					width:"100%",
					maxWidth:"98%",
					maxHeight:"98%",
					scrolling:false,
					overlayClose:true,
					close:false,
					photo:true,
					onComplete: function(result) {
						$("#colorbox").live("click", function(){
						$(this).unbind("click");
						$.fn.colorbox.close();
						});
					},
					onLoad: function () {
					}
			   });
			});
			</script>');
        opentable($locale['news_0004']);
        echo render_breadcrumbs();
        echo "<!--news_pre_readmore-->";
        echo "<article class='news-item' style='display:block; width:100%; overflow:hidden;'>\n";
        echo "<h2 class='text-center'>" . $data['news_subject'] . "</h2>\n";
        echo "<div class='news_news text-dark m-t-20 m-b-20'>\n";
        if ($data['news_image_src']) {
            echo "<a class='" . $data['news_ialign'] . " news-image-overlay' href='" . $data['news_image_src'] . "'>\n            <img class='img-responsive' src='" . $data['news_image_src'] . "' alt='" . $data['news_subject'] . "' style='padding:5px; max-height:" . $news_settings['news_photo_h'] . "px; overflow:hidden;' /></a>";
        } elseif (!empty($data['news_image']) && !empty($data['news_cat_image_src'])) {
            echo "<a class='" . $data['news_ialign'] . "' href='" . INFUSIONS . "news/news.php?cat_id=" . $data['news_cat_id'] . "'>\n            <img class='img-responsive' src='" . IMAGES_NC . $data['news_cat_image_src'] . "' style='padding:5px; max-height:" . $news_settings['news_photo_h'] . "px; alt='" . $data['news_cat_name'] . "' />\n            </a>";
        }
        echo $data['news_news'];
        echo "</div>\n";
        echo "<div class='news_extended text-dark m-t-20 m-b-20'>" . $data['news_extended'] . "</div>\n";
        echo "<div style='clear:both;'></div>\n";
        echo "<div class='well m-t-5 text-center'>\n";
        echo "<span class='news-action m-r-10'><i class='fa fa-user'></i>" . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . "</span>\n";
        echo "<span class='news-action m-r-10'><i class='fa fa-calendar'></i>" . showdate("newsdate", $data['news_datestamp']) . "</span>\n";
        echo "<span class='news-action'><i class='fa fa-eye'></i><span class='text-dark m-r-10'>" . number_format($data['news_reads']) . "</span>\n</span>";
        echo $data['news_allow_comments'] ? display_comments($data['news_comments'], INFUSIONS . "news/news.php?readmore=" . $data['news_id'] . "#comments") : '';
        echo $data['news_allow_ratings'] ? "<span class='m-r-10'>" . display_ratings($data['news_sum_rating'], $data['news_count_votes'], INFUSIONS . "news/news.php?readmore=" . $data['news_id'] . "#ratings") . " </span>" : '';
        echo "<a class='m-r-10' title='" . $locale['news_0002'] . "' href='" . BASEDIR . "print.php?type=N&amp;item_id=" . $data['news_id'] . "'><i class='fa fa-print'></i></a>";
        echo iADMIN && checkrights("N") ? "<a title='" . $locale['news_0003'] . "' href='" . INFUSIONS . "news/news_admin.php" . $aidlink . "&amp;action=edit&amp;section=news_form&amp;news_id=" . $data['news_id'] . "' title='" . $locale['news_0003'] . "' />" . $locale['news_0003'] . "</a>\n" : "";
        echo "</div>";
        echo "<!--news_sub_readmore-->";
        echo !isset($_GET['readmore']) && $data['news_ext'] == "y" ? "<div class='m-t-20'>\n<a href='" . INFUSIONS . "news/news.php?readmore=" . $data['news_id'] . "' class='button'>" . $locale['news_0001'] . "</a>\n</div>\n" : "";
        if ($data['page_count'] > 0) {
            echo "<div class='text-center m-t-10'>\n" . makepagenav($_GET['rowstart'], 1, $data['page_count'], 3, INFUSIONS . "news/news.php?readmore=" . $_GET['readmore'] . "&amp;") . "\n</div>\n";
        }
        if ($data['news_allow_comments']) {
            echo "<hr />" . showcomments("N", DB_NEWS, "news_id", $_GET['readmore'], INFUSIONS . "news/news.php?readmore=" . $_GET['readmore']) . "\n";
        }
        if ($data['news_allow_ratings']) {
            echo "<hr />" . showratings("N", $_GET['readmore'], INFUSIONS . "news/news.php?readmore=" . $_GET['readmore']) . "\n";
        }
        echo "</article>\n";
        closetable();
    }
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:74,代码来源:custom_news.php


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