SHARE
TWEET

2abills.pl.diff

a guest Aug 16th, 2011 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --- 2abills.pl.orig     2010-10-18 21:45:20.000000000 +0400
  2. +++ 2abills.pl  2011-08-16 03:56:09.000000000 +0400
  3. @@ -47,7 +47,7 @@
  4.          }
  5.  }
  6.  
  7. -my $db = DBI->connect("dbi:$dbtype:dbname=$dbname", "$dbuser", "$dbpasswd")
  8. +my $db = DBI->connect("dbi:$dbtype:dbname=$dbname:host=$dbhost", "$dbuser", "$dbpasswd")
  9.   || die "Unable connect to server '$dbhost'\n" . $DBI::errstr;
  10.  
  11.  if ( $ARGV->{DB_CHARSET} ) {
  12. @@ -454,6 +454,11 @@
  13.  #
  14.  #**********************************************************
  15.  sub get_utm4_users {
  16. +#
  17. +#  grant select(id,login,password,credit,actual_address,email,
  18. +#               full_name,ip,tariff,bill,reg_date,block)
  19. +#  on UTM4.users to abills@localhost;
  20. +#
  21.      my %fields = (
  22.      'LOGIN'        => 'login',
  23.      'PASSWORD'     => 'password',
  24. @@ -463,12 +468,12 @@
  25.    '1.CREDIT'        => 'credit',
  26.  #  '1.GID'            => '',
  27.  #  '1.REDUCTION'    => '',
  28. -#  '1.REGISTRATION' => 'add_date',
  29. -#  '1.DISABLE'      => 'blocked',
  30. +  '1.REGISTRATION' => 'DATE_FORMAT(FROM_UNIXTIME(reg_date), \'%Y-%m-%d\')',
  31. +  '1.DISABLE'      => 'block',
  32.  
  33.  
  34.  #  '3.ADDRESS_FLAT'   => '',
  35. -  '3.ADDRESS_STREET' => 'address',
  36. +  '3.ADDRESS_STREET' => 'actual_address',
  37.  #  '3.ADDRESS_BUILD'  => '',
  38.  #  '3.COMMENTS'       => '',
  39.  #  '3.CONTRACT_ID'      => '',
  40. @@ -503,7 +508,7 @@
  41.      );
  42.  
  43.   my %fields_rev = reverse(%fields);
  44. - my $fields_list = "user, ". join(", \n", values(%fields));
  45. + my $fields_list = "id, ". join(", \n", values(%fields));
  46.  
  47.   my $sql = "SELECT $fields_list FROM users";
  48.   print "$sql\n" if ($debug > 0);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top