<?php echo h($section->subject); ?> </span> </div> <div class="guide-section"> <div class="guide-sidebar"> <?php $this->_control('chapters', 'chapters', array('book' => $book)); ?> </div> <div class="guide-contents formatted"> <?php echo Command_Book::formatting($section->contents); ?> </div> <div class="nofloat"></div> </div> <div class="guide-footer"> <table border="0" width="100%"> <tr> <td align="left" width="200"> <?php if ($section->prev()) { ?> «
?> "><?php echo h($book->subject); ?> </a> » <?php echo h($chapter->subject); ?> </span> </div> <div class="guide-chapter-details formatted"> <?php echo Command_Book::formatting($chapter->contents); ?> <?php if (count($chapter->sections)) { ?> <hr /> <h4>本章内容列表</h4> <ul> <?php foreach ($chapter->sections as $section) { ?>
<div class="guide-section"> <div class="guide-header"> <span class="nav"> <a href="/docs/">文档索引</a> » <?php echo h($book->subject); ?> </span> </div> <div class="guide-section-details formatted"> <?php echo Command_Book::formatting($book->contents); ?> <hr /> <h2>目录</h2> <div id="columns-chapters"> <?php $i = 0; $nu = 0; $all_sections = array(); foreach ($book->chapters as $chapter) { $nu++; ?>
* 创建开发者手册 */ require dirname(__FILE__) . '/../library/q.php'; $dir = dirname(__FILE__); Q::import($dir); Q::import($dir . '/command'); Q::import($dir . '/command/book'); Q::import($dir . '/_vendor/zf'); Q::changeIni('vendor_dir', dirname(__FILE__) . DS . '_vendor'); if (!isset($argv[2])) { echo <<<EOT php gen_book.php <source_dir> <output_dir> [mode] syntax: mode: "online", "offline" or "chm", online is default EOT; exit(-1); } $source_dir = $argv[1]; $output_dir = $argv[2]; if (isset($argv[3])) { $mode = strtolower(trim($argv[3])); } else { $mode = 'online'; } Command_Book::create()->sourceDir($source_dir)->outputDir($output_dir)->docmode($mode)->execute();