本文整理汇总了PHP中is_active函数的典型用法代码示例。如果您正苦于以下问题:PHP is_active函数的具体用法?PHP is_active怎么用?PHP is_active使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了is_active函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: themeheader
function themeheader()
{
global $slogan, $sitename, $banners, $mainindex, $adminindex, $cpgtpl, $db, $prefix, $site_logo, $MAIN_CFG, $CPG_SESS, $Blocks;
if ($MAIN_CFG['global']['admingraphic'] & 4) {
include 'includes/cssmainmenu.php';
}
$imgr = $imgl = '';
// left blocks ?
if ($Blocks->l && $Blocks->showblocks & 1) {
$img = $Blocks->hideblock('600') ? 'plus.gif' : 'minus.gif';
$imgl = '<img alt="' . _TOGGLE . '" title="' . _TOGGLE . '" id="pic600" src="themes/' . $CPG_SESS['theme'] . '/images/' . $img . '" onclick="blockswitch(\'600\');" style="cursor:pointer; float:left; padding-top:3px;" />';
}
// right blocks ?
if ($Blocks->r && $Blocks->showblocks & 2) {
$img = $Blocks->hideblock('601') ? 'plus.gif' : 'minus.gif';
$imgr = '<img alt="' . _TOGGLE . '" title="' . _TOGGLE . '" id="pic601" src="themes/' . $CPG_SESS['theme'] . '/images/' . $img . '" onclick="blockswitch(\'601\');" style="cursor:pointer; float:right; padding-top:3px;" />';
}
$result = $db->sql_uquery("SELECT topicid, topictext FROM " . $prefix . "_topics ORDER BY topictext");
while ($row = $db->sql_fetchrow($result, SQL_NUM)) {
$toplist[$row[0]] = $row[1];
}
$user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';
$css_ie = ereg('MSIE 7.0', $user_agent) ? 'ie7' : (ereg('MSIE ([0-6].[0-9]{1,2})', $user_agent) ? 'ie6' : (isset($_SESSION['SECURITY']['UA']) && $_SESSION['SECURITY']['UA'] == 'Safari' ? 'safari' : (isset($_SESSION['SECURITY']['UA']) && $_SESSION['SECURITY']['UA'] == 'Opera' ? 'opera' : '')));
$cpgtpl->assign_vars(array('CSS_IE' => $css_ie ? '<link rel="stylesheet" type="text/css" href="themes/' . $CPG_SESS['theme'] . '/style/' . $css_ie . '.css" />' : '', 'PUBLIC_HEADER' => !defined('ADMIN_PAGES'), 'B_L_VISIBLE' => $Blocks->hideblock('600') ? 'style="display: none"' : '', 'BLOG_ENABLED' => is_active('Blogs'), 'G_LEFTIMAGE' => $imgl, 'G_RIGHTIMAGE' => $imgr, 'S_TOGGLE' => _TOGGLE, 'S_SEARCH' => _SEARCH, 'S_IS_ADMIN' => is_admin(), 'S_CAN_ADMIN' => can_admin(), 'S_IS_USER' => is_user(), 'S_LOGO' => $site_logo, 'S_SITENAME' => $sitename, 'S_WELCOME' => _WELCOMETO, 'S_HOME' => _HOME, 'S_BLOG' => _BlogsLANG, 'S_DOWNLOADS' => _DownloadsLANG, 'S_GALLERY' => _coppermineLANG, 'S_FORUMS' => _ForumsLANG, 'S_MY_ACCOUNT' => _Your_AccountLANG, 'S_NEWS' => _NewsLANG, 'S_ADMIN' => _ADMINISTRATION, 'S_BANNER' => $banners ? viewbanner() : '', 'U_MAININDEX' => $mainindex, 'U_NEWS' => getlink('News'), 'U_SEARCH' => getlink('Search'), 'U_DOWNLOADS' => getlink('Downloads'), 'U_FORUMS' => getlink('Forums'), 'U_GALLERY' => getlink('coppermine'), 'U_BLOG' => getlink('Blogs'), 'U_MY_ACCOUNT' => getlink('Your_Account'), 'U_ADMININDEX' => $adminindex, 'S_MAIN_MENU' => isset($mmcontent) ? $mmcontent : false));
$Blocks->display('l');
}
示例2: is_active_calls_is_active_method
/** @test */
public function is_active_calls_is_active_method()
{
$activeMock = Mockery::mock(Active::class);
$activeMock->shouldReceive('isActive')->once()->with(['foo'])->andReturn('bar');
App::shouldReceive('make')->once()->with('active')->andReturn($activeMock);
$result = is_active('foo');
$this->assertEquals('bar', $result);
}
示例3: get_config_func
function get_config_func()
{
global $mobiquo_config, $config;
$config_list = array('is_open' => new xmlrpcval($mobiquo_config['is_open'] && is_active('Forums') ? true : false, 'boolean'), 'guest_okay' => new xmlrpcval($mobiquo_config['guest_okay'] ? true : false, 'boolean'));
foreach ($mobiquo_config as $key => $value) {
if (!in_array($key, array('is_open', 'guest_okay', 'php_extension', 'keep_log', 'shorten_quote', 'hide_forum_id', 'check_dnsbl'))) {
$config_list[$key] = new xmlrpcval($value, 'string');
}
}
$response = new xmlrpcval($config_list, 'struct');
return new xmlrpcresp($response);
}
示例4: adminblock
function adminblock($bid, $title, &$data)
{
if (is_admin()) {
$waitlist = $content = $imgcontent = '';
if (empty($data)) {
$data = '';
}
global $prefix, $db, $MAIN_CFG, $waitlist;
if (!defined('ADMIN_PAGES') && $MAIN_CFG['global']['admingraphic'] & 1) {
global $CLASS;
require_once CORE_PATH . 'classes/cpg_adminmenu.php';
$imgcontent = $CLASS['adminmenu']->display('all', 'blockgfx') . '<hr />';
}
if (!empty($data)) {
$data = $imgcontent . $data . '<hr />';
}
$imgcontent = '';
// $title = _WAITINGCONT;
// Contributed by sengsara
if (!Cache::array_load('waitlist')) {
if ($waitdir = dir('admin/wait')) {
while ($waitfile = $waitdir->read()) {
if (preg_match('/^wait_(.*?)\\.php$/', $waitfile, $match)) {
$waitlist[$match[1]] = "admin/wait/{$waitfile}";
}
}
$waitdir->close();
}
// Dragonfly system
$waitdir = dir('modules');
while ($module = $waitdir->read()) {
if (!is_active($module)) {
continue;
}
if (false === strpos($module, '.') && $module != 'CVS' && file_exists("modules/{$module}/admin/adwait.inc")) {
$waitlist[$module] = "modules/{$module}/admin/adwait.inc";
}
}
$waitdir->close();
Cache::array_save('waitlist');
}
ksort($waitlist);
foreach ($waitlist as $module => $file) {
require $file;
}
$block = array('bid' => $bid, 'view' => 2, 'title' => $title, 'content' => $data . $content);
return $block;
}
return false;
}
示例5: nav
function nav($main_up = 0)
{
global $module_name, $articlecomm;
$handle = opendir('themes');
while ($file = readdir($handle)) {
if (!ereg("[.]", $file)) {
$thmcount++;
}
}
closedir($handle);
echo "<table border=\"0\" width=\"100%\" align=\"center\"><tr><td width=\"10%\">";
$menuimg = menuimg("info.gif");
echo "<font class=\"content\">" . "<center><a href=\"modules.php?name=Your_Account&op=edituser\"><img src=\"{$menuimg}\" border=\"0\" alt=\"" . _CHANGEYOURINFO . "\" title=\"" . _CHANGEYOURINFO . "\"></a><br>" . "<a href=\"modules.php?name=Your_Account&op=edituser\">" . _CHANGEYOURINFO . "</a>" . "</center></font></td>";
$menuimg = menuimg("home.gif");
echo "<td width=\"10%\"><font class=\"content\">" . "<center><a href=\"modules.php?name=Your_Account&op=edithome\"><img src=\"{$menuimg}\" border=\"0\" alt=\"" . _CHANGEHOME . "\" title=\"" . _CHANGEHOME . "\"></a><br>" . "<a href=\"modules.php?name=Your_Account&op=edithome\">" . _CHANGEHOME . "</a>" . "</center></form></font></td>";
if ($articlecomm == 1) {
$menuimg = menuimg("comments.gif");
echo "<td width=\"10%\"><font class=\"content\">" . "<center><a href=\"modules.php?name=Your_Account&op=editcomm\"><img src=\"{$menuimg}\" border=\"0\" alt=\"" . _CONFIGCOMMENTS . "\" title=\"" . _CONFIGCOMMENTS . "\"></a><br>" . "<a href=\"modules.php?name=Your_Account&op=editcomm\">" . _CONFIGCOMMENTS . "</a>" . "</center></form></font></td>";
}
if (is_active("WebMail")) {
$menuimg = menuimg("mail.gif");
echo "<td width=\"10%\"><font class=\"content\">" . "<center><a href=\"modules.php?name=WebMail\"><img src=\"{$menuimg}\" border=\"0\" alt=\"" . _WEBMAIL . "\" title=\"" . _WEBMAIL . "\"></a><br>" . "<a href=\"modules.php?name=WebMail\">" . _WEBMAIL . "</a>" . "</center></form></font></td>";
}
if (is_active("Private_Messages")) {
$menuimg = menuimg("messages.gif");
echo "<td width=\"10%\"><font class=\"content\">" . "<center><a href=\"modules.php?name=Private_Messages\"><img src=\"{$menuimg}\" border=\"0\" alt=\"" . _PRIVATEMESSAGES . "\" title=\"" . _PRIVATEMESSAGES . "\"></a><br>" . "<a href=\"modules.php?name=Private_Messages\">" . _MESSAGES . "</a>" . "</center></form></font></td>";
}
if (is_active("Journal")) {
$menuimg = menuimg("journal.gif");
echo "<td width=\"10%\"><font class=\"content\">" . "<center><a href=\"modules.php?name=Journal&file=edit\"><img src=\"{$menuimg}\" border=\"0\" alt=\"" . _JOURNAL . "\" title=\"" . _JOURNAL . "\"></a><br>" . "<a href=\"modules.php?name=Journal&file=edit\">" . _JOURNAL . "</a>" . "</center></form></font></td>";
}
//FIX:DOMSNITT
//if ($thmcount > 1) {
if ($thmcount > 1000) {
//END-OF-FIX
$menuimg = menuimg("themes.gif");
echo "<td width=\"10%\"><font class=\"content\">" . "<center><a href=\"modules.php?name=Your_Account&op=chgtheme\"><img src=\"{$menuimg}\" border=\"0\" alt=\"" . _SELECTTHETHEME . "\" title=\"" . _SELECTTHETHEME . "\"></a><br>" . "<a href=\"modules.php?name=Your_Account&op=chgtheme\">" . _SELECTTHETHEME . "</a>" . "</center></form></font></td>";
}
$menuimg = menuimg("exit.gif");
echo "<td width=\"10%\"><font class=\"content\">" . "<center><a href=\"modules.php?name=Your_Account&op=logout\"><img src=\"{$menuimg}\" border=\"0\" alt=\"" . _LOGOUTEXIT . "\" title=\"" . _LOGOUTEXIT . "\"></a><br>" . "<a href=\"modules.php?name=Your_Account&op=logout\">" . _LOGOUTEXIT . "</a>" . "</center></form></font>";
echo "</td></tr></table>";
if ($main_up != 1) {
echo "<br><center>[ <a href=\"modules.php?name=Your_Account\">" . _RETURNACCOUNT . "</a> ]</center>\n";
}
}
示例6: drawItem
function drawItem($item)
{
global $path, $session;
$out = "";
if (isset($item['session'])) {
if (isset($session[$item['session']]) && $session[$item['session']] == 1 || $item['session'] == 'all') {
$i = 0;
$subactive = false;
if (isset($item['dropdown']) && count($item['dropdown']) > 0) {
usort($item['dropdown'], "menu_sort");
$outdrop = "";
foreach ($item['dropdown'] as $dropdownitem) {
if (!isset($dropdownitem['session']) || isset($dropdownitem['session']) && $session[$dropdownitem['session']] == 1) {
$i++;
if (is_active($dropdownitem)) {
$subactive = true;
}
if (isset($dropdownitem['divider']) && $dropdownitem['divider']) {
$outdrop .= '<li class="divider"></li>';
}
// TODO: Remove dependency of index position on APPs module
$outdrop .= '<li class="' . (is_active($dropdownitem) ? ' active' : '') . '"><a href="' . $path . (isset($dropdownitem['path']) ? $dropdownitem['path'] : $dropdownitem['1']) . '">' . (isset($dropdownitem['name']) ? drawNameIcon($dropdownitem, true) : $dropdownitem['0']) . '</a></li>';
}
}
}
if ($i > 0) {
$out .= '<li class="dropdown' . ($subactive ? " active" : "") . (isset($item['class']) ? " " . $item['class'] : "") . '">';
$out .= '<a href="#" class="dropdown-toggle" data-toggle="dropdown">' . drawNameIcon($item, false) . '<b class="caret"></b></a>';
$out .= '<ul class="dropdown-menu scrollable-menu">';
$out .= $outdrop;
$out .= '</ul></li>';
} else {
if (isset($item['path']) && isset($item['name'])) {
$out .= "<li class='" . (is_active($item) ? "active" : "") . (isset($item['class']) ? " " . $item['class'] : "") . "'><a href=\"" . $path . $item['path'] . "\">" . drawNameIcon($item, false) . "</a></li>";
}
}
}
} else {
$out .= "<li class='" . (is_active($item) ? "active" : "") . (isset($item['class']) ? " " . $item['class'] : "") . "'><a href=\"" . $path . $item['path'] . "\">" . drawNameIcon($item, false) . "</a></li>";
}
return $out;
}
示例7: generate_user_info
function generate_user_info(&$row, $date_format, $group_mod, &$from, &$posts, &$joined, &$profile_img, &$profile, &$search_img, &$search, &$pm_img, &$pm, &$email_img, &$email, &$www_img, &$www)
{
global $lang, $images, $board_config, $MAIN_CFG;
static $ranksrow;
if (!is_array($ranksrow)) {
global $db;
$ranksrow = $db->sql_ufetchrowset("SELECT * FROM " . RANKS_TABLE . " ORDER BY rank_special, rank_min", SQL_ASSOC);
}
$from = !empty($row['user_from']) ? $row['user_from'] : ' ';
$joined = formatDateTime($row['user_regdate'], _DATESTRING2);
$posts = $row['user_posts'] ? $row['user_posts'] : 0;
$email_img = $email = '';
for ($j = 0; $j < count($ranksrow); $j++) {
if ($row['user_rank'] && $row['user_rank'] == $ranksrow[$j]['rank_id'] && $ranksrow[$j]['rank_special'] || !$row['user_rank'] && $row['user_posts'] >= $ranksrow[$j]['rank_min'] && !$ranksrow[$j]['rank_special']) {
$email = $ranksrow[$j]['rank_title'];
$email_img = $ranksrow[$j]['rank_image'] ? '<img src="' . $ranksrow[$j]['rank_image'] . '" alt="' . $email . '" title="' . $email . '" style="border:0;" />' : '';
}
}
$temp_url = URL::index("Your_Account&profile=" . $row['user_id']);
$profile_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_profile'] . '" alt="' . $lang['Read_profile'] . '" title="' . $lang['Read_profile'] . '" /></a>';
$profile = '<a href="' . $temp_url . '">' . $lang['Read_profile'] . '</a>';
if (is_user() && is_active('Private_Messages')) {
$temp_url = URL::index("Private_Messages&mode=post&" . POST_USERS_URL . "=" . $row['user_id']);
$pm_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" style="border:0;" /></a>';
$pm = '<a href="' . $temp_url . '">' . $lang['Send_private_message'] . '</a>';
} else {
$pm = $pm_img = '';
}
if ($row['user_website'] == 'http:///' || $row['user_website'] == 'http://') {
$row['user_website'] = '';
}
if ($row['user_website'] != '' && substr($row['user_website'], 0, 7) != 'http://') {
$row['user_website'] = 'http://' . $row['user_website'];
}
$www_img = $row['user_website'] ? '<a href="' . $row['user_website'] . '" target="_userwww"><img src="' . $images['icon_www'] . '" alt="' . $lang['Visit_website'] . '" title="' . $lang['Visit_website'] . '" style="border:0;" /></a>' : '';
$www = $row['user_website'] ? '<a href="' . $row['user_website'] . '" target="_userwww">' . $lang['Visit_website'] . '</a>' : '';
$temp_url = URL::index("Forums&file=search&search_author=" . urlencode($row['user_id']) . "&showresults=posts");
$search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . $lang['Search_user_posts'] . '" style="border:0;" /></a>';
$search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>';
return;
}
示例8: nav
function nav($main_up = 0)
{
global $module_name, $articlecomm, $db, $prefix;
$row = $db->sql_fetchrow($db->sql_query("SELECT overwrite_theme from " . $prefix . "_config"));
$overwrite_theme = intval($row['overwrite_theme']);
$thmcount = 0;
$handle = opendir('themes');
while ($file = readdir($handle)) {
if (!ereg("[.]", $file)) {
$thmcount++;
}
}
closedir($handle);
echo "<table border=\"0\" width=\"100%\" align=\"center\"><tr><td width=\"10%\">";
$menuimg = menuimg("info.gif");
echo "<font class=\"content\">" . "<center><a href=\"modules.php?name=Your_Account&op=edituser\"><img src=\"{$menuimg}\" border=\"0\" alt=\"" . _CHANGEYOURINFO . "\" title=\"" . _CHANGEYOURINFO . "\"></a><br>" . "<a href=\"modules.php?name=Your_Account&op=edituser\">" . _CHANGEYOURINFO . "</a>" . "</center></font></td>";
$menuimg = menuimg("home.gif");
echo "<td width=\"10%\"><font class=\"content\">" . "<center><a href=\"modules.php?name=Your_Account&op=edithome\"><img src=\"{$menuimg}\" border=\"0\" alt=\"" . _CHANGEHOME . "\" title=\"" . _CHANGEHOME . "\"></a><br>" . "<a href=\"modules.php?name=Your_Account&op=edithome\">" . _CHANGEHOME . "</a>" . "</center></form></font></td>";
if ($articlecomm == 1) {
$menuimg = menuimg("comments.gif");
echo "<td width=\"10%\"><font class=\"content\">" . "<center><a href=\"modules.php?name=Your_Account&op=editcomm\"><img src=\"{$menuimg}\" border=\"0\" alt=\"" . _CONFIGCOMMENTS . "\" title=\"" . _CONFIGCOMMENTS . "\"></a><br>" . "<a href=\"modules.php?name=Your_Account&op=editcomm\">" . _CONFIGCOMMENTS . "</a>" . "</center></form></font></td>";
}
if (is_active("Private_Messages")) {
$menuimg = menuimg("messages.gif");
echo "<td width=\"10%\"><font class=\"content\">" . "<center><a href=\"modules.php?name=Private_Messages\"><img src=\"{$menuimg}\" border=\"0\" alt=\"" . _PRIVATEMESSAGES . "\" title=\"" . _PRIVATEMESSAGES . "\"></a><br>" . "<a href=\"modules.php?name=Private_Messages\">" . _MESSAGES . "</a>" . "</center></form></font></td>";
}
if (is_active("Journal")) {
$menuimg = menuimg("journal.gif");
echo "<td width=\"10%\"><font class=\"content\">" . "<center><a href=\"modules.php?name=Journal&file=edit\"><img src=\"{$menuimg}\" border=\"0\" alt=\"" . _JOURNAL . "\" title=\"" . _JOURNAL . "\"></a><br>" . "<a href=\"modules.php?name=Journal&file=edit\">" . _JOURNAL . "</a>" . "</center></form></font></td>";
}
if ($thmcount > 1 and $overwrite_theme == 1) {
$menuimg = menuimg("themes.gif");
echo "<td width=\"10%\"><font class=\"content\">" . "<center><a href=\"modules.php?name=Your_Account&op=chgtheme\"><img src=\"{$menuimg}\" border=\"0\" alt=\"" . _SELECTTHETHEME . "\" title=\"" . _SELECTTHETHEME . "\"></a><br>" . "<a href=\"modules.php?name=Your_Account&op=chgtheme\">" . _SELECTTHETHEME . "</a>" . "</center></form></font></td>";
}
$menuimg = menuimg("exit.gif");
echo "<td width=\"10%\"><font class=\"content\">" . "<center><a href=\"modules.php?name=Your_Account&op=logout\"><img src=\"{$menuimg}\" border=\"0\" alt=\"" . _LOGOUTEXIT . "\" title=\"" . _LOGOUTEXIT . "\"></a><br>" . "<a href=\"modules.php?name=Your_Account&op=logout\">" . _LOGOUTEXIT . "</a>" . "</center></form></font>";
echo "</td></tr></table>";
if ($main_up != 1) {
echo "<br><center>[ <a href=\"modules.php?name=Your_Account\">" . _RETURNACCOUNT . "</a> ]</center>\n";
}
}
示例9: themeheader
function themeheader()
{
global $slogan, $sitename, $mainindex, $adminindex, $cpgtpl, $site_logo, $userinfo, $CPG_SESS, $MAIN_CFG, $Blocks;
if ($MAIN_CFG['global']['admingraphic'] & 4) {
include 'includes/cssmainmenu.php';
}
$imgr = $imgl = '';
// left blocks ?
if ($Blocks->l && $Blocks->showblocks & 1) {
$img = $Blocks->hideblock('600') ? 'plus.png' : 'minus.png';
$imgl = '<img style="float:left; cursor:pointer;" alt="' . _TOGGLE . '" title="' . _TOGGLE . '" id="pic600" src="themes/' . $CPG_SESS['theme'] . '/images/' . $img . '" onclick="blockswitch(\'600\');" />';
}
// right blocks ?
if ($Blocks->r && $Blocks->showblocks & 2) {
$img = $Blocks->hideblock('601') ? 'plus.png' : 'minus.png';
$imgr = '<img style="float:right; cursor:pointer;" alt="' . _TOGGLE . '" title="' . _TOGGLE . '" id="pic601" src="themes/' . $CPG_SESS['theme'] . '/images/' . $img . '" onclick="blockswitch(\'601\');" />';
}
$user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';
$css_ie = false !== strpos($user_agent, 'MSIE 7.0') ? 'ie7' : (preg_match('#MSIE ([0-6].[0-9]{1,2})#', $user_agent) ? 'ie6' : (isset($_SESSION['SECURITY']['UA']) && $_SESSION['SECURITY']['UA'] == 'Safari' ? 'safari' : (isset($_SESSION['SECURITY']['UA']) && $_SESSION['SECURITY']['UA'] == 'Opera' ? 'opera' : '')));
$cpgtpl->assign_vars(array('CSS_IE' => $css_ie ? '<link rel="stylesheet" type="text/css" href="themes/' . $CPG_SESS['theme'] . '/style/' . $css_ie . '.css" />' : '', 'PUBLIC_HEADER' => !defined('ADMIN_PAGES'), 'B_L_VISIBLE' => $Blocks->hideblock('600') ? 'style="display: none"' : '', 'G_LEFTIMAGE' => $imgl, 'G_RIGHTIMAGE' => $imgr, 'S_IS_ADMIN' => is_admin(), 'S_IS_USER' => is_user(), 'S_USER_INFO' => _BWEL . ' ' . (is_user() ? $userinfo['username'] : _ANONYMOUS), 'S_LOGO' => $site_logo, 'S_SITENAME' => $sitename, 'S_HOME' => _HOME, 'S_DOWNLOADS' => is_active('Downloads') ? _DownloadsLANG : false, 'S_FORUMS' => _ForumsLANG, 'S_MY_ACCOUNT' => is_user() ? _Your_AccountLANG : _BREG, 'S_ADMIN' => _ADMINISTRATION, 'U_MAININDEX' => $mainindex, 'U_DOWNLOADS' => URL::index('Downloads'), 'U_FORUMS' => URL::index('Forums'), 'U_MY_ACCOUNT' => URL::index(is_user() ? 'Your_Account' : 'Your_Account&file=register'), 'U_ADMININDEX' => $adminindex, 'S_MAIN_MENU' => isset($mmcontent) ? $mmcontent : false));
$Blocks->display('l');
}
示例10: ON
+-------------------------------------------------------------------+
|Original Copyright below |
+-------------------------------------------------------------------+
| CPG Dragonfly™ CMS |
| Copyright © 2004 - 2005 by CPG-Nuke Dev Team |
| http://www.dragonflycms.com |
| Dragonfly is released under the terms and conditions of the GNU |
| GPL version 2 or any later version |
+-------------------------------------------------------------------+
*/
if (!defined('CPG_NUKE')) {
exit;
}
global $prefix, $db, $CONFIG, $cpg_dir, $lang_get_pic_data;
$cpg_dir = 'coppermine';
if (!is_active($cpg_dir)) {
$content = 'ERROR';
return trigger_error($cpg_dir . ' module is inactive', E_USER_WARNING);
}
$cpg_block = true;
require "modules/" . $cpg_dir . "/include/load.inc";
$cpg_block = false;
$limit = $CONFIG['thumbcols'];
//number of thumbs
// $limit = 5; //number of pictures
$content = '';
// END USER DEFINEABLES
$result = $db->sql_query("SELECT pid, filepath, filename, p.aid, pic_rating, p.votes, p.title FROM " . $cpg_prefix . "pictures AS p INNER JOIN " . $cpg_prefix . "albums AS a ON (p.aid = a.aid AND " . VIS_GROUPS . ") WHERE approved=1 AND p.votes >= '{$CONFIG['min_votes_for_rating']}' GROUP BY pid ORDER BY ROUND((pic_rating+1)/2000) DESC, p.votes DESC LIMIT {$limit}");
$content .= '<br /><table width="100%" cols="' . $limit . '" border="0" cellpadding="0" cellspacing="0"><tr align="center">';
$pic = 0;
while ($row = $db->sql_fetchrow($result)) {
示例11: append_sid
}
}
//
// Handle anon users posting with usernames
//
if ($poster_id == ANONYMOUS && $postrow[$i]['post_username'] != '') {
$poster = $postrow[$i]['post_username'];
$poster_rank = $lang['Guest'];
}
$temp_url = '';
if ($poster_id != ANONYMOUS) {
$temp_url = append_sid("profile.{$phpEx}?mode=viewprofile&" . POST_USERS_URL . "={$poster_id}");
$profile_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_profile'] . '" alt="' . $lang['Read_profile'] . '" title="' . $lang['Read_profile'] . '" border="0" /></a>';
$profile = '<a href="' . $temp_url . '">' . $lang['Read_profile'] . '</a>';
$temp_url = append_sid("privmsg.{$phpEx}?mode=post&" . POST_USERS_URL . "={$poster_id}");
if (is_active("Private_Messages")) {
$pm_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" border="0" /></a>';
$pm = '<a href="' . $temp_url . '">' . $lang['Send_private_message'] . '</a>';
}
if (!empty($postrow[$i]['user_viewemail']) || $is_auth['auth_mod']) {
$email_uri = $board_config['board_email_form'] ? append_sid("profile.{$phpEx}?mode=email&" . POST_USERS_URL . '=' . $poster_id) : 'mailto:' . $postrow[$i]['user_email'];
$email_img = '<a href="' . $email_uri . '"><img src="' . $images['icon_email'] . '" alt="' . $lang['Send_email'] . '" title="' . $lang['Send_email'] . '" border="0" /></a>';
$email = '<a href="' . $email_uri . '">' . $lang['Send_email'] . '</a>';
} else {
$email_img = '';
$email = '';
}
if ($postrow[$i]['user_website'] == "http:///" || $postrow[$i]['user_website'] == "http://") {
$postrow[$i]['user_website'] = "";
}
if ($postrow[$i]['user_website'] != "" && substr($postrow[$i]['user_website'], 0, 7) != "http://") {
示例12: get_page_content
<link href="/assets/bootstrap-v3.3.5/css/bootstrap.css" rel="stylesheet" type="text/css">
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body onLoad="" onResize="" class="<?php
echo get_page_content("top_nav") ? 'with-top-nav' : 'without-top-nav';
?>
">
<!-- body -->
<div class="<?php
echo get_page_content("container") ? get_page_content("container") : "container-fluid";
?>
">
<div id="page-body-content-wrapper" class="<?php
echo get_page_content("top_nav") ? get_page_content("collapse_side_nav") && is_active("collapse_side_nav_link") ? "with-collapse-side-nav" : "without-collapse-side-nav" : "without-collapse-side-nav";
?>
<?php
echo get_page_content("page_footer") ? "with-page-footer" : "without-page-footer";
?>
<?php
echo get_page_content("page_header") ? "with-page-header" : "without-page-header";
?>
<?php
echo get_page_content("page_top_menu") ? "with-page-top-menu" : "without-page-top-menu";
?>
">
<!-- page body content wrapper -->
<?php
if (get_page_content("top_nav")) {
if (get_page_content("top_nav_container")) {
示例13: all
function all($bgcolor1, $bgcolor2, $bgcolor3, $sitename, $username)
{
global $prefix, $user_prefix, $db, $module_name;
OpenTable();
echo "<div align=\"center\" class=title>" . _ALPHABETICAL . "</div><br>";
echo "<table align=center border=1 cellpadding=0 cellspacing=0>";
echo "<tr>";
echo "<td bgcolor={$bgcolor1} width=150> <strong>" . _MEMBER . "</strong> " . _CLICKTOVIEW . "</td>";
echo "<td bgcolor={$bgcolor1} width=70 align=center><strong>" . _VIEWJOURNAL . "</strong></td>";
echo "<td bgcolor={$bgcolor1} width=70 align=center><strong>" . _MEMBERPROFILE . "</strong></td>";
if ($username == "") {
echo "<td bgcolor={$bgcolor1} width=70 align=center><strong>" . _CREATEACCOUNT2 . "</strong></td>";
} else {
echo "<td bgcolor={$bgcolor1} width=70 align=center><strong>" . _PRIVMSGJ . "</strong></td>";
}
echo "</tr>";
$sql = "SELECT j.id, j.joid, j.nop, j.ldp, j.ltp, j.micro, u.user_id FROM " . $prefix . "_journal_stats j, " . $user_prefix . "_users u where u.username=j.joid ORDER BY 'joid'";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
print "<tr>";
printf("<td bgcolor={$bgcolor2}> <a href=\"modules.php?name={$module_name}&file=search&bywhat=aid&forwhat=%s\">%s</a></td>", $row[joid], $row[joid]);
printf("<td bgcolor={$bgcolor2} align=center><div class=title><a href=\"modules.php?name={$module_name}&file=search&bywhat=aid&forwhat=%s\"><img src=\"modules/{$module_name}/images/binocs.gif\" border=0 alt=\"" . _VIEWJOURNAL2 . "\" title=\"" . _VIEWJOURNAL2 . "\"></a></td>", $row[joid], $row[joid]);
printf("<td bgcolor={$bgcolor2} align=center><a href=\"modules.php?name=Your_Account&op=userinfo&username=%s\"><img src=\"modules/{$module_name}/images/nuke.gif\" alt=\"" . _USERPROFILE2 . "\" title=\"" . _USERPROFILE2 . "\" border=0></a></td>", $row[joid], $row[joid], $row[joid]);
if ($username == "") {
print "<td align=center bgcolor={$bgcolor2}><a href=\"modules.php?name=Your_Account&op=new_user\"><img src=\"modules/{$module_name}/images/folder.gif\" border=0 alt=\"" . _CREATEACCOUNT . "\" title=\"" . _CREATEACCOUNT . "\"></a></td>";
} elseif ($username != "" and is_active("Private_Messages")) {
printf("<td align=center bgcolor={$bgcolor2}><a href=\"modules.php?name=Private_Messages&mode=post&u={$row['user_id']}\"><img src='modules/{$module_name}/images/chat.gif' border='0' alt='" . _PRIVMSGJ2 . "'></a></td>", $row[aid], $row[aid]);
}
echo "</tr>";
}
echo "</table>";
CloseTable();
}
示例14: is_active
<script language="javascript" src="ks.js"></script>
</head>
<body>
<div id="navcontainer">
<ul id="navlist">
<li><a href="?page=manage"<?php
is_active('manage', $page);
?>
>Manage calendar</a></li>
<li><a href="?page=config"<?php
is_active('config', $page);
?>
>General settings</a></li>
<li><a href="?page=lang"<?php
is_active('lang', $page);
?>
>Language settings</a></li>
<li><a href="http://blog.kreci.net/code/booking-calendar-lite/">Script homepage</a></li>
</ul>
</div>
<div id="content">
<?php
if ($page == 'config') {
?>
<?php
if (isset($_POST['conf'])) {
update_config($_POST['conf'], $conf);
示例15: Copyright
CPG-NUKE: Advanced Content Management System
********************************************
Copyright (c) 2004 by CPG-Nuke Dev Team
http://www.cpgnuke.com
CPG-Nuke is released under the terms and conditions
of the GNU GPL version 2 or any later version
$Source: /cvs/modules/Downloads/modules/Your_Account/blocks/downloads.php,v $
$Revision: 9.1 $
$Author: djmaze $
$Date: 2005/01/13 04:02:52 $
***********************************************************************/
if (!defined('CPG_NUKE')) {
exit;
}
// Last 10 Download Links Approved
if (is_active('Downloads')) {
$result = $db->sql_query('SELECT lid, title FROM ' . $prefix . "_downloads_downloads where submitter='{$username}' order by date DESC limit 0,10");
if ($db->sql_numrows($result) > 0) {
echo '<br />';
OpenTable();
echo '<div align="left"><b>' . $username . '\'s ' . _LAST10DOWNLOAD . ':</b><ul>';
while (list($lid, $title) = $db->sql_fetchrow($result)) {
echo '<li><a href="' . getlink('Downloads&d_op=viewdownloaddetails&lid=' . $lid) . '">' . $title . '</a></li>';
}
echo '</ul></div>';
CloseTable();
}
}