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


PHP JTEXT类代码示例

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


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

示例1: display

 /**
  * Shows the form
  *
  * @param   string  $tpl  - The tmpl
  *
  * @return  bool|mixed|object
  */
 public function display($tpl = null)
 {
     $booking_id = JFactory::getApplication()->input->get('booking_id', 0);
     $user = JFactory::getUser();
     $model = $this->getModel();
     if (empty($booking_id)) {
         JError::raiseError('404', "COM_MATUKIO_NO_ID");
     }
     $booking = $model->getBooking($booking_id);
     $event = $model->getEvent($booking->semid);
     MatukioHelperUtilsBasic::expandPathway(JTEXT::_('COM_MATUKIO_EVENTS'), JRoute::_("index.php?option=com_matukio&view=eventlist"));
     MatukioHelperUtilsBasic::expandPathway(JTEXT::_('COM_MATUKIO_EVENT_PAYPAL_PAYMENT'), "");
     $net_amount = $booking->payment_brutto;
     $tax_amount = 0;
     $successurl = JURI::base() . substr(JRoute::_("index.php?option=com_matukio&view=callback&booking_id=" . $booking_id), strlen(JURI::base(true)) + 1);
     $cancelreturn = JURI::base() . substr(JRoute::_("index.php?option=com_matukio&view=callback&task=cancel&booking_id=" . $booking_id . "&return=1"), strlen(JURI::base(true)) + 1);
     $item_number = $booking->nrbooked;
     $this->event = $event;
     $this->user = $user;
     $this->booking = $booking;
     $this->merchant_address = MatukioHelperSettings::getSettings("paypal_address", 'paypal@compjoom.com');
     $this->currency = MatukioHelperSettings::getSettings("paypal_currency", 'EUR');
     $this->success_url = $successurl;
     $this->cancel_url = $cancelreturn;
     $this->item_number = $item_number;
     $this->net_amount = $net_amount;
     $this->tax_amount = $tax_amount;
     parent::display($tpl);
 }
开发者ID:JonatanLiecheski,项目名称:MeditecJoomla,代码行数:36,代码来源:view.html.php

示例2: getInput

 public function getInput()
 {
     global $mctrl;
     $mctrl =& MissionControl::getInstance();
     if ($mctrl->_getCurrentAdminTemplate() == "rt_missioncontrol") {
         $this->checkForGantryUpdate();
         $html = '';
         $updates = RTMCUpdates::getInstance();
         $currentVersion = $updates->getCurrentVersion();
         $latest_version = $updates->getLatestVersion();
         if (version_compare($latest_version, $currentVersion, '>')) {
             $klass = "updates-true";
             $upd = JText::sprintf('MC_VERSION_UPDATE_OUTOFDATE', $latest_version, 'index.php?option=com_installer&view=update');
         } else {
             $klass = "updates";
             jimport('joomla.utilities.date');
             $nextupdate = new JDate($updates->getLastUpdated() + 24 * 60 * 60);
             $upd = JText::sprintf('MC_VERSION_UPDATE_CURRENT', JHTML::_('date', $updates->getLastUpdated() + 24 * 60 * 60, JText::_('DATE_FORMAT_LC2'), true));
         }
         $html .= "\n            <div id='updater' class='" . $klass . " mc-update-check'>\n                <div id='updater-bar' class='h2bar'>MissionControl <span>v" . $currentVersion . "</span></div>\n                <div id='updater-desc'>" . $upd . "</div>\n            </div>";
         return $html;
     } else {
         $html = '<b>* ' . JTEXT::_('MC_ONLY_IN_MC') . '</b>';
     }
     return $html;
 }
开发者ID:Simarpreet05,项目名称:joomla,代码行数:26,代码来源:updatecheck.php

示例3: colorImageBottom

/**
 *  Retourne la couleur du pixel en bas a gauche de l'image
 **/
