-
Notifications
You must be signed in to change notification settings - Fork 0
/
blogcomment.php
165 lines (133 loc) · 4.4 KB
/
blogcomment.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Home page</title>
<link rel="stylesheet" type="text/css" href="page.css"/>
</head>
<body>
<div class="head">
<img src="clubs/ruet.png"/>
<div id="relog">
<a href="login.php">Login</a>
<a href="register.php">Register</a>
</div>
</div>
<ul>
<li><a href="home.php"> Home </a></li>
<li><a> Ruetian Clubs</a>
<ul>
<li><a href="rapl.php">RAPL</a></li>
<li><a href="IEEE.php">IEEE Ruet</a></li>
<li><a href="RCF.php">Ruet Career Forum</a></li>
<li><a href="RDC.php">Ruet Debating Club</a></li>
<li><a href="RSC.php">Robotic Society of Ruet</a></li>
<li><a href="psr.php">Photographic Society of Ruet</a></li>
<li><a href="onu.php">অনুরণন</a></li>
<li><a>সমানুপাতিক</a></li>
</ul>
</li>
<li><a>Events</a>
<ul>
<li><a>August</a></li>
<li><a>September</a></li>
<li><a>October</a></li>
</ul>
</li>
<li><a href="blog.php">Blog</a></li>
<li><a href="contact.php"> Contact us</a></li>
</ul></br></br>
<div class="img" style="max-width:800px">
<img class="mySlides" src="ruet2.jpg" style="width:100%">
<img class="mySlides" src="clubs/shahidMinar.jpg" style="width:100%">
<img class="mySlides" src="clubs/ruetCampus.jpg" style="width:100%">
</div>
<div class="button" >
<div class="button2">
<button class="greyButton" id="grey1" onclick="plusDivs(-1)">❮ Prev</button>
<button class="greyButton" id="grey2" onclick="plusDivs(1)">Next ❯</button>
</div>
<button class="demoButton" id="red1" onclick="currentDiv(1)">1</button>
<button class="demoButton" id="red2" onclick="currentDiv(2)">2</button>
<button class="demoButton" id="red3" onclick="currentDiv(3)">3</button>
</div>
<script>
var slideIndex = 1;
showDivs(slideIndex);
function plusDivs(n) {
showDivs(slideIndex += n);
}
function currentDiv(n) {
showDivs(slideIndex = n);
}
function showDivs(n) {
var i;
var x = document.getElementsByClassName("mySlides");
var dots = document.getElementsByClassName("demo");
if (n > x.length) {slideIndex = 1}
if (n < 1) {slideIndex = x.length}
for (i = 0; i < x.length; i++) {
x[i].style.display = "none";
}
for (i = 0; i < dots.length; i++) {
dots[i].className = dots[i].className.replace(" w3-red", "");
}
x[slideIndex-1].style.display = "block";
dots[slideIndex-1].className += " w3-red";
}
</script>
</br></br>
<div class="cont"><h3>Ruetian Clubs</h3>
<p>Students of RUET are involved in different organizations and clubs of the university. Members of these organizations and clubs organize different national programs at RUET.
They also participate in different national and international competitions and shows indomitable performances.
This website is about to show the activities of the organizations and helps the students who are eager to join these clubs.
</p>
<b> Please leave a reply:</b></br>
<form action="blogcomment.php" method="POST">
<table>
<tr><td>Name: <br><input type="text" name="name"/></td></tr>
<tr><td colspan="2">Comment: </td></tr>
<tr>
<td colspan="5"><textarea name="mes" rows="10" cols="50"></textarea></td></tr>
<tr><td colspan="2"><input type="submit" name="post" value="Submit"></td></tr>
</table>
</form>
<?php
$name="";
$text="";
$post="";
if ($_SERVER['REQUEST_METHOD']=='POST'){
$name=$_POST["name"];
$text =$_POST["mes"];
$post=$_POST["post"];
}
if($post)
{
#WRITE DOWN COMMENTS#
$write = fopen("comment.txt","a+") or die("Unable!");
fwrite($write,"<u><b>$name:</b></u></br>$text</br>");
fclose($write);
#DISPLAY COMMENT#
$read=fopen("comment.txt","r+t");
echo "<br><br><br>All Comments :<br><br><br>";
while(!feof($read)){
echo fread($read,1024);
echo"<br><br><br><br>";
}
fclose($read);
}
else
{
#DISPLAY COMMENT#
$read=fopen("comment.txt","r+t");
echo "<br><br><br>All Comments :<br><br><br>";
while(!feof($read)){
echo fread($read,1024);
echo "<br><br><br><br><br>";
}
fclose($read);
}
?>
</div>
</body>
</html>