Exemplo n.º 1
0
 /**
  * Function to build a new table
  * @param $table_name
  * @param $primary_column
  * @return bool|mixed|null|PDOStatement|resource
  */
 protected static function build_table($new_table, $primary_column)
 {
     $new_table = !stristr($new_table, DB_PREFIX) ? DB_PREFIX . $new_table : $new_table;
     $result = NULL;
     if (!db_exists($new_table)) {
         $result = dbquery("CREATE TABLE " . $new_table . " (\n\t\t\t\t\t\t\t\t" . $primary_column . "_key MEDIUMINT(11) UNSIGNED NOT NULL AUTO_INCREMENT ,\n\t\t\t\t\t\t\t\t" . $primary_column . " MEDIUMINT(8) NOT NULL DEFAULT '0',\n\t\t\t\t\t\t\t\tPRIMARY KEY (" . $primary_column . "_key),\n\t\t\t\t\t\t\t\tKEY " . $primary_column . " (" . $primary_column . ")\n\t\t\t\t\t\t\t\t) ENGINE=MyISAM DEFAULT CHARSET=UTF8 COLLATE=utf8_unicode_ci");
     }
     return $result;
 }
Exemplo n.º 2
0
| 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).
+--------------------------------------------------------*/
require_once dirname(__FILE__) . "../../../../maincore.php";
header('Content-Type: application/rss+xml; charset=' . $locale['charset'] . '');
if (file_exists(INFUSIONS . "rss_feeds_panel/locale/" . LANGUAGE . ".php")) {
    include INFUSIONS . "rss_feeds_panel/locale/" . LANGUAGE . ".php";
} else {
    include INFUSIONS . "rss_feeds_panel/locale/English.php";
}
if (db_exists(DB_DOWNLOADS) && db_exists(DB_DOWNLOAD_CATS)) {
    $result = dbquery("SELECT tbl1.*, tbl2.* FROM " . DB_DOWNLOAD_CATS . " tbl1\n\tRIGHT JOIN " . DB_DOWNLOADS . " tbl2 ON tbl1.download_cat_id=tbl2.download_cat\n\tWHERE " . groupaccess('download_visibility') . (multilang_table("DL") ? " AND download_cat_language='" . LANGUAGE . "'" : "") . "\n\tORDER BY tbl2.download_count DESC LIMIT 0,10");
    echo "<?xml version=\"1.0\" encoding=\"" . $locale['charset'] . "\"?>\n\n";
    echo "<rss version=\"2.0\">\n\n <channel>\n";
    if (dbrows($result) != 0) {
        echo "<title>" . $settings['sitename'] . $locale['rss003'] . (multilang_table("DL") ? " " . $locale['rss007'] . " " . LANGUAGE : "") . "</title>\n<link>" . $settings['siteurl'] . "</link>\n";
        echo "<description>" . $settings['description'] . "</description>\n";
        while ($row = dbarray($result)) {
            $rsid = intval($row['download_id']);
            $rtitle = $row['download_title'];
            $description = stripslashes(nl2br($row['download_description']));
            $description = strip_tags($description, "<a><p><br /><br /><hr />");
            echo "<item>\n<title>" . htmlspecialchars($rtitle) . "</title>\n";
            echo "<link>" . $settings['siteurl'] . "infusions/downloads/downloads.php?download_id=" . $rsid . "</link>\n";
            echo "<description>" . htmlspecialchars($description) . "</description>\n";
            echo "</item>\n\n";
Exemplo n.º 3
0
/**
 * remove all metadata that have been expired for more than file ttd
 * then remove all files and logs without metadata
 *
 * @return  Void
 */
function db_purge()
{
    global $purge_interval, $file_ttd;
    # abort if last purge has been less than purge interval ago
    if (filemtime('metadata/.LAST_PURGE') > time() - $purge_interval) {
        return;
    }
    # get list of files, oldest first
    $files = array_reverse(db_list());
    # remove metadata of expired files
    foreach ($files as $file) {
        if ($file['expire'] + $file_ttd > time()) {
            # continue to next step when first file is encountered that has not expired more than file ttd ago
            break;
        } else {
            unlink('metadata/' . $file['id']);
        }
    }
    # open log directory
    $files = dir('logs');
    # remove all log files without associated metadata
    while ($file = $files->read()) {
        if (substr($file, 0, 1) == '.') {
            continue;
        } else {
            if (!db_exists($file, 'metadata')) {
                unlink('logs/' . $file);
            }
        }
    }
    # open file directory
    $files = dir('files');
    # remove all uploaded files without associated metadata
    while ($file = $files->read()) {
        if (substr($file, 0, 1) == '.') {
            continue;
        } else {
            if (!db_exists($file, 'metadata')) {
                unlink('files/' . $file);
            }
        }
    }
    # timestamp this purge
    touch('metadata/.LAST_PURGE');
}
Exemplo n.º 4
0
| Copyright (C) PHP-Fusion Inc
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: new_posts.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).
+--------------------------------------------------------*/
require_once file_exists('maincore.php') ? 'maincore.php' : __DIR__ . "/../../maincore.php";
if (!db_exists(DB_FORUMS)) {
    redirect(BASEDIR . "error.php?code=404");
}
if (!iMEMBER) {
    redirect(BASEDIR . "index.php");
}
require_once THEMES . "templates/header.php";
if (!isset($lastvisited) || !isnum($lastvisited)) {
    $lastvisited = time();
}
add_to_title($locale['global_200'] . $locale['global_043']);
opentable($locale['global_043']);
$result = dbquery("SELECT tp.post_id FROM " . DB_FORUM_POSTS . " tp\r\n\tLEFT JOIN " . DB_FORUMS . " tf ON tp.forum_id = tf.forum_id\r\n\tLEFT JOIN " . DB_FORUM_THREADS . " tt ON tp.thread_id = tt.thread_id\r\n\t" . (multilang_table("FO") ? "WHERE tf.forum_language='" . LANGUAGE . "' AND" : "WHERE") . " " . groupaccess('tf.forum_access') . " AND tp.post_hidden='0' AND tt.thread_hidden='0' AND (tp.post_datestamp > " . $lastvisited . " OR tp.post_edittime > " . $lastvisited . ")");
$rows = dbrows($result);
$threads = 0;
if ($rows) {
Exemplo n.º 5
0
function render_dashboard()
{
    global $members, $forum, $download, $news, $articles, $weblinks, $photos, $global_comments, $global_ratings, $global_submissions, $link_type, $submit_type, $comments_type, $locale, $aidlink, $settings, $infusions_count;
    $mobile = '12';
    $tablet = '12';
    $laptop = '6';
    $desktop = '3';
    opentable($locale['250']);
    echo "<!--Start Members-->\n";
    echo "<div class='row'>\n";
    echo "<div class='col-xs-{$mobile} col-sm-{$tablet} col-md-{$laptop} col-lg-{$desktop}'>\n";
    openside();
    echo "<img class='pull-left m-r-10 dashboard-icon' src='" . get_image("ac_M") . "'/>\n";
    echo "<h4 class='text-right m-t-0 m-b-0'>\n" . number_format($members['registered']) . "</h4>";
    echo "<span class='m-t-10 text-uppercase text-lighter text-smaller pull-right'><strong>" . $locale['251'] . "</strong></span>\n";
    closeside("" . (checkrights("M") ? "<div class='text-right text-uppercase'>\n<a class='text-smaller' href='" . ADMIN . "members.php" . $aidlink . "'>" . $locale['255'] . "</a><i class='entypo right-open-mini'></i></div>\n" : '') . "");
    echo "</div>\n<div class='col-xs-{$mobile} col-sm-{$tablet} col-md-{$laptop} col-lg-{$desktop}'>\n";
    openside();
    echo "<img class='pull-left m-r-10 dashboard-icon' src='" . get_image("ac_M") . "'/>\n";
    echo "<h4 class='text-right m-t-0 m-b-0'>\n" . number_format($members['cancelled']) . "</h4>";
    echo "<span class='m-t-10 text-uppercase text-lighter text-smaller pull-right'><strong>" . $locale['263'] . "</strong></span>\n";
    closeside("" . (checkrights("M") ? "<div class='text-right text-uppercase'>\n<a class='text-smaller' href='" . ADMIN . "members.php" . $aidlink . "&amp;status=5'>" . $locale['255'] . "</a> <i class='entypo right-open-mini'></i></div>\n" : '') . "");
    echo "</div>\n<div class='col-xs-{$mobile} col-sm-{$tablet} col-md-{$laptop} col-lg-{$desktop}'>\n";
    openside();
    echo "<img class='pull-left m-r-10 dashboard-icon' src='" . get_image("ac_M") . "'/>\n";
    echo "<h4 class='text-right m-t-0 m-b-0'>\n" . number_format($members['unactivated']) . "</h4>";
    echo "<span class='m-t-10 text-uppercase text-lighter text-smaller pull-right'><strong>" . $locale['252'] . "</strong></span>\n";
    closeside("" . (checkrights("M") ? "<div class='text-right text-uppercase'>\n<a class='text-smaller' href='" . ADMIN . "members.php" . $aidlink . "&amp;status=2'>" . $locale['255'] . "</a> <i class='entypo right-open-mini'></i></div>\n" : '') . "");
    echo "</div>\n<div class='col-xs-{$mobile} col-sm-{$tablet} col-md-{$laptop} col-lg-{$desktop}'>\n";
    openside();
    echo "<img class='pull-left m-r-10 dashboard-icon' src='" . get_image("ac_M") . "'/>\n";
    echo "<h4 class='text-right m-t-0 m-b-0'>\n" . number_format($members['security_ban']) . "</h4>";
    echo "<span class='m-t-10 text-uppercase text-lighter text-smaller pull-right'><strong>" . $locale['253'] . "</strong></span>\n";
    closeside("" . (checkrights("M") ? "<div class='text-right text-uppercase'><a class='text-smaller' href='" . ADMIN . "members.php" . $aidlink . "&amp;status=4'>" . $locale['255'] . "</a> <i class='entypo right-open-mini'></i></div>\n" : '') . "");
    echo "</div>\n</div>\n";
    echo "<!--End Members-->\n";
    $mobile = '12';
    $tablet = '12';
    $laptop = '6';
    $desktop = '4';
    echo "<div class='row'>\n";
    if (db_exists(DB_FORUMS)) {
        echo "<div class='col-xs-{$mobile} col-sm-{$tablet} col-md-{$laptop} col-lg-{$desktop}'>\n";
        openside("", "well");
        echo "<span class='text-smaller text-uppercase'><strong>" . $locale['265'] . " " . $locale['258'] . "</strong></span>\n<br/>\n";
        echo "<div class='clearfix m-t-10'>\n";
        echo "<img class='img-responsive pull-right dashboard-icon' src='" . get_image("ac_F") . "'/>\n";
        echo "<div class='pull-left display-inline-block m-r-10'>\n";
        echo "<span class='text-smaller'>" . $locale['265'] . "</span>\n<br/>\n";
        echo "<h4 class='m-t-0'>" . number_format($forum['count']) . "</h4>\n";
        echo "</div>\n";
        echo "<div class='pull-left display-inline-block m-r-10'>\n";
        echo "<span class='text-smaller'>" . $locale['256'] . "</span>\n<br/>\n";
        echo "<h4 class='m-t-0'>" . number_format($forum['thread']) . "</h4>\n";
        echo "</div>\n";
        echo "<div class='pull-left display-inline-block m-r-10'>\n";
        echo "<span class='text-smaller'>" . $locale['259'] . "</span>\n<br/>\n";
        echo "<h4 class='m-t-0'>" . number_format($forum['post']) . "</h4>\n";
        echo "</div>\n";
        echo "<div class='pull-left display-inline-block m-r-10'>\n";
        echo "<span class='text-smaller'>" . $locale['260'] . "</span>\n<br/>\n";
        echo "<h4 class='m-t-0'>" . $forum['users'] . "</h4>\n";
        echo "</div>\n";
        echo "</div>\n";
        closeside();
        echo "</div>\n";
    }
    if (db_exists(DB_DOWNLOADS)) {
        echo "<div class='col-xs-{$mobile} col-sm-{$tablet} col-md-{$laptop} col-lg-{$desktop}'>\n";
        openside("", "well");
        echo "<span class='text-smaller text-uppercase'><strong>" . $locale['268'] . " " . $locale['258'] . "</strong></span>\n<br/>\n";
        echo "<div class='clearfix m-t-10'>\n";
        echo "<img class='img-responsive pull-right dashboard-icon' src='" . get_image("ac_D") . "'/>\n";
        echo "<div class='pull-left display-inline-block m-r-10'>\n";
        echo "<span class='text-smaller'>" . $locale['268'] . "</span>\n<br/>\n";
        echo "<h4 class='m-t-0'>" . number_format($download['download']) . "</h4>\n";
        echo "</div>\n";
        echo "<div class='pull-left display-inline-block m-r-10'>\n";
        echo "<span class='text-smaller'>" . $locale['257'] . "</span>\n<br/>\n";
        echo "<h4 class='m-t-0'>" . number_format($download['comment']) . "</h4>\n";
        echo "</div>\n";
        echo "<div class='pull-left display-inline-block m-r-10'>\n";
        echo "<span class='text-smaller'>" . $locale['254'] . "</span>\n<br/>\n";
        echo "<h4 class='m-t-0'>" . number_format($download['submit']) . "</h4>\n";
        echo "</div>\n";
        echo "</div>\n";
        closeside();
        echo "</div>\n";
    }
    if (db_exists(DB_NEWS)) {
        echo "<div class='col-xs-{$mobile} col-sm-{$tablet} col-md-{$laptop} col-lg-{$desktop}'>\n";
        openside("", "well");
        echo "<span class='text-smaller text-uppercase'><strong>" . $locale['269'] . " " . $locale['258'] . "</strong></span>\n<br/>\n";
        echo "<div class='clearfix m-t-10'>\n";
        echo "<img class='img-responsive pull-right dashboard-icon' src='" . get_image("ac_N") . "'/>\n";
        echo "<div class='pull-left display-inline-block m-r-10'>\n";
        echo "<span class='text-smaller'>" . $locale['269'] . "</span>\n<br/>\n";
        echo "<h4 class='m-t-0'>" . number_format($news['news']) . "</h4>\n";
        echo "</div>\n";
        echo "<div class='pull-left display-inline-block m-r-10'>\n";
        echo "<span class='text-smaller'>" . $locale['257'] . "</span>\n<br/>\n";
        echo "<h4 class='m-t-0'>" . number_format($news['comment']) . "</h4>\n";
        echo "</div>\n";
        echo "<div class='pull-left display-inline-block m-r-10'>\n";
        echo "<span class='text-smaller'>" . $locale['254'] . "</span>\n<br/>\n";
        echo "<h4 class='m-t-0'>" . number_format($news['submit']) . "</h4>\n";
        echo "</div>\n";
        echo "</div>\n";
        closeside();
        echo "</div>\n";
    }
    if (db_exists(DB_ARTICLES)) {
        echo "<div class='col-xs-{$mobile} col-sm-{$tablet} col-md-{$laptop} col-lg-{$desktop}'>\n";
        openside("", "well");
        echo "<span class='text-smaller text-uppercase'><strong>" . $locale['270'] . " " . $locale['258'] . "</strong></span>\n<br/>\n";
        echo "<div class='clearfix m-t-10'>\n";
        echo "<img class='img-responsive pull-right dashboard-icon' src='" . get_image("ac_A") . "'/>\n";
        echo "<div class='pull-left display-inline-block m-r-10'>\n";
        echo "<span class='text-smaller'>" . $locale['270'] . "</span>\n<br/>\n";
        echo "<h4 class='m-t-0'>" . number_format($articles['article']) . "</h4>\n";
        echo "</div>\n";
        echo "<div class='pull-left display-inline-block m-r-10'>\n";
        echo "<span class='text-smaller'>" . $locale['257'] . "</span>\n<br/>\n";
        echo "<h4 class='m-t-0'>" . number_format($articles['comment']) . "</h4>\n";
        echo "</div>\n";
        echo "<div class='pull-left display-inline-block m-r-10'>\n";
        echo "<span class='text-smaller'>" . $locale['254'] . "</span>\n<br/>\n";
        echo "<h4 class='m-t-0'>" . number_format($articles['submit']) . "</h4>\n";
        echo "</div>\n";
        echo "</div>\n";
        closeside();
        echo "</div>\n";
    }
    if (db_exists(DB_WEBLINKS)) {
        echo "<div class='col-xs-{$mobile} col-sm-{$tablet} col-md-{$laptop} col-lg-{$desktop}'>\n";
        openside("", "well");
        echo "<span class='text-smaller text-uppercase'><strong>" . $locale['271'] . " " . $locale['258'] . "</strong></span>\n<br/>\n";
        echo "<div class='clearfix m-t-10'>\n";
        echo "<img class='img-responsive pull-right dashboard-icon' src='" . get_image("ac_W") . "'/>\n";
        echo "<div class='pull-left display-inline-block m-r-10'>\n";
        echo "<span class='text-smaller'>" . $locale['271'] . "</span>\n<br/>\n";
        echo "<h4 class='m-t-0'>" . number_format($weblinks['weblink']) . "</h4>\n";
        echo "</div>\n";
        echo "<div class='pull-left display-inline-block m-r-10'>\n";
        echo "<span class='text-smaller'>" . $locale['257'] . "</span>\n<br/>\n";
        echo "<h4 class='m-t-0'>" . number_format($weblinks['comment']) . "</h4>\n";
        echo "</div>\n";
        echo "<div class='pull-left display-inline-block m-r-10'>\n";
        echo "<span class='text-smaller'>" . $locale['254'] . "</span>\n<br/>\n";
        echo "<h4 class='m-t-0'>" . number_format($weblinks['submit']) . "</h4>\n";
        echo "</div>\n";
        echo "</div>\n";
        closeside();
        echo "</div>";
    }
    if (db_exists(DB_PHOTOS)) {
        echo "<div class='col-xs-{$mobile} col-sm-{$tablet} col-md-{$laptop} col-lg-{$desktop}'>\n";
        openside("", "well");
        echo "<span class='text-smaller text-uppercase'><strong>" . $locale['272'] . " " . $locale['258'] . "</strong></span>\n<br/>\n";
        echo "<div class='clearfix m-t-10'>\n";
        echo "<img class='img-responsive pull-right dashboard-icon' src='" . get_image("ac_PH") . "'/>\n";
        echo "<div class='pull-left display-inline-block m-r-10'>\n";
        echo "<span class='text-smaller'>" . $locale['272'] . "</span>\n<br/>\n";
        echo "<h4 class='m-t-0'>" . number_format($photos['photo']) . "</h4>\n";
        echo "</div>\n";
        echo "<div class='pull-left display-inline-block m-r-10'>\n";
        echo "<span class='text-smaller'>" . $locale['257'] . "</span>\n<br/>\n";
        echo "<h4 class='m-t-0'>" . number_format($photos['comment']) . "</h4>\n";
        echo "</div>\n";
        echo "<div class='pull-left display-inline-block m-r-10'>\n";
        echo "<span class='text-smaller'>" . $locale['254'] . "</span>\n<br/>\n";
        echo "<h4 class='m-t-0'>" . number_format($photos['submit']) . "</h4>\n";
        echo "</div>\n";
        echo "</div>\n";
        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 . "&amp;ctype=" . $comment_data['comment_type'] . "&amp;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 . "&amp;action=edit&amp;comment_id=" . $comment_data['comment_id'] . "&amp;ctype=" . $comment_data['comment_type'] . "&amp;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 . "&amp;action=delete&amp;comment_id=" . $comment_data['comment_id'] . "&amp;ctype=" . $comment_data['comment_type'] . "&amp;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";
        }
    } else {
        echo "<div class='text-center'>" . $global_ratings['nodata'] . "</div>\n";
    }
    closeside();
    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['279'] . "</strong></span><span class='pull-right badge'>" . number_format($global_submissions['rows']) . "</span>");
    if (count($global_submissions['data']) > 0) {
        foreach ($global_submissions['data'] as $i => $submit_data) {
            switch ($submit_data['submit_type']) {
                case "n":
                    $review_link = INFUSIONS . "news/news_admin.php" . $aidlink . "&amp;section=submissions&amp;submit_id=" . $submit_data['submit_id'];
                    break;
                case "a":
                    $review_link = INFUSIONS . "articles/articles_admin.php" . $aidlink . "&amp;section=submissions&amp;submit_id=" . $submit_data['submit_id'];
                    break;
                case "p":
                    $review_link = INFUSIONS . "gallery/gallery_admin.php" . $aidlink . "&amp;section=submissions&amp;submit_id=" . $submit_data['submit_id'];
                    break;
                case "b":
                    $review_link = INFUSIONS . "blog/blog_admin.php" . $aidlink . "&amp;section=submissions&amp;submit_id=" . $submit_data['submit_id'];
                    break;
                case "d":
                    $review_link = INFUSIONS . "downloads/downloads_admin.php" . $aidlink . "&amp;section=submissions&amp;submit_id=" . $submit_data['submit_id'];
                    break;
                case "l":
                    $review_link = INFUSIONS . "weblinks/weblinks_admin.php" . $aidlink . "&amp;section=submissions&amp;submit_id=" . $submit_data['submit_id'];
                    break;
                default:
                    // @todo: add admin class API to use infusion_db.php to register submission link
                    $review_link = "";
            }
            echo "<!--Start Submissions Item-->\n";
            echo "<div data-id='{$i}' class='submission_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($submit_data, "25px", "", FALSE, "", "") . "</div>\n";
            echo "<strong>" . profile_link($submit_data['user_id'], $submit_data['user_name'], $submit_data['user_status']) . "</strong>\n";
            echo "<span class='text-lighter'>" . $locale['273b'] . " <strong>" . $submit_type[$submit_data['submit_type']] . "</strong></span><br/>\n";
            echo timer($submit_data['submit_datestamp']) . "<br/>\n";
            if (!empty($review_link)) {
                echo "<a class='btn btn-xs btn-default m-t-5' title='" . $locale['286'] . "' href='" . $review_link . "'>" . $locale['286'] . "</a>\n";
            }
            echo "</div>\n";
            echo "<!--End Submissions Item-->\n";
        }
        if (isset($global_submissions['submissions_nav'])) {
            echo "<div class='clearfix'>\n";
            echo "<span class='pull-right text-smaller'>" . $global_submissions['submissions_nav'] . "</span>";
            echo "</div>\n";
        }
    } else {
        echo "<div class='text-center'>" . $global_submissions['nodata'] . "</div>\n";
    }
    closeside();
    echo "</div>\n";
    closetable();
    add_to_jquery("\n\t\$('.comment_content').hover(function() {\n\t\$('#comment_action-'+\$(this).data('id')).removeClass('display-none');\n\t},function(){\n\t\$('#comment_action-'+\$(this).data('id')).addClass('display-none');\n\t});\n\t\$('.submission_content').hover(function() {\n\t\$('#submission_action-'+\$(this).data('id')).removeClass('display-none');\n\t},function(){\n\t\$('#submission_action-'+\$(this).data('id')).addClass('display-none');\n\t});\n\t");
}
Exemplo n.º 6
0
| Copyright (C) PHP-Fusion Inc
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: weblinks.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).
+--------------------------------------------------------*/
require_once file_exists('maincore.php') ? 'maincore.php' : __DIR__ . "/../../maincore.php";
if (!db_exists(DB_WEBLINKS)) {
    redirect(BASEDIR . "error.php?code=404");
}
require_once THEMES . "templates/header.php";
require_once INCLUDES . "infusions_include.php";
if (file_exists(INFUSIONS . "weblinks/locale/" . LOCALESET . "weblinks.php")) {
    include INFUSIONS . "weblinks/locale/" . LOCALESET . "weblinks.php";
} else {
    include INFUSIONS . "weblinks/locale/English/weblinks.php";
}
include INFUSIONS . "weblinks/templates/weblinks.php";
$wl_settings = get_settings("weblinks");
$weblink_cat_index = dbquery_tree(DB_WEBLINK_CATS, 'weblink_cat_id', 'weblink_cat_parent');
add_breadcrumb(array('link' => INFUSIONS . 'weblinks/weblinks.php', 'title' => $locale['400']));
if (!isset($_GET['weblink_id']) || !isset($_GET['weblink_cat_id'])) {
    set_title($locale['400']);
Exemplo n.º 7
0
| 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).
+--------------------------------------------------------*/
require_once dirname(__FILE__) . "../../../../maincore.php";
header('Content-Type: application/rss+xml; charset=' . $locale['charset'] . '');
if (file_exists(INFUSIONS . "rss_feeds_panel/locale/" . LANGUAGE . ".php")) {
    include INFUSIONS . "rss_feeds_panel/locale/" . LANGUAGE . ".php";
} else {
    include INFUSIONS . "rss_feeds_panel/locale/English.php";
}
if (db_exists(DB_WEBLINKS) && db_exists(DB_WEBLINK_CATS)) {
    $result = dbquery("\n\tSELECT tbl1.*, tbl2.* FROM " . DB_WEBLINK_CATS . " tbl1\n\tRIGHT JOIN " . DB_WEBLINKS . " tbl2 ON tbl1.weblink_cat_id=tbl2.weblink_cat\n\tWHERE " . groupaccess('weblink_visibility') . (multilang_table("WL") ? " AND weblink_cat_language='" . LANGUAGE . "'" : "") . "\n\tORDER BY tbl2.weblink_count DESC LIMIT 0,10");
    echo "<?xml version=\"1.0\" encoding=\"" . $locale['charset'] . "\"?>\n\n";
    echo "<rss version=\"2.0\">\n\n\n\t<channel>\n";
    if (dbrows($result) != 0) {
        echo "<title>" . $settings['sitename'] . $locale['rss005'] . (multilang_table("WL") ? " " . $locale['rss007'] . " " . LANGUAGE : "") . "</title>\n";
        echo "<link>" . $settings['siteurl'] . "</link>\n<description>" . $settings['description'] . "</description>\n";
        while ($row = dbarray($result)) {
            $rsid = intval($row['weblink_id']);
            $rtitle = $row['weblink_name'];
            $description = stripslashes(nl2br($row['weblink_description']));
            $description = strip_tags($description, "<a><p><br /><hr />");
            echo "<item>\n<title>" . htmlspecialchars($rtitle) . "</title>\n";
            echo "<link>" . $settings['siteurl'] . "infusions/weblinks/weblinks.php?weblink_id=" . $rsid . "</link>\n";
            echo "<description>" . htmlspecialchars($description) . "</description>\n";
            echo "</item>\n";
Exemplo n.º 8
0
 $inbox_cfg = user_pm_settings($userdata['user_id'], "user_inbox");
 $inbox_percent = $inbox_cfg > 1 ? number_format($inbox_count / $inbox_cfg * 99, 0) : number_format(0 * 99, 0);
 echo progress_bar($inbox_percent, $locale['UM098']);
 $outbox_cfg = user_pm_settings($userdata['user_id'], "user_outbox");
 $outbox_percent = $outbox_cfg > 1 ? number_format($outbox_count / $outbox_cfg * 99, 0) : number_format(0 * 99, 0);
 echo progress_bar($outbox_percent, $locale['UM099']);
 $archive_cfg = user_pm_settings($userdata['user_id'], "user_archive");
 $archive_percent = $archive_cfg > 1 ? number_format($archive_count / $archive_cfg * 99, 0) : number_format(0 * 99, 0);
 echo progress_bar($archive_percent, $locale['UM100']);
 echo "<div id='navigation-user'>\n";
 echo "<h5><strong>" . $locale['UM097'] . "</strong></h5>\n";
 echo "<hr class='side-hr'>\n";
 echo "<ul>\n";
 echo "<li><a class='side' href='" . BASEDIR . "edit_profile.php'>" . $locale['UM080'] . " <i class='pull-right entypo suitcase'></i></a></li>\n";
 echo "<li><a class='side' href='" . BASEDIR . "messages.php'>" . $locale['UM081'] . " <i class='pull-right entypo mail'></i></a></li>\n";
 if (db_exists(DB_FORUM_THREADS)) {
     echo "<li><a class='side' href='" . INFUSIONS . "forum_threads_list_panel/my_tracked_threads.php'>" . $locale['UM088'] . " <i class='pull-right entypo eye'></i></a></li>\n";
 }
 echo "<li><a class='side' href='" . BASEDIR . "members.php'>" . $locale['UM082'] . " <i class='pull-right entypo users'></i></a></li>\n";
 echo iADMIN ? "<li><a class='side' href='" . ADMIN . "index.php" . $aidlink . "&amp;pagenum=0'>" . $locale['UM083'] . " <i class='pull-right entypo cog'></i></a></li>\n" : '';
 if ($installedModules) {
     echo "<li><a class='side' href=\"javascript:show_hide('ShowHide001')\">" . $locale['UM089'] . " <i class='pull-right entypo upload-cloud'></i></a></li>\n";
     echo "<li>\n";
     echo "<div id='ShowHide001' style='display:none'>\n";
     foreach ($installedModules as $stype => $text) {
         echo "<a class='side p-l-20' style='display:block' href='" . BASEDIR . "submit.php?stype=" . $stype . "'>" . $text . "</a>\n";
     }
     echo "</div>\n";
     echo "</li>\n";
 }
 echo "</ul>\n";
Exemplo n.º 9
0
 /**
  * Display Showcase
  */
 protected function display_Showcase()
 {
     $settings = fusion_get_settings();
     $locale = self::$locale;
     $this->open_grid('section-showcase', 1);
     if (!empty(self::$custom_header_html)) {
         add_to_head('<style>.section-showcase > .container { background-color: #fff !important; color: #444; }</style>');
         echo self::$custom_header_html;
     } else {
         if ($settings['opening_page'] == FUSION_SELF) {
             echo "<div class='text-center logo'>\n";
             if ($settings['sitebanner']) {
                 echo "<a href='" . BASEDIR . "'><img class='img-responsive' src='" . BASEDIR . $settings['sitebanner'] . "' alt='" . $settings['sitename'] . "' style='border: 0;' /></a>\n";
             } else {
                 echo "<a href='" . BASEDIR . "'>" . $settings['sitename'] . "</a>\n";
             }
             echo "</div>\n";
             echo "<h2 class='text-center text-uppercase' style='letter-spacing:10px; font-weight:300; font-size:36px;'>" . $settings['sitename'] . "</h2>\n";
             //echo "<div class='text-center' style='font-size:19.5px; line-height:35px; font-weight:300; color:rgba(255,255,255,0.8'>".stripslashes($settings['siteintro'])."</div>\n";
             $modules = array(DB_NEWS => db_exists(DB_NEWS), DB_PHOTO_ALBUMS => db_exists(DB_PHOTO_ALBUMS), DB_FORUMS => db_exists(DB_FORUMS), DB_DOWNLOADS => db_exists(DB_DOWNLOADS));
             $sum = array_sum($modules);
             if ($sum) {
                 $size = 12 / $sum;
                 $sizeClasses = 'col-sm-' . $size . ' col-md-' . $size . ' col-lg-' . $size;
                 echo "<div class='section-2-row row'>\n";
                 if ($modules[DB_NEWS]) {
                     echo "<div class='{$sizeClasses} section-2-tab text-center'>\n";
                     echo "<a href='" . INFUSIONS . "news/news.php'>\n";
                     echo "<i class='fa fa-newspaper-o fa-2x'></i>\n";
                     echo "<h4>" . $locale['sept_007'] . "</h4>";
                     echo "</a>\n";
                     echo "</div>\n";
                 }
                 if ($modules[DB_PHOTO_ALBUMS]) {
                     echo "<div class='{$sizeClasses} section-2-tab text-center'>\n";
                     echo "<a href='" . INFUSIONS . "gallery/gallery.php'>\n";
                     echo "<i class='fa fa-camera-retro fa-2x'></i>\n";
                     echo "<h4>" . $locale['sept_008'] . "</h4>";
                     echo "</a>\n";
                     echo "</div>\n";
                 }
                 if ($modules[DB_FORUMS]) {
                     echo "<div class='{$sizeClasses} section-2-tab text-center'>\n";
                     echo "<a href='" . INFUSIONS . "forum/index.php'>\n";
                     echo "<i class='fa fa-comments fa-2x'></i>\n";
                     echo "<h4>" . $locale['sept_009'] . "</h4>";
                     echo "</a>\n";
                     echo "</div>\n";
                 }
                 if ($modules[DB_DOWNLOADS]) {
                     echo "<div class='{$sizeClasses} section-2-tab text-center'>\n";
                     echo "<a href='" . INFUSIONS . "downloads/downloads.php'>\n";
                     echo "<i class='fa fa-download fa-2x'></i>\n";
                     echo "<h4>" . $locale['sept_010'] . "</h4>";
                     echo "</a>\n";
                     echo "</div>\n";
                 }
                 echo "</div>\n";
             }
         } else {
             // use SQL search for page title.
             $result = dbquery("SELECT link_name FROM " . DB_SITE_LINKS . " " . (multilang_table("SL") ? "WHERE link_language='" . LANGUAGE . "' AND" : "WHERE") . "  link_url='" . FUSION_SELF . "'");
             if (dbrows($result) > 0) {
                 $data = dbarray($result);
                 $link_name = $data['link_name'];
             } else {
                 $link_name = $settings['sitename'];
             }
             echo "<h2 class='septenary_showcase_title'>{$link_name}</h2>\n";
             add_to_head('<style>.heading h2 { display:none !important; } .footer {margin-top:0px;} .section-showcase { height:150px; }</style>');
         }
     }
     if (FUSION_SELF == 'login.php') {
         /* Custom Overrides CSS just for login */
         add_to_head('<style>.heading h2 { display:none !important; } .footer {margin-top:0px;} .section-showcase { height:594px; }</style>');
         echo CONTENT;
     }
     $this->close_grid(1);
     echo "</div>\n";
     // .overlay
 }
Exemplo n.º 10
0
<?php

/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) PHP-Fusion Inc
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: news.php
| Author: PHP-Fusion Development Team
| Co Author: Frederick MC Chan (Chan)
+--------------------------------------------------------+
| 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).
+--------------------------------------------------------*/
require_once file_exists('maincore.php') ? 'maincore.php' : __DIR__ . "/../../maincore.php";
if (!db_exists(DB_NEWS)) {
    redirect(BASEDIR . "error.php?code=404");
}
require_once THEMES . "templates/header.php";
require_once INCLUDES . "infusions_include.php";
require_once INFUSIONS . "news/infusion_db.php";
require_once NEWS_CLASS . "autoloader.php";
require_once INFUSIONS . "news/templates/news.php";
\PHPFusion\News\NewsServer::news()->display_news();
require_once THEMES . "templates/footer.php";
Exemplo n.º 11
0
     }
     $phpinfo = "<table class='table tab' style='width:100%;' id='folders'>\n";
     $phpinfo .= "<tr>\n<td class='tbl2' style='width:50%'>" . $locale['423'] . "</td><td class='tbl2' style='text-align:right'>" . (ini_get('safe_mode') ? $locale['421'] : $locale['422']) . "</td></tr>\n";
     $phpinfo .= "<tr>\n<td class='tbl1' style='width:50%'>" . $locale['424'] . "</td><td class='tbl1' style='text-align:right'>" . (ini_get('register_globals') ? $locale['421'] : $locale['422']) . "</td></tr>\n";
     $phpinfo .= "<tr>\n<td class='tbl2' style='width:50%'>" . $locale['425'] . " GD (" . $locale['431'] . ")</td><td class='tbl2' style='text-align:right'>" . (extension_loaded('gd') ? $locale['421'] . " (" . $gd_ver[0] . ")" : $locale['422']) . "</td></tr>\n";
     $phpinfo .= "<tr>\n<td class='tbl1' style='width:50%'>" . $locale['425'] . " zlib</td><td class='tbl1' style='text-align:right'>" . (extension_loaded('zlib') ? $locale['421'] : $locale['422']) . "</td></tr>\n";
     $phpinfo .= "<tr>\n<td class='tbl2' style='width:50%'>" . $locale['425'] . " Magic_quotes_gpc</td><td class='tbl2' style='text-align:right'>" . (ini_get('magic_quotes_gpc') ? $locale['421'] : $locale['422']) . "</td></tr>\n";
     $phpinfo .= "<tr>\n<td class='tbl1' style='width:50%'>" . $locale['426'] . "</td><td class='tbl1' style='text-align:right'>" . (ini_get('file_uploads') ? $locale['421'] . " (" . ini_get('upload_max_filesize') . "B)" : $locale['422']) . "</td></tr>\n";
     $phpinfo .= "<tr>\n<td class='tbl2' style='width:50%'>" . $locale['428'] . "</td><td class='tbl2' style='text-align:right'>" . (ini_get('display_errors') ? $locale['421'] : $locale['422']) . "</td></tr>\n";
     $phpinfo .= "<tr>\n<td class='tbl1' style='width:50%'>" . $locale['429'] . "</td><td class='tbl1' style='text-align:right'>" . (ini_get('disable_functions') ? ini_get('disable_functions') : $locale['430']) . "</td></tr>\n";
     $phpinfo .= "</table>\n";
 } else {
     //folder permissions
     if ($_GET['page'] == 3) {
         $status = '';
         $folders = array('administration/db_backups/' => TRUE, 'images/' => TRUE, 'images/imagelist.js' => TRUE, 'images/avatars/' => TRUE, 'infusions/articles/images/' => db_exists(DB_ARTICLES) ? TRUE : FALSE, 'infusions/news/images/' => db_exists(DB_NEWS) ? TRUE : FALSE, 'infusions/news/images/thumbs/' => db_exists(DB_NEWS) ? TRUE : FALSE, 'infusions/news/news_cats/' => db_exists(DB_NEWS_CATS) ? TRUE : FALSE, 'infusions/gallery/photos/' => db_exists(DB_PHOTO_ALBUMS) ? TRUE : FALSE, 'infusions/gallery/submissions/' => db_exists(DB_PHOTO_ALBUMS) ? TRUE : FALSE, 'infusions/forum/attachments/' => db_exists(DB_FORUMS) ? TRUE : FALSE, 'ftp_upload/' => TRUE, 'infusions/downloads/files/' => db_exists(DB_DOWNLOADS) ? TRUE : FALSE, 'infusions/downloads/images/' => db_exists(DB_DOWNLOADS) ? TRUE : FALSE, 'infusions/downloads/submissions/' => db_exists(DB_DOWNLOADS) ? TRUE : FALSE, 'robots.txt' => TRUE, 'config.php' => FALSE);
         add_to_head("<style type='text/css'>.passed {color:green;} .failed {color:red; text-transform: uppercase; font-weight:bold;}</style>\n");
         //Check file/folder writeable
         $i = 0;
         foreach ($folders as $folder => $writeable) {
             $status .= "<tr>\n<td style='width:50%'><i class='fa fa-folder fa-fw'></i> " . $folder . "</td><td style='text-align:right'>";
             if (is_writable(BASEDIR . $folder) == TRUE) {
                 $status .= "<span class='" . ($writeable == TRUE ? "passed" : "failed") . "'>" . $locale['441'] . "</span>";
             } else {
                 $status .= "<span class='" . ($writeable == TRUE ? "failed" : "passed") . "'>" . $locale['442'] . "</span>";
             }
             $status .= " (" . substr(sprintf('%o', fileperms(BASEDIR . $folder)), -4) . ")</td></tr>\n";
             $i++;
         }
         $phpinfo = "<table class='table table-hover table-striped table-responsive tab' id='folders'>\n";
         $phpinfo .= $status;
Exemplo n.º 12
0
function user_posts_migrate_console()
{
    global $aidlink, $locale;
    $result = dbquery("SELECT user_id, user_name FROM " . DB_USERS . "");
    if (dbrows($result) > 0) {
        while ($user_data = dbarray($result)) {
            $data[$user_data['user_id']] = "" . $user_data['user_name'] . "";
        }
    } else {
        $data['0'] = $locale['124'];
    }
    echo openform('inputform', 'post', "" . FUSION_SELF . $aidlink . "", array('max_tokens' => 1));
    echo "<table style='width:100%' class='table table-striped'>\n";
    echo "<thead>\n";
    echo "<tr style='height:30px;'><th style='width:33%; text-align:left'>" . $locale['125'] . "</th><th style='width:33%; text-align:left;'>" . $locale['126'] . "</th><th class='text-left'>&nbsp;</th>\n</tr>\n";
    echo "</thead>\n";
    echo "<tbody>\n";
    echo "<tr>\n";
    echo "<td>\n";
    echo form_user_select('user_primary', '', isset($_POST['user_primary']) && isnum($_POST['user_primary'] ?: ''), array('placeholder' => $locale['127']));
    echo "</td>\n";
    echo "<td>\n";
    echo form_user_select('user_migrate', '', isset($_POST['user_migrate']) && isnum($_POST['user_migrate'] ?: ''), array('placeholder' => $locale['128']));
    echo "</td>\n";
    echo "<td>\n";
    echo form_button('migrate', $locale['129'], $locale['129'], array('inline' => '1', 'class' => 'btn btn-sm btn-primary'));
    echo "</td>\n";
    echo "</tr>\n";
    echo "<tr>\n";
    echo "<td>" . $locale['130'] . "</td>";
    echo "<td colspan='2'>\n";
    echo "<input type='checkbox' name='comments' value='1' " . (isset($_POST['comments']) == '1' ? 'checked' : '') . "> " . $locale['132'] . "<br />";
    echo "<input type='checkbox' name='ratings' value='1' " . (isset($_POST['ratings']) == '1' ? 'checked' : '') . "> " . $locale['133'] . "<br />";
    echo "<input type='checkbox' name='polls' value='1' " . (isset($_POST['polls']) == '1' ? 'checked' : '') . "> " . $locale['134'] . "<br />";
    echo "<input type='checkbox' name='messages' value='1' " . (isset($_POST['messages']) == '1' ? 'checked' : '') . "> " . $locale['136'] . "<br />";
    echo "<input type='checkbox' name='user_level' value='1' " . (isset($_POST['user_level']) == '1' ? 'checked' : '') . "> " . $locale['142'] . "<br />";
    if (db_exists(DB_FORUMS)) {
        echo "<input type='checkbox' name='forum' value='1' " . (isset($_POST['forum']) == '1' ? 'checked' : '') . "> " . $locale['131'] . "<br />\n";
    }
    if (db_exists(DB_ARTICLES)) {
        echo "<input type='checkbox' name='articles' value='1' " . (isset($_POST['articles']) == '1' ? 'checked' : '') . "> " . $locale['137'] . "<br />";
    }
    if (db_exists(DB_NEWS)) {
        echo "<input type='checkbox' name='news' value='1' " . (isset($_POST['news']) == '1' ? 'checked' : '') . "> " . $locale['138'] . "<br />";
    }
    if (db_exists(DB_BLOG)) {
        echo "<input type='checkbox' name='blog' value='1' " . (isset($_POST['blog']) == '1' ? 'checked' : '') . "> " . $locale['139'] . "<br />";
    }
    if (db_exists(DB_DOWNLOADS)) {
        echo "<input type='checkbox' name='downloads' value='1' " . (isset($_POST['downloads']) == '1' ? 'checked' : '') . "> " . $locale['140'] . "<br />";
    }
    if (db_exists(DB_PHOTOS)) {
        echo "<input type='checkbox' name='photos' value='1' " . (isset($_POST['photos']) == '1' ? 'checked' : '') . "> " . $locale['141'] . "<br />";
    }
    $shoutbox = dbcount("(inf_id)", DB_INFUSIONS, "inf_folder='shoutbox_panel'");
    if ($shoutbox > 0) {
        echo "<input type='checkbox' name='shoutbox' value='1' " . (isset($_POST['shoutbox']) == '1' ? 'checked' : '') . "> " . $locale['135'] . "<br />";
    }
    echo "</td>\n";
    echo "</tr>\n";
    echo "<tr>\n";
    echo "<td>" . $locale['143'] . "</td>";
    echo "<td colspan='3'>\n";
    echo "<input type='checkbox' name='del_user' value='1'> " . $locale['144'] . "<br /> " . $locale['145'] . "\n";
    echo "</td>\n";
    echo "</tr>\n";
    echo "</tbody>\n";
    echo "</table>\n";
    echo closeform();
}
Exemplo n.º 13
0
| 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).
+--------------------------------------------------------*/
require_once dirname(__FILE__) . "../../../../maincore.php";
header('Content-Type: application/rss+xml; charset=' . $locale['charset'] . '');
if (file_exists(INFUSIONS . "rss_feeds_panel/locale/" . LANGUAGE . ".php")) {
    include INFUSIONS . "rss_feeds_panel/locale/" . LANGUAGE . ".php";
} else {
    include INFUSIONS . "rss_feeds_panel/locale/English.php";
}
if (db_exists(DB_FORUM_POSTS) && db_exists(DB_FORUMS)) {
    $result = dbquery("SELECT f.forum_id, f.forum_name, f.forum_lastpost, f.forum_postcount,\n\tf.forum_threadcount, f.forum_lastuser, f.forum_access,\n\tt.thread_id, t.thread_lastpost, t.thread_lastpostid, t.thread_subject, t.thread_postcount, t.thread_views, t.thread_lastuser, t.thread_poll, \n\tp.post_message\n\tFROM " . DB_FORUMS . " f\n\tLEFT JOIN " . DB_FORUM_THREADS . " t ON f.forum_id = t.forum_id \n\tLEFT JOIN " . DB_FORUM_POSTS . " p ON t.thread_id = p.post_id\n\t" . (multilang_table("FO") ? "WHERE f.forum_language='" . LANGUAGE . "' AND" : "WHERE") . " " . groupaccess('f.forum_access') . " AND f.forum_type!='1' AND f.forum_type!='3' AND t.thread_hidden='0' \n\tGROUP BY t.thread_id ORDER BY t.thread_lastpost DESC LIMIT 0,10");
    echo "<?xml version=\"1.0\" encoding=\"" . $locale['charset'] . "\"?>\n\n";
    echo "<rss version=\"2.0\">\n\n <channel>\n";
    if (dbrows($result) != 0) {
        echo "<title>" . $settings['sitename'] . $locale['rss001'] . (multilang_table("FO") ? " " . $locale['rss007'] . " " . LANGUAGE : "") . "</title>\n<link>" . $settings['siteurl'] . "</link>\n";
        echo "<description>" . $settings['description'] . "</description>\n";
        while ($row = dbarray($result)) {
            $rsid = intval($row['thread_id']);
            $rtitle = $row['thread_subject'];
            $description = stripslashes(nl2br($row['post_message']));
            $description = strip_tags($description, "<a><p><br /><hr />");
            echo "<item>\n";
            echo "<title>" . htmlspecialchars($rtitle) . " [ " . $row['forum_name'] . " ] </title>\n";
            echo "<link>" . $settings['siteurl'] . "infusions/forum/viewthread.php?forum_id=" . $row['forum_id'] . "&amp;thread_id=" . $rsid . "</link>\n";
            echo "<description>" . htmlspecialchars($description) . "</description>\n";
Exemplo n.º 14
0
function create_table($servername, $username, $password, $dbname, $tablename)
{
    if (db_exists($servername, $username, $password, $dbname)) {
        // Create connection
        $conn = new mysqli($servername, $username, $password, $dbname);
        // build sql
        // sql to create table
        $sql = "CREATE TABLE " . "{$tablename}" . " (";
        switch ($tablename) {
            case "menuitem":
                $sql = $sql . "id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,\n                                        function VARCHAR(30) NOT NULL,\n                                        usergroup VARCHAR(30) NOT NULL,\n                                        user VARCHAR(30),\n                                        href VARCHAR(30),\n                                        phpf VARCHAR(30),\n                                        text VARCHAR (50),\n                                        hint VARCHAR(50),\n                                        tabcol INT,\n                                        tabrow INT, ";
                break;
            case "orders":
                $sql = $sql . "increment_id VARCHAR(50) UNIQUE PRIMARY KEY,\n                                        status_mag VARCHAR(32) NOT NULL,\n                                        created_at DATETIME,\n                                        entity_id INT (10),\n                                        customer_firstname VARCHAR(255),\n                                        customer_lastname VARCHAR(255),\n                                        shipping_description VARCHAR (255),\n                                        status VARCHAR (32),\n                                        bemerkung VARCHAR (100), ";
                break;
            case "Artikel":
                break;
        }
        $sql = $sql . "reg_date TIMESTAMP)";
        // echo $sql . "<br>";
        if ($conn->query($sql) === TRUE) {
            //                    echo "Table ". $tablename . " created successfully";
        } else {
            echo "Error creating table: " . $conn->error;
        }
        $conn->close();
        echo $sql;
    }
}
Exemplo n.º 15
0
function render_page($license = FALSE)
{
    global $locale, $data, $aidlink;
    include THEME . "/locale/" . LOCALESET . "locale.php";
    add_to_head('
	<!--[if lt IE 7]>
	<script type="text/javascript" src="' . THEME . 'js/ie-png.js"></script>
	<script type="text/javascript" src="' . THEME . 'js/supersleight.js"></script>
	<link rel="stylesheet" type="text/css" href="' . THEME . 'css/lt7.css" />
	<![endif]-->
	<!--[if IE]>
	<link rel="stylesheet" type="text/css" href="' . THEME . 'css/ie.css" />
	<![endif]-->
	<!--[if IE 7]>
	<link rel="stylesheet" type="text/css" href="' . THEME . 'css/ie7.css" />
	<![endif]-->
	<script type="text/javascript" src="' . THEME . 'js/jquery.cycle.all.min.js"></script>
	<script type="text/javascript" src="' . THEME . 'js/cufon-yui.js"></script>
	<script type="text/javascript" src="' . THEME . 'js/Debonair-Calibri.js"></script>
	<script type="text/javascript" src="' . THEME . 'js/Cufon-Settings.js"></script>
	<script type="text/javascript" src="' . THEME . 'js/slider-settings.js"></script>
	<script type="text/javascript" src="' . THEME . 'js/subnavie6.js"></script>
	');
    add_to_head("<link rel='stylesheet' href='" . THEME . "css/bootstrap_rewrite.css' type='text/css'/>");
    include THEME . "theme_db.php";
    $theme_settings = get_theme_settings("debonair");
    echo "<div id='wrapper'>\n";
    echo "<div class='container'>\n";
    echo "<div class='body-wrap'>\n";
    echo "<div class='body-inner-wrap'>\n";
    // start header ----
    $banner_path = fusion_get_settings("sitebanner");
    echo "<header class='clearfix m-t-10'>\n\t\t<a class='logo' href='" . BASEDIR . "index.php'><img src='" . ($banner_path !== "" ? BASEDIR . $banner_path : IMAGES . "php-fusion-logo.png") . "' alt='" . fusion_get_settings("sitename") . "'/></a>\n\t\t<div class='tagline'>Super Clean Web 2.0 Business Template</div>\n";
    echo "<div class='call-tag'>\n";
    if (iADMIN) {
        echo "<span class='display-inline-block m-r-10'><a href='" . ADMIN . $aidlink . "'>" . $locale['global_123'] . "</a></span>\n";
    }
    echo $locale['global_ML102'] . "\n";
    foreach (fusion_get_enabled_languages() as $lang => $lang_name) {
        echo "<a href='" . clean_request("lang=" . $lang, array(), FALSE) . "'>{$lang_name}</a>\n";
    }
    echo "<i id='theme_search' class='fa fa-search fa-fw'></i>";
    echo "</div>\n</header>\n";
    // end header ----
    // start nav ---
    echo showsublinks();
    // end nav --
    // Header Banner
    $banner_inclusion_url = explode(",", $theme_settings['main_banner_url']);
    if (in_array(START_PAGE, $banner_inclusion_url)) {
        // get the results of the banner
        $result = dbquery("SELECT * FROM " . DB_DEBONAIR . " where banner_language='" . LANGUAGE . "' order by banner_order ASC");
        // show banner
        echo "<aside class='banner'>\n";
        echo "<div id='slider-container'>\n";
        echo "<ul id='slider-box'>\n";
        if (dbrows($result)) {
            while ($data = dbarray($result)) {
                echo "<!--Slide " . $data['banner_id'] . "-->\n";
                echo "<li>\n";
                echo "<div class='inner-banner'>\n";
                echo "<div class='slider-corner'></div>\n";
                if ($data['banner_image']) {
                    echo "<div class='screen'><img src='" . THEME . "upload/" . $data['banner_image'] . "' alt='" . $data['banner_subject'] . "'/></div>\n";
                }
                if ($data['banner_description'] !== "") {
                    echo "<h2>" . $data['banner_subject'] . "</h2>\n";
                    echo "<p>" . parseubb(parsesmileys($data['banner_description'])) . "</p>\n";
                } else {
                    echo "<h1>" . $data['banner_subject'] . "</h1>\n";
                }
                if ($data['banner_link'] !== "") {
                    echo "<div class='button-position'>\n";
                    echo "<div class='btn-group'><a class='btn btn-success btn-sm' href='" . BASEDIR . $data['banner_link'] . "'>Learn more</a></div>\n";
                    echo "</div>\n";
                }
                echo "</div>\n</li>\n";
                echo "<!--End slide " . $data['banner_id'] . "-->\n";
            }
        } else {
            echo "<!--Slide Welcome-->\n\t\t\t <li>\n\t\t\t <div class='welcome-banner'><div class='slider-corner'></div>\n\t\t\t <h1>" . $locale['debonair_0500'] . "</h1>\n\t\t\t <h2>" . $locale['debonair_0501'] . "</h2>\n\t\t\t </div>\n\t\t\t </li>\n\t\t\t <!-- End Slide Welcome-->\n\t\t \t";
            echo "<!--Slide Customize-->\n\t\t\t <li>\n\t\t\t <div class='welcome-banner-2'><div class='slider-corner'></div>\n\t\t\t <h1>" . $locale['debonair_0502'] . "</h1>\n\t\t\t <h2>" . $locale['debonair_0502a'] . "</h2>\n\t\t\t <div class='button-position'>\n\t\t\t <p>" . $locale['debonair_0502c'] . "</p>\n\t\t\t </div></div>\n\t\t\t </li>\n\t\t\t <!-- End Slide Customize-->\n\t\t \t";
        }
        echo "</ul>\n";
        echo "<!-- Start Slider Nav-->\n<div class='slide-pager-container'>\n<div id='slide-pager'></div>\n</div>\n<!-- End Slider Nav-->\n</div>\n";
        echo "</aside>\n";
        // upperbanner
        echo "<div class='lower-banner'>\n<div class='row holder'>\n";
        // 3 columns
        for ($i = 1; $i <= 3; $i++) {
            echo "<div class='col-xs-12 col-sm-4 col'>\n";
            if ($theme_settings['ubanner_col_' . $i] !== "") {
                $data = uncomposeSelection($theme_settings['ubanner_col_' . $i]);
                if (!empty($data['selected']) && multilang_table("NS") ? !empty($data['options'][LANGUAGE]) : "") {
                    switch ($data['selected']) {
                        case "news":
                            if (db_exists(DB_NEWS) && isset($data['options'][LANGUAGE])) {
                                $result = dbquery("select * from " . DB_NEWS . "\n\t\t\t\t\t\t\t\t\t\t\t" . (multilang_table("NS") ? "WHERE news_language='" . LANGUAGE . "' AND" : "WHERE") . " " . groupaccess('news_visibility') . "\n\t\t\t\t\t\t\t\t\t\t\tAND (news_start='0'||news_start<=" . time() . ")\n\t\t\t\t\t\t\t\t\t\t\tAND (news_end='0'||news_end>=" . time() . ") AND news_draft='0'\n\t\t\t\t\t\t\t\t\t\t\tAND news_id='" . $data['options'][LANGUAGE] . "'\n\t\t\t\t\t\t\t\t\t\t\t");
                                if (dbrows($result) > 0) {
                                    $data = dbarray($result);
                                    echo "<h2 class='icon1'>" . $data['news_subject'] . "</h2>\n";
                                    echo "<p>" . fusion_first_words(parse_textarea($data['news_news']), 50) . "</p>\n";
                                    echo "<div class='link-holder'><a href='" . INFUSIONS . "news/news.php?readmore=" . $data['news_id'] . "' class='more'>" . $locale['debonair_0504'] . "</a></div>\n";
                                } else {
                                    echo "<p>" . $locale['debonair_0600'] . "</p>\n";
                                }
                            } else {
                                echo "<p>" . $locale['debonair_0408'] . "</p>\n";
                            }
                            break;
                        case "blog":
                            if (db_exists(DB_BLOG) && isset($data['options'][LANGUAGE])) {
                                $result = dbquery("select * from " . DB_BLOG . "\n\t\t\t\t\t\t\t\t\t\t\t" . (multilang_table("BL") ? "WHERE blog_language='" . LANGUAGE . "' AND" : "WHERE") . " " . groupaccess('blog_visibility') . "\n\t\t\t\t\t\t\t\t\t\t\tAND (blog_start='0'||blog_start<=" . time() . ")\n\t\t\t\t\t\t\t\t\t\t\tAND (blog_end='0'||blog_end>=" . time() . ") AND blog_draft='0'\n\t\t\t\t\t\t\t\t\t\t\tAND blog_id='" . $data['options'][LANGUAGE] . "'\n\t\t\t\t\t\t\t\t\t\t\t");
                                if (dbrows($result) > 0) {
                                    $data = dbarray($result);
                                    echo "<h2 class='icon2'>" . $data['blog_subject'] . "</h2>\n";
                                    echo "<p>" . fusion_first_words(parse_textarea($data['blog_blog']), 50) . "</p>\n";
                                    echo "<div class='link-holder'><a href='" . INFUSIONS . "blog/blog.php?readmore=" . $data['blog_id'] . "' class='more'>" . $locale['debonair_0504'] . "</a></div>\n";
                                } else {
                                    echo "<p>" . $locale['debonair_0600'] . "</p>\n";
                                }
                            } else {
                                echo "<p>" . $locale['debonair_0405'] . "</p>\n";
                            }
                            break;
                        case "articles":
                            if (db_exists(DB_ARTICLES) && isset($data['options'][LANGUAGE])) {
                                $result = dbquery("SELECT ta.article_id, ta.article_subject, ta.article_snippet, ta.article_article, ta.article_keywords, ta.article_breaks,\n\t\t\t\t\t\t\t\tta.article_datestamp, ta.article_reads, ta.article_allow_comments, ta.article_allow_ratings,\n\t\t\t\t\t\t\t\ttac.article_cat_id, tac.article_cat_name\n\t\t\t\t\t\t\t\tFROM " . DB_ARTICLES . " ta\n\t\t\t\t\t\t\t\tINNER JOIN " . DB_ARTICLE_CATS . " tac ON ta.article_cat=tac.article_cat_id\n\t\t\t\t\t\t\t\t" . (multilang_table("AR") ? "WHERE tac.article_cat_language='" . LANGUAGE . "' AND" : "WHERE") . " " . groupaccess('article_visibility') . " AND article_id='" . $data['options'][LANGUAGE] . "' AND article_draft='0'");
                                if (dbrows($result) > 0) {
                                    $data = dbarray($result);
                                    echo "<h2 class='icon2'>" . $data['article_subject'] . "</h2>\n";
                                    echo "<p>" . fusion_first_words(parse_textarea($data['article_subject']), 50) . "</p>\n";
                                    echo "<div class='link-holder'><a href='" . INFUSIONS . "articles/articles.php?article_id=" . $data['article_id'] . "' class='more'>" . $locale['debonair_0504'] . "</a></div>\n";
                                } else {
                                    echo "<p>" . $locale['debonair_0600'] . "</p>\n";
                                }
                            } else {
                                echo "<p>" . $locale['debonair_0415'] . "</p>\n";
                            }
                            break;
                        case "cp":
                            $result = dbquery("SELECT page_id, page_title, page_content\n\t\t\t\t\t\t\t\t\t\tfrom " . DB_CUSTOM_PAGES . "\n\t\t\t\t\t\t\t\t\t\tWHERE " . groupaccess('page_access') . "\n\t\t\t\t\t\t\t\t\t\tAND page_id='" . $data['options'][LANGUAGE] . "'");
                            if (dbrows($result) > 0) {
                                $data = dbarray($result);
                                echo "<h2 class='icon3'>" . $data['page_title'] . "</h2>\n";
                                echo "<p>" . fusion_first_words(parse_textarea($data['page_content']), 50) . "</p>\n";
                                echo "<div class='link-holder'><a href='" . BASEDIR . "viewpage.php?page_id=" . $data['page_id'] . "' class='more'>" . $locale['debonair_0504'] . "</a></div>\n";
                            } else {
                                echo "<p>" . $locale['debonair_0600'] . "</p>\n";
                            }
                            break;
                    }
                }
            } else {
                echo "<h2 class='icon3'>" . $locale['debonair_0601'] . "</h2>\n";
                echo "<p>" . $locale['debonair_0602'] . "</p>\n";
            }
            echo "</div>\n";
        }
        echo "</div>\n</div>\n";
    } else {
        // show simple header
        echo "<aside class='banner m-b-15'>\n";
        echo "<div class='page-header'>\n";
        if (!iMEMBER) {
            echo "<a href='" . BASEDIR . "login.php' class='btn btn-sm btn-success pull-right'><span>" . $locale['register'] . "/" . $locale['login'] . "</span></a>";
        } else {
            echo "<a href='" . fusion_get_settings("opening_page") . "?logout=yes' class='btn btn-sm btn-success pull-right'><span>" . $locale['logout'] . "</span></a>";
        }
        echo "<div class='holder p-b-20 p-r-10'>\n";
        echo "<div class='clearfix'>\n";
        echo "<div class='pull-left m-r-5'><span class='fa fa-map-marker fa-fw'></i>\n</span></div>";
        echo "<div class='overflow-hide'>\n";
        echo render_breadcrumbs();
        echo "</div>\n</div>\n";
        $title_instance = \PHPFusion\BreadCrumbs::getInstance();
        $reference = $title_instance->toArray();
        // this will give you the whole breadcrumb array
        $debonAirTitle = !empty($reference) ? end($reference) : array('title' => $locale['home']);
        echo "<h1>" . $debonAirTitle['title'] . "</h1>\n";
        echo "</div>\n</div>\n";
        echo "</aside>\n";
    }
    // end of banner
    // Start of Inner page structure for Bootstrap
    $side_grid_settings = array('desktop_size' => 2, 'laptop_size' => 3, 'tablet_size' => 3, 'phone_size' => 4);
    $notices = getNotices();
    if ($notices) {
        echo renderNotices($notices);
    }
    echo "<section class='main-content'>\n<div class='main-content-inner'>\n";
    // now have to do bootstrap calculation
    // row 1 - go for max width
    if (defined('AU_CENTER') && AU_CENTER) {
        echo "<div class='row'>\n<div class='col-xs-12 col-sm-12 col-md-12 col-lg-12'>" . AU_CENTER . "</div>\n</div>";
    }
    // row 2 - fluid setitngs depending on panel appearances
    echo "<div class='row'>\n";
    if (defined('LEFT') && LEFT) {
        echo "<div class='" . html_prefix($side_grid_settings) . "'>\n" . LEFT . "</div>\n";
    }
    // column left
    echo "<div class='" . html_prefix(center_grid_settings($side_grid_settings)) . "'>\n";
    echo U_CENTER . CONTENT . L_CENTER . "</div>\n";
    // column center
    if (defined('RIGHT') && RIGHT) {
        echo "<div class='" . html_prefix($side_grid_settings) . "'>\n" . RIGHT . "</div>\n";
    }
    // column right
    echo "</div>\n";
    // row 3
    if (defined('BL_CENTER') && BL_CENTER) {
        echo "<div class='row'>\n<div class='col-xs-12 col-sm-12 col-md-12 col-lg-12'>" . BL_CENTER . "</div>\n</div>";
    }
    echo "</div>\n</section>\n";
    echo "</div>\n";
    // end body-inner-wrap
    // Begin Footer
    echo "<section class='lower-section'>\n";
    echo "<div class='row col-holder'>\n";
    // column 1
    echo "<div class='col-xs-12 col-sm-3'>\n";
    if ($theme_settings['lbanner_col_1'] !== "") {
        include "include/" . $theme_settings['lbanner_col_1'];
    }
    // column 2
    echo "</div>\n<div class='col-xs-12 col-sm-3'>\n";
    if ($theme_settings['lbanner_col_2'] !== "") {
        include "include/" . $theme_settings['lbanner_col_2'];
    }
    // column 3
    echo "</div>\n<div class='col-xs-12 col-sm-3'>\n";
    if ($theme_settings['lbanner_col_3'] !== "") {
        include "include/" . $theme_settings['lbanner_col_3'];
    }
    // column 4
    echo "</div>\n<div class='col-xs-12 col-sm-3'>\n";
    if ($theme_settings['lbanner_col_4'] !== "") {
        include "include/" . $theme_settings['lbanner_col_4'];
    }
    echo "</div>\n";
    echo "</div>\n";
    // start bottom
    echo "<div class='bottom'>\n";
    if ($theme_settings['facebook_url'] || $theme_settings['twitter_url']) {
        echo "<!-- Start Follow Us Links -->\n<div class='follow-box'> <strong>" . $locale['debonair_0510'] . "</strong><ul>\n";
        if ($theme_settings['facebook_url']) {
            echo "<li><a href='" . $theme_settings['facebook_url'] . "' class='facebook'>" . $locale['debonair_0511'] . "</a></li>\n";
        }
        if ($theme_settings['twitter_url']) {
            echo "<li><a href='" . $theme_settings['twitter_url'] . "' class='twitter'>" . $locale['debonair_0512'] . "</a></li>\n";
        }
        echo "</ul></div><!-- End Follow Us Links -->\n";
    }
    echo "<div class='txt-holder'><p><small>" . str_replace("<br />", "", showcopyright()) . "</small></p></div>\n\t</div>\n</div>";
    echo "</section>\n";
    echo "</div>\n <!--End Wrapper Sub Elements -->";
    echo "\n\t<div id='footer'>\n      <!--Start Footer Nav -->\n      <div class='footer-nav'>\n         <div class='w1'>\n            <div class='w2'>\n               <ul>\n                  <li><a href='" . BASEDIR . fusion_get_settings("opening_page") . "'>" . $locale['debonair_0505'] . "</a></li>\n\t\t\t\t  <li><a href='" . BASEDIR . "contact.php'>" . $locale['debonair_0506'] . "</a></li>\n";
    if (db_exists(DB_ARTICLES)) {
        echo "<li><a href='" . INFUSIONS . "articles/articles.php'>" . $locale['debonair_0507'] . "</a></li>\n";
    }
    if (db_exists(DB_NEWS)) {
        echo "<li><a href='" . INFUSIONS . "news/news.php'>" . $locale['debonair_0508'] . "</a></li>\n";
    }
    if (db_exists(DB_BLOG)) {
        echo "<li><a href='" . INFUSIONS . "blog/blog.php'>" . $locale['debonair_0509'] . "</a></li>\n";
    }
    echo "</ul>\n            </div>\n         </div>\n      </div>\n      <!--End Footer Nav -->\n   </div>\n\t";
    echo '<script type="text/javascript">Cufon.now();</script>';
}
Exemplo n.º 16
0
| 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).
+--------------------------------------------------------*/
require_once dirname(__FILE__) . "../../../../maincore.php";
header('Content-Type: application/rss+xml; charset=' . $locale['charset'] . '');
if (file_exists(INFUSIONS . "rss_feeds_panel/locale/" . LANGUAGE . ".php")) {
    include INFUSIONS . "rss_feeds_panel/locale/" . LANGUAGE . ".php";
} else {
    include INFUSIONS . "rss_feeds_panel/locale/English.php";
}
if (db_exists(DB_ARTICLES) && db_exists(DB_ARTICLE_CATS)) {
    $result = dbquery("SELECT ta.*,tac.* FROM " . DB_ARTICLES . " ta\n\tINNER JOIN " . DB_ARTICLE_CATS . " tac ON ta.article_cat=tac.article_cat_id\n\tWHERE " . groupaccess('article_visibility') . (multilang_table("AR") ? " AND article_cat_language='" . LANGUAGE . "'" : "") . "\n\tORDER BY article_datestamp DESC LIMIT 0,10");
    echo "<?xml version=\"1.0\" encoding=\"" . $locale['charset'] . "\"?>\n\n";
    echo "<rss version=\"2.0\">\n\n <channel>\n";
    if (dbrows($result) != 0) {
        echo "<title>" . $settings['sitename'] . $locale['rss002'] . (multilang_table("AR") ? " " . $locale['rss007'] . " " . LANGUAGE : "") . "</title>\n<link>" . $settings['siteurl'] . "</link>\n";
        echo "<description>" . $settings['description'] . "</description>\n";
        while ($row = dbarray($result)) {
            $rsid = intval($row['article_id']);
            $rtitle = $row['article_subject'];
            $description = stripslashes(nl2br($row['article_snippet']));
            $description = strip_tags($description, "<a><p><br /><br /><hr />");
            echo "<item>\n";
            echo "<title>" . htmlspecialchars($rtitle) . (multilang_table("AR") ? " - " . $locale['rss007'] . $row['article_cat_language'] : "") . "</title>\n";
            echo "<link>" . $settings['siteurl'] . "infusions/articles/articles.php?article_id=" . $rsid . "</link>\n";
            echo "<description>" . htmlspecialchars($description) . "</description>\n";
Exemplo n.º 17
0
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: downloads.php
| Author: Frederick MC Chan (Chan)
| Version : 9.00
+--------------------------------------------------------+
| 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).
+--------------------------------------------------------*/
require_once file_exists('maincore.php') ? 'maincore.php' : __DIR__ . "/../../maincore.php";
if (!db_exists(DB_DOWNLOADS)) {
    redirect(BASEDIR . "error.php?code=404");
}
require_once THEMES . "templates/header.php";
require_once INCLUDES . "infusions_include.php";
if (file_exists(INFUSIONS . "downloads/locale/" . LOCALESET . "downloads.php")) {
    $locale += fusion_get_locale("", INFUSIONS . "downloads/locale/" . LOCALESET . "downloads.php");
} else {
    $locale += fusion_get_locale("", INFUSIONS . "downloads/locale/English/downloads.php");
}
include INFUSIONS . "downloads/templates/downloads.php";
require_once INFUSIONS . "downloads/classes/Functions.php";
$dl_settings = get_settings("downloads");
if (!isset($_GET['download_id']) && !isset($_GET['cat_id'])) {
    add_to_title($locale['global_200'] . \PHPFusion\SiteLinks::get_current_SiteLinks("", "link_name"));
}
Exemplo n.º 18
0
| 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).
+--------------------------------------------------------*/
require_once "maincore.php";
require_once THEMES . "templates/header.php";
include_once INCLUDES . "bbcode_include.php";
include_once INCLUDES . "infusions_include.php";
include LOCALE . LOCALESET . "submit.php";
if (!iMEMBER) {
    redirect("index.php");
}
$submit_info = array();
$stype = "";
$modules = array('n' => db_exists(DB_NEWS), 'p' => db_exists(DB_PHOTO_ALBUMS), 'a' => db_exists(DB_ARTICLES), 'd' => db_exists(DB_DOWNLOADS), 'l' => db_exists(DB_WEBLINKS), 'b' => db_exists(DB_BLOG));
$sum = array_sum($modules);
if ($sum or isset($_GET['stype']) && !empty($modules[$_GET['stype']])) {
    $stype = $_GET['stype'];
    if ($stype === "l") {
        include INFUSIONS . "weblinks/weblink_submit.php";
    } elseif ($stype === "n") {
        include INFUSIONS . "news/news_submit.php";
    } elseif ($stype === "b") {
        include INFUSIONS . "blog/blog_submit.php";
    } elseif ($stype === "a") {
        include INFUSIONS . "articles/article_submit.php";
    } elseif ($stype === "p") {
        include INFUSIONS . "gallery/photo_submit.php";
    } elseif ($stype === "d") {
        include INFUSIONS . "downloads/download_submit.php";
Exemplo n.º 19
0
function debonair_theme_widget()
{
    global $locale;
    require_once "functions.php";
    $settings = get_theme_settings("debonair");
    /**
     * data parsing
     */
    $ubanner_col_1_data = uncomposeSelection($settings['ubanner_col_1']);
    $ubanner_col_2_data = uncomposeSelection($settings['ubanner_col_2']);
    $ubanner_col_3_data = uncomposeSelection($settings['ubanner_col_3']);
    $settings = array("main_banner_url" => $settings['main_banner_url'], "ubanner_col_1" => !empty($ubanner_col_1_data['selected']) ? $ubanner_col_1_data['selected'] : 0, "ubanner_col_2" => !empty($ubanner_col_2_data['selected']) ? $ubanner_col_2_data['selected'] : 0, "ubanner_col_3" => !empty($ubanner_col_3_data['selected']) ? $ubanner_col_3_data['selected'] : 0, "lbanner_col_1" => $settings['lbanner_col_1'], "lbanner_col_2" => $settings['lbanner_col_2'], "lbanner_col_3" => $settings['lbanner_col_3'], "lbanner_col_4" => $settings['lbanner_col_4'], "facebook_url" => $settings['facebook_url'], "twitter_url" => $settings['twitter_url']);
    if (isset($_POST['save_settings'])) {
        $inputArray = array("main_banner_url" => form_sanitizer($_POST['main_banner_url'], "", "main_banner_url"), "ubanner_col_1" => composeSelection(form_sanitizer($_POST['ubanner_col_1'], "", "ubanner_col_1")), "ubanner_col_2" => composeSelection(form_sanitizer($_POST['ubanner_col_2'], "", "ubanner_col_2")), "ubanner_col_3" => composeSelection(form_sanitizer($_POST['ubanner_col_3'], "", "ubanner_col_3")), "lbanner_col_1" => form_sanitizer($_POST['lbanner_col_1'], "", "lbanner_col_1"), "lbanner_col_2" => form_sanitizer($_POST['lbanner_col_2'], "", "lbanner_col_2"), "lbanner_col_3" => form_sanitizer($_POST['lbanner_col_3'], "", "lbanner_col_3"), "lbanner_col_4" => form_sanitizer($_POST['lbanner_col_4'], "", "lbanner_col_4"), "facebook_url" => form_sanitizer($_POST['facebook_url'], "", "facebook_url"), "twitter_url" => form_sanitizer($_POST['twitter_url'], "", "twitter_url"));
        foreach ($inputArray as $settings_name => $settings_value) {
            $sqlArray = array("settings_name" => $settings_name, "settings_value" => $settings_value, "settings_theme" => "debonair");
            dbquery_insert(DB_SETTINGS_THEME, $sqlArray, "update", array("primary_key" => "settings_name"));
        }
        if (defender::safe()) {
            redirect(FUSION_REQUEST);
        }
    }
    echo openform("debonair_theme_settings", "post", FUSION_REQUEST);
    $exclude_list = ".|..|.htaccess|.DS_Store|config.php|config.temp.php|.gitignore|LICENSE|README.md|robots.txt|reactivate.php|rewrite.php|maintenance.php|maincore.php|lostpassword.php|index.php|error.php";
    $list = array();
    $file_list = makefilelist(BASEDIR, $exclude_list);
    foreach ($file_list as $files) {
        $list[] = $files;
    }
    $include_list = array();
    $file_list = makefilelist(THEMES . "/debonair/include/", $exclude_list);
    foreach ($file_list as $files) {
        $include_list[$files] = str_replace(".php", "", str_replace("_", " ", ucwords($files)));
    }
    openside("");
    echo form_select("main_banner_url", $locale['debonair_0300'], $settings['main_banner_url'], array("options" => $list, "tags" => true, "multiple" => true, "width" => "100%", "inline" => false));
    echo "<p>" . $locale['debonair_0301'] . "</p>";
    closeside();
    openside("");
    echo form_text("facebook_url", $locale['debonair_0321'], $settings['facebook_url'], array("type" => "url", "inline" => true, "placeholder" => "http://www.facebook.com/your-page-id"));
    echo form_text("twitter_url", $locale['debonair_0322'], $settings['twitter_url'], array("type" => "url", "inline" => true, "placeholder" => "http://www.twitter.com/your-page-id"));
    closeside();
    $templateOpts[0] = $locale['debonair_0302'];
    /**
     * Article Selector
     */
    $articleOpts = array();
    if (db_exists(DB_ARTICLES)) {
        $article_result = dbquery("select article_id, article_subject, article_cat_language FROM " . DB_ARTICLES . " a\n\t \t\t\t\tleft join " . DB_ARTICLE_CATS . " ac on a.article_cat = ac.article_cat_id\n\t \t\t\t\torder by article_datestamp DESC\n\t \t\t\t\t");
        if (dbrows($article_result) > 0) {
            while ($data = dbarray($article_result)) {
                $articleOpts[$data['article_cat_language']][$data['article_id']] = $data['article_subject'];
            }
        }
        if (!empty($articleOpts)) {
            $templateOpts['articles'] = $locale['debonair_0303'];
        }
    }
    /**
     * News Selector
     */
    $newsOpts = array();
    if (db_exists(DB_NEWS)) {
        $news_result = dbquery("select news_id, news_subject, news_language FROM " . DB_NEWS . " order by news_datestamp DESC");
        if (dbrows($news_result) > 0) {
            while ($data = dbarray($news_result)) {
                $newsOpts[$data['news_language']][$data['news_id']] = $data['news_subject'];
            }
        }
        if (!empty($newsOpts)) {
            $templateOpts['news'] = $locale['debonair_0304'];
        }
    }
    /**
     * Blog Selector
     */
    $blogOpts = array();
    if (db_exists(DB_BLOG)) {
        $blog_result = dbquery("select blog_id, blog_subject, blog_language FROM " . DB_BLOG . "\n\t \t\t\t\torder by blog_datestamp DESC\n\t \t\t\t\t");
        if (dbrows($blog_result) > 0) {
            while ($data = dbarray($blog_result)) {
                $blogOpts[$data['blog_language']][$data['blog_id']] = $data['blog_subject'];
            }
        }
        if (!empty($blogOpts)) {
            $templateOpts['blog'] = $locale['debonair_0305'];
        }
    }
    /**
     * Custom Page Selector
     * Note: custom page has a different multilanguage setup.
     */
    $cpOpts = array();
    if (db_exists(DB_CUSTOM_PAGES)) {
        $cp_result = dbquery("select page_id, page_title, page_language FROM " . DB_CUSTOM_PAGES . " order by page_id ASC");
        if (dbrows($cp_result) > 0) {
            while ($data = dbarray($cp_result)) {
                $acceptedLang = stristr($data['page_language'], ".") ? explode(".", $data['page_language']) : array(0 => $data['page_language']);
                foreach (fusion_get_enabled_languages() as $lang) {
                    if (in_array($lang, $acceptedLang)) {
                        $cpOpts[$lang][$data['page_id']] = $data['page_title'];
                    }
                }
            }
        }
        if (!empty($cpOpts)) {
            $templateOpts['cp'] = $locale['debonair_0306'];
        }
    }
    openside("");
    echo "<div class='row'>\n";
    echo "<div class='col-xs-12 col-sm-4'>\n";
    echo form_select("ubanner_col_1", $locale['debonair_0307'], $settings['ubanner_col_1'], array("options" => $templateOpts, "inline" => false));
    if (!empty($articleOpts)) {
        echo "<div id='ubanner_col_1-articles-choices' class='choices1' " . ($settings['ubanner_col_1'] === "articles" ? "" : "style='display:none;'") . "'>\n";
        foreach (fusion_get_enabled_languages() as $lang) {
            $callback_value = $settings['ubanner_col_1'] === "articles" && !empty($ubanner_col_1_data['options'][$lang]) ? $ubanner_col_1_data['options'][$lang] : "";
            echo form_select("articles-" . $lang, sprintf($locale['debonair_0310'], $lang), $callback_value, array("options" => isset($articleOpts[$lang]) ? $articleOpts[$lang] : array()));
        }
        echo "</div>\n";
    }
    if (!empty($newsOpts)) {
        echo "<div id='ubanner_col_1-news-choices' class='choices1' " . ($settings['ubanner_col_1'] === "news" ? "" : "style='display:none;'") . ">\n";
        foreach (fusion_get_enabled_languages() as $lang) {
            $callback_value = $settings['ubanner_col_1'] === "news" && !empty($ubanner_col_1_data['options'][$lang]) ? $ubanner_col_1_data['options'][$lang] : "";
            echo form_select("news-" . $lang, sprintf($locale['debonair_0311'], $lang), $callback_value, array("options" => isset($newsOpts[$lang]) ? $newsOpts[$lang] : array()));
        }
        echo "</div>\n";
    }
    if (!empty($blogOpts)) {
        echo "<div id='ubanner_col_1-blog-choices' class='choices1' " . ($settings['ubanner_col_1'] === "blog" ? "" : "style='display:none;'") . ">\n";
        foreach (fusion_get_enabled_languages() as $lang) {
            $callback_value = $settings['ubanner_col_1'] === "blog" && !empty($ubanner_col_1_data['options'][$lang]) ? $ubanner_col_1_data['options'][$lang] : "";
            echo form_select("blog-" . $lang, sprintf($locale['debonair_0312'], $lang), $callback_value, array("options" => isset($blogOpts[$lang]) ? $blogOpts[$lang] : array()));
        }
        echo "</div>\n";
    }
    if (!empty($cpOpts)) {
        echo "<div id='ubanner_col_1-cp-choices' class='choices1' " . ($settings['ubanner_col_1'] === "cp" ? "" : "style='display:none;'") . ">\n";
        foreach (fusion_get_enabled_languages() as $lang) {
            $callback_value = $settings['ubanner_col_1'] === "cp" && !empty($ubanner_col_1_data['options'][$lang]) ? $ubanner_col_1_data['options'][$lang] : "";
            echo form_select("cp-" . $lang, sprintf($locale['debonair_0313'], $lang), $callback_value, array("options" => isset($cpOpts[$lang]) ? $cpOpts[$lang] : array()));
        }
        echo "</div>\n";
    }
    echo "</div><div class='col-xs-12 col-sm-4'>\n";
    echo form_select("ubanner_col_2", $locale['debonair_0308'], $settings['ubanner_col_2'], array("options" => $templateOpts, "inline" => false));
    if (!empty($articleOpts)) {
        echo "<div id='ubanner_col_2-articles-choices' class='choices2' " . ($settings['ubanner_col_2'] === "articles" ? "" : "style='display:none;'") . ">\n";
        foreach (fusion_get_enabled_languages() as $lang) {
            $callback_value = $settings['ubanner_col_2'] === "articles" && !empty($ubanner_col_2_data['options'][$lang]) ? $ubanner_col_2_data['options'][$lang] : "";
            echo form_select("articles2-" . $lang, sprintf($locale['debonair_0310'], $lang), $callback_value, array("options" => isset($articleOpts[$lang]) ? $articleOpts[$lang] : array()));
        }
        echo "</div>\n";
    }
    if (!empty($newsOpts)) {
        echo "<div id='ubanner_col_2-news-choices' class='choices2' " . ($settings['ubanner_col_2'] === "news" ? "" : "style='display:none;'") . ">\n";
        foreach (fusion_get_enabled_languages() as $lang) {
            $callback_value = $settings['ubanner_col_2'] === "news" && !empty($ubanner_col_2_data['options'][$lang]) ? $ubanner_col_2_data['options'][$lang] : "";
            echo form_select("news2-" . $lang, sprintf($locale['debonair_0311'], $lang), $callback_value, array("options" => isset($newsOpts[$lang]) ? $newsOpts[$lang] : array()));
        }
        echo "</div>\n";
    }
    if (!empty($blogOpts)) {
        echo "<div id='ubanner_col_2-blog-choices' class='choices2' " . ($settings['ubanner_col_2'] === "blog" ? "" : "style='display:none;'") . ">\n";
        foreach (fusion_get_enabled_languages() as $lang) {
            $callback_value = $settings['ubanner_col_2'] === "blog" && !empty($ubanner_col_2_data['options'][$lang]) ? $ubanner_col_2_data['options'][$lang] : "";
            echo form_select("blog2-" . $lang, sprintf($locale['debonair_0312'], $lang), $callback_value, array("options" => isset($blogOpts[$lang]) ? $blogOpts[$lang] : array()));
        }
        echo "</div>\n";
    }
    if (!empty($cpOpts)) {
        echo "<div id='ubanner_col_2-cp-choices' class='choices2' " . ($settings['ubanner_col_2'] === "cp" ? "" : "style='display:none;'") . ">\n";
        foreach (fusion_get_enabled_languages() as $lang) {
            $callback_value = $settings['ubanner_col_2'] === "cp" && !empty($ubanner_col_2_data['options'][$lang]) ? $ubanner_col_2_data['options'][$lang] : "";
            echo form_select("cp2-" . $lang, sprintf($locale['debonair_0313'], $lang), $callback_value, array("options" => isset($cpOpts[$lang]) ? $cpOpts[$lang] : array()));
        }
        echo "</div>\n";
    }
    echo "</div><div class='col-xs-12 col-sm-4'>\n";
    // 3rd
    echo form_select("ubanner_col_3", $locale['debonair_0309'], $settings['ubanner_col_3'], array("options" => $templateOpts, "inline" => false));
    if (!empty($articleOpts)) {
        echo "<div id='ubanner_col_3-articles-choices' class='choices3' " . ($settings['ubanner_col_3'] == "articles" ? "" : "style='display:none;'") . ">\n";
        foreach (fusion_get_enabled_languages() as $lang) {
            $callback_value = $settings['ubanner_col_3'] === "articles" && !empty($ubanner_col_3_data['options'][$lang]) ? $ubanner_col_3_data['options'][$lang] : "";
            echo form_select("articles3-" . $lang, sprintf($locale['debonair_0310'], $lang), $callback_value, array("options" => isset($articleOpts[$lang]) ? $articleOpts[$lang] : array()));
        }
        echo "</div>\n";
    }
    if (!empty($newsOpts)) {
        echo "<div id='ubanner_col_3-news-choices' class='choices3' " . ($settings['ubanner_col_3'] === "news" ? "" : "style='display:none;'") . ">\n";
        foreach (fusion_get_enabled_languages() as $lang) {
            $callback_value = $settings['ubanner_col_3'] === "news" && !empty($ubanner_col_3_data['options'][$lang]) ? $ubanner_col_3_data['options'][$lang] : "";
            echo form_select("news3-" . $lang, sprintf($locale['debonair_0311'], $lang), $callback_value, array("options" => isset($newsOpts[$lang]) ? $newsOpts[$lang] : array()));
        }
        echo "</div>\n";
    }
    if (!empty($blogOpts)) {
        echo "<div id='ubanner_col_3-blog-choices' class='choices3' " . ($settings['ubanner_col_3'] === "blog" ? "" : "style='display:none;'") . ">\n";
        foreach (fusion_get_enabled_languages() as $lang) {
            $callback_value = $settings['ubanner_col_3'] === "blog" && !empty($ubanner_col_3_data['options'][$lang]) ? $ubanner_col_3_data['options'][$lang] : "";
            echo form_select("blog3-" . $lang, sprintf($locale['debonair_0312'], $lang), $callback_value, array("options" => isset($blogOpts[$lang]) ? $blogOpts[$lang] : array()));
        }
        echo "</div>\n";
    }
    if (!empty($cpOpts)) {
        echo "<div id='ubanner_col_3-cp-choices' class='choices3' " . ($settings['ubanner_col_3'] === "cp" ? "" : "style='display:none;'") . ">\n";
        foreach (fusion_get_enabled_languages() as $lang) {
            $callback_value = $settings['ubanner_col_3'] === "cp" && !empty($ubanner_col_3_data['options'][$lang]) ? $ubanner_col_3_data['options'][$lang] : "";
            echo form_select("cp3-" . $lang, sprintf($locale['debonair_0313'], $lang), $callback_value, array("options" => isset($cpOpts[$lang]) ? $cpOpts[$lang] : array()));
        }
        echo "</div>\n";
    }
    echo "</div>\n</div>\n";
    echo $locale['debonair_0315'];
    closeside();
    openside("");
    echo form_select("lbanner_col_1", $locale['debonair_0317'], $settings['lbanner_col_1'], array("options" => $include_list, "inline" => true));
    echo form_select("lbanner_col_2", $locale['debonair_0318'], $settings['lbanner_col_2'], array("options" => $include_list, "inline" => true));
    echo form_select("lbanner_col_3", $locale['debonair_0319'], $settings['lbanner_col_3'], array("options" => $include_list, "inline" => true));
    echo form_select("lbanner_col_4", $locale['debonair_0320'], $settings['lbanner_col_4'], array("options" => $include_list, "inline" => true));
    echo $locale['debonair_0316'];
    closeside();
    echo form_button("save_settings", $locale['save_changes'], "save", array("class" => "btn-success"));
    echo closeform();
    // Now use Jquery to chain the selectors - add_to_jquery combines, include into a single min. document ready script
    add_to_jquery("\n\tfunction switchSelection(selector, value) {\n\t\t\$('.choices'+selector).hide();\n\t\tif (value == '0') {\n\t\t\t\$('.choices'+selector).hide();\n\t\t} else {\n\t\t\t\$('#ubanner_col_'+selector+'-'+value+'-choices').show();\n\t\t}\n\t}\n\t\$('#ubanner_col_1').bind('change', function() { switchSelection(1, \$(this).val()); });\n\t\$('#ubanner_col_2').bind('change', function() { switchSelection(2, \$(this).val()); });\n\t\$('#ubanner_col_3').bind('change', function() { switchSelection(3, \$(this).val()); });\n\t");
}
Exemplo n.º 20
0
                dbquery("DELETE FROM " . DB_MESSAGES . " WHERE message_to='" . $data['user_id'] . "' OR message_from='" . $data['user_id'] . "'");
                if (db_exists(DB_NEWS)) {
                    dbquery("DELETE FROM " . DB_NEWS . " WHERE news_name='" . $data['user_id'] . "'");
                }
                if (db_exists(DB_POLL_VOTES)) {
                    dbquery("DELETE FROM " . DB_POLL_VOTES . " WHERE vote_user='******'user_id'] . "'");
                }
                dbquery("DELETE FROM " . DB_RATINGS . " WHERE rating_user='******'user_id'] . "'");
                dbquery("DELETE FROM " . DB_SUSPENDS . " WHERE suspended_user='******'user_id'] . "'");
                if (db_exists(DB_FORUM_THREADS)) {
                    dbquery("DELETE FROM " . DB_FORUM_THREADS . " WHERE thread_author='" . $data['user_id'] . "'");
                }
                if (db_exists(DB_FORUM_POSTS)) {
                    dbquery("DELETE FROM " . DB_FORUM_POSTS . " WHERE post_author='" . $data['user_id'] . "'");
                }
                if (db_exists(DB_FORUM_THREAD_NOTIFY)) {
                    dbquery("DELETE FROM " . DB_FORUM_THREAD_NOTIFY . " WHERE notify_user='******'user_id'] . "'");
                }
            }
        }
        if ($usr_deactivate > 10) {
            $new_time = fusion_get_settings("cronjob_day");
        }
    }
    dbquery("UPDATE " . DB_SETTINGS . " SET settings_value='" . $new_time . "' WHERE settings_name='cronjob_day'");
}
// Error handling
$footerError = iADMIN && checkrights("ERRO") && count($_errorHandler) > 0 && !defined('no_debugger') ? "<button title='" . $locale['err_102'] . "' id='turbo_debugger' class='btn btn-sm btn-default m-r-10'><i class='fa fa-bug fa-lg'></i></button><strong>\n\t    " . str_replace(array("[ERROR_LOG_URL]", "[/ERROR_LOG_URL]"), array("<a href='" . ADMIN . "errors.php" . $aidlink . "'>", "</a>"), $locale['err_101']) . "\n\t    </strong><span class='badge'>" . count($_errorHandler) . "</span>\n\n\t\t" . fusion_console() . "" : '';
if (!isset($fusion_jquery_tags)) {
    $fusion_jquery_tags = '';
}
Exemplo n.º 21
0
if (db_exists(DB_WEBLINKS)) {
    $weblinks['weblink'] = dbcount("('weblink_id')", DB_WEBLINKS);
    $weblinks['comment'] = dbcount("('comment_id')", DB_COMMENTS, "comment_type='L'");
    $weblinks['submit'] = dbcount("(submit_id)", DB_SUBMISSIONS, "submit_type='l'");
}
if (db_exists(DB_NEWS)) {
    $news['news'] = dbcount("('news_id')", DB_NEWS);
    $news['comment'] = dbcount("('comment_id')", DB_COMMENTS, "comment_type='n'");
    $news['submit'] = dbcount("(submit_id)", DB_SUBMISSIONS, "submit_type='n'");
}
if (db_exists(DB_BLOG)) {
    $blog['blog'] = dbcount("('blog_id')", DB_BLOG);
    $blog['comment'] = dbcount("('comment_id')", DB_COMMENTS, "comment_type='b'");
    $blog['submit'] = dbcount("(submit_id)", DB_SUBMISSIONS, "submit_type='b'");
}
if (db_exists(DB_PHOTOS)) {
    $photos['photo'] = dbcount("('photo_id')", DB_PHOTOS);
    $photos['comment'] = dbcount("('comment_id')", DB_COMMENTS, "comment_type='P'");
    $photos['submit'] = dbcount("(submit_id)", DB_SUBMISSIONS, "submit_type='p'");
}
$comments_type = array('N' => $locale['269'], 'D' => $locale['268'], 'P' => $locale['272'], 'A' => $locale['270'], 'B' => $locale['269b'], 'C' => $locale['272a'], 'PH' => $locale['261'], 'UP' => $locale['UP']);
$submit_type = array('n' => $locale['269'], 'd' => $locale['268'], 'p' => $locale['272'], 'a' => $locale['270'], 'l' => $locale['271'], 'b' => $locale['269b']);
$link_type = array('N' => fusion_get_settings("siteurl") . "infusions/news/news.php?readmore=%s", 'D' => fusion_get_settings("siteurl") . "infusions/downloads/downloads.php?download_id=%s", 'P' => fusion_get_settings("siteurl") . "infusions/gallery/gallery.php?photo_id=%s", 'A' => fusion_get_settings("siteurl") . "infusions/articles/articles.php?article_id=%s", 'B' => fusion_get_settings("siteurl") . "infusions/blog/blog.php?readmore=%s", 'C' => fusion_get_settings("siteurl") . "viewpage.php?page_id=%s", 'PH' => fusion_get_settings("siteurl") . "infusions/gallery/gallery.php?photo_id=%s", 'UP' => fusion_get_settings("siteurl") . "profile.php?lookup=%s");
// Infusions count
$infusions_count = dbcount("(inf_id)", DB_INFUSIONS);
$global_infusions = array();
if ($infusions_count > 0) {
    $inf_result = dbquery("SELECT * FROM " . DB_INFUSIONS . " ORDER BY inf_id ASC");
    while ($_inf = dbarray($inf_result)) {
        $global_infusions[$_inf['inf_id']] = $_inf;
    }
Exemplo n.º 22
0
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: gallery.php
| Author: PHP-Fusion Development Team
| Co-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).
+--------------------------------------------------------*/
require_once file_exists('maincore.php') ? 'maincore.php' : __DIR__ . "/../../maincore.php";
if (!db_exists(DB_PHOTO_ALBUMS)) {
    redirect(BASEDIR . "error.php?code=404");
}
require_once THEMES . "templates/header.php";
if (file_exists(INFUSIONS . "gallery/locale/" . LOCALESET . "gallery.php")) {
    include INFUSIONS . "gallery/locale/" . LOCALESET . "gallery.php";
} else {
    include INFUSIONS . "gallery/locale/English/gallery.php";
}
include INFUSIONS . "gallery/templates/gallery.php";
require_once INCLUDES . "infusions_include.php";
$gallery_settings = get_settings("gallery");
if (!defined('SAFEMODE')) {
    define("SAFEMODE", @ini_get("safe_mode") ? TRUE : FALSE);
}
/* View Photo */
Exemplo n.º 23
0
| 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).
+--------------------------------------------------------*/
require_once dirname(__FILE__) . "../../../../maincore.php";
header('Content-Type: application/rss+xml; charset=' . $locale['charset'] . '');
if (file_exists(INFUSIONS . "rss_feeds_panel/locale/" . LANGUAGE . ".php")) {
    include INFUSIONS . "rss_feeds_panel/locale/" . LANGUAGE . ".php";
} else {
    include INFUSIONS . "rss_feeds_panel/locale/English.php";
}
if (db_exists(DB_BLOG)) {
    $result = dbquery("\n\tSELECT * FROM " . DB_BLOG . "\n\tWHERE " . groupaccess('blog_visibility') . (multilang_table("BL") ? " AND blog_language='" . LANGUAGE . "'" : "") . "\n\tORDER BY blog_datestamp DESC LIMIT 0,10");
    $rssimage = $settings['siteurl'] . $settings['sitebanner'];
    echo "<?xml version=\"1.0\" encoding=\"" . $locale['charset'] . "\"?>\n\n";
    echo "<rss version=\"2.0\">\n\n\t\t<image>\n\t\t<url>{$rssimage}</url>\n\t\t</image>\n\t\t<channel>\n";
    if (dbrows($result) != 0) {
        echo "<title>" . $settings['sitename'] . $locale['rss000'] . (multilang_table("NS") ? " " . $locale['rss007'] . " " . LANGUAGE : "") . "</title>\n";
        echo "<link>" . $settings['siteurl'] . "</link>\n<description>" . $settings['description'] . "</description>\n";
        while ($row = dbarray($result)) {
            $rsid = intval($row['blog_id']);
            $rtitle = $row['blog_subject'];
            $description = stripslashes(nl2br($row['blog_blog']));
            $description = strip_tags($description, "<a><p><br /><br /><hr />");
            echo "<item>\n";
            echo "<title>" . htmlspecialchars($rtitle) . "</title>\n";
            echo "<link>" . $settings['siteurl'] . "infusions/blog/blog.php?readmore=" . $rsid . "</link>\n";
Exemplo n.º 24
0
 /**
  * Fetch and cache all off the imagepaths
  */
 private static function cache()
 {
     if (self::$cached) {
         return;
     }
     self::$cached = TRUE;
     //<editor-fold desc="imagePaths">
     // You need to + sign it, so setImage will work.
     self::$imagePaths += array("arrow" => IMAGES . "arrow.png", "attach" => FORUM . "images/attach.png", "blank" => THEME . "images/blank.gif", "calendar" => IMAGES . "dl_calendar.png", "down" => THEME . "images/down.gif", "download" => IMAGES . "dl_download.png", "downloads" => IMAGES . "dl_downloads1.png", "edit" => IMAGES . "edit.png", "folder" => THEME . "forum/folder.gif", "folderlock" => THEME . "forum/folderlock.gif", "foldernew" => THEME . "forum/foldernew.gif", "forum_edit" => THEME . "forum/edit.gif", "go_first" => IMAGES . "go_first.png", "go_last" => IMAGES . "go_last.png", "go_next" => IMAGES . "go_next.png", "go_previous" => IMAGES . "go_previous.png", "homepage" => IMAGES . "dl_homepage.png", "hot" => FORUM . "images/hot.png", "info" => IMAGES . "dl_info.png", "imagenotfound" => IMAGES . "imagenotfound.jpg", "image_attach" => FORUM . "images/image_attach.png", "left" => THEME . "images/left.gif", "lastpost" => FORUM . "images/lastpost.png", "lastpostnew" => FORUM . "images/lastpostnew.png", "newthread" => THEME . "forum/newthread.gif", "no" => IMAGES . "no.png", "noavatar50" => "noavatar50.png", "noavatar100" => "noavatar100.png", "noavatar150" => "noavatar150.png", "panel_on" => THEME . "images/panel_on.gif", "panel_off" => THEME . "images/panel_off.gif", "pm" => THEME . "forum/pm.gif", "poll_posticon" => FORUM . "images/poll_posticon.gif", "pollbar" => THEME . "images/pollbar.gif", "printer" => IMAGES . "printer.png", "quote" => THEME . "forum/quote.gif", "reply" => THEME . "forum/reply.gif", "right" => THEME . "images/right.gif", "save" => IMAGES . "php-save.png", "screenshot" => IMAGES . "dl_screenshot.png", "star" => IMAGES . "star.png", "statistics" => IMAGES . "dl_stats.png", "stickythread" => THEME . "forum/stickythread.gif", "tick" => IMAGES . "tick.png", "up" => THEME . "images/up.gif", "web" => THEME . "forum/web.gif", "yes" => IMAGES . "yes.png");
     //</editor-fold>
     $installedTables = array('blog' => db_exists('blog'), 'news' => db_exists('news'));
     $selects = array("SELECT admin_image as image, admin_rights as name, 'ac_' as prefix FROM " . DB_ADMIN);
     if ($installedTables['blog']) {
         $selects[] = "SELECT blog_cat_image as image, blog_cat_name as name, 'bl_' as prefix FROM " . DB_BLOG_CATS . " " . (multilang_table("BL") ? " where blog_cat_language='" . LANGUAGE . "'" : "");
     }
     if ($installedTables['news']) {
         $selects[] = "SELECT news_cat_image as image, news_cat_name as name, 'nc_' as prefix FROM " . DB_NEWS_CATS . " " . (multilang_table("NS") ? " where news_cat_language='" . LANGUAGE . "'" : "");
     }
     //smiley
     foreach (cache_smileys() as $smiley) {
         // set image
         if (empty(self::$imagePaths["smiley_" . $smiley['smiley_text']])) {
             self::$imagePaths["smiley_" . $smiley['smiley_text']] = IMAGES . "smiley/" . $smiley['smiley_image'];
         }
     }
     $union = implode(' union ', $selects);
     $result = dbquery($union);
     while ($data = dbarray($result)) {
         $image = "";
         switch ($data['prefix']) {
             case 'ac_':
                 $image = file_exists(ADMIN . "images/" . $data['image']) ? ADMIN . "images/" . $data['image'] : (file_exists(INFUSIONS . $data['image']) ? INFUSIONS . $data['image'] : ADMIN . "images/infusion_panel.png");
                 break;
             case 'nc_':
             default:
                 $image = file_exists(IMAGES_NC . $data['image']) ? IMAGES_NC . $data['image'] : IMAGES . "imagenotfound.jpg";
                 break;
             case 'bl_':
                 $image = file_exists(IMAGES_BC . $data['image']) ? IMAGES_BC . $data['image'] : IMAGES . "imagenotfound.jpg";
                 break;
         }
         // Set image
         if (empty(self::$imagePaths[$data['prefix'] . $data['name']])) {
             self::$imagePaths[$data['prefix'] . $data['name']] = $image;
         }
     }
 }
Exemplo n.º 25
0
| Copyright (C) PHP-Fusion Inc
| https://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: faq/faq.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).
+--------------------------------------------------------*/
require_once file_exists('maincore.php') ? 'maincore.php' : __DIR__ . "/../../maincore.php";
if (!db_exists(DB_FAQS)) {
    redirect(BASEDIR . "error.php?code=404");
}
require_once THEMES . "templates/header.php";
if (file_exists(INFUSIONS . "faq/locale/" . LOCALESET . "faq.php")) {
    include INFUSIONS . "faq/locale/" . LOCALESET . "faq.php";
} else {
    include INFUSIONS . "faq/locale/English/faq.php";
}
include "templates/faq.php";
add_to_title($locale['global_200'] . \PHPFusion\SiteLinks::get_current_SiteLinks("", "link_name"));
if (isset($_GET['cat_id']) && isnum($_GET['cat_id'])) {
    $result = dbquery("SELECT *\tFROM " . DB_FAQ_CATS . " " . (multilang_table("FQ") ? "WHERE faq_cat_language='" . LANGUAGE . "' AND" : "WHERE") . " faq_cat_id='" . intval($_GET['cat_id']) . "'");
    if (dbrows($result) > 0) {
        $data = dbarray($result);
        add_to_title($locale['global_201'] . $data['faq_cat_name']);
Exemplo n.º 26
0
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: articles.php
| Author: PHP-Fusion Development Team
| Co-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).
+--------------------------------------------------------*/
require_once file_exists('maincore.php') ? 'maincore.php' : __DIR__ . "/../../maincore.php";
if (!db_exists(DB_ARTICLES)) {
    redirect(BASEDIR . "error.php?code=404");
}
require_once THEMES . "templates/header.php";
require_once INCLUDES . "infusions_include.php";
if (file_exists(INFUSIONS . "articles/locale/" . LOCALESET . "articles.php")) {
    include INFUSIONS . "articles/locale/" . LOCALESET . "articles.php";
} else {
    include INFUSIONS . "articles/locale/English/articles.php";
}
include INFUSIONS . "articles/templates/articles.php";
$info = array();
$locale = fusion_get_locale();
add_to_title($locale['global_200'] . \PHPFusion\SiteLinks::get_current_SiteLinks("", "link_name"));
add_breadcrumb(array('link' => INFUSIONS . 'articles/articles.php', 'title' => \PHPFusion\SiteLinks::get_current_SiteLinks("", "link_name")));
$article_settings = get_settings("article");
Exemplo n.º 27
0
| 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).
+--------------------------------------------------------*/
require_once dirname(__FILE__) . "../../../../maincore.php";
header('Content-Type: application/rss+xml; charset=' . $locale['charset'] . '');
if (file_exists(INFUSIONS . "rss_feeds_panel/locale/" . LANGUAGE . ".php")) {
    include INFUSIONS . "rss_feeds_panel/locale/" . LANGUAGE . ".php";
} else {
    include INFUSIONS . "rss_feeds_panel/locale/English.php";
}
if (db_exists(DB_NEWS)) {
    $result = dbquery("SELECT * FROM " . DB_NEWS . " WHERE " . groupaccess('news_visibility') . (multilang_table("NS") ? " AND news_language='" . LANGUAGE . "'" : "") . "\tORDER BY news_datestamp DESC LIMIT 0,10");
    $rssimage = $settings['siteurl'] . $settings['sitebanner'];
    echo "<?xml version=\"1.0\" encoding=\"" . $locale['charset'] . "\"?>\n\n";
    echo "<rss version=\"2.0\">\n\n\t<image>\n <url>{$rssimage}</url>\n </image>\n\t<channel>\n";
    if (dbrows($result) != 0) {
        echo "<title>" . $settings['sitename'] . $locale['rss004'] . (multilang_table("NS") ? " " . $locale['rss007'] . " " . LANGUAGE : "") . "</title>\n";
        echo "<link>" . $settings['siteurl'] . "</link>\n \r\n\t  <description>" . $settings['description'] . "</description>\n";
        while ($row = dbarray($result)) {
            $rsid = intval($row['news_id']);
            $rtitle = $row['news_subject'];
            $description = stripslashes(nl2br($row['news_news']));
            $description = strip_tags($description, "<a><p><br /><br /><hr />");
            echo "<item>\n";
            echo "<title>" . htmlspecialchars($rtitle) . "</title>\n";
            echo "<link>" . $settings['siteurl'] . "infusions/news/news.php?readmore=" . $rsid . "</link>\n";
Exemplo n.º 28
0
+--------------------------------------------------------+
| Filename: search_faqs_include.php
| Author: Robert Gaudyn (Wooya)
+--------------------------------------------------------+
| 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");
}
if (db_exists(DB_FAQS)) {
    include LOCALE . LOCALESET . "search/faqs.php";
    if ($_GET['stype'] == "faqs" || $_GET['stype'] == "all") {
        $sortby = "faq_id";
        $ssubject = search_querylike("faq_question");
        $smessage = search_querylike("faq_answer");
        if ($_POST['fields'] == 0) {
            $fieldsvar = search_fieldsvar($ssubject);
        } else {
            if ($_POST['fields'] == 1) {
                $fieldsvar = search_fieldsvar($smessage);
            } else {
                if ($_POST['fields'] == 2) {
                    $fieldsvar = search_fieldsvar($ssubject, $smessage);
                } else {
                    $fieldsvar = "";
Exemplo n.º 29
0
+--------------------------------------------------------*/
require_once "maincore.php";
require_once THEMES . "templates/header.php";
require_once THEMES . "templates/global/home.php";
require_once INCLUDES . "infusions_include.php";
include LOCALE . LOCALESET . "homepage.php";
add_to_title($locale['home']);
add_breadcrumb(array("title" => $locale['home'], "link" => BASEDIR . "home.php"));
$configs = array();
$configs[DB_NEWS] = array('select' => "SELECT\n\tns.news_id as id, ns.news_subject as title, ns.news_news as content,\n\tns.news_datestamp as datestamp, us.user_id, us.user_name,\n\tus.user_status, nc.news_cat_id as cat_id, nc.news_cat_name as cat_name,\n\tns.news_image as image,\n\tnc.news_cat_image as cat_image,\n\tcount(c1.comment_id) as comment_count,\n\tcount(r1.rating_id) as rating_count\n\tFROM " . DB_NEWS . " as ns\n\tLEFT JOIN " . DB_NEWS_CATS . " as nc ON nc.news_cat_id = ns.news_cat\n\tLEFT JOIN " . DB_COMMENTS . " as c1 on (c1.comment_item_id = ns.news_id and c1.comment_type = 'NS')\n\tLEFT JOIN " . DB_RATINGS . " as r1 on (r1.rating_item_id = ns.news_id AND r1.rating_type = 'NS')\n\tINNER JOIN " . DB_USERS . " as us ON ns.news_name = us.user_id\n\tWHERE (" . time() . " > ns.news_start OR ns.news_start = 0)\n\tAND (" . time() . " < ns.news_end OR ns.news_end = 0)\n\tAND " . groupaccess('ns.news_visibility') . " " . (multilang_table("NS") ? "AND news_language='" . LANGUAGE . "'" : "") . "\n\tgroup by ns.news_id\n\tORDER BY ns.news_datestamp DESC LIMIT 3", 'locale' => array('norecord' => $locale['home_0050'], 'blockTitle' => $locale['home_0000']), 'infSettings' => get_settings("news"), 'categoryLinkPattern' => INFUSIONS . "news/news.php?cat_id={cat_id}", 'contentLinkPattern' => INFUSIONS . "news/news.php?readmore={id}");
$configs[DB_ARTICLES] = array('select' => "SELECT\n\tar.article_id as id, ar.article_subject as title, ar.article_snippet as content,\n\tar.article_datestamp as datestamp, ac.article_cat_id as cat_id, ac.article_cat_name as cat_name,\n\tus.user_id, us.user_name, us.user_status\n\tFROM " . DB_ARTICLES . " as ar\n\tINNER JOIN " . DB_ARTICLE_CATS . " as ac ON ac.article_cat_id = ar.article_cat\n\tINNER JOIN " . DB_USERS . " as us ON us.user_id = ar.article_name\n\tWHERE " . groupaccess('ar.article_visibility') . " " . (multilang_table("AR") ? "AND ac.article_cat_language='" . LANGUAGE . "'" : "") . "\n\tORDER BY ar.article_datestamp DESC LIMIT 3", 'locale' => array('norecord' => $locale['home_0051'], 'blockTitle' => $locale['home_0001']), 'infSettings' => get_settings("article"), 'categoryLinkPattern' => INFUSIONS . "articles/articles.php?cat_id={cat_id}", 'contentLinkPattern' => INFUSIONS . "articles/articles.php?article_id={id}");
$configs[DB_BLOG] = array('select' => "SELECT\n\tbl.blog_id as id, bl.blog_subject as title, bl.blog_blog as content,\n\tbl.blog_datestamp as datestamp, us.user_id, us.user_name,\n\tus.user_status, bc.blog_cat_id as cat_id, bc.blog_cat_name as cat_name,\n\tbl.blog_image as image,\n\tbc.blog_cat_image as cat_image,\n\tcount(c1.comment_id) as comment_count,\n\tcount(r1.rating_id) as rating_count\n\tFROM " . DB_BLOG . " as bl\n\tLEFT JOIN " . DB_BLOG_CATS . " as bc ON bc.blog_cat_id = bl.blog_cat\n\tLEFT JOIN " . DB_COMMENTS . " as c1 on (c1.comment_item_id = bl.blog_id and c1.comment_type = 'BL')\n\tLEFT JOIN " . DB_RATINGS . " as r1 on (r1.rating_item_id = bl.blog_id AND r1.rating_type = 'BL')\n\tINNER JOIN " . DB_USERS . " as us ON bl.blog_name = us.user_id\n\tWHERE (" . time() . " > bl.blog_start OR bl.blog_start = 0)\n\tAND (" . time() . " < bl.blog_end OR bl.blog_end = 0)\n\tAND " . groupaccess('bl.blog_visibility') . " " . (multilang_table("BL") ? "AND blog_language='" . LANGUAGE . "'" : "") . "\n\tgroup by bl.blog_id\n\tORDER BY bl.blog_datestamp DESC LIMIT 3", 'locale' => array('norecord' => $locale['home_0052'], 'blockTitle' => $locale['home_0002']), 'infSettings' => get_settings("blog"), 'categoryLinkPattern' => INFUSIONS . "blog/blog.php?cat_id={cat_id}", 'contentLinkPattern' => INFUSIONS . "blog/blog.php?readmore={id}");
$configs[DB_DOWNLOADS] = array('select' => "SELECT\n\tdl.download_id as id, dl.download_title as title, dl.download_description_short as content,\n\tdl.download_datestamp as datestamp, dc.download_cat_id as cat_id, dc.download_cat_name as cat_name,\n\tus.user_id, us.user_name, us.user_status,\n\tdl.download_image as image,\n\tcount(c1.comment_id) as comment_count,\n\tcount(r1.rating_id) as rating_count\n\tFROM " . DB_DOWNLOADS . " dl\n\tINNER JOIN " . DB_DOWNLOAD_CATS . " dc ON dc.download_cat_id = dl.download_cat\n\tINNER JOIN " . DB_USERS . " us ON us.user_id = dl.download_user\n\tLEFT JOIN " . DB_COMMENTS . " as c1 on (c1.comment_item_id = dl.download_id and c1.comment_type = 'D')\n\tLEFT JOIN " . DB_RATINGS . " as r1 on (r1.rating_item_id = dl.download_id AND r1.rating_type = 'D')\n\tWHERE " . groupaccess('dl.download_visibility') . " " . (multilang_table("DL") ? "AND dc.download_cat_language='" . LANGUAGE . "'" : "") . "\n\tgroup by dl.download_id\n\tORDER BY dl.download_datestamp DESC LIMIT 3", 'locale' => array('norecord' => $locale['home_0053'], 'blockTitle' => $locale['home_0003']), 'infSettings' => get_settings("downloads"), 'categoryLinkPattern' => DOWNLOADS . "downloads.php?cat_id={cat_id}", 'contentLinkPattern' => DOWNLOADS . "downloads.php?cat_id={cat_id}&download_id={id}");
$contents = array();
foreach ($configs as $table => $config) {
    if (!db_exists($table)) {
        continue;
    }
    $contents[$table] = array('data' => array(), 'colwidth' => 0, 'norecord' => $config['locale']['norecord'], 'blockTitle' => $config['locale']['blockTitle'], 'infSettings' => $config['infSettings']);
    $result = dbquery($config['select']);
    $items_count = dbrows($result);
    if (!$items_count) {
        continue;
    }
    $contents[$table]['colwidth'] = floor(12 / $items_count);
    $data = array();
    $count = 1;
    while ($row = dbarray($result)) {
        $keys = array_keys($row);
        foreach ($keys as $i => $key) {
            $keys[$i] = '{' . $key . '}';
Exemplo n.º 30
0
| 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).
+--------------------------------------------------------*/
require_once "../maincore.php";
pageAccess('S1');
require_once THEMES . "templates/admin_header.php";
require_once LOCALE . LOCALESET . "admin/theme.php";
$theme_admin = new \PHPFusion\Atom\Admin();
/**
 * Auto Upgrade Script -- remove after beta period
 */
if (!db_exists(DB_SETTINGS_THEME)) {
    $result = dbquery("CREATE TABLE " . DB_SETTINGS_THEME . "\r\n\t\t(settings_name VARCHAR(200) NOT NULL DEFAULT '',\r\n\t\tsettings_value TEXT NOT NULL,\r\n\t\tsettings_theme VARCHAR(200) NOT NULL DEFAULT '',\r\n\t\tPRIMARY KEY (settings_name)\r\n\t\t) ENGINE=MYISAM DEFAULT CHARSET=UTF8 COLLATE=utf8_unicode_ci\r\n\t");
    addNotice('success', "Theme Engine has been upgraded");
}
opentable($locale['theme_1000']);
switch ($_GET['action']) {
    case "manage":
        if (isset($_GET['theme'])) {
            echo "<div class='m-t-20'>\n";
            $theme_admin::display_theme_editor($_GET['theme']);
            echo "</div>\n";
        }
        break;
    default:
        $tab_title['title'] = array($locale['theme_1010'], $locale['theme_1011']);
        $tab_title['id'] = array("list", "upload");