-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /var/www/html/inc.bk/js/
File Upload :
Current File : /var/www/html/inc.bk/js/group.category.js

/* ¸¸µç³¯ : 2006³â 10¿ù 11ÀÏ ¿ÀÈÄ */
/* °Ô½ÃÆÇ Ä«Å×°í¸® °ü·Ã ÇÔ¼ö */
			function selectDataInfo(value) {
				tmpValue = value; tmp = new Array; 
				tmp[0] = tmpValue.substring(tmpValue.indexOf('boardname=') + 10, tmpValue.indexOf('|fixedboard='));
				tmp[1] = tmpValue.substring(tmpValue.indexOf('|fixedboard=') + 12, tmpValue.indexOf('|hideboard='));
				tmp[2] = tmpValue.substring(tmpValue.indexOf('|hideboard=') + 11, tmpValue.indexOf('|sequence='));
				tmp[3] = tmpValue.substring(tmpValue.indexOf('|sequence=')+10, tmpValue.indexOf('|numid='));
				tmp[4] = tmpValue.substring(tmpValue.indexOf('|numid=') + 7); 
				return tmp;
			}
			//
			function boardcategory_add (tg, txt, chk) {
				if (useBrowserVersion()) {
					if (document.all(tg) == null) return; 
					rtg = document.all(tg);
					rtglen = rtg.length; 
					rtg.options[rtglen] = new Option('À̸§À» ÀÔ·ÂÇØÁÖ¼¼¿ä','boardname=À̸§À» ÀÔ·ÂÇØÁÖ¼¼¿ä|fixedboard=0|hideboard=0|sequence=' + rtglen + '|numid=0');	
					for (var i=0; i < rtglen; i++) rtg.options[i].selected = false; 
					rtg.options[rtglen].selected = true; 
					document.all(txt).value = 'À̸§À» ÀÔ·ÂÇØÁÖ¼¼¿ä'; 
					document.all(chk).checked = false; 
					document.all(txt).disabled = false; 
					document.all(chk).disabled = false; 
				} else return errormsg(null, ' ÇöÀç ±â´ÉÀ» Áö¿øÇÏÁö ¾Ê´Â ºê¶ó¿ìÀú¸¦ »ç¿ëÇÏ°í °è½Ê´Ï´Ù. '); 
			}
			//
			function boardcategory_up (tg) {
				if (useBrowserVersion()) {
					if (document.all(tg) == null) return; 
					rtg = document.all(tg); 
					// ¼±ÅÃµÈ µ¥ÀÌÅÍÀÇ Á¤º¸
					idx = rtg.selectedIndex;
					if (idx == 0 || idx == -1) return errormsg(null, ' ¼±ÅÃÇØÁÖ¼¼¿ä ');		
					idx_text = rtg.options[idx].text; idx_value = rtg.options[idx].value; 
					idx_info = selectDataInfo(idx_value); 
					if (idx_info[1] == 1) return errormsg(null, " ¼±ÅÃÇϽе¥ÀÌÅÍÀÇ ¼ø¼­¸¦ ¹Ù²Ü ¼ö ¾ø½À´Ï´Ù. "); 
					// Ÿ°Ù µ¥ÀÌÅÍÀÇ Á¤º¸		
					tidx = idx - 1; 
					tidx_text = rtg.options[tidx].text; tidx_value = rtg.options[tidx].value; 
					tidx_info = selectDataInfo(tidx_value); 
					if (tidx_info[1] == 1) return errormsg(null, " ´õÀÌ»ó ¼ø¼­¸¦ À§·Î ¿Ã¸± ¼ö ¾ø½À´Ï´Ù. \n ÀÌ¹Ì ÃÖ»óÀ§À̰ųª »óÀ§ÀÇ µ¥ÀÌÅͰ¡ ¼öÁ¤/»èÁ¦°¡ ºÒ°¡´ÉÇÑ µ¥ÀÌÅÍÀÔ´Ï´Ù. "); 
					rtg.options[tidx].text =idx_info[0]; rtg.options[tidx].value = 'boardname=' + idx_info[0] + '|fixedboard=' + idx_info[1] + '|hideboard=' + idx_info[2] + '|sequence=' + tidx_info[3] + '|numid=' + idx_info[4]; 
					rtg.options[idx].text = tidx_text; rtg.options[idx].value = 'boardname=' + tidx_info[0] + '|fixedboard=' + tidx_info[1] + '|hideboard=' + tidx_info[2] + '|sequence=' + idx_info[3] + '|numid=' + tidx_info[4]; 
					rtg.options[idx].selected = false;
					rtg.options[tidx].selected = true;
				} else return errormsg(null, ' ÇöÀç ±â´ÉÀ» Áö¿øÇÏÁö ¾Ê´Â ºê¶ó¿ìÀú¸¦ »ç¿ëÇÏ°í °è½Ê´Ï´Ù. '); 
			}
			//
			function boardcategory_down (tg) {
				if (useBrowserVersion()) {
					if (document.all(tg) == null) return; 
					rtg = document.all(tg); 
					// ¼±ÅÃµÈ µ¥ÀÌÅÍÀÇ Á¤º¸
					idx = rtg.selectedIndex;
					if (idx == 0 || idx == -1) return errormsg(null, ' ¼±ÅÃÇØÁÖ¼¼¿ä ');		
					idx_text = rtg.options[idx].text; idx_value = rtg.options[idx].value; 
					idx_info = selectDataInfo(idx_value); 
					if (idx_info[1] == 1) return errormsg(null, " ¼±ÅÃÇϽе¥ÀÌÅÍ´Â ¼ø¼­¸¦ ¹Ù²Ü ¼ö ¾ø½À´Ï´Ù. "); 
					// Ÿ°Ù µ¥ÀÌÅÍÀÇ Á¤º¸		
					tidx = idx + 1; 
					tidx_text = rtg.options[tidx].text; tidx_value = rtg.options[tidx].value; 
					tidx_info = selectDataInfo(tidx_value); 
					if (tidx_info[1] == 1) return errormsg(null, " ´õÀÌ»ó ¼ø¼­¸¦ À§·Î ¿Ã¸± ¼ö ¾ø½À´Ï´Ù. \n ÀÌ¹Ì ÃÖ»óÀ§À̰ųª »óÀ§ÀÇ µ¥ÀÌÅͰ¡ ¼öÁ¤/»èÁ¦°¡ ºÒ°¡´ÉÇÑ µ¥ÀÌÅÍÀÔ´Ï´Ù. "); 
					rtg.options[tidx].text =idx_info[0]; rtg.options[tidx].value = 'boardname=' + idx_info[0] + '|fixedboard=' + idx_info[1] + '|hideboard=' + idx_info[2] + '|sequence=' + tidx_info[3] + '|numid=' + idx_info[4]; 
					rtg.options[idx].text = tidx_text; rtg.options[idx].value = 'boardname=' + tidx_info[0] + '|fixedboard=' + tidx_info[1] + '|hideboard=' + tidx_info[2] + '|sequence=' + idx_info[3] + '|numid=' + tidx_info[4]; 
					rtg.options[idx].selected = false;
					rtg.options[tidx].selected = true;
				} else return errormsg(null, ' ÇöÀç ±â´ÉÀ» Áö¿øÇÏÁö ¾Ê´Â ºê¶ó¿ìÀú¸¦ »ç¿ëÇÏ°í °è½Ê´Ï´Ù. '); 
			}
			//
			function boardcategory_select (sel, txt, chk) {
				if (useBrowserVersion()) {
					if (sel == null || txt == null || chk == null) return;
					if (document.all(txt) == null) return;
					if (document.all(chk) == null) return;
					rtxt = document.all(txt);
					rchk = document.all(chk);
					idx = sel.selectedIndex;
					for (var i=0; i < sel.length; i++) {
						if (i != idx) sel.options[i].selected = false;
					}
					if (idx == 0 || idx == -1) {
						rtxt.value = ''; 
						rtxt.disabled = true; 
						rchk.checked = false; 
						rchk.disabled = true; 
						return; // errormsg(null, ' °Ô½ÃÆÇÀ» ¼±ÅÃÇØÁÖ¼¼¿ä ');
					}
					idx_text = sel.options[idx].text; idx_value = sel.options[idx].value;
					idx_info = selectDataInfo(idx_value);
					if (idx_info[1] == 1) {
						rtxt.value = ''; 
						rtxt.disabled = true; 
						rchk.checked = false; 
						rchk.disabled = true; 
						return; //errormsg(null, ' ¼öÁ¤/»èÁ¦ÇÒ ¼ö ¾ø´Â °Ô½ÃÆÇÀÔ´Ï´Ù. ');
					}
					sel.selected = false; 
					rtxt.disabled = false; 
					rchk.disabled = false; 
					rtxt.value = idx_info[0]; 
					if (idx_info[2] == 1) rchk.checked = true; 
					else rchk.checked = false; 
				} else return errormsg(null, ' ÇöÀç ±â´ÉÀ» Áö¿øÇÏÁö ¾Ê´Â ºê¶ó¿ìÀú¸¦ »ç¿ëÇÏ°í °è½Ê´Ï´Ù. ');
			}
			//
			function boardcategory_name (tg, txt) {
				if (useBrowserVersion()) {
					if (document.all(tg) == null) return; 		
					rtg = document.all(tg);
					idx = rtg.selectedIndex; 
					if (idx == 0 || idx == -1) { return;}
					if (txt.value.indexOf('|') != -1) {
						txt.value = txt.value.substring(0, txt.value.indexOf('|')); 
						return errormsg(null, ' | ´Â »ç¿ëÇÒ ¼ö ¾ø´Â ±âÈ£ÀÔ´Ï´Ù. ');
					}
					if (txt.value.indexOf('=') != -1) {
						txt.value = txt.value.substring(0, txt.value.indexOf('=')); 
						return errormsg(null, ' = ´Â »ç¿ëÇÒ ¼ö ¾ø´Â ±âÈ£ÀÔ´Ï´Ù. ');
					}
					idx_text = rtg.options[idx].text; idx_value = rtg.options[idx].value;
					idx_info = selectDataInfo(idx_value);
					rtg.options[idx].text = txt.value; rtg.options[idx].value = 'boardname=' + txt.value + '|fixedboard=' + idx_info[1] + '|hideboard=' + idx_info[2] + '|sequence=' + idx_info[3] + '|numid=' + idx_info[4]; 
				} else return errormsg(null, ' ÇöÀç ±â´ÉÀ» Áö¿øÇÏÁö ¾Ê´Â ºê¶ó¿ìÀú¸¦ »ç¿ëÇÏ°í °è½Ê´Ï´Ù. '); 
			}
			//
			function boardcategory_hide (tg, chk) {
				if (useBrowserVersion()) {
					if (document.all(tg) == null) return; 		
					rtg = document.all(tg);
					idx = rtg.selectedIndex; 
					if (idx == 0 || idx == -1) {return;
					}
					idx_text = rtg.options[idx].text; idx_value = rtg.options[idx].value;
					idx_info = selectDataInfo(idx_value);
					if (chk.checked) {
						rtg.options[idx].value = 'boardname=' + idx_info[0] + '|fixedboard=' + idx_info[1] + '|hideboard=1|sequence=' + idx_info[3] + '|numid=' + idx_info[4]; 
					} else {
						rtg.options[idx].value = 'boardname=' + idx_info[0] + '|fixedboard=' + idx_info[1] + '|hideboard=0|sequence=' + idx_info[3] + '|numid=' + idx_info[4]; 
					}
				} else return errormsg(null, ' ÇöÀç ±â´ÉÀ» Áö¿øÇÏÁö ¾Ê´Â ºê¶ó¿ìÀú¸¦ »ç¿ëÇÏ°í °è½Ê´Ï´Ù. '); 
			}
			//
			function boardcategory_del (tg) {
				if (useBrowserVersion()) {
					if (document.all(tg) == null) return; 
					rtg = document.all(tg);
					idx = rtg.selectedIndex;
					if (idx == 0 || idx == -1) return errormsg(null, ' ¼±ÅÃÇØÁÖ¼¼¿ä ');
					idx_text = rtg.options[idx].text; idx_value = rtg.options[idx].value;
					idx_info = selectDataInfo(idx_value);
					if (idx_info[1] == 1) return errormsg(null, ' »èÁ¦ÇÒ ¼ö ¾ø½À´Ï´Ù. ');
					if (idx_info[4] == 0) {
						rtg.options[idx] = null; 
						return;
					}
					if (confirm("Á¤¸» »èÁ¦ÇϽðڽÀ´Ï±î? \n¿¬°üµÈ ¸ðµç µ¥ÀÌÅͰ¡ ÇÔ²² »èÁ¦µÇ¸ç º¹±¸ÇÒ ¼ö ¾ø½À´Ï´Ù.")) {
						document.categoryForm.action+= "&mode=category_del&bnum=" + idx_info[4]; 
						document.categoryForm.submit(); 
					} else return;
				} else return errormsg(null, ' ÇöÀç ±â´ÉÀ» Áö¿øÇÏÁö ¾Ê´Â ºê¶ó¿ìÀú¸¦ »ç¿ëÇÏ°í °è½Ê´Ï´Ù. ');
			}

Copyright © 2017 || Recoded By Mr.Bumblebee