📄 remote_template.php
字号:
<?php/*+--------------------------------------------------------------------------| Invision Power Board v2.1.5| =============================================| by Matthew Mecham| (c) 2001 - 2005 Invision Power Services, Inc.| | =============================================| Web: | Time: Wed, 01 Mar 2006 19:11:27 GMT| Release: | Licence Info: +---------------------------------------------------------------------------| > $Date: 2006-3-6| > $Revision: 23 $| > $Author: matt $+---------------------------------------------------------------------------|| > Skin -> Templates pop up functions| > Module written by Matt Mecham| > Date started: 9th July 2002|| > Module Version Number: 1.0.0+--------------------------------------------------------------------------*/if ( ! defined( 'IN_ACP' ) ){ print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit();}class ad_remote_template { var $base_url; function auto_run() { //----------------------------------------- // Kill globals - globals bad, Homer good. //----------------------------------------- $tmp_in = array_merge( $_GET, $_POST, $_COOKIE ); foreach ( $tmp_in as $k => $v ) { unset($$k); } //----------------------------------------- switch($this->ipsclass->input['code']) { case 'preview': $this->do_preview(); break; case 'edit_bit': $this->edit_bit(); break; case 'macro_one': $this->macro_one(); break; case 'macro_two': $this->macro_two(); break; case 'compare': $this->compare_frames(); break; case 'dotop': $this->print_compare_top(); break; case 'donew': $this->print_compare_new(); break; //----------------------------------------- case 'search': $this->search_frames(); break; case 'searchbox': $this->print_search_box(); break; case 'searchlinks': $this->print_searchlinks(); break; //----------------------------------------- case 'css_search': $this->css_search_frames(); break; case 'csssearchlinks': $this->print_css_searchlinks(); break; case 'previewstate': $this->do_message("Preview Window"); break; //----------------------------------------- case 'css_preview': $this->css_preview(); break; default: exit(); break; } } //----------------------------------------- function css_search_frames() { print "<html> <head><title>鎼滅储</title><meta http-equiv='content-type' content='text/html; charset=utf-8' /></head> <frameset cols='200, *' frameborder='no' border='1' framespacing='0'> <frame name='links' scrolling='auto' src='{$this->ipsclass->base_url}&act=rtempl&code=csssearchlinks&id={$this->ipsclass->input['id']}&element={$_GET['element']}'> <frame name='preview' scrolling='auto' src='{$this->ipsclass->base_url}&act=rtempl&code=previewstate'> </frameset> </html>"; exit(); } //----------------------------------------- function css_preview() { //----------------------------------------- // GET THE TEMPLATES THAT THIS CSS USES //----------------------------------------- $this_set = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => 'set_skin_set_id='.intval( $this->ipsclass->input['id']) ) ); $skin = $this->ipsclass->DB->fetch_row(); $element = trim(stripslashes($_GET['element'])); list($type, $name) = explode( "|", $element ); $like = "class='{$name}'"; $first = '.'; if ($type == 'id') { $like = "id='{$name}'"; $first = '#'; } preg_match( "/($first"."$name)\s{0,}\{(.+?)\}/s", $this_set['set_cache_css'], $match ); $defs = explode( ";", str_replace( "\n\n", "\n", str_replace( "\r\n", "\n", trim($match[2]) ) ) ); $def_output = ""; foreach($defs as $bit) { list($type, $value) = explode( ":", trim($bit) ); $type = trim($type); $value = trim($value); if ($type != "" and $value != "") { $extra = ""; if ($type == 'color' or $type == 'background-color') { $extra = " <input type='text' size='6' style='background-color:$value' readonly>"; } $def_output .= "<tr><td width='40%'><b>$type</b></td><td width='60%'>$value $extra</td></tr>\n"; } } $css = "\n<style>\n<!--\n".preg_replace( "#url\(([\"'])?#i", "url(\\1style_images/", $this_set['set_cache_css'] )."\n//-->\n</style>"; $html = "<html> <head> <title>CSS 棰勮
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -