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


PHP sTranslateLangCode2CK函数代码示例

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


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

示例1: index

 function index()
 {
     Yii::app()->loadHelper('admin/htmleditor');
     $aData = array('ckLanguage' => sTranslateLangCode2CK(Yii::app()->session['adminlang']), 'sFieldName' => sanitize_xss_string(App()->request->getQuery('name')), 'sFieldText' => sanitize_xss_string(App()->request->getQuery('text')), 'sFieldType' => sanitize_xss_string(App()->request->getQuery('type')), 'sAction' => sanitize_paranoid_string(App()->request->getQuery('action')), 'iSurveyId' => sanitize_int(App()->request->getQuery('sid', 0)), 'iGroupId' => sanitize_int(App()->request->getQuery('gid', 0)), 'iQuestionId' => sanitize_int(App()->request->getQuery('qid', 0)));
     if (!$aData['sFieldName']) {
         $this->getController()->render('/admin/htmleditor/pop_nofields_view', $aData);
     } else {
         $aData['sControlIdEna'] = $aData['sFieldName'] . '_popupctrlena';
         $aData['sControlIdDis'] = $aData['sFieldName'] . '_popupctrldis';
         $aData['toolbarname'] = 'popup';
         $aData['htmlformatoption'] = '';
         if (in_array($aData['sFieldType'], array('email-inv', 'email-reg', 'email-conf', 'email-rem'))) {
             $aData['htmlformatoption'] = ',fullPage:true';
         }
         $this->getController()->render('/admin/htmleditor/pop_editor_view', $aData);
     }
 }
开发者ID:mfavetti,项目名称:LimeSurvey,代码行数:17,代码来源:htmleditor_pop.php

示例2: index

 function index()
 {
     Yii::app()->loadHelper('admin/htmleditor');
     $ckLanguage = sTranslateLangCode2CK(Yii::app()->session['adminlang']);
     $sFieldName = isset($_GET['name']) ? $_GET['name'] : 0;
     $sFieldText = isset($_GET['text']) ? $_GET['text'] : 0;
     $sFieldType = isset($_GET['type']) ? $_GET['type'] : 0;
     $sAction = isset($_GET['action']) ? $_GET['action'] : 0;
     $iSurveyId = isset($_GET['sid']) ? $_GET['sid'] : 0;
     $iGroupId = isset($_GET['gid']) ? $_GET['gid'] : 0;
     $iQuestionId = isset($_GET['qid']) ? $_GET['qid'] : 0;
     $sLanguage = isset($_GET['lang']) ? $_GET['lang'] : 0;
     $aData['clang'] = $this->getController()->lang;
     $aData['sFieldName'] = $sFieldName;
     if (get_magic_quotes_gpc()) {
         $aData['sFieldText'] = $sFieldText = stripslashes($sFieldText);
     } else {
         $aData['sFieldText'] = $sFieldText;
     }
     if (!$sFieldName || !$sFieldText) {
         $this->getController()->render('/admin/htmleditor/pop_nofields_view', $aData);
     } else {
         $aData['sFieldType'] = $sFieldType = preg_replace("/[^_.a-zA-Z0-9-]/", "", $sFieldType);
         $aData['sAction'] = preg_replace("/[^_.a-zA-Z0-9-]/", "", $sAction);
         $aData['iSurveyId'] = sanitize_int($iSurveyId);
         $aData['iGroupId'] = sanitize_int($iGroupId);
         $aData['iQuestionId'] = sanitize_int($iQuestionId);
         $aData['sControlIdEna'] = $sFieldName . '_popupctrlena';
         $aData['sControlIdDis'] = $sFieldName . '_popupctrldis';
         $aData['ckLanguage'] = $ckLanguage;
         $aData['toolbarname'] = 'popup';
         $aData['htmlformatoption'] = '';
         if (in_array($sFieldType, array('email-inv', 'email-reg', 'email-conf', 'email-rem'))) {
             $aData['htmlformatoption'] = ',fullPage:true';
         }
         $this->getController()->render('/admin/htmleditor/pop_editor_view', $aData);
     }
 }