function colorImageBottom($imageName)
{
    // recuperer le type et la taille de l'image
    // Pb sur certains JPG qui retourne ''
    list($imgW, $imgH, $imgTyp) = getimagesize($imageName);
    switch ($imgTyp) {
        case 1:
            $im = imagecreatefromgif($imageName);
            break;
        case 2:
        case ' ':
            $im = imagecreatefromjpeg($imageName);
            break;
        case 3:
            $im = imagecreatefrompng($imageName);
            break;
        default:
            $app = JFactory::getApplication();
            $app->enqueueMessage(JTEXT::_('IMGNAME_ERROR') . '[name=' . $imageName . '] [ type=' . $imgTyp . '] [ format= ' . $imgW . 'x' . $imgH, 'error');
            var_dump(gd_info());
            return "";
    }
    $rgb = imagecolorat($im, 2, $imgH - 2);
    $hex = sprintf("%06X", $rgb);
    return $hex;
}
开发者ID:sansandeep143,项目名称:av,代码行数:29,代码来源:helper.php

示例4: save_code

 function save_code()
 {
     $code = JREQUEST::getVar('code', '', '', 'string');
     $code = addslashes($code);
     jimport('joomla.form.form');
     $params =& JForm::getInstance('params', JPATH_ADMINISTRATOR . '/components/com_muzeetop/config.xml');
     $code_activation = $params->getInput('code_activation');
     var_dump($code_activation);
     var_dump($params);
     $component =& JComponentHelper::getComponent('com_muzeetop');
     if ($code != "" and strlen($code) == 8) {
         $params->setValue('code_activation', $code);
         var_dump($params);
         var_dump($code_activation);
         $parameters = $params->toString();
         $db =& JFactory::getDBO();
         $donnees = new stdClass();
         $donnees->id = $component->id;
         $donnees->params = $parameters;
         $db->updateObject('#__components', $donnees, 'id');
         if ($db !== false) {
             $msg = JTEXT::_('COM_MUZEETOP_MSG_CODE_ENREGISTRE');
         } else {
             $msg = JTEXT::_('COM_MUZEETOP_MSG_ERREUR_BASE_CODE');
         }
     } else {
         $msg = JText::_('COM_MUZEETOP_ERREUR_SAUVEGARDE_CODE');
     }
     $link = 'index.php?option=com_muzeetop';
     $this->setRedirect($link, $msg);
 }
开发者ID:halbo5,项目名称:com_muzeetop_j16,代码行数:31,代码来源:stats.php

示例5: fetchElement

 function fetchElement($name, $value, &$node, $control_name, $options = false, $translation = true)
 {
     global $gantry;
     $document =& JFactory::getDocument();
     if (!defined('GANTRY_SELECTBOX')) {
         $this->template = end(explode(DS, $gantry->templatePath));
         $document->addScript($gantry->gantryUrl . '/admin/widgets/selectbox/js/selectbox.js');
         define('GANTRY_SELECTBOX', 1);
     }
     $lis = $activeElement = "";
     $xml = false;
     if (!$options) {
         $options = $node->children();
         $xml = true;
     }
     $isPreset = $node->attributes('preset') ? $node->attributes('preset') : false;
     foreach ($options as $option) {
         if ($xml) {
             $optionData = $option->data();
             $optionValue = $option->attributes('value');
             $optionDisabled = $option->attributes('disable');
         } else {
             $optionData = $option->text;
             $optionValue = $option->value;
             $optionDisabled = $option->disable;
         }
         $disabled = $optionDisabled == 'disable' ? "disabled='disabled'" : "";
         $selected = $value == $optionValue ? "selected='selected'" : "";
         $active = $value == $optionValue ? "class='active'" : "";
         if (strlen($active)) {
             $activeElement = $optionData;
         }
         if (strlen($disabled)) {
             $active = "class='disabled'";
         }
         $imapreset = $isPreset ? "im-a-preset" : "";
         $text = $translation ? JTEXT::_($optionData) : $optionData;
         $options .= "<option value='{$optionValue}' {$selected} {$disabled}>" . $text . "</option>\n";
         $lis .= "<li " . $active . ">" . $text . "</li>";
     }
     $html = "<div class='wrapper'>";
     $html .= "<div class='selectbox-wrapper'>";
     $html .= "\t<div class='selectbox'>";
     $html .= "\t\t<div class='selectbox-top'>";
     $html .= "\t\t\t<div class='selected'><span>" . JTEXT::_($activeElement) . "</span></div>";
     $html .= "\t\t\t<div class='arrow'></div>";
     $html .= "\t\t</div>";
     $html .= "\t\t<div class='selectbox-dropdown'>";
     $html .= "\t\t\t<ul>" . $lis . "</ul>";
     $html .= "\t\t\t<div class='selectbox-dropdown-bottom'><div class='selectbox-dropdown-bottomright'></div></div>";
     $html .= "\t\t</div>";
     $html .= "\t</div>";
     $html .= "\t<select id='params" . $name . "' name='params[" . $name . "]' class='selectbox-real " . $imapreset . "'>";
     $html .= $options;
     $html .= "\t</select>";
     $html .= "</div>";
     $html .= "<div class='clr'></div>";
     $html .= "</div>";
     return $html;
 }
