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


PHP View::Obj方法代码示例

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


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

示例1: EditForm

	public function EditForm()
	{
		ob_start();
		echo "<table>";
		foreach( $this->keys as $key )
		{
			if ( is_object( $this->data[$key] ) )
			{
				echo $this->data[$key]->Mutator()->EditForm();
			}
			else
			{
				$arr["name"] = $key;
				$arr["text"] = ucfirst($key);
				$arr["value"] = $this->data[$key];
				$arr["uniq"] = "ce";
				$arr["action"] = "request.php?a=card_editor";
				View::Obj()->Component("form_field", $arr);
			}
		}
		echo "</table>";
		$r = ob_get_contents();
		ob_get_clean();
		return $r;
	}
开发者ID:ryanknu,项目名称:Cuber,代码行数:25,代码来源:card.php

示例2: require_once

<?php

// Grab Cuber Tools
require_once("Tools/cuber.php");

if ( Auth::Obj()->Authenticated() )
{
	View::Obj()->Title("Cuber - Cube Management Software by Ryan Knuesel");
	View::Obj()->MainView("home");
}
else
{
	header("Location: /");
}

?>
开发者ID:ryanknu,项目名称:Cuber,代码行数:16,代码来源:home.php

示例3:

<?php

// ****
// ****
// Legacy Notice
// This file is conforms to a very bad design. The new one is much better,
// but this file is part of a component that is going to be scrapped anyway.
// For a better example, look at the Views/Components/cube/ folder.
// ****
// ****

View::Obj()->UseDataModel("set");
View::Obj()->Component("set_editor");

?>
开发者ID:ryanknu,项目名称:Cuber,代码行数:15,代码来源:set_editor.php

示例4: if

<?php 

// **
// * Content View
// * Describes the main container.
// **

// * Include the proper javascript file, cuber_e for cuber:dev,
// * cuber for cuber.
$dev    = App::Obj()->IsDev()? "_e":"";
$jsPath = "Views/js/cuber{$dev}.js";

?><!DOCTYPE html>
<html>
  <head>
  	<title><?php echo $title?$title:"Cuber by Ryan Knuesel";?></title>
  	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
  	
  	<link rel="stylesheet" type="text/css" href="Views/css/cuber.css" media="screen" />
  	<?php if (!App::Obj()->IsOffline()) { ?>
  	<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.12/jquery-ui.min.js"></script>
  	<?php } ?>
  	<script type="text/javascript" src="<?php echo $jsPath; ?>"></script>
  </head>
  <body>
  	
  	<?php View::Obj()->View($view->Get("view")); ?>
  	
  </body>
</html>
开发者ID:ryanknu,项目名称:Cuber,代码行数:31,代码来源:content.php

示例5:

<div id="content">
  <?php View::Obj()->Component("set"); ?>
  <?php View::Obj()->Component("card"); ?>
  <?php View::Obj()->Component("invite"); ?>
</div>
开发者ID:ryanknu,项目名称:Cuber,代码行数:5,代码来源:admin.php

示例6:

<?php

// **
// * Card
// * Component
// * Hmm. Guess I have to draw a card.
// *
// * Author: Ryan Knuesel
// **

$image = "background-image:url('" . $view->Frame() . "');";
$text = $view->Text();
$id = $view->ID();

?>
<div class="cardRule" id="UNIQ_ID"
	onclick="4;"
	onmouseover="card_hover('#overlay_' + <?php echo $id; ?>, true);"
	onmouseout="card_hover('#overlay_' + <?php echo $id; ?>, false);"
	style="background-clip:border-box;<?php echo $image; ?>background-repeat:no-repeat;position:relative;">
  <div style="position: absolute; top: 7px; left: 10px;" class="cardText">
    <?php echo $view->Name(); ?>
  </div>
  <div style="position: absolute; top: 97px; left: 10px;text-align:left;width:90px;height:40px;overflow:scroll;" class="cardText">
    <?php echo $text; ?>
  </div>
  <?php View::Obj()->Component("card/overlay", $view); ?>
