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


PHP member_full_name函数代码示例

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


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

示例1: _api_getPerson_row

function _api_getPerson_row($row, $has_party = FALSE)
{
    global $parties;
    $row['full_name'] = member_full_name($row['house'], $row['title'], $row['first_name'], $row['last_name'], $row['constituency']);
    if ($row['house'] == 1) {
        $URL = new URL('mp');
        $row['url'] = $URL->generate('none') . make_member_url($row['full_name'], $row['constituency'], $row['house']);
    }
    if ($has_party && isset($parties[$row['party']])) {
        $row['party'] = $parties[$row['party']];
    }
    list($image, $sz) = find_rep_image($row['person_id']);
    if ($image) {
        list($width, $height) = getimagesize(str_replace(IMAGEPATH, BASEDIR . '/images/', $image));
        $row['image'] = $image;
        $row['image_height'] = $height;
        $row['image_width'] = $width;
    }
    if ($row['house'] == 1 && ($row['left_house'] == '9999-12-31' || $row['left_house'] == '2010-04-12')) {
        # XXX
        # Ministerialships and Select Committees
        $db = new ParlDB();
        $q = $db->query('SELECT * FROM moffice WHERE to_date="9999-12-31" and person=' . $row['person_id'] . ' ORDER BY from_date DESC');
        for ($i = 0; $i < $q->rows(); $i++) {
            $row['office'][] = $q->row($i);
        }
    }
    foreach ($row as $k => $r) {
        if (is_string($r)) {
            $row[$k] = html_entity_decode($r);
        }
    }
    return $row;
}
开发者ID:sebbacon,项目名称:theyworkforyou,代码行数:34,代码来源:api_getPerson.php

示例2: _api_getMembers_output

