update_strings(); } function load_license() { if(!file_exists("../setup/license.txt")){ $this->License = "License not found. Setup stops here."; $this->license_found = false; }else{ $fp = fopen("../setup/license.txt","r"); $this->License = ""; while (!feof($fp)){ $this->License .= fread($fp, 255); } $this->license_found = true; } } function update_strings() { $this->s_title = _("License"); $this->s_title_long = _("License"); $this->s_info = _("Terms and conditions for usage"); } function execute() { $this->load_license(); $smarty = get_smarty(); $smarty -> assign("License",nl2br($this->License)); $smarty -> assign("license_found",$this->license_found); $smarty -> assign("accepted",$this->accepted); return($smarty -> fetch (get_template_path("../setup/setup_license.tpl"))); } function save_object() { if(isset($_POST['step_license'])){ if(isset($_POST['accepted'])){ $this->accepted = TRUE; }else{ $this->accepted = FALSE; } } if($this->license_found && $this->accepted){ $this->is_completed = true; }else{ $this->is_completed = false; } } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: ?>