Exemplo n.º 1
0
$zapytanie = "SELECT * FROM " . $pre . "mov INNER JOIN " . $pre . "mov_access ON fo_id=mov_id WHERE user_id = " . (int) $_SESSION['user_id'] . " ORDER by fo_id DESC";
if (!$strona) {
    $nr = $_GET["strona"];
    if ($nr == 0) {
        $nr = 1;
    }
    $strona = $nr;
}
$ile = 100;
$start = ($strona - 1) * $ile;
$wykonaj = db_query($zapytanie) or die("Nie działa zapytanie" . $zapytanie);
$ile_rek = db_num_rows($wykonaj);
$podstron = ceil($ile_rek / $ile);
$zapytanie .= " LIMIT {$start},{$ile}";
$final = db_query($zapytanie) or die("Nie działa zapytanie końcowe");
$i = 1;
$rows = array();
$key = 0;
while ($row = db_fetch($final)) {
    $rows[$key] = $row;
    $rows[$key]['user_loginn'] = namen($row['user_login']);
    if ($row['fo_custom_file'] == 1) {
        $rows[$key]['fo_fm'] = $row['fo_fm'];
    } else {
        $rows[$key]['fo_fm'] = get_you($row['fo_fm']);
    }
    $key++;
}
$smarty->assign("rows", $rows);
$smarty->assign("title", 'Moje kupione filmy - ' . $ust['nazwa']);
$smarty->display($ust['templates'] . '/filmy.tpl');
Exemplo n.º 2
0
    }
}
$Query = 'SELECT * FROM ' . $pre . 'mov WHERE fo_user="******" order by fo_id DESC';
$result = db_query($Query) or die(db_error());
while ($row = db_fetch($result)) {
    $fo_id[] = $row['fo_id'];
    $fo_fd[] = $row['fo_fd'];
    $fo_opis[] = $row['fo_opis'];
    $fo_prv[] = $row['fo_prv'];
    $fo_custom_file[] = $row['fo_custom_file'];
    $fo_cena[] = $row['fo_cena'];
    $fo_user[] = $row['fo_user'];
    if ($row['fo_custom_file'] == 1) {
        $fo_fm[] = $row['fo_fm'];
    } else {
        $fo_fm[] = get_you($row['fo_fm']);
    }
    $fo_thumb[] = $row['fo_thumb'];
    $fo_file_type[] = $row['fo_file_type'];
}
$smarty->assign("fo_id", $fo_id);
$smarty->assign("fo_fm", $fo_fm);
$smarty->assign("fo_fd", $fo_fd);
$smarty->assign("fo_cena", $fo_cena);
$smarty->assign("fo_opis", $fo_opis);
$smarty->assign("fo_prv", $fo_prv);
$smarty->assign("fo_user", $fo_user);
$smarty->assign("fo_thumb", $fo_thumb);
$smarty->assign("fo_file_type", $fo_file_type);
$smarty->assign("fo_custom_file", $fo_custom_file);
$smarty->assign("cenaf", $ust['cenaf']);
Exemplo n.º 3
0
<table>
<tr>
<td><b>' . $lang['292'] . '</b></td>
<td><input type="text" name="nazwa" style="width:250px;" value="' . $row['fo_fd'] . '"><br /></td>
</tr>';
        echo '
<tr>
<td><b>' . $lang['293'] . '</b></td>
<td><input type="text" name="cena" value="' . $row['fo_cena'] . '" style="width:250px;"><br /></td>
</tr>
<tr>
<td valign="top"><b>Opis</b></td>
<td><textarea name="opis" style="width:250px;">' . $row['fo_opis'] . '</textarea><br><br /><br /></td>
</tr>';
        if ($row['fo_custom_file'] != 1) {
            $youtubeId = get_you($row['fo_fm']);
            echo '<tr><td><b>Film</b></td><td';
            echo ' align="center"><iframe width="360" height="240" src="http://www.youtube.com/embed/' . $youtubeId . '"></iframe><br /><br /></td></tr>';
            echo '<tr><td><b>Ikonka</b></td><td';
            echo ' align="center"><img src="http://i2.ytimg.com/vi/' . $youtubeId . '/default.jpg"> ';
            echo '</td></tr>';
        } else {
            echo '<tr><td><b>Film</b></td><td';
            echo ' align="center">' . '<video controls width="360" height="240" datarel="' . $row['fo_id'] . '" dataid="' . $row['fo_user'] . '">
        <source src="/upload/filmy/' . $row['fo_user'] . '/' . $row['fo_fm'] . '" type="video/' . $row['fo_file_type'] . '">
        <source src="/upload/filmy/' . $row['fo_user'] . '/' . $row['fo_fm'] . '" type="video/ogg">
        Your browser does not support the video tag.
      </video></td></tr>';
            echo '<tr><td><b>Ikonka</b></td><td ';
            echo ' align="center"><img style="float:left;" class="filmMiniaturka" src="/upload/filmy/' . $row['fo_user'] . '/' . $row['fo_thumb'] . '">';
            echo '