<script type="text/javascript" src="{$_config[siteurl]}include/javascript/addnew.js"></script>
<script type="text/javascript">
function selectpanel(obj) {
    if(obj.value) {
        document.location.href='post.php?action=newshop&pcd='+obj.value;
    }
}
</script>
<div id="body">
    <div id="left">
        <div class="mainrail rail-border-1">
            <h1 class="rail-h-1 rail-h-bg-1">温馨提示</h1>
            <div class="rail-text">添加商铺前请先用检测该商户是否已经存在。商户实时加入，加入后即可开始点评。 </div>
        </div>
    </div>
    <div id="right">
        <div class="post">
        <!--{if $pcd}-->
            <div class="title"><h1>添加商铺</h1>(<span class="font_1">*</span>为必填选项)</div>
            <!--{if $error}--><div class="formerror">$error</div><!--{/if}-->
            <form method="post" action="post.php?action=newshop" name="addstorefrm" onsubmit="return checkaddstorefrm();">
            <table class="table" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td align="right"><span class="font_1">*</span>商铺类型：</td>
                    <td><select name="pcd" onchange="selectpanel(this);">
                    <!--{loop $_panels $panelcode $panelname}-->
                        <option value="$panelcode"<!--{if $panelcode==$pcd}--> selected="selected"<!--{/if}-->>$panelname</option>
                    <!--{/loop}-->
                    </select>
                    </td>
                </tr>
                <tr>
                    <td align="right" width="80"><span class="font_1">*</span>商铺名：</td>
                    <td width="*"><input type="text" name="shopname" value="$shopname"{if $addsub} readonly{/if} size="30" class="t_input" />&nbsp;例：要德火锅&nbsp;<button type="button" value="yes" onclick="show_existshop();" />查查商铺是否存在</button><div id="ajaxmsg" class="ajaxmsg" style="display:none"><div></td>
                </tr>
                <tr>
                    <td align="right">分店名：</td><td><input type="text" name="subname" value="$subname" size="30" class="t_input" /> 例：鼓楼店</td>
                </tr>
                <tr>
                    <td align="right"><span class="font_1">*</span>分类：</td>
                    <td><select name="classcode">
                        $_classcode_option[$pcd]
                    </select></td>
                </tr>
                <tr>
                    <td align="right"><span class="font_1">*</span>地区：</td>
                    <td><select name="areacode">
                        $_areacode_option[$city]
                    </select></td>
                </tr>
                <tr>
                    <td align="right"><span class="font_1">*</span>地址：</td><td><input type="text" name="address" size="45" value="$address" class="t_input" /> 例：中山西路57号升阳泰商场2楼</td>
                </tr>
                <tr>
                    <td align="right">网址：</td><td><input type="text" name="website" size="45" value="$website" class="t_input" /> 例：http://www.modoer.com</td>
                </tr>
                <tr>
                    <td align="right">视频地址：</td><td><input type="text" name="video" size="45" value="$video" class="t_input" /> 支持：FLV/SWF</td>
                </tr>
                <tr>
                    <td align="right">电话 1：</td><td><input type="text" name="tel1" value="$tel1" class="t_input" /> 纯数字</td>
                </tr>
                <tr>
                    <td align="right">电话 2：</td><td><input type="text" name="tel2" value="$tel2" class="t_input" /> 纯数字</td>
                </tr>
                <tr>
                    <td align="right">手机：</td><td><input type="text" name="mobile" value="$mobile" class="t_input" /> 11位纯数字</td>
                </tr>
                <!--{if $htmltags}-->
                <tr>
                    <td align="right">常用标签：</td><td>$htmltags</td>
                </tr>
                <!--{/if}-->
                <tr>
                    <td align="right" valign="top">商铺介绍：</td><td><textarea name="content" rows="5" cols="50"></textarea>[<a href="javascript:;" onclick="addrows(addstorefrm.content, 8);">＋增加行数</a>]&nbsp;[<a href="javascript:;" onclick="decrows(addstorefrm.content, 8);">－减少行数</a>]&nbsp;[<span class="font_2">限<span class="font_1">1000</span>个字符</span>]</td>
                </tr>
                <!--{if $_seccode['newshop']}--><tr>
                <td align="right">验证码：</td>
                <td><div id="seccode"></div><input type="text" name="seccode" onfocus="show_seccode();" class="t_input" /></td>
                </tr>
                <!--{/if}-->
                <tr>
                    <td align="right"></td><td><button type="submit" value="yes" name="newshopsubmit" />&nbsp;添&nbsp;加&nbsp;</button>&nbsp;&nbsp;<button type="reset" value="yes" />&nbsp;清&nbsp;空&nbsp;</button></td>
                </tr>
            </table>
            </form>
        <!--{else}-->
            <div class="title"><h1>选择商铺类型</h1></div>
            <select id="panel" onchange="selectpanel(this);" size="10" style="width:400px;">$_panels_option</select>
        <!--{/if}-->
        </div>
    </div>
</div>