} if ($mode == 'launch') { pagehead($pgtitle, true); ParagraphTitle($pgtitle); $siteid = $form['siteid']; $row = fetch_site($siteid); //dd($form); //dd($row); $occi_url = $row['ep_occi']; $occi->Set_OCCI_Address($occi_url); $vmname = $form['vmname']; $ostpl = urldecode($form['ostpl']); $restpl = urldecode($form['restpl']); list($prefix, $osid) = preg_split("/#/", $ostpl); list($prefix, $resid) = preg_split("/#/", $restpl); $proxypath = proxy_path(); $vmurl = $occi->Create_VM_Instance($vmname, $osid, $resid); _insert_vminfo($siteid, $osid, $resid, $vmname, $vmurl, $title); print <<<EOS {$vmurl} EOS; pagetail(); exit; } ### }}} pagehead($pgtitle); ParagraphTitle($pgtitle); $preset = $form['siteid']; $opts = option_resources($preset); $s1 = <<<EOS <label for='siteid'>Select a site</label>
function get_proxy_info_timeleft($debug = false) { $proxypath = proxy_path(); $command = <<<EOS /usr/bin/voms-proxy-info -file {$proxypath} -timeleft EOS; if ($debug) { dd($command); } exec($command, $output, $retval); $time = $output[0]; return $time; }