コード例 #1
0
ファイル: theme.php プロジェクト: cbsistem/nexos
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
0
ファイル: messagebox.php プロジェクト: cbsistem/nexos
function message_box()
{
    global $prefix, $MAIN_CFG, $currentlang, $db, $userinfo;
    require_once CORE_PATH . 'nbbcode.php';
    $query = $MAIN_CFG['global']['multilingual'] ? "AND (mlanguage='{$currentlang}' OR mlanguage='')" : '';
    if (!is_admin()) {
        if (is_user()) {
            $query .= ' AND view!=2 AND view!=3';
        } else {
            $query .= ' AND (view=0 OR view=3)';
        }
    }
    $result = $db->sql_query('SELECT mid, title, content, date, expire, view FROM ' . $prefix . "_message WHERE active='1' {$query} ORDER BY date DESC");
    while (list($mid, $title, $content, $date, $expire, $view) = $db->sql_fetchrow($result)) {
        $content = decode_bb_all($content, 1, true);
        if (!empty($title) && !empty($content)) {
            $output = '';
            if ($view == 0) {
                $output = _MVIEWALL;
            } elseif ($view == 1) {
                $output = _MVIEWUSERS;
            } elseif ($view == 2) {
                $output = _MVIEWADMIN;
            } elseif ($view == 3) {
                $output = _MVIEWANON;
            } elseif ($view > 3 && (in_group($view - 3) || is_admin())) {
                // <= phpBB User Groups Integration
                $view = $view - 3;
                if (!in_group($view)) {
                    list($output) = $db->sql_ufetchrow("SELECT group_name FROM " . $prefix . "_bbgroups WHERE group_id='{$view}'", SQL_NUM);
                } else {
                    $output = in_group($view);
                }
            }
            if ($output != '') {
                $remain = '';
                if (can_admin()) {
                    if ($expire == 0) {
                        $remain = _UNLIMITED;
                    } else {
                        $etime = ($date + $expire - time()) / 3600;
                        $etime = intval($etime);
                        $remain = $etime < 1 ? _EXPIRELESSHOUR : _EXPIREIN . " {$etime} " . _HOURS;
                    }
                }
                global $cpgtpl;
                $cpgtpl->assign_block_vars('messageblock', array('S_TITLE' => $title, 'S_CONTENT' => $content, 'S_OUTPUT' => $output, 'S_DATE' => _POSTEDON . ' ' . formatDateTime($date, _DATESTRING2), 'S_REMAIN' => $remain, 'S_EDIT' => _EDIT, 'U_EDITMSG' => URL::admin('messages&amp;edit=' . $mid)));
            }
            if ($expire != 0) {
                if ($date + $expire < time()) {
                    $db->sql_query("UPDATE " . $prefix . "_message SET active='0' WHERE mid='{$mid}'");
                }
            }
        }
    }
    $db->sql_freeresult($result);
}
コード例 #3
0
ファイル: auth.php プロジェクト: cbsistem/nexos
function session_pagestart()
{
    global $userinfo, $module_name;
    if (can_admin($module_name)) {
        $userinfo['user_level'] = ADMIN;
    }
    $userdata =& $userinfo;
    return $userdata;
}
コード例 #4
0
ファイル: comments.php プロジェクト: cbsistem/nexos
function viewdownloadcomments()
{
    global $downloadsprefix, $db, $bgcolor2, $module_name;
    $lid = intval($_GET['lid']);
    include "header.php";
    downl_menu_tpl(1);
    echo '<br />';
    $result = $db->sql_query("SELECT ratinguser, rating, ratingcomments, ratingtimestamp FROM " . $downloadsprefix . "_votedata WHERE ratinglid = {$lid} AND ratingcomments != '' ORDER BY ratingtimestamp DESC");
    $totalcomments = $db->sql_numrows($result);
    $transfertitle = ereg_replace("_", " ", $ttitle);
    $displaytitle = $transfertitle;
    OpenTable();
    echo "<center><font class=\"option\"><b>" . _DOWNLOADPROFILE . ": {$displaytitle}</b></font><br /><br />";
    downl_infomenu_tpl($lid, $ttitle);
    echo "<br /><br /><br />" . _TOTALOF . " {$totalcomments} " . _COMMENTS . "</font></center><br />" . "<table align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" width=\"450\">";
    $x = 0;
    while (list($ratinguser, $rating, $ratingcomments, $ratingtimestamp) = $db->sql_fetchrow($result)) {
        ereg("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $ratingtimestamp, $ratingtime);
        $ratingtime = strftime("%F", mktime($ratingtime[4], $ratingtime[5], $ratingtime[6], $ratingtime[2], $ratingtime[3], $ratingtime[1]));
        $date_array = explode("-", $ratingtime);
        $timestamp = mktime(0, 0, 0, $date_array["1"], $date_array["2"], $date_array["0"]);
        $formatted_date = date("F j, Y", $timestamp);
        /* Individual user information */
        $result2 = $db->sql_query("SELECT rating FROM " . $downloadsprefix . "_votedata WHERE ratinguser = '******'");
        $usertotalcomments = $db->sql_numrows($result2);
        $useravgrating = 0;
        while (list($rating2) = $db->sql_fetchrow($result2)) {
            $useravgrating = $useravgrating + $rating2;
        }
        $useravgrating = $useravgrating / $usertotalcomments;
        $useravgrating = number_format($useravgrating, 1);
        echo "<tr><td bgcolor=\"{$bgcolor2}\">" . "<font class=\"content\"><b> " . _USER . ": </b><a href=\"{$nukeurl}/" . getlink("Your_Account&amp;op=userinfo&amp;username={$ratinguser}") . "\">{$ratinguser}</a></font></td>" . "<td bgcolor=\"{$bgcolor2}\"><font class=\"content\"><b>" . _RATING . ": </b>{$rating}</font></td>" . "<td bgcolor=\"{$bgcolor2}\" align=\"right\"><font class=\"content\">{$formatted_date}</font></td>" . "</tr><tr>" . "<td valign=\"top\"><font class=\"tiny\">" . _USERAVGRATING . ": {$useravgrating}</font></td>" . "<td valign=\"top\" colspan=\"2\"><font class=\"tiny\">" . _NUMRATINGS . ": {$usertotalcomments}</font></td>" . "</tr><tr>" . "<td colspan=\"3\">" . "<font class=\"content\">";
        if (can_admin('downloads')) {
            echo "<a href=\"" . adminlink("{$module_name}&mode=DownloadsModDownload&amp;lid={$lid}") . "\"><img src=\"modules/{$module_name}/images/editicon.gif\" border=\"0\" alt=\"" . _EDITTHISDOWNLOAD . "\"></a>";
        }
        echo " {$ratingcomments}</font><br /><br /><br /></td></tr>";
        $x++;
    }
    echo "</table><br /><br /><center>";
    downloadfooter($lid);
    echo "</center>";
    CloseTable();
    include "footer.php";
}
コード例 #5
0
ファイル: theme.php プロジェクト: cbsistem/nexos
function themeheader()
{
    global $slogan, $sitename, $banners, $mainindex, $adminindex, $cpgtpl, $site_logo, $CPG_SESS, $MAIN_CFG, $Blocks;
    if ($MAIN_CFG['global']['admingraphic'] & 4) {
        include 'includes/cssmainmenu.php';
    }
    $imgr = $imgl = '';
    // left blocks ?
    if ($Blocks->l) {
        $img = $Blocks->hideblock('600') ? 'plus.gif' : 'minus.gif';
        $imgl = '<img alt="Toggle Content" title="Toggle Content" id="pic600" src="themes/' . $CPG_SESS['theme'] . '/images/' . $img . '" onclick="blockswitch(\'600\');" style="cursor:pointer; float:left; padding:2px 0 2px 0;" />';
    }
    // right blocks ?
    if ($Blocks->r) {
        $img = $Blocks->hideblock('601') ? 'plus.gif' : 'minus.gif';
        $imgr = '<img alt="Toggle Content" title="Toggle Content" id="pic601" src="themes/' . $CPG_SESS['theme'] . '/images/' . $img . '" onclick="blockswitch(\'601\');" style="cursor:pointer; float:right; padding:2px 0 2px 0;" />';
    }
    $user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';
    $cpgtpl->assign_vars(array('CSS_IE' => ereg('MSIE 7.0', $user_agent) ? '<link rel="stylesheet" type="text/css" href="themes/' . $CPG_SESS['theme'] . '/style/ie7.css" />' : (ereg('MSIE ([0-6].[0-9]{1,2})', $user_agent) ? '<link rel="stylesheet" type="text/css" href="themes/' . $CPG_SESS['theme'] . '/style/ie6.css" />' : ''), 'PUBLIC_HEADER' => !defined('ADMIN_PAGES'), 'B_L_VISIBLE' => $Blocks->hideblock('600') ? 'style="display: none"' : '', 'B_L_HIDDEN' => $Blocks->hideblock('600') ? '' : 'style="display: none"', 'G_LEFTIMAGE' => $imgl, 'G_RIGHTIMAGE' => $imgr, 'S_IS_ADMIN' => is_admin(), 'S_CAN_ADMIN' => can_admin(), 'S_IS_USER' => is_user(), '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, 'S_BANNER' => $banners ? viewbanner() : '', 'U_MAININDEX' => $mainindex, 'U_DOWNLOADS' => getlink('Downloads'), 'U_FORUMS' => getlink('Forums'), 'U_MY_ACCOUNT' => getlink(is_user() ? 'Your_Account' : 'Your_Account&amp;file=register'), 'U_ADMININDEX' => $adminindex, 'S_MAIN_MENU' => isset($mmcontent) ? $mmcontent : false));
    $Blocks->display('l');
}
コード例 #6
0
ファイル: theme.php プロジェクト: cbsistem/nexos
function themeheader()
{
    global $slogan, $sitename, $banners, $mainindex, $adminindex, $index, $cpgtpl, $ownpagetitle;
    $imgr = $imgl = '';
    // left blocks ?
    if (blocks_visible('l')) {
        $topblockl = '<td width="194"><img src="themes/PH2/images/left_block_top.jpg" height="12" alt="" /></td>';
        $img = hideblock('600') ? 'plus.gif' : 'minus.gif';
        $imgl = '<img align="left" alt="Toggle Content" title="Toggle Content" id="pic600" src="themes/PH2/images/' . $img . '" onclick="blockswitch(\'600\');" style="cursor:pointer" />';
    } else {
        $topblockl = '<td width="194" class="mtop_block"></td>';
    }
    // right blocks ?
    if (blocks_visible('r')) {
        $topblock = '<td width="194"><img src="themes/PH2/images/right_block_top.jpg" height="12" alt="" /></td>';
        $img = hideblock('601') ? 'plus.gif' : 'minus.gif';
        $imgr = '<img align="right" alt="Toggle Content" title="Toggle Content" id="pic601" src="themes/PH2/images/' . $img . '" onclick="blockswitch(\'601\');" style="cursor:pointer" />';
    } else {
        $topblock = '<td width="194" class="mtop_block"></td>';
    }
    $cpgtpl->assign_vars(array('PUBLIC_HEADER' => !defined('ADMIN_PAGES'), 'B_L_VISIBLE' => hideblock('600') ? 'style="display: none"' : '', 'G_LEFTIMAGE' => $imgl, 'G_RIGHTIMAGE' => $imgr, 'S_IS_ADMIN' => is_admin(), 'S_CAN_ADMIN' => can_admin(), 'S_IS_USER' => is_user(), 'S_SITENAME' => $sitename, 'S_HOME' => _HOME, 'S_DOWNLOADS' => _DownloadsLANG, 'S_FORUMS' => _ForumsLANG, 'S_MY_ACCOUNT' => _Your_AccountLANG, 'S_ADMIN' => _ADMINISTRATION, 'S_BANNER' => $banners ? viewbanner() : '', 'U_MAININDEX' => $mainindex, 'U_DOWNLOADS' => getlink('Downloads'), 'U_FORUMS' => getlink('Forums'), 'U_MY_ACCOUNT' => getlink('Your_Account'), 'U_ADMININDEX' => $adminindex, 'U_PRIVATE_M' => getlink('Private_Messages'), 'U_GALLERY' => getlink('coppermine'), 'U_SEARCH' => getlink('Search'), 'G_LBLOCK_TOP' => $topblockl, 'G_RBLOCK_TOP' => $topblock));
    blocks('left');
}
コード例 #7
0
ファイル: article.php プロジェクト: cbsistem/nexos
if ($story['ratings'] > 0) {
    $rate = substr($story['score'] / $story['ratings'], 0, 4);
    $r_image = round($rate);
    $the_image = '<br /><br /><img src="' . (file_exists('themes/' . $CPG_SESS['theme'] . '/images/news/stars-' . $r_image . '.gif') ? 'themes/' . $CPG_SESS['theme'] . '/images/news/stars-' . $r_image . '.gif' : 'images/news/stars-' . $r_image . '.gif') . '" alt="" /><br />';
} else {
    $rate = 0;
    $the_image = '<br />';
}
$content = "<div style=\"text-align:center;\">" . _AVERAGESCORE . ": <b>{$rate}</b><br />" . _VOTES . ": <b>{$story['ratings']}</b>{$the_image}" . _RATETHISARTICLE . "</div><br />";
$content .= '<form action="' . URL::index() . '" method="post"><div>';
$content .= '<input type="hidden" name="sid" value="' . $sid . '" />';
$content .= '<input type="radio" name="score" value="5" /> <img src="' . (file_exists('themes/' . $CPG_SESS['theme'] . '/images/news/stars-5.gif') ? 'themes/' . $CPG_SESS['theme'] . '/images/news/stars-5.gif' : 'images/news/stars-5.gif') . '" alt="' . _EXCELLENT . '" title="' . _EXCELLENT . '" /><br />';
$content .= '<input type="radio" name="score" value="4" /> <img src="' . (file_exists('themes/' . $CPG_SESS['theme'] . '/images/news/stars-4.gif') ? 'themes/' . $CPG_SESS['theme'] . '/images/news/stars-4.gif' : 'images/news/stars-4.gif') . '" alt="' . _VERYGOOD . '" title="' . _VERYGOOD . '" /><br />';
$content .= '<input type="radio" name="score" value="3" /> <img src="' . (file_exists('themes/' . $CPG_SESS['theme'] . '/images/news/stars-3.gif') ? 'themes/' . $CPG_SESS['theme'] . '/images/news/stars-3.gif' : 'images/news/stars-3.gif') . '" alt="' . _GOOD . '" title="' . _GOOD . '" /><br />';
$content .= '<input type="radio" name="score" value="2" /> <img src="' . (file_exists('themes/' . $CPG_SESS['theme'] . '/images/news/stars-2.gif') ? 'themes/' . $CPG_SESS['theme'] . '/images/news/stars-2.gif' : 'images/news/stars-2.gif') . '" alt="' . _REGULAR . '" title="' . _REGULAR . '" /><br />';
$content .= '<input type="radio" name="score" value="1" /> <img src="' . (file_exists('themes/' . $CPG_SESS['theme'] . '/images/news/stars-1.gif') ? 'themes/' . $CPG_SESS['theme'] . '/images/news/stars-1.gif' : 'images/news/stars-1.gif') . '" alt="' . _BAD . '" title="' . _BAD . '" /><br /><br /></div>';
$content .= '<div style="text-align:center;"><input type="submit" value="' . _CASTMYVOTE . '" /></div></form>';
$block = array('bid' => 10003, 'view' => 0, 'side' => 'r', 'title' => _RATEARTICLE, 'content' => $content);
$Blocks->custom($block);
$content = '<br />&nbsp;<img src="images/news/print.gif" style="width:16px; height:11px;" alt="' . _PRINTER . '" title="' . _PRINTER . '" />&nbsp;&nbsp;<a href="' . URL::index('&amp;file=print&amp;sid=' . $sid) . '">' . _PRINTER . '</a><br /><br />';
if (can_admin('news')) {
    $content .= '<div style="text-align:center;"><b>' . _ADMIN . '</b><br />[ <a href="' . URL::admin('&amp;mode=add') . '">' . _ADD . '</a> | <a href="' . URL::admin('&amp;edit=' . $sid) . '">' . _EDIT . '</a> | <a href="' . URL::admin('&amp;del=' . $sid) . '">' . _DELETE . '</a> ]</div>';
}
$block = array('bid' => 10004, 'view' => 0, 'side' => 'r', 'title' => _OPTIONS, 'content' => $content);
$Blocks->custom($block);
require_once 'header.php';
$cpgtpl->display('body');
if ($story['acomm'] && $MAIN_CFG['global']['articlecomm'] && $userinfo['umode'] != 'nocomments') {
    require_once "modules/{$module_name}/comments.php";
    DisplayComments($sid, $story['title']);
}
コード例 #8
0
ファイル: referers.php プロジェクト: cbsistem/nexos
  | eMail: support at myndworx dot com                                |
  | Website: http://www.nexoscms.org and http://www.myndworx.com      |  
  +-------------------------------------------------------------------+
  |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('ADMIN_PAGES')) {
    exit;
}
if (!can_admin('referers')) {
    die('Access Denied');
}
$pagetitle .= ' ' . _BC_DELIM . ' ' . _HTTPREFERERS;
global $bgcolor3, $db, $prefix;
if (isset($_GET['del']) && $_GET['del'] == 'all') {
    $db->sql_query('DELETE FROM ' . $prefix . '_referer');
    URL::redirect(URL::admin());
} else {
    require_once 'header.php';
    GraphicAdmin('_AMENU6');
    $result = $db->sql_query('SELECT url FROM ' . $prefix . '_referer');
    $bgcolor = '';
    if ($db->sql_numrows($result) > 0) {
        $cpgtpl->assign_vars(array('U_DELREFERERS' => URL::admin('&amp;del=all')));
        while (list($url) = $db->sql_fetchrow($result)) {
コード例 #9
0
ファイル: install.php プロジェクト: cbsistem/nexos
 <div style="text-align:center; width:600px;">
      <table width="100%" border="0" cellpadding="0" cellspacing="1" class="maintable">
       <tr>
        <td valign="top" bgcolor="#EFEFEF"><img src="' . $dirlogo . '/logo.gif"><br />
        </td>
       </tr>
      </table><br />';
$phpver = phpversion();
$phpver = "{$phpver['0']}{$phpver['2']}";
if ($phpver < 41) {
    echo "You need atl east PHP version 4.1 to use Coppermine 4 CMS</a>";
    cpgfooter();
    die;
}
// check if user has access
if (!can_admin()) {
    echo "You don't have permission to access this file !<p><a href=\"{$login_url}\">Login as Admin</a>";
    cpgfooter();
    die;
}
$installtype = 0;
// 0 = new, 1 = 1.1D, 2 = 1.2, 3 = 1.2 RC, 4 = 1.2 RC5, 5 = 1.2.2 / 1.2.2a
// check if this is an upgrade
if (file_exists($CPG_M_DIR . "/include/config.inc.php")) {
    include $CPG_M_DIR . "/include/config.inc.php";
    if ($CONFIG['TABLE_PREFIX']) {
        // CPG 1.1D
        $cpg_prefix = $CONFIG['TABLE_PREFIX'];
        $installtype = 1;
    } else {
        $installtype = 2;
コード例 #10
0
ファイル: newsletter.php プロジェクト: cbsistem/nexos
  | eMail: support at myndworx dot com                                |
  | Website: http://www.nexoscms.org and http://www.myndworx.com      | 
  +-------------------------------------------------------------------+
  |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('ADMIN_PAGES')) {
    exit;
}
if (!can_admin('newsletter')) {
    die('Access Denied');
}
$pagetitle .= ' ' . _BC_DELIM . ' ' . _NEWSLETTER;
function newsletter_selection($fieldname, $current)
{
    static $groups;
    if (!isset($groups)) {
        global $db, $prefix;
        $groups = array(0 => _NL_ALLUSERS, 1 => _SUBSCRIBEDUSERS, 2 => _NL_ADMINS);
        $groupsResult = $db->sql_query("SELECT group_id, group_name FROM " . $prefix . "_bbgroups WHERE group_single_user=0");
        while (list($groupID, $groupName) = $db->sql_fetchrow($groupsResult)) {
            $groups[$groupID + 2] = $groupName;
        }
    }
    $tmpgroups = $groups;
コード例 #11
0
  | Dragonfly is released under the terms and conditions of the GNU   |
  | GPL version 2 or any later version                                |  
  +-------------------------------------------------------------------+
*/
if (!defined('CPG_NUKE')) {
    exit;
}
global $db, $prefix;
# how many referers should the block display?
$ref = 10;
$a = 1;
$content = '';
$result = $db->sql_query("SELECT url FROM " . $prefix . "_referer ORDER BY lasttime DESC LIMIT {$ref}");
$total = $db->sql_numrows($result);
if ($total < 1) {
    $content = 'ERROR';
    return trigger_error(sprintf(_ERROR_NONE_TO_DISPLAY, strtolower(_HTTPREFERERS)), E_USER_WARNING);
}
while (list($url) = $db->sql_fetchrow($result)) {
    $url2 = str_replace('_', ' ', $url);
    if (strlen($url2) > 18) {
        $url2 = substr($url, 0, 20);
        $url2 .= '..';
    }
    $content .= "{$a}:&nbsp;\n" . "<a href=\"{$url}\" target=\"_blank\">{$url2}</a>\n" . "<br />\n";
    $a++;
}
if (can_admin()) {
    $content .= "<br />\n" . "<div style=\"text-align:center;\">\n" . "{$total} " . _HTTPREFERERS . "\n" . "<br /><br />\n" . "[ <a href=\"" . URL::admin('referers&amp;del=all') . "\">" . _DELETE . "</a> ]\n" . "</div>\n";
}
$db->sql_freeresult($result);
コード例 #12
0
ファイル: manage.php プロジェクト: cbsistem/nexos
  of the GNU GPL version 2 or any later version

  $Source: /cvs/modules/Wiki/modules/Wiki/manage.php,v $
  $Revision: 1.9 $
  $Author: phoenix $
  $Date: 2010/11/27 06:40:04 $
**********************************************/
if (!defined('CPG_NUKE')) {
    exit;
}
require_once "modules/{$module_name}/inc/functions.php";
require CORE_PATH . 'wysiwyg/wysiwyg.inc';
if (!is_user()) {
    cpg_error('You are not allowed to edit/create documents, please login or register');
} elseif (isset($_POST['content']) && !(isset($_POST['wysiwyg']) || isset($_POST['preview']))) {
    if (!can_admin($module_name)) {
        $msg = intval($_POST['page_id']) > 0 ? 'replace the current page.' : 'be added.';
        $db->sql_query('INSERT INTO ' . $module_prefix . "_pages_wait (page_id, parent_id, title, user_id, comment, body) VALUES (" . intval($_POST['page_id']) . ", " . intval($_POST['parent_id']) . ", '" . Fix_Quotes($_POST['title']) . "', " . is_user() . ", '" . Fix_Quotes($_POST['comment']) . "', '" . Fix_Quotes($_POST['content']) . "')");
        cpg_error('Page is added and is awaiting approval to ' . $msg, '', $MAIN_CFG['server']['path'] . URL::index());
    }
    // page_id is used for modifications
    if (intval($_POST['page_id']) > 0) {
        $id = intval($_POST['page_id']);
        $sql = 'UPDATE ' . $module_prefix . "_pages SET" . ' parent_id=' . intval($_POST['parent_id']) . ', active=1' . ", title='" . Fix_Quotes($_POST['title']) . "', version=version+1" . ', supercede=' . time() . ', upd_user_id=' . is_user() . ", upd_author='" . Fix_Quotes($userinfo['username']) . "', comment='" . Fix_Quotes($_POST['comment']) . "', body='" . Fix_Quotes($_POST['content']) . "' WHERE id={$id}";
        $db->sql_query($sql);
    } else {
        list($pos) = $db->sql_ufetchrow("SELECT COUNT(*) FROM " . $module_prefix . "_pages WHERE parent_id=" . intval($_POST['parent_id']));
        $sql = 'INSERT INTO ' . $module_prefix . '_pages (parent_id, active, pos, title, time, user_id, author, comment, body) VALUES (' . intval($_POST['parent_id']) . ', 1, ' . ($pos + 1) . ", '" . Fix_Quotes($_POST['title']) . "', " . time() . ', ' . is_user() . ", '" . Fix_Quotes($userinfo['username']) . "', '" . Fix_Quotes($_POST['comment']) . "', '" . Fix_Quotes($_POST['content']) . "')";
        $db->sql_query($sql);
        $id = $db->sql_nextid('id');
    }
コード例 #13
0
ファイル: index.php プロジェクト: cbsistem/nexos
function pollResults($poll_id)
{
    global $db, $prefix, $ThemeSel;
    if (!isset($poll_id)) {
        $poll_id = 1;
    }
    $holdtitle = $db->sql_ufetchrow('SELECT poll_title, artid FROM ' . $prefix . "_poll_desc WHERE poll_id='{$poll_id}'", SQL_NUM);
    echo "<b>{$holdtitle['0']}</b><br /><br />";
    list($sum) = $db->sql_ufetchrow('SELECT SUM(option_count) FROM ' . $prefix . "_poll_data WHERE poll_id='{$poll_id}'", SQL_NUM);
    echo '<table border="0">';
    /* cycle through all options */
    $result = $db->sql_query("SELECT option_text, option_count FROM " . $prefix . "_poll_data WHERE poll_id='{$poll_id}' AND option_text!='' ORDER BY vote_id");
    while (list($option_text, $option_count) = $db->sql_fetchrow($result)) {
        echo "<tr><td>{$option_text}</td>";
        $percent = 0;
        if ($sum) {
            $percent = 100 * $option_count / $sum;
        }
        echo '<td>';
        $percentInt = (int) $percent * 4 * 1;
        $percent2 = (int) $percent;
        if (file_exists("themes/{$ThemeSel}/images/survey_leftbar.gif") && file_exists("themes/{$ThemeSel}/images/survey_mainbar.gif") && file_exists("themes/{$ThemeSel}/images/survey_rightbar.gif")) {
            $l_size = getimagesize("themes/{$ThemeSel}/images/survey_leftbar.gif");
            $m_size = getimagesize("themes/{$ThemeSel}/images/survey_mainbar.gif");
            $r_size = getimagesize("themes/{$ThemeSel}/images/survey_rightbar.gif");
            $leftbar = 'survey_leftbar.gif';
            $mainbar = 'survey_mainbar.gif';
            $rightbar = 'survey_rightbar.gif';
        } else {
            $l_size = getimagesize("themes/{$ThemeSel}/images/leftbar.gif");
            $m_size = getimagesize("themes/{$ThemeSel}/images/mainbar.gif");
            $r_size = getimagesize("themes/{$ThemeSel}/images/rightbar.gif");
            $leftbar = 'leftbar.gif';
            $mainbar = 'mainbar.gif';
            $rightbar = 'rightbar.gif';
        }
        if (file_exists("themes/{$ThemeSel}/images/survey_mainbar_d.gif")) {
            $m1_size = getimagesize("themes/{$ThemeSel}/images/survey_mainbar_d.gif");
            $mainbar_d = 'survey_mainbar_d.gif';
            if ($percent2 > 0 && $percent2 <= 23) {
                $salto = "<img src=\"themes/{$ThemeSel}/images/{$mainbar}\" alt=\"{$percent2} %\" title=\"{$percent2} %\" height=\"{$m_size['1']}\" width=\"{$percentInt}\" />";
            } elseif ($percent2 > 24 && $percent2 < 50) {
                $a = $percentInt - 100;
                $salto = "<img src=\"themes/{$ThemeSel}/images/{$mainbar}\" alt=\"{$percent2} %\" title=\"{$percent2} %\" height=\"{$m_size['1']}\" width=\"70\" />" . "<img src=\"themes/{$ThemeSel}/images/{$mainbar_d}\" alt=\"{$percent2} %\" title=\"{$percent2} %\" height=\"{$m1_size['1']}\" width=\"30\" />" . "<img src=\"themes/{$ThemeSel}/images/{$mainbar}\" alt=\"{$percent2} %\" title=\"{$percent2} %\" height=\"{$m_size['1']}\" width=\"{$a}\" />";
            } elseif ($percent2 > 49 && $percent2 < 75) {
                $a = $percentInt - 200;
                $salto = "<img src=\"themes/{$ThemeSel}/images/{$mainbar}\" alt=\"{$percent2} %\" title=\"{$percent2} %\" height=\"{$m_size['1']}\" width=\"70\" />" . "<img src=\"themes/{$ThemeSel}/images/{$mainbar_d}\" alt=\"{$percent2} %\" title=\"{$percent2} %\" height=\"{$m1_size['1']}\" width=\"30\" />" . "<img src=\"themes/{$ThemeSel}/images/{$mainbar}\" alt=\"{$percent2} %\" title=\"{$percent2} %\" height=\"{$m_size['1']}\" width=\"70\" />" . "<img src=\"themes/{$ThemeSel}/images/{$mainbar_d}\" alt=\"{$percent2} %\" title=\"{$percent2} %\" height=\"{$m1_size['1']}\" width=\"30\" />" . "<img src=\"themes/{$ThemeSel}/images/{$mainbar}\" alt=\"{$percent2} %\" title=\"{$percent2} %\" height=\"{$m_size['1']}\" width=\"{$a}\" />";
            } elseif ($percent2 > 74 && $percent2 <= 100) {
                $a = $percentInt - 300;
                $salto = "<img src=\"themes/{$ThemeSel}/images/{$mainbar}\" alt=\"{$percent2} %\" title=\"{$percent2} %\" height=\"{$m_size['1']}\" width=\"70\" />" . "<img src=\"themes/{$ThemeSel}/images/{$mainbar_d}\" alt=\"{$percent2} %\" title=\"{$percent2} %\" height=\"{$m1_size['1']}\" width=\"30\" />" . "<img src=\"themes/{$ThemeSel}/images/{$mainbar}\" alt=\"{$percent2} %\" title=\"{$percent2} %\" height=\"{$m_size['1']}\" width=\"70\" />" . "<img src=\"themes/{$ThemeSel}/images/{$mainbar_d}\" alt=\"{$percent2} %\" title=\"{$percent2} %\" height=\"{$m1_size['1']}\" width=\"30\" />" . "<img src=\"themes/{$ThemeSel}/images/{$mainbar}\" alt=\"{$percent2} %\" title=\"{$percent2} %\" height=\"{$m_size['1']}\" width=\"70\" />" . "<img src=\"themes/{$ThemeSel}/images/{$mainbar_d}\" alt=\"{$percent2} %\" title=\"{$percent2} %\" height=\"{$m1_size['1']}\" width=\"30\" />" . "<img src=\"themes/{$ThemeSel}/images/{$mainbar}\" alt=\"{$percent2} %\" title=\"{$percent2} %\" height=\"{$m_size['1']}\" width=\"{$a}\" />";
            }
        }
        if ($percent > 0) {
            echo "<img src=\"themes/{$ThemeSel}/images/{$leftbar}\" height=\"{$l_size['1']}\" width=\"{$l_size['0']}\" alt=\"{$percent2} %\" title=\"{$percent2} %\" />";
            if (file_exists("themes/{$ThemeSel}/images/survey_mainbar_d.gif")) {
                echo "{$salto}";
            } else {
                echo "<img src=\"themes/{$ThemeSel}/images/{$mainbar}\" height=\"{$m_size['1']}\" width=\"{$percentInt}\" alt=\"{$percent2} %\" title=\"{$percent2} %\" />";
            }
            echo "<img src=\"themes/{$ThemeSel}/images/{$rightbar}\" height=\"{$r_size['1']}\" width=\"{$r_size['0']}\" alt=\"{$percent2} %\" title=\"{$percent2} %\" />";
        } else {
            echo "<img src=\"themes/{$ThemeSel}/images/{$leftbar}\" height=\"{$l_size['1']}\" width=\"{$l_size['0']}\" alt=\"{$percent2} %\" title=\"{$percent2} %\" />";
            if (!file_exists("themes/{$ThemeSel}/images/survey_mainbar_d.gif")) {
                echo "<img src=\"themes/{$ThemeSel}/images/{$mainbar}\" height=\"{$m_size['1']}\" width=\"{$m_size['0']}\" alt=\"{$percent2} %\" title=\"{$percent2} %\" />";
            }
            echo "<img src=\"themes/{$ThemeSel}/images/{$rightbar}\" height=\"{$r_size['1']}\" width=\"{$r_size['0']}\" alt=\"{$percent2} %\" title=\"{$percent2} %\" />";
        }
        printf(" %.2f%% (%s)", $percent, $option_count);
        echo "</td></tr>";
    }
    $db->sql_freeresult($result);
    echo '</table><br />
	<center><font class="content">' . _TOTALVOTES . ' <b>' . $sum . '</b>
	<br /><br />';
    $article = '';
    if ($holdtitle[1] > 0) {
        $article = "<br /><br />" . _GOBACK;
    }
    echo '[ <a href="' . URL::index("&amp;pollid={$poll_id}") . "\">" . _VOTING . "</a> | " . '<a href="' . URL::index() . '">' . _OTHERPOLLS . "</a> ] {$article} </font></center>";
    if (can_admin('surveys')) {
        echo '<br /><center>[ <a href="' . URL::admin('Surveys&amp;mode=add') . '">' . _ADD . '</a> | <a href="' . URL::admin("Surveys&amp;mode=edit&amp;id={$poll_id}") . '">' . _EDIT . '</a> ]</center>';
    }
    return $holdtitle[0];
}
コード例 #14
0
ファイル: history.php プロジェクト: cbsistem/nexos
  | eMail: support at myndworx dot com                                |
  | Website: http://www.nexoscms.org and http://www.myndworx.com      | 
  +-------------------------------------------------------------------+
  |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('ADMIN_PAGES')) {
    exit;
}
if (!can_admin('history')) {
    die('Access Denied');
}
$pagetitle .= ' ' . _BC_DELIM . ' ' . _EPHEMADMIN;
if (isset($_POST['createEntry'])) {
    $day = intval($_POST['day']);
    $month = intval($_POST['month']);
    $year = Fix_Quotes($_POST['year'], 1);
    $content = Fix_Quotes($_POST['content']);
    $entry_language = $_POST['language'];
    $db->sql_query("INSERT INTO " . $prefix . "_history (eid, did, mid, yid, content, language) VALUES (DEFAULT, '{$day}', '{$month}', '{$year}', '{$content}', '{$entry_language}')");
    URL::redirect(URL::admin());
} elseif (isset($_POST['saveEntry'])) {
    $id = intval($_POST['entry_id']);
    $year = Fix_Quotes($_POST['entry_year'], 1);
    $content = Fix_Quotes($_POST['entry_content']);
コード例 #15
0
ファイル: index.php プロジェクト: cbsistem/nexos
        echo '<a href="' . getlink('Your_Account&amp;profile=' . $row[1]) . '"><strong>' . $row[1] . ':</strong></a>';
        if ($shoutconf['date']) {
            echo formatDateTime($row[3], '%d-%b-%Y ');
        }
        // date
        if ($shoutconf['time']) {
            echo formatDateTime($row[3], '%H:%M:%S');
        }
        // time
        echo '<br />' . $row[2] . '</div><hr />';
    }
    $db->sql_freeresult($result);
    $number = 0;
}
$pagetitle .= 'Shoutblock';
require_once 'header.php';
OpenTable();
if ($shoutconf['themecolors']) {
    $shoutconf['color1'] = $bgcolor1;
    $shoutconf['color2'] = $bgcolor2;
}
$offset = isset($_GET['offset']) ? $_GET['offset'] : 0;
if (is_numeric($offset)) {
    $offset = intval($offset);
    nav_shouts();
} else {
    all_shouts();
}
$admin = can_admin('shoutblock') ? ' | <a href="' . adminlink('&amp;mode=manage') . '">Manage Shouts</a>' : '';
echo '<p align="right"><a href="' . getlink('&amp;offset=' . $number) . '">Next</a> - <a href="' . getlink('&amp;offset=all') . '">All</a>' . $admin . '</p>';
CloseTable();
コード例 #16
0
ファイル: comments.php プロジェクト: cbsistem/nexos
        $count += removeSubComments($tid, 'comments');
        $db->sql_query("UPDATE " . $prefix . "_stories SET comments=comments-{$count} WHERE sid={$sid}");
        $db->sql_query("DELETE FROM " . $prefix . "_comments WHERE tid='{$tid}'");
        URL::redirect(URL::index("News&file=article&sid={$sid}"));
    } else {
        require 'header.php';
        GraphicAdmin('_AMENU3');
        OpenTable();
        echo '<div style="text-align:center;" class="title">' . _REMOVECOMMENTS . '</div>';
        CloseTable();
        OpenTable();
        echo '<center>' . _SURETODELCOMMENTS . '<br /><br />[ <a href="javascript:history.go(-1)">' . _NO . '</a> | <a href="' . URL::admin("&amp;del={$tid}&amp;ok=1") . '">' . _YES . '</a> ]</center>';
        CloseTable();
    }
} else {
    if (isset($_GET['polldel']) && can_admin('surveys')) {
        $tid = intval($_GET['polldel']);
        if (isset($_GET['ok'])) {
            $result = $db->sql_query("SELECT poll_id FROM " . $prefix . "_pollcomments WHERE tid={$tid}");
            list($poll_id) = $db->sql_fetchrow($result);
            removeSubComments($poll_id, 'pollcomments');
            $db->sql_query("DELETE FROM " . $prefix . "_pollcomments WHERE tid='{$tid}'");
            URL::redirect(URL::index("Surveys&op=results&pollid={$poll_id}"));
        } else {
            require 'header.php';
            GraphicAdmin('_AMENU3');
            OpenTable();
            echo '<div style="text-align:center;" class="title">' . _REMOVECOMMENTS . '</div>';
            CloseTable();
            OpenTable();
            echo '<center>' . _SURETODELCOMMENTS . '<br /><br />[ <a href="javascript:history.go(-1)">' . _NO . '</a> | <a href="' . URL::admin("&amp;polldel={$tid}&amp;ok=1") . '">' . _YES . '</a> ]</center>';
コード例 #17
0
ファイル: search.php プロジェクト: cbsistem/nexos
 function add_result($row)
 {
     global $db, $dl_prefix, $cpgtpl, $module_name;
     $this->result[$this->result_count++] = $row;
     $rating_info = get_rating($row['score'], $row['votes']);
     if ($row['date'] >= $row['updated']) {
         $row['date'] = _DLP_PUBLISHED . ': ' . generate_date($row['date']) . mark_date($row['date'], 3, 1, '', 2);
     } else {
         $row['date'] = _DLP_UPDATED . ': ' . generate_date($row['updated']) . mark_date($row['updated'], 3, 2, '', 2);
     }
     if (can_download($row['active'], $row['access'])) {
         $img = dl_image($row['access'] > 0 ? 'download_small_yes.png' : 'download_small.png');
         $img_title = _DLP_DLNOW;
     } else {
         $img = dl_image('download_small_no.png');
         $img_title = _DLP_DLFORBIDDEN;
     }
     if ($row['img_url']) {
         if (ereg('://', $row['img_url'])) {
             $row['img_url'] .= '" width="100';
         } else {
             $row['img_url'] = dl_thumbimage($row['img_url']) . '" width="100';
         }
     }
     $cpgtpl->assign_block_vars('dl_item', array('TITLE' => $row['title'], 'U_INFO' => URL::index('&amp;file=details&amp;id=' . $row['lid']), 'U_GET' => URL::index('&amp;get=' . $row['lid']), 'U_IMG' => $row['screen'] ? URL::index('&amp;screen=' . $row['screen']) : '', 'U_HOME' => $row['homepage'], 'U_WRITE' => URL::index('&amp;review=' . $row['lid']), 'U_REVIEWS' => URL::index('&amp;file=details&amp;id=' . $row['lid'] . '#reviews'), 'NO_REVIEWS' => $row['votes'] == 0 && is_user(), 'REVIEWS' => sprintf($row['votes'] == 1 ? '%s review' : '%s reviews', $row['votes']), 'VERSION' => !empty($row['version']) ? _VERSION . ' ' . $row['version'] : '', 'NOT_ACTIVE' => $row['active'] == 0 && can_admin($module_name) ? _DLP_INACTIVE : '', 'E_PICK' => $row['pick'] ? _DLP_EDPICK : '', 'SECURE' => isset($row['cpgcs']) && $row['cpgcs'] ? 'Certified Secure' : '', 'SUBMITTER' => is_numeric($row['submitter']) ? '<a href="' . URL::index('&amp;file=search&amp;sa=' . $row['submitter']) . '">' . $row['username'] . '</a>' : $row['submitter'], 'DL_IMG' => $img, 'DL_IMG_TITLE' => $img_title, 'RATING_IMG' => $rating_info['image'], 'POP_IMG' => popularity($row['lid']), 'DATE' => $row['date'], 'DESC' => nl2br($row['desc_short']), 'U_SCREEN' => URL::index('&amp;screen=' . $row['screen']), 'IMG_SCREEN' => $row['img_url'], 'IMG_MISSING' => dl_image('missing.png'), 'L_VIEWALLSCREENS' => _DLP_VIEWALLSCREENS, 'L_NOSCREENS' => _DLP_NOSCREENSHOTS, 'L_SUBMITTEDBY' => _DLP_SUBMITTEDBY));
 }
コード例 #18
0
ファイル: database.php プロジェクト: cbsistem/nexos
  | eMail: support at myndworx dot com                                |
  | Website: http://www.nexoscms.org and http://www.myndworx.com      |
  +-------------------------------------------------------------------+
  |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('ADMIN_PAGES')) {
    exit;
}
if (!can_admin('database')) {
    die('Access Denied');
}
// SHOW FIELDS FROM `cms_stories`
// SHOW KEYS FROM `cms_stories`
$crlf = "\n";
$filename = $dbname . '_' . formatDateTime(time(), _DATESTRING3) . '.sql';
$mode = isset($_POST['mode']) && !$CLASS['member']->demo ? $_POST['mode'] : '';
$type = strtoupper(substr($mode, 0, -2));
if (isset($_POST['switchdb'])) {
    $mode = '';
}
if (isset($_POST['tablelist']) && !isset($_POST['switchdb'])) {
    $tablelist = $_POST['tablelist'];
    $full = false;
} else {
コード例 #19
0
ファイル: cpgmm.php プロジェクト: cbsistem/nexos
  | eMail: support at myndworx dot com                                |
  | Website: http://www.nexoscms.org and http://www.myndworx.com      |
  +-------------------------------------------------------------------+
  |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('ADMIN_PAGES')) {
    exit;
}
if (!can_admin('cpgmm')) {
    die('Access Denied');
}
if ((isset($_GET['cid']) && intval($_GET['cid']) > 0 || isset($_GET['id']) && intval($_GET['id']) > 0) && $CPG_SESS['admin']['page'] != 'cpgmm') {
    cpg_error(_ERROR_BAD_LINK, _SEC_ERROR);
}
get_lang('cpgmm');
global $db, $prefix, $cpgtpl, $bgcolor2, $bgcolor3;
$mode = isset($_GET['mode']) ? $_GET['mode'] : '';
function cpg_mm_admin_header($title, $content = '')
{
    global $pagetitle, $cpgtpl, $modheader;
    $pagetitle .= ' ' . _BC_DELIM . ' ' . _CPG_MMADMIN;
    $modheader .= '
<link rel="stylesheet" href="themes/default/style/tabletree.css" type="text/css" media="screen"/>
<script type="text/javascript" src="includes/javascript/framework.js"></script>
コード例 #20
0
ファイル: usermgr.php プロジェクト: cbsistem/nexos
$opp = isset($_POST['opp']) ? $_POST['opp'] : (isset($_GET['opp']) ? $_GET['opp'] : '');
switch ($opp) {
    case 'edit':
        if (isset($_POST['user_name'])) {
            $user_name = substr($_POST['user_name'], 0, 25);
            $sql = "SELECT user_id FROM {$CONFIG['TABLE_USERS']} WHERE username = '******'";
            $result = $db->sql_query($sql);
            if ($db->sql_numrows($result)) {
                $user_data = $db->sql_fetchrow($result);
                $user_id = $user_data[0];
            }
            $db->sql_freeresult($result);
        } else {
            $user_id = intval(isset($_GET['user_id']) ? $_GET['user_id'] : (isset($_POST['user_id']) ? $_POST['user_id'] : -1));
        }
        if (isset($user_id) && USER_ID == $user_id && !can_admin()) {
            cpg_die(_ERROR, ERR_EDIT_SELF, __FILE__, __LINE__);
        }
        pageheader(U_TITLE);
        edit_user(isset($user_id) ? $user_id : '');
        pagefooter();
        break;
    case 'update':
        $user_id = isset($_GET['user_id']) ? intval($_GET['user_id']) : -1;
        update_user($user_id);
        pageheader(U_TITLE);
        list_users();
        pagefooter();
        break;
    default:
        pageheader(U_TITLE);
コード例 #21
0
ファイル: ranks.php プロジェクト: cbsistem/nexos
  | eMail: support at myndworx dot com                                |
  | Website: http://www.nexoscms.org and http://www.myndworx.com      |  
  +-------------------------------------------------------------------+
  |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('ADMIN_PAGES')) {
    exit;
}
if (!can_admin('members')) {
    die('Access Denied');
}
$pagetitle .= ' ' . _BC_DELIM . ' Ranks';
require 'header.php';
GraphicAdmin('_AMENU2');
OpenTable();
/*
define('IN_PHPBB', 1);
define('IN_ADMIN', true);
$module_name = 'Forums';
$phpbb_root_path = "modules/$module_name/";
include('modules/Forums/common.php');
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
*/
コード例 #22
0
ファイル: add.php プロジェクト: cbsistem/nexos
            $selects .= '<optgroup label="' . $cat['crumb'] . '">';
        } else {
            $selects .= '<option value="' . $cat['cid'] . '"' . (isset($_GET['c']) && $cat['cid'] == intval($_GET['c']) || $cat['cid'] == $in['cat'] ? ' selected="selected"' : '') . '>' . $cat['crumb'] . '</option>';
        }
    }
    $selects .= '</optgroup></select>';
}
require_once 'header.php';
$images = DL_Image::output_list($mng_id, $in['screen']);
$cpgtpl->assign_vars(array('DL_MENU' => dl_menu(), 'DL_ERRORS' => !empty($errors), 'DL_WARNINGS' => !empty($warnings), 'DL_MIRRORS' => DL_Mirror::output_list($mng_id), 'DL_IMAGES' => $images, 'IS_NEW_DL' => !can_admin($module_name), 'CAN_ADMIN' => can_admin($module_name), 'B_SCREENSHOT' => $dl_config['screen_active'] || can_admin($module_name), 'B_ADD_IMAGE' => $dl_config['screen_active'] && $images < $dl_config['screen_max'], 'B_NOTES' => false, 'B_REASON' => false, 'B_UPL_FILE' => $dl_config['upl_file'] || can_admin($module_name), 'B_UPL_IMAGE' => $dl_config['upl_image'] || can_admin($module_name), 'B_PENDING' => false, 'B_FETCH_PAD' => $fetch_pad, 'B_REM_MD5' => $dl_config['md5_remote'], 'L_YES' => _YES, 'L_NO' => _NO, 'L_DELETE' => _DELETE, 'L_UPDATE' => 'Update', 'L_CATEGORY' => _CATEGORY, 'L_SHORT_DESC' => 'Short Description', 'L_MAX_CHARS' => sprintf(_M_CHARS, 255), 'L_DESCRIPTION' => _DESCRIPTION, 'L_AUTHORNAME' => _AUTHORNAME, 'L_AUTHOREMAIL' => _AUTHOREMAIL, 'L_MD5' => 'MD5', 'S_BBCODE' => bbcode_table('in[desc_long]', 'add_download', true), 'DL_TITLE' => htmlprepare($in['title']), 'DL_ACCESS' => group_selectbox('in[access]', $in['access']), 'DL_CATSEL' => $selects, 'DL_DESC_SHORT' => htmlprepare($in['desc_short']), 'DL_DESC_LONG' => htmlprepare($in['desc_long']), 'DL_NOTES' => '', 'DL_REASON' => '', 'DL_NAME' => htmlprepare($in['name']), 'DL_EMAIL' => $in['email'], 'U_DL_FORM' => URL::index('&amp;file=add')));
foreach ($errors as $error) {
    $cpgtpl->assign_block_vars('dl_errors', array('S_ENTRY' => $error));
}
foreach ($warnings as $warning) {
    $cpgtpl->assign_block_vars('dl_warnings', array('S_ENTRY' => $warning));
}
$result = $db->sql_uquery("SELECT * FROM " . $dl_prefix . "_fields \n\tWHERE visible > 0" . (!can_admin($module_name) ? ' AND visible < 3' : '') . " \n\tORDER BY title");
while ($field = $db->sql_fetchrow($result)) {
    $f_title = defined($field['title']) ? constant($field['title']) : $field['title'];
    $f_title = $field['visible'] == 2 ? '* ' . $f_title : $f_title;
    if ($field['type'] == 1 || $field['type'] == 3) {
        $f_value = isset($in[$field['field']]) ? intval($in[$field['field']]) : $field['size'];
        $f_value = $f_value > 0 ? array(' checked="checked"', '') : array('', ' checked="checked"');
        $cpgtpl->assign_block_vars('fields', array('TITLE' => $f_title, 'TYPE' => $field['type'], 'NAME' => $field['field'], 'S_YES' => $f_value[0], 'S_NO' => $f_value[1]));
    } else {
        $f_value = isset($in[$field['field']]) ? htmlprepare($in[$field['field']]) : '';
        $cpgtpl->assign_block_vars('fields', array('TITLE' => $f_title, 'TYPE' => $field['type'], 'NAME' => $field['field'], 'SIZE' => $field['size'], 'VALUE' => $f_value));
    }
}
$cpgtpl->set_filenames(array('body' => 'downloads/manage.html'));
$cpgtpl->display('body');
コード例 #23
0
ファイル: theme.php プロジェクト: cbsistem/nexos
function themeheader()
{
    global $slogan, $sitename, $mainindex, $adminindex, $cpgtpl, $db, $prefix, $banners, $site_logo, $userinfo, $pagetitle, $module_name, $file, $op, $CPG_SESS, $MAIN_CFG, $Blocks;
    if ($MAIN_CFG['global']['admingraphic'] & 4) {
        include 'includes/cssmainmenu.php';
    }
    if (!isset($module_name)) {
        $module_name = false;
    }
    if (!isset($file)) {
        $file = 'index';
    }
    if (!isset($op) || !defined('ADMIN_PAGES')) {
        unset($op);
    }
    $imgr = $imgl = '';
    // left blocks
    if ($Blocks->l) {
        $img = $Blocks->hideblock('600') ? 'plus.png' : 'minus.png';
        $imgl = '<img alt="' . _TOGGLE . '" title="' . _TOGGLE . '" id="pic600" src="themes/' . $CPG_SESS['theme'] . '/images/' . $img . '" onclick="blockswitch(\'600\');" style="cursor:pointer; float:left; padding:2px 0 4px 0;" />';
    }
    // right blocks
    if ($Blocks->r) {
        $img = $Blocks->hideblock('601') ? 'plus.png' : 'minus.png';
        $imgr = '<img alt="' . _TOGGLE . '" title="' . _TOGGLE . '" id="pic601" src="themes/' . $CPG_SESS['theme'] . '/images/' . $img . '" onclick="blockswitch(\'601\');" style="cursor:pointer; float:right; padding:2px 0 4px 0;" />';
    }
    $bc = $pagetitle;
    $bc_parts = explode(' ' . _BC_DELIM . ' ', $pagetitle);
    if (defined('ADMIN_PAGES') && !isset($op)) {
        $bc = '<a class="white" href="' . $adminindex . '">' . $bc_parts[0] . '</a>';
    } elseif (defined('ADMIN_PAGES') && is_admin() && isset($op) && isset($bc_parts[1]) && (file_exists('modules/' . $op . '/admin/index.inc') || file_exists('admin/modules/' . $op . '.php'))) {
        $bc = '<a class="white" href="' . adminlink($op . ($file != 'index' ? '&amp;file=' . $file : '')) . '">' . $bc_parts[1] . '</a>';
    } elseif (isset($module_name) && file_exists('modules/' . $module_name . '/index.php')) {
        $bc = '<a class="white" href="' . getlink($module_name) . '">' . $bc_parts[0] . '</a>';
    } elseif (isset($module_name) && $module_name == 'credits' || $module_name == 'privacy_policy') {
        $bc = '<a class="white" href="' . getlink($module_name) . '">' . $bc_parts[0] . '</a>';
    }
    if (isset($module_name) && !defined('ADMIN_PAGES') && $file != 'index') {
        $bc .= ' ' . _BC_DELIM . ' <a class="white" href="' . getlink($module_name . '&amp;file=' . $file) . '">' . $bc_parts[1] . '</a>';
    }
    if (count($bc_parts) > 1) {
        $a = (isset($module_name) || defined('ADMIN_PAGES')) && $file == 'index' && !isset($op) ? 1 : 2;
        for ($i = $a; $i < count($bc_parts); $i++) {
            $bc .= ' ' . _BC_DELIM . ' ' . $bc_parts[$i];
        }
    }
    $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'), 'ADMIN_PAGES' => defined('ADMIN_PAGES') && is_admin(), 'B_L_VISIBLE' => $Blocks->hideblock('600') ? 'style="display: none"' : '', 'G_LEFTIMAGE' => $imgl, 'G_RIGHTIMAGE' => $imgr, 'S_TOGGLE' => _TOGGLE, 'S_BC' => _BC_DELIM, 'S_IS_ADMIN' => is_admin(), 'S_CAN_ADMIN' => can_admin(), 'S_IS_USER' => is_user(), 'S_LOGO' => $site_logo, 'S_SITENAME' => $sitename, 'S_HOME' => _HOME, 'S_DOWNLOADS' => is_active('Downloads') ? _DownloadsLANG : false, 'S_FORUMS' => _ForumsLANG, 'S_MY_ACCOUNT' => _Your_AccountLANG, 'S_ADMIN' => _ADMINISTRATION, 'A_LOGOUT' => is_admin() . ' | <a class="white" href="' . adminlink('logout') . '">' . _LOGOUT . '</a>', 'S_BANNER' => $banners ? viewbanner() : '', 'U_MAININDEX' => $mainindex, 'U_DOWNLOADS' => getlink('Downloads'), 'U_FORUMS' => getlink('Forums'), 'U_MY_ACCOUNT' => getlink('Your_Account'), 'U_TRANSLATE' => getlink('CPGlang'), 'U_ADMININDEX' => $adminindex, 'I18N' => 'enctype="multipart/form-data" accept-charset="utf-8"', 'WELCOME' => is_user() ? 'Welcome ' . $userinfo['username'] : '******' . _ANONYMOUS, 'BREADCRUMB' => defined('ADMIN_PAGES') && $op != 'logout' && $file != 'index' && !isset($bc_parts[1]) ? $bc : ' ' . _BC_DELIM . ' ' . $bc, 'S_MAIN_MENU' => isset($mmcontent) ? $mmcontent : false));
    $Blocks->display('l');
}
コード例 #24
0
ファイル: common.php プロジェクト: cbsistem/nexos
define('QUOTA_TABLE', $prefix . '_bbattach_quota');
define('QUOTA_LIMITS_TABLE', $prefix . '_bbquota_limits');
// Topic icons
define('TOPIC_ICONS_TABLE', $this_prefix . 'topic_icons');
//
// Define some basic configuration arrays this also prevents
// malicious rewriting of language and otherarray values via
// URI params
//
$board_config = $userdata = $theme = $images = $lang = $nav_links = $attach_config = $topic_icons = array();
$gen_simple_header = FALSE;
require_once 'includes/phpBB/constants.php';
require_once 'includes/phpBB/auth.php';
require_once 'includes/phpBB/functions.php';
require_once "modules/{$this_base}/classes/BoardCache.php";
if (isset($module_name) && can_admin($module_name)) {
    $userinfo['user_level'] = ADMIN;
}
$user_ip = !empty($userinfo['user_ip']) ? $userinfo['user_ip'] : ($user_ip = $userinfo['user_ip'] = $db->binary_safe(Security::get_ip()));
//
// Setup forum wide options, if this fails
// then we output a BB_CRITICAL_ERROR since
// basic forum information is not available
//
$board_config = BoardCache::conf();
// Cache topic icons
if (!Cache::array_load('topic_icons', basename(dirname(__FILE__)), true)) {
    $result = $db->sql_query("SELECT * FROM " . TOPIC_ICONS_TABLE);
    while ($row = $db->sql_fetchrow($result, SQL_ASSOC)) {
        $topic_icons[$row['icon_id']] = $row;
    }
コード例 #25
0
ファイル: new.php プロジェクト: cbsistem/nexos
function NewDownloadsDate()
{
    global $downloadsprefix, $db, $module_name;
    $selectdate = intval($_GET['selectdate']);
    $dateDB = date("d-M-Y", $selectdate);
    $dateView = date("F d, Y", $selectdate);
    include "header.php";
    downl_menu_tpl(1);
    echo '<br />';
    OpenTable();
    $newdownloadDB = Date("Y-m-d", $selectdate);
    $totaldownloads = $db->sql_numrows($db->sql_query("SELECT * FROM " . $downloadsprefix . "_downloads WHERE date LIKE '%{$newdownloadDB}%'"));
    echo "<font class=\"option\"><b>{$dateView} - {$totaldownloads} " . _NEWDOWNLOADS . "</b></font>" . "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"10\" border=\"0\"><tr><td><font class=\"content\">";
    $sql = "SELECT lid, cid, title, description, date, hits, url, downloadratingsummary, totalvotes, totalcomments, filesize, version, homepage FROM " . $downloadsprefix . "_downloads WHERE date LIKE '%{$newdownloadDB}%' ORDER BY title ASC";
    $result = $db->sql_query($sql);
    while ($row = $db->sql_fetchrow($result)) {
        $lid = $row['lid'];
        $cid = $row['cid'];
        $title = $row['title'];
        $description = $row['description'];
        $time = $row['date'];
        $hits = $row['hits'];
        $url = $row['url'];
        $downloadratingsummary = $row['downloadratingsummary'];
        $totalvotes = $row['totalvotes'];
        $totalcomments = $row['totalcomments'];
        $filesize = $row['filesize'];
        $version = $row['version'];
        $homepage = $row['homepage'];
        $downloadratingsummary = number_format($downloadratingsummary, $mainvotedecimal);
        if (can_admin('downloads')) {
            if (eregi("http", $url)) {
                echo "<a href=\"" . adminlink("{$module_name}&mode=DownloadsModDownload&amp;lid={$lid}") . "\"><img src=\"modules/{$module_name}/images/icon30.gif\" border=\"0\" alt=\"" . _EDIT . "\"></a>";
            } else {
                echo "<a href=\"" . adminlink("{$module_name}&mode=DownloadsModDownload&amp;lid={$lid}") . "\"><img src=\"modules/{$module_name}/images/download.gif\" border=\"0\" alt=\"" . _EDIT . "\"></a>";
            }
        } else {
            if (eregi("http", $url)) {
                echo "<img src=\"modules/{$module_name}/images/icon30.gif\" border=\"0\" alt=\"\">";
            } else {
                echo "<img src=\"modules/{$module_name}/images/download.gif\" border=\"0\" alt=\"\">";
            }
        }
        echo "&nbsp;<a href=\"" . getlink("&amp;d_op=getit&amp;lid={$lid}") . "\" class=\"title\">{$title}</a>";
        $datetime = formatDateTime($time . ' 00:00:00', _DATESTRING3);
        newdownloadgraphic($datetime);
        popgraphic($hits);
        detecteditorial($lid, 1);
        echo "<br /><b>" . _DESCRIPTION . ":</b> {$description}<br />";
        echo "<b>" . _VERSION . ":</b> {$version} <b>" . _FILESIZE . ":</b> " . CoolSize($filesize) . "<br />";
        echo "<b>" . _ADDEDON . ":</b> <b>{$datetime}</b> <b>" . _UDOWNLOADS . ":</b> {$hits}";
        $transfertitle = str_replace(" ", "_", $title);
        /* voting & comments stats */
        $votestring = $totalvotes == 1 ? _VOTE : _VOTES;
        if ($downloadratingsummary != "0" || $downloadratingsummary != "0.0") {
            echo " <b>" . _RATING . ":</b> {$downloadratingsummary} ({$totalvotes} {$votestring})";
        }
        echo '<br />';
        $sql2 = "SELECT title FROM " . $downloadsprefix . "_categories WHERE cid='{$cid}'";
        $result2 = $db->sql_query($sql2);
        $row2 = $db->sql_fetchrow($result2);
        $ctitle = $row2[title];
        $ctitle = getparent($cid, $ctitle);
        echo "<B>" . _CATEGORY . ":</B> <A HREF=\"" . getlink("&amp;d_op=viewdownload&amp;cid={$cid}") . "\">{$ctitle}</A><br />";
        if ($homepage != "") {
            echo "<br /><a href=\"{$homepage}\" target=\"new\">" . _HOMEPAGE . "</a> | ";
        }
        echo "<a href=\"" . getlink("&amp;d_op=ratedownload&amp;lid={$lid}") . "\">" . _RATERESOURCE . "</a>";
        if (is_user()) {
            echo " | <a href=\"" . getlink("&amp;d_op=brokendownload&amp;lid={$lid}") . "\">" . _REPORTBROKEN . "</a>";
        }
        echo " | <a href=\"" . getlink("&amp;d_op=viewdownloaddetails&amp;lid={$lid}") . "\">" . _DETAILS . "</a>";
        if ($totalcomments != 0) {
            echo " | <a href=\"" . getlink("&amp;d_op=viewdownloadcomments&amp;lid={$lid}") . "\">" . _SCOMMENTS . " ({$totalcomments})</a>";
        }
        detecteditorial($lid, 0);
        echo "<br /><br />";
    }
    echo "</font></td></tr></table>";
    CloseTable();
    include "footer.php";
}
コード例 #26
0
ファイル: details.php プロジェクト: cbsistem/nexos
    } else {
        $cpgtpl->assign_var('DL_REVIEWS', false);
    }
    $db->sql_freeresult($result);
    if (can_admin($module_name) || $row['submitter'] == $userinfo['user_id']) {
        // pagination
        $cur_page2 = isset($_GET['p_page']) && $_GET['p_page'] > 0 ? intval($_GET['p_page']) : 1;
        $limit2 = ($cur_page2 - 1) * $perpage;
        $result = $db->sql_query("SELECT r.id, r.uid, r.ip, r.title, r.comment, r.score, r.timestamp, u.username, COUNT(r.score) AS votes FROM " . $dl_prefix . "_ratings r\n\tLEFT JOIN " . $user_prefix . "_users u ON (u.user_id = r.uid)\n\tWHERE r.lid='{$global_id}' AND r.comment!='' AND active=0 \n\tGROUP BY r.id DESC, r.uid, r.ip, r.title, r.comment, r.score, r.timestamp, u.username \n\tLIMIT {$perpage} OFFSET {$limit2}");
        list($pending) = $db->sql_ufetchrow("SELECT COUNT(*) FROM " . $dl_prefix . "_ratings \n\tWHERE lid='{$global_id}' AND active=0");
        if ($db->sql_numrows($result)) {
            $cpgtpl->assign_vars(array('DL_P_REVIEW_PAGES' => ceil($pending / $perpage) > 1 ? gen_pagination($pending, $perpage, $cur_page2, '&amp;file=details&amp;id=' . $global_id, 'p_reviews', 'p_page') : false, 'DL_P_REVIEWS' => $pending));
            $i = 0;
            while (list($review_id, $review_uid, $review_ip, $review_title, $review_comment, $review_score, $review_timestamp, $review_uname, $review_votes) = $db->sql_fetchrow($result)) {
                $rating_info = get_rating($review_score, $review_votes);
                $cpgtpl->assign_block_vars('dl_p_review', array('ID' => $review_id, 'U_ID' => htmlprepare(URL::uri()) . '#r' . $review_id, 'RATING' => _DLP_REVIEW . ' #' . $review_id . ': ' . $rating_info['desc'], 'U_MEMBER' => URL::index('Your_Account&amp;profile=' . $review_uid), 'MEMBERNAME' => $review_uname, 'DATE' => generate_date($review_timestamp), 'U_DEL' => can_admin($module_name) || $row['submitter'] == $userinfo['user_id'] ? '<a href="' . URL::index('&amp;del_review=' . $review_id) . '">[' . strtolower(_DELETE) . ']</a>' : false, 'U_APPR' => can_admin($module_name) || $row['submitter'] == $userinfo['user_id'] ? '<a href="' . URL::index('&amp;approve_review=' . $review_id) . '">[' . strtolower(_DLP_APPROVE) . ']</a>' : false, 'TITLE' => $review_title, 'COMMENT' => decode_bb_all($review_comment), 'IP' => decode_ip($review_ip), 'IMG_RATE' => dl_image('stars/' . $rating_info['rating'] . '.png'), 'SPACER' => $i > 0));
                $i++;
            }
        } else {
            $cpgtpl->assign_var('DL_P_REVIEWS', false);
        }
        $db->sql_freeresult($result);
    } else {
        $cpgtpl->assign_var('DL_P_REVIEWS', false);
    }
}
if ($row['pick']) {
    $cpgtpl->assign_block_vars('dl_image', array('SRC' => dl_image('pick.png'), 'TITLE' => _DLP_EDPICK));
}
// custom fields: images
$result = $db->sql_query("SELECT field, img_path, img_alt FROM " . $dl_prefix . "_fields \n\tWHERE type=3 AND visible > 0");
コード例 #27
0
ファイル: tpl.php プロジェクト: cbsistem/nexos
  | eMail: support at myndworx dot com                                |
  | Website: http://www.nexoscms.org and http://www.myndworx.com      | 
  +-------------------------------------------------------------------+
  |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('ADMIN_PAGES')) {
    exit;
}
if (!can_admin('cache')) {
    die('Access Denied');
}
//$keys = array_keys($_POST);
//if (!preg_match('#^[a-z]+$#', $keys[0])) { cpg_error(); }
//if (function_exists("df_$keys[1]_cache")) { $func = "df_$keys[1]_cache"; $func(); }
//else { cpg_error('Unknown function to run'); }
function df_browse_cache()
{
    global $db, $prefix;
    $cached = array('config' => array(), 'themes' => array(), 'modules' => array());
    $dir = str_replace(BASEDIR . 'cache/', '', glob(BASEDIR . 'cache/*.{php,inc}', GLOB_BRACE));
    # get all configuration files
    # core files should have its own formatting
    # all cached files should be lower case
    # modules configuration files should go under the module files list, not under core config list
コード例 #28
0
ファイル: groups.php プロジェクト: cbsistem/nexos
                    cpg_error('No_group_action');
                }
            }
        }
    } else {
        group_head();
        // This is the main display of the page before the admin has selected any options.
        $result = $db->sql_query('SELECT group_id, group_name FROM ' . $prefix . '_bbgroups WHERE group_single_user = 0 ORDER BY group_name');
        $select_list = '';
        $fa = can_admin('forums') ? 4 : 3;
        if ($row = $db->sql_fetchrow($result)) {
            $x = 1;
            do {
                $rownum = is_integer($x / 2) ? 2 : 1;
                $select_list .= '<tr><td class="row' . $rownum . '" align="left" width="25%">' . $row['group_name'] . '</td><td class="row' . $rownum . '" align="left" width="25%"> <a title="' . $lang['Edit_group'] . '" href="' . URL::admin('&amp;gid=' . $row['group_id'] . '&amp;edit=group') . '"> ' . $lang['Edit_group'] . '</a></td>';
                if (can_admin('forums')) {
                    $select_list .= '<td class="row' . $rownum . '" align="left" width="25%"> <a title="' . $row['group_name'] . '" href="' . URL::admin('Forums&amp;do=ug_auth&amp;mode=group&amp;g=' . $row['group_id']) . '">' . $lang['Auth_Control_Forum'] . '</a></td>';
                }
                $select_list .= '<td class="row' . $rownum . '" align="left" width="25%"> <a title="' . _MODULES . ' ' . $lang['Permissions'] . '" href="' . URL::admin('modules') . '">' . _MODULES . ' ' . $lang['Permissions'] . '</a></td></tr>';
                $x++;
            } while ($row = $db->sql_fetchrow($result));
        }
        echo '<p>From this panel you can administer all of your usergroups. You can delete, create and edit existing groups.<br />
You may choose moderators, toggle open/closed group status and set the group name and description</p>
<table width="100%" cellspacing="1" cellpadding="4" border="0" style="margin:auto;" class="forumline">
  <tr>
	<th class="thHead" colspan="' . $fa . '" align="center">Select a group</th>
  </tr>' . $select_list . '<tr>
	<td class="catBottom" align="center"  colspan="' . $fa . '"><form method="post" action="' . URL::admin('groups') . '" enctype="multipart/form-data" accept-charset="utf-8">
<input type="submit" class="liteoption" name="new" value="Create new group" /></form></td>
  </tr>
コード例 #29
0
ファイル: index.php プロジェクト: cbsistem/nexos
function index()
{
    global $downloadsprefix, $db, $show_links_num, $show_links_info, $show_links_inum, $module_name, $bgcolor1, $bgcolor3;
    require_once 'header.php';
    downl_menu_tpl(0);
    echo '<br />';
    OpenTable();
    echo "<center><font class=\"title\"><b>" . _DOWNLOADSMAINCAT . "</b></font></center><br />";
    echo "<table border=\"0\" cellspacing=\"10\" cellpadding=\"0\" align=\"center\"><tr>";
    $sql = "SELECT cid, title, cdescription FROM " . $downloadsprefix . "_categories WHERE parentid='0' ORDER BY title";
    $result = $db->sql_query($sql);
    $count = $dum = 0;
    while ($row = $db->sql_fetchrow($result)) {
        $cid = $row['cid'];
        $title = $row['title'];
        $cdescription = $row['cdescription'];
        if ($show_links_num == 1) {
            list($cnumrows) = $db->sql_ufetchrow("SELECT COUNT(*) FROM " . $downloadsprefix . "_downloads WHERE cid='{$cid}'", SQL_NUM);
            $cnumm = " ({$cnumrows})";
        } else {
            $cnumm = '';
        }
        if ($cnumrows > 0) {
            $folder = "modules/Downloads/images/openfolder.gif";
        } else {
            $folder = "modules/Downloads/images/closedfolder.gif";
        }
        if (can_admin('downloads')) {
            $folderImg = "<a href=\"" . adminlink("{$module_name}&mode=DownloadsModCat&amp;cat={$cid}") . "\"><img src=\"{$folder}\" border=\"0\" alt=\"" . _EDIT . "\" /></a>";
        } else {
            $folderImg = "<img src=\"{$folder}\" border=\"0\" alt=\"{$title}\" />";
        }
        echo "<td valign=\"top\"><font class=\"title\">{$folderImg} <a href=\"" . getlink("&amp;d_op=viewdownload&amp;cid={$cid}") . "\"><b>{$title}</b></a></font>{$cnumm}";
        categorynewdownloadgraphic($cid);
        if ($cdescription) {
            echo "<br /><font class=\"content\">{$cdescription}</font><br />";
        } else {
            echo '<br />';
        }
        $result2 = $db->sql_query("SELECT cid, title FROM " . $downloadsprefix . "_categories WHERE parentid='{$cid}' ORDER BY title LIMIT 0,3");
        $space = 0;
        while ($row2 = $db->sql_fetchrow($result2)) {
            $cid = $row2['cid'];
            $stitle = $row2['title'];
            if ($space > 0) {
                echo ',&nbsp;';
            }
            if ($show_links_num == 1) {
                list($cnumrows2) = $db->sql_ufetchrow("SELECT COUNT(*) FROM " . $downloadsprefix . "_downloads WHERE cid='{$cid}'", SQL_NUM);
                $cnum = " ({$cnumrows2})";
            } else {
                $cnum = "";
            }
            echo "<font class=\"content\"><a href=\"" . getlink("&amp;d_op=viewdownload&amp;cid={$cid}") . "\">{$stitle}</a>{$cnum}</font>";
            $space++;
        }
        if ($count < 1) {
            echo "</td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td>";
            $dum = 1;
        }
        $count++;
        if ($count == 2) {
            echo "</td></tr><tr>";
            $count = 0;
            $dum = 0;
        }
    }
    if ($dum == 1) {
        echo '</tr></table>';
    } elseif ($dum == 0) {
        echo '<td></td></tr></table>';
    }
    list($numrows) = $db->sql_ufetchrow("SELECT COUNT(*) FROM " . $downloadsprefix . "_downloads", SQL_NUM);
    list($catnum) = $db->sql_ufetchrow("SELECT COUNT(*) FROM " . $downloadsprefix . "_categories", SQL_NUM);
    echo "<center><font class=\"content\">" . _THEREARE . " <b>{$numrows}</b> " . _DOWNLOADS . " " . _AND . " <b>{$catnum}</b> " . _CATEGORIES . " " . _INDB . "</font></center>";
    CloseTable();
    if ($show_links_info == 1) {
        echo '<br />';
        OpenTable();
        echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"3\" width=\"100%\">" . "<tr><td width=\"50%\" valign=\"top\" align=\"center\">";
        echo "<div align=\"center\" class=\"title\">" . _NEWDOWNLOADS . "</div>";
        echo "</td><td width=\"50%\" valign=\"top\" align=\"center\">";
        echo "<div align=\"center\" class=\"title\">" . _MOSTPOPULAR . " {$show_links_inum}</div>";
        echo "</td></tr>" . "<tr><td width=\"50%\" valign=\"top\" align=\"center\">";
        OpenTable2();
        $content = '<table border="0" width="100%">';
        $color = $bgcolor3;
        $result = $db->sql_query("SELECT lid, title, hits FROM " . $downloadsprefix . "_downloads ORDER BY date DESC LIMIT 0, {$show_links_inum}");
        while ($row = $db->sql_fetchrow($result)) {
            $title2 = ereg_replace("_", " ", $row['title']);
            $color = $color == $bgcolor3 ? $bgcolor1 : $bgcolor3;
            $content .= "<tr><td bgcolor=\"{$color}\" align=\"left\"><a href=\"" . getlink("&amp;d_op=viewdownloaddetails&amp;lid={$row['lid']}") . "\">{$title2}</a></td>" . "<td bgcolor=\"{$color}\" align=\"center\" width=\"20\">{$row['hits']}</td></tr>";
        }
        echo "{$content}</table>";
        CloseTable2();
        echo "|[ <a href=\"" . getlink("&amp;d_op=NewDownloads") . "\">" . _NEWDOWNLOADS . "</a> ]|";
        echo "</td><td width=\"50%\" valign=\"top\" align=\"center\">";
        OpenTable2();
        $content = "<table border=\"0\" width=\"100%\">";
        $color = $bgcolor3;
        $result = $db->sql_query("SELECT lid, title, hits FROM " . $downloadsprefix . "_downloads ORDER BY hits DESC LIMIT 0, {$show_links_inum}");
        while ($row = $db->sql_fetchrow($result)) {
            $title2 = ereg_replace("_", " ", $row['title']);
            $color = $color == $bgcolor3 ? $bgcolor1 : $bgcolor3;
            $content .= "<tr><td bgcolor=\"{$color}\" align=\"left\"><a href=\"" . getlink("&amp;d_op=viewdownloaddetails&amp;lid={$row['lid']}") . "\">{$title2}</a></td>" . "<td bgcolor=\"{$color}\" align=\"center\" width=\"20\">{$row['hits']}</td></tr>";
        }
        echo "{$content}</table>";
        CloseTable2();
        echo "|[ <a href=\"" . getlink("&amp;d_op=MostPopular") . "\">" . _MOSTPOPULAR . " " . _DOWNLOADS . "</a> ]|";
        echo "</td></tr></table>";
        CloseTable();
    }
    include "footer.php";
}
コード例 #30
0
ファイル: messages.php プロジェクト: cbsistem/nexos
  | eMail: support at myndworx dot com                                |
  | Website: http://www.nexoscms.org and http://www.myndworx.com      | 
  +-------------------------------------------------------------------+
  |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('ADMIN_PAGES')) {
    exit;
}
if (!can_admin('messages')) {
    die('Access Denied');
}
$pagetitle .= ' ' . _BC_DELIM . ' ' . _MESSAGESADMIN;
require_once CORE_PATH . 'nbbcode.php';
if (isset($_GET['status'])) {
    $statusMsg = intval($_GET['status']);
    $result = $db->sql_query("SELECT active FROM " . $prefix . "_message WHERE mid='{$statusMsg}'");
    if ($db->sql_numrows($result) > 0) {
        list($status) = $db->sql_fetchrow($result);
        if (is_numeric($status)) {
            $status = intval(!$status);
            $db->sql_query("UPDATE " . $prefix . "_message SET active='{$status}' WHERE mid='{$statusMsg}'");
        }
    }
    URL::redirect(URL::admin('messages'));