/**
  * 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", '*****@*****.**');
     $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);
 }
Example #2
0
 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;
 }
Example #3
0
/**
 *  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;
}
Example #4
0
 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);
 }
Example #5
0
 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;
 }
Example #6
0
 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'));
 }
Example #7
0
 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);
 }
Example #8
0
 /**
  * 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;
 }
Example #9
0
 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);
 }
Example #10
0
 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);
 }
Example #11
0
 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;
 }
Example #12
0
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;
}
Example #13
0
 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;
 }
Example #14
0
 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;
     }
 }
Example #15
0
 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;
 }
    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;
    }
Example #17
0
 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;
 }
Example #18
0
 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;
 }
Example #19
0
 /**
  * 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);
 }
Example #20
0
 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();
 }
Example #21
0
 private function generateReport($arData)
 {
     ob_start();
     echo '<table border="1">';
     echo "<thead>\n\t\t\t\t         <tr><td colspan='11' style='font-size:16px; color:#0000FF; text-align:center;'> Deal Coupon Report </td> </tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th width=\"5%\">" . JTEXT::_('MERCHANT_SETTLEMENT_SERIAL') . "</th>\n\t\t\t\t\t\t\t<th width=\"10%\">" . JTEXT::_('MERCHANT_SETTLEMENT_DEAL_CODE') . "</th>\n\t\t\t\t\t\t\t<th width=\"15%\">" . JTEXT::_('MERCHANT_SETTLEMENT_BUYER_NAME') . "</th>\n\t\t\t\t\t\t\t<th width=\"15%\">" . JTEXT::_('MERCHANT_SETTLEMENT_BUYER_EMAIL') . "</th>\n\t\t\t\t\t\t\t<th width=\"15%\">" . JTEXT::_('MERCHANT_SETTLEMENT_DELIVERY_NAME') . "</th>\n\t\t\t\t\t\t\t<th width=\"15%\">" . JTEXT::_('MERCHANT_SETTLEMENT_DELIVERY_EMAIL') . "</th>\n\t\t\t\t\t\t\t<th width=\"15%\">" . JTEXT::_('MERCHANT_SETTLEMENT_ORDER_COMMENT') . "</th>\n\t\t\t\t\t\t\t<th width=\"10%\">" . JTEXT::_('MERCHANT_SETTLEMENT_PURCHASE_DATE') . "</th>\n\t\t\t\t\t\t\t<th width=\"10%\">" . JTEXT::_('MERCHANT_SETTLEMENT_PRICE') . "</th>\n\t\t\t\t\t\t\t<th width=\"5%\">" . JTEXT::_('MERCHANT_SETTLEMENT_COUPON_SERIAL') . "</th>\n\t\t\t\t\t\t\t<th width=\"5%\">" . JTEXT::_('MERCHANT_SETTLEMENT_COUPON_STATUS') . "</th>\n\t\t\t\t\t\t\t<th width=\"5%\">" . JTEXT::_('MERCHANT_SETTLEMENT_SETTLEMENT_STATUS') . "</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>";
     $count = 0;
     foreach ($arData as $item) {
         $count++;
         $arBuyer = json_decode($item->order_buyer_detail);
         $arReceiver = json_decode($item->order_delivery_detail);
         echo '<tr>';
         echo '<td>' . $count . '</td>';
         echo '<td>' . $item->deal_code . '</td>';
         echo '<td>' . $arBuyer->name . '</td>';
         echo '<td>' . $arBuyer->email . '</td>';
         echo '<td>' . $arReceiver->name . '</td>';
         echo '<td>' . $arReceiver->email . '</td>';
         echo '<td>' . $item->order_description . '</td>';
         echo '<td>' . $item->created_at . '</td>';
         echo '<td>' . $item->unit_price . '</td>';
         echo '<td style="text-align:center;"># ' . $item->coupon_serial . '</td>';
         echo '<td style="text-align:center;">' . $item->coupon_status . '</td>';
         echo '<td>' . JText::_('MERCHANT_SETTLEMENT_' . strtoupper($item->coupon_settlement_status)) . '</td>';
         echo '</tr>';
     }
     echo '</table>';
     $contents = ob_get_contents();
     ob_end_clean();
     return $contents;
 }
    protected function getInput()
    {
        $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();
        $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="0">' . JTEXT::_('COM_ICAGENDA_ALL_F') . '</option>';
        }
        foreach ($cat as $c) {
            if ($c->state == '1') {
                $html .= '<option value="' . $c->id . '"';
                if ($this->value == $c->id) {
                    $html .= 'selected="selected"';
                }
                $html .= '>' . $c->title . '</option>';
            }
        }
        $html .= '</select>';
        return $html;
    }
Example #23
0
 /**
  * Renders a set of names for actors.
  * 
  * @param ComActorsDomainEntityActor|array $actor
  *
  * @return string
  */
 public function names($actor, $truncate_after = 1)
 {
     if (is_array($actor)) {
         $actors = $actor;
         $left_over = count($actors) - $truncate_after;
         if (!$truncate_after || $left_over <= 1) {
             $last_actor = $this->name(array_pop($actors));
             if (!empty($actors)) {
                 $name = implode(', ', array_map(array($this, 'name'), $actors));
                 $name = sprintf(JText::_('COM-ACTORS-AND-ACTOR'), $name, $last_actor);
             } else {
                 $name = $last_actor;
             }
             return $name;
         }
         $ids = array_map(function ($actor) {
             return 'ids[]=' . $actor->id;
         }, $actors);
         $ids = implode('&', $ids);
         $actors = array_splice($actors, 0, $truncate_after);
         $actors = implode(', ', array_map(array($this, 'name'), $actors));
         $actors = sprintf(JTEXT::_('COM-ACTORS-AND-OTHERS'), $actors, JRoute::_('option=com_actors&layout=modal&view=actors&' . $ids), JText::_($left_over));
         return $actors;
     }
     return $this->name($actor);
 }
Example #24
0
 function save()
 {
     $model = $this->getModel('muzeededi');
     $db = $model->connectMuzeeli();
     $dedicace = JRequest::getVar('dedicace', '', '', 'string');
     $params =& JComponentHelper::getParams('com_muzeededi');
     $moderer_site = $params->get('moderer_site');
     $moderer = $moderer_site == "yes" ? "0" : "1";
     $q_dedicace = $db->Quote($dedicace);
     $query = "INSERT INTO #__muzeededi (id,dedicace,moderer) VALUES ('',{$q_dedicace},'{$moderer}')";
     $test = $db->SetQuery($query);
     $test2 = $db->query();
     $msg = "";
     if ($test2 === true) {
         //point alphauserpoints
         $api_AUP = JPATH_SITE . DS . 'components' . DS . 'com_alphauserpoints' . DS . 'helper.php';
         if (file_exists($api_AUP)) {
             require_once $api_AUP;
             AlphaUserPointsHelper::newpoints('plgaup_muzeededi', '', '', 'Dédicace');
         }
         //fin alphauserpoints
         if ($moderer == "0") {
             $msg = JTEXT::_("COM_MUZEEDEDI_DEDICACE_ENREGISTREE");
         } else {
             $texte = $model->getDedicaces($db);
             $creer_txt = $model->creerFichier($texte);
             $msg = JTEXT::_("COM_MUZEEDEDI_DEDICACE_PUBLIE");
         }
         $mail = $this->alerteMail($dedicace, $moderer);
     } else {
         $msg = JTEXT::_("COM_MUZEEDEDI_DEDICACE_ERREUR");
     }
     $link = 'index.php?option=com_muzeededi';
     $this->setRedirect($link, $msg);
 }
Example #25
0
    function layout($block, $index)
    {
        $icon = JUri::root(true) . $this->directory . $block['icon'];
        $title = $block['title'];
        $link = $block['link'];
        return '
			<div class="quicklinks-block">
				<div class="quicklinks-icon"><img src="' . $icon . '" /></div>
				<div class="quicklinks-title">
					<span>' . JTEXT::_('MC_RQL_TITLE') . '</span>
					<input class="text_area quick-input" id="jform_params_title-' . $index . '" name="jform[params][title-' . $index . ']" value="' . $title . '" type="text" />
				</div>
				<div class="quicklinks-link">
					<span>' . JTEXT::_('MC_RQL_LINK') . '</span>
					<input class="text_area quick-input" id="jform_params_link-' . $index . '" name="jform[params][link-' . $index . ']" value="' . $link . '" type="text" />
				</div>
				<div class="quicklinks-iconslist">
					<span>' . JTEXT::_('MC_RQL_ICON') . '</span>
					<select class="inputbox quicklinks-select" id="jform_params_icon-' . $index . '" name="jform[params][icon-' . $index . ']">
						' . $this->populateIcons($icon) . '
					</select>
				</div>
				
				<div class="quicklinks-controls">
					<div class="quicklinks-add"></div>
					<div class="quicklinks-remove"></div>
				</div>
				<div class="quicklinks-move"></div>
			</div>
		';
    }
