@@ -149,8 +149,7 @@ discard block |
||
149 | 149 | <?php |
150 | 150 | if ($session['access_start_date'] == '00-00-0000' && $session['access_end_date']== '00-00-0000' ) { |
151 | 151 | echo get_lang('NoTimeLimits'); |
152 | - } |
|
153 | - else { |
|
152 | + } else { |
|
154 | 153 | if ($session['access_start_date'] != '00-00-0000') { |
155 | 154 | //$session['date_start'] = Display::tag('i', get_lang('NoTimeLimits')); |
156 | 155 | $session['access_start_date'] = get_lang('From').' '.$session['access_start_date']; |
@@ -189,12 +188,18 @@ discard block |
||
189 | 188 | <?php echo api_ucfirst(get_lang('SessionVisibility')) ?> : |
190 | 189 | </td> |
191 | 190 | <td> |
192 | - <?php if ($session['visibility']==1) echo get_lang('ReadOnly'); elseif($session['visibility']==2) echo get_lang('Visible');elseif($session['visibility']==3) echo api_ucfirst(get_lang('Invisible')) ?> |
|
191 | + <?php if ($session['visibility']==1) { |
|
192 | + echo get_lang('ReadOnly'); |
|
193 | +} elseif($session['visibility']==2) { |
|
194 | + echo get_lang('Visible'); |
|
195 | +} elseif($session['visibility']==3) { |
|
196 | + echo api_ucfirst(get_lang('Invisible')) ?> |
|
193 | 197 | </td> |
194 | 198 | </tr> |
195 | 199 | <?php |
196 | 200 | |
197 | 201 | $multiple_url_is_on = api_get_multiple_access_url(); |
202 | +} |
|
198 | 203 | if ($multiple_url_is_on) { |
199 | 204 | echo '<tr><td>'; |
200 | 205 | echo 'URL'; |
@@ -477,7 +477,10 @@ discard block |
||
477 | 477 | <div class="actions"> |
478 | 478 | <?php echo $link_add_type_unique ?> | <?php echo $link_add_type_multiple ?> | <?php echo $link_add_group; ?> |
479 | 479 | </div> |
480 | - <form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?page=<?php echo $page; ?>&id_session=<?php echo $id_session; ?><?php if(!empty($_GET['add'])) echo '&add=true' ; ?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>> |
|
480 | + <form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?page=<?php echo $page; ?>&id_session=<?php echo $id_session; ?><?php if(!empty($_GET['add'])) { |
|
481 | + echo '&add=true' ; |
|
482 | +} |
|
483 | +?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>> |
|
481 | 484 | <?php echo '<legend>'.$tool_name.' ('.$session_info['name'].') </legend>'; ?> |
482 | 485 | <?php |
483 | 486 | if ($add_type == 'multiple') { |
@@ -545,7 +548,10 @@ discard block |
||
545 | 548 | <?php |
546 | 549 | foreach ($nosessionUsersList as $uid => $enreg) { |
547 | 550 | ?> |
548 | - <option value="<?php echo $uid; ?>" <?php if(in_array($uid,$UserList)) echo 'selected="selected"'; ?>><?php echo api_get_person_name($enreg['fn'], $enreg['ln']).' ('.$enreg['un'].')'; ?></option> |
|
551 | + <option value="<?php echo $uid; ?>" <?php if(in_array($uid,$UserList)) { |
|
552 | + echo 'selected="selected"'; |
|
553 | +} |
|
554 | +?>><?php echo api_get_person_name($enreg['fn'], $enreg['ln']).' ('.$enreg['un'].')'; ?></option> |
|
549 | 555 | <?php |
550 | 556 | } |
551 | 557 | ?> |
@@ -4,8 +4,9 @@ |
||
4 | 4 | require_once dirname(__FILE__).'/../../inc/global.inc.php'; |
5 | 5 | $url = api_get_path(WEB_PATH).'main/auth/conditional_login/complete_phone_number.php'; |
6 | 6 | |
7 | -if (! isset($_SESSION['conditional_login']['uid'])) |
|
7 | +if (! isset($_SESSION['conditional_login']['uid'])) { |
|
8 | 8 | die("Not Authorised"); |
9 | +} |
|
9 | 10 | ?> |
10 | 11 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
11 | 12 | <html lang="fr" xml:lang="fr" xmlns="http://www.w3.org/1999/xhtml"> |
@@ -144,7 +144,10 @@ |
||
144 | 144 | echo '</div>'; |
145 | 145 | ?> |
146 | 146 | |
147 | -<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if(!empty($_GET['add'])) echo '&add=true' ; ?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>> |
|
147 | +<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if(!empty($_GET['add'])) { |
|
148 | + echo '&add=true' ; |
|
149 | +} |
|
150 | +?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>> |
|
148 | 151 | <?php echo '<legend>'.$tool_name.' '.$promotion_data['name'].'</legend>'; |
149 | 152 | |
150 | 153 | if ($add_type=='multiple') { |
@@ -144,7 +144,10 @@ |
||
144 | 144 | echo '</div>'; |
145 | 145 | ?> |
146 | 146 | |
147 | -<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if(!empty($_GET['add'])) echo '&add=true' ; ?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>> |
|
147 | +<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if(!empty($_GET['add'])) { |
|
148 | + echo '&add=true' ; |
|
149 | +} |
|
150 | +?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>> |
|
148 | 151 | <?php echo '<legend>'.$tool_name.' '.$promotion_data['name'].'</legend>'; |
149 | 152 | |
150 | 153 | if ($add_type=='multiple') { |
@@ -119,8 +119,9 @@ |
||
119 | 119 | |
120 | 120 | for ($i = 0; $i<count($matches[0]); $i++) { |
121 | 121 | |
122 | - if (empty($matches[1][$i])) |
|
123 | - continue; |
|
122 | + if (empty($matches[1][$i])) { |
|
123 | + continue; |
|
124 | + } |
|
124 | 125 | |
125 | 126 | $content = api_strstr($content, $matches[0][$i]); |
126 | 127 | if ($i + 1 !== count($matches[0])) { |
@@ -454,7 +454,10 @@ |
||
454 | 454 | <blockquote> |
455 | 455 | <pre> |
456 | 456 | <b>UserName</b>;LastName;FirstName;Email;NewUserName;Password;AuthSource;OfficialCode;PhoneNumber;Status;ExpiryDate;Active;Language;Courses;ClassId; |
457 | - xxx;xxx;xxx;xxx;xxx;xxx;xxx;xxx;xxx;user/teacher/drh;0000-00-00 00:00:00;0/1;xxx;<span style="color:red;"><?php if (count($list_reponse) > 0) echo implode(';', $list_reponse).';'; ?></span>xxx1|xxx2|xxx3;1;<br /> |
|
457 | + xxx;xxx;xxx;xxx;xxx;xxx;xxx;xxx;xxx;user/teacher/drh;0000-00-00 00:00:00;0/1;xxx;<span style="color:red;"><?php if (count($list_reponse) > 0) { |
|
458 | + echo implode(';', $list_reponse).';'; |
|
459 | +} |
|
460 | +?></span>xxx1|xxx2|xxx3;1;<br /> |
|
458 | 461 | </pre> |
459 | 462 | </blockquote> |
460 | 463 | <p><?php |
@@ -434,8 +434,7 @@ |
||
434 | 434 | } else { |
435 | 435 | echo $question->options[2]; |
436 | 436 | } |
437 | - } |
|
438 | - else { |
|
437 | + } else { |
|
439 | 438 | echo '-'; |
440 | 439 | } |
441 | 440 | ?> |
@@ -734,7 +734,9 @@ discard block |
||
734 | 734 | WHERE user_id='$id'"; |
735 | 735 | $result = Database::query($sql); |
736 | 736 | $res = Database::fetch_array($result); |
737 | - if (!$res) return false; |
|
737 | + if (!$res) { |
|
738 | + return false; |
|
739 | + } |
|
738 | 740 | |
739 | 741 | return stripslashes($res['username']); |
740 | 742 | } |
@@ -810,10 +812,15 @@ discard block |
||
810 | 812 | "; |
811 | 813 | $result = Database::query($sql); |
812 | 814 | |
813 | - if (!($res = Database::fetch_array($result))) |
|
814 | - die(get_lang('GeneralError').' (code 901)'); |
|
815 | - if ($owner == 0) return $res['uploader_id']; |
|
816 | - if ($res['uploader_id'] == $owner) return true; |
|
815 | + if (!($res = Database::fetch_array($result))) { |
|
816 | + die(get_lang('GeneralError').' (code 901)'); |
|
817 | + } |
|
818 | + if ($owner == 0) { |
|
819 | + return $res['uploader_id']; |
|
820 | + } |
|
821 | + if ($res['uploader_id'] == $owner) { |
|
822 | + return true; |
|
823 | + } |
|
817 | 824 | die(get_lang('GeneralError').' (code '.$or_die.')'); |
818 | 825 | } |
819 | 826 |