예제 #1
0
파일: Show.php 프로젝트: sinfocol/gwf3
 public function execute()
 {
     if (false !== ($error = $this->sanitize())) {
         return $error;
     }
     GWF_Website::addJavascript(Common::getProtocol() . '://www.google.com/jsapi');
     GWF_Website::addJavascriptInline('google.load("language", "1");');
     GWF_Website::setPageTitle($this->pm->display('pm_title'));
     return $this->templateShow(Common::getGet('translate') !== false);
 }
예제 #2
0
 public static function getOnChange()
 {
     # TODO: Use GWF_DOMAIN?
     if (isset($_SERVER['HTTP_HOST']) === false) {
         return '';
     }
     $current_url = htmlspecialchars(GWF_Session::getCurrentURL(), ENT_QUOTES);
     $url = Common::getProtocol() . '://' . $_SERVER['HTTP_HOST'] . '/';
     return 'window.location = \'' . $url . '\'+this.value+\'' . $current_url . '\'; return true;';
 }
예제 #3
0
파일: Places.php 프로젝트: sinfocol/gwf3
 private function templatePlaces()
 {
     GWF_Website::addJavascript($this->googleMapsPath());
     GWF_Website::addJavascript(GWF_WEB_ROOT_NO_LANG . 'js/module/Profile/profile.js?v=57');
     // 		GWF_Website::addJavascript(GWF_WEB_ROOT_NO_LANG.'js/3p/fancybox/jquery.fancybox.pack.js');
     // 		GWF_Website::addCSS(GWF_WEB_ROOT_NO_LANG.'js/3p/fancybox/jquery.fancybox.css');
     // 		GWF_Website::addCSS(GWF_WEB_ROOT_NO_LANG.'css/profile_poi.css');
     $user = GWF_User::getStaticOrGuest();
     $userid = $user->getID();
     $table = GDO::table('GWF_ProfilePOI');
     $tVars = array('user_id' => $userid, 'is_admin' => $user->isAdmin() ? 'true' : 'false', 'total' => $table->countRows(), 'visible' => $table->countRows(GWF_ProfilePOI::wherePermissions(), array('users', 'profiles', 'whitelist')), 'js_trans' => $this->jsTrans(), 'form_delete' => $this->formDelete(), 'pois' => GWF_ProfilePOI::getPOICount($userid), 'maxp' => $this->module->cfgAllowedPOIs(), 'api_key' => $this->module->cfgMapsApiKey(), 'protocol' => Common::getProtocol(), 'init_lat' => 0, 'init_lon' => 0);
     return $this->module->templatePHP('places.php', $tVars);
 }
예제 #4
0
 public function execute()
 {
     GWF_ForumBoard::init(true);
     if (false !== ($error = $this->sanitize())) {
         return $error;
     }
     GWF_Website::addJavascript(GWF_WEB_ROOT . 'js/module/Forum/gwf_forum.js');
     if ($this->module->cfgUseGTranslate()) {
         GWF_Website::addJavascript(Common::getProtocol() . '://www.google.com/jsapi');
         GWF_Website::addJavascriptInline('google.load("language", "1");');
     }
     GWF_Website::setPageTitle($this->module->lang('pt_thread', array($this->thread->getBoard()->getVar('board_title'), $this->thread->getVar('thread_title'))));
     return $this->templateThread();
 }
예제 #5
0
파일: join_api.php 프로젝트: sinfocol/gwf3
// $href_api_3 = GWF_WEB_ROOT.'index.php?mo=WeChall&me=JoinUs&section=api#api_3';
echo '<a name="api_3"></a>' . PHP_EOL;
echo GWF_Box::box($l->lang('api_3b', array($usage_3_1, $usage_3_1, $usage_3_1, $event_types, $examples)), $l->lang('api_3t'));
# API 4)
$href_api_4 = GWF_WEB_ROOT . 'index.php?mo=WeChall&amp;me=JoinUs&amp;section=api#api_4';
$url = sprintf('%s://%s%sindex.php?mo=WeChall&me=API_User&no_session=1&', Common::getProtocol(), GWF_DOMAIN, GWF_WEB_ROOT);
$usage_4_1 = htmlspecialchars($url . 'username=<username>[&apikey=<your_api_key>]');
$example_4_1 = GWF_HTML::anchor($url . 'username='******'username='******'WC_NO_XSS_PASS'])) {
    $api_key = urlencode($udata['WC_NO_XSS_PASS']);
    $example_4_2 = GWF_HTML::anchor($url . "username={$uname}&apikey={$api_key}", $url . "username={$uname}&apikey={$api_key}");
} else {
    $example_4_2 = '';
}
echo '<a name="api_4"></a>' . PHP_EOL;
echo GWF_Box::box($l->lang('api_4b', array($usage_4_1, $usage_4_1, $example_4_1, $example_4_2)), $l->lang('api_4t'));
# API 5)
$href_api_5 = GWF_WEB_ROOT . 'index.php?mo=WeChall&amp;me=JoinUs&amp;section=api#api_5';
$url = sprintf('%s://%s%sindex.php?mo=WeChall&me=API_Site&no_session=1', Common::getProtocol(), GWF_DOMAIN, GWF_WEB_ROOT);
$usage_5_1 = htmlspecialchars($url . '[&sitename=<sitename>]');
$example_5_1 = GWF_HTML::anchor($url, $url);
$example_5_2 = GWF_HTML::anchor($url . '&sitename=WeChall', $url . '&sitename=WeChall');
echo '<a name="api_5"></a>' . PHP_EOL;
echo GWF_Box::box($l->lang('api_5b', array($usage_5_1, $usage_5_1, $example_5_1, $example_5_2)), $l->lang('api_5t'));
# Buttons
echo GWF_Button::wrapStart();
echo GWF_Button::generic($l->lang('btn_join'), GWF_WEB_ROOT . 'join_us');
echo GWF_Button::generic($l->lang('btn_join_war'), GWF_WEB_ROOT . 'index.php?mo=WeChall&me=JoinUs&section=warbox');
echo GWF_Button::generic($l->lang('btn_join_opt'), GWF_WEB_ROOT . 'index.php?mo=WeChall&me=JoinUs&section=optional');
echo GWF_Button::generic($l->lang('btn_api'), GWF_WEB_ROOT . 'index.php?mo=WeChall&me=JoinUs&section=wechall_api', 'generic', '', true);
echo GWF_Button::wrapEnd();
예제 #6
0
파일: GWF_Error.php 프로젝트: sinfocol/gwf3
 public static function err404($filename)
 {
     @header(Common::getProtocol() . ' 404 File not found');
     return self::err('ERR_FILE_NOT_FOUND', htmlspecialchars($filename));
 }
예제 #7
0
파일: applet.php 프로젝트: sinfocol/gwf3
<applet id="ssy_applet2" code="com.assessystem.SSYMain" archive="<?php 
echo GWF_WEB_ROOT;
?>
applet/surveystudios5i.jar">
	<param name="width" value="640" />
	<param name="height" value="480" />
<!-- 	<param name="locale" value="<?php 
echo $tVars['locale'];
?>
" />  -->
	<param name="host" value="<?php 
echo rtrim(sprintf("%s://%s%s", Common::getProtocol(), Common::getHost(), GWF_WEB_ROOT), '/') . '/';
?>
" />
	<param name="uid" value="<?php 
echo $tVars['uid'];
?>
" />
	<param name="sid" value="<?php 
echo $tVars['cookie'];
?>
" />
	<param name="quit" value="<?php 
echo 'account';
?>
" />
	<?php 
echo $tVars['module']->error('err_no_java');
?>
</applet>
<script type="text/javascript">