Server : nginx/1.22.1
System : Linux iZwz9daxib3w3i063fw434Z 3.10.0-1127.19.1.el7.x86_64 #1 SMP Tue Aug 25 17:23:54 UTC 2020 x86_64
User : www ( 1000)
PHP Version : 5.6.40
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Directory :  /www/wwwroot/www.jkmold.com/phpcms/modules/customfield/templates/
Upload File :
Current Directory [ Writeable ] Root Directory [ Writeable ]


Current File : /www/wwwroot/www.jkmold.com/phpcms/modules/customfield/templates/manage_list.tpl.php
<?php

defined('IN_ADMIN') or exit('No permission resources.');

include $this->admin_tpl('header','admin');?>

<form action="?m=customfield&c=customfield&a=manage_save" method="post" id="myform">

<input type="hidden" value="<?php echo $siteid ?>" name="siteid" />

<div class="pad-10">

<table width="100%" cellspacing="0" class="search-form">

    <tbody>

		<tr>

		<td><div class="explain-col"> 

		<?php echo L('cm_site') ?>: &nbsp;&nbsp;

		<?php

			if(is_array($sitelist)){

			foreach($sitelist as $site){

		?>

			<a href="?m=customfield&c=customfield&a=manage_list&siteid=<?php echo $site['siteid'];?>&menuid=<?php echo intval($_GET['menuid']) ?>"><?php echo $site['name'];?></a>&nbsp;

		<?php }}?>

		</div>

		</td>

		</tr>

    </tbody>

</table>

<?php if(count($root) > 0){ ?>

<div class="col-tab">

<ul class="tabBut cu-li">

<?php

	$i = 1;

	$j = 0;

	foreach($root as $r){

		$on = ($i == 1) ? "on" : "";

		echo "<li id='tab_setting_{$i}' class='$on' onclick=\"SwapTab('setting','on','',{$count},{$i})\">{$r['description']}</li>";

		$i++;

	}

?>

</ul>



<?php

$i = 1;

foreach($root as $k => $r){ ?>

<div id="div_setting_<?php echo $i ?>" class="contentList pad-10 <?php if($i > 1) echo "hidden"?>">

<div class="table-list">

<table width="100%" cellspacing="0" id="listtable<?php echo $r['id'] ?>">

	<thead>

		<tr>

			<th align="center"><?php echo L('listorder')?></th>

			<th><?php echo L('cm_field') ?></th>

			<th>变量key</th>

			<th align="center"><?php echo L('cm_value') ?></th>

			<th align="center"><?php echo L('cm_description') ?></th>

			<th align="center"><?php echo L('cm_status') ?></th>

			<th align="center"><?php echo L('cm_textarea') ?></th>

			<th align="center"><?php echo L('operations_manage')?></th>

		</tr>

	</thead>

<tbody>

<?php foreach($filed_list[$r['id']] as $f){ ?>

	<tr id="tr<?php echo $j ?>">

		<td align="center">

		<input type="hidden" value="<?php echo $f['pid'] ?>" name="postdata[<?php echo $j ?>][pid]" />

		<input type="hidden" value="<?php echo $f['id'] ?>" name="postdata[<?php echo $j ?>][id]" />

		<input type="hidden" value="1" name="postdata[<?php echo $j ?>][options]" class="dataoptions" />

		<input name="postdata[<?php echo $j ?>][listorder]" type='text' size='3' value='<?php echo $f['listorder']?>' class="input-text-c" />

		</td>

		<td align="center"><input name="postdata[<?php echo $j ?>][name]" type='text' value='<?php echo $f['name']?>' class="input-text" style="width:100px" <?php echo ISVAR==0?'readonly':'';?>/></td>

		<td align="center"><input name="postdata[<?php echo $j ?>][title]" type='text' value='<?php echo $f['title']?>' class="input-text" style="width:100px" /></td>

		<td align="center"><textarea name="postdata[<?php echo $j ?>][val]" class="input-text" style="width:400px" rows="2"><?php echo $f['val']?></textarea></td>

		<td align="center"><input name="postdata[<?php echo $j ?>][description]" type='text' value='<?php echo $f['description']?>' class="input-text" style="width:200px" /></td>

		<td align="center"><input type="checkbox" name="postdata[<?php echo $j ?>][conf][status]" value="1" <?php if($f['conf']['status'] == 1) echo " checked='checked'"; ?>  /></td>

		<td align="center"><input type="checkbox" name="postdata[<?php echo $j ?>][conf][textarea]" value="1" <?php if($f['conf']['textarea'] == 1) echo " checked='checked'"; ?>  /></td>

		<td align="center"><a href="javascript:;" onclick="delTr('tr<?php echo $j ?>')"><?php echo L('delete');?></a></td>

	</tr>

<?php $j++;} ?>

<tr><td colspan="7" align="center"><input type="button" value=" <?php echo L('cm_add')?> " class="button" onclick="addTr(<?php echo $r['id'] ?>)" /></td></tr>

</tbody>

</table>

</div>



</div>

<?php $i++;} ?>

<div class="bk15"></div>

<input name="dosubmit" type="submit" value="<?php echo L('cm_save')?>" class="button" />

</div>

<?php }else{echo "<div style='text-align:center;padding-top:30px;color:#999'>". L('cm_no_data') ."</div>";} ?>

