/**
 * Zikula_View function to display a drop down list of module stylesheets.
 *
 * Available parameters:
 *   - modname   The module name to show the styles for
 *   - assign:   If set, the results are assigned to the corresponding variable instead of printed out
 *   - id:       ID for the control
 *   - name:     Name for the control
 *   - exclude   Comma seperated list of files to exclude (optional)
 *   - selected: Selected value
 *
 * @param array       $params All attributes passed to this function from the template.
 * @param Zikula_View $view   Reference to the Zikula_View object.
 *
 * @return string The value of the last status message posted, or void if no status message exists.
 */
function smarty_function_html_select_modulestylesheets($params, Zikula_View $view)
{
    if (!isset($params['modname'])) {
        $view->trigger_error(__f('Error! in %1$s: the %2$s parameter must be specified.', array('html_select_modulestylesheets', 'modname')));
        return false;
    }
    if (isset($params['exclude'])) {
        $exclude = explode(',', trim($params['exclude']));
        unset($params['exclude']);
    } else {
        $exclude = array();
    }
    $params['values'] = ModUtil::apiFunc('ZikulaAdminModule', 'admin', 'getmodstyles', array('modname' => $params['modname'], 'exclude' => $exclude));
    unset($params['modname']);
    $params['output'] = $params['values'];
    $assign = isset($params['assign']) ? $params['assign'] : null;
    unset($params['assign']);
    require_once $view->_get_plugin_filepath('function', 'html_options');
    $output = smarty_function_html_options($params, $view);
    if (!empty($assign)) {
        $view->assign($assign, $output);
    } else {
        return $output;
    }
}
/**
 * Smarty plugin
 * @package Smarty
 * @subpackage plugins
 */
function smarty_function_htmlReportSort($params, &$smarty)
{
    require_once $smarty->_get_plugin_filepath('function', 'html_options');
    $filter_data = $params['filter_data'];
    $retval .= '<tr onClick="showHelpEntry(\'sort\')">
    <td colspan="2" class="cellLeftEditTableHeader">
        ' . TTi18n::gettext('Sort By:') . '
    </td>
    <td class="cellRightEditTable">
        <select id="columns" name="filter_data[primary_sort]">
            {html_options options=$filter_data.sort_options selected=$filter_data.primary_sort}
            ' . smarty_function_html_options(array('options' => $filter_data['sort_options'], 'selected' => $filter_data['primary_sort']), $smarty) . '            
        </select>
        <select id="columns" name="filter_data[primary_sort_dir]">
            ' . smarty_function_html_options(array('options' => $filter_data['sort_direction_options'], 'selected' => $filter_data['primary_sort_dir']), $smarty) . '            
        </select>
        <b>' . TTi18n::gettext('then:') . '</b>
        <select id="columns" name="filter_data[secondary_sort]">
            ' . smarty_function_html_options(array('options' => $filter_data['sort_options'], 'selected' => $filter_data['secondary_sort']), $smarty) . '            
        </select>
        <select id="columns" name="filter_data[secondary_sort_dir]">
            ' . smarty_function_html_options(array('options' => $filter_data['sort_direction_options'], 'selected' => $filter_data['secondary_sort_dir']), $smarty) . '                        
        </select>

    </td>
</tr>
';
    return $retval;
}
/**
 * Zikula_View function to display a drop down list of languages
 *
 * Available parameters:
 *   - assign:   If set, the results are assigned to the corresponding variable instead of printed out
 *   - name:     Name for the control
 *   - id:       ID for the control
 *   - selected: Selected value
 *   - installed: if set only show languages existing in languages folder
 *   - all:      show dummy entry '_ALL' on top of the list with empty value
 *
 * Example
 *   {html_select_languages name=language selected=en}
 *
 * @param array       $params All attributes passed to this function from the template.
 * @param Zikula_View $view   Reference to the Zikula_View object.
 *
 * @deprecated smarty_function_html_select_locales()
 * @return string The value of the last status message posted, or void if no status message exists.
 */
function smarty_function_html_select_languages($params, Zikula_View $view)
{
    if (!isset($params['name']) || empty($params['name'])) {
        $view->trigger_error(__f('Error! in %1$s: the %2$s parameter must be specified.', array('html_select_languages', 'name')));
        return false;
    }
    require_once $view->_get_plugin_filepath('function', 'html_options');
    $params['output'] = array();
    $params['values'] = array();
    if (isset($params['all']) && $params['all']) {
        $params['values'][] = '';
        $params['output'][] = DataUtil::formatForDisplay(__('All'));
        unset($params['all']);
    }
    if (isset($params['installed']) && $params['installed']) {
        $languagelist = ZLanguage::getInstalledLanguageNames();
        unset($params['installed']);
    } else {
        $languagelist = ZLanguage::languageMap();
    }
    $params['output'] = array_merge($params['output'], DataUtil::formatForDisplay(array_values($languagelist)));
    $params['values'] = array_merge($params['values'], DataUtil::formatForDisplay(array_keys($languagelist)));
    $assign = isset($params['assign']) ? $params['assign'] : null;
    unset($params['assign']);
    $html_result = smarty_function_html_options($params, $view);
    if (!empty($assign)) {
        $view->assign($assign, $html_result);
    } else {
        return $html_result;
    }
}
    function content_55a49e3dcc4dc0_02078110($_smarty_tpl)
    {
        if (!is_callable('smarty_function_html_options')) {
            include 'C:\\wwwroot\\yfcms\\framework\\librarys\\Smarty\\libs\\plugins\\function.html_options.php';
        }
        ?>
<div class="zuobi">
    <a href="#">云扫除</a> > <a href="#">会员中心</a></span>
</div>

<!----------member---------->
<div class="member">
    <div class="member_left">
        <?php 
        echo $_smarty_tpl->getSubTemplate("modules/home_top.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
        ?>

        <div class="member_left_tg">
            <form action="/home/tgSave/" method="post" onsubmit="" id="form_tg" form_tittle="投稿">
                <dt>文章标题:<input size="50" id="t0" name="title" type="text" class="input" maxlength="50" notnull="true" rule="/^[\S][\s\S]{5,49}$/" info="文章标题"/> <span>6-50个字符</span></dt>
                <dt>文章作者:<input size="20" id="t1" name="author" type="text" class="input" maxlength="10" value="<?php 
        echo $_smarty_tpl->tpl_vars['member_info']->value['username'];
        ?>
" notnull="true" rule="/^[\S][\s\S]{1,9}$/" info="文章作者" /> <span>2-10个字符</span></dt>
                <dt>所属栏目:<select class="item-blur" id="catId" name="catId" notnull="true" info="所属栏目">
                            <option value=''>--请选择所属栏目--</option>
                            <?php 
        echo smarty_function_html_options(array('options' => $_smarty_tpl->tpl_vars['artice_cats']->value, 'selected' => 0), $_smarty_tpl);
        ?>

                        </select><span> 必选</span></dt>
                <dt>文章内容: <span>最少50个汉字</span><br><textarea id="content" name="content" class="inputs" notnull="true" rule="/^[\S][\s\S]{50,}$/" info="文章内容"></textarea></dt>
                <dt>验证码:<input id="yzm" size="6" name="yzm" type="text"  class="input" maxlength="4"   notnull="true" rule="/^[0-9a-zA-Z]{4}$/" info="验证码"/><img align="absmiddle" src="/yzm.php" height="25" width="55" onClick="this.src='/yzm.php?' + Math.random();" /></dt>
                <dt><input class="vote_bnt" value="投稿" type="button" id="saveBtn" /></dt>
            </form>

        </div>
    </div>
    <?php 
        echo $_smarty_tpl->getSubTemplate("modules/home_ad.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
        ?>

</div>
<script type="text/javascript">
$(function(){
    $("#saveBtn").click(function(){
        $("#form_tg").ajaxSubmit({
            callback:function(msg){
                if(msg.status==0){
                    alert("投稿成功,审核通过后,积分将送至您的账户");
                    location.reload(false);
                }else{
                    alert(msg.info);
                }
            }
        });
    });
})
</script><?php 
    }
<?php if ($_valid && !is_callable('content_531753d90376e')) {function content_531753d90376e($_smarty_tpl) {?><?php if (!is_callable('smarty_function_html_options')) include 'C:\\AppServ\\www\\eschool\\ThinkPHP\\Extend\\Vendor\\Smarty\\plugins\\function.html_options.php';
?>
<div class="pageContent">
	<form method="post" action="__URL__/insert/navTabId/listtest/callbackType/closeCurrent"  class="pageForm required-validate" 
		onsubmit="return validateCallback(this,dialogAjaxDone);"><<?php ?>?php  //窗体组件采用这个 iframeCallback(this, navTabAjaxDone); ?<?php ?>>
        <div class="pageFormContent" layoutH="60">
            <dl>
                <dt>试卷类型:</dt>
                <dd><?php echo smarty_function_html_options(array('name'=>'tid','options'=>$_smarty_tpl->tpl_vars['myOptions']->value,'selected'=>$_smarty_tpl->tpl_vars['mySelect']->value),$_smarty_tpl);?>
</dd>
            </dl>
			<dl>
				<dt>试卷名:</dt>
				<dd><input type="text" class="required"  style="width:100%" name="title"/></dd>
			</dl>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">提交</button></div></div></li>
				<li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div></li>
			</ul>
		</div>
	</form>
</div>

<?php }} ?>
function smarty_function_charge_names_select($params, &$smarty)
{
    /* return string of html select code for charge selects.
    
        parameter name(string,required): html select name
        parameter type(string,optional): if set, only set this type of charge, should be either of "Internet" or "VoIP"
    
        parameter id(string,optional): set optional dom ID
    
    
        parameter default_var(string,optional): see getSelectedAttrFromSmartyParams comments
        parameter default_request(string,optional):
        parameter default_smarty(string,optional):
        parameter default(string,optional)
        parameter target(string,optional):
    
        
    */
    require_once $smarty->_get_plugin_filepath('function', 'html_options');
    require_once IBSINC . "charge.php";
    $type = isset($params["type"]) ? $params["type"] : null;
    $charge_names = new ListCharges($type);
    list($success, $charge_names) = $charge_names->send();
    if (!$success) {
        $charge_names = array();
    }
    $selected = getSelectedAttrFromSmartyParams($smarty, $params);
    $select_arr = array("selected" => $selected, "output" => $charge_names, "values" => $charge_names, "name" => $params["name"]);
    if (isset($params["id"])) {
        $select_arr["id"] = $params["id"];
    }
    return smarty_function_html_options($select_arr, $smarty);
}
Ejemplo n.º 7
0
/**
 * Zikula_View function to display a drop down list of themes.
 *
 * Available parameters:
 *   - name:     Name for the control (optional) if not present then only the option tags are output
 *   - id:       ID for the control
 *   - selected: Selected value
 *   - filter:   Filter themes use (possible values: ThemeUtil::FILTER_ALL (default) ThemeUtil::FILTER_USER, ThemeUtil::FILTER_SYSTEM, ThemeUtil::FILTER_ADMIN
 *   - state:    Filter themes by state (possible values: ThemeUtil::STATE_ALL (default), ThemeUtil::STATE_ACTIVE, ThemeUtil::STATE_INACTIVE
 *   - type:     Filter themes by type (possible values: ThemeUtil::TYPE_ALL (default), ThemeUtil::TYPE_XANTHIA3
 *   - assign:   If set, the results are assigned to the corresponding variable instead of printed out
 *
 * Examples
 *
 *     {html_select_themes name=mytheme selected=mythemechoice}
 *
 *     <select name="mytheme">
 *         <option value="">{ml name=_DEFAULT}</option>
 *         {html_select_themes selected=$mythemechoice}
 *     </select>
 *
 * @param array       $params All attributes passed to this function from the template.
 * @param Zikula_View $view   Reference to the Zikula_View object.
 *
 * @return string The value of the last status message posted, or void if no status message exists.
 */
function smarty_function_html_select_themes($params, Zikula_View $view)
{
    if (!isset($params['filter']) || !defined($params['filter'])) {
        $filter = ThemeUtil::FILTER_ALL;
    } else {
        $filter = constant($params['filter']);
    }
    if (!isset($params['state']) || !defined($params['state'])) {
        $state = ThemeUtil::STATE_ALL;
    } else {
        $state = constant($params['state']);
    }
    if (!isset($params['type']) || !defined($params['type'])) {
        $type = ThemeUtil::TYPE_ALL;
    } else {
        $type = constant($params['type']);
    }
    $themelist = array();
    $themes = ThemeUtil::getAllThemes($filter, $state, $type);
    if (!empty($themes)) {
        foreach ($themes as $theme) {
            $themelist[$theme['name']] = $theme['displayname'];
        }
    }
    natcasesort($themelist);
    require_once $view->_get_plugin_filepath('function', 'html_options');
    $output = smarty_function_html_options(array('options' => $themelist, 'selected' => isset($params['selected']) ? $params['selected'] : null, 'name' => isset($params['name']) ? $params['name'] : null, 'id' => isset($params['id']) ? $params['id'] : null), $view);
    if (isset($params['assign'])) {
        $view->assign($params['assign'], $output);
    } else {
        return $output;
    }
}
/**
 * Smarty {html_select_duration} function plugin
 *
 * Type:     function<br>
 * Name:     html_select_duration<br>
 * params: prefix, default_unit(key word or value in secs), default (nb of units), default_value (duration in secs)
 * Purpose:  Prints the dropdowns for duration selection
 */
function smarty_function_html_select_duration($params, $smarty)
{
    global $smarty;
    $smarty->loadPlugin('smarty_function_html_options');
    $html_result = '';
    $default = array('prefix' => 'Duration_', 'default_unit' => 'week', 'default' => '', 'default_value' => '');
    $params = array_merge($default, $params);
    $values = array(31536000, 2628000, 604800, 86400, 3600, 60);
    $output = array(tra('Year'), tra('Month'), tra('Week'), tra('Day'), tra('Hour'), tra('Minute'));
    $defs = array('year', 'month', 'week', 'day', 'hour', 'minute');
    if (!empty($params['default_value'])) {
        foreach ($values as $selected) {
            if ($params['default_value'] >= $selected) {
                $params['default'] = round($params['default_value'] / $selected);
                break;
            }
        }
    } elseif (($key = array_search($params['default_unit'], $defs)) !== false) {
        $selected = $values[$key];
    } elseif (in_array($params['default_unit'], $values)) {
        $selected = $params['default_unit'];
    } else {
        $selected = 604800;
    }
    $html_result .= '<input name="' . $params['prefix'] . '" type="text" size="5" value="' . $params['default'] . '" />';
    if (strstr($params['prefix'], '[]')) {
        $prefix = str_replace('[]', '_unit[]', $params['prefix']);
    } else {
        $prefix = $params['prefix'] . '_unit';
    }
    $html_result .= '<select name="' . $prefix . '">';
    $html_result .= smarty_function_html_options(array('values' => $values, 'output' => $output, 'selected' => $selected), $smarty);
    $html_result .= '</select>';
    return $html_result;
}
Ejemplo n.º 9
0
function smarty_function_op($params, &$smarty)
{
    /* return a select html code of operands for a type of class 
        parameter class (required,string): can be on of "ltgteq", "likestr"
        parameter name (required,string): name of the select
        parameter selected (optional,string): optionally set the selected value of to the request value of this 
    					    param if set
        parameter id (optional,string): dom id
    */
    require_once $smarty->_get_plugin_filepath('function', 'html_options');
    $class = $params["class"];
    if ($class == "ltgteq") {
        $face = array("=", ">", "<", ">=", "<=");
        $val = array("=", ">", "<", ">=", "<=");
    } else {
        if ($class == "likestr") {
            $val = array("equals", "like", "ilike", "starts_with");
            $face = $val;
        }
    }
    $selected = (isset($params["selected"]) and isset($_REQUEST[$params["selected"]])) ? $_REQUEST[$params["selected"]] : "";
    $select_arr = array("output" => $face, "values" => $val, "name" => $params["name"], "selected" => $selected);
    if (isset($params["id"])) {
        $select_arr["id"] = $params["id"];
    }
    return smarty_function_html_options($select_arr, $smarty);
}
    function content_55470f461df114_14450491($_smarty_tpl)
    {
        if (!is_callable('smarty_function_html_options')) {
            require_once '/home/ubuntu/workspace/smarty/libs/plugins/function.html_options.php';
        }
        $_smarty_tpl->properties['nocache_hash'] = '161678830555470f461a1277_30219648';
        ?>
<!DOCTYPE html>
<html>
    <head>
        <title>Submit a new segment</title>
    </head>
    
    <body>
        <form action="createSegment.php" method="GET">
            Title: <input type="text" name="name"><br>
            Artist: <input type="text" name="author"><br>
            Album: <input type="text" name="album"><br>
            <select name="category">
                <?php 
        echo smarty_function_html_options(array('values' => $_smarty_tpl->tpl_vars['id']->value, 'output' => $_smarty_tpl->tpl_vars['categories']->value), $_smarty_tpl);
        ?>

            </select><br>
            <input type="checkbox" name="can_can"> CC
            <input type="submit">
        </form>
    </body>
</html><?php 
    }
function smarty_function_separatorSelect($params, &$smarty)
{
    /* return string of html select code for seperator selects.
    
        parameter name(string,required): html select name
        parameter id(string,optional): set optional dom ID
    
        parameter default_var(string,optional): see getSelectedAttrFromSmartyParams comments
        parameter default_request(string,optional):
        parameter default_smarty(string,optional):
        parameter default(string,optional)
        parameter target(string,optional):
    
        
    */
    require_once $smarty->_get_plugin_filepath('function', 'html_options');
    $selected = getSelectedAttrFromSmartyParams($smarty, $params);
    $seps = array(",", ";", "TAB");
    $seps_out = array("Comma", "Semi Colon", "Tab");
    $select_arr = array("selected" => $selected, "output" => $seps_out, "values" => $seps, "name" => $params["name"]);
    if (isset($params["id"])) {
        $select_arr["id"] = $params["id"];
    }
    return smarty_function_html_options($select_arr, $smarty);
}
    function content_561be8d127c176_03375200($_smarty_tpl)
    {
        if (!is_callable('smarty_function_html_options')) {
            include '/var/www/contraluz-cirer/data/smarty/libs/plugins/function.html_options.php';
        }
        ?>
<div class="contact">
    <h3><?php 
        echo $_smarty_tpl->tpl_vars['nombreSubpagina']->value;
        ?>
</h3>
    <?php 
        if ($_smarty_tpl->tpl_vars['mensaje']->value != '') {
            ?>
        <div class="footer-text">
            <div class="container">
                <h3><?php 
            echo $_smarty_tpl->tpl_vars['mensaje']->value;
            ?>
</h3>
            </div>
        </div>	


    <?php 
        }
        ?>
    <div class="contact-form">
        <form method="POST" action="pacientes.php" id="formulario" name="formulario"/>
            <input type="hidden" id="id" name="id" value="<?php 
        echo $_smarty_tpl->tpl_vars['id']->value;
        ?>
"/>
            <input type="hidden" id="metodo" name="metodo" value="<?php 
        echo $_smarty_tpl->tpl_vars['metodo']->value;
        ?>
"/>
            <label>Nombre</label>
            <input type="text" value="<?php 
        echo $_smarty_tpl->tpl_vars['nombre']->value;
        ?>
" id="nombre" name="nombre"/>
            <label>Apellido</label>
            <input type="text" value="<?php 
        echo $_smarty_tpl->tpl_vars['apellido']->value;
        ?>
" id="apellido" name="apellido"/>
            <label>Obra social</label>
            <select name=obrasocial>
                <?php 
        echo smarty_function_html_options(array('options' => $_smarty_tpl->tpl_vars['obrassociales']->value, 'selected' => $_smarty_tpl->tpl_vars['obrasocial']->value), $_smarty_tpl);
        ?>

            </select>
            <input type="submit" value="Guardar Datos"/>
        </form>
    </div>
</div>
<?php 
    }
 function content_55d7ea6ddc9ac6_06648974($_smarty_tpl)
 {
     if (!is_callable('smarty_function_html_options')) {
         include '/www/wwwroot/www.fzgxw.com/system/libs/smarty/plugins/function.html_options.php';
     }
     echo smarty_function_html_options(array('options' => $_smarty_tpl->tpl_vars['data']->value['options'], 'selected' => $_smarty_tpl->tpl_vars['data']->value['value']), $_smarty_tpl);
 }
    function content_556e5cf90fb4e($_smarty_tpl)
    {
        if (!is_callable('smarty_function_html_options')) {
            include 'D:\\files\\wamp\\www\\shop\\ThinkPHP\\Library\\Vendor\\Smarty\\plugins\\function.html_options.php';
        }
        ?>
<!doctype html>
<html>
	<head>
		<meta charset='utf-8'>
		<title>商城管理系统</title>
		<link rel="stylesheet" type="text/css" href="<?php 
        echo @__ROOT__;
        ?>
/Public/css/admin.css">
	</head>
	<body class="bgimg">

		<form action="<?php 
        echo @__CONTROLLER__;
        ?>
/insert" method="post">
		<ul class="exec">
			<li>
				<span class='add-text'>权限名称</span>
				<input type='text' name='name' placeholder='请输入权限名' value="" />
				<span class='error-text'></span>
			</li>
			<li>
				<span class='add-text'>权限父级</span>
				<select name="pid">
					<option value="0">&nbsp;请选择权限&nbsp;</option>
					<?php 
        echo smarty_function_html_options(array('options' => $_smarty_tpl->tpl_vars['authinfo']->value), $_smarty_tpl);
        ?>

				</select>
				<span class='error-text'></span>
			</li>
			<li>
				<span class='add-text'>权限控制器</span>
				<input type='text' name='cont' placeholder='请输入权限控制器' value="" />
				<span class='error-text'></span>
			</li>
			<li>
				<span class='add-text'>权限操作方法</span>
				<input type='text' name='action' placeholder='请输入权限操作方法' value="" />
				<span class='error-text'></span>
			</li>
			<li>
				<span class='add-text'></span>
				<input type='submit' class='submitbtn' value="添加权限" />
			</li>
		</ul>
		</form>
	</body>
</html><?php 
    }
    function content_5666e270e1d121_13962020($_smarty_tpl)
    {
        if (!is_callable('smarty_function_html_options')) {
            require_once 'D:/Yandex.Disk/Projects/bikecms/smarty/libs/plugins\\function.html_options.php';
        }
        ?>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<form method="post" action="/Article/Add">
		<table>
				<thead>
					<tr>
						<th>Name</th>
						<th>Content</th>
						<th>Date</th>
						<th>Category</th>
						<th>Author</th>
					</tr>
				</thead>
					<tr>
						<td>
							<input type="text" name="name">
						</td>
						<td>
							<textarea name="content"></textarea>
						</td>
						<td>
							<input type="date" name="pubdate">
						</td>
						<td>
							<?php 
        echo smarty_function_html_options(array('name' => "catId", 'options' => $_smarty_tpl->tpl_vars['cats']->value, 'selected' => $_smarty_tpl->tpl_vars['catId']->value), $_smarty_tpl);
        ?>

						</td>
						<td>
							<?php 
        echo smarty_function_html_options(array('name' => "authId", 'options' => $_smarty_tpl->tpl_vars['authors']->value, 'selected' => $_smarty_tpl->tpl_vars['authId']->value), $_smarty_tpl);
        ?>

						</td>
					</tr>
					<tr>
						<td>
							<input type="submit" value="Сохранить">
						</td>
					</tr>
			</table>
		</form>
	</body>
</html>
<?php 
    }
    function content_569cf7ca383257_95502232($_smarty_tpl)
    {
        if (!is_callable('smarty_function_html_table')) {
            require_once 'D:\\www\\demo\\smart_demo\\smarty\\plugins\\function.html_table.php';
        }
        if (!is_callable('smarty_function_html_checkboxes')) {
            require_once 'D:\\www\\demo\\smart_demo\\smarty\\plugins\\function.html_checkboxes.php';
        }
        if (!is_callable('smarty_function_html_options')) {
            require_once 'D:\\www\\demo\\smart_demo\\smarty\\plugins\\function.html_options.php';
        }
        if (!is_callable('smarty_function_html_radios')) {
            require_once 'D:\\www\\demo\\smart_demo\\smarty\\plugins\\function.html_radios.php';
        }
        ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Insert title here</title>
        <style type='text/css'>
            #red {
                color: red;
                font-size: 14px;
            }
        </style>
    </head>
    <body>
        <h1>html标签演示</h1>
        <?php 
        echo smarty_function_html_table(array('loop' => $_smarty_tpl->tpl_vars['lamp']->value, 'cols' => '1', 'table_attr' => 'style="border:1px #ccc solid;"'), $_smarty_tpl);
        ?>

		<h2>复选框</h2>
        <div id='red'>
            <?php 
        echo smarty_function_html_checkboxes(array('name' => 'hobby', 'values' => $_smarty_tpl->tpl_vars['values']->value, 'checked' => $_smarty_tpl->tpl_vars['checked']->value, 'output' => $_smarty_tpl->tpl_vars['output']->value), $_smarty_tpl);
        ?>

        </div>
        <h2>下拉选项</h2>
        <select name='hobby'>
            <?php 
        echo smarty_function_html_options(array('values' => $_smarty_tpl->tpl_vars['values']->value, 'selected' => $_smarty_tpl->tpl_vars['checked']->value, 'output' => $_smarty_tpl->tpl_vars['output']->value), $_smarty_tpl);
        ?>

        </select>
        <h2>单选框</h2>
        <?php 
        echo smarty_function_html_radios(array('name' => 'hobby', 'values' => $_smarty_tpl->tpl_vars['values']->value, 'checked' => '1', 'output' => $_smarty_tpl->tpl_vars['output']->value, 'separator' => '
        <br>
        '), $_smarty_tpl);
        ?>

    </body>
</html>
<?php 
    }
Ejemplo n.º 17
0
function smarty_function_reportRPP($params, &$smarty)
{
    /*return html select of Result Per Page selection
    */
    require_once $smarty->_get_plugin_filepath('function', 'html_options');
    $rpps = array(20, 30, 50, 100, 500, 1000, 2000);
    $select_arr = array("output" => $rpps, "values" => $rpps, "name" => "rpp", "selected" => requestVal("rpp"));
    return smarty_function_html_options($select_arr, $smarty);
}
Ejemplo n.º 18
0
/**
 * Template plugin to display timezone list.
 *
 * Example {timezoneselect selected='Timezone'}.
 *
 * @param array       $params All attributes passed to this function from the template.
 * @param Zikula_View $view   The Zikula_View.
 *
 * @see   function.timezoneselect.php::smarty_function_timezoneselect().
 *
 * @return string The results of the module function.
 */
function smarty_function_timezoneselect($params, Zikula_View $view)
{
    require_once $view->_get_plugin_filepath('function', 'html_options');
    $timezones = DateUtil::getTimezones();
    if (!isset($params['selected']) || empty($params['selected']) || !isset($timezones[$params['selected']])) {
        $params['selected'] = System::getVar('timezone_offset');
    }
    return smarty_function_html_options(array('options' => $timezones, 'selected' => $params['selected'], 'print_result' => false), $view);
}
<?php if ($_valid && !is_callable('content_52df87dd37cd9')) {function content_52df87dd37cd9($_smarty_tpl) {?><?php if (!is_callable('smarty_function_html_options')) include 'D:\\web\\1116\\ThinkPHP\\Library\\Vendor\\Smarty\\plugins\\function.html_options.php';
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <title>修改管理员信息</title>
        <meta http-equiv="content-type" content="text/html;charset=utf-8">
        <link href="<?php echo @ADMIN_CSS_URL;?>
mine.css" type="text/css" rel="stylesheet">
    </head>

    <body>

        <div class="div_head">
            <span>
                <span style="float:left">当前位置是:管理员管理-》修改管理员信息</span>
                <span style="float:right;margin-right: 8px;font-weight: bold">
                    <a style="text-decoration: none" href="<?php echo @__MODULE__;?>
/Goods/showlist">【返回】</a>
                </span>
            </span>
        </div>
        <div></div>

        <div style="font-size: 13px;margin: 10px 5px">
            <form action="<?php echo @__SELF__;?>
" method="post" enctype="multipart/form-data">
            <input type='hidden' name='mg_id' value='<?php echo $_smarty_tpl->tpl_vars['mg_id']->value;?>
' />
            <table border="1" width="100%" class="table_a">
                <tr>
                    <td>管理员名称</td>
                    <td><input type="text" name="mg_name" value='<?php echo $_smarty_tpl->tpl_vars['info']->value['mg_name'];?>
'/></td>
                </tr>
                <tr>
                    <td>角色</td>
                    <td>
                        <select name='mg_role_id'>
                            <option value='0'>请选择</option>
                            <?php echo smarty_function_html_options(array('options'=>$_smarty_tpl->tpl_vars['rinfo']->value,'selected'=>$_smarty_tpl->tpl_vars['role_id']->value),$_smarty_tpl);?>

                        </select>
                    </td>
                </tr>
                
                <tr>
                    <td colspan="2" align="center">
                        <input type="submit" value="添加">
                    </td>
                </tr>  
            </table>
            </form>
        </div>
    </body>
</html>
<?php }} ?>
    function content_5601afd1b09178_77142024($_smarty_tpl)
    {
        if (!is_callable('smarty_function_html_options')) {
            require_once '/home/ubuntu/workspace/smarty/libs/plugins/function.html_options.php';
        }
        $_smarty_tpl->properties['nocache_hash'] = '18305276715601afd1af3968_24301819';
        ?>
<!DOCTYPE html>
<html>
    <head>
        <title> </title>
        
        <!-- Script for adding form fields -->
        <?php 
        echo '<script';
        ?>
 src="js/dynamic_form.js"><?php 
        echo '</script';
        ?>
>
    </head>
    <body>
        <form id="logsheet" action="save-logsheet.php" method="post">
            <div>
                First Name: <input type="text" name="first_name"><br />
                Last Name: <input type="text" name="last_name"><br />
                Program: <?php 
        echo smarty_function_html_options(array('name' => "program", 'options' => $_smarty_tpl->tpl_vars['programs']->value), $_smarty_tpl);
        ?>
<br />
                <input type="checkbox" name="prerecord" value="prerecord">Pre-recorded<br />
                Start Time: <input type="datetime-local" name="start_time"><br />
                End Time: <input type="datetime-local" name="end_time"><br />
                Comment: <input type="text" name="comment"><br />
            </div>
            
            <hr>
            
            <div>
                Name: <input type="text" name="name[]">
                Author: <input type="text" name="author[]">
                Category: <?php 
        echo smarty_function_html_options(array('name' => "category[]", 'options' => $_smarty_tpl->tpl_vars['categories']->value), $_smarty_tpl);
        ?>

                <a href="#" onClick="cloneRow(event)">add</a>
                <a href="#" onClick="removeRow(event)">remove</a>
                <br>
            </div>
            
            <input type="submit" value="Continue">
        </form>
    </body>
</html><?php 
    }
/**
 * Campsite interview_edit function plugin
 *
 * Type:     function
 * Name:     camp_edit
 * Purpose:  
 *
 * @param array
 *     $p_params the date in unixtime format from $smarty.now
 * @param object
 *     $p_smarty the date format wanted
 *
 * @return
 *     string the html form element
 *     string empty if something is wrong
 */
function smarty_function_interviewitem_edit($p_params, &$p_smarty)
{
    global $g_ado_db;

    require_once $p_smarty->_get_plugin_filepath('shared','escape_special_chars');

    // gets the context variable
    $campsite = $p_smarty->get_template_vars('gimme');
    $html = '';

    if (!isset($p_params['attribute'])) {
        return $html;
    }
    if (!isset($p_params['html_code']) || empty($p_params['html_code'])) {
        $p_params['html_code'] = '';
    }

    $object = strtolower($p_params['object']);
    $attribute = strtolower($p_params['attribute']);

    // gets the attribute value from the context
    $attrValue = $campsite->interviewitem->$attribute;

    $txtAreaFields = array('question', 'answer');
    $selectFields = array('status');

    if (in_array($attribute, $txtAreaFields)) {
        $html = '<textarea name="f_interviewitem_'.$attribute.'" cols="40" rows="4" '.$p_params['html_code'].'>';
        $html .= isset($_REQUEST["f_interviewitem_$attribute"]) ? 
            smarty_function_escape_special_chars($_REQUEST["f_interviewitem_$attribute"]) : 
            smarty_function_escape_special_chars($attrValue);
        $html .= '</textarea>';
            
    } elseif (in_array($attribute, $selectFields)) {
        require_once $p_smarty->_get_plugin_filepath('function','html_options');
        
        switch ($attribute) {            
            case 'status':
                $options = array('draft' => 'draft', 'pending' => 'pending', 'published' => 'published', 'rejected' => 'rejected');   

                $html = '<select name="f_interviewitem_status" id="interview_"'.$attribute.'>';
                $html.= smarty_function_html_options(array(
                    'options' => $options,
                    'selected' => isset($_REQUEST['f_interview_status']) ? $_REQUEST['f_interview_status']: $attrValue,
                    'print_result' => false),
                    $p_smarty
                );
                $html .= '</select>';
            break;
        } 
    }
    
    return $html;
} // fn smarty_function_interview_edit
    function content_557a33bc362c0($_smarty_tpl)
    {
        if (!is_callable('smarty_function_html_options')) {
            include 'D:\\files\\wamp\\www\\shop\\ThinkPHP\\Library\\Vendor\\Smarty\\plugins\\function.html_options.php';
        }
        ?>
<!doctype html>
<html>
	<head>
		<meta charset='utf-8'>
		<title>商城管理系统</title>
		<link rel="stylesheet" type="text/css" href="<?php 
        echo @__ROOT__;
        ?>
/Public/css/admin.css">
	</head>
	<body class="bgimg">

		<form action="<?php 
        echo @__CONTROLLER__;
        ?>
/insert" method="post" enctype="multipart/form-data">
		<ul class="exec">
		    <li>
				<span class='add-text'>标题</span>
				<input type='text' name='title' placeholder='请输入标题' />
			</li>
			<li>
				<span class='add-text'>所属分类</span>
				<select name='pid'>
					<?php 
        echo smarty_function_html_options(array('options' => $_smarty_tpl->tpl_vars['cateinfo']->value), $_smarty_tpl);
        ?>

				</select>
			</li>
			<li style="height:200px;">
				<span class='add-text' style='vertical-align:middle'>内容</span>
				<textarea cols="60" rows="10" name="content"></textarea>
			</li>
			<li>
				<span class='add-text'>上传图片</span>
				<input type='file' name='image'/>
			</li>
			<li>
				<span class='add-text'></span>
				<input type='submit' class='submitbtn' value="添加文章" />
			</li>
		</ul>
		</form>
	</body>
</html><?php 
    }
Ejemplo n.º 23
0
/**
 * Smarty {html_dboptions} function plugin
 *
 * Type:     function<br>
 * Name:     html_dboptions<br>
 * Input:<br>
 *           - name       (optional) - string default "select"
 *			 - tablename  (required 
 *           - selected   (optional) - string default not set
 * Purpose:  Pulls a list of options from the database and prints the list of <option> tags generated from
 *           the passed parameters
 * @param array
 * @param Smarty
 * @return string
 * @uses smarty_function_html_options()
 */
function smarty_function_html_dboptions($params, &$smarty)
{
    require_once $smarty->_get_plugin_filepath('function', 'html_options');
    $tableName = $params['tablename'];
    if (isset($params['namefield'])) {
        $nameField = $params['namefield'];
    } else {
        $nameField = 'name';
    }
    $params['options'] = SqlFetchSimpleMap("SELECT id, :nameField AS name FROM :tableName:identifier order by id", 'id', 'name', array('nameField:identifier' => $nameField, 'tableName' => $tableName));
    return smarty_function_html_options($params, $smarty);
}
    function content_56619aea36b778_11746947($_smarty_tpl)
    {
        if (!is_callable('smarty_function_html_options')) {
            require_once 'C:\\xampp\\htdocs\\smarty\\libs\\plugins\\function.html_options.php';
        }
        $_smarty_tpl->properties['nocache_hash'] = '2374956619aea33c960_00759148';
        ?>
<select name=user>
    <?php 
        echo smarty_function_html_options(array('values' => $_smarty_tpl->tpl_vars['id']->value, 'output' => $_smarty_tpl->tpl_vars['names']->value, 'selected' => "5"), $_smarty_tpl);
        ?>

</select><?php 
    }
function smarty_function_group_names_select($params, &$smarty)
{
    /* parameter name(string,required): html select name
    
        parameter default_var(string,optional): see getSelectedAttrFromSmartyParams comments
        parameter default_request(string,optional):
        parameter default_smarty(string,optional):
        parameter default(string,optional)
        parameter target(string,optional):
    
        return string of html select code for group selects.
    */
    $selected = getSelectedAttrFromSmartyParams($smarty, $params);
    require_once $smarty->_get_plugin_filepath('function', 'html_options');
    require_once IBSINC . "group_face.php";
    $groups = getGroupNames($smarty);
    return smarty_function_html_options(array("selected" => $selected, "output" => $groups, "values" => $groups, "name" => $params["name"]), $smarty);
}
    function content_5778b6e559b322_01914293($_smarty_tpl)
    {
        if (!is_callable('smarty_function_html_options')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.html_options.php';
        }
        ?>
<div  class="d1" >
  <div class="fldTitle"><?php 
        echo $_smarty_tpl->getSubTemplate('fields/req.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
        echo $_smarty_tpl->tpl_vars['title']->value;
        ?>
</div>
    <select name="<?php 
        echo $_smarty_tpl->tpl_vars['name']->value;
        ?>
" class="fieldSelectInput" style="<?php 
        if ($_smarty_tpl->tpl_vars['width']->value) {
            ?>
width:<?php 
            echo $_smarty_tpl->tpl_vars['width']->value;
            ?>
;<?php 
        }
        ?>
"
    <?php 
        if ($_smarty_tpl->tpl_vars['disabled']->value) {
            ?>
disabled readonly<?php 
        }
        ?>
    >
		<?php 
        echo smarty_function_html_options(array('options' => $_smarty_tpl->tpl_vars['selOptions']->value, 'selected' => $_smarty_tpl->tpl_vars['value']->value), $_smarty_tpl);
        ?>

    </select>
  <?php 
        echo $_smarty_tpl->getSubTemplate('fields/note.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
        ?>

</div>
<?php 
    }
/**
 * Smarty plugin
 * @package Smarty
 * @subpackage plugins
 */
function smarty_function_htmlReportGroup($params, &$smarty)
{
    require_once $smarty->_get_plugin_filepath('function', 'html_options');
    $filter_data = $params['filter_data'];
    if (isset($params['total'])) {
        $total = $params['total'];
    } else {
        $total = 2;
    }
    $retval .= '<tr onClick="showHelpEntry(\'group_by\')">
    <td colspan="2" class="cellLeftEditTableHeader">
        ' . TTi18n::gettext('Group By:') . '
    </td>
    <td class="cellRightEditTable">
        <select id="columns" name="filter_data[primary_group_by]">
            ' . smarty_function_html_options(array('options' => $filter_data['group_by_options'], 'selected' => $filter_data['primary_group_by']), $smarty) . '
        </select>';
    if ($total >= 2) {
        $retval .= '
        <b>' . TTi18n::gettext('then:') . '</b>
        <select id="columns" name="filter_data[secondary_group_by]">
            ' . smarty_function_html_options(array('options' => $filter_data['group_by_options'], 'selected' => $filter_data['secondary_group_by']), $smarty) . '
        </select>';
    }
    if ($total >= 3) {
        $retval .= '
        <br>
        <select id="columns" name="filter_data[tertiary_group_by]">
            ' . smarty_function_html_options(array('options' => $filter_data['group_by_options'], 'selected' => $filter_data['tertiary_group_by']), $smarty) . '
        </select>';
    }
    if ($total >= 4) {
        $retval .= '
        <b>' . TTi18n::gettext('then:') . '</b>
        <select id="columns" name="filter_data[quaternary_group_by]">
            ' . smarty_function_html_options(array('options' => $filter_data['group_by_options'], 'selected' => $filter_data['quaternary_group_by']), $smarty) . '
        </select>';
    }
    $retval .= '
    </td>
</tr>
';
    return $retval;
}
    function content_55d5c52c1f4c73_26393234($_smarty_tpl)
    {
        if (!is_callable('smarty_function_html_options')) {
            include '/home/coriolan/public_html/lead/app/lib/other/smarty/plugins/function.html_options.php';
        }
        if (!is_callable('smarty_function_html_checkboxes')) {
            include '/home/coriolan/public_html/lead/app/lib/other/smarty/plugins/function.html_checkboxes.php';
        }
        if (!$_smarty_tpl->tpl_vars['order_status_descr']->value) {
            ?>
    <?php 
            if (!$_smarty_tpl->tpl_vars['status_type']->value) {
                $_smarty_tpl->tpl_vars["status_type"] = new Smarty_variable(@constant('STATUSES_ORDER'), null, 0);
            }
            ?>
    <?php 
            $_smarty_tpl->tpl_vars["order_status_descr"] = new Smarty_variable(fn_get_simple_statuses($_smarty_tpl->tpl_vars['status_type']->value), null, 0);
        }
        ?>

<?php 
        if ($_smarty_tpl->tpl_vars['display']->value == "view") {
            echo htmlspecialchars($_smarty_tpl->tpl_vars['order_status_descr']->value[$_smarty_tpl->tpl_vars['status']->value], ENT_QUOTES, 'UTF-8');
        } elseif ($_smarty_tpl->tpl_vars['display']->value == "select") {
            echo smarty_function_html_options(array('name' => $_smarty_tpl->tpl_vars['name']->value, 'options' => $_smarty_tpl->tpl_vars['order_status_descr']->value, 'selected' => $_smarty_tpl->tpl_vars['status']->value, 'id' => $_smarty_tpl->tpl_vars['select_id']->value), $_smarty_tpl);
        } elseif ($_smarty_tpl->tpl_vars['display']->value == "checkboxes") {
            echo smarty_function_html_checkboxes(array('name' => $_smarty_tpl->tpl_vars['name']->value, 'options' => $_smarty_tpl->tpl_vars['order_status_descr']->value, 'selected' => $_smarty_tpl->tpl_vars['status']->value, 'columns' => ($tmp = @$_smarty_tpl->tpl_vars['columns']->value) === null || $tmp === '' ? 4 : $tmp, 'assign' => '_html_checkboxes', 'labels' => false), $_smarty_tpl);
            $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['item']->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['_html_checkboxes']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
                $_smarty_tpl->tpl_vars['item']->_loop = true;
                ?>
<label><?php 
                echo $_smarty_tpl->tpl_vars['item']->value;
                ?>
</label><?php 
            }
        }
    }
Ejemplo n.º 29
0
function createSelect(&$params, &$smarty)
{
    require_once $smarty->_get_plugin_filepath('function', 'html_options');
    $new_params = array("default" => "Days");
    if (isset($params["default_request"])) {
        $new_params["default_request"] = $params["default_request"] . "_unit";
    }
    if (isset($params["default_var"])) {
        $new_params["default_var"] = $params["default_var"] . "_unit";
    }
    if (isset($params["target"])) {
        $new_params["target"] = $params["target"];
    }
    $select_default = getSelectedAttrFromSmartyParams($smarty, $new_params);
    $date_units = array("Minutes", "Hours", "Days", "Months", "Years", "Gregorian", "Jalali");
    $date_values = array("minutes", "hours", "days", "months", "years", "gregorian", "jalali");
    $select_arr = array("output" => $date_units, "values" => $date_values, "name" => $params["name"] . "_unit", "selected" => $select_default, "id" => "{$params["name"]}_select", "onClick" => "absDateSelectChanged(this,'{$params["name"]}_calendar')");
    return smarty_function_html_options($select_arr, $smarty);
}
/**
 * Smarty {oos_get_country_list} function plugin
 *
 * Type:     function
 * Name:     oos_get_country_list
 * Version:  1.0
 * -------------------------------------------------------------
 */
function smarty_function_oos_get_country_list($params, &$smarty)
{
    global $aLang;
    MyOOS_CoreApi::requireOnce('lib/smarty/libs/plugins/shared.escape_special_chars.php');
    require_once $smarty->_get_plugin_filepath('function', 'html_options');
    /* Set the name of the <select> tag. */
    $name = 'country';
    /* <select size>'s of <select> tag.
       If not set, uses default dropdown. */
    $size = null;
    /* Unparsed attributes common to *ALL* the <select>/<input> tags.
       An example might be in the template: extra ='class ="foo"'. */
    $extra = null;
    foreach ($params as $_key => $_val) {
        ${$_key} = smarty_function_escape_special_chars($_val);
    }
    $countries = array();
    $countries_names = array();
    $countries_values = array();
    $countries = oos_get_countries();
    $countries_values[] = '';
    $countries_names[] = $aLang['pull_down_default'];
    $nArrayCountCountries = count($countries);
    for ($i = 0, $n = $nArrayCountCountries; $i < $n; $i++) {
        $countries_values[] = $countries[$i]['countries_id'];
        $countries_names[] = $countries[$i]['countries_name'];
    }
    $html_result .= '<select name="' . $name . '" id="entry_' . $name . '"';
    if (null !== $class) {
        $html_result .= ' class="' . $class . '"';
    }
    if (null !== $size) {
        $html_result .= ' size="' . $size . '"';
    }
    if (null !== $extra) {
        $html_result .= ' ' . $extra;
    }
    $html_result .= '>' . "\n";
    $html_result .= smarty_function_html_options(array('output' => $countries_names, 'values' => $countries_values, 'selected' => $selected, 'print_result' => false), $smarty);
    $html_result .= '</select>';
    print $html_result;
}