From f70027ffbedce10f412868a7bf9b0b67b113f1b1 Mon Sep 17 00:00:00 2001 From: M.Gergo Date: Sun, 20 Jan 2019 11:48:48 +0100 Subject: Rev: 4423 --- .../policy/private/naplo/intezmeny/terem-pre.php | 3 +++ .../www/policy/private/naplo/intezmeny/terem.php | 2 +- .../www/policy/private/portal/hirek/hirek-pre.php | 5 +++-- .../policy/private/portal/portal/portal-pre.php | 8 +++++++- .../www/policy/private/session/accountInfo-pre.php | 23 ++++++++++++++++++++-- .../www/policy/private/session/accountInfo.php | 2 ++ .../www/policy/private/session/eduroam-pre.php | 5 +++++ mayor-orig/www/policy/private/session/eduroam.php | 0 .../private/session/search/searchAccount-pre.php | 1 + .../private/session/search/searchAccount.php | 2 +- .../public/password/changeMyPassword-pre.php | 3 +++ .../www/policy/public/portal/portal/portal-pre.php | 22 +++------------------ .../www/policy/public/session/logout-pre.php | 1 + 13 files changed, 51 insertions(+), 26 deletions(-) create mode 100644 mayor-orig/www/policy/private/session/eduroam-pre.php create mode 100644 mayor-orig/www/policy/private/session/eduroam.php (limited to 'mayor-orig/www/policy') diff --git a/mayor-orig/www/policy/private/naplo/intezmeny/terem-pre.php b/mayor-orig/www/policy/private/naplo/intezmeny/terem-pre.php index 2fc6e2de..3afa9ce2 100644 --- a/mayor-orig/www/policy/private/naplo/intezmeny/terem-pre.php +++ b/mayor-orig/www/policy/private/naplo/intezmeny/terem-pre.php @@ -37,6 +37,9 @@ $ADAT['teremAdat'] = getTermek(array('result' => 'assoc', 'keyfield' => 'teremId', 'telephelyId' => $telephelyId)); $TOOL['telephelySelect'] = array('tipus'=>'cella','paramName' => 'telephelyId', 'post' => array('tanev')); + if ($ADAT['teremId']!='' || $ADAT['teremId']!='') { + $TOOL['vissza']['icon'] = 'arrow-left'; + } getToolParameters(); } ?> diff --git a/mayor-orig/www/policy/private/naplo/intezmeny/terem.php b/mayor-orig/www/policy/private/naplo/intezmeny/terem.php index f36fb11b..207141cb 100644 --- a/mayor-orig/www/policy/private/naplo/intezmeny/terem.php +++ b/mayor-orig/www/policy/private/naplo/intezmeny/terem.php @@ -8,6 +8,6 @@ putTeremForm($ADAT); } else { putTeremLista($ADAT); -//NEM TESZTELT! putTeremForm($ADAT); + putTeremForm($ADAT); } ?> diff --git a/mayor-orig/www/policy/private/portal/hirek/hirek-pre.php b/mayor-orig/www/policy/private/portal/hirek/hirek-pre.php index 247d10d9..db6e321f 100644 --- a/mayor-orig/www/policy/private/portal/hirek/hirek-pre.php +++ b/mayor-orig/www/policy/private/portal/hirek/hirek-pre.php @@ -1,7 +1,8 @@ date('Y-m-d'), 'igDt'=>date('Y-m-d'),'flag'=>array(1))); + $FILTER=array('tolDt'=>date('Y-m-d H:i:s'), 'igDt'=>date('Y-m-d H:i:s'),'flag'=>array(1),'class'=>array(1,6)); + $ADAT['hirek'] = getHirek($FILTER); ?> diff --git a/mayor-orig/www/policy/private/portal/portal/portal-pre.php b/mayor-orig/www/policy/private/portal/portal/portal-pre.php index 2f8d7772..dc4e79d5 100644 --- a/mayor-orig/www/policy/private/portal/portal/portal-pre.php +++ b/mayor-orig/www/policy/private/portal/portal/portal-pre.php @@ -5,9 +5,15 @@ require_once('include/modules/portal/share/kerdoiv.php'); require_once('include/modules/session/groupInfo.php'); - $ADAT['hirek'] = getHirek(array('tolDt'=>date('Y-m-d H:i:s'), 'igDt'=>date('Y-m-d H:i:s'),'flag'=>array(1),'class'=>array(6),'csoport'=>$AUTH['my']['categories'])); + $ADAT['hirek'] = getHirek(array('cid'=>array(0),'tolDt'=>date('Y-m-d H:i:s'), 'igDt'=>date('Y-m-d H:i:s'),'flag'=>array(1),'class'=>array(1,6),'csoport'=>$AUTH['my']['categories'])); $ADAT['kerdoiv'] = getKerdoiv(_POLICY); + $ev=date('Y');$honap=date('m');$nap=date('d'); + if ($ev % 4 ==0) {if ($ev % 100 !==0) {$szokoev=true;} else {if ($ev % 400==0) {$szokoev=true;}}} else {$szokoev=false;} + if (!$szokoev && $honap==2 && $nap>=24) {$nap=$nap+1;} + $ADAT['nevnap']['ma'] = getNevnap($honap,$nap); + $ADAT['nevnap']['holnap'] = getNevnap($honap,$nap+1); + if (in_array($AUTH[_POLICY]['backend'],array('mysql','ads')) && _POLICY=='private') { $ADAT['hirekAdmin'] = getGroupInfo('hirekadmin','private',array('withNewAccounts' => false)); $ADAT['vezetoseg'] = getGroupInfo('vezetoseg','private',array('withNewAccounts' => false)); diff --git a/mayor-orig/www/policy/private/session/accountInfo-pre.php b/mayor-orig/www/policy/private/session/accountInfo-pre.php index 226ecd26..9b54adf5 100644 --- a/mayor-orig/www/policy/private/session/accountInfo-pre.php +++ b/mayor-orig/www/policy/private/session/accountInfo-pre.php @@ -34,21 +34,40 @@ changeAccountInfo($userAccount, $toPolicy); + } elseif ($action=='tokenLogout') { + + revokeTokens(); + } elseif ($action=='userSettingsModify') { $changeSkinTo = readVariable($_POST['changeSkinTo'],'enum',null,$SKINSSHOW); setUserSettings($userAccount, $toPolicy, array('skin'=>$changeSkinTo)); } elseif ($action=='generateEduroamId') { - + $eduroamDOMAIN = readVariable($_POST['eduroamDOMAIN'],'enum',null,$eduroamDOMAINS); + $eduroamPASSWORD = @exec('pwgen'); + if (__TANAR===true) { + $eduroamAFFILIATION = 'faculty'; + } elseif (__DIAK===true) { + $eduroamAFFILIATION = 'student'; + } else { + $eduroamAFFILIATION = 'staff'; + } + createEduroamSettings(array('userAccount'=>$userAccount,'policy'=> $toPolicy, + 'eduroamUID' => $userAccount, + 'eduroamDOMAIN'=>$eduroamDOMAIN, + 'eduroamAFFILIATION'=>$eduroamAFFILIATION, + 'eduroamPASSWORD'=>$eduroamPASSWORD)); } elseif ($action=='modoifyEduroamId') { - + } $userInfo = getUserInfo($userAccount, $toPolicy); // keretrendszer attribútumai $accountInfo = getAccountInfo($userAccount, $toPolicy); // backend attribútumai $ADAT = getUserSettings($userAccount, $toPolicy); + $ADAT['activity'] = getMyActivity(); + if ($toPolicy=='private' && _POLICY ==='private') { $ADAT['eduroamAdat'] = getEduroamSettings($userAccount, $toPolicy); // dump($ADAT); diff --git a/mayor-orig/www/policy/private/session/accountInfo.php b/mayor-orig/www/policy/private/session/accountInfo.php index e072907b..66642ef3 100644 --- a/mayor-orig/www/policy/private/session/accountInfo.php +++ b/mayor-orig/www/policy/private/session/accountInfo.php @@ -12,6 +12,8 @@ putEduroamForm($ADAT); + putAccountActivityForm($ADAT); + putAccountInfoForm($userInfo, $accountInfo, $backendAttrDef, $toPolicy); ?> diff --git a/mayor-orig/www/policy/private/session/eduroam-pre.php b/mayor-orig/www/policy/private/session/eduroam-pre.php new file mode 100644 index 00000000..40a406cd --- /dev/null +++ b/mayor-orig/www/policy/private/session/eduroam-pre.php @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/mayor-orig/www/policy/private/session/eduroam.php b/mayor-orig/www/policy/private/session/eduroam.php new file mode 100644 index 00000000..e69de29b diff --git a/mayor-orig/www/policy/private/session/search/searchAccount-pre.php b/mayor-orig/www/policy/private/session/search/searchAccount-pre.php index 2108f631..1ef93e95 100644 --- a/mayor-orig/www/policy/private/session/search/searchAccount-pre.php +++ b/mayor-orig/www/policy/private/session/search/searchAccount-pre.php @@ -25,4 +25,5 @@ echo $action; } + ?> diff --git a/mayor-orig/www/policy/private/session/search/searchAccount.php b/mayor-orig/www/policy/private/session/search/searchAccount.php index 8cfe1d75..727706ee 100644 --- a/mayor-orig/www/policy/private/session/search/searchAccount.php +++ b/mayor-orig/www/policy/private/session/search/searchAccount.php @@ -5,7 +5,7 @@ if (_RIGHTS_OK !== true) die(); - global $attr, $pattern, $searchResult, $searchAttrList, $toPolicy; + global $attr, $pattern, $searchResult, $searchAttrList, $toPolicy, $ADAT; putSearchAccountForm($attr, $pattern, $searchAttrList, $toPolicy); diff --git a/mayor-orig/www/policy/public/password/changeMyPassword-pre.php b/mayor-orig/www/policy/public/password/changeMyPassword-pre.php index f7c68879..e9ef2f3c 100644 --- a/mayor-orig/www/policy/public/password/changeMyPassword-pre.php +++ b/mayor-orig/www/policy/public/password/changeMyPassword-pre.php @@ -2,6 +2,9 @@ if (_RIGHTS_OK !== true) die(); + _clearSessionCache($sessionID); + unsetTokenCookies(); // ha valaki ide tévedne, visszavonjuk a Tokenjét és a cache-t is vissza kell + $toPolicy = readVariable($_REQUEST['toPolicy'], 'enum', 'private', $POLICIES); $userAccount = readVariable($_REQUEST['userAccount'], 'emptystringnull', (defined('_USERACCOUNT'))?_USERACCOUNT:null); diff --git a/mayor-orig/www/policy/public/portal/portal/portal-pre.php b/mayor-orig/www/policy/public/portal/portal/portal-pre.php index 7ef3ebca..d02f5484 100644 --- a/mayor-orig/www/policy/public/portal/portal/portal-pre.php +++ b/mayor-orig/www/policy/public/portal/portal/portal-pre.php @@ -4,25 +4,9 @@ require_once('include/modules/portal/share/nevnap.php'); require_once('include/modules/portal/share/kerdoiv.php'); - $ev=date('Y'); - $honap=date('m'); - $nap=date('d'); - - if ($ev % 4 ==0) { - if ($ev % 100 !==0) { - $szokoev=true; - } else { - if ($ev % 400==0) { - $szokoev=true; - } - } - } else { - $szokoev=false; - } - - if (!$szokoev && $honap==2 && $nap>=24) { - $nap=$nap+1; - } + $ev=date('Y');$honap=date('m');$nap=date('d'); + if ($ev % 4 ==0) {if ($ev % 100 !==0) {$szokoev=true;} else {if ($ev % 400==0) {$szokoev=true;}}} else {$szokoev=false;} + if (!$szokoev && $honap==2 && $nap>=24) {$nap=$nap+1;} $ADAT['nevnap']['ma'] = getNevnap($honap,$nap); $ADAT['nevnap']['holnap'] = getNevnap($honap,$nap+1); diff --git a/mayor-orig/www/policy/public/session/logout-pre.php b/mayor-orig/www/policy/public/session/logout-pre.php index ac344fee..013be18c 100644 --- a/mayor-orig/www/policy/public/session/logout-pre.php +++ b/mayor-orig/www/policy/public/session/logout-pre.php @@ -21,6 +21,7 @@ session_destroy(); session_write_close(); setcookie(session_name(),'',0,'/'); + setcookie($sessionID,'',0,'/'); session_regenerate_id(true); header('Location: index.php'); } -- cgit v1.2.3