• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP pnRedirect函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: mediashare_source_zip_view

function mediashare_source_zip_view(&$args)
{
    $albumId = mediashareGetIntUrl('aid', $args, 0);
    if (isset($_POST['saveButton'])) {
        return mediashareSourceZipUpload($args);
    }
    if (isset($_POST['moreButton']) || isset($_POST['continueButton'])) {
        // After upload - update items and then continue to next page
        if (!mediashareSourceZipUpdate()) {
            return false;
        }
    }
    if (isset($_POST['cancelButton']) || isset($_POST['continueButton'])) {
        return pnRedirect(pnModURL('mediashare', 'edit', 'view', array('aid' => $albumId)));
    }
    if (isset($_POST['moreButton'])) {
        return pnRedirect(pnModURL('mediashare', 'edit', 'addmedia', array('aid' => $albumId, 'source' => 'zip')));
    }
    // FIXME Required globals??
    pnModAPILoad('mediashare', 'edit');
    $uploadInfo = pnModAPIFunc('mediashare', 'source_zip', 'getUploadInfo');
    $render =& pnRender::getInstance('mediashare', false);
    $render->assign('imageNum', 1);
    $render->assign('uploadFields', array(1));
    $render->assign('post_max_size', $uploadInfo['post_max_size']);
    $render->assign('upload_max_filesize', $uploadInfo['upload_max_filesize']);
    return $render->fetch('mediashare_source_zip_view.html');
}
开发者ID:ro0f,项目名称:Mediashare,代码行数:28,代码来源:pnsource_zip.php


示例2: mediashare_external_pasteitem

function mediashare_external_pasteitem($args)
{
    // FIXME access check
    $albumId = mediashareGetIntUrl('aid', $args, 0);
    $mediaId = mediashareGetIntUrl('mid', $args, 0);
    $mode = FormUtil::getPassedValue('mode');
    if (isset($_POST['backButton'])) {
        return pnRedirect(pnModUrl('mediashare', 'external', 'finditem', array('aid' => $albumId, 'mid' => $mediaId, 'mode' => $mode)));
    }
    $mediaItem = pnModAPIFunc('mediashare', 'user', 'getMediaItem', array('mediaId' => $mediaId));
    /*
        if (!($handler = pnModAPIFunc('mediashare', 'mediahandler', 'loadHandler', array('handlerName' => $mediaItem['mediaHandler'])))) {
            return false;
        }
    */
    $render =& pnRender::getInstance('mediashare', false);
    mediashareExternalLoadTheme($render);
    $render->assign('albumId', $albumId);
    $render->assign('mediaId', $mediaId);
    $render->assign('mediaItem', $mediaItem);
    if ($mediaItem['mediaHandler'] != 'extapp') {
        $mediadir = pnModAPIFunc('mediashare', 'user', 'getRelativeMediadir');
        $render->assign('thumbnailUrl', $mediadir . $mediaItem['thumbnailRef']);
        $render->assign('previewUrl', $mediadir . $mediaItem['previewRef']);
        $render->assign('originalUrl', $mediadir . $mediaItem['originalRef']);
    } else {
        $render->assign('thumbnailUrl', "{$mediaItem['thumbnailRef']}");
        $render->assign('previewUrl', "{$mediaItem['previewRef']}");
        $render->assign('originalUrl', "{$mediaItem['originalRef']}");
    }
    $render->assign('mode', $mode);
    echo $render->fetch('mediashare_external_pasteitem.html');
    return true;
}
开发者ID:ro0f,项目名称:Mediashare,代码行数:34,代码来源:pnexternal.php


示例3: access_user_login

function access_user_login($uname, $pass, $url, $rememberme)
{
    if (pnUserLogIn($uname, $pass, $rememberme)) {
        redirect_index(_LOGGINGYOU, $url);
    } else {
        pnRedirect('user.php?stop=1');
    }
}
开发者ID:BackupTheBerlios,项目名称:microbuilder,代码行数:8,代码来源:access.php


示例4: 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']}&op=main", $mod['displayname'], $imgfile);
                }
            }
        }
    }
}
开发者ID:BackupTheBerlios,项目名称:microbuilder,代码行数:54,代码来源:tools.php


示例5: 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


示例6: FlashChatBridge_admin_updateconfig

/**
 * Update 123FlashChat Settings
 *
 * @author Tree Florian
 * @return mixed true if successful, false if unsuccessful, error string otherwise
 */
function FlashChatBridge_admin_updateconfig()
{
    // Security check
    if (!SecurityUtil::checkPermission('FlashChatBridge::', '::', ACCESS_ADMIN)) {
        return LogUtil::registerPermissionError();
    }
    // get settings from form - do before authid check
    $settings = FormUtil::getPassedValue('settings', null, 'POST');
    // if this form wasnt posted to redirect back
    if ($settings === NULL) {
        return pnRedirect(pnModURL('Settings', 'admin', 'modifyconfig'));
    }
    /*
        // confirm the forms auth key
        if (!SecurityUtil::confirmAuthKey()) {
            return LogUtil::registerAuthidError();
        }
    */
    $lastchar = substr($settings['client_path'], -1);
    if ($lastchar != "\\" && $lastchar != "/" && $settings['client_path'] != "") {
        $settings['client_path'] = $settings['client_path'] . "/";
    }
    $settings['server_data_path'] = str_replace("\\", "/", $settings['server_data_path']);
    $lastchar = substr($settings['server_data_path'], -1);
    if ($lastchar != "\\" && $lastchar != "/" && $settings['client_path'] != "") {
        $settings['server_data_path'] = $settings['server_data_path'] . "/";
    }
    $settings['active_chat_standard'] = $settings['active_chat_standard'] == 1 ? 1 : 0;
    $settings['active_chat_html'] = $settings['active_chat_html'] == 1 ? 1 : 0;
    $settings['active_chat_avatar'] = $settings['active_chat_avatar'] == 1 ? 1 : 0;
    $settings['active_chat_live'] = $settings['active_chat_live'] == 1 ? 1 : 0;
    $settings['active_chat_pocket'] = $settings['active_chat_pocket'] == 1 ? 1 : 0;
    $settings['active_chat_lite'] = $settings['active_chat_lite'] == 1 ? 1 : 0;
    $settings['active_chat_banner'] = $settings['active_chat_banner'] == 1 ? 1 : 0;
    // Write the vars
    //$configvars = pnModGetVar('FlashChatBridge');
    foreach ($settings as $key => $value) {
        pnModSetVar('FlashChatBridge', $key, $value);
    }
    //$configvars = pnModGetVar('FlashChatBridge');
    // Let any other modules know that the modules configuration has been updated
    pnModCallHooks('module', 'updateconfig', 'FlashChatBridge', array('module' => 'FlashChatBridge'));
    return pnRedirect(pnModURL('FlashChatBridge', 'admin', 'modifyconfig'));
}
开发者ID:tempbottle,项目名称:FlashChatBridge,代码行数:50,代码来源:pnadmin.php


示例7: Meds_user_search

function Meds_user_search($args)
{
    // Permission check.
    if (!pnSecAuthAction(0, 'Meds::', '::', ACCESS_OVERVIEW)) {
        return pnVarPrepHTMLDisplay(_MODULENOAUTH);
    }
    // Clean any search data.
    list($search, $q, $active) = pnVarCleanFromInput('search', 'q', 'active');
    if (isset($q)) {
        $search[trade] = $q;
        $search[type] = "phrase";
    }
    // Get any results from the database.
    $results = pnModAPIFunc('Meds', 'user', 'search_result', array('search' => $search));
    $count = count($results);
    if (!is_array($results)) {
        $count = 0;
    }
    //a little written summary of what was searched for
    if ($active) {
        $summary = pnModFunc('Meds', 'user', 'search_summary', array('search' => $search, 'count' => $count));
    }
    if ($count == 1 && is_array($results) && pnSecAuthAction(0, 'Meds::', '::', ACCESS_READ)) {
        pnRedirect(pnModURL('Meds', 'user', 'display', array('search' => $search, 'med_id' => $results[0]['med_id'])));
    }
    // Start a new output object.
    $pnRender =& new pnRender('Meds');
    $pnRender->caching = false;
    $pnRender->assign('summary', $summary);
    $pnRender->assign('search', $search);
    $pnRender->assign('results', $results);
    $pnRender->assign('count', $count);
    $pnRender->assign(pnModAPIFunc('Meds', 'user', 'getall_selects'));
    // Return search form.
    return $pnRender->fetch('meds_user_search.htm');
}
开发者ID:grlf,项目名称:eyedock,代码行数:36,代码来源:pnuser.php


