Explorar el Código

fleat: relationship

igb hace 1 semana
padre
commit
7914110c1e
Se han modificado 3 ficheros con 432 adiciones y 126 borrados
  1. 9 3
      conn.php
  2. 4 4
      relationshipAdd.php
  3. 419 119
      relationships.php

+ 9 - 3
conn.php

@@ -364,19 +364,25 @@ function sitelink_replace($t0, $t1, $t2, $t3) {
     return $t4;
 }
 
+
+if(!function_exists('htmlspecialcharsFix')) {
 //处理特殊字符
 function htmlspecialcharsFix($input_str)
 {
     return $input_str;
 }
+}
 
+if(!function_exists('htmlspecialcharsAjaxFix')) {
 //处理特殊字符
-function htmlspecialcharsAjaxFix($input_str)
-{
+    function htmlspecialcharsAjaxFix($input_str)
+    {
 
-    return textUncode($input_str);
+        return textUncode($input_str);
+    }
 }
 
+
 if(!function_exists('textDecode')) {
     function textDecode($str) {
         return htmlspecialchars_decode($str, ENT_QUOTES);

+ 4 - 4
relationshipAdd.php

@@ -304,7 +304,7 @@ if (isset($_GET['id']) && is_numeric($_GET['id'])) {
                                     if ($row['cs_code']) {
                                         $displayText = $row['cs_code'] . ' - ' . $displayText;
                                     }
-                                    echo htmlspecialchars(textDecode($displayText));
+                                    echo textDecode($displayText);
                                 }
                             }
                             ?>"><?php 
@@ -319,7 +319,7 @@ if (isset($_GET['id']) && is_numeric($_GET['id'])) {
                                     if ($row['cs_code']) {
                                         $displayText = $row['cs_code'] . ' - ' . $displayText;
                                     }
-                                    echo htmlspecialchars(textDecode($displayText));
+                                    echo textDecode($displayText);
                                 }
                             }
                             ?></div>
@@ -346,7 +346,7 @@ if (isset($_GET['id']) && is_numeric($_GET['id'])) {
                                     if ($row['cs_code']) {
                                         $displayText = $row['cs_code'] . ' - ' . $displayText;
                                     }
-                                    echo htmlspecialchars(textDecode($displayText));
+                                    echo textDecode($displayText);
                                 }
                             }
                             ?>"><?php 
@@ -361,7 +361,7 @@ if (isset($_GET['id']) && is_numeric($_GET['id'])) {
                                     if ($row['cs_code']) {
                                         $displayText = $row['cs_code'] . ' - ' . $displayText;
                                     }
-                                    echo htmlspecialchars(textDecode($displayText));
+                                    echo textDecode($displayText);
                                 }
                             }
                             ?></div>

+ 419 - 119
relationships.php

@@ -1,6 +1,21 @@
 <?php
 require_once 'conn.php';
 checkLogin();
+
+ 
+$keys = $_GET['Keys'] ?? '';
+$fliterRelationType = $_GET['FliterRelationType'] ?? '';
+$fliterStatus = $_GET['FliterStatus'] ?? '';
+$page = $_GET['Page'] ?? 1;
+$urlStr = '';
+
+if (!empty($fliterRelationType)) {
+    $urlStr .= "&FliterRelationType=" . urlencode($fliterRelationType);
+}
+
+if (isset($fliterStatus) && $fliterStatus !== '') {
+    $urlStr .= "&FliterStatus=" . urlencode($fliterStatus);
+}
 ?>
 <!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml">
@@ -8,74 +23,270 @@ checkLogin();
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     <title>客户关系管理</title>
     <link rel="stylesheet" href="css/common.css" type="text/css" />
+    <link rel="stylesheet" href="css/alert.css" type="text/css" />
     <script src="js/jquery-1.7.2.min.js"></script>
     <script src="js/js.js"></script>
