Kingcms slides are js-encapsulated files with independent code

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.