/**
 * Created by PhpStorm.
 * User: csibi
 * Date: 2015.08.23.
 * Time: 20:59
 */
function pwd($email, $pwd)
{
    $input = $email . ";" . $pwd;
    $unique_salt = \runner::config("pwd_salt");
    $unique_logarithm = \runner::config("pwd_logarithm");
    $unique_method = \runner::config("pwd_method");
    return \Routerunner\Crypt::crypter($input, null, null, 0, $unique_salt, $unique_logarithm, $unique_method);
}
/**
 * Created by PhpStorm.
 * User: csibi
 * Date: 2015.02.18.
 * Time: 14:55
 */
function logincrypt($email, $pwd, &$error = false)
{
    $isOk = false;
    $unique_salt = \runner::config("pwd_salt");
    $unique_logarithm = \runner::config("pwd_logarithm");
    $unique_method = \runner::config("pwd_method");
    $input = $email . ";" . $pwd;
    //var_dump(\Routerunner\Crypt::crypter($input, null, null, 0, $unique_salt, $unique_logarithm, $unique_method));
    $SQL = "SELECT pwd, confirm_date FROM member WHERE email = :email";
    if ($result = \Routerunner\Db::query($SQL, array(":email" => $email))) {
        $result = $result[0];
        if (is_null($result["confirm_date"])) {
            $error = "User has not been confirmed!";
        }
        $isOk = \Routerunner\Crypt::checker($input, $result["pwd"], $unique_salt, $unique_logarithm, $unique_method);
        if (!$isOk) {
            $error = "Incorrect password!";
        }
    } else {
        $error = "User is not exists!";
    }
    return $isOk;
}
<?php

/**
 * Created by PhpStorm.
 * User: csibi
 * Date: 2015.04.07.
 * Time: 16:33
 */
$debug = 1;
return array('wrapper_class' => 'rr-content', 'child_selector' => '.rr-content-model', 'fields' => array('label' => array_merge(\runner::config("property.label"), array('selector' => '.rr-content-label')), 'content' => array_merge(\runner::config("property.type.text"), array('selector' => '.rr-content-content')), 'tag' => array_merge(\runner::config("property.tag"), array('selector' => '.rr-content-tag select')), 'author' => array_merge(\runner::config("property.type.char"), array('selector' => '.rr-content-author')), 'contentimage' => array_merge(\runner::config("property.contentimage"), array('selector' => '.rr-content-contentimage', 'mediasize' => 'contentimage'))));
 * Time: 11:35
 */
/*
// model parameters
$model = "menu";
$from = "cs_menu";
$select = array("label");
$where = array("cs_menu_id > ?" => 1);
$orderBy = 'cs_menu_id DESC';
$limit = 5;
// SQL
$SQL = "SELECT label FROM cs_menu ORDER BY cs_menu_id";
*/
$from = 'e_campaign';
$leftJoin = array('e_cron ON e_cron.campaign = e_campaign.id');
$select = array('primary_key' => "CONCAT(CAST(e_campaign.id AS char(128)), '-', CAST(COALESCE(e_cron.id, 0) AS char(128)))", 'id' => 'COALESCE(e_cron.id, 0)', 'campaign_id' => 'e_campaign.id', 'active' => 'e_campaign.active', 'sent' => "COALESCE((SELECT COUNT(DISTINCT d.id) FROM e_delivered AS d WHERE d.cron_id = e_cron.id), 0)", 'to_send' => "COALESCE((SELECT COUNT(DISTINCT s.email) FROM e_subscriber AS s WHERE s.unsubscribe IS NULL AND CONCAT(',',e_campaign.category,',') LIKE CONCAT('%,',s.category,',%')), 0) - COALESCE((SELECT COUNT(DISTINCT d.id) FROM e_delivered AS d WHERE d.cron_id = e_cron.id), 0)", 'test_address' => "COALESCE(e_cron.test_address, '')", 'limit_per_period' => 'COALESCE(e_cron.limit_per_period, 100)', 'period' => 'COALESCE(e_cron.period, 3600)', 'start' => 'e_cron.start', 'finish' => 'e_cron.finish');
$SQL = "SELECT id FROM e_cron WHERE start IS NOT NULL AND finish IS NULL";
\runner::now("e_cron_running", false);
//$orderBy = \Routerunner\Routerunner::BY_TREE;
if (isset($_GET["campaign_search"])) {
    $where = array("label LIKE :like OR category LIKE :like OR mail_html LIKE :like" => '%' . $_GET["campaign_search"] . '%');
} elseif ($result = \db::query($SQL)) {
    $where = array("e_cron.id = :id" => $result[0]["id"]);
    \runner::now("e_cron_running", $result[0]["id"]);
} else {
    $where = array("active = '1'" => null);
    $limit = 50;
}
$orderBy = 'COALESCE(e_cron.id, 0) DESC, e_campaign.id DESC';
$primary_key = 'primary_key';
$force_list = true;
<?php

/**
 * Created by PhpStorm.
 * User: csibi
 * Date: 2015.04.07.
 * Time: 16:33
 */
$debug = 1;
return array('wrapper_class' => 'rr-message', 'child_selector' => '.rr-message-model', 'fields' => array('name' => array_merge(\runner::config("property.label"), array('selector' => '.rr-message-name')), 'email' => array_merge(\runner::config("property.type.char"), array('selector' => '.rr-message-email')), 'date' => array_merge(\runner::config("property.date"), array('selector' => '.rr-message-date', 'default' => time())), 'avatar' => array_merge(\runner::config("property.leadimage"), array('selector' => '.rr-message-avatar')), 'data_avatar' => array_merge(\runner::config("property.data_leadimage"), array('selector' => '.rr-message-data_avatar')), 'subject' => array_merge(\runner::config("property.type.char"), array('selector' => '.rr-message-subject')), 'comment' => array_merge(\runner::config("property.type.textarea"), array('selector' => '.rr-message-comment')), 'model_reference' => array_merge(\runner::config("property.type.int"), array('selector' => '.rr-message-model_reference')), 'option' => array_merge(\runner::config("property.type.int"), array('selector' => '.rr-message-option')), 'nonce' => array_merge(\runner::config("property.type.char"), array('selector' => '.rr-message-nonce')), 'ip_address' => array_merge(\runner::config("property.type.char"), array('selector' => '.rr-message-ip_address')), 'user_agent' => array_merge(\runner::config("property.type.char"), array('selector' => '.rr-message-user_agent'))));
                }
                if (is_dir($path)) {
                    foreach ($file as $key => $current_file) {
                        if (!$found && $path && $current_file && file_exists($path . $dirsep . $checkfiles[$key])) {
                            $response["script"] = str_replace(\runner::config("SITEROOT"), "", $path . $dirsep . $checkfiles[$key]);
                            $route = str_replace(\runner::config("SITEROOT"), "", $path);
                            $response["route"] = explode($dirsep, $route);
                            $response["content"] = file_get_contents($path . $dirsep . $checkfiles[$key]);
                            $found = true;
                        }
                    }
                }
            }
            if (!$found) {
                $path = \runner::config("SITEROOT") . \runner::config("BACKEND_ROOT") . "scaffold" . $dirsep . "backend" . $dirsep . "input" . $dirsep;
                if (is_dir($path)) {
                    foreach ($file as $key => $current_file) {
                        if (!$found && $path && $current_file && file_exists($path . $dirsep . $checkfiles[$key])) {
                            $response["script"] = str_replace(\runner::config("SITEROOT"), "", $path . $dirsep . $checkfiles[$key]);
                            $route = str_replace(\runner::config("SITEROOT"), "", $path);
                            $response["route"] = explode($dirsep, $route);
                            $response["content"] = file_get_contents($path . $dirsep . $checkfiles[$key]);
                            $found = true;
                        }
                    }
                }
            }
        }
    }
    echo json_encode($response);
});
<?php

/**
 * Created by PhpStorm.
 * User: csibi
 * Date: 2014.09.08.
 * Time: 15:33
 */
