主PHP

WBOY
WBOY原創
2016-07-29 08:35:441643瀏覽

/** 
 * 網站首頁 
 * 
 * @author   Avenger  
 * @version:0$*/ 
require_once 'header.inc.php'; 
tpl_load("index.html",'','keep'); 
////取得您的語言
$G_lang = explode(',',$_SERVER['HTTP_ACCEPT_LANGUAGE']); 
switch ($G_lang[0]) {     ($G_lang[0]) {      case 'zh-mo': 
    case 'zh-cn ':          休息; 
    預設: 
       main_en.htm'; 

$filedate = (int)date(time()-@filemtime($indexfile)); 
// 如果上次更新時間少於五小時,則更新
if ($filedate0 && empty($_GET['update'])) { 
    require ($索引檔); 
    🎜>    require_once 'titles.inc.php'; 
    $currdate = date('md'); 
  $title_more = $title_h[$currdate];
    } else { 
        $title_more = $title_o[array_rand($title_o)] 🠎>   $tpl->setVar("FILEHEAD",file_head()) ; 
    /* 
    $tpl->setVar("FILEPIC",file_pic('phptshirt.gif','國內款式 PHP T卹','http://www.phpe.net/t-shirt')); 
    $tpl->setVar("FILEPIC",file_pic('phpandmore.gif','《PHP&More》创刊号发布','http://www.phpe.net/news/34.shtml')); 
    $tpl->setVar("FILEPIC",file_pic('3.jpg','超越PHP欢迎您','')); 
    $tpl->setVar("FILEPIC",file_pic('show.gif','Show出你的热情活动 -- 点击查看详情','http://www.phpe.net/club/index.php?act=ST&f=2&t=1416')); 
    $tpl->setVar("FILEPIC",file_pic('1year.gif','超越PHP一岁了','http://www.phpe.net/club/index.php?s=&act=ST&f=7&t=2419')); 
    */ 
    $tpl->setVar("CREATE",date('Y-m-d H:i:s')); 
    $tpl->setVar("DESC",$lang['sitedesc']); 
    $tpl->setVar("KEYWORDS",$lang['sitekeywork']); 
    $tpl->setVar("TITLE",$lang['sitetitle'].$title_more); 
    /* 
    DBInit(); 
    extract($dbinfo,EXTR_OVERWRITE); 
    $rs = $dbconn->Execute('SHOW TABLES'); 
    while ($result = $rs->FetchRow()) $tables .= $result["Tables_in_$dbname"].","; 
    $SQL = 'OPTIMIZE TABLE '.substr($tables,0,-1); 
    $dbconn->Execute($SQL); 
    */ 
    $indexlogin = ''; 
    $tpl->setVar("INDEXLOGIN",$indexlogin); 
    $space = '

'; 
    ob_start(); 
        //echo item_title($lang['stat'],'98%'); 
        include("index_stat.inc.php"); 
        $tpl->setVar("INDEXCOUNT",ob_get_contents()); 
    ob_end_clean(); 
    ob_start(); 
        //echo item_title($lang['vote'],'98%'); 
        include("index_vote.inc.php"); 
        $tpl->setVar("INDEXVOTE",ob_get_contents()); 
    ob_end_clean(); 
    ob_start(); 
        //echo item_title($lang['links'],'98%'); 
        include("index_links.inc.php"); 
        $tpl->setVar("INDEXLINK",ob_get_contents()); 
    ob_end_clean(); 
    ob_start(); 
        //echo item_title($lang['intro'],'98%'); 
        include("index_intro.inc.php"); 
        $tpl->setVar("INDEXINTRO",ob_get_contents()); 
    ob_end_clean(); 
    ob_start(); 
        //echo item_title($lang['news'].' '.make_link('/?n=RSS&t=news', '(rss)', '_blank', 'class="en2"'),'98%'); 
        include("index_news.inc.php"); 
        $tpl->setVar("INDEXNEW",ob_get_contents()); 
    ob_end_clean(); 
    ob_start(); 
        //echo item_title($lang['articles'].' '.make_link('/?n=RSS&t=articles', '(rss)', '_blank', 'class="en2"'),'98%'); 
        include("index_article.inc.php"); 
        $tpl->setVar("INDEXARTICLE",ob_get_contents()); 
    ob_end_clean(); 
    ob_start(); 
        //echo item_title($lang['recommendtopic'],'98%'); 
        echo ' 
 
 
 
 
 
更多推荐话题 ...  
 
'; 
        $tpl->setVar("RECOMMENDTOPIC", ob_get_contents()); 
    ob_end_clean(); 
    ob_start(); 
        echo ' 
 
 
 
 
 
更多招聘信息 ...  
 
'; 
        $tpl->setVar("HRTOPIC", ob_get_contents()); 
    ob_end_clean(); 
    ob_start(); 
        //echo item_title($lang['faqs'].' '.make_link('/?n=RSS&t=faqs', '(rss)', '_blank', 'class="en2"'),'98%'); 
        include("index_faq.inc.php"); 
        $tpl->setVar("INDEXFAQ",ob_get_contents()); 
    ob_end_clean(); 
    ob_start(); 
        //echo item_title($lang['nav'],'98%'); 
        include("index_sitenav.inc.php"); 
        $tpl->setVar("INDEXNAV",ob_get_contents()); 
    ob_end_clean(); 
    ob_start(); 
        //echo item_title($lang['tips'],'98%'); 
        include("index_tips.inc.php"); 
        $tpl->setVar("INDEXTIPS",ob_get_contents()); 
    ob_end_clean(); 
    /* 
    ob_start(); 
        echo item_title($lang['events'],'98%'); 
        $tpl->setVar("INDEXEVENTS",ob_get_contents()); 
    ob_end_clean(); 
    */ 
    ob_start(); 
        //echo item_title($lang['resouce'],'98%'); 
        include("index_resource.inc.php"); 
        $tpl->setVar("INDEXRESOURCE",ob_get_contents()); 
    ob_end_clean(); 
    ob_start(); 
        //echo item_title($lang['souwang'],'98%'); 
        echo ' 
            
 
              互联网上的 php 资源
 
               
               
             
      '; 
    $tpl->setVar("INDEXSOUWANG",ob_get_contents()); 
    ob_end_clean(); 
    //$tpl->setVar("INDEXPARTNERS",item_title($lang['partners'],'98%')); 
    ob_start(); 
        //echo item_title($lang['calendar'],'98%'); 
        include_once 「calendar.inc.php」; 
        $c = 新日曆;  
        $tpl->setVar("INDEXCALENDAR",ob_get_contents()); 
    ob_end_clean(); 
    ob_start(); 
        //echo item_title($lang['newtopic'],'98%'); 
        echo ' 
 
 
表> 
'; 
        $tpl->setVar("INDEXFORUM", ob_get_contents()); 
    ob_end_clean(); 
    ob_start(); 
        //echo item_title($lang['maillist'],'98%'); 
        迴聲 ' 
        ; 
        ; 
         
        表> 
        '; 
        $tpl->setVar("INDEXMAIL",ob_get_contents()); 
    ob_end_clean(); 
    //我的名字 :) 
    $s_name='index.php'; 
    $tpl->setVar("SPACE",$space); 
    $tpl->setVar("FILEFOOT",file_foot()); 
    $tpl->parse('output','main'); 
    $output = $tpl->get("output"); 
    //寫入檔案
    wfile($indexfile,$output); 
    require($indexfile); 

? 
以上就介紹了mainphp,包含了方面的內容,希望對PHP教學有興趣的朋友有幫助。

 🎜>語言腳本=“Javascript”類型=“text/javascript”src =“'.$Global['bbs'] .'new_topic.php?cid=2,6,15,16,18”> 腳本> 
 
            加入郵件清單:
                         
      🎜>        

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn