02 | function sp_input( $text ) | 04 | $text = trim( $text ); | 05 | $text = htmlspecialchars( $text ); | 06 | if (!get_magic_quotes_gpc()) | 07 | return addslashes ( $text ); | 12 | $fpath = "../data/last_time.inc" ; | 14 | if ( empty ( $last_time )) | 16 | if ( sp_input( $_GET [ 'renew' ])== "now" ) | 17 | $last_time = 0; if ((time()- $last_time )>= $autotime ) | 19 | define( 'DEDEADMIN' , ereg_replace ( "[/\\]{1,}" , '/' ,dirname( __FILE__ ) ) ); | 20 | require_once (DEDEADMIN. "/../include/common.inc.php" ); | 21 | require_once (DEDEINC. "/arc.partview.class.php" ); | 27 | $templet = “ default /index.htm”; | 28 | $position = "../index.html" ; | 29 | $homeFile = dirname( __FILE__ ). "/" . $position ; | 30 | $homeFile = str_replace ( "\\" , "/" , $homeFile ); | 31 | $homeFile = str_replace ( "//" , "/" , $homeFile ); | 33 | $pv ->SetTemplet( $cfg_basedir . $cfg_templets_dir . "/" . $templet ); | 34 | $pv -> SaveToHtml( $homeFile ); | 36 | $file = fopen ( $fpath , "w" ); | 37 | fwrite( $file , "<?php\n" ); | 38 | fwrite( $file , "\$last_time=" .time(). ";\n" ); | 39 | fwrite( $file , '?>' ); fclose( $file ); | |