sayed Posted March 29, 2005 Report Share Posted March 29, 2005 (edited) <? function chk($txt,$nick) { $b=false; $f=file("cb_db.php"); for ($i=count($f);$i>=count($f)-15;$i--) { if ($i>0 && $i<count($f)) { $dati=explode("tesadalaas",$f[$i]); if ($txt==substr($dati[2],0,strlen($dati[2])-1) && $nick==$dati[1]) $b=true; } } return $b; } if (isset($txt) && chk($txt,$nick)==false && isset($nick) && $nick!=null && $txt!=null) { $f=fopen("cb_db.php","a+"); fputs($f,date("H:i")."tesadalaas".$nick."tesadalaas".$txt."\n"); fclose($f); } $f=file("cb_db.php"); for ($i=count($f);$i>=count($f)-15;$i--) { if ($i>0 && $i<count($f)) { $dati=explode("tesadalaas",$f[$i]); $dati[2] = wordwrap($dati[2],18,' ',1); $dati[1] = wordwrap($dati[1],10,' ',1); echo $dati[0].":<b>".htmlspecialchars($dati[1])."</b> - ".htmlspecialchars($dati[2])."<br/>"; } } ?> kas te ir jaizlabo lai ievadito txt atdala ar atstarpi! Edited March 29, 2005 by sayed Link to comment Share on other sites More sharing options...
bubu Posted March 29, 2005 Report Share Posted March 29, 2005 A kurā vietā vajag atstarpi? Link to comment Share on other sites More sharing options...
sayed Posted March 29, 2005 Author Report Share Posted March 29, 2005 A kurā vietā vajag atstarpi? 15707[/snapback] ieliekot zinju viss izskatas sitaa: 05:53:H-C - Njaa tikai viena problema es neatceros kaa izskatiajs vecais chatbox 05:50:H-C - OK, tiks izdariits! 22:46:algorithm - un atstarpes moz usliec savaadaak viss txt sapluust kopaa bet gribetos kaut kaa smuki atdalit vinu no otras zinas! Link to comment Share on other sites More sharing options...
bubu Posted March 29, 2005 Report Share Posted March 29, 2005 Tu domā starp ziņām? Tad liec katru ziņu piemēram, savā paragrāfā (vai labāk - list itemā): <p>05:53:H-C - Njaa tikai viena problema es neatceros kaa izskatiajs vecais chatbox</p> <p>05:50:H-C - OK, tiks izdariits!</p> <p>22:46:algorithm - un atstarpes moz usliec savaadaak viss txt sapluust kopaa</p> un tad cssā nodefinē atstarpi kādu tev vien vajag: p { margin-bottom: 20px; } Link to comment Share on other sites More sharing options...
sayed Posted March 29, 2005 Author Report Share Posted March 29, 2005 Tu domā starp ziņām?Tad liec katru ziņu piemēram, savā paragrāfā (vai labāk - list itemā): <p>05:53:H-C - Njaa tikai viena problema es neatceros kaa izskatiajs vecais chatbox</p> <p>05:50:H-C - OK, tiks izdariits!</p> <p>22:46:algorithm - un atstarpes moz usliec savaadaak viss txt sapluust kopaa</p> un tad cssā nodefinē atstarpi kādu tev vien vajag: p { margin-bottom: 20px; } 15711[/snapback] thx! viss darbojas! Link to comment Share on other sites More sharing options...
lazda144 Posted January 2, 2008 Report Share Posted January 2, 2008 kaapeec man vins neiet?? Link to comment Share on other sites More sharing options...
Darkangel Posted January 2, 2008 Report Share Posted January 2, 2008 Tape ka ta ira funkcija nevis pilns scripts. Link to comment Share on other sites More sharing options...
lazda144 Posted January 2, 2008 Report Share Posted January 2, 2008 a kur paareejo dabuut? kaada vispaar jeega tad sito foruma saturaa bija likt ja naw visu failu Link to comment Share on other sites More sharing options...
Darkangel Posted January 2, 2008 Report Share Posted January 2, 2008 Tape ka vins naca prasit palidzibu lai salabotu savu scriptu nevis lai publicetu visiem prieks vilksanas. Vins ieposteja tas funkcijas kuras vaidzeja tikai modificet un prieks ta nevaig pilniba visu scriptu. Link to comment Share on other sites More sharing options...
Recommended Posts