fogproject  1.5.9
About: FOG is a Linux-based network computer cloning solution for Windows, Mac OSX and various Linux distributions that ties together a few open-source tools with a PHP-based web interface. FOG doesn’t use any boot disks, or CDs; everything is done via TFTP and PXE.
  Fossies Dox: fogproject-1.5.9.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

snapcheck.php
Go to the documentation of this file.
1 <?php
22 require '../commons/base.inc.php';
23 try {
24  FOGCore::getHostItem(false);
25  if (!FOGCore::$Host->isValid()) {
26  throw new Exception('#!ih');
27  }
29  ->get('snapinjob');
30  if (!$SnapinJob->isValid()) {
31  throw new Exception(0);
32  }
34  'SnapinTask',
35  array(
36  'stateID' => $FOGCore->getQUeuedStates(),
37  'jobID' => $SnapinJob->get('id')
38  ),
39  'snapinID'
40  );
41  if (isset($_REQUEST['getSnapnames'])) {
42  $snapins = FOGCore::getSubObjectIDs(
43  'Snapin',
44  array('id' => $snapinids),
45  'name'
46  );
47  } elseif (isset($_REQUEST['getSnapargs'])) {
48  $snapins = FOGCore::getSubObjectIDs(
49  'Snapin',
50  array('id' => $snapinids),
51  'args'
52  );
53  } else {
54  $snapins = (
55  FOGCore::getClass('SnapinTaskManager')
56  ->count(
57  array(
58  'stateID' => FOGCore::getQueuedStates(),
59  'jobID' => $SnapinJob->get('id')
60  )
61  ) ?
62  1 :
63  0
64  );
65  }
66  echo implode(' ', (array)$snapins);
67 } catch (Exception $e) {
68  echo $e->getMessage();
69 }
FOGBase\getClass
static getClass($class, $data='', $props=false)
Definition: fogbase.class.php:439
Host\isValid
isValid()
Definition: host.class.php:622
$snapinids
if(! $SnapinJob->isValid()) $snapinids
Definition: snapcheck.php:33
$SnapinJob
if(!FOGCore::$Host->isValid()) $SnapinJob
Definition: snapcheck.php:28
FOGBase\getQueuedStates
static getQueuedStates()
Definition: fogbase.class.php:2106
FOGController\get
get($key='')
Definition: fogcontroller.class.php:207
exit
catch(Exception $e) exit
Definition: snapcheck.php:67
FOGBase\getSubObjectIDs
static getSubObjectIDs( $object='Host', $findWhere=array(), $getField='id', $not=false, $operator='AND', $orderBy='name', $groupBy=false, $filter='array_unique')
Definition: fogbase.class.php:2006
FOGBase\getHostItem
static getHostItem( $service=true, $encoded=false, $hostnotrequired=false, $returnmacs=false, $override=false, $mac=false)
Definition: fogbase.class.php:503
FOGBase\$Host
static $Host
Definition: fogbase.class.php:312