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


PHP pnUserGetVar函数代码示例

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


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

示例1: SERVICE_CMSOPEN_postnuke

function SERVICE_CMSOPEN_postnuke($authenticate_only)
{
    global $phpnuke, $default_access, $web_root, $root_dir, $cms_user_access, $cms_type, $include_path;
    if (!defined("LOADED_AS_MODULE") and $phpnuke == "false") {
        die("You can't access this file directly...<br><br>Generally this means that Jinzora was " . "installed as a PostNuke module and you're trying to access it outside of PostNuke");
    }
    if (function_exists('pnSecAuthAction')) {
        if (!pnSecAuthAction(0, 'Jinzora::', "::", ACCESS_READ)) {
            include 'header.php';
            die('Access Denied');
            include 'footer.php';
        }
    }
    // Now let's get the users name IF we need it
    if (pnUserGetVar('uname') != "") {
        $username = pnUserGetVar('uname');
    } else {
        $username = "anonymous";
    }
    // Ok, now let's authenticate this user
    userAuthenticate($username);
    // Now let's see if we only wanted the user access
    if ($authenticate_only == true) {
        return;
    }
    include_once "header.php";
    // Now let's open the table
    OpenTable();
}
开发者ID:seanfbrown,项目名称:jinzora,代码行数:29,代码来源:postnuke.php

示例2: mediashareResendInvitation

function mediashareResendInvitation($invitationId, $albumId)
{
    $args = array('invitationId' => $invitationId, 'emails' => FormUtil::getPassedValue('emails'), 'subject' => FormUtil::getPassedValue('subject'), 'text' => FormUtil::getPassedValue('text'), 'sender' => FormUtil::getPassedValue('sender'), 'senderemail' => pnUserGetVar('email'), 'expires' => FormUtil::getPassedValue('expires'));
    if (!pnModAPIFunc('mediashare', 'invitation', 'resendInvitation', $args)) {
        return false;
    }
    return pnRedirect(pnModURL('mediashare', 'invitation', 'list', array('aid' => $albumId)));
}
开发者ID:ro0f,项目名称:Mediashare,代码行数:8,代码来源:pninvitation.php

示例3: cookiedecode

function cookiedecode()
{
    if (!pnUserLoggedIn()) {
        return;
    }
    global $cookie;
    $cookie = array(pnUserGetVar('uid'), pnUserGetVar('uname'), pnUserGetVar('pass'), pnUserGetVar('storynum'), pnUserGetVar('umode'), pnUserGetVar('uorder'), pnUserGetVar('thold'), pnUserGetVar('noscore'), pnUserGetVar('ublockon'), pnUserGetVar('theme'), pnUserGetVar('commentmax'));
    return $cookie;
}
开发者ID:BackupTheBerlios,项目名称:microbuilder,代码行数:9,代码来源:oldfuncs.php

示例4: dplink_user_main

function dplink_user_main()
{
    $url = trim(pnModGetVar('dplink', 'url'));
    $window = pnModGetVar('dplink', 'use_window');
    $wrap = pnModGetVar('dplink', 'use_postwrap');
    $user_data = array();
    $home = pnGetBaseURL();
    $home .= 'user.php?op=loginscreen&module=NS-User';
    if (!pnUserLoggedIn()) {
        pnRedirect($home);
    }
    // We need to get the user password string from the database
    $uid = pnUserGetVar('uid');
    list($dbconn) = pnDBGetConn();
    $pntables = pnDBGetTables();
    $usertable = $pntables['users'];
    $usercol =& $pntables['users_column'];
    $sql = "SELECT {$usercol['uname']}, {$usercol['pass']}, {$usercol['name']}, {$usercol['email']} " . "FROM {$usertable} WHERE {$usercol['uid']} = {$uid}";
    $result = $dbconn->Execute($sql);
    if ($dbconn->ErrorNo() != 0) {
        die('Could not get user details');
    }
    if ($result->EOF) {
        die('Could not get user detail');
    }
    list($uname, $password, $user_name, $user_email) = $result->fields;
    $result->Close();
    $user_data['login'] = $uname;
    $user_data['passwd'] = $password;
    $user_data['name'] = $user_name;
    $user_data['email'] = $user_email;
    $parm = serialize($user_data);
    $check = md5($parm);
    $cparm = gzcompress($parm);
    $bparm = urlencode(base64_encode($cparm));
    if ($window) {
        $url .= '/index.php?login=pn&userdata=' . $bparm . '&check=' . $check;
        header('Location: ' . $url);
    } else {
        $url .= '/index.php?login=pn%26userdata=' . $bparm . '%26check=' . $check;
        if ($wrap) {
            header('Location: modules.php?op=modload&name=PostWrap&file=index&page=' . $url);
        } else {
            header('Location: modules.php?op=modload&name=dplink&file=index&url=' . $url);
        }
    }
    exit;
}
开发者ID:illuminate3,项目名称:dotproject,代码行数:48,代码来源:pnuser.php