开发者ID:janssit,项目名称:www.casaiberico.be,代码行数:60,代码来源:selectbox.php

示例6: runActionSingle

 public function runActionSingle($type, $name, $action, $backend = false)
 {
     if ('member' == substr($type, 0, 6)) {
         $type = 'member';
     }
     $valid = $this->authorize($type, $name, $backend);
     if (!$valid) {
         $result = array();
         $result['success'] = false;
         $result['title'] = JText::_('ERROR');
         $result['content'] = sprintf(JTEXT::_('ADDON_AUTHORIZATION_ERROR'), $this->user_id, $type, $name);
         return $result;
     }
     $fileOld = "{$type}.{$name}.php";
     $fileNew = "{$name}.php";
     $filepath = $backend == false ? JPATH_SITE : JPATH_ADMINISTRATOR;
     $filepath .= DS . 'components' . DS . 'com_osemsc' . DS . 'addons' . DS . 'action' . DS . $type;
     if (JFile::exists($filepath . DS . $fileOld)) {
         require_once $filepath . DS . $fileOld;
     } elseif (JFile::exists($filepath . DS . $fileNew)) {
         require_once $filepath . DS . $fileNew;
     } else {
         $result = array();
         $result['success'] = true;
         $result['title'] = true;
         $result['success'] = true;
         return $result;
     }
     $className = 'oseMscAddonAction' . ucfirst($type) . ucfirst($name);
     $class = new $className($this->get('p'));
     return call_user_func(array($class, $action), $this->get('p'));
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:32,代码来源:oseMscAddon.php

示例7: save

 function save()
 {
     $config = new JRegistry('config');
     $config_array = array();
     // affichage des boutons
     $config_array['bt_jamendo'] = JRequest::getVar('bt_jamendo', 0, 'post', 'int');
     $config_array['bt_artiste'] = JRequest::getVar('bt_artiste', 0, 'post', 'int');
     $config_array['bt_categories'] = JRequest::getVar('bt_categories', 0, 'post', 'int');
     $config_array['bt_sms'] = JRequest::getVar('bt_sms', 0, 'post', 'int');
     $config_array['bt_stats'] = JRequest::getVar('bt_stats', 0, 'post', 'int');
     $config_array['bt_aide'] = JRequest::getVar('bt_aide', 0, 'post', 'int');
     $config->loadArray($config_array);
     //Fichier de configuration
     $fname = JPATH_BASE . "/components/com_muzeetop/config.php";
     //écriture du fichier
     jimport('joomla.filesystem.file');
     $string = $config->toString('PHP', array('class' => 'JMztOptions'));
     if (JFile::write($fname, &$string)) {
         $msg = JTEXT::_('COM_MUZEETOP_OPTIONS_ENREGISTRE');
     } else {
         $msg = JTEXT::_('COM_MUZEETOP_ERREUR_OPTIONS_ENREGISTRE');
     }
     $link = 'index.php?option=com_muzeetop';
     $this->setRedirect($link, $msg);
 }
开发者ID:halbo5,项目名称:com_muzeetop_j16,代码行数:25,代码来源:options.php

示例8: getOptions

 /**
  * Method to get the field options.
  *
  * @return  array  The field option objects.
  */
 protected function getOptions()
 {
     // Initialize variables.
     $options = array();
     //automigrate current saved values to the new field format (array)
     if (is_array($this->value) === FALSE && $this->value != '') {
         $this->value = explode(',', $this->value);
     }
     $db = JFactory::getDbo();
     $query = $db->getQuery(true);
     $query->select('id AS value');
     $query->select('CASE LENGTH(name) when 0 then CONCAT(' . $db->Quote(JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT')) . ', " ", id)	else name END as text ');
     $query->from('#__joomleague_eventtype');
     $query->order('id');
     $db->setQuery($query);
     $options = $db->loadObjectList();
     foreach ($options as $k) {
         if (strpos($k->text, "COM_JOOMLEAGUE_E") !== false) {
             $k->text = JTEXT::_($k->text);
         }
     }
     // Merge any additional options in the XML definition.
     $options = array_merge(parent::getOptions(), $options);
     return $options;
 }
开发者ID:hfmprs,项目名称:JoomLeague,代码行数:30,代码来源:eventslist.php

示例9: edit

 function edit($tpl = null)
 {
     // Get data from model
     $model =& $this->getModel();
     $row = $model->getEditData('MijosefMovedUrls');
     // Toolbar
     JToolBarHelper::title(JText::_('COM_MIJOSEF_COMMON_URLS_MOVED') . ': ' . $row->url_old, 'mijosef');
     JToolBarHelper::custom('editSave', 'save1.png', 'save1.png', JTEXT::_('Save'), false);
     JToolBarHelper::custom('editApply', 'apply1.png', 'apply1.png', JTEXT::_('Apply'), false);
     JToolBarHelper::custom('editCancel', 'cancel1.png', 'cancel1.png', JTEXT::_('Cancel'), false);
     JToolBarHelper::divider();
     $this->toolbar->appendButton('Popup', 'help1', JText::_('Help'), 'http://www.mijosoft.com/support/docs/mijosef/user-manual/urls?tmpl=component', 650, 500);
     // Options array
     $select = array();
     $select[] = JHTML::_('select.option', '1', JTEXT::_('Yes'));
     $select[] = JHTML::_('select.option', '0', JTEXT::_('No'));
     // Published list
     $lists['published'] = JHTML::_('select.genericlist', $select, 'published', 'class="inputbox" size="1 "', 'value', 'text', $row->published);
     // Get behaviors
     JHTML::_('behavior.modal', 'a.modal', array('onClose' => '\\function(){location.reload(true);}'));
     // Get jQuery
     if ($this->MijosefConfig->jquery_mode == 1) {
         $this->document->addScript('components/com_mijosef/assets/js/jquery-1.4.2.min.js');
         $this->document->addScript('components/com_mijosef/assets/js/jquery.bgiframe.min.js');
         $this->document->addScript('components/com_mijosef/assets/js/jquery.autocomplete.js');
     }
     // Assign values
     $this->assignRef('row', $row);
     $this->assignRef('lists', $lists);
     parent::display($tpl);
 }
开发者ID:affiliatelk,项目名称:ecc,代码行数:31,代码来源:view.edit.php

示例10: display

 function display($tpl = null)
 {
     global $option, $mainframe;
     $model =& $this->getModel();
     //$menu =& JMenu::getInstance('site');
     //    $item = $menu->getActive();
     //    $params =& $menu->getParams($item->id);
     //get controller
     $controller = new VnffhotelController();
     //echo substr("h_sdfsdf_sfssf", -3);
     $mainframe->setPageTitle(JTEXT::_("PROMOTIONS LIST"));
     //$cityid = $params->get('cityid', '32');
     $hotels = $model->getHotelsPromotion();
     $pagination = $model->getPagination();
     for ($i = 0; $i < count($hotels); $i++) {
         $hotels[$i]->images = $model->getHotelImages($hotels[$i]->hotel_ID, 'm');
         if (count($hotels[$i]->images) == 0) {
             $image->image_Name = "noimage.png";
             $hotels[$i]->images[0] = $image;
         }
         $hotels[$i]->shortDes = $controller->cutDes($hotels[$i]->Overview, 30);
         $hotels[$i]->linkToHotel = $controller->linkToHotel($hotels[$i]->hotel_ID, "4");
     }
     //get controller
     //echo $hotels[0]->images[0]->image_Name;
     //echo $hotels[0]->city_ID."hehehejhe";
     $this->assignRef('hotels', $hotels);
     $this->assignRef('pagination', $pagination);
     $this->assignRef('controller', $controller);
     //echo $this->cutDes("thang nay khung qua di thoi");
     parent::display($tpl);
 }
开发者ID:vCodeTech,项目名称:ivivu,代码行数:32,代码来源:view.html.php

示例11: Show

 public function Show()
 {
     if (!(bool) $this->Params->get("stdcaptchadisplay")) {
         return "";
     }
     $captcha_width = (int) $this->Params->get("stdcaptchawidth", "");
     $captcha_height = (int) $this->Params->get("stdcaptchaheight", "");
     $valid = !empty($this->Fields['Secret']) && $this->Fields['Value'] == $this->Fields['Secret'];
     $this->Fields["Name"] = $this->Params->get("stdcaptcha", "");
     $this->Fields["Display"] = 2;
     $this->CreateStandardLabel($this->Fields);
     $result = '<div class="control-group' . $this->TextStyleByValidation() . '"';
     if ($valid) {
         $result .= ' style="display:none !important;"';
     }
     $result .= '>' . PHP_EOL . $this->LabelHtmlCode . '<div ' . 'class="controls" ' . '>' . PHP_EOL;
     if (!$valid) {
         $result .= '<div class="b2jcaptchafieldcontainer">' . '<img src="' . JRoute::_('index.php?option=' . $GLOBALS["com_name"] . "&view=loader" . "&owner=" . $this->Application->owner . "&id=" . $this->Application->oid . "&bid=" . $this->Application->bid . "&root=none" . "&filename=none" . '&type=captcha') . '" ' . 'class="b2j_captcha_img" ' . 'alt="captcha" ' . 'id="b2jcaptcha_' . $this->GetId() . '" width="' . $captcha_width . '" height="' . $captcha_height . '"/>' . '</div>';
     }
     $result .= '<div class="b2jcaptchainputcontainer">' . '<input ' . 'type="text" ' . 'name="' . "b2jcaptcha" . '" ' . 'style="width:' . ($captcha_width - 40) . 'px !important;" ' . 'value="' . $this->FieldValue . '" ' . 'title="' . $this->Params->get("stdcaptcha", "") . '" ' . $this->JSCode;
     if ($valid) {
         $result .= 'readonly="readonly" ';
     }
     $result .= '/>' . $this->DescriptionByValidation() . '</div>';
     if (!$valid) {
         $result .= '<div class="b2jcaptcha-reload-container">' . '<img src="' . JUri::base(true) . '/media/' . $GLOBALS["com_name"] . '/images/transparent.gif" ' . 'id="reloadbtn_' . $this->GetId() . '" ' . 'alt="' . JTEXT::_($GLOBALS["COM_NAME"] . '_RELOAD_ALT') . '" ' . 'title="' . JTEXT::_($GLOBALS["COM_NAME"] . '_RELOAD_TITLE') . '" ' . 'width="16" height="16" ' . "onclick=\"javascript:ReloadB2JCaptcha('b2jcaptcha_" . $this->GetId() . "')\" />" . '</div>' . "<script language=\"javascript\" type=\"text/javascript\">BuildReloadButton('reloadbtn_" . $this->GetId() . "');</script>";
     }
     $result .= '</div>' . '</div>' . PHP_EOL;
     if (!$this->isvalid) {
         $this->MessageBoard->Add(JText::sprintf($GLOBALS["COM_NAME"] . '_ERR_INVALID_VALUE', JText::_($GLOBALS["COM_NAME"] . '_SECURITY_CODE')), B2JMessageBoard::error);
     }
     return $result;
 }
开发者ID:grlf,项目名称:eyedock,代码行数:33,代码来源:b2jcaptcha.php

示例12: alfabetAnalyse

function alfabetAnalyse($codtxt, $alfa)
{
    global $AP, $ks_hilf;
    $alfahier = @hauf($codtxt);
    for ($t = 0; $t < sizeof($alfahier); $t++) {
        $p[] = 100 * prob($alfahier[$t], strlen($codtxt));
    }
    $alfahier = $p;
    $VX = varianz($AP[de]);
    $SX = sqrt(varianz($AP[de]));
    $VY = varianz($alfahier);
    $SY = sqrt(varianz($alfahier));
    $cov = covarianz($AP[de], $alfahier);
    $r = @abs($cov / sqrt($VX * $VY));
    for ($t = 0; $t < sizeof($alfa); $t++) {
        $ba1 .= "<img src={$ks_hilf['pfad']}/image/letter" . $t . ".gif border=0><img src={$ks_hilf['pfad']}/image/bar0.jpg width=3 border=0>";
        $ba2 .= "<img src={$ks_hilf['pfad']}/image/letter" . ($t + $rotv) % sizeof($alfa) . ".gif border=0><img src={$ks_hilf['pfad']}/image/bar0.jpg width=3 border=0>";
    }
    $lang_normalalphabet = JTEXT::_('NORMALALPHABET');
    $lang_STATISTICALDATA = JTEXT::_('STATISTICALDATA');
    $lang_VARIANCE = JTEXT::_('VARIANCE');
    $lang_DEFAULTABWEICHUNG = JTEXT::_('DEFAULTABWEICHUNG');
    $lang_CURRENTALPHABET = JTEXT::_('CURRENTALPHABET');
    $lang_SIGNS = JTEXT::_('SIGNS');
    $lang_ENTROPY = JTEXT::_('ENTROPY');
    $out .= '<table border=0><tr><td>
            <b>' . $lang_normalalphabet . '</b><br>' . $lang_STATISTICALDATA . ':<br>' . '<br>' . $lang_VARIANCE . ': ' . round($VX, 5) . '<br>' . $lang_DEFAULTABWEICHUNG . ':  ' . round($SX, 5) . '</td><td valign=middle>' . showakt($AP[de], 50, 1, 5, 3, 0) . '<center><div class=text7 >' . $ba1 . '</div></center>' . '</td></tr>' . '<tr><td>' . '<br><b>' . $lang_CURRENTALPHABET . '</b><br>' . $lang_STATISTICALDATA . ':<br>' . '<br>' . $lang_VARIANCE . ':    ' . round($VY, 5) . '<br>' . $lang_DEFAULTABWEICHUNG . ':     ' . round($SY, 5) . '<br>' . '</td><td valign=middle><br>' . showakt($alfahier, 50, 1, 5, 3, 0) . '<center><div class=text7 >' . $ba2 . '</div></center>' . '</td></tr><tr><td>' . '<br>' . $lang_SIGNS . ':    ' . strlen($codtxt) . '<br>' . $lang_ENTROPY . ':   ' . round(entropie($codtxt), 5) . '</td></tr></table>';
    return $out;
}
开发者ID:fschell,项目名称:cryptool-online,代码行数:29,代码来源:fkt_alfabet.php

示例13: Show

 public function Show()
 {
     if (!(bool) $this->Params->get("stdcaptchadisplay")) {
         return "";
     }
     // Load into <head> needed js only once and only if captcha feature is enabled
     if (!isset($GLOBALS[$GLOBALS["ext_name"] . '_captcha_js_loaded'])) {
         $this->js_load("fcaptcha.js", 1, 0);
         $GLOBALS[$GLOBALS["ext_name"] . '_captcha_js_loaded'] = true;
     }
     $captcha_width = $this->Params->get("stdcaptchawidth", "");
     $captcha_height = $this->Params->get("stdcaptchaheight", "");
     $valid = !empty($this->Fields['Secret']) && $this->Fields['Value'] == $this->Fields['Secret'];
     $result = '<div style="clear:both;';
     if ($valid) {
         $result .= 'display:none !important;';
     }
     $result .= '">' . PHP_EOL . '<label ' . 'style="' . 'float:' . $GLOBALS["left"] . ';' . 'width:' . $this->Params->get('labelswidth') . $this->Params->get('labelsunit') . ' !important;' . '">' . $this->Params->get("stdcaptcha", "&nbsp;") . '</label>' . PHP_EOL . '<div class="fcaptchacontainer" ' . 'style="' . 'float:' . $GLOBALS["left"] . ';' . '">' . PHP_EOL;
     if (!$valid) {
         $result .= '<div class="fcaptchafieldcontainer">' . '<img src="' . JURI::base(true) . '/components/' . $GLOBALS["com_name"] . '/lib/captcha-drawer.php?' . $this->GetId("=") . '" ' . 'class="fox_captcha_img" ' . 'alt="captcha" ' . 'id="fcaptcha_' . $this->GetId() . '" width="' . $captcha_width . '" height="' . $captcha_height . '"/>' . '</div>' . '<div class="fcaptchafieldcontainer">' . '<img src="' . JURI::base(true) . '/media/' . $GLOBALS["com_name"] . '/images/transparent.gif" ' . 'id="reloadbtn_' . $this->GetId() . '" ' . 'alt="' . JTEXT::_($GLOBALS["COM_NAME"] . '_RELOAD_ALT') . '" ' . 'title="' . JTEXT::_($GLOBALS["COM_NAME"] . '_RELOAD_TITLE') . '" ' . "onclick=\"javascript:ReloadFCaptcha('fcaptcha_" . $this->GetId() . "')\" />" . '</div>' . "<script language=\"javascript\" type=\"text/javascript\">BuildReloadButton('reloadbtn_" . $this->GetId() . "');</script>";
     }
     $result .= '<div class="fcaptchainputcontainer">' . '<input ' . 'class="' . $this->TextStyleByValidation() . '" ' . 'type="text" ' . 'name="' . "fcaptcha" . '" ' . 'style="width:' . $captcha_width . 'px !important;" ';
     if ($valid) {
         $result .= 'value="' . $this->Fields['Value'] . '" ' . 'readonly="readonly" ';
     }
     $result .= '/>' . $this->DescriptionByValidation() . '</div>' . '</div>' . '</div>' . PHP_EOL;
     // Avoid the submit button to be placed near the captcha
     $result .= "<br style=\"clear:both;\" />";
     if (!$this->isvalid) {
         $this->Messages[] = JText::sprintf($GLOBALS["COM_NAME"] . '_ERR_INVALID_VALUE', JText::_($GLOBALS["COM_NAME"] . '_SECURITY_CODE'));
     }
     return $result;
 }
开发者ID:xenten,项目名称:swift-kanban,代码行数:33,代码来源:fcaptcha.php

示例14: getOptions

 public function getOptions()
 {
     $path = JPATH_ADMINISTRATOR . '/components/com_jshopping';
     if (!is_dir($path)) {
         $this->options[] = JHtml::_('select.option', '', JText::_('COM_JOOMSHOPPING_NOT_EXIST'));
         return $this->options;
     } else {
         $lang = JFactory::getLanguage();
         $lang = $lang->getTag();
         $db = JFactory::getDbo();
         $query = $db->getQuery(true);
         $query->select('`id`, `name_' . $lang . '` as name');
         $query->from('#__jshopping_product_labels');
         $db->setQuery($query);
         $rs = $db->loadObjectList();
         $options = array();
         if ($error = $db->getErrorMsg()) {
             echo $error;
             die;
             return false;
         }
         $options[''] = JTEXT::_('JSHOPPING_LABEL_FIELD');
         if ($rs) {
             foreach ($rs as $r) {
                 $options[$r->id] = $r->name;
             }
         }
         return $options;
     }
 }
开发者ID:thumbs-up-sign,项目名称:TuVanDuAn,代码行数:30,代码来源:jslabel.php

示例15: getInput

 protected function getInput()
 {
     // Initialize some field attributes.
     $class = !empty($this->class) ? ' class="' . $this->class . '"' : '';
     // Query List of Categories
     $db = JFactory::getDbo();
     $query = $db->getQuery(true);
     $query->select('a.title, a.state, a.id')->from('`#__icagenda_category` AS a');
     $db->setQuery($query);
     $cat = $db->loadObjectList();
     if (!is_array($this->value)) {
         $this->value = array($this->value);
     }
     $html = ' <select multiple id="' . $this->id . '_id" name="' . $this->name . '"' . $class . '>';
     if (version_compare(JVERSION, '3.0', 'lt')) {
         if ($this->name != 'jform[catid]' && $this->name != 'catid') {
             $html .= '<option value="0"';
             if (in_array('0', $this->value)) {
                 $html .= ' selected="selected"';
             }
             $html .= '>-- ' . JTEXT::_('COM_ICAGENDA_ALL_CATEGORIES') . ' --</option>';
         }
     }
     foreach ($cat as $c) {
         if ($c->state == '1') {
             $html .= '<option value="' . $c->id . '"';
             if (in_array($c->id, $this->value) && !in_array('0', $this->value)) {
                 $html .= ' selected="selected"';
             }
             $html .= '>' . $c->title . '</option>';
         }
     }
     $html .= '</select>';
     return $html;
 }
开发者ID:esorone,项目名称:efcpw,代码行数:35,代码来源:multicat.php


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