Exemple #1
0
<?php

//Import::sUtils("InsertINTO.php");
//Import::sUtils("Update.php");
//Import::sUtils("IE.php");
//Import::sUtils("AddToQuery.php");
Import::sUtils("ArrayUtil.php");
Import::sUtils("Compiler.php");
Import::sUtils("Archive.php");
Import::sUtils("Result.php");
Import::sUtils("Image.php");
Import::sUtils("Metadata.php");
Import::sUtils("HtmlSnapShot.php");
Import::sUtils("S3.php");
ini_set('memory_limit', '400M');
krumo(S3::upload('/var/www/html/Modules/generated_files/videoOrganizer_v0/files/MUSTSEEANDREWARDOPENSUPONRACIALISSUESINBOXINGTALKSDOUBLESTANDARDSANDBIASES_kvUId.mp4'));
/*//------------------------------------------------------------------------------------------------
function getProject() {
	//----------------------------------------------------------
    //init var
	//----------------------------------------------------------
	$chk = array("bool" => true, 'result' => array(), "func" => "getProject");
	//----------------------------------------------------------
	exec("searchd --stop");
	//----------------------------------------------------------
	$chk = Result::go(
		"
		select 
		COUNT(*) 
		FROM 
		projects
 public function downloadToServer($arr, $filePath)
 {
     //----------------------------------------------------------
     //init var
     //----------------------------------------------------------
     $chk = array("bool" => true, 'result' => array(), "func" => "downloadToServer");
     //----------------------------------------------------------
     $arr_keys = array_keys($arr);
     for ($i = 0; $i < sizeof($arr); $i++) {
         $file = $filePath . stripslashes($arr[$arr_keys[$i]]['name']);
         if (!file_exists($filePath)) {
             $chk['bool'] = false;
             $chk['message'] = "'" . $filePath . "' directory does not exist!!!";
         } else {
             file_put_contents($file = $filePath . stripslashes($arr[$arr_keys[$i]]['name']), fopen($arr[$arr_keys[$i]]['index']['url'], 'r'));
             $chk = S3::upload($file, "videoOrganizer_v0/files/", stripslashes($arr[$arr_keys[$i]]['name']));
             unlink($file);
             if (!$chk['bool']) {
                 $chk['bool'] = false;
                 $chk['message'] = $filePath . $arr[$arr_keys[$i]]['name'] . " failed to upload!!!";
                 break;
             }
         }
     }
     return $chk;
 }