<?php
/* @var $this MemberController */
/* @var $model Member */

$this->breadcrumbs = array(
    'Members' => array('index'),
    $model->id_member,
);

$this->pageTitle = 'Detail Member';
?>
<?php if ($type == 1) { ?>
    <?php
    $identity = substr($model->image_identity, -3);
    if ($identity == "pdf" || $identity == "doc" || $identity == "docx") { ?>
        <a class="btn btn-success btn-block" href="<?php echo YII::app()->baseUrl; ?>/image/files/identity/<?php echo $model->image_identity; ?>">Download</a>
    <?php } else { ?>
        <img class="img-responsive" src="<?php echo YII::app()->baseUrl; ?>/image/files/identity/<?php echo $model->image_identity; ?>" />
    <?php } ?>
<?php } elseif ($type == 2) { ?>
    <?php
    $identity = substr($model->image_foto, -3);
    if ($identity == "pdf" || $identity == "doc" || $identity == "docx") { ?>
        <a class="btn btn-success btn-block" href="<?php echo YII::app()->baseUrl; ?>/image/files/foto/<?php echo $model->image_foto; ?>">Download</a>
    <?php } else { ?>
        <img class="img-responsive" src="<?php echo YII::app()->baseUrl; ?>/image/files/foto/<?php echo $model->image_foto; ?>" />
    <?php } ?>
<?php } elseif ($type == 3) { ?>
    <?php
    $identity = substr($model->image_sosmed, -3);
    if ($identity == "pdf" || $identity == "doc" || $identity == "docx") { ?>
        <a class="btn btn-success btn-block" href="<?php echo YII::app()->baseUrl; ?>/image/files/sosmed/<?php echo $model->image_sosmed; ?>">Download</a>
    <?php } else { ?>
        <img class="img-responsive" src="<?php echo YII::app()->baseUrl; ?>/image/files/sosmed/<?php echo $model->image_sosmed; ?>" />
    <?php } ?>
<?php } ?>