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


PHP pnConfigGetVar函数代码示例

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


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

示例1: Lenses_pntables

function Lenses_pntables()
{
    // Initialize return variable.
    $pntable = array();
    // Prefix for tables.  Or in the case of the main
    // lens table, the entire table name.
    $lenses_table = pnConfigGetVar('prefix') . '_lenses';
    // Define lenses table and columns.
    $pntable['lenses'] = $lenses_table;
    $pntable['lenses_column'] = array('tid' => 'pn_tid', 'name' => 'pn_name', 'aliases' => 'pn_aliases', 'comp_id' => 'pn_comp_id', 'poly_id' => 'pn_poly_id', 'visitint' => 'pn_visitint', 'ew' => 'pn_ew', 'ct' => 'pn_ct', 'dk' => 'pn_dk', 'oz' => 'pn_oz', 'process_text' => 'pn_process_text', 'process_simple' => 'pn_process_simple', 'qty' => 'pn_qty', 'replace_simple' => 'pn_replace_simple', 'replace_text' => 'pn_replace_text', 'wear' => 'pn_wear', 'price' => 'pn_price', 'markings' => 'pn_markings', 'fitting_guide' => 'pn_fitting_guide', 'website' => 'pn_website', 'image' => 'pn_image', 'other_info' => 'pn_other_info', 'discontinued' => 'pn_discontinued', 'display' => 'pn_display', 'redirect' => 'pn_redirect', 'bc_simple' => 'pn_bc_simple', 'bc_all' => 'pn_bc_all', 'max_plus' => 'pn_max_plus', 'max_minus' => 'pn_max_minus', 'max_diam' => 'pn_max_diam', 'min_diam' => 'pn_min_diam', 'diam_1' => 'pn_diam_1', 'base_curves_1' => 'pn_base_curves_1', 'powers_1' => 'pn_powers_1', 'diam_2' => 'pn_diam_2', 'base_curves_2' => 'pn_base_curves_2', 'powers_2' => 'pn_powers_2', 'diam_3' => 'pn_diam_3', 'base_curves_3' => 'pn_base_curves_3', 'powers_3' => 'pn_powers_3', 'sph_notes' => 'pn_sph_notes', 'toric' => 'pn_toric', 'toric_type' => 'pn_toric_type', 'toric_type_simple' => 'pn_toric_type_simple', 'cyl_power' => 'pn_cyl_power', 'max_cyl_power' => 'pn_max_cyl_power', 'cyl_axis' => 'pn_cyl_axis', 'cyl_axis_steps' => 'pn_cyl_axis_steps', 'oblique' => 'pn_oblique', 'cyl_notes' => 'pn_cyl_notes', 'bifocal' => 'pn_bifocal', 'bifocal_type' => 'pn_bifocal_type', 'add_text' => 'pn_add_text', 'max_add' => 'pn_max_add', 'cosmetic' => 'pn_cosmetic', 'enh_names' => 'pn_enh_names', 'enh_names_simple' => 'pn_enh_names_simple', 'opaque_names' => 'pn_opaque_names', 'opaque_names_simple' => 'pn_opaque_names_simple', 'updated' => 'pn_updated');
    // Define companies table and columns.
    $pntable['lenses_companies'] = $lenses_table . '_companies';
    $pntable['lenses_companies_column'] = array('comp_tid' => 'pn_comp_tid', 'comp_name' => 'pn_comp_name', 'logo' => 'pn_logo', 'phone' => 'pn_phone', 'address' => 'pn_address', 'city' => 'pn_city', 'state' => 'pn_state', 'zip' => 'pn_zip', 'url' => 'pn_url', 'email' => 'pn_email', 'comp_desc' => 'pn_comp_desc');
    // Define polymers table and columns.
    $pntable['lenses_polymers'] = $lenses_table . '_polymers';
    $pntable['lenses_polymers_column'] = array('poly_tid' => 'pn_poly_tid', 'fda_grp' => 'pn_fda_grp', 'h2o' => 'pn_h2o', 'poly_name' => 'pn_poly_name', 'poly_desc' => 'pn_poly_desc');
    // Define stats table and columns
    $pntable['lenses_stats'] = $lenses_table . '_stats';
    $pntable['lenses_stats_column'] = array('id' => 'pn_id', 'total' => 'pn_total', 'last_month' => 'pn_last_month', 'this_month' => 'pn_this_month', 'month' => 'pn_month');
    // Define zero results table and columns
    $pntable['lenses_zero'] = $lenses_table . '_zero';
    $pntable['lenses_zero_column'] = array('id' => 'pn_id', 'phrase' => 'pn_phrase', 'total' => 'pn_total', 'last_month' => 'pn_last_month', 'this_month' => 'pn_this_month', 'month' => 'pn_month');
    // Return entire tables array.
    return $pntable;
}
开发者ID:grlf,项目名称:eyedock,代码行数:25,代码来源:pntables.php

示例2: foot

