$mainframe->redirect('index.php', JText::_('ALERTNOTAUTH')); } // require the html view class jimport('joomla.application.helper'); jimport('joomla.filesystem.file'); require_once JApplicationHelper::getPath('admin_html', 'com_jcrawler'); $task = JRequest::getVar('task', ''); switch ($task) { case 'submit': submit($option); break; case 'notify': notify($option); break; case 'updatecheck': updatecheck($option); break; default: HTML_jcrawler::showForm($option); break; } $stack = array(); $disallow_file = array(); function submit($option) { global $stack, $mainframe; // get values from gui of script $website = JRequest::getVar('http_host', 'none', 'POST', 'STRING', JREQUEST_ALLOWHTML); if (substr($website, -1) != "/") { $website = $website . "/"; }
//SET LANGUAGE DIRECTORY if ($sourcefrom == "admin") { $langdir="$publicurl/locale/".$_SESSION['adminlang']."/help"; $langdirlocal="$rootdir/locale/".$_SESSION['adminlang']."/help"; if (!is_dir($langdirlocal)) // is_dir only works on local dirs { $langdir="$publicurl/locale/en/help"; //default to english if there is no matching language dir } } if ($sourcefrom == "admin" && $buildnumber != "" && $updatecheckperiod>0 && $updatelastcheck<date_shift(date("Y-m-d H:i:s"), "Y-m-d H:i:s", "-".$updatecheckperiod." days")) { updatecheck(); } //SET LOCAL TIME if (substr($timeadjust,0,1)!='-' && substr($timeadjust,0,1)!='+') {$timeadjust='+'.$timeadjust;} if (strpos($timeadjust,'hours')===false && strpos($timeadjust,'minutes')===false && strpos($timeadjust,'days')===false) { $timeadjust=$timeadjust.' hours'; } // SITE STYLES $setfont = "<font size='2' face='verdana'>"; $singleborderstyle = "style='border: 1px solid #111111'";
function globalsettingsdisplay() { global $action, $connect, $js_admin_includes, $editsurvey, $subaction, $scriptname, $clang; global $updateversion, $updatebuild, $updateavailable, $updatelastcheck, $demoModeOnly; if (isset($subaction) && $subaction == "updatecheck") { $updateinfo=updatecheck(); } if (isset($action) && $action == "globalsettings") { if($_SESSION['USER_RIGHT_SUPERADMIN'] == 1) { $js_admin_includes[]='scripts/globalsettings.js'; // header $editsurvey = "<div class='header ui-widget-header'>".$clang->gT("Global settings")."</div>\n"; // beginning TABs section $editsurvey .= "\t<div id='tabs'> <ul> <li><a href='#overview'>".$clang->gT("Overview & update")."</a></li> <li><a href='#general'>".$clang->gT("General")."</a></li> <li><a href='#email'>".$clang->gT("Email settings")."</a></li> <li><a href='#bounce'>".$clang->gT("Bounce settings")."</a></li> <li><a href='#security'>".$clang->gT("Security")."</a></li> <li><a href='#presentation'>".$clang->gT("Presentation")."</a></li> </ul>\n"; $editsurvey .= "<form class='form30' id='frmglobalsettings' name='frmglobalsettings' action='$scriptname' method='post'>\n"; $editsurvey .= "<div id='overview'>\n"; $editsurvey .= checksettings(); $thisupdatecheckperiod=getGlobalSetting('updatecheckperiod'); $editsurvey .= "<br /></p><div class='header ui-widget-header'>".$clang->gT("Updates")."</div><ul>" . "\t<li><label for='updatecheckperiod'>".$clang->gT("Check for updates:")."</label>\n" . "\t\t\t<select name='updatecheckperiod' id='updatecheckperiod'>\n" . "\t\t\t\t<option value='0'"; if ($thisupdatecheckperiod==0) {$editsurvey .= " selected='selected'";} $editsurvey .=">".$clang->gT("Never")."</option>\n" . "\t\t\t\t<option value='1'"; if ($thisupdatecheckperiod==1) {$editsurvey .= " selected='selected'";} $editsurvey .=">".$clang->gT("Every day")."</option>\n" . "\t\t\t\t<option value='7'"; if ($thisupdatecheckperiod==7) {$editsurvey .= " selected='selected'";} $editsurvey .=">".$clang->gT("Every week")."</option>\n" . "<option value='14'"; if ($thisupdatecheckperiod==14) {$editsurvey .= " selected='selected'";} $editsurvey .=">".$clang->gT("Every 2 weeks")."</option>\n" . "<option value='30'"; if ($thisupdatecheckperiod==30) {$editsurvey .= " selected='selected'";} $editsurvey .=">".$clang->gT("Every month")."</option>\n" . "</select> <input type='button' onclick=\"window.open('$scriptname?action=globalsettings&subaction=updatecheck', '_top')\" value='".$clang->gT("Check now")."' /> <span id='lastupdatecheck'>".sprintf($clang->gT("Last check: %s"),$updatelastcheck)."</span></li></ul><p>\n"; if (isset($updateavailable) && $updateavailable==1) { $editsurvey .='<span style="font-weight: bold;">'.sprintf($clang->gT('There is a LimeSurvey update available: Version %s'),$updateversion."($updatebuild)").'</span><br />'; $editsurvey .=sprintf($clang->gT('You can update %smanually%s or use the %s'),"<a href='http://docs.limesurvey.org/tiki-index.php?page=Upgrading+from+a+previous+version'>","</a>","<a href='$scriptname?action=update'>".$clang->gT('3-Click ComfortUpdate').'</a>').'.<br />'; } elseif (isset($updateinfo['errorcode'])) { $editsurvey .=sprintf($clang->gT('There was an error on update check (%s)'),$updateinfo['errorcode']).'.<br />'; $editsurvey .="<textarea readonly='readonly' style='width:35%; height:60px; overflow: auto;'>".strip_tags($updateinfo['errorhtml']).'</textarea>'; } else { $editsurvey .=$clang->gT('There is currently no newer LimeSurvey version available.'); } $editsurvey .= "</p></div>"; // General TAB $editsurvey .= "\t<div id='general'>\n"; // Administrator... $editsurvey .= "<ul>" . "\t<li><label for='sitename'>".$clang->gT("Site name:").(($demoModeOnly==true)?'*':'')."</label>\n" . "\t\t<input type='text' size='50' id='sitename' name='sitename' value=\"".htmlspecialchars(getGlobalSetting('sitename'))."\" /></li>\n" . "\t<li><label for='defaultlang'>".$clang->gT("Default site language:").(($demoModeOnly==true)?'*':'')."</label>\n" . "\t\t<select name='defaultlang' id='defaultlang'>\n"; $actuallang=getGlobalSetting('defaultlang'); foreach (getLanguageData(true) as $langkey2=>$langname) { $editsurvey .= "\t\t\t<option value='".$langkey2."'"; if ($actuallang == $langkey2) {$editsurvey .= " selected='selected'";} $editsurvey .= ">".$langname['nativedescription']." - ".$langname['description']."</option>\n"; } $editsurvey .= "\t\t</select></li>"; $thisdefaulttemplate=getGlobalSetting('defaulttemplate'); $templatenames=array_keys(gettemplatelist()); $editsurvey .= "" . "\t<li><label for='defaulttemplate'>".$clang->gT("Default template:")."</label>\n" . "\t\t\t<select name='defaulttemplate' id='defaulttemplate'>\n"; foreach ($templatenames as $templatename) { $editsurvey.= "\t\t\t\t<option value='$templatename'"; if ($thisdefaulttemplate==$templatename) {$editsurvey .= " selected='selected'";} $editsurvey .=">$templatename</option>\n"; } $editsurvey .="\t\t\t</select></li>\n"; $thisdefaulthtmleditormode=getGlobalSetting('defaulthtmleditormode'); $editsurvey .= "" . "\t<li><label for='defaulthtmleditormode'>".$clang->gT("Default HTML editor mode:").(($demoModeOnly==true)?'*':'')."</label>\n" . "\t\t\t<select name='defaulthtmleditormode' id='defaulthtmleditormode'>\n" . "\t\t\t\t<option value='default'"; if ($thisdefaulthtmleditormode=='default') {$editsurvey .= " selected='selected'";} $editsurvey .=">".$clang->gT("Default HTML editor mode")."</option>\n" . "\t\t\t\t<option value='none'"; if ($thisdefaulthtmleditormode=='none') {$editsurvey .= " selected='selected'";} $editsurvey .=">".$clang->gT("No HTML editor")."</option>\n" . "<option value='inline'"; if ($thisdefaulthtmleditormode=='inline') {$editsurvey .= " selected='selected'";} $editsurvey .=">".$clang->gT("Inline HTML editor")."</option>\n" . "<option value='popup'"; if ($thisdefaulthtmleditormode=='popup') {$editsurvey .= " selected='selected'";} $editsurvey .=">".$clang->gT("Popup HTML editor")."</option>\n" . "</select></li>\n"; $dateformatdata=getDateFormatData($_SESSION['dateformat']); $editsurvey.= "\t<li><label for='timeadjust'>".$clang->gT("Time difference (in hours):")."</label>\n" . "\t\t<span><input type='text' size='10' id='timeadjust' name='timeadjust' value=\"".htmlspecialchars(str_replace(array('+',' hours'),array('',''),getGlobalSetting('timeadjust')))."\" /> " . $clang->gT("Server time:").' '.convertDateTimeFormat(date('Y-m-d H:i:s'),'Y-m-d H:i:s',$dateformatdata['phpdate'].' H:i')." - ".$clang->gT("Corrected time :").' '.convertDateTimeFormat(date_shift(date("Y-m-d H:i:s"), 'Y-m-d H:i:s', getGlobalSetting('timeadjust')),'Y-m-d H:i:s',$dateformatdata['phpdate'].' H:i')." </span></li>\n"; $thisusepdfexport=getGlobalSetting('usepdfexport'); $editsurvey .= "\t<li><label for='usepdfexport'>".$clang->gT("PDF export available:")."</label>\n" . "<select name='usepdfexport' id='usepdfexport'>\n" . "<option value='1'"; if ( $thisusepdfexport == true) {$editsurvey .= " selected='selected'";} $editsurvey .= ">".$clang->gT("On")."</option>\n" . "<option value='0'"; if ( $thisusepdfexport == false) {$editsurvey .= " selected='selected'";} $editsurvey .= ">".$clang->gT("Off")."</option>\n" . "\t\t</select>\n\t</li>\n"; $thisaddTitleToLinks=getGlobalSetting('addTitleToLinks'); $editsurvey .= "\t<li><label for='addTitleToLinks'>".$clang->gT("Screen reader compatibility mode:")."</label>\n" . "<select name='addTitleToLinks' id='addTitleToLinks'>\n" . "<option value='1'"; if ( $thisaddTitleToLinks == true) {$editsurvey .= " selected='selected'";} $editsurvey .= ">".$clang->gT("On")."</option>\n" . "<option value='0'"; if ( $thisaddTitleToLinks == false) {$editsurvey .= " selected='selected'";} $editsurvey .= ">".$clang->gT("Off")."</option>\n" . "</select>\n</li>\n" . "<li><label for='sessionlifetime'>".$clang->gT("Session lifetime (seconds):")."</label>\n" . "<input type='text' size='10' id='sessionlifetime' name='sessionlifetime' value=\"".htmlspecialchars(getGlobalSetting('sessionlifetime'))."\" /></li>" . "<li><label for='ipInfoDbAPIKey'>".$clang->gT("IP Info DB API Key:")."</label>\n" . "<input type='text' size='35' id='ipInfoDbAPIKey' name='ipInfoDbAPIKey' value=\"".htmlspecialchars(getGlobalSetting('ipInfoDbAPIKey'))."\" /></li>" . "<li><label for='googleMapsAPIKey'>".$clang->gT("Google Maps API key:")."</label>\n" . "<input type='text' size='35' id='googleMapsAPIKey' name='googleMapsAPIKey' value=\"".htmlspecialchars(getGlobalSetting('googleMapsAPIKey'))."\" /></li>" ; // End General TAB $editsurvey .= "\t</ul></div>\n"; // Email TAB $editsurvey .= "\t<div id='email'><ul>\n"; //Format $editsurvey.= "\t<li><label for='siteadminemail'>".$clang->gT("Default site admin email:")."</label>\n" . "\t\t<input type='text' size='50' id='siteadminemail' name='siteadminemail' value=\"".htmlspecialchars(getGlobalSetting('siteadminemail'))."\" /></li>\n" . "\t<li><label for='siteadminname'>".$clang->gT("Administrator name:")."</label>\n" . "\t\t<input type='text' size='50' id='siteadminname' name='siteadminname' value=\"".htmlspecialchars(getGlobalSetting('siteadminname'))."\" /><br /><br /></li>\n" . "\t<li><label for='emailmethod'>".$clang->gT("Email method:")."</label>\n" . "\t\t<select id='emailmethod' name='emailmethod'>\n" . "\t\t\t<option value='mail'"; if (getGlobalSetting('emailmethod')=='mail') {$editsurvey .= " selected='selected'";} $editsurvey .= ">".$clang->gT("PHP (default)")."</option>\n" . "\t\t\t<option value='smtp'"; if (getGlobalSetting('emailmethod')=='smtp') {$editsurvey .= " selected='selected'";} $editsurvey .= ">".$clang->gT("SMTP")."</option>\n" . "\t\t\t<option value='sendmail'"; if (getGlobalSetting('emailmethod')=='sendmail') {$editsurvey .= " selected='selected'";} $editsurvey .= ">".$clang->gT("Sendmail")."</option>\n" . "\t\t\t<option value='qmail'"; if (getGlobalSetting('emailmethod')=='qmail') {$editsurvey .= " selected='selected'";} $editsurvey .= ">".$clang->gT("Qmail")."</option>\n" . "\t\t</select></li>\n" . "\t<li>\n\t\t<label for=\"emailsmtphost\">".$clang->gT("SMTP host:")."</label>\n" . "\t\t<input type='text' size='50' id='emailsmtphost' name='emailsmtphost' value=\"".htmlspecialchars(getGlobalSetting('emailsmtphost'))."\" /> <font size='1'>".$clang->gT("Enter your hostname and port, e.g.: my.smtp.com:25")."</font></li>\n" . "\t<li><label for='emailsmtpuser'>".$clang->gT("SMTP username:"******"</label>\n" . "\t\t<input type='text' size='50' id='emailsmtpuser' name='emailsmtpuser' value=\"".htmlspecialchars(getGlobalSetting('emailsmtpuser'))."\" /></li>\n" . "\t<li><label for='emailsmtppassword'>".$clang->gT("SMTP password:"******"</label>\n" . "\t\t<input type='password' size='50' id='emailsmtppassword' name='emailsmtppassword' value='somepassword' /></li>\n" . "\t<li><label for='emailsmtpssl'>".$clang->gT("SMTP SSL/TLS:")."</label>\n" . "\t\t<select id='emailsmtpssl' name='emailsmtpssl'>\n" . "\t\t\t<option value=''"; if (getGlobalSetting('emailsmtpssl')=='') {$editsurvey .= " selected='selected'";} $editsurvey .= ">".$clang->gT("Off")."</option>\n" . "\t\t\t<option value='ssl'"; if (getGlobalSetting('emailsmtpssl')=='ssl' || getGlobalSetting('emailsmtpssl')==1) {$editsurvey .= " selected='selected'";} $editsurvey .= ">".$clang->gT("SSL")."</option>\n" . "\t\t\t<option value='tls'"; if (getGlobalSetting('emailsmtpssl')=='tls') {$editsurvey .= " selected='selected'";} $editsurvey .= ">".$clang->gT("TLS")."</option>\n" . "\t\t</select></li>\n" . "\t<li><label for='emailsmtpdebug'>".$clang->gT("SMTP debug mode:")."</label>\n" . "\t\t<select id='emailsmtpdebug' name='emailsmtpdebug'>\n" . "\t\t\t<option value=''"; if (getGlobalSetting('emailsmtpdebug')=='0') {$editsurvey .= " selected='selected'";} $editsurvey .= ">".$clang->gT("Off")."</option>\n" . "\t\t\t<option value='1'"; if (getGlobalSetting('emailsmtpdebug')=='1' || getGlobalSetting('emailsmtpssl')==1) {$editsurvey .= " selected='selected'";} $editsurvey .= ">".$clang->gT("On errors")."</option>\n" . "\t\t\t<option value='2'"; if (getGlobalSetting('emailsmtpdebug')=='2' || getGlobalSetting('emailsmtpssl')==1) {$editsurvey .= " selected='selected'";} $editsurvey .= ">".$clang->gT("Always")."</option>\n" . "\t\t</select><br /> </li>\n" . "\t<li><label for='maxemails'>".$clang->gT("Email batch size:")."</label>\n" . "\t\t<input type='text' size='5' id='maxemails' name='maxemails' value=\"".htmlspecialchars(getGlobalSetting('maxemails'))."\" /></li>\n" . "\t</ul>\n"; // End Email TAB $editsurvey .= "\t</div>\n"; // Start bounce tab $editsurvey .= "\t<div id='bounce'><ul>\n" . "\t<li><label for='siteadminbounce'>".$clang->gT("Default site bounce email:")."</label>\n" . "\t\t<input type='text' size='50' id='siteadminbounce' name='siteadminbounce' value=\"".htmlspecialchars(getGlobalSetting('siteadminbounce'))."\" /></li>\n" . "\t<li><label for='bounceaccounttype'>".$clang->gT("Server type:")."</label>\n" . "\t\t<select id='bounceaccounttype' name='bounceaccounttype'>\n" . "\t\t\t<option value='off'"; if (getGlobalSetting('bounceaccounttype')=='off') {$editsurvey .= " selected='selected'";} $editsurvey .= ">".$clang->gT("Off")."</option>\n" . "\t\t\t<option value='IMAP'"; if (getGlobalSetting('bounceaccounttype')=='IMAP') {$editsurvey .= " selected='selected'";} $editsurvey .= ">".$clang->gT("IMAP")."</option>\n" . "\t\t\t<option value='POP'"; if (getGlobalSetting('bounceaccounttype')=='POP') {$editsurvey .= " selected='selected'";} $editsurvey .= ">".$clang->gT("POP")."</option>\n" ."\t\t</select></li>\n" . "\t<li><label for='bounceaccounthost'>".$clang->gT("Server name & port:")."</label>\n" . "\t\t<input type='text' size='50' id='bounceaccounthost' name='bounceaccounthost' value=\"".htmlspecialchars(getGlobalSetting('bounceaccounthost'))."\" />\n"."<font size='1'>".$clang->gT("Enter your hostname and port, e.g.: imap.gmail.com:995")."</font>\n" . "\t<li><label for='bounceaccountuser'>".$clang->gT("User name:")."</label>\n" . "\t\t<input type='text' size='50' id='bounceaccountuser' name='bounceaccountuser' value=\"".htmlspecialchars(getGlobalSetting('bounceaccountuser'))."\" /></li>\n" . "\t<li><label for='bounceaccountpass'>".$clang->gT("Password:"******"</label>\n" . "\t\t<input type='password' size='50' id='bounceaccountpass' name='bounceaccountpass' value='enteredpassword' /></li>\n"; $editsurvey.= "\t<li><label for='bounceencryption'>".$clang->gT("Encryption type:")."</label>\n" . "\t\t<select id='bounceencryption' name='bounceencryption'>\n" . "\t\t\t<option value='off'"; if (getGlobalSetting('bounceencryption')=='off') {$editsurvey .= " selected='selected'";} $editsurvey .= ">".$clang->gT("Off")."</option>\n" . "\t\t\t<option value='SSL'"; if (getGlobalSetting('bounceencryption')=='SSL') {$editsurvey .= " selected='selected'";} $editsurvey .= ">".$clang->gT("SSL")."</option>\n" . "\t\t\t<option value='TLS'"; if (getGlobalSetting('bounceencryption')=='TLS') {$editsurvey .= " selected='selected'";} $editsurvey .= ">".$clang->gT("TLS")."</option>\n" ."\t\t</select></li>\n</ul>"; $editsurvey .= "\t</div>\n"; // End of bounce tabs // Security Settings $editsurvey .= "\t<div id='security'><ul>\n"; // Expiration $thissurveyPreview_require_Auth=getGlobalSetting('surveyPreview_require_Auth'); $editsurvey .= "\t<li><label for='surveyPreview_require_Auth'>".$clang->gT("Survey preview only for administration users")."</label>\n" . "\t\t<select id='surveyPreview_require_Auth' name='surveyPreview_require_Auth'>\n" . "\t\t\t<option value='1'"; if ($thissurveyPreview_require_Auth == true) {$editsurvey .= " selected='selected'";} $editsurvey .= ">".$clang->gT("Yes")."</option>\n" . "\t\t\t<option value='0'"; if ($thissurveyPreview_require_Auth == false) {$editsurvey .= " selected='selected'";} $editsurvey .= ">".$clang->gT("No")."</option>\n" . "\t\t</select></li>\n"; // Auto registration $thisfilterxsshtml=getGlobalSetting('filterxsshtml'); $editsurvey .= "\t<li><label for='filterxsshtml'>".$clang->gT("Filter HTML for XSS:").(($demoModeOnly==true)?'*':'')."</label>\n" . "\t\t<select id='filterxsshtml' name='filterxsshtml'>\n" . "\t\t\t<option value='1'"; if ( $thisfilterxsshtml == true) {$editsurvey .= " selected='selected'";} $editsurvey .= ">".$clang->gT("Yes")."</option>\n" . "\t\t\t<option value='0'"; if ( $thisfilterxsshtml == false) {$editsurvey .= " selected='selected'";} $editsurvey .= ">".$clang->gT("No")."</option>\n" . "\t\t</select></li>\n"; $thisusercontrolSameGroupPolicy=getGlobalSetting('usercontrolSameGroupPolicy'); $editsurvey .= "\t<li><label for='usercontrolSameGroupPolicy'>".$clang->gT("Group member can only see own group:")."</label>\n" . "\t\t<select id='usercontrolSameGroupPolicy' name='usercontrolSameGroupPolicy'>\n" . "\t\t\t<option value='1'"; if ( $thisusercontrolSameGroupPolicy == true) {$editsurvey .= " selected='selected'";} $editsurvey .= ">".$clang->gT("Yes")."</option>\n" . "\t\t\t<option value='0'"; if ( $thisusercontrolSameGroupPolicy == false) {$editsurvey .= " selected='selected'";} $editsurvey .= ">".$clang->gT("No")."</option>\n" . "\t\t</select></li>\n"; $thisforce_ssl = getGlobalSetting('force_ssl'); $opt_force_ssl_on = $opt_force_ssl_off = $opt_force_ssl_neither = ''; $warning_force_ssl = $clang->gT('Warning: Before turning on HTTPS, ') . '<a href="https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].'"title="' . $clang->gT('Test if your server has SSL enabled by clicking on this link.').'">' . $clang->gT('check if this link works.').'</a><br/> ' . $clang->gT("If the link does not work and you turn on HTTPS, LimeSurvey will break and you won't be able to access it."); // $warning_force_ssl = ' Do <strong>NOT</strong> force "On" if you\'re <strong>not completely certain</strong> your server has a SSL enabled. <br />' // . 'Before turning on HTTPS, <a href="https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].'">See if this link works</a><br />' // . 'If not, <strong>LimeSurvey will break</strong> if SSL is forced on but your server does not have a valid secure certificate installed and enabled.<br />'; switch($thisforce_ssl) { case 'on': $warning_force_ssl = ' '; break; case 'off': case 'neither': break; default: $thisforce_ssl = 'neither'; }; $this_opt = 'opt_force_ssl_'.$thisforce_ssl; $$this_opt = ' selected="selected"'; $editsurvey .= '<li><label for="force_ssl">'.$clang->gT('Force HTTPS:')."</label>\n" . "<select name=\"force_ssl\" id=\"force_ssl\">\n\t" . '<option value="on" '.$opt_force_ssl_on.'>'.$clang->gT('On')."</option>\n\t" . '<option value="off" '.$opt_force_ssl_off.'>'.$clang->gT('Off')."</option>\n\t" . '<option value="neither" '.$opt_force_ssl_neither.'>'.$clang->gT('Don\'t force on or off')."</option>\n\t" . "</select></li>\n" . "<li><span style='font-size:0.7em;'>$warning_force_ssl\n</span></li>\n"; unset($thisforce_ssl,$opt_force_ssl_on,$opt_force_ssl_off,$opt_force_ssl_neither,$warning_force_ssl,$this_opt); $editsurvey .= "\t</ul></div>\n"; // presentation settings tab $editsurvey .= "\t<div id='presentation'><ul>\n"; // shownoanswer $shownoanswer=getGlobalSetting('shownoanswer'); $sel_na = array( 0 => '' , 1 => '' , 2 => ''); $sel_na[$shownoanswer] = ' selected="selected"'; $editsurvey .= "\t<li><label for='shownoanswer'>".$clang->gT("Show 'no answer' option for non-mandatory questions:")."</label>\n" . "\t\t<select id='shownoanswer' name='shownoanswer'>\n" . "\t\t\t<option value=\"1\"{$sel_na[1]}>".$clang->gT('Yes')."</option>\n" . "\t\t\t<option value=\"0\"{$sel_na[0]}>".$clang->gT('No')."</option>\n" . "\t\t\t<option value=\"2\"{$sel_na[2]}>".$clang->gT('Survey admin can choose')."</option>\n" . "\t\t</select></li>\n"; $thisrepeatheadings=getGlobalSetting('repeatheadings'); $editsurvey .= "\t<li><label for='repeatheadings'>".$clang->gT("Repeating headings in array questions every X subquestions:")."</label>\n" . "\t\t<input id='repeatheadings' name='repeatheadings' value='$thisrepeatheadings' size='4' maxlength='4' /></li>\n"; // showXquestions $set_xq=getGlobalSetting('showXquestions'); $sel_xq = array( 'hide' => '' , 'show' => '' , 'choose' => ''); $sel_xq[$set_xq] = ' selected="selected"'; if( empty($sel_xq['hide']) && empty($sel_xq['show']) && empty($sel_xq['choose'])) { $sel_xq['choose'] = ' selected="selected"'; }; $editsurvey .= "\t<li><label for=\"showXquestions\">".$clang->gT('Show "There are X questions in this survey"')."</label>\n" . "\t\t<select id=\"showXquestions\" name=\"showXquestions\">\n" . "\t\t\t<option value=\"show\"{$sel_xq['show']}>".$clang->gT('Yes')."</option>\n" . "\t\t\t<option value=\"hide\"{$sel_xq['hide']}>".$clang->gT('No')."</option>\n" . "\t\t\t<option value=\"choose\"{$sel_xq['choose']}>".$clang->gT('Survey admin can choose')."</option>\n" . "\t\t</select></li>\n"; unset($set_xq,$sel_xq); // showgroupinfo $set_gri=getGlobalSetting('showgroupinfo'); $sel_gri = array( 'both' => '' , 'choose' =>'' , 'description' => '' , 'name' => '' , 'none' => '' ); $sel_gri[$set_gri] = ' selected="selected"'; if( empty($sel_gri['both']) && empty($sel_gri['choose']) && empty($sel_gri['description']) && empty($sel_gri['name']) && empty($sel_gri['none'])) { $sel_gri['choose'] = ' selected="selected"'; }; $editsurvey .= "\t<li><label for=\"showgroupinfo\">".$clang->gT('Show question group name and/or description')."</label>\n" . "\t\t<select id=\"showgroupinfo\" name=\"showgroupinfo\">\n" . "\t\t\t<option value=\"both\"{$sel_gri['both']}>".$clang->gT('Show both')."</option>\n" . "\t\t\t<option value=\"name\"{$sel_gri['name']}>".$clang->gT('Show group name only')."</option>\n" . "\t\t\t<option value=\"description\"{$sel_gri['description']}>".$clang->gT('Show group description only')."</option>\n" . "\t\t\t<option value=\"none\"{$sel_gri['none']}>".$clang->gT('Hide both')."</option>\n" . "\t\t\t<option value=\"choose\"{$sel_gri['choose']}>".$clang->gT('Survey admin can choose')."</option>\n" . "\t\t</select></li>\n"; unset($set_gri,$sel_gri); // showqnumcode $set_qnc=getGlobalSetting('showqnumcode'); $sel_qnc = array( 'both' => '' , 'choose' =>'' , 'number' => '' , 'code' => '' , 'none' => '' ); $sel_qnc[$set_qnc] = ' selected="selected"'; if( empty($sel_qnc['both']) && empty($sel_qnc['choose']) && empty($sel_qnc['number']) && empty($sel_qnc['code']) && empty($sel_qnc['none'])) { $sel_qnc['choose'] = ' selected="selected"'; }; $editsurvey .= "\t<li><label for=\"showqnumcode\">".$clang->gT('Show question number and/or question code')."</label>\n" . "\t\t<select id=\"showqnumcode\" name=\"showqnumcode\">\n" . "\t\t\t<option value=\"both\"{$sel_qnc['both']}>".$clang->gT('Show both')."</option>\n" . "\t\t\t<option value=\"number\"{$sel_qnc['number']}>".$clang->gT('Show question number only')."</option>\n" . "\t\t\t<option value=\"code\"{$sel_qnc['code']}>".$clang->gT('Show question code only')."</option>\n" . "\t\t\t<option value=\"none\"{$sel_qnc['none']}>".$clang->gT('Hide both')."</option>\n" . "\t\t\t<option value=\"choose\"{$sel_qnc['choose']}>".$clang->gT('Survey admin can choose')."</option>\n" . "\t\t</select></li>\n"; unset($set_qnc,$sel_qnc); $editsurvey .= "\t</ul>\n"; // End TAB page & form $editsurvey .= "\t</div><input type='hidden' name='action' value='globalsettingssave'/></form>\n"; // End tabs $editsurvey .= "</div>\n"; // The external button to sumbit Survey edit changes $editsurvey .= "\t<p><input type='button' onclick='$(\"#frmglobalsettings\").submit();' class='standardbtn' value='".$clang->gT("Save settings")."' /><br /></p>\n"; if ($demoModeOnly==true) { $editsurvey .= '<p>'.$clang->gT("Note: Demo mode is activated. Marked (*) settings can't be changed.").'</p>\n'; } } else { include("access_denied.php"); } } }
function globalsettingsdisplay() { global $action, $connect, $js_admin_includes, $editsurvey, $subaction, $scriptname, $clang; global $updateversion, $updatebuild, $updateavailable, $updatelastcheck, $demoModeOnly; if (isset($subaction) && $subaction == "updatecheck") { $updateinfo = updatecheck(); } if (isset($action) && $action == "globalsettings") { if ($_SESSION['USER_RIGHT_SUPERADMIN'] == 1) { $js_admin_includes[] = 'scripts/globalsettings.js'; // header $editsurvey = "<div class='header'>" . $clang->gT("Global settings") . "</div>\n"; // beginning TABs section $editsurvey .= "\t<div class='tab-pane' id='tab-pane-globalsettings'>\n"; $editsurvey .= "<form id='frmglobalsettings' name='frmglobalsettings' action='{$scriptname}' method='post'>\n"; $editsurvey .= "\t<div class='tab-page'> <h2 class='tab'>" . $clang->gT("Overview & Update") . "</h2>\n"; $editsurvey .= checksettings(); $thisupdatecheckperiod = getGlobalSetting('updatecheckperiod'); $editsurvey .= "<br /></p><div class='header'>" . $clang->gT("Updates") . "</div><ul>" . "\t<li><label for='updatecheckperiod'>" . $clang->gT("Check for updates:") . "</label>\n" . "\t\t\t<select name='updatecheckperiod' id='updatecheckperiod'>\n" . "\t\t\t\t<option value='0'"; if ($thisupdatecheckperiod == 0) { $editsurvey .= " selected='selected'"; } $editsurvey .= ">" . $clang->gT("Never") . "</option>\n" . "\t\t\t\t<option value='1'"; if ($thisupdatecheckperiod == 1) { $editsurvey .= " selected='selected'"; } $editsurvey .= ">" . $clang->gT("Every day") . "</option>\n" . "\t\t\t\t<option value='7'"; if ($thisupdatecheckperiod == 7) { $editsurvey .= " selected='selected'"; } $editsurvey .= ">" . $clang->gT("Every week") . "</option>\n" . "<option value='14'"; if ($thisupdatecheckperiod == 14) { $editsurvey .= " selected='selected'"; } $editsurvey .= ">" . $clang->gT("Every 2 weeks") . "</option>\n" . "<option value='30'"; if ($thisupdatecheckperiod == 30) { $editsurvey .= " selected='selected'"; } $editsurvey .= ">" . $clang->gT("Every month") . "</option>\n" . "</select> <input type='button' onclick=\"window.open('{$scriptname}?action=globalsettings&subaction=updatecheck', '_top')\" value='" . $clang->gT("Check now") . "' /> <span id='lastupdatecheck'>" . sprintf($clang->gT("Last check: %s"), $updatelastcheck) . "</span></li></ul><p>\n"; if (isset($updateavailable) && $updateavailable == 1) { $editsurvey .= '<span style="font-weight: bold;">' . sprintf($clang->gT('There is a LimeSurvey update available: Version %s'), $updateversion . "({$updatebuild})") . '</span><br />'; $editsurvey .= sprintf($clang->gT('You can update %smanually%s or use the %s'), "<a href='http://docs.limesurvey.org/tiki-index.php?page=Upgrading+from+a+previous+version'>", "</a>", "<a href='{$scriptname}?action=update'>" . $clang->gT('3-Click ComfortUpdate') . '</a>') . '.<br />'; } elseif (isset($updateinfo['errorcode'])) { $editsurvey .= sprintf($clang->gT('There was an error on update check (%s)'), $updateinfo['errorcode']) . '.<br />'; $editsurvey .= "<textarea readonly='readonly' style='width:35%; height:60px; overflow: auto;'>" . strip_tags($updateinfo['errorhtml']) . '</textarea>'; } else { $editsurvey .= $clang->gT('There is currently no newer LimeSurvey version available.'); } $editsurvey .= "</p></div>"; // General TAB $editsurvey .= "\t<div class='tab-page'> <h2 class='tab'>" . $clang->gT("General") . "</h2>\n"; // Administrator... $editsurvey .= "<ul>" . "\t<li><label for='sitename'>" . $clang->gT("Site name:") . ($demoModeOnly == true ? '*' : '') . "</label>\n" . "\t\t<input type='text' size='50' id='sitename' name='sitename' value=\"" . htmlspecialchars(getGlobalSetting('sitename')) . "\" /></li>\n" . "\t<li><label for='defaultlang'>" . $clang->gT("Default site language:") . ($demoModeOnly == true ? '*' : '') . "</label>\n" . "\t\t<select name='defaultlang' id='defaultlang'>\n"; $actuallang = getGlobalSetting('defaultlang'); foreach (getLanguageData(true) as $langkey2 => $langname) { $editsurvey .= "\t\t\t<option value='" . $langkey2 . "'"; if ($actuallang == $langkey2) { $editsurvey .= " selected='selected'"; } $editsurvey .= ">" . $langname['nativedescription'] . " - " . $langname['description'] . "</option>\n"; } $editsurvey .= "\t\t</select></li>"; $thisdefaulttemplate = getGlobalSetting('defaulttemplate'); $templatenames = array_keys(gettemplatelist()); $editsurvey .= "" . "\t<li><label for='defaulttemplate'>" . $clang->gT("Default template:") . "</label>\n" . "\t\t\t<select name='defaulttemplate' id='defaulttemplate'>\n"; foreach ($templatenames as $templatename) { $editsurvey .= "\t\t\t\t<option value='{$templatename}'"; if ($thisdefaulttemplate == $templatename) { $editsurvey .= " selected='selected'"; } $editsurvey .= ">{$templatename}</option>\n"; } $editsurvey .= "\t\t\t</select></li>\n"; $thisdefaulthtmleditormode = getGlobalSetting('defaulthtmleditormode'); $editsurvey .= "" . "\t<li><label for='defaulthtmleditormode'>" . $clang->gT("Default HTML editor mode:") . ($demoModeOnly == true ? '*' : '') . "</label>\n" . "\t\t\t<select name='defaulthtmleditormode' id='defaulthtmleditormode'>\n" . "\t\t\t\t<option value='default'"; if ($thisdefaulthtmleditormode == 'default') { $editsurvey .= " selected='selected'"; } $editsurvey .= ">" . $clang->gT("Default HTML editor mode") . "</option>\n" . "\t\t\t\t<option value='none'"; if ($thisdefaulthtmleditormode == 'none') { $editsurvey .= " selected='selected'"; } $editsurvey .= ">" . $clang->gT("No HTML editor") . "</option>\n" . "<option value='inline'"; if ($thisdefaulthtmleditormode == 'inline') { $editsurvey .= " selected='selected'"; } $editsurvey .= ">" . $clang->gT("Inline HTML editor") . "</option>\n" . "<option value='popup'"; if ($thisdefaulthtmleditormode == 'popup') { $editsurvey .= " selected='selected'"; } $editsurvey .= ">" . $clang->gT("Popup HTML editor") . "</option>\n" . "</select></li>\n"; $dateformatdata = getDateFormatData($_SESSION['dateformat']); $editsurvey .= "\t<li><label for='timeadjust'>" . $clang->gT("Time difference (in hours):") . "</label>\n" . "\t\t<input type='text' size='10' id='timeadjust' name='timeadjust' value=\"" . htmlspecialchars(str_replace(array('+', ' hours'), array('', ''), getGlobalSetting('timeadjust'))) . "\" /> " . $clang->gT("Server time:") . ' ' . convertDateTimeFormat(date('Y-m-d H:i:s'), 'Y-m-d H:i:s', $dateformatdata['phpdate'] . ' H:i') . " - " . $clang->gT("Corrected time :") . ' ' . convertDateTimeFormat(date_shift(date("Y-m-d H:i:s"), 'Y-m-d H:i:s', getGlobalSetting('timeadjust')), 'Y-m-d H:i:s', $dateformatdata['phpdate'] . ' H:i') . "\r\n </li>\n"; $thisusepdfexport = getGlobalSetting('usepdfexport'); $editsurvey .= "\t<li><label for='usepdfexport'>" . $clang->gT("PDF export available:") . "</label>\n" . "<select name='usepdfexport' id='usepdfexport'>\n" . "<option value='1'"; if ($thisusepdfexport == true) { $editsurvey .= " selected='selected'"; } $editsurvey .= ">" . $clang->gT("On") . "</option>\n" . "<option value='0'"; if ($thisusepdfexport == false) { $editsurvey .= " selected='selected'"; } $editsurvey .= ">" . $clang->gT("Off") . "</option>\n" . "\t\t</select>\n\t</li>\n"; $thisaddTitleToLinks = getGlobalSetting('addTitleToLinks'); $editsurvey .= "\t<li><label for='addTitleToLinks'>" . $clang->gT("Screen reader compatibility mode:") . "</label>\n" . "<select name='addTitleToLinks' id='addTitleToLinks'>\n" . "<option value='1'"; if ($thisaddTitleToLinks == true) { $editsurvey .= " selected='selected'"; } $editsurvey .= ">" . $clang->gT("On") . "</option>\n" . "<option value='0'"; if ($thisaddTitleToLinks == false) { $editsurvey .= " selected='selected'"; } $editsurvey .= ">" . $clang->gT("Off") . "</option>\n" . "</select>\n</li>\n" . "<li><label for='sessionlifetime'>" . $clang->gT("Session lifetime (seconds):") . "</label>\n" . "<input type='text' size='10' id='sessionlifetime' name='sessionlifetime' value=\"" . htmlspecialchars(getGlobalSetting('sessionlifetime')) . "\" /></li>"; // End General TAB $editsurvey .= "\t</ul></div>\n"; // Email TAB $editsurvey .= "\t<div class='tab-page'> <h2 class='tab'>" . $clang->gT("Email settings") . "</h2><ul>\n"; //Format $editsurvey .= "\t<li><label for='siteadminemail'>" . $clang->gT("Default site admin email:") . "</label>\n" . "\t\t<input type='text' size='50' id='siteadminemail' name='siteadminemail' value=\"" . htmlspecialchars(getGlobalSetting('siteadminemail')) . "\" /></li>\n" . "\t<li><label for='siteadminbounce'>" . $clang->gT("Default site bounce email:") . "</label>\n" . "\t\t<input type='text' size='50' id='siteadminbounce' name='siteadminbounce' value=\"" . htmlspecialchars(getGlobalSetting('siteadminbounce')) . "\" /></li>\n" . "\t<li><label for='siteadminname'>" . $clang->gT("Administrator name:") . "</label>\n" . "\t\t<input type='text' size='50' id='siteadminname' name='siteadminname' value=\"" . htmlspecialchars(getGlobalSetting('siteadminname')) . "\" /><br /><br /></li>\n" . "\t<li><label for='emailmethod'>" . $clang->gT("Email method:") . "</label>\n" . "\t\t<select id='emailmethod' name='emailmethod'>\n" . "\t\t\t<option value='mail'"; if (getGlobalSetting('emailmethod') == 'mail') { $editsurvey .= " selected='selected'"; } $editsurvey .= ">" . $clang->gT("PHP (default)") . "</option>\n" . "\t\t\t<option value='smtp'"; if (getGlobalSetting('emailmethod') == 'smtp') { $editsurvey .= " selected='selected'"; } $editsurvey .= ">" . $clang->gT("SMTP") . "</option>\n" . "\t\t\t<option value='sendmail'"; if (getGlobalSetting('emailmethod') == 'sendmail') { $editsurvey .= " selected='selected'"; } $editsurvey .= ">" . $clang->gT("Sendmail") . "</option>\n" . "\t\t\t<option value='qmail'"; if (getGlobalSetting('emailmethod') == 'qmail') { $editsurvey .= " selected='selected'"; } $editsurvey .= ">" . $clang->gT("Qmail") . "</option>\n" . "\t\t</select></li>\n" . "\t<li><label for='emailsmtphost'>" . $clang->gT("SMTP host:") . "</label>\n" . "\t\t<input type='text' size='50' id='emailsmtphost' name='emailsmtphost' value=\"" . htmlspecialchars(getGlobalSetting('emailsmtphost')) . "\" /> <font size='1'>" . $clang->gT("Enter your hostname and port, e.g.: my.smtp.com:25") . "</font></li>\n" . "\t<li><label for='emailsmtpuser'>" . $clang->gT("SMTP username:"******"</label>\n" . "\t\t<input type='text' size='50' id='emailsmtpuser' name='emailsmtpuser' value=\"" . htmlspecialchars(getGlobalSetting('emailsmtpuser')) . "\" /></li>\n" . "\t<li><label for='emailsmtppassword'>" . $clang->gT("SMTP password:"******"</label>\n" . "\t\t<input type='password' size='50' id='emailsmtppassword' name='emailsmtppassword' value='somepassword' /></li>\n" . "\t<li><label for='emailsmtpssl'>" . $clang->gT("SMTP SSL/TLS:") . "</label>\n" . "\t\t<select id='emailsmtpssl' name='emailsmtpssl'>\n" . "\t\t\t<option value=''"; if (getGlobalSetting('emailsmtpssl') == '') { $editsurvey .= " selected='selected'"; } $editsurvey .= ">" . $clang->gT("Off") . "</option>\n" . "\t\t\t<option value='ssl'"; if (getGlobalSetting('emailsmtpssl') == 'ssl' || getGlobalSetting('emailsmtpssl') == 1) { $editsurvey .= " selected='selected'"; } $editsurvey .= ">" . $clang->gT("SSL") . "</option>\n" . "\t\t\t<option value='tls'"; if (getGlobalSetting('emailsmtpssl') == 'tls') { $editsurvey .= " selected='selected'"; } $editsurvey .= ">" . $clang->gT("TLS") . "</option>\n" . "\t\t</select></li>\n" . "\t<li><label for='emailsmtpdebug'>" . $clang->gT("SMTP debug mode:") . "</label>\n" . "\t\t<select id='emailsmtpdebug' name='emailsmtpdebug'>\n" . "\t\t\t<option value=''"; if (getGlobalSetting('emailsmtpdebug') == '0') { $editsurvey .= " selected='selected'"; } $editsurvey .= ">" . $clang->gT("Off") . "</option>\n" . "\t\t\t<option value='1'"; if (getGlobalSetting('emailsmtpdebug') == '1' || getGlobalSetting('emailsmtpssl') == 1) { $editsurvey .= " selected='selected'"; } $editsurvey .= ">" . $clang->gT("On errors") . "</option>\n" . "\t\t\t<option value='2'"; if (getGlobalSetting('emailsmtpdebug') == '2' || getGlobalSetting('emailsmtpssl') == 1) { $editsurvey .= " selected='selected'"; } $editsurvey .= ">" . $clang->gT("Always") . "</option>\n" . "\t\t</select><br /> </li>\n" . "\t<li><label for='maxemails'>" . $clang->gT("Email batch size:") . "</label>\n" . "\t\t<input type='text' size='5' id='maxemails' name='maxemails' value=\"" . htmlspecialchars(getGlobalSetting('maxemails')) . "\" /></li>\n" . "\t</ul>\n"; // End Email TAB $editsurvey .= "\t</div>\n"; // Security Settings $editsurvey .= "\t<div class='tab-page'> <h2 class='tab'>" . $clang->gT("Security") . "</h2><ul>\n"; // Expiration $thissurveyPreview_require_Auth = getGlobalSetting('surveyPreview_require_Auth'); $editsurvey .= "\t<li><label for='surveyPreview_require_Auth'>" . $clang->gT("Survey preview only for administration users") . "</label>\n" . "\t\t<select id='surveyPreview_require_Auth' name='surveyPreview_require_Auth'>\n" . "\t\t\t<option value='1'"; if ($thissurveyPreview_require_Auth == true) { $editsurvey .= " selected='selected'"; } $editsurvey .= ">" . $clang->gT("Yes") . "</option>\n" . "\t\t\t<option value='0'"; if ($thissurveyPreview_require_Auth == false) { $editsurvey .= " selected='selected'"; } $editsurvey .= ">" . $clang->gT("No") . "</option>\n" . "\t\t</select></li>\n"; // Auto registration $thisfilterxsshtml = getGlobalSetting('filterxsshtml'); $editsurvey .= "\t<li><label for='filterxsshtml'>" . $clang->gT("Filter HTML for XSS:") . ($demoModeOnly == true ? '*' : '') . "</label>\n" . "\t\t<select id='filterxsshtml' name='filterxsshtml'>\n" . "\t\t\t<option value='1'"; if ($thisfilterxsshtml == true) { $editsurvey .= " selected='selected'"; } $editsurvey .= ">" . $clang->gT("Yes") . "</option>\n" . "\t\t\t<option value='0'"; if ($thisfilterxsshtml == false) { $editsurvey .= " selected='selected'"; } $editsurvey .= ">" . $clang->gT("No") . "</option>\n" . "\t\t</select></li>\n"; $thisusercontrolSameGroupPolicy = getGlobalSetting('usercontrolSameGroupPolicy'); $editsurvey .= "\t<li><label for='usercontrolSameGroupPolicy'>" . $clang->gT("Group member can only see own group:") . "</label>\n" . "\t\t<select id='usercontrolSameGroupPolicy' name='usercontrolSameGroupPolicy'>\n" . "\t\t\t<option value='1'"; if ($thisusercontrolSameGroupPolicy == true) { $editsurvey .= " selected='selected'"; } $editsurvey .= ">" . $clang->gT("Yes") . "</option>\n" . "\t\t\t<option value='0'"; if ($thisusercontrolSameGroupPolicy == false) { $editsurvey .= " selected='selected'"; } $editsurvey .= ">" . $clang->gT("No") . "</option>\n" . "\t\t</select></li>\n"; $editsurvey .= "\t</ul></div>\n"; // Miscellaneous Settings $editsurvey .= "\t<div class='tab-page'> <h2 class='tab'>" . $clang->gT("Miscellaneous") . "</h2><ul>\n"; // shownoanswer $shownoanswer = getGlobalSetting('shownoanswer'); $editsurvey .= "\t<li><label for='shownoanswer'>" . $clang->gT("Show 'no answer' option for non-mandatory questions:") . "</label>\n" . "\t\t<select id='shownoanswer' name='shownoanswer'>\n" . "\t\t\t<option value='1'"; if ($shownoanswer == 1) { $editsurvey .= " selected='selected'"; } $editsurvey .= ">" . $clang->gT("Yes") . "</option>\n" . "\t\t\t<option value='0'"; if ($shownoanswer == 0) { $editsurvey .= " selected='selected'"; } $editsurvey .= ">" . $clang->gT("No") . "</option>\n" . "\t\t</select></li>\n"; $thisrepeatheadings = getGlobalSetting('repeatheadings'); $editsurvey .= "\t<li><label for='repeatheadings'>" . $clang->gT("Number of answers to show before repeating the headings in array questions:") . "</label>\n" . "\t\t<input id='repeatheadings' name='repeatheadings' value='{$thisrepeatheadings}' size='4' maxlength='4' /></li>\n"; $editsurvey .= "\t</ul>\n"; // End TAB page & form $editsurvey .= "\t</div><input type='hidden' name='action' value='globalsettingssave'/></form>\n"; // End tabs $editsurvey .= "</div>\n"; // The external button to sumbit Survey edit changes $editsurvey .= "\t<p><input type='button' onclick='\$(\"#frmglobalsettings\").submit();' class='standardbtn' value='" . $clang->gT("Save settings") . "' /><br /></p>\n"; if ($demoModeOnly == true) { $editsurvey .= '<p>' . $clang->gT("Note: Demo mode is activated. Marked (*) settings can't be changed.") . '</p>\\n'; } } else { include "access_denied.php"; } } }