本文整理汇总了PHP中runner::config方法的典型用法代码示例。如果您正苦于以下问题:PHP runner::config方法的具体用法?PHP runner::config怎么用?PHP runner::config使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类runner
的用法示例。
在下文中一共展示了runner::config方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: pwd
/**
* 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);
}
示例2: logincrypt
/**
* 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;
}
示例3: header
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;
示例4: array
<?php
/**
* Created by PhpStorm.
* User: csibi
* Date: 2015.07.13.
* Time: 11:27
*/
$debug = 1;
$form = array('method' => 'post', 'xmethod' => isset($_GET["id"]) && is_numeric($_GET["id"]) && $_GET["id"] > 0 ? 'put' : 'post', 'name' => 'e_campaign', 'error_format' => '<p class="err">%s</p>' . PHP_EOL, 'from' => 'e_campaign', 'condition' => array(array('e_campaign.id = :id', array(':id' => 'id'), 'AND')));
$nonce = uniqid(rand(0, 1000000));
if (!isset($_POST["nonce"])) {
$_SESSION["nonce"] = \Routerunner\Crypt::crypter($nonce);
}
$value = array("label" => "", "category" => "", "active" => "1", "mail_route" => "", "subject" => "", "mail_html" => "");
if (isset($_GET["id"]) && is_numeric($_GET["id"])) {
$SQL = "SELECT label, category, active, mail_route, subject, mail_html, mail_text FROM `e_campaign` WHERE id = ?";
if ($result = \db::query($SQL, array($_GET["id"]))) {
$value = array_merge($value, $result[0]);
}
}
if (!$value["mail_html"] && \runner::config("newsletter_mail_html")) {
$value["mail_html"] = \runner::config("newsletter_mail_html");
}
$input = array('id' => array('type' => 'hidden', 'field' => 'id', 'value' => isset($_GET["id"]) ? $_GET["id"] : ""), 'nonce' => array('type' => 'hidden', 'field' => 'nonce', 'value' => $nonce), 'label' => array('type' => 'text', 'field' => 'label', 'label' => 'Label', 'input-id' => 'frm-name', 'class' => '', 'value' => $value["label"]), 'category' => array('type' => 'select', 'field' => 'category', 'label' => 'Category', 'input-id' => 'frm-category', 'class' => '', 'value' => $value["category"]), 'active' => array('type' => 'boolean', 'field' => 'active', 'label' => 'Active state', 'input-id' => 'frm-active', 'class' => '', 'value' => $value["active"]), 'subject' => array('type' => 'text', 'field' => 'subject', 'label' => 'Subject', 'input-id' => 'frm-subject', 'class' => '', 'value' => $value["subject"]), 'mail_html' => array('type' => 'ckeditor', 'field' => 'mail_html', 'label' => 'Message content', 'input-id' => 'frm-mail_html', 'class' => '', 'value' => $value["mail_html"]), 'mail_text' => array('type' => 'textarea', 'field' => 'mail_text', 'label' => 'Message text content', 'input-id' => 'frm-mail_text', 'class' => '', 'value' => $value["mail_text"]), 'submit' => array('type' => 'submit', 'input-id' => 'frm-submit', 'value' => 'Save'));
$unset = array("submit");
示例5:
</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 -->
示例6: array
}
}
if (($resource = json_decode($change["resource"], true)) && isset($resource["route"])) {
$model_route = $resource["route"];
} else {
$model_class = "get_the_proper_model_class";
$model_route = "/model";
}
if ($model_class && substr($model_route, -1 * (strlen($model_class) + 1)) != '/' . $model_class) {
$model_route .= '/' . $model_class;
}
$context = array("direct" => $change["reference"], "session" => \runner::stack("session_id"), "silent" => true);
$router = false;
$model = false;
\runner::stack("model_create", array("class" => $model_class));
\runner::redirect_route($model_route, \runner::config("scaffold"), true, $context, $router, $model);
\runner::stack("model_create", false);
if ($model && is_array($model)) {
$model = array_shift($model);
}
if (is_object($model) && get_parent_class($model) == "Routerunner\\BaseModel" && ($changes = json_decode($change["changes"], true))) {
switch ($change["state"]) {
case "property":
foreach ($changes as $field => $value) {
if (property_exists($model, $field) && isset($model->table_from) && isset($model->table_id)) {
$model->{$field} = $value;
$pk = false;
if (isset($router->runner->model_context["primary_key"])) {
$pk = $router->runner->model_context["primary_key"];
} else {
$SQL = <<<SQL
示例7: array
<?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'))));
示例8:
<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");
示例9: foreach
}
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);
});
示例10: set_cache
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);
}
}
示例11: explode
<?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'))));
示例12: SQL_creator
//.........这里部分代码省略.........
$index = 0;
} else {
$prev = 0;
$index = 0;
}
while (isset($reorder_tree[$prev])) {
$current = $reorder_tree[$prev]['reference'];
$tree[] = $current;
$prev = $current;
if ($orderByTree) {
$orderBy .= ' WHEN ' . $current . ' THEN ' . $index;
}
$index++;
}
if ($orderByTree) {
$orderBy .= ' END';
}
} elseif (isset($where["direct"])) {
foreach ($result as $reference_row) {
$tree[] = $reference_row['reference'];
}
}
if ($ordering === \Routerunner\Routerunner::BY_INDEX_DESC || $ordering === \Routerunner\Routerunner::BY_TREE_DESC) {
$orderBy .= ' DESC';
}
if (!$where) {
$where = array();
}
$where['models.reference IN (' . implode(',', $tree) . ')'] = null;
$where['`' . $model_class . '`.`' . $primary_key . '` IS NOT NULL'] = null;
} elseif ($strict) {
$where['1 = 0'] = null;
}
if ($config_reference = \runner::config('reference')) {
$where['models.reference IN (' . $config_reference . ')'] = null;
}
} else {
// join models table and filter to reference
}
\runner::stack("parents", $parents);
\runner::stack("prevs", $prevs);
$SQL = '';
unset($where["direct"]);
$visible_references = array();
$params = array();
if (\runner::config("mode") != "backend" && \runner::config("mode") != "sitemap" && !\runner::now("skip_state_check") && !$skip_state) {
$_from = $from;
if (strpos($_from, "AS") !== false) {
$_from = substr($_from, 0, strpos($_from, "AS"));
}
$SQL = "SELECT models.reference FROM " . $_from;
if (strpos($_from, "models") !== false) {
$SQL .= " AS models";
}
$SQL .= PHP_EOL;
if ($leftJoin) {
foreach ($leftJoin as $join) {
$SQL .= 'LEFT JOIN ' . $join . PHP_EOL;
}
}
if (strpos($_from, "models") === false) {
$SQL .= "LEFT JOIN {PREFIX}models AS models ON models.table_from = '" . $_from . "' AND models.table_id = " . $_from . "." . $primary_key . PHP_EOL;
}
$_where = array();
if (isset($where) && is_array($where)) {
$_where = $where;
示例13:
<?php
$debug = 1;
\user::logout();
\runner::stack_js('setTimeout(function() { window.location.href = "' . \runner::config('BASE') . '"; }, 2000);');
?>
<body class="page-md page-header-top-fixed">
<div class="backend-wrapper">
<!-- BEGIN CONTAINER -->
<div class="page-container row container-fluid container-margin">
<h1>You've been successfully logged out!</h1>
</div>
</div>
</body>
示例14:
<?php
$size_l = \model::property("size_l");
if (!$size_l) {
$size_l = \runner::config("mode") == "backend" ? "Routerunner/placeholder/800x550" : false;
}
?>
<li class="gl-item gl-loading media-model" data-category="<?php
echo \model::property("category");
?>
">
<div class="rr-post-size_l rr-post-data_l" style="width: 100%;">
<img src="<?php
echo $size_l;
?>
" alt="<?php
echo \model::property("label");
?>
">
</div>
</li>
示例15: uniqid
$unique = uniqid();
$hash = str_replace('/', ',', base64_encode(\Routerunner\Crypt::crypter($unique)));
if (isset($address["id"])) {
$params_deliver = array(":cron" => $cron["cron_id"], ":address" => $address["id"], ":date" => time(), ":hash" => $unique);
$delivered = \db::insert($SQL_deliver, $params_deliver);
} else {
$delivered = 0;
}
/*
$address["open"] = "";
$address["click"] = \runner::config("BASE");
$address["unsubscribe"] = \runner::config("BASE") . "unsubscribe/";
*/
$address["open"] = "<img alt='" . \runner::config("SITE") . "' src='" . \runner::config("BASE") . "nl/open/" . dechex($delivered) . "/" . $hash . "/" . "' style='display: none; width: 0; height: 0;'/>";
$address["click"] = \runner::config("BASE") . "nl/click/" . dechex($delivered) . "/" . $hash . "/";
$address["unsubscribe"] = \runner::config("BASE") . "nl/unsubscribe/" . dechex($delivered) . "/" . $hash . "/";
$mail_content = urldecode($mail_raw);
$mail_content_text = $mail_text;
foreach ($address as $var => $value) {
$mail_content = str_replace('[' . $var . ']', $value, $mail_content);
$mail_content_text = str_replace('[' . $var . ']', $value, $mail_content_text);
}
// send mail
\Routerunner\Mail::sender($address["email"], $header, $mail_content, null, $mail_content_text);
$sent_email++;
$sent_addresses[] = $address["email"];
}
} elseif (!(isset($address["email"]) && preg_match("~^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}\$~i", trim($address["email"])))) {
$SQL_delete_address = 'UPDATE e_subscriber SET unsubscribe = 1 WHERE id = :id';
\db::query($SQL_delete_address, array(':id' => $address["id"]));
}