Example #1
0
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
/* Dont modify this file is you dont know what you make                 */
/************************************************************************/
global $ModPath, $ModStart;
$sform_path = "modules/sform/";
include_once $sform_path . "sform.php";
global $m;
$m = new form_handler();
//********************
$m->add_form_title("CONTACT");
$m->add_form_method("post");
$m->add_form_check("true");
$m->add_mess(utf8_java("[french] * désigne un champ obligatoire [/french][english] * indicate an obligatory field [/english]"));
$m->add_submit_value("ok");
$m->add_url("modules.php");
$m->add_field("ModStart", "", $ModStart, 'hidden', false);
$m->add_field("ModPath", "", $ModPath, 'hidden', false);
/************************************************/
include $sform_path . "contact/formulaire.php";
/************************************************/
// Manage the <form>
switch ($ok) {
    case 'Soumettre':
    case 'Submit':
        if (!$sformret) {
            $m->make_response();
            //anti_spambot
            if (!R_spambot($asb_question, $asb_reponse, $message)) {
Example #2
0
    $meta_op = true;
    include "meta/meta.php";
    $Xthing .= $l_meta;
    $Xthing .= str_replace("\n", "", import_css_javascript($tmp_theme, $language, $site_font, basename($_SERVER['PHP_SELF']), ""));
    $Xthing .= "</head><body id='chat'>";
    $Xthing = "\"" . str_replace("'", "\\'", $Xthing) . "\"";
}
$result = sql_query("SELECT DISTINCT ip FROM " . $NPDS_Prefix . "chatbox WHERE id='{$id}' and date >= " . (time() - 60 * 2) . "");
$numofchatters = sql_num_rows($result);
$rafraich_connectes = 0;
if (intval($connectes) != $numofchatters) {
    $rafraich_connectes = 1;
    if ($numofchatters == 1 or $numofchatters == 0) {
        $nbre_connectes = "'" . $numofchatters . " " . utf8_java(translate("person chatting right now.")) . " GP [{$id}]'";
    } else {
        $nbre_connectes = "'" . $numofchatters . " " . utf8_java(translate("people chatting right now.")) . " GP [{$id}]'";
    }
}
$commande = "self.location='chatrafraich.php?repere={$repere}&aff_entetes=0&connectes={$numofchatters}&id={$id}&auto={$auto}'";
include "meta/meta.php";
echo "</head>\n<body style=\"background-color: #F8F8F8;\" id='chat'>\n   <script type='text/javascript'>\n   //<![CDATA[\n   function scroll_messages() {\n      if (typeof(scrollBy) != 'undefined') {\n         parent.frames[1].scrollBy(0, 20000);\n         parent.frames[1].scrollBy(0, 20000);\n      }\n      else if (typeof(scroll) != 'undefined') {\n         parent.frames[1].scroll(0, 20000);\n         parent.frames[1].scroll(0, 20000);\n      }\n   }\n\n   function rafraichir() {\n      {$commande};\n   }\n\n   function sur_chargement() {\n      setTimeout(\"rafraichir();\", 5000);";
if ($aff_entetes == "1") {
    echo "parent.frames[1].document.write({$Xthing});";
}
if ($thing != "\"\"") {
    echo "parent.frames[1].document.write({$thing});\n               setTimeout(\"scroll_messages();\", 300);\n               ";
}
if ($rafraich_connectes == 1) {
    echo "top.document.title={$nbre_connectes};";
}
echo "}\n   window.onload=sur_chargement();\n   //]]>\n   </script>\n   </body>\n   </html>";