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


PHP mosHTML::radioList方法代码示例

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


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

示例1: viewSearch

function viewSearch()
{
    global $mainframe, $mosConfig_absolute_path, $mosConfig_lang, $my;
    global $Itemid, $database, $_MAMBOTS;
    $gid = $my->gid;
    // Adds parameter handling
    if ($Itemid > 0) {
        $menu =& new mosMenu($database);
        $menu->load($Itemid);
        $params =& new mosParameters($menu->params);
        $params->def('page_title', 1);
        $params->def('pageclass_sfx', '');
        $params->def('header', $menu->name, T_('Search'));
        $params->def('back_button', $mainframe->getCfg('back_button'));
    } else {
        $params =& new mosParameters('');
        $params->def('page_title', 1);
        $params->def('pageclass_sfx', '');
        $params->def('header', T_('Search'));
        $params->def('back_button', $mainframe->getCfg('back_button'));
    }
    // html output
    search_html::openhtml($params);
    $searchword = mosGetParam($_REQUEST, 'searchword', '');
    $searchword = $database->getEscaped(trim($searchword));
    $search_ignore = array();
    @(include "{$mosConfig_absolute_path}/language/{$mosConfig_lang}.ignore.php");
    $orders = array();
    $orders[] = mosHTML::makeOption('newest', T_('Newest first'));
    $orders[] = mosHTML::makeOption('oldest', T_('Oldest first'));
    $orders[] = mosHTML::makeOption('popular', T_('Most popular'));
    $orders[] = mosHTML::makeOption('alpha', T_('Alphabetical'));
    $orders[] = mosHTML::makeOption('category', T_('Section/Category'));
    $ordering = mosGetParam($_REQUEST, 'ordering', 'newest');
    if (!in_array($ordering, array('newest', 'oldest', 'popular', 'alpha', 'category'))) {
        $ordering = 'newest';
    }
    $lists = array();
    $lists['ordering'] = mosHTML::selectList($orders, 'ordering', 'class="inputbox"', 'value', 'text', $ordering);
    $searchphrase = mosGetParam($_REQUEST, 'searchphrase', 'any');
    if (!in_array($searchphrase, array('any', 'all', 'exact'))) {
        $searchphrase = 'any';
    }
    $searchphrases = array();
    $phrase = new stdClass();
    $phrase->value = 'any';
    $phrase->text = T_('Any words');
    $searchphrases[] = $phrase;
    $phrase = new stdClass();
    $phrase->value = 'all';
    $phrase->text = T_('All words');
    $searchphrases[] = $phrase;
    $phrase = new stdClass();
    $phrase->value = 'exact';
    $phrase->text = T_('Exact phrase');
    $searchphrases[] = $phrase;
    $lists['searchphrase'] = mosHTML::radioList($searchphrases, 'searchphrase', '', $searchphrase);
    // html output
    search_html::searchbox(htmlspecialchars($searchword), $lists, $params);
    if (!$searchword) {
        if (count($_POST)) {
            // html output
            // no matches found
            search_html::message(T_('No results were found'), $params);
        }
    } else {
        foreach ($search_ignore as $ignore_word) {
            $searchword = preg_replace("/(^|\\W){$ignore_word}(\$|\\W)/i", '$1$2', $searchword);
        }
        $searchword = trim($searchword);
        if (!$searchword) {
            search_html::message(T_('One or more common words were ignored in the search'), $params);
        }
    }
    if ($searchword) {
        // html output
        search_html::searchintro(htmlspecialchars($searchword), $params);
        mosLogSearch($searchword);
        $phrase = mosGetParam($_REQUEST, 'searchphrase', '');
        if (!in_array($phrase, array('any', 'all', 'exact'))) {
            $phrase = 'any';
        }
        $ordering = mosGetParam($_REQUEST, 'ordering', '');
        if (!in_array($ordering, array('newest', 'oldest', 'popular', 'alpha', 'category'))) {
            $ordering = 'newest';
        }
        $_MAMBOTS->loadBotGroup('search');
        $results = $_MAMBOTS->trigger('onSearch', array($searchword, $phrase, $ordering));
        $rows = array();
        foreach ($results as $result) {
            if ($result) {
                $rows = array_merge($rows, $result);
            }
        }
        $totalRows = count($rows);
        for ($i = 0; $i < $totalRows; $i++) {
            $row =& $rows[$i]->text;
            if ($phrase == 'exact') {
                $searchwords = array($searchword);
                $needle = $searchword;
//.........这里部分代码省略.........
开发者ID:jwest00724,项目名称:mambo,代码行数:101,代码来源:search.php

示例2: yesnoRadioList

 /**
  * Writes a yes/no radio list
  * @param string The value of the HTML name attribute
  * @param string Additional HTML attributes for the <select> tag
  * @param mixed The key that is selected
  * @returns string HTML for the radio list
  */
 function yesnoRadioList($tag_name, $tag_attribs, $selected, $yes = false, $no = false)
 {
     $arr = array(mosHTML::makeOption('0', $no ? $no : T_('No')), mosHTML::makeOption('1', $yes ? $yes : T_('Yes')));
     return mosHTML::radioList($arr, $tag_name, $tag_attribs, $selected);
 }
开发者ID:jwest00724,项目名称:mambo,代码行数:12,代码来源:mamboHTML.php

示例3: JLMS_editCertificate_OneRole

    function JLMS_editCertificate_OneRole(&$row, &$fonts, $pref = '', $default = false)
    {
        global $JLMS_DB, $JLMS_CONFIG;
        $parent_id = isset($row->id) ? intval($row->id) : 0;
        $parent_course = isset($row->course_id) ? intval($row->course_id) : 0;
        $query = "SELECT * FROM #__lms_certificates WHERE parent_id = {$parent_id} AND course_id = {$parent_course} AND crtf_type = '-2' ORDER BY crtf_align";
        $JLMS_DB->SetQuery($query);
        $cmsgs_saved = $JLMS_DB->LoadObjectList();
        $f = mosHTML::selectList($fonts, 'crtf_font' . ($pref ? '_' . $pref : ''), $default ? ' disabled="disabled"' : '', 'value', 'text', isset($row->crtf_font) ? $row->crtf_font : 'arial.ttf');
        $f2 = mosHTML::selectList($fonts, 'new_txt_mes_font' . ($pref ? '_' . $pref : ''), ' style="width:180px"' . ($default ? ' disabled="disabled"' : ''), 'value', 'text');
        if ($pref) {
            ?>
		<tr>
			<td valign="middle" style="vertical-align:middle" width="25%"><br /><?php 
            echo _JLMS_CRTF_USE_DEFAULT;
            ?>
</td>
			<td>
				<br /><input size="40" onchange="jlms_changeCrtfDefaultValue(this, '<?php 
            echo $pref;
            ?>
')" class="inputbox" type="checkbox"<?php 
            echo $default ? ' checked="checked"' : '';
            ?>
 name="certificate_default<?php 
            echo $pref ? '_' . $pref : '';
            ?>
" value="1" />
			</td>
		</tr>
	<?php 
        }
        ?>
	<tr>
		<td valign="middle" style="vertical-align:middle" width="25%"><br /><?php 
        echo _JLMS_CHOOSE_FILE;
        ?>
</td>
		<td>
			<br /><input size="40" class="inputbox" type="file"<?php 
        echo $default ? ' disabled="disabled"' : '';
        ?>
 name="userfile<?php 
        echo $pref ? '_' . $pref : '';
        ?>
" />
			<?php 
        echo $row->file_id && !$default ? '<br />' . _JLMS_FILE_ATTACHED : '<br />' . _JLMS_FILE_NOT_ATTACHED;
        ?>
		</td>
	</tr>
	<tr>
		<td><br /><?php 
        echo _JLMS_GB_CRT_TEXT;
        ?>
</td>
		<td><br />
			<textarea class="inputbox" name="crtf_text<?php 
        echo $pref ? '_' . $pref : '';
        ?>
"<?php 
        echo $default ? ' disabled="disabled"' : '';
        ?>
 rows="6" cols="40"><?php 
        echo $row->crtf_text;
        ?>
</textarea>
		</td>
	</tr>
	<tr><td colspan="2"><div class="joomlalms_info_legend"><?php 
        echo _JLMS_GB_CRTF_TEXT_NOTE;
        ?>
</div></td></tr>
	<tr>
		<td valign="middle" style="vertical-align:middle"><br /><?php 
        echo _JLMS_GB_CRT_TEXT_ALIGN;
        ?>
</td>
		<td>
			<?php 
        $list_a = array();
        $list_a[] = mosHTML::makeOption('0', _JLMS_LEFT);
        $list_a[] = mosHTML::makeOption('1', _JLMS_CENTER);
        $list_a[] = mosHTML::makeOption('2', _JLMS_RIGHT);
        $rrr = mosHTML::radioList($list_a, 'crtf_align' . ($pref ? '_' . $pref : ''), $default ? ' disabled="disabled"' : '', $row->crtf_align);
        ?>
			<br /><?php 
        echo $rrr;
        ?>
		</td>
	</tr>
	<tr>
		<td valign="middle" style="vertical-align:middle"><br /><?php 
        echo _JLMS_GB_CRT_TEXT_SHADOW;
        ?>
</td>
		<td><br />
			<?php 
        echo mosHTML::yesnoRadioList('crtf_shadow' . ($pref ? '_' . $pref : ''), $default ? ' disabled="disabled"' : '', $row->crtf_shadow);
        ?>
//.........这里部分代码省略.........
开发者ID:parkmi,项目名称:dolschool14,代码行数:101,代码来源:lms_certificates.php

示例4: prepList

 function prepList($listEdit)
 {
     global $my, $acl;
     $lists = array();
     $jour = array();
     $jour[] = mosHTML::makeOption('1', _ACA_AUTO_DAY_CH1);
     $jour[] = mosHTML::makeOption('3', _ACA_AUTO_DAY_CH3);
     $jour[] = mosHTML::makeOption('5', _ACA_AUTO_DAY_CH5);
     $jour[] = mosHTML::makeOption('6', _ACA_AUTO_DAY_CH6);
     $jour[] = mosHTML::makeOption('7', _ACA_AUTO_DAY_CH7);
     $jour[] = mosHTML::makeOption('8', _ACA_AUTO_DAY_CH8);
     $jour[] = mosHTML::makeOption('9', _ACA_AUTO_DAY_CH9);
     $auto_option[] = mosHTML::makeOption('0', _ACA_AUTO_OPTION_NONE);
     $auto_option[] = mosHTML::makeOption('1', _ACA_AUTO_OPTION_NEW);
     if ($listEdit->new_letter == 1) {
         $auto_option[] = mosHTML::makeOption('2', _ACA_AUTO_OPTION_ALL);
     }
     $lists['delay_min'] = mosHTML::selectList($jour, 'delay_min', 'class="inputbox" size="1"', 'value', 'text', $listEdit->delay_min);
     $lists['auto_add'] = mosHTML::radioList($auto_option, 'auto_add', 'class="inputbox"', $listEdit->auto_add);
     $lists['published'] = mosHTML::yesnoRadioList('published', 'class="inputbox"', $listEdit->published);
     $lists['hidden'] = mosHTML::yesnoRadioList('hidden', 'class="inputbox"', $listEdit->hidden);
     $lists_option = lisType::getListOption();
     $lists['list_type'] = listsHTML::aca_radioList($lists_option, 'list_type', 'class="inputbox"', $listEdit->list_type);
     $lists['html_mailings'] = mosHTML::yesnoRadioList('html', 'class="inputbox"', $listEdit->html);
     $lists['unsubscribesend'] = mosHTML::yesnoRadioList("unsubscribesend", 'class="inputbox"', $listEdit->unsubscribesend);
     $lists['footer'] = mosHTML::yesnoRadioList("footer", 'class="inputbox"', $listEdit->footer);
     $my_group = strtolower($acl->get_group_name($listEdit->acc_id, 'ARO'));
     $gtree = $acl->get_group_children_tree(null, 'USERS', false);
     $lists['gid'] = mosHTML::selectList($gtree, 'acc_id', 'size="10"', 'value', 'text', $listEdit->acc_id);
     $lists['edit_perms'] = mosHTML::selectList($gtree, 'acc_level', 'size="10"', 'value', 'text', $listEdit->acc_level);
     return $lists;
 }
开发者ID:reeleis,项目名称:ohiocitycycles,代码行数:32,代码来源:lists.acajoom.html.php

示例5: viewSearch

function viewSearch()
{
    global $mainframe, $mosConfig_absolute_path, $mosConfig_lang, $my;
    global $Itemid, $database, $_MAMBOTS;
    global $mosConfig_list_limit;
    $restriction = 0;
    // try to find search component's Itemid
    // Only search if we don't have a valid Itemid (e.g. from module)
    if (!intval($Itemid) || intval($Itemid) == 99999999) {
        $query = "SELECT id" . "\n FROM #__menu" . "\n WHERE type = 'components'" . "\n AND published = 1" . "\n AND link = 'index.php?option=com_search'";
        $database->setQuery($query);
        $_Itemid = $database->loadResult();
        if ($_Itemid != "") {
            $Itemid = $_Itemid;
        }
    }
    $gid = $my->gid;
    // Adds parameter handling
    if ($Itemid > 0 && $Itemid != 99999999) {
        $menu = $mainframe->get('menu');
        $params = new mosParameters($menu->params);
        $params->def('page_title', 1);
        $params->def('pageclass_sfx', '');
        $params->def('header', $menu->name);
        $params->def('back_button', $mainframe->getCfg('back_button'));
    } else {
        $params = new mosParameters('');
        $params->def('page_title', 1);
        $params->def('pageclass_sfx', '');
        $params->def('header', _SEARCH_TITLE);
        $params->def('back_button', $mainframe->getCfg('back_button'));
    }
    // html output
    search_html::openhtml($params);
    $searchphrase = mosGetParam($_REQUEST, 'searchphrase', 'any');
    $searchphrase = preg_replace('/[^a-z]/', '', strtolower($searchphrase));
    $searchword = strval(mosGetParam($_REQUEST, 'searchword', ''));
    $searchword = trim(stripslashes($searchword));
    // limit searchword to 20 characters
    if (strlen($searchword) > 20) {
        $searchword = substr($searchword, 0, 19);
        $restriction = 1;
    }
    // searchword must contain a minimum of 3 characters
    if ($searchword && strlen($searchword) < 3) {
        $searchword = '';
        $restriction = 1;
    }
    if ($searchphrase != 'exact') {
        $aterms = explode(' ', strtolower($searchword));
        $search_ignore = array();
        // filter out search terms that are too small
        foreach ($aterms as $aterm) {
            if (strlen($aterm) < 3) {
                $search_ignore[] = $aterm;
            }
        }
        $pruned = array_diff($aterms, $search_ignore);
        $pruned = array_unique($pruned);
        $searchword = implode(' ', $pruned);
        if (trim($searchword) == '') {
            $restriction = 1;
        }
    }
    @(include "{$mosConfig_absolute_path}/language/{$mosConfig_lang}.ignore.php");
    $orders = array();
    $orders[] = mosHTML::makeOption('newest', _SEARCH_NEWEST);
    $orders[] = mosHTML::makeOption('oldest', _SEARCH_OLDEST);
    $orders[] = mosHTML::makeOption('popular', _SEARCH_POPULAR);
    $orders[] = mosHTML::makeOption('alpha', _SEARCH_ALPHABETICAL);
    $orders[] = mosHTML::makeOption('category', _SEARCH_CATEGORY);
    $ordering = mosGetParam($_REQUEST, 'ordering', 'newest');
    $ordering = preg_replace('/[^a-z]/', '', strtolower($ordering));
    $lists = array();
    $lists['ordering'] = mosHTML::selectList($orders, 'ordering', 'id="search_ordering" class="inputbox"', 'value', 'text', $ordering);
    $searchphrases = array();
    $phrase = new stdClass();
    $phrase->value = 'any';
    $phrase->text = _SEARCH_ANYWORDS;
    $searchphrases[] = $phrase;
    $phrase = new stdClass();
    $phrase->value = 'all';
    $phrase->text = _SEARCH_ALLWORDS;
    $searchphrases[] = $phrase;
    $phrase = new stdClass();
    $phrase->value = 'exact';
    $phrase->text = _SEARCH_PHRASE;
    $searchphrases[] = $phrase;
    $lists['searchphrase'] = mosHTML::radioList($searchphrases, 'searchphrase', '', $searchphrase);
    // html output
    search_html::searchbox(htmlspecialchars($searchword), $lists, $params);
    if (!$searchword) {
        if (count($_POST)) {
            // html output
            // no matches found
            search_html::message(_NOKEYWORD, $params);
        } else {
            if ($restriction) {
                // html output
                search_html::message(_SEARCH_MESSAGE, $params);
//.........这里部分代码省略.........
开发者ID:patricmutwiri,项目名称:joomlaclube,代码行数:101,代码来源:search.php

示例6: _form_radio

 /**
  * @param string The name of the form element
  * @param string The value of the element
  * @param object The xml element for the parameter
  * @param string The control name
  * @return string The html for the element
  */
 function _form_radio($name, $value, &$node, $control_name)
 {
     $options = array();
     foreach ($node->childNodes as $option) {
         $val = $option->getAttribute('value');
         $text = $option->gettext();
         $options[] = mosHTML::makeOption($val, $text);
     }
     return mosHTML::radioList($options, '' . $control_name . '[' . $name . ']', '', $value);
 }
开发者ID:jwest00724,项目名称:Joomla-1.0,代码行数:17,代码来源:joomla.xml.php

示例7: _form_radio

 /**
 * @var string The name of the form element
 * @var string The value of the element
 * @var object The xml element for the parameter
 * @return string The html for the element
 */
 function _form_radio($name, $value, &$node)
 {
     $options = array();
     foreach ($node->childNodes as $option) {
         $val = $option->getAttribute('value');
         $text = $option->gettext();
         $options[] = mosHTML::makeOption($val, $text, true);
     }
     return mosHTML::radioList($options, "params[{$name}]", '', $value);
 }
开发者ID:cwcw,项目名称:cms,代码行数:16,代码来源:mamboxml.php

示例8: yesnoRadioList

 /**
  * Writes a yes/no radio list
  * @param string The value of the HTML name attribute
  * @param string Additional HTML attributes for the <select> tag
  * @param mixed The key that is selected
  * @returns string HTML for the radio list
  */
 function yesnoRadioList($tag_name, $tag_attribs, $selected, $yes = _CMN_YES, $no = _CMN_NO)
 {
     $arr = array(mosHTML::makeOption('0', $no), mosHTML::makeOption('1', $yes));
     return mosHTML::radioList($arr, $tag_name, $tag_attribs, $selected);
 }
开发者ID:patricmutwiri,项目名称:joomlaclube,代码行数:12,代码来源:joomla.php

示例9: showConfigEdit


//.........这里部分代码省略.........
                $jour[] = JHTML::_('select.option', '4', _FREQ_OPT_4);
                $jour[] = JHTML::_('select.option', '5', _FREQ_OPT_5);
                $jour[] = JHTML::_('select.option', '6', _FREQ_OPT_6);
                $dateType = array();
                $dateType[] = JHTML::_('select.option', '1', _DATE_OPT_1);
                $dateType[] = JHTML::_('select.option', '2', _DATE_OPT_2);
                $lists['frequency'] = JHTML::_('select.genericlist', $jour, "config['frequency']", 'class="inputbox" size="1"', 'value', 'text', $GLOBALS[ACA . 'frequency']);
                $lists['date_type'] = JHTML::_('select.genericlist', $dateType, "config['date_type']", 'class="inputbox" size="1"', 'value', 'text', $GLOBALS[ACA . 'date_type']);
            } else {
                //joomla 1x
                $jour = array();
                $jour[] = mosHTML::makeOption('0', _FREQ_OPT_0);
                $jour[] = mosHTML::makeOption('1', _FREQ_OPT_1);
                $jour[] = mosHTML::makeOption('2', _FREQ_OPT_2);
                $jour[] = mosHTML::makeOption('3', _FREQ_OPT_3);
                $jour[] = mosHTML::makeOption('4', _FREQ_OPT_4);
                $jour[] = mosHTML::makeOption('5', _FREQ_OPT_5);
                $jour[] = mosHTML::makeOption('6', _FREQ_OPT_6);
                $dateType = array();
                $dateType[] = mosHTML::makeOption('1', _DATE_OPT_1);
                $dateType[] = mosHTML::makeOption('2', _DATE_OPT_2);
                $lists['frequency'] = mosHTML::selectList($jour, "config['frequency']", 'class="inputbox" size="1"', 'value', 'text', $GLOBALS[ACA . 'frequency']);
                $lists['date_type'] = mosHTML::selectList($dateType, "config['date_type']", 'class="inputbox" size="1"', 'value', 'text', $GLOBALS[ACA . 'date_type']);
            }
            //endif
        }
        if (ACA_CMSTYPE) {
            $mail_format[] = JHTML::_('select.option', '0', 'Text (8bit)');
            $mail_format[] = JHTML::_('select.option', '1', 'MIME (base64)');
            $lists['mail_format'] = JHTML::_('select.radiolist', $mail_format, "config['mail_format']", 'class="inputbox"', 'value', 'text', $GLOBALS[ACA . 'mail_format']);
        } else {
            $mail_format[] = mosHTML::makeOption('0', 'Text (8bit)');
            $mail_format[] = mosHTML::makeOption('1', 'MIME (base64)');
            $lists['mail_format'] = mosHTML::radioList($mail_format, "config['mail_format']", 'class="inputbox"', $GLOBALS[ACA . 'mail_format']);
        }
        //endif
        backHTML::formStart('configpanel', 0, '');
        ?>
	<table style="width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td>
	<form action="index2.php" method="post" name="adminForm">
	<?php 
        if (ACA_CMSTYPE) {
            $config_tabs = new mosTabs15(1);
        } else {
            $config_tabs = new mosTabs(1);
        }
        //endif
        $config_tabs->startPane('acaConfig');
        $config_tabs->startTab(_ACA_MAIL_CONFIG, 'mail');
        configHTML::mailSettings($lists);
        $config_tabs->endTab();
        $config_tabs->startTab(_ACA_SUBSCRIBER_CONFIG, 'subscribers');
        configHTML::subcriberSettings($lists);
        $config_tabs->endTab();
        if (class_exists('auto')) {
            $flag = auto::viewCron();
        } else {
            $flag = false;
        }
        if ($flag) {
            $config_tabs->startTab(_ACA_SCHEDULER, 'scheduler');
            configHTML::cronSettings($lists);
            $config_tabs->endTab();
        }
        $config_tabs->startTab(_ACA_LOGGING_CONFIG, 'logging');
        configHTML::logsSettings($lists);
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:67,代码来源:config.acajoom.html.php

示例10: prepList

 function prepList($listEdit)
 {
     $lists = array();
     $jour = array();
     if (ACA_CMSTYPE) {
         // joomla 15
         $my =& JFactory::getUser();
         $acl =& JFactory::getACL();
         $gtree = $acl->get_group_children_tree(null, 'USERS', false);
         $jour[] = JHTML::_('select.option', '1800', 'Every 30 minutes');
         $jour[] = JHTML::_('select.option', '3600', 'Every hour');
         $jour[] = JHTML::_('select.option', '43200', 'Every 12 hours');
         $jour[] = JHTML::_('select.option', '1', _ACA_AUTO_DAY_CH1);
         $jour[] = JHTML::_('select.option', '3', _ACA_AUTO_DAY_CH3);
         $jour[] = JHTML::_('select.option', '5', _ACA_AUTO_DAY_CH5);
         $jour[] = JHTML::_('select.option', '6', _ACA_AUTO_DAY_CH6);
         $jour[] = JHTML::_('select.option', '7', _ACA_AUTO_DAY_CH7);
         $jour[] = JHTML::_('select.option', '8', _ACA_AUTO_DAY_CH8);
         $jour[] = JHTML::_('select.option', '9', _ACA_AUTO_DAY_CH9);
         $auto_option[] = JHTML::_('select.option', '0', _ACA_AUTO_OPTION_NONE);
         $auto_option[] = JHTML::_('select.option', '1', _ACA_AUTO_OPTION_NEW);
         if ($listEdit->new_letter == 1) {
             $auto_option[] = JHTML::_('select.option', '2', _ACA_AUTO_OPTION_ALL);
         }
         $lists['delay_min'] = JHTML::_('select.genericlist', $jour, 'delay_min', 'class="inputbox" size="1"', 'value', 'text', $listEdit->delay_min);
         $lists['gid'] = JHTML::_('select.genericlist', $gtree, 'acc_id', 'size="10"', 'value', 'text', $listEdit->acc_id);
         $lists['edit_perms'] = JHTML::_('select.genericlist', $gtree, 'acc_level', 'size="10"', 'value', 'text', $listEdit->acc_level);
         $lists['auto_add'] = JHTML::_('select.genericlist', $auto_option, 'auto_add', 'class="inputbox"', 'value', 'text', $listEdit->auto_add);
         $lists['published'] = JHTML::_('select.booleanlist', 'published', 'class="inputbox"', $listEdit->published);
         $lists['hidden'] = JHTML::_('select.booleanlist', 'hidden', 'class="inputbox"', $listEdit->hidden);
         $lists_option = lisType::getListOption();
         $lists['list_type'] = listsHTML::aca_radioList($lists_option, 'list_type', 'class="inputbox"', $listEdit->list_type);
         $lists['html_mailings'] = JHTML::_('select.booleanlist', 'html', 'class="inputbox"', $listEdit->html);
         $lists['unsubscribesend'] = JHTML::_('select.booleanlist', "unsubscribesend", 'class="inputbox"', $listEdit->unsubscribesend);
         $lists['footer'] = JHTML::_('select.booleanlist', "footer", 'class="inputbox"', $listEdit->footer);
     } else {
         //joomla 1x
         global $acl, $my;
         $gtree = $acl->get_group_children_tree(null, 'USERS', false);
         $jour[] = mosHTML::makeOption('1', _ACA_AUTO_DAY_CH1);
         $jour[] = mosHTML::makeOption('3', _ACA_AUTO_DAY_CH3);
         $jour[] = mosHTML::makeOption('5', _ACA_AUTO_DAY_CH5);
         $jour[] = mosHTML::makeOption('6', _ACA_AUTO_DAY_CH6);
         $jour[] = mosHTML::makeOption('7', _ACA_AUTO_DAY_CH7);
         $jour[] = mosHTML::makeOption('8', _ACA_AUTO_DAY_CH8);
         $jour[] = mosHTML::makeOption('9', _ACA_AUTO_DAY_CH9);
         $jour[] = mosHTML::makeOption('1800', 'Every 30 minutes');
         $jour[] = mosHTML::makeOption('3600', 'Every hour');
         $auto_option[] = mosHTML::makeOption('0', _ACA_AUTO_OPTION_NONE);
         $auto_option[] = mosHTML::makeOption('1', _ACA_AUTO_OPTION_NEW);
         if ($listEdit->new_letter == 1) {
             $auto_option[] = mosHTML::makeOption('2', _ACA_AUTO_OPTION_ALL);
         }
         $lists['delay_min'] = mosHTML::selectList($jour, 'delay_min', 'class="inputbox" size="1"', 'value', 'text', $listEdit->delay_min);
         $lists['gid'] = mosHTML::selectList($gtree, 'acc_id', 'size="10"', 'value', 'text', $listEdit->acc_id);
         $lists['edit_perms'] = mosHTML::selectList($gtree, 'acc_level', 'size="10"', 'value', 'text', $listEdit->acc_level);
         $lists['auto_add'] = mosHTML::radioList($auto_option, 'auto_add', 'class="inputbox"', $listEdit->auto_add);
         $lists['published'] = mosHTML::yesnoRadioList('published', 'class="inputbox"', $listEdit->published);
         $lists['hidden'] = mosHTML::yesnoRadioList('hidden', 'class="inputbox"', $listEdit->hidden);
         $lists_option = lisType::getListOption();
         $lists['list_type'] = listsHTML::aca_radioList($lists_option, 'list_type', 'class="inputbox"', $listEdit->list_type);
         $lists['html_mailings'] = mosHTML::yesnoRadioList('html', 'class="inputbox"', $listEdit->html);
         $lists['unsubscribesend'] = mosHTML::yesnoRadioList("unsubscribesend", 'class="inputbox"', $listEdit->unsubscribesend);
         $lists['footer'] = mosHTML::yesnoRadioList("footer", 'class="inputbox"', $listEdit->footer);
     }
     //endif
     $my_group = strtolower($acl->get_group_name($listEdit->acc_id, 'ARO'));
     return $lists;
 }
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:69,代码来源:lists.acajoom.html.php

示例11: end_element_param

 function end_element_param()
 {
     $type = mosGetParam($this->paramattrs, 'TYPE', '');
     $name = mosGetParam($this->paramattrs, 'NAME', '');
     $label = T_(mosGetParam($this->paramattrs, 'LABEL', $name));
     $default = T_(mosGetParam($this->paramattrs, 'DEFAULT', ''));
     if ($description = mosGetParam($this->paramattrs, 'DESCRIPTION', '')) {
         $tooltip = mosToolTip(T_($description), $name);
     } else {
         $tooltip = '';
     }
     if (is_object($this->mosParameter)) {
         $mp = $this->mosParameter;
         $value = $mp->get($name, $default);
     } else {
         $value = $default;
     }
     $this->html[] = '<tr>';
     if ($label == '@spacer') {
         $label = '<hr />';
     } elseif ($label) {
         $label .= ':';
     }
     $this->html[] = '<td width="35%" align="right" valign="top">' . $label . '</td>';
     $controlname = $this->name;
     switch ($type) {
         case 'text':
             $size = mosGetParam($this->paramattrs, 'SIZE', 0);
             $controlstring = '<input type="text" name="' . $this->name . '[' . $name . ']" value="' . $value . '" class="text_area" size="' . $size . '" />';
             break;
         case 'list':
             $controlstring = mosHTML::selectList($this->options, $controlname . '[' . $name . ']', 'class="inputbox"', 'value', 'text', $value);
             break;
         case 'radio':
             $controlstring = mosHTML::radioList($this->options, $controlname . '[' . $name . ']', '', $value);
             break;
         case 'imagelist':
             $directory = new mosDirectory(mamboCore::get('mosConfig_absolute_path') . mosGetParam($this->paramattrs, 'DIRECTORY', ''));
             $files = $directory->listFiles('\\.png$|\\.gif$|\\.jpg$|\\.bmp$|\\.ico$');
             $options = array();
             foreach ($files as $file) {
                 $options[] = mosHTML::makeOption($file, $file);
             }
             if (!isset($this->paramattrs['HIDE_NONE'])) {
                 array_unshift($options, mosHTML::makeOption('-1', '- Do not use an image -'));
             }
             if (!isset($this->paramattrs['HIDE_DEFAULT'])) {
                 array_unshift($options, mosHTML::makeOption('', '- Use Default image -'));
             }
             $controlstring = mosHTML::selectList($options, $controlname . '[' . $name . ']', 'class="inputbox"', 'value', 'text', $value);
             break;
         case 'textarea':
             $rows = mosGetParam($this->paramattrs, 'ROWS', 0);
             $cols = mosGetParam($this->paramattrs, 'COLS', 0);
             $value = str_replace('<br />', "\n", $value);
             $controlstring = "<textarea name='params[{$name}]' cols='{$cols}' rows='{$rows}' class='text_area'>{$value}</textarea>";
             break;
         case 'spacer':
             $controlstring = $value ? $value : '<hr />';
             break;
         case 'mos_section':
             $controlstring = $this->_form_mos_section($name, $value, $controlname);
             break;
         case 'mos_category':
             $controlstring = $this->_form_mos_category($name, $value, $controlname);
             break;
         case 'mos_menu':
             $controlstring = $this->_form_mos_menu($name, $value, $controlname);
             break;
         default:
             $controlstring = T_('Handler not defined for type') . '=' . $type;
     }
     //		$this->html[] = "<td>$type</td>";
     $this->html[] = "<td>{$controlstring}</td>";
     $this->html[] = "<td width='10%' align='left' valign='top'>{$tooltip}</td>";
     $this->html[] = '</tr>';
     $this->options = array();
     $this->paramattrs = array();
     $this->paramcount++;
 }
开发者ID:jwest00724,项目名称:mambo,代码行数:80,代码来源:admin.php


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