注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

面包会有的

php asp 高端网站开发 微信网站开发 视频会议软硬件

 
 
 

日志

 
 

admin_edit.php  

2015-09-01 16:53:47|  分类: shopnc |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

<?php defined('InShopNC') or exit('Access Invalid!');?>

<div class="page">
<div class="fixed-bar">
<div class="item-title">
<h3><?php echo $lang['nc_limit_manage'];?></h3>
<?php echo $output['top_link'];?>
</div>
</div>
<div class="fixed-empty"></div>
<form id="admin_form" method="post" action='index.php?act=admin&op=admin_edit&admin_id=<?php echo $output['admininfo']['admin_id'];?>'>
<input type="hidden" name="form_submit" value="ok" />
<table class="table tb-type2">
<tbody>
<tr class="noborder">
<td colspan="2" class="required"><label><?php echo $lang['admin_index_username'];?>:</label></td>
</tr>
<tr class="noborder">
<td class="vatop rowform"><?php echo $output['admininfo']['admin_name'];?></td>
<td class="vatop tips"></td>
</tr>
<tr>
<td colspan="2" class="required"><label for="new_pw"><?php echo $lang['admin_edit_admin_pw']; ?>:</label></td>
</tr>
<tr class="noborder">
<td class="vatop rowform"><input id="new_pw" name="new_pw" class="txt" type="password"></td>
<td class="vatop tips"><?php echo $lang['admin_edit_pwd_tip1'];?></td>
</tr>
<tr>
<td colspan="2" class="required"><labe for="new_pw2"><?php echo $lang['admin_edit_admin_pw2']; ?>:</label></td>
</tr>
<tr class="noborder">
<td class="vatop rowform"><input id="new_pw2" name="new_pw2" class="txt" type="password"></td>
<td class="vatop tips"></td>
</tr>
<tr>
<td colspan="2" class="required"><label class="validation" for="gadmin_name"><?php echo $lang['gadmin_name'];?>:</label></td>
</tr>
<tr class="noborder">
<td class="vatop rowform">
<select name="gid">
<?php foreach((array)$output['gadmin'] as $v){?>
<option <?php if ($v['gid'] == $output['admininfo']['admin_gid']) echo 'selected';?> value="<?php echo $v['gid'];?>"><?php echo $v['gname'];?></option>
<?php }?>
</select>
</td>
<td class="vatop tips"><?php echo $lang['admin_add_gid_tip'];?></td>
</tr>

<tr class="noborder">
<td class="vatop red"><br>如果是地区代理商下属管理员,以下各项必须设置</td>
<td class="vatop "></td>
</tr>
<tr class="noborder">
<td class="vatop rowform"><br><input type="checkbox" name="limitRegion" id="chkLimitRegion-id" value="1" <?php if ($output['admin_limit_region']) { echo "checked"; }?> >本用户属于地区代理商</td>
<td class="vatop "><?php echo $output['admin_limit_region'];?></td>
</tr>
<tr style="display:none;"><td colspan="2" >
<?php //echo $output['admin_limit_province_id'];?>-
<?php //echo $output['admin_limit_area_id'];?>-
<?php //echo $output['admin_limit_county_id'];?>
<br>
<?php //echo $output['admin_limit_province'];?>-
<?php //echo $output['admin_limit_area'];?>-
<?php //echo $output['admin_limit_county'];?>
</td>
</tr>


<tr>
<td colspan="2" >
<!--
<div id="region">
限制管理地区:
<?php if(!empty($output['admin_limit_province_id'])){?>
<span>
<?php //echo $output['admin_limit_province'];?>-
<?php //echo $output['admin_limit_area'];?>-
<?php //echo $output['admin_limit_county'];?>
</span>


<input type="button" value="<?php echo $lang['nc_edit'];?>" class="edit_region" />
<select style="display:none;"> </select>
<?php }else{?>
<select> </select>
<?php }?>

<input type="hidden" value="<?php echo $output['admin_limit_province_id'];?>" name="admin_limit_province_id" id="admin_limit_province_id">
<input type="hidden" value="<?php echo $output['admin_limit_area_id'];?>" name="area_id" id="admin_limit_area_id" class="area_ids" />
<input type="hidden" value="<?php echo $output['admin_limit_county_id'];?>" name="admin_limit_county_id" id="admin_limit_county_id">
</div>
-->


<select name="admin_limit_province_id" id="id-province">
<option value="0">省、自治区、直辖市</option>
<?php if(!empty($output['topAreaListArr'])){?>
<?php foreach ($output['topAreaListArr'] as $val){?>
<option value="<?php echo $val['area_id'];?>" <?php if( $output['defaultPid1'] == $val['area_id']){echo 'selected="selected"';}?>><?php echo $val['area_name'];?></option>
<?php }?>
<?php }?>
</select>
<span id="msg1" style="display:none;">...</span>