Example #26
0
 function fetchElement($name, $value, &$node, $control_name)
 {
     global $gantry;
     $buffer = '';
     $class = $node->attributes('class') ? $node->attributes('class') : '';
     $chain = $node->children();
     $buffer .= "<div class='wrapper wrapper-" . $name . " " . $class . "'>";
     // Columns
     $leftOpen = "<div class='group-left'>";
     $rightOpen = "<div class='group-right'>";
     $noneOpen = "<div class='group-none'>";
     $divClose = "</div>";
     foreach ($chain as $item) {
         $type = $item->attributes('type');
         $element = $this->_loadElementType($type);
         $position = $item->attributes('position') ? $item->attributes('position') : 'none';
         $showLabel = $item->attributes('showlabel') == "no" ? false : true;
         $position .= "Open";
         $bufferItem = "";
         $itemName = $name . "-" . $item->attributes('name');
         $itemValue = $gantry->get($itemName);
         $bufferItem .= '<div class="group ' . $itemName . ' group-' . $type . '">';
         if ($showLabel) {
             $bufferItem .= '<span class="group-label">' . JTEXT::_($item->attributes('label')) . '</span>';
         }
         $bufferItem .= $element->fetchElement($itemName, $itemValue, $item, $control_name);
         $bufferItem .= "</div>";
         ${$position} .= $bufferItem;
     }
     $buffer .= $leftOpen . $divClose . $rightOpen . $divClose . $noneOpen . $divClose;
     $buffer .= "</div>";
     return $buffer;
 }
    function fetchElement($name, $value, &$node, $control_name) {
        global $gantry;

        $buffer = '';
        $class = ($node->attributes('class') ? 'class="' . $node->attributes('class') . '"' : 'class="inputbox"');
        $chain = $node->children();

        $buffer .= "<div class='wrapper'>";
        foreach ($chain as $item) {
            $type = $item->attributes('type');
            $element = $this->_loadElementType($type);

            $itemName = $name . "-" . $item->attributes('name');
            $itemValue = $gantry->get($itemName);

            $buffer .= '<div class="chain ' . $itemName . ' chain-' . $type . '">';
            $buffer .= '<span class="chain-label">' . JTEXT::_($item->attributes('label')) . '</span>';
            $buffer .= $element->fetchElement($itemName, $itemValue, $item, $control_name);
            $buffer .= "</div>";

        }
        $buffer .= "</div>";

        return $buffer;
    }
Example #28
0
 function fetchElement($name, $value, &$node, $control_name)
 {
     global $gantry;
     $buffer = '';
     $class = $node->attributes('class') ? 'class="' . $node->attributes('class') . '"' : 'class="inputbox"';
     $chain = $node->children();
     $buffer .= "<div class='wrapper'>";
     foreach ($chain as $item) {
         $type = $item->attributes('type');
         $filename = $type . ".php";
         if (JFile::exists(dirname(__FILE__) . DS . $filename)) {
             require_once dirname(__FILE__) . DS . $filename;
         } else {
             require_once JPATH_SITE . DS . 'libraries' . DS . 'joomla' . DS . 'html' . DS . 'parameter' . DS . 'element' . DS . $filename;
         }
         $elementName = "JElement" . ucfirst($type);
         $element = new $elementName();
         $itemName = $name . "-" . $item->attributes('name');
         $itemValue = $gantry->get($itemName);
         $buffer .= '<div class="chain ' . $itemName . ' chain-' . $type . '">';
         $buffer .= '<span class="chain-label">' . JTEXT::_($item->attributes('label')) . '</span>';
         $buffer .= $element->fetchElement($itemName, $itemValue, $item, $control_name);
         $buffer .= "</div>";
     }
     $buffer .= "</div>";
     return $buffer;
 }
Example #29
0
 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();
     $cityid = $params->get('cityid', '1');
     $cityid = JRequest::getVar('cityid', $cityid);
     //if($cityid==1)
     $hotels = $model->getHotelsByCity($cityid);
     $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);
     }
     //get controller
     $mainframe->setPageTitle(JTEXT::_("HOTELS IN") . " " . $hotels[0]->city_Name);
     //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);
 }
 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;
 }