Warning: Invalid argument supplied for foreach() in /var/www/html/plugins/configstore/configstore_devices.php on line 777
line 777 is this function:
Code: Select all
foreach ($result as $row) {
form_alternate_row_color($colors["alternate"],$colors["light"],$i, 'line' . $row["id"]); $i++;
$total = db_fetch_cell("SELECT count(device) FROM plugin_configstore_backups WHERE device=" . $row['id']);
form_selectable_cell($row['backupresult'] == '0' ? '<img border=0 src="images/green-ball.png" height=10 width=10 alt="Backup Result" title="Backup OK" /></img> ' : '<span style="white-space:nowrap"><image border=0 src="images/red-ball.png" height=10 width=10 alt="Backup Result" title="Backup Failed" /></img> ' . '<a href="configstore_devices.php?action=viewdebug&id=' . $row['id'] . '">' . '<img border=0 src="images/debug.png" height=10 width=10 alt="Debug Info" title="Debug Info" /></img></a></span>', $row['id']);
form_selectable_cell('<a href="configstore_devices.php?&action=edit&id=' . $row['id'] . '">' . $row['hostname'] . '</a>', $row['id']);
form_selectable_cell("<a href=configstore_devices.php?action=viewconfig&id=" . $row['id'] . ">Current</a> - <a href=configstore_backups.php?device=" . $row['id'] . ">Backups ($total)</a>", $row['id']);
form_selectable_cell($row['ipaddress'], $row['id']);
form_selectable_cell($row['directory'], $row['id']);
form_selectable_cell(($row['lastbackup'] < 1 ? '' : date('M j Y H:i:s', $row['lastbackup'])), $row['id']);
form_selectable_cell(($row['lastchange'] < 1 ? '' : date('M j Y H:i:s', $row['lastchange'])), $row['id']);
form_selectable_cell($row['username'], $row['id']);
form_selectable_cell(($row['enabled'] == 'on' ? 'Yes' : '<font color=red><b>No</b></font>'), $row['id']);
form_checkbox_cell($row["hostname"], $row["id"]);
form_end_row();
}
print $nav;
any thoughts??? I haven't coded php is such a long time I'm not sure where to start looking..