NukeXchange Network

          

Nuke Sites Link Directory
Nuke Fixes · NukeForums · NukeZone Hosting · NukeUnited · Nuke Sites · Nuke Skins · NukeLance
Nuke Resources
 :: Home  :: Downloads  :: Your Account  :: Forums  :: Advertise :: 
Login or Register
Main Menu
General
 Main
 AvantGo
 Banner_Clients
 cfaq
 Donations
 Downloads
 Forums
 Members_List
 Private_Messages
 Search
 Stories_Archive
 Submit_News
 Surveys
 Topics
 Web_Links
 Your_Account

Your Account
 Login
 Register
 Lost Pass

Modules
Quick Links
· CMS Focus
· Domain Names
. Game Quest
· Learning Linux
. MateMaker
· NukeFixes
· NukeForums
· NukeLance
· Nuke Sites
· Nuke Skins
· NukeZone Hosting
. SearchDevil
Other Options

Download Resources
· Nuke Downloads
· Add a Link
· New Files
· Top Rated
· Most Popular

Web Site Resources
· Nuke Sites
· Add A Site
· New Sites
· Top Rated
· Most Popular

Support
· NukeZone Hosting
· NukeSkins.com
· NukeForums.com
· phpnuke.org
· NukeFixes.com
Information
NukeForums
·Creating a Gaming PHP Nuke Site - Newbie
·Issues with GIF Images
·Installation Issues
·Please Help Question about Siggy's
·Hi My name is Rukasuzu, where is the introduction?
·Include file as block?
·How Do I make a Website?
·Array of strings as parameter
·Theme Change, just white? :(
·How can i disable upload t download by other users?Php-Nuke8

read more...
Top10 Links
· 1: Nuke Forums
· 2: PHPNukeFiles
· 3: NukeSkins
· 4: Nuke Templates
· 5: EcomJunk
· 6: MDesign
· 7: Windows Installation: PHP
· 8: FLASH-FOR-NUKE
· 9: Dezina
· 10: Global Dream News Sharing Portal!
Site Visitors
User Login:

Nickname:
Password:
Security Code: Security Code
Type Security Code Here:

Members List Membership:
Latest: carlosmafud
Today: 0
Yesterday: 1
Overall: 15026

Visitation:
Guests: 407
Members: 0
Total: 407


You are Anonymous user. You can register for free by clicking here
Sponsor Links
php-Nuke Themes and Templates
php-Nuke Themes and Templates

NukeResources :: View topic - SELECTION SWITCHING PROBLEM.
NukeResources Forum Index

NukeResources Forum Index -> Random Thoughts -> SELECTION SWITCHING PROBLEM.
Post new topic  Reply to topic    View previous topic :: View next topic 
SELECTION SWITCHING PROBLEM.
PostPosted: Fri Oct 14, 2005 11:04 am Reply with quote
bbaros
Resourceful
Resourceful
 
Joined: Jul 03, 2005
Posts: 81
Location: Nashville, TN




I am having a difficult time trying to make a page switch over from one to another. Here is the code i have so far. and the URL at which i am using the code on. can someone PLEASE help me on having it where it switches over from one product catalog to the next?

THANK YOU.

URL THAT CODE IS BEING USED ON IS

http://www.infinity-plus.com/modules.php?name=DataFeed

The Code I currently have worked on is as followed.
Code:
<?php

/*******************************************************************************/
/* PHP-NUKE: Web Portal System: Catalog DataFeed Addon                         */
/* ============================================                                */
/* Version: 1.00  by Brian Baros                                               */
/* Code by Brian Baros                                                        */
/* http://www.Infinity-Plus.com                                                */
/*                                                                             */
/*******************************************************************************/
///////////////////////START OF MODULE//////////////////////////////////
if (!eregi("modules.php", $_SERVER['PHP_SELF']))
   {             
    die ("You can't access this file directly...");       
   }             
require_once("mainfile.php");
////////////////////////STARTS MODULE ENDS//////////////////////////////
global $sitename, $prefix, $db, $module_name; //SETS 5 GLOBAL VARIBLES
$module_name = basename(dirname(__FILE__)); //DEFINES AND SETS THE $module_name Varible
get_lang($module_name); // GETS Lanuage File For Module
header("Content-Type: text/html");
include("header.php");
{
      {
       echo "<br>";
         OpenTable();
      echo "<center><b>"._MYDATAFEED."</center></b><br>"
      ."<left>"._SELECTASITE."<br><br>"
      ."<form action=\"modules.php?name=$module_name\" method=\"post\">"
      ."<input type=\"hidden\" name=\"op\" value=\"userinfo\">"
      ."<input type=\"hidden\" name=\"username\" value=\"$username\">"
      ."<input type=\"hidden\" name=\"bypass\" value=\"$bypass\">"
      ."<input type=\"hidden\" name=\"url\" value=\"0\">"
      ."<select name=\"hid\" onChange='submit()'>\n"
      ."<option value=\"0\">"._SELECTASITE2."</option>";
       $sql4 = "SELECT hid, sitename, DATAFEEDurl FROM ".$prefix."_DATAFEED ORDER BY sitename";
       $headl = $db->sql_query($sql4);
       while($row4 = $db->sql_fetchrow($headl))
         {
         $nhid = intval($row4[hid]);
         $hsitename = $row4[sitename];
         $durl=$row4[DATAFEEDurl];
         if ($hid == $nhid )
         
         {
          $sel = "selected";
         }
         else
            {
           $sel = "";
            }
         echo "<option value=\"$nhid\" $sel>$hsitename</option>\n";
          }
       CloseTable();
      }
      OpenTable();
      $content = "<center>$durl</center>";
      echo "<center><b>"._DATAFEEDFROM. " http://www.$hsitename</b></center><br>\n"
      . "$content \n";
//      echo "$content";
      CloseTable();
   }
//elseif (($cont == 0) OR ($content == ""))
   {
      OpenTable();
   
   echo "<center>"._DATAFEEDPROBLEM."</center>\n";
   CloseTable();
   }
OpenTable();
echo "<b>Warning!!! Not all datafeeds work correctly on this datafeed reader.</b>";
CloseTable();
//}
   switch($op)
      {
       default:
      break;
      }
include("footer.php");
?>

_________________
Brian Baros
creator of Infinity-Plus.net, .org, .info, .com
http://www.Infinity-Plus.net
Administrator@infinity-plus.net
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
ARRAY
PostPosted: Sat Oct 15, 2005 1:55 am Reply with quote
bbaros
Resourceful
Resourceful
 
Joined: Jul 03, 2005
Posts: 81
Location: Nashville, TN




WELL CURRENTLY I HAVE ALMOST GOT THE PROGRAM TO WORK BUT. I AM HAVING AN ARRAY SHOW UP WHEN SELECTING A SITE..

Instead of having only one Link it shows all.

Can someone pls help me stop this Array.
the code i am currently using is as follows.

Code:
<?php

/*******************************************************************************/
/* PHP-NUKE: Web Portal System: Catalog DataFeed Addon                         */
/* ============================================                                */
/* Version: 1.00  by Brian Baros                                               */
/* Code by Brian Baros                                                        */
/* http://www.Infinity-Plus.com                                                */
/*                                                                             */
/*******************************************************************************/
///////////////////////START OF MODULE//////////////////////////////////
if (!eregi("modules.php", $_SERVER['PHP_SELF']))
   {             
    die ("You can't access this file directly...");       
   }             
require_once("mainfile.php");
////////////////////////STARTS MODULE ENDS//////////////////////////////
global $sitename, $prefix, $db, $module_name; //SETS 5 GLOBAL VARIBLES
$module_name = basename(dirname(__FILE__)); //DEFINES AND SETS THE $module_name Varible
get_lang($module_name); // GETS Lanuage File For Module
header("Content-Type: text/html");
include("header.php");

{
if ($content=="")
   {
   echo "<br>";
      OpenTable();
   echo "<center><b>"._MYDATAFEED."</center></b><br>"
   ."<left>"._SELECTASITE."<br><br>"
   ."<form action=\"modules.php?name=$module_name\" method=\"post\">"
   ."<input type=\"hidden\" name=\"op\" value=\"userinfo\">"
   ."<input type=\"hidden\" name=\"username\" value=\"$username\">"
   ."<input type=\"hidden\" name=\"bypass\" value=\"$bypass\">"
   ."<input type=\"hidden\" name=\"url\" value=\"0\">"
   ."<select name=\"hid\" onChange='submit()'>\n"
   ."<option value=\"0\">"._SELECTASITE2."</option>";
    $sql = "SELECT hid, sitename, AdvID FROM ".$prefix."_DATAFEED ORDER BY sitename";
    $head = $db->sql_query($sql);
    while($row1 = $db->sql_fetchrow($head))
      {
      $nhid = intval($row1[hid]);
      $hsitename = $row1[sitename];
      $file = $row1[AdvID];
      
      if ($hid == $nhid )
         {
          $sel = "selected";
         }
      else
         {
          $sel = "";
         }
      echo "<option value=\"$nhid\" $sel>$hsitename</option>\n";
         {
         OpenTable();
     echo "<center><b><a href=\"http://www.infinity-plus.com/$file\" target=\"new\"><h5>CLICK HERE to view $hsitename product catalog</h5> </a></b></center><br>\n";
      //   $content = "<center><b>"._DATAFEEDFROM. " http://www.$hsitename</b></center><br>\n";
      //   include ("$file");
      //fopen ("$file");
         CloseTable();
         }
      }

   }

else
   {
   OpenTable();
   echo "<center>"._DATAFEEDPROBLEM."</center>\n";
   CloseTable();
   }
}
{
   OpenTable();
   echo "<b>Warning!!! Not all datafeeds work correctly on this datafeed reader.</b>";
   CloseTable();
}

switch($op)
   {
   default:
   break;
   }
include("footer.php");
?>


YOU CAN VIEW THE RESULTS OF THIS PROJECT AT
http://www.infinity-plus.com/modules.php?name=DataFeed

_________________
Brian Baros
creator of Infinity-Plus.net, .org, .info, .com
http://www.Infinity-Plus.net
Administrator@infinity-plus.net
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
PostPosted: Sun Oct 16, 2005 1:46 am Reply with quote
Evaders99
Resource Master
Resource Master
 
Joined: May 25, 2004
Posts: 1785




I'm not sure what you want. If you just want one, then you don't need the while loop code
Code:

while($row1 = $db->sql_fetchrow($head))

_________________
- Star Wars Rebellion Network - Evaders Squadron Coding -

Need help? Nuke Patched Core, Coding Services, Webmaster Services
View user's profile Send private message Visit poster's website AIM Address
If you look at the page?
PostPosted: Sun Oct 16, 2005 1:21 pm Reply with quote
bbaros
Resourceful
Resourceful
 
Joined: Jul 03, 2005
Posts: 81
Location: Nashville, TN




If you look at the URL i have setup for this code to be used on you will see what i mean about it selecting all instead of just one.
I want all the names displayed in the Dropdown menu but only the one chosen from the dropdown to be selected.
currently it is displaying ALL items that are in the dropdown and not just one.
the WHILE loop helps acquire all the NAMES for the dropdown menu.

_________________
Brian Baros
creator of Infinity-Plus.net, .org, .info, .com
http://www.Infinity-Plus.net
Administrator@infinity-plus.net
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
SELECTION SWITCHING PROBLEM.
 NukeResources Forum Index -> Random Thoughts
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 4 Hours  
Page 1 of 1  

  
  
 Post new topic  Reply to topic     



Powered by phpBB © 2001-2005 phpBB Group.     Theme created by Vjacheslav Trushkin.
There have been 139 unique hit(s) in the past 24 hours.
Forums ©
Nuke Sites Link Directory


Best viewed with a Browser
All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2001 - 2007 by NukeResources.com
You can syndicate our news using the file .backend.php or ultramode.txt
PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.35 Seconds

:: Eos phpbb2 style by Cyberalien :: PHP-Nuke theme by www.nukemods.com ::