Files
Testing/secommentspost.php

49 lines
2.9 KiB
PHP
Raw Permalink Normal View History

2026-11-17 16:15:01 -05:00
<?php
$page = "general";
include "header.php";
$time=time();
if(trim($_POST["comment"])!=""){
if($_POST["object"]=="se_videocomments"){
$database->database_query("INSERT INTO ".$database->database_real_escape_string($_POST["object"])." SET videocomment_video_id='".$database->database_real_escape_string($_POST["object_id"])."', videocomment_authoruser_id='".$database->database_real_escape_string($_POST["user"])."', videocomment_date='".$time."', videocomment_body='".$database->database_real_escape_string($_POST["comment"])."'");
}
elseif($_POST["object"]=="se_mediacomments"){
$database->database_query("INSERT INTO ".$database->database_real_escape_string($_POST["object"])." SET mediacomment_media_id='".$database->database_real_escape_string($_POST["object_id"])."', mediacomment_authoruser_id='".$database->database_real_escape_string($_POST["user"])."', mediacomment_date='".$time."', mediacomment_body='".$database->database_real_escape_string($_POST["comment"])."'");
}
$owner=new SEUser(Array($_POST["user"]));
?>
<div style="margin-top: 10px; margin-bottom: 20px;"><div style="float: left; text-align: center; width: 90px;"><a href="<?=$url->url_create('profile', $owner->user_info["user_username"])?>">
<?php $profilepicture=$owner->user_photo("./images/nophoto.png");
echo $owner->userprofiledot($profilepicture, "75px");?>
</a></div><div style="overflow: hidden;"><div class="profile_comment_author"><a href="<?=$url->url_create('profile', $owner->user_info["user_username"])?>"><b><?=$owner->user_displayname?></b></a></div><div class="profile_comment_date"><?=date('n/j/Y g:i A', $time)?></div><div class="profile_comment_body" id="profile_comment_body_14612"><?=$_POST["comment"]?></div><div class="profile_comment_links"><a data-toggle="modal" data-target="#myModal" href="user_messages_new.php?to_user=<?=$owner->user_info["user_username"]?>&to_id=<?=$owner->user_info["user_username"]?>">message</a>&nbsp;</div></div></div><div class="clear"></div>
<?
if( $owner->user_info['user_id'] != $user->user_info['user_id'] )
{
$notifytype = $notify->notify_add(
$owner->user_info['user_id'],
$this->comment_type."comment",
$this->comment_identifying_value,
Array(
$owner->user_info['user_username'],
$this->comment_identifying_value,
$object_owner_id
),
Array($object_title)
);
$object_url = $url->url_base.vsprintf($notifytype['notifytype_url'], Array($owner->user_info['user_username'], $this->comment_identifying_value));
$owner->user_settings();
if( $owner->usersetting_info['usersetting_notify_'.$this->comment_type.'comment'] )
{
//send_systememail($this->comment_type."comment", $owner->user_info['user_email'], Array($owner->user_displayname, $commenter, "<a href=\"$object_url\">$object_url</a>"));
}
}
}
exit;
function general(){}
include "footer.php";