开发者ID:jdbaltazar,项目名称:survey-office,代码行数:38,代码来源:htmleditor_pop.php

示例3: sTranslateLangCode2CK

<?php

/**
 * ressources panel tab
 */
?>

<!-- ressources panel -->
<div id='resources' class="tab-pane fade in">
    <?php 
echo CHtml::form(Yii::app()->getConfig('publicurl') . "third_party/kcfinder/browse.php?language=" . sTranslateLangCode2CK(App()->language), 'get', array('id' => 'browsesurveyresources', 'name' => 'browsesurveyresources', 'target' => '_blank', 'class' => 'form30'));
?>
        <ul class="list-unstyled">
            <li>
                <label>&nbsp;</label>
                <?php 
echo CHtml::dropDownList('type', 'files', array('files' => gT('Files', 'unescaped'), 'flash' => gT('Flash', 'unescaped'), 'images' => gT('Images', 'unescaped')));
?>
                <input type='submit' class="btn btn-default" value="<?php 
eT("Browse Uploaded Resources");
?>
" />
            </li>
            <li>
                <label>&nbsp;</label>
                <input type='button'<?php 
echo $disabledIfNoResources;
?>
                        class="btn btn-default"
                       onclick='window.open("<?php 
echo $this->createUrl("admin/export/sa/resources/export/survey/surveyid/{$surveyid}");
开发者ID:GuillaumeSmaha,项目名称:LimeSurvey,代码行数:31,代码来源:_resources_panel.php

示例4: getInlineEditor

function getInlineEditor($fieldtype, $fieldname, $fieldtext, $surveyID = null, $gID = null, $qID = null, $action = null)
{
    $htmlcode = '';
    $imgopts = '';
    $toolbarname = 'inline';
    $toolbaroption = "";
    $sFileBrowserAvailable = '';
    $htmlformatoption = "";
    $oCKeditorVarName = "oCKeditor_" . str_replace("-", "_", $fieldname);
    if (($fieldtype == 'editanswer' || $fieldtype == 'addanswer' || $fieldtype == 'editlabel' || $fieldtype == 'addlabel') && preg_match("/^translate/", $action) == 0) {
        $toolbaroption = ",toolbarStartupExpanded:true\n" . ",toolbar:'popup'\n" . ",toolbarCanCollapse:false\n";
    } else {
        $ckeditexpandtoolbar = Yii::app()->getConfig('ckeditexpandtoolbar');
        if (!isset($ckeditexpandtoolbar) || $ckeditexpandtoolbar == true) {
            $toolbaroption = ",toolbarStartupExpanded:true\n" . ",toolbar:'inline'\n";
        }
    }
    if ($fieldtype == 'email-inv' || $fieldtype == 'email-reg' || $fieldtype == 'email-conf' || $fieldtype == 'email-admin-notification' || $fieldtype == 'email-admin-resp' || $fieldtype == 'email-rem') {
        $htmlformatoption = ",fullPage:true\n";
    }
    if ($surveyID == '') {
        $sFakeBrowserURL = Yii::app()->getController()->createUrl('admin/survey/sa/fakebrowser');
        $sFileBrowserAvailable = ",filebrowserBrowseUrl:'{$sFakeBrowserURL}'\n            ,filebrowserImageBrowseUrl:'{$sFakeBrowserURL}'\n            ,filebrowserFlashBrowseUrl:'{$sFakeBrowserURL}'\n            ,filebrowserUploadUrl:'{$sFakeBrowserURL}'\n            ,filebrowserImageUploadUrl:'{$sFakeBrowserURL}'\n            ,filebrowserFlashUploadUrl:'{$sFakeBrowserURL}'";
    }
    $htmlcode .= "" . "<script type=\"text/javascript\">\n" . "\$(document).ready(\n        function(){ var {$oCKeditorVarName} = CKEDITOR.replace('{$fieldname}', {\n        customConfig : \"" . Yii::app()->getConfig('adminscripts') . "ckeditor-config.js\"\n        ,LimeReplacementFieldsType : \"" . $fieldtype . "\"\n        ,LimeReplacementFieldsSID : \"" . $surveyID . "\"\n        ,LimeReplacementFieldsGID : \"" . $gID . "\"\n        ,LimeReplacementFieldsQID : \"" . $qID . "\"\n        ,LimeReplacementFieldsType : \"" . $fieldtype . "\"\n        ,LimeReplacementFieldsAction : \"" . $action . "\"\n        ,LimeReplacementFieldsPath : \"" . Yii::app()->getController()->createUrl("admin/limereplacementfields/sa/index/") . "\"\n        ,language:'" . sTranslateLangCode2CK(Yii::app()->session['adminlang']) . "'" . $sFileBrowserAvailable . $htmlformatoption . $toolbaroption . "});\n\nCKEDITOR.editorConfig = function( config )\n{\n    config.uiColor = '#FFF';\n};\n\n        \$('#{$fieldname}').parents('ul:eq(0)').addClass('editor-parent');\n        });";
    $htmlcode .= '</script>';
    return $htmlcode;
}
开发者ID:mfavetti,项目名称:LimeSurvey,代码行数:28,代码来源:htmleditor_helper.php