function _api_getMembers_output($sql, $params)
{
    global $parties;
    $db = new ParlDB();
    $q = $db->query($sql, $params);
    $output = array();
    $last_mod = 0;
    for ($i = 0; $i < $q->rows(); $i++) {
        $pid = $q->field($i, 'person_id');
        $row = array('member_id' => $q->field($i, 'member_id'), 'person_id' => $pid, 'name' => html_entity_decode(member_full_name($q->field($i, 'house'), $q->field($i, 'title'), $q->field($i, 'given_name'), $q->field($i, 'family_name'), $q->field($i, 'lordofname'))), 'party' => isset($parties[$q->field($i, 'party')]) ? $parties[$q->field($i, 'party')] : $q->field($i, 'party'));
        if ($q->field($i, 'house') != 2) {
            $row['constituency'] = $q->field($i, 'constituency');
        }
        $output[$pid] = $row;
        $time = strtotime($q->field($i, 'lastupdate'));
        if ($time > $last_mod) {
            $last_mod = $time;
        }
    }
    $pids = array_keys($output);
    if (count($pids)) {
        $q = $db->query('SELECT person, dept, position, from_date, to_date FROM moffice
            WHERE to_date="9999-12-31" AND person IN (' . join(',', $pids) . ')');
        for ($i = 0; $i < $q->rows(); $i++) {
            $row = $q->row($i);
            $pid = $row['person'];
            unset($row['person']);
            $output[$pid]['office'][] = $row;
        }
    }
    $output = array_values($output);
    api_output($output, $last_mod);
}
开发者ID:udp12,项目名称:theyworkforyou,代码行数:33,代码来源:api_getMembers.php

示例3: _api_getMP_row

function _api_getMP_row($row)
{
    global $parties;
    $row['full_name'] = member_full_name($row['house'], $row['title'], $row['first_name'], $row['last_name'], $row['constituency']);
    # We need 'name' to maintain backwards compatibility due to OA-476
    $row['name'] = $row['full_name'];
    if (isset($parties[$row['party']])) {
        $row['party'] = $parties[$row['party']];
    }
    list($image, $sz) = find_rep_image($row['person_id']);
    if ($image) {
        $row['image'] = $image;
    }
    # Ministerialships and Select Committees
    $db = new ParlDB();
    $q = $db->query('SELECT * FROM moffice WHERE to_date="9999-12-31" and person=' . $row['person_id'] . ' ORDER BY from_date DESC');
    for ($i = 0; $i < $q->rows(); $i++) {
        $row['office'][] = $q->row($i);
    }
    foreach ($row as $k => $r) {
        if (is_string($r)) {
            $row[$k] = html_entity_decode($r);
        }
    }
    return $row;
}
开发者ID:leowmjw,项目名称:twfy,代码行数:26,代码来源:api_getMP.php

示例4: _db_row_to_array

 public function _db_row_to_array($q, $row)
 {
     $query = $q->field($row, 'query_string');
     $this->SEARCHURL->insert(array('s' => $query, 'pop' => 1));
     $url = $this->SEARCHURL->generate();
     $htmlescape = 1;
     if (preg_match('#speaker:(\\d+)#', $query, $m)) {
         $qq = $this->db->query('SELECT house, title, given_name, family_name, lordofname
             FROM member, person_names pn
             WHERE member.person_id = pn.person_id and member.person_id=:pid
             AND pn.type="name" AND pn.end_date = (SELECT MAX(end_date) from person_names where person_names.person_id=member.person_id)
             ORDER BY end_date DESC LIMIT 1', array(':pid' => $m[1]));
         if ($qq->rows()) {
             $name = member_full_name($qq->field(0, 'house'), $qq->field(0, 'title'), $qq->field(0, 'given_name'), $qq->field(0, 'family_name'), $qq->field(0, 'lordofname'));
             $query = preg_replace('#speaker:(\\d+)#', $name, $query);
             #$htmlescape = 0;
         }
     }
     $visible_name = preg_replace('/"/', '', $query);
     $rowarray = $q->row($row);
     $rowarray['query'] = $query;
     $rowarray['visible_name'] = $visible_name;
     $rowarray['url'] = $url;
     $rowarray['display'] = '<a href="' . $url . '">' . ($htmlescape ? _htmlentities($visible_name) : $visible_name) . '</a>';
     return $rowarray;
 }
开发者ID:udp12,项目名称:theyworkforyou,代码行数:26,代码来源:searchlog.php

示例5: list_members

function list_members()
{
    global $db;
    $out = '<ul>';
    # this returns everyone so possibly over the top maybe limit to member.house = '1'
    $q = $db->query("SELECT house, member.person_id, title, given_name, family_name, lordofname, constituency, data_value\n        FROM\n        (SELECT person_id, MAX(end_date) max_date FROM person_names WHERE type='name' GROUP by person_id) md,\n        person_names, member\n        LEFT JOIN personinfo ON member.person_id = personinfo.person_id AND personinfo.data_key = 'mp_website'\n        WHERE member.person_id = person_names.person_id AND person_names.type = 'name'\n        AND md.person_id = person_names.person_id AND md.max_date = person_names.end_date\n        GROUP by person_id\n        ORDER BY house, family_name, lordofname, given_name");
    for ($row = 0; $row < $q->rows(); $row++) {
        $out .= '<li>';
        $name = member_full_name($q->field($row, 'house'), $q->field($row, 'title'), $q->field($row, 'given_name'), $q->field($row, 'family_name'), $q->field($row, 'lordofname'));
        $mp_website = $q->field($row, 'data_value');
        $out .= ' <small>[<a href="websites.php?editperson=' . $q->field($row, 'person_id') . '"';
        if ($mp_website) {
            $out .= ' title="Change URL ' . $mp_website . '">Edit URL</a>]</small>';
        } else {
            $out .= '>Add URL</a>]</small>';
        }
        $out .= ' ' . $name;
        if ($q->field($row, 'constituency')) {
            $out .= ' (' . $q->field($row, 'constituency') . ')';
        }
        $out .= "</li>\n";
    }
    $out .= '</ul>';
    return $out;
}
开发者ID:udp12,项目名称:theyworkforyou,代码行数:25,代码来源:websites.php

示例6: list_members

function list_members()
{
    global $db;
    $out = '<ul>';
    # this returns everyone so possibly over the top maybe limit to member.house = '1'
    $q = $db->query("SELECT member.person_id, house, title, first_name, last_name, constituency, data_value FROM member \n    LEFT JOIN personinfo ON member.person_id = personinfo.person_id AND personinfo.data_key = 'mp_website' GROUP BY member.person_id ORDER BY last_name, first_name");
    for ($row = 0; $row < $q->rows(); $row++) {
        $out .= '<li>';
        $mpname = member_full_name($q->field($row, 'house'), $q->field($row, 'title'), $q->field($row, 'first_name'), $q->field($row, 'last_name'), $q->field($row, 'constituency'));
        $mp_website = $q->field($row, 'data_value');
        $out .= ' <small>[<a href="websites.php?editperson=' . $q->field($row, 'person_id') . '"';
        if ($mp_website) {
            $out .= ' title="Change URL ' . $mp_website . '">Edit URL</a>]</small>';
        } else {
            $out .= '>Add URL</a>]</small>';
        }
        $out .= ' ' . $mpname;
        if ($q->field($row, 'constituency') && $q->field($row, 'house') != 2) {
            $out .= ' (' . $q->field($row, 'constituency') . ')';
        }
        $out .= "</li>\n";
    }
    $out .= '</ul>';
    return $out;
}
开发者ID:palfrey,项目名称:twfy,代码行数:25,代码来源:websites.php

示例7: render_mps_row

function render_mps_row($mp, &$style, $order, $MPURL)
{
    $style = $style == '1' ? '2' : '1';
    $name = member_full_name(3, $mp['title'], $mp['first_name'], $mp['last_name'], $mp['constituency']);
    ?>
<tr>
<td class="row-<?php 
    echo $style;
    ?>
"><a href="<?php 
    echo $MPURL->generate() . make_member_url($mp['first_name'] . ' ' . $mp['last_name'], $mp['constituency'], 3);
    ?>
"><?php 
    echo $name;
    ?>
</a></td>
<td class="row-<?php 
    echo $style;
    ?>
"><?php 
    echo $mp['party'];
    ?>
</td>
<td class="row-<?php 
    echo $style;
    ?>
"><?php 
    echo $mp['constituency'];
    ?>
</td>
</tr>
<?php 
}
开发者ID:leowmjw,项目名称:twfy,代码行数:33,代码来源:people_mlas.php

示例8: _api_getLord_row

function _api_getLord_row($row) {
	global $parties;
	$row['full_name'] = member_full_name($row['house'], $row['title'], $row['first_name'],
		$row['last_name'], $row['constituency']);
	if (isset($parties[$row['party']]))
		$row['party'] = $parties[$row['party']];
	$row = array_map('html_entity_decode', $row);
	return $row;
}
开发者ID:rhaleblian,项目名称:twfy,代码行数:9,代码来源:api_getLord.php

示例9: _api_getMSP_row

function _api_getMSP_row($row)
{
    global $parties;
    $row['full_name'] = member_full_name($row['house'], $row['title'], $row['first_name'], $row['last_name'], $row['constituency']);
    if (isset($parties[$row['party']])) {
        $row['party'] = $parties[$row['party']];
    }
    list($image, $sz) = find_rep_image($row['person_id']);
    if ($image) {
        $row['image'] = $image;
    }
    $row = array_map('html_entity_decode', $row);
    return $row;
}
开发者ID:leowmjw,项目名称:twfy,代码行数:14,代码来源:api_getMSP.php

示例10: render_peers_row

function render_peers_row($peer, $order)
{
    global $parties;
    $name = member_full_name(2, $peer['title'], $peer['first_name'], $peer['last_name'], $peer['constituency']);
    if (strstr($name, ',')) {
        $name = "\"{$name}\"";
    }
    print $peer['person_id'] . ',' . ucfirst($name) . ',';
    if (array_key_exists($peer['party'], $parties)) {
        print $parties[$peer['party']];
    } else {
        print $peer['party'];
    }
    print ',' . 'http://' . DOMAIN . WEBPATH . 'senator/' . make_member_url($name, $peer['constituency']);
    print "\n";
}
开发者ID:leowmjw,项目名称:twfy,代码行数:16,代码来源:people_peers.php

示例11: _api_getPerson_row

function _api_getPerson_row($row, $has_party = FALSE)
{
    global $parties;
    $row['full_name'] = member_full_name($row['house'], $row['title'], $row['first_name'], $row['last_name'], $row['constituency']);
    if ($has_party && isset($parties[$row['party']])) {
        $row['party'] = $parties[$row['party']];
    }
    list($image, $sz) = find_rep_image($row['person_id']);
    if ($image) {
        $row['image'] = $image;
    }
    foreach ($row as $k => $r) {
        if (is_string($r)) {
            $row[$k] = html_entity_decode($r);
        }
    }
    return $row;
}
开发者ID:palfrey,项目名称:twfy,代码行数:18,代码来源:api_getPerson.php

示例12: render_mps_row

function render_mps_row($mp, &$style, $order, $MPURL)
{
    $style = $style == '1' ? '2' : '1';
    $name = member_full_name(4, $mp['title'], $mp['first_name'], $mp['last_name'], $mp['constituency']);
    ?>
<tr>
    <td class="row">
    <?php 
    list($image, $sz) = find_rep_image($mp['person_id'], true);
    if ($image) {
        echo '<a href="' . $MPURL->generate() . make_member_url($mp['first_name'] . ' ' . $mp['last_name'], $mp['constituency'], 1) . '" class="speakerimage"><img height="59" class="portrait" alt="" src="', $image, '"';
        echo '></a>';
    }
    ?>
    </td>
<td class="row-<?php 
    echo $style;
    ?>
"><a href="<?php 
    echo $MPURL->generate() . make_member_url($mp['first_name'] . ' ' . $mp['last_name'], $mp['constituency'], 4);
    ?>
"><?php 
    echo $name;
    ?>
</a></td>
<td class="row-<?php 
    echo $style;
    ?>
"><?php 
    echo $mp['party'];
    ?>
</td>
<td class="row-<?php 
    echo $style;
    ?>
"><?php 
    echo $mp['constituency'];
    ?>
</td>
</tr>
<?php 
}
开发者ID:palfrey,项目名称:twfy,代码行数:42,代码来源:people_msps.php

示例13: render_mlas_row

function render_mlas_row($mla, $order)
{
    global $parties;
    $con = html_entity_decode($mla['constituency']);
    if (strstr($con, ',')) {
        $con = "\"{$con}\"";
    }
    $name = member_full_name(3, $mla['title'], $mla['first_name'], $mla['last_name'], $mla['constituency']);
    if (strstr($name, ',')) {
        $name = "\"{$name}\"";
    }
    print $mla['person_id'] . ',' . ucfirst($name) . ',';
    if (array_key_exists($mla['party'], $parties)) {
        print $parties[$mla['party']];
    } else {
        print $mla['party'];
    }
    print ',' . $con . ',' . 'http://www.openaustralia.org/mla/' . make_member_url($mla['first_name'] . ' ' . $mla['last_name']);
    print "\n";
}
开发者ID:leowmjw,项目名称:twfy,代码行数:20,代码来源:people_mlas.php

示例14: _api_getMembers_output

function _api_getMembers_output($sql)
{
    global $parties;
    $db = new ParlDB();
    $q = $db->query($sql);
    $output = array();
    $last_mod = 0;
    for ($i = 0; $i < $q->rows(); $i++) {
        $row = array('member_id' => $q->field($i, 'member_id'), 'person_id' => $q->field($i, 'person_id'), 'name' => html_entity_decode(member_full_name($q->field($i, 'house'), $q->field($i, 'title'), $q->field($i, 'first_name'), $q->field($i, 'last_name'), $q->field($i, 'constituency'))), 'party' => isset($parties[$q->field($i, 'party')]) ? $parties[$q->field($i, 'party')] : $q->field($i, 'party'));
        if ($q->field($i, 'house') == 1) {
            $row['constituency'] = html_entity_decode($q->field($i, 'constituency'));
        }
        $output[] = $row;
        $time = strtotime($q->field($i, 'lastupdate'));
        if ($time > $last_mod) {
            $last_mod = $time;
        }
    }
    api_output($output, $last_mod);
}
开发者ID:bruno,项目名称:openaustralia-app,代码行数:20,代码来源:api_getMembers.php

示例15: render_msps_row

function render_msps_row($msp, $order)
{
    global $parties;
    $con = $msp['constituency'];
    if (strstr($con, ',')) {
        $con = "\"{$con}\"";
    }
    $name = member_full_name(4, $msp['title'], $msp['first_name'], $msp['last_name'], $msp['constituency']);
    if (strstr($name, ',')) {
        $name = "\"{$name}\"";
    }
    print $msp['person_id'] . ',' . ucfirst($name) . ',';
    if (array_key_exists($msp['party'], $parties)) {
        print $parties[$msp['party']];
    } else {
        print $msp['party'];
    }
    print ',' . $con . ',' . 'http://www.theyworkforyou.com/msp/' . make_member_url($msp['first_name'] . ' ' . $msp['last_name']);
    print "\n";
}
开发者ID:henare,项目名称:theyworkforyou,代码行数:20,代码来源:people_msps.php


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