/** * * @return Am_Lite */ public static function getInstance() { if (is_null(self::$_instance)) { self::$_instance = new self(); } return self::$_instance; }
public function isLoggedIn() { return \Am_Lite::getInstance()->isLoggedIn(); }
function doAjaxValidate() { if (($err = $this->validate(array('path' => am4Request::get('path')))) === true) { $am = Am_Lite::getInstance(); $e = new aMemberJson(); $e->valid = 1; $e->url = $am->getRootURL(); echo $e; } else { $e = new aMemberJsonError($err); echo $e; } }
/** * * @return Am_Lite */ static function getAPI() { if (!self::$api) { try { self::initAPI(); self::$api = Am_Lite::getInstance(); } catch (Exception $e) { return false; } } return self::$api; }
public function trending() { if ($this->myauth->getUserId() == 1) { $data['isPaid'] = true; } else { $data['isPaid'] = Am_Lite::getInstance()->checkPaid(); } $data['title'] = $this->Vip_model->getConfigs("title"); $data['dsongs'] = $this->Vip_model->top20OfDay(1); $data['wsongs'] = $this->Vip_model->top20OfWeek(1); $data['msongs'] = $this->Vip_model->top20OfMonth(1); $data['ysongs'] = $this->Vip_model->top20OfYear(1); $data['dvideos'] = $this->Vip_model->top20OfDay(2); $data['wvideos'] = $this->Vip_model->top20OfWeek(2); $data['mvideos'] = $this->Vip_model->top20OfMonth(2); $data['yvideos'] = $this->Vip_model->top20OfYear(2); $data['facebook'] = $this->Vip_model->getConfigs("facebook"); $data['youtube'] = $this->Vip_model->getConfigs("youtube"); $data['soundcloud'] = $this->Vip_model->getConfigs("soundcloud"); $data['vimeo'] = $this->Vip_model->getConfigs("vimeo"); $data['instagram'] = $this->Vip_model->getConfigs("instagram"); $this->load->view('index-trending', $data); }
public static function renderLoginForm() { return \Am_Lite::getInstance()->renderLoginForm(); }
<?php include dirname(__FILE__) . "/../../../library/Am/Lite.php"; Am_Lite::getInstance()->checkAccess($_product_id);