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


PHP get_fullname函数代码示例

本文整理汇总了PHP中get_fullname函数的典型用法代码示例。如果您正苦于以下问题:PHP get_fullname函数的具体用法?PHP get_fullname怎么用?PHP get_fullname使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: bulkSend

 /**
  * Sends the collected messages from sendingMail as e-mail.
  */
 function bulkSend()
 {
     // if nothing to do, return
     if (empty($this->bulk_mail)) {
         return;
     }
     // send a mail, for each language one
     foreach ($this->bulk_mail as $lang_data) {
         foreach ($lang_data as $data) {
             $mail = new StudipMail();
             $mail->setSubject($data['title']);
             foreach ($data['users'] as $user_id => $to) {
                 $mail->addRecipient($to, get_fullname($user_id), 'Bcc');
             }
             $mail->setReplyToEmail('')->setBodyText($data['text']);
             if (strlen($data['reply_to'])) {
                 $mail->setSenderEmail($data['reply_to'])->setSenderName($snd_fullname);
             }
             $user_cfg = UserConfig::get($user_id);
             if ($user_cfg->getValue('MAIL_AS_HTML')) {
                 $mail->setBodyHtml($mailhtml);
             }
             if ($GLOBALS["ENABLE_EMAIL_ATTACHMENTS"]) {
                 foreach (get_message_attachments($data['message_id']) as $attachment) {
                     $mail->addStudipAttachment($attachment['dokument_id']);
                 }
             }
             $mail->send();
         }
     }
 }
开发者ID:ratbird,项目名称:hope,代码行数:34,代码来源:ForumBulkMail.php

示例2: afterStoreCallback

 public function afterStoreCallback()
 {
     if ($this->isDirty()) {
         //add notification to writer of review
         if (!$this->review['host_id'] && $this->review['user_id'] !== $this['user_id']) {
             PersonalNotifications::add($this->review['user_id'], URLHelper::getURL("plugins.php/lernmarktplatz/market/discussion/" . $this['review_id'] . "#comment_" . $this->getId()), sprintf(_("%s hat einen Kommentar zu Ihrem Review geschrieben."), $this['host_id'] ? LernmarktplatzUser::find($this['user_id'])->name : get_fullname($this['user_id'])), "comment_" . $this->getId(), Icon::create("support", "clickable"));
         }
         //add notification to all users of this servers who discussed this review but are neither the new
         //commentor nor the writer of the review
         $statement = DBManager::get()->prepare("\n                SELECT user_id\n                FROM lernmarktplatz_comments\n                WHERE review_id = :review_id\n                    AND host_id IS NULL\n                GROUP BY user_id\n            ");
         $statement->execute(array('review_id' => $this->review->getId()));
         foreach ($statement->fetchAll(PDO::FETCH_COLUMN, 0) as $user_id) {
             if (!in_array($user_id, array($this->review['user_id'], $this['user_id']))) {
                 PersonalNotifications::add($user_id, URLHelper::getURL("plugins.php/lernmarktplatz/market/discussion/" . $this['review_id'] . "#comment_" . $this->getId()), sprintf(_("%s hat auch einen Kommentar geschrieben."), $this['host_id'] ? LernmarktplatzUser::find($this['user_id'])->name : get_fullname($this['user_id'])), "comment_" . $this->getId(), Icon::create("support", "clickable"));
             }
         }
         //only push if the comment is from this server and the material-server is different
         if (!$this['host_id']) {
             $myHost = LernmarktplatzHost::thisOne();
             $data = array();
             $data['host'] = array('name' => $myHost['name'], 'url' => $myHost['url'], 'public_key' => $myHost['public_key']);
             $data['data'] = $this->toArray();
             $data['data']['foreign_comment_id'] = $data['data']['comment_id'];
             unset($data['data']['comment_id']);
             unset($data['data']['id']);
             unset($data['data']['user_id']);
             unset($data['data']['host_id']);
             $user_description_datafield = DataField::find(get_config("LERNMARKTPLATZ_USER_DESCRIPTION_DATAFIELD")) ?: DataField::findOneBySQL("name = ?", array(get_config("LERNMARKTPLATZ_USER_DESCRIPTION_DATAFIELD")));
             if ($user_description_datafield) {
                 $datafield_entry = DatafieldEntryModel::findOneBySQL("range_id = ? AND datafield_id = ?", array($this['user_id'], $user_description_datafield->getId()));
             }
             $data['user'] = array('user_id' => $this['user_id'], 'name' => get_fullname($this['user_id']), 'avatar' => Avatar::getAvatar($this['user_id'])->getURL(Avatar::NORMAL), 'description' => $datafield_entry ? $datafield_entry['content'] : null);
             $statement = DBManager::get()->prepare("\n                    SELECT host_id\n                    FROM lernmarktplatz_comments\n                    WHERE review_id = :review_id\n                        AND host_id IS NOT NULL\n                    GROUP BY host_id\n                ");
             $statement->execute(array('review_id' => $this->review->getId()));
             $hosts = $statement->fetchAll(PDO::FETCH_COLUMN, 0);
             if ($this->review['host_id'] && !in_array($this->review['host_id'], $hosts)) {
                 $hosts[] = $this->review['host_id'];
             }
             if ($this->review->material['host_id'] && !in_array($this->review->material['host_id'], $hosts)) {
                 $hosts[] = $this->review->material['host_id'];
             }
             foreach ($hosts as $host_id) {
                 $remote = new LernmarktplatzHost($host_id);
                 if (!$remote->isMe()) {
                     $review_id = $this->review['foreign_review_id'] ?: $this->review->getId();
                     if ($this->review['foreign_review_id']) {
                         if ($this->review->host_id === $remote->getId()) {
                             $host_hash = null;
                         } else {
                             $host_hash = md5($this->review->host['public_key']);
                         }
                     } else {
                         $host_hash = md5($myHost['public_key']);
                     }
                     $remote->pushDataToEndpoint("add_comment/" . $review_id . "/" . $host_hash, $data);
                 }
             }
         }
     }
 }
