Skip to content

Commit

Permalink
51pas
Browse files Browse the repository at this point in the history
  • Loading branch information
51pas committed Aug 14, 2017
0 parents commit 9a9057a
Show file tree
Hide file tree
Showing 39 changed files with 1,321 additions and 0 deletions.
44 changes: 44 additions & 0 deletions ebrequest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?php
$appid = $_GET["appid"];
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
$bizsession = new bizsession();
$bizsession->setappid($appid);
$before=$_COOKIE["bizsession_".$appid]."";
$str = $bizsession->initialize($before);
$after=$str;
setcookie("bizsession_".$appid, $str, 0);
$bizsession->sethost($_SERVER['SERVER_NAME']);
$bizsession->setport($_SERVER["SERVER_PORT"]);
$bizsession->setquery($_SERVER["QUERY_STRING"]);
if ($_SERVER["SERVER_PORT"]=80)
{
$bizsession->setpath('http://'.$_SERVER['SERVER_NAME'].$_SERVER["REQUEST_URI"]);
}
else if ($_SERVER["SERVER_PORT"]=443)
{
$bizsession->setpath('https://'.$_SERVER['SERVER_NAME'].$_SERVER["REQUEST_URI"]);
}
else
{
$bizsession->setpath('http://'.$_SERVER['SERVER_NAME'].':'.$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]);
}

$filename = $bizsession->getfilename();
$in = fopen("php://input", "rb");
$out = fopen($filename, 'w');

while (!feof($in)) {
fwrite($out, fread($in, 8192));
}

fclose($in);
fclose($out);
$bizsession->binaryrequest($filename);
header("Content-Type: stream/ebizmis");
header("Content-Length: " . filesize($filename));
$fp = fopen($filename, 'rb');
fpassthru($fp);
fclose($fp);
unlink($filename);
?>
47 changes: 47 additions & 0 deletions inc/common_needlogin.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?php
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
$bizsession = new bizsession();
$bizsession->setappid($appid);
$before=$_COOKIE["bizsession_".$appid]."";
$remeber=$_COOKIE["bizremember_".$appid]."";
$str = $bizsession->initialize($before);
$after=$str;
setcookie("bizsession_".$appid, $str, 0);
$bizsession->sethost($_SERVER['SERVER_NAME']);
$bizsession->setport($_SERVER["SERVER_PORT"]);
$bizsession->setquery($_SERVER["QUERY_STRING"]);
if ($_SERVER["SERVER_PORT"]=80)
{
$bizsession->setpath('http://'.$_SERVER['SERVER_NAME'].$_SERVER["REQUEST_URI"]);
}
else if ($_SERVER["SERVER_PORT"]=443)
{
$bizsession->setpath('https://'.$_SERVER['SERVER_NAME'].$_SERVER["REQUEST_URI"]);
}
else
{
$bizsession->setpath('http://'.$_SERVER['SERVER_NAME'].':'.$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]);
}

