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

PHP DSC类代码示例

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

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



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

示例1: popup

 /**
  * Displays a url in a lightbox
  *
  * @param $url
  * @param $text
  * @param array options(
  * 				'width',
  *				'height',
  * 				'top',
  * 				'left',
  * 				'class',
  * 				'update',
  * 				'img'
  * 				)
  * @return popup html
  */
 public static function popup($url, $text, $options = array())
 {
     $html = "";
     if (!empty($options['update'])) {
         JHTML::_('behavior.modal', 'a.modal', array('onClose' => '\\function(){Dsc.update();}'));
     } else {
         JHTML::_('behavior.modal');
     }
     // set the $handler_string based on the user's browser
     $handler_string = "{handler:'iframe',size:{x: window.innerWidth-80, y: window.innerHeight-80}, onShow:\$('sbox-window').setStyles({'padding': 0})}";
     $browser = DSC::getClass('DSCBrowser', 'library.browser');
     if ($browser->getBrowser() == DSCBrowser::BROWSER_IE) {
         // if IE, use
         $handler_string = "{handler:'iframe',size:{x:window.getSize().scrollSize.x-80, y: window.getSize().size.y-80}, onShow:\$('sbox-window').setStyles({'padding': 0})}";
     }
     $handler = !empty($options['img']) ? "{handler:'image'}" : $handler_string;
     if (!empty($options['width'])) {
         if (empty($options['height'])) {
             $options['height'] = 480;
         }
         $handler = "{handler: 'iframe', size: {x: " . $options['width'] . ", y: " . $options['height'] . "}}";
     }
     $id = !empty($options['id']) ? $options['id'] : '';
     $class = !empty($options['class']) ? $options['class'] : '';
     $linkclass = !empty($options['linkclass']) ? $options['linkclass'] : '';
     $linkclass = $linkclass . ' modal';
     $html = "<a class=\"" . $linkclass . "\" href=\"{$url}\" rel=\"{$handler}\" >\n";
     $html .= "<span class=\"" . $class . "\" id=\"" . $id . "\" >\n";
     $html .= "{$text}\n";
     $html .= "</span>\n";
     $html .= "</a>\n";
     return $html;
 }
开发者ID:joomlacorner,项目名称:citruscart,代码行数:49,代码来源:url.php


示例2: footer

 /**
  * Displays the footer
  *
  * @return unknown_type
  */
 function footer()
 {
     // show a generous linkback, TIA
     $app = DSC::getApp();
     $input = JFactory::getApplication()->input;
     $show_linkback = $app->get('show_linkback', '1');
     $name = $app->getName();
     $model_name = $name . "ModelDashboard";
     $app->load($model_name, "models.dashboard");
     $model = new $model_name();
     $format = $input->getString('format');
     if ($show_linkback == '1' && $format != 'raw') {
         $view = $this->getView('dashboard', 'html');
         $view->hidemenu = true;
         $view->setTask('footer');
         $view->setModel($model, true);
         $view->setLayout('footer');
         $view->assign('style', '');
         $view->display();
     } elseif ($format != 'raw') {
         $view = $this->getView('dashboard', 'html');
         $view->hidemenu = true;
         $view->setTask('footer');
         $view->setModel($model, true);
         $view->setLayout('footer');
         $view->assign('style', 'style="display: none;"');
         $view->display();
     }
     return;
 }
开发者ID:joomlacorner,项目名称:citruscart,代码行数:35,代码来源:site.php


