* of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. **/ require_once dirname(dirname(__FILE__)) . '/../includes/core.inc.php'; if (isset($_REQUEST['task'])) { do_refresh_task($_REQUEST['task']); } elseif (isset($_GET['server'])) { do_create_task($_GET['server']); } else { die('ERROR - NO $_GET[\'server\'] or $_GET[\'task\']'); } function do_create_task($server_id_) { $ret = $_SESSION['service']->task_debian_installable_application($server_id_); if (!$ret) { header('Content-Type: text/xml; charset=utf-8'); $dom = new DomDocument('1.0', 'utf-8'); $node = $dom->createElement('usage'); $node->setAttribute('status', 'server not found'); $dom->appendChild($node); die($dom->saveXML()); } header('Content-Type: text/xml; charset=utf-8');
* * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. **/ require_once dirname(__FILE__) . '/../includes/core-minimal.inc.php'; Logger::debug('main', 'Starting ajax/installable_applications.php'); if (isset($_REQUEST['task'])) { do_refresh_task($_REQUEST['task']); } elseif (isset($_GET['fqdn'])) { do_create_task($_GET['fqdn']); } else { Logger::error('main', '(ajax/installable_applications) Missing parameter : fqdn or task'); die('ERROR - NO $_GET[\'fqdn\'] or $_GET[\'task\']'); } function do_create_task($fqdn_) { $server = Abstract_Server::load($fqdn_); if (!is_object($server)) { Logger::error('main', '(ajax/installable_applications) Server ' . $fqdn_ . ' not found'); header('Content-Type: text/xml; charset=utf-8'); $dom = new DomDocument('1.0', 'utf-8'); $node = $dom->createElement('usage'); $node->setAttribute('status', 'server not found'); $dom->appendChild($node); die($dom->saveXML());