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

📄 index.php

📁 一个好用的php wap cms portal
💻 PHP
📖 第 1 页 / 共 2 页
字号:
<?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             */
/*                                                                              */
/*  PODCASTS Wap-2-Go MODULE                                                    */
/*                                                                              */
/*  FILE DETAILS and EXPLANATION:                                               */
/*  functions.php - Specific Functions for Module                               */
/********************************************************************************/ 
// Include the Module's Functions
include_once "functions.php";
$thumbsize = $usergfxpref/5;
$imagedir = "modules/Podcasts/images/";

$dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname);
$result = $db->sql_query("SELECT * FROM $prefix"._podcastv2_config."");
$data = $db->sql_fetchrow($result);
$path       = $data["starting_directory"];
$welcome    = strtr(strip_tags($data["welcome_message"]), $array_correction);
$title      = strtr(strip_tags($data["title"]), $array_correction);

// Fetch Query Strings
$id =   $_GET['id'];
$op =   $_GET['op'];

// Module Content
if ($op=="Info")
        {
        if ($id) 
                {
                    $content = "";
                    // Display Episode Information
                    $dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname);
                    $result = $db->sql_query("SELECT * FROM $prefix"._podcastv2_items." WHERE iid = '$id' AND access <= '$userlevel'");
                    $data = $db->sql_fetchrow($result);
                    $episode    = strtr(strip_tags($data["title"]), $array_correction);
                    $subtitle   = strtr(strip_tags($data["subtitle"]), $array_correction);
                    $info       = strtr(strip_tags($data["summary"]), $array_correction);
                    $hits       = $data["downloads"];
                    $duration   = $data["duration"];
                    $cid        = $data["cid"];
                    $enclosure  = $data["enclosure"];
                    $explicit   = $data["explicit"];
                        if ($explicit==1) { $explicit = "Clean"; }
                        if ($explicit==2) { $explicit = "Normal"; }
                        if ($explicit==3) { $explicit = _PODCASTV2_EXPLICIT; }
                        if ($usergfxpref>20)
                            {   
                            // Get Image
                            $dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname);
                            $result1 = $db->sql_query("select * from $prefix"._podcastv2_channels." where cid = '$cid' LIMIT 1");
                            $data1 = $db->sql_fetchrow($result1);
                            $image = "";
                            if ($data1)
                                {
                                    $file = $data1["image"];
                                    $image = "/modules/Podcasts/images/".$file;
                                    $image = doimage($nukeurl."/".$image, null, $thumbsize);
                                }
                            }
                    $content .= _B.$episode._B_END._BR
                                .$image." ".$subtitle._BR
                                ._I.$info._I_END._BR
                                ."Length: ".$duration." s"._BR
                                ."Hits: ".$hits._BR
                                ."Explicit: ".$explicit._BR
                                ."<a href=\"".$nukeurl."/".$path."/".$enclosure."\" title=\""._PODCASTV2_DOWNLOAD."\">"._PODCASTV2_DOWNLOAD."</a> | <a href=\"".$nukeurl."/modules.php?name=Podcasts&amp;func=feed&amp;channel=".$cid."\" title=\"Subscribe to this Channel\">Subscribe</a>";
                    $title = "Episode Info:";

                    $title   = char_dec($title);
                    $content = char_dec($content);
                OpenTable();    Title($title);
                    echo _P_CENTER.$content._P_END;
                CloseTable();
                }   
        else    {
                $title = "Sorry"; $content = "No Episode Found";
                $title   = char_dec($title);
                $content = char_dec($content);
                doBlock($title,$content);
                }
} else if ($op=="Channel")  {
        if ($id) 
            {
                // Fetch Channel Title
                $dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname);
                $result2 = $db->sql_query("SELECT * FROM $prefix"._podcastv2_channels." WHERE cid = '$id' AND access <= '$userlevel' LIMIT 1");
                $row2 = $db->sql_fetchrow($result2);
                $title = strtr(strip_tags($row2["title"]), $array_correction);
                $content = strtr(strip_tags($row2["subtitle"]), $array_correction);
                $title   = char_dec($title);
                $content = char_dec($content);
            OpenTable();    Title($title);
                echo _P_CENTER.$content._P_END;
            CloseTable();
                
                // Fetch Latest 5 Episodes (newest first)
                $dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname);                
                $totalresults = $db->sql_numrows($db->sql_query("SELECT * FROM $prefix"._podcastv2_items." WHERE cid = '$id' AND access <= '$userlevel' ORDER BY iid DESC"));
                $result = $db->sql_query("SELECT * FROM $prefix"._podcastv2_items." WHERE cid = '$id' AND access <= '$userlevel' ORDER BY iid DESC LIMIT $start,$increment");
                $row = $db->sql_fetchrow($result);
                $content="";
                do {
                            $title      = strtr(strip_tags($row["title"]), $array_correction);
                            $url        = $row["enclosure"];
                            $subtitle   = strtr(strip_tags($row["subtitle"]), $array_correction);
                            $iid        = $row["iid"];
    
                            // Fetch Channel and Image
                            $dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname);
                            $result3 = $db->sql_query("SELECT title, image FROM $prefix"._podcastv2_channels." WHERE cid = $id LIMIT 1");
                            $row3 = $db->sql_fetchrow($result3);
                            $channel = $row3["title"];
                            $content .= _B."<a href=\"w2g_modules.php?name=$moduletitle&amp;op=Info&amp;id=$iid\">";
                            if ($usergfxpref>20)    {   
                                    $image  = "modules/Podcasts/images/";
                                    $image  .= $row3["image"];
                                    $content .= doimage($nukeurl."/".$image, null, $thumbsize);}
                            $content .= " $channel  ".$title."</a>"._B_END." - ".$subtitle._BR;

⌨️ 快捷键说明

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