issue 70 data import developement.

but not yet complete at processbar


git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8979 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ovclas 2011-09-02 01:32:24 +00:00
parent 3503f2aeb8
commit 69ec09e2b8
3 changed files with 85 additions and 77 deletions

View file

@ -24,12 +24,23 @@
*/
function procImporterAdminCheckXmlFile() {
$filename = Context::get('filename');
$realPath = FileHandler::getRealPath($filename);
// TODO : when it success
$this->add('exists', 'true');
$this->add('type', 'XML'); // or TTXML
$isExists = 'false';
if(file_exists($realPath) && is_file($realPath)) $isExists = 'true';
$this->add('exists', $isExists);
// return new Object(-1, 'error');
if($isExists == 'true')
{
$type = 'XML';
$fp = fopen($realPath, "r");
$str = fgets($fp, 100);
if(stristr($str, 'tattertools')) $type = 'TTXML';
fclose($fp);
$this->add('type', $type);
}
}
/**