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


PHP start_html_output函数代码示例

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


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

示例1: demo_process_thread

function demo_process_thread($act, $outformat, $lastid, $isuser, $canpost, $istyping, $postmessage)
{
    global $kind_for_agent, $kind_info, $kind_events, $kind_user, $kind_agent, $webimroot, $settings;
    loadsettings();
    if ($act == "refresh" || $act == "post") {
        $lastid++;
        if ($outformat == "xml") {
            start_xml_output();
            print "<thread lastid=\"{$lastid}\" typing=\"" . ($istyping ? 1 : 0) . "\" canpost=\"" . ($canpost ? 1 : 0) . "\">";
        } else {
            start_html_output();
            $url = "{$webimroot}/thread.php?act=refresh&amp;thread=0&amp;token=123&amp;html=on&amp;user=" . ($isuser ? "true" : "false");
            print "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">" . "<html>\n<head>\n" . "<link href=\"{$webimroot}/styles/default/chat.css\" rel=\"stylesheet\" type=\"text/css\">\n" . "<meta http-equiv=\"Refresh\" content=\"" . $settings['updatefrequency_oldchat'] . "; URL={$url}&amp;sn=11\">\n" . "<meta http-equiv=\"Pragma\" content=\"no-cache\">\n" . "<title>chat</title>\n" . "</head>\n" . "<body bgcolor='#FFFFFF' text='#000000' link='#C28400' vlink='#C28400' alink='#C28400'>" . "<table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td valign='top' class='message'>";
        }
        if ($lastid == 1) {
            demo_print_message(array('ikind' => $kind_for_agent, 'created' => time() - 15, 'tname' => '', 'tmessage' => getstring2('chat.came.from', array("http://google.com"))), $outformat);
            demo_print_message(array('ikind' => $kind_info, 'created' => time() - 15, 'tname' => '', 'tmessage' => getstring('chat.wait')), $outformat);
            demo_print_message(array('ikind' => $kind_events, 'created' => time() - 10, 'tname' => '', 'tmessage' => getstring2("chat.status.operator.joined", array("Administrator"))), $outformat);
            demo_print_message(array('ikind' => $kind_agent, 'created' => time() - 9, 'tname' => 'Administrator', 'tmessage' => getstring("demo.chat.welcome")), $outformat);
            demo_print_message(array('ikind' => $kind_user, 'created' => time() - 5, 'tname' => getstring("chat.default.username"), 'tmessage' => getstring("demo.chat.question")), $outformat);
            if ($canpost && $outformat == 'xml') {
                demo_print_message(array('ikind' => $kind_info, 'created' => time() - 5, 'tname' => '', 'tmessage' => 'Hint: type something in message field to see typing notification'), $outformat);
            }
        }
        if ($act == 'post') {
            demo_print_message(array('ikind' => $isuser ? $kind_user : $kind_agent, 'created' => time(), 'tmessage' => $postmessage, 'tname' => $isuser ? getstring("chat.default.username") : "Administrator"), $outformat);
        }
        if ($outformat == "xml") {
            print "</thread>";
        } else {
            print "</td></tr></table><a name='aend'></a>" . "</body></html>";
        }
    }
}
开发者ID:paulcn,项目名称:mibew,代码行数:34,代码来源:demothread.php

示例2: show_install_err

function show_install_err($text)
{
    global $page, $version, $errors, $webimroot;
    $page = array('version' => $version, 'localeLinks' => get_locale_links("{$webimroot}/install/index.php"));
    $errors = array($text);
    start_html_output();
    require '../view/install_err.php';
    exit;
}
开发者ID:laiello,项目名称:cartonbank,代码行数:9,代码来源:dbinfo.php