function foot()
{
    global $index, $pnconfig, $pndebug, $dbg, $debug_sqlcalls, $dbg_starttime;
    // modification .71 multisites mouzaia
    /* it should not be necessary here, since config.php is in a table.
        if (!isset($index)) {
    	include(WHERE_IS_PERSO."config.php");
        }
    */
    themefooter();
    /**
     * DebugXHTML will place a link at the bottom of all pages which directs
     * the page to w3.org's validator server.  This will allow all
     * module developers and theme writers to check their code for XHTML
     * compliance.  Transitional XHTML is hard-coded till the next major
     * release.
     */
    $debugxhtml = -1;
    if (pnConfigGetVar('supportxhtml')) {
        if ($debugxhtml) {
            xhtml_display_test();
        }
    }
    // show time to render
    $mtime = explode(" ", microtime());
    $dbg_endtime = $mtime[1] + $mtime[0];
    $dbg_totaltime = $dbg_endtime - $dbg_starttime;
    //printf("<center><font class=\"pn-sub\">Page created in %f seconds.</font></center>", $dbg_totaltime);
    if ($pndebug['debug']) {
        $dbg->v($dbg_totaltime, "Page created in (seconds)");
        $dbg->v($debug_sqlcalls, "Number of SQL Calls");
    }
    echo "</body>\n</html>";
}
开发者ID:BackupTheBerlios,项目名称:microbuilder,代码行数:34,代码来源:footer.php

示例3: blocks_ephem_block

function blocks_ephem_block($row)
{
    list($dbconn) = pnDBGetConn();
    $pntable = pnDBGetTables();
    $currentlang = pnUserGetLang();
    if (!pnSecAuthAction(0, 'Ephemeridsblock::', "{$row['title']}::", ACCESS_READ)) {
        return;
    }
    if (pnConfigGetVar('multilingual') == 1) {
        $column =& $pntable['ephem_column'];
        $querylang = "AND ({$column['elanguage']}='" . pnVarPrepForStore($currentlang) . "' OR {$column['elanguage']}='')";
    } else {
        $querylang = "";
    }
    $today = getdate();
    $eday = $today['mday'];
    $emonth = $today['mon'];
    $column =& $pntable['ephem_column'];
    $result = $dbconn->Execute("SELECT {$column['yid']}, {$column['content']}\n                              FROM {$pntable['ephem']}\n                              WHERE {$column['did']}='" . pnVarPrepForStore($eday) . "' AND {$column['mid']}='" . pnVarPrepForStore($emonth) . "' {$querylang}");
    $boxstuff = '<span class="pn-normal"><b>' . _ONEDAY . '</b></span><br />';
    while (list($yid, $content) = $result->fields) {
        $result->MoveNext();
        $boxstuff .= '<br /><br />';
        $boxstuff .= '<b>' . pnVarPrepForDisplay($yid) . '</b><br />' . pnVarPrepHTMLDisplay(nl2br($content)) . '';
    }
    if (empty($row['title'])) {
        $row['title'] = _EPHEMERIDS;
    }
    $row['content'] = $boxstuff;
    return themesideblock($row);
}
开发者ID:BackupTheBerlios,项目名称:microbuilder,代码行数:31,代码来源:ephem.php

示例4: pnBannerDisplay

/**
 * Function to display banners in all pages
 */
function pnBannerDisplay($type = 0)
{
    // test on config settings
    if (pnConfigGetVar('banners') != 1) {
        return '&nbsp;';
    }
    // added check for numeric type - markwest
    if (!is_numeric($type)) {
        return '&nbsp;';
    }
    $dbconn =& pnDBGetConn(true);
    $pntable =& pnDBGetTables();
    $column =& $pntable['banner_column'];
    $bresult =& $dbconn->Execute("SELECT count(*) AS count FROM {$pntable['banner']}\n\t\t\t\t\t\t\t\tWHERE {$column['type']} = '" . (int) pnVarPrepForStore($type) . "'");
    list($numrows) = $bresult->fields;
    // we no longer need this, free the resources
    $bresult->Close();
    /* Get a random banner if exist any. */
    /* More efficient random stuff, thanks to Cristian Arroyo from http://www.planetalinux.com.ar */
    if ($numrows > 1) {
        $numrows = $numrows - 1;
        mt_srand((double) microtime() * 1000000);
        $bannum = mt_rand(0, $numrows);
    } else {
        $bannum = 0;
    }
    $column =& $pntable['banner_column'];
    //$query = buildSimpleQuery ('banner', array ('bid', 'imageurl','clickurl'), "$column[type] = $type", '', 1, $bannum);
    $query = "SELECT {$column['bid']}, {$column['imageurl']}, {$column['clickurl']}\n\t\t\t\tFROM {$pntable['banner']}\n\t\t\t\tWHERE {$column['type']} = '" . (int) pnVarPrepForStore($type) . "'";
    $bresult2 =& $dbconn->SelectLimit($query, 1, $bannum);
    list($bid, $imageurl, $clickurl) = $bresult2->fields;
    // we no longer need this, free the resources
    $bresult2->Close();
    $myIP = pnConfigGetVar('myIP');
    $myhost = pnServerGetVar("REMOTE_ADDR");
    if (!empty($myIP) && substr($myhost, 0, strlen($myIP)) == $myIP) {
        // itevo, MNA:  added temporary variable to check when inserting a finished banner (insert only when variable is not set)
        $ignore_bannerfinish = 1;
    } else {
        $dbconn->Execute("UPDATE {$pntable['banner']}\n                        SET {$column['impmade']}={$column['impmade']}+1\n                        WHERE {$column['bid']}=" . (int) pnVarPrepForStore($bid) . "");
    }
    if ($numrows > 0) {
        $aborrar =& $dbconn->Execute("SELECT {$column['cid']},{$column['imptotal']},\n                                          {$column['impmade']}, {$column['clicks']},\n                                          {$column['date']}\n                                   FROM {$pntable['banner']}\n                                   WHERE {$column['bid']}=" . (int) pnVarPrepForStore($bid) . "");
        list($cid, $imptotal, $impmade, $clicks, $date) = $aborrar->fields;
        $aborrar->Close();
        /* Check if this impression is the last one and print the banner */
        if ($imptotal == $impmade && !isset($ignore_bannerfinish)) {
            $column =& $pntable['bannerfinish_column'];
            $dbconn->Execute("INSERT INTO {$pntable['bannerfinish']}\n                            ( {$column['bid']}, {$column['cid']}, {$column['impressions']}, {$column['clicks']}, {$column['datestart']}, {$column['dateend']} )\n                            VALUES (NULL, '" . pnVarPrepForStore($cid) . "', '" . pnVarPrepForStore($impmade) . "', '" . pnVarPrepForStore($clicks) . "', '" . pnVarPrepForStore($date) . "', now())");
            $dbconn->Execute("DELETE FROM {$pntable['banner']} WHERE {$column['bid']}=" . (int) pnVarPrepForStore($bid) . "");
        }
        list($bid, $clickurl, $imageurl) = pnVarPrepForDisplay($bid, $clickurl, $imageurl);
        if ($type == 1 or $type == 2 or $type == 0) {
            echo "<a href=\"banners.php?op=click&amp;bid={$bid}\" title=\"{$clickurl}\"><img src=\"{$imageurl}\" alt=\"{$clickurl}\" /></a>";
        } else {
            $content = "<a href=\"banners.php?op=click&amp;bid={$bid}\" title=\"{$clickurl}\"><img src=\"{$imageurl}\" alt=\"{$clickurl}\" /></a>";
            return $content;
        }
    }
}
开发者ID:BackupTheBerlios,项目名称:freshwind-svn,代码行数:63,代码来源:pnBanners.php

