Changeset 353 for trunk/Model.php


Ignore:
Timestamp:
Jan 18, 2012, 8:48:26 AM (13 years ago)
Author:
chronos
Message:
  • Upraveno: Soubor pro zobrazení výpisu záznamu operací uživatelů přidružen k modulu Log.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Model.php

    r343 r353  
    11<?php
    22
     3define('PropertyDate', 'Date');
     4define('PropertyTime', 'Time');
    35define('PropertyDateTime', 'DateTime');
    46define('PropertyText', 'Text');
     
    3234  {
    3335    $this->Properties[] = array('Name' => $Name, 'Type' => PropertyDateTime);
     36  }
     37 
     38  function AddPropertyDate($Name)
     39  {
     40    $this->Properties[] = array('Name' => $Name, 'Type' => PropertyDate);
     41  }
     42 
     43  function AddPropertyTime($Name)
     44  {
     45    $this->Properties[] = array('Name' => $Name, 'Type' => PropertyTime);
    3446  }
    3547 
     
    8597      if($Property['Type'] == PropertyDateTime)
    8698        $Query .= '`'.$Property['Name'].'` DATETIME NOT NULL,';
     99      else if($Property['Type'] == PropertyDate)
     100        $Query .= '`'.$Property['Name'].'` DATE NOT NULL,';
     101      else if($Property['Type'] == PropertyTime)
     102        $Query .= '`'.$Property['Name'].'` TIME NOT NULL,';
    87103      else if($Property['Type'] == PropertyString)
    88104        $Query .= '`'.$Property['Name'].'` VARCHAR(255) COLLATE utf8_general_ci NOT NULL,';
     
    90106        $Query .= '`'.$Property['Name'].'` TEXT COLLATE utf8_general_ci NOT NULL,';
    91107      else if($Property['Type'] == PropertyInteger)
     108        $Query .= '`'.$Property['Name'].'` INT(11) NOT NULL,';
     109      else if($Property['Type'] == PropertyBoolean)
    92110        $Query .= '`'.$Property['Name'].'` INT(11) NOT NULL,';
    93111      else if($Property['Type'] == PropertyFloat)
Note: See TracChangeset for help on using the changeset viewer.