示例5: smarty_function_mediashare_uservar

function smarty_function_mediashare_uservar($params, &$smarty)
{
    $dom = ZLanguage::getModuleDomain('mediashare');
    if (!isset($params['varName'])) {
        $smarty->trigger_error(__f('Missing [%1$s] in \'%2$s\'', array('varName', 'mediashare_uservar'), $dom));
        return false;
    }
    if (!isset($params['userId'])) {
        $smarty->trigger_error(__f('Missing [%1$s] in \'%2$s\'', array('userId', 'mediashare_uservar'), $dom));
        return false;
    }
    $var = pnUserGetVar($params['varName'], $params['userId']);
    $var = DataUtil::formatForDisplay($var);
    if (isset($params['assign'])) {
        $smarty->assign($params['assign'], $var);
    }
    return $var;
}
开发者ID:ro0f,项目名称:Mediashare,代码行数:18,代码来源:function.mediashare_uservar.php

示例6: blocks_user_block

function blocks_user_block($row)
{
    list($dbconn) = pnDBGetConn();
    $pntable = pnDBGetTables();
    if (!pnSecAuthAction(0, 'Userblock::', "{$row['title']}::", ACCESS_READ)) {
        return;
    }
    if (pnUserLoggedIn() && pnUserGetVar('ublockon') == 1) {
        $column =& $pntable['users_column'];
        $uid = pnUserGetVar('uid');
        $getblock = $dbconn->Execute("SELECT {$column['ublock']} FROM {$pntable['users']} WHERE {$column['uid']}=" . pnVarPrepForStore($uid) . "");
        list($ublock) = $getblock->fields;
        $username = pnUserGetVar('name');
        $row['title'] = _MENUFOR . " " . pnVarPrepForDisplay($username) . "";
        $row['content'] = $ublock;
        return themesideblock($row);
    }
}
开发者ID:BackupTheBerlios,项目名称:microbuilder,代码行数:18,代码来源:user.php

示例7: smarty_function_mediashare_username

function smarty_function_mediashare_username($params, &$smarty)
{
    $dom = ZLanguage::getModuleDomain('mediashare');
    if (!isset($params['userId'])) {
        $smarty->trigger_error(__f('Missing [%1$s] in \'%2$s\'', array('userId', 'mediashare_username'), $dom));
        return false;
    }
    if (mediashareAccessUserRealName()) {
        $name = pnUserGetVar('name', $params['userId']);
    } else {
        $name = null;
    }
    if (!$name) {
        $name = pnUserGetVar('uname', $params['userId']);
    }
    $name = DataUtil::formatForDisplay($name);
    if (isset($params['assign'])) {
        $smarty->assign($params['assign'], $name);
    }
    return $name;
}
开发者ID:ro0f,项目名称:Mediashare,代码行数:21,代码来源:function.mediashare_username.php

