File: /www/wwwroot/oa.sanjiangapp.com/app/crm/contact/view/view.html.php
<?php
/**
* The view of view function of contact module of ZDOO.
*
* @copyright Copyright 2009-2018 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Yidong Wang <yidong@cnezsoft.com>
* @package contact
* @version $Id$
* @link http://www.zdoo.com
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../../sys/common/view/kindeditor.html.php';?>
<?php $browseLink = $this->session->contactList ? $this->session->contactList : inlink('browse');?>
<div id='mainTitle' class='clearfix'>
<div class='btn-toolbar pull-left'>
<?php if(!isonlybody()):?>
<?php echo html::a($browseLink, '<i class="icon icon-back icon-sm"></i> ' . $lang->goback, "class='btn btn-back'");?>
<div class="divider"></div>
<?php endif;?>
<div class="page-title">
<span class="label label-id"><?php echo $contact->id?></span>
<span class="text" title='<?php echo $contact->realname;?>'><?php echo $contact->realname;?></span>
</div>
</div>
</div>
<div class='main-row'>
<div class='main-col col-8'>
<div class='panel panel-block'>
<div class='panel-heading'><strong><?php echo $lang->contact->desc;?></strong></div>
<div class='panel-body'><?php echo $contact->desc;?></div>
</div>
<div class='panel panel-block panel-sm'>
<div class='panel-heading'><strong><?php echo $lang->file->common;?></strong></div>
<div class='panel-body'>
<?php echo $this->fetch('file', 'printFiles', array('files' => $fileList, 'fieldset' => 'false'))?>
</div>
</div>
<?php echo $this->printExtendFields($contact, 'div', "position=left&inCell=1&inForm=0");?>
<?php echo $this->fetch('action', 'history', "objectType=contact&objectID={$contact->id}")?>
<div class='main-actions'>
<div class='btn-toolbar'>
<?php
commonModel::printBack($browseLink);
echo "<div class='divider'></div>";
commonModel::printLink('action', 'createRecord', "objectType=contact&objectID={$contact->id}&customer={$contact->customer}&history=", $lang->contact->record, "data-toggle='modal' data-width='800' class='btn'");
commonModel::printLink('address', 'browse', "objectType=contact&objectID=$contact->id", $lang->contact->address, "data-toggle='modal' class='btn'");
commonModel::printLink('resume', 'browse', "contactID=$contact->id", $lang->contact->resume, "data-toggle='modal' class='btn'");
echo "<div class='divider'></div>";
commonModel::printLink('contact', 'edit', "contactID=$contact->id", $lang->edit, "class='btn'");
commonModel::printLink('contact', 'delete', "contactID=$contact->id", $lang->delete, "class='deleter btn'");
echo html::a('#commentBox', $this->lang->comment, "class='btn btn-default' onclick=setComment()");
echo "<div class='divider'></div>";
commonModel::printRPN($preAndNext);
?>
</div>
</div>
<div id='commentBox' class='hide panel panel-block'>
<div class='panel-heading'><strong><?php echo $lang->comment;?></strong></div>
<div class='panel-body'>
<form id='ajaxForm' method='post' action='<?php echo inlink('edit', "contactID={$contact->id}&comment=true")?>'>
<div class='form-group'><?php echo html::textarea('comment', '',"rows='5' class='w-p100'");?></div>
<div class='form-actions'><?php echo html::submitButton() . html::commonButton($lang->cancel, 'btn btn-back', "onclick=setComment()");?></div>
</form>
</div>
</div>
</div>
<div class='side-col col-4'>
<div class='panel panel-block'>
<div class='panel-heading'><strong><?php echo $lang->contact->basicInfo;?></strong></div>
<div class='panel-body'>
<table class='table table-data'>
<tr>
<th class='w-60px'><?php echo $lang->contact->customer;?></th>
<td>
<?php
if(isset($customers[$contact->customer])) echo html::a($this->createLink('customer', 'view', "customerID={$contact->customer}"), $customers[$contact->customer]);
if($contact->maker) echo " ({$lang->resume->maker})";
?>
</td>
</tr>
<tr>
<th><?php echo $lang->resume->title;?></th>
<td><?php echo $contact->title;?></td>
</tr>
<tr>
<th><?php echo $lang->resume->join;?></th>
<td><?php echo formatTime($contact->join, DT_DATE1);?></td>
</tr>
<tr>
<th class='w-60px'><?php echo $lang->contact->birthday;?></th>
<td><?php echo formatTime($contact->birthday, DT_DATE1);?></td>
</tr>
<tr>
<th><?php echo $lang->contact->gender;?></th>
<td><?php echo zget($lang->genderList, $contact->gender, '');?></td>
</tr>
<tr>
<th><?php echo $lang->contact->createdDate;?></th>
<td><?php echo formatTime($contact->createdDate, DT_DATETIME1);?></td>
</tr>
</table>
</div>
</div>
<div class='panel panel-block'>
<div class='panel-heading'><strong><?php echo $lang->contact->contactInfo;?></strong></div>
<div class='panel-body'>
<div class='contact-list-item'>
<div class='content'>
<?php echo html::image(helper::createLink('crm.contact', 'vcard', "contactID={$contact->id}"), "class='contact-vcard'");?>
<div class='contact-infos'>
<?php foreach($config->contact->contactWayList as $item):?>
<?php if(!empty($contact->{$item})):?>
<div class='contact-info-item'>
<div class='info-title text-gray'><?php echo $lang->contact->{$item};?></div>
<div class='info-content'>
<?php
if($item == 'qq')
{
$site = isset($config->company->name) ? $config->company->name : '';
echo html::a("http://wpa.qq.com/msgrd?v=3&uin={$contact->$item}&site={$site}&menu=yes", $contact->$item, "target='_blank'");
}
else if($item == 'email')
{
echo html::mailto($contact->{$item}, $contact->{$item});
}
else if($item != 'qq' and $item != 'email')
{
echo '<span class="text-gray">' . $contact->{$item} . '</span>';
}
?>
</div>
</div>
<?php endif;?>
<?php endforeach;?>
</div>
</div>
</div>
</div>
</div>
<div class='panel panel-block'>
<div class='panel-body no-padding-top'>
<table class='table table-data table-form table-fixed'>
<thead>
<tr class='text-center'>
<th class='w-150px text-left'><?php echo $lang->resume->time;?></th>
<th><?php echo $lang->resume->customer;?></th>
<th class='w-60px'><?php echo $lang->resume->title;?></th>
</tr>
</thead>
<?php foreach($resumes as $resume):?>
<tr class='text-center'>
<td class='text-left'><?php echo trim($lang->minus, formatTime($resume->join, DT_DATE1) . $lang->minus . formatTime($resume->left, DT_DATE1));?></td>
<td><?php if(isset($customers[$resume->customer])) commonModel::printLink('customer', 'view', "id={$resume->customer}", $customers[$resume->customer]);?></td>
<td><?php echo $resume->title;?></td>
</tr>
<?php endforeach;?>
</table>
</div>
</div>
<div class='panel panel-block'>
<div class='panel-heading'><strong><?php echo $lang->contact->address;?></strong></div>
<div class='panel-body'>
<table class='table table-data table-fixed'>
<?php foreach($addresses as $address):?>
<tr>
<td><?php echo $address->title . $lang->colon . $address->fullLocation;?></td>
</tr>
<?php endforeach;?>
</table>
</div>
</div>
<?php echo $this->printExtendFields($contact, 'div', "position=right&inCell=1&inForm=0");?>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>