コード例 #1
0
ファイル: listcontent.php プロジェクト: RTR-ITF/usse-cms
function display_content_list($themeObject = null)
{
    $gCms = cmsms();
    global $thisurl;
    global $urlext;
    check_login();
    $userid = get_userid();
    // setup which columns to display.
    $mypages = author_pages($userid);
    $columnstodisplay = array();
    $columnstodisplay['expand'] = 1;
    $columnstodisplay['hier'] = 1;
    $columnstodisplay['page'] = 1;
    $columnstodisplay['alias'] = get_site_preference('listcontent_showalias', 1);
    $columnstodisplay['url'] = get_site_preference('listcontent_showurl', 1);
    $columnstodisplay['template'] = 1;
    $columnstodisplay['friendlyname'] = 1;
    $columnstodisplay['owner'] = 1;
    $columnstodisplay['active'] = check_permission($userid, 'Manage All Content');
    $columnstodisplay['default'] = check_permission($userid, 'Manage All Content');
    $columnstodisplay['move'] = check_permission($userid, 'Manage All Content') || check_permission($userid, 'Reorder Content');
    $columnstodisplay['view'] = 1;
    $columnstodisplay['copy'] = check_permission($userid, 'Add Pages') || check_permission($userid, 'Manage All Content');
    $columnstodisplay['edit'] = 1;
    $columnstodisplay['delete'] = check_permission($userid, 'Remove Pages') || check_permission($userid, 'Manage All Content');
    $columnstodisplay['multiselect'] = check_permission($userid, 'Remove Pages') || check_permission($userid, 'Manage All Content');
    $page = 1;
    if (isset($_GET['page'])) {
        $page = $_GET['page'];
    }
    //$limit = get_preference($userid, 'paging', 0);
    $limit = 0;
    //Took out pagination
    $thelist = '';
    $count = 0;
    $currow = "row1";
    if ($themeObject == null) {
        $themeObject = AdminTheme::GetThemeObject();
    }
    // construct true/false button images
    $image_true = $themeObject->DisplayImage('icons/system/true.gif', lang('true'), '', '', 'systemicon');
    $image_set_false = $themeObject->DisplayImage('icons/system/true.gif', lang('setfalse'), '', '', 'systemicon');
    $image_set_true = $themeObject->DisplayImage('icons/system/false.gif', lang('settrue'), '', '', 'systemicon');
    $expandImg = $themeObject->DisplayImage('icons/system/expand.gif', lang('expand'), '', '', 'systemicon');
    $contractImg = $themeObject->DisplayImage('icons/system/contract.gif', lang('contract'), '', '', 'systemicon');
    $downImg = $themeObject->DisplayImage('icons/system/arrow-d.gif', lang('down'), '', '', 'systemicon');
    $upImg = $themeObject->DisplayImage('icons/system/arrow-u.gif', lang('up'), '', '', 'systemicon');
    $viewImg = $themeObject->DisplayImage('icons/system/view.gif', lang('view'), '', '', 'systemicon');
    $editImg = $themeObject->DisplayImage('icons/system/edit.gif', lang('edit'), '', '', 'systemicon');
    $copyImg = $themeObject->DisplayImage('icons/system/copy.gif', lang('copy'), '', '', 'systemicon');
    $deleteImg = $themeObject->DisplayImage('icons/system/delete.gif', lang('delete'), '', '', 'systemicon');
    #Setup array so we don't load more templates than we need to
    $templateops = TemplateOperations::get_instance()->LoadTemplates();
    #Ditto with users
    $users = array();
    $menupos = array();
    $openedArray = array();
    if (get_preference($userid, 'collapse', '') != '') {
        $tmp = explode('.', get_preference($userid, 'collapse'));
        foreach ($tmp as $thisCol) {
            $colind = substr($thisCol, 0, strpos($thisCol, '='));
            if ($colind != "") {
                $openedArray[] = $colind;
            }
        }
    }
    debug_buffer('At Start of Display Content List');
    $hierarchy = $gCms->GetHierarchyManager();
    $rowcount = 0;
    if ($hierarchy->hasChildren()) {
        $pagelist = array();
        $children = $hierarchy->getChildren(false, true);
        $author_allpages = check_permission($userid, 'Reorder Content') && check_peer_authorship($userid, $children[0]->getId());
        foreach ($children as $child) {
            display_hierarchy($child, $userid, check_modify_all($userid), $users, $menupos, $openedArray, $pagelist, $image_true, $image_set_false, $image_set_true, $upImg, $downImg, $viewImg, $editImg, $copyImg, $deleteImg, $expandImg, $contractImg, $mypages, $page, $columnstodisplay, $author_allpages);
        }
        $rowcount += count($pagelist);
        foreach ($pagelist as $item) {
            $thelist .= $item;
        }
        $thelist .= '</tbody>';
        $thelist .= "</table>\n";
    }
    $headoflist = '';
    $headoflist .= '<div class="pageoverflow"><p class="pageoptions">';
    if (check_permission($userid, 'Add Pages') || check_permission($userid, 'Manage All Content')) {
        $headoflist .= '<a href="addcontent.php' . $urlext . '" class="pageoptions">';
        $headoflist .= $themeObject->DisplayImage('icons/system/newobject.gif', lang('addcontent'), '', '', 'systemicon') . '</a>';
        $headoflist .= ' <a class="pageoptions" href="addcontent.php' . $urlext . '">' . lang("addcontent") . '</a>';
    }
    $headoflist .= '<a style="margin-left: 10px;" href="' . $thisurl . '&amp;expandall=1" onclick="xajax_content_expandall(); return false;">';
    $headoflist .= $themeObject->DisplayImage('icons/system/expandall.gif', lang('expandall'), '', '', 'systemicon') . '</a>';
    $headoflist .= ' <a class="pageoptions" href="' . $thisurl . '&amp;expandall=1" onclick="xajax_content_expandall(); return false;">' . lang("expandall") . '</a>&nbsp;&nbsp;&nbsp;';
    $headoflist .= ' <a href="' . $thisurl . '&amp;collapseall=1" onclick="xajax_content_collapseall(); return false;">';
    $headoflist .= $themeObject->DisplayImage('icons/system/contractall.gif', lang('contractall'), '', '', 'systemicon') . '</a>';
    $headoflist .= ' <a class="pageoptions" href="' . $thisurl . '&amp;collapseall=1" onclick="xajax_content_collapseall(); return false;">' . lang("contractall") . '</a>';
    if (check_permission($userid, 'Manage All Content')) {
        $reorderurl = "ordercontent.php?" . CMS_SECURE_PARAM_NAME . "=" . $_SESSION[CMS_USER_KEY];
        $headoflist .= '&nbsp;&nbsp;&nbsp;<a href="' . $reorderurl . '">';
        $headoflist .= $themeObject->DisplayImage('icons/system/reorder.gif', lang('reorderpages'), '', '', 'systemicon') . '</a>';
        $headoflist .= ' <a class="pageoptions" href="' . $reorderurl . '">' . lang('reorderpages') . '</a>';
    }
    $headoflist .= '</p></div>';
    $headoflist .= '<form action="multicontent.php" method="post">';
    $headoflist .= '<div class="hidden" ><input type="hidden" name="' . CMS_SECURE_PARAM_NAME . '" value="' . $_SESSION[CMS_USER_KEY] . '"/></div>' . "\n";
    $headoflist .= '<table cellspacing="0" class="pagetable">' . "\n";
    $headoflist .= '<thead>';
    $headoflist .= "<tr>\n";
    // setup column titles.
    if ($columnstodisplay['expand']) {
        $headoflist .= "<th>&nbsp;</th>";
    }
    if ($columnstodisplay['hier']) {
        $headoflist .= "<th>&nbsp;</th>";
    }
    if ($columnstodisplay['page']) {
        $str = lang('menutext');
        if (get_site_preference('listcontent_showtitle')) {
            $str = lang('title');
        }
        $headoflist .= '<th scope="col" class="pagew25" title="' . lang('lctitle_page') . '">' . lang('page') . " <em>({$str})</em></th>\n";
    }
    if ($columnstodisplay['alias']) {
        $headoflist .= '<th scope="col" title="' . lang('lctitle_alias') . '">' . lang('pagealias') . "</th>\n";
    }
    if ($columnstodisplay['url']) {
        $headoflist .= '<th scope="col" title="' . lang('lctitle_url') . '">' . lang('url') . "</th>\n";
    }
    if ($columnstodisplay['template']) {
        $headoflist .= '<th scope="col" title="' . lang('lctitle_template') . '">' . lang('template') . "</th>\n";
    }
    if ($columnstodisplay['friendlyname']) {
        $headoflist .= "<th scope=\"col\" >" . lang('type') . "</th>\n";
    }
    if ($columnstodisplay['owner']) {
        $headoflist .= '<th scope="col" title="' . lang('lctitle_owner') . '">' . lang('owner') . "</th>\n";
    }
    if ($columnstodisplay['active']) {
        $headoflist .= '<th scope="col" title="' . lang('lctitle_active') . '" class="pagepos">' . lang('active') . "</th>\n";
    }
    if ($columnstodisplay['default']) {
        $headoflist .= '<th scope="col" title="' . lang('lctitle_default') . '" class="pagepos">' . lang('default') . "</th>\n";
    }
    if ($columnstodisplay['move']) {
        $headoflist .= '<th scope="col" title="' . lang('lctitle_move') . '" class="move">' . lang('move') . "</th>\n";
    }
    if ($columnstodisplay['view']) {
        $headoflist .= "<th class=\"pageicon\">&nbsp;</th>\n";
    }
    if ($columnstodisplay['copy']) {
        $headoflist .= "<th class=\"pageicon\">&nbsp;</th>\n";
    }
    if ($columnstodisplay['edit']) {
        $headoflist .= "<th class=\"pageicon\">&nbsp;</th>\n";
    }
    if ($columnstodisplay['delete']) {
        $headoflist .= "<th class=\"pageicon\">&nbsp;</th>\n";
    }
    if ($columnstodisplay['multiselect']) {
        $headoflist .= '<th scope="col" title="' . lang('lctitle_multiselect') . '" class="checkbox"><input id="selectall" type="checkbox" onclick="select_all();" /><label for="selectall" class="invisible">' . lang('toggle') . '</label></th>' . "\n";
        // checkbox column
    }
    $headoflist .= "</tr>\n";
    $headoflist .= '</thead>';
    $headoflist .= '<tbody>';
    ob_start();
    $opts = array();
    if (check_permission($userid, 'Remove Pages') || check_permission($userid, 'Manage All Content')) {
        bulkcontentoperations::register_function(lang('delete'), 'delete');
    }
    if (check_permission($userid, 'Manage All Content')) {
        bulkcontentoperations::register_function(lang('active'), 'active');
        bulkcontentoperations::register_function(lang('inactive'), 'inactive');
        bulkcontentoperations::register_function(lang('cachable'), 'setcachable');
        bulkcontentoperations::register_function(lang('noncachable'), 'setnoncachable');
        bulkcontentoperations::register_function(lang('showinmenu'), 'showinmenu');
        bulkcontentoperations::register_function(lang('hidefrommenu'), 'hidefrommenu');
        bulkcontentoperations::register_function(lang('secure'), 'secure');
        bulkcontentoperations::register_function(lang('insecure'), 'insecure');
        bulkcontentoperations::register_function(lang('settemplate'), 'settemplate');
        bulkcontentoperations::register_function(lang('changeowner'), 'changeowner');
    }
    $opts = bulkcontentoperations::get_operation_list();
    if (!empty($opts)) {
        echo '<div class="pageoptions">' . "\n";
        echo '<div style="margin-top: 0; float: right; text-align: right">' . "\n";
        echo '<label for="multiaction">' . lang('selecteditems') . '</label>:&nbsp;&nbsp;';
        echo '<select name="multiaction" id="multiaction">';
        foreach ($opts as $key => $value) {
            echo '<option value="' . $key . '">' . $value . '</option>';
        }
        echo '</select>' . "\n";
        echo '<input type="submit" accesskey="s" value="' . lang('submit') . '"/></div></div>' . "\n";
    }
    /*    } */
    ?>
			<div style="float: left;">
<?php 
    if (check_permission($userid, 'Add Pages') || check_permission($userid, 'Manage All Content')) {
        ?>
			<a href="addcontent.php<?php 
        echo $urlext;
        ?>
" class="pageoptions">
<?php 
        echo $themeObject->DisplayImage('icons/system/newobject.gif', lang('addcontent'), '', '', 'systemicon') . '</a>';
        echo ' <a class="pageoptions" href="addcontent.php' . $urlext . '">' . lang("addcontent");
        ?>
			</a>
<?php 
    }
    ?>
		<a style="margin-left: 10px;" href="'.$thisurl.'&amp;expandall=1" onclick="xajax_content_expandall(); return false;">
<?php 
    echo $themeObject->DisplayImage('icons/system/expandall.gif', lang('expandall'), '', '', 'systemicon') . '</a>';
    echo ' <a class="pageoptions" href="' . $thisurl . '&amp;expandall=1" onclick="xajax_content_expandall(); return false;">' . lang("expandall");
    ?>
			</a>&nbsp;&nbsp;&nbsp;
		<a href="<?php 
    echo $thisurl;
    ?>
&amp;collapseall=1" onclick="xajax_content_collapseall(); return false;">
<?php 
    echo $themeObject->DisplayImage('icons/system/contractall.gif', lang('contractall'), '', '', 'systemicon') . '</a>';
    echo ' <a class="pageoptions" href="' . $thisurl . '&amp;collapseall=1" onclick="xajax_content_collapseall(); return false;">' . lang("contractall") . '</a>';
    if (check_permission($userid, 'Manage All Content')) {
        $image_reorder = $themeObject->DisplayImage('icons/system/reorder.gif', lang('reorderpages'), '', '', 'systemicon');
        $reorderurl = "ordercontent.php?" . CMS_SECURE_PARAM_NAME . "=" . $_SESSION[CMS_USER_KEY];
        echo '&nbsp;&nbsp;&nbsp; <a class="pageoptions" href="' . $reorderurl . '">' . $image_reorder . '</a> <a class="pageoptions" href="' . $reorderurl . '">' . lang('reorderpages') . '</a>';
    }
    ?>
			</div>

			<br />

			<div class="clearb"></div>
<?php 
    $footer = ob_get_contents();
    ob_end_clean();
    return $headoflist . $thelist . $footer . '</form></div>';
}
コード例 #2
0
ファイル: bounce.php プロジェクト: mfavetti/LimeSurvey
                            <div class=" form-group setting control-group setting-select">
                                <label class="default control-label col-lg-2 col-sm-5 col-md-7" for="bounceaccountencryption">
                                    <?php 
eT('Encryption type:');
?>
                                </label>
                                <div class="default col-lg-4 col-sm-5 col-md-7 controls">
                                    <?php 
$this->widget('yiiwheels.widgets.buttongroup.WhButtonGroup', array('name' => 'bounceaccountencryption', 'value' => $settings['bounceaccountencryption'], 'selectOptions' => array("Off" => gT("Off", 'unescaped'), "SSL" => gT("SSL", 'unescaped'), "TLS" => gT("TLS", 'unescaped'))));
?>
                                </div>
                            </div>
                        </div>
                    </div>

                    <!-- buttons -->
                    <div class="buttons control-group  hidden">
                        <button name="save" value="save" class="btn" type="submit">Save bounce settings</button>
                        <a class="btn btn-link button" href="/LimeSurveyNext/index.php/admin/tokens?sa=index&amp;surveyid=274928">
                            Cancel
                        </a>
                    </div>
                </form>
            </div> <!-- bouncesettingsdiv -->
        </div> <!-- col -->
    </div> <!-- Row -->
</div> <!-- Side body -->

<?php 
$oAdminTheme = AdminTheme::getInstance();
$oAdminTheme->registerScriptFile('ADMIN_SCRIPT_PATH', 'tokenbounce.js');
コード例 #3
0
ファイル: admin.php プロジェクト: proj-2014/vlan247-test-wp2
 public function __construct()
 {
     define('THEME_EXTENDS_ADMIN_AJAX', THEME_EXTENDS_ADMIN . '/ajax');
     parent::__construct();
 }
