本文整理汇总了PHP中db_exists函数的典型用法代码示例。如果您正苦于以下问题:PHP db_exists函数的具体用法?PHP db_exists怎么用?PHP db_exists使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了db_exists函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: build_table
/**
* 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;
}
示例2: author
| 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";
示例3: db_purge
/**
* 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');
}
示例4: Copyright
| 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) {
示例5: render_dashboard
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 . "&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 . "&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 . "&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";
//.........这里部分代码省略.........
示例6: Copyright
| 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']);
示例7: author
| 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";
示例8: user_pm_settings
$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 . "&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";
示例9: display_Showcase
/**
* 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
}
示例10: Copyright
<?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";
示例11: GD
}
$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;
示例12: user_posts_migrate_console
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'> </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();
}
示例13: author
| 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'] . "&thread_id=" . $rsid . "</link>\n";
echo "<description>" . htmlspecialchars($description) . "</description>\n";
示例14: create_table
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;
}
}
示例15: render_page
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);
//.........这里部分代码省略.........