当前位置: 首页>>代码示例>>PHP>>正文


PHP ModeleBoxes::outputBox方法代码示例

本文整理汇总了PHP中ModeleBoxes::outputBox方法的典型用法代码示例。如果您正苦于以下问题:PHP ModeleBoxes::outputBox方法的具体用法?PHP ModeleBoxes::outputBox怎么用?PHP ModeleBoxes::outputBox使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ModeleBoxes的用法示例。


在下文中一共展示了ModeleBoxes::outputBox方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getBoxesArea


//.........这里部分代码省略.........
	    	    	handle: \'.boxhandle\',
	    	    	revert: \'invalid\',
	       			items: \'.box\',
	        		containment: \'.fiche\',
	        		connectWith: \'.connectedSortable\',
	        		stop: function(event, ui) {
	        			updateBoxOrder(0);
	        		}
	    		});

	        	jQuery(".boxclose").click(function() {
	        		var self = this;	// because JQuery can modify this
	        		var boxid=self.id.substring(8);
	        		var label=jQuery(\'#boxlabelentry\'+boxid).val();
	        		jQuery(\'#boxto_\'+boxid).remove();
	        		if (boxid > 0) jQuery(\'#boxcombo\').append(new Option(label, boxid));
	        		updateBoxOrder(1);
	        	});

        	});' . "\n";
            $selectboxlist .= '</script>' . "\n";
        }
        // Define boxlista and boxlistb
        $nbboxactivated = count($boxidactivatedforuser);
        if ($nbboxactivated) {
            $langs->load("boxes");
            $langs->load("projects");
            $emptybox = new ModeleBoxes($db);
            //$boxlist.='<table width="100%" class="notopnoleftnoright">';
            //$boxlist.='<tr><td class="notopnoleftnoright">'."\n";
            //$boxlist.='<div class="fichehalfleft">';
            $boxlista .= "\n<!-- Box left container -->\n";
            $boxlista .= '<div id="left" class="connectedSortable">' . "\n";
            // Define $box_max_lines
            $box_max_lines = 5;
            if (!empty($conf->global->MAIN_BOXES_MAXLINES)) {
                $box_max_lines = $conf->global->MAIN_BOXES_MAXLINES;
            }
            $ii = 0;
            foreach ($boxactivated as $key => $box) {
                if (!empty($user->conf->{$confuserzone}) && $box->fk_user == 0 || empty($user->conf->{$confuserzone}) && $box->fk_user != 0) {
                    continue;
                }
                if (empty($box->box_order) && $ii < $nbboxactivated / 2) {
                    $box->box_order = 'A' . sprintf("%02d", $ii + 1);
                }
                // When box_order was not yet set to Axx or Bxx and is still 0
                if (preg_match('/^A/i', $box->box_order)) {
                    $ii++;
                    //print 'box_id '.$boxactivated[$ii]->box_id.' ';
                    //print 'box_order '.$boxactivated[$ii]->box_order.'<br>';
                    // Show box
                    $box->loadBox($box_max_lines);
                    $boxlista .= $box->outputBox();
                }
            }
            if (empty($conf->browser->phone)) {
                $emptybox->box_id = 'A';
                $emptybox->info_box_head = array();
                $emptybox->info_box_contents = array();
                $boxlista .= $emptybox->outputBox(array(), array());
            }
            $boxlista .= "</div>\n";
            $boxlista .= "<!-- End box left container -->\n";
            //$boxlist.= '</div><div class="fichehalfright"><div class="ficheaddleft">';
            $boxlistb .= "\n<!-- Box right container -->\n";
            $boxlistb .= '<div id="right" class="connectedSortable">' . "\n";
            $ii = 0;
            foreach ($boxactivated as $key => $box) {
                if (!empty($user->conf->{$confuserzone}) && $box->fk_user == 0 || empty($user->conf->{$confuserzone}) && $box->fk_user != 0) {
                    continue;
                }
                if (empty($box->box_order) && $ii < $nbboxactivated / 2) {
                    $box->box_order = 'B' . sprintf("%02d", $ii + 1);
                }
                // When box_order was not yet set to Axx or Bxx and is still 0
                if (preg_match('/^B/i', $box->box_order)) {
                    $ii++;
                    //print 'box_id '.$boxactivated[$ii]->box_id.' ';
                    //print 'box_order '.$boxactivated[$ii]->box_order.'<br>';
                    // Show box
                    $box->loadBox($box_max_lines);
                    $boxlistb .= $box->outputBox();
                }
            }
            if (empty($conf->browser->phone)) {
                $emptybox->box_id = 'B';
                $emptybox->info_box_head = array();
                $emptybox->info_box_contents = array();
                $boxlistb .= $emptybox->outputBox(array(), array());
            }
            $boxlistb .= "</div>\n";
            $boxlistb .= "<!-- End box right container -->\n";
            //$boxlist.= '</div></div>';
            //$boxlist.= "\n";
            //$boxlist.= "</td></tr>";
            //$boxlist.= "</table>";
        }
        return array('selectboxlist' => count($boxactivated) ? $selectboxlist : '', 'boxactivated' => $boxactivated, 'boxlista' => $boxlista, 'boxlistb' => $boxlistb);
    }
开发者ID:NoisyBoy86,项目名称:Dolibarr_test,代码行数:101,代码来源:html.formother.class.php


注:本文中的ModeleBoxes::outputBox方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。