开发者ID:Krassmus,项目名称:LehrMarktplatz,代码行数:60,代码来源:LernmarktplatzComment.php

示例3: plugin_newpage_action

function plugin_newpage_action()
{
    global $vars;
    $qm = get_qm();
    if (PKWK_READONLY) {
        die_message($qm->m['fmt_err_pkwk_readonly']);
    }
    if ($vars['page'] == '') {
        $retvars['msg'] = $qm->m['plg_newpage']['label'];
        $retvars['body'] = plugin_newpage_convert();
        if (preg_match('/id="([^"]+)"/', $retvars['body'], $ms)) {
            $domid = $ms[1];
            //jquery ライブラリの読み込み
            $qt = get_qt();
            $qt->setv('jquery_include', true);
            $addscript = <<<EOS
<script type="text/javascript">
jQuery(function(){
\tjQuery("#{$domid}").focus().select();
});
</script>
EOS;
            $qt->appendv_once('plugin_select_fsize', 'beforescript', $addscript);
        }
        return $retvars;
    } else {
        $page = strip_bracket($vars['page']);
        $r_page = rawurlencode(isset($vars['refer']) ? get_fullname($page, $vars['refer']) : $page);
        $r_refer = rawurlencode($vars['refer']);
        pkwk_headers_sent();
        header('Location: ' . get_script_uri() . '?cmd=read&page=' . $r_page . '&refer=' . $r_refer);
        exit;
    }
}
开发者ID:big2men,项目名称:qhm,代码行数:34,代码来源:newpage.inc.php

示例4: afterStoreCallback

 public function afterStoreCallback()
 {
     if (!$this->material['host_id'] && $this->material['user_id'] !== $GLOBALS['user']->id) {
         PersonalNotifications::add($this->material['user_id'], URLHelper::getURL("plugins.php/lernmarktplatz/market/details/" . $this->material->getId() . "#review_" . $this->getId()), $this->isNew() ? sprintf(_("%s hat ein Review zu '%s' geschrieben."), $this['host_id'] ? LernmarktplatzUser::find($this['user_id'])->name : get_fullname($this['user_id']), $this->material['name']) : sprintf(_("%s hat ein Review zu '%s' verändert."), $this['host_id'] ? LernmarktplatzUser::find($this['user_id'])->name : get_fullname($this['user_id']), $this->material['name']), "review_" . $this->getId(), Icon::create("support", "clickable"));
     }
     //only push if the comment is from this server and the material-server is different
     if ($this->material['host_id'] && !$this['host_id'] && $this->isDirty()) {
         $remote = new LernmarktplatzHost($this->material['host_id']);
         $myHost = LernmarktplatzHost::thisOne();
         $data = array();
         $data['host'] = array('name' => $myHost['name'], 'url' => $myHost['url'], 'public_key' => $myHost['public_key']);
         $data['data'] = $this->toArray();
         $data['data']['foreign_review_id'] = $data['data']['review_id'];
         unset($data['data']['review_id']);
         unset($data['data']['id']);
         unset($data['data']['user_id']);
         unset($data['data']['host_id']);
         $user_description_datafield = DataField::find(get_config("LERNMARKTPLATZ_USER_DESCRIPTION_DATAFIELD")) ?: DataField::findOneBySQL("name = ?", array(get_config("LERNMARKTPLATZ_USER_DESCRIPTION_DATAFIELD")));
         if ($user_description_datafield) {
             $datafield_entry = DatafieldEntryModel::findOneBySQL("range_id = ? AND datafield_id = ?", array($this['user_id'], $user_description_datafield->getId()));
         }
         $data['user'] = array('user_id' => $this['user_id'], 'name' => get_fullname($this['user_id']), 'avatar' => Avatar::getAvatar($this['user_id'])->getURL(Avatar::NORMAL), 'description' => $datafield_entry ? $datafield_entry['content'] : null);
         if (!$remote->isMe()) {
             $remote->pushDataToEndpoint("add_review/" . $this->material['foreign_material_id'], $data);
         }
     }
 }
