/* *  Vivcom Confidential *  Licensed Materials - Property of Vivcom *  (C) COPYRIGHT Vivcom, Inc. 2000, 2001  All rights reserved. * *  US Government Users Restricted Rights - Use, duplication or *  disclosure restricted by GSA ADP Schedule Contract with Vivcom, Inc. * * Filename : vmadm_top.php * Author   : ChangYoon Lee * Date     : 28/11/2001 * Version  : 0.100 * Purpose  : PVM Admin top Log page * */ //var SelectList;var selVMark = -1;var showVMarkNum=0;var gmovietype;var gviewsection;function ShowVMark(SEL_MOVIE){	var curVMarkNum=0;	var i=0;	vmarkTotNum = Vmdb.VMGetInstanceCount(1);	var curVMarkNum = 0;	var array = new Array(4);	for(var k=0 ; k<=vmarkTotNum/4 ; k++){		document.write("<table width=423 height=142 cellspacing=0 cellpadding=0 border=0 background="+newimgPath+"/movie/img_bookmark_bg.gif>");		document.write("	<tr>");		document.write("		<td align=center style='padding-top:5px'>");		document.write("			<table width=400 cellspacing=0 cellpadding=0 border=0>");		document.write("			<tr align=center>");		for(i=0; i<4; i++){				if(curVMarkNum == vmarkTotNum){				for(var b=curVMarkNum; b<4; b++){ 					document.write("<td width=100>&nbsp;</td>");				} 				break;			}			document.write("			<td><img src='");			document.write( Vmdb.VMGetImagePath(curVMarkNum + 1));			document.write("' alt='" + unescape(Vmdb.VMGetTitle(curVMarkNum+1)) + "' ");			document.write('width=80 height=58 class=img_b style=margin-bottom:3px>');			showVMarkNum++;			var mediaurl = Vmdb.VMGetMediaUrl(curVMarkNum+1);			var mediainfo = mediaurl.split("$");			var genre = mediainfo[mediainfo.length-1];			if(genre == SEL_MOVIE || SEL_MOVIE == 99){ 				document.write("    <br><input name='checkselect' type='checkbox' onclick='SelectVMark("+showVMarkNum+","+array[i]+");'>");			}else{ 				document.write("    <br><input name='checkselect' type='hidden' onclick='SelectVMark("+showVMarkNum+","+array[i]+");'>");			}			document.write("    </td>");			array[i] = curVMarkNum+1;			curVMarkNum++; 		} 			document.write("			</tr>");			document.write("			</table>");			document.write("		</td>"); 			document.write("	</tr>");			document.write("</table>");			document.write("<table height=8 cellspacing=0 cellpadding=0 border=0><tr><td></td><td></td></tr></table>"); 		if(curVMarkNum == vmarkTotNum)return;	} }function SelectVMark(chindex, vmarkindex){		selVMark = chindex; 	for(var i=0; i<showVMarkNum; i++)	{		if(i != chindex-1)			document.VMarkSelect.checkselect[i].checked = false;	} }function GetStartPos(mediapos){	var startTime;	var h, m, s;	h  =  mediapos/ 3600;	h = parseInt(h,10);	m  = (mediapos % 3600) / 60;	m = parseInt(m,10);	s  = ((mediapos % 3600) % 60)/1;	s = parseInt(s,10);	if( h < 10)		startTime="0" + h + ":";	else 		startTime=h + ":";	if( m < 10)		startTime+="0" + m + ":";	else 		startTime+=m + ":";	if( s < 10)		startTime+="0" + s;	else 		startTime+=s;	return startTime; }function GetMovieType(mediaurl){	var movie_type;	var tokenArray = mediaurl.split("$");	if(tokenArray[1] == 0)	 movie_type = "300K";	else if(tokenArray[1] == 1)	 movie_type = "500K";	else if(tokenArray[1] == 2)	 movie_type = "1M";	return movie_type;	}function Go_account(){	if(confirm('ÀÌ ¿µÈ­´Â À¯·áÈ¸¿ø¸¸ °ü¶÷°¡´ÉÇÕ´Ï´Ù.  À¯·á°áÁ¦ ¾È³»¸¦ º¸½Ã°Ú½À´Ï±î?') ){		document.location.href ="/account/account.jsp";	}	return;}function MyPageVMarkView(utype){ 	var curVMarkNum=0;	var i=0;//	vmarkTotNum = Vmdb.VMGetInstanceCount(1);	var curVMarkNum = 1;	var startTime,movie_type;	var usertypecheck;	var mediaurl;	var mediainfo;	var genre;	document.write('<table width=570 cellspacing=0 cellpadding=0 border=0>');	document.write('  <tr>');	document.write('    <td width=124 height=9 nowrap></td>');	document.write('    <td width=123 nowrap></td>');	document.write('	<td width=123 nowrap></td>');	document.write('	<td width=123 nowrap></td>');	document.write('	<td width=94 nowrap></td>');	document.write('  </tr>');	document.write('  <tr valign=top>');	for(s_row; s_row<=e_row;s_row++){ 				if(i!=0 && i%5==0){											document.write('</tr><tr><td colspan=5 height=20></td></tr><tr valign=top></br>');		}			startTime = GetStartPos(Vmdb.VMGetMediaPos(s_row));			movie_type = GetMovieType(Vmdb.VMGetMediaUrl(s_row));			mediaurl = Vmdb.VMGetMediaUrl(s_row);			mediainfo = mediaurl.split("$");			genre = mediainfo[mediainfo.length-1];  			document.write('<td>');			document.write('	<table width=94 cellspacing=0 cellpadding=0 border=0 bgcolor=#285585>');			document.write('	<tr><td><img src='+imagepath+'/help/rnd01_tl.gif width=3 height=3></td><td align=right><img src='+imagepath+'/help/rnd01_tr.gif width=3 height=3></td></tr>');			document.write('	<tr><td colspan=2 align=center style=padding:6 0 2 0><img src="'+Vmdb.VMGetImagePath(s_row)+'" width=80 height=58 class=img_m></td>');			document.write('	<tr><td colspan=2 align=right class=bl05 style=padding-right:7px>'+movie_type+'/'+startTime+'</td></tr>');			document.write('	</tr>');			document.write('	<tr><td><img src='+imagepath+'/help/rnd01_bl.gif width=3 height=3></td><td align=right><img src='+imagepath+'/help/rnd01_br.gif width=3 height=3></td></tr>');			document.write('	</table>');			document.write('	<table width=94 cellspacing=0 cellpadding=0 border=0>');			document.write('	<tr><td style=padding:9 0 2 0><a href=#>'+Vmdb.VMGetTitle(s_row)+'</a></td></tr>');			document.write('	<tr><td>');		//ÇÃ·¹ÀÌ Àü¿¡ À¯¹«·á È¸¿øÃ¼Å©/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////			if( utype==1 || utype==2 ){ //¹«·áÈ¸¿ø °áÁ¦À¯µµ 			document.write('<img src='+imagepath+'/mypage/btn_g01.gif width=14 height=13 style=margin-right:2px;cursor:hand onclick=\"Go_account();\" alt=\"µ¿¿µ»óº¸±â\" >');			}else{//À¯·áÈ¸¿ø ÇÃ·¹ÀÌ¾î ¶ç¿ò			document.write('<img src='+imagepath+'/mypage/btn_g01.gif width=14 height=13 style=margin-right:2px;cursor:hand onclick=\"VMImgPlay('+s_row+');\" alt=\"µ¿¿µ»óº¸±â\" >');			}		///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////			document.write('<img src='+imagepath+'/mypage/btn_g02.gif width=14 height=13 style=margin-right:2px;cursor:hand onclick=\"VMImgDel('+s_row+');\" alt=\"»èÁ¦\">');			document.write('<img src='+imagepath+'/mypage/btn_g03.gif width=14 height=13 style=margin-right:2px;cursor:hand onclick=\"VMImgInfo(' +s_row+');\" alt=\"Å¸ÀÌÆ²°íÄ¡±â\">');			document.write('<img src='+imagepath+'/mypage/btn_g04.gif width=14 height=13 style=margin-right:4px;cursor:hand onclick=\"VMImgMail(' +s_row+');\" alt=\"¸ÞÀÏº¸³»±â(È¸¿ø ¹«·á 15 ~ 30ÃÊ °ü¶÷ °¡´É)\">');			document.write('<img src='+imagepath+'/mypage/btn_g05.gif width=14 height=13 style=cursor:hand alt=\"º£½ºÆ®¼¦ ¿Ã¸®±â\" onclick="myVMarkOpen('+genre+')"></td></tr>');			document.write('	</table>');			document.write('</td>');		if((s_row)==e_row){			document.write('</tr>');			document.write('<tr><td colspan=5 height=10></td></tr>');			document.write('<tr><td colspan=5 height=1 bgcolor=#386695></td></tr>');		}		i = i+1;	}  	document.write('</table>');		}function myVMarkOpen(genresel){	if(genresel==null || genresel=="" || genresel=="undefined"){		alert("ÇöÀç ºÏ¸¶Å© ¿µÈ­´Â º£½ºÆ®¼¦¿¡ ¿Ã¸®½Ç ¼ö ¾ø´Â ¿µÈ­ÀÔ´Ï´Ù.");	}else{		var url = "/bestshot/best/best_bookmark.jsp?GENRE="+genresel;		window.open(url,"myVMark",'width=530,height=600,toolbar=no,hotkeys=no scrollbars=yes'); 	}	} function VMImgPlay(param_index){   var mediaurl, mediapos, openerurl, title;      mediaurl = Vmdb.VMGetMediaUrl(param_index);   if (mediaurl == null || mediaurl == "" || mediaurl == "NoData")   {      alert("ÁË¼ÛÇÕ´Ï´Ù. ºñµð¿À ºÏ¸¶Å©¿¡ ¿¬°áµÈ µ¿¿µ»óÀ» Ã£À» ¼ö ¾ø½À´Ï´Ù.");      return;   }      mediapos = Vmdb.VMGetMediaPos(param_index);   if (mediapos == null || mediapos == "" || mediapos == "NoData")   {      alert("ÁË¼ÛÇÕ´Ï´Ù. ºñµð¿À ºÏ¸¶Å©¿¡ ¿¬°áµÈ Àç»ý½Ã°£À» Ã£À» ¼ö ¾ø½À´Ï´Ù.");      return;   }      openerurl = Vmdb.VMGetOpenerUrl(param_index);   if (openerurl == null || openerurl == "" || openerurl == "NoData")   {      alert("ÁË¼ÛÇÕ´Ï´Ù. ºñµð¿À ºÏ¸¶Å©¿¡ ¿¬°áµÈ ÆäÀÌÁö¸¦ Ã£À» ¼ö ¾ø½À´Ï´Ù.");      return;   }	var bmediainfo = mediaurl.split("$"); 	open_pvm_win(bmediainfo[0],bmediainfo[1],mediapos,'',openerurl); }function VMImgDel(param_index){    Vmdb.VMDeleteInstance(param_index);   ImageWinReDisplay();}function ImageWinReDisplay(){   document.location.href = "member_class.jsp?viewmode=1&vm_pg="+vm_pg; }function VMImgInfo(param_index){   var prevtitle = Vmdb.VMGetTitle(param_index);   var nexttitle = prompt("VMark Information Edit..", prevtitle);   if (nexttitle == null || nexttitle == "" || nexttitle == prevtitle)      return;   Vmdb.VMSetTitle(param_index, nexttitle);   ImageWinReDisplay();}function VMImgMail(param_index){   var mediaurl = Vmdb.VMGetMediaUrl(param_index);   var mediapos = Vmdb.VMGetMediaPos(param_index);   var imagepath = Vmdb.VMGetImagePath(param_index);   var openerurl = Vmdb.VMGetOpenerUrl(param_index);   var title = Vmdb.VMGetTitle(param_index);   var date = Vmdb.VMGetDate(param_index);	var tokenArray = mediaurl.split("$");	viewsection = tokenArray[2];	SendMail(mediaurl,mediapos,imagepath,viewsection,title,date,openerurl); }function VMImgBoard(param_index){	var mediaurl = Vmdb.VMGetMediaUrl(param_index);	var tokenArray = mediaurl.split("$");	var genre = tokenArray[3];	var TBL_NAME,TBL_KOR_NAME;		if(genre == 1)	{		TBL_NAME="KOR_MOVIE";		TBL_KOR_NAME="ÇÑ±¹¿µÈ­";	}	else if(genre == 2)	{		TBL_NAME="ENG_MOVIE";		TBL_KOR_NAME="¿Ü±¹¿µÈ­";	}	else if(genre == 3)	{		TBL_NAME="ADULT_MOVIE";		TBL_KOR_NAME="¼ºÀÎ¿µÈ­";	}	else if(genre == 4)	{		TBL_NAME="MU_MOVIE";		TBL_KOR_NAME="¹«Çù¿µÈ­";	}	else if(genre == 5)//¾Ö´Ï¸ÞÀÌ¼Ç	{		TBL_NAME="ENG_MOVIE";		TBL_KOR_NAME="¿Ü±¹¿µÈ­";	}	document.VMarkSelect.TBL_NAME.value = TBL_NAME;	document.VMarkSelect.TBL_KOR_NAME.value = TBL_KOR_NAME;	document.VMarkSelect.SP.value = "";	document.VMarkSelect.VMVideo.value = Vmdb.VMGetMediaUrl(param_index);	document.VMarkSelect.VMStartpos.value = Vmdb.VMGetMediaPos(param_index);	document.VMarkSelect.VMImagepath.value = Vmdb.VMGetImagePath(param_index);	document.VMarkSelect.VMOpenerpage.value = Vmdb.VMGetOpenerUrl(param_index);	document.VMarkSelect.VMTitle.value = unescape(Vmdb.VMGetTitle(param_index));	document.VMarkSelect.VMDate.value = Vmdb.VMGetDate(param_index);	document.VMarkSelect.VMImgData.value = Vmdb.VMProcImgSrc(1, document.VMarkSelect.VMImagepath.value);	document.VMarkSelect.submit();}function SendMail(mediaurl,mediapos,imagepath,viewsection,title,date,openerurl,serimgpath,duration,mode){	if(openerurl=='' || openerurl==null)		openerurl  = location.href;	// var openurl = "/player/pvm/pvm_mailwin.jsp?g_mediaurl="+mediaurl+"&g_mediapos="+mediapos+"&g_imagepath="+imagepath+"&g_viewsection="+viewsection+"&g_title="+title+"&g_date="+date+"&g_serimgpath="+serimgpath+"&g_openerurl="+openerurl+"&g_duration=" + duration;	var openurl = "/bestshot/bestshotmail/mailto.jsp?mode="+mode+"&g_mediaurl="+mediaurl+"&g_mediapos="+mediapos+"&g_imagepath="+imagepath+"&g_viewsection="+viewsection+"&g_title="+title+"&g_date="+date+"&g_serimgpath="+serimgpath+"&g_openerurl="+openerurl+"&g_duration=" + duration;	gMailwin = window.open(openurl, 'cinemailwin1', 'width=550,height=605,menubar=no,hotkeys=no,toolbar=no,location=no,scrollbars=no,status=no,resizable=no');		gMailwin.focus();}
