Gino Gmaps  1.0.1
Modulo di gestione di mappe interattive per Gino CMS
 Tutto Strutture dati File Funzioni Variabili Gruppi Pagine
class.gmapsPolygonCtg.php
Vai alla documentazione di questo file.
1 <?php
13 require_once('class.gmapsCtg.php');
14 
33 class gmapsPolygonCtg extends gmapsCtg {
34 
35  protected static $_tbl = 'gmaps_polygon_ctg';
36 
37  private $_controller;
38 
47  function __construct($id, $instance) {
48 
49  $this->_controller = $instance;
50  parent::__construct($id, "gmaps_polygon_ctg");
51  $this->_data_www = CONTENT_WWW.'/gmaps/'.$this->_controller->instanceName().'/polygon_ctg';
52  $this->_data_dir = CONTENT_DIR.OS.'gmaps'.OS.$this->_controller->instanceName().OS.'polygon_ctg';
53  }
54 
64  public function delete() {
65 
66  $polygons = gmapsPolygon::getByCtg($this->id);
67 
68  if(count($polygons)) {
69  return 'polygons';
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 ?>