if (!$bizsession->islogin() || $_GET['relogin']==1)
{
if ($remember!="")
{
if ($bizsession->login('9^'.$remeber)!=true)
{
setcookie("bizremember_".$appid, "", 0);
}
else
{
setcookie("bizremember_".$appid, $remember, time()+3600*24*365*10);
}
}

if (!$bizsession->islogin() && $bizsession->login('1^'.$_GET['code'])!=true)
{
echo '请通过PAS社区微信公众号注册并登录!【<a href="pasreg.php" data-ajax=false>注册步骤说明</a>】';
exit;
}
}
?>
25 changes: 25 additions & 0 deletions inc/common_notlogin.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
$bizsession = new bizsession();
$bizsession->setappid($appid);
$before=$_COOKIE["bizsession_".$appid]."";
$str = $bizsession->initialize($before);
$after=$str;
setcookie("bizsession_".$appid, $str, 0);
$bizsession->sethost($_SERVER['SERVER_NAME']);
$bizsession->setport($_SERVER["SERVER_PORT"]);
$bizsession->setquery($_SERVER["QUERY_STRING"]);
if ($_SERVER["SERVER_PORT"]=80)
{
$bizsession->setpath('http://'.$_SERVER['SERVER_NAME'].$_SERVER["REQUEST_URI"]);
}
else if ($_SERVER["SERVER_PORT"]=443)
{
$bizsession->setpath('https://'.$_SERVER['SERVER_NAME'].$_SERVER["REQUEST_URI"]);
}
else
{
$bizsession->setpath('http://'.$_SERVER['SERVER_NAME'].':'.$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]);
}
?>
30 changes: 30 additions & 0 deletions inc/common_trylogin.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
$bizsession = new bizsession();
$bizsession->setappid($appid);
$before=$_COOKIE["bizsession_".$appid]."";
$str = $bizsession->initialize($before);
$after=$str;
setcookie("bizsession_".$appid, $str, 0);
$bizsession->sethost($_SERVER['SERVER_NAME']);
$bizsession->setport($_SERVER["SERVER_PORT"]);
$bizsession->setquery($_SERVER["QUERY_STRING"]);
if ($_SERVER["SERVER_PORT"]=80)
{
$bizsession->setpath('http://'.$_SERVER['SERVER_NAME'].$_SERVER["REQUEST_URI"]);
}
else if ($_SERVER["SERVER_PORT"]=443)
{
$bizsession->setpath('https://'.$_SERVER['SERVER_NAME'].$_SERVER["REQUEST_URI"]);
}
else
{
$bizsession->setpath('http://'.$_SERVER['SERVER_NAME'].':'.$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]);
}

