芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/thefirstcookout.com/support/application/controllers/admin/License.php
CheckPageAccess("update"); $this->SetNoNotificaitonAndMessage(); } function index(){ if(ISDEMOMODE){ redirect("admin/dashboard"); return; } if(ACL::HasPermission("admin/license/update")){ $obj= get_license_info(); if(!$obj->status){ redirectAdmin("license/update"); return; } } if(Mapp_setting::GetSettingsValue("is_first_run","Y")=="Y"){ Mapp_setting::UpdateSettingsOrAdd("is_first_run", "N"); Mapp_setting::SetInitialSettings(); redirectAdmin("admin-setting/general"); } $this->SetTitle("License Info"); GetMsg(); $this->AddViewData("licinfo", get_license_info()); $this->Display(); } function update(){ $obj= get_license_info(); if($obj->status){ redirectAdmin("license"); return; } $cu=GetCurrentUserType(); if($cu!="AD"){ $currentUrl=current_url(); $currentUrl=urlencode($currentUrl); if(!empty($currentUrl)){ $currentUrl='_ru='.$currentUrl; } redirect('admin/user/login?'.$currentUrl,'auto'); } $this->SetTitle("Enter License Info"); if(IsPostBack){ $pcode=PostValue("lic_key"); if(!empty($pcode)){ Mapp_setting::UpdateSettingsOrAdd("__isf_check", "Y","-","Y","B"); Mapp_setting::UpdateSettingsOrAdd("licstr",$pcode,"-","Y"); redirectAdmin("license"); } } $this->AddViewData("lic_key", Mapp_setting::GetSettingsValue("licstr","")); $this->Display(); } function remove(){ $this->output->unset_template(); if(ISDEMOMODE){ redirectAdmin("license"); } if(__remove_licnese()){ redirectAdmin("license/update"); }else{ AddError("Remove failed try again",true); redirectAdmin("license"); } } } }