当前位置: 首页>>代码示例>>PHP>>正文


PHP ShowHeader函数代码示例

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


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

示例1: LogInfo

function LogInfo($msg, $progress = false)
{
    global $quiet, $showHeader;
    if ($showHeader) {
        ShowHeader();
        $showHeader = false;
    }
    if (!$quiet) {
        PrintLine($msg, $progress);
    }
}
开发者ID:Deadlystrict,项目名称:Scripts,代码行数:11,代码来源:UVDConvert.php

示例2: ShowHeader

<?php

function ShowHeader($header)
{
    $len = strlen($header);
    $width = (int) ((80 - $len) / 2) + $len;
    $format = "\n%" . $width . "s\n\n";
    printf($format, $header);
}
ShowHeader("KSV MyVideoTV Downloader");
/* Open the cipher */
$td = mcrypt_module_open('arcfour', '', 'stream', '');
$iv = "";
/* Create key */
$id = $argv[1];
$key = md5("c8407a08b3c71ea418ec9dc662f2a56e40cbd6d5a114aa50fb1e1079e17f2b83" . md5($id));
/* Intialize encryption */
mcrypt_generic_init($td, $key, $iv);
/* Encrypted data */
$enc_xml = file_get_contents("http://www.myvideo.de/dynamic/get_player_video_xml.php?ID={$id}&flash_playertype=D&autorun=yes");
$enc_xml = explode("=", $enc_xml, 2);
$enc_xml = $enc_xml[1];
$encrypted = pack("H*", $enc_xml);
/* Decrypt encrypted string */
$decrypted = mdecrypt_generic($td, $encrypted);
/* Terminate decryption handle and close module */
mcrypt_generic_deinit($td);
mcrypt_module_close($td);
/* Show info */
$xml = simplexml_load_string($decrypted);
$video_params = $xml->{"playlist"}->{"videos"}->{"video"}->attributes();
开发者ID:noammazuz,项目名称:Scripts,代码行数:31,代码来源:MyVideoTV.php

示例3: MessageBox

function MessageBox($message, $links = array(), $helpid = '')
{
    SetNoUseCache();
    global $cfg, $color, $str;
    $urls = array();
    if (count($links) == 0) {
        $urls[0] = array($str['go_back'], 'JavaScript:history.back(-1)');
    } else {
        foreach ($links as $lnk) {
            $u = "{$lnk['1']}.php";
            $flag = false;
            foreach ($lnk as $k => $v) {
                if (!is_string($k)) {
                    continue;
                }
                if ($flag) {
                    $u .= "&{$k}={$v}";
                } else {
                    $u .= "?{$k}={$v}";
                    $flag = true;
                }
            }
            $urls[] = array($lnk[0], $u);
        }
    }
    $fixurl = '';
    foreach ($urls as $url) {
        $fixurl .= "[<a href=\"{$url['1']}\">{$url['0']}</a>]<br />";
    }
    $helplink = $helpid == '' ? '' : "[<a href=\"help.html#{$helpid}\" target=\"_blank\" >{$str['help']}</a>]";
    ShowHeader('<img src="./images/info.gif" /> ' . $str['general_msg'], $urls[0][1]);
    eval('echo "' . LoadTemplate('msgbox') . '";');
    ShowFooter();
}
开发者ID:BGCX261,项目名称:zjrenju-svn-to-git,代码行数:34,代码来源:functions.php

示例4: ErrorBox

<?php

