%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /data/bordel/jabbarchive/
Upload File :
Create Path :
Current File : //data/bordel/jabbarchive/index.php

<?php
error_reporting(E_ALL);
include "lib.php";
if (!isset($_SERVER['PHP_AUTH_USER'])) 
{
    header('WWW-Authenticate: Basic realm="varak.net jaber history archive"');
    header('HTTP/1.0 401 Unauthorized');
    echo 'Musite se prihlasit aby jste mohli prohlizet historii';
    exit;
} 
else 
{ 
    $us = $_SERVER['PHP_AUTH_USER'];
    preg_match("/([0-9a-zA-Z.\\-_]+)@([a-zA-Z0-9.\\-_]+\\.[a-zA-Z]{2,4})/", $_SERVER['PHP_AUTH_USER'], $matches);
    $user = $matches[1];
    $domain = $matches[2];
    if($domain == "varak.net") $dbname = "ejabberd";
    if($domain == "prestiz-pyco.eu") $dbname = "ejabberd_prestiz_pyco";
    $us = $_SERVER['PHP_AUTH_USER'];
    $spojeni = pg_connect("host=localhost port=5432 dbname=$dbname user=jabber password=vesela55Krava");
    $res = q("select password from users where username='".$user."'");
    if(!$res || trim($res) != trim($_SERVER['PHP_AUTH_PW']))
    {
          header('WWW-Authenticate: Basic realm="varak.net jaber history archive"');
          header('HTTP/1.0 401 Unauthorized');
          echo 'Musite se prihlasit aby jste mohli prohlizet historii';
          exit;
    }
}  
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
     <head>
          <meta http-equiv="Content-Type" content="text/xhtml; charset=UTF-8" />
          <title>Jabber message archive for varak.net
          </title>
          <link rel="stylesheet" href="style.css" type="text/css" />
     </head>
     <body>
          <div id="wrap">
               <div id="header">
                    <img src="images/header.jpg" width="768" height="120" alt="Time To Rest" />
               </div>
               <div id="navigation">
                    <ul>
                         <li>
                         <a href="index.php">Home</a>
                         </li>
                         <li>
                         <a href="index.php?what=roster">Flat history</a>
                         </li>
                         <li>
                         <a href="index.php?what=roster-conv">Conversation history</a>
                         </li>
                    </ul>
               </div>
               <div id="content">
               <?php
                    switch($_GET['what'])
                    {
                         case 'roster':
                         {
                              include "roster_flat.php";
                              break;
                         }
                         case 'roster-conv':
                         {
                              include "roster_conv.php";
                              break;
                         }
                         case 'history-flat':
                         {
                              include "history_flat.php";
                              break;
                         }
                         
                         default:
                         {
                              include "default.php";
                              break;
                         }
                    }
               ?>
               </div>
               <div id="footer">&lt;&lt;----- Insert Google Ads here -----&gt;&gt; <br />    | 
                    <a href="index.html">Home</a> | 
                    <a href="index.html">Forums</a> | 
                    <a href="index.html">Media</a> | 
                    <a href="index.html">About</a> | 
                    <a href="index.html">Contact</a> | <br />  &copy; Your-Site-Here.com | Design by 
                    <a href="http://www.ginger-ninja.net/" title="Ginger Ninja!">Ginger Ninja!</a>
               </div>
          </div>
     </body>
</html>
<?php
     pg_close($spojeni);
?>

Zerion Mini Shell 1.0