示例3: getItems

 /**
  *
  */
 public static function getItems($option = '')
 {
     static $items;
     if (empty($option)) {
         $com = DSC::getApp();
         $option = 'com_' . $com->getName();
     }
     $app = JApplication::getInstance('site');
     $menus = $app->getMenu();
     if (empty($menus)) {
         return array();
     }
     if (empty($items)) {
         $items = array();
     }
     if (empty($items[$option])) {
         $component = JComponentHelper::getComponent($option);
         foreach ($menus->getItems('component', $option) as $item) {
             if (!is_object($item)) {
                 continue;
             }
             if ($item->component_id == $component->id || $item->componentid == $component->id || !empty($item->query['option']) && $item->query['option'] == $option) {
                 $items[$option][] = $item;
             }
         }
     }
     if (empty($items[$option])) {
         return array();
     }
     return $items[$option];
 }
开发者ID:joomlacorner,项目名称:citruscart,代码行数:34,代码来源:route.php


示例4: displayWithLeftMenu

 /**
  * Displays a layout file with room for a left menu bar
  * @param $tpl
  * @return unknown_type
  */
 public function displayWithLeftMenu($tpl = null, $menuname)
 {
     // TODO This is an ugly, quick hack - fix it
     echo "<table width='100%'>";
     echo "<tr>";
     echo "<td style='width: 180px; padding-right: 5px; vertical-align: top;' >";
     DSC::load('DSCMenu', 'library.menu');
     if ($menu = DSCMenu::getInstance($menuname)) {
         $menu->display('leftmenu', $menu);
     }
     $modules = JModuleHelper::getModules($this->_name . "_left");
     $document = JFactory::getDocument();
     $renderer = $document->loadRenderer('module');
     $attribs = array();
     $attribs['style'] = 'xhtml';
     foreach ($modules as $mod) {
         echo $renderer->render($mod, $attribs);
     }
     echo "</td>";
     echo "<td style='vertical-align: top;' >";
     parent::display($tpl);
     echo "</td>";
     echo "</tr>";
     echo "</table>";
 }
开发者ID:joomlacorner,项目名称:citruscart,代码行数:30,代码来源:admin.php


示例5: __construct

 function __construct($config = array())
 {
     $input = JFactory::getApplication()->input;
     $app = DSC::getApp();
     $this->_option = !empty($app) ? 'com_' . $app->getName() : $input->get('option');
     parent::__construct($config);
 }
开发者ID:joomlacorner,项目名称:citruscart,代码行数:7,代码来源:view.php


示例6: display

 /**
  * Displays a layout file
  *
  * @param unknown_type $tpl
  * @return unknown_type
  */
 function display($tpl = null)
 {
     //including core JS because it needs to be included in modals and since we have so many including here keeps that from failing.
     JHTML::_('behavior.modal');
     JHTML::_('script', 'core.js', 'media/system/js/');
     DSC::loadBootstrap();
     DSC::loadJQuery('latest', true, 'tiendaJQ');
     JHTML::_('stylesheet', 'common.css', 'media/dioscouri/css/');
     parent::display($tpl);
 }
开发者ID:annggeel,项目名称:tienda,代码行数:16,代码来源:_base.php


示例7: display

 /**
  * Displays a layout file
  *
  * @param unknown_type $tpl
  * @return unknown_type
  */
 function display($tpl = null)
 {
     $doc = JFactory::getDocument();
     //including core JS because it needs to be included in modals and since we have so many including here keeps that from failing.
     JHTML::_('behavior.modal');
     JHtml::_('script', 'media/system/js/core.js', false, false);
     JHtml::_('script', 'media/citruscart/js/citruscart.js', false, false);
     //DSC::loadBootstrap();
     DSC::loadJQuery('latest', true, 'citruscartJQ');
     JHtml::_('stylesheet', 'media/citruscart/css/common.css');
     parent::display($tpl);
 }
开发者ID:joomlacorner,项目名称:citruscart,代码行数:18,代码来源:_base.php


示例8: enable

    public static function enable($enable, $i, $prefix = '', $imgY = 'tick.png', $imgX = 'publish_x.png')
    {
        $img = $enable ? $imgY : $imgX;
        $task = $enable ? 'disable' : 'enable';
        $alt = $enable ? JText::_('Enabled') : JText::_('Disabled');
        $action = $enable ? JText::_('Disable Item') : JText::_('Enable Item');
        $href = '
		<a href="javascript:void(0);" onclick="return Dsc.listItemTask(\'cb' . $i . '\',\'' . $prefix . $task . '\')" title="' . $action . '">
		<img src="' . DSC::getURL('images') . $img . '" border="0" alt="' . $alt . '" />
		</a>';
        return $href;
    }
开发者ID:joomlacorner,项目名称:citruscart,代码行数:12,代码来源:grid.php


示例9: display

 /**
  * First displays the submenu, then displays the output
  * but only if a valid _doTask is set in the view object
  *
  * @param $tpl
  * @return unknown_type
  */
 function display($tpl = null, $perform = true)
 {
     // these need to load before jquery to prevent joomla from crying
     JHTML::_('behavior.modal');
     JHTML::_('script', 'core.js', 'media/system/js/');
     DSC::loadJQuery('latest', true, 'tiendaJQ');
     if ($this->defines->get('use_bootstrap', '0')) {
         DSC::loadBootstrap();
     }
     JHTML::_('stylesheet', 'common.css', 'media/dioscouri/css/');
     if ($this->defines->get('include_site_css', '0')) {
         JHTML::_('stylesheet', 'tienda.css', 'media/com_tienda/css/');
     }
     parent::display($tpl);
 }
开发者ID:annggeel,项目名称:tienda,代码行数:22,代码来源:_base.php


示例10: display

 /**
  * First displays the submenu, then displays the output
  * but only if a valid _doTask is set in the view object
  *
  * @param $tpl
  * @return unknown_type
  */
 public function display($tpl = null)
 {
     // display() will return null if 'doTask' is not set by the controller
     // This prevents unauthorized access by bypassing the controllers
     if (empty($this->_doTask)) {
         return null;
     }
     $this->getLayoutVars($tpl);
     if (!JRequest::getInt('hidemainmenu') && empty($this->hidemenu)) {
         $this->displaySubmenu();
     }
     $app = DSC::getApp();
     $config = $app::getInstance();
     if ($config->get('include_site_css', '1')) {
         JHTML::_('stylesheet', 'site.css', 'media/' . $this->_option . '/css/');
     }
     parent::display($tpl);
 }
开发者ID:joomlacorner,项目名称:citruscart,代码行数:25,代码来源:site.php


示例11: DSCHelperImage

 /**
  * Protected! Use the getInstance
  */
 protected function DSCHelperImage()
 {
     // Parent Helper Construction
     parent::__construct();
     $config = DSCConfig::getInstance();
     // Load default Parameters
     $this->product_img_height = $config->get('product_img_height');
     $this->product_img_width = $config->get('product_img_width');
     $this->category_img_height = $config->get('category_img_height');
     $this->category_img_width = $config->get('category_img_width');
     $this->manufacturer_img_width = $config->get('manufacturer_img_width');
     $this->manufacturer_img_height = $config->get('manufacturer_img_height');
     $this->product_img_path = DSC::getPath('products_images');
     $this->category_img_path = DSC::getPath('categories_images');
     $this->manufacturer_img_path = DSC::getPath('manufacturers_images');
     $this->product_thumb_path = DSC::getPath('products_thumbs');
     $this->category_thumb_path = DSC::getPath('categories_thumbs');
     $this->manufacturer_thumb_path = DSC::getPath('manufacturers_thumbs');
 }
开发者ID:joomlacorner,项目名称:citruscart,代码行数:22,代码来源:image.php


