本文整理匯總了PHP中Basic::TransVar方法的典型用法代碼示例。如果您正苦於以下問題:PHP Basic::TransVar方法的具體用法?PHP Basic::TransVar怎麽用?PHP Basic::TransVar使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Basic
的用法示例。
在下文中一共展示了Basic::TransVar方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
function __construct($id = 1)
{
$fpp = new fpp_paybank_Model();
$orm = $fpp->db2cls($id);
$title_paybank = Basic::TransVar("title_paybank");
var_dump($title_paybank);
$description_paybank = Basic::TransVar("description_paybank");
$this->title = $orm->{$title_paybank};
$this->description = $orm->{$description_paybank};
}
示例2: index
public function index()
{
//$profiler = new Profiler;
if (isset($_GET['emailtest'])) {
$this->emailtest();
die;
}
if (isset($_GET['database'])) {
$this->alterDatabase();
}
if (isset($_GET['cronjob'])) {
$this->cronjob();
die;
}
@session_start();
// $lan = (@$_GET['l']<>'en') ? "es" : 'en';
if (@$_GET['l'] != '') {
$_SESSION['lan'] = @$_GET['l'] != 'en' ? array("es_ES", 'España') : array("en_US", 'USA');
}
if (@$_SESSION['lan'] != "") {
Kohana::config_set("locale.language", $_SESSION['lan']);
}
$lang = new Translate();
$lang->currency();
$defaultobj = "category";
$defaultact = "index";
$module = $this->uri->segment("index") != '' ? $this->uri->segment("index") : $defaultobj;
$action = $this->uri->segment($module) != '' ? $this->uri->segment($module) : $defaultact;
$module = ucfirst($lang->word->{$module});
$lib = new $module();
$action = @$lang->word->{$action};
$this->template->widget = $lib->GetWidgets();
if (method_exists($lib, $action) === FALSE) {
$lib = new $module();
$lib->{$defaultact}();
} else {
$lib->{$action}();
}
$table_page = new fpp_page_Model();
$header = $table_page->db2cls(46);
$footer = $table_page->db2cls(47);
$meta_description = $table_page->db2cls(48);
$tr_content_page = Basic::TransVar("content_page");
$this->template->header = strip_tags($header->{$tr_content_page});
$this->template->footer = $footer->{$tr_content_page};
$this->template->meta_description = strip_tags($meta_description->{$tr_content_page});
//Executes Action's
$this->template->title = $this->uri->segment() == '' ? 'floreria Rosabel | florerias peru | floreria | enviar flores peru' : Kohana::config("core.title_page") . $lib->GetTitle();
$this->template->content = $lib->GetContent();
$this->template->keywords = $lib->GetKeywords() != '' ? $lib->GetKeywords() : 'enviar flores peru, florerías en lima, florerias en lima, envio de flores a peru,florerías,florerias lima, florerias en Lima,floreria lima, Florerias de Lima, Flores domicilio Lima, Florerias en San Isidro, envio de flores a lima, envio de flores en peru,floreria amor y amistad,flores dia de las madres,arreglos florales, floreria san borja peru, florerias en trujillo, florerias en arequipa, floreria los olivos, florerias unidas,envio de flores lima, delivery flores lima, envio flores, floreria san isidro, arreglos flores, rosas, orquideas, giraloes, tulipanes, delivery flowers, send flowers lima, roses, flower shop lima';
if (request::is_ajax()) {
$this->auto_render = FALSE;
echo $lib->GetContent();
}
}
示例3: detailnews
function detailnews($id)
{
$uri = URI::Instance();
// $id = (int) $uri->segment("detailnews");
// $this->_NoTemplate();
$orm = new fpp_news_Model();
$orm = $orm->db2cls($id);
$title_news = Basic::TransVar("title_news");
$content_news = Basic::TransVar("content_news");
$this->title = $orm->{$title_news};
$this->content = View::factory("main/page")->set("title", __("Eventos", false))->set("content", "<h4>" . $orm->{$title_news} . "</h4>" . $orm->{$content_news})->render();
// $this->content = View::factory("webservices/news_detail")
// ->set("news",$orm)
// ->render();
}
示例4: GetPay
public function GetPay()
{
$ret = null;
$fpp = new fpp_paybank_Model();
$orm = $fpp->db2cls();
$data = $orm->fetch_all();
foreach ($data as $row) {
$title_paybank = Basic::TransVar("title_paybank");
$description_paybank = Basic::TransVar("description_paybank");
$module = 'Pay_paybank' . $row->id_paybank;
$check = @$_POST['payment'] == $module ? true : false;
$ret .= View::factory("base")->set('title', $row->{$title_paybank})->set('description', $row->{$description_paybank})->set('module', $module)->set('check', $check)->render();
}
return $ret;
}
示例5: getUrlById
public static function getUrlById($id, $view_name = true)
{
$cache = Cache::instance();
$tprefix = Basic::TransVar('t');
$uid = $tprefix . 'page__getUrlById__' . $id;
$url = $cache->get($uid);
if (!$url) {
$id = (int) $id;
$orm = new stdClass();
$table = new fpp_page_Model();
$orm = $table->db2cls($id);
$tr_title_page = Basic::TransVar("title_page");
$tr_content_page = Basic::TransVar("content_page");
$title = $orm->{$tr_title_page};
$titleurl = Basic::urlizar($orm->{$tr_title_page});
$url = html::anchor(url::base() . "page/{$id}/{$titleurl}", $view_name ? $title : "");
$cache->set($uid, $url, array(), 3600);
}
return $url;
}
示例6: GetProductByID
public function GetProductByID($id)
{
$orm = $this->table->db2cls($id);
$name_prod = Basic::TransVar("name_product");
$orm->name_product = $orm->{$name_prod};
$cont_prod = Basic::TransVar("description_product");
$orm->description_product = $orm->{$cont_prod};
$data->product = $orm;
$data->category->name_category = @$_SESSION['conf']['title_category'];
$data->category->id_category = @$_SESSION['conf']['id_category'];
$db = Database::Instance();
$rate = $db->query("SELECT AVG(rate) as product_rate FROM product_rate AS pr WHERE pr.product_id = " . $id . " and status='enable'");
if (count($rate) > 0) {
foreach ($rate as $r) {
$data->product_rate = $r->product_rate;
}
} else {
$data->product_rate = 0;
}
return $data;
}
示例7: GetBannerByGroup
public static function GetBannerByGroup($group)
{
if (isset(self::$BannerGroup[$group])) {
return self::$BannerGroup[$group];
} else {
$groupbanner = null;
$banner = new fpp_banner_Model();
$banner = $banner->db2cls();
$banners = $banner->fetch_where(array('group_banner' => $group));
foreach ($banners as $row) {
$wb = $row->group_banner;
$href = $row->href_banner;
$url_banner = Basic::TransVar("url_banner");
$url = $row->{$url_banner};
$groupbanner .= '<div class="banners banners_group_' . $group . '">' . html::anchor($href, html::image(basics::upload() . $url, array('alt' => $row->name_banner, 'title' => $row->name_banner))) . ' </div>';
}
self::$BannerGroup[$group] = $groupbanner;
return self::$BannerGroup[$group];
}
}
示例8: foreach
<!-- <ul> -->
<?php
foreach ($news as $new) {
$title_news = Basic::TransVar("title_news");
$nu = Basic::urlizar($new->{$title_news});
?>
<h6> <?php
echo html::anchor(url::base() . "news/{$new->id_news}/{$nu}", $new->{$title_news});
?>
</h6>
<?php
}
?>
<!-- </ul> -->
示例9: getUrlById
public static function getUrlById($id)
{
$cache = Cache::instance();
$tprefix = Basic::TransVar('t');
$uid = $tprefix . 'Category__getUrlById__' . $id;
$url = $cache->get($uid);
if (!$url) {
$id = (int) $id;
$orm = new stdClass();
$table = new fpp_category_Model();
$orm = $table->db2cls($id);
$name_category = Basic::TransVar("name_category");
$tr_content_page = Basic::TransVar("content_page");
$name = $orm->{$name_category};
$titleurl = Basic::urlizar($name);
$url = html::anchor("category/items/" . $id . '/' . $titleurl, $name);
// $url = html::anchor(url::base()."category/{$id}/{$titleurl}",(($view_name) ? $title : ""));
$cache->set($uid, $url, array(), 3600);
}
return $url;
}