Ver Mensaje Individual
  #1 (permalink)  
Antiguo 03/04/2008, 07:27
Avatar de agressor
agressor
 
Fecha de Ingreso: noviembre-2007
Ubicación: Knocking the Death Door..
Mensajes: 368
Antigüedad: 16 años, 5 meses
Puntos: 3
Pregunta Barras de Respeto en PHP

Hola amigos tiempo sin aportar.. Les traigo un problema que me tiene de cabeza en una pagina web tengo 3 barras una de respeto, una de Chakra y una de Experiencia funcionan las ultimas menos la de respeto y no se por que sera ya que he revisado y no encuentro el error.

En el codigo php lo he hecho para que trabaje en base a segundos ... y con lo de respecto a lo que se necesita para elevar el respeto es así:

* usuarios conectados con mas de 25 dias tenga un 100% de rerspeto
* usuarios conectados con mas de 20 días tenga un 80% de respeto
* usuarios conectados con mas de 15 dias conectado al foro tenga un 60% de respeto
* usuarios conectados mas de 7 dias tenga un 30% de respeto
* usuarios conectados mas de 3 dias tenga un 15% de respeto
* usuarios conectados mas de 1 dias tenga un 5% de respeto
* usuarios conectados al foro con menos de 1 dia tengan 1% de respeto

Espero me puedan ayudar..

Salu2..!



$sira = ($message['member']['id'])-1 ;

$sorgu = mysql_query("select * from smf_members");
$sonuc = mysql_result($sorgu, $sira, 'totalTimeLoggedIn');// Este es en segundos
$aktiflik=($sonuc)/25000;
if ($aktiflik<1) {
$aktiflik=1;
}
if ($aktiflik>101){
$aktiflik=101;
}
$seviyesi=($message['member']['karma']['good'] - $message['member']['karma']['bad'])/100;
if ($seviyesi<1) {
$seviyesi=1;
}
if ($seviyesi>101) {
$seviyesi=101;
}
$deneyimi=($message['member']['posts'])/100;
if ($deneyimi<1){
$deneyimi=1;
}
if ($deneyimi>101) {
$deneyimi=101;
}

echo '
<TABLE cellSpacing=0 cellPadding=0 width="114" border=0>
<TABLE cellSpacing=0 cellPadding=0 width="114" border=0>
Respeto <br>
<tr>
<TD class=nopad width=3 height=13>
<IMG height=13 alt="" src="', $settings['images_url'], '/img_left.gif" width=3>
</TD>
<td colspan="2" style="BACKGROUND: url(', $settings['images_url'], '/img_backing.gif) repeat-x left top; LINE-HEIGHT: 13px" width=114 height=13>
<IMG height="11" src="', $settings['images_url'], '/bhg.gif" width="', $aktiflik, '"><IMG height="9" src="', $settings['images_url'], '/exp.gif" width="2">
</td>
<TD class=nopad width=3 height=13>
<IMG height=13 alt="" src="', $settings['images_url'], '/img_right.gif" width=3>
</TD>
</tr>
</table>
<TABLE cellSpacing=0 cellPadding=0 width="114" border=0>
Experiencia <br>
<tr>
<TD class=nopad width=3 height=13>
<IMG height=13 alt="" src="', $settings['images_url'], '/img_left.gif" width=3>
</TD>
<td colspan="2" style="BACKGROUND: url(', $settings['images_url'], '/img_backing.gif) repeat-x left top; LINE-HEIGHT: 13px" width=114 height=13>
<IMG height="11" src="', $settings['images_url'], '/bmg.gif" width="', $deneyimi, '">
<IMG height="9" src="', $settings['images_url'], '/exp.gif" width="2">
</td>
<TD class=nopad width=3 height=13>
<IMG height=13 alt="" src="', $settings['images_url'], '/img_right.gif" width=3>
</TD>
</tr>
</table>
<TABLE cellSpacing=0 cellPadding=0 width="114" border=0>
Chakra<br>
<tr>
<TD class=nopad width=3 height=13>
<IMG height=13 alt="" src="', $settings['images_url'], '/img_left.gif" width=3>
</TD>
<td colspan="2" style="BACKGROUND: url(', $settings['images_url'], '/img_backing.gif) repeat-x left top; LINE-HEIGHT: 13px" width=114 height=13>
<IMG height="11" src="', $settings['images_url'], '/bxg.gif" width="', $seviyesi, '">
<IMG height="9" src="', $settings['images_url'], '/hp.gif" width="2">
</td>
<TD class=nopad width=3 height=13>
<IMG height=13 alt="" src="', $settings['images_url'], '/img_right.gif" width=3>
</TD>
</tr>
</table>
';
__________________
Somos lo que nosotros queremos ni mas ni menos..
No hay dia mas perdido que aquel en que no hemos reido..
La vida es tal y como debe ser...
Nadie vivira por ti...