template for list views

2007-10-08
2013-05-09
  • Nobody/Anonymous

    If I add a custom field with the template (for example in basetemplate.xml I have added VLANID) how can I customize the list view "display subnet information" in order to display my custom fileds? There is a template also for the list views?

    Thanks
    Alex

     
    • Richard Ellerbrock

      You cannot add template fields to the list view. Sorry.

       
      • Nobody/Anonymous

        Hi,
        Is there any chance of this feature being added in the future?  We've just
        started looking at ipplan, and like the previous poster, having vlan info
        available on the subnet list would be most useful.  Other than that, we really
        like what we've seen so far.  Good job.

         
        • Richard Ellerbrock

          Unlikely in the short term without some help/contributions. Time is very limited at the moment.

           
    • Nobody/Anonymous

      Alex,
      I have a MOD that may interest you - it add display of the template fields to displaybase.php & findfree.php.
      take a look back in the forum.

      Brendan

       
  • Michele DEGLI ALBIZI

    We have created a 'recap.php' page.
    Maybe this will help you.

    <html>
            <head>
                    <title>IpPlan - R&eacute;cap Classes &amp; VLANs</title>

            <style type="text/css">
    <!-
    td {
            font-family: Verdana, Arial, Helvetica, sans-serif;
            background-color: #F3F3F3;
    }
    h2 {
            font-family: Verdana, Arial, Helvetica, sans-serif;
    }
    th {
            background-color: #E4E4E4;
            font-family: Verdana, Arial, Helvetica, sans-serif;
            color: #CC0000;
            font-size: 12px;
    }
    a {
            font-family: Verdana, Arial, Helvetica, sans-serif;
            color: #CC0000;
            text-decoration: underline;
    }
    body {
            font-family: Verdana, Arial, Helvetica, sans-serif;
            font-size: 12px;
            color: #333333;
    }
    input {
            margin: 2px;
    }
    select {
            color: #666666;
    }
    table {
            margin: 2px;
            padding: 2px;
            border: 0;
            font-size: 11px;
    }
    table#form {
            font-size: 12px;
    }

    ->
        </style>
    </head>

    <body>

    <H2 style="color: black; background-color: rgb(102,102,102)" align="center"><font color=white>IP Range List and Used VLANs</font></H2>

    <?php

    $host = "localhost";
    $user = "ipplan";
    $bdd = "ipplan";
    $passwd  = "xxxxxxxxxxxxxxxxx";
    $TRI_DEFAULT="baseaddr";
    $ORDERBY="";

    if (isset($_GET)) $TRI=$_GET; else $TRI=$TRI_DEFAULT;

    if (!($TRI=="admin" || $TRI=="baseaddr" || $TRI=="basedesc")) $TRI=$TRI_DEFAULT;

    switch ($TRI) {
            case "admin":
                    $ORDERBY="ORDER BY base.admingrp, base.baseaddr";
            break;
            case "baseaddr":
                    $ORDERBY="ORDER BY base.baseaddr";
            break;
            case "basedesc":
                    $ORDERBY="ORDER BY base.descrip, base.baseaddr, base.admingrp";
            break;
            default:
    }

    $query="SELECT INET_NTOA(base.baseaddr) AS BaseAddr, base.subnetsize AS SubnetSize, base.descrip AS BaseDesc, base.baseindex AS BaseIndex, base.admingrp AS AdminGroup FROM base ".$ORDERBY;

    // MySql Serveur Connection
    mysql_connect($host, $user,$passwd) or die("erreur de connexion au serveur");
    mysql_select_db($bdd) or die("erreur de connexion a la base de donnees");

    //$query="SELECT INET_NTOA(base.baseaddr) AS BaseAddr, base.subnetsize AS SubnetSize, base.descrip AS BaseDesc, base.admingrp AS AdminGroup FROM base ORDER BY base.baseaddr;";

    $result= mysql_query("$query");
    ?>

    <table id="form" width=100%>

    <tr>
    <td><font size=5, style=bold><a href="./recap.php?tri=baseaddr">Base Address</a></font></td>
    <td><font size=5, style=bold>Subnet Size</font></td>
    <td><font size=5, style=bold><a href="./recap.php?tri=basedesc">Base Description</a></font></td>
    <td><font size=5, style=bold><a href="./recap.php?tri=admin">Admin Group</a></font></td>
    </tr>

    <?php
    while($row = mysql_fetch_array($result,MYSQL_ASSOC)){
    echo "<tr>";
    echo "<td><a href=./user/displaysubnet.php?baseindex=".$row." TARGET=\"_blank\">".$row."</a></td>";
    echo "<td>".$row."</td>";
    echo "<td>".$row."</td>";
    echo "<td>".$row."</td>";
    echo "</tr>";
    }
    ?>
    </table>
    </html>

     

Log in to post a comment.