function get_paging(totalcnt) { var totpages = Math.ceil(totalcnt/pagefactor); //총페이지수 var thisblock = Math.ceil(thispage/pagelistnm); //현재 페이징블럭 var startpage, endpage; var ret_HTML = ""; // 현재 페이지블럭의 시작페이지번호 if(thisblock > 1){ startpage = (thisblock-1)*pagelistnm+1; }else{ startpage = 1; } // 현재 페이지블럭의 끝페이지번호 if( (thisblock*pagelistnm) >= totpages ){ endpage = totpages; }else{ endpage = thisblock*pagelistnm; } if(thispage > 1){ ret_HTML += " [맨처음]"; // 맨처음으로 가기 ret_HTML += " <"; // 현재블럭의 전페이지 } for(i = startpage; i <= endpage; i++){ if(i != thispage){ ret_HTML += " "+i+""; }else{ ret_HTML += " "+i+""; } } if(thispage != totpages){ ret_HTML += " >"; // 현재블럭의 다음페이지 ret_HTML += " [마지막]"; // 맨 마지막페이지 } return ret_HTML; } //14.04.09 tinymce4 function tinymce4_load(){ tinymce.init({ selector: "textarea.tinymce", plugins: [ "advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker", "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking", "table contextmenu directionality emoticons template textcolor paste fullpage textcolor" ], toolbar1: "newdocument fullpage | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | styleselect formatselect fontselect fontsizeselect", toolbar2: "cut copy paste | searchreplace | bullist numlist | outdent indent blockquote | undo redo | link unlink anchor image media code | inserttime preview | forecolor backcolor", toolbar3: "table | hr removeformat | subscript superscript | charmap emoticons | print fullscreen | ltr rtl | spellchecker | visualchars visualblocks nonbreaking template pagebreak restoredraft", menubar: false, toolbar_items_size: 'small', forced_root_block : false, force_br_newlines : true, force_p_newlines : false, height : "300", width : "100%", statusbar : false, setup : function(ed){ed.on('init', function(){this.getDoc().body.style.fontSize = '14px'})} }); } //숫자만입력 function OnlyNumber(event) { var key = event.charCode || event.keyCode || 0; if(key != 45){//음수 if ((key<48)||(key>57)){ event.returnValue=false; } }; } function Send_msg(x){ $( "#Send_msg_src" ).dialog({ modal: true, autoOpen: false, width:400, height:400, close:function(){$( "#Send_msg_src" ).empty();}, title:'쪽지보내기' }) $("#Send_msg_src").load('A_msg_Send.php?x=' + x); $("#Send_msg_src").dialog('open'); } var MoveCheck = 0; function Fixed_Chk(x){ MoveCheck = (x)?1:0; } function Make_Cookie(k,v,z){ z = (z)?z:14; $.cookie(k, v, {expires: z}); } function numChk(num) {var rightchar=replaceComma(num.value);var moneychar="";for(index=rightchar.length-1;index>=0;index--){splitchar=rightchar.charAt(index);if(isNaN(splitchar)){alert("'"+splitchar+"' 숫자가 아닙니다.\n다시 입력해주십시오.");num.value="";num.focus();return false;} moneychar=splitchar+moneychar;if(index%3==rightchar.length%3&&index!=0){moneychar=','+moneychar;}} num.value=moneychar;return true;} function replaceComma(str) {if(str==null||str.length==0)return"";while(str.indexOf(",")>-1){str=str.replace(",","");} return str;} function insertComma(str) {var rightchar=replaceComma(str);var moneychar="";for(index=rightchar.length-1;index>=0;index--){splitchar=rightchar.charAt(index);if(isNaN(splitchar)){alert(splitchar+"숫자가 아닙니다.\n다시 입력해주십시오.");return"";} moneychar=splitchar+moneychar;if(index%3==rightchar.length%3&&index!=0){moneychar=','+moneychar;}} str=moneychar;return str;} function Max_Betting(x){ $.post('betting_process.php',{smode:'Max_Betting',game_order_code:x},function(data){ $('#my_bet_price').val(data); re_Calcu(); }); }