예제 #1
0
파일: order.php 프로젝트: guohao214/xinya
echo defaultValue($params['order_no']);
?>
" type="text">
                    </td>
                    <th width="70">联系人:</th>
                    <td><input class="common-text" placeholder="联系人" size="15"
                               name="user_name" value="<?php 
echo defaultValue($params['user_name']);
?>
" type="text">
                    </td>

                    <th width="70">手机号:</th>
                    <td><input class="common-text" placeholder="手机号" size="15"
                               name="phone_number" value="<?php 
echo defaultValue($params['phone_number']);
?>
"
                               type="text">
                    </td>
                    <td><input class="btn btn-primary btn2" type="submit"></td>
                </tr>
            </table>
        </form>

    </div>
</div>
<div class="result-wrap">
    <div class="result-title">
        <div class="result-list"></div>
    </div>
예제 #2
0
파일: index.php 프로젝트: guohao214/xinya
?>
">首页</a><span
            class="crumb-step">&gt;</span><span class="crumb-name">优惠券管理</span></div>
</div>
<div class="search-wrap">
    <div class="search-content">
        <form action="<?php 
echo UrlUtil::createBackendUrl('coupon/index');
?>
?" method="get">
            <table class="search-tab">
                <tr>
                    <th width="100">优惠券名称:</th>
                    <td><input class="common-text" placeholder="优惠券名称" type="text"
                               name="coupon_name" value="<?php 
echo defaultValue($params['coupon_name']);
?>
"></td>

                    <td><input class="btn btn-primary btn2" type="submit"></td>
                </tr>
            </table>
        </form>
    </div>
</div>
<div class="result-wrap">
    <div class="result-title">
        <div class="result-list">
            <a href="<?php 
echo UrlUtil::createBackendUrl('coupon/addCoupon');
?>
예제 #3
0
파일: colander.php 프로젝트: netom/colander
function fDefaultValue($p)
{
    return function ($d) use($p) {
        return defaultValue($p, $d);
    };
}
예제 #4
0
파일: index.php 프로젝트: guohao214/xinya
?>
">首页</a><span
            class="crumb-step">&gt;</span><span class="crumb-name">美容师管理</span></div>
</div>
<div class="search-wrap">
    <div class="search-content">
        <form action="<?php 
echo UrlUtil::createBackendUrl('beautician/index');
?>
?" method="get">
            <table class="search-tab">
                <tr>
                    <th width="70">姓名:</th>
                    <td><input class="common-text" placeholder="姓名" type="text"
                               name="name" value="<?php 
echo defaultValue($params['name']);
?>
"></td>

                    <td><input class="btn btn-primary btn2" type="submit"></td>
                </tr>
            </table>
        </form>
    </div>
</div>
<div class="result-wrap">
    <div class="result-title">
        <div class="result-list">
            <a href="<?php 