示例12: __construct

 /**
  * constructor
  */
 function __construct($config = array())
 {
     parent::__construct($config);
     $input = JFactory::getApplication()->input;
     $com = $input->get('option');
     //$com = JRequest::get('option');
     if (!empty($config['com'])) {
         $com = $config['com'];
     }
     //do we really need to get the whole app to get the name or should we strip it from the option??
     $app = DSC::getApp();
     $this->_name = $app->getName();
     $this->_Pluginname = ucfirst($this->_name);
     $this->set('com', $com);
     $this->set('suffix', $this->get('default_view'));
     $this->list_url = "index.php?option=" . $this->get('com') . "&view=" . $this->get('suffix');
     // Register Extra tasks
     $this->registerTask('list', 'display');
     $this->registerTask('close', 'cancel');
 }
开发者ID:joomlacorner,项目名称:citruscart,代码行数:23,代码来源:controller.php


示例13: display

 /**
  * First displays the submenu, then displays the output
  * but only if a valid _doTask is set in the view object
  *
  * @param $tpl
  * @return unknown_type
  */
 function display($tpl = null, $perform = true)
 {
     $doc = JFactory::getDocument();
     //$doc->addStyleSheet(JUri::root().'media/citruscart/css/citruscart_checkout_onepage.css');
     // these need to load before jquery to prevent joomla from crying
     JHTML::_('behavior.modal');
     $doc->addScript(JUri::root() . 'media/system/js/core.js');
     DSC::loadJQuery('latest', true, 'citruscartJQ');
     /*   if ($this->defines->get('use_bootstrap', '0'))
     	    {
     	    	DSC::loadBootstrap();
     	    } */
     //JHTML::_('stylesheet', 'common.css', 'media/citruscart/css/');
     $doc->addStyleSheet(JUri::root() . 'media/citruscart/css/common.css');
     if ($this->defines->get('include_site_css', '0')) {
         $doc->addStyleSheet(JUri::root() . 'media/citruscart/css/citruscart.css');
         //JHtml::_('stylesheet', 'media/citruscart/css/citruscart.css');
     }
     parent::display($tpl);
 }
开发者ID:joomlacorner,项目名称:citruscart,代码行数:27,代码来源:_base.php


示例14: popupbootstrap

 /**
  * TODO Push this upstream once tested
  * 
  * @param unknown_type $url
  * @param unknown_type $text
  * @param unknown_type $options
  */
 public static function popupbootstrap($url, $text, $options = array())
 {
     $version = isset($options['version']) ? $options['version'] : 'default';
     DSC::loadBootstrap();
     JHTML::_('script', 'bootstrap-modal.js', 'media/dioscouri/bootstrap/' . $version . '/js/');
     $time = time();
     $modal_id = isset($options['modal_id']) ? $options['modal_id'] : 'modal-' . $time;
     $button_class = isset($options['button_class']) ? $options['button_class'] : 'btn';
     $label = 'label-' . $time;
     $button = '<a href="' . $url . '" data-target="#' . $modal_id . '" role="button" class="' . $button_class . '" data-toggle="modal">' . $text . '</a>';
     $modal = '';
     $modal .= '<div id="' . $modal_id . '" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="' . $label . '" aria-hidden="true">';
     $modal .= '    <div class="modal-header">';
     $modal .= '        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>';
     $modal .= '        <h3 id="' . $label . '">' . $text . '</h3>';
     $modal .= '    </div>';
     $modal .= '    <div class="modal-body">';
     $modal .= '    </div>';
     $modal .= '</div>';
     return $button . $modal;
 }
开发者ID:annggeel,项目名称:tienda,代码行数:28,代码来源:url.php


示例15:

 *   - added JPEG compression quality setting. Thanks Vad</li>
 *  <li><b>v 0.14</b> 14/03/2005<br>
 *   - reworked the class file to allow parsing with phpDocumentor</li>
 *  <li><b>v 0.13</b> 07/03/2005<br>
 *   - fixed a bug with {@link image_ratio}. Thanks Justin.<br>
 *   - added {@link image_ratio_no_zoom_in} and {@link image_ratio_no_zoom_out} </li>
 *  <li><b>v 0.12</b> 21/01/2005<br>
 *   - added {@link image_ratio} to resize within max values, keeping image ratio</li>
 *  <li><b>v 0.11</b> 22/08/2003<br>
 *   - update for GD2 (changed imageresized() into imagecopyresampled() and imagecreate() into imagecreatetruecolor())</li>
 * </ul>
 *
 * @package   cmf
 * @subpackage external
 */