-</head>
-<body class="clear">
+    <style>
+        body {
+            margin: 0;
+            padding: 20px;
+            background: #fff;
+        }
+        #man_zone {
+            margin-left: 0;
+        }
+        
+        /* 表格布局 */
+        .table2 {
+            width: 100%;
+        }
+        
+        .theader, .tline {
+            display: flex;
+            flex-direction: row;
+            align-items: center;
+            width: 100%;
+            border-bottom: 1px solid #ddd;
+        }
+        
+        .theader {
+            background-color: #f2f2f2;
+            font-weight: bold;
+            height: 40px;
+        }
+        
+        .tline {
+            height: 45px;
+        }
+        
+        .tline:hover {
+            background-color: #f5f5f5;
+        }
+        
+        /* 列宽定义 */
+        .col2 { width: 5%; text-align: center; }
+        .col3 { width: 20%; }
+        .col4 { width: 20%; }
+        .col5 { width: 10%; }
+        .col6 { width: 8%; text-align: center; }
+        .col7 { width: 8%; }
+        .col8 { width: 14%; }
+        .col9 { width: 15%; text-align: center; }
+        
+        /* 表格布局修复 */
+        .table2 .col2 { width: 5%; text-align: center; }
+        .table2 .col3 { width: 20%; }
+        .table2 .col4 { width: 20%; }
+        .table2 .col5 { width: 10%; }
+        .table2 .col6 { width: 8%; text-align: center; }
+        .table2 .col7 { width: 8%; }
+        .table2 .col8 { width: 14%; }
+        .table2 .col9 { width: 15%; text-align: center; }
+        
+        .theader > div, .tline > div {
+            padding: 0 5px;
+            overflow: hidden;
+            text-overflow: ellipsis;
+            white-space: nowrap;
+        }
+        
+        /* 搜索栏样式 */
+        .fastSelect {
+            margin-bottom: 20px;
+            background-color: #f9f9f9;
+            padding: 15px;
+            border-radius: 3px;
+            border: 1px solid #eee;
+        }
+        
+        .fastSelect H1 {
+            font-size: 16px;
+            margin-top: 0;
+            margin-bottom: 10px;
+            color: #333;
+        }
+        
+        .selectItem {
+            margin-bottom: 10px;
+            display: flex;
+            align-items: center;
+            gap: 10px;
+        }
+        
+        .selectItem label {
+            font-weight: bold;
+            font-size: 13px;
+            color: #555;
+        }
+        
+        .inputSearch {
+            display: flex;
+            align-items: center;
+            margin-top: 0px;
+        }
+
+
+
+        .inputSearch .inputTxt {
+            padding:1px 5px;
+            border: 1px solid #ccc;
 
+            width: 300px;
+            height: 30px;
+        }
+        
+        .searchgo {
+            margin-left: 5px;
+            padding: 0 15px;
+            background: #337ab7;
+            color: white;
+            border: none;
+            border-radius: 3px;
+            cursor: pointer;
+            height: 32px;
+            line-height: 32px;
+        }
+        
+        /* 按钮容器 */
+        .search-button-container {
+            display: flex;
+            align-items: flex-end;
+        }
+        
+        /* 状态颜色 */
+        .status-active {
+            color: green;
+        }
+        
+        .status-inactive {
+            color: red;
+        }
+        
+        /* 按钮样式 */
+        .ico {
+            margin: 0 5px;
+            text-decoration: none;
+        }
+        
+        .ico_edit {
+            color: #3498db;
+        }
+        
+        .ico_del {
+            color: #e74c3c;
+        }
+        
+        .ico:hover {
+            text-decoration: underline;
+        }
+        
+        /* 详情样式 */
+        .detail-row {
+            display: none;
+            background-color: #f8f8f8;
+            border-bottom: 1px solid #ddd;
+            padding: 15px;
+        }
+        
+        .detail-container {
+            display: flex;
+            flex-wrap: wrap;
+        }
+        
+        .detail-item {
+            width: 33%;
+            margin-bottom: 10px;
+        }
+        
+        .detail-item label {
+            font-weight: bold;
+            display: block;
+            margin-bottom: 3px;
+            color: #555;
+        }
+        
+        .detail-item-full {
+            width: 100%;
+            margin-bottom: 10px;
+        }
+        
+        .detail-content {
+            margin-top: 5px;
+        }
+        
+        .clickable-row {
+            cursor: pointer;
+        }
+    </style>
+</head>
+<body>
 <div id="man_zone">
