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

PHP JTEXT类代码示例

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

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



在下文中一共展示了JTEXT类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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", '[email protected]');
     $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


示例16: getInput

    protected function getInput()
    {
        $db = JFactory::getDbo();
        $query = $db->getQuery(true);
        $query->select('a.title, a.published, a.id, a.path')->from('`#__menu` AS a')->where("(link = 'index.php?option=com_icagenda&view=list') AND (published > 0)");
        $db->setQuery($query);
        $link = $db->loadObjectList();
        $class = JRequest::getVar('class');
        $html = '
			<select id="' . $this->id . '_id"' . $class . ' name="' . $this->name . '">';
        if ($this->name != 'jform[catid]' && $this->name != 'catid') {
            $html .= '<option value="">- ' . JTEXT::_('JGLOBAL_AUTO') . ' -</option>';
        }
        foreach ($link as $l) {
            if ($l->published == '1') {
                $html .= '<option value="' . $l->id . '"';
                if ($this->value == $l->id) {
                    $html .= 'selected="selected"';
                }
                $html .= '>[' . $l->id . '] ' . $l->title . '</option>';
            }
        }
        $html .= '</select>';
        return $html;
    }
开发者ID:richardgarcia7,项目名称:apc-softdev-gd121mi122-06,代码行数:25,代码来源:menulink.php


