if ($type = getGP('type', 'G')) { $wheresql .= " AND type='" . $type . "'"; } //时间 $vstartdate = getGP('vstartdate', 'G'); $venddate = getGP('venddate', 'G'); if ($vstartdate != '' && $venddate != '') { $wheresql .= " AND (startdate>'" . $vstartdate . "' and startdate<'" . $venddate . "')"; } $sql = "SELECT * FROM " . DB_TABLEPRE . "oalog WHERE 1 {$wheresql} and uid='" . $_USER->id . "' ORDER BY id desc"; $result = $db->query($sql); while ($row = $db->fetch_array($result)) { $content = explode('|515158.com|', $row[content]); $contentdata = ""; for ($i = 0; $i < sizeof($content); $i++) { if ($content[$i] != '') { $contentdata = $contentdata . $content[$i]; } } $archive = array("" . $row[title] . "", "" . get_realname($row['uid']) . "", "" . $contentdata . "", "" . str_replace('-', '.', $row[startdate]) . "", "" . get_oalog_type($row['type']) . ""); $content[] = $archive; } $excel = new ExcelWriter($outputFileName); if ($excel == false) { echo $excel->error; } foreach ($content as $v) { $excel->writeLine($v); } $excel->sendfile($outputFileName); }
} ?> <a href="#" title="<?php echo $contentdata; ?> "><?php echo substr($contentdata, 0, 80); ?> </a> </td> <td class="info"><?php echo $row['startdate']; ?> </td> <td class="info"><?php echo get_oalog_type($row['type']); ?> </td> </tr> <?php } ?> </tbody> </table> </div> <div class="fn-clear"> <!-- 图释 -->