예제 #1
0
파일: folder.php 프로젝트: XaBerr/JUICE
function requireSubfolder($_dir = "./")
{
    $temp = subFolderFile($_dir);
    foreach ($temp as $i) {
        jRequire($_dir . "/" . $i);
    }
}
예제 #2
0
파일: requirer.php 프로젝트: XaBerr/JUICE
function requireComponent($_path, $_local = true)
{
    $path = getJFolder($_path, $_local, debug_backtrace());
    if (file_exists($path) && isPhp($path)) {
        jRequire($path, false, 0);
    } else {
        requireError($_path);
    }
}
예제 #3
0
파일: Menu.php 프로젝트: XaBerr/JUICE
<?php

jRequire("../Query/Query.php");
class Menu extends Query
{
    public function __construct()
    {
        parent::__construct();
    }
    public function init()
    {
        $menu = $this->queryFetch("SELECT * FROM menu WHERE flag_active = 1 ORDER BY `order`");
        $temp = [];
        foreach ($menu as $i) {
            if ($i["fk_menu"] == 0) {
                $pk_menu = $i["pk_menu"];
                array_push($temp, array("label" => $i["label"], "link" => $i["link"], "submenu" => [], "relative" => false));
                $submenu = $this->queryFetch("SELECT * FROM menu WHERE fk_menu = {$pk_menu} ORDER BY `order`");
                if ($submenu) {
                    foreach ($submenu as $j) {
                        array_push($temp[count($temp) - 1]["submenu"], array("label" => $j["label"], "link" => $j["link"], "submenu" => [], "relative" => false));
                    }
                }
            }
        }
        $this->tags["menu"] = $temp;
        return $temp;
    }
    public function draw()
    {
        $temp = "";
예제 #4
0
파일: Router.php 프로젝트: XaBerr/JUICE
<?php

jRequire("../Module/Module.php");
class Router extends Module
{
    public function __construct()
    {
        parent::__construct();
    }
    public function getPage()
    {
        $request = $this->parameters["app"]->server["REQUEST_URI"];
        $base = $this->parameters["app"]->server["RELATIVE"];
        $url = str_replace($base, "", $request);
        $url = explode("/", $url);
        return $url;
    }
}
예제 #5
0
파일: GUI.php 프로젝트: XaBerr/JUICE
<?php

jRequire("../Module/Module.php");
jRequire("../Pug/Pug.php");
jRequire("../Twig/Twig.php");
class GUI extends Module
{
    public function __construct()
    {
        parent::__construct();
    }
    public function init($_page)
    {
        $this->tags = $_page->tags;
    }
    public function draw($_template)
    {
        $page = "";
        $extension = explode(".", $_template);
        $extension = $extension[count($extension) - 1];
        $page = $this->parsingFile($_template, $extension);
        $render = $this->overlayTag($page);
        echo minifyOutput($render);
    }
    protected function overlayTag($_page)
    {
        foreach ($this->tags as $key => $value) {
            if (!is_array($value)) {
                $_page = str_replace("<_{$key}_>", "{$value}", $_page);
            }
        }
예제 #6
0
<?php

jRequire("vendor/autoload.php");
예제 #7
0
파일: STDTable.php 프로젝트: XaBerr/JUICE
<?php

jRequire("../../bundles/models/Template.php");
class STDTable extends Template
{
    public function __construct($_parameters)
    {
        //["i"], [false]
        parent::__construct($_parameters);
        if (isset($_parameters["page"]["skip"]) && $_parameters["page"]["skip"] != true) {
            $this->addModule(new Form());
            $this->addModule(new Button());
            $this->addModule(new Table());
            $this->addModule(new Popup());
            $this->modules["Form"]->addConnection("base", $this->currentConnection);
            $this->modules["Table"]->addConnection("base", $this->currentConnection);
            $this->modules["Table"]->modules["Form"]->addConnection("base", $this->currentConnection);
            $this->data["table"] = "anagrafica";
            $this->data["linkView"] = "anagrafica_v";
            $this->data["formName"] = "formAna";
            if ($_parameters["page"][0] == "i") {
                $this->tags["content"] .= $this->drawPageInsert();
            }
            if ($_parameters["page"][0] == "f") {
                $this->tags["content"] .= $this->drawPageFind();
            }
            if ($_parameters["page"][0] == "v") {
                $this->tags["content"] .= $this->drawPageView();
            }
        }
    }
예제 #8
0
파일: Parsedown.php 프로젝트: XaBerr/JUICE
<?php

jRequire("../Module/Module.php");
jRequire("Parsedown/Parsedown.php");
use Parsedown;
class Parsedown extends Module
{
    public function __construct()
    {
        parent::__construct();
    }
    public function drawFile($_template)
    {
        return $this->draw($_template);
    }
    public function drawText($_template)
    {
        return $this->draw(trim($_template));
    }
    public function draw($_template)
    {
        $Parsedown = new Parsedown\Parsedown();
        $page = $Parsedown->text($_template);
        return $page;
    }
}
예제 #9
0
파일: block.php 프로젝트: XaBerr/JUICE
<?php

jRequire("../modules/Pug/Pug.php");
jRequire("../modules/Parsedown/Parsedown.php");
function jBlock()
{
    return ob_start();
}
function jBlockClose($_type = "html", $_parameters = [])
{
    return jBlockEnd($_type, $_parameters);
}
function jBlockFile($_path, $_parameters = [])
{
    $extension = explode(".", $_path);
    $extension = $extension[count($extension) - 1];
    $extension = strtolower($extension);
    return jBlockFileMan($_path, $extension, $_parameters);
}
function jBlockFileMan($_path, $_type, $_parameters = [])
{
    $temp = file_get_contents($_path);
    return jBlockParsing($_type, $temp, $_parameters);
}
function jBlockEnd($_type = "html", $_parameters = [])
{
    $text = ob_get_clean();
    return jBlockParsing($_type, $text, $_parameters);
}
function jBlockParsing($_type = "html", $_string = "", $_parameters = [])
{