Gino Gmaps  1.0.1
Modulo di gestione di mappe interattive per Gino CMS
 Tutto Strutture dati File Funzioni Variabili Gruppi Pagine
class.gmapsPointCtg.php
Vai alla documentazione di questo file.
1 <?php
13 require_once('class.gmapsCtg.php');
14 
32 class gmapsPointCtg extends gmapsCtg {
33 
34  protected static $_tbl = 'gmaps_point_ctg';
35 
36  private $_controller;
37 
46  function __construct($id, $instance) {
47 
48  $this->_controller = $instance;
49  parent::__construct($id, "gmaps_point_ctg");
50 
51  $this->_data_www = CONTENT_WWW.'/gmaps/'.$this->_controller->instanceName().'/point_ctg';
52  $this->_data_dir = CONTENT_DIR.OS.'gmaps'.OS.$this->_controller->instanceName().OS.'point_ctg';
53  }
54 
64  public function delete() {
65 
66  $points = gmapsPoint::getByCtg($this->id);
67 
68  if(count($points)) {
69  return 'points';
70  }
71  else {
72  if($this->icon) {
73  @unlink($this->_data_dir.OS.$this->_prefix_img.$this->icon);
74  @unlink($this->_data_dir.OS.$this->_prefix_thumb.$this->icon);
75  }
76 
77  return $this->deleteDbData();
78  }
79 
80  }
81 
82 }
83 
84 ?>