]> git.pld-linux.org Git - packages/lms.git/commitdiff
- new
authorTomek Orzechowski <orzech@pld-linux.org>
Thu, 17 Feb 2005 00:25:16 +0000 (00:25 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    lms-misc_mods.patch -> 1.1

lms-misc_mods.patch [new file with mode: 0644]

diff --git a/lms-misc_mods.patch b/lms-misc_mods.patch
new file mode 100644 (file)
index 0000000..88f8af2
--- /dev/null
@@ -0,0 +1,78 @@
+--- lms/bin/lms-mgc.orig       2005-02-16 21:06:34.000000000 +0100
++++ lms/bin/lms-mgc    2005-02-16 22:52:09.737554076 +0100
+@@ -441,7 +441,7 @@
+               
+               # BUILD NODELIST
+               
+-              $dbq = $dbase->prepare("SELECT ipaddr, mac, access, nodes.id as id, ownerid, nodes.name as name, warning, nodes.info AS info, pin FROM nodes, users WHERE users.id=nodes.ownerid");
++              $dbq = $dbase->prepare("SELECT ipaddr, mac, access, nodes.id as id, ownerid, nodes.name as name, warning, nodes.info AS info, pin FROM nodes");
+               $dbq->execute();
+               my %maclist;
+--- lms/bin/lms-cutoff.orig    2005-02-16 21:06:34.000000000 +0100
++++ lms/bin/lms-cutoff 2005-02-16 23:30:45.107977542 +0100
+@@ -151,9 +151,9 @@
+       
+ }
+-$dbq = $dbase->prepare("DELETE FROM timestamps WHERE tablename = 'nodes' OR tablename = '_global'");
++$dbq = $dbase->prepare("DELETE FROM timestamps WHERE tablename = '_force' OR tablename = '_global'");
+ $dbq->execute();
+-$dbq = $dbase->prepare("INSERT INTO timestamps (tablename,time) VALUES ('nodes',$utsfmt)");
++$dbq = $dbase->prepare("INSERT INTO timestamps (tablename,time) VALUES ('_force',$utsfmt)");
+ $dbq->execute();
+ $dbq = $dbase->prepare("INSERT INTO timestamps (tablename,time) VALUES ('_global',$utsfmt)");
+ $dbq->execute();
+--- lms/bin/lms-notify.orig    2005-02-16 21:06:34.000000000 +0100
++++ lms/bin/lms-notify 2005-01-12 14:48:40.000000000 +0100
+@@ -226,6 +227,11 @@
+                               }
+                               {
++                                      my $uid = $row->{'id'};
++                              $line =~ s/\%id/$uid/;
++                              }
++
++                              {
+                                       my $phone = $row->{'phone1'};
+                               $line =~ s/\%phone1/$phone/;
+                               }
+--- lms/lib/LMS.class.php.orig 2005-02-16 22:16:02.728958199 +0100
++++ lms/lib/LMS.class.php      2005-02-16 22:16:30.059785467 +0100
+@@ -1557,7 +1557,7 @@
+       function GetUserAssignments($id)
+       {
+-              if($assignments = $this->DB->GetAll('SELECT assignments.id AS id, tariffid, userid, period, at, suspended, value, uprate, upceil, downceil, downrate, name, invoice, datefrom, dateto FROM assignments LEFT JOIN tariffs ON (tariffid=tariffs.id) WHERE userid=? ORDER BY datefrom ASC', array($id)))
++              if($assignments = $this->DB->GetAll('SELECT assignments.id AS id, tariffid, userid, period, at, suspended, value, uprate, upceil, downceil, downrate, name, description, invoice, datefrom, dateto FROM assignments LEFT JOIN tariffs ON (tariffid=tariffs.id) WHERE userid=? ORDER BY datefrom ASC', array($id)))
+               {
+                       foreach($assignments as $idx => $row)
+                       {
+@@ -3153,6 +3153,15 @@
+           return $this->DB->GetRow('SELECT sum(upload) as upload, sum(download) as download FROM stats WHERE dt >='.$from.' AND dt <'.$to.' AND nodeid='.$host);
+       }
++      function TrafficUser($from, $to, $user)
++      {
++          $traffic = $this->DB->GetRow('SELECT sum(upload) as upload, sum(download) as download FROM stats, nodes WHERE id=nodeid AND ownerid = '.$user.' AND dt >='.$from.' AND dt <'.$to);
++          list($t['download']['data'], $t['download']['unit']) = setunits($traffic['download']);
++          list($t['upload']['data'], $t['upload']['unit']) = setunits($traffic['upload']);
++          list($t['sum']['data'], $t['sum']['unit']) = setunits($traffic['upload']+$traffic['download']);
++          return $t;
++      }
++
+       function TrafficFirstRecord($host)
+       {
+           return $this->DB->GetOne('SELECT MIN(dt) FROM stats WHERE nodeid='.$host);
+--- lms/templates/balancenew.html.orig 2005-02-17 00:00:59.356697601 +0100
++++ lms/templates/balancenew.html      2005-02-17 00:01:51.632773685 +0100
+@@ -66,6 +66,9 @@
+                                                       {section name=users loop=$users}
+                                                       <OPTION value="{$users[users].id}">{$users[users].username|truncate:25:" ..."} ({$users[users].id|string_format:"%04d"})</OPTION>
+                                                       {/section}
++                                                      {section name=users loop=$users}
++                                                      <OPTION value="{$users[users].id}">{$users[users].id|string_format:"%04d"} {$users[users].username|truncate:25:" ..."}</OPTION>
++                                                      {/section}
+                                               </SELECT>
+                                               {t}Selected:{/t} <INPUT TYPE="edit" NAME="selectededit" VALUE="0" SIZE="5" STYLE="border:0; background-color: #DFD5BD;" readonly></INPUT>
+                                       </TD>
This page took 0.060091 seconds and 4 git commands to generate.