本文整理汇总了PHP中NextendRequest::getInt方法的典型用法代码示例。如果您正苦于以下问题:PHP NextendRequest::getInt方法的具体用法?PHP NextendRequest::getInt怎么用?PHP NextendRequest::getInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NextendRequest
的用法示例。
在下文中一共展示了NextendRequest::getInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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']));
}
}
示例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'));
}
NextendSmartSliderStorage::set($namespace, json_encode($_REQUEST['settings']));
}
}
示例3: 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
}
示例4: 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();
}
}
示例5: 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();
}
}
示例6: 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');
}
示例7: 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();
}
}
示例8:
<td>http://test.com/</td>
<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);
示例9:
$this->loadFragment('firstcol/slide');
?>
<?php
$this->loadFragment('firstcolend');
?>
<?php
$this->loadFragment('secondcolstart');
?>
<form id="smartslider-form" action="" method="post">
<?php
NextendForm::tokenize();
$slidesModel = $this->getModel('slides');
$slidesModel->renderEditForm(NextendRequest::getInt('slideid'));
?>
<input name="save" value="1" type="hidden" />
</form>
<?php
global $ss2sliderafterform;
echo $ss2sliderafterform;
?>
<?php
$this->loadFragment('secondcolend');
?>
<?php
$this->loadFragment('footer');
示例10: nextendimportsmartslider2
Refresh cache
</a>
</div>
</div>
<div style="clear:both;"></div>
<?php
nextendimportsmartslider2('nextend.smartslider.generator');
$slidersModel = $this->getModel('sliders');
$slider = $slidersModel->getSlider(NextendRequest::getInt('sliderid'));
$smartslidergenerator = (array) json_decode($slider['generator'], true);
$generatorParams = new NextendData();
$generatorParams->loadArray($smartslidergenerator);
if ($generatorParams->get('enabled')) {
$source = $generatorParams->get('source', '');
if ($source) {
$generator = new NextendSmartsliderGenerator($generatorParams, array(), NextendRequest::getInt('sliderid'));
$generator->initDatasource($source, true);
$generatorgroup = $generatorParams->get('generatorgroup', 1);
if (!empty($generator->_datasource)) {
for ($i = 0, $j = 1; $i < count($generator->_datasource); $j++) {
?>
<h2>Slide #<?php
echo $j;
?>
</h2>
<table class="ni">
<?php
for ($z = 1; $z <= $generatorgroup && $i < count($generator->_datasource); $z++) {
?>
<?php
foreach ($generator->_datasource[$i] as $k => $v) {
示例11:
<?php
$this->loadFragment('headerstart');
?>
<div class="smartslider-button smartslider-save" onclick="setTimeout(function(){njQuery('#smartslider-form').submit();}, 300);"><?php
echo NextendText::_('Save');
?>
</div>
<div class="smartslider-button smartslider-cancel" onclick="window.nextendsave=true;location.href='<?php
echo $this->route('controller=sliders&view=sliders_slider&action=dashboard&sliderid=' . NextendRequest::getInt('sliderid'));
?>
';"><?php
echo NextendText::_('Cancel');
?>
</div>
<?php
$this->loadFragment('headerend');
?>
<?php
$this->loadFragment('firstcolstart');
?>
<?php
$this->loadFragment('firstcolend');
?>
示例12: foreach
echo $this->route('controller=layouts&view=sliders_layouts&action=create');
?>
"><span class="smartslider-icon smartslider-icon-add"></span><?php
echo NextendText::_('Create_layout');
?>
</a>
</div>
</div>
<?php
}
?>
<div style="clear: both;"></div>
<?php
$layoutsModel = $this->getModel('layouts');
$layouts = $layoutsModel->getLayouts();
$layoutid = NextendRequest::getInt('layoutid', 0);
?>
<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' : '';
?>
示例13: fontAction
function fontAction()
{
$slidersModel = $this->getModel('sliders');
if ($this->canDo('slider.edit') && $slidersModel->getSlider(NextendRequest::getInt('sliderid'))) {
$settingsModel = $this->getModel('settings');
if (NextendRequest::getInt('save')) {
if ($settingsModel->save()) {
header('LOCATION: ' . $this->route('controller=sliders&view=sliders_slider&action=font&sliderid=' . $sliderid));
exit;
}
}
$this->display('font', 'font');
} else {
$this->noaccess();
}
}
示例14: deleteGeneratedBySlider
function deleteGeneratedBySlider($sliderid)
{
$db = NextendDatabase::getInstance();
$db->setQuery('DELETE FROM #__nextend_smartslider_slides WHERE generator > 0 AND slider = ' . $db->quote($sliderid));
$db->query();
self::markChanged(NextendRequest::getInt('sliderid'));
}
示例15: 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;
}