[RESOLUCIÓN] PM Obtener ayuda usuarios javascript
- Bogey
- Bogey


- Registrado: Jul 14, 2005
- Mensajes: 8211
- Loc: USA
- Status: Offline
En realidad no sé la mejor manera de describir esto, pero mi Heres tratar en ella.
Estoy en el proceso de terminar mi sistema PM.
Digamos que un usuario está escribiendo un PM a alguien...habrá un enlace, además del campo Para: que dice Buscar un usuario. Cuando el usuario hace clic en ese vínculo, un pop-up aparece poblado con nombre de usuario en todos los cuadros el usuario en mi base de datos MySQL. Tal vez incluso un cuadro de búsqueda que, cuando presentó, devuelve el resultado en ese pop-up. Si un usuario hace clic en un nombre de usuario y, a continuación, que el nombre de usuario aparecerá en el campo Para:, pero el pop-up de la estancia, y si el usuario hace clic en "Cerrar", el pop-up se cierra.
La solución a este problema sería muy útil y apreciada.
Estoy en el proceso de terminar mi sistema PM.
Digamos que un usuario está escribiendo un PM a alguien...habrá un enlace, además del campo Para: que dice Buscar un usuario. Cuando el usuario hace clic en ese vínculo, un pop-up aparece poblado con nombre de usuario en todos los cuadros el usuario en mi base de datos MySQL. Tal vez incluso un cuadro de búsqueda que, cuando presentó, devuelve el resultado en ese pop-up. Si un usuario hace clic en un nombre de usuario y, a continuación, que el nombre de usuario aparecerá en el campo Para:, pero el pop-up de la estancia, y si el usuario hace clic en "Cerrar", el pop-up se cierra.
La solución a este problema sería muy útil y apreciada.
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
- Anonymous
- Bot


- Registrado: 25 Feb 2008
- Mensajes: ?
- Loc: Ozzuland
- Status: Online
Mayo 19th, 2009, 12:06 am
- SpooF
- ٩๏̯͡๏۶


- Registrado: May 22, 2004
- Mensajes: 3415
- Loc: Richland, WA
- Status: Offline
Código: [ Select ]
function insert_single(user)
{
opener.document.forms['postform'].username_list.value = user;
}
{
opener.document.forms['postform'].username_list.value = user;
}
- function insert_single(user)
- {
- opener.document.forms['postform'].username_list.value = user;
- }
apertura se define como la ventana que no es un pare a la ventana emergente.
http://www.javascriptkit.com/javatutors/remote2.shtml
#define NULL (::rand() % 2)
- Bogey
- Bogey


- Registrado: Jul 14, 2005
- Mensajes: 8211
- Loc: USA
- Status: Offline
No tengo idea de cómo usar ese código.
Mi código de prueba es:
Ahora, sé que wouldnt abrir un pop-up y me da una lista de usuarios...Sé que todo el código está haciendo es conseguir que el usuario del campo de formulario...por ahora, me quité apertura. desde Im pruebas de esta en la ventana principal y no un pop-up, pero todavía no puede conseguirlo a poner "Bogey" en el campo.
Mi código de prueba es:
Código: [ Select ]
<html>
<head>
<title>Test JS Document</title>
<script type="javascript">
function insert_single(user)
{
document.forms['postform'].username_list.value = user;
}
</script>
</head>
<body>
<form name="postform" action="" method="post">
<p>
User: <input type="text" name="username_list" id="username_list" size="25" /> [<a href="javascript:insert_single('Bogey')">Pick A User</a>]
</p>
</form>
</body>
</html>
<head>
<title>Test JS Document</title>
<script type="javascript">
function insert_single(user)
{
document.forms['postform'].username_list.value = user;
}
</script>
</head>
<body>
<form name="postform" action="" method="post">
<p>
User: <input type="text" name="username_list" id="username_list" size="25" /> [<a href="javascript:insert_single('Bogey')">Pick A User</a>]
</p>
</form>
</body>
</html>
- <html>
- <head>
- <title>Test JS Document</title>
- <script type="javascript">
- function insert_single(user)
- {
- document.forms['postform'].username_list.value = user;
- }
- </script>
- </head>
- <body>
- <form name="postform" action="" method="post">
- <p>
- User: <input type="text" name="username_list" id="username_list" size="25" /> [<a href="javascript:insert_single('Bogey')">Pick A User</a>]
- </p>
- </form>
- </body>
- </html>
Ahora, sé que wouldnt abrir un pop-up y me da una lista de usuarios...Sé que todo el código está haciendo es conseguir que el usuario del campo de formulario...por ahora, me quité apertura. desde Im pruebas de esta en la ventana principal y no un pop-up, pero todavía no puede conseguirlo a poner "Bogey" en el campo.
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
- SpooF
- ٩๏̯͡๏۶