示例5: mediashare_vfs_db_dump

function mediashare_vfs_db_dump()
{
    $fileref = $_GET['ref'];
    // Retrieve image information
    if (!($media = pnModAPIFunc('mediashare', 'vfs_db', 'getMedia', array('fileref' => $fileref)))) {
        return false;
    }
    // Check access
    if (!mediashareAccessAlbum($media['albumId'], mediashareAccessRequirementView, null)) {
        return LogUtil::registerPermissionError();
    }
    // Some Mediashare users have reported this to make their setup work. The buffer may contain something
    // due to a buggy template or block
    while (@ob_end_clean()) {
    }
    if (pnConfigGetVar('UseCompression') == 1) {
        // With the "while (@ob_end_clean());" stuff above we are guranteed that no z-buffering is done
        // But(!) the "ob_start("ob_gzhandler");" made by pnAPI.php means a "Content-Encoding: gzip" is set.
        // So we need to reset this header since no compression is done
        header("Content-Encoding: identity");
    }
    // Check cached versus modified date
    $lastModifiedDate = date('D, d M Y H:i:s T', $media['modifiedDate']);
    $currentETag = $media['modifiedDate'];
    global $HTTP_SERVER_VARS;
    $cachedDate = isset($HTTP_SERVER_VARS['HTTP_IF_MODIFIED_SINCE']) ? $HTTP_SERVER_VARS['HTTP_IF_MODIFIED_SINCE'] : null;
    $cachedETag = isset($HTTP_SERVER_VARS['HTTP_IF_NONE_MATCH']) ? $HTTP_SERVER_VARS['HTTP_IF_NONE_MATCH'] : null;
    // If magic quotes are on then all query/post variables are escaped - so strip slashes to make a compare possible
    // - only cachedETag is expected to contain quotes
    if (get_magic_quotes_gpc()) {
        $cachedETag = stripslashes($cachedETag);
    }
    if ((empty($cachedDate) || $lastModifiedDate == $cachedDate) && '"' . $currentETag . '"' == $cachedETag) {
        header("HTTP/1.1 304 Not Modified");
        header("Status: 304 Not Modified");
        header("Expires: " . date('D, d M Y H:i:s T', time() + 180 * 24 * 3600));
        // My PHP insists on Expires in 1981 as default!
        header('Pragma: cache');
        // My PHP insists on putting a pragma "no-cache", so this is an attempt to avoid that
        header('Cache-Control: public');
        header("ETag: \"{$media['modifiedDate']}\"");
        return true;
    }
    header("Expires: " . date('D, d M Y H:i:s T', time() + 180 * 24 * 3600));
    // My PHP insists on Expires in 1981 as default!
    header('Pragma: cache');
    // My PHP insists on putting a pragma "no-cache", so this is an attempt to avoid that
    header('Cache-Control: public');
    header("ETag: \"{$media['modifiedDate']}\"");
    // Ensure correct content-type and a filename for eventual download
    header("Content-Type: {$media['mimeType']}");
    header("Content-Disposition: inline; filename=\"{$media['title']}\"");
    header("Last-Modified: {$lastModifiedDate}");
    header("Content-Length: " . strlen($media['data']));
    echo $media['data'];
    return true;
}
开发者ID:ro0f,项目名称:Mediashare,代码行数:57,代码来源:pnvfs_db.php

