Exemple #1
0
function save_comment($plno, $mno, $comment, $dtime)
{
    if (strlen($comment) > 0) {
        insert('posted_looks_comments', array('plno', 'mno', 'date_', 'msg'), array($plno, $mno, $dtime, tcleaner($comment)), 'plcno');
        // echo "<span style='color:green'> succesfully post comment </span>";
    } else {
        // echo " <span  style='color:red' > failled to post comment </span>" ;
    }
}
Exemple #2
0
function insert_flagged_info()
{
    $plcno = $_GET['plcno'];
    $mno = $_SESSION['mno'];
    $flag_date = date("Y-m-d h:m:s");
    $flag_option = $_GET['cbox'];
    $flag_note = $_GET['flag_note'];
    insert('fs_cflag', array('mno', 'plcno', 'flag_option', 'flag_note', 'flag_date'), array($mno, $plcno, $flag_option, tcleaner($flag_note), $flag_date), 'flagno');
}
Exemple #3
0
function reply_edit_update($plcrno, $replyEdited)
{
    echo "reply_edit_update( {$plcrno} , {$replyEdited} ) ";
    if (!empty($replyEdited)) {
        $replyUp = update1('fs_plcm_reply', 'plcr_message', tcleaner($replyEdited), array('plcr_no', $plcrno));
        if ($replyUp) {
            echo " replied comment successfully updated <br>";
        } else {
            echo " replied comment failledd to update <br>";
        }
    }
}
Exemple #4
0
function comment_edit_update($plcno, $commentEdited)
{
    echo "comment_edit_update( {$plcno} , {$commentEdited} ) ";
    if (!empty($commentEdited)) {
        $comUp = update1('posted_looks_comments', 'msg', tcleaner($commentEdited), array('plcno', $plcno));
        if ($comUp) {
            echo "main comment successfully updated <br>";
        } else {
            echo "main comment failledd to update <br>";
        }
    }
}
<?php

session_start();
require "../../../php_functions/connect.php";
require "../../../php_functions/function.php";
require "../../../php_functions/library.php";
require "../../../php_functions/source.php";
require "../../../php_functions/myclass.php";
$mc = new myclass();
$date_time = $mc->date_difference();
$comment = str_replace('\'', "\"", $_GET["rcomment"]);
$plcno = $_GET["plcno"];
$mno = $_SESSION["mno"];
if (strlen($comment) > 0) {
    insert('fs_plcm_reply', array('plcno', 'mno', 'plcr_date', 'plcr_message'), array($plcno, $_SESSION['mno'], $date_time['date_time'], tcleaner($comment)), 'plcr_no');
    echo "<span style='color:green'> reply succesfully post comment </span>";
} else {
    echo " <span  style='color:red' > reply failled to post comment </span>";
}
require "replyDesign.php";
?>
	
 


<li> 
	<?php 
echo "{$comment}";
?>

</li>
if (empty($_GET["post_comment"])) {
    $_GET['post_comment'] = "null";
}
if ($_GET['post_comment'] == 'reply_a_comment') {
    // if (strlen($comment)>0) {
    // 	insert(
    // 		'fs_plcm_reply',
    // 		array('plcno','mno','plcr_date','plcr_message'),
    // 		array($plcno,$_SESSION['mno'],$date_time['date_time'],tcleaner($comment)),
    // 		'plcr_no'
    // 	);
    // }
    // echo "reply comment";
} else {
    if ($_GET['post_comment'] == 'posted_a_comment') {
        insert('posted_looks_comments', array('plno', 'mno', 'date_', 'msg'), array($plno, $mno, $dtime, tcleaner($comment)), 'plcno');
        $comment = selectV1('*', 'posted_looks_comments', array('plno' => $plno, 'operand1' => 'and', 'mno' => $mno), 'order by plcno desc', 'limit 1');
        $comment_len = 1;
    } else {
        if ($_GET['post_comment'] == 'live_check_new_message') {
            $Tblen = get_total_len_comment($_SESSION['plno']);
            if (!empty($Tblen) and $Tblen != 0) {
                #look have a comment
                if ($_SESSION['cTblens'] > $Tblen) {
                } else {
                    if ($_SESSION['cTblens'] < $Tblen) {
                        $total_new_comment = $Tblen - $_SESSION['cTblens'];
                        $_SESSION['cTblens'] = $Tblen;
                        // $comment=get_new_comments($_SESSION['plno'],$total_new_comment);
                        $comment_len = count($comment);
                    }
Exemple #7
0
function main()
{
    $mc = new myclass();
    $mc->date_difference();
    $plcno = !empty($_GET['plcno']) ? intval($_GET["plcno"]) : "";
    $rcomment = !empty($_GET['rcomment']) ? $_GET['rcomment'] : "";
    $plcrno = !empty($_GET['plcrno']) ? intval($_GET['plcrno']) : 0;
    $mno = intval($_SESSION['mno']);
    $status = $_GET['status'];
    $date_time = $mc->date_time;
    $flag_note = !empty($_GET['flag_note']) ? $_GET['flag_note'] : 0;
    $cboxes = !empty($_GET['cboxes']) ? $_GET['cboxes'] : 0;
    $replyEdited = !empty($_GET['replyEdited']) ? $_GET['replyEdited'] : 0;
    $replied_no = !empty($_GET['replied_no']) ? $_GET['replied_no'] : 0;
    $isReplyIndented = !empty($_GET['isReplyIndented']) ? $_GET['isReplyIndented'] : 0;
    $mc->auto_detect_path();
    // echo " status = [$status]  replied_no = $replied_no <br> ";
    if ($status == 'replySave') {
        save_reply_comment($status, $plcno, $replied_no, $mno, $rcomment, $date_time);
        $posted_comment = false;
        // require ('replyDesign.php');
        require '../test_reply.php';
        // echo "result of the output";
        reply_print($plcno, 0, true, 'YES', $mno, $isReplyIndented, '../../../../');
        // echo "reply design print here !";
    } else {
        if ($status == 'replyLike') {
            replyLike($mno, $plcrno);
        } else {
            if ($status == 'replyDisLike') {
                replyDisLike($mno, $plcrno);
            } else {
                if ($status == 'check_flag') {
                    // echo "chekcing flagged ";
                    // echo "$flag_note $cboxes";
                    check_flagged($plcrno);
                    // echo "1";
                } else {
                    if ($status == 'replySaveFlag') {
                        // echo " 	save flag reply  note = $flag_note  check box options = $cboxes <br>";
                        save_reply_flagged($plcrno, $mno, tcleaner($flag_note), $cboxes, $date_time);
                    } else {
                        if ($status == 'replyDelete') {
                            // echo "delete reply   plcrno = $plcrno ";
                            $del_array = $mc->get_multiple_reply($plcrno);
                            // for ($i=0; $i < count($del_array) ; $i++)
                            // {
                            // 	 // replyDelete  ($del_array[$i]);
                            // 	echo " plcrno to del =  ".$del_array[$i].'<br>';
                            // }
                        } else {
                            if ($status == 'replyEdit') {
                                // echo " edit reply plcrno = $plcrno edited reply = $replyEdited <br> ";
                                replyEdit($plcrno, $replyEdited);
                            }
                        }
                    }
                }
            }
        }
    }
}