get('validate_number') !== $_POST['validate_form']) { debug(DEBUG," - Invalid control number, destroying POST data. Control should be: ".$sess->get('validate_number')); unset($_POST); $html->alert_message($oper_fail[$lang]); } else{ debug(DEBUG," - POST data seems to be ok."); } } // Generate new control data for forms $set_control = md5(rand(10000,10000000)); $sess->set("validate_number",$set_control); debug(DEBUG,"Setting new control data: $set_control"); // toggle message saving if ($tgle) { debug(DEBUG,"Trying to change archiving option"); if ($tgle === $arch_on[$lang]) { if($db->set_log(true) === true) { $sess->set('log_status',true); $db->set_logger("7","1"); $html->status_message($status_msg2[$lang]); } else{ $html->alert_message($oper_fail[$lang]); } } elseif($tgle === $arch_off[$lang]) { if($db->set_log(false) === true) { $sess->set('log_status',false); $db->set_logger("6","1"); $html->status_message($status_msg3[$lang]); $html->system_message($status_msg1[$lang]); } else{ $html->alert_message($oper_fail[$lang]); } } } // Control diplaying of special contacs if ($vspec) { if ($db->set_jorge_pref("3",$vspec) === true) { $html->status_message($con_saved[$lang]); } else{ $html->alert_message($oper_fail[$lang]); } } // delete entire archive if ($_POST['erase_confirm'] === "true") { if ($_POST['del_all'] === $settings_del[$lang]) { debug(DEBUG," - Trying to erase all message archives"); if ($db->erase_all() === true) { $html->status_message($deleted_all[$lang]); $db->set_logger("9","2"); debug(DEBUG," - DONE"); } else{ $html->alert_message($delete_error[$lang]); debug(DEBUG," - FAILED"); } } } // set own name if ($_POST['own_name_value']) { // Validation is done by class, so we pass values there... if ($db->set_own_name($_POST['own_name_value']) === true) { $html->status_message($con_saved[$lang]); }else{ $html->alert_message($oper_fail[$lang]); } } $html->set_overview('

'.$settings_desc[$lang].'

'.$settings_desc_detail[$lang].''); $html->set_body('
'); $html->set_body(' '); if ($db->get_jorge_pref("3") === false) { $html->alert_message($oper_fail[$lang]); } $special_select = $db->result->pref_value; if ($special_select === "2") { $n_is_sel = "selected"; } else{ $y_is_sel = "selected"; } $html->set_body(' '); $html->set_body(' '); $html->set_body(' '); $html->set_body(''); $html->set_body('
'.$setting_d1[$lang].'
'.$setting_d2[$lang].'
'.$spec_contact_enable[$lang].'(?)
'.$select_view[$lang].'
'.$sel_language[$lang].'
'.$own_name_enter[$lang].'(?)


'.$stats_personal_d[$lang].''); $db->get_personal_sum(); $total_messages = number_format($db->result->cnt); $html->set_body('

'.$stats_personal[$lang].' '.$total_messages.'

'.$stats_personal_top[$lang].'

'); $db->get_personal_top(); $results = $db->result; if (count($results)!=0) { $html->set_body(' '); foreach ($results as $result) { $db->get_user_name($result[peer_name_id]); $user_name = $db->result->username; $db->get_server_name($result[peer_server_id]); $server_name = $db->result->server_name; $nickname=query_nick_name($ejabberd_roster,$user_name,$server_name); $to_base = $enc->crypt_url("tslice=$result[at]&peer_name_id=$result[peer_name_id]&peer_server_id=$result[peer_server_id]"); $html->set_body(' '); } $html->set_body('
'.$stats_personal_count[$lang].''.$stats_peer[$lang].''.$stats_when[$lang].'
'.$result[count].''.$nickname.'  ('.htmlspecialchars($user_name).'@'.htmlspecialchars($server_name).') '.$result[at].'
'); } else { $html->set_body('
'.$no_archives[$lang].'
'); } $html->set_body('
'); require_once("footer.php"); ?>