コード例 #4
0
    /**
     * DisplayHTMLHeader
     * This method outputs the HEAD section of the html page in the admin section.
     */
    function DisplayHTMLHeader($showielink = false, $addt = '')
    {
        parent::DisplayHTMLHeader($showielink, $addt);
        ?>

<?php 
    }
コード例 #5
0
ファイル: globalsettings.php プロジェクト: sickpig/LimeSurvey
 private function _displaySettings()
 {
     Yii::app()->loadHelper('surveytranslator');
     // Save refurl from where global settings screen is called!
     $refurl = Yii::app()->getRequest()->getUrlReferrer(Yii::app()->createUrl('admin'), array('globalsettings'));
     // Some URLs are not to be allowed to refered back to.
     // These exceptions can be added to the $aReplacements array
     $aReplacements = array('admin/update/sa/step4b' => 'admin/sa/index', 'admin/user/sa/adduser' => 'admin/user/sa/index', 'admin/user/sa/setusertemplates' => 'admin/user/sa/index');
     $data['title'] = "hi";
     $data['message'] = "message";
     foreach ($this->_checkSettings() as $key => $row) {
         $data[$key] = $row;
     }
     Yii::app()->loadLibrary('Date_Time_Converter');
     $dateformatdetails = getDateFormatData(Yii::app()->session['dateformat']);
     $datetimeobj = new date_time_converter(dateShift(getGlobalSetting("updatelastcheck"), 'Y-m-d H:i:s', getGlobalSetting('timeadjust')), 'Y-m-d H:i:s');
     $data['updatelastcheck'] = $datetimeobj->convert($dateformatdetails['phpdate'] . " H:i:s");
     $data['updateavailable'] = getGlobalSetting("updateavailable") && Yii::app()->getConfig("updatable");
     $data['updatable'] = Yii::app()->getConfig("updatable");
     $data['updateinfo'] = getGlobalSetting("updateinfo");
     $data['updatebuild'] = getGlobalSetting("updatebuild");
     $data['updateversion'] = getGlobalSetting("updateversion");
     $data['aUpdateVersions'] = json_decode(getGlobalSetting("updateversions"), true);
     $data['allLanguages'] = getLanguageData(false, Yii::app()->session['adminlang']);
     if (trim(Yii::app()->getConfig('restrictToLanguages')) == '') {
         $data['restrictToLanguages'] = array_keys($data['allLanguages']);
         $data['excludedLanguages'] = array();
     } else {
         $data['restrictToLanguages'] = explode(' ', trim(Yii::app()->getConfig('restrictToLanguages')));
         $data['excludedLanguages'] = array_diff(array_keys($data['allLanguages']), $data['restrictToLanguages']);
     }
     $data['fullpagebar']['savebutton']['form'] = 'frmglobalsettings';
     $data['fullpagebar']['saveandclosebutton']['form'] = 'frmglobalsettings';
     $data['fullpagebar']['closebutton']['url'] = 'admin/';
     // Close button
     // List of available encodings
     $data['aEncodings'] = aEncodingsArray();
     // Get current setting from DB
     $data['thischaracterset'] = getGlobalSetting('characterset');
     $data['sideMenuBehaviour'] = getGlobalSetting('sideMenuBehaviour');
     $data['aListOfThemeObjects'] = AdminTheme::getAdminThemeList();
     $this->_renderWrappedTemplate('', 'globalSettings_view', $data);
 }
