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; }
<?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: /"); } ?>
<?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"); ?>
<?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("card"); View::Obj()->Component("card_editor"); ?>
<?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>
<div id="content"> <?php View::Obj()->Component("set"); ?> <?php View::Obj()->Component("card"); ?> <?php View::Obj()->Component("invite"); ?> </div>
<?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>
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"); } ?>
} } 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); } } ?>
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); }
<?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: /"); } ?>
<?php $PathToRoot = "../.."; require "../../Tools/cuber.php"; View::Obj()->Component("cube/edit"); ?>
<?php $PathToRoot = "../.."; require "../../Tools/cuber.php"; View::Obj()->Component("set/list"); ?>
<?php $PathToRoot = "../.."; require "../../Tools/cuber.php"; View::Obj()->Component("set/select"); ?>
<?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("cost"); View::Obj()->Component("cost_editor"); ?>
<?php $PathToRoot = "../.."; require "../../Tools/cuber.php"; View::Obj()->Component("cube/select"); ?>
<?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>
<?php $sets = Set::SetList(); foreach ( $sets as $set ) { View::Obj()->Component("set/cell", $set); } ?>
<?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("welcome"); } else { header("Location: /"); } ?>