accounts.php 1007 B

1234567891011121314151617181920212223242526272829303132
  1. <?
  2. if (!$logged_me_in_successfully234)
  3. return;
  4. echo "<form id='form1' name='form1' method='post'>";
  5. PrintAccs();
  6. echo "<input type='submit' value='Применить изменения'>";
  7. echo "</form>
  8. ";
  9. function PrintAccs()
  10. {
  11. global $link;
  12. $query1 = mysqli_query($link,"select * from accounts");
  13. while ($res1 = mysqli_fetch_array($query1))
  14. {
  15. $id = $res1['id'];
  16. $name = $res1['name'];
  17. $active = $res1['active'];
  18. $login = $res1['login'];
  19. $email = $res1['email']==NULL ? "-": $res1['email'];;
  20. $skype = $res1['skype']==NULL ? "-": $res1['skype'];
  21. $phone = $res1['phone']==NULL ? "-": $res1['phone'];;
  22. $tag = "fail";
  23. if (intval($active==1) || intval($active==6))
  24. $tag = "success";
  25. echo "<b><$tag>$id:</$tag></b> $name [$login] <b>E-mail:</b> <a href='mailto:$email'>$email</a> <b>Skype:</b> $skype <b>Телефон:</b> $phone";
  26. echo "<br>";
  27. }
  28. }
  29. ?>