- Timestamp:
- Feb 16, 2013, 8:31:12 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/banners.php
r504 r514 2 2 3 3 include('includes/global.php'); 4 5 function ParentWebs($Selected) 6 { 7 global $System; 8 9 $Output = '<select name="Parent">'; 10 $Output .= '<option value=""'; 11 if($Selected == '') 12 $Output .= ' selected="selected"'; 13 $Output .= '></option>'; 14 $DbResult = $System->Database->select('Referrer', '`Id`, `Web`', 'Parent IS NULL'); 15 while($Language = $DbResult->fetch_assoc()) 16 { 17 $Output .= '<option value="'.$Language['Id'].'"'; 18 if($Selected == $Language['Id']) 19 $Output .= ' selected="selected"'; 20 $Output .= '>'.$Language['Web'].'</option>'; 21 } 22 $Output .= '</select>'; 23 return($Output); 24 } 4 25 5 26 $MonthAge = 3; … … 22 43 23 44 45 if(!$User->Licence(LICENCE_ADMIN)) $Where = ' WHERE (`Show`=1) AND (`Parent` IS NULL)'; 46 else $Where = ''; 24 47 $Query = 'SELECT * FROM (SELECT *, (`Hits` + COALESCE((SELECT SUM(`Hits`) FROM '. 25 48 '`Referrer` AS `T1` WHERE `T1`.`Parent` = `T2`.`Id`), 0)) AS `TotalHits`, '. 26 49 'GREATEST(`DateLast`, COALESCE((SELECT MAX(`DateLast`) FROM '. 27 50 '`Referrer` AS `T1` WHERE `T1`.`Parent` = `T2`.`Id`), 0)) AS `MaxDateLast` FROM '. 28 '`Referrer` AS `T2` WHERE (`Show`=1) AND (`Parent` IS NULL)) AS `T3` '.51 '`Referrer` AS `T2`'.$Where.') AS `T3` '. 29 52 'WHERE (`T3`.`MaxDateLast` > (NOW() - INTERVAL '.$MonthAge.' MONTH))'; 30 53 31 54 32 55 $DbResult = $System->Database->query('SELECT COUNT(*) FROM ('.$Query.') AS T'); … … 42 65 array('Name' => 'TotalHits', 'Title' => 'Příchodů'), 43 66 ); 67 if($User->Licence(LICENCE_ADMIN)) 68 { 69 $TableColumns[] = array('Name' => 'Show', 'Title' => 'Viditelné'); 70 $TableColumns[] = array('Name' => 'Parent', 'Title' => 'Rodič'); 71 $TableColumns[] = array('Name' => 'Description', 'Title' => 'Komentář'); 72 $TableColumns[] = array('Name' => 'Action', 'Title' => 'Akce'); 73 } 44 74 $Order = GetOrderTableHeader($TableColumns, 'MaxDateLast', 1); 45 75 $Output .= $Order['Output']; … … 52 82 $Output .= '<tr><td><a href="'.$Line['LastURL'].'">'.$Line['Web'].'</a></td>'. 53 83 '<td>'.HumanDate($Line['MaxDateLast']).'</td>'. 54 '<td>'.$Line['TotalHits'].'</td></tr>'; 84 '<td>'.$Line['TotalHits'].'</td>'; 85 if($User->Licence(LICENCE_ADMIN)) 86 { 87 $Output .= 88 '<td>'.$Line['Show'].'</td>'. 89 '<td>'.$Line['Parent'].'</td>'. 90 '<td>'.$Line['Description'].'</td>'. 91 '<td><a href="?action=edit&id='.$Line['Id'].'">Upravit</a></td>'; 92 } 93 $Output .= '</tr>'; 55 94 } 56 95 $Output .= '</table>'; -
trunk/import/cmd.php
r504 r514 64 64 if(($Group['MangosTable'] != '') and ($Group['TablePrefix'] != '') and ($Group['MangosDatabase'] == 'mangos')) 65 65 { 66 $Output .= ' '.$TranslationTree[$Group['Id']]['Name'].' ' );67 ImportSQLMangos($Config['Web']['GameVersion'], $Group['Id'];66 $Output .= ' '.$TranslationTree[$Group['Id']]['Name'].' '; 67 ImportSQLMangos($Config['Web']['GameVersion'], $Group['Id']); 68 68 $Output .= ' 69 69 '; … … 76 76 if(($Group['DBCFileName'] != '') and ($Group['TablePrefix'] != '')) 77 77 { 78 $Output .= ' '.$TranslationTree[$Group['Id']]['Name'].' ' );79 ImportDBC($Config['Web']['GameVersion'], $Group['Id'] ;78 $Output .= ' '.$TranslationTree[$Group['Id']]['Name'].' '; 79 ImportDBC($Config['Web']['GameVersion'], $Group['Id']); 80 80 $Output .= ' 81 81 '; -
trunk/includes/user.php
r499 r514 40 40 WriteLog('Login: '.$Name, LOG_TYPE_USER); 41 41 $this->UpdateState(); 42 } else $ ŧhis->Role = LICENCE_ANONYMOUS;42 } else $this->Role = LICENCE_ANONYMOUS; 43 43 } 44 44 -
trunk/save.php
r504 r514 188 188 '<input type="hidden" name="user" value="'.$_POST['user'].'" />'. 189 189 '<input type="hidden" name="ID" value="'.$_POST['ID'].'" />'. 190 '<input type="hidden" name="Language" value="'.$_POST['Language'].'" />' );190 '<input type="hidden" name="Language" value="'.$_POST['Language'].'" />'; 191 191 192 192 foreach($TranslationTree[$GroupId]['Items'] as $Index => $TextItem)
Note:
See TracChangeset
for help on using the changeset viewer.