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

📄 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://www.wap2go.co.uk             */
/*                                                                              */
/*  REVIEWS MODULE                                                              */
/*                                                                              */
/*  FILE DETAILS and EXPLANATION:                                               */
/*  functions.php - Specific Functions for Module                               */
/********************************************************************************/ 
// Include the Module's Functions
include_once "functions.php";

// Module Content

        if ($id!="") 
                {
                    // Display Review
                    $dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname);
                    $result = $db->sql_query("SELECT * FROM $prefix"._reviews." WHERE id = '$id' LIMIT 1");
                    $data = $db->sql_fetchrow($result);
                
                    $pagename  = strtr(strip_tags($data["title"]), $array_correction);
                    $content   = strtr(strip_tags($data["text"]), $array_correction);
                    $author   = strtr(strip_tags($data["reviewer"]), $array_correction);
                    $hits   = $data["hits"];
                    $score  = $data["score"];
                    
                    $tit_name = (strlen($pagename) > 100) ? (substr($pagename,0,10)."...") : ($pagename);
                    $tit_data = $tit_name;
                    
                    $title = "$pagename:";
                    $content = _P_CENTER.$content._BR._REVIEWER." ".$author." | "._HITS.": ".$hits." | "._SCORE." ".$score._P_END;
                    $title   = char_dec($title);
                    $content = char_dec($content);
                OpenTable();
                    Title($title);
                    echo $content;
                CloseTable();
                }   
        else
                {
                    // Display Most Recent Reviews
                    $dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname);
                    $totalresults = $db->sql_numrows($db->sql_query("select title, id from $prefix"._reviews." order by id DESC"));
                    $result = $db->sql_query("select title, id from $prefix"._reviews." order by id DESC limit $start,$increment");
                    $row = $db->sql_fetchrow($result);
                    $content    = "";
                    if ($row)
                        {
                        do {
                            $shortened  = strtr(strip_tags($row["title"]), $array_correction);
                            $title      = ucfirst ($shortened);
                            $tit        = (strlen($title) > 20) ? (substr ($title,0,35)."..."):($title);
                            $id         = $row["id"];
                        // Display Article Image and then details
                            $content .= "- <a href=\"w2g_modules.php?name=".$moduletitle."&amp;rop=showcontent&amp;id=".$id."\" title=\""._REVIEW.": ".$tit."\">".$tit."</a>"._BR;
                        } while ($row = $db->sql_fetchrow($result));
                        $title      = ""._10MOSTREC."";
                        $title   = char_dec($title);
                        $content = char_dec($content);
                        OpenTable();
                            Title($title);
                            echo _P_LEFT.$content._P_END;
                            $query = "";
                            doPageNavigation($start,$increment,$totalresults,$query);
                        CloseTable();
                        }
                    else {  $content = ""._THEREARE." 0 "._REVIEWSINDB.""; 
                            $title      = ""._10MOSTREC."";
                            $title   = char_dec($title);
                            $content = char_dec($content);
                            doBlock($title,$content);}
                }

?>

⌨️ 快捷键说明

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