require '../../Routerunner/Routerunner.php';
use Routerunner\Routerunner as runner;
$route = isset($_POST['route']) ? $_POST['route'] : false;
$reference = isset($_POST['reference']) ? $_POST['reference'] : false;
$draft = isset($_POST['draft']) ? $_POST['draft'] : false;
new runner(array('root' => 'standard', 'SITE' => 'appetizer', 'SITENAME' => 'appetizer', 'BASE' => 'http://' . $_SERVER['HTTP_HOST'] . '/appetizer/', 'mode' => 'draft', 'reference' => $reference, 'draft' => $draft), function () use($route) {
    echo \runner::route($route, null, $router, true);
});
<div class="rr-feature-model col-md-3 col-sm-6">
	<div class="panel panel-default text-center">
		<div class="panel-heading">
			<span class="fa-stack fa-5x">
				<?php 
if (\model::property("icon_class") || \runner::config("mode") == "backend") {
    ?>
					<span class="fa <?php 
    echo \model::property("icon_class");
    ?>
"></span>
				<?php 
}
?>
			</span>
		</div>
		<div class="panel-body">
			<h4 class="rr-feature-label"><?php 
echo \model::property("label");
?>
</h4>
			<div class="rr-feature-lead">
				<?php 
echo \model::property("lead");
?>
			</div>
			<?php 
if (trim(\model::property("link"), " #")) {
    ?>
				<a href="<?php 
    echo \model::property("link");
<?php

/**
 * Created by PhpStorm.
 * User: csibi
 * Date: 2015.04.01.
 * Time: 15:38
 */
\runner::now("main_class", "tt-slider-");
<?php

/**
 * Created by PhpStorm.
 * User: csibi
 * Date: 2014.10.23.
 * Time: 16:23
 */
\runner::stack("session_id", false, true);
                break;
            }
        }
    }
    if ($model && is_object($model) && $model->permission && !$model->movable()) {
        $allowed = false;
    } elseif ($model && !is_object($model)) {
        $allowed = false;
    }
}
if ($allowed) {
    $traverse = $runner->backend_context;
    $scaffold = \Routerunner\Helper::$scaffold_root;
    $tree = @(include $scaffold . '/model/tree.php');
    \runner::stack('traverse', $traverse, true);
    \runner::stack('tree', $tree, true);
    ?>
	<form name="routerunner-movement" id="routerunner-movement" class="row" role="form"
		  data-jstreetypes='<?php 
    echo json_encode($jstree_types);
    ?>
'>
		<div id="routerunner-tree" data-traverse='<?php 
    echo json_encode($traverse);
    ?>
' class="col-xs-12">
		</div>
	</form>
<?php 
} else {
    echo '	<h3 class="text-danger">Movement not allowed for this model!</h3>';
        $allowed = false;
    } elseif ($model && !is_object($model)) {
        $allowed = false;
    }
    if ($allowed) {
        $context = array("direct" => $runner->context["reference"], "session" => \runner::stack("session_id"), "silent" => true);
        $model_route = "/model/" . $runner->context["model_class"];
        \runner::redirect_route($model_route, \runner::config("scaffold"), true, $context, $router, $model);
        if (is_array($model)) {
            $model = array_shift($model);
        }
        $runner->context["model"] = $model;
    }
} elseif (isset($runner->context["route"], $runner->context["reference"])) {
    $context = array("direct" => $runner->context["reference"], "silent" => true);
    $model = \model::load($context, $runner->context["route"], $router, false, \runner::config("scaffold"));
    if (is_array($model)) {
        $models = $model;
        foreach ($models as $item) {
            if ($item->reference == $runner->context["reference"]) {
                $model = $item;
                break;
            }
        }
    }
    if ($model && $model->permission && !$model->deletable()) {
        $allowed = false;
    }
}
$runner->context["allowed"] = $allowed;
?>
	<?php 