echo UrlUtil::createBackendUrl('beautician/addBeautician');
?>
예제 #5
0
function udvDetail($udv, $typeString = '', $usage = '')
{
    $attributeName = '';
    $selectorType = '';
    $deets = '<h3>Details for User-defined variable <i>' . $udv['name'] . '</i></h3>';
    $deets = $deets . '<a href="https://tagmanager.google.com/#/container/accounts/' . $udv['accountId'] . '/containers/' . $udv['containerId'] . '/variables/' . $udv['variableId'] . '"';
    $deets = $deets . ' style="position:relative;float:right;top:-40px;right:10px;" class="udvEdit">edit</a>';
    $deets = $deets . '<table class="table table-bordered table-striped">';
    $deets = $deets . '<tr><th>Name</th><td>' . $udv['name'] . '</td></tr>';
    $deets = $deets . '<tr><th>What it\'s for</th><td>' . $typeString . '</td></tr>';
    $deets = $deets . '<tr><th>What it does</th>';
    $deets = $deets . '<td>' . $usage;
    if ($udv['type'] === 'd') {
        if (getParamTemplate($udv, 'attributeName') !== '') {
            $attributeName = array_key_exists('value', getParamTemplate($udv, 'attributeName')) ? getParamTemplate($udv, 'attributeName')['value'] : '';
        }
        if (getParamTemplate($udv, 'selectorType') !== '') {
            $selectorType = array_key_exists('value', getParamTemplate($udv, 'selectorType')) ? getParamTemplate($udv, 'selectorType')['value'] : '';
        }
        if ($selectorType !== '') {
            $selectorType = getParamTemplate($udv, 'selectorType')['value'];
            if ($selectorType === 'CSS') {
                $elementSelector = getParamTemplate($udv, 'elementSelector')['value'];
                $deets = $deets . '<br /><br />This variable will extract the "<b>' . variablise($attributeName, $udv) . '</b>" attribute from the first element on the page that matches the CSS selector "<b>' . variablise($elementSelector, $udv) . '</b>".<br /><br />';
                $deets = $deets . '<b>Warning</b>: This is not supported in IE7. IE8 and only supports CSS 2.1 selectors.<br />';
            }
            if ($selectorType === 'ID') {
                $elementId = getParamTemplate($udv, 'elementId')['value'];
                $deets = $deets . '<br /><br />This variable will extract the "<b>' . variablise($attributeName, $udv) . '</b>" attribute from the first element on the page with the ID "<b>' . variablise($elementId, $udv) . '</b>".<br /><br />';
                $deets = $deets . 'Of course, there should only be one element with this ID so if there are multiple elements with the same ID, have a word with your front-end development team.<br />';
            }
        }
    }
    if ($udv['type'] === 'aev') {
        $varType = getParamTemplate($udv, 'varType')['value'];
        $hostSource = 'Element URL';
        switch ($varType) {
            case 'ELEMENT':
                $deets = $deets . 'The variable returns the value of the "gtm.element" key on the data layer. If populated by an Auto-Event, the result will be the DOM element that triggered the event.<br /><br />In other words, the <i>thing</i> on the page that was clicked or the form that was submitted.<br /><br />';
                break;
            case 'ATTRIBUTE':
                $deets = $deets . 'The variable returns the value of the "' . getParamTemplate($udv, 'attribute')['value'] . '" attribute for the element that triggered the last click or form submit event.<br /><br /><br />';
                break;
            case 'CLASSES':
                $deets = $deets . 'The variable returns the value of the "gtm.elementClasses" key on the data layer. If populated by an Auto-Event, the result will be the "class" attribute of the DOM element that triggered the event (the <i>thing</i> that was clicked or the form that was submitted).<br /><br />';
                break;
            case 'ID':
                $deets = $deets . 'The variable returns the value of the "gtm.elementId" key on the data layer. If populated by an Auto-Event, the result will be the "id" attribute of the DOM element that triggered the event (the <i>thing</i> that was clicked or the form that was submitted).<br /><br />';
                break;
            case 'TARGET':
                $deets = $deets . 'The variable returns the value of the "gtm.elementTarget" key on the data layer. If populated by an Auto-Event, the result will be the "target" attribute of the DOM element that triggered the event (the <i>thing</i> that was clicked or the form that was submitted).<br /><br />';
                break;
            case 'TEXT':
                $deets = $deets . 'The variable returns the value of the "gtm.element" key on the data layer and its text content if there is any.<br />If populated by a click or link-click Auto-Event, the text content will be the "innerText" or the "textContent" attribute of the DOM element that triggered the event.<br /><b>Technical:</b> The text will be trimmed and normalised (white-spaces will be consolidated) to account for browsers variations.<br /><br />';
                break;
            case 'URL':
                $deets = $deets . 'The variable returns the value of the "gtm.elementUrl" key on the data layer.<br />If populated by an Auto-Event, the result will be the "href" or "action" attribute of the DOM element that triggered the event, depending on the type of element (the <i>thing</i> that was clicked or the form that was submitted).<br /><br />';
                $URLComponent = getParamTemplate($udv, 'component') !== '' ? getParamTemplate($udv, 'component')['value'] : '';
                if ($URLComponent !== '') {
                    switch ($URLComponent) {
                        case 'HOST':
                            $deets = $deets . 'The "hostname" part of the ' . $hostSource;
                            if (getParam($udv, 'stripWww') !== null && getParam($udv, 'stripWww') === 'true') {
                                $deets = $deets . ' - minus the www part - ';
                            }
                            $deets = $deets . ' will be returned.<br />';
                            break;
                        case 'PATH':
                            $deets = $deets . 'The path of the ' . $hostSource . ' will be returned.<br />';
                            if (strlen(getParamList($udv, 'defaultPages')) > 0) {
                                $deets = $deets . 'The list of default pages to ignore is:<ul>';
                                $defaultPages = getParamList($udv, 'defaultPages');
                                foreach ($defaultPages as $defPageIndex => $defPageVal) {
                                    $deets = $deets . '<li>' . $defaultPages[$defPageIndex]['value'] . '</li>';
                                }
                                $deets = $deets . '</ul><br />';
                                $deets = $deets . 'The last non-directory segment in the path will be stripped if it matches any of the default pages. For instance, if a default page is "index.html" and the URL is "http://a.com/x/index.html", the variable value will be "/x/".<br />';
                            }
                            break;
                        case 'QUERY':
                            $queryKey = '';
                            if (getParamTemplate($udv, 'queryKey') !== '') {
                                $queryKey = variablise(getParamTemplate($udv, 'queryKey')['value'], $udv);
                            }
                            $deets = $deets . 'The value of the querystring variable (the part after the ? on the ' . $hostSource . ') "' . $queryKey . '" will be returned.<br />';
                            break;
                        case 'FRAGMENT':
                            $deets = $deets . 'The fragment (the part after the # on the ' . $hostSource . ') will be returned.<br />';
                            break;
                        case 'PORT':
                            $deets = $deets . 'The port (80 or 443 for example) of the ' . $hostSource . ' will be returned.<br />';
                            break;
                        case 'PROTOCOL':
                            $deets = $deets . 'The protocol (http or https) of the ' . $hostSource . ' will be returned.<br />';
                            break;
                        case 'URL':
                            $deets = $deets . 'The full URL of the ' . $hostSource . ' will be returned.<br />';
                            break;
                    }
                }
                break;
            case 'HISTORY_NEW_URL_FRAGMENT':
                $deets = $deets . 'The value is determined by reading the "gtm.newUrlFragment" key from the data layer. If populated by an Auto-Event, the result will be the new URL fragment set on a history change event (Used by AJAX forms - <b>Technical</b>).<br />';
                break;
            case 'HISTORY_OLD_URL_FRAGMENT':
                $deets = $deets . 'The value is determined by reading the "gtm.oldUrlFragment" key from the data layer. If populated by an Auto-Event, the result will be the old URL fragment set on the previous history change event (Used by AJAX forms - <b>Technical</b>).<br />';
                break;
            case 'HISTORY_NEW_STATE':
                $deets = $deets . 'The value is determined by reading the "gtm.newHistoryState" key from the data layer. If populated by an Auto-Event, the result will be the new history state set on a history change event (Used by AJAX forms - <b>Technical</b>).<br />';
                break;
            case 'HISTORY_OLD_STATE':
                $deets = $deets . 'The value is determined by reading the "gtm.oldHistoryState" key from the data layer. If populated by an Auto-Event, the result will be the old history state set on the previous history change event (Used by AJAX forms - <b>Technical</b>).<br />';
                break;
            case 'HISTORY_CHANGE_SOURCE':
                $deets = $deets . 'The value is determined by reading the "gtm.historyChangeSource" key from the data layer. If populated by an Auto-Event, the result will be the source of the gtm.historyChange event, which can be: "popstate", "pushState", "replaceState" or "polling" (Used by AJAX forms - <b>Technical</b>).<br />';
                break;
        }
    }
    if ($udv['type'] === 'k') {
        if (getParam($udv, 'decodeCookie') === 'true') {
            $deets = $deets . "<br /><br />The value of the cookie will be URI-decoded. This is a nice thing to do to make your data human readable.<br />";
        } else {
            $deets = $deets . "<br /><br />The value of the cookie will not be URI-decoded.<br />";
            $deets = $deets . "If enabled, the value of the cookie 'xxx%3Dyyy' would become 'xxx=yyy'.<br />";
            $deets = $deets . "This might be a nice thing to do to make your data human readable.<br />";
        }
    }
    if ($udv['type'] === 'f') {
        if (array_key_exists('parameter', $udv)) {
            $component = getParam($udv, 'component');
            if ($component === 'QUERY' || $component === 'FRAGMENT') {
                $deets = $deets . 'It returns the ' . translateToHuman($component, $udv) . ' part of the referring page URL using the ';
                if ($component === 'QUERY') {
                    $deets = $deets . getParam($udv, 'queryKey') . ' querystring parameter.<br />';
                } else {
                    $deets = $deets . ' part of the URL after the "#" without the leading "#".<br />';
                }
            } else {
                $deets = $deets . 'It returns the ' . translateToHuman($component, $udv) . ' the user just came from.<br />';
            }
            if (getParam($udv, 'stripWww') === 'true') {
                $deets = $deets . 'The returned value will have the "www" part of the hostname stripped off.';
            }
        } else {
            $deets = $deets . 'It returns the full URL of the last page the user was on.<br /><br />';
            $deets = $deets . 'Why not just use the \'Referrer\' built in variable? It does the same thing.';
        }
    }
    if ($udv['type'] === 'u') {
        $hostSource = 'URL';
        $URLComponent = getParamTemplate($udv, 'component')['value'];
        $hostSource = getParamTemplate($udv, 'customUrlSource') !== '' ? translateToHuman(getParamTemplate($udv, 'customUrlSource')['value'], $udv) : $hostSource;
        switch ($URLComponent) {
            case 'HOST':
                $deets = $deets . 'The "hostname" part of the ' . $hostSource;
                if (getParam($udv, 'stripWww') !== null && getParam($udv, 'stripWww') === 'true') {
                    $deets = $deets . ' - minus the www part - ';
                }
                $deets = $deets . ' will be returned.<br />';
                break;
            case 'PATH':
                $deets = $deets . 'The path of the ' . $hostSource . ' will be returned.<br />';
                if (strlen(getParamList($udv, 'defaultPages')) > 0) {
                    $deets = $deets . 'The list of default pages to ignore is:<ul>';
                    $defaultPages = getParamList($udv, 'defaultPages');
                    foreach ($defaultPages as $defPageIndex => $defPageVal) {
                        $deets = $deets . '<li>' . $defaultPages[$defPageIndex]['value'] . '</li>';
                    }
                    $deets = $deets . '</ul><br />';
                }
                break;
            case 'QUERY':
                $queryKey = '';
                if (getParamTemplate($udv, 'queryKey') !== '') {
                    $queryKey = variablise(getParamTemplate($udv, 'queryKey')['value'], $udv);
                }
                $deets = $deets . 'The value of the querystring variable (the part after the ? on the ' . $hostSource . ') "' . $queryKey . '" will be returned.<br /><br />';
                break;
            case 'FRAGMENT':
                $deets = $deets . 'The fragment (the part after the # on the ' . $hostSource . ') will be returned.<br />';
                break;
            case 'PORT':
                $deets = $deets . 'The port (80 or 443 for example) of the ' . $hostSource . ' will be returned.<br />';
                break;
            case 'PROTOCOL':
                $deets = $deets . 'The protocol (http or https) of the ' . $hostSource . ' will be returned.<br />';
                break;
            case 'URL':
                $deets = $deets . 'The full URL of the ' . $hostSource . ' will be returned.<br />';
                break;
        }
    }
    if ($udv['type'] === 'smm') {
        $deets = $deets . 'The <i>input</i> variable for the lookup table is ' . variablise(getParamTemplate($udv, 'input')['value'] . '.<br /><br />', $udv);
        $deets = $deets . '<table class="table table-bordered table-striped"><tr><th>' . variablise(getParamTemplate($udv, 'input')['value'] . '', $udv) . '</th><th>Returned value</th></tr>';
        $lookup = getParamList($udv, 'map');
        foreach ($lookup as $lRow => $lRowVal) {
            $deets = $deets . '<tr><td>' . variablise($lookup[$lRow]['map'][0]['value'], $udv) . '</td>';
            $deets = $deets . '<td>' . variablise($lookup[$lRow]['map'][1]['value'], $udv) . '</td></tr>';
        }
        $deets = $deets . '</table>';
        if (getParamTemplate($udv, 'defaultValue') !== '' && getParamTemplate($udv, 'defaultValue') !== null) {
            $deets = $deets . 'The default value returned if no matches are found in the table is "' . variablise(getParamTemplate($udv, 'defaultValue')['value'], $udv) . '".<br />';
        }
    }
    if ($udv['type'] === 'jsm') {
        $varRefs = '';
        $rawJS = getParam($udv, 'javascript');
        $varRefs = getVarRefs($rawJS, $udv);
        findPushyVars($udv);
        if ($varRefs !== '') {
            $deets = $deets . 'Variables referenced in this variable:<br />' . $varRefs;
        }
        if ($rawJS !== '') {
            $deets = $deets . '<p style="margin:5px;"><textarea class="form-control" rows="10" cols="60" disabled="disabled">' . $rawJS . '</textarea></p><br />';
        }
    }
    if ($udv['type'] !== 'c' && $udv['type'] !== 'smm') {
        $deets = $deets . defaultValue($udv);
    }
    $deets = $deets . '<tr><th>Where it\'s used</th>';
    $deets = $deets . getUsage($udv);
    $deets = $deets . '<tr><th>Where it lives</th>';
    if (array_key_exists('parentFolderId', $udv)) {
        $deets = $deets . '<td>' . folderisation($udv['parentFolderId'], 'User Defined Variable') . '</td></tr>';
    } else {
        $deets = $deets . '<td>' . folderisation(null, 'User Defined Variable') . '</td></tr>';
    }
    $deets = $deets . '</table>';
    return $deets;
}
예제 #6
0
파일: index.php 프로젝트: guohao214/xinya
?>
">首页</a><span
            class="crumb-step">&gt;</span><span class="crumb-name">兑换商品管理</span></div>
