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


PHP lms_steam::get_faculty_name方法代码示例

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


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

示例1: get_cache_function

    $html_people->setVariable("TH_MANAGE_CONTACT", '');
    for ($i = $start; $i < $end; $i++) {
        $visitor = $result[$i]["visitor"];
        $referer = $result[$i]["referer"];
        if (!is_object($visitor)) {
            continue;
        }
        //Skip if the entry is not an object
        $cache = get_cache_function($visitor->get_name());
        $attributes = $cache->call("lms_steam::user_get_profile", $visitor->get_name());
        $html_people->setCurrentBlock("BLOCK_CONTACT");
        $html_people->setVariable("CONTACT_LINK", PATH_URL . "user/" . $visitor->get_name() . "/");
        $icon_link = $attributes["OBJ_ICON"] == 0 ? PATH_STYLE . "images/anonymous.jpg" : PATH_URL . "cached/get_document.php?id=" . $attributes["OBJ_ICON"] . "&type=usericon&width=30&height=40";
        $html_people->setVariable("CONTACT_IMAGE", $icon_link);
        $html_people->setVariable("CONTACT_NAME", $attributes["USER_FIRSTNAME"] . " " . $attributes["USER_FULLNAME"]);
        $html_people->setVariable("LINK_SEND_MESSAGE", PATH_URL . "messages_write.php?to=" . $visitor->get_name());
        $html_people->setVariable("LABEL_MESSAGE", gettext("Message"));
        $html_people->setVariable("LABEL_SEND", gettext("Send"));
        $html_people->setVariable("OBJ_DESC", h($attributes["OBJ_DESC"]));
        $fof = lms_steam::get_faculty_name($attributes["USER_PROFILE_FACULTY"]);
        $fof .= empty($attributes["USER_PROFILE_FOCUS"]) ? "" : ", " . htmlentities($attributes["USER_PROFILE_FOCUS"], ENT_QUOTES, "UTF-8");
        $html_people->setVariable("FACULTY_AND_FOCUS", $fof);
        //$html_people->setVariable( "TD_MANAGE_CONTACT", "<td align=\"center\">".resolve_referer( $referer )."</td>" );
        $html_people->parse("BLOCK_CONTACT");
    }
    $html_people->parse("BLOCK_CONTACT_LIST");
} else {
    $html_people->setVariable("LABEL_CONTACTS", gettext("No visitors yet."));
}
$portal->set_page_main(array(array("link" => PATH_URL . "user/" . $user->get_name() . "/", "name" => gettext("Your Profile")), array("linK" => "", "name" => gettext("Members who have recently visited your contact page"))), $html_people->get(), "");
$portal->show_html();
开发者ID:rolwi,项目名称:koala,代码行数:31,代码来源:profile_visitors.php

