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


PHP func::php2js方法代码示例

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


在下文中一共展示了func::php2js方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: extract

extract($aData);
$prices_sett = unserialize($cat_prices_sett);
$userID = $this->security->getUserID();
$nPhotosLimit = $nPhotosLimitTotal = isset($config['images_limit']) ? $config['images_limit'] : $config['images_limit_reg'];
$nPhotosUploaded = $imgcnt;
if ($nPhotosUploaded > $nPhotosLimit) {
    $nPhotosLimit = 1;
    $nPhotosUploaded = 1;
}
?>

<script type="text/javascript">                   
//<![CDATA[    
    var bbsEdit;   
    var bbsEditRegions = <?php 
echo func::php2js($regions);
?>
;
    $(function(){
       bbsEdit = new bbsEditClass({txtMaxLength: <?php 
echo $config['adtxt_limit'];
?>
, id: <?php 
echo $id;
?>
,
        ssid:'<?php 
echo session_id();
?>
', ssname:'<?php 
echo session_name();
开发者ID:Sywooch,项目名称:dobox,代码行数:31,代码来源:item.edit.php

示例2:

    statusResult[<?php 
echo Bills::statusCompleted;
?>
] = '<span style="color:green;">завершен</span>'; 
    statusResult[<?php 
echo Bills::statusCanceled;
?>
]  = '<span style="color:#666;">отменен</span>';

    var $progress, $list, $listPgn, filters;
    var url = '<?php 
echo $this->adminCreateLink('listing');
?>
';
    var orders = <?php 
echo func::php2js($orders);
?>
;
    var orderby = '<?php 
echo $f['order_by'];
?>
';
    var status = <?php 
echo $f['status'];
?>
;
    var _processing = false; 
    
    $(function(){
        $progress = $('#j-bills-progress');
        $list     = $('#j-bills-list');
开发者ID:Sywooch,项目名称:dobox,代码行数:31,代码来源:admin.listing.php

示例3: join

<script type="text/javascript">                                       
var bffDynpropsChild;
$(function(){
    bffDynpropsChild = bffDynprops.init(true,
        {                                         
            edit: <?php 
echo $aData['edit'] ? 'true' : 'false';
?>
,
            data: <?php 
echo !empty($aData['data']) ? func::php2js($aData['data']) : 'null';
?>
, 
            types_allowed: [<?php 
echo join(',', $this->typesAllowed);
?>
]
        }, {}
    );
});

</script>

<div class="ipopup" style="width: 460px;">
    <div class="ipopup-wrapper">
        <div class="ipopup-title">Прикрепление свойства</div>
        <div class="ipopup-content">   

        <form method="post" id="bffDynpropsChildForm" action="">
            <input type="hidden" name="dynprop[multi_deleted]" value="" class="multi-deleted" />
开发者ID:Sywooch,项目名称:dobox,代码行数:30,代码来源:manage.child.php

示例4: setFormParam

</div>
</form>

<div class="padT24" id="searchQuickResults">
<?php 
if (!empty($items)) {
    echo $this->tplFetchPHP($aData, 'search.results.list.php');
}
?>
</div> 
    
<script type="text/javascript">
    var bbsSearchQuick = (function(){
    var $form = $('#searchQuickForm'), $list = $('#searchQuickResults'), $progress = $('>div>div>div.progress', $form),
        f = <?php 
echo func::php2js($f, true);
?>
, process = false;
        
    function setFormParam(name, val) {
        $('input[name="'+name+'"]', $form).val(val);
        return false;
    }
    
    function search()
    {
        bff.ajax('/search', $form.serialize(), function(data) {
            if(data && data.res) {
                $list.html(data.list);
            }
        }, $progress);        
开发者ID:Sywooch,项目名称:dobox,代码行数:31,代码来源:search.quick.php

示例5: getUID

 function getUID($json = true, $checkInput = false)
 {
     $key = 'bff_table';
     $uid_sess = $this->getSESSION($key);
     //берем из входящих данных если необходимо и не пусто
     if ($checkInput !== false) {
         $uid_input = CInputCleaner::i()->{$checkInput}('uid', TYPE_STR);
         if (!empty($uid_input)) {
             $uid = $uid_input;
             //если в сессии не пусто и переданное не соответствует тому что в сессии, берем из сессии
             if (!empty($uid_sess) && $uid_sess != $uid) {
                 $uid = $uid_sess;
             }
             return $json ? func::php2js(array('r' => $uid, 'ce' => false)) : $uid;
         }
     }
     $uid = 0;
     $uid_cookie = func::getCOOKIE($key);
     if (empty($uid_cookie)) {
         if (!empty($uid_sess)) {
             $uid = $uid_sess;
             // берем из сессии, если там есть
             $uid_cookie = 1;
             // помечаем что куки не пустые
         } else {
             // генерируем новый UID
             $uid = md5(uniqid(mt_rand(), true)) . '_' . substr(md5(!empty($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : mt_rand(1, 10000)), 0, 8);
             $this->setSESSION($key, $uid);
         }
         func::setCOOKIE($key, $uid, time() + 3600 * 24 * 730);
         // 2 года
     } else {
         // берем из куков
         $uid = $uid_cookie;
         // если в сессии пусто или в куках не то, что в сессии => перезаписываем в сессии, то что взяли из куков
         if (empty($uid_sess) || $uid != $uid_sess) {
             $this->setSESSION($key, $uid);
         }
     }
     return $json ? func::php2js(array('r' => $uid, 'ce' => empty($uid_cookie))) : $uid;
 }
开发者ID:Sywooch,项目名称:dobox,代码行数:41,代码来源:security.php

示例6: time

        
        <div class="warnblock hidden" id="i_publicate2" style=margin-bottom:10px;">
            <div class="warnblock-content">                                 
                <table class="admtbl tbledit">
                <tr class="row1">
                    <td width="115">Период публикации:</td>
                    <td>
                    <script type="text/javascript"> 
                    <?php 
$week = 60 * 60 * 24 * 7;
$from = time();
$periods = bff::getPublicatePeriods($from);
?>
                        
                    var bbsPublicate2Periods = <?php 
echo func::php2js($periods['data']);
?>
;
                    </script>
                    <select class="inputText2" tabindex="1" name="period" onchange="$('#publicated2-till').html( bbsPublicate2Periods[this.value] );">
                        <?php 
echo $periods['html'];
?>
 
                    </select>
                    </td>
                </tr>       
                <tr class="row1"><td>Срок публикации:</td><td><?php 
echo $status == BBS_STATUS_PUBLICATED_OUT ? 'с ' . date('d.m.Y') . ' по ' : ' до ';
?>
<span id="publicated2-till"><?php 
开发者ID:Sywooch,项目名称:dobox,代码行数:30,代码来源:admin.items.edit.php

示例7:

<script type="text/javascript">
$(function(){
//    $(".greyLine").corner("8px");
    $(".navigation").corner("8px");
    bbsSearch.init({f: <?php 
echo func::php2js($aData['f'], true);
?>
, pr:<?php 
echo func::php2js($aData['cat']['prices_sett']['ranges'], true);
?>
});
});
</script>
<?php 
extract($aData);
extract($f);
$curr = '$.';
$total = $ct ? $types[$ct]['items'] : $cat['items'];
?>

<form action="/search" method="get"  id="searchForm">



<!--<div class="padT24">-->

<div class="tabs" id="searchCatSubTypes">
    <a href="#" rel="0" <?php 
echo !$sct ? ' class="active"' : '';
?>
><span class="left">&nbsp;</span><span>Все</span><span class="right">&nbsp;</span></a>
开发者ID:Sywooch,项目名称:dobox,代码行数:31,代码来源:search.php

示例8: ajaxResponse

 /**
  * @param mixed response data
  * @param mixed response type; 0|false - raw echo, 1|true - json echo, 2 - json echo + errors
  * @desc ajax ответ: если data=0,1,2 - это не ключ ошибки, а просто краткий ответ
  */
 function ajaxResponse($mData, $mFormat = 2)
 {
     if ($mFormat === 2) {
         $aResponse = array('data' => $mData, 'errors' => array());
         if ($this->errors->no()) {
             if (is_int($mData) && $mData > 2) {
                 $this->errors->set($mData);
                 $aResponse['errors'] = $this->errors->get(true);
                 $aResponse['data'] = '';
             }
         } else {
             $aResponse['errors'] = $this->errors->get(true);
         }
         echo func::php2js($aResponse);
         exit;
     } elseif ($mFormat === TRUE || $mFormat === 1) {
         echo func::php2js($mData);
         exit;
     } else {
         echo $mData;
         exit;
     }
 }
开发者ID:Sywooch,项目名称:dobox,代码行数:28,代码来源:module.php

示例9: setFormParam

        {
            if(f.order==by) return false;
            $('a.orderby', $form).removeClass('green greyBord').addClass('greyBord').filter('[rel="'+by+'"]').removeClass('greyBord').addClass('green');
            setFormParam('order', by);
            updateList();
            return false;
        },
        cat: function(id, $link, onlyset)
        {
            id = intval(id);
            if(f.cat==id) return false;
            setFormParam('cat', id); 
            
            if(!onlyset) {
                updateList(); 
                ddHideOpened();
            }
            
            $link.parent().parent().find('a').removeClass('select');
            $link.addClass('select');
            $link.parents('div.dda').find('a:first > b').html( $link.html() );
        }
    };
}());
$(function(){
    myList.init({f: <?php 
echo func::php2js($aData['f'], true);
?>
});    
});
</script>
开发者ID:Sywooch,项目名称:dobox,代码行数:31,代码来源:items.list.my.php


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