吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 6444|回复: 6
收起左侧

[其他转载] 腾讯考试系统的代码

  [复制链接]
八字先生 发表于 2013-9-17 16:24
声明:源码部分是考试时候查看的保留了下来,今天考试中途截止了,明天继续考,来了吾爱好久了但很少发帖,如有违规请转移版块或直接删除



代码是单页的代码,整个考试系统具有以下功能:
1.打开QQ登录考试系统会自动退出  
2.打开网页也会自动退出考试
3.进入答题页面会出个单页直接覆盖掉浏览器窗口  
4.文本档的文字无法粘贴到简答的答题框内


代码内容如下



















<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html >
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>在线考试</title>
        <link type="text/css" rel="stylesheet" href="/wis18/public/blue/css/css.css" />
        <script language=javascript src="/wis18/usermain/paper/userpaper.js"></script>
        <script language="JavaScript" src="/wis18/public/javascript/ajaxRequest.js"></script>
<!--        <script language="JavaScript" src="/wis18/usermain/paper/disable.js"></script>-->
    </head>

    <body>
        <div id="checksub" style="display:none">
            <table width="100%"  height="150"    border="0" align="center" cellpadding="0" cellspacing="0" class="tck_main">
                <tr>
                    <th height="30" background="/wis18/public/blue/images/0001.gif" class="tck_margin tck_border" scope="col"><div align="right"><img src="/wis18/public/blue/images/close.gif" width="17" height="16" /></div></th>
                </tr>
                <tr>
                    <td><div style="width:100%;height:300;OVERFLOW-X:auto;OVERFLOW:scroll;"><table width="95%"  border="0" align="center" cellpadding="0" cellspacing="0">
                                <tr>
                                    <th height="30" scope="col" class="tck_border"><div align="center">&nbsp;&nbsp;<strong>交卷验证码</strong></div></th>
                                </tr>

                                <tr>
                                    <td height="30" bgcolor="#e4edef" class="tck_border"><div align="center">
                                            <input name="checknum" id="checknum" type="hidden"     value="7082"/>
                                            <input name="checkcode" id="checkcode" type="text" class="xtext" size="8" maxlength="30" value=""/>7082
                                        </div></td>
                                </tr>

                                <tr>
                                    <td height="30" bgcolor="#e4edef" class="tck_border"><div align="center">
                                            <input name="updatasubmit1" type="button" class="zxbtn" value="确定"/>
                                            <input name="updatasubmit1" type="button" class="zxbtn" value="取消"/>
                                        </div></td>
                                </tr>

                                <tr>
                                    <td height="30" bgcolor="#e4edef" class="tck_border"><div align="center">&nbsp;&nbsp;</div></td>
                                </tr>

                            </table> </div></td>
                </tr>
            </table>
        </div>
        <div id="checkqieping" style="display:none">
            <table width="100%"     height="330"   border="0" align="center" cellpadding="0" cellspacing="0" class="tck_main">
                <tr>
                    <th height="30" background="/wis18/public/blue/images/0001.gif" class="tck_margin tck_border" scope="col"><div align="right"><img src="/wis18/public/blue/images/close.gif" width="17" height="16" /></div></th>
                </tr>
                <tr>
                    <td><div style="width:100%;height:300;OVERFLOW-X:auto;OVERFLOW:scroll;"><table width="95%"  border="0" align="center" cellpadding="0" cellspacing="0">
                                <tr>
                                    <th height="30" scope="col" class="tck_border"><div align="center">&nbsp;&nbsp;<strong>提示信息</strong></div></th>
                                </tr>
                                <tr>
                                    <td height="30" bgcolor="#e4edef" class="tck_border"><div align="center" id="mess">
                                            请不要切屏了!
                                        </div></td>
                                </tr>
                                <tr>
                                    <td height="30" bgcolor="#e4edef" class="tck_border">
                                        <div align="center">
                                            <input name="updatasubmit1" type="button" class="zxbtn" value="确定"/>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td height="30" bgcolor="#e4edef" class="tck_border"><div align="center">&nbsp;&nbsp;</div></td>
                                </tr>

                            </table> </div></td>
                </tr>
            </table>
        </div>
        <div id="showtimetitle" style="display:none">
            <table width="100%"     height="330"   border="0" align="center" cellpadding="0" cellspacing="0" class="tck_main">
                <tr>
                    <th height="30" background="/wis18/public/blue/images/0001.gif" class="tck_margin tck_border" scope="col"><div align="right"><img src="/wis18/public/blue/images/close.gif" width="17" height="16" /></div></th>
                </tr>
                <tr>
                    <td><div style="width:100%;height:300;OVERFLOW-X:auto;OVERFLOW:scroll;"><table width="95%"  border="0" align="center" cellpadding="0" cellspacing="0">
                                <tr>
                                    <th height="30" scope="col" class="tck_border"><div align="center">&nbsp;&nbsp;<strong>时间提示</strong></div></th>
                                </tr>

                                <tr>
                                    <td height="30" bgcolor="#e4edef" class="tck_border"><div align="center" >
                                            <font color="red">请注意,现在考试时间已经不足5分钟了!!!</font>
                                        </div></td>
                                </tr>

                                <tr>
                                    <td height="30" bgcolor="#e4edef" class="tck_border"><div align="center">
                                            <input name="updatasubmit1" type="button" class="zxbtn" value="关闭"/>
                                        </div></td>
                                </tr>

                                <tr>
                                    <td height="30" bgcolor="#e4edef" class="tck_border"><div align="center">&nbsp;&nbsp;</div></td>
                                </tr>

                            </table> </div></td>
                </tr>
            </table>
        </div>
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <th height="70" valign="top" background="/wis18/public/blue/images/zx_18.gif" scope="col"><table width="100%" border="0" cellspacing="0" cellpadding="0" class="zxright_margin">
                        <tr>
                            <th width="83" scope="col"><div align="center"><img src="/wis18/public/blue/images/zx_05.gif" width="48" height="27" /></div></th>
                            <th width="393" scope="col" class="zxright_font"><div align="left">2013营销顾问认证考试—B卷</div></th>
                            <th width="775" scope="col">&nbsp;</th>
                        </tr>
                    </table></th>
            </tr>
            <tr>
                <td><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
                        <tr>
                            <th scope="col"><table width="100%" border="0" cellspacing="0" cellpadding="0" class="zxright_bottom">
                                    <tr>
                                        <th scope="col"><div align="left"><b>员工姓名:■■ </b></div></th>
                                        <th scope="col" ><div align="right">试卷分数:20.0分  2 道题 <b>剩余时间:</b><span id="showtime" class="zxright_red">0:00:00</span>

                                            </div></th>
                                    </tr>
                                </table></th>
                        </tr>
                        <tr>
                            <td><table width="100%" border="0" cellspacing="0" cellpadding="0" class="zxright_margina">
                                    <tr>
                                        <th width="50%" scope="col"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                <tr >
                                                    <th scope="col"><div align="center">
                                                            <input name="button2" type="button" class="button_04" value="中文" />
                                                        </div></th>
                                                    <th scope="col"><div align="center">
                                                            <input name="button22" type="button" class="button_04"  onclick="updatelanflag(1);"  value="英文" />
                                                        </div></th>

                                                    <th scope="col"><div align="center">
                                                            <input name="button2" type="button" class="button_04" value="排序" />
                                                        </div></th>
                                                    <th scope="col"><div align="center">
                                                            <input name="button22" type="button" class="button_04"  onclick="reduce();"  value="还原" />
                                                        </div></th>

                                                    <th scope="col"><div align="center">
                                                            <input name="button24" type="button"  class="button_04" value="答题情况" />
                                                        </div></th>
                                                    <th scope="col"><div align="center">
                                                            <input name="button25" type="button"  class="button_04" value="刷新" />
                                                        </div></th>

                                                    <th scope="col"><div align="center">
                                                            <input name="finishid" id="finishid" type="button"   class="zxbtn" value="交卷" />
                                                        </div></th>

                                                    <th scope="col"><div align="center">
                                                            <input name="button26" type="button"   class="button_04" value="简版" />
                                                        </div></th>


                                                </tr>
                                            </table></th>
                                        <th width="58%" scope="col"><div align="left">
                                                <span id="ts" style="display: none;color: red;text-align: left">如长时间无反应请检查网络状态并重新提交!</span>

                                            </div></th>
                                    </tr>
                                </table></td>
                        </tr>
                    </table></td>
            </tr>
        </table>
    </body>