示例6: pnBannerDisplay

/**
 * Function to display banners in all pages
 */
function pnBannerDisplay($type = 0)
{
    // test on config settings
    if (pnConfigGetVar('banners') != 1) {
        return '&nbsp;';
    }
    // added check for numeric type - markwest
    if (!is_numeric($type)) {
        return '&nbsp;';
    }
    list($dbconn) = pnDBGetConn();
    $pntable = pnDBGetTables();
    $column =& $pntable['banner_column'];
    $bresult = $dbconn->Execute("SELECT count(*) AS count FROM {$pntable['banner']}\n\t\t\t\t\t\t\t\tWHERE {$column['type']} = {$type}");
    list($numrows) = $bresult->fields;
    // we no longer need this, free the resources
    $bresult->Close();
    /* Get a random banner if exist any. */
    /* More efficient random stuff, thanks to Cristian Arroyo from http://www.planetalinux.com.ar */
    if ($numrows > 1) {
        $numrows = $numrows - 1;
        mt_srand((double) microtime() * 1000000);
        $bannum = mt_rand(0, $numrows);
    } else {
        $bannum = 0;
    }
    $column =& $pntable['banner_column'];
    $query = buildSimpleQuery('banner', array('bid', 'imageurl', 'clickurl'), "{$column['type']} = {$type}", '', 1, $bannum);
    $bresult2 = $dbconn->Execute($query);
    list($bid, $imageurl, $clickurl) = $bresult2->fields;
    // we no longer need this, free the resources
    $bresult2->Close();
    $myIP = pnConfigGetVar('myIP');
    $myhost = getenv("REMOTE_ADDR");
    if ($myIP == $myhost) {
        // do nothing
    } else {
        $dbconn->Execute("UPDATE {$pntable['banner']}\n                        SET {$column['impmade']}={$column['impmade']}+1\n                        WHERE {$column['bid']}=" . pnVarPrepForStore($bid) . "");
    }
    if ($numrows > 0) {
        $aborrar = $dbconn->Execute("SELECT {$column['cid']},{$column['imptotal']},\n                                          {$column['impmade']}, {$column['clicks']},\n                                          {$column['date']}\n                                   FROM {$pntable['banner']}\n                                   WHERE {$column['bid']}=" . pnVarPrepForStore($bid) . "");
        list($cid, $imptotal, $impmade, $clicks, $date) = $aborrar->fields;
        $aborrar->Close();
        /* Check if this impression is the last one and print the banner */
        if ($imptotal == $impmade) {
            $column =& $pntable['bannerfinish_column'];
            $dbconn->Execute("INSERT INTO {$pntable['bannerfinish']}\n                            ( {$column['bid']}, {$column['cid']}, {$column['impressions']}, {$column['clicks']}, {$column['datestart']}, {$column['dateend']} )\n                            VALUES (NULL, '" . pnVarPrepForStore($cid) . "', '" . pnVarPrepForStore($impmade) . "', '" . pnVarPrepForStore($clicks) . "', '" . pnVarPrepForStore($date) . "', now())");
            $dbconn->Execute("DELETE FROM {$pntable['banner']} WHERE {$column['bid']}=" . pnVarPrepForStore($bid) . "");
        }
        if ($type == 1 or $type == 2 or $type == 0) {
            echo "<a href=\"banners.php?op=click&amp;bid={$bid}\" target=\"_blank\" title=\"{$clickurl}\"><img src=\"{$imageurl}\" border=\"0\" alt=\"" . _CLICK . "\"></a>";
        } else {
            $content = "<a href=\"banners.php?op=click&amp;bid={$bid}\" target=\"_blank\" title=\"{$clickurl}\"><img src=\"{$imageurl}\" border=\"0\" alt=\"" . _CLICK . "\"></a>";
            return $content;
        }
    }
}
开发者ID:BackupTheBerlios,项目名称:microbuilder,代码行数:60,代码来源:pnBanners.php

示例7: blocks_thelang_block

