⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index.php

📁 一个好用的php wap cms portal
💻 PHP
字号:
<?php
/********************************************************************************/ 
/*  Wap-2-Go Mobile Phone Nuke-Addon                                            */
/*          bringing the Advanced Content Management System to Mobile Format    */
/*  =========================================================================== */
/*                                              powered by Nuke SQL Database    */
/*                                                                              */
/* Copyright (c) 2007 by Philip Marsh   -   http://wap2go.co.uk                 */
/*                                                                              */
/*  NEWS MODULE                                                                 */
/*                                                                              */
/*  FILE DETAILS and EXPLANATION:                                               */
/*  functions.php - Specific Functions for Module                               */
/********************************************************************************/ 
// Include the Module's Functions
include_once "functions.php";

// Fetch Query Strings
$sid    =   $_GET['sid'];

// Module Content

// Detect What to Display

// Topic
        if ($sid!="") 
                {
                    // Display Article
                    $dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname);
                    $result = $db->sql_query("select title,hometext,bodytext,time,aid from $prefix"._stories." where sid = '$sid'");
                    $data = $db->sql_fetchrow($result);
                    $title  = strtr(strip_tags($data["title"]), $array_correction);
   if ($htm=="1") { $intro  = stripslashes($data["hometext"]);
                    $body   = stripslashes($data["bodytext"]); }
             else { $intro  = strtr(strip_tags($data["hometext"]), $array_correction);
                    $body   = strtr(strip_tags($data["bodytext"]), $array_correction); }

                    $author = $data["aid"];
                    list ($year, $month, $day) = split ('[: -]', $data["time"]);
                    $tit_name = (strlen($title) > 100) ? (substr($title,0,10)."...") : ($title);
                    $tit_data = $tit_name." ".$day."/".$month."/".$year;
                    $content = $intro._BR.$body;
                    $title   = char_dec($title);
                    $content = char_dec($content);
                    $content = wordwrap($content,25,"\n",1);
                    make_clickable($content);
                OpenTable();    Title($title);
                echo _P_LEFT.$content._P_END;
                echo _P_CENTER._NEWSBY.": "._I."<a href=\"w2g_modules.php?name=Your_Account&amp;op=userinfo&amp;username=".$author."\">".$author."</a>"._I_END._P_END;
                CloseTable();
                    $db->sql_query("UPDATE $prefix."._stories." SET counter=counter+1 where sid='$sid'");
                }   

        else
                {
                    // Display Most Recent News Articles
                    $dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname);
                    $totalresults = $db->sql_numrows($db->sql_query("select title, sid from $prefix"._stories." order by sid DESC"));
                    $result = $db->sql_query("select title, sid from $prefix"._stories." order by sid DESC limit $start,$increment");
                    $row = $db->sql_fetchrow($result);
                    do {
                        $title      = strtr(strip_tags($row["title"]), $array_correction);
                        $id         = $row["sid"];
                        $content .= "<a href=\"w2g_modules.php?name=News&amp;sid=".$id."\" title=\""._READMORE."\">- ".$title."</a>"._BR;
                        } while ($row = $db->sql_fetchrow($result));
                    mysql_close();
                    $title = ""._NEWEST.":";                    
                    $title   = char_dec($title);
                    $content = char_dec($content);
                    OpenTable();    Title($title);
                        echo _P_LEFT.$content._P_END;
                        $query = "";
                        doPageNavigation($start,$increment,$totalresults,$query);
                    CloseTable();
                }
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -