Dois servidores Iguais...
Eu tenho um servidor com IIS 5.0 e PHP 5.2.2 instalado (modo CGI) e MySQL 4. Tudo funcionando Perfeitamente.
Agora em uma outra maquina com IIS 6.0 com PHP 5.2.2 instalado (modo CGI) e MySQL 4. apresenta o seguinte erro na pagina:
"PHP Notice: Use of undefined constant Administrador - assumed 'Administrador' in C:\Inetpub\wwwroot\controleProcedimentos\callProcedimentoAtendimento.php on line 28 "
Sendo que essa parte do Codigo é apenas uns IF para identificar o perfil do Usuario logado. Segue o Codigo da Pagina:
<?php require_once('../Connections/connMySQL.php'); ?><?php// Load the tNG classesrequire_once('../includes/tng/tNG.inc.php');// Make unified connection variable$conn_connMySQL = new KT_connection($connMySQL, $database_connMySQL);//Start Restrict Access To Page$restrict = new tNG_RestrictAccess($conn_connMySQL, "../");//Grand Levels: Level$restrict->addLevel("Administrador");$restrict->addLevel("Supervisor");$restrict->addLevel("Usuario");$restrict->Execute();//End Restrict Access To Page$usuario = $_SESSION['kt_login_user'];mysql_select_db($database_connMySQL, $connMySQL);$query_getUsuario = "SELECT * FROM usuarios WHERE LOGIN = '$usuario' ORDER BY NOME ASC";$getUsuario = mysql_query($query_getUsuario, $connMySQL) or die(mysql_error());$row_getUsuario = mysql_fetch_assoc($getUsuario);$totalRows_getUsuario = mysql_num_rows($getUsuario);$departamentoUsuario = $row_getUsuario['DEPARTAMENTO'];if ($row_getUsuario['PERFIL'] == Administrador){mysql_select_db($database_connMySQL, $connMySQL);$query_getProcedimento = "SELECT * FROM procedimentos WHERE TIPO = 'Atendimento' ORDER BY TITULO ASC";$getProcedimento = mysql_query($query_getProcedimento, $connMySQL) or die(mysql_error());$row_getProcedimento = mysql_fetch_assoc($getProcedimento);$totalRows_getProcedimento = mysql_num_rows($getProcedimento);} else if ($row_getUsuario['PERFIL'] == Supervisor){mysql_select_db($database_connMySQL, $connMySQL);$query_getProcedimento = "SELECT * FROM procedimentos WHERE TIPO = 'Atendimento' AND DEPARTAMENTO = '$departamentoUsuario' ORDER BY TITULO ASC";$getProcedimento = mysql_query($query_getProcedimento, $connMySQL) or die(mysql_error());$row_getProcedimento = mysql_fetch_assoc($getProcedimento);$totalRows_getProcedimento = mysql_num_rows($getProcedimento);} else {mysql_select_db($database_connMySQL, $connMySQL);$query_getProcedimento = "SELECT * FROM procedimentos WHERE TIPO = 'Atendimento' AND DEPARTAMENTO = '$departamentoUsuario' ORDER BY TITULO ASC";$getProcedimento = mysql_query($query_getProcedimento, $connMySQL) or die(mysql_error());$row_getProcedimento = mysql_fetch_assoc($getProcedimento);$totalRows_getProcedimento = mysql_num_rows($getProcedimento);}?><html><head><title>..:: Intranet Suporte Tecnico ::..</title><link href="../objetos/estiloPrincipal.css" rel="stylesheet" type="text/css"><script language="JavaScript" type="text/JavaScript"><!--function MM_openBrWindow(theURL,winName,features) { //v2.0 window.open(theURL,winName,features);}</script></head><body><div id="tamanho" align="center"> <table width="400" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="144"><img src="../objetos/logoTMS.gif" width="144" height="49"></td> <td colspan="4" width="256" align="center" valign="middle" class="fontTitulo">Procedimentos Atendimento</td> </tr></table><table width="400" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="80"> </td> <td width="80"> </td> <td width="80"> </td> <td width="80"> </td> <td width="80"> </td> </tr> <tr> <td colspan="5" align="center"><font class="fontAviso">Lembre-se:</font><font class="fontNormal"> Sua função é explorar a real dificuldade do usuário, esses procedimentos estão aqui para que você consiga disgnosticar a dificuldade do usuário com maior eficácia.</font></td> </tr> <tr> <td width="80"> </td> <td width="80"> </td> <td width="80"> </td> <td width="80"> </td> <td width="80"> </td> </tr> <tr> <td width="80"> </td> <td colspan="3"> <?php if(mysql_num_rows($getProcedimento)){ do { ?> <img src="objetos/icoNotes.gif" width="16" height="16" border="0"> <a href="java script:MM_openBrWindow('filesProcedimentos/getProcedimento.php?ID=<?php echo $row_getProcedimento['ID']; ?>','Procedimento','toolbar=no,location=no,menubar=no,scrollbars=yes,resizable=no,width=700,heigt=500')"><?php echo $row_getProcedimento['TITULO']; ?></a><br> <?php } while ($row_getProcedimento = mysql_fetch_assoc($getProcedimento)); } else { ?><font class="fontAviso">Nenhum Procedimento encontrado.</font><?php } ?> </td> <td width="80"> </td> </tr></table></div><script language="JavaScript" type="text/javascript"> parent.document.getElementById("Visor").height = document.getElementById("tamanho").scrollHeight + 40; //40: Margem Superior e Inferior, somadas</script></body></html><?phpmysql_free_result($getProcedimento);mysql_free_result($getUsuario);?>Discussão (4)
Carregando comentários...