function filemgmt_navbar($selected = '') { global $_CONF, $LANG_FM02, $_FM_TABLES; $result = DB_query("SELECT COUNT(*) FROM {$_FM_TABLES['filemgmt_brokenlinks']}"); list($totalbrokendownloads) = DB_fetchArray($result); if ($totalbrokendownloads > 0) { $totalbrokendownloads = '<span style="display:inline; background-image:none; padding:0; color:#ff0000; font-weight:bold;">' . $totalbrokendownloads . '</span>'; } $result = DB_query("SELECT COUNT(*) FROM {$_FM_TABLES['filemgmt_filedetail']} WHERE status=0"); list($totalnewdownloads) = DB_fetchArray($result); if ($totalnewdownloads > 0) { $totalnewdownloads = '<span style="display:inline; background-image:none; padding:0; color:#ff0000; font-weight:bold;">' . $totalnewdownloads . '</span>'; } $navbar = new navbar(); $navbar->add_menuitem($LANG_FM02['nav1'], $_CONF['site_admin_url'] . '/plugins/filemgmt/index.php?op=filemgmtConfigAdmin'); $navbar->add_menuitem($LANG_FM02['nav2'], $_CONF['site_admin_url'] . '/plugins/filemgmt/index.php?op=categoryConfigAdmin'); $navbar->add_menuitem($LANG_FM02['nav3'], $_CONF['site_admin_url'] . '/plugins/filemgmt/index.php?op=newfileConfigAdmin'); $navbar->add_menuitem(sprintf($LANG_FM02['nav4'], $totalnewdownloads), $_CONF['site_admin_url'] . '/plugins/filemgmt/index.php?op=listNewDownloads'); $navbar->add_menuitem(sprintf($LANG_FM02['nav5'], $totalbrokendownloads), $_CONF['site_admin_url'] . '/plugins/filemgmt/index.php?op=listBrokenDownloads'); if ($selected == $LANG_FM02['nav4']) { $navbar->set_selected(sprintf($LANG_FM02['nav4'], $totalnewdownloads)); } elseif ($selected == $LANG_FM02['nav5']) { $navbar->set_selected(sprintf($LANG_FM02['nav5'], $totalbrokendownloads)); } else { $navbar->set_selected($selected); } return $navbar->generate(); }
function navbar_modulo($modulo) { include "config.php"; $navbar = new navbar(); echo "<div id='menu' class='' style=''><nav class='uk-navbar'>"; echo "\n\t<ul class='uk-navbar-nav'>\n\t<li>\n\t\t<a href='#' style='padding-top: 15px; font-size: 25px;' class='uk-hidden-medium uk-hidden-large' data-uk-offcanvas={target:'#my-id'}><i class='uk-icon-bars'></i> </a>\n\n\t</li>\n\t</ul>\n\t\t<div id='my-id' class='uk-offcanvas'>\n\t\t\t<div class='uk-offcanvas-bar'>\n\n\t\t\t\t"; $navbar->listar_cad_menu_offcanvas($modulo, '0', $_SESSION['cod_usuario']); echo "\n\t\t </div>\n\t\t</div>\t\n\t\n\t"; $navbar->listar_cad_menu($modulo, '0', $_SESSION['cod_usuario']); echo "\n\t\t\t\t<div class='uk-navbar-flip'>\n\t\t\t\t\t<ul class='uk-navbar-nav'>\n\t\t\t\t\t\t<li data-uk-dropdown={mode:'click'} ><a href='#' data-uk-tooltip={pos:'bottom'} title='Alertas' style='padding-top: 0px; padding-left: 10px; padding-right: 10px;' id='alertas' click='alertas();' onmouseover='alertas();'><i class='uk-icon-exclamation-circle uk-icon-button' style='border-radius: 40px;'></i> <div class='uk-badge uk-badge-danger' id='cad_alertas_numero'></div></a> <div class='uk-dropdown uk-dropdown-scrollable' style='width:450px;max-height: 500px !important;'><a href='alertas.php'>Visualizar todos os alertas</a><div id='div_alertas' style='width:400px;'></div></div></li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<a href='../../index.php?act=mudar_empresa' data-uk-tooltip={pos:'bottom'} title='mudar de empresa'><i class='uk-icon-exchange' style='padding-top: 17px;'></i></a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li><a href='" . $DNS . "?login=logout' data-uk-tooltip={pos:'bottom'} title='' style='padding-top: 20px;' data-cached-title='Sair'><i class='uk-icon-sign-out'></i> </a></li>\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\t\n\t\t</nav>\n\t\t\n\t\t</div>"; }
function MG_editAVDefaults() { global $_CONF, $_MG_CONF, $_TABLES, $_USER, $LANG_MG07, $LANG_MG01, $LANG_MG03, $LANG_ACCESS, $LANG_DIRECTION; global $glversion, $LANG04; $retval = ''; $T = new Template($_MG_CONF['template_path'] . '/admin'); $T->set_file(array('admin' => 'editavdefaults.thtml')); $T->set_var('site_url', $_MG_CONF['site_url']); require_once $_CONF['path_system'] . 'classes/navbar.class.php'; $navbar = new navbar(); $navbar->add_menuitem($LANG_MG07['wmp_options'], 'showhideMGAdminEditorDiv("wmp",0);return false;', true); $navbar->add_menuitem($LANG_MG07['qt_options'], 'showhideMGAdminEditorDiv("qt",1);return false;', true); $navbar->add_menuitem($LANG_MG07['mp3_options'], 'showhideMGAdminEditorDiv("mp3",2);return false;', true); $navbar->add_menuitem($LANG_MG07['swf_options'], 'showhideMGAdminEditorDiv("flash",3);return false;', true); $navbar->set_selected($LANG_MG07['wmp_options']); $T->set_var('navbar', $navbar->generate()); $T->set_var('no_javascript_warning', $LANG04[150]); // ui mode select $asf_uimode_select = '<select name="asf_uimode">'; $asf_uimode_select .= '<option value="none" ' . ($_MG_CONF['asf_uimode'] == 'none' ? ' selected="selected"' : '') . '>' . $LANG_MG07['none'] . '</option>'; $asf_uimode_select .= '<option value="mini" ' . ($_MG_CONF['asf_uimode'] == 'mini' ? ' selected="selected"' : '') . '>' . $LANG_MG07['mini'] . '</option>'; $asf_uimode_select .= '<option value="full" ' . ($_MG_CONF['asf_uimode'] == 'full' ? ' selected="selected"' : '') . '>' . $LANG_MG07['full'] . '</option>'; $asf_uimode_select .= '</select>'; $mov_scale_select = '<select name="mov_scale">'; $mov_scale_select .= '<option value="tofit" ' . ($_MG_CONF['mov_scale'] == 'tofit' ? ' selected="selected"' : '') . '>' . $LANG_MG07['to_fit'] . '</option>'; $mov_scale_select .= '<option value="aspect" ' . ($_MG_CONF['mov_scale'] == 'aspect' ? ' selected="selected"' : '') . '>' . $LANG_MG07['aspect'] . '</option>'; $mov_scale_select .= '<option value="1" ' . ($_MG_CONF['mov_scale'] == '1' ? ' selected="selected"' : '') . '>' . $LANG_MG07['normal_size'] . '</option>'; $mov_scale_select .= '</select>'; $mp3_uimode_select = '<select name="mp3_uimode">'; $mp3_uimode_select .= '<option value="none" ' . ($_MG_CONF['mp3_uimode'] == 'none' ? ' selected="selected"' : '') . '>' . $LANG_MG07['none'] . '</option>'; $mp3_uimode_select .= '<option value="mini" ' . ($_MG_CONF['mp3_uimode'] == 'mini' ? ' selected="selected"' : '') . '>' . $LANG_MG07['mini'] . '</option>'; $mp3_uimode_select .= '<option value="full" ' . ($_MG_CONF['mp3_uimode'] == 'full' ? ' selected="selected"' : '') . '>' . $LANG_MG07['full'] . '</option>'; $mp3_uimode_select .= '</select>'; $swf_quality_select = '<select name="swf_quality">'; $swf_quality_select .= '<option value="low" ' . ($_MG_CONF['swf_quality'] == 'low' ? ' selected="selected"' : '') . '>' . $LANG_MG07['low'] . '</option>'; $swf_quality_select .= '<option value="high" ' . ($_MG_CONF['swf_quality'] == 'high' ? ' selected="selected"' : '') . '>' . $LANG_MG07['high'] . '</option>'; $swf_quality_select .= '</select>'; $swf_scale_select = '<select name="swf_scale">'; $swf_scale_select .= '<option value="showall" ' . ($_MG_CONF['swf_scale'] == 'showall' ? ' selected="selected"' : '') . '>' . $LANG_MG07['showall'] . '</option>'; $swf_scale_select .= '<option value="noborder" ' . ($_MG_CONF['swf_scale'] == 'noborder' ? ' selected="selected"' : '') . '>' . $LANG_MG07['noborder'] . '</option>'; $swf_scale_select .= '<option value="exactfit" ' . ($_MG_CONF['swf_scale'] == 'exactfit' ? ' selected="selected"' : '') . '>' . $LANG_MG07['exactfit'] . '</option>'; $swf_scale_select .= '</select>'; $swf_wmode_select = '<select name="swf_wmode">'; $swf_wmode_select .= '<option value="window" ' . ($_MG_CONF['swf_wmode'] == 'window' ? ' selected="selected"' : '') . '>' . $LANG_MG07['window'] . '</option>'; $swf_wmode_select .= '<option value="opaque" ' . ($_MG_CONF['swf_wmode'] == 'opaque' ? ' selected="selected"' : '') . '>' . $LANG_MG07['opaque'] . '</option>'; $swf_wmode_select .= '<option value="transparent" ' . ($_MG_CONF['swf_wmode'] == 'transparent' ? ' selected="selected"' : '') . '>' . $LANG_MG07['transparent'] . '</option>'; $swf_wmode_select .= '</select>'; $swf_asa_select = '<select name="swf_allowscriptaccess">'; $swf_asa_select .= '<option value="always" ' . ($_MG_CONF['swf_allowscriptaccess'] == 'always' ? ' selected="selected"' : '') . '>' . $LANG_MG07['always'] . '</option>'; $swf_asa_select .= '<option value="sameDomain" ' . ($_MG_CONF['swf_allowscriptaccess'] == 'sameDomain' ? ' selected="selected"' : '') . '>' . $LANG_MG07['sameDomain'] . '</option>'; $swf_asa_select .= '<option value="never" ' . ($_MG_CONF['swf_allowscriptaccess'] == 'never' ? ' selected="selected"' : '') . '>' . $LANG_MG07['never'] . '</option>'; $swf_asa_select .= '</select>'; $T->set_var(array('lang_save' => $LANG_MG01['save'], 'lang_cancel' => $LANG_MG01['cancel'], 's_form_action' => $_MG_CONF['admin_url'] . 'avdefaults.php', 'lang_asf_options' => $LANG_MG07['wmp_options'], 'lang_mov_options' => $LANG_MG07['qt_options'], 'lang_mp3_options' => $LANG_MG07['mp3_options'], 'lang_swf_options' => $LANG_MG07['swf_options'], 'lang_playcount' => $LANG_MG07['playcount'], 'lang_playcount_help' => $LANG_MG07['playcount_help'], 'lang_option' => $LANG_MG07['option'], 'lang_description' => $LANG_MG07['description'], 'lang_on' => $LANG_MG07['on'], 'lang_off' => $LANG_MG07['off'], 'lang_auto_start' => $LANG_MG07['auto_start'], 'lang_auto_start_help' => $LANG_MG07['auto_start_help'], 'lang_enable_context_menu' => $LANG_MG07['enable_context_menu'], 'lang_enable_context_menu_help' => $LANG_MG07['enable_context_menu_help'], 'lang_stretch_to_fit' => $LANG_MG07['stretch_to_fit'], 'lang_stretch_to_fit_help' => $LANG_MG07['stretch_to_fit_help'], 'lang_status_bar' => $LANG_MG07['status_bar'], 'lang_status_bar_help' => $LANG_MG07['status_bar_help'], 'lang_ui_mode' => $LANG_MG07['ui_mode'], 'lang_ui_mode_help' => $LANG_MG07['ui_mode_help'], 'lang_height' => $LANG_MG07['height'], 'lang_width' => $LANG_MG07['width'], 'lang_height_help' => $LANG_MG07['height_help'], 'lang_width_help' => $LANG_MG07['width_help'], 'lang_bgcolor' => $LANG_MG07['bgcolor'], 'lang_bgcolor_help' => $LANG_MG07['bgcolor_help'], 'lang_auto_ref' => $LANG_MG07['auto_ref'], 'lang_auto_ref_help' => $LANG_MG07['auto_ref_help'], 'lang_controller' => $LANG_MG07['controller'], 'lang_controller_help' => $LANG_MG07['controller_help'], 'lang_kiosk_mode' => $LANG_MG07['kiosk_mode'], 'lang_kiosk_mode_help' => $LANG_MG07['kiosk_mode_help'], 'lang_scale' => $LANG_MG07['scale'], 'lang_scale_help' => $LANG_MG07['scale_help'], 'lang_loop' => $LANG_MG07['loop'], 'lang_loop_help' => $LANG_MG07['loop_help'], 'lang_menu' => $LANG_MG07['menu'], 'lang_menu_help' => $LANG_MG07['menu_help'], 'lang_scale' => $LANG_MG07['scale'], 'lang_swf_scale_help' => $LANG_MG07['swf_scale_help'], 'lang_wmode' => $LANG_MG07['wmode'], 'lang_wmode_help' => $LANG_MG07['wmode_help'], 'lang_quality' => $LANG_MG07['quality'], 'lang_quality_help' => $LANG_MG07['quality_help'], 'lang_flash_vars' => $LANG_MG07['flash_vars'], 'lang_asa' => $LANG_MG07['asa'], 'lang_asa_help' => $LANG_MG07['asa_help'], 'lang_bgcolor' => $LANG_MG07['bgcolor'], 'lang_bgcolor_help' => $LANG_MG07['bgcolor_help'], 'lang_clsid' => $LANG_MG07['clsid'], 'lang_codebase' => $LANG_MG07['codebase'], 'lang_swf_version_help' => $LANG_MG07['swf_version_help'], 'asf_autostart_enabled' => $_MG_CONF['asf_autostart'] ? ' checked="checked"' : '', 'asf_autostart_disabled' => $_MG_CONF['asf_autostart'] ? '' : ' checked="checked"', 'asf_enablecontextmenu_enabled' => $_MG_CONF['asf_enablecontextmenu'] ? ' checked="checked"' : '', 'asf_enablecontextmenu_disabled' => $_MG_CONF['asf_enablecontextmenu'] ? '' : ' checked="checked"', 'asf_stretchtofit_enabled' => $_MG_CONF['asf_stretchtofit'] ? ' checked="checked"' : '', 'asf_stretchtofit_disabled' => $_MG_CONF['asf_stretchtofit'] ? '' : ' checked="checked"', 'asf_showstatusbar_enabled' => $_MG_CONF['asf_showstatusbar'] ? ' checked="checked"' : '', 'asf_showstatusbar_disabled' => $_MG_CONF['asf_showstatusbar'] ? '' : ' checked="checked"', 'asf_uimode_select' => $asf_uimode_select, 'asf_uimode' => $_MG_CONF['asf_uimode'], 'asf_playcount' => $_MG_CONF['asf_playcount'], 'asf_height' => $_MG_CONF['asf_height'], 'asf_width' => $_MG_CONF['asf_width'], 'asf_bgcolor' => $_MG_CONF['asf_bgcolor'], 'mov_autoref_enabled' => $_MG_CONF['mov_autoref'] ? ' checked="checked"' : '', 'mov_autoref_disabled' => $_MG_CONF['mov_autoref'] ? '' : ' checked="checked"', 'mov_autoplay_enabled' => $_MG_CONF['mov_autoplay'] ? ' checked="checked"' : '', 'mov_autoplay_disabled' => $_MG_CONF['mov_autoplay'] ? '' : ' checked="checked"', 'mov_controller_enabled' => $_MG_CONF['mov_controller'] ? ' checked="checked"' : '', 'mov_controller_disabled' => $_MG_CONF['mov_controller'] ? '' : ' checked="checked"', 'mov_kioskmode_enabled' => $_MG_CONF['mov_kioskmode'] ? ' checked="checked"' : '', 'mov_kioskmode_disabled' => $_MG_CONF['mov_kioskmode'] ? '' : ' checked="checked"', 'mov_scale_select' => $mov_scale_select, 'mov_loop_enabled' => $_MG_CONF['mov_loop'] ? ' checked="checked"' : '', 'mov_loop_disabled' => $_MG_CONF['mov_loop'] ? '' : ' checked="checked"', 'mov_height' => $_MG_CONF['mov_height'], 'mov_width' => $_MG_CONF['mov_width'], 'mov_bgcolor' => $_MG_CONF['mov_bgcolor'], 'mp3_autostart_enabled' => $_MG_CONF['mp3_autostart'] ? ' checked="checked"' : '', 'mp3_autostart_disabled' => $_MG_CONF['mp3_autostart'] ? '' : ' checked="checked"', 'mp3_enablecontextmenu_enabled' => $_MG_CONF['mp3_enablecontextmenu'] ? ' checked="checked"' : '', 'mp3_enablecontextmenu_disabled' => $_MG_CONF['mp3_enablecontextmenu'] ? '' : ' checked="checked"', 'mp3_showstatusbar_enabled' => $_MG_CONF['mp3_showstatusbar'] ? ' checked="checked"' : '', 'mp3_showstatusbar_disabled' => $_MG_CONF['mp3_showstatusbar'] ? '' : ' checked="checked"', 'mp3_loop_enabled' => $_MG_CONF['mp3_loop'] ? ' checked="checked"' : '', 'mp3_loop_disabled' => $_MG_CONF['mp3_loop'] ? '' : ' checked="checked"', 'mp3_uimode_select' => $mp3_uimode_select, 'mp3_uimode' => $_MG_CONF['mp3_uimode'], 'swf_play_enabled' => $_MG_CONF['swf_play'] ? ' checked="checked"' : '', 'swf_play_disabled' => $_MG_CONF['swf_play'] ? '' : ' checked="checked"', 'swf_menu_enabled' => $_MG_CONF['swf_menu'] ? ' checked="checked"' : '', 'swf_menu_disabled' => $_MG_CONF['swf_menu'] ? '' : ' checked="checked"', 'swf_loop_enabled' => $_MG_CONF['swf_loop'] ? ' checked="checked"' : '', 'swf_loop_disabled' => $_MG_CONF['swf_loop'] ? '' : ' checked="checked"', 'swf_quality_select' => $swf_quality_select, 'swf_scale_select' => $swf_scale_select, 'swf_wmode_select' => $swf_wmode_select, 'swf_asa_select' => $swf_asa_select, 'swf_flashvars' => $_MG_CONF['swf_flashvars'], 'swf_height' => $_MG_CONF['swf_height'], 'swf_width' => $_MG_CONF['swf_width'], 'swf_bgcolor' => $_MG_CONF['swf_bgcolor'], 'swf_codebase' => $_MG_CONF['swf_version'], 'swf_version' => $_MG_CONF['swf_version'], 'rtl' => $LANG_DIRECTION == "rtl" ? "rtl" : "", 'gltoken_name' => CSRF_TOKEN, 'gltoken' => SEC_createToken())); $T->parse('output', 'admin'); $retval .= $T->finish($T->get_var('output')); return $retval; }
function set_navbar($selected = '') { $navbar = new navbar(); $navbar->add_menuitem('User Information', $PHP_SELF . '?op=user_info'); $navbar->add_menuitem('Shipping Address\'s', $PHP_SELF . '?op=shipping_address'); $navbar->add_menuitem('Credit Cards', $PHP_SELF . '?op=credit_cards'); $navbar->add_menuitem('Bank Accounts', $PHP_SELF . '?op=bank_accounts'); $navbar->add_menuitem('Previous Orders', $PHP_SELF . '?op=orders'); $navbar->set_selected($selected); return $navbar->generate(); }
function MG_navbar($selected = '', $album_id) { global $_CONF, $_MG_CONF, $LANG_MG01, $LANG_MG03; include_once $_CONF['path'] . 'system/classes/navbar.class.php'; $navbar = new navbar(); $navbar->add_menuitem($LANG_MG01['swfupload_media'], $_MG_CONF['site_url'] . '/admin.php?mode=upload&album_id=' . $album_id); $navbar->add_menuitem($LANG_MG01['browser_upload'], $_MG_CONF['site_url'] . '/admin.php?mode=browser&album_id=' . $album_id); if (SEC_hasRights('mediagallery.admin')) { $navbar->add_menuitem($LANG_MG01['ftp_media'], $_MG_CONF['site_url'] . '/admin.php?mode=import&album_id=' . $album_id); } $navbar->add_menuitem($LANG_MG01['remote_media'], $_MG_CONF['site_url'] . '/admin.php?mode=remote&album_id=' . $album_id); $navbar->set_selected($selected); $retval .= $navbar->generate(); return $retval; }
function taskconsoleShowNavbar($selected = 'My Tasks') { global $_USER, $_CONF, $optLinkVars, $usermodeUID; $retval = '<div id="navbar1" style="display:;">'; $navbar = new navbar(); if ($_USER['uid'] > 1) { $navbar->add_menuitem('My Tasks', $_CONF['site_url'] . '/nexflow/index.php?op=mytasks' . $optLinkVars); $navbar->add_menuitem('My Flows', $_CONF['site_url'] . '/nexflow/index.php?op=myprojects' . $optLinkVars); } $navbar->add_menuitem('All Flows', $_CONF['site_url'] . '/nexflow/index.php?op=allprojects' . $optLinkVars); if (SEC_inGroup('nexflow Admin')) { $navbar->add_menuitem('Outstanding Tasks', $_CONF['site_admin_url'] . '/plugins/nexflow/outstanding.php?taskuser='******'uid'] > 1) { $navbar->add_menuitem('Start New Process', $_CONF['site_url'] . '/nexflow/newprocess.php?taskuser='******'</div>'; return $retval; }
function MG_navbar($selected = '', $album_id) { global $_CONF, $_MG_CONF, $LANG_MG01, $LANG_MG03, $glversion; USES_class_navbar(); $T = new Template(MG_getTemplatePath($album_id)); $T->set_file(array('upload' => 'upload.thtml')); $T->set_var(array('lang_upload_media' => $LANG_MG03['upload_media'])); $T->parse('output', 'upload'); $retval = $T->finish($T->get_var('output')); $navbar = new navbar(); $navbar->add_menuitem($LANG_MG01['html5upload_media'], $_MG_CONF['site_url'] . '/admin.php?mode=upload&album_id=' . $album_id); $navbar->add_menuitem($LANG_MG01['browser_upload'], $_MG_CONF['site_url'] . '/admin.php?mode=browser&album_id=' . $album_id); if (SEC_hasRights('mediagallery.admin')) { $navbar->add_menuitem($LANG_MG01['ftp_media'], $_MG_CONF['site_url'] . '/admin.php?mode=import&album_id=' . $album_id); } $navbar->add_menuitem($LANG_MG01['remote_media'], $_MG_CONF['site_url'] . '/admin.php?mode=remote&album_id=' . $album_id); $navbar->set_selected($selected); $retval .= $navbar->generate(); $retval .= '<br />'; return $retval; }
$newday = date('j', $newstamp); $newmonth = date('n', $newstamp); $newyear = date('Y', $newstamp); return array($newmonth, $newday, $newyear); } function getPrettyDateNum($dnum) { return preg_replace('/^0/', ' ', $dnum); } // MAIN $mode = ''; if (isset($_REQUEST['mode'])) { $mode = COM_applyFilter($_REQUEST['mode']); } // NAVBAR $navbar = new navbar(); $navbar->add_menuitem($LANG_CALJP_2[39], $this_script . "?mode={$mode}&view=day"); $navbar->add_menuitem($LANG_CALJP_2[40], $this_script . "?mode={$mode}&view=week"); $navbar->add_menuitem($LANG_CALJP_2[41], $this_script . "?mode={$mode}"); if ($mode != 'personal' && $mode != 'quickadd') { $mode = ''; } if ($mode == 'personal') { $pagetitle = $LANG_CALJP_1[42]; } else { $pagetitle = $LANG_CALJP_1[41]; } // Set mode back to master if user refreshes screen after their session expires if ($mode == 'personal' && COM_isAnonUser()) { $mode = ''; }
/** * Shows the user's current settings * */ function edituser() { global $_CONF, $_TABLES, $_USER, $LANG_MYACCOUNT, $LANG04, $LANG_ADMIN; $result = DB_query("SELECT fullname,cookietimeout,email,homepage,sig,emailstories,about,location,pgpkey,photo FROM {$_TABLES['users']},{$_TABLES['userprefs']},{$_TABLES['userinfo']} WHERE {$_TABLES['users']}.uid = {$_USER['uid']} AND {$_TABLES['userprefs']}.uid = {$_USER['uid']} AND {$_TABLES['userinfo']}.uid = {$_USER['uid']}"); $A = DB_fetchArray($result); $preferences = new Template($_CONF['path_layout'] . 'preferences'); $preferences->set_file(array('profile' => 'profile.thtml', 'photo' => 'userphoto.thtml', 'username' => 'username.thtml', 'deleteaccount' => 'deleteaccount.thtml')); include $_CONF['path_system'] . 'classes/navbar.class.php'; $navbar = new navbar(); $cnt = 0; foreach ($LANG_MYACCOUNT as $id => $label) { $navbar->add_menuitem($label, 'showhideProfileEditorDiv("' . $id . '",' . $cnt . ');return false;', true); $cnt++; } $navbar->set_selected($LANG_MYACCOUNT['pe_namepass']); $preferences->set_var('xhtml', XHTML); $preferences->set_var('navbar', $navbar->generate()); $preferences->set_var('site_url', $_CONF['site_url']); $preferences->set_var('layout_url', $_CONF['layout_url']); $preferences->set_var('no_javascript_warning', $LANG04[150]); $preferences->set_var('cssid1', 1); $preferences->set_var('cssid2', 2); $preferences->set_var('preview', userprofile($_USER['uid'])); $preferences->set_var('prefs', editpreferences()); // some trickery to ensure alternating colors with the available options ... if ($_CONF['allow_username_change'] == 1) { $first = 1; $second = 2; } else { $first = 2; $second = 1; } $preferences->set_var('cssid1u', $first); $preferences->set_var('cssid2u', $second); if ($_CONF['allow_user_photo'] == 1) { $tmp = $first; $first = $second; $second = $tmp; } $preferences->set_var('cssid1p', $first); $preferences->set_var('cssid2p', $second); $preferences->set_var('lang_fullname', $LANG04[3]); $preferences->set_var('lang_fullname_text', $LANG04[34]); $preferences->set_var('lang_username', $LANG04[2]); $preferences->set_var('lang_username_text', $LANG04[87]); $preferences->set_var('lang_password_help_title', $LANG04[146]); $preferences->set_var('lang_password_help', $LANG04[147]); $preferences->set_var('lang_password', $LANG04[4]); $preferences->set_var('lang_password_text', $LANG04[35]); $preferences->set_var('lang_password_conf', $LANG04[108]); $preferences->set_var('lang_password_text_conf', $LANG04[109]); $preferences->set_var('lang_old_password', $LANG04[110]); $preferences->set_var('lang_old_password_text', $LANG04[111]); $preferences->set_var('lang_cooktime', $LANG04[68]); $preferences->set_var('lang_cooktime_text', $LANG04[69]); $preferences->set_var('lang_email', $LANG04[5]); $preferences->set_var('lang_email_text', $LANG04[33]); $preferences->set_var('lang_email_conf', $LANG04[124]); $preferences->set_var('lang_email_conf_text', $LANG04[126]); $preferences->set_var('lang_userinfo_help_title', $LANG04[148]); $preferences->set_var('lang_userinfo_help', $LANG04[149]); $preferences->set_var('lang_homepage', $LANG04[6]); $preferences->set_var('lang_homepage_text', $LANG04[36]); $preferences->set_var('lang_location', $LANG04[106]); $preferences->set_var('lang_location_text', $LANG04[107]); $preferences->set_var('lang_signature', $LANG04[32]); $preferences->set_var('lang_signature_text', $LANG04[37]); $preferences->set_var('lang_userphoto', $LANG04[77]); $preferences->set_var('lang_userphoto_text', $LANG04[78]); $preferences->set_var('lang_about', $LANG04[7]); $preferences->set_var('lang_about_text', $LANG04[38]); $preferences->set_var('lang_pgpkey', $LANG04[8]); $preferences->set_var('lang_pgpkey_text', $LANG04[39]); $preferences->set_var('lang_submit', $LANG04[9]); $preferences->set_var('lang_cancel', $LANG_ADMIN['cancel']); $preferences->set_var('lang_preview_title', $LANG04[145]); $preferences->set_var('lang_enter_current_password', $LANG04[127]); $preferences->set_var('lang_name_legend', $LANG04[128]); $preferences->set_var('lang_password_email_legend', $LANG04[129]); $preferences->set_var('lang_personal_info_legend', $LANG04[130]); $display_name = COM_getDisplayName($_USER['uid']); //$preferences->set_var ('start_block_profile', // COM_startBlock ($LANG04[1] . ' ' . $display_name)); //$preferences->set_var ('end_block', COM_endBlock ()); $preferences->set_var('profile_headline', $LANG04[1] . ' ' . $display_name); if ($_CONF['allow_user_photo'] == 1) { $preferences->set_var('enctype', 'enctype="multipart/form-data"'); } else { $preferences->set_var('enctype', ''); } $preferences->set_var('fullname_value', htmlspecialchars($A['fullname'])); $preferences->set_var('new_username_value', htmlspecialchars($_USER['username'])); $preferences->set_var('password_value', ''); if ($_CONF['allow_username_change'] == 1) { $preferences->parse('username_option', 'username', true); } else { $preferences->set_var('username_option', ''); } $selection = '<select id="cooktime" name="cooktime">' . LB; $selection .= COM_optionList($_TABLES['cookiecodes'], 'cc_value,cc_descr', $A['cookietimeout'], 0); $selection .= '</select>'; $preferences->set_var('cooktime_selector', $selection); $preferences->set_var('email_value', htmlspecialchars($A['email'])); $preferences->set_var('homepage_value', htmlspecialchars(COM_killJS($A['homepage']))); $preferences->set_var('location_value', htmlspecialchars(strip_tags($A['location']))); $preferences->set_var('signature_value', htmlspecialchars($A['sig'])); if ($_CONF['allow_user_photo'] == 1) { $photo = USER_getPhoto($_USER['uid'], $A['photo'], $A['email'], -1); if (empty($photo)) { $preferences->set_var('display_photo', ''); } else { if (empty($A['photo'])) { // external avatar $photo = '<br' . XHTML . '>' . $photo; } else { // uploaded photo - add delete option $photo = '<br' . XHTML . '>' . $photo . '<br' . XHTML . '>' . $LANG04[79] . ' <input type="checkbox" name="delete_photo"' . XHTML . '>' . LB; } $preferences->set_var('display_photo', $photo); } if (empty($_CONF['image_lib'])) { $scaling = $LANG04[162]; } else { $scaling = $LANG04[161]; } $preferences->set_var('photo_max_dimensions', sprintf($LANG04[160], $_CONF['max_photo_width'], $_CONF['max_photo_height'], $_CONF['max_photo_size'], $scaling)); $preferences->parse('userphoto_option', 'photo', true); } else { $preferences->set_var('userphoto_option', ''); } $result = DB_query("SELECT about,pgpkey FROM {$_TABLES['userinfo']} WHERE uid = {$_USER['uid']}"); $A = DB_fetchArray($result); $reqid = substr(md5(uniqid(rand(), 1)), 1, 16); DB_change($_TABLES['users'], 'pwrequestid', $reqid, 'uid', $_USER['uid']); $preferences->set_var('about_value', htmlspecialchars($A['about'])); $preferences->set_var('pgpkey_value', htmlspecialchars($A['pgpkey'])); $preferences->set_var('uid_value', $reqid); $preferences->set_var('username_value', htmlspecialchars($_USER['username'])); if ($_CONF['allow_account_delete'] == 1) { $preferences->set_var('lang_deleteaccount', $LANG04[156]); $preferences->set_var('delete_text', $LANG04[95]); $preferences->set_var('lang_button_delete', $LANG04[96]); $preferences->set_var('delete_mode', 'confirmdelete'); $preferences->set_var('account_id', $reqid); if (isset($LANG04[157])) { $preferences->set_var('lang_deleteoption', $LANG04[157]); } else { $preferences->set_var('lang_deleteoption', $LANG04[156]); } $preferences->parse('delete_account_option', 'deleteaccount', false); } else { $preferences->set_var('delete_account_option', ''); } // Call custom account form and edit function if enabled and exists if ($_CONF['custom_registration'] and function_exists('CUSTOM_userEdit')) { $preferences->set_var('customfields', CUSTOM_userEdit($_USER['uid'])); } PLG_profileVariablesEdit($_USER['uid'], $preferences); $retval = $preferences->finish($preferences->parse('output', 'profile')); $retval .= PLG_profileBlocksEdit($_USER['uid']); return $retval; }
} if (isset($_REQUEST['id'])) { $id = COM_sanitizeID($_REQUEST['id']); } else { $id = COM_applyFilter(COM_getArgument('id')); } $page = COM_getArgument('page'); // Assume that the 'mode' is also (or only) the desired page to display //if (empty($mode)) $id=''; if (empty($page)) { $page = $mode; } // Set up the basic menu for all users $menu_opt = ''; USES_class_navbar(); $menu = new navbar(); $menu->add_menuitem($LANG_ADVT['mnu_home'], CLASSIFIEDS_makeURL('home')); $menu->add_menuitem($LANG_ADVT['mnu_recent'], CLASSIFIEDS_makeURL('recent')); // Show additional menu options to logged-in users if (!$isAnon) { $menu->add_menuitem($LANG_ADVT['mnu_account'], CLASSIFIEDS_makeURL('account')); $menu->add_menuitem($LANG_ADVT['mnu_myads'], CLASSIFIEDS_makeURL('manage')); } if (CLASSIFIEDS_canSubmit()) { $menu->add_menuitem($LANG_ADVT['mnu_submit'], $_CONF['site_url'] . '/submit.php?type=' . $_CONF_ADVT['pi_name']); } // Set the help option as the last menu item if (!empty($_CONF_ADVT['helpurl'])) { $menu->add_menuitem($LANG_ADVT['mnu_help'], COM_sanitizeURL($_CONF_ADVT['helpurl'])); } // Establish the output template
<body style="margin-bottom: 0px;"> <script src="js/grids_js.js"></script> <?php $navbar = new navbar(); $navbar->navbar_modulo('contabil'); ?> <div class="uk-width-1-1 uk-container-center uk-text-center"> <div class="uk-grid "> <?php if (isset($_GET['act']) and isset($_GET['mod']) and isset($_GET['id'])) { if (isset($_GET['act']) and $_GET['act'] != 'imprimir') { ?> <div class="uk-width-1-1 " style=""> <div id='principal' class='' style="margin: -10px 0px 0px; text-align: left; border-bottom: 1px solid rgb(204, 204, 204); padding-bottom: 10px;"> <div class='' style='style="text-align: left; margin: 5px 10px;"'> <ul class='uk-subnav uk-subnav-line' style='margin-bottom: 0px;'> <?php $menus = new menus(); $menus->menu(); ?> </ul>
/** * Creates the edit form * @param integer $id Optional ID, current record used if zero * @return string HTML for edit form */ public function Edit($eid = '', $rp_id = 0, $saveaction = '') { global $_CONF, $_EV_CONF, $_TABLES, $_USER, $LANG_EVLIST, $LANG_ADMIN, $_GROUPS, $LANG_ACCESS, $_SYSTEM; // If an eid is specified and this is an object, then read the // event data- UNLESS a repeat ID is given in which case we're // editing a repeat and already have the info we need. // This probably needs to change, since we should always read event // data during construction. if (!$this->isSubmitter) { // At least submit privilege required COM_404(); } elseif ($eid != '' && $rp_id == 0 && is_object($this)) { // If an id is passed in, then read that record if (!$this->Read($eid)) { return 'Invalid object ID'; } } elseif (isset($_POST['eid']) && !empty($_POST['eid'])) { // Returning to an existing form, probably due to errors $this->SetVars($_POST); // Make sure the current user has access to this event. if (!$this->hasAccess(3)) { COM_404(); } } $T = new Template($_CONF['path'] . 'plugins/evlist/templates/'); if ($_SYSTEM['disable_jquery_slimbox']) { $T->set_file('editor', 'editor.uikit.thtml'); } else { $T->set_file('editor', 'editor.thtml'); } // Basic tabs for editing both events and instances, show up on // all edit forms //$tabs = array('ev_info', 'ev_schedule', 'ev_location', 'ev_contact',); $tabs = array('ev_info', 'ev_location', 'ev_contact'); $rp_id = (int) $rp_id; if ($rp_id > 0) { // Make sure the current user has access to this event. if (!$this->hasAccess(3)) { COM_404(); } if ($saveaction == 'savefuturerepeat') { $alert_msg = EVLIST_alertMessage($LANG_EVLIST['editing_future'], 'warning'); } else { $alert_msg = EVLIST_alertMessage($LANG_EVLIST['editing_instance'], 'info'); } //$T->clear_var('contact_section'); $T->clear_var('category_section'); $T->clear_var('permissions_editor'); // Set the static calendar name for the edit form. Can't // change it for a single instance. $cal_name = DB_getItem($_TABLES['evlist_calendars'], 'cal_name', "cal_id='" . (int) $this->cal_id . "'"); $T->set_var(array('contact_section' => 'true', 'is_repeat' => 'true', 'cal_name' => $cal_name)); // Override our dates & times with those from the repeat. // $rp_id is passed when this is called from class evRepeat. // Maybe that should pass in the repeat's data instead to avoid // another DB lookup. An array of values could be used. $Rep = DB_fetchArray(DB_query("SELECT * \n FROM {$_TABLES['evlist_repeat']}\n WHERE rp_id='{$rp_id}'"), false); if ($Rep) { $this->date_start1 = $Rep['rp_date_start']; $this->date_end1 = $Rep['rp_date_end']; $this->time_start1 = $Rep['rp_time_start1']; $this->time_end1 = $Rep['rp_time_end1']; $this->time_start2 = $Rep['rp_time_start2']; $this->time_end2 = $Rep['rp_time_end2']; } } else { // Editing the main event record if ($this->id != '' && $this->recurring == 1) { $alert_msg = EVLIST_alertMessage($LANG_EVLIST['editing_series'], 'error'); } if ($this->isAdmin) { $tabs[] = 'ev_perms'; // Add permissions tab, event edit only $T->set_var('permissions_editor', 'true'); } $T->set_var(array('contact_section' => 'true', 'category_section' => 'true', 'upcoming_chk' => $this->show_upcoming ? EVCHECKED : '')); } $action_url = EVLIST_URL . '/event.php'; $delaction = 'delevent'; if (isset($_GET['from']) && $_GET['from'] == 'admin') { $cancel_url = EVLIST_ADMIN_URL . '/index.php'; } else { $cancel_url = EVLIST_URL . '/index.php'; } switch ($saveaction) { case 'saverepeat': case 'savefuturerepeat': case 'saveevent': break; case 'moderate': // Approving a submission $saveaction = 'approve'; $delaction = 'disapprove'; $action_url = EVLIST_ADMIN_URL . '/index.php'; $cancel_url = $_CONF['site_admin_url'] . '/moderation.php'; break; default: $saveaction = 'saveevent'; break; } $retval = ''; //$recinterval = ''; $recweekday = ''; $ownerusername = DB_getItem($_TABLES['users'], 'username', "uid='{$this->owner_id}'"); $retval .= COM_startBlock($LANG_EVLIST['event_editor']); $summary = $this->Detail->summary; $full_description = $this->Detail->full_description; $location = $this->Detail->location; if (($this->isAdmin || $_EV_CONF['allow_html'] == '1' && $_USER['uid'] > 1) && $A['postmode'] == 'html') { $postmode = '2'; //html } else { $postmode = '1'; //plaintext $summary = htmlspecialchars(COM_undoClickableLinks(COM_undoSpecialChars($this->Detail->summary))); $full_description = htmlspecialchars(COM_undoClickableLinks(COM_undoSpecialChars($this->Detail->full_description))); $location = htmlspecialchars(COM_undoClickableLinks(COM_undoSpecialChars($this->Detail->location))); } $starthour2 = ''; $startminute2 = ''; $endhour2 = ''; $endminute2 = ''; if ($this->date_end1 == '' || $this->date_end1 == '0000-00-00') { $this->date_end1 = $this->date_start1; } if ($this->date_start1 != '' && $this->date_start1 != '0000-00-00') { list($startmonth1, $startday1, $startyear1, $starthour1, $startminute1) = $this->DateParts($this->date_start1, $this->time_start1); } else { list($startmonth1, $startday1, $startyear1, $starthour1, $startminute1) = $this->DateParts(date('Y-m-d', time()), date('H:i:s', time())); } // The end date can't be before the start date if ($this->date_end1 >= $this->date_start1) { list($endmonth1, $endday1, $endyear1, $endhour1, $endminute1) = $this->DateParts($this->date_end1, $this->time_end1); $days_interval = Date_Calc::dateDiff($endday1, $endmonth1, $endyear1, $startday1, $startmonth1, $startyear1); } else { $days_interval = 0; $endmonth1 = $startmonth1; $endday1 = $startday1; $endyear1 = $startyear1; $endhour1 = $starthour1; $endminute1 = $startminute1; } if ($this->recurring != '1') { $T->set_var(array('recurring_show' => ' style="display:none;"', 'format_opt' => '0')); //for ($i = 1; $i <= 6; $i++) { // $T->set_var('format' . $i . 'show', ' style="display:none;"'); //} } else { $option = empty($this->rec_data['type']) ? '0' : (int) $this->rec_data['type']; $T->set_var(array('recurring_show' => '', 'recurring_checked' => EVCHECKED, 'format_opt' => $option)); } if (isset($this->rec_data['stop']) && !empty($this->rec_data['stop'])) { $T->set_var(array('stopdate' => $this->rec_data['stop'], 'd_stopdate' => EVLIST_formattedDate($this->rec_data['stop']))); } if (!empty($this->rec_data['skip'])) { $T->set_var("skipnext{$this->rec_data['skip']}_checked", EVCHECKED); } if (!empty($this->rec_data['freq'])) { $freq = (int) $this->rec_data['freq']; if ($freq < 1) { $freq = 1; } } else { $freq = 1; } $T->set_var(array('freq_text' => $LANG_EVLIST['rec_periods'][$this->rec_data['type']] . '(s)', 'rec_freq' => $freq)); foreach ($LANG_EVLIST['rec_intervals'] as $key => $str) { $T->set_var('dom_int_txt_' . $key, $str); if (is_array($this->rec_data['interval'])) { if (in_array($key, $this->rec_data['interval'])) { $T->set_var('dom_int_chk_' . $key, EVCHECKED); } } } // Set up the recurring options needed for the current event switch ($option) { case 0: break; case EV_RECUR_MONTHLY: if (is_array($this->rec_data['listdays'])) { foreach ($this->rec_data['listdays'] as $mday) { $T->set_var('mdchk' . $mday, EVCHECKED); } } break; case EV_RECUR_WEEKLY: $T->set_var('listdays_val', COM_stripslashes($rec_data[0])); if (is_array($this->rec_data['listdays']) && !empty($this->rec_data['listdays'])) { foreach ($this->rec_data['listdays'] as $day) { $day = (int) $day; if ($day > 0 && $day < 8) { $T->set_var('daychk' . $day, EVCHECKED); } } } break; case EV_RECUR_DOM: $recweekday = $this->rec_data['weekday']; break; case EV_RECUR_DATES: $T->set_var(array('stopshow' => 'style="display:none;"', 'custom_val' => implode(',', $this->rec_data['custom']))); break; } $start1 = EVLIST_TimeSelect('start1', $this->time_start1); $start2 = EVLIST_TimeSelect('start2', $this->time_start2); $end1 = EVLIST_TimeSelect('end1', $this->time_end1); $end2 = EVLIST_TimeSelect('end2', $this->time_end2); $cal_select = COM_optionList($_TABLES['evlist_calendars'], 'cal_id,cal_name', $this->cal_id, 1, 'cal_status = 1 ' . COM_getPermSQL('AND', 0, 2)); USES_class_navbar(); $navbar = new navbar(); $cnt = 0; foreach ($tabs as $id) { $navbar->add_menuitem($LANG_EVLIST[$id], 'showhideEventDiv("' . $id . '",' . $cnt . ');return false;', true); $cnt++; } $navbar->set_selected($LANG_EVLIST['ev_info']); if ($this->AdminMode) { $action_url .= '?admin=true'; } $T->set_var(array('action_url' => $action_url, 'navbar' => $navbar->generate(), 'alert_msg' => $alert_msg, 'cancel_url' => $cancel_url, 'eid' => $this->id, 'rp_id' => $rp_id, 'title' => $this->Detail->title, 'summary' => $summary, 'description' => $full_description, 'location' => $location, 'status_checked' => $this->status == 1 ? EVCHECKED : '', 'url' => $this->Detail->url, 'street' => $this->Detail->street, 'city' => $this->Detail->city, 'province' => $this->Detail->province, 'country' => $this->Detail->country, 'postal' => $this->Detail->postal, 'contact' => $this->Detail->contact, 'email' => $this->Detail->email, 'phone' => $this->Detail->phone, 'startdate1' => $this->date_start1, 'enddate1' => $this->date_end1, 'd_startdate1' => EVLIST_formattedDate($this->date_start1), 'd_enddate1' => EVLIST_formattedDate($this->date_end1), 'start_hour_options1' => $start1['hour'], 'start_minute_options1' => $start1['minute'], 'startdate1_ampm' => $start1['ampm'], 'end_hour_options1' => $end1['hour'], 'end_minute_options1' => $end1['minute'], 'enddate1_ampm' => $end1['ampm'], 'start_hour_options2' => $start2['hour'], 'start_minute_options2' => $start2['minute'], 'startdate2_ampm' => $start2['ampm'], 'end_hour_options2' => $end2['hour'], 'end_minute_options2' => $end2['minute'], 'enddate2_ampm' => $end2['ampm'], 'recurring_format_options' => EVLIST_GetOptions($LANG_EVLIST['rec_formats'], $option), 'recurring_weekday_options' => EVLIST_GetOptions(Date_Calc::getWeekDays(), $recweekday, 1), 'dailystop_label' => sprintf($LANG_EVLIST['stop_label'], $LANG_EVLIST['day_by_date'], ''), 'monthlystop_label' => sprintf($LANG_EVLIST['stop_label'], $LANG_EVLIST['year_and_month'], $LANG_EVLIST['if_any']), 'yearlystop_label' => sprintf($LANG_EVLIST['stop_label'], $LANG_EVLIST['year'], $LANG_EVLIST['if_any']), 'listdays_label' => sprintf($LANG_EVLIST['custom_label'], $LANG_EVLIST['days_of_week'], ''), 'listdaystop_label' => sprintf($LANG_EVLIST['stop_label'], $LANG_EVLIST['date_l'], $LANG_EVLIST['if_any']), 'intervalstop_label' => sprintf($LANG_EVLIST['stop_label'], $LANG_EVLIST['year_and_month'], $LANG_EVLIST['if_any']), 'custom_label' => sprintf($LANG_EVLIST['custom_label'], $LANG_EVLIST['dates'], ''), 'datestart_note' => $LANG_EVLIST['datestart_note'], 'src' => isset($_GET['src']) && $_GET['src'] == 'a' ? '1' : '0', 'rem_status_checked' => $this->enable_reminders == 1 ? EVCHECKED : '', 'del_button' => $this->id == '' ? '' : 'true', 'saveaction' => $saveaction, 'delaction' => $delaction, 'owner_id' => $this->owner_id, 'enable_reminders' => $_EV_CONF['enable_reminders'], 'iso_lang' => EVLIST_getIsoLang(), 'hour_mode' => $_CONF['hour_mode'], 'days_interval' => $days_interval, 'display_format' => $_CONF['shortdate'], 'ts_start' => strtotime($this->date_start1), 'ts_end' => strtotime($this->date_end1), 'cal_select' => $cal_select, 'contactlink_chk' => $this->options['contactlink'] == 1 ? EVCHECKED : '', 'lat' => $this->Detail->lat, 'lng' => $this->Detail->lng, 'perm_msg' => $LANG_ACCESS['permmsg'], 'last' => $LANG_EVLIST['rec_intervals'][5], 'doc_url' => EVLIST_getDocURL('event.html'), 'mootools' => $_SYSTEM['disable_mootools'] ? '' : 'true')); if ($_EV_CONF['enable_rsvp']) { USES_evlist_class_tickettype(); $TickTypes = evTicketType::GetTicketTypes(); //$T->set_block('editor', 'Tickets', 'tTypes'); $tick_opts = ''; foreach ($TickTypes as $tick_id => $tick_obj) { // Check enabled tickets. Ticket type 1 enabled by default if (isset($this->options['tickets'][$tick_id]) || $tick_id == 1) { $checked = 'checked="checked"'; $fee = (double) $this->options['tickets'][$tick_id]['fee']; } else { $checked = ''; $fee = 0; } $tick_opts .= '<tr><td><input name="tickets[' . $tick_id . ']" type="checkbox" ' . $checked . ' value="' . $tick_id . '" /></td>' . '<td>' . $tick_obj->description . '</td>' . '<td><input type="text" name="tick_fees[' . $tick_id . ']" value="' . $fee . '" size="8" /></td></tr>' . LB; /*$T->set_var(array( 'tick_id' => $tic['id'], 'tick_desc' => $tic['description'], 'tick_fee' => $fee, 'tick_enabled' => $enabled ? 'checked="checked"' : '', ) ) ; //$T->parse('tTypes', 'Tickets', true);*/ } if ($_EV_CONF['rsvp_print'] > 0) { $rsvp_print_chk = 'rsvp_print_chk' . $this->options['rsvp_print']; $rsvp_print = 'true'; } else { $rsvp_print = ''; $rsvp_print_chk = 'no_rsvp_print'; } $T->set_var(array('enable_rsvp' => 'true', 'reg_chk' . $this->options['use_rsvp'] => EVCHECKED, 'rsvp_wait_chk' => $this->options['rsvp_waitlist'] == 1 ? EVCHECKED : '', 'max_rsvp' => $this->options['max_rsvp'], 'max_user_rsvp' => $this->options['max_user_rsvp'], 'rsvp_cutoff' => $this->options['rsvp_cutoff'], 'use_rsvp' => $this->options['use_rsvp'], 'rsvp_waitlist' => $this->options['rsvp_waitlist'], 'tick_opts' => $tick_opts, 'rsvp_print' => $rsvp_print, $rsvp_print_chk => 'checked="checked"')); } // if rsvp_enabled // Split & All-Day settings if ($this->allday == 1) { // allday, can't be split, no times $T->set_var(array('starttime1_show' => 'style="display:none;"', 'endtime1_show' => 'style="display:none;"', 'datetime2_show' => 'style="display:none;"', 'allday_checked' => EVCHECKED, 'split_checked' => '', 'split_show' => 'style="display:none;"')); } elseif ($this->split == '1') { $T->set_var(array('split_checked' => EVCHECKED, 'allday_checked' => '', 'allday_show' => 'style="display:none"')); } else { $T->set_var(array('datetime2_show' => 'style="display:none;"')); } // Category fields. If $_POST['categories'] is set, then this is a // form re-entry due to an error saving. Populate checkboxes from the // submitted form. Include the user-added category, if any. // If not from a form re-entry, get the checked categories from the // evlist_lookup table. if ($_EV_CONF['enable_categories'] == '1') { $cresult = DB_query("SELECT tc.id, tc.name\n FROM {$_TABLES['evlist_categories']} tc \n WHERE tc.status='1' ORDER BY tc.name"); while ($A = DB_fetchArray($cresult, false)) { if (isset($_POST['categories']) && is_array($_POST['categories'])) { // Coming from a form re-entry $chk = in_array($A['id'], $_POST['categories']) ? EVCHECKED : ''; } else { $chk = in_array($A['id'], $this->categories) ? EVCHECKED : ''; } $catlist .= '<input type="checkbox" name="categories[]" ' . 'value="' . $A['id'] . '" ' . $chk . ' />' . ' ' . $A['name'] . ' '; } $T->set_var('catlist', $catlist); if (isset($_POST['newcat'])) { $T->set_var('newcat', $_POST['newcat']); } if ($_USER['uid'] > 1 && $rp_id == 0) { $T->set_var('category_section', 'true'); $T->set_var('add_cat_input', 'true'); } } // Enable the post mode selector if we allow HTML and the user is // logged in, or if this user is an authorized editor if ($this->isAdmin || $_EV_CONF['allow_html'] == '1' && $_USER['uid'] > 1) { $T->set_var(array('postmode_options' => EVLIST_GetOptions($LANG_EVLIST['postmodes'], $postmode), 'allowed_html' => COM_allowedHTML('evlist.submit'))); if ($postmode == 'plaintext') { // plaintext, hide postmode selector $T->set_var('postmode_show', ' style="display:none"'); } $T->parse('event_postmode', 'edit_postmode'); } if ($this->isAdmin) { $T->set_var(array('owner_username' => COM_stripslashes($ownerusername), 'owner_dropdown' => COM_optionList($_TABLES['users'], 'uid,username', $this->owner_id, 1, "uid <> 1"), 'group_dropdown' => SEC_getGroupDropdown($this->group_id, 3))); if ($rp_id == 0) { // can only change permissions on main event $T->set_var('permissions_editor', SEC_getPermissionsHTML($this->perm_owner, $this->perm_group, $this->perm_members, $this->perm_anon)); } } else { $T->set_var('group_id', $this->group_id); } // Latitude & Longitude part of location, if Location plugin is used if ($_EV_CONF['use_locator']) { $T->set_var(array('use_locator' => 'true', 'loc_selection' => GEO_optionList())); } $T->parse('output', 'editor'); $retval .= $T->finish($T->get_var('output')); $retval .= COM_endBlock(); return $retval; }
public function __construct(moodle_page $page) { parent::__construct($page); $this->cache = new navigation_cache('unittest_nav'); }
function MG_editConfig($msgString = '') { global $_CONF, $_MG_CONF, $_TABLES, $_USER, $LANG_MG00, $LANG_MG01, $LANG_DIRECTION, $LANG04; $retval = ''; $T = new Template($_MG_CONF['template_path'] . '/admin'); $T->set_file('admin', 'cfgedit.thtml'); $T->set_var('site_url', $_MG_CONF['site_url']); if ($msgString != '') { $T->set_var('feedback', $msgString); } if (!isset($_MG_CONF['rating_max'])) { $_MG_CONF['rating_max'] = 5; } if (!isset($_MG_CONF['moderation'])) { $_MG_CONF['moderation'] = 0; } // build our graphics package select... $gp_select = "<select name='graphicspackage'>"; $gp_select .= "<option value='0'" . ($_MG_CONF['graphicspackage'] == 0 ? ' selected="selected"' : "") . ">ImageMagick</option>"; $gp_select .= "<option value='1'" . ($_MG_CONF['graphicspackage'] == 1 ? ' selected="selected"' : "") . ">NetPBM</option>"; $gp_select .= "<option value='2'" . ($_MG_CONF['graphicspackage'] == 2 ? ' selected="selected"' : "") . ">GD Libraries</option>"; $gp_select .= "</select>"; $block_select = '<select name="displayblocks">'; $block_select .= '<option value="0"' . ($_MG_CONF['displayblocks'] == 0 ? ' selected="selected"' : "") . '>' . $LANG_MG01['left_blocks_only'] . '</option>'; $block_select .= '<option value="1"' . ($_MG_CONF['displayblocks'] == 1 ? ' selected="selected"' : "") . '>' . $LANG_MG01['right_blocks_only'] . '</option>'; $block_select .= '<option value="2"' . ($_MG_CONF['displayblocks'] == 2 ? ' selected="selected"' : "") . '>' . $LANG_MG01['left_right_blocks'] . '</option>'; $block_select .= '<option value="3"' . ($_MG_CONF['displayblocks'] == 3 ? ' selected="selected"' : "") . '>' . $LANG_MG01['none'] . '</option>'; $block_select .= '</select>'; $dfid_select = '<select name="dfid"><option value="99">' . $LANG_MG00['no_date'] . '</option>' . COM_optionList($_TABLES['dateformats'], 'dfid,description', $_MG_CONF['dfid'], 0) . '</select>'; if (isset($_MG_CONF['index_all']) && $_MG_CONF['index_all'] == 1) { $T->set_var('index_all_yes_checked', ' checked="checked"'); } else { $T->set_var('index_all_no_checked', ' checked="checked"'); } if ($_MG_CONF['loginrequired'] == 1) { $T->set_var('lr_yes_checked', ' checked="checked"'); } else { $T->set_var('lr_no_checked', ' checked="checked"'); } if (isset($_MG_CONF['moderation']) && $_MG_CONF['moderation'] == 1) { $T->set_var('au_yes_checked', ' checked="checked"'); } else { $T->set_var('au_no_checked', ' checked="checked"'); } if ($_MG_CONF['htmlallowed'] == 1) { $T->set_var('ha_yes_checked', ' checked="checked"'); } else { $T->set_var('ha_no_checked', ' checked="checked"'); } if ($_MG_CONF['whatsnew'] == 1) { $T->set_var('wn_yes_checked', ' checked="checked"'); } else { $T->set_var('wn_no_checked', ' checked="checked"'); } if ($_MG_CONF['usage_tracking'] == 1) { $T->set_var('ut_yes_checked', ' checked="checked"'); } else { $T->set_var('ut_no_checked', ' checked="checked"'); } if ($_MG_CONF['preserve_filename'] == 1) { $T->set_var('pf_yes_checked', ' checked="checked"'); } else { $T->set_var('pf_no_checked', ' checked="checked"'); } if ($_MG_CONF['discard_original'] == 1) { $T->set_var('do_yes_checked', ' checked="checked"'); } else { $T->set_var('do_no_checked', ' checked="checked"'); } if ($_MG_CONF['verbose'] == 1) { $T->set_var('verbose_yes_checked', ' checked="checked"'); } else { $T->set_var('verbose_no_checked', ' checked="checked"'); } if ($_MG_CONF['disable_whatsnew_comments'] == 1) { $T->set_var('dwnc_yes_checked', ' checked="checked"'); } else { $T->set_var('dwnc_no_checked', ' checked="checked"'); } if ($_MG_CONF['enable_media_id'] == 1) { $T->set_var('emid_yes_checked', ' checked="checked"'); } else { $T->set_var('emid_no_checked', ' checked="checked"'); } if ($_MG_CONF['full_in_popup'] == 1) { $T->set_var('fip_yes_checked', ' checked="checked"'); } else { $T->set_var('fip_no_checked', ' checked="checked"'); } if ($_MG_CONF['commentbar'] == 1) { $T->set_var('cmtbar_yes_checked', ' checked="checked"'); } else { $T->set_var('cmtbar_no_checked', ' checked="checked"'); } if ($_MG_CONF['profile_hook'] == 1) { $T->set_var('ph_yes_checked', ' checked="checked"'); } else { $T->set_var('ph_no_checked', ' checked="checked"'); } if ($_MG_CONF['subalbum_select'] == 1) { $T->set_var('sa_yes_checked', ' checked="checked"'); } else { $T->set_var('sa_no_checked', ' checked="checked"'); } $T->set_var('wn_length', $_MG_CONF['title_length']); // -- auto tag defaults if ($_MG_CONF['at_border'] == 1) { $T->set_var('at_border_yes_checked', ' checked="checked"'); } else { $T->set_var('at_border_no_checked', ' checked="checked"'); } if ($_MG_CONF['at_autoplay'] == 1) { $T->set_var('at_autoplay_yes_checked', ' checked="checked"'); } else { $T->set_var('at_autoplay_no_checked', ' checked="checked"'); } if ($_MG_CONF['at_enable_link'] == 2) { $T->set_var('at_enable_link_lb_checked', ' checked="checked"'); } elseif ($_MG_CONF['at_enable_link'] == 1) { $T->set_var('at_enable_link_yes_checked', ' checked="checked"'); } else { $T->set_var('at_enable_link_no_checked', ' checked="checked"'); } if ($_MG_CONF['at_showtitle'] == 1) { $T->set_var('at_showtitle_yes_checked', ' checked="checked"'); } else { $T->set_var('at_showtitle_no_checked', ' checked="checked"'); } if ($_MG_CONF['search_enable_views'] == 1) { $T->set_var('search_enable_views_yes_checked', ' checked="checked"'); } else { $T->set_var('search_enable_views_no_checked', ' checked="checked"'); } if ($_MG_CONF['search_enable_rating'] == 1) { $T->set_var('search_enable_rating_yes_checked', ' checked="checked"'); } else { $T->set_var('search_enable_rating_no_checked', ' checked="checked"'); } if ($_MG_CONF['gallery_only'] == 1) { $T->set_var('gallery_only_yes_checked', ' checked="checked"'); } else { $T->set_var('gallery_only_no_checked', ' checked="checked"'); } $search_playback_type = '<select name="search_playback_type">'; $search_playback_type .= '<option value="0"' . ($_MG_CONF['search_playback_type'] == 0 ? 'selected="selected"' : '') . '>' . $LANG_MG01['play_in_popup'] . '</option>'; $search_playback_type .= '<option value="1"' . ($_MG_CONF['search_playback_type'] == 1 ? 'selected="selected"' : '') . '>' . $LANG_MG01['download_to_local'] . '</option>'; $search_playback_type .= '<option value="2"' . ($_MG_CONF['search_playback_type'] == 2 ? 'selected="selected"' : '') . '>' . $LANG_MG01['play_inline'] . '</option>'; $search_playback_type .= '<option value="3"' . ($_MG_CONF['search_playback_type'] == 3 ? 'selected="selected"' : '') . '>' . $LANG_MG01['use_mms'] . '</option>'; $search_playback_type .= '</select>'; $at_align_select = '<select name="at_align">'; $at_align_select .= '<option value="none"' . ($_MG_CONF['at_align'] == 'none' ? ' selected="selected"' : "") . '>' . $LANG_MG01['none'] . '</option>'; $at_align_select .= '<option value="auto"' . ($_MG_CONF['at_align'] == 'auto' ? ' selected="selected"' : "") . '>' . $LANG_MG01['auto'] . '</option>'; $at_align_select .= '<option value="left"' . ($_MG_CONF['at_align'] == 'left' ? ' selected="selected"' : "") . '>' . $LANG_MG01['left'] . '</option>'; $at_align_select .= '<option value="right"' . ($_MG_CONF['at_align'] == 'right' ? ' selected="selected"' : "") . '>' . $LANG_MG01['right'] . '</option>'; $at_align_select .= '<option value="center"' . ($_MG_CONF['at_align'] == 'center' ? ' selected="selected"' : "") . '>' . $LANG_MG01['center'] . '</option>'; $at_align_select .= '</select>'; $at_src_select = '<select name="at_src">'; $at_src_select .= '<option value="tn"' . ($_MG_CONF['at_src'] == 'tn' ? ' selected="selected"' : "") . '>' . $LANG_MG01['thumbnail'] . '</option>'; $at_src_select .= '<option value="disp"' . ($_MG_CONF['at_src'] == 'disp' ? ' selected="selected"' : "") . '>' . $LANG_MG01['display_image'] . '</option>'; $at_src_select .= '<option value="orig"' . ($_MG_CONF['at_src'] == 'orig' ? ' selected="selected"' : "") . '>' . $LANG_MG01['original_image'] . '</option>'; $at_src_select .= '</select>'; $wn_time_select = '<select name="whatsnew_time">'; $wn_time_select .= '<option value="1"' . ($_MG_CONF['whatsnew_time'] == 1 ? ' selected="selected"' : "") . '>1 ' . $LANG_MG01['days'] . '</option>'; $wn_time_select .= '<option value="2"' . ($_MG_CONF['whatsnew_time'] == 2 ? ' selected="selected"' : "") . '>2 ' . $LANG_MG01['days'] . '</option>'; $wn_time_select .= '<option value="3"' . ($_MG_CONF['whatsnew_time'] == 3 ? ' selected="selected"' : "") . '>3 ' . $LANG_MG01['days'] . '</option>'; $wn_time_select .= '<option value="4"' . ($_MG_CONF['whatsnew_time'] == 4 ? ' selected="selected"' : "") . '>4 ' . $LANG_MG01['days'] . '</option>'; $wn_time_select .= '<option value="5"' . ($_MG_CONF['whatsnew_time'] == 5 ? ' selected="selected"' : "") . '>5 ' . $LANG_MG01['days'] . '</option>'; $wn_time_select .= '<option value="6"' . ($_MG_CONF['whatsnew_time'] == 6 ? ' selected="selected"' : "") . '>6 ' . $LANG_MG01['days'] . '</option>'; $wn_time_select .= '<option value="7"' . ($_MG_CONF['whatsnew_time'] == 7 ? ' selected="selected"' : "") . '>7 ' . $LANG_MG01['days'] . '</option>'; $wn_time_select .= '<option value="8"' . ($_MG_CONF['whatsnew_time'] == 8 ? ' selected="selected"' : "") . '>8 ' . $LANG_MG01['days'] . '</option>'; $wn_time_select .= '<option value="9"' . ($_MG_CONF['whatsnew_time'] == 9 ? ' selected="selected"' : "") . '>9 ' . $LANG_MG01['days'] . '</option>'; $wn_time_select .= '<option value="10"' . ($_MG_CONF['whatsnew_time'] == 10 ? ' selected="selected"' : "") . '>10 ' . $LANG_MG01['days'] . '</option>'; $wn_time_select .= '<option value="11"' . ($_MG_CONF['whatsnew_time'] == 11 ? ' selected="selected"' : "") . '>11 ' . $LANG_MG01['days'] . '</option>'; $wn_time_select .= '<option value="12"' . ($_MG_CONF['whatsnew_time'] == 12 ? ' selected="selected"' : "") . '>12 ' . $LANG_MG01['days'] . '</option>'; $wn_time_select .= '<option value="13"' . ($_MG_CONF['whatsnew_time'] == 13 ? ' selected="selected"' : "") . '>13 ' . $LANG_MG01['days'] . '</option>'; $wn_time_select .= '<option value="14"' . ($_MG_CONF['whatsnew_time'] == 14 ? ' selected="selected"' : "") . '>14 ' . $LANG_MG01['days'] . '</option>'; $wn_time_select .= '<option value="15"' . ($_MG_CONF['whatsnew_time'] == 15 ? ' selected="selected"' : "") . '>15 ' . $LANG_MG01['days'] . '</option>'; $wn_time_select .= '<option value="16"' . ($_MG_CONF['whatsnew_time'] == 16 ? ' selected="selected"' : "") . '>16 ' . $LANG_MG01['days'] . '</option>'; $wn_time_select .= '<option value="17"' . ($_MG_CONF['whatsnew_time'] == 17 ? ' selected="selected"' : "") . '>17 ' . $LANG_MG01['days'] . '</option>'; $wn_time_select .= '<option value="18"' . ($_MG_CONF['whatsnew_time'] == 18 ? ' selected="selected"' : "") . '>18 ' . $LANG_MG01['days'] . '</option>'; $wn_time_select .= '<option value="19"' . ($_MG_CONF['whatsnew_time'] == 19 ? ' selected="selected"' : "") . '>19 ' . $LANG_MG01['days'] . '</option>'; $wn_time_select .= '<option value="20"' . ($_MG_CONF['whatsnew_time'] == 20 ? ' selected="selected"' : "") . '>20 ' . $LANG_MG01['days'] . '</option>'; $wn_time_select .= '<option value="21"' . ($_MG_CONF['whatsnew_time'] == 21 ? ' selected="selected"' : "") . '>21 ' . $LANG_MG01['days'] . '</option>'; $wn_time_select .= '<option value="22"' . ($_MG_CONF['whatsnew_time'] == 22 ? ' selected="selected"' : "") . '>22 ' . $LANG_MG01['days'] . '</option>'; $wn_time_select .= '<option value="23"' . ($_MG_CONF['whatsnew_time'] == 23 ? ' selected="selected"' : "") . '>23 ' . $LANG_MG01['days'] . '</option>'; $wn_time_select .= '<option value="24"' . ($_MG_CONF['whatsnew_time'] == 24 ? ' selected="selected"' : "") . '>24 ' . $LANG_MG01['days'] . '</option>'; $wn_time_select .= '<option value="25"' . ($_MG_CONF['whatsnew_time'] == 25 ? ' selected="selected"' : "") . '>25 ' . $LANG_MG01['days'] . '</option>'; $wn_time_select .= '<option value="26"' . ($_MG_CONF['whatsnew_time'] == 26 ? ' selected="selected"' : "") . '>26 ' . $LANG_MG01['days'] . '</option>'; $wn_time_select .= '<option value="27"' . ($_MG_CONF['whatsnew_time'] == 27 ? ' selected="selected"' : "") . '>27 ' . $LANG_MG01['days'] . '</option>'; $wn_time_select .= '<option value="28"' . ($_MG_CONF['whatsnew_time'] == 28 ? ' selected="selected"' : "") . '>28 ' . $LANG_MG01['days'] . '</option>'; $wn_time_select .= '<option value="29"' . ($_MG_CONF['whatsnew_time'] == 29 ? ' selected="selected"' : "") . '>29 ' . $LANG_MG01['days'] . '</option>'; $wn_time_select .= '<option value="30"' . ($_MG_CONF['whatsnew_time'] == 30 ? ' selected="selected"' : "") . '>30 ' . $LANG_MG01['days'] . '</option>'; $wn_time_select .= '</select>'; $rating_select = '<select name="rating_max">'; $rating_select .= '<option value="5"' . ($_MG_CONF['rating_max'] == 5 ? ' selected="selected"' : "") . '>5</option>'; $rating_select .= '<option value="10"' . ($_MG_CONF['rating_max'] == 10 ? ' selected="selected"' : "") . '>10</option>'; $rating_select .= '<option value="15"' . ($_MG_CONF['rating_max'] == 15 ? ' selected="selected"' : "") . '>15</option>'; $rating_select .= '<option value="20"' . ($_MG_CONF['rating_max'] == 20 ? ' selected="selected"' : "") . '>20</option>'; $rating_select .= '</select>'; $gallery_tn_size_select = '<select name="gallery_tn_size">'; $gallery_tn_size_select .= '<option value="0"' . ($_MG_CONF['gallery_tn_size'] == 0 ? 'selected="selected"' : '') . '>' . $LANG_MG01['small'] . '</option>'; $gallery_tn_size_select .= '<option value="1"' . ($_MG_CONF['gallery_tn_size'] == 1 ? 'selected="selected"' : '') . '>' . $LANG_MG01['medium'] . '</option>'; $gallery_tn_size_select .= '<option value="2"' . ($_MG_CONF['gallery_tn_size'] == 2 ? 'selected="selected"' : '') . '>' . $LANG_MG01['large'] . '</option>'; $gallery_tn_size_select .= '<option value="3"' . ($_MG_CONF['gallery_tn_size'] == 3 ? 'selected="selected"' : '') . '>' . $LANG_MG01['custom'] . '</option>'; $gallery_tn_size_select .= '<option value="4"' . ($_MG_CONF['gallery_tn_size'] == 4 ? 'selected="selected"' : '') . '>' . $LANG_MG01['square'] . '</option>'; $gallery_tn_size_select .= '</select>'; $gallery_tnheight_input = '<input type="text" size="3" name="tnheight" value="' . $_MG_CONF['gallery_tn_height'] . '" />'; $gallery_tnwidth_input = '<input type="text" size="3" name="tnwidth" value="' . $_MG_CONF['gallery_tn_width'] . '" />'; $mp3_select = '<select name="mp3_player">'; $mp3_select .= '<option value="0"' . ($_MG_CONF['mp3_player'] == 0 ? 'selected="selected"' : '') . '>' . $LANG_MG01['windows_media_player'] . '</option>'; $mp3_select .= '<option value="1"' . ($_MG_CONF['mp3_player'] == 1 ? 'selected="selected"' : '') . '>' . $LANG_MG01['quicktime'] . '</option>'; $mp3_select .= '<option value="2"' . ($_MG_CONF['mp3_player'] == 2 ? 'selected="selected"' : '') . '>' . $LANG_MG01['flashplayer'] . '</option>'; $mp3_select .= '</select>'; $flv_select = '<select name="use_flowplayer">'; $flv_select .= '<option value="0"' . ($_MG_CONF['use_flowplayer'] == 0 ? 'selected="selected"' : '') . '>' . $LANG_MG01['mgflv'] . '</option>'; $flv_select .= '<option value="1"' . ($_MG_CONF['use_flowplayer'] == 1 ? 'selected="selected"' : '') . '>' . $LANG_MG01['flowplayer'] . '</option>'; $flv_select .= '</select>'; $T->set_var(array('popupfromalbum_selected' => $_MG_CONF['popup_from_album'] ? ' checked="checked"' : '', 'autotag_caption_selected' => $_MG_CONF['autotag_caption'] ? ' checked="checked"' : '', 'up_dr_selected' => $_MG_CONF['up_display_rows_enabled'] ? ' checked="checked"' : '', 'up_dc_selected' => $_MG_CONF['up_display_columns_enabled'] ? ' checked="checked"' : '', 'up_mp3_selected' => $_MG_CONF['up_mp3_player_enabled'] ? ' checked="checked"' : '', 'up_playback_selected' => $_MG_CONF['up_av_playback_enabled'] ? ' checked="checked"' : '', 'up_tn_size_selected' => $_MG_CONF['up_thumbnail_size_enabled'] ? ' checked="checked"' : '', 'jh_selected' => $_MG_CONF['jhead_enabled'] ? ' checked="checked"' : '', 'jt_selected' => $_MG_CONF['jpegtran_enabled'] ? ' checked="checked"' : '', 'zip_selected' => $_MG_CONF['zip_enabled'] ? ' checked="checked"' : '', 'ffmpeg_selected' => $_MG_CONF['ffmpeg_enabled'] ? ' checked="checked"' : '', 'at_align_select' => $at_align_select, 'at_width' => $_MG_CONF['at_width'], 'at_height' => $_MG_CONF['at_height'], 'at_src_select' => $at_src_select, 'at_delay' => $_MG_CONF['at_delay'], 'flv_select' => $flv_select, 'search_playback_type' => $search_playback_type, 'search_columns' => $_MG_CONF['search_columns'], 'search_rows' => $_MG_CONF['search_rows'])); if ($_MG_CONF['up_display_rows_enabled'] == 1) { $T->set_var('up_dr_yes_checked', ' checked="checked"'); } else { $T->set_var('up_dr_no_checked', ' checked="checked"'); } if (ini_get('safe_mode') != 1 && $_MG_CONF['skip_file_find'] == 0) { // don't check in safe mode, the file_exists() will fail if (PHP_OS == "WINNT") { $binary = "/unzip.exe"; } else { $binary = "/unzip"; } clearstatcache(); if (file_exists($_MG_CONF['zip_path'] . $binary)) { // do nothing.. } else { clearstatcache(); $_MG_CONF['zip_path'] = '/usr/bin'; if (file_exists($_MG_CONF['zip_path'] . $binary)) { // do nothing.. } else { clearstatcache(); $_MG_CONF['zip_path'] = '/usr/local/bin'; if (file_exists($_MG_CONF['zip_path'] . $binary)) { // do nothing.. } else { clearstatcache(); $_MG_CONF['zip_path'] = '/usr/X11R6/bin'; if (file_exists($_MG_CONF['zip_path'] . $binary)) { // do nothing.. } } } } if (PHP_OS == "WINNT") { $binary = "/ffmpeg.exe"; } else { $binary = "/ffmpeg"; } clearstatcache(); if (file_exists($_MG_CONF['ffmpeg_path'] . $binary)) { // do nothing.. } else { clearstatcache(); $_MG_CONF['ffmpeg_path'] = '/usr/bin'; if (file_exists($_MG_CONF['ffmpeg_path'] . $binary)) { // do nothing.. } else { clearstatcache(); $_MG_CONF['ffmpeg_path'] = '/usr/local/bin'; if (file_exists($_MG_CONF['ffmpeg_path'] . $binary)) { // do nothing.. } else { clearstatcache(); $_MG_CONF['ffmpeg_path'] = '/usr/X11R6/bin'; if (file_exists($_MG_CONF['ffmpeg_path'] . $binary)) { // do nothing.. } } } } } $frames = new mgFrame(); $skins = array(); $skins = $frames->getFrames(); if (!isset($_MG_CONF['random_skin']) || $_MG_CONF['random_skin'] == '') { $_MG_CONF['random_skin'] = 'mgShadow'; } $skin_select = '<select name="skin">'; $rskin_select = '<select name="rskin">'; for ($i = 0; $i < count($skins); $i++) { $skin_select .= '<option value="' . $skins[$i]['dir'] . '"' . ($_MG_CONF['indexskin'] == $skins[$i]['dir'] ? ' selected="selected" ' : '') . '>' . $skins[$i]['name'] . '</option>'; $rskin_select .= '<option value="' . $skins[$i]['dir'] . '"' . ($_MG_CONF['random_skin'] == $skins[$i]['dir'] ? ' selected="selected" ' : '') . '>' . $skins[$i]['name'] . '</option>'; } $skin_select .= '</select>'; $rskin_select .= '</select>'; $themes = array(); $themes = MG_getThemes(); $theme_select = '<select name="theme">'; for ($i = 0; $i < count($themes); $i++) { $theme_select .= '<option value="' . $themes[$i] . '"' . ($_MG_CONF['indextheme'] == $themes[$i] ? ' selected="selected" ' : '') . '>' . $themes[$i] . '</option>'; } $theme_select .= '</select>'; require_once $_CONF['path_system'] . 'classes/navbar.class.php'; $navbar = new navbar(); $navbar->add_menuitem($LANG_MG01['general_options'], 'showhideMGAdminEditorDiv("general",0);return false;', true); $navbar->add_menuitem($LANG_MG01['display_options'], 'showhideMGAdminEditorDiv("display",1);return false;', true); $navbar->add_menuitem($LANG_MG01['batch_options'], 'showhideMGAdminEditorDiv("batch",2);return false;', true); $navbar->add_menuitem($LANG_MG01['up_overrides'], 'showhideMGAdminEditorDiv("userprefs",3);return false;', true); $navbar->add_menuitem($LANG_MG01['graphicspackage_prompt'], 'showhideMGAdminEditorDiv("graphics",4);return false;', true); $navbar->set_selected($LANG_MG01['general_options']); $T->set_var('navbar', $navbar->generate()); $T->set_var(array('no_javascript_warning' => $LANG04[150], 'lang_config_title' => $LANG_MG01['configuration_title'], 'lang_config_help' => $LANG_MG01['configuration_help'], 'lang_config_header' => $LANG_MG01['configuration_header'], 'lang_yes' => $LANG_MG01['yes'], 'lang_no' => $LANG_MG01['no'], 'lang_save' => $LANG_MG01['save'], 'lang_cancel' => $LANG_MG01['cancel'], 'lang_reset' => $LANG_MG01['reset'], 'lang_album_columns' => $LANG_MG01['album_display_columns_prompt'], 'lang_album_colums_help' => $LANG_MG01['album_display_columns_help'], 'lang_album_rows' => $LANG_MG01['album_display_rows'], 'lang_subalbum_select' => $LANG_MG01['subalbum_select'], 'lang_loginrequired' => $LANG_MG01['loginrequired_prompt'], 'lang_loginrequired_help' => $LANG_MG01['loginrequired_help'], 'lang_anonymous_uploads' => $LANG_MG01['anonymous_uploads_prompt'], 'lang_anonymous_uploads_help' => $LANG_MG01['anonymous_uploads_help'], 'lang_comments' => $LANG_MG01['comments_prompt'], 'lang_comments_help' => $LANG_MG01['comments_help'], 'lang_graphicspackage' => $LANG_MG01['graphicspackage_prompt'], 'lang_graphicspackage_help' => $LANG_MG01['graphicspackage_help'], 'lang_gp_path' => $LANG_MG01['graphicspackage_path_prompt'], 'lang_gp_path_help' => $LANG_MG01['graphicspackage_path_help'], 'lang_userpref_options' => $LANG_MG01['up_overrides'], 'lang_display_rows_enabled' => $LANG_MG01['up_rows_override'], 'lang_display_columns_enabled' => $LANG_MG01['up_columns_override'], 'lang_mp3_player_enabled' => $LANG_MG01['up_mp3_override'], 'lang_av_playback_enabled' => $LANG_MG01['up_av_override'], 'lang_thumbnail_size_enabled' => $LANG_MG01['up_tn_override'], 'lang_album_skin' => $LANG_MG01['index_album_skin'], 'lang_display_rows' => $LANG_MG01['album_display_rows'], 'album_display_columns' => $_MG_CONF['album_display_columns'], 'album_display_rows' => $_MG_CONF['album_display_rows'], 'loginrequired' => $_MG_CONF['loginrequired'], 'anonymous_uploads' => $_MG_CONF['moderation'], 'graphicspackage' => $gp_select, 'graphicspackage_path' => $_MG_CONF['graphicspackage_path'], 'lang_displayblock' => $LANG_MG01['displayblock_prompt'], 'lang_displayblock_help' => $LANG_MG01['displayblock_help'], 'lang_jhead_enable' => $LANG_MG01['jhead_enable'], 'lang_jh_path' => $LANG_MG01['jhead_path'], 'lang_jpegtran_enable' => $LANG_MG01['jpegtran_enable'], 'lang_ffmpeg_enable' => $LANG_MG01['ffmpeg_enable'], 'lang_jt_path' => $LANG_MG01['jpegtran_path'], 'lang_zip_enable' => $LANG_MG01['zip_enable'], 'lang_zip_path' => $LANG_MG01['zip_path'], 'lang_tmp_path' => $LANG_MG01['tmp_path'], 'lang_ffmpeg_path' => $LANG_MG01['ffmpeg_path'], 'jhead_path' => $_MG_CONF['jhead_path'], 'jpegtran_path' => $_MG_CONF['jpegtran_path'], 'zip_path' => $_MG_CONF['zip_path'], 'tmp_path' => $_MG_CONF['tmp_path'], 'ftp_path' => $_MG_CONF['ftp_path'], 'ffmpeg_path' => $_MG_CONF['ffmpeg_path'], 'displayblock' => $block_select, 'dfidselect' => $dfid_select, 'rating_select' => $rating_select, 'wn_time_select' => $wn_time_select, 'custom_image_height' => $_MG_CONF['custom_image_height'], 'random_width' => $_MG_CONF['random_width'], 'random_skin' => $_MG_CONF['random_skin'], 'custom_image_width' => $_MG_CONF['custom_image_width'], 'refresh_rate' => $_MG_CONF['def_refresh_rate'], 'item_limit' => $_MG_CONF['def_item_limit'], 'time_limit' => $_MG_CONF['def_time_limit'], 'gallery_tn_size_select' => $gallery_tn_size_select, 'gallery_tnheight_input' => $gallery_tnheight_input, 'gallery_tnwidth_input' => $gallery_tnwidth_input, 'jpg_quality' => $_MG_CONF['jpg_quality'], 'tn_jpg_quality' => $_MG_CONF['tn_jpg_quality'], 'orig_jpg_quality' => $_MG_CONF['jpg_orig_quality'], 'truncate_breadcrumb' => $_MG_CONF['truncate_breadcrumb'], 'seperator' => $_MG_CONF['seperator'], 'mp3_select' => $mp3_select, 'skin_select' => $skin_select, 'rskin_select' => $rskin_select, 'theme_select' => $theme_select, 'postcard_retention' => $_MG_CONF['postcard_retention'], 'lang_wn_time' => $LANG_MG01['whatsnew_time'], 'lang_theme_select' => $LANG_MG01['index_theme'], 'lang_gallery_tn_size' => $LANG_MG01['gallery_tn_size'], 'lang_jpg_quality' => $LANG_MG01['jpg_quality'], 'lang_tn_jpg_quality' => $LANG_MG01['tn_jpg_quality'], 'lang_orig_jpg_quality' => $LANG_MG01['orig_jpg_quality'], 'lang_truncate_breadcrumb' => $LANG_MG01['truncate_breadcrumb'], 'lang_seperator' => $LANG_MG01['seperator'], 'lang_mp3_player' => $LANG_MG01['mp3_player'], 'lang_htmlallowed' => $LANG_MG01['htmlallowed'], 'lang_whatsnew' => $LANG_MG01['whatsnew'], 'lang_dfid' => $LANG_MG01['dfid'], 'lang_general_options' => $LANG_MG01['general_options'], 'lang_display_options' => $LANG_MG01['display_options'], 'lang_graphics_options' => $LANG_MG01['graphics_options'], 'lang_usage_tracking' => $LANG_MG01['usage_tracking'], 'lang_gallery_import' => $LANG_MG01['gallery_import'], 'lang_4images_import' => $LANG_MG01['fourimages_import'], 'lang_xppubwiz_install' => $LANG_MG01['xppubwizard_install'], 'lang_logviewer' => $LANG_MG01['log_viewer'], 'lang_preserve_filename' => $LANG_MG01['preserve_filename'], 'lang_discard_originals' => $LANG_MG01['discard_originals'], 'lang_custom_image_height' => $LANG_MG01['custom_image_height'], 'lang_custom_image_width' => $LANG_MG01['custom_image_width'], 'lang_verbose' => $LANG_MG01['verbose'], 'lang_dwnc' => $LANG_MG01['disable_wn_comments'], 'lang_emid' => $LANG_MG01['enable_mid'], 'lang_fip' => $LANG_MG01['full_in_popup'], 'lang_cmtbar' => $LANG_MG01['cmtbar'], 'lang_wn_length' => $LANG_MG01['wn_title_length'], 'lang_batch_options' => $LANG_MG01['batch_options'], 'lang_refresh_rate' => $LANG_MG01['refresh_rate'], 'lang_time_limit' => $LANG_MG01['time_limit'], 'lang_item_limit' => $LANG_MG01['item_limit'], 'lang_ftp_path' => $LANG_MG01['ftp_path'], 'lang_characters' => $LANG_MG01['characters'], 'lang_postcard_retention' => $LANG_MG01['postcard_retention'], 'lang_profile_hook' => $LANG_MG01['profile_hook'], 's_form_action' => $_MG_CONF['admin_url'] . 'cfgedit.php', 'rtl' => $LANG_DIRECTION == "rtl" ? "rtl" : "", 'lang_autotag_caption' => $LANG_MG01['autotag_caption'], 'lang_popup_from_album' => $LANG_MG01['popup_from_album'], 'lang_random_size' => $LANG_MG01['random_size'], 'lang_random_skin' => $LANG_MG01['random_skin'], 'lang_auto_tag_defaults' => $LANG_MG01['auto_tag_defaults'], 'lang_alignment' => $LANG_MG01['alignment'], 'lang_border' => $LANG_MG01['border'], 'lang_width' => $LANG_MG01['width'], 'lang_height' => $LANG_MG01['height'], 'lang_source' => $LANG_MG01['source'], 'lang_autoplay' => $LANG_MG01['autoplay'], 'lang_link_to_media' => $LANG_MG01['link_to_media'], 'lang_ss_delay' => $LANG_MG01['ss_delay'], 'lang_show_titles' => $LANG_MG01['show_titles'], 'lang_flv' => $LANG_MG01['flash_video_player'], 'lang_search_result_options' => $LANG_MG01['search_result_options'], 'lang_search_columns' => $LANG_MG01['search_columns'], 'lang_search_rows' => $LANG_MG01['search_rows'], 'lang_search_av_playback' => $LANG_MG01['search_av_playback'], 'lang_search_views' => $LANG_MG01['search_views'], 'lang_search_rating' => $LANG_MG01['search_rating'], 'lang_gallery_only' => $LANG_MG01['gallery_only'], 'lang_tnheight' => $LANG_MG01['tn_height'], 'lang_tnwidth' => $LANG_MG01['tn_width'], 'lang_index_all' => $LANG_MG01['index_all'], 'gltoken_name' => CSRF_TOKEN, 'gltoken' => SEC_createToken())); $T->parse('output', 'admin'); $retval .= $T->finish($T->get_var('output')); return $retval; }
function forumNavbarMenu($current = '') { global $_CONF, $_USER, $LANG_GF01, $LANG_GF02; require_once $_CONF['path_system'] . 'classes/navbar.class.php'; $navmenu = new navbar(); $navmenu->add_menuitem($LANG_GF01['INDEXPAGE'], "{$_CONF['site_url']}/forum/index.php"); if (!COM_isAnonUser()) { $navmenu->add_menuitem($LANG_GF02['msg197'], "{$_CONF['site_url']}/forum/index.php?op=markallread"); $navmenu->set_onclick($LANG_GF02['msg197'], 'return confirm("' . $LANG_GF02['msg301'] . '");'); $navmenu->add_menuitem($LANG_GF01['USERPREFS'], "{$_CONF['site_url']}/forum/userprefs.php"); $navmenu->add_menuitem($LANG_GF01['SUBSCRIPTIONS'], "{$_CONF['site_url']}/forum/notify.php"); } $navmenu->add_menuitem($LANG_GF02['msg200'], "{$_CONF['site_url']}/forum/memberlist.php"); $navmenu->add_menuitem($LANG_GF02['msg201'], "{$_CONF['site_url']}/forum/index.php?op=popular"); if ($current != '') { $navmenu->set_selected($current); } return $navmenu->generate(); }
function prj_breadcrumbs($tid = 0, $pid = 0, $last_label1 = '', $last_label2 = '') { global $_TABLES, $_CONF, $strings; $result = DB_query("SELECT tid,name,parent_task,lhs,rhs FROM {$_TABLES['prj_tasks']} WHERE tid={$tid}"); list($tid, $taskName, $taskParent, $task_lhs, $task_rhs) = DB_fetchArray($result); $result = DB_query("SELECT pid, name FROM {$_TABLES['prj_projects']} WHERE pid={$pid}"); list($pid, $projectName) = DB_fetchArray($result); $navbar = new navbar(); $navbar->openBreadcrumbs(); $navbar->add_breadcrumbs("{$_CONF['site_url']}/nexproject/index.php", $strings["home"]); $navbar->add_breadcrumbs("{$_CONF['site_url']}/nexproject/projects.php", $strings["projects"]); if ($pid > 0) { $navbar->add_breadcrumbs("{$_CONF['site_url']}/nexproject/viewproject.php?pid={$pid}", $projectName); } if ($tid > 0) { if ($taskParent == 0) { $navbar->add_breadcrumbs("{$_CONF['site_url']}/nexproject/viewproject.php?mode=view&id={$tid}", $taskName); $navbar->add_lastBreadcrumb($last_label1); } else { $hierarchy = ''; // Need to pass 2nd variable as an empty array $relatedTasks = implode(',', prj_getTopLevelTask($tid, $hierarchy)); $result = DB_query("SELECT tid, name,rhs FROM {$_TABLES['prj_tasks']} WHERE tid in ({$relatedTasks})"); while (list($tid, $taskName, $subtask_rhs) = DB_fetchArray($result)) { $navbar->add_breadcrumbs("{$_CONF['site_url']}/nexproject/viewproject.php?mode=view&id={$tid}", $taskName); } if ($last_label2 != '') { $navbar->add_lastBreadcrumb($last_label2); } else { $navbar->add_lastBreadcrumb($last_label1); } } } else { $navbar->add_lastBreadcrumb($last_label1); } return $navbar->closeBreadcrumbs(); }
} return $sql; } $sql = wfBuildSQLstatement($task, $process, $rev, $singletask, $op); $query = DB_query($sql); // Check if there is another task in the same direction as this task if ($singleuse == 1) { echo COM_siteHeader('none'); } else { echo COM_siteHeader('menu'); } echo COM_startBlock('WorkFlow Trace and Debug Tool'); if (DB_numRows($query) > 0) { if ($singleuse != 1) { echo '<div>'; $navbar = new navbar(); $navbar->add_menuitem('My Tasks', $_CONF['site_url'] . '/nexflow/index.php?op=mytasks'); $navbar->add_menuitem('Outstanding Tasks', $_CONF['site_url'] . '/nexflow/outstanding.php'); $navbar->add_menuitem('WF Trace', $_CONF['site_admin_url'] . '/plugins/nexflow/wftrace.php'); $navbar->set_selected('WF Trace'); echo $navbar->generate(); echo '</div>'; } $p = new Template($_CONF['path_layout'] . 'nexflow/admin'); $p->set_file('page', 'traceview.thtml'); $p->set_var('action_url', $actionURL); $p->set_var('singleuse', $singleuse); $p->set_var('sprocessid', $process); $p->set_var('queue_totalsize', DB_count($_TABLES['nf_queue'])); $p->set_var('start_link', $_CONF['site_admin_url'] . '/plugins/nexflow/wftrace.php?op=start&singleuse=' . $singleuse); $p->set_var('end_link', $_CONF['site_admin_url'] . '/plugins/nexflow/wftrace.php?op=end&singleuse=' . $singleuse);
// require_once '../../../lib-common.php'; // Only let users with nexflow.edit rights to access this page if (!SEC_hasRights('nexflow.edit')) { $display = COM_siteHeader(); $display .= COM_startBlock($LANG_NF00['access_denied']); $display .= $LANG_NF00['admin_access_error']; $display .= COM_endBlock(); $display .= COM_siteFooter(true); echo $display; exit; } require_once $_CONF['path'] . 'plugins/nexflow/nexflow.php'; require_once $_CONF['path_system'] . 'classes/navbar.class.php'; echo COM_siteHeader('menu'); $navbar = new navbar(); $navbar->add_menuitem('My Tasks', $_CONF['site_url'] . '/nexflow/index.php'); $navbar->add_menuitem('View Templates', $_CONF['site_admin_url'] . '/plugins/nexflow/templates.php'); $navbar->add_menuitem('Edit Handlers', $_CONF['site_admin_url'] . '/plugins/nexflow/handlers.php'); $navbar->set_selected('Edit Handlers'); echo $navbar->generate(); $userid = $_USER['uid']; $operation = COM_applyFilter($_GET['operation'], false); $handlerID = COM_applyFilter($_GET['handlerID'], true); if (!get_magic_quotes_gpc()) { $handler = addslashes($_GET['handler']); $description = addslashes($_GET['desc']); } else { $handler = $_GET['handler']; $description = $_GET['desc']; }
function menuConfig() { global $_CONF, $_TABLES, $_USER, $LANG_NEXMENU01, $id, $inactive, $showdisabled; global $menulocation, $CONF_NEXMENU, $LANG_NEXMENU04, $LANG_NEXMENU05; $statusmsg = $_GET['statusmsg']; include $_CONF['path_system'] . 'classes/navbar.class.php'; $tpl = new Template($_CONF['path_layout'] . 'nexmenu/admin'); if ($CONF_NEXMENU['debug']) { $tpl->set_file('page', 'menuconfig-debug.thtml'); } else { $tpl->set_file('page', 'menuconfig.thtml'); } $tpl->set_var('site_url', $_CONF['site_url']); $tpl->set_var('layout_url', $_CONF['layout_url']); $tpl->set_var('imgset', $_CONF['layout_url'] . '/nexmenu/images/admin'); $tpl->set_var('LANG_usecolorpicker', $LANG_NEXMENU05[32]); $theme = COM_applyFilter($_POST['theme']); if (empty($theme)) { $theme = COM_applyFilter($_GET['theme']); } if (empty($theme)) { $theme = $_USER['theme']; } if (!empty($theme)) { // Check if a record already exists for theme - if not create one from the default record if (DB_count($_TABLES['nexmenu_config'], 'theme', $theme) == 1) { $query = DB_query("SELECT * FROM {$_TABLES['nexmenu_config']} WHERE theme='{$theme}'"); $A = DB_fetchArray($query); } else { $query = DB_query("SELECT * FROM {$_TABLES['nexmenu_config']} WHERE theme='default'"); if (DB_numRows($query) == 1) { DB_query("INSERT INTO {$_TABLES['nexmenu_config']} (theme,header_style,block_style) VALUES ('{$theme}','CSS','CSS')"); $D = DB_fetchArray($query); $numfields = DB_numFields($query); // Need to skip the first field - which is an auto-increment primary key for ($i = 1; $i < $numfields; $i++) { $fieldname = DB_fieldName($query, $i); DB_query("UPDATE {$_TABLES['nexmenu_config']} SET {$fieldname}='{$D[$fieldname]}' WHERE theme='{$theme}'"); } $query = DB_query("SELECT * FROM {$_TABLES['nexmenu_config']} WHERE theme='{$theme}'"); $A = DB_fetchArray($query); } else { COM_errorLog("glMenu - tried to create new config record for theme: {$theme}, and default config record not found"); echo "<p>Unexpected plugin Error - check error.log</p>"; die; } } } else { $theme = 'default'; $query = DB_query("SELECT * FROM {$_TABLES['nexmenu_config']} WHERE theme='{$theme}'"); $A = DB_fetchArray($query); } $scripturl = $_CONF['site_admin_url'] . '/plugins/nexmenu/index.php'; $navbar = new navbar(); $navbar->add_menuitem($LANG_NEXMENU04['1'], $scripturl . "?menulocation=header&showdisabled={$showdisabled}"); $navbar->add_menuitem($LANG_NEXMENU04['2'], $scripturl . "?menulocation=block&showdisabled={$showdisabled}"); $navbar->add_menuitem($LANG_NEXMENU04['3'], $scripturl . "?op=addaction&id={$idCurrent}&menulocation={$menulocation}&showdisabled={$showdisabled}"); $navbar->add_menuitem($LANG_NEXMENU04['6'], $scripturl . "?op=config&menulocation=block&showdisabled={$showdisabled}"); $navbar->set_selected($LANG_NEXMENU04['6']); $tpl->set_var('navbar', $navbar->generate()); if ($statusmsg != '') { $tpl->set_var('showalert', ''); } else { $tpl->set_var('showalert', 'none'); } $tpl->set_var('statusmsg', $statusmsg); $tpl->set_var('LANG_title', $LANG_NEXMENU05[6]); $menustyles = array_keys($CONF_NEXMENU['menutypes']); $headerMenuType_options = ''; $blockMenuType_options = ''; foreach ($menustyles as $option) { if ($A['header_style'] == $option) { $headerMenuType_options .= '<option value="' . $option . '" SELECTED=selected>' . $option . '</option>'; } else { $headerMenuType_options .= '<option value="' . $option . '">' . $option . '</option>'; } } foreach ($menustyles as $option) { if ($A['block_style'] == $option) { $blockMenuType_options .= '<option value="' . $option . '" SELECTED=selected>' . $option . '</option>'; } else { $blockMenuType_options .= '<option value="' . $option . '">' . $option . '</option>'; } } if ($A['header_style'] == 'Milonic') { $tpl->set_var('show_headerCssMenuSettings', 'none'); $tpl->set_var('show_headerMilonicMenuSettings', ''); } else { $tpl->set_var('show_headerCssMenuSettings', ''); $tpl->set_var('show_headerMilonicMenuSettings', 'none'); } if ($A['block_style'] == 'Milonic') { $tpl->set_var('show_blockCssMenuSettings', 'none'); $tpl->set_var('show_blockMilonicMenuSettings', ''); } else { $tpl->set_var('show_blockCssMenuSettings', ''); $tpl->set_var('show_blockMilonicMenuSettings', 'none'); } $themes = COM_getThemes(); $themes[0] = 'default'; ksort($themes); foreach ($themes as $option) { if ($A['theme'] == $option) { $theme_options .= '<option value="' . $option . '" SELECTED=selected>' . $option . '</option>'; } else { $theme_options .= '<option value="' . $option . '">' . $option . '</option>'; } } $tpl->set_var('headerMenuType_options', $headerMenuType_options); $tpl->set_var('blockMenuType_options', $blockMenuType_options); $tpl->set_var('theme_options', $theme_options); $tpl->set_var('headerbg', $A['headerbg']); $tpl->set_var('headerfg', $A['headerfg']); $tpl->set_var('blockbg', $A['blockbg']); $tpl->set_var('blockfg', $A['blockfg']); $tpl->set_var('headersubmenubg', $A['headersubmenubg']); $tpl->set_var('headersubmenufg', $A['headersubmenufg']); $tpl->set_var('blocksubmenubg', $A['blocksubmenubg']); $tpl->set_var('blocksubmenufg', $A['blocksubmenufg']); $tpl->set_var('onhover_headerbg', $A['onhover_headerbg']); $tpl->set_var('onhover_headerfg', $A['onhover_headerfg']); $tpl->set_var('onhover_blockbg', $A['onhover_blockbg']); $tpl->set_var('onhover_blockfg', $A['onhover_blockfg']); $tpl->set_var('onhover_headersubmenubg', $A['onhover_headersubmenubg']); $tpl->set_var('onhover_headersubmenufg', $A['onhover_headersubmenufg']); $tpl->set_var('onhover_blocksubmenubg', $A['onhover_blocksubmenubg']); $tpl->set_var('onhover_blocksubmenufg', $A['onhover_blocksubmenufg']); $tpl->set_var('header_properties', $A['headermenu_properties']); $tpl->set_var('block_properties', $A['blockmenu_properties']); $tpl->set_var('LANG_menumode', $LANG_NEXMENU05[0]); $tpl->set_var('LANG_langlabels', $LANG_NEXMENU05[1]); $tpl->set_var('LANG_newwindow', $LANG_NEXMENU05[2]); $tpl->set_var('LANG_reference', $LANG_NEXMENU05[3]); $tpl->set_var('LANG_enabled', $LANG_NEXMENU05[4]); $tpl->set_var('LANG_disabled', $LANG_NEXMENU05[5]); $tpl->set_var('LANG_miloniclabel1', $LANG_NEXMENU05[7]); $tpl->set_var('LANG_miloniclabel2', $LANG_NEXMENU05[8]); $tpl->set_var('LANG_miloniclabel3', $LANG_NEXMENU05[9]); $tpl->set_var('LANG_miloniclabel4', $LANG_NEXMENU05[10]); $tpl->set_var('LANG_miloniclabel5', $LANG_NEXMENU05[12]); $tpl->set_var('LANG_miloniclabel6', $LANG_NEXMENU05[13]); $tpl->set_var('LANG_miloniclabel7', $LANG_NEXMENU05[14]); $tpl->set_var('LANG_milonichelp1', $LANG_NEXMENU05[11]); $tpl->set_var('LANG_csslabel1', $LANG_NEXMENU05[15]); $tpl->set_var('LANG_csslabel2', $LANG_NEXMENU05[16]); $tpl->set_var('LANG_csslabel3', $LANG_NEXMENU05[17]); $tpl->set_var('LANG_csslabel4', $LANG_NEXMENU05[18]); $tpl->set_var('LANG_csslabel5', $LANG_NEXMENU05[19]); $tpl->set_var('LANG_csslabel6', $LANG_NEXMENU05[20]); $tpl->set_var('LANG_csslabel7', $LANG_NEXMENU05[21]); $tpl->set_var('LANG_csslabel8', $LANG_NEXMENU05[22]); $tpl->set_var('LANG_csslabel9', $LANG_NEXMENU05[23]); $tpl->set_var('LANG_csslabel26', $LANG_NEXMENU05[26]); $tpl->set_var('LANG_csslabel27', $LANG_NEXMENU05[27]); $tpl->set_var('LANG_csslabel28', $LANG_NEXMENU05[28]); $tpl->set_var('LANG_csslabel29', $LANG_NEXMENU05[29]); $tpl->set_var('LANG_csslabel30', $LANG_NEXMENU05[30]); $tpl->set_var('LANG_csslabel31', $LANG_NEXMENU05[31]); $tpl->set_var('LANG_yes', $LANG_NEXMENU05[24]); $tpl->set_var('LANG_no', $LANG_NEXMENU05[25]); if ($A['multilanguage'] == 1) { $tpl->set_var('chk_langon', "CHECKED=checked"); } else { $tpl->set_var('chk_langoff', "CHECKED=checked"); } if ($A['targetfeatures'] == '') { $tpl->set_var('targetfeatures', 'width=800,height=600,left=50,top=50,scrollbars=yes;'); } else { $A['targetfeatures'] = str_replace('targetfeatures=', '', $A['targetfeatures']); $tpl->set_var('targetfeatures', $A['targetfeatures']); } if ($_GET['writecss'] == 1) { $tpl->set_var('chk_writecss_yes', 'CHECKED=checked'); } else { $tpl->set_var('chk_writecss_no', 'CHECKED=checked'); } $menustyles = ''; foreach ($CONF_NEXMENU['milonicstyles'] as $menustyle) { if ($A['blockmenu_style'] == $menustyle) { $menustyles .= '<option value="' . $menustyle . '" SELECTED=selected>' . $menustyle . '</option>'; } else { $menustyles .= '<option value="' . $menustyle . '">' . $menustyle . '</option>'; } } $tpl->set_var('style1_options', $menustyles); if ($A['header_style'] == 'Milonic') { $tpl->set_var('show_milonicstyles', ''); $tpl->set_var('show_cssmenucolors', 'none'); } else { $tpl->set_var('show_milonicstyles', 'none'); $tpl->set_var('show_cssmenucolors', ''); } $menustyles = ''; foreach ($CONF_NEXMENU['milonicstyles'] as $menustyle) { if ($A['blocksubmenu_style'] == $menustyle) { $menustyles .= '<option value="' . $menustyle . '" SELECTED=selected>' . $menustyle . '</option>'; } else { $menustyles .= '<option value="' . $menustyle . '">' . $menustyle . '</option>'; } } $tpl->set_var('style2_options', $menustyles); $menustyles = ''; foreach ($CONF_NEXMENU['milonicstyles'] as $menustyle) { if ($A['headermenu_style'] == $menustyle) { $menustyles .= '<option value="' . $menustyle . '" SELECTED=selected>' . $menustyle . '</option>'; } else { $menustyles .= '<option value="' . $menustyle . '">' . $menustyle . '</option>'; } } $tpl->set_var('style3_options', $menustyles); $menustyles = ''; foreach ($CONF_NEXMENU['milonicstyles'] as $menustyle) { if ($A['headersubmenu_style'] == $menustyle) { $menustyles .= '<option value="' . $menustyle . '" SELECTED=selected>' . $menustyle . '</option>'; } else { $menustyles .= '<option value="' . $menustyle . '">' . $menustyle . '</option>'; } } $tpl->set_var('style4_options', $menustyles); $tpl->set_var('LANG_CANCEL', $LANG_NEXMENU01['LANG_CANCEL']); $tpl->set_var('cancel_url', $_CONF['site_admin_url'] . '/plugins/nexmenu/index.php?op=display&id=' . $id . '&showdisabled=' . $inactive . '&menulocation=' . $menulocation); $tpl->set_var('LANG_SUBMIT', $LANG_NEXMENU01['LANG_UPDATE']); $tpl->parse('output', 'page'); return $tpl->finish($tpl->get_var('output')); }
$menuItems[] = ['label' => 'Terms', 'url' => ['/site/tos']]; if (Yii::$app->user->isGuest) { $menuItems[] = ['label' => 'Signup', 'url' => ['/site/signup']]; $menuItems[] = ['label' => 'Account Management', 'url' => ['/site/login']]; } else { $menuItems[] = ['label' => 'Purchase', 'url' => ['/purchase/create']]; $menuItems[] = ['label' => 'Account Details', 'url' => ['/site/account']]; $menuItems[] = ['label' => 'Logout (' . Yii::$app->user->identity->username . ')', 'linkOptions' => ['data-method' => 'post'], 'url' => ['/site/logout']]; } echo Nav::widget(['options' => ['class' => 'navbar-nav navbar-right'], 'items' => $menuItems]); NavBar::end(); ?> <?php if (\Yii::$app->user->getIdentity()) { navbar::begin(['options' => ['class' => 'navbar-inverse navbar-fixed-top', 'style' => 'top:50px;']]); echo Nav::widget(['options' => ['class' => 'navbar-nav navbar-right'], 'items' => [['label' => 'Time Remaining: ' . radcheck::getHumanReadableExpiration(\Yii::$app->user->getIdentity()->username), 'url' => ['/purchase/create']]]]); NavBar::end(); } ?> <div class="container"> <?php echo Breadcrumbs::widget(['links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]); ?> <?php echo Alert::widget(); ?> <?php echo $content; ?>
} function fetchNewTemplateDataID($oldid, $_ARR) { $len = count($_ARR['templatedata']); for ($cntr = 0; $cntr < $len; $cntr++) { // echo $_ARR['templatedata'][$cntr]['origid'] . " - " . $oldid . " - " . $_ARR['templatedata'][$cntr]['newid'] . "<HR>"; if ($_ARR['templatedata'][$cntr]['origid'] == $oldid) { return $_ARR['templatedata'][$cntr]['newid']; } } } //MAIN CODE if (!isset($_POST['op']) and $_POST['op'] != 'import') { echo COM_siteHeader(); echo COM_startBlock('nexFlow - Import template'); $navbar = new navbar(); $navbar->add_menuitem('My Tasks', $CONF_NF['TaskConsole_URL']); if (SEC_hasRights('nexflow.admin')) { $navbar->add_menuitem('View Templates', $_CONF['site_admin_url'] . '/plugins/nexflow/templates.php'); $navbar->add_menuitem('Edit Handlers', $_CONF['site_admin_url'] . '/plugins/nexflow/handlers.php'); $navbar->add_menuitem('Import Template', $_CONF['site_admin_url'] . '/plugins/nexflow/import.php'); $navbar->set_selected('Import Template'); } $p = new Template($_CONF['path_layout'] . 'nexflow/admin'); $p->set_file('page', 'import.thtml'); $p->set_var('navbar', $navbar->generate()); $p->set_var('helpmsg', 'Upload the exported nexflow template that you want to import.'); $action_url = $_CONF['site_admin_url'] . '/plugins/nexflow/import.php'; $p->set_var('action_url', $action_url); $p->parse('output', 'page'); echo $p->finish($p->get_var('output'));
/** * Create the tabbed user menu. * Provides a common menu creation for user-facing files such as index.php * and detail.php * * @param string $selected Currently-select menu option text * @return string HTML for tabbed menu */ function PAYPAL_userMenu($selected = '') { global $LANG_PP, $ppGCart; USES_class_navbar(); $menu = new navbar(); $menu->add_menuitem($LANG_PP['product_list'], PAYPAL_URL . '/index.php'); if (!COM_isAnonUser()) { $menu->add_menuitem($LANG_PP['purchase_history'], PAYPAL_URL . '/index.php?view=history'); } if ($ppGCart->hasItems()) { $menu->add_menuitem($LANG_PP['viewcart'], PAYPAL_URL . '/index.php?view=cart'); } if (SEC_hasRights('paypal.admin')) { $menu->add_menuitem($LANG_PP['mnu_admin'], PAYPAL_ADMIN_URL . '/index.php'); } if ($selected != '') { $menu->set_selected($selected); } return $menu->generate(); }
function MG_editMemberDefaults() { global $_CONF, $_MG_CONF, $_TABLES, $_USER, $LANG_MG00, $LANG_MG01, $LANG_MG03, $LANG_ACCESS, $LANG_DIRECTION; global $album_jumpbox, $album_selectbox, $MG_albums, $LANG04; MG_initAlbums(); $retval = ''; $T = new Template($_MG_CONF['template_path'] . '/admin'); $T->set_file(array('admin' => 'editmember.thtml', 'admin_formats' => 'editalbum_formats.thtml')); include_once $_CONF['path_system'] . "classes/navbar.class.php"; $navbar = new navbar(); $navbar->add_menuitem($LANG_MG01['member_albums'], 'showhideMGAdminEditorDiv("members",0);return false;', true); $navbar->add_menuitem($LANG_MG01['allowed_media_formats'], 'showhideMGAdminEditorDiv("media",1);return false;', true); $navbar->add_menuitem($LANG_MG01['album_attributes'], 'showhideMGAdminEditorDiv("attributes",2);return false;', true); $navbar->add_menuitem($LANG_MG01['anonymous_uploads_prompt'], 'showhideMGAdminEditorDiv("useruploads",3);return false;', true); $navbar->add_menuitem($LANG_ACCESS['accessrights'], 'showhideMGAdminEditorDiv("access",4);return false;', true); $navbar->set_selected($LANG_MG01['member_albums']); $T->set_var('navbar', $navbar->generate()); $T->set_var('no_javascript_warning', $LANG04[150]); $T->set_var(array('jpg_checked' => $_MG_CONF['member_valid_formats'] & MG_JPG ? ' checked="checked"' : '', 'png_checked' => $_MG_CONF['member_valid_formats'] & MG_PNG ? ' checked="checked"' : '', 'tif_checked' => $_MG_CONF['member_valid_formats'] & MG_TIF ? ' checked="checked"' : '', 'gif_checked' => $_MG_CONF['member_valid_formats'] & MG_GIF ? ' checked="checked"' : '', 'bmp_checked' => $_MG_CONF['member_valid_formats'] & MG_BMP ? ' checked="checked"' : '', 'tga_checked' => $_MG_CONF['member_valid_formats'] & MG_TGA ? ' checked="checked"' : '', 'psd_checked' => $_MG_CONF['member_valid_formats'] & MG_PSD ? ' checked="checked"' : '', 'mp3_checked' => $_MG_CONF['member_valid_formats'] & MG_MP3 ? ' checked="checked"' : '', 'ogg_checked' => $_MG_CONF['member_valid_formats'] & MG_OGG ? ' checked="checked"' : '', 'asf_checked' => $_MG_CONF['member_valid_formats'] & MG_ASF ? ' checked="checked"' : '', 'swf_checked' => $_MG_CONF['member_valid_formats'] & MG_SWF ? ' checked="checked"' : '', 'mov_checked' => $_MG_CONF['member_valid_formats'] & MG_MOV ? ' checked="checked"' : '', 'mp4_checked' => $_MG_CONF['member_valid_formats'] & MG_MP4 ? ' checked="checked"' : '', 'mpg_checked' => $_MG_CONF['member_valid_formats'] & MG_MPG ? ' checked="checked"' : '', 'zip_checked' => $_MG_CONF['member_valid_formats'] & MG_ZIP ? ' checked="checked"' : '', 'flv_checked' => $_MG_CONF['member_valid_formats'] & MG_FLV ? ' checked="checked"' : '', 'rflv_checked' => $_MG_CONF['member_valid_formats'] & MG_RFLV ? ' checked="checked"' : '', 'emb_checked' => $_MG_CONF['member_valid_formats'] & MG_EMB ? ' checked="checked"' : '', 'other_checked' => $_MG_CONF['member_valid_formats'] & MG_OTHER ? ' checked="checked"' : '', 'lang_jpg' => $LANG_MG01['jpg'], 'lang_png' => $LANG_MG01['png'], 'lang_tif' => $LANG_MG01['tif'], 'lang_gif' => $LANG_MG01['gif'], 'lang_bmp' => $LANG_MG01['bmp'], 'lang_tga' => $LANG_MG01['tga'], 'lang_psd' => $LANG_MG01['psd'], 'lang_mp3' => $LANG_MG01['mp3'], 'lang_ogg' => $LANG_MG01['ogg'], 'lang_asf' => $LANG_MG01['asf'], 'lang_swf' => $LANG_MG01['swf'], 'lang_mov' => $LANG_MG01['mov'], 'lang_mp4' => $LANG_MG01['mp4'], 'lang_mpg' => $LANG_MG01['mpg'], 'lang_zip' => $LANG_MG01['zip'], 'lang_flv' => $LANG_MG01['flv'], 'lang_rflv' => $LANG_MG01['rflv'], 'lang_emb' => $LANG_MG01['emb'], 'lang_other' => $LANG_MG01['other'], 'lang_allowed_formats' => $LANG_MG01['allowed_media_formats'], 'lang_image' => $LANG_MG01['image'], 'lang_audio' => $LANG_MG01['audio'], 'lang_video' => $LANG_MG01['video'])); $T->parse('valid_formats', 'admin_formats'); $member_albums = '<input type="checkbox" name="member_albums" value="1" ' . ($_MG_CONF['member_albums'] ? ' checked="checked"' : '') . '/>'; $auto_create = '<input type="checkbox" name="auto_create" value="1" ' . ($_MG_CONF['member_auto_create'] ? ' checked="checked"' : '') . '/>'; $allow_create = '<input type="checkbox" name="allow_create" value="1" ' . ($_MG_CONF['member_create_new'] ? ' checked="checked"' : '') . '/>'; $album_jumpbox = ''; $MG_albums[0]->buildJumpBox($_MG_CONF['member_album_root']); $album_list_root = '<select name="member_root">'; $album_list_root .= '<option value="0">' . $LANG_MG01['root_album'] . '</option>'; $album_list_root .= $album_jumpbox; $album_list_root .= '</select>'; $MG_albums[0]->buildAlbumBox($_MG_CONF['member_album_archive'], 3, -1, 'upload'); $member_archive = '<select name="member_archive">'; $member_archive .= '<option value="0">' . $LANG_MG01['do_not_archive'] . '</option>'; $member_archive .= $album_selectbox; $member_archive .= '</select>'; $T->set_var('site_url', $_CONF['site_url']); $T->set_var('site_admin_url', $_CONF['site_admin_url']); $ri_select = '<input type="checkbox" name="enable_random" value="1" ' . ($_MG_CONF['member_enable_random'] ? ' checked="checked"' : '') . '/>'; $max_image_height_input = '<input type="text" size="4" name="max_image_height" value="' . $_MG_CONF['member_max_height'] . '"' . '/>'; $max_image_width_input = '<input type="text" size="4" name="max_image_width" value="' . $_MG_CONF['member_max_width'] . '"' . '/>'; $max_filesize_input = '<input type="text" size="10" name="max_filesize" value="' . $_MG_CONF['member_max_filesize'] . '"' . '/>'; $email_mod_select = '<input type="checkbox" name="email_mod" value="1" ' . ($_MG_CONF['member_email_mod'] ? ' checked="checked"' : '') . '/>'; // permission template $usergroups = SEC_getUserGroups(); $groupdd = ''; $moddd = ''; $gresult = DB_query("SELECT grp_id FROM {$_TABLES['groups']} WHERE grp_name LIKE 'mediagallery Admin'"); $grow = DB_fetchArray($gresult); $grp_id = $grow['grp_id']; if (!isset($_MG_CONF['ad_group_id'])) { $_MG_CONF['ad_group_id'] = $grp_id; } if (!isset($_MG_CONF['member_mod_group_id'])) { $_MG_CONF['member_mod_group_id'] = $grp_id; } $groupdd .= '<select name="group_id">'; $moddd .= '<select name="mod_id">'; for ($i = 0; $i < count($usergroups); $i++) { $groupdd .= '<option value="' . $usergroups[key($usergroups)] . '"'; $moddd .= '<option value="' . $usergroups[key($usergroups)] . '"'; if ($_MG_CONF['ad_group_id'] == $usergroups[key($usergroups)]) { $groupdd .= ' selected="selected"'; $groupname = key($usergroups); } if ($_MG_CONF['member_mod_group_id'] == $usergroups[key($usergroups)]) { $moddd .= ' selected="selected"'; } $groupdd .= '>' . key($usergroups) . '</option>'; $moddd .= '>' . key($usergroups) . '</option>'; next($usergroups); } $groupdd .= '</select>'; $moddd .= '</select>'; $upload_select = '<input type="checkbox" name="uploads" value="1" ' . ($_MG_CONF['member_uploads'] ? ' checked="checked"' : '') . '/>'; $moderate_select = '<input type="checkbox" name="moderate" value="1" ' . ($_MG_CONF['member_moderate'] ? ' checked="checked"' : '') . '/>'; if (!isset($_MG_CONF['member_use_fullname'])) { $_MG_CONF['member_use_fullname'] = 0; } $fullname_select = '<input type="checkbox" name="member_use_fullname" value="1" ' . ($_MG_CONF['member_use_fullname'] ? ' checked="checked"' : '') . '/>'; if (!isset($_MG_CONF['feature_member_album'])) { $_MG_CONF['feature_member_album'] = 0; } $feature_select = '<input type="checkbox" name="feature_member_album" value="1" ' . ($_MG_CONF['feature_member_album'] ? ' checked="checked"' : '') . '/>'; if (!isset($_MG_CONF['allow_remote'])) { $_MG_CONF['allow_remote'] = 0; } $allow_remote = '<input type="checkbox" name="allow_remote" value="1" ' . ($_MG_CONF['allow_remote'] ? ' checked="checked"' : '') . '/>'; $T->set_var(array('site_url' => $_MG_CONF['site_url'], 'member_albums' => $member_albums, 'album_list_root' => $album_list_root, 'member_archive' => $member_archive, 'auto_create' => $auto_create, 'allow_create' => $allow_create, 'ri_select' => $ri_select, 'height_input' => $max_image_height_input, 'width_input' => $max_image_width_input, 'email_mod_select' => $email_mod_select, 'uploads' => $upload_select, 'moderate' => $moderate_select, 'member_quota' => $_MG_CONF['member_quota'] / 1048576, 'max_filesize' => $_MG_CONF['member_max_filesize'] / 1024, 'member_use_fullname' => $fullname_select, 'feature_member_album' => $feature_select, 'allow_remote' => $allow_remote, 'lang_uploads' => $LANG_MG01['anonymous_uploads_prompt'], 'lang_accessrights' => $LANG_ACCESS['accessrights'], 'lang_owner' => $LANG_ACCESS['owner'], 'lang_group' => $LANG_ACCESS['group'], 'lang_permissions' => $LANG_ACCESS['permissions'], 'lang_perm_key' => $LANG_ACCESS['permissionskey'], 'permissions_editor' => SEC_getPermissionsHTML($_MG_CONF['member_perm_owner'], $_MG_CONF['member_perm_group'], $_MG_CONF['member_perm_members'], $_MG_CONF['member_perm_anon']), 'permissions_msg' => $LANG_ACCESS['permmsg'], 'group_dropdown' => $groupdd, 'mod_dropdown' => $moddd, 'lang_member_upload' => $LANG_MG01['member_upload'], 'lang_moderate_album' => $LANG_MG01['mod_album'], 'lang_mod_group' => $LANG_MG01['moderation_group'], 'lang_zero_unlimited' => $LANG_MG01['zero_unlimited'], 'lang_ri_enable' => $LANG_MG01['ri_enable'], 'lang_max_image_height' => $LANG_MG01['max_image_height'], 'lang_max_image_width' => $LANG_MG01['max_image_width'], 'lang_max_filesize' => $LANG_MG01['max_filesize'], 'lang_display_image_size' => $LANG_MG01['display_image_size'], 'lang_email_mods_on_submission' => $LANG_MG01['email_mods_on_submission'], 'lang_album_attributes' => $LANG_MG01['album_attributes'], 'lang_member_albums' => $LANG_MG01['member_albums'], 'lang_enable_member_albums' => $LANG_MG01['enable_member_albums'], 'lang_member_quota' => $LANG_MG01['default_member_quota'], 'lang_auto_create' => $LANG_MG01['auto_create'], 'lang_allow_create' => $LANG_MG01['allow_create'], 'lang_member_root' => $LANG_MG01['member_root'], 'lang_member_archive' => $LANG_MG01['member_archive'], 'lang_member_use_fullname' => $LANG_MG01['member_use_fullname'], 'lang_feature_member_album' => $LANG_MG01['feature_member_album'], 'lang_allow_remote' => $LANG_MG01['allow_remote'], 'lang_save' => $LANG_MG01['save'], 'lang_cancel' => $LANG_MG01['cancel'], 's_form_action' => $_MG_CONF['admin_url'] . 'member.php', 'rtl' => $LANG_DIRECTION == "rtl" ? "rtl" : "")); $T->parse('output', 'admin'); $retval .= $T->finish($T->get_var('output')); return $retval; }
error_reporting(0); session_start(); $user = "******"; $pass = "******"; $db = "nanoethicsbank"; $dbh = "myst-my-p.cns.iit.edu"; $baseurl = "../uploaded"; $baseurl1 = "uploaded"; $tbl_bank = "bank"; $link = @mysql_connect($dbh, $user, $pass); if (!$link) { die("Couldnt connect to MySql"); } @mysql_select_db("{$db}") or die(mysql_error()); include "./navbar.php"; $nav = new navbar(); $nav->numrowsperpage = 10; /* Function to parse the search string and update the database by Rahul Trehan*/ function get_tagClouds() { $parsedString = new jSearchString(); $parsedString = $parsedString->parseString($_GET['words']); $parsedString = trim($parsedString); if ($parsedString != NULL) { $tag_array = explode('Ç', $parsedString); foreach ($tag_array as $tag_word) { $tag_word = trim($tag_word); $query = "SELECT search_terms, MATCH (search_terms) AGAINST ({$tag_word}) AS count FROM tagclouds "; if (mysql_query($query) != true) { $sql = "UPDATE tagclouds SET value=value+1 where search_terms=" . "'{$tag_word}'"; $result = mysql_query($sql) or die(mysql_error());
/** * Shows poll editor * * Diplays the poll editor form * * @param string $pid ID of poll to edit * @return string HTML for poll editor form * */ function editpoll($pid = '') { global $_CONF, $_PO_CONF, $_GROUPS, $_TABLES, $_USER, $LANG25, $LANG_ACCESS, $LANG_ADMIN, $MESSAGE, $LANG_POLLS; $retval = ''; if (!empty($pid)) { $topic = DB_query("SELECT * FROM {$_TABLES['polltopics']} WHERE pid='{$pid}'"); $T = DB_fetchArray($topic); // Get permissions for poll $access = SEC_hasAccess($T['owner_id'], $T['group_id'], $T['perm_owner'], $T['perm_group'], $T['perm_members'], $T['perm_anon']); if ($access == 0 or $access == 2) { // User doesn't have access...bail $retval .= COM_startBlock($LANG25[21], '', COM_getBlockTemplate('_msg_block', 'header')); $retval .= $LANG25[22]; $retval .= COM_endBlock(COM_getBlockTemplate('_msg_block', 'footer')); COM_accessLog("User {$_USER['username']} tried to illegally submit or edit poll {$pid}."); return $retval; } } // writing the menu on top require_once $_CONF['path_system'] . 'lib-admin.php'; $menu_arr = array(array('url' => $_CONF['site_admin_url'] . '/plugins/polls/index.php', 'text' => $LANG_ADMIN['list_all']), array('url' => $_CONF['site_admin_url'], 'text' => $LANG_ADMIN['admin_home'])); $token = SEC_createToken(); $retval .= COM_startBlock($LANG25[5], '', COM_getBlockTemplate('_admin_block', 'header')); $retval .= ADMIN_createMenu($menu_arr, $LANG_POLLS['editinstructions'], plugin_geticon_polls()); $retval .= SEC_getTokenExpiryNotice($token); $poll_templates = new Template($_CONF['path'] . 'plugins/polls/templates/admin/'); $poll_templates->set_file(array('editor' => 'polleditor.thtml', 'question' => 'pollquestions.thtml', 'answer' => 'pollansweroption.thtml')); $poll_templates->set_var('xhtml', XHTML); $poll_templates->set_var('site_url', $_CONF['site_url']); $poll_templates->set_var('site_admin_url', $_CONF['site_admin_url']); $poll_templates->set_var('layout_url', $_CONF['layout_url']); if (!empty($pid) and $access == 3 and !empty($T['owner_id'])) { $delbutton = '<input type="submit" value="' . $LANG_ADMIN['delete'] . '" name="mode"%s' . XHTML . '>'; $jsconfirm = ' onclick="return confirm(\'' . $MESSAGE[76] . '\');"'; $poll_templates->set_var('delete_option', sprintf($delbutton, $jsconfirm)); $poll_templates->set_var('delete_option_no_confirmation', sprintf($delbutton, '')); } else { $T['pid'] = COM_makeSid(); $T['topic'] = ''; $T['meta_description'] = ''; $T['meta_keywords'] = ''; $T['voters'] = 0; $T['display'] = 1; $T['is_open'] = 1; $T['hideresults'] = 0; $T['owner_id'] = $_USER['uid']; if (isset($_GROUPS['Polls Admin'])) { $T['group_id'] = $_GROUPS['Polls Admin']; } else { $T['group_id'] = SEC_getFeatureGroup('polls.edit'); } SEC_setDefaultPermissions($T, $_PO_CONF['default_permissions']); $T['statuscode'] = 0; $T['commentcode'] = $_CONF['comment_code']; $access = 3; } $poll_templates->set_var('lang_pollid', $LANG25[6]); $poll_templates->set_var('poll_id', $T['pid']); $poll_templates->set_var('lang_donotusespaces', $LANG25[7]); $poll_templates->set_var('lang_topic', $LANG25[9]); $poll_templates->set_var('poll_topic', htmlspecialchars($T['topic'])); $poll_templates->set_var('lang_mode', $LANG25[1]); $poll_templates->set_var('lang_metadescription', $LANG_ADMIN['meta_description']); $poll_templates->set_var('lang_metakeywords', $LANG_ADMIN['meta_keywords']); if (!empty($T['meta_description'])) { $poll_templates->set_var('meta_description', $T['meta_description']); } if (!empty($T['meta_keywords'])) { $poll_templates->set_var('meta_keywords', $T['meta_keywords']); } $poll_templates->set_var('status_options', COM_optionList($_TABLES['statuscodes'], 'code,name', $T['statuscode'])); $poll_templates->set_var('comment_options', COM_optionList($_TABLES['commentcodes'], 'code,name', $T['commentcode'])); $poll_templates->set_var('lang_appearsonhomepage', $LANG25[8]); $poll_templates->set_var('lang_openforvoting', $LANG25[33]); $poll_templates->set_var('lang_hideresults', $LANG25[37]); $poll_templates->set_var('poll_hideresults_explain', $LANG25[38]); $poll_templates->set_var('poll_topic_info', $LANG25[39]); if ($T['display'] == 1) { $poll_templates->set_var('poll_display', 'checked="checked"'); } if ($T['is_open'] == 1) { $poll_templates->set_var('poll_open', 'checked="checked"'); } if ($T['hideresults'] == 1) { $poll_templates->set_var('poll_hideresults', 'checked="checked"'); } // user access info $poll_templates->set_var('lang_accessrights', $LANG_ACCESS['accessrights']); $poll_templates->set_var('lang_owner', $LANG_ACCESS['owner']); $ownername = COM_getDisplayName($T['owner_id']); $poll_templates->set_var('owner_username', DB_getItem($_TABLES['users'], 'username', "uid = {$T['owner_id']}")); $poll_templates->set_var('owner_name', $ownername); $poll_templates->set_var('owner', $ownername); $poll_templates->set_var('owner_id', $T['owner_id']); $poll_templates->set_var('lang_group', $LANG_ACCESS['group']); $poll_templates->set_var('group_dropdown', SEC_getGroupDropdown($T['group_id'], $access)); $poll_templates->set_var('lang_permissions', $LANG_ACCESS['permissions']); $poll_templates->set_var('lang_permissionskey', $LANG_ACCESS['permissionskey']); $poll_templates->set_var('lang_perm_key', $LANG_ACCESS['permissionskey']); $poll_templates->set_var('permissions_editor', SEC_getPermissionsHTML($T['perm_owner'], $T['perm_group'], $T['perm_members'], $T['perm_anon'])); $poll_templates->set_var('lang_permissions_msg', $LANG_ACCESS['permmsg']); $poll_templates->set_var('lang_answersvotes', $LANG25[10]); $poll_templates->set_var('lang_save', $LANG_ADMIN['save']); $poll_templates->set_var('lang_cancel', $LANG_ADMIN['cancel']); // repeat for several questions $question_sql = "SELECT question,qid " . "FROM {$_TABLES['pollquestions']} WHERE pid='{$pid}' ORDER BY qid;"; $questions = DB_query($question_sql); include $_CONF['path_system'] . 'classes/navbar.class.php'; $navbar = new navbar(); for ($j = 0; $j < $_PO_CONF['maxquestions']; $j++) { $display_id = $j + 1; if ($j > 0) { $poll_templates->set_var('style', 'style="display:none;"'); } else { $poll_templates->set_var('style', ''); } $navbar->add_menuitem($LANG25[31] . " {$display_id}", "showhidePollsEditorDiv(\"{$j}\",{$j},{$_PO_CONF['maxquestions']});return false;", true); $Q = DB_fetchArray($questions); $poll_templates->set_var('question_text', $Q['question']); $poll_templates->set_var('question_id', $j); $poll_templates->set_var('lang_question', $LANG25[31] . " {$display_id}"); $poll_templates->set_var('lang_saveaddnew', $LANG25[32]); // answers $answer_sql = "SELECT answer,aid,votes,remark " . "FROM {$_TABLES['pollanswers']} WHERE qid='{$j}' AND pid='{$pid}' ORDER BY aid"; $answers = DB_query($answer_sql); for ($i = 0; $i < $_PO_CONF['maxanswers']; $i++) { if (isset($answers)) { $A = DB_fetchArray($answers); $poll_templates->set_var('answer_text', htmlspecialchars($A['answer'])); $poll_templates->set_var('answer_votes', $A['votes']); $poll_templates->set_var('remark_text', $A['remark']); } else { $poll_templates->set_var('answer_text', ''); $poll_templates->set_var('answer_votes', ''); $poll_templates->set_var('remark_text', ''); } $poll_templates->parse('answer_option', 'answer', true); } $poll_templates->parse('question_list', 'question', true); $poll_templates->clear_var('answer_option'); } $navbar->set_selected($LANG25[31] . " 1"); $poll_templates->set_var('navbar', $navbar->generate()); $poll_templates->set_var('gltoken_name', CSRF_TOKEN); $poll_templates->set_var('gltoken', $token); $poll_templates->parse('output', 'editor'); $retval .= $poll_templates->finish($poll_templates->get_var('output')); $retval .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer')); return $retval; }
/** * Shows the user edit form * * @param int $uid User to edit * @param int $msg Error message to display * @return string HTML for user edit form * */ function USER_edit($uid = '', $msg = '') { global $_CONF, $_SYSTEM, $_TABLES, $_USER, $LANG_MYACCOUNT, $LANG01, $LANG04, $LANG28, $LANG_ADMIN, $LANG_configselects, $LANG_confignames, $LANG_ACCESS, $MESSAGE, $_IMAGE_TYPE; $retval = ''; $newuser = 0; // override $LANG_MYACCOUNT so we remove any plugins if creating an account.... if ($uid == '' || $uid < 2) { $LANG_MYACCOUNT = array('pe_namepass' => $LANG_ACCESS['pe_namepass'], 'pe_userinfo' => $LANG_ACCESS['pe_userinfo'], 'pe_layout' => $LANG_ACCESS['pe_layout'], 'pe_content' => $LANG_ACCESS['pe_content'], 'pe_privacy' => $LANG_ACCESS['pe_privacy']); } // language overrides $LANG_MYACCOUNT['pe_namepass'] = $LANG_ACCESS['pe_namepass']; $LANG_MYACCOUNT['pe_userinfo'] = $LANG_ACCESS['pe_userinfo']; USES_class_navbar(); USES_lib_admin(); $menu_arr = array(array('url' => $_CONF['site_admin_url'] . '/user.php', 'text' => $LANG28[11]), array('url' => $_CONF['site_admin_url'] . '/user.php?import=x', 'text' => $LANG28[23]), array('url' => $_CONF['site_admin_url'] . '/user.php?batchadmin=x', 'text' => $LANG28[54]), array('url' => $_CONF['site_admin_url'] . '/prefeditor.php', 'text' => $LANG28[95]), array('url' => $_CONF['site_admin_url'], 'text' => $LANG_ADMIN['admin_home'])); $userform = new Template($_CONF['path_layout'] . 'admin/user/'); $userform->set_file('user', 'adminuseredit.thtml'); $userform->set_var('enctype', ' enctype="multipart/form-data"'); $userform->set_var('lang_save', $LANG_ADMIN['save']); $userform->set_var('lang_cancel', $LANG_ADMIN['cancel']); // build navigation bar $navbar = new navbar(); $cnt = 0; if (is_array($LANG_MYACCOUNT)) { foreach ($LANG_MYACCOUNT as $id => $label) { if ($id == 'pe_preview') { continue; } if ($id == 'pe_content' && $_CONF['hide_exclude_content'] == 1 && $_CONF['emailstories'] == 0) { continue; } else { $navbar->add_menuitem($label, 'showhideProfileEditorDiv("' . $id . '",' . $cnt . ');return false;', true); $cnt++; if ($id == 'pe_namepass') { $navbar->add_menuitem($LANG01[96], 'showhideProfileEditorDiv("' . 'pe_usergroup' . '",' . $cnt . ');return false;', true); $cnt++; } } } $navbar->set_selected($LANG_MYACCOUNT['pe_namepass']); } $userform->set_var('navbar', $navbar->generate()); $userform->set_var('no_javascript_warning', $LANG04[150]); if (!empty($msg) && !empty($uid) && $uid > 1) { // an error occured while editing a user - if it was a new account, // don't bother trying to read the user's data from the database ... $cnt = DB_count($_TABLES['users'], 'uid', $uid); if ($cnt == 0) { $uid = ''; } } if (!empty($uid) && $uid > 1) { $result = DB_query("SELECT * FROM {$_TABLES['users']},{$_TABLES['userprefs']},{$_TABLES['userinfo']},{$_TABLES['usercomment']},{$_TABLES['userindex']} WHERE {$_TABLES['users']}.uid = {$uid} AND {$_TABLES['userprefs']}.uid = {$uid} AND {$_TABLES['userinfo']}.uid = {$uid} AND {$_TABLES['usercomment']}.uid = {$uid} AND {$_TABLES['userindex']}.uid = {$uid}"); $U = DB_fetchArray($result); if (empty($U['uid'])) { echo COM_refresh($_CONF['site_admin_url'] . '/user.php'); exit; } if (SEC_inGroup('Root', $uid) and !SEC_inGroup('Root')) { // the current admin user isn't Root but is trying to change // a root account. Deny them and log it. $retval .= COM_showMessageText($LANG_ACCESS['editrootmsg'], $LANG28[1], true); COM_accessLog("User {$_USER['username']} tried to edit a Root account with insufficient privileges."); return $retval; } $curtime = COM_getUserDateTimeFormat($U['regdate']); $lastlogin = DB_getItem($_TABLES['userinfo'], 'lastlogin', "uid = {$uid}"); $lasttime = COM_getUserDateTimeFormat($lastlogin); $display_name = COM_getDisplayName($uid); $menuText = $LANG_ACCESS['editinguser'] . $U['username']; if ($U['fullname'] != '') { $menuText .= ' - ' . $U['fullname']; } } else { $U['uid'] = ''; $U['username'] = ''; $U['fullname'] = ''; $U['email'] = ''; $U['remoteuser'] = 0; $U['remoteusername'] = ''; $U['remoteservice'] = ''; $U['homepage'] = ''; $U['location'] = ''; $U['sig'] = ''; $U['about'] = ''; $U['pgpkey'] = ''; $U['noicons'] = 0; $U['noboxes'] = 0; $U['tids'] = ''; $U['etids'] = '-'; $U['aids'] = ''; $U['boxes'] = ''; $uid = ''; $U['cookietimeout'] = $_CONF['session_cookie_timeout']; // 2678400; $U['etids'] = '-'; $U['status'] = USER_ACCOUNT_AWAITING_ACTIVATION; $U['account_type'] = LOCAL_USER; $U['emailfromadmin'] = 1; $U['emailfromuser'] = 1; $U['showonline'] = 1; $U['maxstories'] = 0; $U['dfid'] = 0; $U['search_result_format'] = $_CONF['search_style']; $U['commentmode'] = $_CONF['comment_mode']; $U['commentorder'] = 'ASC'; $U['commentlimit'] = 100; $curtime = COM_getUserDateTimeFormat(); $lastlogin = ''; $lasttime = ''; $U['status'] = USER_ACCOUNT_ACTIVE; $newuser = 1; $userform->set_var('newuser', 1); $menuText = $LANG_ACCESS['createnewuser']; } // now let's check to see if any post vars are set in the event we are returning from an error... if (isset($_POST['new_username'])) { $U['username'] = trim($_POST['new_username']); } if (isset($_POST['fullname'])) { $U['fullname'] = COM_truncate(trim(USER_sanitizeName($_POST['fullname'])), 80); } if (isset($_POST['remoteuser'])) { $U['remoteuser'] = $_POST['remoteuser'] == 'on' ? 1 : 0; } if (isset($_POST['remoteusername'])) { $U['remoteusername'] = COM_truncate(trim($_POST['remoteusername']), 60); } if (isset($_POST['remoteservice'])) { $U['remoteservice'] = COM_applyFilter($_POST['remoteservice']); } if (isset($_POST['userstatus'])) { $U['status'] = COM_applyFilter($_POST['userstatus'], true); } if (isset($_POST['cooktime'])) { $U['cookietimeout'] = COM_applyFilter($_POST['cooktime'], true); } if (isset($_POST['email'])) { $U['email'] = trim($_POST['email']); } if (isset($_POST['homepage'])) { $U['homepage'] = trim($_POST['homepage']); } if (isset($_POST['location'])) { $U['location'] = trim($_POST['location']); } if (isset($_POST['sig'])) { $U['sig'] = trim($_POST['sig']); } if (isset($_POST['about'])) { $U['about'] = trim($_POST['about']); } if (isset($_POST['pgpkey'])) { $U['pgpkey'] = trim($_POST['pgpkey']); } if (isset($_POST['language'])) { $U['language'] = trim(COM_applyFilter($_POST['language'])); } if (isset($_POST['theme'])) { $U['theme'] = trim(COM_applyFilter($_POST['theme'])); } if (isset($_POST['maxstories'])) { $U['maxstories'] = COM_applyFilter($_POST['maxstories'], true); } if (isset($_POST['tzid'])) { $U['tzid'] = COM_applyFilter($_POST['tzid']); } if (isset($_POST['dfid'])) { $U['dfid'] = COM_applyFilter($_POST['dfid'], true); } if (isset($_POST['search_result_format'])) { $U['search_result_format'] = COM_applyFilter($_POST['search_result_format']); } if (isset($_POST['commentmode'])) { $U['commentmode'] = COM_applyFilter($_POST['commentmode']); } if (isset($_POST['commentorder'])) { $U['commentorder'] = $_POST['commentorder'] == 'DESC' ? 'DESC' : 'ASC'; } if (isset($_POST['commentlimit'])) { $U['commentlimit'] = COM_applyFilter($_POST['commentlimit'], true); } if (isset($_POST['emailfromuser'])) { $U['emailfromuser'] = $_POST['emailfromuser'] == 'on' ? 1 : 0; } if (isset($_POST['emailfromadmin'])) { $U['emailfromadmin'] = $_POST['emailfromadmin'] == 'on' ? 1 : 0; } if (isset($_POST['noicons'])) { $U['noicons'] = $_POST['noicons'] == 'on' ? 1 : 0; } if (isset($_POST['noboxes'])) { $U['noboxes'] = $_POST['noboxes'] == 'on' ? 1 : 0; } if (isset($_POST['showonline'])) { $U['showonline'] = $_POST['showonline'] == 'on' ? 1 : 0; } if (isset($_POST['topic_order'])) { $U['topic_order'] = $_POST['topic_order'] == 'ASC' ? 'ASC' : 'DESC'; } $retval .= COM_startBlock($LANG28[1] . ' :: ' . $menuText, '', COM_getBlockTemplate('_admin_block', 'header')); if (!empty($msg)) { $retval .= COM_showMessageText($MESSAGE[$msg], $LANG28[22], false); } $retval .= ADMIN_createMenu($menu_arr, '', $_CONF['layout_url'] . '/images/icons/user.' . $_IMAGE_TYPE); $userform->set_var('account_panel', USER_accountPanel($U)); $userform->set_var('group_panel', USER_groupPanel($U)); $userform->set_var('userinfo_panel', USER_userinfoPanel($U)); $userform->set_var('layout_panel', USER_layoutPanel($U)); if ($_CONF['hide_exclude_content'] == 0 || $_CONF['emailstories'] == 1) { $userform->set_var('content_panel', USER_contentPanel($U)); } $userform->set_var('privacy_panel', USER_privacyPanel($U)); if (!empty($uid) && $uid > 1) { $userform->set_var('plugin_panel', PLG_profileEdit($uid)); } if (isset($LANG_MYACCOUNT['pe_subscriptions'])) { $userform->set_var('subscription_panel', USER_subscriptionPanel($U)); } if (!empty($uid) && $uid != $_USER['uid'] && SEC_hasRights('user.delete')) { $delbutton = '<input type="submit" value="' . $LANG_ADMIN['delete'] . '" name="delete"%s />'; $jsconfirm = ' onclick="return doubleconfirm(\'' . $LANG28[104] . '\',\'' . $LANG28[109] . '\');"'; $userform->set_var('delete_option', sprintf($delbutton, $jsconfirm)); $userform->set_var('delete_option_no_confirmation', sprintf($delbutton, '')); } $userform->set_var('gltoken_name', CSRF_TOKEN); $userform->set_var('gltoken', SEC_createToken()); $retval .= $userform->finish($userform->parse('output', 'user')); $retval .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer')); return $retval; }
/** * Shows story editor * * Displays the story entry form * * @param string $sid ID of story to edit * @param string $mode 'preview', 'edit', 'editsubmission', 'clone' * @param string $errormsg a message to display on top of the page * @return string HTML for story editor * */ function storyeditor($sid = '', $mode = '', $errormsg = '') { global $_CONF, $_TABLES, $_USER, $LANG24, $LANG_ACCESS, $LANG_ADMIN, $MESSAGE, $_SCRIPTS, $LANG_DIRECTION, $LANG_MONTH, $LANG_WEEK; $display = ''; if (!isset($_CONF['hour_mode'])) { $_CONF['hour_mode'] = 12; } if (!empty($errormsg)) { $display .= COM_showMessageText($errormsg, $LANG24[25]); } $story = new Story(); if ($mode == 'preview') { // Handle Magic GPC Garbage: while (list($key, $value) = each($_POST)) { if (!is_array($value)) { $_POST[$key] = COM_stripslashes($value); } else { while (list($subkey, $subvalue) = each($value)) { $value[$subkey] = COM_stripslashes($subvalue); } } } $result = $story->loadFromArgsArray($_POST); if ($_CONF['maximagesperarticle'] > 0) { $errors = $story->checkAttachedImages(); if (count($errors) > 0) { $msg = $LANG24[55] . LB . '<ul>' . LB; foreach ($errors as $err) { $msg .= '<li>' . $err . '</li>' . LB; } $msg .= '</ul>' . LB; $display .= COM_showMessageText($msg, $LANG24[54]); } } } else { $result = $story->loadFromDatabase($sid, $mode); } if ($result == STORY_PERMISSION_DENIED || $result == STORY_NO_ACCESS_PARAMS) { $display .= COM_showMessageText($LANG24[42], $LANG_ACCESS['accessdenied']); COM_accessLog("User {$_USER['username']} tried to illegally access story {$sid}."); return $display; } elseif ($result == STORY_EDIT_DENIED || $result == STORY_EXISTING_NO_EDIT_PERMISSION) { $display .= COM_showMessageText($LANG24[41], $LANG_ACCESS['accessdenied']); $display .= STORY_renderArticle($story, 'p'); COM_accessLog("User {$_USER['username']} tried to illegally edit story {$sid}."); return $display; } elseif ($result == STORY_INVALID_SID) { if ($mode == 'editsubmission') { // that submission doesn't seem to be there any more (may have been // handled by another Admin) - take us back to the moderation page return COM_refresh($_CONF['site_admin_url'] . '/moderation.php'); } else { return COM_refresh($_CONF['site_admin_url'] . '/story.php'); } } elseif ($result == STORY_DUPLICATE_SID) { $display .= COM_showMessageText($LANG24[24]); } // Load HTML templates $story_templates = COM_newTemplate($_CONF['path_layout'] . 'admin/story'); if ($_CONF['advanced_editor'] && $_USER['advanced_editor']) { $story_templates->set_file(array('editor' => 'storyeditor_advanced.thtml')); $advanced_editormode = true; $story_templates->set_var('change_editormode', 'onchange="change_editmode(this);"'); require_once $_CONF['path_system'] . 'classes/navbar.class.php'; $story_templates->set_var('show_preview', 'none'); $story_templates->set_var('lang_expandhelp', $LANG24[67]); $story_templates->set_var('lang_reducehelp', $LANG24[68]); $story_templates->set_var('lang_publishdate', $LANG24[69]); $story_templates->set_var('lang_toolbar', $LANG24[70]); $story_templates->set_var('toolbar1', $LANG24[71]); $story_templates->set_var('toolbar2', $LANG24[72]); $story_templates->set_var('toolbar3', $LANG24[73]); $story_templates->set_var('toolbar4', $LANG24[74]); $story_templates->set_var('toolbar5', $LANG24[75]); if ($story->EditElements('advanced_editor_mode') == 1 or $story->EditElements('postmode') == 'adveditor') { $story_templates->set_var('show_texteditor', 'none'); $story_templates->set_var('show_htmleditor', ''); } else { $story_templates->set_var('show_texteditor', ''); $story_templates->set_var('show_htmleditor', 'none'); } } else { $story_templates->set_file(array('editor' => 'storyeditor.thtml')); $advanced_editormode = false; } $story_templates->set_var('hour_mode', $_CONF['hour_mode']); if ($story->hasContent()) { $previewContent = STORY_renderArticle($story, 'p'); if ($advanced_editormode and $previewContent != '') { $story_templates->set_var('preview_content', $previewContent); } elseif ($previewContent != '') { $display .= COM_startBlock($LANG24[26], '', COM_getBlockTemplate('_admin_block', 'header')); $display .= $previewContent; $display .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer')); } } if ($advanced_editormode) { $navbar = new navbar(); if (!empty($previewContent)) { $navbar->add_menuitem($LANG24[79], 'showhideEditorDiv("preview",0);return false;', true); $navbar->add_menuitem($LANG24[80], 'showhideEditorDiv("editor",1);return false;', true); $navbar->add_menuitem($LANG24[81], 'showhideEditorDiv("publish",2);return false;', true); $navbar->add_menuitem($LANG24[82], 'showhideEditorDiv("images",3);return false;', true); $navbar->add_menuitem($LANG24[83], 'showhideEditorDiv("archive",4);return false;', true); $navbar->add_menuitem($LANG24[84], 'showhideEditorDiv("perms",5);return false;', true); $navbar->add_menuitem($LANG24[85], 'showhideEditorDiv("all",6);return false;', true); } else { $navbar->add_menuitem($LANG24[80], 'showhideEditorDiv("editor",0);return false;', true); $navbar->add_menuitem($LANG24[81], 'showhideEditorDiv("publish",1);return false;', true); $navbar->add_menuitem($LANG24[82], 'showhideEditorDiv("images",2);return false;', true); $navbar->add_menuitem($LANG24[83], 'showhideEditorDiv("archive",3);return false;', true); $navbar->add_menuitem($LANG24[84], 'showhideEditorDiv("perms",4);return false;', true); $navbar->add_menuitem($LANG24[85], 'showhideEditorDiv("all",5);return false;', true); } if ($mode == 'preview') { $story_templates->set_var('show_preview', ''); $story_templates->set_var('show_htmleditor', 'none'); $story_templates->set_var('show_texteditor', 'none'); $story_templates->set_var('show_submitoptions', 'none'); $navbar->set_selected($LANG24[79]); } else { $navbar->set_selected($LANG24[80]); } $story_templates->set_var('navbar', $navbar->generate()); } $oldsid = $story->EditElements('originalSid'); if (!empty($oldsid) && $mode != 'clone') { $delbutton = '<input type="submit" value="' . $LANG_ADMIN['delete'] . '" name="mode"%s' . XHTML . '>'; $jsconfirm = ' onclick="return confirm(\'' . $MESSAGE[76] . '\');"'; $story_templates->set_var('delete_option', sprintf($delbutton, $jsconfirm)); $story_templates->set_var('delete_option_no_confirmation', sprintf($delbutton, '')); } if ($mode == 'editsubmission' || $story->type == 'submission') { $story_templates->set_var('submission_option', '<input type="hidden" name="type" value="submission"' . XHTML . '>'); } $story_templates->set_var('lang_author', $LANG24[7]); $storyauthor = COM_getDisplayName($story->EditElements('uid')); $story_templates->set_var('story_author', $storyauthor); $story_templates->set_var('author', $storyauthor); $story_templates->set_var('story_uid', $story->EditElements('uid')); // user access info $story_templates->set_var('lang_accessrights', $LANG_ACCESS['accessrights']); $story_templates->set_var('lang_owner', $LANG_ACCESS['owner']); $ownername = COM_getDisplayName($story->EditElements('owner_id')); $story_templates->set_var('owner_username', DB_getItem($_TABLES['users'], 'username', 'uid = ' . $story->EditElements('owner_id'))); $story_templates->set_var('owner_name', $ownername); $story_templates->set_var('owner', $ownername); $story_templates->set_var('owner_id', $story->EditElements('owner_id')); $story_templates->set_var('lang_group', $LANG_ACCESS['group']); $story_templates->set_var('group_dropdown', SEC_getGroupDropdown($story->EditElements('group_id'), 3)); $story_templates->set_var('lang_permissions', $LANG_ACCESS['permissions']); $story_templates->set_var('lang_perm_key', $LANG_ACCESS['permissionskey']); $story_templates->set_var('permissions_editor', SEC_getPermissionsHTML($story->EditElements('perm_owner'), $story->EditElements('perm_group'), $story->EditElements('perm_members'), $story->EditElements('perm_anon'))); $story_templates->set_var('permissions_msg', $LANG_ACCESS['permmsg']); $story_templates->set_var('lang_permissions_msg', $LANG_ACCESS['permmsg']); $curtime = COM_getUserDateTimeFormat($story->EditElements('date')); $story_templates->set_var('lang_date', $LANG24[15]); $story_templates->set_var('publish_second', $story->EditElements('publish_second')); $publish_ampm = ''; $publish_hour = $story->EditElements('publish_hour'); if ($publish_hour >= 12) { if ($publish_hour > 12) { $publish_hour = $publish_hour - 12; } $ampm = 'pm'; } else { $ampm = 'am'; } $ampm_select = COM_getAmPmFormSelection('publish_ampm', $ampm); $story_templates->set_var('publishampm_selection', $ampm_select); $month_options = COM_getMonthFormOptions($story->EditElements('publish_month')); $story_templates->set_var('publish_month_options', $month_options); $day_options = COM_getDayFormOptions($story->EditElements('publish_day')); $story_templates->set_var('publish_day_options', $day_options); $year_options = COM_getYearFormOptions($story->EditElements('publish_year')); $story_templates->set_var('publish_year_options', $year_options); if ($_CONF['hour_mode'] == 24) { $hour_options = COM_getHourFormOptions($story->EditElements('publish_hour'), 24); } else { $hour_options = COM_getHourFormOptions($publish_hour); } $story_templates->set_var('publish_hour_options', $hour_options); $minute_options = COM_getMinuteFormOptions($story->EditElements('publish_minute')); $story_templates->set_var('publish_minute_options', $minute_options); $story_templates->set_var('publish_date_explanation', $LANG24[46]); $story_templates->set_var('story_unixstamp', $story->EditElements('unixdate')); $story_templates->set_var('expire_second', $story->EditElements('expire_second')); $expire_ampm = ''; $expire_hour = $story->EditElements('expire_hour'); if ($expire_hour >= 12) { if ($expire_hour > 12) { $expire_hour = $expire_hour - 12; } $ampm = 'pm'; } else { $ampm = 'am'; } $ampm_select = COM_getAmPmFormSelection('expire_ampm', $ampm); if (empty($ampm_select)) { // have a hidden field to 24 hour mode to prevent JavaScript errors $ampm_select = '<input type="hidden" name="expire_ampm" value=""' . XHTML . '>'; } $story_templates->set_var('expireampm_selection', $ampm_select); $month_options = COM_getMonthFormOptions($story->EditElements('expire_month')); $story_templates->set_var('expire_month_options', $month_options); $day_options = COM_getDayFormOptions($story->EditElements('expire_day')); $story_templates->set_var('expire_day_options', $day_options); $year_options = COM_getYearFormOptions($story->EditElements('expire_year')); $story_templates->set_var('expire_year_options', $year_options); if ($_CONF['hour_mode'] == 24) { $hour_options = COM_getHourFormOptions($story->EditElements('expire_hour'), 24); } else { $hour_options = COM_getHourFormOptions($expire_hour); } $story_templates->set_var('expire_hour_options', $hour_options); $minute_options = COM_getMinuteFormOptions($story->EditElements('expire_minute')); $story_templates->set_var('expire_minute_options', $minute_options); $story_templates->set_var('expire_date_explanation', $LANG24[46]); $story_templates->set_var('story_unixstamp', $story->EditElements('expirestamp')); $atopic = DB_getItem($_TABLES['topics'], 'tid', "archive_flag = 1"); $have_archive_topic = empty($atopic) ? false : true; if ($story->EditElements('statuscode') == STORY_ARCHIVE_ON_EXPIRE) { $story_templates->set_var('is_checked2', 'checked="checked"'); $story_templates->set_var('is_checked3', 'checked="checked"'); $js_showarchivedisabled = 'false'; $have_archive_topic = true; // force display of auto archive option } elseif ($story->EditElements('statuscode') == STORY_DELETE_ON_EXPIRE) { $story_templates->set_var('is_checked2', 'checked="checked"'); $story_templates->set_var('is_checked4', 'checked="checked"'); if (!$have_archive_topic) { $story_templates->set_var('is_checked3', 'style="display:none;"'); } $js_showarchivedisabled = 'false'; } else { if (!$have_archive_topic) { $story_templates->set_var('is_checked3', 'style="display:none;"'); } $js_showarchivedisabled = 'true'; } $story_templates->set_var('lang_archivetitle', $LANG24[58]); $story_templates->set_var('lang_option', $LANG24[59]); $story_templates->set_var('lang_enabled', $LANG_ADMIN['enabled']); $story_templates->set_var('lang_story_stats', $LANG24[87]); if ($have_archive_topic) { $story_templates->set_var('lang_optionarchive', $LANG24[61]); } else { $story_templates->set_var('lang_optionarchive', ''); } $story_templates->set_var('lang_optiondelete', $LANG24[62]); $story_templates->set_var('lang_title', $LANG_ADMIN['title']); $story_templates->set_var('story_title', $story->EditElements('title')); $story_templates->set_var('lang_page_title', $LANG_ADMIN['page_title']); $story_templates->set_var('page_title', $story->EditElements('page_title')); $story_templates->set_var('lang_metadescription', $LANG_ADMIN['meta_description']); $story_templates->set_var('meta_description', $story->EditElements('meta_description')); $story_templates->set_var('lang_metakeywords', $LANG_ADMIN['meta_keywords']); $story_templates->set_var('meta_keywords', $story->EditElements('meta_keywords')); if ($_CONF['meta_tags'] > 0) { $story_templates->set_var('hide_meta', ''); } else { $story_templates->set_var('hide_meta', ' style="display:none;"'); } $story_templates->set_var('lang_topic', $LANG_ADMIN['topic']); if ($mode == 'preview') { $tlist = TOPIC_getTopicSelectionControl('article', '', false, true, true); } else { $tlist = TOPIC_getTopicSelectionControl('article', $oldsid, false, true, true); } if (empty($tlist)) { $display .= COM_showMessage(101); return $display; } $story_templates->set_var('topic_selection', $tlist); $story_templates->set_var('lang_show_topic_icon', $LANG24[56]); if ($story->EditElements('show_topic_icon') == 1) { $story_templates->set_var('show_topic_icon_checked', 'checked="checked"'); } else { $story_templates->set_var('show_topic_icon_checked', ''); } $story_templates->set_var('lang_cachetime', $LANG24['cache_time']); $story_templates->set_var('lang_cachetime_desc', $LANG24['cache_time_desc']); $story_templates->set_var('cache_time', $story->EditElements('cache_time')); $story_templates->set_var('lang_draft', $LANG24[34]); if ($story->EditElements('draft_flag')) { $story_templates->set_var('is_checked', 'checked="checked"'); } $story_templates->set_var('lang_mode', $LANG24[3]); $story_templates->set_var('status_options', COM_optionList($_TABLES['statuscodes'], 'code,name', $story->EditElements('statuscode'))); $story_templates->set_var('comment_options', COM_optionList($_TABLES['commentcodes'], 'code,name', $story->EditElements('commentcode'))); $story_templates->set_var('trackback_options', COM_optionList($_TABLES['trackbackcodes'], 'code,name', $story->EditElements('trackbackcode'))); // comment expire $story_templates->set_var('lang_cmt_disable', $LANG24[63]); if ($story->EditElements('cmt_close')) { $story_templates->set_var('is_checked5', 'checked="checked"'); $js_showcmtclosedisabled = 'false'; } else { $js_showcmtclosedisabled = 'true'; } $month_options = COM_getMonthFormOptions($story->EditElements('cmt_close_month')); $story_templates->set_var('cmt_close_month_options', $month_options); $day_options = COM_getDayFormOptions($story->EditElements('cmt_close_day')); $story_templates->set_var('cmt_close_day_options', $day_options); // ensure that the year dropdown includes the close year $endtm = mktime(0, 0, 0, date('m'), date('d') + $_CONF['article_comment_close_days'], date('Y')); $yoffset = date('Y', $endtm) - date('Y'); $close_year = $story->EditElements('cmt_close_year'); if ($yoffset < -1) { $year_options = COM_getYearFormOptions($close_year, $yoffset); } elseif ($yoffset > 5) { $year_options = COM_getYearFormOptions($close_year, -1, $yoffset); } else { $year_options = COM_getYearFormOptions($close_year); } $story_templates->set_var('cmt_close_year_options', $year_options); $cmt_close_ampm = ''; $cmt_close_hour = $story->EditElements('cmt_close_hour'); //correct hour if ($cmt_close_hour >= 12) { if ($cmt_close_hour > 12) { $cmt_close_hour = $cmt_close_hour - 12; } $ampm = 'pm'; } else { $ampm = 'am'; } $ampm_select = COM_getAmPmFormSelection('cmt_close_ampm', $ampm); if (empty($ampm_select)) { // have a hidden field to 24 hour mode to prevent JavaScript errors $ampm_select = '<input type="hidden" name="cmt_close_ampm" value=""' . XHTML . '>'; } $story_templates->set_var('cmt_close_ampm_selection', $ampm_select); if ($_CONF['hour_mode'] == 24) { $hour_options = COM_getHourFormOptions($story->EditElements('cmt_close_hour'), 24); } else { $hour_options = COM_getHourFormOptions($cmt_close_hour); } $story_templates->set_var('cmt_close_hour_options', $hour_options); $minute_options = COM_getMinuteFormOptions($story->EditElements('cmt_close_minute')); $story_templates->set_var('cmt_close_minute_options', $minute_options); $story_templates->set_var('cmt_close_second', $story->EditElements('cmt_close_second')); if ($_CONF['onlyrootfeatures'] == 1 && SEC_inGroup('Root') or $_CONF['onlyrootfeatures'] !== 1) { $featured_options = "<select name=\"featured\">" . LB . COM_optionList($_TABLES['featurecodes'], 'code,name', $story->EditElements('featured')) . "</select>" . LB; } else { $featured_options = "<input type=\"hidden\" name=\"featured\" value=\"0\"" . XHTML . ">"; } $story_templates->set_var('featured_options', $featured_options); $story_templates->set_var('frontpage_options', COM_optionList($_TABLES['frontpagecodes'], 'code,name', $story->EditElements('frontpage'))); $story_templates->set_var('story_introtext', $story->EditElements('introtext')); $story_templates->set_var('story_bodytext', $story->EditElements('bodytext')); $story_templates->set_var('lang_introtext', $LANG24[16]); $story_templates->set_var('lang_bodytext', $LANG24[17]); $story_templates->set_var('lang_postmode', $LANG24[4]); $story_templates->set_var('lang_publishoptions', $LANG24[76]); $story_templates->set_var('noscript', COM_getNoScript(false, $LANG24[77], sprintf($LANG24[78], $_CONF['site_admin_url'], $sid))); $postmode = $story->EditElements('postmode'); if ($_CONF['advanced_editor'] && $_USER['advanced_editor']) { if ($story->EditElements('advanced_editor_mode') == 1 or $story->EditElements('postmode') == 'adveditor') { $postmode = ''; } } $post_options = COM_optionList($_TABLES['postmodes'], 'code,name', $postmode); $postmode_list = 'plaintext,html'; // If Advanced Mode - add post option and set default if editing story created with Advanced Editor if ($_CONF['advanced_editor'] && $_USER['advanced_editor']) { $postmode_list .= ',adveditor'; if ($story->EditElements('advanced_editor_mode') == 1 or $story->EditElements('postmode') == 'adveditor') { $post_options .= '<option value="adveditor" selected="selected">' . $LANG24[86] . '</option>'; } else { $post_options .= '<option value="adveditor">' . $LANG24[86] . '</option>'; } } if ($_CONF['wikitext_editor']) { $postmode_list .= ',wikitext'; if ($story->EditElements('postmode') == 'wikitext') { $post_options .= '<option value="wikitext" selected="selected">' . $LANG24[88] . '</option>'; } else { $post_options .= '<option value="wikitext">' . $LANG24[88] . '</option>'; } } $story_templates->set_var('post_options', $post_options); $postmode_array = explode(',', $postmode_list); $allowed_html = ''; foreach ($postmode_array as $pm) { $allowed_html .= COM_allowedHTML('story.edit', false, 1, $pm); } $allowed_tags = array('code', 'raw'); if ($_CONF['allow_page_breaks'] == 1) { $allowed_tags = array_merge($allowed_tags, array('page_break')); } $allowed_html .= COM_allowedAutotags(false, $allowed_tags); $story_templates->set_var('lang_allowed_html', $allowed_html); $fileinputs = ''; $saved_images = ''; if ($_CONF['maximagesperarticle'] > 0) { $story_templates->set_var('lang_images', $LANG24[47]); $icount = DB_count($_TABLES['article_images'], 'ai_sid', $story->getSid()); if ($icount > 0) { $result_articles = DB_query("SELECT * FROM {$_TABLES['article_images']} WHERE ai_sid = '" . $story->getSid() . "'"); for ($z = 1; $z <= $icount; $z++) { $I = DB_fetchArray($result_articles); $saved_images .= $z . ') ' . COM_createLink($I['ai_filename'], $_CONF['site_url'] . '/images/articles/' . $I['ai_filename']) . ' ' . $LANG_ADMIN['delete'] . ': <input type="checkbox" name="delete[' . $I['ai_img_num'] . ']"' . XHTML . '><br' . XHTML . '>'; } } $newallowed = $_CONF['maximagesperarticle'] - $icount; for ($z = $icount + 1; $z <= $_CONF['maximagesperarticle']; $z++) { $fileinputs .= $z . ') <input type="file" dir="ltr" name="file' . $z . '"' . XHTML . '>'; if ($z < $_CONF['maximagesperarticle']) { $fileinputs .= '<br' . XHTML . '>'; } } $fileinputs .= '<br' . XHTML . '>' . $LANG24[51]; if ($_CONF['allow_user_scaling'] == 1) { $fileinputs .= $LANG24[27]; } $fileinputs .= $LANG24[28] . '<br' . XHTML . '>'; } // Add JavaScript $_SCRIPTS->setJavaScriptFile('story_editor', '/javascript/story_editor.js'); if ($_CONF['titletoid']) { $_SCRIPTS->setJavaScriptFile('title_2_id', '/javascript/title_2_id.js'); $story_templates->set_var('titletoid', true); } $_SCRIPTS->setJavaScriptFile('postmode_control', '/javascript/postmode_control.js'); // Loads jQuery UI datepicker and timepicker-addon $_SCRIPTS->setJavaScriptLibrary('jquery.ui.slider'); // $_SCRIPTS->setJavaScriptLibrary('jquery.ui.button'); $_SCRIPTS->setJavaScriptLibrary('jquery.ui.datepicker'); $_SCRIPTS->setJavaScriptLibrary('jquery-ui-i18n'); $_SCRIPTS->setJavaScriptLibrary('jquery-ui-timepicker-addon'); $_SCRIPTS->setJavaScriptLibrary('jquery-ui-timepicker-addon-i18n'); // $_SCRIPTS->setJavaScriptLibrary('jquery-ui-slideraccess'); $_SCRIPTS->setJavaScriptFile('datetimepicker', '/javascript/datetimepicker.js'); $langCode = COM_getLangIso639Code(); $toolTip = $MESSAGE[118]; $imgUrl = $_CONF['site_url'] . '/images/calendar.png'; $_SCRIPTS->setJavaScript("jQuery(function () {" . " geeklog.hour_mode = {$_CONF['hour_mode']};" . " geeklog.datetimepicker.set('publish', '{$langCode}', '{$toolTip}', '{$imgUrl}');" . " geeklog.datetimepicker.set('expire', '{$langCode}', '{$toolTip}', '{$imgUrl}');" . " geeklog.datetimepicker.set('cmt_close', '{$langCode}', '{$toolTip}', '{$imgUrl}');" . "});", TRUE, TRUE); // Setup Advanced Editor COM_setupAdvancedEditor('/javascript/storyeditor_adveditor.js'); $story_templates->set_var('saved_images', $saved_images); $story_templates->set_var('image_form_elements', $fileinputs); $story_templates->set_var('lang_hits', $LANG24[18]); $story_templates->set_var('story_hits', $story->EditElements('hits')); $story_templates->set_var('lang_comments', $LANG24[19]); $story_templates->set_var('story_comments', $story->EditElements('comments')); $story_templates->set_var('lang_trackbacks', $LANG24[29]); $story_templates->set_var('story_trackbacks', $story->EditElements('trackbacks')); $story_templates->set_var('lang_emails', $LANG24[39]); $story_templates->set_var('story_emails', $story->EditElements('numemails')); if ($mode == 'clone') { $story_templates->set_var('story_id', COM_makesid()); } else { $story_templates->set_var('story_id', $story->getSid()); $story_templates->set_var('old_story_id', $story->EditElements('originalSid')); } $story_templates->set_var('lang_sid', $LANG24[12]); $story_templates->set_var('lang_save', $LANG_ADMIN['save']); $story_templates->set_var('lang_preview', $LANG_ADMIN['preview']); $story_templates->set_var('lang_cancel', $LANG_ADMIN['cancel']); $story_templates->set_var('lang_delete', $LANG_ADMIN['delete']); $story_templates->set_var('gltoken_name', CSRF_TOKEN); $token = SEC_createToken(); $story_templates->set_var('gltoken', $token); $story_templates->parse('output', 'editor'); $display .= COM_startBlock($LANG24[5], '', COM_getBlockTemplate('_admin_block', 'header')); $display .= SEC_getTokenExpiryNotice($token, $LANG24[91]); $display .= $story_templates->finish($story_templates->get_var('output')); $display .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer')); return $display; }
/** * Shows the user's current settings * */ function edituser() { global $_CONF, $_TABLES, $_USER, $LANG_MYACCOUNT, $LANG04, $LANG_ADMIN, $_SCRIPTS; $result = DB_query("SELECT fullname,cookietimeout,email,homepage,sig,emailstories,about,location,pgpkey,photo,remoteservice FROM {$_TABLES['users']},{$_TABLES['userprefs']},{$_TABLES['userinfo']} WHERE {$_TABLES['users']}.uid = {$_USER['uid']} AND {$_TABLES['userprefs']}.uid = {$_USER['uid']} AND {$_TABLES['userinfo']}.uid = {$_USER['uid']}"); $A = DB_fetchArray($result); $preferences = COM_newTemplate($_CONF['path_layout'] . 'preferences'); $preferences->set_file(array('profile' => 'profile.thtml', 'photo' => 'userphoto.thtml', 'username' => 'username.thtml', 'password' => 'password.thtml', 'current_password' => 'current_password.thtml', 'resynch' => 'resynch.thtml', 'deleteaccount' => 'deleteaccount.thtml')); include $_CONF['path_system'] . 'classes/navbar.class.php'; $navbar = new navbar(); $cnt = 0; foreach ($LANG_MYACCOUNT as $id => $label) { $navbar->add_menuitem($label, 'showhideProfileEditorDiv("' . $id . '",' . $cnt . ');return false;', true); $cnt++; } $navbar->set_selected($LANG_MYACCOUNT['pe_namepass']); $preferences->set_var('navbar', $navbar->generate()); //$preferences->set_var ('no_javascript_warning', $LANG04[150]); $preferences->set_var('noscript', COM_getNoScript()); $preferences->set_var('cssid1', 1); $preferences->set_var('cssid2', 2); $preferences->set_var('preview', USER_showProfile($_USER['uid'], true)); $preferences->set_var('prefs', editpreferences()); // Add JavaScript $_SCRIPTS->setJavaScriptFile('profile_editor', '/javascript/profile_editor.js'); $js = '<!-- JS Functions which will execute only if JS enabled will un-hide the special features that enhance the profile editor --> <script type="text/JavaScript"> //<![CDATA[ /* Initially the navbar is hidden - in case JS is disabled. Enable it now */ document.getElementById("pe_navbar").style.display=""; /* Now cycle through the profile tabs as the number in the template could have been modified (personalized) If you add custom panels, just ensure you use the class jsenabled_hide or jsenabled_show Build an object that can then be referenced in the functon showhideProfileEditorDiv */ var profilepanels = new Object; var el; el=document.getElementsByTagName("div"); for(i=0;i<el.length;i++) { var divname = el[i].id if(el[i].className == "jsenabled_show"){ el[i].style.display = ""; profilepanels[divname] = "show"; } else if(el[i].className == "jsenabled_hide"){ el[i].style.display = "none"; profilepanels[divname] = "hidden"; } } //]]> </script>'; $_SCRIPTS->setJavaScript($js); // some trickery to ensure alternating colors with the available options ... if ($_CONF['allow_username_change'] == 1) { $first = 1; $second = 2; } else { $first = 2; $second = 1; } $preferences->set_var('cssid1u', $first); $preferences->set_var('cssid2u', $second); if ($_CONF['allow_user_photo'] == 1) { $tmp = $first; $first = $second; $second = $tmp; } $preferences->set_var('cssid1p', $first); $preferences->set_var('cssid2p', $second); $preferences->set_var('lang_fullname', $LANG04[3]); $preferences->set_var('lang_fullname_text', $LANG04[34]); $preferences->set_var('lang_username', $LANG04[2]); $preferences->set_var('lang_username_text', $LANG04[87]); $preferences->set_var('lang_password_help_title', $LANG04[146]); $preferences->set_var('lang_password_help', $LANG04[147]); $preferences->set_var('lang_password', $LANG04[4]); $preferences->set_var('lang_password_text', $LANG04[35]); $preferences->set_var('lang_password_conf', $LANG04[108]); $preferences->set_var('lang_password_text_conf', $LANG04[109]); $preferences->set_var('lang_old_password', $LANG04[110]); $preferences->set_var('lang_old_password_text', $LANG04[111]); $preferences->set_var('lang_cooktime', $LANG04[68]); $preferences->set_var('lang_cooktime_text', $LANG04[69]); $preferences->set_var('lang_email', $LANG04[5]); $preferences->set_var('lang_email_text', $LANG04[33]); $preferences->set_var('lang_email_conf', $LANG04[124]); $preferences->set_var('lang_email_conf_text', $LANG04[126]); $preferences->set_var('lang_userinfo_help_title', $LANG04[148]); $preferences->set_var('lang_userinfo_help', $LANG04[149]); $preferences->set_var('lang_homepage', $LANG04[6]); $preferences->set_var('lang_homepage_text', $LANG04[36]); $preferences->set_var('lang_location', $LANG04[106]); $preferences->set_var('lang_location_text', $LANG04[107]); $preferences->set_var('lang_signature', $LANG04[32]); $preferences->set_var('lang_signature_text', $LANG04[37]); $preferences->set_var('lang_userphoto', $LANG04[77]); $preferences->set_var('lang_userphoto_text', $LANG04[78]); $preferences->set_var('lang_about', $LANG04[7]); $preferences->set_var('lang_about_text', $LANG04[38]); $preferences->set_var('lang_pgpkey', $LANG04[8]); $preferences->set_var('lang_pgpkey_text', $LANG04[39]); $preferences->set_var('lang_submit', $LANG04[9]); $preferences->set_var('lang_cancel', $LANG_ADMIN['cancel']); $preferences->set_var('lang_preview_title', $LANG04[145]); $preferences->set_var('lang_enter_current_password', $LANG04[127]); $preferences->set_var('lang_name_legend', $LANG04[128]); $preferences->set_var('lang_password_email_legend', $LANG04[129]); $preferences->set_var('lang_personal_info_legend', $LANG04[130]); $preferences->set_var('lang_resynch', $LANG04[166]); $display_name = COM_getDisplayName($_USER['uid']); //$preferences->set_var ('start_block_profile', // COM_startBlock ($LANG04[1] . ' ' . $display_name)); //$preferences->set_var ('end_block', COM_endBlock ()); $preferences->set_var('profile_headline', $LANG04[1] . ' ' . $display_name); if ($_CONF['allow_user_photo'] == 1) { $preferences->set_var('enctype', 'enctype="multipart/form-data"'); } else { $preferences->set_var('enctype', ''); } $preferences->set_var('fullname_value', htmlspecialchars($A['fullname'])); $preferences->set_var('new_username_value', htmlspecialchars($_USER['username'])); if ($A['remoteservice'] == '') { $preferences->set_var('password_value', ''); $preferences->parse('password_option', 'password', true); $preferences->parse('current_password_option', 'current_password', true); $preferences->set_var('resynch_option', ''); } else { $preferences->set_var('password_option', ''); $preferences->set_var('current_password_option', ''); if ($_CONF['user_login_method']['oauth'] && strpos($_USER['remoteservice'], 'oauth.') === 0) { // OAuth only supports re-synch at the moment $preferences->set_var('resynch_checked', ''); $preferences->parse('resynch_option', 'resynch', true); } else { $preferences->set_var('resynch_option', ''); } } if ($_CONF['allow_username_change'] == 1) { $preferences->parse('username_option', 'username', true); } else { $preferences->set_var('username_option', ''); } $selection = '<select id="cooktime" name="cooktime">' . LB; $selection .= COM_optionList($_TABLES['cookiecodes'], 'cc_value,cc_descr', $A['cookietimeout'], 0); $selection .= '</select>'; $preferences->set_var('cooktime_selector', $selection); $preferences->set_var('email_value', htmlspecialchars($A['email'])); $preferences->set_var('homepage_value', htmlspecialchars(COM_killJS($A['homepage']))); $preferences->set_var('location_value', htmlspecialchars(strip_tags($A['location']))); $preferences->set_var('signature_value', htmlspecialchars($A['sig'])); if ($_CONF['allow_user_photo'] == 1) { $photo = USER_getPhoto($_USER['uid'], $A['photo'], $A['email'], -1); if (empty($photo)) { $preferences->set_var('display_photo', ''); } else { if (empty($A['photo'])) { // external avatar $photo = '<br' . XHTML . '>' . $photo; } else { // uploaded photo - add delete option $photo = '<br' . XHTML . '>' . $photo . '<br' . XHTML . '>' . $LANG04[79] . ' <input type="checkbox" name="delete_photo"' . XHTML . '>' . LB; } $preferences->set_var('display_photo', $photo); } if (empty($_CONF['image_lib'])) { $scaling = $LANG04[162]; } else { $scaling = $LANG04[161]; } $preferences->set_var('photo_max_dimensions', sprintf($LANG04[160], $_CONF['max_photo_width'], $_CONF['max_photo_height'], $_CONF['max_photo_size'], $scaling)); $preferences->parse('userphoto_option', 'photo', true); } else { $preferences->set_var('userphoto_option', ''); } $result = DB_query("SELECT about,pgpkey FROM {$_TABLES['userinfo']} WHERE uid = {$_USER['uid']}"); $A = DB_fetchArray($result); $reqid = substr(md5(uniqid(rand(), 1)), 1, 16); DB_change($_TABLES['users'], 'pwrequestid', $reqid, 'uid', $_USER['uid']); $preferences->set_var('about_value', htmlspecialchars($A['about'])); $preferences->set_var('pgpkey_value', htmlspecialchars($A['pgpkey'])); $preferences->set_var('uid_value', $reqid); $preferences->set_var('username_value', htmlspecialchars($_USER['username'])); if ($_CONF['allow_account_delete'] == 1) { $preferences->set_var('lang_deleteaccount', $LANG04[156]); $preferences->set_var('delete_text', $LANG04[95]); $preferences->set_var('lang_button_delete', $LANG04[96]); $preferences->set_var('delete_mode', 'confirmdelete'); $preferences->set_var('account_id', $reqid); if (isset($LANG04[157])) { $preferences->set_var('lang_deleteoption', $LANG04[157]); } else { $preferences->set_var('lang_deleteoption', $LANG04[156]); } $preferences->parse('delete_account_option', 'deleteaccount', false); } else { $preferences->set_var('delete_account_option', ''); } // Call custom account form and edit function if enabled and exists if ($_CONF['custom_registration'] and function_exists('CUSTOM_userEdit')) { $preferences->set_var('customfields', CUSTOM_userEdit($_USER['uid'])); } PLG_profileVariablesEdit($_USER['uid'], $preferences); $retval = $preferences->finish($preferences->parse('output', 'profile')); $retval .= PLG_profileBlocksEdit($_USER['uid']); return $retval; }
$stepID = COM_applyFilter($_POST['idstepType'], true); //$taskName = ppPrepareForDB($_POST['taskName'],true); if (!get_magic_quotes_gpc()) { $taskName = addslashes($_POST['taskName']); } else { $taskName = $_POST['taskName']; } $taskName = COM_killJS($taskName); $op = COM_applyFilter($_POST['operation'], false); $moveop = COM_applyFilter($_POST['moveoperation'], false); $regen = COM_applyFilter($_POST['regenerate'], true); $regenAllTasks = COM_applyFilter($_POST['regenerateAllLive'], true); $taskassigntype = COM_applyFilter($_POST['taskassigntype']); $retval = ''; echo COM_siteHeader('menu'); $navbar = new navbar(); $navbar->add_menuitem('My Tasks', $CONF_NF['TaskConsole_URL']); if ($templateID > 0) { $navbar->add_menuitem('Edit Template', $_CONF['site_admin_url'] . '/plugins/nexflow/index.php?templateID=' . $templateID); $navbar->set_selected('Edit Template'); } $navbar->add_menuitem('View Templates', $_CONF['site_admin_url'] . '/plugins/nexflow/templates.php'); $navbar->add_menuitem('Edit Handlers', $_CONF['site_admin_url'] . '/plugins/nexflow/handlers.php'); echo $navbar->generate(); if ($taskID == 0) { $taskID = null; } // lets check the incoming operation.. if its save, then save either the existing data // or create a new entry. if ($moveop != '' || $moveop != null) { // if there is a move operation, this takes precedence over any other click/variable feed.
<meta name="viewport" content="width=device-width"> <?php include "php/php.php"; include "../../php/nav_bar.php"; include "../../dependencias.php"; $navbar = new navbar(); $navbar->navbar_modulo('contribuicoes'); ?> <script src="js/script.js"></script>