示例17: makeItemDivs

 function makeItemDivs($items, $value)
 {
     $el = "";
     $i = 0;
     foreach ($items as $option) {
         $attrs = $option->attributes();
         $val = (string) $attrs['value'];
         $text = $option->data();
         $class = '';
         if ($i == 0) {
             $class = 'first';
         }
         if ($i == count($items) - 1) {
             $class .= ' last';
         }
         $this->values[] = $val;
         $txt = "";
         if (@$attrs['imsrc']) {
             $txt = '<div class="radioelement_img" style="background-image: url(' . $this->url . $attrs['imsrc'] . ');"></div>';
             $this->mode = "image";
         } else {
             $txt = JTEXT::_($text);
         }
         $el .= '<div class="radioelement ' . $class . ($val == $value ? ' selected' : '') . '">' . $txt . '</div>';
         $i++;
     }
     $el .= '<div class="clear"></div>';
     return $el;
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:29,代码来源:offlajnradio.php


示例18: postMessage

 public static function postMessage($params, $data)
 {
     $attachment = array('message' => $data['message']);
     $message = array();
     if (!class_exists('TwitterOAuth')) {
         require_once dirname(__FILE__) . '/elements/twitter/twitteroauth.php';
     }
     $user = $params->params->get('groupid');
     $checked = 0;
     $log = '';
     $publish = 1;
     if (isset($user->checked)) {
         $checked = 1;
         $twitter = unserialize($params->params->get('access_token'));
         $connection = new TwitterOAuth($params->params->get('app_appid'), $params->params->get('app_secret'), $twitter['oauth_token'], $twitter['oauth_token_secret']);
         $parameters = array('status' => $attachment['message']);
         $status = $connection->post('statuses/update', $parameters);
         if (isset($status->errors)) {
             $log = Jtext::_('PUBLISHED_TWITTER_PROFILE_SENDMESSAGE') . ' <a href="https://twitter.com/' . $user->screen_name . '" target="_blank" style="text-decoration: underline;">' . $user->name . '</a>  - ' . $status->errors[0]->message . ' <br/>';
             $publish = 0;
         } else {
             $log = Jtext::_('PUBLISHED_TWITTER_PROFILE_SENDMESSAGE') . ' <a href="https://twitter.com/' . $user->screen_name . '" target="_blank" style="text-decoration: underline;">' . $user->name . '</a>  - ' . JTEXT::_('PUBLISHED_TWITTER_PROFILE_SENDMESSAGE_SUCCESSFULL') . '<br/>';
             $publish = 1;
         }
     }
     $message['log'] = $log;
     $message['publish'] = $publish;
     $message['checked'] = $checked;
     $message['type'] = 'twitter';
     return $message;
 }
开发者ID:juanferden,项目名称:adoperp,代码行数:31,代码来源:twitterprofile.php


示例19: display

 /**
  * Easybook view display method
  * @return void
  **/
 function display($tpl = null)
 {
     global $mainframe;
     JToolBarHelper::title(JText::_('Easybook'), 'easybook');
     JToolBarHelper::publishList();
     JToolBarHelper::unpublishList();
     JToolBarHelper::deleteList();
     JToolBarHelper::editListX();
     JToolBarHelper::addNewX();
     JToolBarHelper::preferences('com_easybook', '500');
     JHTML::_('stylesheet', 'easybook.css', 'administrator/components/com_easybook/css/');
     // Get data from the model
     $items =& $this->get('Data');
     $pagination = $this->get('Pagination');
     $version =& $this->get('Version');
     switch ($version->checkVersion(_EASYBOOK_VERSION)) {
         case 1:
             $this->assign('version', "<span style='border-bottom: dotted 1px #b9b9b9; padding-right: 5px; padding-left: 5px;'><b>EasyBook " . _EASYBOOK_VERSION . "</b></span><br /><div style='margin-top: 5px;'><a href='http://www.easy-joomla.org/index.php?option=com_versions&catid=3&myVersion=" . _EASYBOOK_VERSION . "' target='_blank'><img src='" . JURI::base() . "components/com_easybook/images/shield.gif' border='0' style='vertical-align: text-bottom; padding-right: 5px;'/> <span style='color: #e2ad43;'><b>" . JTEXT::_('no updates available') . "</b></span></a></div>");
             break;
         case -1:
             $this->assign('version', "<span style='border-bottom: dotted 1px #b9b9b9; padding-right: 5px; padding-left: 5px;'><b>EasyBook " . _EASYBOOK_VERSION . "</b></span><br /><div style='margin-top: 5px;'><a href='http://www.easy-joomla.org/index.php?option=com_versions&catid=3&myVersion=" . _EASYBOOK_VERSION . "' target='_blank'><img src='" . JURI::base() . "components/com_easybook/images/box.gif' border='0' style='vertical-align: text-bottom; padding-right: 5px;'/> <span style='color: #ce763a;'><b>" . JTEXT::_('updates available') . "</b> EasyBook " . $version->_current . "</span></a></div>");
             break;
         case -2:
             $this->assign('version', "<span style='border-bottom: dotted 1px #b9b9b9; padding-right: 5px; padding-left: 5px;'><b>EasyBook " . _EASYBOOK_VERSION . "</b></span><br /><div style='margin-top: 5px;'><a href='http://www.easy-joomla.org/index.php?option=com_versions&catid=3&myVersion=" . _EASYBOOK_VERSION . "' target='_blank'><img src='" . JURI::base() . "components/com_easybook/images/fail.gif' border='0' style='vertical-align: middle; padding-right: 5px;'/><span style='color: #e34639;'><b>" . JTEXT::_('connection failed') . "</b></span></a></div>");
             break;
     }
     $this->assignRef('pagination', $pagination);
     $this->assignRef('items', $items);
     parent::display($tpl);
 }
开发者ID:hrishikesh-kumar,项目名称:NBSNIP,代码行数:34,代码来源:view.html.php


示例20: getZone

 function getZone()
 {
     $app = JFactory::getApplication();
     $data = $app->input->post->get('jform', array(), 'array');
     $country_id = isset($data['country_id']) ? $data['country_id'] : $app->input->getInt('country_id', '0');
     $zone_id = isset($data['zone_id']) ? $data['zone_id'] : $app->input->getInt('zone_id');
     $z_fname = isset($data['field_name']) ? $data['field_name'] : $app->input->getString('field_name');
     $z_id = isset($data['field_id']) ? $data['field_id'] : $app->input->getString('field_id');
     // based on the country id, get zones and generate a select box
     if (!empty($country_id)) {
         $db = JFactory::getDBO();
         $query = $db->getQuery(true);
         $query->select('j2store_zone_id,zone_name');
         $query->from('#__j2store_zones');
         $query->where('country_id=' . $country_id);
         $db->setQuery((string) $query);
         $zoneList = $db->loadObjectList();
         $options = array();
         $options[] = JHtml::_('select.option', 0, JTEXT::_('J2STORE_ALL_ZONES'));
         if ($zoneList) {
             foreach ($zoneList as $zone) {
                 // this is only to generate the <option> tag inside select tag da i have told n times
                 $options[] = JHtml::_('select.option', $zone->j2store_zone_id, $zone->zone_name);
             }
         }
         // now we must generate the select list and echo that... wait
         //$z_fname='jform[state_id]';
         $zoneList = JHtml::_('select.genericlist', $options, $z_fname, '', 'value', 'text', $zone_id, $z_id);
         echo $zoneList;
     }
     $app->close();
 }
开发者ID:davetheapple,项目名称:oakencraft,代码行数:32,代码来源:geozones.php



注:本文中的JTEXT类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP JTable类代码示例发布时间:2022-05-23
下一篇:
PHP JSubMenuHelper类代码示例发布时间: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