• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP html_header_demo函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中html_header_demo函数的典型用法代码示例。如果您正苦于以下问题:PHP html_header_demo函数的具体用法?PHP html_header_demo怎么用?PHP html_header_demo使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了html_header_demo函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: exit

<?php

// $CVSHeader: _freebeer/www/demo/HTML.LockFormFields.php,v 1.3 2004/03/08 04:29:18 ross Exp $
// Copyright (c) 2002-2004, Ross Smith.  All rights reserved.
// Licensed under the BSD or LGPL License. See license.txt for details.
// \todo fix wget's continuously reporting "End of file while parsing headers."
if (preg_match('/wget/i', $_SERVER['HTTP_USER_AGENT'])) {
    echo "<html><body></body></html>";
    exit(0);
}
require_once './_demo.php';
require_once FREEBEER_BASE . '/lib/HTML/LockFormFields.php';
echo html_header_demo('fbHTML_LockFormFields Class (Lock Selected Form Fields)');
$msg = 'Values in v1 and v2 are locked. Values in v3 and v4 can be modified.';
$locked_fields = array('textfield1', 'textfield2');
if (isset($_REQUEST['set'])) {
    $_REQUEST = fbHTML_LockFormFields::set($_REQUEST, $locked_fields);
} elseif (isset($_REQUEST['check'])) {
    if (fbHTML_LockFormFields::check($_REQUEST, $locked_fields)) {
        $msg = 'Values in v1 and v2 have not been modified.<br>';
    } else {
        $msg = '<b>WARNING: v1 and/or v2 have been modified.</b><br>';
    }
    //	$msg .= 'hash=' . fbHTML_LockFormFields::_generateHash($_REQUEST, $locked_fields);
    //	$msg .= "<br />\n";
} else {
    $_REQUEST['textfield1'] = 'Value1';
    $_REQUEST['textfield2'] = 'Value2';
    $_REQUEST['textfield3'] = 'Value3';
    $_REQUEST['textfield4'] = 'Value4';
}
开发者ID:Artea,项目名称:freebeer,代码行数:31,代码来源:HTML.LockFormFields.php


示例2: html_header_demo

<?php

// $CVSHeader: _freebeer/www/demo/Backport.php,v 1.2 2004/03/07 17:51:33 ross Exp $
// Copyright (c) 2002-2004, Ross Smith.  All rights reserved.
// Licensed under the BSD or LGPL License. See license.txt for details.
require_once './_demo.php';
require_once FREEBEER_BASE . '/lib/Backport.php';
echo html_header_demo('fbBackport.php Demo');
echo "<pre>\n";
$a = array('green', 'red', 'yellow');
$b = array('avocado', 'apple', 'banana');
$rv = array_combine($a, $b);
print_r($rv);
//		$rv = array('green' => 'avocado', 'red' => 'apple', 'yellow' => 'banana');
$expected = array('green' => 'avocado', 'red' => 'apple', 'yellow' => 'banana');
assert($expected == $rv);
$a1 = array('a' => 'green', 'b' => 'brown', 'c' => 'blue', 'red');
$a2 = array('a' => 'green', 'yellow', 'red');
$result = array_diff_assoc($a1, $a2);
echo 'array_diff_assoc($a1, $a2)=';
print_r($result);
$expected = array('b' => 'brown', 'c' => 'blue', '0' => 'red');
echo $result == $expected ? 'ok' : '*FAILED*';
echo "\n\n";
$result = sha1('A');
echo 'sha1(A)=', $result, "\n";
$expected = '6dcd4ce23d88e2ee9568ba546c007c63d9131c1b';
echo $result == $expected ? 'ok' : '*FAILED*';
echo "\n\n";
printf("sha1_file(%s)=", basename(__FILE__));
echo sha1_file(__FILE__);
开发者ID:Artea,项目名称:freebeer,代码行数:31,代码来源:Backport.php


示例3: html_header_demo

<?php