开发者ID:Krassmus,项目名称:LehrMarktplatz,代码行数:27,代码来源:LernmarktplatzReview.php

示例5: plugin_newpage_action

function plugin_newpage_action()
{
    global $vars;
    $_btn_edit = _('Edit');
    $_msg_newpage = _('New page');
    // if (PKWK_READONLY) die_message('PKWK_READONLY prohibits editing');
    if (auth::check_role('readonly')) {
        die_message(_('PKWK_READONLY prohibits editing'));
    }
    if (auth::is_check_role(PKWK_CREATE_PAGE)) {
        die_message(_('PKWK_CREATE_PAGE prohibits editing'));
    }
    if ($vars['page'] == '') {
        $retvars['msg'] = $_msg_newpage;
        $retvars['body'] = plugin_newpage_convert();
        return $retvars;
    } else {
        $page = strip_bracket($vars['page']);
        if (isset($vars['refer'])) {
            $r_page = get_fullname($page, $vars['refer']);
            $r_refer = 'refer=' . $vars['refer'];
        } else {
            $r_page = $page;
            $r_refer = '';
        }
        pkwk_headers_sent();
        header('Location: ' . get_page_location_uri($r_page, $r_refer));
        exit;
    }
}
开发者ID:aterai,项目名称:pukiwiki-plus-i18n,代码行数:30,代码来源:newpage.inc.php

示例6: user

 function user($userid, $action, $page)
 {
     $userid = $this->home_model->check_user_existance($userid);
     $return = $this->global_function->initialize('user', TRUE, $userid);
     $username = $return['username'];
     if ($userid != FALSE) {
         $return['sidebar_stats'] = $this->home_model->get_sidebar_stats($userid);
         $return['badges'] = $this->home_model->get_badges($userid);
         if ($action == 'following') {
             $return['main'] = $this->home_model->get_user_following($userid, $page, $username);
             $return['content_type'] = 'people';
             $return['body_title'] = get_fullname($userid, FALSE) . '\'s Following';
         } elseif ($action == 'followers') {
             $return['main'] = $this->home_model->get_user_followers($userid, $page, $username);
             $return['content_type'] = 'people';
             $return['body_title'] = get_fullname($userid, FALSE) . '\'s Followers';
         } elseif ($action == '') {
             $return['main'] = $this->home_model->get_user_timeline($userid, $page);
             $return['body_title'] = get_fullname($userid, FALSE) . '\'s Activities';
         } elseif ($action == 'followings') {
             redirect('/' . $userid . '/following');
         } elseif ($action == 'follower') {
             redirect('/' . $userid . '/followers');
         } else {
             redirect('/' . $userid);
         }
         $this->global_function->load_view($return);
     } else {
         $this->global_function->load_view($return, TRUE, 404);
     }
 }
开发者ID:stephenou,项目名称:OneExtraLap,代码行数:31,代码来源:home.php

示例7: like

 /**
  * Set the posting denoted by the passed topic_id as liked for the
  * currently logged in user
  * 
  * @param string $topic_id
  */
 static function like($topic_id)
 {
     $stmt = DBManager::get()->prepare("REPLACE INTO\n            forum_likes (topic_id, user_id)\n            VALUES (?, ?)");
     $stmt->execute(array($topic_id, $GLOBALS['user']->id));
     // get posting owner
     $data = ForumEntry::getConstraints($topic_id);
     // notify owner of posting about the like
     setTempLanguage($data['user_id']);
     $notification = get_fullname($GLOBALS['user']->id) . _(' gefällt einer deiner Forenbeiträge!');
     restoreLanguage();
     PersonalNotifications::add($data['user_id'], PluginEngine::getURL('coreforum/index/index/' . $topic_id . '?highlight_topic=' . $topic_id . '#' . $topic_id), $notification, $topic_id, Icon::create('forum', 'clickable')->asImagePath(40));
 }
