本文整理汇总了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);
}
}
示例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);
}
}
示例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> </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> </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}");
示例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;
}
示例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> </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> </label>
<input type='button'<?php
示例6: array
<!-- ressources panel -->
<div id='resources' class="tab-pane fade in">
<ul class="list-unstyled">
<!-- Browse -->
<li>
<label> </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> </label>
<a href="<?php
echo $this->createUrl('admin/export/sa/resources/export/survey/surveyid/' . $surveyid);
?>
示例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;
}
示例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);
});
});
示例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>