summaryrefslogtreecommitdiff
path: root/convertfile.inc
diff options
context:
space:
mode:
authordiptighosalkar2016-03-18 11:36:10 +0530
committerdiptighosalkar2016-03-18 11:36:10 +0530
commit7031c187322191a50280259f2c4ad38b03bafb69 (patch)
tree697056452509c1eb682ce2040d4f08be9f425e88 /convertfile.inc
downloadEsim-Pspice-to-kicad-convertor-7031c187322191a50280259f2c4ad38b03bafb69.tar.gz
Esim-Pspice-to-kicad-convertor-7031c187322191a50280259f2c4ad38b03bafb69.tar.bz2
Esim-Pspice-to-kicad-convertor-7031c187322191a50280259f2c4ad38b03bafb69.zip
Initial commit
Diffstat (limited to 'convertfile.inc')
-rwxr-xr-xconvertfile.inc23
1 files changed, 23 insertions, 0 deletions
diff --git a/convertfile.inc b/convertfile.inc
new file mode 100755
index 0000000..77c239d
--- /dev/null
+++ b/convertfile.inc
@@ -0,0 +1,23 @@
+<?php
+
+function pspice_to_kicad_convert_file()
+{
+
+$upload_root_path=pspice_to_kicad_upload_path();
+$convert_root_path=pspice_to_kicad_convert_path();
+$uploadfolder = arg(3);
+$uploadfile=arg(4);
+$filenamearray = explode('.', $uploadfile);
+$filename=$filenamearray[0];
+$filePath=$upload_root_path."".$uploadfolder."/".$uploadfile;
+ _convert_run_script($convert_root_path ,$uploadfolder, $filePath ,$filename, $uploadfile);
+}
+
+
+function _convert_run_script($convert_root_path, $uploadfolder ,$filePath, $filename ,$uploadfile)
+{
+//var_dump($convert_root_path . " " . $uploadfolder . " " . $filePath . " " . $filename." ".$uploadfile);
+ $sh_command = "./run.sh " . $convert_root_path. " " . $uploadfolder . " " . $filePath . " " .$filename ." ".$uploadfile;
+ exec($sh_command);
+
+}