</div>
<div class="search-wrap">
    <div class="search-content">
        <form action="<?php 
echo UrlUtil::createBackendUrl('exchangeGoods/index');
?>
?" method="get">
            <table class="search-tab">
                <tr>
                    <th width="100">兑换商品名称:</th>
                    <td><input class="common-text" placeholder="兑换商品名称" type="text"
                               name="exchange_goods_name" value="<?php 
echo defaultValue($params['exchange_goods_name']);
?>
"></td>

                    <td><input class="btn btn-primary btn2" type="submit"></td>
                </tr>
            </table>
        </form>
    </div>
</div>
<div class="result-wrap">
    <div class="result-title">
        <div class="result-list">
            <a href="<?php 
echo UrlUtil::createBackendUrl('exchangeGoods/addExchangeGoods');
?>
예제 #7
0
파일: index.php 프로젝트: guohao214/xinya
?>
">首页</a><span
            class="crumb-step">&gt;</span><span class="crumb-name">优惠码管理</span></div>
</div>
<div class="search-wrap">
    <div class="search-content">
        <form action="<?php 
echo UrlUtil::createBackendUrl('couponCode/index');
?>
?" method="get">
            <table class="search-tab">
                <tr>
                    <th width="100">优惠码:</th>
                    <td><input class="common-text" placeholder="优惠码" type="text"
                               name="coupon_code" value="<?php 
