Пример #1
0
<?php

return function ($in, $debugopt = 1) {
    $cx = array('flags' => array('jstrue' => true, 'jsobj' => true, 'spvar' => true, 'prop' => true, 'method' => false, 'mustlok' => false, 'mustsec' => false, 'echo' => false, 'debug' => $debugopt), 'constants' => array(), 'helpers' => array(), 'blockhelpers' => array(), 'hbhelpers' => array(), 'partials' => array(), 'scopes' => array($in), 'sp_vars' => array('root' => $in));
    return '<div class="yui3-u-1-2 member-status">
 <ul class="h-list">
' . LCRun3::wi($cx, LCRun3::v($cx, $in, array('login_status')), $in, function ($cx, $in) {
        return '' . (LCRun3::ifvar($cx, LCRun3::v($cx, $in, array('is_login'))) ? '   <li><a href="' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('edit_account_link'))) . '">Hello ' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('username'))) . '</a></li>
   <li><a href="' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('logut_link'))) . '">Logout</a></li>
' : '') . '' . (!LCRun3::ifvar($cx, LCRun3::v($cx, $in, array('is_login'))) ? '   <li>New User? <a href="' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('register_link'))) . '">Register Now</a></li>
   <li><a href="' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('login_link'))) . '">Login</a></li>
' : '') . '';
    }) . '  <li><a>About Auction</a></li>
 </ul>
</div>
';
};
Пример #2
0
each partial....
' . LCRun3::sec($cx, LCRun3::v($cx, $in, array('winners')), $in, true, function ($cx, $in) {
        return '' . '  Hello ' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('name'))) . ', you have just won $' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('value'))) . '!
  This is next line.' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('empty_var'))) . '中文
  Test \\on \'spacing in mustache: Hello ' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('name'))) . ', you have just won $' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('value'))) . '!
' . '--
' . '  <div class="yui3-u-1-2 member-status">
   <ul class="h-list">
' . LCRun3::wi($cx, LCRun3::v($cx, $in, array('login_status')), $in, function ($cx, $in) {
            return '' . (LCRun3::ifvar($cx, LCRun3::v($cx, $in, array('is_login'))) ? '     <li><a href="' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('edit_account_link'))) . '">Hello ' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('username'))) . '</a></li>
     <li><a href="' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('logut_link'))) . '">Logout</a></li>
' : '') . '' . (!LCRun3::ifvar($cx, LCRun3::v($cx, $in, array('is_login'))) ? '     <li>New User? <a href="' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('register_link'))) . '">Register Now</a></li>
     <li><a href="' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('login_link'))) . '">Login</a></li>
' : '') . '';
        }) . '    <li><a>About Auction</a></li>
   </ul>
  </div>
' . '';
    }) . 'end each.

if + with + partial:
' . (LCRun3::ifvar($cx, LCRun3::v($cx, $in, array('test'))) ? 'w>' . LCRun3::wi($cx, LCRun3::v($cx, $in, array('people')), $in, function ($cx, $in) {
        return '
  p>' . 'Hello ' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('name'))) . ', you have just won $' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('value'))) . '!
This is next line.' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('empty_var'))) . '中文
Test \\on \'spacing in mustache: Hello ' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('name'))) . ', you have just won $' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('value'))) . '!
' . '<
<w';
    }) . '
' : '') . '';
};
Пример #3
0
        }, function ($cx, $in) {
            return '  BAD! ' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('badchild'))) . ' ' . LCRun3::encq($cx, LCRun3::v($cx, $cx['scopes'][count($cx['scopes']) - 1], array('gender'))) . ' - ' . LCRun3::raw($cx, LCRun3::v($cx, $cx['scopes'][count($cx['scopes']) - 1], array('gender'))) . ' Y ' . LCRun3::raw($cx, LCRun3::v($cx, $cx['scopes'][count($cx['scopes']) - 2], array('name'))) . ' = ' . LCRun3::raw($cx, LCRun3::v($cx, $cx['scopes'][count($cx['scopes']) - 2], array('end'))) . '
