PHP interesse |
|
Momenteel heb ik:
<?php
define('INSIDE', true);
$ugamela_root_path = './';
include($ugamela_root_path . 'extension.inc');
include($ugamela_root_path . 'common.'.$phpEx);
if(!check_user()){ header("Location: login.php"); }
//
// Esta funcion permite cambiar el planeta actual.
//
include($ugamela_root_path . 'includes/planet_toggle.'.$phpEx);
$planetrow = doquery("SELECT * FROM {{table}} WHERE id={$user['current_planet']}",'planets',true);
$galaxyrow = doquery("SELECT * FROM {{table}} WHERE id_planet={$planetrow['id']}",'galaxy',true);
$dpath = (!$user["dpath"]) ? DEFAULT_SKINPATH : $user["dpath"];
check_field_current($planetrow);
//Bovenstaande moet in ieder admin script worden geplaatst.
#
$select = mysql_query("SELECT * FROM `cms`");
#
$page = mysql_fetch_object($select);
?>
<table align="center" width=100%>
<tr><td class="subTitle"><b>Nieuws Pagina</b></td></tr>
<tr><td class="mainTxt">
<table width="90%" border="0">
<tr>
<td> </td>
<td>
<font color="#FFFFFF">
<?php
if($_GET['soort'] != ""){
$_GET['soort'] = $_GET['soort'];
$dbres = mysql_query("SELECT * FROM `cms` WHERE `soort`='{$_GET['soort']}'");
while($cms = mysql_fetch_object($dbres)){
echo ubb($cms->cms);
}
} else {
$dbres = mysql_query("SELECT * FROM `cms` WHERE `id`='2'");
while($cms = mysql_fetch_object($dbres)){
echo ubb($cms->cms);
}
}
?>
</font></b>
</td>
</tr>
</table>
<?php $ugamela_root_path = './'; include($ugamela_root_path . 'extension.inc'); include($ugamela_root_path . 'common.'.$phpEx); if(!check_user ()){ header("Location: login.php"); } // // Esta funcion permite cambiar el planeta actual. // include($ugamela_root_path . 'includes/planet_toggle.'.$phpEx); $planetrow = doquery("SELECT * FROM {{table}} WHERE id={$user['current_planet']}",'planets',true); $galaxyrow = doquery("SELECT * FROM {{table}} WHERE id_planet={$planetrow['id']}",'galaxy',true); $dpath = (!$user["dpath"]) ? DEFAULT_SKINPATH : $user["dpath"]; check_field_current($planetrow); //Bovenstaande moet in ieder admin script worden geplaatst. # # ?> <table align="center" width=100%> <tr><td class="subTitle"><b>Nieuws Pagina</b></td></tr> <tr><td class="mainTxt"> <table width="90%" border="0"> <tr> <td> </td> <td> <font color="#FFFFFF"> <?php if($_GET['soort'] != ""){ $_GET['soort'] = $_GET['soort']; $dbres = mysql_query("SELECT * FROM `cms` WHERE `soort`='{$_GET['soort']}'"); } } else { $dbres = mysql_query("SELECT * FROM `cms` WHERE `id`='2'"); } } ?> </font></b> </td> </tr> </table>
Alle gegevens e.d. staan gewoon in mijn database en het script werkt ook in een andere source van mij. Alleen nu ik deze probeer over te zetten krijg ik geen nieuws te zien zoals in de database staat weergegeven.
Dit is mijn db:
--
-- Table structure for table `cms`
--
CREATE TABLE `cms` (
`id` int(255) NOT NULL auto_increment,
`soort` varchar(255) NOT NULL default '',
`cms` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM;
--
-- Dumping data for table `cms`
--
INSERT INTO `cms` VALUES (1, 'Welkom Pagina', 'Hier tekst! \r\n\r\n');
-- -- Table structure for table `cms` -- CREATE TABLE `cms` ( `id` int(255) NOT NULL auto_increment, `soort` varchar(255) NOT NULL default '', `cms` text NOT NULL, ) ENGINE=MyISAM; -- -- Dumping data for table `cms` -- INSERT INTO `cms` VALUES (1, 'Welkom Pagina', 'Hier tekst! \r\n\r\n');
Wie weet wat ik fout doe?
Edit: met een foutmelding script ertussen krijg ik de volgende errors:
Notice: Undefined index: soort in httpdocs/games/space/news.php on line 44
Fatal error: Call to undefined function: ubb() in httpdocs/games/space/news.php on line 53
|