$rs = $conn->execute($sql); if ($rs->recordcount() > 0) { $vdo = $rs->getrows(); } $start_num = $startfrom + 1; $end_num = $startfrom + $rs->recordcount(); } $page_link = ""; for ($k = 1; $k <= $tpage; $k++) { $page_link .= "<a href='uvideos.php?UID={$_REQUEST['UID']}&page={$k}&type={$_REQUEST['type']}'>{$k}</a> "; } //END PAGING STemplate::assign('err', $err); STemplate::assign('msg', $msg); STemplate::assign('page', $page); STemplate::assign('start_num', $start_num); STemplate::assign('end_num', $end_num); STemplate::assign('page_link', $page_link); STemplate::assign('total', $total); STemplate::assign('answers', $vdo); if ($my_friends != "") { $kwords = group_tags($sql); } STemplate::assign('vtags', $kwords); STemplate::assign('head_bottom', "friendlinks.tpl"); //STemplate::assign('head_bottom_add',"viewuserlinks.tpl"); STemplate::display('head1.tpl'); STemplate::display('err_msg.tpl'); STemplate::display('search.tpl'); STemplate::display('fvideos.tpl'); STemplate::display('footer.tpl');
} else { $spage = $tpage; } $startfrom = ($page - 1) * $config[items_per_page]; $sql = "select * from audio WHERE UID={$_SESSION['UID']} limit {$startfrom}, {$config['items_per_page']}"; $rs = $conn->execute($sql); if ($rs->recordcount() > 0) { $vdo = $rs->getrows(); } $start_num = $startfrom + 1; $end_num = $startfrom + $rs->recordcount(); $page_link = ""; for ($k = 1; $k <= $tpage; $k++) { $page_link .= "<a href='my_audio.php?UID={$_SESSION['UID']}&page={$k}&type={$_REQUEST['type']}'>{$k}</a> "; } //END PAGING STemplate::assign('err', $err); STemplate::assign('msg', $msg); STemplate::assign('page', $page); STemplate::assign('start_num', $start_num); STemplate::assign('end_num', $end_num); STemplate::assign('page_link', $page_link); STemplate::assign('total', $total); STemplate::assign('answers', $vdo); $mytags = group_tags($sql); STemplate::assign('mytags', $mytags); STemplate::assign('head_bottom', "musiclinks.tpl"); STemplate::display('head1.tpl'); STemplate::display('err_msg.tpl'); STemplate::display('my_audio.tpl'); STemplate::display('footer.tpl');
<?php session_start(); include "include/config.php"; include "include/function.php"; //PAGING $sql = "SELECT * from video where type='public' order by addtime desc limit 100"; $rs = $conn->Execute($sql); $rtags = group_tags($sql); $sql = "SELECT * from video where type='public' order by rand() limit 100"; $rs = $conn->Execute($sql); $ptags = group_tags($sql); //END PAGING STemplate::assign('err', $err); STemplate::assign('msg', $msg); STemplate::assign('answers', $users); STemplate::assign('total', $rs->recordcount()); STemplate::assign('rtags', $rtags); STemplate::assign('ptags', $ptags); STemplate::assign('head_bottom', "homelinks.tpl"); STemplate::display('head1.tpl'); STemplate::display('err_msg.tpl'); STemplate::display('more_tags.tpl'); STemplate::display('footer.tpl');