比較バージョン

キー

  • この行は追加されました。
  • この行は削除されました。
  • 書式設定が変更されました。

...

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid
以下は、test001ユーザに3日前の日付、test002ユーザに3日後の日付を設定するldifファイルです。
※参考までに本日(2013/6/13) は、15869となります。


dn: uid=test001,ou=Test Unit1,o=test_o,dc=ac,c=JP
changetype: modify
add: objectClass
objectClass: shadowAccount
-
add: shadowExpire
shadowExpire: 15866 ←1970年1月1日からの日数(2013/6/10)


dn: uid=test002,ou=Test Unit2,o=test_o,dc=ac,c=JP
changetype: modify
add: objectClass
objectClass: shadowAccount
-
add: shadowExpire
shadowExpire: 15872 ←1970年1月1日からの日数(2013/6/16)

端末のサイズによっては表記がずれる可能性がございます。画面を広くしてご覧ください。 


<SP側の設定>

shadowExpireのマッピング設定を追加

...

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid
<html>
<head>
 ↓ヘッダに下のphp部分を追加する
<?php
header("Expires: Dec, 20 Jul 2010 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
?>

(中略)

<?php
$nowt = time();
$strNow = date("Y年m月d日", $nowt);
if (!empty($_SERVER['shadowExpire'])) {
    $expt = intval($_SERVER['shadowExpire'])*60*60*24;
    $strExp = date("Y年m月d日", $expt);
    $zant = $expt - $nowt;
    $zand = floor($zant/60/60/24);
    print "<div style=\"position: relative; top: 85px;\">";
    print "<h1>現在:$strNow ,";
    print "期限:$strExp ,";
    print "残日数:".intval($zand+2)."日間</h1>";
    print "</div>";
    if ($zand < 0) {
        $errmsg = "有効期限を".intval(($zand+1)*-1)."日過ぎています。";
        header("HTTP/1.1 301 Moved Permanently");
        header("Location: https://ex-sp-testXX.ecloud.nii.ac.jp/secure/error.php?exp=".$strExp."&errmsg=".$errmsg);
                                        ↑各自SPサーバのホスト名
        exit();
    }
}
?>

↑mainテーブルの前に上のphp部分を追加する
<table id="main" cellspacing="0" class="chart">

(中略)

  ※端末のサイズによっては表記がずれる可能性がございます。画面を広くしてご覧ください。 

有効期限切れエラーページのサンプルコード

 SPサーバ:/var/www/html/secure/error.phpを作成します。
  ※有効期限が切れたユーザでアクセスすると、このエラーページが表示されます。

...