</html>
<script language="JavaScript">
    var b_finish=false;
    var b_showtime=false;
    var totalTime =2698;

    var hh;                           //化成小时
    var mm=0;                         //化成
    var ss=0;                        //化成秒
    //化成秒
    hh=parseInt(totalTime/3600);
    mm=parseInt(totalTime%3600/60);
    var jjTime =-1;
    var jjhh;                           //化成小时
    var jjmm=0;                         //化成
    var jjss=0;
    jjhh=parseInt(jjTime/3600);
    jjmm=parseInt(jjTime%3600/60);
    var isIE=!!window.ActiveXObject;
    var isIE6=isIE&&!window.XMLHttpRequest;
    var isIE8=isIE&&!!document.documentMode;
    var isIE7=isIE&&!isIE6&&!isIE8;


    function decCount()
    {
        if(totalTime>=0)
        {
            hh=parseInt(totalTime/3600);
            mm=parseInt(totalTime%3600/60);
            ss=totalTime%60;
            if(mm<10)mm='0'+mm;
            if(ss<10)ss='0'+ss;
            document.all.showtime.innerHTML="<b>"+hh+":"+mm+":"+ss+"</b>";
            totalTime--;
            try{
                if(totalTime<60*5&&b_showtime)
                {

                    window.parent.mainFrame.tckTypeDiv.innerHTML=showtimetitle.innerHTML;
                    window.parent.mainFrame.showstatediv();
                    b_showtime=false;
                }
            }catch(ex)
            {
            }
            window.setTimeout("decCount()", 1000);
        }
        else
        {
            finishedtime();
        }


        }
        try{
            decCount();
            window.parent.mainFrame.location="userpaper.newuserpaperdoublebstart.flow?p_id=4223816916762495";
        }
        catch(e )
        {
            alert(e);
        }
        function lower()
        {
            window.parent.location="/wis18/usermain/paper/repeatexamlow.jsp?p_id=4223816916762495&u_id=4326666393203512";
        }

        function sort()
        {
            window.parent.bottomFrame.setclosefalse();
            if(b_finish)return;
            var d = new Date();
            window.parent.leftFrame.location="userpaper.userpaperdoublebmenusort.flow?p_id=4223816916762495&tran_timeex="+d.getTime();
            window.parent.bottomFrame.setclosetrue();
        }
        function reduce()
        {
            window.parent.bottomFrame.setclosefalse();
            if(b_finish)return;
            var d = new Date();
            window.parent.leftFrame.location="userpaper.userpaperdoublebmenureduce.flow?p_id=4223816916762495&tran_timeex="+d.getTime();
            window.parent.bottomFrame.setclosetrue();
        }
        function refresh()
        {
            // window.parent.bottomFrame.setclosefalse();
            if(b_finish)return;
            var d = new Date();
            window.parent.mainFrame.location="userpaper.userpaperdoublebex.flow?p_id=4223816916762495&tran_timeex="+d.getTime();
            window.parent.bottomFrame.setclosetrue();
        }

        function finished()
        {
            if(b_finish)return;

            papersendRequestPost('userpaper.saveuserquesajax.flow?currtime='+new Date(),window.parent.mainFrame.frmmain);

        }
        function finishedstate()
        {
            var d = new Date();
            var url="userpaper.userpaperdoublebstatelistsubmit.flow?p_id=4223816916762495&tran_timeex="+d.getTime();
            sendRequest(url);
        }

        function papersendRequestPost(url,form){
            //papercallback = run;
            if (window.XMLHttpRequest) {
                paperajaxRequestObj = new XMLHttpRequest();
            }else if (window.ActiveXObject) {
                try{
                    paperajaxRequestObj = new ActiveXObject("Msxml2.XMLHTTP");
                } catch (e){
                    try{
                        paperajaxRequestObj = new ActiveXObject("Microsoft.XMLHTTP");
                    } catch (e) {}
                }
            }
            var content=getRequestBody(form);
            //alert(content);
            if(paperajaxRequestObj){
                paperajaxRequestObj.open("post",url, true);
                paperajaxRequestObj.setRequestHeader("Content-Type","application/x-www-form-urlencoded");

                paperajaxRequestObj.onreadystatechange = finishedstate;
                paperajaxRequestObj.send(content);
            }
        }
        function getRequestBody(oForm) { // 参数oForm是对某个form对象的引用
            var aParams = new Array(); // 用来存储“名-值”对的数组
            for (var i = 0; i < oForm.elements.length; i++) {
                // “名-值”对必须转换成URL编码格式,否则极有可能丢失数据,所
                //以调用了javascript内建的encodeURIComponent函数
                if (oForm.elements.name!='')
                {
                    if (oForm.elements.type=='select-one')

                    {
                        element_value=e.options[oForm.elements.selectedIndex].value;
                    }
                    else if (oForm.elements.type=='checkbox' || oForm.elements.type=='radio')
                    {
                        if (oForm.elements.checked==false){
                            continue;
                        }
                        element_value=oForm.elements.value;
                    }
                    else if (oForm.elements.type=='textarea')
                    {

                        // element_value=oForm.elements.value;
                        try{element_value=tinyMCE.get(oForm.elements.name).getContent();}catch(e){
                            element_value=oForm.elements.value;
                        }


                    }
                    else {
                        element_value=oForm.elements.value;
                    }
                }
                var sParam = encodeURIComponent(oForm.elements.name);
                sParam += "=";
                sParam += encodeURIComponent(element_value);
                aParams.push(sParam);
            }
            return aParams.join("&");
        }
        function finishedtime()
        {
            if(b_finish)return;
            try{
                window.parent.mainFrame.paperfinish(2);
                b_finish=true;
            }catch(ex)
            {
                window.parent.location="userpaper.userpaperfinishex.flow?sid=4223816916762495&p_id=4223816916762495&submittype=2";
                b_finish=true;
            }
        }
        function showstate()
        {
            if(b_finish)return;
            var d = new Date();
            var url="userpaper.userpaperdoublebstatelist.flow?p_id=4223816916762495&tran_timeex="+d.getTime();
            sendRequest(url);
        }
        function complete(ajaxRequestObj){
            var str= ajaxRequestObj.responseText;
            if(null != str && "" != str){
                window.parent.mainFrame.tckTypeDiv.innerHTML=str;
                window.parent.mainFrame.showstatediv();
            }
        }
        function close(){
            window.parent.mainFrame.tckTypeDiv.style.display="none";
        }
        var close_try=0;//离开次数
        var close_count=0;//能够离开次数
        var close_flag=true;
        window.onblur=auto_submit;
        function auto_submit(){

        }
        function try_title()
        {
            return "允许意外操作造成的切屏!<font color='red'>"+close_count+"</font>次,您已经切出去<font color='red'>"+close_try+"</font>次.</br></br><font color='red' size='5' ><strong>  故意切屏按违纪处理!!!<br>如果超出限制系统将会自动收卷</strong></font>";
        }
        function try_close()
        {
            return "您已经切出去"+close_try+"次,系统将会自动收卷!";
        }
        function otry_title()
        {
            return "您考试违例了,请不要切出考试页面,否则系统将会自动收卷!";
        }
        function otry_close()
        {
            return "您考试违例了,系统将会自动收卷!";
        }
        function setclosetrue()
        {
            close_flag=true;
        }
        function setclosefalse()
        {
            close_flag=false;
        }
        function showmodel()
        {
            if(b_finish)return;
            var d = new Date();
            var url="userpaper.userpapermodellist.flow?p_id=4223816916762495&u_id=3326666393203512&tran_timeex="+d.getTime();
            sendRequest(url);
        }

        function updatelanflag(lan)
        {
            window.parent.bottomFrame.location="userpaper.updatelanflagmain.flow?p_id=3223816916762495&u_id=3326666393203512&u_lan="+lan;
        }
        window.parent.titleFrame.location="/wis18/usermain/paper/repeattitle.jsp";
</script>


发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

D调华丽 发表于 2013-9-17 16:30
这是腾讯考什么的??
 楼主| 八字先生 发表于 2013-9-17 16:41
D调华丽 发表于 2013-9-17 16:30
这是腾讯考什么的??

腾讯搜搜这块的
正方形 发表于 2013-9-17 17:26
alexjeniks 发表于 2013-9-17 17:57
楼主去考试了?
 楼主| 八字先生 发表于 2013-9-17 22:51
正方形 发表于 2013-9-17 17:26
感谢分享 顶!应该是搜搜问问那个考试吧

腾讯竞价这块的,和搜搜问问的不一样,问问的考试是开放式的
 楼主| 八字先生 发表于 2013-9-17 22:52
alexjeniks 发表于 2013-9-17 17:57
楼主去考试了?

是啊,考了一半考不下去了,明天重新考
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则

快速回复 收藏帖子 返回列表 搜索

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-9-21 23:33

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表