Flash needs JSON format data, so, there are the following code: (PHP implementation, C # Similar, JSON library to go down yourself ~ ~)
Copy Code code as follows:
--Query user's offline information, return JSON, for Flash
if (!empty ($_get[' action ')) !empty ($_get[' invite ')) {
Fixed-parameter requests return information
if ($_get[' action ']== ' GetInfo ' $_get[' invite ']==1) {
Data en
', ' Admin.view.photoArborescence.PhotoArborescenceController '], controller:' Photoarborescence ', layout:' Fit ', listeners: {beforerender:' Picturebeforerender '}, defaults: {height:' 100% '}, Autoheight:true,//Auto Height, default falseAnimate:true,//Expand AnimationsEnabledrag:true,//Whether you can drag (effect)Enabledd:true,//You can drag, you can also change the node hierarchyEnabledrop:false,//Just dropRootvisible:true,//whether the root node is displayed, by default trueheight:
Php user-defined functions use arrays to return list data of infinite categories. this can improve execution efficiency rather than reading data from the database every time.
The code is as follows:
/*------------------*///-Obtain the list data of an unlimited category/*------------------*/Function get_sort ($ pa
PHP infinite loop to get data (or message) information I php basically do not know much about, because the project needs, I need to write JSP instant chat system embedded in PHP.
The only question left now is how to obtain the data information in the framework (because the customer service may ask for the invitation chat information to pop up at any time, the cy
Jstree homepage:Http://www.jstree.com/It provides a form of rendering data from the background into a tree:Copy codeThe Code is as follows:$ ("# Mytree"). tree ({Data :{Type: "json ",Url: "$ {ctx}/user/power! List. do"}}); The value returned by the url must be in the json data format defined by the url:Copy codeThe Code is as follows:$ ("# Demo2"). tree ({
When browsing the Web page on the mobile phone, often use a function, when we browse Jingdong or Taobao, the page slide to the bottom, we see the data automatically loaded into the list. I didn't know how these functions were implemented, so I simulated the functionality on my PC browser. First look at the browsing effect:
When the scroll bar scrolls to the bottom of the page, you are prompted to "load ...".
When the page has loaded all the
([Id], [Name], [Pid], [Path], [OrderId]) VALUES (4, 'Military quilt 1.2 meters', 2, '0, 1, 2, 4 ', 1) insert into OA_GoodType ([Id], [Name], [Pid], [Path], [OrderId]) VALUES (37, 'rescue tool class', 37, '0, 37', 2) insert into OA_GoodType ([Id], [Name], [Pid], [Path], [OrderId]) VALUES (43, 'cereals and oils food', 43, '0, 43 ', 6)
In general, it is very simple to select a tree structure for the infinite classification of this structure: Only one SQ
This article mainly introduces the PHP infinite classification of tree data format code, the need for friends can refer to the following
The original code:
function Gentree ($items, $id = ' id ', $pid = ' pid ', $son = ' children ') {$tree = array ();//formatted Tree $TMPMAP = Array ();//Temporary flat data foreach ($items as $item) {$tmpMap [$item [$id]] = $it
)): _get_value (key, Value, Tmp_list)#if the value of the incoming data is a list or a tuple, call _get_value returntmp_listdef_get_value (Key, Val, tmp_list): forVal_inchVal:ifisinstance (Val_, Dict): Get_target_value (Key, Val_, tmp_list)#if the value of the incoming data is a dictionary, call Get_target_value elifisinstance (Val_, (list, tuple)): _get_value (Key, Val_, tmp_list)#if the value of
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.