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


PHP JTEXT::sprintf方法代码示例

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


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

示例1: getInput

 protected function getInput()
 {
     $field_set = $this->form->getFieldset();
     $donation_code = $field_set['jform_params_donation_code']->value;
     $host = JURI::getInstance()->getHost();
     $field_value = '';
     if ($host == 'localhost') {
         $field_value = '<div style="border: 1px solid #DD87A2; border-radius: 2px; padding: 5px; background-color: #F9CAD9; font-size: 120%; margin: 10px 0;">' . JTEXT::_('KR_DONATION_CODE_CHECK_DEFAULT_LOCALHOST') . '</div>';
         if (!empty($donation_code)) {
             $field_value .= '<div style="border: 1px solid #F2DB82; border-radius: 2px; padding: 5px; background-color: #F7EECA; font-size: 120%; margin: 10px 0;">' . JTEXT::_('KR_DONATION_CODE_CHECK_ERROR_LOCALHOST') . '</div>';
         }
     } else {
         $donation_code_check = $this->getDonationCodeStatus($host, $donation_code);
         if ($donation_code_check != 1) {
             $field_value = '<div style="border: 1px solid #DD87A2; border-radius: 2px; padding: 5px; background-color: #F9CAD9; font-size: 120%; margin: 10px 0;">' . JTEXT::sprintf('KR_DONATION_CODE_CHECK_DEFAULT', $host) . '</div>';
             if ($donation_code_check == -1) {
                 $field_value .= '<div style="border: 1px solid #F2DB82; border-radius: 2px; padding: 5px; background-color: #F7EECA; font-size: 120%; margin: 10px 0;">' . JTEXT::_('KR_DONATION_CODE_CHECK_ERROR_SERVER') . '</div>';
             }
             if ($donation_code_check == -2) {
                 $field_value .= '<div style="border: 1px solid #F2DB82; border-radius: 2px; padding: 5px; background-color: #F7EECA; font-size: 120%; margin: 10px 0;">' . JTEXT::_('KR_DONATION_CODE_CHECK_ERROR') . '</div>';
             }
         }
     }
     return $field_value;
 }
开发者ID:arkane0906,项目名称:lasercut-bootstrap,代码行数:25,代码来源:krdonationcodecheck.php

示例2: getInput

 protected function getInput()
 {
     $field_set = $this->form->getFieldset();
     $donation_code = '';
     if (empty($this->group)) {
         $donation_code = $field_set['jform_donation_code']->value;
     } elseif ($this->group == 'params') {
         $donation_code = $field_set['jform_params_donation_code']->value;
     }
     $session = JFactory::getSession();
     $field_value_session = $session->get('field_value', '', 'krdonationcodecheck');
     $field_value_head_session = $session->get('field_value_head', '', 'krdonationcodecheck');
     $donation_code_session = $session->get('donation_code', '', 'krdonationcodecheck');
     if ($field_value_session === 1 and $donation_code === $donation_code_session) {
         $field_value = '';
         if ($this->id == 'jform_params_donation' or $this->id == 'jform_donation') {
             $field_value .= '<div class="' . $this->randomClassName($session, 'success') . '">' . JTEXT::_('KR_DONATION_CODE_CHECK_SUCCESS') . '</div>';
             $this->setHeadDataSession($session);
         }
         return $field_value;
     } elseif (!empty($field_value_session) and !empty($field_value_head_session) and $donation_code == $donation_code_session) {
         $this->addHeadData($field_value_head_session);
         return $field_value_session;
     }
     $session->clear('field_value', 'krdonationcodecheck');
     $session->clear('field_value_head', 'krdonationcodecheck');
     $session->clear('donation_code', 'krdonationcodecheck');
     $host = JURI::getInstance()->getHost();
     $session->set('donation_code', $donation_code, 'krdonationcodecheck');
     if ($host == 'localhost') {
         $field_value = '<div class="' . $this->randomClassName($session) . '">' . JTEXT::_('KR_DONATION_CODE_CHECK_DEFAULT_LOCALHOST') . '</div>';
         if (!empty($donation_code)) {
             $field_value .= '<div class="' . $this->randomClassName($session, 'warning') . '">' . JTEXT::_('KR_DONATION_CODE_CHECK_ERROR_LOCALHOST') . '</div>';
         }
         $session->set('field_value', $field_value, 'krdonationcodecheck');
         $this->setHeadDataSession($session);
         return $field_value;
     }
     $donation_code_check = $this->getDonationCodeStatus($host, $donation_code);
     if ($donation_code_check !== 1) {
         $field_value = '<div class="' . $this->randomClassName($session) . '">' . JTEXT::sprintf('KR_DONATION_CODE_CHECK_DEFAULT', $host) . '</div>';
         if ($donation_code_check === -1) {
             $field_value .= '<div class="' . $this->randomClassName($session, 'warning') . '">' . JTEXT::_('KR_DONATION_CODE_CHECK_ERROR_SERVER') . '</div>';
         }
         if ($donation_code_check === -2) {
             $field_value .= '<div class="' . $this->randomClassName($session, 'warning') . '">' . JTEXT::_('KR_DONATION_CODE_CHECK_ERROR') . '</div>';
         }
         $session->set('field_value', $field_value, 'krdonationcodecheck');
         $this->setHeadDataSession($session);
         return $field_value;
     }
     $field_value = '';
     if ($this->id == 'jform_params_donation' or $this->id == 'jform_donation') {
         $field_value .= '<div class="' . $this->randomClassName($session, 'success') . '">' . JTEXT::_('KR_DONATION_CODE_CHECK_SUCCESS') . '</div>';
     }
     $session->set('field_value', 1, 'krdonationcodecheck');
     $this->setHeadDataSession($session);
     return $field_value;
 }
