function is_index() { $req = $_SERVER['REQUEST_URI']; if ($req == site_path() . '/') { return true; } else { return false; } }
function clear_page_cache($url) { $b = str_replace('/', '#', site_path() . '/'); $p = 'cache/page/' . $b . $url . '.cache'; if (file_exists($p)) { unlink($p); } }
?> </td> </tr> <tr> <td align="center" valign="middle" class="input"> </td> </tr> <tr> <td align="left" valign="middle" class="line24"><?php echo $page->getContent(); ?> </td> </tr> </table></td> </tr> </table> <table width="96%" height="20" border="0" cellpadding="0" cellspacing="0"> <tr> <td align="center" bgcolor="#FFFFFF"> </td> </tr> </table></td> </tr> </table> <table width="80%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="20"><img src="<?php echo site_path("images/spacer.gif"); ?> " width="1" height="1"></td> </tr> </table>
function dispatch() { $path = $_SERVER['REQUEST_URI']; if (config('site.url') !== null) { $path = preg_replace('@^' . preg_quote(site_path()) . '@', '', $path); } $parts = preg_split('/\\?/', $path, -1, PREG_SPLIT_NO_EMPTY); $uri = trim($parts[0], '/'); $uri = strlen($uri) ? $uri : 'index'; route(method(), "/{$uri}"); }
margin-right: 0px; margin-bottom: 0px; } /*链接样式*/ a{text-decoration: none;} /* 链接无下划线,有为underline */ a:link {color: #454545;} /* 未访问的链接 */ a:visited {color: #454545;} /* 已访问的链接 */ a:hover{color: #ff0000;} /* 鼠标在链接上 */ a:active {color: #454545;} /* 点击激活链接 */ menu {padding:0px 0px; margin:0px 0px;} menu h3 { margin:0px 0px;font-size:12px;background:url(<?php echo site_path("images/admin/main_34_1.gif"); ?> ) no-repeat; padding:5px 16px;} menu li { margin:0px 0px;padding:2px 16px; list-style:none; background:url(<?php echo site_path("images/admin/menu_ico.gif"); ?> ) no-repeat; background-position:0px 6px;} menu ul { margin:0px 0px;padding:0px 0px;} body,td,th { font-size: 12px; } .mouseover { border:solid 1px #adb9c2; background:url(<?php echo site_url("images/admin/tab_bg.gif"); ?> ) repeat-x;} --> </style> </HEAD> <BODY> <?php
<script language="javascript" type="text/javascript" src="<?php echo site_path("js/jquery.progress.js"); ?> "></script> <script language="javascript" type="text/javascript"> $(function(){ get(); }); function get() { $.get('<?php echo site_url("admin/build/article"); ?> ',{},function(json){ eval("json = " + json); $("#progressbar").Progress(json.num,json.total); if(json.num < json.total) get(); }); } </script> <STYLE> #progressbar { BORDER-RIGHT: #add2da 1px solid; BORDER-TOP: #add2da 1px solid; BORDER-LEFT: #add2da 1px solid; WIDTH: 99%; COLOR: #add2da; BORDER-BOTTOM: #add2da 1px solid; POSITION: relative; HEIGHT: 20px; padding:1px 1px; } #progressbar DIV.progress { OVERFLOW: hidden; WIDTH: 0px; POSITION: absolute; HEIGHT: 20px; BACKGROUND-COLOR: #add2da; } #progressbar DIV.progress .text { COLOR: white; POSITION: absolute; TEXT-ALIGN: center }
?> ',addPic);" /> </label> (如果想删除上传的图片,请不要勾选该图片,保存即可。)</td> </tr> <tr> <td colspan="3"><ul class="img_list"> <?php $images = $product->getImages(); for ($i = 0, $n = count($images); $i < $n; $i++) { if ($images[$i] == '') { continue; } ?> <li><img src="<?php echo site_path("up_files/" . $images[$i]); ?> " width="150" height="100" alt="" /><input name="images[]" type="checkbox" checked="checked" value="<?php echo $images[$i]; ?> " /></li> <?php } ?> </ul></td> </tr> <tr> <th align="center">详细描述</th> <td colspan="3" align="center"><?php echo sf::getPlugin("Fckeditor", "content", $product->getContent(), '100%', 600)->create(); ?>
?> " type="text/javascript"></script> <script language="javascript" src="<?php echo site_path("js/jquery.form.js"); ?> " type="text/javascript"></script> <script language="javascript" src="<?php echo site_path("js/validate/jquery.validate.js"); ?> " type="text/javascript"></script> <script language="javascript" src="<?php echo site_path("js/jquery.datePicker.js"); ?> " type="text/javascript"></script> <script language="javascript" type="text/javascript" src="<?php echo site_path("js/loadbox.js"); ?> "></script> <script language="javascript" type="text/jscript"> $(document).ready(function() { $("#validateForm").validate({errorElement: "em"}); $('.menubar li[class!="active"]').mouseover(function(){$(this).addClass("active");}); $('.menubar li[class!="active"]').mouseout(function(){$(this).removeClass("active");}); }); </script> </head> <body> <div class="header"> <div class="logo">快速建站</div> <div class="banner">baner</div> </div>
<td height="121" colspan="2" valign="top"><strong>简要说明:</strong> <?php echo $product->getBrief(); ?> </td> </tr> <tr> <form action="" method="post" name="form1" id="form1"> <td colspan="2" class="line18"><table width="96%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="48%"> </td> <td width="52%"><a href="<?php echo site_url("order_from/index/type/" . $type . "/subject/" . $product->getSubject()); ?> "><img src="<?php echo site_path("images/gmbtn.png"); ?> " width="71" height="25" border="0" /></a></td> </tr> </table></td> </form> </tr> </table></td> </tr> </table> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center"> </td> </tr> </table> <table width="98%" border="0" cellpadding="0" cellspacing="1" bgcolor="#F2F2F2" style="line-height:25px;">
echo site_url("common/index"); ?> " align="absmiddle"></td> </tr> <tr> <td height="35"> </td> <td width="20%" height="35"><input name="Submit" class="button" id="Submit" value="登 陆" type="submit"> </td> <td class="top_hui_text" width="67%"><input name="cs" class="button" id="cs" value="取 消" type="reset"></td> </tr> </tbody></table> <br> </form></td> </tr> <tr> <td align="right" valign="bottom" width="433" height="164"><img src="<?php echo site_path("images/admin/login-wel.gif"); ?> " width="242" height="138"></td> <td align="right" valign="bottom" width="57"> </td> </tr> </tbody></table></td> </tr> </tbody></table> </td> </tr> </tbody></table></td> </tr> <tr> <td height="20"><table class="login-buttom-bg" border="0" width="100%" cellpadding="0" cellspacing="0"> <tbody><tr> <td align="center"><span class="login-buttom-txt">Copyright © 2009</span></td>
/** * 幻灯型 */ function getMagicHtmlStr() { $pic = $link = $text = $content = array(); $content = $this->ads->getContent(); for ($i = 0, $n = count($content); $i < $n; $i++) { if (!$content[$i]["image"]) { continue; } $pic[] = site_path("up_files/" . $content[$i]["image"]); $link[] = $content[$i]["url"]; $text[] = $content[$i]["des"]; } $str = 'pics=' . implode("|", $pic) . '&links=' . implode("|", $link) . '&texts=' . implode("|", $text) . '&&borderwidth=' . $content["config"]["width"] . '&borderheight=' . $content["config"]["height"] . '&textheight=' . $content["config"]["textheight"]; $htmlStr = '<div class="ad_magic">'; $htmlStr .= '<embed src="' . site_path("images/tools/pix.swf") . '" wmode="opaque" FlashVars="' . $str . '" menu="false" bgcolor="' . $content["config"]["bgcolor"] . '" quality="high" width="' . $content["config"]["width"] . '" height="' . $content["config"]["height"] . '" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'; $htmlStr .= '</div>'; return $htmlStr; }
<style type="text/css"> <!-- body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } --> </style></head> <body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td background="<?php echo site_path("images/admin/main_71.gif"); ?> " style="line-height:11px; table-layout:fixed" width="165"> </td> <td background="<?php echo site_path("images/admin/main_72.gif"); ?> " style="line-height:11px; table-layout:fixed"> </td> <td background="<?php echo site_path("images/admin/main_74.gif"); ?> " style="line-height:11px; table-layout:fixed" width="17"> </td> </tr> </table> </body> </html>
/** * 取得置顶产品 */ function selectProductWithImgAndSubjectByCategoryId($categoryId = '0', $showMax = 5, $subjectLen = 10) { $addWhere = $addSql = ''; $type && ($addWhere .= "`type_str` = '" . $type . "' "); $categoryId && ($addWhere .= "`category_id` = '" . $categoryId . "' "); $addSql = "ORDER BY updated_at DESC"; $result = sf::getModel("products")->selectAll($addWhere, $addSql, $showMax); $htmlStr .= '<ul class="selectProductWithImgAndSubjectByCategoryId">' . "\r\n"; while ($product = $result->getObject()) { $htmlStr .= ' <li><img src="' . site_path("up_files/" . $product->getCover()) . '" onerror="this.src=\'' . site_path("images/cp01.jpg") . '\'" /><h1>' . link_to("product/show/type/" . $product->getTypeStr() . "/id/" . $product->getId(), $product->getSubject($subjectLen), array('target' => '_blank')) . "</h1></li>\r\n"; } $htmlStr .= "</ul>"; return $htmlStr; }
?> " type="text/javascript"></script> <script language="javascript" src="<?php echo site_path("js/validate/jquery.validate.js"); ?> " type="text/javascript"></script> <script language="javascript" src="<?php echo site_path("js/jquery.datePicker.js"); ?> " type="text/javascript"></script> <script language="javascript" type="text/javascript" src="<?php echo site_path("js/loadbox.js"); ?> "></script> <script language="javascript" type="text/javascript" src="<?php echo site_path("js/func.js"); ?> "></script> <script language="javascript" type="text/jscript"> $(document).ready(function() { $("#selectAll").click( function() { $("input[name='select_id[]']").each( function() { $(this).attr("checked",!this.checked); }) }); $("#validateForm").validate({errorElement: "em"}); $('.date-pick').datePicker({startDate:'1970-01-01'}); $('.tb_data tr').addClass("mouseout"); $('.tb_data tr').mouseover(function(){$(this).removeClass("mouseout").addClass("mouseover");}); $('.tb_data tr').mouseout(function(){$(this).removeClass("mouseover").addClass("mouseout");}); }); </script> </head>
function show() { !input::getInput("get.id") && $this->page_debug(lang::get("Lack of parameters!")); header("location:" . site_path("up_files/" . sf::getModel("filemanager", input::getInput("get.id"))->getFilePath())); }
<td><?php echo $template->getSubject(); ?> </td> </tr> <tr> <th align="right" width="80">模板描述</th> <td><?php echo $template->getBrief(); ?> </td> </tr> <tr> <th align="right" width="80">封面图片</th> <td><img src="<?php echo site_path("up_files/" . $template->getCover()); ?> " width="120" height="100" /></td> </tr> <tr> <th align="right">发布日期</th> <td><?php echo $template->getUpdatedAt("Y/m/d"); ?> </td> </tr> <tr> <th align="center">参数说明</th> <td align="left"><?php echo nl2br($template->getNote()); ?>
function is_index() { $req = $_SERVER['REQUEST_URI']; if (stripos($req, '/category/') !== false || stripos($req, '/archive/') !== false || stripos($req, '/tag/') !== false || stripos($req, '/search/') !== false || stripos($req, '/blog') !== false || $req == site_path() . '/' || stripos($req, site_path() . '/?page') !== false) { return true; } else { return false; } }
<td align="left" bgcolor="#FFFFFF"><input name="work_at" type="text" id="work_at" class="required"/></td> <th align="center" bgcolor="#F3F3F3">邮编</th> <td align="left" bgcolor="#FFFFFF"><input name="post_code" type="text" id="post_code" class="required"/></td> </tr> <tr> <th align="center" bgcolor="#F3F3F3">教育培训经历</th> <td colspan="3" align="left" bgcolor="#FFFFFF"><textarea name="study_list" cols="60" rows="5" id="study_list" style="width:100%;" class="required"> </textarea></td> </tr> <tr> <th align="center" bgcolor="#F3F3F3">工作经历</th> <td colspan="3" align="left" bgcolor="#FFFFFF"><textarea name="work_list " cols="60" rows="5" id="work_list " style="width:100%;" class="required"></textarea></td> </tr> <tr> <td colspan="4" align="center"><input type="image" src="<?php echo site_path("images/jltdbtn01.png"); ?> " name="jltdbtn" width="97" height="24" border="0" id="jltdbtn" /> <input name="id" type="hidden" id="id" value="<?php echo $job->getId(); ?> " /> <input name="fromUrl" type="hidden" id="fromUrl" value="<?php echo getFromUrl(); ?> " /></td> </tr> </form> </table> <br />