DSC::load('DSCImage', 'library.image');
class DSCUpload extends DSCImage
{
    /**
     * Class version
     *
     * @access public
     * @var string
     */
    var $version;
    /**
     * Uploaded file name
     *
     * @access public
     * @var string
     */
开发者ID:joomlacorner,项目名称:citruscart,代码行数:31,代码来源:upload.php


示例16: _getLayout

 /**
  * Gets the parsed layout file
  *
  * @param string $layout The name of  the layout file
  * @param object $vars Variables to assign to
  * @param string $plugin The name of the plugin
  * @param string $group The plugin's group
  * @return string
  * @access protected
  */
 protected function _getLayout($layout, $vars = false, $plugin = '', $group = '')
 {
     if (empty($group)) {
         $app = DSC::getApp();
         $com_name = $app->getName();
         $group = str_replace('com_', '', $com_name);
         if (empty($group)) {
             // TODO Try to get it some other way, such as from the name of the plugin?
             return null;
         }
     }
     if (empty($plugin)) {
         $plugin = $this->_element;
     }
     ob_start();
     $layout = $this->_getLayoutPath($plugin, $group, $layout);
     include $layout;
     $html = ob_get_contents();
     ob_end_clean();
     return $html;
 }
开发者ID:joomlacorner,项目名称:citruscart,代码行数:31,代码来源:plugin.php


示例17: number

 /**
  * Nicely format a number
  *
  * @param $number
  * @return unknown_type
  */
 public static function number($number, $options = '')
 {
     $config = DSC::getApp();
     $options = (array) $options;
     $thousands = isset($options['thousands']) ? $options['thousands'] : $config->get('number_thousands', ',');
     $decimal = isset($options['decimal']) ? $options['decimal'] : $config->get('number_decimal', '.');
     $num_decimals = isset($options['num_decimals']) ? $options['num_decimals'] : $config->get('number_num_decimals', '0');
     $return = number_format($number, $num_decimals, $decimal, $thousands);
     return $return;
 }
开发者ID:joomlacorner,项目名称:citruscart,代码行数:16,代码来源:helper.php


示例18: onAfterRoute

 function onAfterRoute()
 {
     $doc = JFactory::getDocument();
     if ($this->params->get('activeAdmin') == 1) {
         $juri = JFactory::getURI();
         if (strpos($juri->getPath(), '/administrator/') !== false) {
             return;
         }
     }
     if ($value = $this->params->get('embedjquery')) {
         DSC::loadJQuery('latest', $this->params->get('jquerynoconflict'));
     }
     JHTML::_('script', 'colorbox.js', 'media/citruscart/colorbox/');
     if ($value = $this->params->get('embedbootstrap')) {
         DSC::loadBootstrap($this->params->get('bootstrapversion'), $this->params->get('bootstrapjoomla'));
     }
 }
开发者ID:joomlacorner,项目名称:citruscart,代码行数:17,代码来源:dioscouri.php


示例19: getAvatar