echo defaultValue($params['coupon_code']);
?>
"></td>

                    <td><input class="btn btn-primary btn2" type="submit"></td>
                </tr>
            </table>
        </form>
    </div>
</div>
<div class="result-wrap">
    <div class="result-title">
        <div class="result-list">
            <a href="<?php 
echo UrlUtil::createBackendUrl('couponCode/addCouponCode');
?>
예제 #8
0
파일: index.php 프로젝트: guohao214/xinya
?>
">首页</a><span
            class="crumb-step">&gt;</span><span class="crumb-name">项目管理</span></div>
</div>
<div class="search-wrap">
    <div class="search-content">
        <form action="<?php 
echo UrlUtil::createBackendUrl('shop/index');
?>
?" method="get">
            <table class="search-tab">
                <tr>
                    <th width="70">店铺名:</th>
                    <td><input class="common-text" placeholder="店铺名" type="text"
                               name="shop_name" value="<?php 
echo defaultValue($params['shop_name']);
?>
"></td>

                    <td><input class="btn btn-primary btn2" type="submit"></td>
                </tr>
            </table>
        </form>
    </div>
</div>
<div class="result-wrap">
    <div class="result-title">
        <div class="result-list">
            <a href="<?php 
echo UrlUtil::createBackendUrl('shop/addShop');
?>
예제 #9
0
파일: index.php 프로젝트: guohao214/xinya
echo UrlUtil::createBackendUrl('article/index');
?>
?" method="get">
            <table class="search-tab">
                <tr>
                    <th width="70">标题:</th>
                    <td><input class="common-text" placeholder="标题" type="text"
                               name="title" value="<?php 
