Ayuda con PHP y CMS

  • Iniciador del tema Iniciador del tema Ds1988
  • Fecha de inicio Fecha de inicio

Ds1988

Usuario Nuevo nvl. 1
18 Oct 2014
5
0
1
A, A
Estimado

Quiero saber, quien sabe PHP , necesito hablar contigo.

Por favor
Gracias
Saludos
 
estimado cualquier duda o consulta que tenga, debe realizarse acá, no se hacen por correo, ni menos hacerle su trabajo.
a demás se registro solo para eso.
indique cual es su problema, el error y el código en cuestión para que podamos ayudarlo.
 
Estimado esto no funciona así, indique cual es el error y el código donde se genera.

si quiere le ayudemos debe realizar lo indicado, este no es soporte personalizado, es una comunidad que ayuda respondiendo comentarios.
 
function getUsuarioRegistrado($post, $urlHome=NULL, $urlPerfil=NULL, $urlInvitado=NULL){
//echo "ACA";
$link=$this->conBD();
if (isset($_COOKIE['rem'])){
$dat=explode('|', $_COOKIE['rem']);
$query=sprintf("SELECT DECODE('%s','%s'), DECODE('%s','%s')", html_entity_decode($dat[0]), PHASE, html_entity_decode($dat[1]), PHASE);
try{
if (!$res=$this->db_exec($query))
throw new Exception ('<div class="alert warning">Error: Error en consulta BD, obteniendo data - '.__FUNCTION__.'</div>');
$row=mysql_fetch_array($res);
if (md5($dat[0].'|'.$dat[1].PHASE)==$dat[2]){
$query=sprintf("SELECT idcolaborador, nombre, apelpat, apelmat, idcargo FROM %s WHERE login='%s' AND pwd=ENCODE('%s','%s') AND estatus=1 ORDER BY idcolaborador ASC LIMIT 0, 1", COLAB, $row[0], $row[1], PHASE);
}
else{
$this->reloadLocation('/');
exit;
}
}
catch(Exception $e){
$err=$e->getMessage();
$this->logUsuario('Error (try)'.$err);
return $err;
}
}
else{
$query=sprintf("SELECT idcolaborador, nombre, apelpat, apelmat, idcargo FROM %s WHERE login='%s' AND pwd=ENCODE('%s','%s') AND estatus=1 ORDER BY idcolaborador ASC LIMIT 0, 1", COLAB, $this->InsMySQL($post['login']), $this->InsMySQL($post['pwd']), PHASE);
}
try{
if (!$res=$this->db_exec($query))
throw new Exception ('<div class="alert warning">Error: Error en consulta BD, obteniendo data - '.__FUNCTION__.'</div>');
//echo $query;
if (mysql_num_rows($res)>0){
$row=mysql_fetch_array($res);
session_start();
$_SESSION['adminCliente']=true;
$_SESSION['nombre']=$row['nombre'];
$_SESSION['cargo']=$row['idcargo'];
$_SESSION['apelPat']=$row['apelpat'];
$_SESSION['apelMat']=$row['apelmat'];
$_SESSION['idUser']=$row['idcolaborador'];
$_SESSION['ipUser']=$_SERVER['REMOTE_ADDR'];
$_SESSION['agentUser']=$_SERVER['HTTP_USER_AGENT'];
$_SESSION['inicioUser']=strftime("%Y-%m-%d %H:%M:%S");
$_SESSION['chkUser']=MD5(session_id().$_SESSION['idUser'].$_SESSION['inicioUser'].$_SESSION['ipUser']);
//echo "ACA1";
$query=sprintf("INSERT INTO %s (fecha, chk, idcolaborador) VALUES (NOW(), '%s', %d)", COLLO, $_SESSION['chkUser'], $_SESSION['idUser']);
//echo $query;
if (!$res=$this->db_exec($query))
throw new Exception ('<div class="alert warning">Error: Error en consulta BD, ingresando datos de Login - '.__FUNCTION__.'</div>');
else{
//echo "ACA3";
$_SESSION['idLogin']=mysql_insert_id();
if ($_POST['remember']==1){
$query=sprintf("SELECT ENCODE('%s', '%s'), ENCODE('%s', '%s')", $_POST['login'], PHASE, $_POST['pwd'], PHASE);
if (!$res=$this->db_exec($query))
throw new Exception ('<div class="alert warning">Error: Error en consulta BD, ingresando datos de Login - '.__FUNCTION__.'</div>');
else{
//echo "ACA4";
$row=mysql_fetch_array($res);
setcookie('remCubo3', htmlentities($row[0]).'|'.htmlentities($row[1]).'|'.md5(htmlentities($row[0]).'|'.htmlentities($row[1]).PHASE), time()+1296000, '/admin/', $_SERVER['SERVER_NAME']);
}
}
$this->logUsuario('Ingreso a sistema');
if ($_SESSION['cargo']==1)
$this->reloadLocation($urlHome);
elseif($_SESSION['cargo']==2)
$this->reloadLocation($urlPerfil);
else
$this->reloadLocation($urlInvitado);
exit;
}
//echo "ACA2";
}
else
throw new Exception ('<div class="content-box-content column-right" style="border=0px;"><div class="notification attention png_bg"><a href="#" class="close"><img src="/admin/resources/images/icons/cross_grey_small.png" title="Cerrar esta notificaci&oacute;n" alt="cerrar" /></a><div>Problema: No se han encontrado resultados de Usuario<br></div></div></div>');
}
catch(Exception $e){
$err=$e->getMessage();
$this->logUsuario('Error (try)'.$err);
return $err;
}
}
 