- Registrado: May 22, 2004
- Mensajes: 3415
- Loc: Richland, WA
- Status: Offline
Los siguientes trabajó para mí
Código: [ Select ]
<html>
<head>
<title>Test JS Document</title>
<script type="text/javascript">
function insert_single(user)
{
document.forms['postform'].username_list.value = user;
}
</script>
</head>
<body>
<form name="postform" action="" method="post">
<p>
User: <input type="text" name="username_list" id="username_list" size="25" /> [<a href="#" onclick="insert_single('Bogey'); return false;">Pick A User</a>]
</p>
</form>
</body>
</html>
<head>
<title>Test JS Document</title>
<script type="text/javascript">
function insert_single(user)
{
document.forms['postform'].username_list.value = user;
}
</script>
</head>
<body>
<form name="postform" action="" method="post">
<p>
User: <input type="text" name="username_list" id="username_list" size="25" /> [<a href="#" onclick="insert_single('Bogey'); return false;">Pick A User</a>]
</p>
</form>
</body>
</html>
- <html>
- <head>
- <title>Test JS Document</title>
- <script type="text/javascript">
- function insert_single(user)
- {
- document.forms['postform'].username_list.value = user;
- }
- </script>
- </head>
- <body>
- <form name="postform" action="" method="post">
- <p>
- User: <input type="text" name="username_list" id="username_list" size="25" /> [<a href="#" onclick="insert_single('Bogey'); return false;">Pick A User</a>]
- </p>
- </form>
- </body>
- </html>
#define NULL (::rand() % 2)
- Bogey
- Bogey


- Registrado: Jul 14, 2005
- Mensajes: 8211
- Loc: USA
- Status: Offline
SpooF escribió:
Los siguientes trabajó para mí
Código: [ Select ]
<html>
<head>
<title>Test JS Document</title>
<script type="text/javascript">
function insert_single(user)
{
document.forms['postform'].username_list.value = user;
}
</script>
</head>
<body>
<form name="postform" action="" method="post">
<p>
User: <input type="text" name="username_list" id="username_list" size="25" /> [<a href="#" onclick="insert_single('Bogey'); return false;">Pick A User</a>]
</p>
</form>
</body>
</html>
<head>
<title>Test JS Document</title>
<script type="text/javascript">
function insert_single(user)
{
document.forms['postform'].username_list.value = user;
}
</script>
</head>
<body>
<form name="postform" action="" method="post">
<p>
User: <input type="text" name="username_list" id="username_list" size="25" /> [<a href="#" onclick="insert_single('Bogey'); return false;">Pick A User</a>]
</p>
</form>
</body>
</html>
- <html>
- <head>
- <title>Test JS Document</title>
- <script type="text/javascript">
- function insert_single(user)
- {
- document.forms['postform'].username_list.value = user;
- }
- </script>
- </head>
- <body>
- <form name="postform" action="" method="post">
- <p>
- User: <input type="text" name="username_list" id="username_list" size="25" /> [<a href="#" onclick="insert_single('Bogey'); return false;">Pick A User</a>]
- </p>
- </form>
- </body>
- </html>
Muy bien que funciona...Thanks a bunch...otra cosa
Además, es posible hacerlo sin el nombre en el formulario? No valida en XHTML estricto.
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
- SpooF
- ٩๏̯͡๏۶


