HEX
Server: Apache
System: Linux msm5694.mjhst.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: camjab_ssh (1000)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: /home/httpd/html/nyloncams.com/public_html/includes/inc.comments_responsive.php
<div id='ajaxComments'>
    <!-- comments will display in here / komenty tutaj sie pojawia -->
</div>
<div class="row sep-row">
	<div class="col-xs-20">
		<div class="sep-line"></div>
	</div>
</div>
<?php if($_SESSION['userid']) { ?>
<div id="comment-form">
    <div class="c-thumb"> <span class="icon"></span> </div>
	
    <form id="myform" name="comments" class="sendCommentsBox" action="javascript:jSendComment('#myform');">
        <input type='hidden' name='id' id='id' value='<?php echo $contentID; ?>' />
        <input type='hidden' name='type' id='type' value='<?php echo $commentsType; ?>' />
        <textarea name="comment" id="comment"></textarea>
        <br />
        Human ?:<br />
        <img class="captcha" src="<?php echo $basehttp; ?>/captcha.php" id="captchaImage" /><br />
        <input type="text" value="" size="10" name="captcha" id="captchaCom" style="margin-top:4px; min-width:158px;" />
        <br />
        <div class="form-action">
            <input type="submit" name="button" id="button" value="Post Comment" />
        </div>
    </form>
</div>
<?php } else { ?>
<div class="login-alert"> You must be logged in to post comments. Please <a title="Login" href="<?php echo $basehttp; ?>/login">login</a> or <a title="Signup" href="<?php echo $basehttp; ?>/signup">register</a>. </div>
<?php } ?>

<script type="text/javascript">
function jSendComment(form){
    $.ajax({
        type: 'POST',
        dataType: 'json',
        data: $(form).serialize(),
        url: '<?php echo $basehttp; ?>/includes/ajax.post_comment.php',
        cache: false,
        crossDomain: false,
        success: function(data){
            if(data.error !== 'true'){
            	$('#comment').val('');
                $('#myform').hide();
            }
            
            $('#myspan').html(data.info);
            reloadComments();
        }
    });
}	
function reloadComments() {
    $("#ajaxComments").load("<?php echo $template_url; ?>/template.ajax_comments.php?id=<?php echo $contentID; ?>&type=<?php echo $commentsType; ?>&time=" + new Date().getTime());
}					
$(document).ready(function(){	
     $("#ajaxComments").load("<?php echo $template_url; ?>/template.ajax_comments.php?id=<?php echo $contentID; ?>&type=<?php echo $commentsType; ?>&time=" + new Date().getTime());
});
</script>