示例8: switch

}
switch ($op) {
    case 'modload':
        define("LOADED_AS_MODULE", "1");
        include_once 'includes/pnAPI.php';
        if (!function_exists('pnsessionsetup')) {
            pnInit();
        }
        include_once 'includes/legacy.php';
        // eugenio themeover 20020413
        //        pnThemeLoad();
        // Module not found error msg 08/08/00 Chris Bowler www.aquanuke.com
        if (file_exists('modules/' . pnVarPrepForOS($name) . '/' . pnVarPrepForOS($file) . '.php')) {
            include 'modules/' . pnVarPrepForOS($name) . '/' . pnVarPrepForOS($file) . '.php';
        } else {
            pnRedirect('error.php');
        }
        if (function_exists('session_write_close')) {
            session_write_close();
        } else {
            // Hack for old versions of PHP with bad session save
            $sessvars = '';
            foreach ($GLOBALS as $k => $v) {
                if (preg_match('/^PNSV/', $k) && isset($v)) {
                    $sessvars .= "{$k}|" . serialize($v);
                }
            }
            pnSessionWrite(session_id(), $sessvars);
        }
        break;
    default:
开发者ID:BackupTheBerlios,项目名称:microbuilder,代码行数:31,代码来源:modules.php


示例9: Example_admin_updateconfig

/**
 * Update the configuration
 *
 * This is a standard function to update the configuration parameters of the
 * module given the information passed back by the modification form
 * Modify configuration
 *
 * @author       Jim McDonald
 * @param        bold           print items in bold
 * @param        itemsperpage   number of items per page
 */
function Example_admin_updateconfig()
{
    // Security check - important to do this as early as possible to avoid
    // potential security holes or just too much wasted processing
    if (!pnSecAuthAction(0, 'Example::', '::', ACCESS_ADMIN)) {
        return pnVarPrepHTMLDisplay(_MODULENOAUTH);
    }
    // Get parameters from whatever input we need.  All arguments to this
    // function should be obtained from pnVarCleanFromInput(), getting them
    // from other places such as the environment is not allowed, as that makes
    // assumptions that will not hold in future versions of PostNuke
    list($bold, $itemsperpage) = pnVarCleanFromInput('bold', 'itemsperpage');
    // Confirm authorisation code.  This checks that the form had a valid
    // authorisation code attached to it.  If it did not then the function will
    // proceed no further as it is possible that this is an attempt at sending
    // in false data to the system
    if (!pnSecConfirmAuthKey()) {
        pnSessionSetVar('errormsg', pnVarPrepHTMLDisplay(_BADAUTHKEY));
        return pnRedirect(pnModURL('Example', 'admin', 'view'));
    }
    // Update module variables.  Note that depending on the HTML structure used
    // to obtain the information from the user it is possible that the values
    // might be empty, so it is important to check them all and assign them
    // default values if required.
    // ** Please note pnVarCleanFromInput will always return a set variable, even
    // it's empty so isset() checking is not appropriate.
    if (empty($bold)) {
        $bold = false;
    }
    pnModSetVar('Example', 'bold', (bool) $bold);
    if (empty($itemsperpage)) {
        $itemsperpage = 10;
    }
    // make sure $itemsperpage is a positive integer
    if (!is_integer($itemsperpage) || $itemsperpage < 1) {
        pnSessionSetVar('errormsg', pnVarPrepForDisplay(_EXAMPLEITEMSPERPAGE));
        $itemsperpage = (int) $itemsperpage;
        if ($itemsperpage < 1) {
            $itemsperpage = 25;
        }
    }
    pnModSetVar('Example', 'itemsperpage', $itemsperpage);
    // The configuration has been changed, so we clear all caches for
    // this module.
    $pnRender =& new pnRender('Example');
    // Please note that by using clear_cache without any parameter,
    // we clear all cached pages for this module.
    $pnRender->clear_cache();
    // the module configuration has been updated successfuly
    pnSessionSetVar('statusmsg', _CONFIGUPDATED);
    // Let any other modules know that the modules configuration has been updated
    pnModCallHooks('module', 'updateconfig', 'Example', array('module' => 'Example'));
    // This function generated no output, and so now it is complete we redirect
    // the user to an appropriate page for them to carry on their work
    return pnRedirect(pnModURL('Example', 'admin', 'view'));
}
开发者ID:grlf,项目名称:eyedock,代码行数:67,代码来源:calc_contact_lens.php


示例10: Lenses_user_view

function Lenses_user_view($args)
{
    // Security check
    if (!pnSecAuthAction(0, 'Lenses::', '::', ACCESS_OVERVIEW)) {
        return pnVarPrepHTMLDisplay(_NOTSUBSCRIBED);
    }
    list($phrase, $q, $display_phrase, $search, $or, $and, $markings, $markings2, $wizard) = pnVarCleanFromInput('phrase', 'q', 'display_phrase', 'search', 'or', 'and', 'markings', 'markings2', 'wizard');
    //print_r($or);
    //print_r($search);
    if (isset($q)) {
        $phrase = $q;
    }
    //echo ("here");
    //echo($q);
    //echo ($phrase);
    /*
    The following will require some explanation.  I want the search to be very dynamic, and I wanted to be able to take the user's input from the search form and create an SQL query from it.  I did this by creating several arrays that will ultimately be passed to the API function.  This includes the
    */
    //the $or_array will have this structure: =>[field]=array (value, value...), where the key is a database field.  The API will eventually parse this to make part of the SQL statement: "...WHERE (key = 'value' OR key='value...)"
    $or_array = array();
    //the $and_array will have the same structure: =>[field]=array (value, value...), where the key is a database field.  The API will eventually parse this to make part of the SQL statement: "...WHERE (key = 'value' AND key='value...)". The only difference is the values will be separated by "AND".
    $and_array = array();
    //The and_or array.  Each array contains an array where the key is a field name and the value is a search value, like this: =>[0] => ([field1]=>value1, [field2]=>value2,..)...  This will ultimately be parsed to look like this: "...WHERE (field1 = value1 OR field2=value2...).  This is different from the or_array in that different fields can be used.
    $and_or_array = array();
    //the $select array is a list of database fields for which the user has specified an interest.
    //the following values will be defaults to be displayed
    $select = array('tid', 'name', 'comp_name', 'discontinued', 'max_minus', 'max_plus', 'toric', 'bifocal', 'cosmetic', 'max_cyl_power', 'max_add');
    //if the user is simply searching for a lens by name the $phrase variable will have been passed.  Since it may contain multiple words, it will be exploded and all terms will be searched in the names and aliases fields.
    if (isset($phrase) && $phrase != "") {
        $phrase_array = explode(" ", $phrase);
        //print_r($phrase_array);
        $i = 0;
        foreach ($phrase_array as $value) {
            $and_or_array[$i][name] = " LIKE '%{$value}%'";
            $and_or_array[$i][aliases] = " LIKE '%{$value}%'";
            $i++;
        }
        //this is just a term to display on the search results page
        $display_phrase = "that contain the phrase '" . $phrase . "'";
    }
    // if a phrase isn't passed to this fuction, assume the more "advanced" search is being requested
    // Clean input to this function.
    //the search array will be passed with database fields as keys and search criterion as values.  The API will eventually parse this into the SQL statement.  The values from the $or and $and arrays will be added to the appropriate arrays that will be passed to the API.
    foreach ($or as $value) {
        $temp = pnVarCleanFromInput($value);
        if (is_array($temp)) {
            $or_array[$value] = $temp;
            $select[] = $value;
        }
    }
    foreach ($and as $value) {
        $temp = pnVarCleanFromInput($value);
        if (is_array($temp)) {
            $and_array[$value] = $temp;
            $select[] = $value;
        }
    }
    foreach ($search as $key => $value) {
        //echo ($key." : ".$value."<br/>");
        if ($value != '0') {
            $select[] = $key;
        }
    }
    //check to see if 'markings' was passed - indicates user is searching by toric markings...
    //there's gotta be a better way to do this....
    if ($markings != "") {
        $and_array[markings][0] = $markings;
    }
    if ($markings2 != "") {
        $and_array[markings][1] = $markings2;
    }
    //die;
    // Data called by other modules.
    extract($args);
    // add these fields to the select array.  Some may have already been present, so the weed out the items that are not unique.  Then, the array will be reduced to the top 9 items so there aren't too many fields displayed in the search results table
    $select = array_values(array_unique($select));
    // The API function is called.  The arguments to the function are passed in
    // as their own arguments array
    $items = pnModAPIFunc('Lenses', 'user', 'getlist', array('search' => $search, 'or_array' => $or_array, 'and_array' => $and_array, 'and_or_array' => $and_or_array, 'select' => $select));
    //print_r ($items);//die;
    // if no items were found and the user was searching for a phrase, will do a full-text search for this phrase and hopefully find something
    if (!$items && isset($phrase)) {
        $display_phrase = " whose content includes: '{$phrase}'";
        $items = pnModAPIFunc('Lenses', 'user', 'getlist', array('search' => $search, 'phrase' => $phrase, 'select' => $select));
    }
    //count the items.
    $count = count($items);
    //If there is only one result (and the user has permission), go directly to that lens.
    if ($count == 1 && is_array($items) && pnSecAuthAction(0, 'Lenses::', '::', ACCESS_READ)) {
        pnRedirect(pnModURL('Lenses', 'user', 'display', array('tid' => $items[0]['tid'])));
    }
    //just to be thorough, if the user is searching for a lens by a phrase, check to see if there's any company names that match that phrase.  This will be displayed with a statement saying something like "were you looking for lenses made by..."
    $company_options = pnModAPIFunc('Lenses', 'user', 'getcompany', array('phrase_array' => $phrase_array));
    // The return value of the function is checked here, and if the function
    // suceeded then an appropriate message is posted.
    //if (!$items && !$company_options) return pnVarPrepHTMLDisplay(_LENSESITEMFAILED);
    //if the user was searching by company, find the company name by looking at the first lens returned and capturing it's company name (this should work because ALL lenses returned should be manufactured by this company...
    if ($display_phrase == "company") {
        $display_phrase = " that are manufactured by " . $items[0][comp_name];
    }
//.........这里部分代码省略.........
开发者ID:grlf,项目名称:eyedock,代码行数:101,代码来源:pnuser.php


示例11: substr

    if (substr($module, 0, 3) == 'NS-') {
        $function = substr($module, 3) . '_user_';
    } else {
        $function = $module . '_user_';
    }
    $function_op = $function . $op;
    $function_main = $function . 'main';
    if (function_exists($function_op)) {
        $function_op($_REQUEST);
        exit;
    } elseif (function_exists($function_main)) {
        $function_main($_REQUEST);
        exit;
    } else {
        //        die("error : user_execute($file,$function_op)");
        pnRedirect('index.php');
        return true;
    }
}
// when we are here, the call is the result of an action
// requested by a (legacy) Your_Account plugin.
// Get all user modules...
$usermods = pnModGetUserMods();
// since the your account module does't have index.php/pnuser.php it
// won't be listed as user_capable hence we need to manually add it to
// our result set. [markwest]
$usermods[] = pnModGetInfo(pnModGetIDFromName('Your_Account'));
// ...and run the requested action (specified by $op)
foreach ($usermods as $usermod) {
    if (@is_dir($dir = 'modules/' . $usermod['directory'] . '/user/case/')) {
        $casedir = opendir($dir);
开发者ID:BackupTheBerlios,项目名称:freshwind-svn,代码行数:31,代码来源:user.php


示例12: pnRedirect

 *  http://postcalendar.tv
 *  
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *  
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *  
 *  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
 *
 */
/*******************************************************
    This file is for the old module load routine
    You can now link the module in a menu using the
    module name enclosed with brackets
    (ex: [PostCalendar])
 *******************************************************/
if (!defined("LOADED_AS_MODULE")) {
    echo 'You may not access this module directly';
} else {
    pnRedirect(pnModURL(pnVarCleanFromInput('name'), 'user', 'main'));
}
开发者ID:katopenzz,项目名称:openemr,代码行数:31,代码来源:index.php


示例13: user_admin_setConfig

function user_admin_setConfig($var)
{
    if (!pnSecConfirmAuthKey()) {
        include 'header.php';
        echo _BADAUTHKEY;
        include 'footer.php';
        exit;
    }
    // Escape some characters in these variables.
    // hehe, I like doing this, much cleaner :-)
    $fixvars = array();
    // todo: make FixConfigQuotes global / replace with other function
    foreach ($fixvars as $v) {
        // $var[$v] = FixConfigQuotes($var[$v]);
    }
    // Set any numerical variables that havn't been set, to 0. i.e. paranoia check :-)
    $fixvars = array();
    foreach ($fixvars as $v) {
        if (empty($var[$v])) {
            $var[$v] = 0;
        }
    }
    // all variables starting with x are the config vars.
    while (list($key, $val) = each($var)) {
        if (substr($key, 0, 1) == 'x') {
            pnConfigSetVar(substr($key, 1), $val);
        }
    }
    pnRedirect('admin.php');
}
开发者ID:BackupTheBerlios,项目名称:microbuilder,代码行数:30,代码来源:admin.php


示例14: modules_admin_regenerate

function modules_admin_regenerate()
{
    // Security check
    if (!pnSecConfirmAuthKey()) {
        pnSessionSetVar('errormsg', _BADAUTHKEY);
        pnRedirect(pnModURL('Modules', 'admin', 'list'));
        return true;
    }
    // Load in API
    pnModAPILoad('Modules', 'admin');
    // Regenerate modules
    if (pnModAPIFunc('Modules', 'admin', 'regenerate')) {
        // Success
        pnSessionSetVar('statusmsg', _MODREGENERATED);
    }
    pnRedirect(pnModURL('Modules', 'admin', 'list'));
    return true;
}
开发者ID:BackupTheBerlios,项目名称:microbuilder,代码行数:18,代码来源:pnadmin.php


示例15: template_admin_updateconfig

/**
 * This is a standard function to update the configuration parameters of the
 * module given the information passed back by the modification form
 */
function template_admin_updateconfig()
{
    // Get parameters from whatever input we need.  All arguments to this
    // function should be obtained from pnVarCleanFromInput(), getting them
    // from other places such as the environment is not allowed, as that makes
    // assumptions that will not hold in future versions of PostNuke
    $bold = pnVarCleanFromInput('bold');
    // Confirm authorisation code.  This checks that the form had a valid
    // authorisation code attached to it.  If it did not then the function will
    // proceed no further as it is possible that this is an attempt at sending
    // in false data to the system
    if (!pnSecConfirmAuthKey()) {
        pnSessionSetVar('errormsg', _BADAUTHKEY);
        pnRedirect(pnModURL('Template', 'admin', 'view'));
        return true;
    }
    // Update module variables.  Note that depending on the HTML structure used
    // to obtain the information from the user it is possible that the values
    // might be unset, so it is important to check them all and assign them
    // default values if required
    if (!isset($bold)) {
        $bold = 0;
    }
    pnModSetVar('template', 'bold', $bold);
    if (!isset($itemsperpage)) {
        $itemsperpage = 10;
    }
    pnModSetVar('template', 'itemsperpage', $itemsperpage);
    // This function generated no output, and so now it is complete we redirect
    // the user to an appropriate page for them to carry on their work
    pnRedirect(pnModURL('Template', 'admin', 'view'));
    // Return
    return true;
}
开发者ID:BackupTheBerlios,项目名称:microbuilder,代码行数:38,代码来源:pnadmin.php


示例16: Lenses_admin_update_company

function Lenses_admin_update_company($args)
{
    // Clean input from the form.
    $company = pnVarCleanFromInput('company');
    // Extract any extra arguments.
    extract($args);
    // Confirm $authid hidden field from form template.
    if (!pnSecConfirmAuthKey()) {
        pnSessionSetVar('errormsg', pnVarPrepHTMLDisplay(_BADAUTHKEY));
        return pnRedirect(pnModURL('Lenses', 'admin', 'main'));
    }
    // Attempt to update company.
    if (pnModAPIFunc('Lenses', 'admin', 'update_company', array('company' => $company))) {
        pnSessionSetVar('statusmsg', pnVarPrepHTMLDisplay(_UPDATESUCCEDED));
    }
    // No output.  Redirect user.
    return pnRedirect(pnModURL('Lenses', 'admin', 'viewall_companies'));
}
开发者ID:grlf,项目名称:eyedock,代码行数:18,代码来源:func_inc_companies.php


示例17: pollCollector

function pollCollector($pollID, $voteID, $forwarder)
{
    list($dbconn) = pnDBGetConn();
    $pntable = pnDBGetTables();
    // Check that the user hasn't voted for this poll already
    if (pnSessionGetVar("poll_voted{$pollID}")) {
        $warn = "You already voted today!";
    } else {
        pnSessionSetVar("poll_voted{$pollID}", 1);
        $column =& $pntable['poll_data_column'];
        $dbconn->Execute("UPDATE {$pntable['poll_data']} SET {$column['optioncount']}={$column['optioncount']}+1 WHERE ({$column['pollid']}=" . (int) pnVarPrepForStore($pollID) . ") AND ({$column['voteid']}=" . (int) pnVarPrepForStore($voteID) . ")");
        $column =& $pntable['poll_desc_column'];
        $dbconn->Execute("UPDATE {$pntable['poll_desc']} SET {$column['voters']}={$column['voters']}+1 WHERE {$column['pollid']}=" . (int) pnVarPrepForStore($pollID) . "");
    }
    pnRedirect($forwarder);
}
开发者ID:BackupTheBerlios,项目名称:microbuilder,代码行数:16,代码来源:poll.php


示例18: referers_admin_delete

function referers_admin_delete($var)
{
    if (!pnSecConfirmAuthKey()) {
        include 'header.php';
        echo _BADAUTHKEY;
        include 'footer.php';
        exit;
    }
    if (!pnSecAuthAction(0, 'Referers::', '::', ACCESS_ADMIN)) {
        include 'header.php';
        echo _REFERERSDELNOAUTH;
        include 'footer.php';
    }
    list($dbconn) = pnDBGetConn();
    $pntable = pnDBGetTables();
    $dbconn->Execute("DELETE FROM {$pntable['referer']}");
    pnRedirect('admin.php');
}
开发者ID:BackupTheBerlios,项目名称:microbuilder,代码行数:18,代码来源:admin.php


示例19: mediashare_admin_onoffsources

function mediashare_admin_onoffsources()
{
    $dom = ZLanguage::getModuleDomain('mediashare');
    if (FormUtil::getPassedValue('id')) {
        if (!pnModAPIFunc('mediashare', 'sources', 'OnOffSources', array('id' => FormUtil::getPassedValue('id'), 'active' => FormUtil::getPassedValue('active')))) {
            return false;
        }
    }
    LogUtil::registerStatus(__('Done!', $dom));
    return pnRedirect(pnModURL('mediashare', 'admin', 'plugins'));
}
开发者ID:ro0f,项目名称:Mediashare,代码行数:11,代码来源:pnadmin.php


示例20: die

<?php

if (!defined("LOADED_AS_MODULE")) {
    die("You cannot access this file directly");
}
if (!pnLocalReferer()) {
    die("You cannot access this file from an external site");
}
if (!$url) {
    die("You must use the {} calling method in your menu, not []");
}
$home = pnGetBaseURL();
$home .= "user.php?op=loginscreen&module=NS-User";
if (!pnUserLoggedIn()) {
    pnRedirect($home);
}
include "header.php";
echo "<iframe name='dplink' src='{$url}' width='100%' height='1600'\nmarginwidth=0 marginheight=0 frameborder=0></iframe>";
include "footer.php";
开发者ID:juliogallardo1326,项目名称:proc,代码行数:19,代码来源:index.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP pnSecAuthAction函数代码示例发布时间:2022-05-15
下一篇:
PHP pnModURL函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap