-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommentlibrary.php
203 lines (114 loc) · 6.37 KB
/
commentlibrary.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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
<?php
require('dataco.php');
require('phpopen.php');
include('exit.php');
include('theme.php');
$d=$_SESSION['numuser'];
$comtext=$_POST['cap'];
$poss=$_POST['postid'];
$pag=$_POST['pag'];
$nex=$_POST['nex'];
if($_SESSION['quoteuser']==""){ $myname=$_SESSION['nameuser']; }
else{ $myname=$_SESSION['quoteuser']; }
echo '
<script type="text/javascript">
adclerstate'.$pag.'="0";
adpassclerstate'.$pag.'="0";
function addcomfailed'.$pag.'(){
var dtel=document.querySelector("#reactionflash'.$pag.'");
dtel.classList.remove("fadeboyreact");
dtel.classList.add("fadeboyreactfail");
document.getElementById("reactionflash'.$pag.'").innerHTML=" Try Again!";
adclerstate'.$pag.'="1";
adcler'.$pag.'= setTimeout(function(){
adclerstate'.$pag.'="0"; $("#tempreaction'.$pag.'").hide();
var ctot=$("#totalcomment").val();
if(ctot == 0){
document.getElementById("textreactpageempty<?php echo $nivd; ?><?php echo $gringo; ?>").style.visibility="visible"; }
},10000); }
function addcompass'.$pag.'(){
$("#reactionflash'.$pag.'").hide();
$("#reactionflashtoo'.$pag.'").show();
adpassclerstate'.$pag.'="1";
adpasscler'.$pag.'= setTimeout(function(){
adpassclerstate'.$pag.'="0";
$("#reactionflashtoo'.$pag.'").hide();
$("#reactionflash'.$pag.'").hide();
$("#reactionflash3'.$pag.'").show();
},3000);
var hh ="'.$pag.'"; }
$("#reactionflashtoo'.$pag.'").hide();
$("#reactionflash3'.$pag.'").hide();
$("#reactionflash'.$pag.'").show();
if( adpassclerstate'.$pag.' == 1){ clearTimeout(adpasscler'.$pag.'); }
if( adclerstate'.$pag.' == 1){ clearTimeout(adcler'.$pag.'); }
$("#tempreaction'.$pag.'").show();
var dtel=document.querySelector("#reactionflash'.$pag.'");
dtel.classList.remove("fadeboyreactfail");
document.getElementById("reactionflash'.$pag.'").innerHTML=" Posting!";
var rtxtsrc= "'.$comtext.'";
document.getElementById("putmyreacttext'.$pag.'").innerHTML=rtxtsrc;
dtel.classList.add("fadeboyreact");
showcomment();
</script>
<div class="col-xs-12" id="reactpost'.$nex.'" style="display:none;padding:0px;"> </div>
<div class="col-xs-12" id="tempreaction'.$pag.'" style="display:none;padding:0px;height:auto;border-radius:4px;'.$commenttextcolor.'">
<div class="col-xs-hidden col-sm-1" style="padding:0px;height:auto;">
</div>
<div class="col-xs-12 col-sm-10" style="padding:0px;">
<div class="col-xs-12 " style="padding:0px;top:5px;left:-5px">
<div class="col-xs-2 " style="padding:0px;padding-top:0px;"> </div>
<div class="col-xs-10" style="padding:0px;text-align:right;font-weight:normal;">
<vvpandi><span class="juju zuzax dontallowselect" style="font-size:90%;">'.$myname.'</span><span class="juju zuperxy zuzax dontallowselect" style="color:'.$_SESSION['cl'].'"> <i class=" fa fa-ellipsis-h" aria-hidden="true"></i></span>
</vvpandi>
</div></div>
<div class="col-xs-12 " style="padding:0px;padding-bottom:0px;">
<div class="col-xs-2" style="padding-top:0px;padding:2px;margin:auto;text-align:center;margin-top:-5.5px">
<img src="images/profilemini/'.$_SESSION['profilepic'].'" onclick="javascript:listtopagexx();"
id="profileimagefilexx" class="zuzax juju img-rounded dontallowselect " style="width:auto;height:3.4em;padding:3px;-moz-box-shadow: 0 0 2px'.$_SESSION['cl'].';-webkit-box-shadow: 0 0 2px '.$_SESSION['cl'].';box-shadow: 0 0 2px '.$_SESSION['cl'].'; border:2px solid '.$_SESSION['cl'].';border-radius:50%;" title="'.$_SESSION['user'].'"/>
</div>
<div class="col-xs-10" style="padding:0px;padding-top:0px;">
<div class="col-xs-12 " style="padding:0px;font-weight:bolder;">
<vvpandi style="font-size:130%;margin-left:2px;padding:0px">'.$_SESSION['user'].'</vvpandi>
<span class="'.$commentspace.'" style="color:'.$_SESSION['cl'].';font-size:50%;margin-left:3px;padding:0px"><i class="fas fa-circle"></i></span> <aleob id="putmyreacttext'.$pag.'" style="padding:1px;"> </aleob></div>
<div class="col-xs-12 " style="padding:0px;padding-top:5px">
<div class="col-xs-4" style="padding:0px;text-align:left"><vvpandi>
<span class="fadeboyreactfail" id="reactionflash'.$pag.'" style="padding-left:4px;font-size:120%;"> Posting... </span>
<span id="reactionflash3'.$pag.'" style="padding-left:4px;font-size:110%;display:none"> Just Now </span>
<span class="fadeboyreactfailtoo" id="reactionflashtoo'.$pag.'" style="padding-left:4px;display:none">
<span style="font-size:115%">Done </span>
<span style="font-size:100%;color:'.$_SESSION['cl'].'" class="zuperxy"> <i class="fa fa-check" aria-hidden="true" style="margin-top:1px"></i> </span> </span></vvpandi></div>
</div>
</div>
</div>
</div></div>';
$sqladdcom=" INSERT INTO comment (num,post,time,com) VALUES (?,?,now(),?) ";
$sqladdcominstb= $super->prepare($sqladdcom);
///prepare can fail because of syntax errors,missing privilages
if(false === $sqladdcominstb){
echo'<script>
addcomfailed'.$pag.'();
</script>'; }
else{
$sqladdcominstblock= $sqladdcominstb->bind_param("iis",$jum,$post,$cap);
if(false === $sqladdcominstblock){
$sqladdcominstb->close();
echo'<script>
addcomfailed'.$pag.'();
</script>'; }
else{
$jum=$d;
$cap=$comtext; $post=$poss;
$instraplock= $sqladdcominstb->execute();
if(false === $instraplock){
$sqladdcominstb->close();
echo'<script>
addcomfailed'.$pag.'();
</script>'; }
else{
echo'<script>
addcompass'.$pag.'();
afterreactionaddded();
</script>';
$sqladdcominstb->close();}}}
?>