Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] Znikający przycisk
desavil
post 29.08.2009, 16:43:52
Post #1





Grupa: Zarejestrowani
Postów: 339
Pomógł: 3
Dołączył: 15.10.2008
Skąd: Internet

Ostrzeżenie: (0%)
-----


Witam mam taki oto skrypt:
  1. <?
  2. $file="jakis_program";
  3. $sciezka="/home/folder/";
  4. ?>
  5. <div align="center">
  6. <table border="0" width="198" cellspacing="0" cellpadding="0" id="table1">
  7. <tr>
  8. <td width="57"><a href="panel.php?p=serw&s=start">
  9. <img border="0" src="../images/img_panel/start.gif" width="57" height="43"></a></td>
  10. <td>&nbsp;</td>
  11. <td width="29"><a href="panel.php?p=serw&s=reset">
  12. <img border="0" src="../images/img_panel/reset.gif" width="57" height="43"></a></td>
  13. <td width="14">&nbsp;</td>
  14. <td width="14"><a href="panel.php?p=serw&s=stop">
  15. <img border="0" src="../images/img_panel/stop.gif" width="57" height="43"></a></td>
  16. </tr>
  17. </table>
  18. </div>
  19. <p>
  20. <?
  21.  
  22. if ($s=='stop')
  23. {
  24. system('kill -9 $(ps auxwww | grep -v grep | grep '.$file.' | awk \'{print $2}\')');
  25. }
  26. if ($s=='reset')
  27. {
  28. system('kill -CONT $(ps auxwww | grep -v grep | grep '.$file.' | awk \'{print $2}\')');
  29. }
  30.  
  31. if ($s=='start')
  32. {
  33. $adres=$sciezka.$file.' &';
  34. system($adres);
  35. }
  36. ?>


Jak zrobić, żeby był widoczny tylko przycisk start gdy program jest wyłączony, a jak zrobić żeby były widoczne tylko przyciski restart oraz stop gdy serwer jest włączony??

Pozdrawiam,


--------------------
"Nie ma głupich pytań, są tylko głupie odpowiedzi."
Pomogłem?? Kliknij "Pomógł" :) Dzięki!
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 31.07.2025 - 10:55