- Timestamp:
- Feb 16, 2009, 6:16:00 PM (16 years ago)
- Location:
- www
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
www/aktuality/news.php
r151 r153 85 85 function Show() 86 86 { 87 $Output = '<div class="PanelTitle"><span class="MenuItem">Aktuálně :</span><div class="MenuItem2"><a href="?Action=CustomizeNews">Upravit</a></div></div>';87 $Output = '<div class="PanelTitle"><span class="MenuItem">Aktuálně</span><div class="MenuItem2"><a href="?Action=CustomizeNews">Upravit</a></div></div>'; 88 88 89 89 $UploadedFilesFolder = 'aktuality/uploads/'; -
www/config.sample.php
r148 r153 1 1 <?php 2 2 3 $Config = array( 3 $Config = array 4 ( 4 5 'Database' => array 5 6 ( … … 17 18 'RootFolder' => '', 18 19 'Description' => 'Komunitní počítačová síť', 19 'Title' => 'ZděchovNET', 20 'Admin' => 'Chronos', 21 'AdminEmail' => 'robie@centrum.cz', 22 'ShowError' => 1, 20 'Title' => 'Síť', 21 'Admin' => 'Admin', 22 'AdminEmail' => 'admin@localhost', 23 'ShowError' => false, 24 'ShowSQLError' => false, 25 'ShowSQLQuery' => false, 23 26 'ErrorLogFile' => '/var/www/html/dev/centrala/www/php_script_error.log', 24 27 'WebcamPassword' => '', 25 28 'WebcamRefresh' => 5, 29 'UserSupport' => 1, 26 30 'News' => array 27 31 ( -
www/database.php
r148 r153 2 2 3 3 // Extended database class 4 // Date: 200 7-07-194 // Date: 2009-02-16 5 5 6 6 class Database extends mysqli 7 7 { 8 8 var $Prefix = ''; 9 var $LastQuery = '';10 9 11 10 function query($Query) 12 11 { 13 $this->LastQuery = $Query; 14 return(parent::query($Query)); 12 global $Config; 13 14 if($Config['Web']['ShowSQLQuery'] == true) 15 echo('<div style="border-bottom-width: 1px; border-bottom-style: solid; padding-bottom: 3px; padding-top: 3px; font-size: 12px; font-family: Arial;">'.$Query.'</div>'); 16 $Result = parent::query($Query); 17 if(($this->error != '') and ($Config['Web']['ShowSQLError'] == true)) 18 echo('<div><strong>SQL Error: </strong>'.$this->error.'<br>'.$Query.'</div>'); 19 20 return($Result); 15 21 } 16 22 17 23 function select($Table, $What = '*', $Condition = 1) 18 24 { 19 $this->LastQuery = "SELECT ".$What." FROM `".$this->Prefix.$Table."` WHERE ".$Condition; 20 return($this->query($this->LastQuery)); 25 return($this->query('SELECT '.$What.' FROM `'.$this->Prefix.$Table.'` WHERE '.$Condition)); 21 26 } 22 27 23 28 function delete($Table, $Condition) 24 29 { 25 $this->LastQuery = "DELETE FROM `".$this->Prefix.$Table."` WHERE ".$Condition; 26 $this->query($this->LastQuery); 30 $this->query('DELETE FROM `'.$this->Prefix.$Table.'` WHERE '.$Condition); 27 31 } 28 32 … … 41 45 $Name = substr($Name, 1); 42 46 $Values = substr($Values, 1); 43 $this->LastQuery = 'INSERT INTO `'.$this->Prefix.$Table.'` ('.$Name.') VALUES('.$Values.')'; 44 $this->query($this->LastQuery); 47 $this->query('INSERT INTO `'.$this->Prefix.$Table.'` ('.$Name.') VALUES('.$Values.')'); 45 48 } 46 49 … … 55 58 } 56 59 $Values = substr($Values, 2); 57 $this->LastQuery = 'UPDATE `'.$this->Prefix.$Table.'` SET '.$Values.' WHERE ('.$Condition.')'; 58 $this->query($this->LastQuery); 60 $this->query('UPDATE `'.$this->Prefix.$Table.'` SET '.$Values.' WHERE ('.$Condition.')'); 59 61 } 60 62 … … 73 75 $Values = substr($Values, 1); 74 76 //echo('REPLACE INTO `'.$this->Prefix.$Table.'` ('.$Name.') VALUES ('.$Values.')<br>'); 75 $this->LastQuery = 'REPLACE INTO `'.$this->Prefix.$Table.'` ('.$Name.') VALUES('.$Values.')'; 76 $this->query($this->LastQuery); 77 $this->query('REPLACE INTO `'.$this->Prefix.$Table.'` ('.$Name.') VALUES('.$Values.')'); 77 78 //echo($this->error().'<br>'); 78 79 } … … 80 81 function charset($Charset) 81 82 { 82 $this->LastQuery = "SET NAMES '".$Charset."'"; 83 $this->query($this->LastQuery); 83 $this->query('SET NAMES "'.$Charset.'"'); 84 84 } 85 85 -
www/error.php
r47 r153 6 6 //error_reporting(0); // Vypni interní obsluhu chyb 7 7 8 function obsluha_chyb($errno, $errmsg, $filename, $linenum, $vars)8 function CustomErrorHandler($errno, $errmsg, $filename, $linenum, $vars) 9 9 { 10 10 global $Config; … … 57 57 '<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2"></head><body>'."\n". 58 58 'Došlo k vnitřní chybě!<br> O chybě byl uvědoměn správce webu a chybu brzy odstraní.<br><br>'); 59 if($Config['Web']['ShowError'] == 1) echo('<pre>'.$err.'</pre><br>'); // V případě ladění chybu i zobraz59 if($Config['Web']['ShowError'] == true) echo('<pre>'.$err.'</pre><br>'); // V případě ladění chybu i zobraz 60 60 echo('</body></html>'); 61 61 if((E_ERROR | E_PARSE) & $errno) die(); … … 63 63 } 64 64 65 set_error_handler(' obsluha_chyb'); // Aktivuj novou obsluhu chyb65 set_error_handler('CustomErrorHandler'); // Aktivuj novou obsluhu chyb 66 66 67 67 ?> -
www/finance/index.php
r152 r153 15 15 16 16 $Output .= '<table><tr><td width="30%">'; 17 if(GetMemberByIP(GetRemoteAddress()) > 0) $Output .= '<a href="user_state .php">Vaše finanční operace</a><br /><br /><br />';17 if(GetMemberByIP(GetRemoteAddress()) > 0) $Output .= '<a href="user_state_ip.php">Vaše finanční operace (Tato volba je také přístupná po přihlášení do systému v uživatelském menu).</a><br /><br /><br />'; 18 18 19 19 $Output .= '<a href="monthly_overall.php">Měsíční přehledy</a><br />'; -
www/finance/prepocet.php
r133 r153 182 182 echo($TimePeriodText.': '.$PayPerMonth." * ".$MonthCount." = ".$PayPerPeriod."\n"); 183 183 $BillCode = GetNextDocumentLineNumber(6); // Faktury vydané 184 $BillId = $ InvoiceGenerator->CreateBill($User['id'], array(array('description' => 'Připojení k síti', 'price' => $PayPerPeriod, 'quantity' => 1)), $PeriodFrom, $PeriodTo, $BillCode);184 $BillId = $Bill->CreateBill($User['id'], array(array('description' => 'Připojení k síti', 'price' => $PayPerPeriod, 'quantity' => 1)), $PeriodFrom, $PeriodTo, $BillCode); 185 185 $Database->insert('finance_operations', array('money' => -$PayPerPeriod, 'user' => $User['id'], 'type' => 2, 'date' => 'NOW()', 'comment' => 'Připojení k síti za období '.$TimePeriodText, 'group' => 1, 'bill_id' => $BillId, 'BillCode' => $BillCode)); 186 186 } else echo("\n"); -
www/finance/user_state.php
r152 r153 16 16 if(!$this->System->Modules['User']->CheckPermission('Finance', 'DisplaySubjectState')) return('Nemáte oprávnění'); 17 17 18 //$UserId = $this->System->Modules['User']->User['Id']; 19 $UserId = GetMemberByIP(GetRemoteAddress()); 20 if(!array_key_exists('show',$_GET)) $_GET['show'] = ''; 18 $UserId = $this->System->Modules['User']->User['Id']; 19 if(!array_key_exists('show', $_GET)) $_GET['show'] = ''; 21 20 $DbResult = $this->Database->query("SELECT *,CONCAT(second_name, ' ', first_name) as fullname FROM users WHERE id=".$UserId); 22 21 $Row2 = $DbResult->fetch_array(); -
www/global.php
r152 r153 8 8 include('config.php'); 9 9 include('database.php'); 10 //include('error.php');10 include('error.php'); 11 11 include_once('code.php'); 12 12 $Database = new Database($Config['Database']['Host'], $Config['Database']['User'], $Config['Database']['Password'], $Config['Database']['Database']); -
www/index.php
r152 r153 77 77 //{ 78 78 $Title = array_shift($LinkGroup); 79 $Result .= '<div class="PanelTitle">'.$Title.' :</div>';79 $Result .= '<div class="PanelTitle">'.$Title.'</div>'; 80 80 foreach($LinkGroup as $Link) 81 81 { … … 137 137 { 138 138 $Output = '<div class="PanelTitle">Nabídka uživatele:</div>'. 139 '<a href="'.$this->System->Config['Web']['RootFolder'].'/?Action=UserOptions">Nastavení účtu</a><br />'. 140 '<a href="'.$this->System->Config['Web']['RootFolder'].'/finance/user_state.php">Stav financí</a><br />'. 141 '<a href="'.$this->System->Config['Web']['RootFolder'].'/network/user_hosts.php">Registrované počítače</a><br />'. 142 '<a href="'.$this->System->Config['Web']['RootFolder'].'/aktuality/?action=add">Vložení aktuality</a><br />'; 143 if($this->System->Modules['User']->CheckPermission('EatingPlace', 'Edit')) $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/jidelna/menuedit.php">Editace jídelníčků</a><br />'; 144 if($this->System->Modules['User']->CheckPermission('Finance', 'Manage')) $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/finance/manage.php">Správa financí</a><br />'; 145 if($this->System->Modules['User']->CheckPermission('Network', 'Administration')) $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/is/administration_page.php">Správa sítě</a><br />'; 139 '<a href="'.$this->System->Config['Web']['RootFolder'].'/?Action=UserOptions">Nastavení účtu</a><br />'; 140 if($this->System->Modules['User']->CheckPermission('Finance', 'DisplaySubjectState')) 141 $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/finance/user_state.php">Stav financí</a><br />'; 142 if($this->System->Modules['User']->CheckPermission('Network', 'RegistredHostList')) 143 $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/network/user_hosts.php">Registrované počítače</a><br />'; 144 //if($this->System->Modules['User']->CheckPermission('EatingPlace', 'Edit')) 145 $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/aktuality/?action=add">Vložení aktuality</a><br />'; 146 if($this->System->Modules['User']->CheckPermission('EatingPlace', 'Edit')) $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/jidelna/menuedit.php">Editace jídelníčků</a><br />'; 147 if($this->System->Modules['User']->CheckPermission('Finance', 'Manage')) $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/finance/manage.php">Správa financí</a><br />'; 148 if($this->System->Modules['User']->CheckPermission('Network', 'Administration')) $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/is/administration_page.php">Správa sítě</a><br />'; 146 149 return($Output); 147 150 } … … 149 152 function WebcamPanel() 150 153 { 151 $Output = '<div class="PanelTitle">Webkamery :</div>';154 $Output = '<div class="PanelTitle">Webkamery</div>'; 152 155 $Output .= $this->System->Modules['Webcam']->ShowImage(); 153 156 return($Output); … … 159 162 global $Database; 160 163 161 $Output = '<div class="PanelTitle">Online počítače :</div><span style="font-size: smaller;">';164 $Output = '<div class="PanelTitle">Online počítače</div><span style="font-size: smaller;">'; 162 165 $DbResult = $Database->select('hosts', '*', 'online=1 AND show_online=1 ORDER BY name'); 163 166 while($Row = $DbResult->fetch_array()) … … 169 172 } 170 173 171 /*172 174 // Zobrazení seznamu neplaticich uzivatelu 173 175 function ShowBadPayerList() … … 179 181 $Output .= $Row['fullname'].'<br />'; 180 182 } 181 echo('</span>'); 182 return($Output); 183 } 184 */ 183 $Output .= '</span>'; 184 return($Output); 185 } 185 186 186 187 // Zobrazení času běhu počítače … … 208 209 global $Database, $Config, $User; 209 210 210 $Database->select_db('share');211 //$Database->select_db('share'); 211 212 //$Output = $this->InfoBar(); 212 213 213 // Process cookies 214 $Output = ''; 214 215 if(array_key_exists('Action', $_GET)) 215 216 { … … 232 233 </tr> 233 234 <tr align="left"> 234 <td><a href="?Action= RegistrationForm">Registrovat se</a></td>235 <td><a href="?Action=UserRegister">Registrovat se</a></td> 235 236 <td><a href="?Action=PasswordRecovery">Obnova zapomenutého hesla</a></td> 236 237 </tr> … … 310 311 $Output .= '<div class="Panel">'.$this->System->Modules['News']->Show().'</div>'; 311 312 $Output .= '</td><td valign="top">'; 312 if($this->System->Modules['User']->User['Id'] != $this->System->Modules['User']->AnonymousUserId) $Output .= '<div class="Panel">'.$this->UserPanel().'</div>'; 313 if($this->System->Modules['User']->User['Id'] != $this->System->Modules['User']->AnonymousUserId) 314 $Output .= '<div class="Panel">'.$this->UserPanel().'</div>'; 313 315 $Output .= '<div class="Panel">'.$this->WebcamPanel().'</div>'; 314 316 $Output .= '<div class="Panel">'.$this->OnlineHostList().'</div>'; -
www/network/user_hosts.php
r148 r153 11 11 { 12 12 13 $Output = '<br /><table border="1" cellspacing="0" cellpadding="3" style="font-size: small; text-align: center;">13 $Output = '<br /><table class="WideTable"> 14 14 <tr><th>Jméno počítače</th><th>Místní IP adresa</th><th>Veřejná IP adresa</th><th>CZFree IP adresa</th><th>Naposledy online</th><th>Fyzická adresa</th></tr>'; 15 15 … … 24 24 if($Host['online'] == 1) $Style = 'font-weight: bold; color: blue;'; else $Style = ''; 25 25 if($Host['IP'] == '') $Host['IP'] = ' '; 26 if($Host['name'] == '') $Host['name'] = ' '; 27 if($Host['czfree_ip'] == '') $Host['czfree_ip'] = ' '; 28 if($Host['external_ip'] == '') $Host['external_ip'] = ' '; 29 if($Host['MAC'] == '') $Host['MAC'] = ' '; 26 30 $Output .= '<tr><td style="text-align: left; '.$Style.'">'.$Host['name'].'</td><td>'.$Host['IP'].'</td><td>'.$Host['external_ip'].'</td><td>'.$Host['czfree_ip'].'</td><td >'.HumanDate($Host['last_online']).'</td><td>'.$Host['MAC'].'</td></tr>'; 27 31 } … … 29 33 return($Output); 30 34 } 31 32 35 } 33 36 -
www/otevreno.php
r148 r153 11 11 { 12 12 $Output = '<div align="center">'; 13 $DbResult = $this->Database->query('SELECT SubjectOpenTime.*, DATE_FORMAT(SubjectOpenTime.UpdateTime, "%e.%c.%Y") as UpdateTime, Subject.Name as Name FROM SubjectOpenTime JOIN Subject ON Subject.Id = SubjectOpenTime.Subject ');14 while($Subject = $DbResult->fetch_a rray())13 $DbResult = $this->Database->query('SELECT SubjectOpenTime.*, DATE_FORMAT(SubjectOpenTime.UpdateTime, "%e.%c.%Y") as UpdateTime, Subject.Name as Name FROM SubjectOpenTime JOIN Subject ON Subject.Id = SubjectOpenTime.Subject ORDER BY Name'); 14 while($Subject = $DbResult->fetch_assoc()) 15 15 { 16 16 $Output .= '<strong>'.$Subject['Name'].':</strong><br />'; … … 18 18 if($DbResult2->num_rows > 0) 19 19 { 20 $DbRow = $DbResult2->fetch_a rray();20 $DbRow = $DbResult2->fetch_assoc(); 21 21 $Output .= 'Zavírá za '.$DbRow['RemainTime']; 22 22 } else 23 23 { 24 24 $DbResult2 = $this->Database->query('SELECT Subject, OpenTime, CloseTime, TIMEDIFF(OpenTime, DATE_FORMAT(NOW(), "0000-01-%w %T")) as RemainTime FROM `SubjectOpenTimeInterval` WHERE DATE_FORMAT(NOW(), "0000-01-%w %T") < OpenTime AND Subject='.$Subject['Subject'].' ORDER BY OpenTime LIMIT 1'); 25 $DbRow = $DbResult2->fetch_a rray();25 $DbRow = $DbResult2->fetch_assoc(); 26 26 $Output .= 'Otevírá za '.$DbRow['RemainTime']; 27 27 } … … 34 34 if($DbResult2->num_rows) 35 35 { 36 while($TimeInterval = $DbResult2->fetch_a rray())36 while($TimeInterval = $DbResult2->fetch_assoc()) 37 37 { 38 38 $Output .= $TimeInterval['OpenTime'].' - '.$TimeInterval['CloseTime'].' '; -
www/style.css
r148 r153 263 263 border-width: 0px 0px 1px 1px; 264 264 padding: 1px 10px 1px 10px; 265 } 265 text-align: center; 266 } -
www/temp/transform.php
r151 r153 105 105 function SubjectOpenTime() 106 106 { 107 $this->Database->query('DELETE FROM Subject WHERE Subject.Id = SubjectOpenTime.Subject');108 $this->Database->query('TRUNCATE TABLE SubjectOpenTime');109 $this->Database->query('TRUNCATE TABLE SubjectOpenTimeInterval');107 //$this->Database->query('DELETE FROM `Subject` WHERE `Subject`.`Id` = (SELECT `Subject` FROM `SubjectOpenTime`)'); 108 $this->Database->query('TRUNCATE TABLE `SubjectOpenTime`'); 109 $this->Database->query('TRUNCATE TABLE `SubjectOpenTimeInterval`'); 110 110 foreach($this->Subjects as $SubjectName => $Subject) 111 111 { … … 159 159 $this->Database->insert('PermissionGroupAssignment', array('Group' => $PermissionGroupOthers, 'GroupOrOperation' => $OperationId, 'Type' => 'Operation')); 160 160 161 $this->Database->insert('PermissionOperation', array('Module' => 'News', 'Operation' => 'Display', 'Item' => 'Item')); 162 $OperationId = $this->Database->insert_id; 163 $this->Database->insert('PermissionGroupAssignment', array('Group' => $PermissionGroupOthers, 'GroupOrOperation' => $OperationId, 'Type' => 'Operation')); 164 161 165 $DbResult = $this->Database->select('news_category', 'id, permission'); 162 166 while($DbRow = $DbResult->fetch_array()) … … 167 171 $OperationIdDisplay = $this->Database->insert_id; 168 172 $this->Database->insert('PermissionGroupAssignment', array('Group' => $PermissionGroupOthers, 'GroupOrOperation' => $OperationIdDisplay, 'Type' => 'Operation')); 169 if($DbRow['permission'] == 1)170 { 171 $this->Database->insert('PermissionGroupAssignment', array('Group' => $PermissionGroupNetworkAdmins, 'GroupOrO operation' => $OperationIdInsert, 'Type' => 'Operation'));173 if($DbRow['permission'] == 0) 174 { 175 $this->Database->insert('PermissionGroupAssignment', array('Group' => $PermissionGroupNetworkAdmins, 'GroupOrOperation' => $OperationIdInsert, 'Type' => 'Operation')); 172 176 } else 173 177 { … … 189 193 190 194 $this->Database->insert('PermissionOperation', array('Module' => 'EatingPlace', 'Operation' => 'Edit')); 191 $OperationId = $this->Database->insert_id;192 $this->Database->insert('PermissionGroupAssignment', array('Group' => $PermissionGroupMembers, 'GroupOrOperation' => $OperationId, 'Type' => 'Operation'));195 //$OperationId = $this->Database->insert_id; 196 //$this->Database->insert('PermissionGroupAssignment', array('Group' => $PermissionGroupMembers, 'GroupOrOperation' => $OperationId, 'Type' => 'Operation')); 193 197 194 198 $this->Database->insert('PermissionOperation', array('Module' => 'Finance', 'Operation' => 'Manage')); … … 207 211 $OperationId = $this->Database->insert_id; 208 212 $this->Database->insert('PermissionGroupAssignment', array('Group' => $PermissionGroupNetworkAdmins, 'GroupOrOperation' => $OperationId, 'Type' => 'Operation')); 213 214 $this->Database->insert('PermissionOperation', array('Module' => 'Network', 'Operation' => 'RegistredHostList')); 215 $OperationId = $this->Database->insert_id; 216 $this->Database->insert('PermissionGroupAssignment', array('Group' => $PermissionGroupSubjects, 'GroupOrOperation' => $OperationId, 'Type' => 'Operation')); 209 217 210 218 // Init User table from users … … 212 220 while($DbRow = $DbResult->fetch_array()) 213 221 { 214 $this->Database->insert('User', array('Id' => $DbRow['id'], 'Name' => $DbRow['nick'], 'FirstName' => $DbRow['first_name'], 'SecondName' => $DbRow['second_name'], 'PhoneNumber' => $DbRow['phone'], 'Password' => substr(sha1(strtoupper($DbRow['nick'])), 0, 7 ), 'ICQ' => $DbRow['icq'], 'Email' => $DbRow['email'], 'Locked' => 0));222 $this->Database->insert('User', array('Id' => $DbRow['id'], 'Name' => $DbRow['nick'], 'FirstName' => $DbRow['first_name'], 'SecondName' => $DbRow['second_name'], 'PhoneNumber' => $DbRow['phone'], 'Password' => substr(sha1(strtoupper($DbRow['nick'])), 0, 70), 'ICQ' => $DbRow['icq'], 'Email' => $DbRow['email'], 'Locked' => 0)); 215 223 $UserId = $this->Database->insert_id; 216 224 if($DbRow['id'] == 1) -
www/user.php
r152 r153 2 2 3 3 define('NICK_USED', 'Přihlašovací jméno již použito.'); 4 define('EMAIL_USED', 'Email je již použitý. ');5 define('USER_REGISTRATED', 'Uživatel zaregistrován.');4 define('EMAIL_USED', 'Email je již použitý. Použijte jiný email nebo si můžete nechat zaslat nové heslo na email.'); 5 define('USER_REGISTRATED', 'Uživatel registrován. Na zadanou emailovou adresu byl poslán mail s odkazem pro aktivování účtu.'); 6 6 define('USER_REGISTRATION_CONFIRMED', 'Vaše registrace byla potvrzena.'); 7 7 define('DATA_MISSING', 'Chybí emailová adresa, přezdívka, nebo některé z hesel.'); 8 8 define('PASSWORDS_UNMATCHED', 'Hesla si neodpovídají.'); 9 define('ACCOUNT_LOCKED', 'Účet uzamčen. Po registraci je nutné provést aktivaci účtu podle zaslaného aktivačníhoemailu.');9 define('ACCOUNT_LOCKED', 'Účet je uzamčen. Po registraci je nutné provést aktivaci účtu pomocí odkazu zaslaného v aktivačním emailu.'); 10 10 define('USER_NOT_LOGGED', 'Nejste přihlášen.'); 11 11 define('USER_LOGGED', 'Uživatel přihlášen.'); … … 94 94 $this->Database->insert('User', array('Name' => $Nick, 'FirstName' => $FirstName, 'SecondName' => $SecondName, 'Password' => sha1($Password), 'Email' => $Email, 'RegistrationTime' => 'NOW()', 'Locked' => 1)); 95 95 $UserId = $this->Database->insert_id; 96 $this->Database->insert('PermissionUserAssignment', array('User' => $UserId, 'GroupOrOperation' => 1, 'Type' => 'Group')); 96 97 97 98 $Subject = FromUTF8('Registrace nového účtu', 'iso2'); 98 $Message = 'Provedli jste registraci nového účtu na serveru <a href="http://'.$Config['Web']['Host'].$Config['Web']['RootFolder'].'">http://'.$Config['Web']['Host'].$Config['Web']['RootFolder']."</a>.<br>\nPokud jste tak neučinili, měli by jste tento email ignorovat.<br><br>\n\nVáš účet je: ".$Nick."\n<br>Pro dokončení registrace klikněte na ".'<a href="http://'.$Config['Web']['Host'].$Config['Web']['RootFolder'].'/?Action=UserRegisterConfirm& amp;User='.$UserId.'&H='.sha1($Password).'">tento odkaz</a>.'."\n<br> \n\n<br><br>Na tento email neodpovídejte.";99 $Message = 'Provedli jste registraci nového účtu na serveru <a href="http://'.$Config['Web']['Host'].$Config['Web']['RootFolder'].'">http://'.$Config['Web']['Host'].$Config['Web']['RootFolder']."</a>.<br>\nPokud jste tak neučinili, měli by jste tento email ignorovat.<br><br>\n\nVáš účet je: ".$Nick."\n<br>Pro dokončení registrace klikněte na ".'<a href="http://'.$Config['Web']['Host'].$Config['Web']['RootFolder'].'/?Action=UserRegisterConfirm&User='.$UserId.'&H='.sha1($Password).'">tento odkaz</a>.'."\n<br> \n\n<br><br>Na tento email neodpovídejte."; 99 100 $AdditionalHeaders = "To: ".$Nick." <".$Email.">\n"."From: ".FromUTF8($Config['Web']['Title'], 'iso2')." <noreplay@zdechov.net>\n"."MIME-Version: 1.0\n"."Content-type: text/html; charset=utf-8"; 100 101 mail($Email, $Subject, $Message, $AdditionalHeaders); … … 130 131 if($Query->num_rows > 0) 131 132 { 132 $Row = $Query->fetch_a rray();133 $Row = $Query->fetch_assoc(); 133 134 if($Row['Password'] != sha1($Password)) $Result = BAD_PASSWORD; 134 135 else if($Row['Locked'] == 1) $Result = ACCOUNT_LOCKED; … … 136 137 { 137 138 $this->Database->update('User', 'Id='.$Row['Id'], array('LastLoginTime' => 'NOW()')); 139 138 140 $this->Database->update('UserOnline', 'SessionId="'.$SID.'"', array('User' => $Row['Id'])); 139 141 // načtení stavu stromu … … 203 205 function CheckPermission($Module, $Operation, $ItemType = '', $ItemIndex = 0) 204 206 { 205 return(true);206 207 $DbResult = $this->Database->select('PermissionOperation', 'Id', '`Module`="'.$Module.'" AND `Item`="'.$ItemType.'" AND `ItemId`='.$ItemIndex.' AND `Operation`="'.$Operation.'"'); 207 208 if($DbResult->num_rows > 0) … … 235 236 236 237 $Subject = 'Obnova hesla'; 237 $Message = 'Požádali jste o zaslání nového hesla na serveru <a href="http://'.$Config['Web']['Host'].$Config['Web']['RootFolder'].'">http://'.$Config['Web']['Host'].$Config['Web']['RootFolder']."</a>.<br>\nPokud jste tak neučinili, měli by jste tento email ignorovat.<br><br>\n\nVaše nové heslo k účtu ".$Row['Name']." je: ".$NewPassword."\n<br>Pro aktivaci tohoto hesla klikněte na ".'<a href="http://'.$Config['Web']['Host'].$Config['Web']['RootFolder'].'/?Action=PasswordRecoveryConfirm& amp;User='.$Row['Id'].'&H='.$Row['Password'].'&P='.$NewPassword.'">tento odkaz</a>.'."\n<br> Po přihlášení si prosím změňte heslo na nové.\n\n<br><br>Na tento email neodpovídejte.";238 $Message = 'Požádali jste o zaslání nového hesla na serveru <a href="http://'.$Config['Web']['Host'].$Config['Web']['RootFolder'].'">http://'.$Config['Web']['Host'].$Config['Web']['RootFolder']."</a>.<br>\nPokud jste tak neučinili, měli by jste tento email ignorovat.<br><br>\n\nVaše nové heslo k účtu ".$Row['Name']." je: ".$NewPassword."\n<br>Pro aktivaci tohoto hesla klikněte na ".'<a href="http://'.$Config['Web']['Host'].$Config['Web']['RootFolder'].'/?Action=PasswordRecoveryConfirm&User='.$Row['Id'].'&H='.$Row['Password'].'&P='.$NewPassword.'">tento odkaz</a>.'."\n<br> Po přihlášení si prosím změňte heslo na nové.\n\n<br><br>Na tento email neodpovídejte."; 238 239 $AdditionalHeaders = "To: ".$Row['Name']." <".$Row['Email'].">\n"."From: ".FromUTF8($Config['Web']['Title'], 'iso2')." <noreplay@zdechov.net>\n"."MIME-Version: 1.0\n"."Content-type: text/html; charset=utf-8"; 239 240 mail($Row['Email'], $Subject, $Message, $AdditionalHeaders);
Note:
See TracChangeset
for help on using the changeset viewer.