Esempio n. 1
0
 *
 * You should have received a copy of the GNU General Public License
 * along with MMC; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
/* Get MMC includes */
require_once "includes/config.inc.php";
require_once "includes/i18n.inc.php";
require_once "includes/acl.inc.php";
require_once "includes/session.inc.php";
require_once "includes/PageGenerator.php";
require "modules/imaging/includes/includes.php";
require "modules/imaging/includes/xmlrpc.inc.php";
$location = getCurrentLocation();
$params = getParams();
if (xmlrpc_doesLocationHasImagingServer($location)) {
    $config = xmlrpc_getImagingServerConfig($location);
    $imaging_server = $config[0];
    $default_menu = $config[1];
    if (isset($_POST["bvalid"])) {
        $from = $_POST['from'];
        $loc_name = $_POST['loc_name'];
        $item_uuid = $_POST['itemid'];
        $label = urldecode($_POST['itemlabel']);
        $params = getParams();
        $params['default_name'] = $_POST['default_m_label'];
        $params['timeout'] = $_POST['default_m_timeout'];
        $params['hidden_menu'] = $_POST['default_m_hidden_menu'];
        $params['background_uri'] = $_POST['boot_xpm'];
        $params['message'] = $_POST['boot_msg'];
        $params['protocol'] = $_POST['rest_type'];
Esempio n. 2
0
$location = getCurrentLocation();
if ($location == "UUID1") {
    $location_name = _T("root", "pulse2");
} else {
    $location_name = xmlrpc_getLocationName($location);
}
// Store the location in the session
$_SESSION['imaging_location'] = array("current" => $location, "current_name" => $location_name);
// Check if the entity can be manage by an imaging server
$hasImaging = false;
if (!xmlrpc_doesLocationHasImagingServer($location)) {
    // Try to find the first parent imaging server
    $parents = xmlrpc_getLocationParentPath($location);
    if (is_array($parents) && count($parents) > 0) {
        foreach ($parents as $parent_uuid) {
            if (xmlrpc_doesLocationHasImagingServer($parent_uuid)) {
                $location = $parent_uuid;
                if ($location == "UUID1") {
                    $location_name = _T("root", "pulse2");
                } else {
                    $location_name = xmlrpc_getLocationName($location);
                }
                $hasImaging = true;
                break;
            }
        }
    }
} else {
    $hasImaging = true;
}
if ($hasImaging) {
Esempio n. 3
0
 * 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 MMC; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
require "localSidebar.php";
require "graph/navbar.inc.php";
require_once 'modules/imaging/includes/includes.php';
require_once 'modules/imaging/includes/xmlrpc.inc.php';
require_once 'modules/imaging/includes/post_install_script.php';
$location = getCurrentLocation();
list($list, $values) = getEntitiesSelectableElements();
foreach ($list as $key => $value) {
    if (xmlrpc_doesLocationHasImagingServer($key) != 1) {
        unset($list[$key]);
        unset($values[$key]);
    }
    if ($key == $location) {
        unset($list[$key]);
        unset($values[$key]);
    }
}
isset($_GET['itemid']) ? $id = $_GET['itemid'] : ($id = $_POST['itemid']);
isset($_GET['itemlabel']) ? $itemlabel = $_GET['itemlabel'] : ($itemlabel = $_POST['itemlabel']);
$masters = xmlrpc_getLocationMastersByUUID($location, array($id));
$id = $_GET['itemid'];
$master = $masters[$id];
$label = $master['name'];
$desc = $master['desc'];