<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
		<title>模块打包</title>
		<link rel="stylesheet" href="/static/web/css/font-awesome.min.css">
		<link rel="stylesheet" href="/static/web/css/bootstrap.min.css">
		<link rel="stylesheet" href="/static/web/css/admin.css">
		<script src="/static/web/js/webajax.js"></script>
	</head>
	<body>
		<form action="module_make.php" method="post" enctype="multipart/form-data" name="form1">
			<input type="hidden" name="action" value="make">
			<table class="table border my-3">
				<tr>
					<td colspan="2"><a href="module_main.php">模块管理</a> - 模块打包</td>
				</tr>
				<tr>
					<td colspan="2">
						<div class="alert alert-info mb-0">开发模块插件,请先了解<a href="<?php echo $cfg_biz_dedebizUrl;?>/developer" target="_blank">《DedeBIZ贡献者》</a></div>
					</td>
				</tr>
				<tr>
					<td width="260">模块名称:</td>
					<td><input type="text" name="modulname" id="modulname" class="admin-input-sm"></td>
				</tr>
				<tr>
					<td>语言编码:</td>
					<td>utf-8(不同编码模块可以使用,但不能在此打包)<input type="hidden" name="lang" value="utf-8"></td>
				</tr>
				<tr>
					<td>封装类型:</td>
					<td>
						<label><input type="radio" name="moduletype" id="moduletype1" value="soft" checked> 模块</label>
						<label><input type="radio" name="moduletype" id="moduletype2" value="templets"> 模板</label>
						<label><input type="radio" name="moduletype" id="moduletype3" value="plus"> 小插件</label>
						<label><input type="radio" name="moduletype" id="moduletype4" value="patch"> 补丁</label>
					</td>
				</tr>
				<tr>
					<td>贡献者id:</td>
					<td>
						<input type="text" name="dev_id" id="dev_id" class="admin-input-sm">
						<a href="<?php echo $cfg_biz_dedebizUrl;?>/developer" target="_blank" class="btn btn-success btn-sm">如何获取贡献者id</a>
					</td>
				</tr>
				<tr>
					<td>发布时间:</td>
					<td><input type="text" name="mtime" id="mtime" class="admin-input-sm" value="<?php echo GetDateMk(time());?>"></td>
				</tr>
				<tr>
					<td>是否涉及会员系统:</td>
					<td>
						<label><input type="radio" name="ismember" id="ismember1" value="1" onclick="ShowHideMb('ismember0','rboxct')"> 涉及</label>
						<label><input type="radio" name="ismember" id="ismember0" value="0" onclick="ShowHideMb('ismember0','rboxct')" checked> 不涉及</label>
						<div id="rboxct" style="display:none">
							<label>导航使用名称:<input type="text" name="indexname" id="indexname" class="admin-input-sm"></label><br>
							<label>导航使用网址:<input type="text" name="indexurl" id="indexurl" class="admin-input-sm"></label>
							<span>(用相对于会员中心的网址,如:/ask)</span>
						</div>
					</td>
				</tr>
				<tr>
					<td>后台管理菜单:</td>
					<td>
						<p>(普通插件或模板、补丁类不要填写,模块菜单格式请参考inc/inc_menu_module.php)</p>
						<textarea name="menustring" id="menustring" class="admin-textarea-xl"></textarea>
					</td>
				</tr>
				<tr>
					<td>使用说明文件:</td>
					<td>
						<label><input type="checkbox" name="autoreadme" value="1" id="autoreadme" onclick="ShowHideField('autoreadme','autoreadmeinput','autoreadmect')"> 直接填写</label><br>
						<div style="display:block" id="autoreadmeinput"><input type="file" name="readme" id="readme" class="admin-input-lg"></div>
						<div style="display:none" id="autoreadmect">
							<p>(填写使用协议或说明:如果需要带网页格式,请编译后点击修改时使用网页)</p>
							<textarea name="readmetxt" id="readmetxt" class="admin-textarea-xl"></textarea>
						</div>
					</td>
				</tr>
				<tr>
					<td>程序安装:</td>
					<td>
						<label><input type="checkbox" name="autosetup" value="1" id="autosetup" onclick="ShowHideField('autosetup','autosetupinput','autosetupct')"> 自动生成</label><br>
						<div style="display:block" id="autosetupinput"><input type="file" name="setup" id="setup" class="admin-input-lg"></div>
						<div style="display:none" id="autosetupct">
							<p>(由系统自动处理安装,请使用MySQL4.0版本格式的SQL语句:MySQL4.1/5.x版本请把创建表语句 ENGINE=MyISAM DEFAULT CHARSET=*,改为TYPE=MyISAM,SQL语句允许换行,但必须用;表示一条SQL语句结束,如果SQL中包含有模块网址的,用 _ROOTURL_ 表示,如:_ROOTURL_/ask/index.php)</p>
							<textarea name="setupsql40" id="setupsql40" class="admin-textarea-xl"></textarea>
						</div>
					</td>
				</tr>
				<tr>
					<td>删除程序:</td>
					<td>
						<label><input type="checkbox" name="autodel" value="1" id="autodel" onclick="ShowHideField('autodel','autodelinput','autodelct')"> 自动生成</label><br>
						<div style="display:block" id="autodelinput"><input type="file" name="uninstall" id="uninstall" class="admin-input-lg"></div>
						<div style="display:none" id="autodelct">
							<p>(由系统自动处理卸载,卸载时执行SQL允许换行,但必须用;表示一条SQL语句结束)</p>
							<textarea name="delsql" id="delsql" class="admin-textarea-xl"></textarea>
						</div>
					</td>
				</tr>
				<tr>
					<td>文件列表:</td>
					<td>
						<p>(每行指定一个文件或目录,路径为相对于本目录,本目录的文件则直接用文件名即可,对于整个打包的目录,不需要指定子目录里的文件,如:如果已经指定了/book则不需要再指定目录里的/book/index.php 等文件或目录,系统会自动索引整个目录,对于不需要索引整个目录的,请不要指定这个目录,否则会把不必要的文件也放进模块中)</p>
						<textarea name="filelist" id="filelist" class="admin-textarea-xl"></textarea>
					</td>
				</tr>
				<tr>
					<td>贡献者私钥:</td>
					<td>
						<p>(贡献者认证后获取的私钥)</p>
						<textarea name="priv" id="priv" class="admin-textarea-xl"></textarea>
					</td>
				</tr>
				<tr>
					<td colspan="2" align="center">
						<button type="submit" name="imageField" class="btn btn-success btn-sm">提交</button>
						<button type="button" name="button" id="button" class="btn btn-outline-success btn-sm" onclick="location='module_main.php';">返回</button>
					</td>
				</tr>
			</table>
		</form>
		<script>
			function ShowHideField(cbox, vid, nid) {
				var cboxobj = document.getElementById(cbox);
				if (cboxobj.checked) {
					document.getElementById(nid).style.display = 'block';
					document.getElementById(vid).style.display = 'none';
				} else {
					document.getElementById(nid).style.display = 'none';
					document.getElementById(vid).style.display = 'block';
				}
			}
			function ShowHideMb(rbox1, nid) {
				var rboxobj = document.getElementById(rbox1);
				if (rboxobj.checked) {
					document.getElementById(nid).style.display = 'none';
				} else {
					document.getElementById(nid).style.display = 'block';
				}
			}
		</script>
	</body>
</html>