📄 header.php
字号:
<?php//////////////////////////// COPYRIGHT NOTICE ////////////////////////////////////// This script is part of BosClassifieds, a software application by BosDev, Inc //// Use of any kind of part or all of this script or modification of this //// script requires a license from BosDev, Inc. Use or modification of //// this script without a license constitutes Software Piracy and will //// result in legal action from BosDev, Inc. All rights reserved. //// http://www.bosdev.com sales@bosdev.com //// //// BosClassifieds Copyright 2004, BosDev, Inc. ////////////////////////////////////////////////////////////////////////////////////echo<<<ENDPRINT<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html {$Languages['global']['dir']}> <head> <title>{$title_extra}{$SystemOptions['title']}</title> <meta name="description" content="{$SystemOptions['meta_desc']}"> <meta name="keywords" content="{$SystemOptions['meta_key']}"> <meta http-equiv="Content-Type" content="text/html; charset={$Languages['global']['charset']}"> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="expires" content="Wed, 27 Dec 2000 08:00:00 GMT"> <meta http-equiv="cache-control" content="no-cache, must-revalidate"> <link href="{$insUrl}styles/{$SystemOptions['css']}" rel="stylesheet" type="text/css"> </head> <body> <script language="JavaScript" src="{$insUrl}javascript.js"></script>ENDPRINT;//Load headerif(substr($SystemOptions['page_header'],0,5) == "file:") { $fileToInclude = substr($SystemOptions['page_header'],5); @include("$fileToInclude"); } else { echo stripslashes($SystemOptions['page_header']); }//Get bannerif($SystemOptions['banner'] != "") { //Check file type $bannerInfo = getimagesize("{$insPath}images/{$SystemOptions['banner']}"); if($bannerInfo[2] == 4) { $displayBanner = "<embed src=\"{$insUrl}images/{$SystemOptions['banner']}\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" width=\"{$bannerInfo[0]}\" height=\"{$bannerInfo[1]}\" alt=\"{$SystemOptions['title']}\"></embed>"; } else { $displayBanner = "<img src=\"{$insUrl}images/{$SystemOptions['banner']}\" width=\"{$bannerInfo[0]}\" height=\"{$bannerInfo[1]}\" border=\"0\">"; } echo<<<ENDPRINT <div align="center"> <table width="{$SystemOptions['page_width']}" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center"><a href="{$insUrl}index.php">$displayBanner</a></td> </tr> </table> </div>ENDPRINT; }$numCols = 0;if(!authenticateUser()) { $extraMenuCols .= "<td width=\"repcol\" align=\"center\"><a href=\"{$insUrl}account.php?action=login\">{$Languages['nav']['login']}</a></td>"; $numCols++; } else { $extraMenuCols .= "<td width=\"repcol\" align=\"center\"><a href=\"{$insUrl}account.php\">{$Languages['nav']['youraccount']}</a></td>"; $numCols++; $userInfo = getUserInfo(); if($userInfo['admin'] != 0) { $extraMenuCols .= "<td width=\"repcol\" class=\"menu_bar_text\" align=\"center\"><a href=\"{$insUrl}admin/index.php\">{$Languages['nav']['admin']}</a></td>"; $numCols++; } }$menuColWidth = intval(100/($numCols+2));$extraMenuCols = str_replace("repcol","{$menuColWidth}%",$extraMenuCols);echo<<<ENDPRINT <div align="center"> <div id="menu"> <table width="{$SystemOptions['page_width']}" border="0" cellspacing="1" cellpadding="3"> <tr> <td width="{$menuColWidth}%" align="center"><a href="{$insUrl}recent.php">{$Languages['nav']['recent']}</a></td> <td width="{$menuColWidth}%" align="center"><a href="{$insUrl}account.php?action=add">{$Languages['nav']['add']}</a></td> $extraMenuCols </tr> </table> </div> <br> <div id="search"> <table width="{$SystemOptions['page_width']}" border="0" cellspacing="1" cellpadding="3"> <tr> <form method="post" action="{$insUrl}search.php" onsubmit="return checksearch(this);"> <td align="left" width="75%">{$Languages['nav']['search_text']} <input type="text" name="criteria"> <input type="submit" value="{$Languages['nav']['search_button']}" class="search_bar_cells"> <a href="{$insUrl}search.php">{$Languages['nav']['search_adv']}</a></td> </form> <form method="post" action="{$insUrl}classified.php"> <td align="right" width="25%">{$Languages['nav']['ad_text']} <input style="width:25px;" type="text" name="listing"> <input type="submit" value="{$Languages['nav']['search_button']}" class="search_bar_cells"></td> </form> </tr> </table> </div> <div id="menu"> <table width="{$SystemOptions['page_width']}" border="0" cellspacing="0" cellpadding="3"> <tr> <td>ENDPRINT;if($cat_id != 0) { $check_cat = $cat_id; while($check_cat != 0) { $result = query("SELECT category_parent,category_title FROM {$class_prefix}categories WHERE category_id=$check_cat",$class_link); list($check_parent,$cat_title) = mysql_fetch_row($result); $cat_title = stripslashes($cat_title); if($SystemOptions['spider'] == 1) { $return = " ·> <a href=\"{$insUrl}index.php/cat_id/$check_cat\">$cat_title</a> $return"; } else { $return = " ·> <a href=\"{$insUrl}index.php?cat_id=$check_cat\">$cat_title</a> $return"; } $check_cat = $check_parent; } $return = "<a href=\"{$insUrl}index.php\">{$Languages['nav']['home']}</a> $return"; } else { $return = $Languages['nav']['home']; }if($from == "recent") { $return = "<a href=\"{$insUrl}index.php\">{$Languages['nav']['home']}</a> ·> {$Languages['nav']['recent']}"; }if($from == "search") { $return = "<a href=\"{$insUrl}index.php\">{$Languages['nav']['home']}</a> ·> {$Languages['nav']['search']}"; }if($from == "account") { $return = "<a href=\"{$insUrl}index.php\">{$Languages['nav']['home']}</a> ·> {$Languages['nav']['youraccount']}"; }echo<<<ENDPRINT $return </td> </tr> </table> </div>ENDPRINT;//If main index, show counts - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -if($cat_id == 0 && $from == "") { $result = query("SELECT COUNT(category_id) FROM {$class_prefix}categories",$class_link); list($count_c) = mysql_fetch_row($result); $result = query("SELECT COUNT(ad_id) FROM {$class_prefix}ads WHERE ad_status=1",$class_link); list($count_l) = mysql_fetch_row($result); $msg = sprintf($Languages['nav']['cats_links'],$count_c,$count_l); echo<<<ENDPRINT <div id="info"> <table width="{$SystemOptions['page_width']}" border="0" cellspacing="1" cellpadding="3"> <tr> <td class="catDesc" align="right">$msg</td> </tr> </table> </div>ENDPRINT; }?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -