subCustomers.php 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481
  1. <?php
  2. require_once 'conn.php';
  3. checkLogin();
  4. $act = $_GET['act'] ?? '';
  5. if ($act == 'postchk') {
  6. $keys = urlencode($_GET['Keys'] ?? '');
  7. $page = $_GET['Page'] ?? '';
  8. $chkact = str_replace('t', '', $_POST['chkact'] ?? '');
  9. if (isset($_POST['chkbox'])) {
  10. $sqlStr = "(" . implode(',', array_map('intval', (array)$_POST['chkbox'])) . ")";
  11. if ($chkact == '0') {
  12. $sql = "UPDATE customer SET cs_deal=" . (int)$chkact . " WHERE id IN " . $sqlStr;
  13. } else {
  14. $sql = "UPDATE customer SET
  15. cs_code=REPLACE(cs_code, '-', '/0'+(SELECT SUBSTRING(em_code,2,2) FROM employee WHERE id=" . (int)$chkact . ")+'-'),
  16. cs_belong=" . (int)$chkact . ",
  17. cs_chain=CONCAT(cs_chain,'," . (int)$chkact . "')
  18. WHERE id IN " . $sqlStr;
  19. }
  20. $deleteTag = "DELETE FROM tagtable WHERE customerId IN " . $sqlStr;
  21. $conn->query($sql);
  22. $conn->query($deleteTag);
  23. }
  24. header("Location: ?Keys=" . $keys . "&Page=" . $page);
  25. exit;
  26. }
  27. $keys = $_GET['Keys'] ?? '';
  28. $keyscode = textEncode($keys);
  29. $page = $_GET['Page'] ?? '';
  30. $filterCountry = $_GET['fliterCountry'] ?? '';
  31. $filterQudao = $_GET['fliterQudao'] ?? '';
  32. $filterDeal = $_GET['fliterDeal'] ?? '';
  33. $filterBusiness = $_GET['fliterBusiness'] ?? '';
  34. $filterContact = $_GET['fliterContact'] ?? '';
  35. $filterStr = "";
  36. $urlStr = "";
  37. if (!empty($filterCountry)) {
  38. $filterStr .= " AND c.cs_country=" . (int)$filterCountry;
  39. $urlStr .= "&fliterCountry=" . $filterCountry;
  40. }
  41. if (!empty($filterQudao)) {
  42. $filterStr .= " AND c.cs_from=" . (int)$filterQudao;
  43. $urlStr .= "&fliterQudao=" . $filterQudao;
  44. }
  45. if (!empty($filterDeal)) {
  46. $filterStr .= " AND c.cs_deal=" . (int)$filterDeal;
  47. $urlStr .= "&fliterDeal=" . $filterDeal;
  48. }
  49. if (!empty($filterBusiness)) {
  50. $filterStr .= " AND c.cs_type=" . (int)$filterBusiness;
  51. $urlStr .= "&fliterBusiness=" . $filterBusiness;
  52. }
  53. if (!empty($filterContact)) {
  54. switch ($filterContact) {
  55. case "1": $filterStr .= " AND (cc.tel_1 != '' OR cc.tel_2 != '' OR cc.tel_3 != '')"; break;
  56. case "2": $filterStr .= " AND (cc.wechat_1 != '' OR cc.wechat_2 != '' OR cc.wechat_3 != '')"; break;
  57. case "3": $filterStr .= " AND (cc.whatsapp_1 != '' OR cc.whatsapp_2 != '' OR cc.whatsapp_3 != '')"; break;
  58. case "4": $filterStr .= " AND (cc.email_1 != '' OR cc.email_2 != '' OR cc.email_3 != '')"; break;
  59. case "5": $filterStr .= " AND (cc.linkedin_1 != '' OR cc.linkedin_2 != '' OR cc.linkedin_3 != '')"; break;
  60. case "6": $filterStr .= " AND (cc.facebook_1 != '' OR cc.facebook_2 != '' OR cc.facebook_3 != '')"; break;
  61. case "7": $filterStr .= " AND (cc.alibaba_1 != '' OR cc.alibaba_2 != '' OR cc.alibaba_3 != '')"; break;
  62. }
  63. $urlStr .= "&fliterContact=" . $filterContact;
  64. }
  65. $keys = urlencode($keys);
  66. $hrefstr = "?keys=" . $keys;
  67. ?>
  68. <!DOCTYPE html>
  69. <html xmlns="http://www.w3.org/1999/xhtml">
  70. <head>
  71. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  72. <title>管理区域</title>
  73. <link rel="stylesheet" href="css/common.css" type="text/css" />
  74. <link rel="stylesheet" href="css/alert.css" type="text/css" />
  75. <script src="system/js/jquery-1.7.2.min.js"></script>
  76. <script src="js/js.js"></script>
  77. <style>
  78. body {
  79. margin: 0;
  80. padding: 20px;
  81. background: #fff;
  82. }
  83. #man_zone {
  84. margin-left: 0;
  85. }
  86. </style>
  87. </head>
  88. <body class="clear">
  89. <?php // require_once 'panel.php'; ?>
  90. <div id="man_zone">
  91. <form id="form1" method="post" action="?act=postchk&Keys=<?= $keys ?>&Page=<?= $page ?>" onSubmit="return false">
  92. <div class="fastSelect clear">
  93. <H1>搜索条件</H1>
  94. <div class="selectItem">
  95. <label>区域</label>
  96. <select name="fliterCountry" class="filterSearch">
  97. <option value="">请选择国家地区</option>
  98. <?php
  99. $result = $conn->query("SELECT id, countryName FROM country");
  100. while ($row = $result->fetch_assoc()) {
  101. $selected = ($filterCountry == $row['id']) ? ' selected="selected"' : '';
  102. echo "<option value=\"{$row['id']}\"{$selected}>{$row['countryName']}</option>";
  103. }
  104. ?>
  105. </select>
  106. </div>
  107. <div class="selectItem">
  108. <label>来源渠道</label>
  109. <select name="fliterQudao" class="filterSearch">
  110. <option value="">请选择渠道</option>
  111. <?php
  112. $result = $conn->query("SELECT id, ch_name FROM qudao");
  113. while ($row = $result->fetch_assoc()) {
  114. $selected = ($filterQudao == $row['id']) ? ' selected="selected"' : '';
  115. echo "<option value=\"{$row['id']}\"{$selected}>{$row['ch_name']}</option>";
  116. }
  117. ?>
  118. </select>
  119. </div>
  120. <div class="selectItem">
  121. <label>跟进阶段</label>
  122. <select name="fliterDeal" class="filterSearch">
  123. <option value="">请选择</option>
  124. <option value="0"<?= ($filterDeal == "0") ? ' selected="selected"' : '' ?>>无响应</option>
  125. <option value="1"<?= ($filterDeal == "1") ? ' selected="selected"' : '' ?>>背景调查</option>
  126. <option value="2"<?= ($filterDeal == "2") ? ' selected="selected"' : '' ?>>明确需求</option>
  127. <option value="3"<?= ($filterDeal == "3") ? ' selected="selected"' : '' ?>>已成交</option>
  128. </select>
  129. </div>
  130. <div class="selectItem">
  131. <label>客户类型</label>
  132. <select name="fliterBusiness" class="filterSearch">
  133. <option value="">请选择</option>
  134. <?php
  135. $result = $conn->query("SELECT id, businessType FROM clienttype");
  136. while ($row = $result->fetch_assoc()) {
  137. $selected = ($filterBusiness == $row['id']) ? ' selected="selected"' : '';
  138. echo "<option value=\"{$row['id']}\"{$selected}>{$row['businessType']}</option>";
  139. }
  140. ?>
  141. </select>
  142. </div>
  143. <div class="selectItem">
  144. <label>联系方式</label>
  145. <select name="fliterContact" class="filterSearch">
  146. <option value="">请选择</option>
  147. <option value="1"<?= ($filterContact == "1") ? ' selected="selected"' : '' ?>>电话</option>
  148. <option value="2"<?= ($filterContact == "2") ? ' selected="selected"' : '' ?>>微信</option>
  149. <option value="3"<?= ($filterContact == "3") ? ' selected="selected"' : '' ?>>WhatsApp</option>
  150. <option value="4"<?= ($filterContact == "4") ? ' selected="selected"' : '' ?>>邮箱</option>
  151. <option value="5"<?= ($filterContact == "5") ? ' selected="selected"' : '' ?>>领英</option>
  152. <option value="6"<?= ($filterContact == "6") ? ' selected="selected"' : '' ?>>Facebook</option>
  153. <option value="7"<?= ($filterContact == "7") ? ' selected="selected"' : '' ?>>阿里巴巴</option>
  154. </select>
  155. </div>
  156. <div class="inputSearch">
  157. <input type="text" id="keys" class="inputTxt" placeholder="请输入搜索关键词"
  158. value="<?= empty($keyscode) ? '' : htmlspecialcharsFix($keyscode) ?>"/>
  159. <input type="button" id="searchgo" class="searchgo" value="go"
  160. onClick="location.href='?Keys='+encodeURIComponent(document.getElementById('keys').value)" />
  161. </div>
  162. </div>
  163. <div width="100%" border="0" cellpadding="3" cellspacing="1" class="table2">
  164. <div class="theader">
  165. <div class="col1"><input type="checkbox" name="chkall" id="chkall" onClick="chkboxall(this,'chkbox')" /></div>
  166. <div class="col2">序号</div>
  167. <div class="col3">客户编号</div>
  168. <div class="col4">渠道来源</div>
  169. <div class="col5">区域</div>
  170. <div class="col6">客户类型</div>
  171. <div class="col7">跟进阶段</div>
  172. <div class="col8">录入时间</div>
  173. <div class="col9">组员</div>
  174. </div>
  175. <?php
  176. $sqlStr = "SELECT c.id, c.cs_code, c.cs_from, c.cs_country, c.cs_type, c.cs_deal, c.cs_addtime, c.cs_belong,
  177. c.cs_note, c.cs_claimFrom,
  178. cc.id as contact_id, cc.contact_name,
  179. cc.tel_1, cc.tel_1_format, cc.tel_1_bu,
  180. cc.tel_2, cc.tel_2_format, cc.tel_2_bu,
  181. cc.tel_3, cc.tel_3_format, cc.tel_3_bu,
  182. cc.email_1, cc.email_1_bu,
  183. cc.email_2, cc.email_2_bu,
  184. cc.email_3, cc.email_3_bu,
  185. cc.whatsapp_1, cc.whatsapp_1_format, cc.whatsapp_1_bu,
  186. cc.whatsapp_2, cc.whatsapp_2_format, cc.whatsapp_2_bu,
  187. cc.whatsapp_3, cc.whatsapp_3_format, cc.whatsapp_3_bu,
  188. cc.wechat_1, cc.wechat_1_bu,
  189. cc.wechat_2, cc.wechat_2_bu,
  190. cc.wechat_3, cc.wechat_3_bu,
  191. cc.linkedin_1, cc.linkedin_1_bu,
  192. cc.linkedin_2, cc.linkedin_2_bu,
  193. cc.linkedin_3, cc.linkedin_3_bu,
  194. cc.facebook_1, cc.facebook_1_bu,
  195. cc.facebook_2, cc.facebook_2_bu,
  196. cc.facebook_3, cc.facebook_3_bu,
  197. cc.alibaba_1, cc.alibaba_1_bu,
  198. cc.alibaba_2, cc.alibaba_2_bu,
  199. cc.alibaba_3, cc.alibaba_3_bu
  200. FROM customer c
  201. LEFT JOIN customer_contact cc ON c.id = cc.customer_id
  202. WHERE (c.cs_code LIKE '%" . $conn->real_escape_string($keyscode) . "%'
  203. OR cc.contact_name LIKE '%" . $conn->real_escape_string($keyscode) . "%'
  204. OR cc.tel_1 LIKE '%" . $conn->real_escape_string($keyscode) . "%'
  205. OR cc.tel_2 LIKE '%" . $conn->real_escape_string($keyscode) . "%'
  206. OR cc.tel_3 LIKE '%" . $conn->real_escape_string($keyscode) . "%'
  207. OR cc.email_1 LIKE '%" . $conn->real_escape_string($keyscode) . "%'
  208. OR cc.email_2 LIKE '%" . $conn->real_escape_string($keyscode) . "%'
  209. OR cc.email_3 LIKE '%" . $conn->real_escape_string($keyscode) . "%'
  210. OR cc.wechat_1 LIKE '%" . $conn->real_escape_string($keyscode) . "%'
  211. OR cc.wechat_2 LIKE '%" . $conn->real_escape_string($keyscode) . "%'
  212. OR cc.wechat_3 LIKE '%" . $conn->real_escape_string($keyscode) . "%'
  213. OR cc.whatsapp_1_format LIKE '%" . $conn->real_escape_string($keyscode) . "%'
  214. OR cc.whatsapp_2_format LIKE '%" . $conn->real_escape_string($keyscode) . "%'
  215. OR cc.whatsapp_3_format LIKE '%" . $conn->real_escape_string($keyscode) . "%'
  216. OR cc.linkedin_1 LIKE '%" . $conn->real_escape_string($keyscode) . "%'
  217. OR cc.linkedin_2 LIKE '%" . $conn->real_escape_string($keyscode) . "%'
  218. OR cc.linkedin_3 LIKE '%" . $conn->real_escape_string($keyscode) . "%'
  219. OR cc.facebook_1 LIKE '%" . $conn->real_escape_string($keyscode) . "%'
  220. OR cc.facebook_2 LIKE '%" . $conn->real_escape_string($keyscode) . "%'
  221. OR cc.facebook_3 LIKE '%" . $conn->real_escape_string($keyscode) . "%'
  222. OR cc.alibaba_1 LIKE '%" . $conn->real_escape_string($keyscode) . "%'
  223. OR cc.alibaba_2 LIKE '%" . $conn->real_escape_string($keyscode) . "%'
  224. OR cc.alibaba_3 LIKE '%" . $conn->real_escape_string($keyscode) . "%')
  225. AND c.cs_belong IN (SELECT id FROM employee WHERE em_role=" . $_SESSION['employee_id'] . ")" .
  226. $filterStr . " ORDER BY c.cs_state DESC, c.id DESC";
  227. $result = $conn->query($sqlStr);
  228. if ($result && $result->num_rows > 0) {
  229. $pageSize = 15;
  230. $page = empty($page) ? 1 : $page;
  231. $page = ($page === 'end') ? ceil($result->num_rows / $pageSize) : $page;
  232. $page = (!is_numeric($page) || $page < 1) ? 1 : (int)$page;
  233. $totalPages = ceil($result->num_rows / $pageSize);
  234. $page = ($page > $totalPages) ? $totalPages : $page;
  235. $offset = $pageSize * ($page - 1);
  236. $rows = [];
  237. while ($row = $result->fetch_assoc()) {
  238. $rows[] = $row;
  239. }
  240. $paginatedRows = array_slice($rows, $offset, $pageSize);
  241. $tempNum = $offset;
  242. foreach ($paginatedRows as $row) {
  243. $tempNum++;
  244. ?>
  245. <div class="tline">
  246. <div class="col1" align="center"><input type="checkbox" name="chkbox[]" value="<?= $row['id'] ?>" /></div>
  247. <div class="col2"><?= $tempNum ?></div>
  248. <div class="col3 slidepanel">
  249. <?= htmlspecialcharsFix($row['cs_code']) ?>
  250. <?php if ($row['cs_claimFrom'] > 0): ?>
  251. <img src="../images/yijiao.png" class="handover">
  252. <?php endif; ?>
  253. </div>
  254. <div class="col4">
  255. <?php
  256. $qudaoResult = $conn->query("SELECT ch_name FROM qudao WHERE id=" . (int)$row['cs_from']);
  257. echo ($qudaoRow = $qudaoResult->fetch_assoc()) ? htmlspecialcharsFix($qudaoRow['ch_name']) : '未填写';
  258. ?>
  259. </div>
  260. <div class="col5">
  261. <?php
  262. $countryResult = $conn->query("SELECT countryName FROM country WHERE id=" . (int)$row['cs_country']);
  263. echo ($countryRow = $countryResult->fetch_assoc()) ? htmlspecialcharsFix($countryRow['countryName']) : '未填写';
  264. ?>
  265. </div>
  266. <div class="col6">
  267. <?php
  268. $typeResult = $conn->query("SELECT businessType FROM clienttype WHERE id=" . (int)$row['cs_type']);
  269. echo ($typeRow = $typeResult->fetch_assoc()) ? htmlspecialcharsFix($typeRow['businessType']) : '未填写';
  270. ?>
  271. </div>
  272. <div class="col7">
  273. <?php
  274. if ($row['cs_deal'] == 3) {
  275. echo "<span style='color:red;'>成交</span>";
  276. } elseif ($row['cs_deal'] == 2) {
  277. echo "明确需求";
  278. } elseif ($row['cs_deal'] == 1) {
  279. echo "背景调查";
  280. } else {
  281. echo "未成交";
  282. }
  283. ?>
  284. </div>
  285. <div class="col8"><?= $row['cs_addtime'] ?></div>
  286. <div class="col9">
  287. <?php
  288. $employeeResult = $conn->query("SELECT em_user FROM employee WHERE id=" . (int)$row['cs_belong']);
  289. echo ($employeeRow = $employeeResult->fetch_assoc()) ? htmlspecialcharsFix($employeeRow['em_user']) : '未填写';
  290. ?>
  291. </div>
  292. </div>
  293. <div class="notepanel clear">
  294. <div class="noteItem">联系方式</div>
  295. <div class="lx">
  296. <div class="tel">
  297. <?php if(!empty($row['tel_1'])): ?>
  298. <div><?= htmlspecialcharsFix($row['tel_1']) ?></div>
  299. <?php endif; ?>
  300. <?php if(!empty($row['tel_2'])): ?>
  301. <div><?= htmlspecialcharsFix($row['tel_2']) ?></div>
  302. <?php endif; ?>
  303. <?php if(!empty($row['tel_3'])): ?>
  304. <div><?= htmlspecialcharsFix($row['tel_3']) ?></div>
  305. <?php endif; ?>
  306. </div>
  307. <div class="mail">
  308. <?php if(!empty($row['email_1'])): ?>
  309. <div><a href="mailto:<?= htmlspecialcharsFix($row['email_1']) ?>"><?= htmlspecialcharsFix($row['email_1']) ?></a></div>
  310. <?php endif; ?>
  311. <?php if(!empty($row['email_2'])): ?>
  312. <div><a href="mailto:<?= htmlspecialcharsFix($row['email_2']) ?>"><?= htmlspecialcharsFix($row['email_2']) ?></a></div>
  313. <?php endif; ?>
  314. <?php if(!empty($row['email_3'])): ?>
  315. <div><a href="mailto:<?= htmlspecialcharsFix($row['email_3']) ?>"><?= htmlspecialcharsFix($row['email_3']) ?></a></div>
  316. <?php endif; ?>
  317. </div>
  318. <div class="whatsapp">
  319. <?php if(!empty($row['whatsapp_1'])): ?>
  320. <div><?= htmlspecialcharsFix($row['whatsapp_1']) ?></div>
  321. <?php endif; ?>
  322. <?php if(!empty($row['whatsapp_2'])): ?>
  323. <div><?= htmlspecialcharsFix($row['whatsapp_2']) ?></div>
  324. <?php endif; ?>
  325. <?php if(!empty($row['whatsapp_3'])): ?>
  326. <div><?= htmlspecialcharsFix($row['whatsapp_3']) ?></div>
  327. <?php endif; ?>
  328. </div>
  329. <div class="wechat">
  330. <?php if(!empty($row['wechat_1'])): ?>
  331. <div><?= htmlspecialcharsFix($row['wechat_1']) ?></div>
  332. <?php endif; ?>
  333. <?php if(!empty($row['wechat_2'])): ?>
  334. <div><?= htmlspecialcharsFix($row['wechat_2']) ?></div>
  335. <?php endif; ?>
  336. <?php if(!empty($row['wechat_3'])): ?>
  337. <div><?= htmlspecialcharsFix($row['wechat_3']) ?></div>
  338. <?php endif; ?>
  339. </div>
  340. <div class="linkedin">
  341. <?php if(!empty($row['linkedin_1'])): ?>
  342. <div><?= htmlspecialcharsFix($row['linkedin_1']) ?></div>
  343. <?php endif; ?>
  344. <?php if(!empty($row['linkedin_2'])): ?>
  345. <div><?= htmlspecialcharsFix($row['linkedin_2']) ?></div>
  346. <?php endif; ?>
  347. <?php if(!empty($row['linkedin_3'])): ?>
  348. <div><?= htmlspecialcharsFix($row['linkedin_3']) ?></div>
  349. <?php endif; ?>
  350. </div>
  351. <div class="facebook">
  352. <?php if(!empty($row['facebook_1'])): ?>
  353. <div><?= htmlspecialcharsFix($row['facebook_1']) ?></div>
  354. <?php endif; ?>
  355. <?php if(!empty($row['facebook_2'])): ?>
  356. <div><?= htmlspecialcharsFix($row['facebook_2']) ?></div>
  357. <?php endif; ?>
  358. <?php if(!empty($row['facebook_3'])): ?>
  359. <div><?= htmlspecialcharsFix($row['facebook_3']) ?></div>
  360. <?php endif; ?>
  361. </div>
  362. <div class="alibaba">
  363. <?php if(!empty($row['alibaba_1'])): ?>
  364. <div><?= htmlspecialcharsFix($row['alibaba_1']) ?></div>
  365. <?php endif; ?>
  366. <?php if(!empty($row['alibaba_2'])): ?>
  367. <div><?= htmlspecialcharsFix($row['alibaba_2']) ?></div>
  368. <?php endif; ?>
  369. <?php if(!empty($row['alibaba_3'])): ?>
  370. <div><?= htmlspecialcharsFix($row['alibaba_3']) ?></div>
  371. <?php endif; ?>
  372. </div>
  373. </div>
  374. <div class="noteItem2">备注</div>
  375. <div class="notecontent"><?= htmlUnCode($row['cs_note']) ?></div>
  376. </div>
  377. <?php
  378. }
  379. } else {
  380. if (empty($keys)) {
  381. ?>
  382. <tr>
  383. <div align="center" colspan="9">Sorry,当前暂无信息</div>
  384. </tr>
  385. <?php
  386. } else {
  387. ?>
  388. <tr>
  389. <div align="center" colspan="9"><a href="?">Sorry,没有找到"<?= htmlspecialcharsFix($keyscode) ?>"相关的信息,点击返回</a></div>
  390. </tr>
  391. <?php
  392. }
  393. }
  394. ?>
  395. <div colspan="9">
  396. <div class="showpagebox">
  397. <?php
  398. if (isset($totalPages) && $totalPages > 1) {
  399. $pageName = "?Keys=" . $keys . $urlStr . "&";
  400. $pagelen = 3;
  401. if ($page > 1) {
  402. echo "<a href=\"{$pageName}Page=1\">首页</a>";
  403. echo "<a href=\"{$pageName}Page=" . ($page - 1) . "\">上一页</a>";
  404. }
  405. if ($pagelen * 2 + 1 >= $totalPages) {
  406. $startPage = 1;
  407. $endPage = $totalPages;
  408. } else {
  409. if ($page <= $pagelen + 1) {
  410. $startPage = 1;
  411. $endPage = $pagelen * 2 + 1;
  412. } else {
  413. $startPage = $page - $pagelen;
  414. $endPage = $page + $pagelen;
  415. }
  416. if ($page + $pagelen > $totalPages) {
  417. $startPage = $totalPages - $pagelen * 2;
  418. $endPage = $totalPages;
  419. }
  420. }
  421. for ($i = $startPage; $i <= $endPage; $i++) {
  422. if ($i == $page) {
  423. echo "<a class=\"current\">{$i}</a>";
  424. } else {
  425. echo "<a href=\"{$pageName}Page={$i}\">{$i}</a>";
  426. }
  427. }
  428. if ($page < $totalPages) {
  429. if ($totalPages - $page > $pagelen) {
  430. echo "<a href=\"{$pageName}Page={$totalPages}\">...{$totalPages}</a>";
  431. }
  432. echo "<a href=\"{$pageName}Page=" . ($page + 1) . "\">下一页</a>";
  433. echo "<a href=\"{$pageName}Page={$totalPages}\">尾页</a>";
  434. }
  435. }
  436. ?>
  437. </div>
  438. <div class="postchkbox">
  439. <select id="chkact" name="chkact">
  440. <?php
  441. $result = $conn->query("SELECT id, em_user FROM employee WHERE em_role=" . $_SESSION['employee_id']);
  442. while ($row = $result->fetch_assoc()) {
  443. echo "<option value=\"t{$row['id']}\">转给" . htmlspecialcharsFix($row['em_user']) . "</option>";
  444. }
  445. ?>
  446. </select>
  447. <input type="button" value="执行" onClick="postchk(1)" class="btn1" />
  448. </div>
  449. </div>
  450. </div>
  451. </form>
  452. </div>
  453. </body>
  454. </html>