} //时间 $vstartdate = getGP('vstartdate', 'P'); $venddate = getGP('venddate', 'P'); if ($vstartdate != '' && $venddate != '') { $wheresql .= " AND (date>='" . $vstartdate . "' and date<='" . $venddate . "')"; $url .= '&vstartdate=' . $vstartdate . '&venddate=' . $venddate; } $vuidtype = getGP('vuidtype', 'P'); if ($vuidtype != '') { if ($vuidtype == '-1') { $wheresql .= get_subordinate($_USER->id, 'uid'); } else { $wheresql .= " and uid='" . $vuidtype . "'"; } } $sql = "SELECT * FROM " . DB_TABLEPRE . "training_record WHERE 1 {$wheresql} ORDER BY id desc"; $result = $db->query($sql); while ($row = $db->fetch_array($result)) { $archive = array("" . $row[user] . "", "" . GET_INC_TRAINING_RECOR_NAME($row[trainingid]) . "", "" . $row[price] . "", "" . $row[organization] . "", "" . str_replace("-", ".", $row[training]) . "", "" . get_realname($row['uid']) . ""); $content[] = $archive; } $excel = new ExcelWriter($outputFileName); if ($excel == false) { echo $excel->error; } foreach ($content as $v) { $excel->writeLine($v); } $excel->sendfile($outputFileName); }
?> &do=views"> <table class="TableBlock" border="0" width="90%" align="center" style="border-bottom:#4686c6 solid 0px;"> <tr> <td nowrap class="TableContent" width="90">受培训人员:</td> <td class="TableData"> <?php echo $blog['user']; ?> </td> </tr> <tr> <td nowrap class="TableContent" width="90">培训计划名称:</td> <td class="TableData"> <?php echo GET_INC_TRAINING_RECOR_NAME($blog['trainingid']); ?> </td> </tr> <tr> <td nowrap class="TableContent"> 培训费用:</td> <td class="TableData"><?php echo $blog['price']; ?> </td> </tr> <tr> <td valign="top" nowrap class="TableContent"> 培训机构:</td> <td class="TableData"><?php echo $blog['organization'];