<table border="1" cellpadding="0" cellspacing="0" > <?php $limit_start = 0; $limit_end = 1; for ($i = 0; $i < $variables['len']; $i++) { // each msgno $variables['msgno'] = intval($variables['response'][$i]['msgno']); $variables['mno'] = intval($variables['response'][$i]['mno']); $variables['mno1'] = intval($variables['response'][$i]['mno1']); // get chat mate $variables['mno1'] = $variables['mno'] == $mno ? $variables['mno1'] : $variables['mno']; // get username chat mate $username = $mc->get_username_by_mno($variables['mno1']); // get from fs_comment table via table id and table name from fs_message $variables['comment_r'] = $mc->posted_modals_comment_Query(array('comment_query' => 'get-all-comment-by-tbn_and_tbid', 'table_name' => 'fs_message', 'table_id' => intval($variables['msgno']), 'orderby' => 'order by date desc', 'limit_start' => $limit_start, 'limit_end' => $limit_end)); $variables['comment'] = $variables['comment_r'][0]['comment']; $variables['mno'] = intval($variables['comment_r'][0]['mno']); $variables['date'] = $variables['comment_r'][0]['date']; $fullname = $mc->get_full_name_by_id($variables['mno1']); // header title desc $mc->header_attribute("OOTD | Trends | Fashion Blogs | Beauty Tips | Fashion Inspiration | Fashion Sponge ", "Fashion Sponge is the easiest & fastest way to: Show your ootd, see the latest trends, discover fashionable people & blogs, get beauty & style tips & find fashion inspiration.", "OOTD | Trends | Fashion Blogs | Beauty Tips | Fashion Inspiration "); ?> <tr> <td> <?php $mc->member_thumbnail_display($mc->ppic_thumbnail, $variables['mno1'], "{$mc->ppic_thumbnail}", null, '35px;'); ?> </td> <td onclick="chat( 'chat?u=<?php
// $_GET['mn'] = message num // get id via username $msgno = !empty($_GET['mn']) ? $_GET['mn'] : 0; if (!empty($_GET['u'])) { $mno1 = intval($mc->get_mnobyusername($_GET['u'])); } else { $mno1 = intval($_GET['id']); } // get full name of the chat mate $fullname1 = $mc->get_full_name_by_id($mno1); // get message id or msgno $msgno = $mc->fs_message(array('type' => 'get-msgno', 'mno' => $mno, 'mno1' => $mno1)); // get latest 10 comments $limit_start = 0; $limit_end = 20; $variable['message'] = $mc->posted_modals_comment_Query(array('comment_query' => 'get-all-comment-by-tbn_and_tbid', 'table_name' => 'fs_message', 'table_id' => intval($msgno), 'orderby' => 'order by date desc', 'limit_start' => $limit_start, 'limit_end' => $limit_end)); // initlaized len of the total messages $variable['len'] = count($variable['message']); // initialized the profile image for the real time comment display owner $thumbnail_src = $mc->member_thumbnail_display($mc->ppic_thumbnail, $mno, "{$mc->ppic_thumbnail}", null, '35px;'); // get current total message of the user $new_total_message = $mc->posted_modals_comment_Query(array('table_name' => 'fs_message', 'table_id' => $msgno, 'mno1' => $mno1, 'comment_query' => 'get-total-comment-by-chatmate')); // initialized name of the cockie $sessionkeyword = "current_total_message_{$mno1}"; // assign total message to cockie setcookie($sessionkeyword, 0, time() + 3600); $fs_home_tab = basename($_SERVER["PHP_SELF"]); $fs_home_tab = str_replace(".php", "", $fs_home_tab); if ($fs_home_tab == "index") { $fs_home_tab = "latest"; }
$nno = !empty($_GET['nno']) ? intval($_GET['nno']) : 0; $table_id = !empty($_GET['id']) ? intval($_GET['id']) : 0; $table_name = 'fs_postedarticles'; $modal['table_id'] = $_GET['id']; $modal['table_name'] = $table_name; echo " id " . $table_id; # UPDATE NOTIFICATION AS VIEWED # GET THE SPECIFIC MODAL INFO $modal['modal'] = $mc->fs_postedarticles(array('aticle_type' => 'select', 'limit_start' => 0, 'limit_end' => 1, 'orderby' => 'artno desc', 'where' => "artno = {$table_id}")); $modal['mno'] = $modal['modal'][0]['mno']; # GET MORE MODALS $modal['modal_more'] = $mc->fs_postedarticles(array('aticle_type' => 'select', 'limit_start' => 0, 'limit_end' => 30, 'orderby' => 'artno desc', 'where' => "mno = {$modal['mno']}")); // print_r($modal['modal_more']); # GET SPECIFIC MODAL COMMENT # get first latest comment by cno $modal['comments'] = $mc->posted_modals_comment_Query(array('table_name' => $table_name, 'table_id' => $table_id, 'orderby' => 'cno asc', 'limit_start' => 0, 'limit_end' => 10, 'comment_query' => 'get-comment-modal')); # get total comment $modal['comments_all'] = $mc->posted_modals_comment_Query(array('table_name' => $table_name, 'table_id' => $table_id, 'orderby' => 'cno asc', 'limit_start' => 0, 'limit_end' => 1000, 'comment_query' => 'get-comment-modal')); $modal['comments_len'] = count($modal['comments_all']); # get next prev $modal['nextprev'] = $mc->db_result_next_prev($modal['table_name'], $modal['table_id'], $modal['modal_more'], 'all'); // $mc->print_r1( $modal['modal_more']); // $modal['next'] // $modal['prev'] // $mc->print_r1( $modal['nextprev']); // echo " total comments are $modal[comments_len] <br> "; // $mc->print_r1($modal['modal'] ); // $mc->print_r1( $modal['modal_more'] ); # SET SESSION $_SESSION['modal_more'] = $modal['modal_more']; $_SESSION['nextprev'] = $modal['nextprev'];
$_SESSION['mno'] = $mc->get_cookie('mno', 136); $mno = $mc->get_cookie('mno', 136); $comment = $_GET['comment']; $table_id = $_GET['table_id']; $table_name = $_GET['table_name']; $action = $_GET['action']; $option = $_GET['option']; /** Insert flag */ if ($db->insert('fs_flag', array('mno' => $mno, 'table_id' => $table_id, 'table_name' => $table_name, 'comment' => $comment, 'action' => $action, 'option' => $option))) { echo "<div style='color:green' >You successfully flagged this post.</div>"; /** setup message here */ $message = 'Your post is being flagged please visit our posting rules to delete <a hre="http://google.com" >google.com </a>'; /** send notification with the owner of this modal */ $mc->set_session_notification($mno, $table_name, $table_id, 'flagged', '', '', 'flagged'); // $_SESSION['noti_action'] = 'flagged your post, please visit posting rule'; // $_SESSION['noti_type'] = 'flagged'; // $_SESSION['noti_link'] = 'google.com'; $mc->send_notification_to_follower($_SESSION['mno']); /** To add flag message */ //get owner of the modal $mno1 = $mc->get_modal_owner($table_name, $table_id); // this is to be change to no more insert only the returned msgno from the chat.php need to be session here to save time loading $msgno = $mc->fs_message(array('type' => 'get-or-add-message-id', 'mno' => $mno, 'mno1' => $mno1)); // insert message $response = $mc->posted_modals_comment_Query(array('comment_query' => 'comment-insert', 'mno' => $mno, 'comment' => $message, 'table_name' => 'fs_message', 'table_id' => $msgno)); // update time and current user sent a message $response = $mc->update_fs_table_auto(null, array('mno2' => $mno1, 'date' => $mc->date_time, 'status' => 1, 'idname' => 'msgno', 'idval' => $msgno), 'fs_message'); // require('http://localhost/fs/new_fs/alphatest/fs_folders/modals/general_modals/gen.modals.func.php?action=messaging&type=insert-message&mno1=133&message=flagged message'); } else { echo "<div style='color:red' >Ohps, Something wrong. Failed to flag.</div>"; }