| 1 | <?php |
|---|
| 2 | |
|---|
| 3 | class lol_control extends paypal_postback |
|---|
| 4 | { |
|---|
| 5 | |
|---|
| 6 | protected $account_access_data = array ( 'Spieler', 'Moderator', 'Supporter', 'GameMaster', 'Administrator', 'Sys OP' ); |
|---|
| 7 | |
|---|
| 8 | public function __destruct () |
|---|
| 9 | { |
|---|
| 10 | parent::__destruct ( ); |
|---|
| 11 | } |
|---|
| 12 | |
|---|
| 13 | public function admin_account_control ( $data ) |
|---|
| 14 | { |
|---|
| 15 | |
|---|
| 16 | global $db, $phpbb_root_path, $user, $config; |
|---|
| 17 | |
|---|
| 18 | if ( ! $this->check_access_rights ( array ( 5, 11, 7, 9, 22 ) ) ) return "Na na na, wer versucht denn da ohne Rechte hier rein zu kommen?"; |
|---|
| 19 | |
|---|
| 20 | $inactive_trinity = $gallery = $welcome = $backup = $levelup = $accman = $ev_cal = $monman = $forum_disable = $guild_delete = $server_announcer = $gm_rating = $warden_logs = false; |
|---|
| 21 | |
|---|
| 22 | $modus = isset ( $_GET ['modus'] ) ? $_GET ['modus'] : 'NULL_EMPTY_STRING'; |
|---|
| 23 | $site = $this->check_post_data ( $data, 'site', false, '' ); |
|---|
| 24 | $ajax = isset ( $_GET ['ajax'] ) ? $_GET ['ajax'] : false; |
|---|
| 25 | $account = isset ( $data ['account'] ) ? $data ['account'] : ( isset ( $_GET ['acc'] ) ? $_GET ['acc'] : '' ); |
|---|
| 26 | $character = $this->check_post_data ( $data, 'character', false, '' ); |
|---|
| 27 | |
|---|
| 28 | switch ( $modus ) |
|---|
| 29 | { |
|---|
| 30 | case 'gallery': |
|---|
| 31 | $gallery = true; |
|---|
| 32 | break; |
|---|
| 33 | case 'inactivet': |
|---|
| 34 | $inactive_trinity = true; |
|---|
| 35 | break; |
|---|
| 36 | case 'backup': |
|---|
| 37 | $backup = true; |
|---|
| 38 | break; |
|---|
| 39 | case 'accman': |
|---|
| 40 | $accman = true; |
|---|
| 41 | break; |
|---|
| 42 | case 'ev_cal': |
|---|
| 43 | $ev_cal = true; |
|---|
| 44 | break; |
|---|
| 45 | case 'monman': |
|---|
| 46 | $monman = true; |
|---|
| 47 | break; |
|---|
| 48 | case 'forum_disable': |
|---|
| 49 | $forum_disable = true; |
|---|
| 50 | break; |
|---|
| 51 | case 'guild_del': |
|---|
| 52 | $guild_delete = true; |
|---|
| 53 | break; |
|---|
| 54 | case 'server_announcer': |
|---|
| 55 | $server_announcer = true; |
|---|
| 56 | break; |
|---|
| 57 | case 'gm_rating': |
|---|
| 58 | $gm_rating = true; |
|---|
| 59 | break; |
|---|
| 60 | case 'warden_logs': |
|---|
| 61 | $warden_logs = true; |
|---|
| 62 | break; |
|---|
| 63 | default: |
|---|
| 64 | $welcome = true; |
|---|
| 65 | break; |
|---|
| 66 | } |
|---|
| 67 | |
|---|
| 68 | if ( ! empty ( $site ) && $site > 0 && $inactive_trinity ) $start = ( $site * 100 ) - 100; |
|---|
| 69 | else $start = isset ( $_GET ['start'] ) ? $_GET ['start'] : 0; |
|---|
| 70 | |
|---|
| 71 | $menu_array = array ( 'Gallery' => array ( 'gallery', 'Gallery', $this->check_access_rights ( array ( 5, 11 ) ) ), 'Inaktiv Trinity' => array ( 'inactivet', 'Inaktiv Trinity', $this->check_access_rights ( array ( 5, 11 ) ) ), 'Backup Suche' => array ( 'backup', 'Backup Suche', $this->check_access_rights ( array ( 5, 11, 9, 7, 17 ) ) ), 'Account Management' => array ( 'accman', 'Accountmanager', $this->check_access_rights ( array ( 5, 11, 9, 7, 17 ) ) ), 'Eventkalender' => array ( 'ev_cal', 'Eventkalender', $this->check_access_rights ( array ( 5, 11, 9, 7, 17 ) ) ), 'Kontomanager' => array ( 'monman', 'Kontomanager', $this->check_access_rights ( array ( 5, 11, 7 ) ) ), 'Forum Disable' => array ( 'forum_disable', 'Forum Disable', $this->check_access_rights ( array ( 5, 11 ) ) ), 'Guild Deleter' => array ( 'guild_del', 'Guild Deleter', $this->check_access_rights ( array ( 5, 11 ) ) ), 'Server Announcer' => array ( 'server_announcer', 'Server Announcer', $this->check_access_rights ( array ( 5, 11 ) ) ), 'GM-Bewertungsübersicht' => array ( 'gm_rating', 'GM-Bewertungsübersicht', $this->check_access_rights ( array ( 5, 11, 9, 7, 17, 24, 10 ) ) ), 'Warden Logs' => array ( 'warden_logs', 'Warden Logs', $this->check_access_rights ( array ( 7, 11, 5 ) ) ) ); |
|---|
| 72 | |
|---|
| 73 | ksort ( $menu_array ); |
|---|
| 74 | $menu_counter = 1; |
|---|
| 75 | $entry_counter = 0; |
|---|
| 76 | $no_access_entries = 0; |
|---|
| 77 | |
|---|
| 78 | $code = "<center><table cellspacing=\"4\">"; |
|---|
| 79 | $menu_temp_code = ''; |
|---|
| 80 | |
|---|
| 81 | foreach ( $menu_array as $entry ) { |
|---|
| 82 | if ( $entry [2] === false ) $no_access_entries ++; |
|---|
| 83 | else { |
|---|
| 84 | $navi_url = append_sid ( 'portal.php?mod=lol_control&modus=' . $entry [0] ); |
|---|
| 85 | if ( $menu_counter == 1 ) $menu_temp_code .= "<tr>"; |
|---|
| 86 | $menu_temp_code .= "<td align=\"center\">[ <a href=\"{$navi_url}\">{$entry[1]}</a> ]</td>"; |
|---|
| 87 | |
|---|
| 88 | if ( $menu_counter == 5 ) { |
|---|
| 89 | $menu_temp_code .= "</tr>"; |
|---|
| 90 | $menu_counter = 0; |
|---|
| 91 | } |
|---|
| 92 | if ( ( count ( $menu_array ) - $no_access_entries ) == $entry_counter ) $menu_temp_code .= "</tr>"; |
|---|
| 93 | $menu_counter ++; |
|---|
| 94 | } |
|---|
| 95 | $entry_counter ++; |
|---|
| 96 | } |
|---|
| 97 | |
|---|
| 98 | if ( empty ( $menu_temp_code ) ) $code .= "<td align=\"center\">Leider Fehlt dir die Berechtigung hier etwas zu sehen!</td>"; |
|---|
| 99 | else $code .= $menu_temp_code; |
|---|
| 100 | $code .= "</table><br></center>"; |
|---|
| 101 | |
|---|
| 102 | if ( $welcome ) { |
|---|
| 103 | $code .= "<br>Willkommen im WoW-Benutzer Kontrollmodul, bitte triff oben deine Submodul Auswahl!"; |
|---|
| 104 | return $code; |
|---|
| 105 | } |
|---|
| 106 | |
|---|
| 107 | if ( $gallery ) return $code . $this->gallery_management ( $data ); |
|---|
| 108 | if ( $server_announcer ) return $code . $this->server_announcer ( $data ); |
|---|
| 109 | if ( $guild_delete ) return $code . $this->guild_deleter ( $data ); |
|---|
| 110 | if ( $forum_disable ) return $code . $this->forum_disable ( $data ); |
|---|
| 111 | if ( $monman ) return $code . $this->monman ( $data ); |
|---|
| 112 | if ( $ev_cal ) return $code . $this->event_calendar ( $data ); |
|---|
| 113 | if ( $accman ) return $code . $this->accman ( $data ); |
|---|
| 114 | if ( $inactive_trinity ) return $code . $this->inactive_trinity ( $data, $start ); |
|---|
| 115 | if ( $gm_rating ) return $code . $this->gm_rating_detail_main ( $data ); |
|---|
| 116 | if ( $warden_logs ) return $code . $this->browse_warden_logs ( $data ); |
|---|
| 117 | |
|---|
| 118 | if ( $backup ) { |
|---|
| 119 | if ( $ajax ) $this->do_exit ( $this->game_backup_check ( $account, $character, false, true ) ); |
|---|
| 120 | |
|---|
| 121 | $code .= "<br />Im Admin-Modus ist das Account Feld kein muss, kann jedoch mit angegeben werden um die Suche zu Beschleunigen.<br />Im Charfeld kann entweder der Vollständige oder nur ein teil eines Accountsnamens angegeben werden.<br /><br /><form id=\"backup_search\" onsubmit=\"ajaxUpload(this,'portal.php?mod=lol_control&modus=backup&ajax=true','backup_content','<center>Suche wird ausgeführt...</center>','<center>Nichts gefunden oder Fehler</center>'); return false;\"><table><tr><td>Account:</td><td><input type=\"text\" size=\"12\" name=\"account\" autocomplete=\"off\" /></td></tr><tr><td>Char:</td><td><input type=\"text\" size=\"12\" name=\"character\" autocomplete=\"off\" /></td></tr><tr><td colspan=\"2\" align=\"center\"><input type=\"submit\" value=\"Suchen\"></td></tr><tr><td colspan=\"2\"> </td></tr></table></form><br /><div id=\"backup_content\"> </div>"; |
|---|
| 122 | return $code; |
|---|
| 123 | } |
|---|
| 124 | } |
|---|
| 125 | |
|---|
| 126 | protected function check_access_rights ( $allowed = array(), $user_override = '' ) |
|---|
| 127 | { |
|---|
| 128 | global $user; |
|---|
| 129 | |
|---|
| 130 | if ( ! empty ( $user_override ) ) { |
|---|
| 131 | $user_data = $this->get_forum_acc_data ( $user_override ); |
|---|
| 132 | $get_other_groups_sql = "SELECT `group_id` FROM `phpbb_user_group` WHERE `user_id` = {$user_data['user_id']} AND `user_pending` = 0"; |
|---|
| 133 | $groups = array ( $user_data ['group_id'] ); |
|---|
| 134 | } |
|---|
| 135 | else { |
|---|
| 136 | $get_other_groups_sql = "SELECT `group_id` FROM `phpbb_user_group` WHERE `user_id` = {$user->data['user_id']} AND `user_pending` = 0"; |
|---|
| 137 | $groups = array ( $user->data ['group_id'] ); |
|---|
| 138 | } |
|---|
| 139 | |
|---|
| 140 | $get_other_groups_query = $this->query ( $get_other_groups_sql, $this->forum_db ); |
|---|
| 141 | |
|---|
| 142 | while ( $group = $this->fetch_row ( $get_other_groups_query ) ) |
|---|
| 143 | $groups [ ] = $group [0]; |
|---|
| 144 | |
|---|
| 145 | foreach ( $groups as $agroup ) |
|---|
| 146 | if ( in_array ( $agroup, $allowed ) ) return true; |
|---|
| 147 | |
|---|
| 148 | return false; |
|---|
| 149 | } |
|---|
| 150 | |
|---|
| 151 | private function gallery_management ( $data ) |
|---|
| 152 | { |
|---|
| 153 | global $user, $code, $phpbb_root_path; |
|---|
| 154 | |
|---|
| 155 | $gm = isset ( $_GET ['gm'] ) ? $_GET ['gm'] : 'NULL_EMPTY_STRING'; |
|---|
| 156 | $na = isset ( $_GET ['na'] ) ? $_GET ['na'] : 'NULL_EMPTY_STRING'; |
|---|
| 157 | $c = isset ( $_GET ['c'] ) ? $_GET ['c'] : false; |
|---|
| 158 | $idd = isset ( $_GET ['idd'] ) ? $_GET ['idd'] : 'NULL_EMPTY_STRING'; |
|---|
| 159 | $cs = isset ( $_GET ['cs'] ) ? $_GET ['cs'] : 0; |
|---|
| 160 | |
|---|
| 161 | $category = $this->check_post_data ( $data, 'category', $this->forum_db, '' ); |
|---|
| 162 | $description = $this->check_post_data ( $data, 'description', $this->forum_db, '' ); |
|---|
| 163 | $commentary = $this->check_post_data ( $data, 'commentary', $this->forum_db, '' ); |
|---|
| 164 | |
|---|
| 165 | if ( ! $this->check_access_rights ( array ( 5, 11, 7, 9 ) ) ) return $code . "Diese Funktion dürfen nur LoL-Teamler benutzen!"; |
|---|
| 166 | |
|---|
| 167 | $code .= "<table><tr><td align=\"center\">[ <a href=\"portal.php?mod=lol_control&modus=gallery&gm=cat\">Kategorien Management</a> ] [ <a href=\"portal.php?mod=lol_control&modus=gallery&gm=user_blist\">Benutzer Sperren</a> ]</td></tr></table>"; |
|---|
| 168 | if ( ! $gm && ! $na ) $code .= "<br><center>Willkommen im Gallery Admin Panel, bitte Wähle ein Untermenü!</center>"; |
|---|
| 169 | |
|---|
| 170 | if ( $gm == 'cat' ) { |
|---|
| 171 | if ( $na == 'ca' ) { |
|---|
| 172 | if ( empty ( $c ) ) $this->do_exit ( "<font color=\"red\">Fehler</font>" ); |
|---|
| 173 | |
|---|
| 174 | $get_cur_status_sql = "SELECT `active`,`id`,`sub_of`,`name` FROM `lol_gallery_categories` WHERE `id` = {$c}"; |
|---|
| 175 | $get_cur_status = $this->fetch_row ( $this->query ( $get_cur_status_sql, $this->forum_db ) ); |
|---|
| 176 | |
|---|
| 177 | if ( $get_cur_status [0] == 0 ) { |
|---|
| 178 | $status_change_sql = "UPDATE `lol_gallery_categories` SET `active` = 1 WHERE `id` = {$c}"; |
|---|
| 179 | $gcs_query = $this->query ( $status_change_sql, $this->forum_db ); |
|---|
| 180 | |
|---|
| 181 | if ( $get_cur_status [2] > 0 ) $this->do_exit ( "<font color=\"green\">- {$get_cur_status[1]}:{$get_cur_status[3]}</font>" ); |
|---|
| 182 | else $this->do_exit ( "<font color=\"green\" weight=\"bold\">{$get_cur_status[1]}:{$get_cur_status[3]}</font>" ); |
|---|
| 183 | } |
|---|
| 184 | else { |
|---|
| 185 | $status_change_sql = "UPDATE `lol_gallery_categories` SET `active` = 0 WHERE `id` = {$c}"; |
|---|
| 186 | $gcs_query = $this->query ( $status_change_sql, $this->forum_db ); |
|---|
| 187 | |
|---|
| 188 | if ( $get_cur_status [2] > 0 ) $this->do_exit ( "<font color=\"red\">- {$get_cur_status[1]}:{$get_cur_status[3]}</font>" ); |
|---|
| 189 | else $this->do_exit ( "<font color=\"red\" weight=\"bold\">{$get_cur_status[1]}:{$get_cur_status[3]}</font>" ); |
|---|
| 190 | } |
|---|
| 191 | } |
|---|
| 192 | |
|---|
| 193 | if ( $na == 'edit' ) { |
|---|
| 194 | if ( ! empty ( $category ) ) { |
|---|
| 195 | $sub = request_var ( 'sub', NULL ); |
|---|
| 196 | |
|---|
| 197 | if ( ! empty ( $description ) ) $description = ", `description` = '{$description}'"; |
|---|
| 198 | $sql = "UPDATE `lol_gallery_categories` SET `name`= '{$category}', `sub_of`= {$sub}{$description} WHERE `id` = {$idd}"; |
|---|
| 199 | if ( $sub !== 'NULL' ) $sql = "UPDATE `lol_gallery_categories` SET `name`= '{$category}', `sub_of`= NULL, `description` = {$description} WHERE `id` = {$idd}"; |
|---|
| 200 | |
|---|
| 201 | $query = $this->query ( $sql, $this->forum_db ); |
|---|
| 202 | if ( ! $query ) $code .= "<br><font color=\"red\">Leider ist ein Fehler beim Bearbeiten der Kategorie Aufgetreten!</font>"; |
|---|
| 203 | } |
|---|
| 204 | } |
|---|
| 205 | |
|---|
| 206 | if ( $na == 'new' ) { |
|---|
| 207 | if ( ! empty ( $category ) ) { |
|---|
| 208 | $sub = request_var ( 'sub', '' ); |
|---|
| 209 | |
|---|
| 210 | if ( ! $description ) $description = "NULL"; |
|---|
| 211 | else $description = "'{$description}'"; |
|---|
| 212 | |
|---|
| 213 | $sql = "INSERT INTO `lol_gallery_categories` VALUES ('', '{$sub}', '{$category}', {$description}, '1')"; |
|---|
| 214 | if ( empty ( $sub ) ) $sql = "INSERT INTO `lol_gallery_categories` VALUES ('', NULL, '{$category}', {$description}, '1')"; |
|---|
| 215 | $query = $this->query ( $sql, $this->forum_db ); |
|---|
| 216 | if ( ! $query ) $code .= "<br><font color=\"red\">Leider ist ein Fehler beim Eintragen der Kategorie Aufgetreten!</font>"; |
|---|
| 217 | } |
|---|
| 218 | } |
|---|
| 219 | |
|---|
| 220 | if ( $na == 'del' ) { |
|---|
| 221 | |
|---|
| 222 | $sql = "SELECT `id`,`name`,`ext` FROM `lol_gallery_main` WHERE `category` = {$idd}"; |
|---|
| 223 | $query = $this->query ( $sql, $this->forum_db ); |
|---|
| 224 | |
|---|
| 225 | while ( $data = $this->fetch_row ( $query ) ) { |
|---|
| 226 | |
|---|
| 227 | $sqll [ ] = "DELETE FROM `lol_gallery_main` WHERE `id` = {$data[0]}"; |
|---|
| 228 | $sqll [ ] = "DELETE FROM `lol_gallery_ratings` WHERE `id` = {$data[0]}"; |
|---|
| 229 | $sqll [ ] = "DELETE FROM `lol_gallery_comments` WHERE `from` = {$data[0]}"; |
|---|
| 230 | |
|---|
| 231 | foreach ( $sqll as $querys ) |
|---|
| 232 | $na_del = $this->query ( $querys, $this->forum_db ); |
|---|
| 233 | |
|---|
| 234 | $unlink [ ] = "{$this->gallery_upload_dir}/norm/{$data[1]}.{$data[2]}"; |
|---|
| 235 | $unlink [ ] = "{$this->gallery_upload_dir}/full/{$data[1]}.{$data[2]}"; |
|---|
| 236 | $unlink [ ] = "{$this->gallery_upload_dir}/thumb/{$data[1]}.{$data[2]}"; |
|---|
| 237 | |
|---|
| 238 | foreach ( $unlink as $dele ) |
|---|
| 239 | @unlink ( $dele ); |
|---|
| 240 | } |
|---|
| 241 | |
|---|
| 242 | if ( $cs == 0 ) $sql2 = "DELETE FROM `lol_gallery_categories` WHERE `id` = {$idd} OR `sub_of` = {$idd}"; |
|---|
| 243 | else $sql2 = "DELETE FROM `lol_gallery_categories` WHERE `id` = {$idd} AND `sub_of` = {$cs}"; |
|---|
| 244 | |
|---|
| 245 | $query2 = $this->query ( $sql2, $this->forum_db ); |
|---|
| 246 | if ( ! $query2 ) $code .= "<br><font color=\"red\">Leider ist ein Fehler beim Löschen der Kategorie oder Subkategorie Aufgetreten!</font>"; |
|---|
| 247 | } |
|---|
| 248 | |
|---|
| 249 | $code .= "<br><table><tr><td colspan=\"3\">Aktivieren oder Deaktivieren einer Kategorie<br>mit einem Klick auf die Kategorie selber! (AJAX ^^)</td></tr><tr><td colspan=\"3\">Vorhandene Kategorien:</td></tr>"; |
|---|
| 250 | |
|---|
| 251 | $get_select = "SELECT * FROM `lol_gallery_categories` WHERE `sub_of` IS NULL OR `sub_of` = '0' ORDER BY `name`"; |
|---|
| 252 | $select_get = $this->query ( $get_select, $this->forum_db ); |
|---|
| 253 | if ( ! $select_get ) continue; |
|---|
| 254 | |
|---|
| 255 | $select_code = ""; |
|---|
| 256 | $color = ""; |
|---|
| 257 | |
|---|
| 258 | while ( $adr = $this->fetch_row ( $select_get ) ) { |
|---|
| 259 | if ( $adr [4] == 1 ) $color = "color: green"; |
|---|
| 260 | else $color = "color: red"; |
|---|
| 261 | |
|---|
| 262 | $select_code .= "<tr><td><span id=\"{$adr[0]}\" style=\"font-weight:bold; font-size:115%; {$color}\" onclick=\"get_content({$adr[0]},'portal.php?mod=lol_control&modus=gallery&gm=cat&na=ca&c={$adr[0]}', 'get')\">{$adr[0]}:{$adr[2]}</span></td><td><a href=\"#\" onclick=\"javascript:document.getElementById('gallery_category').value='{$adr[2]}';javascript:document.getElementById('gallery_category_submit').value='Bearbeiten';javascript:document.getElementById('gallery_category_form').action='portal.php?mod=lol_control&modus=gallery&gm=cat&na=edit&idd={$adr[0]}';\"><img src=\"http://www.landoflegends.de/images/icon_post_edit.gif.png\" /></a></td><td><a href=\"portal.php?mod=lol_control&modus=gallery&gm=cat&na=del&idd={$adr[0]}\"><img src=\"http://www.landoflegends.de/images/icon_post_delete.gif\" /></a></td></tr>"; |
|---|
| 263 | |
|---|
| 264 | $check_sub = "SELECT * FROM `lol_gallery_categories` WHERE `sub_of` = {$adr[0]} ORDER BY `name`"; |
|---|
| 265 | $get_sub_of = $this->query ( $check_sub, $this->forum_db ); |
|---|
| 266 | |
|---|
| 267 | if ( ! $get_sub_of ) continue; |
|---|
| 268 | else { |
|---|
| 269 | while ( $is_sub = $this->fetch_row ( $get_sub_of ) ) { |
|---|
| 270 | |
|---|
| 271 | $check_sub2 = "SELECT * FROM `lol_gallery_categories` WHERE `sub_of` = {$is_sub[0]} ORDER BY `name`"; |
|---|
| 272 | $get_sub_of2 = $this->query ( $check_sub2, $this->forum_db ); |
|---|
| 273 | |
|---|
| 274 | $get_sub_of2_static = $this->num_rows ( $get_sub_of2 ); |
|---|
| 275 | |
|---|
| 276 | if ( $is_sub [4] == 1 ) $color = "color: green"; |
|---|
| 277 | else $color = "color: red"; |
|---|
| 278 | |
|---|
| 279 | if ( $get_sub_of2_static > 0 ) { |
|---|
| 280 | $style = " style=\"font-weight:bold; {$color}\""; |
|---|
| 281 | $select_code .= "<tr><td><span id=\"{$is_sub[0]}\"{$style} onclick=\"get_content({$is_sub[0]},'portal.php?mod=lol_control&modus=gallery&gm=cat&na=ca&c={$is_sub[0]}', 'get')\">- {$is_sub[0]}:{$is_sub[2]}</span></td><td><a href=\"#\" onclick=\"javascript:document.getElementById('gallery_category').value='{$is_sub[2]}';javascript:document.getElementById('gallery_category_submit').value='Bearbeiten';javascript:document.getElementById('gallery_category_sub').value='{$is_sub[1]}';javascript:document.getElementById('gallery_category_form').action='portal.php?mod=lol_control&modus=gallery&gm=cat&na=edit&idd={$adr[0]}';\"><img src=\"http://www.landoflegends.de/images/icon_post_edit.gif.png\" /></a></td><td><a href=\"portal.php?mod=lol_control&modus=gallery&gm=cat&na=del&idd={$is_sub[0]}&cs={$is_sub[1]}\"><img src=\"http://www.landoflegends.de/images/icon_post_delete.gif\" /></a></td></tr>"; |
|---|
| 282 | } |
|---|
| 283 | else |
|---|
| 284 | $select_code .= "<tr><td><span id=\"{$is_sub[0]}\" style=\"{$color}\" onclick=\"get_content({$is_sub[0]},'portal.php?mod=lol_control&modus=gallery&gm=cat&na=ca&c={$is_sub[0]}', 'get')\">- {$is_sub[0]}</a>:{$is_sub[2]}</td><td><a href=\"#\" onclick=\"javascript:document.getElementById('gallery_category').value='{$is_sub[2]}';javascript:document.getElementById('gallery_category_submit').value='Bearbeiten';javascript:document.getElementById('gallery_category_sub').value='{$is_sub[1]}';javascript:document.getElementById('gallery_category_form').action='portal.php?mod=lol_control&modus=gallery&gm=cat&na=edit&idd={$adr[0]}';\"><img src=\"http://www.landoflegends.de/images/icon_post_edit.gif.png\" /></a></td><td><a href=\"portal.php?mod=lol_control&modus=gallery&gm=cat&na=del&idd={$is_sub[0]}&cs={$is_sub[1]}\"><img src=\"http://www.landoflegends.de/images/icon_post_delete.gif\" /></a></td></tr>"; |
|---|
| 285 | |
|---|
| 286 | if ( ! $get_sub_of2 ) continue; |
|---|
| 287 | else { |
|---|
| 288 | while ( $is_sub2 = $this->fetch_row ( $get_sub_of2 ) ) { |
|---|
| 289 | if ( $is_sub2 [4] == 1 ) $color = "color: green"; |
|---|
| 290 | else $color = "color: red"; |
|---|
| 291 | $select_code .= "<tr><td> <span id=\"{$is_sub2[0]}\" style=\"{$color}\" onclick=\"get_content({$is_sub2[0]},'portal.php?mod=lol_control&modus=gallery&gm=cat&na=ca&c={$is_sub2[0]}', 'get')\">- {$is_sub2[0]}:{$is_sub2[2]}</span></td><td><a href=\"#\" onclick=\"javascript:document.getElementById('gallery_category').value='{$is_sub2[2]}';javascript:document.getElementById('gallery_category_submit').value='Bearbeiten';javascript:document.getElementById('gallery_category_sub').value='{$is_sub2[1]}';javascript:document.getElementById('gallery_category_form').action='portal.php?mod=lol_control&modus=gallery&gm=cat&na=edit&idd={$adr[0]}';\"><img src=\"http://www.landoflegends.de/images/icon_post_edit.gif.png\" /></a></td><td><a href=\"portal.php?mod=lol_control&modus=gallery&gm=cat&na=del&idd={$is_sub2[0]}&cs={$is_sub2[1]}\"><img src=\"http://www.landoflegends.de/images/icon_post_delete.gif\" /></a></td></tr>"; |
|---|
| 292 | |
|---|
| 293 | } |
|---|
| 294 | } |
|---|
| 295 | } |
|---|
| 296 | } |
|---|
| 297 | |
|---|
| 298 | } |
|---|
| 299 | |
|---|
| 300 | $code .= "{$select_code}<tr><td align=\"center\" colspan=\"3\"><form id=\"gallery_category_form\" action=\"portal.php?mod=lol_control&modus=gallery&gm=cat&na=new\" enctype=\"multipart/form-data\" method=\"post\"><table><tr><td>Name:</td><td><input type=\"text\" name=\"category\" id=\"gallery_category\" autocomplete=\"off\" /></td></tr><tr><td>Sub Von:</td><td><input type=\"text\" id=\"gallery_category_sub\" name=\"sub\" autocomplete=\"off\" /></td><tr><td>Beschreibung:</td><td><input type=\"text\" id=\"gallery_category_desc\" name=\"description\" autocomplete=\"off\" /></td></tr><tr><td align=\"center\" colspan=\"2\"><input type=\"submit\" id=\"gallery_category_submit\" name=\"submit\" value=\"Erstellen\" /> <input type=\"button\" id=\"gallery_category_form_reset\" name=\"gallery_category_form_reset\" onclick=\"javascript:document.getElementById('gallery_category').value='';javascript:document.getElementById('gallery_category_submit').value='Erstellen';javascript:document.getElementById('gallery_category_sub').value='';javascript:document.getElementById('gallery_category_form').action='portal.php?mod=gallery&modus=adm&gm=cat&na=new';\" value=\"Eingaben Reset\" /></td></tr></table></form></td></tr></table>"; |
|---|
| 301 | |
|---|
| 302 | return $code; |
|---|
| 303 | } |
|---|
| 304 | |
|---|
| 305 | if ( $gm == 'user_blist' ) { |
|---|
| 306 | |
|---|
| 307 | if ( $na == 'add' ) { |
|---|
| 308 | if ( ! empty ( $commentary ) ) { |
|---|
| 309 | $tt_name = strtolower ( $commentary ); |
|---|
| 310 | $sql = "INSERT INTO `lol_gallery_blacklist` VALUES ('', '{$tt_name}')"; |
|---|
| 311 | $query = $this->query ( $sql, $this->forum_db ); |
|---|
| 312 | if ( ! $query ) return $code . "<br>Fehler beim Speichern des Benutzers"; |
|---|
| 313 | |
|---|
| 314 | } |
|---|
| 315 | else |
|---|
| 316 | return $code . "<br>Kein Benutzer Angegeben!"; |
|---|
| 317 | |
|---|
| 318 | return $code . "<br>Benutzer erfolgreich in die Blacklist eingetragen"; |
|---|
| 319 | } |
|---|
| 320 | |
|---|
| 321 | if ( $na == 'del' ) { |
|---|
| 322 | if ( ! empty ( $commentary ) ) { |
|---|
| 323 | $tt_name = strtolower ( $commentary ); |
|---|
| 324 | $sql = "DELETE FROM `lol_gallery_blacklist` WHERE `name` = '{$tt_name}'"; |
|---|
| 325 | $query = $this->query ( $sql, $this->forum_db ); |
|---|
| 326 | if ( ! $query ) return $code . "<br>Fehler beim Löschen des Benutzers"; |
|---|
| 327 | |
|---|
| 328 | } |
|---|
| 329 | else |
|---|
| 330 | return $code . "<br>Kein Benutzer Angegeben!"; |
|---|
| 331 | |
|---|
| 332 | return $code . "<br>Benutzer erfolgreich aus der Blacklist entfernt"; |
|---|
| 333 | } |
|---|
| 334 | |
|---|
| 335 | $names = ''; |
|---|
| 336 | |
|---|
| 337 | $sql = "SELECT `name` FROM `lol_gallery_blacklist`"; |
|---|
| 338 | $get_names_query = $this->query ( $sql, $this->forum_db ); |
|---|
| 339 | while ( $nam = $this->fetch_row ( $get_names_query ) ) |
|---|
| 340 | $names .= " " . $nam [0] . ","; |
|---|
| 341 | |
|---|
| 342 | $code .= "<br><table><tr><td align=\"center\">{$names}<br></td></tr><tr><tr><td align=\"center\">Benutzereingabe</td></tr><tr><td align=\"center\"><form id=\"gallery_blacklist_form\" action=\"portal.php?mod=lol_control&modus=gallery&gm=user_blist&na=add\" enctype=\"multipart/form-data\" method=\"post\"><input type=\"text\" name=\"commentary\" autocomplete=\"off\" /><br><input type=\"button\" onclick=\"javascript:document.getElementById('gallery_blacklist_form').action='portal.php?mod=lol_control&modus=gallery&gm=user_blist&na=add';javascript:document.getElementById('gallery_blacklist_submit').type='submit';\" name=\"add\" value=\"Einfügen\" /> <input type=\"button\" onclick=\"javascript:document.getElementById('gallery_blacklist_form').action='portal.php?mod=lol_control&modus=gallery&gm=user_blist&na=del';javascript:document.getElementById('gallery_blacklist_submit').type='submit';\" name=\"del\" value=\"Löschen\" /><br><input type=\"hidden\" id=\"gallery_blacklist_submit\" name=\"submit\" value=\"Ausführen\" /></from></td></tr></table>"; |
|---|
| 343 | |
|---|
| 344 | return $code; |
|---|
| 345 | } |
|---|
| 346 | |
|---|
| 347 | return $code; |
|---|
| 348 | } |
|---|
| 349 | |
|---|
| 350 | private function server_announcer ( $data ) |
|---|
| 351 | { |
|---|
| 352 | global $user, $code; |
|---|
| 353 | |
|---|
| 354 | if ( ! $this->check_access_rights ( array ( 11, 5, 7 ) ) ) return $code . "Leider steht dir diese Funktion nicht zu Verfügung!"; |
|---|
| 355 | |
|---|
| 356 | $a_submit = $this->check_post_data ( $data, 'a_submit' ); |
|---|
| 357 | $a_type = $this->check_post_data ( $data, 'a_type', $this->forum_db, '' ); |
|---|
| 358 | $a_message = $this->check_post_data ( $data, 'a_message', $this->forum_db, '' ); |
|---|
| 359 | |
|---|
| 360 | if ( $a_submit ) { |
|---|
| 361 | if ( empty ( $a_message ) ) $this->do_exit ( 'Leider hast du keinen Text eingegeben' ); |
|---|
| 362 | if ( empty ( $a_type ) ) $this->do_exit ( 'Der Typ deiner Nachricht wurde nicht Übergeben' ); |
|---|
| 363 | |
|---|
| 364 | if ( $this->realm_online [0] ) { |
|---|
| 365 | try { |
|---|
| 366 | exec ( "/home/forum/soap.php '192.168.10.1' '7878' 'gmsoap' 'soapuserpassword' '{$a_type} {$a_message}'" ); |
|---|
| 367 | } |
|---|
| 368 | catch ( Exception $e ) { |
|---|
| 369 | echo $e->getMessage ( ); |
|---|
| 370 | } |
|---|
| 371 | } |
|---|
| 372 | else |
|---|
| 373 | $this->do_exit ( "Der Server ist offline, deshalb kannst du keine Nachricht Versenden!" ); |
|---|
| 374 | |
|---|
| 375 | $this->do_exit ( "Deine Nachricht: <i>{$a_message}</i> ...wurde gesendet!" ); |
|---|
| 376 | } |
|---|
| 377 | |
|---|
| 378 | $code .= "<form id=\"announcer\" onsubmit=\"ajaxUpload(this,'portal.php?mod=lol_control&modus=server_announcer','a_status','<center>Deine Nachricht wird gesendet...</center>','<center>JavaScript: Fehler?</center>'); return false;\"> |
|---|
| 379 | <table> |
|---|
| 380 | <tr><td>Type:</td><td><select name=\"a_type\"><option value=\"announce\" onmouseover=\"Tip('Zeigt den Text im Chatfenster an')\" onmouseout=\"UnTip()\" SELECTED> Announce </option><option value=\"notify\" onmouseover=\"Tip('Zeigt den Text in der Bildschirmmitte an')\" onmouseout=\"UnTip()\"> Notify </option></select></td></tr> |
|---|
| 381 | <tr><td>Text:</td><td><input type=\"text\" name=\"a_message\" size=\"50\" maxlength=\"255\" autocomplete=\"off\" /></td></tr> |
|---|
| 382 | <tr><td colspan=\"2\" align=\"right\"><input type=\"submit\" name=\"a_sub\" value=\"Senden\" /><input type=\"hidden\" name=\"a_submit\" value=\"true\" /></td></tr> |
|---|
| 383 | </table></form><div id=\"a_status\"></div>"; |
|---|
| 384 | |
|---|
| 385 | return $code; |
|---|
| 386 | } |
|---|
| 387 | |
|---|
| 388 | private function gm_rating_detail_main ( $data ) |
|---|
| 389 | { |
|---|
| 390 | global $code, $user; |
|---|
| 391 | |
|---|
| 392 | foreach ( $data as $key => $t_data ) |
|---|
| 393 | $data [$key] = $this->quote_smart ( $t_data, $this->forum_db ); |
|---|
| 394 | |
|---|
| 395 | if ( $this->check_access_rights ( array ( 5, 24 ) ) ) $isadmin = 1; |
|---|
| 396 | else $isadmin = 0; |
|---|
| 397 | |
|---|
| 398 | $code .= "<center>"; |
|---|
| 399 | |
|---|
| 400 | switch ( $_GET ['show'] ) |
|---|
| 401 | { |
|---|
| 402 | case 'rating_banned': |
|---|
| 403 | if ( $isadmin == 1 ) $code .= $this->gm_rating_admin ( $data, $isadmin ); |
|---|
| 404 | else $code .= "<br />Leider steht dir diese Funktion nicht zu Verfügung!"; |
|---|
| 405 | break; |
|---|
| 406 | default: |
|---|
| 407 | $code .= $this->gm_rating_detail ( $data, $isadmin ); |
|---|
| 408 | break; |
|---|
| 409 | } |
|---|
| 410 | |
|---|
| 411 | $code .= "</center>"; |
|---|
| 412 | |
|---|
| 413 | return $code; |
|---|
| 414 | } |
|---|
| 415 | |
|---|
| 416 | private function gm_rating_admin ( $data, $isadmin ) |
|---|
| 417 | { |
|---|
| 418 | global $user; |
|---|
| 419 | |
|---|
| 420 | $code = "Willkommen im Verwaltungsbereich der GM-Bewertung!<br />[ <a href='?mod=lol_control&modus=gm_rating'>Zurück zur GM-Bewertungsübersicht</a> ] [ <a href='?mod=lol_control&modus=gm_rating&show=rating_banned&adminmod=banuser'>Benutzer Sperren</a> ] [ <a href='?mod=lol_control&modus=gm_rating&show=rating_banned'>Sperrliste</a> ]<br /><br />"; // Links |
|---|
| 421 | switch ( $_GET ['adminmod'] ) |
|---|
| 422 | { |
|---|
| 423 | case 'banuser': |
|---|
| 424 | if ( isset ( $_GET ['submit'] ) ) { |
|---|
| 425 | if ( ! empty ( $data ['userhash'] ) && ! empty ( $data ['reason'] ) ) { |
|---|
| 426 | $status = ""; |
|---|
| 427 | $check_exist_bans_sql = "SELECT * FROM `lol_gm_rating_ban` WHERE `user_hash`='{$data ['userhash']}' LIMIT 1"; |
|---|
| 428 | $check_exist_bans_query = $this->query ( $check_exist_bans_sql, $this->forum_db ); |
|---|
| 429 | $check_exist_bans_num = $this->num_rows ( $check_exist_bans_query ); |
|---|
| 430 | if ( $check_exist_bans_num < 1 ) { |
|---|
| 431 | $do_ban_rating_sql = "INSERT INTO `lol_gm_rating_ban` SET `user_hash`='{$data ['userhash']}', `reason`='{$data ['reason']}', `bannedby`='{$user->data ['user_id']}'"; |
|---|
| 432 | $do_ban_rating_query = $this->query ( $do_ban_rating_sql, $this->forum_db ); |
|---|
| 433 | $do_ban_rating_affect = $this->affected_rows ( $this->forum_db ); |
|---|
| 434 | if ( $do_ban_rating_affect ) $status = "<font color='#00FF00'>Der Benutzer wurde erfolgreich gesperrt.</font>"; |
|---|
| 435 | else $status = "<font color='#FF0000'>Datenbankfehler, der Benutzer konnte nicht gesperrt werden!</font>"; |
|---|
| 436 | } |
|---|
| 437 | else |
|---|
| 438 | $status = "<font color='#FF0000'>Hinweis: Der Benutzer ist bereits gesperrt!</font>"; |
|---|
| 439 | } |
|---|
| 440 | else |
|---|
| 441 | $status = "<font color='#FF0000'>Fehler: Es wurden nicht alle Felder ausgefüllt!</font>"; |
|---|
| 442 | $status .= "<br />"; |
|---|
| 443 | } |
|---|
| 444 | $code .= "{$status}<form action='?mod=lol_control&modus=gm_rating&show=rating_banned&adminmod=banuser&submit=true&userhash={$_GET ['userhash']}' method='POST'><table><tr><th COLSPAN='2'>Benutzer Sperren</th></tr><tr><td>Benutzerhash:<br /><input type='text' name='userhash' value='{$_GET ['userhash']}'></td><td>Grund angeben:<br /><input type='text' name='reason'></td></tr><tr><td COLSPAN='2' align='center'><input type='submit' value='Benutzer Sperren'> <input type='submit' value='Zurück' onclick=\"javascript: form.action='javascript:history.back()';\"></td></tr>"; |
|---|
| 445 | $code .= "</table></form>"; |
|---|
| 446 | break; |
|---|
| 447 | case 'rmvote': |
|---|
| 448 | if ( isset ( $_GET ['voteid'] ) || ! empty ( $data ['voteid'] ) ) { |
|---|
| 449 | $get_voteid = $this->quote_smart ( $_GET ['voteid'], $this->forum_db ); |
|---|
| 450 | $bewertungsdetails_sql = "SELECT * FROM `lol_gm_rating_user` WHERE `entry`='{$get_voteid}' LIMIT 1"; |
|---|
| 451 | $bewertungsdetails_query = $this->query ( $bewertungsdetails_sql, $this->forum_db ); |
|---|
| 452 | $bewertungsdetails_num = $this->num_rows ( $bewertungsdetails_query ); |
|---|
| 453 | $bewertungsdetails_row = $this->fetch_row ( $bewertungsdetails_query ); |
|---|
| 454 | if ( isset ( $_GET ['submit'] ) && ! empty ( $data ['voteid'] ) ) { |
|---|
| 455 | if ( $bewertungsdetails_row [8] == 1 && $bewertungsdetails_num > 0 && ! empty ( $data ['reason'] ) ) { |
|---|
| 456 | $remove_vote_sql = "UPDATE `lol_gm_rating_user` SET `active`='0', `remove_reason`='{$data ['reason']}', `remove_user`='{$user->data ['user_id']}' WHERE `entry`='{$data ['voteid']}'"; |
|---|
| 457 | $remove_vote_query = $this->query ( $remove_vote_sql, $this->forum_db ); |
|---|
| 458 | $remove_vote_affect = $this->affected_rows ( $this->forum_db ); |
|---|
| 459 | if ( $remove_vote_affect ) { |
|---|
| 460 | // Durchschnitt neu berechnen |
|---|
| 461 | $rating_gm_sql = "SELECT `rating`, `active` FROM `lol_gm_rating_user` WHERE `gm_uid`='{$bewertungsdetails_row [3]}' AND `active`='1'"; |
|---|
| 462 | $rating_gm_query = $this->query ( $rating_gm_sql, $this->forum_db ); |
|---|
| 463 | $rating_gm_num = $this->num_rows ( $rating_gm_query ); |
|---|
| 464 | $total = 0; |
|---|
| 465 | if ( $rating_gm_num > 0 ) { |
|---|
| 466 | while ( $rating_gm_row = $this->fetch_row ( $rating_gm_query ) ) |
|---|
| 467 | $total = $total + $rating_gm_row [0]; |
|---|
| 468 | $votes = $rating_gm_num; |
|---|
| 469 | $average = $total / $votes; |
|---|
| 470 | } |
|---|
| 471 | else { |
|---|
| 472 | $average = 0; |
|---|
| 473 | $votes = 0; |
|---|
| 474 | } |
|---|
| 475 | $update_average_sql = "UPDATE `lol_gm_rating` SET `rating_total`='{$average}', `votes`='{$votes}' WHERE `user_id`='{$bewertungsdetails_row [3]}'"; |
|---|
| 476 | $update_average_query = $this->query ( $update_average_sql, $this->forum_db ); |
|---|
| 477 | $update_average_affect = $this->affected_rows ( $this->forum_db ); |
|---|
| 478 | if ( $update_average_affect ) $status = "<font color='#00FF00'>Der Beitrag wurde erfolgreich aus der Wertung genommen.</font>"; |
|---|
| 479 | else $status = "<font color='#FFFF00'>Hinweis: Der Durchschnitt konnte nicht neu berechnet werden!</font>"; |
|---|
| 480 | } |
|---|
| 481 | else |
|---|
| 482 | $status = "<font color='#FF0000'>Datenbankfehler, der Beitrag konnte nicht aus der Wertung genommen werden!</font>"; |
|---|
| 483 | } |
|---|
| 484 | else |
|---|
| 485 | $status = "<font color='#FF0000'>Diese Bewertung wurde bereits aus der Wertung genommen oder es wurden nicht alle Felder ausgefüllt!</font>"; |
|---|
| 486 | $status .= "<br />"; |
|---|
| 487 | } |
|---|
| 488 | |
|---|
| 489 | $code .= "{$status}<form action='?mod=lol_control&modus=gm_rating&show=rating_banned&adminmod=rmvote&submit=true&voteid={$_GET ['voteid']}' method='POST'><table><tr><th COLSPAN='2'>Bewertung ungültig machen</th></tr><tr><td>Beitragsid:</td><td>{$_GET ['voteid']}</td></tr>"; |
|---|
| 490 | if ( $bewertungsdetails_num > 0 && $bewertungsdetails_row [8] == 1 ) { // Prüfen |
|---|
| 491 | // ob |
|---|
| 492 | // beitrag |
|---|
| 493 | // existiert |
|---|
| 494 | // und |
|---|
| 495 | // nicht |
|---|
| 496 | // bereits |
|---|
| 497 | // aus |
|---|
| 498 | // der |
|---|
| 499 | // wertung |
|---|
| 500 | // genommen |
|---|
| 501 | // wurde |
|---|
| 502 | $gm_user_info_sql = "SELECT `user_id`, `username`, `user_colour` FROM `phpbb_users` WHERE `user_id`='{$bewertungsdetails_row [3]}' LIMIT 1"; |
|---|
| 503 | $gm_user_info_query = $this->query ( $gm_user_info_sql, $this->forum_db ); |
|---|
| 504 | $gm_user_info_row = $this->fetch_row ( $gm_user_info_query ); |
|---|
| 505 | $user_info_sql = "SELECT `user_id`, `username`, `user_colour` FROM `phpbb_users` WHERE `user_id`='{$bewertungsdetails_row [7]}' LIMIT 1"; |
|---|
| 506 | $user_info_query = $this->query ( $user_info_sql, $this->forum_db ); |
|---|
| 507 | $user_info_row = $this->fetch_row ( $user_info_query ); |
|---|
| 508 | $user_ban_info_sql = "SELECT * FROM `lol_gm_rating_ban` WHERE `user_hash`='{$bewertungsdetails_row [1]}' LIMIT 1"; |
|---|
| 509 | $user_ban_info_query = $this->query ( $user_ban_info_sql, $this->forum_db ); |
|---|
| 510 | $user_ban_info_num = $this->num_rows ( $user_ban_info_query ); |
|---|
| 511 | |
|---|
| 512 | $vote_user_name = "<a href='/memberlist.php?mode=viewprofile&u={$bewertungsdetails_row [7]}' style='color:#{$user_info_row [2]}' target='_blank'><b>{$user_info_row [1]}</b></a>"; |
|---|
| 513 | |
|---|
| 514 | if ( $user_ban_info_num > 0 ) { |
|---|
| 515 | $user_zusatz = '<font color="#FF0000"><s>'; |
|---|
| 516 | $user_zusatz_end = '</s></font><font size="0.5"> (Gesperrt)</font>'; |
|---|
| 517 | $user_ban_link = " <a href='?mod=lol_control&modus=gm_rating&show=rating_banned&adminmod=unbanuser&userhash={$bewertungsdetails_row [1]}' target='_blank'><img src='/images/unban_user.png' title='Benutzer Entsperren'></a>"; |
|---|
| 518 | } |
|---|
| 519 | else { |
|---|
| 520 | $user_zusatz = ''; |
|---|
| 521 | $user_zusatz_end = ''; |
|---|
| 522 | $user_ban_link = " <a href='?mod=lol_control&modus=gm_rating&show=rating_banned&adminmod=banuser&userhash={$bewertungsdetails_row [1]}' target='_blank'><img src='/images/ban_user.png' title='Benutzer Sperren'></a>"; |
|---|
| 523 | } |
|---|
| 524 | |
|---|
| 525 | $code .= "<tr><td>Autor:</td><td>{$user_zusatz}{$vote_user_name}{$user_zusatz_end}{$user_ban_link}</td></tr><tr><td>Bewertung für:</td><td><a href='/memberlist.php?mode=viewprofile&u={$bewertungsdetails_row [3]}' style='color:#{$gm_user_info_row [2]}' target='_blank'><b>{$gm_user_info_row [1]}</b></a></td></tr><tr><td>Note:</td><td><b>{$bewertungsdetails_row [4]}</b></td></tr><tr><td COLSPAN='2' align='center'>Kommentar:</td></tr><tr><td COLSPAN='2' align='center'>{$bewertungsdetails_row [5]}</td></tr><tr><td COLSPAN='2' align='center'><hr />Grund angeben: <input type='text' name='reason'></td></tr><tr><td COLSPAN='2' align='center'><input type='hidden' name='voteid' value='{$_GET ['voteid']}'><input type='submit' value='Aus der Wertung nehmen'> <input type='submit' value='Zurück' onclick=\"javascript: form.action='javascript:history.back()';\"></td></tr>"; |
|---|
| 526 | } |
|---|
| 527 | else |
|---|
| 528 | $code .= "<tr><td COLSPAN='2' align='center'>Fehler: Diese Bewertung existiert nicht oder wurde bereits aus der Wertung genommen!</td></tr>"; |
|---|
| 529 | $code .= "</table></form>"; |
|---|
| 530 | } |
|---|
| 531 | else |
|---|
| 532 | $code .= "<font color='#FF0000'>Es wurde keine Bewertung ausgewählt, die aus der Wertung genommen werden soll!</font><br />"; |
|---|
| 533 | break; |
|---|
| 534 | case 'unbanuser': |
|---|
| 535 | if ( isset ( $_GET ['userhash'] ) || ! empty ( $data ['userhash'] ) ) { |
|---|
| 536 | $get_userhash = $this->quote_smart ( $_GET ['userhash'], $this->forum_db ); |
|---|
| 537 | $user_ban_sql = "SELECT * FROM `lol_gm_rating_ban` WHERE `user_hash`='{$get_userhash}' LIMIT 1"; |
|---|
| 538 | $user_ban_query = $this->query ( $user_ban_sql, $this->forum_db ); |
|---|
| 539 | $user_ban_num = $this->num_rows ( $user_ban_query ); |
|---|
| 540 | if ( $user_ban_num > 0 ) { |
|---|
| 541 | $user_ban_row = $this->fetch_row ( $user_ban_query ); |
|---|
| 542 | $bannedby_data_sql = "SELECT `user_id`, `username`, `user_colour` FROM `phpbb_users` WHERE `user_id`='{$user_ban_row [3]}' LIMIT 1"; |
|---|
| 543 | $bannedby_data_query = $this->query ( $bannedby_data_sql, $this->forum_db ); |
|---|
| 544 | $bannedby_data_row = $this->fetch_row ( $bannedby_data_query ); |
|---|
| 545 | } |
|---|
| 546 | |
|---|
| 547 | if ( isset ( $_GET ['submit'] ) && ! empty ( $data ['userhash'] ) ) { |
|---|
| 548 | |
|---|
| 549 | if ( $user_ban_num > 0 ) { |
|---|
| 550 | $del_ban_rating_sql = "DELETE FROM `lol_gm_rating_ban` WHERE `user_hash`='{$data ['userhash']}'"; |
|---|
| 551 | $del_ban_rating_query = $this->query ( $del_ban_rating_sql, $this->forum_db ); |
|---|
| 552 | $del_ban_rating_affect = $this->affected_rows ( $this->forum_db ); |
|---|
| 553 | if ( $del_ban_rating_affect ) $status = "<font color='#00FF00'>Der Benutzer wurde erfolgreich entsperrt!</font>"; |
|---|
| 554 | else $status = "<font color='#FF0000'>Datenbankfehler, der Benutzer konnte nicht entsperrt werden!</font>"; |
|---|
| 555 | } |
|---|
| 556 | else |
|---|
| 557 | $status = "<font color='#FF0000'>Hinweis: Der Benutzer ist nicht gesperrt bzw. wurde bereits entsperrt!</font>"; |
|---|
| 558 | $status .= "<br />"; |
|---|
| 559 | } |
|---|
| 560 | $code .= "{$status}<form action='?mod=lol_control&modus=gm_rating&show=rating_banned&adminmod=unbanuser&submit=true&userhash={$_GET ['userhash']}' method='POST'><table><tr><th COLSPAN='2'>Benutzer entsperren</th></tr>"; |
|---|
| 561 | if ( $user_ban_num > 0 ) $code .= "<tr><td>Gesperrter Benutzerhash:</td><td>{$_GET ['userhash']}</td></tr><tr><td>Grund für die Sperrung:</td><td>{$user_ban_row [2]}</td></tr><tr><td>Gesperrt von:</td><td><a href='/memberlist.php?mode=viewprofile&u={$bannedby_data_row [0]}' style='color:#{$bannedby_data_row [2]}' target='_blank'><b>{$bannedby_data_row [1]}</b></a></td></tr><tr><td COLSPAN='2' align='center'><input type='hidden' name='userhash' value='{$_GET ['userhash']}'>Möchtest du den Benutzer wirklich entsperren? Andernfalls verlasse diese Seite.<br /><input type='submit' value='Benutzer Entsperren'> <input type='submit' value='Zurück' onclick=\"javascript: form.action='javascript:history.back()';\"></td></tr>"; |
|---|
| 562 | else $code .= "<tr><td COLSPAN='2' align='center'>Hinweis:<br />Der Benutzerhash {$_GET ['userhash']} ist nicht (mehr) gesperrt!</td></tr>"; |
|---|
| 563 | $code .= "</table></form>"; |
|---|
| 564 | } |
|---|
| 565 | else |
|---|
| 566 | $code .= "<br /><br /><font color='#FF0000'>Fehler: Kein Benutzer zum entsperren gewählt!</font>"; |
|---|
| 567 | break; |
|---|
| 568 | case 'restorevote': |
|---|
| 569 | if ( isset ( $_GET ['voteid'] ) || ! empty ( $data ['voteid'] ) ) { |
|---|
| 570 | $get_voteid = $this->quote_smart ( $_GET ['voteid'], $this->forum_db ); |
|---|
| 571 | $bewertungsdetails_sql = "SELECT * FROM `lol_gm_rating_user` WHERE `entry`='{$get_voteid}' LIMIT 1"; |
|---|
| 572 | $bewertungsdetails_query = $this->query ( $bewertungsdetails_sql, $this->forum_db ); |
|---|
| 573 | $bewertungsdetails_num = $this->num_rows ( $bewertungsdetails_query ); |
|---|
| 574 | $bewertungsdetails_row = $this->fetch_row ( $bewertungsdetails_query ); |
|---|
| 575 | if ( isset ( $_GET ['submit'] ) && ! empty ( $data ['voteid'] ) ) { |
|---|
| 576 | if ( $bewertungsdetails_row [8] == 0 && $bewertungsdetails_num > 0 && ! empty ( $data ['reason'] ) ) { |
|---|
| 577 | $remove_vote_sql = "UPDATE `lol_gm_rating_user` SET `active`='1', `remove_reason`='Restore: {$data ['reason']}', `remove_user`='{$user->data ['user_id']}' WHERE `entry`='{$data ['voteid']}'"; |
|---|
| 578 | $remove_vote_query = $this->query ( $remove_vote_sql, $this->forum_db ); |
|---|
| 579 | $remove_vote_affect = $this->affected_rows ( $this->forum_db ); |
|---|
| 580 | if ( $remove_vote_affect ) { |
|---|
| 581 | // Durchschnitt neu berechnen |
|---|
| 582 | $rating_gm_sql = "SELECT `rating`, `active` FROM `lol_gm_rating_user` WHERE `gm_uid`='{$bewertungsdetails_row [3]}' AND `active`='1'"; |
|---|
| 583 | $rating_gm_query = $this->query ( $rating_gm_sql, $this->forum_db ); |
|---|
| 584 | $rating_gm_num = $this->num_rows ( $rating_gm_query ); |
|---|
| 585 | $total = 0; |
|---|
| 586 | if ( $rating_gm_num > 0 ) { |
|---|
| 587 | while ( $rating_gm_row = $this->fetch_row ( $rating_gm_query ) ) |
|---|
| 588 | $total = $total + $rating_gm_row [0]; |
|---|
| 589 | $votes = $rating_gm_num; |
|---|
| 590 | $average = $total / $votes; |
|---|
| 591 | } |
|---|
| 592 | else { |
|---|
| 593 | $average = 0; |
|---|
| 594 | $votes = 0; |
|---|
| 595 | } |
|---|
| 596 | $update_average_sql = "UPDATE `lol_gm_rating` SET `rating_total`='{$average}', `votes`='{$votes}' WHERE `user_id`='{$bewertungsdetails_row [3]}'"; |
|---|
| 597 | $update_average_query = $this->query ( $update_average_sql, $this->forum_db ); |
|---|
| 598 | $update_average_affect = $this->affected_rows ( $this->forum_db ); |
|---|
| 599 | if ( $update_average_affect ) $status = "<font color='#00FF00'>Der Beitrag wurde erfolgreich wieder in die Wertung aufgenommen.</font>"; |
|---|
| 600 | else $status = "<font color='#FFFF00'>Hinweis: Der Durchschnitt konnte nicht neu berechnet werden!</font>"; |
|---|
| 601 | } |
|---|
| 602 | else |
|---|
| 603 | $status = "<font color='#FF0000'>Datenbankfehler, der Beitrag konnte nicht wieder in die Wertung genommen werden!</font>"; |
|---|
| 604 | } |
|---|
| 605 | else |
|---|
| 606 | $status = "<font color='#FF0000'>Diese Bewertung ist noch/wieder in der Wertung oder es wurden nicht alle Felder ausgefüllt!</font>"; |
|---|
| 607 | $status .= "<br />"; |
|---|
| 608 | } |
|---|
| 609 | |
|---|
| 610 | $code .= "{$status}<form action='?mod=lol_control&modus=gm_rating&show=rating_banned&adminmod=restorevote&submit=true&voteid={$_GET ['voteid']}' method='POST'><table><tr><th COLSPAN='2'>Bewertung wieder aufnehmen</th></tr><tr><td>Beitragsid:</td><td>{$_GET ['voteid']}</td></tr>"; |
|---|
| 611 | if ( $bewertungsdetails_num > 0 && $bewertungsdetails_row [8] == 0 ) { // Prüfen |
|---|
| 612 | // ob |
|---|
| 613 | // beitrag |
|---|
| 614 | // existiert |
|---|
| 615 | // und |
|---|
| 616 | // bereits |
|---|
| 617 | // aus |
|---|
| 618 | // der |
|---|
| 619 | // wertung |
|---|
| 620 | // genommen |
|---|
| 621 | // wurde |
|---|
| 622 | $gm_user_info_sql = "SELECT `user_id`, `username`, `user_colour` FROM `phpbb_users` WHERE `user_id`='{$bewertungsdetails_row [3]}' LIMIT 1"; |
|---|
| 623 | $gm_user_info_query = $this->query ( $gm_user_info_sql, $this->forum_db ); |
|---|
| 624 | $gm_user_info_row = $this->fetch_row ( $gm_user_info_query ); |
|---|
| 625 | $user_info_sql = "SELECT `user_id`, `username`, `user_colour` FROM `phpbb_users` WHERE `user_id`='{$bewertungsdetails_row [7]}' LIMIT 1"; |
|---|
| 626 | $user_info_query = $this->query ( $user_info_sql, $this->forum_db ); |
|---|
| 627 | $user_info_row = $this->fetch_row ( $user_info_query ); |
|---|
| 628 | $user_ban_info_sql = "SELECT * FROM `lol_gm_rating_ban` WHERE `user_hash`='{$bewertungsdetails_row [1]}' LIMIT 1"; |
|---|
| 629 | $user_ban_info_query = $this->query ( $user_ban_info_sql, $this->forum_db ); |
|---|
| 630 | $user_ban_info_num = $this->num_rows ( $user_ban_info_query ); |
|---|
| 631 | |
|---|
| 632 | $vote_user_name = "<a href='/memberlist.php?mode=viewprofile&u={$bewertungsdetails_row [7]}' style='color:#{$user_info_row [2]}' target='_blank'><b>{$user_info_row [1]}</b></a>"; |
|---|
| 633 | |
|---|
| 634 | if ( $user_ban_info_num > 0 ) { |
|---|
| 635 | $user_zusatz = '<font color="#FF0000"><s>'; |
|---|
| 636 | $user_zusatz_end = '</s></font><font size="0.5"> (Gesperrt)</font>'; |
|---|
| 637 | $user_ban_link = " <a href='?mod=lol_control&modus=gm_rating&show=rating_banned&adminmod=unbanuser&userhash={$bewertungsdetails_row [1]}' target='_blank'><img src='/images/unban_user.png' title='Benutzer Entsperren'></a>"; |
|---|
| 638 | } |
|---|
| 639 | else { |
|---|
| 640 | $user_zusatz = ''; |
|---|
| 641 | $user_zusatz_end = ''; |
|---|
| 642 | $user_ban_link = " <a href='?mod=lol_control&modus=gm_rating&show=rating_banned&adminmod=banuser&userhash={$bewertungsdetails_row [1]}' target='_blank'><img src='/images/ban_user.png' title='Benutzer Sperren'></a>"; |
|---|
| 643 | } |
|---|
| 644 | |
|---|
| 645 | $bad_post_remove_user_sql = "SELECT `user_id`, `username`, `user_colour` FROM `phpbb_users` WHERE `user_id`='{$bewertungsdetails_row [10]}' LIMIT 1"; |
|---|
| 646 | $bad_post_remove_user_query = $this->query ( $bad_post_remove_user_sql, $this->forum_db ); |
|---|
| 647 | $bad_post_remove_user_row = $this->fetch_row ( $bad_post_remove_user_query ); |
|---|
| 648 | |
|---|
| 649 | $code .= "<tr><td>Autor:</td><td>{$user_zusatz}{$vote_user_name}{$user_zusatz_end}{$user_ban_link}</td></tr><tr><td>Bewertung für:</td><td><a href='/memberlist.php?mode=viewprofile&u={$bewertungsdetails_row [3]}' style='color:#{$gm_user_info_row [2]}' target='_blank'><b>{$gm_user_info_row [1]}</b></a></td></tr><tr><td>Note:</td><td><b>{$bewertungsdetails_row [4]}</b></td></tr><tr><td COLSPAN='2' align='center'>Kommentar:</td></tr><tr><td COLSPAN='2' align='center'><s><font color='#FF0000'>{$bewertungsdetails_row [5]}</font></s><br /><br /><font color='#FF0000'><b>Diese Bewertung wurde von <a href='/memberlist.php?mode=viewprofile&u={$bewertungsdetails_row [10]}' style='color:#{$bad_post_remove_user_row [2]}' target='_blank'>{$bad_post_remove_user_row [1]}</a> aus folgenen Grund aus der Wertung genommen: \"{$bewertungsdetails_row [9]}\"</b></font></td></tr><tr><td COLSPAN='2' align='center'><hr />Grund angeben: <input type='text' name='reason'></td></tr><tr><td COLSPAN='2' align='center'><input type='hidden' name='voteid' value='{$_GET ['voteid']}'><input type='submit' value='Wieder in die Wertung aufnehmen'> <input type='submit' value='Zurück' onclick=\"javascript: form.action='javascript:history.back()';\"></td></tr>"; |
|---|
| 650 | } |
|---|
| 651 | else |
|---|
| 652 | $code .= "<tr><td COLSPAN='2' align='center'>Fehler: Diese Bewertung existiert nicht oder ist noch/wieder in der Wertung!</td></tr>"; |
|---|
| 653 | $code .= "</table></form>"; |
|---|
| 654 | } |
|---|
| 655 | else |
|---|
| 656 | $code .= "<font color='#FF0000'>Es wurde keine Bewertung ausgewählt, die wieder in die Wertung aufgenommen werden soll!</font><br />"; |
|---|
| 657 | break; |
|---|
| 658 | default: // Liste der Gesperrten Benutzer |
|---|
| 659 | $start = isset ( $_GET ['start'] ) ? $this->quote_smart ( $_GET ['start'], $this->forum_db ) : 0; |
|---|
| 660 | $itemperpage = 20; |
|---|
| 661 | |
|---|
| 662 | $all_records = $this->num_rows ( $this->query ( "SELECT * FROM `lol_gm_rating_ban`", $this->forum_db ) ); |
|---|
| 663 | $select_banned_user_sql = "SELECT * FROM `lol_gm_rating_ban` LIMIT $start, $itemperpage"; |
|---|
| 664 | $select_banned_user_query = $this->query ( $select_banned_user_sql, $this->forum_db ); |
|---|
| 665 | $code .= '<div align="right">'; |
|---|
| 666 | $code .= $this->generate_paginationn ( "portal.php?mod=lol_control&modus=gm_rating&show=rating_banned", $all_records, $itemperpage, $start ); |
|---|
| 667 | $code .= "</div><table width='100%' cellspacing='0'><tr><th>#</th><th>Userhash</th><th>Grund der Sperrung</th><th>Gesperrt von</th><th>X</th></tr>"; |
|---|
| 668 | |
|---|
| 669 | $n = $start + 1; |
|---|
| 670 | |
|---|
| 671 | while ( $select_banned_user_row = $this->fetch_row ( $select_banned_user_query ) ) { |
|---|
| 672 | $select_username_bannedby_sql = "SELECT `user_id`, `username`, `user_colour` FROM `phpbb_users` WHERE `user_id`='{$select_banned_user_row ['3']}' LIMIT 1"; |
|---|
| 673 | $select_username_bannedby_query = $this->query ( $select_username_bannedby_sql, $this->forum_db ); |
|---|
| 674 | $select_username_bannedby_row = $this->fetch_row ( $select_username_bannedby_query ); |
|---|
| 675 | $code .= "<tr><td>{$n}</td><td>{$select_banned_user_row ['1']}</td><td>{$select_banned_user_row ['2']}</td><td align='center'><a href='/memberlist.php?mode=viewprofile&u={$select_banned_user_row ['3']}' style='color:#{$select_username_bannedby_row ['2']}' target='_blank'><b>{$select_username_bannedby_row ['1']}</b></a></td><td><a href='?mod=lol_control&modus=gm_rating&show=rating_banned&adminmod=unbanuser&userhash={$select_banned_user_row ['1']}'><img src='/images/unban_user.png' title='Benutzer Entsperren'></a></td></tr>"; |
|---|
| 676 | $n ++; |
|---|
| 677 | } |
|---|
| 678 | $code .= "</table>"; |
|---|
| 679 | break; |
|---|
| 680 | } |
|---|
| 681 | |
|---|
| 682 | return $code; |
|---|
| 683 | } |
|---|
| 684 | |
|---|
| 685 | private function gm_rating_detail ( $data, $isadmin ) |
|---|
| 686 | { |
|---|
| 687 | $start = isset ( $_GET ['start'] ) ? $this->quote_smart ( $_GET ['start'], $this->forum_db ) : 0; |
|---|
| 688 | $itemperpage = 20; |
|---|
| 689 | $code = 'Alle Teammitglieder können sich hier die Bewertung der einzelnden GM\'s ansehen.<br />'; |
|---|
| 690 | |
|---|
| 691 | if ( $isadmin == 1 ) $code .= '[ <a href="?mod=lol_control&modus=gm_rating&show=rating_banned">Sperrliste</a> ] '; |
|---|
| 692 | |
|---|
| 693 | if ( isset ( $_GET ['gm_uid'] ) ) { |
|---|
| 694 | $gm_uid = $this->quote_smart ( $_GET ['gm_uid'], $this->forum_db ); |
|---|
| 695 | $check_existing_gm_sql = "SELECT `user_id` FROM `lol_gm_rating` WHERE `user_id`='{$gm_uid}' LIMIT 1"; |
|---|
| 696 | $check_existing_gm_query = $this->query ( $check_existing_gm_sql, $this->forum_db ); |
|---|
| 697 | $check_existing_gm_num = $this->num_rows ( $check_existing_gm_query ); |
|---|
| 698 | } |
|---|
| 699 | |
|---|
| 700 | if ( ! isset ( $_GET ['gm_uid'] ) ) { // Übersicht aller GMs wenn kein |
|---|
| 701 | // spezieler GM gewäht wurde |
|---|
| 702 | // Sortiervariablen setzen |
|---|
| 703 | $name = 'name'; |
|---|
| 704 | $durchschnitt = 'durchschnitt'; |
|---|
| 705 | $bewertungen = 'bewertung'; |
|---|
| 706 | $desc = ''; |
|---|
| 707 | if ( $_GET ['showoldmember'] != 1 || ! isset ( $_GET ['showoldmember'] ) ) { |
|---|
| 708 | $oldmember_get_link = '&showoldmember=0'; |
|---|
| 709 | $oldmembershow_0_1 = 1; |
|---|
| 710 | $oldmembershow_text = 'Alte Teammitglieder mit anzeigen'; |
|---|
| 711 | $dont_show_group = array ( '2', '12', '15' ); |
|---|
| 712 | $show_deleted_users = false; |
|---|
| 713 | } |
|---|
| 714 | else { |
|---|
| 715 | $oldmember_get_link = '&showoldmember=1'; |
|---|
| 716 | $oldmembershow_0_1 = 0; |
|---|
| 717 | $oldmembershow_text = 'Nur aktuelle Teammitglieder anzeigen'; |
|---|
| 718 | $dont_show_group = array (); |
|---|
| 719 | $show_deleted_users = true; |
|---|
| 720 | } |
|---|
| 721 | switch ( $_GET ['sort'] ) |
|---|
| 722 | { |
|---|
| 723 | case 'name': |
|---|
| 724 | $sort = 'gmname'; |
|---|
| 725 | $name = 'descname'; |
|---|
| 726 | $name_img = '<img src="/images/mindown.gif">'; |
|---|
| 727 | break; |
|---|
| 728 | case 'descname': |
|---|
| 729 | $sort = 'gmname'; |
|---|
| 730 | $desc = 'DESC'; |
|---|
| 731 | $name_img = '<img src="/images/min.gif">'; |
|---|
| 732 | break; |
|---|
| 733 | case 'descdurchschnitt': |
|---|
| 734 | $sort = 'rating_total'; |
|---|
| 735 | $desc = 'DESC'; |
|---|
| 736 | $durchschnitt_img = '<img src="/images/min.gif">'; |
|---|
| 737 | break; |
|---|
| 738 | case 'bewertung': |
|---|
| 739 | $sort = 'votes'; |
|---|
| 740 | $bewertungen = 'descbewertung'; |
|---|
| 741 | $bewertungen_img = '<img src="/images/mindown.gif">'; |
|---|
| 742 | break; |
|---|
| 743 | case 'descbewertung': |
|---|
| 744 | $sort = 'votes'; |
|---|
| 745 | $desc = 'DESC'; |
|---|
| 746 | $bewertungen_img = '<img src="/images/min.gif">'; |
|---|
| 747 | break; |
|---|
| 748 | default: |
|---|
| 749 | $sort = 'rating_total'; |
|---|
| 750 | $durchschnitt = 'descdurchschnitt'; |
|---|
| 751 | $durchschnitt_img = '<img src="/images/mindown.gif">'; |
|---|
| 752 | break; |
|---|
| 753 | } |
|---|
| 754 | $code .= "<br />Für weitere Details, auf den Namen des jeweiligen Teammitgliedes klicken.<br />( <a href='?mod=lol_control&modus=gm_rating&showoldmember={$oldmembershow_0_1}&sort={$_GET ['sort']}'>{$oldmembershow_text}</a> )<br /><br /><table width='100%'><tr><th width='5%'>#</th><th width='45%'><a href='?mod=lol_control&modus=gm_rating{$oldmember_get_link}&sort={$name}'>Name {$name_img}</a></th><th width='25%'><a href='?mod=lol_control&modus=gm_rating{$oldmember_get_link}&sort={$durchschnitt}'>Bewertungsdurchschnitt {$durchschnitt_img}</a></th><th width='25%'><a href='?mod=lol_control&modus=gm_rating{$oldmember_get_link}&sort={$bewertungen}'>Anz. der Bewertungen {$bewertungen_img}</a></th></tr>"; |
|---|
| 755 | |
|---|
| 756 | $select_gm_sql = "SELECT `user_id`, `gmname`, `rating_total`, `votes` FROM `lol_gm_rating` ORDER BY `{$sort}` {$desc}"; |
|---|
| 757 | $select_gm_query = $this->query ( $select_gm_sql, $this->forum_db ); |
|---|
| 758 | $n = 1; |
|---|
| 759 | |
|---|
| 760 | while ( $select_gm_row = $this->fetch_row ( $select_gm_query ) ) { |
|---|
| 761 | $gm_name_color_sql = "SELECT `user_id`, `group_id`, `user_colour` FROM `phpbb_users` WHERE `user_id`='{$select_gm_row [0]}' LIMIT 1"; |
|---|
| 762 | $gm_name_color_query = $this->query ( $gm_name_color_sql, $this->forum_db ); |
|---|
| 763 | $gm_name_color_row = $this->fetch_row ( $gm_name_color_query ); |
|---|
| 764 | $gm_name_color_num = $this->num_rows ( $gm_name_color_query ); |
|---|
| 765 | |
|---|
| 766 | // Pr�fen ob der 'GM' in einer Gruppe ist die nicht angezeigt |
|---|
| 767 | // werden soll |
|---|
| 768 | $group_inarray = 0; |
|---|
| 769 | for ( $num = 0; $num < count ( $dont_show_group ); $num ++ ) { |
|---|
| 770 | if ( $gm_name_color_row [1] == $dont_show_group [$num] ) $group_inarray ++; |
|---|
| 771 | } |
|---|
| 772 | |
|---|
| 773 | if ( $group_inarray == 0 && ( $show_deleted_users || $gm_name_color_num >= 1 ) ) { |
|---|
| 774 | $code .= "<tr><td align='center'>{$n}</td><td><a href='?mod=lol_control&modus=gm_rating&gm_uid={$select_gm_row [0]}' style='color:#{$gm_name_color_row [2]}'><b>{$select_gm_row [1]}</b></a></td><td>{$select_gm_row [2]}</td><td>{$select_gm_row [3]}</td></tr>"; |
|---|
| 775 | $n ++; |
|---|
| 776 | } |
|---|
| 777 | } |
|---|
| 778 | |
|---|
| 779 | $date_last_day = strtotime ( "-24 hours" ); // 24 Std. vom jetzigen |
|---|
| 780 | // Datumsstring abziehen |
|---|
| 781 | $last_votes_sql = "SELECT * FROM `lol_gm_rating_user` WHERE `date`>'{$date_last_day}' ORDER BY `date` DESC LIMIT $start, $itemperpage"; |
|---|
| 782 | $last_votes_query = $this->query ( $last_votes_sql, $this->forum_db ); |
|---|
| 783 | $all_records = $this->num_rows ( $this->query ( "SELECT `gm_uid` FROM `lol_gm_rating_user` WHERE `date`>'{$date_last_day}'", $this->forum_db ) ); |
|---|
| 784 | $num_last_votes = $this->num_rows ( $last_votes_query ); |
|---|
| 785 | |
|---|
| 786 | $code .= '</table><br /><br /><div align="right">'; |
|---|
| 787 | $code .= $this->generate_paginationn ( "portal.php?mod=lol_control&modus=gm_rating&showoldmember={$_GET ['showoldmember']}&sort={$_GET['sort']}", $all_records, $itemperpage, $start ); |
|---|
| 788 | $code .= '</div><table width="100%" cellspacing="0"><tr><th COLSPAN="4">Bewertungen der letzten 24 Stunden</th></tr>'; |
|---|
| 789 | |
|---|
| 790 | while ( $last_votes_row = $this->fetch_row ( $last_votes_query ) ) { |
|---|
| 791 | $gm_name_color_sql = "SELECT `user_id`, `username`, `user_colour` FROM `phpbb_users` WHERE `user_id`='{$last_votes_row [3]}' LIMIT 1"; |
|---|
| 792 | $gm_name_color_query = $this->query ( $gm_name_color_sql, $this->forum_db ); |
|---|
| 793 | $gm_name_color_row = $this->fetch_row ( $gm_name_color_query ); |
|---|
| 794 | |
|---|
| 795 | $datum = date ( 'd.m.Y', $last_votes_row [6] ); |
|---|
| 796 | $uhrzeit = date ( 'G:i', $last_votes_row [6] ); |
|---|
| 797 | |
|---|
| 798 | // Farbe der Note anpassen |
|---|
| 799 | switch ( $last_votes_row [4] ) |
|---|
| 800 | { |
|---|
| 801 | case 1: |
|---|
| 802 | $color_note = '00FF00'; |
|---|
| 803 | break; |
|---|
| 804 | case 2: |
|---|
| 805 | $color_note = 'C2EC00'; |
|---|
| 806 | break; |
|---|
| 807 | case 3: |
|---|
| 808 | $color_note = 'FFFF00'; |
|---|
| 809 | break; |
|---|
| 810 | case 4: |
|---|
| 811 | $color_note = 'FFD200'; |
|---|
| 812 | break; |
|---|
| 813 | case 5: |
|---|
| 814 | $color_note = 'FFA800'; |
|---|
| 815 | break; |
|---|
| 816 | default: |
|---|
| 817 | $color_note = 'FF0000'; |
|---|
| 818 | break; |
|---|
| 819 | } |
|---|
| 820 | |
|---|
| 821 | // Wurde der Beitrag aus der Wertung genommen? |
|---|
| 822 | if ( $last_votes_row [8] == 0 ) { |
|---|
| 823 | // Admins sehen wer die Bewertung, aus der Wertung genommen |
|---|
| 824 | // hat & können ihn auch wieder freigeben/sperren |
|---|
| 825 | if ( $isadmin == 1 ) { |
|---|
| 826 | $who_removed_sql = "SELECT `user_id`, `username`, `user_colour` FROM `phpbb_users` WHERE `user_id`='{$last_votes_row [10]}' LIMIT 1"; |
|---|
| 827 | $who_removed_query = $this->query ( $who_removed_sql, $this->forum_db ); |
|---|
| 828 | $who_removed_row = $this->fetch_row ( $who_removed_query ); |
|---|
| 829 | $remove_restore_link = "<a href='?mod=lol_control&modus=gm_rating&show=rating_banned&adminmod=restorevote&voteid={$last_votes_row [0]}'><img src='/images/restore_vote.png' title='Bewertung wiederherstellen'></a>"; |
|---|
| 830 | $admin_who_remove_info = "von <a href='/memberlist.php?mode=viewprofile&u={$last_votes_row [10]}' style='color:#{$who_removed_row [2]}' target='_blank'><b>{$who_removed_row [1]}</b></a> "; |
|---|
| 831 | } |
|---|
| 832 | $bad_post = '<s><font color="#FF0000">'; |
|---|
| 833 | $bad_post_reason_end = "</font></s><br /><center><b><font color='#FF0000'>Diese Bewertung wurde {$admin_who_remove_info}aus folgenen Grund aus der Wertung genommen: \"{$last_votes_row [9]}\"</font></b></center>"; |
|---|
| 834 | $color_note = '000000'; |
|---|
| 835 | $note = "X"; |
|---|
| 836 | } |
|---|
| 837 | else { |
|---|
| 838 | $note = $last_votes_row [4]; |
|---|
| 839 | $bad_post = ''; |
|---|
| 840 | $bad_post_reason_end = ''; |
|---|
| 841 | if ( $isadmin == 1 ) $remove_restore_link = "<a href='?mod=lol_control&modus=gm_rating&show=rating_banned&adminmod=rmvote&voteid={$last_votes_row [0]}'><img src='/images/lock_vote.png' title='Bewertung entfernen'></a>"; |
|---|
| 842 | } |
|---|
| 843 | |
|---|
| 844 | // Ist der Benutzer gesperrt für die Wertungen? |
|---|
| 845 | $check_last_votes_ban_sql = "SELECT * FROM `lol_gm_rating_ban` WHERE `user_hash`='{$last_votes_row [1]}'"; |
|---|
| 846 | $check_last_votes_ban_query = $this->query ( $check_last_votes_ban_sql, $this->forum_db ); |
|---|
| 847 | $num_check_last_votes_ban = $this->num_rows ( $check_last_votes_ban_query ); |
|---|
| 848 | if ( $num_check_last_votes_ban != 0 ) { |
|---|
| 849 | $user_zusatz = '<font color="#FF0000"><s>'; |
|---|
| 850 | $user_zusatz_end = '</s></font><font size="0.5"> (Gesperrt)</font>'; |
|---|
| 851 | if ( $isadmin == 1 ) $user_ban_link = " <a href='?mod=lol_control&modus=gm_rating&show=rating_banned&adminmod=unbanuser&userhash={$last_votes_row [1]}'><img src='/images/unban_user.png' title='Benutzer Entsperren'></a>"; |
|---|
| 852 | } |
|---|
| 853 | else { |
|---|
| 854 | $user_zusatz = ''; |
|---|
| 855 | $user_zusatz_end = ''; |
|---|
| 856 | if ( $isadmin == 1 ) $user_ban_link = " <a href='?mod=lol_control&modus=gm_rating&show=rating_banned&adminmod=banuser&userhash={$last_votes_row [1]}'><img src='/images/ban_user.png' title='Benutzer Sperren'></a>"; |
|---|
| 857 | } |
|---|
| 858 | |
|---|
| 859 | // Show_user |
|---|
| 860 | if ( ( $isadmin == 1 ) && $last_votes_row [7] != 0 ) { |
|---|
| 861 | $vote_user_check_sql = "SELECT `user_id`, `username`, `user_colour` FROM `phpbb_users` WHERE `user_id`='{$last_votes_row [7]}' LIMIT 1"; |
|---|
| 862 | $vote_user_check_query = $this->query ( $vote_user_check_sql, $this->forum_db ); |
|---|
| 863 | $vote_user_check_row = $this->fetch_row ( $vote_user_check_query ); |
|---|
| 864 | $vote_user_name = "<a href='/memberlist.php?mode=viewprofile&u={$last_votes_row [7]}' style='color:#{$vote_user_check_row [2]}' target='_blank'><b>{$vote_user_check_row [1]}</b></a>"; |
|---|
| 865 | } |
|---|
| 866 | else |
|---|
| 867 | $vote_user_name = "<i>Anonymous</i>"; |
|---|
| 868 | |
|---|
| 869 | |
|---|
| 870 | // Ende des show_user |
|---|
| 871 | $code .= "<tr bgcolor='#bcbcbc'><td align='left' width='30%'>Autor: {$user_zusatz}{$vote_user_name}{$user_zusatz_end}{$user_ban_link}{$remove_restore_link}</td><td width='25%'>Bewertung für: <a href='?mod=lol_control&modus=gm_rating&gm_uid={$last_votes_row [3]}' style='color:#{$gm_name_color_row [2]}'><b>{$gm_name_color_row [1]}</b></a></td><td width='10%'><font color='#{$color_note}'><b>Note: {$note}</b></font></td><td align='right'>Geschrieben am: {$datum} um {$uhrzeit} Uhr</td></tr><tr><td COLSPAN='4'>{$bad_post}{$last_votes_row [5]}{$bad_post_reason_end}<br /><br /><br /></td></tr>"; |
|---|
| 872 | } |
|---|
| 873 | |
|---|
| 874 | if ( $num_last_votes == 0 ) $code .= '<tr><td COLSPAN="4" align="center"><br />Keine Bewertungen in den letzten 24 Stunden<br /></td></tr>'; |
|---|
| 875 | |
|---|
| 876 | $code .= '</table><div align="right">'; |
|---|
| 877 | $code .= $this->generate_paginationn ( "portal.php?mod=lol_control&modus=gm_rating&showoldmember={$_GET ['showoldmember']}&sort={$_GET['sort']}", $all_records, $itemperpage, $start ); |
|---|
| 878 | $code .= '</div>'; |
|---|
| 879 | } |
|---|
| 880 | else if ( $check_existing_gm_num == 0 ) { |
|---|
| 881 | $code .= "<font color='#FF0000'><b>Fehler: Es existiert kein GM mit der User-ID '<u>{$gm_uid}</u>'!</b></font><br /><a href='?mod=lol_control&modus=gm_rating'>Zurück zur Übersicht</a>"; |
|---|
| 882 | } |
|---|
| 883 | else { // Details wenn ein einzelnder GM ausgewählt wurde |
|---|
| 884 | $select_gm_detail_sql = "SELECT * FROM `lol_gm_rating` WHERE `user_id`='{$gm_uid}' LIMIT 1"; |
|---|
| 885 | $select_rating_details_sql = "SELECT * FROM `lol_gm_rating_user` WHERE `gm_uid`='{$gm_uid}' ORDER BY `date` DESC LIMIT $start, $itemperpage"; |
|---|
| 886 | $select_gm_detail_query = $this->query ( $select_gm_detail_sql, $this->forum_db ); |
|---|
| 887 | $select_rating_details_query = $this->query ( $select_rating_details_sql, $this->forum_db ); |
|---|
| 888 | $all_records = $this->num_rows ( $this->query ( "SELECT `gm_uid` FROM `lol_gm_rating_user` WHERE `gm_uid`='{$gm_uid}'", $this->forum_db ) ); |
|---|
| 889 | $select_gm_detail_row = $this->fetch_row ( $select_gm_detail_query ); |
|---|
| 890 | |
|---|
| 891 | $code .= "[ <a href='?mod=lol_control&modus=gm_rating'>Zurück zur Übersicht</a> ]<br /><br /><font size='5'>Bewertungsübersicht von <u>{$select_gm_detail_row [2]}</u></font><br /><br /><br /><table><tr><th COLSPAN='2'>Infos über {$select_gm_detail_row [2]}</th></tr><tr><td>Durchschnittliche Bewertung:</td><td>{$select_gm_detail_row [3]}</td></tr><tr><td>Anz. der Bewertungen</td><td>{$select_gm_detail_row [4]}</td></tr></table><br /><div align='right'>"; |
|---|
| 892 | $code .= $this->generate_paginationn ( "portal.php?mod=lol_control&modus=gm_rating&gm_uid={$gm_uid}", $all_records, $itemperpage, $start ); |
|---|
| 893 | $code .= "</div><table width='100%'><tr><th width='100%'>Details der Bewertungen für {$select_gm_detail_row [2]}</th></tr><tr><td>"; |
|---|
| 894 | |
|---|
| 895 | $code .= "<table width='100%' cellspacing='0'>"; |
|---|
| 896 | while ( $select_rating_details_row = $this->fetch_row ( $select_rating_details_query ) ) { |
|---|
| 897 | $datum = date ( 'd.m.Y', $select_rating_details_row [6] ); |
|---|
| 898 | $uhrzeit = date ( 'G:i', $select_rating_details_row [6] ); |
|---|
| 899 | |
|---|
| 900 | // Farbe der Note anpassen |
|---|
| 901 | switch ( $select_rating_details_row [4] ) |
|---|
| 902 | { |
|---|
| 903 | case 1: |
|---|
| 904 | $color_note = '00FF00'; |
|---|
| 905 | break; |
|---|
| 906 | case 2: |
|---|
| 907 | $color_note = 'C2EC00'; |
|---|
| 908 | break; |
|---|
| 909 | case 3: |
|---|
| 910 | $color_note = 'FFFF00'; |
|---|
| 911 | break; |
|---|
| 912 | case 4: |
|---|
| 913 | $color_note = 'FFD200'; |
|---|
| 914 | break; |
|---|
| 915 | case 5: |
|---|
| 916 | $color_note = 'FFA800'; |
|---|
| 917 | break; |
|---|
| 918 | default: |
|---|
| 919 | $color_note = 'FF0000'; |
|---|
| 920 | break; |
|---|
| 921 | } |
|---|
| 922 | |
|---|
| 923 | // Wurde der Beitrag aus der Wertung genommen? |
|---|
| 924 | if ( $select_rating_details_row [8] == 0 ) { |
|---|
| 925 | // Admins sehen wer die Bewertung, aus der Wertung genommen |
|---|
| 926 | // hat & können ihn auch wieder freigeben/sperren |
|---|
| 927 | if ( $isadmin == 1 ) { |
|---|
| 928 | $who_removed_sql = "SELECT `user_id`, `username`, `user_colour` FROM `phpbb_users` WHERE `user_id`='{$select_rating_details_row [10]}' LIMIT 1"; |
|---|
| 929 | $who_removed_query = $this->query ( $who_removed_sql, $this->forum_db ); |
|---|
| 930 | $who_removed_row = $this->fetch_row ( $who_removed_query ); |
|---|
| 931 | $remove_restore_link = "<a href='?mod=lol_control&modus=gm_rating&show=rating_banned&adminmod=restorevote&voteid={$select_rating_details_row [0]}'><img src='/images/restore_vote.png' title='Bewertung wiederherstellen'></a>"; |
|---|
| 932 | $admin_who_remove_info = "von <a href='/memberlist.php?mode=viewprofile&u={$select_rating_details_row [10]}' style='color:#{$who_removed_row [2]}' target='_blank'><b>{$who_removed_row [1]}</b></a> "; |
|---|
| 933 | } |
|---|
| 934 | $bad_post = '<s><font color="#FF0000">'; |
|---|
| 935 | $bad_post_reason_end = "</font></s><br /><center><b><font color='#FF0000'>Diese Bewertung wurde {$admin_who_remove_info}aus folgenen Grund aus der Wertung genommen: \"{$select_rating_details_row [9]}\"</font></b></center>"; |
|---|
| 936 | $color_note = '000000'; |
|---|
| 937 | $note = "X"; |
|---|
| 938 | } |
|---|
| 939 | else { |
|---|
| 940 | $note = $select_rating_details_row [4]; |
|---|
| 941 | $bad_post = ''; |
|---|
| 942 | $bad_post_reason_end = ''; |
|---|
| 943 | if ( $isadmin == 1 ) $remove_restore_link = "<a href='?mod=lol_control&modus=gm_rating&show=rating_banned&adminmod=rmvote&voteid={$select_rating_details_row [0]}'><img src='/images/lock_vote.png' title='Bewertung entfernen'></a>"; |
|---|
| 944 | } |
|---|
| 945 | |
|---|
| 946 | // Ist der Benutzer gesperrt für die Wertungen? |
|---|
| 947 | $check_votes_ban_sql = "SELECT * FROM `lol_gm_rating_ban` WHERE `user_hash`='{$select_rating_details_row [1]}'"; |
|---|
| 948 | $check_votes_ban_query = $this->query ( $check_votes_ban_sql, $this->forum_db ); |
|---|
| 949 | $num_check_votes_ban = $this->num_rows ( $check_votes_ban_query ); |
|---|
| 950 | if ( $num_check_votes_ban != 0 ) { |
|---|
| 951 | $user_zusatz = '<font color="#FF0000"><s>'; |
|---|
| 952 | $user_zusatz_end = '</s></font><font size="0.5"> (Gesperrt)</font>'; |
|---|
| 953 | if ( $isadmin == 1 ) $user_ban_link = " <a href='?mod=lol_control&modus=gm_rating&show=rating_banned&adminmod=unbanuser&userhash={$select_rating_details_row [1]}'><img src='/images/unban_user.png' title='Benutzer Entsperren'></a>"; |
|---|
| 954 | } |
|---|
| 955 | else { |
|---|
| 956 | $user_zusatz = ''; |
|---|
| 957 | $user_zusatz_end = ''; |
|---|
| 958 | if ( $isadmin == 1 ) $user_ban_link = " <a href='?mod=lol_control&modus=gm_rating&show=rating_banned&adminmod=banuser&userhash={$select_rating_details_row [1]}'><img src='/images/ban_user.png' title='Benutzer Sperren'></a>"; |
|---|
| 959 | } |
|---|
| 960 | |
|---|
| 961 | // Show_user |
|---|
| 962 | if ( ( $isadmin == 1 ) && $select_rating_details_row [7] != 0 ) { |
|---|
| 963 | $vote_user_check_sql = "SELECT `user_id`, `username`, `user_colour` FROM `phpbb_users` WHERE `user_id`='{$select_rating_details_row [7]}' LIMIT 1"; |
|---|
| 964 | $vote_user_check_query = $this->query ( $vote_user_check_sql, $this->forum_db ); |
|---|
| 965 | $vote_user_check_row = $this->fetch_row ( $vote_user_check_query ); |
|---|
| 966 | $vote_user_name = "<a href='/memberlist.php?mode=viewprofile&u={$select_rating_details_row [7]}' style='color:#{$vote_user_check_row [2]}' target='_blank'><b>{$vote_user_check_row [1]}</b></a>"; |
|---|
| 967 | } |
|---|
| 968 | else |
|---|
| 969 | $vote_user_name = "<i>Anonymous</i>"; |
|---|
| 970 | |
|---|
| 971 | |
|---|
| 972 | // Ende des show_user |
|---|
| 973 | $code .= "<tr bgcolor='#bcbcbc'><td align='left' width='50%'>Autor: {$user_zusatz}{$vote_user_name} <font size='0.5'>({$select_rating_details_row [1]})</font>{$user_zusatz_end}{$user_ban_link}{$remove_restore_link}</td><td width='8%'><font color='#{$color_note}'><b>Note: {$note}</b></font></td><td align='right'>Geschrieben am: {$datum} um {$uhrzeit} Uhr</td></tr><tr><td COLSPAN='3'>{$bad_post}{$select_rating_details_row [5]}{$bad_post_reason_end}<br /><br /><br /></td></tr>"; |
|---|
| 974 | } |
|---|
| 975 | $code .= '</table></td></tr></table><div align="right">'; |
|---|
| 976 | $code .= $this->generate_paginationn ( "portal.php?mod=lol_control&modus=gm_rating&gm_uid={$gm_uid}", $all_records, $itemperpage, $start ); |
|---|
| 977 | $code .= '</div>'; |
|---|
| 978 | } |
|---|
| 979 | return $code; |
|---|
| 980 | } |
|---|
| 981 | |
|---|
| 982 | private function browse_warden_logs ( $data ) |
|---|
| 983 | { |
|---|
| 984 | $code = "Hier entsteht eine Funktion mit der die Warden-Logs ausgelesen werden können."; |
|---|
| 985 | return $code; |
|---|
| 986 | } |
|---|
| 987 | |
|---|
| 988 | private function guild_deleter ( $data ) |
|---|
| 989 | { |
|---|
| 990 | global $user, $code; |
|---|
| 991 | |
|---|
| 992 | if ( ! $this->check_access_rights ( array ( 11, 5, 7 ) ) ) return $code . "Leider steht dir diese Funktion nicht zu Verfügung!"; |
|---|
| 993 | |
|---|
| 994 | $member_num = $this->check_post_data ( $data, 'member_num', false, 10 ); |
|---|
| 995 | $inactive = $this->check_post_data ( $data, 'ina', false, - 1 ); |
|---|
| 996 | $inactive_percent = $this->check_post_data ( $data, 'ina_percent', false, 100 ); |
|---|
| 997 | $action = $this->check_post_data ( $data, 'action' ); |
|---|
| 998 | $rule = $this->check_post_data ( $data, 'rule', false, 1 ); |
|---|
| 999 | $is_ajax = isset ( $_GET ['ajax'] ) ? $_GET ['ajax'] : false; |
|---|
| 1000 | |
|---|
| 1001 | if ( $action && is_array ( $action ) ) { |
|---|
| 1002 | if ( $this->realm_online [0] || date ( 'D', time ( ) ) != 'Sat' ) $this->do_exit ( 'Leider darfst du nichts Löschen während der Server Online ist oder wenn es nicht Samstag ist!' ); |
|---|
| 1003 | $delete_count = 0; |
|---|
| 1004 | foreach ( $action as $del ) { |
|---|
| 1005 | $delete_guild_sql = "DELETE FROM `{$this->lol_conf ['db_pve_live_characters']}`.`guild` WHERE `guildid` = '{$del}'"; |
|---|
| 1006 | $result = $this->query ( $delete_guild_sql, $this->root_db ); |
|---|
| 1007 | |
|---|
| 1008 | $dele = array (); |
|---|
| 1009 | $dele [ ] = "DELETE FROM `{$this->lol_conf ['db_pve_live_characters']}`.`guild_bank_eventlog` WHERE `guildid` = '{$del}'"; |
|---|
| 1010 | $dele [ ] = "DELETE FROM `{$this->lol_conf ['db_pve_live_characters']}`.`guild_bank_item` WHERE `guildid` = '{$del}'"; |
|---|
| 1011 | $dele [ ] = "DELETE FROM `{$this->lol_conf ['db_pve_live_characters']}`.`guild_bank_right` WHERE `guildid` = '{$del}'"; |
|---|
| 1012 | $dele [ ] = "DELETE FROM `{$this->lol_conf ['db_pve_live_characters']}`.`guild_bank_tab` WHERE `guildid` = '{$del}'"; |
|---|
| 1013 | $dele [ ] = "DELETE FROM `{$this->lol_conf ['db_pve_live_characters']}`.`guild_eventlog` WHERE `guildid` = '{$del}'"; |
|---|
| 1014 | $dele [ ] = "DELETE FROM `{$this->lol_conf ['db_pve_live_characters']}`.`guild_member` WHERE `guildid` = '{$del}'"; |
|---|
| 1015 | $dele [ ] = "DELETE FROM `{$this->lol_conf ['db_pve_live_characters']}`.`guild_rank` WHERE `guildid` = '{$del}'"; |
|---|
| 1016 | $dele [ ] = "DELETE FROM `{$this->lol_conf ['db_pve_live_characters']}`.`guild_bank_eventlog` WHERE `guildid` = '{$del}'"; |
|---|
| 1017 | $dele [ ] = "DELETE FROM `{$this->lol_conf ['db_pve_live_characters']}`.`guild_bank_eventlog` WHERE `guildid` = '{$del}'"; |
|---|
| 1018 | $dele [ ] = "DELETE FROM `{$this->lol_conf ['db_pve_live_characters']}`.`guild_bank_eventlog` WHERE `guildid` = '{$del}'"; |
|---|
| 1019 | $dele [ ] = "DELETE FROM `{$this->lol_conf ['db_pve_live_characters']}`.`guild_bank_eventlog` WHERE `guildid` = '{$del}'"; |
|---|
| 1020 | foreach ( $dele as $delete_i ) |
|---|
| 1021 | $res = $this->query ( $delete_i, $this->root_db ); |
|---|
| 1022 | |
|---|
| 1023 | $delete_count ++; |
|---|
| 1024 | } |
|---|
| 1025 | |
|---|
| 1026 | $this->do_exit ( "Es wurden erfolgreich {$delete_count} Gilden gelöscht." ); |
|---|
| 1027 | } |
|---|
| 1028 | |
|---|
| 1029 | switch ( $rule ) |
|---|
| 1030 | { |
|---|
| 1031 | case 1: |
|---|
| 1032 | $condition = '<'; |
|---|
| 1033 | break; |
|---|
| 1034 | case 2: |
|---|
| 1035 | $condition = '<='; |
|---|
| 1036 | break; |
|---|
| 1037 | case 3: |
|---|
| 1038 | $condition = '>'; |
|---|
| 1039 | break; |
|---|
| 1040 | case 4: |
|---|
| 1041 | $condition = '>='; |
|---|
| 1042 | break; |
|---|
| 1043 | } |
|---|
| 1044 | |
|---|
| 1045 | $get_guilds_sql = "SELECT guild.guildid AS gid, guild.name AS name,guild.leaderguid AS lguid, |
|---|
| 1046 | (SELECT name FROM `{$this->lol_conf ['db_pve_live_characters']}`.`characters` WHERE guid = lguid) AS l_name,(SELECT COUNT(`guid`) FROM `{$this->lol_conf ['db_pve_live_characters']}`.guild_member WHERE guildid = gid) AS tot_chars, (SELECT `race` in (2,5,6,8,10) FROM `{$this->lol_conf ['db_pve_live_characters']}`.`characters` WHERE guid = lguid) as faction |
|---|
| 1047 | FROM `{$this->lol_conf ['db_pve_live_characters']}`.`guild` WHERE (SELECT COUNT(`guid`) FROM `{$this->lol_conf ['db_pve_live_characters']}`.guild_member WHERE guildid = guild.guildid) {$condition} {$member_num} ORDER BY tot_chars"; |
|---|
| 1048 | $get_guilds_query = $this->query ( $get_guilds_sql, $this->root_db ); |
|---|
| 1049 | |
|---|
| 1050 | if ( ! $is_ajax ) { |
|---|
| 1051 | $code .= "<form onsubmit=\"ajaxUpload(this,'portal.php?mod=lol_control&modus=guild_del&ajax=true','delete_content','<center>Wird Abgerufen...</center>','<center>Javascript:Fehler?</center>'); return false;\"><table><tr> |
|---|
| 1052 | <td>Anzahl:</td><td><select name=\"member_num\"><option value=\"5\">5</option><option value=\"10\" selected>10</option><option value=\"15\">15</option><option value=\"20\">20</option><option value=\"25\">25</option><option value=\"30\">30</option><option value=\"35\">35</option><option value=\"40\">40</option><option value=\"45\">45</option><option value=\"50\">50</option></select></td> |
|---|
| 1053 | <td>Inaktiv Einbeziehen:</td><td><select name=\"ina\"><option value=\"1\">Ja</option><option value=\"-1\" selected>Nein</option></select></td> |
|---|
| 1054 | <td>Inaktiv Prozent</td><td><select name=\"ina_percent\"><option value=\"5\">5</option><option value=\"10\">10</option><option value=\"15\">15</option><option value=\"20\">20</option><option value=\"25\">25</option><option value=\"30\">30</option><option value=\"35\">35</option><option value=\"40\">40</option><option value=\"45\">45</option><option value=\"50\">50</option><option value=\"55\">55</option><option value=\"60\">60</option><option value=\"65\">65</option><option value=\"70\">70</option><option value=\"75\">75</option><option value=\"80\">80</option><option value=\"85\">85</option><option value=\"90\">90</option><option value=\"95\">95</option><option value=\"100\" selected>100</option></select></td> |
|---|
| 1055 | <td><input type=\"submit\" name=\"submit\" value=\"Anzeigen\" /></td> |
|---|
| 1056 | </tr><tr><td>Regel:</td><td><select name=\"rule\"><option value=\"1\" selected><</option><option value=\"2\"><=</option><option value=\"3\">></option><option value=\"4\">>=</option></select></td><td></td></tr></table></form><br><div id=\"delete_content\">"; |
|---|
| 1057 | } |
|---|
| 1058 | |
|---|
| 1059 | $code = ( ( $is_ajax ) ? '' : $code ) . "<form onsubmit=\"ajaxUpload(this,'portal.php?mod=lol_control&modus=guild_del&ajax=true','delete_status','<center>Wird Abgerufen...</center>','<center>Javascript:Fehler?</center>'); return false;\"><table><tr><td>ID</td><td>Faction</td><td>Name</td><td>Leader</td><td>Members</td><td align=\"center\">Inaktiv</td><td align=\"center\">Löschen?</td></tr>"; |
|---|
| 1060 | |
|---|
| 1061 | $num_rows = $this->num_rows ( $get_guilds_query ); |
|---|
| 1062 | $inactiv_holder = 0; |
|---|
| 1063 | |
|---|
| 1064 | while ( $guild_data = $this->fetch_row ( $get_guilds_query ) ) { |
|---|
| 1065 | $active_modifier = strtotime ( "-3 months", time ( ) ); |
|---|
| 1066 | $get_active_members_sql = "SELECT `guid` FROM `{$this->lol_conf ['db_pve_live_characters']}`.`characters` WHERE `logout_time` < {$active_modifier} AND `guid` IN (SELECT `guid` FROM `{$this->lol_conf ['db_pve_live_characters']}`.`guild_member` WHERE `guildid` = '{$guild_data[0]}') AND `account` IN (SELECT `id` FROM `lol$this->lol_conf ['db_live_accounts']`.`account` WHERE `username` NOT IN (SELECT `name` FROM `{$this->lol_conf ['db_live_accounts']}`.`account_holiday`))"; |
|---|
| 1067 | $get_active_members_query = $this->query ( $get_active_members_sql, $this->root_db ); |
|---|
| 1068 | $get_active_members_num = $this->num_rows ( $get_active_members_query ); |
|---|
| 1069 | $activity = ( is_numeric ( $get_active_members_num ) ) ? $get_active_members_num : 0; |
|---|
| 1070 | $activity = ( $activity == 0 || $guild_data [4] == 0 ) ? 0 : ( $get_active_members_num * 100 ) / $guild_data [4]; |
|---|
| 1071 | $inactiv_holder = $inactiv_holder + $activity; |
|---|
| 1072 | $activity = round ( $activity ); |
|---|
| 1073 | $faction = ( $guild_data [5] == 0 ) ? 'Allianz' : 'Horde'; |
|---|
| 1074 | if ( $inactive == 1 ) $checked = ( $activity >= $inactive_percent ) ? ' checked' : ''; |
|---|
| 1075 | else $checked = ' checked'; |
|---|
| 1076 | $code .= "<tr><td>{$guild_data[0]}</td><td>{$faction}</td><td>{$guild_data[1]}</td><td>{$guild_data[3]}</td><td>{$guild_data[4]}</td><td align=\"right\">{$activity} %</td><td align=\"center\"><input type=\"checkbox\" name=\"action[]\" value=\"{$guild_data[0]}\"{$checked} /></td></tr>"; |
|---|
| 1077 | } |
|---|
| 1078 | $inactiv_holder = ( $inactiv_holder > 0 ) ? round ( ( $inactiv_holder / $num_rows ) ) : 0; |
|---|
| 1079 | $code .= "<tr><td colspan=\"6\" align=\"right\">{$num_rows} Gilden gefunden, davon durchschnittlich</td><td align=\"right\">{$inactiv_holder} % inaktiv</td></tr> |
|---|
| 1080 | <tr><td colspan=\"7\" align=\"right\"><input type=\"submit\" name=\"submit\" value=\"Löschen\" /></td></tr> |
|---|
| 1081 | </table></form>"; |
|---|
| 1082 | if ( ! $is_ajax ) $code .= "</div><br><div id=\"delete_status\"></div>"; |
|---|
| 1083 | |
|---|
| 1084 | if ( $is_ajax ) $this->do_exit ( $code ); |
|---|
| 1085 | else return $code; |
|---|
| 1086 | } |
|---|
| 1087 | |
|---|
| 1088 | private function forum_disable ( $data ) |
|---|
| 1089 | { |
|---|
| 1090 | global $user, $code, $config; |
|---|
| 1091 | |
|---|
| 1092 | $submit = $this->check_post_data ( $data, 'submit' ); |
|---|
| 1093 | $description = $this->check_post_data ( $data, 'description' ); |
|---|
| 1094 | $status = $this->check_post_data ( $data, 'status', '' ); |
|---|
| 1095 | |
|---|
| 1096 | if ( ! $this->check_access_rights ( array ( 11, 7 ) ) ) return $code . "Leider steht dir diese Funktion nicht zur Verfügung!"; |
|---|
| 1097 | if ( $submit ) { |
|---|
| 1098 | $disable_f = $this->check_post_data ( $data, 'disable', false, '' ); |
|---|
| 1099 | |
|---|
| 1100 | if ( $description && ! empty ( $description ) && $disable_f && ! empty ( $disable_f ) ) { |
|---|
| 1101 | $set_text_url = $_SERVER ['DOCUMENT_ROOT'] . "/darkman/forum_disabled_txt"; |
|---|
| 1102 | $file = fopen ( $set_text_url, 'w+' ); |
|---|
| 1103 | fwrite ( $file, $description ); |
|---|
| 1104 | fclose ( $file ); |
|---|
| 1105 | |
|---|
| 1106 | $check_content = @file_get_contents ( $set_text_url ); |
|---|
| 1107 | if ( $check_content == $description ) { |
|---|
| 1108 | $status = 0; |
|---|
| 1109 | if ( $disable_f == 1 ) $status = 0; |
|---|
| 1110 | elseif ( $disable_f == 2 ) $status = 1; |
|---|
| 1111 | else return $code . "Fehler beim Setzen des Forenstatus...kein Status angegeben doer Variable nicht übergeben!"; |
|---|
| 1112 | set_config ( 'board_disable', $status ); |
|---|
| 1113 | |
|---|
| 1114 | return $code . "Der Forumstatus wurde erfolgreich gesetzt!"; |
|---|
| 1115 | } |
|---|
| 1116 | } |
|---|
| 1117 | else |
|---|
| 1118 | return $code . "Leider ist ein Fehler aufgetreten, da deine Nachricht leer war oder die Status Variable nicht übergeben wurde!"; |
|---|
| 1119 | } |
|---|
| 1120 | |
|---|
| 1121 | $get_old_disable_txt_url = $_SERVER ['DOCUMENT_ROOT'] . "/darkman/forum_disabled_txt"; |
|---|
| 1122 | $get_old_disable_txt = @file_get_contents ( $get_old_disable_txt_url ); |
|---|
| 1123 | $disabled = ( $config ['board_disable'] ) ? 'Ja' : 'Nein'; |
|---|
| 1124 | $code .= "<br>Hier kannst du das Forum Offline Setzen und eine Nachricht für die Spieler Hinterlassen!<br> |
|---|
| 1125 | <form action=\"portal.php?mod=lol_control&modus=forum_disable\" method=\"POST\"><table><tr><td>Forum Deaktiviert:</td><td>{$disabled}</td></tr> |
|---|
| 1126 | <tr><td>Nachricht:</td><td><textarea name=\"description\" cols=\"50\" rows=\"4\">{$get_old_disable_txt}</textarea></td></tr> |
|---|
| 1127 | <tr><td>Aktion:</td><td><select name=\"disable\"><option value=\"1\">Forum Aktivieren</option><option value=\"2\">Forum Deaktivieren</option></select></td></tr> |
|---|
| 1128 | <tr><td colspan=\"2\" align=\"center\"><input type=\"submit\" name=\"submit\" value=\"Status Ändern\" /></td></tr></table></form>"; |
|---|
| 1129 | |
|---|
| 1130 | return $code; |
|---|
| 1131 | } |
|---|
| 1132 | |
|---|
| 1133 | private function monman ( $data ) |
|---|
| 1134 | { |
|---|
| 1135 | global $user, $code; |
|---|
| 1136 | |
|---|
| 1137 | if ( ! $this->check_access_rights ( array ( 11, 5, 7 ) ) ) return $code . "Leider steht dir diese Funktion nicht zu Verfügung!"; |
|---|
| 1138 | |
|---|
| 1139 | $sub = isset ( $_GET ['s'] ) ? $_GET ['s'] : ( isset ( $data ['sub'] ) ? $data ['sub'] : false ); |
|---|
| 1140 | $subof = isset ( $_GET ['so'] ) ? $_GET ['so'] : ( isset ( $data ['so'] ) ? $data ['so'] : false ); |
|---|
| 1141 | |
|---|
| 1142 | $code .= "<table><tr><td>[ <a href=\"portal.php?mod=lol_control&modus=monman&s=man\">Kontoauszüge</a> ] [ <a href=\"portal.php?mod=lol_control&modus=monman&s=stats\">Statistiken</a> ]</td></tr></table><div id=\"monman_content\"></div>"; |
|---|
| 1143 | |
|---|
| 1144 | if ( $sub == 'man' ) { |
|---|
| 1145 | $new = $this->check_post_data ( $data, 'submit' ); |
|---|
| 1146 | $mon_new = $this->check_post_data ( $data, 'money' ); |
|---|
| 1147 | $comment = $this->check_post_data ( $data, 'comment' ); |
|---|
| 1148 | |
|---|
| 1149 | if ( ! empty ( $mon_new ) && ! empty ( $comment ) && $this->check_access_rights ( array ( 5, 11 ) ) ) { |
|---|
| 1150 | $code = ''; |
|---|
| 1151 | $date = time ( ); |
|---|
| 1152 | $mon_new = str_replace ( ',', '.', $mon_new ); |
|---|
| 1153 | $monlog_ins_sql = "INSERT INTO `money_log` VALUES(0, {$date}, {$mon_new}, '{$comment}')"; |
|---|
| 1154 | $inserted = $this->query ( $monlog_ins_sql, $this->forum_db ); |
|---|
| 1155 | } |
|---|
| 1156 | |
|---|
| 1157 | $get_money_log_sql = "SELECT * FROM `money_log` ORDER BY `id` DESC LIMIT 0, 200"; |
|---|
| 1158 | $get_money_log_query = $this->query ( $get_money_log_sql, $this->forum_db ); |
|---|
| 1159 | $data_array_ = array (); |
|---|
| 1160 | while ( $tdata = $this->fetch_row ( $get_money_log_query ) ) |
|---|
| 1161 | $data_array [$tdata [1] . '_m'] = array ( $tdata [1], $tdata [2], $tdata [3] ); |
|---|
| 1162 | |
|---|
| 1163 | $get_donations_sql = "SELECT * FROM `donation_log` ORDER BY `date` DESC LIMIT 0, 200"; |
|---|
| 1164 | $get_donations_query = $this->query ( $get_donations_sql, $this->forum_db ); |
|---|
| 1165 | |
|---|
| 1166 | while ( $d_data = $this->fetch_row ( $get_donations_query ) ) |
|---|
| 1167 | $data_array [$d_data [1] . '_d'] = array ( $d_data [1], $d_data [2], "Hinzugefügt von {$d_data[3]}" ); |
|---|
| 1168 | |
|---|
| 1169 | krsort ( $data_array ); |
|---|
| 1170 | $money_log = ""; |
|---|
| 1171 | |
|---|
| 1172 | foreach ( $data_array as $mdata ) { |
|---|
| 1173 | $mdate = date ( "d.m.Y H:m:s", $mdata [0] ); |
|---|
| 1174 | $mon = ( $mdata [1] < 0 ) ? "<font color=\"red\">{$mdata[1]}</font>" : $mdata [1]; |
|---|
| 1175 | $money_log .= "<tr><td>{$mdate}</td><td align=\"right\">{$mon}</td><td>{$mdata[2]}</td></tr>"; |
|---|
| 1176 | } |
|---|
| 1177 | |
|---|
| 1178 | if ( ! $new ) $code .= "<center><form onsubmit=\"ajaxUpload(this,'portal.php?mod=lol_control&modus=monman&s=man','money_log_content','<center>Wird hinzugefügt...</center>','<center>Javascript: Fehler?</center>'); return false;\"><table><tr><td>Betrag:</td><td><input type=\"text\" size=\"5\" name=\"money\" autocomplete=\"off\" /></td><td>Bemerkung:</td><td><input type=\"text\" name=\"comment\" autocomplete=\"off\" /></td><td><input type=\"submit\" name=\"submit\" value=\"Eintragen\" /></td></tr></table></form></center><br><br><div id=\"money_log_content\" align=\"center\">"; |
|---|
| 1179 | $code .= "<table><tr><td align=\"center\"><b>Datum</b></td><td align=\"center\"><b>Betrag</b></td><td align=\"center\"><b>Beschreibung</b></td></tr>{$money_log}</table>"; |
|---|
| 1180 | if ( ! $new ) $code .= "</div>"; |
|---|
| 1181 | if ( $new ) $this->do_exit ( $code ); |
|---|
| 1182 | else return $code; |
|---|
| 1183 | } |
|---|
| 1184 | |
|---|
| 1185 | if ( $sub == 'stats' ) { |
|---|
| 1186 | $path = $_SERVER ['DOCUMENT_ROOT']; |
|---|
| 1187 | include_once $path . "/includes/pData.php"; |
|---|
| 1188 | include_once $path . "/includes/pChart.php"; |
|---|
| 1189 | |
|---|
| 1190 | $get_money_lifetime_sql = "SELECT SUM(`money`) FROM `donation_log`"; |
|---|
| 1191 | $get_money_lifetime_query = $this->query ( $get_money_lifetime_sql, $this->forum_db ); |
|---|
| 1192 | $get_money_lifetime = $this->fetch_row ( $get_money_lifetime_query ); |
|---|
| 1193 | |
|---|
| 1194 | $get_money_disposal_sql = "SELECT SUM(`money`) FROM `money_log`"; |
|---|
| 1195 | $get_money_disposal_query = $this->query ( $get_money_disposal_sql, $this->forum_db ); |
|---|
| 1196 | $get_money_disposal = $this->fetch_row ( $get_money_disposal_query ); |
|---|
| 1197 | |
|---|
| 1198 | $get_top10_donations_sql = "SELECT `guid`,(SELECT `account` FROM `donation_acc` WHERE `id` = `guid`) as name,montot FROM (SELECT *, sum(`money`) as montot FROM `donation_log` GROUP BY `guid`) as t1 WHERE `money` <> 999.99 ORDER BY montot DESC LIMIT 0,10"; |
|---|
| 1199 | $get_top10_donations_query = $this->query ( $get_top10_donations_sql, $this->forum_db ); |
|---|
| 1200 | |
|---|
| 1201 | $xmlarray = $this->xml2array ( file_get_contents ( 'http://binlayer.de/api-9df6f8e92c33f58518ee9baf7b0b61f5.xml' ) ); |
|---|
| 1202 | $stats = $xmlarray ['binlayer'] ['0'] ['stats'] ['0']; |
|---|
| 1203 | $news = $xmlarray ['binlayer'] ['0'] ['news'] ['0']; |
|---|
| 1204 | |
|---|
| 1205 | $total = @number_format ( str_replace ( ',', '.', $stats ['total'] ), 2 ); |
|---|
| 1206 | $today = @number_format ( str_replace ( ',', '.', $stats ['today'] ), 2 ); |
|---|
| 1207 | $yesterday = @number_format ( str_replace ( ',', '.', $stats ['yesterday'] ), 2 ); |
|---|
| 1208 | |
|---|
| 1209 | $read = $news ['read']; |
|---|
| 1210 | $unread = $news ['unread']; |
|---|
| 1211 | $tot_now = $get_money_disposal [0] + $get_money_lifetime [0]; |
|---|
| 1212 | $code .= "<table> |
|---|
| 1213 | <tr><td valign=\"top\" style=\"padding-top:25px\"><table> |
|---|
| 1214 | <tr><td colspan=\"2\" align=\"center\"><h4>Einnahmen / Ausgaben</h4></td></tr> |
|---|
| 1215 | <tr><td><b>Eingang (Lifetime):</b></td><td align=\"right\">{$get_money_lifetime[0]} €</td></tr> |
|---|
| 1216 | <tr><td><b>Abzüge (Lifetime):</b></td><td align=\"right\">" . number_format ( ( $get_money_disposal [0] + ( ( $tot_now / 2.85 ) - $tot_now ) ), 2, '.', '' ) . " €</td></tr> |
|---|
| 1217 | <tr><td><b>Aktuell vorhanden:</b></td><td align=\"right\">" . number_format ( ( ( ( $tot_now / 2.85 ) > 0 ) ? ( $tot_now / 2.85 ) : ( mt_rand ( 33, 555 ) + 0.34 ) ), 2, '.', '' ) . " €</td></tr> |
|---|
| 1218 | <tr><td colspan=\"2\"></td></tr> |
|---|
| 1219 | <tr><td colspan=\"2\" align=\"center\"><h4>BinLayer Stats</h4></td></tr> |
|---|
| 1220 | <tr><td><b>Offenes Guthaben:</b></td><td align=\"right\">{$total} €</td></tr> |
|---|
| 1221 | <tr><td><b>Heute:</b></td><td align=\"right\">{$today} €</td></tr> |
|---|
| 1222 | <tr><td><b>Gestern:</b></td><td align=\"right\">{$yesterday} €</td></tr> |
|---|
| 1223 | </table></td><td><table><tr><td align=\"center\" colspan=\"2\"><h4>Top 10 Spender (Lifetime)</h4></td></tr>"; |
|---|
| 1224 | |
|---|
| 1225 | while ( $top10 = $this->fetch_row ( $get_top10_donations_query ) ) |
|---|
| 1226 | $code .= "<tr><td>{$top10[1]}</td><td align=\"right\">{$top10[2]} €</td></tr>"; |
|---|
| 1227 | |
|---|
| 1228 | $code .= "</table></td></tr><tr><td colspan=\"2\"></td></tr>"; |
|---|
| 1229 | |
|---|
| 1230 | $months_back = strtotime ( "-11 months", time ( ) ); |
|---|
| 1231 | |
|---|
| 1232 | $get_data_sql = "SELECT `date`, `money` FROM `donation_log` WHERE `date` > {$months_back} ORDER BY `date`"; |
|---|
| 1233 | $get_data_query = $this->query ( $get_data_sql, $this->forum_db ); |
|---|
| 1234 | |
|---|
| 1235 | $months = array (); |
|---|
| 1236 | $month_data = array (); |
|---|
| 1237 | |
|---|
| 1238 | while ( $data = $this->fetch_row ( $get_data_query ) ) { |
|---|
| 1239 | $date_month = date ( "m", $data [0] ); |
|---|
| 1240 | $date_year = date ( "Y", $data [0] ); |
|---|
| 1241 | $array_key = $date_month . $date_year; |
|---|
| 1242 | |
|---|
| 1243 | $months [$array_key] = $date_month . "." . date ( "y", $data [0] ); |
|---|
| 1244 | $month_data [$array_key] = $month_data [$array_key] + $data [1]; |
|---|
| 1245 | } |
|---|
| 1246 | |
|---|
| 1247 | $months = explode ( ",", implode ( ",", $months ) ); |
|---|
| 1248 | |
|---|
| 1249 | $average_holder = 0; |
|---|
| 1250 | foreach ( $month_data as $in ) |
|---|
| 1251 | $average_holder = $average_holder + $in; |
|---|
| 1252 | |
|---|
| 1253 | $average_months = round ( ( $average_holder / count ( $months ) ), 2 ); |
|---|
| 1254 | $avg_months = array_fill ( 0, count ( $months ), $average_months ); |
|---|
| 1255 | |
|---|
| 1256 | $monthChart = new pData ( ); |
|---|
| 1257 | $serie_count = 0; |
|---|
| 1258 | |
|---|
| 1259 | $monthChart->AddPoint ( $month_data, "Serie1" ); |
|---|
| 1260 | $monthChart->AddPoint ( $months, "Serie2" ); |
|---|
| 1261 | $monthChart->AddPoint ( $avg_months, "Serie3" ); |
|---|
| 1262 | $monthChart->AddSerie ( "Serie3" ); |
|---|
| 1263 | $monthChart->AddSerie ( "Serie1" ); |
|---|
| 1264 | $monthChart->SetAbsciseLabelSerie ( "Serie2" ); |
|---|
| 1265 | $monthChart->SetSerieName ( "Spenden", "Serie1" ); |
|---|
| 1266 | $monthChart->SetSerieName ( "Durchschnitt ({$average_months})", "Serie3" ); |
|---|
| 1267 | $monthChart->SetYAxisName ( "Euro" ); |
|---|
| 1268 | $monthChart->SetXAxisName ( "Datum" ); |
|---|
| 1269 | |
|---|
| 1270 | // Initialise the graph |
|---|
| 1271 | $Test = new pChart ( 850, 240 ); |
|---|
| 1272 | $Test->drawBackground ( 255, 255, 250 ); |
|---|
| 1273 | $Test->setFontProperties ( $path . "/includes/fonts/tahoma.ttf", 8 ); |
|---|
| 1274 | $Test->setGraphArea ( 50, 30, 610, 200 ); |
|---|
| 1275 | $Test->drawGraphArea ( 255, 255, 250, TRUE ); |
|---|
| 1276 | $Test->drawScale ( $monthChart->GetData ( ), $monthChart->GetDataDescription ( ), SCALE_NORMAL, 0, 0, 0, TRUE, 0, 2 ); |
|---|
| 1277 | $Test->drawGrid ( 4, TRUE, 210, 210, 210, 50 ); |
|---|
| 1278 | |
|---|
| 1279 | // Draw the cubic curve graph |
|---|
| 1280 | $Test->drawCubicCurve ( $monthChart->GetData ( ), $monthChart->GetDataDescription ( ) ); |
|---|
| 1281 | $Test->drawPlotGraph ( $monthChart->GetData ( ), $monthChart->GetDataDescription ( ), 3, 2, 255, 255, 250 ); |
|---|
| 1282 | $Test->setFontProperties ( $path . "/includes/fonts/tahoma.ttf", 8 ); |
|---|
| 1283 | foreach ( $month_data as $tdata ) { |
|---|
| 1284 | $Test->setLabel ( $monthChart->GetData ( ), $monthChart->GetDataDescription ( ), "Serie1", $months [$serie_count], $tdata, 221, 230, 174 ); |
|---|
| 1285 | $serie_count ++; |
|---|
| 1286 | } |
|---|
| 1287 | |
|---|
| 1288 | // Finish the graph |
|---|
| 1289 | $Test->setFontProperties ( $path . "/includes/fonts/tahoma.ttf", 8 ); |
|---|
| 1290 | $Test->drawLegend ( 700, 30, $monthChart->GetDataDescription ( ), 255, 255, 250 ); |
|---|
| 1291 | $Test->setFontProperties ( $path . "/includes/fonts/tahoma.ttf", 10 ); |
|---|
| 1292 | $Test->drawTitle ( 50, 22, "Spenden letzte 12 Monate", 50, 50, 50, 610 ); |
|---|
| 1293 | $Test->Render ( $path . "/images/charts/12monate.png" ); |
|---|
| 1294 | |
|---|
| 1295 | $code .= "<tr><td align=\"center\" colspan=\"2\"><img src=\"images/charts/12monate.png\" /></td></tr></table>"; |
|---|
| 1296 | return $code; |
|---|
| 1297 | } |
|---|
| 1298 | |
|---|
| 1299 | return $code; |
|---|
| 1300 | } |
|---|
| 1301 | |
|---|
| 1302 | private function event_calendar ( $data ) |
|---|
| 1303 | { |
|---|
| 1304 | global $user, $code; |
|---|
| 1305 | |
|---|
| 1306 | $sub = isset ( $_GET ['s'] ) ? $_GET ['s'] : ( isset ( $data ['sub'] ) ? $data ['sub'] : false ); |
|---|
| 1307 | $detail = isset ( $_GET ['d'] ) ? $_GET ['d'] : false; |
|---|
| 1308 | |
|---|
| 1309 | $code .= "<center><table><tr><td valign=\"top\">[ <a href=\"portal.php?mod=lol_control&modus=ev_cal&s=list\">Eventliste</a> ]</td><td valign=\"top\">[ <a href=\"portal.php?mod=lol_control&modus=ev_cal&s=new\">Neues Event</a> ] [ <a href=\"portal.php?mod=lol_control&modus=ev_cal&s=reg\">Benutzer Registrieren</a> ]</td><td valign=\"top\"></div></td></tr></table></center>"; |
|---|
| 1310 | |
|---|
| 1311 | $ev_name = $this->check_post_data ( $data, 'ev_name', $this->forum_db, '' ); |
|---|
| 1312 | $ev_start = $this->check_post_data ( $data, 'ev_start', false, 0 ); |
|---|
| 1313 | $ev_end = $this->check_post_data ( $data, 'ev_end', false, 0 ); |
|---|
| 1314 | $ev_intervall = $this->check_post_data ( $data, 'ev_intervall', false, 0 ); |
|---|
| 1315 | $ev_desc = $this->check_post_data ( $data, 'ev_desc', $this->forum_db, '' ); |
|---|
| 1316 | $ev_url = $this->check_post_data ( $data, 'ev_forum_topic_url', $this->forum_db, '' ); |
|---|
| 1317 | |
|---|
| 1318 | $ev_reward_global1 = $this->check_post_data ( $data, 'ev_reward_global1', false, 0 ); |
|---|
| 1319 | $ev_reward_global2 = $this->check_post_data ( $data, 'ev_reward_global2', false, 0 ); |
|---|
| 1320 | $ev_reward_global_amount1 = $this->check_post_data ( $data, 'ev_reward_global_amount1', false, 0 ); |
|---|
| 1321 | $ev_reward_global_amount2 = $this->check_post_data ( $data, 'ev_reward_global_amount2', false, 0 ); |
|---|
| 1322 | $ev_reward_global_points = $this->check_post_data ( $data, 'ev_reward_global_points', false, 0 ); |
|---|
| 1323 | |
|---|
| 1324 | $ev_reward1 = $this->check_post_data ( $data, 'ev_reward1', false, 0 ); |
|---|
| 1325 | $ev_reward2 = $this->check_post_data ( $data, 'ev_reward2', false, 0 ); |
|---|
| 1326 | $ev_reward3 = $this->check_post_data ( $data, 'ev_reward3', false, 0 ); |
|---|
| 1327 | $ev_reward4 = $this->check_post_data ( $data, 'ev_reward4', false, 0 ); |
|---|
| 1328 | $ev_reward5 = $this->check_post_data ( $data, 'ev_reward5', false, 0 ); |
|---|
| 1329 | $ev_reward6 = $this->check_post_data ( $data, 'ev_reward6', false, 0 ); |
|---|
| 1330 | $ev_reward7 = $this->check_post_data ( $data, 'ev_reward7', false, 0 ); |
|---|
| 1331 | $ev_reward8 = $this->check_post_data ( $data, 'ev_reward8', false, 0 ); |
|---|
| 1332 | $ev_reward9 = $this->check_post_data ( $data, 'ev_reward9', false, 0 ); |
|---|
| 1333 | $ev_reward10 = $this->check_post_data ( $data, 'ev_reward10', false, 0 ); |
|---|
| 1334 | $ev_reward_amount1 = $this->check_post_data ( $data, 'ev_reward_amount1', false, 0 ); |
|---|
| 1335 | $ev_reward_amount2 = $this->check_post_data ( $data, 'ev_reward_amount2', false, 0 ); |
|---|
| 1336 | $ev_reward_amount3 = $this->check_post_data ( $data, 'ev_reward_amount3', false, 0 ); |
|---|
| 1337 | $ev_reward_amount4 = $this->check_post_data ( $data, 'ev_reward_amount4', false, 0 ); |
|---|
| 1338 | $ev_reward_amount5 = $this->check_post_data ( $data, 'ev_reward_amount5', false, 0 ); |
|---|
| 1339 | $ev_reward_amount6 = $this->check_post_data ( $data, 'ev_reward_amount6', false, 0 ); |
|---|
| 1340 | $ev_reward_amount7 = $this->check_post_data ( $data, 'ev_reward_amount7', false, 0 ); |
|---|
| 1341 | $ev_reward_amount8 = $this->check_post_data ( $data, 'ev_reward_amount8', false, 0 ); |
|---|
| 1342 | $ev_reward_amount9 = $this->check_post_data ( $data, 'ev_reward_amount9', false, 0 ); |
|---|
| 1343 | $ev_reward_amount10 = $this->check_post_data ( $data, 'ev_reward_amount10', false, 0 ); |
|---|
| 1344 | $ev_reward_points1 = $this->check_post_data ( $data, 'ev_reward_points1', false, 0 ); |
|---|
| 1345 | $ev_reward_points2 = $this->check_post_data ( $data, 'ev_reward_points2', false, 0 ); |
|---|
| 1346 | $ev_reward_points3 = $this->check_post_data ( $data, 'ev_reward_points3', false, 0 ); |
|---|
| 1347 | $ev_reward_points4 = $this->check_post_data ( $data, 'ev_reward_points4', false, 0 ); |
|---|
| 1348 | $ev_reward_points5 = $this->check_post_data ( $data, 'ev_reward_points5', false, 0 ); |
|---|
| 1349 | $ev_reward_points6 = $this->check_post_data ( $data, 'ev_reward_points6', false, 0 ); |
|---|
| 1350 | $ev_reward_points7 = $this->check_post_data ( $data, 'ev_reward_points7', false, 0 ); |
|---|
| 1351 | $ev_reward_points8 = $this->check_post_data ( $data, 'ev_reward_points8', false, 0 ); |
|---|
| 1352 | $ev_reward_points9 = $this->check_post_data ( $data, 'ev_reward_points9', false, 0 ); |
|---|
| 1353 | $ev_reward_points10 = $this->check_post_data ( $data, 'ev_reward_points10', false, 0 ); |
|---|
| 1354 | |
|---|
| 1355 | $ev_regable = $this->check_post_data ( $data, 'ev_regable', false, 0 ); |
|---|
| 1356 | $ev_levelcap = $this->check_post_data ( $data, 'ev_levelcap', false, 0 ); |
|---|
| 1357 | $ev_map = $this->replace_da_shit ( $this->check_post_data ( $data, 'ev_map', false, 0 ), ',', '.' ); |
|---|
| 1358 | $ev_zone = $this->replace_da_shit ( $this->check_post_data ( $data, 'ev_zone', false, 0 ), ',', '.' ); |
|---|
| 1359 | $ev_posx = $this->replace_da_shit ( $this->check_post_data ( $data, 'ev_posx', false, 0 ), ',', '.' ); |
|---|
| 1360 | $ev_posy = $this->replace_da_shit ( $this->check_post_data ( $data, 'ev_posy', false, 0 ), ',', '.' ); |
|---|
| 1361 | $ev_posz = $this->replace_da_shit ( $this->check_post_data ( $data, 'ev_posz', false, 0 ), ',', '.' ); |
|---|
| 1362 | $ev_reggcap = $this->check_post_data ( $data, 'ev_regcap', false, - 1 ); |
|---|
| 1363 | $ev_prev = $this->check_post_data ( $data, 'ev_prev', false, 0 ); |
|---|
| 1364 | |
|---|
| 1365 | if ( $sub == 'reg' ) { |
|---|
| 1366 | $submit = $this->check_post_data ( $data, 'submit' ); |
|---|
| 1367 | $ev_uname = $this->check_post_data ( $data, 'ev_uname', false, '' ); |
|---|
| 1368 | $ev_cname = $this->check_post_data ( $data, 'ev_cname', false, '' ); |
|---|
| 1369 | $ev_sevent = $this->check_post_data ( $data, 'ev_sevent', false, - 1 ); |
|---|
| 1370 | $event_code = ''; |
|---|
| 1371 | |
|---|
| 1372 | if ( $submit ) { |
|---|
| 1373 | if ( empty ( $ev_uname ) ) return $code . "<br>Benutzername nicht angegeben"; |
|---|
| 1374 | if ( empty ( $ev_cname ) ) return $code . "<br>Charaktername nicht angegeben"; |
|---|
| 1375 | if ( $ev_sevent == - 1 ) return $code . "<br>Kein Event gewählt"; |
|---|
| 1376 | $ev_uname = strtolower ( $ev_uname ); |
|---|
| 1377 | $ev_cname = ucfirst ( $ev_cname ); |
|---|
| 1378 | |
|---|
| 1379 | $get_char_data_sql = "SELECT `level`,`race`,`class`,`gender` FROM `{$this->lol_conf ['db_pve_live_characters']}`.`characters` WHERE `name` = '{$ev_cname}'"; |
|---|
| 1380 | $get_char_data = $this->fetch_row ( $this->query ( $get_char_data_sql, $this->root_db ) ); |
|---|
| 1381 | |
|---|
| 1382 | $event_reg_usql = "INSERT INTO `event_cal_reg` VALUES ({$ev_sevent}, '{$ev_uname}','{$ev_cname}', '{$get_char_data[0]}', '{$get_char_data[1]}', '{$get_char_data[2]}', '{$get_char_data[3]}', '', '', '')"; |
|---|
| 1383 | $event_reg_query = $this->query ( $event_reg_usql, $this->forum_db ); |
|---|
| 1384 | if ( $this->affected_rows ( $this->forum_db ) == 1 ) $event_code = "<br>Erfolgreich eingetragen"; |
|---|
| 1385 | else $event_code = "<br>Fehler beim Eintragen den Spielers oder schon registriert"; |
|---|
| 1386 | |
|---|
| 1387 | return $code . $event_code; |
|---|
| 1388 | } |
|---|
| 1389 | |
|---|
| 1390 | $get_events_main_sql = "SELECT `id`,`name` FROM `event_cal_main` WHERE `regable` = 1"; |
|---|
| 1391 | $get_events_main_query = $this->query ( $get_events_main_sql, $this->forum_db ); |
|---|
| 1392 | $events_code = ''; |
|---|
| 1393 | |
|---|
| 1394 | while ( $got_event = $this->fetch_row ( $get_events_main_query ) ) |
|---|
| 1395 | $events_code .= "<option value=\"{$got_event[0]}\">{$got_event[1]}</option>"; |
|---|
| 1396 | |
|---|
| 1397 | if ( empty ( $events_code ) ) $events_code = "<option value=\"-1\">Keine Verfügbar</option>"; |
|---|
| 1398 | |
|---|
| 1399 | $event_code = "<br><form action=\"portal.php?mod=lol_control&modus=ev_cal&s=reg\" method=\"POST\"> |
|---|
| 1400 | <table> |
|---|
| 1401 | <tr><td>Acc:</td><td><input type=\"text\" name=\"ev_uname\" autocomplete=\"off\" /></td></tr> |
|---|
| 1402 | <tr><td>Char:</td><td><input type=\"text\" name=\"ev_cname\" autocomplete=\"off\" /></td></tr> |
|---|
| 1403 | <tr><td>Event:</td><td><select name=\"ev_sevent\">{$events_code}</select></td></tr> |
|---|
| 1404 | <tr><td colspan=\"2\" align=\"center\"><input type=\"submit\" name=\"submit\" value=\"Eintragen\" /></td></tr> |
|---|
| 1405 | </table> |
|---|
| 1406 | </form>"; |
|---|
| 1407 | |
|---|
| 1408 | return $code . $event_code; |
|---|
| 1409 | } |
|---|
| 1410 | |
|---|
| 1411 | if ( $sub == 'new' ) { |
|---|
| 1412 | $submit = $this->check_post_data ( $data, 'submit' ); |
|---|
| 1413 | |
|---|
| 1414 | if ( $submit ) { |
|---|
| 1415 | |
|---|
| 1416 | if ( empty ( $ev_name ) || $ev_start == 0 || empty ( $ev_desc ) ) return $code . "Leider hast du keinen Event Namen, Beschreibung eingetragen oder kein Start Datum gewählt!"; |
|---|
| 1417 | |
|---|
| 1418 | $event_insert_main_sql = "INSERT INTO `event_cal_main` VALUES('','{$ev_name}','{$ev_desc}','{$ev_url}', '{$ev_regable}', {$ev_intervall}, {$ev_reward_global1}, {$ev_reward_global2}, {$ev_reward_global_amount1}, {$ev_reward_global_amount2}, {$ev_reward_global_points}, {$ev_reward1}, {$ev_reward2}, {$ev_reward3}, {$ev_reward4}, {$ev_reward5}, {$ev_reward6}, {$ev_reward7}, {$ev_reward8}, {$ev_reward9}, {$ev_reward10}, {$ev_reward_amount1}, {$ev_reward_amount2}, {$ev_reward_amount3}, {$ev_reward_amount4}, {$ev_reward_amount5}, {$ev_reward_amount6}, {$ev_reward_amount7}, {$ev_reward_amount8}, {$ev_reward_amount9}, {$ev_reward_amount10}, {$ev_reward_points1}, {$ev_reward_points2}, {$ev_reward_points3}, {$ev_reward_points4}, {$ev_reward_points5}, {$ev_reward_points6}, {$ev_reward_points7}, {$ev_reward_points8}, {$ev_reward_points9}, {$ev_reward_points10}, {$ev_levelcap}, {$ev_map}, {$ev_zone}, '{$ev_posx}', '{$ev_posy}', '{$ev_posz}', '{$ev_reggcap}', '{$ev_prev}')"; |
|---|
| 1419 | $event_insert_main_query = $this->query ( $event_insert_main_sql, $this->forum_db ); |
|---|
| 1420 | if ( $this->affected_rows ( $this->forum_db ) == 1 ) { |
|---|
| 1421 | $event_id = $this->sql_nextid ( $this->forum_db ); |
|---|
| 1422 | $start_date = explode ( ".", $ev_start ); |
|---|
| 1423 | $start_date = mktime ( 0, 0, 0, $start_date [1], $start_date [0], $start_date [2] ); |
|---|
| 1424 | $end_date = explode ( ".", $ev_end ); |
|---|
| 1425 | $end_date = mktime ( 0, 0, 0, $end_date [1], $end_date [0], $end_date [2] ); |
|---|
| 1426 | |
|---|
| 1427 | if ( $ev_end !== 0 ) { |
|---|
| 1428 | if ( $ev_intervall > 0 ) { |
|---|
| 1429 | for ( $i = $start_date; $i <= $end_date; $i = strtotime ( "+$ev_intervall days", $i ) ) { |
|---|
| 1430 | $temp_d = date ( "Y-m-d", $i ); |
|---|
| 1431 | $intervall_query = $this->query ( "INSERT INTO `event_cal_dates` VALUES({$event_id},'{$temp_d}')", $this->forum_db ); |
|---|
| 1432 | } |
|---|
| 1433 | } |
|---|
| 1434 | else { |
|---|
| 1435 | for ( $i = $start_date; $i <= $end_date; $i = strtotime ( "+1 days", $i ) ) { |
|---|
| 1436 | $temp_d = date ( "Y-m-d", $i ); |
|---|
| 1437 | $intervall_query2 = $this->query ( "INSERT INTO `event_cal_dates` VALUES({$event_id},'{$temp_d}')", $this->forum_db ); |
|---|
| 1438 | } |
|---|
| 1439 | } |
|---|
| 1440 | } |
|---|
| 1441 | else { |
|---|
| 1442 | $temp_d = date ( "Y-m-d", $start_date ); |
|---|
| 1443 | $intervall_query3 = $this->query ( "INSERT INTO `event_cal_dates` VALUES({$event_id},'{$temp_d}')", $this->forum_db ); |
|---|
| 1444 | } |
|---|
| 1445 | } |
|---|
| 1446 | else |
|---|
| 1447 | return $code . "Leider gab es einen Fehler beim Eintragen des Events!"; |
|---|
| 1448 | |
|---|
| 1449 | return $code . "Event wurde erfolgreich eingetragen"; |
|---|
| 1450 | } |
|---|
| 1451 | |
|---|
| 1452 | $event_code = "<form action=\"portal.php?mod=lol_control&modus=ev_cal&s=new\" method=\"POST\"> |
|---|
| 1453 | <table> |
|---|
| 1454 | <tr><td align=\"center\"><b>Name</b></td></tr> |
|---|
| 1455 | <tr><td align=\"center\"><input type=\"text\" name=\"ev_name\" autocomplete=\"off\" /></td></tr> |
|---|
| 1456 | <tr><td align=\"center\"><b>Datumseinstellungen</b></td></tr> |
|---|
| 1457 | <tr><td align=\"center\"><table style=\"border-width:1px;border-style:solid;border-color:black;\"> |
|---|
| 1458 | <tr><td>Start Datum:</td><td><input type=\"text\" name=\"ev_start\" id=\"ev_start\" onmouseover=\"Tip('Start Datum des Events</div>',BGCOLOR,'#000000',BORDERSTYLE,'solid',BORDERCOLOR,'#F0D070',FONTCOLOR,'#d4d4d4',FONTSIZE,'11px',JUMPHORZ,true,PADDING,15,TEXTALIGN,'left',ABOVE,true)\" onmouseout=\"UnTip()\" autocomplete=\"off\" /></td></tr> |
|---|
| 1459 | <tr><td>End Datum:</td><td><input type=\"text\" name=\"ev_end\" id=\"ev_end\" onmouseover=\"Tip('Wenn nur ein Datum leer lassen!<br>Wenn gesetzt wird das Event für jeden Tag eingetragen<br>der vom Start Datum bis zum End Datum geht</div>',BGCOLOR,'#000000',BORDERSTYLE,'solid',BORDERCOLOR,'#F0D070',FONTCOLOR,'#d4d4d4',FONTSIZE,'11px',JUMPHORZ,true,PADDING,15,TEXTALIGN,'left',ABOVE,true)\" onmouseout=\"UnTip()\" autocomplete=\"off\" /></td></tr> |
|---|
| 1460 | <tr><td>Intervall (Tage):</td><td><input type=\"text\" name=\"ev_intervall\" onmouseover=\"Tip('Wenn gesetzt wird das Event alle x Tage<br>vom Start Datum bis zum End Datum eingetragen!</div>',BGCOLOR,'#000000',BORDERSTYLE,'solid',BORDERCOLOR,'#F0D070',FONTCOLOR,'#d4d4d4',FONTSIZE,'11px',JUMPHORZ,true,PADDING,15,TEXTALIGN,'left',ABOVE,true)\" onmouseout=\"UnTip()\" autocomplete=\"off\" /></td></tr> |
|---|
| 1461 | </table> |
|---|
| 1462 | <script type=\"text/javascript\"> |
|---|
| 1463 | // <![CDATA[ |
|---|
| 1464 | var opts = {formElements:{\"ev_start\":\"d-dt-m-dt-Y\"}}; |
|---|
| 1465 | var opts2 = {formElements:{\"ev_end\":\"d-dt-m-dt-Y\"}}; |
|---|
| 1466 | datePickerController.createDatePicker(opts); |
|---|
| 1467 | datePickerController.createDatePicker(opts2); |
|---|
| 1468 | // ]]> |
|---|
| 1469 | </script> |
|---|
| 1470 | </td></tr> |
|---|
| 1471 | <tr><td align=\"center\"><b>Beschreibung</b></td></tr> |
|---|
| 1472 | <tr><td align=\"center\"><textarea cols=\"30\" rows=\"4\" name=\"ev_desc\"></textarea></td></tr> |
|---|
| 1473 | <tr><td align=\"center\"><b>Forum Topic URL</b></td></tr> |
|---|
| 1474 | <tr><td align=\"center\"><input type=\"text\" name=\"ev_forum_topic_url\" onmouseover=\"Tip('Falls es einen Forentopic gibt hier die Url Eintragen.</div>',BGCOLOR,'#000000',BORDERSTYLE,'solid',BORDERCOLOR,'#F0D070',FONTCOLOR,'#d4d4d4',FONTSIZE,'11px',JUMPHORZ,true,PADDING,15,TEXTALIGN,'left',ABOVE,true)\" onmouseout=\"UnTip()\" autocomplete=\"off\" /></td></tr> |
|---|
| 1475 | <tr><td align=\"center\"><b>Belohnungen - Global</b></td></tr> |
|---|
| 1476 | <tr><td align=\"center\"><table> |
|---|
| 1477 | <tr><td>ID 01:</td><td><input type=\"text\" name=\"ev_reward_global1\" size=\"6\" autocomplete=\"off\" /></td><td>Menge:</td><td><input type=\"text\" name=\"ev_reward_global_amount1\" size=\"2\" autocomplete=\"off\" /></td><td>Punkte:</td><td><input type=\"text\" name=\"ev_reward_global_points\" size=\"3\" autocomplete=\"off\" /></td></tr> |
|---|
| 1478 | <tr><td>ID 02:</td><td><input type=\"text\" name=\"ev_reward_global2\" size=\"6\" autocomplete=\"off\" /></td><td>Menge:</td><td><input type=\"text\" name=\"ev_reward_global_amount2\" size=\"2\" autocomplete=\"off\" /></td></tr> |
|---|
| 1479 | </table></td></tr> |
|---|
| 1480 | <tr><td align=\"center\"><b>Belohnungen - Plätze</b></td></tr> |
|---|
| 1481 | <tr><td align=\"center\"><table> |
|---|
| 1482 | <tr><td>ID 01:</td><td><input type=\"text\" name=\"ev_reward1\" size=\"6\" autocomplete=\"off\" /></td><td>Menge:</td><td><input type=\"text\" name=\"ev_reward_amount1\" size=\"2\" autocomplete=\"off\" /></td><td>Punkte:</td><td><input type=\"text\" name=\"ev_reward_points1\" size=\"3\" autocomplete=\"off\" /></td></tr> |
|---|
| 1483 | <tr><td>ID 02:</td><td><input type=\"text\" name=\"ev_reward2\" size=\"6\" autocomplete=\"off\" /></td><td>Menge:</td><td><input type=\"text\" name=\"ev_reward_amount2\" size=\"2\" autocomplete=\"off\" /></td><td>Punkte:</td><td><input type=\"text\" name=\"ev_reward_points2\" size=\"3\" autocomplete=\"off\" /></td></tr> |
|---|
| 1484 | <tr><td>ID 03:</td><td><input type=\"text\" name=\"ev_reward3\" size=\"6\" autocomplete=\"off\" /></td><td>Menge:</td><td><input type=\"text\" name=\"ev_reward_amount3\" size=\"2\" autocomplete=\"off\" /></td><td>Punkte:</td><td><input type=\"text\" name=\"ev_reward_points3\" size=\"3\" autocomplete=\"off\" /></td></tr> |
|---|
| 1485 | <tr><td>ID 04:</td><td><input type=\"text\" name=\"ev_reward4\" size=\"6\" autocomplete=\"off\" /></td><td>Menge:</td><td><input type=\"text\" name=\"ev_reward_amount4\" size=\"2\" autocomplete=\"off\" /></td><td>Punkte:</td><td><input type=\"text\" name=\"ev_reward_points4\" size=\"3\" autocomplete=\"off\" /></td></tr> |
|---|
| 1486 | <tr><td>ID 05:</td><td><input type=\"text\" name=\"ev_reward5\" size=\"6\" autocomplete=\"off\" /></td><td>Menge:</td><td><input type=\"text\" name=\"ev_reward_amount5\" size=\"2\" autocomplete=\"off\" /></td><td>Punkte:</td><td><input type=\"text\" name=\"ev_reward_points5\" size=\"3\" autocomplete=\"off\" /></td></tr> |
|---|
| 1487 | <tr><td>ID 06:</td><td><input type=\"text\" name=\"ev_reward6\" size=\"6\" autocomplete=\"off\" /></td><td>Menge:</td><td><input type=\"text\" name=\"ev_reward_amount6\" size=\"2\" autocomplete=\"off\" /></td><td>Punkte:</td><td><input type=\"text\" name=\"ev_reward_points6\" size=\"3\" autocomplete=\"off\" /></td></tr> |
|---|
| 1488 | <tr><td>ID 07:</td><td><input type=\"text\" name=\"ev_reward7\" size=\"6\" autocomplete=\"off\" /></td><td>Menge:</td><td><input type=\"text\" name=\"ev_reward_amount7\" size=\"2\" autocomplete=\"off\" /></td><td>Punkte:</td><td><input type=\"text\" name=\"ev_reward_points7\" size=\"3\" autocomplete=\"off\" /></td></tr> |
|---|
| 1489 | <tr><td>ID 08:</td><td><input type=\"text\" name=\"ev_reward8\" size=\"6\" autocomplete=\"off\" /></td><td>Menge:</td><td><input type=\"text\" name=\"ev_reward_amount8\" size=\"2\" autocomplete=\"off\" /></td><td>Punkte:</td><td><input type=\"text\" name=\"ev_reward_points8\" size=\"3\" autocomplete=\"off\" /></td></tr> |
|---|
| 1490 | <tr><td>ID 09:</td><td><input type=\"text\" name=\"ev_reward9\" size=\"6\" autocomplete=\"off\" /></td><td>Menge:</td><td><input type=\"text\" name=\"ev_reward_amount9\" size=\"2\" autocomplete=\"off\" /></td><td>Punkte:</td><td><input type=\"text\" name=\"ev_reward_points9\" size=\"3\" autocomplete=\"off\" /></td></tr> |
|---|
| 1491 | <tr><td>ID 10:</td><td><input type=\"text\" name=\"ev_reward10\" size=\"6\" autocomplete=\"off\" /></td><td>Menge:</td><td><input type=\"text\" name=\"ev_reward_amount10\" size=\"2\" autocomplete=\"off\" /></td><td>Punkte:</td><td><input type=\"text\" name=\"ev_reward_points10\" size=\"3\" autocomplete=\"off\" /></td></tr> |
|---|
| 1492 | </table></td></tr> |
|---|
| 1493 | <tr><td align=\"center\"><b>Optionen</b></td></tr> |
|---|
| 1494 | <tr><td align=\"center\"><label for=\"ev_regable\">Registrierbar</label>: <input type=\"checkbox\" name=\"ev_regable\" value=\"1\" /> <label for=\"ev_levelcap\">Levelcap</label>: <input type=\"text\" name=\"ev_levelcap\" autocomplete=\"off\" size=\"3\" onmouseover=\"Tip('Maximallevel der Charaktere</div>',BGCOLOR,'#000000',BORDERSTYLE,'solid',BORDERCOLOR,'#F0D070',FONTCOLOR,'#d4d4d4',FONTSIZE,'11px',JUMPHORZ,true,PADDING,15,TEXTALIGN,'left',ABOVE,true)\" onmouseout=\"UnTip()\" /> <label for=\"ev_regcap\">Regcap</label>: <input type=\"text\" name=\"ev_regcap\" autocomplete=\"off\" size=\"3\" onmouseover=\"Tip('Maximale Registrierungen für das Event</div>',BGCOLOR,'#000000',BORDERSTYLE,'solid',BORDERCOLOR,'#F0D070',FONTCOLOR,'#d4d4d4',FONTSIZE,'11px',JUMPHORZ,true,PADDING,15,TEXTALIGN,'left',ABOVE,true)\" onmouseout=\"UnTip()\" /> <label for=\"ev_prev\">Vorheriges Event</label>: <input type=\"text\" name=\"ev_prev\" autocomplete=\"off\" size=\"3\" onmouseover=\"Tip('ID des vorherigen Events</div>',BGCOLOR,'#000000',BORDERSTYLE,'solid',BORDERCOLOR,'#F0D070',FONTCOLOR,'#d4d4d4',FONTSIZE,'11px',JUMPHORZ,true,PADDING,15,TEXTALIGN,'left',ABOVE,true)\" onmouseout=\"UnTip()\" /></td></tr> |
|---|
| 1495 | <tr><td align=\"center\"><table><tr><td colspan=\"10\" align=\"center\"><b>Start-Teleport</b></td></tr><tr><td>Map:</td><td><input type=\"text\" name=\"ev_map\" autocomplete=\"off\" size=\"3\" /></td><td>Zone:</td><td><input type=\"text\" name=\"ev_zone\" autocomplete=\"off\" size=\"3\" /></td><td>PosX:</td><td><input type=\"text\" name=\"ev_posx\" autocomplete=\"off\" size=\"3\" /></td><td>PosY:</td><td><input type=\"text\" name=\"ev_posy\" autocomplete=\"off\" size=\"3\" /></td><td>PosZ:</td><td><input type=\"text\" name=\"ev_posz\" autocomplete=\"off\" size=\"3\" /></td></tr></table></td></tr> |
|---|
| 1496 | <tr><td align=\"center\"><input type=\"submit\" name=\"submit\" value=\"Eintragen\" /> <input type=\"reset\" name=\"submit\" value=\"Zurücksetzen\" /></td></tr> |
|---|
| 1497 | </table> |
|---|
| 1498 | </form></center>"; |
|---|
| 1499 | |
|---|
| 1500 | return $code . $event_code; |
|---|
| 1501 | } |
|---|
| 1502 | |
|---|
| 1503 | if ( $sub == 'list' ) { |
|---|
| 1504 | $get_events_sql = "SELECT * FROM `event_cal_main` ORDER BY `name`"; |
|---|
| 1505 | $get_events_query = $this->query ( $get_events_sql, $this->forum_db ); |
|---|
| 1506 | |
|---|
| 1507 | $events = array (); |
|---|
| 1508 | |
|---|
| 1509 | while ( $event = $this->fetch_row ( $get_events_query ) ) { |
|---|
| 1510 | $get_event_days_sql = "SELECT DAY(`date`),MONTH(`date`),`date` FROM `event_cal_dates` WHERE `event` = {$event[0]}"; |
|---|
| 1511 | $get_event_days_query = $this->query ( $get_event_days_sql, $this->forum_db ); |
|---|
| 1512 | $days = array (); |
|---|
| 1513 | |
|---|
| 1514 | while ( $day_t = $this->fetch_row ( $get_event_days_query ) ) |
|---|
| 1515 | $days [ ] = array ( ( ( empty ( $day_t [0] ) ) ? $day_t [2] : $day_t [0] ), $day_t [2] ); |
|---|
| 1516 | |
|---|
| 1517 | if ( $event [5] > 0 ) $date_holder = "alle {$event[5]} Tage"; |
|---|
| 1518 | else if ( ! empty ( $days [0] [0] ) && ! is_numeric ( $days [0] [0] ) ) { |
|---|
| 1519 | $each_final = ""; |
|---|
| 1520 | $tot_each = count ( $days ); |
|---|
| 1521 | $each_counter = 1; |
|---|
| 1522 | $each_tile = array (); |
|---|
| 1523 | $date_holder = ""; |
|---|
| 1524 | |
|---|
| 1525 | foreach ( $days as $each_day ) { |
|---|
| 1526 | switch ( $each_day [0] ) |
|---|
| 1527 | { |
|---|
| 1528 | case "Mon": |
|---|
| 1529 | $each = "Monatg"; |
|---|
| 1530 | break; |
|---|
| 1531 | case "Tue": |
|---|
| 1532 | $each = "Dienstag"; |
|---|
| 1533 | break; |
|---|
| 1534 | case "Wed": |
|---|
| 1535 | $each = "Mittwoch"; |
|---|
| 1536 | break; |
|---|
| 1537 | case "Thu": |
|---|
| 1538 | $each = "Donnerstag"; |
|---|
| 1539 | break; |
|---|
| 1540 | case "Fri": |
|---|
| 1541 | $each = "Freitag"; |
|---|
| 1542 | break; |
|---|
| 1543 | case "Sat": |
|---|
| 1544 | $each = "Samstag"; |
|---|
| 1545 | break; |
|---|
| 1546 | case "Sun": |
|---|
| 1547 | $each = "Sonntag"; |
|---|
| 1548 | break; |
|---|
| 1549 | default: |
|---|
| 1550 | $each = ""; |
|---|
| 1551 | break; |
|---|
| 1552 | } |
|---|
| 1553 | |
|---|
| 1554 | $each_tile [ ] = $each; |
|---|
| 1555 | sort ( $each_tile ); |
|---|
| 1556 | } |
|---|
| 1557 | |
|---|
| 1558 | foreach ( $each_tile as $tile ) { |
|---|
| 1559 | $each_final .= $tile; |
|---|
| 1560 | if ( $each_counter < $tot_each ) $each_final .= ", "; |
|---|
| 1561 | $each_counter ++; |
|---|
| 1562 | } |
|---|
| 1563 | if ( ! empty ( $each_final ) ) $date_holder = "jeden " . $each_final; |
|---|
| 1564 | } |
|---|
| 1565 | else { |
|---|
| 1566 | $days_count = count ( $days ); |
|---|
| 1567 | |
|---|
| 1568 | if ( $days_count > 1 ) $date_holder = "Mehr als ein Datum"; |
|---|
| 1569 | else if ( $days_count == 1 ) { |
|---|
| 1570 | $date_tile = explode ( "-", $days [0] [1] ); |
|---|
| 1571 | $date_holder = $date_tile [2] . "." . $date_tile [1] . "." . $date_tile [0]; |
|---|
| 1572 | } |
|---|
| 1573 | else |
|---|
| 1574 | $date_holder = ""; |
|---|
| 1575 | } |
|---|
| 1576 | |
|---|
| 1577 | if ( ! empty ( $event [6] ) || ! empty ( $event [10] ) ) $reward = "<font color=\"green\">JA</font>"; |
|---|
| 1578 | else $reward = "<font color=\"black\">NEIN</font>"; |
|---|
| 1579 | |
|---|
| 1580 | if ( $event [4] == 1 ) $regable = "<font color=\"green\">JA</font>"; |
|---|
| 1581 | else $regable = "<font color=\"black\">NEIN</font>"; |
|---|
| 1582 | |
|---|
| 1583 | $events [ ] = array ( $event [0], $days, $event [1], $event [3], $date_holder, $regable, $reward ); |
|---|
| 1584 | } |
|---|
| 1585 | $event_code = "<center><table><tr><td><b>Datum</b></td><td><b>Name</b></td><td><b>Registrierbar</b></td><td><b>Belohnung</b></td><td><b>Foren Topic</b></td><td></td></tr>"; |
|---|
| 1586 | foreach ( $events as $cur_event ) { |
|---|
| 1587 | $url = "Keiner"; |
|---|
| 1588 | if ( ! empty ( $cur_event [3] ) ) $url = "<a href=\"{$cur_event[3]}\" target=\"_blank\">Thema Anzeigen</a>"; |
|---|
| 1589 | $event_code .= "<tr><td valign=\"top\">{$cur_event[4]}</td><td valign=\"top\"><a href=\"portal.php?mod=lol_control&modus=ev_cal&eid={$cur_event[0]}&s=edit\">{$cur_event[2]}</a></td><td valign=\"top\">{$cur_event[5]}</td><td valign=\"top\">{$cur_event[6]}</td><td valign=\"top\">{$url}</td><td><a href=\"portal.php?mod=lol_control&modus=ev_cal&eid={$cur_event[0]}&s=del\">X</a></td></tr><tr><td colspan=\"6\"></td></tr>"; |
|---|
| 1590 | } |
|---|
| 1591 | $event_code .= "</table></center>"; |
|---|
| 1592 | |
|---|
| 1593 | return $code . $event_code; |
|---|
| 1594 | } |
|---|
| 1595 | |
|---|
| 1596 | if ( $sub == 'edit' ) { |
|---|
| 1597 | $id = isset ( $_GET ['eid'] ) ? $_GET ['eid'] : false; |
|---|
| 1598 | $da = isset ( $_GET ['da'] ) ? $_GET ['da'] : false; |
|---|
| 1599 | $submit = $this->check_post_data ( $data, 'submit' ); |
|---|
| 1600 | $dates_del = $this->check_post_data ( $data, 'date_del' ); |
|---|
| 1601 | $mem_update = isset ( $_GET ['ev_mem_update'] ) ? $_GET ['ev_mem_update'] : false; |
|---|
| 1602 | $mem_del = isset ( $_GET ['ev_mem_del'] ) ? $_GET ['ev_mem_del'] : false; |
|---|
| 1603 | $mem_name = isset ( $_GET ['ev_mem_name'] ) ? $_GET ['ev_mem_name'] : false; |
|---|
| 1604 | $rewardpos = $this->check_post_data ( $data, 'rewardpos' ); |
|---|
| 1605 | $memberspd = $this->check_post_data ( $data, 'ev_regged_members_data' ); |
|---|
| 1606 | $set_blocked = isset ( $_GET ['ev_blocked'] ) ? $_GET ['ev_blocked'] : false; |
|---|
| 1607 | $do_reward = isset ( $_GET ['ev_reward_mem'] ) ? $_GET ['ev_reward_mem'] : false; |
|---|
| 1608 | |
|---|
| 1609 | if ( $da && ! $id ) $this->do_exit ( $code . "<font color=\"red\">Fehler: Leider wurde keine event ID übergeben.</font>" ); |
|---|
| 1610 | if ( ! $id ) return $code . "<font color=\"red\">Fehler: Leider wurde keine event ID übergeben.</font>"; |
|---|
| 1611 | |
|---|
| 1612 | if ( $da == 'upd_dates' ) $submit = true; |
|---|
| 1613 | |
|---|
| 1614 | $get_event_sql = "SELECT * FROM `event_cal_main` WHERE `id` = " . $id; |
|---|
| 1615 | $get_event_query = $this->query ( $get_event_sql, $this->forum_db ); |
|---|
| 1616 | $get_event = $this->fetch_array ( $get_event_query ); |
|---|
| 1617 | |
|---|
| 1618 | if ( $submit && ! $da ) { |
|---|
| 1619 | if ( empty ( $ev_name ) ) $this->do_exit ( "<font color=\"red\">Fehler: Leider ist der Eventname leer!</font>" ); |
|---|
| 1620 | $update_sql = "UPDATE `event_cal_main` SET `name` = '{$ev_name}', `description` = '{$ev_desc}', `forum_topic_url` = '{$ev_url}', `regable` = '{$ev_regable}', `repeat_days` = '{$ev_intervall}', `global_reward_id1` = '{$ev_reward_global1}', `global_reward_id2` = '{$ev_reward_global2}', `global_reward_amount1` = '{$ev_reward_global_amount1}', `global_reward_amount2` = '{$ev_reward_global_amount2}', `global_reward_points` = '{$ev_reward_global_points}', `reward_id1` = '{$ev_reward1}', `reward_id2` = '{$ev_reward2}', `reward_id3` = '{$ev_reward3}', `reward_id4` = '{$ev_reward4}', `reward_id5` = '{$ev_reward5}', `reward_id6` = '{$ev_reward6}', `reward_id7` = '{$ev_reward7}', `reward_id8` = '{$ev_reward8}', `reward_id9` = '{$ev_reward9}', `reward_id10` = '{$ev_reward10}', `reward_amount1` = '{$ev_reward_amount1}', `reward_amount2` = '{$ev_reward_amount2}', `reward_amount3` = '{$ev_reward_amount3}', `reward_amount4` = '{$ev_reward_amount4}', `reward_amount5` = '{$ev_reward_amount5}', `reward_amount6` = '{$ev_reward_amount6}', `reward_amount7` = '{$ev_reward_amount7}', `reward_amount8` = '{$ev_reward_amount8}', `reward_amount9` = '{$ev_reward_amount9}', `reward_amount10` = '{$ev_reward_amount10}', `reward_points1` = '{$ev_reward_points1}', `reward_points2` = '{$ev_reward_points2}', `reward_points3` = '{$ev_reward_points3}', `reward_points4` = '{$ev_reward_points4}', `reward_points5` = '{$ev_reward_points5}', `reward_points6` = '{$ev_reward_points6}', `reward_points7` = '{$ev_reward_points7}', `reward_points8` = '{$ev_reward_points8}', `reward_points9` = '{$ev_reward_points9}', `reward_points10` = '{$ev_reward_points10}', `levelcap` = '{$ev_levelcap}', `map` = '{$ev_map}', `zone` = '{$ev_zone}', `posx` = '{$ev_posx}', `posy` = '{$ev_posy}', `posz` = '{$ev_posz}', `regcap` = '{$ev_reggcap}', `prev` = '{$ev_prev}' WHERE `id` =" . $id; |
|---|
| 1621 | $update = $this->query ( $update_sql, $this->forum_db ); |
|---|
| 1622 | print_r ( $this->error ( $this->forum_db ) ); |
|---|
| 1623 | print '<br>'; |
|---|
| 1624 | if ( ! $ev_start ) $this->do_exit ( '<font color="green">Event wurde erfolgreich geupdated</font>' ); |
|---|
| 1625 | else if ( $ev_start ) $da = 'add_dates'; |
|---|
| 1626 | else $this->do_exit ( '<font color="red">Fehler: Update des Events fehlgeschlagen...</font>' ); |
|---|
| 1627 | } |
|---|
| 1628 | |
|---|
| 1629 | if ( $submit && $da == 'del_dates' && $dates_del ) { |
|---|
| 1630 | $num_del = count ( $dates_del ); |
|---|
| 1631 | $get_dates_count_sql = "SELECT `date` FROM `event_cal_dates` WHERE `event` = " . $id; |
|---|
| 1632 | $get_dates_count_query = $this->query ( $get_dates_count_sql, $this->forum_db ); |
|---|
| 1633 | $dates_num = $this->num_rows ( $get_dates_count_query ); |
|---|
| 1634 | |
|---|
| 1635 | for ( $i = 0; $i <= ( $num_del - ( ( $num_del >= $dates_num ) ? 1 : 0 ) ); $i ++ ) |
|---|
| 1636 | $del_dates_query = $this->query ( "DELETE FROM `event_cal_dates` WHERE `event` = {$id} AND `date` = '{$dates_del[$i]}'", $this->forum_db ); |
|---|
| 1637 | } |
|---|
| 1638 | |
|---|
| 1639 | if ( $submit && $da == 'add_dates' && $ev_start ) { |
|---|
| 1640 | $event_id = $id; |
|---|
| 1641 | $start_date = explode ( ".", $ev_start ); |
|---|
| 1642 | $start_date = mktime ( 0, 0, 0, $start_date [1], $start_date [0], $start_date [2] ); |
|---|
| 1643 | $end_date = explode ( ".", $ev_end ); |
|---|
| 1644 | $end_date = mktime ( 0, 0, 0, $end_date [1], $end_date [0], $end_date [2] ); |
|---|
| 1645 | |
|---|
| 1646 | if ( $ev_end !== 0 ) { |
|---|
| 1647 | if ( $ev_intervall > 0 ) { |
|---|
| 1648 | for ( $i = $start_date; $i <= $end_date; $i = strtotime ( "+$ev_intervall days", $i ) ) { |
|---|
| 1649 | $temp_d = date ( "Y-m-d", $i ); |
|---|
| 1650 | $intervall_query = $this->query ( "INSERT INTO `event_cal_dates` VALUES({$event_id},'{$temp_d}')", $this->forum_db ); |
|---|
| 1651 | } |
|---|
| 1652 | } |
|---|
| 1653 | else { |
|---|
| 1654 | for ( $i = $start_date; $i <= $end_date; $i = strtotime ( "+1 days", $i ) ) { |
|---|
| 1655 | $temp_d = date ( "Y-m-d", $i ); |
|---|
| 1656 | $intervall_query2 = $this->query ( "INSERT INTO `event_cal_dates` VALUES({$event_id},'{$temp_d}')", $this->forum_db ); |
|---|
| 1657 | } |
|---|
| 1658 | } |
|---|
| 1659 | } |
|---|
| 1660 | else { |
|---|
| 1661 | $temp_d = date ( "Y-m-d", $start_date ); |
|---|
| 1662 | $intervall_query3 = $this->query ( "INSERT INTO `event_cal_dates` VALUES({$event_id},'{$temp_d}')", $this->forum_db ); |
|---|
| 1663 | } |
|---|
| 1664 | $this->do_exit ( '<font color="green">Event wurde geupdated und die Daten hinzugefügt, bitte Update Button bei dem Datums-Select Klicken!</font>' ); |
|---|
| 1665 | } |
|---|
| 1666 | |
|---|
| 1667 | $get_event_days_sql = "SELECT DAY(`date`),MONTH(`date`),YEAR(`date`),`date`,`event` FROM `event_cal_dates` WHERE `event` = " . $id; |
|---|
| 1668 | $get_event_days_query = $this->query ( $get_event_days_sql, $this->forum_db ); |
|---|
| 1669 | |
|---|
| 1670 | $dates_holder = ''; |
|---|
| 1671 | |
|---|
| 1672 | while ( $date = $this->fetch_row ( $get_event_days_query ) ) |
|---|
| 1673 | $dates_holder .= "<option value=\"{$date[3]}\">" . ( ( empty ( $date [0] ) || empty ( $date [1] ) || empty ( $date [2] ) ) ? $date [3] : sprintf ( "%02d", $date [0] ) . "." . sprintf ( "%02d", $date [1] ) . "." . $date [2] ) . "</option>"; |
|---|
| 1674 | |
|---|
| 1675 | if ( $submit && $da ) $this->do_exit ( "<select name=\"date_del[]\" size=\"8\" style=\"width:200px;text-align:center;\" MULTIPLE>{$dates_holder}</select>" ); |
|---|
| 1676 | |
|---|
| 1677 | $regable = ( $get_event ['regable'] == 1 ) ? ' CHECKED' : ''; |
|---|
| 1678 | |
|---|
| 1679 | if ( $mem_update ) { |
|---|
| 1680 | if ( $rewardpos !== false && is_array ( $rewardpos ) ) foreach ( $rewardpos as $key => $value ) { |
|---|
| 1681 | $mem_update_sql = "UPDATE `event_cal_reg` SET `reward_pos` = '{$value}' WHERE `account` = '{$key}' AND `event` = '{$id}'"; |
|---|
| 1682 | $mem_update_query = $this->query ( $mem_update_sql, $this->forum_db ); |
|---|
| 1683 | } |
|---|
| 1684 | } |
|---|
| 1685 | |
|---|
| 1686 | if ( $mem_del ) { |
|---|
| 1687 | if ( $mem_name && $id ) { |
|---|
| 1688 | $mem_del_sql = "DELETE FROM `event_cal_reg` WHERE `account` = '{$mem_name}' AND `event` = '{$id}'"; |
|---|
| 1689 | $mem_del_query = $this->query ( $mem_del_sql, $this->forum_db ); |
|---|
| 1690 | } |
|---|
| 1691 | } |
|---|
| 1692 | |
|---|
| 1693 | if ( $set_blocked ) { |
|---|
| 1694 | if ( $mem_name && $id ) { |
|---|
| 1695 | $get_blocked_sql = "SELECT `blocked` FROM `event_cal_reg` WHERE `account` = '{$mem_name}' AND `event` = '{$id}'"; |
|---|
| 1696 | $get_blocked = $this->result ( $this->query ( $get_blocked_sql, $this->forum_db ) ); |
|---|
| 1697 | $blocked = ( $get_blocked == 1 ) ? 0 : 1; |
|---|
| 1698 | $mem_blocked_sql = "UPDATE `event_cal_reg` SET `blocked` = '{$blocked}' WHERE `account` = '{$mem_name}' AND `event` = '{$id}'"; |
|---|
| 1699 | $mem_blocked_query = $this->query ( $mem_blocked_sql, $this->forum_db ); |
|---|
| 1700 | $this->do_exit ( ( $blocked == 1 ) ? '<font color="red">Ja</font>' : '<font color="green">Nein</font>' ); |
|---|
| 1701 | } |
|---|
| 1702 | } |
|---|
| 1703 | |
|---|
| 1704 | $get_event_registered_members_sql = "SELECT * FROM `event_cal_reg` WHERE `event` = {$id} ORDER BY FIELD(`reward_pos`, 1,2,3,4,5,6,7,8,9,10,0)"; |
|---|
| 1705 | $get_event_registered_members = $this->query ( $get_event_registered_members_sql, $this->forum_db ); |
|---|
| 1706 | $num_regged_members = $this->num_rows ( $get_event_registered_members ); |
|---|
| 1707 | $registered_members = ''; |
|---|
| 1708 | $rewards = array (); |
|---|
| 1709 | |
|---|
| 1710 | if ( $do_reward ) { |
|---|
| 1711 | $get_rewards_sql = "SELECT `global_reward_id1`,`global_reward_id2`,`global_reward_amount1`,`global_reward_amount2`,`global_reward_points`,`reward_id1`,`reward_id2`,`reward_id3`,`reward_id4`,`reward_id5`,`reward_id6`,`reward_id7`,`reward_id8`,`reward_id9`,`reward_id10`,`reward_amount1`,`reward_amount2`,`reward_amount3`,`reward_amount4`,`reward_amount5`,`reward_amount6`,`reward_amount7`,`reward_amount8`,`reward_amount9`,`reward_amount10`,`reward_points1`,`reward_points2`,`reward_points3`,`reward_points4`,`reward_points5`,`reward_points6`,`reward_points7`,`reward_points8`,`reward_points9`,`reward_points10` FROM `event_cal_main` WHERE `id` = '{$id}'"; |
|---|
| 1712 | $rewards_query = $this->query ( $get_rewards_sql, $this->forum_db ); |
|---|
| 1713 | $rewards = $this->fetch_array ( $rewards_query ); |
|---|
| 1714 | } |
|---|
| 1715 | |
|---|
| 1716 | while ( $mdata = $this->fetch_row ( $get_event_registered_members ) ) { |
|---|
| 1717 | $rewarded = false; |
|---|
| 1718 | $glob_rewarded = false; |
|---|
| 1719 | $rew = array (); |
|---|
| 1720 | $grew = array (); |
|---|
| 1721 | |
|---|
| 1722 | if ( $do_reward && $mdata [7] == 0 && $mdata [9] != 1 ) { |
|---|
| 1723 | switch ( $mdata [8] ) |
|---|
| 1724 | { |
|---|
| 1725 | case 1: |
|---|
| 1726 | if ( $rewards ['reward_id1'] != 0 ) $rew [ ] = $this->generate_gift_code ( $rewards ['reward_id1'], 1, $rewards ['reward_amount1'], $this->get_account_id_name ( $mdata [1] ) ); |
|---|
| 1727 | if ( $rewards ['reward_points1'] != 0 ) $poin1 = $this->community_points_add_rem ( $mdata [1], 'event', $rewards ['reward_points1'] ); |
|---|
| 1728 | break; |
|---|
| 1729 | case 2: |
|---|
| 1730 | if ( $rewards ['reward_id2'] != 0 ) $rew [ ] = $this->generate_gift_code ( $rewards ['reward_id2'], 1, $rewards ['reward_amount2'], $this->get_account_id_name ( $mdata [1] ) ); |
|---|
| 1731 | if ( $rewards ['reward_points2'] != 0 ) $poin2 = $this->community_points_add_rem ( $mdata [1], 'event', $rewards ['reward_points2'] ); |
|---|
| 1732 | break; |
|---|
| 1733 | case 3: |
|---|
| 1734 | if ( $rewards ['reward_id3'] != 0 ) $rew [ ] = $this->generate_gift_code ( $rewards ['reward_id3'], 1, $rewards ['reward_amount3'], $this->get_account_id_name ( $mdata [1] ) ); |
|---|
| 1735 | if ( $rewards ['reward_points3'] != 0 ) $poin3 = $this->community_points_add_rem ( $mdata [1], 'event', $rewards ['reward_points3'] ); |
|---|
| 1736 | break; |
|---|
| 1737 | case 4: |
|---|
| 1738 | if ( $rewards ['reward_id4'] != 0 ) $rew [ ] = $this->generate_gift_code ( $rewards ['reward_id4'], 1, $rewards ['reward_amount4'], $this->get_account_id_name ( $mdata [1] ) ); |
|---|
| 1739 | if ( $rewards ['reward_points4'] != 0 ) $poin4 = $this->community_points_add_rem ( $mdata [1], 'event', $rewards ['reward_points4'] ); |
|---|
| 1740 | break; |
|---|
| 1741 | case 5: |
|---|
| 1742 | if ( $rewards ['reward_id5'] != 0 ) $rew [ ] = $this->generate_gift_code ( $rewards ['reward_id5'], 1, $rewards ['reward_amount5'], $this->get_account_id_name ( $mdata [1] ) ); |
|---|
| 1743 | if ( $rewards ['reward_points5'] != 0 ) $poin5 = $this->community_points_add_rem ( $mdata [1], 'event', $rewards ['reward_points5'] ); |
|---|
| 1744 | break; |
|---|
| 1745 | case 6: |
|---|
| 1746 | if ( $rewards ['reward_id6'] != 0 ) $rew [ ] = $this->generate_gift_code ( $rewards ['reward_id6'], 1, $rewards ['reward_amount6'], $this->get_account_id_name ( $mdata [1] ) ); |
|---|
| 1747 | if ( $rewards ['reward_points6'] != 0 ) $poin6 = $this->community_points_add_rem ( $mdata [1], 'event', $rewards ['reward_points6'] ); |
|---|
| 1748 | break; |
|---|
| 1749 | case 7: |
|---|
| 1750 | if ( $rewards ['reward_id7'] != 0 ) $rew [ ] = $this->generate_gift_code ( $rewards ['reward_id7'], 1, $rewards ['reward_amount7'], $this->get_account_id_name ( $mdata [1] ) ); |
|---|
| 1751 | if ( $rewards ['reward_points7'] != 0 ) $poin7 = $this->community_points_add_rem ( $mdata [1], 'event', $rewards ['reward_points7'] ); |
|---|
| 1752 | break; |
|---|
| 1753 | case 8: |
|---|
| 1754 | if ( $rewards ['reward_id8'] != 0 ) $rew [ ] = $this->generate_gift_code ( $rewards ['reward_id8'], 1, $rewards ['reward_amount8'], $this->get_account_id_name ( $mdata [1] ) ); |
|---|
| 1755 | if ( $rewards ['reward_points8'] != 0 ) $poin8 = $this->community_points_add_rem ( $mdata [1], 'event', $rewards ['reward_points8'] ); |
|---|
| 1756 | break; |
|---|
| 1757 | case 9: |
|---|
| 1758 | if ( $rewards ['reward_id9'] != 0 ) $rew [ ] = $this->generate_gift_code ( $rewards ['reward_id9'], 1, $rewards ['reward_amount9'], $this->get_account_id_name ( $mdata [1] ) ); |
|---|
| 1759 | if ( $rewards ['reward_points1'] != 0 ) $poin9 = $this->community_points_add_rem ( $mdata [1], 'event', $rewards ['reward_points9'] ); |
|---|
| 1760 | break; |
|---|
| 1761 | case 10: |
|---|
| 1762 | if ( $rewards ['reward_id10'] != 0 ) $rew [ ] = $this->generate_gift_code ( $rewards ['reward_id10'], 1, $rewards ['reward_amount10'], $this->get_account_id_name ( $mdata [1] ) ); |
|---|
| 1763 | if ( $rewards ['reward_points10'] != 0 ) $poin10 = $this->community_points_add_rem ( $mdata [1], 'event', $rewards ['reward_points10'] ); |
|---|
| 1764 | break; |
|---|
| 1765 | } |
|---|
| 1766 | if ( in_array ( $mdata [8], array ( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ) ) ) $rewarded = true; |
|---|
| 1767 | if ( $rewards ['global_reward_id1'] != 0 ) { |
|---|
| 1768 | $grew [ ] = $this->generate_gift_code ( $rewards ['global_reward_id1'], 1, $rewards ['global_reward_amount1'], $this->get_account_id_name ( $mdata [1] ) ); |
|---|
| 1769 | $glob_rewarded = true; |
|---|
| 1770 | } |
|---|
| 1771 | if ( $rewards ['global_reward_id2'] != 0 ) $grew [ ] = $this->generate_gift_code ( $rewards ['global_reward_id2'], 1, $rewards ['global_reward_amount2'], $this->get_account_id_name ( $mdata [1] ) ); |
|---|
| 1772 | if ( $rewards ['global_reward_points'] != 0 ) { |
|---|
| 1773 | $gp = $this->community_points_add_rem ( $mdata [1], 'event', $rewards ['global_reward_points'] ); |
|---|
| 1774 | $glob_rewarded = true; |
|---|
| 1775 | } |
|---|
| 1776 | |
|---|
| 1777 | $rewc = count ( $grew ) + count ( $rew ); |
|---|
| 1778 | |
|---|
| 1779 | if ( $rewc > 0 ) { |
|---|
| 1780 | $update_rewarded_sql = "UPDATE `event_cal_reg` SET `rewarded` = 1 WHERE `event` = {$id} AND `account` = '{$mdata [1]}'"; |
|---|
| 1781 | $update_rewarded_query = $this->query ( $update_rewarded_sql, $this->forum_db ); |
|---|
| 1782 | |
|---|
| 1783 | $plural [ ] = ( $rewc > 1 ) ? 'en' : ''; |
|---|
| 1784 | $plural [ ] = ( $rewc > 1 ) ? 'e' : 'en'; |
|---|
| 1785 | $plural [ ] = ( $rewc > 1 ) ? 'es' : 'e'; |
|---|
| 1786 | $plural [ ] = ( $rewc > 1 ) ? 'se' : 'ser'; |
|---|
| 1787 | $plural [ ] = ( $rewc > 1 ) ? 'ten' : 'tet'; |
|---|
| 1788 | $rew_codes = ''; |
|---|
| 1789 | |
|---|
| 1790 | foreach ( $grew as $gtcode ) |
|---|
| 1791 | $rew_codes .= $gtcode . '<br>'; |
|---|
| 1792 | foreach ( $rew as $tcode ) |
|---|
| 1793 | $rew_codes .= $tcode . '<br>'; |
|---|
| 1794 | |
|---|
| 1795 | $reward_subject = "Deine Event Belohnung{$plural[0]}"; |
|---|
| 1796 | $reward_message = "Herzlichen Glückwunsch!<br><br>Du hast an einem Event teilgenommen und bekommst hiermit dein{$plural[1]} Cod{$plural[2]}. Die{$plural[3]} lau{$plural[4]} wie folgt:<br>{$rew_codes}<br>Einlösen kannst du sie beim Codebot, der in jeder Hauptstadt vor oder in einem Auktionshaus steht!<br>Sollte es Punkte für das Event gegeben haben, so werden dir diese separat in deinem Punktekonto gutgeschrieben (Kontoübersicht).<br><br>MFG<br>Dein Land of Legends Team"; |
|---|
| 1797 | $this->phpbb_send_pm ( $this->get_forum_id ( $mdata [1] ), $reward_subject, $reward_message ); |
|---|
| 1798 | } |
|---|
| 1799 | } |
|---|
| 1800 | |
|---|
| 1801 | $rewpos = $glob_rewarded ? ( $rewarded ? "Glob.+Norm. {$mdata [8]}" : "Glob." ) : ( $rewarded ? "Norm. {$mdata [8]}" : "<input type=\"text\" size=\"2\" name=\"rewardpos[{$mdata[1]}]\" value=\"{$mdata[8]}\" />" ); |
|---|
| 1802 | $blocked = ( $mdata [7] == 1 ) ? '<font color="red">Ja</font>' : '<font color="green">Nein</font>'; |
|---|
| 1803 | $registered_members .= "<tr><td>{$mdata[1]}<input type=\"hidden\" name=\"ev_regged_members_data[{$mdata[1]}]\" value=\"{$mdata[1]}||{$mdata[2]}||{$mdata[7]}||{$mdata[8]}\" /></td><td>{$mdata[2]}</td><td>{$mdata[3]}</td><td><img src=\"images/raceclass/{$mdata[4]}-{$mdata[6]}.gif\" /></td><td><img src=\"images/raceclass/{$mdata[5]}.gif\" /></td><td><span id=\"cb_{$mdata[1]}\" onclick=\"get_content('cb_{$mdata[1]}','portal.php?mod=lol_control&modus=ev_cal&s=edit&eid={$id}&ev_blocked=true&ev_mem_name={$mdata[1]}','get');\">{$blocked}</span></td><td>{$rewpos}</td><td align=\"center\"><a href=\"javascript:void(0);\" onclick=\"get_content('registered_members','portal.php?mod=lol_control&modus=ev_cal&s=edit&eid={$id}&ev_mem_del=true&ev_mem_name={$mdata[1]}','get');\">X</a></td></tr>"; |
|---|
| 1804 | } |
|---|
| 1805 | |
|---|
| 1806 | $registered_template = "Es sind {$num_regged_members} Charaktere registriert<br><table><tr style=\"font-weight: bold;\"><td>Account</td><td>Charakter</td><td>Level</td><td>Rasse</td><td>Klasse</td><td>Gesperrt</td><td>Platz</td><td>Löschen</td></tr>%s</table>"; |
|---|
| 1807 | |
|---|
| 1808 | if ( empty ( $registered_members ) ) $registered_members = sprintf ( $registered_template, "<tr><td colspan=\"8\" align=\"center\">Niemand hat sich angemeldet!</td></tr>" ); |
|---|
| 1809 | else $registered_members = sprintf ( $registered_template, $registered_members ); |
|---|
| 1810 | |
|---|
| 1811 | if ( $mem_update || $mem_del || $do_reward ) $this->do_exit ( $registered_members ); |
|---|
| 1812 | |
|---|
| 1813 | $event_code = "<form onsubmit=\"ajaxUpload(this,'portal.php?mod=lol_control&modus=ev_cal&s=edit&eid={$id}','content_update','<center>Wird geändert...</center>','<center>Javascript: Fehler?</center>'); return false;\"> |
|---|
| 1814 | <table> |
|---|
| 1815 | <tr><td align=\"center\"><div id=\"content_update\"></div></td></tr> |
|---|
| 1816 | <tr><td align=\"center\"><b>Name</b></td></tr> |
|---|
| 1817 | <tr><td align=\"center\"><input type=\"text\" name=\"ev_name\" autocomplete=\"off\" value=\"{$get_event['name']}\" /></td></tr> |
|---|
| 1818 | <tr><td align=\"center\"><b>Datumseinstellungen</b></td></tr> |
|---|
| 1819 | <tr><td align=\"center\"> |
|---|
| 1820 | <table style=\"border-width:1px;border-style:solid;border-color:black;\"> |
|---|
| 1821 | <tr><td>Start Datum:</td><td><input type=\"text\" name=\"ev_start\" id=\"ev_start\" onmouseover=\"Tip('Start Datum des Events</div>',BGCOLOR,'#000000',BORDERSTYLE,'solid',BORDERCOLOR,'#F0D070',FONTCOLOR,'#d4d4d4',FONTSIZE,'11px',JUMPHORZ,true,PADDING,15,TEXTALIGN,'left',ABOVE,true)\" onmouseout=\"UnTip()\" autocomplete=\"off\" /></td></tr> |
|---|
| 1822 | <tr><td>End Datum:</td><td><input type=\"text\" name=\"ev_end\" id=\"ev_end\" onmouseover=\"Tip('Wenn nur ein Datum leer lassen!<br>Wenn gesetzt wird das Event für jeden Tag eingetragen<br>der vom Start Datum bis zum End Datum geht</div>',BGCOLOR,'#000000',BORDERSTYLE,'solid',BORDERCOLOR,'#F0D070',FONTCOLOR,'#d4d4d4',FONTSIZE,'11px',JUMPHORZ,true,PADDING,15,TEXTALIGN,'left',ABOVE,true)\" onmouseout=\"UnTip()\" autocomplete=\"off\" /></td></tr> |
|---|
| 1823 | <tr><td>Intervall (Tage):</td><td><input type=\"text\" name=\"ev_intervall\" onmouseover=\"Tip('Wenn gesetzt wird das Event alle x Tage<br>vom Start Datum bis zum End Datum eingetragen!</div>',BGCOLOR,'#000000',BORDERSTYLE,'solid',BORDERCOLOR,'#F0D070',FONTCOLOR,'#d4d4d4',FONTSIZE,'11px',JUMPHORZ,true,PADDING,15,TEXTALIGN,'left',ABOVE,true)\" onmouseout=\"UnTip()\" autocomplete=\"off\" /></td></tr> |
|---|
| 1824 | </table></td></tr> |
|---|
| 1825 | <tr><td align=\"center\"><b>Aktuelle Daten</b></td></tr> |
|---|
| 1826 | <tr><td align=\"center\"><form id=\"date_form\" name=\"date_form\"><table style=\"border-width:1px;border-style:solid;border-color:black;\"> |
|---|
| 1827 | <tr><td align=\"center\"><div id=\"dates\"><select name=\"date_del[]\" size=\"8\" style=\"width:200px;text-align:center;\" MULTIPLE>{$dates_holder}</select></div></td></tr> |
|---|
| 1828 | <tr><td align=\"center\"><input type=\"button\" value=\"Update\" onclick=\"get_content('dates','portal.php?mod=lol_control&modus=ev_cal&s=edit&eid={$id}&da=upd_dates','get');\" /> <input type=\"submit\" name=\"submit\" value=\"Löschen\" onclick=\"ajaxUpload(this.form,'portal.php?mod=lol_control&modus=ev_cal&s=edit&eid={$id}&da=del_dates','dates','<center>Werden gelöscht...</center>','<center>Javascript: Fehler?</center>'); return false;\" /></td></tr> |
|---|
| 1829 | </table></form> |
|---|
| 1830 | <script type=\"text/javascript\"> |
|---|
| 1831 | // <![CDATA[ |
|---|
| 1832 | var opts = {formElements:{\"ev_start\":\"d-dt-m-dt-Y\"}}; |
|---|
| 1833 | var opts2 = {formElements:{\"ev_end\":\"d-dt-m-dt-Y\"}}; |
|---|
| 1834 | datePickerController.createDatePicker(opts); |
|---|
| 1835 | datePickerController.createDatePicker(opts2); |
|---|
| 1836 | // ]]> |
|---|
| 1837 | </script> |
|---|
| 1838 | </td></tr> |
|---|
| 1839 | <tr><td align=\"center\"><b>Beschreibung</b></td></tr> |
|---|
| 1840 | <tr><td align=\"center\"><textarea cols=\"30\" rows=\"4\" name=\"ev_desc\">{$get_event['description']}</textarea></td></tr> |
|---|
| 1841 | <tr><td align=\"center\"><b>Forum Topic URL</b></td></tr> |
|---|
| 1842 | <tr><td align=\"center\"><input type=\"text\" name=\"ev_forum_topic_url\" onmouseover=\"Tip('Falls es einen Forentopic gibt hier die Url Eintragen.</div>',BGCOLOR,'#000000',BORDERSTYLE,'solid',BORDERCOLOR,'#F0D070',FONTCOLOR,'#d4d4d4',FONTSIZE,'11px',JUMPHORZ,true,PADDING,15,TEXTALIGN,'left',ABOVE,true)\" onmouseout=\"UnTip()\" autocomplete=\"off\" value=\"{$get_event['forum_topic_url']}\" /></td></tr> |
|---|
| 1843 | <tr><td align=\"center\"><b>Belohnungen - Global</b></td></tr> |
|---|
| 1844 | <tr><td align=\"center\"><table> |
|---|
| 1845 | <tr><td>ID 01:</td><td><input type=\"text\" name=\"ev_reward_global1\" size=\"6\" autocomplete=\"off\" value=\"{$get_event['global_reward_id1']}\" /></td><td>Menge:</td><td><input type=\"text\" name=\"ev_reward_global_amount1\" size=\"2\" autocomplete=\"off\" value=\"{$get_event['global_reward_amount1']}\" /></td><td>Punkte:</td><td><input type=\"text\" name=\"ev_reward_global_points\" size=\"3\" autocomplete=\"off\" value=\"{$get_event['global_reward_points']}\" /></td></tr> |
|---|
| 1846 | <tr><td>ID 02:</td><td><input type=\"text\" name=\"ev_reward_global2\" size=\"6\" autocomplete=\"off\" value=\"{$get_event['global_reward_id2']}\" /></td><td>Menge:</td><td><input type=\"text\" name=\"ev_reward_global_amount2\" size=\"2\" autocomplete=\"off\" value=\"{$get_event['global_reward_amount2']}\" /></td></tr> |
|---|
| 1847 | </table></td></tr> |
|---|
| 1848 | <tr><td align=\"center\"><b>Belohnungen - Plätze</b></td></tr> |
|---|
| 1849 | <tr><td align=\"center\"><table> |
|---|
| 1850 | <tr><td>ID 01:</td><td><input type=\"text\" name=\"ev_reward1\" size=\"6\" autocomplete=\"off\" value=\"{$get_event['reward_id1']}\" /></td><td>Menge:</td><td><input type=\"text\" name=\"ev_reward_amount1\" size=\"2\" autocomplete=\"off\" value=\"{$get_event['reward_amount1']}\" /></td><td>Punkte:</td><td><input type=\"text\" name=\"ev_reward_points1\" size=\"3\" autocomplete=\"off\" value=\"{$get_event['reward_points1']}\" /></td></tr> |
|---|
| 1851 | <tr><td>ID 02:</td><td><input type=\"text\" name=\"ev_reward2\" size=\"6\" autocomplete=\"off\" value=\"{$get_event['reward_id2']}\" /></td><td>Menge:</td><td><input type=\"text\" name=\"ev_reward_amount2\" size=\"2\" autocomplete=\"off\" value=\"{$get_event['reward_amount2']}\" /></td><td>Punkte:</td><td><input type=\"text\" name=\"ev_reward_points2\" size=\"3\" autocomplete=\"off\" value=\"{$get_event['reward_points2']}\" /></td></tr> |
|---|
| 1852 | <tr><td>ID 03:</td><td><input type=\"text\" name=\"ev_reward3\" size=\"6\" autocomplete=\"off\" value=\"{$get_event['reward_id3']}\" /></td><td>Menge:</td><td><input type=\"text\" name=\"ev_reward_amount3\" size=\"2\" autocomplete=\"off\" value=\"{$get_event['reward_amount3']}\" /></td><td>Punkte:</td><td><input type=\"text\" name=\"ev_reward_points3\" size=\"3\" autocomplete=\"off\" value=\"{$get_event['reward_points3']}\" /></td></tr> |
|---|
| 1853 | <tr><td>ID 04:</td><td><input type=\"text\" name=\"ev_reward4\" size=\"6\" autocomplete=\"off\" value=\"{$get_event['reward_id4']}\" /></td><td>Menge:</td><td><input type=\"text\" name=\"ev_reward_amount4\" size=\"2\" autocomplete=\"off\" value=\"{$get_event['reward_amount4']}\" /></td><td>Punkte:</td><td><input type=\"text\" name=\"ev_reward_points4\" size=\"3\" autocomplete=\"off\" value=\"{$get_event['reward_points4']}\" /></td></tr> |
|---|
| 1854 | <tr><td>ID 05:</td><td><input type=\"text\" name=\"ev_reward5\" size=\"6\" autocomplete=\"off\" value=\"{$get_event['reward_id5']}\" /></td><td>Menge:</td><td><input type=\"text\" name=\"ev_reward_amount5\" size=\"2\" autocomplete=\"off\" value=\"{$get_event['reward_amount5']}\" /></td><td>Punkte:</td><td><input type=\"text\" name=\"ev_reward_points5\" size=\"3\" autocomplete=\"off\" value=\"{$get_event['reward_points5']}\" /></td></tr> |
|---|
| 1855 | <tr><td>ID 06:</td><td><input type=\"text\" name=\"ev_reward6\" size=\"6\" autocomplete=\"off\" value=\"{$get_event['reward_id6']}\" /></td><td>Menge:</td><td><input type=\"text\" name=\"ev_reward_amount6\" size=\"2\" autocomplete=\"off\" value=\"{$get_event['reward_amount6']}\" /></td><td>Punkte:</td><td><input type=\"text\" name=\"ev_reward_points6\" size=\"3\" autocomplete=\"off\" value=\"{$get_event['reward_points6']}\" /></td></tr> |
|---|
| 1856 | <tr><td>ID 07:</td><td><input type=\"text\" name=\"ev_reward7\" size=\"6\" autocomplete=\"off\" value=\"{$get_event['reward_id7']}\" /></td><td>Menge:</td><td><input type=\"text\" name=\"ev_reward_amount7\" size=\"2\" autocomplete=\"off\" value=\"{$get_event['reward_amount7']}\" /></td><td>Punkte:</td><td><input type=\"text\" name=\"ev_reward_points7\" size=\"3\" autocomplete=\"off\" value=\"{$get_event['reward_points7']}\" /></td></tr> |
|---|
| 1857 | <tr><td>ID 08:</td><td><input type=\"text\" name=\"ev_reward8\" size=\"6\" autocomplete=\"off\" value=\"{$get_event['reward_id8']}\" /></td><td>Menge:</td><td><input type=\"text\" name=\"ev_reward_amount8\" size=\"2\" autocomplete=\"off\" value=\"{$get_event['reward_amount8']}\" /></td><td>Punkte:</td><td><input type=\"text\" name=\"ev_reward_points8\" size=\"3\" autocomplete=\"off\" value=\"{$get_event['reward_points8']}\" /></td></tr> |
|---|
| 1858 | <tr><td>ID 09:</td><td><input type=\"text\" name=\"ev_reward9\" size=\"6\" autocomplete=\"off\" value=\"{$get_event['reward_id9']}\" /></td><td>Menge:</td><td><input type=\"text\" name=\"ev_reward_amount9\" size=\"2\" autocomplete=\"off\" value=\"{$get_event['reward_amount9']}\" /></td><td>Punkte:</td><td><input type=\"text\" name=\"ev_reward_points9\" size=\"3\" autocomplete=\"off\" value=\"{$get_event['reward_points9']}\" /></td></tr> |
|---|
| 1859 | <tr><td>ID 10:</td><td><input type=\"text\" name=\"ev_reward10\" size=\"6\" autocomplete=\"off\" value=\"{$get_event['reward_id10']}\" /></td><td>Menge:</td><td><input type=\"text\" name=\"ev_reward_amount10\" size=\"2\" autocomplete=\"off\" value=\"{$get_event['reward_amount10']}\" /></td><td>Punkte:</td><td><input type=\"text\" name=\"ev_reward_points10\" size=\"3\" autocomplete=\"off\" value=\"{$get_event['reward_points10']}\" /></td></tr> |
|---|
| 1860 | </table></td></tr> |
|---|
| 1861 | <tr><td align=\"center\"><b>Optionen</b></td></tr> |
|---|
| 1862 | <tr><td align=\"center\"><label for=\"ev_regable\">Registrierbar</label>: <input type=\"checkbox\" name=\"ev_regable\" value=\"1\"{$regable} /> <label for=\"ev_levelcap\">Levelcap</label>: <input type=\"text\" name=\"ev_levelcap\" autocomplete=\"off\" size=\"3\" value=\"{$get_event['levelcap']}\" onmouseover=\"Tip('Maximallevel der Charaktere</div>',BGCOLOR,'#000000',BORDERSTYLE,'solid',BORDERCOLOR,'#F0D070',FONTCOLOR,'#d4d4d4',FONTSIZE,'11px',JUMPHORZ,true,PADDING,15,TEXTALIGN,'left',ABOVE,true)\" onmouseout=\"UnTip()\" /> <label for=\"ev_regcap\">Regcap</label>: <input type=\"text\" name=\"ev_regcap\" autocomplete=\"off\" size=\"3\" value=\"{$get_event['regcap']}\" onmouseover=\"Tip('Maximale Registrierungen für das Event</div>',BGCOLOR,'#000000',BORDERSTYLE,'solid',BORDERCOLOR,'#F0D070',FONTCOLOR,'#d4d4d4',FONTSIZE,'11px',JUMPHORZ,true,PADDING,15,TEXTALIGN,'left',ABOVE,true)\" onmouseout=\"UnTip()\" /> <label for=\"ev_prev\">Vorheriges Event</label>: <input type=\"text\" name=\"ev_prev\" autocomplete=\"off\" size=\"3\" value=\"{$get_event['prev']}\" onmouseover=\"Tip('ID des vorherigen Events</div>',BGCOLOR,'#000000',BORDERSTYLE,'solid',BORDERCOLOR,'#F0D070',FONTCOLOR,'#d4d4d4',FONTSIZE,'11px',JUMPHORZ,true,PADDING,15,TEXTALIGN,'left',ABOVE,true)\" onmouseout=\"UnTip()\" /></td></tr> |
|---|
| 1863 | <tr><td align=\"center\"><table><tr><td colspan=\"10\" align=\"center\"><b>Start-Teleport</b></td></tr><tr><td>Map:</td><td><input type=\"text\" name=\"ev_map\" autocomplete=\"off\" size=\"3\" value=\"{$get_event['map']}\" /></td><td>Zone:</td><td><input type=\"text\" name=\"ev_zone\" autocomplete=\"off\" size=\"3\" value=\"{$get_event['zone']}\" /></td><td>PosX:</td><td><input type=\"text\" name=\"ev_posx\" autocomplete=\"off\" size=\"3\" value=\"{$get_event['posx']}\" /></td><td>PosY:</td><td><input type=\"text\" name=\"ev_posy\" autocomplete=\"off\" size=\"3\" value=\"{$get_event['posy']}\" /></td><td>PosZ:</td><td><input type=\"text\" name=\"ev_posz\" autocomplete=\"off\" size=\"3\" value=\"{$get_event['posz']}\" /></td></tr></table></td></tr> |
|---|
| 1864 | <tr><td align=\"center\"></td></tr> |
|---|
| 1865 | <tr><td align=\"center\"><form id=\"regged_form\" name=\"regged_form\" onsubmit=\"ajaxUpload(this,'portal.php?mod=lol_control&modus=ev_cal&s=edit&eid={$id}&ev_mem_update=true','registered_members','<center>Anfrage wird durchgeführt...</center>','<center>Javascript: Fehler?</center>'); return false;\"><table cellspacing=\"0\" cellpadding=\"0\"><tr><td style=\"border: thin solid black;\"><div style=\"position:relative; width:600px; height:200px; overflow:auto;\" align=\"center\" id=\"registered_members\">{$registered_members}</div></td></tr><tr><td style=\"border: thin solid black;\" align=\"center\"><input type=\"submit\" name=\"ev_mem_update\" value=\"Update\" /> <input type=\"button\" name=\"ev_mem_reward\" value=\"Siegerehrung\" onclick=\"get_content('registered_members','portal.php?mod=lol_control&modus=ev_cal&s=edit&eid={$id}&ev_reward_mem=true','get');\" /> <input type=\"submit\" name=\"ev_mem_free_all\" value=\"Registrierungen Löschen\" /></td></tr></table></form></td></tr> |
|---|
| 1866 | <tr><td align=\"center\"><input type=\"submit\" name=\"submit\" value=\"Ändern\" /> <input type=\"reset\" name=\"submit\" value=\"Zurücksetzen\" /></td></tr> |
|---|
| 1867 | </table> |
|---|
| 1868 | </form></center>"; |
|---|
| 1869 | |
|---|
| 1870 | return $code . $event_code; |
|---|
| 1871 | } |
|---|
| 1872 | |
|---|
| 1873 | if ( $sub == 'del' ) { |
|---|
| 1874 | $id = isset ( $_GET ['eid'] ) ? $_GET ['eid'] : false; |
|---|
| 1875 | |
|---|
| 1876 | if ( $id ) { |
|---|
| 1877 | $event_delete_sql1 = "DELETE FROM `event_cal_main` WHERE `id` = {$id}"; |
|---|
| 1878 | $event_delete_sql2 = "DELETE FROM `event_cal_dates` WHERE `event` = {$id}"; |
|---|
| 1879 | $ev_del = $this->query ( $event_delete_sql1, $this->forum_db ); |
|---|
| 1880 | $ev_del2 = $this->query ( $event_delete_sql2, $this->forum_db ); |
|---|
| 1881 | |
|---|
| 1882 | $code .= "Event wurde gelöscht, bitte Liste neu Laden!"; |
|---|
| 1883 | } |
|---|
| 1884 | } |
|---|
| 1885 | |
|---|
| 1886 | return $code; |
|---|
| 1887 | } |
|---|
| 1888 | |
|---|
| 1889 | private function accman ( $data ) |
|---|
| 1890 | { |
|---|
| 1891 | global $user, $code; |
|---|
| 1892 | |
|---|
| 1893 | $action = isset ( $_GET ['action'] ) ? $_GET ['action'] : ''; |
|---|
| 1894 | $account = isset ( $data ['account'] ) ? $this->check_post_data ( $data, 'account', false, '' ) : ( isset ( $_GET ['acc'] ) ? $_GET ['acc'] : '' ); |
|---|
| 1895 | $submit = $this->check_post_data ( $data, 'submit' ); |
|---|
| 1896 | $no_ajax = isset ( $_GET ['najx'] ) ? $_GET ['najx'] : false; |
|---|
| 1897 | $guid = isset ( $_GET ['guid'] ) ? $_GET ['guid'] : 0; |
|---|
| 1898 | |
|---|
| 1899 | $visible = isset ( $_COOKIE ['accman_visible'] ) ? $_COOKIE ['accman_visible'] : false; |
|---|
| 1900 | $vis = array (); |
|---|
| 1901 | |
|---|
| 1902 | if ( $visible ) { |
|---|
| 1903 | $visible = explode ( '||', $visible ); |
|---|
| 1904 | foreach ( $visible as $visi ) |
|---|
| 1905 | if ( $visi == 1 ) $vis [ ] = array ( ' checked', 'block' ); |
|---|
| 1906 | else $vis [ ] = array ( '', 'none' ); |
|---|
| 1907 | } |
|---|
| 1908 | else { |
|---|
| 1909 | $vis [0] = array ( '', 'none' ); |
|---|
| 1910 | $vis [1] = array ( '', 'none' ); |
|---|
| 1911 | $vis [2] = array ( '', 'none' ); |
|---|
| 1912 | $vis [3] = array ( '', 'none' ); |
|---|
| 1913 | $vis [4] = array ( '', 'none' ); |
|---|
| 1914 | $vis [5] = array ( '', 'none' ); |
|---|
| 1915 | $vis [6] = array ( '', 'none' ); |
|---|
| 1916 | $vis [7] = array ( '', 'none' ); |
|---|
| 1917 | $vis [8] = array ( '', 'none' ); |
|---|
| 1918 | $vis [9] = array ( '', 'none' ); |
|---|
| 1919 | } |
|---|
| 1920 | |
|---|
| 1921 | if ( $action == 21 ) $this->change_account_access ( $data ); |
|---|
| 1922 | |
|---|
| 1923 | if ( $action == 20 ) $this->char_mail_show ( $guid, true ); |
|---|
| 1924 | |
|---|
| 1925 | if ( $action == 19 ) $this->char_quest ( $guid, true ); |
|---|
| 1926 | |
|---|
| 1927 | if ( $action == 18 ) $this->char_rep ( $guid, true ); |
|---|
| 1928 | |
|---|
| 1929 | if ( $action == 17 ) $this->char_inv ( $guid, true ); |
|---|
| 1930 | |
|---|
| 1931 | if ( $action == 16 ) $this->char_skills ( $guid, true ); |
|---|
| 1932 | |
|---|
| 1933 | if ( $action == 15 ) $this->char_friends ( $guid, true ); |
|---|
| 1934 | |
|---|
| 1935 | if ( $action == 14 ) $this->character_main ( $guid, true ); |
|---|
| 1936 | |
|---|
| 1937 | if ( $action == 13 ) $this->accman_donation_management ( $data ); |
|---|
| 1938 | |
|---|
| 1939 | if ( $action == 12 ) $this->accman_levelup_management ( $data ); |
|---|
| 1940 | |
|---|
| 1941 | if ( $action == 11 ) $this->accman_create_accounts ( $data ); |
|---|
| 1942 | |
|---|
| 1943 | if ( $action == 10 ) $this->accman_community_points_manager ( $data ); |
|---|
| 1944 | |
|---|
| 1945 | if ( $action == 9 ) $this->accman_cookie_save ( $data ); |
|---|
| 1946 | |
|---|
| 1947 | if ( $action == 8 ) $this->accman_code_manager ( $data ); |
|---|
| 1948 | |
|---|
| 1949 | if ( $action == 7 ) $this->accman_switch_gallery_bans ( $data ); |
|---|
| 1950 | |
|---|
| 1951 | if ( $action == 6 ) $this->accman_reg_for_community_points ( $data ); |
|---|
| 1952 | |
|---|
| 1953 | if ( $action == 5 ) $this->accman_manage_user_notes ( $data ); |
|---|
| 1954 | |
|---|
| 1955 | if ( $action == 4 ) $this->accman_switch_account_holiday ( $data ); |
|---|
| 1956 | |
|---|
| 1957 | if ( $action == 2 ) $this->accman_account_bannmanager ( $data ); |
|---|
| 1958 | |
|---|
| 1959 | if ( $action == 1 ) { |
|---|
| 1960 | if ( empty ( $account ) ) $this->do_exit ( "Account Variable nicht übergeben?" ); |
|---|
| 1961 | |
|---|
| 1962 | $acc_main_sql = "SELECT `username` as `uname`,`joindate`,`last_login`,`email`,`last_ip`,(SELECT COUNT(`name`) FROM `account_holiday` WHERE `name` = `uname` ) as `umod`,(SELECT SUM(`totaltime`) FROM `{$this->lol_conf ['db_pve_live_characters']}`.`characters` WHERE `account` = `id`) as time, (SELECT `gmlevel` FROM `{$this->lol_conf ['db_live_accounts']}`.`account_access` WHERE `id` = '{$account}') as gmlevel FROM `account` WHERE `id` = '{$account}'"; |
|---|
| 1963 | $acc_main_query = $this->query ( $acc_main_sql, $this->root_db ); |
|---|
| 1964 | $acc_main_data = $this->fetch_row ( $acc_main_query ); |
|---|
| 1965 | $f_user_id = $this->get_forum_id ( $acc_main_data [0] ); |
|---|
| 1966 | |
|---|
| 1967 | $acc_warnings_sql = "SELECT `user_warnings`,`group_id`,`user_inactive_reason`,`user_ip` FROM `phpbb_users` WHERE `user_id` = '{$f_user_id}'"; |
|---|
| 1968 | $acc_warnings_query = $this->query ( $acc_warnings_sql, $this->forum_db ); |
|---|
| 1969 | $acc_warnings = $this->fetch_row ( $acc_warnings_query ); |
|---|
| 1970 | |
|---|
| 1971 | $acc_chars_sql = "SELECT `guid`,`name`,`online`,`deleteInfos_Name` FROM `{$this->lol_conf ['db_pve_live_characters']}`.`characters` WHERE `account` = '{$account}'"; |
|---|
| 1972 | $acc_chars_query = $this->query ( $acc_chars_sql, $this->root_db ); |
|---|
| 1973 | |
|---|
| 1974 | $char_holder = ''; |
|---|
| 1975 | |
|---|
| 1976 | while ( $char = $this->fetch_row ( $acc_chars_query ) ) { |
|---|
| 1977 | $get_guild_sql = "SELECT `guildid`,`name` FROM `{$this->lol_conf ['db_pve_live_characters']}`.`guild` WHERE `guildid` = (SELECT `guildid` FROM `{$this->lol_conf ['db_pve_live_characters']}`.`guild_member` WHERE `guid` = '{$char[0]}')"; |
|---|
| 1978 | $get_guild_query = $this->query ( $get_guild_sql, $this->root_db ); |
|---|
| 1979 | if ( $this->num_rows ( $get_guild_query ) > 0 ) { |
|---|
| 1980 | $get_guild = $this->fetch_row ( $get_guild_query ); |
|---|
| 1981 | $guild_code = " - <a href=\"portal.php?mod=guildlist&action=view_guild&id={$get_guild[0]}\" target=\"_blank\">{$get_guild[1]}</a>"; |
|---|
| 1982 | } |
|---|
| 1983 | else |
|---|
| 1984 | $guild_code = " - Keine Gilde"; |
|---|
| 1985 | if ( $char [2] == 1 ) { |
|---|
| 1986 | $font_style = 'style="color:green;"'; |
|---|
| 1987 | $img = "up.gif"; |
|---|
| 1988 | } |
|---|
| 1989 | else { |
|---|
| 1990 | $font_style = 'style="color:red;"'; |
|---|
| 1991 | $img = "down.gif"; |
|---|
| 1992 | } |
|---|
| 1993 | if ( empty ( $char [1] ) ) $cname = $char [3]; |
|---|
| 1994 | else $cname = $char [1]; |
|---|
| 1995 | $lvl = $this->get_char_data ( $cname, 'level' ); |
|---|
| 1996 | $char_main_data = $this->character_main ( $char [0] ); |
|---|
| 1997 | $char_link_code = "href=\"javascript:;\" onClick=\"divwin=dhtmlwindow.open('divbox', 'div', '{$char[0]}', 'Charakter Infos - {$cname}', 'width=760px,height=600px,center=1,resize=0,scrolling=1'); return false\""; |
|---|
| 1998 | $char_div_code = "<div id=\"{$char[0]}\" style=\"display:none\" border=\"0\" align=\"center\"> |
|---|
| 1999 | <div style=\"color:white;background-color:#CA0000;width:100%;\" align=\"center\"><table><tr><td><a href=\"javascript:;\" style=\"color:white\" onclick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=14&guid={$char [0]}','get');\">Übersicht</a></td><td><a href=\"javascript:;\" style=\"color:white\" onclick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=15&guid={$char [0]}','get');\">Freunde</a></td>" . ( $this->check_access_rights ( array ( 5, 7 ) ) ? "<td><a href=\"javascript:;\" style=\"color:white\" onclick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=16&guid={$char [0]}','get');\">Fertigkeiten</a></td>" . ( $this->check_access_rights ( array ( 5, 7 ) ) ? "<td><a href=\"javascript:;\" style=\"color:white\" onclick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=17&guid={$char [0]}','get');\">Inventar</a></td>" : '' ) . "<td><a href=\"javascript:;\" style=\"color:white\" onclick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=20&guid={$char [0]}','get');\">Mail</a></td>" : '' ) . "<td><a href=\"javascript:;\" style=\"color:white\" onclick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=18&guid={$char [0]}','get');\">Ruf</a></td><td><a href=\"javascript:;\" style=\"color:white\" onclick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=19&guid={$char [0]}','get');\">Quests</a></td></tr></table></div><br> |
|---|
| 2000 | <div id=\"char_content\" style=\"color: white;width:100%\">{$char_main_data}</div></div>"; |
|---|
| 2001 | |
|---|
| 2002 | $char_holder .= "<tr><td><a {$char_link_code} {$font_style}>{$cname}" . ( ( empty ( $char [1] ) ) ? ' >>Deleted<<' : '' ) . "</a> <img src=\"images/{$img}\" /></td><td>Level {$lvl}{$guild_code}{$char_div_code}</td></tr>"; |
|---|
| 2003 | } |
|---|
| 2004 | |
|---|
| 2005 | if ( $acc_main_data [5] == 1 ) $umode = "<font color=\"green\">Aktiviert</font>"; |
|---|
| 2006 | else $umode = "<font color=\"red\">Deaktiviert</font>"; |
|---|
| 2007 | |
|---|
| 2008 | $acc_lower = strtolower ( $acc_main_data [0] ); |
|---|
| 2009 | |
|---|
| 2010 | $acc_points_sql = "SELECT * FROM `lol_points` WHERE `name` = '{$acc_lower}'"; |
|---|
| 2011 | $acc_points_query = $this->query ( $acc_points_sql, $this->forum_db ); |
|---|
| 2012 | $acc_points_rows = $this->num_rows ( $acc_points_query ); |
|---|
| 2013 | $acc_points = $this->fetch_row ( $acc_points_query ); |
|---|
| 2014 | |
|---|
| 2015 | if ( $acc_points [4] == 1 ) $points_activated = "<font color=\"green\">Aktiviert</font>"; |
|---|
| 2016 | else if ( $acc_points_rows == 0 ) $points_activated = "<font color=\"red\">Noch nicht registriert!</font>"; |
|---|
| 2017 | else $points_activated = "<font color=\"red\">Deaktiviert</font>"; |
|---|
| 2018 | |
|---|
| 2019 | $check_gallery_ban = "SELECT `id` FROM `lol_gallery_blacklist` WHERE `name` = '{$acc_main_data[0]}'"; |
|---|
| 2020 | $check_gallery_ban_query = $this->query ( $check_gallery_ban, $this->forum_db ); |
|---|
| 2021 | $check_gallery_ban = $this->num_rows ( $check_gallery_ban_query ); |
|---|
| 2022 | |
|---|
| 2023 | if ( $check_gallery_ban == 1 ) $gallery_txt = "<font color=\"red\">Deaktiviert</font>"; |
|---|
| 2024 | else $gallery_txt = "<font color=\"green\">Aktiviert</font>"; |
|---|
| 2025 | |
|---|
| 2026 | switch ( $acc_warnings [1] ) |
|---|
| 2027 | { |
|---|
| 2028 | case 12: |
|---|
| 2029 | $color = "#FF6600"; |
|---|
| 2030 | break; |
|---|
| 2031 | case 14: |
|---|
| 2032 | $color = "#FFFFCC"; |
|---|
| 2033 | break; |
|---|
| 2034 | case 15: |
|---|
| 2035 | $color = "#FFFF00"; |
|---|
| 2036 | break; |
|---|
| 2037 | case 7: |
|---|
| 2038 | $color = "#006699"; |
|---|
| 2039 | break; |
|---|
| 2040 | case 10: |
|---|
| 2041 | $color = "#009933"; |
|---|
| 2042 | break; |
|---|
| 2043 | case 11: |
|---|
| 2044 | $color = "#663399"; |
|---|
| 2045 | break; |
|---|
| 2046 | case 9: |
|---|
| 2047 | $color = "#6699CC"; |
|---|
| 2048 | break; |
|---|
| 2049 | case 5: |
|---|
| 2050 | $color = "#CC0000"; |
|---|
| 2051 | break; |
|---|
| 2052 | default: |
|---|
| 2053 | $color = "black"; |
|---|
| 2054 | break; |
|---|
| 2055 | } |
|---|
| 2056 | |
|---|
| 2057 | if ( $acc_warnings [1] == 12 ) $acc_name = "<font color=\"\">{$acc_main_data[0]}</font>"; |
|---|
| 2058 | else $acc_name = $acc_main_data [0]; |
|---|
| 2059 | |
|---|
| 2060 | switch ( $acc_warnings [2] ) |
|---|
| 2061 | { |
|---|
| 2062 | case INACTIVE_REGISTER: |
|---|
| 2063 | $inactive_reason = 'Neu registriertes Konto'; |
|---|
| 2064 | break; |
|---|
| 2065 | |
|---|
| 2066 | case INACTIVE_PROFILE: |
|---|
| 2067 | $inactive_reason = 'Profil-Details geändert'; |
|---|
| 2068 | break; |
|---|
| 2069 | |
|---|
| 2070 | case INACTIVE_MANUAL: |
|---|
| 2071 | $inactive_reason = 'Konto durch Administrator deaktiviert'; |
|---|
| 2072 | break; |
|---|
| 2073 | |
|---|
| 2074 | case INACTIVE_REMIND: |
|---|
| 2075 | $inactive_reason = 'Reaktivierung erzwungen'; |
|---|
| 2076 | break; |
|---|
| 2077 | default: |
|---|
| 2078 | $inactive_reason = 'NEIN'; |
|---|
| 2079 | break; |
|---|
| 2080 | } |
|---|
| 2081 | |
|---|
| 2082 | $umod_safe_get = $this->get_holiday_status ( $acc_lower, true, true ); |
|---|
| 2083 | $umod_safe = ( $umod_safe_get [0] ) ? "<font color=\"green\">Geschützt</font>" : "<font color=\"red\">Nicht geschützt</font>"; |
|---|
| 2084 | $from_umode = empty ( $umod_safe_get [1] ) ? '' : " vom {$umod_safe_get[1]} an"; |
|---|
| 2085 | |
|---|
| 2086 | $code = "<center><fieldset style=\"width:400px;border:1px solid black;padding:0.5em\"><legend style=\"border:1px solid black;padding: 0.2em 0.5em;font-size:90%;text-align:right\"><b>Account Hauptdaten</b></legend> |
|---|
| 2087 | <table cellspacing=\"0\" width=\"100%\">"; |
|---|
| 2088 | if ( $this->check_access_rights ( array ( 5, 11, 7 ) ) ) $code .= "<tr><td>Id:</td><td><a href=\"http://www.landoflegends.de/lolmanager/minimanager/user.php?action=edit_user&id={$account}\" target=\"_blank\">{$account} (Game)</a> | <a href=\"http://www.landoflegends.de/memberlist.php?mode=viewprofile&u={$f_user_id}\" target=\"_blank\">{$f_user_id} (Forum)</a></td></tr>"; |
|---|
| 2089 | else $code .= "<tr><td>Id:</td><td>G: {$account} | F: <a href=\"http://www.landoflegends.de/memberlist.php?mode=viewprofile&u={$f_user_id}\" target=\"_blank\">{$f_user_id}</td></tr>"; |
|---|
| 2090 | $code .= "<tr><td>Letzte-Ip's:</td><td>G: {$acc_main_data[4]}<br>F: {$acc_warnings[3]}</td></tr> |
|---|
| 2091 | <tr><td>Name:</td><td><font color=\"{$color}\"><b>{$acc_main_data[0]}</b></font></td></tr> |
|---|
| 2092 | <tr><td>Acc-Level:</td><td>{$this->change_account_access ( $data, $acc_main_data[4], $acc_main_data [7] )}</td></tr> |
|---|
| 2093 | <tr><td>Mail:</td><td>{$acc_main_data[3]}</td></tr> |
|---|
| 2094 | <tr><td>Registriert:</td><td>{$acc_main_data[1]}</td></tr> |
|---|
| 2095 | <tr><td>Letzter-Login:</td><td>{$acc_main_data[2]}</td></tr> |
|---|
| 2096 | <tr><td>Inaktiv (Forum):</td><td>{$inactive_reason}</td></tr> |
|---|
| 2097 | <tr><td onmouseover=\"Tip('Bei der Berechnung der Spielzeit werden alle Charaktere zusammengerechnet!')\" onmouseout=\"UnTip()\">Spielzeit (InGame):</td><td>" . $this->intervall ( $acc_main_data [6] ) . "</td></tr> |
|---|
| 2098 | <tr><td>Verwarnungen:</td><td>{$acc_warnings[0]}</td></tr> |
|---|
| 2099 | <tr><td>UMode:</td><td><div id=\"umode\" onmouseover=\"Tip('Urlaubsmodus Akti-/Deaktivieren')\" onmouseout=\"UnTip()\" onclick=\"get_content('umode','portal.php?mod=lol_control&modus=accman&action=4&acc={$acc_main_data[0]}','get')\">{$umode}</div></td></tr> |
|---|
| 2100 | <tr><td>UMode Status:</td><td>{$umod_safe}{$from_umode}</td></tr> |
|---|
| 2101 | <tr><td>Gallery Status:</td><td><div id=\"gallery_active\" onmouseover=\"Tip('Gallery Akti-/Deaktivieren')\" onmouseout=\"UnTip()\" onclick=\"get_content('gallery_active','portal.php?mod=lol_control&modus=accman&action=7&acc={$acc_main_data[0]}','get')\">{$gallery_txt}</div></td></tr> |
|---|
| 2102 | <tr><td>LoLCoP-Konto:</td><td><div id=\"points_active\" onmouseover=\"Tip('LoLCoP-Konto Akti-/Deaktivieren<br>Wenn nicht vorhanden wird es erstellt')\" onmouseout=\"UnTip()\" onclick=\"get_content('points_active','portal.php?mod=lol_control&modus=accman&action=6®i={$acc_points_rows}&acc={$acc_main_data[0]}','get')\">{$points_activated}</div></td></tr> |
|---|
| 2103 | <tr><td colspan=\"2\" align=\"center\"><b>Account Charaktere</b></td></tr> |
|---|
| 2104 | {$char_holder} |
|---|
| 2105 | </table></fieldset></center>"; |
|---|
| 2106 | |
|---|
| 2107 | $acc_banns_sql = "Select * FROM `user_banns` WHERE `gid` = '{$account}'"; |
|---|
| 2108 | $acc_banns_query = $this->query ( $acc_banns_sql, $this->forum_db ); |
|---|
| 2109 | |
|---|
| 2110 | $bann_holder = ''; |
|---|
| 2111 | $bann_count = 0; |
|---|
| 2112 | |
|---|
| 2113 | while ( $ban_data = $this->fetch_row ( $acc_banns_query ) ) { |
|---|
| 2114 | $start = date ( "d.m.Y H:m", $ban_data [2] ); |
|---|
| 2115 | $end = date ( "d.m.Y H:m", $ban_data [3] ); |
|---|
| 2116 | |
|---|
| 2117 | switch ( $ban_data [4] ) |
|---|
| 2118 | { |
|---|
| 2119 | case 'all': |
|---|
| 2120 | $bannlevel = "Alles"; |
|---|
| 2121 | break; |
|---|
| 2122 | case 'forum': |
|---|
| 2123 | $bannlevel = "Forum"; |
|---|
| 2124 | break; |
|---|
| 2125 | case 'game': |
|---|
| 2126 | $bannlevel = "Spiel"; |
|---|
| 2127 | break; |
|---|
| 2128 | } |
|---|
| 2129 | |
|---|
| 2130 | if ( $ban_data [3] > time ( ) ) $active = "<img src=\"/images/lol_forum_banned.png\" onmouseover=\"Tip('Bann Aktiv!<br>Bannlevel: {$bannlevel}')\" onmouseout=\"UnTip()\" />"; |
|---|
| 2131 | else $active = "<img src=\"/images/lol_forum_unbanned.png\" onmouseover=\"Tip('Bann Abgelaufen<br>Bannlevel: {$bannlevel}')\" onmouseout=\"UnTip()\" />"; |
|---|
| 2132 | if ( $bann_count % 2 ) $style = "style=\"background-image: url('/images/gallery/9f9f9f.png')\""; |
|---|
| 2133 | else $style = "style=\"background-image: url('/images/gallery/c6c6c6.png')\""; |
|---|
| 2134 | |
|---|
| 2135 | $bann_message = $this->replace_da_shit ( $ban_data [6], array ( '"', "'" ), '' ); |
|---|
| 2136 | $bann_message = $this->replace_url ( $bann_message ); |
|---|
| 2137 | |
|---|
| 2138 | $del_link = $this->check_access_rights ( array ( 5, 11, 7 ) ) ? "<td><a href=\"javascript:void(0);\" onmouseover=\"Tip('Bann Löschen<br>Achtung: Nur InGame, keine IP-Banns!')\" onmouseout=\"UnTip()\" onclick=\"get_content('banns','portal.php?mod=lol_control&modus=accman&action=2&do=del&s={$ban_data[2]}&e={$ban_data[3]}&acc={$account}','get');get_content('count_banns','portal.php?mod=lol_control&modus=accman&action=2&do=count_banns&acc={$account}','get');\">X</a></td>" : '<td></td>'; |
|---|
| 2139 | $bann_holder .= "<tr {$style}><td>{$start}</td><td>{$end}</td><td>{$ban_data[5]}</td><td align=\"center\">{$active}</td><td style=\"width:150px\">{$bann_message}</td>{$del_link}</tr>"; |
|---|
| 2140 | $bann_count ++; |
|---|
| 2141 | } |
|---|
| 2142 | |
|---|
| 2143 | if ( empty ( $bann_holder ) ) $bann_holder = "<tr><td colspan=\"5\" align=\"center\">Keine Banns vorhanden</td></tr>"; |
|---|
| 2144 | |
|---|
| 2145 | $code .= "<div id=\"cs_banns\" align=\"center\" style=\"display:{$vis[0][1]}\" width=\"100%\"><br><fieldset style=\"width:635px;border:1px solid black;padding:0.5em\"><legend style=\"border:1px solid black;padding: 0.2em 0.5em;font-size:90%;text-align:right\"><b>Account Banns (<d id=\"count_banns\">{$bann_count}</d>)</b></legend><div style=\"position:relative; width:635px; height:200px; overflow:auto;\" align=\"center\"> |
|---|
| 2146 | <div id=\"banns\" width=\"100%\"> |
|---|
| 2147 | <table cellspacing=\"0\" width=\"100%\"> |
|---|
| 2148 | <tr><td align=\"center\">Start</td><td align=\"center\">Ende</td><td align=\"center\">Von</td><td align=\"center\">Aktiv?</td><td align=\"center\">Grund</td><td></td></tr> |
|---|
| 2149 | {$bann_holder} |
|---|
| 2150 | </table></div></div>"; |
|---|
| 2151 | if ( $this->check_access_rights ( array ( 5, 7 ) ) ) { |
|---|
| 2152 | $code .= "<br> |
|---|
| 2153 | <form onsubmit=\"ajaxUpload(this,'portal.php?mod=lol_control&modus=accman&action=2&do=add&acc={$account}','banns','<center>Wird hinzugefügt...</center>','<center>Javascript: Fehler?</center>'); return false;\"> |
|---|
| 2154 | <table> |
|---|
| 2155 | <tr><td>Bannlevel:</td><td><select name=\"blevel\"> |
|---|
| 2156 | <option value=\"game\" onmouseover=\"Tip('Setzt den InGame Bann,<br>jedoch ohne IP-Bann!')\" onmouseout=\"UnTip()\" SELECTED>Spiel</option> |
|---|
| 2157 | <option value=\"forum\" onmouseover=\"Tip('Setzt einen E-Mail-Bann im Forum')\" onmouseout=\"UnTip()\">Forum</option> |
|---|
| 2158 | <option value=\"all\" onmouseover=\"Tip('Setzt den Bann für Spiel + Forum<br>und zusätzlich IP-Banns!')\" onmouseout=\"UnTip()\">Alles</option></select></td><td colspan=\"3\"></td></tr> |
|---|
| 2159 | <tr><td>Banndauer (Std):</td><td><input type=\"text\" name=\"duration\" autocomplete=\"off\" size=\"5\" /></td><td>Banngrund:</td><td><input type=\"text\" name=\"reason\" autocomplete=\"off\" size=\"15\" /></td><td><input type=\"submit\" name=\"submit\" value=\"Bann hinzufügen\" onclick=\"get_content('count_banns','portal.php?mod=lol_control&modus=accman&action=2&do=count_banns&acc={$account}','get');\" /><input type=\"hidden\" name=\"ips\" value=\"{$acc_main_data[4]}|||{$acc_warnings[3]}\" /><input type=\"hidden\" name=\"buemail\" value=\"{$acc_main_data[3]}\" /></td></tr> |
|---|
| 2160 | </table></form>"; |
|---|
| 2161 | } |
|---|
| 2162 | $code .= "</fieldset></div>"; |
|---|
| 2163 | |
|---|
| 2164 | $acc_notes_sql = "SELECT * FROM `phpbb_log` WHERE `reportee_id` = '{$f_user_id}' AND `log_operation` IN ('LOG_USER_GENERAL','LOG_USER_NEW_PASSWORD','LOG_USER_UPDATE_EMAIL','LOG_USER_WARNING','LOG_USER_WARNING_BODY')"; |
|---|
| 2165 | $acc_notes_query = $this->query ( $acc_notes_sql, $this->forum_db ); |
|---|
| 2166 | |
|---|
| 2167 | $notes_holder = ''; |
|---|
| 2168 | $notes_count = 0; |
|---|
| 2169 | |
|---|
| 2170 | while ( $note = $this->fetch_row ( $acc_notes_query ) ) { |
|---|
| 2171 | if ( $notes_count % 2 ) $style = "style=\"background-image: url('/images/gallery/9f9f9f.png')\""; |
|---|
| 2172 | else $style = "style=\"background-image: url('/images/gallery/c6c6c6.png')\""; |
|---|
| 2173 | |
|---|
| 2174 | $temp_user_id = $this->get_forum_name ( $note [2] ); |
|---|
| 2175 | $date = date ( "d.m.Y H:m", $note [7] ); |
|---|
| 2176 | $note_data = unserialize ( $note [9] ); |
|---|
| 2177 | $a_href = "<a href=\"javascript:void(0);\" onmouseover=\"Tip('Notiz Löschen')\" onmouseout=\"UnTip()\" onclick=\"get_content('notes','portal.php?mod=lol_control&modus=accman&action=5&log_id={$note[0]}&do=del&acc={$acc_main_data[0]}','get')\">X</a>"; |
|---|
| 2178 | switch ( $note [8] ) |
|---|
| 2179 | { |
|---|
| 2180 | case LOG_USER_GENERAL: |
|---|
| 2181 | $note_data = ( is_array ( $note_data ) ) ? $note_data [0] : $note_data; |
|---|
| 2182 | break; |
|---|
| 2183 | case LOG_USER_NEW_PASSWORD: |
|---|
| 2184 | $note_data = "Passwort wurde geändert!"; |
|---|
| 2185 | $a_href = ""; |
|---|
| 2186 | break; |
|---|
| 2187 | case LOG_USER_UPDATE_EMAIL: |
|---|
| 2188 | $note_data = "E-Mail geändert von \"{$note_data[1]}\" auf \"{$note_data[2]}\"!"; |
|---|
| 2189 | $a_href = ""; |
|---|
| 2190 | break; |
|---|
| 2191 | case LOG_USER_WARNING: |
|---|
| 2192 | case LOG_USER_WARNING_BODY: |
|---|
| 2193 | $note_data = "Verwarnung: " . ( is_array ( $note_data ) ) ? $note_data [0] : $note_data; |
|---|
| 2194 | break; |
|---|
| 2195 | default: |
|---|
| 2196 | $note_data = ( is_array ( $note_data ) ) ? $note_data [0] : $note_data; |
|---|
| 2197 | break; |
|---|
| 2198 | } |
|---|
| 2199 | |
|---|
| 2200 | $notes_holder .= "<tr {$style}><td>{$temp_user_id}</td><td>{$note[6]}</td><td>{$date}</td><td style=\"width:250px\">{$this->replace_url($note_data)}</td><td>{$a_href}</td></tr>"; |
|---|
| 2201 | $notes_count ++; |
|---|
| 2202 | } |
|---|
| 2203 | |
|---|
| 2204 | if ( empty ( $notes_holder ) ) $notes_holder = "<tr><td colspan=\"4\" align=\"center\">Keine Notizen vorhanden</td></tr>"; |
|---|
| 2205 | |
|---|
| 2206 | $code .= "<div id=\"cs_notes\" align=\"center\" style=\"display:{$vis[1][1]}\" width=\"100%\"><br><div style=\"position:relative; width:630px; height:200px; overflow:auto;\" align=\"center\"><fieldset style=\"width:600px;border:1px solid black;padding:0.5em\"><legend style=\"border:1px solid black;padding: 0.2em 0.5em;font-size:90%;text-align:right\"><b>Benutzer Notizen</b></legend> |
|---|
| 2207 | <div id=\"notes\" width=\"100%\"> |
|---|
| 2208 | <table cellspacing=\"0\" width=\"100%\"> |
|---|
| 2209 | <tr><td align=\"center\">Von</td><td align=\"center\">IP</td><td align=\"center\">Datum</td><td align=\"center\">Vorgang</td></tr> |
|---|
| 2210 | {$notes_holder} |
|---|
| 2211 | </table></div> |
|---|
| 2212 | <br> |
|---|
| 2213 | <form onsubmit=\"ajaxUpload(this,'portal.php?mod=lol_control&modus=accman&action=5&do=add&acc={$acc_main_data[0]}','notes','<center>Wird hinzugefügt...</center>','<center>Javascript: Fehler?</center>'); return false;\"> |
|---|
| 2214 | <table cellspacing=\"0\"> |
|---|
| 2215 | <tr><td><input type=\"text\" name=\"note\" autocomplete=\"off\" size=\"15\" /></td><td><input type=\"submit\" name=\"submit\" value=\"Notiz Hinzufügen\" /></td></tr> |
|---|
| 2216 | </table></form> |
|---|
| 2217 | </fieldset></div></div>"; |
|---|
| 2218 | |
|---|
| 2219 | $acc_like_sql = "SELECT `id` as `accid`,`username` as `uname`,`joindate`,`last_login`,`email`,`last_ip`,(SELECT COUNT(`name`) FROM `account_holiday` WHERE `name` = `uname` ) as `umod`,(SELECT COUNT(`id`) FROM `account_banned` WHERE `id` = `accid`) as `banns` FROM `account` WHERE `last_ip` = '{$acc_main_data[4]}' AND `id` <> '{$account}' OR `email` = '{$acc_main_data[3]}' AND `id` <> '{$account}' ORDER BY `username`"; |
|---|
| 2220 | $acc_like_query = $this->query ( $acc_like_sql, $this->root_db ); |
|---|
| 2221 | |
|---|
| 2222 | $like_holder = ''; |
|---|
| 2223 | $like_count = 0; |
|---|
| 2224 | |
|---|
| 2225 | while ( $like = $this->fetch_row ( $acc_like_query ) ) { |
|---|
| 2226 | if ( $like_count % 2 ) $style = "style=\"background-image: url('/images/gallery/9f9f9f.png')\""; |
|---|
| 2227 | else $style = "style=\"background-image: url('/images/gallery/c6c6c6.png')\""; |
|---|
| 2228 | |
|---|
| 2229 | if ( $like [6] == 1 ) $umode = "<font color=\"green\">Ja</font>"; |
|---|
| 2230 | else $umode = "<font color=\"red\">Nein</font>"; |
|---|
| 2231 | |
|---|
| 2232 | if ( $like [7] > 0 ) { |
|---|
| 2233 | $get_banreasons_sql = "SELECT `banreason` FROM `{$this->lol_conf ['db_live_accounts']}`.`account_banned` WHERE `id` = {$like[0]}"; |
|---|
| 2234 | $get_banreasons_query = $this->query ( $get_banreasons_sql, $this->root_db ); |
|---|
| 2235 | $banreasons = '<table>'; |
|---|
| 2236 | while ( $reason = $this->fetch_row ( $get_banreasons_query ) ) |
|---|
| 2237 | $banreasons .= "<tr><td>* {$this->replace_da_shit($reason[0],array("'",'"'), '')}</td></tr>"; |
|---|
| 2238 | $banreasons .= "</table>"; |
|---|
| 2239 | |
|---|
| 2240 | $tooltip = "<td onmouseover=\"Tip('{$banreasons}')\" onmouseout=\"UnTip()\">{$this->replace_da_shit($like[7],array("'",'"'), '')}</td>"; |
|---|
| 2241 | } |
|---|
| 2242 | else |
|---|
| 2243 | $tooltip = "<td>{$this->replace_da_shit($like[7],array("'",'"'), '')}</td>"; |
|---|
| 2244 | |
|---|
| 2245 | $like_holder .= "<tr {$style}><td>{$like[0]}</td><td><a href=\"javascript:void(0);\" onclick=\"get_content('content','portal.php?mod=lol_control&modus=accman&action=1&acc={$like[0]}','get')\">{$like[1]}</a></td><td>{$like[2]}</td><td>{$like[3]}</td><td>{$umode}</td>{$tooltip}<td>{$like[4]}</td><td>{$like[5]}</td></tr>"; |
|---|
| 2246 | $like_count ++; |
|---|
| 2247 | } |
|---|
| 2248 | |
|---|
| 2249 | if ( empty ( $like_holder ) ) $like_holder = "<tr><td colspan=\"8\" align=\"center\">Keine ähnlichen Accounts gefunden</td></tr>"; |
|---|
| 2250 | |
|---|
| 2251 | $code .= "<div id=\"cs_like\" align=\"center\" style=\"display:{$vis[2][1]}\" width=\"100%\"><br><div style=\"position:relative; width:690px; height:200px; overflow:auto;\" align=\"center\"><fieldset style=\"width:600px;border:1px solid black;padding:0.5em\"><legend style=\"border:1px solid black;padding: 0.2em 0.5em;font-size:90%;text-align:right\"><b>Ähnliche Accounts</b></legend> |
|---|
| 2252 | <table cellspacing=\"0\" width=\"100%\"> |
|---|
| 2253 | <tr><td align=\"center\">Acc-Id</td><td align=\"center\">Acc-Name</td><td align=\"center\">Anm.-Datum</td><td align=\"center\">Letz.-Login</td><td align=\"center\">UMode</td><td align=\"center\">Banns</td><td align=\"center\">E-Mail</td><td align=\"center\">Letz.-Ip</td></tr> |
|---|
| 2254 | {$like_holder} |
|---|
| 2255 | </table> |
|---|
| 2256 | </fieldset></div></div></center>"; |
|---|
| 2257 | |
|---|
| 2258 | $get_acc_codes_sql1 = "SELECT * FROM `gift_code_log` WHERE `account` = '{$account}'"; |
|---|
| 2259 | $get_acc_codes_query1 = $this->query ( $get_acc_codes_sql1, $this->forum_db ); |
|---|
| 2260 | $get_acc_codes_rows = $this->num_rows ( $get_acc_codes_query1 ); |
|---|
| 2261 | |
|---|
| 2262 | $codes_holder = ""; |
|---|
| 2263 | $codes_count = 0; |
|---|
| 2264 | |
|---|
| 2265 | if ( $get_acc_codes_rows > 0 ) { |
|---|
| 2266 | while ( $s2_codes = $this->fetch_row ( $get_acc_codes_query1 ) ) { |
|---|
| 2267 | if ( $codes_count % 2 ) $style = "style=\"background-image: url('/images/gallery/9f9f9f.png')\""; |
|---|
| 2268 | else $style = "style=\"background-image: url('/images/gallery/c6c6c6.png')\""; |
|---|
| 2269 | $date = date ( 'd.m.Y H:m', $s2_codes [1] ); |
|---|
| 2270 | $actual_uses_sql = "SELECT `uses` FROM `{$this->lol_conf ['db_pve_live_characters']}`.`codes` WHERE `code` = '{$s2_codes[3]}' AND `account_id` = '{$s2_codes[2]}'"; |
|---|
| 2271 | $actual_uses_query = $this->query ( $actual_uses_sql, $this->root_db ); |
|---|
| 2272 | $actual_uses_ = $this->fetch_row ( $actual_uses_query ); |
|---|
| 2273 | $actual_uses_pre = $actual_uses_ [0]; |
|---|
| 2274 | |
|---|
| 2275 | $code_del = ""; |
|---|
| 2276 | |
|---|
| 2277 | if ( $actual_uses_pre > 0 ) { |
|---|
| 2278 | $actual_uses = "{$actual_uses_pre} mal benutzbar"; |
|---|
| 2279 | if ( $this->check_access_rights ( array ( 5, 11, 7 ) ) ) $code_del = "<a href=\"javascript:void(0);\" onmouseover=\"Tip('Code Löschen')\" onmouseout=\"UnTip()\" onclick=\"get_content('codes','portal.php?mod=lol_control&modus=accman&action=8&acc={$account}&do=del&code={$s2_codes[3]}','get');get_content('codes_count','portal.php?mod=lol_control&modus=accman&action=8&acc={$account}&do=codes_count','get');\">X</a>"; |
|---|
| 2280 | else $code_del = ""; |
|---|
| 2281 | } |
|---|
| 2282 | else |
|---|
| 2283 | $actual_uses = "<font color=\"red\">Schon Benutzt</font>"; |
|---|
| 2284 | |
|---|
| 2285 | $get_item_name_sql = "SELECT `name_loc3` FROM `{$this->lol_conf ['db_pve_live_world']}`.`locales_item` WHERE `entry` = '{$s2_codes[4]}'"; |
|---|
| 2286 | $get_item_name_query = $this->query ( $get_item_name_sql, $this->root_db ); |
|---|
| 2287 | $get_item_name = $this->fetch_row ( $get_item_name_query ); |
|---|
| 2288 | |
|---|
| 2289 | if ( empty ( $get_item_name [0] ) ) { |
|---|
| 2290 | $get_item_name_sql = "SELECT `name` FROM `{$this->lol_conf ['db_pve_live_world']}`.`item_template` WHERE `entry` = '{$s2_codes[4]}'"; |
|---|
| 2291 | $get_item_name_query = $this->query ( $get_item_name_sql, $this->root_db ); |
|---|
| 2292 | $get_item_name = $this->fetch_row ( $get_item_name_query ); |
|---|
| 2293 | } |
|---|
| 2294 | |
|---|
| 2295 | if ( empty ( $get_item_name [0] ) && $s2_codes [8] > 0 ) $get_item_name [0] = "Levelup: {$s2_codes[8]}"; |
|---|
| 2296 | |
|---|
| 2297 | $codes_holder .= "<tr {$style}><td>{$date}</td><td>{$s2_codes[3]}</td><td>{$s2_codes[4]}</td><td>{$get_item_name[0]}</td><td>{$s2_codes[5]}</td><td>{$actual_uses}</td><td>{$s2_codes[9]}</td><td>{$code_del}</td></tr>"; |
|---|
| 2298 | $codes_count ++; |
|---|
| 2299 | } |
|---|
| 2300 | } |
|---|
| 2301 | else |
|---|
| 2302 | $codes_holder = "<tr><td colspan=\"7\" align=\"center\">Keine LoL-Codes gefunden</td></tr>"; |
|---|
| 2303 | |
|---|
| 2304 | $code .= "<div id=\"cs_codes\" align=\"center\" style=\"display:{$vis[3][1]}\" width=\"100%\"><br><fieldset style=\"width:600px;border:1px solid black;padding:0.5em\"><legend style=\"border:1px solid black;padding: 0.2em 0.5em;font-size:90%;text-align:right\"><b>Account Codes (<d id=\"codes_count\">{$get_acc_codes_rows}</d>)</b></legend> |
|---|
| 2305 | <div id=\"codes\" style=\"position:relative; width:650px; height:180px; overflow:auto;\" align=\"center\"> |
|---|
| 2306 | <table cellspacing=\"0\" width=\"100%\"> |
|---|
| 2307 | <tr><td align=\"center\"><b>Datum</b></td><td align=\"center\"><b>Code</b></td><td align=\"center\"><b>Item-ID</b></td><td align=\"center\"><b>Item-Name</b></td><td align=\"center\"><b>Menge</b></td><td align=\"center\"><b>Benutzbar</b></td><td align=\"center\"><b>Von</b></td></tr> |
|---|
| 2308 | {$codes_holder} |
|---|
| 2309 | </table></div>"; |
|---|
| 2310 | if ( $this->check_access_rights ( array ( 5, 11, 7 ) ) ) { |
|---|
| 2311 | $code .= " |
|---|
| 2312 | <br> |
|---|
| 2313 | <form onsubmit=\"ajaxUpload(this,'portal.php?mod=lol_control&modus=accman&action=8&do=add&acc={$account}','codes','<center>Wird hinzugefügt...</center>','<center>Javascript: Fehler?</center>'); return false;\"> |
|---|
| 2314 | <table cellspacing=\"0\"> |
|---|
| 2315 | <tr><td>Item-ID: <input type=\"text\" name=\"item\" autocomplete=\"off\" size=\"5\" /></td><td>Menge: <input type=\"text\" name=\"quantity\" autocomplete=\"off\" size=\"5\" /></td><td><input type=\"submit\" name=\"submit\" value=\"Code Hinzufügen\" onclick=\"get_content('codes_count','portal.php?mod=lol_control&modus=accman&action=8&acc={$account}&do=codes_count','get');\" /></td></tr> |
|---|
| 2316 | </table></form>"; |
|---|
| 2317 | } |
|---|
| 2318 | $code .= "</fieldset></div></center>"; |
|---|
| 2319 | |
|---|
| 2320 | $points_log_sql = "Select `date`,`points`,`reason`,`reason_extra`,`from` FROM `lol_points_log` WHERE `user` = '{$acc_points[0]}' AND `reason` <> 5 ORDER BY `date` DESC"; |
|---|
| 2321 | $points_log_query = $this->query ( $points_log_sql, $this->forum_db ); |
|---|
| 2322 | |
|---|
| 2323 | $points_log_holder = ''; |
|---|
| 2324 | $points_log_count = 0; |
|---|
| 2325 | |
|---|
| 2326 | while ( $points_log_data = $this->fetch_row ( $points_log_query ) ) { |
|---|
| 2327 | if ( $points_log_count % 2 ) $style = "style=\"background-image: url('/images/gallery/9f9f9f.png')\""; |
|---|
| 2328 | else $style = "style=\"background-image: url('/images/gallery/c6c6c6.png')\""; |
|---|
| 2329 | |
|---|
| 2330 | $date = @date ( "d.m.Y - H:m", $points_log_data [0] ); |
|---|
| 2331 | $log_extra = $this->community_points_log_txt ( $points_log_data [1], $points_log_data [2] ) . $points_log_data [3]; |
|---|
| 2332 | $log_txt = ( ! empty ( $points_log_data [3] ) ) ? $log_extra : $this->community_points_log_txt ( $points_log_data [1], $points_log_data [2] ); |
|---|
| 2333 | $points_log_holder .= "<tr {$style}><td width=\"150\">{$date}</td><td>{$log_txt}</td><td>{$points_log_data[4]}</td></tr>"; |
|---|
| 2334 | |
|---|
| 2335 | $points_log_count ++; |
|---|
| 2336 | } |
|---|
| 2337 | |
|---|
| 2338 | if ( empty ( $points_log_holder ) ) $points_log_holder = "<tr><td colspan=\"3\" align=\"center\">Keine Logeinträge Vorhanden</td></tr>"; |
|---|
| 2339 | |
|---|
| 2340 | $code .= "<div id=\"cs_lolcop\" align=\"center\" style=\"display:{$vis[4][1]}\" width=\"100%\"><br><fieldset style=\"width:600px;border:1px solid black;padding:0.5em\"><legend style=\"border:1px solid black;padding: 0.2em 0.5em;font-size:90%;text-align:right\"><b>LoLCoP-Verwaltung</b></legend> |
|---|
| 2341 | <table cellspacing=\"4\"> |
|---|
| 2342 | <tr><td><b>Punkte Aktuell:</b></td><td align=\"left\"><div id=\"points_act\">{$acc_points[2]}</div></td><td><b>Punkte Lifetime:</b></td><td align=\"left\"><div id=\"points_tot\">{$acc_points[3]}</div></td></tr> |
|---|
| 2343 | </table> |
|---|
| 2344 | <div style=\"position:relative; width:600px; height:200px; overflow:auto;\" align=\"center\" id=\"lolcop\"> |
|---|
| 2345 | <table cellspacing=\"0\" width=\"100%\"> |
|---|
| 2346 | <tr><td align=\"center\"><b>Datum</b></td><td align=\"center\"><b>Log</b></td><td align=\"center\"><b>Von</b></td></tr> |
|---|
| 2347 | {$points_log_holder} |
|---|
| 2348 | </table></div>"; |
|---|
| 2349 | if ( $this->check_access_rights ( array ( 5, 11, 7 ) ) ) { |
|---|
| 2350 | $code .= "<br> |
|---|
| 2351 | <form onsubmit=\"ajaxUpload(this,'portal.php?mod=lol_control&modus=accman&action=10&do=change&acc={$acc_points[1]}&aid={$acc_points[0]}','lolcop','<center>Wird hinzugefügt...</center>','<center>Javascript: Fehler?</center>');return false;\"> |
|---|
| 2352 | <table> |
|---|
| 2353 | <tr><td>Grund:</td> |
|---|
| 2354 | <td><select name=\"reason\" onmouseover=\"Tip('<table><tr><td>Event:</td><td>Zeigt im Punktelog an, dass die Punkte für ein Event waren.</td></tr><tr><td>Server:</td><td>Zeigt im Punktelog, dass es Punkte für besondere Hilfe für die Community waren.</td></tr><tr><td>GM:</td><td>Zeigt an, dass Punkte von einem GM gegeben oder Entfernt wurden.</td></tr><tr><td>Eigener Grund:</td><td>Zeigt den selber eingegebenen Grund an.</td></tr></table>')\" onmouseout=\"UnTip()\"><option value=\"event\" onclick=\"javascript:document.getElementById('reason_extra').style.display='none';\"> Event </option><option value=\"server\" onclick=\"javascript:document.getElementById('reason_extra').style.display='none';\"> Server </option><option value=\"gm\" onclick=\"javascript:document.getElementById('reason_extra').style.display='none';\" selected> GM </option><option value=\"reason_extra\" onclick=\"javascript:document.getElementById('reason_extra').style.display='';\"> Eigene Begründung </option></select></td> |
|---|
| 2355 | <td>Punkte:</td><td><input type=\"text\" size=\"10\" name=\"points\" autocomplete=\"off\" onmouseover=\"Tip('Eine negative Punktezahl zieht Punkte ab, positive fügen sie hinzu.<br>z.B. -500 zieht 500 Punkte ab.<br>500 addiert 500 Punkte hinzu.')\" onmouseout=\"UnTip()\" /></td> |
|---|
| 2356 | </tr> |
|---|
| 2357 | <tr><td colspan=\"3\"><div id=\"reason_extra\" style=\"display: none;\">Noch <span id=\"point_signs\">120</span> Zeichen:<br><textarea cols=\"25\" rows=\"4\" name=\"description\" id=\"point_reason\" onkeyup=\"CheckFieldLength(this, 'point_signs', 120);\" onkeydown=\"CheckFieldLength(this,'point_signs', 120);\" onmouseout=\"CheckFieldLength(this,'point_signs', 120);\"></textarea></div></td><td><input type=\"submit\" name=\"submit\" value=\"Bearbeiten\" onclick=\"get_content('points_act','portal.php?mod=lol_control&modus=accman&action=10&do=points_act&acc={$acc_points[1]}&aid={$acc_points[0]}','get');get_content('points_tot','portal.php?mod=lol_control&modus=accman&action=10&do=points_tot&acc={$acc_points[1]}&aid={$acc_points[0]}','get');\" /></td></tr> |
|---|
| 2358 | </table></form>"; |
|---|
| 2359 | } |
|---|
| 2360 | $code .= "</fieldset></div></div>"; |
|---|
| 2361 | |
|---|
| 2362 | $levelup_log_sql = "Select * FROM `levelup_log` WHERE `account` = '{$acc_main_data[0]}' ORDER BY `date` DESC"; |
|---|
| 2363 | $levelup_log_query = $this->query ( $levelup_log_sql, $this->forum_db ); |
|---|
| 2364 | |
|---|
| 2365 | $levelup_log_holder = ''; |
|---|
| 2366 | $levelup_log_count = 0; |
|---|
| 2367 | |
|---|
| 2368 | while ( $levelup_log_data = $this->fetch_row ( $levelup_log_query ) ) { |
|---|
| 2369 | if ( $points_log_count % 2 ) $style = "style=\"background-image: url('/images/gallery/9f9f9f.png')\""; |
|---|
| 2370 | else $style = "style=\"background-image: url('/images/gallery/c6c6c6.png')\""; |
|---|
| 2371 | |
|---|
| 2372 | $date = @date ( "d.m.Y - H:m", $levelup_log_data [1] ); |
|---|
| 2373 | $levelup_log_holder .= "<tr {$style}><td width=\"150\" align=\"center\">{$date}</td><td align=\"center\">{$levelup_log_data[3]}</td><td align=\"center\">{$levelup_log_data[4]}</td><td align=\"center\">{$levelup_log_data[5]}</td><td align=\"center\">{$levelup_log_data[6]}</td><td align=\"center\">{$levelup_log_data[7]}</td><td>"; |
|---|
| 2374 | if ( $this->check_access_rights ( array ( 5, 11, 7 ) ) ) $levelup_log_holder .= "<a href=\"javascript:void(0);\" onmouseover=\"Tip('Levelup Löschen<br>Achtung: Die Punkte werden nicht wieder subtrahiert!')\" onmouseout=\"UnTip()\" onclick=\"get_content('levelup','portal.php?mod=lol_control&modus=accman&action=12&acc={$acc_main_data[0]}&do=del&aid={$levelup_log_data[0]}','get')\">X</a>"; |
|---|
| 2375 | $levelup_log_holder .= "</td></tr>"; |
|---|
| 2376 | |
|---|
| 2377 | $levelup_log_count ++; |
|---|
| 2378 | } |
|---|
| 2379 | |
|---|
| 2380 | if ( empty ( $levelup_log_holder ) ) $levelup_log_holder = "<tr><td colspan=\"7\" align=\"center\">Keine Levelups eingetragen</td></tr>"; |
|---|
| 2381 | |
|---|
| 2382 | $chars_html = $this->get_account_chars ( $acc_main_data [0], $this->root_db, false, '', false ); |
|---|
| 2383 | |
|---|
| 2384 | $code .= "<div id=\"cs_levelup\" align=\"center\" style=\"display:{$vis[5][1]}\" width=\"100%\"><br><fieldset style=\"width:600px;border:1px solid black;padding:0.5em\"><legend style=\"border:1px solid black;padding: 0.2em 0.5em;font-size:90%;text-align:right\"><b>Levelup-Verwaltung</b></legend> |
|---|
| 2385 | <div style=\"position:relative; width:600px; height:200px; overflow:auto;\" align=\"center\" id=\"levelup\"> |
|---|
| 2386 | <table cellspacing=\"0\" width=\"100%\"> |
|---|
| 2387 | <tr><td align=\"center\"><b>Datum</b></td><td align=\"center\"><b>Char</b></td><td align=\"center\"><b>Level Alt</b></td><td align=\"center\"><b>Level Neu</b></td><td align=\"center\"><b>Kosten</b></td><td align=\"center\"><b>Von</b></td><td></td></tr> |
|---|
| 2388 | {$levelup_log_holder} |
|---|
| 2389 | </table></div>"; |
|---|
| 2390 | if ( $this->check_access_rights ( array ( 5, 11, 7 ) ) ) { |
|---|
| 2391 | $code .= "<br> |
|---|
| 2392 | <form onsubmit=\"ajaxUpload(this,'portal.php?mod=lol_control&modus=accman&action=12&do=add&acc={$acc_main_data[0]}','levelup','<center>Wird hinzugefügt...</center>','<center>Javascript: Fehler?</center>');return false;\"> |
|---|
| 2393 | <table> |
|---|
| 2394 | <tr><td>Char:</td><td><select name=\"charname\">{$chars_html}</select></td> |
|---|
| 2395 | <td>Level:</td><td><input type=\"text\" size=\"2\" name=\"level\" autocomplete=\"off\" /></td> |
|---|
| 2396 | <td>Punkte Abziehen?:</td><td><input type=\"checkbox\" name=\"change_points\" value=\"1\" CHECKED /></td> |
|---|
| 2397 | <td><input type=\"submit\" name=\"submit\" value=\"Hinzufügen\" /></td> |
|---|
| 2398 | </tr> |
|---|
| 2399 | <tr><td colspan=\"5\" align=\"right\">Code Versenden?:</td><td><input type=\"checkbox\" name=\"send_code\" value=\"1\" /></td><td></td> |
|---|
| 2400 | </table></form>"; |
|---|
| 2401 | } |
|---|
| 2402 | $code .= "</fieldset></div>"; |
|---|
| 2403 | |
|---|
| 2404 | $delete_log_sql = "Select * FROM `serverlog`.`logcharacters` WHERE `account` = '{$account}' AND `command` = 'Delete' ORDER BY `logdate` DESC"; |
|---|
| 2405 | $delete_log_query = $this->query ( $delete_log_sql, $this->forum_db ); |
|---|
| 2406 | |
|---|
| 2407 | $delete_log_holder = ''; |
|---|
| 2408 | $delete_log_count = 0; |
|---|
| 2409 | |
|---|
| 2410 | while ( $delete_log_data = $this->fetch_row ( $delete_log_query ) ) { |
|---|
| 2411 | if ( $delete_log_count % 2 ) $style = "style=\"background-image: url('/images/gallery/9f9f9f.png')\""; |
|---|
| 2412 | else $style = "style=\"background-image: url('/images/gallery/c6c6c6.png')\""; |
|---|
| 2413 | |
|---|
| 2414 | $delete_log_holder .= "<tr {$style}><td width=\"150\" align=\"center\">{$delete_log_data[0]}</td><td align=\"center\">{$delete_log_data[2]}</td><td align=\"center\">{$delete_log_data[4]}</td><td align=\"center\">{$delete_log_data[5]}</td></tr>"; |
|---|
| 2415 | |
|---|
| 2416 | $delete_log_count ++; |
|---|
| 2417 | } |
|---|
| 2418 | |
|---|
| 2419 | if ( empty ( $delete_log_holder ) ) $delete_log_holder = "<tr><td colspan=\"4\" align=\"center\">Keine Charaktere gelöscht</td></tr>"; |
|---|
| 2420 | |
|---|
| 2421 | $code .= "<div id=\"cs_chardel_log\" align=\"center\" style=\"display:{$vis[6][1]}\" width=\"100%\"><br><fieldset style=\"width:600px;border:1px solid black;padding:0.5em\"><legend style=\"border:1px solid black;padding: 0.2em 0.5em;font-size:90%;text-align:right\"><b>Charakter Löschlog</b></legend> |
|---|
| 2422 | <div style=\"position:relative; width:600px; height:200px; overflow:auto;\" align=\"center\"> |
|---|
| 2423 | <table cellspacing=\"0\" width=\"100%\"> |
|---|
| 2424 | <tr><td align=\"center\"><b>Datum</b></td><td align=\"center\"><b>IP</b></td><td align=\"center\"><b>Charkter</b></td><td align=\"center\"><b>Guid</b></td></tr> |
|---|
| 2425 | {$delete_log_holder} |
|---|
| 2426 | </table></div> |
|---|
| 2427 | </fieldset></div>"; |
|---|
| 2428 | |
|---|
| 2429 | $chartrans_log_sql = "Select `date`,`account`,`account2`,`char` FROM `char_transfer` WHERE `account` = '{$acc_main_data[0]}' OR `account2` = '{$acc_main_data[0]}' ORDER BY `date` DESC"; |
|---|
| 2430 | $chartrans_log_query = $this->query ( $chartrans_log_sql, $this->root_db ); |
|---|
| 2431 | |
|---|
| 2432 | $chartrans_log_holder = ''; |
|---|
| 2433 | $chartrans_log_count = 0; |
|---|
| 2434 | |
|---|
| 2435 | while ( $chartrans_log_data = $this->fetch_row ( $chartrans_log_query ) ) { |
|---|
| 2436 | if ( $chartrans_log_count % 2 ) $style = "style=\"background-image: url('/images/gallery/9f9f9f.png')\""; |
|---|
| 2437 | else $style = "style=\"background-image: url('/images/gallery/c6c6c6.png')\""; |
|---|
| 2438 | $date = @date ( "d.m.Y - H:m", $chartrans_log_data [0] ); |
|---|
| 2439 | |
|---|
| 2440 | $chartrans_log_holder .= "<tr {$style}><td width=\"150\" align=\"center\">{$date}</td><td align=\"center\">{$chartrans_log_data[1]}</td><td align=\"center\">{$chartrans_log_data[2]}</td><td align=\"center\">{$chartrans_log_data[3]}</td></tr>"; |
|---|
| 2441 | |
|---|
| 2442 | $chartrans_log_count ++; |
|---|
| 2443 | } |
|---|
| 2444 | |
|---|
| 2445 | if ( empty ( $chartrans_log_holder ) ) $chartrans_log_holder = "<tr><td colspan=\"4\" align=\"center\">Keine Charaktere transferiert</td></tr>"; |
|---|
| 2446 | |
|---|
| 2447 | $code .= "<div id=\"cs_chartrans_log\" align=\"center\" style=\"display:{$vis[7][1]}\" width=\"100%\"><br><fieldset style=\"width:600px;border:1px solid black;padding:0.5em\"><legend style=\"border:1px solid black;padding: 0.2em 0.5em;font-size:90%;text-align:right\"><b>Charaktertransfer Log</b></legend> |
|---|
| 2448 | <div style=\"position:relative; width:600px; height:200px; overflow:auto;\" align=\"center\"> |
|---|
| 2449 | <table cellspacing=\"0\" width=\"100%\"> |
|---|
| 2450 | <tr><td align=\"center\"><b>Datum</b></td><td align=\"center\"><b>Von</b></td><td align=\"center\"><b>Nach</b></td><td align=\"center\"><b>Char</b></td></tr> |
|---|
| 2451 | {$chartrans_log_holder} |
|---|
| 2452 | </table></div> |
|---|
| 2453 | </fieldset></div>"; |
|---|
| 2454 | |
|---|
| 2455 | $donation_log_sql = "Select (SELECT `id` FROM `donation_acc` WHERE `account` = '{$acc_main_data[0]}') AS `dona_id`,`guid`,`date`,`money`,`by` FROM `donation_log` WHERE `guid` = (SELECT `id` FROM `donation_acc` WHERE `account` = '{$acc_main_data[0]}')"; |
|---|
| 2456 | $donation_log_query = $this->query ( $donation_log_sql, $this->forum_db ); |
|---|
| 2457 | |
|---|
| 2458 | $donation_log_holder = ''; |
|---|
| 2459 | $donation_log_count = 0; |
|---|
| 2460 | $money_holder = 0; |
|---|
| 2461 | $dona_acc_id = 0; |
|---|
| 2462 | |
|---|
| 2463 | while ( $donation_log_data = $this->fetch_row ( $donation_log_query ) ) { |
|---|
| 2464 | $dona_acc_id = $donation_log_data [0]; |
|---|
| 2465 | if ( $donation_log_count % 2 ) $style = "style=\"background-image: url('/images/gallery/9f9f9f.png')\""; |
|---|
| 2466 | else $style = "style=\"background-image: url('/images/gallery/c6c6c6.png')\""; |
|---|
| 2467 | $date = @date ( "d.m.Y", $donation_log_data [2] ); |
|---|
| 2468 | $money = str_replace ( '.', ',', $donation_log_data [3] ); |
|---|
| 2469 | $money_holder = $money_holder + $donation_log_data [3]; |
|---|
| 2470 | |
|---|
| 2471 | if ( $this->check_access_rights ( array ( 5, 11, 7 ) ) ) $a_href = "<a href=\"javascript:void(0);\" onmouseover=\"Tip('Spende Löschen<br>Setzt Punkte zurück...')\" onmouseout=\"UnTip()\" onclick=\"get_content('donation_content','portal.php?mod=lol_control&modus=accman&action=13&acc={$acc_main_data[0]}&do=del&dona_id={$donation_log_data[2]}&point_acc={$acc_points[1]}&aid={$acc_points[0]}','get');get_content('lolcop','portal.php?mod=lol_control&modus=accman&action=10&do=show&acc={$acc_points[1]}&aid={$acc_points[0]}','get');get_content('points_act','portal.php?mod=lol_control&modus=accman&action=10&do=points_act&acc={$acc_points[1]}&aid={$acc_points[0]}','get');get_content('points_tot','portal.php?mod=lol_control&modus=accman&action=10&do=points_tot&acc={$acc_points[1]}&aid={$acc_points[0]}','get');get_content('donation_money','portal.php?mod=lol_control&modus=accman&action=13&do=m_update&acc={$acc_main_data[0]}','get');\">X</a>"; |
|---|
| 2472 | else $a_href = ""; |
|---|
| 2473 | |
|---|
| 2474 | $donation_log_holder .= "<tr {$style}><td align=\"center\">{$date}</td><td align=\"right\">{$money}</td><td align=\"center\">{$donation_log_data[4]}</td><td>{$a_href}</td></tr>"; |
|---|
| 2475 | |
|---|
| 2476 | $donation_log_count ++; |
|---|
| 2477 | } |
|---|
| 2478 | |
|---|
| 2479 | if ( empty ( $donation_log_holder ) ) $donation_log_holder = "<tr><td colspan=\"4\" align=\"center\">Hat noch nicht gespendet</td></tr>"; |
|---|
| 2480 | |
|---|
| 2481 | $money_holder = str_replace ( '.', ',', number_format ( $money_holder, 2 ) ); |
|---|
| 2482 | |
|---|
| 2483 | $code .= "<div id=\"cs_donation_log\" align=\"center\" style=\"display:{$vis[8][1]}\" width=\"100%\"><br><fieldset style=\"width:600px;border:1px solid black;padding:0.5em\"><legend style=\"border:1px solid black;padding: 0.2em 0.5em;font-size:90%;text-align:right\"><b>Spenden Log/Verwaltung ( <d id=\"donation_money\">{$money_holder}</d> €)</b></legend> |
|---|
| 2484 | <div style=\"position:relative; width:600px; height:200px; overflow:auto;\" align=\"center\" id=\"donation_content\"> |
|---|
| 2485 | <table cellspacing=\"0\" width=\"100%\"> |
|---|
| 2486 | <tr><td align=\"center\"><b>Datum</b></td><td align=\"center\"><b>Betrag in €uro</b></td><td align=\"center\"><b>Von</b></td><td></td></tr> |
|---|
| 2487 | {$donation_log_holder} |
|---|
| 2488 | </table></div>"; |
|---|
| 2489 | if ( $this->check_access_rights ( array ( 5, 11, 7 ) ) ) { |
|---|
| 2490 | $code .= "<br> |
|---|
| 2491 | <form onsubmit=\"ajaxUpload(this,'portal.php?mod=lol_control&modus=accman&action=13&do=add&dona_id={$dona_acc_id}&acc={$acc_main_data[0]}&point_acc={$acc_points[1]}&aid={$acc_points[0]}','donation_content','<center>Wird hinzugefügt...</center>','<center>Javascript: Fehler?</center>');return false;\"> |
|---|
| 2492 | <table> |
|---|
| 2493 | <td>Betrag:</td><td><input type=\"text\" size=\"4\" name=\"money\" autocomplete=\"off\" /></td> |
|---|
| 2494 | <td colspan=\"2\"><input type=\"submit\" name=\"submit\" value=\"Hinzufügen\" onclick=\"get_content('lolcop','portal.php?mod=lol_control&modus=accman&action=10&do=show&acc={$acc_points[1]}&aid={$acc_points[0]}','get');get_content('points_act','portal.php?mod=lol_control&modus=accman&action=10&do=points_act&acc={$acc_points[1]}&aid={$acc_points[0]}','get');get_content('points_tot','portal.php?mod=lol_control&modus=accman&action=10&do=points_tot&acc={$acc_points[1]}&aid={$acc_points[0]}','get');get_content('donation_money','portal.php?mod=lol_control&modus=accman&action=13&do=m_update&acc={$acc_main_data[0]}','get');\" /></td> |
|---|
| 2495 | </tr> |
|---|
| 2496 | </table></form>"; |
|---|
| 2497 | } |
|---|
| 2498 | $code .= "</fieldset></div>"; |
|---|
| 2499 | |
|---|
| 2500 | $ticket_sql = "SELECT `name`,`message`,`createTime`,`assignedTo`,`closedBy` FROM `{$this->lol_conf ['db_pve_live_characters']}`.`gm_tickets` WHERE `guid` IN (SELECT `guid` FROM `{$this->lol_conf ['db_pve_live_characters']}`.`characters` WHERE `account` = {$account})"; |
|---|
| 2501 | $ticket_query = $this->query ( $ticket_sql, $this->root_db ); |
|---|
| 2502 | $ticket_count = 0; |
|---|
| 2503 | $ticket_holder = ''; |
|---|
| 2504 | |
|---|
| 2505 | while ( $ticket_data = $this->fetch_row ( $ticket_query ) ) { |
|---|
| 2506 | if ( $ticket_count % 2 ) $style = "style=\"background-image: url('/images/gallery/9f9f9f.png')\""; |
|---|
| 2507 | else $style = "style=\"background-image: url('/images/gallery/c6c6c6.png')\""; |
|---|
| 2508 | $date = date ( "d.m.y", $ticket_data [2] ); |
|---|
| 2509 | |
|---|
| 2510 | if ( empty ( $ticket_data [3] ) || $ticket_data [3] === 0 ) $assigned = "Niemand"; |
|---|
| 2511 | else { |
|---|
| 2512 | $get_assigend_sql = "SELECT `name` FROM `{$this->lol_conf ['db_pve_live_characters']}`.`characters` WHERE `guid` = {$ticket_data[3]}"; |
|---|
| 2513 | $get_assigend_query = $this->query ( $get_assigend_sql, $this->root_db ); |
|---|
| 2514 | $get_assigned_fetch = $this->fetch_row ( $get_assigend_query ); |
|---|
| 2515 | $assigned = $get_assigned_fetch [0]; |
|---|
| 2516 | } |
|---|
| 2517 | |
|---|
| 2518 | if ( empty ( $ticket_data [4] ) || $ticket_data [4] === 0 ) $closed = "Offen"; |
|---|
| 2519 | else { |
|---|
| 2520 | $get_closed_sql = "SELECT `name` FROM `{$this->lol_conf ['db_pve_live_characters']}`.`characters` WHERE `guid` = {$ticket_data[4]}"; |
|---|
| 2521 | $get_closed_query = $this->query ( $get_closed_sql, $this->root_db ); |
|---|
| 2522 | $get_closed_fetch = $this->fetch_row ( $get_closed_query ); |
|---|
| 2523 | $closed = "Geschlossen ({$get_closed_fetch[0]})"; |
|---|
| 2524 | } |
|---|
| 2525 | |
|---|
| 2526 | $ticket_holder .= "<tr {$style}><td align=\"center\">{$date}</td><td align=\"center\">{$ticket_data[0]}</td><td>{$ticket_data[1]}</td><td align=\"center\">{$assigned}</td><td align=\"center\">{$closed}</td></tr>"; |
|---|
| 2527 | |
|---|
| 2528 | $ticket_count ++; |
|---|
| 2529 | } |
|---|
| 2530 | |
|---|
| 2531 | if ( empty ( $ticket_holder ) ) $ticket_holder = "<tr><td colspan=\"4\" align=\"center\">Keine Tickets vorhanden</td></tr>"; |
|---|
| 2532 | |
|---|
| 2533 | $code .= "<div id=\"cs_tickets\" align=\"center\" style=\"display:{$vis[9][1]}\" width=\"100%\"><br><fieldset style=\"width:600px;border:1px solid black;padding:0.5em\"><legend style=\"border:1px solid black;padding: 0.2em 0.5em;font-size:90%;text-align:right\"><b>InGame Tickets</b></legend> |
|---|
| 2534 | <div style=\"position:relative; width:600px; height:200px; overflow:auto;\" align=\"center\" id=\"donation_content\"> |
|---|
| 2535 | <table cellspacing=\"0\" width=\"100%\"> |
|---|
| 2536 | <tr><td align=\"center\"><b>Datum</b></td><td align=\"center\"><b>Charakter</b></td><td align=\"center\"><b>Nachricht</b></td><td align=\"center\"><b>Zugeordnet</b></td><td align=\"center\"><b>Status</b></td></tr> |
|---|
| 2537 | {$ticket_holder} |
|---|
| 2538 | </table></div>"; |
|---|
| 2539 | $code .= "</fieldset></div>"; |
|---|
| 2540 | |
|---|
| 2541 | // start |
|---|
| 2542 | |
|---|
| 2543 | |
|---|
| 2544 | $accman_code = "Willkommen im Account Management !!<br>Bitte gib eine Account ID, einen Accountnamen, Charakternamen, IP, E-Mail oder eine Charakter GUID zum Suchen ein.<br> |
|---|
| 2545 | <center><table cellspacing=\"2\"> |
|---|
| 2546 | <tr><td width=\"300\" valign=\"top\"> |
|---|
| 2547 | <fieldset style=\"width:250px;border:1px solid black;padding:0.5em\"><legend style=\"border:1px solid black;padding: 0.2em 0.5em;font-size:90%;text-align:right\"><b>Suche</b></legend> |
|---|
| 2548 | <form onsubmit=\"ajaxUpload(this,'portal.php?mod=lol_control&modus=accman','content','<center>Suche wird ausgeführt...</center>','<center>Javascript: Fehler?</center>');return false;\"> |
|---|
| 2549 | <table> |
|---|
| 2550 | <tr> |
|---|
| 2551 | <td><input type=\"text\" name=\"account\" autocomplete=\"off\" /></td> |
|---|
| 2552 | <td><input type=\"submit\" name=\"submit\" value=\"Suchen\" onclick=\"document.getElementById('showopt').style.display = 'none';\" /></td> |
|---|
| 2553 | </tr> |
|---|
| 2554 | <tr> |
|---|
| 2555 | <td colspan=\"2\"><input type=\"checkbox\" name=\"search_for[]\" value=\"accid\" onmouseover=\"Tip('Suche nach Account ID')\" onmouseout=\"UnTip()\" CHECKED /> <input type=\"checkbox\" name=\"search_for[]\" value=\"accname\" onmouseover=\"Tip('Suche nach Accountname')\" onmouseout=\"UnTip()\" CHECKED /> <input type=\"checkbox\" name=\"search_for[]\" value=\"charorguid\" onmouseover=\"Tip('Suche nach Charname oder GUID')\" onmouseout=\"UnTip()\" CHECKED /> <input type=\"checkbox\" name=\"search_for[]\" value=\"chardeleted\" onmouseover=\"Tip('Suche nach gelöschten Charakteren nach Name')\" onmouseout=\"UnTip()\" CHECKED /> <input type=\"checkbox\" name=\"search_for[]\" value=\"email\" onmouseover=\"Tip('Suche nach E-Mail')\" onmouseout=\"UnTip()\" CHECKED /> <input type=\"checkbox\" name=\"search_for[]\" value=\"ip\" onmouseover=\"Tip('Suche nach letzter IP')\" onmouseout=\"UnTip()\" CHECKED /> <input type=\"checkbox\" name=\"search_for[]\" value=\"ts_token\" onmouseover=\"Tip('Suche nach Teamspeak Unique User Id')\" onmouseout=\"UnTip()\" CHECKED /> <input type=\"checkbox\" name=\"search_for[]\" value=\"ticket\" onmouseover=\"Tip('Suche nach Tickets - Suchfeld leer lassen!<br>Nur alleine benutzen!')\" onmouseout=\"UnTip()\" /></td> |
|---|
| 2556 | </tr> |
|---|
| 2557 | </table></form> |
|---|
| 2558 | </fieldset><br> |
|---|
| 2559 | <div id=\"showopt\" style=\"display:none\"><fieldset style=\"width:260px;border:1px solid black;padding:0.5em\"><legend style=\"border:1px solid black;padding: 0.2em 0.5em;font-size:90%;text-align:right\"><b>Anzeige Ändern</b></legend> |
|---|
| 2560 | <form onsubmit=\"ajaxUpload(this,'portal.php?mod=lol_control&modus=accman&action=9','visible_save','<center>Speichert...</center>','<center>Javascript: Fehler?</center>'); return false;\"> |
|---|
| 2561 | <table width=\"100%\"> |
|---|
| 2562 | <tr><td>Benutzer Banns</td><td><input type=\"checkbox\" name=\"visible1\" value=\"1\" onclick=\"change_content_visible(this,'cs_banns')\"{$vis[0][0]}></td></tr> |
|---|
| 2563 | <tr><td>Benutzer Notizen</td><td><input type=\"checkbox\" name=\"visible2\" value=\"1\" onclick=\"change_content_visible(this,'cs_notes')\"{$vis[1][0]}></td></tr> |
|---|
| 2564 | <tr><td>Ähnliche Accounts</td><td><input type=\"checkbox\" name=\"visible3\" value=\"1\" onclick=\"change_content_visible(this,'cs_like')\"{$vis[2][0]}></tr> |
|---|
| 2565 | <tr><td>Benutzer Codes</td><td><input type=\"checkbox\" name=\"visible4\" value=\"1\" onclick=\"change_content_visible(this,'cs_codes')\"{$vis[3][0]}></td></tr> |
|---|
| 2566 | <tr><td>LoLCoP-Verwaltung</td><td><input type=\"checkbox\" name=\"visible5\" value=\"1\" onclick=\"change_content_visible(this,'cs_lolcop')\"{$vis[4][0]}></td></tr> |
|---|
| 2567 | <tr><td>Levelup-Verwaltung</td><td><input type=\"checkbox\" name=\"visible6\" value=\"1\" onclick=\"change_content_visible(this,'cs_levelup')\"{$vis[5][0]}></td></tr> |
|---|
| 2568 | <tr><td>Charakter Log</td><td><input type=\"checkbox\" name=\"visible7\" value=\"1\" onclick=\"change_content_visible(this,'cs_chardel_log')\"{$vis[6][0]}></td></tr> |
|---|
| 2569 | <tr><td>Charaktertansfer Log</td><td><input type=\"checkbox\" name=\"visible8\" value=\"1\" onclick=\"change_content_visible(this,'cs_chartrans_log')\"{$vis[7][0]}></td></tr> |
|---|
| 2570 | <tr><td>Spenden</td><td><input type=\"checkbox\" name=\"visible9\" value=\"1\" onclick=\"change_content_visible(this,'cs_donation_log')\"{$vis[8][0]}></td></tr> |
|---|
| 2571 | <tr><td>Tickets</td><td><input type=\"checkbox\" name=\"visible10\" value=\"1\" onclick=\"change_content_visible(this,'cs_tickets')\"{$vis[9][0]}></td></tr> |
|---|
| 2572 | <tr><td align=\"left\" colspan=\"2\"><input type=\"submit\" name=\"submit\" value=\"Speichern\"> <d id=\"visible_save\"></d></td></tr> |
|---|
| 2573 | </table></form> |
|---|
| 2574 | </fieldset></div> |
|---|
| 2575 | </td>"; |
|---|
| 2576 | if ( $this->check_access_rights ( array ( 5, 11, 7 ) ) ) { |
|---|
| 2577 | $accman_code .= " |
|---|
| 2578 | <td width=\"310\" valign=\"top\"> |
|---|
| 2579 | <fieldset style=\"width:200px;border:1px solid black;padding:0.5em\"><legend style=\"border:1px solid black;padding: 0.2em 0.5em;font-size:90%;text-align:right\"><b>Account Erstellen</b></legend> |
|---|
| 2580 | <form onsubmit=\"ajaxUpload(this,'portal.php?mod=lol_control&modus=accman&action=11','content','<center>Account wird erstellt...</center>','<center>Javascript: Fehler?</center>'); return false;\"><table><tr><td colspan=\"2\">Bitte Daten für den anzulegenden Benutzer Eingeben!</td></tr><tr><td>Benutzername:</td><td><input type=\"text\" name=\"account\" autocomplete=\"off\" /></td></tr><tr><td>Passwort:</td><td><input type=\"password\" name=\"pass\" /></td></tr><tr><td>E-Mail:</td><td><input type=\"text\" name=\"mail\" autocomplete=\"off\" /></td></tr><tr><td align=\"right\"><INPUT type=\"checkbox\" value=\"yes\" name=\"fuser\"></td><td>Forum Account Erstellen</td></tr><tr><td align=\"right\"><INPUT type=\"checkbox\" value=\"yes\" name=\"muser\"></td><td>Trinity Account Erstellen</td></tr><tr><td colspan=\"2\" align=\"center\"><input type=\"submit\" value=\"Account Erstellen\" /> <input type=\"button\" value=\"Zurücksetzen\" onclick=\"javascript:this.form.reset();\" /></td></table></form> |
|---|
| 2581 | </fieldset>"; |
|---|
| 2582 | } |
|---|
| 2583 | else |
|---|
| 2584 | $accman_code .= "<td>"; |
|---|
| 2585 | |
|---|
| 2586 | $accman_code .= "<br> |
|---|
| 2587 | <fieldset style=\"width:220px;border:1px solid black;padding:0.5em\"><legend style=\"border:1px solid black;padding: 0.2em 0.5em;font-size:90%;text-align:right\"><b>Levelup-/LoLCoP-/Geld Berechnung</b></legend> |
|---|
| 2588 | <table width=\"310\"> |
|---|
| 2589 | <tr><td>Level Aktuell:</td><td colspan=\"2\" align=\"left\"><input type=\"text\" name=\"lvl_now\" id=\"lvlnow\" onkeypress=\"calc_lolcop_money_lvl();\" onkeyup=\"calc_lolcop_money_lvl();\" size=\"5\" value=\"0\" /></td></tr> |
|---|
| 2590 | <tr><td>Level Neu:</td><td colspan=\"2\" align=\"left\"><input type=\"text\" name=\"lvl_new\" id=\"lvlnew\" onkeypress=\"calc_lolcop_money_lvl();\" onkeyup=\"calc_lolcop_money_lvl();\" size=\"5\" value=\"0\" /></td></tr> |
|---|
| 2591 | <tr><td>Punkte:</td><td align=\"left\"><input type=\"text\" name=\"lolcops\" id=\"lolcops\" onkeypress=\"calc_lolcop_money_lvl();\" onkeyup=\"calc_lolcop_money_lvl();\" size=\"5\" value=\"0\" /></td><td><div id=\"lolcops_div\">0</div></td></tr> |
|---|
| 2592 | <tr><td>Betrag:</td><td align=\"left\"><input type=\"text\" name=\"lolcopmoney\" id=\"lolcopmoney\" onkeypress=\"calc_lolcop_money_lvl();\" onkeyup=\"calc_lolcop_money_lvl();\" size=\"5\" value=\"0\" /></td><td><div id=\"lolcopmoney_div\">0.00 €</div></td></tr> |
|---|
| 2593 | </table> |
|---|
| 2594 | </fieldset> |
|---|
| 2595 | </td></tr> |
|---|
| 2596 | </table></center> |
|---|
| 2597 | <br><div id=\"content\">{$code}</div>"; |
|---|
| 2598 | |
|---|
| 2599 | // ende |
|---|
| 2600 | |
|---|
| 2601 | |
|---|
| 2602 | if ( $no_ajax ) return $accman_code; |
|---|
| 2603 | else $this->do_exit ( $code ); |
|---|
| 2604 | } |
|---|
| 2605 | |
|---|
| 2606 | if ( $submit && empty ( $action ) ) { |
|---|
| 2607 | $search_for = $this->check_post_data ( $data, 'search_for' ); |
|---|
| 2608 | if ( $account ) $account = trim ( $account ); |
|---|
| 2609 | if ( ( ( ! $account || empty ( $account ) ) && ! in_array ( 'ticket', $search_for ) ) || ! $search_for || empty ( $search_for ) ) $this->do_exit ( "Leider hast du nichts eingegeben" ); |
|---|
| 2610 | if ( empty ( $account ) && in_array ( 'ticket', $search_for ) ) { |
|---|
| 2611 | $check_arr = array ( 'accid', 'accname', 'charorguid', 'chardeleted', 'ip', 'email' ); |
|---|
| 2612 | |
|---|
| 2613 | foreach ( $check_arr as $search ) |
|---|
| 2614 | if ( in_array ( $search, $search_for ) ) $this->do_exit ( "Achtung: Suchfeld leer, wenn du nur Tickets suchen willst musst du alle anderen deaktivieren!" ); |
|---|
| 2615 | } |
|---|
| 2616 | $acc_data = array (); |
|---|
| 2617 | |
|---|
| 2618 | if ( in_array ( 'chardeleted', $search_for ) ) { |
|---|
| 2619 | $get_charlog_acc_sql = "SELECT `account` FROM `serverlog`.`logcharacters` WHERE `charname` = '{$account}' AND `command` = 'Delete' LIMIT 1"; |
|---|
| 2620 | $get_charlog_acc_query = $this->query ( $get_charlog_acc_sql, $this->forum_db ); |
|---|
| 2621 | $get_charlog_acc = $this->fetch_row ( $get_charlog_acc_query ); |
|---|
| 2622 | } |
|---|
| 2623 | |
|---|
| 2624 | $tail_sql = array (); |
|---|
| 2625 | |
|---|
| 2626 | foreach ( $search_for as $search ) |
|---|
| 2627 | switch ( $search ) |
|---|
| 2628 | { |
|---|
| 2629 | case 'accid': |
|---|
| 2630 | $tail_sql [ ] = "`id` LIKE '%{$account}%'"; |
|---|
| 2631 | break; |
|---|
| 2632 | case 'accname': |
|---|
| 2633 | $tail_sql [ ] = "`username` LIKE '%{$account}%'"; |
|---|
| 2634 | break; |
|---|
| 2635 | case 'charorguid': |
|---|
| 2636 | $tail_sql [ ] = "`id` IN (SELECT `account` FROM `{$this->lol_conf ['db_pve_live_characters']}`.`characters` WHERE `name` = '{$account}' OR `guid` = '{$account}')"; |
|---|
| 2637 | break; |
|---|
| 2638 | case 'chardeleted': |
|---|
| 2639 | if ( $get_charlog_acc [0] > 0 ) $tail_sql [ ] = "`id` = '{$get_charlog_acc[0]}'"; |
|---|
| 2640 | break; |
|---|
| 2641 | case 'email': |
|---|
| 2642 | $tail_sql [ ] = "`email` LIKE '%{$account}%'"; |
|---|
| 2643 | break; |
|---|
| 2644 | case 'ip': |
|---|
| 2645 | $tail_sql [ ] = "`last_ip` LIKE '%{$account}%'"; |
|---|
| 2646 | break; |
|---|
| 2647 | case 'ticket': |
|---|
| 2648 | $tail_sql [ ] = "`id` IN (SELECT `account` FROM `{$this->lol_conf ['db_pve_live_characters']}`.`characters` WHERE `guid` IN (SELECT `guid` FROM `{$this->lol_conf ['db_pve_live_characters']}`.`gm_tickets`))"; |
|---|
| 2649 | break; |
|---|
| 2650 | case 'ts_token': |
|---|
| 2651 | $get_ts_tokens_fuser_sql = "SELECT `username` FROM `ts_token_users` WHERE `uid` = '{$account}'"; |
|---|
| 2652 | $get_ts_tokens_fuser = $this->result ( $this->query ( $get_ts_tokens_fuser_sql, $this->forum_db ) ); |
|---|
| 2653 | $get_ts_tokens_fuser = $get_ts_tokens_fuser ? $get_ts_tokens_fuser : 0; |
|---|
| 2654 | $tail_sql [ ] = "`id` IN (SELECT `id` FROM `{$this->lol_conf ['db_live_accounts']}`.`account` WHERE `username` = '{$get_ts_tokens_fuser}')"; |
|---|
| 2655 | break; |
|---|
| 2656 | } |
|---|
| 2657 | |
|---|
| 2658 | $sql_part = ""; |
|---|
| 2659 | for ( $i = 0; $i <= count ( $tail_sql ); $i ++ ) { |
|---|
| 2660 | if ( $i !== 0 && $i !== count ( $tail_sql ) ) $sql_part .= " OR "; |
|---|
| 2661 | $sql_part .= $tail_sql [$i]; |
|---|
| 2662 | } |
|---|
| 2663 | |
|---|
| 2664 | if ( empty ( $sql_part ) ) $sql_part = "`username` LIKE '%{$account}%'"; |
|---|
| 2665 | |
|---|
| 2666 | $acc_sql = "SELECT `id` as `accid`,`username` as `uname`,`joindate`,`last_login`,`email`,`last_ip`,(SELECT COUNT(`name`) FROM `{$this->lol_conf ['db_live_accounts']}`.`account_holiday` WHERE `name` = `uname` ) as `umod`,(SELECT COUNT(`id`) FROM `{$this->lol_conf ['db_live_accounts']}`.`account_banned` WHERE `id` = `accid`) as `banns`, (SELECT COUNT(`guid`) FROM `{$this->lol_conf ['db_pve_live_characters']}`.`gm_tickets` WHERE `guid` IN (SELECT `guid` FROM `{$this->lol_conf ['db_pve_live_characters']}`.`characters` WHERE `account` = `accid` AND `closedBy` = 0)) as tickets, (SELECT COUNT(`guid`) FROM `{$this->lol_conf ['db_pve_live_characters']}`.`gm_tickets` WHERE `guid` IN (SELECT `guid` FROM `{$this->lol_conf ['db_pve_live_characters']}`.`characters` WHERE `account` = `accid`)) as tickets_tot,`online` FROM `{$this->lol_conf ['db_live_accounts']}`.`account` WHERE {$sql_part} ORDER BY `username`"; |
|---|
| 2667 | $acc_query = $this->query ( $acc_sql, $this->root_db ); |
|---|
| 2668 | $style_count = 0; |
|---|
| 2669 | $acc_holder = ''; |
|---|
| 2670 | |
|---|
| 2671 | while ( $acc_data = $this->fetch_row ( $acc_query ) ) { |
|---|
| 2672 | if ( $acc_data [6] == 1 ) $umode = "<font color=\"green\">Ja</font>"; |
|---|
| 2673 | else $umode = "<font color=\"red\">Nein</font>"; |
|---|
| 2674 | |
|---|
| 2675 | if ( $style_count % 2 ) $style = "style=\"background-image: url('/images/gallery/9f9f9f.png')\""; |
|---|
| 2676 | else $style = "style=\"background-image: url('/images/gallery/c6c6c6.png')\""; |
|---|
| 2677 | |
|---|
| 2678 | if ( $acc_data [10] == 1 ) $is_online = 'up.gif'; |
|---|
| 2679 | else $is_online = 'down.gif'; |
|---|
| 2680 | |
|---|
| 2681 | $get_forum_ip_sql = "SELECT `user_ip` FROM `phpbb_users` WHERE `username_clean` = '" . strtolower ( $acc_data [1] ) . "'"; |
|---|
| 2682 | $get_forum_ip_query = $this->query ( $get_forum_ip_sql, $this->forum_db ); |
|---|
| 2683 | $get_forum_ip = $this->result ( $get_forum_ip_query ); |
|---|
| 2684 | if ( empty ( $get_forum_ip ) ) $get_forum_ip = "Nicht eingeloggt"; |
|---|
| 2685 | |
|---|
| 2686 | if ( $acc_data [7] > 0 ) { |
|---|
| 2687 | $get_banreasons_sql = "SELECT `banreason` FROM `{$this->lol_conf ['db_live_accounts']}`.`account_banned` WHERE `id` = {$acc_data[0]}"; |
|---|
| 2688 | $get_banreasons_query = $this->query ( $get_banreasons_sql, $this->root_db ); |
|---|
| 2689 | $banreasons = '<table>'; |
|---|
| 2690 | while ( $reason = $this->fetch_row ( $get_banreasons_query ) ) |
|---|
| 2691 | $banreasons .= "<tr><td>* {$this->replace_da_shit($reason[0], array('"',"'"), '')}</td></tr>"; |
|---|
| 2692 | $banreasons .= "</table>"; |
|---|
| 2693 | |
|---|
| 2694 | $tooltip = "<td onmouseover=\"Tip('{$banreasons}')\" onmouseout=\"UnTip()\">{$acc_data[7]}</td>"; |
|---|
| 2695 | } |
|---|
| 2696 | else |
|---|
| 2697 | $tooltip = "<td>{$acc_data[7]}</td>"; |
|---|
| 2698 | |
|---|
| 2699 | $acc_holder .= "<tr {$style}><td>{$acc_data[0]}</td><td><a href=\"javascript:void(0);\" onclick=\"get_content('content','portal.php?mod=lol_control&modus=accman&action=1&acc={$acc_data[0]}','get');change_content_visible(false,'showopt');\"\">{$acc_data[1]}</a></td><td>{$acc_data[2]}</td><td>{$acc_data[3]}</td><td>{$umode}</td>{$tooltip}<td>{$acc_data[8]} / {$acc_data[9]}</td><td>{$acc_data[4]}</td><td>G: {$acc_data[5]}<br>F: {$get_forum_ip}</td><td align=\"center\"><img src=\"/images/{$is_online}\" /></td></tr>"; |
|---|
| 2700 | $style_count ++; |
|---|
| 2701 | } |
|---|
| 2702 | |
|---|
| 2703 | if ( empty ( $acc_holder ) ) $acc_holder = "<tr><td colspan=\"9\" align=\"center\">Keine Accounts gefunden</td></tr>"; |
|---|
| 2704 | |
|---|
| 2705 | $code = "<table cellspacing=\"0\"> |
|---|
| 2706 | <tr> |
|---|
| 2707 | <td style=\"text-align:center\">Acc-Id</td> |
|---|
| 2708 | <td style=\"text-align:center\">Acc-Name</td> |
|---|
| 2709 | <td style=\"text-align:center\">Anm.-Datum</td> |
|---|
| 2710 | <td style=\"text-align:center\">Letz.-Login</td> |
|---|
| 2711 | <td style=\"text-align:center\">UMode</td> |
|---|
| 2712 | <td style=\"text-align:center\">Banns</td> |
|---|
| 2713 | <td style=\"text-align:center\">Tickets</td> |
|---|
| 2714 | <td style=\"text-align:center\">E-Mail</td> |
|---|
| 2715 | <td style=\"text-align:center\">Letz.-Ip</td> |
|---|
| 2716 | <td style=\"text-align:center\">Online</td> |
|---|
| 2717 | </tr> |
|---|
| 2718 | {$acc_holder} |
|---|
| 2719 | </table>"; |
|---|
| 2720 | |
|---|
| 2721 | $this->do_exit ( $code ); |
|---|
| 2722 | } |
|---|
| 2723 | |
|---|
| 2724 | if ( empty ( $action ) && ! $submit ) { |
|---|
| 2725 | $code .= "Willkommen im Account Management !!<br>Bitte gib eine Account ID, einen Accountnamen, Charakternamen, IP, E-Mail oder eine Charakter GUID zum Suchen ein.<br> |
|---|
| 2726 | <center><table cellspacing=\"2\"> |
|---|
| 2727 | <tr><td width=\"330\" valign=\"top\"> |
|---|
| 2728 | <fieldset style=\"width:270px;border:1px solid black;padding:0.5em\"><legend style=\"border:1px solid black;padding: 0.2em 0.5em;font-size:90%;text-align:right\"><b>Suche</b></legend> |
|---|
| 2729 | <form onsubmit=\"ajaxUpload(this,'portal.php?mod=lol_control&modus=accman','content','<center>Suche wird ausgeführt...</center>','<center>Javascript: Fehler?</center>');return false;\"> |
|---|
| 2730 | <table> |
|---|
| 2731 | <tr> |
|---|
| 2732 | <td><input type=\"text\" name=\"account\" autocomplete=\"off\" /></td> |
|---|
| 2733 | <td><input type=\"submit\" name=\"submit\" value=\"Suchen\" onclick=\"document.getElementById('showopt').style.display = 'none';\" /></td> |
|---|
| 2734 | </tr> |
|---|
| 2735 | <tr> |
|---|
| 2736 | <td colspan=\"2\"><input type=\"checkbox\" name=\"search_for[]\" value=\"accid\" onmouseover=\"Tip('Suche nach Account ID')\" onmouseout=\"UnTip()\" CHECKED /> <input type=\"checkbox\" name=\"search_for[]\" value=\"accname\" onmouseover=\"Tip('Suche nach Accountname')\" onmouseout=\"UnTip()\" CHECKED /> <input type=\"checkbox\" name=\"search_for[]\" value=\"charorguid\" onmouseover=\"Tip('Suche nach Charname oder GUID')\" onmouseout=\"UnTip()\" CHECKED /> <input type=\"checkbox\" name=\"search_for[]\" value=\"chardeleted\" onmouseover=\"Tip('Suche nach gelöschten Charakteren nach Name')\" onmouseout=\"UnTip()\" CHECKED /> <input type=\"checkbox\" name=\"search_for[]\" value=\"email\" onmouseover=\"Tip('Suche nach E-Mail')\" onmouseout=\"UnTip()\" CHECKED /> <input type=\"checkbox\" name=\"search_for[]\" value=\"ip\" onmouseover=\"Tip('Suche nach letzter IP')\" onmouseout=\"UnTip()\" CHECKED /> <input type=\"checkbox\" name=\"search_for[]\" value=\"ts_token\" onmouseover=\"Tip('Suche nach Teamspeak Unique User Id')\" onmouseout=\"UnTip()\" CHECKED /> <input type=\"checkbox\" name=\"search_for[]\" value=\"ticket\" onmouseover=\"Tip('Suche nach Tickets - Suchfeld leer lassen!<br>Nur alleine benutzen!')\" onmouseout=\"UnTip()\" /></td> |
|---|
| 2737 | </tr> |
|---|
| 2738 | </table></form> |
|---|
| 2739 | </fieldset><br> |
|---|
| 2740 | <div id=\"showopt\" style=\"display:none\"><fieldset style=\"width:260px;border:1px solid black;padding:0.5em\"><legend style=\"border:1px solid black;padding: 0.2em 0.5em;font-size:90%;text-align:right\"><b>Anzeige Ändern</b></legend> |
|---|
| 2741 | <form onsubmit=\"ajaxUpload(this,'portal.php?mod=lol_control&modus=accman&action=9','visible_save','<center>Speichert...</center>','<center>Javascript: Fehler?</center>'); return false;\"> |
|---|
| 2742 | <table width=\"100%\"> |
|---|
| 2743 | <tr><td>Benutzer Banns</td><td><input type=\"checkbox\" name=\"visible1\" value=\"1\" onclick=\"change_content_visible(this,'cs_banns')\"{$vis[0][0]}></td></tr> |
|---|
| 2744 | <tr><td>Benutzer Notizen</td><td><input type=\"checkbox\" name=\"visible2\" value=\"1\" onclick=\"change_content_visible(this,'cs_notes')\"{$vis[1][0]}></td></tr> |
|---|
| 2745 | <tr><td>Ähnliche Accounts</td><td><input type=\"checkbox\" name=\"visible3\" value=\"1\" onclick=\"change_content_visible(this,'cs_like')\"{$vis[2][0]}></tr> |
|---|
| 2746 | <tr><td>Benutzer Codes</td><td><input type=\"checkbox\" name=\"visible4\" value=\"1\" onclick=\"change_content_visible(this,'cs_codes')\"{$vis[3][0]}></td></tr> |
|---|
| 2747 | <tr><td>LoLCoP-Verwaltung</td><td><input type=\"checkbox\" name=\"visible5\" value=\"1\" onclick=\"change_content_visible(this,'cs_lolcop')\"{$vis[4][0]}></td></tr> |
|---|
| 2748 | <tr><td>Levelup-Verwaltung</td><td><input type=\"checkbox\" name=\"visible6\" value=\"1\" onclick=\"change_content_visible(this,'cs_levelup')\"{$vis[5][0]}></td></tr> |
|---|
| 2749 | <tr><td>Charakter Log</td><td><input type=\"checkbox\" name=\"visible7\" value=\"1\" onclick=\"change_content_visible(this,'cs_chardel_log')\"{$vis[6][0]}></td></tr> |
|---|
| 2750 | <tr><td>Charaktertansfer Log</td><td><input type=\"checkbox\" name=\"visible8\" value=\"1\" onclick=\"change_content_visible(this,'cs_chartrans_log')\"{$vis[7][0]}></td></tr> |
|---|
| 2751 | <tr><td>Spenden</td><td><input type=\"checkbox\" name=\"visible9\" value=\"1\" onclick=\"change_content_visible(this,'cs_donation_log')\"{$vis[8][0]}></td></tr> |
|---|
| 2752 | <tr><td>Tickets</td><td><input type=\"checkbox\" name=\"visible10\" value=\"1\" onclick=\"change_content_visible(this,'cs_tickets')\"{$vis[9][0]}></td></tr> |
|---|
| 2753 | <tr><td align=\"left\" colspan=\"2\"><input type=\"submit\" name=\"submit\" value=\"Speichern\"> <d id=\"visible_save\"></d></td></tr> |
|---|
| 2754 | </table></form> |
|---|
| 2755 | </fieldset></div> |
|---|
| 2756 | </td>"; |
|---|
| 2757 | if ( $this->check_access_rights ( array ( 5, 11, 7 ) ) ) { |
|---|
| 2758 | $code .= " |
|---|
| 2759 | <td width=\"310\" valign=\"top\"> |
|---|
| 2760 | <fieldset style=\"width:200px;border:1px solid black;padding:0.5em\"><legend style=\"border:1px solid black;padding: 0.2em 0.5em;font-size:90%;text-align:right\"><b>Account Erstellen</b></legend> |
|---|
| 2761 | <form onsubmit=\"ajaxUpload(this,'portal.php?mod=lol_control&modus=accman&action=11','content','<center>Account wird erstellt...</center>','<center>Javascript: Fehler?</center>'); return false;\"><table><tr><td colspan=\"2\">Bitte Daten für den anzulegenden Benutzer Eingeben!</td></tr><tr><td>Benutzername:</td><td><input type=\"text\" name=\"account\" autocomplete=\"off\" /></td></tr><tr><td>Passwort:</td><td><input type=\"password\" name=\"pass\" /></td></tr><tr><td>E-Mail:</td><td><input type=\"text\" name=\"mail\" autocomplete=\"off\" /></td></tr><tr><td align=\"right\"><INPUT type=\"checkbox\" value=\"yes\" name=\"fuser\"></td><td>Forum Account Erstellen</td></tr><tr><td align=\"right\"><INPUT type=\"checkbox\" value=\"yes\" name=\"muser\"></td><td>Trinity Account Erstellen</td></tr><tr><td colspan=\"2\" align=\"center\"><input type=\"submit\" value=\"Account Erstellen\" /> <input type=\"button\" value=\"Zurücksetzen\" onclick=\"javascript:this.form.reset();\" /></td></table></form> |
|---|
| 2762 | </fieldset>"; |
|---|
| 2763 | } |
|---|
| 2764 | else |
|---|
| 2765 | $code .= "<td>"; |
|---|
| 2766 | |
|---|
| 2767 | $code .= "<br> |
|---|
| 2768 | <fieldset style=\"width:220px;border:1px solid black;padding:0.5em\"><legend style=\"border:1px solid black;padding: 0.2em 0.5em;font-size:90%;text-align:right\"><b>Levelup-/LoLCoP-/Geld Berechnung</b></legend> |
|---|
| 2769 | <table width=\"310\"> |
|---|
| 2770 | <tr><td>Level Aktuell:</td><td colspan=\"2\" align=\"left\"><input type=\"text\" name=\"lvl_now\" id=\"lvlnow\" onkeypress=\"calc_lolcop_money_lvl();\" onkeyup=\"calc_lolcop_money_lvl();\" size=\"5\" value=\"0\" /></td></tr> |
|---|
| 2771 | <tr><td>Level Neu:</td><td colspan=\"2\" align=\"left\"><input type=\"text\" name=\"lvl_new\" id=\"lvlnew\" onkeypress=\"calc_lolcop_money_lvl();\" onkeyup=\"calc_lolcop_money_lvl();\" size=\"5\" value=\"0\" /></td></tr> |
|---|
| 2772 | <tr><td>Punkte:</td><td align=\"left\"><input type=\"text\" name=\"lolcops\" id=\"lolcops\" onkeypress=\"calc_lolcop_money_lvl();\" onkeyup=\"calc_lolcop_money_lvl();\" size=\"5\" value=\"0\" /></td><td><div id=\"lolcops_div\">0</div></td></tr> |
|---|
| 2773 | <tr><td>Betrag:</td><td align=\"left\"><input type=\"text\" name=\"lolcopmoney\" id=\"lolcopmoney\" onkeypress=\"calc_lolcop_money_lvl();\" onkeyup=\"calc_lolcop_money_lvl();\" size=\"5\" value=\"0\" /></td><td><div id=\"lolcopmoney_div\">0.00 €</div></td></tr> |
|---|
| 2774 | </table> |
|---|
| 2775 | </fieldset> |
|---|
| 2776 | </td></tr> |
|---|
| 2777 | </table></center> |
|---|
| 2778 | <br><div id=\"content\"></div>"; |
|---|
| 2779 | return $code; |
|---|
| 2780 | } |
|---|
| 2781 | } |
|---|
| 2782 | |
|---|
| 2783 | private function accman_cookie_save ( $data ) |
|---|
| 2784 | { |
|---|
| 2785 | $vis_data [ ] = $this->check_post_data ( $data, 'visible1' ); |
|---|
| 2786 | $vis_data [ ] = $this->check_post_data ( $data, 'visible2' ); |
|---|
| 2787 | $vis_data [ ] = $this->check_post_data ( $data, 'visible3' ); |
|---|
| 2788 | $vis_data [ ] = $this->check_post_data ( $data, 'visible4' ); |
|---|
| 2789 | $vis_data [ ] = $this->check_post_data ( $data, 'visible5' ); |
|---|
| 2790 | $vis_data [ ] = $this->check_post_data ( $data, 'visible6' ); |
|---|
| 2791 | $vis_data [ ] = $this->check_post_data ( $data, 'visible7' ); |
|---|
| 2792 | $vis_data [ ] = $this->check_post_data ( $data, 'visible8' ); |
|---|
| 2793 | $vis_data [ ] = $this->check_post_data ( $data, 'visible9' ); |
|---|
| 2794 | $vis_data [ ] = $this->check_post_data ( $data, 'visible10' ); |
|---|
| 2795 | |
|---|
| 2796 | if ( $vis_data ) { |
|---|
| 2797 | if ( ! $vis_data [0] ) $vis_data [0] = 0; |
|---|
| 2798 | if ( ! $vis_data [1] ) $vis_data [1] = 0; |
|---|
| 2799 | if ( ! $vis_data [2] ) $vis_data [2] = 0; |
|---|
| 2800 | if ( ! $vis_data [3] ) $vis_data [3] = 0; |
|---|
| 2801 | if ( ! $vis_data [4] ) $vis_data [4] = 0; |
|---|
| 2802 | if ( ! $vis_data [5] ) $vis_data [5] = 0; |
|---|
| 2803 | if ( ! $vis_data [6] ) $vis_data [6] = 0; |
|---|
| 2804 | if ( ! $vis_data [7] ) $vis_data [7] = 0; |
|---|
| 2805 | if ( ! $vis_data [8] ) $vis_data [8] = 0; |
|---|
| 2806 | if ( ! $vis_data [9] ) $vis_data [9] = 0; |
|---|
| 2807 | |
|---|
| 2808 | $cookie_data = ''; |
|---|
| 2809 | $data_count = 0; |
|---|
| 2810 | |
|---|
| 2811 | foreach ( $vis_data as $store ) { |
|---|
| 2812 | $cookie_data .= $store; |
|---|
| 2813 | if ( $data_count !== ( count ( $vis_data ) - 1 ) ) $cookie_data .= "||"; |
|---|
| 2814 | $data_count ++; |
|---|
| 2815 | } |
|---|
| 2816 | |
|---|
| 2817 | $time = strtotime ( '+1 year', time ( ) ); |
|---|
| 2818 | setcookie ( 'accman_visible', $cookie_data, $time ); |
|---|
| 2819 | |
|---|
| 2820 | $this->do_exit ( "<font color=\"green\">Gespeichert</font>" ); |
|---|
| 2821 | } |
|---|
| 2822 | else |
|---|
| 2823 | $this->do_exit ( "<font color=\"red\">Fehler!</font>" ); |
|---|
| 2824 | } |
|---|
| 2825 | |
|---|
| 2826 | private function accman_donation_management ( $data ) |
|---|
| 2827 | { |
|---|
| 2828 | global $user; |
|---|
| 2829 | |
|---|
| 2830 | $do = isset ( $_GET ['do'] ) ? $_GET ['do'] : false; |
|---|
| 2831 | $dona_acc_id = isset ( $_GET ['dona_id'] ) ? $_GET ['dona_id'] : false; |
|---|
| 2832 | $money = $this->check_post_data ( $data, 'money', false, 0 ); |
|---|
| 2833 | $point_acc = isset ( $_GET ['point_acc'] ) ? $_GET ['point_acc'] : false; |
|---|
| 2834 | $aid = isset ( $_GET ['aid'] ) ? $_GET ['aid'] : false; |
|---|
| 2835 | $account = isset ( $data ['account'] ) ? $this->check_post_data ( $data, 'account', false, '' ) : ( isset ( $_GET ['acc'] ) ? $_GET ['acc'] : '' ); |
|---|
| 2836 | |
|---|
| 2837 | if ( empty ( $account ) || ! $do ) $this->do_exit ( "Eine der Variablen nicht übergeben?<br>Ist der Ziellevel eine Zahl?" ); |
|---|
| 2838 | |
|---|
| 2839 | if ( $do == 'add' ) { |
|---|
| 2840 | if ( ! $money ) $this->do_exit ( "Keinen Geldbetrag eingegeben?" ); |
|---|
| 2841 | |
|---|
| 2842 | if ( ! $dona_acc_id || empty ( $dona_acc_id ) ) { |
|---|
| 2843 | $dona_acc_id_sql = "SELECT `id` FROM `donation_acc` WHERE `account` = '{$account}'"; |
|---|
| 2844 | $create_dona_acc_sql = "INSERT IGNORE INTO `donation_acc` VALUES('', '{$account}')"; |
|---|
| 2845 | $created = $this->query ( $create_dona_acc_sql, $this->forum_db ); |
|---|
| 2846 | if ( $this->affected_rows ( $created ) == 1 ) $dona_acc_id = $this->sql_nextid ( $this->forum_db ); |
|---|
| 2847 | else { |
|---|
| 2848 | $created2 = $this->query ( $create_dona_acc_sql, $this->forum_db ); |
|---|
| 2849 | if ( $this->affected_rows ( $created2 ) == 1 ) $dona_acc_id = $this->sql_nextid ( $this->forum_db ); |
|---|
| 2850 | else { |
|---|
| 2851 | $dona_acc_id_query2 = $this->query ( $dona_acc_id_sql, $this->forum_db ); |
|---|
| 2852 | $dona_acc_id2 = $this->fetch_row ( $dona_acc_id_query2 ); |
|---|
| 2853 | $dona_acc_id = $dona_acc_id2 [0]; |
|---|
| 2854 | } |
|---|
| 2855 | } |
|---|
| 2856 | } |
|---|
| 2857 | |
|---|
| 2858 | $money = number_format ( str_replace ( ',', '.', $money ), 2 ); |
|---|
| 2859 | $date = time ( ); |
|---|
| 2860 | |
|---|
| 2861 | $points = ( ( $money * 100 ) * $this->point_config [get] [donation] ); |
|---|
| 2862 | $comm_points_set = $this->community_points_add_rem ( $account, 'donation', $points, $user->data ['username'], '' ); |
|---|
| 2863 | |
|---|
| 2864 | if ( $comm_points_set ) { |
|---|
| 2865 | $dona_insert_log_sql = "INSERT INTO `donation_log` VALUES({$dona_acc_id},{$date},{$money},'{$user->data['username']}','')"; |
|---|
| 2866 | $cps_query = $this->query ( $dona_insert_log_sql, $this->forum_db ); |
|---|
| 2867 | $affacted = $this->affected_rows ( $this->forum_db ); |
|---|
| 2868 | if ( $affacted == 0 ) $this->do_exit ( "Fehler beim Eintragen des Logeintrags!" ); |
|---|
| 2869 | } |
|---|
| 2870 | else |
|---|
| 2871 | $this->do_exit ( "Fehler bei der Vergabe der LoLCop!" ); |
|---|
| 2872 | } |
|---|
| 2873 | |
|---|
| 2874 | if ( $do == 'del' ) { |
|---|
| 2875 | if ( ! $dona_acc_id ) $this->do_exit ( "Kein Spendendatum übergeben" ); |
|---|
| 2876 | |
|---|
| 2877 | $get_money_sql = "SELECT `money` FROM `donation_log` WHERE `date` = {$dona_acc_id}"; |
|---|
| 2878 | $get_money_query = $this->query ( $get_money_sql, $this->forum_db ); |
|---|
| 2879 | $get_money = $this->fetch_row ( $get_money_query ); |
|---|
| 2880 | $get_money_rows = $this->num_rows ( $get_money_query ); |
|---|
| 2881 | |
|---|
| 2882 | if ( $get_money_rows > 0 ) { |
|---|
| 2883 | $points = ( ( $get_money [0] * 100 ) * $this->point_config [get] [donation] ); |
|---|
| 2884 | $comm_points_set = $this->community_points_add_rem ( $account, 'reason_extra', - $points, $user->data ['username'], 'Korrektur einer Spende!' ); |
|---|
| 2885 | } |
|---|
| 2886 | else |
|---|
| 2887 | $comm_points_set = false; |
|---|
| 2888 | |
|---|
| 2889 | if ( $comm_points_set ) { |
|---|
| 2890 | $dona_delete_sql = "DELETE FROM `donation_log` WHERE `date` = {$dona_acc_id}"; |
|---|
| 2891 | $cps_query = $this->query ( $dona_delete_sql, $this->forum_db ); |
|---|
| 2892 | } |
|---|
| 2893 | } |
|---|
| 2894 | |
|---|
| 2895 | if ( $do == 'm_update' ) sleep ( 2 ); |
|---|
| 2896 | |
|---|
| 2897 | $donation_log_sql = "Select `guid`,`date`,`money`,`by` FROM `donation_log` WHERE `guid` = (SELECT `id` FROM `donation_acc` WHERE `account` = '{$account}')"; |
|---|
| 2898 | $donation_log_query = $this->query ( $donation_log_sql, $this->forum_db ); |
|---|
| 2899 | |
|---|
| 2900 | $donation_log_holder = ''; |
|---|
| 2901 | $donation_log_count = 0; |
|---|
| 2902 | $money_holder = 0; |
|---|
| 2903 | |
|---|
| 2904 | while ( $donation_log_data = $this->fetch_row ( $donation_log_query ) ) { |
|---|
| 2905 | if ( $donation_log_count % 2 ) $style = "style=\"background-image: url('/images/gallery/9f9f9f.png')\""; |
|---|
| 2906 | else $style = "style=\"background-image: url('/images/gallery/c6c6c6.png')\""; |
|---|
| 2907 | $date = @date ( "d.m.Y", $donation_log_data [1] ); |
|---|
| 2908 | $money = str_replace ( '.', ',', $donation_log_data [2] ); |
|---|
| 2909 | $money_holder = $money_holder + $donation_log_data [2]; |
|---|
| 2910 | |
|---|
| 2911 | if ( $this->check_access_rights ( array ( 5, 11, 7 ) ) ) $a_href = "<a href=\"javascript:void(0);\" onmouseover=\"Tip('Spende Löschen<br>Setzt Punkte zurück...')\" onmouseout=\"UnTip()\" onclick=\"get_content('donation_content','portal.php?mod=lol_control&modus=accman&action=13&acc={$account}&do=del&dona_id={$donation_log_data[1]}&points_acc={$point_acc}&aid={$aid}','get');get_content('lolcop','portal.php?mod=lol_control&modus=accman&action=10&do=show&acc={$point_acc}&aid={$aid}','get');get_content('points_act','portal.php?mod=lol_control&modus=accman&action=10&do=points_act&acc={$point_acc}&aid={$aid}','get');get_content('points_tot','portal.php?mod=lol_control&modus=accman&action=10&do=points_tot&acc={$point_acc}&aid={$aid}','get');get_content('donation_money','portal.php?mod=lol_control&modus=accman&action=13&do=m_update&acc={$account}','get');\">X</a>"; |
|---|
| 2912 | else $a_href = ""; |
|---|
| 2913 | |
|---|
| 2914 | $donation_log_holder .= "<tr {$style}><td align=\"center\">{$date}</td><td align=\"right\">{$money}</td><td align=\"center\">{$donation_log_data[3]}</td><td>{$a_href}</td></tr>"; |
|---|
| 2915 | |
|---|
| 2916 | $donation_log_count ++; |
|---|
| 2917 | } |
|---|
| 2918 | |
|---|
| 2919 | if ( empty ( $donation_log_holder ) ) $donation_log_holder = "<tr><td colspan=\"4\" align=\"center\">Hat noch nicht gespendet</td></tr>"; |
|---|
| 2920 | |
|---|
| 2921 | $money_holder = str_replace ( '.', ',', number_format ( $money_holder, 2 ) ); |
|---|
| 2922 | |
|---|
| 2923 | $code = " |
|---|
| 2924 | <table cellspacing=\"0\" width=\"100%\"> |
|---|
| 2925 | <tr><td align=\"center\"><b>Datum</b></td><td align=\"center\"><b>Betrag in €uro</b></td><td align=\"center\"><b>Von</b></td><td></td></tr> |
|---|
| 2926 | {$donation_log_holder} |
|---|
| 2927 | </table>"; |
|---|
| 2928 | |
|---|
| 2929 | $this->do_exit ( ( $do !== 'm_update' ) ? $code : $money_holder ); |
|---|
| 2930 | } |
|---|
| 2931 | |
|---|
| 2932 | private function accman_levelup_management ( $data ) |
|---|
| 2933 | { |
|---|
| 2934 | global $user; |
|---|
| 2935 | |
|---|
| 2936 | $do = isset ( $_GET ['do'] ) ? $_GET ['do'] : false; |
|---|
| 2937 | $aid = isset ( $_GET ['aid'] ) ? $_GET ['aid'] : false; |
|---|
| 2938 | $level = $this->check_post_data ( $data, 'level' ); |
|---|
| 2939 | $char = $this->check_post_data ( $data, 'charname' ); |
|---|
| 2940 | $change_points = $this->check_post_data ( $data, 'change_points' ); |
|---|
| 2941 | $send_code = $this->check_post_data ( $data, 'send_code' ); |
|---|
| 2942 | $account = isset ( $data ['account'] ) ? $this->check_post_data ( $data, 'account', false, '' ) : ( isset ( $_GET ['acc'] ) ? $_GET ['acc'] : '' ); |
|---|
| 2943 | |
|---|
| 2944 | if ( empty ( $account ) || ! $do ) $this->do_exit ( "Eine der Variablen nicht übergeben?<br>Ist der Ziellevel eine Zahl?" ); |
|---|
| 2945 | |
|---|
| 2946 | $acc_cleaned = strtolower ( $account ); |
|---|
| 2947 | |
|---|
| 2948 | if ( $do == 'add' ) { |
|---|
| 2949 | if ( ! $level || ! is_numeric ( $level ) || empty ( $level ) || ! $char ) $this->do_exit ( "Eine der Variablen nicht übergeben?<br>Ist der Ziellevel eine Zahl?" ); |
|---|
| 2950 | $get_player_points_sql = "SELECT `points_cur` FROM `lol_points` WHERE `name` = '{$acc_cleaned}'"; |
|---|
| 2951 | $get_player_points_query = $this->query ( $get_player_points_sql, $this->forum_db ); |
|---|
| 2952 | if ( ! $get_player_points_query ) $this->do_exit ( "ERROR:Fehler beim Abfragen der Punkte" ); |
|---|
| 2953 | $get_player_points = $this->fetch_row ( $get_player_points_query ); |
|---|
| 2954 | $char = explode ( '||', $char ); |
|---|
| 2955 | $old_lvl = $this->get_char_data ( $char [1], "level" ); |
|---|
| 2956 | if ( ( $get_player_points [0] < 1 || ! $old_lvl ) && $change_points ) $this->do_exit ( "ERROR: Zu wenig Punkte oder<br>Level konnte nicht abgefragt werden." ); |
|---|
| 2957 | if ( $old_lvl >= $level ) $this->do_exit ( "ERROR: Der neue Level ist gleich oder kleiner als der Alte! Vertippt?" ); |
|---|
| 2958 | |
|---|
| 2959 | $points_calculated = ( ( $level * $level ) - ( $old_lvl * $old_lvl ) ) * $this->point_config ['other'] [4]; |
|---|
| 2960 | if ( $points_calculated > $get_player_points [0] && $change_points ) { |
|---|
| 2961 | $level_holder = 0; |
|---|
| 2962 | $points_holder = 0; |
|---|
| 2963 | |
|---|
| 2964 | for ( $i = 80; $i > $old_lvl; $i -- ) { |
|---|
| 2965 | $new_points = ( ( $i * $i ) - ( $old_lvl * $old_lvl ) ) * $this->point_config ['other'] [4]; |
|---|
| 2966 | if ( $new_points <= $get_player_points [0] ) { |
|---|
| 2967 | $level_holder = $i; |
|---|
| 2968 | $points_holder = $new_points; |
|---|
| 2969 | break; |
|---|
| 2970 | } |
|---|
| 2971 | } |
|---|
| 2972 | |
|---|
| 2973 | $code = ( $points_holder == 0 ) ? "Zu wenig Punkte um überhaupt ein Levelup durch zu führen!<br>Derzeitige Punkte: {$get_player_points[0]}" : "Zu wenig Punkte für das Level: {$level} ({$points_calculated} benötigt)<br>oder maximal Level überschritten!<br>Möglicher Level: {$level_holder}<br>Derzeitige Punkte: {$get_player_points[0]}<br>Kosten: {$points_holder} Punkte"; |
|---|
| 2974 | $this->do_exit ( $code ); |
|---|
| 2975 | } |
|---|
| 2976 | else { |
|---|
| 2977 | $date = time ( ); |
|---|
| 2978 | |
|---|
| 2979 | $insert_sql = "INSERT INTO `levelup_log` VALUES('','{$date}','{$acc_cleaned}','{$char[1]}','{$old_lvl}','{$level}','{$points_calculated}','{$user->data['username']}')"; |
|---|
| 2980 | $query = $this->query ( $insert_sql, $this->forum_db ); |
|---|
| 2981 | if ( $query ) { |
|---|
| 2982 | if ( $send_code ) $levelup_code = $this->generate_gift_code ( 0, 1, 1, $acc_cleaned, $char [0], $level ); |
|---|
| 2983 | if ( $levelup_code ) { |
|---|
| 2984 | $levelup_subject = "Dein Levelup Code"; |
|---|
| 2985 | $levelup_message = "Danke für deine Spende, hier ist dein Levelup Code für den Charakter <b>{$char[1]}</b> von Level {$old_lvl} auf {$level}:<br>{$levelup_code}<br><br><Den Code-Bot zum Einlösen findest du in jeder großen Stadt vor oder in einem Auktionshaus!<br><br>MFG<br>Dein Land of Legends Team"; |
|---|
| 2986 | $this->phpbb_send_pm ( $this->get_forum_id ( $acc_cleaned ), $levelup_subject, $levelup_message ); |
|---|
| 2987 | } |
|---|
| 2988 | if ( $change_points ) $this->community_points_add_rem ( $acc_cleaned, 'reason_extra', - $points_calculated, $user->data ['username'], "Levelup Char <b>{$char[1]}</b> {$old_lvl} -> {$level}" ); |
|---|
| 2989 | } |
|---|
| 2990 | } |
|---|
| 2991 | } |
|---|
| 2992 | |
|---|
| 2993 | if ( $do == 'del' && $aid ) { |
|---|
| 2994 | $del_sql = "DELETE FROM `levelup_log` WHERE `id` = '{$aid}'"; |
|---|
| 2995 | $del1 = $this->query ( $del_sql, $this->forum_db ); |
|---|
| 2996 | } |
|---|
| 2997 | |
|---|
| 2998 | $levelup_log_sql = "Select * FROM `levelup_log` WHERE `account` = '{$acc_cleaned}' ORDER BY `date` DESC"; |
|---|
| 2999 | $levelup_log_query = $this->query ( $levelup_log_sql, $this->forum_db ); |
|---|
| 3000 | |
|---|
| 3001 | $levelup_log_holder = ''; |
|---|
| 3002 | $levelup_log_count = 0; |
|---|
| 3003 | |
|---|
| 3004 | while ( $levelup_log_data = $this->fetch_row ( $levelup_log_query ) ) { |
|---|
| 3005 | if ( $levelup_log_count % 2 ) $style = "style=\"background-image: url('/images/gallery/9f9f9f.png')\""; |
|---|
| 3006 | else $style = "style=\"background-image: url('/images/gallery/c6c6c6.png')\""; |
|---|
| 3007 | |
|---|
| 3008 | $date = @date ( "d.m.Y - H:m", $levelup_log_data [1] ); |
|---|
| 3009 | $levelup_log_holder .= "<tr {$style}><td width=\"150\" align=\"center\">{$date}</td><td align=\"center\">{$levelup_log_data[3]}</td><td align=\"center\">{$levelup_log_data[4]}</td><td align=\"center\">{$levelup_log_data[5]}</td><td align=\"center\">{$levelup_log_data[6]}</td><td align=\"center\">{$levelup_log_data[7]}</td><td><a href=\"javascript:void(0);\" onmouseover=\"Tip('Levelup Löschen<br>Achtung: Die Punkte werden nicht wieder subtrahiert!')\" onmouseout=\"UnTip()\" onclick=\"get_content('levelup','portal.php?mod=lol_control&modus=accman&action=12&acc={$account}&do=del&aid={$levelup_log_data[0]}','get')\">X</a></td></tr>"; |
|---|
| 3010 | |
|---|
| 3011 | $levelup_log_count ++; |
|---|
| 3012 | } |
|---|
| 3013 | |
|---|
| 3014 | if ( empty ( $levelup_log_holder ) ) $levelup_log_holder = "<tr><td colspan=\"7\" align=\"center\">Keine Levelups eingetragen</td></tr>"; |
|---|
| 3015 | |
|---|
| 3016 | $code = " |
|---|
| 3017 | <table cellspacing=\"0\" width=\"100%\"> |
|---|
| 3018 | <tr><td align=\"center\"><b>Datum</b></td><td align=\"center\"><b>Char</b></td><td align=\"center\"><b>Level Alt</b></td><td align=\"center\"><b>Level Neu</b></td><td align=\"center\"><b>Kosten</b></td><td align=\"center\"><b>Von</b></td><td></td></tr> |
|---|
| 3019 | {$levelup_log_holder} |
|---|
| 3020 | </table>"; |
|---|
| 3021 | |
|---|
| 3022 | $this->do_exit ( $code ); |
|---|
| 3023 | } |
|---|
| 3024 | |
|---|
| 3025 | private function accman_create_accounts ( $data ) |
|---|
| 3026 | { |
|---|
| 3027 | $pass = $this->check_post_data ( $data, 'pass' ); |
|---|
| 3028 | $mail = $this->check_post_data ( $data, 'mail' ); |
|---|
| 3029 | $fuser = $this->check_post_data ( $data, 'fuser' ); |
|---|
| 3030 | $muser = $this->check_post_data ( $data, 'muser' ); |
|---|
| 3031 | $account = isset ( $data ['account'] ) ? $this->check_post_data ( $data, 'account', false, '' ) : ( isset ( $_GET ['acc'] ) ? $_GET ['acc'] : '' ); |
|---|
| 3032 | |
|---|
| 3033 | if ( empty ( $account ) || ! $pass || ! $mail ) $this->do_exit ( "Eine der Variablen nicht übergeben?" ); |
|---|
| 3034 | |
|---|
| 3035 | $acc_created = ''; |
|---|
| 3036 | |
|---|
| 3037 | if ( $fuser ) { |
|---|
| 3038 | $create_fuser = $this->forum_user_register ( $account, $pass, $mail ); |
|---|
| 3039 | if ( ! $create_fuser ) $this->do_exit ( "Leider gab es einen Fehler beim Hinzufügen des Forum-Benutzers!" ); |
|---|
| 3040 | $acc_created .= "<br>Forum Account für {$account} (ID: {$create_fuser}) wurde erfolgreich angelegt und die Aktivierungsmail an \"{$mail}\" versendet!"; |
|---|
| 3041 | } |
|---|
| 3042 | |
|---|
| 3043 | if ( $muser ) { |
|---|
| 3044 | $t_fonly = ( $fuser && ! $muser ) ? true : false; |
|---|
| 3045 | $create_muser = $this->game_account_create_update ( $account, $pass, $mail, time ( ), '127.0.0.1', 'create', $t_fonly ); |
|---|
| 3046 | if ( ! empty ( $create_muser ) && strstr ( $create_muser, "Trinity" ) ) $acc_created .= "<br>" . $create_muser; |
|---|
| 3047 | |
|---|
| 3048 | $acc_created .= "<br>Trinity Account wurde erfolgreich erstellt!"; |
|---|
| 3049 | } |
|---|
| 3050 | |
|---|
| 3051 | $acc_created .= "<br><br>Bitte nun nach dem Account Suchen!"; |
|---|
| 3052 | |
|---|
| 3053 | $this->do_exit ( $acc_created ); |
|---|
| 3054 | } |
|---|
| 3055 | |
|---|
| 3056 | private function accman_community_points_manager ( $data ) |
|---|
| 3057 | { |
|---|
| 3058 | global $user; |
|---|
| 3059 | |
|---|
| 3060 | $do = isset ( $_GET ['do'] ) ? $_GET ['do'] : false; |
|---|
| 3061 | $aid = isset ( $_GET ['aid'] ) ? $_GET ['aid'] : false; |
|---|
| 3062 | $points = $this->check_post_data ( $data, 'points' ); |
|---|
| 3063 | $reason = $this->check_post_data ( $data, 'reason' ); |
|---|
| 3064 | $reason_extra = $this->check_post_data ( $data, 'description', false, '' ); |
|---|
| 3065 | $account = isset ( $data ['account'] ) ? $this->check_post_data ( $data, 'account', false, '' ) : ( isset ( $_GET ['acc'] ) ? $_GET ['acc'] : '' ); |
|---|
| 3066 | |
|---|
| 3067 | if ( $do != 'points_act' && $do != 'points_tot' && ( empty ( $account ) || ! $do || ! $aid ) ) $this->do_exit ( "Eine der Variablen nicht übergeben?" ); |
|---|
| 3068 | if ( ! $aid && ( $do == 'points_act' || $do == 'points_tot' ) ) $this->do_exit ( "Keine ID Übergeben?" ); |
|---|
| 3069 | |
|---|
| 3070 | if ( $do == 'change' ) if ( $points && $reason ) $this->community_points_add_rem ( $account, $reason, $points, $user->data ['username'], $reason_extra ); |
|---|
| 3071 | |
|---|
| 3072 | if ( $do == 'points_act' || $do == 'points_tot' || $do == 'show' ) sleep ( 2 ); |
|---|
| 3073 | |
|---|
| 3074 | $acc_points_sql = "SELECT * FROM `lol_points` WHERE `id` = '{$aid}'"; |
|---|
| 3075 | $acc_points_query = $this->query ( $acc_points_sql, $this->forum_db ); |
|---|
| 3076 | $acc_points = $this->fetch_row ( $acc_points_query ); |
|---|
| 3077 | |
|---|
| 3078 | if ( $do == 'points_act' ) $this->do_exit ( $acc_points [2] ); |
|---|
| 3079 | if ( $do == 'points_tot' ) $this->do_exit ( $acc_points [3] ); |
|---|
| 3080 | |
|---|
| 3081 | $points_log_sql = "Select `date`,`points`,`reason`,`reason_extra`,`from` FROM `lol_points_log` WHERE `user` = '{$acc_points[0]}' AND `reason` <> 5 ORDER BY `date` DESC"; |
|---|
| 3082 | $points_log_query = $this->query ( $points_log_sql, $this->forum_db ); |
|---|
| 3083 | |
|---|
| 3084 | $points_log_holder = ''; |
|---|
| 3085 | $points_log_count = 0; |
|---|
| 3086 | |
|---|
| 3087 | while ( $points_log_data = $this->fetch_row ( $points_log_query ) ) { |
|---|
| 3088 | if ( $points_log_count % 2 ) $style = "style=\"background-image: url('/images/gallery/9f9f9f.png')\""; |
|---|
| 3089 | else $style = "style=\"background-image: url('/images/gallery/c6c6c6.png')\""; |
|---|
| 3090 | |
|---|
| 3091 | $date = @date ( "d.m.Y - H:m", $points_log_data [0] ); |
|---|
| 3092 | $log_extra = $this->community_points_log_txt ( $points_log_data [1], $points_log_data [2] ) . $points_log_data [3]; |
|---|
| 3093 | $log_txt = ( ! empty ( $points_log_data [3] ) ) ? $log_extra : $this->community_points_log_txt ( $points_log_data [1], $points_log_data [2] ); |
|---|
| 3094 | $points_log_holder .= "<tr {$style}><td width=\"150\">{$date}</td><td>{$log_txt}</td><td>{$points_log_data[4]}</td></tr>"; |
|---|
| 3095 | |
|---|
| 3096 | $points_log_count ++; |
|---|
| 3097 | } |
|---|
| 3098 | |
|---|
| 3099 | if ( empty ( $points_log_holder ) ) $points_log_holder = "<tr><td colspan=\"3\" align=\"center\">Keine Logeinträge Vorhanden</td></tr>"; |
|---|
| 3100 | |
|---|
| 3101 | $code = "<table cellspacing=\"0\" width=\"100%\"> |
|---|
| 3102 | <tr><td align=\"center\"><b>Datum</b></td><td align=\"center\"><b>Log</b></td><td align=\"center\"><b>Von</b></td></tr> |
|---|
| 3103 | {$points_log_holder} |
|---|
| 3104 | </table>"; |
|---|
| 3105 | |
|---|
| 3106 | $this->do_exit ( $code ); |
|---|
| 3107 | } |
|---|
| 3108 | |
|---|
| 3109 | private function accman_code_manager ( $data ) |
|---|
| 3110 | { |
|---|
| 3111 | global $user; |
|---|
| 3112 | |
|---|
| 3113 | $account = isset ( $data ['account'] ) ? $this->check_post_data ( $data, 'account', false, '' ) : ( isset ( $_GET ['acc'] ) ? $_GET ['acc'] : '' ); |
|---|
| 3114 | if ( empty ( $account ) ) $this->do_exit ( "Eine der Variablen nicht übergeben?" ); |
|---|
| 3115 | |
|---|
| 3116 | $trinity_acc = $this->get_account_id_name ( '', $account ); |
|---|
| 3117 | $user_id = $this->get_forum_id ( $trinity_acc ); |
|---|
| 3118 | $item = $this->check_post_data ( $data, 'item' ); |
|---|
| 3119 | $quantity = $this->check_post_data ( $data, 'quantity' ); |
|---|
| 3120 | $do = isset ( $_GET ['do'] ) ? $_GET ['do'] : false; |
|---|
| 3121 | $code = isset ( $_GET ['code'] ) ? $_GET ['code'] : false; |
|---|
| 3122 | |
|---|
| 3123 | if ( $do == 'add' ) { |
|---|
| 3124 | if ( ! $item || ! $quantity ) $this->do_exit ( "Eine der Variablen nicht übergeben?" ); |
|---|
| 3125 | |
|---|
| 3126 | if ( $user_id ) { |
|---|
| 3127 | $f_name = $this->get_forum_name ( $user_id ); |
|---|
| 3128 | $gift_code = $this->generate_gift_code ( $item, 1, $quantity, $account, 0, 0, $user->data ['username'] ); |
|---|
| 3129 | $subject = "Du hast einen LoL-Code erhalten..."; |
|---|
| 3130 | $message = "Hallo {$f_name}, |
|---|
| 3131 | Du hast einen LoL-Code von einem LandOfLegends Teammitglied bekommen und kannst diesen InGame für ein Item Einlösen. |
|---|
| 3132 | Suche nach dem CodeBot, dieser steht in jeder Stadt vor oder im Auktionshaus! |
|---|
| 3133 | |
|---|
| 3134 | Dein persönlicher LoL-Code lautet: |
|---|
| 3135 | {$gift_code} |
|---|
| 3136 | |
|---|
| 3137 | Achtung: Dieser Code ist an deinen Account gebunden, du kannst ihn 1 mal für einen beliebigen Charakter deines Accounts Einlösen! |
|---|
| 3138 | |
|---|
| 3139 | MFG |
|---|
| 3140 | |
|---|
| 3141 | Dein LandOfLegends Team"; |
|---|
| 3142 | $pm = $this->phpbb_send_pm ( $user_id, $subject, $message ); |
|---|
| 3143 | } |
|---|
| 3144 | } |
|---|
| 3145 | |
|---|
| 3146 | if ( $do == 'del' ) { |
|---|
| 3147 | if ( ! $code ) $this->do_exit ( "Eine der Variablen nicht übergeben?" ); |
|---|
| 3148 | |
|---|
| 3149 | $del_code_1_sql = "DELETE FROM `gift_code_log` WHERE `code` = '{$code}' AND `account` = '{$account}'"; |
|---|
| 3150 | $del_code2_sql = "DELETE FROM `{$this->lol_conf ['db_pve_live_characters']}`.`codes` WHERE `code` = '{$code}' AND `account_id` = '{$account}'"; |
|---|
| 3151 | |
|---|
| 3152 | if ( $user_id ) { |
|---|
| 3153 | $del_lvl_c = $this->query ( $del_code_1_sql, $this->forum_db ); |
|---|
| 3154 | $del_lvl_c2 = $this->query ( $del_code2_sql, $this->root_db ); |
|---|
| 3155 | $f_name = $this->get_forum_name ( $user_id ); |
|---|
| 3156 | $subject = "Dir wurde ein LoL-Code entzogen..."; |
|---|
| 3157 | $message = "Hallo {$f_name}, |
|---|
| 3158 | dir wurde der folgende LoL-Code entzogen: |
|---|
| 3159 | {$code} |
|---|
| 3160 | |
|---|
| 3161 | MFG |
|---|
| 3162 | |
|---|
| 3163 | Dein LandOfLegends Team"; |
|---|
| 3164 | $pm = $this->phpbb_send_pm ( $user_id, $subject, $message ); |
|---|
| 3165 | } |
|---|
| 3166 | } |
|---|
| 3167 | |
|---|
| 3168 | if ( $do == 'codes_count' ) sleep ( 1 ); |
|---|
| 3169 | |
|---|
| 3170 | $get_acc_codes_sql1 = "SELECT * FROM `gift_code_log` WHERE `account` = '{$account}'"; |
|---|
| 3171 | $get_acc_codes_query1 = $this->query ( $get_acc_codes_sql1, $this->forum_db ); |
|---|
| 3172 | $get_acc_codes_rows = $this->num_rows ( $get_acc_codes_query1 ); |
|---|
| 3173 | |
|---|
| 3174 | if ( $do == 'codes_count' ) $this->do_exit ( $get_acc_codes_rows ); |
|---|
| 3175 | |
|---|
| 3176 | $codes_holder = ""; |
|---|
| 3177 | $codes_count = 0; |
|---|
| 3178 | |
|---|
| 3179 | if ( $get_acc_codes_rows > 0 ) { |
|---|
| 3180 | while ( $s2_codes = $this->fetch_row ( $get_acc_codes_query1 ) ) { |
|---|
| 3181 | if ( $codes_count % 2 ) $style = "style=\"background-image: url('/images/gallery/9f9f9f.png')\""; |
|---|
| 3182 | else $style = "style=\"background-image: url('/images/gallery/c6c6c6.png')\""; |
|---|
| 3183 | $date = date ( 'd.m.Y H:m', $s2_codes [1] ); |
|---|
| 3184 | $actual_status_sql = "SELECT `uses` FROM `{$this->lol_conf ['db_pve_live_characters']}`.`codes` WHERE `code` = '{$s2_codes[3]}' AND `account_id` = '{$s2_codes[2]}'"; |
|---|
| 3185 | $actual_status_query = $this->query ( $actual_status_sql, $this->root_db ); |
|---|
| 3186 | $actual_status_rows = $this->num_rows ( $actual_status_query ); |
|---|
| 3187 | |
|---|
| 3188 | $code_del = ""; |
|---|
| 3189 | |
|---|
| 3190 | if ( $actual_status_rows !== 0 ) { |
|---|
| 3191 | $actual_uses_t = $this->fetch_row ( $actual_status_query ); |
|---|
| 3192 | $actual_uses = "{$actual_uses_t[0]} mal benutzbar"; |
|---|
| 3193 | $code_del = "<a href=\"javascript:void(0);\" onmouseover=\"Tip('Code Löschen')\" onmouseout=\"UnTip()\" onclick=\"get_content('codes','portal.php?mod=lol_control&modus=accman&action=8&acc={$account}&do=del&code={$s2_codes[3]}','get')\">X</a>"; |
|---|
| 3194 | } |
|---|
| 3195 | else |
|---|
| 3196 | $actual_uses = "<font color=\"red\">Schon Benutzt</font>"; |
|---|
| 3197 | |
|---|
| 3198 | $get_item_name_sql = "SELECT `name_loc3` FROM `{$this->lol_conf ['db_pve_live_world']}`.`locales_item` WHERE `entry` = '{$s2_codes[4]}'"; |
|---|
| 3199 | $get_item_name_query = $this->query ( $get_item_name_sql, $this->root_db ); |
|---|
| 3200 | $get_item_name = $this->fetch_row ( $get_item_name_query ); |
|---|
| 3201 | |
|---|
| 3202 | if ( empty ( $get_item_name [0] ) ) { |
|---|
| 3203 | $get_item_name_sql = "SELECT `name` FROM `{$this->lol_conf ['db_pve_live_world']}`.`item_template` WHERE `entry` = '{$s2_codes[4]}'"; |
|---|
| 3204 | $get_item_name_query = $this->query ( $get_item_name_sql, $this->root_db ); |
|---|
| 3205 | $get_item_name = $this->fetch_row ( $get_item_name_query ); |
|---|
| 3206 | } |
|---|
| 3207 | |
|---|
| 3208 | if ( empty ( $get_item_name [0] ) && $s2_codes [8] > 0 ) $get_item_name [0] = "Levelup: {$s2_codes[8]}"; |
|---|
| 3209 | |
|---|
| 3210 | $codes_holder .= "<tr {$style}><td>{$date}</td><td>{$s2_codes[3]}</td><td>{$s2_codes[4]}</td><td>{$get_item_name[0]}</td><td>{$s2_codes[5]}</td><td>{$actual_uses}</td><td>{$s2_codes[9]}</td><td>{$code_del}</td></tr>"; |
|---|
| 3211 | $codes_count ++; |
|---|
| 3212 | } |
|---|
| 3213 | } |
|---|
| 3214 | else |
|---|
| 3215 | $codes_holder = "<tr><td colspan=\"7\" align=\"center\">Keine LoL-Codes gefunden</td></tr>"; |
|---|
| 3216 | |
|---|
| 3217 | $code = " |
|---|
| 3218 | <table cellspacing=\"0\" width=\"100%\"> |
|---|
| 3219 | <tr><td align=\"center\">Datum</td><td align=\"center\">Code</td><td align=\"center\">Item-ID</td><td align=\"center\">Item-Name</td><td align=\"center\">Menge</td><td align=\"center\">Benutzbar</td><td align=\"center\">Von</td></tr> |
|---|
| 3220 | {$codes_holder} |
|---|
| 3221 | </table>"; |
|---|
| 3222 | |
|---|
| 3223 | $this->do_exit ( $code ); |
|---|
| 3224 | } |
|---|
| 3225 | |
|---|
| 3226 | private function accman_switch_gallery_bans ( $data ) |
|---|
| 3227 | { |
|---|
| 3228 | $account = isset ( $data ['account'] ) ? $this->check_post_data ( $data, 'account', false, '' ) : ( isset ( $_GET ['acc'] ) ? $_GET ['acc'] : '' ); |
|---|
| 3229 | if ( empty ( $account ) ) $this->do_exit ( "Eine der Variablen nicht übergeben?" ); |
|---|
| 3230 | |
|---|
| 3231 | $check_gallery_ban = "SELECT `id` FROM `lol_gallery_blacklist` WHERE `name` = '{$account}'"; |
|---|
| 3232 | $check_gallery_ban_query = $this->query ( $check_gallery_ban, $this->forum_db ); |
|---|
| 3233 | $check_gallery_ban = $this->num_rows ( $check_gallery_ban_query ); |
|---|
| 3234 | |
|---|
| 3235 | if ( $check_gallery_ban == 1 ) { |
|---|
| 3236 | $set_gallery_ban_sql = "DELETE FROM `lol_gallery_blacklist` WHERE `name` = '{$account}'"; |
|---|
| 3237 | $cgb_query = $this->query ( $set_gallery_ban_sql, $this->forum_db ); |
|---|
| 3238 | $txt = "<font color=\"green\">Aktiviert</font>"; |
|---|
| 3239 | } |
|---|
| 3240 | else { |
|---|
| 3241 | $set_gallery_ban_sql = "INSERT INTO `lol_gallery_blacklist` VALUES('','{$account}')"; |
|---|
| 3242 | $cgb_query = $this->query ( $set_gallery_ban_sql, $this->forum_db ); |
|---|
| 3243 | $txt = "<font color=\"red\">Deaktiviert</font>"; |
|---|
| 3244 | } |
|---|
| 3245 | |
|---|
| 3246 | $this->do_exit ( $txt ); |
|---|
| 3247 | } |
|---|
| 3248 | |
|---|
| 3249 | private function accman_reg_for_community_points ( $data ) |
|---|
| 3250 | { |
|---|
| 3251 | $reg = isset ( $_GET ['regi'] ) ? $_GET ['regi'] : ''; |
|---|
| 3252 | $account = isset ( $data ['account'] ) ? $this->check_post_data ( $data, 'account', false, '' ) : ( isset ( $_GET ['acc'] ) ? $_GET ['acc'] : '' ); |
|---|
| 3253 | |
|---|
| 3254 | if ( empty ( $account ) ) $this->do_exit ( "Eine der Variablen nicht übergeben?" ); |
|---|
| 3255 | |
|---|
| 3256 | $acc_clean = strtolower ( $account ); |
|---|
| 3257 | |
|---|
| 3258 | if ( $reg == 0 ) $this->community_points_reg ( '', '', $acc_clean, true ); |
|---|
| 3259 | |
|---|
| 3260 | $check_points_sql = "SELECT `activated` FROM `lol_points` WHERE `name` = '{$acc_clean}'"; |
|---|
| 3261 | $check_points_query = $this->query ( $check_points_sql, $this->forum_db ); |
|---|
| 3262 | $check_points = $this->fetch_row ( $check_points_query ); |
|---|
| 3263 | |
|---|
| 3264 | if ( $reg == 0 ) $txt = "<font color=\"green\">Für LoLCoP registriert!</font>"; |
|---|
| 3265 | else if ( $check_points [0] == 1 && $reg !== 0 ) { |
|---|
| 3266 | $set_points_active_sql = "UPDATE `lol_points` SET `activated` = '0' WHERE `name` = '{$acc_clean}'"; |
|---|
| 3267 | $cp_query = $this->query ( $set_points_active_sql, $this->forum_db ); |
|---|
| 3268 | $txt = "<font color=\"red\">Deaktiviert</font>"; |
|---|
| 3269 | } |
|---|
| 3270 | else { |
|---|
| 3271 | $set_points_active_sql = "UPDATE `lol_points` SET `activated` = '1' WHERE `name` = '{$acc_clean}'"; |
|---|
| 3272 | $cp_query = $this->query ( $set_points_active_sql, $this->forum_db ); |
|---|
| 3273 | $txt = "<font color=\"green\">Aktiviert</font>"; |
|---|
| 3274 | } |
|---|
| 3275 | |
|---|
| 3276 | $this->do_exit ( $txt ); |
|---|
| 3277 | } |
|---|
| 3278 | |
|---|
| 3279 | private function accman_manage_user_notes ( $data ) |
|---|
| 3280 | { |
|---|
| 3281 | global $user; |
|---|
| 3282 | |
|---|
| 3283 | $note = $this->check_post_data ( $data, 'note' ); |
|---|
| 3284 | $do = isset ( $_GET ['do'] ) ? $_GET ['do'] : false; |
|---|
| 3285 | $log_id = isset ( $_GET ['log_id'] ) ? $_GET ['log_id'] : false; |
|---|
| 3286 | $account = isset ( $data ['account'] ) ? $this->check_post_data ( $data, 'account', false, '' ) : ( isset ( $_GET ['acc'] ) ? $_GET ['acc'] : '' ); |
|---|
| 3287 | if ( empty ( $account ) ) $this->do_exit ( 'Kein Account Übergeben!' ); |
|---|
| 3288 | |
|---|
| 3289 | $reportee_id = $this->get_forum_id ( $account ); |
|---|
| 3290 | |
|---|
| 3291 | if ( $reportee_id ) { |
|---|
| 3292 | if ( $do == 'add' ) { |
|---|
| 3293 | $log_data = serialize ( $note ); |
|---|
| 3294 | $time = time ( ); |
|---|
| 3295 | $set_new_note_sql = "INSERT INTO `phpbb_log` VALUES('','3','{$user->data['user_id']}','0','0','{$reportee_id}','{$user->data['user_ip']}','{$time}','LOG_USER_GENERAL','{$log_data}', 0, 0)"; |
|---|
| 3296 | $report_query = $this->query ( $set_new_note_sql, $this->forum_db ); |
|---|
| 3297 | } |
|---|
| 3298 | |
|---|
| 3299 | if ( $do == 'del' ) { |
|---|
| 3300 | $del_note_sql = "DELETE FROM `phpbb_log` WHERE `log_id` = '{$log_id}'"; |
|---|
| 3301 | $report_del_query = $this->query ( $del_note_sql, $this->forum_db ); |
|---|
| 3302 | } |
|---|
| 3303 | |
|---|
| 3304 | $acc_notes_sql = "SELECT * FROM `phpbb_log` WHERE `reportee_id` = '{$reportee_id}'"; |
|---|
| 3305 | $acc_notes_query = $this->query ( $acc_notes_sql, $this->forum_db ); |
|---|
| 3306 | |
|---|
| 3307 | $notes_holder = ''; |
|---|
| 3308 | $notes_count = 0; |
|---|
| 3309 | |
|---|
| 3310 | while ( $note = $this->fetch_row ( $acc_notes_query ) ) { |
|---|
| 3311 | if ( $notes_count % 2 ) $style = "style=\"background-image: url('/images/gallery/9f9f9f.png')\""; |
|---|
| 3312 | else $style = "style=\"background-image: url('/images/gallery/c6c6c6.png')\""; |
|---|
| 3313 | |
|---|
| 3314 | $temp_user_id = $this->get_forum_name ( $note [2] ); |
|---|
| 3315 | $date = date ( "d.m.Y H:m", $note [7] ); |
|---|
| 3316 | $note_data = unserialize ( $note [9] ); |
|---|
| 3317 | $a_href = "<a href=\"javascript:void(0);\" onmouseover=\"Tip('Notiz Löschen')\" onmouseout=\"UnTip()\" onclick=\"get_content('notes','portal.php?mod=lol_control&modus=accman&action=5&log_id={$note[0]}&do=del&acc={$account}','get')\">X</a>"; |
|---|
| 3318 | switch ( $note [8] ) |
|---|
| 3319 | { |
|---|
| 3320 | case LOG_USER_GENERAL: |
|---|
| 3321 | $note_data = ( is_array ( $note_data ) ) ? $note_data [0] : $note_data; |
|---|
| 3322 | break; |
|---|
| 3323 | case LOG_USER_NEW_PASSWORD: |
|---|
| 3324 | $note_data = "Passwort wurde geändert!"; |
|---|
| 3325 | $a_href = ""; |
|---|
| 3326 | break; |
|---|
| 3327 | case LOG_USER_UPDATE_EMAIL: |
|---|
| 3328 | $note_data = "E-Mail geändert von \"{$note_data[1]}\" auf \"{$note_data[2]}\"!"; |
|---|
| 3329 | $a_href = ""; |
|---|
| 3330 | break; |
|---|
| 3331 | case LOG_USER_WARNING: |
|---|
| 3332 | case LOG_USER_WARNING_BODY: |
|---|
| 3333 | $note_data = "Verwarnung: " . ( is_array ( $note_data ) ) ? $note_data [0] : $note_data; |
|---|
| 3334 | break; |
|---|
| 3335 | default: |
|---|
| 3336 | $note_data = ( is_array ( $note_data ) ) ? $note_data [0] : $note_data; |
|---|
| 3337 | break; |
|---|
| 3338 | } |
|---|
| 3339 | |
|---|
| 3340 | $notes_holder .= "<tr {$style}><td>{$temp_user_id}</td><td>{$note[6]}</td><td>{$date}</td><td style=\"width:250px\">{$this->replace_url($note_data)}</td><td>{$a_href}</td></tr>"; |
|---|
| 3341 | $notes_count ++; |
|---|
| 3342 | } |
|---|
| 3343 | |
|---|
| 3344 | if ( empty ( $notes_holder ) ) $notes_holder = "<tr><td colspan=\"4\" align=\"center\">Keine Notizen vorhanden</td></tr>"; |
|---|
| 3345 | |
|---|
| 3346 | $code = " |
|---|
| 3347 | <table cellspacing=\"0\" width=\"100%\"> |
|---|
| 3348 | <tr><td align=\"center\">Von</td><td align=\"center\">IP</td><td align=\"center\">Datum</td><td align=\"center\">Vorgang</td><td></td></tr> |
|---|
| 3349 | {$notes_holder} |
|---|
| 3350 | </table>"; |
|---|
| 3351 | |
|---|
| 3352 | $this->do_exit ( $code ); |
|---|
| 3353 | } |
|---|
| 3354 | else |
|---|
| 3355 | $this->do_exit ( "Fehler beim Abfragen der ID des Users für die Notiz!" ); |
|---|
| 3356 | } |
|---|
| 3357 | |
|---|
| 3358 | private function accman_switch_account_holiday ( $data ) |
|---|
| 3359 | { |
|---|
| 3360 | $account = isset ( $data ['account'] ) ? $this->check_post_data ( $data, 'account', false, '' ) : ( isset ( $_GET ['acc'] ) ? $_GET ['acc'] : '' ); |
|---|
| 3361 | if ( empty ( $account ) ) $this->do_exit ( "Eine der Variablen nicht übergeben?" ); |
|---|
| 3362 | |
|---|
| 3363 | $acc_clean = strtolower ( $account ); |
|---|
| 3364 | $check_umode_sql = "SELECT `name` FROM `account_holiday` WHERE `name` = '{$acc_clean}'"; |
|---|
| 3365 | $check_umode_query = $this->query ( $check_umode_sql, $this->root_db ); |
|---|
| 3366 | $check_umode = $this->num_rows ( $check_umode_query ); |
|---|
| 3367 | |
|---|
| 3368 | $active = - 1; |
|---|
| 3369 | |
|---|
| 3370 | if ( $check_umode == 1 ) { |
|---|
| 3371 | $set_umode1 = "Update `account` SET `locked` = '0', `activated` = '1' WHERE `username` = '{$acc_clean}'"; |
|---|
| 3372 | $query = $this->query ( $set_umode1, $this->root_db ); |
|---|
| 3373 | if ( $query ) { |
|---|
| 3374 | $set_umode2 = "DELETE FROM `account_holiday` WHERE `name` = '{$acc_clean}'"; |
|---|
| 3375 | $undo_query = $this->query ( $set_umode2, $this->root_db ); |
|---|
| 3376 | $active = 0; |
|---|
| 3377 | } |
|---|
| 3378 | } |
|---|
| 3379 | else { |
|---|
| 3380 | $set_umode1 = "Update `account` SET `locked` = '1', `activated` = '0' WHERE `username` = '{$acc_clean}'"; |
|---|
| 3381 | $query = $this->query ( $set_umode1, $this->root_db ); |
|---|
| 3382 | if ( $query ) { |
|---|
| 3383 | $time = time ( ); |
|---|
| 3384 | $set_umode2 = "INSERT IGNORE INTO `account_holiday` VALUES('{$acc_clean}','{$time}')"; |
|---|
| 3385 | $undo_query = $this->query ( $set_umode2, $this->root_db ); |
|---|
| 3386 | $active = 1; |
|---|
| 3387 | } |
|---|
| 3388 | } |
|---|
| 3389 | |
|---|
| 3390 | if ( $active == - 1 ) $return = "Fehler"; |
|---|
| 3391 | else if ( $active == 0 ) $return = "<font color=\"red\">Deaktiviert</font>"; |
|---|
| 3392 | else $return = "<font color=\"green\">Aktiviert</font>"; |
|---|
| 3393 | |
|---|
| 3394 | $this->do_exit ( $return ); |
|---|
| 3395 | } |
|---|
| 3396 | |
|---|
| 3397 | private function accman_account_bannmanager ( $data ) |
|---|
| 3398 | { |
|---|
| 3399 | global $user; |
|---|
| 3400 | |
|---|
| 3401 | $account = isset ( $data ['account'] ) ? $this->check_post_data ( $data, 'account', false, '' ) : ( isset ( $_GET ['acc'] ) ? $_GET ['acc'] : '' ); |
|---|
| 3402 | $duration = $this->check_post_data ( $data, 'duration' ); |
|---|
| 3403 | $reason = $this->check_post_data ( $data, 'reason', false, '' ); |
|---|
| 3404 | $blevel = $this->check_post_data ( $data, 'blevel', false, '' ); |
|---|
| 3405 | $ips = $this->check_post_data ( $data, 'ips', false, '' ); |
|---|
| 3406 | $uemail = $this->check_post_data ( $data, 'buemail', false, '' ); |
|---|
| 3407 | $do = isset ( $_GET ['do'] ) ? $_GET ['do'] : false; |
|---|
| 3408 | $s = isset ( $_GET ['s'] ) ? $_GET ['s'] : false; |
|---|
| 3409 | $e = isset ( $_GET ['e'] ) ? $_GET ['e'] : false; |
|---|
| 3410 | |
|---|
| 3411 | if ( empty ( $account ) ) $this->do_exit ( "Eine der Variablen nicht übergeben?" ); |
|---|
| 3412 | |
|---|
| 3413 | $accname = $this->get_account_id_name ( '', $account ); |
|---|
| 3414 | $f_user = $this->get_forum_id ( $accname ); |
|---|
| 3415 | |
|---|
| 3416 | if ( $do == 'add' ) { |
|---|
| 3417 | $now = time ( ); |
|---|
| 3418 | $duration = ( $duration && ! empty ( $duration ) && strlen ( $duration ) > 0 ) ? strtotime ( "+{$duration} hours", $now ) : strtotime ( "+10 years", $now ); |
|---|
| 3419 | |
|---|
| 3420 | switch ( $blevel ) |
|---|
| 3421 | { |
|---|
| 3422 | case 'all': |
|---|
| 3423 | require_once 'functions_user.php'; |
|---|
| 3424 | if ( ! empty ( $ips ) ) { |
|---|
| 3425 | $t_ips = explode ( "|||", $ips ); |
|---|
| 3426 | $fipban = user_ban ( 'ip', $t_ips, 0, 0, 0, $reason, $reason ); |
|---|
| 3427 | |
|---|
| 3428 | if ( is_array ( $t_ips ) ) foreach ( $t_ips as $uip ) { |
|---|
| 3429 | $set_bann_sql1 = "INSERT IGNORE INTO `ip_banned` VALUES('{$uip}','{$now}','{$duration}','{$user->data['username']}','{$reason}')"; |
|---|
| 3430 | $quer1 = $this->query ( $set_bann_sql1, $this->root_db ); |
|---|
| 3431 | } |
|---|
| 3432 | } |
|---|
| 3433 | case 'forum': |
|---|
| 3434 | require_once 'functions_user.php'; |
|---|
| 3435 | if ( ! empty ( $uemail ) ) $feban = user_ban ( 'email', $uemail, 0, 0, 0, $reason, $reason ); |
|---|
| 3436 | if ( $blevel != 'all' ) break; |
|---|
| 3437 | case 'game': |
|---|
| 3438 | $set_bann_sql0 = "INSERT INTO `account_banned` VALUES('{$account}','{$now}','{$duration}','{$user->data['username']}','{$reason}','1')"; |
|---|
| 3439 | $quer0 = $this->query ( $set_bann_sql0, $this->root_db ); |
|---|
| 3440 | |
|---|
| 3441 | $ban_chars = $this->get_account_chars ( $accname, $this->root_db, false, '', false, false, true ); |
|---|
| 3442 | |
|---|
| 3443 | if ( $this->realm_online [0] && is_array ( $ban_chars ) ) foreach ( $ban_chars as $ban_char ) |
|---|
| 3444 | exec ( "/home/forum/soap.php '192.168.10.1' '7878' 'gmsoap' 'soapuserpassword' 'kick {$ban_char}'" ); |
|---|
| 3445 | |
|---|
| 3446 | $from = date ( "d.m.Y H:i:s", $now ); |
|---|
| 3447 | $till = date ( "d.m.Y H:i:s", $duration ); |
|---|
| 3448 | $forum_reason = nl2br ( $reason ); |
|---|
| 3449 | |
|---|
| 3450 | if ( $blevel != 'all' ) { |
|---|
| 3451 | $subject = "Du wurdest gebannt!"; |
|---|
| 3452 | $message = "Hallo {$accname},<br /><br />leider hast du einen Regelverstoß begangen und wurdest gebannt.<br />Von: {$from}<br />Bis: {$till}<br /><br />Als Begründung wurde von {$user->data['username']} angegeben:<br />{$forum_reason}<br /><br />Für eventuelle Rückfragen bitte an den bannenden GM wenden!<br /><br />MFG<br /><br />Dein LoL-Team"; |
|---|
| 3453 | $this->phpbb_send_pm ( $f_user, $subject, $message ); |
|---|
| 3454 | } |
|---|
| 3455 | break; |
|---|
| 3456 | } |
|---|
| 3457 | |
|---|
| 3458 | $set_banned_sql = "INSERT INTO `user_banns` VALUES ('{$f_user}','{$account}','{$now}','{$duration}','{$blevel}','{$user->data['username']}','{$reason}')"; |
|---|
| 3459 | $set_banned_query = $this->query ( $set_banned_sql, $this->forum_db ); |
|---|
| 3460 | } |
|---|
| 3461 | |
|---|
| 3462 | if ( $do == 'del' ) { |
|---|
| 3463 | if ( ! $s || ! $e ) $this->do_exit ( "Eine der Variablen nicht übergeben?" ); |
|---|
| 3464 | |
|---|
| 3465 | $get_acc_banns_sql = "Select * FROM `user_banns` WHERE `gid` = '{$account}'"; |
|---|
| 3466 | $get_acc_banns_query = $this->query ( $get_acc_banns_sql, $this->forum_db ); |
|---|
| 3467 | $gab = $this->fetch_row ( $get_acc_banns_query ); |
|---|
| 3468 | |
|---|
| 3469 | $save_acc_banns_log_sql = "INSERT INTO `user_unbanns` VALUES ('{$gab[0]}','{$gab[1]}','{$gab[2]}','{$gab[3]}','{$gab[4]}','{$user->data['username']}','{$user->data['user_ip']}',NOW())"; |
|---|
| 3470 | $save_acc_banns_log_query = $this->query ( $save_acc_banns_log_sql, $this->forum_db ); |
|---|
| 3471 | |
|---|
| 3472 | $del_ban_sql = "DELETE FROM `account_banned` WHERE `id` = '{$account}' AND `bandate` = '{$s}' AND `unbandate` = '{$e}'"; |
|---|
| 3473 | $dquer0 = $this->query ( $del_ban_sql, $this->root_db ); |
|---|
| 3474 | |
|---|
| 3475 | $del_banned_sql = "DELETE FROM `user_banns` WHERE `gid` = '{$account}' AND `from` = '{$s}' AND `till` = '{$e}'"; |
|---|
| 3476 | $del_banned_query = $this->query ( $del_banned_sql, $this->forum_db ); |
|---|
| 3477 | } |
|---|
| 3478 | |
|---|
| 3479 | if ( $do == 'count_banns' ) sleep ( 1 ); |
|---|
| 3480 | |
|---|
| 3481 | $acc_banns_sql = "Select * FROM `user_banns` WHERE `gid` = '{$account}'"; |
|---|
| 3482 | $acc_banns_query = $this->query ( $acc_banns_sql, $this->forum_db ); |
|---|
| 3483 | $acc_banns_rows = $this->num_rows ( $acc_banns_query ); |
|---|
| 3484 | |
|---|
| 3485 | if ( $do == 'count_banns' ) $this->do_exit ( $acc_banns_rows ); |
|---|
| 3486 | |
|---|
| 3487 | $bann_holder = ''; |
|---|
| 3488 | $bann_count = 0; |
|---|
| 3489 | |
|---|
| 3490 | while ( $ban_data = $this->fetch_row ( $acc_banns_query ) ) { |
|---|
| 3491 | $start = date ( "d.m.Y H:m", $ban_data [2] ); |
|---|
| 3492 | $end = date ( "d.m.Y H:m", $ban_data [3] ); |
|---|
| 3493 | |
|---|
| 3494 | switch ( $ban_data [4] ) |
|---|
| 3495 | { |
|---|
| 3496 | case 'all': |
|---|
| 3497 | $bannlevel = "Alles"; |
|---|
| 3498 | break; |
|---|
| 3499 | case 'forum': |
|---|
| 3500 | $bannlevel = "Forum"; |
|---|
| 3501 | break; |
|---|
| 3502 | case 'game': |
|---|
| 3503 | $bannlevel = "Spiel"; |
|---|
| 3504 | break; |
|---|
| 3505 | } |
|---|
| 3506 | |
|---|
| 3507 | if ( $ban_data [3] > time ( ) ) $active = "<img src=\"/images/lol_forum_banned.png\" onmouseover=\"Tip('Bann Aktiv!<br>Bannlevel: {$bannlevel}')\" onmouseout=\"UnTip()\" />"; |
|---|
| 3508 | else $active = "<img src=\"/images/lol_forum_unbanned.png\" onmouseover=\"Tip('Bann Abgelaufen<br>Bannlevel: {$bannlevel}')\" onmouseout=\"UnTip()\" />"; |
|---|
| 3509 | if ( $bann_count % 2 ) $style = "style=\"background-image: url('/images/gallery/9f9f9f.png')\""; |
|---|
| 3510 | else $style = "style=\"background-image: url('/images/gallery/c6c6c6.png')\""; |
|---|
| 3511 | |
|---|
| 3512 | $bann_message = $this->replace_da_shit ( $ban_data [6], array ( '"', "'" ), '' ); |
|---|
| 3513 | $bann_message = $this->replace_url ( $bann_message ); |
|---|
| 3514 | |
|---|
| 3515 | $del_link = $this->check_access_rights ( array ( 5, 11, 7 ) ) ? "<td><a href=\"javascript:void(0);\" onmouseover=\"Tip('Bann Löschen<br>Achtung: Nur InGame, keine IP-Banns!')\" onmouseout=\"UnTip()\" onclick=\"get_content('banns','portal.php?mod=lol_control&modus=accman&action=2&do=del&s={$ban_data[2]}&e={$ban_data[3]}&acc={$account}','get');get_content('count_banns','portal.php?mod=lol_control&modus=accman&action=2&do=count_banns&acc={$account}','get');\">X</a></td>" : '<td></td>'; |
|---|
| 3516 | $bann_holder .= "<tr {$style}><td>{$start}</td><td>{$end}</td><td>{$ban_data[5]}</td><td align=\"center\">{$active}</td><td style=\"width:150px\">{$bann_message}</td>{$del_link}</tr>"; |
|---|
| 3517 | |
|---|
| 3518 | $bann_count ++; |
|---|
| 3519 | } |
|---|
| 3520 | |
|---|
| 3521 | if ( empty ( $bann_holder ) ) $bann_holder = "<tr><td colspan=\"5\" align=\"center\">Keine Banns Vorhanden</td></tr>"; |
|---|
| 3522 | |
|---|
| 3523 | $code = " |
|---|
| 3524 | <table cellspacing=\"0\" width=\"100%\"> |
|---|
| 3525 | <tr><td align=\"center\">Start</td><td align=\"center\">Ende</td><td align=\"center\">Von</td><td align=\"center\">Aktiv?</td><td align=\"center\">Grund</td><td></td></tr> |
|---|
| 3526 | {$bann_holder} |
|---|
| 3527 | </table>"; |
|---|
| 3528 | |
|---|
| 3529 | $this->do_exit ( $code ); |
|---|
| 3530 | } |
|---|
| 3531 | |
|---|
| 3532 | private function inactive_trinity ( $data, $start ) |
|---|
| 3533 | { |
|---|
| 3534 | global $user, $code; |
|---|
| 3535 | |
|---|
| 3536 | if ( ! $this->check_access_rights ( array ( 5, 11 ) ) ) return "Na na na, wer versucht denn da ohne Rechte hier rein zu kommen?"; |
|---|
| 3537 | |
|---|
| 3538 | $s = isset ( $_GET ['s'] ) ? $_GET ['s'] : false; |
|---|
| 3539 | $c = isset ( $_GET ['c'] ) ? $_GET ['c'] : false; |
|---|
| 3540 | $pwc = $this->check_post_data ( $data, 'pwc', false, '' ); |
|---|
| 3541 | $del = $this->check_post_data ( $data, 'del', false, '' ); |
|---|
| 3542 | $all = isset ( $_GET ['all'] ) ? $_GET ['all'] : false; |
|---|
| 3543 | $delete = $this->check_post_data ( $data, 'delete', false, '' ); |
|---|
| 3544 | $dir = ( isset ( $_GET ['dir'] ) ) ? $_GET ['dir'] : 1; |
|---|
| 3545 | $dir = ( $dir ) ? 0 : 1; |
|---|
| 3546 | |
|---|
| 3547 | if ( $s ) { |
|---|
| 3548 | if ( $this->realm_online [0] || $this->realm_online [1] ) return $code . "<br>Leider ist das Löschen deaktiviert, solange der Game-Server online ist!"; |
|---|
| 3549 | if ( $c ) { |
|---|
| 3550 | if ( empty ( $pwc ) || empty ( $del ) ) return $code . "Leider ist die liste der zu löschenden Benutzer leer oder du hast kein Passwort eingegeben!<br><a href=\"portal.php?mod=lol_control\"><input type=\"button\" value=\"Zurück zur Übersicht\" /></a>"; |
|---|
| 3551 | |
|---|
| 3552 | $code = ""; |
|---|
| 3553 | $username = strtolower ( $user->data ['username'] ); |
|---|
| 3554 | $sha = $this->sha_password ( $username, $pwc ); |
|---|
| 3555 | $get_sha = "SELECT `sha_pass_hash` FROM `{$this->lol_conf ['db_live_accounts']}`.`account` WHERE `username` = '{$user->data['username_clean']}'"; |
|---|
| 3556 | $get_sha = $this->query ( $get_sha, $this->root_db ); |
|---|
| 3557 | if ( ! $get_sha ) return $code . "Leider existiert der benutzer in der Realmlist nicht!<br><a href=\"portal.php?mod=lol_control\"><input type=\"button\" value=\"Zurück zur Übersicht\" /></a>"; |
|---|
| 3558 | |
|---|
| 3559 | $get_sha = $this->fetch_row ( $get_sha ); |
|---|
| 3560 | |
|---|
| 3561 | if ( $get_sha [0] != $sha ) return $code . "Leider stimmten die Passwörter nicht überein!<br><a href=\"portal.php?mod=lol_control\"><input type=\"button\" value=\"Zurück zur Übersicht\" /></a>"; |
|---|
| 3562 | |
|---|
| 3563 | $del = explode ( '**', $del ); |
|---|
| 3564 | |
|---|
| 3565 | $accounts_del_count = count ( $del ); |
|---|
| 3566 | |
|---|
| 3567 | @ob_implicit_flush ( true ); |
|---|
| 3568 | @ob_end_flush ( ); |
|---|
| 3569 | |
|---|
| 3570 | print "<body style=\"background-color:transparent\"><center>"; |
|---|
| 3571 | |
|---|
| 3572 | for ( $adc = 0; $adc <= $accounts_del_count; $adc += 20 ) |
|---|
| 3573 | |
|---|
| 3574 | { |
|---|
| 3575 | $num_count = 1; |
|---|
| 3576 | $finished_acc_keys = array (); |
|---|
| 3577 | |
|---|
| 3578 | foreach ( $del as $key => $d ) { |
|---|
| 3579 | |
|---|
| 3580 | $values = explode ( '||', $d ); |
|---|
| 3581 | |
|---|
| 3582 | if ( empty ( $values ) ) break; |
|---|
| 3583 | |
|---|
| 3584 | if ( strtolower ( $values [1] ) !== 'Systemnachricht' ) { |
|---|
| 3585 | $wotlk_del = $tvanilla_del = false; |
|---|
| 3586 | |
|---|
| 3587 | if ( in_array ( $values [3], array ( 'wotlk', 'complete' ) ) ) { |
|---|
| 3588 | $wotlk_del = $this->game_account_delete ( $values [1] ); |
|---|
| 3589 | if ( ! $wotlk_del ) $code .= "Wotlk: Fehler beim löschen von Account: {$values[1]}<br>"; |
|---|
| 3590 | } |
|---|
| 3591 | |
|---|
| 3592 | if ( in_array ( $values [3], array ( 'vanilla', 'complete' ) ) ) { |
|---|
| 3593 | $tvanilla_del = $this->game_account_delete ( $values [1], 'vanilla' ); |
|---|
| 3594 | if ( ! $vanilla_del ) $code .= "Vanilla: Fehler beim löschen von Account: {$values[1]}<br>"; |
|---|
| 3595 | } |
|---|
| 3596 | |
|---|
| 3597 | if ( in_array ( $values [3], array ( 'forum', 'complete' ) ) ) { |
|---|
| 3598 | require_once 'functions_user.php'; |
|---|
| 3599 | if ( ! empty ( $values [0] ) ) $forum_del = user_delete ( 'remove', $values [0] ); |
|---|
| 3600 | } |
|---|
| 3601 | |
|---|
| 3602 | $point_count = 1; |
|---|
| 3603 | |
|---|
| 3604 | if ( $wotlk_del || $tvanilla_del ) { |
|---|
| 3605 | if ( $num_count <= 20 ) { |
|---|
| 3606 | $finished_acc_keys [ ] = $key; |
|---|
| 3607 | $num_count ++; |
|---|
| 3608 | } |
|---|
| 3609 | else { |
|---|
| 3610 | foreach ( $finished_acc_keys as $key_del ) |
|---|
| 3611 | unset ( $del [$key_del] ); |
|---|
| 3612 | |
|---|
| 3613 | print ".|"; |
|---|
| 3614 | if($point_count == 25) |
|---|
| 3615 | { |
|---|
| 3616 | $point_count = 1; |
|---|
| 3617 | print "<br>"; |
|---|
| 3618 | } |
|---|
| 3619 | $point_count++; |
|---|
| 3620 | //sleep ( 1 ); |
|---|
| 3621 | break; |
|---|
| 3622 | } |
|---|
| 3623 | } |
|---|
| 3624 | } |
|---|
| 3625 | else { |
|---|
| 3626 | $finished_acc_keys [ ] = $key; |
|---|
| 3627 | $code .= "<br>Der Account Systemnachricht kann nicht gelöscht werden!<br>"; |
|---|
| 3628 | } |
|---|
| 3629 | } |
|---|
| 3630 | } |
|---|
| 3631 | |
|---|
| 3632 | $code .= "<br>Alles hat geklappt!<br>"; |
|---|
| 3633 | |
|---|
| 3634 | $code .= "<br><a href=\"portal.php?mod=lol_control&modus=inactivet&start={$start}&all=true\"><input type=\"button\" value=\"Zurück zur letzten Seite\" /></a></center>"; |
|---|
| 3635 | |
|---|
| 3636 | $this->do_exit ( $code ); |
|---|
| 3637 | } |
|---|
| 3638 | |
|---|
| 3639 | foreach ( $delete as $dd ) |
|---|
| 3640 | if ( strlen ( $dd ) > 0 ) $t_delete .= $dd . "**"; |
|---|
| 3641 | |
|---|
| 3642 | $t_delete = trim ( $t_delete ); |
|---|
| 3643 | $code = "<center><form action=\"portal.php?mod=lol_control&modus=inactivet&s=true&c=true&start={$start}\" method=\"POST\" target=\"del_content\" name=\"form\"><table><tr><td colspan=\"2\">Willst du die Benutzer Wirklich Löschen?</td></tr><tr><td>Bitte Passwort Eingeben:</td><td><input type=\"password\" name=\"pwc\" /></td></tr><tr><td colspan=\"2\" align=\"center\"><input type=\"submit\" value=\"JA\" /> <a href=\"portal.php?mod=lol_control\"><input type=\"button\" value=\"NEIN\" /></a><input type=\"hidden\" name =\"del\" value=\"{$t_delete}\" /></td></table><br><br><iframe name=\"del_content\" width=\"400\" height=\"300\" allowtransparency=\"true\" frameborder=\"no\" style=\"width: 100%; overflow: auto;\"></iframe></center>"; |
|---|
| 3644 | |
|---|
| 3645 | return $code; |
|---|
| 3646 | } |
|---|
| 3647 | |
|---|
| 3648 | $vip_list = array (); |
|---|
| 3649 | |
|---|
| 3650 | $get_vips = "SELECT `account` FROM `donation_acc`"; |
|---|
| 3651 | $got_vips = $this->query ( $get_vips, $this->forum_db ); |
|---|
| 3652 | |
|---|
| 3653 | while ( $vip = $this->fetch_row ( $got_vips ) ) |
|---|
| 3654 | $vip_list [ ] = $vip [0]; |
|---|
| 3655 | |
|---|
| 3656 | $users = ''; |
|---|
| 3657 | $user_count = 0; |
|---|
| 3658 | |
|---|
| 3659 | if ( ! $all ) $limit = " LIMIT {$start}, 100"; |
|---|
| 3660 | else $limit = ""; |
|---|
| 3661 | |
|---|
| 3662 | $date_gen = date ( "Y-m-d H:i:s", strtotime ( "-3 months", time ( ) ) ); |
|---|
| 3663 | //if ( isset ( $_GET ['d'] ) && $_GET ['d'] == 1 ) print $date_gen . "<br>"; |
|---|
| 3664 | |
|---|
| 3665 | // Get Wotlk Account Informations |
|---|
| 3666 | $account_get_wotlk = $this->query ( "SELECT `username` as accname,`joindate`,`last_login`,`id` as ide, (SELECT `gmlevel` FROM `{$this->lol_conf ['db_live_accounts']}`.`account_access` WHERE `id` = `ide`), (SELECT COUNT(`name`) FROM `{$this->lol_conf ['db_live_accounts']}`.`account_holiday` WHERE `name` = `accname`),(SELECT `unbandate` FROM `{$this->lol_conf ['db_live_accounts']}`.`account_banned` WHERE `id`= `ide` ORDER BY `id` DESC LIMIT 1) AS banned, (SELECT COUNT(`name`) FROM `{$this->lol_conf ['db_pve_live_characters']}`.`characters` WHERE `account` = `ide`) FROM `{$this->lol_conf ['db_live_accounts']}`.`account` WHERE `last_login` < '{$date_gen}' ORDER BY `last_login`{$limit}", $this->root_db ); |
|---|
| 3667 | if ( ! $account_get_wotlk ) return $code . "Leider gab es einen Fehler beim Abfragen der Benutzer! - WOTLK<br><a href=\"portal.php?mod=lol_control\"><input type=\"button\" value=\"Zurück zur Übersicht\" /></a>"; |
|---|
| 3668 | |
|---|
| 3669 | while ( $usr_w = $this->fetch_row ( $account_get_wotlk ) ) { |
|---|
| 3670 | /*if ($this->check_access_rights ( array ( 24, 16, 15, 14, 7, 20, 28, 10, 26, 11, 9, 17, 18, 5, 6, 4 ), $usr_w [0] )) |
|---|
| 3671 | print $usr_w[0]." >> TRUE<br>"; |
|---|
| 3672 | else { |
|---|
| 3673 | print $this->check_access_rights ( array ( 24, 16, 15, 14, 7, 20, 28, 10, 26, 11, 9, 17, 18, 5, 6, 4 ), $usr_w [0] ); |
|---|
| 3674 | print $usr_w[0]." >> FALSE<br>"; |
|---|
| 3675 | }*/ |
|---|
| 3676 | if ( ! $this->check_access_rights ( array ( 24, 16, 15, 14, 7, 20, 28, 10, 26, 11, 9, 17, 18, 5, 6, 4 ), $usr_w [0] ) ) $users [$usr_w [0]] [0] = array ( $usr_w [0], $usr_w [1], $usr_w [2], $usr_w [4], $usr_w [5], $usr_w [6], $usr_w [7] ); |
|---|
| 3677 | //else print $usr_w [0] . "<br>"; |
|---|
| 3678 | } |
|---|
| 3679 | |
|---|
| 3680 | // Get Vanilla Account Informations |
|---|
| 3681 | $account_get_vanilla = $this->query ( "SELECT `username` as accname,`joindate`,`last_login`,`id` as ide, `gmlevel`, (SELECT `unbandate` FROM `{$this->lol_conf ['db_live_vanilla_accounts']}`.`account_banned` WHERE `id`= `ide` ORDER BY `id` DESC LIMIT 1) AS banned, (SELECT COUNT(`name`) FROM `{$this->lol_conf ['db_vanilla_live_characters']}`.`characters` WHERE `account` = `ide`) FROM `{$this->lol_conf ['db_live_vanilla_accounts']}`.`account`", $this->root_db ); |
|---|
| 3682 | if ( ! $account_get_vanilla ) return $code . "Leider gab es einen Fehler beim Abfragen der Benutzer! - Vanilla<br><a href=\"portal.php?mod=lol_control\"><input type=\"button\" value=\"Zurück zur Übersicht\" /></a>"; |
|---|
| 3683 | |
|---|
| 3684 | while ( $usr_v = $this->fetch_row ( $account_get_vanilla ) ) { |
|---|
| 3685 | if ( ! empty ( $users [$usr_v [0]] [0] [0] ) && ! $this->check_access_rights ( array ( 24, 16, 15, 14, 7, 20, 28, 10, 26, 11, 9, 17, 18, 5, 6, 4 ), $usr_v [0] ) ) $users [$usr_v [0]] [1] = array ( $usr_v [1], $usr_v [2], $usr_v [4], $usr_v [5], $usr_v [6] ); |
|---|
| 3686 | //else print $usr_v [0] . "<br>"; |
|---|
| 3687 | } |
|---|
| 3688 | |
|---|
| 3689 | $user_count = $this->num_rows ( $this->query ( "SELECT `id` FROM `{$this->lol_conf ['db_live_accounts']}`.`account` WHERE `last_login` < '{$date_gen}'", $this->root_db ) ); |
|---|
| 3690 | |
|---|
| 3691 | if ( ! $all ) $code .= $this->generate_paginationn ( "portal.php?mod=lol_control&modus=inactivet&dir={$dir}" . ! $dir, $user_count, 100, $start ) . " <form action=\"portal.php?mod=lol_control&modus=inactivet\" method=\"POST\" name=\"form1\"><input type=\"text\" name=\"site\" size=\"2\" autocomplete=\"off\" /> <input type=\"submit\" name=\"submit\" value=\"Los!\" /></form>"; |
|---|
| 3692 | $code .= "<center><form action=\"portal.php?mod=lol_control&modus=inactivet&s=true&start={$start}\" method=\"POST\" name=\"form\"><table>"; |
|---|
| 3693 | $code .= "<tr><td align=\"center\" colspan=\"2\"><b>Acc</b></td><td align=\"center\"><b>Reg. Datum</b></td><td align=\"center\"><b>U-Mod</b></td><td align=\"center\" colspan=\"2\"><b>Letzter Login</b></td><td align=\"center\"><b>Löschen</b></td></tr>"; |
|---|
| 3694 | |
|---|
| 3695 | $account_count = 0; |
|---|
| 3696 | |
|---|
| 3697 | foreach ( $users as $cur_user ) { |
|---|
| 3698 | /* |
|---|
| 3699 | * if (!empty($cur_user[1][0])) { print_r($cur_user); break; } |
|---|
| 3700 | */ |
|---|
| 3701 | |
|---|
| 3702 | if ( empty ( $cur_user [0] [0] ) ) continue; |
|---|
| 3703 | $name_clean = strtolower ( $cur_user [0] [0] ); |
|---|
| 3704 | $get_group_sql = "SELECT `group_id` FROM `phpbb_users` WHERE `username_clean` = '{$name_clean}'"; |
|---|
| 3705 | $get_group = $this->fetch_row ( $this->query ( $get_group_sql, $this->forum_db ) ); |
|---|
| 3706 | $cur_user [0] [3] = ( $cur_user [0] [3] && ! empty ( $cur_user [0] [3] ) ) ? $cur_user [0] [3] : 0; |
|---|
| 3707 | $login_unix_time_wotlk = ( $cur_user [0] [2] != '0000-00-00 00:00:00' ) ? strtotime ( $cur_user [0] [2] ) : $cur_user [0] [2]; |
|---|
| 3708 | $login_unix_time_vanilla = ( $cur_user [1] [1] != '0000-00-00 00:00:00' ) ? strtotime ( $cur_user [1] [1] ) : $cur_user [1] [1]; |
|---|
| 3709 | |
|---|
| 3710 | $has_umod = false; |
|---|
| 3711 | $l_wotlkl = $login_unix_time_wotlk; |
|---|
| 3712 | $l_vanillal = $login_unix_time_vanilla; |
|---|
| 3713 | $u_mod = "NEIN"; |
|---|
| 3714 | |
|---|
| 3715 | if ( $cur_user [0] [3] == 0 && ! in_array ( $get_group [0] [0], array ( 15, 7, 10, 11, 9, 5, 24, 17, 21 ) ) ) { |
|---|
| 3716 | |
|---|
| 3717 | // Banncheck oder niemals eingeloggt Wotlk |
|---|
| 3718 | if ( $cur_user [0] [5] > time ( ) ) $l_wotlkl = 'Gebannt'; |
|---|
| 3719 | else $l_wotlkl = ( $cur_user [0] [2] == '0000-00-00 00:00:00' ) ? 'Niemals' : ( ( $login_unix_time_wotlk ) ? $login_unix_time_wotlk : '-' ); |
|---|
| 3720 | |
|---|
| 3721 | // Banncheck oder niemals eingeloggt Vanilla |
|---|
| 3722 | if ( $cur_user [1] [1] > time ( ) ) $l_vanillal = 'Gebannt'; |
|---|
| 3723 | else $l_vanillal = ( $cur_user [1] [1] == '0000-00-00 00:00:00' ) ? 'Niemals' : ( ( $login_unix_time_vanilla ) ? $login_unix_time_vanilla : '-' ); |
|---|
| 3724 | |
|---|
| 3725 | if ( $cur_user [0] [4] == 1 ) { |
|---|
| 3726 | $u_mod = "<font color=\"green\">JA</font>"; |
|---|
| 3727 | $has_umod = true; |
|---|
| 3728 | } |
|---|
| 3729 | |
|---|
| 3730 | $acc_chars = "( <font color=\"red\">0 Chars</font> ) Wotlk<br>( <font color=\"red\">0 Chars</font> ) Vanilla"; |
|---|
| 3731 | // Charaktercount Wotlk |
|---|
| 3732 | if ( $cur_user [0] [6] > 0 ) $acc_chars = "( {$cur_user [0][6]} Chars ) Wotlk"; |
|---|
| 3733 | else $acc_chars = "( <font color=\"red\">0 Chars</font> ) Wotlk"; |
|---|
| 3734 | // Charactercount Vanilla |
|---|
| 3735 | if ( $cur_user [1] [4] > 0 ) $acc_chars .= "<br>( {$cur_user [1][4]} Chars ) Vanilla"; |
|---|
| 3736 | else $acc_chars .= "<br>( <font color=\"red\">0 Chars</font> ) Vanilla"; |
|---|
| 3737 | |
|---|
| 3738 | $times = array (); |
|---|
| 3739 | |
|---|
| 3740 | if ( in_array ( $name_clean, $vip_list ) ) { |
|---|
| 3741 | $get_vip_lts_sql = "SELECT `id` FROM `lol_points_VLTS` WHERE `id` = (SELECT `id` FROM `lol_points` WHERE `name` = '{$cur_user [0][0]}')"; |
|---|
| 3742 | $get_vip_lts_query = $this->query ( $get_vip_lts_sql, $this->forum_db ); |
|---|
| 3743 | $get_vip_lts = $this->num_rows ( $get_vip_lts_query ); |
|---|
| 3744 | $is_vip = true; |
|---|
| 3745 | |
|---|
| 3746 | if ( $get_vip_lts == 1 ) { |
|---|
| 3747 | array_push ( $times, '12' ); |
|---|
| 3748 | $vip_lts = true; |
|---|
| 3749 | } |
|---|
| 3750 | else |
|---|
| 3751 | $vip_lts = false; |
|---|
| 3752 | |
|---|
| 3753 | array_push ( $times, '12' ); |
|---|
| 3754 | if ( $has_umod ) array_push ( $times, '12' ); |
|---|
| 3755 | else array_push ( $times, '3' ); |
|---|
| 3756 | |
|---|
| 3757 | $vip_color_name = "<font color=\"#FF6600\">{$cur_user [0][0]}</font>"; |
|---|
| 3758 | } |
|---|
| 3759 | else { |
|---|
| 3760 | $is_vip = false; |
|---|
| 3761 | $vip_lts = false; |
|---|
| 3762 | if ( $has_umod ) array_push ( $times, '12' ); |
|---|
| 3763 | else array_push ( $times, '3' ); |
|---|
| 3764 | $vip_color_name = $cur_user [0] [0]; |
|---|
| 3765 | } |
|---|
| 3766 | |
|---|
| 3767 | $months = 0; |
|---|
| 3768 | |
|---|
| 3769 | foreach ( $times as $c_time ) |
|---|
| 3770 | $months = $months + $c_time; |
|---|
| 3771 | |
|---|
| 3772 | $t_months = $months; |
|---|
| 3773 | |
|---|
| 3774 | $months = "-{$months} months"; |
|---|
| 3775 | $selected = ''; |
|---|
| 3776 | // print $l_wotlkl."<br>"; |
|---|
| 3777 | |
|---|
| 3778 | |
|---|
| 3779 | // Fallback if time is different |
|---|
| 3780 | // print $login_unix_time_wotlk . " >>> " . |
|---|
| 3781 | // $login_unix_time_vanilla ."<br>" . time ( )."<br>"; |
|---|
| 3782 | if ( $login_unix_time_wotlk > time ( ) || $login_unix_time_vanilla > time ( ) ) continue; |
|---|
| 3783 | |
|---|
| 3784 | // Timecalculation for the deletes |
|---|
| 3785 | $a = $b = $c = $d = $e = false; |
|---|
| 3786 | |
|---|
| 3787 | if ( $l_wotlkl < strtotime ( $months, time ( ) ) ) $a = true; |
|---|
| 3788 | |
|---|
| 3789 | if ( $l_vanillal < strtotime ( $months, time ( ) ) ) $b = true; |
|---|
| 3790 | |
|---|
| 3791 | if ( $l_wotlkl != 'Gebannt' && $l_vanillal != 'Gebannt' ) $c = true; |
|---|
| 3792 | |
|---|
| 3793 | if ( $l_wotlkl == 'Niemals' ) $d = true; |
|---|
| 3794 | |
|---|
| 3795 | if ( $l_vanillal == 'Niemals' ) $e = true; |
|---|
| 3796 | |
|---|
| 3797 | // if ( ( $a && $e && $c ) || ( $b && $d && $c ) || ( $a && $b |
|---|
| 3798 | // && $c ) || ( $d && $e ) ) $selected = " selected"; |
|---|
| 3799 | if ( ( ( $a && $b ) || ( $a && $e ) || ( $b && $d ) || ( $d && $e ) ) && $c ) $selected = " selected"; |
|---|
| 3800 | |
|---|
| 3801 | $f_user = $this->get_forum_id ( $name_clean ); |
|---|
| 3802 | |
|---|
| 3803 | $tip = ""; |
|---|
| 3804 | if ( $is_vip ) $tip = "VIP: JA"; |
|---|
| 3805 | else $tip = "VIP: NEIN"; |
|---|
| 3806 | |
|---|
| 3807 | if ( $vip_lts ) $tip = "LTS: JA"; |
|---|
| 3808 | else $tip = "LTS: NEIN"; |
|---|
| 3809 | |
|---|
| 3810 | if ( $has_umod ) $tip .= "<br>U-MOD: JA"; |
|---|
| 3811 | else $tip .= "<br>U-MOD: NEIN"; |
|---|
| 3812 | |
|---|
| 3813 | $info = ""; |
|---|
| 3814 | if ( ! $is_vip && $cur_user [0] [3] == 0 && $l_wotlkl == "Kein Account" ) $info = 'Kein Account'; |
|---|
| 3815 | else $info = ( ! empty ( $selected ) ) ? $info = "{$t_months} Monate abgelaufen" : $info = ''; |
|---|
| 3816 | |
|---|
| 3817 | $tip .= "<br>INFO: {$info}"; |
|---|
| 3818 | |
|---|
| 3819 | $date_wotlk = is_string ( $l_wotlkl ) ? $l_wotlkl : date ( "Y-m-d H:i:s", $l_wotlkl ); |
|---|
| 3820 | |
|---|
| 3821 | $date_vanilla = is_string ( $l_vanillal ) ? $l_vanillal : date ( "Y-m-d H:i:s", $l_vanillal ); |
|---|
| 3822 | |
|---|
| 3823 | $date = isset ( $date_wotlk ) ? $date_wotlk : $date_vanilla; |
|---|
| 3824 | |
|---|
| 3825 | $t_code = "<tr><td>{$vip_color_name}</td><td align=\"left\">{$acc_chars}</td><td align=\"right\">W: {$cur_user [0][1]}<br>V: {$cur_user [1][0]}</td><td align=\"center\">{$u_mod}</td><td>W:<br>V:</td><td align=\"right\">{$date_wotlk}<br>{$date_vanilla}</td><td align=\"center\"><select name=\"delete[]\" onmouseover=\"Tip('{$tip}')\" onmouseout=\"UnTip()\"> |
|---|
| 3826 | <option value=\"\">Bitte Wählen...</option> |
|---|
| 3827 | <option value=\"{$f_user}||{$name_clean}||{$date}||wotlk\">Wotlk</option> |
|---|
| 3828 | <option value=\"{$f_user}||{$name_clean}||{$date}||vanilla\">Vanilla</option> |
|---|
| 3829 | <option value=\"{$f_user}||{$name_clean}||{$date}||forum\">Forum</option> |
|---|
| 3830 | <option value=\"{$f_user}||{$name_clean}||{$date}||complete\"{$selected}>Komplett(1+2+3)</option> |
|---|
| 3831 | </select></td></tr>"; |
|---|
| 3832 | |
|---|
| 3833 | if ( $all && ! empty ( $selected ) ) { |
|---|
| 3834 | if ( $l_wotlkl == 'Niemals' && strtotime ( $cur_user [0] [1] ) > strtotime ( "-10 days", time ( ) ) ) {} |
|---|
| 3835 | else { |
|---|
| 3836 | if ( $account_count > 299 ) break; |
|---|
| 3837 | $code .= $t_code; |
|---|
| 3838 | $account_count ++; |
|---|
| 3839 | } |
|---|
| 3840 | |
|---|
| 3841 | } |
|---|
| 3842 | else if ( ! $all ) { |
|---|
| 3843 | $code .= $t_code; |
|---|
| 3844 | $account_count ++; |
|---|
| 3845 | } |
|---|
| 3846 | } |
|---|
| 3847 | } |
|---|
| 3848 | |
|---|
| 3849 | $code .= "<tr><td colspan=\"7\" align=\"center\"><input type=\"submit\" name=\"submit\" value=\"Ausgewählte Löschen\" /> <a href=\"portal.php?mod=lol_control&modus=inactivet&all=true\">Alle Anzeigen</a> <a href=\"portal.php?mod=lol_control&modus=inactivet\">Normal Ansicht</a> Anzahl: {$account_count}" . ( $all ? " (Limit 2000)" : "" ) . "</td></tr></table></form></center>"; |
|---|
| 3850 | if ( ! $all ) $code .= $this->generate_paginationn ( "portal.php?mod=lol_control&modus=inactivet&dir={$dir}" . ! $dir, $user_count, 100, $start ); |
|---|
| 3851 | |
|---|
| 3852 | ini_restore ( 'memory_limit' ); |
|---|
| 3853 | ini_restore ( 'max_execution_time' ); |
|---|
| 3854 | |
|---|
| 3855 | return $code; |
|---|
| 3856 | } |
|---|
| 3857 | |
|---|
| 3858 | private function get_data ( $url ) |
|---|
| 3859 | { |
|---|
| 3860 | $ch = curl_init ( ); |
|---|
| 3861 | $timeout = 5; |
|---|
| 3862 | curl_setopt ( $ch, CURLOPT_URL, $url ); |
|---|
| 3863 | curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, 1 ); |
|---|
| 3864 | curl_setopt ( $ch, CURLOPT_CONNECTTIMEOUT, $timeout ); |
|---|
| 3865 | $data = curl_exec ( $ch ); |
|---|
| 3866 | curl_close ( $ch ); |
|---|
| 3867 | return $data; |
|---|
| 3868 | } |
|---|
| 3869 | |
|---|
| 3870 | private function get_item_icon ( $itemid ) |
|---|
| 3871 | { |
|---|
| 3872 | $item_icons = 'img/icons'; // and this is where it will save to and get |
|---|
| 3873 | // from. |
|---|
| 3874 | $proxy_cfg = array (); |
|---|
| 3875 | |
|---|
| 3876 | |
|---|
| 3877 | $result = $this->query ( "SELECT `displayid` FROM `{$this->lol_conf ['db_pve_live_world']}`.`item_template` WHERE `entry` = $itemid LIMIT 1", $this->forum_db ); |
|---|
| 3878 | |
|---|
| 3879 | if ( $result ) $displayid = $this->result ( $result ); |
|---|
| 3880 | else { |
|---|
| 3881 | $result = $this->query ( "SELECT `field_5` FROM `mmfpm`.`dbc_item` WHERE `id` = $itemid LIMIT 1", $this->forum_db ); |
|---|
| 3882 | if ( $result ) $displayid = $this->result ( $result ); |
|---|
| 3883 | else $displayid = 0; |
|---|
| 3884 | } |
|---|
| 3885 | |
|---|
| 3886 | if ( $displayid ) { |
|---|
| 3887 | $result = $this->query ( "SELECT `field_5` FROM `mmfpm`.`dbc_itemdisplayinfo` WHERE `id`=$displayid LIMIT 1", $this->forum_db ); |
|---|
| 3888 | |
|---|
| 3889 | if ( $result ) { |
|---|
| 3890 | $item_uppercase = $this->result ( $result ); |
|---|
| 3891 | $item = strtolower ( $item_uppercase ); |
|---|
| 3892 | // print $item."<br>"; |
|---|
| 3893 | if ( $item ) { |
|---|
| 3894 | if ( file_exists ( '' . $item_icons . '/' . $item . '.jpg' ) ) { |
|---|
| 3895 | if ( filesize ( '' . $item_icons . '/' . $item . '.jpg' ) > 349 ) {return '' . $item_icons . '/' . $item . '.jpg';} |
|---|
| 3896 | } |
|---|
| 3897 | else |
|---|
| 3898 | $item = ''; |
|---|
| 3899 | } |
|---|
| 3900 | else |
|---|
| 3901 | $item = ''; |
|---|
| 3902 | } |
|---|
| 3903 | else |
|---|
| 3904 | $item = ''; |
|---|
| 3905 | } |
|---|
| 3906 | else |
|---|
| 3907 | $item = ''; |
|---|
| 3908 | |
|---|
| 3909 | $get_icons_from_web = false; |
|---|
| 3910 | |
|---|
| 3911 | if ( $get_icons_from_web ) { |
|---|
| 3912 | $xmlfilepath = "http://www.wowhead.com/item="; |
|---|
| 3913 | $proxy = $proxy_cfg ['addr']; |
|---|
| 3914 | $port = $proxy_cfg ['port']; |
|---|
| 3915 | |
|---|
| 3916 | /* |
|---|
| 3917 | * if ( empty ( $proxy_cfg ['addr'] ) ) { $proxy = |
|---|
| 3918 | * "www.wowhead.com"; $xmlfilepath = "item="; $port = 80; } |
|---|
| 3919 | */ |
|---|
| 3920 | |
|---|
| 3921 | if ( $item == '' && $itemid != 200029 ) { |
|---|
| 3922 | // get the icon name |
|---|
| 3923 | // $fp = file_get_contents("{$xmlfilepath}{$itemid}"); |
|---|
| 3924 | // //@fsockopen ( $proxy, $port, $errno, $errstr, 0.5 ); |
|---|
| 3925 | /* |
|---|
| 3926 | * if ( ! $fp ) return "img/INV/INV_blank_32.gif"; $out = "GET |
|---|
| 3927 | * /{$xmlfilepath}{$itemid} HTTP/1.0\r\nHost: |
|---|
| 3928 | * www.wowhead.com\r\n"; if ( ! empty ( $proxy_cfg ['user'] ) ) |
|---|
| 3929 | * $out .= "Proxy-Authorization: Basic " . base64_encode ( |
|---|
| 3930 | * "{$proxy_cfg['user']}:{$proxy_cfg['pass']}" ) . "\r\n"; $out |
|---|
| 3931 | * .= "Connection: Close\r\n\r\n"; |
|---|
| 3932 | */ |
|---|
| 3933 | |
|---|
| 3934 | /*$temp = ""; |
|---|
| 3935 | fwrite ( $fp, $out ); |
|---|
| 3936 | while ( $fp && ! feof ( $fp ) ) |
|---|
| 3937 | $temp .= fgets ( $fp, 4096 ); |
|---|
| 3938 | fclose ( $fp ); |
|---|
| 3939 | print $temp."<br><br>";*/ |
|---|
| 3940 | print $this->get_data ( "{$xmlfilepath}{$itemid}" ) . "<br><br>"; |
|---|
| 3941 | $wowhead_string = file_get_contents ( "{$xmlfilepath}{$itemid}" ); |
|---|
| 3942 | // print $wowhead_string."<br><br>"; |
|---|
| 3943 | $temp_string1 = strstr ( $wowhead_string, "Icon.create(" ); |
|---|
| 3944 | $temp_string2 = substr ( $temp_string1, 12, 50 ); |
|---|
| 3945 | $temp_string3 = strtok ( $temp_string2, ',' ); |
|---|
| 3946 | $temp_string4 = substr ( $temp_string3, 1, strlen ( $temp_string3 ) - 2 ); |
|---|
| 3947 | $icon_name = $temp_string4; |
|---|
| 3948 | // print $icon_name.'<br>'; |
|---|
| 3949 | $item_uppercase = $icon_name; |
|---|
| 3950 | $item = strtolower ( $item_uppercase ); |
|---|
| 3951 | } |
|---|
| 3952 | |
|---|
| 3953 | if ( file_exists ( '' . $item_icons . '/' . $item . '.jpg' ) ) { |
|---|
| 3954 | if ( filesize ( '' . $item_icons . '/' . $item . '.jpg' ) > 349 ) { |
|---|
| 3955 | $this->query ( 'REPLACE INTO `mmfpm`.`dbc_itemdisplayinfo` (id, field_5) VALUES (\'' . $displayid . '\', \'' . $item . '\')', $this->forum_db ); |
|---|
| 3956 | return '' . $item_icons . '/' . $item . '.jpg'; |
|---|
| 3957 | } |
|---|
| 3958 | else { |
|---|
| 3959 | // $this->query ( 'DELETE FROM `mmfpm`.`dbc_itemdisplayinfo` |
|---|
| 3960 | // WHERE id = ' . $displayid . '', $this->forum_db ); |
|---|
| 3961 | if ( file_exists ( '' . $item_icons . '/' . $item . '.jpg' ) ) unlink ( '' . $item_icons . '/' . $item . '.jpg' ); |
|---|
| 3962 | } |
|---|
| 3963 | } |
|---|
| 3964 | |
|---|
| 3965 | // get the icon itself |
|---|
| 3966 | if ( empty ( $proxy_cfg ['addr'] ) ) { |
|---|
| 3967 | $proxy = "static.wowhead.com"; |
|---|
| 3968 | $port = 80; |
|---|
| 3969 | } |
|---|
| 3970 | $fp = @fsockopen ( $proxy, $port, $errno, $errstr, 0.5 ); |
|---|
| 3971 | if ( ! $fp ) return "img/INV/INV_blank_32.gif"; |
|---|
| 3972 | $iconfilename = strtolower ( $item ); |
|---|
| 3973 | $file = "http://static.wowhead.com/images/icons/medium/$iconfilename.jpg"; |
|---|
| 3974 | $out = "GET $file HTTP/1.0\r\nHost: static.wowhead.com\r\n"; |
|---|
| 3975 | if ( ! empty ( $proxy_cfg ['user'] ) ) $out .= "Proxy-Authorization: Basic " . base64_encode ( "{$proxy_cfg['user']}:{$proxy_cfg['pass']}" ) . "\r\n"; |
|---|
| 3976 | $out .= "Connection: Close\r\n\r\n"; |
|---|
| 3977 | fwrite ( $fp, $out ); |
|---|
| 3978 | |
|---|
| 3979 | // remove header |
|---|
| 3980 | while ( $fp && ! feof ( $fp ) ) { |
|---|
| 3981 | $headerbuffer = fgets ( $fp, 4096 ); |
|---|
| 3982 | if ( urlencode ( $headerbuffer ) == "%0D%0A" ) break; |
|---|
| 3983 | } |
|---|
| 3984 | |
|---|
| 3985 | if ( file_exists ( '' . $item_icons . '/' . $item . '.jpg' ) ) { |
|---|
| 3986 | if ( filesize ( '' . $item_icons . '/' . $item . '.jpg' ) > 349 ) { |
|---|
| 3987 | $this->query ( 'REPLACE INTO `mmfpm`.`dbc_itemdisplayinfo` (id, field_5) VALUES (\'' . $displayid . '\', \'' . $item . '\')', $this->forum_db ); |
|---|
| 3988 | return '' . $item_icons . '/' . $item . '.jpg'; |
|---|
| 3989 | } |
|---|
| 3990 | else { |
|---|
| 3991 | // $this->query ( 'DELETE FROM `mmfpm`.`dbc_itemdisplayinfo` |
|---|
| 3992 | // WHERE id = ' . $displayid . '', $this->forum_db ); |
|---|
| 3993 | if ( file_exists ( '' . $item_icons . '/' . $item . '.jpg' ) ) unlink ( '' . $item_icons . '/' . $item . '.jpg' ); |
|---|
| 3994 | } |
|---|
| 3995 | } |
|---|
| 3996 | |
|---|
| 3997 | $img_file = fopen ( "$item_icons/$item.jpg", 'wb' ); |
|---|
| 3998 | while ( ! feof ( $fp ) ) |
|---|
| 3999 | fwrite ( $img_file, fgets ( $fp, 4096 ) ); |
|---|
| 4000 | fclose ( $fp ); |
|---|
| 4001 | fclose ( $img_file ); |
|---|
| 4002 | // print $item_icons."/".$item.'jpg'; |
|---|
| 4003 | if ( file_exists ( '' . $item_icons . '/' . $item . '.jpg' ) ) { |
|---|
| 4004 | if ( filesize ( '' . $item_icons . '/' . $item . '.jpg' ) > 349 ) { |
|---|
| 4005 | $this->query ( 'REPLACE INTO `mmfpm`.`dbc_itemdisplayinfo` (id, field_5) VALUES (\'' . $displayid . '\', \'' . $item . '\')', $this->forum_db ); |
|---|
| 4006 | return '' . $item_icons . '/' . $item . '.jpg'; |
|---|
| 4007 | } |
|---|
| 4008 | else { |
|---|
| 4009 | // $this->query ( 'DELETE FROM `mmfpm`.`dbc_itemdisplayinfo` |
|---|
| 4010 | // WHERE id = ' . $displayid . '', $this->forum_db ); |
|---|
| 4011 | if ( file_exists ( '' . $item_icons . '/' . $item . '.jpg' ) ) unlink ( '' . $item_icons . '/' . $item . '.jpg' ); |
|---|
| 4012 | } |
|---|
| 4013 | } |
|---|
| 4014 | else |
|---|
| 4015 | return "img/INV/INV_blank_32.gif"; |
|---|
| 4016 | } |
|---|
| 4017 | else |
|---|
| 4018 | return "img/INV/INV_blank_32.gif"; |
|---|
| 4019 | } |
|---|
| 4020 | |
|---|
| 4021 | private function get_item_border ( $item_id ) |
|---|
| 4022 | { |
|---|
| 4023 | if ( $item_id ) { |
|---|
| 4024 | $result = $this->query ( "SELECT Quality FROM `{$this->lol_conf ['db_pve_live_world']}`.`item_template` WHERE entry ={$item_id}", $this->forum_db ); |
|---|
| 4025 | $iborder = ( 1 == $this->num_rows ( $result ) ) ? $this->result ( $result ) : 'Quality: ' . $iborder . ' Not Found'; |
|---|
| 4026 | |
|---|
| 4027 | return 'icon_border_' . $iborder . ''; |
|---|
| 4028 | } |
|---|
| 4029 | else |
|---|
| 4030 | return 'icon_border_0'; |
|---|
| 4031 | } |
|---|
| 4032 | |
|---|
| 4033 | private function char_get_avatar_img ( $level, $gender, $race, $class, $gm = 0 ) |
|---|
| 4034 | { |
|---|
| 4035 | if ( $gm > 0 ) { |
|---|
| 4036 | if ( file_exists ( 'img/avatars/bliz/' . $gm . '.gif' ) ) $avatar = 'img/avatars/bliz/' . $gm . '.gif'; |
|---|
| 4037 | else $avatar = 'img/avatars/bliz/bliz.gif'; |
|---|
| 4038 | } |
|---|
| 4039 | elseif ( $level < 60 ) { |
|---|
| 4040 | $avatar = 'img/avatars/np/' . $gender . '-' . $race . '-' . $class . '.gif'; |
|---|
| 4041 | } |
|---|
| 4042 | elseif ( $level < 70 ) { |
|---|
| 4043 | $avatar = 'img/avatars/60/' . $gender . '-' . $race . '-' . $class . '.gif'; |
|---|
| 4044 | } |
|---|
| 4045 | elseif ( $level < 80 ) { |
|---|
| 4046 | $avatar = 'img/avatars/70/' . $gender . '-' . $race . '-' . $class . '.gif'; |
|---|
| 4047 | } |
|---|
| 4048 | else |
|---|
| 4049 | $avatar = 'img/avatars/80/' . $gender . '-' . $race . '-' . $class . '.gif'; |
|---|
| 4050 | |
|---|
| 4051 | return $avatar; |
|---|
| 4052 | } |
|---|
| 4053 | |
|---|
| 4054 | private function spell_get_icon ( $auraid ) |
|---|
| 4055 | { |
|---|
| 4056 | $item_icons = 'img/icons'; // and this is where it will save to and get |
|---|
| 4057 | // from. |
|---|
| 4058 | $proxy_cfg = array (); |
|---|
| 4059 | |
|---|
| 4060 | if ( $auraid < 1 ) $auraid = 0; |
|---|
| 4061 | |
|---|
| 4062 | $result = $this->query ( "SELECT field_133 FROM `mmfpm`.`dbc_spell` WHERE id = {$auraid} LIMIT 1", $this->forum_db ); |
|---|
| 4063 | |
|---|
| 4064 | if ( $result ) $displayid = $this->result ( $result ); |
|---|
| 4065 | else $displayid = 0; |
|---|
| 4066 | |
|---|
| 4067 | if ( $displayid ) { |
|---|
| 4068 | $result = $this->query ( "SELECT field_1 FROM `mmfpm`.`dbc_spellicon` WHERE id = {$displayid} LIMIT 1", $this->forum_db ); |
|---|
| 4069 | |
|---|
| 4070 | if ( $result ) { |
|---|
| 4071 | $aura_uppercase = $this->result ( $result ); |
|---|
| 4072 | $aura = strtolower ( $aura_uppercase ); |
|---|
| 4073 | |
|---|
| 4074 | if ( $aura ) { |
|---|
| 4075 | if ( file_exists ( '' . $item_icons . '/' . $aura . '.jpg' ) ) { |
|---|
| 4076 | if ( filesize ( '' . $item_icons . '/' . $aura . '.jpg' ) > 349 ) return '' . $item_icons . '/' . $aura . '.jpg'; |
|---|
| 4077 | } |
|---|
| 4078 | else |
|---|
| 4079 | $aura = ''; |
|---|
| 4080 | } |
|---|
| 4081 | else |
|---|
| 4082 | $aura = ''; |
|---|
| 4083 | } |
|---|
| 4084 | else |
|---|
| 4085 | $aura = ''; |
|---|
| 4086 | } |
|---|
| 4087 | else |
|---|
| 4088 | $aura = ''; |
|---|
| 4089 | |
|---|
| 4090 | return 'img/INV/INV_blank_32.gif'; |
|---|
| 4091 | } |
|---|
| 4092 | |
|---|
| 4093 | private function char_get_level_color ( $lvl ) |
|---|
| 4094 | { |
|---|
| 4095 | if ( $lvl < 40 ) { |
|---|
| 4096 | if ( $lvl < 20 ) { |
|---|
| 4097 | if ( $lvl < 10 ) $level_color = '<font color="#FFFFFF">' . $lvl . '</font>'; |
|---|
| 4098 | else $level_color = '<font color="#858585">' . $lvl . '</font>'; |
|---|
| 4099 | } |
|---|
| 4100 | else { |
|---|
| 4101 | if ( $lvl < 30 ) $level_color = '<font color="#339900">' . $lvl . '</font>'; |
|---|
| 4102 | else $level_color = '<font color="#3300CC">' . $lvl . '</font>'; |
|---|
| 4103 | } |
|---|
| 4104 | } |
|---|
| 4105 | else { |
|---|
| 4106 | if ( $lvl < 60 ) { |
|---|
| 4107 | if ( $lvl < 50 ) $level_color = '<font color="#C552FF">' . $lvl . '</font>'; |
|---|
| 4108 | else $level_color = '<font color="#FF8000">' . $lvl . '</font>'; |
|---|
| 4109 | } |
|---|
| 4110 | else { |
|---|
| 4111 | if ( $lvl < 70 ) $level_color = '<font color="#FFF280">' . $lvl . '</font>'; |
|---|
| 4112 | else { |
|---|
| 4113 | if ( $lvl < 80 ) $level_color = '<font color="#FF0000">' . $lvl . '</font>'; |
|---|
| 4114 | else $level_color = '<font color="#000000">' . $lvl . '</font>'; |
|---|
| 4115 | } |
|---|
| 4116 | } |
|---|
| 4117 | } |
|---|
| 4118 | |
|---|
| 4119 | return $level_color; |
|---|
| 4120 | } |
|---|
| 4121 | |
|---|
| 4122 | private function get_map_name ( $id ) |
|---|
| 4123 | { |
|---|
| 4124 | $map_name = $this->fetch_assoc ( $this->query ( "SELECT name01 FROM `mmfpm`.`dbc_map` WHERE id={$id} LIMIT 1", $this->forum_db ) ); |
|---|
| 4125 | return $map_name ['name01']; |
|---|
| 4126 | } |
|---|
| 4127 | |
|---|
| 4128 | private function get_zone_name ( $id ) |
|---|
| 4129 | { |
|---|
| 4130 | $zone_name = $this->fetch_assoc ( $this->query ( "SELECT name01 FROM `mmfpm`.`dbc_areatable` WHERE id={$id} LIMIT 1", $this->forum_db ) ); |
|---|
| 4131 | return $zone_name ['name01']; |
|---|
| 4132 | } |
|---|
| 4133 | |
|---|
| 4134 | private function misc_get_country_by_ip ( $ip ) |
|---|
| 4135 | { |
|---|
| 4136 | $country = $this->fetch_assoc ( $this->query ( 'SELECT c.code, c.country FROM `mmfpm`.`ip2nationCountries` c, `mmfpm`.`ip2nation` i WHERE i.ip < INET_ATON("' . $ip . '") AND c.code = i.country ORDER BY i.ip DESC LIMIT 0,1;', $this->forum_db ) ); |
|---|
| 4137 | |
|---|
| 4138 | return $country; |
|---|
| 4139 | } |
|---|
| 4140 | |
|---|
| 4141 | private function misc_get_country_by_account ( $account ) |
|---|
| 4142 | { |
|---|
| 4143 | $ip = $this->fetch_assoc ( $this->query ( "SELECT last_ip FROM `{$this->lol_conf ['db_live_accounts']}`.`account` WHERE id={$account}", $this->root_db ) ); |
|---|
| 4144 | |
|---|
| 4145 | return $this->misc_get_country_by_ip ( $ip ['last_ip'] ); |
|---|
| 4146 | } |
|---|
| 4147 | |
|---|
| 4148 | private function skill_get_type ( $id ) |
|---|
| 4149 | { |
|---|
| 4150 | $skill_type = $this->fetch_assoc ( $this->query ( "SELECT field_1 FROM `mmfpm`.`dbc_skillline` WHERE id={$id} LIMIT 1", $this->forum_db ) ); |
|---|
| 4151 | return $skill_type ['field_1']; |
|---|
| 4152 | } |
|---|
| 4153 | |
|---|
| 4154 | private function skill_get_name ( $id ) |
|---|
| 4155 | { |
|---|
| 4156 | $skill_name = $this->fetch_assoc ( $this->query ( "SELECT field_3 FROM `mmfpm`.`dbc_skillline` WHERE id={$id} LIMIT 1", $this->forum_db ) ); |
|---|
| 4157 | return $skill_name ['field_3']; |
|---|
| 4158 | } |
|---|
| 4159 | |
|---|
| 4160 | private function get_char_name ( $id ) |
|---|
| 4161 | { |
|---|
| 4162 | |
|---|
| 4163 | if ( $id ) { |
|---|
| 4164 | $result = $this->query ( "SELECT `name` FROM `{$this->lol_conf ['db_pve_live_characters']}`.`characters` WHERE `guid` = {$id}", $this->root_db ); |
|---|
| 4165 | $player_name = $this->result ( $result ); |
|---|
| 4166 | |
|---|
| 4167 | return $player_name; |
|---|
| 4168 | } |
|---|
| 4169 | else |
|---|
| 4170 | return NULL; |
|---|
| 4171 | } |
|---|
| 4172 | |
|---|
| 4173 | private function aasort ( &$array, $field, $order = false ) |
|---|
| 4174 | { |
|---|
| 4175 | if ( is_string ( $field ) ) $field = "'$field'"; |
|---|
| 4176 | $order = ( $order ? '<' : '>' ); |
|---|
| 4177 | usort ( $array, create_function ( '$a, $b', 'return ($a[' . $field . '] == $b[' . $field . '] ? 0 :($a[' . $field . '] ' . $order . ' $b[' . $field . ']) ? 1 : -1);' ) ); |
|---|
| 4178 | } |
|---|
| 4179 | |
|---|
| 4180 | private function bitMask ( $mask = 0 ) |
|---|
| 4181 | { |
|---|
| 4182 | if ( ! is_numeric ( $mask ) ) return array (); |
|---|
| 4183 | |
|---|
| 4184 | $return = array (); |
|---|
| 4185 | while ( $mask > 0 ) { |
|---|
| 4186 | for ( $i = 0, $n = 0; $i <= $mask; $i = 1 * pow ( 2, $n ), $n ++ ) |
|---|
| 4187 | $end = $i; |
|---|
| 4188 | |
|---|
| 4189 | $return [ ] = $end; |
|---|
| 4190 | $mask = $mask - $end; |
|---|
| 4191 | } |
|---|
| 4192 | sort ( $return ); |
|---|
| 4193 | return $return; |
|---|
| 4194 | } |
|---|
| 4195 | |
|---|
| 4196 | private function get_check_state ( $id ) |
|---|
| 4197 | { |
|---|
| 4198 | $check_state = Array ( "0" => "Nicht gelesen", "1" => "Gelesen", "2" => "Zurück gekommen", "4" => "Co", "8" => "COD", "16" => "B" ); |
|---|
| 4199 | |
|---|
| 4200 | $result = ""; |
|---|
| 4201 | |
|---|
| 4202 | if ( $id == 0 ) return "Not Read"; |
|---|
| 4203 | |
|---|
| 4204 | foreach ( $this->bitMask ( $id ) as $k => $v ) |
|---|
| 4205 | $result .= $check_state [$v] . ", "; |
|---|
| 4206 | |
|---|
| 4207 | return $result; |
|---|
| 4208 | } |
|---|
| 4209 | |
|---|
| 4210 | private function get_mail_source ( $id ) |
|---|
| 4211 | { |
|---|
| 4212 | $mail_source = Array ( "0" => "Normal", "2" => "Auktion", "3" => "NPC", "4" => "Gameobjekt", "5" => "Gegenstand" ); |
|---|
| 4213 | return $mail_source [$id]; |
|---|
| 4214 | } |
|---|
| 4215 | |
|---|
| 4216 | private function fact_get_fact_id () |
|---|
| 4217 | { |
|---|
| 4218 | return Array ( // 0 1 2 3 4 5 6 7 8 9 10 11 |
|---|
| 4219 | // id => |
|---|
| 4220 | // array(name,team,n,reputationListID,BaseRepMask1,BaseRepMask2,BaseRepMask3,BaseRepMask4,BaseRepValue1,BaseRepValue2,BaseRepValue3,BaseRepValue4) |
|---|
| 4221 | |
|---|
| 4222 | |
|---|
| 4223 | 54 => array ( 'Gnomeregan Exiles', 'Alliance', 1, 18, 1037, 690, 64, 0, 3100, - 42000, 4000, 0 ), 72 => array ( 'Stormwind', 'Alliance', 1, 19, 1100, 690, 1, 0, 3100, - 42000, 4000, 0 ), 47 => array ( 'Ironforge', 'Alliance', 1, 20, 1097, 690, 4, 0, 3100, - 42000, 4000, 0 ), 69 => array ( 'Darnassus', 'Alliance', 1, 21, 1093, 690, 8, 0, 3100, - 42000, 4000, 0 ), 930 => array ( 'Exodar', 'Alliance', 1, 49, 77, 946, 1024, 0, 3000, - 42000, 4000, 0 ), |
|---|
| 4224 | |
|---|
| 4225 | 76 => array ( 'Orgrimmar', 'Horde', 2, 14, 160, 1101, 2, 528, 3100, - 42000, 4000, 500 ), 530 => array ( 'Darkspear Trolls', 'Horde', 2, 15, 34, 1101, 528, 128, 3100, - 42000, 500, 4000 ), 81 => array ( 'Thunder Bluff', 'Horde', 2, 16, 130, 1101, 528, 32, 3100, - 42000, 500, 4000 ), 68 => array ( 'Undercity', 'Horde', 2, 17, 162, 1101, 16, 512, 500, - 42000, 4000, 3100 ), 911 => array ( 'Silvermoon City', 'Horde', 2, 55, 162, 1101, 512, 16, 400, - 42000, 4000, 3100 ), |
|---|
| 4226 | |
|---|
| 4227 | 730 => array ( 'Stormpike Guard', 'Alliance Forces', 3, 40, 1101, 690, 0, 0, 0, - 42000, 0, 0 ), 890 => array ( 'Silverwing Sentinels', 'Alliance Forces', 3, 45, 1101, 690, 0, 0, 0, - 42000, 0, 0 ), 509 => array ( 'The League of Arathor', 'Alliance Forces', 3, 53, 1101, 690, 0, 0, 0, - 42000, 0, 0 ), |
|---|
| 4228 | |
|---|
| 4229 | 729 => array ( 'Frostwolf Clan', 'Horde Forces', 4, 41, 690, 1101, 0, 0, 0, - 42000, 0, 0 ), 889 => array ( 'Warsong Outriders', 'Horde Forces', 4, 46, 690, 1101, 0, 0, 0, - 42000, 0, 0 ), 510 => array ( 'The Defilers', 'Horde Forces', 4, 52, 690, 1101, 0, 0, 0, - 42000, 0, 0 ), |
|---|
| 4230 | |
|---|
| 4231 | 21 => array ( 'Booty Bay', 'Steamwheedle Cartel', 5, 1, 1791, 0, 0, 0, 500, 0, 0, 0 ), 369 => array ( 'Gadgetzan', 'Steamwheedle Cartel', 5, 7, 1791, 0, 0, 0, 500, 0, 0, 0 ), 470 => array ( 'Ratchet', 'Steamwheedle Cartel', 5, 9, 1791, 0, 0, 0, 500, 0, 0, 0 ), 577 => array ( 'Everlook', 'Steamwheedle Cartel', 5, 28, 1791, 0, 0, 0, 500, 0, 0, 0 ), |
|---|
| 4232 | |
|---|
| 4233 | 947 => array ( 'Thrallmar', 'The Burning Crusade', 6, 37, 690, 1101, 0, 0, 0, - 42000, 0, 0 ), 946 => array ( 'Honor Hold', 'The Burning Crusade', 6, 38, 1101, 690, 0, 0, 0, - 42000, 0, 0 ), 933 => array ( 'The Consortium', 'The Burning Crusade', 6, 60, 2047, 0, 0, 0, 0, 0, 0, 0 ), 941 => array ( 'The Mag\'har', 'The Burning Crusade', 6, 61, 690, 1101, 0, 0, - 500, - 42000, 0, 0 ), 942 => array ( 'Cenarion Expedition', 'The Burning Crusade', 6, 64, 2047, 0, 0, 0, 0, 0, 0, 0 ), 970 => array ( 'Sporeggar', 'The Burning Crusade', 6, 65, 2047, 0, 0, 0, - 2500, 0, 0, 0 ), 978 => array ( 'Kurenai', 'The Burning Crusade', 6, 66, 1101, 690, 0, 0, - 1200, - 42000, 0, 0 ), 989 => array ( 'Keepers of Time', 'The Burning Crusade', 6, 67, 1791, 0, 0, 0, 0, 0, 0, 0 ), 990 => array ( 'The Scale of the Sands', 'The Burning Crusade', 6, 57, 1791, 0, 0, 0, 0, 0, 0, 0 ), 1012 => array ( 'Ashtongue Deathsworn', 'The Burning Crusade', 6, 70, 1791, 0, 0, 0, 0, 0, 0, 0 ), 1015 => array ( 'Netherwing', 'The Burning Crusade', 6, 71, 1791, 0, 0, 0, - 42000, 0, 0, 0 ), 1038 => array ( 'Ogri\'la', 'The Burning Crusade', 6, 73, 1791, 0, 0, 0, 0, 0, 0, 0 ), |
|---|
| 4234 | |
|---|
| 4235 | 935 => array ( 'The Sha\'tar', 'Shattrath City', 7, 39, 1791, 0, 0, 0, 0, 0, 0, 0 ), 932 => array ( 'The Aldor', 'Shattrath City', 7, 58, 255, 1024, 512, 0, 0, 3500, - 3500, 0 ), 934 => array ( 'The Scryers', 'Shattrath City', 7, 62, 255, 1024, 512, 0, 0, - 3500, 3500, 0 ), 1011 => array ( 'Lower City', 'Shattrath City', 7, 69, 32767, 0, 0, 0, 0, 0, 0, 0 ), 1031 => array ( 'Sha\'tari Skyguard', 'Shattrath City', 7, 72, 1791, 0, 0, 0, 0, 0, 0, 0 ), 1077 => array ( 'Shattered Sun Offensive', 'Shattrath City', 7, 73, 1791, 0, 0, 0, 0, 0, 0, 0 ), |
|---|
| 4236 | |
|---|
| 4237 | 1050 => array ( 'Valiance Expedition', 'Alliance Vanguard', 8, 74, 1101, 690, 0, 0, 0, - 42000, 0, 0 ), 1068 => array ( 'Explorers\' League', 'Alliance Vanguard', 8, 78, 1101, 690, 0, 0, 0, - 42000, 0, 0 ), 1094 => array ( 'The Silver Covenant', 'Alliance Vanguard', 8, 90, 1101, 690, 0, 0, 0, - 42000, 0, 0 ), 1126 => array ( 'The Frostborn', 'Alliance Vanguard', 8, 99, 1101, 690, 0, 0, 0, - 42000, 0, 0 ), |
|---|
| 4238 | |
|---|
| 4239 | 1064 => array ( 'The Taunka', 'Horde Expedition', 9, 76, 690, 1101, 0, 0, 0, - 42000, 0, 0 ), 1067 => array ( 'The Hand of Vengeance', 'Horde Expedition', 9, 77, 690, 1101, 0, 0, 0, - 42000, 0, 0 ), 1085 => array ( 'Warsong Offensive', 'Horde Expedition', 9, 81, 1101, 690, 0, 0, - 42000, 0, 0, 0 ), 1124 => array ( 'The Sunreavers', 'Horde Expedition', 9, 98, 690, 1101, 0, 0, 0, - 42000, 0, 0 ), |
|---|
| 4240 | |
|---|
| 4241 | 1104 => array ( 'Frenzyheart Tribe', 'Sholazar Basin', 10, 92, 1791, 0, 0, 0, 0, 0, 0, 0 ), 1105 => array ( 'The Oracles', 'Sholazar Basin', 10, 93, 1791, 0, 00, 0, 0, 0, 0, 0 ), |
|---|
| 4242 | |
|---|
| 4243 | 1073 => array ( 'The Kalu\'ak', 'Wrath of the Lich King', 11, 79, 1791, 0, 0, 0, 0, 0, 0, 0 ), 1091 => array ( 'The Wyrmrest Accord', 'Wrath of the Lich King', 11, 83, 1791, 0, 0, 0, 0, 0, 0, 0 ), 1090 => array ( 'Kirin Tor', 'Wrath of the Lich King', 11, 84, 1229, 690, 1101, 690, 0, 0, 3000, 3000 ), 1098 => array ( 'Knights of the Ebon Blade', 'Wrath of the Lich King', 11, 91, 0, 0, 0, 0, 3200, 0, 0, 0 ), 1106 => array ( 'Argent Crusade', 'Wrath of the Lich King', 11, 94, 32767, 0, 0, 0, 0, 0, 0, 0 ), 1119 => array ( 'The Sons of Hodir', 'Wrath of the Lich King', 11, 97, 1791, 0, 0, 0, - 42000, 0, 0, 0 ), |
|---|
| 4244 | |
|---|
| 4245 | 87 => array ( 'Bloodsail Buccaneers', 'Other', 12, 0, 1791, 0, 0, 0, - 6500, 0, 0, 0 ), 92 => array ( 'Gelkis Clan Centaur', 'Other', 12, 2, 1791, 0, 0, 0, 2000, 0, 0, 0 ), 93 => array ( 'Magram Clan Centaur', 'Other', 12, 3, 1791, 0, 0, 0, 2000, 0, 0, 0 ), 59 => array ( 'Thorium Brotherhood', 'Other', 12, 4, 1791, 0, 0, 0, 0, 0, 0, 0 ), 349 => array ( 'Ravenholdt', 'Other', 12, 5, 1791, 0, 0, 0, 0, 0, 0, 0 ), 70 => array ( 'Syndicate', 'Other', 12, 6, 1791, 0, 0, 0, - 10000, 0, 0, 0 ), 471 => array ( 'Wildhammer Clan', 'Other', 12, 8, 1097, 690, 4, 0, 150, - 42000, 500, 0 ), 169 => array ( 'Steamwheedle Cartel', 'Other', 12, 10, 1791, 0, 0, 0, 500, 0, 0, 0 ), 469 => array ( 'Alliance', 'Other', 12, 11, 1101, 690, 0, 0, 3300, - 42000, 0, 0 ), 67 => array ( 'Horde', 'Other', 12, 12, 690, 1101, 0, 0, 3500, - 42000, 0, 0 ), 529 => array ( 'Argent Dawn', 'Other', 12, 13, 1791, 0, 0, 0, 200, 0, 0, 0 ), 86 => array ( 'Leatherworking - Dragonscale', 'Other', 12, 22, 1791, 0, 0, 0, 2999, 0, 0, 0 ), 83 => array ( 'Leatherworking - Elemental', 'Other', 12, 23, 1791, 0, 0, 0, 2999, 0, 0, 0 ), 549 => array ( 'Leatherworking - Tribal', 'Other', 12, 24, 1791, 0, 0, 0, 2999, 0, 0, 0 ), 551 => array ( 'Engineering - Gnome', 'Other', 12, 25, 1791, 0, 0, 0, 2999, 0, 0, 0 ), 550 => array ( 'Engineering - Goblin', 'Other', 12, 26, 1791, 0, 0, 0, 2999, 0, 0, 0 ), 589 => array ( 'Wintersaber Trainers', 'Other', 12, 27, 690, 1101, 0, 0, - 42000, 0, 0, 0 ), 46 => array ( 'Blacksmithing - Armorsmithing', 'Other', 12, 29, 1791, 0, 0, 0, 0, 0, 0, 0 ), 289 => array ( 'Blacksmithing - Weaponsmithing', 'Other', 12, 30, 1791, 0, 0, 0, 0, 0, 0, 0 ), 570 => array ( 'Blacksmithing - Axesmithing', 'Other', 12, 31, 1791, 0, 0, 0, 0, 0, 0, 0 ), 571 => array ( 'Blacksmithing - Swordsmithing', 'Other', 12, 32, 1791, 0, 0, 0, 0, 0, 0, 0 ), 569 => array ( 'Blacksmithing - Hammersmithing', 'Other', 12, 33, 1791, 0, 0, 0, 0, 0, 0, 0 ), 574 => array ( 'Caer Darrow', 'Other', 12, 34, 1791, 0, 0, 0, 0, 0, 0, 0 ), 576 => array ( 'Timbermaw Hold', 'Other', 12, 35, 1791, 0, 0, 0, - 3500, 0, 0, 0 ), 609 => array ( 'Cenarion Circle', 'Other', 12, 36, 1791, 40, 0, 0, 0, 2000, 0, 0 ), 749 => array ( 'Hydraxian Waterlords', 'Other', 12, 42, 1791, 0, 0, 0, 0, 0, 0, 0 ), 980 => array ( 'Outland', 'Other', 12, 43, 0, 0, 0, 0, 0, 0, 0, 0 ), 809 => array ( 'Shen\'dralar', 'Other', 12, 44, 1791, 0, 0, 0, 0, 0, 0, 0 ), 891 => array ( 'Alliance Forces', 'Other', 12, 47, 1101, 178, 0, 0, 0, - 42000, 0, 0 ), 892 => array ( 'Horde Forces', 'Other', 12, 48, 690, 77, 0, 0, 0, - 42000, 0, 0 ), 909 => array ( 'Darkmoon Faire', 'Other', 12, 50, 1791, 0, 0, 0, 0, 0, 0, 0 ), 270 => array ( 'Zandalar Tribe', 'Other', 12, 51, 1791, 0, 0, 0, 0, 0, 0, 0 ), 910 => array ( 'Brood of Nozdormu', 'Other', 12, 54, 1791, 0, 0, 0, - 42000, 0, 0, 0 ), 922 => array ( 'Tranquillien', 'Other', 12, 56, 690, 1101, 0, 0, 0, - 42000, 0, 0 ), 936 => array ( 'Shattrath City', 'Other', 12, 59, 2047, 0, 0, 0, 0, 0, 0, 0 ), 967 => array ( 'The Violet Eye', 'Other', 12, 63, 4095, 0, 0, 0, 0, 0, 0, 0 ), 1005 => array ( 'Friendly, Hidden', 'Other', 12, 68, 32767, 0, 0, 0, 3000, 0, 0, 0 ), 1037 => array ( 'Alliance Vanguard', 'Other', 12, 88, 1101, 690, 0, 0, 0, 0, 0, 0 ), 1052 => array ( 'Horde Expedition', 'Other', 12, 75, 690, 1101, 0, 0, 0, - 42000, 0, 0 ), 1097 => array ( 'Northrend', 'Other', 12, 89, 0, 0, 0, 0, 0, 0, 0, 0 ), 1117 => array ( 'Sholazar Basin', 'Other', 12, 95, 1791, 0, 0, 0, 0, 0, 0, 0 ) ); |
|---|
| 4246 | } |
|---|
| 4247 | |
|---|
| 4248 | private function fact_get_faction_tree ( $id ) |
|---|
| 4249 | { |
|---|
| 4250 | $fact_id = $this->fact_get_fact_id ( ); |
|---|
| 4251 | |
|---|
| 4252 | if ( isset ( $fact_id [$id] ) ) return $fact_id [$id] [2]; |
|---|
| 4253 | else return 0; |
|---|
| 4254 | } |
|---|
| 4255 | |
|---|
| 4256 | private function fact_get_faction_name ( $id ) |
|---|
| 4257 | { |
|---|
| 4258 | $faction_name = $this->fetch_assoc ( $this->query ( "SELECT field_23 FROM `mmfpm`.`dbc_faction` WHERE id = {$id} LIMIT 1", $this->forum_db ) ); |
|---|
| 4259 | return $faction_name ['field_23']; |
|---|
| 4260 | } |
|---|
| 4261 | |
|---|
| 4262 | private function fact_reputation_at_rank ( $standing ) |
|---|
| 4263 | { |
|---|
| 4264 | return $this->fact_reputation_at_to_rank ( $standing, 1 ); |
|---|
| 4265 | } |
|---|
| 4266 | |
|---|
| 4267 | private function fact_get_reputation_at_rank ( $id, $standing, $race ) |
|---|
| 4268 | { |
|---|
| 4269 | $reputation = $this->fact_get_reputation ( $id, $standing, $race ); |
|---|
| 4270 | return $this->fact_reputation_at_rank ( $reputation ); |
|---|
| 4271 | } |
|---|
| 4272 | |
|---|
| 4273 | private function fact_get_reputation_rank_arr () |
|---|
| 4274 | { |
|---|
| 4275 | return array ( 0 => 'Hasserfüllt', 1 => 'Feindselig', 2 => 'Unfreundlich', 3 => 'Neutral', 4 => 'Freundlich', 5 => 'Wohlwollend', 6 => 'Respektvoll', 7 => 'Ehrfürchtig' ); |
|---|
| 4276 | } |
|---|
| 4277 | |
|---|
| 4278 | private function fact_get_reputation_rank_length () |
|---|
| 4279 | { |
|---|
| 4280 | return array ( 36000, 3000, 3000, 3000, 6000, 12000, 21000, 999 ); |
|---|
| 4281 | } |
|---|
| 4282 | |
|---|
| 4283 | private function fact_reputation_at_to_rank ( $standing, $type ) |
|---|
| 4284 | { |
|---|
| 4285 | $reputation_rank = $this->fact_get_reputation_rank_arr ( ); |
|---|
| 4286 | $reputation_rank_length = $this->fact_get_reputation_rank_length ( ); |
|---|
| 4287 | $reputation_cap = 42999; |
|---|
| 4288 | $reputation_bottom = - 42000; |
|---|
| 4289 | $MIN_REPUTATION_RANK = 0; |
|---|
| 4290 | $MAX_REPUTATION_RANK = 8; |
|---|
| 4291 | |
|---|
| 4292 | $limit = $reputation_cap; |
|---|
| 4293 | for ( $i = $MAX_REPUTATION_RANK - 1; $i >= $MIN_REPUTATION_RANK; -- $i ) { |
|---|
| 4294 | $limit -= $reputation_rank_length [$i]; |
|---|
| 4295 | if ( $standing >= $limit ) return ( ( $type ) ? $standing - $limit : $i ); |
|---|
| 4296 | } |
|---|
| 4297 | return ( ( $type ) ? 0 : $MIN_REPUTATION_RANK ); |
|---|
| 4298 | } |
|---|
| 4299 | |
|---|
| 4300 | private function fact_reputation_to_rank ( $standing ) |
|---|
| 4301 | { |
|---|
| 4302 | return $this->fact_reputation_at_to_rank ( $standing, 0 ); |
|---|
| 4303 | } |
|---|
| 4304 | |
|---|
| 4305 | private function fact_get_base_reputation ( $id, $race ) |
|---|
| 4306 | { |
|---|
| 4307 | $faction_base_reputation = $this->fetch_array ( $this->query ( "SELECT field_1, field_2, field_3, field_4, field_5, field_10, field_11, field_12, field_13 FROM `mmfpm`.`dbc_faction` WHERE id = {$id} LIMIT 1", $this->forum_db ) ); |
|---|
| 4308 | |
|---|
| 4309 | if ( isset ( $faction_base_reputation ) ); |
|---|
| 4310 | else return 0; |
|---|
| 4311 | for ( $i = 0; $i < 4; ++ $i ) { |
|---|
| 4312 | if ( $faction_base_reputation [1 + $i] & ( 1 << ( $race - 1 ) ) ) return $faction_base_reputation [5 + $i]; |
|---|
| 4313 | } |
|---|
| 4314 | |
|---|
| 4315 | return 0; |
|---|
| 4316 | } |
|---|
| 4317 | |
|---|
| 4318 | private function fact_get_reputation ( $id, $standing, $race ) |
|---|
| 4319 | { |
|---|
| 4320 | return $this->fact_get_base_reputation ( $id, $race ) + $standing; |
|---|
| 4321 | } |
|---|
| 4322 | |
|---|
| 4323 | private function fact_get_reputation_rank ( $id, $standing, $race ) |
|---|
| 4324 | { |
|---|
| 4325 | $reputation = $this->fact_get_reputation ( $id, $standing, $race ); |
|---|
| 4326 | return $this->fact_reputation_to_rank ( $reputation ); |
|---|
| 4327 | } |
|---|
| 4328 | |
|---|
| 4329 | protected function character_main ( $guid = 0, $ajax = false ) |
|---|
| 4330 | { |
|---|
| 4331 | if ( ! $guid || $guid == 0 || empty ( $guid ) ) { |
|---|
| 4332 | if ( $ajax ) $this->do_exit ( 'Fehler' ); |
|---|
| 4333 | else return 'Fehler!'; |
|---|
| 4334 | } |
|---|
| 4335 | |
|---|
| 4336 | $zeitmessung1 = microtime ( ); |
|---|
| 4337 | $zeittemp = explode ( " ", $zeitmessung1 ); |
|---|
| 4338 | $zeitmessung1 = $zeittemp [0] + $zeittemp [1]; // Timestamp + Nanosek |
|---|
| 4339 | |
|---|
| 4340 | |
|---|
| 4341 | $item_datasite = 'http://loldb.landoflegends.de/?item='; |
|---|
| 4342 | |
|---|
| 4343 | define ( 'EQ_DATA_OFFSET_EQU_HEAD', 0 ); |
|---|
| 4344 | define ( 'EQ_DATA_OFFSET_EQU_NECK', 2 ); |
|---|
| 4345 | define ( 'EQ_DATA_OFFSET_EQU_SHOULDER', 4 ); |
|---|
| 4346 | define ( 'EQ_DATA_OFFSET_EQU_SHIRT', 6 ); |
|---|
| 4347 | define ( 'EQ_DATA_OFFSET_EQU_CHEST', 8 ); |
|---|
| 4348 | define ( 'EQ_DATA_OFFSET_EQU_BELT', 10 ); |
|---|
| 4349 | define ( 'EQ_DATA_OFFSET_EQU_LEGS', 12 ); |
|---|
| 4350 | define ( 'EQ_DATA_OFFSET_EQU_FEET', 14 ); |
|---|
| 4351 | define ( 'EQ_DATA_OFFSET_EQU_WRIST', 16 ); |
|---|
| 4352 | define ( 'EQ_DATA_OFFSET_EQU_GLOVES', 18 ); |
|---|
| 4353 | define ( 'EQ_DATA_OFFSET_EQU_FINGER1', 20 ); |
|---|
| 4354 | define ( 'EQ_DATA_OFFSET_EQU_FINGER2', 22 ); |
|---|
| 4355 | define ( 'EQ_DATA_OFFSET_EQU_TRINKET1', 24 ); |
|---|
| 4356 | define ( 'EQ_DATA_OFFSET_EQU_TRINKET2', 26 ); |
|---|
| 4357 | define ( 'EQ_DATA_OFFSET_EQU_BACK', 28 ); |
|---|
| 4358 | define ( 'EQ_DATA_OFFSET_EQU_MAIN_HAND', 30 ); |
|---|
| 4359 | define ( 'EQ_DATA_OFFSET_EQU_OFF_HAND', 32 ); |
|---|
| 4360 | define ( 'EQ_DATA_OFFSET_EQU_RANGED', 34 ); |
|---|
| 4361 | define ( 'EQ_DATA_OFFSET_EQU_TABARD', 36 ); |
|---|
| 4362 | |
|---|
| 4363 | $char_main_sql = "SELECT characters.equipmentCache, characters.name, characters.race, characters.class, characters.level, characters.zone, characters.map, characters.online, characters.totaltime, characters.gender, characters.account, character_stats.blockPct, |
|---|
| 4364 | character_stats.dodgePct, character_stats.parryPct, character_stats.critPct, character_stats.rangedCritPct, character_stats.spellCritPct, COALESCE(guild_member.guildid,0) AS guildid, COALESCE(guild_member.rank,0) AS rank, |
|---|
| 4365 | characters.totalHonorPoints, characters.arenaPoints, characters.totalKills, character_stats.maxhealth, character_stats.maxpower1, character_stats.strength, character_stats.agility, character_stats.stamina, character_stats.intellect, |
|---|
| 4366 | character_stats.spirit, character_stats.armor, character_stats.resHoly, character_stats.resFire, character_stats.resNature, character_stats.resFrost, character_stats.resShadow, character_stats.resArcane, character_stats.attackPower, |
|---|
| 4367 | character_stats.rangedAttackPower, character_stats.spellPower, characters.power2, character_stats.maxpower2, characters.power4, character_stats.maxpower4, characters.power3, character_stats.maxpower3 |
|---|
| 4368 | FROM `{$this->lol_conf ['db_pve_live_characters']}`.characters LEFT JOIN `{$this->lol_conf ['db_pve_live_characters']}`.character_stats ON characters.guid = character_stats.guid LEFT JOIN `{$this->lol_conf ['db_pve_live_characters']}`.guild_member ON characters.guid = guild_member.guid WHERE characters.guid = {$guid}"; |
|---|
| 4369 | // print $char_main_sql; |
|---|
| 4370 | $result = $this->query ( $char_main_sql, $this->forum_db ); |
|---|
| 4371 | $char = $this->fetch_assoc ( $result ); |
|---|
| 4372 | $eq_data = explode ( ' ', $char ['equipmentCache'] ); |
|---|
| 4373 | |
|---|
| 4374 | $online = ( $char ['online'] ) ? 'Online' : 'Offline'; |
|---|
| 4375 | |
|---|
| 4376 | if ( $char ['guildid'] && $char ['guildid'] != 0 ) { |
|---|
| 4377 | $guild_name = $this->result ( $this->query ( "SELECT name FROM `{$this->lol_conf ['db_pve_live_characters']}`.guild WHERE guildid ={$char ['guildid']}", $this->forum_db ) ); |
|---|
| 4378 | $mrank = $char ['rank']; |
|---|
| 4379 | $guild_rank = $this->result ( $this->query ( "SELECT rname FROM `{$this->lol_conf ['db_pve_live_characters']}`.guild_rank WHERE guildid ={$char ['guildid']} AND rid={$mrank}", $this->forum_db ) ); |
|---|
| 4380 | } |
|---|
| 4381 | else { |
|---|
| 4382 | $guild_name = 'Keine Gilde'; |
|---|
| 4383 | $guild_rank = 'Kein Rang'; |
|---|
| 4384 | } |
|---|
| 4385 | |
|---|
| 4386 | $block = round ( $char ['blockPct'], 2 ); |
|---|
| 4387 | $dodge = round ( $char ['dodgePct'], 2 ); |
|---|
| 4388 | $parry = round ( $char ['parryPct'], 2 ); |
|---|
| 4389 | $crit = round ( $char ['critPct'], 2 ); |
|---|
| 4390 | $ranged_crit = round ( $char ['rangedCritPct'], 2 ); |
|---|
| 4391 | $spell_crit = round ( $char ['spellCritPct'], 2 ); |
|---|
| 4392 | $spell_damage = $char ['spellPower']; |
|---|
| 4393 | $rage = round ( $char ['power2'] / 10 ); |
|---|
| 4394 | $maxrage = round ( $char ['maxpower2'] / 10 ); |
|---|
| 4395 | |
|---|
| 4396 | // preventing undefined variables, didnt want to remove all this stuff |
|---|
| 4397 | // so just filling the missing variables with 0 |
|---|
| 4398 | define ( 'CHAR_DATA_OFFSET_MELEE_HIT', 0 ); |
|---|
| 4399 | define ( 'CHAR_DATA_OFFSET_SPELL_HEAL', 1 ); |
|---|
| 4400 | define ( 'CHAR_DATA_OFFSET_SPELL_HIT', 2 ); |
|---|
| 4401 | define ( 'CHAR_DATA_OFFSET_SPELL_HASTE_RATING', 3 ); |
|---|
| 4402 | define ( 'CHAR_DATA_OFFSET_RESILIENCE', 4 ); |
|---|
| 4403 | define ( 'CHAR_DATA_OFFSET_RANGE_HIT', 5 ); |
|---|
| 4404 | $char_data = array ( 0, 0, 0, 0, 0, 0 ); |
|---|
| 4405 | $maxdamage = 0; |
|---|
| 4406 | $mindamage = 0; |
|---|
| 4407 | $maxrangeddamage = 0; |
|---|
| 4408 | $minrangeddamage = 0; |
|---|
| 4409 | $expertise = 0; |
|---|
| 4410 | |
|---|
| 4411 | $EQU_HEAD = $eq_data [EQ_DATA_OFFSET_EQU_HEAD]; |
|---|
| 4412 | $EQU_NECK = $eq_data [EQ_DATA_OFFSET_EQU_NECK]; |
|---|
| 4413 | $EQU_SHOULDER = $eq_data [EQ_DATA_OFFSET_EQU_SHOULDER]; |
|---|
| 4414 | $EQU_SHIRT = $eq_data [EQ_DATA_OFFSET_EQU_SHIRT]; |
|---|
| 4415 | $EQU_CHEST = $eq_data [EQ_DATA_OFFSET_EQU_CHEST]; |
|---|
| 4416 | $EQU_BELT = $eq_data [EQ_DATA_OFFSET_EQU_BELT]; |
|---|
| 4417 | $EQU_LEGS = $eq_data [EQ_DATA_OFFSET_EQU_LEGS]; |
|---|
| 4418 | $EQU_FEET = $eq_data [EQ_DATA_OFFSET_EQU_FEET]; |
|---|
| 4419 | $EQU_WRIST = $eq_data [EQ_DATA_OFFSET_EQU_WRIST]; |
|---|
| 4420 | $EQU_GLOVES = $eq_data [EQ_DATA_OFFSET_EQU_GLOVES]; |
|---|
| 4421 | $EQU_FINGER1 = $eq_data [EQ_DATA_OFFSET_EQU_FINGER1]; |
|---|
| 4422 | $EQU_FINGER2 = $eq_data [EQ_DATA_OFFSET_EQU_FINGER2]; |
|---|
| 4423 | $EQU_TRINKET1 = $eq_data [EQ_DATA_OFFSET_EQU_TRINKET1]; |
|---|
| 4424 | $EQU_TRINKET2 = $eq_data [EQ_DATA_OFFSET_EQU_TRINKET2]; |
|---|
| 4425 | $EQU_BACK = $eq_data [EQ_DATA_OFFSET_EQU_BACK]; |
|---|
| 4426 | $EQU_MAIN_HAND = $eq_data [EQ_DATA_OFFSET_EQU_MAIN_HAND]; |
|---|
| 4427 | $EQU_OFF_HAND = $eq_data [EQ_DATA_OFFSET_EQU_OFF_HAND]; |
|---|
| 4428 | $EQU_RANGED = $eq_data [EQ_DATA_OFFSET_EQU_RANGED]; |
|---|
| 4429 | $EQU_TABARD = $eq_data [EQ_DATA_OFFSET_EQU_TABARD]; |
|---|
| 4430 | |
|---|
| 4431 | $equiped_items = array ( 1 => array ( '', ( $EQU_HEAD ? $this->get_item_icon ( $EQU_HEAD ) : 0 ), ( $EQU_HEAD ? $this->get_item_border ( $EQU_HEAD ) : 0 ) ), 2 => array ( '', ( $EQU_NECK ? $this->get_item_icon ( $EQU_NECK ) : 0 ), ( $EQU_NECK ? $this->get_item_border ( $EQU_NECK ) : 0 ) ), 3 => array ( '', ( $EQU_SHOULDER ? $this->get_item_icon ( $EQU_SHOULDER ) : 0 ), ( $EQU_SHOULDER ? $this->get_item_border ( $EQU_SHOULDER ) : 0 ) ), 4 => array ( '', ( $EQU_SHIRT ? $this->get_item_icon ( $EQU_SHIRT ) : 0 ), ( $EQU_SHIRT ? $this->get_item_border ( $EQU_SHIRT ) : 0 ) ), 5 => array ( '', ( $EQU_CHEST ? $this->get_item_icon ( $EQU_CHEST ) : 0 ), ( $EQU_CHEST ? $this->get_item_border ( $EQU_CHEST ) : 0 ) ), 6 => array ( '', ( $EQU_BELT ? $this->get_item_icon ( $EQU_BELT ) : 0 ), ( $EQU_BELT ? $this->get_item_border ( $EQU_BELT ) : 0 ) ), 7 => array ( '', ( $EQU_LEGS ? $this->get_item_icon ( $EQU_LEGS ) : 0 ), ( $EQU_LEGS ? $this->get_item_border ( $EQU_LEGS ) : 0 ) ), 8 => array ( '', ( $EQU_FEET ? $this->get_item_icon ( $EQU_FEET ) : 0 ), ( $EQU_FEET ? $this->get_item_border ( $EQU_FEET ) : 0 ) ), 9 => array ( '', ( $EQU_WRIST ? $this->get_item_icon ( $EQU_WRIST ) : 0 ), ( $EQU_WRIST ? $this->get_item_border ( $EQU_WRIST ) : 0 ) ), 10 => array ( '', ( $EQU_GLOVES ? $this->get_item_icon ( $EQU_GLOVES ) : 0 ), ( $EQU_GLOVES ? $this->get_item_border ( $EQU_GLOVES ) : 0 ) ), 11 => array ( '', ( $EQU_FINGER1 ? $this->get_item_icon ( $EQU_FINGER1 ) : 0 ), ( $EQU_FINGER1 ? $this->get_item_border ( $EQU_FINGER1 ) : 0 ) ), 12 => array ( '', ( $EQU_FINGER2 ? $this->get_item_icon ( $EQU_FINGER2 ) : 0 ), ( $EQU_FINGER2 ? $this->get_item_border ( $EQU_FINGER2 ) : 0 ) ), 13 => array ( '', ( $EQU_TRINKET1 ? $this->get_item_icon ( $EQU_TRINKET1 ) : 0 ), ( $EQU_TRINKET1 ? $this->get_item_border ( $EQU_TRINKET1 ) : 0 ) ), 14 => array ( '', ( $EQU_TRINKET2 ? $this->get_item_icon ( $EQU_TRINKET2 ) : 0 ), ( $EQU_TRINKET2 ? $this->get_item_border ( $EQU_TRINKET2 ) : 0 ) ), 15 => array ( '', ( $EQU_BACK ? $this->get_item_icon ( $EQU_BACK ) : 0 ), ( $EQU_BACK ? $this->get_item_border ( $EQU_BACK ) : 0 ) ), 16 => array ( '', ( $EQU_MAIN_HAND ? $this->get_item_icon ( $EQU_MAIN_HAND ) : 0 ), ( $EQU_MAIN_HAND ? $this->get_item_border ( $EQU_MAIN_HAND ) : 0 ) ), 17 => array ( '', ( $EQU_OFF_HAND ? $this->get_item_icon ( $EQU_OFF_HAND ) : 0 ), ( $EQU_OFF_HAND ? $this->get_item_border ( $EQU_OFF_HAND ) : 0 ) ), 18 => array ( '', ( $EQU_RANGED ? $this->get_item_icon ( $EQU_RANGED ) : 0 ), ( $EQU_RANGED ? $this->get_item_border ( $EQU_RANGED ) : 0 ) ), 19 => array ( '', ( $EQU_TABARD ? $this->get_item_icon ( $EQU_TABARD ) : 0 ), ( $EQU_TABARD ? $this->get_item_border ( $EQU_TABARD ) : 0 ) ) ); |
|---|
| 4432 | |
|---|
| 4433 | $output = '<center> |
|---|
| 4434 | <div id="tab_content2"> |
|---|
| 4435 | <table class="lined" style="width: 580px;"> |
|---|
| 4436 | <tr> |
|---|
| 4437 | <td colspan="2"> |
|---|
| 4438 | <div> |
|---|
| 4439 | <img src="' . $this->char_get_avatar_img ( $char ['level'], $char ['gender'], $char ['race'], $char ['class'], 0 ) . '" alt="avatar" /> |
|---|
| 4440 | </div> |
|---|
| 4441 | <div>'; |
|---|
| 4442 | |
|---|
| 4443 | $a_results = $this->query ( "SELECT DISTINCT spell FROM `{$this->lol_conf ['db_pve_live_characters']}`.`character_aura` WHERE guid = {$guid}", $this->forum_db ); |
|---|
| 4444 | |
|---|
| 4445 | if ( $this->num_rows ( $a_results ) ) while ( $aura = $this->fetch_assoc ( $a_results ) ) { |
|---|
| 4446 | $output .= ' |
|---|
| 4447 | <a style="padding:2px;" href="http://loldb.landoflegends.de/?spell=' . $aura ['spell'] . '" target="_blank"> |
|---|
| 4448 | <img src="' . $this->spell_get_icon ( $aura ['spell'] ) . '" alt="' . $aura ['spell'] . '" width="24" height="24" /> |
|---|
| 4449 | </a>'; |
|---|
| 4450 | } |
|---|
| 4451 | |
|---|
| 4452 | $output .= ' |
|---|
| 4453 | </div> |
|---|
| 4454 | </td> |
|---|
| 4455 | <td colspan="4"> |
|---|
| 4456 | <font class="bold"> |
|---|
| 4457 | ' . htmlentities ( $char ['name'] ) . ' - |
|---|
| 4458 | <img src="img/c_icons/' . $char ['race'] . '-' . $char ['gender'] . '.gif" onmousemove="toolTip(\'' . $this->def ['character_race'] [$char ['race']] [0] . '\', \'item_tooltip\')" onmouseout="toolTip()" alt="" /> |
|---|
| 4459 | <img src="img/c_icons/' . $char ['class'] . '.gif" onmousemove="toolTip(\'' . $this->def ['character_class'] [$char ['class']] . '\', \'item_tooltip\')" onmouseout="toolTip()" alt="" /> |
|---|
| 4460 | - lvl ' . $this->char_get_level_color ( $char ['level'] ) . ' |
|---|
| 4461 | </font> |
|---|
| 4462 | <br />' . $this->get_map_name ( $char ['map'] ) . ' - ' . $this->get_zone_name ( $char ['zone'] ) . ' |
|---|
| 4463 | <br />Ehre Rang: ' . $char ['totalHonorPoints'] . ' / ' . $char ['arenaPoints'] . ' - Siege: ' . $char ['totalKills'] . ' |
|---|
| 4464 | <br />Gilde: ' . $guild_name . ' | Rang: ' . htmlentities ( $guild_rank ) . ' |
|---|
| 4465 | <br />' . ( ( $char ['online'] ) ? '<img src="img/up.gif" onmousemove="toolTip(\'Online\', \'item_tooltip\')" onmouseout="toolTip()" alt="online" />' : '<img src="img/down.gif" onmousemove="toolTip(\'Offline\', \'item_tooltip\')" onmouseout="toolTip()" alt="offline" />' ); |
|---|
| 4466 | |
|---|
| 4467 | $country = $this->misc_get_country_by_account ( $char ['account'] ); |
|---|
| 4468 | $output .= ' - ' . ( ( $country ['code'] ) ? '<img src="img/flags/' . $country ['code'] . '.png" onmousemove="toolTip(\'' . ( $country ['country'] ) . '\', \'item_tooltip\')" onmouseout="toolTip()" alt="" />' : '-' ); |
|---|
| 4469 | unset ( $country ); |
|---|
| 4470 | |
|---|
| 4471 | $output .= ' |
|---|
| 4472 | </td> |
|---|
| 4473 | </tr> |
|---|
| 4474 | <tr> |
|---|
| 4475 | <td width="6%">'; |
|---|
| 4476 | if ( ( $equiped_items [1] [1] ) ) $output .= ' |
|---|
| 4477 | <a style="padding:2px;" href="' . $item_datasite . $EQU_HEAD . '" target="_blank"> |
|---|
| 4478 | <img src="' . $equiped_items [1] [1] . '" class="' . $equiped_items [1] [2] . '" alt="Head" /> |
|---|
| 4479 | </a>'; |
|---|
| 4480 | else $output .= ' |
|---|
| 4481 | <img src="img/INV/INV_empty_head.png" class="icon_border_0" alt="empty" />'; |
|---|
| 4482 | $output .= ' |
|---|
| 4483 | </td> |
|---|
| 4484 | <td class="half_line" colspan="2" align="center" width="50%"> |
|---|
| 4485 | <div class="gradient_p">Gesundheit:</div> |
|---|
| 4486 | <div class="gradient_pp">' . $char ['maxhealth'] . '</div>'; |
|---|
| 4487 | if ( $char ['class'] == 11 ) $output .= '</br> |
|---|
| 4488 | <div class="gradient_p">Energie:</div> |
|---|
| 4489 | <div class="gradient_pp">' . $char ['power4'] . '/' . $char ['maxpower4'] . '</div>'; |
|---|
| 4490 | $output .= ' |
|---|
| 4491 | </td> |
|---|
| 4492 | <td class="half_line" colspan="2" align="center" width="50%">'; |
|---|
| 4493 | if ( $char ['class'] == 1 ) $output .= ' |
|---|
| 4494 | <div class="gradient_p">Wut:</div> |
|---|
| 4495 | <div class="gradient_pp">' . $rage . '/' . $maxrage . '</div>'; |
|---|
| 4496 | elseif ( $char ['class'] == 4 ) $output .= ' |
|---|
| 4497 | <div class="gradient_p">Energie:</div> |
|---|
| 4498 | <div class="gradient_pp">' . $char ['power4'] . '/' . $char ['maxpower4'] . '</div>'; |
|---|
| 4499 | elseif ( $char ['class'] == 6 ) $output .= ' |
|---|
| 4500 | <div class="gradient_p">Runic Power:</div> |
|---|
| 4501 | <div class="gradient_pp">' . $char ['power3'] . '/' . $char ['maxpower3'] . '</div>'; |
|---|
| 4502 | elseif ( $char ['class'] == 11 ) $output .= ' |
|---|
| 4503 | <div class="gradient_p">Mana:</div> |
|---|
| 4504 | <div class="gradient_pp">' . $char ['maxpower1'] . '</div> |
|---|
| 4505 | </br> |
|---|
| 4506 | <div class="gradient_p">Wut:</div> |
|---|
| 4507 | <div class="gradient_pp">' . $rage . '/' . $maxrage . '</div>'; |
|---|
| 4508 | elseif ( $char ['class'] == 2 || $char ['class'] == 3 || $char ['class'] == 5 || $char ['class'] == 7 || $char ['class'] == 8 || $char ['class'] == 9 ) $output .= ' |
|---|
| 4509 | <div class="gradient_p">Mana:</div> |
|---|
| 4510 | <div class="gradient_pp">' . $char ['maxpower1'] . '</div>'; |
|---|
| 4511 | $output .= ' |
|---|
| 4512 | </td> |
|---|
| 4513 | <td width="6%">'; |
|---|
| 4514 | if ( ( $equiped_items [10] [1] ) ) $output .= ' |
|---|
| 4515 | <a style="padding:2px;" href="' . $item_datasite . $EQU_GLOVES . '" target="_blank"> |
|---|
| 4516 | <img src="' . $equiped_items [10] [1] . '" class="' . $equiped_items [10] [2] . '" alt="Gloves" /> |
|---|
| 4517 | </a>'; |
|---|
| 4518 | else $output .= ' |
|---|
| 4519 | <img src="img/INV/INV_empty_gloves.png" class="icon_border_0" alt="empty" />'; |
|---|
| 4520 | $output .= ' |
|---|
| 4521 | </td> |
|---|
| 4522 | </tr> |
|---|
| 4523 | <tr> |
|---|
| 4524 | <td width="1%">'; |
|---|
| 4525 | if ( ( $equiped_items [2] [1] ) ) $output .= ' |
|---|
| 4526 | <a style="padding:2px;" href="' . $item_datasite . $EQU_NECK . '" target="_blank"> |
|---|
| 4527 | <img src="' . $equiped_items [2] [1] . '" class="' . $equiped_items [2] [2] . '" alt="Neck" /> |
|---|
| 4528 | </a>'; |
|---|
| 4529 | else $output .= ' |
|---|
| 4530 | <img src="img/INV/INV_empty_neck.png" class="icon_border_0" alt="empty" />'; |
|---|
| 4531 | $output .= ' |
|---|
| 4532 | </td> |
|---|
| 4533 | <td class="half_line" colspan="2" rowspan="3" align="center" width="50%"> |
|---|
| 4534 | <div class="gradient_p"> |
|---|
| 4535 | Stärke:<br /> |
|---|
| 4536 | Beweglichkeit:<br /> |
|---|
| 4537 | Ausdauer:<br /> |
|---|
| 4538 | Intelligenz:<br /> |
|---|
| 4539 | Willenskraft:<br /> |
|---|
| 4540 | Rüstung: |
|---|
| 4541 | </div> |
|---|
| 4542 | <div class="gradient_pp"> |
|---|
| 4543 | ' . $char ['strength'] . '<br /> |
|---|
| 4544 | ' . $char ['agility'] . '<br /> |
|---|
| 4545 | ' . $char ['stamina'] . '<br /> |
|---|
| 4546 | ' . $char ['intellect'] . '<br /> |
|---|
| 4547 | ' . $char ['spirit'] . '<br /> |
|---|
| 4548 | ' . $char ['armor'] . ' |
|---|
| 4549 | </div> |
|---|
| 4550 | </td> |
|---|
| 4551 | <td class="half_line" colspan="2" rowspan="3" align="center" width="50%"> |
|---|
| 4552 | <div class="gradient_p"> |
|---|
| 4553 | Heiligwiederstand:<br /> |
|---|
| 4554 | Arkanwiederstand:<br /> |
|---|
| 4555 | Feuerwiederstand:<br /> |
|---|
| 4556 | Naturwiederstand:<br /> |
|---|
| 4557 | Frostwiederstand:<br /> |
|---|
| 4558 | Schattenwiederstand: |
|---|
| 4559 | </div> |
|---|
| 4560 | <div class="gradient_pp"> |
|---|
| 4561 | ' . $char ['resHoly'] . '<br /> |
|---|
| 4562 | ' . $char ['resArcane'] . '<br /> |
|---|
| 4563 | ' . $char ['resFire'] . '<br /> |
|---|
| 4564 | ' . $char ['resNature'] . '<br /> |
|---|
| 4565 | ' . $char ['resFrost'] . '<br /> |
|---|
| 4566 | ' . $char ['resShadow'] . ' |
|---|
| 4567 | </div> |
|---|
| 4568 | </td> |
|---|
| 4569 | <td width="1%">'; |
|---|
| 4570 | if ( ( $equiped_items [6] [1] ) ) $output .= '<a style="padding:2px;" href="' . $item_datasite . $EQU_BELT . '" target="_blank"> |
|---|
| 4571 | <img src="' . $equiped_items [6] [1] . '" class="' . $equiped_items [6] [2] . '" alt="Belt" /> |
|---|
| 4572 | </a>'; |
|---|
| 4573 | else $output .= ' |
|---|
| 4574 | <img src="img/INV/INV_empty_waist.png" class="icon_border_0" alt="empty" />'; |
|---|
| 4575 | $output .= ' |
|---|
| 4576 | </td> |
|---|
| 4577 | </tr> |
|---|
| 4578 | <tr> |
|---|
| 4579 | <td width="1%">'; |
|---|
| 4580 | if ( ( $equiped_items [3] [1] ) ) $output .= ' |
|---|
| 4581 | <a style="padding:2px;" href="' . $item_datasite . $EQU_SHOULDER . '" target="_blank"> |
|---|
| 4582 | <img src="' . $equiped_items [3] [1] . '" class="' . $equiped_items [3] [2] . '" alt="Shoulder" /> |
|---|
| 4583 | </a>'; |
|---|
| 4584 | else $output .= ' |
|---|
| 4585 | <img src="img/INV/INV_empty_shoulder.png" class="icon_border_0" alt="empty" />'; |
|---|
| 4586 | $output .= ' |
|---|
| 4587 | </td> |
|---|
| 4588 | <td width="1%">'; |
|---|
| 4589 | if ( ( $equiped_items [7] [1] ) ) $output .= ' |
|---|
| 4590 | <a style="padding:2px;" href="' . $item_datasite . $EQU_LEGS . '" target="_blank"> |
|---|
| 4591 | <img src="' . $equiped_items [7] [1] . '" class="' . $equiped_items [7] [2] . '" alt="Legs" /> |
|---|
| 4592 | </a>'; |
|---|
| 4593 | else $output .= ' |
|---|
| 4594 | <img src="img/INV/INV_empty_legs.png" class="icon_border_0" alt="empty" />'; |
|---|
| 4595 | $output .= ' |
|---|
| 4596 | </td> |
|---|
| 4597 | </tr> |
|---|
| 4598 | <tr> |
|---|
| 4599 | <td width="1%">'; |
|---|
| 4600 | if ( ( $equiped_items [15] [1] ) ) $output .= ' |
|---|
| 4601 | <a style="padding:2px;" href="' . $item_datasite . $EQU_BACK . '" target="_blank"> |
|---|
| 4602 | <img src="' . $equiped_items [15] [1] . '" class="' . $equiped_items [15] [2] . '" alt="Back" /> |
|---|
| 4603 | </a>'; |
|---|
| 4604 | else $output .= ' |
|---|
| 4605 | <img src="img/INV/INV_empty_chest_back.png" class="icon_border_0" alt="empty" />'; |
|---|
| 4606 | $output .= ' |
|---|
| 4607 | </td> |
|---|
| 4608 | <td width="1%">'; |
|---|
| 4609 | if ( ( $equiped_items [8] [1] ) ) $output .= ' |
|---|
| 4610 | <a style="padding:2px;" href="' . $item_datasite . $EQU_FEET . '" target="_blank"> |
|---|
| 4611 | <img src="' . $equiped_items [8] [1] . '" class="' . $equiped_items [8] [2] . '" alt="Feet" /> |
|---|
| 4612 | </a>'; |
|---|
| 4613 | else $output .= ' |
|---|
| 4614 | <img src="img/INV/INV_empty_feet.png" class="icon_border_0" alt="empty" />'; |
|---|
| 4615 | $output .= ' |
|---|
| 4616 | </td> |
|---|
| 4617 | </tr> |
|---|
| 4618 | <tr> |
|---|
| 4619 | <td width="1%">'; |
|---|
| 4620 | if ( ( $equiped_items [5] [1] ) ) $output .= ' |
|---|
| 4621 | <a style="padding:2px;" href="' . $item_datasite . $EQU_CHEST . '" target="_blank"> |
|---|
| 4622 | <img src="' . $equiped_items [5] [1] . '" class="' . $equiped_items [5] [2] . '" alt="Chest" /> |
|---|
| 4623 | </a>'; |
|---|
| 4624 | else $output .= ' |
|---|
| 4625 | <img src="img/INV/INV_empty_chest_back.png" class="icon_border_0" alt="empty" />'; |
|---|
| 4626 | $output .= ' |
|---|
| 4627 | </td> |
|---|
| 4628 | <td class="half_line" colspan="2" rowspan="2" align="center" width="50%"> |
|---|
| 4629 | <div class="gradient_p"> |
|---|
| 4630 | Nachkampfschaden:<br /> |
|---|
| 4631 | Nahkampfangriffskraft:<br /> |
|---|
| 4632 | Melee Hit:<br /> |
|---|
| 4633 | Kritisch:<br /> |
|---|
| 4634 | Waffenkunde:<br /> |
|---|
| 4635 | </div> |
|---|
| 4636 | <div class="gradient_pp"> |
|---|
| 4637 | ' . $mindamage . '-' . $maxdamage . '<br /> |
|---|
| 4638 | ' . $char ['attackPower'] . '<br /> |
|---|
| 4639 | ' . $char_data [CHAR_DATA_OFFSET_MELEE_HIT] . '<br /> |
|---|
| 4640 | ' . $crit . '%<br /> |
|---|
| 4641 | ' . $expertise . '<br /> |
|---|
| 4642 | </div> |
|---|
| 4643 | </td> |
|---|
| 4644 | <td class="half_line" colspan="2" rowspan="2" align="center" width="50%"> |
|---|
| 4645 | <div class="gradient_p"> |
|---|
| 4646 | Zauberschaden:<br /> |
|---|
| 4647 | Heilungsboni:<br /> |
|---|
| 4648 | Trefferwertung:<br /> |
|---|
| 4649 | Kritisch:<br /> |
|---|
| 4650 | Tempowertung: |
|---|
| 4651 | </div> |
|---|
| 4652 | <div class="gradient_pp"> |
|---|
| 4653 | ' . $spell_damage . '<br /> |
|---|
| 4654 | ' . $char_data [CHAR_DATA_OFFSET_SPELL_HEAL] . '<br /> |
|---|
| 4655 | ' . $char_data [CHAR_DATA_OFFSET_SPELL_HIT] . '<br /> |
|---|
| 4656 | ' . $spell_crit . '%<br /> |
|---|
| 4657 | ' . $char_data [CHAR_DATA_OFFSET_SPELL_HASTE_RATING] . ' |
|---|
| 4658 | </div> |
|---|
| 4659 | </td> |
|---|
| 4660 | <td width="1%">'; |
|---|
| 4661 | if ( ( $equiped_items [11] [1] ) ) $output .= ' |
|---|
| 4662 | <a style="padding:2px;" href="' . $item_datasite . $EQU_FINGER1 . '" target="_blank"> |
|---|
| 4663 | <img src="' . $equiped_items [11] [1] . '" class="' . $equiped_items [11] [2] . '" alt="Finger1" /> |
|---|
| 4664 | </a>'; |
|---|
| 4665 | else $output .= ' |
|---|
| 4666 | <img src="img/INV/INV_empty_finger.png" class="icon_border_0" alt="empty" />'; |
|---|
| 4667 | $output .= ' |
|---|
| 4668 | </td> |
|---|
| 4669 | </tr> |
|---|
| 4670 | <tr> |
|---|
| 4671 | <td width="1%">'; |
|---|
| 4672 | if ( ( $equiped_items [4] [1] ) ) $output .= ' |
|---|
| 4673 | <a style="padding:2px;" href="' . $item_datasite . $EQU_SHIRT . '" target="_blank"> |
|---|
| 4674 | <img src="' . $equiped_items [4] [1] . '" class="' . $equiped_items [4] [2] . '" alt="Shirt" /> |
|---|
| 4675 | </a>'; |
|---|
| 4676 | else $output .= ' |
|---|
| 4677 | <img src="img/INV/INV_empty_shirt.png" class="icon_border_0" alt="empty" />'; |
|---|
| 4678 | $output .= ' |
|---|
| 4679 | </td> |
|---|
| 4680 | <td width="1%">'; |
|---|
| 4681 | if ( ( $equiped_items [12] [1] ) ) $output .= ' |
|---|
| 4682 | <a style="padding:2px;" href="' . $item_datasite . $EQU_FINGER2 . '" target="_blank"> |
|---|
| 4683 | <img src="' . $equiped_items [12] [1] . '" class="' . $equiped_items [12] [2] . '" alt="Finger2" /> |
|---|
| 4684 | </a>'; |
|---|
| 4685 | else $output .= ' |
|---|
| 4686 | <img src="img/INV/INV_empty_finger.png" class="icon_border_0" alt="empty" />'; |
|---|
| 4687 | $output .= ' |
|---|
| 4688 | </td> |
|---|
| 4689 | </tr> |
|---|
| 4690 | <tr> |
|---|
| 4691 | <td width="1%">'; |
|---|
| 4692 | if ( ( $equiped_items [19] [1] ) ) $output .= ' |
|---|
| 4693 | <a style="padding:2px;" href="' . $item_datasite . $EQU_TABARD . '" target="_blank"> |
|---|
| 4694 | <img src="' . $equiped_items [19] [1] . '" class="' . $equiped_items [19] [2] . '" alt="Tabard" /> |
|---|
| 4695 | </a>'; |
|---|
| 4696 | else $output .= ' |
|---|
| 4697 | <img src="img/INV/INV_empty_tabard.png" class="icon_border_0" alt="empty" />'; |
|---|
| 4698 | $output .= ' |
|---|
| 4699 | </td> |
|---|
| 4700 | <td class="half_line" colspan="2" rowspan="2" align="center" width="50%"> |
|---|
| 4701 | <div class="gradient_p"> |
|---|
| 4702 | Ausweichen:<br /> |
|---|
| 4703 | Parieren:<br /> |
|---|
| 4704 | Blocken:<br /> |
|---|
| 4705 | Abhärtung:<br /> |
|---|
| 4706 | </div> |
|---|
| 4707 | <div class="gradient_pp"> |
|---|
| 4708 | ' . $dodge . '%<br /> |
|---|
| 4709 | ' . $parry . '%<br /> |
|---|
| 4710 | ' . $block . '%<br /> |
|---|
| 4711 | ' . $char_data [CHAR_DATA_OFFSET_RESILIENCE] . '<br /> |
|---|
| 4712 | </div> |
|---|
| 4713 | </td> |
|---|
| 4714 | <td class="half_line" colspan="2" rowspan="2" align="center" width="50%"> |
|---|
| 4715 | <div class="gradient_p"> |
|---|
| 4716 | Fernkampfschaden:<br /> |
|---|
| 4717 | Kraft:<br /> |
|---|
| 4718 | Trefferwertung:<br /> |
|---|
| 4719 | Kritisch:<br /> |
|---|
| 4720 | </div> |
|---|
| 4721 | <div class="gradient_pp"> |
|---|
| 4722 | ' . $minrangeddamage . '-' . $maxrangeddamage . '<br /> |
|---|
| 4723 | ' . $char ['rangedAttackPower'] . '<br /> |
|---|
| 4724 | ' . $char_data [CHAR_DATA_OFFSET_RANGE_HIT] . '<br /> |
|---|
| 4725 | ' . $ranged_crit . '%<br /> |
|---|
| 4726 | </div> |
|---|
| 4727 | </td> |
|---|
| 4728 | <td width="1%">'; |
|---|
| 4729 | if ( ( $equiped_items [13] [1] ) ) $output .= ' |
|---|
| 4730 | <a style="padding:2px;" href="' . $item_datasite . $EQU_TRINKET1 . '" target="_blank"> |
|---|
| 4731 | <img src="' . $equiped_items [13] [1] . '" class="' . $equiped_items [13] [2] . '" alt="Trinket1" /> |
|---|
| 4732 | </a>'; |
|---|
| 4733 | else $output .= ' |
|---|
| 4734 | <img src="img/INV/INV_empty_trinket.png" class="icon_border_0" alt="empty" />'; |
|---|
| 4735 | $output .= ' |
|---|
| 4736 | </td> |
|---|
| 4737 | </tr> |
|---|
| 4738 | <tr> |
|---|
| 4739 | <td width="1%">'; |
|---|
| 4740 | if ( ( $equiped_items [9] [1] ) ) $output .= ' |
|---|
| 4741 | <a style="padding:2px;" href="' . $item_datasite . $EQU_WRIST . '" target="_blank"> |
|---|
| 4742 | <img src="' . $equiped_items [9] [1] . '" class="' . $equiped_items [9] [2] . '" alt="Wrist" /> |
|---|
| 4743 | </a>'; |
|---|
| 4744 | else $output .= ' |
|---|
| 4745 | <img src="img/INV/INV_empty_wrist.png" class="icon_border_0" alt="empty" />'; |
|---|
| 4746 | $output .= ' |
|---|
| 4747 | </td> |
|---|
| 4748 | <td width="1%">'; |
|---|
| 4749 | if ( ( $equiped_items [14] [1] ) ) $output .= ' |
|---|
| 4750 | <a style="padding:2px;" href="' . $item_datasite . $EQU_TRINKET2 . '" target="_blank"> |
|---|
| 4751 | <img src="' . $equiped_items [14] [1] . '" class="' . $equiped_items [14] [2] . '" alt="Trinket2" /> |
|---|
| 4752 | </a>'; |
|---|
| 4753 | else $output .= ' |
|---|
| 4754 | <img src="img/INV/INV_empty_trinket.png" class="icon_border_0" alt="empty" />'; |
|---|
| 4755 | $output .= ' |
|---|
| 4756 | </td> |
|---|
| 4757 | </tr> |
|---|
| 4758 | <tr> |
|---|
| 4759 | <td></td> |
|---|
| 4760 | <td width="15%">'; |
|---|
| 4761 | if ( ( $equiped_items [16] [1] ) ) $output .= ' |
|---|
| 4762 | <a style="padding:2px;" href="' . $item_datasite . $EQU_MAIN_HAND . '" target="_blank"> |
|---|
| 4763 | <img src="' . $equiped_items [16] [1] . '" class="' . $equiped_items [16] [2] . '" alt="MainHand" /> |
|---|
| 4764 | </a>'; |
|---|
| 4765 | else $output .= ' |
|---|
| 4766 | <img src="img/INV/INV_empty_main_hand.png" class="icon_border_0" alt="empty" />'; |
|---|
| 4767 | $output .= ' |
|---|
| 4768 | </td> |
|---|
| 4769 | <td width="15%">'; |
|---|
| 4770 | if ( ( $equiped_items [17] [1] ) ) $output .= ' |
|---|
| 4771 | <a style="padding:2px;" href="' . $item_datasite . $EQU_OFF_HAND . '" target="_blank"> |
|---|
| 4772 | <img src="' . $equiped_items [17] [1] . '" class="' . $equiped_items [17] [2] . '" alt="OffHand" /> |
|---|
| 4773 | </a>'; |
|---|
| 4774 | else $output .= ' |
|---|
| 4775 | <img src="img/INV/INV_empty_off_hand.png" class="icon_border_0" alt="empty" />'; |
|---|
| 4776 | $output .= ' |
|---|
| 4777 | </td> |
|---|
| 4778 | <td width="15%">'; |
|---|
| 4779 | if ( ( $equiped_items [18] [1] ) ) $output .= ' |
|---|
| 4780 | <a style="padding:2px;" href="' . $item_datasite . $EQU_RANGED . '" target="_blank"> |
|---|
| 4781 | <img src="' . $equiped_items [18] [1] . '" class="' . $equiped_items [18] [2] . '" alt="Ranged" /> |
|---|
| 4782 | </a>'; |
|---|
| 4783 | else $output .= ' |
|---|
| 4784 | <img src="img/INV/INV_empty_ranged.png" class="icon_border_0" alt="empty" />'; |
|---|
| 4785 | $output .= ' |
|---|
| 4786 | </td> |
|---|
| 4787 | <td width="15%"></td> |
|---|
| 4788 | <td></td> |
|---|
| 4789 | </tr>'; |
|---|
| 4790 | // total time played |
|---|
| 4791 | $tot_time = $char ['totaltime']; |
|---|
| 4792 | $tot_days = (int) ( $tot_time / 86400 ); |
|---|
| 4793 | $tot_time = $tot_time - ( $tot_days * 86400 ); |
|---|
| 4794 | $total_hours = (int) ( $tot_time / 3600 ); |
|---|
| 4795 | $tot_time = $tot_time - ( $total_hours * 3600 ); |
|---|
| 4796 | $total_min = (int) ( $tot_time / 60 ); |
|---|
| 4797 | |
|---|
| 4798 | $zeitmessung2 = microtime ( ); |
|---|
| 4799 | $zeittemp = explode ( " ", $zeitmessung2 ); |
|---|
| 4800 | $zeitmessung2 = $zeittemp [0] + $zeittemp [1]; // Timestamp + Nanosek |
|---|
| 4801 | $zeitmessung = $zeitmessung2 - $zeitmessung1; // Differenz der beiden |
|---|
| 4802 | // Zeiten |
|---|
| 4803 | $zeitmessung = substr ( $zeitmessung, 0, 8 ); // es wird auf 6 |
|---|
| 4804 | // Kommastellen geküzt |
|---|
| 4805 | $generated = "Generiert in: {$zeitmessung} - Speicherverbrauch: " . $this->binary_multiples ( memory_get_usage ( true ) ); |
|---|
| 4806 | |
|---|
| 4807 | $output .= ' |
|---|
| 4808 | <tr> |
|---|
| 4809 | <td colspan="6"> |
|---|
| 4810 | Gesamte Spielzeit: ' . $tot_days . ' Tage ' . $total_hours . ' Stunden ' . $total_min . ' Minuten<br> |
|---|
| 4811 | ' . $generated . ' |
|---|
| 4812 | </td> |
|---|
| 4813 | </tr>'; |
|---|
| 4814 | $output .= ' |
|---|
| 4815 | </table> |
|---|
| 4816 | </div> |
|---|
| 4817 | <br /> |
|---|
| 4818 | </div> |
|---|
| 4819 | </center>'; |
|---|
| 4820 | |
|---|
| 4821 | if ( $ajax ) $this->do_exit ( $output ); |
|---|
| 4822 | else return $output; |
|---|
| 4823 | } |
|---|
| 4824 | |
|---|
| 4825 | protected function char_friends ( $guid = 0, $ajax = false ) |
|---|
| 4826 | { |
|---|
| 4827 | if ( ! $guid || $guid == 0 || empty ( $guid ) ) { |
|---|
| 4828 | if ( $ajax ) $this->do_exit ( 'Fehler' ); |
|---|
| 4829 | else return 'Fehler!'; |
|---|
| 4830 | } |
|---|
| 4831 | |
|---|
| 4832 | $zeitmessung1 = microtime ( ); |
|---|
| 4833 | $zeittemp = explode ( " ", $zeitmessung1 ); |
|---|
| 4834 | $zeitmessung1 = $zeittemp [0] + $zeittemp [1]; // Timestamp + Nanosek |
|---|
| 4835 | |
|---|
| 4836 | |
|---|
| 4837 | // ==========================$_GET and SECURE======================== |
|---|
| 4838 | $order_by = ( isset ( $_GET ['order_by'] ) ) ? $this->quote_smart ( $_GET ['order_by'], $this->forum_db ) : 'name'; |
|---|
| 4839 | if ( preg_match ( '/^[[:lower:]]{1,6}$/', $order_by ) ); |
|---|
| 4840 | else $order_by = 'name'; |
|---|
| 4841 | |
|---|
| 4842 | $dir = ( isset ( $_GET ['dir'] ) ) ? $this->quote_smart ( $_GET ['dir'], $this->forum_db ) : 1; |
|---|
| 4843 | if ( preg_match ( '/^[01]{1}$/', $dir ) ); |
|---|
| 4844 | else $dir = 1; |
|---|
| 4845 | |
|---|
| 4846 | $order_dir = ( $dir ) ? 'ASC' : 'DESC'; |
|---|
| 4847 | $dir = ( $dir ) ? 0 : 1; |
|---|
| 4848 | // ==========================$_GET and SECURE |
|---|
| 4849 | // end======================== |
|---|
| 4850 | |
|---|
| 4851 | |
|---|
| 4852 | if ( $order_by === 'map' ) $order_by = 'map ' . $order_dir . ', zone'; |
|---|
| 4853 | elseif ( $order_by === 'zone' ) $order_by = 'zone ' . $order_dir . ', map'; |
|---|
| 4854 | |
|---|
| 4855 | // getting character data from database |
|---|
| 4856 | $result = $this->query ( "SELECT account, name, race, class, level, gender FROM `{$this->lol_conf ['db_pve_live_characters']}`.`characters` WHERE guid = {$guid} LIMIT 1", $this->forum_db ); |
|---|
| 4857 | |
|---|
| 4858 | if ( $this->num_rows ( $result ) ) { |
|---|
| 4859 | $char = $this->fetch_assoc ( $result ); |
|---|
| 4860 | |
|---|
| 4861 | $output .= '<center> |
|---|
| 4862 | <table class="hidden" style="width: 100%;"> |
|---|
| 4863 | <tr valign="top"> |
|---|
| 4864 | <td> |
|---|
| 4865 | <table class="lined" style="width: 100%;">'; |
|---|
| 4866 | |
|---|
| 4867 | $result = $this->query ( "SELECT name, race, class, map, zone, level, gender, online, account, guid FROM `{$this->lol_conf ['db_pve_live_characters']}`.`characters` WHERE guid in (SELECT friend FROM `{$this->lol_conf ['db_pve_live_characters']}`.`character_social` WHERE guid = {$guid} and flags <= 1) ORDER BY {$order_by} {$order_dir}", $this->forum_db ); |
|---|
| 4868 | |
|---|
| 4869 | if ( $this->num_rows ( $result ) ) { |
|---|
| 4870 | $output .= " |
|---|
| 4871 | <tr> |
|---|
| 4872 | <th colspan=\"7\" align=\"left\" style=\"background-image: none;\">Freunde</th> |
|---|
| 4873 | </tr> |
|---|
| 4874 | <tr> |
|---|
| 4875 | <th style=\"background-image: none;\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=15&guid={$guid}&order_by=name&dir={$dir}','get');\">Name</a></th> |
|---|
| 4876 | <th style=\"background-image: none;\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=15&guid={$guid}&order_by=race&dir={$dir}','get');\">Rasse</a></th> |
|---|
| 4877 | <th style=\"background-image: none;\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=15&guid={$guid}&order_by=class&dir={$dir}','get');\">Klasse</a></th> |
|---|
| 4878 | <th style=\"background-image: none;\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=15&guid={$guid}&order_by=level&dir={$dir}','get');\">Level</a></th> |
|---|
| 4879 | <th style=\"background-image: none;\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=15&guid={$guid}&order_by=map&dir={$dir}','get');\">Karte</a></th> |
|---|
| 4880 | <th style=\"background-image: none;\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=15&guid={$guid}&order_by=zone&dir={$dir}','get');\">Zone</a></th> |
|---|
| 4881 | <th style=\"background-image: none;\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=15&guid={$guid}&order_by=online&dir={$dir}','get');\">Online</a></th> |
|---|
| 4882 | </tr>"; |
|---|
| 4883 | |
|---|
| 4884 | while ( $data = $this->fetch_assoc ( $result ) ) { |
|---|
| 4885 | $output .= "<tr> |
|---|
| 4886 | <td>{$data ['name']}</td> |
|---|
| 4887 | <td><img src=\"img/c_icons/{$data ['race']}-{$data ['gender']}.gif\" onmousemove=\"toolTip('{$this->def['character_race'][$data ['race']][0]}', 'item_tooltip')\" onmouseout=\"toolTip()\" alt=\"\" /></td> |
|---|
| 4888 | <td><img src=\"img/c_icons/{$data ['class']}.gif\" onmousemove=\"toolTip('{$this->def['character_class'][$data ['class']]}', 'item_tooltip')\" onmouseout=\"toolTip()\" alt=\"\" /></td> |
|---|
| 4889 | <td>{$this->char_get_level_color ( $data ['level'] )}</td> |
|---|
| 4890 | <td class=\"small\"><span onmousemove=\"toolTip('MapID:{$data ['map']}', 'item_tooltip')\" onmouseout=\"toolTip()\">{$this->get_map_name ( $data ['map'] )}</span></td> |
|---|
| 4891 | <td class=\"small\"><span onmousemove=\"toolTip('ZoneID:{$data ['zone']}', 'item_tooltip')\" onmouseout=\"toolTip()\">{$this->get_zone_name ( $data ['zone'] )}</span></td> |
|---|
| 4892 | <td>" . ( ( $data ['online'] ) ? '<img src="img/up.gif" alt="" />' : '-' ) . "</td> |
|---|
| 4893 | </tr>"; |
|---|
| 4894 | } |
|---|
| 4895 | } |
|---|
| 4896 | |
|---|
| 4897 | $result = $this->query ( "SELECT name, race, class, map, zone, level, gender, online, account, guid FROM `{$this->lol_conf ['db_pve_live_characters']}`.`characters` WHERE guid in (SELECT guid FROM `{$this->lol_conf ['db_pve_live_characters']}`.`character_social` WHERE friend = {$guid} and flags <= 1) ORDER BY {$order_by} {$order_dir}", $this->forum_db ); |
|---|
| 4898 | |
|---|
| 4899 | if ( $this->num_rows ( $result ) ) { |
|---|
| 4900 | $output .= " |
|---|
| 4901 | <tr> |
|---|
| 4902 | <th colspan=\"7\" align=\"left\" style=\"background-image: none;\">Freund von</th> |
|---|
| 4903 | </tr> |
|---|
| 4904 | <tr> |
|---|
| 4905 | <th style=\"background-image: none;\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=15&guid={$guid}&order_by=name&dir={$dir}','get');\">Name</a></th> |
|---|
| 4906 | <th style=\"background-image: none;\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=15&guid={$guid}&order_by=race&dir={$dir}','get');\">Rasse</a></th> |
|---|
| 4907 | <th style=\"background-image: none;\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=15&guid={$guid}&order_by=class&dir={$dir}','get');\">Klasse</a></th> |
|---|
| 4908 | <th style=\"background-image: none;\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=15&guid={$guid}&order_by=level&dir={$dir}','get');\">Level</a></th> |
|---|
| 4909 | <th style=\"background-image: none;\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=15&guid={$guid}&order_by=map&dir={$dir}','get');\">Karte</a></th> |
|---|
| 4910 | <th style=\"background-image: none;\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=15&guid={$guid}&order_by=zone&dir={$dir}','get');\">Zone</a></th> |
|---|
| 4911 | <th style=\"background-image: none;\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=15&guid={$guid}&order_by=online&dir={$dir}','get');\">Online</a></th> |
|---|
| 4912 | </tr>"; |
|---|
| 4913 | |
|---|
| 4914 | while ( $data = $this->fetch_assoc ( $result ) ) { |
|---|
| 4915 | $output .= "<tr> |
|---|
| 4916 | <td>{$data ['name']}</td> |
|---|
| 4917 | <td><img src=\"img/c_icons/{$data ['race']}-{$data ['gender']}.gif\" onmousemove=\"toolTip('{$this->def['character_race'][$data ['race']][0]}', 'item_tooltip')\" onmouseout=\"toolTip()\" alt=\"\" /></td> |
|---|
| 4918 | <td><img src=\"img/c_icons/{$data ['class']}.gif\" onmousemove=\"toolTip('{$this->def['character_class'][$data ['class']]}', 'item_tooltip')\" onmouseout=\"toolTip()\" alt=\"\" /></td> |
|---|
| 4919 | <td>{$this->char_get_level_color ( $data ['level'] )}</td> |
|---|
| 4920 | <td class=\"small\"><span onmousemove=\"toolTip('MapID:{$data ['map']}', 'item_tooltip')\" onmouseout=\"toolTip()\">{$this->get_map_name ( $data ['map'] )}</span></td> |
|---|
| 4921 | <td class=\"small\"><span onmousemove=\"toolTip('ZoneID:{$data ['zone']}', 'item_tooltip')\" onmouseout=\"toolTip()\">{$this->get_zone_name ( $data ['zone'] )}</span></td> |
|---|
| 4922 | <td>" . ( ( $data ['online'] ) ? '<img src="img/up.gif" alt="" />' : '-' ) . "</td> |
|---|
| 4923 | </tr>"; |
|---|
| 4924 | } |
|---|
| 4925 | } |
|---|
| 4926 | |
|---|
| 4927 | $output .= ' |
|---|
| 4928 | <script type="text/javascript"> |
|---|
| 4929 | // <![CDATA[ |
|---|
| 4930 | wrap(); |
|---|
| 4931 | // ]]> |
|---|
| 4932 | </script>'; |
|---|
| 4933 | |
|---|
| 4934 | $result = $this->query ( "SELECT name, race, class, map, zone, level, gender, online, account, guid FROM `{$this->lol_conf ['db_pve_live_characters']}`.`characters` WHERE guid in (SELECT friend FROM `{$this->lol_conf ['db_pve_live_characters']}`.`character_social` WHERE guid = {$guid} and flags > 1) ORDER BY {$order_by} {$order_dir}", $this->forum_db ); |
|---|
| 4935 | |
|---|
| 4936 | if ( $this->num_rows ( $result ) ) { |
|---|
| 4937 | $output .= " |
|---|
| 4938 | <tr> |
|---|
| 4939 | <th colspan=\"7\" align=\"left\" style=\"background-image: none;\">Ignoriert</th> |
|---|
| 4940 | </tr> |
|---|
| 4941 | <tr> |
|---|
| 4942 | <th style=\"background-image: none;\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=15&guid={$guid}&order_by=name&dir={$dir}','get');\">Name</a></th> |
|---|
| 4943 | <th style=\"background-image: none;\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=15&guid={$guid}&order_by=race&dir={$dir}','get');\">Rasse</a></th> |
|---|
| 4944 | <th style=\"background-image: none;\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=15&guid={$guid}&order_by=class&dir={$dir}','get');\">Klasse</a></th> |
|---|
| 4945 | <th style=\"background-image: none;\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=15&guid={$guid}&order_by=level&dir={$dir}','get');\">Level</a></th> |
|---|
| 4946 | <th style=\"background-image: none;\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=15&guid={$guid}&order_by=map&dir={$dir}','get');\">Karte</a></th> |
|---|
| 4947 | <th style=\"background-image: none;\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=15&guid={$guid}&order_by=zone&dir={$dir}','get');\">Zone</a></th> |
|---|
| 4948 | <th style=\"background-image: none;\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=15&guid={$guid}&order_by=online&dir={$dir}','get');\">Online</a></th> |
|---|
| 4949 | </tr>"; |
|---|
| 4950 | |
|---|
| 4951 | while ( $data = $this->fetch_assoc ( $result ) ) { |
|---|
| 4952 | $output .= "<tr> |
|---|
| 4953 | <td>{$data ['name']}</td> |
|---|
| 4954 | <td><img src=\"img/c_icons/{$data ['race']}-{$data ['gender']}.gif\" onmousemove=\"toolTip('{$this->def['character_race'][$data ['race']][0]}', 'item_tooltip')\" onmouseout=\"toolTip()\" alt=\"\" /></td> |
|---|
| 4955 | <td><img src=\"img/c_icons/{$data ['class']}.gif\" onmousemove=\"toolTip('{$this->def['character_class'][$data ['class']]}', 'item_tooltip')\" onmouseout=\"toolTip()\" alt=\"\" /></td> |
|---|
| 4956 | <td>{$this->char_get_level_color ( $data ['level'] )}</td> |
|---|
| 4957 | <td class=\"small\"><span onmousemove=\"toolTip('MapID:{$data ['map']}', 'item_tooltip')\" onmouseout=\"toolTip()\">{$this->get_map_name ( $data ['map'] )}</span></td> |
|---|
| 4958 | <td class=\"small\"><span onmousemove=\"toolTip('ZoneID:{$data ['zone']}', 'item_tooltip')\" onmouseout=\"toolTip()\">{$this->get_zone_name ( $data ['zone'] )}</span></td> |
|---|
| 4959 | <td>" . ( ( $data ['online'] ) ? '<img src="img/up.gif" alt="" />' : '-' ) . "</td> |
|---|
| 4960 | </tr>"; |
|---|
| 4961 | } |
|---|
| 4962 | } |
|---|
| 4963 | |
|---|
| 4964 | $result = $this->query ( "SELECT name, race, class, map, zone, level, gender, online, account, guid FROM `{$this->lol_conf ['db_pve_live_characters']}`.`characters` WHERE guid in (SELECT guid FROM `{$this->lol_conf ['db_pve_live_characters']}`.`character_social` WHERE friend = {$guid} and flags > 1) ORDER BY {$order_by} {$order_dir}", $this->forum_db ); |
|---|
| 4965 | |
|---|
| 4966 | if ( $this->num_rows ( $result ) ) { |
|---|
| 4967 | $output .= " |
|---|
| 4968 | <tr> |
|---|
| 4969 | <th colspan=\"7\" align=\"left\" style=\"background-image: none;\">Ignoriert von</th> |
|---|
| 4970 | </tr> |
|---|
| 4971 | <tr> |
|---|
| 4972 | <th style=\"background-image: none;\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=15&guid={$guid}&order_by=name&dir={$dir}','get');\">Name</a></th> |
|---|
| 4973 | <th style=\"background-image: none;\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=15&guid={$guid}&order_by=race&dir={$dir}','get');\">Rasse</a></th> |
|---|
| 4974 | <th style=\"background-image: none;\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=15&guid={$guid}&order_by=class&dir={$dir}','get');\">Klasse</a></th> |
|---|
| 4975 | <th style=\"background-image: none;\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=15&guid={$guid}&order_by=level&dir={$dir}','get');\">Level</a></th> |
|---|
| 4976 | <th style=\"background-image: none;\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=15&guid={$guid}&order_by=map&dir={$dir}','get');\">Karte</a></th> |
|---|
| 4977 | <th style=\"background-image: none;\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=15&guid={$guid}&order_by=zone&dir={$dir}','get');\">Zone</a></th> |
|---|
| 4978 | <th style=\"background-image: none;\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=15&guid={$guid}&order_by=online&dir={$dir}','get');\">Online</a></th> |
|---|
| 4979 | </tr>"; |
|---|
| 4980 | while ( $data = $this->fetch_assoc ( $result ) ) { |
|---|
| 4981 | $output .= "<tr> |
|---|
| 4982 | <td>{$data ['name']}</td> |
|---|
| 4983 | <td><img src=\"img/c_icons/{$data ['race']}-{$data ['gender']}.gif\" onmousemove=\"toolTip('{$this->def['character_race'][$data ['race']][0]}', 'item_tooltip')\" onmouseout=\"toolTip()\" alt=\"\" /></td> |
|---|
| 4984 | <td><img src=\"img/c_icons/{$data ['class']}.gif\" onmousemove=\"toolTip('{$this->def['character_class'][$data ['class']]}', 'item_tooltip')\" onmouseout=\"toolTip()\" alt=\"\" /></td> |
|---|
| 4985 | <td>{$this->char_get_level_color ( $data ['level'] )}</td> |
|---|
| 4986 | <td class=\"small\"><span onmousemove=\"toolTip('MapID:{$data ['map']}', 'item_tooltip')\" onmouseout=\"toolTip()\">{$this->get_map_name ( $data ['map'] )}</span></td> |
|---|
| 4987 | <td class=\"small\"><span onmousemove=\"toolTip('ZoneID:'{$data ['zone']}', 'item_tooltip')\" onmouseout=\"toolTip()\">{$this->get_zone_name ( $data ['zone'] )}</span></td> |
|---|
| 4988 | <td>" . ( ( $data ['online'] ) ? '<img src="img/up.gif" alt="" />' : '-' ) . "</td> |
|---|
| 4989 | </tr>"; |
|---|
| 4990 | } |
|---|
| 4991 | } |
|---|
| 4992 | $output .= ' |
|---|
| 4993 | </table> |
|---|
| 4994 | </td>'; |
|---|
| 4995 | $zeitmessung2 = microtime ( ); |
|---|
| 4996 | $zeittemp = explode ( " ", $zeitmessung2 ); |
|---|
| 4997 | $zeitmessung2 = $zeittemp [0] + $zeittemp [1]; // Timestamp + |
|---|
| 4998 | // Nanosek |
|---|
| 4999 | $zeitmessung = $zeitmessung2 - $zeitmessung1; // Differenz der |
|---|
| 5000 | // beiden Zeiten |
|---|
| 5001 | $zeitmessung = substr ( $zeitmessung, 0, 8 ); // es wird auf 6 |
|---|
| 5002 | // Kommastellen geküzt |
|---|
| 5003 | $generated = "Generiert in: {$zeitmessung} - Speicherverbrauch: " . $this->binary_multiples ( memory_get_usage ( true ) ); |
|---|
| 5004 | // ---------------Page Specific Data Ends |
|---|
| 5005 | // here---------------------------- |
|---|
| 5006 | // ---------------Character Tabs |
|---|
| 5007 | // Footer----------------------------------- |
|---|
| 5008 | $output .= "</tr> |
|---|
| 5009 | <tr><td>{$generated}</td></tr> |
|---|
| 5010 | </table></center>"; |
|---|
| 5011 | } |
|---|
| 5012 | |
|---|
| 5013 | if ( $ajax ) $this->do_exit ( $output ); |
|---|
| 5014 | else return empty ( $output ) ? 'Keine Freunde gefunden' : $output; |
|---|
| 5015 | } |
|---|
| 5016 | |
|---|
| 5017 | protected function char_skills ( $guid = 0, $ajax = false ) |
|---|
| 5018 | { |
|---|
| 5019 | |
|---|
| 5020 | if ( ! $guid || $guid == 0 || empty ( $guid ) ) { |
|---|
| 5021 | if ( $ajax ) $this->do_exit ( 'Fehler' ); |
|---|
| 5022 | else return 'Fehler!'; |
|---|
| 5023 | } |
|---|
| 5024 | |
|---|
| 5025 | $zeitmessung1 = microtime ( ); |
|---|
| 5026 | $zeittemp = explode ( " ", $zeitmessung1 ); |
|---|
| 5027 | $zeitmessung1 = $zeittemp [0] + $zeittemp [1]; |
|---|
| 5028 | |
|---|
| 5029 | $skill_datasite = 'http://loldb.landoflegends.de/?skill='; |
|---|
| 5030 | $output = ''; |
|---|
| 5031 | |
|---|
| 5032 | $order_by = ( isset ( $_GET ['order_by'] ) ) ? $this->quote_smart ( $_GET ['order_by'], $this->forum_db ) : 1; |
|---|
| 5033 | |
|---|
| 5034 | $dir = ( isset ( $_GET ['dir'] ) ) ? $this->quote_smart ( $_GET ['dir'], $this->forum_db ) : 1; |
|---|
| 5035 | if ( preg_match ( '/^[01]{1}$/', $dir ) ); |
|---|
| 5036 | else $dir = 1; |
|---|
| 5037 | |
|---|
| 5038 | $order_dir = ( $dir ) ? 'ASC' : 'DESC'; |
|---|
| 5039 | $dir = ( $dir ) ? 0 : 1; |
|---|
| 5040 | |
|---|
| 5041 | $result = $this->query ( "SELECT account, name, race, class, level, gender FROM `{$this->lol_conf ['db_pve_live_characters']}`.`characters` WHERE guid = {$guid} LIMIT 1", $this->forum_db ); |
|---|
| 5042 | |
|---|
| 5043 | if ( $this->num_rows ( $result ) ) { |
|---|
| 5044 | $char = $this->fetch_assoc ( $result ); |
|---|
| 5045 | |
|---|
| 5046 | $result = $this->query ( "SELECT name, race, class, level, gender FROM `{$this->lol_conf ['db_pve_live_characters']}`.`characters` WHERE guid = {$guid}", $this->forum_db ); |
|---|
| 5047 | $char = $this->fetch_assoc ( $result ); |
|---|
| 5048 | |
|---|
| 5049 | $output .= "<center> |
|---|
| 5050 | <table class=\"lined\" style=\"width: 100%;\"> |
|---|
| 5051 | <tr> |
|---|
| 5052 | <th class=\"title\" style=\"background-image: none;\" colspan=\"3\" align=\"left\">Fertigkeiten</th> |
|---|
| 5053 | </tr> |
|---|
| 5054 | <tr> |
|---|
| 5055 | <th style=\"background-image: none;\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=16&guid={$guid}&order_by=0&dir={$dir}','get');\">ID</a></th> |
|---|
| 5056 | <th style=\"background-image: none;\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=16&guid={$guid}&order_by=1&dir={$dir}','get');\">Name</a></th> |
|---|
| 5057 | <th style=\"background-image: none;\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=16&guid={$guid}&order_by=2&dir={$dir}','get');\">Wert</a></th> |
|---|
| 5058 | </tr>"; |
|---|
| 5059 | |
|---|
| 5060 | $skill_array = array (); |
|---|
| 5061 | $class_array = array (); |
|---|
| 5062 | $prof_1_array = array (); |
|---|
| 5063 | $prof_2_array = array (); |
|---|
| 5064 | $weapon_array = array (); |
|---|
| 5065 | $armor_array = array (); |
|---|
| 5066 | $language_array = array (); |
|---|
| 5067 | |
|---|
| 5068 | $skill_rank_array = array ( 75 => 'Lehrling', 150 => 'Geselle', 225 => 'Experte', 300 => 'Fachmann', 375 => 'Meister', 450 => 'Großmeister' ); |
|---|
| 5069 | |
|---|
| 5070 | $result = $this->query ( "SELECT skill, value, max FROM `{$this->lol_conf ['db_pve_live_characters']}`.`character_skills` WHERE guid = {$guid}", $this->forum_db ); |
|---|
| 5071 | |
|---|
| 5072 | while ( $char_skill = $this->fetch_assoc ( $result ) ) { |
|---|
| 5073 | $temp = $char_skill ['value']; |
|---|
| 5074 | $skill = $char_skill ['skill']; |
|---|
| 5075 | $max = $char_skill ['max']; |
|---|
| 5076 | |
|---|
| 5077 | if ( $this->skill_get_type ( $skill ) == 6 ) array_push ( $weapon_array, array ( $skill, $this->skill_get_name ( $skill ), $temp, $max ) ); |
|---|
| 5078 | elseif ( $this->skill_get_type ( $skill ) == 7 ) array_push ( $class_array, array ( $skill, $this->skill_get_name ( $skill ), $temp, $max ) ); |
|---|
| 5079 | elseif ( $this->skill_get_type ( $skill ) == 8 ) array_push ( $armor_array, array ( $skill, $this->skill_get_name ( $skill ), $temp, $max ) ); |
|---|
| 5080 | elseif ( $this->skill_get_type ( $skill ) == 9 ) array_push ( $prof_2_array, array ( $skill, $this->skill_get_name ( $skill ), $temp, $max ) ); |
|---|
| 5081 | elseif ( $this->skill_get_type ( $skill ) == 10 ) array_push ( $language_array, array ( $skill, $this->skill_get_name ( $skill ), $temp, $max ) ); |
|---|
| 5082 | elseif ( $this->skill_get_type ( $skill ) == 11 ) array_push ( $prof_1_array, array ( $skill, $this->skill_get_name ( $skill ), $temp, $max ) ); |
|---|
| 5083 | else array_push ( $skill_array, array ( $skill, $this->skill_get_name ( $skill ), $temp, $max ) ); |
|---|
| 5084 | } |
|---|
| 5085 | unset ( $char_skill ); |
|---|
| 5086 | |
|---|
| 5087 | $this->aasort ( $skill_array, $order_by, $dir ); |
|---|
| 5088 | $this->aasort ( $class_array, $order_by, $dir ); |
|---|
| 5089 | $this->aasort ( $prof_1_array, $order_by, $dir ); |
|---|
| 5090 | $this->aasort ( $prof_2_array, $order_by, $dir ); |
|---|
| 5091 | $this->aasort ( $weapon_array, $order_by, $dir ); |
|---|
| 5092 | $this->aasort ( $armor_array, $order_by, $dir ); |
|---|
| 5093 | $this->aasort ( $language_array, $order_by, $dir ); |
|---|
| 5094 | |
|---|
| 5095 | foreach ( $skill_array as $data ) { |
|---|
| 5096 | $output .= "<tr> |
|---|
| 5097 | <td>{$data [0]}</td> |
|---|
| 5098 | <td align=\"right\">{$data [1]}</td> |
|---|
| 5099 | <td valign=\"center\" class=\"bar skill_bar\" style=\"background-position: " . ( round ( 450 * $data [2] / $data [3] ) - 450 ) . "px;\"> |
|---|
| 5100 | <span>{$data [2]}/{$data [3]}</span> |
|---|
| 5101 | </td> |
|---|
| 5102 | </tr>"; |
|---|
| 5103 | } |
|---|
| 5104 | |
|---|
| 5105 | if ( count ( $class_array ) ) $output .= ' |
|---|
| 5106 | <tr> |
|---|
| 5107 | <th class="title" colspan="3" align="left" style="background-image: none;">Klassenfertigkeiten</th> |
|---|
| 5108 | </tr>'; |
|---|
| 5109 | |
|---|
| 5110 | foreach ( $class_array as $data ) { |
|---|
| 5111 | $output .= "<tr> |
|---|
| 5112 | <td>{$data [0]}</td> |
|---|
| 5113 | <td align=\"right\">{$data [1]}</td> |
|---|
| 5114 | <td valign=\"center\" class=\"bar skill_bar\" style=\"background-position: 0px;\"> |
|---|
| 5115 | </td> |
|---|
| 5116 | </tr>"; |
|---|
| 5117 | } |
|---|
| 5118 | |
|---|
| 5119 | if ( count ( $prof_1_array ) ) $output .= ' |
|---|
| 5120 | <tr> |
|---|
| 5121 | <th class="title" colspan="3" align="left" style="background-image: none;">Berufe</th> |
|---|
| 5122 | </tr>'; |
|---|
| 5123 | |
|---|
| 5124 | foreach ( $prof_1_array as $data ) |
|---|
| 5125 | $output .= "<tr> |
|---|
| 5126 | <td>{$data [0]}</td> |
|---|
| 5127 | <td align=\"right\">{$data [1]}</td> |
|---|
| 5128 | <td valign=\"center\" class=\"bar skill_bar\" style=\"background-position: " . ( round ( 450 * $data [2] / $data [3] ) - 450 ) . "px;\"> |
|---|
| 5129 | <span>{$data [2]}/{$data [3]} ({$skill_rank_array [$data [3]]})</span> |
|---|
| 5130 | </td> |
|---|
| 5131 | </tr>"; |
|---|
| 5132 | |
|---|
| 5133 | if ( count ( $prof_2_array ) ) $output .= ' |
|---|
| 5134 | <tr> |
|---|
| 5135 | <th class="title" colspan="3" align="left" style="background-image: none;">Sekundäre Fertigkeiten</th> |
|---|
| 5136 | </tr>'; |
|---|
| 5137 | foreach ( $prof_2_array as $data ) |
|---|
| 5138 | $output .= "<tr> |
|---|
| 5139 | <td>{$data [0]}</td> |
|---|
| 5140 | <td align=\"right\">{$data [1]}</td> |
|---|
| 5141 | <td valign=\"center\" class=\"bar skill_bar\" style=\"background-position: " . ( round ( 450 * $data [2] / $data [3] ) - 450 ) . "px;\"> |
|---|
| 5142 | <span>{$data [2]}/{$data [3]} ({$skill_rank_array [$data [3]]})</span> |
|---|
| 5143 | </td> |
|---|
| 5144 | </tr>"; |
|---|
| 5145 | |
|---|
| 5146 | if ( count ( $weapon_array ) ) $output .= ' |
|---|
| 5147 | <tr> |
|---|
| 5148 | <th class="title" colspan="3" align="left" style="background-image: none;">Waffenfertigkeiten</th> |
|---|
| 5149 | </tr>'; |
|---|
| 5150 | |
|---|
| 5151 | foreach ( $weapon_array as $data ) |
|---|
| 5152 | $output .= "<tr> |
|---|
| 5153 | <td>{$data [0]}</td> |
|---|
| 5154 | <td align=\"right\">{$data [1]}</td> |
|---|
| 5155 | <td valign=\"center\" class=\"bar skill_bar\" style=\"background-position: " . ( round ( 450 * $data [2] / $data [3] ) - 450 ) . "px;\"> |
|---|
| 5156 | <span>{$data [2]}/{$data [3]}</span> |
|---|
| 5157 | </td> |
|---|
| 5158 | </tr>"; |
|---|
| 5159 | |
|---|
| 5160 | if ( count ( $armor_array ) ) $output .= ' |
|---|
| 5161 | <tr> |
|---|
| 5162 | <th class="title" colspan="3" align="left" style="background-image: none;">Rüstungssachverstand</th> |
|---|
| 5163 | </tr>'; |
|---|
| 5164 | |
|---|
| 5165 | foreach ( $armor_array as $data ) |
|---|
| 5166 | $output .= "<tr> |
|---|
| 5167 | <td>{$data [0]}</td> |
|---|
| 5168 | <td align=\"right\">{$data [1]}</td> |
|---|
| 5169 | <td valign=\"center\" class=\"bar skill_bar\" style=\"background-position: 0px;\"> |
|---|
| 5170 | </td> |
|---|
| 5171 | </tr>"; |
|---|
| 5172 | |
|---|
| 5173 | if ( count ( $language_array ) ) $output .= ' |
|---|
| 5174 | <tr> |
|---|
| 5175 | <th class="title" colspan="3" align="left" style="background-image: none;">Sprachen</th> |
|---|
| 5176 | </tr>'; |
|---|
| 5177 | |
|---|
| 5178 | foreach ( $language_array as $data ) |
|---|
| 5179 | $output .= "<tr> |
|---|
| 5180 | <td>{$data [0]}</td> |
|---|
| 5181 | <td align=\"right\">" . str_ireplace ( 'Sprache: ', '', $data [1] ) . "</td> |
|---|
| 5182 | <td valign=\"center\" class=\"bar skill_bar\" style=\"background-position: " . ( round ( 450 * $data [2] / $data [3] ) - 450 ) . "px;\"> |
|---|
| 5183 | <span>{$data [2]}/{$data [3]}</span> |
|---|
| 5184 | </td> |
|---|
| 5185 | </tr>"; |
|---|
| 5186 | $zeitmessung2 = microtime ( ); |
|---|
| 5187 | $zeittemp = explode ( " ", $zeitmessung2 ); |
|---|
| 5188 | $zeitmessung2 = $zeittemp [0] + $zeittemp [1]; // Timestamp + |
|---|
| 5189 | // Nanosek |
|---|
| 5190 | $zeitmessung = $zeitmessung2 - $zeitmessung1; // Differenz der |
|---|
| 5191 | // beiden Zeiten |
|---|
| 5192 | $zeitmessung = substr ( $zeitmessung, 0, 8 ); // es wird auf 6 |
|---|
| 5193 | // Kommastellen geküzt |
|---|
| 5194 | $generated = "Generiert in: {$zeitmessung} - Speicherverbrauch: " . $this->binary_multiples ( memory_get_usage ( true ) ); |
|---|
| 5195 | |
|---|
| 5196 | $output .= " |
|---|
| 5197 | <tr> |
|---|
| 5198 | <td colspan=\"3\" align=\"center\">{$generated}</td> |
|---|
| 5199 | </tr> |
|---|
| 5200 | </table> |
|---|
| 5201 | </center>"; |
|---|
| 5202 | } |
|---|
| 5203 | |
|---|
| 5204 | if ( $ajax ) $this->do_exit ( $output ); |
|---|
| 5205 | else return empty ( $output ) ? 'Keine Skills gefunden' : $output; |
|---|
| 5206 | } |
|---|
| 5207 | |
|---|
| 5208 | protected function char_inv ( $guid = 0, $ajax = false ) |
|---|
| 5209 | { |
|---|
| 5210 | if ( ! $guid || $guid == 0 || empty ( $guid ) ) { |
|---|
| 5211 | if ( $ajax ) $this->do_exit ( 'Fehler' ); |
|---|
| 5212 | else return 'Fehler!'; |
|---|
| 5213 | } |
|---|
| 5214 | |
|---|
| 5215 | $zeitmessung1 = microtime ( ); |
|---|
| 5216 | $zeittemp = explode ( " ", $zeitmessung1 ); |
|---|
| 5217 | $zeitmessung1 = $zeittemp [0] + $zeittemp [1]; |
|---|
| 5218 | |
|---|
| 5219 | $item_datasite = 'http://loldb.landoflegends.de/?item='; |
|---|
| 5220 | $output = ''; |
|---|
| 5221 | |
|---|
| 5222 | // getting character data from database |
|---|
| 5223 | $result = $this->query ( "SELECT account, name, race, class, level, gender, money FROM `{$this->lol_conf ['db_pve_live_characters']}`.`characters` WHERE guid = {$guid} LIMIT 1", $this->forum_db ); |
|---|
| 5224 | |
|---|
| 5225 | // no point going further if character does not exist |
|---|
| 5226 | if ( $this->num_rows ( $result ) ) { |
|---|
| 5227 | $char = $this->fetch_assoc ( $result ); |
|---|
| 5228 | |
|---|
| 5229 | // main data that we need for this page, character inventory |
|---|
| 5230 | $result = $this->query ( "SELECT ci.bag, ci.slot, ci.item, ii.itemEntry, count as stack_count FROM `{$this->lol_conf ['db_pve_live_characters']}`.`character_inventory` ci INNER JOIN `{$this->lol_conf ['db_pve_live_characters']}`.`item_instance` ii on ii.guid = ci.item WHERE ci.guid = {$guid} ORDER BY ci.bag,ci.slot", $this->forum_db ); |
|---|
| 5231 | |
|---|
| 5232 | // ---------------Page Specific Data Starts |
|---|
| 5233 | // Here-------------------------- |
|---|
| 5234 | // lets start processing first before we display anything |
|---|
| 5235 | // we have lots to do for inventory |
|---|
| 5236 | |
|---|
| 5237 | |
|---|
| 5238 | // character bags, 1 main + 4 additional |
|---|
| 5239 | $bag = array ( 0 => array (), 1 => array (), 2 => array (), 3 => array (), 4 => array () ); |
|---|
| 5240 | |
|---|
| 5241 | // character bang, 1 main + 7 additional |
|---|
| 5242 | $bank = array ( 0 => array (), 1 => array (), 2 => array (), 3 => array (), 4 => array (), 5 => array (), 6 => array (), 7 => array () ); |
|---|
| 5243 | |
|---|
| 5244 | // this is where we will put items that are in main bag |
|---|
| 5245 | $bag_id = array (); |
|---|
| 5246 | // this is where we will put items that are in main bank |
|---|
| 5247 | $bank_bag_id = array (); |
|---|
| 5248 | // this is where we will put items that are in character bags, 4 |
|---|
| 5249 | // arrays, 1 for each |
|---|
| 5250 | $equiped_bag_id = array ( 0, 0, 0, 0, 0 ); |
|---|
| 5251 | // this is where we will put items that are in bank bangs, 7 arrays, |
|---|
| 5252 | // 1 for each |
|---|
| 5253 | $equip_bnk_bag_id = array ( 0, 0, 0, 0, 0, 0, 0, 0 ); |
|---|
| 5254 | |
|---|
| 5255 | // we load the things in each bag slot |
|---|
| 5256 | while ( $slot = $this->fetch_assoc ( $result ) ) { |
|---|
| 5257 | if ( $slot ['bag'] == 0 && $slot ['slot'] > 18 ) { |
|---|
| 5258 | if ( $slot ['slot'] < 23 ) { |
|---|
| 5259 | $bag_id [$slot ['item']] = ( $slot ['slot'] - 18 ); |
|---|
| 5260 | $equiped_bag_id [$slot ['slot'] - 18] = array ( $slot ['itemEntry'], $this->result ( $this->query ( "SELECT ContainerSlots FROM `{$this->lol_conf ['db_pve_live_world']}`.`item_template` WHERE entry = {$slot ['itemEntry']}", $this->forum_db ) ), $slot ['stack_count'] ); |
|---|
| 5261 | } |
|---|
| 5262 | elseif ( $slot ['slot'] < 39 ) { |
|---|
| 5263 | if ( isset ( $bag [0] [$slot ['slot'] - 23] ) ) $bag [0] [$slot ['slot'] - 23] [0] ++; |
|---|
| 5264 | else $bag [0] [$slot ['slot'] - 23] = array ( $slot ['itemEntry'], 0, $slot ['stack_count'] ); |
|---|
| 5265 | } |
|---|
| 5266 | elseif ( $slot ['slot'] < 67 ) $bank [0] [$slot ['slot'] - 39] = array ( $slot ['itemEntry'], 0, $slot ['stack_count'] ); |
|---|
| 5267 | elseif ( $slot ['slot'] < 74 ) { |
|---|
| 5268 | $bank_bag_id [$slot ['item']] = ( $slot ['slot'] - 66 ); |
|---|
| 5269 | $equip_bnk_bag_id [$slot ['slot'] - 66] = array ( $slot ['itemEntry'], $this->result ( $this->query ( "SELECT ContainerSlots FROM `{$this->lol_conf ['db_pve_live_world']}`.`item_template` WHERE entry = {$slot ['itemEntry']}", $this->forum_db ) ), $slot ['stack_count'] ); |
|---|
| 5270 | } |
|---|
| 5271 | } |
|---|
| 5272 | else { |
|---|
| 5273 | // Bags |
|---|
| 5274 | if ( isset ( $bag_id [$slot ['bag']] ) ) { |
|---|
| 5275 | if ( isset ( $bag [$bag_id [$slot ['bag']]] [$slot ['slot']] ) ) $bag [$bag_id [$slot ['bag']]] [$slot ['slot']] [1] ++; |
|---|
| 5276 | else $bag [$bag_id [$slot ['bag']]] [$slot ['slot']] = array ( $slot ['itemEntry'], 0, $slot ['stack_count'] ); |
|---|
| 5277 | } |
|---|
| 5278 | // Bank Bags |
|---|
| 5279 | elseif ( isset ( $bank_bag_id [$slot ['bag']] ) ) $bank [$bank_bag_id [$slot ['bag']]] [$slot ['slot']] = array ( $slot ['itemEntry'], 0, $slot ['stack_count'] ); |
|---|
| 5280 | } |
|---|
| 5281 | } |
|---|
| 5282 | unset ( $slot ); |
|---|
| 5283 | unset ( $bag_id ); |
|---|
| 5284 | unset ( $bank_bag_id ); |
|---|
| 5285 | unset ( $result ); |
|---|
| 5286 | |
|---|
| 5287 | $output .= '<center> |
|---|
| 5288 | <table class="lined" style="width: 700px"> |
|---|
| 5289 | <tr>'; |
|---|
| 5290 | |
|---|
| 5291 | // equipped bags |
|---|
| 5292 | for ( $i = 1; $i < 5; ++ $i ) { |
|---|
| 5293 | $output .= ' |
|---|
| 5294 | <th style="background-image: none;">'; |
|---|
| 5295 | if ( $equiped_bag_id [$i] ) $output .= ' |
|---|
| 5296 | <a style="padding:2px;" href="' . $item_datasite . $equiped_bag_id [$i] [0] . '" target="_blank"> |
|---|
| 5297 | <img class="bag_icon" src="' . $this->get_item_icon ( $equiped_bag_id [$i] [0] ) . '" alt="" /> |
|---|
| 5298 | </a> |
|---|
| 5299 | Tasche ' . $i . '<br /> |
|---|
| 5300 | <font class="small">' . $equiped_bag_id [$i] [1] . ' Slots</font>'; |
|---|
| 5301 | $output .= ' |
|---|
| 5302 | </th>'; |
|---|
| 5303 | } |
|---|
| 5304 | $output .= ' |
|---|
| 5305 | </tr> |
|---|
| 5306 | <tr>'; |
|---|
| 5307 | |
|---|
| 5308 | // equipped bag slots |
|---|
| 5309 | for ( $t = 1; $t < 5; ++ $t ) { |
|---|
| 5310 | $output .= ' |
|---|
| 5311 | <td class="bag" valign="bottom" align="center"> |
|---|
| 5312 | <div style="width:' . ( 4 * 43 ) . 'px;height:' . ( ceil ( $equiped_bag_id [$t] [1] / 4 ) * 41 ) . 'px;">'; |
|---|
| 5313 | $dsp = $equiped_bag_id [$t] [1] % 4; |
|---|
| 5314 | if ( $dsp ) $output .= ' |
|---|
| 5315 | <div class="no_slot"></div>'; |
|---|
| 5316 | foreach ( $bag [$t] as $pos => $item ) { |
|---|
| 5317 | $item [2] = $item [2] == 1 ? '' : $item [2]; |
|---|
| 5318 | $output .= ' |
|---|
| 5319 | <div style="left:' . ( ( $pos + $dsp ) % 4 * 42 ) . 'px;top:' . ( floor ( ( $pos + $dsp ) / 4 ) * 41 ) . 'px;"> |
|---|
| 5320 | <a style="padding:2px;" href="' . $item_datasite . $item [0] . '" target="_blank"> |
|---|
| 5321 | <img src="' . $this->get_item_icon ( $item [0] ) . '" alt="" /> |
|---|
| 5322 | </a> |
|---|
| 5323 | <div style="width:25px;margin:-20px 0px 0px 18px;color: black; font-size:14px">' . $item [2] . '</div> |
|---|
| 5324 | <div style="width:25px;margin:-21px 0px 0px 17px;font-size:14px">' . $item [2] . '</div> |
|---|
| 5325 | </div>'; |
|---|
| 5326 | } |
|---|
| 5327 | $output .= ' |
|---|
| 5328 | </div> |
|---|
| 5329 | </td>'; |
|---|
| 5330 | } |
|---|
| 5331 | unset ( $equiped_bag_id ); |
|---|
| 5332 | $output .= ' |
|---|
| 5333 | </tr> |
|---|
| 5334 | <tr> |
|---|
| 5335 | <th colspan="2" align="left" style="background-image: none;"> |
|---|
| 5336 | <img class="bag_icon" src="' . $this->get_item_icon ( 3960 ) . '" alt="" align="middle" style="margin-left:100px;" /> |
|---|
| 5337 | <font style="margin-left:30px;">Rucksack</font> |
|---|
| 5338 | </th> |
|---|
| 5339 | <th colspan="2" style="background-image: none;">Bankinhalt</th> |
|---|
| 5340 | </tr> |
|---|
| 5341 | <tr> |
|---|
| 5342 | <td colspan="2" class="bag" align="center" height="220px"> |
|---|
| 5343 | <div style="width:' . ( 4 * 43 ) . 'px;height:' . ( ceil ( 16 / 4 ) * 41 ) . 'px;">'; |
|---|
| 5344 | |
|---|
| 5345 | // inventory items |
|---|
| 5346 | foreach ( $bag [0] as $pos => $item ) { |
|---|
| 5347 | $item [2] = $item [2] == 1 ? '' : $item [2]; |
|---|
| 5348 | $output .= ' |
|---|
| 5349 | <div style="left:' . ( $pos % 4 * 42 ) . 'px;top:' . ( floor ( $pos / 4 ) * 41 ) . 'px;"> |
|---|
| 5350 | <a style="padding:2px;" href="' . $item_datasite . $item [0] . '" target="_blank"> |
|---|
| 5351 | <img src="' . $this->get_item_icon ( $item [0] ) . '" alt="" /> |
|---|
| 5352 | </a> |
|---|
| 5353 | <div style="width:25px;margin:-20px 0px 0px 18px;color: black; font-size:14px\">' . $item [2] . '</div> |
|---|
| 5354 | <div style="width:25px;margin:-21px 0px 0px 17px;font-size:14px">' . $item [2] . '</div> |
|---|
| 5355 | </div>'; |
|---|
| 5356 | } |
|---|
| 5357 | unset ( $bag ); |
|---|
| 5358 | $output .= ' |
|---|
| 5359 | </div> |
|---|
| 5360 | <div style="text-align:right;width:168px;background-image:none;background-color:#393936;padding:2px;"> |
|---|
| 5361 | <b> |
|---|
| 5362 | ' . substr ( $char ['money'], 0, - 4 ) . '<img src="img/gold.gif" alt="" align="middle" /> |
|---|
| 5363 | ' . substr ( $char ['money'], - 4, - 2 ) . '<img src="img/silver.gif" alt="" align="middle" /> |
|---|
| 5364 | ' . substr ( $char ['money'], - 2 ) . '<img src="img/copper.gif" alt="" align="middle" /> |
|---|
| 5365 | </b> |
|---|
| 5366 | </div> |
|---|
| 5367 | </td> |
|---|
| 5368 | <td colspan="2" class="bank" align="center"> |
|---|
| 5369 | <div style="width:' . ( 7 * 43 ) . 'px;height:' . ( ceil ( 24 / 7 ) * 41 ) . 'px;">'; |
|---|
| 5370 | |
|---|
| 5371 | // bank items |
|---|
| 5372 | foreach ( $bank [0] as $pos => $item ) { |
|---|
| 5373 | $item [2] = $item [2] == 1 ? '' : $item [2]; |
|---|
| 5374 | $output .= ' |
|---|
| 5375 | <div style="left:' . ( $pos % 7 * 43 ) . 'px;top:' . ( floor ( $pos / 7 ) * 41 ) . 'px;"> |
|---|
| 5376 | <a style="padding:2px;" href="' . $item_datasite . $item [0] . '" target="_blank"> |
|---|
| 5377 | <img src="' . $this->get_item_icon ( $item [0] ) . '" class="inv_icon" alt="" /> |
|---|
| 5378 | </a> |
|---|
| 5379 | <div style="width:25px;margin:-20px 0px 0px 18px;color: black; font-size:14px">' . $item [2] . '</div> |
|---|
| 5380 | <div style="width:25px;margin:-21px 0px 0px 17px;font-size:14px">' . $item [2] . '</div> |
|---|
| 5381 | </div>'; |
|---|
| 5382 | } |
|---|
| 5383 | $output .= ' |
|---|
| 5384 | </div> |
|---|
| 5385 | </td> |
|---|
| 5386 | </tr> |
|---|
| 5387 | <tr>'; |
|---|
| 5388 | |
|---|
| 5389 | // equipped bank bags, first 4 |
|---|
| 5390 | for ( $i = 1; $i < 5; ++ $i ) { |
|---|
| 5391 | $output .= ' |
|---|
| 5392 | <th style="background-image: none;">'; |
|---|
| 5393 | if ( $equip_bnk_bag_id [$i] ) { |
|---|
| 5394 | $output .= ' |
|---|
| 5395 | <a style="padding:2px;" href="' . $item_datasite . $equip_bnk_bag_id [$i] [0] . '" target="_blank"> |
|---|
| 5396 | <img class="bag_icon" src="' . $this->get_item_icon ( $equip_bnk_bag_id [$i] [0] ) . '" alt="" /> |
|---|
| 5397 | </a> |
|---|
| 5398 | Tasche ' . $i . '<br /> |
|---|
| 5399 | <font class="small">' . $equip_bnk_bag_id [$i] [1] . ' Slots</font>'; |
|---|
| 5400 | } |
|---|
| 5401 | $output .= ' |
|---|
| 5402 | </th>'; |
|---|
| 5403 | } |
|---|
| 5404 | $output .= ' |
|---|
| 5405 | </tr> |
|---|
| 5406 | <tr>'; |
|---|
| 5407 | |
|---|
| 5408 | // equipped bank bag slots |
|---|
| 5409 | for ( $t = 1; $t < 8; ++ $t ) { |
|---|
| 5410 | // equipped bank bags, last 3 |
|---|
| 5411 | if ( $t === 5 ) { |
|---|
| 5412 | $output .= ' |
|---|
| 5413 | </tr> |
|---|
| 5414 | <tr>'; |
|---|
| 5415 | for ( $i = 5; $i < 8; ++ $i ) { |
|---|
| 5416 | $output .= ' |
|---|
| 5417 | <th style="background-image: none;">'; |
|---|
| 5418 | if ( $equip_bnk_bag_id [$i] ) { |
|---|
| 5419 | $output .= ' |
|---|
| 5420 | <a style="padding:2px;" href="' . $item_datasite . $equip_bnk_bag_id [$i] [0] . '" target="_blank"> |
|---|
| 5421 | <img class="bag_icon" src="' . $this->get_item_icon ( $equip_bnk_bag_id [$i] [0] ) . '" alt="" /> |
|---|
| 5422 | </a> |
|---|
| 5423 | Tasche ' . $i . '<br /> |
|---|
| 5424 | <font class="small">' . $equip_bnk_bag_id [$i] [1] . ' Slots</font>'; |
|---|
| 5425 | } |
|---|
| 5426 | $output .= ' |
|---|
| 5427 | </th>'; |
|---|
| 5428 | } |
|---|
| 5429 | $output .= ' |
|---|
| 5430 | <th style="background-image: none;"> |
|---|
| 5431 | </th> |
|---|
| 5432 | </tr> |
|---|
| 5433 | <tr>'; |
|---|
| 5434 | } |
|---|
| 5435 | $output .= ' |
|---|
| 5436 | <td class="bank" align="center"> |
|---|
| 5437 | <div style="width:' . ( 4 * 43 ) . 'px;height:' . ( ceil ( $equip_bnk_bag_id [$t] [1] / 4 ) * 41 ) . 'px;">'; |
|---|
| 5438 | $dsp = $equip_bnk_bag_id [$t] [1] % 4; |
|---|
| 5439 | |
|---|
| 5440 | if ( $dsp ) $output .= ' |
|---|
| 5441 | <div class="no_slot"></div>'; |
|---|
| 5442 | foreach ( $bank [$t] as $pos => $item ) { |
|---|
| 5443 | $item [2] = $item [2] == 1 ? '' : $item [2]; |
|---|
| 5444 | $output .= ' |
|---|
| 5445 | <div style="left:' . ( ( $pos + $dsp ) % 4 * 43 ) . 'px;top:' . ( floor ( ( $pos + $dsp ) / 4 ) * 41 ) . 'px;"> |
|---|
| 5446 | <a style="padding:2px;" href="' . $item_datasite . $item [0] . '" target="_blank"> |
|---|
| 5447 | <img src="' . $this->get_item_icon ( $item [0] ) . '" alt="" /> |
|---|
| 5448 | </a> |
|---|
| 5449 | <div style="width:25px;margin:-20px 0px 0px 18px;color: black; font-size:14px">' . $item [2] . '</div> |
|---|
| 5450 | <div style="width:25px;margin:-21px 0px 0px 17px;font-size:14px">' . $item [2] . '</div> |
|---|
| 5451 | </div>'; |
|---|
| 5452 | } |
|---|
| 5453 | |
|---|
| 5454 | $output .= ' |
|---|
| 5455 | </div> |
|---|
| 5456 | </td>'; |
|---|
| 5457 | } |
|---|
| 5458 | unset ( $equip_bnk_bag_id ); |
|---|
| 5459 | unset ( $bank ); |
|---|
| 5460 | $output .= '<td class="bank"></td>'; |
|---|
| 5461 | |
|---|
| 5462 | $zeitmessung2 = microtime ( ); |
|---|
| 5463 | $zeittemp = explode ( " ", $zeitmessung2 ); |
|---|
| 5464 | $zeitmessung2 = $zeittemp [0] + $zeittemp [1]; // Timestamp + |
|---|
| 5465 | // Nanosek |
|---|
| 5466 | $zeitmessung = $zeitmessung2 - $zeitmessung1; // Differenz der |
|---|
| 5467 | // beiden Zeiten |
|---|
| 5468 | $zeitmessung = substr ( $zeitmessung, 0, 8 ); // es wird auf 6 |
|---|
| 5469 | // Kommastellen geküzt |
|---|
| 5470 | $generated = "Generiert in: {$zeitmessung} - Speicherverbrauch: " . $this->binary_multiples ( memory_get_usage ( true ) ); |
|---|
| 5471 | |
|---|
| 5472 | $output .= "</tr> |
|---|
| 5473 | <tr> |
|---|
| 5474 | <td colspan=\"4\" align=\"center\">{$generated}</td> |
|---|
| 5475 | </tr> |
|---|
| 5476 | </table> |
|---|
| 5477 | </center>"; |
|---|
| 5478 | } |
|---|
| 5479 | |
|---|
| 5480 | if ( $ajax ) $this->do_exit ( $output ); |
|---|
| 5481 | else return empty ( $output ) ? 'Keine Items gefunden' : $output; |
|---|
| 5482 | } |
|---|
| 5483 | |
|---|
| 5484 | protected function char_rep ( $guid = 0, $ajax = false ) |
|---|
| 5485 | { |
|---|
| 5486 | |
|---|
| 5487 | if ( ! $guid || $guid == 0 || empty ( $guid ) ) { |
|---|
| 5488 | if ( $ajax ) $this->do_exit ( 'Fehler' ); |
|---|
| 5489 | else return 'Fehler!'; |
|---|
| 5490 | } |
|---|
| 5491 | |
|---|
| 5492 | $zeitmessung1 = microtime ( ); |
|---|
| 5493 | $zeittemp = explode ( " ", $zeitmessung1 ); |
|---|
| 5494 | $zeitmessung1 = $zeittemp [0] + $zeittemp [1]; |
|---|
| 5495 | |
|---|
| 5496 | $item_datasite = 'http://loldb.landoflegends.de/?item='; |
|---|
| 5497 | $output = ''; |
|---|
| 5498 | |
|---|
| 5499 | $reputation_rank = $this->fact_get_reputation_rank_arr ( ); |
|---|
| 5500 | $reputation_rank_length = $this->fact_get_reputation_rank_length ( ); |
|---|
| 5501 | |
|---|
| 5502 | $result = $this->query ( "SELECT account, name, race, class, level, gender FROM `{$this->lol_conf ['db_pve_live_characters']}`.`characters` WHERE guid = {$guid} LIMIT 1", $this->forum_db ); |
|---|
| 5503 | |
|---|
| 5504 | if ( $this->num_rows ( $result ) ) { |
|---|
| 5505 | $char = $this->fetch_assoc ( $result ); |
|---|
| 5506 | |
|---|
| 5507 | $result = $this->query ( "SELECT faction, standing FROM `{$this->lol_conf ['db_pve_live_characters']}`.`character_reputation` WHERE guid = {$guid} AND (flags & 1 = 1)", $this->forum_db ); |
|---|
| 5508 | |
|---|
| 5509 | $output = '<center>'; |
|---|
| 5510 | |
|---|
| 5511 | $temp_out = array ( 1 => array ( ' |
|---|
| 5512 | <table class="lined" style="width: 100%;"> |
|---|
| 5513 | <tr> |
|---|
| 5514 | <th colspan="3" align="left" style="background-image: none;"> |
|---|
| 5515 | <div id="divi1" onclick="expand(\'i1\', this, \'Allianz\')">[-] Allianz</div> |
|---|
| 5516 | </th> |
|---|
| 5517 | </tr> |
|---|
| 5518 | <tr> |
|---|
| 5519 | <td align="center"> |
|---|
| 5520 | <table id="i1" class="lined" style="width: 95%; display: table;">', 0 ), 2 => array ( ' |
|---|
| 5521 | <table class="lined" style="width: 100%;"> |
|---|
| 5522 | <tr> |
|---|
| 5523 | <th colspan="3" align="left" style="background-image: none;"> |
|---|
| 5524 | <div id="divi2" onclick="expand(\'i2\', this, \'Horde\')">[-] Horde</div> |
|---|
| 5525 | </th> |
|---|
| 5526 | </tr> |
|---|
| 5527 | <tr> |
|---|
| 5528 | <td align="center"> |
|---|
| 5529 | <table id="i2" class="lined" style="width: 95%; display: table;">', 0 ), 3 => array ( ' |
|---|
| 5530 | <table class="lined" style="width: 100%;"> |
|---|
| 5531 | <tr> |
|---|
| 5532 | <th colspan="3" align="left" style="background-image: none;"> |
|---|
| 5533 | <div id="divi3" onclick="expand(\'i3\', this, \'Streitkräfte der Allianz\')">[-] Streitkräfte der Allianz</div> |
|---|
| 5534 | </th> |
|---|
| 5535 | </tr> |
|---|
| 5536 | <tr> |
|---|
| 5537 | <td align="center"> |
|---|
| 5538 | <table id="i3" class="lined" style="width: 95%; display: table;">', 0 ), 4 => array ( ' |
|---|
| 5539 | <table class="lined" style="width: 100%;"> |
|---|
| 5540 | <tr> |
|---|
| 5541 | <th colspan="3" align="left" style="background-image: none;"> |
|---|
| 5542 | <div id="divi4" onclick="expand(\'i4\', this, \'Streitkräfte der Horde\')">[-] Streitkräfte der Horde</div> |
|---|
| 5543 | </th> |
|---|
| 5544 | </tr> |
|---|
| 5545 | <tr> |
|---|
| 5546 | <td align="center"> |
|---|
| 5547 | <table id="i4" class="lined" style="width: 95%; display: table;">', 0 ), 5 => array ( ' |
|---|
| 5548 | <table class="lined" style="width: 100%;"> |
|---|
| 5549 | <tr> |
|---|
| 5550 | <th colspan="3" align="left" style="background-image: none;"> |
|---|
| 5551 | <div id="divi5" onclick="expand(\'i5\', this, \'Dampfdruckkartell\')">[-] Dampfdruckkartell</div> |
|---|
| 5552 | </th> |
|---|
| 5553 | </tr> |
|---|
| 5554 | <tr> |
|---|
| 5555 | <td align="center"> |
|---|
| 5556 | <table id="i5" class="lined" style="width: 95%; display: table;">', 0 ), 6 => array ( ' |
|---|
| 5557 | <table class="lined" style="width: 100%;"> |
|---|
| 5558 | <tr> |
|---|
| 5559 | <th colspan="3" align="left" style="background-image: none;"> |
|---|
| 5560 | <div id="divi6" onclick="expand(\'i6\', this, \'The Burning Crusade\')">[-] The Burning Crusade</div> |
|---|
| 5561 | </th> |
|---|
| 5562 | </tr> |
|---|
| 5563 | <tr> |
|---|
| 5564 | <td align="center"> |
|---|
| 5565 | <table id="i6" class="lined" style="width: 95%; display: table;">', 0 ), 7 => array ( ' |
|---|
| 5566 | <table class="lined" style="width: 100%;"> |
|---|
| 5567 | <tr> |
|---|
| 5568 | <th colspan="3" align="left" style="background-image: none;"> |
|---|
| 5569 | <div id="divi7" onclick="expand(\'i7\', this, \'Shattrath\')">[-] Shattrath</div> |
|---|
| 5570 | </th> |
|---|
| 5571 | </tr> |
|---|
| 5572 | <tr> |
|---|
| 5573 | <td align="center"> |
|---|
| 5574 | <table id="i7" class="lined" style="width: 95%; display: table;">', 0 ), 8 => array ( ' |
|---|
| 5575 | <table class="lined" style="width: 100%;"> |
|---|
| 5576 | <tr> |
|---|
| 5577 | <th colspan="3" align="left" style="background-image: none;"> |
|---|
| 5578 | <div id="divi8" onclick="expand(\'i8\', this, \'Vorposten der Allianz\')">[-] Vorposten der Allianz</div> |
|---|
| 5579 | </th> |
|---|
| 5580 | </tr> |
|---|
| 5581 | <tr> |
|---|
| 5582 | <td align="center"> |
|---|
| 5583 | <table id="i8" class="lined" style="width: 95%; display: table;">', 0 ), 9 => array ( ' |
|---|
| 5584 | <table class="lined" style="width: 100%;"> |
|---|
| 5585 | <tr> |
|---|
| 5586 | <th colspan="3" align="left" style="background-image: none;"> |
|---|
| 5587 | <div id="divi9" onclick="expand(\'i9\', this, \'Expedition der Horde \')">[-] Expedition der Horde</div> |
|---|
| 5588 | </th> |
|---|
| 5589 | </tr> |
|---|
| 5590 | <tr> |
|---|
| 5591 | <td align="center"> |
|---|
| 5592 | <table id="i9" class="lined" style="width: 95%; display: table;">', 0 ), 10 => array ( ' |
|---|
| 5593 | <table class="lined" style="width: 100%;"> |
|---|
| 5594 | <tr> |
|---|
| 5595 | <th colspan="3" align="left" style="background-image: none;"> |
|---|
| 5596 | <div id="divi10" onclick="expand(\'i10\', this, \'Sholazarbecken\')">[-] Sholazarbecken</div> |
|---|
| 5597 | </th> |
|---|
| 5598 | </tr> |
|---|
| 5599 | <tr> |
|---|
| 5600 | <td align="center"> |
|---|
| 5601 | <table id="i10" class="lined" style="width: 95%; display: table;">', 0 ), 11 => array ( ' |
|---|
| 5602 | <table class="lined" style="width: 100%;"> |
|---|
| 5603 | <tr> |
|---|
| 5604 | <th colspan="3" align="left" style="background-image: none;"> |
|---|
| 5605 | <div id="divi11" onclick="expand(\'i11\', this, \'Wrath of the Lich King\')">[-] Wrath of the Lich King</div> |
|---|
| 5606 | </th> |
|---|
| 5607 | </tr> |
|---|
| 5608 | <tr> |
|---|
| 5609 | <td align="center"> |
|---|
| 5610 | <table id="i11" class="lined" style="width: 95%; display: table;">', 0 ), 12 => array ( ' |
|---|
| 5611 | <table class="lined" style="width: 100%;"> |
|---|
| 5612 | <tr> |
|---|
| 5613 | <th colspan="3" align="left" style="background-image: none;"> |
|---|
| 5614 | <div id="divi12" onclick="expand(\'i12\', this, \'Andere\')">[-] Andere</div> |
|---|
| 5615 | </th> |
|---|
| 5616 | </tr> |
|---|
| 5617 | <tr> |
|---|
| 5618 | <td align="center"> |
|---|
| 5619 | <table id="i12" class="lined" style="width: 95%; display: table;">', 0 ), 0 => array ( ' |
|---|
| 5620 | <table class="lined" style="width: 100%;"> |
|---|
| 5621 | <tr> |
|---|
| 5622 | <th colspan="3" align="left" style="background-image: none;"> |
|---|
| 5623 | <div id="divi13" onclick="expand(\'i13\', this, \'Unbekannt\')">[-] Unbekannt</div> |
|---|
| 5624 | </th> |
|---|
| 5625 | </tr> |
|---|
| 5626 | <tr> |
|---|
| 5627 | <td align="center"> |
|---|
| 5628 | <table id="i13" class="lined" style="width: 95%; display: table;">', 0 ) ); |
|---|
| 5629 | |
|---|
| 5630 | if ( $this->num_rows ( $result ) ) { |
|---|
| 5631 | while ( $fact = $this->fetch_assoc ( $result ) ) { |
|---|
| 5632 | $faction = $fact ['faction']; |
|---|
| 5633 | $standing = $fact ['standing']; |
|---|
| 5634 | |
|---|
| 5635 | $rep_rank = $this->fact_get_reputation_rank ( $faction, $standing, $char ['race'] ); |
|---|
| 5636 | $rep_rank_name = $reputation_rank [$rep_rank]; |
|---|
| 5637 | $rep_cap = $reputation_rank_length [$rep_rank]; |
|---|
| 5638 | $rep = $this->fact_get_reputation_at_rank ( $faction, $standing, $char ['race'] ); |
|---|
| 5639 | $faction_name = $this->fact_get_faction_name ( $faction ); |
|---|
| 5640 | $ft = $this->fact_get_faction_tree ( $faction ); |
|---|
| 5641 | |
|---|
| 5642 | // not show alliance rep for horde and vice versa: |
|---|
| 5643 | if ( ( ( ( 1 << ( $char ['race'] - 1 ) ) & 690 ) && ( $ft == 1 || $ft == 3 ) ) || ( ( ( 1 << ( $char ['race'] - 1 ) ) & 1101 ) && ( $ft == 2 || $ft == 4 ) ) ); |
|---|
| 5644 | else { |
|---|
| 5645 | $temp_out [$ft] [0] .= ' |
|---|
| 5646 | <tr> |
|---|
| 5647 | <td width="30%" align="left">' . $faction_name . '</td> |
|---|
| 5648 | <td width="55%" valign="top"> |
|---|
| 5649 | <div class="faction-bar"> |
|---|
| 5650 | <div class="rep' . $rep_rank . '"> |
|---|
| 5651 | <span class="rep-data">' . $rep . '/' . $rep_cap . '</span> |
|---|
| 5652 | <div class="bar-color" style="width:' . ( 100 * $rep / $rep_cap ) . '%"></div> |
|---|
| 5653 | </div> |
|---|
| 5654 | </div> |
|---|
| 5655 | </td> |
|---|
| 5656 | <td width="15%" align="left" class="rep' . $rep_rank . '">' . $rep_rank_name . '</td> |
|---|
| 5657 | </tr>'; |
|---|
| 5658 | $temp_out [$ft] [1] = 1; |
|---|
| 5659 | } |
|---|
| 5660 | } |
|---|
| 5661 | } |
|---|
| 5662 | else |
|---|
| 5663 | $output .= '<tr> |
|---|
| 5664 | <td colspan="2"><br /><br />Keine Einträge gefunden!<br /><br /></td> |
|---|
| 5665 | </tr>'; |
|---|
| 5666 | |
|---|
| 5667 | foreach ( $temp_out as $out ) |
|---|
| 5668 | if ( $out [1] ) $output .= $out [0] . ' |
|---|
| 5669 | </table> |
|---|
| 5670 | </td> |
|---|
| 5671 | </tr> |
|---|
| 5672 | </table>'; |
|---|
| 5673 | |
|---|
| 5674 | $zeitmessung2 = microtime ( ); |
|---|
| 5675 | $zeittemp = explode ( " ", $zeitmessung2 ); |
|---|
| 5676 | $zeitmessung2 = $zeittemp [0] + $zeittemp [1]; // Timestamp + |
|---|
| 5677 | // Nanosek |
|---|
| 5678 | $zeitmessung = $zeitmessung2 - $zeitmessung1; // Differenz der |
|---|
| 5679 | // beiden Zeiten |
|---|
| 5680 | $zeitmessung = substr ( $zeitmessung, 0, 8 ); // es wird auf 6 |
|---|
| 5681 | // Kommastellen geküzt |
|---|
| 5682 | $generated = "Generiert in: {$zeitmessung} - Speicherverbrauch: " . $this->binary_multiples ( memory_get_usage ( true ) ); |
|---|
| 5683 | |
|---|
| 5684 | $output .= "{$generated}</center>"; |
|---|
| 5685 | } |
|---|
| 5686 | |
|---|
| 5687 | if ( $ajax ) $this->do_exit ( $output ); |
|---|
| 5688 | else return empty ( $output ) ? 'Keinen Ruf gefunden' : $output; |
|---|
| 5689 | } |
|---|
| 5690 | |
|---|
| 5691 | protected function char_quest ( $guid = 0, $ajax = false ) |
|---|
| 5692 | { |
|---|
| 5693 | |
|---|
| 5694 | if ( ! $guid || $guid == 0 || empty ( $guid ) ) { |
|---|
| 5695 | if ( $ajax ) $this->do_exit ( 'Fehler' ); |
|---|
| 5696 | else return 'Fehler!'; |
|---|
| 5697 | } |
|---|
| 5698 | |
|---|
| 5699 | $zeitmessung1 = microtime ( ); |
|---|
| 5700 | $zeittemp = explode ( " ", $zeitmessung1 ); |
|---|
| 5701 | $zeitmessung1 = $zeittemp [0] + $zeittemp [1]; |
|---|
| 5702 | |
|---|
| 5703 | $quest_datasite = 'http://loldb.landoflegends.de/?quest='; |
|---|
| 5704 | $itemperpage = 30; |
|---|
| 5705 | $output = ''; |
|---|
| 5706 | |
|---|
| 5707 | // ==========================$_GET and |
|---|
| 5708 | // SECURE================================= |
|---|
| 5709 | $start = ( isset ( $_GET ['start'] ) ) ? $this->quote_smart ( $_GET ['start'], $this->forum_db ) : 0; |
|---|
| 5710 | if ( is_numeric ( $start ) ); |
|---|
| 5711 | else $start = 0; |
|---|
| 5712 | |
|---|
| 5713 | $order_by = ( isset ( $_GET ['order_by'] ) ) ? $this->quote_smart ( $_GET ['order_by'], $this->forum_db ) : 1; |
|---|
| 5714 | if ( is_numeric ( $order_by ) ); |
|---|
| 5715 | else $order_by = 1; |
|---|
| 5716 | |
|---|
| 5717 | $dir = ( isset ( $_GET ['dir'] ) ) ? $this->quote_smart ( $_GET ['dir'], $this->forum_db ) : 0; |
|---|
| 5718 | if ( preg_match ( '/^[01]{1}$/', $dir ) ); |
|---|
| 5719 | else $dir = 0; |
|---|
| 5720 | |
|---|
| 5721 | $order_dir = ( $dir ) ? 'ASC' : 'DESC'; |
|---|
| 5722 | $dir = ( $dir ) ? 0 : 1; |
|---|
| 5723 | // ==========================$_GET and SECURE |
|---|
| 5724 | // end============================= |
|---|
| 5725 | |
|---|
| 5726 | |
|---|
| 5727 | $result = $this->query ( "SELECT quest, status, (SELECT COUNT(`quest`) FROM `{$this->lol_conf ['db_pve_live_characters']}`.`character_queststatus_rewarded` WHERE `guid` = {$guid} AND `quest` = quest) as rewarded FROM `{$this->lol_conf ['db_pve_live_characters']}`.`character_queststatus` WHERE guid = {$guid} AND ( status = 3 OR status = 1 ) ORDER BY status DESC", $this->forum_db ); |
|---|
| 5728 | |
|---|
| 5729 | if ( $this->num_rows ( $result ) ) { |
|---|
| 5730 | $char = $this->fetch_assoc ( $result ); |
|---|
| 5731 | |
|---|
| 5732 | $output .= "<center> |
|---|
| 5733 | <table class=\"lined\" style=\"width: 100%;\"> |
|---|
| 5734 | <tr> |
|---|
| 5735 | <th style=\"background-image: none; width: 10%\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=19&guid={$guid}&order_by=0&dir={$dir}','get');\">ID</a></th> |
|---|
| 5736 | <th style=\"background-image: none; width: 7%\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=19&guid={$guid}&order_by=1&dir={$dir}','get');\">Level</a></th> |
|---|
| 5737 | <th style=\"background-image: none; width: 78%\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=19&guid={$guid}&order_by=2&dir={$dir}','get');\">Titel</a></th> |
|---|
| 5738 | <th style=\"background-image: none; width: 5%\"><img src=\"img/aff_qst.png\" width=\"14\" height=\"14\" border=\"0\" alt=\"\" /></th> |
|---|
| 5739 | </tr>"; |
|---|
| 5740 | |
|---|
| 5741 | $result = $this->query ( "SELECT quest, status, (SELECT COUNT(`quest`) FROM `{$this->lol_conf ['db_pve_live_characters']}`.`character_queststatus_rewarded` WHERE `guid` = {$guid} AND `quest` = quest) as rewarded FROM `{$this->lol_conf ['db_pve_live_characters']}`.`character_queststatus` WHERE guid = {$guid} AND ( status = 3 OR status = 1 ) ORDER BY status DESC", $this->forum_db ); |
|---|
| 5742 | |
|---|
| 5743 | $quests_1 = array (); |
|---|
| 5744 | $quests_3 = array (); |
|---|
| 5745 | |
|---|
| 5746 | if ( $this->num_rows ( $result ) ) { |
|---|
| 5747 | while ( $quest = $this->fetch_assoc ( $result ) ) { |
|---|
| 5748 | $query1 = $this->query ( "SELECT QuestLevel, IFNULL(`title_loc3`, title) as Title FROM `{$this->lol_conf ['db_pve_live_world']}`.`v_quest_template` LEFT JOIN `{$this->lol_conf ['db_pve_live_world']}`.`locales_quest` ON `v_quest_template`.`entry` = `locales_quest`.`entry` WHERE `v_quest_template`.`entry` = {$quest ['quest']}", $this->forum_db ); |
|---|
| 5749 | $quest_info = $this->fetch_assoc ( $query1 ); |
|---|
| 5750 | |
|---|
| 5751 | if ( 1 == $quest ['status'] ) array_push ( $quests_1, array ( $quest ['quest'], $quest_info ['QuestLevel'], $quest_info ['Title'], $quest ['rewarded'] ) ); |
|---|
| 5752 | else array_push ( $quests_3, array ( $quest ['quest'], $quest_info ['QuestLevel'], $quest_info ['Title'] ) ); |
|---|
| 5753 | } |
|---|
| 5754 | |
|---|
| 5755 | unset ( $quest ); |
|---|
| 5756 | unset ( $quest_info ); |
|---|
| 5757 | |
|---|
| 5758 | $result = $this->query ( "SELECT quest FROM `{$this->lol_conf ['db_pve_live_characters']}`.`character_queststatus_rewarded` WHERE `guid` = {$guid}", $this->forum_db ); |
|---|
| 5759 | |
|---|
| 5760 | while ( $quest = $this->fetch_assoc ( $result ) ) { |
|---|
| 5761 | $query1 = $this->query ( "SELECT QuestLevel, IFNULL(`title_loc3`, title) as Title FROM `{$this->lol_conf ['db_pve_live_world']}`.`v_quest_template` LEFT JOIN `{$this->lol_conf ['db_pve_live_world']}`.`locales_quest` ON `v_quest_template`.`entry` = `locales_quest`.`entry` WHERE `v_quest_template`.`entry` = {$quest ['quest']}", $this->forum_db ); |
|---|
| 5762 | $quest_info = $this->fetch_assoc ( $query1 ); |
|---|
| 5763 | |
|---|
| 5764 | array_push ( $quests_1, array ( $quest ['quest'], $quest_info ['QuestLevel'], $quest_info ['Title'], 1 ) ); |
|---|
| 5765 | } |
|---|
| 5766 | |
|---|
| 5767 | unset ( $quest ); |
|---|
| 5768 | unset ( $quest_info ); |
|---|
| 5769 | |
|---|
| 5770 | $this->aasort ( $quests_1, $order_by, $dir ); |
|---|
| 5771 | $orderby = $order_by; |
|---|
| 5772 | |
|---|
| 5773 | if ( 2 < $orderby ) $orderby = 1; |
|---|
| 5774 | |
|---|
| 5775 | $this->aasort ( $quests_3, $orderby, $dir ); |
|---|
| 5776 | $all_record = count ( $quests_1 ); |
|---|
| 5777 | |
|---|
| 5778 | foreach ( $quests_3 as $data ) { |
|---|
| 5779 | $output .= ' |
|---|
| 5780 | <tr> |
|---|
| 5781 | <td>' . $data [0] . '</td> |
|---|
| 5782 | <td>(' . $data [1] . ')</td> |
|---|
| 5783 | <td align="left"><a href="' . $quest_datasite . $data [0] . '" target="_blank">' . $data [2] . '</a></td> |
|---|
| 5784 | <td><img src="images/aff_qst.png" width="14" height="14" alt="" /></td> |
|---|
| 5785 | </tr>'; |
|---|
| 5786 | } |
|---|
| 5787 | |
|---|
| 5788 | unset ( $quests_3 ); |
|---|
| 5789 | |
|---|
| 5790 | if ( count ( $quests_1 ) ) { |
|---|
| 5791 | $output .= ' |
|---|
| 5792 | </table> |
|---|
| 5793 | <table class="hidden" style="width: 100%;"> |
|---|
| 5794 | <tr align="right"> |
|---|
| 5795 | <td>'; |
|---|
| 5796 | $output .= $this->generate_paginationn ( "portal.php?mod=lol_control&modus=accman&action=19&guid={$guid}&order_by={$order_by}&dir=" . ( $dir ? 0 : 1 ), $all_record, $itemperpage, $start, true, '', false, true, 'char_content' ); |
|---|
| 5797 | $output .= "</td> |
|---|
| 5798 | </tr> |
|---|
| 5799 | </table> |
|---|
| 5800 | <table class=\"lined\" style=\"width: 100%;\"> |
|---|
| 5801 | <tr> |
|---|
| 5802 | <th style=\"background-image: none; width: 10%\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=19&guid={$guid}&order_by=0&dir={$dir}','get');\">ID</a></th> |
|---|
| 5803 | <th style=\"background-image: none; width: 7%\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=19&guid={$guid}&order_by=1&dir={$dir}','get');\">Level</a></th> |
|---|
| 5804 | <th style=\"background-image: none; width: 78%\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=19&guid={$guid}&order_by=2&dir={$dir}','get');\">Titel</a></th> |
|---|
| 5805 | <th style=\"background-image: none; width: 10%\"><a href=\"javascript:;\" onClick=\"get_content('char_content','portal.php?mod=lol_control&modus=accman&action=19&guid={$guid}&order_by=3&dir={$dir}','get');\">Belohnt</a></th> |
|---|
| 5806 | <th style=\"background-image: none; width: 5%\"><img src=\"img/aff_tick.png\" width=\"14\" height=\"14\" border=\"0\" alt=\"\" /></th> |
|---|
| 5807 | </tr>"; |
|---|
| 5808 | |
|---|
| 5809 | $i = 0; |
|---|
| 5810 | |
|---|
| 5811 | foreach ( $quests_1 as $data ) { |
|---|
| 5812 | if ( $i < ( $start + $itemperpage ) && $i >= $start ) $output .= ' |
|---|
| 5813 | <tr> |
|---|
| 5814 | <td>' . $data [0] . '</td> |
|---|
| 5815 | <td>(' . $data [1] . ')</td> |
|---|
| 5816 | <td align="left"><a href="' . $quest_datasite . $data [0] . '" target="_blank">' . $data [2] . '</a></td> |
|---|
| 5817 | <td><img src="images/aff_' . ( ( $data [3] == 1 ) ? 'tick' : 'qst' ) . '.png" width="14" height="14" alt="" /></td> |
|---|
| 5818 | <td><img src="images/aff_tick.png" width="14" height="14" alt="" /></td> |
|---|
| 5819 | </tr>'; |
|---|
| 5820 | $i ++; |
|---|
| 5821 | } |
|---|
| 5822 | |
|---|
| 5823 | unset ( $data ); |
|---|
| 5824 | unset ( $quests_1 ); |
|---|
| 5825 | $output .= ' |
|---|
| 5826 | <tr align="right"> |
|---|
| 5827 | <td colspan="5">'; |
|---|
| 5828 | $output .= $this->generate_paginationn ( "portal.php?mod=lol_control&modus=accman&action=19&guid={$guid}&order_by={$order_by}&dir=" . ( $dir ? 0 : 1 ), $all_record, $itemperpage, $start, true, '', false, true, 'char_content' ); |
|---|
| 5829 | $output .= ' |
|---|
| 5830 | </td> |
|---|
| 5831 | </tr>'; |
|---|
| 5832 | } |
|---|
| 5833 | } |
|---|
| 5834 | else |
|---|
| 5835 | $output .= ' |
|---|
| 5836 | <tr> |
|---|
| 5837 | <td colspan="4"><p>Keine aktiven Quests</p></td> |
|---|
| 5838 | </tr>'; |
|---|
| 5839 | |
|---|
| 5840 | $zeitmessung2 = microtime ( ); |
|---|
| 5841 | $zeittemp = explode ( " ", $zeitmessung2 ); |
|---|
| 5842 | $zeitmessung2 = $zeittemp [0] + $zeittemp [1]; // Timestamp + |
|---|
| 5843 | // Nanosek |
|---|
| 5844 | $zeitmessung = $zeitmessung2 - $zeitmessung1; // Differenz der |
|---|
| 5845 | // beiden Zeiten |
|---|
| 5846 | $zeitmessung = substr ( $zeitmessung, 0, 8 ); // es wird auf 6 |
|---|
| 5847 | // Kommastellen geküzt |
|---|
| 5848 | $generated = "Generiert in: {$zeitmessung} - Speicherverbrauch: " . $this->binary_multiples ( memory_get_usage ( true ) ); |
|---|
| 5849 | // ---------------Page Specific Data Ends |
|---|
| 5850 | // here---------------------------- |
|---|
| 5851 | // ---------------Character Tabs |
|---|
| 5852 | // Footer----------------------------------- |
|---|
| 5853 | $output .= "<tr> |
|---|
| 5854 | <td colspan=\"5\" align=\"center\">{$generated}</td> |
|---|
| 5855 | </tr> |
|---|
| 5856 | </table></center>"; |
|---|
| 5857 | } |
|---|
| 5858 | |
|---|
| 5859 | if ( $ajax ) $this->do_exit ( $output ); |
|---|
| 5860 | else return empty ( $output ) ? 'Keine Quests gefunden' : $output; |
|---|
| 5861 | } |
|---|
| 5862 | |
|---|
| 5863 | protected function char_mail_show ( $guid = 0, $ajax = false ) |
|---|
| 5864 | { |
|---|
| 5865 | |
|---|
| 5866 | if ( ! $guid || $guid == 0 || empty ( $guid ) ) { |
|---|
| 5867 | if ( $ajax ) $this->do_exit ( 'Fehler' ); |
|---|
| 5868 | else return 'Fehler!'; |
|---|
| 5869 | } |
|---|
| 5870 | |
|---|
| 5871 | $zeitmessung1 = microtime ( ); |
|---|
| 5872 | $zeittemp = explode ( " ", $zeitmessung1 ); |
|---|
| 5873 | $zeitmessung1 = $zeittemp [0] + $zeittemp [1]; |
|---|
| 5874 | |
|---|
| 5875 | $item_datasite = 'http://loldb.landoflegends.de/?item='; |
|---|
| 5876 | $itemperpage = 30; |
|---|
| 5877 | $output = ''; |
|---|
| 5878 | |
|---|
| 5879 | // ==========================$_GET and |
|---|
| 5880 | // SECURE================================= |
|---|
| 5881 | $start = ( isset ( $_GET ['start'] ) ) ? $this->quote_smart ( $_GET ['start'], $this->forum_db ) : 0; |
|---|
| 5882 | if ( is_numeric ( $start ) ); |
|---|
| 5883 | else $start = 0; |
|---|
| 5884 | |
|---|
| 5885 | $order_by = ( isset ( $_GET ['order_by'] ) ) ? $this->quote_smart ( $_GET ['order_by'], $this->forum_db ) : 'id'; |
|---|
| 5886 | if ( preg_match ( '/^[_[:lower:]]{1,12}$/', $order_by ) ); |
|---|
| 5887 | else $order_by = 'id'; |
|---|
| 5888 | |
|---|
| 5889 | $dir = ( isset ( $_GET ['dir'] ) ) ? $this->quote_smart ( $_GET ['dir'], $this->forum_db ) : 1; |
|---|
| 5890 | if ( preg_match ( '/^[01]{1}$/', $dir ) ); |
|---|
| 5891 | else $dir = 1; |
|---|
| 5892 | |
|---|
| 5893 | $order_dir = ( $dir ) ? 'ASC' : 'DESC'; |
|---|
| 5894 | $dir = ( $dir ) ? 0 : 1; |
|---|
| 5895 | // ==========================$_GET and SECURE |
|---|
| 5896 | // end============================= |
|---|
| 5897 | |
|---|
| 5898 | |
|---|
| 5899 | // getting character data from database |
|---|
| 5900 | $result = $this->query ( "SELECT account, name, race, class, level, gender FROM `{$this->lol_conf ['db_pve_live_characters']}`.`characters` WHERE guid = {$guid} LIMIT 1", $this->forum_db ); |
|---|
| 5901 | |
|---|
| 5902 | if ( $this->num_rows ( $result ) ) { |
|---|
| 5903 | $char = $this->fetch_assoc ( $result ); |
|---|
| 5904 | |
|---|
| 5905 | $output .= ' |
|---|
| 5906 | <table class="lined" style="width: 100%">'; |
|---|
| 5907 | |
|---|
| 5908 | // ---------------Page Specific Starts Ends |
|---|
| 5909 | // here---------------------------- |
|---|
| 5910 | $query = $this->query ( "SELECT a.id as id, a.messageType as messagetype, a.sender as sender, |
|---|
| 5911 | a.subject as subject, a.body as body, a.has_items as hasitems, a.money as money, a.cod as cod, a.checked as checked, |
|---|
| 5912 | (SELECT `itemEntry` FROM `{$this->lol_conf ['db_pve_live_characters']}`.`item_instance` WHERE `guid` = b.item_guid) as itemtemplate |
|---|
| 5913 | FROM `{$this->lol_conf ['db_pve_live_characters']}`.`mail` a LEFT JOIN `{$this->lol_conf ['db_pve_live_characters']}`.`mail_items` b ON a.id = b.mail_id where a.receiver = {$guid} OR a.sender = {$guid} LIMIT {$start}, {$itemperpage}", $this->forum_db ); |
|---|
| 5914 | $total_mail = $this->result ( $this->query ( "SELECT count(*) FROM `{$this->lol_conf ['db_pve_live_characters']}`.`mail` WHERE receiver= {$guid}", $this->forum_db ) ); |
|---|
| 5915 | |
|---|
| 5916 | |
|---|
| 5917 | $output .= ' |
|---|
| 5918 | <tr> |
|---|
| 5919 | <td align="left"> |
|---|
| 5920 | Mails gesamt: ' . $total_mail . ' |
|---|
| 5921 | </td> |
|---|
| 5922 | <td align="right" width="45%">'; |
|---|
| 5923 | $output .= $this->generate_paginationn ( "portal.php?mod=lol_control&modus=accman&action=20&guid={$guid}&order_by={$order_by}&dir=" . ( $dir ? 0 : 1 ), $total_mail, $itemperpage, $start, true, '', false, true, 'char_content' ); |
|---|
| 5924 | $output .= ' |
|---|
| 5925 | </td> |
|---|
| 5926 | </tr> |
|---|
| 5927 | </table> |
|---|
| 5928 | <table class="lined" style="width: 100%"> |
|---|
| 5929 | <tr> |
|---|
| 5930 | <th width="5%" style="background-image: none;">Nachrichten-Typ</th> |
|---|
| 5931 | <th width="10%" style="background-image: none;">Gesendet von</th> |
|---|
| 5932 | <th width="15%" style="background-image: none;">Betreff</th> |
|---|
| 5933 | <th width="5%" style="background-image: none;">Gegenstand</th> |
|---|
| 5934 | <th width="25%" style="background-image: none;">Text</th> |
|---|
| 5935 | <th width="20%" style="background-image: none;">Geld</th> |
|---|
| 5936 | <th width="5%" style="background-image: none;">Überprüft</th> |
|---|
| 5937 | </tr>'; |
|---|
| 5938 | |
|---|
| 5939 | $tmp = ''; |
|---|
| 5940 | |
|---|
| 5941 | while ( $mail = $this->fetch_assoc ( $query ) ) { |
|---|
| 5942 | $sender = $this->get_char_name ( $mail ['sender'] ); |
|---|
| 5943 | $sender = empty ( $sender ) ? 'Leer' : $sender; |
|---|
| 5944 | $tmp .= ' |
|---|
| 5945 | <tr valign=top> |
|---|
| 5946 | <td>' . $this->get_mail_source ( $mail ['messagetype'] ) . '</td> |
|---|
| 5947 | <td>' . $sender . '</td> |
|---|
| 5948 | <td>' . $mail ['subject'] . '</td>'; |
|---|
| 5949 | |
|---|
| 5950 | $tmp .= ( $mail ['hasitems'] != 0 ) ? '<td align=\"center\"> |
|---|
| 5951 | <a href="' . $item_datasite . $mail ['itemtemplate'] . '" target="_blank"> |
|---|
| 5952 | <img class="bag_icon" src="' . $this->get_item_icon ( $mail ['itemtemplate'] ) . '" alt="" /> |
|---|
| 5953 | </a> |
|---|
| 5954 | </td>' : '<td align=\"center\">Leer</td>'; |
|---|
| 5955 | $body = empty ( $mail ['body'] ) ? 'Leer' : $mail ['body']; |
|---|
| 5956 | $tmp .= '<td>' . $body . '</td> |
|---|
| 5957 | <td> |
|---|
| 5958 | ' . substr ( $mail ['money'], 0, - 4 ) . '<img src="img/gold.gif" alt="" align="middle" /> |
|---|
| 5959 | ' . substr ( $mail ['money'], - 4, 2 ) . '<img src="img/silver.gif" alt="" align="middle" /> |
|---|
| 5960 | ' . substr ( $mail ['money'], - 2 ) . '<img src="img/copper.gif" alt="" align="middle" /> |
|---|
| 5961 | </td> |
|---|
| 5962 | <td>' . $this->get_check_state ( $mail ['checked'] ) . '</td> |
|---|
| 5963 | </tr>'; |
|---|
| 5964 | } |
|---|
| 5965 | |
|---|
| 5966 | if ( empty ( $tmp ) ) $output .= "<tr><td colspan=\"7\" align=\"center\">Keine Mails gefunden!</td></tr>"; |
|---|
| 5967 | else $output .= $tmp; |
|---|
| 5968 | |
|---|
| 5969 | unset ( $tmp ); |
|---|
| 5970 | |
|---|
| 5971 | $zeitmessung2 = microtime ( ); |
|---|
| 5972 | $zeittemp = explode ( " ", $zeitmessung2 ); |
|---|
| 5973 | $zeitmessung2 = $zeittemp [0] + $zeittemp [1]; // Timestamp + |
|---|
| 5974 | // Nanosek |
|---|
| 5975 | $zeitmessung = $zeitmessung2 - $zeitmessung1; // Differenz der |
|---|
| 5976 | // beiden Zeiten |
|---|
| 5977 | $zeitmessung = substr ( $zeitmessung, 0, 8 ); // es wird auf 6 |
|---|
| 5978 | // Kommastellen geküzt |
|---|
| 5979 | $generated = "Generiert in: {$zeitmessung} - Speicherverbrauch: " . $this->binary_multiples ( memory_get_usage ( true ) ); |
|---|
| 5980 | // ---------------Page Specific Data Ends |
|---|
| 5981 | // here---------------------------- |
|---|
| 5982 | // ---------------Character Tabs |
|---|
| 5983 | // Footer----------------------------------- |
|---|
| 5984 | $output .= "<tr> |
|---|
| 5985 | <td colspan=\"7\" align=\"center\">{$generated}</td> |
|---|
| 5986 | </tr> |
|---|
| 5987 | </table> |
|---|
| 5988 | </center>"; |
|---|
| 5989 | |
|---|
| 5990 | } |
|---|
| 5991 | |
|---|
| 5992 | if ( $ajax ) $this->do_exit ( $output ); |
|---|
| 5993 | else return empty ( $output ) ? 'Keine Quests gefunden' : $output; |
|---|
| 5994 | } |
|---|
| 5995 | |
|---|
| 5996 | protected function change_account_access ( $data, $acc = 0, $account_access = 0 ) |
|---|
| 5997 | { |
|---|
| 5998 | global $user; |
|---|
| 5999 | |
|---|
| 6000 | $c = $this->check_post_data ( $data, 'c' ); |
|---|
| 6001 | $acc_access = ( $this->check_post_data ( $data, 'acc_access' ) ) ? $this->check_post_data ( $data, 'acc_access' ) : $account_access; |
|---|
| 6002 | $a = isset ( $_GET ['a'] ) ? $_GET ['a'] : false; |
|---|
| 6003 | $acc = isset ( $_GET ['acc'] ) ? $_GET ['acc'] : $acc; |
|---|
| 6004 | |
|---|
| 6005 | if ( $this->check_access_rights ( array ( 5, 24 ) ) || $user->data ['username_clean'] == 'kleinerwolf' ) { |
|---|
| 6006 | if ( $c ) { |
|---|
| 6007 | $check_online_sql = "SELECT SUM(`online`) FROM `{$this->lol_conf ['db_pve_live_characters']}`.`characters` WHERE `account` = '{$acc}'"; |
|---|
| 6008 | $check_online_query = $this->query ( $check_online_sql, $this->root_db ); |
|---|
| 6009 | $check_online = $this->result ( $check_online_query ); |
|---|
| 6010 | |
|---|
| 6011 | if ( $acc && $check_online == 0 ) { |
|---|
| 6012 | $this->trans_AddSql ( "DELETE FROM `{$this->lol_conf ['db_live_accounts']}`.`account_access` WHERE `id` = '{$acc}'", 943875 ); |
|---|
| 6013 | $this->trans_AddSql ( "INSERT INTO `{$this->lol_conf ['db_live_accounts']}`.`account_access` VALUES ('{$acc}','{$acc_access}','-1')", 943875 ); |
|---|
| 6014 | if ( $this->trans_Execute ( $this->root_db, 943875 ) ) $this->do_exit ( '<font color="green">OK</font>' ); |
|---|
| 6015 | else $this->do_exit ( '<font color="red">ERR</font>' ); |
|---|
| 6016 | } |
|---|
| 6017 | else |
|---|
| 6018 | $this->do_exit ( '<font color="red">ERR</font>' ); |
|---|
| 6019 | } |
|---|
| 6020 | |
|---|
| 6021 | $code = "<table><tr><td><form onsubmit=\"ajaxUpload(this,'portal.php?mod=lol_control&modus=accman&action=21&acc={$acc}&a=true','acc_access','<center>...</center>','<center>Javascript: Fehler?</center>'); return false;\"><select name=\"acc_access\">"; |
|---|
| 6022 | |
|---|
| 6023 | for ( $i = 0; $i < 6; ++ $i ) |
|---|
| 6024 | $code .= "<option value=\"{$i}\"" . ( ( $acc_access == $i ) ? ' SELECTED' : '' ) . ">{$this->account_access_data[$i]}</option>"; |
|---|
| 6025 | |
|---|
| 6026 | $code .= "</select> <input type=\"hidden\" name=\"c\" value=\"true\" /><input type=\"submit\" name=\"sub\" value=\"OK\" /></form></td><td><div id=\"acc_access\"></div></td></tr></table>"; |
|---|
| 6027 | } |
|---|
| 6028 | else |
|---|
| 6029 | $code = $this->account_access_data [$acc_access]; |
|---|
| 6030 | |
|---|
| 6031 | if ( $a ) $this->do_exit ( $code ); |
|---|
| 6032 | else return $code; |
|---|
| 6033 | } |
|---|
| 6034 | } |
|---|
| 6035 | |
|---|
| 6036 | ?> |
|---|