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


PHP NextendRequest类代码示例

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


在下文中一共展示了NextendRequest类的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: save

 function save()
 {
     $namespace = NextendRequest::getCmd('namespace', 'default');
     if (isset($_REQUEST['namespace']) && isset($_REQUEST['settings'])) {
         if ($namespace == 'default') {
             $namespace = 'settings';
         }
         if ($namespace == 'font' && NextendRequest::getInt('sliderid')) {
             $namespace .= NextendRequest::getInt('sliderid');
             self::markChanged(NextendRequest::getInt('sliderid'));
         }
         if ($namespace == 'joomla') {
             $license = empty($_REQUEST['settings']['license']) ? '' : $_REQUEST['settings']['license'];
             $db = NextendDatabase::getInstance();
             $db->setQuery("SELECT b.update_site_id FROM #__extensions AS a LEFT JOIN #__update_sites_extensions AS b ON a.extension_id = b.extension_id WHERE a.element = 'com_smartslider2' ");
             $updates = $db->loadAssocList();
             if (count($updates)) {
                 $id = $updates[0]['update_site_id'];
                 unset($updates[0]);
                 if (count($updates)) {
                     foreach ($updates as $u) {
                         $db->setQuery('DELETE FROM #__update_sites WHERE update_site_id = ' . $u['update_site_id']);
                         $db->query();
                         $db->setQuery('DELETE FROM #__update_sites_extensions WHERE update_site_id = ' . $u['update_site_id']);
                         $db->query();
                     }
                 }
                 $db->setQuery('UPDATE #__update_sites SET location = ' . $db->quote('http://www.nextendweb.com/update2/joomla/update.php?license=' . urlencode($license) . '&fake=extension.xml') . ' WHERE update_site_id = ' . $id);
                 $db->query();
             }
         }
         NextendSmartSliderStorage::set($namespace, json_encode($_REQUEST['settings']));
     }
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:34,代码来源:settings.php

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

示例4: pluginmethod

 function pluginmethod()
 {
     $group = NextendRequest::getCmd('group', null);
     $method = NextendRequest::getCmd('method', null);
     if ($group && $method) {
         JPluginHelper::importPlugin($group);
         $dispatcher = JDispatcher::getInstance();
         $data = null;
         $results = $dispatcher->trigger($method, array(&$data));
     }
     echo json_encode($data);
     exit;
 }
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:13,代码来源:ajax.php

示例5: save

 function save()
 {
     $namespace = NextendRequest::getCmd('namespace', 'default');
     if (isset($_REQUEST['namespace']) && isset($_REQUEST['settings'])) {
         if ($namespace == 'default') {
             $namespace = 'settings';
         }
         if ($namespace == 'font' && NextendRequest::getInt('sliderid')) {
             $namespace .= NextendRequest::getInt('sliderid');
             self::markChanged(NextendRequest::getInt('sliderid'));
         }
         NextendSmartSliderStorage::set($namespace, json_encode($_REQUEST['settings']));
     }
 }
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:14,代码来源:settings.php

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

示例7: generateDynamicThumbs

function generateDynamicThumbs($controller, $path, $group, $type, $title, $configured, $full, $available)
{
    ?>

    <div class="smartslider-dynamic-thumb">
        <div><?php 
    echo $title;
    ?>
</div>
        <img src="<?php 
    echo NextendUri::pathToUri($path);
    ?>
" /><br />
        <?php 
    if ($full && !smartsliderIsFull()) {
        ?>

            <a class="button small g" href="http://www.nextendweb.com/smart-slider/" target="_blank">Get full</a>
        <?php 
    } elseif (!$configured) {
        ?>

            <a class="button small b" href="<?php 
        echo $controller->route('controller=settings&view=sliders_settings&action=' . $group);
        ?>
" target="_blank">Configure</a>
        <?php 
    } elseif ($available !== true) {
        ?>

            <a class="button small" href="<?php 
        echo $available;
        ?>
" target="_blank">Check extension</a>
        <?php 
    } else {
        ?>

            <a class="button small b" href="<?php 
        echo $controller->route('controller=sliders&view=sliders_generator&action=generatorsettings&sliderid=' . NextendRequest::getInt('sliderid') . '&group=' . $group . '&type=' . $type);
        ?>
">Start</a>
        <?php 
    }
    ?>

    </div>
    <?php 
}
开发者ID:sangikumar,项目名称:IP,代码行数:49,代码来源:source.php

示例8: deleteAction

 function deleteAction()
 {
     if ($this->canDo('layout.delete')) {
         if ($layoutid = NextendRequest::getInt('layoutid')) {
             $layoutsModel = $this->getModel('layouts');
             $layoutsModel->delete($layoutid);
             header('LOCATION: ' . $_SERVER["HTTP_REFERER"]);
             exit;
         }
         header('LOCATION: ' . $this->route('controller=sliders&view=sliders_slider'));
         exit;
     } else {
         $this->noaccess();
     }
 }
开发者ID:AndyHuntDesign,项目名称:andyhuntdesign,代码行数:15,代码来源:layouts.php

示例9: clearfontsAction

 function clearfontsAction()
 {
     if ($this->canDo('core.admin')) {
         $sliderid = NextendRequest::getInt('sliderid');
         $settingsModel = $this->getModel('settings');
         if ($sliderid) {
             if ($settingsModel->clearfonts($sliderid)) {
                 header('LOCATION: ' . $this->route('controller=settings&view=sliders_settings&action=font&sliderid=' . $sliderid));
                 exit;
             }
         }
         $this->display($form, 'default');
     } else {
         $this->noaccess();
     }
 }
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:16,代码来源:settings.php

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

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

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

示例13: cacheAction

 function cacheAction()
 {
     if (NextendRequest::getInt('refreshcache')) {
         $slidersModel = $this->getModel('sliders');
         switch (NextendRequest::getInt('refreshcache')) {
             case 1:
                 foreach ($slidersModel->getSliders() as $slider) {
                     NextendSmartsliderAdminModelSliders::markChanged($slider['id']);
                 }
                 break;
             case 2:
                 foreach ($slidersModel->getSliders() as $slider) {
                     $slidersModel->refreshCache($slider['id']);
                 }
                 break;
         }
         header('LOCATION: ' . $this->route('controller=settings&view=sliders_settings&action=cache'));
         exit;
     }
     $this->display('cache', 'cache');
 }
开发者ID:JonathanAJ,项目名称:Seara-da-Ciencia-UFC,代码行数:21,代码来源:settings.php

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

示例15: changeDynamicLayout

 function changeDynamicLayout($sliderid)
 {
     $slider = $this->getSlider($sliderid);
     $sliderParams = new NextendData();
     $sliderParams->loadJSON($slider['params']);
     $sliders = array();
     NextendPlugin::callPlugin('nextendslidergeneratorlayouts', 'onNextendSliderGeneratorSlider', array(&$sliders, $sliderParams->get('size', null)));
     $sliderpreset = NextendRequest::getVar('sliderpreset', '');
     if (isset($sliders[$sliderpreset])) {
         $slider = $sliders[$sliderpreset]['slider'] + $slider;
         $db = NextendDatabase::getInstance();
         $db->update('#__nextend_smartslider_sliders', array('type' => $slider['type'], 'params' => $slider['params']), 'id = ' . $db->quote($sliderid));
         self::markChanged($sliderid);
     }
     $generatorParams = new NextendData();
     $generatorParams->loadJSON($slider['generator']);
     $group = array();
     $list = array();
     NextendPlugin::callPlugin('nextendslidergenerator', 'onNextendSliderGeneratorList', array(&$group, &$list));
     $source = $generatorParams->get('source');
     $sourcetype = null;
     foreach ($list as $ls) {
         foreach ($ls as $k => $l) {
             if ($k == $source) {
                 $sourcetype = $l;
                 break;
             }
         }
         if ($sourcetype) {
             break;
         }
     }
     $slide = array();
     NextendPlugin::callPlugin('nextendslidergeneratorlayouts', 'onNextendSliderGeneratorLayouts', array($sourcetype[5], &$slide));
     $layout = NextendRequest::getVar('layout', '');
     if (isset($slide[$layout])) {
         if (isset($slide[$layout]['slider'])) {
             $generatorParams->loadArray($slide[$layout]['slider']);
         }
         $this->saveGenerator($sliderid, $generatorParams->toArray(), $slide[$layout]['slide'], false);
     }
     return $sliderid;
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:43,代码来源:sliders.php


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