<?php session_start();
if (isset($_SESSION['logged']) && $_SESSION['logged'] == 'yes') {
		include ('../../../scripts/classes.php');
		if ($_SESSION['lang']=="EN"){$lang="EN"; include ('../../../lang/en.php');}elseif ($_SESSION['lang']=="GR"){$lang="GR";include ('../../../lang/gr.php');}else {$lang="EN";include ('../../../en.php');}

		$page_title = _SMS_STATUS_UPDATE;
		$mode = _SMS_STATUS_UPDATE;   
        $msgid = $_GET['msgid'];
        $carrier = $_GET['carrier'];                              
?>	
<!DOCTYPE html SYSTEM "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $page_title ?></title>
<link rel="shortcut icon" href="../../../img/favicon.png" />
<link href="../../../cms1.css" rel="stylesheet" type="text/css" /> 
</head>
<body>
<script>top.document.title=self.document.title;</script>
	<div>
		<fieldset>
		<legend><?php echo $mode ?></legend>
		<div class="align-left">
        <?php
            $go_back = true; //initialization
            if ($carrier == 'Clickatell') die('Status update is not available for Clickatell messages');
            if ($carrier == 'SMSAPI') {               
                (SmsApi::GetSmsApiStatus($msgid)== true) ? $go_back = true : $go_back = false;   
            }
            
            echo "<br /><br />";
            echo '<div align="center">'.$lbl_info_updating_record.'</div><br />';
            echo '<div align="center"><img src="../../../img/loading.gif" alt="loading..." /></div>';
            
            if ($go_back == true )
            {
                echo '<script type="text/javascript">history.back();</script>';
            }
        ?>	

        </div>
		</fieldset>
	</div>
</body>
</html>
<?php
} else {
    header('Location: login.php');
}
?>
