In kingcms, the default attribute does not contain the magic light attribute, so the first thing to do is to add the attribute, choose "Content Management"> "model management"> "field list"> "attribute"> "list" to add a field type: Yes/No; field Title: Magic Light; field name: nflash; default value: No. confirm to add the field. Then look at the data to see the newly added in kingcms. the default attribute does not have the magic lamp attribute, so the first thing to do is to add the attribute, choose "Content Management"> "model management"> "field list"> "attribute"> "list" to add a field type: Yes/No; field Title: Magic Light; field name: nflash; default value: No. confirm to add the field.
Then look at the newly added field in the data and find that the name is not nflash. there is an additional k _ in front, and this kingcms is added by itself, the code can be deleted by user-defined fields.
Next, create a file named flash. php and put it in the root directory of the website. The code is as follows:
Define ('INC', True );
Require_once 'config. php ';
Require_once dirname (___ file _). '/system/lib/kc_mysql_class.php ';
Require dirname (___ file _). '/system/lib/func. php ';
$ Mysql = new KC_mysql_class ();
If (! Isset ($ _ GET ['listid']) |! Is_numeric ($ _ GET ['listid'])
$ FlashArr = $ mysql-> getRows ("select 'kid', 'ktitle', 'kimage ', 'kpath' from 'King _ article' where 'K _ nflash' = '1' order by 'kid' desc limit ", 0 );
Else
$ FlashArr = $ mysql-> getRows ("select 'kid', 'ktitle', 'kimage ', 'kpath' from 'King _ article' where 'K _ nflash' = '1' and 'listid' = '{$ _ GET ['listid']} 'Order' kid 'desclimit ", 0 );
?>
Linkarr = new Array ();
Picarr = new Array ();
Var swf_width = ;
Var swf_height = ;
// Text color | text position | text background color | text background transparency | key text color | default color | current color | automatic playback time | image transition effect | display button | open Mode
Var configtg = '0xffffff | 0 | 0x3FA61F | 0 | 0xffffff | 0xC5DDBC | 0x000033 | 2 | 3 | 1 | _ blank ';
Var files = "";
Var links = "";
// Set the call tag here
Foreach ($ flashArr as $ _ k => $ _ v ){
?>
Linkarr [ ] = "/ ";
Picarr [ ] = "/ ";
}
?>
For (I = 1; I If (files = "") files = picarr [I];
Else files + = "|" + picarr [I];
}
For (I = 1; I If (links = "") links = linkarr [I];
Else links + = "|" + linkarr [I];
}
Document. write ('');
Document. write ('');
Document. write ('');
Document. write ('');
Document. write (''); Document. write ('');
It is necessary to mention the template/images/bcastr3.swf file. This file is the playback file of the flash magic lamp. below is the file: bcastr3