Toggle main menu visibility
新聞
下載
教材
影音
討論
其他選單
好站連結
行事曆
電子相簿
常見問題
萬用表單
即時留言簿
友站消息
社大學員
:::
登入
登入
帳號
密碼
登入
重整畫面
:::
所有書籍
「[1071]XOOPS模組開發」目錄
MarkDown
7-7 interface_menu.php
1. XOOPS模組基礎架構
1-1 xoops_version.php
1-2 sql/mysql.sql
1-3 admin/menu.php
1-4 language/tchinese_utf8
1-5 admin/main.php
1-6 templates/snews_adm_main.tpl
1-7 admin/topic.php
1-8 templates/snews_adm_topic.tpl
2. 表單、資料庫、使用者物件
2-1 admin/main.php
2-2 templates/snews_adm_main.tpl
2-3 templates/op_snews_list.tpl
2-4 templates/op_snews_form.tpl
2-5 sql/mysql.php
2-6 xoops_version.php
2-7 function.php
3. 前台顯示、編輯、刪除
3-1 index.php
3-2 xoops_version.php
3-3 menu.php
3-4 header.php
3-5 templates/snews_index.tpl
3-6 templates/op_snews_show.tpl
3-7 templates/op_snews_list.tpl
3-8 admin/main.php
4. 首頁精選文章輪播
4-1 admin/main.php
4-2 index.php
4-3 templates/op_snews_show.tpl
4-4 templates/op_snews_list.tpl
5. 自動生成群組並做權限判斷
5-1 xoops_version.php
5-2 interface_menu.php
5-3 header.php
5-4 index.php
5-5 admin/main.php
5-6 include/onUpdate.php
5-7 include/onInstall.php
5-8 include/onUninstall.php
5-9 templates/op_snews_list.tpl
5-10 templates/op_snews_show.tpl
5-11 include/search.php
6. json應用與XOOPS區塊
6-1 xoops_version.php
6-2 language/tchinese_utf8/modinfo.php
6-3 index.php
6-4 html.php
6-5 templates/op_snews_show.tpl
6-6 function.php
6-7 blocks/snews_block_focus.php
6-8 blocks/snews_block_focus.tpl
6-9 css/module.css
6-10 interface_menu.php
6-11 language/tchinese_utf8/blocks.php
6-12 templates/op_snews_list.tpl
6-13 function_block.php
7. 產生PDF及拉動排序
7-1 templates/snews_index.tpl
7-2 templates/op_snews_list.tpl
7-3 index.php
7-4 css/module.css
7-5 templates/op_snews_show.tpl
7-6 pdf.php
7-7 interface_menu.php
7-8 pdf_all.php
8. Excel匯出匯入及點擊編輯
8-1 interface_menu.php
8-2 focus.php
8-3 function.php
8-4 templates/op_snews_focus.tpl
8-5 save_sort.php
8-6 excel.php
8-7 excel2.php
8-8 import.php
8-9 templates/op_import_form.tpl
9. 產生word檔、壓縮及解壓
9-1 index.php
9-2 templates/op_snews_show.tpl
9-3 save.php
9-4 interface_menu.php
9-5 word.php
9-6 zip.php
9-7 templates/op_zip_import.tpl
8. Excel匯出匯入及點擊編輯
\[1071\]XOOPS模組開發 ================= ``` setPrintHeader(false); //不要頁首 $pdf->setPrintFooter(false); //不要頁尾 // $pdf->SetAutoPageBreak(true, PDF_MARGIN_BOTTOM); //設定自動分頁 $pdf->setFontSubsetting(true); //產生字型子集(有用到的字才放到文件中) $pdf->SetMargins(15, 15); //設定頁面邊界, $pdf->AddPage(); //新增頁面,一定要有,否則內容出不來 $pdf->SetFont('droidsansfallback', '', 24, '', true); //設定字型 $pdf->Cell(180, 12, '巷談集文章列表', 0, 1, 'C', 0); $myts = MyTextSanitizer::getInstance(); $tbl = $xoopsDB->prefix('snews'); $sql = "SELECT * FROM `$tbl` ORDER BY create_time DESC"; $result = $xoopsDB->query($sql) or web_error($sql); // $pdf->Cell($w, $h = 0, $txt = '', $border = 0, $ln = 0, $align = '', $fill = 0, $link = nil, $stretch = 0, $ignore_min_height = false, $calign = 'T', $valign = 'M') //$pdf->MultiCell( $w, $h, $txt, $border = 0, $align = 'J', $fill = false, $ln = 1, $x = '', $y = '', $reseth = true, $stretch = 0, $ishtml = false, $autopadding = true, $maxh = 0, $valign = 'T', $fitcell = false ); $pdf->SetFont('droidsansfallback', '', 12, '', true); //設定字型 $height=10; while($snews = $xoopsDB->fetchArray($result)){ $title = $myts->htmlSpecialChars($snews['title']); $username = $myts->htmlSpecialChars($snews['username']); // $count=strlen($title); // $l=ceil($count/60); // if($l>1){ // $height=$h+$l*4; // }else{ // $height=$h; // } $pdf->MultiCell( 130, $height, $title, 1, 'L', false, 0, '', '', false, 0, false, false, $height, 'M', true); $pdf->MultiCell( 28, $height, $username, 1, 'C', false, 0, '', '', false, 0, false, false, $height, 'M', true); $pdf->MultiCell( 22, $height, $snews['update_time'], 1, 'C', false, 1, '', '', false, 0, false, false, $height, 'M', true); // $pdf->Cell(50, $height, $username, 1, 0,'C',0,'',1); // $pdf->Cell(36, $height, $snews['update_time'], 1, 1,'C',0,'',1); } $pdf->Image('images/aa.png', 180, 250, 20, 20, 'png'); $pdf->SetXY(120, 255); $pdf->SetFont('droidsansfallback', '', 16, '', true); //設定字型 $pdf->Cell(20, 10, '簽名:', 0, 0); $pdf->Cell(50, 10, '', 'B', 0, 0); //PDF內容設定 $pdf->Output('snews.pdf', 'I'); ```
:::
搜尋
search
進階搜尋
QR Code 區塊
快速登入
所有討論區
「PHP全端開發」線上課程討論區
XOOPS使用討論區
一般研習學員
社大學員專用
路過哈啦區
XOOPS佈景設計
XOOPS模組開發
Tad書籍區
即時留言簿
書籍目錄
展開
|
闔起
線上使用者
66
人線上 (
16
人在瀏覽
線上書籍
)
會員: 0
訪客: 66
更多…