<?php
require 'conn/conn.php';
require 'conn/function.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>自定义后缀 - <?php echo $C_title?></title>
    <meta name="description" content="<?php echo $C_description?>" />
    <meta name="keywords" content="<?php echo $C_keyword?>" />
    <link href="media/<?php echo $C_ico?>" rel="shortcut icon" />
	<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">  
	<script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
	<script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>

	<style type="text/css">
		body{background: #f7f7f7}
	</style>
</head>
<body>
<?php require 'wap_header.php';?>
<div style="padding: 10px">
        <form class="form-horizontal" id="form2">
            <div class="panel panel-info">
              <div class="panel-heading">自定义后缀</div>
              <div class="panel-body">
                  <p><input type="text" class="form-control" name="url" placeholder="请输入 http:// 或 https:// 开头的网址" id="url"></p>
                  <p>
<select class="form-control" name="domain" style="width: 100%;display: inline-block;">
                          <option value="0">普通跳转</option>
                          <option value="1">防红跳转</option>
                          <option value="2">强开直链</option>
                        </select>

                      <div class="input-group" style="width: 100%">
                        
                                <select class="form-control" name="domain" style="width: 40%;display: inline-block;">
                                  <?php
                                  if(strpos($C_dwzon,"-2")!==false){
                                    echo "<option value=\"".gethttp().$_SERVER["HTTP_HOST"]."\" >".gethttp().$_SERVER["HTTP_HOST"]."/</option>";
                                  }
                                  $sql="select * from sl_domain where D_show=1";
                                  $result = mysqli_query($conn, $sql);
                                  if (mysqli_num_rows($result) > 0) {
                                    while($row = mysqli_fetch_assoc($result)) {
                                      echo "<option value=\"".$row["D_http"].$row["D_domain"]."\" >".$row["D_http"].$row["D_domain"]."/</option>";
                                    }
                                  }
                                  ?>

                                </select><input type="text"  name="attach" class="form-control" placeholder="自定义后缀（字母或数字）" style="width: 60%;display: inline-block;">
        </div>


                  </p>
                  <button type="button" onclick="creat_custom(2)" class="btn btn-primary btn-block" >生成短链接</button>
                <p id="msg2" style="color: #f00"></p>
              </div>
            </div>
            </form>
</div>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
          &times;
        </button>
        <h4 class="modal-title" id="myModalLabel">
          短网址生成
        </h4>
      </div>
      <div class="modal-body" style="text-align: center;" id="modal_body">
        <div id="billImage" style="width: 200px;display: inline-block;margin-bottom: 10px"></div>
        <p>
          <div class="input-group">
            <span class="input-group-addon">原网址</span>
                      <input type="text" class="form-control" id="long">
                      
                  </div>
                  <div id="copymsg" style="font-size: 12px;margin-top: 10px;color: #009900"></div>
              </p>
        <p>
          <div class="input-group">
            <span class="input-group-addon">短链接</span>
                      <input type="text" class="form-control" id="short">
                      <span class="input-group-btn">
                          <button class="btn btn-info" type="button" onclick="copy()">复制</button>
                      </span>
                  </div>
                  <div id="copymsg" style="font-size: 12px;margin-top: 10px;color: #009900"></div>
              </p>
      </div>
    </div>
  </div>
</div>
<script src="js/wap_main.js?v=0928"></script>
<?php require 'wap_footer.php';?>
</body>
</html>