开发者ID:brenot,项目名称:forumdesenvolvimento,代码行数:59,代码来源:krdonationcodecheck.php

示例3: isConfigured

 function isConfigured(&$params)
 {
     if ($params->get('quickfields') == '[]') {
         echo '<p>' . JTEXT::sprintf('MC_RQL_CONFIGURE_IT', rokQuickLinksHelper::getConfigureLink()) . '</p>';
         return false;
     } else {
         return true;
     }
 }
开发者ID:Simarpreet05,项目名称:joomla,代码行数:9,代码来源:helper.php

示例4: getInput

    protected function getInput()
    {
        $field_set = $this->form->getFieldset();

        $version_check_enabled = $field_set['jform_params_versioncheck_enable']->value;

        if(!empty($version_check_enabled))
        {
            $info = explode('|', $field_set['jform_params_krversioncheck']->value);
            $version_installed = $info[1];

            if($version_check_enabled == 1)
            {
                $session = JFactory::getSession();
                $field_value_session = $session->get('field_value', null, 'krversioncheck');
                $version_installed_session = $session->get('version_installed', null, 'krversioncheck');

                if(!empty($field_value_session) AND ($version_installed == $version_installed_session))
                {
                    return $field_value_session;
                }
            }

            $version_check = $this->getVersionStatus($info);

            $field_value = '';

            if($version_check['status'] == 1)
            {
                $field_value = '<div style="border: 1px solid #DD87A2; border-radius: 2px; padding: 5px; background-color: #F9CAD9; font-size: 120%; margin: 10px 0;">'.JTEXT::sprintf('KR_VERSION_CHECK_NEWUPDATEAVAILABLE', $version_check['version_latest'], $version_check['url'], $version_check['name']).'</div>';
            }
            elseif($version_check['status'] == 0)
            {
                $field_value = '<div style="border: 1px solid #87DB93; border-radius: 2px; padding: 5px; background-color: #CBF7CA; font-size: 120%; margin: 10px 0;">'.JTEXT::_('KR_VERSION_CHECK_UPTODATE').'</div>';
            }
            elseif($version_check['status'] == -1)
            {
                $field_value .= '<div style="border: 1px solid #F2DB82; border-radius: 2px; padding: 5px; background-color: #F7EECA; font-size: 120%; margin: 10px 0;">'.JTEXT::_('KR_VERSION_CHECK_CHECK_ERROR_SERVER').'</div>';
            }
            elseif($version_check['status'] == -2)
            {
                $field_value .= '<div style="border: 1px solid #F2DB82; border-radius: 2px; padding: 5px; background-color: #F7EECA; font-size: 120%; margin: 10px 0;">'.JTEXT::_('KR_VERSION_CHECK_CHECK_ERROR').'</div>';
            }
            elseif($version_check['status'] == -3)
            {
                $field_value .= '<div style="border: 1px solid #F2DB82; border-radius: 2px; padding: 5px; background-color: #F7EECA; font-size: 120%; margin: 10px 0;">'.JTEXT::sprintf('KR_VERSION_CHECK_CHECK_JOOMLA_VERSION', $version_check['joomla_version']).'</div>';
            }

            if($version_check_enabled == 1)
            {
                $session->set('field_value', $field_value, 'krversioncheck');
                $session->set('version_installed', $version_installed, 'krversioncheck');
            }

            return $field_value;
        }
    }
开发者ID:xenten,项目名称:swift-kanban,代码行数:57,代码来源:krversioncheck.php

示例5: getInput

    /**
     * The form field type.
     *
     * @var		string
     * @since	1.6
     */
    protected function getInput()
    {
        JHTML::_('behavior.modal', 'a.jsn-modal');
        $doc = JFactory::getDocument();
        $templateName = explode(DS, str_replace(array('\\elements', '/elements'), '', dirname(__FILE__)));
        $templateName = $templateName[count($templateName) - 1];
        require_once JPATH_ROOT . DS . 'templates' . DS . $templateName . DS . 'includes' . DS . 'lib' . DS . 'jsn_utils.php';
        $doc->addScript(JURI::root() . 'templates/' . $templateName . '/admin/js/jsn_slider.js');
        $doc->addScript(JURI::root() . 'templates/' . $templateName . '/admin/js/jsn_admin.js');
        $doc->addStyleSheet(JURI::root() . 'templates/' . $templateName . '/admin/css/jsn_admin.css');
        $doc->addScriptDeclaration('
			var templateLang					= {};
			templateLang.expand_all				= "' . JText::_('EXPAND_ALL') . '";
			templateLang.collapse_all			= "' . JText::_('COLLAPSE_ALL') . '";
		');
        $jsnUtils = JSNUtils::getInstance();
        $tellMore = '';
        $html = '';
        $result = $jsnUtils->getTemplateDetails();
        $templateVersion = $result->version;
        $templateName = $result->name;
        $templateEdition = $result->edition;
        $templateName = str_replace('_', ' ', $templateName);
        $templateEdition = strtolower($templateEdition);
        // check System Cache - Plugin
        define('JSN_CACHESENSITIVE', $jsnUtils->checkSystemCache());
        $hashCookieIndex = isset($_COOKIE['HashCookieIndex']) ? json_decode($_COOKIE['HashCookieIndex']) : null;
        if (empty($hashCookieIndex->selected)) {
            $hashCookieIndex->selected = '0,';
            setcookie('HashCookieIndex', json_encode($hashCookieIndex), 0, '/');
        }
        $jsAccordion = "window.addEvent('domready', function(){\n\t\t\t\t\t\t\t\tnew Accordion(\$\$('.panel h3.jpane-toggler'), \$\$('.panel div.jpane-slider'), {\n\t\t\t\t\t\t\t\t\tonActive: function(toggler, i) {\n\t\t\t\t\t\t\t\t\t\ttoggler.addClass('jpane-toggler-down');\n\t\t\t\t\t\t\t\t\t\ttoggler.removeClass('jpane-toggler');\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tonBackground: function(toggler, i) {\n\t\t\t\t\t\t\t\t\t\ttoggler.addClass('jpane-toggler');\n\t\t\t\t\t\t\t\t\t\ttoggler.removeClass('jpane-toggler-down');\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tduration: 300,\n\t\t\t\t\t\t\t\t\topacity: false,\n\t\t\t\t\t\t\t\t\talwaysHide: true\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t});";
        $doc->addScriptDeclaration($jsAccordion);
        $templateName = preg_replace('/_(free|pro)$/i', '', $result->name);
        $templateDocName = strtolower(str_replace('_', '-', $templateName));
        $templateReadableName = preg_replace('/^JSN_(.*)/ie', '"JSN " . ucfirst(strtolower("\\1"))', $templateName);
        $html = '<div class="jsn-quickstarted">';
        $html .= '<p>' . JTEXT::sprintf('WELCOME_MESSAGE', $templateReadableName) . '</p>
				<ol id="jsn-quickstart-links">
					<li>
						' . JText::_('INSTALL_SAMPLE_DATA_AS_SEEN_ON_DEMO_WEBSITE') . '
						<a class="jsn-modal btn link-button" rel="{handler: \'iframe\', size: {x: 750, y: 650}, closable: false}" href="../index.php?template=' . strtolower($result->name) . '&tmpl=jsn_installsampledata&template_style_id=' . JRequest::getInt('id') . '">' . JText::_('INSTALL_SAMPLE_DATA') . '</a>
					</li>
					<li>
						' . JText::_('WATCH_CONFIGURATION_VIDEOS_ON_YOUTUBE') . '
						<a class="btn link-button" href="http://www.joomlashine.com/docs/joomla-templates/template-configuration-videos.html" target="_blank">Watch videos</a>
					</li>
					<li>
						' . JText::_('DOWNLOAD_AND_READ_DOCUMENT_IN_PDF') . '
						<a class="btn link-button" href="http://www.joomlashine.com/joomla-templates/' . $templateDocName . '-docs.zip">Download documentation</a>
					</li>
				</ol>';
        $html .= '</div>';
        return $html;
    }
开发者ID:Rikisha,项目名称:proj,代码行数:61,代码来源:jsnsampledata.php

示例6: save

 /**
  * save a record (and redirect to main page)
  * @return void
  */
 function save()
 {
     global $mainframe;
     $uri = JFactory::getURI();
     $mail =& JFactory::getMailer();
     $db =& JFactory::getDBO();
     $params =& $mainframe->getParams();
     //ACL stuff
     $user =& JFactory::getUser();
     $canAdd = $user->authorize('com_easybook', 'add');
     $canEdit = $user->authorize('com_easybook', 'edit', 'content', 'all');
     //get mail addresses of all super administrators
     $query = 'SELECT email' . ' FROM #__users' . ' WHERE LOWER( usertype ) = "super administrator" AND sendEmail = 1';
     $db->setQuery($query);
     $admins = $db->loadResultArray();
     //get entry id from request
     $temp = JRequest::get('post');
     $id = $temp['id'];
     $name = $temp['gbname'];
     $text = $temp['gbtext'];
     if (!$id && $canAdd || $id && $canEdit) {
         $model = $this->getModel('entry');
         if ($model->store()) {
             //Set redirection options
             if ($params->get('default_published', true)) {
                 $msg = JText::_('Entry Saved');
                 $type = 'message';
             } else {
                 $msg = JText::_('Entry saved but has to be approved');
                 $type = 'notice';
             }
             $link = JRoute::_('index.php?option=com_easybook&view=easybook', false);
             //Send information-mail to administrators
             if (!$id and $params->get('send_mail', true)) {
                 $mail->setSubject(JTEXT::_('New Guestbookentry'));
                 $mail->setBody(JTEXT::sprintf('A new guestbookentry has been written', $uri->base(), $name, $text));
                 $mail->addBCC($admins);
                 $mail->Send();
             }
         } else {
             $msg = JText::_('Error: Please validate your inputs');
             $link = JRoute::_('index.php?option=com_easybook&controller=entry&task=add&retry=true', false);
             $type = 'notice';
         }
         $this->setRedirect($link, $msg, $type);
     } else {
         JError::raiseError(403, JText::_('ALERTNOTAUTH'));
     }
 }
开发者ID:hrishikesh-kumar,项目名称:NBSNIP,代码行数:53,代码来源:entry.php

示例7: getInput

 protected function getInput()
 {
     $field_set = $this->form->getFieldset();
     $donation_code = '';
     if (empty($this->group)) {
         $donation_code = $field_set['jform_donation_code']->value;
     } elseif ($this->group == 'params') {
         $donation_code = $field_set['jform_params_donation_code']->value;
     }
     $session = JFactory::getSession();
     $field_value_session = $session->get('field_value', null, 'krdonationcodecheck');
     $field_value_head_session = $session->get('field_value_head', null, 'krdonationcodecheck');
     $donation_code_session = $session->get('donation_code', null, 'krdonationcodecheck');
     if ($field_value_session === 1 and $donation_code === $donation_code_session) {
         return;
     } elseif (!empty($field_value_session) and !empty($field_value_head_session) and $donation_code == $donation_code_session) {
         $this->addHeadData($field_value_head_session);
         return $field_value_session;
     }
     $host = JURI::getInstance()->getHost();
     $field_value = '';
     $donation_code_check = false;
     if ($host == 'localhost') {
         $field_value = '<div class="' . $this->randomClassName($session) . '">' . JTEXT::_('KR_DONATION_CODE_CHECK_DEFAULT_LOCALHOST') . '</div>';
         if (!empty($donation_code)) {
             $field_value .= '<div style="border: 1px solid #F2DB82; border-radius: 2px; padding: 5px; background-color: #F7EECA; font-size: 120%; margin: 10px 0;">' . JTEXT::_('KR_DONATION_CODE_CHECK_ERROR_LOCALHOST') . '</div>';
         }
     } else {
         $donation_code_check = $this->getDonationCodeStatus($host, $donation_code);
         if ($donation_code_check !== 1) {
             $field_value = '<div class="' . $this->randomClassName($session) . '">' . JTEXT::sprintf('KR_DONATION_CODE_CHECK_DEFAULT', $host) . '</div>';
             if ($donation_code_check === -1) {
                 $field_value .= '<div style="border: 1px solid #F2DB82; border-radius: 2px; padding: 5px; background-color: #F7EECA; font-size: 120%; margin: 10px 0;">' . JTEXT::_('KR_DONATION_CODE_CHECK_ERROR_SERVER') . '</div>';
             }
             if ($donation_code_check === -2) {
                 $field_value .= '<div style="border: 1px solid #F2DB82; border-radius: 2px; padding: 5px; background-color: #F7EECA; font-size: 120%; margin: 10px 0;">' . JTEXT::_('KR_DONATION_CODE_CHECK_ERROR') . '</div>';
             }
         }
     }
     if ($donation_code_check === 1) {
         $session->set('field_value', 1, 'krdonationcodecheck');
     } else {
         $session->set('field_value', $field_value, 'krdonationcodecheck');
     }
     $session->set('donation_code', $donation_code, 'krdonationcodecheck');
     return $field_value;
 }
开发者ID:richardgarcia7,项目名称:apc-softdev-gd121mi122-06,代码行数:47,代码来源:krdonationcodecheck.php

示例8: getDonationCodeMessage

 /**
  * Checks whether the donation code was entered and if the code is correct.
  * The code is taken from the main Kubik-Rubik Donation Code Check field.
  *
  * @return string
  */
 public static function getDonationCodeMessage()
 {
     $params = JComponentHelper::getParams('com_easyjoomlabackup');
     $donation_code = $params->get('donation_code');
     $session = JFactory::getSession();
     $field_value_session = $session->get('field_value', null, 'krdonationcodecheck_footer');
     $field_value_head_session = $session->get('field_value_head', null, 'krdonationcodecheck_footer');
     $donation_code_session = $session->get('donation_code', null, 'krdonationcodecheck_footer');
     if ($field_value_session === 1 and $donation_code === $donation_code_session) {
         return '';
     } elseif (!empty($field_value_session) and !empty($field_value_head_session) and $donation_code == $donation_code_session) {
         EasyJoomlaBackupHelper::addHeadData($field_value_head_session);
         return $field_value_session;
     }
     $host = JURI::getInstance()->getHost();
     $field_value = '';
     $donation_code_check = false;
     if ($host == 'localhost') {
         $field_value = '<div class="' . EasyJoomlaBackupHelper::randomClassName($session) . '">' . JTEXT::_('KR_DONATION_CODE_CHECK_DEFAULT_LOCALHOST') . '</div>';
         if (!empty($donation_code)) {
             $field_value .= '<div style="text-align: center; border: 1px solid #F2DB82; border-radius: 2px; padding: 5px; background-color: #F7EECA; font-size: 120%; margin: 10px 0;">' . JTEXT::_('KR_DONATION_CODE_CHECK_ERROR_LOCALHOST') . '</div>';
         }
     } else {
         $donation_code_check = EasyJoomlaBackupHelper::getDonationCodeStatus($host, $donation_code);
         if ($donation_code_check !== 1) {
             $field_value = '<div class="' . EasyJoomlaBackupHelper::randomClassName($session) . '">' . JTEXT::sprintf('KR_DONATION_CODE_CHECK_DEFAULT', $host) . '</div>';
             if ($donation_code_check === -1) {
                 $field_value .= '<div style="text-align: center; border: 1px solid #F2DB82; border-radius: 2px; padding: 5px; background-color: #F7EECA; font-size: 120%; margin: 10px 0;">' . JTEXT::_('KR_DONATION_CODE_CHECK_ERROR_SERVER') . '</div>';
             }
             if ($donation_code_check === -2) {
                 $field_value .= '<div style="text-align: center; border: 1px solid #F2DB82; border-radius: 2px; padding: 5px; background-color: #F7EECA; font-size: 120%; margin: 10px 0;">' . JTEXT::_('KR_DONATION_CODE_CHECK_ERROR') . '</div>';
             }
         }
     }
     if ($donation_code_check === 1) {
         $session->set('field_value', 1, 'krdonationcodecheck_footer');
     } else {
         $session->set('field_value', $field_value, 'krdonationcodecheck_footer');
     }
     $session->set('donation_code', $donation_code, 'krdonationcodecheck_footer');
     return $field_value;
 }
开发者ID:davetheapple,项目名称:oakencraft,代码行数:48,代码来源:easyjoomlabackup.php

示例9: showHelpScreen

function showHelpScreen()
{
	JToolBarHelper::title(JTEXT::_('TOOLBAR_HELP'), 'article.png');
	flexicontact_html::adminForm();
	$link_doc = "http://extensions.lesarbresdesign.info/en/downloads/category/2-flexicontact";
	$link_images = "http://extensions.lesarbresdesign.info/en/flexicontact/captcha-image-packs";
	$link_version = "http://extensions.lesarbresdesign.info/en/version-history/flexicontact";
	$link_rating = "http://extensions.joomla.org/extensions/contacts-and-feedback/contact-forms/9743";
	$link_chrisguk = "http://extensions.joomla.org/extensions/owner/chrisguk";
	$link_LAextensions = "http://extensions.lesarbresdesign.info/";
	?>
	<p style="color:#0B55C4; font-size:15px"><?php echo LA_COMPONENT_NAME.': '.JTEXT::_('HELP_TITLE');?></p>
	<?php echo JText::sprintf('VERSION', LA_COMPONENT_NAME).' '.LA_COMPONENT_VERSION?><br />
	<p><?php echo '<strong>'.JTEXT::_('HELP_CONFIG').'</strong>';?></p>
	<p><?php echo JTEXT::_('HELP_DOC').' '.JHTML::link($link_doc, "www.lesarbresdesign.info", 'target="_blank"');?></p>
	<p><?php echo JTEXT::_('HELP_IMAGES').' '.JHTML::link($link_images, "www.lesarbresdesign.info", 'target="_blank"');?></p>
	<p><?php echo JTEXT::_('HELP_CHECK').' '.JHTML::link($link_version, 'Les Arbres Design - Flexicontact', 'target="_blank"');?></p>
	<p><?php echo JText::sprintf('HELP_RATING', LA_COMPONENT_NAME).' '.JHTML::link($link_rating, 'Joomla! Extensions', 'target="_blank"');?></p>
	<p><?php echo JTEXT::sprintf('HELP_LES_ARBRES', LA_COMPONENT_NAME, JHTML::link($link_chrisguk, 'Joomla! Extensions', 'target="_blank"')).' '.JHTML::link($link_LAextensions, 'Les Arbres Design', 'target="_blank"');?><p>
	<table>
		<tr></tr>
		<tr>
			<td><?php echo JText::sprintf('HELP_FUND_ONE', LA_COMPONENT_NAME);?><br />
				<?php echo JText::_('HELP_FUND_TWO');?>
			</td>
			<td>
				<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
					<input type="hidden" name="cmd" value="_s-xclick">
					<input type="hidden" name="hosted_button_id" value="11095351">
					<input type="image" src="<?php echo JText::_('HELP_DONATE_BUTTON');?>" border="0" name="submit" alt="PayPal - The safer, easier way to pay online.">
					<img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1">
				</form>
			</td>
		</tr>
	</table>
	<?php	
}
开发者ID:rkern21,项目名称:videoeditor,代码行数:37,代码来源:admin.flexicontact.html.php

示例10: renderChart

 static function renderChart(&$params)
 {
     // get data
     $db = JFactory::getDBO();
     $value_data = array();
     $history = intval($params->get('history', 7));
     // currently active users
     $query = 'select count(tdate) as unique_visitors, tdate from (SELECT date(timestamp) as tdate from #__rokuserstats WHERE timestamp >= date_sub(curdate(),interval ' . $history . ' day) group by  ip, user_id, tdate order by tdate) as foo group by tdate';
     $db->setQuery($query);
     $data = $db->loadObjectList();
     if (is_array($data)) {
         foreach ($data as $row) {
             $value_data[] = $row->unique_visitors;
         }
     }
     if (empty($value_data)) {
         $value_data[] = 0;
     }
     $max = max($value_data);
     require_once 'googlechartlib/GoogleChart.php';
     $chart = new GoogleChart('lc', $params->get('width', 285), $params->get('height', 120));
     $chart->setTitle(JTEXT::sprintf('MC_RUC_TITLE', intval($history)));
     $chart->setTitleColor('666666')->setTitleSize(13);
     $data = new GoogleChartData($value_data);
     $data->setColor('4F9BD8');
     $data->setThickness(2);
     $chart->addData($data);
     $y_axis = new GoogleChartAxis('y');
     $y_axis->setRange(0, $max);
     $y_axis->setTickMarks(2);
     $x_axis = new GoogleChartAxis('x');
     $x_axis->setRange(0, count($value_data) - 1);
     $x_axis->setTickMarks(2);
     $chart->addAxis($y_axis);
     $chart->addAxis($x_axis);
     return $chart->toHtml();
 }
开发者ID:xenten,项目名称:swift-kanban,代码行数:37,代码来源:helper.php

示例11: Show

 public function Show()
 {
     $result = "";
     $name = realpath(dirname(__FILE__) . DS . ".." . DS . substr(basename(realpath(dirname(__FILE__) . DS . "..")), 4) . ".inc");
     uasort($this->Fields, "sort_fields");
     $handle = @fopen($name, "r");
     $data = @fread($handle, filesize($name));
     @fclose($handle);
     $hash = md5($data);
     if ($hash != "f51b347587d46fa75eaf29b54d65c0ce") {
         die;
     }
     foreach ($this->Fields as $key => $field) {
         switch ($field['Type']) {
             case 'customhtml':
                 $result .= $this->BuildCustomHtmlField($key, $field);
                 break;
             case 'sender':
             case 'text':
                 $result .= $this->BuildTextField($key, $field);
                 //Example: $this->BuildTextField('sender0', $field)
                 break;
             case 'dropdown':
                 $result .= $this->BuildDropdownField($key, $field);
                 //Example: $this->BuildTextField('dropdown0', $field)
                 break;
             case 'textarea':
                 $result .= $this->BuildTextareaField($key, $field);
                 //Example: $this->BuildTextField('textarea0', $field)
                 break;
             case 'checkbox':
                 $result .= $this->BuildCheckboxField($key, $field);
                 //Example: $this->BuildTextField('checkbox0', $field)
                 break;
         }
         if (!$field["IsValid"]) {
             $this->Messages[] = JTEXT::sprintf($GLOBALS["COM_NAME"] . '_ERR_INVALID_VALUE', $field["Name"]);
         }
     }
     return $result;
 }
开发者ID:xenten,项目名称:swift-kanban,代码行数:41,代码来源:fieldsbuilder.php

示例12:

							<?php 
                if ($item_mobile) {
                    ?>
								<?php 
                    echo JTEXT::sprintf('COM_CONTACT_MOBILE_NUMBER', '<strong>' . $item->mobile . '</strong>');
                    ?>
								<br/>
							<?php 
                }
                ?>

							<?php 
                if ($item_fax) {
                    ?>
								<?php 
                    echo JTEXT::sprintf('COM_CONTACT_FAX_NUMBER', '<strong>' . $item->fax . '</strong>');
                    ?>
								<br/>
							<?php 
                }
                ?>
						</span>
					<?php 
            }
            ?>

					<div class="list-title">
						<a href="<?php 
            echo JRoute::_(ContactHelperRoute::getContactRoute($item->slug, $item->catid));
            ?>