 /**
  *
  * Get Avatar based on the installed community component
  * @param int $id - userid
  * @return object
  */
 function getAvatar($id)
 {
     $avatar = '';
     $found = false;
     Citruscart::load('CitruscartHelperAmbra', 'helpers.ambra');
     $helper_ambra = CitruscartHelperBase::getInstance('Ambra');
     //check if ambra installed
     if ($helper_ambra->isInstalled() && !$found) {
         if (!class_exists('Ambra')) {
             JLoader::register("Ambra", JPATH_ADMINISTRATOR . "/components/com_ambra/defines.php");
         }
         //Get Ambra Avatar
         if ($image = Ambra::getClass("AmbraHelperUser", 'helpers.user')->getAvatar($id)) {
             $link = JRoute::_(JURI::root() . 'index.php?option=com_ambra&view=users&id=' . $id, false);
             $avatar .= "<a href='{$link}' target='_blank'>";
             $avatar .= "<img src='{$image}' style='max-width:80px; border:1px solid #ccccce;' />";
             $avatar .= "</a>";
         }
         $found = true;
     }
     //check if jomsocial installed
     if (DSC::getApp()->isComponentInstalled('com_community') && !$found) {
         //Get JomSocial Avatar
         $database = JFactory::getDBO();
         $query = "\r\n\t\t\tSELECT\r\n\t\t\t\t*\r\n\t\t\tFROM\r\n\t\t\t\t#__community_users\r\n\t\t\tWHERE\r\n\t\t\t\t`userid` = '" . $id . "'\r\n\t\t\t";
         $database->setQuery($query);
         $result = $database->loadObject();
         if (isset($result->thumb)) {
             $image = JURI::root() . $result->thumb;
         }
         $link = JRoute::_(JURI::root() . 'index.php?option=com_community&view=profile&userid=' . $id, false);
         $avatar .= "<a href='{$link}' target='_blank'>";
         $avatar .= "<img src='{$image}' style='max-width:80px; border:1px solid #ccccce;' />";
         $avatar .= "</a>";
         $found = true;
     }
     //check if community builder is installed
     if (DSC::getApp()->isComponentInstalled('com_comprofiler') && !$found) {
         //Get JomSocial Avatar
         $database = JFactory::getDBO();
         $query = "\r\n\t\t\tSELECT\r\n\t\t\t\t*\r\n\t\t\tFROM\r\n\t\t\t\t#__comprofiler\r\n\t\t\tWHERE\r\n\t\t\t\t`id` = '" . $id . "'\r\n\t\t\t";
         $database->setQuery($query);
         $result = $database->loadObject();
         if (isset($result->avatar)) {
             $image = JURI::root() . 'images/comprofiler/' . $result->avatar;
         } else {
             $image = JRoute::_(JURI::root() . 'components/com_comprofiler/plugin/templates/default/images/avatar/nophoto_n.png');
         }
         $link = JRoute::_(JURI::root() . 'index.php?option=com_comprofiler&userid=' . $id, false);
         $avatar .= "<a href='{$link}' target='_blank'>";
         $avatar .= "<img src='{$image}' style='max-width:80px; border:1px solid #ccccce;' />";
         $avatar .= "</a>";
         $found = true;
     }
     return $avatar;
 }
开发者ID:joomlacorner,项目名称:citruscart,代码行数:62,代码来源:user.php


示例20: defined

<?php

defined('_JEXEC') or die('Restricted access');
JHTML::_('script', 'tienda.js', 'media/com_tienda/js/');
$state = @$this->state;
$form = @$this->form;
$items = @$this->items;
?>

<?php 
DSC::loadHighcharts();
?>

	<?php 
echo TiendaGrid::pagetooltip(JRequest::getVar('view'));
?>

	<table style="width: 100%;">
	<tr>
		<td style="width: 70%; max-width: 70%; vertical-align: top; padding: 0px 5px 0px 5px;">
		
		    <form action="<?php 
echo JRoute::_(@$form['action']);
?>
" method="post" name="adminForm" enctype="multipart/form-data">

			<table class="table table-striped table-bordered" style="margin-bottom: 5px;">
			<thead>
			<tr>
				<th><?php 
echo JText::_('COM_TIENDA_RANGE');
开发者ID:annggeel,项目名称:tienda,代码行数:31,代码来源:default.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP DUPX_Log类代码示例发布时间:2022-05-23
下一篇:
PHP DOMXpath类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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