- Registrado: May 22, 2004
- Mensajes: 3415
- Loc: Richland, WA
- Status: Offline
#define NULL (::rand() % 2)
- Bogey
- Bogey


- Registrado: Jul 14, 2005
- Mensajes: 8211
- Loc: USA
- Status: Offline
Su + =...
Además, el siguiente hecho "XHTML Strict legales":
Otra cosa...¿cómo podría agregar una coma y un espacio "," antes de que el nombre de usuario si ya hay uno en el campo? Lo de pedir mucho de ti parodia. Le agradezco su ayuda y gracias gif "alt =": D "title =" muy feliz ">
[EDIT:] No importa el siguiente código JavaScript lo hizo...
¿Hay una mejor manera?
Además, el siguiente hecho "XHTML Strict legales":
Código: [ Select ]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Test JS Document</title>
<script type="text/javascript">
function insert_single(user)
{
var el = document.getElementById('postform');
el.username_list.value += user;
}
</script>
</head>
<body>
<form id="postform" action="" method="post">
<p>
User: <input type="text" name="username_list" id="username_list" size="25" /> [<a href="#" onclick="insert_single('Bogey'); return false;">Pick A User</a>]
</p>
</form>
</body>
</html>
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Test JS Document</title>
<script type="text/javascript">
function insert_single(user)
{
var el = document.getElementById('postform');
el.username_list.value += user;
}
</script>
</head>
<body>
<form id="postform" action="" method="post">
<p>
User: <input type="text" name="username_list" id="username_list" size="25" /> [<a href="#" onclick="insert_single('Bogey'); return false;">Pick A User</a>]
</p>
</form>
</body>
</html>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
- <head>
- <title>Test JS Document</title>
- <script type="text/javascript">
- function insert_single(user)
- {
- var el = document.getElementById('postform');
- el.username_list.value += user;
- }
- </script>
- </head>
- <body>
- <form id="postform" action="" method="post">
- <p>
- User: <input type="text" name="username_list" id="username_list" size="25" /> [<a href="#" onclick="insert_single('Bogey'); return false;">Pick A User</a>]
- </p>
- </form>
- </body>
- </html>
Otra cosa...¿cómo podría agregar una coma y un espacio "," antes de que el nombre de usuario si ya hay uno en el campo? Lo de pedir mucho de ti parodia. Le agradezco su ayuda y gracias gif "alt =": D "title =" muy feliz ">
[EDIT:] No importa el siguiente código JavaScript lo hizo...
Código: [ Select ]
function insert_single(user)
{
var el = document.getElementById('postform');
if(el.username_list.value.length > 0)
{
el.username_list.value += ", " + user;
}
else
{
el.username_list.value = user;
}
}
{
var el = document.getElementById('postform');
if(el.username_list.value.length > 0)
{
el.username_list.value += ", " + user;
}
else
{
el.username_list.value = user;
}
}
- function insert_single(user)
- {
- var el = document.getElementById('postform');
- if(el.username_list.value.length > 0)
- {
- el.username_list.value += ", " + user;
- }
- else
- {
- el.username_list.value = user;
- }
- }
¿Hay una mejor manera?
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
- Bogey
- Bogey


