mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
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:
parent
3503f2aeb8
commit
69ec09e2b8
3 changed files with 85 additions and 77 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue