1 <?php include '../i18n.class.php'; $i18n = new i18n('../lang/lang_{LANGUAGE}.ini'); $i18n->init();?>
4 <link type='text/css' rel='stylesheet' href='../css/all.css'/>
5 <link type='text/css' rel='stylesheet' href='../css/mailbox.css'/>
10 require '../api/functions.php';
13 if (isset($_GET['box']) and strpos($_GET['box'],'..')==false and strpos($_GET['box'],'\\')==false and strpos($_GET['box'],'/')==false){
14 if (isset($_GET['delthem'])){
15 if (strpos($_GET['delthem'],'/') or strpos($_GET['delthem'],'..') or strpos($_GET['delthem'],'\\')){}
17 try{unlink(preg_split('/@/',$_SESSION['m_user'])[0].'/'.$_GET['box'].'/'.$_GET['delthem']);echo '<text>'.L::gmail_success.', </text><a href="mailb.php">'.L::gmail_return.'</a>';}catch(Exception $e){echo '<a href="mailb.php">'.L::gmail_return.'</a>';}
20 elseif(isset($_GET['id'])){
21 try{include preg_split('/@/',$_SESSION['m_user'])[0].'/'.$_GET['box'].'/'.$_GET['id'];echo '<text>'.L::gmail_sender.': '.$sender.'</text><br>';echo '<text>'.L::gmail_content.': '.$html;echo '</text><br><a href="mailb.php">'.L::gmail_return.'</a><text> or </text><a href="move.php?&from='.$_GET['box'].'&to=readed&id='.$_GET['id'].'">'.L::gmail_read.'</a>';}catch (Exception $e){echo L::gmail_invalid_id;}
25 if (isset($_GET['delthem'])){
26 if (strpos($_GET['delthem'],'/') or strpos($_GET['delthem'],'..') or strpos($_GET['delthem'],'\\')){}
28 try{unlink(preg_split('/@/',$_SESSION['m_user'])[0].'/mails/'.$_GET['delthem']);echo '<text>'.L::gmail_success.', </text><a href="mailb.php">'.L::gmail_return.'</a>';}catch(Exception $e){echo '<a href="mailb.php">'.L::gmail_return.'</a>';}
31 elseif(isset($_GET['id'])){
32 try{include preg_split('/@/',$_SESSION['m_user'])[0].'/mails/'.$_GET['id'];echo '<text>'.L::gmail_sender.': '.$sender.'</text><br>';echo '<text>'.L::gmail_content.': '.str_replace('\n','<br>',$html);echo '</text><br><a href="mailb.php">'.L::gmail_return.'</a><text> '.L::gmail_or.' </text><a href="move.php?&from=mails&to=readed&id='.$_GET['id'].'">'.L::gmail_read.'</a>';}catch (Exception $e){echo L::gmail_invalid_id;}
37 http_response_code(404);