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


PHP Container::draw方法代码示例

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


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

示例1: draw

 /**
  * Draw the Category Overview
  */
 function draw()
 {
     $categories = createNameValueArrayEx("categories", "CATEGORY_NAME", "CATEGORY_ID", "PARENT_CATEGORY_ID=" . $this->parentCat, "order by CATEGORY_NAME");
     if (count($categories) > 0) {
         Container::draw();
         echo '<tr><td colspan="' . $this->columns . '">';
         echo '<table width="100%" cellpadding="0" cellspacing="0" border="0">';
         $style = ' style="border-bottom:1px solid #cccccc;cursor:pointer;padding-top:2px; padding-bottom:2px;" ';
         for ($i = 0; $i < count($categories); $i++) {
             echo "<tr class=\"grid\" onMouseOver='this.style.backgroundColor=\"#ffffcc\";' onMouseOut='this.style.backgroundColor=\"#e8eef7\";' onClick='document.location.href=\"" . $this->editAction . $categories[$i][1] . "\";'>";
             echo "<td {$style}>&nbsp;" . $categories[$i][0] . '</td>';
             echo "</tr>";
         }
         echo '</table>';
         echo '</td></tr>';
     }
     return $this->columns;
 }
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:21,代码来源:subcategory_selector.php

示例2: draw

 function draw()
 {
     echo $this->prepareErrorstring();
     echo "<br>";
     Container::draw();
 }
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:6,代码来源:classes_db.php

示例3: value

		/**
		 * draw the form for creating new items.
		 * May be overwritten if standard Display should not be used!
		 */
		function draw_new() {
			global $db, $lang, $go, $oid, $newitem, $errors, $page_action;
			
			$newitem = value("newitem");
			$oid = value("oid", "NUMERIC");
			$go = value("go", "NOSPACES");
			
			//needed for uniqueness checks.
			$page_action = "INSERT";
			$go = "UPDATE";

			$container = new Container(4);
			$container->add(new Label("lbl", $lang->get("selectobject"), "informationheader", 3));
			$container->add(new Cell("clc", "cwhite", 1, 20,10));
			$container->add(new Cell("clc", "cwhite", 1, 150,10));
			$container->add(new Cell("clc", "cwhite", 1, 350,10));
			// what data should be displayed

			// check if item is selected.
			$stdStyle = "standardlight";
			if ($this->state == creating && $newitem == "0") {
				$errors .= "-MANDATORY";
				$stdStyle = "error";				
				$container->add(new Label("lbl", $lang->get("selectone"), "error", 3));
			}
			$sql = "SELECT " . $this->new_pkname . ", " . $this->new_name . ", " . $this->new_description . " FROM " . $this->new_table . " ORDER BY " . $this->new_name;
			$query = new query($db, $sql);
			while ($query->getrow()) {
			    $pk = $query->field($this->new_pkname);
				$checked = false;
			    if (value("newitem", "NUMERIC") == $pk) $checked = true;
				$container->add(new Radio("newitem", $pk, $stdStyle, $checked));
				$container->add(new Label("name", $query->field($this->new_name), "standard", 2));
				$container->add(new Cell("clc", "standard", 1));
				$container->add(new Label("desc", $query->field($this->new_description), "description", 2));
			}
			
			$nameinput = new TextInput($lang->get("name"), $this->item_table, $this->item_name, "1", "type:text,size:32,width:200", "UNIQUE&MANDATORY");
			$nameinput->setFilter($this->item_parentKeyName . " = $oid");
			$positioninput = new TextInput($lang->get("position"), $this->item_table, "POSITION", "1", "type:text,size:3,width:30", "MANDATORY", "NUMBER");

			if ($this->state == "creating") {
				$nameinput->check();
				$positioninput->check();
			}
			$container->add(new Cell("cll", "standard", 3, 10, 10));
			$container->add(new Cell("cll", $nameinput->std_style, 1, 10, 1));
			$container->add($nameinput);
			$container->add(new Cell("cll", $positioninput->std_style, 1, 10, 1));
			$container->add($positioninput);
						
			
			// drawing.
			echo drawSpacer(1,1)."</td><td>".drawSpacer(1,1)."</td></tr>"; // cleanup the shit.
			echo "<tr><td colspan=\"2\"><br>";			
			echo '<table width="100%" cellpadding="0" cellspacing="0" border="0">';
			$container->draw();
			echo '</table>';
			echo '</td></tr>';
			echo '<tr><td colspan="2" align="right">';
			echo '<br/>';
			
			$resetbutton = new Button("reset", $lang->get("reset"), "navelement", "reset");
			$resetbutton->draw();
			echo drawSpacer(50,1);
			$backbutton = new Button("back", $lang->get("back"), "navelement", "submit");
			$backbutton->draw();
			echo '&nbsp;&nbsp;';
			$submitbutton = new Button("neu", $lang->get("create"), "navelement", "submit");
			$submitbutton->draw();
			retain("oid", $oid);
			retain("action", "editobject");
				
		
		}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:79,代码来源:containerform.php


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