function get_position_list_save_view($fatherid = 0, $selid = 0, $layer = 0, $ac, $fileurl) { global $db; $sql = "SELECT * FROM " . DB_TABLEPRE . "goods_type where father='{$fatherid}' ORDER BY id Asc"; $query = $db->query($sql); if (count($query) > 0) { for ($i = 0; $i < $layer; $i++) { $str .= " "; } while ($row = $db->fetch_array($query)) { $rsfno = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "goods_type where father='" . $row[id] . "' ORDER BY id asc limit 0,1"); echo '<tr class="hover">'; echo '<td class="td25"></td>'; echo '<td class="td25">' . get_realname($row['uid']) . ''; echo '<td><div class="board">' . $str . $row['title'] . '</div></td>'; echo '<td width="160">'; get_urlkey("编辑", "admin.php?ac=goods_type_edit&do=edit&fileurl=goods&id=" . $row['id'] . "", "" . $row['uid'] != $_USER->id); if ($rsfno[id] == '') { echo ' | '; get_urlkey("删除", "admin.php?ac=goods_type&fileurl=goods&do=delete&id=" . $row['id'] . "", "" . $row['uid'] != $_USER->id); } echo '</td></tr>'; if ($rsfno[id] != '') { get_position_list_save_view($row['id'], $selid, $layer + 1, $ac, $fileurl); } } } return; }
if ($title = getGP('title', 'G')) { $wheresql .= " AND title LIKE '%{$title}%'"; $url .= '&title=' . rawurlencode($title); } //时间 $venddate = getGP('venddate', 'G'); $vstartdate = getGP('vstartdate', 'G'); if ($vstartdate != '' && $venddate != '') { $wheresql .= " AND (issuedate>='" . $vstartdate . "' and issuedate<='" . $venddate . "')"; $url .= '&vstartdate=' . $vstartdate . '&venddate=' . $venddate; } if ($ischeck == '1') { $wheresql .= " AND uid='" . $_USER->id . "'"; } if ($ischeck == '2') { $sql = "SELECT classadmin FROM " . DB_TABLEPRE . "bbsclass WHERE classadmin like '%" . get_realname($_USER->id) . "%' "; $type_bbsclass = $db->fetch_one_array($sql); if ($type_bbsclass["classadmin"] != '') { $wheresql .= " AND type = '1'"; } } else { if ($ischeck != '1') { $wheresql .= " AND (type = '2' or type='3')"; } } $vuidtype = getGP('vuidtype', 'G'); if ($vuidtype != '') { if ($vuidtype == '-1') { $wheresql .= get_subordinate($_USER->id, 'uid'); } else { $wheresql .= " and uid='" . $vuidtype . "'";
?> "><?php echo $row['jobpost']; ?> </a> </td> <td class="info"><?php echo $row['persondate']; ?> </td> <td class="info"><?php echo $row['jobnum']; ?> </td> <td class="info"><?php echo get_realname($row['uid']); ?> </td> <td class="info"><?php echo $row['date']; ?> </td> <td class="action"> <?php get_urlkey("编辑", "admin.php?ac=job_demand_edit&fileurl=jobs&do=edit&id=" . $row['id'] . "", "" . $row['uid'] != $_USER->id); ?> </td> </tr> <?php }
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); }
echo $nview[$i] . '</a> | '; } } ?> <!-- <a href="#" onClick="expression.PrintOut(1,1,1,false,'打印机名',false,false);">+打印文件</a> --> <a href="down.php?urls=<?php echo "data/excel/workclass/" . $row['id'] . ".xls"; ?> ">+导出报表</a> <?php $sql = "SELECT * FROM " . DB_TABLEPRE . "workclass_personnel WHERE workid = '" . $row['id'] . "' and (pertype=0 or pertype=2 or pertype=4 or pertype=5) and typeid='" . $row['typeid'] . "' order by perid desc"; $per = $db->fetch_one_array($sql); //审批 $sql = "SELECT * FROM " . DB_TABLEPRE . "workclass_personnel where name like '%" . get_realname($_USER->id) . "%' and (pertype=0 or pertype=4) and typeid='" . $row['typeid'] . "' and workid='" . $row['id'] . "' order by perid desc"; $per = $db->fetch_one_array($sql); if ($per['perid'] != '') { if ($per['appkey'] == 1 && $per['appkey1'] == 1) { $perlnum = $db->result("SELECT COUNT(*) AS perlnum FROM " . DB_TABLEPRE . "workclass_personnel_log where perid='" . $per['perid'] . "' and uid='" . $_USER->id . "' and pertype=0"); if ($perlnum > 0) { echo '<a href="admin.php?ac=' . $ac . '&do=personnel&fileurl=' . $fileurl . '&workid=' . $row['id'] . '" style="color:#FF0000;">+在线审批</a>'; } } else { echo '<a href="admin.php?ac=' . $ac . '&do=personnel&fileurl=' . $fileurl . '&workid=' . $row['id'] . '" style="color:#FF0000;">+在线审批</a>'; } } ?>
$i++; $html .= "<tr height=33 style='mso-height-source:userset;height:24.95pt'>\n\t <td height=33 class=xl26 style='height:24.95pt;border-top:none'>第" . $i . "步</td>\n\t <td class=xl27 width=135 style='border-top:none;border-left:none;width:101pt'>" . $flow['flowname'] . "</td>\n\t <td class=xl25 width=423 style='border-top:none;border-left:none;width:317pt'>审批人员:" . $rows['name'] . "</td>\n\t </tr>"; if ($flow['flownum'] == 1) { $html .= "<tr height=80 style='mso-height-source:userset;height:60.0pt'>\n\t <td colspan=2 height=80 class=xl31 width=189 style='border-right:.5pt solid black;\n\t height:60.0pt;width:142pt'>" . $rows['name'] . "</td>\n\t <td class=xl25 width=423 style='border-top:none;border-left:none;width:317pt'>\n\t <b>日期:</b>" . $rows['approvaldate'] . "<br>\n\t\t <b>状态:</b>"; $html .= project_pertype($rows['pertype']); $html .= "<br>\n\t\t <b>批示:</b>" . $rows['lnstructions'] . "<br>\n\t\t</td>\n\t </tr>"; } else { if ($rows['pertype'] != 0) { if ($rows['appkey'] == 2) { $html .= "<tr height=80 style='mso-height-source:userset;height:60.0pt'>\n\t\t\t <td colspan=2 height=80 class=xl31 width=189 style='border-right:.5pt solid black;\n\t\t\t height:60.0pt;width:142pt'>" . $rows['name'] . "</td>\n\t\t\t <td class=xl25 width=423 style='border-top:none;border-left:none;width:317pt'>\n\t\t\t <b>日期:</b>" . $rows['approvaldate'] . "<br>\n\t\t\t\t <b>状态:</b>"; $html .= project_pertype($rows['pertype']); $html .= "<br>\n\t\t\t\t <b>批示:</b>" . $rows['lnstructions'] . "<br>\n\t\t\t\t</td>\n\t\t\t </tr>"; } else { $query = $db->query("SELECT * FROM " . DB_TABLEPRE . "project_personnel_log where perid='" . $rows['perid'] . "' ORDER BY lid Asc"); while ($log = $db->fetch_array($query)) { $html .= "<tr height=80 style='mso-height-source:userset;height:60.0pt'>\n\t\t\t <td colspan=2 height=80 class=xl31 width=189 style='border-right:.5pt solid black;\n\t\t\t height:60.0pt;width:142pt'>" . $log['name'] . "</td>\n\t\t\t <td class=xl25 width=423 style='border-top:none;border-left:none;width:317pt'>\n\t\t\t <b>日期:</b>" . $log['approvaldate'] . "<br>\n\t\t\t\t <b>状态:</b>"; $html .= project_pertype_log($log['pertype']); $html .= "<br>\n\t\t\t\t <b>批示:</b>" . $log['lnstructions'] . "<br>\n\t\t\t\t</td>\n\t\t\t </tr>"; } } } } } $html .= "<tr height=33 style='mso-height-source:userset;height:24.95pt'>\n <td colspan=3 height=33 class=xl33 width=612 style='height:24.95pt;\n width:459pt'>发起人:" . get_realname($row["uid"]) . "</td>\n </tr>\n <![if supportMisalignedColumns]>\n <tr height=0 style='display:none'>\n <td width=54 style='width:41pt'></td>\n <td width=135 style='width:101pt'></td>\n <td width=423 style='width:317pt'></td>\n </tr>\n <![endif]>\n</table>\n\n</body>\n\n</html>"; ?> </div> <?php $Path = "data/excel/project/p_" . $row['id'] . ".xls"; $fp = fopen($Path, "w"); fwrite($fp, $html); fclose($fp);
echo '</table>'; } ?> <table class="TableBlock" border="0" width="98%" align="center" style="margin-top:10px;"> <tr> <td nowrap class="TableHeader" colspan="2" id="m2"><b> 附件下载</b></td> </tr> <?php global $db; $query = $db->query("SELECT * FROM " . DB_TABLEPRE . "fileoffice WHERE officeid='" . $row['id'] . "' and officetype='5' and filetype='2' ORDER BY id asc"); while ($file = $db->fetch_array($query)) { ?> <tr> <td nowrap class="TableContent" width="15%"><?php echo get_realname($file['uid']); ?> <br><?php echo $file['date']; ?> </td> <td class="TableData"> <?php echo $file['filename']; ?> <a href="down.php?urls=<?php echo $file['fileaddr']; ?> ">+下载</a> </td> </tr>
if ($documentid = getGP('documentid', 'G')) { $wheresql .= " AND documentid like '%," . $documentid . "%'"; $url .= '&documentid=' . $documentid; } $vuidtype = getGP('vuidtype', 'G'); if ($vuidtype != '') { if ($vuidtype == '-1') { $wheresql .= get_subordinate($_USER->id, 'uid'); } else { $wheresql .= " and uid='" . $vuidtype . "'"; } $url .= '&vuidtype=' . $vuidtype; } if (getGP('type', 'G') != '1') { if (!is_superadmin() && $vuidtype == '') { $wheresql .= " and (readuser LIKE'%" . get_realname($_USER->id) . "%' or uid='" . $_USER->id . "' or readuser='******')"; } } else { if ($vuidtype == '') { $wheresql .= " and uid='" . $_USER->id . "'"; } } if ($title = getGP('title', 'G')) { $wheresql .= " AND title LIKE '%{$title}%'"; $url .= '&title=' . rawurlencode($title); } //时间 $venddate = getGP('venddate', 'G'); $vstartdate = getGP('vstartdate', 'G'); if ($vstartdate != '' && $venddate != '') { $wheresql .= " AND (date>='" . $vstartdate . "' and date<='" . $venddate . "')";
function xls_views($id, $uid) { $htmls .= '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"> <head> <meta http-equiv=Content-Type content="text/html; charset=utf-8"> <meta name=ProgId content=Excel.Sheet> <meta name=Generator content="Microsoft Excel 11"> <!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Created>1996-12-17T01:32:42Z</o:Created> <o:LastSaved>2013-04-03T09:05:54Z</o:LastSaved> <o:Version>11.9999</o:Version> </o:DocumentProperties> <o:OfficeDocumentSettings> <o:RemovePersonalInformation/> </o:OfficeDocumentSettings> </xml><![endif]--> <style> <!--table {mso-displayed-decimal-separator:"\\."; mso-displayed-thousand-separator:"\\,";} @page {margin:1.0in .75in 1.0in .75in; mso-header-margin:.5in; mso-footer-margin:.5in;} tr {mso-height-source:auto; mso-ruby-visibility:none;} col {mso-width-source:auto; mso-ruby-visibility:none;} br {mso-data-placement:same-cell;} .style0 {mso-number-format:General; text-align:general; vertical-align:bottom; white-space:nowrap; mso-rotate:0; mso-background-source:auto; mso-pattern:auto; color:windowtext; font-size:12.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:宋体; mso-generic-font-family:auto; mso-font-charset:134; border:none; mso-protection:locked visible; mso-style-name:常规; mso-style-id:0;} td {mso-style-parent:style0; padding-top:1px; padding-right:1px; padding-left:1px; mso-ignore:padding; color:windowtext; font-size:12.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:宋体; mso-generic-font-family:auto; mso-font-charset:134; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;} .xl24 {mso-style-parent:style0; text-align:left; vertical-align:middle;} .xl25 {mso-style-parent:style0; text-align:center; vertical-align:middle; border:.5pt solid windowtext;} .xl26 {mso-style-parent:style0; text-align:left; vertical-align:middle; border:.5pt solid windowtext;} .xl27 {mso-style-parent:style0; text-align:left; vertical-align:middle; border-top:.5pt solid windowtext; border-right:none; border-bottom:none; border-left:none;} .xl28 {mso-style-parent:style0; text-align:left; vertical-align:middle; border:.5pt solid windowtext; padding-left:27px; mso-char-indent-count:1;} .xl29 {mso-style-parent:style0; vertical-align:middle; border:.5pt solid windowtext;} .xl30 {mso-style-parent:style0; text-align:left; vertical-align:middle; border-top:.5pt solid windowtext; border-right:none; border-bottom:.5pt solid windowtext; border-left:.5pt solid windowtext; padding-left:54px; mso-char-indent-count:2;} .xl31 {mso-style-parent:style0; text-align:left; vertical-align:middle; border-top:.5pt solid windowtext; border-right:none; border-bottom:.5pt solid windowtext; border-left:none; padding-left:54px; mso-char-indent-count:2;} .xl32 {mso-style-parent:style0; text-align:left; vertical-align:middle; border-top:.5pt solid windowtext; border-right:.5pt solid windowtext; border-bottom:.5pt solid windowtext; border-left:none; padding-left:54px; mso-char-indent-count:2;} .xl33 {mso-style-parent:style0; font-size:24.0pt; text-align:center; vertical-align:middle;} .xl34 {mso-style-parent:style0; text-align:left; vertical-align:middle; padding-left:27px; mso-char-indent-count:1;} .xl35 {mso-style-parent:style0; text-align:left; vertical-align:middle; border-top:none; border-right:none; border-bottom:.5pt solid windowtext; border-left:none; padding-left:27px; mso-char-indent-count:1;} .xl36 {mso-style-parent:style0; text-align:center; vertical-align:middle; border:.5pt solid windowtext; background:silver; mso-pattern:auto none;} ruby {ruby-align:left;} rt {color:windowtext; font-size:9.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:宋体; mso-generic-font-family:auto; mso-font-charset:134; mso-char-type:none; display:none;} --> </style> <!--[if gte mso 9]><xml> <x:ExcelWorkbook> <x:ExcelWorksheets> <x:ExcelWorksheet> <x:Name>Sheet1</x:Name> <x:WorksheetOptions> <x:DefaultRowHeight>285</x:DefaultRowHeight> <x:Print> <x:ValidPrinterInfo/> <x:PaperSizeIndex>9</x:PaperSizeIndex> <x:HorizontalResolution>180</x:HorizontalResolution> <x:VerticalResolution>180</x:VerticalResolution> </x:Print> <x:CodeName>Sheet1</x:CodeName> <x:Selected/> <x:Panes> <x:Pane> <x:Number>3</x:Number> <x:ActiveRow>5</x:ActiveRow> <x:ActiveCol>2</x:ActiveCol> </x:Pane> </x:Panes> <x:ProtectContents>False</x:ProtectContents> <x:ProtectObjects>False</x:ProtectObjects> <x:ProtectScenarios>False</x:ProtectScenarios> </x:WorksheetOptions> </x:ExcelWorksheet> <x:ExcelWorksheet> <x:Name>Sheet2</x:Name> <x:WorksheetOptions> <x:DefaultRowHeight>285</x:DefaultRowHeight> <x:CodeName>Sheet2</x:CodeName> <x:ProtectContents>False</x:ProtectContents> <x:ProtectObjects>False</x:ProtectObjects> <x:ProtectScenarios>False</x:ProtectScenarios> </x:WorksheetOptions> </x:ExcelWorksheet> <x:ExcelWorksheet> <x:Name>Sheet3</x:Name> <x:WorksheetOptions> <x:DefaultRowHeight>285</x:DefaultRowHeight> <x:CodeName>Sheet3</x:CodeName> <x:ProtectContents>False</x:ProtectContents> <x:ProtectObjects>False</x:ProtectObjects> <x:ProtectScenarios>False</x:ProtectScenarios> </x:WorksheetOptions> </x:ExcelWorksheet> </x:ExcelWorksheets> <x:WindowHeight>4530</x:WindowHeight> <x:WindowWidth>8505</x:WindowWidth> <x:WindowTopX>480</x:WindowTopX> <x:WindowTopY>120</x:WindowTopY> <x:AcceptLabelsInFormulas/> <x:ProtectStructure>False</x:ProtectStructure> <x:ProtectWindows>False</x:ProtectWindows> </x:ExcelWorkbook> </xml><![endif]--> </head> <body link=blue vlink=purple>'; $htmls .= "<table x:str border=0 cellpadding=0 cellspacing=0 width=1172 style='border-collapse:\n collapse;table-layout:fixed;width:881pt'>\n <col width=72 style='width:54pt'>\n <col width=176 style='mso-width-source:userset;mso-width-alt:5632;width:132pt'>\n <col width=125 style='mso-width-source:userset;mso-width-alt:4000;width:94pt'>\n <col width=138 style='mso-width-source:userset;mso-width-alt:4416;width:104pt'>\n <col width=101 style='mso-width-source:userset;mso-width-alt:3232;width:76pt'>\n <col width=85 style='mso-width-source:userset;mso-width-alt:2720;width:64pt'>\n <col width=79 style='mso-width-source:userset;mso-width-alt:2528;width:59pt'>\n <col width=90 style='mso-width-source:userset;mso-width-alt:2880;width:68pt'>\n <col width=88 style='mso-width-source:userset;mso-width-alt:2816;width:66pt'>\n <col width=92 style='mso-width-source:userset;mso-width-alt:2944;width:69pt'>\n <col width=126 style='mso-width-source:userset;mso-width-alt:4032;width:95pt'>\n <tr height=80 style='mso-height-source:userset;height:60.0pt'>\n <td colspan=11 height=80 class=xl33 width=1172 style='height:60.0pt;\n width:881pt'>采购物品申购计划单</td>\n </tr>\n <tr height=40 style='mso-height-source:userset;height:30.0pt'>\n <td colspan=4 height=40 class=xl34 style='height:30.0pt'>部门:" . work_db($id, '_12_18_dep') . "</td>\n <td colspan=4 class=xl34>供货商:" . work_db($id, '_12_18_company') . " </td>\n <td colspan=3 class=xl34>单号:" . work_db($id, '_12_18_111') . "</td>\n </tr>\n <tr height=40 style='mso-height-source:userset;height:30.0pt'>\n <td colspan=4 height=40 class=xl35 style='height:30.0pt'>项目名称:" . work_db($id, '_12_18_name') . "</td>\n <td colspan=4 class=xl35>合同编号:" . work_db($id, '_12_18_number') . "</td>\n <td colspan=3 class=xl35>工单号:" . work_db($id, '_12_18_zipcode') . "</td>\n </tr>\n <tr height=40 style='mso-height-source:userset;height:30.0pt'>\n <td height=40 class=xl36 style='height:30.0pt;border-top:none'>序号</td>\n <td class=xl36 style='border-top:none;border-left:none'>申购物品名称</td>\n <td class=xl36 style='border-top:none;border-left:none'>品牌</td>\n <td class=xl36 style='border-top:none;border-left:none'>规格</td>\n <td class=xl36 style='border-top:none;border-left:none'>型号</td>\n <td class=xl36 style='border-top:none;border-left:none'>颜色</td>\n <td class=xl36 style='border-top:none;border-left:none'>单位</td>\n <td class=xl36 style='border-top:none;border-left:none'>数量</td>\n <td class=xl36 style='border-top:none;border-left:none'>单价</td>\n <td class=xl36 style='border-top:none;border-left:none'>金额</td>\n <td class=xl36 style='border-top:none;border-left:none'>备注</td>\n </tr>"; $_12_18_wname = unserialize(work_db($id, '_12_18_wname')); $_12_18_wping = unserialize(work_db($id, '_12_18_wping')); $_12_18_wgg = unserialize(work_db($id, '_12_18_wgg')); $_12_18_wxh = unserialize(work_db($id, '_12_18_wxh')); $_12_18_wys = unserialize(work_db($id, '_12_18_wys')); $_12_18_wdw = unserialize(work_db($id, '_12_18_wdw')); $_12_18_wxl = unserialize(work_db($id, '_12_18_wxl')); $_12_18_wdj = unserialize(work_db($id, '_12_18_wdj')); $_12_18_wprice = unserialize(work_db($id, '_12_18_wprice')); $_12_18_wnote = unserialize(work_db($id, '_12_18_wnote')); for ($i = 0; $i < 15; $i++) { $m = $i + 1; $htmls .= "<tr height=33 style='mso-height-source:userset;height:24.95pt'>\n\t <td height=33 class=xl25 style='height:24.95pt;border-top:none' x:num>" . $m . "</td>\n\t <td class=xl26 style='border-top:none;border-left:none'>" . $_12_18_wname[$i] . "</td>\n\t <td class=xl26 style='border-top:none;border-left:none'>" . $_12_18_wping[$i] . "</td>\n\t <td class=xl26 style='border-top:none;border-left:none'>" . $_12_18_wgg[$i] . "</td>\n\t <td class=xl26 style='border-top:none;border-left:none'>" . $_12_18_wxh[$i] . "</td>\n\t <td class=xl26 style='border-top:none;border-left:none'>" . $_12_18_wys[$i] . "</td>\n\t <td class=xl26 style='border-top:none;border-left:none'>" . $_12_18_wdw[$i] . "</td>\n\t <td class=xl26 style='border-top:none;border-left:none'>" . $_12_18_wxl[$i] . "</td>\n\t <td class=xl26 style='border-top:none;border-left:none'>" . $_12_18_wdj[$i] . "</td>\n\t <td class=xl26 style='border-top:none;border-left:none'>" . $_12_18_wprice[$i] . "</td>\n\t <td class=xl26 style='border-top:none;border-left:none'>" . $_12_18_wnote[$i] . "</td>\n\t </tr>"; } $htmls .= "<tr height=40 style='mso-height-source:userset;height:30.0pt'>\n <td colspan=2 height=40 class=xl25 style='height:30.0pt'>合计:</td>\n <td colspan=9 class=xl30 style='border-right:.5pt solid black;border-left:\n none'><span style='mso-spacerun:yes'> </span>¥<span\n style='mso-spacerun:yes'>" . work_db($id, '_12_18_hj') . " \n </span>大写:" . work_db($id, '_12_18_pidfdd') . "</td>\n </tr>\n <tr height=40 style='mso-height-source:userset;height:30.0pt'>\n <td colspan=11 height=40 class=xl28 style='height:30.0pt'>付款方式:" . work_db($id, '_12_18_type') . "</td>\n </tr>\n <tr height=80 style='mso-height-source:userset;height:60.0pt'>\n <td colspan=2 height=80 class=xl25 style='height:60.0pt'>备注:</td>\n <td colspan=9 class=xl29 style='border-left:none'>" . work_db($id, '_12_18_note') . "</td>\n </tr>\n <tr height=40 style='mso-height-source:userset;height:30.0pt'>\n <td colspan=2 height=40 class=xl27 style='height:30.0pt'>采购部经手人:" . get_realname($uid) . "</td>\n <td colspan=2 class=xl27>采购部负责人:" . w_p_v(12, $id, 'name') . "</td>\n <td colspan=4 class=xl27>财务部负责人:" . w_p_v(13, $id, 'name') . "</td>\n <td colspan=3 class=xl27>总经理审批:" . w_p_v(14, $id, 'name') . "</td>\n </tr>\n\n</table>\n\n</body>\n\n</html>"; return $htmls; }
$wheresql .= " AND testdate ='" . $testdate . "'"; } if ($testenddate = getGP('testenddate', 'P')) { $wheresql .= " AND testenddate ='" . $testenddate . "'"; } if ($signenddate = getGP('signenddate', 'P')) { $wheresql .= " AND signenddate ='" . $signenddate . "'"; } $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 . "humancontract WHERE 1 {$wheresql} ORDER BY id desc"; $result = $db->query($sql); while ($row = $db->fetch_array($result)) { $archive = array("" . get_realname($row['userid']) . "", "" . $row[number] . "", "" . get_typename($row["type"]) . "", "" . get_typename($row["ckey"]) . "", "" . str_replace("-", ".", $row['signdate']) . "", "" . str_replace("-", ".", $row['testdate']) . "", "" . $row[testday] . "", "" . str_replace("-", ".", $row['testenddate']) . "", "" . $row[signnum] . "", "" . str_replace("-", ".", $row['signenddate']) . "", "" . $row['content'] . ""); $content[] = $archive; } $excel = new ExcelWriter($outputFileName); if ($excel == false) { echo $excel->error; } foreach ($content as $v) { $excel->writeLine($v); } $excel->sendfile($outputFileName); }
/* */ (!defined('IN_TOA') || !defined('IN_ADMIN')) && exit('Access Denied!'); empty($do) && ($do = 'list'); if ($do == 'list') { if ($_GET['officeid'] != '') { $sql = "SELECT * FROM " . DB_TABLEPRE . "fileoffice WHERE officeid='" . $_GET['officeid'] . "' and officetype='" . $_GET['officetype'] . "' and filetype='2' ORDER BY id desc"; } else { $sql = "SELECT * FROM " . DB_TABLEPRE . "fileoffice WHERE number='" . $_GET['filenumber'] . "' and officetype='" . $_GET['officetype'] . "' and filetype='2' ORDER BY id desc"; } $result = $db->query($sql); while ($row = $db->fetch_array($result)) { ///echo '<a href="down.php?urls='.$row['fileaddr'].'">'.$row['filename'].'</a> 上传人:'.get_realname($row['uid']).' 上传时间:'.$row['date'].'<br>'; echo '<a href=' . $row['fileaddr'] . ' target="_blank">' . $row['filename'] . '</a> 上传人:' . get_realname($row['uid']) . ' 上传时间:' . $row['date'] . '<br>'; } } elseif ($do = 'office') { if ($_GET['officeid'] != '') { $sql = "SELECT * FROM " . DB_TABLEPRE . "fileoffice WHERE officeid='" . $_GET['officeid'] . "' and officetype='" . $_GET['officetype'] . "' and filetype='1' ORDER BY id desc"; } else { $sql = "SELECT * FROM " . DB_TABLEPRE . "fileoffice WHERE number='" . $_GET['filenumber'] . "' and officetype='" . $_GET['officetype'] . "' and filetype='1' ORDER BY id desc"; } $result = $db->query($sql); while ($row = $db->fetch_array($result)) { if ($_GET['viewtype'] == 5) { echo '<a target="_blank" href="ntko/Fileview.php?FileId=' . $row['fileid'] . '&uid=' . $_USER->id . '&filenumber=' . $row['number'] . '&officetype=' . $row['officetype'] . '&date=' . $row['date'] . '">' . $row['filename'] . '</a> 上传人:' . get_realname($row['uid']) . ' 上传时间:' . $row['date'] . '<br>'; } else { echo '<a target="_blank" href="ntko/FileEdit.php?FileId=' . $row['fileid'] . '&uid=' . $_USER->id . '&filenumber=' . $row['number'] . '&officetype=' . $row['officetype'] . '&date=' . $row['date'] . '">' . $row['filename'] . '</a> 上传人:' . get_realname($row['uid']) . ' 上传时间:' . $row['date'] . '<br>'; } } }
?> "><?php echo $row['filename']; ?> </a> </td> <td width="100"><?php echo get_realname($row['appperson']); ?> </td> <td width="120"><?php echo $row['appdate']; ?> </td> <td width="80" align="center"><?php echo get_realname($row['examperson']); ?> </td> <td class="info"><?php echo $row['examdate']; ?> </td> <td width="80" align="center"><?php if ($row['type'] == '1') { echo "待审"; } elseif ($row['type'] == '2') { echo "未通过"; } elseif ($row['type'] == '3') { echo "借阅中"; } elseif ($row['type'] == '4') { echo "己归还";
$flow = $db->fetch_one_array($sql); if ($flow['flownum'] != '') { echo '<b>第<span style="font-size:18px; font-weight:bold; color:#FF0000;">' . $flow['flownum'] . '</span>步:' . $flow['flowname'] . '</b><br>'; echo '审批人:' . $per['name']; } } ?> </td> <td align="center" class="TableData"> <?php if ($row['type'] == 1) { echo $mod['modname'] . '己撤消'; } else { //审批 $sql = "SELECT * FROM " . DB_TABLEPRE . "project_personnel where name like '%" . get_realname($_USER->id) . "%' and (pertype=0 or pertype=4) and typeid='" . $row['typeid'] . "' and projectid='" . $row['lid'] . "' and appkey2=2 order by perid desc"; $per = $db->fetch_one_array($sql); if ($per['perid'] != '') { if ($per['appkey'] == 1 && $per['appkey1'] == 1) { $perlnum = $db->result("SELECT COUNT(*) AS perlnum FROM " . DB_TABLEPRE . "project_personnel_log where perid='" . $per['perid'] . "' and uid='" . $_USER->id . "' and pertype=0 and appkey2=2"); if ($perlnum > 0) { echo '<a href="admin.php?ac=' . $ac . '&do=personnel&fileurl=' . $fileurl . '&lid=' . $row['lid'] . '&modid=' . $modid . '&projectid=' . $projectid . '&typeid=' . $typeid . '">审批</a> | '; } } else { echo '<a href="admin.php?ac=' . $ac . '&do=personnel&fileurl=' . $fileurl . '&lid=' . $row['lid'] . '&modid=' . $modid . '&projectid=' . $projectid . '&typeid=' . $typeid . '">审批</a> | '; } } //撤消 if ($_GET['type'] == 3) { if ($perkey != 5 && $perkey != 2) { echo '<a href="admin.php?ac=' . $ac . '&do=workkey&fileurl=' . $fileurl . '&lid=' . $row['lid'] . '&modid=' . $modid . '&projectid=' . $projectid . '&typeid=' . $typeid . '">撤消</a> | ';
} elseif ($row['key1'] == '3') { echo "拒绝"; } elseif ($row['key1'] == '4') { echo "己入库"; } ?> </td> <td width="100"><?php echo get_realname($row['uid']); ?> </td> <td class="title"> <?php if ($row["key1"] == '1') { global $db; $key1 = $db->result("SELECT * FROM " . DB_TABLEPRE . "office_goods_key where examination like '%" . get_realname($_USER->id) . "%' "); if ($key1["examination"] != '') { echo '<a href="admin.php?ac=goods_purchase&do=keys&fileurl=goods&id=' . $row['id'] . '&key1=2">审批</a> '; echo '| <a href="admin.php?ac=goods_purchase&do=keys&fileurl=goods&id=' . $row['id'] . '&key1=3">拒绝</a> | '; } } ?> <a href="admin.php?ac=goods_purchase_views&do=list&fileurl=goods&id=<?php echo $row['id']; ?> ">查看</a> <?php if ($_USER->id == $row['uid'] && $row['key1'] == '1') { ?>
function print_name($entry) { global $users; if (substr($entry['name'], 0, 1) == "=") { $uid = intval(str_replace('=', '', $entry['name'])); if ($users[$uid]['privacy'] >= 4 || is_logged_in() && $users[$uid]['privacy'] >= 3) { $rv = "<a href=\"me.php?id={$uid}\" class=\"hidden\">" . get_realname($uid) . "</a>"; } else { $rv = get_realname($uid); } $college = get_college($uid, $entry['year'], $entry['term']); if ($college != '') { $rv .= ' <span class="college">(' . $college . ')</span>'; } } else { $rv = $entry['name']; if ($entry['college'] != '') { $rv .= ' <span class="college">(' . $entry['college'] . ')</span>'; } } print $rv; }
$content = array(); $archive = array("状态", "发送人", "发送时间", "内容"); $content[] = $archive; $wheresql = ''; $vuidtype = getGP('vuidtype', 'P'); if (!is_superadmin() && $vuidtype == '') { $wheresql .= " AND receiveperson ='" . $_USER->id . "'"; } if ($vuidtype != '') { $wheresql .= get_subordinate($_USER->id, 'receiveperson'); } $sql = "SELECT * FROM " . DB_TABLEPRE . "sms_receive WHERE 1 {$wheresql} ORDER BY id desc"; $result = $db->query($sql); while ($row = $db->fetch_array($result)) { if ($row[smskey] == '1') { $type = '己读'; } else { $type = '未读'; } $archive = array("" . $type . "", "" . get_realname($row['sendperson']) . "", "" . str_replace("-", ".", $row[date]) . "", "" . $row['content'] . ""); $content[] = $archive; } $excel = new ExcelWriter($outputFileName); if ($excel == false) { echo $excel->error; } foreach ($content as $v) { $excel->writeLine($v); } $excel->sendfile($outputFileName); }
$wheresql .= " AND date ='" . $getdate . "' "; } if ($ischeck == '3') { $wheresql .= " AND DATE_SUB(CURDATE(), INTERVAL 7 DAY)<=date(date) "; } if ($ischeck == '4') { $wheresql .= " AND DATE_SUB(CURDATE(),INTERVAL 1 MONTH)<=date(date) "; } if ($ischeck == '5') { $wheresql .= " AND DATE_SUB(CURDATE(),INTERVAL 6 MONTH)<=date(date) "; } if ($_POST['type'] == '1') { $wheresql .= " AND responsible LIKE '%" . get_realname($_USER->id) . "%'"; } if ($_POST['type'] == '2') { $wheresql .= " AND user LIKE '%" . get_realname($_USER->id) . "%'"; } if ($_POST['type'] == '3') { $wheresql .= " AND type='1'"; } $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 WHERE 1 {$wheresql} ORDER BY id desc"; $result = $db->query($sql); while ($row = $db->fetch_array($result)) {
$num++; $archive[] = "<b>" . $row['fromname'] . "</b>"; $inputname[] = $row['inputname']; } $archive[] = "<b>发布时间</b>"; $archive[] = "<b>发布人</b>"; $content = array(); $content[] = $archive; $sql = "SELECT * FROM " . DB_TABLEPRE . "project_log WHERE 1 {$wheresql} ORDER BY lid desc"; $result = $db->query($sql); while ($row = $db->fetch_array($result)) { $archive = array(); $archive[] = $row['number']; $archive[] = $row['title']; for ($i = 0; $i < $num; $i++) { $blog = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "project_db WHERE projectid = '" . $row['lid'] . "' and inputname='" . $inputname[$i] . "' and type=2 "); $archive[] = str_replace("-", ".", $blog['content']); } $archive[] = str_replace("-", ".", $row['date']); $archive[] = 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); }
<tr> <td height="97" valign="top"><p>局办公室核稿:</p> <p> </p> <p> </p></td> </tr> </table> </td> </tr> <tr> <td height="89" colspan="6" bordercolor="#FF0000" bgcolor="#FFFFFF">会签:</td> </tr> <tr> <td width="72" height="61" bordercolor="#FF0000" bgcolor="#FFFFFF" >拟稿单位</td> <td width="174" bordercolor="#FF0000" bgcolor="#FFFFFF"><input name="sponsor" type="text" class="inputDocStyle " /></td> <td width="54" bordercolor="#FF0000" bgcolor="#FFFFFF" >拟稿人</td> <td width="125" bordercolor="#FF0000" bgcolor="#FFFFFF" ><?php echo get_realname($_USER->id); ?> </td> <td width="82" bordercolor="#FF0000" bgcolor="#FFFFFF">份数</td> <td width="225" bordercolor="#FF0000" bgcolor="#FFFFFF" ><input name="gwnum" type="text" class="inputDocStyle " /></td> </tr> <tr align="center"> <td height="57" colspan="6" bordercolor="#FF0000" bgcolor="#FFFFFF"><table width="782" border="0" cellspacing="0"> <tr> <td width="119" height="65">是否党政网发布</td> <td width="222"><label> <select name="fb"> <option>是</option> <option>否</option> </select> </label></td>
//权限 if (!is_superadmin() && $vuidtype == '') { $wheresql .= " AND (receive like'%" . get_realname($_USER->id) . "%' or receive='0' or uid='" . $_USER->id . "')"; } if ($vuidtype != '') { if ($vuidtype == '-1') { $wheresql .= get_subordinate($_USER->id, 'uid'); } else { $wheresql .= " and uid='" . $vuidtype . "'"; } $url .= '&vuidtype=' . $vuidtype; } $sql = "SELECT * FROM " . DB_TABLEPRE . "news WHERE 1 {$wheresql} ORDER BY id desc"; $result = $db->query($sql); while ($row = $db->fetch_array($result)) { $archive = array("" . $row[subject] . "", "" . $row[content] . "", "" . $row[appendix] . "", "" . str_replace("-", ".", $row[date]) . "", "" . get_realname($row['uid']) . "", "" . $row['receive'] . ""); $content[] = $archive; } $excel = new ExcelWriter($outputFileName); if ($excel == false) { echo $excel->error; } foreach ($content as $v) { $excel->writeLine($v); } $excel->sendfile($outputFileName); } elseif ($do == 'draft') { //草稿箱信息 if ($_GET[id] != '') { //编辑 $user = $db->fetch_one_array("select * from toa_news_draft where id={$_GET['id']}");
/** * Get username details for placing into templates. * This function caches all modes on first call, except for no_profile and anonymous user - determined by $user_id. * * @param string $mode Can be profile (for getting an url to the profile), username (for obtaining the username), colour (for obtaining the user colour), full (for obtaining a html string representing a coloured link to the users profile) or no_profile (the same as full but forcing no profile link) * @param int $user_id The users id * @param string $username The users name * @param string $username_colour The users colour * @param string $guest_username optional parameter to specify the guest username. It will be used in favor of the GUEST language variable then. * @param string $custom_profile_url optional parameter to specify a profile url. The user id get appended to this url as &u={user_id} * * @return string A string consisting of what is wanted based on $mode. */ function get_username_string($mode, $user_id, $username, $username_colour = '', $guest_username = false, $custom_profile_url = false) { static $_profile_cache; global $phpbb_dispatcher; require_once 'functions_user.php'; // We cache some common variables we need within this function // We cache some common variables we need within this function if (empty($_profile_cache)) { global $phpbb_root_path, $phpEx; $_profile_cache['base_url'] = append_sid("{$phpbb_root_path}memberlist.{$phpEx}", 'mode=viewprofile&u={USER_ID}'); $_profile_cache['tpl_noprofile'] = '<span class="username">{USERNAME}</span>'; $_profile_cache['tpl_noprofile_colour'] = '<span style="color: {USERNAME_COLOUR};" class="username-coloured">{USERNAME}</span>'; $_profile_cache['tpl_profile'] = '<a href="{PROFILE_URL}" class="username">{USERNAME}</a>'; $_profile_cache['tpl_profile_colour'] = '<a href="{PROFILE_URL}" style="color: {USERNAME_COLOUR};" class="username-coloured">{USERNAME}</a>'; } global $user, $auth; // This switch makes sure we only run code required for the mode switch ($mode) { case 'full': case 'no_profile': case 'colour': // Build correct username colour $username_colour = $username_colour ? '#' . $username_colour : ''; // Return colour if ($mode == 'colour') { $username_string = $username_colour; break; } // no break; // no break; case 'username': // Build correct username if ($guest_username === false) { //$username = ($username) ? $username : $user->lang['GUEST']; $username = get_realname($username); } else { $username = $user_id && $user_id != ANONYMOUS ? $username : (!empty($guest_username) ? $guest_username : $user->lang['GUEST']); } // Return username if ($mode == 'username') { $username_string = $username; break; } // no break; // no break; case 'profile': // Build correct profile url - only show if not anonymous and permission to view profile if registered user // For anonymous the link leads to a login page. if ($user_id && $user_id != ANONYMOUS && ($user->data['user_id'] == ANONYMOUS || $auth->acl_get('u_viewprofile'))) { $profile_url = $custom_profile_url !== false ? $custom_profile_url . '&u=' . (int) $user_id : str_replace(array('={USER_ID}', '=%7BUSER_ID%7D'), '=' . (int) $user_id, $_profile_cache['base_url']); } else { $profile_url = ''; } // Return profile if ($mode == 'profile') { $username_string = $profile_url; break; } // no break; } if (!isset($username_string)) { if ($mode == 'full' && !$profile_url || $mode == 'no_profile') { $username_string = str_replace(array('{USERNAME_COLOUR}', '{USERNAME}'), array($username_colour, $username), !$username_colour ? $_profile_cache['tpl_noprofile'] : $_profile_cache['tpl_noprofile_colour']); } else { $username_string = str_replace(array('{PROFILE_URL}', '{USERNAME_COLOUR}', '{USERNAME}'), array($profile_url, $username_colour, $username), !$username_colour ? $_profile_cache['tpl_profile'] : $_profile_cache['tpl_profile_colour']); } } /** * Use this event to change the output of get_username_string() * * @event core.modify_username_string * @var string mode profile|username|colour|full|no_profile * @var int user_id String or array of additional url * parameters * @var string username The user's username * @var string username_colour The user's colour * @var string guest_username Optional parameter to specify the * guest username. * @var string custom_profile_url Optional parameter to specify a * profile url. * @var string username_string The string that has been generated * @var array _profile_cache Array of original return templates * @since 3.1.0-a1 */ $vars = array('mode', 'user_id', 'username', 'username_colour', 'guest_username', 'custom_profile_url', 'username_string', '_profile_cache'); extract($phpbb_dispatcher->trigger_event('core.modify_username_string', compact($vars))); return $username_string; }
foreach ($inputvalue as $arrsave) { $inputvalues .= $arrsave . ','; } $inputvalue = substr($inputvalues, 0, -1); } elseif ($row['inputtype'] == '2') { $inputvalue = trim(getGP('' . $row["inputname"] . '', 'P')); } else { $inputvalue = check_str(getGP('' . $row["inputname"] . '', 'P')); } $crm_db = array('content' => $inputvalue); //insert_db('crm_db',$crm_db); update_db('crm_db', $crm_db, array('viewid' => $vid, 'type' => 'crm_care', 'inputname' => $row["inputname"], 'formid' => $row["fid"])); $crm_log .= serialize($crm_db) . '|515158.com|'; } $content = serialize($crm_care); $title = get_realname($_USER->id) . '于' . get_date('Y-m-d H:i:s', PHP_TIME) . '编辑客户关怀信息'; get_logadd($vid, $content, $title, 36, $_USER->id); crm_log($title, $vid, $content, substr($crm_log, 0, -12), 1, 'crm_care'); show_msg('编辑客户关怀信息成功!', 'admin.php?ac=' . $ac . '&fileurl=' . $fileurl . '&type=' . getGP('type', 'P')); } else { $view = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "crm_care WHERE id = '" . getGP('id', 'G', 'int') . "' "); if ($_GET['type'] == '2') { get_key("crm_care_edit_2"); } else { get_key("crm_care_edit_1"); } include_once 'company/care_edit.php'; } } elseif ($do == 'view') { $view = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "crm_care WHERE id = '" . getGP('id', 'G', 'int') . "' "); include_once 'company/care_view.php';
.weiboShow .content .content_actionTime {float: left;} .weiboShow .content .content_actionMore {float: right;cursor: pointer;} .weiboShow .content .content_actionMore .weiboShow_vline {margin: 0 7px 0 8px;} .weiboShow .weiboShow_vline {color: #D2D2D2;} </style> <div class="WB_widgets weiboShow" id="pl_weibo_show" style="height: 444px;"> <?php $query = $db->query("SELECT sendperson,date,content,id FROM " . DB_TABLEPRE . "sms_receive where smskey='1' and receiveperson='" . $_USER->id . "' order by date desc"); while ($row = $db->fetch_array($query)) { ?> <div class="content clearfix"> <p class="content_txt"> <em><?php echo get_realname($row['sendperson']); ?> </em>: <?php //过滤下载 $content = str_replace("data/uploadfile/", "down.php?urls=data/uploadfile/", $row['content']); $content = str_replace('target="_blank"', "", $content); $content = str_replace('<a', " <a", $content); $content = str_replace('admin.php?', "admin.php?ac=receive&fileurl=sms&do=smskeymana&id=" . $row['id'] . "&urls=" . str_replace('&', "-", get_subcontent($content, 'admin.php?ac=', '>')), $content); echo $content; ?> </p> <p class="content_action WB_linkB"> <span class="content_actionTime"> <?php echo trim($row['date']);
} if ($ischeck == '3') { $wheresql .= " AND DATE_SUB(CURDATE(), INTERVAL 1 DAY)<=date(date) "; } if ($ischeck == '4') { $wheresql .= " AND DATE_SUB(CURDATE(), INTERVAL 3 DAY)<=date(date) "; } if ($ischeck == '5') { $wheresql .= " AND DATE_SUB(CURDATE(), INTERVAL 7 DAY)<=date(date) "; } if ($ischeck == '6') { $wheresql .= " AND DATE_SUB(CURDATE(),INTERVAL 1 MONTH)<=date(date) "; } if ($ischeck == '7') { $wheresql .= " AND DATE_SUB(CURDATE(),INTERVAL 6 MONTH)<=date(date) "; } $sql = "SELECT * FROM " . DB_TABLEPRE . "plan WHERE 1 {$wheresql} ORDER BY id desc"; $result = $db->query($sql); while ($row = $db->fetch_array($result)) { $archive = array("" . $row[title] . "", "" . str_replace("-", ".", $row[startdate]) . "", "" . str_replace("-", ".", $row[enddate]) . "", "" . $row['department'] . "", "" . $row['participation'] . "", "" . $row['person'] . "", "" . $row['note'] . "", "" . str_replace("-", ".", $row[completiondate]) . "", "" . get_realname($row['uid']) . "", "" . $row['type'] . "", "" . $row['content'] . ""); $content[] = $archive; } $excel = new ExcelWriter($outputFileName); if ($excel == false) { echo $excel->error; } foreach ($content as $v) { $excel->writeLine($v); } $excel->sendfile($outputFileName); }
$s4 = date("Y-m-d H:i:s"); if ($_GET['do'] == 'save') { $sql = "SELECT * FROM " . DB_TABLEPRE . "personnel where (lnstructions<>'生成收文拟办,系统自动完成该步骤' or isnull(lnstructions)) and fileid='" . $_POST['id'] . "' and type='" . $_POST['type'] . "' order by id desc limit 0,2"; $result9 = $db->fetch_all($sql); //print_r($result9); foreach ($result9 as $row9) { if ($sql != '') { $sql = ''; if ($row9['pkey'] == '0') { $canback = $row9['id']; } else { $canback = '0'; } } else { if ($canback != '0' && strpos('1' . $row9['name'], get_realname($_USER->id)) >= 1) { $db->query("update " . DB_TABLEPRE . "personnel set fileid='被回退:" . $_POST['id'] . "',lnstructions='" . $row9['lnstructions'] . "<br><font color=red>此操作在" . $s4 . "被" . get_realname($_USER->id) . "回退,理由:" . $_POST['ly'] . "</font>' WHERE id =" . $canback . " or id=" . $row9['id']); //////////////////////////////// $personnel2 = array('type' => $row9['type'], 'name' => $row9['name'], 'uid' => $row9['uid'], 'node' => $row9['node'], 'pkey' => 0, 'fileid' => $row9['fileid'], 'apptype' => $row9['apptype'], 'appflow' => $row9['appflow'], 'appkey' => $row9['appkey'], 'appkey1' => $row9['appkey1']); insert_db('personnel', $personnel2); if ($row9['appkey'] == '1') { $staff = explode(',', $row9['name']); $staffid = explode(',', $row9['uid']); for ($i = 0; $i < sizeof($staffid); $i++) { $personnel_log = array('type' => 2, 'name' => $staff[$i], 'uid' => $staffid[$i], 'pkey' => 0, 'perid' => $row9['id']); insert_db('personnel_log', $personnel_log); } } //$db->query('UPDATE personnel SET oapostscript ="流程被回退,理由:".$_POST['ly'] where id='); ///////////////////////////// if ($_POST['type'] == '1') { show_msg('操作成功,当前步骤已被撤销!', 'admin.php?ac=attachment&fileurl=app&type=5');
if ($vuidtype != '') { $wheresql .= " " . get_subordinate($_USER->id, 'uid'); } $ischeck = getGP('ischeck', 'P'); if ($ischeck != '') { $wheresql .= " AND key1='" . $ischeck . "'"; } $sql = "SELECT * FROM " . DB_TABLEPRE . "goods_purchase WHERE 1 {$wheresql} ORDER BY id desc"; $result = $db->query($sql); while ($row = $db->fetch_array($result)) { if ($row['key1'] == '1') { $type = "待审"; } elseif ($row['key1'] == '2') { $type = "通过"; } elseif ($row['key1'] == '3') { $type = "拒绝"; } elseif ($row['key1'] == '4') { $type = "己入库"; } $archive = array("" . $row[number] . "", "" . $row[application] . "", "" . str_replace("-", ".", $row[startdate]) . "", "" . $row[pricenum] . "RMB", "" . $row[examination] . "", "" . $row[purchase] . "", "" . str_replace("-", ".", $row[keydate]) . "", "" . $type . "", "" . get_realname($row['uid']) . "", "" . get_goods_purchase_view($row['id']) . ""); $content[] = $archive; } $excel = new ExcelWriter($outputFileName); if ($excel == false) { echo $excel->error; } foreach ($content as $v) { $excel->writeLine($v); } $excel->sendfile($outputFileName); }
$outputFileName = 'data/excel/' . $datename . '.xls'; $content = array(); $archive = array("接收人", "发送人", "发送时间", "内容"); $content[] = $archive; $wheresql = ''; $vuidtype = getGP('vuidtype', 'P'); if (!is_superadmin() && $vuidtype == '') { $wheresql .= " AND uid ='" . $_USER->id . "'"; } if ($vuidtype != '') { if ($vuidtype == '-1') { $wheresql .= get_subordinate($_USER->id, 'uid'); } else { $wheresql .= " and uid='" . $vuidtype . "'"; } } $sql = "SELECT * FROM " . DB_TABLEPRE . "sms_send WHERE 1 {$wheresql} ORDER BY id desc"; $result = $db->query($sql); while ($row = $db->fetch_array($result)) { $archive = array("" . $row['receiveperson'] . "", "" . get_realname($row['uid']) . "", "" . str_replace("-", ".", $row[date]) . "", "" . $row['content'] . ""); $content[] = $archive; } $excel = new ExcelWriter($outputFileName); if ($excel == false) { echo $excel->error; } foreach ($content as $v) { $excel->writeLine($v); } $excel->sendfile($outputFileName); }
function app_type_key($type = 2, $id = 0, $user = '') { global $db; $sql = "SELECT id FROM " . DB_TABLEPRE . "app_type WHERE type = '2' and id='" . $apptype . "' and content like '%" . get_realname($user) . "%'"; $row = $db->fetch_one_array($sql); if ($row['id'] != '') { return 1; } else { return 0; } }
<td nowrap class="TableContent">备注:</td> <td class="TableData" colspan=3> <?php echo get_human_db($blog['id'], "toa_5_REMARK"); ?> </td> </tr> <tr class="TableData" id="attachment2"> <td nowrap class="TableContent">附件文档:</td> <td nowrap colspan=3 > <?php global $db; $sql = "SELECT * FROM " . DB_TABLEPRE . "fileoffice WHERE officeid='" . $blog['id'] . "' and officetype='4' and filetype='2' ORDER BY id desc"; $result = $db->query($sql); while ($row = $db->fetch_array($result)) { echo '<a href="down.php?urls=' . $row['fileaddr'] . '">' . $row['filename'] . '</a> 上传人:' . get_realname($row['uid']) . ' 上传时间:' . $row['date'] . '<br>'; } ?> </td> </tr> </table> </form> </body> </html>
<dl> <dt><span>*</span>收 货 人:</dt> <dd><input type="text" class="cart_n_short" id="realname" maxlength="20" data-input="text" value=""><font class="ml10 cleb6100" style="display: none;">收货人不能为空</font></dd> </dl> <dl> <dt><span>*</span>手 机:</dt> <dd><input type="text" class="cart_n_short" id="phone" maxlength="11" data-msg="收货手机号码格式不正确" data-input="text" data-type="cellphone" value=""> 用于接收发货通知及送货前确认</dd> </dl> <dl> <dd><input id="isdefault" checked="checked" name="default" type="checkbox" class="cart_n_box">设为默认地址</dd> </dl> <dl> <dt> </dt> <dd><a href="javascript:void(0)" class="ncart_btn_on" onclick="savemsg();">保存</a></dd> </dl> </form></div> <?php } else { ?> <div id="senderdetail"> <p id="f_default"><input type="radio" id="default" name="sender" checked="checked" value="<?php echo get_addressid($uid); ?> " /> 收件人:<?php echo get_realname($uid); ?> 联系电话:<?php echo get_cellphone($uid); ?> 收货地址:<?php echo get_address($uid); ?> </p> </div> <div id="formsender" style="display:none"> <form id="form" name="form" > <dl> <dt>详细地址:</dt> <dd><input type="text" class="cart_n_long" id="address" maxlength="40" data-input="text" value="" name="area"><font class="ml10 cleb6100" style="display: none;">详细地址不能为空</font></dd> </dl> <dl> <dt><span>*</span>收 货 人:</dt> <dd><input type="text" class="cart_n_short" id="realname" maxlength="20" data-input="text" value=""><font class="ml10 cleb6100" style="display: none;">收货人不能为空</font></dd> </dl> <dl> <dt><span>*</span>手 机:</dt> <dd><input type="text" class="cart_n_short" id="phone" maxlength="11" data-msg="收货手机号码格式不正确" data-input="text" data-type="cellphone" value=""> 用于接收发货通知及送货前确认</dd> </dl> <dl> <dd><input id="default" checked="checked" name="default" type="checkbox" class="cart_n_box">设为默认地址</dd> </dl>