- Registrado: Jul 14, 2005
- Mensajes: 8211
- Loc: USA
- Status: Offline
Gracias Spoof...Lo tengo todo planeado y de trabajo gif "alt =": D "title =" muy feliz ">
PERO , Una cosa más que tengo un problema aquí...esto estropea mi sitio...después de usarlo y cerrar la ventana, si es que trato de hacer algo de mi todo el sitio se convierte en blanco...sólo blanco...sin HTML ni nada...única forma de arreglar esto es borrar las cookies y que me registro de...¿cómo podría solucionarlo?
Gracias.
La fuente de la ventana emergente es:
Que se parece a lo siguiente al final:
Y la página de apertura de aspecto:
¿Hay alguna manera de que podía arreglar eso? Gracias.
PERO , Una cosa más que tengo un problema aquí...esto estropea mi sitio...después de usarlo y cerrar la ventana, si es que trato de hacer algo de mi todo el sitio se convierte en blanco...sólo blanco...sin HTML ni nada...única forma de arreglar esto es borrar las cookies y que me registro de...¿cómo podría solucionarlo?
Gracias.
La fuente de la ventana emergente es:
Código: [ Select ]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Test JS Document</title>
<script type="text/javascript">
function insert_single(user)
{
opener.validate_field('pm_form', user)
}
</script>
</head>
<body>
<?php
require_once 'includes/globals.php';
$userlist = $auth->get_user_list('username');
$num_users = count($userlist);
$n = 0;
foreach($userlist as $user)
{
++$n;
echo "<a href=\"#\" onclick=\"insert_single('$user')\">$user</a>";
if($n > 0 && $n < $num_users)
{
echo ",\n ";
}
}
?>
</body>
</html>
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Test JS Document</title>
<script type="text/javascript">
function insert_single(user)
{
opener.validate_field('pm_form', user)
}
</script>
</head>
<body>
<?php
require_once 'includes/globals.php';
$userlist = $auth->get_user_list('username');
$num_users = count($userlist);
$n = 0;
foreach($userlist as $user)
{
++$n;
echo "<a href=\"#\" onclick=\"insert_single('$user')\">$user</a>";
if($n > 0 && $n < $num_users)
{
echo ",\n ";
}
}
?>
</body>
</html>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
- <head>
- <title>Test JS Document</title>
- <script type="text/javascript">
- function insert_single(user)
- {
- opener.validate_field('pm_form', user)
- }
- </script>
- </head>
- <body>
- <?php
- require_once 'includes/globals.php';
- $userlist = $auth->get_user_list('username');
- $num_users = count($userlist);
- $n = 0;
- foreach($userlist as $user)
- {
- ++$n;
- echo "<a href=\"#\" onclick=\"insert_single('$user')\">$user</a>";
- if($n > 0 && $n < $num_users)
- {
- echo ",\n ";
- }
- }
- ?>
- </body>
- </html>
Que se parece a lo siguiente al final:
Código: [ Select ]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Test JS Document</title>
<script type="text/javascript">
function insert_single(user)
{
opener.validate_field('pm_form', user)
}
</script>
</head>
<body>
<a href="#" onclick="insert_single('Bogey')">Bogey</a>, <a href="#" onclick="insert_single('Boris')">Boris</a>,
<a href="#" onclick="insert_single('Brandon')">Brandon</a>,
<a href="#" onclick="insert_single('craig')">craig</a>,
<a href="#" onclick="insert_single('frog')">frog</a>
</body>
</html>
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Test JS Document</title>
<script type="text/javascript">
function insert_single(user)
{
opener.validate_field('pm_form', user)
}
</script>
</head>
<body>
<a href="#" onclick="insert_single('Bogey')">Bogey</a>, <a href="#" onclick="insert_single('Boris')">Boris</a>,
<a href="#" onclick="insert_single('Brandon')">Brandon</a>,
<a href="#" onclick="insert_single('craig')">craig</a>,
<a href="#" onclick="insert_single('frog')">frog</a>
</body>
</html>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
- <head>
- <title>Test JS Document</title>
- <script type="text/javascript">
- function insert_single(user)
- {
- opener.validate_field('pm_form', user)
- }
- </script>
- </head>
- <body>
- <a href="#" onclick="insert_single('Bogey')">Bogey</a>, <a href="#" onclick="insert_single('Boris')">Boris</a>,
- <a href="#" onclick="insert_single('Brandon')">Brandon</a>,
- <a href="#" onclick="insert_single('craig')">craig</a>,
- <a href="#" onclick="insert_single('frog')">frog</a>
- </body>
- </html>
Y la página de apertura de aspecto:
Código: [ Select ]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-gb" xml:lang="en-gb">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="verify-v1" content="UHKQaB5BfCapubuxANzYjxmg0b0Y2rxpaJ9P5RM1ADg=" />
<link href="./templates/wedevoy/style/style.css" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="./templates/wedevoy/images/favicon.png" />
<script type="text/javascript">
function validate_field(field_id, value)
{
var el = document.getElementById(field_id);
if(el.to.value.length > 0)
{
el.to.value += ", " + value;
}
else
{
el.to.value = value;
}
}
function popup(page)
{
mywindow = window.open(page,"mywindow","location=1,status=1,scrollbars=1, width=600, height=500");
mywindow.moveTo(0,0);
}
</script>
<title>Wedevoy • Private Mail: Compose</title>
</head>
<body>
<div id="header">
<h1 id="logo" class="logo"></h1>
<div id="info">
<h2>Announcement</h2>
<p>This site is in it's early stage of development... you may notice a few grammatical errors or design flaws as we have not had the time to refactor any of our coding or content. Thank you for your patience!</p>
</div>
</div>
<div id="tnav">
<ul id="top_nav">
<li><a href="./index.php">Home</a></li>
<li><a class="trigger" href="users.php">Membership</a>
<ul>
<li><a href="?logout">Log-Out [Bogey]</a></li>
<li><a href="pm.php">Private Mail</a></li>
<li><a href="ucp.php">User Control Panel</a></li>
<li><a href="acp.php">Admin Control Panel</a></li>
</ul>
</li>
<li><a class="trigger" href="./services.php">Services</a>
<ul>
<li><a href="img2html.php">Image to HTML</a></li>
<li><a href="music.php">Music / Audio</a></li>
<li><a href="refactor.php">Refactoring Code</a></li>
<li><a href="web.php">Web Design</a></li>
<li><a href="programming.php">Web Programming</a></li>
<li><a href="review.php">Website Review</a></li>
</ul>
</li>
<li><a class="trigger" href="./support.php">Support</a>
<ul>
<li><a href="./about.php">About Us</a></li>
<li><a href="./contact.php">Contact Us</a></li>
</ul>
</li>
<li><a class="trigger" href="./tutorials.php">Tutorials</a>
<ul>
<li><a href="tutorials.php?create">Create Tutorial</a></li>
<li><a href="tutorials.php?search">Search Tutorials</a></li>
</ul>
</li>
<li><a class="trigger" href="./sreviews.php">Site Reviews</a>
<ul>
<li><a href="rreview.php">Site Review Requests</a></li>
</ul>
</li>
</ul>
</div>
<div id="container">
<div id="nav">
<div class="first">
<ul class="navlinks">
<li class="head">Private Mail</li>
<li><a href="pm.php?page=compose">Compose PM</a></li>
</ul>
</div>
<ul class="navlinks">
<li class="head">Site Links</li>
<li><a href="vreview.php">View your site review</a></li>
<li><a href="donate.php">Donate</a></li>
</ul>
</div>
<div id="body">
<h1>Private Mail: Compose</h1>
<form action="pm.php?page=compose" method="post" id="pm_form">
<p class="formf">
<label for="to">To:</label><br />
<label for="subject">Subject:</label><br />
</p>
<p class="formf">
<input type="text" name="to" id="to" size="25" /> [<a href="" onclick="popup('user_list.php'); return false;">Find a user</a>]<br />
<input type="text" name="subject" id="subject" size="25" /><br />
</p>
<p style="clear: both;">
<label for="message">Message:</label><br />
<textarea name="message" id="message" cols="60" rows="10"></textarea><br />
<input type="submit" name="submit" value="Send" /> <input type="reset" name="reset" value="Reset" />
</p>
</form>
</div>
<p style="clear: both;"></p>
</div>
<div id="footer">
<p>Copyright © 2009 - 2010 <a href="http://www.wedevoy.com">Wedevoy.com</a></p>
</div>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-gb" xml:lang="en-gb">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="verify-v1" content="UHKQaB5BfCapubuxANzYjxmg0b0Y2rxpaJ9P5RM1ADg=" />
<link href="./templates/wedevoy/style/style.css" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="./templates/wedevoy/images/favicon.png" />
<script type="text/javascript">
function validate_field(field_id, value)
{
var el = document.getElementById(field_id);
if(el.to.value.length > 0)
{
el.to.value += ", " + value;
}
else
{
el.to.value = value;
}
}
function popup(page)
{
mywindow = window.open(page,"mywindow","location=1,status=1,scrollbars=1, width=600, height=500");
mywindow.moveTo(0,0);
}
</script>
<title>Wedevoy • Private Mail: Compose</title>
</head>
<body>
<div id="header">
<h1 id="logo" class="logo"></h1>
<div id="info">
<h2>Announcement</h2>
<p>This site is in it's early stage of development... you may notice a few grammatical errors or design flaws as we have not had the time to refactor any of our coding or content. Thank you for your patience!</p>
</div>
</div>
<div id="tnav">
<ul id="top_nav">
<li><a href="./index.php">Home</a></li>
<li><a class="trigger" href="users.php">Membership</a>
<ul>
<li><a href="?logout">Log-Out [Bogey]</a></li>
<li><a href="pm.php">Private Mail</a></li>
<li><a href="ucp.php">User Control Panel</a></li>
<li><a href="acp.php">Admin Control Panel</a></li>
</ul>
</li>
<li><a class="trigger" href="./services.php">Services</a>
<ul>
<li><a href="img2html.php">Image to HTML</a></li>
<li><a href="music.php">Music / Audio</a></li>
<li><a href="refactor.php">Refactoring Code</a></li>
<li><a href="web.php">Web Design</a></li>
<li><a href="programming.php">Web Programming</a></li>
<li><a href="review.php">Website Review</a></li>
</ul>
</li>
<li><a class="trigger" href="./support.php">Support</a>
<ul>
<li><a href="./about.php">About Us</a></li>
<li><a href="./contact.php">Contact Us</a></li>
</ul>
</li>
<li><a class="trigger" href="./tutorials.php">Tutorials</a>
<ul>
<li><a href="tutorials.php?create">Create Tutorial</a></li>
<li><a href="tutorials.php?search">Search Tutorials</a></li>
</ul>
</li>
<li><a class="trigger" href="./sreviews.php">Site Reviews</a>
<ul>
<li><a href="rreview.php">Site Review Requests</a></li>
</ul>
</li>
</ul>
</div>
<div id="container">
<div id="nav">
<div class="first">
<ul class="navlinks">
<li class="head">Private Mail</li>
<li><a href="pm.php?page=compose">Compose PM</a></li>
</ul>
</div>
<ul class="navlinks">
<li class="head">Site Links</li>
<li><a href="vreview.php">View your site review</a></li>
<li><a href="donate.php">Donate</a></li>
</ul>
</div>
<div id="body">
<h1>Private Mail: Compose</h1>
<form action="pm.php?page=compose" method="post" id="pm_form">
<p class="formf">
<label for="to">To:</label><br />
<label for="subject">Subject:</label><br />
</p>
<p class="formf">
<input type="text" name="to" id="to" size="25" /> [<a href="" onclick="popup('user_list.php'); return false;">Find a user</a>]<br />
<input type="text" name="subject" id="subject" size="25" /><br />
</p>
<p style="clear: both;">
<label for="message">Message:</label><br />
<textarea name="message" id="message" cols="60" rows="10"></textarea><br />
<input type="submit" name="submit" value="Send" /> <input type="reset" name="reset" value="Reset" />
</p>
</form>
</div>
<p style="clear: both;"></p>
</div>
<div id="footer">
<p>Copyright © 2009 - 2010 <a href="http://www.wedevoy.com">Wedevoy.com</a></p>
</div>
</body>
</html>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-gb" xml:lang="en-gb">
- <head>
- <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
- <meta name="verify-v1" content="UHKQaB5BfCapubuxANzYjxmg0b0Y2rxpaJ9P5RM1ADg=" />
- <link href="./templates/wedevoy/style/style.css" rel="stylesheet" type="text/css" />
- <link rel="shortcut icon" href="./templates/wedevoy/images/favicon.png" />
- <script type="text/javascript">
- function validate_field(field_id, value)
- {
- var el = document.getElementById(field_id);
- if(el.to.value.length > 0)
- {
- el.to.value += ", " + value;
- }
- else
- {
- el.to.value = value;
- }
- }
- function popup(page)
- {
- mywindow = window.open(page,"mywindow","location=1,status=1,scrollbars=1, width=600, height=500");
- mywindow.moveTo(0,0);
- }
- </script>
- <title>Wedevoy • Private Mail: Compose</title>
- </head>
- <body>
- <div id="header">
- <h1 id="logo" class="logo"></h1>
- <div id="info">
- <h2>Announcement</h2>
- <p>This site is in it's early stage of development... you may notice a few grammatical errors or design flaws as we have not had the time to refactor any of our coding or content. Thank you for your patience!</p>
- </div>
- </div>
- <div id="tnav">
- <ul id="top_nav">
- <li><a href="./index.php">Home</a></li>
- <li><a class="trigger" href="users.php">Membership</a>
- <ul>
- <li><a href="?logout">Log-Out [Bogey]</a></li>
- <li><a href="pm.php">Private Mail</a></li>
- <li><a href="ucp.php">User Control Panel</a></li>
- <li><a href="acp.php">Admin Control Panel</a></li>
- </ul>
- </li>
- <li><a class="trigger" href="./services.php">Services</a>
- <ul>
- <li><a href="img2html.php">Image to HTML</a></li>
- <li><a href="music.php">Music / Audio</a></li>
- <li><a href="refactor.php">Refactoring Code</a></li>
- <li><a href="web.php">Web Design</a></li>
- <li><a href="programming.php">Web Programming</a></li>
- <li><a href="review.php">Website Review</a></li>
- </ul>
- </li>
- <li><a class="trigger" href="./support.php">Support</a>
- <ul>
- <li><a href="./about.php">About Us</a></li>
- <li><a href="./contact.php">Contact Us</a></li>
- </ul>
- </li>
- <li><a class="trigger" href="./tutorials.php">Tutorials</a>
- <ul>
- <li><a href="tutorials.php?create">Create Tutorial</a></li>
- <li><a href="tutorials.php?search">Search Tutorials</a></li>
- </ul>
- </li>
- <li><a class="trigger" href="./sreviews.php">Site Reviews</a>
- <ul>
- <li><a href="rreview.php">Site Review Requests</a></li>
- </ul>
- </li>
- </ul>
- </div>
- <div id="container">
- <div id="nav">
- <div class="first">
- <ul class="navlinks">
- <li class="head">Private Mail</li>
- <li><a href="pm.php?page=compose">Compose PM</a></li>
- </ul>
- </div>
- <ul class="navlinks">
- <li class="head">Site Links</li>
- <li><a href="vreview.php">View your site review</a></li>
- <li><a href="donate.php">Donate</a></li>
- </ul>
- </div>
- <div id="body">
- <h1>Private Mail: Compose</h1>
- <form action="pm.php?page=compose" method="post" id="pm_form">
- <p class="formf">
- <label for="to">To:</label><br />
- <label for="subject">Subject:</label><br />
- </p>
- <p class="formf">
- <input type="text" name="to" id="to" size="25" /> [<a href="" onclick="popup('user_list.php'); return false;">Find a user</a>]<br />
- <input type="text" name="subject" id="subject" size="25" /><br />
- </p>
- <p style="clear: both;">
- <label for="message">Message:</label><br />
- <textarea name="message" id="message" cols="60" rows="10"></textarea><br />
- <input type="submit" name="submit" value="Send" /> <input type="reset" name="reset" value="Reset" />
- </p>
- </form>
- </div>
- <p style="clear: both;"></p>
- </div>
- <div id="footer">
- <p>Copyright © 2009 - 2010 <a href="http://www.wedevoy.com">Wedevoy.com</a></p>
- </div>
- </body>
- </html>
¿Hay alguna manera de que podía arreglar eso? Gracias.
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
- Bogey
- Bogey


