From: <tim...@us...> - 2009-11-21 12:09:07
|
Revision: 3068 http://web-erp.svn.sourceforge.net/web-erp/?rev=3068&view=rev Author: tim_schofield Date: 2009-11-21 12:08:59 +0000 (Sat, 21 Nov 2009) Log Message: ----------- Correct edit functionality - Fixes Ticket #15 Modified Paths: -------------- trunk/PO_AuthorisationLevels.php trunk/doc/Change.log.html Modified: trunk/PO_AuthorisationLevels.php =================================================================== --- trunk/PO_AuthorisationLevels.php 2009-11-21 10:24:36 UTC (rev 3067) +++ trunk/PO_AuthorisationLevels.php 2009-11-21 12:08:59 UTC (rev 3068) @@ -109,29 +109,42 @@ echo "<form action='" . $_SERVER['PHP_SELF'] . '?' . SID . "' method=post name='form1'>"; echo '<table>'; -echo '<tr><td>'._('User ID').'</td><td><select name=userid>'; -$usersql='SELECT userid FROM www_users'; -$userresult=DB_query($usersql,$db); -while ($myrow=DB_fetch_array($userresult)) { - if ($myrow['userid']==$UserID) { - echo '<option selected value="'.$myrow['userid'].'">'.$myrow['userid'].'</option>'; - } else { - echo '<option value="'.$myrow['userid'].'">'.$myrow['userid'].'</option>'; +if (isset($_GET['Edit'])) { + echo '<tr><td>'._('User ID').'</td><td>'.$UserID.'</td></tr>'; + echo '<input type=hidden name=userid value="'.$UserID.'"'; +} else { + echo '<tr><td>'._('User ID').'</td><td><select name=userid>'; + $usersql='SELECT userid FROM www_users'; + $userresult=DB_query($usersql,$db); + while ($myrow=DB_fetch_array($userresult)) { + if ($myrow['userid']==$UserID) { + echo '<option selected value="'.$myrow['userid'].'">'.$myrow['userid'].'</option>'; + } else { + echo '<option value="'.$myrow['userid'].'">'.$myrow['userid'].'</option>'; + } } + echo '</select></td></tr>'; } -echo '</select></td></tr>'; -echo '<tr><td>'._('Currency').'</td><td><select name=currabrev>'; -$currencysql='SELECT currabrev,currency FROM currencies'; -$currencyresult=DB_query($currencysql,$db); -while ($myrow=DB_fetch_array($currencyresult)) { - if ($myrow['currabrev']==$Currency) { - echo '<option selected value="'.$myrow['currabrev'].'">'.$myrow['currency'].'</option>'; - } else { - echo '<option value="'.$myrow['currabrev'].'">'.$myrow['currency'].'</option>'; +if (isset($_GET['Edit'])) { + $currencysql='SELECT currency FROM currencies WHERE currabrev="'.$Currency.'"'; + $currencyresult=DB_query($currencysql,$db); + $myrow=DB_fetch_array($currencyresult); + echo '<tr><td>'._('Currency').'</td><td>'.$myrow['currency'].'</td></tr>'; + echo '<input type=hidden name=currabrev value="'.$Currency.'"'; +} else { + echo '<tr><td>'._('Currency').'</td><td><select name=currabrev>'; + $currencysql='SELECT currabrev,currency FROM currencies'; + $currencyresult=DB_query($currencysql,$db); + while ($myrow=DB_fetch_array($currencyresult)) { + if ($myrow['currabrev']==$Currency) { + echo '<option selected value="'.$myrow['currabrev'].'">'.$myrow['currency'].'</option>'; + } else { + echo '<option value="'.$myrow['currabrev'].'">'.$myrow['currency'].'</option>'; + } } + echo '</select></td></tr>'; } -echo '</select></td></tr>'; echo '<tr><td>'._('User can create orders').'</td>'; if ($CanCreate==1) { Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2009-11-21 10:24:36 UTC (rev 3067) +++ trunk/doc/Change.log.html 2009-11-21 12:08:59 UTC (rev 3068) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p> +<p>21/11/09 Tim: PO_AuthorisationLevels.php - Correct edit functionality - Fixes Ticket #15 <p>21/11/09 Tim: Logout.php - Take out reference to $demo_text and the incorrect call to session_start(). <p>20/11/09 Tim: CustomerInquiry.php - Correction of errors in retrieving the number of months inquiries to show. <p>20/11/09 Tim: Create a log file of all status messages. Default is no log. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |