Пример #1
0
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">描述</label>
					<div class="col-sm-9 col-xs-12">
						<textarea style="height: 80px;" class="form-control" name="description" placeholder="如:该公众号主要用于......" ><?php 
    echo $account['description'];
    ?>
</textarea>
						<span class="help-block">用于说明此公众号的功能及用途,越详细越能打动用户。</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">地区</label>
					<div class="col-sm-9 col-xs-12">
                                            <?php 
    echo tpl_form_field_district('dis', array('province' => '贵州省', 'city' => '遵义市', 'district' => ''));
    ?>
                                            <span class="help-block">用于说明此公众号所在的省市。</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">行业</label>
					<div class="col-sm-9 col-xs-12">
                                            <?php 
    echo tpl_form_field_industry('industry', '', '');
    ?>
						<span class="help-block">用于说明此公众号的类别,对用户精准营销。</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">腾讯或微信认证</label>
Пример #2
0
function tpl_fans_form($field, $value = '')
{
    switch ($field) {
        case 'avatar':
            $avatar_url = '../attachment/images/global/avatars/';
            $html = '';
            if (!defined('TPL_INIT_AVATAR')) {
                $html .= '
				<script type="text/javascript">
					function showAvatarDialog(elm, opts) {
						require(["util"], function(util){
							var btn = $(elm);
							var ipt = btn.parent().prev();
							var img = ipt.parent().next().children();
							var content = \'<div class="avatar-browser clearfix">\';
							for(var i = 1; i <= 12; i++) {
								content += 
									\'<div title="头像\' + i + \'" class="thumbnail">\' +
										\'<em><img src="' . $avatar_url . 'avatar_\' + i + \'.jpg" class="img-responsive"></em>\' +
									\'</div>\';
							}
							content += "</div>";
							var dialog = util.dialog("请选择头像", content);
							dialog.modal("show");
							dialog.find(".thumbnail").on("click", function(){
								var url = $(this).find("img").attr("src");
								img.get(0).src = url;
								ipt.val(url.replace(/^\\.\\.\\/attachment\\//, ""));
								dialog.modal("hide");
							});
						});
					}
				</script>';
                define('TPL_INIT_AVATAR', true);
            }
            if (!defined('TPL_INIT_IMAGE')) {
                global $_W;
                if (defined('IN_MOBILE')) {
                    $html .= <<<EOF
<script type="text/javascript">
\t// in mobile
\tfunction showImageDialog(elm) {
\t\trequire(["jquery", "util"], function(\$, util){
\t\t\tvar btn = \$(elm);
\t\t\tvar ipt = btn.parent().prev();
\t\t\tvar val = ipt.val();
\t\t\tvar img = ipt.parent().next().children();
\t\t\tutil.image(elm, function(url){
\t\t\t\timg.get(0).src = url.url;
\t\t\t\tipt.val(url.attachment);
\t\t\t});
\t\t});
\t}
</script>
EOF;
                } else {
                    $html .= <<<EOF
<script type="text/javascript">
\t// in web
\tfunction showImageDialog(elm, opts) {
\t\trequire(["util"], function(util){
\t\t\tvar btn = \$(elm);
\t\t\tvar ipt = btn.parent().prev();
\t\t\tvar val = ipt.val();
\t\t\tvar img = ipt.parent().next().find('img');
\t\t\tutil.image(val, function(url){
\t\t\t\timg.get(0).src = url.url;
\t\t\t\tipt.val(url.attachment);
\t\t\t}, opts, {multiple:false,type:"image",direct:true});
\t\t});
\t}
</script>
EOF;
                }
                define('TPL_INIT_IMAGE', true);
            }
            $val = './resource/images/nopic.jpg';
            if (!empty($value)) {
                $val = tomedia($value);
            }
            $options = array();
            $options['width'] = '200';
            $options['height'] = '200';
            if (defined('IN_MOBILE')) {
                $html .= <<<EOF
<div class="input-group">
\t<input type="text" value="{$value}" name="{$field}" class="form-control" autocomplete="off">
\t<span class="input-group-btn">
\t\t<button class="btn btn-default" type="button" onclick="showImageDialog(this);">选择图片</button>
\t\t<button class="btn btn-default" type="button" onclick="showAvatarDialog(this);">系统头像</button>
\t</span>
</div>
<div class="input-group" style="margin-top:.5em;">
\t<img src="{$val}" class="img-responsive img-thumbnail" width="150" style="max-height: 150px;"/>
</div>
EOF;
            } else {
                $html .= '
<div class="input-group">
	<input type="text" value="' . $value . '" name="' . $field . '" class="form-control" autocomplete="off">
	<span class="input-group-btn">
		<button class="btn btn-default" type="button" onclick="showImageDialog(this, \'' . base64_encode(iserializer($options)) . '\');">选择图片</button>
		<button class="btn btn-default" type="button" onclick="showAvatarDialog(this);">系统头像</button>
	</span>
</div>
<div class="input-group" style="margin-top:.5em;">
	<img src="' . $val . '" class="img-responsive img-thumbnail" width="150" />
</div>';
            }
            break;
        case 'birth':
        case 'birthyear':
        case 'birthmonth':
        case 'birthday':
            $html = tpl_form_field_calendar('birth', $value);
            break;
        case 'reside':
        case 'resideprovince':
        case 'residecity':
        case 'residedist':
            $html = tpl_form_field_district('reside', $value);
            break;
        case 'bio':
        case 'interest':
            $html = '<textarea name="' . $field . '" class="form-control">' . $value . '</textarea>';
            break;
        case 'gender':
            $html = '
					<select name="gender" class="form-control">
						<option value="0" ' . ($value == 0 ? 'selected ' : '') . '>保密</option>
						<option value="1" ' . ($value == 1 ? 'selected ' : '') . '>男</option>
						<option value="2" ' . ($value == 2 ? 'selected ' : '') . '>女</option>
					</select>';
            break;
        case 'education':
        case 'constellation':
        case 'zodiac':
        case 'bloodtype':
            if ($field == 'bloodtype') {
                $options = array('A', 'B', 'AB', 'O', '其它');
            } elseif ($field == 'zodiac') {
                $options = array('鼠', '牛', '虎', '兔', '龙', '蛇', '马', '羊', '猴', '鸡', '狗', '猪');
            } elseif ($field == 'constellation') {
                $options = array('水瓶座', '双鱼座', '白羊座', '金牛座', '双子座', '巨蟹座', '狮子座', '处女座', '天秤座', '天蝎座', '射手座', '摩羯座');
            } elseif ($field == 'education') {
                $options = array('博士', '硕士', '本科', '专科', '中学', '小学', '其它');
            }
            $html = '<select name="' . $field . '" class="form-control">';
            foreach ($options as $item) {
                $html .= '<option value="' . $item . '" ' . ($value == $item ? 'selected ' : '') . '>' . $item . '</option>';
            }
            $html .= '</select>';
            break;
        case 'nickname':
        case 'realname':
        case 'address':
        case 'mobile':
        case 'qq':
        case 'msn':
        case 'email':
        case 'telephone':
        case 'taobao':
        case 'alipay':
        case 'studentid':
        case 'grade':
        case 'graduateschool':
        case 'idcard':
        case 'zipcode':
        case 'site':
        case 'affectivestatus':
        case 'lookingfor':
        case 'nationality':
        case 'height':
        case 'weight':
        case 'company':
        case 'occupation':
        case 'position':
        case 'revenue':
        default:
            $html = '<input type="text" class="form-control" name="' . $field . '" value="' . $value . '" />';
            break;
    }
    return $html;
}
Пример #3
0
/> 多个足浴版本
						</label>
						<span class="help-block">请根据您酒店的实际情况选择,不要随意修改</span>
					</div>
				</div>
				<div  id="de_city" class="form-group" <?php 
if ($set['version'] != 1) {
    ?>
style="display:none"<?php 
}
?>
>
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">默认城市</label>
				<div class="col-sm-9 col-xs-12">
					<?php 
echo tpl_form_field_district('district', array('province' => $set['location_p'], 'city' => $set['location_c'], 'district' => $set['location_a']));
?>
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">用户设置</label>
				<div class="col-sm-9 col-xs-12">
					<label class="radio-inline">
						<input type="radio" value="1" name="user" class="user" <?php 
if ($set['user'] == 1 || empty($set['user'])) {
    ?>
checked<?php 
}
?>
/> 微信粉丝
					</label>
Пример #4
0
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">邮编</label>
			<div class="col-xs-12 col-sm-8">
				<input type="text" name="data[zipcode]" class="form-control" value="<?php 
    echo $data['zipcode'];
    ?>
" />
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">收货地址</label>
			<div class="col-xs-12 col-sm-8">
				<?php 
    echo tpl_form_field_district('dis', $reside);
    ?>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">街道名称</label>
			<div class="col-xs-12 col-sm-8">
				<input type="text" name="data[address]" class="form-control" value="<?php 
    echo $data['address'];
    ?>
" />
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
			<div class="col-xs-12 col-sm-8">
Пример #5
0
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">邮编</label>
			<div class="col-xs-12 col-sm-8">
				<input type="text" name="address[zipcode]" class="form-control" value="<?php 
    echo $address['zipcode'];
    ?>
" />
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">收货地址</label>
			<div class="col-xs-12 col-sm-8">
				<?php 
    echo tpl_form_field_district('address', array('province' => $address['province'], 'city' => $address['city'], 'district' => $address['district']));
    ?>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">街道名称</label>
			<div class="col-xs-12 col-sm-8">
				<input type="text" name="address[address]" class="form-control" value="<?php 
    echo $address['address'];
    ?>
" />
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
			<div class="col-xs-12 col-sm-8">
Пример #6
0
						</div>	
					</div>
					<div class="form-group">
						<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="require">* </span>门店实景</label>
						<div class="col-sm-9 col-xs-9 col-md-9">
							<?php 
    echo tpl_form_field_multi_image('thumbs', $item['thumbs']);
    ?>
							<div class="help-block">门店实景将已幻灯片的形式展示。建议图片大小:720*400</div>
						</div>	
					</div>
					<div class="form-group">
						<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="require">* </span>门店所在地区</label>
						<div class="col-sm-9 col-xs-9 col-md-9">
							<?php 
    echo tpl_form_field_district('reside', $item['reside']);
    ?>
						</div>	
					</div>
					<div class="form-group">
						<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="require">* </span>详细地址</label>
						<div class="col-sm-9 col-xs-9 col-md-9">
							<input type="text" name="address" class="form-control" value="<?php 
    echo $item['address'];
    ?>
">
							<div class="help-block">请勿重复填写省市区信息</div>
						</div>	
					</div>
					<div class="form-group">
						<label class="col-xs-12 col-sm-3 col-md-2 control-label">地图标识</label>
Пример #7
0
                    </div>
                </div>
                   <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">QQ</label>
                    <div class="col-sm-9 col-xs-12">
                         <input type="text"  name="qq" value="<?php 
echo $item['qq'];
?>
"  class="form-control" />
                    </div>
                </div>
                   <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">地区</label>
                    <div class="col-sm-9 col-xs-12">
                        <?php 
echo tpl_form_field_district('district', array('province' => $item['province'], 'city' => $item['city'], 'district' => $item['dist']));
?>

                    </div>
                </div>
                    <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">详细地址</label>
                    <div class="col-sm-9 col-xs-12">
                       <div class="input-append"><input type="text" name="address" value="<?php 
echo $item['address'];
?>
"  class="form-control" /></div>
                    </div>
                </div>
                
                   <div class="form-group">
Пример #8
0
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">地区</label>
					<div class="col-sm-9 col-xs-12">
						<?php 
    if (!empty($reside)) {
        ?>
							<?php 
        echo tpl_form_field_district('dis', $reside);
        ?>
						<?php 
    } else {
        ?>
							<?php 
        echo tpl_form_field_district('dis');
        ?>
						<?php 
    }
    ?>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">详细地址</label>
					<div class="col-sm-8 col-xs-12">
						<div class="input-append"><input type="text" name="address" value="<?php 
    if (!empty($item['address'])) {
        echo $item['address'];
    }
    ?>
"  class="form-control" /></div>
Пример #9
0
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">描述</label>
			<div class="col-sm-9 col-xs-12">
				<textarea style="height: 80px;" class="form-control" name="description"><?php 
echo $account['description'];
?>
</textarea>
				<span class="help-block">用于说明此公众号的功能及用途,越详细越能打动用户。</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">地区</label>
			<div class="col-sm-9 col-xs-12">
                                <?php 
echo tpl_form_field_district('dis', array('province' => $account['province'], 'city' => $account['city'], 'district' => $account['district']));
?>
				<span class="help-block">用于说明此公众号所在的省市。</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">行业</label>
			<div class="col-sm-9 col-xs-12">
                                <?php 
echo tpl_form_field_industry('industry', $account['industry_parent'], $account['industry_child']);
?>
                            <span class="help-block">用于说明此公众号的类别,对用户精准营销。</span>
			</div>
		</div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">网站/网店网址</label>