本文整理汇总了PHP中myclass::fs_message方法的典型用法代码示例。如果您正苦于以下问题:PHP myclass::fs_message方法的具体用法?PHP myclass::fs_message怎么用?PHP myclass::fs_message使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类myclass
的用法示例。
在下文中一共展示了myclass::fs_message方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
// initialized
$variable = array();
echo "<div style='display:none;color:#000' >";
// $_GET['u'] = username
// $_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"]);
示例2: myclass
require "fs_folders/php_functions/function.php";
require "fs_folders/php_functions/myclass.php";
require "fs_folders/php_functions/library.php";
require "fs_folders/php_functions/source.php";
$mc = new myclass();
$mc->auto_detect_path();
$mc->save_current_page_visited();
// $is_cookie_set = $mc->set_cookie( 'mno' , 130 , time()+3600*24 );
$_SESSION['mno'] = $mc->get_cookie('mno', 136);
$mno = $mc->get_cookie('mno', 136);
$variables = array();
// $mno = 133;
$limit_start = 0;
$limit_end = 10;
// response from table fs_message and lits of your all messages
$variables['response'] = $mc->fs_message(array('type' => 'get-all-message-id', 'mno' => $mno, 'orderby' => 'order by date asc', 'limit_start' => $limit_start, 'limit_end' => $limit_end));
// $mc->print_r1( $variables['response'] );
// your all messages len
$variables['len'] = count($variables['response']);
?>
<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
示例3: array
$_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>";
}