require_once './include/common.php';
if (!isset($_GET['action']) || !in_array($_GET['action'], array('show', 'login', 'logout'))) {
    ErrorBox($str['act_err']);
}
switch ($_GET['action']) {
    case 'show':
        ShowHeader("<img src=\"./images/stan0.gif\" /> 用户登陆");
        eval('echo "' . LoadTemplate('login_form') . '";');
        ShowFooter();
        break;
    case 'login':
        if (!isset($_POST['log_name'], $_POST['log_pass'])) {
            ErrorBox($str['act_err']);
        }
        $log_pass = $_POST['log_pass'];
        $log_name = trim($_POST['log_name']);
        //删除旧的在线记录
        $sql = "DELETE FROM {$cfg['tb_onlines']} WHERE o_time<={$o_deadline} OR o_time>'" . time() . "'";
        RenDB_Query($sql, true);
        $row['u_id'] = 0;
        $sql = "SELECT u_id,ban_before FROM {$cfg['tb_members']} WHERE u_name='{$log_name}' AND u_pass=MD5('{$log_pass}') LIMIT 1";
        $result = RenDB_Query($sql);
        if (RenDB_Num_Rows($result)) {
            $row = RenDB_Fetch_Array($result);
        }
        if (!$row['u_id']) {
            WriteBBLog("密码错误 IP:{$userip} 用户名:'{$log_name}'", 'wrongpass');
            MessageBox('账号或密码无效');
        }
开发者ID:BGCX261,项目名称:zjrenju-svn-to-git,代码行数:31,代码来源:loginout.php

示例5: ShowChannel

    $url = $cli->getParam('url');
    $filename = $url;
    ShowChannel($url, $filename);
} else {
    $html = $cc->get("http://playtv.fr/television/");
    preg_match_all('/<a.*?data-channel="([^"]+).*?data-playerid="([^"]+)[^>]+>/i', $html, $links);
    for ($i = 0; $i < count($links[1]); $i++) {
        $ChannelList[$links[1][$i]] = $links[2][$i];
    }
    uksort($ChannelList, 'ci_uksort');
    $FirstRun = true;
    $KeepRunning = true;
    while ($KeepRunning) {
        if ($FirstRun) {
            $FirstRun = false;
        } else {
            ShowHeader($header);
        }
        Display($ChannelList, $ChannelFormat, 3);
        echo "Enter Channel Number : ";
        $channel = trim(fgets(STDIN));
        if (is_numeric($channel) && $channel >= 1 && $channel <= count($ChannelList)) {
            $url = $ChannelList[KeyName($ChannelList, $channel - 1)];
            $filename = KeyName($ChannelList, $channel - 1);
            ShowChannel($url, $filename);
        } else {
            $KeepRunning = false;
        }
    }
}
Close("Finished");
开发者ID:johnymarek,项目名称:xLiveCZ,代码行数:31,代码来源:playtv.php

示例6: PrintLine

function PrintLine($msg, $progress = false)
{
    global $showHeader;
    if ($showHeader) {
        ShowHeader();
        $showHeader = false;
    }
    if ($msg) {
        printf("\r%-79s\r", "");
        if ($progress) {
            printf("%s\r", $msg);
        } else {
            printf("%s\n", $msg);
        }
    } else {
        printf("\n");
    }
}
开发者ID:khoukhir,项目名称:divingmules-repo,代码行数:18,代码来源:AdobeHDS.php

示例7: MakeBBAvatar

$m_website = $mdata['u_website'] == '' ? '无' : "<a href=\"{$mdata['u_website']}\" target=\"_blank\">{$mdata['u_website']}</a>";
$m_avatar = MakeBBAvatar($mdata['u_avatar']);
//$m_grade= MakeBBGrade($mdata);
$m_tout = GetBBTout($mdata) . '%';
$m_rate = $mdata['g_w'] + $mdata['g_d'] + $mdata['g_l'] == 0 ? 0 : round($mdata['g_w'] * 100 / ($mdata['g_w'] + $mdata['g_d'] + $mdata['g_l']), 1);
$m_rate .= '%';
$mdata['reg_date'] = TimeToDate($mdata['reg_date']);
$mdata['last_visit'] = TimeToDate($mdata['last_visit']);
$buttons = '';
$encodename = urlencode($mdata['u_name']);
if ($udata['is_member'] && !IsSameName($name, $udata['u_name'])) {
    $buttons .= MakeBBButton("room_new.php?byname={$encodename}", '搜索新局');
    $buttons .= MakeBBButton("g_search.php?action=list&search_all_user=0&u_name={$encodename}", '搜索棋局');
    $buttons .= MakeBBButton("pm_new.php?action=new1&sendto={$encodename}", '发送消息', 500, 220);
    $buttons .= MakeBBButton("pm_new.php?action=invite1&sendto={$encodename}", '邀请下棋', 500, 220);
    if (!In_Names($mdata['u_name'], $udata['friends'])) {
        $buttons .= MakeBBButton("m_fb.php?action=f_add&tname={$encodename}", '加为好友');
    }
    if (!In_Names($mdata['u_name'], $udata['blacklist'])) {
        $buttons .= MakeBBButton("m_fb.php?action=b_add&tname={$encodename}", '加入黑名单');
    }
}
$m_rec = "{$mdata['g_w']}胜{$mdata['g_d']}平{$mdata['g_l']}负";
if ($mdata['u_bio'] == '') {
    $mdata['u_bio'] = '(空)';
} else {
    $mdata['u_bio'] = BBCoding($mdata['u_bio']);
}
ShowHeader('会员信息');
eval('echo "' . LoadTemplate('m_view') . '";');
ShowFooter();
开发者ID:BGCX261,项目名称:zjrenju-svn-to-git,代码行数:31,代码来源:m_view.php

