2006-12-02 04:36:16 +00:00
< ? php
/*
2008-12-17 17:27:07 +00:00
* e107 website system
*
2013-03-24 19:44:14 +01:00
* Copyright ( C ) 2008 - 2013 e107 Inc ( e107 . org )
2008-12-17 17:27:07 +00:00
* Released under the terms and conditions of the
* GNU General Public License ( http :// www . gnu . org / licenses / gpl . txt )
*
* Administration - Site Preferences
*
2010-09-06 12:34:06 +00:00
*/
2017-01-17 01:33:03 +01:00
2017-03-02 12:51:03 -08:00
if ( ! empty ( $_POST ) && ! isset ( $_POST [ 'e-token' ]))
{
$_POST [ 'e-token' ] = '' ;
}
2021-01-16 13:32:35 -08:00
require_once ( __DIR__ . " /../class2.php " );
2006-12-02 04:36:16 +00:00
2008-12-17 17:27:07 +00:00
if ( isset ( $_POST [ 'newver' ]))
2008-08-17 15:18:14 +00:00
{
2020-12-22 14:48:28 -08:00
e107 :: redirect ( " https://e107.org/index.php " );
2008-12-17 17:27:07 +00:00
exit ();
2006-12-02 04:36:16 +00:00
}
2017-01-17 01:33:03 +01:00
if ( ! getperms ( " 1 " ))
2008-08-17 15:18:14 +00:00
{
2016-01-13 19:17:37 -08:00
e107 :: redirect ( 'admin' );
2008-12-17 17:27:07 +00:00
exit ();
2006-12-02 04:36:16 +00:00
}
2008-12-17 17:27:07 +00:00
2017-01-17 01:33:03 +01:00
e107 :: coreLan ( 'prefs' , true );
2012-12-10 16:01:44 -08:00
2017-01-17 01:33:03 +01:00
$e_sub_cat = 'prefs' ;
//e107::lan('core','mailout','admin');
e107 :: coreLan ( 'mailout' , true );
2012-06-17 10:27:09 +00:00
2010-04-19 13:31:47 +00:00
require_once ( e_ADMIN . " auth.php " );
$e_userclass = e107 :: getUserClass ();
2016-04-08 09:01:10 -07:00
require_once ( e_HANDLER . 'mailout_admin_class.php' ); // Admin tasks handler
2021-02-15 10:58:49 -08:00
$ue = e107 :: getUserExt ();
2010-04-19 13:31:47 +00:00
$core_pref = e107 :: getConfig ();
2009-08-28 16:11:02 +00:00
2010-04-19 13:31:47 +00:00
if ( ! $core_pref -> get ( 'timezone' ))
2008-08-17 15:18:14 +00:00
{
2015-08-26 13:35:37 -07:00
$core_pref -> set ( 'timezone' , 'UTC' );
2006-12-02 04:36:16 +00:00
}
2010-04-19 13:31:47 +00:00
$frm = e107 :: getForm ( false , true ); //enable inner tabindex counter
2013-02-26 16:36:25 +01:00
$mes = e107 :: getMessage ();
2010-04-19 13:31:47 +00:00
$tp = e107 :: getParser ();
2006-12-02 04:36:16 +00:00
2008-12-17 17:27:07 +00:00
/* RESET DISPLAY NAMES */
2009-12-19 17:54:00 +00:00
if ( isset ( $_POST [ 'submit_resetdisplaynames' ]))
2006-12-02 04:36:16 +00:00
{
2018-07-11 15:54:51 +02:00
e107 :: getDb () -> update ( 'user' , 'user_name=user_loginname' );
2013-02-26 16:36:25 +01:00
$mes -> addInfo ( PRFLAN_157 );
2006-12-02 04:36:16 +00:00
}
2010-04-19 13:31:47 +00:00
//echo '<pre>';
//var_dump($core_pref->getPref());
//echo '</pre>';
2012-12-10 16:01:44 -08:00
if ( isset ( $_POST [ 'testemail' ]))
{
sendTest ();
}
2008-12-17 17:27:07 +00:00
/* UPDATE PREFERENCES */
if ( isset ( $_POST [ 'updateprefs' ]))
2006-12-02 04:36:16 +00:00
{
2012-06-13 12:34:09 +00:00
2008-12-17 17:27:07 +00:00
unset ( $_POST [ 'updateprefs' ], $_POST [ 'sitelanguage' ]);
2012-06-13 12:34:09 +00:00
2012-06-14 04:11:52 +00:00
2006-12-02 04:36:16 +00:00
2008-12-17 17:27:07 +00:00
$_POST [ 'cookie_name' ] = str_replace ( array ( " " , " . " ), " _ " , $_POST [ 'cookie_name' ]);
2006-12-02 04:36:16 +00:00
$_POST [ 'cookie_name' ] = preg_replace ( " #[^a-zA-Z0-9_]# " , " " , $_POST [ 'cookie_name' ]);
2008-12-17 17:27:07 +00:00
$_POST [ 'siteurl' ] = trim ( $_POST [ 'siteurl' ]) ? trim ( $_POST [ 'siteurl' ]) : SITEURL ;
$_POST [ 'siteurl' ] = substr ( $_POST [ 'siteurl' ], - 1 ) == " / " ? $_POST [ 'siteurl' ] : $_POST [ 'siteurl' ] . " / " ;
2006-12-02 04:36:16 +00:00
2009-07-18 10:17:56 +00:00
// If email verification or Email/Password Login Method - email address is required!
2009-10-06 18:58:08 +00:00
if (( $_POST [ 'user_reg_veri' ] == 1 || $_POST [ 'allowEmailLogin' ] == 1 ) && $_POST [ 'disable_emailcheck' ])
2009-03-06 20:09:08 +00:00
{
2008-12-17 17:27:07 +00:00
$_POST [ 'disable_emailcheck' ] = 0 ;
2013-02-26 16:36:25 +01:00
$mes -> addError ( PRFLAN_211 );
2009-03-06 20:09:08 +00:00
}
2007-02-16 01:13:19 +00:00
2017-03-21 12:29:05 -07:00
if ( ! empty ( $_POST [ 'passwordEncoding' ]) || ! empty ( $_POST [ 'ssl_enabled' ]))
{
$_POST [ 'password_CHAP' ] = 0 ; // disable chap unless using md5 without SSL.
}
2008-12-17 17:27:07 +00:00
// Table of range checking values - min and max for numerics. Only do the important ones
2009-03-06 20:09:08 +00:00
$pref_limits = array ( 'loginname_maxlength' => array ( 'min' => 10 , 'max' => 100 , 'default' => 30 ),
2011-09-16 11:35:22 +00:00
'displayname_maxlength' => array ( 'min' => 5 , 'max' => 100 , 'default' => 15 ),
2009-03-02 21:55:39 +00:00
'antiflood_timeout' => array ( 'min' => 3 , 'max' => 300 , 'default' => 10 ),
'signup_pass_len' => array ( 'min' => 2 , 'max' => 100 , 'default' => 4 )
);
2007-09-18 21:10:16 +00:00
2008-12-31 17:08:14 +00:00
$pref [ 'post_html' ] = intval ( $_POST [ 'post_html' ]); // This ensures the setting is reflected in set text
2015-03-13 13:57:09 -07:00
$smtp_opts = array ();
if ( ! empty ( $_POST [ 'smtp_options' ]))
{
switch ( trim ( $_POST [ 'smtp_options' ]))
{
case 'smtp_ssl' :
$smtp_opts [] = 'secure=SSL' ;
break ;
case 'smtp_tls' :
$smtp_opts [] = 'secure=TLS' ;
break ;
case 'smtp_pop3auth' :
$smtp_opts [] = 'pop3auth' ;
break ;
}
if ( ! empty ( $_POST [ 'smtp_keepalive' ]))
{
$smtp_opts [] = 'keepalive' ;
}
if ( ! empty ( $_POST [ 'smtp_useVERP' ]))
{
$smtp_opts [] = 'useVERP' ;
}
$_POST [ 'smtp_options' ] = implode ( ',' , $smtp_opts );
unset ( $_POST [ 'smtp_keepalive' ], $_POST [ 'smtp_useVERP' ]);
// e107::getMessage()->addDebug(print_a($_POST['smtp_options'],true));
}
2009-08-20 11:38:24 +00:00
$_POST [ 'membersonly_exceptions' ] = explode ( " \n " , $_POST [ 'membersonly_exceptions' ]);
2008-12-31 17:08:14 +00:00
2010-04-19 13:31:47 +00:00
// FIXME - automate - pref model & validation handler
2008-08-17 15:18:14 +00:00
$prefChanges = array ();
2010-10-27 11:31:18 +00:00
$sessionRegenerate = false ;
2006-12-02 04:36:16 +00:00
foreach ( $_POST as $key => $value )
{
2008-12-17 17:27:07 +00:00
if ( isset ( $pref_limits [ $key ]))
{ // Its a numeric value to check
if ( is_numeric ( $value ))
{
if ( $value < $pref_limits [ $key ][ 'min' ])
2009-10-06 18:58:08 +00:00
{
2008-12-17 17:27:07 +00:00
$value = $pref_limits [ $key ][ 'min' ];
2017-11-06 22:29:19 -08:00
$mes -> addWarning ( str_replace ( array ( '[x]' , '[y]' ), array ( $key , $value ), PRFLAN_213 ));
2009-10-06 18:58:08 +00:00
}
2008-12-17 17:27:07 +00:00
if ( $value > $pref_limits [ $key ][ 'max' ])
2009-10-06 18:58:08 +00:00
{
2008-12-17 17:27:07 +00:00
$value = $pref_limits [ $key ][ 'max' ];
2017-11-06 22:29:19 -08:00
$mes -> addWarning ( str_replace ( array ( '[x]' , '[y]' ), array ( $key , $value ), PRFLAN_212 ));
2009-10-06 18:58:08 +00:00
}
2008-12-17 17:27:07 +00:00
}
else
{
$value = $pref_limits [ $key ][ 'default' ];
}
$newValue = $value ;
2007-09-18 21:10:16 +00:00
}
2010-10-27 11:31:18 +00:00
elseif ( 'cookie_name' == $key && $core_pref -> get ( $key ) != $value )
{
// special case
if ( ! preg_match ( '/^[\w\-]+$/' , $value ))
{
$newValue = e_COOKIE ;
2013-02-26 16:36:25 +01:00
$mes -> addWarning ( PRFLAN_219 );
2010-10-27 11:31:18 +00:00
}
else
{
$newValue = $value ;
$sessionRegenerate = true ;
}
}
2007-09-18 21:10:16 +00:00
else
{
2008-12-17 17:27:07 +00:00
$newValue = $tp -> toDB ( $value );
}
2012-06-14 04:11:52 +00:00
2010-04-19 13:31:47 +00:00
$core_pref -> update ( $key , $newValue );
2006-12-02 04:36:16 +00:00
}
2017-01-26 12:45:45 +01:00
2022-06-29 11:55:51 -07:00
$hasChanged = $core_pref -> dataHasChanged ();
if ( $hasChanged )
2017-01-26 12:45:45 +01:00
{
// Need to clear cache in order to refresh library information.
e107 :: getCache () -> clearAll ( 'system' );
2022-06-29 11:55:51 -07:00
2017-01-26 12:45:45 +01:00
}
2010-04-19 13:31:47 +00:00
$core_pref -> save ( false );
2017-01-26 12:45:45 +01:00
2010-10-27 11:31:18 +00:00
// special case, do session cleanup, logout, redirect to login screen
if ( $sessionRegenerate )
2008-12-17 17:27:07 +00:00
{
2010-10-27 11:31:18 +00:00
// reset cookie
cookie ( $core_pref -> get ( 'cookie_name' ), $_COOKIE [ e_COOKIE ], ( time () + 3600 * 24 * 30 ), e_HTTP , e107 :: getLanguage () -> getCookieDomain ());
cookie ( e_COOKIE , null , null );
// regenerate session
$s = $_SESSION ;
e107 :: getSession () -> destroy ();
$session = new e_core_session ( array ( 'name' => $core_pref -> get ( 'cookie_name' )));
$_SESSION = $s ;
2008-01-16 10:52:34 +00:00
}
2022-06-29 11:55:51 -07:00
// build favicon files.
if ( ! empty ( $pref [ 'sitebutton' ]) && $hasChanged )
{
$iconSizes = [ 32 , 16 , 48 , 192 , 167 , 180 ];
$media = e107 :: getMedia ();
foreach ( $iconSizes as $size )
{
if ( $result = $media -> resizeImage ( $pref [ 'sitebutton' ], '{e_MEDIA_ICON}/favicon.png' , [ 'w' => $size , 'h' => $size , 'crop' => true , 'overwrite' => true ]))
{
e107 :: getMessage () -> addDebug ( " Created " . $result ); // NO LAN.
}
}
}
2006-12-02 04:36:16 +00:00
}
2015-02-07 13:38:29 -08:00
if ( e107 :: isInstalled ( 'alt_auth' ))
2006-12-02 04:36:16 +00:00
{
$authlist [] = " e107 " ;
2008-12-17 17:27:07 +00:00
$handle = opendir ( e_PLUGIN . " alt_auth " );
while ( $file = readdir ( $handle ))
2006-12-02 04:36:16 +00:00
{
2008-12-17 17:27:07 +00:00
if ( preg_match ( " /^(.*)_auth \ .php/ " , $file , $match ))
2006-12-02 04:36:16 +00:00
{
$authlist [] = $match [ 1 ];
}
}
}
2012-12-10 16:01:44 -08:00
function sendTest ()
{
2020-12-22 09:36:02 -08:00
$log = e107 :: getLog ();
2012-12-10 16:01:44 -08:00
$mes = e107 :: getMessage ();
if ( trim ( $_POST [ 'testaddress' ]) == '' )
{
$mes -> add ( LAN_MAILOUT_19 , E_MESSAGE_ERROR );
$subAction = 'error' ;
}
else
{
$mailheader_e107id = USERID ;
2021-02-04 08:45:10 -08:00
$pref = e107 :: pref ();
2015-02-13 18:55:57 -08:00
2016-04-08 09:34:08 -07:00
$add = ( $pref [ 'mailer' ]) ? " ( " . strtoupper ( $pref [ 'mailer' ]) . " ) " : ' (PHP)' ;
if ( $pref [ 'mailer' ] == 'smtp' )
{
$add .= " Port: " . varset ( $pref [ 'smtp_port' ], 25 );
$add .= " - " . str_replace ( " secure= " , " " , $pref [ 'smtp_options' ]);
}
2012-12-10 16:01:44 -08:00
$sendto = trim ( $_POST [ 'testaddress' ]);
2014-08-15 21:18:15 -07:00
$eml = array ();
2016-04-08 09:34:08 -07:00
$eml [ 'email_subject' ] = LAN_MAILOUT_113 . " " . $add ;
2014-08-15 21:18:15 -07:00
$eml [ 'email_sender_email' ] = null ;
$eml [ 'email_sender_name' ] = null ;
$eml [ 'email_replyto' ] = null ;
$eml [ 'email_replytonames' ] = null ;
$eml [ 'send_html' ] = true ;
$eml [ 'add_html_header' ] = null ;
$eml [ 'email_body' ] = str_replace ( " [br] " , " <br> " , LAN_MAILOUT_114 );
$eml [ 'email_attach' ] = null ;
$eml [ 'template' ] = 'default' ;
$eml [ 'e107_header' ] = USERID ;
if ( ! e107 :: getEmail () -> sendEmail ( $sendto , LAN_MAILOUT_189 , $eml ))
2012-12-10 16:01:44 -08:00
{
2013-02-26 16:36:25 +01:00
$mes -> addError (( $pref [ 'mailer' ] == 'smtp' ) ? LAN_MAILOUT_67 : LAN_MAILOUT_106 );
2012-12-10 16:01:44 -08:00
}
2014-08-15 21:18:15 -07:00
// if (!sendemail($sendto, LAN_MAILOUT_113." ".SITENAME.$add, str_replace("[br]", "\n", LAN_MAILOUT_114),LAN_MAILOUT_189))
// {
// $mes->addError(($pref['mailer'] == 'smtp') ? LAN_MAILOUT_67 : LAN_MAILOUT_106);
// }
2012-12-10 16:01:44 -08:00
else
{
2013-02-26 16:36:25 +01:00
$mes -> addSuccess ( LAN_MAILOUT_81 . ' (' . $sendto . ')' );
2021-02-04 08:45:10 -08:00
$log -> add ( 'MAIL_01' , $sendto );
2012-12-10 16:01:44 -08:00
}
}
}
2008-12-17 17:27:07 +00:00
/*
if ( e_QUERY == " u " )
{
2006-12-02 04:36:16 +00:00
$ns -> tablerender ( " " , " <div style='text-align:center'><b> " . PRFLAN_106 . " </b></div> " );
}
2008-12-17 17:27:07 +00:00
*/
2006-12-02 04:36:16 +00:00
$handle = opendir ( e_ADMIN . 'includes/' );
2008-12-17 17:27:07 +00:00
while ( $file = readdir ( $handle ))
{
if ( $file != " . " && $file != " .. " )
{
2006-12-02 04:36:16 +00:00
$file = str_replace ( " .php " , " " , $file );
$adminlist [] = $file ;
}
}
closedir ( $handle );
2009-08-20 11:38:24 +00:00
$pref [ 'membersonly_exceptions' ] = implode ( " \n " , $pref [ 'membersonly_exceptions' ]);
2008-12-17 17:27:07 +00:00
$text = "
2008-12-19 14:01:07 +00:00
< div id = 'core-prefs' >
2021-02-01 18:18:30 -08:00
< form method = 'post' action = '".e_SELF."' autocomplete = 'off' >
2021-01-16 13:32:35 -08:00
< input type = 'hidden' name = 'e-token' value = '".defset(' e_TOKEN ')."' />
2013-04-17 13:08:12 -07:00
< fieldset id = 'core-prefs-main' >
2021-02-15 10:58:49 -08:00
< h4 class = 'caption' > " .PRFLAN_53.SEP.PRFLAN_1. " </ h4 >
2012-11-26 14:41:32 -08:00
< table class = 'table adminform' >
2012-05-13 05:26:11 +00:00
< colgroup >
2008-12-17 17:27:07 +00:00
< col class = 'col-label' />
< col class = 'col-control' />
</ colgroup >
< tbody >
< tr >
2013-07-08 11:27:17 +02:00
< td >< label for = 'sitename' > " .PRFLAN_2. " </ label ></ td >
2012-11-26 14:41:32 -08:00
< td >
2014-02-18 10:44:42 -08:00
" . $frm->text ('sitename', $pref['sitename'] , 100, 'required=1&size=xxlarge'). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'siteurl' > " .PRFLAN_3. " </ label >
" .( $pref['siteurl'] == SITEURL ? " " : $frm->help (PRFLAN_159. " : < strong > " .SITEURL. " </ strong > " )). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2016-11-25 16:41:39 -08:00
" . $frm->text ('siteurl', $pref['siteurl'] , 150, 'size=xxlarge'). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'redirectsiteurl' > " .PRFLAN_134. " </ label > " . $frm->help (PRFLAN_135). " </ td >
2013-03-27 20:28:55 +01:00
< td > " ;
/*
2013-03-24 18:04:37 -07:00
" . $frm->radio ('redirectsiteurl', 1, $pref['redirectsiteurl'] , array('label'=>LAN_ENABLED)). "
" . $frm->radio ('redirectsiteurl', 0, ! $pref['redirectsiteurl'] , array('label'=>LAN_DISABLED)). "
2013-03-27 20:28:55 +01:00
*/
2021-02-12 12:19:58 -08:00
$text .= $frm -> radio_switch ( 'redirectsiteurl' , $pref [ 'redirectsiteurl' ]) . "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'sitebutton' > " .PRFLAN_4. " </ label > " . $frm->help (PRFLAN_225). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2008-12-17 17:27:07 +00:00
" ;
2012-12-10 16:01:44 -08:00
/*
2008-12-17 17:27:07 +00:00
$parms = " name=sitebutton " ;
$parms .= " &path= " . e_THEME . $pref [ 'sitetheme' ] . " /images/| " . e_IMAGE ;
$parms .= " &filter=0 " ;
$parms .= " &fullpath=1 " ;
$parms .= " &default= " . urlencode ( $pref [ 'sitebutton' ]);
//$parms .= "&width=128px";
//$parms .= "&height=128px";
$parms .= " &multiple=FALSE " ;
$parms .= " &label=-- No Image -- " ;
$parms .= " &subdirs=1 " ;
$parms .= " &tabindex= " . $frm -> getNext ();
2009-12-23 10:04:39 +00:00
2009-01-15 15:42:24 +00:00
$text .= " <div class='field-section'> " . $tp -> parseTemplate ( " { IMAGESELECTOR= { $parms } &scaction=select} " ) . " </div> " ;
2009-12-23 10:04:39 +00:00
// $text .= "<div class='field-section'>".$frm->imagepicker('sitebutton',$pref['sitebutton'],'-- No Image --')."</div>";
2010-03-06 23:49:08 +00:00
//TODO make the preview update when image-picker is used.
2009-01-15 15:42:24 +00:00
$text .= " <div class='field-spacer'> " . $tp -> parseTemplate ( " { IMAGESELECTOR= { $parms } &scaction=preview} " ) . " </div> " ;
2008-12-17 17:27:07 +00:00
2012-07-12 10:15:12 +00:00
$sLogo = siteinfo_shortcodes :: sc_logo ();
2012-12-10 16:01:44 -08:00
*/
2012-07-12 10:15:12 +00:00
2016-04-20 17:25:32 -07:00
if ( ! empty ( $pref [ 'sitebutton' ]) && strpos ( $pref [ 'sitebutton' ], '{' ) === false && file_exists ( e_IMAGE . $pref [ 'sitebutton' ]))
{
$pref [ 'sitebutton' ] = '{e_IMAGE}' . $pref [ 'sitebutton' ];
}
2018-08-26 13:54:25 -07:00
$text .= $frm -> imagepicker ( 'sitebutton' , $pref [ 'sitebutton' ], '' , 'w=200&help=' . PRFLAN_225 ); //todo use 'LegacyPath' option instead of code above.
2012-07-12 10:15:12 +00:00
2008-12-17 17:27:07 +00:00
$text .= "
</ td >
2011-12-28 15:52:13 +00:00
</ tr >
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'sitelogo' > " .PRFLAN_214. " </ label > " . $frm->help (PRFLAN_226). " </ td >
2016-06-01 18:36:16 -07:00
< td > " . $frm->imagepicker ('sitelogo', $pref['sitelogo'] ,'','w=200&help='.PRFLAN_226). " </ td >
2008-12-17 17:27:07 +00:00
</ tr >
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'sitetag' > " .PRFLAN_5. " </ label > " . $frm->help (PRFLAN_227). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2016-05-28 07:59:00 -07:00
" . $frm->textarea ('sitetag', $tp->toForm ( $pref['sitetag'] ), 3, 59, array('size'=>'xxlarge')). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'sitedescription' > " .PRFLAN_6. " </ label > " . $frm->help (PRFLAN_228). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2016-05-28 07:59:00 -07:00
" . $frm->textarea ('sitedescription', $tp->toForm ( $pref['sitedescription'] ), 3, 80, array('size'=>'xxlarge')). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
2012-12-10 16:01:44 -08:00
2008-12-17 17:27:07 +00:00
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'sitedisclaimer' > " .PRFLAN_9. " </ label > " . $frm->help (PRFLAN_229). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2016-05-28 07:59:00 -07:00
" . $frm->textarea ('sitedisclaimer', $tp->toForm ( $pref['sitedisclaimer'] ), 3, 80, array('size'=>'xxlarge')). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
2012-12-10 16:01:44 -08:00
</ tbody >
</ table >
" .pref_submit('main'). "
</ fieldset >
" ;
// Email and Contact Information --------------
$text .= " <fieldset class='e-hideme' id='core-prefs-email'>
2021-02-15 10:58:49 -08:00
< h4 class = 'caption' > " .PRFLAN_53.SEP.PRFLAN_13. " </ h4 >
2012-12-10 16:01:44 -08:00
< table class = 'table adminform' >
< colgroup >
< col class = 'col-label' />
< col class = 'col-control' />
</ colgroup >
< tbody >
< tr >
2013-07-08 11:27:17 +02:00
< td >< label for = 'siteadmin' > " .PRFLAN_7. " </ label ></ td >
2012-12-10 16:01:44 -08:00
< td >
2016-05-28 07:59:00 -07:00
" . $frm->text ('siteadmin', SITEADMIN, 100, array('size'=>'xlarge')). "
2012-12-10 16:01:44 -08:00
</ td >
</ tr >
2008-12-17 17:27:07 +00:00
< tr >
2013-07-08 11:27:17 +02:00
< td >< label for = 'siteadminemail' > " .PRFLAN_8. " </ label ></ td >
2012-11-26 14:41:32 -08:00
< td >
2016-05-28 07:59:00 -07:00
" . $frm->text ('siteadminemail', SITEADMINEMAIL, 100, array('size'=>'xlarge')). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'replyto-name' > " .PRFLAN_174. " </ label > " . $frm->help (PRFLAN_175). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2016-05-28 07:59:00 -07:00
" . $frm->text ('replyto_name', $pref['replyto_name'] , 100, array('size'=>'xlarge')). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'replyto-email' > " .PRFLAN_176. " </ label > " . $frm->help (PRFLAN_177). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2016-05-28 07:59:00 -07:00
" . $frm->text ('replyto_email', $pref['replyto_email'] , 100, array('size'=>'xlarge')). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
2012-12-10 16:01:44 -08:00
< tr >
2013-07-08 11:27:17 +02:00
< td >< label for = 'testaddress' > " .LAN_MAILOUT_110. " </ label >< br /></ td >
2013-04-25 17:29:46 -07:00
< td class = 'form-inline' > " . $frm->admin_button ('testemail', LAN_MAILOUT_112,'other'). " & nbsp ;
2017-01-31 16:39:00 -08:00
< input name = 'testaddress' id = 'testaddress' class = 'tbox form-control input-xxlarge' placeholder = 'user@yoursite.com' type = 'text' size = '40' maxlength = '80' value = \ " " . ( varset ( $_POST [ 'testaddress' ]) ? $_POST [ 'testaddress' ] : USEREMAIL ) . " \" />
2012-12-10 16:01:44 -08:00
</ td >
</ tr >
< tr >
2016-04-14 14:59:32 -07:00
< td style = 'vertical-align:top' >< label for = 'mailer' > " .PRFLAN_267. " </ label >< br /></ td >
2016-04-08 09:01:10 -07:00
< td > " ;
2015-03-13 13:57:09 -07:00
2015-02-13 18:55:57 -08:00
2016-04-08 09:01:10 -07:00
$text .= mailoutAdminClass :: mailerPrefsTable ( $pref );
2012-12-10 16:01:44 -08:00
2015-03-13 13:57:09 -07:00
2012-12-10 16:01:44 -08:00
$text .= " </td>
</ tr >
< tr >
2013-07-08 11:27:17 +02:00
< td >< label for = 'mail-sendstyle' > " .LAN_MAILOUT_222. " </ label ></ td >
2012-12-10 16:01:44 -08:00
< td > " ;
$emFormat = array (
'textonly' => LAN_MAILOUT_125 ,
'texthtml' => LAN_MAILOUT_126 ,
'texttheme' => LAN_MAILOUT_127
);
2013-04-25 17:29:46 -07:00
$text .= $frm -> select ( 'mail_sendstyle' , $emFormat , vartrue ( $pref [ 'mail_sendstyle' ]));
2012-12-10 17:38:52 -08:00
$text .= "
2012-12-10 16:01:44 -08:00
</ td >
</ tr >
2008-12-17 17:27:07 +00:00
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'sitecontactinfo' > " .PRFLAN_162. " </ label > " . $frm->help (PRFLAN_163). " </ td >
2021-02-15 10:58:49 -08:00
< td > " ;
if ( ! empty ( $pref [ 'sitecontactinfo' ]))
{
$text .= $frm -> textarea ( 'sitecontactinfo' , $pref [ 'sitecontactinfo' ], 6 , 59 , array ( 'size' => 'xxlarge' ));
}
else
{
$text .= " <table class='table table-bordered table-striped' style='margin:0; max-width:690px'>
< colgroup >
< col style = 'width:150px' />
< col />
</ colgroup >
< tr > " ;
2021-02-16 09:22:12 -08:00
$text .= " <td>Organization</td>
< td > " . $frm->text ('contact_info[organization]', varset( $pref['contact_info'] ['organization']), 200, ['size'=>'block-level', 'placeholder'=>'eg. My Company Inc.']). " </ td >
2021-02-15 10:58:49 -08:00
</ tr > " ;
$text .= " <td>Address</td>
2021-02-16 09:22:12 -08:00
< td > " . $frm->textarea ('contact_info[address]', varset( $pref['contact_info'] ['address']), 2, 80, ['size'=>'block-level', 'placeholder'=> " eg . 123 Address St . \nCity , State , Zip / postal\nCountry " ]). " </ td >
2021-02-15 10:58:49 -08:00
</ tr > " ;
2021-02-16 09:22:12 -08:00
2021-02-15 10:58:49 -08:00
$contactFields = [
'phone1' => [ 'label' => 'Phone' , 'placeholder' => '+1-555-555-5555' ],
'phone2' => [ 'label' => 'Phone' , 'placeholder' => '+1-444-444-4444' ],
'phone3' => [ 'label' => 'Phone' , 'placeholder' => '+1-333-333-3333' ],
'fax' => [ 'label' => 'Fax' , 'placeholder' => '+1-555-555-5555' ],
2021-02-16 09:22:12 -08:00
'email1' => [ 'label' => LAN_EMAIL , 'placeholder' => 'info@myorganization.com' ],
'email2' => [ 'label' => LAN_EMAIL , 'placeholder' => 'sales@myorganization.com' ],
'coordinates' => [ 'label' => " Map Coordinates " , 'placeholder' => 'eg. 36.169941,-115.139832 or leave blank to use address' ],
2021-02-15 10:58:49 -08:00
];
foreach ( $contactFields as $type => $var )
{
$text .= " <td> " . $var [ 'label' ] . " </td>
< td > " . $frm->text ('contact_info['. $type .']', varset( $pref['contact_info'] [ $type ]), 200, ['size'=>'block-level', 'placeholder'=>varset( $var['placeholder'] )]). " </ td >
</ tr >
" ;
}
2021-02-16 09:22:12 -08:00
$text .= " <td>Hours</td>
< td > " . $frm->textarea ('contact_info[hours]', varset( $pref['contact_info'] ['hours']), 2, 80, ['size'=>'block-level', 'placeholder'=> " eg . Mon - Fri ( 9 am - 5 pm ) \nSat ( closed ) \nSun ( closed ) " ]). " </ td >
</ tr > " ;
2021-02-15 10:58:49 -08:00
2021-02-16 09:22:12 -08:00
$text .= " <td>Custom message</td>
< td > " . $frm->textarea ('contact_info[message]', varset( $pref['contact_info'] ['message']), 2, 80, ['size'=>'block-level', 'placeholder'=> " ( Optional ) Custom text message . " ]). " </ td >
</ tr > " ;
2021-02-15 10:58:49 -08:00
$text .= " </table> " ;
}
$text .= "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'sitecontacts' > " .PRFLAN_168. " </ label > " . $frm->help (PRFLAN_169). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2010-11-30 11:45:45 +00:00
" . $e_userclass->uc_dropdown ('sitecontacts', $pref['sitecontacts'] , 'nobody,main,admin,classes', " tabindex = '".$frm->getNext()."' " ). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
2015-05-31 12:50:16 -07:00
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'contact_visibility' > " .PRFLAN_258. " </ label > " . $frm->help (PRFLAN_274). " </ td >
2015-05-31 12:50:16 -07:00
< td >
2015-05-31 12:57:56 -07:00
" . $e_userclass->uc_dropdown ('contact_visibility', varset( $pref['contact_visibility'] ,e_UC_PUBLIC), null, " tabindex = '".$frm->getNext()."' " ). "
2015-05-31 12:50:16 -07:00
</ td >
</ tr >
2018-08-27 20:11:55 +02:00
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'contact-filter' > " .PRFLAN_270. " </ label > " . $frm->help (PRFLAN_271). " </ td >
2016-08-28 10:32:10 -07:00
< td >
" . $frm->textarea ('contact_filter', $pref['contact_filter'] , 5, 59, array('size'=>'xxlarge')). "
</ td >
</ tr >
2008-12-17 17:27:07 +00:00
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'contact-emailcopy' > " .PRFLAN_164. " </ label > " . $frm->help (PRFLAN_165). " </ td >
2013-03-27 20:28:55 +01:00
< td > " ;
/*
2008-12-17 17:27:07 +00:00
" . $frm->radio ('contact_emailcopy', 1, $pref['contact_emailcopy'] ). "
" . $frm->label (LAN_ENABLED, 'contact_emailcopy', 1). " & nbsp ; & nbsp ;
" . $frm->radio ('contact_emailcopy', 0, ! $pref['contact_emailcopy'] ). "
" . $frm->label (LAN_DISABLED, 'contact_emailcopy', 0). "
2021-02-12 12:19:58 -08:00
2013-03-27 20:28:55 +01:00
*/
2021-02-12 12:19:58 -08:00
$text .= $frm -> radio_switch ( 'contact_emailcopy' , $pref [ 'contact_emailcopy' ]) . "
2013-03-27 20:28:55 +01:00
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
2016-08-28 10:32:10 -07:00
2012-12-10 16:01:44 -08:00
</ tbody >
2008-12-17 17:27:07 +00:00
</ table >
2012-12-10 16:01:44 -08:00
" .pref_submit('email'). "
</ fieldset > " ;
2006-12-02 04:36:16 +00:00
2018-08-28 12:28:41 +02:00
// GDPR Settings -----------------------------
$text .= "
< fieldset class = 'e-hideme' id = 'core-prefs-gdpr' >
2021-02-15 10:58:49 -08:00
< h4 class = 'caption' > " .PRFLAN_53.SEP.PRFLAN_277. " </ h4 >
2018-08-28 12:28:41 +02:00
< table class = 'table adminform' >
< colgroup >
< col class = 'col-label' />
< col class = 'col-control' />
</ colgroup >
< tbody >
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'gdpr-privacypolicy' > " .PRFLAN_278. " </ label > " . $frm->help (PRFLAN_279). " </ td >
2018-08-28 12:28:41 +02:00
< td >
" . $frm->text ('gdpr_privacypolicy', $pref['gdpr_privacypolicy'] , 200, array('size'=>'xxlarge')). "
</ td >
</ tr >
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'gdpr-termsandconditions' > " .PRFLAN_280. " </ label > " . $frm->help (PRFLAN_279). " </ td >
2018-08-28 12:28:41 +02:00
< td >
" . $frm->text ('gdpr_termsandconditions', $pref['gdpr_termsandconditions'] , 200, array('size'=>'xxlarge')). "
</ td >
</ tr >
2019-01-23 19:32:34 +01:00
< tr >
2021-02-12 12:19:58 -08:00
< td >< label > " .LAN_DESCRIPTION. " </ label > " . $frm->help (nl2br(PRFLAN_281)). " </ td >
2019-01-23 19:32:34 +01:00
< td >
2021-02-12 12:19:58 -08:00
</ td >
2019-01-23 19:32:34 +01:00
</ tr >
2018-08-28 12:28:41 +02:00
</ tbody >
</ table >
" .pref_submit('display'). "
</ fieldset >
" ;
2008-12-17 17:27:07 +00:00
$text .= "
< fieldset class = 'e-hideme' id = 'core-prefs-display' >
2021-02-15 10:58:49 -08:00
< h4 class = 'caption' > " .PRFLAN_53.SEP.PRFLAN_13. " </ h4 >
2012-11-26 14:41:32 -08:00
< table class = 'table adminform' >
2012-05-13 05:26:11 +00:00
< colgroup >
2008-12-17 17:27:07 +00:00
< col class = 'col-label' />
< col class = 'col-control' />
</ colgroup >
< tbody >
< tr >
2013-07-08 11:27:17 +02:00
< td >< label for = 'displaythemeinfo' > " .PRFLAN_14. " </ label ></ td >
2012-11-26 14:41:32 -08:00
< td >
2008-12-19 14:01:07 +00:00
" . $frm->radio_switch ('displaythemeinfo', $pref['displaythemeinfo'] ). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
< tr >
2013-07-10 00:51:51 +02:00
< td >< label for = 'displayrendertime' > " .PRFLAN_15. " </ label ></ td >
2012-11-26 14:41:32 -08:00
< td >
2008-12-19 14:01:07 +00:00
" . $frm->radio_switch ('displayrendertime', $pref['displayrendertime'] ). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
< tr >
2013-07-10 00:51:51 +02:00
< td >< label for = 'displaysql' > " .PRFLAN_16. " </ label ></ td >
2012-11-26 14:41:32 -08:00
< td >
2008-12-19 14:01:07 +00:00
" . $frm->radio_switch ('displaysql', $pref['displaysql'] ). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
2006-12-02 04:36:16 +00:00
" ;
2007-08-14 19:37:45 +00:00
if ( function_exists ( " memory_get_usage " ))
{
2006-12-02 04:36:16 +00:00
$text .= "
2008-12-17 17:27:07 +00:00
< tr >
2013-07-10 00:51:51 +02:00
< td >< label for = 'display-memory-usage' > " .PRFLAN_137. " </ label ></ td >
2012-11-26 14:41:32 -08:00
< td >
2008-12-19 14:01:07 +00:00
" . $frm->radio_switch ('display_memory_usage', $pref['display_memory_usage'] ). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
2006-12-02 04:36:16 +00:00
" ;
}
2008-12-17 17:27:07 +00:00
$text .= "
</ tbody >
</ table >
" .pref_submit('display'). "
</ fieldset >
" ;
2006-12-02 04:36:16 +00:00
2021-02-03 11:46:32 -08:00
/**
* @ note Admin Display Options .
*/
2008-12-17 17:27:07 +00:00
$text .= "
< fieldset class = 'e-hideme' id = 'core-prefs-admindisp' >
2021-02-15 10:58:49 -08:00
< h4 class = 'caption' > " .PRFLAN_53.SEP.PRFLAN_77. " </ h4 >
2012-11-26 14:41:32 -08:00
< table class = 'table adminform' >
2012-05-13 05:26:11 +00:00
< colgroup >
2008-12-17 17:27:07 +00:00
< col class = 'col-label' />
< col class = 'col-control' />
</ colgroup >
< tbody >
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'admin-alerts-ok' > " .PRFLAN_95. " </ label > " . $frm->help (PRFLAN_96). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2008-12-19 14:01:07 +00:00
" . $frm->radio_switch ('admin_alerts_ok', $pref['admin_alerts_ok'] ). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'admin-alerts-uniquemenu' > " .PRFLAN_97. " </ label > " . $frm->help (PRFLAN_98). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2008-12-19 14:01:07 +00:00
" . $frm->radio_switch ('admin_alerts_uniquemenu', $pref['admin_alerts_uniquemenu'] ). "
2008-12-17 17:27:07 +00:00
</ td >
2013-05-04 00:13:25 +02:00
</ tr > " ;
/*< tr >
2021-02-12 12:19:58 -08:00
< td > " .PRFLAN_199. $frm->help (PRFLAN_200). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2009-01-09 17:25:50 +00:00
" . $frm->radio_switch ('admin_slidedown_subs', $pref['admin_slidedown_subs'] ). "
</ td >
2013-05-04 00:13:25 +02:00
</ tr >*/
$text .= "
2011-12-28 15:52:13 +00:00
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'admin-separate-plugins' > " .PRFLAN_204. " </ label > " . $frm->help (PRFLAN_205). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2021-02-03 11:46:32 -08:00
" . $frm->radio_switch ('admin_separate_plugins', varset( $pref['admin_separate_plugins'] )). "
2009-07-09 02:47:17 +00:00
</ td >
2009-01-09 17:25:50 +00:00
</ tr >
2021-02-03 11:46:32 -08:00
< tr >
< td >< label for = 'admin-collapse-sidebar' > " .PRFLAN_283. " </ label ></ td >
< td >
" . $frm->radio_switch ('admin_navbar_labels', varset( $pref['admin_navbar_labels'] )). "
</ td >
</ tr >
< tr >
< td >< label for = 'admin-collapse-sidebar' > " .PRFLAN_284. " </ label ></ td >
< td >
" . $frm->radio_switch ('admin_collapse_sidebar', varset( $pref['admin_collapse_sidebar'] )). "
</ td >
</ tr >
2021-02-03 20:38:31 -08:00
< tr >
< td >< label for = 'admin-collapse-sidebar' > " .PRFLAN_285. " </ label ></ td >
< td >
2021-02-12 12:19:58 -08:00
" . $frm->radio_switch ('admin_helptip', varset( $pref['admin_helptip'] )). "
2021-02-03 20:38:31 -08:00
</ td >
</ tr >
2021-02-03 11:46:32 -08:00
2008-12-17 17:27:07 +00:00
</ tbody >
</ table >
" .pref_submit('admindisp'). "
</ fieldset >
2006-12-02 04:36:16 +00:00
2008-12-17 17:27:07 +00:00
" ;
2006-12-02 04:36:16 +00:00
// Date options.
2021-02-04 08:45:10 -08:00
$dateHelp = PRFLAN_25 . " <a target='_blank' href='http://www.php.net/manual/en/function.strftime.php' rel='external'> " . PRFLAN_93 . " </a> " ;
2018-05-11 14:58:04 -07:00
$ga = e107 :: getDate ();
2021-02-04 08:45:10 -08:00
$date1 = $ga -> convert_date ( time (), " short " ) . " <br /> " . $dateHelp ;
$date2 = $ga -> convert_date ( time (), " long " ) . " <br /> " . $dateHelp ;
$date3 = $ga -> convert_date ( time (), " forum " ) . " <br /> " . $dateHelp ;
2018-07-11 15:54:51 +02:00
//$core_pref$date4 = e107::getDate()->convert(time(),"input");
$date4 = $tp -> toDate ( time (), " input " );
2006-12-02 04:36:16 +00:00
2021-02-04 08:45:10 -08:00
2008-12-17 17:27:07 +00:00
$text .= "
< fieldset class = 'e-hideme' id = 'core-prefs-date' >
2021-02-15 10:58:49 -08:00
< h4 class = 'caption' > " .PRFLAN_53.SEP.PRFLAN_21. " </ h4 >
2012-11-26 14:41:32 -08:00
< table class = 'table adminform' >
2012-05-13 05:26:11 +00:00
< colgroup >
2008-12-17 17:27:07 +00:00
< col class = 'col-label' />
< col class = 'col-control' />
</ colgroup >
< tbody >
< tr >
2021-02-04 08:45:10 -08:00
< td >< label for = 'shortdate' > " .PRFLAN_22. " </ label > " . $frm->help (PRFLAN_83. " : " . $date1 ,'before'). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2008-12-19 14:01:07 +00:00
" . $frm->text ('shortdate', $pref['shortdate'] , 50). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'longdate' > " .PRFLAN_23. " </ label > " . $frm->help (PRFLAN_83. " : " . $date2 ). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2008-12-19 14:01:07 +00:00
" . $frm->text ('longdate', $pref['longdate'] , 50). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
< tr >
2021-02-04 08:45:10 -08:00
< td >< label for = 'forumdate' > " .PRFLAN_24. " </ label > " . $frm->help (PRFLAN_83. " : " . $date3 ,'before'). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2008-12-19 14:01:07 +00:00
" . $frm->text ('forumdate', $pref['forumdate'] , 50). "
2008-12-17 17:27:07 +00:00
</ td >
2012-05-26 12:21:39 +00:00
</ tr > " ;
2012-05-26 13:32:09 +00:00
$def = strtotime ( 'December 21, 2012 3:45pm' );
2021-11-25 10:18:53 -08:00
$inputdate = e107 :: getDate () -> dateFormats ( $def );
$inputtime = e107 :: getDate () -> timeFormats ( $def );
2015-05-02 16:27:01 +02:00
2012-05-26 12:21:39 +00:00
$text .= "
< tr >
2015-05-02 16:27:01 +02:00
< td >< label for = 'inputdate' > " .PRFLAN_230. " </ label ></ td >
2015-07-17 17:55:48 -07:00
< td class = 'form-inline' >
2013-04-25 17:29:46 -07:00
" . $frm->select ('inputdate', $inputdate , e107::getPref('inputdate'));
2012-05-26 12:21:39 +00:00
2013-04-25 17:29:46 -07:00
$text .= $frm -> select ( 'inputtime' , $inputtime , e107 :: getPref ( 'inputtime' ));
2012-05-26 12:21:39 +00:00
$text .= "
</ td >
2016-12-13 20:56:11 +01:00
</ tr > " ;
2014-01-17 07:20:11 -08:00
2016-12-13 20:56:11 +01:00
$timeZones = systemTimeZones ();
2014-01-17 07:20:11 -08:00
2008-12-17 17:27:07 +00:00
$text .= "
< tr >
2013-07-10 00:51:51 +02:00
< td >< label for = 'timezone' > " .PRFLAN_56. " </ label ></ td >
2012-11-26 14:41:32 -08:00
< td >
2017-01-31 16:39:00 -08:00
" . $frm->select ('timezone', $timeZones , vartrue( $pref['timezone'] , 'UTC'),'size=xlarge'). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
</ tbody >
</ table >
" .pref_submit('date'). "
</ fieldset >
" ;
2006-12-02 04:36:16 +00:00
2016-12-12 16:14:59 +01:00
2006-12-02 04:36:16 +00:00
// =========== Registration Preferences. ==================
2015-02-05 16:24:54 -08:00
2015-11-01 15:44:42 +01:00
$elements = array ( 1 => PRFLAN_259 , 2 => PRFLAN_260 , 0 => LAN_DISABLED );
2015-02-05 16:24:54 -08:00
2008-12-17 17:27:07 +00:00
$text .= "
< fieldset class = 'e-hideme' id = 'core-prefs-registration' >
2021-02-15 10:58:49 -08:00
< h4 class = 'caption' > " .PRFLAN_53.SEP.PRFLAN_28. " </ h4 >
2012-11-26 14:41:32 -08:00
< table class = 'table adminform' >
2012-05-13 05:26:11 +00:00
< colgroup >
2008-12-17 17:27:07 +00:00
< col class = 'col-label' />
< col class = 'col-control' />
</ colgroup >
2015-04-08 20:20:10 -07:00
< tbody >
2008-12-17 17:27:07 +00:00
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'user-reg' > " .PRFLAN_224. " </ label > " . $frm->help (PRFLAN_30). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2015-02-05 16:24:54 -08:00
" . $frm->radio ('user_reg', $elements , $pref['user_reg'] ). "
2008-12-17 17:27:07 +00:00
</ td >
2021-02-04 08:45:10 -08:00
</ tr > " ;
2015-04-08 20:20:10 -07:00
2021-02-04 08:45:10 -08:00
$srch = array ( '[' , ']' );
$repl = array ( " <a href=' " . e_ADMIN_ABS . " notify.php'> " , '</a>' );
2009-03-06 20:09:08 +00:00
2021-02-04 08:45:10 -08:00
$PRFLAN_154a = str_replace ( $srch , $repl , PRFLAN_154a );
$text .= "
2008-12-17 17:27:07 +00:00
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'user-reg-veri' > " .PRFLAN_154. " </ label > " . $frm->help ( $PRFLAN_154a ). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2016-05-28 07:59:00 -07:00
" . $frm->select_open ('user_reg_veri', array('size'=>'xlarge'));
2009-03-06 20:09:08 +00:00
$veri_list = array ( PRFLAN_152 , PRFLAN_31 , PRFLAN_153 );
2006-12-02 04:36:16 +00:00
2009-03-06 20:09:08 +00:00
foreach ( $veri_list as $v => $v_title )
{
$text .= $frm -> option ( $v_title , $v , ( $pref [ 'user_reg_veri' ] == $v ));
}
2006-12-02 04:36:16 +00:00
2015-02-19 16:54:43 -08:00
2021-02-12 12:19:58 -08:00
$text .= " </select>
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
2015-02-05 16:24:54 -08:00
< tr >
2013-07-10 00:51:51 +02:00
< td >< label for = 'allowemaillogin' > " .PRFLAN_184. " </ label ></ td >
2016-05-28 07:59:00 -07:00
< td > " . $frm->select_open ('allowEmailLogin', array('size'=>'xlarge'));
2012-06-02 08:12:16 +00:00
// $login_list = array(PRFLAN_201,PRFLAN_202,PRFLAN_203);
$login_list = array (
2 => PRFLAN_203 ,
1 => PRFLAN_202 ,
0 => PRFLAN_201
);
2009-03-06 20:09:08 +00:00
foreach ( $login_list as $l => $l_title )
{
$text .= $frm -> option ( $l_title , $l , ( $pref [ 'allowEmailLogin' ] == $l ));
}
$text .= "
</ select ></ td >
</ tr >
2015-08-21 12:53:09 -07:00
" ;
/*
// Highly problematic.
$text .= "
2008-12-17 17:27:07 +00:00
< tr >
2013-07-10 00:51:51 +02:00
< td >< label for = 'signup-remote-emailcheck' > " .PRFLAN_160. " </ label ></ td >
2012-11-26 14:41:32 -08:00
< td >
2008-12-19 14:01:07 +00:00
" . $frm->radio_switch ('signup_remote_emailcheck', $pref['signup_remote_emailcheck'] ). "
2008-12-17 17:27:07 +00:00
</ td >
2015-08-21 12:53:09 -07:00
</ tr > " ;
*/
2016-03-22 11:42:05 -07:00
$membersOnlyRedirectOptions = array ( 'login' => PRFLAN_264 , 'splash' => PRFLAN_265 );
2015-05-19 13:10:04 -07:00
2015-08-21 12:53:09 -07:00
$text .= "
2015-05-19 13:10:04 -07:00
2008-12-17 17:27:07 +00:00
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'membersonly-enabled' > " .PRFLAN_58. " </ label > " . $frm->help (PRFLAN_59). " </ td >
2012-12-10 17:38:52 -08:00
< td > " ;
2021-02-12 12:19:58 -08:00
$text .= $frm -> radio_switch ( 'membersonly_enabled' , $pref [ 'membersonly_enabled' ]) . "
< div class = 'e-expandit-container' >
< div class = 'form-group clearfix' style = 'padding-top:10px' >
" . $frm->help (PRFLAN_266).
2016-03-22 11:42:05 -07:00
$frm -> select ( 'membersonly_redirect' , $membersOnlyRedirectOptions , $pref [ 'membersonly_redirect' ], array ( 'size' => 'xxlarge' )) . "
2021-02-12 12:19:58 -08:00
</ div >
< div class = 'form-group clearfix' > " . $frm->help (PRFLAN_207).
2016-05-28 07:59:00 -07:00
$frm -> textarea ( 'membersonly_exceptions' , $pref [ 'membersonly_exceptions' ], 3 , 1 , 'size=xxlarge&placeholder=' . PRFLAN_206 ) . "
2021-02-12 12:19:58 -08:00
</ div >
2016-03-22 11:42:05 -07:00
2012-12-10 17:38:52 -08:00
</ div >
2009-08-20 11:38:24 +00:00
</ td >
</ tr >
2012-12-10 17:38:52 -08:00
2009-03-06 20:09:08 +00:00
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'autologinpostsignup' > " .PRFLAN_197. " </ label > " . $frm->help (PRFLAN_198). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2009-03-06 20:09:08 +00:00
" . $frm->radio_switch ('autologinpostsignup', $pref['autologinpostsignup'] ). "
</ td >
</ tr >
2015-05-19 13:10:04 -07:00
< tr >
< td >< label for = 'displayname-maxlength' > " .PRFLAN_158. " :</ label ></ td >
< td >
" . $frm->number ('displayname_maxlength', $pref['displayname_maxlength'] , 3). "
</ td >
</ tr >
< tr >
< td >< label for = 'loginname-maxlength' > " .PRFLAN_172. " :</ label ></ td >
< td >
" . $frm->number ('loginname_maxlength', $pref['loginname_maxlength'] , 3). "
</ td >
</ tr >
< tr >
< td >< label for = 'signup-pass-len' > " .CUSTSIG_16. " </ label ></ td >
< td >
" . $frm->number ('signup_pass_len', $pref['signup_pass_len'] , 2). "
</ td >
</ tr >
2012-05-17 18:41:25 +00:00
2008-12-17 17:27:07 +00:00
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'signup-maxip' > " .PRFLAN_136. " </ label > " . $frm->help (PRFLAN_78). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2012-11-01 00:34:38 +00:00
" . $frm->number ('signup_maxip', $pref['signup_maxip'] , 3). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
2015-05-19 13:10:04 -07:00
2015-02-05 16:24:54 -08:00
2015-04-08 20:20:10 -07:00
</ tbody >
2015-02-05 16:24:54 -08:00
2015-04-08 20:20:10 -07:00
2012-05-17 18:41:25 +00:00
</ table >
" .pref_submit('registration'). "
</ fieldset >
" ;
2012-06-13 12:34:09 +00:00
2015-01-23 15:52:48 -08:00
2012-08-02 21:29:36 +00:00
// Key registration
2015-02-05 16:24:54 -08:00
2012-06-13 12:34:09 +00:00
2012-05-17 18:41:25 +00:00
// Signup options ===========================.
2015-05-12 20:15:05 -07:00
$prefOptionPassword = ( isset ( $pref [ 'signup_option_password' ])) ? $pref [ 'signup_option_password' ] : 2 ;
2012-05-17 18:41:25 +00:00
$text .= "
< fieldset class = 'e-hideme' id = 'core-prefs-signup' >
2021-02-15 10:58:49 -08:00
< h4 class = 'caption' > " .PRFLAN_53.SEP.PRFLAN_19. " </ h4 >
2012-11-26 14:41:32 -08:00
< table class = 'table adminform' >
2012-05-17 18:41:25 +00:00
< colgroup >
< col class = 'col-label' />
< col class = 'col-control' />
</ colgroup >
2015-05-12 20:15:05 -07:00
< tbody >
< tr >
2015-11-01 15:44:42 +01:00
< td > " .PRFLAN_261. " </ td >< td >< table class = 'table table-striped table-condensed table-bordered' style = 'margin-bottom:0px' >
2015-05-19 13:10:04 -07:00
< colgroup >
< col class = 'col-label' />
< col class = 'col-control' />
</ colgroup >
< tr >
< td >< label > Email </ label ></ td >
< td >
" . $frm->radio ('disable_emailcheck', 2, ( $pref['disable_emailcheck'] ==2), array('label' => CUSTSIG_12, 'disabled'=>true)). "
" . $frm->radio ('disable_emailcheck', 1, (intval( $pref['disable_emailcheck'] ) == 1), array('label' => CUSTSIG_14)). "
" . $frm->radio ('disable_emailcheck', 0, (intval( $pref['disable_emailcheck'] ) == 0), array('label' => CUSTSIG_15)). "
</ td >
</ tr >
< tr >
2015-11-01 15:44:42 +01:00
< td >< label for = 'signup-option-password' > " .LAN_PASSWORD. " </ label ></ td >
2015-05-12 20:15:05 -07:00
< td >
2015-05-19 13:10:04 -07:00
" . $frm->radio ('signup_option_password', 0, ! $prefOptionPassword , array('label' => CUSTSIG_12)). "
" . $frm->radio ('signup_option_password', 1, ( $prefOptionPassword == 1), array('label' => CUSTSIG_14, 'disabled'=>true)). "
2015-05-12 20:15:05 -07:00
" . $frm->radio ('signup_option_password', 2, ( $prefOptionPassword == 2), array('label' => CUSTSIG_15)). "
</ td >
2015-05-19 13:10:04 -07:00
</ tr >
" ;
2012-12-10 17:38:52 -08:00
$signup_option_names = array (
2015-05-12 20:15:05 -07:00
// "signup_option_loginname" => "Login Name",
2015-05-19 13:10:04 -07:00
2012-12-10 17:38:52 -08:00
" signup_option_realname " => CUSTSIG_2 ,
2015-05-19 13:10:04 -07:00
" signup_option_email_confirm " => CUSTSIG_21 ,
2012-12-10 17:38:52 -08:00
" signup_option_image " => CUSTSIG_7 ,
2015-05-19 13:10:04 -07:00
2012-12-10 17:38:52 -08:00
'signup_option_customtitle' => CUSTSIG_20 ,
2015-05-19 13:10:04 -07:00
'signup_option_hideemail' => CUSTSIG_22 ,
" signup_option_class " => CUSTSIG_17 ,
" signup_option_signature " => CUSTSIG_6 ,
2012-12-10 17:38:52 -08:00
);
2015-05-12 20:15:05 -07:00
2012-12-10 17:38:52 -08:00
foreach ( $signup_option_names as $value => $key )
{
2013-07-25 22:12:41 +02:00
$label_value = str_replace ( '_' , '-' , $value );
2012-12-10 17:38:52 -08:00
$text .= "
< tr >
2013-07-25 22:12:41 +02:00
< td >< label for = '".$label_value."' > " . $key . " </ label ></ td >
2012-12-10 17:38:52 -08:00
< td >
2015-05-19 13:10:04 -07:00
" . $frm->radio ( $value , 0, ! $pref[$value] , array('label' => CUSTSIG_12)). "
" . $frm->radio ( $value , 1, ( $pref[$value] == 1), array('label' => CUSTSIG_14)). "
2013-03-27 20:28:55 +01:00
" . $frm->radio ( $value , 2, ( $pref[$value] == 2), array('label' => CUSTSIG_15)). "
2012-12-10 17:38:52 -08:00
</ td >
</ tr >
" ;
}
$text .= "
2015-05-19 13:10:04 -07:00
< tr >
2015-11-01 15:44:42 +01:00
< td >< label for = 'user-reg-secureveri' > " .PRFLAN_262. " </ label ></ td >
2015-05-19 13:10:04 -07:00
< td >
" . $frm->radio_switch ('user_reg_secureveri', $pref['user_reg_secureveri'] , CUSTSIG_12, CUSTSIG_14). "
</ td >
</ tr >
</ table >
2021-02-04 08:45:10 -08:00
</ td ></ tr > " ;
$useCoppaHelp = PRFLAN_46 . " <a target='_blank' href='http://www.ftc.gov/privacy/coppafaqs.shtm' rel='external'> " . PRFLAN_94 . " </a> " ;
$text .= "
2015-05-19 13:10:04 -07:00
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'use-coppa' > " .PRFLAN_45. " </ label > " . $frm->help ( $useCoppaHelp ). " </ td >
2015-05-19 13:10:04 -07:00
< td >
" . $frm->radio_switch ('use_coppa', $pref['use_coppa'] ). "
</ td >
</ tr > " ;
/*
< tr >
< td >< label for = 'disable-emailcheck' > " .PRFLAN_167. " </ label ></ td >
< td >
" . $pref['disable_emailcheck'] . "
</ td >
</ tr >*/
$text .= "
2008-12-17 17:27:07 +00:00
< tr >
2013-07-25 22:12:41 +02:00
< td >< label for = 'signup-text' > " .PRFLAN_126. " </ label ></ td >
2012-11-26 14:41:32 -08:00
< td >
2016-05-28 07:59:00 -07:00
" . $frm->textarea ('signup_text', $pref['signup_text'] , 3, 80, array('size'=>'xxlarge')). "
2012-05-17 18:41:25 +00:00
</ td >
</ tr >
< tr >
2013-07-25 22:12:41 +02:00
< td >< label for = 'signup-text-after' > " .PRFLAN_140. " </ label ></ td >
2012-11-26 14:41:32 -08:00
< td >
2016-05-28 07:59:00 -07:00
" . $frm->textarea ('signup_text_after', $pref['signup_text_after'] , 3, 80, array('size'=>'xxlarge')). "
2012-05-17 18:41:25 +00:00
</ td >
2021-02-04 08:45:10 -08:00
</ tr > " ;
$predefinedloginnameHelp = " <div style='text-align:left'> " . PRFLAN_193 . " <br /> " . str_replace ( " [br] " , " <br /> " , PRFLAN_194 ) . " </div> " ;
$text .= "
2008-12-17 17:27:07 +00:00
< tr >
2021-02-04 08:45:10 -08:00
< td >< label for = 'predefinedloginname' > " .PRFLAN_192. " :</ label > " . $frm->help ( $predefinedloginnameHelp ,'before'). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2008-12-19 14:01:07 +00:00
" . $frm->text ('predefinedLoginName', $pref['predefinedLoginName'] , 50). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
2015-05-19 13:10:04 -07:00
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'signup-disallow-text' > " .CUSTSIG_18. " </ label > " . $frm->help (CUSTSIG_19). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2015-05-19 13:10:04 -07:00
" . $frm->tags ('signup_disallow_text', $pref['signup_disallow_text'] , 500). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
2015-05-19 13:10:04 -07:00
< tr >
< td >< label for = 'displayname_class' > " .PRFLAN_155. " :</ label ></ td >
< td class = 'form-inline' >
" . $e_userclass->uc_dropdown ('displayname_class', $pref['displayname_class'] , 'nobody,member,admin,classes', " tabindex = '".$frm->getNext()."' " ). "
" . $frm->admin_button ('submit_resetdisplaynames', PRFLAN_156, 'delete'). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
2015-05-19 13:10:04 -07:00
2021-02-01 18:18:30 -08:00
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'old_np' > " .PRFLAN_124. " :</ label > " . $frm->help (PRFLAN_125). " </ td >
2021-02-01 18:18:30 -08:00
< td >
" . $frm->radio_switch ('old_np', $pref['old_np'] ). "
</ td >
</ tr >
2015-05-19 13:10:04 -07:00
2008-12-19 14:01:07 +00:00
" ;
/*
2008-12-17 17:27:07 +00:00
<!--
< tr >
2012-11-26 14:41:32 -08:00
< td > " .CUSTSIG_13. " </ td >
< td > " .CUSTSIG_14. " </ td >
2008-12-17 17:27:07 +00:00
</ tr >
-->
2008-12-19 14:01:07 +00:00
*/
2006-12-02 04:36:16 +00:00
2012-05-31 06:07:33 +00:00
2006-12-02 04:36:16 +00:00
2008-12-17 17:27:07 +00:00
$text .= "
</ tbody >
</ table >
" .pref_submit('signup'). "
</ fieldset >
" ;
2006-12-02 04:36:16 +00:00
// Custom Fields.
/* text render options */
2018-07-11 15:54:51 +02:00
$savePrefs = false ;
2008-12-19 14:01:07 +00:00
if ( ! isset ( $pref [ 'post_html' ]))
2006-12-02 04:36:16 +00:00
{
$pref [ 'post_html' ] = '250' ;
2018-07-11 15:54:51 +02:00
$savePrefs = true ;
//save_prefs();
2006-12-02 04:36:16 +00:00
}
2018-07-11 15:54:51 +02:00
// Make sure, the "post_script" setting is set and if not, set it to "No One" (255)
// This should close a possible security hole...
if ( ! isset ( $pref [ 'post_script' ]))
{
$pref [ 'post_script' ] = '255' ;
$savePrefs = true ;
//save_prefs();
}
else
{
// Make sure, that the pref is one of the allowed userclasses
// Close possible security hole
if ( ! array_key_exists ( $pref [ 'post_script' ], $e_userclass -> uc_required_class_list ( 'nobody,admin,main,classes,no-excludes' , true )))
{
$pref [ 'post_script' ] = 255 ; //set to userclass "no one" if the old class isn't part of the list of allowed userclasses
$savePrefs = true ;
}
}
if ( $savePrefs ) $core_pref -> setPref ( $pref ) -> save ( false , true );
$text .= "
2008-12-17 17:27:07 +00:00
< fieldset class = 'e-hideme' id = 'core-prefs-textpost' >
2021-02-15 10:58:49 -08:00
< h4 class = 'caption' > " .PRFLAN_53.SEP.PRFLAN_286. " </ h4 >
2012-11-26 14:41:32 -08:00
< table class = 'table adminform' >
2012-05-13 05:26:11 +00:00
< colgroup >
2008-12-17 17:27:07 +00:00
< col class = 'col-label' />
< col class = 'col-control' />
</ colgroup >
< tbody >
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'make-clickable' > " .PRFLAN_127. " :</ label > " . $frm->help (PRFLAN_128). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2008-12-19 14:01:07 +00:00
" . $frm->radio_switch ('make_clickable', $pref['make_clickable'] ). "
2008-12-17 17:27:07 +00:00
</ td >
2012-12-10 17:38:52 -08:00
</ tr > " ;
2021-02-12 12:19:58 -08:00
2012-12-10 17:38:52 -08:00
$text .= "
2008-12-17 17:27:07 +00:00
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'link-replace' > " .PRFLAN_102. " ? :</ label >
" . $frm->help (PRFLAN_103). "
</ td >
< td >
" . $frm->radio_switch ('link_replace', $pref['link_replace'] ). "
< div class = 'e-expandit-container' >
< table class = 'table table-condensed table-bordered' style = 'margin:0; width:380px' >
< tr >
< td > URLs " . $frm->help (PRFLAN_105). " </ td >< td > " . $frm->text ('link_text', $pref['link_text'] , 200, 'size=block-level&placeholder='.PRFLAN_104). " </ td >
</ tr >
< tr >
< td > Emails " . $frm->help (PRFLAN_108). " </ td >< td > " . $frm->text ('email_text', $tp->post_toForm ( $pref['email_text'] ), 200, 'size=block-level&placeholder='.PRFLAN_107). " </ td >
</ tr >
</ table >
2012-12-10 20:59:16 -08:00
2012-12-10 17:38:52 -08:00
</ div >
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
2012-12-10 17:38:52 -08:00
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'links-new-window' > " .PRFLAN_145. " ? :</ label > " . $frm->help (PRFLAN_146). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2008-12-19 14:01:07 +00:00
" . $frm->radio_switch ('links_new_window', $pref['links_new_window'] ). "
2021-02-12 12:19:58 -08:00
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
2012-12-10 17:38:52 -08:00
2008-12-17 17:27:07 +00:00
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'profanity-filter' > " .PRFLAN_40. " </ label > " . $frm->help (PRFLAN_41). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2012-12-10 17:38:52 -08:00
" . $frm->radio_switch ('profanity_filter', $pref['profanity_filter'] ). "
</ td >
</ tr >
< tr >
2013-07-25 22:12:41 +02:00
< td >< label for = 'profanity-replace' > " .PRFLAN_42. " :</ label ></ td >
2012-12-10 17:38:52 -08:00
< td >
" . $frm->text ('profanity_replace', $pref['profanity_replace'] , 20). "
</ td >
</ tr >
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'profanity-words' > " .PRFLAN_43. " :</ label > " . $frm->help (PRFLAN_44). " </ td >
2012-12-10 17:38:52 -08:00
< td >
2021-02-14 07:02:09 -08:00
" . $frm->tags ('profanity_words', $pref['profanity_words'] , 250, array('maxItems'=>1000)). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
2012-12-10 17:38:52 -08:00
2012-12-10 20:59:16 -08:00
2008-12-17 17:27:07 +00:00
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'main-wordwrap' > " .PRFLAN_109. " :</ label > " . $frm->help (PRFLAN_110). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2012-12-10 20:59:16 -08:00
" . $frm->number ('main_wordwrap', $pref['main_wordwrap'] , 3). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'menu-wordwrap' > " .PRFLAN_111. " :</ label > " . $frm->help (PRFLAN_110). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2012-12-10 20:59:16 -08:00
" . $frm->number ('menu_wordwrap', $pref['menu_wordwrap'] , 3). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
2009-03-06 20:09:08 +00:00
2008-12-17 17:27:07 +00:00
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'post-html' > " .PRFLAN_116. " :</ label > " . $frm->help (PRFLAN_117). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2008-12-19 14:01:07 +00:00
" . $e_userclass->uc_dropdown ('post_html', $pref['post_html'] , 'nobody,public,member,admin,main,classes', " tabindex = '".$frm->getNext()."' " ). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
2010-09-06 12:34:06 +00:00
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'post-script' > " .PRFLAN_215. " :</ label > " . $frm->help (PRFLAN_216). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2018-07-13 22:45:41 +02:00
" . $e_userclass->uc_dropdown ('post_script', $pref['post_script'] ,'nobody,admin,main,classes,no-excludes'). "
2010-09-06 12:34:06 +00:00
</ td >
2016-06-09 16:44:40 -07:00
</ tr >
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'inline-editing' > " .PRFLAN_268. " :</ label > " . $frm->help (PRFLAN_269). " </ td >
2016-06-09 16:44:40 -07:00
< td >
" . $frm->userclass ('inline_editing', $pref['inline_editing'] ,'off','nobody,admin,main,classes,no-excludes'). "
</ td >
2010-09-06 12:34:06 +00:00
</ tr >
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'filter-script' > " .PRFLAN_217. " :</ label > " . $frm->help (PRFLAN_218). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2010-09-06 12:34:06 +00:00
" . $frm->radio_switch ('filter_script', varset( $pref['filter_script'] , 1)). "
</ td >
</ tr >
2010-12-18 22:55:27 +00:00
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'html-abuse' > " .PRFLAN_220. " :</ label > " . $frm->help (PRFLAN_221). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2010-12-18 22:55:27 +00:00
" . $frm->radio_switch ('html_abuse', varset( $pref['html_abuse'] , 1)). "
</ td >
</ tr >
2008-12-17 17:27:07 +00:00
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'wysiwyg' > " .PRFLAN_122. " :</ label > " . $frm->help (PRFLAN_123). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2008-12-19 14:01:07 +00:00
" . $frm->radio_switch ('wysiwyg', $pref['wysiwyg'] ). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
2021-02-01 18:18:30 -08:00
2011-07-10 23:21:09 +00:00
2006-12-02 04:36:16 +00:00
" ;
2008-12-17 17:27:07 +00:00
if ( file_exists ( e_PLUGIN . " geshi/geshi.php " ))
{
2021-02-04 08:45:10 -08:00
$usegeshiHelp = str_replace ( " [link] " , " http://qbnz.com/highlighter/ " , PRFLAN_119 );
2008-12-17 17:27:07 +00:00
$text .= "
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'usegeshi' > " .PRFLAN_118. " ? :</ label > " . $frm->help ( $usegeshiHelp ). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2008-12-19 14:01:07 +00:00
" . $frm->radio_switch ('useGeshi', $pref['useGeshi'] ). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'defaultlangeshi' > " .PRFLAN_120. " ? :</ label > " . $frm->help (PRFLAN_121). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2008-12-19 14:01:07 +00:00
" . $frm->text ('defaultLanGeshi', ( $pref['defaultLanGeshi'] ? $pref['defaultLanGeshi'] : " php " ), 20). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
2006-12-02 04:36:16 +00:00
" ;
2008-12-17 17:27:07 +00:00
}
$text .= "
</ tbody >
</ table >
" .pref_submit('textpost'). "
</ fieldset >
" ;
2008-06-13 20:20:23 +00:00
2008-12-17 17:27:07 +00:00
function multi_radio ( $name , $textsVals , $currentval = '' )
{
$ret = '' ;
$gap = '' ;
foreach ( $textsVals as $v => $t )
2008-06-13 20:20:23 +00:00
{
2008-12-17 17:27:07 +00:00
$sel = ( $v == $currentval ) ? " checked='checked' " : " " ;
2021-02-04 08:45:10 -08:00
$ret .= $gap . " <input type='radio' name=' { $name } ' value=' { $v } ' { $sel } /> " . $t . " " ;
2008-06-13 20:20:23 +00:00
$gap = " " ;
}
2008-12-17 17:27:07 +00:00
return $ret ;
}
2008-06-13 20:20:23 +00:00
2006-12-02 04:36:16 +00:00
// Security Options. .
$hasGD = extension_loaded ( " gd " );
2008-12-17 17:27:07 +00:00
$text .= "
< fieldset class = 'e-hideme' id = 'core-prefs-security' >
2021-02-15 10:58:49 -08:00
< h4 class = 'caption' > " .PRFLAN_53.SEP.PRFLAN_47. " </ h4 >
2012-11-26 14:41:32 -08:00
< table class = 'table adminform' >
2012-05-13 05:26:11 +00:00
< colgroup >
2008-12-17 17:27:07 +00:00
< col class = 'col-label' />
< col class = 'col-control' />
</ colgroup >
2016-12-28 15:03:06 -08:00
< tbody > " ;
2017-03-13 11:22:52 -07:00
2016-12-28 15:03:06 -08:00
$text .= "
2008-12-17 17:27:07 +00:00
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'ssl-enabled' > " .PRFLAN_60. " </ label > " . $frm->help (PRFLAN_61). " </ td >
2008-12-19 14:01:07 +00:00
2017-03-13 11:22:52 -07:00
< td > " ;
if ( ! empty ( $_SERVER [ 'HTTPS' ]) && $_SERVER [ 'HTTPS' ] != 'off' ) // Only allow if an SSL login has been made.
{
$text .= $frm -> radio_switch ( 'ssl_enabled' , $pref [ 'ssl_enabled' ]);
}
else
{
$text .= " <div class='label label-primary e-tip' title= \" " . PRFLAN_61 . " \" > " . PRFLAN_275 . " </div> " ;
}
$text .= "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
2016-12-28 15:03:06 -08:00
" ;
2017-03-13 11:22:52 -07:00
2016-12-28 15:03:06 -08:00
// Secure Image/ Captcha
2013-03-21 23:06:46 -07:00
$secureImage = array ( 'signcode' => PRFLAN_76 , 'logcode' => PRFLAN_81 , " fpwcode " => PRFLAN_138 , 'admincode' => PRFLAN_222 );
foreach ( $secureImage as $key => $label )
{
$label = str_replace ( $srch , $repl , $label );
2021-02-12 12:19:58 -08:00
$text .= " <tr><td><label for=' " . $key . " '> " . $label . " </label> " . $frm -> help ( PRFLAN_223 ) . " </td><td> " ;
2013-03-21 23:06:46 -07:00
if ( $hasGD )
{
$text .= $frm -> radio_switch ( $key , $pref [ $key ]);
}
else
{
$text .= PRFLAN_133 ;
}
$text .= "
</ td ></ tr > \n " ;
}
/*
$text .= "
2008-12-17 17:27:07 +00:00
< tr >
2012-11-26 14:41:32 -08:00
< td > " .PRFLAN_81. " : </ td >
< td >
2008-12-17 17:27:07 +00:00
" ;
2006-12-02 04:36:16 +00:00
2008-12-17 17:27:07 +00:00
if ( $hasGD )
{
2008-12-19 14:01:07 +00:00
$text .= $frm -> radio_switch ( 'logcode' , $pref [ 'logcode' ]);
2008-12-17 17:27:07 +00:00
}
else
{
$text .= PRFLAN_133 ;
}
$text .= "
</ td >
</ tr >
< tr >
2012-11-26 14:41:32 -08:00
< td > " .PRFLAN_138. " : </ td >
< td >
2008-12-17 17:27:07 +00:00
" ;
if ( $hasGD )
{
2008-12-19 14:01:07 +00:00
$text .= $frm -> radio_switch ( 'fpwcode' , $pref [ 'fpwcode' ]);
2008-12-17 17:27:07 +00:00
}
else
{
$text .= PRFLAN_133 ;
}
2006-12-02 04:36:16 +00:00
2008-12-17 17:27:07 +00:00
$text .= "
</ td >
2013-03-21 23:06:46 -07:00
</ tr > " ;
*
*/
2020-06-02 13:43:21 -07:00
$text .= "
2009-03-06 20:09:08 +00:00
2008-12-17 17:27:07 +00:00
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'disallowmultilogin' > " .PRFLAN_129. " </ label > " . $frm->help (PRFLAN_130). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2008-12-19 14:01:07 +00:00
" . $frm->radio_switch ('disallowMultiLogin', $pref['disallowMultiLogin'] , LAN_YES, LAN_NO). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
2009-03-06 20:09:08 +00:00
2008-12-17 17:27:07 +00:00
< tr >
2015-05-23 13:50:40 -07:00
< td >< label for = 'user-tracking-cookie' > " .PRFLAN_48. " </ label ></ td >
< td >
< div class = 'form-inline' >
2021-01-16 13:32:35 -08:00
" . $frm->radio ('user_tracking', array('cookie' => PRFLAN_49, 'session' => PRFLAN_50), varset( $pref['user_tracking'] )). "
2015-05-23 13:50:40 -07:00
</ div ></ td >
2008-12-17 17:27:07 +00:00
</ tr >
2012-12-10 17:38:52 -08:00
2015-05-23 13:50:40 -07:00
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'cookie-name' > " .PRFLAN_55. " </ label > " . $frm->help (PRFLAN_263). " </ td >
2021-01-16 13:32:35 -08:00
< td > " . $frm->text ('cookie_name', varset( $pref['cookie_name'] ), 20). "
2021-02-04 08:45:10 -08:00
</ td >
</ tr >
2016-12-28 15:03:06 -08:00
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'session-lifetime' > " .PRFLAN_272. " </ label > " . $frm->help (PRFLAN_273). " </ td >
2016-12-28 15:03:06 -08:00
< td >
2021-06-18 09:44:26 -07:00
" . $frm->number ('session_lifetime', varset( $pref['session_lifetime'] ), 86400). "
2016-12-28 15:03:06 -08:00
</ td >
</ tr >
2020-06-02 13:43:21 -07:00
" ;
2016-12-28 15:03:06 -08:00
2020-07-02 12:11:50 -07:00
// if(e_DEVELOPER) // Experimental (translate terms after this check is removed)
2020-06-02 13:43:21 -07:00
{
// $systemSaveMethod = ini_get('session.save_handler');
// $saveMethod = (!empty($systemSaveMethod)) ? $systemSaveMethod : 'files';
// $systemSaveMethod => PRFLAN_276,
$text .= "
< tr >
< td >< label for = 'session-save-method' > " .PRFLAN_282. " </ label ></ td >
< td class = 'form-inline' >
2021-01-16 13:32:35 -08:00
" . $frm->select ('session_save_method', [ 'db'=>'Database', 'files'=>'Files'], varset( $pref['session_save_method'] )). "
2021-02-04 08:45:10 -08:00
2020-06-02 13:43:21 -07:00
</ td >
</ tr >
" ;
}
2016-12-28 15:03:06 -08:00
2020-06-02 13:43:21 -07:00
$text .= "
2008-12-17 17:27:07 +00:00
< tr >
2013-07-25 22:12:41 +02:00
< td >< label for = 'passwordencoding' > " .PRFLAN_188. " :</ label ></ td >
2016-06-16 12:23:20 -07:00
2016-06-06 19:54:48 -07:00
" ;
$pwdEncodeOpts = array ();
if ( function_exists ( 'password_verify' )) // ie. php 5.5 or higher
{
2017-04-30 15:20:39 +02:00
$pwdEncodeOpts [ 3 ] = PRFLAN_276 ;
2016-06-16 12:23:20 -07:00
2016-06-06 19:54:48 -07:00
}
$pwdEncodeOpts [ 1 ] = PRFLAN_190 ;
$pwdEncodeOpts [ 0 ] = PRFLAN_189 ;
2016-06-16 12:23:20 -07:00
$text .= ( isset ( $pwdEncodeOpts [ 3 ]) && $pref [ 'passwordEncoding' ] != 3 ) ? " <td class='has-warning'> " : " <td> " ;
2016-06-06 19:54:48 -07:00
$text .= $frm -> select ( 'passwordEncoding' , $pwdEncodeOpts , varset ( $pref [ 'passwordEncoding' ], 0 ));
// $text .= $frm->radio_switch('passwordEncoding', varset($pref['passwordEncoding'], 0), PRFLAN_190, PRFLAN_189);
$text .= "
2021-02-04 08:45:10 -08:00
< div class = 'field-help' ></ div >
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
2012-12-10 17:38:52 -08:00
< tr > " ;
$CHAP_list = array ( PRFLAN_180 , PRFLAN_181 , PRFLAN_182 );
$text .= "
2021-02-12 12:19:58 -08:00
< td >< label for = 'password-chap' > " .PRFLAN_178. " </ label > " .
$frm -> help ( PRFLAN_183 . " <br /> " . PRFLAN_179 ) . " </td>
2017-03-21 12:29:05 -07:00
< td > " ;
$CHAPopt = ! empty ( $pref [ 'ssl_enabled' ]) || ! empty ( $pref [ 'passwordEncoding' ]) ? array ( 'disabled' => 1 ) : null ;
$text .= $frm -> select ( 'password_CHAP' , $CHAP_list , $pref [ 'password_CHAP' ], $CHAPopt );
2012-12-20 22:51:38 +00:00
//." ".$frm->select_open('password_CHAP');
2012-12-10 17:38:52 -08:00
//TODO - user tracking session name - visible only if Cookie is enabled (JS)
2021-02-12 12:19:58 -08:00
$text .= " </td>
2008-12-17 17:27:07 +00:00
</ tr >
2012-12-10 17:38:52 -08:00
2008-12-17 17:27:07 +00:00
< tr >
2015-05-23 13:50:40 -07:00
< td >< label for = 'antiflood1' > " .PRFLAN_35. " </ label ></ td >
2012-11-26 14:41:32 -08:00
< td >
2008-12-19 14:01:07 +00:00
" . $frm->radio_switch ('antiflood1', $pref['antiflood1'] ). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'antiflood-timeout' > " .PRFLAN_36. " </ label > " . $frm->help (PRFLAN_38). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2012-11-01 00:34:38 +00:00
" . $frm->number ('antiflood_timeout', $pref['antiflood_timeout'] , 3). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'autoban' > " .PRFLAN_37. " </ label > " . $frm->help (PRFLAN_91). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2008-12-19 14:01:07 +00:00
" . $frm->select_open ('autoban');
2006-12-02 04:36:16 +00:00
2008-12-19 14:01:07 +00:00
$autoban_list = array (
PRFLAN_113 ,
PRFLAN_144 ,
PRFLAN_142 ,
PRFLAN_143
);
2006-12-02 04:36:16 +00:00
2008-12-17 17:27:07 +00:00
foreach ( $autoban_list as $ab => $ab_title )
{
$sel = ( $pref [ 'autoban' ] == $ab ) ? " selected='selected' " : " " ;
$text .= "
2008-12-19 14:01:07 +00:00
" . $frm->option ( $ab_title , $ab , ( $pref['autoban'] == $ab )). "
2008-12-17 17:27:07 +00:00
" ;
}
2006-12-02 04:36:16 +00:00
2008-12-17 17:27:07 +00:00
$text .= "
</ select >
2021-02-12 12:19:58 -08:00
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
2015-04-12 22:34:44 -07:00
< tr >
2021-02-12 12:19:58 -08:00
< td >< label for = 'failed-login-limit' > " .PRFLAN_231. " </ label > " . $frm->help (PRFLAN_232). " </ td >
2015-04-12 22:34:44 -07:00
< td >
" . $frm->number ('failed_login_limit', varset( $pref['failed_login_limit'] ,10), 3, array('max'=>10, 'min'=>0)). "
2021-02-12 12:19:58 -08:00
2015-04-12 22:34:44 -07:00
</ td >
</ tr >
2008-12-17 17:27:07 +00:00
< tr >
2015-05-23 13:50:40 -07:00
< td >< label for = 'adminpwordchange' > " .PRFLAN_139. " </ label ></ td >
2012-11-26 14:41:32 -08:00
< td >
2008-12-19 14:01:07 +00:00
" . $frm->radio_switch ('adminpwordchange', $pref['adminpwordchange'] ). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
</ tbody >
</ table >
" .pref_submit('security'). "
</ fieldset >
" ;
2007-07-18 20:20:27 +00:00
2008-12-17 17:27:07 +00:00
$text .= "
< fieldset class = 'e-hideme' id = 'core-prefs-comments' >
2021-02-15 10:58:49 -08:00
< h4 class = 'caption' > " .PRFLAN_53.SEP.PRFLAN_87. " </ h4 >
2012-11-26 14:41:32 -08:00
< table class = 'table adminform' >
2012-05-13 05:26:11 +00:00
< colgroup >
2008-12-17 17:27:07 +00:00
< col class = 'col-label' />
< col class = 'col-control' />
</ colgroup >
< tbody >
2012-06-17 03:56:42 +00:00
< tr >
2013-03-18 14:18:47 +01:00
< td > " .PRFLAN_161. " :</ td >
2012-11-26 14:41:32 -08:00
< td >
2018-07-12 21:17:01 +02:00
" . $frm->radio_switch ('comments_disabled', $pref['comments_disabled'] , LAN_YES, LAN_NO, array('inverse'=>1)). "
2012-06-17 03:56:42 +00:00
</ td >
</ tr >
2009-03-06 20:09:08 +00:00
< tr >
2021-02-12 12:19:58 -08:00
< td > " .PRFLAN_32. " " . $frm->help (PRFLAN_33). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2009-03-06 20:09:08 +00:00
" . $frm->radio_switch ('anon_post', $pref['anon_post'] , LAN_YES, LAN_NO). "
</ td >
</ tr >
2008-12-17 17:27:07 +00:00
< tr >
2012-11-26 14:41:32 -08:00
< td > " .PRFLAN_89. " : </ td >
< td >
2008-12-19 14:01:07 +00:00
" . $frm->radio_switch ('comments_icon', $pref['comments_icon'] , LAN_YES, LAN_NO). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
< tr >
2012-11-26 14:41:32 -08:00
< td > " .PRFLAN_88. " : </ td >
< td >
2008-12-19 14:01:07 +00:00
" . $frm->radio_switch ('nested_comments', $pref['nested_comments'] , LAN_YES, LAN_NO). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
2012-06-16 12:41:30 +00:00
2008-12-17 17:27:07 +00:00
< tr >
2012-11-26 14:41:32 -08:00
< td > " .PRFLAN_90. " : </ td >
< td >
2008-12-19 14:01:07 +00:00
" . $frm->radio_switch ('allowCommentEdit', $pref['allowCommentEdit'] , LAN_YES, LAN_NO). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
2012-06-17 03:56:42 +00:00
2008-12-17 17:27:07 +00:00
< tr >
2012-11-26 14:41:32 -08:00
< td > " .PRFLAN_166. " : </ td >
< td >
2008-12-19 14:01:07 +00:00
" . $frm->radio_switch ('comments_emoticons', $pref['comments_emoticons'] , LAN_YES, LAN_NO). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
2009-03-06 20:09:08 +00:00
2012-06-15 12:50:18 +00:00
< tr >
2021-02-12 12:19:58 -08:00
< td >< label > " .PRFLAN_233. " </ label > " . $frm->help (PRFLAN_234). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2012-06-17 10:27:09 +00:00
" .
2021-12-02 08:56:11 -08:00
$frm -> uc_select ( 'comments_moderate' , $pref [ 'comments_moderate' ], " nobody,guest,new,bots,public,member,admin,main,classes " ) .
2012-06-17 10:27:09 +00:00
"
2021-02-12 12:19:58 -08:00
</ td >
2012-06-15 12:50:18 +00:00
</ tr >
2012-06-16 12:41:30 +00:00
< tr >
2015-05-02 16:27:01 +02:00
< td > " .PRFLAN_235. " </ td >
2012-11-26 14:41:32 -08:00
< td > " ;
2012-06-16 12:41:30 +00:00
$comment_sort = array (
2015-05-02 16:27:01 +02:00
" desc " => PRFLAN_236 , //default
'asc' => PRFLAN_237
2012-06-16 12:41:30 +00:00
);
2018-06-25 14:26:50 +02:00
$text .= $frm -> select ( 'comments_sort' , $comment_sort , $pref [ 'comments_sort' ], array ( 'size' => 'xlarge' )) . "
2012-06-16 12:41:30 +00:00
</ td >
</ tr >
2012-06-15 12:50:18 +00:00
2008-12-17 17:27:07 +00:00
</ tbody >
</ table >
2009-09-28 21:00:18 +00:00
2021-02-15 10:58:49 -08:00
< h4 class = 'caption' > " .PRFLAN_209. " </ h4 >
2012-11-26 14:41:32 -08:00
< table class = 'table adminform' >
2012-05-13 05:26:11 +00:00
< colgroup >
2009-09-28 21:00:18 +00:00
< col class = 'col-label' />
< col class = 'col-control' />
</ colgroup >
< tbody >
< tr >
2012-11-26 14:41:32 -08:00
< td > " .PRFLAN_208. " :</ td >
< td >
2009-09-28 21:00:18 +00:00
" . $e_userclass->uc_dropdown ('email_item_class',varset( $pref['email_item_class'] ,e_UC_MEMBER),'nobody,admin,main,public,member,classes', " tabindex = '".$frm->getNext()."' " ). "
</ td >
</ tr >
</ tbody >
</ table >
2008-12-17 17:27:07 +00:00
" .pref_submit('comments'). "
</ fieldset >
2006-12-02 04:36:16 +00:00
" ;
2012-05-02 21:09:17 +00:00
2012-05-17 09:19:44 +00:00
// File Uploads
2017-01-23 09:41:23 -08:00
e107 :: includeLan ( e_LANGUAGEDIR . e_LANGUAGE . " /admin/lan_upload.php " );
2015-02-10 23:13:53 -08:00
require_once ( e_HANDLER . " upload_handler.php " );
2012-05-17 09:19:44 +00:00
$text .= "
< fieldset class = 'e-hideme' id = 'core-prefs-uploads' >
2021-02-15 10:58:49 -08:00
< h4 class = 'caption' > " .PRFLAN_53.SEP.PRFLAN_238. " </ h4 > " ;
2015-02-10 23:13:53 -08:00
$upload_max_filesize = ini_get ( 'upload_max_filesize' );
$post_max_size = ini_get ( 'post_max_size' );
$maxINI = min ( $upload_max_filesize , $post_max_size );
if ( $maxINI < $pref [ 'upload_maxfilesize' ])
{
$text .= " <div class='alert-block alert alert-danger'> " ;
2015-05-02 16:27:01 +02:00
$text .= PRFLAN_239 . " " . $maxINI . " </div> " ;
2015-02-10 23:13:53 -08:00
$pref [ 'upload_maxfilesize' ] = $maxINI ;
}
$text .= "
2012-11-26 14:41:32 -08:00
< table class = 'table adminform' >
2012-05-17 09:19:44 +00:00
< colgroup >
< col class = 'col-label' />
< col class = 'col-control' />
</ colgroup >
< tbody >
< tr >
2021-02-12 12:19:58 -08:00
< td >< label > " .UPLLAN_25. " </ label > " . $frm->help (UPLLAN_26). " </ td >
2012-11-26 14:41:32 -08:00
< td > " .
2012-05-17 09:19:44 +00:00
2017-02-10 09:41:22 -08:00
$frm -> radio_switch ( 'upload_enabled' , $pref [ 'upload_enabled' ])
2021-02-12 12:19:58 -08:00
. " </td>
2012-05-17 09:19:44 +00:00
</ tr >
< tr >
2021-02-12 12:19:58 -08:00
< td >< label > " .UPLLAN_33. " </ label > " . $frm->help (UPLLAN_34). "
2012-05-17 09:19:44 +00:00
</ td >
2012-11-26 14:41:32 -08:00
< td > " .
2012-05-17 09:19:44 +00:00
$frm -> text ( 'upload_maxfilesize' , $pref [ 'upload_maxfilesize' ], 10 )
. "
2021-02-12 12:19:58 -08:00
</ td >
2012-05-17 09:19:44 +00:00
</ tr >
< tr >
2021-02-12 12:19:58 -08:00
< td >< label > " .UPLLAN_37. " </ label > " . $frm->help (UPLLAN_38). " </ td >
2012-11-26 14:41:32 -08:00
< td > " .r_userclass( " upload_class " , $pref['upload_class'] , " off " , " nobody , public , guest , member , admin , classes " ). "
2012-05-17 09:19:44 +00:00
</ td >
</ tr >
2021-04-21 16:48:04 -07:00
< tr >< td > " .PRFLAN_240. " < sup >**</ sup ></ td >
< td > " ;
$fType = [ e_UC_MEMBER => UC_LAN_3 , e_UC_ADMIN => UC_LAN_5 , e_UC_MAINADMIN => UC_LAN_6 ];
$tabs = [];
foreach ( $fType as $class => $label )
{
$tabs [ $class ] = array ( 'caption' => $label , 'text' => filePermRender ( $class ));
}
function filePermRender ( $class )
{
$fl = e107 :: getFile ();
$text = " <table class='table table-striped table-bordered' style='margin:0'>
< tr >< th > " .LAN_TYPE. " </ th >< th > " .UPLLAN_33. " </ th ></ tr > " ;
$data = $fl -> getAllowedFileTypes ( $class );
if ( empty ( $data ))
{
$data = $fl -> getAllowedFileTypes ( e_UC_MEMBER );
}
foreach ( $data as $k => $v )
{
if ( empty ( $k ))
{
continue ;
}
$text .= " <tr><td class='col-label'> " . $k . " </td>
< td > " . $fl->file_size_encode ( $v ). " </ td >
</ tr > " ;
}
$text .= " </table> " ;
return $text ;
}
$text .= e107 :: getForm () -> tabs ( $tabs );
/*
$text .= "
2015-02-10 23:13:53 -08:00
< table class = 'table table-striped table-bordered' >
< tr >< th > " .LAN_TYPE. " </ th >< th > " .UPLLAN_33. " </ th >
" ;
2018-08-20 13:41:21 -07:00
2015-02-10 23:13:53 -08:00
$fl = e107 :: getFile ();
2018-08-20 13:41:21 -07:00
$data = $fl -> getAllowedFileTypes ();
2015-02-10 23:13:53 -08:00
foreach ( $data as $k => $v )
{
$text .= " <tr><td> " . $k . " </td>
< td > " . $fl->file_size_encode ( $v ). " </ td >
</ tr > " ;
2018-08-20 13:41:21 -07:00
2015-02-10 23:13:53 -08:00
}
2018-08-20 13:41:21 -07:00
// $text .= print_a($data,true);
2015-02-10 23:13:53 -08:00
2021-04-21 16:48:04 -07:00
$text .= " </table> " ;
*/
$text .= "
< div style = 'padding:15px 0' > " .PRFLAN_241. " < b > " .str_replace( " ../ " ,'',e_SYSTEM).e_READ_FILETYPES. " </ b ></ div >
2015-02-10 23:13:53 -08:00
</ td >
2012-05-17 09:19:44 +00:00
</ tbody >
</ table >
2015-02-10 23:13:53 -08:00
" .pref_submit('uploads');
$text .= "
2017-01-26 12:45:45 +01:00
</ fieldset > " ;
2021-02-15 10:58:49 -08:00
$text .= " <fieldset class='e-hideme' id='core-prefs-javascript'>
< h4 class = 'caption' > " .PRFLAN_53.SEP.PRFLAN_257 . " </ h4 > " ;
2017-01-27 11:51:28 +01:00
2017-01-26 12:45:45 +01:00
if ( E107_DEBUG_LEVEL > 0 )
{
// TODO - remove these old JS settings completely!
// Javascript Control
$text .= "
2021-02-15 10:58:49 -08:00
< h4 > " .PRFLAN_242 . " </ h4 >
2012-11-26 14:41:32 -08:00
< table class = 'table adminform' >
2012-05-13 05:26:11 +00:00
< colgroup >
2012-05-02 21:09:17 +00:00
< col class = 'col-label' />
< col class = 'col-control' />
</ colgroup >
< tbody > " ;
2012-06-13 12:34:09 +00:00
2017-01-26 12:45:45 +01:00
$js_options = array (
'auto' => PRFLAN_243 , // load based on dependency
'admin' => PRFLAN_244 , // Always load in admin
'front' => PRFLAN_245 , // Always load in front-end
'all' => PRFLAN_246 , // Always load in admin and front-end
'none' => PRFLAN_247 // disabled
);
2016-02-09 18:17:41 -08:00
2017-01-26 12:45:45 +01:00
$js_types = array (
array ( 'id' => 'jquery' , 'name' => 'jQuery (local)' ),
array ( 'id' => 'prototype' , 'name' => 'Prototype (local)' ),
);
2016-02-09 18:17:41 -08:00
2017-01-26 12:45:45 +01:00
foreach ( $js_types as $arr )
{
// $k = $arr['path'];
$k = $arr [ 'id' ];
$name = $arr [ 'name' ];
$text .= " <tr>
< td > " . $name . " </ td >
< td > " . $frm->radio ( " e_jslib_core [{ $k }] " , $js_options , $pref['e_jslib_core'] [ $k ]) . " </ td >
</ tr > " ;
}
2016-02-09 18:17:41 -08:00
2017-01-26 12:45:45 +01:00
$text .= "
</ tbody >
</ table >
2012-11-26 14:41:32 -08:00
< table class = 'table adminform' style = 'margin-top: 20px' >
2012-05-16 03:10:56 +00:00
< colgroup >
2012-05-14 11:07:04 +00:00
< col class = 'col-label' />
< col class = 'col-control' />
</ colgroup >
2016-02-09 18:17:41 -08:00
< thead >
< tr >< th colspan = '2' >< span class = 'label label-warning' > DEPRECATED </ span > Available only in DEBUG mode </ th ></ tr >
</ thead >
2012-05-14 11:07:04 +00:00
< tbody >
< tr >
2021-02-12 12:19:58 -08:00
< td >< label > " . PRFLAN_248 . " </ label > " . $frm->help ( PRFLAN_249 ). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2017-01-26 12:45:45 +01:00
" . $frm->radio_switch ('e_jslib_nocombine', $pref['e_jslib_nocombine'] , LAN_YES, LAN_NO) . "
2012-05-14 11:07:04 +00:00
</ td >
</ tr >
< tr >
2021-02-12 12:19:58 -08:00
< td >< label > " . PRFLAN_250 . " </ label > " . $frm->help ( PRFLAN_251 ). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2017-01-26 12:45:45 +01:00
" . $frm->radio_switch ('e_jslib_gzip', $pref['e_jslib_gzip'] , LAN_YES, LAN_NO) . "
2012-05-14 11:07:04 +00:00
</ td >
</ tr >
< tr >
2021-02-12 12:19:58 -08:00
< td >< label > " . PRFLAN_252 . " </ label > " . $frm->help ( PRFLAN_251 ). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2017-01-26 12:45:45 +01:00
" . $frm->radio_switch ('e_jslib_nocache', $pref['e_jslib_nocache'] , LAN_YES, LAN_NO) . "
2012-05-14 11:07:04 +00:00
</ td >
</ tr >
< tr >
2021-02-12 12:19:58 -08:00
< td >< label > " . PRFLAN_253 . " </ label > " . $frm->help ( PRFLAN_251 ). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2017-01-26 12:45:45 +01:00
" . $frm->radio_switch ('e_jslib_nobcache', $pref['e_jslib_nobcache'] , LAN_YES, LAN_NO) . "
2012-05-14 11:07:04 +00:00
</ td >
</ tr >
2017-01-26 12:45:45 +01:00
" ;
2016-02-09 18:17:41 -08:00
2017-01-29 18:24:38 +01:00
$text .= " </tbody></table> " ;
2017-01-26 12:45:45 +01:00
}
else
{
$text .= " <div> " ;
$text .= $frm -> hidden ( 'e_jslib_core[jquery]' , 'all' );
$text .= $frm -> hidden ( 'e_jslib_core[prototype]' , 'none' );
$text .= $frm -> hidden ( 'e_jslib_nocombine' , 1 );
$text .= $frm -> hidden ( 'e_jslib_nocache' , 1 );
$text .= $frm -> hidden ( 'e_jslib_nobcache' , 1 );
$text .= $frm -> hidden ( 'e_jslib_gzip' , 0 );
$text .= " </div> " ;
}
2016-02-09 18:17:41 -08:00
2017-01-26 12:45:45 +01:00
/**
* @ addtogroup CDN settings
* @ {
*/
2016-06-21 10:40:41 +02:00
// [e_LANGUAGEDIR]/[e_LANGUAGE]/lan_library_manager.php
e107 :: lan ( 'core' , 'library_manager' );
2017-01-08 12:02:10 +01:00
$CDNproviders = array (
'jsdelivr' => 'jsDelivr' ,
'cdnjs' => 'cdnjs' ,
);
$text .= '
< h4 class = " caption " > ' . LAN_LIBRARY_MANAGER_30 . ' </ h4 >
< table class = " table adminform " >
< colgroup >
< col class = " col-label " />
< col class = " col-control " />
</ colgroup >
< tbody >
< tr >
< td > ' . LAN_LIBRARY_MANAGER_31 . ' </ td >
< td >
' . $frm->radio("e_jslib_cdn", array(1 => LAN_YES, 0 => LAN_NO), varset($pref[' e_jslib_cdn '], 1)) . '
</ td >
</ tr >
< tr >
< td > ' . LAN_LIBRARY_MANAGER_32 . ' </ td >
< td >
' . $frm->select("e_jslib_cdn_provider", $CDNproviders, varset($pref[' e_jslib_cdn_provider '], ' jsdelivr ')) . '
</ td >
</ tr >
</ tbody >
</ table >
' ;
// Submit button.
$text .= pref_submit ( 'javascript' );
2016-06-21 10:40:41 +02:00
2017-01-26 12:45:45 +01:00
/**
* @ } End of " addtogroup CDN settings " .
*/
/**
* @ addtogroup Third - party libraries
* @ {
*/
2017-01-08 12:02:10 +01:00
$text .= '<h4 class="caption">' . LAN_LIBRARY_MANAGER_25 . '</h4>' ;
2021-02-04 08:45:10 -08:00
$text .= '<table class="table table-striped">' ;
2016-06-21 10:40:41 +02:00
$text .= '<thead>' ;
$text .= '<tr>' ;
$text .= '<th>' . LAN_LIBRARY_MANAGER_13 . '</th>' ;
$text .= '<th class="text-center">' . LAN_LIBRARY_MANAGER_21 . '</th>' ;
2017-01-08 12:02:10 +01:00
$text .= '<th>' . LAN_LIBRARY_MANAGER_29 . '</th>' ;
2017-01-09 11:39:09 +00:00
$text .= '<th class="text-center">' . LAN_VERSION . '</th>' ;
$text .= '<th class="text-center">' . LAN_STATUS . '</th>' ;
$text .= '<th>' . LAN_MESSAGE . '</th>' ;
$text .= '<th>' . LAN_MOREINFO . '</th>' ;
2016-06-21 10:40:41 +02:00
$text .= '</tr>' ;
$text .= '</thead>' ;
$text .= '<tbody>' ;
2020-12-19 09:01:17 -08:00
$lib = e107 :: getLibrary ();
$libraries = $lib -> info ();
2016-06-21 10:40:41 +02:00
foreach ( $libraries as $machineName => $library )
{
2020-12-19 09:01:17 -08:00
$details = $lib -> detect ( $machineName );
2016-06-21 10:40:41 +02:00
if ( empty ( $details [ 'name' ]))
{
continue ;
}
$name = libraryGetName ( $machineName , $details );
$provider = libraryGetProvider ( $details );
$status = libraryGetStatus ( $details );
$links = libraryGetLinks ( $details );
$text .= '<tr>' ;
$text .= '<td>' . $name . '</td>' ;
$text .= '<td class="text-center">' . $provider . '</td>' ;
2021-11-26 12:43:23 -08:00
$text .= '<td class="smalltext">' . varset ( $details [ 'library_path' ]);
$text .= ! empty ( $details [ 'path' ]) ? '/' . $details [ 'path' ] : '' ;
$text .= '</td>' ;
2016-12-05 15:37:36 -08:00
$text .= '<td class="text-center">' . varset ( $details [ 'version' ]) . '</td>' ;
2016-06-21 10:40:41 +02:00
$text .= '<td class="text-center">' . $status . '</td>' ;
2016-12-05 15:37:36 -08:00
$text .= '<td>' . varset ( $details [ 'error_message' ]) . '</td>' ;
2016-06-21 10:40:41 +02:00
$text .= '<td>' . $links . '</td>' ;
$text .= '</tr>' ;
}
if ( empty ( $libraries ))
{
$text .= '<tr>' ;
2017-01-09 11:39:09 +00:00
$text .= '<td colspan="6">' . LAN_NOT_FOUND . '</td>' ;
2016-06-21 10:40:41 +02:00
$text .= '</tr>' ;
}
$text .= '</tbody>' ;
$text .= '</table>' ;
$text .= " </fieldset> " ;
2017-01-08 12:02:10 +01:00
2017-01-26 12:45:45 +01:00
/**
* @ } End of " addtogroup Third-party libraries " .
*/
/**
* @ addtogroup Advanced Features
* @ {
*/
2006-12-02 04:36:16 +00:00
2008-12-17 17:27:07 +00:00
$text .= "
< fieldset class = 'e-hideme' id = 'core-prefs-advanced' >
2021-02-15 10:58:49 -08:00
< h4 class = 'caption' > " .PRFLAN_53.SEP.PRFLAN_149. " </ h4 >
2012-11-26 14:41:32 -08:00
< table class = 'table adminform' >
2012-05-13 05:26:11 +00:00
< colgroup >
2008-12-17 17:27:07 +00:00
< col class = 'col-label' />
< col class = 'col-control' />
</ colgroup >
< tbody >
< tr >
2021-02-12 12:19:58 -08:00
< td > " .PRFLAN_147. " : " . $frm->help (PRFLAN_148). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2008-12-19 14:01:07 +00:00
" . $frm->radio_switch ('developer', $pref['developer'] ). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
< tr >
2021-02-12 12:19:58 -08:00
< td > " .PRFLAN_196. " " . $frm->help (PRFLAN_196a. " < strong > " .e_LOG. " </ strong > " ). " </ td >
2012-11-26 14:41:32 -08:00
< td >
2008-12-19 14:01:07 +00:00
" . $frm->radio_switch ('log_page_accesses', $pref['log_page_accesses'] ). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
< tr >
2012-11-26 14:41:32 -08:00
< td > " .PRFLAN_17. " </ td >
< td >
2008-12-19 14:01:07 +00:00
" . $frm->radio_switch ('compress_output', $pref['compress_output'] ). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
2008-12-19 14:01:07 +00:00
" ;
$auth_dropdown = '' ;
2021-01-16 13:32:35 -08:00
if ( ! empty ( $authlist ))
2008-12-19 14:01:07 +00:00
{
2009-06-12 20:41:35 +00:00
$auth_dropdown = " \n " . $frm -> select_open ( 'auth_method' ) . " \n " ;
2008-12-19 14:01:07 +00:00
foreach ( $authlist as $a )
{
2009-06-12 20:41:35 +00:00
$auth_dropdown .= $frm -> option ( $a , $a , ( $pref [ 'auth_method' ] == $a )) . " \n " ;
2008-12-19 14:01:07 +00:00
}
2009-06-12 20:41:35 +00:00
$auth_dropdown .= " </select> \n " ;
2008-12-19 14:01:07 +00:00
}
else
{
$auth_dropdown = " <input type='hidden' name='auth_method' value='' /> " . PRFLAN_151 ;
$pref [ 'auth_method' ] = " " ;
}
$text .= "
2008-12-17 17:27:07 +00:00
< tr >
2012-11-26 14:41:32 -08:00
< td > " .PRFLAN_150. " </ td >
< td >
2008-12-17 17:27:07 +00:00
{ $auth_dropdown }
</ td >
</ tr >
< tr >
2012-11-26 14:41:32 -08:00
< td > " .PRFLAN_173. " </ td >
< td >
2008-12-19 14:01:07 +00:00
" . $frm->radio_switch ('check_updates', $pref['check_updates'] ). "
2008-12-17 17:27:07 +00:00
</ td >
</ tr >
</ tbody >
</ table >
" .pref_submit('advanced'). "
</ fieldset >
" ;
2006-12-02 04:36:16 +00:00
2017-01-26 12:45:45 +01:00
/**
* @ } End of " addtogroup Advanced Features " .
*/
2006-12-02 04:36:16 +00:00
2008-12-17 17:27:07 +00:00
$text .= "
</ form >
</ div >
" ;
2021-02-15 10:58:49 -08:00
//PRFLAN_53
$ns -> tablerender ( null , $mes -> render () . $text );
2006-12-02 04:36:16 +00:00
2008-12-17 17:27:07 +00:00
require_once ( e_ADMIN . " footer.php " );
2006-12-02 04:36:16 +00:00
2008-12-17 17:27:07 +00:00
function pref_submit ( $post_id = '' )
{
global $frm ;
if ( $post_id ) $post_id = '-' . $post_id ;
$text = "
< div class = 'buttons-bar center' > " ;
2006-12-02 04:36:16 +00:00
// ML
/* if ( e_MLANG == 1 ){
//$text .="<input class='fcaption' type='submit' name='updateprefs' value='".PRFLAN_52."' />
$but_typ = array ( " " ); // empty = submit
$but_nam = array ( " updateprefs " ); // empty = autobutX with X autoincrement
$but_val = array ( " updateprefs " ); // empty = Submit
$but_class = array ( " caption " ); // empty = button
$butjs = array ( " " ); // empty = ""
$buttitle = array ( " " ); // empty = ""
$text .= e107ml_adpanel ( 1 , $but_typ , $but_nam , $but_val , $but_class , $butjs , $buttitle );
} else { */
2008-12-17 17:27:07 +00:00
$text .= $frm -> admin_button ( 'updateprefs' , PRFLAN_52 , 'update' , '' , " id=updateprefs { $post_id } " );
2006-12-02 04:36:16 +00:00
// }
2008-12-17 17:27:07 +00:00
$text .= " \n </div> " ;
2006-12-02 04:36:16 +00:00
// END ML
return $text ;
}
2008-12-17 17:27:07 +00:00
function prefs_adminmenu ()
{
2021-02-01 18:18:30 -08:00
$var [ 'core-prefs-header1' ][ 'header' ] = LAN_BASIC_OPTIONS ;
2008-12-17 17:27:07 +00:00
$var [ 'core-prefs-main' ][ 'text' ] = PRFLAN_1 ;
2021-02-01 18:18:30 -08:00
$var [ 'core-prefs-main' ][ 'image_src' ] = 'fa-home.glyph' ;
2015-05-02 16:27:01 +02:00
$var [ 'core-prefs-email' ][ 'text' ] = PRFLAN_254 ;
2021-02-01 18:18:30 -08:00
$var [ 'core-prefs-email' ][ 'image_src' ] = 'fa-envelope.glyph' ;
2018-08-28 12:28:41 +02:00
$var [ 'core-prefs-gdpr' ][ 'text' ] = PRFLAN_277 ;
2021-02-01 18:18:30 -08:00
$var [ 'core-prefs-gdpr' ][ 'image_src' ] = 'fa-cookie.glyph' ;
2008-12-17 17:27:07 +00:00
$var [ 'core-prefs-registration' ][ 'text' ] = PRFLAN_28 ;
2021-02-01 18:18:30 -08:00
$var [ 'core-prefs-registration' ][ 'image_src' ] = 'fas-user-plus.glyph' ;
2008-12-17 17:27:07 +00:00
$var [ 'core-prefs-signup' ][ 'text' ] = PRFLAN_19 ;
2021-02-01 18:18:30 -08:00
$var [ 'core-prefs-signup' ][ 'image_src' ] = 'fas-clipboard-list.glyph' ;
2012-12-10 16:01:44 -08:00
2009-09-28 21:00:18 +00:00
$var [ 'core-prefs-comments' ][ 'text' ] = PRFLAN_210 ;
2021-02-01 18:18:30 -08:00
$var [ 'core-prefs-comments' ][ 'image_src' ] = 'fa-comments.glyph' ;
2015-05-02 16:27:01 +02:00
$var [ 'core-prefs-uploads' ][ 'text' ] = PRFLAN_255 ;
2021-02-01 18:18:30 -08:00
$var [ 'core-prefs-uploads' ][ 'image_src' ] = 'file-upload.glyph' ;
2017-11-16 20:18:11 -08:00
$var [ 'core-prefs-header2' ][ 'header' ] = PRFLAN_256 ;
2021-02-01 18:18:30 -08:00
2012-12-10 16:01:44 -08:00
$var [ 'core-prefs-display' ][ 'text' ] = PRFLAN_13 ;
2021-02-01 18:18:30 -08:00
$var [ 'core-prefs-display' ][ 'image_src' ] = 'fas-info-circle.glyph' ;
2012-12-10 16:01:44 -08:00
$var [ 'core-prefs-admindisp' ][ 'text' ] = PRFLAN_77 ;
2021-02-01 18:18:30 -08:00
$var [ 'core-prefs-admindisp' ][ 'image_src' ] = 'fa-dashboard.glyph' ;
2021-02-15 10:58:49 -08:00
$var [ 'core-prefs-textpost' ][ 'text' ] = PRFLAN_286 ;
2021-02-01 18:18:30 -08:00
$var [ 'core-prefs-textpost' ][ 'image_src' ] = 'fa-filter.glyph' ;
2012-12-10 16:01:44 -08:00
$var [ 'core-prefs-security' ][ 'text' ] = PRFLAN_47 ;
2021-02-01 18:18:30 -08:00
$var [ 'core-prefs-security' ][ 'image_src' ] = 'fas-shield-alt.glyph' ;
$var [ 'core-prefs-date' ][ 'text' ] = PRFLAN_21 ;
$var [ 'core-prefs-date' ][ 'image_src' ] = 'fa-calendar.glyph' ;
2015-05-02 16:27:01 +02:00
$var [ 'core-prefs-javascript' ][ 'text' ] = PRFLAN_257 ;
2021-02-01 18:18:30 -08:00
$var [ 'core-prefs-javascript' ][ 'image_src' ] = 'fab-js.glyph' ;
2008-12-17 17:27:07 +00:00
$var [ 'core-prefs-advanced' ][ 'text' ] = PRFLAN_149 ;
2021-02-01 18:18:30 -08:00
$var [ 'core-prefs-advanced' ][ 'image_src' ] = 'fa-cogs.glyph' ;
$caption = " <span> " . LAN_PREFS . " </span> " ;
2017-11-16 20:18:11 -08:00
2021-02-01 18:18:30 -08:00
$var [ '_extras_' ][ 'icon' ] = e107 :: getParser () -> toIcon ( 'e-prefs-24' );
2017-11-16 20:18:11 -08:00
e107 :: getNav () -> admin ( $caption . '--id--prev_nav' , 'core-prefs-main' , $var );
2008-12-18 16:55:46 +00:00
}
2017-01-26 12:45:45 +01:00
/**
* @ addtogroup Third - party libraries
* @ {
*/
2016-06-21 10:40:41 +02:00
/**
* Helper function to get library ' s name .
*/
function libraryGetName ( $machineName , $details )
{
$text = e107 :: getParser () -> lanVars ( LAN_LIBRARY_MANAGER_27 , array ( $machineName ));
2021-01-26 15:08:58 -08:00
return '<span data-toggle="tooltip" data-bs-toggle="tooltip" data-placement="top" title="' . $text . '">' . $details [ 'name' ] . '</span>' ;
2016-06-21 10:40:41 +02:00
}
/**
* Helper function to get links .
*/
function libraryGetLinks ( $details )
{
$homepage = libraryGetHomepage ( $details );
$download = libraryGetDownload ( $details );
if ( $homepage && $download )
{
return $homepage . ' | ' . $download ;
}
if ( $homepage )
{
return $homepage ;
}
if ( $download )
{
return $download ;
}
}
/**
* Helper function to get homepage link .
*/
function libraryGetHomepage ( $details )
{
if ( empty ( $details [ 'vendor_url' ]))
{
return false ;
}
$href = $details [ 'vendor_url' ];
$title = $details [ 'name' ];
2017-01-09 11:39:09 +00:00
return '<a href="' . $href . '" title="' . $title . '" target="_blank">' . LAN_WEBSITE . '</a>' ;
2016-06-21 10:40:41 +02:00
}
/**
* Helper function to get download link .
*/
function libraryGetDownload ( $details )
{
if ( empty ( $details [ 'download_url' ]))
{
return false ;
}
$href = $details [ 'download_url' ];
$title = $details [ 'name' ];
2017-01-09 11:39:09 +00:00
return '<a href="' . $href . '" title="' . $title . '" target="_blank">' . LAN_DOWNLOAD . '</a>' ;
2016-06-21 10:40:41 +02:00
}
/**
* Helper function to get provider .
*/
function libraryGetProvider ( $details )
{
$text = 'e107' ;
2017-01-09 11:39:09 +00:00
$provider = LAN_CORE ;
2016-06-21 10:40:41 +02:00
if ( varset ( $details [ 'plugin' ], false ) == true )
{
$text = $details [ 'plugin' ];
2017-01-09 11:39:09 +00:00
$provider = LAN_PLUGIN ;
2016-06-21 10:40:41 +02:00
}
if ( varset ( $details [ 'theme' ], false ) == true )
{
$text = $details [ 'theme' ];
2017-01-09 11:39:09 +00:00
$provider = LAN_THEME ;
2016-06-21 10:40:41 +02:00
}
2021-01-26 15:08:58 -08:00
return '<span data-toggle="tooltip" data-bs-toggle="tooltip" data-placement="top" title="' . $text . '">' . $provider . '</span>' ;
2016-06-21 10:40:41 +02:00
}
/**
* Helper function to get status .
*/
function libraryGetStatus ( $details )
{
$tp = e107 :: getParser ();
if ( $details [ 'installed' ] == true )
{
2019-02-22 14:56:47 -08:00
$icon = $tp -> toGlyph ( 'fa-check' );
2016-06-21 10:40:41 +02:00
$text = LAN_OK ;
2021-01-26 15:08:58 -08:00
return '<span class="text-success" data-toggle="tooltip" data-bs-toggle="tooltip" data-placement="top" title="' . $text . '">' . $icon . '</span>' ;
2016-06-21 10:40:41 +02:00
}
2019-02-22 14:56:47 -08:00
$icon = $tp -> toGlyph ( 'fa-remove' );
2016-06-21 10:40:41 +02:00
$text = $details [ 'error' ];
2021-01-26 15:08:58 -08:00
return '<span class="text-danger" data-toggle="tooltip" data-bs-toggle="tooltip" data-placement="top" title="' . $text . '">' . $icon . '</span>' ;
2016-06-21 10:40:41 +02:00
}
2017-01-26 12:45:45 +01:00
/**
* @ } End of " addtogroup Third-party libraries " .
*/