function doajax() { $a = patch::init(); if (empty($a)) { echo $_GET['callback'] . "({state:'0'})"; return; } switch ($this->iCMS->config['autopatch']) { case "1": //自动下载,安装时询问 patch::download($a[1]); echo $_GET['callback'] . "({state:'1',msg:'" . $a[3] . "发现iCMS最新版本<br />iCMS " . $a[0] . " [" . $a[1] . "]<br /><br />您当前使用的iCMS版本<br />iCMS " . iCMS_VER . " [" . iCMS_RELEASE . "]<br /><br />新版本已经下载完成!! 是否现在更新?'})"; break; case "2": //不自动下载更新,有更新时提示 echo $_GET['callback'] . "({state:'2',msg:'" . $a[3] . "发现iCMS最新版本<br />iCMS " . $a[0] . " [" . $a[1] . "]<br /><br />您当前使用的iCMS版本<br />iCMS " . iCMS_VER . " [" . iCMS_RELEASE . "]<br /><br />请更新你的iCMS!!!'})"; break; } }