示例8: switch

        switch ($gdata['host_color']) {
            case 0:
                $gcolor = '<img src="./images/white.gif">';
                break;
            case 1:
                $gcolor = '<img src="./images/black.gif">';
                break;
            default:
                $gcolor = '随机';
        }
        $skillmin = $udata['skill'] - $gdata['skill_range'];
        $skillmax = $udata['skill'] + $gdata['skill_range'];
        $greq = $gdata['skill_range'] == -1 ? '' : "({$skillmin}-{$skillmax}) ";
        $greq .= $gdata['tout_max'] >= 100 ? '' : "{$gdata['tout_max']}%";
        if ($greq == '') {
            $greq = '-';
        }
        $gtimelimit = Time2HMS($gdata['add_time']);
        if ($gdata['step_time']) {
            $gtimelimit .= '<br />' . Time2HMS($gdata['step_time']);
        }
        eval("\$nglist .= \"{$game_cell} \";");
        $gnum++;
    }
}
if ($gnum == 0) {
    $nglist = "<tr bgcolor=\"{$color['cell']}\"><td colspan=\"8\">(空)</td></tr>";
}
ShowHeader('<img src="./images/renju_new.gif" /> 我的新桌');
eval('echo "' . LoadTemplate('room_mynew') . '";');
ShowFooter();
开发者ID:BGCX261,项目名称:zjrenju-svn-to-git,代码行数:31,代码来源:room_mynew.php

示例9: HLTxt

    case 5:
        $order = 'g_d DESC';
        $lks[5] = HLTxt('Draw');
        break;
    case 6:
        $order = 'g_l DESC';
        $lks[6] = HLTxt('Lost');
        break;
    default:
        $order = 'points DESC';
        $lks[0] = HLTxt('Pts');
        break;
}
$sql = "SELECT * FROM `{$cfg['tb_players']}` WHERE group_id='{$group_id}' ORDER BY {$order}";
$result = RenDB_Query($sql);
$pllist = '';
$plnum = 0;
if (RenDB_Num_Rows($result) > 0) {
    $pl_cell = LoadTemplate('player_cell');
    while ($pldata = RenDB_Fetch_Array($result)) {
        $plnum++;
        $u_name = MemberLink($pldata['u_name']);
        eval("\$pllist.=\"{$pl_cell}\";");
    }
} else {
    $pllist = "<tr bgcolor=\"{$color['cell']}\"><td clospan=\"5\">({$str['empty']})</td></tr>";
}
//echo sprintf ( "%01.3f" , GetMicrotime() - $mt0 );
ShowHeader($str['cp_view']);
eval('echo "' . LoadTemplate('group_view') . '";');
ShowFooter();
开发者ID:BGCX261,项目名称:zjrenju-svn-to-git,代码行数:31,代码来源:group_view.php

示例10: foreach

}
foreach ($boards as $k => $sty) {
    if ($boardstyle != $k) {
        $board_options .= "<option value=\"{$k}\">{$sty['name']}</option>";
    }
}
//$thismode='g_view.php';
//$mtsign=$ismyturn?HLTxt('轮到你走'):'';
/*
	ShowHeader("<img src=\"./images/renju.gif\" /> 第{$gid}桌 $mtsign","g_view.php?gid=$gid",$cfg['span_refresh_game']);
else */
//自动刷新
//if($cfg['span_refresh_game']>0 && $nowtime-$gdata['l_time']<3600 && IsSameName($udata['u_name'],$names[1-$turnside]))
//	$frame_auto="<iframe frameborder=\"0\" width=\"0\" height=\"0\" src=\"auto_refresh.php?gid=$gid\"></iframe>";
//else $frame_auto='';
ShowHeader("<img src=\"./images/renju.gif\" /> 第{$gid}桌");
//公有数据
$checkcode = $udata['act_check'];
//$codeinfo="{$names[1]} vs {$names[0]}";
$moves = '';
for ($i = 0; $i < $mcount; $i++) {
    $pos = ord($gdata['moves'][$i]);
    $moves .= chr(intval(($pos - 1) % 15) + 65);
    $moves .= chr(($pos - 1) / 15 + 65);
}
$canmove = $ismyturn ? '1' : '0';
//内建棋盘
if ($boardstyle != 'java') {
    $sitewidth = $boards[$boardstyle]['width'];
    $boardwidth = $sitewidth * 17;
    $rmdir = './renju/' . $boards[$boardstyle]['id'];
开发者ID:BGCX261,项目名称:zjrenju-svn-to-git,代码行数:31,代码来源:g_view.php

示例11: HLTxt

        $lks[0] = HLTxt('积分');
        break;
}
//上榜人数
$sql = "SELECT COUNT(*) FROM {$cfg['tb_members']}";
$result = RenDB_Query($sql);
$row = RenDB_Fetch_Row($result);
$pageinfo = MakePageBar("ranking.php?orderby={$orderby}", $row[0], $cfg['mperpage'], $page);
$sql = "SELECT * FROM {$cfg['tb_members']} ORDER BY {$order} LIMIT {$pageinfo['start']},{$cfg['mperpage']}";
$result = RenDB_Query($sql);
$mlist = '';
$mnum = 0;
if (RenDB_Num_Rows($result) > 0) {
    $member_cell = LoadTemplate('m_cell');
    while ($mdata = RenDB_Fetch_Array($result)) {
        $morder = $pageinfo['start'] + $mnum + 1;
        $mname = MemberLink($mdata['u_name']);
        $mgrade = $mdata['skill'];
        $mrate = $mdata['g_w'] + $mdata['g_d'] + $mdata['g_l'] == 0 ? 0 : round($mdata['g_w'] * 100 / ($mdata['g_w'] + $mdata['g_d'] + $mdata['g_l']), 1);
        $mrate .= '%';
        $minfo = "{$mdata['g_w']}胜{$mdata['g_d']}平{$mdata['g_l']}负";
        $mregtime = TimeToDate($mdata['reg_date']);
        eval("\$mlist .= \"{$member_cell}\";");
        $mnum++;
    }
} else {
    $glist = "<tr><td colspan=\"7\">(空)</td></tr>";
}
ShowHeader('<img src="./images/ranking.gif" /> 用户排名');
eval('echo "' . LoadTemplate("ranking") . '";');
ShowFooter();
开发者ID:BGCX261,项目名称:zjrenju-svn-to-git,代码行数:31,代码来源:ranking.php

示例12: MemberLink

    }
    if (!$first) {
        $onlines .= ', ';
    }
    $onlines .= MemberLink($row['fake_name']);
    $first = false;
}
if ($guestcount > 0) {
    if (!$first) {
        $onlines .= ', ';
    }
    $onlines .= "Guest x {$guestcount}</td>";
}
//删除旧的在线记录
$sql = "DELETE FROM {$cfg['tb_onlines']} WHERE o_time<={$o_deadline} OR o_time>'" . time() . "'";
RenDB_Query($sql, true);
//在线纪录
require_once './cache/onlinerec.php';
if ($onlcount > $maxonline[0]) {
    $maxonline[0] = $onlcount;
    $buf = "<?php \$maxonline=array({$onlcount},{$nowtime}); ?>";
    $fr = @fopen('./cache/onlinerec.php', 'w');
    @flock($fr, LOCK_EX);
    @fwrite($fr, $buf);
    @fclose($fr);
    WriteBBLog("在线人数记录: {$onlcount}");
}
$maxonline[1] = TimeToDate($maxonline[1]);
ShowHeader('<img src="./images/home.gif" /> ' . $str['main_page']);
eval('echo "' . LoadTemplate('main') . '";');
ShowFooter();
开发者ID:BGCX261,项目名称:zjrenju-svn-to-git,代码行数:31,代码来源:index.php

