phpBMS

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

Revision 703, 5.4 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/roles.php");
44
45        $thetable = new roles($db, "tbld:87b9fe06-afe5-d9c6-0fa0-4a0f2ec4ee8a");
46        $therecord = $thetable->processAddEditPage();
47
48        if(isset($therecord["phpbmsStatus"]))
49                $statusmessage = $therecord["phpbmsStatus"];
50
51        $pageTitle="Role";
52
53        $phpbms->cssIncludes[] = "pages/roles.css";
54        $phpbms->jsIncludes[] = "modules/base/javascript/roles.js";
55
56                //Form Elements
57                //==============================================================
58                $theform = new phpbmsForm();
59                $theform->onsubmit="return submitForm(this);";
60
61                $theinput = new inputCheckbox("inactive",$therecord["inactive"]);
62                $theform->addField($theinput);
63
64                $theinput = new inputField("name",$therecord["name"],NULL,true,NULL,28,64);
65                $theinput->setAttribute("class","important");
66                $theform->addField($theinput);
67
68                $thetable->getCustomFieldInfo();
69                $theform->prepCustomFields($db, $thetable->customFieldsQueryResult, $therecord);
70                $theform->jsMerge();
71                //==============================================================
72                //End Form Elements
73
74        include("header.php");
75
76?><div class="bodyline">
77        <?php $theform->startForm($pageTitle)?>
78
79        <fieldset id="fsAttributes">
80                <legend>attributes</legend>
81
82                <p><?php $theform->showField("inactive")?></p>
83
84        </fieldset>
85
86        <div id="leftSideDiv">
87                <fieldset>
88                        <legend>name</legend>
89                        <p class="big"><?php $theform->showField("name") ?></p>
90                </fieldset>
91
92                <fieldset>
93                        <legend><label for="description">description</label></legend>
94                        <p>
95                                <textarea name="description" cols="45" rows="5" id="description"><?php echo htmlQuotes($therecord["description"])?></textarea>
96                        </p>
97                </fieldset>
98
99                <?php $theform->showCustomFields($db, $thetable->customFieldsQueryResult) ?>
100
101                <?php if($therecord["id"]){?>
102                <fieldset>
103                        <legend>users</legend>
104                        <input type="hidden" name="userschanged" id="userschanged" value="0" />
105                        <input type="hidden" name="newusers" id="newusers" value="" />
106                        <div class="fauxP">
107                        <div id="assignedusersdiv">
108                                users assigned to group<br />
109                                <select id="assignedusers" size="10" multiple>
110                                        <?php $thetable->displayUsers($therecord["uuid"],"assigned")?>
111                                </select>
112                        </div>
113                        <div id="usersbuttonsdiv">
114                                <p>
115                                        <button type="button" class="Buttons" onclick="moveUser('availableusers','assignedusers')">&lt; add user</button>
116                                </p>
117                                <p>
118                                        <button type="button" class="Buttons" onclick="moveUser('assignedusers','availableusers')">remove user &gt;</button>
119                                </p>
120                        </div>
121                        <div id="availableusersdiv">
122                                available users<br />
123                                <select id="availableusers" size="10" multiple>
124                                        <?php $thetable->displayUsers($therecord["uuid"],"available")?>
125                                </select>
126                        </div>
127                        </div>
128                </fieldset>
129                <?php }?>
130
131        </div>
132
133        <?php
134                $theform->showGeneralInfo($phpbms,$therecord);
135                $theform->endForm();
136        ?>
137</div>
138<?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.