echo defaultValue($params['title']);
?>
"></td>

                    <th width="70">别名:</th>
                    <td><input class="common-text" placeholder="别名" type="text"
                               name="alias_name" value="<?php 
echo defaultValue($params['alias_name']);
?>
"></td>

                    <td><input class="btn btn-primary btn2" type="submit"></td>
                </tr>
            </table>
        </form>
    </div>
</div>
<div class="result-wrap">
        <div class="result-title">
            <div class="result-list">
                <a href="<?php 
echo UrlUtil::createBackendUrl('article/addArticle');
?>
예제 #10
0
파일: index.php 프로젝트: guohao214/xinya
?>
">首页</a><span
            class="crumb-step">&gt;</span><span class="crumb-name">账户管理</span></div>
</div>
<div class="search-wrap">
    <div class="search-content">
        <form action="<?php 
echo UrlUtil::createBackendUrl('user/index');
?>
?" method="get">
            <table class="search-tab">
                <tr>
                    <th width="70">账户名:</th>
                    <td><input class="common-text" placeholder="账户名" type="text"
                               name="user_name" value="<?php 
echo defaultValue($params['user_name']);
?>
"></td>

                    <td><input class="btn btn-primary btn2" type="submit"></td>
                </tr>
            </table>
        </form>
    </div>
</div>
<div class="result-wrap">
        <div class="result-title">
            <div class="result-list">
                <a href="<?php 
echo UrlUtil::createBackendUrl('user/addUser');
?>
예제 #11
0
파일: index.php 프로젝트: guohao214/xinya
                                    <?php 
    echo $categoryId == $key ? ' selected' : '';
    ?>
><?php 
    echo $category;
    ?>
</option>
                            <?php 
}
?>
                        </select>
                    </td>
                    <th width="70">项目标题:</th>
                    <td><input class="common-text" placeholder="项目标题" type="text"
                               name="project_name" value="<?php 
echo defaultValue($params['project_name']);
?>
"></td>

                    <td><input class="btn btn-primary btn2" type="submit"></td>
                </tr>
            </table>
        </form>
    </div>
</div>
<div class="result-wrap">
        <div class="result-title">
            <div class="result-list">
                <a href="<?php 
echo UrlUtil::createBackendUrl('project/addProject');
?>