コード例 #1
0
function editSong($song_id = "")
{
    global $database, $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("index2.php", $categories, $writers, $my->id);
}
コード例 #2
0
ファイル: chordbase.php プロジェクト: NinoCoelho/SouCristao
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();
}