예제 #1
0
function defineParts($song_id = "")
{
    global $database, $Itemid;
    if ($song_id == "") {
        //mosRedirect("index.php?option=com_chordbase&Itemid=$Itemid&task=songlist");
        HTML_chordbase::cb_header("Define Parts");
    }
    $song = new cbSong($database, "#__cb_");
    $song->load($song_id);
    $song->partsForm("index2.php");
}
예제 #2
0
function editSong($song_id = "")
{
    global $database, $Itemid, $my;
    HTML_chordbase::cb_header("Song Editor");
    $chordBase = new ChordBase($database, "#__cb_");
    $chordBase->setCriteria($criteria);
    $categories = $chordBase->getCategories();
    $writers = $chordBase->getWriters();
    $song = new cbSong($database, "#__cb_");
    if ($song_id) {
        $song->load($song_id);
        $song->add_time = $song->add_time == 0 ? time() : $song->add_time;
    } else {
        $song->add_time = time();
    }
    $song->form("index.php?option=com_chordbase&Itemid=" . $Itemid . "&task=saveSong", $categories, $writers, $my->id, TRUE);
    HTML_chordbase::footer();
}