Сирожиддин
JohnCMS scriptida ma'lumotlarni bosh sahifaga chiqarish haqida.
  1. echo '<div class="phdr">So\'ngi a\'zolar</div>';
  2. $oxirgi = mysql_query("SELECT * FROM `users` ORDER BY `datereg` DESC LIMIT 2");
  3. while ($uka = mysql_fetch_assoc($oxirgi)) {
  4. echo '<div class="menu">';
  5. $yosh = date("Y") - $uka['yearofbirth'];
  6. if ($uka['sex'])
  7. echo functions::image(($uka['sex'] == 'm' ? 'm' : 'w') . ($uka['datereg'] > time() - 86400 ? '_new' : '') . '.png', array('class' => 'icon-inline'));
  8. echo '<a href="/users/profile.php?user='.$uka['id'].'"> '.$uka['name'].'</a>';
  9. echo '<br/>'.$yosh.' yosh, '.$uka['live'];
  10. echo '</div>';
  11. }

Bunda johncmsni off scriptidagi baza bilan ishlaydi yani shaxarga shaxar yozsa chiqadi tug'ilgan yilini yozsa yoshi chiqadi aks holda 2017 turadi!