Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.59 KB | None | 0 0
  1. <head>
  2. <style type="text/css">
  3.  
  4. tr.tit td{
  5. background: #9CF;
  6. font-weight:bold;
  7. background-image:url(table-shaded.png);
  8. }
  9.  
  10. tr.ter td{
  11.  
  12. }
  13.  
  14. tr.inc td{
  15.  
  16. }
  17.  
  18. tr.enc td{
  19.  
  20. }
  21.  
  22. tr.ech td{
  23.  
  24. }
  25.  
  26. table tr:nth-child(odd) td {
  27.   background-color: #F0F0F0;
  28. }
  29.  
  30. caption {
  31. caption-side: top;
  32. font-weight:bold;
  33. font-style:italic;
  34. margin:4px;
  35. }
  36.  
  37. table,th, td {
  38. border: 1px solid gray;
  39. }
  40.  
  41. th, td {
  42. height: 24px;
  43. padding:4px;
  44. vertical-align:middle;
  45. }
  46.  
  47.  
  48.  
  49.  
  50. table {
  51. border-collapse:collapse;
  52. width:100%;
  53. max-width:700px;
  54. min-width:400px;
  55. text-align:center;
  56. }
  57. </style>
  58. <head>
  59.  
  60.  
  61. <?php
  62. set_time_limit(0);
  63. $k=0;
  64. $handle = fopen('footer.html', 'r');
  65. if ($handle)
  66. {
  67.     while (!feof($handle))
  68.     {
  69.         $buffer = fgets($handle);
  70.        
  71.         if (strpos($buffer,'class="ech"'))
  72.                     {
  73.                     $buffer=substr_replace($buffer,'<tr class="ech"><td><img src="Rouge.jpg"></td>',0,30);
  74.                     }
  75.         else if (strpos($buffer,'class="ter"'))
  76.                     {
  77.                     $buffer=substr_replace($buffer,'<tr class="ter"><td><img src="Vert.jpg"></td>',0,30);
  78.                     }
  79.        
  80.         else if (strpos($buffer,'class="inc"'))
  81.                     {
  82.                     $buffer=substr_replace($buffer,'<tr class="inc"><td><img src="Rose.jpg"></td>',0,30);
  83.                     }
  84.                    
  85.         else if (strpos($buffer,'class="enc"'))
  86.                     {
  87.                     $buffer=substr_replace($buffer,'<tr class="enc"><td><img src="Orange.jpg"></td>',0,30);
  88.                     }
  89.         else if (strpos($buffer,'class="tit"'))
  90.                     {
  91.                     $buffer=substr_replace($buffer,'<tr class="tit"><td></td>',0,30);
  92.                     }
  93.    
  94.  
  95.         echo $buffer;
  96.     }
  97.     fclose($handle);
  98. }
  99. ?>
  100.  
  101.  
  102. // substr_replace
  103.  
  104.  
  105.  
  106.  
  107.  
  108. <?php include('footer.html'); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement