Live Brilliant

ActiveX 설치 유무 확인 소스 본문

개발은 핵찜이야/PHP

ActiveX 설치 유무 확인 소스

주인정 2012. 4. 13. 18:55

/_event/event.attend.php 파일

####### ActiveX 설치 유무 확인 ###### 55줄
<script>
<!--
function activeX_self()
{
try
{
var XObj = new ActiveXObject("UPLOADAX.uploadAXCtrl.1")

if(XObj)
Installed = true;

else
Installed = false;
}
catch(ex)
{
Installed = false;
}

if(Installed != true)
{

alert("ActiveX Control을 설치하셔야 합니다.");
location.href="event.attend.php"; //설치안했으면 다시 출석페이지로
exit();
}else{
//설치가 되어있으면 form1 값 전송 hidden = Y 값
form1.submit();
}
}
-->
</script>
########출석체크 클릭시 ################# 509~519줄
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="15" align="center">
<form id="form1" name="form1" method="post" action="" style="margin:0;">

<input name="input" type="hidden" id="input" value="y" />
</form>
//출석체크 클릭
<input type="image" src="http://img.localhost.co.kr/080414/event/event_bt.gif" width="229" height="67" border="0" onclick="activeX_self();">
</td>
</tr>
</table>

### activeX 호출 소스 iframe을 이용해 activex.php(모쥴호출소스) 을 불러와
설치시 기존 페이지 위에 설치프로그램이 뜨도록 되어있다 ####
<iframe name="activex" src="activex.php" frameborder=0></iframe>

 

Comments