$router = false;
if ($open) {
    $removed = array();
    $children = \Routerunner\Bootstrap::children($runner->context['reference']);
    foreach ($children as $index => $child) {
        $open = in_array($child['reference'], $traverse['parents_ref']) ? true : false;
        if ($models_created) {
            foreach ($models_created as $created_data) {
                if (in_array($child['reference'], $created_data["parent"])) {
                    $open = true;
                }
            }
        }
        $override = null;
        $child_context = array('reference' => $child['reference'], 'model_class' => $child['model_class'], 'table_id' => $child['table_id'], 'route' => $runner->context['route'], 'open' => $open);
        if (isset($child['label'])) {
            $override = array('label' => $child['label']);
            //$child_context['label'] = $child['label'];
        }
        $root = \runner::config("BACKEND_DIR") . DIRECTORY_SEPARATOR . 'scaffold';
        \runner::route('/backend/tree/model', $child_context, $router, false, $override, $root);
    }
}
?>
	</<?php 
echo $element;
?>
>

<?php

/**
 * Created by PhpStorm.
 * User: csibi
 * Date: 2015.04.07.
 * Time: 16:33
 */
$debug = 1;
$class_options = explode(";", "bg-default;bg-primary;bg-info;bg-success;bg-warning;bg-danger");
sort($class_options);
$currency_options = explode(";", "Ft;€;\$");
sort($currency_options);
return array('wrapper_class' => 'rr-pricing', 'child_selector' => '.rr-pricing-model', 'fields' => array('label' => array_merge(\runner::config("property.label"), array('selector' => '.rr-pricing-label')), 'description' => array_merge(\runner::config("property.lead"), array('selector' => '.rr-pricing-description')), 'addon_class' => array_merge(\runner::config("property.type.select"), array('selector' => '.rr-pricing-addon_class select', 'options' => $class_options, 'help' => array('panel' => ''))), 'content' => array_merge(\runner::config("property.type.text"), array('selector' => '.rr-pricing-content')), 'price' => array_merge(\runner::config("property.type.int"), array('selector' => '.rr-pricing-price')), 'currency' => array_merge(\runner::config("property.type.select"), array('selector' => '.rr-pricing-currency select', 'options' => $currency_options, 'help' => array('panel' => ''))), 'link' => array_merge(\runner::config("property.type.char"), array('selector' => '.rr-pricing-link')), 'button' => array_merge(\runner::config("property.type.char"), array('selector' => '.rr-pricing-button'))));
 */
$post = $_POST;
$msg = "";
$SQL = "SELECT id, email, confirm_date, licence FROM member WHERE email = :email";
if ($result = \Routerunner\Db::query($SQL, array(":email" => $post["email"]))) {
    $user = $result[0];
    if (is_null($user["confirm_date"])) {
        $msg = "User has not been confirmed!";
    }
    if (!$msg) {
        // confirm generálás
        $secret = uniqid(md5(uniqid('', true)));
        $confirm = 'forgotten/' . implode('/', $user) . '/' . $secret;
        $expire = time() + 2 * 24 * 60 * 60;
        $confirm_hash = \Routerunner\Crypt::crypter($confirm, $expire, $user['id'], 0, $secret);
        $path = runner::config("BASE") . 'admin/forgotten/?' . $user['id'] . '/' . $secret . '/' . $confirm_hash;
        $user["confirm_code"] = $path;
        if ($result = \mail::mailer("/mail/forgotten", $user, null)) {
            $debug = 1;
        } else {
            $msg = "E-mail cannot be sent!";
        }
    }
} else {
    $msg = "User is not exists!";
}
if ($msg) {
    echo '<div class="alert alert-forgotten alert-danger">' . $msg . '</div>';
} else {
    echo '<div class="alert alert-forgotten alert-success">New password confirmation has been sent to your e-mail address!</div>';
}
<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<?php 
\runner::route("head");
if (isset($_SESSION['routerunner-open-script'])) {
    echo $_SESSION['routerunner-open-script'];
    unset($_SESSION['routerunner-open-script']);
}
?>
<body>

<?php 
\runner::route("body");
?>

<?php 
\runner::route("foot");
echo \runner::js_after();
?>
</body>
</html>
<?php

/**
 * Created by PhpStorm.
 * User: csibi
 * Date: 2015.07.13.
 * Time: 11:11
 */
