- Timestamp:
- Jan 30, 2011, 12:13:45 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/aktuality/news.php
r302 r305 97 97 while($NewsCategory = $DbResult->fetch_array()) 98 98 { 99 $this->NewsSetting[] = array('CategoryId' => $NewsCategory['Id'], 'Index' => $I, 'Enabled' => 1, 'ItemCount' => $this->System->Config['Web']['News']['Count'], 'DaysAgo' => $this->System->Config['Web']['News']['DaysAgo'] );99 $this->NewsSetting[] = array('CategoryId' => $NewsCategory['Id'], 'Index' => $I, 'Enabled' => 1, 'ItemCount' => $this->System->Config['Web']['News']['Count'], 'DaysAgo' => $this->System->Config['Web']['News']['DaysAgo'], 'Group' => $NewsCategory['Group']); 100 100 $I++; 101 101 } … … 130 130 $Output .= '<div onmouseout="skryj(predchozi)">'; 131 131 132 foreach($this->NewsSetting as $SettingItem) 133 if($SettingItem['Enabled'] == 1) $Output .= $this->ShowNews($SettingItem['CategoryId'], $SettingItem['ItemCount'], $SettingItem['DaysAgo']); 132 $ColumnCount = 2; 133 $Output .= '<table style="width: 100%"><tr>'; 134 for($Column = 1; $Column <= $ColumnCount; $Column++) 135 { 136 $Output .= '<td style="vertical-align: top; width: '.round(100 / $ColumnCount).'%;">'; 137 foreach($this->NewsSetting as $SettingItem) 138 if(($SettingItem['Enabled'] == 1) and ($SettingItem['Group'] == $Column)) 139 $Output .= $this->ShowNews($SettingItem['CategoryId'], $SettingItem['ItemCount'], $SettingItem['DaysAgo']); 140 $Output .= '</td>'; 141 } 142 $Output .= '</tr></table>'; 134 143 135 144 $Output .= '<a href="aktuality/subscription.php"><img class="RSSIcon" src="images/rss20.png" alt="Aktuality přes RSS" /></a> <a href="aktuality/subscription.php">Automatické sledování novinek</a>'; … … 142 151 $Output = '<form action="?Action=CustomizeNewsSave" method="post">'; 143 152 $Output .= '<table width="100%" cellspacing="0" border="1"><tr><td><table cellspacing="0" width="100%">'; 144 $Output .= '<tr><th>Kategorie</th><th>Pozice</th><th>Zobrazit</th><th>Max. počet</th><th>Posledních dnů</th>< /tr>';153 $Output .= '<tr><th>Kategorie</th><th>Pozice</th><th>Zobrazit</th><th>Max. počet</th><th>Posledních dnů</th><th>Sloupec</th></tr>'; 145 154 $I = 0; 146 155 foreach($this->NewsSetting as $SettingItem) … … 153 162 '<td align="center"><input type="text" size="2" name="NewsCategoryCount'.$I.'" value="'.$SettingItem['ItemCount'].'" />'. 154 163 '<input type="hidden" name="NewsCategoryId'.$I.'" value="'.$SettingItem['CategoryId'].'" /></td>'. 155 '<td align="center"><input type="text" size="3" name="NewsCategoryDaysAgo'.$I.'" value="'.$SettingItem['DaysAgo'].'" /></td></tr>'; 164 '<td align="center"><input type="text" size="3" name="NewsCategoryDaysAgo'.$I.'" value="'.$SettingItem['DaysAgo'].'" /></td>'. 165 '<td><input type="text" size="3" name="NewsColumn'.$I.'" value="'.$SettingItem['Group'].'"/></td></tr>'; 156 166 $I++; 157 167 } … … 169 179 if(($_POST['NewsCategoryDaysAgo'.$I] * 1) < 0) $_POST['NewsCategoryIndex'.$I] = 0; 170 180 if(($_POST['NewsCategoryCount'.$I] * 1) < 0) $_POST['NewsCategoryCount'.$I] = 0; 181 if(($_POST['NewsColumn'.$I] * 1) < 1) $_POST['NewsColumn'.$I] = 1; 171 182 if(!array_key_exists('NewsCategoryEnabled'.$I, $_POST)) $_POST['NewsCategoryEnabled'.$I] = ''; 172 $Setting[] = array('CategoryId' => $_POST['NewsCategoryId'.$I], 'Enabled' => $Checkbox[$_POST['NewsCategoryEnabled'.$I]], 'ItemCount' => ($_POST['NewsCategoryCount'.$I]*1), 'DaysAgo' => ($_POST['NewsCategoryDaysAgo'.$I]*1), 'Index' => ($_POST['NewsCategoryIndex'.$I]*1)); 183 $Setting[] = array('CategoryId' => $_POST['NewsCategoryId'.$I], 'Enabled' => $Checkbox[$_POST['NewsCategoryEnabled'.$I]], 'ItemCount' => ($_POST['NewsCategoryCount'.$I]*1), 'DaysAgo' => ($_POST['NewsCategoryDaysAgo'.$I]*1), 'Index' => ($_POST['NewsCategoryIndex'.$I]*1), 184 'Group' => $_POST['NewsColumn'.$I]); 173 185 } 174 186 // Sort indexes -
trunk/index.php
r304 r305 6 6 { 7 7 var $Dependencies = array('News'); 8 var $FullTitle = ' <strong>ZděchovNET</strong> - komunitní počítačová síť';9 var $ShortTitle = ' Rozcestník';8 var $FullTitle = 'Zděchovský rozcestník'; 9 var $ShortTitle = ''; 10 10 11 11 function ShowLinks($GroupId) … … 124 124 return($Output); 125 125 } 126 127 function GetServerUptime() 128 { 129 $Data = explode(' ', exec('uptime')); 130 $Data = array_slice($Data, 3, -8); 131 $Uptime = ''; 132 foreach($Data as $Item) 133 { 134 if(strpos($Item, ':')) $Uptime .= substr($Item, 0, -1).' hodin'; 135 else $Uptime .= $Item.' '; 136 } 137 $Uptime = str_replace('2 days,', '2 dny a', $Uptime); 138 $Uptime = str_replace('3 days,', '3 dny a', $Uptime); 139 $Uptime = str_replace('4 days,', '4 dny a', $Uptime); 140 $Uptime = str_replace('days,', 'dní a', $Uptime); 141 $Uptime = str_replace('day,', 'den a', $Uptime); 142 $Uptime = str_replace('min,', 'minut', $Uptime); 143 return($Uptime); 144 } 145 126 146 127 function Panel($Title, $Content, $Menu = array()) 147 128 { -
trunk/network.php
r265 r305 73 73 $Output .= '<a href="network/dostupnost.php">Měření dostupnosti zařízení</a><br />'; 74 74 $Output .= '<a href="network/subnet.php">Výpis registrovaných podsítí</a><br />'; 75 $Output .= '<a href="tkr.php">Kanály kabelové televize</a>';75 //$Output .= '<a href="tkr.php">Kanály kabelové televize</a>'; 76 76 } 77 77 return($Output);
Note:
See TracChangeset
for help on using the changeset viewer.