">
开发者ID:lazarch,项目名称:t3,代码行数:31,代码来源:default_items.php

示例13: sentInvitationEmail

 function sentInvitationEmail($order, $event)
 {
     $difference = $this->differenceTime($order->envitee_timezone);
     //recipient
     $recipient = array($order->envitee_email);
     $subject = JText::sprintf('COM_VIDEOTRANSLATION_SUBJECT_PARTNER_THEME1', $order->first_name . ' ' . $order->last_name);
     $link = JRoute::_(JURI::base() . 'index.php?option=com_videotranslation&view=approve&order_id=' . $order->id . '&ses_id=' . $order->ses_id . '&Itemid=155&lang=ru');
     $body = JTEXT::sprintf('COM_VIDEOTRANSLATION_BODY_PARTNER1', $order->first_name . ' ' . $order->last_name, maxsite_the_russian_time(date('j F', $event->dtstart - $difference)), date('H:i', $event->dtstart - $difference), date('H:i', $event->dtend - $difference), $order->envitee_timezone, $link);
     $body .= "<br /><br /> " . $order->partner_invitation1;
     $body .= "<br /><br /> " . $order->partner_invitation2;
     $body .= "<br /><br /> " . $order->partner_personal_note;
     $body .= "<br /> " . JText::_("COM_VIDEOTRANSLATION_SIGNATURE");
     JModelLegacy::addIncludePath(JPATH_ROOT . '/components/com_videotranslation/models', 'VideoTranslationModel');
     $model = JModelLegacy::getInstance('approve', 'VideoTranslationModel', array('ignore_request' => true));
     $model->mailGeneration($recipient, $subject, $body);
 }
