phpBMS

root/trunk/phpbms/modules/base/menu_addedit.php

Revision 703, 6.3 KB (checked in by brieb, 2 years ago)
  • Rearranged payment processing routine to be more flexible. It now needs to save the sales order first
  • Added payment processing template so developers have a guide when putting together their payment scripts
  • It seems their might be some unintentional touching of other files in this commit;
  • Property svn:keywords set to LastChangedBy LastChangedDate LastChangedRevision
Line 
1<?php
2/*
3 $Rev$ | $LastChangedBy$
4 $LastChangedDate$
5 +-------------------------------------------------------------------------+
6 | Copyright (c) 2004 - 2010, Kreotek LLC                                  |
7 | All rights reserved.                                                    |
8 +-------------------------------------------------------------------------+
9 |                                                                         |
10 | Redistribution and use in source and binary forms, with or without      |
11 | modification, are permitted provided that the following conditions are  |
12 | met:                                                                    |
13 |                                                                         |
14 | - Redistributions of source code must retain the above copyright        |
15 |   notice, this list of conditions and the following disclaimer.         |
16 |                                                                         |
17 | - Redistributions in binary form must reproduce the above copyright     |
18 |   notice, this list of conditions and the following disclaimer in the   |
19 |   documentation and/or other materials provided with the distribution.  |
20 |                                                                         |
21 | - Neither the name of Kreotek LLC nor the names of its contributore may |
22 |   be used to endorse or promote products derived from this software     |
23 |   without specific prior written permission.                            |
24 |                                                                         |
25 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS     |
26 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT       |
27 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
28 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT      |
29 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,   |
30 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT        |
31 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,   |
32 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY   |
33 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT     |
34 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   |
35 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.    |
36 |                                                                         |
37 +-------------------------------------------------------------------------+
38*/
39
40        include("../../include/session.php");
41        include("include/tables.php");
42        include("include/fields.php");
43        include("include/menu.php");
44
45        $thetable = new menus($db, "tbld:83187e3d-101e-a8a5-037f-31e9800fed2d");
46        $therecord = $thetable->processAddEditPage();
47
48        if(isset($therecord["phpbmsStatus"]))
49                $statusmessage = $therecord["phpbmsStatus"];
50
51        $pageTitle="Menu Item";
52
53        $phpbms->cssIncludes[] = "pages/menus.css";
54        $phpbms->jsIncludes[] = "modules/base/javascript/menu.js";
55
56                //Form Elements
57                //==============================================================
58                $theform = new phpbmsForm();
59
60                $theinput = new inputField("name",$therecord["name"],NULL,true,NULL,32,64);
61                $theinput->setAttribute("class","important");
62                $theform->addField($theinput);
63
64                $theinput = new inputField("displayorder",$therecord["displayorder"],"display order",true,NULL,10,10);
65                $theform->addField($theinput);
66
67                $theinput = new inputRolesList($db,"roleid",$therecord["roleid"],"access (role)");
68                $theform->addField($theinput);
69
70                $thetable->getCustomFieldInfo();
71                $theform->prepCustomFields($db, $thetable->customFieldsQueryResult, $therecord);
72                $theform->jsMerge();
73                //==============================================================
74                //End Form Elements
75
76        $phpbms->bottomJS[] = "showTypeDetails();";
77
78        include("header.php");
79
80?><div class="bodyline">
81        <?php $theform->startForm($pageTitle)?>
82
83        <fieldset id="fsAttributes">
84                <legend>attributes</legend>
85
86                <p>
87                        <?php $theform->showField("displayorder"); ?><br />
88                        <span class="notes">Lower numbers are displayed first.</span>
89                </p>
90
91                <p><?php $theform->showField("roleid")?></p>
92
93        </fieldset>
94
95        <div id="leftSideDiv">
96                <fieldset>
97                        <legend><label for="name">name</label></legend>
98
99                        <p class="big"><?php $theform->showField("name"); ?></p>
100
101                </fieldset>
102
103                <fieldset>
104                        <legend>type</legend>
105                        <p class="typeP">
106                                <input type="radio" id="type1" value="cat" <?php if($therecord["link"]=="") echo "checked=\"checked\"" ?> name="radio" onclick="showTypeDetails();"  class="radiochecks" /><label for="type1">category</label><br />
107                                <img src="menu-example-category.png" width="220" height="167" class="typeImage" alt="category" />
108                        </p>
109
110                        <p class="typeP">
111                                <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 />
112                                <img src="menu-example-tabledef.png" width="220" height="167" class="typeImage" alt="table definition search" />
113                        </p>
114
115                        <p>
116                                <input type="radio" id="type3" value="link" <?php if(strpos($therecord["link"],"search.php?id=")===false && $therecord["link"]!="") echo "checked=\"checked\"" ?> name="radio" onclick="showTypeDetails();" class="radiochecks" /><label for="type3">page link</label><br />
117                                <img src="menu-example-link.png" width="220" height="167" class="typeImage" alt="page link" />
118                        </p>
119                </fieldset>
120        </div>
121
122        <div id="details">
123                <fieldset>
124                        <legend>link / parent</legend>
125                        <p id="thelink">
126                                <label for="link">link</label> <span class="notes">(URL)</span><br />
127                                <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" />
128                        </p>
129                        <p id="thetabledef">
130                                <label  for="linkdropdown">table definition</label><br />
131                                <?php $thetable->displayTableDropDown($therecord["link"]) ?>
132                        </p>
133                        <p>
134                                parent<br/>
135                                <?php  $thetable->displayParentDropDown($therecord["parentid"],$therecord["uuid"]) ?>
136                        </p>
137                </fieldset>
138
139                <?php $theform->showCustomFields($db, $thetable->customFieldsQueryResult) ?>
140
141        </div>
142
143        <?php
144                $theform->showGeneralInfo($phpbms,$therecord);
145                $theform->endForm();
146        ?>
147</div>
148<?php include("footer.php");?>
Note: See TracBrowser for help on using the browser.
phpBMS vulnerability assesment provided by Orvant Inc. Copyright © 2010 Kreotek, LLC. All Rights reserved.