1<div id="pfc_loader">
2
3<div style="width:250px;background-color:#FFF;border:1px solid #000;padding:10px;position:relative;margin:auto">
4  <p style="padding:0;margin:0;text-align:center;">
5    <?php echo _pfc("Chat loading ..."); ?><br style="margin:0"/><?php echo _pfc("Please wait"); ?>
6  </p>
7</div>
8
9<script type="text/javascript" src="<?php echo $c->data_public_url; ?>/js/compat.js"></script>
10<script type="text/javascript" src="<?php echo $c->data_public_url; ?>/js/md5.js"></script>
11<script type="text/javascript" src="<?php echo $c->data_public_url; ?>/js/cookie.js"></script>
12<script type="text/javascript" src="<?php echo $c->data_public_url; ?>/js/image_preloader.js"></script>
13<script type="text/javascript" src="<?php echo $c->data_public_url; ?>/js/myprototype.js"></script>
14<script type="text/javascript" src="<?php echo $c->prototypejs_url; ?>"></script>
15<script type="text/javascript" src="<?php echo $c->data_public_url; ?>/js/regex.js"></script>
16<script type="text/javascript" src="<?php echo $c->data_public_url; ?>/js/utf8.js"></script>
17<script type="text/javascript" src="<?php echo $c->data_public_url; ?>/js/sprintf2.js"></script>
18<script type="text/javascript" src="<?php echo $c->data_public_url; ?>/js/activity.js"></script>
19<script type="text/javascript" src="<?php echo $c->data_public_url; ?>/js/mousepos.js"></script>
20<script type="text/javascript" src="<?php echo $c->data_public_url; ?>/js/createstylerule.js"></script>
21<script type="text/javascript" src="<?php echo $c->data_public_url; ?>/js/pfcclient.js"></script>
22<script type="text/javascript" src="<?php echo $c->data_public_url; ?>/js/pfcgui.js"></script>
23<script type="text/javascript" src="<?php echo $c->data_public_url; ?>/js/pfcresource.js"></script>
24<script type="text/javascript" src="<?php echo $c->data_public_url; ?>/js/pfcprompt.js"></script>
25
26<script type="text/javascript">
27  // <![CDATA[
28<?php
29require_once dirname(__FILE__).'/../../src/pfcjson.class.php';
30$json = new pfcJSON();
31?>
32<?php $nick = $u->getNickname() != '' ? $json->encode($u->getNickname()) : $json->encode($c->nick); ?>
33
34var pfc                       = null; // will contains a pfcClient instance
35var pfc_nickname              = <?php echo ($GLOBALS["output_encoding"]=="UTF-8" ? $nick : iconv("UTF-8", $GLOBALS["output_encoding"],$nick)); ?>;
36var pfc_nickid                = <?php echo $json->encode($u->nickid); ?>;
37var pfc_version               = <?php echo $json->encode($version); ?>;
38var pfc_clientid              = <?php echo $json->encode(md5(uniqid(rand(), true))); ?>;
39var pfc_title                 = <?php echo $json->encode($title); ?>;
40var pfc_refresh_delay         = <?php echo $json->encode($refresh_delay); ?>;
41var pfc_refresh_delay_steps   = <?php echo $json->encode($refresh_delay_steps); ?>;
42var pfc_start_minimized       = <?php echo $json->encode($start_minimized); ?>;
43var pfc_nickmarker            = <?php echo $json->encode($nickmarker); ?>;
44var pfc_clock                 = <?php echo $json->encode($clock); ?>;
45var pfc_startwithsound        = <?php echo $json->encode($startwithsound); ?>;
46var pfc_showsmileys           = <?php echo $json->encode($showsmileys); ?>;
47var pfc_showwhosonline        = <?php echo $json->encode($showwhosonline); ?>;
48var pfc_focus_on_connect      = <?php echo $json->encode($focus_on_connect); ?>;
49var pfc_max_text_len          = <?php echo $json->encode($max_text_len); ?>;
50var pfc_max_displayed_lines   = <?php echo $json->encode($max_displayed_lines); ?>;
51var pfc_quit_on_closedwindow  = <?php echo $json->encode($quit_on_closedwindow); ?>;
52var pfc_debug                 = <?php echo $json->encode($debug); ?>;
53var pfc_btn_sh_smileys        = <?php echo $json->encode($btn_sh_smileys); ?>;
54var pfc_btn_sh_whosonline     = <?php echo $json->encode($btn_sh_whosonline); ?>;
55var pfc_displaytabimage       = <?php echo $json->encode($displaytabimage); ?>;
56var pfc_displaytabclosebutton = <?php echo $json->encode($displaytabclosebutton); ?>;
57var pfc_connect_at_startup    = <?php echo $json->encode($connect_at_startup); ?>;
58var pfc_notify_window         = <?php echo $json->encode($notify_window); ?>;
59var pfc_defaultchan           = <?php echo $json->encode($c->channels); ?>;
60var pfc_userchan              = <?php $list = array(); foreach($u->channels as $item) {$list[] = $item["name"];} echo $json->encode($list); ?>;
61var pfc_defaultprivmsg        = <?php echo $json->encode($c->privmsg); ?>;
62var pfc_userprivmsg           = <?php $list = array(); foreach($u->privmsg as $item) {$list[] = $item["name"];} echo $json->encode($list); ?>;
63var pfc_openlinknewwindow     = <?php echo $json->encode($openlinknewwindow); ?>;
64var pfc_bbcode_color_list     = <?php $list = array(); foreach($bbcode_colorlist as $v) {$list[] = substr($v,1);} echo $json->encode($list); ?>;
65var pfc_nickname_color_list   = <?php echo $json->encode($nickname_colorlist); ?>;
66var pfc_theme                 = <?php echo $json->encode($theme); ?>;
67var pfc_isready               = false;
68var pfc_server_script_url     = <?php echo $json->encode($c->server_script_url); ?>;
69var pfc_nickmeta_key_to_hide  = <?php echo $json->encode($c->nickmeta_key_to_hide); ?>;
70
71Event.observe(window, 'load', function() {
72  pfc = new pfcClient();
73  if (pfc_isready) pfc.loadChat(pfc_theme);
74});
75
76<?php if ($debug) { ?>
77var pfc_debug_color = true;
78function trace(text) {
79  var s = new String(text);
80  text = s.escapeHTML();
81  rx  = new RegExp('&lt;','g');
82  text = text.replace(rx, '\n&lt;');
83  var color = '';
84  if (pfc_debug_color)
85  {
86    color = '#BBB';
87    pfc_debug_color = false;
88  }
89  else
90  {
91    color = '#DDD';
92    pfc_debug_color = true;
93  }
94  $('pfc_debug').innerHTML = '<p style="margin:0;border-bottom:1px solid #555;background-color:'+color+'">' + text + '</p>' + $('pfc_debug').innerHTML ;
95}
96<?php } ?>
97
98  // ]]>
99</script>
100
101<div id="pfc_notloading" style="width:270px;background-color:#FFF;color:#000;border:1px solid #000;text-align:center;margin:5px auto 0 auto;font-size:10px;">
102<noscript>
103<p>
104<?php echo _pfc("%s appears to be either disabled or unsupported by your browser.","JavaScript"); ?> <?php echo _pfc("This web application requires %s to work properly.","JavaScript"); ?> <?php echo _pfc("Please enable %s in your browser settings, or upgrade to a browser with %s support and try again.","JavaScript","JavaScript"); ?>
105<hr />
106Please ask the <a href="http://www.phpfreechat.net">phpfreechat</a> community on the <a href="http://www.phpfreechat.net/forum/">forum</a> if you are not able to load the chat.
107</p>
108</noscript>
109<script type="text/javascript">
110  // <![CDATA[
111if (!browserSupportsCookies())
112  document.write('<?php echo _pfc("%s appears to be either disabled or unsupported by your browser.","Cookies"); ?> <?php echo _pfc("This web application requires %s to work properly.","Cookies"); ?> <?php echo _pfc("Please enable %s in your browser settings, or upgrade to a browser with %s support and try again.","Cookies","Cookies"); ?>');
113else if (!browserSupportsAjax())
114  document.write('<?php echo _pfc("%s appears to be either disabled or unsupported by your browser.","Ajax"); ?> <?php echo _pfc("This web application requires %s to work properly.","Ajax"); ?> <?php echo _pfc("Please upgrade to a browser with %s support and try again.","Ajax"); ?>');
115else if (!ActiveXEnabledOrUnnecessary())
116  document.write('<?php echo _pfc("%s appears to be either disabled or unsupported by your browser.","ActiveX"); ?> <?php echo _pfc("This web application requires %s to work properly.","Ajax"); ?> <?php echo _pfc("In Internet Explorer versions earlier than 7.0, Ajax is implemented using ActiveX. Please enable ActiveX in your browser security settings or upgrade to a browser with Ajax support and try again."); ?>');
117else
118{
119  $('pfc_notloading').style.display = 'none';
120  pfc_isready = true;
121}
122  // ]]>
123</script>
124</div> <!-- pfc_notloading -->
125
126</div> <!-- pfc_loader -->
127
128<div id="pfc_container"><!-- Will contains chat.html.tpl.php --></div>
129
130<?php if ($debug) { ?>
131  <div id="pfc_debug"></div>
132<?php } ?>
133