Foros del Web » Creando para Internet » Sistemas de gestión de contenidos »

error en Editar Admins authors.php

Estas en el tema de error en Editar Admins authors.php en el foro de Sistemas de gestión de contenidos en Foros del Web. Encontre un error en Editar Admins authors.php el error es es siguente al Crear un Administrador nuevo el formulario tiene los campos nombre y Nickname ...
  #1 (permalink)  
Antiguo 16/01/2005, 12:53
 
Fecha de Ingreso: noviembre-2003
Ubicación: Málaga
Mensajes: 293
Antigüedad: 20 años, 5 meses
Puntos: 1
error en Editar Admins authors.php

Encontre un error en Editar Admins authors.php el error es es siguente al Crear un Administrador nuevo el formulario tiene los campos nombre y Nickname si estos son iguales se puede editor y mostrar los permisos de los modulos pero si son distintos si te deja modificar pero no te los

AAHHH y modificar no tira bien

muestra:
Nickname $chng_aid = $row['aid'];
[B]nombre [/B $chng_name = $row['name'];


Código PHP:
function modifyadmin($chng_aid) {
    global 
$prefix$db$multilingual;
    include(
"header.php");
    
GraphicAdmin();
    
OpenTable();
    echo 
"<center><font class=\"title\"><b>" _AUTHORSADMIN "</b></font></center>";
    
CloseTable();
    echo 
"<br>";
    
OpenTable();
    echo 
"<center><font class=\"option\"><b>" _MODIFYINFO "</b></font></center><br><br>";
    
$adm_aid $chng_aid;
    
$adm_aid trim($adm_aid);
    
$row $db->sql_fetchrow($db->sql_query("SELECT aid, name, url, email, pwd, radminsuper, admlanguage from " $prefix "_authors where aid='$chng_aid'"));
    
$chng_aid $row['aid'];
    
$chng_name $row['name'];
    
$chng_url stripslashes($row['url']);
    
$chng_email stripslashes($row['email']);
    
$chng_pwd $row['pwd'];
    
$chng_radminsuper intval($row['radminsuper']);
    
$chng_admlanguage $row['admlanguage'];
    
$chng_aid substr("$chng_aid"0,25);
    
$aid $chng_aid;
    echo 
"<form action=\"admin.php\" method=\"post\">"
    
."<table  border=\"0\" align=\"center\" cellpadding=\"3\" cellspacing=\"0\">"
    
."<tr><td>" _NAME ":</td>"
    
."<td colspan=\"3\"><b>55 $chng_name</b> <input type=\"hidden\" name=\"chng_name\" value=\"$chng_name\"></td></tr>"
    
."<tr><td>" _NICKNAME ":</td>"
        
."<td colspan=\"3\"><input type=\"text\" name=\"chng_aid\" value=\"$chng_aid\"> <font class=\"tiny\">" _REQUIRED "</font></td></tr>"
    
."<tr><td>" _EMAIL ":</td>"
    
."<td colspan=\"3\"><input type=\"text\" name=\"chng_email\" value=\"$chng_email\" size=\"30\" maxlength=\"60\"> <font class=\"tiny\">" _REQUIRED "</font></td></tr>"
    
."<tr><td>" _URL ":</td>"
    
."<td colspan=\"3\"><input type=\"text\" name=\"chng_url\" value=\"$chng_url\" size=\"30\" maxlength=\"60\"></td></tr>";
    if (
$multilingual == 1) {
    echo 
"<tr><td>" _LANGUAGE ":</td><td colspan=\"3\">"
        
."<select name=\"chng_admlanguage\">";
    
$handle=opendir('language');
    while (
$file readdir($handle)) {
        if (
preg_match("/^lang\-(.+)\.php/"$file$matches)) {
        
$langFound $matches[1];
        
$languageslist .= "$langFound ";
        }
    }
    
closedir($handle);
    
$languageslist explode(" "$languageslist);
    
sort($languageslist);
    for (
$i=0$i sizeof($languageslist); $i++) {
        if(
$languageslist[$i]!="") {
        echo 
"<option value=\"$languageslist[$i]\" ";
        if(
$languageslist[$i]==$chng_admlanguage) echo "selected";
        echo 
">".ucfirst($languageslist[$i])."</option>\n";
        }
    }
    if (
$chng_admlanguage == "") {
        
$allsel "selected";
    } else {
            
$allsel "";
    }
    echo 
"<option value=\"\" $allsel>" _ALL "</option></select></td></tr>";
    } else {
    echo 
"<input type=\"hidden\" name=\"chng_admlanguage\" value=\"\">";
    }
    echo 
"<tr><td>" _PERMISSIONS ":</td>";
    if (
$row[name] != God) {
    
$result $db->sql_query("SELECT mid, title, admins FROM ".$prefix."_modules ORDER BY title ASC");
    while (
$row $db->sql_fetchrow($result)) {
        
$title ereg_replace("_"" "$row[title]);
        if (
file_exists("modules/$row[title]/admin/index.php") AND file_exists("modules/$row[title]/admin/links.php") AND file_exists("modules/$row[title]/admin/case.php")) {
            
$admins explode(","$row[admins]);
            
$sel "";
            for (
$i=0$i sizeof($admins); $i++) {
                if (
$chng_aid == "$admins[$i]") {
                    
$sel "checked";    
                }
            }
            echo 
"<td><input class=\"boxx\"  type=\"checkbox\" name=\"auth_modules[]\" value=\"$row[mid]\" $sel><span class=\"$sel\">$title</span></td>";
            
$sel "";
            if (
$a == 2) {
                echo 
"</tr><tr><td>&nbsp;</td>";
                
$a 0;
            } else {
                
$a++;
            }
        }
    } 

Si alguno coneze cono soluciones este error para poder poner nombre y Nickname distintos
__________________

diseño web

Última edición por concric; 16/01/2005 a las 13:47
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 18:24.