function blocks_thelang_block($row)
{
    $currentlang = pnUserGetLang();
    if (!pnSecAuthAction(0, 'Languageblock::', "{$row['title']}::", ACCESS_OVERVIEW)) {
        return;
    }
    if (!pnConfigGetVar('multilingual')) {
        return;
    }
    $currentURL = $_SERVER['REQUEST_URI'];
    if ($currentURL === "") {
        $currentURL = "index.php";
    }
    $pattern = '/\\?newlang=.../';
    $currentURL = preg_replace($pattern, '', $currentURL);
    $pattern = '/\\&newlang=.../';
    $currentURL = pnVarPrepForDisplay(preg_replace($pattern, '', $currentURL));
    $append = "&amp;";
    if (strpos($currentURL, '?') === false) {
        $append = "?";
    }
    $lang = languagelist();
    $handle = opendir('language');
    while ($f = readdir($handle)) {
        if (is_dir("language/{$f}") && !empty($lang[$f])) {
            $langlist[$f] = $lang[$f];
            $sel_lang[$f] = '';
        }
    }
    asort($langlist);
    $content = '<center><font class="pn-normal">' . _SELECTGUILANG . '</font><br><br>';
    if (pnConfigGetVar('useflags')) {
        $i = 1;
        foreach ($langlist as $k => $v) {
            if ($i > 3) {
                $content .= "<br>\n";
                $i = 1;
            }
            $imgsize = @getimagesize("images/flags/flag-{$k}.png");
            $content .= "<a href=\"{$currentURL}" . $append . "newlang={$k}\"><img src=\"images/flags/flag-{$k}.png\" border=\"0\" alt=\"{$lang[$k]}\" hspace=\"3\" vspace=\"3\" {$imgsize['3']}></a>";
            $i++;
        }
        $content .= '</center>';
    } else {
        $content .= '<form method="post" action="index.php"><select class="pn-text" name="newlanguage" onChange="top.location.href=this.options[this.selectedIndex].value">';
        $sel_lang[$currentlang] = ' selected';
        foreach ($langlist as $k => $v) {
            $content .= "<option value=\"{$currentURL}" . $append . "newlang={$k}\"{$sel_lang[$k]}>{$v}</option>\n";
        }
        $content .= '</select></form></center>';
    }
    if (empty($row['title'])) {
        $row['title'] = _SELECTLANGUAGE;
    }
    $row['content'] = $content;
    return themesideblock($row);
}
开发者ID:BackupTheBerlios,项目名称:microbuilder,代码行数:57,代码来源:thelang.php

示例8: blocks_login_block

function blocks_login_block($row)
{
    global $HTTP_SERVER_VARS;
    if (empty($row['title'])) {
        $row['title'] = 'Login';
    }
    if (!pnSecAuthAction(0, 'Loginblock::', "{$row['title']}::", ACCESS_READ)) {
        return;
    }
    // code taken pnGetBaseURI to fix issue with IIS not passing request_uri
    // markwest
    // Start of with REQUEST_URI
    if (isset($HTTP_SERVER_VARS['REQUEST_URI'])) {
        $path = $HTTP_SERVER_VARS['REQUEST_URI'];
    } else {
        $path = getenv('REQUEST_URI');
    }
    if (empty($path) || substr($path, -1, 1) == '/') {
        // REQUEST_URI was empty or pointed to a path
        // Try looking at PATH_INFO
        $path = getenv('PATH_INFO');
        if (empty($path)) {
            // No luck there either
            // Try SCRIPT_NAME
            if (isset($HTTP_SERVER_VARS['SCRIPT_NAME'])) {
                $path = $HTTP_SERVER_VARS['SCRIPT_NAME'];
            } else {
                $path = getenv('SCRIPT_NAME');
            }
        }
    }
    if (!pnUserLoggedIn()) {
        // prettified a little with a table for inputs and button to avoid bugs like #493456 (Andy Varganov)
        $boxstuff = '<form action="user.php" method="post">';
        $boxstuff .= '<table border="0" width="100%" cellspacing="0" cellpadding="1"><tr><td>';
        $boxstuff .= '<span class="pn-normal">&nbsp;' . _BLOCKNICKNAME . '</span></td></tr><tr><td>';
        $boxstuff .= '<input type="text" name="uname" size="14" maxlength="25"></td></tr><tr><td>';
        $boxstuff .= '<span class="pn-normal">&nbsp;' . _BLOCKPASSWORD . '</span></td></tr><tr><td>';
        $boxstuff .= '<input type="password" name="pass" size="14" maxlength="20"></td></tr><tr><td>';
        if (pnConfigGetVar('seclevel') != 'High') {
            $boxstuff .= '<input type="checkbox" value="1" name="rememberme" />';
            $boxstuff .= '<span class="pn-normal">&nbsp;' . _REMEMBERME . '</span></td></tr><tr><td>';
        }
        $boxstuff .= '<br>';
        $boxstuff .= '<input type="hidden" name="module" value="NS-User" />';
        $boxstuff .= '<input type="hidden" name="op" value="login" />';
        $boxstuff .= '<input type="hidden" name="url" value="' . pnVarPrepForDisplay($path) . '" />';
        $boxstuff .= '<input type="submit" value="' . _LOGIN . '" /></td></tr><tr><td>';
        $boxstuff .= '<br /><span class="pn-normal">' . _ASREGISTERED . '</span></td></tr><tr><td></table></form>';
        if (empty($row['title'])) {
            $row['title'] = _LOGIN;
        }
        $row['content'] = $boxstuff;
        return themesideblock($row);
    }
}
开发者ID:BackupTheBerlios,项目名称:microbuilder,代码行数:56,代码来源:login.php

示例9: blocks_topic_block

function blocks_topic_block($row)
{
    //global $topic, $catid;
    list($dbconn) = pnDBGetConn();
    $pntable = pnDBGetTables();
    $currentlang = pnUserGetLang();
    if (!pnSecAuthAction(0, 'Topicblock::', "{$row['title']}::", ACCESS_READ)) {
        return;
    }
    $language = pnConfigGetVar('language');
    $topic = "";
    $catid = "";
    if (pnConfigGetVar('multilingual') == 1) {
        $column =& $pntable['stories_column'];
        $querylang = "AND ({$column['alanguage']}='{$currentlang}' OR {$column['alanguage']}='')";
        /* the OR is needed to display stories who are posted to ALL languages */
    } else {
        $querylang = '';
    }
    $column =& $pntable['topics_column'];
    $result = $dbconn->Execute("SELECT {$column['topicid']} AS topicid, {$column['topicname']} as topicname FROM {$pntable['topics']} ORDER BY topicname");
    if ($result->EOF) {
        return;
    } else {
        $boxstuff = '<span class="pn-normal">';
        if ($topic == "") {
            $boxstuff .= "<strong><big>&middot;</big></strong>&nbsp;<b><a href=\"modules.php?op=modload&amp;name=Topics&amp;file=index\">" . _ALL_TOPICS . "</a></b><br>";
        } else {
            $boxstuff .= "<strong><big>&middot;</big></strong>&nbsp;<a href=\"modules.php?op=modload&amp;name=News&amp;file=index&amp;catid={$catid}\">" . _ALL_TOPICS . "</a><br>";
        }
        while (!$result->EOF) {
            $srow = $result->GetRowAssoc(false);
            $result->MoveNext();
            if (pnSecAuthAction(0, 'Topics::Topic', "{$srow['topicname']}::{$srow['topicid']}", ACCESS_READ)) {
                $column =& $pntable['stories_column'];
                $result2 = $dbconn->Execute("SELECT {$column['time']} AS unixtime FROM {$pntable['stories']} WHERE {$column['topic']}={$srow['topicid']} {$querylang} ORDER BY {$column['time']} DESC");
                if (!$result2->EOF) {
                    $story = $result2->GetRowAssoc(false);
                    $story['unixtime'] = $result2->UnixTimeStamp($story['unixtime']);
                    $sdate = ml_ftime(_DATEBRIEF, $story['unixtime']);
                    if ($topic == $srow['topicid']) {
                        $boxstuff .= "<strong><big>&middot;</big></strong>&nbsp;<span class=\"pn-title\"><b>{$srow['topicname']}</b></span> <span class=\"pn-sub\">({$sdate})</span><br>";
                    } else {
                        $boxstuff .= "<strong><big>&middot;</big></strong>&nbsp;<a class=\"pn-normal\" href=\"modules.php?op=modload&amp;name=News&amp;file=index&amp;catid={$catid}&amp;topic={$srow['topicid']}\">{$srow['topicname']}</a> <span class=\"pn-sub\">({$sdate})</span><br>";
                    }
                }
            }
        }
    }
    $boxstuff .= '</span>';
    if (empty($row['title'])) {
        $row['title'] = _TOPICS;
    }
    $row['content'] = $boxstuff;
    return themesideblock($row);
}
开发者ID:BackupTheBerlios,项目名称:microbuilder,代码行数:56,代码来源:topic.php

示例10: admin_menu

function admin_menu($help_file = '')
{
    $pntable = pnDBGetTables();
    list($newsubs) = db_select_one_row("SELECT count(*) FROM {$pntable['queue']}");
    if (!pnSecAuthAction(0, "::", '::', ACCESS_EDIT)) {
        // suppress admin display - return to index.
        pnRedirect('index.php');
    } else {
        menu_title('admin.php', _ADMINMENU);
        menu_graphic(pnConfigGetVar('admingraphic'));
        if ($help_file != '') {
            menu_help($help_file, _ONLINEMANUAL);
        }
        $mods = pnModGetAdminMods();
        if ($mods == false) {
            // there aren't admin modules
            return;
        }
        foreach ($mods as $mod) {
            // Hack until the new news module comes into being
            // TODO - remove this at appropriate time
            if ($mod['name'] == 'AddStory') {
                $mod['name'] = 'Stories';
            }
            if (pnSecAuthAction(0, "{$mod['name']}::", '::', ACCESS_EDIT)) {
                if (file_exists("modules/" . pnVarPrepForOS($mod['directory']) . "/pnadmin.php")) {
                    $file = "modules/" . pnVarPrepForOS($mod['directory']) . "/pnimages/admin.";
                    if (file_exists($file . 'gif')) {
                        $imgfile = $file . 'gif';
                    } elseif (file_exists($file . 'jpg')) {
                        $imgfile = $file . 'jpg';
                    } elseif (file_exists($file . 'png')) {
                        $imgfile = $file . 'png';
                    } else {
                        $imgfile = 'modules/NS-Admin/images/default.gif';
                    }
                    menu_add_option(pnVarPrepForDisplay(pnModURL($mod['name'], 'admin')), $mod['displayname'], $imgfile);
                } else {
                    $file = "modules/" . pnVarPrepForOS($mod['directory']) . "/images/admin.";
                    if (file_exists($file . 'gif')) {
                        $imgfile = $file . 'gif';
                    } elseif (file_exists($file . 'jpg')) {
                        $imgfile = $file . 'jpg';
                    } elseif (file_exists($file . 'png')) {
                        $imgfile = $file . 'png';
                    } else {
                        $imgfile = 'modules/NS-Admin/images/default.gif';
                    }
                    menu_add_option("admin.php?module={$mod['directory']}&amp;op=main", $mod['displayname'], $imgfile);
                }
            }
        }
    }
}
开发者ID:BackupTheBerlios,项目名称:microbuilder,代码行数:54,代码来源:tools.php

示例11: blocks_category_block

