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


PHP cmsPage::getMetaSearchLink方法代码示例

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


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

示例1: getUser

    public function getUser($login){

		if(is_numeric($login)){
			$where = "u.id = '{$login}'";
		} else {
			$where = "u.login = '{$login}'";
		}

		$sql = "SELECT
				u.*,
                u.status as status_text,
				u.rating as user_rating,
                p.id as pid, p.city, p.description, p.showmail, p.showbirth, p.showicq,
				p.karma, p.imageurl, p.allow_who,
				p.gender as gender,	p.formsdata, p.signature,
				p.email_newmsg, p.cm_subscribe,
				g.title as grp,
				g.alias as group_alias,
				b.user_id as banned,
                IFNULL(ui.login, '') as inv_login,
                IFNULL(ui.nickname, '') as inv_nickname
                FROM cms_users u
				INNER JOIN cms_user_profiles p ON p.user_id = u.id
				INNER JOIN cms_user_groups g ON g.id = u.group_id
				LEFT JOIN cms_banlist b ON b.user_id = u.id AND b.status = 1
                LEFT JOIN cms_users ui ON ui.id = u.invited_by
                WHERE u.is_locked = 0 AND {$where}
                ORDER BY id DESC LIMIT 1";

        $result = $this->inDB->query($sql);

        if (!$this->inDB->num_rows($result)){ return false; }

        $user = $this->inDB->fetch_assoc($result);

		global $_LANG;

		$user['avatar'] = cmsUser::getUserAvatarUrl($user['id'], 'big', $user['imageurl'], $user['is_deleted']);
		$user['status_date'] = cmsCore::dateDiffNow($user['status_date']);
		$user['flogdate']    = cmsUser::getOnlineStatus($user['id'], $user['logdate']);
		$user['fregdate']    = cmsCore::dateFormat($user['regdate']);
		$user['fbirthdate']  = cmsCore::dateFormat($user['birthdate']);
		$user['cityurl']     = urlencode($user['city']);
		$user['profile_link'] = HOST . cmsUser::getProfileURL($user['login']);
		$user['fdescription'] = cmsPage::getMetaSearchLink('/users/hobby/', $user['description']);
        $user['formsdata']    = cmsCore::yamlToArray($user['formsdata']);
		if ($user['gender']) {
			switch ($user['gender']){
				case 'm': $user['fgender'] = $_LANG['MALES']; break;
				case 'f': $user['fgender'] = $_LANG['FEMALES']; break;
				default:  $user['fgender'] = '';
			}
		}

        return cmsCore::callEvent('GET_USER', $user);

    }
开发者ID:Acsac,项目名称:CMS-RuDi,代码行数:57,代码来源:model.php

示例2: getFormFieldValue

 /**
  * Возвращает значение поля формы
  * @param array $form_field Массив поля формы
  * @return string html
  */
 public function getFormFieldValue($form_field)
 {
     if (in_array($form_field['kind'], $this->kinds)) {
         $method_name = 'get' . icms_ucfirst($form_field['kind']) . 'Value';
         if (method_exists($this, $method_name)) {
             return call_user_func_array(array($this, $method_name), array($form_field));
         }
         return !empty($form_field['config']['text_is_link']) && $form_field['config']['text_link_prefix'] ? cmsPage::getMetaSearchLink($form_field['config']['text_link_prefix'], $this->getFieldValue($form_field['id'])) : $this->getFieldValue($form_field['id']);
     }
 }
开发者ID:4uva4ek,项目名称:svato,代码行数:15,代码来源:form.class.php


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