示例2: execute

 public function execute(\FrameResponseObject $frameResponseObject)
 {
     //var_dump($request);
     $current_user = \lms_steam::get_current_user();
     //var_dump($current_user);die;
     $name = $this->id;
     if ($name != "") {
         //$userName = $path[2];
         $user = \steam_factory::get_user($GLOBALS["STEAM"]->get_id(), $name);
     } else {
         $user = $current_user;
     }
     $login = $user->get_name();
     $cache = get_cache_function($login, 3600);
     //$portal = \lms_portal::get_instance();
     //$portal->set_page_title( $login );
     $user_profile = $cache->call("lms_steam::user_get_profile", $login);
     $html_handler_profile = new \koala_html_profile($user);
     $html_handler_profile->set_context("profile");
     $GLOBALS["content"] = \Profile::getInstance()->loadTemplate("profile_display.template.html");
     //$content = new HTML_TEMPLATE_IT();
     //$content->loadTemplateFile( PATH_TEMPLATES . "profile_display.template.html" );
     if (!empty($user_profile["USER_PROFILE_DSC"])) {
         $GLOBALS["content"]->setVariable("HTML_CODE_DESCRIPTION", "<p>" . get_formatted_output($user_profile["USER_PROFILE_DSC"]) . "</p>");
     }
     if (!empty($user_profile["USER_PROFILE_WEBSITE_URI"])) {
         $website_name = h(empty($user_profile["USER_PROFILE_WEBSITE_NAME"]) ? $user_profile["USER_PROFILE_WEBSITE_URI"] : $user_profile["USER_PROFILE_WEBSITE_NAME"]);
         $GLOBALS["content"]->setVariable("HTML_CODE_PERSONAL_WEBSITE", "<br/><b>" . gettext("Website") . ":</b> <a href=\"" . h($user_profile["USER_PROFILE_WEBSITE_URI"]) . "\" target=\"_blank\">{$website_name}</a>");
     }
     //get Buddys from user and put them into the $globals-Array for authorization-query
     $confirmed = $user->get_id() != $current_user->get_id() ? TRUE : FALSE;
     $contacts = $cache->call("lms_steam::user_get_buddies", $login, $confirmed);
     $tmp = array();
     foreach ($contacts as $contact) {
         $tmp[] = $contact["OBJ_ID"];
     }
     $GLOBALS["contact_ids"] = $tmp;
     //get Viewer-Authorization and put them into the $globals-Array for authorization-query
     $user_privacy = $cache->call("lms_steam::user_get_profile_privacy", $user->get_name());
     $GLOBALS["authorizations"] = $user_privacy;
     $GLOBALS["current user"] = $current_user;
     //$GLOBALS["content"] = $content;
     ///////////////////////////////////////////////////
     //////////////  GENERAL INFORMATION  //////////////
     ///////////////////////////////////////////////////
     // Status
     if (ENABLED_BID_DESCIPTION) {
         $user_profile_desc = $user_profile["OBJ_DESC"];
         $status = secure_gettext($user_profile_desc);
         if ($status != "" && !is_integer($status)) {
             $this->display("GENERAL", "Beschreibung", $status);
         }
     }
     if (ENABLED_STATUS) {
         $user_profile_desc = empty($user_profile["OBJ_DESC"]) ? "student" : $user_profile["OBJ_DESC"];
         $status = secure_gettext($user_profile_desc);
         $this->display("GENERAL", "Status", $status);
     }
     if (ENABLED_EMAIL) {
         $user_email = empty($user_profile["USER_EMAIL"]) ? "keine E-Mail-Adresse gesetzt" : $user_profile["USER_EMAIL"];
         $this->display("GENERAL", "E-Mail-Adresse", h($user_email));
     }
     if (ENABLED_BID_EMAIL) {
         $helper = empty($user_profile["USER_EMAIL"]) ? true : false;
         $user_email = empty($user_profile["USER_EMAIL"]) ? "keine E-Mail-Adresse gesetzt" : $user_profile["USER_EMAIL"];
         if ($helper) {
             $this->display("GENERAL", "E-Mail", h($user_email));
         } else {
             $mail = h($user_profile["USER_EMAIL"]);
             $mail1 = '<a href="mailto:' . $mail . '">' . $mail . '</a>';
             //var_dump($mail1);die;
             $this->display("GENERAL", "E-Mail", $mail1);
         }
     }
     // Gender
     if (ENABLED_GENDER) {
         switch (is_string($user_profile["USER_PROFILE_GENDER"]) ? $user_profile["USER_PROFILE_GENDER"] : "X") {
             case "F":
                 $gender = gettext("female");
                 break;
             case "M":
                 $gender = gettext("male");
                 break;
             default:
                 $gender = gettext("rather not say");
                 break;
         }
         $this->display("GENERAL", "Gender", $gender);
     }
     // Origin - Faculty
     if (ENABLED_FACULTY) {
         $faculty = \lms_steam::get_faculty_name($user_profile["USER_PROFILE_FACULTY"]);
         $this->display("GENERAL", "Origin", $faculty);
     }
     if (ENABLED_WANTS) {
         $this->display("GENERAL", "Wants", h($user_profile["USER_PROFILE_WANTS"]));
     }
     if (ENABLED_HAVES) {
         $this->display("GENERAL", "Haves", h($user_profile["USER_PROFILE_HAVES"]));
     }
//.........这里部分代码省略.........
开发者ID:rolwi,项目名称:koala,代码行数:101,代码来源:Index.class.php

示例3: group_get_members

 public static function group_get_members($group_id, $matriculation_numbers = FALSE)
 {
     if (!($group = steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $group_id))) {
         throw new Exception("No valid object id ({$group_id}).", E_PARAMETER);
     }
     if (!$group instanceof steam_group) {
         throw new Exception("Object is not a group ({$group_id}).", E_PAREMETER);
     }
     $members = $group->get_members();
     $attributes = array("USER_FIRSTNAME", "USER_FULLNAME", "OBJ_ICON", "OBJ_DESC", "USER_ACADEMIC_TITLE", "USER_SUBJECT_AREA", "USER_PROFILE_FACULTY", "USER_PROFILE_FOCUS", "USER_EMAIL", "OBJ_NAME", "USER_CONTACTS_CONFIRMED", "USER_TRASHED");
     if ($matriculation_numbers) {
         $attributes[] = "ldap:USER_MATRICULATION_NUMBER";
     }
     steam_factory::load_attributes($GLOBALS["STEAM"]->get_id(), $members, $attributes);
     $i = 0;
     $result = array();
     foreach ($members as $member) {
         if ($member instanceof steam_group) {
             continue;
         }
         $result[$i] = $member->get_attributes($attributes);
         $result[$i]["OBJ_NAME"] = $member->get_name();
         $result[$i]["OBJ_ID"] = $member->get_id();
         if (is_object($result[$i]["OBJ_ICON"])) {
             $result[$i]["OBJ_ICON"] = $result[$i]["OBJ_ICON"]->get_id();
         } else {
             $result[$i]["OBJ_ICON"] = 0;
         }
         $faf = lms_steam::get_faculty_name($result[$i]["USER_PROFILE_FACULTY"]);
         $faf .= empty($result[$i]["USER_PROFILE_FOCUS"]) ? "" : ", " . $result[$i]["USER_PROFILE_FOCUS"];
         $result[$i]["USER_PROFILE_FACULTY"] = $faf;
         $i++;
     }
     usort($result, "sort_buddies");
     return $result;
 }
