本文整理汇总了PHP中getLanguageDataRestricted函数的典型用法代码示例。如果您正苦于以下问题:PHP getLanguageDataRestricted函数的具体用法?PHP getLanguageDataRestricted怎么用?PHP getLanguageDataRestricted使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getLanguageDataRestricted函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: list_questions
/**
* RPC Routine to return the ids and info of (sub-)questions of a survey/group.
* Returns array of ids and info.
*
* @access public
* @param string $sSessionKey Auth credentials
* @param int $iSurveyID Id of the survey to list questions
* @param int $iGroupID Optional id of the group to list questions
* @param string $sLanguage Optional parameter language for multilingual questions
* @return array The list of questions
*/
public function list_questions($sSessionKey, $iSurveyID, $iGroupID = NULL, $sLanguage = NULL)
{
if ($this->_checkSessionKey($sSessionKey)) {
Yii::app()->loadHelper("surveytranslator");
$oSurvey = Survey::model()->findByPk($iSurveyID);
if (!isset($oSurvey)) {
return array('status' => 'Error: Invalid survey ID');
}
if (Permission::model()->hasSurveyPermission($iSurveyID, 'survey', 'read')) {
if (is_null($sLanguage)) {
$sLanguage = $oSurvey->language;
}
if (!array_key_exists($sLanguage, getLanguageDataRestricted())) {
return array('status' => 'Error: Invalid language');
}
if ($iGroupID != NULL) {
$oGroup = QuestionGroup::model()->findByAttributes(array('gid' => $iGroupID));
$sGroupSurveyID = $oGroup['sid'];
if ($sGroupSurveyID != $iSurveyID) {
return array('status' => 'Error: IMissmatch in surveyid and groupid');
} else {
$aQuestionList = Question::model()->findAllByAttributes(array("sid" => $iSurveyID, "gid" => $iGroupID, "language" => $sLanguage));
}
} else {
$aQuestionList = Question::model()->findAllByAttributes(array("sid" => $iSurveyID, "language" => $sLanguage));
}
if (count($aQuestionList) == 0) {
return array('status' => 'No questions found');
}
foreach ($aQuestionList as $oQuestion) {
$aData[] = array('id' => $oQuestion->primaryKey) + $oQuestion->attributes;
}
return $aData;
} else {
return array('status' => 'No permission');
}
} else {
return array('status' => 'Invalid session key');
}
}
开发者ID:kasutori,项目名称:LimeSurvey,代码行数:51,代码来源:remotecontrol_handle.php
示例2: foreach
$clang->eT("Password");
?>
</label>
<input name='password' id='password' type='password' size='40' maxlength='40' /></li>
<li><label for='loginlang'><?php
$clang->eT("Language");
?>
</label>
<select id='loginlang' name='loginlang'>
<option value="default" selected="selected"><?php
$clang->eT('Default');
?>
</option>
<?php
$x = 0;
foreach (getLanguageDataRestricted(true) as $sLangKey => $aLanguage) {
//The following conditional statements select the browser language in the language drop down box and echoes the other options.
?>
<option value='<?php
echo $sLangKey;
?>
'><?php
echo $aLanguage['nativedescription'] . " - " . $aLanguage['description'];
?>
</option>
<?php
}
?>
</select>
</li>
</ul>
开发者ID:pmaonline,项目名称:limesurvey-quickstart,代码行数:31,代码来源:login.php
示例3: foreach
echo $mrw['page_title'];
?>
" />
</td>
</tr>
<tr>
<td align="right" style="text-align: right;">
<label for='page_language'><?php
$clang->eT("Page Language* : ");
?>
</label>
</td>
<td>
<select style='min-width:220px;' id='page_language' name='page_language' onchange="chngcontent(this.value)">
<?php
foreach (getLanguageDataRestricted(false, Yii::app()->session['adminlang']) as $langkey => $langname) {
$chk = '';
if ($langkey == $mrw['language_code']) {
$chk = 'selected=selected';
}
?>
<option id='<?php
echo $langkey;
?>
' <?php
echo $chk;
?>
value='<?php
echo $langkey;
?>
'>
开发者ID:jdbaltazar,项目名称:survey-office,代码行数:31,代码来源:view_editcms.php
示例4: makeLanguageChanger
/**
* This function creates the language selector for the public survey index page
*
* @param mixed $sSelectedLanguage The language in which all information is shown
*/
function makeLanguageChanger($sSelectedLanguage)
{
$aLanguages = getLanguageDataRestricted(true, $sSelectedLanguage);
// Order by native
if (count($aLanguages) > 1) {
# $sHTMLCode = "<select id='languagechanger' name='languagechanger' class='languagechanger' onchange='javascript:window.location=this.value'>\n";
# foreach(getLanguageDataRestricted(true, $sSelectedLanguage) as $sLanguageID=>$aLanguageProperties)
# {
# $sLanguageUrl=Yii::app()->getController()->createUrl('survey/index',array('lang'=>$sLanguageID));
# $sHTMLCode .= "<option value='{$sLanguageUrl}'";
# if($sLanguageID == $sSelectedLanguage)
# {
# $sHTMLCode .= " selected='selected' ";
# $sHTMLCode .= ">{$aLanguageProperties['nativedescription']}</option>\n";
# }
# else
# {
# $sHTMLCode .= ">".$aLanguageProperties['nativedescription'].' - '.$aLanguageProperties['description']."</option>\n";
# }
# }
# $sHTMLCode .= "</select>\n";
$clang = Yii::app()->lang;
$sClass = "languagechanger";
foreach ($aLanguages as $sLangCode => $aLanguage) {
$aListLang[$sLangCode] = html_entity_decode($aLanguage['nativedescription'], ENT_COMPAT, 'UTF-8') . ' - ' . $aLanguage['description'];
}
$sSelected = $sSelectedLanguage;
$sHTMLCode = CHtml::beginForm(App()->createUrl('surveys/publiclist'), 'get');
$sHTMLCode .= CHtml::label($clang->gT("Choose another language"), 'lang', array('class' => 'hide label'));
$sHTMLCode .= CHtml::dropDownList('lang', $sSelected, $aListLang, array('class' => $sClass));
//$sHTMLCode.= CHtml::htmlButton($clang->gT("Change the language"),array('type'=>'submit','id'=>"changelangbtn",'value'=>'changelang','name'=>'changelang','class'=>'jshide'));
$sHTMLCode .= "<button class='changelang jshide' value='changelang' id='changelangbtn' type='submit'>" . $clang->gT("Change the language") . "</button>";
$sHTMLCode .= CHtml::endForm();
return $sHTMLCode;
} else {
return false;
}
}
开发者ID:elcharlygraf,项目名称:Encuesta-YiiFramework,代码行数:43,代码来源:frontend_helper.php
示例5: array
?>
</div>
<?php
echo CHtml::form(array("admin/get/sa/ins_body"), 'post', array('id' => 'addemailbody'));
?>
<table style="width: 80%; margin: 0px auto;">
<tr>
<td align="right" style="text-align: right;">
<label for='body_language'><?php
$clang->eT("Select Language : ");
?>
</label>
</td>
<td>
<?php
$test = getLanguageDataRestricted(false, Yii::app()->session['adminlang']);
$language = array();
foreach ($test as $ky => $val) {
$language[$ky] = $val['description'];
}
echo CHtml::dropDownList('body_language', 'en', $language);
?>
</td>
</tr>
<tr>
<td align="right" style="text-align: right;">
<label for='template_usein'><?php
$clang->eT("Select Template Usein : ");
?>
</label>
</td>
开发者ID:jdbaltazar,项目名称:survey-office,代码行数:31,代码来源:view_addbody.php
示例6: getLanguageNameFromCode
<div class="col-sm-9" style="padding-top: 7px;">
<?php
echo getLanguageNameFromCode($esrow['language'], false);
?>
</div>
</div>
<!-- Additional Languages -->
<div class="form-group">
<label class="col-sm-3 control-label" for='additional_languages'><?php
eT("Additional Languages");
?>
:</label>
<div class="col-sm-9">
<?php
$aAllLanguages = getLanguageDataRestricted(false, 'short');
unset($aAllLanguages[$esrow['language']]);
Yii::app()->getController()->widget('yiiwheels.widgets.select2.WhSelect2', array('asDropDownList' => true, 'htmlOptions' => array('multiple' => 'multiple', 'style' => "width: 100%"), 'data' => $aAllLanguages, 'value' => Survey::model()->findByPk($surveyid)->additionalLanguages, 'name' => 'additional_languages', 'pluginOptions' => array('placeholder' => gt('Select additional languages', 'unescaped'))));
?>
<input type='hidden' name='oldlanguages' id='oldlanguages' value='<?php
echo implode(' ', Survey::model()->findByPk($surveyid)->additionalLanguages);
?>
'>
</div>
</div>
<!-- Survey owner -->
<?php
if (Yii::app()->session['loginID'] == $esrow['owner_id'] || Permission::model()->hasGlobalPermission('superadmin', 'read')) {
?>
<div class="form-group">
开发者ID:sickpig,项目名称:LimeSurvey,代码行数:31,代码来源:_generaloptions_panel.php
示例7: makeLanguageChanger
/**
* This function creates the language selector for the public survey index page
*
* @param mixed $sSelectedLanguage The language in which all information is shown
*/
function makeLanguageChanger($sSelectedLanguage)
{
if (count(getLanguageDataRestricted()) > 1) {
$sHTMLCode = "<select id='languagechanger' name='languagechanger' class='languagechanger' onchange='javascript:window.location=this.value'>\n";
foreach (getLanguageDataRestricted(true, $sSelectedLanguage) as $sLanguageID => $aLanguageProperties) {
$sLanguageUrl = Yii::app()->getController()->createUrl('survey/index', array('lang' => $sLanguageID));
$sHTMLCode .= "<option value='{$sLanguageUrl}'";
if ($sLanguageID == $sSelectedLanguage) {
$sHTMLCode .= " selected='selected' ";
$sHTMLCode .= ">{$aLanguageProperties['nativedescription']}</option>\n";
} else {
$sHTMLCode .= ">" . $aLanguageProperties['nativedescription'] . ' - ' . $aLanguageProperties['description'] . "</option>\n";
}
}
$sHTMLCode .= "</select>\n";
return $sHTMLCode;
} else {
return false;
}
}
开发者ID:pmaonline,项目名称:limesurvey-quickstart,代码行数:25,代码来源:frontend_helper.php
示例8: array
$sForceSslHelp = null;
}
$this->widget('ext.SettingsWidget.SettingsWidget', array('id' => 'security', 'form' => false, 'formHtmlOptions' => array('class' => 'form-core'), 'settings' => array('surveyPreview_require_Auth' => array('type' => 'select', 'label' => gt("Survey preview only for administration users"), 'options' => array('1' => gT("Yes", 'unescaped'), '0' => gT("No", 'unescaped')), 'current' => getGlobalSetting('surveyPreview_require_Auth')), 'filterxsshtml' => array('type' => 'select', 'label' => gt("Filter HTML for XSS") . $sStringDemoMode, 'labelOptions' => array('class' => $sClassDemoMode), 'options' => array('1' => gT("Yes", 'unescaped'), '0' => gT("No", 'unescaped')), 'current' => getGlobalSetting('filterxsshtml'), 'htmlOptions' => array('readonly' => $bDemoMode), 'help' => gT("XSS filtering is always disabled for the superadministrator.")), 'usercontrolSameGroupPolicy' => array('type' => 'select', 'label' => gt("Group member can only see own group"), 'options' => array('1' => gT("Yes", 'unescaped'), '0' => gT("No", 'unescaped')), 'current' => getGlobalSetting('usercontrolSameGroupPolicy')), 'force_ssl' => array('type' => 'select', 'label' => gt("Force HTTPS"), 'options' => array('neither' => gT("Don't force on or off", 'unescaped'), 'on' => gT("On", 'unescaped'), 'off' => gT('Off', 'unescaped')), 'current' => getGlobalSetting('force_ssl'), 'help' => $sForceSslHelp))));
?>
<?php
// Survey presentation settings in one part
$this->widget('ext.SettingsWidget.SettingsWidget', array('id' => 'presentation', 'form' => false, 'formHtmlOptions' => array('class' => 'form-core'), 'settings' => array('shownoanswer' => array('type' => 'select', 'label' => gT("Show 'no answer' option for non-mandatory questions"), 'options' => array("1" => gT('Yes', 'unescaped'), "0" => gT('No', 'unescaped'), "2" => gT('Survey admin can choose', 'unescaped')), 'current' => getGlobalSetting('shownoanswer')), 'repeatheadings' => array('type' => 'int', 'label' => gT("Repeating headings in array questions every X subquestions"), 'current' => getGlobalSetting('repeatheadings'), 'htmlOptions' => array('style' => 'width:5em', 'min' => 0)), 'showxquestions' => array('type' => 'select', 'label' => gT('Show "There are X questions in this survey"'), 'options' => array('choose' => gT('Survey admin can choose', 'unescaped'), 'show' => gT('Yes', 'unescaped'), 'hide' => gT('No', 'unescaped')), 'current' => getGlobalSetting('showxquestions')), 'showgroupinfo' => array('type' => 'select', 'label' => gT('Show question group name and/or description'), 'options' => array('choose' => gT('Survey admin can choose', 'unescaped'), 'both' => gT('Show both', 'unescaped'), 'name' => gT('Show group name only', 'unescaped'), 'description' => gT('Show group description only', 'unescaped'), 'none' => gT('Hide both', 'unescaped')), 'current' => getGlobalSetting('showgroupinfo')), 'showqnumcode' => array('type' => 'select', 'label' => gT('Show question number and/or question code'), 'options' => array('choose' => gT('Survey admin can choose', 'unescaped'), 'both' => gT('Show both', 'unescaped'), 'number' => gT('Show question number only', 'unescaped'), 'code' => gT('Show question code only', 'unescaped'), 'none' => gT('Hide both', 'unescaped')), 'current' => getGlobalSetting('showqnumcode')), 'pdffontsize' => array('type' => 'int', 'label' => gT("Font size of answers export PDFs"), 'current' => getGlobalSetting('pdffontsize'), 'htmlOptions' => array('size' => '5')), 'pdfshowheader' => array('type' => 'select', 'label' => gT("Show header in answers export PDFs?"), 'options' => array('Y' => gT("Yes", 'unescaped'), 'N' => gT("No", 'unescaped')), 'current' => getGlobalSetting('pdfshowheader')), 'pdflogowidth' => array('type' => 'int', 'label' => gT("Width of PDF header logo", 'unescaped'), 'current' => getGlobalSetting('pdflogowidth')), 'pdfheadertitle' => array('type' => 'string', 'label' => gT("PDF header title (if empty, site name will be used)"), 'current' => getGlobalSetting('pdfheadertitle'), 'htmlOptions' => array('maxlength' => '256')), 'pdfheaderstring' => array('type' => 'string', 'label' => gT("PDF header string (if empty, survey name will be used)"), 'current' => getGlobalSetting('pdfheaderstring'), 'htmlOptions' => array('maxlength' => '256')))));
?>
<?php
// Language settings
$aLanguages = array();
foreach (getLanguageData(true) as $sLanguage => $aLanguage) {
$aLanguages[$sLanguage] = html_entity_decode($aLanguage['description'], ENT_QUOTES, 'UTF-8') . " (" . html_entity_decode($aLanguage['nativedescription'], ENT_QUOTES, 'UTF-8') . ")";
}
$aAvailableLang = getLanguageDataRestricted();
$this->widget('ext.SettingsWidget.SettingsWidget', array('id' => 'language', 'form' => false, 'formHtmlOptions' => array('class' => 'form-core'), 'settings' => array('defaultlang' => array('type' => 'select', 'label' => gT("Default site language") . $sStringDemoMode, 'labelOptions' => array('class' => $sClassDemoMode), 'options' => $aLanguages, 'selectOptions' => array('minimumResultsForSearch' => 15), 'current' => getGlobalSetting('defaultlang')), 'restrictToLanguages' => array('type' => 'select', 'label' => gT("Available languages") . $sStringDemoMode, 'options' => $aLanguages, 'current' => array_keys(getLanguageDataRestricted()), 'htmlOptions' => array('multiple' => true), 'selectOptions' => array('width' => '100%')))));
?>
<?php
// Remote control
$this->widget('ext.SettingsWidget.SettingsWidget', array('id' => 'interfaces', 'form' => false, 'formHtmlOptions' => array('class' => 'form-core'), 'settings' => array('RPCInterface' => array('type' => 'select', 'label' => gT("RPC interface enabled"), 'options' => array('off' => gT("Off", 'unescaped'), 'json' => gT("JSON-RPC", 'unescaped'), 'xml' => gT("XML-RPC", 'unescaped')), 'current' => getGlobalSetting('RPCInterface')), 'RPCurl' => array('type' => 'info', 'label' => gt("URL of API"), 'content' => CHtml::tag('code', array(), $this->createAbsoluteUrl("admin/remotecontrol"))), 'rpc_publish_api' => array('type' => 'select', 'label' => gT("Publish API on /admin/remotecontrol"), 'options' => array('0' => gT("No", 'unescaped'), '1' => gT("Yes", 'unescaped')), 'current' => getGlobalSetting('rpc_publish_api')))));
?>
<div class="hidden hide" id="submitglobalbutton">
<p>
<?php
if (Yii::app()->session['refurl']) {
?>
<button type="submit" name="action" value='savequit'><?php
eT("Save and exit");
?>
</button>
<?php
开发者ID:kalckhoff,项目名称:LimeSurvey,代码行数:31,代码来源:globalSettings_view.php
示例9: array
'type'=>'select',
'label'=>gT("Default site language").$sStringDemoMode,
'labelOptions'=>array(
'class'=>$sClassDemoMode,
),
'options'=>$aLanguages,
'selectOptions'=>array(
'minimumResultsForSearch'=>15,
),
'current'=>getGlobalSetting('defaultlang'),
),
'restrictToLanguages'=>array(
'type'=>'select',
'label'=>gT("Available languages").$sStringDemoMode,
'options'=>$aLanguages,
'current'=>array_keys(getLanguageDataRestricted ()),
'htmlOptions'=>array(
'multiple'=>true,
),
'selectOptions'=>array(
'width'=>'100%',
),
),
),
));
?>
<?php
// Remote control
$this->widget('ext.SettingsWidget.SettingsWidget', array(
'id'=>'interfaces',
'form' => false,
开发者ID:krsandesh,项目名称:LimeSurvey,代码行数:31,代码来源:globalSettings_view.php
示例10: eT
<!-- Text elements -->
<div class="row">
<!-- base language -->
<div class="form-group">
<label class="col-sm-2 control-label" for='language' title='<?php
eT("This is the base language of your survey and it can't be changed later. You can add more languages after you have created the survey.");
?>
'><?php
eT("Base language:");
?>
<span class='annotationasterisk'>*</span></label>
<div class="col-sm-5">
<select id='language' name='language' class="form-control">
<?php
foreach (getLanguageDataRestricted(false) as $langkey2 => $langname) {
?>
<option value='<?php
echo $langkey2;
?>
'
<?php
if (Yii::app()->getConfig('defaultlang') == $langkey2) {
?>
selected='selected'
<?php
}
?>
><?php
echo $langname['description'];
?>
开发者ID:sickpig,项目名称:LimeSurvey,代码行数:31,代码来源:tabCreate_view.php
示例11: getLanguageDataRestricted
<?php
// Get the array language
$aAvailableLang = getLanguageDataRestricted(false, Yii::app()->session['adminlang']);
unset($aAvailableLang[$esrow['language']]);
$aLang = array();
foreach ($aAvailableLang as $lang => $aLanguage) {
$aLang[$lang] = html_entity_decode($aLanguage['description'], ENT_QUOTES, 'UTF-8') . " (" . html_entity_decode($aLanguage['nativedescription'], ENT_QUOTES, 'UTF-8') . ")";
}
$this->widget('ext.SettingsWidget.SettingsWidget', array('id' => 'general', 'title' => gt("General"), 'form' => false, 'formHtmlOptions' => array('class' => 'form-core'), 'settings' => array('baselanguage' => array('type' => 'select', 'label' => gT('Base language'), 'options' => array($esrow['language'] = html_entity_decode(getLanguageNameFromCode($esrow['language'], false), ENT_QUOTES, 'UTF-8')), 'htmlOptions' => array('disabled' => true), 'current' => $esrow['language']), 'additional_languages' => array('type' => 'select', 'label' => gT('Additional Languages'), 'htmlOptions' => array('multiple' => true), 'options' => $aLang, 'current' => Survey::model()->findByPk($surveyid)->additionalLanguages, 'help' => gT("If you remove a language, all questions, answers, etc for removed languages will be lost."), 'events' => array('change' => 'js: function(e) { }')), 'admin' => array('type' => 'string', 'label' => gT("Administrator"), 'value' => $esrow['admin'], 'htmlOptions' => array('size' => 50), 'current' => $esrow['admin']), 'adminemail' => array('type' => 'email', 'label' => gT("Admin email"), 'value' => $esrow['adminemail'], 'htmlOptions' => array('size' => 50), 'current' => $esrow['adminemail']), 'bounce_email' => array('type' => 'email', 'label' => gT("Bounce email"), 'value' => $esrow['bounce_email'], 'htmlOptions' => array('size' => 50), 'current' => $esrow['bounce_email']), 'faxto' => array('type' => 'string', 'label' => gT("Fax to"), 'value' => $esrow['faxto'], 'htmlOptions' => array('size' => 50), 'current' => $esrow['faxto']))));
开发者ID:venurasasanka,项目名称:LimeSurvey,代码行数:10,代码来源:tabGeneralEditSurvey_view.php
示例12: CreateUi
function CreateUi($que_id, $que_title, $que_fieldtype, $style)
{
$html = '';
$sql = "SELECT * FROM {{profile_answer}} WHERE question_id = '{$que_id}' AND IsActive = 1 ORDER BY sorder";
$que_ans = Yii::app()->db->createCommand($sql)->query()->readAll();
if ($que_fieldtype == 'Text') {
$html .= '<tr>
<td ' . $style . '>' . $que_title . '</td>
</tr>
<tr>
<td ' . $style . '>
<input type="text" name="' . $que_id . '" id="' . $que_id . '" required="required" />
</td>
</tr>';
}
if ($que_fieldtype == 'DOB') {
$curYear = date('Y');
$startYear = $curYear - 100;
$endYear = $curYear - 18;
//18/06/2014 Add By Hari
$html .= '
<link rel="stylesheet" type="text/css" href="./third_party/jqueryui/css/smoothness/jquery-ui-1.10.3.custom.css" />
<script>
$(function() {
//$( "#datepicker" ).datepicker({
// changeMonth: true,
// changeYear: true,
// yearRange: "' . $startYear . ":" . $endYear . '"
//});
$( "#' . $que_id . '" ).datepicker({
changeMonth: true,
changeYear: true,
yearRange:"-100:-18",
defaultDate: "-100y",
required: true,
});
});
</script>';
//18/06/2014 End
$html .= '<tr>
<td ' . $style . '>' . $que_title . '</td>
</tr>
<tr>
<td ' . $style . '>
<!--<input type="date" min="' . $startYear . '-01-01" max="' . $endYear . '-12-31" name="' . $que_id . '" id="' . $que_id . '" required="required" />-->
<!--<input type="text" id="datepicker" required="required" placeholder="mm/dd/yyyy" >18/06/2014 Add By Hari-->
<input type="text" name="' . $que_id . '" id="' . $que_id . '" required="required" placeholder="mm/dd/yyyy" ><!-- 18/06/2014 Add By Hari -->
</td>
</tr>';
}
if ($que_fieldtype == 'TextArea') {
$html .= '<tr>
<td ' . $style . '>' . $que_title . '</td>
</tr>
<tr>
<td ' . $style . '>
<textarea rows="2" cols="50" name="' . $que_id . '" id="' . $que_id . '" required="required"></textarea>
</td>
</tr>';
}
if ($que_fieldtype == 'Radio') {
$html .= '<tr>
<td ' . $style . '>' . $que_title . '</td>
</tr>
<tr>
<td ' . $style . '>';
foreach ($que_ans as $value) {
$html .= '<input type="radio" checked="checked" value="' . $value['id'] . '" name="' . $que_id . '" id="' . $value['title'] . '" required="required" />' . $value['title'];
}
$html .= '</td>
</tr>';
}
if ($que_fieldtype == 'DropDown') {
$html .= '<tr>
<td ' . $style . '>' . $que_title . '</td>
</tr>
<tr>
<td ' . $style . '><select name="' . $que_id . '" id="' . $que_id . '" required="required">
<option value="">Please Provide Answer</option>';
foreach ($que_ans as $value) {
if ($value['title'] == '[[COUNTRY]]') {
$country = Country::model()->isactive()->findAll();
foreach ($country as $val) {
$html .= '<option value="' . $val['country_id'] . '">' . $val['country_name'] . '</option>';
}
} elseif ($value['title'] == '[[LANGUAGE]]') {
foreach (getLanguageDataRestricted(false, Yii::app()->session['adminlang']) as $langkey => $langname) {
$html .= '<option value="' . $langkey . '">' . $langname['description'] . '</option>';
}
} else {
$html .= '<option value="' . $value['id'] . '">' . $value['title'] . '</option>';
}
}
$html .= '</select></td>
</tr>';
}
if ($que_fieldtype == 'CheckBox') {
include 'pljs.php';
$html .= '
//.........这里部分代码省略.........
开发者ID:jdbaltazar,项目名称:survey-office,代码行数:101,代码来源:common_helper.php
注:本文中的getLanguageDataRestricted函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论