1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185
|
<?php
session_start();
function time_p($iTime) { $iTimeDifference = time() - $iTime ; if( $iTimeDifference<0 ) { return; } $iSeconds = $iTimeDifference ; $iMinutes = round( $iTimeDifference/60 ); $iHours = round( $iTimeDifference/3600 ); $iDays = round( $iTimeDifference/86400 ); $iWeeks = round( $iTimeDifference/604800 ); $iMonths = round( $iTimeDifference/2419200 ); $iYears = round( $iTimeDifference/29030400 ); if( $iSeconds<60 ) return 'Il y a ' . $iSeconds . ' seconde' . ( $iSeconds>1 ? 's' : '' ); elseif( $iMinutes<60 ) return 'Il y a ' . $iMinutes . ' minute' . ( $iMinutes>1 ? 's' : '' ); elseif( $iHours<24 ) return 'Il y a ' . $iHours . ' heure' . ( $iHours>1 ? 's' : '' ); elseif( $iDays<2 ) return 'Hier a '.date(H.':'.i,$iTime); else return 'le '.date(d.'/'.m.'/'.Y.' \a '.H.':'.i,$iTime); }
$id_texte = $_GET['id_texte'];
$id_user = $_GET['id_membre'];
require_once('../script/config.php');
mysql_connect("$nom_du_serveur","$nom_utilisateur","$passe"); mysql_select_db("$nom_de_la_base");
$select_all_user = mysql_query("SELECT * FROM membre WHERE id= $id_user");
while($variable_all_user = mysql_fetch_array($select_all_user)) {
$select_photo_user = mysql_query("SELECT * FROM texte WHERE id= $id_texte");
while($variable_photo_user = mysql_fetch_array($select_photo_user)) { $photo_titre ='';
if(!empty($variable_photo_user['titre'])) { $photo_titre = ' | '.$variable_photo_user['titre']; } ?>
<div class="boxtitle">
<div class="fleft">Texte de <?php echo $variable_all_user['nom'].$photo_titre;?> </div>
<div class="fright boxclose" onClick="Lightbox.hide()"></div>
<div class="clear"></div>
</div>
<div class="boxpad">
<div class="mpad"> <b style="color:White; font-size:25px;">
<h1 style="font-size:30px;"><?php echo $variable_photo_user['titre'];?></h1>
</b> <br>
<small><small><small><small><small><small><small><small><small><br>
</small></small></small></small></small></small></small></small></small> <span style="font-size:14px; color:white;"> <?php echo nl2br($variable_photo_user['texte']);?></span><br>
<br>
<b><span style="text-align:right;color:white;">Ajouter <?php echo time_p($variable_photo_user['time']);?></span></b><br>
<br>
</div>
<table style="text-align: left; width: 1px;" border="0" cellpadding="0" cellspacing="5">
<tbody>
<tr>
<td>
<?php $report = $_GET['report'];
if ($report == 'ok') {echo '<table style="border: 1px solid rgb(149, 164, 134); margin-left: auto; margin-right: auto; background-color: rgb(239, 245, 234); color: rgb(61, 102, 17); width: 1px;;" border="0" cellpadding="5" cellspacing="0"> <tbody> <tr> <td style="padding-left: 32px; padding-top: 32px; background-image: url(../img/button/ok.png); background-position: center; background-repeat: no-repeat;"></td> <td style="white-space: nowrap;"><b>Transmits aux moderateurs...</b></td> </tr> </tbody> </table><br>';}
?>
<?php if(isset($_SESSION['login'])) { ?>
<table
style="width: 100%; text-align: left;"
border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr><td>
<table
style="width: 1px; text-align: left;"
border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="rounded-r10-top-left" style="background-image: url(../img/trans/1.png); white-space: nowrap; font-weight: bold; text-align: center;"><big><big>
<?php $id455 = $_SESSION['id'];
$id_s22s22s = $variable_photo_user['id'];
$selec_kiff = mysql_query("SELECT * FROM kiff WHERE id_content = $id_s22s22s && id_membre= $id455 && type= 'texte'");
if (mysql_num_rows($selec_kiff)<1) { ?>
<a onclick="Lightbox.M2('<?php echo 'http://'.$_SERVER['HTTP_HOST'].'/ajax/texte.php?id_texte='.$id_texte.'&id_membre='.$id_membre.'\'';?>);Profile.kiff('<?php echo $variable_photo_user['id'];?>','<?php echo $_SESSION['id'];?>','texte');"style="color:#cccccc;padding:5px 10px;border:0px;font-size:10px;" class="menu-compte-left">Je Kiff</a></big></big></td>
<?php } else { ?>
<a onclick="Lightbox.M2('<?php echo 'http://'.$_SERVER['HTTP_HOST'].'/ajax/texte.php?id_texte='.$id_texte.'&id_membre='.$id_membre.'\'';?>);Profile.kiffnone('<?php echo $variable_photo_user['id'];?>','<?php echo $_SESSION['id'];?>','texte'); "style="color:#cccccc;padding:5px 10px;border:0px;font-size:10px;" class="menu-compte-left">Je Kiff Plus</a>
</big>
</big>
</td>
<?php }
$selec_kiffpas = mysql_query("SELECT * FROM kiffpas WHERE id_content = $id_s22s22s && id_membre= $id455 && type= 'texte'");
if (mysql_num_rows($selec_kiffpas)<1) { ?>
<td style="background-image: url(../img/trans/1.png);white-space: nowrap; font-weight: bold; text-align: center;"><big><big> <a onclick="Lightbox.M2('<?php echo 'http://'.$_SERVER['HTTP_HOST'].'/ajax/texte.php?id_texte='.$id_texte.'&id_membre='.$id_membre.'\'';?>);Profile.kiffpas('<?php echo $variable_photo_user['id'];?>','<?php echo $_SESSION['id'];?>','texte'); " style="color:#cccccc;padding:5px 10px;border:0px;font-size:10px;" class="menu-compte" >Je Kiff Pas</a></big></big></td>
<?php } else { ?>
<td style="background-image: url(../img/trans/1.png);white-space: nowrap; font-weight: bold; text-align: center;"><big><big> <a onclick="Lightbox.M2('<?php echo 'http://'.$_SERVER['HTTP_HOST'].'/ajax/texte.php?id_texte='.$id_texte.'&id_membre='.$id_membre.'\'';?>);Profile.kiffpasnone('<?php echo $variable_photo_user['id'];?>','<?php echo $_SESSION['id'];?>','texte'); " style="color:#cccccc;padding:5px 10px;border:0px;font-size:10px;" class="menu-compte" >Enlever</a></big></big></td>
<?php } ?>
<td class="rounded-r10-top-right"style="background-image: url(../img/trans/1.png);white-space: nowrap; font-weight: bold; text-align: center;"><big><big> <a style="color:#cccccc;padding:5px 10px;border:0px;font-size:10px;" class="menu-compte-right" onclick="Profile.ocomenterfeed('<?php echo $variable_photo_user['id'];?>','texte');">Commenter</a></big></big></td>
</tr>
</tbody>
</table>
</td>
<td><div style="margin-left;5px;">
<table
style="margin-left:auto;margin-right:0px;width: 1px; text-align: left;"
border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="rounded-r10-top-right rounded-r10-top-left" style="background-image: url(../img/trans/1.png);white-space: nowrap; font-weight: bold; text-align: center;"><big><big> <a style="color:#cccccc;padding:5px 10px;border:0px;font-size:10px;" class="menu-compte-right-left" onclick="Profile.ocomrep('<?php echo $variable_photo_user['id'];?>','texte');">Signaler</a></big></big></td>
</tr>
</tbody>
</table></td>
</tr> </tbody>
</table>
<?php } ?>
<div id="boxcomrep_<?php echo $variable_photo_user['id'];?>_texte" style="display: none; width: 300px; position: absolute; margin-top:-92px; margin-left:-21px;">
<div class="clear"></div>
<div class="minibox">
<div class="center small-txt bold">Es-tu sur de vouloir reporter un abus ? </div>
<div class="spadtop center"> <span class="input-bleu2">
<input class="button-bleu2" onclick="Lightbox.M2('<?php echo 'http://'.$_SERVER['HTTP_HOST'].'/ajax/texte.php?id_texte='.$id_texte.'&id_membre='.$id_membre.'&report=ok\'';?>);Profile.comrep('<?php echo $variable_photo_user['id'];?>','<?php echo $_SESSION['id'];?>','texte')" value="Signaler" type="button">
</span> <span class="input-gris">
<input class="button-gris" onclick="Profile.ocomrep('<?php echo $variable_photo_user['id'];?>','texte');" value="Annuler" type="button">
</span> </div>
</div>
<div class="fright tip2"></div>
</div>
<div class="clear"> </div>
<table class="rounded-r3-bottom" style="background-image: url(../img/trans/1.png); text-align: left; width: 100%;" border="0" cellpadding="5" cellspacing="5">
<tbody>
<tr>
<td colspan="1" rowspan="2" style="vertical-align: top;"><?php
$id_photo_membre = $variable_all_user['avatar'];
$h654564t = mysql_query("SELECT * FROM img WHERE id= $id_photo_membre");
while($rr54g567r = mysql_fetch_array($h654564t)) {
$source = 'http://'.$_SERVER['HTTP_HOST'].'/img/photo/h/'.$rr54g567r[url].'.jpg';
$size= getimagesize($source); $w = $size[0]; $h = $size[1]; if ($w/$h >= 2) { $w_size = 'width: 100px;';
$h_size = ''; } elseif ($w/$h > 1.2 && $w/$h < 2) { $w_size = ''; $h_size = 'height: 110px;'; }
else { $w_size = ''; $h_size = 'height: 180px;'; }
echo ' <img style="'.$h_size.$w_size.' padding:5px; background-color: white;" class="avatar" src="http://'.$_SERVER['HTTP_HOST'].'/img/photo/h/'.$rr54g567r[url].'.jpg" />'; } ?></td>
</td>
<td style="vertical-align: top;"><table>
<tbody>
<tr>
<td><big><big><big><big><big><b style="color: white;"><?php echo $variable_all_user['nom']; ?></b></big></big></big></big></big></td>
</tr>
<tr>
<td style="white-space: nowrap;"><big><big><b style="color: white;">
<?php $select_all_photo_user = mysql_query("SELECT * FROM texte WHERE id_membre= $id_user");
$nbr_photo = mysql_num_rows($select_all_photo_user); echo $nbr_photo;?>
Texte</b></big></big></td>
</tr>
<tr>
<td style="text-align: center;"><?php if(isset($_SESSION['login'])) { ?>
<div style="margin-top: 10px;"><big><big><b><a class="album_photo" href="http://<?php echo $_SERVER['HTTP_HOST']; ?>/profile.php?id=<?php echo $variable_all_user['id']; ?>&page=texte">Voir
Tous</a></b></big></big></div>
<?php } ?></td>
</tr>
</tbody>
</table></td>
</tr>
</tbody>
</table>
<table text-align: left; width: 100%;" border="0" cellpadding="5" cellspacing="0">
<tbody>
<tr>
<td><?php ?></td>
</tr>
</tbody>
</table>
</td>
<td style="vertical-align: top;"><?php
echo '<table style="color:white;margin-left:auto;margin-right:auto;text-align: left; width: 335px;" border="0" cellpadding="5" cellspacing="0"><tbody>';
$select_texte1 = mysql_query("SELECT * FROM texte WHERE id_membre = $id_user ORDER by id DESC");
while($v_texte = mysql_fetch_array($select_texte1)) {
$titre = $v_texte['titre'];
$texte = $v_texte['texte'];
$time = $v_texte['time'];
$max_caracteres=150;
if (strlen($texte)>$max_caracteres)
{
$texte = substr($texte, 0, $max_caracteres);
$position_espace = strrpos($texte, " ");
$texte = substr($texte, 0, $position_espace);
$texte = $texte."...";
}
echo '
<tr>
<td
style="font-size:15px;vertical-align:top;white-space: nowrap;"><b>
'; if(isset($_SESSION['login'])) { echo '<a onclick="Lightbox.M2(\'http://'.$_SERVER['HTTP_HOST'].'/ajax/texte.php?id_texte='.$id_texte.'&id_membre='.$id_membre.'\')">'; } echo $titre.'</a></b></td>
<td style="vertical-align:midle;color:grey;white-space: nowrap; text-align:right;">'.time_p($time).'</td>
</tr>
<tr><td colspan="2" rowspan="1" style="color:white;vertical-align:top;">'.$texte.'</td>
</tr>
<tr><td colspan="2" rowspan="1"
style="border-bottom:1px solid grey;"></td></tr>';
}
echo '</tbody></table>'; ?></td>
</tr>
</tbody>
</table>
</div>
<?php } }?> |
Partager