经验分享

产品添加参数编辑器

2020-05-13 18:13:21 admin 36
路径:\app\system\include\public\ui\admin文件:paratype.php一个文件完成附件增加编辑器。

路径:\app\system\include\public\ui\admin

文件:paratype.php

一个文件完成附件增加编辑器。

<!--<?php
# MetInfo Enterprise Content Management System 
# Copyright (C) MetInfo Co.,Ltd (http://www.metinfo.cn). All rights reserved. 

defined('IN_MET') or exit('No permission');
echo <<<EOT
-->
<!--
EOT;
foreach($paralist as $val){
//$wr_ok = $val['wr_ok']?'data-required="1"':'';
$wr_ok ='';
$list = explode("$|$",$val['options']);
$value = $para['info_'.$val['id']];
echo <<<EOT
-->
<!--
EOT;
if($val['type']==1){
echo <<<EOT
-->
		<dl>
			<dt>{$val['name']}</dt>
			<dd class="ftype_input">
				<div class="fbox">
					<input type="text" name="info_{$val['id']}" value="{$value}" {$wr_ok} />
				</div>
				<span class="tips">{$val['description']}</span>
			</dd>
		</dl>
<!--
EOT;
}
echo <<<EOT
-->	
<!--
EOT;
if($val['type']==2){
echo <<<EOT
-->
		<dl>
			<dt>{$val['name']}</dt>
			<dd class="ftype_select">
				<div class="fbox">
					<select name="info_{$val['id']}" data-checked="{$value}" {$wr_ok}>
						<option value="">请éæ©</option>
<!--
EOT;
foreach($val['list'] as $option){
if($option){
echo <<<EOT
-->
						<option value="{$option}">{$option}</option>
<!--
EOT;
}}
echo <<<EOT
-->
					</select>
				</div>
				<span class="tips">{$val['description']}</span>
			</dd>
		</dl>
<!--
EOT;
}
echo <<<EOT
-->	
<!--
EOT;
if($val['type']==3){
echo <<<EOT
-->
		<dl>
			<dt>{$val['name']}</dt>
			<dd class="ftype_ckeditor">
				<div class="fbox">
					<textarea name="info_{$val['id']}" {$wr_ok}>{$value}</textarea>
				</div>
				<span class="tips">{$val['description']}</span>
			</dd>
		</dl>
<!--
EOT;
}
echo <<<EOT
-->	
<!--
EOT;
if($val['type']==4){
echo <<<EOT
-->
		<dl>
			<dt>{$val['name']}</dt>
			<dd class="ftype_checkbox">
				<div class="fbox">
<!--
EOT;
$check = "data-checked=\"".str_replace('-', '|', $value)."\"";
foreach($val['list'] as $option){
if($option){
echo <<<EOT
-->
					<label><input name="info_{$val['id']}" type="checkbox" value="{$option}" {$wr_ok} {$check}>{$option}</label>
<!--
EOT;
$wr_ok='';
$check='';
}}
echo <<<EOT
-->
				</div>
				<span class="tips">{$val['description']}</span>
			</dd>
		</dl>
<!--
EOT;
}
echo <<<EOT
-->		
<!--
EOT;
if($val['type']==5){
echo <<<EOT
-->
		<dl>
			<dt>{$val['name']}</dt>
			<dd class="ftype_upload">
				<div class="fbox">
					<input 
						name="info_{$val['id']}" 
						type="text" 
						{$wr_ok}
						data-upload-type="doupfile"
						value="{$value}" 
					/>
				</div>
				<span class="tips">{$val['description']}</span>
			</dd>
		</dl>
<!--
EOT;
}
echo <<<EOT
-->	
<!--
EOT;
if($val['type']==6){
echo <<<EOT
-->
		<dl>
			<dt>{$val['name']}</dt>
			<dd class="ftype_radio">
				<div class="fbox">
<!--
EOT;
$check = "data-checked=\"{$value}\"";
foreach($val['list'] as $option){
if($option){
echo <<<EOT
-->
					<label><input name="info_{$val['id']}" type="radio" value="{$option}" {$wr_ok} {$check}>{$option}</label>
<!--
EOT;
$wr_ok='';
$check = '';
}}
echo <<<EOT
-->
				</div>
				<span class="tips">{$val['description']}</span>
			</dd>
		</dl>
<!--
EOT;
}
echo <<<EOT
-->	
<!--
EOT;
if($val['type']==7){
$prov = $para['info_'.$val['id'].'_1'];
$city = $para['info_'.$val['id'].'_2'];
$dist = $para['info_'.$val['id'].'_3'];
echo <<<EOT
-->
		<dl>
			<dt>{$val['name']}</dt>
			<dd class="ftype_select-linkage">
				<div class="fbox">
					<select name="info_{$val['id']}_1" data-checked="{$prov}" class="prov" {$wr_ok}></select>  
					<select name="info_{$val['id']}_2" data-checked="{$city}" class="city"></select>
					<select name="info_{$val['id']}_3" data-checked="{$dist}" class="dist"></select>
				</div>
				<span class="tips">{$val['description']}</span>
			</dd>
		</dl>
<!--
EOT;
}

if($val['type']==8){
	echo <<<EOT
-->
		<dl>
			<dt>{$val['name']}</dt>
			<dd class="ftype_input">
				<div class="fbox">
					<input type="text" name="info_{$val['id']}" value="{$value}" {$wr_ok} />
				</div>
				<span class="tips">{$val['description']}</span>
			</dd>
		</dl>

<!--
EOT;
}

echo <<<EOT
-->		
<!--
EOT;
}
echo <<<EOT
-->
<!--
EOT;
# This program is an open source system, commercial use, please consciously to purchase commercial license.
# Copyright (C) MetInfo Co., Ltd. (http://www.metinfo.cn). All rights reserved.
?>      
  • 网站信息

博客站长:阿凯

网站程序:metinfo7.1

博客模板:DIY

标签管理:标签云

联系QQ:77741887

联系电话:15326892225

               (微信同号)


扫描加微信


网站建设 

为企业品牌官网提供解决方案 

联系我们 


模板制作 

仿站/模板定制/单页面定制/效果图转模板 

联系我们 


CSS布局调整 

在您现有模板的基础上 重新修改排版布局 

联系我们 


其他技术问题解决 

助您解决建站过程中所遇到的各种疑难杂症


扫描加微信
建站找我,需要修改找我,不定时开发一些使用的小组件。
阿凯联系方式:15326892225(微信同号)
本站基于 米拓企业建站系统 7.1.0 搭建