// $CVSHeader: _freebeer/www/demo/setlocale.php,v 1.2 2004/03/07 17:51:34 ross Exp $
// Copyright (c) 2002-2004, Ross Smith.  All rights reserved.
// Licensed under the BSD or LGPL License. See license.txt for details.
require_once './_demo.php';
require_once FREEBEER_BASE . '/lib/Locale.php';
require_once FREEBEER_BASE . '/lib/ISO639.php';
require_once FREEBEER_BASE . '/lib/ISO639/Alpha3.php';
require_once FREEBEER_BASE . '/lib/ISO639/Map.php';
require_once FREEBEER_BASE . '/lib/ISO3166.php';
require_once FREEBEER_BASE . '/lib/ISO639/ISO3166_Map.php';
require_once FREEBEER_BASE . '/lib/ISO3166/ISO639_Map.php';
echo html_header_demo('fbLocale Class');
// en_US.iso885915
/*
$h = fbISO3166::getIDToNameHash();

$cc2lang = fbISO639_ISO3166_Map::getCountryIDToLanguageIDHash();

$cc2lang = array_flip($cc2lang);

echo "<pre>\n";

foreach ($h as $country_id => $country_name) {
	$lang = @$cc2lang[$country_id];
	printf("\t\t'%s'\t=> '%s',\t// '%s'\t=> '%s'\n", 
		$country_id, 
		$lang, 
		$country_name,
		fbISO639::getLanguageName($lang)
开发者ID:Artea,项目名称:freebeer,代码行数:31,代码来源:setlocale.php


示例4: Class

<?php

// $CVSHeader: _freebeer/www/demo/hmac_login/server_adodb.php,v 1.3 2004/03/07 17:51:34 ross Exp $
// Copyright (c) 2002-2004, Ross Smith.  All rights reserved.
// Licensed under the BSD or LGPL License. See license.txt for details.
require_once '../_demo.php';
$title = 'fbHMAC_Login_ADOdb Class (Secure Challenge/Response Login)';
require_once FREEBEER_BASE . '/lib/HMAC_Login/ADOdb.php';
$html_header = html_header_demo($title, null, null, false);
require_once FREEBEER_BASE . '/lib/HTTP.php';
$client_url = dirname(dirname($_SERVER['PHP_SELF'])) . '/Hmac_Login.ADOdb.php';
if (!isset($_REQUEST['challenge'])) {
    fbHTTP::redirect($client_url);
    exit;
}
echo $html_header;
$hmac_login =& new fbHMAC_Login_ADOdb();
$hmac_login->setTimeout(10);
if (!$hmac_login->connect('localhost', 'root', '', 'hmac_login', 'mysql')) {
    echo $hmac_login->getLastError();
    exit;
}
// $hmac_login->_dbh->debug = true;
$hmac_login->validate(@$_REQUEST['challenge'], @$_REQUEST['response'], @$_REQUEST['login'], @$_REQUEST['password']);
echo $hmac_login->getLastError();
?>

<p>
<a href="<?php 
echo $client_url;
?>
开发者ID:Artea,项目名称:freebeer,代码行数:31,代码来源:server_adodb.php


示例5: html_header_demo

<?php

// $CVSHeader: _freebeer/www/demo/Binary_Search.File.php,v 1.2 2004/03/07 17:51:33 ross Exp $
// Copyright (c) 2002-2004, Ross Smith.  All rights reserved.
// Licensed under the BSD or LGPL License. See license.txt for details.
require_once './_demo.php';
require_once FREEBEER_BASE . '/lib/BinarySearch/File.php';
echo html_header_demo('fbBinarySearch_File Class (Binary Search a Sorted, Fixed Length Record File)');
@ini_set('max_execution_time', 0);
echo "<pre>\n";
$file = FREEBEER_BASE . '/etc/geo/geo-ips.txt';
$ips = array('0.0.0.0' => '000.000.000.000 000.255.255.255 US', '10.0.0.1' => '010.000.000.000 010.255.255.255 I0', '10.255.255.255' => '010.000.000.000 010.255.255.255 I0', '127.0.0.1' => '127.000.000.000 127.255.255.255 L0', '127.0.0.2' => '127.000.000.000 127.255.255.255 L0', '127.255.255.255' => '127.000.000.000 127.255.255.255 L0', '172.16.0.0' => '172.016.000.000 172.031.255.255 I0', '172.31.255.255' => '172.016.000.000 172.031.255.255 I0', '192.168.0.0' => '192.168.000.000 192.168.255.255 I0', '192.168.0.1' => '192.168.000.000 192.168.255.255 I0', '192.168.255.255' => '192.168.000.000 192.168.255.255 I0', '217.194.16.0' => '217.194.016.000 217.194.031.255 EU', '217.194.16.1' => '217.194.016.000 217.194.031.255 EU', '255.0.0.0' => '221.097.211.000 255.255.255.255 US', '255.255.255.254' => '221.097.211.000 255.255.255.255 US', '255.255.255.255' => '255.255.255.255 255.255.255.255 --', '9.20.0.0' => '009.020.000.000 009.020.127.255 GB');
function _formatIP4address($ip, $format = '%03d.%03d.%03d.%03d')
{
    $l = ip2long($ip);
    if ($l == -1 && $ip != '255.255.255.255') {
        return false;
    }
    $tuple1 = $l >> 24;
    if ($tuple1 < 0) {
        $tuple1 += 256;
    }
    $rv = sprintf($format, $tuple1, $l >> 16 & 0xff, $l >> 8 & 0xff, $l & 0xff);
    //printf("l=%s ip=%s rv=%s\n", $l, $ip, $rv);
    return $rv;
}
foreach ($ips as $ip => $expected_result) {
    $ipf = _formatIP4address($ip);
    $bsf =& new fbBinarySearch_File($file);
    $found = $bsf->search($ipf);
    $found = trim($found);
开发者ID:Artea,项目名称:freebeer,代码行数:31,代码来源:Binary_Search.File.php


示例6: Class

<?php

// $CVSHeader: _freebeer/www/demo/Hmac_Login.MySQL.php,v 1.3 2004/03/08 04:29:18 ross Exp $
// Copyright (c) 2002-2004, Ross Smith.  All rights reserved.
// Licensed under the BSD or LGPL License. See license.txt for details.
require_once './_demo.php';
$title = 'fbHMAC_Login_MySQL Class (Secure Challenge/Response Login)';
require_once FREEBEER_BASE . '/lib/ErrorHandler.php';
require_once FREEBEER_BASE . '/lib/HMAC_Login/MySQL.php';
fbErrorHandler::init();
echo html_header_demo($title, null, array('../opt/pajhome.org.uk/md5.js', '../lib/StrUtils.js'));
$hmac_login =& new fbHMAC_Login_MySQL();
/// \todo add as fields on from with a connect button
if (!$hmac_login->connect('localhost', 'root', '', 'hmac_login')) {
    echo $hmac_login->getLastError();
    exit;
}
// $hmac_login->_dbh->debug = true;
$challenge = $hmac_login->getChallenge();
if (!$challenge) {
    echo $hmac_login->getLastError();
    exit;
}
$hchallenge = htmlspecialchars($challenge);
?>
<script type="text/javascript" language="JavaScript" src="../opt/pajhome.org.uk/md5.js"></script>
<script type="text/javascript" language="JavaScript" src="../lib/StrUtils.js"></script>
<script type="text/javascript" language="JavaScript">
<!-- // <![CDATA[
function form_onsubmit(f) {
	f['login'].value	= StrUtils.trim(f['login'].value);
开发者ID:Artea,项目名称:freebeer,代码行数:31,代码来源:Hmac_Login.MySQL.php


示例7: exit

<?php

// $CVSHeader: _freebeer/www/demo/HTTP.ServerPush.php,v 1.3 2004/03/08 04:29:18 ross Exp $
// Copyright (c) 2002-2004, Ross Smith.  All rights reserved.
// Licensed under the BSD or LGPL License. See license.txt for details.
// \todo fix wget's continuously reporting "End of file while parsing headers."
if (preg_match('/wget/i', $_SERVER['HTTP_USER_AGENT'])) {
    echo "<html><body></body></html>";
    exit(0);
}
require_once './_demo.php';
require_once FREEBEER_BASE . '/lib/HTTP/ServerPush.php';
$html_header = html_header_demo('fbHTTP_ServerPush Class');
function page_function($push_mode, $seconds = null, $url = null, $loop = 0)
{
    $rv = '';
    if ($push_mode == FB_HTTP_SERVER_PUSH) {
        $rv .= "Content-type: text/html\n\n";
    }
    global $html_header;
    $spaces = '';
    #str_repeat('IESUCKS!', 10000);
    $time = strftime('%c');
    $refresh_method = $push_mode == FB_HTTP_SERVER_PUSH ? 'server push method' : 'HTTP Refresh command';
    $a = $_SERVER;
    ksort($a);
    $s = var_export($a, true);
    $rv .= $html_header;
    $CVSHeader = '$CVSHeader: _freebeer/www/demo/HTTP.ServerPush.php,v 1.3 2004/03/08 04:29:18 ross Exp $';
    $rv .= "The time is {$time}\n<br />\n<br />\n<i>Refresh <!-- {$loop} of {$_REQUEST['loops']} --> every {$_REQUEST['seconds']} seconds using {$refresh_method}</i>\n<pre>\n<form>\nSeconds: <input type='text' name='seconds' value='{$_REQUEST['seconds']}' />\n<!-- \nLoops:   <input type='text' name='loops' value='{$_REQUEST['loops']}' />\n-->\n<input type='submit' value='Submit' />\n</form>\n{$s}<!-- {$spaces} --></pre>\nSee\n<br />\n<a target='_blank' href='http://wp.netscape.com/assist/net_sites/pushpull.html'>An Exploration of Dynamic Documents</a>\n</p>\n\n<address>\n{$CVSHeader}\n</address>\n</body>\n</html>\n";
    return $rv;
开发者ID:Artea,项目名称:freebeer,代码行数:31,代码来源:HTTP.ServerPush.php


示例8: exit

<?php

// $CVSHeader: _freebeer/www/demo/HTTP.PathInfo(1).php,v 1.3 2004/03/08 04:29:18 ross Exp $
// Copyright (c) 2002-2004, Ross Smith.  All rights reserved.
// Licensed under the BSD or LGPL License. See license.txt for details.
// \todo fix wget's continuously reporting "End of file while parsing headers."
if (preg_match('/wget/i', $_SERVER['HTTP_USER_AGENT'])) {
    echo "<html><body></body></html>";
    exit(0);
}
require_once './_demo.php';
require_once FREEBEER_BASE . '/lib/HTTP/PathInfo.php';
fbHTTP_PathInfo::redirect();
session_start();
echo html_header_demo('HTTP/PathInfo class tester', null, null, false);
$url = $_SERVER['SCRIPT_NAME'];
echo "<a href=\"{$url}\">{$url}</a><br />\n";
$url = $_SERVER['REQUEST_URI'];
if (!isset($_SERVER['PATH_INFO'])) {
    $url .= '/PATH_INFO';
}
echo "<a href=\"{$url}\">{$url}</a><br />\n";
$url = $_SERVER['REQUEST_URI'];
if (!isset($_SERVER['PATH_INFO'])) {
    $url .= '/param1/value1/param2/value2';
}
echo "<a href=\"{$url}\">{$url}</a><br />\n";
echo "<a href=\"get.php\">get.php</a><br />\n";
echo "<pre>";
if (isset($_SESSION)) {
    echo '$_SESSION=';
开发者ID:Artea,项目名称:freebeer,代码行数:31,代码来源:HTTP.PathInfo(1).php


示例9: elseif

//$https->setHttpsPath('');
if (!empty($_REQUEST['http'])) {
    $https->httpMe();
} elseif (!empty($_REQUEST['https'])) {
    $https->httpsMe();
    $https->httpLinkify();
} elseif (!empty($_REQUEST['https_input'])) {
    $https->httpsMe();
    $https->httpLinkify(true);
}
session_start();
if (isset($_SERVER['HTTP_REFERER']) && !isset($_SESSION['fbHTTPS']['HTTP_REFERER'])) {
    $_SESSION['fbHTTPS']['HTTP_REFERER'] = $_SERVER['HTTP_REFERER'];
}
$path = isset($_SESSION['fbHTTPS']['HTTP_REFERER']) ? $_SESSION['fbHTTPS']['HTTP_REFERER'] : '';
echo html_header_demo($title, $path);
echo $https->isHttps() ? 'Secure (HTTPS)' : 'Not secure (HTTP)';
echo '<br />';
$h = $_SERVER['HTTP_HOST'];
$a_hrefs = array();
$delims = array('', '\'', '"');
$urls = array($_SERVER['PHP_SELF'], basename($_SERVER['PHP_SELF']), dirname($_SERVER['PHP_SELF']), dirname($_SERVER['PHP_SELF']) . '/', '.', '/', '');
$hosts = array("", "http://{$h}", "https://{$h}", "http://{$h}:80", "https://{$h}:443");
$a_hrefs = array();
foreach ($hosts as $host) {
    foreach ($urls as $url) {
        foreach ($delims as $delim) {
            if ($host && substr($url, 0, 1) != '/') {
                continue;
            }
            $a_hrefs[] = '<a href=' . $delim . $host . $url . $delim . '>';
开发者ID:Artea,项目名称:freebeer,代码行数:31,代码来源:HTTPS.php


示例10: html_header_demo

<?php

// $CVSHeader: _freebeer/www/demo/lib.bin2hex.php,v 1.2 2004/03/07 17:51:34 ross Exp $
// Copyright (c) 2002-2004, Ross Smith.  All rights reserved.
// Licensed under the BSD or LGPL License. See license.txt for details.
require_once './_demo.php';
echo html_header_demo('JavaScript Bin2Hex Class', '../lib/bin2hex.js');
if (!isset($_REQUEST['t_input'])) {
    $_REQUEST['t_input'] = 'enter text to bin2hex here';
}
if (!isset($_REQUEST['t_bin2hex'])) {
    $_REQUEST['t_bin2hex'] = '';
}
if (!isset($_REQUEST['t_hex2bin'])) {
    $_REQUEST['t_hex2bin'] = '';
}
?>
<script type="text/javascript" language="javascript1.2" src="../lib/bin2hex.js">
</script>
<script type="text/javascript" language="javascript1.2">
<!-- // <![CDATA[
function btn_bin2hex_onclick(f) {
	f.t_bin2hex.value = bin2hex(f.t_input.value);
	f.t_hex2bin.value = hex2bin(f.t_bin2hex.value);
	return false;
}
// ]]> -->
</script>

<form method="post" name='frm_bin2hex'>
<table>
开发者ID:Artea,项目名称:freebeer,代码行数:31,代码来源:lib.bin2hex.php


示例11: html_header_demo

<?php

// $CVSHeader: _freebeer/www/demo/Mhash.php,v 1.2 2004/03/07 17:51:33 ross Exp $
// Copyright (c) 2002-2004, Ross Smith.  All rights reserved.
// Licensed under the BSD or LGPL License. See license.txt for details.
require_once './_demo.php';
require_once FREEBEER_BASE . '/lib/Mhash.php';
echo html_header_demo('fbMhash Class (mhash() Emulation)');
$data = 'data';
$key = 'key';
echo "<pre>\n";
echo "mhash(MHASH_MD5, '{$data}', '{$key}')=", mhash(MHASH_MD5, $data, $key), "\n";
echo "bin2hex(mhash(MHASH_MD5, '{$data}', '{$key}'))=   ", bin2hex(mhash(MHASH_MD5, $data, $key)), "\n";
if (class_exists('fbMhash')) {
    echo "fbMhash::mhashhex(MHASH_MD5, '{$data}', '{$key}')=", fbMhash::mhashhex(MHASH_MD5, $data, $key), "\n";
}
if (defined('MHASH_SHA1')) {
    echo "mhash(MHASH_SHA1, '{$data}', '{$key}')=", mhash(MHASH_SHA1, $data, $key), "\n";
    echo "bin2hex(mhash(MHASH_SHA1, '{$data}', '{$key}'))=   ", bin2hex(mhash(MHASH_SHA1, $data, $key)), "\n";
    if (class_exists('fbMhash')) {
        echo "fbMhash::mhashhex(MHASH_SHA1, '{$data}', '{$key}')=", fbMhash::mhashhex(MHASH_SHA1, $data, $key), "\n";
    }
}
$hash_map = array(0 => 'MHASH_CRC32', 9 => 'MHASH_CRC32B', 8 => 'MHASH_GOST', 13 => 'MHASH_HAVAL128', 12 => 'MHASH_HAVAL160', 11 => 'MHASH_HAVAL192', 10 => 'MHASH_HAVAL224', 3 => 'MHASH_HAVAL256', 16 => 'MHASH_MD4', 1 => 'MHASH_MD5', 5 => 'MHASH_RIPEMD160', 2 => 'MHASH_SHA1', 17 => 'MHASH_SHA256', 7 => 'MHASH_TIGER', 14 => 'MHASH_TIGER128', 15 => 'MHASH_TIGER160');
$nr = mhash_count();
for ($i = 0; $i < $nr; $i++) {
    echo sprintf("The blocksize of %s is %d\n", mhash_get_hash_name($i), mhash_get_block_size($i));
}
?>
</pre>
<address>
开发者ID:Artea,项目名称:freebeer,代码行数:31,代码来源:Mhash.php


示例12: html_header_demo

<?php

// $CVSHeader: _freebeer/www/demo/lib.qsort.php,v 1.2 2004/03/07 17:51:34 ross Exp $
// Copyright (c) 2002-2004, Ross Smith.  All rights reserved.
// Licensed under the BSD or LGPL License. See license.txt for details.
require_once './_demo.php';
echo html_header_demo('JavaScript QSort Class', '../lib/qsort.js');
?>
<script type="text/javascript" language="JavaScript" src="../lib/qsort.js"></script>

<script type="text/javascript" language="JavaScript">
<!-- // <![CDATA[
var x = new Array();
for (var i = 0; i <= 10; ++i) {
	x[i] = Math.floor(65535 * Math.random());
}

document.write('Unsorted: ');

document.write(x.toString());

document.write('<br />Sorted:   ');

qsort(x); // , 0, x.length - 1);

document.write(x.toString());

//document.write('\nlength=' + x.length + "<br />\n");
// ]]> -->
</script>
开发者ID:Artea,项目名称:freebeer,代码行数:30,代码来源:lib.qsort.php


示例13: html_header_demo

<?php

// $CVSHeader: _freebeer/www/demo/Debug.php,v 1.2 2004/03/07 17:51:33 ross Exp $
// Copyright (c) 2002-2004, Ross Smith.  All rights reserved.
// Licensed under the BSD or LGPL License. See license.txt for details.
require_once './_demo.php';
require_once FREEBEER_BASE . '/lib/Debug.php';
fbDebug::setLevel(FB_DEBUG_ALL);
echo html_header_demo('fbDebug demo');
echo "<pre>\n";
echo 'fbDebug::getLevel()=', fbDebug::getLevel(), "\n";
fbDebug::log('log');
assert('1 == 2');
print_r(debug_backtrace());
fbDebug::stackdump();
fbDebug::trace("Hey you!");
?>
</pre>
<address>
$CVSHeader: _freebeer/www/demo/Debug.php,v 1.2 2004/03/07 17:51:33 ross Exp $
</address>

</body>
</html>
开发者ID:Artea,项目名称:freebeer,代码行数:24,代码来源:Debug.php


示例14: html_header_demo

<?php

// $CVSHeader: _freebeer/www/demo/lib.jsrpc.php,v 1.2 2004/03/07 17:51:34 ross Exp $
// Copyright (c) 2002-2004, Ross Smith.  All rights reserved.
// Licensed under the BSD or LGPL License. See license.txt for details.
require_once './_demo.php';
echo html_header_demo('JavaScript RPC (Remote Procedure Call)', './jsrpc/jsrpc2.php');
// \todo classify this logic
?>

<script type="text/javascript" language="JavaScript">
<!-- // <![CDATA[
function serverGetTime() {
  var iframe = document.getElementById("COMM");
  if (!iframe) {
    return true;
  }
  var answ = document.getElementById("ANSW");
  if (!answ) {
    return true;
  }
  iframe.src = "jsrpc/jsrpc2.php";
  return false;
}

function handleServerResponse(message) {
  var answ = document.getElementById("ANSW");
  if (answ) {
    answ.innerHTML = 'jsrpc2.php returned "' + message + '"';
  }
  var iframe = document.getElementById("COMM");
开发者ID:Artea,项目名称:freebeer,代码行数:31,代码来源:lib.jsrpc.php


示例15: html_header_demo

<?php

// $CVSHeader: _freebeer/www/demo/lib.base64.php,v 1.2 2004/03/07 17:51:34 ross Exp $
// Copyright (c) 2002-2004, Ross Smith.  All rights reserved.
// Licensed under the BSD or LGPL License. See license.txt for details.
require_once './_demo.php';
echo html_header_demo('JavaScript Base64 Class', '../lib/Base64.js');
if (!isset($_REQUEST['t_input'])) {
    $_REQUEST['t_input'] = 'enter text to base64 encode here';
}
if (!isset($_REQUEST['t_base64encode'])) {
    $_REQUEST['t_base64encode'] = '';
}
if (!isset($_REQUEST['t_base64decode'])) {
    $_REQUEST['t_base64decode'] = '';
}
?>
<script type="text/javascript" language="javascript1.2" src="../lib/Base64.js">
</script>
<script type="text/javascript" language="javascript1.2">
<!-- // <![CDATA[
function btn_base64_onclick(f) {
	f.t_base64encode.value = Base64.encode(f.t_input.value);
	f.t_base64decode.value = Base64.decode(f.t_base64encode.value);
	return false;
}

// ]]> -->
</script>

<form method="post" name='frm_base64'>
开发者ID:Artea,项目名称:freebeer,代码行数:31,代码来源:lib.base64.php


示例16: html_header_demo

<?php

// $CVSHeader: _freebeer/www/demo/index.php,v 1.2 2004/03/07 17:51:33 ross Exp $
// Copyright (c) 2002-2004, Ross Smith.  All rights reserved.
// Licensed under the BSD or LGPL License. See license.txt for details.
require_once './_demo.php';
echo html_header_demo();
$www_dir = dirname($_SERVER['SCRIPT_NAME']);
$dh = opendir(dirname(__FILE__));
// /todo fixme
$files = array();
while ($file = readdir($dh)) {
    if (!preg_match('/\\.php$/', $file) || preg_match('/^index\\.php$/', $file) || preg_match('/^_.*\\.php$/', $file)) {
        continue;
    }
    $files[] = $file;
}
closedir($dh);
sort($files);
$body_text = '';
foreach ($files as $file) {
    $body_text .= sprintf("<a href=\"%s\">%s</a><br />\n", $www_dir . '/' . $file, $file);
}
echo $body_text;
?>
<address>
$CVSHeader: _freebeer/www/demo/index.php,v 1.2 2004/03/07 17:51:33 ross Exp $
</address>
</body>
</html>
开发者ID:Artea,项目名称:freebeer,代码行数:30,代码来源:index.php


示例17: exit

<?php

// $CVSHeader: _freebeer/www/demo/HTML.Calender.php,v 1.3 2004/03/08 04:29:18 ross Exp $
// Copyright (c) 2002-2004, Ross Smith.  All rights reserved.
// Licensed under the BSD or LGPL License. See license.txt for details.
// \todo fix wget's continuously reporting "End of file while parsing headers."
if (preg_match('/wget/i', $_SERVER['HTTP_USER_AGENT'])) {
    echo "<html><body></body></html>";
    exit(0);
}
require_once './_demo.php';
require_once FREEBEER_BASE . '/lib/Pear/Pear.php';
require_once FREEBEER_BASE . '/lib/HTML/Calendar.php';
require_once 'HTML/Form.php';
echo html_header_demo('fbHTML_Calendar Class');
if (preg_match('/wget/i', $_SERVER['HTTP_USER_AGENT'])) {
    echo "</body></html>";
    exit(0);
}
class MyHTML_Calendar extends fbHTML_Calendar
{
    function drawCellText($days, $week, $col)
    {
        $rv = '';
        $len = rand(0, 16);
        while (strlen($rv) < $len) {
            $rv .= substr(md5(rand()), 1, rand(1, 8)) . " ";
        }
        return $rv;
    }
}
开发者ID:Artea,项目名称:freebeer,代码行数:31,代码来源:HTML.Calender.php


示例18: html_header_demo

<?php

// $CVSHeader: _freebeer/www/demo/ADOdb.adodb-session.php,v 1.4 2004/03/08 04:29:18 ross Exp $
// Copyright (c) 2002-2004, Ross Smith.  All rights reserved.
// Licensed under the BSD or LGPL License. See license.txt for details.
require_once './_demo.php';
require_once FREEBEER_BASE . '/lib/ADOdb/ADOdb.php';
require_once FREEBEER_BASE . '/opt/adodb/session/adodb-session.php';
$html_header = html_header_demo('ADODB_Session Class');
// to test the emulation code:
// require_once 'adodb/adodb-session-clob.php';
// require_once 'adodb/adodb-cryptsession.php';
// ADODB_Session::data_field_name('session_data');
// to test the original code:
// require_once ADODB_DIR . '/adodb-session.php';
// require_once ADODB_DIR . '/adodb-session-clob.php';
// require_once ADODB_DIR . '/adodb-cryptsession.php';
$gzip = (int) fbHTTP::getRequestVar('gzip');
$bzip2 = (int) fbHTTP::getRequestVar('bzip2');
$md5 = (int) fbHTTP::getRequestVar('md5');
$mcrypt = (int) fbHTTP::getRequestVar('mcrypt');
$secret = (int) fbHTTP::getRequestVar('secret');
$filters = array();
if ($gzip) {
    if (include_once ADODB_DIR . '/session/adodb-compress-gzip.php') {
        $filters[] =& new ADODB_Compress_Gzip();
    }
}
if ($bzip2) {
    if (include_once ADODB_DIR . '/session/adodb-compress-bzip2.php') {
        $filters[] =& new ADODB_Compress_Bzip2();
开发者ID:Artea,项目名称:freebeer,代码行数:31,代码来源:ADOdb.adodb-session.php


示例19: html_header_demo

<?php

// $CVSHeader: _freebeer/www/demo/lib.arcfour.php,v 1.2 2004/03/07 17:51:34 ross Exp $
// Copyright (c) 2002-2004, Ross Smith.  All rights reserved.
// Licensed under the BSD or LGPL License. See license.txt for details.
// See doc/license.txt or http://freebeer.sf.net/license.txt for details.
require_once './_demo.php';
echo html_header_demo('JavaScript Arcfour/MD5/SHA-1 Encryption', '../opt/vidwest.com/arcfour.js');
?>

<script type="text/javascript" language="javascript1.3" src="/opt/vidwest.com/arcfour.js">
</script>
<noscript>Sorry, this program needs a JavaScript 1.3 enabled browser!</noscript>

<script type="text/javascript" language="JavaScript">
<!-- // <![CDATA[
/* top-level functions  - testing... */
function initialize() {
	MD5test(1);
	SHA1test(1);
}

function digest(f) {
	if (f.h[0].checked) {
		f.k.value = MD5(f.t.value);
	} else {
		f.k.value = SHA1(f.t.value);
	}
}
function encrypt(f) {
	var key = f.k.value.substring(0,8);
开发者ID:Artea,项目名称:freebeer,代码行数:31,代码来源:lib.arcfour.php


示例20: html_header_demo

<?php

// $CVSHeader: _freebeer/www/demo/Binary_Search.Array.php,v 1.2 2004/03/07 17:51:33 ross Exp $
// Copyright (c) 2002-2004, Ross Smith.  All rights reserved.
// Licensed under the BSD or LGPL License. See license.txt for details.
require_once './_demo.php';
require_once FREEBEER_BASE . '/lib/BinarySearch/Array.php';
echo html_header_demo('fbBinarySearch_Array Class (Binary Search an Array)');
echo "<pre>";
if (!isset($_REQUEST['elements'])) {
    $_REQUEST['elements'] = 10;
}
if (!isset($_REQUEST['attempts'])) {
    $_REQUEST['attempts'] = 10;
}
$elements = $_REQUEST['elements'];
$attempts = $_REQUEST['attempts'];
$a = array();
for ($i = 0; $i < $elements; ++$i) {
    $a[$i] = sprintf('%010.10d', mt_rand() % 2000000000);
}
sort($a);
// echo 'a=';	print_r($a);
function compare($a, $b)
{
    if ($a > $b) {
        return 1;
    }
    if ($a < $b) {
        return -1;
    }
开发者ID:Artea,项目名称:freebeer,代码行数:31,代码来源:Binary_Search.Array.php



注:本文中的html_header_demo函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP html_header_show函数代码示例发布时间:2022-05-15
下一篇:
PHP html_header_checkbox函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap