| 60 | | <td style="text-align:center"><?php echo link_to(count(SearchPeer::doSelectNoHistory(date('Y-m-d', mktime(0, 0, 0, date('m'), date('d')-15, date('Y'))), $user->getAgencyId(), $user->getId())), 'search/nohistory?search_in_by='.$user->getId().'&since='.date('Y-m-d', mktime(0, 0, 0, date('m'), date('d')-15, date('Y')))) ?></td> |
|---|
| 61 | | <td style="text-align:center"><?php echo link_to(count(SearchPeer::doSelectNoHistory(date('Y-m-d', mktime(0, 0, 0, date('m'), date('d')-30, date('Y'))), $user->getAgencyId(), $user->getId())), 'search/nohistory?search_in_by='.$user->getId().'&since='.date('Y-m-d', mktime(0, 0, 0, date('m'), date('d')-30, date('Y')))) ?></td> |
|---|
| 62 | | <td style="text-align:center"><?php echo link_to(count(SearchPeer::doSelectNoHistory(date('Y-m-d', mktime(0, 0, 0, date('m'), date('d')-45, date('Y'))), $user->getAgencyId(), $user->getId())), 'search/nohistory?search_in_by='.$user->getId().'&since='.date('Y-m-d', mktime(0, 0, 0, date('m'), date('d')-45, date('Y')))) ?></td> |
|---|
| 63 | | <td style="text-align:center"><?php echo link_to(count(SearchPeer::doSelectNoHistory(date('Y-m-d', mktime(0, 0, 0, date('m'), date('d')-60, date('Y'))), $user->getAgencyId(), $user->getId())), 'search/nohistory?search_in_by='.$user->getId().'&since='.date('Y-m-d', mktime(0, 0, 0, date('m'), date('d')-60, date('Y')))) ?></td> |
|---|
| | 60 | <td style="text-align:center"> |
|---|
| | 61 | <?php |
|---|
| | 62 | $num = count(SearchPeer::doSelectNoHistory(date('Y-m-d', mktime(0, 0, 0, date('m'), date('d')-15, date('Y'))), $user->getAgencyId(), $user->getId())); |
|---|
| | 63 | if($num>0) echo '<span class="highlight">'; |
|---|
| | 64 | echo link_to($num, 'search/nohistory?search_in_by='.$user->getId().'&since='.date('Y-m-d', mktime(0, 0, 0, date('m'), date('d')-15, date('Y')))); |
|---|
| | 65 | if($num>0) echo '</span>'; |
|---|
| | 66 | ?> |
|---|
| | 67 | </td> |
|---|
| | 68 | <td style="text-align:center"> |
|---|
| | 69 | <?php |
|---|
| | 70 | $num = count(SearchPeer::doSelectNoHistory(date('Y-m-d', mktime(0, 0, 0, date('m'), date('d')-30, date('Y'))), $user->getAgencyId(), $user->getId())); |
|---|
| | 71 | if($num>0) echo '<span class="highlight">'; |
|---|
| | 72 | echo link_to($num, 'search/nohistory?search_in_by='.$user->getId().'&since='.date('Y-m-d', mktime(0, 0, 0, date('m'), date('d')-30, date('Y')))); |
|---|
| | 73 | if($num>0) echo '</span>'; |
|---|
| | 74 | ?> |
|---|
| | 75 | </td> |
|---|
| | 76 | <td style="text-align:center"> |
|---|
| | 77 | <?php |
|---|
| | 78 | $num = count(SearchPeer::doSelectNoHistory(date('Y-m-d', mktime(0, 0, 0, date('m'), date('d')-45, date('Y'))), $user->getAgencyId(), $user->getId())); |
|---|
| | 79 | if($num>0) echo '<span class="highlight">'; |
|---|
| | 80 | echo link_to($num, 'search/nohistory?search_in_by='.$user->getId().'&since='.date('Y-m-d', mktime(0, 0, 0, date('m'), date('d')-45, date('Y')))); |
|---|
| | 81 | if($num>0) echo '</span>'; |
|---|
| | 82 | ?> |
|---|
| | 83 | </td> |
|---|
| | 84 | <td style="text-align:center"> |
|---|
| | 85 | <?php |
|---|
| | 86 | $num = count(SearchPeer::doSelectNoHistory(date('Y-m-d', mktime(0, 0, 0, date('m'), date('d')-60, date('Y'))), $user->getAgencyId(), $user->getId())); |
|---|
| | 87 | if($num>0) echo '<span class="highlight">'; |
|---|
| | 88 | echo link_to($num, 'search/nohistory?search_in_by='.$user->getId().'&since='.date('Y-m-d', mktime(0, 0, 0, date('m'), date('d')-60, date('Y')))); |
|---|
| | 89 | if($num>0) echo '</span>'; |
|---|
| | 90 | ?> |
|---|
| | 91 | </td> |
|---|
| | 304 | |
|---|
| | 305 | $c = new Criteria(); |
|---|
| | 306 | $c->add(VisitPeer::USER_VISITED_ID, $user_show_id); |
|---|
| | 307 | $c->add(VisitPeer::VISIT_DATE, date('Y-m-d'), Criteria::GREATER_EQUAL); |
|---|
| | 308 | $c->setLimit(10); |
|---|
| | 309 | $c->addAscendingOrderByColumn(VisitPeer::VISIT_DATE); |
|---|
| | 310 | $visits = VisitPeer::doSelect($c); |
|---|
| | 311 | |
|---|
| | 312 | $tmps = array(); |
|---|
| | 313 | foreach($visits as $visit): |
|---|
| | 314 | $tmps[] = array('id' => $visit->getId(), 'type' => 'visit', 'start_at' => $visit->getVisitDate(), 'end_at' => $visit->getEndAt(), 'group' => ucfirst('visite'), 'location' => ($visit->getSales() ? $visit->getSales()->getEstate()->getAddress1().', '.$visit->getSales()->getEstate()->getCityValue() : null), 'description' => ($visit->getContact() ? $visit->getContact()->getLastname().' '.$visit->getContact()->getTelFirst() : null)); |
|---|
| | 315 | endforeach; |
|---|
| | 316 | |
|---|
| | 317 | foreach($calendars as $calendar): |
|---|
| | 318 | $tmps[] = array('id' => $calendar->getId(), 'type' => 'calendar', 'start_at' => $calendar->getDateStart(), 'end_at' => $calendar->getDateEnd(), 'group' => $calendar->getCalendar_group(), 'location' => $calendar->getLocation(), 'description' => $calendar->getDescription()); |
|---|
| | 319 | endforeach; |
|---|
| 288 | | <?php foreach($calendars as $calendar): ?> |
|---|
| 289 | | <tr> |
|---|
| 290 | | <td><?php echo link_to(image_tag('tpl_02/button/view_inline_little.png'), 'calendar/edit?id='.$calendar->getId()) ?></td> |
|---|
| 291 | | <td><?php echo ucfirst(substr(format_datetime($calendar->getDateStart(), 'dddd'), 0, 4)) ?>. <?php echo format_datetime($calendar->getDateStart(), 'dd MMMM HH:mm') ?> - <?php echo format_datetime($calendar->getDateEnd(), 'HH:mm') ?></td> |
|---|
| 292 | | <td><?php echo $calendar->getCalendar_group() ?></td> |
|---|
| 293 | | <td><?php echo $calendar->getLocation() ?></td> |
|---|
| 294 | | <td><?php echo $calendar->getDescription() ?></td> |
|---|
| | 332 | <?php foreach($tmps as $tmp): ?> |
|---|
| | 333 | <tr> |
|---|
| | 334 | <?php if($tmp['type']=='visit'): ?> |
|---|
| | 335 | <td><?php echo link_to(image_tag('tpl_02/button/view_inline_little.png'), 'visit/edit?id='.$tmp['id']) ?></td> |
|---|
| | 336 | <?php else: ?> |
|---|
| | 337 | <td><?php echo link_to(image_tag('tpl_02/button/view_inline_little.png'), 'calendar/edit?id='.$tmp['id']) ?></td> |
|---|
| | 338 | <?php endif; ?> |
|---|
| | 339 | <td><?php echo ucfirst(substr(format_datetime($tmp['start_at'], 'dddd'), 0, 4)) ?>. |
|---|
| | 340 | <?php echo format_datetime($tmp['start_at'], 'dd') ?> |
|---|
| | 341 | <?php echo ucfirst(substr(format_datetime($tmp['start_at'], 'MMMM'), 0, 4)) ?>. |
|---|
| | 342 | <?php echo format_datetime($tmp['start_at'], 'HH:mm') ?> - |
|---|
| | 343 | <?php echo format_datetime($tmp['end_at'], 'HH:mm') ?></td> |
|---|
| | 344 | <td class="highlight"><?php echo $tmp['group'] ?></td> |
|---|
| | 345 | <td><?php echo $tmp['location'] ?></td> |
|---|
| | 346 | <td><?php echo $tmp['description'] ?></td> |
|---|