- Registrado: Jul 14, 2005
- Mensajes: 8211
- Loc: USA
- Status: Offline
Oh, y $ auth-> get_user_list (); cosa es...
Parece que el problema es tanto de esta función o la de PHP en user_list.php...
[EDIT:] Arreglado el problema...en el user_list.php tuve el PHP siguiente.
Cambiar a:
Se ha solucionado el problema. Por alguna razón el $ user siendo el mismo nombre que la matriz $ user en mi $ auth-> get_user_list (); la función fueron arruinando toda la sesión en mi sitio web
Código: [ Select ]
function get_user_list($field)
{
global $db;
$userlist = $db->fetch_rowset("SELECT $field FROM " . USERS);
$num_users = $db->num_rows("SELECT $field FROM " . USERS);
$return_val = array();
foreach($userlist as $user)
{
$return_val[] = $user[$field];
}
return $return_val;
}
{
global $db;
$userlist = $db->fetch_rowset("SELECT $field FROM " . USERS);
$num_users = $db->num_rows("SELECT $field FROM " . USERS);
$return_val = array();
foreach($userlist as $user)
{
$return_val[] = $user[$field];
}
return $return_val;
}
- function get_user_list($field)
- {
- global $db;
- $userlist = $db->fetch_rowset("SELECT $field FROM " . USERS);
- $num_users = $db->num_rows("SELECT $field FROM " . USERS);
- $return_val = array();
- foreach($userlist as $user)
- {
- $return_val[] = $user[$field];
- }
- return $return_val;
- }
[EDIT:] Arreglado el problema...en el user_list.php tuve el PHP siguiente.
Código: [ Select ]
<?php
require_once 'includes/globals.php';
$userlist = $auth->get_user_list('username');
$num_users = count($userlist);
$n = 0;
foreach($userlist as $user)
{
++$n;
echo "<a href=\"#\" onclick=\"insert_single('$user')\">$user</a>";
if($n > 0 && $n < $num_users)
{
echo ",\n ";
}
}
?>
require_once 'includes/globals.php';
$userlist = $auth->get_user_list('username');
$num_users = count($userlist);
$n = 0;
foreach($userlist as $user)
{
++$n;
echo "<a href=\"#\" onclick=\"insert_single('$user')\">$user</a>";
if($n > 0 && $n < $num_users)
{
echo ",\n ";
}
}
?>
- <?php
- require_once 'includes/globals.php';
- $userlist = $auth->get_user_list('username');
- $num_users = count($userlist);
- $n = 0;
- foreach($userlist as $user)
- {
- ++$n;
- echo "<a href=\"#\" onclick=\"insert_single('$user')\">$user</a>";
- if($n > 0 && $n < $num_users)
- {
- echo ",\n ";
- }
- }
- ?>
Cambiar a:
Código: [ Select ]
<?php
require_once 'includes/globals.php';
$userlist = $auth->get_user_list('username');
$num_users = count($userlist);
$n = 0;
foreach($userlist as $userss)
{
++$n;
echo "<a href=\"#\" onclick=\"insert_single('$userss')\">$userss</a>";
if($n > 0 && $n < $num_users)
{
echo ",\n ";
}
}
?>
require_once 'includes/globals.php';
$userlist = $auth->get_user_list('username');
$num_users = count($userlist);
$n = 0;
foreach($userlist as $userss)
{
++$n;
echo "<a href=\"#\" onclick=\"insert_single('$userss')\">$userss</a>";
if($n > 0 && $n < $num_users)
{
echo ",\n ";
}
}
?>
- <?php
- require_once 'includes/globals.php';
- $userlist = $auth->get_user_list('username');
- $num_users = count($userlist);
- $n = 0;
- foreach($userlist as $userss)
- {
- ++$n;
- echo "<a href=\"#\" onclick=\"insert_single('$userss')\">$userss</a>";
- if($n > 0 && $n < $num_users)
- {
- echo ",\n ";
- }
- }
- ?>
Se ha solucionado el problema. Por alguna razón el $ user siendo el mismo nombre que la matriz $ user en mi $ auth-> get_user_list (); la función fueron arruinando toda la sesión en mi sitio web
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
Página 1 de 1
Para responder a este tema que necesita para ingresar o registrarse. Es gratis.
Publicar Información
- Total de mensajes en este tema: 9 mensajes
- Usuarios navegando por este Foro: roelof y 111 invitados
- No puede abrir nuevos temas en este Foro
- No puede responder a temas en este Foro
- No puede editar sus mensajes en este Foro
- No puede borrar sus mensajes en este Foro
- No puede enviar adjuntos en este Foro
