本文整理汇总了PHP中GWF_Website::plaintext方法的典型用法代码示例。如果您正苦于以下问题:PHP GWF_Website::plaintext方法的具体用法?PHP GWF_Website::plaintext怎么用?PHP GWF_Website::plaintext使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GWF_Website
的用法示例。
在下文中一共展示了GWF_Website::plaintext方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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));
}
示例2: 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));
}
}
示例3: execute
public function execute()
{
$_GET['ajax'] = 1;
GWF_Website::plaintext();
if (false !== ($error = $this->sanitize())) {
die($error);
}
die($this->history());
}
示例4: execute
public function execute()
{
if (false === ($id = Common::getGetInt('id', false))) {
return GWF_HTML::err('ERR_PARAMETER', array(__FILE__, __LINE__, 'id'));
}
if (false === ($log = GWF_AuditLog::getByID($id))) {
return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__));
}
GWF_Website::plaintext();
die($log->getVar('al_data'));
}
示例5: execute
public function execute()
{
GWF_Website::plaintext();
GWF3::setConfig('store_last_url', false);
$id = Common::getGetInt('pp_id');
if (!GWF_ProfilePOI::changeAllowed($id, GWF_Session::getUserID())) {
$this->module->ajaxError('Permission error!');
}
GDO::table('GWF_ProfilePOI')->deleteWhere("pp_id = {$id}");
die("{$id}");
}
示例6: execute
public function execute()
{
GWF_Website::plaintext();
if (false === Common::getGet('no_session')) {
die('The mandatory parameter \'no_session\' is not set. Try \'&no_session=1\'.');
}
if (false === ($sitename = Common::getGet('sitename'))) {
die($this->showAllSites());
}
if (false === ($site = WC_Site::getByName($sitename)) && false === ($site = WC_Site::getByClassName($sitename))) {
die($this->module->lang('err_site'));
}
die($this->showSite($site));
}
示例7: execute
public function execute()
{
GWF_Website::plaintext();
if (false === ($uid = Common::getGetString('id'))) {
return $this->garbage();
}
if (false === ($token = Common::getGetString('token'))) {
return $this->garbage();
}
if (false === ($mc = Common::getGetString('mc'))) {
return $this->garbage();
}
return $this->validate($uid, $token, $mc);
}
示例8: execute
public function execute()
{
$_GET['ajax'] = 1;
GWF_Website::plaintext();
if (false === Common::getGet('no_session')) {
die('The mandatory parameter \'no_session\' is not set. Try \'&no_session=1\'.');
}
if (false === ($username = Common::getGet('username'))) {
die('The mandatory parameter \'username\' is not set. Try \'&username=nickname\'.');
}
if (false === ($user = GWF_User::getByName($username))) {
die(GWF_HTML::lang('ERR_UNKNOWN_USER'));
}
die($this->showUser($user, Common::getGet('apikey')));
}
示例9: execute
public function execute()
{
GWF_Website::plaintext();
GWF3::setConfig('store_last_url', false);
if (!$this->module->canReadPOIs()) {
return $this->module->ajaxErr('err_poi_read_perm');
}
$minlat = $this->module->lat('minlat');
$maxlat = $this->module->lat('maxlat');
$minlon = $this->module->lon('minlon');
$maxlon = $this->module->lon('maxlon');
$where_perms = GWF_ProfilePOI::wherePermissions();
$where_place = GWF_ProfilePOI::whereLocations($minlat, $maxlat, $minlon, $maxlon);
$where = "({$where_perms}) AND ({$where_place})";
$joins = array('users', 'profiles', 'whitelist');
$result = GDO::table('GWF_ProfilePOI')->selectAll('pp_id, pp_uid, user_name, pp_lat, pp_lon, pp_descr', $where, '', $joins);
die(json_encode($result));
}
示例10: execute
public function execute()
{
GWF_Website::plaintext();
if (false === ($datestamp = Common::getGet('datestamp'))) {
return 'TRY ?datestamp=YYYYMMDDHHIISS&limit=5';
}
if (strlen($datestamp) !== 14) {
return 'TRY ?datestamp=YYYYMMDDHHIISS&limit=5';
}
if (0 === ($limit = Common::getGetInt('limit', 0))) {
return 'TRY ?datestamp=YYYYMMDDHHIISS&limit=5';
}
$date = GDO::escape($datestamp);
$limit = Common::clamp($limit, 1, 25);
if (false === ($result = GDO::table('GWF_ForumThread')->selectObjects('*', "thread_lastdate>='{$date}' AND thread_options&4=0", 'thread_lastdate DESC', $limit))) {
return GWF_HTML::lang('ERR_DATABASE', __FILE__, __LINE__);
}
$back = '';
$unknown = GWF_HTML::lang('unknown');
foreach (array_reverse($result) as $thread) {
#timestamp::lock::postid::threadid::posturl::userurl::username::title
$thread instanceof GWF_ForumThread;
$locked = $thread->getVar('thread_gid') === '0' ? '0' : '1';
$back .= $thread->getVar('thread_tid');
$back .= '::';
$back .= $thread->getVar('thread_lastdate');
$back .= '::';
$back .= $thread->getVar('thread_gid');
$back .= '::';
$back .= 'https://' . GWF_DOMAIN . $thread->getLastPageHREF($locked === '1');
$back .= '::';
$back .= $locked === '1' ? $unknown : $this->getLastPosterName($thread);
$back .= '::';
$back .= $locked === '1' ? $unknown : $thread->getVar('thread_title');
$back .= PHP_EOL;
}
return $back;
}
示例11: previewText
private function previewText(GWF_Mail $mail)
{
GWF_Website::plaintext();
die($mail->nestedTextBody());
}
示例12: onDisplayPage
/**
* Display the page with layout
* If ajax is enabled it returns only the module content
* @param string|NULL $content replace page content
* @return string
*/
public function onDisplayPage($content = NULL)
{
if (true === self::getConfig('log_request') && class_exists('GWF_Log')) {
GWF_Log::logRequest();
}
# Display the page
if (true === isset($_GET['ajax'])) {
GWF_Website::plaintext();
return self::$page;
} else {
$page = $content === NULL ? self::$page : $content;
return GWF_Website::displayPage($page);
}
}
示例13: onCSVExport
private function onCSVExport()
{
GWF_Website::plaintext();
$flags = WC_Warflag::getByWarbox($this->warbox, 'wf_order ASC');
echo self::CSV_COLUMNS . PHP_EOL;
foreach ($flags as $flag) {
$flag instanceof WC_Warflag;
$input = array($flag->getVar('wf_order'), $flag->getVar('wf_cat'), $flag->getVar('wf_score'), $flag->getVar('wf_title'), $flag->getVar('wf_url'), $flag->getVar('wf_authors'), $flag->getVar('wf_status'), $flag->getVar('wf_login'), '', $flag->isWarchall() ? 'SSH' : 'WEB');
echo GWF_Array::toCSV($input) . PHP_EOL;
}
die(0);
}
示例14: genConfig
private function genConfig()
{
$vars = array('site_id', 'site_name', 'site_classname', 'wb_id', 'wb_name', 'wb_levels', 'wb_port', 'wb_host', 'wb_user', 'wb_pass', 'wb_weburl', 'wb_ip', 'wb_whitelist', 'wb_blacklist', 'wb_launched_at');
$output = GWF_Array::toCSV($vars) . "\n";
foreach ($this->getWarboxes(true) as $warbox) {
$warbox instanceof WC_Warbox;
$data = array();
foreach ($vars as $var) {
$data[] = $warbox->getVar($var);
}
$output .= GWF_Array::toCSV($data) . "\n";
}
// $format = '%5s, %15s, %5s, %2s, %64s, %24s, %s'."\n";
// $output = vsprintf('#'.$format, explode(',', 'CLS,IP,prt,RS,warhost,displayname,webhost'));
// foreach ($this->getWarboxes(true) as $warbox)
// {
// $warbox instanceof WC_Warbox;
// $output .= sprintf(' '.$format,
// $warbox->getVar('site_classname'), $warbox->getWarIP(),
// $warbox->getWarPort(), $warbox->getWarReduceScore(),
// $warbox->getWarHost(), $warbox->getSitename(), $warbox->getURL())."\n";
// }
$_GET['ajax'] = 1;
GWF_Website::plaintext();
return $output;
}
示例15: GWF3
$_GET['me'] = 'null';
require_once 'protected/config.php';
require_once '../gwf3.class.php';
$gwf = new GWF3(dirname(dirname(__FILE__) . '../'), array('init' => true, 'bootstrap' => false, 'website_init' => true, 'autoload_modules' => true, 'load_module' => false, 'load_config' => false, 'start_debug' => true, 'get_user' => true, 'do_logging' => true, 'log_request' => true, 'blocking' => !defined('GWF_SESSION_NOT_BLOCKING'), 'no_session' => false, 'store_last_url' => true, 'ignore_user_abort' => true));
if (false === ($wechall = GWF_Module::loadModuleDB('WeChall', true, true))) {
die('GWF3/WC5 not installed?');
}
//$error = GWF_Module::startup();
if (defined('GWF_PAGE_TITLE')) {
GWF_Website::setPageTitle(GWF_PAGE_TITLE);
GWF_Website::setMetaDescr(GWF_PAGE_TITLE . ' challenge on WeChall');
GWF_Website::setMetaTags(GWF_PAGE_TITLE . ', Challenge, WeChall');
}
# Include Needed Modules
//GWF_Module::getModule('Votes', true);
GWF_Module::loadModuleDB('Forum', true);
//GWF_Module::getModule('WeChall', true)->onLoadLanguage();
require_once GWF_CORE_PATH . 'module/WeChall/WC_ChallSolved.php';
//GWF_ForumBoard::init(true);
if (isset($_GET['ajax'])) {
GWF_Website::plaintext();
return;
}
$mb = WC_HTML::wantFooter() ? ' style="margin-bottom: -48px;"' : '';
# HTML Header
//echo GWF_Website::getPagehead();
if (!defined('NO_HEADER_PLEASE')) {
#echo GWF_Doctype::getDoctype(GWF_DEFAULT_DOCTYPE);
echo $gwf->onDisplayHead();
# . '<div id="page_wrap">';
}