Ignore:
Timestamp:
Aug 11, 2007, 12:04:22 AM (17 years ago)
Author:
george
Message:

Sjednocení parametrů připojení k databázi do jednoho souboru config.php.
Přepsání všech cest na relativní.
Přidání parametru BaseUrl do souboru config.php.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • registrace/LockRegistration/script.php

    r5 r11  
    1 <?
     1<?php
     2require_once('../../config.php');
     3
     4$RegFile = 'NumberRegistration.txt';
     5
    26function StafRegistraci()
    37{
    4 $NumberRegistration = 0;
    5 $File = fopen('c:\www\registrace\LockRegistration\NumberRegistration','r');
    6 $NumberRegistration = fread($File,5);
    7 fclose($File);
     8  global $RegFile, $BaseUrl;
     9  $NumberRegistration = 0;
     10  $File = fopen($RegFile, 'r');
     11  $NumberRegistration = fread($File, 5);
     12  fclose($File);
    813
    9 if ($NumberRegistration == 'close')
    10   echo('<a href="/registrace/">Vyèerpáno</a>');
    11 else
    12   echo('Zbývá registrací: '.$NumberRegistration);
     14  if ($NumberRegistration == 'close')
     15    echo('<a href="'.$BaseUrl.'registrace/">Vyèerpáno</a>');
     16  else
     17    echo('Zbývá registrací: '.$NumberRegistration);
    1318}
    1419
    1520function AdresaRegistrace()
    1621{
    17 $NumberRegistration = 0;
    18 $File = fopen('c:\www\registrace\LockRegistration\NumberRegistration','r');
    19 $NumberRegistration = fread($File,5);
    20 fclose($File);
     22  global $RegFile, $BaseUrl;
     23  $NumberRegistration = 0;
     24  $File = fopen($RegFile, 'r');
     25  $NumberRegistration = fread($File,5);
     26  fclose($File);
    2127
    22 if ($NumberRegistration != 'close')
    23   echo('<a href="/registrace/">zde</a>');
     28  if ($NumberRegistration != 'close') echo('<a href="'.$BaseUrl.'registrace/">zde</a>');
    2429}
    2530
    2631function AdresaRegistraceRegistrace()
    2732{
    28 $NumberRegistration = 0;
    29 $File = fopen('c:\www\registrace\LockRegistration\NumberRegistration','r');
    30 $NumberRegistration = fread($File,5);
    31 fclose($File);
     33  global $RegFile, $BaseUrl;
     34  $NumberRegistration = 0;
     35  $File = fopen($RegFile, 'r');
     36  $NumberRegistration = fread($File,5);
     37  fclose($File);
    3238
    33 if ($NumberRegistration != 'close')
     39  if ($NumberRegistration != 'close')
    3440 // include('c:\www\registrace\LockRegistration\FormularRegistrace.php');
    35   echo('Registrovat se mùžete: <a href="http://wow.zdechov.net/minimanager/register.php">zde</a>');
     41    echo('Registrovat se mùžete: <a href="'.$BaseUrl.'minimanager/register.php">zde</a>');
    3642}
    3743
    3844function PovoleneRegistrace()
    3945{
    40 $NumberRegistration = 0;
    41 $File = fopen('c:\www\registrace\LockRegistration\UnlockRegistration','r');
    42 $NumberRegistration = fread($File,5);
    43 fclose($File);
    44 echo($NumberRegistration);
     46  global $RegFile;
     47  $NumberRegistration = 0;
     48  $File = fopen($RegFile, 'r');
     49  $NumberRegistration = fread($File, 5);
     50  fclose($File);
     51  echo($NumberRegistration);
    4552}
    4653?>
Note: See TracChangeset for help on using the changeset viewer.