function page_ctrl(e){function g(){b=/^\d+$/.test(b)?1>b?1:b>d?d:b:1;e.change_content(h,b);for(var a='\u5171 '+d+' \u9875',c=0;cc?a+='":2==c&&(a+='...'):8b+1?6...':7>b&&(8>c?a+='":8==c&&(a+='...')):
a=c==b-1?a+('"):a+('");a=b==d?a+('"):a+('");a+='\u5230\u7b2c\u9875';$(f).children(".page_ctrl").append(a);
1==b?$(f+" .page_ctrl .prev_page").attr("disabled","disabled").addClass("btn_dis"):$(f+" .page_ctrl .prev_page").removeAttr("disabled").removeClass("btn_dis");b==d?$(f+" .page_ctrl .next_page").attr("disabled","disabled").addClass("btn_dis"):$(f+" .page_ctrl .next_page").removeAttr("disabled").removeClass("btn_dis")}var f=void 0!==e.obj_box?e.obj_box:function(){},k=void 0!==e.total_item?parseInt(e.total_item):0,h=void 0!==e.per_num?parseInt(e.per_num):5,b=void 0!==e.current_page?parseInt(e.current_page):
1,d=Math.ceil(k/h);$(f).html('');$(f).html('');g();$(f+" .page_ctrl").on("click","button",function(){var a=$(this);a.hasClass("prev_page")?1!=b&&(b--,a.parent(".page_ctrl").html(""),g()):a.hasClass("next_page")?b!=d&&(b++,a.parent(".page_ctrl").html(""),g()):a.hasClass("page_num")&&!a.hasClass("current_page")?(b=parseInt(a.html()),a.parent(".page_ctrl").html(""),g()):a.hasClass("to_page_num")&&(b=parseInt(a.siblings(".input_page_num").val()),
a.parent(".page_ctrl").html(""),g())})};