Exemple #1
0
    }
    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'];
$master_uuid = $master['uuid'];
$process1 = array();
$process = xmlrpc_checkProcessCloneMasterToLocation("pulse2-synch-masters");
$index = 0;
foreach ($process as $d) {
    $process1['my_var' . $index] = $d;
    $index++;
}
$process1['label'] = $label;
$process1['desc'] = $desc;
$process1['master_uuid'] = $master_uuid;
$process1['id'] = $id;
$process1['master'] = $master;
//echo http_build_query($process, 'myvar_');
//exit;
if (count($process) > 0) {
    // afficher progression des copys
    header("Location: " . urlStrRedirect("imaging/manage/synchromaster", $process1));
 * 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 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';
// recuperation pid des process
sleep(3);
$process = xmlrpc_checkProcessCloneMasterToLocation("/bin/bash /usr/bin/pulse2-synch-masters");
$nbprocess = count($process);
$processsinfos = array();
$z = xmlrpc_statusReadFile("/tmp/pulse2-synch-masters.out");
$location = getCurrentLocation();
list($list, $values) = getEntitiesSelectableElements();
foreach ($z as $line) {
    $dede = explode(" ", $line);
    $startpointlocation[$list[$dede[1]]];
    $processsinfos[$dede[0]]['startpoint'] = array_pop(explode('>', $list['UUID' . $dede[1]]));
    $processsinfos[$dede[0]]['endpoint'] = array_pop(explode('>', $list['UUID' . $dede[2]]));
}
if ($nbprocess == 0) {
    header("Location: " . urlStrRedirect("imaging/manage/master"));
    exit;
}