Strict Standards: Non-static method utf_normalizer::nfkc() should not be called statically in /home/mati/domains/forum.programosy.pl/public_html/includes/utf/utf_tools.php on line 1663

Strict Standards: Non-static method utf_normalizer::nfkc() should not be called statically in /home/mati/domains/forum.programosy.pl/public_html/includes/utf/utf_tools.php on line 1663

Strict Standards: Non-static method utf_normalizer::nfkc() should not be called statically in /home/mati/domains/forum.programosy.pl/public_html/includes/utf/utf_tools.php on line 1663

Strict Standards: Non-static method utf_normalizer::nfkc() should not be called statically in /home/mati/domains/forum.programosy.pl/public_html/includes/utf/utf_tools.php on line 1663

Strict Standards: Non-static method utf_normalizer::nfkc() should not be called statically in /home/mati/domains/forum.programosy.pl/public_html/includes/utf/utf_tools.php on line 1663

Strict Standards: Non-static method utf_normalizer::nfkc() should not be called statically in /home/mati/domains/forum.programosy.pl/public_html/includes/utf/utf_tools.php on line 1663

Strict Standards: Non-static method utf_normalizer::nfkc() should not be called statically in /home/mati/domains/forum.programosy.pl/public_html/includes/utf/utf_tools.php on line 1663

Strict Standards: Non-static method utf_normalizer::nfkc() should not be called statically in /home/mati/domains/forum.programosy.pl/public_html/includes/utf/utf_tools.php on line 1663

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 112

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 27

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 28

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 29

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 30

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 31

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 32

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 33

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 35

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 36

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 37

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 38

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 39

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 40

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 41

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 42

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 43

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 44

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 45

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 47

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 48

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 49

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 50

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 51

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 52

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 53

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 54

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 55

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 56

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 80

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 81

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 82

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 83

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 84

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 85

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 86

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 87

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 88

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 89

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 90

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 91

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 92

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 93

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 94

Strict Standards: Non-static method utf_normalizer::nfkc() should not be called statically in /home/mati/domains/forum.programosy.pl/public_html/includes/utf/utf_tools.php on line 1663
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3900: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:483)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3902: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:483)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3903: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:483)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3904: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:483)
Graficzne wyświetlanie ua przeglądarek w komentarzach • programosy.pl

  • Ogłoszenie:

Graficzne wyświetlanie ua przeglądarek w komentarzach

Wszystko odnośnie tworzenia grafiki - obróbka, problemy, oceny.
Tworzenia Stron internetowych - HTML, PHP, MySQL...

Graficzne wyświetlanie ua przeglądarek w komentarzach

Postprzez Darom 03 Lut 2011, 14:12

reklama
W moich komentarzach na stronie jest wyswietlane tesktowe UA przeglądarek: http://www.history.is.net.pl/index.php?download&cat=0&appage=1
Kod: Zaznacz wszystko
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; AskTB5.5)

W jaki sposób można przerobić to, żeby wyświetlały sie graficzne UA przeglądarek ? Czyli jeśli ktos napisze komentarz na mojej stronce z przeglądarki Mozilla FireFox to pod tym niebieskim tłem z komentarzem tak po prawej stronie będzie umieszczona taka ikonka: Image Image
A jeśli z przeglądarki innej będzie napisany komentarz i inny system windows np. z przeglądarki IE to takie ikonki Image Image
I tak dalej, mam nadzieje że wiecie o co mi chodzi. Jak moje tekstowe UA komentarzy przerobić na graficzne UA ?
send.php
Kod: Zaznacz wszystko
<?php

// send.php

// check if argument 'id' is there
if(empty($_GET['id']))
{
$id = 'default';
}
else
{
$id = $_GET['id'];
}

// comment files location
$localization = "data/comments/";
// comment files extensions
$file_extension = ".txt";

//
// Comment content - start
//

// change HTML special chars in to properly (safe) form
// protect beware sending code via comments
$nickTestowy = preg_replace("/(\s+)/","",htmlspecialchars($_POST['nick']));
$wpisTestowy = preg_replace("/(\s+)/","",htmlspecialchars($_POST['comment']));

//
// Comment content - end
//

//
// Check - start
//

// Simple solution to don't publish empty comments

