Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- funtion get_header($module, $id = NULL) {
- $check = "select * from module where name = '" . $module . "'";
- $app = @mysql_fetch_array(mysql_query($check));
- if ($app['name'] != '') {
- if ($module == 'view') {
- $sql = "select page,title,description,keywords,real_name,user,adult,thumbnail from `dvflex`.`files` where page = '" . $id . "'";
- $res = @mysql_fetch_array(mysql_query($sql));
- $title = $app['moto'] . $res['title'] . $app['prefix'] . $res['user']; // Ex: [Now watching/Now viewing:] [My latest music video/My review] [By/From] [Username]
- }
- else if ($module == 'chan') {
- $sql = "select name from `dvflex`.`channel` where name = '" . $id . "'";
- $res = @mysql_fetch_array(mysql_query($sql));
- $title = $app['moto'] . $app['prefix'] . $res['name']; // [Viewing] [Channel/Group] [Blargh]
- }
- else if ($module == 'user') {
- $sql = "select user from `dvflex`.`profile` where user = '" . $id . "'";
- $res = @mysql_fetch_array(mysql_query($sql));
- if (substr($res['user'], -1) != 's') $sname = $res['user'] . "'s";
- else $sname = $res['user'] . "'";
- $title = $app['moto'] . $sname . $app['prefix']; // Ex: if name = Alex - Viewing Alex's Profile else - Viewing Ales' Profile
- }
- }
- else {
- $app = '404';
- }
- if ($app != '404') {
- $header = <<< EOF
- <title>
- {$title}
- </title>
- EOF;
- }
- }
Add Comment
Please, Sign In to add comment