function content_548e531098f721_05417653($_smarty_tpl)
    {
        if (!is_callable('smarty_block_style')) {
            include 'C:\\xampp\\htdocs\\havanabook\\ow_smarty\\plugin\\block.style.php';
        }
        if (!is_callable('smarty_function_decorator')) {
            include 'C:\\xampp\\htdocs\\havanabook\\ow_smarty\\plugin\\function.decorator.php';
        }
        $_smarty_tpl->smarty->_tag_stack[] = array('style', array());
        $_block_repeat = true;
        echo smarty_block_style(array(), null, $_smarty_tpl, $_block_repeat);
        while ($_block_repeat) {
            ob_start();
            ?>


    .topuser_cont {
        display: inline-block; 
        width: 70px;
        margin: 5px;
        text-align: center;
    }

<?php 
            $_block_content = ob_get_clean();
            $_block_repeat = false;
            echo smarty_block_style(array(), $_block_content, $_smarty_tpl, $_block_repeat);
        }
        array_pop($_smarty_tpl->smarty->_tag_stack);
        ?>


<div class="clearfix ow_center">
<?php 
        $_smarty_tpl->tpl_vars['user'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['user']->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['list']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['user']->key => $_smarty_tpl->tpl_vars['user']->value) {
            $_smarty_tpl->tpl_vars['user']->_loop = true;
            ?>
    <?php 
            $_smarty_tpl->_capture_stack[0][] = array('default', 'userId', null);
            ob_start();
            echo $_smarty_tpl->tpl_vars['user']->value['dto']->id;
            list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
            if (!empty($_capture_buffer)) {
                if (isset($_capture_assign)) {
                    $_smarty_tpl->assign($_capture_assign, ob_get_contents());
                }
                if (isset($_capture_append)) {
                    $_smarty_tpl->append($_capture_append, ob_get_contents());
                }
                Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
            } else {
                $_smarty_tpl->capture_error();
            }
            ?>
    <div class="topuser_cont">
	    <?php 
            echo smarty_function_decorator(array('name' => 'avatar_item', 'data' => $_smarty_tpl->tpl_vars['avatars']->value[$_smarty_tpl->tpl_vars['userId']->value]), $_smarty_tpl);
            ?>

	    <?php 
            if ($_smarty_tpl->tpl_vars['scores']->value[$_smarty_tpl->tpl_vars['userId']->value]) {
                echo BASE_CTRL_Rate::displayRate(array('avg_rate' => $_smarty_tpl->tpl_vars['scores']->value[$_smarty_tpl->tpl_vars['userId']->value]), $_smarty_tpl);
            }
            ?>
    </div>
<?php 
        }
        ?>
</div><?php 
    }
Exemplo n.º 2
0
 public function getFields($userIdList)
 {
     $lang = OW::getLanguage();
     $fields = array();
     $qs = array();
     $qBdate = BOL_QuestionService::getInstance()->findQuestionByName('birthdate', 'sex');
     if ($qBdate->onView) {
         $qs[] = 'birthdate';
     }
     $qSex = BOL_QuestionService::getInstance()->findQuestionByName('sex');
     if ($qSex->onView) {
         $qs[] = 'sex';
     }
     $questionList = BOL_QuestionService::getInstance()->getQuestionData($userIdList, $qs);
     $sm = new Smarty();
     foreach ($questionList as $uid => $question) {
         $fields[$uid] = array();
         $age = '';
         if (!empty($question['birthdate'])) {
             $date = UTIL_DateTime::parseDate($question['birthdate'], UTIL_DateTime::MYSQL_DATETIME_DATE_FORMAT);
             $age = UTIL_DateTime::getAge($date['year'], $date['month'], $date['day']);
         }
         $sexValue = '';
         if (!empty($question['sex'])) {
             $sex = $question['sex'];
             for ($i = 0; $i < 31; $i++) {
                 $val = pow(2, $i);
                 if ((int) $sex & $val) {
                     $sexValue .= BOL_QuestionService::getInstance()->getQuestionValueLang('sex', $val) . ', ';
                 }
             }
             if (!empty($sexValue)) {
                 $sexValue = substr($sexValue, 0, -2);
             }
         }
         if (!empty($sexValue) && !empty($age)) {
             $fields[$uid][] = array('label' => '', 'value' => $sexValue . ' ' . $age);
         }
         $rate = BASE_CTRL_Rate::displayRate(array('avg_rate' => $this->fields[$uid]['score']), $sm);
         $fields[$uid][] = array('label' => '', 'value' => $rate);
         $fields[$uid][] = array('label' => '', 'value' => UTIL_DateTime::formatDate($this->fields[$uid]['timeStamp']));
     }
     return $fields;
 }