Changeset 78 for www/index.php
- Timestamp:
- May 27, 2008, 1:54:41 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
www/index.php
r77 r78 40 40 $_COOKIE['NewsSetting'] = serialize($Setting); 41 41 setcookie('NewsSetting', $_COOKIE['NewsSetting']); 42 } else 43 if($_GET['Action'] == 'LoginForm') 44 { 45 $Output = ' 46 <form action="?Action=Login" method="post"> 47 <table class="hidden"> 48 <tr align="left"><td colspan="2">Jméno:</td></tr> 49 <tr align="left"><td colspan="2"><input type="text" name="Username" size="40" maxlength="16" /></td></tr> 50 <tr align="left"><td colspan="2">Heslo:</td></tr> 51 <tr align="left"><td colspan="2"><input type="password" name="Password" size="40" maxlength="16" /></td></tr> 52 <tr><td colspan="2"> </td></tr> 53 <tr align="left"> 54 <td><input type="checkbox" name="remember" value="1" checked="checked" /> Trvalé přihlášení</td> 55 <td align="right"><input type="submit" value="Přihlásit" /></td> 56 </tr> 57 <tr align="left"> 58 <td><a href="?Action=RegistrationForm">Registrovat se</a></td> 59 <td><a href="?Action=PasswordRecovery">Obnova zapomenutého hesla</a></td> 60 </tr> 61 </table> 62 </form>'; 63 SystemMessage('Test', $Output); 64 } else 65 if($_GET['Action'] == 'Login') 66 { 67 SystemMessage('Přihlášení', $User->Login($_POST['Username'], $_POST['Password'])); 68 } else 69 if($_GET['Action'] == 'Logout') 70 { 71 SystemMessage('Odhlášení', $User->Logout()); 72 } else 73 if($_GET['Action'] == 'UserOptions') 74 { 75 76 $Output = '<center><fieldset style="width: 500px;"><legend>Základní nastavení</legend>'; 77 $Output .= '<form action="?Action=UserOptionsSave"><table>'; 78 $Output .= '<tr><td>Přihlašovací jméno:</td><td><input type="text" name="Name"></td><td>'; 79 $Output .= '<tr><td>Heslo:</td><td><input type="password" name="Password"></td><td>'; 80 $Output .= '<tr><td>Křestní jméno:</td><td><input type="text" name="FirstName"></td><td>'; 81 $Output .= '<tr><td>Příjmení:</td><td><input type="text" name="SecondName"></td><td>'; 82 $Output .= '<tr><td>E-mail:</td><td><input type="text" name="Email"></td><td>'; 83 $Output .= '<tr><td colspan="2" align="center"><input type="submit" value="Uložit" /></td></tr></table></form></fieldset></center>'; 84 echo($Output); 42 85 } 43 86 } … … 138 181 139 182 // Zobrazení seznamu neplaticich uzivatelu 183 /* 140 184 echo('<strong>Dlužníci:</strong><br /><span style="font-size: smaller;">'); 141 185 $DbResult = $Database->select('users', 'CONCAT(second_name, " ", first_name) as fullname', 'cash<0 AND role=2 ORDER BY cash'); … … 145 189 } 146 190 echo('</span>'); 191 */ 147 192 148 193 echo('</td></tr></table>'); … … 218 263 $DbResult = $Database->select('news_category', '*', 'id='.$SettingItem['CategoryId']); 219 264 $NewsCategory = $DbResult->fetch_array(); 220 echo('<tr><td>'.$NewsCategory['caption'].'</td><td align="center"><input type="text" size="1" name="NewsCategoryIndex'.$I.'" value="'.$SettingItem['Index'].'" ></td><td align="center"><input type="checkbox" name="NewsCategoryEnabled'.$I.'"');221 if($SettingItem['Enabled'] == 1) echo(' CHECKED');222 echo(' ></td>'.223 '<td align="center"><input type="text" size="1" name="NewsCategoryCount'.$I.'" value="'.$SettingItem['ItemCount'].'" >'.224 '<input type="hidden" name="NewsCategoryId'.$I.'" value="'.$SettingItem['CategoryId'].'" ></td><td align="center"><input type="text" size="1" name="NewsCategoryDaysAgo'.$I.'" value="'.$SettingItem['DaysAgo'].'"></td></tr>');265 echo('<tr><td>'.$NewsCategory['caption'].'</td><td align="center"><input type="text" size="1" name="NewsCategoryIndex'.$I.'" value="'.$SettingItem['Index'].'" /></td><td align="center"><input type="checkbox" name="NewsCategoryEnabled'.$I.'"'); 266 if($SettingItem['Enabled'] == 1) echo(' checked="checked"'); 267 echo(' /></td>'. 268 '<td align="center"><input type="text" size="1" name="NewsCategoryCount'.$I.'" value="'.$SettingItem['ItemCount'].'" />'. 269 '<input type="hidden" name="NewsCategoryId'.$I.'" value="'.$SettingItem['CategoryId'].'" /></td><td align="center"><input type="text" size="1" name="NewsCategoryDaysAgo'.$I.'" value="'.$SettingItem['DaysAgo'].'" /></td></tr>'); 225 270 $I++; 226 271 } 227 echo('</table><input type="hidden" name="NewsCategoryCount" value="'.count($NewsSetting).'" ><input type="submit" value="Uložit"></form></td></tr></table>');272 echo('</table><input type="hidden" name="NewsCategoryCount" value="'.count($NewsSetting).'" /><input type="submit" value="Uložit" /></form></td></tr></table>'); 228 273 } 229 274 }
Note:
See TracChangeset
for help on using the changeset viewer.