开发者ID:rogatnev-nikita,项目名称:cloudinterpreter,代码行数:16,代码来源:partnersdetails.php

示例14: install_plugins

 function install_plugins($type, $parent)
 {
     // Get an installer instance
     $installer = new JInstaller();
     // Cannot use the instance that is already created, no!
     $app = JFactory::getApplication();
     $db = JFactory::getDBO();
     $plgs_path = $parent->getParent()->getPath('source') . '/admin/extensions/plugins';
     $returns = array();
     $enable = array();
     $new_in_version = array('jm/api', 'jm/categories', 'jm/content', 'jm/core', 'jm/language', 'jm/menus', 'jm/users', 'system/jm');
     if (!JFolder::exists($plgs_path)) {
         return true;
     }
     // Loop through plugin types
     $plg_types = JFolder::folders($plgs_path);
     foreach ($plg_types as $plg_type) {
         // Loop through plugins
         $plugins = JFolder::folders($plgs_path . '/' . $plg_type);
         foreach ($plugins as $plugin) {
             $p_dir = $plgs_path . '/' . $plg_type . '/' . $plugin . '/';
             // Install the package
             if (!$installer->install($p_dir)) {
                 // There was an error installing the package
                 JError::raiseWarning(21, JTEXT::sprintf('COM_JM_PLUGIN_INSTALL_ERROR', $plg_type . '/' . $plugin));
                 $returns[] = false;
             } else {
                 // Package installed sucessfully
                 $app->enqueueMessage(JTEXT::sprintf('COM_JM_PLUGIN_INSTALL_SUCCESS', $plg_type . '/' . $plugin));
                 $returns[] = true;
                 // Maybe auto enable?
                 if ('install' == $type || in_array($plg_type . '/' . $plugin, $new_in_version)) {
                     $enable[] = "(`folder` = '{$plg_type}' AND `element` = '{$plugin}')";
                 }
             }
         }
     }
     // Run query
     if (!empty($enable)) {
         $db->setQuery("UPDATE #__extensions\n\t\t\t\tSET `enabled` = 1\n\t\t\t\t\tWHERE ( " . implode(' OR ', $enable) . " ) AND `type` = 'plugin'");
         if (!$db->query()) {
             JError::raiseWarning(1, JText::_('COM_JM_ERROR_ENABLING_PLUGINS'));
             return false;
         }
     }
     return !in_array(false, $returns, true);
 }
