示例#1
0
文件: default.php 项目: smhnaji/sdnet
    // Convert the body field to an array.
    $registry = new JRegistry();
    $registry->loadString($item->first_body);
    $item->first_body = $registry->toArray();
    $item->first_weight = $item->first_body['weight'];
    $item->first_stature = $item->first_body['stature'];
    $item->age = SibdietHelper::age($item->birthday, $item->created);
    $age = $item->age->y . '.' . $item->age->m;
    $item->bmi = SibdietHelper::bmi($item->weight, $item->stature);
    $overweight_amount = $item->weight - $item->ideal_weight;
    $item->body_fat = SibdietHelper::BodyFat($item->age, $item->gender, $item->bmi);
    $body_fat_text = $item->body_fat['fat'] . ' (' . JText::_('COM_SIBDIET_BODY_FAT_STATUS_' . $item->body_fat['status']) . ')';
    $item->obesity_degree = SibdietHelper::ObesityDegree($item->gender, $item->weight, $item->stature);
    $foods_program = SibdietHelper::FoodsProgram($item->breakfasts, $item->lunchs, $item->dinners, $item->morning_snack_id, $item->evening_snack_id);
    $item->profiles_id = $item->profiles_id + 200000;
    $item->body_size = SibdietHelper::BodySizeGrouping($item->age, $item->gender, $item->stature, $item->wrist);
    $dietSupplementNotice = JText::sprintf('COM_SIBDIET_PRINT_SUPPLEMENT_NOTICE', $item->period);
    if ($age <= 17) {
        $item->bmi = $body_fat_text = $overweight_amount_text = JText::_('COM_SIBDIET_BODY_SIZE_GROUPING_' . $item->body_size);
    }
    ?>
		<div id="diet<?php 
    echo $i;
    ?>
" class="diet-print">
			<div class="page page1">
				
				<div class="pull-left center draggable" style="<?php 
    echo @$print_config['print_header'];
    ?>
">