芝麻web文件管理V1.00
编辑当前文件:/home/prismawe/clients/canaldegap.fr_old/lib/classes/class.template.inc.php
SetInitialValues(); } function SetInitialValues() { $this->id = -1; $this->name = ''; $this->content = ''; $this->stylesheet = ''; $this->encoding = ''; $this->active = false; $this->default = false; } function Id() { return $this->id; } function Name() { return $this->name; } function UsageCount() { global $gCms; $templateops =& $gCms->GetTemplateOperations(); if ($this->id > -1) return $templateops->UsageCount($this->id); else return 0; } function Save() { $result = false; global $gCms; $templateops =& $gCms->GetTemplateOperations(); if ($this->id > -1) { $result = $templateops->UpdateTemplate($this); } else { $newid = $templateops->InsertTemplate($this); if ($newid > -1) { $this->id = $newid; $result = true; } } return $result; } function Delete() { $result = false; if ($this->id > -1) { global $gCms; $templateops =& $gCms->GetTemplateOperations(); $result = $templateops->DeleteTemplateByID($this->id); if ($result) { $this->SetInitialValues(); } } return $result; } } # vim:ts=4 sw=4 noet ?>