Example #1
0
 public function action_view($request)
 {
     $output = new DKY_Output();
     $output->template = DKY_PATH_ROOT . "/template/master.html.php";
     $staticBlock = new Static_Block($request);
     $output->addBlock($staticBlock, "main");
     $output->processRequest($request);
     $output->display();
 }
Example #2
0
 public function action_logout($request)
 {
     DKY_SessionHandler::destroySession();
     DKY_SessionHandler::startSession();
     DKY_Output::raiseMessage("You are now logged out.", DKY_MSG_SUCCESS);
     DKY_HTTP::redirect("/");
 }
Example #3
0
 public function action_get_items($request)
 {
     $aItems = DKY_Item::getItems(array("parent_id" => $request->get("parentId")), true);
     $strOptions = DKY_Output::getSelectOptions($aItems);
     echo trim($strOptions);
     die;
     // hexdump($strOptions);
 }
Example #4
0
 public function __construct($request)
 {
     parent::__construct($request);
     $this->templateDirectory = realpath(dirname(__FILE__) . "/../template") . "/";
     $this->template = "login.html.php";
     $this->component = "user";
     $this->action = "login";
     $this->aMessages = DKY_Output::getMessages();
 }
            <div class="btn-group" data-toggle="buttons">
              <label class="btn btn-default btn-xs">
                <input type="radio" name="item[group_exclusive]" autocomplete="off" value="1"> All Except Selected Groups
              </label>
              <label class="btn btn-default btn-xs active">
                <input type="radio" name="item[group_exclusive]" autocomplete="off" value="0" checked> Only Selected Groups
              </label>
            </div>
          
          <?php 
}
?>
          
	      <select style="margin-top:5px;" name="item[aGroupIds][]" multiple class="form-control" id="item-groups" data-placeholder="Group Access">
	        <?php 
DKY_Output::makeSelect($this->aGroups, $this->aItem["aGroupIds"]);
?>
	      </select>	      
	    </div>
	  </div>
	  
  </div>
<div class="panel-footer clearfix">
    <div class="form-group" style="margin-bottom:0px">
    <div class="col-sm-offset-2 col-sm-10">
      <?php 
if ($this->action == "update") {
    ?>
      <button type="submit" class="btn btn-primary">Update</button>
      <?php 
} else {
}
?>
        
        <div id="page-wrapper">
		
		<div class="row">
          <div class="col-lg-12">
            <h1 class="page-header"><?php 
echo $this->pageTitle;
?>
</h1>
          </div>
        </div>
		
		<?php 
foreach (DKY_Output::getMessages() as $type => $aMessages) {
    ?>
		  <?php 
    foreach ($aMessages as $message) {
        ?>
            <div class='alert alert-dismissible alert-<?php 
        echo $type;
        ?>
'>
			  <button type='button' class='close' data-dismiss='alert'>
			  <span aria-hidden='true'>&times;</span><span class='sr-only'>Close</span>
			  </button>
			  <?php 
        echo $message;
        ?>
			</div>
Example #7
0
 public static function makeSelect($aValues, $aSelectedValues = null)
 {
     echo DKY_Output::getSelectOptions($aValues, $aSelectedValues);
 }