Added jabberctl function
[mirrors/Kyberia-bloodline.git] / wwwroot / inc / eventz / upload_data_file.inc
index ea00274f74a1fcb5f453dbba864a920262d449a2..09aa33eae3bd99a0393b970edbb25205f79ca487 100644 (file)
@@ -26,6 +26,8 @@ function upload_data_file() {
                 mkdir(FILE_DIR.$_SESSION['user_id']);
        }
 
+       $suffix = array_pop(explode('.', basename($_FILES['data_file']['name'])));
+
        if ($suffix=='zip' && $_POST['unzip']) {
                mkdir(TMP."/".$_FILES['data_file']['name']);
 
@@ -68,10 +70,10 @@ function upload_data_file() {
                                            stristr($image_name,".jpeg") ){
                                                
                                                /// XXX UTILZ_DIR is not set. remove?
-                                               $cmd=UTILZ_DIR."/jpegtopnm  $image |".UTILZ_DIR."/pnmscale -width=$width | ".UTILZ_DIR."ppmquant 256 |".UTILZ_DIR."ppmtogif >".SYSTEM_ROOT."images/nodes/".substr($datanode_id,0,1)."/".substr($datanode_id,1,1)."/".$datanode_id.".gif";
+                                               $cmd=UTILZ_DIR."/jpegtopnm  $image |".UTILZ_DIR."/pnmscale -width=$width | ".UTILZ_DIR."ppmquant 256 |".UTILZ_DIR."ppmtogif >".SYSTEM_ROOT.SYSTEM_IMAGES.'/nodes/'.substr($datanode_id,0,1)."/".substr($datanode_id,1,1)."/".$datanode_id.".gif";
                                        }
                                        elseif (stristr($image_name,".gif")) {
-                                               $cmd=UTILZ_DIR."/gifsicle --resize ".$width."x_ $image > ".SYSTEM_ROOT."images/nodes/".substr($datanode_id,0,1)."/".substr($datanode_id,1,1)."/".$datanode_id.".gif";
+                                               $cmd=UTILZ_DIR."/gifsicle --resize ".$width."x_ $image > ".SYSTE_ROOT.SYSTEM_IMAGES.'/nodes/'.substr($datanode_id,0,1)."/".substr($datanode_id,1,1)."/".$datanode_id.".gif";
                                        }
                                        if ($cmd) {
                                                shell_exec($cmd);
This page took 0.126776 seconds and 4 git commands to generate.