Révision 60a5f9de
Ajouté par N0YB il y a presque 10 ans
usr/local/www/system_advanced_admin.php | ||
---|---|---|
355 | 355 |
<td width="78%" class="vtable"> |
356 | 356 |
<select name="ssl-certref" id="ssl-certref" class="formselect"> |
357 | 357 |
<?php |
358 |
$rowIndex = 0; |
|
359 | 358 |
foreach($a_cert as $cert): |
360 |
$selected = ""; |
|
361 | 359 |
if ($pconfig['ssl-certref'] == $cert['refid']) |
362 | 360 |
$selected = "selected=\"selected\""; |
363 |
$rowIndex++; |
|
364 | 361 |
?> |
365 | 362 |
<option value="<?=$cert['refid'];?>" <?=$selected;?>><?=$cert['descr'];?></option> |
366 |
<?php endforeach; |
|
367 |
if ($rowIndex == 0) |
|
363 |
<?php |
|
364 |
endforeach; |
|
365 |
if (!count($a_cert)) |
|
368 | 366 |
echo "<option></option>"; |
369 | 367 |
?> |
370 | 368 |
</select> |
usr/local/www/system_usermanager.php | ||
---|---|---|
748 | 748 |
<select name='keylen' class="formselect"> |
749 | 749 |
<?php |
750 | 750 |
$cert_keylens = array( "2048", "512", "1024", "4096"); |
751 |
$rowIndex = 0; |
|
752 | 751 |
foreach( $cert_keylens as $len): |
753 |
$rowIndex++; |
|
754 | 752 |
?> |
755 | 753 |
<option value="<?=$len;?>"><?=$len;?></option> |
756 |
<?php endforeach; |
|
757 |
if ($rowIndex == 0) |
|
758 |
echo "<option></option>"; |
|
759 |
?> |
|
754 |
<?php |
|
755 |
endforeach; |
|
756 |
if (!count($cert_keylens)) |
|
757 |
echo "<option></option>"; |
|
758 |
?> |
|
760 | 759 |
</select> |
761 | 760 |
bits |
762 | 761 |
</td> |
Formats disponibles : Unified diff
Use count($array) where applicable, instead of a $rowIndex increment.