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


PHP NextendRequest::getVar方法代码示例

本文整理汇总了PHP中NextendRequest::getVar方法的典型用法代码示例。如果您正苦于以下问题:PHP NextendRequest::getVar方法的具体用法?PHP NextendRequest::getVar怎么用?PHP NextendRequest::getVar使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在NextendRequest的用法示例。


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

示例1: nextend_api_auth_flow

function nextend_api_auth_flow()
{
    $api_key = NextendRequest::getVar('api_key');
    $api_secret = NextendRequest::getVar('api_secret');
    if (session_id() == "") {
        @session_start();
    }
    if (!$api_key || !$api_secret) {
        $api_key = isset($_SESSION['api_key']) ? $_SESSION['api_key'] : null;
        $api_secret = isset($_SESSION['api_secret']) ? $_SESSION['api_secret'] : null;
    } else {
        $_SESSION['api_key'] = $api_key;
        $_SESSION['api_secret'] = $api_secret;
    }
    if ($api_key && $api_secret) {
        require_once dirname(__FILE__) . "/api/phpFlickr.php";
        $f = new phpFlickr($api_key, $api_secret);
        if (empty($_GET['frob'])) {
            $f->auth('read', false);
        } else {
            $result = $f->auth_getToken($_GET['frob']);
            unset($_SESSION['api_key']);
            unset($_SESSION['api_secret']);
            unset($_SESSION['phpFlickr_auth_token']);
            echo '<script type="text/javascript">';
            echo 'window.opener.setToken("' . $result['token'] . '");';
            echo '</script>';
        }
    }
}
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:30,代码来源:auth.php

示例2: nextend_api_auth_flow

function nextend_api_auth_flow()
{
    $api_key = NextendRequest::getVar('api_key');
    $api_secret = NextendRequest::getVar('api_secret');
    $redirect_uri = NextendRequest::getVar('redirect_uri');
    if (session_id() == "") {
        @session_start();
    }
    if (!$api_key || !$api_secret || !$redirect_uri) {
        $api_key = isset($_SESSION['api_key']) ? $_SESSION['api_key'] : null;
        $api_secret = isset($_SESSION['api_secret']) ? $_SESSION['api_secret'] : null;
        $redirect_uri = isset($_SESSION['redirect_uri']) ? $_SESSION['redirect_uri'] : null;
    } else {
        $_SESSION['api_key'] = $api_key;
        $_SESSION['api_secret'] = $api_secret;
        $_SESSION['redirect_uri'] = $redirect_uri;
    }
    if ($api_key && $api_secret) {
        require_once dirname(__FILE__) . "/api/Instagram.php";
        $config = array('client_id' => $api_key, 'client_secret' => $api_secret, 'redirect_uri' => $redirect_uri, 'grant_type' => 'authorization_code');
        $instagram = new Instagram($config);
        $accessCode = $instagram->getAccessCode();
        if ($accessCode === null) {
            $instagram->openAuthorizationUrl();
        } else {
            $accessToken = $instagram->getAccessToken();
            unset($_SESSION['api_key']);
            unset($_SESSION['api_secret']);
            unset($_SESSION['redirect_uri']);
            echo '<script type="text/javascript">';
            echo 'window.opener.setToken("' . $accessToken . '");';
            echo '</script>';
        }
    }
}
开发者ID:AndyHuntDesign,项目名称:andyhuntdesign,代码行数:35,代码来源:auth.php

示例3: auth

 function auth()
 {
     $folder = NextendRequest::getVar('folder');
     if ($folder) {
         $authfile = NextendFilesystem::pathToAbsolutePath($folder) . 'auth.php';
         if (NextendFilesystem::fileexists($authfile)) {
             require_once $authfile;
             if (function_exists('nextend_api_auth_flow')) {
                 nextend_api_auth_flow();
             }
         }
     }
     exit;
 }
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:14,代码来源:ajax.php

示例4: pluginAction

 function pluginAction($tpl)
 {
     $plugin = NextendRequest::getVar('action');
     $path = null;
     NextendPlugin::callPlugin('nextendslidergenerator', 'onNextendGeneratorConfiguration', array(&$plugin, &$path));
     if ($path) {
         $path .= 'configuration.xml';
         $this->xml = $path;
         $this->group = $plugin;
         $this->render('plugin');
     } else {
         $this->defaultAction($tpl);
     }
 }
开发者ID:JonathanAJ,项目名称:Seara-da-Ciencia-UFC,代码行数:14,代码来源:view.html.php

