public function find_contract($dir, $id_user = null) { $contract_array = array(); $directory = new _Directory(); if ($id_user == null) { $this->QUERY = "SELECT id_contrato , nombre , contrato , " . "aceptado , fecha_envio , fecha_contrato FROM contrato WHERE id_usuario LIKE '{$this->ID_USER}'"; } else { $this->QUERY = "SELECT id_contrato , nombre , contrato , " . "aceptado , fecha_envio , fecha_contrato FROM contrato WHERE id_usuario LIKE '{$id_user}'"; } $result = parent::RawQuery($this->QUERY); foreach ($result as $key => $value) { $extension = $directory->Get_Extension($value['contrato']); $datafile = FileExtension::GetIcon_extension($dir, $extension, $value['contrato']); if ($datafile != false) { $contract_array[] = array("id" => $value['id_contrato'], "nombre" => $value['nombre'], "contrato" => $value['contrato'], "aceptado" => $value['aceptado'], "fecha_envio" => $value['fecha_envio'], "fecha_contrato" => $value['fecha_contrato'], "icono" => $datafile); } else { $contract_array[] = array("id" => $value['id_contrato'], "nombre" => $value['nombre'], "contrato" => $value['contrato'], "aceptado" => $value['aceptado'], "fecha_envio" => $value['fecha_envio'], "fecha_contrato" => $value['fecha_contrato'], "icono" => "DocBroken.png"); } } return $contract_array; }
public static function GetIcon_extension($dir, $ext, $fname = null) { $directory = new _Directory(); $datafiles = $directory->FindDataDirectory($dir); foreach ($datafiles as $key => $value) { if ($fname == $value['filename'] && $fname != null) { foreach (self::$extensions as $k => $v) { if ($k === $ext) { return $v; } } } else { foreach (self::$extensions as $k => $v) { if ($k === $ext) { return $v; } } } } return false; }
private function VerifyPlugin() { $zip = new \ZipArchive(); if (!$zip->open($this->path_plugin)) { return null; } $zip->extractTo($this->path); $zip->close(); $explode = explode(".zip", $this->path_plugin); $this->path = $explode[0]; $data = parent::FindDataDirectory($this->path); return $data; }
require $val['root'] . '/' . $val['filename']; } /* * Helper * * **/ $Dir_ = new _Directory(); $path_controller = $Dir_->FindDataDirectory($GLOBAL_PATH . "/Content/Helper/"); foreach ($path_controller as $k => $val) { require $val['root'] . '/' . $val['filename']; } /* * Library * * **/ $Dir_ = new _Directory(); $path_controller = $Dir_->FindDataDirectory($GLOBAL_PATH . "/Content/Library/"); foreach ($path_controller as $k => $val) { require $val['root'] . '/' . $val['filename']; } /** * View del sistema */ require $GLOBAL_PATH . '/Content/View/ViewClass.php'; /** * ACA SE AGREGARAN LOS SCRIPTS FUERA DEL NUCLEO DEL SISTEMA ... * **/ require $GLOBAL_PATH . '/Content/Web/admin/ViewPage/ViewHeader.php'; if (!function_exists("set_dependencies")) { function set_dependencies(array $lib) {
public static function get_directory_tree($directory, $pattern = null) { $directory = self::GetRootUrl($directory); $dir = new _Directory(); return $dir->FindDataDirectory($directory, $pattern); }