Changeset 1886466
- Timestamp:
- 06/03/2018 09:05:04 PM (8 years ago)
- Location:
- bet-wc-2018-russia/trunk
- Files:
-
- 5 edited
-
css/style.css (modified) (1 diff)
-
fms2018.php (modified) (3 diffs)
-
fms2018_admin.php (modified) (5 diffs)
-
fms2018_front.php (modified) (6 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
bet-wc-2018-russia/trunk/css/style.css
r1885573 r1886466 128 128 text-align: center; 129 129 } 130 .info { 131 cursor:help; 132 } 133 .info span { 134 display: none; 135 position: absolute; 136 background-color: #fff; 137 padding: 10px 10px 10px 10px; 138 margin-left: 30px; 139 } 140 141 .info:hover span { 142 display: block; 143 144 } 145 130 146 .typowali { 131 147 color:#9a211e; -
bet-wc-2018-russia/trunk/fms2018.php
r1885573 r1886466 4 4 Plugin URI: fms2018.foxskav.pl 5 5 Description: Bet with Your friends matches on World Cup 2018 Russia. Typuj ze znajomymi wyniki meczy na MŚ 2018 Rosja. 6 Version: 1. 56 Version: 1.6 7 7 Author: Foxskav 8 8 Author URI: foxskav.pl … … 215 215 add_option( 'fms2018_susers', '1'); 216 216 add_option( 'fms2018_susers_role', 'all users'); 217 add_option( 'fms2018_display_types', '0'); 217 218 } 218 219 register_activation_hook(__FILE__, 'fms2018_install'); … … 225 226 delete_option( 'fms2018_susers'); 226 227 delete_option( 'fms2018_susers_role'); 228 delete_option( 'fms2018_display_types'); 227 229 228 230 global $wpdb; -
bet-wc-2018-russia/trunk/fms2018_admin.php
r1884382 r1886466 89 89 $lang = get_option('fms2018_lang'); 90 90 $s_users = get_option('fms2018_susers'); 91 $display_types = get_option('fms2018_display_types'); 91 92 if($lang == 1) { 92 93 $l_header = 'Ustawienia MŚ 2018'; … … 98 99 $l_users_after_bet = 'Użytkownicy po wprowadzeniu pierwszego typu są wyświetlani w rankingu.'; 99 100 $l_users_role = 'Użytkownicy o wybranej roli mogą uczestniczyć w grze: '; 101 $l_types = 'Typy: '; 102 $l_hidebets = 'Typy innych graczy zostaną ujawnione na '. get_option('fms2018_block') . ' minut przed meczem'; 103 $l_showbets = 'Typy innych graczy są jawne (niepolecana opcja)'; 100 104 } 101 105 else { … … 108 112 $l_users_after_bet = 'Users after entering the first type are displayed in the ranking.'; 109 113 $l_users_role = 'Users with the selected role can participate in the game: '; 114 $l_types = 'Bets: '; 115 $l_hidebets = 'Players types will be displayed '. get_option('fms2018_block') . ' minutes before match starts'; 116 $l_showbets = 'Players types are public all time (not recommended option)'; 110 117 } 111 118 echo '<h2>'.$l_header.'</h2>'; … … 120 127 echo '<label>'.$l_pzw.'</label><input type="number" name="fms2018_pktwynik" value="' . get_option('fms2018_pktwynik') . '" /><br>'; 121 128 echo '<label>'.$l_pzr.'</label><input type="number" name="fms2018_pktrezultat" value="' . get_option('fms2018_pktrezultat') . '" /><br>'; 129 130 131 echo '<br><label>'.$l_types.': </label><br>'; 122 132 echo '<label>'.$l_bm.'</label><input type="number" name="fms2018_block" value="' . get_option('fms2018_block') . '" /><br>'; 133 echo '<input type="radio" name="fms2018_display_types" value="0"'; if($display_types == 0) echo 'checked'; 134 echo '> '.$l_hidebets.'<br> 135 <input type="radio" name="fms2018_display_types" value="1"'; if($display_types == 1) echo 'checked'; 136 echo '> '.$l_showbets.'<br><br>'; 123 137 124 138 echo '<br><label>'.$l_users.': </label><br> … … 139 153 140 154 echo '<input type="hidden" name="action" value="update" />'; 141 echo '<input type="hidden" name="page_options" value="fms2018_lang,fms2018_pktwynik,fms2018_pktrezultat,fms2018_block,fms2018_susers,fms2018_susers_role " />';155 echo '<input type="hidden" name="page_options" value="fms2018_lang,fms2018_pktwynik,fms2018_pktrezultat,fms2018_block,fms2018_susers,fms2018_susers_role,fms2018_display_types" />'; 142 156 143 157 wp_nonce_field('fms_update_setting-nonce','fms_nonce_field'); -
bet-wc-2018-russia/trunk/fms2018_front.php
r1885289 r1886466 47 47 $lang = get_option('fms2018_lang'); 48 48 $s_users_role = get_option('fms2018_susers_role'); 49 $display_types = get_option('fms2018_display_types'); 49 50 50 51 usort($mecze_all, function($a1, $a2) { … … 79 80 $l_brakdostepu = '<br>Nie posiadasz uprawnień aby typować.'; 80 81 $l_typzmieniac = 'Twój typ możesz zmieniać do '; 82 $l_typinnych = 'Typy innych będą widoczne o '; 81 83 $l_ilemin = ' minut przed rozpoczęciem meczu'; 82 84 $l_typuj = 'TYPUJ'; … … 93 95 $l_brakdostepu = '<br>You dont have permission to bet.'; 94 96 $l_typzmieniac = 'You can change yours bet to '; 97 $l_typinnych = 'Players types will be displayed at '; 95 98 $l_ilemin = ' minutes before match starts'; 96 99 $l_typuj = 'BET'; … … 134 137 $html .= '<span class="typ_user">'.$search['user_nicename'].'</span>'; 135 138 136 if($blokowany_czas-$aktualny_czas<0 || $search['id_user'] == $id_user )139 if($blokowany_czas-$aktualny_czas<0 || $search['id_user'] == $id_user || $display_types == 1) 137 140 $html .= '<span class="typ_wynik">'.$search['w_p1'].':'.$search['w_p2'].'</span>'; 138 else 139 $html .= '<span class="typ_wynik">?</span>'; 141 else { 142 $html .= '<div class="typ_wynik"><div class="info">?'; 143 $html .= '<span>'.$l_typinnych.date("Y-m-d H:i", $blokowany_czas); 144 $html .='<br>'.get_option('fms2018_block'); 145 $html .= $l_ilemin.'</span>'; 146 147 $html .='</div></div>'; 148 } 140 149 } 141 150 … … 185 194 $html .='</div></div></div>'; 186 195 } 196 187 197 if (isset($_POST['typ_mecz_id'])){ 188 198 $html .= '<script type="text/javascript">'; … … 318 328 $query = "select count(id_meczu) as ile from ".$prefix."fms2018_typy where id_user = '".$user['id']."'"; 319 329 $result = $wpdb->get_results($query, ARRAY_A); 320 if($result[0]['ile']>0) 330 if($result[0]['ile']>0){ 321 331 $html .= "<div class='fms_rank_user ".$current."'><span>".$i.'. '.$user['nazwa']."</span><span>".$user['pkt']."</span></div>"; 322 $i++; 332 $i++;} 323 333 } 324 334 } -
bet-wc-2018-russia/trunk/readme.txt
r1885573 r1886466 4 4 Tested up to: 4.9.6 5 5 Requires PHP: 5.2.4 6 Stable tag: 1. 56 Stable tag: 1.6 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0 … … 53 53 = 1.5 = 54 54 Fixed CSS and JS 55 56 = 1.6 = 57 Fixed ranking 58 Added option: Public types 59 Added info box 60
Note: See TracChangeset
for help on using the changeset viewer.