Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/05/2011, 10:14
Avatar de eddwinpaz
eddwinpaz
 
Fecha de Ingreso: noviembre-2007
Ubicación: Merida , Venezuela
Mensajes: 1.066
Antigüedad: 16 años, 6 meses
Puntos: 25
While dentro de while para muro a lo facebook DUDA

Gracias por leer este mensaje de antemano.

Tengo el siguiente problema:

Tengo dos whiles uno para que me muestre los post y otro para mostrar los replies pero el problema es que me los muestra como quiero pero solo que no donde deberian ir. ya que siempre salen en la primera parte. aqui el codigo.

Espero su pronta respuesta.

he anexado una imagen de referencia...

Gracias de antemano por su respuesta...

en palabras sencillas por si te da revuelta ver el codigo esto es lo que tengo

while(POST) {

while(REPLIES){

}
}

Código PHP:

<?php
session_start
();

include 
'library/database.class.php';
include 
'library/tools.class.php';
include 
'library/user/user.account.class.php';
include 
'library/paginacion.php';
include 
'library/wallpost/reply.negociation.class.php';
include 
'library/wallpost/wall.post.class.php';

$user       = new user_account();
$database   = new database_con();
$tools      = new tools();

$wall_post  = new wall_negociation();
$wall_reply = new reply_negociation();
?>
 <?php



                    $wall_post
->list_wall_negociation(1);
                    
$wall_reply->list_reply_negociation(1);

                    while (
$post_array $wall_post->array_query()) {
                        
?>
                        <table width="500" border="0" cellspacing="0" cellpadding="5">
                            <tr>
                                <td width="62" valign="top"><img src="images/<?php echo $post_array['avatar']; ?>" width="50" height="50" style="border:#999 solid 1px; padding:3px;" /></td>
                                <td width="418" align="left" valign="top"><div style="font-size:12px; font-weight:bold; color:#039; font-family:Arial, Helvetica, sans-serif;"><?php echo $post_array['name']; ?> <?php echo $post_array['lastname']; ?> </div>
                                    <div style="font-family:Verdana, Geneva, sans-serif; font-size:11px;"><?php echo $post_array['post']; ?></div><table width="250" border="0" cellspacing="0" cellpadding="0">
                                        <tr>
                                            <td width="109"><div style=" color:#999; font-family:Verdana, Geneva, sans-serif; font-size:10px;"><?php echo $tools->getTimeDuration($post_array['time']); ?> ago </div></td>
                                            <td width="141"><div style="color:#06C; font-family:Verdana, Geneva, sans-serif; font-size:10px;"> <strong><a href="#" onclick="reply_post('reply_<?php echo $post_array['wall_negociationid']; ?>','<?php echo $post_array['wall_negociationid']; ?>','<?php echo $_GET['requestid']; ?>');">Comment</a></strong></div></td>
                                        </tr>
                                    </table></td>
                            </tr>

                            <tr>
                                <td valign="top">&nbsp;</td>
                                <td align="left" valign="top">  <?php while ($reply_array $wall_reply->array_query()) { ?>

                                        <table width="100%" border="0" cellspacing="0" cellpadding="5" style="margin-bottom:2px;">
                                            <tr>
                                                <td width="12%" valign="top" bgcolor="#E3E3E3"><img src="images/<?php echo $reply_array['avatar']; ?>" width="32" height="32" style="border:#999 solid 1px; padding:3px;" /></td>
                                                <td width="88%" valign="top" bgcolor="#E3E3E3">
                                                    <div style="font-size:12px; font-weight:bold; color:#039; font-family:Arial, Helvetica, sans-serif;"><?php echo $reply_array['name']; ?> <?php echo $reply_array['lastname']; ?> </div>
                                                    <div style="font-family:Verdana, Geneva, sans-serif; font-size:11px;"> <?php echo $reply_array['reply_post']; ?></div>
                                                    <div style=" color:#999; font-family:Verdana, Geneva, sans-serif; font-size:10px;"><?php echo $tools->getTimeDuration($reply_array['time']); ?> ago </div></td>
                                            </tr>
                                        </table>

                                    <?php ?>
                                    <div id="reply_<?php echo $post_array['wall_negociationid']; ?>" >
                                        <form method="post">
                                            <input name="user_accountid" type="hidden" value="<?php echo $_SESSION['SESSIONID']; ?>" />
                                            <input name="id_post" type="hidden" value="<?php echo $post_array['wall_negociationid']; ?>" />
                                            <input name="information_requestid" type="hidden" value="<?php echo $_GET['requestid']; ?>" />
                                            <table width="100%" border="0" cellspacing="0" cellpadding="5">
                                                <tr>
                                                    <td width="12%" valign="top" bgcolor="#E3E3E3"><img src="images/<?php echo $user->get_avatar($_SESSION['SESSIONID']); ?>" width="32" height="32" style="border:#999 solid 1px; padding:3px;" /></td>
                                                    <td width="88%" valign="top" bgcolor="#E3E3E3"><textarea name="reply" cols="45" rows="5" class="texto" id="reply" style="width:97%; height:35px;"></textarea>
                                                        <input type="button" name="reply_post" id="reply_post" value="send" />
                                                        <input type="button" name="button3" id="button3" value="Cancel" onclick="cancel_reply_post('reply_<?php echo $post_array['wall_negociationid']; ?>');" /></td>
                                                </tr>
                                            </table>
                                        </form>
                                    </div></td>
                            </tr>
                        </table> <?
                            
}
                                
?>


__________________
O nos hacemos miserables o nos hacemos fuertes , la cantidad de trabajo es la misma.