';
        }) . '' . LCRun3::wi($cx, LCRun3::v($cx, $in, array('good')), $in, function ($cx, $in) {
            return '    WITH: ' . LCRun3::encq($cx, LCRun3::v($cx, $cx['scopes'][count($cx['scopes']) - 1], array('gender'))) . ' , ' . LCRun3::encq($cx, LCRun3::v($cx, $cx['scopes'][count($cx['scopes']) - 2], array('name'))) . ' , ' . LCRun3::raw($cx, LCRun3::v($cx, $cx['scopes'][count($cx['scopes']) - 2], array('end'))) . '
';
        }) . '';
    }) . '----------SECTION .
' . LCRun3::sec($cx, $in, $in, false, function ($cx, $in) {
        return ' <li>' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('name'))) . ' is a ' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('gender'))) . ' (' . LCRun3::encq($cx, LCRun3::v($cx, $cx['scopes'][count($cx['scopes']) - 1], array('name'))) . ', ' . LCRun3::encq($cx, LCRun3::v($cx, $cx['scopes'][count($cx['scopes']) - 1], array('value'))) . ', ' . LCRun3::encq($cx, LCRun3::v($cx, $cx['scopes'][count($cx['scopes']) - 1], array('end'))) . ')</li>
' . LCRun3::ifv($cx, LCRun3::v($cx, $in, array('good')), $in, function ($cx, $in) {
            return '  GOOD! ' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('goodchild'))) . ' ' . LCRun3::encq($cx, LCRun3::v($cx, $cx['scopes'][count($cx['scopes']) - 1], array('gender'))) . ' - ' . LCRun3::raw($cx, LCRun3::v($cx, $cx['scopes'][count($cx['scopes']) - 1], array('gender'))) . ' X ' . LCRun3::encq($cx, LCRun3::v($cx, $cx['scopes'][count($cx['scopes']) - 2], array('name'))) . ' ~ ' . LCRun3::encq($cx, LCRun3::v($cx, $cx['scopes'][count($cx['scopes']) - 2], array('end'))) . '
';
        }, function ($cx, $in) {
            return '  BAD! ' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('badchild'))) . ' ' . LCRun3::encq($cx, LCRun3::v($cx, $cx['scopes'][count($cx['scopes']) - 1], array('gender'))) . ' - ' . LCRun3::raw($cx, LCRun3::v($cx, $cx['scopes'][count($cx['scopes']) - 1], array('gender'))) . ' Y ' . LCRun3::raw($cx, LCRun3::v($cx, $cx['scopes'][count($cx['scopes']) - 2], array('name'))) . ' = ' . LCRun3::raw($cx, LCRun3::v($cx, $cx['scopes'][count($cx['scopes']) - 2], array('end'))) . '
';
        }) . '' . LCRun3::wi($cx, LCRun3::v($cx, $in, array('good')), $in, function ($cx, $in) {
            return '    WITH: ' . LCRun3::encq($cx, LCRun3::v($cx, $cx['scopes'][count($cx['scopes']) - 1], array('gender'))) . ' , ' . LCRun3::encq($cx, LCRun3::v($cx, $cx['scopes'][count($cx['scopes']) - 2], array('name'))) . ' , ' . LCRun3::raw($cx, LCRun3::v($cx, $cx['scopes'][count($cx['scopes']) - 2], array('end'))) . '
';
        }) . '';
    }) . '</ul>
