Commit 4a8b6cae authored by Franco Fichtner's avatar Franco Fichtner

src: unify php opening tags, ze part nummer 1 of two

parent 6b4d81af
......@@ -205,7 +205,7 @@ function backup_config_section($section_name) {
return $xmlconfig;
}
/* KEEP THIS: unbreaks syntax highlighting <? */
/* KEEP THIS: unbreaks syntax highlighting <?php */
/*
* restore_config_section($section_name, new_contents): restore a configuration section,
......
......@@ -112,7 +112,7 @@ include("head.inc");
print_info_box($savemsg);
} ?>
<?PHP if ($carp_detected_problems) {
<?php if ($carp_detected_problems) {
print_info_box(gettext("CARP has detected a problem and this unit has been demoted to BACKUP status.") . "<br />" . gettext("Check link status on all interfaces with configured CARP VIPs."));
} ?>
......
......@@ -709,7 +709,7 @@ function backuparea_change(obj) {
<th class="col-sm-3"></th>
</thead>
<tbody>
<tr><td><?=gettext("Enable"); ?> </td> <td><input name="GDriveEnabled" class="formcheckbox" id="GDriveEnabled" type="checkbox" <? if( $config['system']['remotebackup']['GDriveEnabled'] == "on" ) echo "checked";?> > </td></tr>
<tr><td><?=gettext("Enable"); ?> </td> <td><input name="GDriveEnabled" class="formcheckbox" id="GDriveEnabled" type="checkbox" <?php if( $config['system']['remotebackup']['GDriveEnabled'] == "on" ) echo "checked";?> > </td></tr>
<tr><td><?=gettext("Email Address"); ?> </td><td><input name="GDriveEmail" class="formfld" size="20" value="<? echo $config['system']['remotebackup']['GDriveEmail'];?>" type="text"> </td> </tr>
<tr><td><?=gettext("P12 key"); ?> <? if (isset($config['system']['remotebackup']['GDriveP12key'])) echo gettext("(replace)"); else echo gettext("(not loaded)"); ?> </td><td> <input name="GDriveP12file" class="formbtn" id="P12file" size="40" type="file"></td> </tr>
<tr><td><?=gettext("Folder ID"); ?> </td><td> <input name="GDriveFolderID" class="formbtn" id="GDriveFolderID" value="<? echo $config['system']['remotebackup']['GDriveFolderID'];?>" size="40" type="text"></td> </tr>
......
<? include("index.php"); ?>
......@@ -253,8 +253,8 @@ if (isset($config['ipsec']['enable']) || isset($config['ipsec']['client']['enabl
<object data="graph.php?ifnum=<?=htmlspecialchars($curif);?>&amp;ifname=<?=rawurlencode($ifdescrs[htmlspecialchars($curif)]);?>">
<param name="id" value="graph" />
<param name="type" value="image/svg+xml" />
<param name="width" value="<? echo $width; ?>" />
<param name="height" value="<? echo $height; ?>" />
<param name="width" value="<?php echo $width; ?>" />
<param name="height" value="<?php echo $height; ?>" />
<param name="pluginspage" value="http://www.adobe.com/svg/viewer/install/auto" />
</object>
</div>
......
......@@ -112,7 +112,7 @@ if ($_POST) {
<?php if (is_subsystem_dirty('loadbalancer')): ?><br/>
<?php print_info_box_apply(sprintf(gettext("The load balancer configuration has been changed%sYou must apply the changes in order for them to take effect."), "<br />"));?>
<? endif; ?>
<?php endif; ?>
<section class="col-xs-12">
......
......@@ -58,7 +58,7 @@ include("head.inc");
<?php if (is_subsystem_dirty('loadbalancer')): ?><br/>
<?php print_info_box_apply(sprintf(gettext("The load balancer configuration has been changed%sYou must apply the changes in order for them to take effect."), "<br />"));?>
<? endif; ?>
<?php endif; ?>
<section class="col-xs-12">
......
<?php
/*
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2010 Seth Mos <seth.mos@dds.nl>.
......@@ -67,7 +68,7 @@ include("head.inc");
<h3><?php echo gettext("UPnP is currently disabled."); ?></h3>
</header>
<? else: ?>
<?php else: ?>
<div class="table-responsive">
......@@ -111,7 +112,7 @@ include("head.inc");
<form action="status_upnp.php" method="post">
<input type="submit" name="clear" id="clear" class="btn btn-primary" value="<?=gettext("Clear");?>" /> <?=gettext("all currently connected sessions");?>.
</form>
<? endif; ?>
<?php endif; ?>
</div>
</section>
......
......@@ -321,10 +321,8 @@ servers[<?=$sindex;
servers[<?=$sindex;
?>][3][<?=$c;
?>][1] = '<?=str_replace("'", "\\'", $cert['certname']);?>';
<? $c++;
endforeach; ?>
<?
endforeach; ?>
<?php $c++; endforeach; ?>
<?php endforeach; ?>
function download_begin(act, i, j) {
......
......@@ -1128,11 +1128,10 @@ endif; ?>
<option value="<?=$name;?>"<?=$selected?>>
<?=htmlspecialchars($desc);?>
</option>
<?php
endforeach; ?>
<?php endforeach; ?>
</select>
<div class="hidden" for="help_for_digest">
<?PHP echo gettext("NOTE: Leave this set to SHA1 unless all clients are set to match. SHA1 is the default for OpenVPN."); ?>
<?php echo gettext("NOTE: Leave this set to SHA1 unless all clients are set to match. SHA1 is the default for OpenVPN."); ?>
</div>
</td>
</tr>
......@@ -1151,8 +1150,7 @@ endif; ?>
<option value="<?=$name;?>"<?=$selected?>>
<?=htmlspecialchars($desc);?>
</option>
<?php
endforeach; ?>
<?php endforeach; ?>
</select>
</td>
</tr>
......
......@@ -141,13 +141,13 @@ if (isset($config['ipsec']['phase2'])) {
<td><?=$ipsec['local-ts'];?></td>
<td><?=$ipsec['remote-ts'];?></td>
<td>
<? if($ipsec['active']):
<?php if($ipsec['active']):
?>
<span class='glyphicon glyphicon-transfer text-success' alt='Tunnel status'></span>
<? else:
<?php else:
?>
<span class='glyphicon glyphicon-transfer text-danger' alt='Tunnel status'></span>
<? endif;
<?php endif;
?>
</td>
</tr>
......
......@@ -64,23 +64,17 @@ $filesystems = get_mounted_filesystems();
jQuery("#cpuPB").css( { width:0 } );
jQuery("#memUsagePB").css( { width: '<?php echo mem_usage(); ?>%' } );
<?PHP $d = 0; ?>
<?PHP foreach ($filesystems as $fs) :
?>
<?php $d = 0; ?>
<?php foreach ($filesystems as $fs) : ?>
jQuery("#diskUsagePB<?php echo $d++; ?>").css( { width: '<?php echo $fs['percent_used']; ?>%' } );
<?PHP
endforeach; ?>
<?php endforeach; ?>
<?php if ($showswap == true) :
?>
<?php if ($showswap == true) : ?>
jQuery("#swapUsagePB").css( { width: '<?php echo swap_usage(); ?>%' } );
<?php
endif; ?>
<?php if (get_temp() != "") :
?>
<?php endif; ?>
<?php if (get_temp() != "") : ?>
jQuery("#tempPB").css( { width: '<?php echo get_temp(); ?>%' } );
<?php
endif; ?>
<?php endif; ?>
});
//]]>
</script>
......@@ -114,17 +108,14 @@ endif; ?>
<tr>
<td width="25%" class="vncellt"><?=gettext("CPU Type");?></td>
<td width="75%" class="listr">
<?php
echo (htmlspecialchars(get_single_sysctl("hw.model")));
?>
<?php echo (htmlspecialchars(get_single_sysctl("hw.model"))); ?>
<div id="cpufreq"><?= get_cpufreq(); ?></div>
<?php $cpucount = get_cpu_count();
if ($cpucount > 1) :
?>
<div id="cpucount">
<?= htmlspecialchars($cpucount) ?> CPUs: <?= htmlspecialchars(get_cpu_count(true)); ?></div>
<?php
endif; ?>
<?php endif; ?>
</td>
</tr>
<?php if (isset($hwcrypto)) :
......@@ -133,8 +124,7 @@ endif; ?>
<td width="25%" class="vncellt"><?=gettext("Hardware crypto");?></td>
<td width="75%" class="listr"><?=htmlspecialchars($hwcrypto);?></td>
</tr>
<?php
endif; ?>
<?php endif; ?>
<tr>
<td width="25%" class="vncellt"><?=gettext("Uptime");?></td>
<td width="75%" class="listr" id="uptime"><?= htmlspecialchars(get_uptime()); ?></td>
......@@ -162,8 +152,7 @@ endif; ?>
<td width="25%" class="vncellt"><?=gettext("Last config change");?></td>
<td width="75%" class="listr"><?= htmlspecialchars(date("D M j G:i:s T Y", intval($config['revision']['time'])));?></td>
</tr>
<?php
endif; ?>
<?php endif; ?>
<tr>
<td width="25%" class="vncellt"><?=gettext("State table size");?></td>
<td width="75%" class="listr">
......@@ -213,8 +202,7 @@ endif; ?>
<span id="tempmeter"><?= $temp."&#176;C"; ?></span>
</td>
</tr>
<?php
endif; ?>
<?php endif; ?>
<tr>
<td width="25%" class="vncellt"><?=gettext("Load average");?></td>
<td width="75%" class="listr">
......@@ -259,23 +247,21 @@ endif; ?>
<span id="swapusagemeter"><?= $swapusage.'%'; ?></span> used <?= sprintf("%.0f/%.0f", `/usr/sbin/swapinfo -m | /usr/bin/grep -v Device | /usr/bin/awk '{ print $3;}'`, `/usr/sbin/swapinfo -m | /usr/bin/grep -v Device | /usr/bin/awk '{ print $2;}'`) ?> MB
</td>
</tr>
<?php
endif; ?>
<?php endif; ?>
<tr>
<td width="25%" class="vncellt"><?=gettext("Disk usage");?></td>
<td width="75%" class="listr">
<?PHP $d = 0; ?>
<?PHP foreach ($filesystems as $fs) :
?>
<?php $d = 0; ?>
<?php foreach ($filesystems as $fs) : ?>
<div class="progress">
<div id="diskUsagePB<?php echo $d; ?>" class="progress-bar" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 0%;">
<span class="sr-only"></span>
</div>
</div>
<?PHP if (substr(basename($fs['device']), 0, 5) == "tmpfs") {
<?php if (substr(basename($fs['device']), 0, 5) == "tmpfs") {
$fs['type'] .= " in RAM";
} ?>
<?PHP echo "{$fs['mountpoint']} ({$fs['type']})";?>: <span id="diskusagemeter<?php echo $d++ ?>"><?= $fs['percent_used'].'%'; ?></span> used <?PHP echo $fs['used_size'] ."/". $fs['total_size'];
<?php echo "{$fs['mountpoint']} ({$fs['type']})";?>: <span id="diskusagemeter<?php echo $d++ ?>"><?= $fs['percent_used'].'%'; ?></span> used <?php echo $fs['used_size'] ."/". $fs['total_size'];
if ($d != count($filesystems)) {
echo '<br/><br/>';
}
......
......@@ -222,7 +222,7 @@ include("head.inc");
?>
<body>
<? include("fbegin.inc"); ?>
<?php include("fbegin.inc"); ?>
<?php if($pkg['step'][$stepid]['fields']['field'] <> "") { ?>
<script type="text/javascript">
......@@ -381,7 +381,7 @@ function showchange() {
<header class="content-box-head container-fluid">
<h3><?= fixup_string($title) ?></h3>
</header>
<? endif; ?>
<?php endif; ?>
<div class="content-box-main">
<div style="padding:20px !important;">
......@@ -1031,4 +1031,4 @@ function is_timezone($elt) {
?>
<? include('foot.inc'); ?>
<?php include('foot.inc'); ?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment