| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
require_once('../includes/config/settings.php'); |
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 |
function __autoload($class) { |
|---|
| 30 |
global $SETTINGS; |
|---|
| 31 |
if (is_file($SETTINGS['fspath'] . 'classes/pages/' . $class . '.php')) { |
|---|
| 32 |
require_once($SETTINGS['fspath'] . 'classes/pages/' . $class . '.php'); |
|---|
| 33 |
} elseif (is_file($SETTINGS['fspath'] . 'classes/misc/' . $class . '.php')) { |
|---|
| 34 |
require_once($SETTINGS['fspath'] . 'classes/misc/' . $class . '.php'); |
|---|
| 35 |
} else { die('Class ' . $class . ' not found.'); } |
|---|
| 36 |
} |
|---|
| 37 |
|
|---|
| 38 |
|
|---|
| 39 |
$WARNINGS = Array(); |
|---|
| 40 |
|
|---|
| 41 |
|
|---|
| 42 |
require_once($SETTINGS['fspath'] . 'includes/config/version.php'); |
|---|
| 43 |
|
|---|
| 44 |
require_once($SETTINGS['fspath'] . 'includes/config/bots.php'); |
|---|
| 45 |
|
|---|
| 46 |
$F = new Format(); |
|---|
| 47 |
require($SETTINGS['fspath'] . 'includes/lang/' . $SETTINGS['language'] . '.php'); |
|---|
| 48 |
|
|---|
| 49 |
$C = new Connection(); |
|---|
| 50 |
Member::session(); |
|---|
| 51 |
if (isset($_SESSION['lang']) && $_SESSION['lang'] != '') { |
|---|
| 52 |
include($SETTINGS['fspath'] . 'includes/lang/' . $_SESSION['lang'] . '.php'); |
|---|
| 53 |
} |
|---|
| 54 |
|
|---|
| 55 |
require($SETTINGS['fspath'] . 'includes/input.php'); |
|---|
| 56 |
|
|---|
| 57 |
|
|---|
| 58 |
$_pref = '../'; |
|---|
| 59 |
$html = Page::start(); |
|---|
| 60 |
|
|---|
| 61 |
|
|---|
| 62 |
if (Member::checkRights('Showip', 'r', $INPUT['id'])) { |
|---|
| 63 |
|
|---|
| 64 |
// get IP form database |
|---|
| 65 |
$q = $C->prepare('SELECT ip FROM '.$SETTINGS['dbtableprefix'].'posts WHERE postid=:id'); |
|---|
| 66 |
$q->bindParam(':id', $INPUT['id'], PDO::PARAM_INT, 12); |
|---|
| 67 |
$q->execute(); |
|---|
| 68 |
$_ip = $q->fetchColumn(); |
|---|
| 69 |
$q = NULL; |
|---|
| 70 |
|
|---|
| 71 |
$html->body->addChild('h2', $LANG['IP']); |
|---|
| 72 |
$div = $html->body->addChild('div', $_ip); |
|---|
| 73 |
$div->addAttribute('class', 'message'); |
|---|
| 74 |
$div = $html->body->addChild('div'); |
|---|
| 75 |
$div->addAttribute('align', 'center'); |
|---|
| 76 |
$a = $div->addChild('a', $LANG['Close_Window']); |
|---|
| 77 |
$a->addAttribute('href', 'javascript:self.close()'); |
|---|
| 78 |
} else { |
|---|
| 79 |
$div = $html->body->addChild('div', $LANG['error_permission_denied']); |
|---|
| 80 |
$div->addAttribute('class', 'message'); |
|---|
| 81 |
} |
|---|
| 82 |
|
|---|
| 83 |
|
|---|
| 84 |
|
|---|
| 85 |
$mime = 'text/html'; |
|---|
| 86 |
if(stristr($_SERVER['HTTP_ACCEPT'], 'application/xhtml+xml')) { |
|---|
| 87 |
if(preg_match('/application\/xhtml\+xml;q=([01]|0\.\d{1,3}|1\.0)/i', $_SERVER['HTTP_ACCEPT'], $matches)) { |
|---|
| 88 |
|
|---|
| 89 |
$xhtml_q = $matches[1]; |
|---|
| 90 |
if(preg_match('/text\/html;q=q=([01]|0\.\d{1,3}|1\.0)/i', $_SERVER['HTTP_ACCEPT'], $matches)) { |
|---|
| 91 |
|
|---|
| 92 |
$html_q = $matches[1]; |
|---|
| 93 |
if((float)$xhtml_q >= (float)$html_q) { |
|---|
| 94 |
|
|---|
| 95 |
$mime = 'application/xhtml+xml'; |
|---|
| 96 |
} |
|---|
| 97 |
} |
|---|
| 98 |
} else { |
|---|
| 99 |
|
|---|
| 100 |
$mime = 'application/xhtml+xml'; |
|---|
| 101 |
} |
|---|
| 102 |
} |
|---|
| 103 |
|
|---|
| 104 |
|
|---|
| 105 |
Page::send($html); |
|---|
| 106 |
|
|---|
| 107 |
?> |
|---|