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


PHP Button::draw方法代码示例

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


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

示例1: Button

 /**
  * draw the submit button.
  */
 function draw_buttons()
 {
     global $lang;
     echo "<tr><td colspan=\"2\" align=\"center\">";
     $submitbutton = new Button("goon", $lang->get('login', 'Sign In'), "", "button", "document.loginform.passwd.value=hex_md5(document.loginform.passwd0.value);document.loginform.passwd0.value='';document.loginform.submit();");
     $submitbutton->draw();
     echo "</td></tr>";
 }
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:11,代码来源:loginform.php

示例2: draw

 /**
  * Draw HTML output
  */
 function draw()
 {
     global $c, $sid, $lang;
     echo '<td colspan="3"><table width="100%" border="0" cellpadding="3" cellspacing="0"><tr>';
     $widget = new Cell("clc", "", 2, $this->width, 20);
     $widget->draw();
     echo "</tr><tr>\n";
     echo '<td colspan="2"align="right">&nbsp;</td>';
     echo '<td align="right">';
     $lbi = new Button("action", $lang->get("print", "print"), "navelement", "button", "window.open('" . $_SERVER['REQUEST_URI'] . "&print=1');");
     $lbi->draw();
     echo "&nbsp;&nbsp;";
     $lbi = new Button("action", $lang->get("refresh", "refresh"), "navelement", "button", "document.location.href = document.location.href;");
     $lbi->draw();
     retain("action", "");
     retain("sid", $sid);
     echo "</td></tr></table></td>";
     return $this->cells;
 }
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:22,代码来源:print_button.php

示例3: Button

		/**
		  * internal. Draws the buttons of your form.
		  */
		function draw_buttons() {
			global $lang;

			echo "<tr><td valign=\"middle\" align=\"right\" colspan=\"2\">";
			$value = "Update";
			$resetbutton = new Button("reset", $lang->get("reset_form", "Reset Form"), "", "reset");
			$resetbutton->draw();
			echo "&nbsp;&nbsp;";
			retain("goon");
			$submitbutton = new Button("goon", $value, "", "submit", $this->submitButtonAction.$this->getWaitupScreen());
			$submitbutton->draw();	
			echo "</td></tr>";
		}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:16,代码来源:stdforms.php

示例4: Input

		/**
		 * internal. Draw filter input.
		 */
		function draw_form() {
			global $lang;

			echo '<table width="170"><tr>';
			echo "<td>" . $lang->get("filter_rule", "Search for..."). "</td>";
			echo "<td>" . $lang->get("filter_column", "...in"). "</td></tr><tr>";
			$txtb = new Input("filter_rule", $this->filter_rule, "embedded", "16", "", $width = "90", "TEXT", "", 1);
			$txtb->draw();

			$select = new Dropdown("filter_column", $this->columns, "embedded", $this->filter_column, 80);
			$select->draw();
			echo "</tr><tr>";
			echo '<td colspan="2">';
			echo '<table width="100%" cellpadding="0" cellspacing="0" border="0">';
			echo '<tr><td>';
			echo '<input type="hidden" name="filter" value="">';
			echo '<input type="hidden" name="clearsearch" value="">';

			$submitbutton = new Button("filter", $lang->get("search", "Search"), "navelement", "submit", "", "filter");
			$submitbutton->draw();
			echo "&nbsp;&nbsp;";
			$clearbutton = new LinkButton("clearsearch", $lang->get("search_clear", "Reset Filter"), "navelement", "submit", "document.filter.filter_rule.value='';", "filter");
			$clearbutton->draw();
			br();
			br();
			echo "</td><tr></table></td></tr></table>";			
		}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:30,代码来源:filter.php

示例5: 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


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