示例5: nextend_api_auth_flow

function nextend_api_auth_flow()
{
    $api_key = NextendRequest::getVar('api_key');
    $api_secret = NextendRequest::getVar('api_secret');
    $redirect_uri = NextendRequest::getVar('redirect_uri');
    if (session_id() == "") {
        @session_start();
    }
    if (!$api_key || !$api_secret || !$redirect_uri) {
        $api_key = isset($_SESSION['api_key']) ? $_SESSION['api_key'] : null;
        $api_secret = isset($_SESSION['api_secret']) ? $_SESSION['api_secret'] : null;
        $redirect_uri = isset($_SESSION['redirect_uri']) ? $_SESSION['redirect_uri'] : null;
    } else {
        $_SESSION['api_key'] = $api_key;
        $_SESSION['api_secret'] = $api_secret;
        $_SESSION['redirect_uri'] = $redirect_uri;
    }
    if ($api_key && $api_secret) {
        if (!class_exists('Google_Client')) {
            require_once dirname(__FILE__) . '/googleclient/Google_Client.php';
        }
        if (!class_exists('Google_YouTubeService')) {
            require_once dirname(__FILE__) . '/googleclient/contrib/Google_YouTubeService.php';
        }
        $client = new Google_Client();
        $client->setClientId($api_key);
        $client->setClientSecret($api_secret);
        $client->setRedirectUri($redirect_uri);
        $client->setApprovalPrompt('auto');
        $client->setAccessType('offline');
        $youtube = new Google_YouTubeService($client);
        if (isset($_GET['code'])) {
            $client->authenticate($_GET['code']);
            $accessToken = $client->getAccessToken();
            unset($_SESSION['api_key']);
            unset($_SESSION['api_secret']);
            unset($_SESSION['redirect_uri']);
            echo '<script type="text/javascript">';
            echo 'window.opener.setToken(\'' . $accessToken . '\');';
            echo '</script>';
        } else {
            $authUrl = $client->createAuthUrl();
            header('LOCATION: ' . $authUrl);
        }
    }
}
开发者ID:pguilford,项目名称:vcomcc,代码行数:46,代码来源:auth.php

示例6: defaultAction

 function defaultAction($form = 'default')
 {
     if ($this->canDo('core.admin')) {
         $settingsModel = $this->getModel('settings');
         if (NextendRequest::getInt('save')) {
             if ($settingsModel->save()) {
                 header('LOCATION: ' . $this->route('controller=settings'));
                 exit;
             }
         }
         if ($form == 'default' && NextendRequest::getVar('action') != $form) {
             $form = 'plugin';
         }
         $this->display($form, 'default');
     } else {
         $this->noaccess();
     }
 }
开发者ID:JonathanAJ,项目名称:Seara-da-Ciencia-UFC,代码行数:18,代码来源:settings.php

示例7: onNextendFacebookPageAlbums

 function onNextendFacebookPageAlbums(&$data)
 {
     $page = NextendRequest::getVar('fbpage', '');
     $api = getNextendFacebook();
     $data = array();
     if ($api) {
         try {
             $result = $api->api($page . '/albums');
             if (count($result['data'])) {
                 foreach ($result['data'] as $album) {
                     $data[$album['id']] = $album['name'];
                 }
             }
         } catch (Exception $e) {
             $data = null;
         }
     }
 }
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:18,代码来源:facebook.php

示例8: editAction

 function editAction()
 {
     if ($this->canDo('layout.edit')) {
         $layoutsModel = $this->getModel('layouts');
         if (!$layoutsModel->getLayout(NextendRequest::getInt('layoutid'))) {
             header('LOCATION: ' . $this->route('controller=layouts'));
             exit;
         }
         if (NextendRequest::getInt('save')) {
             if ($layoutid = $layoutsModel->save(NextendRequest::getInt('layoutid'), NextendRequest::getVar('layout'))) {
                 header('LOCATION: ' . $this->route('controller=layouts&view=sliders_layouts&action=edit&layoutid=' . $layoutid));
                 exit;
             }
         }
         $this->display('edit', 'edit');
     } else {
         $this->noaccess();
     }
 }
开发者ID:AndyHuntDesign,项目名称:andyhuntdesign,代码行数:19,代码来源:layouts.php