开发者ID:ratbird,项目名称:hope,代码行数:18,代码来源:ForumLike.php

示例8: Studip_User

 function Studip_User($user)
 {
     $fields = self::get_fields();
     foreach ($fields as $field) {
         if (isset($user[$field])) {
             $this->{$field} = $user[$field];
         }
     }
     if (isset($this->id)) {
         $this->fullname = get_fullname($this->id);
     }
 }
开发者ID:ratbird,项目名称:hope,代码行数:12,代码来源:studip_user.php

示例9: check_page

 /**
  * Check validity of page
  *
  * @access static
  * @param string $page
  * @param array $options
  * @return $options
  */
 function check_page($page, $current)
 {
     $page = get_fullname($page, $current);
     if (!is_page($page)) {
         sonots::mythrow('Page "' . htmlspecialchars($page) . '" does not exist.');
         return;
     }
     if (!check_readable($page, FALSE, FALSE)) {
         sonots::mythrow('Page "' . htmlspecialchars($page) . '" is not readable.');
         return;
     }
     return $page;
 }
开发者ID:orangeal2o3,项目名称:pukiwiki-plugin,代码行数:21,代码来源:contentsx.inc.php

示例10: mention

 /**
  * Notifies the user with Stud.IP-message that/he/she was mentioned in a
  * blubber-posting.
  * @param type $posting
  */
 public function mention($posting)
 {
     $messaging = new messaging();
     setTempLanguage($this->getId());
     $url = $GLOBALS['ABSOLUTE_URI_STUDIP'] . "plugins.php/blubber/streams/thread/" . $posting['root_id'] . ($posting['context_type'] === "course" ? '?cid=' . $posting['Seminar_id'] : "");
     $body = sprintf(gettext("%s hat Sie in einem Blubber erwähnt. Zum Beantworten klicken auf Sie auf folgenen Link:\n\n%s\n"), get_fullname(), $url);
     if ($posting['context_type'] === "course" && !$GLOBALS['perm']->have_studip_perm("user", $posting['Seminar_id'], $this->getId())) {
         $body .= "\n\n" . _("Sie sind noch kein Mitglied der zugehörigen Veranstaltung. Melden Sie sich erst hier an, damit Sie den Blubber sehen können: ") . ($GLOBALS['SEM_CLASS'][$GLOBALS['SEM_TYPE'][Course::find($posting['Seminar_id'])->status]['class']]['studygroup_mode'] ? $GLOBALS['ABSOLUTE_URI_STUDIP'] . "dispatch.php/course/studygroup/details/" . $posting['Seminar_id'] : $GLOBALS['ABSOLUTE_URI_STUDIP'] . "dispatch.php/course/details?sem_id=" . $posting['Seminar_id']);
     }
     $mention_text = _("Sie wurden erwähnt.");
     restoreLanguage();
     $messaging->insert_message($body, $this['username'], $GLOBALS['user']->id, null, null, null, null, $mention_text);
 }
开发者ID:ratbird,项目名称:hope,代码行数:18,代码来源:BlubberUser.class.php

示例11: setThreadForIssue

 /**
  * Create/Update the linked posting for the passed issue_id
  * 
  * @param string $seminar_id
  * @param string $issue_id    issue id to link to
  * @param string $title       (new) title of the posting
  * @param string $content     (new) content of the posting
  */
 static function setThreadForIssue($seminar_id, $issue_id, $title, $content)
 {
     if ($topic_id = self::getThreadIdForIssue($issue_id)) {
         // update
         ForumEntry::update($topic_id, $title ?: _('Ohne Titel'), $content);
     } else {
         // create
         // make sure the forum is set up properly
         ForumEntry::checkRootEntry($seminar_id);
         $topic_id = md5(uniqid(rand()));
         ForumEntry::insert(array('topic_id' => $topic_id, 'seminar_id' => $seminar_id, 'user_id' => $GLOBALS['user']->id, 'name' => $title ?: _('Ohne Titel'), 'content' => $content, 'author' => get_fullname($GLOBALS['user']->id), 'author_host' => getenv('REMOTE_ADDR')), $seminar_id);
         $stmt = DBManager::get()->prepare("INSERT INTO forum_entries_issues\n                (issue_id, topic_id) VALUES (?, ?)");
         $stmt->execute(array($issue_id, $topic_id));
     }
 }
开发者ID:ratbird,项目名称:hope,代码行数:23,代码来源:ForumIssue.php

示例12: get_group_names

/**
 *
 * @param unknown_type $group_field
 * @param unknown_type $groups
 */
function get_group_names($group_field, $groups)
{
    global $SEM_TYPE, $SEM_CLASS;
    $groupcount = 1;
    if ($group_field == 'sem_tree_id') {
        $the_tree = TreeAbstract::GetInstance("StudipSemTree", array("build_index" => true));
    }
    if ($group_field == 'sem_number') {
        $all_semester = SemesterData::GetSemesterArray();
    }
    foreach ($groups as $key => $value) {
        switch ($group_field) {
            case 'sem_number':
                $ret[$key] = $all_semester[$key]['name'];
                break;
            case 'sem_tree_id':
                if ($the_tree->tree_data[$key]) {
                    //$ret[$key] = $the_tree->getShortPath($key);
                    $ret[$key][0] = $the_tree->tree_data[$key]['name'];
                    $ret[$key][1] = $the_tree->getShortPath($the_tree->tree_data[$key]['parent_id']);
                } else {
                    //$ret[$key] = _("keine Studienbereiche eingetragen");
                    $ret[$key][0] = _("keine Studienbereiche eingetragen");
                    $ret[$key][1] = '';
                }
                break;
            case 'sem_status':
                $ret[$key] = $SEM_TYPE[$key]["name"] . " (" . $SEM_CLASS[$SEM_TYPE[$key]["class"]]["name"] . ")";
                break;
            case 'not_grouped':
                $ret[$key] = _("keine Gruppierung");
                break;
            case 'gruppe':
                $ret[$key] = _("Gruppe") . " " . $groupcount;
                $groupcount++;
                break;
            case 'dozent_id':
                $ret[$key] = get_fullname($key, 'no_title_short');
                break;
            default:
                $ret[$key] = 'unknown';
                break;
        }
    }
    return $ret;
}
开发者ID:ratbird,项目名称:hope,代码行数:51,代码来源:meine_seminare_func.inc.php

示例13: StudipLitList

    /**
    * constructor
    *
    * do not use directly, call TreeAbstract::GetInstance("StudipLitList", $range_id)
    * @access private
    */
    function StudipLitList($range_id) {
        DbView::addView('literatur');

        if ($GLOBALS['LIT_LIST_FORMAT_TEMPLATE']){
            $this->format_default = $GLOBALS['LIT_LIST_FORMAT_TEMPLATE'];
        }
        $this->range_id = $range_id;
        $this->range_type = get_object_type($range_id);
        if ($this->range_type == "user"){
            $this->root_name = get_fullname($range_id);
        } else {
            $object_name = get_object_name($range_id, $this->range_type);
            $this->root_name = $object_name['type'] . ": " . $object_name['name'];
        }
        $this->cat_element = new StudipLitCatElement();
        parent::TreeAbstract(); //calling the baseclass constructor
    }
开发者ID:ratbird,项目名称:hope,代码行数:23,代码来源:StudipLitList.class.php

示例14: plugin_newpage_action

function plugin_newpage_action()
{
    global $vars, $_btn_edit, $_msg_newpage;
    if (PKWK_READONLY) {
        die_message('PKWK_READONLY prohibits editing');
    }
    if ($vars['page'] == '') {
        $retvars['msg'] = $_msg_newpage;
        $retvars['body'] = plugin_newpage_convert();
        return $retvars;
    } else {
        $page = strip_bracket($vars['page']);
        $r_page = rawurlencode(isset($vars['refer']) ? get_fullname($page, $vars['refer']) : $page);
        $r_refer = rawurlencode($vars['refer']);
        pkwk_headers_sent();
        header('Location: ' . get_script_uri() . '?cmd=read&page=' . $r_page . '&refer=' . $r_refer);
        exit;
    }
}
开发者ID:nsmr0604,项目名称:pukiwiki,代码行数:19,代码来源:newpage.inc.php

示例15: plugin_lastmod_inline

function plugin_lastmod_inline()
{
    global $vars;
    global $WikiName, $BracketName;
    $args = func_get_args();
    if ($args[0]) {
        if (preg_match("/^({$WikiName}|\\[\\[{$BracketName}\\]\\])\$/", $args[0])) {
            $_page = get_fullname(strip_bracket($args[0]), $vars["page"]);
        } else {
            return FALSE;
        }
    } else {
        $_page = $vars["page"];
    }
    if (!is_page($_page)) {
        return FALSE;
    }
    return format_date(get_filetime($_page));
}
开发者ID:aterai,项目名称:pukiwiki-plus-i18n,代码行数:19,代码来源:lastmod.inc.php


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