</div>
开发者ID:ryanknu,项目名称:Cuber,代码行数:28,代码来源:card.php

示例7: Facebook

if ( App::Obj()->UseFacebook() )
{
	if ( Auth::Obj()->Authenticated() )
	{
		header("Location: home.php");
	}
	else
	{
		Auth::Obj()->LogIn();
		if ( isset($_GET["code"]) )
		{
			View::Obj()->Title("Cuber - Cube Management Software by Ryan Knuesel");
			View::Obj()->MainView("invitation");
		}
		else
		{
			$fb = new Facebook(App::Obj()->FacebookSettings());
			$loginurl = $fb->getLoginUrl();
			header("Location: $loginurl");
		}
	}
}
// Dev environment
else
{
	// Display Cuber Homepage
	View::Obj()->Title("Cuber - Cube Management Software by Ryan Knuesel");
	View::Obj()->MainView("default");
}

?>
开发者ID:ryanknu,项目名称:Cuber,代码行数:31,代码来源:index.php

示例8:

	}
}
else
{
	try
	{
		
		if ( isset($_POST["user"]) )
		{
			if ( @$_POST["pass"] == @$_POST["pass2"] )
				User::Create($_POST);
		}
		
		if ( !Auth::Obj()->Authenticated() )
		{
			View::Obj()->Title("Cuber - Sign up!");
			View::Obj()->MainView("signup");
		}
		else
		{
			header("Location: welcome.php");
		}
	
	}
	catch( Exception $e )
	{
		View::Obj()->Exception($e);
	}
}

?>
开发者ID:ryanknu,项目名称:Cuber,代码行数:31,代码来源:signup.php

示例9: DrawAddCubeCell

	public static function DrawAddCubeCell()
	{
		$r = new Record(
			array(
				"name" => "Add Cube",
				"count" => "Click here to make a new cube.",
				"id" => "new"
			)
		);
		View::Obj()->Component(Cube::$CELL_COMPONENT, $r);
	}
开发者ID:ryanknu,项目名称:Cuber,代码行数:11,代码来源:cube.php

示例10: require_once

<?php

// Grab Cuber Tools
require_once("Tools/cuber.php");

if ( Auth::Obj()->Authenticated() && Auth::Obj()->CanAccess(2) )
{
	View::Obj()->Title("Cuber Admin - Cube Management Software by Ryan Knuesel");
	View::Obj()->MainView("admin");
}
else
{
	header("Location: /");
}

?>
开发者ID:ryanknu,项目名称:Cuber,代码行数:16,代码来源:admin.php

示例11:

<?php

$PathToRoot = "../..";
require "../../Tools/cuber.php";

View::Obj()->Component("cube/edit");

?>
开发者ID:ryanknu,项目名称:Cuber,代码行数:8,代码来源:edit.php

示例12: Cube

<?php

// **
// * Cube Edit
// * Component
// * Initially displays a grid that shows all the cards in the cube, and
// * after the cube enters edit mode, shows more components in a right
// * pane while this component shrinks onto a left side pane.
// *
// * Author: Ryan Knuesel
// **

$c = new Cube($_GET["cube"]);

?>

<?php View::Obj()->Component("cube/title", $c); ?>

<div id="cube_main_left" style="display:inline-block;width:97%;border:none;overflow-y:scroll;overflow-x:visible;">
  <?php
    foreach( $c->Cards() as $card )
    {
    	View::Obj()->Component("cube/entry", $card);
    }
  ?>
</div>
<div id="cube_main_right" style="display:none;border:none;vertical-align:top;margin-left:10px;">
  Put yo cube editor here. <?php // I did it for the lulz ?>
</div>
开发者ID:ryanknu,项目名称:Cuber,代码行数:29,代码来源:edit.php

示例13: foreach

<?php

$sets = Set::SetList();
foreach ( $sets as $set )
{
	View::Obj()->Component("set/cell", $set);
}

?>
开发者ID:ryanknu,项目名称:Cuber,代码行数:9,代码来源:select.php


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