|
|
@@ -69,13 +69,11 @@ class Route_Notify extends RouteBase {
|
|
|
}
|
|
|
|
|
|
$urlParts = array();// index.php?_route=Notify&_task=generateUserReminders&usrLogin=magdalena.cichosz&reminder[]=msgs
|
|
|
- $urlParts[] = Request::getPathUri();
|
|
|
- $urlParts[] = 'index.php?_route=Notify&_task=generateUserReminders';
|
|
|
- $urlParts[] = "&usrLogin={$usrLogin}";
|
|
|
- foreach ($notifyTypeList as $reminderType) {
|
|
|
- $urlParts[] = "&reminder[]={$reminderType}";
|
|
|
- }
|
|
|
- $previewLink = implode('', $urlParts);
|
|
|
+ $urlQuery = array('_route' => "Notify"
|
|
|
+ , '_task' => 'generateUserReminders'
|
|
|
+ , 'usrLogin' => $usrLogin
|
|
|
+ , 'reminder' => array_values($notifyTypeList));
|
|
|
+ $previewLink = Request::getUriDirName() . "/index.php?" . http_build_query($urlQuery);
|
|
|
|
|
|
$lastSentDate = 'brak';// TODO: getLastSendData($usrLogin);
|
|
|
$typeSpecialUserLogin = TypespecialVariable::getInstance(-1, '__USER_LOGIN');
|
|
|
@@ -128,17 +126,11 @@ class Route_Notify extends RouteBase {
|
|
|
</div>
|
|
|
<script>
|
|
|
function refreshPreview() {
|
|
|
-// $urlParts[] = Request::getPathUri();
|
|
|
-// $urlParts[] = 'index.php?_route=Notify&_task=generateUserReminders';
|
|
|
-// $urlParts[] = "&usrLogin={$usrLogin}";
|
|
|
-// foreach ($notifyTypeList as $reminderType) {
|
|
|
-// $urlParts[] = "&reminder[]={$reminderType}";
|
|
|
-// }
|
|
|
var frm = document.getElementById('reminderPanelForm'),
|
|
|
- baseUrl = '<?php echo Request::getPathUri(); ?>',
|
|
|
+ baseUrl = '<?php echo Request::getUriDirName(); ?>',
|
|
|
previewLink = '';
|
|
|
|
|
|
- previewLink = baseUrl + 'index.php?_route=Notify&_task=generateUserReminders';
|
|
|
+ previewLink = baseUrl + '/index.php?_route=Notify&_task=generateUserReminders';
|
|
|
previewLink += '&usrLogin=' + frm['usrLogin'].value;
|
|
|
for (var i in frm['reminder[]']) {
|
|
|
console.log('frm[reminder[]]['+i+']', frm['reminder[]'][i].value, ' checked:', frm['reminder[]'][i].checked);
|
|
|
@@ -389,14 +381,9 @@ function refreshPreview() {
|
|
|
}
|
|
|
if (!$idTblZasob || !$idRecord) return '#';
|
|
|
|
|
|
- $urlParts = array();
|
|
|
- $urlParts[] = (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']))? $_SERVER['HTTP_X_FORWARDED_PROTO'] : V::get('REQUEST_SCHEME', 'http', $_SERVER);
|
|
|
- $urlParts[] = '://';
|
|
|
- $urlParts[] = $_SERVER['SERVER_NAME'];
|
|
|
- $urlParts[] = $_SERVER['SCRIPT_URL'];
|
|
|
- // https://biuro.biall-net.pl/dev-pl/se-master/index.php?MENU_INIT=VIEWTABLE_AJAX&ZASOB_ID=1466#EDIT/3954
|
|
|
- $urlParts[] = "?MENU_INIT=VIEWTABLE_AJAX&ZASOB_ID={$idTblZasob}#EDIT/{$idRecord}";
|
|
|
- return implode("", $urlParts);
|
|
|
+ $urlQuery = array('MENU_INIT' => "VIEWTABLE_AJAX"
|
|
|
+ , 'ZASOB_ID' => $idTblZasob);
|
|
|
+ return Request::getUriDirName() . "/index.php?" . http_build_query($urlQuery) . "#EDIT/{$idRecord}";
|
|
|
}
|
|
|
|
|
|
public function readMsgLink($usrLogin, $todo) {
|
|
|
@@ -407,14 +394,11 @@ function refreshPreview() {
|
|
|
if (!$idMsg) return '#' . json_encode($todo);
|
|
|
if (!$idMsg) return '#';
|
|
|
|
|
|
- $urlParts = array();
|
|
|
- $urlParts[] = Request::getPathUri();
|
|
|
- $urlParts[] = 'index.php';
|
|
|
- $urlParts[] = "?_route=UserMsgs";
|
|
|
- $urlParts[] = "&_task=read";
|
|
|
- $urlParts[] = "&usrLogin={$usrLogin}";
|
|
|
- $urlParts[] = "&id={$idMsg}";
|
|
|
- return implode("", $urlParts);
|
|
|
+ $urlQuery = array('_route' => "UserMsgs"
|
|
|
+ , '_task' => 'read'
|
|
|
+ , 'usrLogin' => $usrLogin
|
|
|
+ , 'id' => $idMsg);
|
|
|
+ return Request::getUriDirName() . "/index.php?" . http_build_query($urlQuery);
|
|
|
}
|
|
|
|
|
|
public function inlineCss($cssSelector) {
|