$bootstrap = \bootstrap::get();
$params = $bootstrap->params;
$search = isset($_GET["search"]) ? $_GET["search"] : "";
\runner::route("/backend/pages/user/memberform", array("profile" => \user::me()));
				<ul class="nav navbar-nav pull-right">
					<li class="droddown dropdown-separator">
						<span class="separator"></span>
					</li>
					<?php 
\runner::route("languages");
?>
					<li class="droddown dropdown-separator">
						<span class="separator"></span>
					</li>
					<?php 
\runner::route("usermenu");
?>
				</ul>
			</div>
			<!-- END TOP NAVIGATION MENU -->

			<?php 
\runner::route('/backend/panel/menu');
?>
		</div>
	</div>
	<!-- END HEADER MENU -->
	<?php 
if (\runner::now("page") == "editor") {
    \runner::route('editor');
}
?>
</div>
<!-- END HEADER -->
<?php

/**
 * Created by PhpStorm.
 * User: csibi
 * Date: 2015.04.07.
 * Time: 16:33
 */
$debug = 1;
return array('wrapper_class' => 'rr-product', 'child_selector' => '.rr-product-model', 'fields' => array('label' => array_merge(\runner::config("property.label"), array('selector' => '.rr-product-label')), 'date' => array_merge(\runner::config("property.date"), array('selector' => '.rr-product-date', 'default' => time())), 'lead' => array_merge(\runner::config("property.lead"), array('selector' => '.rr-product-lead')), 'content' => array_merge(\runner::config("property.type.text"), array('selector' => '.rr-product-content')), 'category' => array_merge(\runner::config("property.category"), array('selector' => '.rr-product-category select')), 'leadimage' => array_merge(\runner::config("property.leadimage"), array('selector' => '.rr-product-leadimage', 'mediasize' => 'leadimage')), 'contentimage' => array_merge(\runner::config("property.contentimage"), array('selector' => '.rr-product-contentimage', 'mediasize' => 'contentimage')), 'price' => array_merge(\runner::config("property.type.int"), array('selector' => '.rr-product-price'))));
						</table>
				<span class="devider">
				</span>
						<table class="row">
							<tr>
								<td class="wrapper last">
									<!-- BEGIN: Disscount Content -->
									<table class="twelve columns">
										<tr>
											<td>
												<h4>70% Disscount!</h4>
												<p>
													Phasellus dictum sapien a neque luctus cursus. Pellentesque sem dolor, fringilla et pharetra vitae. Pellentesque sem dolor, fringilla et pharetra vitae
												</p>
												<img src="<?php 
echo runner::config("BASE");
?>
metronic/assets/admin/pages/media/email/article.png" class="ie10-responsive" alt=""/>
											</td>
											<td class="expander">
											</td>
										</tr>
									</table>
									<!-- END: Disscount Content -->
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
			<!-- END: Content -->
        } else {
            $where = array('id IN (' . implode(",", $children) . ')' => null);
        }
        \runner::route($page, $where);
    }
} elseif ($resource_uri == "unsubscribe/success") {
    echo '			<div class="row">' . PHP_EOL;
    echo '				<div class="col-md-12">' . PHP_EOL;
    echo '					<h1>Ön sikeresen leiratkozott leveleinkről!<br> Elnézését kérjük a zavarásért, ' . 'a jövőben erre a címre nem fog tőlünk kapni e-mailt!</h1>' . PHP_EOL;
    echo '				</div>' . PHP_EOL;
    echo '			</div>' . PHP_EOL;
} elseif ($resource_uri == "unsubscribe/error" || strpos($resource_uri, "unsubscribe/") !== false) {
    echo '			<div class="row">' . PHP_EOL;
    echo '				<div class="col-md-12">' . PHP_EOL;
    echo '					<h1><h1>Hiba történt a leiratkozás során!<br>Kérjük írjon a ' . '<a href="mailto:web-plasztika@retroscope.hu" target="_blank">web-plasztika@retroscope.hu</a> címre' . ' és kollégánk rögtön törölni fogja e-mail címét!<br>Elnézését kérjük a zavarásért!</h1>' . PHP_EOL;
    echo '				</div>' . PHP_EOL;
    echo '			</div>' . PHP_EOL;
} elseif ($current && isset($current["menu"]) && $current["menu"] === "1") {
    \runner::route("home");
} elseif (isset($current) && is_array($current) && count($current) === 0 && !\bootstrap::get("url")) {
    \runner::route("home");
} else {
    echo '			<div class="row">' . PHP_EOL;
    echo '				<div class="col-md-12">' . PHP_EOL;
    \runner::route("error404");
    echo '				</div>' . PHP_EOL;
    echo '			</div>' . PHP_EOL;
}
?>
</div>
                header("Location: " . $url);
            } elseif ($method == "open") {
                try {
                    $im = @imagecreatetruecolor(1, 1);
                    @imagealphablending($im, true);
                    $transparent = @imagecolorallocatealpha($im, 0, 0, 0, 127);
                    @imagefilledrectangle($im, 0, 0, 1, 1, $transparent);
                    @header('Content-type: image/png');
                    @imagepng($im);
                    @imagedestroy($im);
                } catch (Exception $e) {
                }
            } elseif ($method == "click") {
                $url = stripslashes($click_url);
                if (!preg_match('~^http(s)?:\\/\\/~', $url)) {
                    $url = \runner::config("BASE") . $url;
                }
                header("Location: " . $url);
            }
        } elseif ($click_url) {
            $url = stripslashes($click_url);
            if (!preg_match('~^http(s)?:\\/\\/~', $url)) {
                $url = \runner::config("BASE") . $url;
            }
            header("Location: " . $url);
        } else {
            header("Location: " . \runner::config("BASE"));
        }
    }
}
$debug = 1;
<?php

$debug = 1;
$url = \bootstrap::get("url");
$backend_uri = false;
$backend_session = false;
$code = false;
//backend_mode($backend_uri, $backend_session, $code);
?>

<body class="page-md page-header-top-fixed">
<div class="backend-wrapper">
	<?php 
\runner::route('/backend/frame/header');
?>

	<!-- BEGIN CONTAINER -->
	<div class="page-container row container-fluid container-margin">
		<h1>User settings</h1>
		<?php 
if (\runner::now("subpage")) {
    \runner::route(\runner::now("subpage"));
}
?>
	</div>
