Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
67b9fac
commit 1acec51
Showing
3 changed files
with
425 additions
and
430 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,29 @@ | ||
<html> | ||
<head> | ||
<title>aMSN2 FrontEnd</title> | ||
<script type="text/javascript">var console={log:function(){}};</script> | ||
<script type="text/javascript" src="jquery.js"></script> | ||
<script type="text/javascript" src="jquery.ui.js"></script> | ||
<link rel="stylesheet" href="jquery-ui-themeroller.css" type="text/css" media="screen"> | ||
<style type="text/css"> | ||
@import url("amsn2.css"); | ||
</style> | ||
<script type="text/javascript" src="backend.js"></script> | ||
</head> | ||
<body> | ||
|
||
<div class="splashScreen"></div> | ||
|
||
<div class="mainWindow"> | ||
<pre class="message"> | ||
| ||
</pre> | ||
<div class="login"> | ||
Username:<input type="text" id="username"> <br/> | ||
Password:<input type="password" id="password"> <br/> | ||
<input type="button" value="SignIn" id="signin"> | ||
</div> | ||
<div class="contact_list"> | ||
<div class="title"></div> | ||
|
||
</div> | ||
</div> | ||
</body> | ||
<head> | ||
<title>aMSN2 FrontEnd</title> | ||
<script type="text/javascript">var console={log:function(){}};</script> | ||
<script type="text/javascript" src="jquery.js"></script> | ||
<script type="text/javascript" src="jquery.ui.js"></script> | ||
<link rel="stylesheet" href="jquery-ui-themeroller.css" type="text/css" media="screen"> | ||
<style type="text/css"> | ||
@import url("amsn2.css"); | ||
</style> | ||
<script type="text/javascript" src="backend.js"></script> | ||
</head> | ||
<body> | ||
<div class="splashScreen"></div> | ||
<div class="mainWindow"> | ||
<pre class="message"> | ||
| ||
</pre> | ||
<div class="login"> | ||
Username:<input type="text" id="username"> <br/> | ||
Password:<input type="password" id="password"> <br/> | ||
<input type="button" value="SignIn" id="signin"> | ||
</div> | ||
<div class="contact_list"> | ||
<div class="title"></div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,39 @@ | ||
<?php | ||
if(isset($_GET['close'])){ | ||
@session_start(); | ||
@session_destroy(); | ||
}else if (1){ | ||
if (isset($_POST['in']) && !empty($_POST['in'])){ | ||
$in = fopen("/tmp/test.in","a"); | ||
fwrite($in,$_POST['in']); | ||
fclose($in); | ||
echo "//ok".$_POST['in']; | ||
} else | ||
if (isset($_GET['out'])){ | ||
@session_start(); | ||
if (!isset($_SESSION['index'])) | ||
$_SESSION['index']=0; | ||
$index=$_SESSION['index']; | ||
@session_commit(); | ||
while (1){ | ||
$out = fopen("/tmp/test.out","r"); | ||
fseek($out,$index); | ||
$_ = fgets($out); | ||
fclose($out); | ||
if ($_!=""){ | ||
$index+=strlen($_); | ||
echo $_; | ||
@session_start(); | ||
$_SESSION['index']=$index; | ||
@session_commit(); | ||
break; | ||
}else{ | ||
sleep(1); | ||
} | ||
} | ||
}else | ||
echo "//wrong operation"; | ||
}else{ | ||
echo "//service not started"; | ||
} | ||
?> | ||
if(isset($_GET['close'])){ | ||
@session_start(); | ||
@session_destroy(); | ||
}else if (1){ | ||
if (isset($_POST['in']) && !empty($_POST['in'])){ | ||
$in = fopen("/tmp/test.in","a"); | ||
fwrite($in,$_POST['in']); | ||
fclose($in); | ||
echo "//ok".$_POST['in']; | ||
} else | ||
if (isset($_GET['out'])){ | ||
@session_start(); | ||
if (!isset($_SESSION['index'])) | ||
$_SESSION['index']=0; | ||
$index=$_SESSION['index']; | ||
@session_commit(); | ||
while (1){ | ||
$out = fopen("/tmp/test.out","r"); | ||
fseek($out,$index); | ||
$_ = fgets($out); | ||
fclose($out); | ||
if ($_!=""){ | ||
$index+=strlen($_); | ||
echo $_; | ||
@session_start(); | ||
$_SESSION['index']=$index; | ||
@session_commit(); | ||
break; | ||
}else{ | ||
sleep(1); | ||
} | ||
} | ||
}else | ||
echo "//wrong operation"; | ||
}else{ | ||
echo "//service not started"; | ||
} | ||
?> |
Oops, something went wrong.