Changeset 71 for trunk/www/Base/Types


Ignore:
Timestamp:
Aug 23, 2009, 6:14:01 PM (15 years ago)
Author:
george
Message:
  • Upraveno: Znovu zprovozněny třídy HomePage, Server a User.
Location:
trunk/www/Base/Types
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/Base/Types/Base.php

    r69 r71  
    11<?php
    22
    3 class TypeBase
     3class TypeBase extends Module
    44{
    55  var $DatabaseCompareOperators = array();
  • trunk/www/Base/Types/Include.php

    r69 r71  
    4242function ExecuteTypeEvent($TypeName, $Event, $Parameters = array())
    4343{
    44   global $TypeDefinitionList;
     44  global $TypeDefinitionList, $System;
    4545 
    4646  if(array_key_exists($TypeName, $TypeDefinitionList))
     
    4848    $Type = $TypeDefinitionList[$TypeName];
    4949    $TypeClass = 'Type'.$Type['Class'];
    50     $TypeObject = new $TypeClass;
     50    $TypeObject = new $TypeClass($System);
    5151    if(is_callable(array($TypeObject, $Event))) return($TypeObject->$Event($Parameters));
    5252      else return($TypeName.'->'.$Event.'('.serialize($Parameters).')');
  • trunk/www/Base/Types/PointerOneToOne.php

    r69 r71  
    55  function OnView($Item)
    66  {
    7     global $Database, $TypeDefinitionList;
     7    global $TypeDefinitionList;
    88
    99    $Type = $TypeDefinitionList[$Item['Type']];
    10     $DbResult = $Database->query('SELECT '.$Type['Parameters']['Name'].' AS Name FROM `'.$Type['Parameters']['Table'].'` WHERE `'.$Type['Parameters']['Id'].'`='.$Item['Value']);
     10    $DbResult = $this->Database->query('SELECT '.$Type['Parameters']['Name'].' AS Name FROM `'.$Type['Parameters']['Table'].'` WHERE `'.$Type['Parameters']['Id'].'`='.$Item['Value']);
    1111    $DbRow = $DbResult->fetch_assoc();
    1212    $Output = $DbRow['Name'];
     
    2424  function OnEdit($Item)
    2525  {
    26     global $Database, $TypeDefinitionList;
     26    global $TypeDefinitionList;
    2727
    2828    $Output = '<select name="'.$Item['Name'].'">';
     
    3030    if(array_key_exists('Condition', $Type['Parameters'])) $Where = ' WHERE '.$Type['Parameters']['Condition'];
    3131      else $Where = '';
    32     $DbResult = $Database->query('SELECT '.$Type['Parameters']['Name'].' AS Name,'.$Type['Parameters']['Id'].' AS Id FROM `'.$Type['Parameters']['Table'].'`'.$Where.' ORDER BY Name DESC');
     32    $DbResult = $this->Database->query('SELECT '.$Type['Parameters']['Name'].' AS Name,'.$Type['Parameters']['Id'].' AS Id FROM `'.$Type['Parameters']['Table'].'`'.$Where.' ORDER BY Name DESC');
    3333    while($DbRow = $DbResult->fetch_assoc())
    3434    {
Note: See TracChangeset for help on using the changeset viewer.