-    <form action="" method="get" id="searchForm">
-        <table width="100%" cellpadding="3" cellspacing="1" class="table1">
-            <tr>
-                <td>
-                    <input type="text" name="Keys" size="30" placeholder="关键词搜索" value="<?= htmlspecialchars($_GET['Keys'] ?? '') ?>" />
-                    <select name="FliterRelationType">
-                        <option value="">所有关系类型</option>
-                        <option value="1" <?= ($_GET['FliterRelationType'] ?? '') == '1' ? 'selected' : '' ?>>母公司-子公司</option>
-                        <option value="2" <?= ($_GET['FliterRelationType'] ?? '') == '2' ? 'selected' : '' ?>>供应商-客户</option>
-                        <option value="3" <?= ($_GET['FliterRelationType'] ?? '') == '3' ? 'selected' : '' ?>>合作伙伴</option>
-                        <option value="4" <?= ($_GET['FliterRelationType'] ?? '') == '4' ? 'selected' : '' ?>>竞争对手</option>
-                        <option value="5" <?= ($_GET['FliterRelationType'] ?? '') == '5' ? 'selected' : '' ?>>推荐人</option>
-                        <option value="6" <?= ($_GET['FliterRelationType'] ?? '') == '6' ? 'selected' : '' ?>>其他</option>
-                    </select>
-                    <select name="FliterStatus">
-                        <option value="">全部状态</option>
-                        <option value="1" <?= ($_GET['FliterStatus'] ?? '') == '1' ? 'selected' : '' ?>>启用</option>
-                        <option value="0" <?= ($_GET['FliterStatus'] ?? '') == '0' ? 'selected' : '' ?>>停用</option>
-                    </select>
-                    <input type="submit" value="搜索" class="btn1" />
-                    <input type="button" value="新增客户关系" class="btn1" onclick="window.location.href='relationshipAdd.php'" />
-                </td>
-            </tr>
-        </table>
-    </form>
-    
-    <table width="100%" cellpadding="3" cellspacing="1" class="table1">
-        <tr>
-            <th>源客户</th>
-            <th>目标客户</th>
-            <th>关系类型</th>
-            <th>状态</th>
-            <th>创建人</th>
-            <th>创建时间</th>
-            <th>更新时间</th>
-            <th>操作</th>
-        </tr>
+    <div class="fastSelect clear">
+        <H1>筛选条件</H1>
+        <div class="selectItem">
+            <label>关系类型</label>
+            <select name="FliterRelationType" class="filterSearch">
+                <option value="">所有关系类型</option>
+                <option value="1" <?= $fliterRelationType == '1' ? 'selected' : '' ?>>母公司-子公司</option>
+                <option value="2" <?= $fliterRelationType == '2' ? 'selected' : '' ?>>供应商-客户</option>
+                <option value="3" <?= $fliterRelationType == '3' ? 'selected' : '' ?>>合作伙伴</option>
+                <option value="4" <?= $fliterRelationType == '4' ? 'selected' : '' ?>>竞争对手</option>
+                <option value="5" <?= $fliterRelationType == '5' ? 'selected' : '' ?>>推荐人</option>
+                <option value="6" <?= $fliterRelationType == '6' ? 'selected' : '' ?>>其他</option>
+            </select>
+        </div>
+        <div class="selectItem">
+            <label>状态</label>
+            <select name="FliterStatus" class="filterSearch">
+                <option value="">全部状态</option>
+                <option value="1" <?= $fliterStatus == '1' ? 'selected' : '' ?>>启用</option>
+                <option value="0" <?= $fliterStatus == '0' ? 'selected' : '' ?>>停用</option>
+            </select>
+        </div>
+        <div class="inputSearch">
+            <input type="text" id="keys" class="inputTxt" placeholder="请输入搜索关键词"
+                value="<?= empty($keys) ? '' : htmlspecialchars($keys) ?>" />
+            <input type="button" id="searchgo" class="searchgo" value="搜索"
+                onClick="location.href='?Keys='+encodeURIComponent(document.getElementById('keys').value)" />
+        </div>
+    </div>
+
+    <div align="right" style="margin-bottom: 10px;">
+        <input type="button" value="新增客户关系" class="btn1" onClick="location.href='relationshipAdd.php'" />
+    </div>
+
+    <div class="table2">
+        <div class="theader">
+            <div class="col2">序号</div>
+            <div class="col3">源客户</div>
+            <div class="col4">目标客户</div>
+            <div class="col5">关系类型</div>
+            <div class="col6">状态</div>
+            <div class="col7">创建人</div>
+            <div class="col8">更新时间</div>
+            <div class="col9">操作</div>
+        </div>
+
         <?php
         // 构建查询条件
         $whereClause = "WHERE 1=1";
         $params = [];
         
-        if (!empty($_GET['Keys'])) {
-            $keys = '%' . $_GET['Keys'] . '%';
-            $whereClause .= " AND (c1.cs_company LIKE ? OR c2.cs_company LIKE ? OR cr.description LIKE ?)";
-            $params[] = $keys;
-            $params[] = $keys;
-            $params[] = $keys;
+        if (!empty($keys)) {
+            $searchKeys = '%' . $conn->real_escape_string($keys) . '%';
+            $whereClause .= " AND (c1.cs_company LIKE '$searchKeys' OR c2.cs_company LIKE '$searchKeys' OR cr.description LIKE '$searchKeys')";
         }
         
-        if (!empty($_GET['FliterRelationType'])) {
-            $whereClause .= " AND cr.relationship_type = ?";
-            $params[] = $_GET['FliterRelationType'];
+        if (!empty($fliterRelationType)) {
+            $whereClause .= " AND cr.relationship_type = '" . $conn->real_escape_string($fliterRelationType) . "'";
         }
         
-        if (isset($_GET['FliterStatus']) && $_GET['FliterStatus'] !== '') {
-            $whereClause .= " AND cr.relationship_status = ?";
-            $params[] = $_GET['FliterStatus'];
+        if (isset($fliterStatus) && $fliterStatus !== '') {
+            $whereClause .= " AND cr.relationship_status = '" . $conn->real_escape_string($fliterStatus) . "'";
         }
         
         // 分页设置
-        $page = isset($_GET['Page']) ? intval($_GET['Page']) : 1;
+        $page = (int)$page;
         $perpage = 20; // 每页显示条数
         $start = ($page - 1) * $perpage;
         
@@ -86,20 +297,21 @@ checkLogin();
                        JOIN customer c2 ON cr.target_customer_id = c2.id
                        $whereClause";
         
-        $stmt = $conn->prepare($countQuery);
-        if (!empty($params)) {
-            $types = str_repeat('s', count($params));
-            $stmt->bind_param($types, ...$params);
-        }
-        $stmt->execute();
-        $result = $stmt->get_result();
+        $result = $conn->query($countQuery);
         $row = $result->fetch_assoc();
         $totalRecords = $row['total'];
         $totalPages = ceil($totalRecords / $perpage);
+        if ($totalPages < 1) $totalPages = 1;
+        
+        // 验证当前页码
+        if ($page < 1) $page = 1;
+        if ($page > $totalPages) $page = $totalPages;
         
         // 获取关系列表
         $query = "SELECT cr.*, 
+                  c1.cs_code as source_code,
                   c1.cs_company as source_company, 
+                  c2.cs_code as target_code,
                   c2.cs_company as target_company,
                   e.em_user as creator
                   FROM customer_relationship cr
@@ -108,23 +320,14 @@ checkLogin();
                   LEFT JOIN employee e ON cr.employee_id = e.id
                   $whereClause
                   ORDER BY cr.updated_at DESC
-                  LIMIT ?, ?";
-        
-        $stmt = $conn->prepare($query);
-        if (!empty($params)) {
-            $params[] = $start;
-            $params[] = $perpage;
-            $types = str_repeat('s', count($params) - 2) . 'ii';
-            $stmt->bind_param($types, ...$params);
-        } else {
-            $stmt->bind_param('ii', $start, $perpage);
-        }
+                  LIMIT $start, $perpage";
         
-        $stmt->execute();
-        $result = $stmt->get_result();
+        $result = $conn->query($query);
         
         if ($result->num_rows > 0) {
+            $tempNum = ($page - 1) * $perpage;
             while ($row = $result->fetch_assoc()) {
+                $tempNum++;
                 // 获取关系类型描述
                 $relationType = '';
                 switch ($row['relationship_type']) {
@@ -136,62 +339,159 @@ checkLogin();
                     case 6: $relationType = '其他'; break;
                 }
                 
-                $status = $row['relationship_status'] == 1 ? '<span style="color:green">启用</span>' : '<span style="color:red">停用</span>';
+                $status = $row['relationship_status'] == 1 ? 
+                    '<span class="status-active">启用</span>' : 
+                    '<span class="status-inactive">停用</span>';
                 
-                echo '<tr>';
-                echo '<td>' . textDecode($row['source_company']) . '</td>';
-                echo '<td>' . textDecode($row['target_company']) . '</td>';
-                echo '<td>' . $relationType . '</td>';
-                echo '<td>' . $status . '</td>';
-                echo '<td>' . textDecode($row['creator']) . '</td>';
-                echo '<td>' . $row['created_at'] . '</td>';
-                echo '<td>' . $row['updated_at'] . '</td>';
-                echo '<td>
-                      <a href="relationshipAdd.php?id=' . $row['id'] . '">编辑</a> | 
-                      <a href="javascript:void(0)" onclick="if(confirm(\'确定要删除此关系记录吗?\')) window.location.href=\'relationshipSave.php?act=delete&id=' . $row['id'] . '\'">删除</a>
-                      </td>';
-                echo '</tr>';
+                ?>
+                <div class="tline clickable-row" data-id="<?= $row['id'] ?>">
+                    <div class="col2"><?= $tempNum ?></div>
+                    <div class="col3"><?= htmlspecialcharsFix($row['source_code'].' - '.$row['source_company']) ?></div>
+                    <div class="col4"><?= htmlspecialcharsFix($row['target_code'].' - '.$row['target_company']) ?></div>
+                    <div class="col5"><?= $relationType ?></div>
+                    <div class="col6"><?= $status ?></div>
+                    <div class="col7"><?= htmlspecialcharsFix($row['creator']) ?></div>
+                    <div class="col8"><?= $row['updated_at'] ?></div>
+                    <div class="col9">
+                        <a href="relationshipAdd.php?id=<?= $row['id'] ?>" class="ico_edit ico">编辑</a>
+                        <a href="javascript:void(0)" onclick="confirmDelete(<?= $row['id'] ?>); event.stopPropagation();" class="ico_del ico">删除</a>
+                    </div>
+                </div>
+                <div id="detail-<?= $row['id'] ?>" class="detail-row">
+                    <div class="detail-container">
+                        <div class="detail-item">
+                            <label>源客户</label>
+                            <div><?= htmlspecialcharsFix($row['source_code'].' - '.$row['source_company']) ?></div>
+                        </div>
+                        <div class="detail-item">
+                            <label>目标客户</label>
+                            <div><?= htmlspecialcharsFix($row['target_code'].' - '.$row['target_company']) ?></div>
+                        </div>
+                        <div class="detail-item">
+                            <label>关系类型</label>
+                            <div><?= $relationType ?></div>
+                        </div>
+                        <div class="detail-item">
+                            <label>状态</label>
+                            <div><?= $row['relationship_status'] == 1 ? '启用' : '停用' ?></div>
+                        </div>
+                        <div class="detail-item">
+                            <label>创建人</label>
+                            <div><?= htmlspecialcharsFix($row['creator']) ?></div>
+                        </div>
+                        <div class="detail-item">
+                            <label>创建时间</label>
+                            <div><?= $row['created_at'] ?></div>
+                        </div>
+                        <div class="detail-item">
+                            <label>更新时间</label>
+                            <div><?= $row['updated_at'] ?></div>
+                        </div>
+                        <div class="detail-item-full">
+                            <label>关系描述</label>
+                            <div><?= nl2br(htmlspecialcharsFix($row['description'] ?? '无')) ?></div>
+                        </div>
+                    </div>
+                </div>
+                <?php
             }
         } else {
-            echo '<tr><td colspan="8" style="text-align:center">没有找到客户关系记录</td></tr>';
+            if (empty($keys) && empty($fliterRelationType) && $fliterStatus === '') {
+                echo '<div class="tline"><div style="text-align:center; width:100%;">当前暂无客户关系记录</div></div>';
+            } else {
+                echo '<div class="tline"><div style="text-align:center; width:100%;"><a href="?">没有找到匹配的客户关系记录,点击返回</a></div></div>';
+            }
         }
         ?>
-    </table>
+
+        <div class="showpagebox">
+            <?php
+            if ($totalPages > 1) {
+                $pageName = "?Keys=$keys$urlStr&";
+                $pageLen = 3;
+
+                if ($page > 1) {
+                    echo "<a href=\"{$pageName}Page=1\">首页</a>";
+                    echo "<a href=\"{$pageName}Page=" . ($page - 1) . "\">上一页</a>";
+                }
+
+                if ($pageLen * 2 + 1 >= $totalPages) {
+                    $startPage = 1;
+                    $endPage = $totalPages;
+                } else {
+                    if ($page <= $pageLen + 1) {
+                        $startPage = 1;
+                        $endPage = $pageLen * 2 + 1;
+                    } else {
+                        $startPage = $page - $pageLen;
+                        $endPage = $page + $pageLen;
+                    }
+                    if ($page + $pageLen > $totalPages) {
+                        $startPage = $totalPages - $pageLen * 2;
+                        $endPage = $totalPages;
+                    }
+                }
+
+                for ($i = $startPage; $i <= $endPage; $i++) {
+                    if ($i == $page) {
+                        echo "<a class=\"current\">$i</a>";
+                    } else {
+                        echo "<a href=\"{$pageName}Page=$i\">$i</a>";
+                    }
+                }
+
+                if ($page < $totalPages) {
+                    if ($totalPages - $page > $pageLen) {
+                        echo "<a href=\"{$pageName}Page=$totalPages\">...$totalPages</a>";
+                    }
+                    echo "<a href=\"{$pageName}Page=" . ($page + 1) . "\">下一页</a>";
+                    echo "<a href=\"{$pageName}Page=$totalPages\">尾页</a>";
+                }
+            }
+            ?>
+        </div>
+    </div>
     
-    <!-- 分页 -->
-    <div class="pages">
-        <?php
-        // 构建分页链接的基础URL
-        $baseUrl = 'relationships.php?';
-        if (!empty($_GET['Keys'])) $baseUrl .= 'Keys=' . urlencode($_GET['Keys']) . '&';
-        if (!empty($_GET['FliterRelationType'])) $baseUrl .= 'FliterRelationType=' . $_GET['FliterRelationType'] . '&';
-        if (isset($_GET['FliterStatus']) && $_GET['FliterStatus'] !== '') $baseUrl .= 'FliterStatus=' . $_GET['FliterStatus'] . '&';
-        
-        if ($page > 1) {
-            echo '<a href="' . $baseUrl . 'Page=1">首页</a>';
-            echo '<a href="' . $baseUrl . 'Page=' . ($page - 1) . '">上一页</a>';
-        }
-        
-        // 显示5个页码,当前页在中间
-        $startPage = max(1, $page - 2);
-        $endPage = min($totalPages, $page + 2);
-        
-        for ($i = $startPage; $i <= $endPage; $i++) {
-            if ($i == $page) {
-                echo '<span class="current">' . $i . '</span>';
-            } else {
-                echo '<a href="' . $baseUrl . 'Page=' . $i . '">' . $i . '</a>';
+    <script>
+    $(document).ready(function() {
+        // 处理筛选条件改变
+        $('.filterSearch').change(function() {
+            var url = '?';
+            var keys = $('#keys').val();
+            if (keys && keys != '请输入搜索关键词') {
+                url += 'Keys=' + encodeURIComponent(keys) + '&';
             }
-        }
+
+            // 获取所有筛选条件
+            $('select.filterSearch').each(function() {
+                var name = $(this).attr('name');
+                var value = $(this).val();
+                if (value) {
+                    url += name + '=' + encodeURIComponent(value) + '&';
+                }
+            });
+
+            // 移除末尾的&
+            if (url.endsWith('&')) {
+                url = url.substring(0, url.length - 1);
+            }
+
+            location.href = url;
+        });
         
-        if ($page < $totalPages) {
-            echo '<a href="' . $baseUrl . 'Page=' . ($page + 1) . '">下一页</a>';
-            echo '<a href="' . $baseUrl . 'Page=' . $totalPages . '">末页</a>';
+        // 点击行显示详情
+        $('.clickable-row').click(function() {
+            var id = $(this).data('id');
+            $('#detail-' + id).slideToggle();
+        });
+    });
+    
+    function confirmDelete(id) {
+        if (confirm("确定要删除此关系记录吗?此操作不可恢复!")) {
+            window.location.href = "relationshipSave.php?act=delete&id=" + id + "&keys=<?= urlencode($keys) ?>&page=<?= $page ?>";
         }
-        
-        echo '<span class="pagestatus">第' . $page . '页/共' . $totalPages . '页</span>';
-        ?>
-    </div>
+    }
+    </script>
 </div>
 </body>
 </html>