</div>
</body>
 public function set_cache()
 {
     if (\runner::config('mode') != 'backend' && \Routerunner\Routerunner::$cache && \Routerunner\Routerunner::$cache_type == 'Memcached') {
         \Routerunner\Routerunner::$cache->set($this->cache_route . '|html', $this->runner->html, $this->runner->cache_exp);
         \Routerunner\Routerunner::$cache->set($this->cache_route . '|model', $this->runner->model, $this->runner->cache_exp);
     } elseif (\runner::config('mode') != 'backend' && \Routerunner\Routerunner::$cache && \Routerunner\Routerunner::$cache_type == 'Memcache' && strlen($this->cache_route) < 250) {
         \Routerunner\Routerunner::$cache->set($this->cache_route . '|html', $this->runner->html, MEMCACHE_COMPRESSED, $this->runner->cache_exp);
         \Routerunner\Routerunner::$cache->set($this->cache_route . '|model', $this->runner->model, MEMCACHE_COMPRESSED, $this->runner->cache_exp);
     }
 }
                                            $response["success"] = true;
                                            if ($result_apply = \db::query($SQL_apply, $params_apply)) {
                                                $response["apply"] = $result_apply[0];
                                            }
                                            if (isset($field_context["is_label"]) && $field_context["is_label"]) {
                                                $SQL_rewrite = 'SELECT `rewrite_id` FROM `{PREFIX}rewrites` ';
                                                $SQL_rewrite .= 'WHERE `reference` = :reference';
                                                $params_rewrite = array(":reference" => $model->reference);
                                                if (!\db::query($SQL_rewrite, $params_rewrite)) {
                                                    $SQL_rewrite = <<<SQL
INSERT INTO `{PREFIX}rewrites` (`url`, `resource_uri`, `reference`, `primary`)
VALUES (:url, :resource_uri, :reference, :primary)

SQL;
                                                    $resource_uri = $model->class . '/' . $model->table_id;
                                                    $ascii = \runner::get_rewrite_url($value, $model->reference, $resource_uri);
                                                    $params_rewrite = array(':url' => $ascii, ':resource_uri' => $resource_uri, ':reference' => $model->reference, ':primary' => 1);
                                                    \db::insert($SQL_rewrite, $params_rewrite);
                                                }
                                                // save title
                                                $SQL_meta = 'SELECT model_meta_id, title FROM `{PREFIX}model_metas` ';
                                                $SQL_meta .= 'WHERE `reference` = :reference';
                                                $params_meta = array(":reference" => $model->reference);
                                                $result_meta = \db::query($SQL_meta, $params_meta);
                                                $title = '';
                                                $prefixes = \bootstrap::get("pageproperties_prefix");
                                                if ($prefixes && isset($prefixes["title"])) {
                                                    $title .= $prefixes["title"];
                                                }
                                                $title .= $value;
                                                if (!$result_meta) {
<!-- BEGIN THIRD PARTY SCRIPTS -->
<!--
<script src="<?php 
echo \runner::config("BACKEND_ROOT");
?>
backend/thirdparty/iviewer/jquery.iviewer.js" type="text/javascript"></script>
<script src="<?php 
echo \runner::config("BACKEND_ROOT");
?>
backend/thirdparty/cropper/dist/cropper.js" type="text/javascript"></script>
-->

<script src="<?php 
echo \runner::config("BACKEND_ROOT");
?>
backend/thirdparty/focuspoint/jquery.focuspoint.js" type="text/javascript"></script>

<script src="<?php 
echo \runner::config("BACKEND_ROOT");
?>
backend/thirdparty/kcfinder/adapters/jquery.js" type="text/javascript"></script>

<script src="<?php 
echo \runner::config("BACKEND_ROOT");
?>
backend/thirdparty/uploadPreview/jquery.uploadPreview.min.js" type="text/javascript"></script>
<!-- END THIRD PARTY SCRIPTS -->

</body>

 }
 $parents = \Routerunner\Bootstrap::parent($reference);
 if (isset($parents[0]["model_class"]) && $parents[0]["model_class"] == "lang") {
     $lang = array_shift($parents);
 }
 $path_route = '';
 while ($parent = array_shift($parents)) {
     $_model_context = array("direct" => $parent["reference"], "session" => \runner::stack("session_id"));
     $router = false;
     $route = '/model/' . $parent["model_class"];
     \runner::redirect_route($route, \runner::config("scaffold"), true, $_model_context, $router, $parent_model);
     if (is_array($parent_model) && count($parent_model) == 1) {
         $parent_model = array_shift($parent_model);
     }
     if (isset($parent_model) && is_object($parent_model) && get_parent_class($parent_model) == "Routerunner\\BaseModel" && isset($parent_model->label)) {
         $path_route .= \runner::toAscii($parent_model->label) . DIRECTORY_SEPARATOR;
     }
     $debug = 1;
 }
 if (isset($value["src"])) {
     // crop image
     $src = $_SESSION["runner_config"]['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . $_SESSION["runner_config"]["SITEROOT"] . $value["src"];
     $filename = substr($value["src"], strrpos($value["src"], DIRECTORY_SEPARATOR) + 1);
     $mimetype = false;
     $layer = ImageWorkshop::initFromPath($src, false, $mimetype);
     if (isset($value["rotate"])) {
         $layer->rotate($value["rotate"]);
     } elseif (isset($value["angle"])) {
         $layer->rotate($value["angle"]);
     }
     if ($crops) {
<?php

/**
 * Created by PhpStorm.
 * User: csibi
 * Date: 2015.04.07.
 * Time: 16:33
 */
$class_options = explode(";", "bg-default;bg-primary;bg-info;bg-success;bg-warning;bg-danger");
sort($class_options);
return array('wrapper_class' => 'rr-freecontent', 'child_selector' => '.rr-freecontent-model', 'fields' => array('label' => array_merge(\runner::config("property.label"), array('selector' => '.rr-freecontent-label')), 'description' => array_merge(\runner::config("property.lead"), array('selector' => '.rr-freecontent-description')), 'link' => array_merge(\runner::config("property.type.char"), array('selector' => '.rr-freecontent-link')), 'addon_class' => array_merge(\runner::config("property.type.select"), array('selector' => '.rr-freecontent-addon_class select', 'options' => $class_options, 'help' => array('panel' => ''))), 'image' => array_merge(\runner::config("property.contentimage"), array('selector' => '.rr-freecontent-image', 'default' => 'Routerunner/placeholder/600x600')), 'data_image' => array_merge(\runner::config("property.data_contentimage"), array('selector' => '.rr-freecontent-data_image', 'default' => '{"src": "Routerunner/placeholder/600x600", "x": 0, "y": 0, "width": 600, "height": 600, "rotate": 0, "canvasData": {}}', 'width' => '600px', 'height' => '600px')), 'html_code' => array_merge(\runner::config("property.type.text"), array('selector' => '.rr-freecontent-html_code'))));
		<div class="caption font-red col-md-6">
			<i class="fa fa-file-text-o font-red"></i>
			<span class="caption-subject bold uppercase"> Properties</span>
		</div>
		<div class="col-md-6">


<?php 
$form_content = '';
if ($allowed) {
    $filters = array("hidden-on-page", "visible-on-page");
    $hiddens = array();
    $fields = isset($router->runner->backend_context["model"]["fields"]) ? $router->runner->backend_context["model"]["fields"] : array();
    $route = isset($runner->context["route"]) ? explode("/", $runner->context["route"]) : false;
    $scaffold = \Routerunner\Helper::$scaffold_root . DIRECTORY_SEPARATOR . "input";
    $backend_scaffold = \Routerunner\Helper::$document_root . DIRECTORY_SEPARATOR . \runner::config("BACKEND_DIR") . DIRECTORY_SEPARATOR . 'scaffold' . DIRECTORY_SEPARATOR . "input";
    foreach ($fields as $field_name => $field_data) {
        $_route = $route;
        $input = false;
        while (!$input && count($_route)) {
            if (file_exists($scaffold . implode(DIRECTORY_SEPARATOR, $_route) . DIRECTORY_SEPARATOR . $field_name . ".php")) {
                $input = $scaffold . implode(DIRECTORY_SEPARATOR, $_route) . DIRECTORY_SEPARATOR . $field_name . ".php";
            } elseif (file_exists($scaffold . implode(DIRECTORY_SEPARATOR, $_route) . DIRECTORY_SEPARATOR . $field_data["type"] . ".php")) {
                $input = $scaffold . implode(DIRECTORY_SEPARATOR, $_route) . DIRECTORY_SEPARATOR . $field_data["type"] . ".php";
            }
            if (!$input && count($_route)) {
                array_pop($_route);
            }
        }
        if (!$input) {
            if (file_exists($backend_scaffold . DIRECTORY_SEPARATOR . $field_name . ".php")) {
<?php

/**
 * Created by PhpStorm.
 * User: csibi
 * Date: 2014.10.20.
 * Time: 10:33
 */
session_start();
require $_SESSION["runner_config"]['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . $_SESSION["runner_config"]["SITEROOT"] . $_SESSION["runner_config"]["BACKEND_ROOT"] . 'Routerunner/Routerunner.php';
use Routerunner\Routerunner as runner;
$post = array_merge($_GET, $_POST);
new runner(array('mode' => 'backend', 'scaffold' => 'scaffold', 'params' => $post), function () use($post) {
    $router = false;
    $route = "/backend/panel/pageproperties";
    $override = null;
    $root = \runner::config("BACKEND_DIR") . DIRECTORY_SEPARATOR . 'scaffold';
    echo \runner::route($route, $post, $router, true, $override, $root);
});