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


PHP CContact::getDepartmentDetails方法代码示例

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


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

示例1: foreach

    echo $AppUI->_('Name');
    ?>
</th>
	<th><?php 
    echo $AppUI->_('e-mail');
    ?>
</th>
	<th><?php 
    echo $AppUI->_('Department');
    ?>
</th>
</tr>
<?php 
    foreach ($rows as $row) {
        $contact = new CContact();
        $contact->bind($row);
        $dept_detail = $contact->getDepartmentDetails();
        $s .= '<tr><td>';
        $s .= '<a href="?m=contacts&amp;a=view&amp;contact_id=' . dPformSafe($row['contact_id']) . '">' . htmlspecialchars($row['contact_last_name'] . ', ' . $row['contact_first_name']) . '</a>';
        $s .= '<td><a href="mailto:' . dPformSafe($row['contact_email'], DP_FORM_URI) . '">' . htmlspecialchars($row['contact_email']) . '</a></td>';
        $s .= '<td>' . htmlspecialchars($dept_detail['dept_name']) . '</td>';
        $s .= '</tr>';
    }
}
$s .= '<tr><td colspan="3" align="right" valign="top" style="background-color:#ffffff">';
$s .= '<input type="button" class=button value="' . $AppUI->_('new contact') . '" onclick="javascript:window.location=\'./index.php?m=contacts&amp;a=addedit&amp;company_id=' . dPformSafe($company_id) . '&amp;company_name=' . dPformSafe($obj->company_name) . '\'">';
$s .= '</td></tr>';
echo $s;
?>
</table>
开发者ID:hoodoogurus,项目名称:dotprojecteap,代码行数:30,代码来源:vw_contacts.php

示例2: CTitleBlock

    $canDelete = false;
}
$canEdit = $perms->checkModuleItem($m, "edit", $contact_id);
if (!$row->load($contact_id) && $contact_id > 0) {
    $AppUI->setMsg('Contact');
    $AppUI->setMsg("invalidID", UI_MSG_ERROR, true);
    $AppUI->redirect();
} else {
    if ($row->contact_private && $row->contact_owner != $AppUI->user_id && $row->contact_owner && $contact_id != 0) {
        // check only owner can edit
        $AppUI->redirect("m=public&a=access_denied");
    }
}
// Get the contact details for company and department
$company_detail = $row->getCompanyDetails();
$dept_detail = $row->getDepartmentDetails();
// setup the title block
$ttl = "View Contact";
$titleBlock = new CTitleBlock($ttl, 'monkeychat-48.png', $m, "{$m}.{$a}");
$titleBlock->addCrumb("?m=contacts", "contacts list");
if ($canEdit && $contact_id) {
    $titleBlock->addCrumb("?m=contacts&a=addedit&contact_id={$contact_id}", 'edit');
}
$titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new project') . '" />', '', '<form action="?m=projects&a=addedit&company_id=' . $row->contact_company . '&contact_id=' . $contact_id . '" method="post">', '</form>');
if ($canDelete && $contact_id) {
    $titleBlock->addCrumbDelete('delete contact', $canDelete, $msg);
}
$titleBlock->show();
?>
<form name="changecontact" action="?m=contacts" method="post">
        <input type="hidden" name="dosql" value="do_contact_aed" />
开发者ID:magsilva,项目名称:dotproject,代码行数:31,代码来源:view.php

示例3: testGetDepartmentDetails

 public function testGetDepartmentDetails()
 {
     $contact = new CContact();
     $results = $contact->getDepartmentDetails();
     $this->AssertEquals(2, count($results));
     $this->assertEquals(0, $results['dept_id']);
     $this->assertEquals('', $results['dept_name']);
     $contact->contact_department = 1;
     $results = $contact->getDepartmentDetails();
     $this->AssertEquals(2, count($results));
     $this->assertEquals(1, $results['dept_id']);
     $this->assertEquals('Department 1', $results['dept_name']);
 }
开发者ID:eureka2,项目名称:web2project,代码行数:13,代码来源:contacts.test.php


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