Ejemplo n.º 1
0
                 FROM ' . TBL_DATA . '
            LEFT JOIN ' . TBL_USERS . ' ON ' . TBL_DATA . '.owner_id = ' . TBL_USERS . '.id
            LEFT JOIN ' . TBL_USERSEEN . ' 
                   ON ' . TBL_DATA . '.id = ' . TBL_USERSEEN . '.video_id AND ' . TBL_USERSEEN . '.user_id = ' . get_current_user_id() . '
                WHERE ' . TBL_DATA . '.id = ' . $id;
    $video = runSQL($SELECT);
    // diskid to global scope:
    $diskid = $video[0]['diskid'];
} else {
    $video[0]['language'] = $config['langdefault'];
}
// assign automatic disk id
if ($config['autoid'] && (empty($diskid) || $add_flag) && $mediatype != MEDIA_WISHLIST) {
    $video[0]['diskid'] = getDiskId();
    // Fix for Bugreport [1122052] Automatic DiskID generation problem
    $smarty->assign('autoid', $result[0]['max']);
}
if (empty($video[0]['owner_id']) && !empty($owner_id)) {
    $video[0]['owner_id'] = $owner_id;
}
// prepare templates
tpl_page();
tpl_edit($video[0]);
$smarty->assign('lookup_id', $lookup);
$smarty->assign('http_error', $CLIENTERROR);
// allow XML import
if ($config['xml'] && empty($id)) {
    $smarty->assign('xmlimport', true);
}
// display templates
tpl_display('edit.tpl');
Ejemplo n.º 2
0
        <script src="/application/js/jquery/jquery-plugins.js"></script>
        <script src="/application/js/jquery/ajax.js"></script>
        <script src="/application/js/jquery/utils.js"></script>
        
        <link type="text/css" rel="stylesheet" href="/application/layout/ui.css" />
        <link type="text/css" rel="stylesheet" href="/application/layout/template.css" />

        <style type="text/css">
        </style>

        <script>

            var validator = new Validator();

            $(function() {
                $('.tpl-select').select();
                $('.tpl-select-button').selectButton();
            });

        </script>

    </head>
    <body>

        <?php 
echo tpl_edit('marina');
?>

    </body>
</html>