示例8: install

 /**
  * Install the TimeIt module.
  *
  * @return boolean
  */
 function install()
 {
     // create the socialNetwork table
     try {
         DoctrineUtil::createTablesFromModels('TimeIt');
     } catch (Exception $e) {
         LogUtil::registerError($e->getMessage());
         return false;
     }
     // add module vars
     pnModSetVar('TimeIt', 'monthtoday', '#FF3300');
     pnModSetVar('TimeIt', 'monthon', '');
     pnModSetVar('TimeIt', 'monthoff', '#d4d2d2');
     pnModSetVar('TimeIt', 'rssatomitems', 20);
     pnModSetVar('TimeIt', 'notifyEvents', 0);
     pnModSetVar('TimeIt', 'notifyEventsEmail', pnUserGetVar('email', 2));
     pnModSetVar('TimeIt', 'itemsPerPage', 25);
     pnModSetVar('TimeIt', 'filterByPermission', 0);
     pnModSetVar('TimeIt', 'popupOnHover', 0);
     pnModSetVar('TimeIt', 'colorCats', 1);
     pnModSetVar('TimeIt', 'googleMapsApiKey', '');
     pnModSetVar('TimeIt', 'mapViewType', 'googleMaps');
     pnModSetVar('TimeIt', 'mapHeight', 320);
     pnModSetVar('TimeIt', 'mapWidth', 480);
     pnModSetVar('TimeIt', 'colorCatsProp', 'Main');
     pnModSetVar('TimeIt', 'hideTimeItAddress', 0);
     pnModSetVar('TimeIt', 'defaultCalendar', 1);
     pnModSetVar('TimeIt', 'firstWeekDay', 1);
     pnModSetVar('TimeIt', 'defalutCatColor', 'silver');
     pnModSetVar('TimeIt', 'truncateTitle', 30);
     pnModSetVar('TimeIt', 'enablecategorization', 1);
     pnModSetVar('TimeIt', 'userdeletionMode', 'anonymize');
     // or delete
     pnModSetVar('TimeIt', 'dateformat', 'datebrief');
     pnModSetVar('TimeIt', 'defaultPrivateCalendar', 0);
     pnModSetVar('TimeIt', 'sortMode', 'byname');
     // or bysortvalue
     return true;
 }
开发者ID:planetenkiller,项目名称:TimeIt,代码行数:44,代码来源:Installer.php

示例9: pnVarCleanFromInput

 *  
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 *  To read the license please read the docs/license.txt or visit
 *  http://www.gnu.org/copyleft/gpl.html
 *
 */
// grab the form variables
$tplview = pnVarCleanFromInput('tplview');
$viewtype = pnVarCleanFromInput('viewtype');
$eid = pnVarCleanFromInput('eid');
$Date = pnVarCleanFromInput('Date');
$print = pnVarCleanFromInput('print');
$uid = pnUserGetVar('uid');
$pc_username = pnVarCleanFromInput('pc_username');
$output =& new pnHTML();
$output->SetInputMode(_PNH_VERBATIMINPUT);
if (!pnModAPILoad('postcalendar', 'user')) {
    die('Could not load PostCalendar user API');
}
$theme = pnUserGetTheme();
if (!pnThemeLoad($theme)) {
    die('Could not load theme');
}
$output->Text('<html><head>');
$output->Text("<title>" . pnConfigGetVar('sitename') . ' :: ' . pnConfigGetVar('slogan') . "</title>\n");
$output->Text('<link rel="StyleSheet" href="themes/' . $theme . '/style/styleNN.css" type="text/css" />');
$output->Text('<style type="text/css">@import url("themes/' . $theme . '/style/style.css"); </style>');
$output->Text('</head>');
开发者ID:juggernautsei,项目名称:openemr,代码行数:31,代码来源:print.php

示例10: postcalendar_calendarblock_display

/**
 * display block
 */