示例13: ShowHeader

<?php

require_once './include/common.php';
ShowHeader('<img src="./images/help.gif" /> 帮助文档');
eval("echo \"" . LoadTemplate("help") . "\";");
ShowFooter();
开发者ID:BGCX261,项目名称:zjrenju-svn-to-git,代码行数:6,代码来源:help.php

示例14: template_GetPageHeader

    ?>
	<div class="sg-like hidden" id="extra-sg-like">
		<br />
		<div class="title big caps space">Suggestions I Like</div>
		<div id="sg-like"></div>
	</div>
<?php 
}
require_once __DIR__ . "/theme-slaughter.php";
require_once __DIR__ . "/theme-voting.php";
require_once __DIR__ . "/theme-announcement.php";
require_once __DIR__ . "/theme-admin.php";
require_once __DIR__ . "/theme-dialog.php";
template_GetPageHeader();
dialog_InsertCode();
ShowHeader();
if (!empty($CONFIG['theme-alert'])) {
    echo "<div class='alert'>", $CONFIG['theme-alert'], "</div>";
}
if (isset($GLOBALS['ERROR'])) {
    echo "<div class='alert'>", $GLOBALS['ERROR'], "</div>";
}
dialog_InsertScript();
?>
<script>
<?php 
if ($cookie_id === 0 && isset($GLOBALS['ERROR'])) {
    ?>
		legacy_DoLogout();
<?php 
}
开发者ID:povrazor,项目名称:ludumdare,代码行数:31,代码来源:index.php

示例15: MessageBox

     if ($row[0] >= $cfg['maxnewgame']) {
         MessageBox("您的新桌已经到了上限({$cfg['maxnewgame']})");
     }
     /*
     	$sql="SELECT COUNT(*) FROM $cfg[tb_games] WHERE b_name='$udata[u_name]' OR w_name='$udata[u_name]'";
     	$result = RenDB_Query($sql);
     	$row = RenDB_Fetch_Row( $result );
     	echo $row[0];
     	if( $row[0] >= $cfg['maxgame'] ) MessageBox("您进行中的的棋局已经到了上限($cfg[maxgame])");
     */
     $greate = $cfg['maxnewgame'] - $row[0];
     $gnumoption = '';
     for ($i = 2; $i <= $greate; $i++) {
         $gnumoption .= "<option value={$i}>{$i}</option>";
     }
     ShowHeader('<img src="./images/renju_new.gif" /> 创建新局');
     eval("echo \"" . LoadTemplate("g_form") . "\";");
     ShowFooter();
     break;
 case 'new2':
     if (!isset($timeadd, $timestep, $skill_range, $rules, $gcreate, $maxtout, $hostcolor)) {
         ErrorBox($str['act_err']);
     }
     $sql = "SELECT COUNT(*) FROM {$cfg['tb_newgames']} WHERE host_name='{$udata['u_name']}'";
     $result = RenDB_Query($sql);
     $row = RenDB_Fetch_Row($result);
     if ($row[0] >= $cfg['maxnewgame']) {
         MessageBox("您的新桌已经到了上限({$cfg['maxnewgame']})");
     }
     /*	$sql="SELECT COUNT(*) FROM $cfg[tb_games] WHERE b_name='$udata[u_name]' OR w_name='$udata[u_name]'";
     	$result = RenDB_Query($sql);
开发者ID:BGCX261,项目名称:zjrenju-svn-to-git,代码行数:31,代码来源:g_new.php


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