sono arrivato a questo che però ancora non mi da il risultato richiesto...
Qualcuno mi può dare una mano?
function completto($ffusername) {
global $admin_file,$currentlang,$pointsperview,$user,$gue stviewdetail,
$viewed,$db, $module_name,$userinfo,$bgcolor1,$bgcolor2,$bgcolo r3,$cookie, $sitename, $prefix, $user_prefix, $db, $admin;
$result = $db->sql_query("select sex, birth, degree,oicq,selfintro,stapro,city,postcode,locatio n, object, method,
other, photo, keyword, time, click, song,film, marriage,tel,country,user_occ,havechild, wantchild,drink,smoke,race,photopath,verified,last login,hasvoice,
icq,msn,yahoomess,ip from ".$user_prefix."_user_profile1 where ffusername='$cookie[1]'");
while(list($sex,$birth,$degree,$oicq,$selfintro,$s tapro,$city,
$postcode,$location,$object,$method,$other,$photo, $keyword,
$song,$film,$marriage,$tel,$country,$user_occ,$hav echild,
$wantchild,$drink,$smoke,$race,$photopath,$verifie d,$lastlogin,
$hasvoice,$icq,$msn,$yahoomess) = mysql_fetch_array($result)){
$listadati=("$sex,$birth,$degree,$oicq,$selfintro, $stapro,$city,$postcode,$location,$object,
$method,$other,$photo,$keyword,$song,$film,$marria ge,$tel,$country,$user_occ,
$havechild,$wantchild,$drink,$smoke,$race,$photopa th,$verified,$lastlogin,
$hasvoice,$icq,$msn,$yahoomess");
$percentuale=0;
$contatore=0;
for($i=0;$i>31;$i++){
if($listadati[$i]==NULL OR $listadati[$i]=="" OR $listadati[$i]=="0"){
}else{
$contatore=$contatore++;
}
}
$percentuale=32*$contatore/100;
//ora faccio il calcono della lunghezza dell immagine
$s1=$percentuale*3;
echo "<div id=\"fillbar\"><span style=\"width:".$s1."px\"></span></div><div class=\"filltext\">$percentuale% del profilo completato <span>(<a href=\"modules.php?name=Community&file=modifica_pr ofilo\">
Inserisci altre informazioni</a> )</span></div>";
}
}

Rispondi quotando