当前位置: 首页>>代码示例>>PHP>>正文


PHP runner类代码示例

本文整理汇总了PHP中runner的典型用法代码示例。如果您正苦于以下问题:PHP runner类的具体用法?PHP runner怎么用?PHP runner使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了runner类的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);
}
开发者ID:RetroscopeCreative,项目名称:RouterunnerCMS,代码行数:14,代码来源:memberform.function.php

示例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;
}
开发者ID:RetroscopeCreative,项目名称:RouterunnerCMS,代码行数:29,代码来源:login.function.php

示例3: 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'))));
开发者ID:RetroscopeCreative,项目名称:RouterunnerDemo,代码行数:10,代码来源:content.backend.model.php

示例4: array

 * 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;
开发者ID:RetroscopeCreative,项目名称:RouterunnerCMS,代码行数:31,代码来源:send.model.params.php

示例5: array

<?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'))));
开发者ID:RetroscopeCreative,项目名称:RouterunnerDemo,代码行数:10,代码来源:message.backend.model.php

示例6: 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);
});
开发者ID:RetroscopeCreative,项目名称:RouterunnerCMS,代码行数:31,代码来源:load_script.php

示例7: isset

<?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);
});
开发者ID:RetroscopeCreative,项目名称:RouterunnerCMS,代码行数:16,代码来源:get_draft.php

示例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");
开发者ID:RetroscopeCreative,项目名称:RouterunnerDemo,代码行数:31,代码来源:feature.list.php

示例9:

<?php

/**
 * Created by PhpStorm.
 * User: csibi
 * Date: 2015.04.01.
 * Time: 15:38
 */
\runner::now("main_class", "tt-slider-");
开发者ID:RetroscopeCreative,项目名称:RouterunnerDemo,代码行数:9,代码来源:body.event.before.php

示例10:

<?php

/**
 * Created by PhpStorm.
 * User: csibi
 * Date: 2014.10.23.
 * Time: 16:23
 */
\runner::stack("session_id", false, true);
开发者ID:RetroscopeCreative,项目名称:RouterunnerCMS,代码行数:9,代码来源:editor.event.construct.php

示例11: elseif

                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>';
开发者ID:RetroscopeCreative,项目名称:RouterunnerCMS,代码行数:31,代码来源:movement.view.php

示例12: elseif

        $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;
?>
开发者ID:RetroscopeCreative,项目名称:RouterunnerCMS,代码行数:31,代码来源:remove.list.before.php

示例13: array

	<?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;
?>
>

开发者ID:RetroscopeCreative,项目名称:RouterunnerCMS,代码行数:29,代码来源:container.view.php

示例14: explode

<?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'))));
开发者ID:RetroscopeCreative,项目名称:RouterunnerDemo,代码行数:14,代码来源:pricing.backend.model.php

示例15: uniqid

 */
$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>';
}
开发者ID:RetroscopeCreative,项目名称:RouterunnerCMS,代码行数:31,代码来源:login.forgotten.submit.php


注:本文中的runner类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。