本文整理汇总了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;
}
示例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: /");
}
?>
示例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");
?>
示例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>
示例5:
<div id="content">
<?php View::Obj()->Component("set"); ?>
<?php View::Obj()->Component("card"); ?>
<?php View::Obj()->Component("invite"); ?>
</div>
示例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>
示例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");
}
?>
示例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);
}
}
?>
示例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);
}
示例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: /");
}
?>
示例11:
<?php
$PathToRoot = "../..";
require "../../Tools/cuber.php";
View::Obj()->Component("cube/edit");
?>
示例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>
示例13: foreach
<?php
$sets = Set::SetList();
foreach ( $sets as $set )
{
View::Obj()->Component("set/cell", $set);
}
?>