<!DOCTYPE html>
<html>
<head>
  <meta charset="<?php echo $cfg_soft_lang; ?>">
  <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
  <title>获取代码</title>
  <link rel="stylesheet" href="../static/web/css/bootstrap.min.css">
  <link rel="stylesheet" href="../static/web/font/css/font-awesome.min.css">
  <link rel="stylesheet" href="../static/web/css/admin.css">
</head>
<body>
  <table width="98%" cellpadding="3" cellspacing="1" align="center" class="table maintable mt-3 mb-3">
    <tr>
      <td height="26" background="../static/web/img/tbg.gif"><a href="vote_main.php">投票管理</a> &gt; 获取代码</td>
    </tr>
    <tr>
      <td>
        <table width="98%" cellspacing="2" cellpadding="2">
          <tr bgcolor="#EBF2DB">
            <td width="100%" bgcolor="#EBF2DB">在封面或主页模板中使用的标记：</td>
          </tr>
          <tr>
            <td>
              <table width="100%" cellspacing="0" cellpadding="0">
                <form name="form1" action="tag_test_action.php" target="stafrm" method="post">
                  <input type="hidden" name="showsource" value="no">
                  <input type="hidden" name="_csrf_token" value="<?php echo $GLOBALS['csrf_token']; ?>">
                  <tr>
                    <td>
                      <textarea name="partcode" cols="45" rows="6" id="partcode">{dede:vote id='<?php echo $aid?>' lineheight='26' tablewidth='100%' titlebgcolor='#EDEDE2' titlebackground='' tablebgcolor='#ffffff'}{/dede:vote}</textarea>
                    </td>
                    <td rowspan="2">
                      <iframe name="stafrm" frameborder="0" id="stafrm" width="100%" height="100%"></iframe>
                    </td>
                  </tr>
                  <tr>
                    <td height="36" align="center">
                      <button type="submit" name="Submit" class="btn btn-success btn-sm">提交测试</button>
                    </td>
                  </tr>
                </form>
              </table>
            </td>
          </tr>
          <tr bgcolor="#EBF2DB">
            <td bgcolor="#EBF2DB">在封面或主页模板中使用的JS：</td>
          </tr>
          <tr>
            <td>
              <textarea name="htmlf" cols="60" rows="5" id="htmlf"><script src="<?php echo $cfg_basehost.'/data/vote/vote_'.$aid.'.js' ?>"></script></textarea>
            </td>
          </tr>
          <tr bgcolor="#EBF2DB">
            <td bgcolor="#EBF2DB">默认生成的表单HTML：</td>
          </tr>
          <tr>
            <td>
              <textarea name="htmlf" cols="60" rows="10" id="htmlf">
              <?php
              $vt = new DedeVote($aid);
			        echo $vt->GetVoteForm();
			        $vt->Close();
			        ?>  
              </textarea>
            </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
</body>
</html>