PHP - No me muestra select en la tabla

 
Vista:

No me muestra select en la tabla

Publicado por Cristian (42 intervenciones) el 22/01/2013 20:26:33
Veran tengo el siguiente codigo:
No me logra mostrar en mis tablas el select que mando,

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
<?php require_once('Connections/cn.php'); ?>
 
<?php
//inicializa la sesion
if (!isset($_SESSION)) {
  session_start();
}
 
// ** Logout the current user. **
$logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){
  $logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);
}
 
if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){
  //to fully log out a visitor we need to clear the session varialbles
  $_SESSION['MM_Username'] = NULL;
  $_SESSION['MM_UserGroup'] = NULL;
  $_SESSION['PrevUrl'] = NULL;
  unset($_SESSION['MM_Username']);
  unset($_SESSION['MM_UserGroup']);
  unset($_SESSION['PrevUrl']);
 
  $logoutGoTo = "index.php";
  if ($logoutGoTo) {
    header("Location: $logoutGoTo");
    exit;
  }
}
?>
<?php
if (!isset($_SESSION)) {
  session_start();
}
$MM_authorizedUsers = "";
$MM_donotCheckaccess = "true";
 
// *** Restrict Access To Page: Grant or deny access to this page
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) {
  // For security, start by assuming the visitor is NOT authorized. 
  $isValid = False;
 
  // When a visitor has logged into this site, the Session variable MM_Username set equal to their username. 
  // Therefore, we know that a user is NOT logged in if that Session variable is blank. 
  if (!empty($UserName)) {
    // Besides being logged in, you may restrict access to only certain users based on an ID established when they login. 
    // Parse the strings into arrays. 
    $arrUsers = Explode(",", $strUsers);
    $arrGroups = Explode(",", $strGroups);
    if (in_array($UserName, $arrUsers)) {
      $isValid = true;
    }
    // Or, you may restrict access to only certain users based on their username. 
    if (in_array($UserGroup, $arrGroups)) {
      $isValid = true;
    }
    if (($strUsers == "") && true) {
      $isValid = true;
    }
  }
  return $isValid;
}
 
$MM_restrictGoTo = "error.html";
if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {
  $MM_qsChar = "?";
  $MM_referrer = $_SERVER['PHP_SELF'];
  if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
  if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0)
  $MM_referrer .= "?" . $QUERY_STRING;
  $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
  header("Location: ". $MM_restrictGoTo);
  exit;
}
?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
 
  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
 
  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}
 
 $currentPage = $_SERVER["PHP_SELF"];
 
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
 
  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
 
  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}
 
$colname_rsUsuario = "-1";
if (isset($_SESSION['MM_Username'])) {
  $colname_rsUsuario = $_SESSION['MM_Username'];
}
mysql_select_db($database_cn, $cn);
$query_rsUsuario = sprintf("SELECT * FROM personal WHERE nomUsuario = %s", GetSQLValueString($colname_rsUsuario, "text"));
$rsUsuario = mysql_query($query_rsUsuario, $cn) or die(mysql_error());
$row_rsUsuario = mysql_fetch_assoc($rsUsuario);
$totalRows_rsUsuario = mysql_num_rows($rsUsuario);
 
$maxRows_rsLista = 10;
$pageNum_rsLista = 0;
if (isset($_GET['pageNum_rsLista'])) {
  $pageNum_rsLista = $_GET['pageNum_rsLista'];
}
$startRow_rsLista = $pageNum_rsLista * $maxRows_rsLista;
 
$colname_rsLista = "-1";
if (isset($_SESSION['MM_Username'])) {
  $colname_rsLista = $_SESSION['MM_Username'];
}
mysql_select_db($database_cn, $cn);
$query_rsLista = sprintf("SELECT * FROM listaagendadetalle WHERE nomUsuario = %s ORDER BY fecInicio DESC", GetSQLValueString($colname_rsLista, "text"));
$query_limit_rsLista = sprintf("%s LIMIT %d, %d", $query_rsLista, $startRow_rsLista, $maxRows_rsLista);
$rsLista = mysql_query($query_limit_rsLista, $cn) or die(mysql_error());
$row_rsLista = mysql_fetch_assoc($rsLista);
 
if (isset($_GET['totalRows_rsLista'])) {
  $totalRows_rsLista = $_GET['totalRows_rsLista'];
} else {
  $all_rsLista = mysql_query($query_rsLista);
  $totalRows_rsLista = mysql_num_rows($all_rsLista);
}
$totalPages_rsLista = ceil($totalRows_rsLista/$maxRows_rsLista)-1;
 
$queryString_rsLista = "";
if (!empty($_SERVER['QUERY_STRING'])) {
  $params = explode("&", $_SERVER['QUERY_STRING']);
  $newParams = array();
  foreach ($params as $param) {
    if (stristr($param, "pageNum_rsLista") == false &&
        stristr($param, "totalRows_rsLista") == false) {
      array_push($newParams, $param);
    }
  }
  if (count($newParams) != 0) {
    $queryString_rsLista = "&" . htmlentities(implode("&", $newParams));
  }
}
$queryString_rsLista = sprintf("&totalRows_rsLista=%d%s", $totalRows_rsLista, $queryString_rsLista);
?>
 
 
 
