Example #1
0
 public function checkAlreadyComplain($apartmentId = 0, $userId = 0, $sessionId = 0)
 {
     if (!$apartmentId) {
         return false;
     }
     if ($userId) {
         // авторизированный пользователь
         $result = ApartmentsComplain::model()->findByAttributes(array('user_id' => $userId, 'apartment_id' => $apartmentId));
         if ($result) {
             return false;
         }
     } elseif ($sessionId) {
         // гость
         $result = ApartmentsComplain::model()->findByAttributes(array('session_id' => $sessionId, 'apartment_id' => $apartmentId));
         if ($result) {
             return false;
         }
     }
     return true;
 }
Example #2
0
$this->widget('bootstrap.widgets.TbNavbar', array('fixed' => 'top', 'brand' => 'Raui', 'brandUrl' => $baseUrl . '/', 'collapse' => false, 'items' => array(array('class' => 'bootstrap.widgets.TbMenu', 'items' => array(array('label' => tc('Control panel'), 'url' => '#', 'active' => true), array('label' => tc('Menu'), 'url' => '#', 'items' => $this->infoPages)), 'encodeLabel' => false), array('class' => 'bootstrap.widgets.TbMenu', 'htmlOptions' => array('class' => 'pull-right'), 'items' => $rightItems))));
$countApartmentModeration = Apartment::getCountModeration();
$bageListings = $countApartmentModeration > 0 ? "&nbsp<span class=\"badge\">{$countApartmentModeration}</span>" : '';
$bagePayments = '';
if (issetModule('payment')) {
    $countPaymentWait = Payments::getCountWait();
    $bagePayments = $countPaymentWait > 0 ? "&nbsp<span class=\"badge\">{$countPaymentWait}</span>" : '';
}
$bageComments = '';
if (issetModule('comments')) {
    $countCommentPending = Comment::getCountPending();
    $bageComments = $countCommentPending > 0 ? "&nbsp<span class=\"badge\">{$countCommentPending}</span>" : '';
}
$bageComplain = '';
if (issetModule('apartmentsComplain')) {
    $countComplainPending = ApartmentsComplain::getCountPending();
    $bageComplain = $countComplainPending > 0 ? "&nbsp<span class=\"badge\">{$countComplainPending}</span>" : '';
}
$bageReviews = '';
if (issetModule('reviews')) {
    $countReviewsPending = Reviews::getCountModeration();
    $bageReviews = $countReviewsPending > 0 ? "&nbsp<span class=\"badge\">{$countReviewsPending}</span>" : '';
}
$bageVacancy = '';
if (issetModule('vacancy')) {
    $countVacancyPending = Vacancy::getCountModeration();
    $bageVacancy = $countVacancyPending > 0 ? "&nbsp<span class=\"badge\">{$countVacancyPending}</span>" : '';
}
$bageBooking = '';
if (issetModule('bookingtable')) {
    $countNewPending = Bookingtable::getCountNew();
Example #3
0
</td>
                                <td>мебель холодильник стир. машина балкон евроремонт</td>
                                <td><div > <a href="#" class="lookContact"></a> показать </div></td>
                                <td><table width="100%" border="0" cellspacing="0">
                                        <tbody>
                                        <tr>
                                            <td  class="tableComnt"><div class="comntNote"> <?php 
    echo 'Активно с:' . $negative->date_updated;
    ?>
 </div>
                                                <br>
                                                <?php 
    echo $negative->description_ru;
    ?>
                                                <?php 
    foreach (ApartmentsComplain::model()->findAll('apartment_id=:apartmentId', [':apartmentId' => $negative->id]) as $apartment) {
        ?>
                                                   <div class="notation-desc">
                                                      <span><?php 
        echo $apartment->body;
        ?>
</span>
                                                   </div>
                                                   </br></br>
                                                <?php 
    }
    ?>
                                            </td>
                                            <td class="actionIcons">
                                                <a href="#" class="actionMap"></a> <a href="#" class="actionNote"></a> <a href="#" class="actionAdmin"></a>
                                            </td>
Example #4
0
                        </td>
                        <td>
                            <table width="100%" border="0" cellspacing="0">
                                <tbody>
                                <tr>
                                    <td class="tableComnt">
                                        <div class="comntNote"> Активно
                                            с: <?php 
    echo $rentorder->date_updated;
    ?>
 </div>
                                        <?php 
    echo $rentorder->description_ru;
    ?>
                                        <?php 
    foreach (ApartmentsComplain::model()->findAll('apartment_id=:apartmentId', [':apartmentId' => $rentorder->id]) as $apartment) {
        ?>
                                          <div class="notation-desc">
                                              <span><?php 
        echo $apartment->body;
        ?>
</span>
                                          </div>
                                           </br></br>
                                        <?php 
    }
    ?>
                                    <td class="actionIcons">
                                        <a href="https://maps.yandex.ru/?text=<?php 
    echo $rent->address_ru;
    ?>