⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 template_import.php

📁 phpcms网站管理系统  很不错的 有需要的就下载看看八 
💻 PHP
字号:
<?php 
defined('IN_PHPCMS') or exit('Access Denied');
include admintpl('header');
?>
<body>
<table cellpadding="0" cellspacing="0" border="0" width="100%" height="10">
  <tr>
    <td></td>
  </tr>
</table>
<?=$menu?>
<table cellpadding="2" cellspacing="1" class="tableborder">
  <tr>
    <th colspan=2>批量导入模板到数据库</th>
  </tr>
<form method="post" name="myform" action="?mod=<?=$mod?>&file=<?=$file?>&action=<?=$action?>&templateid=<?=$templateid?>&save=1">
<tr>
<td class="tablerow">模板所在的目录</td>
<td class="tablerow">
./data/templates/<input size=15 name="templatedir" type=text value="<?=$templatedir?>">
<font color="red">*</font>
<select name="tpldir" onchange="myform.templatedir.value=this.value">
<option value='' >请选择模板目录</option>
<?php 
if(is_array($templatedirs)){
	foreach($templatedirs as $dir){
		$dir = basename($dir);
        $selected = $dir == $templatedir ? " selected" : "";
        echo "<option value='".$dir."' ".$selected.">".$dir."</option>\n";
	}
}
?>
</select>
 (需要先把模板目录传到 ./data/templates/ 下)
</td>
</tr>
<tr>
<td class="tablerow">导入方式</td>
<td class="tablerow"><input type="radio" name="importtype" value="1" onclick="importtype1.style.display='';"> 添加新模板&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="importtype" value="0" checked onclick="importtype1.style.display='none';"> 更新现有模板 </td>
</tr>
<tbody id="importtype1" style="display:none">
<tr>
<td class="tablerow" width="15%">所属方案</td>
<td class="tablerow">
<select name="projectid">
<?php 
if(is_array($projects)){
	foreach($projects as $project){
        $selected = $project['projectid'] == $projectid ? " selected" : "";
        echo "<option value='".$project['projectid']."' ".$selected.">".$project['projectname']."</option>\n";
	}
}
?>
</select>
</td>
</tr>
<tr>
<td class="tablerow" width="15%">所属模块</td>
<td class="tablerow">
<select name="module">
<?php 
foreach($_MODULE as $key=>$m){
	$selected = $key == $module ? " selected" : "";
	echo "<option value='".$key."' ".$selected.">".$m['modulename']."</option>\n";
}
?>
</select>
</td>
</tr>
</tbody>
<tr>
<td class="tablerow"></td>
<td class="tablerow">
<input type="submit" name="submit" value=" 批量导入模板 ">
</td>
</tr>
</table>
</form>
<br/>
<table cellpadding="2" cellspacing="1" border="0" align=center class="tableBorder" >
  <tr>
    <td class="submenu" align=center>提示信息</td>
  </tr>
  <tr>
    <td class="tablerow">
	此功能每次只能导入一个模块的模板,如果您需要导入一套全站的模板方案,则请进“模板方案管理”,然后“导入模板方案”。
	<br/>如果是新添加模板,则导入的模板都被自动初始化为非默认模板;如果是更新模板,则一切均按照模板配置文件执行。
	</td>
  </tr>
</table>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -