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


PHP ilObjUser::getZipcode方法代码示例

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


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

示例1: getHtml

 /**
  * Get HTML
  */
 function getHtml()
 {
     global $tpl, $lng, $https;
     $this->tpl = new ilTemplate("tpl.openlayers_map.html", true, true, "Services/Maps");
     $lng->loadLanguageModule("maps");
     $tpl->addJavaScript("Services/Maps/js/OpenLayers.js");
     $tpl->addJavaScript("Services/Maps/js/ServiceOpenLayers.js");
     // add user markers
     $cnt = 0;
     foreach ($this->user_marker as $user_id) {
         if (ilObject::_exists($user_id)) {
             $user = new ilObjUser($user_id);
             if ($user->getLatitude() != 0 && $user->getLongitude() != 0 && $user->getPref("public_location") == "y") {
                 $this->tpl->setCurrentBlock("user_marker");
                 $this->tpl->setVariable("UMAP_ID", $this->getMapId());
                 $this->tpl->setVariable("CNT", $cnt);
                 $this->tpl->setVariable("ULAT", htmlspecialchars($user->getLatitude()));
                 $this->tpl->setVariable("ULONG", htmlspecialchars($user->getLongitude()));
                 $info = htmlspecialchars($user->getFirstName() . " " . $user->getLastName());
                 $delim = "<br \\/>";
                 if ($user->getPref("public_institution") == "y") {
                     $info .= $delim . htmlspecialchars($user->getInstitution());
                     $delim = ", ";
                 }
                 if ($user->getPref("public_department") == "y") {
                     $info .= $delim . htmlspecialchars($user->getDepartment());
                 }
                 $delim = "<br \\/>";
                 if ($user->getPref("public_street") == "y") {
                     $info .= $delim . htmlspecialchars($user->getStreet());
                 }
                 if ($user->getPref("public_zip") == "y") {
                     $info .= $delim . htmlspecialchars($user->getZipcode());
                     $delim = " ";
                 }
                 if ($user->getPref("public_city") == "y") {
                     $info .= $delim . htmlspecialchars($user->getCity());
                 }
                 $delim = "<br \\/>";
                 if ($user->getPref("public_country") == "y") {
                     $info .= $delim . htmlspecialchars($user->getCountry());
                 }
                 $this->tpl->setVariable("USER_INFO", $info);
                 $this->tpl->setVariable("IMG_USER", $user->getPersonalPicturePath("xsmall"));
                 $this->tpl->parseCurrentBlock();
                 $cnt++;
             }
         }
     }
     $this->tpl->setVariable("MAP_ID", $this->getMapId());
     $this->tpl->setVariable("WIDTH", $this->getWidth());
     $this->tpl->setVariable("HEIGHT", $this->getHeight());
     $this->tpl->setVariable("LAT", $this->getLatitude());
     $this->tpl->setVariable("LONG", $this->getLongitude());
     $this->tpl->setVariable("ZOOM", (int) $this->getZoom());
     $nav_control = $this->getEnableNavigationControl() ? "true" : "false";
     $this->tpl->setVariable("NAV_CONTROL", $nav_control);
     $central_marker = $this->getEnableCentralMarker() ? "true" : "false";
     $this->tpl->setVariable("CENTRAL_MARKER", $central_marker);
     $replace_marker = $this->getEnableUpdateListener() ? "true" : "false";
     $this->tpl->setVariable("REPLACE_MARKER", $replace_marker);
     $this->tpl->setVariable("INVALID_ADDRESS_STRING", $lng->txt("invalid_address"));
     return $this->tpl->get();
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:67,代码来源:class.ilOpenLayersMapGUI.php

示例2: parseUserPlaceholders

 /**
  * Return all Placeholders of user data
  *
  * @param ilObjUser $user
  * @return array
  */
 protected function parseUserPlaceholders(ilObjUser $user)
 {
     return array('USER_LOGIN' => $this->anonymized ? 'johndoe' : $user->getLogin(), 'USER_TITLE' => $this->anonymized ? 'Mister' : $user->getUTitle(), 'USER_FULLNAME' => $this->anonymized ? 'John Doe' : $user->getFullname(), 'USER_FIRSTNAME' => $this->anonymized ? 'John' : $user->getFirstname(), 'USER_LASTNAME' => $this->anonymized ? 'Doe' : $user->getLastname(), 'USER_BIRTHDAY' => $user->getBirthday(), 'USER_INSTITUTION' => $user->getInstitution(), 'USER_DEPARTMENT' => $user->getDepartment(), 'USER_STREET' => $this->anonymized ? 'Manhattan Street' : $user->getStreet(), 'USER_CITY' => $this->anonymized ? 'New York' : $user->getCity(), 'USER_ZIPCODE' => $this->anonymized ? 10026 : $user->getZipcode(), 'USER_COUNTRY' => $this->anonymized ? 'USA' : $user->getCountry());
 }
开发者ID:studer-raimann,项目名称:Certificate,代码行数:10,代码来源:class.srCertificateStandardPlaceholders.php

示例3: getHtml

 /**
  * Get HTML
  */
 function getHtml()
 {
     global $tpl;
     $this->tpl = new ilTemplate("tpl.google_map.html", true, true, "Services/GoogleMaps");
     $tpl->addJavaScript("//maps.google.com/maps/api/js?sensor=false", false);
     $tpl->addJavaScript("Services/GoogleMaps/js/ServiceGoogleMaps.js");
     // add user markers
     $cnt = 0;
     foreach ($this->user_marker as $user_id) {
         if (ilObject::_exists($user_id)) {
             $user = new ilObjUser($user_id);
             if ($user->getLatitude() != 0 && $user->getLongitude() != 0 && $user->getPref("public_location") == "y") {
                 $this->tpl->setCurrentBlock("user_marker");
                 $this->tpl->setVariable("UMAP_ID", $this->getMapId());
                 $this->tpl->setVariable("CNT", $cnt);
                 $this->tpl->setVariable("ULAT", htmlspecialchars($user->getLatitude()));
                 $this->tpl->setVariable("ULONG", htmlspecialchars($user->getLongitude()));
                 $info = htmlspecialchars($user->getFirstName() . " " . $user->getLastName());
                 $delim = "<br \\/>";
                 if ($user->getPref("public_institution") == "y") {
                     $info .= $delim . htmlspecialchars($user->getInstitution());
                     $delim = ", ";
                 }
                 if ($user->getPref("public_department") == "y") {
                     $info .= $delim . htmlspecialchars($user->getDepartment());
                 }
                 $delim = "<br \\/>";
                 if ($user->getPref("public_street") == "y") {
                     $info .= $delim . htmlspecialchars($user->getStreet());
                 }
                 if ($user->getPref("public_zip") == "y") {
                     $info .= $delim . htmlspecialchars($user->getZipcode());
                     $delim = " ";
                 }
                 if ($user->getPref("public_city") == "y") {
                     $info .= $delim . htmlspecialchars($user->getCity());
                 }
                 $delim = "<br \\/>";
                 if ($user->getPref("public_country") == "y") {
                     $info .= $delim . htmlspecialchars($user->getCountry());
                 }
                 $this->tpl->setVariable("USER_INFO", $info);
                 $this->tpl->setVariable("IMG_USER", $user->getPersonalPicturePath("xsmall"));
                 $this->tpl->parseCurrentBlock();
                 $cnt++;
             }
         }
     }
     $this->tpl->setVariable("MAP_ID", $this->getMapId());
     $this->tpl->setVariable("WIDTH", $this->getWidth());
     $this->tpl->setVariable("HEIGHT", $this->getHeight());
     $this->tpl->setVariable("LAT", $this->getLatitude());
     $this->tpl->setVariable("LONG", $this->getLongitude());
     $this->tpl->setVariable("ZOOM", (int) $this->getZoom());
     $type_control = $this->getEnableTypeControl() ? "true" : "false";
     $this->tpl->setVariable("TYPE_CONTROL", $type_control);
     $nav_control = $this->getEnableNavigationControl() ? "true" : "false";
     $this->tpl->setVariable("NAV_CONTROL", $nav_control);
     $update_listener = $this->getEnableUpdateListener() ? "true" : "false";
     $this->tpl->setVariable("UPDATE_LISTENER", $update_listener);
     $large_map_control = $this->getEnableLargeMapControl() ? "true" : "false";
     $this->tpl->setVariable("LARGE_CONTROL", $large_map_control);
     $central_marker = $this->getEnableCentralMarker() ? "true" : "false";
     $this->tpl->setVariable("CENTRAL_MARKER", $central_marker);
     return $this->tpl->get();
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:69,代码来源:class.ilGoogleMapGUI.php

示例4: loadFromUser

 /**
  * Load user data from ilias user object
  * @param stdclass $user
  * @param ilObjUser $iu
  */
 private function loadFromUser($user, ilObjUser $iu)
 {
     $prefix = ilViteroSettings::getInstance()->getUserPrefix();
     $user->username = $prefix . $iu->getLogin();
     $user->surname = $iu->getLastname();
     $user->firstname = $iu->getFirstname();
     $user->email = $iu->getEmail();
     $user->company = $iu->getInstitution();
     $user->locale = in_array($iu->getLanguage(), $this->available_locales) ? $iu->getLanguage() : "en";
     #$user->timezone = trim($iu->getTimeZone());
     $GLOBALS['ilLog']->write(__METHOD__ . ': Time zone is ' . $iu->getTimeZone());
     $user->phone = $iu->getPhoneOffice();
     $user->fax = $iu->getFax();
     $user->mobile = $iu->getPhoneMobile();
     $user->country = $iu->getCountry();
     $user->zip = $iu->getZipcode();
     $user->city = $iu->getCity();
     $user->street = $iu->getStreet();
 }
开发者ID:leifos-gmbh,项目名称:Vitero,代码行数:24,代码来源:class.ilViteroUserSoapConnector.php


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