Example #1
0
</p>
  
<table class="tbl" >

<tr>
  <th class="title" colspan="3">Droits d'accès distants</th>
</tr>

<tr>
  <th>URL</th>
  <th>Pré-requis</th>
  <th>Validité</th>
</tr>

<?php 
$restriction = new CUrlRestriction();
foreach ($restriction->getAll() as $_restriction) {
    ?>
  <tr>
    <td><strong><?php 
    echo $_restriction->url;
    ?>
</strong></td>
    <td>Interdit (HTTP 403)</td>
    <td>
      <?php 
    if ($_restriction->check()) {
        ?>
        <div class="info">OK</div>
      <?php 
    } else {
Example #2
0
function showToc()
{
    global $stepsText;
    $currentStep = basename($_SERVER["PHP_SELF"], ".php");
    // 01
    $version = new CPHPVersion();
    $extension = new CPHPExtension();
    $package = new CPearPackage();
    $restriction = new CUrlRestriction();
    // 02
    $pathAccess = new CPathAccess();
    // 03
    $library = new CLibrary();
    $valid = array("01_check" => $version->checkAll(false) && $extension->checkAll(false) && $package->checkAll(false) && $restriction->checkAll(false), "02_fileaccess" => $pathAccess->checkAll(false), "03_install" => $library->checkAll(false));
    ?>
<div class="toc">
  <ol>
    <?php 
    foreach ($stepsText as $step => $stepName) {
        ?>
    <li>
      <?php 
        if ($currentStep == $step) {
            ?>
<strong><?php 
        } else {
            ?>
<a href="<?php 
            echo $step;
            ?>
.php"><?php 
        }
        if (isset($valid[$step])) {
            ?>
<img src="../style/mediboard/images/buttons/<?php 
            echo $valid[$step] ? "tick" : "cancel";
            ?>
.png" /><?php 
        }
        echo $stepName;
        if ($currentStep == $step) {
            ?>
</strong><?php 
        } else {
            ?>
</a><?php 
        }
        ?>
    </li>
    <?php 
    }
    ?>
  </ol>
  <?php 
    if (isset($_SESSION["auth_username"])) {
        ?>
    <a href="?logout=1" class="logout">Déconnexion</a>
  <?php 
    }
    ?>
</div>
<?php 
}