diff --git a/application/master/controller/Article.php b/application/master/controller/Article.php index d12bd84..8650073 100644 --- a/application/master/controller/Article.php +++ b/application/master/controller/Article.php @@ -439,6 +439,15 @@ class Article extends Controller $co = @copy("http://api.tmrjournals.com/public/articleSUB2/" . $data['file_sub2'], ROOT_PATH . 'public' . DS . 'articleSUB2' . DS . date('Ymd') . DS . $cfile_name); $insert['file_sub2'] = date('Ymd') . DS . $cfile_name; } + if(isset($data['file_sub_table'])&&$data['file_sub_table']!= ''){ + $cfile_name = "table_".substr($data['file_sub_table'],0, strripos($data['file_sub_table'], '/') -1 ).".pdf"; + if(!is_dir(ROOT_PATH . 'public' . DS . 'articleSUBTAB' . DS . date('Ymd'))){ + mkdir(ROOT_PATH . 'public' . DS . 'articleSUBTAB' . DS . date('Ymd')); + } + $co = @copy("http://api.tmrjournals.com/public/latex/" . $data['file_sub_table'], + ROOT_PATH . 'public' . DS . 'articleSUBTAB' . DS . date('Ymd') . DS . $cfile_name); + $insert['file_sub_table'] = date('Ymd') . DS . $cfile_name; + } if (isset($data['file_cdf']) && $data['file_cdf'] != '') { $cfile_name = substr($data['file_cdf'], strripos($data['file_cdf'], '/') + 1); if (!is_dir(ROOT_PATH . 'public' . DS . 'articleCDF' . DS . date('Ymd'))) {