removing temporary files

Esse commit está contido em:
Felipe Nascimento de Moura
2011-02-18 18:06:04 -02:00
commit 010daccdca
3 arquivos alterados com 1 adições e 168 exclusões
+1 -1
Ver Arquivo
@@ -16,7 +16,7 @@ mind3rd/API/temp/*
##
## Development meta files
##
*~
*.*~
.project
.DS_Store
nbproject
-89
Ver Arquivo
@@ -1,89 +0,0 @@
<?php
require(_MINDSRC_.'/mind3rd/API/external/Symfony/Component/Console/Shell.php');
require(_MINDSRC_.'/mind3rd/API/external/Symfony/Component/Console/Application.php');
require(_MINDSRC_.'/mind3rd/API/external/Symfony/Component/Console/Command/Command.php');
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Helper\HelperSet;
$app= new Symfony\Component\Console\Application('teste');
$app->addCommands(Array(
new RunTest(),
new Quit(),
new Auth(),
new Clear()
));
$helperSet= false;
$helperSet = ($helperSet) ?: new Symfony\Component\Console\Helper\HelperSet();
$app->setHelperSet($helperSet);
include_once('external/Symfony/Component/Console/Shell.php');
$sh= new external\Symfony\Component\Console\Shell($app);
$sh->run();
/**
* This file receives the shell call for a program,
* and parses its parameters, calling the program from the API
*
*/
/*
function shellExecute($command)
{
GLOBAL $_MIND;
readline_completion_function('mmindAutoComplete');
if(!is_array($command))
$command= explode(' ', $command);
$program= array_shift($command); // the first parameter is the program itself
try
{
$program= new $program($command);
//echo "\n";
}catch(Exception $e){
print_r($e->getMessage());
}
}
$fp = fopen("php://stdin", "r");
$in = '';
if(isset($params[0]))
{
if($params[0]== 'help' || $params[0]== '-h' || $params[0]== '--help')
{
new help();
exit;
}elseif($params[0]== '-u' && isset($params[1]))
{
new autenticate(Array($params[1]));
}
}else
new clear();
echo "Welcome to mind3rd:\nType help to see the help content\n";
while($in != "exit")
{
if(!isset($_SESSION['login']))
echo "mind > ";
else
echo $_SESSION['login'].'@mind > ';
$in=trim(fgets($fp));
if($in!='exit' && trim($in)!='')
{
shellExecute($in);
}
}
new clear();
exit;
*/
-78
Ver Arquivo
@@ -1,78 +0,0 @@
<?php
/**
* This file corresponds to the bootstrap.
* Every requisition should pass here
* This file decides which environment will be used
* and also some permissions, starting some environmental
* variables, such as language for localization
*/
session_start();
function __autoload($what)
{
GLOBAL $_MIND;
$what= preg_replace("/[ '\"\.\/]/", '', $what);
if(file_exists(_MINDSRC_.'/mind3rd/API/programs/'.$what.'.php'))
{
include(_MINDSRC_.'/mind3rd/API/programs/'.$what.'.php');
return true;
}
if(strpos($what, '\\')>=0)
{
$what= explode('\\', $what);
$what= array_pop($what);
}
$dirs= Array(
_MINDSRC_.'/mind3rd/API/external/Symfony/Component/Console/Input/',
_MINDSRC_.'/mind3rd/API/external/Symfony/Component/Console/Output/',
_MINDSRC_.'/mind3rd/API/external/Symfony/Component/Console/Command/',
_MINDSRC_.'/mind3rd/API/external/Symfony/Component/Console/Helper/'
);
for($i=0; $i<sizeof($dirs); $i++)
{
if(file_exists($dirs[$i].$what.'.php'))
{
require_once($dirs[$i].$what.'.php');
return true;
}
}
echo " [ERROR] Class not found: ".$what."\n";
exit;
return false;
}
/*
function __autoload($class)
{
GLOBAL $_MIND;
$class= preg_replace("/[ '\"\\\.\/]/", '', $class);
if(!isset($_SESSION['auth']) && $class != 'autenticate' && $class != 'help' && $class != 'clear')
{
$_MIND->write('not_allowed');
throw new Exception('');
return false;
}
$f= _MINDSRC_.'/mind3rd/API/programs/'.$class.'.php';
if(file_exists($f) && !class_exists($class))
require $f;
else{
$f= _MINDSRC_.'/'.$class.'.php';
if(file_exists($f) && !class_exists($class))
require $f;
else{
throw new Exception($_MIND->write('shell_no_such_file', false));
return false;
}
}
return true;
}*/
require('interfaces/program.php');
require('classes/Mind.php');
if(isset($_SERVER['argv']))
{
$params= $_SERVER['argv'];
array_shift($params);
}
$_MIND= new Mind();
if($_REQ['env']=='shell')
include('shell.php');
else
include('http.php');