function blocks_category_block($row)
{
    global $topic, $catid;
    list($dbconn) = pnDBGetConn();
    $pntable = pnDBGetTables();
    if (!pnSecAuthAction(0, 'Categoryblock::', "{$row['title']}::", ACCESS_READ)) {
        return;
    }
    if (pnConfigGetVar('multilingual') == 1) {
        $column =& $pntable['stories_column'];
        $querylang = "AND ({$column['alanguage']}='" . pnVarPrepForStore(pnUserGetLang()) . "' OR {$column['alanguage']}='')";
        /* the OR is needed to display stories who are posted to ALL languages */
    } else {
        $querylang = '';
    }
    $column =& $pntable['stories_cat_column'];
    $result = $dbconn->Execute("SELECT {$column['catid']} as catid, {$column['title']} as title FROM {$pntable['stories_cat']} ORDER BY {$column['title']}");
    if ($result->EOF) {
        return;
    } else {
        $boxstuff = '<span class="pn-normal">';
        if ($catid == "") {
            // $boxstuff .= '<strong><big>&middot;</big></strong>&nbsp;<b>'._ALL_CATEGORIES.'</b><br />';
            $boxstuff .= "";
        } else {
            $boxstuff .= "<strong><big>&middot;</big></strong>&nbsp;<a href=\"modules.php?op=modload&amp;name=News&amp;file=index&amp;topic={$topic}\">" . _ALL_CATEGORIES . "</a><br />";
        }
        for (; !$result->EOF; $result->MoveNext()) {
            $srow = $result->GetRowAssoc(false);
            if (pnSecAuthAction(0, 'Stories::Category', "{$srow['title']}::{$srow['catid']}", ACCESS_READ)) {
                $column =& $pntable['stories_column'];
                $result2 = $dbconn->Execute("SELECT {$column['time']} AS unixtime\n                                           FROM {$pntable['stories']}\n                                           WHERE {$column['catid']}=" . pnVarPrepForStore($srow['catid']) . " {$querylang}\n                                           ORDER BY {$column['time']} DESC");
                if (!$result2->EOF) {
                    $story = $result2->GetRowAssoc(false);
                    $story['unixtime'] = $result2->UnixTimeStamp($story['unixtime']);
                    $sdate = ml_ftime(_DATEBRIEF, $story['unixtime']);
                    if ($catid == $srow['catid']) {
                        $boxstuff .= "<strong><big>&middot;</big></strong>&nbsp;<span class=\"pn-title\"><b>" . pnVarPrepForDisplay($srow['title']) . "</b></span> <span class=\"pn-sub\">(" . pnVarPrepForDisplay($sdate) . ")</span><br />";
                    } else {
                        $boxstuff .= "<strong><big>&middot;</big></strong>&nbsp;<a class=\"pn-normal\" href=\"modules.php?op=modload&amp;name=News&amp;file=index&amp;catid={$srow['catid']}&amp;topic={$topic}\">" . pnVarPrepForDisplay($srow['title']) . "</a> <span class=\"pn-sub\">(" . pnVarPrepForDisplay($sdate) . ")</span><br />";
                    }
                }
            }
        }
    }
    $boxstuff .= '</span>';
    if (empty($row['title'])) {
        $row['title'] = _CATEGORIES;
    }
    $row['content'] = $boxstuff;
    return themesideblock($row);
}
开发者ID:BackupTheBerlios,项目名称:microbuilder,代码行数:52,代码来源:category.php

示例12: template_pntables

/**
 * This function is called internally by the core whenever the module is
 * loaded.  It adds in the information
 */
function template_pntables()
{
    // Initialise table array
    $pntable = array();
    // Get the name for the template item table.  This is not necessary
    // but helps in the following statements and keeps them readable
    $template = pnConfigGetVar('prefix') . '_template';
    // Set the table name
    $pntable['template'] = $template;
    // Set the column names.  Note that the array has been formatted
    // on-screen to be very easy to read by a user.
    $pntable['template_column'] = array('tid' => $template . '.pn_tid', 'name' => $template . '.pn_name', 'number' => $template . '.pn_number');
    // Return the table information
    return $pntable;
}
开发者ID:BackupTheBerlios,项目名称:microbuilder,代码行数:19,代码来源:pntables.php

示例13: themeheader