<td height="17" colspan="9" valign="top" bgcolor="#F7F7F7"><div align="center"><strong>REUNIONES AGENDADAS </strong></div></td>
    </tr>
    <tr>
	  <td height="96" colspan="9" valign="top" bgcolor="#F7F7F7">&nbsp;
       	<div align="center"></div>
   	    <table width="763" height="22" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
              		<td width="225"  align="center" bgcolor="#000000" class="fonte">Asunto</td>
		            <td width="185"  align="center" bgcolor="#000000" class="fonte">Lugar</td>
        		    <td width="94"  align="center" bgcolor="#000000" class="fonte">Fecha</td>
		            <td width="105"  align="center" bgcolor="#000000" class="fonte">Movlidad S/.</td>
        		    <td width="111"  align="center"  bgcolor="#000000" class="fonte">Estado Mov</td>
              		<td width="43"  align="center"  bgcolor="#000000" class="fonte">Detalle</td>
       	  </tr>
            	<?php do { ?>
	        	<tr valign="middle">
                	<td class="cinza"><?php echo $row_rsLista['desAsunto']; ?></td>
                	<td class="cinza"><?php echo $row_rsLista['desLugar']; ?></td>
                	<td align="center" class="cinza"><?php echo $row_rsLista['fecInicio']; ?></td>
                	<td align="center" class="cinza"><?php echo $row_rsLista['movMonto']; ?></td>
                	<td align="center" class="cinza"><?php echo $row_rsLista['movEstado']; ?></td>
                	<td align="center" class="cinza"><a href="detalleagenda.php?codReunion=<?php echo $row_rsLista['codReunion']; ?>" class="Estilo21">Ver</a></td>
	            </tr>
    	        <?php } while ($row_rsLista = mysql_fetch_assoc($rsLista)); ?>
   	    </table>
          <div align="center">
            <table border="0">
              <tr>
                <td><?php if ($pageNum_rsLista > 0) { // Show if not first page ?>
                    <a href="<?php printf("%s?pageNum_rsLista=%d%s", $currentPage, 0, $queryString_rsLista); ?>">Primero</a>
                    <?php } // Show if not first page ?>                </td>
                <td><?php if ($pageNum_rsLista > 0) { // Show if not first page ?>
                    <a href="<?php printf("%s?pageNum_rsLista=%d%s", $currentPage, max(0, $pageNum_rsLista - 1), $queryString_rsLista); ?>">Anterior</a>
                    <?php } // Show if not first page ?>                </td>
                <td><?php if ($pageNum_rsLista < $totalPages_rsLista) { // Show if not last page ?>
                    <a href="<?php printf("%s?pageNum_rsLista=%d%s", $currentPage, min($totalPages_rsLista, $pageNum_rsLista + 1), $queryString_rsLista); ?>">Siguiente</a>
                    <?php } // Show if not last page ?>                </td>
                <td><?php if ($pageNum_rsLista < $totalPages_rsLista) { // Show if not last page ?>
                    <a href="<?php printf("%s?pageNum_rsLista=%d%s", $currentPage, $totalPages_rsLista, $queryString_rsLista); ?>">&Uacute;ltimo</a>
                    <?php } // Show if not last page ?>                </td>
              </tr>
                      </table>
          </div>
          <div align="center"></div></td>
    </tr>
    <tr>
      <td height="17" colspan="9" valign="top" bgcolor="#F7F7F7">
      <?php
 		if(isset($_GET['d'])){
		    $idev = $_GET['d'];
		    $sqlev = mysql_query("SELECT * FROM detalleagenda WHERE fecInicio = '$idev' ORDER BY horaInicio ASC") or die(mysql_error());
		    $numev = mysql_num_rows($sqlev);
 
		    for($j = 0; $j < $numev; $j++){
			    $eve = @mysql_result($sqlev, $j, "desAsunto");
				$dev = @mysql_result($sqlev, $j, "fecInicio");
				$auev = @mysql_result($sqlev, $j, "nomUsuario");
			    $lev = @mysql_result($sqlev, $j, "desLugar");
			    $psev = @mysql_result($sqlev, $j, "fecRegistro");
		    	$nowev = date('d/m/y - H:i', strtotime($psev));
				$hev = @mysql_result($sqlev, $j, "horaInicio");
 
				print '<table width="100%" cellspacing="0" cellpadding="0">';
				print '<tr><td class="show">'.$dev.' - '.$eve.'</td></tr>';
				print '<tr><td class="linha"><b>Hora		: </b>'.$hev.'hs</td></tr>';
				print '<tr><td class="linha"><b>Lugar		: </b>'.$lev.'</td></tr>';
				print '<tr><td class="linha"><b>Registrado	: </b>'.$nowev.'hs por '.$auev.'</td></tr>';
				print '</table>';
			}
		}
     ?>
      </td>



no se que puede ser??
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
Imágen de perfil de xve
Val: 3.943
Oro
Ha mantenido su posición en PHP (en relación al último mes)
Gráfica de PHP

No me muestra select en la tabla

Publicado por xve (6935 intervenciones) el 22/01/2013 22:27:54
Hola Cristian, te agradezco mucho que nos muestres todo el código, pero nos puedes especificar un poco a que parte del código haces referencia? a que select?
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

No me muestra select en la tabla

Publicado por Cristian (42 intervenciones) el 23/01/2013 15:23:03
No hay problema brother, pero el problema ya lo solucione, el error era en el SELECT de mi SQL, mas bien tenias que lanzar left join
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

No me muestra select en la tabla

Publicado por Moreno (17 intervenciones) el 20/04/2018 08:13:23
Posiblemente este video te ayude y de solución
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar