name = 'client'; $client->width = '600px'; $client->height = '350px'; $client->display = 'block'; $client->caption = $Language->update->caption. " (STEP ". $_REQUEST['status']. ")"; $client->drag = true; $client->resize = false; $client->closebutton = true; $client->smallbutton = false; $client->border = false; $client->bgcolor = ''; $client->statusbar = false; $client->top = "100px"; $client->help = $help->$_REQUEST['cmd']; $client->Lang = $Language; $client->body = "
Icon\" />
"; if ($_REQUEST['status'] == 1) { $client->body .= "
Try CMS version $xml->Version

2003/05 - $xml->Update
Url\" target=\"_New\"> Distribution : $xml->Distribution
development is software consultant terra

". $Language->update->serialkey. " : 
". $Language->update->auth. "
". $Language->update->comment. "
"; $javascript = " function gosubmit() { with(document.setupform) { if (key.value=='' || !Consent.checked) { alert('". $Language->update->authalert. "'); key.focus(); return; } submit(); } }"; } elseif ($_REQUEST['status'] == 2) { $client->body .= " ". $Language->update->listtitle. "
*". $Language->update->important. "
    "; $url = "http://update.trycms.net/utf/update.php?key=". $_REQUEST['key']. "&Host=". $_SERVER['SERVER_NAME']. "&IP=". $_SERVER['SERVER_ADDR']; $files = file_get_contents($url); $Files = split("\n", $files); clearstatcache(); foreach ($Files as $line) { if ($line) { list($path, $file, $flag, $date, $dummy) = split("\t", $line); if (is_file($path)) { $mtime = filemtime($path); $t = date("YmdHis", filemtime($path)); } else { $mtime = 0; } if ($mtime < $date) { $updateflag = 1; $icon = ""; $flag && $icon = " *"; $client->body .= "
  1. $file$icon
  2. "; } } } $client->body .= "
"; if ($updateflag) { $javascript .= " function gosubmit() { if (confirm('". $Language->update->confirm. "')) { document.setupform.submit(); } }"; } else { $client->body .= "
". $Language->update->nofiletitle. "

". $Language->update->nofilemsg; $javascript .= " function gosubmit() { $('#client').fadeOut('slow'); parent.location.href='./'; }"; } } elseif ($_REQUEST['status'] == 3) { $cnt = count($_REQUEST['files']); $Files = $_REQUEST['files']; $client->body .= "
". $Language->update->comptitle. "

". $Language->update->compmsg. "
    "; foreach ($Files as $line) { if ($src = file_get_contents("http://update.trycms.net/utf/inst.php?key=". $_REQUEST['key']. "&path=$line")) { if (preg_match("/default\.php/", $line)) { $src = str_replace("\r", "", $src); $src = str_replace("\n", " ", $src); $src = preg_replace("/(\troot[ ]+=> \")([\w\.\-]+)?(\",)/", "$1". $System['root']. "$3", $src); $src = str_replace(" ", "\n", $src); } $paths = split("\/", $line); $cnt = count($paths) - 1; if ($cnt) { $path = ""; for($i = 0; $i < $cnt; $i++) { $path && $path .= "/"; $path = $paths[$i]; !is_dir($path) && mkdir($path); } } file_put_contents($line, $src); $client->body .= "
  1. $line
  2. "; } } $client->body .= "
"; $javascript = " function gosubmit() { document.setupform.status.value=1; document.setupform.exec.value=1; document.setupform.submit(); }"; logregist($Language->update->logmsg); } $client->body .= "
". $Language->button->prev. " ". $Language->button->next. "
"; $html .= $client->show(); $javascript .= " centering('client', 'w');"; ?>