function postcalendar_calendarblock_display($blockinfo)
{
    // You supposed to be here?
    if (!pnSecAuthAction(0, 'PostCalendar:calendarblock:', "{$blockinfo['title']}::", ACCESS_OVERVIEW)) {
        return false;
    }
    // find out what view we're using
    $template_view = pnVarCleanFromInput('tplview');
    if (!isset($template_view)) {
        $template_view = 'default';
    }
    // find out what template we're using
    $template_name = _SETTING_TEMPLATE;
    if (!isset($template_name) || empty($template_name)) {
        $template_name = 'default';
    }
    // What is today's correct date
    $Date =& postcalendar_getDate();
    // Get variables from content block
    $vars = unserialize($blockinfo['content']);
    $showcalendar = $vars['pcbshowcalendar'];
    $showevents = $vars['pcbeventoverview'];
    $eventslimit = $vars['pcbeventslimit'];
    $nextevents = $vars['pcbnextevents'];
    $pcbshowsslinks = $vars['pcbshowsslinks'];
    $pcbeventsrange = $vars['pcbeventsrange'];
    // Let's setup the info to build this sucka!
    $the_year = substr($Date, 0, 4);
    $the_month = substr($Date, 4, 2);
    $the_day = substr($Date, 6, 2);
    $uid = pnUserGetVar('uid');
    $cacheid1 = $cacheid2 = $cacheid3 = '';
    $theme = pnUserGetTheme();
    pnThemeLoad($theme);
    global $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $bgcolor5;
    global $textcolor1, $textcolor2;
    // 20021125 - rraymond :: we have to do this to make it work with envolution
    $pcModInfo = pnModGetInfo(pnModGetIDFromName(__POSTCALENDAR__));
    $pcDir = pnVarPrepForOS($pcModInfo['directory']);
    require_once "modules/{$pcDir}/pnincludes/Smarty/Config_File.class.php";
    unset($pcModInfo);
    // set up Smarty
    $tpl =& new pcSmarty();
    // setup the Smarty cache id
    $templates_cached = true;
    if ($showcalendar) {
        $cacheid1 = md5($Date . 'M' . $template_view . $template_name . $showcalendar . $showevents . $nextevents . $uid . $theme);
        if (!$tpl->is_cached($template_name . '/views/calendarblock/month_view.html', $cacheid1)) {
            $templates_cached = false;
        }
    }
    if ($showevents) {
        $cacheid2 = md5($Date . 'T' . $template_view . $template_name . $showcalendar . $showevents . $nextevents . $uid . $theme);
        if (!$tpl->is_cached($template_name . '/views/calendarblock/todays_events.html', $cacheid2)) {
            $templates_cached = false;
        }
    }
    if ($nextevents) {
        $cacheid3 = md5($Date . 'U' . $template_view . $template_name . $showcalendar . $showevents . $nextevents . $uid . $theme);
        if (!$tpl->is_cached($template_name . '/views/calendarblock/upcoming_events.html', $cacheid3)) {
            $templates_cached = false;
        }
    }
    // start the output container
    $output = pnModAPIFunc(__POSTCALENDAR__, 'user', 'pageSetup');
    // if one of the templates is not cached, we need to run the following
    if (!$templates_cached) {
        // set up the next and previous months to move to
        $prev_month = Date_Calc::beginOfPrevMonth(1, $the_month, $the_year, '%Y%m%d');
        $next_month = Date_Calc::beginOfNextMonth(1, $the_month, $the_year, '%Y%m%d');
        $last_day = Date_Calc::daysInMonth($the_month, $the_year);
        $pc_prev = pnModURL(__POSTCALENDAR__, 'user', 'view', array('tplview' => $template_view, 'viewtype' => 'month', 'Date' => $prev_month));
        $pc_next = pnModURL(__POSTCALENDAR__, 'user', 'view', array('tplview' => $template_view, 'viewtype' => 'month', 'Date' => $next_month));
        $pc_month_name = pnModAPIFunc(__POSTCALENDAR__, 'user', 'getmonthname', array('Date' => mktime(0, 0, 0, $the_month, $the_day, $the_year)));
        $month_link_url = pnModURL(__POSTCALENDAR__, 'user', 'view', array('tplview' => $template_view, 'viewtype' => 'month', 'Date' => date('Ymd', mktime(0, 0, 0, $the_month, 1, $the_year))));
        $month_link_text = $pc_month_name . ' ' . $the_year;
        //*******************************************************************
        //  Here we get the events for the current month view
        //*******************************************************************
        $day_of_week = 1;
        $pc_month_names = array(_CALJAN, _CALFEB, _CALMAR, _CALAPR, _CALMAY, _CALJUN, _CALJUL, _CALAUG, _CALSEP, _CALOCT, _CALNOV, _CALDEC);
        $pc_short_day_names = array(_CALSUNDAYSHORT, _CALMONDAYSHORT, _CALTUESDAYSHORT, _CALWEDNESDAYSHORT, _CALTHURSDAYSHORT, _CALFRIDAYSHORT, _CALSATURDAYSHORT);
        $pc_long_day_names = array(_CALSUNDAY, _CALMONDAY, _CALTUESDAY, _CALWEDNESDAY, _CALTHURSDAY, _CALFRIDAY, _CALSATURDAY);
        switch (_SETTING_FIRST_DAY_WEEK) {
            case _IS_MONDAY:
                $pc_array_pos = 1;
                $first_day = date('w', mktime(0, 0, 0, $the_month, 0, $the_year));
                $end_dow = date('w', mktime(0, 0, 0, $the_month, $last_day, $the_year));
                if ($end_dow != 0) {
                    $the_last_day = $last_day + (7 - $end_dow);
                } else {
                    $the_last_day = $last_day;
                }
                break;
            case _IS_SATURDAY:
                $pc_array_pos = 6;
                $first_day = date('w', mktime(0, 0, 0, $the_month, 2, $the_year));
//.........这里部分代码省略.........
开发者ID:juggernautsei,项目名称:openemr,代码行数:101,代码来源:calendar.php

示例11: rss_connect

function rss_connect(&$row, $use_proxy)
{
    $pntable = pnDBGetTables();
    $proxy = pnUserGetVar('proxy');
    // build HTTP request header
    $str = "";
    $str .= "GET {$row['url']} HTTP/1.0 \r\n";
    // if we need to use a proxy, we must build the HTTP header
    if ($proxy['host'] != "" && $proxy['port'] != "" && $use_proxy && $proxy['enable']) {
        // copy host information from proxy settings
        // echo "Connecting to proxyserver ";
        $host = $proxy['host'];
        $port = $proxy['port'];
        $conn_type = "proxy ";
        // used for debugging and errors only
        // add some extra header lines  if PROXY authentication is required
        if ($proxy['name'] != "" && $proxy['pass'] != "") {
            $str .= "Proxy-Authorization: Basic ";
            $str .= base64_encode($proxy['name'] . ":" . $proxy['pass']) . "\r\n";
            $row['conn_comment'] .= " \n<!-- via Authenticating Proxy {$proxy['name']}:{$proxy['pass']}@{$proxy['host']}:{$proxy['port']} -->";
        } else {
            $row['conn_comment'] .= " \n<!-- via Proxy {$proxy['host']}:{$proxy['port']} -->";
        }
    } else {
        $u = parse_url($row['url']);
        $u['port'] = $u['port'] ? $u['port'] : 80;
        // copy the remote host information in case of no proxy
        if ($this->_debug) {
            echo "Connecting to host ";
        }
        $host = $u['host'];
        $port = $u['port'];
        $conn_type = "remote ";
        // used for debugging and errors only
        // add some extra header info if SITE authentication is required
        if ($uname != "" && $pass != "") {
            $str .= "Authorization: Basic ";
            $str .= base64_encode($set['uname'] . ":" . $set['pass']) . "\r\n";
            $row['conn_comment'] .= " \n<!-- using authentication {$set['uname']}:{$set['pass']} -->";
        }
    }
    // End with empty line according to protocol.
    $str .= "\r\n";
    // open the connection to the remote host, or the proxy
    $fp = fsockopen($host, $port, $errno, $errstr, 2);
    if (!$fp) {
        return false;
    } else {
        // write the request
        fputs($fp, $str);
        return $fp;
    }
}
开发者ID:BackupTheBerlios,项目名称:microbuilder,代码行数:53,代码来源:rss2.php

示例12: mediashare_userapi_getSubAlbumsData

function mediashare_userapi_getSubAlbumsData($args)
{
    // Check access
    if (!SecurityUtil::checkPermission('mediashare::', '::', ACCESS_READ)) {
        return LogUtil::registerPermissionError();
    }
    $dom = ZLanguage::getModuleDomain('mediashare');
    // Argument check
    if (!isset($args['albumId'])) {
        return LogUtil::registerError(__f('Missing [%1$s] in \'%2$s\'', array('albumId', 'userapi.getSubAlbumsData'), $dom));
    }
    $albumId = (int) $args['albumId'];
    $startnum = isset($args['startnum']) ? (int) $args['startnum'] : -1;
    $numitems = isset($args['numitems']) ? (int) $args['numitems'] : -1;
    $recursively = isset($args['recursively']) ? (bool) $args['recursively'] : false;
    $access = isset($args['access']) ? (int) $args['access'] : 0xff;
    $excludeAlbumId = isset($args['excludeAlbumId']) ? (int) $args['excludeAlbumId'] : null;
    $onlyMine = isset($args['onlyMine']) ? $args['onlyMine'] : false;
    $includeMainItem = isset($args['includeMainItem']) ? (bool) $args['includeMainItem'] : true;
    // FIXME rework this to default false
    $pntable = pnDBGetTables();
    $albumsColumn = $pntable['mediashare_albums_column'];
    $accessibleAlbumSql = pnModAPIFunc('mediashare', 'user', 'getAccessibleAlbumsSql', array('albumId' => $recursively ? null : $albumId, 'access' => $access, 'field' => $albumsColumn['id']));
    if (!$accessibleAlbumSql) {
        return false;
    }
    $excludeRestriction = '';
    if ($excludeAlbumId != null) {
        if (!($excludeAlbum = pnModAPIFunc('mediashare', 'user', 'getAlbum', array('albumId' => $excludeAlbumId)))) {
            return false;
        }
        $excludeRestriction = " AND ({$albumsColumn['nestedSetLeft']} < {$excludeAlbum['nestedSetLeft']}\r\n                                  OR {$albumsColumn['nestedSetRight']} > {$excludeAlbum['nestedSetRight']}) ";
    }
    $mineSql = '';
    if ($onlyMine) {
        $uid = (int) pnUserGetVar('uid');
        $mineSql = " AND {$albumsColumn['ownerId']} = '{$uid}'";
    }
    $where = "({$accessibleAlbumSql}) {$excludeRestriction} {$mineSql}";
    if ($recursively) {
        $orderby = "{$albumsColumn['nestedSetLeft']}, {$albumsColumn['title']}";
    } else {
        $where .= " AND {$albumsColumn['parentAlbumId']} = '{$albumId}'";
        $orderby = $albumsColumn['title'];
    }
    $subalbums = DBUtil::selectObjectArray('mediashare_albums', $where, $orderby, $startnum, $numitems, 'id');
    if ($subalbums === false) {
        return LogUtil::registerError(__f('Error in %1$s: %2$s.', array('userapi.getSubAlbumsData', 'Could not retrieve the sub albums information.'), $dom));
    }
    foreach (array_keys($subalbums) as $k) {
        $subalbums[$k]['mainMediaItem'] = null;
        if ($includeMainItem && (int) $subalbums[$k]['mainMediaId'] > 0) {
            $subalbums[$k]['mainMediaItem'] = pnModAPIFunc('mediashare', 'user', 'getMediaItem', array('mediaId' => $subalbums[$k]['mainMediaId']));
        }
        $subalbums[$k]['extappData'] = unserialize($subalbums[$k]['extappData']);
        mediashareAddKeywords($subalbums[$k]);
    }
    return $subalbums;
}
开发者ID:ro0f,项目名称:Mediashare,代码行数:59,代码来源:pnuserapi.php

示例13: postcalendar_user_display

/**
 * display item
 * This is a standard function to provide detailed information on a single item
 * available from the module.
 */
function postcalendar_user_display($args)
{
    list($eid, $viewtype, $tplview, $pc_username, $Date, $print, $category, $topic, $pc_facility) = pnVarCleanFromInput('eid', 'viewtype', 'tplview', 'pc_username', 'Date', 'print', 'pc_category', 'pc_topic', 'pc_facility');
    // added to allow the view & providers to remain as the user last saw it -- JRM
    if ($_SESSION['viewtype']) {
        $viewtype = $_SESSION['viewtype'];
    }
    if ($_SESSION['pc_username']) {
        $pc_username = $_SESSION['pc_username'];
    }
    // funky things happen if the view is 'details' and we don't have an event ID
    // so in such a case, we're going to revert to the 'day' view -- JRM
    if ($viewtype == 'details' && (!isset($eid) || $eid == "")) {
        $_SESSION['viewtype'] = 'day';
        $viewtype = $_SESSION['viewtype'];
    }
    extract($args);
    if (empty($Date) && empty($viewtype)) {
        return false;
    }
    if (empty($tplview)) {
        $tplview = 'default';
    }
    $uid = pnUserGetVar('uid');
    $theme = pnUserGetTheme();
    //$cacheid = md5($Date.$viewtype.$tplview._SETTING_TEMPLATE.$eid.$print.$uid.'u'.$pc_username.$theme.'c'.$category.'t'.$topic);
    $cacheid = md5(strtotime("now"));
    switch ($viewtype) {
        case 'details':
            if (!(bool) PC_ACCESS_READ) {
                return _POSTCALENDARNOAUTH;
            }
            $event = pnModAPIFunc('PostCalendar', 'user', 'eventDetail', array('eid' => $eid, 'Date' => $Date, 'print' => $print, 'cacheid' => $cacheid));
            if ($event === false) {
                pnRedirect(pnModURL(__POSTCALENDAR__, 'user'));
            }
            $out = "\n\n<!-- START user_display -->\n\n";
            $out .= $event;
            $out .= "\n\n<!-- END user_display -->\n\n";
            break;
        default:
            if (!(bool) PC_ACCESS_OVERVIEW) {
                return _POSTCALENDARNOAUTH;
            }
            $out = "\n\n<!-- START user_display -->\n\n";
            $out .= pnModAPIFunc('PostCalendar', 'user', 'buildView', array('Date' => $Date, 'viewtype' => $viewtype, 'cacheid' => $cacheid));
            $out .= "\n\n<!-- END user_display -->\n\n";
            break;
    }
    // Return the output that has been generated by this function
    return $out;
}
开发者ID:stephen-smith,项目名称:openemr,代码行数:57,代码来源:pnuser.php

示例14: postcalendar_admin_submit

function postcalendar_admin_submit($args)
{
    if (!PC_ACCESS_ADMIN) {
        return _POSTCALENDAR_NOAUTH;
    }
    pnModAPILoad(__POSTCALENDAR__, 'user');
    $output = postcalendar_adminmenu();
    // get the theme globals :: is there a better way to do this?
    pnThemeLoad(pnUserGetTheme());
    global $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $bgcolor5, $textcolor1, $textcolor2;
    extract($args);
    $Date = postcalendar_getDate();
    $year = substr($Date, 0, 4);
    $month = substr($Date, 4, 2);
    $day = substr($Date, 6, 2);
    // basic event information
    $event_subject = pnVarCleanFromInput('event_subject');
    $event_desc = pnVarCleanFromInput('event_desc');
    $event_sharing = pnVarCleanFromInput('event_sharing');
    $event_category = pnVarCleanFromInput('event_category');
    $event_topic = pnVarCleanFromInput('event_topic');
    // event start information
    $event_startmonth = pnVarCleanFromInput('event_startmonth');
    $event_startday = pnVarCleanFromInput('event_startday');
    $event_startyear = pnVarCleanFromInput('event_startyear');
    $event_starttimeh = pnVarCleanFromInput('event_starttimeh');
    $event_starttimem = pnVarCleanFromInput('event_starttimem');
    $event_startampm = pnVarCleanFromInput('event_startampm');
    // event end information
    $event_endmonth = pnVarCleanFromInput('event_endmonth');
    $event_endday = pnVarCleanFromInput('event_endday');
    $event_endyear = pnVarCleanFromInput('event_endyear');
    $event_endtype = pnVarCleanFromInput('event_endtype');
    $event_dur_hours = pnVarCleanFromInput('event_dur_hours');
    $event_dur_minutes = pnVarCleanFromInput('event_dur_minutes');
    $event_duration = 60 * 60 * $event_dur_hours + 60 * $event_dur_minutes;
    $event_allday = pnVarCleanFromInput('event_allday');
    // location data
    $event_location = pnVarCleanFromInput('event_location');
    $event_street1 = pnVarCleanFromInput('event_street1');
    $event_street2 = pnVarCleanFromInput('event_street2');
    $event_city = pnVarCleanFromInput('event_city');
    $event_state = pnVarCleanFromInput('event_state');
    $event_postal = pnVarCleanFromInput('event_postal');
    $event_location_info = serialize(compact('event_location', 'event_street1', 'event_street2', 'event_city', 'event_state', 'event_postal'));
    // contact data
    $event_contname = pnVarCleanFromInput('event_contname');
    $event_conttel = pnVarCleanFromInput('event_conttel');
    $event_contemail = pnVarCleanFromInput('event_contemail');
    $event_website = pnVarCleanFromInput('event_website');
    $event_fee = pnVarCleanFromInput('event_fee');
    // event repeating data
    $event_repeat = pnVarCleanFromInput('event_repeat');
    $event_repeat_freq = pnVarCleanFromInput('event_repeat_freq');
    $event_repeat_freq_type = pnVarCleanFromInput('event_repeat_freq_type');
    $event_repeat_on_num = pnVarCleanFromInput('event_repeat_on_num');
    $event_repeat_on_day = pnVarCleanFromInput('event_repeat_on_day');
    $event_repeat_on_freq = pnVarCleanFromInput('event_repeat_on_freq');
    $event_recurrspec = serialize(compact('event_repeat_freq', 'event_repeat_freq_type', 'event_repeat_on_num', 'event_repeat_on_day', 'event_repeat_on_freq'));
    $pc_html_or_text = pnVarCleanFromInput('pc_html_or_text');
    $form_action = pnVarCleanFromInput('form_action');
    $pc_event_id = pnVarCleanFromInput('pc_event_id');
    $data_loaded = pnVarCleanFromInput('data_loaded');
    $is_update = pnVarCleanFromInput('is_update');
    $authid = pnVarCleanFromInput('authid');
    if (pnUserLoggedIn()) {
        $uname = pnUserGetVar('uname');
    } else {
        $uname = pnConfigGetVar('anonymous');
    }
    if (!isset($event_repeat)) {
        $event_repeat = 0;
    }
    // lets wrap all the data into array for passing to submit and preview functions
    if (!isset($pc_event_id) || empty($pc_event_id) || $data_loaded) {
        $eventdata = compact('event_subject', 'event_desc', 'event_sharing', 'event_category', 'event_topic', 'event_startmonth', 'event_startday', 'event_startyear', 'event_starttimeh', 'event_starttimem', 'event_startampm', 'event_endmonth', 'event_endday', 'event_endyear', 'event_endtype', 'event_dur_hours', 'event_dur_minutes', 'event_duration', 'event_allday', 'event_location', 'event_street1', 'event_street2', 'event_city', 'event_state', 'event_postal', 'event_location_info', 'event_contname', 'event_conttel', 'event_contemail', 'event_website', 'event_fee', 'event_repeat', 'event_repeat_freq', 'event_repeat_freq_type', 'event_repeat_on_num', 'event_repeat_on_day', 'event_repeat_on_freq', 'event_recurrspec', 'uname', 'Date', 'year', 'month', 'day', 'pc_html_or_text');
        $eventdata['is_update'] = $is_update;
        $eventdata['pc_event_id'] = $pc_event_id;
        $eventdata['data_loaded'] = true;
    } else {
        $event = postcalendar_userapi_pcGetEventDetails($pc_event_id);
        $eventdata['event_subject'] = $event['title'];
        $eventdata['event_desc'] = $event['hometext'];
        $eventdata['event_sharing'] = $event['sharing'];
        $eventdata['event_category'] = $event['catid'];
        $eventdata['event_topic'] = $event['topic'];
        $eventdata['event_startmonth'] = substr($event['eventDate'], 5, 2);
        $eventdata['event_startday'] = substr($event['eventDate'], 8, 2);
        $eventdata['event_startyear'] = substr($event['eventDate'], 0, 4);
        $eventdata['event_starttimeh'] = substr($event['startTime'], 0, 2);
        $eventdata['event_starttimem'] = substr($event['startTime'], 3, 2);
        $eventdata['event_startampm'] = $eventdata['event_starttimeh'] < 12 ? _PC_AM : _PC_PM;
        $eventdata['event_endmonth'] = substr($event['endDate'], 5, 2);
        $eventdata['event_endday'] = substr($event['endDate'], 8, 2);
        $eventdata['event_endyear'] = substr($event['endDate'], 0, 4);
        $eventdata['event_endtype'] = $event['endDate'] == '0000-00-00' ? '0' : '1';
        $eventdata['event_dur_hours'] = $event['duration_hours'];
        $eventdata['event_dur_minutes'] = $event['duration_minutes'];
        $eventdata['event_duration'] = $event['duration'];
        $eventdata['event_allday'] = $event['alldayevent'];
//.........这里部分代码省略.........
开发者ID:robertdown,项目名称:openemr,代码行数:101,代码来源:pnadmin.php

示例15: user_user_main

function user_user_main($var)
{
    include 'header.php';
    user_menu_draw();
    if (pnUserLoggedIn()) {
        $uname = pnUserGetVar('uname');
        if (pnModAvailable('Comments')) {
            user_main_last10com($uname);
        }
        if (pnModAvailable('News')) {
            user_main_last10submit($uname);
        }
        include 'footer.php';
    }
    // ?else
}
开发者ID:BackupTheBerlios,项目名称:microbuilder,代码行数:16,代码来源:user.php


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