Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
design_area_datetime.inc
1 <?php
18 require_once SQ_CORE_PACKAGE_PATH.'/designs/design_area/design_area.inc';
19 
32 {
33 
34 
41  function __construct($assetid=0)
42  {
43  parent::__construct($assetid);
44 
45  }//end constructor
46 
47 
57  protected function _printPaintingCode()
58  {
59  $format = addslashes($this->attr('format'));
60  switch ($this->attr('datetime')) {
61  case 'updated' :
62  $datetime = '$ASSET->updated';
63  break;
64  case 'created' :
65  $datetime = '$ASSET->created';
66  break;
67  case 'published' :
68  $datetime = '$ASSET->published';
69  break;
70  case 'now' :
71  default :
72  $datetime = 'time()';
73  }
74 
75  echo '<', '?php echo date("'.$format.'", '.$datetime.'); ?', '>';
76  return TRUE;
77 
78  }//end _printPaintingCode()
79 
80 
81 }//end class
82 ?>