function themeheader()
{
    $sitename = pnConfigGetVar('sitename');
    $banners = pnConfigGetVar('banners');
    echo "</head>";
    echo "<body>" . "<br>";
    if (pnModAvailable('Banners')) {
        pnBannerDisplay();
    }
    echo "<br>" . "<table border=\"0\" cellpadding=\"4\" cellspacing=\"0\" width=\"100%\" align=\"center\"><tr><td bgcolor=\"{$GLOBALS['bgcolor1']}\">" . "<table border=\"0\" cellspacing=\"0\" cellpadding=\"3\" width=\"100%\" bgcolor=\"{$GLOBALS['bgcolor1']}\"><tr><td>" . "<a href=\"index.php\"><img src=\"" . WHERE_IS_PERSO . "images/logo.gif\" Alt=\"" . _WELCOMETO . " {$sitename}\" border=\"0\"></a>" . "</td><td align=\"right\">" . '<form action="modules.php" method="post">' . '<input type="hidden" name="name" value="Search">' . '<input type="hidden" name="file" value="index">' . '<input type="hidden" name="op" value="modload">' . '<input type="hidden" name="action" value="search">' . '<input type="hidden" name="overview" value="1">' . '<input type="hidden" name="active_stories" value="1">' . '<input type="hidden" name="bool" value="AND">' . '<input type="hidden" name="stories_cat" value="">' . '<input type="hidden" name="stories_topics" value="">' . '<div align="right"><font class="pn-normal">' . _SEARCH . '&nbsp;</font>' . "<input class=\"pn-text\" NAME=\"q\" TYPE=\"text\" VALUE=\"\">&nbsp;\n" . '</div>' . '</form>' . "</td></tr></table></td></tr><tr><td valign=\"top\" width=\"100%\" bgcolor=\"{$GLOBALS['bgcolor1']}\">" . "<table border=\"0\" cellspacing=\"0\" cellpadding=\"2\" width=\"100%\">\n          <tr><td valign=\"top\" width=\"150\" bgcolor=\"{$GLOBALS['bgcolor1']}\">";
    blocks('left');
    echo "<img src=\"images/global/pix.gif\" border=\"0\" width=\"100%\" height=\"1\" alt=\"\">\n          </td>\n          <td>&nbsp;&nbsp;</td>\n          <td valign=\"top\">";
    if ($GLOBALS['index'] == 1) {
        blocks('centre');
    }
}
开发者ID:BackupTheBerlios,项目名称:microbuilder,代码行数:16,代码来源:theme.php

示例14: postcalendar_pntables

/**
 * This function is called internally by the core whenever the module is
 * loaded.  It adds in the information
 */
function postcalendar_pntables()
{
    // Initialise table array
    $pntable = array();
    $prefix = pnConfigGetVar('prefix');
    //$prefix = 'Rogue';
    $pc_events = $prefix . '_postcalendar_events';
    $pntable['postcalendar_events'] = $pc_events;
    $pntable['postcalendar_events_column'] = array('eid' => 'pc_eid', 'catid' => 'pc_catid', 'lid' => 'pc_lid', 'aid' => 'pc_aid', 'title' => 'pc_title', 'time' => 'pc_time', 'hometext' => 'pc_hometext', 'comments' => 'pc_comments', 'counter' => 'pc_counter', 'topic' => 'pc_topic', 'informant' => 'pc_informant', 'eventDate' => 'pc_eventDate', 'duration' => 'pc_duration', 'endDate' => 'pc_endDate', 'recurrtype' => 'pc_recurrtype', 'recurrspec' => 'pc_recurrspec', 'recurrfreq' => 'pc_recurrfreq', 'startTime' => 'pc_startTime', 'endTime' => 'pc_endTime', 'alldayevent' => 'pc_alldayevent', 'location' => 'pc_location', 'conttel' => 'pc_conttel', 'contname' => 'pc_contname', 'contemail' => 'pc_contemail', 'website' => 'pc_website', 'fee' => 'pc_fee', 'eventstatus' => 'pc_eventstatus', 'sharing' => 'pc_sharing', 'language' => 'pc_language');
    // @since version 3.1
    // new category table
    $pc_categories = $prefix . '_postcalendar_categories';
    $pntable['postcalendar_categories'] = $pc_categories;
    $pntable['postcalendar_categories_column'] = array('catid' => 'pc_catid', 'catname' => 'pc_catname', 'catcolor' => 'pc_catcolor', 'catdesc' => 'pc_catdesc', 'recurrtype' => 'pc_recurrtype', 'recurrspec' => 'pc_recurrspec', 'recurrfreq' => 'pc_recurrfreq', 'duration' => 'pc_duration', 'limit' => 'pc_dailylimit');
    $pc_limit = $prefix . '_postcalendar_limits';
    $pntable['postcalendar_limits'] = $pc_limit;
    $pntable['postcalendar_limits_column'] = array('limitid' => 'pc_limitid', 'catid' => 'pc_catid', 'starttime' => 'pc_starttime', 'endtime' => 'pc_endtime', 'limit' => 'pc_limit');
    return $pntable;
}
开发者ID:juggernautsei,项目名称:openemr,代码行数:23,代码来源:pntables.php

示例15: send_email

function send_email()
{
    $adminmail = pnConfigGetVar('adminmail');
    $subject = "" . _ERROR404_MAILSUBJECT . "";
    $sitename = pnConfigGetVar('sitename');
    $remote_addr = pnServerGetVar('REMOTE_ADDR');
    $http_referer = pnServerGetVar('HTTP_REFERER');
    $redirect_url = pnServerGetVar('REDIRECT_URL');
    $server = pnServerGetVar('HTTP_HOST');
    $errordoc = "http://{$server}{$redirect_url}";
    $errortime = ml_ftime(_DATETIMEBRIEF, date(time()));
    $message = "{$subject}\n\n";
    $message .= "TIME: {$errortime}\n";
    $message .= "REMOTE_ADDR: {$remote_addr}\n";
    $message .= "ERRORDOC: " . pnVarPrepForDisplay($errordoc) . "\n";
    $message .= "HTTP_REFERER: {$http_referer}\n";
    pnMail($adminmail, $subject, $message, "From: \"{$sitename}\" <{$adminmail}>\nX-Mailer: PHP/" . phpversion());
    echo "<br /><br /><strong>" . _ERROR404_MAILED . "</strong>\n";
}
开发者ID:BackupTheBerlios,项目名称:freshwind-svn,代码行数:19,代码来源:error.php


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