コード例 #6
0
ファイル: header.php プロジェクト: rasomu/chuza
    @ob_start();
}
include_once "../lib/classes/class.admintheme.inc.php";
$config = $gCms->GetConfig();
if (isset($USE_THEME) && $USE_THEME == false) {
    //echo '<!-- admin theme disabled -->';
} else {
    $themeName = get_preference(get_userid(), 'admintheme', 'default');
    $themeObjectName = $themeName . "Theme";
    $userid = get_userid();
    debug_buffer('before theme load');
    if (file_exists(dirname(__FILE__) . "/themes/{$themeName}/{$themeObjectName}.php")) {
        include dirname(__FILE__) . "/themes/{$themeName}/{$themeObjectName}.php";
        $themeObject = new $themeObjectName($gCms, $userid, $themeName);
    } else {
        $themeObject = new AdminTheme($gCms, $userid, $themeName);
    }
    debug_buffer('after theme load');
    $gCms->variables['admintheme'] =& $themeObject;
    if (isset($gCms->config['admin_encoding']) && $gCms->config['admin_encoding'] != '') {
        $themeObject->SendHeaders(isset($charsetsent), $gCms->config['admin_encoding']);
    } else {
        $themeObject->SendHeaders(isset($charsetsent), get_encoding('', false));
    }
    debug_buffer('before populate admin navigation');
    $themeObject->PopulateAdminNavigation(isset($CMS_ADMIN_SUBTITLE) ? $CMS_ADMIN_SUBTITLE : '');
    debug_buffer('after populate admin navigation');
    debug_buffer('before theme-y stuff');
    $themeObject->DisplayDocType();
    $themeObject->DisplayHTMLStartTag();
    $themeObject->DisplayHTMLHeader(false, isset($headtext) ? $headtext : '');
コード例 #7
0
 /**
  * Prints Admin Header
  *
  * @access protected
  * @param bool $meta
  * @param bool $return
  * @return mixed
  */
 public function _getAdminHeader($meta = false, $return = false)
 {
     if (empty(Yii::app()->session['adminlang'])) {
         Yii::app()->session["adminlang"] = Yii::app()->getConfig("defaultlang");
     }
     $aData = array();
     $aData['adminlang'] = Yii::app()->language;
     $aData['languageRTL'] = "";
     $aData['styleRTL'] = "";
     Yii::app()->loadHelper("surveytranslator");
     if (getLanguageRTL(Yii::app()->language)) {
         $aData['languageRTL'] = " dir=\"rtl\" ";
         $aData['bIsRTL'] = true;
     } else {
         $aData['languageRTL'] = " dir=\"ltr\" ";
         $aData['bIsRTL'] = false;
     }
     $aData['meta'] = "";
     if ($meta) {
         $aData['meta'] = $meta;
     }
     $aData['baseurl'] = Yii::app()->baseUrl . '/';
     $aData['datepickerlang'] = "";
     $aData['sitename'] = Yii::app()->getConfig("sitename");
     $aData['firebug'] = useFirebug();
     if (!empty(Yii::app()->session['dateformat'])) {
         $aData['formatdata'] = getDateFormatData(Yii::app()->session['dateformat']);
     }
     // Register admin theme package with asset manager
     $oAdminTheme = AdminTheme::getInstance();
     $aData['sAdmintheme'] = $oAdminTheme->name;
     $aData['aPackageScripts'] = $aData['aPackageStyles'] = array();
     //foreach ($aData['aPackageStyles'] as &$filename)
     //{
     //$filename = str_replace('.css', '-rtl.css', $filename);
     //}
     //echo '<pre>'; var_dump($aData); echo '</pre>';die;
     $sOutput = $this->renderPartial("/admin/super/header", $aData, true);
     if ($return) {
         return $sOutput;
     } else {
         echo $sOutput;
     }
 }
コード例 #8
0
ファイル: AdminTheme.php プロジェクト: mfavetti/LimeSurvey
 /**
  * Get instance of theme object.
  * Will instantiate the Admin Theme object first time it is called.
  * Please use this instead of global variable.
  * @return AdminTheme
  */
 public static function getInstance()
 {
     if (empty(self::$instance)) {
         self::$instance = new self();
         self::$instance->setAdminTheme();
     }
     return self::$instance;
 }
コード例 #9
0
ファイル: UpdateForm.php プロジェクト: mfavetti/LimeSurvey
 /**
  * Republish all the assets
  * For now, only for frontEnd templates
  * (backend theme are still based on file assets, not directory assets )
  */
 public function republishAssets()
 {
     // Don't touch symlinked assets because it won't work
     if (App()->getAssetManager()->linkAssets) {
         return;
     }
     // Republish the assets
     Template::model()->forceAssets();
     AdminTheme::forceAssets();
     // Delete all the content in the asset directory, but not the directory itself nor the index.html file at its root ^^
     $sAssetsDir = Yii::app()->getConfig('tempdir') . '/assets/';
     $dir = dir($sAssetsDir);
     while (false !== ($entry = $dir->read())) {
         if ($entry == '.' || $entry == '..' || $entry == 'index.html') {
             continue;
         }
         rmdirr($sAssetsDir . DIRECTORY_SEPARATOR . $entry);
     }
 }
コード例 #10
0
 /**
  * This function will register a script file,
  * and will choose if it should use the asset manager or not
  * @param string $sPath : the type the path of the css file to publish ( public, template, etc)
  * @param string $sFile : the file to publish
  */
 public function registerCssFile($sPath, $sFile)
 {
     $oAdminTheme = AdminTheme::getInstance();
     $oAdminTheme->registerCssFile($sPath, $sFile);
 }
コード例 #11
0
 /**
  * Prints Admin Header
  *
  * @access protected
  * @param bool $meta
  * @param bool $return
  * @return mixed
  */
 public function _getAdminHeader($meta = false, $return = false)
 {
     if (empty(Yii::app()->session['adminlang'])) {
         Yii::app()->session["adminlang"] = Yii::app()->getConfig("defaultlang");
     }
     $aData = array();
     $aData['adminlang'] = Yii::app()->language;
     $aData['languageRTL'] = "";
     $aData['styleRTL'] = "";
     Yii::app()->loadHelper("surveytranslator");
     if (getLanguageRTL(Yii::app()->language)) {
         $aData['languageRTL'] = " dir=\"rtl\" ";
         $aData['bIsRTL'] = true;
     } else {
         $aData['languageRTL'] = " dir=\"ltr\" ";
         $aData['bIsRTL'] = false;
     }
     $aData['meta'] = "";
     if ($meta) {
         $aData['meta'] = $meta;
     }
     $aData['baseurl'] = Yii::app()->baseUrl . '/';
     $aData['datepickerlang'] = "";
     if ($aData['adminlang'] != 'en') {
         Yii::app()->getClientScript()->registerScriptFile(App()->baseUrl . "/third_party/jqueryui/development-bundle/ui/i18n/jquery.ui.datepicker-" . $aData['adminlang'] . ".js");
     }
     $aData['sitename'] = Yii::app()->getConfig("sitename");
     $aData['firebug'] = useFirebug();
     if (!empty(Yii::app()->session['dateformat'])) {
         $aData['formatdata'] = getDateFormatData(Yii::app()->session['dateformat']);
     }
     // Register admin theme package with asset manager
     $oAdmintheme = new AdminTheme();
     // We get the package datas from the model
     $oAdmintheme->setAdminTheme();
     $aData['sAdmintheme'] = $oAdmintheme->name;
     $aData['aPackageScripts'] = $aData['aPackageStyles'] = array();
     // Typecasting as array directly does not work in PHP 5.3.17 so we loop over the XML entries
     foreach ($oAdmintheme->config->files->js->filename as $aFile) {
         $aData['aPackageScripts'][] = (string) $aFile;
     }
     foreach ($oAdmintheme->config->files->css->filename as $aFile) {
         $aData['aPackageStyles'][] = (string) $aFile;
     }
     if ($aData['bIsRTL']) {
         foreach ($aData['aPackageStyles'] as &$filename) {
             $filename = str_replace('.css', '-rtl.css', $filename);
         }
     }
     $sOutput = $this->renderPartial("/admin/super/header", $aData, true);
     // Define images url
     define('LOGO_URL', App()->getAssetManager()->publish(dirname(Yii::app()->request->scriptFile) . '/styles/' . $oAdmintheme->name . '/images/logo.png'));
     // Define presentation text on welcome page
     if ($oAdmintheme->config->metadatas->presentation) {
         define('PRESENTATION', $oAdmintheme->config->metadatas->presentation);
     } else {
         define('PRESENTATION', gT('This is the LimeSurvey admin interface. Start to build your survey from here.'));
     }
     if ($return) {
         return $sOutput;
     } else {
         echo $sOutput;
     }
 }