function build_cifrado($id = false)
{
    if ($id) {
        $data = select_ver_cifrado($id);
        // dump_var($data);
        if ($data) {
            $chord = new guitarTabs();
            $letra = utf8_encode($data[0][cifrado]);
            $chord->titulo = utf8_encode($data[0][canto]);
            $chord->autor = utf8_encode($data[0][autor]);
            $chord->canta = utf8_encode($data[0][interprete]);
            $chord->album = utf8_encode($data[0][album]);
            $chord->anio = utf8_encode($data[0][anio]);
            $chord->escala = utf8_encode($data[0][escala]);
            $chord->compas = utf8_encode($data[0][compas]);
            $chord->ritmo = utf8_encode($data[0][ritmo]);
            $chord->tempo = utf8_encode($data[0][tempo]);
            $chord->categoria = utf8_encode($data[0][categorias]);
            $chord->cancion($letra);
            $cifrado[web] = '<div style="margin-left:auto; margin-right:auto; width:70%;">' . $chord->html(1) . '</div>';
            $cifrado[txt] = '<div style="margin-left:auto; margin-right:auto; width:70%;">' . $chord->txt() . '</div>';
            return $cifrado;
        } else {
            return false;
        }
    } else {
        return false;
    }
}
function build_acordes()
{
    $chord = new guitarTabs();
    $letra = '[Am]///A su Majestad, [(Am-G)]
				[F]Bienvenido Rey, [(F/F#)]
					Inicio [E7]uno dos tres cuatro cinco seis [F]siete ocho nueve diez once [F#]doce
				[G]A su Majestad, daré la [E]honra y el ho[Am]nor/// ';
    $chord->titulo = 'A su Majestad';
    $chord->autor = 'Pastor Luis Villavicencio';
    $chord->canta = 'Palabra Miel Washington, USA';
    $chord->album = 'A su Majestad';
    $chord->anio = '2012';
    $chord->escala = 'Am';
    $chord->compas = '******';
    $chord->ritmo = 'Rápido';
    $chord->tempo = '165 beats';
    $chord->categoria = 'Alabanza, Majestad';
    $chord->cancion($letra);
    $cifrado = '<div style="margin-left:auto; margin-right:auto; width:70%;">' . $chord->html(1) . $chord->txt() . '</div>';
    return $cifrado;
}
Пример #3
0
		<h3>Input</h3>
	
		<form action="" method="POST">

		<textarea name="lyrics" style="width: 100%;" rows="5"><?php 
echo $_POST['lyrics'];
?>
</textarea><br/><br/>
		<div style="text-align: right">
			<input type="submit" value="Tab me!" style="padding: 5px 10px; font-size: 12pt;"/>
		</div>
		<h3>Output</h3>

<?php 
$l = new guitarTabs();
// $l->titulo='Este es el titulo';
$l->cancion($_POST['lyrics']);
echo $l->header(1);
echo '<fieldset>';
echo '<legend>List of tabs in song</legend>';
echo $l->acordes();
echo '</fieldset>';
echo '<br/>';
echo '<fieldset>';
echo '<legend>Fixed font output</legend>';
echo $l->txt();
echo '</fieldset>';
echo '<br/>';
echo '<fieldset>';
echo '<legend>HTML formated output</legend>';