示例3: setup_chatview_for_operator

}
if ($show == 'redirect' || $show == 'redirected' || $show == 'agentchat' || $show == 'agentrochat') {
    setup_chatview_for_operator(array('threadid' => 0, 'userName' => getstring("chat.default.username"), 'remote' => "1.2.3.4", 'agentId' => 1, 'groupid' => 0, 'userid' => 'visitor1', 'locale' => $current_locale, 'ltoken' => $show == 'agentrochat' ? 124 : 123), array('operatorid' => $show == 'agentrochat' ? 2 : 1));
    if ($show == 'redirect') {
        setup_redirect_links(0, $show == 'agentrochat' ? 124 : 123);
    } elseif ($show == 'redirected') {
        $page['message'] = getlocal2("chat.redirected.content", array("Administrator"));
    }
    $page['redirectLink'] = "{$webimroot}/operator/themes.php?preview={$preview}&amp;show=redirect";
    expand("../styles", "{$preview}", "{$show}.tpl");
    exit;
}
$templateList = array(array('label' => getlocal("page.preview.userchat"), 'id' => 'chat', 'h' => 480, 'w' => 640), array('label' => getlocal("page.preview.chatsimple"), 'id' => 'chatsimple', 'h' => 480, 'w' => 640), array('label' => getlocal("page.preview.nochat"), 'id' => 'nochat', 'h' => 480, 'w' => 640), array('label' => getlocal("page.preview.survey"), 'id' => 'survey', 'h' => 480, 'w' => 640), array('label' => getlocal("page.preview.leavemessage"), 'id' => 'leavemessage', 'h' => 480, 'w' => 640), array('label' => getlocal("page.preview.leavemessagesent"), 'id' => 'leavemessagesent', 'h' => 480, 'w' => 640), array('label' => getlocal("page.preview.mail"), 'id' => 'mail', 'h' => 254, 'w' => 603), array('label' => getlocal("page.preview.mailsent"), 'id' => 'mailsent', 'h' => 254, 'w' => 603), array('label' => getlocal("page.preview.redirect"), 'id' => 'redirect', 'h' => 480, 'w' => 640), array('label' => getlocal("page.preview.redirected"), 'id' => 'redirected', 'h' => 480, 'w' => 640), array('label' => getlocal("page.preview.agentchat"), 'id' => 'agentchat', 'h' => 480, 'w' => 640), array('label' => getlocal("page.preview.agentrochat"), 'id' => 'agentrochat', 'h' => 480, 'w' => 640), array('label' => getlocal("page.preview.error"), 'id' => 'error', 'h' => 480, 'w' => 640));
$template = verifyparam("template", "/^\\w+\$/", "chat");
$page['formpreview'] = $preview;
$page['formtemplate'] = $template;
$page['canshowerrors'] = $template == 'leavemessage' || $template == 'mail' || $template == 'all';
$page['formshowerr'] = $showerrors;
$page['availablePreviews'] = $stylelist;
$page['availableTemplates'] = array("chat", "chatsimple", "nochat", "survey", "leavemessage", "leavemessagesent", "mail", "mailsent", "redirect", "redirected", "agentchat", "agentrochat", "error", "all");
$page['showlink'] = "{$webimroot}/operator/themes.php?preview={$preview}&amp;" . ($showerrors ? "showerr=on&amp;" : "") . "show=";
$page['previewList'] = array();
foreach ($templateList as $tpl) {
    if ($tpl['id'] == $template || $template == 'all') {
        $page['previewList'][] = $tpl;
    }
}
prepare_menu($operator);
start_html_output();
setup_settings_tabs(3);
require '../view/themes.php';
开发者ID:paulcn,项目名称:mibew,代码行数:31,代码来源:themes.php

示例4: print_thread_messages

function print_thread_messages($thread, $token, $lastid, $isuser, $format, $agentid = null)
{
    global $webim_encoding, $webimroot, $connection_timeout, $settings;
    $threadid = $thread['threadid'];
    $istyping = abs($thread['current'] - $thread[$isuser ? "lpagent" : "lpuser"]) < $connection_timeout && $thread[$isuser ? "agentTyping" : "userTyping"] == "1" ? "1" : "0";
    if ($format == "xml") {
        $output = get_messages($threadid, "xml", $isuser, $lastid);
        start_xml_output();
        print "<thread lastid=\"{$lastid}\" typing=\"" . $istyping . "\" canpost=\"" . ($isuser || $agentid != null && $agentid == $thread['agentId'] ? 1 : 0) . "\">";
        foreach ($output as $msg) {
            print $msg;
        }
        print "</thread>";
    } else {
        if ($format == "html") {
            loadsettings();
            $output = get_messages($threadid, "html", $isuser, $lastid);
            start_html_output();
            $url = "{$webimroot}/thread.php?act=refresh&amp;thread={$threadid}&amp;token={$token}&amp;html=on&amp;user=" . ($isuser ? "true" : "false");
            print "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">" . "<html>\n<head>\n" . "<link href=\"{$webimroot}/styles/default/chat.css\" rel=\"stylesheet\" type=\"text/css\">\n" . "<meta http-equiv=\"Refresh\" content=\"" . $settings['updatefrequency_oldchat'] . "; URL={$url}&amp;sn=11\">\n" . "<meta http-equiv=\"Pragma\" content=\"no-cache\">\n" . "<title>chat</title>\n" . "</head>\n" . "<body bgcolor='#FFFFFF' text='#000000' link='#C28400' vlink='#C28400' alink='#C28400' onload=\"if( location.hash != '#aend' ){location.hash='#aend';}\">" . "<table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td valign='top' class='message'>";
            foreach ($output as $msg) {
                print $msg;
            }
            print "</td></tr></table><a name='aend'></a>" . "</body></html>";
        }
    }
}
开发者ID:laiello,项目名称:cartonbank,代码行数:27,代码来源:chat.php

示例5: expand

function expand($basedir, $style, $filename)
{
    global $expand_include_path, $current_style;
    start_html_output();
    if (!preg_match('/^\\w+$/', $style) || !is_dir("{$basedir}/{$style}")) {
        $style = "default";
    }
    $expand_include_path = "{$basedir}/{$style}/templates/";
    $current_style = $style;
    $contents = @file_get_contents($expand_include_path . $filename);
    if ($contents === false) {
        $expand_include_path = "{$basedir}/default/templates/";
        $current_style = "default";
        $contents = @file_get_contents($expand_include_path . $filename) or die("cannot load template");
    }
    echo expandtext($contents);
}
开发者ID:kuell,项目名称:chat,代码行数:17,代码来源:expand.php


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