if (!$bizsession->islogin())
{
$bizsession->login('1^'.$_GET['code']);
}
?>
3 changes: 3 additions & 0 deletions index-80.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php
header('Location: https://www.51pas.com');
?>
35 changes: 35 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php
$appid = 5;
include "inc/common_notlogin.php";
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
<title>PAS社区论坛</title>
<meta http-equiv="keywords" content="freepascal pascal ebizmis pas社区 linux 开发框架 开发平台">
<meta http-equiv="description" content="freepascal pascal ebizmis pas社区 linux 开发框架 开发平台">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="format-detection" content="telephone=no" />
<meta charset="utf-8" />
<link href="jquery/jquery.mobile-1.4.5.min.css" rel="stylesheet" type="text/css"/>
<script src="jquery/jquery-2.1.4.min.js" type="text/javascript"></script>
<script src="jquery/jquery.mobile-1.4.5.min.js" type="text/javascript"></script>
<style>
a { text-decoration: none; color: #0053a1 }
</style>
</head>
<body>
<table width=100%>
<tr><td width=1%></td><td width=98%>
<?php
echo $bizsession->request(5,8,0,'fromlogin');
?>
</td>
<td width=1%></td></tr>
<!-- <tr><td align=center colspan=3><b><font size=2>北京明润天成科技有限公司 备案号:京ICP备12030676号-5</font></b><br><br></td></tr> -->
</table>
</body>
</html>

32 changes: 32 additions & 0 deletions indexwx.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php
$appid = 5;
include "inc/common_needlogin.php";
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
<title>PAS社区论坛</title>
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="format-detection" content="telephone=no" />
<meta charset="utf-8" />
<link href="jquery/jquery.mobile-1.4.5.min.css" rel="stylesheet" type="text/css"/>
<script src="jquery/jquery-2.1.4.min.js" type="text/javascript"></script>
<script src="jquery/jquery.mobile-1.4.5.min.js" type="text/javascript"></script>
<style>
a { text-decoration: none; color: #0053a1 }
</style>
</head>
<body>
<table width=100%>
<tr><td width=1%></td><td width=98%>
<?php
echo $bizsession->request(5,8,0,'fromlogin');
?>
</td>
<td width=1%></td></tr>
</table>
</body>
</html>

34 changes: 34 additions & 0 deletions loginewm.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php
$appid = 5;
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
$bizsession = new bizsession();
$bizsession->setappid($appid);
$before=$_COOKIE["bizsession_".$appid]."";
$str = $bizsession->initialize($before);
$after=$str;
setcookie("bizsession_".$appid, $str, 0);
$bizsession->sethost($_SERVER['SERVER_NAME']);
$bizsession->setport($_SERVER["SERVER_PORT"]);
$bizsession->setquery($_SERVER["QUERY_STRING"]);
if ($_SERVER["SERVER_PORT"]=80)
{
$bizsession->setpath('http://'.$_SERVER['SERVER_NAME'].$_SERVER["REQUEST_URI"]);
}
else if ($_SERVER["SERVER_PORT"]=443)
{
$bizsession->setpath('https://'.$_SERVER['SERVER_NAME'].$_SERVER["REQUEST_URI"]);
}
else
{
$bizsession->setpath('http://'.$_SERVER['SERVER_NAME'].':'.$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]);
}


$im = imagecreatefrompng("/home/ramdisk/".$_GET["u"].".png");
header('Content-Type: image/png');
imagepng($im);
imagedestroy($im);
unlink ("/home/ramdisk/".$_GET["u"].".png");
?>

15 changes: 15 additions & 0 deletions logoff.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php
$appid = 5;
include "inc/common_notlogin.php";
$bizsession->logoff();
setcookie("bizsession_".$appid, "", 0);
setcookie("bizremember_".$appid, "", 0);
// header('Location: index.php');
?>
<html>
<body>
<script language="javascript">
window.location.href='http://www.51pas.com';
</script>
</body>
</html>
37 changes: 37 additions & 0 deletions pasbbs.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php
$appid = 5;
include "inc/common_trylogin.php";
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
<title>PAS社区</title>
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="format-detection" content="telephone=no" />
<meta charset="utf-8" />
<link href="jquery/jquery.mobile-1.4.5.min.css" rel="stylesheet" type="text/css"/>
<script src="jquery/jquery-2.1.4.min.js" type="text/javascript"></script>
<script src="jquery/jquery.mobile-1.4.5.min.js" type="text/javascript"></script>
<style>
.mainbox {
background: #FFF;
border: 1px solid #C1C1C1;
padding: 1px;
margin-bottom: 8px;
}

</style>
</head>
<body style='margin-top:0;margin-left:20px;margin-right:20px;'>
<table width=100%>
<tr><td width=1%></td><td width=98%>
<?php
echo $bizsession->request(5,8,0,'');
?>
</td>
<td width=1%></td></tr>
</body>
</html>

1 change: 1 addition & 0 deletions pasbookmarks.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
51pas
39 changes: 39 additions & 0 deletions pasbulletin.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php
$appid = 5;
include "inc/common_trylogin.php";
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
<title>PAS社区论坛</title>
<meta http-equiv="keywords" content="freepascal pascal ebizmis pas社区 linux 开发框架 开发平台">
<meta http-equiv="description" content="freepascal pascal ebizmis pas社区 linux 开发框架 开发平台">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="format-detection" content="telephone=no" />
<meta charset="utf-8" />
<link href="jquery/jquery.mobile-1.4.5.min.css" rel="stylesheet" type="text/css"/>
<script src="jquery/jquery-2.1.4.min.js" type="text/javascript"></script>
<script src="jquery/jquery.mobile-1.4.5.min.js" type="text/javascript"></script>
<style>
.mainbox {
background: #FFF;
border: 1px solid #C1C1C1;
padding: 1px;
margin-bottom: 8px;
}
a{ text-decoration: none; color: #0053A1 }
a:hover{ text-decoration: underline }
.oddrow {font: 12px Arial, Tahoma; color: #225588; background-color: #D3DCEE;}
.evenrow {font: 12px Arial, Tahoma; color: #225588; background-color: #D3DCEE;}
</style>
</head>
<body style='margin-top:0;margin-left:20px;margin-right:20px;'>
<?php
echo $bizsession->request(5,9,0,'');
?>
</td>
</body>
</html>

31 changes: 31 additions & 0 deletions pascancelclosethread.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php
$appid = 5;
include "inc/common_needlogin.php";
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="maximum-scale=7; user-scalable=1; initial-scale=1;" />
<title>关闭帖子</title>
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="format-detection" content="telephone=no" />
<meta charset="utf-8" />
</head>
<body >
<?php
$s=$bizsession->request(5,24,0,'');
$s1=$bizsession->redirecturl();
if ($s1!="")
{
?>
<script language="javascript">
window.location.href='<?php echo $s1; ?>';
</script>
<?php
}
else echo $s;
?>
</body>
</html>

Loading

0 comments on commit 9a9057a

Please sign in to comment.