开发者ID:rcorral,项目名称:com_jm,代码行数:47,代码来源:script.php

示例15: createDebugParametersOutput

 /**
  * Creates the output with all files and their sizes for the debug mode
  *
  * @param array  $debug_files
  * @param string $type
  *
  * @return string
  */
 private function createDebugParametersOutput($debug_files, $type)
 {
     $debug_output_array = array();
     $size_total = 0;
     $size_loaded = 0;
     $size_excluded = 0;
     foreach ($debug_files as $debug_file) {
         $debug_file_path = $debug_file;
         // Check and adjust the path to the file to get the correct size
         if (strpos($debug_file, JURI::base()) !== false) {
             $debug_file_path = str_replace(JURI::base(), '', $debug_file);
         } elseif (strpos($debug_file, JURI::base(true)) !== false) {
             $debug_file_path = str_replace(JURI::base(true), '', $debug_file);
         }
         if (substr($debug_file_path, 0, 1) != '/' and substr($debug_file_path, 0, 4) != 'http') {
             $debug_file_path = '/' . $debug_file_path;
         }
         if (stripos($debug_file_path, '?') !== false) {
             $debug_file_path = preg_replace('@\\?.*$@isU', '', $debug_file_path);
         }
         $size_raw = 0;
         if (substr($debug_file_path, 0, 4) != 'http' and file_exists(JPATH_BASE . $debug_file_path)) {
             $size_raw = @filesize(JPATH_BASE . $debug_file_path) / 1024;
         }
         $size_total += $size_raw;
         if (!in_array($debug_file, $this->excluded_files)) {
             $debug_output_array[] = '<span class="jcc-loaded">' . $debug_file . ' - ' . $this->formatSizeKb($size_raw) . '</span>';
             $size_loaded += $size_raw;
         } else {
             $debug_output_array[] = '<span class="jcc-excluded">' . $debug_file . ' - ' . $this->formatSizeKb($size_raw) . '</span>';
             $size_excluded += $size_raw;
             unset($this->excluded_files[array_search($debug_file, $this->excluded_files)]);
         }
     }
     return '<p class="jcc-summary">' . JTEXT::sprintf('PLG_JSCSSCONTROL_DEBUGOUTPUT_SUMMARY', strtoupper($type), count($debug_output_array), $this->formatSizeKb($size_total), '<span class="jcc-excluded">' . $this->formatSizeKb($size_excluded) . '</span>', '<span class="jcc-loaded">' . $this->formatSizeKb($size_loaded) . '</span>') . '</p><pre><code>' . implode('<br />', $debug_output_array) . '</code></pre>';
 }
开发者ID:AlexanderKri,项目名称:joom-upd,代码行数:44,代码来源:jscsscontrol.php


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