[Weberp-svn] SF.net SVN: weberp:[9559] trunk
Brought to you by:
sotandeka,
tim_schofield
From: <tim...@us...> - 2012-08-26 11:43:51
|
Revision: 9559 http://weberp.svn.sourceforge.net/weberp/?rev=9559&view=rev Author: tim_schofield Date: 2012-08-26 11:43:45 +0000 (Sun, 26 Aug 2012) Log Message: ----------- Replace <a tags with new InternalLink() function Modified Paths: -------------- trunk/PcAssignCashToTab.php trunk/PcAuthorizeExpenses.php trunk/PcClaimExpensesFromTab.php trunk/PcExpenses.php Modified: trunk/PcAssignCashToTab.php =================================================================== --- trunk/PcAssignCashToTab.php 2012-08-26 10:20:27 UTC (rev 9558) +++ trunk/PcAssignCashToTab.php 2012-08-26 11:43:45 UTC (rev 9559) @@ -205,7 +205,7 @@ if (!isset($_POST['submit'])) { echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Search') . '" alt="" />' . ' ' . $title. '</p>'; } - echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Select Another Petty Cash Tab ') . '</a></div>'; + echo '<div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Select Another Petty Cash Tab ')) . '</div>'; if (! isset($_GET['edit']) OR isset ($_POST['Go'])){ @@ -286,12 +286,10 @@ <td>'.$AuthorisedDate.'</td> <td>'.$myrow['notes'].'</td> <td>'.$myrow['receipt'].'</td> - <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedIndex='.$myrow['counterindex'].'&SelectedTabs=' . - $SelectedTabs . '&Days=' . $Days . '&edit=yes">' . _('Edit') . '</td> - <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedIndex='.$myrow['counterindex'].'&SelectedTabs=' . - $SelectedTabs . '&Days=' . $Days . '&delete=yes" onclick=\'return confirm("' . - _('Are you sure you wish to delete this code and the expense it may have set up?') . '");\'>' . - _('Delete') . '</td> + <td>'.InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedIndex='.$myrow['counterindex'].'&SelectedTabs=' . + $SelectedTabs . '&Days=' . $Days . '&edit=yes', _('Edit')) . '</td> + <td>'.InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedIndex='.$myrow['counterindex'].'&SelectedTabs=' . + $SelectedTabs . '&Days=' . $Days . '&delete=yes', _('Delete')) . '</td> </tr>'; }else{ echo '<td>'.ConvertSQLDate($myrow['date']).'</td> Modified: trunk/PcAuthorizeExpenses.php =================================================================== --- trunk/PcAuthorizeExpenses.php 2012-08-26 10:20:27 UTC (rev 9558) +++ trunk/PcAuthorizeExpenses.php 2012-08-26 11:43:45 UTC (rev 9559) @@ -72,7 +72,7 @@ $Days=30; } echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" />'; - echo '<p><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Select another tab') . '</a></div></p>'; + echo '<p><div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Select another tab')) . '</div></p>'; echo '<br /><table class="selection">'; echo '<tr><th colspan="7">' . _('Detail Of Movement For Last ') .': '; echo '<input type="text" class="number" name="Days" value="' . $Days . '" maxlength="3" size="4" /> Days '; Modified: trunk/PcClaimExpensesFromTab.php =================================================================== --- trunk/PcClaimExpensesFromTab.php 2012-08-26 10:20:27 UTC (rev 9558) +++ trunk/PcClaimExpensesFromTab.php 2012-08-26 11:43:45 UTC (rev 9559) @@ -197,7 +197,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Payment Entry') . '" alt="" />' . ' ' . $title . '</p>'; /* RICARD */ - echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Select another tab') . '</a></div>'; + echo '<div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Select another tab')) . '</div>'; if (! isset($_GET['edit']) OR isset ($_POST['GO'])){ echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; @@ -279,25 +279,15 @@ if (($myrow['date'] == '0000-00-00') and ($Description['0'] != 'ASSIGNCASH')){ // only movements NOT authorized can be modified or deleted - printf('<td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td><a href="%sSelectedIndex=%s&SelectedTabs='.$SelectedTabs.'&Days='.$Days.'&edit=yes">' . _('Edit') . '</td> - <td><a href="%sSelectedIndex=%s&SelectedTabs='.$SelectedTabs.'&Days='.$Days.'&delete=yes" onclick="return confirm("' . _('Are you sure you wish to delete this code and the expense it may have set up?') . '");">' . _('Delete') . '</td> - </tr>', - ConvertSQLDate($myrow['date']), - $Description['description'], - locale_money_format($myrow['amount'],$TabRow['currency']), - $AuthorisedDate, - $myrow['notes'], - $myrow['receipt'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['counterindex'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['counterindex']); + echo '<td>' . ConvertSQLDate($myrow['date']) . '</td> + <td>' . $Description['description'] . '</td> + <td class="number">' . locale_money_format($myrow['amount'],$TabRow['currency']) . '</td> + <td>' . $AuthorisedDate . '</td> + <td>' . $myrow['notes'] . '</td> + <td>' . $myrow['receipt'] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedIndex=' . $myrow['counterindex'] . '&SelectedTabs='.$SelectedTabs.'&Days='.$Days.'&edit=yes', _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedIndex=' . $myrow['counterindex'] . '&SelectedTabs='.$SelectedTabs.'&Days='.$Days.'&delete=yes', _('Delete')) . '</td> + </tr>'; } else { printf('<td>%s</td> <td>%s</td> Modified: trunk/PcExpenses.php =================================================================== --- trunk/PcExpenses.php 2012-08-26 10:20:27 UTC (rev 9558) +++ trunk/PcExpenses.php 2012-08-26 11:43:45 UTC (rev 9559) @@ -195,7 +195,7 @@ $k=0; //row colour counter - while ($myrow = DB_fetch_row($result)) { + while ($myrow = DB_fetch_array($result)) { if ($k==1){ echo '<tr class="EvenTableRows">'; $k=0; @@ -206,34 +206,27 @@ $sqldesc="SELECT accountname FROM chartmaster - WHERE accountcode='". $myrow[2] . "'"; + WHERE accountcode='". $myrow['glaccount'] . "'"; $ResultDes = DB_query($sqldesc,$db); $Description=DB_fetch_array($ResultDes); $SqlDescTag="SELECT tagdescription FROM tags - WHERE tagref='". $myrow[3] . "'"; + WHERE tagref='". $myrow['tag'] . "'"; $ResultDesTag = DB_query($SqlDescTag,$db); $DescriptionTag=DB_fetch_array($ResultDesTag); - printf('<td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td>%s</td> - <td>%s</td> - <td><a href="%sSelectedExpense=%s">' . _('Edit') . '</td> - <td><a href="%sSelectedExpense=%s&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this expense code and all the details it may have set up?') . '\');">' . _('Delete') . '</td> - </tr>', - $myrow[0], - $myrow[1], - $myrow[2], - $Description['accountname'], - $DescriptionTag['tagdescription'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', $myrow[0], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', $myrow[0]); + echo '<td>' . $myrow['codeexpense'] . '</td> + <td>' . $myrow['description'] . '</td> + <td class="number">' . $myrow['glaccount'] . '</td> + <td>' . $Description['accountname'] . '</td> + <td>' . $DescriptionTag['tagdescription'] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedExpense=' . $myrow['codeexpense'], _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedExpense=' . $myrow['codeexpense'] . '&delete=yes', _('Delete')) . '</td> + </tr>'; } //END WHILE LIST LOOP echo '</table>'; @@ -242,7 +235,7 @@ //end of ifs and buts! if (isset($SelectedExpense)) { - echo '<p><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Show All Petty Cash Expenses Defined') . '</a></div></p>'; + echo '<p><div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Show All Petty Cash Expenses Defined')) . '</div></p>'; } if (! isset($_GET['delete'])) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |