public function overwriteForm($return, $returnfull) { $gal2 = new PageContainer(); $arrGal = $gal2->getWhere("container_active =1 ORDER BY container_name ASC"); $arrNew[0] = Lang::t("No Parent"); foreach ($arrGal as $c) { $arrNew[$c->container_id] = $c->container_name; } $return['container_parent_id'] = new Leap\View\InputSelect($arrNew, "container_parent_id", "container_parent_id", $this->container_parent_id); $return['container_active'] = new Leap\View\InputSelect($this->arrayYesNO, "container_active", "container_active", $this->container_active); return $return; }
public function subconMenu($mode) { ?> <style> .pagecon{ text-decoration: underline; color: #0066cc; line-height: 30px; text-align: center; } </style> <div class="col-md-3 "> <div style="margin: 10px; border:1px solid #dedede; margin-left: 40px; border-radius: 10px;"> <div style="font-size:15px; background-color: #efefef; padding: 5px;"><?php echo Lang::t('Sub Container'); ?> </div> <?php $pc = new PageContainer(); $parenttext = "AND container_parent_id = '{$mode}'"; $arrGal = $pc->getWhere("container_active =1 {$parenttext} ORDER BY container_name ASC"); //pr($arrGal); if (count($arrGal) == 0) { ?> <div style="line-height: 30px; font-size: 12px; text-align: center;"> <?php echo Lang::t('No SubContainer yet'); ?> </div> <?php } foreach ($arrGal as $pcsub) { ?> <div class="pagecon"><a href="<?php echo _SPPATH; ?> pagecontainer?mode=<?php echo $pcsub->container_id; ?> "><?php echo $pcsub->container_name; ?> </a></div> <?php } ?> </div> </div><?php }
</div> </div> <div id="formgroup_post_subcon_id" class="form-group"> <label for="post_subcon_id" class="col-sm-2 control-label"><?php echo Lang::t('post_subcon_id'); ?> </label> <div class="col-sm-10"> <?php $gal2 = new PageContainer(); if ($cid != "") { $parenttext = "AND container_parent_id = '{$cid}'"; } else { $parenttext = "AND container_parent_id != '0'"; } $arrGal = $gal2->getWhere("container_active =1 {$parenttext} ORDER BY container_name ASC"); ?> <select class="form-control" name="post_subcon_id" id="post_subcon_id"> <option value="0"><?php echo Lang::t('No Subcontainer'); ?> </option> <?php foreach ($arrGal as $gal) { ?> <option <?php if ($gal->container_id == $obj->post_subcon_id) { echo "selected"; } ?> value="<?php
public function overwriteForm2($return, $returnfull) { //$return = parent::overwriteForm($return, $returnfull); $return['comment_count'] = new Leap\View\InputText("hidden", "comment_count", "comment_count", $this->comment_count); $return['post_event_id'] = new Leap\View\InputText("hidden", "post_event_id", "post_event_id", $this->post_event_id); $return['post_author'] = new Leap\View\InputText("hidden", "post_author", "post_author", Account::getMyID()); if ($_GET['load']) { $return['post_date'] = new Leap\View\InputText("hidden", "post_date", "post_date", $this->post_date); } else { $return['post_date'] = new Leap\View\InputText("hidden", "post_date", "post_date", leap_mysqldate()); } $return['post_content'] = new Leap\View\InputTextRTE("post_content", "post_content", $this->post_content); $return['post_status'] = new Leap\View\InputSelect(array("draft" => "Draft", "publish" => "Publish"), "post_status", "post_status", $this->post_status); // $return['post_modified'] = new Leap\View\InputText("hidden","post_modified","post_modified", leap_mysqldate()); $return['post_modified'] = new Leap\View\InputText("hidden", "post_modified", "post_modified", leap_mysqldate()); $return['post_image'] = new \Leap\View\InputFoto("foto", "post_image", $this->post_image); $gal2 = new PageContainer(); $arrGal = $gal2->getWhere("container_active =1 ORDER BY container_name ASC"); foreach ($arrGal as $pc) { $arrPC[$pc->container_id] = $pc->container_name; } $return['post_gallery_id'] = new Leap\View\InputSelect($arrPC, "post_gallery_id", "post_gallery_id", $this->post_gallery_id); return $return; }