Changeset 37 for system/generate.php
- Timestamp:
- Jan 31, 2008, 8:38:47 PM (17 years ago)
- Location:
- system
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
system
-
Property svn:ignore
set to
nohup.out
-
Property svn:ignore
set to
-
system/generate.php
r1 r37 1 <? 2 include_once('../html/is/db.php'); 3 DB_Init('localhost', 'root', '', 'is'); 4 DB_Query('SET CHARACTER SET latin2'); 1 <?php 2 include_once('../html/global.php'); 5 3 6 4 $Period = 60; // seconds … … 9 7 //echo("Generating settings...\n"); 10 8 $Now = time(); 11 DB_Select('services_restart', '*', '(last_time < FROM_UNIXTIME('.($Now-$Period).')) AND (changed=1)');12 while($Service = DB_Row())9 $DbResult = $Database->select('services_restart', '*', '(last_time < FROM_UNIXTIME('.($Now-$Period).')) AND (changed=1)'); 10 while($Service = $DbResult->fetch_array()) 13 11 { 14 12 // if(($Service['changed'] == 1) and ($Service['last_time'] ) … … 21 19 exec($Item); 22 20 echo("Done\n"); 23 DB_Save(); 24 DB_Update('services_restart', 'id='.$Service['id'], array('changed' => 0, 'last_time' => 'NOW()')); 25 DB_Load(); 21 $Database->update('services_restart', 'id='.$Service['id'], array('changed' => 0, 'last_time' => 'NOW()')); 26 22 } 27 23 }
Note:
See TracChangeset
for help on using the changeset viewer.