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


PHP NextendRequest::getCmd方法代码示例

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


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

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

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

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

示例4:

                        <a class="smartslider-button-link" href="<?php 
    echo $this->route('controller=settings');
    ?>
">
                            <div></div>
                            <?php 
    echo NextendText::_('Settings');
    ?>
                        </a>
                    </div>
                <?php 
}
?>
                
                <div class="smartslider-button smartslider-support <?php 
echo NextendRequest::getCmd('controller') == 'help' ? 'active' : '';
?>
">
                    <a class="smartslider-button-link" href="<?php 
echo $this->route('controller=help');
?>
">
                        <div></div>
                        <?php 
echo NextendText::_('Help');
?>
                        <?php 
global $smartslidercontroller;
$problems = $smartslidercontroller->problems();
if ($problems) {
    ?>
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:31,代码来源:headerstart.php

示例5: njQuery

echo NextendText::_('List');
?>
</div>
        </div>
        <div class="smartslider-toolbar-edit smartslider-toolbar-options smartslider-button-grey last">
            <div><?php 
echo NextendText::_('Edit');
?>
</div>
        </div>
    </div>
    -->
    <div class="smartslider-slide-toolbox-pane nextend-clearfix">
        <div class="smartslider-slide-toolbox-sliders">
            <?php 
if (NextendRequest::getCmd('controller') == 'layouts') {
    $this->loadFragment('firstcol/layouts');
} else {
    $this->loadFragment('firstcol/sliders');
}
?>
        </div>
        <script type="text/javascript">
            njQuery(window).ready(function($){
                var pane = $('.smartslider-slide-toolbox-pane .smartslider-slide-toolbox-sliders'),
                    timeout = null;
                pane.on('mouseenter', function(){
                    if(timeout) clearTimeout(timeout);
                    timeout = setTimeout(function(){
                        pane.addClass('active');
                        
开发者ID:AndyHuntDesign,项目名称:andyhuntdesign,代码行数:30,代码来源:slide.php

示例6: array

<?php

$action = NextendRequest::getCmd('action', 'default');
$settings = array(array('id' => 'default', 'title' => NextendText::_('General_settings')), array('id' => 'layout', 'title' => NextendText::_('Layout_settings')));
if (nextendIsJoomla()) {
    $settings[] = array('id' => 'joomla', 'title' => NextendText::_('Joomla_settings'));
}
$settings[] = array('id' => 'cache', 'title' => NextendText::_('Cache'));
NextendPlugin::callPlugin('nextendslidergenerator', 'onNextendGeneratorConfigurationList', array(&$settings));
$settings[] = array('id' => 'font', 'title' => NextendText::_('Global_font'));
?>
<dl class="smartslider-list smartslider-sliders-list">
    <?php 
$i = 0;
foreach ($settings as $setting) {
    $c = $i % 2 ? 'even' : 'odd';
    $i++;
    $active = $action == $setting['id'];
    if ($action == 'font' && NextendRequest::getInt('sliderid')) {
        $active = false;
    }
    ?>
        <dt class="<?php 
    echo $c;
    ?>
 smartslider-button-blue-active smartslider-icon-container <?php 
    echo $active ? 'active' : '';
    ?>
">
        <a class="smartslider-button-link" href="<?php 
    echo $this->route('controller=settings&view=sliders_settings&action=' . $setting['id']);
开发者ID:JonathanAJ,项目名称:Seara-da-Ciencia-UFC,代码行数:31,代码来源:settings.php

示例7: initSlides

 function initSlides($slides)
 {
     if ($this->_backend) {
         if (NextendRequest::getCmd('action') == 'create') {
             array_unshift($slides, array('id' => 0, 'title' => '{_slidetitle}', 'slider' => NextendRequest::getInt('sliderid'), 'publish_up' => '0000-00-00 00:00:00', 'publish_down' => '0000-00-00 00:00:00', 'published' => 1, 'first' => 0, 'slide' => '', 'params' => '', 'thumbnail' => '', 'background' => 'ffffff00|*|', 'description' => 'Description', 'ordering' => count($slides)));
         }
         if (NextendRequest::getCmd('action') == 'generatoredit') {
             global $smartslidergeneratorslide;
             if (!$smartslidergeneratorslide) {
                 $smartslidergeneratorslide = array();
             }
             array_unshift($slides, array_merge(array('id' => 0, 'title' => '{_slidetitle}', 'slider' => NextendRequest::getInt('sliderid'), 'publish_up' => '0000-00-00 00:00:00', 'publish_down' => '0000-00-00 00:00:00', 'published' => 1, 'first' => 0, 'slide' => '', 'params' => '', 'thumbnail' => '', 'background' => 'ffffff00|*|', 'description' => 'Description', 'ordering' => count($slides)), $smartslidergeneratorslide));
         } else {
             if (NextendRequest::getCmd('controller') == 'layouts' && NextendRequest::getCmd('action') == 'edit') {
                 global $smartsliderlayout;
                 if (!$smartsliderlayout) {
                     $smartsliderlayout = '';
                 }
                 array_unshift($slides, array('id' => 0, 'title' => '{_slidetitle}', 'slide' => $smartsliderlayout, 'params' => ''));
             } else {
                 if (NextendRequest::getCmd('controller') == 'slides') {
                     $currentlyedited = NextendRequest::getInt('slideid');
                     for ($i = 0; $i < count($slides); $i++) {
                         if ($slides[$i]['id'] == $currentlyedited) {
                             $this->_activeSlide = $i;
                             break;
                         }
                     }
                 }
             }
         }
     } else {
         for ($i = 0; $i < count($slides); $i++) {
             if ($slides[$i]['first'] == 1) {
                 $this->_activeSlide = $i;
                 break;
             }
         }
     }
     nextendimport('nextend.image.color');
     for ($i = 0; $i < count($slides); $i++) {
         $params = new NextendData();
         $params->loadJSON($slides[$i]['params']);
         $slides[$i]['params'] = $params;
         $slides[$i]['classes'] = 'smart-slider-canvas';
         if (!isset($slides[$i]['background'])) {
             $slides[$i]['background'] = 'ffffff00|*|';
         }
         $bg = (array) NextendParse::parse($slides[$i]['background']);
         $style = '';
         if (isset($bg[0]) && strlen($bg[0]) == 8) {
             if (substr($bg[0], 6, 2) != '00') {
                 $style .= 'background-color: #' . substr($bg[0], 0, 6) . ';';
                 $rgba = NextendColor::hex2rgba($bg[0]);
                 $style .= 'background-color: RGBA(' . $rgba[0] . ',' . $rgba[1] . ',' . $rgba[2] . ',' . round($rgba[3] / 127, 2) . ');';
             }
         }
         $slides[$i]['style'] = $style;
         $bgmore = (array) NextendParse::parse($slides[$i]['params']->get('backgroundmore'));
         $slides[$i]['bg'] = array('desktop' => empty($bg[1]) ? 0 : NextendUri::fixrelative($bg[1]), 'desktopretina' => empty($bgmore[0]) ? 0 : NextendUri::fixrelative($bgmore[0]), 'tablet' => empty($bgmore[1]) ? 0 : NextendUri::fixrelative($bgmore[1]), 'tabletretina' => empty($bgmore[2]) ? 0 : NextendUri::fixrelative($bgmore[2]), 'mobile' => empty($bgmore[3]) ? 0 : NextendUri::fixrelative($bgmore[3]), 'mobileretina' => empty($bgmore[4]) ? 0 : NextendUri::fixrelative($bgmore[4]), 'alt' => empty($bg[2]) ? '' : $bg[2]);
         if (!empty($slides[$i]['thumbnail'])) {
             $slides[$i]['thumbnail'] = NextendUri::fixrelative($slides[$i]['thumbnail']);
         }
         $link = $params->get('link', '');
         $link = (array) NextendParse::parse($link);
         if (!$this->_backend && $link && isset($link[0]) && $link[0] != '' && $link[0] != '#') {
             if (!isset($link[1])) {
                 $link[1] = '_self';
             }
             $slides[$i]['link'] = ' onclick="' . htmlspecialchars(strpos($link[0], 'javascript:') === 0 ? $link[0] : ($link[1] == '_blank' ? "window.open('" . (nextendIsJoomla() ? JRoute::_($link[0], false) : $link[0]) . "','_blank');" : "window.location='" . (nextendIsJoomla() ? JRoute::_($link[0], false) : $link[0]) . "'")) . '" ';
             $slides[$i]['style'] .= 'cursor:pointer;';
         } else {
             $slides[$i]['link'] = '';
         }
     }
     return $slides;
 }
开发者ID:AndyHuntDesign,项目名称:andyhuntdesign,代码行数:77,代码来源:slider.php

示例8: run

 function run()
 {
     $this->doAction(NextendRequest::getCmd('action', 'default'));
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:4,代码来源:controller.php

示例9: foreach

    <dl class="smartslider-list smartslider-sliders-list smartslider-layouts-list">
        <?php 
    $i = 0;
    foreach ($layouts as $layout) {
        $c = $i % 2 ? 'even' : 'odd';
        $i++;
        $active = $layoutid == $layout['id'];
        ?>
            <dt class="<?php 
        echo $c;
        ?>
 smartslider-button-blue-active smartslider-icon-container <?php 
        echo $active ? 'subactive' : '';
        ?>
 <?php 
        echo $active && NextendRequest::getCmd('controller') == 'layouts' ? 'active' : '';
        ?>
">
                <a class="smartslider-button-link" href="<?php 
        echo $this->route('controller=layouts&view=sliders_layouts&action=edit&layoutid=' . $layout['id']);
        ?>
"><?php 
        echo $layout['title'];
        ?>
</a>
                <?php 
        if ($accessLayoutDelete) {
            ?>
                    <a onclick="return confirm('<?php 
            echo NextendText::_('Are_you_sure_that_you_want_to_delete_the_layout');
            ?>
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:31,代码来源:layouts.php

示例10:

        ?>
                <?php 
        $js->addLibraryJsLibraryFile('jquery', 'ui/jquery.ui.core.min.js');
        $js->addLibraryJsLibraryFile('jquery', 'ui/jquery.ui.widget.min.js');
        $js->addLibraryJsLibraryFile('jquery', 'ui/jquery.ui.mouse.min.js');
        $js->addLibraryJsLibraryFile('jquery', 'ui/jquery.ui.sortable.min.js');
        $js->addLibraryJsFile('jquery', NEXTEND_SMART_SLIDER2_ASSETS . 'admin/js/slideordering.js');
        $js->addInlineJs('njQuery(document).ready(function() { ' . 'window.smartSliderSlideOrdering.init("' . $this->route('controller=slides&view=sliders_slides&action=order&sliderid=' . $slider['id']) . '"); ' . '});');
        $js->addInlineJs('njQuery(document).ready(function() { ' . ' ' . '});');
        ?>
                <ul class="smartslider-slides-list">
                    <?php 
        if ($accessSlideCreate) {
            ?>
                        <li class="smartslider-button-grey smartslider-button-blue-active smartslider-icon-container <?php 
            echo NextendRequest::getCmd('view') == 'sliders_slides' && NextendRequest::getCmd('action') == 'create' ? 'active' : '';
            ?>
">
                            <a class="smartslider-button-link"
                               href="<?php 
            echo $this->route('controller=slides&view=sliders_slides&action=create&sliderid=' . $sliderid);
            ?>
">
                                <span class="smartslider-icon smartslider-icon-smalladd"></span>
                                <?php 
            echo NextendText::_('Create_slide');
            ?>
                            </a>
                        </li>
                    <?php 
        }
开发者ID:pguilford,项目名称:vcomcc,代码行数:31,代码来源:sliders.php

示例11: elseif

<?php

global $smartsliderfullwidth;
$css = NextendCss::getInstance();
$css->addCssFile(NEXTEND_SMART_SLIDER2_ASSETS . 'admin/css/firstcol.css');
$js = NextendJavascript::getInstance();
$js->addLibraryJsFile('jquery', NEXTEND_SMART_SLIDER2_ASSETS . 'admin/js/adminresizer.js');
?>
<div class="smartslider-cols nextend-clearfix">
<div class="smartslider-firstcol" style="<?php 
if ($smartsliderfullwidth === true) {
    ?>
display: none;<?php 
}
?>
">
        <div class="smartslider-border">
<?php 
if (NextendRequest::getCmd('controller') == 'sliders' && NextendRequest::getCmd('action') != 'generatoredit' || NextendRequest::getCmd('controller') == 'help') {
    $this->loadFragment('firstcol/sliders');
} elseif (NextendRequest::getCmd('controller') == 'layouts' && NextendRequest::getCmd('action') != 'edit' && NextendRequest::getCmd('action') != 'create') {
    $this->loadFragment('firstcol/layouts');
}
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:23,代码来源:firstcolstart.php


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