if(empty($wpisTestowy))
   die("<div id='special'>
   <p style='text-align:center; color: #ff0000;font-weight:bold;'>
      Zamieszczanie pustych komentarzy jest zabronione.
   </p>

   <p style='text-align:center; color: #003366;'>
      Kliknij <a href='{$_SERVER['HTTP_REFERER']}'>Tutaj</a>, aby wrócić do komentarzy
   </p>
</div>");

$nick = (empty($nickTestowy))? "Anonymous" : str_replace("\r\n", "<br/>", htmlspecialchars(trim($_POST['nick']))) ;
$comment = str_replace("\r\n", "<br/>", htmlspecialchars(trim($_POST['comment'])));

//
// Check - end
//

//
// COOKIE - start
//

// Simple anti-spam solution

// cookie name
$cookie_name = 'comment';
// cookie value
$cookie_value = '1';
// when cookie will expire
// 60 seconds
$cookie_expire = time()+60;

// setcookie(name, value, expire, path, domain);

// check if there is cookie now
if (isset($_COOKIE[$cookie_name]))
{
   // show information to wait before adding next comment
   echo "<div id='special'>
   <p style='text-align:center; color: #003366;font-weight:bold;'>
      Dodano Twój komentarz.
   </p>

   <p style='text-align:center; color: #003366;'>
      Kliknij <a href='{$_SERVER['HTTP_REFERER']}'>Tutaj</a>, aby wrócić do komentarzy
   </p>
</div>
";
   die();
}
/* // update - cookie is now created when comment is sucessfully added
else
{
   // create cookie file to protect against spam
   setcookie($cookie_name, $cookie_value, $cookie_expire);
}
*/


//
// COOKIE - end
//

//

// date and time of comment
$date_and_time = date("d.m.Y H:i");

// user identification
$user_ip = $_SERVER['REMOTE_ADDR'];
$user_ua = $_SERVER['HTTP_USER_AGENT'];

// place between content in flat-file
$PLACE = '|||';

// end of the line in flat-file
$line_end = "\n";

// exported line to flat-file
$result = $date_and_time.$PLACE.$user_ip.$PLACE.$user_ua.$PLACE.$nick.$PLACE.$comment.$line_end;

// directory and name of flat-file
$file = $localization.$id.$file_extension;

// opening flat-file in 'add' mode
$file_handle = fopen($file, "a");

// write '$result' in to the flat-file
fwrite ($file_handle, $result);

// close the flat file and report result
if(fclose($file_handle))
{
// COOKIE
   // create cookie file to protect against spam
   setcookie($cookie_name, $cookie_value, $cookie_expire);
   
// STATUS
   // show that comment was sucessfully added
   echo "<div id='special'>
   <p style='text-align:center; color: #003366;font-weight:bold;'>
      Dodano Twój komentarz.
   </p>

   <p style='text-align:center; color: #003366;'>
      Kliknij <a href='{$_SERVER['HTTP_REFERER']}'>Tutaj</a>, aby wrócić do komentarzy
   </p>
</div>
";
}
else
{
   // show that there was an error while adding comment
   echo "<div id='special'>
   <p style='text-align:center; color: #ff0000;font-weight:bold;'>
      Wystąpił błąd podczas dodawania komentarza, spróbuj następnym razem.
   </p>

   <p style='text-align:center; color: #003366;'>
      Kliknij <a href='{$_SERVER['HTTP_REFERER']}'>Tutaj</a>, aby wrócić do komentarzy
   </p>
</div>
";
}

// send.php

?>

show.php
Kod: Zaznacz wszystko
<?php

// show.php

// check if argument 'id' is there
if(!isset($_GET['appage']))
{
$id = 'default';
}
else
{
$id = $_GET['cat'].$_GET['appage'];
}

// comment files location
$localization = "data/comments/";
// comment files extensions
$file_extension = ".txt";

// check if file exist, if no create
if (!file_exists($localization.$id.$file_extension))
{
   file_put_contents($localization.$id.$file_extension, '');
   chmod($localization.$id.$file_extension, 0777);
}

// load file to array
$file = file($localization.$id.$file_extension);
// reverse array order
$file = array_reverse($file);

// count number of comments
$number_of_comments = count($file);


?>

<fieldset style='border:1px solid #4684C1; margin:10px 0 20px 0;'>

<?php

// <fieldset style='border:1px solid #4684C1; margin:30px 0 20px 0;'>

echo "<legend style='font-weight:bold;'>Komentarze ($number_of_comments)</legend>
";

// check if there is any comment
if($number_of_comments == 0)
{
   echo "<div align='center'><p style='background-color:#86AED7'><b>Brak komentarzy</b></p></div>
";
}
else
{
   // variable counting loop moves
   $loop_counter = 1;
   
   // loop for each line in file
   foreach($file as $key => $value)
   {
      // load line of file in to '$data' array
      $data = explode('|||', $value);
      
      // load array fields in to variables
      $comment_data = $data[0];
      // $comment_ip = $data[1];
      $comment_ua = $data[2];
      $comment_nick = $data[3];   
      $comment_content = $data[4];
      
      // check if it is last loop move
      if($loop_counter < $number_of_comments)
      {
         // echo "<div style='padding:12px; border-bottom:1px solid #4684C1;'>";
         echo "<div style='padding:6px; border-bottom:1px solid #4684C1;'>
";
      }
      else
      {
         echo "<div style='padding:6px; border-bottom:none solid #4684C1;'>
";
      }
      
      //
      // show comment
      //
      echo "<b><span style='color: #003366'>~$comment_nick</span> ($comment_data) napisał:</b><br/>
<span style='font-size:xx-small;'>User Agent: $comment_ua</span>
<p style='padding:2px; background-color:#86AED7'>$comment_content<br/></p>
</div>
";
      
      // add '1' to loop counter variable
      $loop_counter = $loop_counter + 1;
   }
}

?>

</fieldset>



<?php
include('./add.php');
//


// show.php

?>

Bardzo prosze o pomoc w tej sprawie.
Darom
~user
 
Posty: 663
Dołączenie: 23 Sie 2008, 18:00
Miejscowość: Tarnów/Kraków



Powróć do Grafika & Webmastering

Kto jest na forum

Użytkownicy przeglądający to forum: vahamo oraz 1 gość