示例5: eT

    eT("Save changes");
    ?>
'  id='saveallbtn_<?php 
    echo $lslanguage;
    ?>
' /></p>
            </div>
            <?php 
    $first = false;
}
?>
    </form>
    <div id='up_resmgmt'>
        <div>
            <?php 
echo CHtml::form('third_party/kcfinder/browse.php?language=' . sTranslateLangCode2CK(App()->language), 'get', array('id' => 'browselabelresources', 'class' => 'form30', 'name' => 'browselabelresources', 'target' => '_blank'));
?>
                <ul>
                    <li>
                        <label>&nbsp;</label>
                        <?php 
echo CHtml::dropDownList('type', 'files', array('files' => gT('Files'), 'flash' => gT('Flash'), 'images' => gT('Images')));
?>
                        <input type='submit' value="<?php 
eT("Browse uploaded resources");
?>
" />
                    </li>
                    <li>
                        <label>&nbsp;</label>
                        <input type='button'<?php 
开发者ID:wrenchpilot,项目名称:LimeSurvey,代码行数:31,代码来源:labelview_view.php

示例6: array

<!-- ressources panel -->
<div id='resources' class="tab-pane fade in">
    <ul class="list-unstyled">

        <!-- Browse -->
        <li>
            <label>&nbsp;</label>
            <?php 
echo CHtml::dropDownList('type', 'files', array('files' => gT('Files', 'unescaped'), 'flash' => gT('Flash', 'unescaped'), 'images' => gT('Images', 'unescaped')), array('class' => 'btn btn-default'));
?>
            <a class="btn btn-default" href="<?php 
echo Yii::app()->request->getBaseUrl();
?>
/third_party/kcfinder/browse.php?language='<?php 
echo sTranslateLangCode2CK(App()->language);
?>
'" target='_blank'>
                <?php 
eT("Browse uploaded resources");
?>
            </a>
        </li>

        <!-- Export -->
        <li>
            <br/>
            <label>&nbsp;</label>
            <a href="<?php 
echo $this->createUrl('admin/export/sa/resources/export/survey/surveyid/' . $surveyid);
?>
开发者ID:mfavetti,项目名称:LimeSurvey,代码行数:30,代码来源:_resources_panel.php

示例7: getInlineEditor

