function WoWMacroexport($raid_id, $raid_groups = 0) { $attendees = registry::register('plus_datahandler')->get('calendar_raids_attendees', 'attendees', array($raid_id)); $guests = registry::register('plus_datahandler')->get('calendar_raids_guests', 'members', array($raid_id)); $a_json = array(); foreach ($attendees as $id_attendees => $d_attendees) { $char_server = registry::register('plus_datahandler')->get('member', 'profile_field', array($id_attendees, 'servername')); $servername = $char_server != registry::register('config')->get('servername') ? $char_server : false; $a_json[] = array('name' => unsanitize(registry::register('plus_datahandler')->get('member', 'name', array($id_attendees))), 'status' => $d_attendees['signup_status'], 'guest' => false, 'group' => $d_attendees['raidgroup'], 'realm' => $servername); } foreach ($guests as $guestsdata) { $a_json[] = array('name' => unsanitize($guestsdata['name']), 'status' => false, 'guest' => true, 'group' => $guestsdata['raidgroup'], 'realm' => false); } $json = json_encode($a_json); unset($a_json); registry::register('template')->add_js(' genOutput() $("input[type=\'checkbox\'], #raidgroup").change(function (){ genOutput() }); ', "docready"); registry::register('template')->add_js(' function genOutput(){ var attendee_data = ' . $json . '; output = ""; cb_guests = ($("#cb_guests").attr("checked")) ? true : false; cb_confirmed = ($("#cb_confirmed").attr("checked")) ? true : false; cb_signedin = ($("#cb_signedin").attr("checked")) ? true : false; cb_backup = ($("#cb_backup").attr("checked")) ? true : false; $.each(attendee_data, function(i, item) { if((cb_guests && item.guest == true) || (cb_confirmed && !item.guest && item.status == 0) || (cb_signedin && item.status == 1) || (cb_backup && item.status == 3)){ if($("#raidgroup").length == 0 || $("#raidgroup").val() == "0" || (item.group > 0 && item.group == $("#raidgroup").val())){ realmdata = (item.realm) ? "-" + item.realm : ""; output += "/inv " + item.name + realmdata + "\\n"; } } }); $("#attendeeout").html(output); } '); if (is_array($raid_groups)) { $text = "<dt><label>" . registry::fetch('user')->lang('raidevent_export_raidgroup') . "</label></dt>\n\t\t\t\t\t\t\t<dd>\n\t\t\t\t\t\t\t\t" . new hdropdown('raidgroup', array('options' => $raid_groups, 'value' => 0, 'id' => 'raidgroup')) . "\n\t\t\t\t\t\t\t</dd>\n\t\t\t\t\t\t</dl><dl>"; } $text .= "<input type='checkbox' checked='checked' name='confirmed' id='cb_confirmed' value='true'> " . registry::fetch('user')->lang(array('raidevent_raid_status', 0)); $text .= "<input type='checkbox' checked='checked' name='guests' id='cb_guests' value='true'> " . registry::fetch('user')->lang('raidevent_raid_guests'); $text .= "<input type='checkbox' checked='checked' name='signedin' id='cb_signedin' value='true'> " . registry::fetch('user')->lang(array('raidevent_raid_status', 1)); $text .= "<input type='checkbox' name='backup' id='cb_backup' value='true'> " . registry::fetch('user')->lang(array('raidevent_raid_status', 3)); $text .= "<br/>"; $text .= "<textarea name='group" . rand() . "' id='attendeeout' cols='60' rows='10' onfocus='this.select()' readonly='readonly'>"; $text .= "</textarea>"; $text .= '<br/>' . registry::fetch('user')->lang('rp_copypaste_ig') . "</b>"; return $text; }
function CSVexport($raid_id, $raid_groups) { $attendees = registry::register('plus_datahandler')->get('calendar_raids_attendees', 'attendees', array($raid_id)); $guests = registry::register('plus_datahandler')->get('calendar_raids_guests', 'members', array($raid_id)); $a_json = array(); foreach ($attendees as $id_attendees => $d_attendees) { $a_json[] = array('name' => registry::register('plus_datahandler')->get('member', 'name', array($id_attendees)), 'status' => $d_attendees['signup_status'], 'guest' => false, 'group' => $d_attendees['raidgroup']); } foreach ($guests as $guestsdata) { $a_json[] = array('name' => $guestsdata['name'], 'status' => false, 'guest' => true, 'group' => $guestsdata['raidgroup']); } $json = json_encode($a_json); unset($a_json); registry::register('template')->add_js(' genOutput() $("input[type=\'checkbox\'], #ip_seperator, #raidgroup").change(function (){ genOutput() }); ', "docready"); registry::register('template')->add_js(' function genOutput(){ var attendee_data = ' . $json . '; var data = []; ip_seperator = ($("#ip_seperator").val() != "") ? $("#ip_seperator").val() : ","; cb_guests = ($("#cb_guests").attr("checked")) ? true : false; cb_confirmed = ($("#cb_confirmed").attr("checked")) ? true : false; cb_signedin = ($("#cb_signedin").attr("checked")) ? true : false; cb_backup = ($("#cb_backup").attr("checked")) ? true : false; $.each(attendee_data, function(i, item) { if((cb_guests && item.guest == true) || (cb_confirmed && !item.guest && item.status == 0) || (cb_signedin && item.status == 1) || (cb_backup && item.status == 3)){ if($("#raidgroup").val() == "0" || (item.group > 0 && item.group == $("#raidgroup").val())){ data.push(item.name); } } }); $("#attendeeout").html(data.join(ip_seperator)); } '); $text = "<dt><label>" . registry::fetch('user')->lang('raidevent_export_seperator') . "</label></dt>\n\t\t\t\t\t<dd>\n\t\t\t\t\t\t<input type='text' name='seperator' id='ip_seperator' value=',' size='4' />\n\t\t\t\t\t</dd>\n\t\t\t\t</dl><dl>"; $text .= "<dt><label>" . registry::fetch('user')->lang('raidevent_export_raidgroup') . "</label></dt>\n\t\t\t\t\t<dd>\n\t\t\t\t\t\t" . new hdropdown('raidgroup', array('options' => $raid_groups, 'value' => 0, 'id' => 'raidgroup')) . "\n\t\t\t\t\t</dd>\n\t\t\t\t</dl><dl>"; $text .= "<input type='checkbox' checked='checked' name='confirmed' id='cb_confirmed' value='true'> " . registry::fetch('user')->lang(array('raidevent_raid_status', 0)); $text .= "<input type='checkbox' checked='checked' name='guests' id='cb_guests' value='true'> " . registry::fetch('user')->lang('raidevent_raid_guests'); $text .= "<input type='checkbox' checked='checked' name='signedin' id='cb_signedin' value='true'> " . registry::fetch('user')->lang(array('raidevent_raid_status', 1)); $text .= "<input type='checkbox' name='backup' id='cb_backup' value='true'> " . registry::fetch('user')->lang(array('raidevent_raid_status', 3)); $text .= "<br/>"; $text .= "<textarea name='group" . rand() . "' id='attendeeout' cols='60' rows='10' onfocus='this.select()' readonly='readonly'>"; $text .= "</textarea>"; $text .= '<br/>' . registry::fetch('user')->lang('rp_copypaste_ig') . "</b>"; return $text; }
public function init_lang($module_path) { $lang_inc = $module_path . '/language/' . registry::fetch('user')->data['user_lang'] . '.php'; if (!is_file($lang_inc)) { $lang_inc = $module_path . '/language/' . $this->default_lang . '.php'; } if (is_file($lang_inc)) { include $lang_inc; $this->module_lang = isset($module_lang) ? $module_lang : array(); $this->preset_lang = isset($preset_lang) ? $preset_lang : array(); } }
function WildstarMacroexport($raid_id) { $attendees = registry::register('plus_datahandler')->get('calendar_raids_attendees', 'attendees', array($raid_id)); $guests = registry::register('plus_datahandler')->get('calendar_raids_guests', 'members', array($raid_id)); $a_json = array(); foreach ($attendees as $id_attendees => $d_attendees) { $a_json[] = array('name' => unsanitize(registry::register('plus_datahandler')->get('member', 'name', array($id_attendees))), 'status' => $d_attendees['signup_status'], 'guest' => false); } foreach ($guests as $guestsdata) { $a_json[] = array('name' => unsanitize($guestsdata['name']), 'status' => false, 'guest' => true); } $json = json_encode($a_json); unset($a_json); registry::register('template')->add_js(' $("#gamelanguage").change(function (){ genOutput() }).trigger("change"); $("input[type=\'checkbox\']").change(function (){ genOutput() }); ', "docready"); registry::register('template')->add_js(' function genOutput(){ var attendee_data = ' . $json . '; output = ""; cb_guests = ($("#cb_guests").attr("checked")) ? true : false; cb_confirmed = ($("#cb_confirmed").attr("checked")) ? true : false; cb_signedin = ($("#cb_signedin").attr("checked")) ? true : false; cb_backup = ($("#cb_backup").attr("checked")) ? true : false; chat_command = ($("#gamelanguage").val() == "german") ? "/einladen" : "/invite"; $.each(attendee_data, function(i, item) { if((cb_guests && item.guest == true) || (cb_confirmed && !item.guest && item.status == 0) || (cb_signedin && item.status == 1) || (cb_backup && item.status == 3)){ output += chat_command+" " + item.name + "\\n"; } }); $("#attendeeout").html(output); } '); $text = registry::fetch('game')->glang('game_language') . ': ' . new hdropdown('language', array('options' => array('german' => 'Deutsch', 'english' => 'English'), 'value' => registry::fetch('config')->get('game_language'), 'id' => 'gamelanguage')); $text .= "<input type='checkbox' checked='checked' name='confirmed' id='cb_confirmed' value='true'> " . registry::fetch('user')->lang(array('raidevent_raid_status', 0)); $text .= "<input type='checkbox' checked='checked' name='guests' id='cb_guests' value='true'> " . registry::fetch('user')->lang('raidevent_raid_guests'); $text .= "<input type='checkbox' checked='checked' name='signedin' id='cb_signedin' value='true'> " . registry::fetch('user')->lang(array('raidevent_raid_status', 1)); $text .= "<input type='checkbox' name='backup' id='cb_backup' value='true'> " . registry::fetch('user')->lang(array('raidevent_raid_status', 3)); $text .= "<br/>"; $text .= "<textarea name='group" . rand() . "' id='attendeeout' cols='60' rows='10' onfocus='this.select()' readonly='readonly'>"; $text .= "</textarea>"; $text .= '<br/>' . registry::fetch('user')->lang('rp_copypaste_ig') . "</b>"; return $text; }
function WoWMacroexport($raid_id) { $attendees = registry::register('plus_datahandler')->get('calendar_raids_attendees', 'attendees', array($raid_id)); $guests = registry::register('plus_datahandler')->get('calendar_raids_guests', 'members', array($raid_id)); $a_json = array(); foreach ($attendees as $id_attendees => $d_attendees) { $a_json[] = array('name' => registry::register('plus_datahandler')->get('member', 'name', array($id_attendees)), 'status' => $d_attendees['signup_status'], 'guest' => false); } foreach ($guests as $guestsdata) { $a_json[] = array('name' => $guestsdata['name'], 'status' => false, 'guest' => true); } $json = json_encode($a_json); unset($a_json); registry::register('template')->add_js(' genOutput() $("input[type=\'checkbox\']").change(function (){ if ($(this).is(":checked")){ genOutput() } }); ', "docready"); registry::register('template')->add_js(' function genOutput(){ var attendee_data = ' . $json . '; output = ""; cb_guests = ($("#cb_guests").attr("checked")) ? true : false; cb_confirmed = ($("#cb_confirmed").attr("checked")) ? true : false; cb_signedin = ($("#cb_signedin").attr("checked")) ? true : false; cb_backup = ($("#cb_backup").attr("checked")) ? true : false; $.each(attendee_data, function(i, item) { if((cb_guests && item.guest == true) || (cb_confirmed && !item.guest && item.status == 0) || (cb_signedin && item.status == 1) || (cb_backup && item.status == 3)){ output += "/inv " + item.name + "\\n"; } }); $("#attendeeout").html(output); } '); $text = "<input type='checkbox' checked='checked' name='confirmed' id='cb_confirmed' value='true'> " . registry::fetch('user')->lang(array('raidevent_raid_status', 0)); $text .= "<input type='checkbox' checked='checked' name='guests' id='cb_guests' value='true'> " . registry::fetch('user')->lang('raidevent_raid_guests'); $text .= "<input type='checkbox' checked='checked' name='signedin' id='cb_signedin' value='true'> " . registry::fetch('user')->lang(array('raidevent_raid_status', 1)); $text .= "<input type='checkbox' name='backup' id='cb_backup' value='true'> " . registry::fetch('user')->lang(array('raidevent_raid_status', 3)); $text .= "<br/>"; $text .= "<textarea name='group" . rand() . "' id='attendeeout' cols='60' rows='10' onfocus='this.select()' readonly='readonly'>"; $text .= "</textarea>"; $text .= '<br/>' . registry::fetch('user')->lang('rp_copypaste_ig') . "</b>"; return $text; }
public function _construct() { $out = '<input type="' . self::$type . '" name="' . $this->name . '" '; if (empty($this->id)) { $this->id = $this->cleanid($this->name); } $out .= 'id="' . $this->id . '" '; if (isset($this->value)) { $out .= 'value="' . $this->value . '" '; } if (!empty($this->class)) { $out .= 'class="' . $this->class . '" '; } if (!empty($this->size)) { $out .= 'size="' . $this->size . '" '; } if ($this->readonly) { $out .= 'readonly="readonly" '; } if (!empty($this->js)) { $out .= $this->js . ' '; } if ($this->preview) { $out .= 'onchange="previewImage_' . $this->name . '(this);"'; } $out .= ' />'; if ($this->required) { $out .= '<span class="fv_msg" data-errormessage="' . registry::fetch('user')->lang('fv_required') . '"></span>'; } if ($this->preview) { $out = '<img src="' . (isset($this->value) && $this->value ? $this->value : registry::get_const('server_path') . 'images/global/default-image.svg') . '" class="uploadPreview" style="max-height: 60px;"/>' . $out; register('tpl')->add_js(' function previewImage_' . $this->name . '(object) { if (object.files[0].type == "image/jpeg" || object.files[0].type == "image/png" || object.files[0].type == "image/gif"){ var oFReader = new FileReader(); oFReader.readAsDataURL(object.files[0]); oFReader.onload = function (oFREvent) { $(object).parent().find(\'.uploadPreview\').attr(\'src\', oFREvent.target.result); }; } };'); } $this->out = $out; }
public function _construct() { if (empty($this->id)) { $this->id = $this->cleanid($this->name); } $out = '<input type="text" name="' . $this->name . '" id="' . $this->id . '" value="' . $this->time->date("H:i", $this->value) . '"'; if (!empty($this->class)) { $out .= ' class="' . $this->class . '"'; } if ($this->required) { $out .= ' required="required"'; } $this->jquery->timePicker($this->id, $this->name, $this->value, $this->enablesecs, $this->hourf); $out .= ' />'; if ($this->required) { $out .= '<span class="fv_msg" data-errormessage="' . registry::fetch('user')->lang('fv_required') . '"></span>'; } $this->out = $out; }
public function _construct() { $out = '<textarea name="' . $this->name . '" rows="' . $this->rows . '" cols="' . $this->cols . '" '; if (empty($this->id)) { $this->id = $this->cleanid($this->name); } $out .= 'id="' . $this->id . '" '; if ($this->bbcodeeditor) { $this->class = empty($this->class) ? 'mceEditor_bbcode' : $this->class . ' mceEditor_bbcode'; $this->tinyMCE->editor_bbcode(); } if (!empty($this->class)) { $out .= 'class="' . $this->class . '" '; } if (!empty($this->style)) { $out .= 'style="' . $this->style . '" '; } if ($this->disabled) { $out .= 'disabled="disabled" '; } if ($this->readonly) { $out .= 'readonly="readonly" '; } if (!empty($this->js)) { $out .= $this->js . ' '; } if ($this->required) { $out .= 'required="required" '; } if (!empty($this->placeholder)) { $out .= 'placeholder="' . $this->placeholder . '" '; } $out .= '>' . $this->value . '</textarea>'; if ($this->required) { $out .= '<span class="fv_msg" data-errormessage="' . registry::fetch('user')->lang('fv_required') . '"></span>'; } $this->out = $out; }
/** * Resolve the EQDKP Page the user is surfing on.. * * @param string $member * @return string */ function resolve_eqdkp_page($strPage) { $matches = explode('&', $strPage); $strPath = $matches[0]; if (strlen($strPath)) { $strQuery = isset($matches[1]) ? $matches[1] : ""; $arrQuery = array(); parse_str($strQuery, $arrQuery); $arrFolder = explode('/', $strPath); $strOut = ""; //Prefixes for Admin, Plugins, Maintenance switch ($arrFolder[0]) { case 'admin': $strPrefix = registry::fetch('user')->lang('menu_admin_panel') . ': '; break; case 'plugins': $strPrefix = registry::fetch('user')->lang('pi_title') . ': '; $strOut = registry::fetch('user')->lang($arrFolder[1]) ? registry::fetch('user')->lang($arrFolder[1]) : ucfirst($arrFolder[1]); break; case 'maintenance': $strPrefix = registry::fetch('user')->lang('maintenance'); $strOut = " "; break; case 'portal': $strPrefix = registry::fetch('user')->lang('portal') . ': '; $strOut = registry::fetch('user')->lang($arrFolder[1]) ? registry::fetch('user')->lang($arrFolder[1]) : ucfirst($arrFolder[1]); break; default: $strPrefix = ''; } //Resolve Admin Pages if ($arrFolder[0] == "admin") { //First, some admin pages without menu entry switch ($strPath) { case 'admin/info_php': $strOut = '<a href="' . $this->root_path . 'admin/info_php.php' . $this->SID . '">PHP-Info</a>'; break; case 'admin/manage_articles': $strOut = '<a href="' . $this->root_path . 'admin/manage_articles.php' . $this->SID . '&' . $strQuery . '">' . $this->user->lang('manage_articles') . '</a>'; break; case 'admin/manage_styles': $strOut = '<a href="' . $this->root_path . 'admin/manage_styles.php' . $this->SID . '&' . $strQuery . '">' . $this->user->lang('styles_title') . '</a>'; break; case 'admin': case 'admin/index': $strOut = registry::fetch('user')->lang('menu_admin_panel'); $strPrefix = ""; break; } //Now check if there is an menu entry if ($strOut == "") { $admin_menu = $this->adminmenu(false); $result = search_in_array($strPath . ".php" . $this->SID, $admin_menu); if ($result) { $arrMenuEntry = arraykey_for_array($result, $admin_menu); if ($arrMenuEntry) { $strOut = '<a href="' . $this->root_path . $arrMenuEntry['link'] . '">' . $arrMenuEntry['text'] . '</a>'; } } } } //Resolve Frontend Page if ($strOut == "" && $strPrefix == "") { $intArticleID = $intCategoryID = 0; $arrPath = array_reverse($arrFolder); //Suche Alias in Artikeln $intArticleID = $this->pdh->get('articles', 'resolve_alias', array(str_replace(".html", "", utf8_strtolower($arrPath[0])))); if (!$intArticleID) { //Suche Alias in Kategorien $intCategoryID = $this->pdh->get('article_categories', 'resolve_alias', array(str_replace(".html", "", utf8_strtolower($arrPath[0])))); //Suche in Artikeln mit nächstem Index, denn könnte ein dynamischer Systemartikel sein if (!$intCategoryID && isset($arrPath[1])) { $intArticleID = $this->pdh->get('articles', 'resolve_alias', array(str_replace(".html", "", utf8_strtolower($arrPath[1])))); } } if ($intArticleID) { $strOut = $this->user->lang('article') . ': <a href="' . $this->controller_path . $this->pdh->get('articles', 'path', array($intArticleID)) . '">' . $this->pdh->get('articles', 'title', array($intArticleID)) . '</a>'; } elseif ($intCategoryID) { $strOut = $this->user->lang('category') . ': <a href="' . $this->server_path . $this->pdh->get('article_categories', 'path', array($intCategoryID)) . '">' . $this->pdh->get('article_categories', 'name', array($intCategoryID)) . '</a>'; } elseif (register('routing')->staticRoute($arrPath[0]) || register('routing')->staticRoute($arrPath[1])) { $strPageObject = register('routing')->staticRoute($arrPath[0]); if (!$strPageObject) { $strPageObject = register('routing')->staticRoute($arrPath[1]); } if ($strPageObject) { $strID = str_replace("-", "", strrchr(str_replace(".html", "", $arrPath[0]), "-")); $arrMatches = array(); $myVar = false; preg_match_all('/[a-z]+|[0-9]+/', $strID, $arrMatches, PREG_PATTERN_ORDER); if (isset($arrMatches[0]) && count($arrMatches[0])) { if (count($arrMatches[0]) == 2) { $myVar = $arrMatches[0][1]; } } if (strlen($strID) && count($arrMatches[0]) != 2) { $myVar = $strID; } switch ($strPageObject) { case 'settings': $strOut = registry::fetch('user')->lang('settings_title'); break; case 'login': $strOut = registry::fetch('user')->lang('login_title'); break; case 'mycharacters': $strOut = registry::fetch('user')->lang('manage_members_titl'); break; case 'search': $strOut = registry::fetch('user')->lang('search'); break; case 'register': $strOut = registry::fetch('user')->lang('register_title'); break; //TODO Add Title //TODO Add Title case 'addcharacter': $strOut = ''; break; case 'editarticle': $strOut = $this->user->lang('manage_articles'); if (isset($arrQuery['aid']) && $arrQuery['aid']) { $strOut .= ': <a href="' . $this->controller_path . $this->pdh->get('articles', 'path', array($arrQuery['aid'])) . '">' . $this->pdh->get('articles', 'title', array($arrQuery['aid'])) . '</a>'; } break; case 'user': $strOut = $this->user->lang('user'); if ($myVar) { $strOut .= ': <a href="' . $this->server_path . sanitize($strPage) . '">' . $this->pdh->get('user', 'name', array($myVar)) . '</a>'; } break; case 'usergroup': $strOut = $this->user->lang('usergroup'); if ($myVar) { $strOut .= ': <a href="' . $this->server_path . sanitize($strPage) . '">' . $this->pdh->get('user_groups', 'name', array((int) $myVar)) . '</a>'; } break; case 'rss': $strOut = "RSS"; break; case 'wrapper': if ($arrFolder[1] == "board" || $arrFolder[1] == "boardregister" || $arrFolder[1] == "lostpassword") { $strOut = '<a href="' . $this->routing->build('External', 'Board') . '">' . $this->user->lang('forum') . '</a>'; } elseif ($myVar) { $strOut = $this->user->lang('viewing_wrapper') . ': <a href="' . $this->routing->build('External', $this->pdh->get('links', 'name', array(intval($myVar))), intval($myVar)) . '">' . $this->pdh->get('links', 'name', array(intval($myVar))) . '</a>'; } else { $strOut = $this->user->lang('viewing_wrapper'); } break; case 'tag': $strOut .= $this->user->lang('tag') . ': <a href="' . $this->routing->build('tag', sanitize($arrFolder[1])) . '">' . sanitize($arrFolder[1]) . '</a>'; break; } } } else { //Some special frontend pages switch ($strPath) { case "api": case "exchange": $strOut = registry::fetch('user')->lang('viewing_exchange'); break; } } } } if ($strOut == '') { $strOut = '<span style="font-style:italic;">' . $this->user->lang('unknown') . '</span>'; } return $strPrefix . $strOut; }
public function __construct() { $user = registry::fetch('user'); $this->admin_user = isset($user->data['user_id']) && $user->data['user_id'] != ANONYMOUS ? $user->data['username'] : ''; $this->current_time = $this->time->time; }
public function _construct() { $arrLanguages = $this->user->getAvailableLanguages(); $strDefaultLanguage = $this->config->get('default_lang'); $this->jquery->init_multilang(); if (is_serialized($this->value)) { $this->value = @unserialize($this->value); } elseif (!is_array($this->value) && $this->value != "") { $strValue = $this->value; $this->value = array(); $this->value[$strDefaultLanguage] = $strValue; } $this->out = '<div class="input-multilang textarea"> <div class="multilang-switcher-container hand"><div class="multilang-switcher"><span>' . $arrLanguages[$strDefaultLanguage] . '</span> <i class="fa fa-caret-down fa-lg"></i></div> <div class="multilang-dropdown"><ul> '; foreach ($arrLanguages as $strKey => $strLang) { $this->out .= '<li data-lang="' . $strLang . '" data-key="' . $strKey . '" class="' . ($strKey == $strDefaultLanguage ? 'active' : '') . '">' . $strLang . '</li>'; } $this->out .= '</ul></div><br />'; foreach ($arrLanguages as $strKey => $strLang) { $out = '<textarea name="' . $this->name . '[' . $strKey . ']" rows="' . $this->rows . '" cols="' . $this->cols . '" '; if (empty($this->id)) { $this->id = $this->cleanid($this->name); } $out .= 'id="' . $this->id . '" '; $class = "taml_" . $this->cleanid($this->name) . " " . $strKey; if (!empty($this->class)) { $class .= ' ' . $this->class; } $out .= 'class="' . $class . '" '; if ($this->disabled) { $out .= 'disabled="disabled" '; } if (!empty($this->js)) { $out .= $this->js . ' '; } if ($this->required && $strKey == $strDefaultLanguage) { $out .= 'required="required" '; } if (!empty($this->placeholder)) { $out .= 'placeholder="' . $this->placeholder . '" '; } if ($strKey != $strDefaultLanguage) { $out .= ' style="display:none;"'; } $out .= '>'; if (isset($this->value) && isset($this->value[$strKey])) { $out .= $this->value[$strKey]; } $out .= '</textarea>'; $this->out .= $out; } $this->out .= '</div>'; if ($this->required) { $this->out .= '<span class="fv_msg" data-errormessage="' . registry::fetch('user')->lang('fv_required') . '"></span>'; } }
protected function pattern($pattern) { $w = '[\\w_-]'; switch ($pattern) { case 'email': if (empty($this->placeholder)) { $this->placeholder = '*****@*****.**'; } return $w . '+(\\.' . $w . '+)*@' . $w . '+(\\.' . $w . '+)+'; case 'url': if (empty($this->placeholder)) { $this->placeholder = 'http(s)://example.com'; } return 'http(s){0,1}://' . $w . '+(\\.' . $w . '+)+'; case 'password': $minlength = 6; if (empty($this->placeholder)) { $this->placeholder = sprintf(registry::fetch('user')->lang('fv_password_placeholder'), $minlength - 1); } return '.{' . $minlength . ',}'; default: return $pattern; } }
<?php /* * Project: EQdkp Shoutbox * License: Creative Commons - Attribution-Noncommercial-Share Alike 3.0 Unported * Link: http://creativecommons.org/licenses/by-nc-sa/3.0/ * ----------------------------------------------------------------------- * Began: 2008 * Date: $Date: 2012-06-22 20:20:07 +0200 (Fr, 22. Jun 2012) $ * ----------------------------------------------------------------------- * @author $Author: godmod $ * @copyright 2009-2011 Aderyn * @link http://eqdkp-plus.com * @package shoutbox * @version $Rev: 11830 $ * * $Id: shoutbox.esys.php 11830 2012-06-22 18:20:07Z godmod $ */ if (!defined('EQDKP_INC')) { header('HTTP/1.0 404 Not Found'); exit; } $systems_shoutbox = array('pages' => array('manage' => array('name' => 'hptt_shoutbox_manage', 'table_main_sub' => '%shoutbox_id%', 'table_sort_dir' => 'desc', 'page_ref' => 'manage.php', 'show_select_boxes' => registry::fetch('user')->check_auth('a_shoutbox_delete', false), 'table_presets' => array(array('name' => 'sbdate', 'sort' => true, 'th_add' => 'align="center" width="120px"', 'td_add' => 'align="center" nowrap="nowrap"'), array('name' => 'sbname', 'sort' => true, 'th_add' => 'align="center" width="20%"', 'td_add' => 'nowrap="nowrap"'), array('name' => 'sbtext', 'sort' => false, 'th_add' => 'align="center"', 'td_add' => '')), 'super_row' => array(array('colspan' => '1', 'align' => 'center', 'text' => '<input type="checkbox" name="sb_delete_all" id="sb_delete_all"/>'), array('colspan' => '3', 'align' => 'left', 'text' => '')))));
<?php /* * Project: EQdkp-Plus * License: Creative Commons - Attribution-Noncommercial-Share Alike 3.0 Unported * Link: http://creativecommons.org/licenses/by-nc-sa/3.0/ * ----------------------------------------------------------------------- * Began: 2007 * Date: $Date: 2012-12-21 09:52:11 +0100 (Fr, 21. Dez 2012) $ * ----------------------------------------------------------------------- * @author $Author: godmod $ * @copyright 2006-2011 EQdkp-Plus Developer Team * @link http://eqdkp-plus.com * @package eqdkpplus * @version $Rev: 12649 $ * * $Id: sk.esys.php 12649 2012-12-21 08:52:11Z godmod $ */ if (!defined('EQDKP_INC')) { die('You cannot access this file directly.'); } $system_def = array('base_layout' => 'sk_bottom', 'data' => array('description' => registry::fetch('user')->lang('lm_layout_sk_bottom'), 'point_direction' => 'asc'), 'aliases' => array('current' => 'sk_bottom_position', 'current_all' => 'sk_bottom_position_all'), 'defaults' => array('ival' => 1, 'rval' => 1), 'options' => array(), 'substitutions' => array(), 'pages' => array('listraids' => array('hptt_listraids_raidlist' => array('name' => 'hptt_listraids_raidlist', 'table_main_sub' => '%raid_id%', 'table_subs' => array('%raid_id%', '%link_url%', '%link_url_suffix%'), 'page_ref' => 'listraids.php', 'show_numbers' => false, 'show_select_boxes' => false, 'show_detail_twink' => false, 'table_sort_col' => 0, 'table_sort_dir' => 'desc', 'table_presets' => array(array('name' => 'rdate', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'rlink', 'sort' => true, 'th_add' => '', 'td_add' => 'nowrap="nowrap"'), array('name' => 'rnote', 'sort' => true, 'th_add' => 'width="50%"', 'td_add' => 'nowrap="nowrap"'), array('name' => 'rattcount', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'ritemcount', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'rvalue', 'sort' => true, 'th_add' => '', 'td_add' => '')))), 'viewmember' => array('hptt_viewmember_points' => array('name' => 'hptt_viewmember_points', 'table_main_sub' => '%dkp_id%', 'table_subs' => array('%dkp_id%', '%member_id%', '%with_twink%'), 'page_ref' => 'viewcharacter.php', 'show_numbers' => false, 'show_select_boxes' => false, 'show_detail_twink' => true, 'table_presets' => array(array('name' => 'mdkpname', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'current', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'attendance_30', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'attendance_60', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'attendance_90', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'attendance_lt', 'sort' => true, 'th_add' => '', 'td_add' => ''))), 'hptt_viewmember_memberlist' => array('name' => 'hptt_viewmember_memberlist', 'table_main_sub' => '%member_id%', 'table_subs' => array('%member_id%', '%with_twink%'), 'page_ref' => 'viewcharacter.php', 'show_numbers' => false, 'show_select_boxes' => false, 'show_detail_twink' => false, 'table_sort_col' => 0, 'table_sort_dir' => 'asc', 'table_presets' => array(array('name' => 'mlink', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'mlevel', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'mrace', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'mrank', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'mactive', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'mcname', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'mtwink', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'current_all', 'sort' => true, 'th_add' => '', 'td_add' => ''))), 'hptt_viewmember_raidlist' => array('name' => 'hptt_viewmember_raidlist', 'table_main_sub' => '%raid_id%', 'table_subs' => array('%raid_id%', '%link_url%', '%link_url_suffix%'), 'page_ref' => 'viewcharacter.php', 'show_numbers' => false, 'show_select_boxes' => false, 'show_detail_twink' => false, 'table_sort_col' => 0, 'table_sort_dir' => 'desc', 'table_presets' => array(array('name' => 'rdate', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'rlink', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'rnote', 'sort' => true, 'th_add' => 'width="70%"', 'td_add' => 'nowrap="nowrap"'), array('name' => 'rvalue', 'sort' => true, 'th_add' => '', 'td_add' => ''))), 'hptt_viewmember_adjlist' => array('name' => 'hptt_viewmember_adjlist', 'table_main_sub' => '%adjustment_id%', 'table_subs' => array('%adjustment_id%'), 'page_ref' => 'viewcharacter.php', 'show_numbers' => false, 'show_select_boxes' => false, 'show_detail_twink' => false, 'table_sort_col' => 0, 'table_sort_dir' => 'desc', 'table_presets' => array(array('name' => 'adj_date', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'adj_reason', 'sort' => true, 'th_add' => 'width="70%"', 'td_add' => ''), array('name' => 'adj_value', 'sort' => true, 'th_add' => '', 'td_add' => 'nowrap="nowrap"'))), 'hptt_viewmember_itemlist' => array('name' => 'hptt_viewmember_itemlist', 'table_main_sub' => '%item_id%', 'table_subs' => array('%item_id%', '%link_url%', '%link_url_suffix%', '%raid_link_url%', '%raid_link_url_suffix%', '%itt_lang%', '%itt_direct%', '%onlyicon%', '%noicon%'), 'page_ref' => 'viewcharacter.php', 'show_numbers' => false, 'show_select_boxes' => false, 'show_detail_twink' => false, 'table_sort_col' => 0, 'table_sort_dir' => 'desc', 'table_presets' => array(array('name' => 'idate', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'ibuyername', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'ilink_itt', 'sort' => true, 'th_add' => '', 'td_add' => 'style="height:21px;"'), array('name' => 'iraidlink', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'ipoolname', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'ivalue', 'sort' => true, 'th_add' => '', 'td_add' => ''))), 'hptt_viewmember_eventatt' => array('name' => 'hptt_viewmember_eventatt', 'table_main_sub' => '%event_id%', 'table_subs' => array('%event_id%', '%member_id%', '%link_url%', '%link_url_suffix%'), 'page_ref' => 'viewcharacter.php', 'show_numbers' => false, 'show_select_boxes' => false, 'show_detail_twink' => false, 'table_sort_col' => 0, 'table_sort_dir' => 'desc', 'table_presets' => array(array('name' => 'eicon', 'sort' => false, 'th_add' => '', 'td_add' => ''), array('name' => 'elink', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'event_attendance', 'sort' => true, 'th_add' => '', 'td_add' => 'width="80%"')))), 'listitems' => array('hptt_listitems_itemlist' => array('name' => 'hptt_listitems_itemlist', 'table_main_sub' => '%item_id%', 'table_subs' => array('%item_id%', '%link_url%', '%link_url_suffix%', '%raid_link_url%', '%raid_link_url_suffix%', '%itt_lang%', '%itt_direct%', '%onlyicon%', '%noicon%'), 'page_ref' => 'listitems.php', 'show_numbers' => false, 'show_select_boxes' => false, 'show_detail_twink' => false, 'table_sort_col' => 0, 'table_sort_dir' => 'desc', 'table_presets' => array(array('name' => 'idate', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'ibuyername', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'ilink_itt', 'sort' => true, 'th_add' => '', 'td_add' => 'style="height:21px;"'), array('name' => 'iraidlink', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'ipoolname', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'ivalue', 'sort' => true, 'th_add' => '', 'td_add' => '')))), 'viewitem' => array('hptt_viewitem_buyerslist' => array('name' => 'hptt_viewitem_buyerslist', 'table_main_sub' => '%item_id%', 'table_subs' => array('%item_id%', '%raid_link_url%', '%raid_link_url_suffix%'), 'page_ref' => 'viewitem.php', 'show_numbers' => false, 'show_select_boxes' => false, 'show_detail_twink' => false, 'table_sort_col' => 0, 'table_sort_dir' => 'desc', 'table_presets' => array(array('name' => 'idate', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'ibuyername', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'iraidlink', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'ipoolname', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'ivalue', 'sort' => true, 'th_add' => '', 'td_add' => '')))), 'listevents' => array('hptt_listevents_eventlist' => array('name' => 'hptt_listevents_eventlist', 'table_main_sub' => '%event_id%', 'table_subs' => array('%event_id%', '%link_url%', '%link_url_suffix%'), 'page_ref' => 'listevents.php', 'show_numbers' => false, 'show_select_boxes' => false, 'show_detail_twink' => false, 'table_sort_col' => 0, 'table_sort_dir' => 'asc', 'table_presets' => array(array('name' => 'elink', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'emdkps', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'eipools', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'evalue', 'sort' => true, 'th_add' => '', 'td_add' => '')))), 'viewevent' => array('hptt_viewevent_raidlist' => array('name' => 'hptt_viewevent_raidlist', 'table_main_sub' => '%raid_id%', 'table_subs' => array('%raid_id%', '%link_url%', '%link_url_suffix%'), 'page_ref' => 'viewevent.php', 'show_numbers' => false, 'show_select_boxes' => false, 'show_detail_twink' => false, 'table_sort_col' => 0, 'table_sort_dir' => 'desc', 'table_presets' => array(array('name' => 'rdate', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'rlink', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'rnote', 'sort' => true, 'th_add' => 'width="70%"', 'td_add' => 'class="nowrap"'), array('name' => 'rvalue', 'sort' => true, 'th_add' => '', 'td_add' => ''))), 'hptt_viewevent_itemlist' => array('name' => 'hptt_viewevent_itemlist', 'table_main_sub' => '%item_id%', 'table_subs' => array('%item_id%', '%link_url%', '%link_url_suffix%', '%raid_link_url%', '%raid_link_url_suffix%', '%itt_lang%', '%itt_direct%', '%onlyicon%', '%noicon%'), 'page_ref' => 'viewevent.php', 'show_numbers' => false, 'show_select_boxes' => false, 'show_detail_twink' => false, 'table_sort_col' => 0, 'table_sort_dir' => 'desc', 'table_presets' => array(array('name' => 'idate', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'ibuyername', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'ilink_itt', 'sort' => true, 'th_add' => '', 'td_add' => 'style="height:21px;"'), array('name' => 'iraidlink', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'ipoolname', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'ivalue', 'sort' => true, 'th_add' => '', 'td_add' => '')))), 'listmembers' => array('listmembers_leaderboard' => array('maxpercolumn' => 5, 'maxperrow' => 5, 'sort_direction' => 'asc', 'column_type' => 'classid', 'columns' => array_keys(registry::register('game')->get('classes', 'id_0')), 'default_pool' => 1), 'hptt_listmembers_memberlist_overview' => array('name' => 'hptt_listmembers_memberlist_overview', 'table_main_sub' => '%member_id%', 'table_subs' => array('%member_id%', '%link_url%', '%link_url_suffix%', '%with_twink%'), 'page_ref' => 'listcharacters.php', 'show_numbers' => true, 'show_select_boxes' => true, 'show_detail_twink' => true, 'table_sort_col' => 0, 'table_sort_dir' => 'asc', 'table_presets' => array(array('name' => 'mlink', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'mlevel', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'mrace', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'mrank', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'mactive', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'mcname', 'sort' => true, 'th_add' => '', 'td_add' => 'class="nowrap"'), array('name' => 'mtwink', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'current_all', 'sort' => true, 'th_add' => '', 'td_add' => ''))), 'hptt_listmembers_memberlist_detail' => array('name' => 'hptt_listmembers_memberlist_detail', 'table_main_sub' => '%member_id%', 'table_subs' => array('%member_id%', '%dkp_id%', '%link_url%', '%link_url_suffix%', '%with_twink%'), 'page_ref' => 'listcharacters.php', 'show_numbers' => true, 'show_select_boxes' => true, 'show_detail_twink' => true, 'table_sort_col' => 2, 'table_sort_dir' => 'asc', 'table_presets' => array(array('name' => 'mlink', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'mtwink', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'current', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'first_raid', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'last_raid', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'attendance_30', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'attendance_lt', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'mlast_item_name', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'mlast_item_date', 'sort' => true, 'th_add' => '', 'td_add' => '')))), 'calendar' => array('hptt_calendar_raidlist' => array('name' => 'hptt_calendar_raidlist', 'table_main_sub' => '%calevent_id%', 'table_subs' => array('%member_id%'), 'page_ref' => 'calendar.php', 'show_numbers' => false, 'show_select_boxes' => true, 'selectboxes_checkall' => true, 'show_detail_twink' => false, 'table_sort_col' => 1, 'table_sort_dir' => 'asc', 'table_presets' => array(array('name' => 'calevents_weekday', 'sort' => false, 'th_add' => '', 'td_add' => ''), array('name' => 'calevents_date', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'calevents_start_time', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'calevents_end_time', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'calevents_raid_event', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'calevents_note', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'raidattendees_status', 'sort' => false, 'th_add' => '', 'td_add' => 'align="center"'), array('name' => 'calevents_detailslink', 'sort' => false, 'th_add' => '', 'td_add' => 'align="center"')))), 'manage_characters' => array('hptt_manage_characters' => array('name' => 'hptt_manage_characters', 'table_main_sub' => '%member_id%', 'table_subs' => array('%member_id%'), 'page_ref' => 'characters.php', 'show_numbers' => true, 'show_select_boxes' => false, 'show_detail_twink' => false, 'table_sort_dir' => 'asc', 'table_sort_col' => 1, 'table_presets' => array(array('name' => 'cmainchar', 'sort' => false, 'th_add' => 'width="20"', 'td_add' => ''), array('name' => 'mlink_decorated', 'sort' => true, 'th_add' => 'width="100%"', 'td_add' => ''), array('name' => 'mrank', 'sort' => true, 'th_add' => 'width="100"', 'td_add' => ''), array('name' => 'mlevel', 'sort' => true, 'th_add' => 'width="40"', 'td_add' => ''), array('name' => 'cdefrole', 'sort' => false, 'th_add' => 'width="70"', 'td_add' => ''), array('name' => 'charmenu', 'sort' => false, 'th_add' => 'width="40"', 'td_add' => '')))), 'roster' => array('hptt_roster' => array('name' => 'roster', 'table_main_sub' => '%member_id%', 'table_subs' => array('%member_id%'), 'page_ref' => 'roster.php', 'show_numbers' => false, 'show_select_boxes' => false, 'show_detail_twink' => false, 'table_sort_dir' => 'asc', 'table_sort_col' => 0, 'table_presets' => array(array('name' => 'mlink', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'mrank', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'mlevel', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'mrace', 'sort' => true, 'th_add' => '', 'td_add' => '')))), 'admin_manage_members' => array('hptt_admin_manage_members_memberlist' => array('name' => 'hptt_admin_manage_members_memberlist', 'table_main_sub' => '%member_id%', 'table_subs' => array('%member_id%', '%link_url%', '%link_url_suffix%'), 'page_ref' => 'manage_members.php', 'show_numbers' => true, 'show_select_boxes' => true, 'selectboxes_checkall' => true, 'show_detail_twink' => false, 'table_sort_col' => 1, 'table_sort_dir' => 'asc', 'table_presets' => array(array('name' => 'medit', 'sort' => false, 'th_add' => 'width="20"', 'td_add' => ''), array('name' => 'mname', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'mrank', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'mcname', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'mrace', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'mlevel', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'mmainname', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'mactive', 'sort' => true, 'th_add' => '', 'td_add' => '')))), 'admin_manage_items' => array('hptt_admin_manage_items_itemlist' => array('name' => 'hptt_admin_manage_items_itemlist', 'table_main_sub' => '%item_id%', 'table_subs' => array('%item_id%', '%link_url%', '%link_url_suffix%', '%raid_link_url%', '%raid_link_url_suffix%', '%itt_lang%', '%itt_direct%', '%onlyicon%', '%noicon%'), 'page_ref' => 'manage_items.php', 'show_numbers' => true, 'show_select_boxes' => true, 'selectboxes_checkall' => true, 'show_detail_twink' => false, 'table_sort_dir' => 'desc', 'table_sort_col' => 1, 'table_presets' => array(array('name' => 'itemsedit', 'sort' => false, 'th_add' => '', 'td_add' => ''), array('name' => 'idate', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'ilink_itt', 'sort' => true, 'th_add' => '', 'td_add' => 'style="height:21px;"'), array('name' => 'ibuyers', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'iraididlink', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'ivalue', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'ipoolname', 'sort' => true, 'th_add' => '', 'td_add' => '')))), 'admin_manage_adjustments' => array('hptt_admin_manage_adjustments_adjlist' => array('name' => 'hptt_admin_manage_adjustments_adjlist', 'table_main_sub' => '%adjustment_id%', 'table_subs' => array('%adjustment_id%', '%link_url%', '%link_url_suffix%'), 'page_ref' => 'manage_adjustments.php', 'show_numbers' => true, 'show_select_boxes' => true, 'selectboxes_checkall' => true, 'show_detail_twink' => false, 'table_sort_dir' => 'desc', 'table_sort_col' => 1, 'table_presets' => array(array('name' => 'adjedit', 'sort' => false, 'th_add' => '', 'td_add' => ''), array('name' => 'adj_date', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'adj_reason_link', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'adj_event', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'adj_members', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'adj_value', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'adj_raid', 'sort' => true, 'th_add' => '', 'td_add' => '')))), 'admin_manage_events' => array('hptt_admin_manage_events_eventlist' => array('name' => 'hptt_admin_manage_events_eventlist', 'table_main_sub' => '%event_id%', 'table_subs' => array('%event_id%', '%link_url%', '%link_url_suffix%'), 'page_ref' => 'manage_events.php', 'show_numbers' => true, 'show_select_boxes' => false, 'show_detail_twink' => false, 'table_sort_dir' => 'desc', 'table_sort_col' => 0, 'table_presets' => array(array('name' => 'eventedit', 'sort' => false, 'th_add' => '', 'td_add' => ''), array('name' => 'eicon', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'elink', 'sort' => true, 'th_add' => 'width="90%"', 'td_add' => ''), array('name' => 'evalue', 'sort' => true, 'th_add' => '', 'td_add' => '')))), 'admin_manage_raids' => array('hptt_admin_manage_raids_raidlist' => array('name' => 'hptt_admin_manage_raids_raidlist', 'table_main_sub' => '%raid_id%', 'table_subs' => array('%raid_id%', '%link_url%', '%link_url_suffix%'), 'page_ref' => 'manage_raids.php', 'show_numbers' => false, 'show_select_boxes' => false, 'show_detail_twink' => false, 'table_sort_col' => 1, 'table_sort_dir' => 'desc', 'table_presets' => array(array('name' => 'raidedit', 'sort' => false, 'th_add' => '', 'td_add' => ''), array('name' => 'rdate', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'rlink', 'sort' => true, 'th_add' => '', 'td_add' => 'nowrap="nowrap"'), array('name' => 'rnote', 'sort' => true, 'th_add' => 'width="50%"', 'td_add' => ''), array('name' => 'rattcount', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'ritemcount', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'rvalue', 'sort' => true, 'th_add' => '', 'td_add' => '')))), 'admin_manage_news' => array('hptt_admin_manage_news' => array('name' => 'hptt_admin_manage_news', 'table_main_sub' => '%news_id%', 'table_subs' => array('%news_id%'), 'page_ref' => 'manage_news.php', 'show_numbers' => true, 'show_select_boxes' => true, 'selectboxes_checkall' => true, 'show_detail_twink' => false, 'table_sort_dir' => 'desc', 'table_sort_col' => 1, 'table_presets' => array(array('name' => 'nedit', 'sort' => false, 'th_add' => 'width="16"', 'td_add' => ''), array('name' => 'ndate', 'sort' => true, 'th_add' => 'width="150"', 'td_add' => 'nowrap="nowrap"'), array('name' => 'nheadline', 'sort' => true, 'th_add' => 'width="80%"', 'td_add' => ''), array('name' => 'nstart', 'sort' => true, 'th_add' => 'width="100"', 'td_add' => ''), array('name' => 'nstop', 'sort' => true, 'th_add' => 'width="100"', 'td_add' => ''), array('name' => 'nusername', 'sort' => true, 'th_add' => 'width="100"', 'td_add' => ''), array('name' => 'ncategory', 'sort' => true, 'th_add' => 'width="10%"', 'td_add' => '')))), 'admin_manage_logs' => array('hptt_managelogs_actions' => array('name' => 'hptt_managelogs_actions', 'table_main_sub' => '%log_id%', 'table_subs' => array('%log_id%', '%link_url%', '%link_url_suffix%'), 'page_ref' => 'manage_logs.php', 'show_numbers' => true, 'show_select_boxes' => false, 'show_detail_twink' => false, 'table_sort_dir' => 'desc', 'table_sort_col' => 0, 'table_presets' => array(array('name' => 'logdate', 'sort' => true, 'th_add' => 'width="150"', 'td_add' => ''), array('name' => 'logtype', 'sort' => true, 'th_add' => 'width="100%"', 'td_add' => 'style="height:22px;"'), array('name' => 'logplugin', 'sort' => true, 'th_add' => 'width="100"', 'td_add' => ''), array('name' => 'loguser', 'sort' => true, 'th_add' => 'width="100"', 'td_add' => ''), array('name' => 'logipaddress', 'sort' => true, 'th_add' => 'width="70"', 'td_add' => ''), array('name' => 'logresult', 'sort' => true, 'th_add' => 'width="70"', 'td_add' => '')))), 'admin_index' => array('hptt_latest_logs' => array('name' => 'hptt_latest_logs', 'table_main_sub' => '%log_id%', 'table_subs' => array('%log_id%', '%link_url%', '%link_url_suffix%'), 'page_ref' => 'index.php', 'show_numbers' => false, 'show_select_boxes' => false, 'show_detail_twink' => false, 'table_sort_dir' => 'desc', 'table_sort_col' => 0, 'table_presets' => array(array('name' => 'viewlog', 'sort' => false, 'th_add' => 'width="30"', 'td_add' => ''), array('name' => 'logdate', 'sort' => false, 'th_add' => 'width="150"', 'td_add' => ''), array('name' => 'logtype', 'sort' => false, 'th_add' => 'width="100%"', 'td_add' => 'style="height:22px;"'), array('name' => 'logplugin', 'sort' => false, 'th_add' => 'width="100"', 'td_add' => ''), array('name' => 'loguser', 'sort' => false, 'th_add' => 'width="100"', 'td_add' => ''), array('name' => 'logresult', 'sort' => false, 'th_add' => 'width="70"', 'td_add' => '')))), 'admin_manage_roles' => array('hptt_manageroles_actions' => array('name' => 'hptt_manageroles_actions', 'table_main_sub' => '%role_id%', 'table_subs' => array('%role_id%'), 'page_ref' => 'manage_roles.php', 'show_numbers' => false, 'show_select_boxes' => true, 'show_detail_twink' => false, 'table_sort_dir' => 'asc', 'table_sort_col' => 0, 'table_presets' => array(array('name' => 'roleid', 'sort' => true, 'th_add' => 'width="20"', 'td_add' => ''), array('name' => 'roleedit', 'sort' => false, 'th_add' => 'width="20"', 'td_add' => ''), array('name' => 'rolename', 'sort' => true, 'th_add' => 'width="30%"', 'td_add' => ''), array('name' => 'roleclasses', 'sort' => false, 'th_add' => 'width="70%"', 'td_add' => '')))), 'admin_manage_calevents' => array('hptt_managecalevents_actions' => array('name' => 'hptt_managecaleventss_actions', 'table_main_sub' => '%calevent_id%', 'table_subs' => array('%calevent_id%'), 'page_ref' => 'manage_calevents.php', 'show_numbers' => false, 'show_select_boxes' => true, 'selectboxes_checkall' => true, 'show_detail_twink' => false, 'table_sort_dir' => 'desc', 'table_sort_col' => 1, 'table_presets' => array(array('name' => 'calevents_edit', 'sort' => false, 'th_add' => 'width="20"', 'td_add' => ''), array('name' => 'calevents_date', 'sort' => true, 'th_add' => 'width="14%"', 'td_add' => ''), array('name' => 'calevents_duration', 'sort' => true, 'th_add' => 'width="6%"', 'td_add' => ''), array('name' => 'calevents_name', 'sort' => true, 'th_add' => 'width="40%"', 'td_add' => ''), array('name' => 'calevents_creator', 'sort' => true, 'th_add' => 'width="20%"', 'td_add' => ''), array('name' => 'calevents_calendar', 'sort' => true, 'th_add' => 'width="20%"', 'td_add' => ''))))));
public function generate_ical() { $eventdata = $this->pdh->get('calendar_events', 'data', array($this->url_id)); require $this->root_path . 'libraries/icalcreator/iCalcreator.class.php'; $v = new vcalendar(); $v->setConfig('unique_id', $this->config->get('server_name')); $v->setProperty('x-wr-calname', sprintf(registry::fetch('user')->lang('icalfeed_name'), registry::register('config')->get('guildtag'))); $v->setProperty('X-WR-CALDESC', registry::fetch('user')->lang('icalfeed_description')); // set the timezone - required by some clients $timezone = registry::register('config')->get('timezone'); $v->setProperty("X-WR-TIMEZONE", $timezone); iCalUtilityFunctions::createTimezone($v, $timezone, array("X-LIC-LOCATION" => $timezone)); // Generate the vevents... $e = new vevent(); $e->setProperty('dtstart', array("timestamp" => $eventdata['timestamp_start'] . 'Z')); $e->setProperty('dtend', array("timestamp" => $eventdata['timestamp_end'] . 'Z')); $e->setProperty('dtstamp', array("timestamp" => $this->time->time)); $e->setProperty('summary', $this->pdh->get('event', 'name', array($eventdata['extension']['raid_eventid']))); $e->setProperty('description', $eventdata['notes']); $e->setProperty('class', 'PUBLIC'); $e->setProperty('categories', 'PERSONAL'); $v->setComponent($e); // Save or Output the ICS File.. if ($icsfile == true) { $v->setConfig('filename', $icsfile); $v->saveCalendar(); } else { header('Content-type: text/calendar; charset=utf-8;'); header('Content-Disposition: filename=raidevent-' . $eventdata['timestamp_start'] . '.ics'); echo $v->createCalendar(); exit; } }
$eventsfilter = false; break; case 'appointments': $eventsfilter = 'appointments'; break; } $caleventids = registry::register('plus_datahandler')->get('calendar_events', 'id_list', array($eventsfilter, registry::register('time')->createRepeatableEvents(registry::register('time')->time, -30))); if (is_array($caleventids) && count($caleventids) > 0) { foreach ($caleventids as $calid) { // the attendee stuff $raidcal_status = unserialize(registry::register('config')->get('calendar_raid_status')); $raidstatus = array(); if (is_array($raidcal_status)) { foreach ($raidcal_status as $raidcalstat_id) { if ($raidcalstat_id != 4) { $raidstatus[$raidcalstat_id] = registry::fetch('user')->lang(array('raidevent_raid_status', $raidcalstat_id)); } } } // Build the Attendee Array $attendees = array(); $attendees_raw = registry::register('plus_datahandler')->get('calendar_raids_attendees', 'attendees', array($calid)); if (is_array($attendees_raw)) { foreach ($attendees_raw as $attendeeid => $attendeerow) { $attendees[$attendeerow['signup_status']][$attendeeid] = registry::register('plus_datahandler')->get('member', 'name', array($attendeeid)); } } // Build the guest array if (registry::register('config')->get('calendar_raid_guests') == 1) { $guestarray = registry::register('plus_datahandler')->get('calendar_raids_guests', 'members', array($calid)); if (is_array($guestarray)) {
public function get_header() { return isset($this->header) ? $this->header : registry::fetch('user')->lang($this->path, true); }
public function error($sql = '', $return = false) { $error = $this->_error(); // get specific error code from dbms layer static $sys_message = false; if (!$this->in_construct && !$this->lite_mode && registry::fetch('user')->check_auth('a_', false)) { $blnDebugDisabled = DEBUG < 2 ? true : false; $strEnableDebugMessage = "<li><a href=\"" . $this->root_path . "admin/manage_settings.php" . registry::get_const('SID') . "\" target=\"_blank\">Go to your settings, enable Debug Level > 1</a> and <a href=\"javascript:location.reload();\">reload this page.</a></li>"; registry::register('core')->message("<b>SQL Error</b> <ul>" . ($blnDebugDisabled ? $strEnableDebugMessage : '<li>See error message on the bottom</li>') . "<li><a href=\"" . $this->root_path . "admin/manage_logs.php" . registry::get_const('SID') . "&error=db#errors\">Check your error logs</a></li></ul>", 'Error', 'red'); $sys_message = true; } if ($return) { return $error; } $exception = new Exception(); $this->pdl->log($this->debug_prefix . "sql_error", $sql, $error['message'], $error['code'], $this->dbname, $this->table_prefix, $exception->getTraceAsString()); }
public static function createFromFormat($format, $string, $timezone = null) { if (is_array(registry::fetch('user')->lang('time_daynames', false, false)) && count(registry::fetch('user')->lang('time_daynames', false, false)) > 1) { $string = str_replace(registry::fetch('user')->lang('time_daynames', false, false), self::$english_days, $string); $string = str_replace(registry::fetch('user')->lang('time_monthnames', false, false), self::$english_months, $string); } return parent::createFromFormat($format, $string, $timezone); }
$eqdkp_root_path = './'; include_once $eqdkp_root_path . 'common.php'; //AJAX if (registry::fetch('in')->get('ajax', 0) === 1) { if ($_POST['username']) { if (registry::fetch('in')->exists('olduser') && registry::fetch('in')->get('olduser') === $_POST['username']) { echo 'true'; } else { echo registry::fetch('pdh')->get('user', 'check_username', array(registry::fetch('in')->get('username'))); } } if ($_POST['email_address']) { if (registry::fetch('in')->exists('oldmail') && registry::fetch('in')->get('oldmail') === $_POST['email_address']) { echo 'true'; } else { echo registry::fetch('pdh')->get('user', 'check_email', array(registry::fetch('in')->get('email_address'))); } } exit; } class user_settings extends page_generic { public static function __shortcuts() { $shortcuts = array('user', 'tpl', 'in', 'pdh', 'jquery', 'config', 'core', 'html', 'pm', 'time', 'pfh', 'bridge'); return array_merge(parent::$shortcuts, $shortcuts); } private $logo_upload = false; public function __construct() { if (!$this->user->is_signedin()) {
public function _construct() { $arrLanguages = $this->user->getAvailableLanguages(); $strDefaultLanguage = $this->config->get('default_lang'); $this->jquery->init_multilang(); if (is_serialized($this->value)) { $this->value = @unserialize($this->value); } elseif (!is_array($this->value) && $this->value != "") { $strValue = $this->value; $this->value = array(); $this->value[$strDefaultLanguage] = $strValue; } $this->out = '<div class="input-multilang"> <div class="multilang-switcher-container hand"><div class="multilang-switcher"><span>' . $arrLanguages[$strDefaultLanguage] . '</span> <i class="fa fa-caret-down fa-lg"></i></div> <div class="multilang-dropdown"><ul> '; foreach ($arrLanguages as $strKey => $strLang) { $this->out .= '<li data-lang="' . $strLang . '" data-key="' . $strKey . '" class="' . ($strKey == $strDefaultLanguage ? 'active' : '') . '">' . $strLang . '</li>'; } $this->out .= '</ul></div>'; //The fields foreach ($arrLanguages as $strKey => $strLang) { $out = '<input type="' . self::$type . '" name="' . $this->name . '[' . $strKey . ']" '; if (empty($this->id)) { $this->id = $this->cleanid($this->name); } $out .= 'id="' . $this->id . '" '; if (isset($this->value) && isset($this->value[$strKey])) { $out .= 'value="' . $this->value[$strKey] . '" '; } $class = "tml_" . $this->cleanid($this->name) . " " . $strKey; $class .= " " . $this->class; if (!empty($this->pattern) && !empty($this->successmsg)) { $class .= ' fv_success'; } if (!empty($this->equalto)) { $class .= ' equalto'; } if (!empty($this->class)) { $out .= 'class="' . $class . '" '; } if (!empty($this->size)) { $out .= 'size="' . $this->size . '" '; } if ($this->readonly) { $out .= 'readonly="readonly" '; } if ($this->required && $strKey == $strDefaultLanguage) { $out .= 'required="required" '; } if (!empty($this->pattern)) { $out .= 'pattern="' . $this->pattern($this->pattern) . '" '; } if (!empty($this->euqalto)) { $out .= 'data-equalto="' . $this->equalto . '" '; } if (!empty($this->placeholder)) { $out .= 'placeholder="' . $this->placeholder . '" '; } if (!empty($this->js)) { $out .= $this->js . ' '; } if ($strKey != $strDefaultLanguage) { $out .= ' style="display:none;"'; } $out .= ' />'; $this->out .= $out; } $this->out .= '</div>'; if (!empty($this->pattern)) { $this->out .= '<span class="fv_msg" data-errormessage="' . registry::fetch('user')->lang('fv_sample_pattern') . '"></span>'; } elseif ($this->required) { $this->out .= '<span class="fv_msg" data-errormessage="' . registry::fetch('user')->lang('fv_required') . '"></span>'; } if (!empty($this->equalto)) { $this->out .= '<span class="errormessage error-message-red" style="display:none;"><i class="fa fa-exclamation-triangle fa-lg"></i>' . registry::fetch('user')->lang('fv_required_password_repeat') . '</span>'; } if (!empty($this->after_txt)) { $this->out .= $this->after_txt; } }
function CSVpointexport($raid_id, $raid_groups) { $presets = array(array('name' => 'earned', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'spent', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'adjustment', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'current', 'sort' => true, 'th_add' => '', 'td_add' => '')); $arrPresets = array(); foreach ($presets as $preset) { $pre = registry::register('plus_datahandler')->pre_process_preset($preset['name'], $preset); if (empty($pre)) { continue; } $arrPresets[$pre[0]['name']] = $pre[0]; } $attendees = registry::register('plus_datahandler')->get('calendar_raids_attendees', 'attendees', array($raid_id)); $guests = registry::register('plus_datahandler')->get('calendar_raids_guests', 'members', array($raid_id)); $mdkp = 1; //Change here the Multidkp Pool $a_json_d = array(); $a_json_a = array(); $arrPoints = $arrMember = array(); foreach ($attendees as $id_attendees => $d_attendees) { $arrPoints[] = isset($arrPresets['current']) ? registry::register('plus_datahandler')->get($arrPresets['current'][0], $arrPresets['current'][1], $arrPresets['current'][2], array('%dkp_id%' => $mdkp, '%member_id%' => $id_attendees, '%with_twink%' => intval(registry::register('config')->get('show_twinks')) ? 0 : 1)) : 0; $arrMember[] = array('id' => $id_attendees, 'name' => unsanitize(registry::register('plus_datahandler')->get('member', 'name', array($id_attendees))), 'status' => $d_attendees['signup_status'], 'guest' => false, 'group' => $d_attendees['raidgroup'], 'point' => isset($arrPresets['current']) ? registry::register('plus_datahandler')->get($arrPresets['current'][0], $arrPresets['current'][1], $arrPresets['current'][2], array('%dkp_id%' => $mdkp, '%member_id%' => $id_attendees, '%with_twink%' => intval(registry::register('config')->get('show_twinks')) ? 0 : 1)) : 0); } array_multisort($arrPoints, SORT_NUMERIC, SORT_DESC, $arrMember); foreach ($arrMember as $arrData) { $a_json_d[] = array('name' => $arrData['name'], 'status' => $arrData['status'], 'guest' => $arrData['guest'], 'point' => $arrData['point'], 'group' => $arrData['group']); } array_multisort($arrPoints, SORT_NUMERIC, SORT_ASC, $arrMember); foreach ($arrMember as $arrData) { $a_json_a[] = array('name' => $arrData['name'], 'status' => $arrData['status'], 'guest' => $arrData['guest'], 'point' => $arrData['point'], 'group' => $arrData['group']); } foreach ($guests as $guestsdata) { $a_json_d[] = $a_json_a[] = array('name' => $guestsdata['name'], 'status' => false, 'guest' => true, 'point' => 0, 'group' => $guestsdata['raidgroup']); } $json_asc = json_encode($a_json_a); $json_desc = json_encode($a_json_d); unset($a_json); registry::register('template')->add_js(' genOutput() $("input[type=\'checkbox\'], #ip_seperator, #dd_sorting, #raidgroup").change(function (){ genOutput() }); ', "docready"); registry::register('template')->add_js(' function genOutput(){ var json_asc = ' . $json_asc . '; var json_desc = ' . $json_desc . '; var attendee_data = ($("#dd_sorting").val() != "asc") ? json_asc : json_desc; var data = []; ip_seperator = ($("#ip_seperator").val() != "") ? $("#ip_seperator").val() : ","; cb_guests = ($("#cb_guests").attr("checked")) ? true : false; cb_confirmed = ($("#cb_confirmed").attr("checked")) ? true : false; cb_signedin = ($("#cb_signedin").attr("checked")) ? true : false; cb_backup = ($("#cb_backup").attr("checked")) ? true : false; $.each(attendee_data, function(i, item) { if((cb_guests && item.guest == true) || (cb_confirmed && !item.guest && item.status == 0) || (cb_signedin && item.status == 1) || (cb_backup && item.status == 3)){ console.log($("#raidgroup").val()); if($("#raidgroup").val() == "0" || (item.group > 0 && item.group == $("#raidgroup").val())){ data.push(item.name + " " + item.point); } } }); $("#attendeeout").html(data.join(ip_seperator)); } '); $text = "<dt><label>" . registry::fetch('user')->lang('raidevent_export_seperator') . "</label></dt>\n\t\t\t\t\t\t<dd>\n\t\t\t\t\t\t\t<input type='text' name='seperator' id='ip_seperator' value=',' size='4' />\n\t\t\t\t\t\t</dd>\n\t\t\t\t\t</dl><dl>"; $text .= "<dt><label>" . registry::fetch('user')->lang('raidevent_export_sorting') . "</label></dt>\n\t\t\t\t\t\t<dd>\n\t\t\t\t\t\t\t<select name='sorting' id='dd_sorting'>\n\t\t\t\t\t\t\t\t<option value='desc'>ASC</option>\n\t\t\t\t\t\t\t\t<option value='asc'>DESC</option>\n\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t</dd>\n\t\t\t\t\t</dl><dl>"; $text .= "<dt><label>" . registry::fetch('user')->lang('raidevent_export_raidgroup') . "</label></dt>\n\t\t\t\t\t\t<dd>\n\t\t\t\t\t\t\t" . new hdropdown('raidgroup', array('options' => $raid_groups, 'value' => 0, 'id' => 'raidgroup')) . "\n\t\t\t\t\t\t</dd>\n\t\t\t\t\t</dl><dl>"; $text .= "<input type='checkbox' checked='checked' name='confirmed' id='cb_confirmed' value='true'> " . registry::fetch('user')->lang(array('raidevent_raid_status', 0)); $text .= "<input type='checkbox' checked='checked' name='guests' id='cb_guests' value='true'> " . registry::fetch('user')->lang('raidevent_raid_guests'); $text .= "<input type='checkbox' checked='checked' name='signedin' id='cb_signedin' value='true'> " . registry::fetch('user')->lang(array('raidevent_raid_status', 1)); $text .= "<input type='checkbox' name='backup' id='cb_backup' value='true'> " . registry::fetch('user')->lang(array('raidevent_raid_status', 3)); $text .= ' | ' . registry::fetch('user')->lang('raidevent_export_sorting') . " "; $text .= "<br/>"; $text .= "<textarea name='group" . rand() . "' id='attendeeout' cols='60' rows='10' onfocus='this.select()' readonly='readonly'>"; $text .= "</textarea>"; $text .= '<br/>' . registry::fetch('user')->lang('rp_copypaste_ig') . "</b>"; return $text; }
$eqdkp_root_path = './../../'; include_once './includes/common.php'; // Be sure plugin is installed if (registry::register('plugin_manager')->check('shoutbox', PLUGIN_INSTALLED)) { header('content-type: text/html; charset=UTF-8'); $in = registry::register('input'); // get post/get values $sb_text = $in->get('sb_text'); $sb_usermember_id = $in->get('sb_usermember_id', -1); $sb_delete = $in->get('sb_delete', 0); $sb_root = $in->get('sb_root'); $sb_orientation = $in->get('sb_orientation'); // -- Insert? --------------------------------------------- if ($sb_text && $sb_usermember_id != -1) { $shoutbox->insertShoutboxEntry($sb_usermember_id, $sb_text); } else { if ($sb_delete) { $shoutbox->deleteShoutboxEntry($sb_delete); } } // -- Output ---------------------------------------------- echo $shoutbox->getContent($sb_orientation, urldecode($sb_root), true); } else { header('content-type: text/html; charset=UTF-8'); $error = '<table class="table fullwidth colorswitch"> <tr> <td><div class="center">' . registry::fetch('user')->lang('sb_plugin_not_installed') . '</div></td> </tr> </table>'; echo $error; }
protected function error($strErrorMessage, $strQuery, $strErrorCode = '') { $strErrorID = md5('db_error' . $strErrorMessage . time() . $this->strDebugPrefix); if (!registry::get_const("lite_mode") && registry::fetch('user')->check_auth('a_', false)) { $blnDebugDisabled = DEBUG < 2 ? true : false; $strEnableDebugMessage = "<li><a href=\"" . registry::get_const("server_path") . "admin/manage_settings.php" . registry::get_const('SID') . "\" target=\"_blank\">Go to your settings, enable Debug Level > 1</a> and <a href=\"javascript:location.reload();\">reload this page.</a></li>"; registry::register('core')->message("<b>SQL Error (" . $strErrorID . ")</b> <ul>" . ($blnDebugDisabled ? $strEnableDebugMessage : '<li>See error message on the bottom</li>') . "<li><a href=\"" . registry::get_const("server_path") . "admin/manage_logs.php" . registry::get_const('SID') . "&error=db#errors\">Check your error logs</a></li></ul>", 'Error', 'red'); } $exception = new Exception(); $this->objLogger->log($this->strDebugPrefix . "sql_error", $strErrorID, $strErrorMessage, $strQuery, $strErrorCode, registry::get_const('dbname'), $this->strTablePrefix, $exception->getTraceAsString()); }
public static function createFromFormat($format, $string, $timezone = null) { if (is_array(registry::fetch('user')->lang('time_daynames', false, false, self::$language)) && count(registry::fetch('user')->lang('time_daynames', false, false, self::$language)) > 1) { $arrReplace = array_merge(self::$english_days, self::$english_days_short, self::$english_months); $arrSearch = array_merge(registry::fetch('user')->lang('time_daynames', false, false, self::$language), registry::fetch('user')->lang('time_daynames_short', false, false, self::$language), registry::fetch('user')->lang('time_monthnames', false, false, self::$language)); foreach ($arrSearch as $key => $val) { $string = preg_replace('/\\b' . $val . '\\b/u', $arrReplace[$key], $string); } } return parent::createFromFormat($format, $string, $timezone); }
<?php define('EQDKP_INC', true); $eqdkp_root_path = './../../'; include_once $eqdkp_root_path . 'common.php'; if (!registry::fetch('user')->is_signedin()) { echo 'You have no permission to see this page as you are not logged in'; exit; } ?> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>elFinder 2.0</title> <!-- jQuery and jQuery UI (REQUIRED) --> <link rel="stylesheet" type="text/css" media="screen" href="css/jquery-ui.css"> <script type="text/javascript" src="js/jquery.min.js"></script> <script type="text/javascript" src="js/jquery-ui.min.js"></script> <!-- elFinder CSS (REQUIRED) --> <link rel="stylesheet" type="text/css" media="screen" href="css/elfinder.min.css"> <link rel="stylesheet" type="text/css" media="screen" href="css/theme.css"> <!-- elFinder JS (REQUIRED) --> <script type="text/javascript" src="js/elfinder.min.js"></script> <!-- elFinder initialization (REQUIRED) --> <script type="text/javascript" charset="utf-8">
function wowautoinviteexport($raid_id, $raid_groups = 0) { $attendees = registry::register('plus_datahandler')->get('calendar_raids_attendees', 'attendees', array($raid_id)); $guests = registry::register('plus_datahandler')->get('calendar_raids_guests', 'members', array($raid_id)); $a_json = array(); foreach ($attendees as $id_attendees => $d_attendees) { $a_json[] = array('name' => unsanitize(registry::register('plus_datahandler')->get('member', 'name', array($id_attendees))), 'status' => $d_attendees['signup_status'], 'class' => autoinvite_eclass(registry::register('plus_datahandler')->get('member', 'classid', array($id_attendees))), 'note' => unsanitize($d_attendees['note']), 'level' => registry::register('plus_datahandler')->get('member', 'level', array($id_attendees)), 'guest' => false, 'group' => $d_attendees['raidgroup']); } foreach ($guests as $guestsdata) { $a_json[] = array('name' => unsanitize($guestsdata['name']), 'status' => false, 'class' => autoinvite_eclass($guestsdata['class']), 'note' => unsanitize($guestsdata['note']), 'level' => 0, 'guest' => true, 'group' => $guestsdata['raidgroup']); } $json = json_encode($a_json); unset($a_json); registry::register('template')->add_js(' genOutput() $("input[type=\'checkbox\'], #raidgroup").change(function (){ genOutput() }); ', "docready"); #http://www.curse.com/addons/wow/auto-invite#t1:description #name:eClass:level:inGroup:group:comment #name: name of the player #eClass: must bes PRIEST, HUNTER, WARRIOR, MAGE, PALADIN, SHAMAN, WARLOCK, ROGUE or DRUID #level: can be 0, the mod will read the level then automatically #inGroup=1 player is in the current group setup and will be invited by the mod, inGroup=0 player is not in the current group setup (only in the complete list) #group='-' no group defined group=1 or group=2 to group=8 number of the group #comment=Comment for the player. Use <br> to split it in several lines registry::register('template')->add_js(' function genOutput(){ var attendee_data = ' . $json . '; output = ""; cb_guests = ($("#cb_guests").attr("checked")) ? true : false; cb_confirmed = ($("#cb_confirmed").attr("checked")) ? true : false; cb_signedin = ($("#cb_signedin").attr("checked")) ? true : false; cb_backup = ($("#cb_backup").attr("checked")) ? true : false; $.each(attendee_data, function(i, item) { if((cb_guests && item.guest == true) || (cb_confirmed && !item.guest && item.status == 0) || (cb_signedin && item.status == 1) || (cb_backup && item.status == 3)){ if($("#raidgroup").length == 0 || $("#raidgroup").val() == "0" || (item.group > 0 && item.group == $("#raidgroup").val())){ output += item.name + ":" + item.class + ":" + item.level + ":1:-:" +item.note + "\\n"; } } }); $("#attendeeout").html(output); } '); if (is_array($raid_groups)) { $text = "<dt><label>" . registry::fetch('user')->lang('raidevent_export_raidgroup') . "</label></dt>\n\t\t\t\t\t\t\t\t<dd>\n\t\t\t\t\t\t\t\t\t" . new hdropdown('raidgroup', array('options' => $raid_groups, 'value' => 0, 'id' => 'raidgroup')) . "\n\t\t\t\t\t\t\t\t</dd>\n\t\t\t\t\t\t\t</dl><dl>"; } $text .= "<input type='checkbox' checked='checked' name='confirmed' id='cb_confirmed' value='true'> " . registry::fetch('user')->lang(array('raidevent_raid_status', 0)); $text .= "<input type='checkbox' checked='checked' name='guests' id='cb_guests' value='true'> " . registry::fetch('user')->lang('raidevent_raid_guests'); $text .= "<input type='checkbox' checked='checked' name='signedin' id='cb_signedin' value='true'> " . registry::fetch('user')->lang(array('raidevent_raid_status', 1)); $text .= "<input type='checkbox' name='backup' id='cb_backup' value='true'> " . registry::fetch('user')->lang(array('raidevent_raid_status', 3)); $text .= "<br/>"; $text .= "<textarea name='group" . rand() . "' id='attendeeout' cols='60' rows='10' onfocus='this.select()' readonly='readonly'>"; $text .= "</textarea>"; $text .= '<br/>' . registry::fetch('user')->lang('rp_copypaste_ig') . "</b>"; return $text; }
<?php /* Project: EQdkp-Plus * Package: Shoutbox Plugin * Link: http://eqdkp-plus.eu * * Copyright (C) 2006-2015 EQdkp-Plus Developer Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ if (!defined('EQDKP_INC')) { header('HTTP/1.0 404 Not Found'); exit; } $systems_shoutbox = array('pages' => array('manage' => array('name' => 'hptt_shoutbox_manage', 'table_main_sub' => '%shoutbox_id%', 'table_sort_dir' => 'desc', 'page_ref' => 'manage.php', 'show_select_boxes' => registry::fetch('user')->check_auth('a_shoutbox_delete', false), 'selectboxes_checkall' => true, 'table_presets' => array(array('name' => 'sbdate', 'sort' => true, 'th_add' => 'align="center" width="120px"', 'td_add' => 'align="center" nowrap="nowrap"'), array('name' => 'sbname', 'sort' => true, 'th_add' => 'align="center" width="20%"', 'td_add' => 'nowrap="nowrap"'), array('name' => 'sbtext', 'sort' => false, 'th_add' => 'align="center"', 'td_add' => '')))));
private static function set_timezone() { if (!empty(registry::fetch('user')->data['user_id']) && registry::fetch('user')->data['user_timezone']) { registry::register('time')->setTimezone(registry::fetch('user')->data['user_timezone']); } elseif (registry::register('config')->get('timezone')) { registry::register('time')->setTimezone(registry::register('config')->get('timezone')); } else { $default_timezone = registry::register('time')->get_serverTimezone(); registry::register('time')->setTimezone($default_timezone); if ($default_timezone == 'GMT') { registry::register('config')->message(registry::fetch('user')->lang('timezone_set_gmt')); } } }
/** * Outputs a message with debugging info if needed and ends output. * Clean replacement for die() * * @param string $text Message text * @param string $title Message title * @param string $file File name * @param int $line File line * @param string $sql SQL code * @param array $buttons Buttons */ function message_die($text = '', $title = '', $type = 'normal', $login_form = false, $debug_file = '', $debug_line = '', $debug_sql = '', $button = '') { //Output if template-class is not available if (!is_object(register('template'))) { echo $error_message; exit; } register('template')->assign_vars(array('MSG_TITLE' => strlen($title) ? $title : ' ', 'MSG_TEXT' => strlen($text) ? $text : ' ')); //Buttons if (is_array($button)) { registry::register('template')->assign_vars(array('S_BUTTON' => true, 'BU_FORM' => $button['form_action'] != "" ? '<form action="' . $button['form_action'] . '" method="post" name="post">' : '', 'BU_FORM_END' => $button['form_action'] != "" ? '</form>' : '', 'BU_VALUE' => $button['value'], 'BU_ONCLICK' => $button['onclick'] != "" ? ' onclick="' . $button['onclick'] . '"' : '')); } //Page-Header if (function_exists('page_title')) { $page_title = page_title(strlen($title) ? $title : 'Message'); } elseif (is_object(registry::fetch('user'))) { $page_title = registry::fetch('user')->lang('message_title'); } else { $page_title = 'Message'; } //Switch rounded boxes and icons switch ($type) { case 'access_denied': $message_class = 'errorbox'; $icon = 'icon_stop'; break; case 'info': $message_class = 'infobox'; $icon = 'icon_info'; break; case 'error': $message_class = 'errorbox'; $icon = 'icon_false'; break; case 'ok': $message_class = 'greenbox'; $icon = 'icon_ok'; break; } if ($type != 'normal') { registry::register('template')->assign_vars(array('MSG_CLASS' => strlen($message_class) ? $message_class : '', 'MSG_ICON' => strlen($icon) ? $icon : '', 'S_MESSAGE' => true)); } //Login-Form if ($login_form) { if (!registry::fetch('user')->is_signedin()) { registry::register('jquery')->Validate('login', array(array('name' => 'username', 'value' => registry::fetch('user')->lang('fv_required_user')), array('name' => 'password', 'value' => registry::fetch('user')->lang('fv_required_password')))); registry::register('template')->add_js('document.login.username.focus();', 'docready'); $redirect = registry::register('environment')->eqdkp_request_page; $redirect = registry::fetch('user')->removeSIDfromString($redirect); registry::register('template')->assign_vars(array('S_LOGIN' => true, 'S_BRIDGE_INFO' => registry::register('config')->get('cmsbridge_active') == 1 ? true : false, 'S_USER_ACTIVATION' => registry::register('config')->get('account_activation') == 1 ? true : false, 'REDIRECT' => isset($redirect) ? '<input type="hidden" name="redirect" value="' . base64_encode($redirect) . '" />' : '')); } } registry::register('core')->set_vars(array('header_format' => registry::register('core')->header_format, 'page_title' => $page_title, 'template_file' => 'message.html')); registry::register('core')->generate_page(); }