WITH TEST>
' . LCRun3::wi($cx, LCRun3::v($cx, $in, array('people')), $in, function ($cx, $in) {
        return ' single: ' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('name'))) . ', ' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('gender'))) . ' , p -> ' . LCRun3::encq($cx, LCRun3::v($cx, $cx['scopes'][count($cx['scopes']) - 1], array('name'))) . '
 ' . LCRun3::sec($cx, $in, $in, true, function ($cx, $in) {
            return 'loop: ' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('name'))) . ' - ' . LCRun3::encq($cx, LCRun3::v($cx, $cx['scopes'][count($cx['scopes']) - 1], array('name'))) . ' - ' . LCRun3::encq($cx, LCRun3::v($cx, $cx['scopes'][count($cx['scopes']) - 2], array('name'))) . '';
        }) . '
';
    }) . '' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('end'))) . '
';
};
                return '' . LCRun3::p($cx, 'flow_reply_form', array(array($in), array()), '			') . '';
            }) . '';
        }) . '</div>
';
    }), 'scopes' => array(), 'sp_vars' => array('root' => $in), 'lcrun' => 'LCRun3');
    return '' . LCRun3::wi($cx, isset($in['revision']) && is_array($in) ? $in['revision'] : null, $in, function ($cx, $in) {
        return '	<div id="flow-post-' . htmlentities((string) (isset($in['postId']) && is_array($in) ? $in['postId'] : null), ENT_QUOTES, 'UTF-8') . '"
	     class="flow-post' . (LCRun3::ifvar($cx, isset($in['isMaxThreadingDepth']) && is_array($in) ? $in['isMaxThreadingDepth'] : null) ? ' flow-post-max-depth' : '') . '"
	     data-flow-id="' . htmlentities((string) (isset($in['postId']) && is_array($in) ? $in['postId'] : null), ENT_QUOTES, 'UTF-8') . '"
	>
' . (LCRun3::ifvar($cx, isset($in['isModerated']) && is_array($in) ? $in['isModerated'] : null) ? '' . LCRun3::hbch($cx, 'ifCond', array(array(isset($cx['sp_vars']['root']['rootBlock']['submitted']['showPostId']) && is_array($cx['sp_vars']['root']['rootBlock']['submitted']) ? $cx['sp_vars']['root']['rootBlock']['submitted']['showPostId'] : null, '===', isset($in['postId']) && is_array($in) ? $in['postId'] : null), array()), $in, false, function ($cx, $in) {
            return '' . LCRun3::p($cx, 'flow_post_inner', array(array($in), array()), '				') . '';
        }, function ($cx, $in) {
            return '				<div class="flow-post-main flow-post-moderated">
					<span class="flow-moderated-post-content">
' . LCRun3::p($cx, 'flow_post_moderation_state', array(array($in), array()), '						') . '					</span>
				</div>
';
        }) . '' : '' . LCRun3::hbch($cx, 'ifCond', array(array(isset($cx['sp_vars']['root']['rootBlock']['submitted']['action']) && is_array($cx['sp_vars']['root']['rootBlock']['submitted']) ? $cx['sp_vars']['root']['rootBlock']['submitted']['action'] : null, '===', 'edit-post'), array()), $in, false, function ($cx, $in) {
            return '' . LCRun3::hbch($cx, 'ifCond', array(array(isset($cx['sp_vars']['root']['rootBlock']['submitted']['postId']) && is_array($cx['sp_vars']['root']['rootBlock']['submitted']) ? $cx['sp_vars']['root']['rootBlock']['submitted']['postId'] : null, '===', isset($in['postId']) && is_array($in) ? $in['postId'] : null), array()), $in, false, function ($cx, $in) {
                return '' . LCRun3::p($cx, 'flow_edit_post', array(array($in), array()), '					') . '';
            }, function ($cx, $in) {
                return '' . LCRun3::p($cx, 'flow_post_inner', array(array($in), array()), '					') . '';
            }) . '';
        }, function ($cx, $in) {
            return '' . LCRun3::p($cx, 'flow_post_inner', array(array($in), array()), '				') . '';
        }) . '') . '
' . LCRun3::p($cx, 'flow_post_replies', array(array($in), array()), '		') . '	</div>
';
    }) . '';
};
Пример #5
0
    }) . 'end each.

