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)
Komentowanie pobieranych plikow • programosy.pl

  • Ogłoszenie:

Komentowanie pobieranych plikow

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

Komentowanie pobieranych plikow

Postprzez Darom 15 Sty 2011, 22:29

reklama
W jaki sposob na mojej stronce: http://www.history.is.net.pl/?download&cat=0 zrobić mozliwośc komentowania pobieranych plików ?
Tak jak jest to tutaj zrobione: http://www.phpbbhelp.pl/archiwum/download.php?d=585
Pisze pogrubionym czarnym komentarze (ilość komentarzy) i jest tam widoczna taka belka, ze kazdy komentarz w innej tabelce.
Jak takie cos zrobic u mnie na stronce ? Fajnie by było na pliku txt.

Jesli chodzi o te komentarze w tabelce to udalo mi sie przygotowac tylko cos takiego:
Kod: Zaznacz wszystko
<fieldset style="border:1px solid #DADADA; border-bottom:none; padding:0; margin:0;">
<legend> <font color="#0033cc"> <b>Komentarze</b> </font></legend>
<strong>   {author}</strong> ({date}) <b>napisał(a)</b>
<p style="padding:2px; background-color:#ECEEEE">{comment}</p>
</fieldset>

I teraz reszte kodu niewiem jak napisac. Ale chcialbym miec to zrobione na pliku txt.
Moglbym to zrobic tak, ze w pliku add.php (plik dodaj.php juz mam na serwerze) zrobilbym tak:
Kod: Zaznacz wszystko
<script>

function walidacja(thi)
{
   var blad = false;
   var wzor = /\s/g;

   if(thi.nick.value.replace(wzor, "").length == 0)
      blad = true;
   if(thi.pole.value.replace(wzor, "").length == 0)
      blad = true;     
       
   if(blad)
      document.getElementById('blad').innerHTML = "&nbsp; &nbsp;» Prosze wypełnić wszystkie pola !"
   else
      thi.submit();   
}

</script>

<div class="news">
   <form method="post" class="formularz" action="send.php?id=<? echo $_GET['id']; ?>" onsubmit="walidacja(this);return false;"><br />
      <p>
         &nbsp; &nbsp;Komentarz<br>
         &nbsp; &nbsp;<textarea name="pole" cols="42" rows="6" style="background-color:#FFCCFF;"></textarea>
      </p>
      <p>
         &nbsp; &nbsp;Podpis<br>
         &nbsp; &nbsp;<input type="text" name="nick" size="54" style="background-color:#FFCCFF;">
      </p>
      <div style="text-align:left;padding:4px;">
         <input type="hidden" name="action" value="1">
         &nbsp; <input type="submit" value="Send">
      </div>
   </form>
   <div id="blad" style="color:#ff0000;font-weight:bold;"></div>
</div>


<?php

if(isset($_POST['action']) && $_POST['action']==1)
echo <<< SER
      Nick: {$_POST['nick']}<br>
      Komentarz: {$_POST['pole']}
SER;

?>

W pliku send.php (plik wyslij.php juz mam na serwerze) zrobilbym tak:
Kod: Zaznacz wszystko
<?php
if ($_GET['wyslano']!=1) {
if(empty($_POST['nick']) || empty($_POST['mail']) || empty($_POST['www']) || empty($_POST['temat']) || empty($_POST['pole'])) {
header('Location:  http://www.history.is.net.pl/?news&id='.$_GET['id'].'&wyslano=1');
}
$nick = $_POST['nick'];
$mail = $_POST['mail'];
$www = $_POST['www'];
$temat = $_POST['temat'];
$pole = $_POST['pole'];
$nick  = HTMLSpecialChars($nick);
$mail  = HTMLSpecialChars($mail);
$www  = HTMLSpecialChars($www);
$temat  = HTMLSpecialChars($temat);
$pole  = HTMLSpecialChars($pole);
$datanow = date("d.m.Y H:i");
$wynik = $datanow . '|||' . $nick .'|||'. $mail . '|||' . $www . '|||' . $temat . '|||' . $pole . "\n";
$plik = 'comments/'.$_GET['id'].'.txt';
$fp = fopen($plik, "a");
fwrite ($fp, $wynik);
fclose($fp);
}
?>

W pliku show.php (plik pokaz.php juz mam na serwerze) zrobilbym tak:
Kod: Zaznacz wszystko
<?php
if (!file_exists('comments/'.$_GET['id'].'.txt'))
{
    file_put_contents('comments/'.$_GET['id'].'.txt', '');
    chmod('comments/'.$_GET['id'].'.txt', 0777);
}
   
$file = file('comments/'.$_GET['id'].'.txt'); rsort($file); $file = file('comments/'.$_GET['id'].'.txt'); $file = array_reverse($file);
foreach($file as $key => $value)
{
   $data = explode('|||', $value);

   echo '<span style="color: #222222"><b>'. $data[0] . ' | </b></span><span style="color: #E74100"><b>' . $data[1] .'</b></span><br />';
   $tresc = $data[5];
   echo ''. $tresc .'<br>';
}
?>

W pliku download.php dac to:
Kod: Zaznacz wszystko
<?php
$comments=0;
$file = file('comments/'.$_GET['id'].'.txt'); rsort($file); $file = file('comments/'.$_GET['id'].'.txt'); $file = array_reverse($file);
foreach($file as $key => $value)
{
$comments++;
}
?>
<fieldset style="border:1px solid #DADADA; border-bottom:none; padding:0; margin:0;">
<legend> <font color="#0033cc"> <b>Komentarze (<?=$comments?>)</b> </font></legend>
<strong>   {author}</strong> ({date}) <b>napisał(a)</b>
<p style="padding:2px; background-color:#ECEEEE">{comment}</p>
</fieldset>
<div style="display:none;" id="show1"><?
include("show.php");
?></div>
<div style="display:none;" id="add1"><?
if($_GET['wyslano']==1) echo '<p style="text-align: center"><span style="color:#ff0000;">» Ten program już był komentowany !</span></p>'; else include("add.php");
?></div>

Czy dobrze to robie ? Pliki w nawiasach z polska nazwa mam juz na serwerze do innego komentowania na mojej stronce.
Czy jesli jest cos nie tak to moglby mi ktos poprawic te kody na takie, zeby bylo tak jak chce miec w dziale download ? Bardzo prosze Was 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: Brak zarejestrowanych użytkowników oraz 1 gość