Changeset 37 for system/generate.php


Ignore:
Timestamp:
Jan 31, 2008, 8:38:47 PM (17 years ago)
Author:
george
Message:

Upraveno: Přepsán přístup k databázi přes třídu mysqli v systémové složce.
Odstraněno: Staré verze souborů a staré nepoužité soubory.

Location:
system
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • system

    • Property svn:ignore set to
      nohup.out
  • 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
     2include_once('../html/global.php');
    53
    64$Period = 60; // seconds
     
    97//echo("Generating settings...\n");
    108$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)');
     10while($Service = $DbResult->fetch_array())
    1311{
    1412//  if(($Service['changed'] == 1) and ($Service['last_time'] )
     
    2119        exec($Item);
    2220    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()'));
    2622  }
    2723}
Note: See TracChangeset for help on using the changeset viewer.