[[ Import all u5CMS resources (db only) ]] [h:] '.mysql_error().'
'.$sql_a.'
';
echo $name.' '.$column.'
';
}
$dir = 'fileversions/u5resourcesimporter/';
$files = scandir($dir, 1);
for($i=count($files);$i>-1;$i--) {
$file=explode('.',$files[$i]);
$name=$file[0];
$column=$file[1];
$lastmut=$file[2];
$content=file_get_contents('fileversions/u5resourcesimporter/'.$files[$i]);
if($name!='!u5resourcesexporter'&&$name!='!u5resourcesimporter'&&$name!='') {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
$sql_a="DELETE FROM resources WHERE deleted=1 AND name='".mysql_real_escape_string($name)."'";
$result_a=mysql_query($sql_a);
if ($result_a==false) echo 'SQL_a-Query did not work!
'.mysql_error().'
'.$sql_a.'
'; $sql_a="SELECT name FROM resources WHERE name='".mysql_real_escape_string($name)."'"; $result_a=mysql_query($sql_a); if ($result_a==false) echo 'SQL_a-Query did not work!
'.mysql_error().'
'.$sql_a.'
'; $num_a = mysql_num_rows($result_a); if($num_a<1) { $sql_a="INSERT INTO resources (name) VALUES ('".mysql_real_escape_string($name)."')"; $result_a=mysql_query($sql_a); if ($result_a==false) echo 'SQL_a-Query did not work!
'.mysql_error().'
'.$sql_a.'
'; } wfi($name,$column,$content); wfi($name,$column,$content); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// } unlink('fileversions/u5resourcesimporter/'.$files[$i]); } ?> [:h]