Página Principal (index.php)
<?php require_once('Connections/principal.php'); ?>
<?php
mysql_select_db($database_principal, $principal);
$query_Recordset1 = "SELECT codigo,n FROM codigos ORDER BY n ASC";
$Recordset1 = mysql_query($query_Recordset1, $principal) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
if($row_Recordset1['n'] == 1) {
$cod[0] = $row_Recordset1['codigo'];
$cod[0];
}
if($row_Recordset1['n'] == 2) {
if(empty($cod[0])) {
}else{
$cod[1] = $row_Recordset1['codigo'];
}
}
if($row_Recordset1['n'] == 3) {
if(empty($cod[0])) {
}else{
$cod[2] = $row_Recordset1['codigo'];
}
}
?>
<title>RPGZone | Geração Elizar | Games??? É aqui mesmo!!</title><style type="text/css">
<!--
body {
background-image: url(imagens/fundo.jpg);
}
-->
</style>
<table width="766" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="17" height="13"></td>
<td width="209"></td>
<td width="19"></td>
<td width="279"></td>
<td width="16"></td>
<td width="209"></td>
<td width="17"></td>
</tr>
<tr>
<td height="106"> </td>
<td colspan="3" valign="top" background="imagens/logo.jpg"><!--DWLayoutEmptyCell--> </td>
<td> </td>
<td rowspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" background="imagens/headlines.jpg">
<!--DWLayoutTable-->
<tr>
<td width="12" height="26"> </td>
<td width="183"> </td>
<td width="14"> </td>
</tr>
<tr>
<td height="72"> </td>
<td valign="top"><?php $cod[1]; ?></td>
<td> </td>
</tr>
<tr>
<td height="27"> </td>
<td> </td>
<td> </td>
</tr>
</table></td>
<td> </td>
</tr>
<tr>
<td height="19"></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td height="13"></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td height="434"></td>
<td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" background="imagens/m_principal.jpg">
<!--DWLayoutTable-->
<tr>
<td width="19" height="37"> </td>
<td width="167"> </td>
<td width="23"> </td>
</tr>
<tr>
<td height="367"> </td>
<td valign="top">Conteúdo Principal do menu é aqui! </td>
<td> </td>
</tr>
<tr>
<td height="30"> </td>
<td> </td>
<td> </td>
</tr>
</table></td>
<td> </td>
<td valign="top"><table width="261" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="261" height="61" valign="top" background="imagens/c_cima.jpg"><!--DWLayoutEmptyCell--> </td>
</tr>
<tr>
<td height="326" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" background="imagens/c_meio.jpg">
<!--DWLayoutTable-->
<tr>
<td width="30" height="326"> </td>
<td width="205" valign="top"><?php $cod[2]; ?></td>
<td width="26"> </td>
</tr>
</table></td>
</tr>
<tr>
<td height="47" valign="top" background="imagens/c_baixo.jpg"><!--DWLayoutEmptyCell--> </td>
</tr>
</table></td>
<td></td>
<td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" background="imagens/m_segundo.jpg">
<!--DWLayoutTable-->
<tr>
<td width="15" height="38"> </td>
<td width="178"> </td>
<td width="16"> </td>
</tr>
<tr>
<td height="367"> </td>
<td valign="top">Conteúdo do Menu é Aqui </td>
<td> </td>
</tr>
<tr>
<td height="29"> </td>
<td> </td>
<td> </td>
</tr>
</table></td>
<td></td>
</tr>
<tr>
<td height="16"></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td height="47"></td>
<td colspan="5" valign="top"><!--DWLayoutEmptyCell--> </td>
<td></td>
</tr>
</table>
<?php
mysql_free_result($Recordset1);
?>
arquivo 'Connections/principal.php'<?php # FileName="Connection_php_mysql.htm" # Type="MYSQL" # HTTP="true" $hostname_principal = "localhost"; $database_principal = "rpgzone"; $username_principal = "root"; $password_principal = ""; $principal = mysql_pconnect($hostname_principal, $username_principal, $password_principal) or trigger_error(mysql_error(),E_USER_ERROR); ?>
Dados do DB:
rpgzone
->codigos
->n
-->n=1
-->codigos
<?php $mzn_path = "e:\\site\\rpgzone\\mznews"; require_once($mzn_path ."/mzn2.php"); $mzn_selfpage = $s->req['PHP_SELF']; $mzn2 = new MZn2_Noticias; $mzn2->categoria = "principal"; ?>e
rpgzone
->codigos
->n
-->n=2
-->codigos
<?php $mzn2->data = $s->req['mzn_data']; $mzn2->usuario = $s->req['mzn_usuario']; $mzn2->busca = $s->req['mzn_busca']; $mzn2->pagina = $s->req['mzn_pg']; $mzn2->porpagina = 0; $mzn2->mostrar_manchetes(); ?>
e
rpgzone
->codigos
->n
-->n=3
-->codigos
<?php
$mzn2->data = $s->req['mzn_data'];
$mzn2->usuario = $s->req['mzn_usuario'];
$mzn2->busca = $s->req['mzn_busca'];
$mzn2->pagina = $s->req['mzn_pg'];
$mzn2->porpagina = 5;
$mzn2->mostrar_noticias();
$mzn2->mostrar_paginacao($mzn_selfpage ."?mzn_pg={pagina}", 1);
?>eu teria que fazer os comandos que estão gravados em MySQL sejam executados no index.php
alguem pode me ajudar?










