本文整理汇总了PHP中GWF_Website类的典型用法代码示例。如果您正苦于以下问题:PHP GWF_Website类的具体用法?PHP GWF_Website怎么用?PHP GWF_Website使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了GWF_Website类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Upgrade_Slaytags_1_01
function Upgrade_Slaytags_1_01(Module_Slaytags $module)
{
GWF_Website::addDefaultOutput(GWF_HTML::message('Slaytags', "BPM and Key"));
$songs = GDO::table('Slay_Song');
$songs->createColumn('ss_bpm');
$songs->createColumn('ss_key');
}
示例2: templateEnsemble
private function templateEnsemble()
{
$l = new GWF_LangTrans($this->module->getModuleFilePath('lang/ensemble'));
GWF_Website::setPageTitle($l->lang('page_title'));
$tVars = array('title' => $l->lang('title'), 'text' => $l->lang('text'), 'text2' => $l->lang('text2'), 'types' => $l->lang('types'), 'other' => $l->lang('other'), 't1' => $l->lang('t1'), 't2' => $l->lang('t2'), 'altimg1' => $l->lang('altimg1'), 'altimg2' => $l->lang('altimg2'));
return $this->module->template('ensemble.tpl', $tVars);
}
示例3: templateBiography
private function templateBiography()
{
$l = new GWF_LangTrans($this->module->getModuleFilePath('lang/biography'));
GWF_Website::setPageTitle($l->lang('page_title'));
$tVars = array('title' => $l->lang('title'), 'name' => $l->lang('name'), 'sopran' => $l->lang('sopran'), 'text' => $l->lang('text'), 't1' => $l->lang('t1'), 'altimg' => $l->lang('t1'));
return $this->module->template('biography.tpl', $tVars);
}
示例4: templateAdd
private function templateAdd()
{
GWF_Website::setPageTitle($this->module->lang('ft_add'));
$form = $this->getForm();
$tVars = array('preview' => '', 'form' => $form->templateY($this->module->lang('ft_add')));
return $this->module->templatePHP('add.php', $tVars);
}
示例5: execute
public function execute()
{
if (false !== ($error = $this->sanitize())) {
return $error;
}
$nav = $this->module->templateNav();
$back = '';
# Enable
if (false !== Common::getPost('enable')) {
$back .= $this->onEnable('enabled');
} elseif (false !== Common::getPost('disable')) {
$back .= $this->onEnable('disabled');
} elseif (false !== Common::getPost('defaults')) {
$back .= $this->onDefaults();
} elseif (false !== Common::getPost('update')) {
$back .= $this->onUpdate();
} elseif (false !== Common::getPost('admin_sect')) {
if ($this->mod->hasAdminSection()) {
GWF_Website::redirect($this->mod->getAdminSectionURL());
return '';
} else {
$back .= $this->module->error('err_no_admin_sect');
}
}
# Form
return $nav . $back . $this->templateModule();
}
示例6: execute
public function execute()
{
GWF_Website::plaintext();
$input = trim(Common::getGetString('username', ''));
if (false !== ($onsitename = Common::getGet('onsitename')) && false !== ($sitename = Common::getGet('sitename'))) {
die($this->rawOnSiteStats($sitename, $onsitename));
}
require_once GWF_CORE_PATH . 'module/WeChall/WC_RegAt.php';
if (Common::getGet('wechall') === 'yes') {
die($this->wechallChalls($input));
}
if ($input === '') {
$message = sprintf('Try %s?username=name/rank. New: ?username=!sitename username/rank. Or: ?username=!sites usernname', 'wechall.php');
die($message);
}
if (strpos($input, '!sites') === 0) {
$this->showSites($input);
} elseif (strpos($input, '!site') === 0) {
$this->showSiteDetail($input);
} elseif (strpos($input, '!') === 0) {
$this->showSite($input);
} else {
die($this->showGlobal($input));
}
}
示例7: templateArrangements
private function templateArrangements()
{
$l = new GWF_LangTrans($this->module->getModuleFilePath('lang/arrangements'));
GWF_Website::setPageTitle($l->lang('page_title'));
$tVars = array('title' => $l->lang('title'), 'h1' => $l->lang('h1'), 't1' => $l->lang('t1'), 'h2' => $l->lang('h2'), 't2' => $l->lang('t2'), 'h3' => $l->lang('h3'), 't3' => $l->lang('t3'), 'title2' => $l->lang('title2'), 'text2' => $l->lang('text2'));
return $this->module->template('arrangements.tpl', $tVars);
}
示例8: templatePresse
private function templatePresse()
{
$l = new GWF_LangTrans($this->module->getModuleFilePath('lang/presse'));
GWF_Website::setPageTitle($l->lang('page_title'));
$tVars = array('title' => $l->lang('title'), 'subtitle' => $l->lang('subtitle'), 'text' => $l->lang('text'), 'altimg' => $l->lang('altimg'), 't1' => $l->lang('t1'), 't2' => $l->lang('t2'), 't3' => $l->lang('t3'), 't4' => $l->lang('t4'), 't5' => $l->lang('t5'));
return $this->module->template('presse.tpl', $tVars);
}
示例9: execute
public function execute()
{
GWF_Website::setPageTitle($this->module->lang('pt_scorefaq'));
GWF_Website::setMetaTags($this->module->lang('mt_scorefaq'));
$tVars = array('scoring' => new GWF_LangTrans(GWF_CORE_PATH . 'module/WeChall/lang/scoring/_wc_scoring'));
return $this->module->templatePHP('scoring_faq.php', $tVars);
}
示例10: templateLicense
private function templateLicense()
{
$lang = new GWF_LangTrans(GWF_CORE_PATH . 'module/WeChall/lang/tos/_wc_tos');
GWF_Website::setPageTitle($lang->lang('pt_license'));
$tVars = array('license' => $lang);
return $this->module->templatePHP('license.php', $tVars);
}
示例11: execute
public function execute()
{
GWF_Website::plaintext();
GWF3::setConfig('store_last_url', false);
$lat = $this->module->lat();
$lon = $this->module->lon();
$descr = trim(Common::getGetString('pp_descr'));
$descr = $descr === '' ? null : $descr;
$id = Common::getGetInt('pp_id', 0);
$user = GWF_User::getStaticOrGuest();
$uid = $user->getID();
if (!GWF_ProfilePOI::changeAllowed($id, $uid)) {
$this->module->ajaxError('Permission error!');
}
$count = $id === 0 ? GWF_ProfilePOI::getPOICount($uid) : 0;
$max_pois = $this->module->cfgAllowedPOIs();
if ($count >= $max_pois) {
$this->module->ajaxErr('err_poi_exceed');
}
$poi = new GWF_ProfilePOI(array('pp_id' => $id, 'pp_uid' => $uid, 'pp_lat' => $lat, 'pp_lon' => $lon, 'pp_descr' => $descr));
$poi->replace();
$data = $poi->getGDOData();
$data['user_name'] = $user->getVar('user_name');
die(json_encode($data));
}
示例12: onRegister
private function onRegister()
{
$form = $this->getForm();
$errorsA = $errorsB = '';
if (false !== ($errorsA = $form->validate($this->module)) || false !== ($errorsB = $this->onRegisterB())) {
return $errorsA . $errorsB . $this->templateForm();
}
$username = Common::getPost('username');
$password = Common::getPost('password');
$email = Common::getPost('email');
$birthdate = sprintf('%04d%02d%02d', Common::getPost('birthdatey'), Common::getPost('birthdatem'), Common::getPost('birthdated'));
$default_country = $this->module->cfgDetectCountry() ? GWF_IP2Country::detectCountryID() : 0;
$countryid = $form->getVar('countryid', $default_country);
require_once GWF_CORE_PATH . 'module/Register/GWF_UserActivation.php';
$token = GWF_UserActivation::generateToken();
$ua = new GWF_UserActivation(array('username' => $username, 'email' => $email, 'token' => $token, 'birthdate' => $birthdate, 'countryid' => $countryid, 'password' => GWF_Password::hashPasswordS($password), 'timestamp' => time(), 'ip' => GWF_IP6::getIP(GWF_IP_EXACT)));
if (false === $ua->insert()) {
return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__)) . $this->templateForm();
}
if ($this->module->wantEmailActivation()) {
return $this->sendEmail($username, $email, $token, $password);
} else {
GWF_Website::redirect(GWF_WEB_ROOT . 'quick_activate/' . $token);
}
return $this->module->message('msg_registered');
}
示例13: execute
public function execute()
{
if (false !== ($state = Common::getGet('rightpanel'))) {
GWF_Session::set('WC_RIGHT_PANEL', $state > 0);
GWF_Website::redirectBack();
}
}
示例14: display
public static function display()
{
$y1 = substr(GWF_Website::getBirthdate(), 0, 4);
$y2 = date('Y');
$years = $y1 === $y2 ? $y1 : "{$y1}-{$y2}";
return GWF_HTML::lang('copy', array($years));
}
示例15: __construct
public function __construct($basepath = NULL, array $config = array())
{
self::init($basepath);
self::onDefineWebRoot();
GWF_Language::initEnglish();
GWF_Website::init(false);
}