</div>

</form>

</body>

<script type="text/javascript">

	var addnum = <?php echo $j+1 ?>;

	//添加行

	function addTr(pid){

	var trHtml   =	"<tr id='ntr" + addnum + "'>";

		trHtml  +=	"<td align='center'>";

		trHtml  +=	"<input type='hidden' value='"+ pid +"' name='postdata[" + addnum + "][pid]' />";

		trHtml  +=	"<input type='hidden' value='2' name='postdata[" + addnum + "][options]' class='dataoptions' />";

		trHtml  +=	"<input name='postdata[" + addnum + "][listorder]' type='text' size='3' value='0' class='input-text-c' />";

		trHtml  +=	"</td>";

		trHtml  +=	"<td align='center'><input name='postdata[" + addnum + "][name]' type='text' value='' class='input-text' style='width:100px' /></td>";

		trHtml  +=	"<td align='center'><input name='postdata[" + addnum + "][title]' type='text' value='' class='input-text' style='width:100px' /></td>";

		trHtml  +=	"<td align='center'><textarea name='postdata[" + addnum + "][val]' class='input-text' style='width:400px' rows='2'></textarea></td>";

		trHtml  +=	"<td align='center'><input name='postdata[" + addnum + "][description]' type='text' value='' class='input-text' style='width:200px' /></td>";

		trHtml  +=	"<td align='center'><input type='checkbox' name='postdata[" + addnum + "][conf][status]' value='1' checked='checked' /></td>";

		trHtml  +=	"<td align='center'><input type='checkbox' name='postdata[" + addnum + "][conf][textarea]' value='1' /></td>";

		trHtml  +=	"<td align='center'><a href='javascript:;' onclick=\"delTr('ntr"+ addnum +"')\"><?php echo L('delete');?></a></td>";

		trHtml  +=	"</tr>";

	addnum++;

	var $tr=$("#listtable"+ pid +" tr").eq(-2);

	if($tr.size() <= 1){

		$tr=$("#listtable"+ pid +" tr").eq(-1);

		$tr.before(trHtml);

	}else{$tr.after(trHtml);}

	}

	//删除行

	function delTr(trid){

		$("#"+trid).hide();

		$("#"+trid+" .dataoptions").val(3);

	}

	//切换分类选项卡

	function SwapTab(name,cls_show,cls_hide,cnt,cur){

	    for(i=1;i<=cnt;i++){

			if(i==cur){

				 $('#div_'+name+'_'+i).show();

				 $('#tab_'+name+'_'+i).attr('class',cls_show);

			}else{

				 $('#div_'+name+'_'+i).hide();

				 $('#tab_'+name+'_'+i).attr('class',cls_hide);

			}

		}

	}

</script>

</html>