<?php
class Page_Portfolio extends Page_Basic
{
function actionIndex() {
$cms_class = cms_class::getInstance();
$sql = "SELECT * FROM site_portfoliotheme WHERE portfoliotheme_active='Y'";
$menu = $cms_class->getRecords($sql, 3);
$sql = "SELECT * FROM site_portfolio WHERE portfolio_active='Y' ORDER BY portfolio_id DESC";
$viewportf = $cms_class->getRecords($sql, 150, "portfolio_image");
return array("menu"=>$menu, "viewportf"=>$viewportf);
}
function actionHtml()
{
$cms_class = cms_class::getInstance();
$sql = "SELECT * FROM site_portfolio WHERE portfolio_active='Y' AND portfolio_theme='".Router::$pageParams["html"]."'";
$records = $cms_class->getRecords($sql, 150, "portfolio_image");
return array("records"=>$records, "menu"=>$menu);
}
}
<?php
class Page_Portfolio extends Page_Basic{
private $menu;
public function actionIndex() {
$this->menu;
}
public function actionHtml(){
$this->menu;
}
}
<?php
class Page_Portfolio extends Page_Basic{
public function actionIndex() {
}
public function actionHtml(){
$this->actionIndex();
}
}
$menu = $this->actionIndex();
$menu = $menu['menu'];
<?php
<?php
class Page_Portfolio extends Page_Basic
{
function actionIndex() {
$sql = "SELECT * FROM site_portfolio WHERE portfolio_active='Y' ORDER BY portfolio_id DESC";
$viewportf = cms_class::getInstance()->getRecords($sql, 150, "portfolio_image");
return array("menu"=>$this->getMenu(), "viewportf"=>$viewportf);
}
function getMenu() {
$cms_class = cms_class::getInstance();
return $cms_class->getRecords($sql, 3);
}
function actionHtml() {
$cms_class = cms_class::getInstance();
$sql = "SELECT * FROM site_portfolio WHERE portfolio_active='Y' AND portfolio_theme='".Router::$pageParams["html"]."'";
$records = $cms_class->getRecords($sql, 150, "portfolio_image");
return array("records"=>$records, "menu"=>$this->getMenu());
}
}