Changeset 187


Ignore:
Timestamp:
Apr 5, 2009, 3:54:46 PM (16 years ago)
Author:
george
Message:
  • Přidáno: Možnost registrace podsítí pro klienty.
  • Upraveno: Skripty pro generování nastavení routerů byly upraveny pro podporu tabulky NetworkSubnet.
Location:
trunk
Files:
1 added
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/aktuality/rss.php

    r183 r187  
    7272  if($Row['enclosure'] != '')
    7373  {
    74     $EnclosuresText .= '<br>Přílohy: ';
     74    $EnclosuresText .= '<br />Přílohy: ';
    7575    $Enclosures = explode(';', $Row['enclosure']);
    7676    foreach($Enclosures as $Enclosure)
  • trunk/config.sample.php

    r163 r187  
    4949   'UserName' => 'admin',
    5050   'Password' => '',
     51   'InetInterface' => 'ether0',
    5152  ), 
    5253);
  • trunk/database.php

    r153 r187  
    1616        $Result = parent::query($Query);
    1717    if(($this->error != '') and ($Config['Web']['ShowSQLError'] == true))
    18           echo('<div><strong>SQL Error: </strong>'.$this->error.'<br>'.$Query.'</div>');
     18          echo('<div><strong>SQL Error: </strong>'.$this->error.'<br />'.$Query.'</div>');
    1919
    2020    return($Result); 
     
    5555            $Value = strtr($Value, '"', '\"');
    5656      if($Value != 'NOW()') $Value = "'".$Value."'";
    57       $Values .= ", ".$Key."=".$Value;
     57      $Values .= ', '.$Key.'='.$Value;
    5858    }
    5959    $Values = substr($Values, 2); 
     
    6969      $Value = strtr($Value, '"', '\"');
    7070      $Name .= ',`'.$Key.'`';
    71       if($Value == 'NOW()') $Values .= ",".$Value;
     71      if($Value == 'NOW()') $Values .= ','.$Value;
    7272        else $Values .= ',"'.$Value.'"';
    7373    }
    7474    $Name = substr($Name, 1);
    7575    $Values = substr($Values, 1);
    76     //echo('REPLACE INTO `'.$this->Prefix.$Table.'` ('.$Name.') VALUES ('.$Values.')<br>');
     76    //echo('REPLACE INTO `'.$this->Prefix.$Table.'` ('.$Name.') VALUES ('.$Values.')<br />');
    7777    $this->query('REPLACE INTO `'.$this->Prefix.$Table.'` ('.$Name.') VALUES('.$Values.')');
    7878    //echo($this->error().'<br>');
     
    8383    $this->query('SET NAMES "'.$Charset.'"');
    8484  }
    85 
    8685}
    8786
  • trunk/error.php

    r153 r187  
    1010  global $Config;
    1111 
    12   $dt = date("Y-m-d H:i:s");            // časové razítko položky
     12  $dt = date('Y-m-d H:i:s');            // časové razítko položky
    1313  $errortype = array(
    1414    1 => "Error",
     
    2828  if(($user_errors & $errno))
    2929  {
    30     $err = '# '.$dt.' : '.$errmsg." on line ".$linenum."\n";
     30    $err = '# '.$dt.' : '.$errmsg.' on line '.$linenum."\n";
    3131    $Backtrace = debug_backtrace();
    3232    array_shift($Backtrace);
     
    5353          //$err = "Datum: ".$dt."\nHlášení: ".$errmsg."\nSkript: ".$filename."\nŘádek: ".$linenum;
    5454    // mail($Config['Web']['AdminEmail'], $Config['Web']['Title'].' - Chybové hlášení', $err);          // Pošli mi zprávu (pokud je to kritická chyba)
    55           echo('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head>'."\n".
    56     '<meta http-equiv="Content-Language" content="cs">'."\n".
    57     '<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2"></head><body>'."\n".
    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'] == true) echo('<pre>'.$err.'</pre><br>');                        // V případě ladění chybu i zobraz
     55          echo('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head>'.
     56    '<meta http-equiv="Content-Language" content="cs">'.
     57    '<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body>'.
     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'] == true) echo('<pre>'.$err.'</pre><br />');                      // V případě ladění chybu i zobraz
    6060    echo('</body></html>');
    6161    if((E_ERROR | E_PARSE) & $errno) die();
  • trunk/forms.php

    r183 r187  
    190190        case 'Array':
    191191          $I = 1;
    192           //echo('Expect: '.$Context.$Item['ItemClass'].'-'.$I.'<br>');
     192          //echo('Expect: '.$Context.$Item['ItemClass'].'-'.$I.'<br />');
    193193          while(isset($_POST[$Context.$Item['ItemClass'].'-'.$I]))
    194194          {
  • trunk/global.php

    r178 r187  
    3232    global $Database;
    3333
    34     //echo('Přidávám modul '.get_class($Module).'<br>');
     34    //echo('Přidávám modul '.get_class($Module).'<br />');
    3535    $Module->System = &$this;
    3636    $Module->Database = &$Database;
     
    202202  return(str_replace(
    203203    array("á","č","ď","é","ě","í","ľ","ň","ó","ř","š","ť","ú","ů","ý","ž","Á","Č","Ď","É","Ě","Í","Ľ","Ň","Ó","Ř","Š","Ť","Ú","Ů","Ý","Ž"),
    204     array("a","c","d","e","e","i","l","n","o","r","s","t","u","u","y","z","A","C","D","E","E","I","L","N","O","R","S","T","U","U","Y","Z"), $Text));
    205 }
     204    array("a","c","d","e","e","i","l","n","o","r","s","t","u","u","y","z","A","C","D","E","E","I","L","N","O","R","S","T","U","U","Y","Z"),
     205    $Text));
     206}
     207
     208function CIDRToAddressRange($Subnet, $Mask)
     209{
     210  $SubnetParts = explode('.', $Subnet);
     211  $SubnetBinary = ($SubnetParts[0] << 24) | ($SubnetParts[1] << 16) | ($SubnetParts[2] << 8) | $SubnetParts[3];
     212  $SubnetTopBinary = $SubnetBinary + (1 << (32 - $Mask)) - 1;
     213  $SubnetTopParts = array(($SubnetTopBinary >> 24) & 255, ($SubnetTopBinary >> 16) & 255, ($SubnetTopBinary >> 8) & 255, ($SubnetTopBinary & 255));
     214  $SubnetTop = implode('.', $SubnetTopParts);
     215  return(array('From' => $Subnet, 'To' => $SubnetTop));
     216}
     217
     218function RouterOSIdent($Name)
     219{
     220  return(strtr(strtolower(trim($Name)), array(' ' => '-', '.' => '', '(' => '-', ')' => '-',
     221  'č' => 'c', 'š' => 's', 'ě' => 'e', 'ř' => 'r', 'ž' => 'z', 'ý' => 'y', 'á' => 'a', 'í' => 'i', 'é' => 'e', 'ů' => 'u', 'ú' => 'u', 'ď' => 'd', 'ť' => 't', 'ň' => 'n', 'ó' => 'o',
     222  'Č' => 'c', 'Š' => 's', 'Ě' => 'e', 'Ř' => 'r', 'Ž' => 'z', 'Ý' => 'y', 'Á' => 'a', 'Í' => 'i', 'É' => 'e', 'Ů' => 'u', 'Ú' => 'u', 'Ď' => 'd', 'Ť' => 't', 'Ň' => 'n', 'Ó' => 'o',
     223)));
     224}
     225
     226
    206227
    207228?>
  • trunk/index.php

    r186 r187  
    3535      array('Plány do budoucna', '/ukoly.php', ''),
    3636          ),
    37           'local' => array('Místní subjekty',
     37          'local' => array('Místní organizace',
    3838      array('Obecní úřad', 'http://www.zdechov.cz/', 'obec_zdechov.ico'),
    3939      array('Motokrosová grapa', 'http://zdechovskagrapa.sweb.cz/', ''),
     
    5757    'usefull' => array('Užitečné',
    5858      array('Mapa ČR', 'http://www.mapy.cz/', ''),
    59       array('Online TV', 'http://www.tvinfo.cz/live/televize/evropa/cz/', 'www_tvinfo_cz.gif'),
     59      array('Online TV', 'http://www.tvinfo.cz/live/televize/evropa/cz', 'www_tvinfo_cz.gif'),
    6060      array('Jízdní řády', 'http://jizdnirady.idnes.cz/', 'www_idos_cz.gif'),
    6161      array('TV programy', 'http://tv.atlas.cz/', 'www_atlas_cz.gif'),
  • trunk/page.php

    r183 r187  
    120120    foreach($ScriptNameParts as $ScriptNamePart)
    121121    {
    122       //echo($ScriptNamePart.'<br>');
     122      //echo($ScriptNamePart.'<br />');
    123123      if(array_key_exists($ScriptNamePart, $PathTreeItem))
    124124      {
  • trunk/system/generators/dhcp_routerboard.php

    r171 r187  
    33include_once('../../global.php');
    44
    5 $UserName = 'admin-ssh';
    6 
    7 $DbResult = $Database->query('SELECT * FROM NetworkSubnet');
     5$DbResult = $Database->query('SELECT * FROM `NetworkSubnet` WHERE `Member` = 0');
    86while($Subnet = $DbResult->fetch_assoc())
    97{
     
    1311  $Commands = array();
    1412  $Commands[] = '/ip dhcp-server lease { remove [find server=dhcp'.$I.']}';
    15   $DbResult2 = $Database->query('SELECT * FROM hosts WHERE (IP LIKE "192.168.'.$I.'.%") AND (MAC != "00:00:00:00:00:00") ORDER BY IP');
     13  $DbResult2 = $Database->query('SELECT * FROM `hosts` WHERE (`IP` LIKE "192.168.'.$I.'.%") AND (`MAC` != "00:00:00:00:00:00") ORDER BY `IP`');
    1614  while($Host = $DbResult2->fetch_assoc())
    1715  {
     
    1917  }
    2018  $Commands = implode(';', $Commands);
    21   $Command = '/usr/bin/ssh -l '.$UserName.' -i id_dsa '.$Subnet['DHCP'].' "'.$Commands.'"';
     19  $Command = '/usr/bin/ssh -l '.$Config['MainRouter']['UserName'].' -i id_dsa '.$Subnet['DHCP'].' "'.$Commands.'"';
    2220  //echo($Command."\n");
    2321  $Output = '';
  • trunk/system/generators/nat_routerboard.php

    r174 r187  
    33include_once('../../global.php');
    44
    5 $InetInterface = 'ether3';
    6 $Router = '192.168.0.11';
     5$InetInterface = $Config['MainRouter']['InetInterface'];
    76
    87$Commands = array();
     
    1211while($Member = $DbResult->fetch_assoc())
    1312{
    14   echo($Member['Name']."\n");
     13  echo($Member['Name'].': ');
     14  // Hosts
    1515  $DbResult2 = $Database->select('hosts', '*', '(external_ip <> "") AND (user='.$Member['Id'].') AND (IP != external_ip) ORDER BY id DESC');
    1616  while($Host = $DbResult2->fetch_assoc())
    1717  {
    18     echo($Host['name']."\n");
     18    $Host['name'] = RouterOSIdent($Host['name']);
     19    echo($Host['name'].'('.$Host['IP'].'), ');
    1920    $Commands[] = ' /ip firewall nat add chain=srcnat src-address='.$Host['IP'].' out-interface='.$InetInterface.' action=src-nat to-addresses='.$Host['external_ip'].' comment="'.$Host['name'].'"';
    2021    $Commands[] = ' /ip firewall nat add chain=dstnat dst-address='.$Host['external_ip'].' in-interface='.$InetInterface.' action=dst-nat to-addresses='.$Host['IP'].' comment="'.$Host['name'].'"';
    2122  }
     23
     24  // Subnets
     25  $DbResult2 = $Database->select('NetworkSubnet', '*', 'Member='.$Member['Id']);
     26  while($Subnet = $DbResult2->fetch_assoc())
     27  {
     28    $Subnet['Name'] = RouterOSIdent('subnet-'.$Subnet['Name']);
     29    echo($Subnet['Name'].'('.$Subnet['AddressRange'].'/'.$Subnet['Mask'].'), ');
     30    $Range = CIDRToAddressRange($Subnet['ExtAddressRange'], $Subnet['ExtMask']);
     31    $Range = $Range['From'].'-'.$Range['To'];
     32    $Commands[] = ' /ip firewall nat add chain=srcnat src-address-list='.$Subnet['AddressRange'].'/'.$Subnet['Mask'].' out-interface='.$InetInterface.' action=src-nat to-addresses='.$Range.' comment="'.$Subnet['Name'].'"';
     33    $Range = CIDRToAddressRange($Subnet['AddressRange'], $Subnet['Mask']);
     34    $Range = $Range['From'].'-'.$Range['To'];
     35    $Commands[] = ' /ip firewall nat add chain=dstnat dst-address-list='.$Subnet['ExtAddressRange'].'/'.$Subnet['ExtMask'].' in-interface='.$InetInterface.' action=dst-nat to-addresses='.$Range.' comment="'.$Subnet['Name'].'"';
     36  }
     37  echo("\n");
    2238}
    2339
     
    2945
    3046$Commands = addslashes(implode(';', $Commands));
    31 $Command = '/usr/bin/ssh -l admin-ssh -i id_dsa '.$Router.' "'.$Commands.'"';
     47$Command = '/usr/bin/ssh -l '.$Config['MainRouter']['UserName'].' -i id_dsa '.$Config['MainRouter']['HostName'].' "'.$Commands.'"';
     48$Output = array();
    3249echo($Command."\n");
    33 //exec($Command, $Output);
     50exec($Command, $Output);
    3451//array_pop($Output);
    3552//print_r($Output);
  • trunk/system/generators/netwatch.php

    r171 r187  
    33include_once('../../global.php');
    44
    5 $UserName = 'admin-ssh';
    6 
    7 $DbResult3 = $Database->query('SELECT DISTINCT (`DHCP`) FROM `NetworkSubnet`');
     5$DbResult3 = $Database->query('SELECT DISTINCT (`DHCP`) FROM `NetworkSubnet` WHERE `Member` = 0');
    86while($Router = $DbResult3->fetch_assoc())
    97{
     
    2321  }
    2422  $Commands = implode(';', $Commands);
    25   $Command = '/usr/bin/ssh -l '.$UserName.' -i id_dsa '.$Router['DHCP'].' "'.$Commands.'"';
     23  $Command = '/usr/bin/ssh -l '.$Config['MainRouter']['UserName'].' -i id_dsa '.$Router['DHCP'].' "'.$Commands.'"';
    2624  //echo($Command."\n");
    2725  $Output = '';
  • trunk/system/generators/traffic_shaping_routerboard.php

    r171 r187  
    2626$OutInterface = 'eth1';
    2727$InInterface = 'ifb0';
     28$InetInterface = $Config['MainRouter']['InetInterface'];
    2829$FreeInetSpeed = 64 * 1024;
    29 
    30 $InetInterface = 'ether3';
    31 $Router = '192.168.0.11';
    3230
    3331$Commands = array();
     
    4341
    4442// Divide rules by subnet number
    45 foreach(array(0, 1, 2, 3, 4, 5, 7) as $Subnet)
     43$DbResult = $Database->query('SELECT Id, AddressRange, Mask FROM NetworkSubnet WHERE Member = 0');
     44while($Subnet = $DbResult->fetch_assoc())
    4645{
    47   $Commands[] = ' /ip firewall mangle add chain=inet-out src-address=192.168.'.$Subnet.'.0/24 out-interface='.$InetInterface.' action=jump jump-target=inet-out-'.$Subnet;
    48   $Commands[] = ' /ip firewall mangle add chain=inet-in dst-address=192.168.'.$Subnet.'.0/24 in-interface='.$InetInterface.' action=jump jump-target=inet-in-'.$Subnet;
     46  $Commands[] = ' /ip firewall mangle add chain=inet-out src-address='.$Subnet['AddressRange'].'/'.$Subnet['Mask'].' out-interface='.$InetInterface.' action=jump jump-target=inet-out-'.$Subnet['Id'];
     47  $Commands[] = ' /ip firewall mangle add chain=inet-in dst-address='.$Subnet['AddressRange'].'/'.$Subnet['Mask'].' in-interface='.$InetInterface.' action=jump jump-target=inet-in-'.$Subnet['Id'];
    4948}
    5049
     
    6261while($Member = $DbResult->fetch_array())
    6362{
    64   $Member['Name'] = strtr(strtolower(trim($Member['Name'])), array(' ' => '-', '(' => '-', ')' => '-',
    65   'č' => 'c', 'š' => 's', 'ě' => 'e', 'ř' => 'r', 'ž' => 'z', 'ý' => 'y', 'á' => 'a', 'í' => 'i', 'é' => 'e', 'ů' => 'u', 'ú' => 'u', 'ď' => 'd', 'ť' => 't', 'ň' => 'n', 'ó' => 'o',
    66   'Č' => 'c', 'Š' => 's', 'Ě' => 'e', 'Ř' => 'r', 'Ž' => 'z', 'Ý' => 'y', 'Á' => 'a', 'Í' => 'i', 'É' => 'e', 'Ů' => 'u', 'Ú' => 'u', 'Ď' => 'd', 'Ť' => 't', 'Ň' => 'n', 'Ó' => 'o',
    67 ));
     63  $Member['Name'] = RouterOSIdent($Member['Name']);
    6864
    6965  echo('Uživatel '.$Member['Name'].": ");
     
    7773  $Commands[] = ' /queue tree add name='.$Member['Name'].'-in limit-at='.$SpeedOut.' max-limit='.$UserMaxSpeedOut.' parent=main-in queue=wireless-default';
    7874
    79   $DbResult2 = $Database->select('hosts', 'COUNT(*)', "block=0 AND MAC!='' AND user=".$Member['Id']);
     75  $DbResult2 = $Database->select('hosts', 'COUNT(*)', '(block = 0) AND (MAC != "") AND (user = '.$Member['Id'].')');
    8076  $Row = $DbResult2->fetch_array();
    8177  $HostCount = $Row[0];
    82   $HostSpeedIn = round($SpeedIn / $HostCount);
    83   $HostSpeedOut = round($SpeedOut / $HostCount);
     78  if($HostCount > 0)
     79  {
     80    $HostSpeedIn = round($SpeedIn / $HostCount);
     81    $HostSpeedOut = round($SpeedOut / $HostCount);
     82  } else
     83  {
     84    $HostSpeedIn = $SpeedIn;
     85    $HostSpeedOut = $SpeedOut;
     86  }
    8487
    85   $DbResult2 = $Database->select('hosts', '*', "block=0 AND MAC!='' AND user=".$Member['Id']);
     88  $DbResult2 = $Database->select('hosts', '*', 'block=0 AND MAC!="" AND user='.$Member['Id']);
    8689  while($Host = $DbResult2->fetch_array())
    8790  {
    88     $Host['name'] = strtolower($Host['name']);
     91    $Host['name'] = RouterOSIdent($Host['name']);
    8992    echo($Host['name'].', ');
    9093    $IPParts = explode('.', $Host['IP']);
     
    100103    if($Index > 50)
    101104          {
     105      //print_r($Commands);
    102106      $Commands = addslashes(implode(';', $Commands));
    103       $Command = '/usr/bin/ssh -l admin-ssh -i id_dsa '.$Router.' "'.$Commands.'"';
    104       //echo($Command."\n");
     107      $Command = '/usr/bin/ssh -l '.$Config['MainRouter']['UserName'].' -i id_dsa '.$Config['MainRouter']['HostName'].' "'.$Commands.'"';
     108      $Output = array();
    105109      exec($Command, $Output);
    106110      print_r($Output);
     
    110114    $Index++;
    111115  }
     116 
     117  $DbResult2 = $Database->select('NetworkSubnet', '*', 'Member='.$Member['Id']);
     118  while($Subnet = $DbResult2->fetch_array())
     119  {
     120    $Subnet['Name'] = RouterOSIdent('subnet-'.$Subnet['Name']);
     121    echo($Subnet['Name'].', ');
     122    $IPParts = explode('.', $Subnet['AddressRange']);
     123    $SubnetNumber = $IPParts[2];
     124    $Commands[] = ' /ip firewall mangle add chain=inet-out-'.$SubnetNumber.' src-address='.$Subnet['AddressRange'].'/'.$Subnet['Mask'].' out-interface='.$InetInterface.' action=mark-packet new-packet-mark='.$PacketMark.' passthrough=no comment="'.$Subnet['Name'].'"';
     125    $Commands[] = ' /queue tree add name='.$Subnet['Name'].'-out limit-at='.$HostSpeedIn.' max-limit='.$UserMaxSpeedIn.' parent='.$Member['Name'].'-out packet-mark='.$PacketMark.' queue=wireless-default';
     126    $PacketMark++;
     127    $Commands[] = ' /ip firewall mangle add chain=inet-in-'.$SubnetNumber.' dst-address='.$Subnet['AddressRange'].'/'.$Subnet['Mask'].' in-interface='.$InetInterface.' action=mark-packet new-packet-mark='.$PacketMark.' passthrough=no comment="'.$Subnet['Name'].'"';
     128    $Commands[] = ' /queue tree add name='.$Subnet['Name'].'-in limit-at='.$HostSpeedOut.' max-limit='.$UserMaxSpeedOut.' parent='.$Member['Name'].'-in packet-mark='.$PacketMark.' queue=wireless-default';
     129    $PacketMark++;
     130
     131    // Posílej po menších částech
     132    if($Index > 50)
     133          {
     134      $Commands = addslashes(implode(';', $Commands));
     135      $Command = '/usr/bin/ssh -l '.$Config['MainRouter']['UserName'].' -i id_dsa '.$Config['MainRouter']['HostName'].' "'.$Commands.'"';
     136      //echo($Command."\n");
     137      $Output = array();
     138      exec($Command, $Output);
     139      print_r($Output);
     140          $Commands = array();
     141            $Index = 0;
     142          }
     143    $Index++;
     144  }
     145 
    112146  echo("\n");
    113147}
    114148//print_r($Commands);
    115149$Commands = addslashes(implode(';', $Commands));
    116 $Command = '/usr/bin/ssh -l admin-ssh -i id_dsa '.$Router.' "'.$Commands.'"';
     150$Command = '/usr/bin/ssh -l '.$Config['MainRouter']['UserName'].' -i id_dsa '.$Config['MainRouter']['HostName'].' "'.$Commands.'"';
    117151//echo($Command."\n");
     152$Output = array();
    118153exec($Command, $Output);
    119154//array_pop($Output);
  • trunk/system/netwatch_import.php

    r168 r187  
    11<?php
     2
    23include_once('../global.php');
    34
    4 $UserName = 'admin-ssh';
    55$Config['Web']['ShowErrors'] = 1;
    66
    7 $DbResult3 = $Database->query('SELECT DISTINCT (`DHCP`) FROM `NetworkSubnet`');
     7$DbResult3 = $Database->query('SELECT DISTINCT (`DHCP`) FROM `NetworkSubnet` WHERE `Member` = 0');
    88while($Router = $DbResult3->fetch_assoc())
    99{
     
    1111  $Commands[] = '/tool netwatch print terse';
    1212  $Commands = implode(';', $Commands);
    13   $Command = '/usr/bin/ssh -l '.$UserName.' -i generators/id_dsa '.$Router['DHCP'].' "'.$Commands.'"';
     13  $Command = '/usr/bin/ssh -l '.$Config['MainRouter']['UserName'].' -i generators/id_dsa '.$Router['DHCP'].' "'.$Commands.'"';
    1414  //echo($Command."\n");
    1515  $Output = '';
  • trunk/ukoly.php

    r148 r187  
    99  function Show()
    1010  {
    11     $Output = '<strong>Plánované úkoly:</strong><br>
     11    $Output = '<strong>Plánované úkoly:</strong><br />
    1212<div><ul>
    1313<li>Zprovoznit televizní server a streaming lokální kabelové televize po síti na způsob IPTV. Zpovoznění multicastového vysílání.</li>
     
    1919<li>Zřídit poloprofesionální meteo stanici a zpřístupnit měřené hodnoty online</li>
    2020</ul></div>
    21 <br>
    22 <strong>Hotové úkoly:</strong><br>
     21<br />
     22<strong>Hotové úkoly:</strong><br />
    2323<div><ul>
    2424<li>Vytvořit levné zařízení pro posílání odezvy na ICMP pakety pro potřeby určování místa problémů v kabelových úsecích sítě. (řešeno použitím nejlevnějších routerů)</li>
  • trunk/user.php

    r181 r187  
    233233
    234234      $Subject = 'Obnova hesla';
    235       $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.";
     235      $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.";
    236236      $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";
    237237      mail($Row['Email'], $Subject, $Message, $AdditionalHeaders);
Note: See TracChangeset for help on using the changeset viewer.