Example #1
0
    $header_size = curl_getinfo($curl, CURLINFO_HEADER_SIZE);
    $respheaders = substr($data, 0, $header_size);
    $body = substr($data, $header_size);
    curl_close($curl);
    return $body;
}
function http_proxy_query($url)
{
Example #2
0
function ewiki_spage($id, &$data, $action)
{
    global $ewiki_spages, $ewiki_plugins, $ewiki_t;
    $r = "";
    #-- filename from $id
    $fn = $ewiki_spages[strtolower($id)];
    #-- php file
    if (strpos($fn, ".php") || strpos($fn, ".htm")) {
        #-- start new ob level
        ob_start();
        ob_implicit_flush(0);
        #-- prepare environment
        global $ewiki_id, $ewiki_title, $ewiki_author, $ewiki_ring, $ewiki_t, $ewiki_config, $ewiki_action, $_EWIKI, $ewiki_auth_user, $ewiki_headers, $headers;
        $ewiki_headers = array();
        $headers =& $ewiki_headers;
        #-- execute script
        include $fn;
        #-- close ob
        $r = ob_get_contents();
        ob_end_clean();
        #-- add headers
        if ($ewiki_headers) {
            headers(implode("\n", $ewiki_headers));
        }
        $clean_html = true;
    } elseif (EWIKI_SPAGES_BIN && !headers_sent() && preg_match('#\\.(png|gif|jpe?g|zip|tar)#', $fn)) {
        $ct = "application/octet-stream";
        if (function_exists("mime_content_type")) {
            $ct = mime_content_type($fn);
        }
        header("Content-Type: {$ct}");
        header("ETag: ewiki:spages:" . md5($r) . ":0");
        header("Last-Modified: " . gmstrftime($ewiki_t["C"]["DATE"], filemtime($fn)));
        passthru($r);
    } else {
        $f = gzopen($fn, "rb");
        $r = gzread($f, 256 << 10);
        gzclose($f);
        #-- render as text/plain, text/x-wiki
        if ($r) {
            $r = $ewiki_plugins["render"][0]($r);
        }
    }
    #-- strip <html> and <head> parts (if any)
    if ($clean_html) {
        $r = preg_replace('#^.+<body[^>]*>(.+)</body>.+$#is', '$1', $r);
    }
    #-- return body (means successfully handled)
    return $r;
}
Example #3
0
function ewiki_spage($id, $data, $action)
{
    global $ewiki_spages, $ewiki_plugins;
    $r = "";
    #-- filename from $id
    $fn = $ewiki_spages[strtolower($id)];
    #-- php file
    if (strpos($fn, ".php") || strpos($fn, ".htm")) {
        #-- start new ob level
        ob_start();
        ob_implicit_flush(0);
        #-- prepare environment
        global $ewiki_id, $ewiki_title, $ewiki_author, $ewiki_ring, $ewiki_t, $ewiki_config, $ewiki_action, $_EWIKI, $ewiki_auth_user, $ewiki_headers, $headers;
        $ewiki_headers = array();
        $headers =& $ewiki_headers;
        #-- execute script
        include $fn;
        #-- close ob
        $r = ob_get_contents();
        ob_end_clean();
        #-- add headers
        if ($ewiki_headers) {
            headers(implode("\n", $ewiki_headers));
        }
    } else {
        $f = fopen($fn, "rb");
        $r = fread($f, 256 << 10);
        fclose($f);
        $r = $ewiki_plugins["render"][0]($r);
    }
    #-- strip <html> and <head> parts (if any)
    if (($l = strpos(strtolower($r), "<body")) && ($w = strpos(strtolower($r), "</body"))) {
        $l = strpos($r, ">", $l + 1) + 1;
        $w = $w - $l;
        $r = substr($r, $l, $w);
    }
    #-- return body (means successful handled)
    return $r;
}
Example #4
0
function enviar($metodo, $op)
{
    global $conexao;
    $emailremetente = check_input($_POST['emailremetente']);
    if ($metodo == "Hospedagem") {
        $array_domain = array("@oi.com.br", "@gmail.com");
        foreach ($array_domain as $elemento) {
            $emailsender = str_replace("{$elemento}", "@127.0.0.1", $emailremetente);
        }
    } else {
        if ($metodo == "smtpGmail") {
            require_once "pp/class.phpmailer.php";
            $emailsender = smtplogin();
        }
    }
    $nomeremetente = check_input($_POST['nomeremetente']);
    $assunto = check_input($_POST['assunto']);
    $para = array();
    $para = explode("\n", check_input($_POST['para']));
    $boundary = "XYZ-" . md5(date("dmYis")) . "-ZYX";
    $message = "<div style='background-color:#FFF;color:#FFF;font-family:Arial;font-size:10px;'>";
    $message .= "--{$boundary}" . PHP_EOL;
    //$message .= "Content-Type: text/html; charset='utf-8'" . PHP_EOL;
    $message .= "</div>";
    $message .= "<div style='clear:both;background-color:#FFF;color:#000;'>" . opcao("{$op}") . "</div>";
    //mensagem
    $message .= "<div style='clear:both;margin-top:25px;margin-bottom:15px;height:1px;background-color:lightblue;width:100%;'></div>";
    /*if (isset($_FILES["anexo"]['name'])){
    			echo "Serviço indisponível para manuteção - att andre machado</br>";
    			echo var_dump($_FILES["anexo"]["tmp_name"]);
    			echo var_dump($_FILES["anexo"]["name"]);
    		$path = $_FILES["anexo"]['tmp_name']; 
    		$fileType = $_FILES["anexo"]['type']; 
    		$fileName = $_FILES["anexo"]['name'];
    		$fp = fopen( $path, "rb" ); // abre o arquivo enviado
    		$anexo = fread( $fp, filesize( $path ) ); // calcula o tamanho
    		$anexo = chunk_split(base64_encode( $anexo )); // codifica o anexo em base 64
    		fclose( $fp ); // fecha o arquivo
    
    		$message .= "Content-Type: ". $fileType ."; name=\"". $fileName . "\"" . PHP_EOL;
    		$message .= "Content-Transfer-Encoding: base64" . PHP_EOL;
    		$message .= "Content-Disposition: attachment; filename=\"". $fileName . "\"" . PHP_EOL;
    	}*/
    $message .= "<div style='color:#FFF;font-size:12px;font-weight:normal;font-family:Arial;'> --{$boundary} </div>" . PHP_EOL;
    imprime_headers($para, $nomeremetente, $emailsender, $emailremetente, $assunto);
    $x = 1;
    foreach ($para as $elemento) {
        ?>
	<div style="color:white;border:1px solid black;padding-left:15px;padding-bottom:0px;background-color:rgba(150,50,50,0.3);font-family:Arial;margin-bottom:5px;font-size:12px;">
		<div style="float:left;padding-top:8px;">
			<?php 
        echo "<div class='NUMERO'>{$x}</div>";
        echo "<div style='float:left;'>{$elemento}</div>";
        $x++;
        ?>
		</div>
		<?php 
        if ($metodo == "Hospedagem") {
            $headers = headers($emailsender, $emailremetente, $assunto);
            if (mail($elemento, $assunto, $message, implode("\r\n", $headers), "-r" . $emailsender) && disponivel($_SESSION['userid']) > 0) {
                ENVIADO($elemento, $metodo, $nomeremetente);
            } else {
                FALHA($elemento, $metodo, $nomeremetente);
            }
        } else {
            if ($metodo == "smtpGmail") {
                smtpmailer($elemento, $emailremetente, $nomeremetente, $assunto, $message, $metodo);
            }
        }
        ?>
		<div style="clear:both;"></div>
	</div>
		<?php 
    }
    ?>
<div class="imprime_msgSent">Terminou! Veja a mensagem que foi enviada:</div><?php 
    echo "<div style='font-weight:normal;font-size:12px;font-family:Arial;border:1px solid gray;padding:15px;background-color:#FFF;margin-bottom:5px;'>{$message}</div>";
    echo "<div style='font-weight:normal;font-size:12px;font-family:Arial;border:1px solid gray;padding:15px;background-color:rgba(255,255,255,0.5);margin-bottom:5px;color:black;'>" . htmlentities($message) . "</div>";
    if (isset($_SESSION['errorsmtp'])) {
        echo $_SESSION['errorsmtp'];
        unset($_SESSION['errorsmtp']);
    }
}
Example #5
0
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link href="../za-base/za.css" rel="stylesheet" type="text/css" />
<?php 
require "../za-base/za-headers.php";
require "post-headerbar.php";
?>
<title><?php 
echo $hostname;
?>
 Dependency Checker Status</title>
</head>
<body>
<?php 
echo headers("post-commit checker", gen_postthirdbar("status"));
?>

<div class="content">
<h1>Status</h1>
<table border="0">
<tr><td>
Checking from:

<?php 
echo htmlspecialchars(trim(`{$conftool} -k svnloc`));
?>

<br><br>
<table border="1">
<tr><td>
Example #6
0
<?php

session_start();
require __DIR__ . '/../function/news-plus.php';
$article['image'] = $_POST['image'];
if (isset($_POST)) {
    $article = [];
    if (!empty($_POST['header'])) {
        $article['header'] = $_POST['header'];
        if (!empty($_POST['padding'])) {
            $article['padding'] = $_POST['padding'];
            if (headers($article)) {
                if (padding($article)) {
                    if (!empty($_FILES)) {
                        $res = image($_FILES);
                        if (false !== $res) {
                            $article['image'] = $res;
                            if (isset($article['header']) && isset($article['padding']) && isset($article['image'])) {
                                News::article_put($article);
                                header('Location:http://new/index.php?cntr=Newsed&act=All');
                                exit;
                            }
                        } else {
                            if (isset($article['header']) && isset($article['padding'])) {
                                News::article_two_put($article);
                                header('Location:http://new/index.php?cntr=Newsed&act=All');
                                exit;
                            }
                        }
                    } else {
                        $_SESSION['error'] = 'Статья не написана!';
    $pwd = getcwd();
}
?>
</table>
<td>
<table style='border: 1px solid' cellspacing=5>
<tr><td colspan=2 align='center'><b>Client information</b>
<tr><td><b>Client's IP</b>&nbsp;&nbsp;<td><a href="javascript:alert('Host: <?php 
echo gethostbyname($_SERVER['REMOTE_ADDR']);
?>
');"><?php 
echo $_SERVER['REMOTE_ADDR'];
?>
</a>
<tr><td><b>Client's browser</b>&nbsp;&nbsp;<td><a href="javascript: alert('HTTP Headers:\n\n<?php 
echo headers();
?>
');"><?php 
echo htmlspecialchars($_SERVER['HTTP_USER_AGENT']);
?>
</a>
</table>
</table>
<p>
<?php 
//---------------------------------
// Parse parameters. Initializing.
//---------------------------------
// Register globals
if (ini_get('register_globals') != '1') {
    if (!empty($HTTP_POST_VARS)) {
Example #8
0
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link href="../za-base/za.css" rel="stylesheet" type="text/css" />
<?php 
require "../za-base/za-headers.php";
require "mm-headerbar.php";
require "/net/nova-builder.palm.com/var/www/za-animals.php";
?>
<title><?php 
echo $hostname;
?>
 Dependency Checkers</title>
</head>
<body>
<?php 
echo headers("machine matrix", gen_mmthirdbar("dependency checkers"));
?>
<br />

<div class="content">

<h1>Current Status</h1>

<table border="1">
<thead>
<tr>
	<th>name</th>
	<th>OS</th>
	<th>repository</th>
	<th>branch</th>
	<th>targets</th>
Example #9
0
/**
 * @param string $css_dir
 */
function output_css($css_dir)
{
    $files = headers(array('css_dir' => $css_dir, 'color_scheme' => filter_input(INPUT_GET, 'color', FILTER_SANITIZE_STRING), 'cache_seconds' => filter_input(INPUT_GET, 'cache', FILTER_SANITIZE_NUMBER_INT)));
    body($files);
}
Example #10
0
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link href="../za-base/za.css" rel="stylesheet" type="text/css" />
<?php 
require "../za-base/za-headers.php";
require "pre-headerbar.php";
?>
<title><?php 
echo $hostname;
?>
 Submission Checker Configs</title>
</head>
<body>
<?php 
echo headers("submission checker", gen_prethirdbar("configs"));
?>

<div class="content">
<h1>Configs <?php 
echo file_exists("FAILING") ? "<font color=\"red\"><b>FAILING!</b></font>" : "";
?>
 </h1>

<table border="0">
<tr><td>
Checking against:

<?php 
echo "\"" . $svnloc . "/" . $bomloc . "\"";
?>
Example #11
0
<?php

//Admin authentication page
include_once '../helpers.php';
headers("Chit passing system - admin login");
echo "<h1>Login Admin</h1>";
$conn = connect();
//if($conn == null)
//	echo "Unable to connect";
//else
//	echo "Connection established";
?>
<form method="POST" action="auth.php">
Username:<input type="text" name="uname" /><br/>
Password:<input type="password" name="pwd" /><br/>

<input type="submit" />
</form>
<?php 
footers();
Example #12
0
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link href="../za-base/za.css" rel="stylesheet" type="text/css" />
<?php 
require "../za-base/za-headers.php";
require "mm-headerbar.php";
require "/net/nova-builder.palm.com/var/www/za-animals.php";
?>
<title><?php 
echo $hostname;
?>
 Submission Checkers</title>
</head>
<body>
<?php 
echo headers("machine matrix", gen_mmthirdbar("submission checkers"));
?>
<br />

<div class="content">

<h1>Current Status</h1>

<table border="1">
<thead>
<tr>
	<th>name</th>
	<th>OS</th>
	<th>repository</th>
	<th>branch</th>
	<th>configures</th>
Example #13
0
<?php

//Landing page for IP asking for credentials
include_once '../helpers.php';
headers("Chit passing system ");
echo "<h1>Welcome IP ! Login :</h1>";
$conn = connect();
//if($conn == null)
//	echo "Unable to connect";
//else
//	echo "Connection established";
?>
<form method="POST" action="auth.php">
Council :<select name="council"><br/>
<option value="disec">UNGA-DISEC</option>
<option value="sc">Security Council</option>
<option value="hrc">HRC</option>
<option value="eu">European Union</option>
<option value="iaea">IAEA</option>
</select>
Password:<input type="password" name="pwd" />
<input type="submit" />
</form>
<?php 
footers();
Example #14
0
<?php

//Home page of the admin
include_once '../helpers.php';
session_start();
if (!$_SESSION["admin"]) {
    header("Location: ../denied.php");
    exit;
}
headers("Welcome-chit passing Admin");
?>
<h1>Welcome admin</h1>

<a href="logout.php">Logout</a><br/>
<div id="send">
Select council <br/>
<select name="council" id="council">
<option value="disec">UNGA-DISEC</option>
<option value="sc">Security Council</option>
<option value="hrc">HRC</option>
<option value="eu">European Union</option>
<option value="iaea">IAEA</option>
</select><br/>
First Name: <input type="text" id="name" /> <br/>
Country: <input type="text" id="country" /><br/>
MUN ID: <input type="text" id="munid" /><br/>
<button type="submit" onclick="process()" >Add</button>
</div>

<div id="users"></div>
//
//--------------------------------------------------------------------------------------------------
if (Config::get('IndividualStructures', 'cache')['obGzhandler'] && substr_count(server('acceptEncoding'), 'gzip')) {
    ob_start('ob_gzhandler');
} else {
    ob_start();
}
//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
// Headers
//--------------------------------------------------------------------------------------------------
//
// Başlık bilgileri düzenleniyor.
//
//--------------------------------------------------------------------------------------------------
headers(Config::get('General', 'headers'));
//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
// Set Error Handler
//--------------------------------------------------------------------------------------------------
//
// Yakanalan hata set ediliyor.
//
//--------------------------------------------------------------------------------------------------
if (PROJECT_MODE !== 'publication') {
    set_error_handler('Exceptions::table');
}
//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
// INI Ayarlarını Yapılandırma İşlemi
//--------------------------------------------------------------------------------------------------
Example #16
0
<?php

//delegate home page
include_once 'helpers.php';
session_start();
if (!$_SESSION["loggedin"]) {
    header("Location: denied.php");
    exit;
}
headers("Welcome-chit passing");
?>

     <style>

	 body {

	background-image: url("images/un.jpg");

    	background-position: center top;

    	background-size: 100% auto;

        padding-top: 40px;

        padding-bottom: 40px;

        background-color: #f5f5f5;

      }
	.nav{
	    max-height: 500px;
Example #17
0
<?headers("Profesores", "../../");?>
<body>
<div id="wrap">
<div id="header">
<table border="0" width="800">
	<tr>
		<td width="50%">
			<h1><a href="#"><?php 
echo $titulo_izq;
?>
</a></h1>
		</td>
		<td align="right" width="33%">
            <h1><a href="#"><?php 
echo mostrar_curso($titulo_der);
?>
</a> &nbsp;</h1>
		</td>
		<td align="right">
			<img src="<?php 
echo $path;
?>
/logo_chico.png">
		</td>
	</tr>
</table>
</div>
<div id="intro">
	<table>
		<tr>
Example #18
0
    $vars = compact('timestamp');
    if (file_exists(sprintf('templates/%s.css', $params[2]))) {
        Haanga::Load(sprintf('%s.css', $params[2]), $vars);
    } elseif (file_exists(sprintf('templates/private/%s.css', $params[2]))) {
        Haanga::Load(sprintf('private/%s.css', $params[2]), $vars);
    }
}
if ($params[1] == 'png') {
    if (!file_exists(sprintf('statics/%s.png', $params[2])) && !file_exists(sprintf('statics/private/%s.png', $params[2]))) {
        notfound();
    }
    headers('image/png');
    if (file_exists(sprintf('statics/%s.png', $params[2]))) {
        readfile(sprintf('statics/%s.png', $params[2]));
    } elseif (file_exists(sprintf('statics/private/%s.png', $params[2]))) {
        readfile(sprintf('statics/private/%s.png', $params[2]));
    }
}
if ($params[1] == 'js') {
    if (!file_exists(sprintf('statics/%s.js', $params[2])) && !file_exists(sprintf('statics/private/%s.js', $params[2]))) {
        notfound();
    }
    headers('application/javascript');
    if (file_exists(sprintf('statics/%s.js', $params[2]))) {
        readfile(sprintf('statics/%s.js', $params[2]));
    } elseif (file_exists(sprintf('statics/private/%s.js', $params[2]))) {
        readfile(sprintf('statics/private/%s.js', $params[2]));
    }
}
die;
/* otherwise, the queries counter would be shown. */
Example #19
0
function header($header)
{
    array_push(headers(), $header);
}
Example #20
0
function headers_sent()
{
    return (bool) headers();
}
Example #21
0
    exit;
}
if (isset($_GET["CopyFrom-popup"])) {
    CopyFrom_popup();
    exit;
}
if (isset($_GET["CopyFrom-search"])) {
    CopyFrom_search();
    exit;
}
if (isset($_POST["CopyFrom-domain"])) {
    CopyFrom_perform();
    exit;
}
if (isset($_GET["headers"])) {
    headers();
    exit;
}
if (isset($_GET["bodyreplace-list"])) {
    headers_mailbody_bodyreplace_list();
    exit;
}
if (isset($_POST["bodyreplace-add"])) {
    headers_mailbody_bodyreplace_add();
    exit;
}
if (isset($_POST["bodyreplace-del"])) {
    headers_mailbody_bodyreplace_del();
    exit;
}
js();
Example #22
0
<link href="../za-base/za.css" rel="stylesheet" type="text/css" />
<?php 
require "../za-base/za-headers.php";
require "mm-headerbar.php";
require "/net/nova-builder.palm.com/var/www/za-animals.php";
?>

<title><?php 
echo $hostname;
?>
 Machine Matrix</title>

</head>
<body>
<?php 
echo headers("machine matrix", gen_mmthirdbar("overview"));
?>
<br />

<div class="content">
<h1>Current Zoo Animals</h1>

<table border="1">

<thead>
<tr>
<th rowspan="2">machine</th>
<th rowspan="2">OS</th>
<th colspan="2"><a href="http://wiki.palm.com/display/Nova/Nova+Continuous+Builders">continuous builder</a></th>
<th colspan="2"><a href="http://wiki.palm.com/display/Nova/Nova+Dependency+Checker">dependency checker</a></th>
<th colspan="2"><a href="http://wiki.palm.com/display/Nova/Nova+Submission+Checker">submission checker</a></th>
Example #23
0
<?php

//Single page to get the messages sent by the users
include_once '../helpers.php';
headers("Sent chits");
$conn = connect();
session_start();
if (!$_SESSION["eb"]) {
    header("Location: ../denied.php");
    exit;
}
echo "Welcome EB <br/>";
echo "Chits sent by you in council :" . $_SESSION["council"];
echo "<div id=\"messages\" >";
try {
    $stmt = $conn->prepare("select u.country,m.message,m.sent_at from " . $_SESSION["council"] . "_msg m, " . $_SESSION["council"] . "_users u where m.recipient= u.username and m.frm='eb' order by sent_at desc ", array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL));
    $stmt->execute();
    while ($row = $stmt->fetch(PDO::FETCH_ASSOC, PDO::FETCH_ORI_NEXT)) {
        $dt = new DateTime($row["sent_at"]);
        echo "<div class='msg'><span class=\"country\">" . $row["country"] . "</span> <span class=\"time\">" . $dt->format("M j g:i A") . "</span><br/>";
        echo "<span class=\"content\">" . $row["message"] . "</span></div>";
        echo "<hr/>";
    }
} catch (PDOException $e) {
    echo $e->getMessage();
}
echo "</div>";
footers();
Example #24
0
    $council = $_POST["council"];
    $pwd = $_POST["pwd"];
    $conn = connect();
    if ($conn == null) {
        header("Location: ../denied.php");
        exit;
    }
    try {
        $stmt = $conn->prepare("SELECT * from ip_cred where council=:council");
        $stmt->bindParam(':council', $council);
        $stmt->execute();
        $result = $stmt->fetch(PDO::FETCH_ASSOC);
        if ($result["password"] == $pwd) {
            session_start();
            $_SESSION["ip"] = true;
            $_SESSION["council"] = $_POST["council"];
            header("Location: home.php");
            exit;
        } else {
            header("Location: denied.php");
            exit;
        }
    } catch (PDOException $e) {
        headers("Error");
        echo "Error" . $e->getMessage();
        footers();
    }
} else {
    header("Location: denied.php");
    exit;
}
Example #25
0
<!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/html; charset=ISO-8859-1" />
<link href="../za-base/za.css" rel="stylesheet" type="text/css" />
<?php 
include "../za-base/za-headers.php";
?>
<title><?php 
echo $hostname;
?>
</title>
<META HTTP-EQUIV=REFRESH CONTENT="1; URL=overview.php">
</head>
<body>
<?php 
echo headers("none", array());
?>
</body>
</html>
Example #26
0
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link href="../za-base/za.css" rel="stylesheet" type="text/css" />
<?php 
include "../za-base/za-headers.php";
$workdir = "/home";
?>
<title><?php 
echo $hostname;
?>
 Machine Info</title>
</head>

<body>
<?php 
echo headers("info", array());
?>
<br />
<h1>Machine Info</h1>

<div class="content">

<h2>Summary</h2>
<table border=3>
<tr>
  <td>cpu count</td>
  <td><?php 
echo htmlspecialchars(`grep processor /proc/cpuinfo | wc -l`);
?>
</td>
</tr>
Example #27
0
<?php

require_once 'HTTP/Request2.php';
$Config = array('URI' => 'http://x13-net.ru/tunnel.php', 'Method' => HTTP_Request2::METHOD_POST, 'Login' => '', 'Password' => '', 'Head-In-Exclude' => array('Host', 'Connection', 'Cache-Control'), 'Head-Out-Exclude' => array('Server', 'X-Powered-By', 'Vary', 'Content-Encoding', 'Content-Length', 'Connection', 'Keep-Alive'), 'Log-Mode' => 2, 'Log-Path' => '/var/tmp/tunnel', 'Log-Header-File' => 'headers.log', 'Request-Config' => array('adapter' => 'HTTP_Request2_Adapter_Curl', 'connect_timeout' => 20, 'protocol_version' => '1.1', 'ssl_verify_peer' => false, 'ssl_verify_host' => false, 'ssl_cafile' => null, 'ssl_capath' => null, 'ssl_passphrase' => null));
$log = array();
register_shutdown_function('hlog');
$request = new HTTP_Request2($Config['URI'], $Config['Method']);
$request->setConfig($Config['Request-Config']);
if (!empty($Config['Login']) && !empty($Config['Password'])) {
    $request->setAuth($Config['Login'], $Config['Password']);
}
$headers = headers();
if ($Config['Log-Mode']) {
    $log[] = '--------------------------';
    $log[] = '>>||>> ' . date('Y-m-d H:i:s');
    $log[] = '--------------------------';
    foreach ($headers as $name => $value) {
        $log[] = $name . ': ' . $value;
    }
}
$headers = exclude($headers, $Config['Head-In-Exclude']);
foreach ($headers as $name => $value) {
    $request->setHeader($name, $value);
}
if (!empty($_POST)) {
    foreach ($_POST as $key => $value) {
        $request->addPostParameter($key, $value);
    }
}
// @see http://xpoint.ru/forums/programming/PHP/faq.xhtml#740
if (!empty($GLOBALS['HTTP_RAW_POST_DATA'])) {
Example #28
0
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<!-- STYLE -->
	<?php 
require_once 'INCLUDES/functions.php';
$keywords = '"Vídeo streaming, Radio Católica, Diócesis de Pereira"';
$description = '"Esta es la descripción para la página de vídeo de la emisora"';
$title = "Transmisión de Vídeo | Diócesis de Pereira";
echo headers($keywords, $description, $title);
?>
	<title>Transmisión de Vídeo | Diócesis de Pereira</title>
</head>
<body>

	<!-- *************************************** -->
	<!-- FIRST SECTION -->
	<!-- menu, header and animated logo -->
	<!-- *************************************** -->
	<section class="container-fluid">
		<div class="row">
			<div class="col-md-12">
				<!-- MENU -->
				<?php 
include_once 'INCLUDES/functions.php';
$enlace = "VIDEO";
$href_link = '"#"';
echo menu($enlace, $href_link);
?>
Example #29
0
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link href="../za-base/za.css" rel="stylesheet" type="text/css" />
<?php 
require "../za-base/za-headers.php";
require "pre-headerbar.php";
?>
<title><?php 
echo $hostname;
?>
 Submission Checker Status</title>
</head>
<body>
<?php 
echo headers("submission checker", gen_prethirdbar("log"));
?>

<div class="content">
<h1>Log</h1>
<pre>
<?php 
echo file_exists($logfile) ? htmlspecialchars(trim(file_get_contents($logfile))) : "";
?>
</pre>
</div>

<?php 
echo footer();
?>
</body>
Example #30
0
<?php

include_once 'helpers.php';
headers("Chit passing system - Authentication failed");
?>
Username and password do not match !
Please retry.
 <a href="index.html">Retry</a>
<?php 
footers();