All pastes #569575 Raw Edit

Nozo

public php v1 · immutable
·published 2007-06-16 08:48 UTC
rendered paste body
 <?php/*if (isset ($_POST['Submit'])){$promenliva=0;if (($_POST['ime'])==""){$promenliva=1;}if (strlen ($_POST['komentar']) > 250){$promenliva=2;}if (($_POST['komentar'])==""){$promenliva=3;}}*/ ?><style type="text/css"><!--.style1 {font-size: 10px}--></style><form name="form1" method="post" action="">  <table width="315" height="28" border="0" align="center">    <tr>      <td><?php	  $filename="komentari.txt";	  $fp=fopen($filename, "r");	  while (!feof ($fp)) {	  $line=fgets ($fp,1024);	  print "$line<br/>";	 	   }		    fclose($fp);	    ?></td>    </tr>   </table>  <table width="303" border="0" align="center" bgcolor="#F4F4F4">    <tr>      <td colspan="2"><div align="center"><strong>Îñòàâè êîìåíòàð </strong><br />        <br />      </div>	 	  </td>    </tr>    <tr>      <td width="145"><strong>Èìå:</strong></td>      <td width="148"><input name="ime" type="text" id="ime"></td>    </tr>    <tr>      <td><strong>Mail(îïöèîíàëíî):</strong></td>      <td><input name="mail" type="text" id="mail"></td>    </tr>    <tr>      <td height="21" colspan="2"><textarea name="komentar" cols="50" rows="10" id="komentar"></textarea></td>    </tr>    <tr>      <td colspan="2"><div align="center">        <input type="submit" name="Submit" value="Èñïðàòè êîìåíòàð" />      </div></td>    </tr>  </table>  <table width="320" border="0" align="center">    <tr>      <td width="314"> 	  <?php if ( (isset ($_POST['Submit']))) 	  {	  $promenliva=0;	  if (($_POST['ime'])=="")  { $promenliva++; echo "Íåìàòå âíåñåíî èìå. </br>"; } 	  if (strlen ($_POST['komentar']) > 250) {$promenilva++; echo "Êîìåíòàðîò íå ñìåå äà ñîäðæè ïîâåå îä 250 çíàöè. </br>"; }	  if (($_POST['komentar'])==""){ $promenliva++; echo "Íåìàòå âíåñåíî êîìåíòàð</br> "; } }?>  </td> </tr> </table>  <p>&nbsp;</p>  <p>&nbsp;</p>  <p>&nbsp;</p>  <p>&nbsp;</p><?php if ($promenliva==0){if (isset ($_POST['Submit'])){$filename="komentari.txt";$fp=fopen($filename, "a");fwrite($fp, date("d/m/y  G:i:s",time()));fwrite($fp, "\n");fwrite($fp, "Îä: ");fwrite($fp, $_POST['ime']);fwrite($fp, "\n");fwrite($fp, "Êîìåíòàð: ");fwrite($fp, "\n");fwrite($fp, $_POST['komentar']);fwrite($fp, "\n");fwrite($fp, "__________________________________________");fwrite($fp, "\n\n");fclose($fp);}}?></form>