function getInlineEditor($fieldtype, $fieldname, $fieldtext, $surveyID = null, $gID = null, $qID = null, $action = null)
{
    global $clang, $imageurl, $homeurl, $rooturl, $sCKEditorURL, $ckeditexpandtoolbar, $uploadurl;
    $htmlcode = '';
    $imgopts = '';
    $toolbarname = 'inline';
    $toolbaroption = "";
    $htmlformatoption = "";
    $oCKeditorVarName = "oCKeditor_" . str_replace("-", "_", $fieldname);
    if (($fieldtype == 'editanswer' || $fieldtype == 'addanswer' || $fieldtype == 'editlabel' || $fieldtype == 'addlabel') && preg_match("/^translate/", $action) == 0) {
        $toolbaroption = ",toolbarStartupExpanded:true\n" . ",toolbar:'popup'\n" . ",toolbarCanCollapse:false\n";
    } else {
        if (!isset($ckeditexpandtoolbar) || $ckeditexpandtoolbar == true) {
            $toolbaroption = ",toolbarStartupExpanded:true\n" . ",toolbar:'inline'\n";
        }
    }
    if ($fieldtype == 'email-inv' || $fieldtype == 'email-reg' || $fieldtype == 'email-conf' || $fieldtype == 'email-admin-notification' || $fieldtype == 'email-admin-resp' || $fieldtype == 'email-rem') {
        $htmlformatoption = ",fullPage:true\n";
    }
    $htmlcode .= "" . "<script type=\"text/javascript\">\n" . "\$(document).ready(function(){ var {$oCKeditorVarName} = CKEDITOR.replace('{$fieldname}', {\n                                                                 customConfig : \"" . $sCKEditorURL . "/limesurvey-config.js\"\n                                                                ,LimeReplacementFieldsType : \"" . $fieldtype . "\"\n                                                                ,LimeReplacementFieldsSID : \"" . $surveyID . "\"\n                                                                ,LimeReplacementFieldsGID : \"" . $gID . "\"\n                                                                ,LimeReplacementFieldsQID : \"" . $qID . "\"\n                                                                ,LimeReplacementFieldsType : \"" . $fieldtype . "\"\n                                                                ,LimeReplacementFieldsAction : \"" . $action . "\"\n                                                                ,width:'660'\n                                                                ,language:'" . sTranslateLangCode2CK($_SESSION['adminlang']) . "'\n                                                                ,smiley_path : \"" . $uploadurl . "/images/smiley/msn/\"\n" . $htmlformatoption . $toolbaroption . "});});";
    $htmlcode .= '</script>';
    return $htmlcode;
}
开发者ID:himanshu12k,项目名称:ce-www,代码行数:23,代码来源:htmleditor-functions.php

示例8: getSurveyInfo

<?php

$surveyinfo = getSurveyInfo($surveyid);
App()->getClientScript()->registerScriptFile(Yii::app()->getConfig('adminscripts') . 'emailtemplates.js');
?>
<script type='text/javascript'>
    var sReplaceTextConfirmation='<?php 
$clang->eT("This will replace the existing text. Continue?", "js");
?>
';
    var sKCFinderLanguage='<?php 
echo sTranslateLangCode2CK($clang->getlangcode());
?>
';
    

$(document).ready(function () {
    $('button.add-attachment').click(function(e)
    {
        e.preventDefault();
        var target = $(this).parent().find('table');
        openKCFinder_singleFile(target); 
        
    });
    
    
    
});


开发者ID:josetorerobueno,项目名称:test_repo,代码行数:28,代码来源:emailtemplates_view.php

示例9: getSurveyInfo

<?php
    $surveyinfo = getSurveyInfo($surveyid);
    App()->getClientScript()->registerScriptFile(Yii::app()->getConfig('adminscripts') . 'emailtemplates.js');
    $count=0;
?>
<script type='text/javascript'>
    var sReplaceTextConfirmation='<?php eT("This will replace the existing text. Continue?","js"); ?>';
    var sKCFinderLanguage='<?php echo sTranslateLangCode2CK(App()->language); ?>';


$(document).ready(function () {
    $('button.add-attachment').click(function(e)
    {
        e.preventDefault();
        var target = $(this).parent().find('table');
        openKCFinder_singleFile(target);

    });



});




</script>

<div class="side-body">
	<h3><?php eT("Edit email templates"); ?></h3>
开发者ID:jgianpiere,项目名称:lime-survey,代码行数:30,代码来源:emailtemplates_view.php


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