@@ -34,9 +34,9 @@ |
||
34 | 34 | if ($_POST['mode'] === 'add') { |
35 | 35 | $event = $eventHandler->getEvent((int)$_POST['event'], $xoopsUser); |
36 | 36 | $eventNotMemberHandler->createEventNotMember(array( |
37 | - 'event_id' => (int)$_POST['event'], |
|
38 | - 'uid' => $xoopsUser->getVar('uid'), |
|
39 | - )); |
|
37 | + 'event_id' => (int)$_POST['event'], |
|
38 | + 'uid' => $xoopsUser->getVar('uid'), |
|
39 | + )); |
|
40 | 40 | sendMail2member($mode, $event_id, $member_uid, _MD_EXTCAL_SUBJECT_3, _MD_EXTCAL_MSG_3); |
41 | 41 | $rediredtMessage = _MD_EXTCAL_WHOSNOT_GOING_ADDED_TO_EVENT; |
42 | 42 |
@@ -1,10 +1,10 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include __DIR__ . '/../../mainfile.php'; |
|
3 | +include __DIR__.'/../../mainfile.php'; |
|
4 | 4 | |
5 | -include_once __DIR__ . '/include/constantes.php'; |
|
6 | -include_once __DIR__ . '/include/mail_fnc.php'; |
|
7 | -include_once __DIR__ . '/class/utilities.php'; |
|
5 | +include_once __DIR__.'/include/constantes.php'; |
|
6 | +include_once __DIR__.'/include/mail_fnc.php'; |
|
7 | +include_once __DIR__.'/class/utilities.php'; |
|
8 | 8 | |
9 | 9 | /* |
10 | 10 | ext_echoArray($_POST); |
@@ -21,20 +21,20 @@ discard block |
||
21 | 21 | $member_uid = $xoopsUser->getVar('uid'); |
22 | 22 | |
23 | 23 | if (!$GLOBALS['xoopsSecurity']->check()) { |
24 | - redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
24 | + redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | if ($xoopsUser && $xoopsModuleConfig['whosnot_going']) { |
28 | 28 | // If param are right |
29 | - if ((int)$_POST['event'] > 0 && ($_POST['mode'] === 'add' || $_POST['mode'] === 'remove')) { |
|
29 | + if ((int) $_POST['event'] > 0 && ($_POST['mode'] === 'add' || $_POST['mode'] === 'remove')) { |
|
30 | 30 | $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
31 | 31 | $eventNotMemberHandler = xoops_getModuleHandler(_EXTCAL_CLS_NOT_MEMBER, _EXTCAL_MODULE); |
32 | 32 | |
33 | 33 | // If the user have to be added |
34 | 34 | if ($_POST['mode'] === 'add') { |
35 | - $event = $eventHandler->getEvent((int)$_POST['event'], $xoopsUser); |
|
35 | + $event = $eventHandler->getEvent((int) $_POST['event'], $xoopsUser); |
|
36 | 36 | $eventNotMemberHandler->createEventNotMember(array( |
37 | - 'event_id' => (int)$_POST['event'], |
|
37 | + 'event_id' => (int) $_POST['event'], |
|
38 | 38 | 'uid' => $xoopsUser->getVar('uid'), |
39 | 39 | )); |
40 | 40 | sendMail2member($mode, $event_id, $member_uid, _MD_EXTCAL_SUBJECT_3, _MD_EXTCAL_MSG_3); |
@@ -43,12 +43,12 @@ discard block |
||
43 | 43 | // If the user have to be remove |
44 | 44 | } else { |
45 | 45 | if ($_POST['mode'] === 'remove') { |
46 | - $eventNotMemberHandler->deleteEventNotMember(array((int)$_POST['event'], $xoopsUser->getVar('uid'))); |
|
46 | + $eventNotMemberHandler->deleteEventNotMember(array((int) $_POST['event'], $xoopsUser->getVar('uid'))); |
|
47 | 47 | sendMail2member($mode, $event_id, $member_uid, _MD_EXTCAL_SUBJECT_4, _MD_EXTCAL_MSG_4); |
48 | 48 | $rediredtMessage = _MD_EXTCAL_WHOSNOT_GOING_REMOVED_TO_EVENT; |
49 | 49 | } |
50 | 50 | } |
51 | - redirect_header('event.php?event=' . $_POST['event'], 3, $rediredtMessage, false); |
|
51 | + redirect_header('event.php?event='.$_POST['event'], 3, $rediredtMessage, false); |
|
52 | 52 | } else { |
53 | 53 | redirect_header('index.php', 3, _NOPERM, false); |
54 | 54 | } |
@@ -1,14 +1,14 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include __DIR__ . '/../../mainfile.php'; |
|
4 | -include_once __DIR__ . '/include/constantes.php'; |
|
3 | +include __DIR__.'/../../mainfile.php'; |
|
4 | +include_once __DIR__.'/include/constantes.php'; |
|
5 | 5 | |
6 | -include_once XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/calendar.php'; |
|
6 | +include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/calendar.php'; |
|
7 | 7 | |
8 | 8 | if (!isset($_GET['event'])) { |
9 | 9 | $eventId = 0; |
10 | 10 | } else { |
11 | - $eventId = (int)$_GET['event']; |
|
11 | + $eventId = (int) $_GET['event']; |
|
12 | 12 | } |
13 | 13 | $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
14 | 14 | $event = $eventHandler->objectToArray($eventHandler->getEvent($eventId), array('cat_id')); |
@@ -23,136 +23,136 @@ discard block |
||
23 | 23 | // Adding formated date for start and end event |
24 | 24 | $eventHandler->formatEventDate($event, $xoopsModuleConfig['event_date_event']); |
25 | 25 | |
26 | -echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' . "\n"; |
|
27 | -echo '<html xmlns="http://www.w3.org/1999/xhtml">' . "\n"; |
|
28 | -echo '<head>' . "\n"; |
|
29 | -echo '<meta http-equiv="content-type" content="text/html; charset=' . _CHARSET . '" />' . "\n"; |
|
30 | -echo '<title>' . $event['cat']['cat_name'] . ' - ' . $event['event_title'] . '</title>' . "\n"; |
|
31 | -echo '</head>' . "\n"; |
|
32 | -echo '<body onload="window.print()">' . "\n"; |
|
33 | -echo '<table style="border:1px solid black; width:640px;" cellspacing="0" cellspadding="0">' . "\n"; |
|
34 | -echo '<tr>' . "\n"; |
|
35 | -echo '<td colspan="2" style="font-size:1.2em; border:1px solid black;">' . "\n"; |
|
36 | -echo $event['event_title'] . "\n"; |
|
37 | -echo '</td>' . "\n"; |
|
38 | -echo '</tr>' . "\n"; |
|
39 | -echo '<tr>' . "\n"; |
|
40 | -echo '<td style="width:50%; border:1px solid black;">' . "\n"; |
|
41 | -echo '<b>' . $event['cat']['cat_name'] . '</b><br>' . "\n"; |
|
42 | -echo '<span style="font-weight:normal;">' . $event['cat']['cat_desc'] . '</span>' . "\n"; |
|
43 | -echo '</td>' . "\n"; |
|
44 | -echo '<td style="border:1px solid black;">' . "\n"; |
|
26 | +echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'."\n"; |
|
27 | +echo '<html xmlns="http://www.w3.org/1999/xhtml">'."\n"; |
|
28 | +echo '<head>'."\n"; |
|
29 | +echo '<meta http-equiv="content-type" content="text/html; charset='._CHARSET.'" />'."\n"; |
|
30 | +echo '<title>'.$event['cat']['cat_name'].' - '.$event['event_title'].'</title>'."\n"; |
|
31 | +echo '</head>'."\n"; |
|
32 | +echo '<body onload="window.print()">'."\n"; |
|
33 | +echo '<table style="border:1px solid black; width:640px;" cellspacing="0" cellspadding="0">'."\n"; |
|
34 | +echo '<tr>'."\n"; |
|
35 | +echo '<td colspan="2" style="font-size:1.2em; border:1px solid black;">'."\n"; |
|
36 | +echo $event['event_title']."\n"; |
|
37 | +echo '</td>'."\n"; |
|
38 | +echo '</tr>'."\n"; |
|
39 | +echo '<tr>'."\n"; |
|
40 | +echo '<td style="width:50%; border:1px solid black;">'."\n"; |
|
41 | +echo '<b>'.$event['cat']['cat_name'].'</b><br>'."\n"; |
|
42 | +echo '<span style="font-weight:normal;">'.$event['cat']['cat_desc'].'</span>'."\n"; |
|
43 | +echo '</td>'."\n"; |
|
44 | +echo '<td style="border:1px solid black;">'."\n"; |
|
45 | 45 | if (!$event['event_isrecur']) { |
46 | - echo '<b>' . _MD_EXTCAL_START . ' :</b> <span style="font-weight:normal;">' . $event['formated_event_start'] . '</span><br>' . "\n"; |
|
47 | - echo '<b>' . _MD_EXTCAL_END . ' :</b> <span style="font-weight:normal;">' . $event['formated_event_end'] . '</span>' . "\n"; |
|
46 | + echo '<b>'._MD_EXTCAL_START.' :</b> <span style="font-weight:normal;">'.$event['formated_event_start'].'</span><br>'."\n"; |
|
47 | + echo '<b>'._MD_EXTCAL_END.' :</b> <span style="font-weight:normal;">'.$event['formated_event_end'].'</span>'."\n"; |
|
48 | 48 | } else { |
49 | - echo '<b>' . _MD_EXTCAL_RECCUR_RULE . ' :</b> <span style="font-weight:normal;">' . $event['formated_reccur_rule'] . '</span>' . "\n"; |
|
49 | + echo '<b>'._MD_EXTCAL_RECCUR_RULE.' :</b> <span style="font-weight:normal;">'.$event['formated_reccur_rule'].'</span>'."\n"; |
|
50 | 50 | } |
51 | -echo '</td>' . "\n"; |
|
52 | -echo '</tr>' . "\n"; |
|
51 | +echo '</td>'."\n"; |
|
52 | +echo '</tr>'."\n"; |
|
53 | 53 | |
54 | -echo '<tr>' . "\n"; |
|
54 | +echo '<tr>'."\n"; |
|
55 | 55 | if ($event['event_desc'] != '') { |
56 | - echo '<td style="border:1px solid black;">' . $event['event_desc'] . '</td>' . "\n"; |
|
56 | + echo '<td style="border:1px solid black;">'.$event['event_desc'].'</td>'."\n"; |
|
57 | 57 | } |
58 | 58 | if ($event['event_price'] != '') { |
59 | - echo '<td style="border:1px solid black;">' . _MD_EXTCAL_ETABLISSEMENT_PRICE . $event['event_price'] . ' ' . _MD_EXTCAL_DEVISE2 . '</td>' . "\n"; |
|
59 | + echo '<td style="border:1px solid black;">'._MD_EXTCAL_ETABLISSEMENT_PRICE.$event['event_price'].' '._MD_EXTCAL_DEVISE2.'</td>'."\n"; |
|
60 | 60 | } |
61 | -echo '</tr>' . "\n"; |
|
61 | +echo '</tr>'."\n"; |
|
62 | 62 | |
63 | 63 | //show contact info |
64 | 64 | if ($event['event_contact'] != '') { |
65 | - echo '<tr>' . "\n"; |
|
66 | - echo '<td style="border:1px solid black;">' . "\n"; |
|
67 | - echo '<b>' . _MD_EXTCAL_CONTACT_INFO . '</b><br>' . "\n"; |
|
68 | - echo '<span style="font-weight:normal;">' . $event['event_organisateur'] . '<br>' . "\n"; |
|
69 | - echo '<span style="font-weight:normal;">' . $event['event_contact'] . '<br>' . "\n"; |
|
70 | - echo $event['event_address'] . '</span>' . "\n"; |
|
71 | - echo '</td>' . "\n"; |
|
72 | - echo '<td style="border:1px solid black;">' . "\n"; |
|
73 | - echo '<b>' . _MD_EXTCAL_EMAIL . ' :</b> <a href="mailto:' . $event['event_email'] . '">' . $event['event_email'] . '</a><br>' . "\n"; |
|
74 | - echo '<b>' . _MD_EXTCAL_URL . ' :</b> <a href="' . $event['event_url'] . '">' . $event['event_url'] . '</a>' . "\n"; |
|
75 | - echo '</td>' . "\n"; |
|
76 | - echo '</tr>' . "\n"; |
|
65 | + echo '<tr>'."\n"; |
|
66 | + echo '<td style="border:1px solid black;">'."\n"; |
|
67 | + echo '<b>'._MD_EXTCAL_CONTACT_INFO.'</b><br>'."\n"; |
|
68 | + echo '<span style="font-weight:normal;">'.$event['event_organisateur'].'<br>'."\n"; |
|
69 | + echo '<span style="font-weight:normal;">'.$event['event_contact'].'<br>'."\n"; |
|
70 | + echo $event['event_address'].'</span>'."\n"; |
|
71 | + echo '</td>'."\n"; |
|
72 | + echo '<td style="border:1px solid black;">'."\n"; |
|
73 | + echo '<b>'._MD_EXTCAL_EMAIL.' :</b> <a href="mailto:'.$event['event_email'].'">'.$event['event_email'].'</a><br>'."\n"; |
|
74 | + echo '<b>'._MD_EXTCAL_URL.' :</b> <a href="'.$event['event_url'].'">'.$event['event_url'].'</a>'."\n"; |
|
75 | + echo '</td>'."\n"; |
|
76 | + echo '</tr>'."\n"; |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | //show location |
80 | 80 | if ($event['event_etablissement'] = 0) { |
81 | - echo '<tr>' . "\n"; |
|
81 | + echo '<tr>'."\n"; |
|
82 | 82 | |
83 | 83 | // echo($location['nom']); |
84 | 84 | // var_dump($location); |
85 | 85 | // var_dump($event); |
86 | 86 | |
87 | - echo '<td style="border:1px solid black;">' . "\n"; |
|
88 | - echo '<b>' . _MD_EXTCAL_ETABLISSEMENT . '</b>' . "\n"; |
|
87 | + echo '<td style="border:1px solid black;">'."\n"; |
|
88 | + echo '<b>'._MD_EXTCAL_ETABLISSEMENT.'</b>'."\n"; |
|
89 | 89 | if ($location['categorie'] != '') { |
90 | - echo '<span style="font-weight:normal;"> (' . $location['categorie'] . ') <br>' . "\n"; |
|
90 | + echo '<span style="font-weight:normal;"> ('.$location['categorie'].') <br>'."\n"; |
|
91 | 91 | } |
92 | 92 | if ($location['logo'] != '') { |
93 | - echo '<img align=right style="border:1px solid #FFFFFF;margin-right:6px" src=' . XOOPS_URL . '/uploads/extcal/etablissement/' . $location['logo'] . ' height="75px" />' . '' . "\n"; |
|
93 | + echo '<img align=right style="border:1px solid #FFFFFF;margin-right:6px" src='.XOOPS_URL.'/uploads/extcal/etablissement/'.$location['logo'].' height="75px" />'.''."\n"; |
|
94 | 94 | } |
95 | 95 | |
96 | - echo '<span style="font-weight:normal;">' . $location['nom'] . '<br>' . "\n"; |
|
97 | - echo $location['description'] . '<br>' . "\n"; |
|
98 | - echo $location['adresse'] . '</span> <br>' . "\n"; |
|
96 | + echo '<span style="font-weight:normal;">'.$location['nom'].'<br>'."\n"; |
|
97 | + echo $location['description'].'<br>'."\n"; |
|
98 | + echo $location['adresse'].'</span> <br>'."\n"; |
|
99 | 99 | if ($location['adresse2'] != '') { |
100 | - echo $location['adresse2'] . '</span> <br>' . "\n"; |
|
100 | + echo $location['adresse2'].'</span> <br>'."\n"; |
|
101 | 101 | } |
102 | - echo $location['ville'] . "\n"; |
|
103 | - echo $location['cp'] . '<br>' . "\n"; |
|
102 | + echo $location['ville']."\n"; |
|
103 | + echo $location['cp'].'<br>'."\n"; |
|
104 | 104 | |
105 | 105 | if ($location['horaires'] != '') { |
106 | - echo $location['horaires'] . '</span> <br>' . "\n"; |
|
106 | + echo $location['horaires'].'</span> <br>'."\n"; |
|
107 | 107 | } |
108 | 108 | |
109 | 109 | if ($location['divers'] != '') { |
110 | - echo $location['divers'] . '</span> <br>' . "\n"; |
|
110 | + echo $location['divers'].'</span> <br>'."\n"; |
|
111 | 111 | } |
112 | 112 | |
113 | 113 | if ($location['tarifs'] != '') { |
114 | - echo $location['tarifs'] . '</span> ' . _MD_EXTCAL_DEVISE2 . "\n"; |
|
114 | + echo $location['tarifs'].'</span> '._MD_EXTCAL_DEVISE2."\n"; |
|
115 | 115 | } |
116 | 116 | |
117 | - echo '</td>' . "\n"; |
|
118 | - echo '<td style="border:1px solid black;">' . "\n"; |
|
117 | + echo '</td>'."\n"; |
|
118 | + echo '<td style="border:1px solid black;">'."\n"; |
|
119 | 119 | |
120 | 120 | if ($location['tel_fixe'] != '') { |
121 | - echo '<b>' . _MD_EXTCAL_ETABLISSEMENT_TEL_FIXE . ' :</b>' . $location['tel_fixe'] . '<br>' . "\n"; |
|
121 | + echo '<b>'._MD_EXTCAL_ETABLISSEMENT_TEL_FIXE.' :</b>'.$location['tel_fixe'].'<br>'."\n"; |
|
122 | 122 | } |
123 | 123 | if ($location['tel_portable'] != '') { |
124 | - echo '<b>' . _MD_EXTCAL_ETABLISSEMENT_TEL_PORTABLE . ' :</b>' . $location['tel_portable'] . '<br>' . "\n"; |
|
124 | + echo '<b>'._MD_EXTCAL_ETABLISSEMENT_TEL_PORTABLE.' :</b>'.$location['tel_portable'].'<br>'."\n"; |
|
125 | 125 | } |
126 | 126 | |
127 | - echo '<b>' . _MD_EXTCAL_EMAIL . ' :</b> <a href="mailto:' . $location['mail'] . '">' . $location['mail'] . '</a><br>' . "\n"; |
|
128 | - echo '<b>' . _MD_EXTCAL_URL . ' :</b> <a href="' . $location['site'] . '">' . $location['site'] . '</a>' . '<br>' . "\n"; |
|
129 | - echo '<b>' . _MD_EXTCAL_ETABLISSEMENT_MAP . ' :</b> <a href="' . $location['map'] . '">' . _MD_EXTCAL_ETABLISSEMENT_MAP2 . '</a>' . "\n"; |
|
127 | + echo '<b>'._MD_EXTCAL_EMAIL.' :</b> <a href="mailto:'.$location['mail'].'">'.$location['mail'].'</a><br>'."\n"; |
|
128 | + echo '<b>'._MD_EXTCAL_URL.' :</b> <a href="'.$location['site'].'">'.$location['site'].'</a>'.'<br>'."\n"; |
|
129 | + echo '<b>'._MD_EXTCAL_ETABLISSEMENT_MAP.' :</b> <a href="'.$location['map'].'">'._MD_EXTCAL_ETABLISSEMENT_MAP2.'</a>'."\n"; |
|
130 | 130 | |
131 | - echo '</td>' . "\n"; |
|
132 | - echo '</tr>' . "\n"; |
|
131 | + echo '</td>'."\n"; |
|
132 | + echo '</tr>'."\n"; |
|
133 | 133 | } |
134 | 134 | //show images |
135 | 135 | |
136 | 136 | if (($event['event_picture1'] != '') || ($event['event_picture2'] != '')) { |
137 | - echo '<tr>' . "\n"; |
|
137 | + echo '<tr>'."\n"; |
|
138 | 138 | if ($event['event_picture1'] != '') { |
139 | - echo '<td style="border:1px solid black;">' . "\n"; |
|
140 | - echo '<img align=left style="border:1px solid #FFFFFF;margin-right:6px" src=' . XOOPS_URL . '/uploads/extcal/' . $event['event_picture1'] . ' height="100px" />' . '' . "\n"; |
|
141 | - echo '</td>' . "\n"; |
|
139 | + echo '<td style="border:1px solid black;">'."\n"; |
|
140 | + echo '<img align=left style="border:1px solid #FFFFFF;margin-right:6px" src='.XOOPS_URL.'/uploads/extcal/'.$event['event_picture1'].' height="100px" />'.''."\n"; |
|
141 | + echo '</td>'."\n"; |
|
142 | 142 | } |
143 | 143 | if ($event['event_picture2'] != '') { |
144 | - echo '<td style="border:1px solid black;">' . "\n"; |
|
145 | - echo '<img align=left style="border:1px solid #FFFFFF;margin-right:6px" src=' . XOOPS_URL . '/uploads/extcal/' . $event['event_picture2'] . ' height="100px" />' . '' . "\n"; |
|
146 | - echo '</td>' . "\n"; |
|
144 | + echo '<td style="border:1px solid black;">'."\n"; |
|
145 | + echo '<img align=left style="border:1px solid #FFFFFF;margin-right:6px" src='.XOOPS_URL.'/uploads/extcal/'.$event['event_picture2'].' height="100px" />'.''."\n"; |
|
146 | + echo '</td>'."\n"; |
|
147 | 147 | } |
148 | - echo '</tr>' . "\n"; |
|
148 | + echo '</tr>'."\n"; |
|
149 | 149 | } |
150 | 150 | //-------------------- |
151 | 151 | |
152 | -echo '</table><br>' . "\n"; |
|
152 | +echo '</table><br>'."\n"; |
|
153 | 153 | echo '<div style="text-align:center; width:640px;">'; |
154 | -echo $xoopsConfig['sitename'] . ' - ' . $xoopsConfig['slogan'] . '<br>'; |
|
155 | -echo '<a href="' . XOOPS_URL . '/modules/extcal/event.php?event=' . $event['event_id'] . '">' . XOOPS_URL . '/modules/extcal/event.php?event=' . $event['event_id'] . '</a>'; |
|
154 | +echo $xoopsConfig['sitename'].' - '.$xoopsConfig['slogan'].'<br>'; |
|
155 | +echo '<a href="'.XOOPS_URL.'/modules/extcal/event.php?event='.$event['event_id'].'">'.XOOPS_URL.'/modules/extcal/event.php?event='.$event['event_id'].'</a>'; |
|
156 | 156 | echo '</div>'; |
157 | -echo '</body>' . "\n"; |
|
158 | -echo '</html>' . "\n"; |
|
157 | +echo '</body>'."\n"; |
|
158 | +echo '</html>'."\n"; |
@@ -1,10 +1,10 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include __DIR__ . '/../../mainfile.php'; |
|
4 | -include_once __DIR__ . '/include/constantes.php'; |
|
3 | +include __DIR__.'/../../mainfile.php'; |
|
4 | +include_once __DIR__.'/include/constantes.php'; |
|
5 | 5 | $params = array('view' => _EXTCAL_NAV_NEW_EVENT, 'file' => _EXTCAL_FILE_NEW_EVENT); |
6 | 6 | $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl"; |
7 | -include_once __DIR__ . '/header.php'; |
|
7 | +include_once __DIR__.'/header.php'; |
|
8 | 8 | |
9 | 9 | /* ========================================================================== */ |
10 | 10 | //ext_echoArray($_GET); |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | |
17 | 17 | //exit; |
18 | 18 | if (count($permHandler->getAuthorizedCat($xoopsUser, 'extcal_cat_submit')) > 0) { |
19 | - include XOOPS_ROOT_PATH . '/header.php'; |
|
19 | + include XOOPS_ROOT_PATH.'/header.php'; |
|
20 | 20 | |
21 | 21 | // Title of the page |
22 | 22 | $xoopsTpl->assign('xoops_pagetitle', _MI_EXTCAL_SUBMIT_EVENT); |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | $xoopsTpl->assign('lang', $lang); |
59 | 59 | $xoopsTpl->assign('view', 'newevent'); |
60 | 60 | |
61 | - include XOOPS_ROOT_PATH . '/footer.php'; |
|
61 | + include XOOPS_ROOT_PATH.'/footer.php'; |
|
62 | 62 | } else { |
63 | 63 | redirect_header('index.php', 3); |
64 | 64 | } |
@@ -1,17 +1,17 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include __DIR__ . '/../../mainfile.php'; |
|
4 | -include_once __DIR__ . '/include/constantes.php'; |
|
3 | +include __DIR__.'/../../mainfile.php'; |
|
4 | +include_once __DIR__.'/include/constantes.php'; |
|
5 | 5 | $params = array('view' => _EXTCAL_NAV_AGENDA_DAY, 'file' => _EXTCAL_FILE_AGENDA_DAY); |
6 | 6 | $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl"; |
7 | -include_once __DIR__ . '/header.php'; |
|
7 | +include_once __DIR__.'/header.php'; |
|
8 | 8 | |
9 | 9 | /* ========================================================================== */ |
10 | 10 | //recupe des variables get |
11 | -$year = isset($_GET['year']) ? (int)$_GET['year'] : date('Y'); |
|
12 | -$month = isset($_GET['month']) ? (int)$_GET['month'] : date('n'); |
|
13 | -$day = isset($_GET['day']) ? (int)$_GET['day'] : date('j'); |
|
14 | -$cat = isset($_GET['cat']) ? (int)$_GET['cat'] : 0; |
|
11 | +$year = isset($_GET['year']) ? (int) $_GET['year'] : date('Y'); |
|
12 | +$month = isset($_GET['month']) ? (int) $_GET['month'] : date('n'); |
|
13 | +$day = isset($_GET['day']) ? (int) $_GET['day'] : date('j'); |
|
14 | +$cat = isset($_GET['cat']) ? (int) $_GET['cat'] : 0; |
|
15 | 15 | /* ========================================================================== */ |
16 | 16 | |
17 | 17 | //echo "{$params['view']}-{$year}-{$month}-{$day}<hr>extcal_{$params['view']}.html<br>"; |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | 'nbJours' => $nbJours, |
45 | 45 | 'externalKeys' => 'cat_id', |
46 | 46 | ); |
47 | -$events = $eventHandler->getEventsOnPeriode($criteres); |
|
47 | +$events = $eventHandler->getEventsOnPeriode($criteres); |
|
48 | 48 | /**********************************************************************/ |
49 | 49 | $eventsArray = $events; |
50 | 50 | $startDay = mktime(0, 0, 0, $month, $day, $year); |
@@ -99,21 +99,21 @@ discard block |
||
99 | 99 | |
100 | 100 | $navig = array( |
101 | 101 | 'prev' => array( |
102 | - 'uri' => 'year=' . $pDayCalObj->thisYear() . '&month=' . $pDayCalObj->thisMonth() . '&day=' . $pDayCalObj->thisDay(), |
|
102 | + 'uri' => 'year='.$pDayCalObj->thisYear().'&month='.$pDayCalObj->thisMonth().'&day='.$pDayCalObj->thisDay(), |
|
103 | 103 | 'name' => $extcalTimeHandler->getFormatedDate($xoopsModuleConfig['nav_date_day'], $pDayCalObj->getTimestamp()), |
104 | 104 | ), |
105 | 105 | 'this' => array( |
106 | - 'uri' => 'year=' . $dayCalObj->thisYear() . '&month=' . $dayCalObj->thisMonth() . '&day=' . $dayCalObj->thisDay(), |
|
106 | + 'uri' => 'year='.$dayCalObj->thisYear().'&month='.$dayCalObj->thisMonth().'&day='.$dayCalObj->thisDay(), |
|
107 | 107 | 'name' => $extcalTimeHandler->getFormatedDate($xoopsModuleConfig['nav_date_day'], $dayCalObj->getTimestamp()), |
108 | 108 | ), |
109 | 109 | 'next' => array( |
110 | - 'uri' => 'year=' . $nDayCalObj->thisYear() . '&month=' . $nDayCalObj->thisMonth() . '&day=' . $nDayCalObj->thisDay(), |
|
110 | + 'uri' => 'year='.$nDayCalObj->thisYear().'&month='.$nDayCalObj->thisMonth().'&day='.$nDayCalObj->thisDay(), |
|
111 | 111 | 'name' => $extcalTimeHandler->getFormatedDate($xoopsModuleConfig['nav_date_day'], $nDayCalObj->getTimestamp()), |
112 | 112 | ), |
113 | 113 | ); |
114 | 114 | |
115 | 115 | // Title of the page |
116 | -$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name') . ' ' . $navig['this']['name']); |
|
116 | +$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name').' '.$navig['this']['name']); |
|
117 | 117 | |
118 | 118 | // Assigning navig data to the template |
119 | 119 | $xoopsTpl->assign('navig', $navig); |
@@ -154,4 +154,4 @@ discard block |
||
154 | 154 | $xoopsTpl->assign('lang', $lang); |
155 | 155 | $xoopsTpl->assign('view', 'agendaday'); |
156 | 156 | |
157 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
157 | +include XOOPS_ROOT_PATH.'/footer.php'; |
@@ -24,5 +24,5 @@ |
||
24 | 24 | // along with this program; if not, write to the Free Software // |
25 | 25 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // |
26 | 26 | // ------------------------------------------------------------------------ // |
27 | -include __DIR__ . '/../../mainfile.php'; |
|
28 | -include XOOPS_ROOT_PATH . '/include/comment_reply.php'; |
|
27 | +include __DIR__.'/../../mainfile.php'; |
|
28 | +include XOOPS_ROOT_PATH.'/include/comment_reply.php'; |
@@ -1,10 +1,10 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once __DIR__ . '/../../../include/cp_header.php'; |
|
4 | -include __DIR__ . '/../../../class/xoopsformloader.php'; |
|
5 | -include_once __DIR__ . '/admin_header.php'; |
|
6 | -include_once __DIR__ . '/../class/utilities.php'; |
|
7 | -include_once __DIR__ . '/../include/constantes.php'; |
|
3 | +include_once __DIR__.'/../../../include/cp_header.php'; |
|
4 | +include __DIR__.'/../../../class/xoopsformloader.php'; |
|
5 | +include_once __DIR__.'/admin_header.php'; |
|
6 | +include_once __DIR__.'/../class/utilities.php'; |
|
7 | +include_once __DIR__.'/../include/constantes.php'; |
|
8 | 8 | |
9 | 9 | $gepeto = array_merge($_GET, $_POST); |
10 | 10 | while (list($k, $v) = each($gepeto)) { |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $form->addElement(new XoopsFormText(_AM_EXTCAL_WEIGHT, 'cat_weight', 30, 5, 0), false); |
62 | 62 | $form->addElement(new XoopsFormColorPicker(_AM_EXTCAL_COLOR, 'cat_color', '#FF0000')); |
63 | 63 | |
64 | - $file_path = __DIR__ . '/../assets/css/images'; |
|
64 | + $file_path = __DIR__.'/../assets/css/images'; |
|
65 | 65 | $tf = XoopsLists::getImgListAsArray($file_path); |
66 | 66 | array_unshift($tf, _MD_EXTCAL_NONE); |
67 | 67 | //$xfIcones = new XoopsFormSelect(_AM_EXTCAL_ICONE, "cat_icone", $cat->getVar('cat_icone'), ''); |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | |
74 | 74 | $form->display(); |
75 | 75 | |
76 | - include_once __DIR__ . '/admin_footer.php'; |
|
76 | + include_once __DIR__.'/admin_footer.php'; |
|
77 | 77 | break; |
78 | 78 | |
79 | 79 | case 'edit': |
@@ -86,15 +86,15 @@ discard block |
||
86 | 86 | $cat = $catHandler->getCat($cat_id, true); |
87 | 87 | } |
88 | 88 | |
89 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_EDIT_CATEGORY . '</legend>'; |
|
89 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_EDIT_CATEGORY.'</legend>'; |
|
90 | 90 | |
91 | 91 | $form = new XoopsThemeForm(_AM_EXTCAL_ADD_CATEGORY, 'add_cat', 'cat.php?op=enreg', 'post', true); |
92 | 92 | $form->addElement(new XoopsFormText(_AM_EXTCAL_NAME, 'cat_name', 30, 255, $cat->getVar('cat_name')), true); |
93 | 93 | $form->addElement(new XoopsFormDhtmlTextArea(_AM_EXTCAL_DESCRIPTION, 'cat_desc', $cat->getVar('cat_desc')), false); |
94 | 94 | $form->addElement(new XoopsFormText(_AM_EXTCAL_WEIGHT, 'cat_weight', 30, 5, $cat->getVar('cat_weight')), false); |
95 | - $form->addElement(new XoopsFormColorPicker(_AM_EXTCAL_COLOR, 'cat_color', '#' . $cat->getVar('cat_color'))); |
|
95 | + $form->addElement(new XoopsFormColorPicker(_AM_EXTCAL_COLOR, 'cat_color', '#'.$cat->getVar('cat_color'))); |
|
96 | 96 | |
97 | - $file_path = __DIR__ . '/../assets/css/images'; |
|
97 | + $file_path = __DIR__.'/../assets/css/images'; |
|
98 | 98 | $tf = XoopsLists::getImgListAsArray($file_path); |
99 | 99 | array_unshift($tf, _MD_EXTCAL_NONE); |
100 | 100 | $xfIcones = new XoopsFormSelect(_AM_EXTCAL_ICONE, 'cat_icone', $cat->getVar('cat_icone'), ''); |
@@ -250,6 +250,6 @@ discard block |
||
250 | 250 | //$xoopsTpl->assign("module_dirname", $xoopsModule->getVar("dirname") ); |
251 | 251 | |
252 | 252 | $xoopsTpl->display('db:admin/extcal_admin_cat_list.tpl'); |
253 | - include_once __DIR__ . '/admin_footer.php'; |
|
253 | + include_once __DIR__.'/admin_footer.php'; |
|
254 | 254 | break; |
255 | 255 | } |
@@ -5,8 +5,8 @@ discard block |
||
5 | 5 | $step = $_POST['step']; |
6 | 6 | } |
7 | 7 | |
8 | -include_once __DIR__ . '/../../../include/cp_header.php'; |
|
9 | -include __DIR__ . '/function.php'; |
|
8 | +include_once __DIR__.'/../../../include/cp_header.php'; |
|
9 | +include __DIR__.'/function.php'; |
|
10 | 10 | |
11 | 11 | // Change this variable if you use a cloned version of eXtGallery |
12 | 12 | $localModuleDir = 'extcal'; |
@@ -16,9 +16,9 @@ discard block |
||
16 | 16 | $downloadServer = 'http://downloads.sourceforge.net/zoullou/'; |
17 | 17 | |
18 | 18 | $lastVersion = @file_get_contents($versionFile); |
19 | -$lastVersionString = substr($lastVersion, 0, 1) . '.' . substr($lastVersion, 1, 1) . '.' . substr($lastVersion, 2, 1); |
|
20 | -$moduleFileName = $moduleName . '-' . $lastVersionString . '.tar.gz'; |
|
21 | -$langFileName = $moduleName . '-lang-' . $lastVersionString . '_' . $xoopsConfig['language'] . '.tar.gz'; |
|
19 | +$lastVersionString = substr($lastVersion, 0, 1).'.'.substr($lastVersion, 1, 1).'.'.substr($lastVersion, 2, 1); |
|
20 | +$moduleFileName = $moduleName.'-'.$lastVersionString.'.tar.gz'; |
|
21 | +$langFileName = $moduleName.'-lang-'.$lastVersionString.'_'.$xoopsConfig['language'].'.tar.gz'; |
|
22 | 22 | |
23 | 23 | switch ($step) { |
24 | 24 | case 'download': |
@@ -30,12 +30,12 @@ discard block |
||
30 | 30 | break; |
31 | 31 | } |
32 | 32 | |
33 | - if (!$handle = @fopen($downloadServer . $moduleFileName, 'r')) { |
|
33 | + if (!$handle = @fopen($downloadServer.$moduleFileName, 'r')) { |
|
34 | 34 | printf(_AM_EXTCAL_MD_FILE_DONT_EXIST, $downloadServer, $moduleFileName); |
35 | 35 | xoops_cp_footer(); |
36 | 36 | break; |
37 | 37 | } |
38 | - $localHandle = @fopen(XOOPS_ROOT_PATH . '/uploads/' . $moduleFileName, 'w+'); |
|
38 | + $localHandle = @fopen(XOOPS_ROOT_PATH.'/uploads/'.$moduleFileName, 'w+'); |
|
39 | 39 | |
40 | 40 | // Downlad module archive |
41 | 41 | if ($handle) { |
@@ -49,10 +49,10 @@ discard block |
||
49 | 49 | |
50 | 50 | // English file are included on module package |
51 | 51 | if ($xoopsConfig['language'] !== 'english') { |
52 | - if (!$handle = @fopen($downloadServer . $langFileName, 'r')) { |
|
52 | + if (!$handle = @fopen($downloadServer.$langFileName, 'r')) { |
|
53 | 53 | printf(_AM_EXTCAL_LG_FILE_DONT_EXIST, $downloadServer, $langFileName); |
54 | 54 | } else { |
55 | - $localHandle = @fopen(XOOPS_ROOT_PATH . '/uploads/' . $langFileName, 'w+'); |
|
55 | + $localHandle = @fopen(XOOPS_ROOT_PATH.'/uploads/'.$langFileName, 'w+'); |
|
56 | 56 | // Download language archive |
57 | 57 | if ($handle) { |
58 | 58 | while (!feof($handle)) { |
@@ -75,35 +75,35 @@ discard block |
||
75 | 75 | xoops_cp_header(); |
76 | 76 | adminMenu(); |
77 | 77 | |
78 | - if (!file_exists(XOOPS_ROOT_PATH . '/uploads/' . $moduleFileName)) { |
|
78 | + if (!file_exists(XOOPS_ROOT_PATH.'/uploads/'.$moduleFileName)) { |
|
79 | 79 | echo _AM_EXTCAL_MD_FILE_DONT_EXIST_SHORT; |
80 | 80 | xoops_cp_footer(); |
81 | 81 | |
82 | 82 | break; |
83 | 83 | } |
84 | 84 | |
85 | - $gPcltarLibDir = XOOPS_ROOT_PATH . '/modules/' . $localModuleDir . '/class'; |
|
86 | - include __DIR__ . '/../class/pcltar.lib.php'; |
|
85 | + $gPcltarLibDir = XOOPS_ROOT_PATH.'/modules/'.$localModuleDir.'/class'; |
|
86 | + include __DIR__.'/../class/pcltar.lib.php'; |
|
87 | 87 | |
88 | 88 | //TrOn(5); |
89 | 89 | |
90 | 90 | // Extract module files |
91 | - PclTarExtract(XOOPS_ROOT_PATH . '/uploads/' . $moduleFileName, XOOPS_ROOT_PATH . '/modules/' . $localModuleDir . '/', 'modules/' . $moduleName . '/'); |
|
91 | + PclTarExtract(XOOPS_ROOT_PATH.'/uploads/'.$moduleFileName, XOOPS_ROOT_PATH.'/modules/'.$localModuleDir.'/', 'modules/'.$moduleName.'/'); |
|
92 | 92 | // Delete downloaded module's files |
93 | - unlink(XOOPS_ROOT_PATH . '/uploads/' . $moduleFileName); |
|
93 | + unlink(XOOPS_ROOT_PATH.'/uploads/'.$moduleFileName); |
|
94 | 94 | |
95 | - if (file_exists(XOOPS_ROOT_PATH . '/uploads/' . $langFileName)) { |
|
95 | + if (file_exists(XOOPS_ROOT_PATH.'/uploads/'.$langFileName)) { |
|
96 | 96 | // Extract language files |
97 | - PclTarExtract(XOOPS_ROOT_PATH . '/uploads/' . $langFileName, XOOPS_ROOT_PATH . '/modules/' . $localModuleDir . '/', 'modules/' . $moduleName . '/'); |
|
97 | + PclTarExtract(XOOPS_ROOT_PATH.'/uploads/'.$langFileName, XOOPS_ROOT_PATH.'/modules/'.$localModuleDir.'/', 'modules/'.$moduleName.'/'); |
|
98 | 98 | // Delete downloaded module's files |
99 | - unlink(XOOPS_ROOT_PATH . '/uploads/' . $langFileName); |
|
99 | + unlink(XOOPS_ROOT_PATH.'/uploads/'.$langFileName); |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | // Delete template_c file |
103 | - if ($handle = opendir(XOOPS_ROOT_PATH . '/templates_c')) { |
|
103 | + if ($handle = opendir(XOOPS_ROOT_PATH.'/templates_c')) { |
|
104 | 104 | while (false !== ($file = readdir($handle))) { |
105 | 105 | if ($file !== '.' && $file !== '..' && $file !== 'index.html') { |
106 | - unlink(XOOPS_ROOT_PATH . '/templates_c/' . $file); |
|
106 | + unlink(XOOPS_ROOT_PATH.'/templates_c/'.$file); |
|
107 | 107 | } |
108 | 108 | } |
109 | 109 | |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | } |
112 | 112 | //TrDisplay(); |
113 | 113 | |
114 | - xoops_confirm(array('dirname' => $localModuleDir, 'op' => 'update_ok', 'fct' => 'modulesadmin'), XOOPS_URL . '/modules/system/admin.php', _AM_EXTCAL_INSTALL_DONE, _AM_EXTCAL_UPDATE); |
|
114 | + xoops_confirm(array('dirname' => $localModuleDir, 'op' => 'update_ok', 'fct' => 'modulesadmin'), XOOPS_URL.'/modules/system/admin.php', _AM_EXTCAL_INSTALL_DONE, _AM_EXTCAL_UPDATE); |
|
115 | 115 | |
116 | 116 | xoops_cp_footer(); |
117 | 117 |
@@ -51,176 +51,194 @@ discard block |
||
51 | 51 | |
52 | 52 | switch ($op) { |
53 | 53 | |
54 | - case 'enreg': |
|
55 | - |
|
56 | - $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
|
57 | - $fileHandler = xoops_getModuleHandler(_EXTCAL_CLS_FILE, _EXTCAL_MODULE); |
|
58 | - // $t = print_r($_POST,true); |
|
59 | - // echo "<pre>{$t}</pre><br>"; |
|
60 | - // exit; |
|
61 | - // If the date format is wrong |
|
62 | - // if ( |
|
63 | - // !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_start']['date']) |
|
64 | - // || !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_end']['date']) |
|
65 | - // ) { |
|
66 | - // redirect_header( |
|
67 | - // 'event.php', 3, _MD_EXTCAL_WRONG_DATE_FORMAT . "<br>" |
|
68 | - // . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()) |
|
69 | - // ); |
|
70 | - // exit; |
|
71 | - // } |
|
72 | - |
|
73 | - //exit; |
|
74 | - /////////////////////////////////////////////////////////////////////////////// |
|
75 | - ExtcalUtilities::extcal_loadImg($_REQUEST, $event_picture1, $event_picture2); |
|
76 | - /////////////////////////////////////////////////////////////////////////////// |
|
77 | - $data = array( |
|
78 | - 'event_title' => $_POST['event_title'], |
|
79 | - 'cat_id' => $_POST['cat_id'], |
|
80 | - 'event_desc' => $_POST['event_desc'], |
|
81 | - 'event_nbmember' => $_POST['event_nbmember'], |
|
82 | - 'event_organisateur' => $_POST['event_organisateur'], |
|
83 | - 'event_contact' => $_POST['event_contact'], |
|
84 | - 'event_url' => $_POST['event_url'], |
|
85 | - 'event_email' => $_POST['event_email'], |
|
86 | - 'event_address' => $_POST['event_address'], |
|
87 | - 'event_approved' => 1, |
|
88 | - 'event_start' => $_POST['event_start'], |
|
89 | - 'have_end' => $_POST['have_end'], |
|
90 | - 'event_end' => $_POST['event_end'], |
|
91 | - 'event_picture1' => @$event_picture1, |
|
92 | - 'event_picture2' => @$event_picture2, |
|
93 | - 'event_price' => @$_POST['event_price'], |
|
94 | - 'event_etablissement' => $_POST['event_etablissement'], |
|
95 | - 'dohtml' => $extcalConfig['allow_html'], |
|
96 | - 'event_icone' => $_POST['event_icone'], |
|
97 | - ); |
|
98 | - |
|
99 | - // Event edited |
|
100 | - if (isset($_POST['event_id'])) { |
|
101 | - if (!$eventHandler->modifyEvent($_POST['event_id'], $data)) { |
|
102 | - redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDIT_FAILED, false); |
|
54 | + case 'enreg': |
|
55 | + |
|
56 | + $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
|
57 | + $fileHandler = xoops_getModuleHandler(_EXTCAL_CLS_FILE, _EXTCAL_MODULE); |
|
58 | + // $t = print_r($_POST,true); |
|
59 | + // echo "<pre>{$t}</pre><br>"; |
|
60 | + // exit; |
|
61 | + // If the date format is wrong |
|
62 | + // if ( |
|
63 | + // !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_start']['date']) |
|
64 | + // || !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_end']['date']) |
|
65 | + // ) { |
|
66 | + // redirect_header( |
|
67 | + // 'event.php', 3, _MD_EXTCAL_WRONG_DATE_FORMAT . "<br>" |
|
68 | + // . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()) |
|
69 | + // ); |
|
70 | + // exit; |
|
71 | + // } |
|
72 | + |
|
73 | + //exit; |
|
74 | + /////////////////////////////////////////////////////////////////////////////// |
|
75 | + ExtcalUtilities::extcal_loadImg($_REQUEST, $event_picture1, $event_picture2); |
|
76 | + /////////////////////////////////////////////////////////////////////////////// |
|
77 | + $data = array( |
|
78 | + 'event_title' => $_POST['event_title'], |
|
79 | + 'cat_id' => $_POST['cat_id'], |
|
80 | + 'event_desc' => $_POST['event_desc'], |
|
81 | + 'event_nbmember' => $_POST['event_nbmember'], |
|
82 | + 'event_organisateur' => $_POST['event_organisateur'], |
|
83 | + 'event_contact' => $_POST['event_contact'], |
|
84 | + 'event_url' => $_POST['event_url'], |
|
85 | + 'event_email' => $_POST['event_email'], |
|
86 | + 'event_address' => $_POST['event_address'], |
|
87 | + 'event_approved' => 1, |
|
88 | + 'event_start' => $_POST['event_start'], |
|
89 | + 'have_end' => $_POST['have_end'], |
|
90 | + 'event_end' => $_POST['event_end'], |
|
91 | + 'event_picture1' => @$event_picture1, |
|
92 | + 'event_picture2' => @$event_picture2, |
|
93 | + 'event_price' => @$_POST['event_price'], |
|
94 | + 'event_etablissement' => $_POST['event_etablissement'], |
|
95 | + 'dohtml' => $extcalConfig['allow_html'], |
|
96 | + 'event_icone' => $_POST['event_icone'], |
|
97 | + ); |
|
98 | + |
|
99 | + // Event edited |
|
100 | + if (isset($_POST['event_id'])) { |
|
101 | + if (!$eventHandler->modifyEvent($_POST['event_id'], $data)) { |
|
102 | + redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDIT_FAILED, false); |
|
103 | + } else { |
|
104 | + $fileHandler->createFile((int)$_POST['event_id']); |
|
105 | + redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDITED, false); |
|
106 | + } |
|
107 | + |
|
108 | + // New event |
|
103 | 109 | } else { |
104 | - $fileHandler->createFile((int)$_POST['event_id']); |
|
105 | - redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDITED, false); |
|
110 | + $notificationHandler = xoops_getHandler('notification'); |
|
111 | + /** @var ExtcalCatHandler $catHandler */ |
|
112 | + $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE); |
|
113 | + |
|
114 | + $data['event_submitter'] = $xoopsUser ? $xoopsUser->getVar('uid') : 0; |
|
115 | + $data['event_submitdate'] = time(); |
|
116 | + |
|
117 | + if ($eventHandler->createEvent($data, $_POST)) { |
|
118 | + $fileHandler->createFile($eventHandler->getInsertId()); |
|
119 | + $cat = $catHandler->getCat($_POST['cat_id'], $xoopsUser, 'all'); |
|
120 | + $notificationHandler->triggerEvent('global', 0, 'new_event', array('EVENT_TITLE' => $_POST['event_title'])); |
|
121 | + $notificationHandler->triggerEvent('cat', $_POST['cat_id'], 'new_event_cat', array( |
|
122 | + 'EVENT_TITLE' => $_POST['event_title'], |
|
123 | + 'CAT_NAME' => $cat->getVar('cat_name'), |
|
124 | + )); |
|
125 | + redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATED, false); |
|
126 | + } else { |
|
127 | + redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATE_FAILED, false); |
|
128 | + } |
|
106 | 129 | } |
130 | + break; |
|
107 | 131 | |
108 | - // New event |
|
109 | - } else { |
|
110 | - $notificationHandler = xoops_getHandler('notification'); |
|
111 | - /** @var ExtcalCatHandler $catHandler */ |
|
112 | - $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE); |
|
113 | - |
|
114 | - $data['event_submitter'] = $xoopsUser ? $xoopsUser->getVar('uid') : 0; |
|
115 | - $data['event_submitdate'] = time(); |
|
116 | - |
|
117 | - if ($eventHandler->createEvent($data, $_POST)) { |
|
118 | - $fileHandler->createFile($eventHandler->getInsertId()); |
|
119 | - $cat = $catHandler->getCat($_POST['cat_id'], $xoopsUser, 'all'); |
|
120 | - $notificationHandler->triggerEvent('global', 0, 'new_event', array('EVENT_TITLE' => $_POST['event_title'])); |
|
121 | - $notificationHandler->triggerEvent('cat', $_POST['cat_id'], 'new_event_cat', array( |
|
122 | - 'EVENT_TITLE' => $_POST['event_title'], |
|
123 | - 'CAT_NAME' => $cat->getVar('cat_name'), |
|
124 | - )); |
|
125 | - redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATED, false); |
|
126 | - } else { |
|
127 | - redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATE_FAILED, false); |
|
132 | + case 'clone': /* sur validation du formulaire */ |
|
133 | + case 'modify': |
|
134 | + $action = (($op === 'clone') ? 'clone' : 'edit'); |
|
135 | + xoops_cp_header(); |
|
136 | + //================================================ |
|
137 | + // include_once (XOOPS_ROOT_PATH . '/class/xoopsform/tc_calendar/formtccalendar.php'); |
|
138 | + // |
|
139 | + // // Call the calendar constructor - use the desired form and format, according to the instructions/samples provided on triconsole.com |
|
140 | + // $dateBirthday = new XoopsTcCalendar("datez1", true, false); |
|
141 | + // //$dateBirthday->setIcon("/images/iconCalendar.gif"); |
|
142 | + // $dateBirthday->setIcon("/class/xoopsform/tc_calendar/images/iconCalendar.gif"); |
|
143 | + // //$dateBirthday->rtl=false; |
|
144 | + // $dateBirthday->setAutoHide(false); |
|
145 | + // |
|
146 | + // //$myCalendar->setDate(date('d'), date('m'), date('Y')); |
|
147 | + // //$dateBirthday->setDate($p['date1_day'], $p['date1_month'], $p['date1_year']); |
|
148 | + // $dateBirthday->setDate(date('d'), date('m'), date('Y')); |
|
149 | + // |
|
150 | + // $dateBirthday->setPath(XOOPS_URL . "/class/xoopsform/tc_calendar/"); |
|
151 | + // $dateBirthday->zindex = 150; //default 1 |
|
152 | + // $dateBirthday->setYearInterval(1995, date('Y')); |
|
153 | + // $dateBirthday->dateAllow('1960-03-01', date('Y-m-d')); |
|
154 | + // //$dateBirthday->autoSubmit(true, "calendar"); |
|
155 | + // $dateBirthday->disabledDay("sat"); |
|
156 | + // $dateBirthday->disabledDay("sun"); |
|
157 | + // $dateBirthday->setSpecificDate(array("2011-04-14", "2010-12-25"), 0, 'month'); |
|
158 | + // $dateBirthday->setSpecificDate(array("2011-04-01"), 0, 'year'); |
|
159 | + // $dateBirthday->setAlignment('right', 'bottom'); //optional |
|
160 | + // echo "<table><tr><td>zzzzz</td><td></td><td>"; |
|
161 | + // echo $dateBirthday->render(); |
|
162 | + // echo "</td></tr></table>"; |
|
163 | + //echo $dateBirthday->render(); |
|
164 | + //================================================ |
|
165 | + // @author Gregory Mage (Aka Mage) |
|
166 | + //*************************************************************************************** |
|
167 | + // include_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php"; |
|
168 | + $eventAdmin = new ModuleAdmin(); |
|
169 | + echo $eventAdmin->addNavigation(basename(__FILE__)); |
|
170 | + //*************************************************************************************** |
|
171 | + |
|
172 | + $eventId = $_GET['event_id']; |
|
173 | + $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
|
174 | + |
|
175 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_EDIT_EVENT . '</legend>'; |
|
176 | + |
|
177 | + if ($form = $eventHandler->getEventForm('admin', $action, array('event_id' => $eventId))) { |
|
178 | + $form->display(); |
|
128 | 179 | } |
129 | - } |
|
130 | - break; |
|
131 | - |
|
132 | - case 'clone': /* sur validation du formulaire */ |
|
133 | - case 'modify': |
|
134 | - $action = (($op === 'clone') ? 'clone' : 'edit'); |
|
135 | - xoops_cp_header(); |
|
136 | - //================================================ |
|
137 | - // include_once (XOOPS_ROOT_PATH . '/class/xoopsform/tc_calendar/formtccalendar.php'); |
|
138 | - // |
|
139 | - // // Call the calendar constructor - use the desired form and format, according to the instructions/samples provided on triconsole.com |
|
140 | - // $dateBirthday = new XoopsTcCalendar("datez1", true, false); |
|
141 | - // //$dateBirthday->setIcon("/images/iconCalendar.gif"); |
|
142 | - // $dateBirthday->setIcon("/class/xoopsform/tc_calendar/images/iconCalendar.gif"); |
|
143 | - // //$dateBirthday->rtl=false; |
|
144 | - // $dateBirthday->setAutoHide(false); |
|
145 | - // |
|
146 | - // //$myCalendar->setDate(date('d'), date('m'), date('Y')); |
|
147 | - // //$dateBirthday->setDate($p['date1_day'], $p['date1_month'], $p['date1_year']); |
|
148 | - // $dateBirthday->setDate(date('d'), date('m'), date('Y')); |
|
149 | - // |
|
150 | - // $dateBirthday->setPath(XOOPS_URL . "/class/xoopsform/tc_calendar/"); |
|
151 | - // $dateBirthday->zindex = 150; //default 1 |
|
152 | - // $dateBirthday->setYearInterval(1995, date('Y')); |
|
153 | - // $dateBirthday->dateAllow('1960-03-01', date('Y-m-d')); |
|
154 | - // //$dateBirthday->autoSubmit(true, "calendar"); |
|
155 | - // $dateBirthday->disabledDay("sat"); |
|
156 | - // $dateBirthday->disabledDay("sun"); |
|
157 | - // $dateBirthday->setSpecificDate(array("2011-04-14", "2010-12-25"), 0, 'month'); |
|
158 | - // $dateBirthday->setSpecificDate(array("2011-04-01"), 0, 'year'); |
|
159 | - // $dateBirthday->setAlignment('right', 'bottom'); //optional |
|
160 | - // echo "<table><tr><td>zzzzz</td><td></td><td>"; |
|
161 | - // echo $dateBirthday->render(); |
|
162 | - // echo "</td></tr></table>"; |
|
163 | - //echo $dateBirthday->render(); |
|
164 | - //================================================ |
|
165 | - // @author Gregory Mage (Aka Mage) |
|
166 | - //*************************************************************************************** |
|
167 | - // include_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php"; |
|
168 | - $eventAdmin = new ModuleAdmin(); |
|
169 | - echo $eventAdmin->addNavigation(basename(__FILE__)); |
|
170 | - //*************************************************************************************** |
|
171 | - |
|
172 | - $eventId = $_GET['event_id']; |
|
173 | - $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
|
174 | - |
|
175 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_EDIT_EVENT . '</legend>'; |
|
176 | - |
|
177 | - if ($form = $eventHandler->getEventForm('admin', $action, array('event_id' => $eventId))) { |
|
178 | - $form->display(); |
|
179 | - } |
|
180 | 180 | |
181 | - echo '</fieldset><br>'; |
|
181 | + echo '</fieldset><br>'; |
|
182 | 182 | |
183 | - xoops_cp_footer(); |
|
183 | + xoops_cp_footer(); |
|
184 | 184 | |
185 | - break; |
|
185 | + break; |
|
186 | 186 | |
187 | - case 'clone2': /* sur clique de l'icone du formulaire*/ |
|
187 | + case 'clone2': /* sur clique de l'icone du formulaire*/ |
|
188 | 188 | |
189 | - //$newEventId = 1; |
|
190 | - $eventId = $_GET['event_id']; |
|
191 | - $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
|
192 | - $event = $eventHandler->getEvent($eventId); |
|
193 | - $t = $event->getVars(); |
|
194 | - $data = array(); |
|
195 | - while (list($key, $val) = each($t)) { |
|
196 | - $data[$key] = $val['value']; |
|
197 | - } |
|
189 | + //$newEventId = 1; |
|
190 | + $eventId = $_GET['event_id']; |
|
191 | + $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
|
192 | + $event = $eventHandler->getEvent($eventId); |
|
193 | + $t = $event->getVars(); |
|
194 | + $data = array(); |
|
195 | + while (list($key, $val) = each($t)) { |
|
196 | + $data[$key] = $val['value']; |
|
197 | + } |
|
198 | 198 | |
199 | - $data['event_id'] = 0; |
|
200 | - $data['event_title'] .= ' (' . _AM_EXTCAL_CLONE_OF . $eventId . ')'; |
|
199 | + $data['event_id'] = 0; |
|
200 | + $data['event_title'] .= ' (' . _AM_EXTCAL_CLONE_OF . $eventId . ')'; |
|
201 | 201 | |
202 | - $newEvent = $eventHandler->create(); |
|
203 | - $newEvent->setVars($data); |
|
204 | - $t = $eventHandler->insert($newEvent, true); |
|
202 | + $newEvent = $eventHandler->create(); |
|
203 | + $newEvent->setVars($data); |
|
204 | + $t = $eventHandler->insert($newEvent, true); |
|
205 | 205 | |
206 | - $newEventId = $newEvent->getVar('event_id'); |
|
207 | - $ts = print_r($newEventId, true); |
|
206 | + $newEventId = $newEvent->getVar('event_id'); |
|
207 | + $ts = print_r($newEventId, true); |
|
208 | 208 | |
209 | - redirect_header("event.php?op=modify&event_id={$newEventId}", 3, _AM_EXTCAL_EVENT_DELETED, false); |
|
210 | - break; |
|
209 | + redirect_header("event.php?op=modify&event_id={$newEventId}", 3, _AM_EXTCAL_EVENT_DELETED, false); |
|
210 | + break; |
|
211 | 211 | |
212 | - case 'delete': |
|
212 | + case 'delete': |
|
213 | 213 | |
214 | - if (isset($_POST['confirm'])) { |
|
215 | - if (!$GLOBALS['xoopsSecurity']->check()) { |
|
216 | - redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
217 | - exit; |
|
214 | + if (isset($_POST['confirm'])) { |
|
215 | + if (!$GLOBALS['xoopsSecurity']->check()) { |
|
216 | + redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
217 | + exit; |
|
218 | + } |
|
219 | + // $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
|
220 | + // $eventHandler->deleteEvent($_POST['event_id']); |
|
221 | + deleteEvents($_POST['event_id']); |
|
222 | + redirect_header('event.php', 3, _AM_EXTCAL_EVENT_DELETED, false); |
|
223 | + } else { |
|
224 | + xoops_cp_header(); |
|
225 | + // @author Gregory Mage (Aka Mage) |
|
226 | + //*************************************************************************************** |
|
227 | + //include_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php"; |
|
228 | + $eventAdmin = new ModuleAdmin(); |
|
229 | + echo $eventAdmin->addNavigation(basename(__FILE__)); |
|
230 | + //*************************************************************************************** |
|
231 | + |
|
232 | + $hiddens = array('event_id' => $_GET['event_id'], 'form_delete' => '', 'confirm' => 1); |
|
233 | + xoops_confirm($hiddens, 'event.php?op=delete', _AM_EXTCAL_CONFIRM_DELETE_EVENT, _DELETE, 'event.php'); |
|
234 | + |
|
235 | + xoops_cp_footer(); |
|
218 | 236 | } |
219 | - // $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
|
220 | - // $eventHandler->deleteEvent($_POST['event_id']); |
|
221 | - deleteEvents($_POST['event_id']); |
|
222 | - redirect_header('event.php', 3, _AM_EXTCAL_EVENT_DELETED, false); |
|
223 | - } else { |
|
237 | + |
|
238 | + break; |
|
239 | + |
|
240 | + case 'deleteSelection': |
|
241 | + |
|
224 | 242 | xoops_cp_header(); |
225 | 243 | // @author Gregory Mage (Aka Mage) |
226 | 244 | //*************************************************************************************** |
@@ -228,186 +246,168 @@ discard block |
||
228 | 246 | $eventAdmin = new ModuleAdmin(); |
229 | 247 | echo $eventAdmin->addNavigation(basename(__FILE__)); |
230 | 248 | //*************************************************************************************** |
249 | + if (isset($_POST['deleteSelection'][0])) { |
|
250 | + $msg = _AM_EXTCAL_CONFIRM_DELETE_ALL; |
|
251 | + $ids = array_keys($_POST['deleteAllEvents']); |
|
252 | + } else { |
|
253 | + $msg = _AM_EXTCAL_CONFIRM_DELETE_SELECTION; |
|
254 | + $ids = array_keys($_POST['deleteEvents']); |
|
255 | + } |
|
231 | 256 | |
232 | - $hiddens = array('event_id' => $_GET['event_id'], 'form_delete' => '', 'confirm' => 1); |
|
233 | - xoops_confirm($hiddens, 'event.php?op=delete', _AM_EXTCAL_CONFIRM_DELETE_EVENT, _DELETE, 'event.php'); |
|
257 | + // $msg = ((isset($_POST['deleteSelection'][0])) ? _AM_EXTCAL_CONFIRM_DELETE_ALL : _AM_EXTCAL_CONFIRM_DELETE_SELECTION); |
|
258 | + // $ids = array_keys($_POST['deleteEvents']); |
|
259 | + $ids = implode(',', $ids); |
|
260 | + //echo $ids.'<br>'; |
|
261 | + $hiddens = array('event_ids' => $ids, 'form_delete' => '', 'confirm' => 1); |
|
262 | + //$hiddens = array('event_ids' => $_POST['deleteEvents'], 'form_delete' => '', 'confirm' => 1); |
|
263 | + xoops_confirm($hiddens, 'event.php?op=deleteSelectionOK', $msg, _DELETE, 'event.php'); |
|
234 | 264 | |
235 | 265 | xoops_cp_footer(); |
236 | - } |
|
237 | 266 | |
238 | - break; |
|
239 | - |
|
240 | - case 'deleteSelection': |
|
241 | - |
|
242 | - xoops_cp_header(); |
|
243 | - // @author Gregory Mage (Aka Mage) |
|
244 | - //*************************************************************************************** |
|
245 | - //include_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php"; |
|
246 | - $eventAdmin = new ModuleAdmin(); |
|
247 | - echo $eventAdmin->addNavigation(basename(__FILE__)); |
|
248 | - //*************************************************************************************** |
|
249 | - if (isset($_POST['deleteSelection'][0])) { |
|
250 | - $msg = _AM_EXTCAL_CONFIRM_DELETE_ALL; |
|
251 | - $ids = array_keys($_POST['deleteAllEvents']); |
|
252 | - } else { |
|
253 | - $msg = _AM_EXTCAL_CONFIRM_DELETE_SELECTION; |
|
254 | - $ids = array_keys($_POST['deleteEvents']); |
|
255 | - } |
|
267 | + break; |
|
256 | 268 | |
257 | - // $msg = ((isset($_POST['deleteSelection'][0])) ? _AM_EXTCAL_CONFIRM_DELETE_ALL : _AM_EXTCAL_CONFIRM_DELETE_SELECTION); |
|
258 | - // $ids = array_keys($_POST['deleteEvents']); |
|
259 | - $ids = implode(',', $ids); |
|
260 | - //echo $ids.'<br>'; |
|
261 | - $hiddens = array('event_ids' => $ids, 'form_delete' => '', 'confirm' => 1); |
|
262 | - //$hiddens = array('event_ids' => $_POST['deleteEvents'], 'form_delete' => '', 'confirm' => 1); |
|
263 | - xoops_confirm($hiddens, 'event.php?op=deleteSelectionOK', $msg, _DELETE, 'event.php'); |
|
264 | - |
|
265 | - xoops_cp_footer(); |
|
266 | - |
|
267 | - break; |
|
268 | - |
|
269 | - case 'deleteSelectionOK': |
|
270 | - //----------------------------------------- |
|
271 | - // $t = print_r($_GET,true); |
|
272 | - // echo "<hr><pre>{$t}</pre><hr>"; |
|
273 | - // |
|
274 | - // $t = print_r($_POST,true); |
|
275 | - // echo "<hr><pre>{$t}</pre><hr>"; |
|
276 | - // exit; |
|
277 | - //----------------------------------------- |
|
278 | - |
|
279 | - if (isset($_POST['deleteSelection'][0])) { |
|
280 | - } else { |
|
281 | - if (!$GLOBALS['xoopsSecurity']->check()) { |
|
282 | - redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
283 | - exit; |
|
284 | - } |
|
269 | + case 'deleteSelectionOK': |
|
270 | + //----------------------------------------- |
|
271 | + // $t = print_r($_GET,true); |
|
272 | + // echo "<hr><pre>{$t}</pre><hr>"; |
|
273 | + // |
|
274 | + // $t = print_r($_POST,true); |
|
275 | + // echo "<hr><pre>{$t}</pre><hr>"; |
|
276 | + // exit; |
|
277 | + //----------------------------------------- |
|
285 | 278 | |
286 | - deleteEvents($_POST['event_ids']); |
|
279 | + if (isset($_POST['deleteSelection'][0])) { |
|
280 | + } else { |
|
281 | + if (!$GLOBALS['xoopsSecurity']->check()) { |
|
282 | + redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
283 | + exit; |
|
284 | + } |
|
287 | 285 | |
288 | - redirect_header('event.php', 3, _AM_EXTCAL_EVENTS_DELETED, false); |
|
289 | - } |
|
286 | + deleteEvents($_POST['event_ids']); |
|
290 | 287 | |
291 | - break; |
|
288 | + redirect_header('event.php', 3, _AM_EXTCAL_EVENTS_DELETED, false); |
|
289 | + } |
|
292 | 290 | |
293 | - case 'default': |
|
294 | - default: |
|
291 | + break; |
|
295 | 292 | |
296 | - //global $extcalConfig; |
|
297 | - $extcalConfig = ExtcalConfig::getHandler(); |
|
298 | - $xoopsModuleConfig = $extcalConfig->getModuleConfig(); |
|
293 | + case 'default': |
|
294 | + default: |
|
299 | 295 | |
300 | - $start = isset($_GET['start']) ? $_GET['start'] : 0; |
|
301 | - $nbEventsByPage = $xoopsModuleConfig['nbEventsByPage']; |
|
296 | + //global $extcalConfig; |
|
297 | + $extcalConfig = ExtcalConfig::getHandler(); |
|
298 | + $xoopsModuleConfig = $extcalConfig->getModuleConfig(); |
|
302 | 299 | |
303 | - xoops_cp_header(); |
|
304 | - // @author Gregory Mage (Aka Mage) |
|
305 | - //*************************************************************************************** |
|
300 | + $start = isset($_GET['start']) ? $_GET['start'] : 0; |
|
301 | + $nbEventsByPage = $xoopsModuleConfig['nbEventsByPage']; |
|
306 | 302 | |
307 | - $eventAdmin = new ModuleAdmin(); |
|
308 | - echo $eventAdmin->addNavigation(basename(__FILE__)); |
|
309 | - //*************************************************************************************** |
|
303 | + xoops_cp_header(); |
|
304 | + // @author Gregory Mage (Aka Mage) |
|
305 | + //*************************************************************************************** |
|
310 | 306 | |
311 | - $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
|
312 | - $events = $eventHandler->objectToArray($eventHandler->getNewEvent($start, $nbEventsByPage, 0, true), array('cat_id')); |
|
313 | - $eventHandler->formatEventsDate($events, _SHORTDATESTRING); |
|
307 | + $eventAdmin = new ModuleAdmin(); |
|
308 | + echo $eventAdmin->addNavigation(basename(__FILE__)); |
|
309 | + //*************************************************************************************** |
|
314 | 310 | |
315 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_APPROVED_EVENT . '</legend>'; |
|
316 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
317 | - //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/edit.png' .' '.'style=vertical-align:middle;/> ' . _AM_EXTCAL_INFO_EDIT . '<br>'; |
|
318 | - //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/delete.png'. ' '."style=vertical-align:middle;/> ". _AM_EXTCAL_INFO_DELETE; |
|
311 | + $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
|
312 | + $events = $eventHandler->objectToArray($eventHandler->getNewEvent($start, $nbEventsByPage, 0, true), array('cat_id')); |
|
313 | + $eventHandler->formatEventsDate($events, _SHORTDATESTRING); |
|
319 | 314 | |
320 | - echo '<img src=' . $pathIcon16 . '/edit.png' . ' ' . 'style=vertical-align:middle;/> ' . _AM_EXTCAL_INFO_EDIT . '<br>'; |
|
321 | - echo '<img src=' . $pathIcon16 . '/delete.png' . ' ' . 'style=vertical-align:middle;/> ' . _AM_EXTCAL_INFO_DELETE . '<br>'; |
|
315 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_APPROVED_EVENT . '</legend>'; |
|
316 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
317 | + //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/edit.png' .' '.'style=vertical-align:middle;/> ' . _AM_EXTCAL_INFO_EDIT . '<br>'; |
|
318 | + //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/delete.png'. ' '."style=vertical-align:middle;/> ". _AM_EXTCAL_INFO_DELETE; |
|
322 | 319 | |
323 | - echo '</fieldset><br>'; |
|
320 | + echo '<img src=' . $pathIcon16 . '/edit.png' . ' ' . 'style=vertical-align:middle;/> ' . _AM_EXTCAL_INFO_EDIT . '<br>'; |
|
321 | + echo '<img src=' . $pathIcon16 . '/delete.png' . ' ' . 'style=vertical-align:middle;/> ' . _AM_EXTCAL_INFO_DELETE . '<br>'; |
|
324 | 322 | |
325 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _MD_EXTCAL_SUBMITED_EVENT . '</legend>'; |
|
323 | + echo '</fieldset><br>'; |
|
326 | 324 | |
327 | - echo '<form method="POST" action="event.php">'; |
|
328 | - echo '<input type="hidden" name="op" value="deleteSelection" />'; |
|
325 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _MD_EXTCAL_SUBMITED_EVENT . '</legend>'; |
|
329 | 326 | |
330 | - echo '<table class="outer" style="width:100%;">'; |
|
331 | - echo '<tr style="text-align:center;">'; |
|
332 | - echo '<th>' . _AM_EXTCAL_DELETE . '</th>'; |
|
333 | - echo '<th>#</th>'; |
|
334 | - echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>'; |
|
335 | - echo '<th>' . _AM_EXTCAL_TITLE . '</th>'; |
|
336 | - echo '<th>' . _AM_EXTCAL_START_DATE . '</th>'; |
|
337 | - echo '<th>' . _AM_EXTCAL_END_DATE . '</th>'; |
|
338 | - echo '<th>' . _AM_EXTCAL_RECURRENT . '</th>'; |
|
339 | - echo '<th>' . _AM_EXTCAL_START_RULES . '</th>'; |
|
340 | - echo '<th>' . _AM_EXTCAL_ACTION . '</th>'; |
|
327 | + echo '<form method="POST" action="event.php">'; |
|
328 | + echo '<input type="hidden" name="op" value="deleteSelection" />'; |
|
341 | 329 | |
342 | - echo '</tr>'; |
|
330 | + echo '<table class="outer" style="width:100%;">'; |
|
331 | + echo '<tr style="text-align:center;">'; |
|
332 | + echo '<th>' . _AM_EXTCAL_DELETE . '</th>'; |
|
333 | + echo '<th>#</th>'; |
|
334 | + echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>'; |
|
335 | + echo '<th>' . _AM_EXTCAL_TITLE . '</th>'; |
|
336 | + echo '<th>' . _AM_EXTCAL_START_DATE . '</th>'; |
|
337 | + echo '<th>' . _AM_EXTCAL_END_DATE . '</th>'; |
|
338 | + echo '<th>' . _AM_EXTCAL_RECURRENT . '</th>'; |
|
339 | + echo '<th>' . _AM_EXTCAL_START_RULES . '</th>'; |
|
340 | + echo '<th>' . _AM_EXTCAL_ACTION . '</th>'; |
|
343 | 341 | |
344 | - if (count($events) > 0) { |
|
345 | - $i = 0; |
|
346 | - foreach ($events as $event) { |
|
347 | - $class = (++$i % 2 == 0) ? 'even' : 'odd'; |
|
348 | - echo '<tr style="text-align:left;" class="' . $class . '">'; |
|
349 | - echo "<td width='10%' align='center'>"; |
|
350 | - echo "<input type='checkbox' name='deleteEvents[{$event['event_id']}]' value='1' >"; |
|
351 | - echo "<input type='hidden' name='deleteAllEvents[{$event['event_id']}]' value='1' />"; |
|
352 | - echo '</td>'; |
|
353 | - echo "<td align = 'center' width='5%'>" . $event['event_id'] . '</td>'; |
|
354 | - echo "<td width='10%'>" . '<a href=cat.php?op=modify&cat_id=' . $event['cat']['cat_id'] . '&form_modify' . '>' . $event['cat']['cat_name'] . '</a>' . '</td>'; |
|
355 | - |
|
356 | - echo '<td>' . '<a href=event.php?op=modify&event_id=' . $event['event_id'] . '>' . $event['event_title'] . '</a>' . '</td>'; |
|
357 | - |
|
358 | - // if ($event['event_isrecur']) { |
|
359 | - // echo '<td>' . $event['formated_reccur_rule'] . '</td>'; |
|
360 | - // } else { |
|
361 | - // echo '<td>' . $event['formated_event_start'] . '</td>'; |
|
362 | - // } |
|
363 | - |
|
364 | - echo "<td align = 'center' width='10%'>" . $event['formated_event_start'] . '</td>'; |
|
365 | - echo "<td align = 'center' width='10%'>" . $event['formated_event_end'] . '</td>'; |
|
366 | - echo '<td align="center">' . (($event['event_isrecur'] == 1) ? _YES : _NO) . '</td>'; |
|
367 | - if (!isset($event['formated_reccur_rule'])) { |
|
368 | - $event['formated_reccur_rule'] = ''; |
|
342 | + echo '</tr>'; |
|
343 | + |
|
344 | + if (count($events) > 0) { |
|
345 | + $i = 0; |
|
346 | + foreach ($events as $event) { |
|
347 | + $class = (++$i % 2 == 0) ? 'even' : 'odd'; |
|
348 | + echo '<tr style="text-align:left;" class="' . $class . '">'; |
|
349 | + echo "<td width='10%' align='center'>"; |
|
350 | + echo "<input type='checkbox' name='deleteEvents[{$event['event_id']}]' value='1' >"; |
|
351 | + echo "<input type='hidden' name='deleteAllEvents[{$event['event_id']}]' value='1' />"; |
|
352 | + echo '</td>'; |
|
353 | + echo "<td align = 'center' width='5%'>" . $event['event_id'] . '</td>'; |
|
354 | + echo "<td width='10%'>" . '<a href=cat.php?op=modify&cat_id=' . $event['cat']['cat_id'] . '&form_modify' . '>' . $event['cat']['cat_name'] . '</a>' . '</td>'; |
|
355 | + |
|
356 | + echo '<td>' . '<a href=event.php?op=modify&event_id=' . $event['event_id'] . '>' . $event['event_title'] . '</a>' . '</td>'; |
|
357 | + |
|
358 | + // if ($event['event_isrecur']) { |
|
359 | + // echo '<td>' . $event['formated_reccur_rule'] . '</td>'; |
|
360 | + // } else { |
|
361 | + // echo '<td>' . $event['formated_event_start'] . '</td>'; |
|
362 | + // } |
|
363 | + |
|
364 | + echo "<td align = 'center' width='10%'>" . $event['formated_event_start'] . '</td>'; |
|
365 | + echo "<td align = 'center' width='10%'>" . $event['formated_event_end'] . '</td>'; |
|
366 | + echo '<td align="center">' . (($event['event_isrecur'] == 1) ? _YES : _NO) . '</td>'; |
|
367 | + if (!isset($event['formated_reccur_rule'])) { |
|
368 | + $event['formated_reccur_rule'] = ''; |
|
369 | + } |
|
370 | + echo '<td>' . $event['formated_reccur_rule'] . '</td>'; |
|
371 | + |
|
372 | + echo '<td style="width:10%; text-align:center;">'; |
|
373 | + echo '<a href=event.php?op=modify&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/edit.png' title='" . _AM_EXTCAL_ICONE_EDIT . "' /></a> "; |
|
374 | + echo '<a href=event.php?op=delete&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/delete.png' title='" . _AM_EXTCAL_ICONE_DELETE . "' /></a> "; |
|
375 | + echo '<a href=event.php?op=clone&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/editcopy.png' title='" . _AM_EXTCAL_ICONE_CLONE . "' /></a>"; |
|
376 | + echo '</td>'; |
|
377 | + |
|
378 | + echo '</tr>'; |
|
369 | 379 | } |
370 | - echo '<td>' . $event['formated_reccur_rule'] . '</td>'; |
|
380 | + //--------------------------------------------------------- |
|
381 | + $pageNav = new XoopsPageNav($eventHandler->getCountNewEvent(), $nbEventsByPage, $start); |
|
371 | 382 | |
372 | - echo '<td style="width:10%; text-align:center;">'; |
|
373 | - echo '<a href=event.php?op=modify&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/edit.png' title='" . _AM_EXTCAL_ICONE_EDIT . "' /></a> "; |
|
374 | - echo '<a href=event.php?op=delete&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/delete.png' title='" . _AM_EXTCAL_ICONE_DELETE . "' /></a> "; |
|
375 | - echo '<a href=event.php?op=clone&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/editcopy.png' title='" . _AM_EXTCAL_ICONE_CLONE . "' /></a>"; |
|
383 | + echo '<tr><td colspan="2" style="text-align: right;">'; |
|
384 | + echo $pageNav->renderNav(2); |
|
376 | 385 | echo '</td>'; |
377 | 386 | |
378 | - echo '</tr>'; |
|
379 | - } |
|
380 | - //--------------------------------------------------------- |
|
381 | - $pageNav = new XoopsPageNav($eventHandler->getCountNewEvent(), $nbEventsByPage, $start); |
|
387 | + echo '<td colspan="2" style="text-align: right;">'; |
|
382 | 388 | |
383 | - echo '<tr><td colspan="2" style="text-align: right;">'; |
|
384 | - echo $pageNav->renderNav(2); |
|
385 | - echo '</td>'; |
|
389 | + echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_ALL . '" name="deleteSelection[0]">'; |
|
390 | + echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_SELECTION . '" name="deleteSelection[1]">'; |
|
386 | 391 | |
387 | - echo '<td colspan="2" style="text-align: right;">'; |
|
388 | - |
|
389 | - echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_ALL . '" name="deleteSelection[0]">'; |
|
390 | - echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_SELECTION . '" name="deleteSelection[1]">'; |
|
391 | - |
|
392 | - echo '</td>'; |
|
393 | - echo '</tr>'; |
|
394 | - } else { |
|
395 | - echo '<tr><td colspan="5">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>'; |
|
396 | - } |
|
397 | - echo '</table>'; |
|
398 | - echo '</form>'; |
|
392 | + echo '</td>'; |
|
393 | + echo '</tr>'; |
|
394 | + } else { |
|
395 | + echo '<tr><td colspan="5">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>'; |
|
396 | + } |
|
397 | + echo '</table>'; |
|
398 | + echo '</form>'; |
|
399 | 399 | |
400 | - echo '</fieldset>'; |
|
401 | - echo '</fieldset><br><br>'; |
|
402 | - //Fin de la liste des evennement ------------------------------------- |
|
403 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_SUBMIT_EVENT . '</legend>'; |
|
400 | + echo '</fieldset>'; |
|
401 | + echo '</fieldset><br><br>'; |
|
402 | + //Fin de la liste des evennement ------------------------------------- |
|
403 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_SUBMIT_EVENT . '</legend>'; |
|
404 | 404 | |
405 | - $form = $eventHandler->getEventForm('admin'); |
|
406 | - $form->display(); |
|
405 | + $form = $eventHandler->getEventForm('admin'); |
|
406 | + $form->display(); |
|
407 | 407 | |
408 | - echo '</fieldset>'; |
|
408 | + echo '</fieldset>'; |
|
409 | 409 | |
410 | - include_once __DIR__ . '/admin_footer.php'; |
|
410 | + include_once __DIR__ . '/admin_footer.php'; |
|
411 | 411 | |
412 | - break; |
|
412 | + break; |
|
413 | 413 | } |
@@ -1,11 +1,11 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once __DIR__ . '/../../../include/cp_header.php'; |
|
4 | -include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
5 | -include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
6 | -include_once __DIR__ . '/../class/form/extcalform.php'; |
|
7 | -include_once __DIR__ . '/admin_header.php'; |
|
8 | -include_once __DIR__ . '/../class/utilities.php'; |
|
3 | +include_once __DIR__.'/../../../include/cp_header.php'; |
|
4 | +include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
5 | +include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
6 | +include_once __DIR__.'/../class/form/extcalform.php'; |
|
7 | +include_once __DIR__.'/admin_header.php'; |
|
8 | +include_once __DIR__.'/../class/utilities.php'; |
|
9 | 9 | |
10 | 10 | $gepeto = array_merge($_GET, $_POST); |
11 | 11 | while (list($k, $v) = each($gepeto)) { |
@@ -31,15 +31,15 @@ discard block |
||
31 | 31 | |
32 | 32 | while (list($k, $t) = each($rst)) { |
33 | 33 | if ($t['event_picture1'] != '') { |
34 | - $f = XOOPS_ROOT_PATH . '/uploads/extcal/' . $t['event_picture1']; |
|
34 | + $f = XOOPS_ROOT_PATH.'/uploads/extcal/'.$t['event_picture1']; |
|
35 | 35 | unlink($f); |
36 | - echo $f . '<br>'; |
|
36 | + echo $f.'<br>'; |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | if ($t['event_picture2'] != '') { |
40 | - $f = XOOPS_ROOT_PATH . '/uploads/extcal/' . $t['event_picture1']; |
|
40 | + $f = XOOPS_ROOT_PATH.'/uploads/extcal/'.$t['event_picture1']; |
|
41 | 41 | unlink($f); |
42 | - echo $f . '<br>'; |
|
42 | + echo $f.'<br>'; |
|
43 | 43 | } |
44 | 44 | } |
45 | 45 | |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | if (!$eventHandler->modifyEvent($_POST['event_id'], $data)) { |
102 | 102 | redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDIT_FAILED, false); |
103 | 103 | } else { |
104 | - $fileHandler->createFile((int)$_POST['event_id']); |
|
104 | + $fileHandler->createFile((int) $_POST['event_id']); |
|
105 | 105 | redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDITED, false); |
106 | 106 | } |
107 | 107 | |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | $eventId = $_GET['event_id']; |
173 | 173 | $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
174 | 174 | |
175 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_EDIT_EVENT . '</legend>'; |
|
175 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._MD_EXTCAL_EDIT_EVENT.'</legend>'; |
|
176 | 176 | |
177 | 177 | if ($form = $eventHandler->getEventForm('admin', $action, array('event_id' => $eventId))) { |
178 | 178 | $form->display(); |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | } |
198 | 198 | |
199 | 199 | $data['event_id'] = 0; |
200 | - $data['event_title'] .= ' (' . _AM_EXTCAL_CLONE_OF . $eventId . ')'; |
|
200 | + $data['event_title'] .= ' ('._AM_EXTCAL_CLONE_OF.$eventId.')'; |
|
201 | 201 | |
202 | 202 | $newEvent = $eventHandler->create(); |
203 | 203 | $newEvent->setVars($data); |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | |
214 | 214 | if (isset($_POST['confirm'])) { |
215 | 215 | if (!$GLOBALS['xoopsSecurity']->check()) { |
216 | - redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
216 | + redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
217 | 217 | exit; |
218 | 218 | } |
219 | 219 | // $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | if (isset($_POST['deleteSelection'][0])) { |
280 | 280 | } else { |
281 | 281 | if (!$GLOBALS['xoopsSecurity']->check()) { |
282 | - redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
282 | + redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
283 | 283 | exit; |
284 | 284 | } |
285 | 285 | |
@@ -312,32 +312,32 @@ discard block |
||
312 | 312 | $events = $eventHandler->objectToArray($eventHandler->getNewEvent($start, $nbEventsByPage, 0, true), array('cat_id')); |
313 | 313 | $eventHandler->formatEventsDate($events, _SHORTDATESTRING); |
314 | 314 | |
315 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_APPROVED_EVENT . '</legend>'; |
|
316 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
315 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_APPROVED_EVENT.'</legend>'; |
|
316 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>'; |
|
317 | 317 | //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/edit.png' .' '.'style=vertical-align:middle;/> ' . _AM_EXTCAL_INFO_EDIT . '<br>'; |
318 | 318 | //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/delete.png'. ' '."style=vertical-align:middle;/> ". _AM_EXTCAL_INFO_DELETE; |
319 | 319 | |
320 | - echo '<img src=' . $pathIcon16 . '/edit.png' . ' ' . 'style=vertical-align:middle;/> ' . _AM_EXTCAL_INFO_EDIT . '<br>'; |
|
321 | - echo '<img src=' . $pathIcon16 . '/delete.png' . ' ' . 'style=vertical-align:middle;/> ' . _AM_EXTCAL_INFO_DELETE . '<br>'; |
|
320 | + echo '<img src='.$pathIcon16.'/edit.png'.' '.'style=vertical-align:middle;/> '._AM_EXTCAL_INFO_EDIT.'<br>'; |
|
321 | + echo '<img src='.$pathIcon16.'/delete.png'.' '.'style=vertical-align:middle;/> '._AM_EXTCAL_INFO_DELETE.'<br>'; |
|
322 | 322 | |
323 | 323 | echo '</fieldset><br>'; |
324 | 324 | |
325 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _MD_EXTCAL_SUBMITED_EVENT . '</legend>'; |
|
325 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._MD_EXTCAL_SUBMITED_EVENT.'</legend>'; |
|
326 | 326 | |
327 | 327 | echo '<form method="POST" action="event.php">'; |
328 | 328 | echo '<input type="hidden" name="op" value="deleteSelection" />'; |
329 | 329 | |
330 | 330 | echo '<table class="outer" style="width:100%;">'; |
331 | 331 | echo '<tr style="text-align:center;">'; |
332 | - echo '<th>' . _AM_EXTCAL_DELETE . '</th>'; |
|
332 | + echo '<th>'._AM_EXTCAL_DELETE.'</th>'; |
|
333 | 333 | echo '<th>#</th>'; |
334 | - echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>'; |
|
335 | - echo '<th>' . _AM_EXTCAL_TITLE . '</th>'; |
|
336 | - echo '<th>' . _AM_EXTCAL_START_DATE . '</th>'; |
|
337 | - echo '<th>' . _AM_EXTCAL_END_DATE . '</th>'; |
|
338 | - echo '<th>' . _AM_EXTCAL_RECURRENT . '</th>'; |
|
339 | - echo '<th>' . _AM_EXTCAL_START_RULES . '</th>'; |
|
340 | - echo '<th>' . _AM_EXTCAL_ACTION . '</th>'; |
|
334 | + echo '<th>'._AM_EXTCAL_CATEGORY.'</th>'; |
|
335 | + echo '<th>'._AM_EXTCAL_TITLE.'</th>'; |
|
336 | + echo '<th>'._AM_EXTCAL_START_DATE.'</th>'; |
|
337 | + echo '<th>'._AM_EXTCAL_END_DATE.'</th>'; |
|
338 | + echo '<th>'._AM_EXTCAL_RECURRENT.'</th>'; |
|
339 | + echo '<th>'._AM_EXTCAL_START_RULES.'</th>'; |
|
340 | + echo '<th>'._AM_EXTCAL_ACTION.'</th>'; |
|
341 | 341 | |
342 | 342 | echo '</tr>'; |
343 | 343 | |
@@ -345,15 +345,15 @@ discard block |
||
345 | 345 | $i = 0; |
346 | 346 | foreach ($events as $event) { |
347 | 347 | $class = (++$i % 2 == 0) ? 'even' : 'odd'; |
348 | - echo '<tr style="text-align:left;" class="' . $class . '">'; |
|
348 | + echo '<tr style="text-align:left;" class="'.$class.'">'; |
|
349 | 349 | echo "<td width='10%' align='center'>"; |
350 | 350 | echo "<input type='checkbox' name='deleteEvents[{$event['event_id']}]' value='1' >"; |
351 | 351 | echo "<input type='hidden' name='deleteAllEvents[{$event['event_id']}]' value='1' />"; |
352 | 352 | echo '</td>'; |
353 | - echo "<td align = 'center' width='5%'>" . $event['event_id'] . '</td>'; |
|
354 | - echo "<td width='10%'>" . '<a href=cat.php?op=modify&cat_id=' . $event['cat']['cat_id'] . '&form_modify' . '>' . $event['cat']['cat_name'] . '</a>' . '</td>'; |
|
353 | + echo "<td align = 'center' width='5%'>".$event['event_id'].'</td>'; |
|
354 | + echo "<td width='10%'>".'<a href=cat.php?op=modify&cat_id='.$event['cat']['cat_id'].'&form_modify'.'>'.$event['cat']['cat_name'].'</a>'.'</td>'; |
|
355 | 355 | |
356 | - echo '<td>' . '<a href=event.php?op=modify&event_id=' . $event['event_id'] . '>' . $event['event_title'] . '</a>' . '</td>'; |
|
356 | + echo '<td>'.'<a href=event.php?op=modify&event_id='.$event['event_id'].'>'.$event['event_title'].'</a>'.'</td>'; |
|
357 | 357 | |
358 | 358 | // if ($event['event_isrecur']) { |
359 | 359 | // echo '<td>' . $event['formated_reccur_rule'] . '</td>'; |
@@ -361,18 +361,18 @@ discard block |
||
361 | 361 | // echo '<td>' . $event['formated_event_start'] . '</td>'; |
362 | 362 | // } |
363 | 363 | |
364 | - echo "<td align = 'center' width='10%'>" . $event['formated_event_start'] . '</td>'; |
|
365 | - echo "<td align = 'center' width='10%'>" . $event['formated_event_end'] . '</td>'; |
|
366 | - echo '<td align="center">' . (($event['event_isrecur'] == 1) ? _YES : _NO) . '</td>'; |
|
364 | + echo "<td align = 'center' width='10%'>".$event['formated_event_start'].'</td>'; |
|
365 | + echo "<td align = 'center' width='10%'>".$event['formated_event_end'].'</td>'; |
|
366 | + echo '<td align="center">'.(($event['event_isrecur'] == 1) ? _YES : _NO).'</td>'; |
|
367 | 367 | if (!isset($event['formated_reccur_rule'])) { |
368 | 368 | $event['formated_reccur_rule'] = ''; |
369 | 369 | } |
370 | - echo '<td>' . $event['formated_reccur_rule'] . '</td>'; |
|
370 | + echo '<td>'.$event['formated_reccur_rule'].'</td>'; |
|
371 | 371 | |
372 | 372 | echo '<td style="width:10%; text-align:center;">'; |
373 | - echo '<a href=event.php?op=modify&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/edit.png' title='" . _AM_EXTCAL_ICONE_EDIT . "' /></a> "; |
|
374 | - echo '<a href=event.php?op=delete&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/delete.png' title='" . _AM_EXTCAL_ICONE_DELETE . "' /></a> "; |
|
375 | - echo '<a href=event.php?op=clone&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/editcopy.png' title='" . _AM_EXTCAL_ICONE_CLONE . "' /></a>"; |
|
373 | + echo '<a href=event.php?op=modify&event_id='.$event['event_id']."><img src='".$pathIcon16."/edit.png' title='"._AM_EXTCAL_ICONE_EDIT."' /></a> "; |
|
374 | + echo '<a href=event.php?op=delete&event_id='.$event['event_id']."><img src='".$pathIcon16."/delete.png' title='"._AM_EXTCAL_ICONE_DELETE."' /></a> "; |
|
375 | + echo '<a href=event.php?op=clone&event_id='.$event['event_id']."><img src='".$pathIcon16."/editcopy.png' title='"._AM_EXTCAL_ICONE_CLONE."' /></a>"; |
|
376 | 376 | echo '</td>'; |
377 | 377 | |
378 | 378 | echo '</tr>'; |
@@ -386,13 +386,13 @@ discard block |
||
386 | 386 | |
387 | 387 | echo '<td colspan="2" style="text-align: right;">'; |
388 | 388 | |
389 | - echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_ALL . '" name="deleteSelection[0]">'; |
|
390 | - echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_SELECTION . '" name="deleteSelection[1]">'; |
|
389 | + echo '<input type="submit" value="'._AM_EXTCAL_DELETE_ALL.'" name="deleteSelection[0]">'; |
|
390 | + echo '<input type="submit" value="'._AM_EXTCAL_DELETE_SELECTION.'" name="deleteSelection[1]">'; |
|
391 | 391 | |
392 | 392 | echo '</td>'; |
393 | 393 | echo '</tr>'; |
394 | 394 | } else { |
395 | - echo '<tr><td colspan="5">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>'; |
|
395 | + echo '<tr><td colspan="5">'._AM_EXTCAL_NO_PENDING_EVENT.'</td></tr>'; |
|
396 | 396 | } |
397 | 397 | echo '</table>'; |
398 | 398 | echo '</form>'; |
@@ -400,14 +400,14 @@ discard block |
||
400 | 400 | echo '</fieldset>'; |
401 | 401 | echo '</fieldset><br><br>'; |
402 | 402 | //Fin de la liste des evennement ------------------------------------- |
403 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_SUBMIT_EVENT . '</legend>'; |
|
403 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._MD_EXTCAL_SUBMIT_EVENT.'</legend>'; |
|
404 | 404 | |
405 | 405 | $form = $eventHandler->getEventForm('admin'); |
406 | 406 | $form->display(); |
407 | 407 | |
408 | 408 | echo '</fieldset>'; |
409 | 409 | |
410 | - include_once __DIR__ . '/admin_footer.php'; |
|
410 | + include_once __DIR__.'/admin_footer.php'; |
|
411 | 411 | |
412 | 412 | break; |
413 | 413 | } |
@@ -1,16 +1,16 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include __DIR__ . '/../../mainfile.php'; |
|
4 | -include_once __DIR__ . '/include/constantes.php'; |
|
3 | +include __DIR__.'/../../mainfile.php'; |
|
4 | +include_once __DIR__.'/include/constantes.php'; |
|
5 | 5 | $params = array('view' => _EXTCAL_NAV_WEEK, 'file' => _EXTCAL_FILE_WEEK); |
6 | 6 | $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl"; |
7 | -include_once __DIR__ . '/header.php'; |
|
7 | +include_once __DIR__.'/header.php'; |
|
8 | 8 | |
9 | 9 | /* ========================================================================== */ |
10 | -$year = isset($_GET['year']) ? (int)$_GET['year'] : date('Y'); |
|
11 | -$month = isset($_GET['month']) ? (int)$_GET['month'] : date('n'); |
|
12 | -$day = isset($_GET['day']) ? (int)$_GET['day'] : date('j'); |
|
13 | -$cat = isset($_GET['cat']) ? (int)$_GET['cat'] : 0; |
|
10 | +$year = isset($_GET['year']) ? (int) $_GET['year'] : date('Y'); |
|
11 | +$month = isset($_GET['month']) ? (int) $_GET['month'] : date('n'); |
|
12 | +$day = isset($_GET['day']) ? (int) $_GET['day'] : date('j'); |
|
13 | +$cat = isset($_GET['cat']) ? (int) $_GET['cat'] : 0; |
|
14 | 14 | /* ========================================================================== */ |
15 | 15 | |
16 | 16 | // Validate the date (day, month and year) |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | 'cat' => $cat, |
46 | 46 | 'externalKeys' => 'cat_id', |
47 | 47 | ); |
48 | -$events = $eventHandler->getEventsOnPeriode($criteres); |
|
48 | +$events = $eventHandler->getEventsOnPeriode($criteres); |
|
49 | 49 | /**********************************************************************/ |
50 | 50 | $eventsArray = $events; |
51 | 51 | // Formating date |
@@ -86,21 +86,21 @@ discard block |
||
86 | 86 | $nWeekCalObj = $weekCalObj->nextWeek('object'); |
87 | 87 | $navig = array( |
88 | 88 | 'prev' => array( |
89 | - 'uri' => 'year=' . $pWeekCalObj->thisYear() . '&month=' . $pWeekCalObj->thisMonth() . '&day=' . $pWeekCalObj->thisDay(), |
|
89 | + 'uri' => 'year='.$pWeekCalObj->thisYear().'&month='.$pWeekCalObj->thisMonth().'&day='.$pWeekCalObj->thisDay(), |
|
90 | 90 | 'name' => $extcalTimeHandler->getFormatedDate($extcalConfig['nav_date_week'], $pWeekCalObj->getTimestamp()), |
91 | 91 | ), |
92 | 92 | 'this' => array( |
93 | - 'uri' => 'year=' . $weekCalObj->thisYear() . '&month=' . $weekCalObj->thisMonth() . '&day=' . $weekCalObj->thisDay(), |
|
93 | + 'uri' => 'year='.$weekCalObj->thisYear().'&month='.$weekCalObj->thisMonth().'&day='.$weekCalObj->thisDay(), |
|
94 | 94 | 'name' => $extcalTimeHandler->getFormatedDate($extcalConfig['nav_date_week'], $weekCalObj->getTimestamp()), |
95 | 95 | ), |
96 | 96 | 'next' => array( |
97 | - 'uri' => 'year=' . $nWeekCalObj->thisYear() . '&month=' . $nWeekCalObj->thisMonth() . '&day=' . $nWeekCalObj->thisDay(), |
|
97 | + 'uri' => 'year='.$nWeekCalObj->thisYear().'&month='.$nWeekCalObj->thisMonth().'&day='.$nWeekCalObj->thisDay(), |
|
98 | 98 | 'name' => $extcalTimeHandler->getFormatedDate($extcalConfig['nav_date_week'], $nWeekCalObj->getTimestamp()), |
99 | 99 | ), |
100 | 100 | ); |
101 | 101 | |
102 | 102 | // Title of the page |
103 | -$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name') . ' ' . $navig['this']['name']); |
|
103 | +$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name').' '.$navig['this']['name']); |
|
104 | 104 | |
105 | 105 | // Assigning navig data to the template |
106 | 106 | $xoopsTpl->assign('navig', $navig); |
@@ -160,4 +160,4 @@ discard block |
||
160 | 160 | $xoopsTpl->assign('lang', $lang); |
161 | 161 | $xoopsTpl->assign('view', 'week'); |
162 | 162 | |
163 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
163 | +include XOOPS_ROOT_PATH.'/footer.php'; |