function getUsuarioRegistrado($post, $urlHome=NULL, $urlPerfil=NULL, $urlInvitado=NULL){
//echo "ACA";
$link=$this->conBD();
if (isset($_COOKIE['rem'])){
$dat=explode('|', $_COOKIE['rem']);
$query=sprintf("SELECT DECODE('%s','%s'), DECODE('%s','%s')", html_entity_decode($dat[0]), PHASE, html_entity_decode($dat[1]), PHASE);
try{
if (!$res=$this->db_exec($query))
throw new Exception ('<div class="alert warning">Error: Error en consulta BD, obteniendo data - '.__FUNCTION__.'</div>');
$row=mysql_fetch_array($res);
if (md5($dat[0].'|'.$dat[1].PHASE)==$dat[2]){
$query=sprintf("SELECT idcolaborador, nombre, apelpat, apelmat, idcargo FROM %s WHERE login='%s' AND pwd=ENCODE('%s','%s') AND estatus=1 ORDER BY idcolaborador ASC LIMIT 0, 1", COLAB, $row[0], $row[1], PHASE);
}
else{
$this->reloadLocation('/');
exit;
}
}
catch(Exception $e){
$err=$e->getMessage();
$this->logUsuario('Error (try)'.$err);
return $err;
}
}
else{
$query=sprintf("SELECT idcolaborador, nombre, apelpat, apelmat, idcargo FROM %s WHERE login='%s' AND pwd=ENCODE('%s','%s') AND estatus=1 ORDER BY idcolaborador ASC LIMIT 0, 1", COLAB, $this->InsMySQL($post['login']), $this->InsMySQL($post['pwd']), PHASE);
}
try{
if (!$res=$this->db_exec($query))
throw new Exception ('<div class="alert warning">Error: Error en consulta BD, obteniendo data - '.__FUNCTION__.'</div>');
//echo $query;
if (mysql_num_rows($res)>0){
$row=mysql_fetch_array($res);
session_start();
$_SESSION['adminCliente']=true;
$_SESSION['nombre']=$row['nombre'];
$_SESSION['cargo']=$row['idcargo'];
$_SESSION['apelPat']=$row['apelpat'];
$_SESSION['apelMat']=$row['apelmat'];
$_SESSION['idUser']=$row['idcolaborador'];
$_SESSION['ipUser']=$_SERVER['REMOTE_ADDR'];
$_SESSION['agentUser']=$_SERVER['HTTP_USER_AGENT'];
$_SESSION['inicioUser']=strftime("%Y-%m-%d %H:%M:%S");
$_SESSION['chkUser']=MD5(session_id().$_SESSION['idUser'].$_SESSION['inicioUser'].$_SESSION['ipUser']);
//echo "ACA1";
$query=sprintf("INSERT INTO %s (fecha, chk, idcolaborador) VALUES (NOW(), '%s', %d)", COLLO, $_SESSION['chkUser'], $_SESSION['idUser']);
//echo $query;
if (!$res=$this->db_exec($query))
throw new Exception ('<div class="alert warning">Error: Error en consulta BD, ingresando datos de Login - '.__FUNCTION__.'</div>');
else{
//echo "ACA3";
$_SESSION['idLogin']=mysql_insert_id();
if ($_POST['remember']==1){
$query=sprintf("SELECT ENCODE('%s', '%s'), ENCODE('%s', '%s')", $_POST['login'], PHASE, $_POST['pwd'], PHASE);
if (!$res=$this->db_exec($query))
throw new Exception ('<div class="alert warning">Error: Error en consulta BD, ingresando datos de Login - '.__FUNCTION__.'</div>');
else{
//echo "ACA4";
$row=mysql_fetch_array($res);
setcookie('remCubo3', htmlentities($row[0]).'|'.htmlentities($row[1]).'|'.md5(htmlentities($row[0]).'|'.htmlentities($row[1]).PHASE), time()+1296000, '/admin/', $_SERVER['SERVER_NAME']);
}
}
$this->logUsuario('Ingreso a sistema');
if ($_SESSION['cargo']==1)
$this->reloadLocation($urlHome);
elseif($_SESSION['cargo']==2)
$this->reloadLocation($urlPerfil);
else
$this->reloadLocation($urlInvitado);
exit;
}
//echo "ACA2";
}
else
throw new Exception ('<div class="content-box-content column-right" style="border=0px;"><div class="notification attention png_bg"><a href="#" class="close"><img src="/admin/resources/images/icons/cross_grey_small.png" title="Cerrar esta notificaci&oacute;n" alt="cerrar" /></a><div>Problema: No se han encontrado resultados de Usuario<br></div></div></div>');
}
catch(Exception $e){
$err=$e->getMessage();
$this->logUsuario('Error (try)'.$err);
return $err;
}
}

nisiquiera me voy a dar el trabajo de mirar el codigo sin saber cual es el problema.
 
X 2.

Ni Una introducción, nada, solo el "AYUDENMEEEEEEEEEEEEE pa eso me registre"!!!!!!!!!!!!!!!!!!!!!!!!!
 
Tengo la sensación de que el tipo no habla español. Demos jugo un rato jaja

Ds1988, in order to help you, you need to explain us the problem itself so we can detect which part of your code may be causing that problem.

Probably none of us can install your php folder in our own computers because we already have one php installation, so a double installation could cause problems to our machine's software.

Regards.