function inputGroup($checkbox, $attributes, $attrlabel = array('class' => 'btn btn-primary'), $attrdiv = array('class' => 'btn-group', 'data-toggle' => 'buttons'))
{
    $output = '';
    $input = '';
    if (isset($attributes) && !empty($attributes)) {
        $attributes = parse_attr($attributes);
    }
    $output .= Open('div', $attrdiv);
    foreach ($checkbox as $label) {
        $input .= '<input ' . $attributes . '> ' . $label;
        $output .= tagcontent('label', $input, $attrlabel);
    }
    $output .= closeTag('div');
    return $output;
}
Example #2
0
function outputTemporalDetail($attrs, $value)
{
    global $typeDict, $fieldsDict, $determinationCodes, $profileCodes, $tDateDict, $tDurationDict;
    $temporalStr = substr_replace($value, "", 0, 1);
    $props = explode("|", $temporalStr);
    $properties = array();
    foreach ($props as $prop) {
        list($tag, $val) = explode("=", $prop);
        $properties[$tag] = $val;
    }
    openTag('temporal', array("version" => $properties['VER'], "type" => $typeDict[$properties['TYP']]));
    unset($properties['VER']);
    unset($properties['TYP']);
    foreach ($properties as $tag => $val) {
        if (array_key_exists($tag, $fieldsDict)) {
            //simple property
            openTag('property', array('type' => $tag, 'name' => $fieldsDict[$tag]));
            switch ($tag) {
                case "DET":
                    echo $determinationCodes[$val];
                    break;
                case "PRF":
                case "SPF":
                case "EPF":
                    echo $profileCodes[$val];
                    break;
                default:
                    echo $val;
            }
            closeTag('property');
        } else {
            if (array_key_exists($tag, $tDateDict)) {
                openTag('date', array('type' => $tag, 'name' => $tDateDict[$tag]));
                outputTDateDetail(null, $val);
                closeTag('date');
            } else {
                if (array_key_exists($tag, $tDurationDict)) {
                    openTag('duration', array('type' => $tag, 'name' => $tDurationDict[$tag]));
                    outputDurationDetail(null, $val);
                    closeTag('duration');
                }
            }
        }
    }
    closeTag('temporal');
}
            $base_path = '';
        }
        if ($tab->acceso == 'noregistered' && empty($this->user->userid) || !empty($this->user->userid) && $this->user->essuperusuario == 1) {
            $activemodule = 1;
            echo get_item_f1($tab->capacidadview, base_url() . $tab->ubicacion, '<span style="font-size:10px">' . $tab->descripcion . '<span>', 'Abrir Modulo', $tab->icon . '  ', 'small-box bg-primary');
            continue;
        } elseif ($tab->acceso == 'all' || $tab->acceso == 'registered' && !empty($this->user->userid)) {
            $activemodule = 1;
            echo get_item_f1($tab->capacidadview, base_url() . $tab->ubicacion, '<span style="font-size:10px">' . $tab->descripcion . '<span>', 'Abrir Modulo', $tab->icon . '  ', 'small-box bg-green');
            continue;
        } elseif (!empty($this->user->userid)) {
            // enrolled
            //                    echo 'Paso x aqui';
            $cap = $tab->capacidad;
            if ($this->session->userdata($cap)) {
                echo get_item_f1($tab->capacidadview, base_url() . $tab->ubicacion, '<span style="font-size:10px">' . $tab->descripcion . '<span>', 'Abrir Modulo', $tab->icon . '  ', 'small-box bg-green');
                continue;
            }
        }
        if ($activemodule == 0) {
            echo get_item_f1($tab->capacidadview, '#', '<span style="font-size:10px">' . $tab->descripcion . '<span>', 'Abrir Modulo', $tab->icon . '  ', 'small-box bg-yellow');
        }
    }
}
//        echo tagcontent('div', '<strong style="font-size:20px">Otros M&oacute;dulos Disponibles</strong>', array('class'=>'text-success col-md-12'));
$otros_modulos = $this->generic_model->get_data('billing_capacidad', array('estaActiva' => '0', 'tipo' => 'module'), 'capacidad, UPPER(capacidad) capacidadview, descripcion, imagen, ubicacion, tabid label, interno, acceso, tipo, icon, estaActiva');
foreach ($otros_modulos as $tab) {
    echo get_item_f1($tab->capacidadview, 'https://www.masterpc.com.ec', '<span style="font-size:10px">' . $tab->descripcion . '<span>', 'Comprar Modulo', $tab->icon . '  ', 'small-box bg-red', 'col-lg-3 col-xs-6');
}
echo closeTag('div');