function stylesheet_include_tag($style_names) { if (is_array($style_names)) { $tags = ''; foreach ($style_names as $style) { $tags .= stylesheet_include_tag($style) . "\n"; } return $tags; } $url = is_external_url($style_names) ? $style_names : url_for("/css/{$style_names}?v=" . TIPI::getVersion()); return '<link href="' . $url . '" media="screen" rel="stylesheet" type="text/css" />'; }
<?php require_once "lib/common.inc.php"; require_once "lib/SimpieView.php"; $view = new SimpieView("templates/index.php", "templates/layout/main.php"); $view->render(array('title' => "首页", 'have_new_version' => TIPI::haveNewVersion()));
<p>目前提供PDF以及CHM格式版本的下载,当前版本为:<span class="current-version"><?php echo TIPI::getVersion(); ?> </span>:</p> <div id="download-list" class="clearfix"> <div style='padding-left: 100px;' class="fl"><a target='_blank' href="<?php echo url_for("https://github.com/reeze/tipi/blob/master/web/releases/" . TIPI::getVersion() . ".pdf?raw=true"); ?> "> <img src="<?php echo url_for("/images/icon_pdf.png"); ?> " /></a></div> <div style='padding-left: 100px;' class="fl"><a target='_blank' href="<?php echo url_for("https://github.com/reeze/tipi/blob/master/web/releases/" . TIPI::getVersion() . ".chm?raw=true"); ?> "> <img src="<?php echo url_for("/images/icon_chm.png"); ?> " /></a></div> </div> <p> 本站所有的内容都托管在github上,我们目前推荐从: <a href="http://github.com/reeze/tipi">http://github.com/reeze/tipi</a>下载。 从那里可以轻松的下载所有的内容,你也可以<a href="<?php echo url_for("/feed/"); ?> ">订阅我们的更新</a>,我们每完成一小节都会在这里更新, 或者我们发布了新版本的移动版本书籍或者有其他消息也会通过RSS输出,所以订阅我们可以随时和我们保持联系, 也可以点击进入<a href="<?php
<?php echo stylesheet_include_tag_embed(array('portable.css')); ?> </head> <body id="portable-cover"> <div style="text-align:center;font-size: 20em;padding-top: 200px;">TIPI</div> <div id="cover"> <h1>TIPI:深入理解PHP内核</h1> <p>www.php-internals.com<span><?php echo TIPI::getVersion(); ?> </span></p> <div id="cover-extra"> <a href="<?php echo TIPI::getHomeUrlForPdf(); ?> "><img src="<?php echo url_for("/images/get-lastest.png"); ?> " /></a> </div> </div> <div id="cover-authors"> <ul> <li>reeze <?php echo link_to("http://reeze.cn", "http://reeze.cn"); ?> </li> <li>er <?php
<?php require_once "../../web/lib/common.inc.php"; require_once "../../web/lib/SimpieView.php"; require_once "../../web/lib/TIPI.php"; require_once "../../web/models/BookPage.php"; require_once dirname(__FILE__) . "/TipiCHM.php"; set_time_limit(0); $pages = BookPage::getFlatPagesArrayForPrint(); $view = new SimpieView('../../web/templates/chm/print.php'); $chapt_list = BookPage::getChapterList(); #array_shift($chapt_list); $data = array('page_name' => 'ch/home', 'list' => $chapt_list, 'title' => 'TIPI'); define('ROOT', dirname(__FILE__) . "/"); $filename = TIPI::getVersion(); $tipichm = new TipiCHM($filename, $data); /* 执行HTML help Workshop的complie后 */ if ($_GET['complied'] == 1) { $tipichm->copyCHM(); die; } $tipichm->copyCSS(ROOT_PATH . "/css/book.css"); $tipichm->copyCSS(ROOT_PATH . "/css/main.css"); $tipichm->copyCSS(ROOT_PATH . "/css/chm.css"); $tipichm->copyCSS(ROOT_PATH . "/css/highlight.css"); $tipichm->copyImages(ROOT_PATH . "/images/get-lastest.png"); $tipichm->createHome(); $tipichm->copyImagesOfDiretory(); $tipichm->createFiles($view, $pages); $tipichm->createHHC(); $tipichm->createHHK();
<?php require_once dirname(__FILE__) . "/lib/SimpieCache.php"; require_once dirname(__FILE__) . "/lib/TIPI.php"; require_once dirname(__FILE__) . "/lib/GithubVersionManager.php"; require_once dirname(__FILE__) . "/models/BookPage.php"; /* --------------------------------------------------------------------------- 用于进行一些基本的配置及初始化 ----------------------------------------------------------------------------*/ /** * 通过prefix的方式控制版本,因为所有的内容都和发布的TIPI版本一致。 * 这样在上线新版本时的缓存也能自动清除,唯一的问题是历史版本的缓存会继续保留 * 不过对于TIPI来说并没有什么问题 */ SimpieCache::setGlobalCacheFilePrefix(TIPI::getVersion()); /** * 用户获取各图书页面的更新和修改历史信息 */ BookPage::setVersionManger(new GithubVersionManager(GITHUB_API_USER, GITHUB_API_REPOS, GITHUB_API_BRANCH));
<!DOCTYPE html> <html> <head> <title><?php echo SITE_NAME; ?> </title> <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <?php echo stylesheet_include_tag_embed(array('portable.css')); ?> </head> <body id="portable-header"> <div id="header"> <a href="<?php echo TIPI::getHomeUrlForPdf(); ?> ">TIPI:深入理解PHP内核<span><?php echo TIPI::getVersion(); ?> </span></a> <?php // TODO 根据当前页面来生成标题 ?> </div> </body> </html>
</title> <meta http-equiv="Content-type" content="text/html; charset=gbk"> <link href="chm.css" media="screen" rel="stylesheet" type="text/css" /> </head> <body id="portable-cover"> <div style="text-align:center;font-size: 20em;padding-top: 180px;">TIPI</div> <div id="cover"> <h1>TIPI:深入理解PHP内核</h1> <p>www.php-internals.com<span><?php echo TIPI::getVersion(); ?> </span></p> <div id="cover-extra"> <a href="<?php echo TIPI::getHomeUrlForChm(); ?> "><img src="get-lastest.png" /></a> </div> </div> <div id="cover-authors"> <ul> <li>reeze <?php echo link_to("http://reeze.cn", "http://reeze.cn"); ?> </li> <li>er <?php echo link_to("http://www.zhangabc.com", "http://www.zhangabc.com"); ?> </li>
<h1>下载</h1> <div> <p> TIPI项目,主要包括: 深入理解PHP,以及相关的项目,本站所有的PHP源代码以及网站的一些设计素材。 </p> <p> 深入理解PHP内核这本书目前提供PDF版的下载,将来会提供Epub以及chm格式的版本,不过目前由于时间原因暂时无法提供下载,同时项目还处在初期, 书的内容还没有完成写完,这也是一个长久的过程。不过我们每次更新:比如写完一章都会发布新的版本,同时提供各种格式的下载。 </p> <div id="download-list"> 目前提供PDF版本的下载,当前版本<span class="current-version"><?php echo TIPI::getVersion(); ?>.pdf</span>: <div style='padding-left: 100px;'><a target='_blank' href="<?php echo url_for("/releases/RELEASE_2011-06-01_V0.5.9.pdf"); ?>"><img src="<?php echo url_for("/images/icon_pdf.png"); ?>" /></a></div> </div> <p> 本站所有的内容都托管在github上,我们目前推荐从: <a href="http://github.com/reeze/tipi">http://github.com/reeze/tipi</a>下载。 从那里可以轻松的下载所有的内容,你也可以<a href="<?php echo url_for("/feed/");?>">订阅我们的更新</a>,我们每完成一小节都会在这里更新, 或者我们发布了新版本的移动版本书籍或者有其他消息也会通过RSS输出,所以订阅我们可以随时和我们保持联系, 也可以点击进入<a href="<?php echo url_for("/");?>">首页</a>, 那里有我们的各种联系方式,比如在twitter上fo我们。 </p> </div>
<!DOCTYPE html> <html> <head> <title><?php echo SITE_NAME; ?></title> <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <?php echo stylesheet_include_tag_embed(array('portable.css')); ?> </head> <body id="portable-cover"> <div style="text-align:center;font-size: 20em;padding-top: 200px;">TIPI</div> <div id="cover"> <h1>TIPI:深入理解PHP内核</h1> <p>www.php-internal.com<span><?php echo TIPI::getVersion(); ?></span></p> <div id="cover-extra"> <a href="<?php echo TIPI::getHomeUrlForPdf(); ?>"><img src="<?php echo url_for("/images/get-lastest.png"); ?>" /></a> </div> </div> <div id="cover-authors"> <ul> <li>reeze <?php echo link_to("http://reeze.cn", "http://reeze.cn"); ?></li> <li>er <?php echo link_to("http://www.zhanger.com", "http://www.zhanger.com"); ?></li> <li>phppan <?php echo link_to("http://www.phppan.com", "http://www.phppan.com"); ?></li> </ul> </div> </body> </html>