<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <meta http-equiv="Content-Language" content="gb2312" />
    <meta http-equiv="x-ua-compatible" content="ie=7" />
    <title>发布源码出售信息 - {page:title/} </title>
    <link rel="stylesheet" href="/templates/Default/style.css" type="text/css" media="screen,projection" />
    <script type="text/javascript" src="Utility/jquery.js"></script>
    <script type="text/javascript" src="home/images/home.js"></script>

    <script type="text/javascript">
        parent.menuSelect("add1");
        function checkForm() {
            if ($("#txtTitle").val().length <4 ) { alert("源码标题不能4个字符！"); $("#txtTitle").focus(); return false; }
            if ($("#description").val().length < 15) { alert("源码介绍请写详细些！"); return false; }
            return true;
        }
        var aid = 0;
        var id = 1;
        function attach_change() {
            if (aid >= 4) { alert('最多只能上传4个附件！'); return; }
            var extensions = 'jpg,gif,png,bmp';
            var obj = $('#file_' + id)[0];
            var path = obj.value;
            var ext = path.lastIndexOf('.') == -1 ? '' : path.substr(path.lastIndexOf('.') + 1, path.length).toLowerCase();
            var re = new RegExp("(^|\\s|,)" + ext + "($|\\s|,)", "ig");
            if (path == '') { return; }
            if (extensions != '' && (re.exec(extensions) == null || ext == '')) {
                obj.value = "";
                alert('对不起，不支持上传此类扩展名的附件。');
                return;
            }
            var newNode = $("#attach" + id)[0].cloneNode(true);

            obj.style.display = "none";
            obj = document.createElement("a");
            obj.href = "javascript:attach_del(" + id + ")";
            obj.innerHTML = "[删除]";
            $("#attach" + id)[0].appendChild(obj);
            $("#attach_s" + id)[0].innerHTML = "源码截图：" + path.substr(path.lastIndexOf("\\") + 1);

            id++;
            newNode.id = "attach" + id;
            newNode.childNodes[0].id = "attach_s" + id
            newNode.childNodes[1].name = "file_" + id;
            newNode.childNodes[1].id = "file_" + id;
            newNode.lastChild.name = "filedesc_" + id;

            $('#myFile')[0].appendChild(newNode);
            aid++;
        }
        function attach_del(id) {
            var theNode = $('#attach' + id)[0];
            $('#myFile')[0].removeChild(theNode);
            aid--;
        }
    </script>

</head>
<body>
<div class="wrap">
<div class="panel ym_h_rt ym_line">
    <ul class="ym_head">
        <li class="title">发布出售信息</li>
    </ul>
    <center>
        <b>注意：</b>这里用于<b>发布源码出售信息</b>，您如果想<b><a href="/Add2.aspx">求购源码</a></b>，请来<b><a href="/Add2.aspx">
            这里 </a></b>！</center>
    <form id="formpost" method="post" action="add.aspx" onsubmit="return checkForm();"
    enctype="multipart/form-data">
    <table cellspacing="0" cellpadding="0" border="0">
        <tr>
            <td align="right">
                <b>源码名称：</b>
            </td>
            <td height="25" align="left">
                <input type="text" id="txtTitle" name="txtTitle" style="width: 317px;" />
            </td>
        </tr>
        <tr>
            <td align="right">
                <b>源码类别：</b>
            </td>
            <td height="25" align="left">
                <select id="ddlCategory" name="ddlCategory">
                    {etj:category}
                    <option value="[field:ID/]">[field:name/]</option>
                    {/etj:category}
                </select>
            </td>
        </tr>
        <tr>
            <td align="right">
                <b>演示地址：</b>
            </td>
            <td height="25" align="left">
                <input type="text" id="txtURL" name="txtURL" style="width: 200px;" value="http://" />
            </td>
        </tr>
        <tr>
            <td align="right">
                <b>价格：</b>
            </td>
            <td height="25" align="left">
                <input type="text" id="txtPrice" name="txtPrice" style="width: 61px;" value="0" onkeyup="isNumber(this);" />
                &nbsp;元
            </td>
        </tr>
        {etj:myinfo}
        <tr>
            <td align="right">
                <b>联系QQ：</b>
            </td>
            <td height="25" align="left">
                <input type="text" id="txtQQ" name="txtQQ" value="[field:qq/]" onkeyup="isNumber(this);" />
            </td>
        </tr>
        <tr>
            <td align="right">
                <b>邮箱：</b>
            </td>
            <td height="25" align="left">
                <input type="text" id="txtMail" name="txtMail" value="[field:email/]" />
            </td>
        </tr>
        <tr>
            <td align="right">
                <b>联系电话：</b>
            </td>
            <td height="25" align="left">
                <input type="text" id="txtTel" name="txtTel" value="[field:tel/]" />
            </td>
        </tr>
        {/etj:myinfo}
        <tr>
            <td align="right">
                <b>源码截图:</b>
            </td>
            <td align="left">
                注：截图只支持：jpg,gif,png,bmp四种格式,单个附件不能大于2M！
                <div id="myFile">
                    <div id="attach1"><span id="attach_s1"></span><input type="file" name="file_1" id="file_1" onchange="attach_change();" />描述:<input type="text" name="filedesc_1" id="filedesc_1" /></div>
                </div>
                <br />
            </td>
        </tr>
        <tr>
            <td align="right">
                <b>源码介绍：</b>
            </td>
            <td align="left">
                <input type="hidden" name="description" id="description" value="" />
                <iframe id="myiframe" src="Utility/Editor/editor.htm?id=description&ReadCookie=0"
                    frameborder="0" scrolling="no" width="640px" height="460px"></iframe>
            </td>
        </tr>
        <tr>
            <td align="right">
                <b>标签Tags：</b>
            </td>
            <td height="25" align="left">
                <input type="text" id="txtTags" name="txtTags" style="width: 285px" /><br />
                (多个标签之间请用空格分隔，每个标签最长8个字符，最多4个标签)
            </td>
        </tr>
        <tr>
            <td height="35" colspan="2" align="center">
                <br />
                <input type="submit" value="· 提交 ·" />
                <input type="reset" value="· 重填 ·" />
            </td>
        </tr>
    </table>
    </form>
    
     </div>
</div> 
</body>
</html>
{etj:config_statistics/}