##2 start each+if:
' . LCRun3::sec($cx, LCRun3::v($cx, $in, array('winners')), $in, true, function ($cx, $in) {
        return '' . LCRun3::ifv($cx, LCRun3::v($cx, $in, array('test')), $in, function ($cx, $in) {
            return '' . '  Name:' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('name'))) . ', Value:' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('value'))) . ', This: ' . LCRun3::encq($cx, $in) . ', Test: ' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('test'))) . '
' . '';
        }) . '';
    }) . 'end each+if.

##3 start each+if+with:
' . LCRun3::sec($cx, LCRun3::v($cx, $in, array('winners')), $in, true, function ($cx, $in) {
        return '' . LCRun3::ifv($cx, LCRun3::v($cx, $in, array('test')), $in, function ($cx, $in) {
            return '' . LCRun3::wi($cx, LCRun3::v($cx, $in, array('people')), $in, function ($cx, $in) {
                return '' . '   Name:' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('name'))) . ', Value:' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('value'))) . ', This: ' . LCRun3::encq($cx, $in) . ', Test: ' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('test'))) . '
' . '';
            }) . '';
        }) . '';
    }) . 'end each+if+with.

##4 start each+with+if:
' . LCRun3::sec($cx, LCRun3::v($cx, $in, array('winners')), $in, true, function ($cx, $in) {
        return '' . LCRun3::wi($cx, LCRun3::v($cx, $in, array('people')), $in, function ($cx, $in) {
            return '' . LCRun3::ifv($cx, LCRun3::v($cx, $in, array('test')), $in, function ($cx, $in) {
                return '' . '   Name:' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('name'))) . ', Value:' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('value'))) . ', This: ' . LCRun3::encq($cx, $in) . ', Test: ' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('test'))) . '
' . '';
            }) . '';
        }) . '';
    }) . 'end each+with+if.
';
};
Пример #6
0
~IF~
   ' . (LCRun3::ifvar($cx, LCRun3::v($cx, $in, array('testval'))) ? 'YES' : '') . '
   ' . (!LCRun3::ifvar($cx, LCRun3::v($cx, $in, array('testval'))) ? 'NO' : '') . '
~SEC~
' . LCRun3::sec($cx, LCRun3::v($cx, $in, array('test2')), $in, false, function ($cx, $in) {
                return '    ' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('loopval'))) . '
';
            }) . '~EACH~
' . LCRun3::sec($cx, LCRun3::v($cx, $in, array('test3')), $in, true, function ($cx, $in) {
                return '    ' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('loopval'))) . '
';
            }) . '~END~
';
        }) . 'WITH~
';
    }) . '_WITH PATH_
' . LCRun3::wi($cx, LCRun3::v($cx, $in, array('login_status', 'test')), $in, function ($cx, $in) {
        return 'XTEST: ' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('testval'))) . ' - ' . LCRun3::raw($cx, LCRun3::v($cx, $in, array('textval'))) . '
IF: ' . (LCRun3::ifvar($cx, LCRun3::v($cx, $in, array('testval'))) ? 'YES~' : '') . '' . (!LCRun3::ifvar($cx, LCRun3::v($cx, $in, array('testval'))) ? 'NO!' : '') . '
SECTION::' . LCRun3::sec($cx, LCRun3::v($cx, $in, array('test2')), $in, false, function ($cx, $in) {
            return ' - loop: ' . LCRun3::encq($cx, LCRun3::v($cx, $in, array('loopval'))) . '';
        }) . '
EACH::' . LCRun3::sec($cx, LCRun3::v($cx, $in, array('test3')), $in, true, function ($cx, $in) {
            return '	lp:' . LCRun3::raw($cx, LCRun3::v($cx, $in, array('loopval'))) . '';
        }) . '
END!
';
    }) . ' </ul>
</div>
';
};