<?php
require 'conn/conn.php';
require 'conn/function.php';

if(isMobile()){
    Header("Location:wap_urls.php");
    die();
}

?>
<!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 href="css/main.css" rel="stylesheet">
    <script src="lib/jquery-3.4.1.min.js"></script>
    <style>
    #return{font-size: 15px}
    #return hr{border-top-color: rgba(77,82,89,0.05);margin: 2rem auto;border-top: 1px solid #eee;}
    #return a{text-decoration: none;color: #4587FF}
    </style>
</head>
<body>
    <div class="header">
        <div class="main">
            <a href="./"><img src="media/<?php echo $C_logo?>" alt="<?php echo $C_title?>" class="logo"></a>
            <div class="menu">
                <a href="./">首页</a>
                <a href="urls.php" class="active">批量生成</a>
                <a href="custom.php" >自定义后缀</a>
                <a href="api.php" >API文档</a>
                <?php
                if(checkauth()==2){
                    if($_SESSION["M_id"]==""){
                        echo "<button id=\"goLogin\">注册 / 登录</button>";
                    }else{
                        echo "<button id=\"goLogin\">".$_SESSION["M_login"]."</button>";
                    }
                }
                ?>
            </div>
        </div>
    </div>
    <div class="banner" style="background: url('img/index_banner2.jpg');">
        <form  id="form">
            <div class="" >
                <textarea name="url" placeholder="请输入 http:// 或 https:// 开头的网址，每行一个" style="width: 1000px;height: 300px;border-radius: 10px;margin-top: 30px;padding: 20px;font-size: 15px;border:none;font-family: '微软雅黑'"></textarea>

                <p style="color: #fff;margin-top: 20px;" id="d">
                    <select name="type" style="width: 100px;height: 30px">
                        <option value="0">普通跳转</option>
                        <option value="1">防红跳转</option>
                        <option value="2">强开直链</option>
                    </select>
                    <?php 
                    if(strpos($C_dwzon,"-2")!==false){echo "<label><input type=\"radio\" name=\"d\" value=\"-2\"> ".$_SERVER["HTTP_HOST"]."</label> ";}

                    $sql="select D_id,D_domain 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 "<label><input type=\"radio\" name=\"d\" value=\"".$row["D_id"]."\"> ".$row["D_domain"]."</label> ";
                        }
                    }
                    

                    if(strpos($C_extra,"1")!==false){echo "<label><input type=\"radio\" name=\"d\" value=\"-101\"> 微信随机通道</label> ";}
                    if(strpos($C_extra,"2")!==false){echo "<label><input type=\"radio\" name=\"d\" value=\"-102\"> QQ随机通道</label> ";}
                    ?>
                </p>
                <div class="search-btn" onclick="creat2()" style="width: 150px;
    height: 50px;
    background: linear-gradient(-90deg,rgba(84,124,255,1) 0%,rgba(92,197,253,1) 100%);
    color: white;
    font-size: 17px;

    cursor: pointer;
    border-radius: 10px;display:inline-block;line-height:50px;margin-top: 0px;
    ">批量生成短链</div>
            </div>
        </form>
    </div>

    <div style="padding-top:50px;margin: 0 auto;width: 1050px;">
        <div id="return"></div>
    </div>

    <div class="main">
        <div class="title">· 特色功能 ·</div>
        <div class="intro">八大基础功能特性，让连接管理、数据统计、AB测试更方便</div>
        <div style="margin-bottom: 50px;">
            <div class="box">
                <img src="img/scene1-1.png">
                <div class="btitle">链接缩短</div>
                <div class="bintro">将原始链接快速转为短链接</div>
            </div><div class="box">
                <img src="img/scene1-2.png">
                <div class="btitle">永久有效</div>
                <div class="bintro">生成短连接永久有效</div>
            </div><div class="box">
                <img src="img/scene1-3.png">
                <div class="btitle">智能跳转</div>
                <div class="bintro">同一段链接自定义跳转不同地址</div>
            </div><div class="box">
                <img src="img/scene1-4.png">
                <div class="btitle">访问统计</div>
                <div class="bintro">多维度数据统计，一键生成报表</div>
            </div><div class="box">
                <img src="img/scene1-5.png">
                <div class="btitle">随时修改</div>
                <div class="bintro">随时修改短链接跳转地址</div>
            </div><div class="box">
                <img src="img/scene1-6.png">
                <div class="btitle">批量创建</div>
                <div class="bintro">批量创建操作让连接生产更高效</div>
            </div><div class="box">
                <img src="img/scene1-7.png">
                <div class="btitle">分组管理</div>
                <div class="bintro">分组让短链接管理更方便</div>
            </div><div class="box">
                <img src="img/scene1-8.png">
                <div class="btitle">推广模板</div>
                <div class="bintro">极简生成各类推广模板</div>
            </div>
        </div>
    </div>
    
    <div class="footer">
        <div class="main">
            <div class="l1">
                <p style="font-size: 17px;color:#fff">产品及服务</p>
                <p>链接缩短·永久有效</p>
                <p>访问统计·报表分享</p>
                <p>随机跳转·分组管理</p>
                <p>批量创建·随时修改</p>
            </div><div class="l2">
                <p style="font-size: 17px;color:#fff">在线客服</p>
                <div style="font-size:40px;color:#fff;font-weight: bold;">QQ<?php echo $C_qq?></div>
                <p><img src="img/phone.png"> <?php echo $C_mobile?></p>
                <p>( 咨询时间：9:00 - 22:00 )</p>
            </div><div class="l3">
                <p style="font-size: 17px;color:#fff">微信公众号</p>
                <p><img src="media/<?php echo $C_qrcode?>" style="width:150px"></p>
            </div>
            <div class="logos">
                <?php
$sql="select * from sl_link order by L_order,L_id desc";
                $result = mysqli_query($conn,  $sql);
                if (mysqli_num_rows($result) > 0) {
                while($row = mysqli_fetch_assoc($result)) {
                    echo " <a href=\"".$row["L_url"]."\" target=\"_blank\"><img src=\"media/".$row["L_pic"]."\" alt=\"".$row["L_title"]."\"></a> ";
                    }
                } 
?>
            </div>
            <div class="copyright"><?php 
                    echo $C_copyright;
                    echo " <u><a href=\"https://beian.miit.gov.cn/\" target=\"blank\">".$C_beian."</a></u> ";
                    echo $C_code;
                    ?></div>
        </div>
    </div>
<script src="js/main.js?v=0928"></script>
<script>
    $("#d").find("label input:first").attr("checked","checked");
</script>
</body>
</html>