echo \model::property("to_send"); ?> </div> <div class="col-md-2"><?php echo \model::property("start"); ?> <br><?php echo \model::property("finish"); ?> </div> <div class="col-md-1"><?php echo \model::property("limit"); ?> </div> <div class="col-md-2"><?php echo \model::property("test_address"); ?> </div> <div class="col-md-1"><a href="admin/newsletter/campaign/?id=<?php echo \model::property("campaign_id"); ?> " class="btn btn-primary">Modify campaign</a></div> <div class="col-md-1"><a href="admin/newsletter/send/?id=<?php echo \model::property("id"); ?> &cid=<?php echo \model::property("campaign_id"); ?> " class="btn btn-success">Send campaign</a></div> </div>
<?php /** * Created by PhpStorm. * User: csibi * Date: 2013.11.15. * Time: 11:27 */ $accept = array(); if ($model = $runner->model) { $accept = model::property('accept'); } elseif (isset($runner->context['accept'])) { $accept = $runner->context['accept']; } if (!function_exists('reorder')) { function reorder($children) { $order = array(0); array_walk($children, function ($val) use(&$order) { $order[] = $val['reference']; }); return $order; } } $element = isset($accept['panel']['element']) ? $accept['panel']['element'] : 'ul'; $html = ''; $parsed = \Routerunner\Helper::parse_array($accept, $model, array("children")); if (isset($parsed['panel']['attr']) && is_array($parsed['panel']['attr'])) { foreach ($parsed['panel']['attr'] as $attr => $value) { $html .= ' ' . $attr . '="' . $value . '"'; }
<?php $debug = 1; ?> <li class="rr-menu-model<?php echo $runner->context["has_children_class"]; echo $runner->context["selected_class"]; ?> "> <a href="<?php echo model::url(); ?> "<?php echo $runner->context["has_children_class"] ? ' class="dropdown-toggle" data-toggle="dropdown"' : ''; ?> ><span class="rr-menu-label"><?php echo model::property("label"); ?> </span><?php echo $runner->context["has_children_class"] ? '<b class="caret"></b>' : ''; ?> </a> <ul class="dropdown-menu"> <?php \runner::route("submenu", array("menu" => \model::property("reference"))); ?> </ul> </li>
<?php $class = \runner::stack("testimonial_index") === 0 ? " active" : ""; \runner::stack("testimonial_index", \runner::stack("testimonial_index") + 1); ?> <div class="item testimonial-item<?php echo $class; ?> "> <p class="citation"><?php echo \model::property("brief"); ?> </p> <p class="author"><span class="name"><?php echo \model::property("label"); ?> </span> / <span class="position"><?php echo \model::property("position"); ?> </span> / <span class="company"><?php echo \model::property("company"); ?> </span></p> </div>
<a href="category/<?php echo \model::property("cat_url"); ?> " title="<?php echo \model::property("label"); ?> " class="list-group-item"><?php echo \model::property("label"); ?> </a>
</a> </h2> <p class="lead"> by <a href="?search=<?php echo urlencode(\model::property("author")); ?> " class="rr-post-author"><?php echo \model::property("author"); ?> </a> </p> <p><span class="glyphicon glyphicon-time"></span> Posted on <span class="rr-post-date"><?php echo \model::call("date_str"); ?> </span></p> <hr> <?php echo \model::call("image", "leadimage"); ?> <div class="rr-post-lead lead"> <?php echo \model::property("lead"); ?> </div> <a class="btn btn-primary" href="<?php echo \model::url(); ?> ">Read More <span class="glyphicon glyphicon-chevron-right"></span></a> <hr>
echo \model::property("description"); ?> </div> <ul class="price-descr"> <?php $list = explode("\n", \model::property("content")); array_walk($list, function ($item, $key) { echo "<li>" . $item . "</li>"; }); ?> </ul> <?php if (\model::property("link") && \model::property("button")) { ?> <footer class="price-footer"> <a href="<?php echo \model::property("link"); ?> " class="btn btn-default"><?php echo \model::property("button"); ?> </a> </footer> <?php } ?> </div> </div>
</div> <div class="col-md-1"><?php echo \model::property("active") == "1" ? "yes" : "no"; ?> </div> <div class="col-md-1"><?php echo \model::property("sent"); ?> </div> <div class="col-md-1"><?php echo \model::property("to_send"); ?> </div> <div class="col-md-1"><?php echo \model::property("opened"); ?> </div> <div class="col-md-1"><?php echo \model::property("clicked"); ?> </div> <div class="col-md-1"><a href="admin/newsletter/campaign/?id=<?php echo \model::property("id"); ?> " class="btn btn-primary">Modify</a></div> <div class="col-md-1"><a href="admin/newsletter/send/?id=<?php echo \model::property("id"); ?> " class="btn btn-success">Send</a></div> </div>
public static function call() { $return = false; $args = func_get_args(); $runner = \Routerunner\Routerunner::getParentInstance(false)->runner; if (!is_null($runner->model) && $runner->model == model::$object) { $fn = isset($args[0]) ? array_shift($args) : false; if ($fn && !(isset($runner->functions[$fn]) && !is_string($runner->functions[$fn]) && is_callable($runner->functions[$fn]))) { $fn = false; } $arg = isset($args[0]) ? array_shift($args) : false; if ($arg) { if (is_string($arg) && !is_null(model::property($arg)) && count($args) == 0) { $return = $runner->functions[$fn](model::$object, model::property($arg), $arg, $args); } else { $return = $runner->functions[$fn](model::$object, null, $arg, $args); } } else { $return = $runner->functions[$fn](model::$object, $args); } } return $return; }
?> "> </a> <?php } ?> <div class="media-body"> <h4 class="media-heading"><span class="rr-comment-subject"><?php echo \model::property("subject"); ?> </span> <small><?php echo \model::call("date_str"); ?> </small> </h4> <div class="rr-comment-comment"> <?php echo \model::property("comment"); ?> </div> <a href="#" class="reply-btn" data-reply-to="<?php echo \model::property("id"); ?> ">Reply</a> </div> <?php \runner::route("/desktop/body/content/post/comment", array("model_reference" => \model::property("model_reference"), "reply" => \model::property("id"))); ?> </div>
function rr_property_tag($model) { $delimiter = ";"; $tag_property = strtolower($model->tag); $tags = explode($delimiter, $tag_property); if ($tags && count($tags) == 1 && trim($tags[0]) === "") { $tags = array(); } $return = '<span class="a_tags">'; $tag_urls = ""; foreach ($tags as $tag) { $tag_urls .= "'" . trim($tag) . "',"; } $SQLtag = 'SELECT url, label FROM tag WHERE url IN (' . trim($tag_urls, ",") . ')'; $tag_from_db = array(); if ($result = \db::query($SQLtag)) { foreach ($result as $row) { $tag_from_db[$row["url"]] = $row["label"]; } } $SQLinsert = 'INSERT INTO tag (url, label) VALUES (:url, :label)'; $SQLupdate = 'UPDATE media SET tag = :tag WHERE id = :id'; if ($tags) { foreach ($tags as $tag) { $tag = trim($tag); if (isset($tag_from_db[$tag])) { $return .= '<a href="?tag=' . $tag . '" rel="tag">' . $tag_from_db[$tag] . '</a>, '; } elseif ($tag) { $url = \runner::toAscii(strtolower($tag)); if (\db::insert($SQLinsert, array(":url" => $url, ":label" => $tag))) { $tag_property = str_replace($tag, $url, $tag_property); \db::query($SQLupdate, array(":tag" => $tag_property, ":id" => \model::property("table_id"))); $return .= '<a href="?tag=' . $url . '" rel="tag">' . $tag . '</a>, '; } } } $return = trim($return, ", "); $return .= '</span>'; } if (\runner::config("mode") == "backend") { $return .= '<select name="tag" id="tag-' . $model->reference . '" class="frm input form-control" multiple="multiple" style="display: none;">' . PHP_EOL; $SQL = 'SELECT url, label FROM tag ORDER BY url'; if ($options = \db::query($SQL)) { foreach ($options as $option) { $selected = in_array($option["url"], $tags) ? ' selected="selected"' : ''; $return .= ' <option value="' . $option["url"] . '"' . $selected . '>' . $option["label"] . '</option>' . PHP_EOL; } } $return .= '</select>' . PHP_EOL; //$return .= '<link rel="stylesheet" type="text/css" href="' . \runner::config("BASE") . 'Routerunner/metronic/assets/global/plugins/select2/select2.css"/>' . PHP_EOL; } return $return; }
<?php /** * Created by PhpStorm. * User: csibi * Date: 2015.07.17. * Time: 8:49 */ $form = array('method' => 'post', 'xmethod' => 'post', 'name' => 'order', 'error_format' => '<p class="err">%s</p>' . PHP_EOL, 'from' => 'order'); $nonce = uniqid(rand(0, 1000000)); if (!isset($_POST["nonce"])) { $_SESSION["nonce"] = \Routerunner\Crypt::crypter($nonce); } $input = array('nonce' => array('type' => 'hidden', 'field' => 'nonce', 'input-id' => 'input_nonce', 'value' => $nonce), 'date' => array('type' => 'hidden', 'field' => 'date', 'input-id' => 'input_date', 'value' => time()), 'product' => array('type' => 'hidden', 'field' => 'product', 'input-id' => 'input_product', 'value' => \model::property("id")), 'item' => array('selector' => '#input_item', 'type' => 'text', 'field' => 'item', 'label' => 'item *', 'input-id' => 'input_item', 'class' => '', 'mandatory' => array('value' => true, 'msg' => 'Required field: item!'), 'value' => isset($_POST["item"]) ? $_POST["item"] : ""), 'submit' => array('type' => 'submit', 'field' => 'submit', 'input-id' => 'input_submit', 'value' => 'Submit')); $unset = array("nonce", "submit");
$runner->context["model"] = $model; } } elseif (isset($runner->context["reference"], $runner->context["model_class"])) { $router = false; $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; if ($model && $model->permission && !$model->activate_allowed()) { $allowed = false; } } $reference = model::property("model"); $data = ' data-reference="' . $reference . '"'; ?> <div class="portlet light"> <div class="portlet-title"> <div class="caption font-red col-md-3"> <i class="fa fa-eye-slash font-red"></i> <span class="caption-subject bold uppercase"> Visibility</span> </div> <?php if ($allowed) { $active = !is_null(model::state("active", $model)) ? model::state("active", $model) : true; $begin = model::state("begin", $model) ? filter_var(model::state("begin", $model), FILTER_VALIDATE_INT) : null; $end = model::state("end", $model) ? filter_var(model::state("end", $model), FILTER_VALIDATE_INT) : null; ?>
<?php echo model::property("reference"); ?> </td> <td> <?php echo model::property("date"); ?> </td> <td> <?php echo model::property("user"); ?> </td> <td> <?php echo model::property("model"); ?> </td> <td> <?php echo model::property("approved"); ?> </td> <td> <?php echo model::property("approver"); ?> </td> </tr>
<div class="col-md-2"><?php echo stripslashes(\model::property("clicked")); ?> </div> <div class="col-md-2"><?php echo \model::property("name"); ?> <br><strong><?php echo \model::property("email"); ?> </strong></div> <div class="col-md-2"><?php echo \model::property("category"); ?> </div> <div class="col-md-2"><?php echo strftime("%Y-%m-%d %H:%M:%S", \model::property("send_date")); ?> <br><strong><?php echo \model::property("unsubscribe_date") ? strftime("%Y-%m-%d %H:%M:%S", \model::property("unsubscribe_date")) : ""; ?> </strong></div> <div class="col-md-2"><?php echo \model::property("campaign_label"); ?> <br><?php echo \model::property("subject"); ?> </div> </div>
<?php /** * Created by PhpStorm. * User: csibi * Date: 2015.06.11. * Time: 17:03 */ $debug = 1; $selected_class = \bootstrap::get("submenu") == \model::property("id") ? ' selected' : ''; $has_children_class = ''; if (\Routerunner\Bootstrap::children(\model::property("reference"))) { $has_children_class = ' menu-item-has-children'; }
<div class="col-sm-6 col-lg-6 col-md-6"> <div class="thumbnail"> <?php echo \model::property("leadimage") != "image/" ? \model::call("image", "leadimage") : ""; ?> <div class="caption"> <h4 class="pull-right rr-product-price"><?php echo \model::property("price"); ?> Ft</h4> <h4><a href="<?php echo \model::url(); ?> " class="rr-product-label"><?php echo \model::property("label"); ?> </a> </h4> <div class="rr-product-lead"> <?php echo substr(strip_tags(html_entity_decode(\model::property("lead"))), 0, 200); ?> </div> </div> <?php \runner::route("review"); ?> </div> </div>
?> "></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"); ?> " class="btn btn-primary">Learn More</a> <?php } ?> </div> </div> </div>
<hr> <?php echo \model::call("image", "contentimage"); ?> <!-- Post Content --> <div class="rr-product-lead lead"> <?php echo html_entity_decode(\model::property("lead")); ?> </div> <div class="rr-product-content"> <?php echo html_entity_decode(\model::property("content")); ?> </div> <?php echo \Routerunner\Routerunner::form("order", $runner, false); ?> <hr> <?php \runner::route("comments"); ?> </div>
<?php $debug = 1; ?> <!-- Intro Content --> <div class="row"> <!-- Title --> <div class="col-md-6"> <?php echo \model::call("image", "contentimage"); ?> </div> <div class="col-md-6"> <!-- <h2 class="rr-content-label"><?php echo \model::property("label"); ?> </h2> --> <div class="rr-content-content"> <?php echo \model::property("content"); ?> </div> </div> </div> <!-- /.row -->
<?php /** * Created by PhpStorm. * User: csibi * Date: 2015.07.17. * Time: 8:49 */ $form = array('method' => 'post', 'xmethod' => 'post', 'name' => 'comment', 'error_format' => '<p class="err">%s</p>' . PHP_EOL, 'from' => 'comment'); $nonce = uniqid(rand(0, 1000000)); if (!isset($_POST["nonce"])) { $_SESSION["nonce"] = \Routerunner\Crypt::crypter($nonce); } $input = array('nonce' => array('type' => 'hidden', 'field' => 'nonce', 'input-id' => 'input_nonce', 'value' => $nonce), 'date' => array('type' => 'hidden', 'field' => 'date', 'input-id' => 'input_date', 'value' => time()), 'post' => array('type' => 'hidden', 'field' => 'post', 'input-id' => 'input_post', 'value' => \model::property("table_id")), 'reply' => array('type' => 'hidden', 'field' => 'reply', 'input-id' => 'input_reply', 'value' => 0), 'name' => array('selector' => '#input_name', 'type' => 'text', 'field' => 'name', 'label' => 'Name *', 'input-id' => 'input_name', 'class' => '', 'mandatory' => array('value' => true, 'msg' => 'Required field: name!'), 'value' => isset($_POST["name"]) ? $_POST["name"] : ""), 'email' => array('selector' => '#input_email', 'type' => 'text', 'field' => 'email', 'label' => 'Email *', 'input-id' => 'input_email', 'class' => '', 'mandatory' => array('value' => true, 'msg' => 'Required field: e-mail address!'), 'regexp' => array(array('value' => '^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}$', 'options' => 'i', 'msg' => 'Please give your proper e-mail address!')), 'value' => isset($_POST["email"]) ? $_POST["email"] : ""), 'avatar' => array('selector' => '#input_avatar', 'type' => 'text', 'field' => 'avatar', 'label' => 'Avatar', 'input-id' => 'input_avatar', 'class' => '', 'value' => isset($_POST["avatar"]) ? $_POST["avatar"] : ""), 'subject' => array('selector' => '#input_subject', 'type' => 'text', 'field' => 'subject', 'label' => 'Subject', 'input-id' => 'input_subject', 'class' => '', 'value' => isset($_POST["subject"]) ? $_POST["subject"] : ""), 'comment' => array('selector' => '#input_comment', 'type' => 'textarea', 'field' => 'comment', 'label' => 'Comment', 'input-id' => 'input_comment', 'class' => '', 'mandatory' => array('value' => true, 'msg' => 'Required field: comment!'), 'regexp' => array(array('value' => '^.{6,}$', 'options' => 'im', 'msg' => 'Please leave a longer comment!')), 'value' => isset($_POST["content"]) ? $_POST["content"] : ""), 'submit' => array('type' => 'submit', 'field' => 'submit', 'input-id' => 'input_submit', 'value' => 'Submit')); $unset = array("submit");