<select name="admin_limit_area_id" id="id-area">
<option value="0">地区、市</option>
<?php if(!empty($output['secondAreaListArr'])){?>
<?php foreach ($output['secondAreaListArr'] as $val){?>
<option value="<?php echo $val['area_id'];?>" <?php if( $output['defaultPid2'] == $val['area_id']){echo 'selected="selected"';}?>><?php echo $val['area_name'];?></option>
<?php }?>
<?php }?>
</select>
<span id="msg2" style="display:none;">...</span>

<select name="admin_limit_county_id" id="id-county">
<option value="0">县、区</option>
<?php if(!empty($output['threeAreaListArr'])){?>
<?php foreach ($output['threeAreaListArr'] as $val){?>
<option value="<?php echo $val['area_id'];?>" <?php if( $output['defaultPid3'] == $val['area_id']){echo 'selected="selected"';}?>><?php echo $val['area_name'];?></option>
<?php }?>
<?php }?>
</select>
<span id="msg3" style="display:none;">...</span>
<? //var_dump($output['topAreaListArr']);?>
<? //var_dump($output['regionListJson']);?>

<span id="jsondata" style="display:none;">jsondata</span>
</td>
</tr>






</tbody>
<tfoot>
<tr class="tfoot">
<td colspan="2" ><a href="JavaScript:void(0);" class="btn" id="submitBtn"><span><?php echo $lang['nc_submit'];?></span></a></td>
</tr>
</tfoot>
</table>
</form>
</div>
<script>
//按钮先执行验证再提交表单
$(function(){$("#submitBtn").click(function(){
if($("#admin_form").valid()){
$("#admin_form").submit();
}
});
});
$(document).ready(function(){
$("#admin_form").validate({
errorPlacement: function(error, element){
error.appendTo(element.parent().parent().prev().find('td:first'));
},
rules : {
new_pw : {
minlength: 6,
maxlength: 20
},
new_pw2 : {
minlength: 6,
maxlength: 20,
equalTo: '#new_pw'
},
gid : {
required : true
}
},
messages : {
new_pw : {
minlength: '<?php echo $lang['admin_add_password_max'];?>',
maxlength: '<?php echo $lang['admin_add_password_max'];?>'
},
new_pw2 : {
minlength: '<?php echo $lang['admin_add_password_max'];?>',
maxlength: '<?php echo $lang['admin_add_password_max'];?>',
equalTo: '<?php echo $lang['admin_edit_repeat_error'];?>'
},
gid : {
required : '<?php echo $lang['admin_add_gid_null'];?>',
}
}
});
});
</script>


<!--地区选择配套代码 start-->
<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/js/region_select.js" charset="utf-8"></script>
<script type="text/javascript">
//var SITEURL = "<?php echo SHOP_SITE_URL; ?>";
$(document).ready(function(){
//regionInit("region");
});
</script>
<!--地区选择配套代码 end-->




<script type="text/javascript">
$(document).ready(function(){

$('#id-province').change(function(){
//alert($(this).children('option:selected').val()); //弹出select的值
//$("#msg1").html($(this).children('option:selected').val());

$("#id-area").find("option").remove();
$("#id-county").find("option").remove();

pObj=new Object();
pObj.area_deep=2;
pObj.pid=$(this).children('option:selected').val();
pObj.act="admin";//控制器
pObj.op="getRegionListJson";//控制器的方法
pObj.cache="&cache="+new Date().getTime();

$.get("http://localhost/shopnc_zjh_study/admin/index.php?"+$.param(pObj),function(data,status){
//alert(data);
var d = eval('(' + data + ')');

var index=0;
var strm="<option value='0'>0-地区、市</option>";
$(strm).appendTo("#id-area");

$(d).each(function(index){
var val = d[index];
//alert(val);//弹出:[object Object]
//alert("area_id=" + val.area_id + ",area_name="+val.area_name);
strm = "<option value='"+ val.area_id +"'>"+ val.area_id + "-" + val.area_name +"</option>";
$(strm).appendTo("#id-area");
});

//$("#jsondata").html(data);
});

});


$('#id-area').change(function(){
$("#id-county").find("option").remove();

pObj=new Object();
pObj.area_deep=3;
pObj.pid=$(this).children('option:selected').val();
pObj.act="admin";//控制器
pObj.op="getRegionListJson";//控制器的方法
pObj.cache="&cache="+new Date().getTime();

$.get("http://localhost/shopnc_zjh_study/admin/index.php?"+$.param(pObj),function(data,status){
//alert(data);
var d = eval('(' + data + ')');

var index=0;
var strm="<option value='0'>0-地区</option>";
$(strm).appendTo("#id-county");

$(d).each(function(index){
var val = d[index];
//alert(val);//弹出:[object Object]
//alert("area_id=" + val.area_id + ",area_name="+val.area_name);
strm = "<option value='"+ val.area_id +"'>"+ val.area_id + "-" + val.area_name +"</option>";
$(strm).appendTo("#id-county");
});

//$("#jsondata").html(data);
});


});
});
</script>











  评论这张
 
阅读(309)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017