function cot_install_step3_tags() { global $t, $rtheme, $rscheme; $rtheme = 'bootlance'; $t->assign(array('INSTALL_THEME_SELECT' => cot_selectbox_theme($rtheme, $rscheme, 'theme'))); }
$title_params = array('EDIT' => $L['Edit'], 'NAME' => $urr['user_name']); $out['subtitle'] = cot_title('{EDIT} - {NAME}', $title_params); $out['head'] .= $R['code_noindex']; $mskin = cot_tplfile(array('users', 'edit', $usr['maingrp']), 'module'); /* === Hook === */ foreach (cot_getextplugins('users.edit.main') as $pl) { include $pl; } /* ===== */ require_once $cfg['system_dir'] . '/header.php'; $t = new XTemplate($mskin); require_once cot_incfile('forms'); $protected = $sys['protecttopadmin'] ? array('disabled' => 'disabled') : array(); $editor_class = $cfg['users']['usertextimg'] ? 'minieditor' : ''; $delete_pfs = cot_module_active('pfs') ? cot_checkbox(false, 'ruserdelpfs', $L['PFS']) : ''; $t->assign(array('USERS_EDIT_TITLE' => cot_breadcrumbs(array(array(cot_url('users'), $L['Users']), array(cot_url('users', 'm=details&id=' . $urr['user_id'] . '&u=' . $urr['user_name']), $urr['user_name']), array(cot_url('users', 'm=edit&id=' . $urr['user_id']), $L['Edit'])), $cfg['homebreadcrumb']), 'USERS_EDIT_DETAILSLINK' => cot_url('users', 'm=details&id=' . $urr['user_id']), 'USERS_EDIT_EDITLINK' => cot_url('users', 'm=edit&id=' . $urr['user_id']), 'USERS_EDIT_SUBTITLE' => $L['useed_subtitle'], 'USERS_EDIT_SEND' => cot_url('users', 'm=edit&a=update&' . cot_xg() . '&id=' . $urr['user_id']), 'USERS_EDIT_ID' => $urr['user_id'], 'USERS_EDIT_NAME' => cot_inputbox('text', 'rusername', $urr['user_name'], array('size' => 32, 'maxlength' => 100) + $protected), 'USERS_EDIT_ACTIVE' => $user_form_active, 'USERS_EDIT_BANNED' => $user_form_banned, 'USERS_EDIT_THEME' => cot_selectbox_theme($urr['user_theme'], $urr['user_scheme'], 'rusertheme'), 'USERS_EDIT_LANG' => cot_selectbox_lang($urr['user_lang'], 'ruserlang'), 'USERS_EDIT_NEWPASS' => cot_inputbox('password', 'rusernewpass', '', array('size' => 12, 'maxlength' => 32, 'autocomplete' => 'off') + $protected), 'USERS_EDIT_MAINGRP' => cot_build_group($urr['user_maingrp']), 'USERS_EDIT_GROUPS' => cot_build_groupsms($urr['user_id'], $usr['isadmin'], $urr['user_maingrp']), 'USERS_EDIT_COUNTRY' => cot_selectbox_countries($urr['user_country'], 'rusercountry'), 'USERS_EDIT_EMAIL' => cot_inputbox('text', 'ruseremail', $urr['user_email'], array('size' => 32, 'maxlength' => 64)), 'USERS_EDIT_HIDEEMAIL' => cot_radiobox($urr['user_hideemail'], 'ruserhideemail', array(1, 0), array($L['Yes'], $L['No'])), 'USERS_EDIT_TEXT' => cot_textarea('rusertext', $urr['user_text'], 4, 56, array('class' => $editor_class)), 'USERS_EDIT_GENDER' => cot_selectbox_gender($urr['user_gender'], 'rusergender'), 'USERS_EDIT_BIRTHDATE' => cot_selectbox_date(cot_date2stamp($urr['user_birthdate']), 'short', 'ruserbirthdate', cot_date('Y', $sys['now']), cot_date('Y', $sys['now']) - 100, false), 'USERS_EDIT_TIMEZONE' => cot_selectbox_timezone($urr['user_timezone'], 'rusertimezone'), 'USERS_EDIT_REGDATE' => cot_date('datetime_medium', $urr['user_regdate']), 'USERS_EDIT_REGDATE_STAMP' => $urr['user_regdate'], 'USERS_EDIT_LASTLOG' => cot_date('datetime_medium', $urr['user_lastlog']), 'USERS_EDIT_LASTLOG_STAMP' => $urr['user_lastlog'], 'USERS_EDIT_LOGCOUNT' => $urr['user_logcount'], 'USERS_EDIT_LASTIP' => cot_build_ipsearch($urr['user_lastip']), 'USERS_EDIT_DELETE' => cot::$sys['user_istopadmin'] ? cot_radiobox(0, 'ruserdelete', array(1, 0), array(cot::$L['Yes'], cot::$L['No'])) . $delete_pfs : cot::$L['na'])); // Extra fields if (!empty(cot::$extrafields[cot::$db->users])) { foreach (cot::$extrafields[cot::$db->users] as $exfld) { $uname = strtoupper($exfld['field_name']); $exfld_val = cot_build_extrafields('ruser' . $exfld['field_name'], $exfld, $urr['user_' . $exfld['field_name']]); $exfld_title = cot_extrafield_title($exfld, 'user_'); $t->assign(array('USERS_EDIT_' . $uname => $exfld_val, 'USERS_EDIT_' . $uname . '_TITLE' => $exfld_title, 'USERS_EDIT_EXTRAFLD' => $exfld_val, 'USERS_EDIT_EXTRAFLD_TITLE' => $exfld_title)); $t->parse('MAIN.EXTRAFLD'); } } // Error and message reporting cot_display_messages($t); /* === Hook === */ foreach (cot_getextplugins('users.edit.tags') as $pl) { include $pl;
$status['mysql'] = extension_loaded('pdo_mysql') ? $R['install_code_available'] : $R['install_code_not_available']; $t->assign(array('INSTALL_AV_DIR' => $status['avatars_dir'], 'INSTALL_CACHE_DIR' => $status['cache_dir'], 'INSTALL_PFS_DIR' => $status['pfs_dir'], 'INSTALL_EXFLDS_DIR' => $status['exflds_dir'], 'INSTALL_PHOTOS_DIR' => $status['photos_dir'], 'INSTALL_THUMBS_DIR' => $status['thumbs_dir'], 'INSTALL_CONFIG' => $status['config'], 'INSTALL_CONFIG_SAMPLE' => $status['config_sample'], 'INSTALL_SQL_FILE' => $status['sql_file'], 'INSTALL_PHP_VER' => $status['php_ver'], 'INSTALL_MBSTRING' => $status['mbstring'], 'INSTALL_HASH' => $status['hash'], 'INSTALL_MYSQL' => $status['mysql'])); break; case 2: // Database form $t->assign(array('INSTALL_DB_HOST' => is_null($db_host) ? $cfg['mysqlhost'] : $db_host, 'INSTALL_DB_PORT' => is_null($db_port) ? $cfg['mysqlport'] : $db_port, 'INSTALL_DB_USER' => is_null($db_user) ? $cfg['mysqluser'] : $db_user, 'INSTALL_DB_NAME' => is_null($db_name) ? $cfg['mysqldb'] : $db_name, 'INSTALL_DB_X' => $db_x, 'INSTALL_DB_HOST_INPUT' => cot_inputbox('text', 'db_host', is_null($db_host) ? $cfg['mysqlhost'] : $db_host, 'size="32"'), 'INSTALL_DB_PORT_INPUT' => cot_inputbox('text', 'db_port', is_null($db_port) ? $cfg['mysqlport'] : $db_port, 'size="32"'), 'INSTALL_DB_USER_INPUT' => cot_inputbox('text', 'db_user', is_null($db_user) ? $cfg['mysqluser'] : $db_user, 'size="32"'), 'INSTALL_DB_NAME_INPUT' => cot_inputbox('text', 'db_name', is_null($db_name) ? $cfg['mysqldb'] : $db_name, 'size="32"'), 'INSTALL_DB_PASS_INPUT' => cot_inputbox('password', 'db_pass', '', 'size="32"'), 'INSTALL_DB_X_INPUT' => cot_inputbox('text', 'db_x', $db_x, 'size="32"'))); break; case 3: // Settings if ($_POST['step'] != 3 && !cot_check_messages()) { $rtheme = $theme; $rscheme = $scheme; $rlang = $cfg['defaultlang']; $cfg['mainurl'] = $site_url; } $t->assign(array('INSTALL_THEME_SELECT' => cot_selectbox_theme($rtheme, $rscheme, 'theme'), 'INSTALL_LANG_SELECT' => cot_selectbox_lang($rlang, 'lang'), 'INSTALL_COUNTRY_SELECT' => cot_selectbox_countries($user['country'], 'user_country'), 'INSTALL_MAINURL' => cot_inputbox('text', 'mainurl', $cfg['mainurl'], 'size="32"'), 'INSTALL_USERNAME' => cot_inputbox('text', 'user_name', $user['name'], 'size="32"'), 'INSTALL_PASS1' => cot_inputbox('password', 'user_pass', '', 'size="32"'), 'INSTALL_PASS2' => cot_inputbox('password', 'user_pass2', '', 'size="32"'), 'INSTALL_EMAIL' => cot_inputbox('text', 'user_email', $user['email'], 'size="32"'))); case 4: // Extensions cot_install_parse_extensions('Module', $default_modules, $selected_modules); cot_install_parse_extensions('Plugin', $default_plugins, $selected_plugins); // robots.txt $robotsTxtFilePath = './robots.txt'; if (file_exists($robotsTxtFilePath) && is_writable($robotsTxtFilePath)) { $robotsTxtFile = file_get_contents($robotsTxtFilePath); $tmp = 'Host: ' . str_replace(array('http://', 'https://'), '', $cfg['mainurl']); $robotsTxtFile = str_replace('# Host: http://your-domain.com', $tmp, $robotsTxtFile); file_put_contents($robotsTxtFilePath, $robotsTxtFile); } break; case 5: // End credits
$urr = $sql->fetch(); $out['subtitle'] = $L['Profile']; $out['head'] .= $R['code_noindex']; $mskin = cot_tplfile(array('users', 'profile'), 'module'); /* === Hook === */ foreach (cot_getextplugins('users.profile.main') as $pl) { include $pl; } /* ===== */ require_once $cfg['system_dir'] . '/header.php'; $t = new XTemplate($mskin); require_once cot_incfile('forms'); $protected = !$cfg['users']['useremailchange'] ? array('disabled' => 'disabled') : array(); $profile_form_email = cot_inputbox('text', 'ruseremail', $urr['user_email'], array('size' => 32, 'maxlength' => 64) + $protected); $editor_class = $cfg['users']['usertextimg'] ? 'minieditor' : ''; $t->assign(array('USERS_PROFILE_TITLE' => cot_rc_link(cot_url('users', 'm=profile'), $L['pro_title']), 'USERS_PROFILE_SUBTITLE' => $L['pro_subtitle'], 'USERS_PROFILE_DETAILSLINK' => cot_url('users', 'm=details&id=' . $urr['user_id']), 'USERS_PROFILE_EDITLINK' => cot_url('users', 'm=edit&id=' . $urr['user_id']), 'USERS_PROFILE_FORM_SEND' => cot_url('users', "m=profile&a=update&" . cot_xg()), 'USERS_PROFILE_ID' => $urr['user_id'], 'USERS_PROFILE_NAME' => htmlspecialchars($urr['user_name']), 'USERS_PROFILE_MAINGRP' => cot_build_group($urr['user_maingrp']), 'USERS_PROFILE_GROUPS' => cot_build_groupsms($urr['user_id'], FALSE, $urr['user_maingrp']), 'USERS_PROFILE_COUNTRY' => cot_selectbox_countries($urr['user_country'], 'rusercountry'), 'USERS_PROFILE_TEXT' => cot_textarea('rusertext', $urr['user_text'], 8, 56, array('class' => $editor_class)), 'USERS_PROFILE_EMAIL' => $profile_form_email, 'USERS_PROFILE_EMAILPASS' => cot_inputbox('password', 'rmailpass', '', array('size' => 12, 'maxlength' => 32, 'autocomplete' => 'off')), 'USERS_PROFILE_HIDEEMAIL' => cot_radiobox($urr['user_hideemail'], 'ruserhideemail', array(1, 0), array($L['Yes'], $L['No'])), 'USERS_PROFILE_THEME' => cot_selectbox_theme($urr['user_theme'], $urr['user_scheme'], 'rusertheme'), 'USERS_PROFILE_LANG' => cot_selectbox_lang($urr['user_lang'], 'ruserlang'), 'USERS_PROFILE_GENDER' => cot_selectbox_gender($urr['user_gender'], 'rusergender'), 'USERS_PROFILE_BIRTHDATE' => cot_selectbox_date(cot_date2stamp($urr['user_birthdate']), 'short', 'ruserbirthdate', cot_date('Y', $sys['now']), cot_date('Y', $sys['now']) - 100, false), 'USERS_PROFILE_TIMEZONE' => cot_selectbox_timezone($urr['user_timezone'], 'rusertimezone'), 'USERS_PROFILE_REGDATE' => cot_date('datetime_medium', $urr['user_regdate']), 'USERS_PROFILE_REGDATE_STAMP' => $urr['user_regdate'], 'USERS_PROFILE_LASTLOG' => cot_date('datetime_medium', $urr['user_lastlog']), 'USERS_PROFILE_LASTLOG_STAMP' => $urr['user_lastlog'], 'USERS_PROFILE_LOGCOUNT' => $urr['user_logcount'], 'USERS_PROFILE_ADMINRIGHTS' => '', 'USERS_PROFILE_OLDPASS' => cot_inputbox('password', 'roldpass', '', array('size' => 12, 'maxlength' => 32)), 'USERS_PROFILE_NEWPASS1' => cot_inputbox('password', 'rnewpass1', '', array('size' => 12, 'maxlength' => 32, 'autocomplete' => 'off')), 'USERS_PROFILE_NEWPASS2' => cot_inputbox('password', 'rnewpass2', '', array('size' => 12, 'maxlength' => 32, 'autocomplete' => 'off')))); // Extra fields if (!empty(cot::$extrafields[cot::$db->users])) { foreach (cot::$extrafields[cot::$db->users] as $exfld) { $uname = strtoupper($exfld['field_name']); $exfld_val = cot_build_extrafields('ruser' . $exfld['field_name'], $exfld, $urr['user_' . $exfld['field_name']]); $exfld_title = cot_extrafield_title($exfld, 'user_'); $t->assign(array('USERS_PROFILE_' . $uname => $exfld_val, 'USERS_PROFILE_' . $uname . '_TITLE' => $exfld_title, 'USERS_PROFILE_EXTRAFLD' => $exfld_val, 'USERS_PROFILE_EXTRAFLD_TITLE' => $exfld_title)); $t->parse('MAIN.EXTRAFLD'); } } /* === Hook === */ foreach (cot_getextplugins('users.profile.tags') as $pl) { include $pl; } /* ===== */