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.php
<div id='ajaxComments'><!-- comments will display in here / komenty tutaj sie pojawia --></div>            
<? if ($_SESSION[userid]) { ?>
<div class="add-wall-post row">
    <h3>Add Comments:</h3>
    <div id="ajaxComments"></div>
   	<span name="myspan" id="myspan"></span>
    <form id="myform" name="comments" class="sendCommentsBox" action="javascript:jSendComment('#myform');">        
        <input type='hidden' name='id' id='id' value='<? echo $contentID; ?>' />
        <input type='hidden' name='type' id='type' value='<? echo $commentsType; ?>' />
        <textarea name="comment" id="comment"></textarea><br />
        Human ?:<br />
		<img class="captcha" src="<? 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 />		
        <input type="submit" name="button" id="button" value="Post Comment" />
    </form>
</div>
<? } else { ?>
<p style="padding-top:5px; display:block; float:left;">You must be logged in to post wall comments. Please <a href='<? echo $basehttp; ?>/login'>login</a> or <a href='<? echo $basehttp; ?>/signup'>signup (free)</a>.</p>
<? } ?>
<script type="text/javascript">
function jSendComment(form){
    $.ajax({
        type: 'POST',
        dataType: 'json',
		data: $(form).serialize(),
        url: '<? 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("<? echo $template_url; ?>/template.ajax_comments.php?id=<? echo $contentID; ?>&type=<? echo $commentsType; ?>&time=" + new Date().getTime());
}					
$(document).ready(function(){	
     $("#ajaxComments").load("<? echo $template_url; ?>/template.ajax_comments.php?id=<? echo $contentID; ?>&type=<? echo $commentsType; ?>&time=" + new Date().getTime());
});
</script>