Example #1
0
function fs_get_request_suffix($append = "", $prepand_with_qm = true)
{
    require_once dirname(__FILE__) . '/session.php';
    $t = $prepand_with_qm ? '?' : '';
    $t .= 'sid=' . fs_get_session_id();
    if ($append) {
        $t .= "&{$append}";
    }
    return $t;
}
Example #2
0
}

var fs_network_status_count = 0;
function sendRequest2(params,silent,callback)
{
	if (!isIE6OrOlder())
	{
		if (!silent)
		{
			fs_network_status_count++;
			var net = $('network_status');
			if (net) net.style.display = "block";
		}
	}
	params += ("&sid=<?php 
echo fs_get_session_id();
?>
");
	var ajaxUrl = "<?php 
echo fs_js_url('php/ajax-handler.php');
?>
";
	var myAjax = new Ajax.Request(
	ajaxUrl,
	{
		method: 'post', 
		parameters: params, 
		onComplete: function(response)
		{
			handleResponse(response,silent,callback);
			if (!isIE6OrOlder())
Example #3
0
 } else {
     if (is_object($user)) {
         $ok = fs_session_start();
         if ($ok !== true) {
             $msg = "Error starting session";
             if (is_string($ok)) {
                 $msg .= " :{$ok}";
             }
             $msg .= "<br/>";
             echo $msg;
             return false;
         }
         global $FS_SESSION;
         $FS_SESSION['user'] = $user;
         fs_store_session();
         $sid = fs_get_session_id();
         $headers = "Content-Type: text/html; charset=\"UTF-8\"\r\n";
         $headers .= "MIME-Version: 1.0 ";
         $subject = "=?UTF-8?B?" . base64_encode(fs_r("FireStats password recovery")) . "?=";
         $msg = sprintf(fs_r("Click %s to change your FireStats password, this link will work for a short time"), fs_link(fs_get_absolute_url($_SERVER['REQUEST_URI'] . "&reset&sid={$sid}"), fs_r("here"), true));
         $res = mail($email, $subject, $msg, $headers);
         if ($res === true) {
             echo "<div class='info'>" . fs_r("Email sent") . "</div>";
         } else {
             echo "<div class='error'>" . fs_r("Failed to send email") . "</div>";
         }
     } else {
         echo "<div class='error'>" . $user . "</div>";
     }
 }
 ?>