Foros del Web » Programando para Internet » PHP »

ver este codigo

Estas en el tema de ver este codigo en el foro de PHP en Foros del Web. Código PHP: include( './functions.php' );  $s [ back ] =  getenv ( 'HTTP_REFERER' ); if (! $s [ back ])  $s [ back ] =  $s [ after_url ]; if ( ...
  #1 (permalink)  
Antiguo 07/04/2006, 09:23
 
Fecha de Ingreso: junio-2003
Ubicación: Frente al monitor
Mensajes: 508
Antigüedad: 20 años, 10 meses
Puntos: 0
ver este codigo

Código PHP:
include('./functions.php'); $s[back] = getenv('HTTP_REFERER'); if (!$s[back]) $s[back] = $s[after_url]; if ($_GET[action]=='vote'vote($_GET); show_poll();

##################################################################################

function vote($data) { global $s$a $_COOKIE[EP_vote][$data[number]]; if ($a) { header ("Location: $s[back]"); exit; } 
setcookie ("EP_vote[$data[number]]",1,time()+2592000);
dq("update $s[tblname] set n$data[a] = n$data[a]+1 where number = '$data[number]' and active = '1'",1); $q dq("select n1,n2,n3,n4,n5 from $s[tblname] where number = '$data[number]' AND active='1'",1);
$d mysql_fetch_assoc($q); $total $d[n1]+$d[n2]+$d[n3]+$d[n4]+$d[n5]; $max max($d[n1],$d[n2],$d[n3],$d[n4],$d[n5]);
if (
$max>0) { for ($x=1;$x<=5;$x++) { $size[$x] = ($d["n$x"]/$max)*100; if ($size[$x]<1$size[$x] = 0; } } else $size[1] = $size[2] = $size[3] = $size[4] = $size[5] = 1;
$q dq("update $s[tblname] set p1 = '$size[1]', p2 = '$size[2]', p3 = '$size[3]', p4 = '$size[4]', p5 = '$size[5]', votes = $total where number = $data[number] and active = 1",1); header ("Location: $s[back]"); exit; }

function 
show_poll() { global $s$q dq("select number,question,votes,a1,a2,a3,a4,a5,n1,n2,n3,n4,n5,p1,p2,p3,p4,p5 from $s[tblname] where active=1",1); $data mysql_fetch_assoc($q); 
if (!
$data[number]) return false;
for (
$x=1;$x<=5;$x++) { if ($data["a$x"]) { $w $data["p$x"]+1$data["a$x"] = "<a href=\\\"$s[phpurl]/poll.php?action=vote&number=$data[number]&a=$x\\\"><img border=0 src=\\\"$s[phpurl]/poll.jpg\\\" width=$w height=18><br><font color=\\\"gray\\\" size=\\\"1\\\" face=\\\"Verdana,arial\\\">".$data["a$x"]." (".$data["n$x"]." votes)</font></a><br>"; } } parsejava("$s[phppath]/data/template.txt",$data); }
function 
parsejava($template$value) { global $s$fh fopen("$template",'r'); $r 'document.write("'.eregi_replace('"','\\"',base64_decode($s[phprath]).base64_decode($s[phpruth]).'<span style="font-size:8pt;">'.base64_decode($s[kun]).'</span>'.base64_decode('PC9hPjxicj4=')).'");';
while (!
feof($fh)) { $line trim(fgets($fh,4096)); $line strip_replace_once($line); $line ereg_replace('"','\"',$line); $lines .= "document.write(\"$line\");\n"; } fclose ($fh);
while (list(
$key,$val) = each($value)) $lines str_replace("#%$key%#",$val,$lines); reset ($value); $lines eregi_replace("#%[a-z0-9_]*%#",'',$lines.$r); echo "\n$lines"; }

##################################################################################

?> 
En ese codigo hay un link, no he podido verlo, alguien me dice donde esta?
__________________
Tengo una duda...
  #2 (permalink)  
Antiguo 07/04/2006, 09:42
Avatar de asinox  
Fecha de Ingreso: enero-2002
Ubicación: Santo Domingo
Mensajes: 2.712
Antigüedad: 22 años, 2 meses
Puntos: 6
de abajo para arriba la linea 4 :
Código PHP:
"<a href=\\\"$s[phpurl]/poll.php?action=vote&number=$data[number]&a=$x\\\"><img border=0 src=\\\"$s[phpurl]/poll.jpg\\\" width=$w height=18><br><font color=\\\"gray\\\" size=\\\"1\\\" face=\\\"Verdana,arial\\\">".$data["a$x"]." (".$data["n$x"]." votes)</font></a> 
__________________
www.dataautos.com
  #3 (permalink)  
Antiguo 07/04/2006, 14:24
 
Fecha de Ingreso: junio-2003
Ubicación: Frente al monitor
Mensajes: 508
Antigüedad: 20 años, 10 meses
Puntos: 0
nooo, ese es el link para la opcion de voto, creo...
__________________
Tengo una duda...
  #4 (permalink)  
Antiguo 08/04/2006, 23:35
Avatar de asinox  
Fecha de Ingreso: enero-2002
Ubicación: Santo Domingo
Mensajes: 2.712
Antigüedad: 22 años, 2 meses
Puntos: 6
es el unico que existe
__________________
www.dataautos.com
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 20:44.