summaryrefslogtreecommitdiff
path: root/templates/Russian-pick_list.tex
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-03-09 23:15:17 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-03-09 23:15:17 +0000
commit539f90a8bcee8366e3d17a921fc02d8c94dc1b6c (patch)
tree3da9035bdd54ac8107e3e436d11ca5c3d1d2553f /templates/Russian-pick_list.tex
parentcd78581fa2d16e3d712b7a44580c60ac1fc63f86 (diff)
Fixing error when deleting accounts...
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@870 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'templates/Russian-pick_list.tex')
0 files changed, 0 insertions, 0 deletions
i id="n_44" class="hl">
  • $locale = LedgerSMB::Locale->get_handle( ${LedgerSMB::Sysconfig::language} )
  • or
  • $form->error( __FILE__ . ':' . __LINE__ . ': ' . "Locale not loaded: $!\n" );
  • $locale->encoding('UTF-8');
  • $form->{charset} = 'UTF-8';
  • eval { require DBI; };
  • $form->error(
  • __FILE__ . ':' . __LINE__ . ': ' . $locale->text('DBI not installed!') )
  • if ($@);
  • $form->{stylesheet} = "ledgersmb.css";
  • $form->{favicon} = "favicon.ico";
  • $form->{timeout} = 600;
  • require "bin/pw.pl";
  • # customization
  • if ( -f "bin/custom/$form->{script}" ) {
  • eval { require "bin/custom/$form->{script}"; };
  • $form->error( __FILE__ . ':' . __LINE__ . ': ' . $@ ) if ($@);
  • }
  • if ( $form->{action} ) {
  • &check_password unless $form->{action} eq 'logout';
  • &{ $form->{action} };
  • }
  • else {
  • # if there are no drivers bail out
  • $form->error( __FILE__ . ':' . __LINE__ . ': '
  • . $locale->text('No Database Drivers available!') )
  • unless ( LedgerSMB::User->dbdrivers );
  • $root = LedgerSMB::User->new('admin');
  • &adminlogin;
  • }
  • 1;
  • # end
  • sub adminlogin {
  • my ($errorMessage) = @_;
  • $form->{title} =
  • qq|LedgerSMB $form->{version} | . $locale->text('Administration');
  • $myheaderadd = qq|
  • <script language="JavaScript" type="text/javascript">
  • <!--
  • function sf(){
  • document.admin.password.focus();
  • }
  • // End -->
  • </script>
  • |;
  • $form->header( undef, $myheaderadd );
  • print qq|
  • <body class="admin" onload="sf()">
  • <div align="center">
  • <a href="http://www.ledgersmb.org/"><img src="images/ledgersmb.png" width="200" height="100" border="0" alt="LedgerSMB Logo" /></a>
  • <h1 class="login">|
  • . $locale->text('Version')
  • . qq| $form->{version} <br />|
  • . $locale->text('Administration')
  • . qq|</h1>
  • <form method="post" action="admin.pl" name="admin">
  • <table>
  • <tr>
  • <th>| . $locale->text('Password') . qq|</th>
  • <td><input type="password" name="password" /></td>
  • <td><button type="submit" class="submit" name="action" value="login">|
  • . $locale->text('Login')
  • . qq|</button></td>
  • </tr>
  • </table>
  • <input type="hidden" name="action" value="login" />
  • <input type="hidden" name="path" value="$form->{path}" />
  • </form>
  • |;
  • if ($errorMessage) {
  • print
  • qq|<p><span style="font-weight:bold; color:red;">$errorMessage</span></p><br />|;
  • }
  • print qq|
  • <br /><br />
  • <p><a href="login.pl"
  • >| . $locale->text("Application Login") . qq|</a></p>
  • <br /><br />
  • <a style="font-size: 0.8em;" href="http://www.ledgersmb.org/">|
  • . $locale->text('LedgerSMB website') . qq|</a>
  • </div>
  • </body>
  • </html>
  • |;
  • }
  • sub login {
  • &list_users;
  • }
  • sub logout {
  • $form->{login} = 'admin';
  • $form->{callback} = "admin.pl?action=adminlogin";
  • Session::session_destroy($form);
  • $form->redirect( $locale->text('You are logged out') );