phpBMS

Show
Ignore:
Timestamp:
04/23/09 14:06:11 (3 years ago)
Author:
nate
Message:
  • Menus now use a uuid field instead of an id type field to determine a menu item's parent menu item.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/phpbms/modules/base/menu_addedit.php

    r331 r513  
    1 <?php  
     1<?php 
    22/* 
    33 $Rev$ | $LastChangedBy$ 
     
    4545        $thetable = new menus($db,19); 
    4646        $therecord = $thetable->processAddEditPage(); 
    47          
     47 
    4848        if(isset($therecord["phpbmsStatus"])) 
    49                 $statusmessage = $therecord["phpbmsStatus"];     
    50          
     49                $statusmessage = $therecord["phpbmsStatus"]; 
     50 
    5151        $pageTitle="Menu Item"; 
    52          
     52 
    5353        $phpbms->cssIncludes[] = "pages/menus.css"; 
    5454        $phpbms->jsIncludes[] = "modules/base/javascript/menu.js"; 
     
    5757                //============================================================== 
    5858                $theform = new phpbmsForm(); 
    59                  
     59 
    6060                $theinput = new inputField("name",$therecord["name"],NULL,true,NULL,32,64); 
    6161                $theinput->setAttribute("class","important"); 
     
    6464                $theinput = new inputField("displayorder",$therecord["displayorder"],"display order",true,NULL,10,10); 
    6565                $theform->addField($theinput); 
    66                  
     66 
    6767                $theinput = new inputRolesList($db,"roleid",$therecord["roleid"],"access (role)"); 
    68                 $theform->addField($theinput);                   
     68                $theform->addField($theinput); 
     69 
     70                $theinput = new inputField("uuid", $therecord["uuid"], NULL, true); 
     71                $theinput->setAttribute("class","uneditable"); 
     72                $theinput->setAttribute("readonly","readonly"); 
     73                $theform->addField($theinput); 
    6974 
    7075                $theform->jsMerge(); 
    7176                //============================================================== 
    72                 //End Form Elements      
    73          
     77                //End Form Elements 
     78 
    7479        $phpbms->bottomJS[] = "showTypeDetails();"; 
    75                  
     80 
    7681        include("header.php"); 
    77          
     82 
    7883?><div class="bodyline"> 
    79         <?php $theform->startForm($pageTitle)?>  
    80          
     84        <?php $theform->startForm($pageTitle)?> 
     85 
    8186        <fieldset id="fsAttributes"> 
    8287                <legend>attributes</legend> 
     
    8590                        <input id="id" name="id" type="text" value="<?php echo htmlQuotes($therecord["id"]); ?>" size="10" maxlength="10" readonly="readonly" class="uneditable" /> 
    8691                </p> 
    87                  
     92 
     93                <p><?php $theform->showField("uuid"); ?></p> 
     94 
    8895                <p> 
    8996                        <?php $theform->showField("displayorder"); ?><br /> 
     
    94101 
    95102        </fieldset> 
    96          
     103 
    97104        <div id="leftSideDiv"> 
    98105                <fieldset> 
     
    109116                                <img src="menu-example-category.png" width="220" height="167" class="typeImage" alt="category" /> 
    110117                        </p> 
    111                          
     118 
    112119                        <p class="typeP"> 
    113120                                <input type="radio" id="type2" value="search" <?php if(strpos($therecord["link"],"search.php?id=")!==false) echo "checked=\"checked\"" ?> name="radio" onclick="showTypeDetails();" class="radiochecks" /><label for="type2">table definition search</label><br /> 
     
    127134                        <p id="thelink"> 
    128135                                <label for="link">link</label> <span class="notes">(URL)</span><br /> 
    129                                 <input id="link" name="link" type="text" value="<?php if(substr($therecord["link"],0,10)!="search.php" ) echo htmlQuotes($therecord["link"])?>" size="64" maxlength="255" />                             
     136                                <input id="link" name="link" type="text" value="<?php if(substr($therecord["link"],0,10)!="search.php" ) echo htmlQuotes($therecord["link"])?>" size="64" maxlength="255" /> 
    130137                        </p> 
    131138                        <p id="thetabledef"> 
    132                                 <label  for="linkdropdown">table definition</label><br />  
    133                                 <?php $thetable->displayTableDropDown($therecord["link"]) ?>             
     139                                <label  for="linkdropdown">table definition</label><br /> 
     140                                <?php $thetable->displayTableDropDown($therecord["link"]) ?> 
    134141                        </p> 
    135142                        <p> 
    136143                                parent<br/> 
    137                                 <?php  $thetable->displayParentDropDown($therecord["parentid"],$therecord["id"]) ?> 
     144                                <?php  $thetable->displayParentDropDown($therecord["parentid"],$therecord["uuid"]) ?> 
    138145                        </p> 
    139146                </fieldset> 
    140147        </div> 
    141          
    142         <?php  
     148 
     149        <?php 
    143150                $theform->showCreateModify($phpbms,$therecord); 
    144151                $theform->endForm(); 
phpBMS vulnerability assesment provided by Orvant Inc. Copyright © 2010 Kreotek, LLC. All Rights reserved.