开发者ID:rolwi,项目名称:koala,代码行数:36,代码来源:lms_steam.class.php

示例4: switch

    switch (is_string($user_profile["USER_PROFILE_GENDER"]) ? $user_profile["USER_PROFILE_GENDER"] : "X") {
        case "F":
            $gender = gettext("female");
            break;
        case "M":
            $gender = gettext("male");
            break;
        default:
            $gender = gettext("rather not say");
            break;
    }
    display("GENERAL", "Gender", $gender);
}
// Origin - Faculty
if (PROFILE_GENERAL) {
    $faculty = lms_steam::get_faculty_name($user_profile["USER_PROFILE_FACULTY"]);
    display("GENERAL", "Origin", $faculty);
    display("GENERAL", "Wants", h($user_profile["USER_PROFILE_WANTS"]));
    display("GENERAL", "Haves", h($user_profile["USER_PROFILE_HAVES"]));
    display("GENERAL", "Organizations", h($user_profile["USER_PROFILE_ORGANIZATIONS"]));
    display("GENERAL", "Hometown", h($user_profile["USER_PROFILE_HOMETOWN"]));
    display("GENERAL", "Main focus", h($user_profile["USER_PROFILE_FOCUS"]));
    display("GENERAL", "Other interests", h($user_profile["USER_PROFILE_OTHER_INTERESTS"]));
}
// LANGUAGE
if (PROFILE_LANGUAGE) {
    $languages = array("english" => array("name" => gettext("English"), "icon" => "flag_gb.gif", "lang_key" => "en_US"), "german" => array("name" => gettext("German"), "icon" => "flag_de.gif", "lang_key" => "de_DE"));
    $ulang = $user_profile["USER_LANGUAGE"];
    if (!is_string($ulang) || $ulang === "0") {
        $ulang = LANGUAGE_DEFAULT_STEAM;
    }
开发者ID:rolwi,项目名称:koala,代码行数:31,代码来源:user_profile.php

示例5: gettext

 // CONTACTS
 $content->setVariable("LABEL_NAME_POSITION", gettext("Name, position"));
 $content->setVariable("LABEL_SUBJECT_AREA", gettext("Origin/Focus"));
 $content->setVariable("LABEL_COMMUNICATION", gettext("Communication"));
 if ($user->get_id() == $current_user->get_id()) {
     $content->setVariable("TH_MANAGE_CONTACT", gettext("Manage contact"));
 }
 for ($i = $start; $i < $end; $i++) {
     $contact = $contacts[$i];
     $content->setCurrentBlock("BLOCK_CONTACT");
     $content->setVariable("CONTACT_LINK", PATH_URL . "user/" . h($contact["OBJ_NAME"]) . "/");
     $icon_link = $contact["OBJ_ICON"] == 0 ? PATH_STYLE . "images/anonymous.jpg" : PATH_URL . "cached/get_document.php?id=" . h($contact["OBJ_ICON"]) . "&type=usericon&width=30&height=40";
     $content->setVariable("CONTACT_IMAGE", $icon_link);
     $title = !empty($contact["USER_ACADEMIC_TITLE"]) ? h($contact["USER_ACADEMIC_TITLE"]) . " " : "";
     $content->setVariable("CONTACT_NAME", $title . h($contact["USER_FIRSTNAME"]) . " " . h($contact["USER_FULLNAME"]));
     $faf = lms_steam::get_faculty_name($contact["USER_PROFILE_FACULTY"]);
     $faf .= empty($contact["USER_PROFILE_FOCUS"]) ? "" : ": " . h($contact["USER_PROFILE_FOCUS"]);
     $content->setVariable("FACULTY_AND_FOCUS", $faf);
     $content->setVariable("LINK_SEND_MESSAGE", PATH_URL . "messages_write.php?to=" . h($contact["OBJ_NAME"]));
     $content->setVariable("LABEL_MESSAGE", gettext("Message"));
     $content->setVariable("LABEL_SEND", gettext("Send"));
     $cmessage = "";
     if ($user->get_id() == $current_user->get_id()) {
         if (isset($confirmed_contacts[$contact["OBJ_ID"]]) && $confirmed_contacts[$contact["OBJ_ID"]]) {
             $cmessage .= "(" . gettext("Confirmed") . ")";
         } else {
             $cmessage .= "(" . gettext("Unconfirmed") . ")";
         }
         $content->setVariable("TD_MANAGE_CONTACT", "<td align=\"center\"><a href=\"" . PATH_URL . "contact_delete.php?id=" . h($contact["OBJ_ID"]) . "\">" . gettext("Delete") . "</a></td>");
     }
     $contact_desc = empty($contact["OBJ_DESC"]) ? "student" : $contact["OBJ_DESC"];
开发者ID:rolwi,项目名称:koala,代码行数:31,代码来源:user_contacts.php

示例6: execute

 public function execute(\FrameResponseObject $frameResponseObject)
 {
     $current_user = \lms_steam::get_current_user();
     //$path = $request->getPath();
     if ($this->id != "") {
         $userName = $this->id;
         $user = \steam_factory::get_user($GLOBALS["STEAM"]->get_id(), $userName);
     } else {
         $user = $current_user;
     }
     $login = $current_user->get_name();
     $cache = get_cache_function($login, 86400);
     //$portal = \lms_portal::get_instance();
     //$portal->set_page_title( $login );
     $html_handler_profile = new \koala_html_profile($user);
     $html_handler_profile->set_context("contacts");
     if ($this->viewer_authorized($current_user, $user)) {
         // Display Contacts
         $unconfirmed_html = "";
         // Contacts to confirm (visible only for the user himself)
         if ($current_user->get_id() == $user->get_id()) {
             $content = \Profile::getInstance()->loadTemplate("list_users.template.html");
             //$content = new HTML_TEMPLATE_IT();
             //$content->loadTemplateFile( PATH_TEMPLATES . "list_users.template.html" );
             $contacts = $cache->call("lms_steam::user_get_contacts_to_confirm", $login);
             $no_contacts = count($contacts);
             if ($no_contacts > 0) {
                 $content->setCurrentBlock("BLOCK_CONTACT_LIST");
                 $result = \lms_portal::get_paginator($content, 10, $no_contacts, "(" . gettext("%TOTAL contact requests in list") . ")");
                 $content->setVariable("PAGEITERATOR", $result["html"]);
                 $start = $result["start"];
                 $end = $start + 10 > $no_contacts ? $no_contacts : $start + 10;
                 if ($current_user->get_id() == $user->get_id()) {
                     $content->setVariable("LABEL_CONTACTS", gettext("Contact requests") . " (" . str_replace(array("%a", "%z", "%s"), array($start + 1, $end, $no_contacts), gettext("%a-%z out of %s")) . ")");
                 } else {
                     $content->setVariable("LABEL_CONTACTS", str_replace("%NAME", h($user->get_attribute("USER_FIRSTNAME")) . " " . h($user->get_attribute("USER_FULLNAME")), gettext("%NAME's contacts")) . " (" . str_replace(array("%a", "%z", "%s"), array($start + 1, $end, $no_contacts), gettext("%a-%z out of %s")) . ")");
                 }
                 // CONTACTS
                 $content->setVariable("LABEL_NAME_POSITION", gettext("Name, position"));
                 $content->setVariable("LABEL_SUBJECT_AREA", gettext("Origin/Focus"));
                 $content->setVariable("LABEL_COMMUNICATION", gettext("Communication"));
                 if ($user->get_id() == $current_user->get_id()) {
                     $content->setVariable("TH_MANAGE_CONTACT", gettext("Manage request"));
                 }
                 for ($i = $start; $i < $end; $i++) {
                     $contact = $contacts[$i];
                     $content->setCurrentBlock("BLOCK_CONTACT");
                     $content->setVariable("CONTACT_LINK", PATH_URL . "profile/" . h($contact["OBJ_NAME"]) . "/");
                     $icon_link = $contact["OBJ_ICON"] == 0 ? PATH_STYLE . "images/anonymous.jpg" : PATH_URL . "cached/get_document.php?id=" . h($contact["OBJ_ICON"]) . "&type=usericon&width=30&height=40";
                     $content->setVariable("CONTACT_IMAGE", $icon_link);
                     $title = !empty($contact["USER_ACADEMIC_TITLE"]) ? h($contact["USER_ACADEMIC_TITLE"]) . " " : "";
                     $content->setVariable("CONTACT_NAME", $title . h($contact["USER_FIRSTNAME"]) . " " . h($contact["USER_FULLNAME"]));
                     $faf = \lms_steam::get_faculty_name($contact["USER_PROFILE_FACULTY"]);
                     $faf .= empty($contact["USER_PROFILE_FOCUS"]) ? "" : ": " . h($contact["USER_PROFILE_FOCUS"]);
                     $content->setVariable("FACULTY_AND_FOCUS", $faf);
                     $content->setVariable("LINK_SEND_MESSAGE", PATH_URL . "messages_write.php?to=" . h($contact["OBJ_NAME"]));
                     $content->setVariable("LABEL_MESSAGE", gettext("Message"));
                     $content->setVariable("LABEL_SEND", gettext("Send"));
                     if ($user->get_id() == $current_user->get_id()) {
                         $content->setVariable("TD_MANAGE_CONTACT", "<td align=\"center\"><a href=\"" . PATH_URL . "contact_confirm.php?id=" . h($contact["OBJ_ID"]) . "\">" . gettext("Confirm") . " / " . gettext("Deny") . "</a></td>");
                     }
                     $contact_desc = empty($contact["OBJ_DESC"]) ? "student" : $contact["OBJ_DESC"];
                     $status = secure_gettext($contact_desc);
                     $content->setVariable("OBJ_DESC", h($status));
                     $content->parse("BLOCK_CONTACT");
                 }
                 $content->parse("BLOCK_CONTACT_LIST");
             }
             $unconfirmed_html = $content->get();
         }
         $content = \Profile::getInstance()->loadTemplate("list_users.template.html");
         //$content = new HTML_TEMPLATE_IT();
         //$content->loadTemplateFile( PATH_TEMPLATES . "list_users.template.html" );
         // Contact list
         $confirmed = $user->get_id() != $current_user->get_id() ? TRUE : FALSE;
         $contacts = $cache->call("lms_steam::user_get_buddies", $login, $confirmed);
         // If user views his own contact list, get information about the confirmed contacts too
         //HACK START DOMINIK FRAGEN!
         $confirmed_contacts = "";
         //HACK END
         if (!$confirmed) {
             $confirmed_contacts = $user->get_attribute("USER_CONTACTS_CONFIRMED");
         }
         if (!is_array($confirmed_contacts)) {
             $confirmed_contacts = array();
         }
         $no_contacts = count($contacts);
         if ($no_contacts > 0) {
             $content->setCurrentBlock("BLOCK_CONTACT_LIST");
             $start = $portal->set_paginator($content, 10, $no_contacts, "(" . gettext("%TOTAL contacts in list") . ")");
             $end = $start + 10 > $no_contacts ? $no_contacts : $start + 10;
             if ($current_user->get_id() == $user->get_id()) {
                 $content->setVariable("LABEL_CONTACTS", gettext("Your contacts") . " (" . str_replace(array("%a", "%z", "%s"), array($start + 1, $end, $no_contacts), gettext("%a-%z out of %s")) . ")");
             } else {
                 $content->setVariable("LABEL_CONTACTS", str_replace("%NAME", h($user->get_attribute("USER_FIRSTNAME")) . " " . h($user->get_attribute("USER_FULLNAME")), gettext("%NAME's contacts")) . " (" . str_replace(array("%a", "%z", "%s"), array($start + 1, $end, $no_contacts), gettext("%a-%z out of %s")) . ")");
             }
             // CONTACTS
             $content->setVariable("LABEL_NAME_POSITION", gettext("Name, position"));
             $content->setVariable("LABEL_SUBJECT_AREA", gettext("Origin/Focus"));
             $content->setVariable("LABEL_COMMUNICATION", gettext("Communication"));
//.........这里部分代码省略.........
开发者ID:rolwi,项目名称:koala,代码行数:101,代码来源:Contacts.class.php


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