莫让这世间的庸俗扰了清修,尽管三观已被腐蚀,但未来总是光明的。
2015/10/19/ - - 0 条评论 - 浏览量 : 1328

此代码仅供参考,并没有包含key和API的主体文件

Jaccount.php

<?php 
/* php Jaccount */
include('jaccount/clsJAccount.php');
session_start();//启动session
$jam = new JAccountManager;
$checkkey = $jam->JAccountManager('jaji2013','/test/ji/jaccount');
$strReturnURL='/jaccount.php';
$ht = $jam->checkLogin($strReturnURL);
$_SESSION['user']=array($ht['id'],$ht['uid'],$ht['chinesename'],$ht['student'],$ht['dept']);
if (($ht !=NULL) && ($jam->hasTicketInURL)) {
	$jam->redirectWithoutTicket();
}
$DisplayForm=false;
if (isset($_POST['Random_iv']) && ($_POST['Random_iv']=='343243abdecf3a7e')) {
	$src=$_POST["Name"].'@'.$_POST["Domain"];
	$encrypted=$jam->encrypt($src);
	$decrypt_d=$jam->decrypt(urldecode($encrypted));
}else{
	$DisplayForm=true;
}
if($_SESSION['user']){header('Location:/home');}
/* php Jaccount end */
?>


Jaccount_logout.php

<?php
include('jaccount/clsJAccount.php');
session_start();//启动session
$jam = new JAccountManager;
$checkkey = $jam->JAccountManager('jaji2013','/test/ji/jaccount');
session_unset('user');//注销
$jam->logout('/home');//注销

?>