@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | * @author Zilvinas Vaira |
9 | 9 | * |
10 | 10 | */ |
11 | -class RevokeCertificateCommand extends AbstractInvokerCommand{ |
|
11 | +class RevokeCertificateCommand extends AbstractInvokerCommand { |
|
12 | 12 | |
13 | 13 | const COMMAND = 'revokecertificate'; |
14 | 14 | |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | * @param string $commandToken |
24 | 24 | * @param SilverbulletContext $context |
25 | 25 | */ |
26 | - public function __construct($commandToken, $context){ |
|
26 | + public function __construct($commandToken, $context) { |
|
27 | 27 | parent::__construct($commandToken, $context); |
28 | 28 | $this->context = $context; |
29 | 29 | } |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | * {@inheritDoc} |
34 | 34 | * @see \web\lib\admin\http\AbstractCommand::execute() |
35 | 35 | */ |
36 | - public function execute(){ |
|
36 | + public function execute() { |
|
37 | 37 | $profile = $this->context->getProfile(); |
38 | 38 | $certificateId = $this->parseInt($_POST[self::COMMAND]); |
39 | 39 |
@@ -23,8 +23,8 @@ |
||
23 | 23 | * @param string $commandToken |
24 | 24 | * @return AbstractCommand |
25 | 25 | */ |
26 | - public function createCommand($commandToken){ |
|
27 | - if(!isset($this->commands[$commandToken]) || $this->commands[$commandToken] == null){ |
|
26 | + public function createCommand($commandToken) { |
|
27 | + if (!isset($this->commands[$commandToken]) || $this->commands[$commandToken] == null) { |
|
28 | 28 | $this->commands[$commandToken] = $this->doCreateCommand($commandToken); |
29 | 29 | } |
30 | 30 | return $this->commands[$commandToken]; |
@@ -7,14 +7,14 @@ |
||
7 | 7 | * @author Zilvinas Vaira |
8 | 8 | * |
9 | 9 | */ |
10 | -class DefaultCommand extends AbstractCommand{ |
|
10 | +class DefaultCommand extends AbstractCommand { |
|
11 | 11 | |
12 | 12 | /** |
13 | 13 | * |
14 | 14 | * {@inheritDoc} |
15 | 15 | * @see \web\lib\admin\http\AbstractCommand::execute() |
16 | 16 | */ |
17 | - public function execute(){ |
|
17 | + public function execute() { |
|
18 | 18 | |
19 | 19 | } |
20 | 20 |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | * @author Zilvinas Vaira |
7 | 7 | * |
8 | 8 | */ |
9 | -class TermsOfUseCommand extends AbstractInvokerCommand{ |
|
9 | +class TermsOfUseCommand extends AbstractInvokerCommand { |
|
10 | 10 | |
11 | 11 | const COMMAND = 'termsofuse'; |
12 | 12 | |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | * @param string $commandToken |
24 | 24 | * @param SilverbulletContext $context |
25 | 25 | */ |
26 | - public function __construct($commandToken, $context){ |
|
26 | + public function __construct($commandToken, $context) { |
|
27 | 27 | parent::__construct($commandToken, $context); |
28 | 28 | $this->context = $context; |
29 | 29 | } |
@@ -33,8 +33,8 @@ discard block |
||
33 | 33 | * {@inheritDoc} |
34 | 34 | * @see \web\lib\admin\http\AbstractCommand::execute() |
35 | 35 | */ |
36 | - public function execute(){ |
|
37 | - if(isset($_POST[self::AGREEMENT])){ |
|
36 | + public function execute() { |
|
37 | + if (isset($_POST[self::AGREEMENT])) { |
|
38 | 38 | $this->context->signAgreement(); |
39 | 39 | } |
40 | 40 | $this->context->redirectAfterSubmit(); |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | * @author Zilvinas Vaira |
9 | 9 | * |
10 | 10 | */ |
11 | -class SaveUsersCommand extends AbstractInvokerCommand{ |
|
11 | +class SaveUsersCommand extends AbstractInvokerCommand { |
|
12 | 12 | |
13 | 13 | const COMMAND = 'saveusers'; |
14 | 14 | |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | * @param string $commandToken |
30 | 30 | * @param SilverbulletContext $context |
31 | 31 | */ |
32 | - public function __construct($commandToken, $context){ |
|
32 | + public function __construct($commandToken, $context) { |
|
33 | 33 | parent::__construct($commandToken, $context); |
34 | 34 | $this->context = $context; |
35 | 35 | } |
@@ -39,13 +39,13 @@ discard block |
||
39 | 39 | * {@inheritDoc} |
40 | 40 | * @see \web\lib\admin\http\AbstractCommand::execute() |
41 | 41 | */ |
42 | - public function execute(){ |
|
43 | - if(isset($_POST[self::PARAM_ID]) && isset($_POST[self::PARAM_EXPIRY])){ |
|
42 | + public function execute() { |
|
43 | + if (isset($_POST[self::PARAM_ID]) && isset($_POST[self::PARAM_EXPIRY])) { |
|
44 | 44 | $userIds = $this->parseArray($_POST[self::PARAM_ID]); |
45 | 45 | foreach ($userIds as $key => $userId) { |
46 | 46 | $user = SilverbulletUser::prepare($userId); |
47 | 47 | $user->load(); |
48 | - if(isset($_POST[self::PARAM_ACKNOWLEDGE]) && $_POST[self::PARAM_ACKNOWLEDGE]=='true'){ |
|
48 | + if (isset($_POST[self::PARAM_ACKNOWLEDGE]) && $_POST[self::PARAM_ACKNOWLEDGE] == 'true') { |
|
49 | 49 | $user->makeAcknowledged(); |
50 | 50 | } |
51 | 51 | $user->save(); |
@@ -92,14 +92,14 @@ discard block |
||
92 | 92 | $user = new SilverbulletUser($this->profile->identifier, $username); |
93 | 93 | if(empty($username)){ |
94 | 94 | $command->storeErrorMessage(_('User name should not be empty!')); |
95 | - }elseif(empty($expiry)){ |
|
95 | + } elseif(empty($expiry)){ |
|
96 | 96 | $command->storeErrorMessage(_('No expiry date has been provided!')); |
97 | - }else{ |
|
97 | + } else{ |
|
98 | 98 | $user->setExpiry($expiry); |
99 | 99 | $user->save(); |
100 | 100 | if(empty($user->get(SilverbulletUser::EXPIRY))){ |
101 | 101 | $command->storeErrorMessage(sprintf(_("Expiry date was incorect for '%s'!"), $username)); |
102 | - }elseif(empty($user->getIdentifier())){ |
|
102 | + } elseif(empty($user->getIdentifier())){ |
|
103 | 103 | $command->storeErrorMessage(sprintf(_("Username '%s' already exist!"), $username)); |
104 | 104 | } |
105 | 105 | } |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | foreach ($this->users as $user) { |
147 | 147 | if($user->hasActiveCertificates()){ |
148 | 148 | $count[self::STATS_ACTIVE]++; |
149 | - }else{ |
|
149 | + } else{ |
|
150 | 150 | $count[self::STATS_PASSIVE]++; |
151 | 151 | } |
152 | 152 | } |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | * @author Zilvinas Vaira |
12 | 12 | * |
13 | 13 | */ |
14 | -class SilverbulletContext extends DefaultContext implements MessageDistributor{ |
|
14 | +class SilverbulletContext extends DefaultContext implements MessageDistributor { |
|
15 | 15 | |
16 | 16 | const STATS_TOTAL = 'total'; |
17 | 17 | const STATS_ACTIVE = 'active'; |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | * |
62 | 62 | * @param SilverbulletController $controller |
63 | 63 | */ |
64 | - public function setController($controller){ |
|
64 | + public function setController($controller) { |
|
65 | 65 | $this->controller = $controller; |
66 | 66 | } |
67 | 67 | |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | * |
71 | 71 | * @return ProfileSilverbullet |
72 | 72 | */ |
73 | - public function getProfile(){ |
|
73 | + public function getProfile() { |
|
74 | 74 | return $this->profile; |
75 | 75 | } |
76 | 76 | |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | * |
80 | 80 | * @return InstitutionPageBuilder |
81 | 81 | */ |
82 | - public function getBuilder(){ |
|
82 | + public function getBuilder() { |
|
83 | 83 | return $this->builder; |
84 | 84 | } |
85 | 85 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | * |
89 | 89 | * @return boolean |
90 | 90 | */ |
91 | - public function isAgreementSigned(){ |
|
91 | + public function isAgreementSigned() { |
|
92 | 92 | $agreement_attributes = $this->profile->getAttributes("hiddenprofile:tou_accepted"); |
93 | 93 | return count($agreement_attributes) > 0; |
94 | 94 | } |
@@ -96,8 +96,8 @@ discard block |
||
96 | 96 | /** |
97 | 97 | * Marks agreement as signed inside the database |
98 | 98 | */ |
99 | - public function signAgreement(){ |
|
100 | - $this->profile->addAttribute("hiddenprofile:tou_accepted",NULL,TRUE); |
|
99 | + public function signAgreement() { |
|
100 | + $this->profile->addAttribute("hiddenprofile:tou_accepted", NULL, TRUE); |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | /** |
@@ -108,18 +108,18 @@ discard block |
||
108 | 108 | * @param AbstractInvokerCommand $command |
109 | 109 | * @return SilverbulletUser |
110 | 110 | */ |
111 | - public function createUser($username, $expiry, $command){ |
|
111 | + public function createUser($username, $expiry, $command) { |
|
112 | 112 | $user = new SilverbulletUser($this->profile->identifier, $username); |
113 | - if(empty($username)){ |
|
113 | + if (empty($username)) { |
|
114 | 114 | $command->storeErrorMessage(_('User name should not be empty!')); |
115 | - }elseif(empty($expiry)){ |
|
115 | + }elseif (empty($expiry)) { |
|
116 | 116 | $command->storeErrorMessage(_('No expiry date has been provided!')); |
117 | - }else{ |
|
117 | + } else { |
|
118 | 118 | $user->setExpiry($expiry); |
119 | 119 | $user->save(); |
120 | - if(empty($user->get(SilverbulletUser::EXPIRY))){ |
|
120 | + if (empty($user->get(SilverbulletUser::EXPIRY))) { |
|
121 | 121 | $command->storeErrorMessage(sprintf(_("Expiry date was incorect for '%s'!"), $username)); |
122 | - }elseif(empty($user->getIdentifier())){ |
|
122 | + }elseif (empty($user->getIdentifier())) { |
|
123 | 123 | $command->storeErrorMessage(sprintf(_("Username '%s' already exist!"), $username)); |
124 | 124 | } |
125 | 125 | } |
@@ -133,13 +133,13 @@ discard block |
||
133 | 133 | * @param AbstractInvokerCommand $command |
134 | 134 | * @return SilverbulletInvitation |
135 | 135 | */ |
136 | - public function createInvitation($user, $command, $quantity = 1){ |
|
136 | + public function createInvitation($user, $command, $quantity = 1) { |
|
137 | 137 | $invitation = new SilverbulletInvitation($user); |
138 | - if($quantity > 1){ |
|
138 | + if ($quantity > 1) { |
|
139 | 139 | $invitation->setQuantity($quantity); |
140 | 140 | } |
141 | 141 | $invitation->save(); |
142 | - if(empty($invitation->getIdentifier())){ |
|
142 | + if (empty($invitation->getIdentifier())) { |
|
143 | 143 | $command->storeErrorMessage(_('Could not create invitation!')); |
144 | 144 | } |
145 | 145 | return $invitation; |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | * |
151 | 151 | * @return SilverbulletUser |
152 | 152 | */ |
153 | - public function createUsers(){ |
|
153 | + public function createUsers() { |
|
154 | 154 | $this->users = SilverbulletUser::getList($this->profile->identifier); |
155 | 155 | return $this->users; |
156 | 156 | } |
@@ -160,16 +160,16 @@ discard block |
||
160 | 160 | * |
161 | 161 | * @return array |
162 | 162 | */ |
163 | - public function getUserStats(){ |
|
163 | + public function getUserStats() { |
|
164 | 164 | $silverbulletMaxUsers = $this->profile->getAttributes("internal:silverbullet_maxusers"); |
165 | 165 | $count = array(); |
166 | 166 | $count[self::STATS_TOTAL] = isset($silverbulletMaxUsers[0]['value']) ? $silverbulletMaxUsers[0]['value'] : -1; |
167 | 167 | $count[self::STATS_ACTIVE] = 0; |
168 | 168 | $count[self::STATS_PASSIVE] = 0; |
169 | 169 | foreach ($this->users as $user) { |
170 | - if($user->hasActiveCertificates()){ |
|
170 | + if ($user->hasActiveCertificates()) { |
|
171 | 171 | $count[self::STATS_ACTIVE]++; |
172 | - }else{ |
|
172 | + } else { |
|
173 | 173 | $count[self::STATS_PASSIVE]++; |
174 | 174 | } |
175 | 175 | } |
@@ -179,10 +179,10 @@ discard block |
||
179 | 179 | /** |
180 | 180 | * Redirects page to itself in order to prevent acidental form resubmition |
181 | 181 | */ |
182 | - public function redirectAfterSubmit(){ |
|
183 | - if(isset($_SERVER['REQUEST_URI'])){ |
|
182 | + public function redirectAfterSubmit() { |
|
183 | + if (isset($_SERVER['REQUEST_URI'])) { |
|
184 | 184 | $location = $this->addQuery($_SERVER['SCRIPT_NAME']); |
185 | - header('Location: ' . $location ); |
|
185 | + header('Location: ' . $location); |
|
186 | 186 | exit; |
187 | 187 | } |
188 | 188 | } |
@@ -193,11 +193,11 @@ discard block |
||
193 | 193 | * @param string $url |
194 | 194 | * @return string |
195 | 195 | */ |
196 | - public function addQuery($url){ |
|
196 | + public function addQuery($url) { |
|
197 | 197 | $query = ''; |
198 | 198 | if (is_array($_GET) && count($_GET)) { |
199 | - foreach($_GET as $key => $val) { |
|
200 | - if(strpos($key , '/') === false){ |
|
199 | + foreach ($_GET as $key => $val) { |
|
200 | + if (strpos($key, '/') === false) { |
|
201 | 201 | if (empty($key) || empty($val)) { continue; } |
202 | 202 | $query .= ($query == '') ? '?' : "&"; |
203 | 203 | $query .= urlencode($key) . '=' . urlencode($val); |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | * {@inheritDoc} |
213 | 213 | * @see \web\lib\admin\http\MessageDistributor::addMessageInvoker() |
214 | 214 | */ |
215 | - public function addMessageInvoker($commandToken, $invoker){ |
|
215 | + public function addMessageInvoker($commandToken, $invoker) { |
|
216 | 216 | $this->invokers[$commandToken] = $invoker; |
217 | 217 | } |
218 | 218 | |
@@ -221,10 +221,10 @@ discard block |
||
221 | 221 | * {@inheritDoc} |
222 | 222 | * @see \web\lib\admin\http\MessageDistributor::distributeMessages() |
223 | 223 | */ |
224 | - public function distributeMessages($commandToken, $receiver){ |
|
225 | - if($this->controller != null){ |
|
224 | + public function distributeMessages($commandToken, $receiver) { |
|
225 | + if ($this->controller != null) { |
|
226 | 226 | $this->controller->createCommand($commandToken); |
227 | - if(isset($this->invokers[$commandToken])){ |
|
227 | + if (isset($this->invokers[$commandToken])) { |
|
228 | 228 | $this->invokers[$commandToken]->publishMessages($receiver); |
229 | 229 | } |
230 | 230 | } |
@@ -35,8 +35,8 @@ discard block |
||
35 | 35 | switch ($page) { |
36 | 36 | case 'about' : |
37 | 37 | require_once(dirname(dirname(dirname(dirname(__FILE__)))) . "/user/about_cat.inc.php"); |
38 | - $out = "<div>$out</div>"; |
|
39 | - break; |
|
38 | + $out = "<div>$out</div>"; |
|
39 | + break; |
|
40 | 40 | case 'tou': |
41 | 41 | require_once(dirname(dirname(dirname(dirname(__FILE__)))) . "/user/tou.inc.php"); |
42 | 42 | $out = "no_title<div> |
@@ -62,18 +62,18 @@ discard block |
||
62 | 62 | case 'what_is_eduroam' : |
63 | 63 | $out = "no_title<div><h1>" . _("Help") . "</h1>"; |
64 | 64 | foreach ($Faq as $faqItem) { |
65 | - if (!empty($faqItem['id']) && $faqItem['id'] == $subpage) { |
|
66 | - $out .= "<div><h3>" . $faqItem['title'] . "</h3>\n"; |
|
67 | - $out .= "" . $faqItem['text'] . "</div>\n"; |
|
68 | - } |
|
65 | + if (!empty($faqItem['id']) && $faqItem['id'] == $subpage) { |
|
66 | + $out .= "<div><h3>" . $faqItem['title'] . "</h3>\n"; |
|
67 | + $out .= "" . $faqItem['text'] . "</div>\n"; |
|
68 | + } |
|
69 | 69 | } |
70 | 70 | $out .= "</div>"; |
71 | 71 | break; |
72 | 72 | case 'faq': |
73 | 73 | $out = "no_title<div><h1>" . _("Frequently Asked Questions") . "</h1>"; |
74 | 74 | foreach ($Faq as $faqItem) { |
75 | - $out .= "<div><h3>" . $faqItem['title'] . "</h3>\n"; |
|
76 | - $out .= "" . $faqItem['text'] . "</div>\n"; |
|
75 | + $out .= "<div><h3>" . $faqItem['title'] . "</h3>\n"; |
|
76 | + $out .= "" . $faqItem['text'] . "</div>\n"; |
|
77 | 77 | } |
78 | 78 | $out .= "</div>"; |
79 | 79 | break; |
@@ -97,10 +97,10 @@ discard block |
||
97 | 97 | $out .= _("Please authenticate yourself and login"); |
98 | 98 | } |
99 | 99 | $out .= "<p><button onclick='goAdmin(); return(false);'>" . _("Login") . "</button>"; |
100 | - } |
|
101 | - break; |
|
102 | - } |
|
103 | - break; |
|
100 | + } |
|
101 | + break; |
|
102 | + } |
|
103 | + break; |
|
104 | 104 | default: |
105 | 105 | break; |
106 | 106 | } |
@@ -29,7 +29,7 @@ |
||
29 | 29 | $Gui->langObject->setTextDomain("web_user"); |
30 | 30 | |
31 | 31 | $page = $_REQUEST['page']; |
32 | -$subpage= $_REQUEST['subpage']; |
|
32 | +$subpage = $_REQUEST['subpage']; |
|
33 | 33 | switch ($page) { |
34 | 34 | case 'about' : |
35 | 35 | require_once(dirname(dirname(dirname(dirname(__FILE__)))) . "/user/about_cat.inc.php"); |
@@ -19,7 +19,7 @@ |
||
19 | 19 | |
20 | 20 | // extract request parameters; action is mandatory |
21 | 21 | if(!isset($_REQUEST['action'])) { |
22 | - exit; |
|
22 | + exit; |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | $action = $_REQUEST['action']; |
@@ -14,24 +14,24 @@ discard block |
||
14 | 14 | * |
15 | 15 | * @package UserAPI |
16 | 16 | */ |
17 | -include(dirname(dirname(dirname(__FILE__)))."/config/_config.php"); |
|
17 | +include(dirname(dirname(dirname(__FILE__))) . "/config/_config.php"); |
|
18 | 18 | $API = new \core\UserAPI(); |
19 | 19 | |
20 | 20 | // extract request parameters; action is mandatory |
21 | -if(!isset($_REQUEST['action'])) { |
|
21 | +if (!isset($_REQUEST['action'])) { |
|
22 | 22 | exit; |
23 | 23 | } |
24 | 24 | |
25 | 25 | $action = $_REQUEST['action']; |
26 | -$id = ( isset($_REQUEST['id']) ? $_REQUEST['id'] : FALSE ); |
|
27 | -$lang = ( isset($_REQUEST['lang']) ? $_REQUEST['lang'] : FALSE ); |
|
28 | -$profile = ( isset($_REQUEST['profile']) ? $_REQUEST['profile'] : FALSE ); |
|
29 | -$disco = ( isset($_REQUEST['disco']) ? $_REQUEST['disco'] : FALSE ); |
|
30 | -$sort = ( isset($_REQUEST['sort']) ? $_REQUEST['sort'] : 0 ); |
|
31 | -$generatedfor = ( isset($_REQUEST['generatedfor']) ? $_REQUEST['generatedfor'] : 'user' ); |
|
26 | +$id = (isset($_REQUEST['id']) ? $_REQUEST['id'] : FALSE); |
|
27 | +$lang = (isset($_REQUEST['lang']) ? $_REQUEST['lang'] : FALSE); |
|
28 | +$profile = (isset($_REQUEST['profile']) ? $_REQUEST['profile'] : FALSE); |
|
29 | +$disco = (isset($_REQUEST['disco']) ? $_REQUEST['disco'] : FALSE); |
|
30 | +$sort = (isset($_REQUEST['sort']) ? $_REQUEST['sort'] : 0); |
|
31 | +$generatedfor = (isset($_REQUEST['generatedfor']) ? $_REQUEST['generatedfor'] : 'user'); |
|
32 | 32 | |
33 | 33 | $loggerInstance = new \core\Logging(); |
34 | -$loggerInstance->debug(4,"cat_back action: ".$action.':'.$id.':'.$lang.':'.$profile.':'.$disco."\n"); |
|
34 | +$loggerInstance->debug(4, "cat_back action: " . $action . ':' . $id . ':' . $lang . ':' . $profile . ':' . $disco . "\n"); |
|
35 | 35 | |
36 | 36 | switch ($action) { |
37 | 37 | case 'listLanguages': |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | if ($id === FALSE) { |
51 | 51 | exit; |
52 | 52 | } |
53 | - $API->JSON_listProfiles($id,$sort); |
|
53 | + $API->JSON_listProfiles($id, $sort); |
|
54 | 54 | break; |
55 | 55 | case 'listDevices': |
56 | 56 | $API->JSON_listDevices($id); |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | } |
68 | 68 | $validator = new \web\lib\common\InputValidation(); |
69 | 69 | $device = $validator->Device($id); // throws an Exception if unknown |
70 | - $API->downloadInstaller($device, $profile,$generatedfor); |
|
70 | + $API->downloadInstaller($device, $profile, $generatedfor); |
|
71 | 71 | break; |
72 | 72 | case 'profileAttributes': // needs $id set |
73 | 73 | if ($id === FALSE) { |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | ?> |
11 | 11 | <?php |
12 | 12 | function escaped_echo($s) { |
13 | - echo preg_replace('/"/','"',$s); |
|
13 | + echo preg_replace('/"/','"',$s); |
|
14 | 14 | } |
15 | 15 | |
16 | 16 | $langObject = new \core\common\Language(); |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | if (! is_numeric($profileId)) { |
24 | 24 | exit; |
25 | 25 | } |
26 | - ?> |
|
26 | + ?> |
|
27 | 27 | var n; |
28 | 28 | var profile; |
29 | 29 | // var device_button_bg ="#0a698e"; |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | } |
346 | 346 | |
347 | 347 | <?php if($idpId) { |
348 | - print "front_page = 0;\n"; |
|
348 | + print "front_page = 0;\n"; |
|
349 | 349 | } ?> |
350 | 350 | |
351 | 351 | function showTOU(){ |
@@ -421,7 +421,7 @@ discard block |
||
421 | 421 | if ($profileId) { |
422 | 422 | print "listProfiles($idpId,$profileId);"; |
423 | 423 | } |
424 | - ?> |
|
424 | + ?> |
|
425 | 425 | |
426 | 426 | $(".signin").click(function(event){ |
427 | 427 | event.preventDefault(); |
@@ -500,12 +500,12 @@ discard block |
||
500 | 500 | }); |
501 | 501 | DiscoJuice.Constants.Countries = { |
502 | 502 | <?php |
503 | - $C = $Gui->printCountryList(1); |
|
504 | - $ret = ''; |
|
505 | - foreach ($C as $key => $val) { |
|
503 | + $C = $Gui->printCountryList(1); |
|
504 | + $ret = ''; |
|
505 | + foreach ($C as $key => $val) { |
|
506 | 506 | $ret .= "'$key': \"$val\","; |
507 | - } |
|
508 | - echo substr($ret, 0, -1); |
|
507 | + } |
|
508 | + echo substr($ret, 0, -1); |
|
509 | 509 | ?> |
510 | 510 | }; |
511 | 511 |
@@ -10,18 +10,18 @@ discard block |
||
10 | 10 | ?> |
11 | 11 | <?php |
12 | 12 | function escaped_echo($s) { |
13 | - echo preg_replace('/"/','"',$s); |
|
13 | + echo preg_replace('/"/', '"', $s); |
|
14 | 14 | } |
15 | 15 | |
16 | 16 | $langObject = new \core\common\Language(); |
17 | 17 | $langObject->setTextDomain('web_user'); |
18 | 18 | $cat = new core\CAT(); |
19 | 19 | $idpId = empty($_REQUEST['idp']) ? 0 : $_REQUEST['idp']; |
20 | -if (! is_numeric($idpId)) { |
|
20 | +if (!is_numeric($idpId)) { |
|
21 | 21 | exit; |
22 | 22 | } |
23 | 23 | $profileId = empty($_REQUEST['profile']) ? 0 : $_REQUEST['profile']; |
24 | -if (! is_numeric($profileId)) { |
|
24 | +if (!is_numeric($profileId)) { |
|
25 | 25 | exit; |
26 | 26 | } |
27 | 27 | ?> |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | result = j.status; |
71 | 71 | if(! result) { |
72 | 72 | alert("<?php escaped_echo(_("no matching data found"))?>"); |
73 | - document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']),'/').'/'?>'; |
|
73 | + document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') . '/'?>'; |
|
74 | 74 | } |
75 | 75 | j = j.data; |
76 | 76 | n = j.length; |
@@ -187,8 +187,8 @@ discard block |
||
187 | 187 | j1 = $.parseJSON(data); |
188 | 188 | result = j1.status; |
189 | 189 | if(! result) { |
190 | - alert("<?php escaped_echo( _("no matching data found"))?>"); |
|
191 | - document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']),'/').'/'?>'; |
|
190 | + alert("<?php escaped_echo(_("no matching data found"))?>"); |
|
191 | + document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') . '/'?>'; |
|
192 | 192 | } |
193 | 193 | j = j1.data; |
194 | 194 | if(j.description !== undefined && j.description) { |
@@ -199,15 +199,15 @@ discard block |
||
199 | 199 | $("#profile_desc").text(''); |
200 | 200 | } |
201 | 201 | if(j.local_url !== undefined && j.local_url) |
202 | - txt = txt+'<tr><td><?php escaped_echo(_("WWW:"));?></td><td><a href="'+j.local_url+'" target="_blank">'+j.local_url+'</a></td></tr>'; |
|
202 | + txt = txt+'<tr><td><?php escaped_echo(_("WWW:")); ?></td><td><a href="'+j.local_url+'" target="_blank">'+j.local_url+'</a></td></tr>'; |
|
203 | 203 | if(j.local_email !== undefined && j.local_email) |
204 | - txt = txt+'<tr><td><?php escaped_echo(_("email:"));?></td><td><a href=mailto:"'+j.local_email+'">'+j.local_email+'</a></td></tr>'; |
|
204 | + txt = txt+'<tr><td><?php escaped_echo(_("email:")); ?></td><td><a href=mailto:"'+j.local_email+'">'+j.local_email+'</a></td></tr>'; |
|
205 | 205 | if(j.local_phone !== undefined && j.local_phone) |
206 | - txt = txt+'<tr><td><?php escaped_echo(_("tel:"));?></td><td>'+j.local_phone+'</td></tr>'; |
|
206 | + txt = txt+'<tr><td><?php escaped_echo(_("tel:")); ?></td><td>'+j.local_phone+'</td></tr>'; |
|
207 | 207 | if(txt) |
208 | - txt = "<table><tr><th colspan='2'><?php escaped_echo(sprintf(_("If you encounter problems, then you can obtain direct assistance from your %s at:"),$cat->nomenclature_inst)); ?></th></tr>"+txt+'</table>'; |
|
208 | + txt = "<table><tr><th colspan='2'><?php escaped_echo(sprintf(_("If you encounter problems, then you can obtain direct assistance from your %s at:"), $cat->nomenclature_inst)); ?></th></tr>"+txt+'</table>'; |
|
209 | 209 | else |
210 | - txt = "<table><tr><th colspan='2'><?php escaped_echo(sprintf(_("If you encounter problems you should ask for help at your %s"),$cat->nomenclature_inst)); ?>.</th></tr></table>"; |
|
210 | + txt = "<table><tr><th colspan='2'><?php escaped_echo(sprintf(_("If you encounter problems you should ask for help at your %s"), $cat->nomenclature_inst)); ?>.</th></tr></table>"; |
|
211 | 211 | $("#user_info").html(txt); |
212 | 212 | $("#user_info").show(); |
213 | 213 | resetDevices(); |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | $("#g_"+v.id).addClass('alertButton'); |
221 | 221 | $("#cross_icon_"+v.id).show(); |
222 | 222 | $("#"+v.id).addClass('disabledDevice'); |
223 | - $("#download_button_header_"+v.id).html("<?php escaped_echo(sprintf(_("This device cannot be configured with settings provided by your %s"),$cat->nomenclature_inst))?>"); |
|
223 | + $("#download_button_header_"+v.id).html("<?php escaped_echo(sprintf(_("This device cannot be configured with settings provided by your %s"), $cat->nomenclature_inst))?>"); |
|
224 | 224 | $("#info_b_"+v.id+",#g_info_b_"+v.id).hide(); |
225 | 225 | } else { |
226 | 226 | if(v.status == -1) |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | $("#"+v.id+",#g_"+v.id).addClass('additionalInfo'); |
233 | 233 | $("#"+v.id+",#g_"+v.id).click(function(event){ |
234 | 234 | i_div = $("#info_"+$(this).attr('id')); |
235 | - t = "<?php escaped_echo(_("Your site administrator has specified that this device should be configured with resources located on a local page. When you click <b>Continue</b> this page will be opened in a new window/tab."))?>"+"<br><span class='redirect_link'><a href='"+v.redirect+"' target='_blank'><?php escaped_echo(_("Continue"));?></a></span>"; |
|
235 | + t = "<?php escaped_echo(_("Your site administrator has specified that this device should be configured with resources located on a local page. When you click <b>Continue</b> this page will be opened in a new window/tab."))?>"+"<br><span class='redirect_link'><a href='"+v.redirect+"' target='_blank'><?php escaped_echo(_("Continue")); ?></a></span>"; |
|
236 | 236 | i_div.html(t); |
237 | 237 | $(".redirect_link").click(function(event) { |
238 | 238 | i_div.hide(); |
@@ -240,13 +240,13 @@ discard block |
||
240 | 240 | |
241 | 241 | }); |
242 | 242 | } else if(v.device_customtext != '0' || v.eap_customtext != '0' || v.message != '0' || v.status > 0) { |
243 | - var continue_text = "<?php escaped_echo(_("Continue"));?>"; |
|
243 | + var continue_text = "<?php escaped_echo(_("Continue")); ?>"; |
|
244 | 244 | $("#"+v.id+",#g_"+v.id).addClass('additionalInfo'); |
245 | 245 | $("#"+v.id+",#g_"+v.id).click(function(event){ |
246 | 246 | i_div = $("#info_"+$(this).attr('id')); |
247 | 247 | if(v.status > 0) { |
248 | - t = "<?php escaped_echo(sprintf(_("This device cannot be configured with settings provided by your %s"),$cat->nomenclature_inst))?>"; |
|
249 | - continue_text = "<?php escaped_echo(_("Close"));?>"; |
|
248 | + t = "<?php escaped_echo(sprintf(_("This device cannot be configured with settings provided by your %s"), $cat->nomenclature_inst))?>"; |
|
249 | + continue_text = "<?php escaped_echo(_("Close")); ?>"; |
|
250 | 250 | } else { |
251 | 251 | t = i_div.html(); |
252 | 252 | if(v.message != '0') { |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | } |
302 | 302 | |
303 | 303 | function infoCAT(k,subK,title) { |
304 | - $.post('<?php echo $Gui->skinObject->findResourceUrl("BASE","user/cat_info.php")?>', {page: k, subpage: subK, lang: lang}, function(data) { |
|
304 | + $.post('<?php echo $Gui->skinObject->findResourceUrl("BASE", "user/cat_info.php")?>', {page: k, subpage: subK, lang: lang}, function(data) { |
|
305 | 305 | if(data.substring(0,8) == 'no_title') { |
306 | 306 | data = data.substring(8,data.length); |
307 | 307 | } else { |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | $("#loading_ico").css('left',x+'px'); |
324 | 324 | $("#loading_ico").attr('src','resources/images/icons/loading9.gif'); |
325 | 325 | $("#loading_ico").show(); |
326 | - window.location.replace("<?php echo $Gui->skinObject->findResourceUrl("BASE","admin/overview_user.php")?>?lang="+lang); |
|
326 | + window.location.replace("<?php echo $Gui->skinObject->findResourceUrl("BASE", "admin/overview_user.php")?>?lang="+lang); |
|
327 | 327 | } |
328 | 328 | |
329 | 329 | |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | return(Math.round(windowWidth/2)); |
346 | 346 | } |
347 | 347 | |
348 | -<?php if($idpId) { |
|
348 | +<?php if ($idpId) { |
|
349 | 349 | print "front_page = 0;\n"; |
350 | 350 | } ?> |
351 | 351 | |
@@ -384,10 +384,10 @@ discard block |
||
384 | 384 | $("#download_info a").attr('href',download_link); |
385 | 385 | $('#download_info').show(); |
386 | 386 | if( generateTimer > 0 ) { |
387 | - setTimeout("document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']),'/')?>'+'/'+download_link",generateTimer); |
|
387 | + setTimeout("document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/')?>'+'/'+download_link",generateTimer); |
|
388 | 388 | } |
389 | 389 | else { |
390 | - document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']),'/')?>'+'/'+download_link; |
|
390 | + document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/')?>'+'/'+download_link; |
|
391 | 391 | } |
392 | 392 | } |
393 | 393 | } |
@@ -460,13 +460,13 @@ discard block |
||
460 | 460 | "overlay":true,"cookie":true,"type":false, |
461 | 461 | "country":true,"location":true, |
462 | 462 | "title":"<?php escaped_echo($cat->nomenclature_inst) ?>", |
463 | - "subtitle":"<?php escaped_echo(sprintf(_("Select your <strong>%s<\/strong>"),$cat->nomenclature_inst)) ?>", |
|
464 | - "textHelp": "<?php escaped_echo(sprintf(_("Help, my %s is not on the list"),$cat->nomenclature_inst)) ?>", |
|
465 | - "textHelpMore": "<?php escaped_echo(sprintf(_("This system relies on information supplied by local %s administrators. If your %s is not on the list, then nag them to add information to the %s database."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $cat->nomenclature_inst, CONFIG['APPEARANCE']['productname'])); ?>", |
|
463 | + "subtitle":"<?php escaped_echo(sprintf(_("Select your <strong>%s<\/strong>"), $cat->nomenclature_inst)) ?>", |
|
464 | + "textHelp": "<?php escaped_echo(sprintf(_("Help, my %s is not on the list"), $cat->nomenclature_inst)) ?>", |
|
465 | + "textHelpMore": "<?php escaped_echo(sprintf(_("This system relies on information supplied by local %s administrators. If your %s is not on the list, then nag them to add information to the %s database."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $cat->nomenclature_inst, CONFIG['APPEARANCE']['productname'])); ?>", |
|
466 | 466 | "textLocateMe": "<?php escaped_echo(_("Locate me more accurately using HTML5 Geo-Location")) ?>", |
467 | 467 | "textShowProviders": "<?php escaped_echo(sprintf(_("Show %ss in"), $cat->nomenclature_inst)) ?>", |
468 | 468 | "textAllCountries": "<?php escaped_echo(_("all countries")) ?>", |
469 | - "textSearch" : "<?php escaped_echo(sprintf(_("or search for an %s, in example Univerity of Oslo"),$cat->nomenclature_inst)) ?>", |
|
469 | + "textSearch" : "<?php escaped_echo(sprintf(_("or search for an %s, in example Univerity of Oslo"), $cat->nomenclature_inst)) ?>", |
|
470 | 470 | "textShowAllCountries": "<?php escaped_echo(_("show all countries")) ?>", |
471 | 471 | "textLimited1" : "<?php escaped_echo(_("Results limited to"))?>", |
472 | 472 | "textLimited2" : "<?php escaped_echo(_("entries - show more"))?>", |