当前位置: 首页>>代码示例>>PHP>>正文


PHP myclass::send_notification_to_follower方法代码示例

本文整理汇总了PHP中myclass::send_notification_to_follower方法的典型用法代码示例。如果您正苦于以下问题:PHP myclass::send_notification_to_follower方法的具体用法?PHP myclass::send_notification_to_follower怎么用?PHP myclass::send_notification_to_follower使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在myclass的用法示例。


在下文中一共展示了myclass::send_notification_to_follower方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: account_save_profile

 public function account_save_profile($profile_row_name, $profile_row_name_val, $mno)
 {
     $mc = new myclass();
     $fullName = '';
     $isName = FALSE;
     echo "   profile_row_name_val =  {$profile_row_name_val}";
     $prn = explode(',', $profile_row_name);
     $prnv = explode('_new_', $profile_row_name_val);
     echo " rowname <br> ";
     print_r($prn);
     echo " values <br>";
     print_r($prnv);
     for ($i = 0; $i < count($prn); $i++) {
         #check if exist if its exist then return faild.
         $rn = $prn[$i];
         $rv = $prnv[$i];
         // $rv = str_replace('Your Firstname','',$rv);
         $rv = str_replace('Your Nickname / Alias', '', $rv);
         $rv = str_replace('Your Lastname', '', $rv);
         // if update the full name
         if ($rn == 'lastname' || $rn == 'firstname' || $rn == 'nickname' || $rn == 'middlename') {
             $rv = ucwords($rv);
             $isName = TRUE;
             $fullName .= $rv . ' ';
         }
         //if update the username
         if ($rn == 'username' || $rn == 'email') {
             update1('fs_member_accounts', $rn, $rv, array('mno', $mno));
         } else {
             update1('fs_members', $rn, $rv, array('mno', $mno));
         }
     }
     // If name is being updated then notify all the followers
     if ($isName == TRUE) {
         $_SESSION['noti_table_name'] = TRUE;
         $_SESSION['noti_type'] = 'change-name';
         $_SESSION['fullName'] = $fullName;
         $mc->send_notification_to_follower($mno);
         print 'send notification to follwers change name';
     } else {
         print 'failed to send notification maybe this is not changing name';
     }
     // add or updated keyword
     $mc->fs_search(array('type' => 'add-or-updated-keyword', 'table_name' => 'fs_members', 'table_id' => $mno));
 }
开发者ID:jesus143,项目名称:fs-dev,代码行数:45,代码来源:accountsettings_save.php

示例2: 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>";
}
开发者ID:jesus143,项目名称:fs-dev,代码行数:31,代码来源:flag_post_save.php


注:本文中的myclass::send_notification_to_follower方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。