Example #1
0
 function writeDateContainer()
 {
     if ($this->day && $this->month && $this->year) {
         if ($this->hl) {
             if (stristr(PHP_OS, "win")) {
                 $dd = utf_conv(WIN_DEFAULT, 'utf-8', strftime(L_CAL_FORMAT, mktime(0, 0, 0, $this->month, $this->day, $this->year)));
             } else {
                 $dd = strftime(L_CAL_FORMAT, mktime(0, 0, 0, $this->month, $this->day, $this->year));
             }
         } else {
             $dd = date($this->date_format, mktime(0, 0, 0, $this->month, $this->day, $this->year));
         }
     } else {
         $dd = L_SEL_DATE;
     }
     echo "<span id=\"divCalendar_" . $this->objname . "_lbl\" class=\"date-tccontainer\">{$dd}</span>";
 }
	</TR>
<?php 
if ($last_login > $reg_time) {
    $longdtformat2 = $L == "english" ? str_replace("%d of", (stristr(PHP_OS, 'win') ? "%#d" : "%e") . "<sup>" . date('S', $last_login + C_TMZ_OFFSET * 60 * 60) . "</sup> of", L_LONG_DATETIME) : L_LONG_DATETIME;
    $last_visit = strftime($longdtformat2, $last_login + C_TMZ_OFFSET * 60 * 60);
    if (stristr(PHP_OS, 'win')) {
        $last_visit = utf_conv(WIN_DEFAULT, $Charset, $last_visit);
        if (strstr($L, "chinese") || strstr($L, "korean") || strstr($L, "japanese")) {
            $last_visit = str_replace(" ", "", $last_visit);
        }
    }
} elseif ($last_login < $reg_time && $last_login) {
    $longdtformat3 = $L == "english" ? str_replace("%d of", (stristr(PHP_OS, 'win') ? "%#d" : "%e") . "<sup>" . date('S', $reg_time + C_TMZ_OFFSET * 60 * 60) . "</sup> of", L_LONG_DATETIME) : L_LONG_DATETIME;
    $last_visit = strftime($longdtformat3, $reg_time + C_TMZ_OFFSET * 60 * 60);
    if (stristr(PHP_OS, 'win')) {
        $last_visit = utf_conv(WIN_DEFAULT, $Charset, $last_visit);
        if (strstr($L, "chinese") || strstr($L, "korean") || strstr($L, "japanese")) {
            $last_visit = str_replace(" ", "", $last_visit);
        }
    }
} else {
    $last_visit = L_REG_51;
}
// GeoIP mode for country flags
if (C_USE_FLAGS && ($power != "weak" || C_SHOW_FLAGS) && $email != '*****@*****.**' && $email != '*****@*****.**') {
    if (!isset($COUNTRY_CODE) || $COUNTRY_CODE == "") {
        // GeoIP mode for country flags
        if (!class_exists("GeoIP")) {
            include "plugins/countryflags/geoip.inc";
        }
        if (!isset($gi)) {
	var s_mon = "<?php 
echo defined('L_S_MON') ? L_S_MON : (stristr(PHP_OS, 'win') ? utf_conv(WIN_DEFAULT, 'utf-8', strftime('%a', '1270425600')) : strftime('%a', '1270425600'));
?>
";
	var s_tue = "<?php 
echo defined('L_S_TUE') ? L_S_TUE : (stristr(PHP_OS, 'win') ? utf_conv(WIN_DEFAULT, 'utf-8', strftime('%a', '1270512000')) : strftime('%a', '1270512000'));
?>
";
	var s_wed = "<?php 
echo defined('L_S_WED') ? L_S_WED : (stristr(PHP_OS, 'win') ? utf_conv(WIN_DEFAULT, 'utf-8', strftime('%a', '1270598400')) : strftime('%a', '1270598400'));
?>
";
	var s_thu = "<?php 
echo defined('L_S_THU') ? L_S_THU : (stristr(PHP_OS, 'win') ? utf_conv(WIN_DEFAULT, 'utf-8', strftime('%a', '1270684800')) : strftime('%a', '1270684800'));
?>
";
	var s_fri = "<?php 
echo defined('L_S_FRI') ? L_S_FRI : (stristr(PHP_OS, 'win') ? utf_conv(WIN_DEFAULT, 'utf-8', strftime('%a', '1270771200')) : strftime('%a', '1270771200'));
?>
";
	var s_sat = "<?php 
echo defined('L_S_SAT') ? L_S_SAT : (stristr(PHP_OS, 'win') ? utf_conv(WIN_DEFAULT, 'utf-8', strftime('%a', '1270857600')) : strftime('%a', '1270857600'));
?>
";
	var s_sun = "<?php 
echo defined('L_S_SUN') ? L_S_SUN : (stristr(PHP_OS, 'win') ? utf_conv(WIN_DEFAULT, 'utf-8', strftime('%a', '1270944000')) : strftime('%a', '1270944000'));
?>
";
// -->
</SCRIPT>
function layout($Err, $U, $R, $T, $C, $status, $RemMe)
{
    global $DbLink;
    global $ChatPath, $From, $Action, $L, $RES, $Ver;
    global $Charset, $CellAlign, $Align, $DisplayFontMsg, $FontPack, $FontName;
    global $AvailableLanguages;
    global $DefaultChatRooms, $DefaultDispChatRooms;
    global $DefaultPrivateRooms;
    if ($Err) {
        global $Error;
    }
    require "{$ChatPath}search.php";
    $show_search = !C_SEARCH_PAID;
    $show_donation = !C_SUPPORT_PAID;
    if (!isset($Ver) || $Ver == "") {
        $Ver = "H";
    }
    /*	UNDER DEVELOPMENT for scheduling chat hours - already in admin
    	// Include the schedule library
    	include("./${ChatPath}lib/schedule.lib.php");
    
    	echo($open_dly." | ".$open_sun." | ".$sched_sun." | ".$daynow." | ".$datenow." | ".$closed." | ".$timenow);
    */
    if (check_internet_connection()) {
        ?>
	<div id="fb-root"></div>
	<script>(function(d, s, id) {
	  var js, fjs = d.getElementsByTagName(s)[0];
	  if (d.getElementById(id)) return;
	  js = d.createElement(s); js.id = id;
	  js.src = "//connect.facebook.net/<?php 
        echo str_replace("sr_CS", "sr_RS", str_replace("es_AR", "es_ES", L_LANG));
        ?>
/all.js#xfbml=1&appId=49226597181";
	  fjs.parentNode.insertBefore(js, fjs);
	}(document, 'script', 'facebook-jssdk'));</script>
<?php 
    }
    ?>
<TABLE ALIGN="center" CELLPADDING=5 CLASS="ChatBody">
<TR>
<TD CLASS="ChatBody">
<CENTER>
<FORM ACTION="<?php 
    echo "{$Action}";
    ?>
" METHOD="POST" AUTOCOMPLETE="" NAME="Params" onSubmit="defineVerField(); return isCookieEnabled();">
<SPAN CLASS="ChatTitle"><?php 
    if (C_SHOW_LOGO) {
        echo APP_LOGO;
    }
    ?>
<br /><?php 
    echo C_CHAT_NAME != "" ? C_CHAT_NAME . "<br /><SPAN CLASS=ChatP3><SPAN dir=\"LTR\">- " . APP_NAME . " (" . APP_VERSION . APP_MINOR . ") -</SPAN>" : "<SPAN dir=\"LTR\">" . APP_NAME . " (" . APP_VERSION . APP_MINOR . ")";
    ?>
</SPAN></SPAN>
<?php 
    // Msg for translations with no real iso code
    if (isset($FontPack) && $FontPack != "" && file_exists($ChatPath . "localization/{$L}/{$FontPack}")) {
        if (!isset($Error) && $DisplayFontMsg) {
            echo "<P CLASS=\"ChatError\">This translation of " . APP_NAME . " requires <A HREF=\"{$ChatPath}localization/{$L}/{$FontPack}\" CLASS=\"ChatFonts\" title=\"" . str_replace('"', '', $FontName) . "\">these font faces</A></P>";
        }
    }
    if (C_SHOW_TUT) {
        ?>
<P>
<A HREF="<?php 
        echo $ChatPath;
        ?>
tutorial_popup.php?<?php 
        echo "L={$L}&Ver={$Ver}";
        ?>
" onClick="tutorial_popup(); return false" CLASS="ChatLink" TARGET="_blank" onMouseOver="window.status='<?php 
        echo L_TUTORIAL;
        ?>
.'; return true;" title="<?php 
        echo L_TUTORIAL;
        ?>
"><?php 
        echo L_TUTORIAL;
        ?>
</A>
</P>
<?php 
    }
    ?>
<P CLASS="ChatP1">
<?php 
    if (C_MSG_DEL == "1") {
        $hours = L_HOUR;
    } else {
        $hours = L_HOURS;
    }
    if (C_USR_DEL == "1") {
        $mins = L_MIN;
    } else {
        $mins = L_MINS;
    }
    echo sprintf(L_WEL_1, C_MSG_DEL, $hours);
    if (C_CHAT_BOOT) {
        echo ",<br />" . sprintf(L_WEL_2, C_USR_DEL, $mins);
    }
    echo ".";
    ?>
</P>
<?php 
    $DefaultRoomFound = 0;
    // Ghost Control mod by Ciprian
    $Hide = "";
    if (C_HIDE_ADMINS) {
        $Hide .= " AND (u.status != 'a' OR u.username = '******') AND u.status != 't'";
    }
    if (C_HIDE_MODERS) {
        $Hide .= " AND u.status !='m'";
    }
    if (C_SPECIAL_GHOSTS != "") {
        $sghosts = str_replace("username", "u.username", C_SPECIAL_GHOSTS);
        $Hide .= " AND u.username != " . $sghosts . "";
    }
    if ($DbLink->query("SELECT DISTINCT u.username FROM " . C_USR_TBL . " u, " . C_MSG_TBL . " m WHERE u.room = m.room AND m.type = 1" . $Hide . "")) {
        $Nb = $DbLink->num_rows();
        $link = " <A HREF=\"{$ChatPath}users_popup" . $Ver1 . ".php?From={$From}&L={$L}\" CLASS=\"ChatLink\" onClick=\"users_popup(); return false\" TARGET=\"_blank\" onMouseOver=\"window.status='" . sprintf(L_CLICK, L_LINKS_11) . ".'; return true;\" title='" . sprintf(L_CLICK, L_LINKS_11) . "'>";
        echo "<P CLASS=\"ChatP1\">" . L_CUR_1 . " " . ($Nb != 1 ? L_CUR_1a . " " . $link . $Nb . " " . L_USERS . "</A>" : L_CUR_1b . " " . $link . $Nb . " " . L_USER . "</A>") . " " . L_CUR_2 . ".";
        $DbLink->clean_results();
    }
    if (C_CHAT_LURKING && (C_SHOW_LURK_USR || $status == "a" || $status == "t")) {
        //Timeout to delete Lurkers in Seconds after they left the page
        $timeout = 15;
        // Ghost Control mod by Ciprian
        $Hide1 = "";
        $online_users = 0;
        if (C_HIDE_ADMINS) {
            $Hide1 .= $Hide1 == "" ? " WHERE status != 'a' AND status != 't'" : " AND status != 'a' AND status != 't'";
        }
        if (C_HIDE_MODERS) {
            $Hide1 .= $Hide1 == "" ? " WHERE status != 'm'" : " AND status != 'm'";
        }
        if (C_SPECIAL_GHOSTS != "") {
            $Hide1 .= $Hide1 == "" ? " WHERE username != " . C_SPECIAL_GHOSTS . "" : " AND username != " . C_SPECIAL_GHOSTS . "";
        }
        $DbLink->query("DELETE FROM " . C_LRK_TBL . " WHERE time<'" . (time() - $timeout) . "'");
        $DbLink->query("SELECT DISTINCT ip,browser,username FROM " . C_LRK_TBL . $Hide1);
        $online_users = $DbLink->num_rows();
        $lurklink = " <A HREF=\"lurking.php?L={$L}&D=10\" CLASS=\"ChatLink\" TARGET=\"_blank\" onMouseOver=\"window.status='" . L_LURKING_1 . ".'; return true;\" title='" . L_LURKING_1 . "'>";
        echo "<br />" . L_CUR_1 . " " . ($online_users != 1 ? L_CUR_1a . $lurklink . $online_users . " " . L_LURKERS . "</A>." : L_CUR_1b . $lurklink . $online_users . " " . L_LURKER . "</A>.");
    }
    $copy_break = 0;
    if (!strstr($search, "9362782527650497") || !isset($search)) {
        $copy_break = 1;
    }
    if ($show_donation) {
        $pptype = "big";
        require "{$ChatPath}lib/support.lib.php";
        if ((intval($ppbutton) < 3620000 || intval($ppbutton) > 3627000 && intval($ppbutton) != 7148858 && intval($ppbutton) != 7148805 && (intval($ppbutton) < 7988359 || intval($ppbutton) > 7988406)) && $ppbutton != "KYVK6TQWY4MXJ" && $ppbutton != "QN9TYKJ49BM7S" && $ppbutton != "RJK6MGRQVAJY2" && $ppbutton != "ZCXGTP265VU6S" && $ppbutton != "MGBHACRT5F4RE" && $ppbutton != "6HRWUGAN73NPS" && $ppbutton != "WDA8GUU9GGSTS" && $ppbutton != "T9MP68SK7HBKQ" && $ppbutton != "DBH7XN4YA7A2J" && $ppbutton != "BTHKH33JLGLTN" && $ppbutton != "9HQJX5TAPJ33A" && $ppbutton != "YJD5RVSDH55GA" && $ppbutton != "KLSRD9WFZH984" && $ppbutton != "2K6JTW959U66A" && $ppbutton != "6JNU4L83BSTN2" && $ppbutton != "JW4A2MMTLXYSU" && $ppbutton != "RQ3GHM7HSY95Q" && $ppbutton != "8C5WYJSNYG5BY" && $ppbutton != "DLBFN422X69WG" && $ppbutton != "T2BQZSP33V2KA") {
            $copy_break = 1;
        }
    }
    ?>
</P>
<?php 
    if (isset($Error)) {
        echo "<P CLASS=\"ChatError\">{$Error}</P>";
    }
    ?>
<INPUT TYPE="hidden" NAME="Ver" VALUE="<?php 
    echo $Ver;
    ?>
">
<INPUT TYPE="hidden" NAME="Form_Send" VALUE="1">
<INPUT TYPE="hidden" NAME="L" VALUE="<?php 
    echo $L;
    ?>
">
<INPUT TYPE="hidden" NAME="N" VALUE="<?php 
    echo C_MSG_NB;
    ?>
">
<INPUT TYPE="hidden" NAME="D" VALUE="<?php 
    echo C_MSG_REFRESH;
    ?>
">

<TABLE BORDER=0 CELLPADDING=3 CLASS="ChatTable">
<TR CLASS="ChatCell">
	<TD ALIGN="CENTER" CLASS="ChatCell">
		<TABLE BORDER=0 CLASS="ChatTable">
		<?php 
    // Display flags if necessary
    if (C_MULTI_LANG) {
        $disp_flags = "";
        $i = 0;
        while (list($key, $name) = each($AvailableLanguages)) {
            $i++;
            if ($name == "english" && C_ENGLISH_FORMAT == "US") {
                if (C_FLAGS_3D) {
                    $flag = "flag_us.gif";
                } else {
                    $flag = "flag_us0.gif";
                }
                if (L_ORIG_LANG_ENUS != "L_ORIG_LANG_ENUS") {
                    $FLAG_NAME = L_ORIG_LANG_ENUS . ($name != $L && L_LANG_ENUS != "L_LANG_ENUS" ? "/" . L_LANG_ENUS : "");
                }
            } else {
                if (C_FLAGS_3D) {
                    $flag = "flag.gif";
                } else {
                    $flag = "flag0.gif";
                }
                if ($name == "argentinian_spanish" && L_ORIG_LANG_AR != "L_ORIG_LANG_AR") {
                    $FLAG_NAME = L_ORIG_LANG_AR . ($name != $L && L_LANG_AR != "L_LANG_AR" ? "/" . L_LANG_AR : "");
                } elseif ($name == "bulgarian" && L_ORIG_LANG_BG != "L_ORIG_LANG_BG") {
                    $FLAG_NAME = L_ORIG_LANG_BG . ($name != $L && L_LANG_BG != "L_LANG_BG" ? "/" . L_LANG_BG : "");
                } elseif ($name == "brazilian_portuguese" && L_ORIG_LANG_BR != "L_ORIG_LANG_BR") {
                    $FLAG_NAME = L_ORIG_LANG_BR . ($name != $L && L_LANG_BR != "L_LANG_BR" ? "/" . L_LANG_BR : "");
                } elseif ($name == "catalan" && L_ORIG_LANG_CA != "L_ORIG_LANG_CA") {
                    $FLAG_NAME = L_ORIG_LANG_CA . ($name != $L && L_LANG_CA != "L_LANG_CA" ? "/" . L_LANG_CA : "");
                } elseif ($name == "chinese_simplified" && L_ORIG_LANG_CNS != "L_ORIG_LANG_CNS") {
                    $FLAG_NAME = L_ORIG_LANG_CNS . ($name != $L && L_LANG_CNS != "L_LANG_CNS" ? "/" . L_LANG_CNS : "");
                } elseif ($name == "chinese_traditional" && L_ORIG_LANG_CNT != "L_ORIG_LANG_CNT") {
                    $FLAG_NAME = L_ORIG_LANG_CNT . ($name != $L && L_LANG_CNT != "L_LANG_CNT" ? "/" . L_LANG_CNT : "");
                } elseif ($name == "czech" && L_ORIG_LANG_CZ != "L_ORIG_LANG_CZ") {
                    $FLAG_NAME = L_ORIG_LANG_CZ . ($name != $L && L_LANG_CZ != "L_LANG_CZ" ? "/" . L_LANG_CZ : "");
                } elseif ($name == "danish" && L_ORIG_LANG_DA != "L_ORIG_LANG_DA") {
                    $FLAG_NAME = L_ORIG_LANG_DA . ($name != $L && L_LANG_DA != "L_LANG_DA" ? "/" . L_LANG_DA : "");
                } elseif ($name == "dutch" && L_ORIG_LANG_NL != "L_ORIG_LANG_NL") {
                    $FLAG_NAME = L_ORIG_LANG_NL . ($name != $L && L_LANG_NL != "L_LANG_NL" ? "/" . L_LANG_NL : "");
                } elseif ($name == "english" && L_ORIG_LANG_ENUK != "L_ORIG_LANG_ENUK") {
                    $FLAG_NAME = L_ORIG_LANG_ENUK . ($name != $L && L_LANG_ENUK != "L_LANG_ENUK" ? "/" . L_LANG_ENUK : "");
                } elseif ($name == "french" && L_ORIG_LANG_FR != "L_ORIG_LANG_FR") {
                    $FLAG_NAME = L_ORIG_LANG_FR . ($name != $L && L_LANG_FR != "L_LANG_FR" ? "/" . L_LANG_FR : "");
                } elseif ($name == "georgian" && L_ORIG_LANG_KA != "L_ORIG_LANG_KA") {
                    $FLAG_NAME = L_ORIG_LANG_KA . ($name != $L && L_LANG_KA != "L_LANG_KA" ? "/" . L_LANG_KA : "");
                } elseif ($name == "german" && L_ORIG_LANG_DE != "L_ORIG_LANG_DE") {
                    $FLAG_NAME = L_ORIG_LANG_DE . ($name != $L && L_LANG_DE != "L_LANG_DE" ? "/" . L_LANG_DE : "");
                } elseif ($name == "greek" && L_ORIG_LANG_GR != "L_ORIG_LANG_GR") {
                    $FLAG_NAME = L_ORIG_LANG_GR . ($name != $L && L_LANG_GR != "L_LANG_GR" ? "/" . L_LANG_GR : "");
                } elseif ($name == "hebrew" && L_ORIG_LANG_HE != "L_ORIG_LANG_HE") {
                    $FLAG_NAME = L_ORIG_LANG_HE . ($name != $L && L_LANG_HE != "L_LANG_HE" ? "/" . L_LANG_HE : "");
                } elseif ($name == "hindi" && L_ORIG_LANG_HI != "L_ORIG_LANG_HI") {
                    $FLAG_NAME = L_ORIG_LANG_HI . ($name != $L && L_LANG_HI != "L_LANG_HI" ? "/" . L_LANG_HI : "");
                } elseif ($name == "hungarian" && L_ORIG_LANG_HU != "L_ORIG_LANG_HU") {
                    $FLAG_NAME = L_ORIG_LANG_HU . ($name != $L && L_LANG_HU != "L_LANG_HU" ? "/" . L_LANG_HU : "");
                } elseif ($name == "indonesian" && L_ORIG_LANG_ID != "L_ORIG_LANG_ID") {
                    $FLAG_NAME = L_ORIG_LANG_ID . ($name != $L && L_LANG_ID != "L_LANG_ID" ? "/" . L_LANG_ID : "");
                } elseif ($name == "italian" && L_ORIG_LANG_IT != "L_ORIG_LANG_IT") {
                    $FLAG_NAME = L_ORIG_LANG_IT . ($name != $L && L_LANG_IT != "L_LANG_IT" ? "/" . L_LANG_IT : "");
                } elseif ($name == "japanese" && L_ORIG_LANG_JA != "L_ORIG_LANG_JA") {
                    $FLAG_NAME = L_ORIG_LANG_JA . ($name != $L && L_LANG_JA != "L_LANG_JA" ? "/" . L_LANG_JA : "");
                } elseif ($name == "nepali" && L_ORIG_LANG_NE != "L_ORIG_LANG_NE") {
                    $FLAG_NAME = L_ORIG_LANG_NE . ($name != $L && L_LANG_NE != "L_LANG_NE" ? "/" . L_LANG_NE : "");
                } elseif ($name == "norwegian_bokmal" && L_ORIG_LANG_NB != "L_ORIG_LANG_NB") {
                    $FLAG_NAME = L_ORIG_LANG_NB . ($name != $L && L_LANG_NB != "L_LANG_NB" ? "/" . L_LANG_NB : "");
                } elseif ($name == "norwegian_nynorsk" && L_ORIG_LANG_NN != "L_ORIG_LANG_NN") {
                    $FLAG_NAME = L_ORIG_LANG_NN . ($name != $L && L_LANG_NN != "L_LANG_NN" ? "/" . L_LANG_NN : "");
                } elseif ($name == "persian" && L_ORIG_LANG_FA != "L_ORIG_LANG_FA") {
                    $FLAG_NAME = L_ORIG_LANG_FA . ($name != $L && L_LANG_FA != "L_LANG_FA" ? "/" . L_LANG_FA : "");
                } elseif ($name == "polish" && L_ORIG_LANG_PL != "L_ORIG_LANG_PL") {
                    $FLAG_NAME = L_ORIG_LANG_PL . ($name != $L && L_LANG_PL != "L_LANG_PL" ? "/" . L_LANG_PL : "");
                } elseif ($name == "portuguese" && L_ORIG_LANG_PT != "L_ORIG_LANG_PT") {
                    $FLAG_NAME = L_ORIG_LANG_PT . ($name != $L && L_LANG_PT != "L_LANG_PT" ? "/" . L_LANG_PT : "");
                } elseif ($name == "romanian" && L_ORIG_LANG_RO != "L_ORIG_LANG_RO") {
                    $FLAG_NAME = L_ORIG_LANG_RO . ($name != $L && L_LANG_RO != "L_LANG_RO" ? "/" . L_LANG_RO : "");
                } elseif ($name == "russian" && L_ORIG_LANG_RU != "L_ORIG_LANG_RU") {
                    $FLAG_NAME = L_ORIG_LANG_RU . ($name != $L && L_LANG_RU != "L_LANG_RU" ? "/" . L_LANG_RU : "");
                } elseif ($name == "serbian_latin" && L_ORIG_LANG_SRL != "L_ORIG_LANG_SRL") {
                    $FLAG_NAME = L_ORIG_LANG_SRL . ($name != $L && L_LANG_SRL != "L_LANG_SRL" ? "/" . L_LANG_SRL : "");
                } elseif ($name == "serbian_cyrillic" && L_ORIG_LANG_SRC != "L_ORIG_LANG_SRC") {
                    $FLAG_NAME = L_ORIG_LANG_SRC . ($name != $L && L_LANG_SRC != "L_LANG_SRC" ? "/" . L_LANG_SRC : "");
                } elseif ($name == "slovak" && L_ORIG_LANG_SK != "L_ORIG_LANG_SK") {
                    $FLAG_NAME = L_ORIG_LANG_SK . ($name != $L && L_LANG_SK != "L_LANG_SK" ? "/" . L_LANG_SK : "");
                } elseif ($name == "spanish" && L_ORIG_LANG_ES != "L_ORIG_LANG_ES") {
                    $FLAG_NAME = L_ORIG_LANG_ES . ($name != $L && L_LANG_ES != "L_LANG_ES" ? "/" . L_LANG_ES : "");
                } elseif ($name == "swedish" && L_ORIG_LANG_SV != "L_ORIG_LANG_SV") {
                    $FLAG_NAME = L_ORIG_LANG_SV . ($name != $L && L_LANG_SV != "L_LANG_SV" ? "/" . L_LANG_SV : "");
                } elseif ($name == "thai" && L_ORIG_LANG_TH != "L_ORIG_LANG_TH") {
                    $FLAG_NAME = L_ORIG_LANG_TH . ($name != $L && L_LANG_TH != "L_LANG_TH" ? "/" . L_LANG_TH : "");
                } elseif ($name == "turkish" && L_ORIG_LANG_TR != "L_ORIG_LANG_TR") {
                    $FLAG_NAME = L_ORIG_LANG_TR . ($name != $L && L_LANG_TR != "L_LANG_TR" ? "/" . L_LANG_TR : "");
                } elseif ($name == "ukrainian" && L_ORIG_LANG_UK != "L_ORIG_LANG_UK") {
                    $FLAG_NAME = L_ORIG_LANG_UK . ($name != $L && L_LANG_UK != "L_LANG_UK" ? "/" . L_LANG_UK : "");
                } elseif ($name == "urdu" && L_ORIG_LANG_UR != "L_ORIG_LANG_UR") {
                    $FLAG_NAME = L_ORIG_LANG_UR . ($name != $L && L_LANG_UR != "L_LANG_UR" ? "/" . L_LANG_UR : "");
                } elseif ($name == "vietnamese" && L_ORIG_LANG_VI != "L_ORIG_LANG_VI") {
                    $FLAG_NAME = L_ORIG_LANG_VI . ($name != $L && L_LANG_VI != "L_LANG_VI" ? "/" . L_LANG_VI : "");
                } elseif ($name == "yoruba" && L_ORIG_LANG_YO != "L_ORIG_LANG_YO") {
                    $FLAG_NAME = L_ORIG_LANG_YO . ($name != $L && L_LANG_YO != "L_LANG_YO" ? "/" . L_LANG_YO : "");
                } else {
                    $FLAG_NAME = str_replace("_", " ", $name);
                    $FLAG_NAME = mb_convert_case($FLAG_NAME, MB_CASE_TITLE, $Charset);
                }
            }
            if ($name == $L) {
                $FLAG_OVER = $FLAG_NAME . " (" . L_SELECTED . ")";
                $FLAG_STATUS = $FLAG_OVER;
            } else {
                $FLAG_OVER = $FLAG_NAME;
                $FLAG_STATUS = sprintf(L_SWITCH, $FLAG_NAME);
            }
            if ($name != $L) {
                $disp_flags .= "<A HREF=\"{$Action}?L={$name}\" onMouseOver=\"window.status='" . $FLAG_STATUS . ".'; return true;\" Title=\"" . $FLAG_OVER . "\">";
            }
            $disp_flags .= "<IMG SRC=\"{$ChatPath}localization/{$name}/images/" . $flag . "\" onMouseOver=\"window.status='" . $FLAG_STATUS . ".'; return true;\" BORDER=0 ALT=\"" . $FLAG_OVER . "\" Title=\"" . $FLAG_OVER . "\">";
            if ($name != $L) {
                $disp_flags .= "</A>";
            }
            if ($i % 11 == 0) {
                $disp_flags .= "<br />";
            } else {
                $disp_flags .= "&nbsp;";
            }
        }
        unset($AvailableLanguages);
        ?>
		<TR CLASS="ChatCell">
			<TD COLSPAN=2 ALIGN="CENTER" CLASS="ChatCell">
				<SPAN CLASS="ChatFlags">
				<?php 
        echo rtrim($disp_flags, '&nbsp;');
        ?>
				</SPAN>
			</TD>
		</TR>
		<?php 
    }
    // Horizontal alignement for cells topic
    $CellAlign = $Align == "right" ? "RIGHT" : "LEFT";
    ?>
		<TR CLASS="ChatCell">
			<TH COLSPAN=2 CLASS="ChatTabTitle"><?php 
    echo L_SET_1;
    ?>
</TH>
		</TR>
		<TR CLASS="ChatCell">
			<TD ALIGN="<?php 
    echo $CellAlign;
    ?>
" VALIGN="TOP" CLASS="ChatCell" NOWRAP="NOWRAP"><?php 
    echo L_SET_2;
    ?>
 :</TD>
			<TD VALIGN="TOP" CLASS="ChatCell">
				<INPUT TYPE="text" NAME="U" SIZE=11 MAXLENGTH=15 VALUE="<?php 
    echo htmlspecialchars(stripslashes($U));
    ?>
" CLASS="ChatBox">
			</TD>
		</TR>
		<TR CLASS="ChatCell">
			<TD ALIGN="<?php 
    echo $CellAlign;
    ?>
" VALIGN="TOP" CLASS="ChatCell" NOWRAP="NOWRAP"><?php 
    echo L_REG_1;
    ?>
 :</TD>
			<TD VALIGN="TOP" CLASS="ChatCell" NOWRAP="NOWRAP">
				<INPUT TYPE="password" NAME="pmc_password" SIZE=11 MAXLENGTH=16 VALUE="<?php 
    echo $RemMe ? $RemMe : "";
    ?>
" CLASS="ChatBox">
				<INPUT TYPE="checkbox" NAME="remember" alt="<?php 
    echo L_SET_19;
    ?>
" title="<?php 
    echo L_SET_19;
    ?>
"<?php 
    echo $RemMe ? " checked" : "";
    ?>
>
				<?php 
    if (!C_REQUIRE_REGISTER) {
        echo "&nbsp;(<U>" . L_REG_7 . "</U>)";
    }
    ?>
				<br /><A HREF="<?php 
    echo $ChatPath;
    ?>
pass_reset.php?L=<?php 
    echo $L;
    ?>
" CLASS="ChatReg" onClick="reg_popup('pass_reset','<?php 
    echo urlencode(stripslashes($U));
    ?>
'); return false" TARGET="_blank" onMouseOver="window.status='<?php 
    echo L_PASS_7;
    ?>
.'; return true;" title="<?php 
    echo L_PASS_7;
    ?>
"><?php 
    echo L_PASS_7;
    ?>
</A>
			</TD>
		</TR>
		<TR CLASS="ChatCell">
			<TH COLSPAN=2 CLASS="ChatTabTitle"><?php 
    echo L_REG_2;
    ?>
</TH>
		</TR>
		<TR CLASS="ChatCell">
			<TD ALIGN="center" COLSPAN=2 CLASS="ChatCell">
				<?php 
    if (C_REQUIRE_REGISTER && C_ALLOW_REGISTER) {
        ?>
				<SPAN CLASS="ChatError">
					<?php 
        echo L_REG_49;
        ?>
				</SPAN>
				<br />
				<?php 
    }
    if (C_ALLOW_REGISTER) {
        ?>
				<br />
					<A HREF="<?php 
        echo $ChatPath;
        ?>
register.php?L=<?php 
        echo $L;
        ?>
" CLASS="ChatReg" onClick="reg_popup('register','<?php 
        echo urlencode(stripslashes($U));
        ?>
'); return false" TARGET="_blank" onMouseOver="window.status='<?php 
        echo L_REG_3;
        ?>
.'; return true;" title="<?php 
        echo L_REG_3;
        ?>
"><?php 
        echo L_REG_3;
        ?>
</A>
					|
				<?php 
    } else {
        ?>
				<SPAN CLASS="ChatError">
					<?php 
        echo L_REG_50;
        ?>
				</SPAN>
				<br />
				<br />
				<?php 
    }
    ?>
				<A HREF="<?php 
    echo $ChatPath;
    ?>
edituser.php?L=<?php 
    echo $L;
    ?>
" CLASS="ChatReg" onClick="reg_popup('edituser','<?php 
    echo urlencode(stripslashes($U));
    ?>
'); return false" TARGET="_blank" onMouseOver="window.status='<?php 
    echo L_REG_4;
    ?>
.'; return true;" title="<?php 
    echo L_REG_4;
    ?>
"><?php 
    echo L_REG_4;
    ?>
</A>
				<?php 
    if (C_SHOW_DEL_PROF != 0) {
        ?>
					| <A HREF="<?php 
        echo $ChatPath;
        ?>
deluser.php?L=<?php 
        echo $L;
        ?>
" CLASS="ChatReg" onClick="reg_popup('deluser','<?php 
        echo urlencode(stripslashes($U));
        ?>
'); return false" TARGET="_blank" onMouseOver="window.status='<?php 
        echo L_REG_5;
        ?>
.'; return true;" title="<?php 
        echo L_REG_5;
        ?>
"><?php 
        echo L_REG_5;
        ?>
</A>
					<?php 
    }
    if (C_SHOW_ADMIN != 0) {
        ?>
					| <A HREF="<?php 
        echo $ChatPath;
        ?>
admin.php?L=<?php 
        echo $L;
        ?>
&Link=1" CLASS="ChatReg" onClick="reg_popup('admin','<?php 
        echo urlencode(stripslashes($U));
        ?>
'); return false" TARGET="_blank" onMouseOver="window.status='<?php 
        echo L_REG_35;
        ?>
.'; return true;" title="<?php 
        echo L_REG_35;
        ?>
"><?php 
        echo L_REG_35;
        ?>
</A>
					<?php 
    }
    ?>
			</TD>
		</TR>
		<?php 
    if (C_VERSION > 0) {
        ?>
			<TR CLASS="ChatCell">
				<TD COLSPAN=2 CLASS="ChatCell">&nbsp;</TD>
			</TR>
			<TR CLASS="ChatCell">
				<TH COLSPAN=2 CLASS="ChatTabTitle"><?php 
        echo L_SET_5;
        ?>
</TH>
			</TR>
			</TABLE>
			<TABLE BORDER=0 CLASS="ChatTable">
			<TR CLASS="ChatCell">
				<TD ALIGN="<?php 
        echo $CellAlign;
        ?>
" VALIGN="TOP" CLASS="ChatCell" NOWRAP="NOWRAP"><?php 
        echo L_SET_6;
        ?>
 :</TD>
				<TD VALIGN="TOP" CLASS="ChatCell">
					<SELECT NAME="R0" CLASS="ChatBox" onChange="reset_R0();">
						<OPTION VALUE=""><?php 
        echo L_SET_7;
        ?>
</OPTION>
						<?php 
        // Display default public rooms in the drop down list
        $PrevRoom = "";
        if ($R != "" && !(isset($RES) && $RES)) {
            $PrevRoom = urldecode($R);
        }
        $DefaultRoomsString = "";
        $disp_note = 0;
        for ($i = 0; $i < count($DefaultChatRooms); $i++) {
            $tmpRoom = stripslashes($DefaultChatRooms[$i]);
            $tmpDispRoom = $tmpRoom;
            if (is_array($DefaultDispChatRooms) && in_array($tmpRoom . " [R]", $DefaultDispChatRooms)) {
                $res_init = utf8_substr(L_RESTRICTED, 0, 1);
                $tmpDispRoom .= " [" . $res_init . "]";
                $disp_note = 1;
            }
            $DefaultRoomsString .= ($DefaultRoomsString == "" ? "" : ",") . $tmpRoom;
            echo "<OPTION VALUE=\"" . htmlspecialchars($tmpRoom) . "\"";
            if (strcasecmp(mb_convert_case($tmpRoom, MB_CASE_LOWER, $Charset), mb_convert_case($PrevRoom, MB_CASE_LOWER, $Charset)) == 0) {
                echo " SELECTED";
                $DefaultRoomFound = 1;
            }
            echo ">" . $tmpDispRoom . "</OPTION>";
        }
        ?>
					</SELECT>
				</TD>
			</TR>
			<?php 
    }
    if (C_VERSION == 2) {
        $created_rooms = "";
        // Display other public rooms in the drop down list
        $DbLink->query("SELECT DISTINCT room FROM " . C_MSG_TBL . " WHERE type = 1 AND room != 'Offline PMs' AND room != '*' AND username NOT LIKE 'SYS %' ORDER BY room");
        while (list($Room) = $DbLink->next_record()) {
            if (!room_in($Room, $DefaultRoomsString, $Charset)) {
                $created_rooms .= "<OPTION VALUE=\"" . htmlspecialchars($Room) . "\"";
                if (strcasecmp(mb_convert_case($Room, MB_CASE_LOWER, $Charset), mb_convert_case($PrevRoom, MB_CASE_LOWER, $Charset)) == 0 && !$DefaultRoomFound) {
                    $created_rooms .= " SELECTED";
                    $DefaultRoomFound = 1;
                }
                $created_rooms .= ">{$Room}</OPTION>";
            }
        }
        $DbLink->clean_results();
        if ($created_rooms != "") {
            ?>
			<TR CLASS="ChatCell">
				<TD ALIGN="<?php 
            echo $CellAlign;
            ?>
" VALIGN="TOP" CLASS="ChatCell" NOWRAP="NOWRAP"><?php 
            echo L_SET_8;
            ?>
 :</TD>
				<TD VALIGN="TOP" CLASS="ChatCell">
					<SELECT NAME="R1" CLASS="ChatBox" onChange="reset_R1();">
						<OPTION VALUE=""><?php 
            echo L_SET_7;
            ?>
</OPTION>
						<?php 
            echo $created_rooms;
            ?>
					</SELECT>
				</TD>
			</TR>
			<?php 
        }
    }
    if (C_VERSION > 0 && C_SHOW_PRIV) {
        $DefaultPrivateRoomFound = 0;
        $PrevPrivateRoom = "";
        if ($R != "" && !(isset($RES) && $RES)) {
            $PrevPrivateRoom = urldecode($R);
        }
        $DbLink->query("SELECT perms,rooms FROM " . C_REG_TBL . " WHERE username='******' LIMIT 1");
        if ($DbLink->num_rows() != 0) {
            $reguser = $DbLink->num_rows() != 0;
        } else {
            $nonreguser = 1;
        }
        if ($reguser) {
            list($perms, $rooms) = $DbLink->next_record();
        }
        $DbLink->clean_results();
        if ($DefaultPrivateRooms != NULL) {
            if ($perms == "admin" || $perms == "topmod") {
                ?>
				<TR CLASS="ChatCell">
					<TD ALIGN="<?php 
                echo $CellAlign;
                ?>
" VALIGN="TOP" CLASS="ChatCell" NOWRAP="NOWRAP"><?php 
                echo L_SET_15;
                ?>
 :</TD>
					<TD VALIGN="TOP" CLASS="ChatCell">
						<SELECT NAME="R2" CLASS="ChatBox" onChange="reset_R2();">
							<OPTION VALUE=""><?php 
                echo L_SET_7;
                ?>
</OPTION>
							<?php 
                // Display default private rooms in the drop down list
                $DefaultPrivateRoomsString = "";
                for ($i = 0; $i < count($DefaultPrivateRooms); $i++) {
                    $tmpPrivateRoom = stripslashes($DefaultPrivateRooms[$i]);
                    $DefaultPrivateRoomsString .= ($DefaultPrivateRoomsString == "" ? "" : ",") . $tmpPrivateRoom;
                    echo "<OPTION VALUE=\"" . htmlspecialchars($tmpPrivateRoom) . "\"";
                    if (strcasecmp(mb_convert_case($tmpPrivateRoom, MB_CASE_LOWER, $Charset), mb_convert_case($PrevPrivateRoom, MB_CASE_LOWER, $Charset)) == 0) {
                        echo " SELECTED";
                        $DefaultPrivateRoomFound = 1;
                    }
                    echo ">" . $tmpPrivateRoom . "</OPTION>";
                }
                ?>
						</SELECT>
					</TD>
				</TR>
				<?php 
            } elseif ($perms == "moderator" && C_SHOW_PRIV_MOD) {
                ?>
				<TR CLASS="ChatCell">
					<TD ALIGN="<?php 
                echo $CellAlign;
                ?>
" VALIGN="TOP" CLASS="ChatCell" NOWRAP="NOWRAP"><?php 
                echo L_SET_15;
                ?>
 :</TD>
					<TD VALIGN="TOP" CLASS="ChatCell">
						<SELECT NAME="R2" CLASS="ChatBox" onChange="reset_R2();">
							<OPTION VALUE=""><?php 
                echo L_SET_7;
                ?>
</OPTION>
								<?php 
                echo "<OPTION VALUE=\"" . htmlspecialchars(ROOM8) . "\"";
                if (strcasecmp(mb_convert_case(ROOM8, MB_CASE_LOWER, $Charset), mb_convert_case($PrevPrivateRoom, MB_CASE_LOWER, $Charset)) == 0) {
                    echo " SELECTED";
                    $DefaultPrivateRoomFound = 1;
                }
                echo ">" . ROOM8 . "</OPTION>";
                echo "<OPTION VALUE=\"" . htmlspecialchars(ROOM9) . "\"";
                if (strcasecmp(mb_convert_case(ROOM8, MB_CASE_LOWER, $Charset), mb_convert_case($PrevPrivateRoom, MB_CASE_LOWER, $Charset)) == 0) {
                    echo " SELECTED";
                    $DefaultPrivateRoomFound = 1;
                }
                echo ">" . ROOM9 . "</OPTION>";
                ?>
						</SELECT>
					</TD>
				</TR>
				<?php 
            } elseif (C_SHOW_PRIV_USR) {
                ?>
				<TR CLASS="ChatCell">
					<TD ALIGN="<?php 
                echo $CellAlign;
                ?>
" VALIGN="TOP" CLASS="ChatCell" NOWRAP="NOWRAP"><?php 
                echo L_SET_15;
                ?>
 :</TD>
					<TD VALIGN="TOP" CLASS="ChatCell">
						<SELECT NAME="R2" CLASS="ChatBox" onChange="reset_R2();">
							<OPTION VALUE=""><?php 
                echo L_SET_7;
                ?>
</OPTION>
							<?php 
                echo "<OPTION VALUE=\"" . htmlspecialchars(ROOM9) . "\"";
                if (strcasecmp(ROOM9, $PrevPrivateRoom) == 0) {
                    echo " SELECTED";
                    $DefaultPrivateRoomFound = 1;
                }
                echo ">" . ROOM9 . "</OPTION>";
                ?>
						</SELECT>
					</TD>
				</TR>
				<?php 
            }
        }
    }
    if ($disp_note) {
        echo "<tr class=\"ChatError\"><td align=right colspan=2><font size=-2>[" . $res_init . "] = " . L_RESTRICTED . ".</font></td></tr>";
    }
    if (C_VERSION == 2) {
        if (!$T && !$DefaultRoomFound || !$T && !$DefaultPrivateRoomFound) {
            $T = 1;
        }
        ?>
			<TR CLASS="ChatCell">
				<TD ALIGN="<?php 
        echo $CellAlign;
        ?>
" VALIGN="TOP" CLASS="ChatCell" NOWRAP="NOWRAP" COLSPAN=2>
					<?php 
        echo L_SET_9 . " ";
        ?>
					<SELECT NAME="T" CLASS="ChatBox">
						<OPTION VALUE="1" <?php 
        if ($T && !$DefaultPrivateRoomFound) {
            echo "SELECTED";
        }
        ?>
 <?php 
        if (!$T && $DefaultPrivateRoomFound) {
            echo "DISABLED";
        }
        ?>
><?php 
        echo L_SET_10;
        ?>
</OPTION>
						<OPTION VALUE="0" <?php 
        if (!$T && !$DefaultRoomFound || $T && $DefaultPrivateRoomFound) {
            echo "SELECTED";
        }
        ?>
><?php 
        echo L_SET_11;
        ?>
</OPTION>
					</SELECT>
					<?php 
        echo L_SET_12 . ":";
        ?>
					<INPUT TYPE="text" NAME="R3" SIZE=11 MAXLENGTH=14 <?php 
        if (!$DefaultRoomFound && !$DefaultPrivateRoomFound && $R != "" && !$RES) {
            echo "VALUE=\"" . htmlspecialchars(urldecode($R)) . "\"";
        }
        ?>
 CLASS="ChatBox" onChange="reset_R3();">
				</TD>
			</TR>
			<?php 
    }
    if (C_VERSION == 1) {
        ?>
		<INPUT TYPE="hidden" NAME="T" VALUE="0" <?php 
        if (!$T && !$DefaultRoomFound || $T && $DefaultPrivateRoomFound) {
            echo "SELECTED";
        }
        ?>
>
			<?php 
    }
    ?>
		</TABLE>
	<TR CLASS="ChatP2">
		<TD align="center">
<?php 
    if (C_REQUIRE_REGISTER) {
        ?>
		<div CLASS="ChatError"><?php 
        echo L_ERR_USR_14;
        ?>
</div>
<?php 
    }
    ?>
		<?php 
    echo L_SET_13 . " ";
    ?>
		 ... <INPUT TYPE="submit" NAME="submit" VALUE="<?php 
    echo L_SET_14;
    ?>
" CLASS="ChatBox">
		<br /><br /><FONT SIZE=-1><?php 
    echo L_SET_18;
    ?>
</FONT><br />
		</TD></TR>
	</TD>
</TR>
</TABLE>
</FORM>
<?php 
    if (C_SHOW_INFO) {
        ?>
<FONT COLOR=yellow SIZE=-1>
<?php 
        // Info on welcome page about cmds, mods and bot. Edit lib/info.lib.php to add more infos about your chat features
        if (SET_CMDS) {
            echo "<span style=\"color:orange\">" . INFO_CMDS . "</span><br />" . CMDS . ".<br />";
        }
        if (SET_MODS) {
            echo "<span style=\"color:orange\">" . INFO_MODS . "</span><br />" . MODS . ".<br />";
        }
        if (SET_BOT && C_BOT_CONTROL) {
            $DbLink->query("SELECT Count(*) FROM " . C_USR_TBL . " WHERE username='******' LIMIT 1");
            list($botinroom) = $DbLink->next_record();
            $DbLink->clean_results();
            if ($botinroom != 0) {
                echo "<span style=\"color:orange\">" . INFO_BOT . "</span> <u>" . C_BOT_NAME . "</u>.<br />";
            }
        }
        ?>
</FONT>
<?php 
    }
    echo "<P>";
    if (C_SHOW_COUNTER) {
        include_once "./{$ChatPath}acounter.php";
        $ani_counter = new acounter();
        echo $ani_counter->create_output("chat_index");
        $INSTALL_DATE = strftime(L_SHORT_DATE, strtotime(C_INSTALL_DATE));
        if (stristr(PHP_OS, 'win')) {
            $INSTALL_DATE = utf_conv(WIN_DEFAULT, $Charset, $INSTALL_DATE);
            if (strstr($L, "chinese") || strstr($L, "korean") || strstr($L, "japanese")) {
                $INSTALL_DATE = str_replace(" ", "", $INSTALL_DATE);
            }
        }
        ?>
<font face=Verdana color=yellow size=1><?php 
        echo sprintf(L_VISITOR_REPORT, $INSTALL_DATE);
        ?>
.</font>
<?php 
        echo "</P>";
    }
    ?>
<SPAN CLASS="ChatCopy" dir="LTR">
<?php 
    $sflogo = "http://sflogo.sourceforge.net/sflogo.php?group_id=19371&type=10";
    ?>
&copy; 2000-2005 <a HREF="http://sourceforge.net/projects/phpmychat/" TARGET=_blank CLASS="ChatLink" Title="<?php 
    echo sprintf(L_CLICK, sprintf(L_LINKS_7, "phpMyChat-Plus"));
    ?>
" onMouseOver="window.status='<?php 
    echo sprintf(L_CLICK, sprintf(L_LINKS_7, "phpMyChat-Plus"));
    ?>
.'; return true">The phpHeaven Team</a><br />
&copy; 2005-<?php 
    echo date('Y');
    ?>
 Plus development by <a href="mailto:ciprianmp@yahoo.com?subject=phpMychat%20Plus%20feedback" Title="<?php 
    echo sprintf(L_CLICK, L_LINKS_9);
    ?>
" CLASS="ChatLink" onMouseOver="window.status='<?php 
    echo sprintf(L_CLICKS, L_LINKS_6, L_DEVELOPER);
    ?>
.'; return true;">Ciprian M</a>.<br />
Thanks to all the contributors in the <a href="http://groups.yahoo.com/subscribe/phpmychat" CLASS="ChatLink" title="<?php 
    echo sprintf(L_CLICK, sprintf(L_LINKS_8, "phpMyChat-Plus"));
    ?>
" onMouseOver="window.status='<?php 
    echo sprintf(L_CLICK, sprintf(L_LINKS_8, "phpMyChat-Plus"));
    ?>
.'; return true;" target=_blank>phpMyChat group</a> !<br />
Download this full chat pack from <a href="http://sourceforge.net/projects/phpmychat/files/phpMyChat_Plus/" target=_blank title="<?php 
    echo APP_NAME . " " . L_SRC . " Sourceforge.net!\n" . sprintf(L_CLICK, sprintf(L_LINKS_10, "phpMyChat-Plus"));
    ?>
" onMouseOver="window.status='<?php 
    echo APP_NAME . " " . L_SRC . " Sourceforge.net!";
    ?>
'; return true;" CLASS="ChatLink"><img src="<?php 
    echo check_internet_connection() || is_file($sflogo) || file_exists($sflogo) ? $sflogo : "./{$ChatPath}images/sflogo.gif";
    ?>
" border=0 width="80" height="15" /></a>
</SPAN>
<?php 
    if (C_SHOW_OWNER) {
        ?>
<br /><SPAN CLASS="ChatCopy" dir="LTR">
Owner of this chat server -<b>
<?php 
        include_once "admin/mail4admin.lib.php";
        #if (!eregi("Your name",C_ADMIN_NAME) && C_ADMIN_NAME != "") $Owner_name = C_ADMIN_NAME;
        if (stripos(C_ADMIN_NAME, "Your name") === false && C_ADMIN_NAME != "") {
            $Owner_name = C_ADMIN_NAME;
        } else {
            $Owner_name = L_LURKING_5;
        }
        if (strstr($Sender_email, "@") && $Sender_email != "" && $Sender_email != "*****@*****.**") {
            $Owner_email = $Sender_email;
            ?>
	<a href="mailto:<?php 
            echo $Owner_email;
            ?>
?subject=Contact%20from%20[<?php 
            echo C_CHAT_NAME != "" ? C_CHAT_NAME : APP_NAME;
            ?>
]%20Login%20Page" CLASS="ChatLink" Title="<?php 
            echo sprintf(L_CLICKS, L_LINKS_6, L_OWNER);
            ?>
" onMouseOver="window.status='<?php 
            echo sprintf(L_CLICKS, L_LINKS_6, L_OWNER);
            ?>
.'; return true"><?php 
            echo $Owner_name;
            ?>
</A>
<?php 
        } else {
            echo $Owner_name;
        }
        ?>
</b></SPAN>
<?php 
    }
    if (C_SHOW_FLAGS) {
        ?>
	<SPAN CLASS="ChatCopy" dir="LTR">
	<br />phpMyChat-Plus includes GeoLite&trade; data created by MaxMind,<br />available from <a href="http://dev.maxmind.com/geoip/legacy/geolite/" target="_blank" title="<?php 
        echo "phpMyChat-Plus includes GeoLite&trade; data created by MaxMind!\n" . sprintf(L_CLICK, sprintf(L_LINKS_10, "GeoLite Country (Binary / gzip)"));
        ?>
" onMouseOver="window.status='<?php 
        echo "phpMyChat-Plus includes GeoLite&trade; data created by MaxMind!";
        ?>
'; return true;" CLASS="ChatLink">http://www.maxmind.com</a>
	</SPAN>
<?php 
    }
    ?>
<br /><SPAN CLASS="ChatCopy" dir="LTR"><a href="privacy.html" onClick="privacy_popup(); return false" target="_blank" CLASS="ChatLink" title="<?php 
    echo sprintf(L_CLICK, L_PRIVACY);
    ?>
" onMouseOver="window.status='<?php 
    echo sprintf(L_CLICK, L_PRIVACY);
    ?>
'; return true">Our Privacy Policy</a>
</SPAN><br />
	<?php 
    if (check_internet_connection()) {
        ?>
		<div class="fb-like" data-href="https://www.facebook.com/pages/phpMyChat-Plus/112950852062055" data-send="true" data-layout="button_count" data-show-faces="false" data-font="tahoma"></div>
	<?php 
    }
    if ($show_donation) {
        ?>
		<form action="https://www.paypal.com/cgi-bin/webscr" method="post" name="support" target="_blank" onSubmit="return confirm('<?php 
        echo L_SUPP_WARN;
        ?>
');">
		<input type="hidden" name="cmd" value="_s-xclick">
		<input type="hidden" name="hosted_button_id" value="<?php 
        echo $ppbutton;
        ?>
">
		<input type="image" style="background-color: transparent;" src="<?php 
        echo $donate;
        ?>
" border="0" name="donate" alt="<?php 
        echo $ppalt . "&#10;" . L_SUPP_ALT;
        ?>
" title="<?php 
        echo $ppalt . "&#10;" . L_SUPP_ALT;
        ?>
" onMouseOver="window.status='<?php 
        echo $ppalt;
        ?>
'; return true;">
		</form>
	<?php 
    }
    ?>
</TD>
</TR>
</TABLE>
<?php 
    if ($show_search && check_internet_connection()) {
        echo $search;
    }
    if ($copy_break) {
        ?>
		<SCRIPT TYPE="text/javascript" LANGUAGE="javascript">
		<!--
			alert('This phpMyChat-Plus server (<?php 
        echo $_SERVER['SERVER_ADDR'];
        ?>
) has been hacked by the owner (<?php 
        echo C_ADMIN_NAME . " - " . C_ADMIN_EMAIL;
        ?>
).\n\nAll the Chat functions and features have been disabled due to Copyright Infringement!\n\nThis work is licensed under the\n"Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported License".\n\nPlease contact the developer at "ciprianmp at yahoo dot com" in order to make it legal!');
			window.location.replace("http://creativecommons.org/licenses/by-nc-nd/3.0/");
		// -->
		</SCRIPT>
	<?php 
    }
}
                $ava_width = 28;
            }
            if ($gender != 0) {
                $gender = $gender == 1 ? L_REG_46 : ($gender == 2 ? L_REG_47 : ($gender == 3 ? L_REG_44 : L_REG_43));
            } else {
                $gender = L_REG_48;
            }
            if ($dob_birthday && $dob_birthday != "" && $dob_birthday != "0000-00-00") {
                $dobtime = strtotime($dob_birthday);
            }
            if (!$dob_showage || !$dob_showemail) {
                $note = 1;
            }
            $dob_time = strftime(L_SHORT_DATE, $dobtime);
            if (stristr(PHP_OS, 'win')) {
                $dobtime = utf_conv(WIN_DEFAULT, $Charset, $dobtime);
                if (strstr($L, "chinese") || strstr($L, "korean") || strstr($L, "japanese")) {
                    $dob_time = str_replace(" ", "", $dob_time);
                }
            }
            $User = stripslashes($User);
            $dob_name = $dob_firstname != "" ? $dob_firstname : $User;
            $dob_username = pos_array($User, $users);
            if ($User != $pmc_username) {
                $User = "******"browse_user({$dob_username});\" target=\"_self\" title=\"" . A_SEARCH_25 . "\">{$User}</a>";
            }
            ?>
				<?php 
            echo "\n\t<TR" . ($i & 1 ? " bgcolor=\"#C0C0C0\"" : "") . ">\n\t";
            echo "<TD style=\"vertical-align:middle; text-align:center;\">" . $i . "</TD>";
            echo "<TD style=\"vertical-align:middle; text-align:center;\">" . (C_USE_AVATARS ? "<img src=\"" . $avatar . "\" width=\"25\" height=\"25\" border=\"0\" alt=\"" . L_AVATAR . "\" title=\"" . L_AVATAR . "\">" : "") . "</TD>";
 function writeDateContainer()
 {
     if ($this->day && $this->month && $this->year) {
         if ($this->hl) {
             if (stristr(PHP_OS, "win")) {
                 $dd = utf_conv(WIN_DEFAULT, 'utf-8', strftime(L_CAL_FORMAT, mktime(0, 0, 0, $this->month, $this->day, $this->year)));
             } else {
                 $dd = strftime(L_CAL_FORMAT, mktime(0, 0, 0, $this->month, $this->day, $this->year));
             }
         } else {
             $dd = $this->mydate->getDate($this->date_format, $this->year . "-" . $this->month . "-" . $this->day);
         }
     } else {
         $dd = L_SEL_DATE;
     }
     //Digitizer
     echo "<span id=\"divCalendar_" . $this->objname . "_lbl\" class=\"date-tccontainer\"" . ($this->rtl ? " dir=\"rtl\"" : "") . ">" . ($this->dig ? $this->digitize_arabics($dd) : $dd) . "</span>";
 }
Example #7
0
         $gender = 'none';
     }
     if ($s_gender != 0) {
         $alt_gender = $s_gender == 1 ? L_REG_46 : ($s_gender == 2 ? L_REG_47 : ($s_gender == 3 ? L_REG_44 : L_REG_43));
     } else {
         $alt_gender = L_REG_48;
     }
     $s_gender = "<img src=images/gender_" . $gender . ".gif alt='" . $alt_gender . "' title='" . $alt_gender . "'>";
     if (empty($s_birthday) || $s_birthday == "0000-00-00") {
         $s_birthday = "&nbsp;";
     } else {
         if ($s_birthday && $s_birthday != "&nbsp;" && $s_birthday != "0000-00-00") {
             $s_birthday = strftime(L_SHORT_DATE, strtotime($s_birthday));
         }
         if (stristr(PHP_OS, 'win')) {
             $s_birthday = utf_conv(WIN_DEFAULT, $Charset, $s_birthday);
             if (strstr($L, "chinese") || strstr($L, "korean") || strstr($L, "japanese")) {
                 $s_birthday = str_replace(" ", "", $s_birthday);
             }
         }
     }
     $checkbox = $s_username == $pmc_username ? "&nbsp;" : "<INPUT type=checkbox name=\"selected_{$usrHash}\" value=\"1\">";
     echo "<tr align=\"center\">\n\r\n\t\t<INPUT TYPE=\"hidden\" NAME=\"user_{$usrHash}\" VALUE=\"1\">\n\r\n\t\t<TD VALIGN=CENTER ALIGN=CENTER>\n{$checkbox}\n</td>\n\r\n\t\t<td width=100>{$s_username}{$bannished_user}</td>\n\r\n\t\t<td>" . (!(strstr($L, "chinese") || strstr($L, "korean") || strstr($L, "japanese")) ? "{$s_firstname}</td>\n<td>{$s_lastname}" : "{$s_lastname}</td>\n<td>{$s_firstname}") . "</td>\n\r\n\t\t<td>{$s_country}</td>\n\r\n\t\t<td nowrap=\"nowrap\"><a href=\"mailto:{$s_email}\" target=_blank>{$s_email}</a>" . ($s_showemail ? "" : "<font color=\"red\"> *</font>") . "</td>\n\r\n\t\t<td>{$s_perms}</td>\n\r\n\t\t<td align=left nowrap=\"nowrap\">{$s_ip}" . (isset($s_flag) ? $s_flag : "") . "{$bannished_ip}</td>\n\r\n\t\t<td align=center>{$s_gender}</td>\n\r\n\t\t<td align=left nowrap=\"nowrap\">" . $s_birthday . (!$s_show_age || !$s_show_bday ? $s_birthday == "&nbsp;" ? "" : "<font color=\"red\"> *</font>" : "") . "</td>\n\r\n\t\t</tr>";
     if ((!$s_show_age || $s_show_bday) && $s_birthday != "&nbsp;") {
         $note = 1;
     }
     unset($s_username, $s_firstname, $s_lastname, $s_country, $s_email, $s_perms, $s_ip, $s_gender, $s_birthday, $s_show_bday, $s_show_age, $s_ip, $s_country_code, $s_country_name, $s_flag, $gender, $alt_gender);
     $bannished_user = "";
     $bannished_ip = "";
     $DbLinkNew->clean_results();
 }
Example #8
0
    ?>
 <?php 
    echo A_CONFTITLE_0;
    ?>
</p>
<?php 
    if (C_LAST_SAVED_ON) {
        settype($last_saved_on = mysql_to_ts(C_LAST_SAVED_ON), "integer");
        if (C_TMZ_OFFSET) {
            settype($tmz_offset = C_TMZ_OFFSET, "integer");
        }
        $Last_Saved_On = $last_saved_on + $tmz_offset * 60 * 60;
        $longdtformat = $L == "english" ? str_replace("%d of", (stristr(PHP_OS, 'win') ? "%#d" : "%e") . "<sup>" . date('S', $Last_Saved_On) . "</sup> of", L_LONG_DATETIME) : L_LONG_DATETIME;
        $Last_Saved_On = strftime($longdtformat, $Last_Saved_On);
        if (stristr(PHP_OS, 'win')) {
            $Last_Saved_On = utf_conv(WIN_DEFAULT, $Charset, $Last_Saved_On);
            if (strstr($L, "chinese") || strstr($L, "korean") || strstr($L, "japanese")) {
                $Last_Saved_On = str_replace(" ", "", $Last_Saved_On);
            }
        }
    }
    if (C_LAST_SAVED_ON || C_LAST_SAVED_BY) {
        ?>
	<div><p><table align=center border=0 cellpadding=0 class=menu style=background:white><tr><td class=success align=right><?php 
        echo sprintf(A_CONF_ERR_5, C_LAST_SAVED_ON ? " <span class=error>" . $Last_Saved_On . "</span>" : "", C_LAST_SAVED_BY ? "<span class=error>" . C_LAST_SAVED_BY . "</span>" : "");
        ?>
</td></tr></table></div>
	<?php 
    }
    ?>
<form action="<?php 
 function create_output($page = '')
 {
     if (empty($page)) {
         $page = "counter";
     }
     $Charset = "utf-8";
     $visits = $this->read_counter_file($page) + 1;
     /*		$this->counter = sprintf("%0"."".$this->config['pad'].""."d",$this->counter);
     		$ani_digits = sprintf("%0"."".$this->config['pad'].""."d",$this->counter+1);
     */
     $ani_digits = $this->counter + 1;
     $html_output = "<BDO dir=ltr><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr align=\"center\">\n";
     $INSTALL_DATE = strftime(L_SHORT_DATE, strtotime(C_INSTALL_DATE));
     if (stristr(PHP_OS, 'win')) {
         $INSTALL_DATE = utf_conv(WIN_DEFAULT, $Charset, $INSTALL_DATE);
         if (strstr($L, "chinese") || strstr($L, "korean") || strstr($L, "japanese")) {
             $INSTALL_DATE = str_replace(" ", "", $INSTALL_DATE);
         }
     }
     $visitors = sprintf(L_VISITOR_REPORT, $INSTALL_DATE);
     for ($i = 0; $i < strlen($this->counter); $i++) {
         if (substr("{$this->counter}", $i, 1) == substr("{$ani_digits}", $i, 1)) {
             $digit_pos = substr("{$this->counter}", $i, 1);
             $html_output .= "<td><img src=\"" . $this->config['img'] . "{$digit_pos}.gif\" alt=\"" . $visits . " " . $visitors . "\" title=\"" . $visits . " " . $visitors . "\"";
         } else {
             $digit_pos = substr("{$ani_digits}", $i, 1);
             $html_output .= "<td><img src=\"" . $this->config['animated_img'] . "{$digit_pos}.gif\" alt=\"" . $visits . " " . $visitors . "\" title=\"" . $visits . " " . $visitors . "\"";
         }
         $html_output .= " width=\"" . $this->config['width'] . "\" height=\"" . $this->config['height'] . "\"></td>\n";
     }
     $html_output .= "</tr></table></BDO>\n";
     return $html_output;
 }
Example #10
0
function getfdate($date_format)
{
    #	global $L,$Charset;
    #	if(file_exists("../localization/".$L."/localized.chat.php")) include_once("../localization/".$L."/localized.chat.php");
    #	if ($date_format == "") $date_format = str_replace("%d of", (stristr(PHP_OS,'win') ? "%#d" : "%e").date('S')." of", L_LONG_DATETIME." (%z)");
    #	return stristr(PHP_OS,'win') ? utf_conv(WIN_DEFAULT,$Charset,strftime($date_format)) : strftime($date_format);
    if (stristr(PHP_OS, 'win')) {
        setlocale(LC_ALL, "English_United States", "eng-usa.UTF-8", "eng-usa");
    } else {
        setlocale(LC_ALL, "en_US.UTF-8", "enu.UTF-8", "usa.UTF-8", "enu_enu.UTF-8", "English-usa.UTF-8");
        // For American formats
    }
    if (!isset($date_format) || $date_format == "") {
        $date_format = "%A, " . (stristr(PHP_OS, 'win') ? "%#d" : "%e") . "<sup>" . date('S') . "</sup> of %B %Y %H:%M:%S (%z)";
    }
    return stristr(PHP_OS, 'win') ? utf_conv("windows-1252", "utf-8", strftime($date_format)) : strftime($date_format);
}