Exemple #1
0
 public void QuizTest(int CityId)
 {
     #region QuizTest
     StringBuilder sb = new StringBuilder();
     DataTable     dt = objAdmin.GetQuizTest(CityId);
     if (dt != null && dt.Rows.Count > 0)
     {
         sb.Append("<h3>" + dt.Rows[0]["QuizName"].ToString() + "</h3>");
         sb.Append("<table cellpadding='0' cellspacing='0'>");
         sb.Append("<tr>");
         sb.Append("<td align='center' valign='middle'>");
         sb.Append("<object id='quiz' width='720' height='470' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' align='middle'>");
         sb.Append("<param name='allowScriptAccess' value='sameDomain' />");
         sb.Append("<param name='movie' value='../QuizTests/" + dt.Rows[0]["QuizFile"].ToString() + "' />");
         sb.Append("<param name='quality' value='high' />");
         sb.Append("<param name='bgcolor' value='#ffffff' />");
         sb.Append("<param name='allowFullScreen' value='true' />");
         sb.Append("<embed id='embedQuiz' src='../QuizTests/" + dt.Rows[0]["QuizFile"].ToString() + "' quality='high' bgcolor='#ffffff' width='720' height='470' name='quiz' align='middle' ");
         sb.Append(" allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.adobe.com/go/getflashplayer' allowFullScreen='true' />");
         sb.Append("</object>");
         sb.Append("</td>");
         sb.Append("</tr>");
         sb.Append("</table>");
     }
     else
     {
         div_QuizTest.Visible = false;
         sb.Append("<b>" + (string)GetLocalResourceObject("NoQuizCreated") + "</b><br/>" + (string)GetLocalResourceObject("ContactAdmin") + "<br/><br/>");
         btnQuizNext.Visible = false;
     }
     lt_Quiz.Text = sb.ToString();
     #endregion
 }
Exemple #2
0
    public void QuizTest(int CityId)
    {
        #region QuizTest`dc
        StringBuilder sb = new StringBuilder();

        DataTable dt = objAdmin.GetQuizTest(CityId);

        if (dt != null && dt.Rows.Count > 0)
        {
            Decompress(dt.Rows[0]["QuizFile"].ToString());

            sb.Append("<h3>" + dt.Rows[0]["QuizName"].ToString() + "</h3>");
            sb.Append("<table cellpadding='0' cellspacing='0'>");
            sb.Append("<tr>");
            sb.Append("<td align='center' valign='middle'>");

            sb.Append("<iframe id='quiz' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' src='../QuizTests/HtmlQuiz1/index.html' frameborder='0' align='middle' allowfullscreen='true' width='720' height='470'>");

            //sb.Append("<object id='quiz' width='720' height='470' type='text/html' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' data='../QuizTests/HtmlQuiz1/index.html'  align='middle'>");
            //sb.Append("<param name='allowScriptAccess' value='sameDomain' />");
            //sb.Append("<param name='movie' value='../QuizTests/" + dt.Rows[0]["QuizFile"].ToString() + "' />");
            //sb.Append("<param name='movie' value='../QuizTests/HtmlQuiz1/" + "index.html" + "' />");
            //sb.Append("<param name='quality' value='high' />");
            sb.Append("<param name='bgcolor' value='#ffffff' />");
            //sb.Append("<param name='allowFullScreen' value='true' />");
            //  sb.Append("<embed id='embedQuiz' src='../QuizTests/HtmlQuiz1/index.html' bgcolor='#ffffff' width='720' height='470' name='quiz' align='middle' />");
            // sb.Append("<embed id='embedQuiz' src='../QuizTests/" + dt.Rows[0]["QuizFile"].ToString() + "' quality='high' bgcolor='#ffffff' width='720' height='470' name='quiz' align='middle' ");
            //sb.Append(" allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.adobe.com/go/getflashplayer' allowFullScreen='true' />");
            // sb.Append("</object>");
            sb.Append("</iframe>");
            sb.Append("</td>");
            sb.Append("</tr>");
            sb.Append("</table>");

            //  btnQuizNext.Visible = true;

            if (!ClientScript.IsStartupScriptRegistered("JSScript"))
            {
                // ClientScript.RegisterStartupScript(this.GetType(), "JSScript", sb.ToString());
            }
            else
            {
                div_QuizTest.Visible = false;
                sb.Append("<b>" + (string)GetLocalResourceObject("NoQuizCreated") + "</b><br/>" + (string)GetLocalResourceObject("ContactAdmin") + "<br/><br/>");
                btnQuizNext.Visible = false;
            }
            lt_Quiz.Text = sb.ToString();
            sb.Clear();
        }
        #endregion
        sb = null;
    }