示例9: onNextendSliderGeneratorList

 function onNextendSliderGeneratorList(&$group, &$list, $showall = false)
 {
     if ($showall || smartsliderIsFull()) {
         $installed = NextendFilesystem::existsFolder(JPATH_ADMINISTRATOR . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_zoo');
         if ($installed) {
             $group[$this->_group] = 'ZOO';
             if (!isset($list[$this->_group])) {
                 $list[$this->_group] = array();
             }
             require_once JPATH_ADMINISTRATOR . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_zoo' . DIRECTORY_SEPARATOR . 'config.php';
             $zoo = App::getInstance('zoo');
             $apps = $zoo->table->application->all(array('order' => 'name'));
             require_once $this->getPath() . 'items' . DIRECTORY_SEPARATOR . 'generator.php';
             foreach ($apps as $app) {
                 foreach ($app->getTypes() as $type) {
                     //Make them class name safe
                     $appid = preg_replace('/[^a-zA-Z0-9_\\x7f-\\xff]*/', '', $app->id);
                     $identifier = preg_replace('/[^a-zA-Z0-9_\\x7f-\\xff]*/', '', $type->identifier);
                     $list[$this->_group][$this->_group . '_items__' . $appid . '___' . $identifier] = array(ucfirst($app->name) . ' (' . ucfirst($type->identifier) . ')', $this->getPath() . 'items' . DIRECTORY_SEPARATOR, true, true, $installed ? true : 'http://extensions.joomla.org/extensions/authoring-a-content/content-construction/12479', null);
                     if (!class_exists('NextendGeneratorZoo_items__' . $appid . '___' . $identifier)) {
                         eval('class NextendGeneratorZoo_items__' . $appid . '___' . $identifier . ' extends NextendGeneratorZoo_Items{}');
                     }
                 }
             }
         } else {
             if ($showall) {
                 $group[$this->_group] = 'ZOO';
                 if (!isset($list[$this->_group])) {
                     $list[$this->_group] = array();
                 }
                 $list[$this->_group][$this->_group . '_items'] = array('Zoo', $this->getPath() . 'items' . DIRECTORY_SEPARATOR, true, true, 'http://extensions.joomla.org/extensions/authoring-a-content/content-construction/12479', null);
             }
         }
         $app = JFactory::getApplication();
         if ($app->isAdmin() && ((NextendRequest::getVar('action') == 'createdynamic' || NextendRequest::getVar('action') == 'generatorsettings') && NextendRequest::getVar('group') == 'zoo' && NextendRequest::getVar('type'))) {
             $class = 'NextendGenerator' . NextendRequest::getVar('type');
             $data = new NextendData();
             $data->set('source', NextendRequest::getVar('type'));
             new $class($data);
         }
     }
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:42,代码来源:zoo.php

示例10: generateDynamicSliderThumbs

function generateDynamicSliderThumbs($controller, $image, $sliderid, $id, $data)
{
    global $layout, $sliderpreset;
    ?>

    <div class="smartslider-dynamic-thumb <?php 
    echo $sliderpreset == $id ? 'selected' : 'notselected';
    ?>
" onclick="location.href='<?php 
    echo $controller->route('controller=sliders&view=sliders_slider&action=changedynamiclayout&fontset=' . NextendRequest::getInt('fontset', 0) . '&type=' . NextendRequest::getVar('type', '') . '&sliderid=' . $sliderid . '&sliderpreset=' . ($sliderpreset == $id ? '' : $id) . '&layout=' . $layout);
    ?>
'">
        <div><?php 
    echo $data['title'];
    ?>
</div>
        <img src="<?php 
    echo NextendUri::pathToUri(NextendFilesystem::translateToMediaPath($image));
    ?>
" />
    </div>
    <?php 
}
开发者ID:sangikumar,项目名称:IP,代码行数:23,代码来源:changedynamiclayout.php

示例11: orderAction

 function orderAction()
 {
     if ($this->canDo('slide.edit')) {
         if ($sliderid = NextendRequest::getInt('sliderid')) {
             $slidesModel = $this->getModel('slides');
             $slidesModel->order($sliderid, NextendRequest::getVar('slideorder'));
         }
         exit;
     } else {
         $this->noaccess();
     }
 }
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:12,代码来源:slides.php

示例12:

        <td>https://test.com/</td>
    </tr>
    <tr>
        <td>old/relative/path/</td>
        <td>new/path/</td>
    </tr>
    <tr>
        <td>http://test.com/</td>
        <td>/</td>
    </tr>
</table></div>
<?php 
global $replaced, $from, $to;
$slidersModel = $this->getModel('sliders');
if (NextendRequest::getInt('save')) {
    $translateurl = NextendRequest::getVar('translateurl');
    if (isset($translateurl['translateurl'])) {
        $translateurl = NextendParse::parse($translateurl['translateurl']);
        if (isset($translateurl[0]) && $translateurl[0] != '') {
            $from = $translateurl[0];
        }
        if (isset($translateurl[1]) && $translateurl[1] != '') {
            $to = $translateurl[1];
        }
    }
    $replaced = 0;
    function nextend_translate_url($data)
    {
        global $replaced, $from, $to;
        $str = str_replace($from, $to, $data, $count);
        $replaced += $count;
开发者ID:sangikumar,项目名称:IP,代码行数:31,代码来源:translateurl.php

示例13:

<?php

$this->loadFragment('headerstart');
?>
    <div class="smartslider-button smartslider-cancel" onclick="window.nextendsave=true;location.href='<?php 
echo $this->route('controller=sliders&view=sliders_slider&action=' . (NextendRequest::getVar('type', '') == 'quick' ? '' : 'generator') . 'dashboard&sliderid=' . NextendRequest::getInt('sliderid'));
?>
';"><?php 
echo NextendText::_('Cancel');
?>
</div>
<?php 
$this->loadFragment('headerend');
?>

<?php 
$this->loadFragment('firstcolstart');
?>


<?php 
$this->loadFragment('firstcolend');
?>

<?php 
$this->loadFragment('secondcolstart');
?>

<h2>Generator records</h2>
<div class="smartslider-button-wrap">
    <div class="smartslider-button smartslider-back smartslider-button-grey smartslider-button-blue-active smartslider-icon-container ">
开发者ID:JonathanAJ,项目名称:Seara-da-Ciencia-UFC,代码行数:31,代码来源:records.php

示例14: array

</a>
            </div>
    <?php 
    }
    ?>
    <?php 
} else {
    $slider = $slidersModel->getSlider($sliderid);
    $sliders = $slider ? array($slider) : array();
    $action = NextendRequest::getCmd('action', '');
    $url = $this->route('controller=sliders&view=sliders_slider');
    $label = 'Back_to_sliders';
    if ($action == 'createdynamic' && NextendRequest::getCmd('step') == 2) {
        $url = $this->route('controller=sliders&view=sliders_slider&action=createdynamic');
        $label = 'Back to create  dynamic slider';
    } elseif (NextendRequest::getVar('type', '') != 'quick' && $sliderid && ($action == 'generatorstart' || $action == 'generatorsettings' || $action == 'generatoredit' || $action == 'changedynamiclayout' || $action == 'generatorrecords')) {
        $url = $this->route('controller=sliders&view=sliders_slider&action=generatordashboard&sliderid=' . $sliderid);
        $label = 'Back to generator dashboard';
    } elseif ($action != 'dashboard' && $sliderid) {
        $url = $this->route('controller=sliders&view=sliders_slider&action=dashboard&sliderid=' . $sliderid);
        $label = 'Back_to_dashboard';
    }
    ?>
    <div class="smartslider-button smartslider-back smartslider-button-grey smartslider-button-blue-active smartslider-icon-container">
        <a class="smartslider-button-link"
           href="<?php 
    echo $url;
    ?>
"><span
                class="smartslider-icon smartslider-icon-back"></span><?php 
    echo NextendText::_($label);
开发者ID:pguilford,项目名称:vcomcc,代码行数:31,代码来源:sliders.php

示例15: importlocalAction

 function importlocalAction()
 {
     if ($this->canDo('slider.create')) {
         $path = NEXTEND_SMART_SLIDER2_ASSETS . 'admin/smart/';
         if (NextendRequest::getInt('full', 0)) {
             $path .= 'full_smart/';
         } else {
             $path .= 'free_smart/';
         }
         $filepath = $path . basename(NextendRequest::getVar('slider', '')) . '.smart';
         if (NextendFilesystem::fileexists($filepath)) {
             $sliderid = $this->importFile($filepath);
             header('LOCATION: ' . $this->route('controller=sliders&view=sliders_slider&action=dashboard&sliderid=' . $sliderid));
             exit;
         } else {
             NextendMessage::error(NextendText::_('Error'), NextendText::_('The .smart file not found!'));
         }
         $this->display('default', 'create');
     } else {
         $this->noaccess();
     }
 }
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:22,代码来源:sliders.php


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