Example #1
0
 private function getButtons(GWF_PM $pm)
 {
     $transid = 'pm_trans_' . $pm->getID();
     $u = GWF_Session::getUser();
     $buttons = '';
     if (false !== ($prevs = $pm->getReplyToPrev())) {
         foreach ($prevs as $prev) {
             $buttons .= GWF_Button::prev($prev->getDisplayHREF(), $this->module->lang('btn_prev'));
         }
     }
     if (!$pm->hasDeleted($u)) {
         $buttons .= GWF_Button::delete($pm->getDeleteHREF($u->getID()), $this->module->lang('btn_delete'));
     } else {
         $buttons .= GWF_Button::restore($pm->getRestoreHREF(), $this->module->lang('btn_restore'));
     }
     if ($pm->canEdit($u)) {
         $buttons .= GWF_Button::edit($pm->getEditHREF(), $this->module->lang('btn_edit'));
     }
     $buttons .= GWF_Button::options($pm->getAutoFolderHREF(), $this->module->lang('btn_autofolder'));
     if (!$pm->isGuestPM()) {
         $buttons .= GWF_Button::reply($pm->getReplyHREF(), $this->module->lang('btn_reply')) . PHP_EOL . GWF_Button::quote($pm->getQuoteHREF(), $this->module->lang('btn_quote'));
     }
     $u2 = $pm->getOtherUser($u);
     $buttons .= GWF_Button::ignore($pm->getIgnoreHREF($pm->getOtherUser($u)), $this->module->lang('btn_ignore', array($u2->display('user_name'))));
     $buttons .= GWF_Button::translate($pm->getTranslateHREF(), $this->module->lang('btn_translate'), '', 'gwfGoogleTrans(\'' . $transid . '\'); return false;');
     if (false !== ($nexts = $pm->getReplyToNext())) {
         foreach ($nexts as $next) {
             $buttons .= GWF_Button::next($next->getDisplayHREF(), $this->module->lang('btn_next'));
         }
     }
     return $buttons;
 }
Example #2
0
 /**
  * Preload button template.
  */
 public static function init()
 {
     if (self::$templateButtons === true) {
         self::$templateButtons = GWF_Template::templateMain('buttons.tpl');
         self::$templateTooltip = GWF_Template::templateMain('tooltip.tpl');
     }
 }
Example #3
0
 public function templateShow(GWF_Guestbook $gb)
 {
     $nested = $gb->isNestingAllowed();
     if ($nested) {
         return $this->templateNested($gb);
     }
     $user = GWF_Session::getUser();
     $can_moderate = $gb->canModerate($user);
     $gbid = $gb->getID();
     $mod = GWF_GuestbookMSG::IN_MODERATION;
     $conditions = "gbm_gbid={$gbid}";
     $conditions .= $can_moderate ? '' : " AND gbm_options&{$mod}=0";
     //		$orderby = $nested ? 'gbm_replyto ASC, gbm_date ASC' : 'gbm_date ASC';
     $orderby = 'gbm_date ASC';
     $msgs = GDO::table('GWF_GuestbookMSG');
     $ipp = $this->module->cfgItemsPerPage();
     $nItems = $msgs->countRows($conditions);
     $nPages = GWF_PageMenu::getPagecount($ipp, $nItems);
     $page = Common::clamp(intval(Common::getGet('page', $nPages)), 1, $nPages);
     $gbid_app = $gbid === 1 ? '' : '/' . $gbid;
     # append
     // TODO tVAR cleanup ?
     $tVars = array('gb' => $gb, 'entries' => $msgs->selectObjects('*', $conditions, $orderby, $ipp, GWF_PageMenu::getFrom($page, $ipp)), 'page_menu' => GWF_PageMenu::display($page, $nPages, GWF_WEB_ROOT . 'guestbook/show' . $gbid_app . '/page-%PAGE%'), 'href_sign' => GWF_WEB_ROOT . 'guestbook/sign/' . $gbid, 'href_moderate' => GWF_WEB_ROOT . 'guestbook/edit/' . $gbid, 'can_moderate' => $can_moderate, 'can_sign' => $gb->canSign(GWF_Session::getUser(), $this->module->cfgAllowGuest()), 'allow_url' => $this->module->cfgAllowURL(), 'allow_email' => $this->module->cfgAllowEMail(), 'btn_edit' => $can_moderate ? GWF_Button::options(GWF_WEB_ROOT . 'guestbook/edit/' . $gbid, $this->module->lang('btn_edit_gb')) : '');
     $filename = 'show.tpl';
     //		$filename = $nested ? 'show_nested.php' : 'show.php';
     return $this->module->template($filename, $tVars);
 }
Example #4
0
 public function displayTickets()
 {
     $back = '';
     $prog = $this->getVar('kt_prog');
     if (stripos($prog, 'sternstunden') !== false) {
         $href = 'http://www.reservix.de/reservation/plan_reservation_back.php?eventID=212083&eventGrpID=57018&presellercheckID=3';
         $back .= GWF_Button::generic('Reservix', $href);
     }
     if ($back !== '') {
         $back .= '<br/>';
     }
     return $back . $this->getVar('kt_tickets');
 }
Example #5
0
 private function templateTermine()
 {
     $termine = GDO::table('Konzert_Termin');
     $where = '';
     $by = Common::getGetString('by', self::DEFAULT_BY);
     $dir = Common::getGetString('dir', self::DEFAULT_DIR);
     $orderby = $termine->getMultiOrderby($by, $dir);
     $nItems = $termine->countRows($where);
     $nPages = GWF_PageMenu::getPagecount(self::IPP, $nItems);
     $page = Common::clamp(Common::getGetInt('page'), 1, $nPages);
     $from = GWF_PageMenu::getFrom($page, self::IPP);
     $tVars = array('add_button' => GWF_Button::add($this->module->lang('btn_add'), $this->module->getMethodURL('AddTermin')), 'termine' => $termine->selectObjects('*', $where, $orderby, self::IPP, $from), 'pagemenu' => GWF_PageMenu::display($page, $nPages, GWF_WEB_ROOT . 'index.php?mo=Konzert&me=AdminTermine&by=' . urlencode($by) . '&dir=' . urlencode($dir) . '&page=%PAGE%'), 'sort_url' => GWF_WEB_ROOT . 'index.php?mo=Konzert&me=AdminTermine&by=%BY%&dir=%DIR%&page=1');
     return $this->module->template('a_termine.tpl', $tVars);
 }
Example #6
0
 private function leftPanelTop10()
 {
     $hideBTN = GWF_Button::delete($this->getMethodHref('&leftpanel=0'), $this->module->lang('btn_sidebar_on'));
     $users = GDO::table('GWF_User')->selectObjects('*', 'user_options&0x10000000=0', 'user_level DESC', 10);
     if (count($users) === 0) {
         return $hideBTN;
     }
     $back = sprintf('<div>%s%s</div>', $hideBTN, $this->module->lang('rp_topusers', array(10))) . PHP_EOL;
     $back .= '<ol>' . PHP_EOL;
     foreach ($users as $user) {
         $back .= sprintf('<li><a href="%s" title="%s">%s</a></li>', $user->getProfileHREF(), $this->module->lang('a_title', array($user->getVar('user_level'))), $user->displayUsername()) . PHP_EOL;
     }
     $back .= '</ol>' . PHP_EOL;
     return $back;
 }
Example #7
0
function gwfGBNested(GWF_GuestbookMSG &$e, &$allow_email, &$allow_url, &$can_sign, &$gb, &$tLang, &$tVars, &$m)
{
    //	echo '<div class="gwf_gbe_nested" style="border: 1px solid black; margin: 10px; padding: 10px;" >';
    echo '<div class="gwf_gb_entry gwf_gb_entry_nested">' . PHP_EOL;
    echo '<div class="gwf_gbe_head">' . PHP_EOL;
    echo sprintf('<div class="gwf_date">%s</div>', $e->displayDate()) . PHP_EOL;
    echo sprintf('<div>%s</div>', $e->displayUsernameLink()) . PHP_EOL;
    if ($allow_email) {
        echo sprintf('<div>%s</div>', $e->displayEMail($tVars['can_moderate'])) . PHP_EOL;
    }
    if ($allow_url) {
        echo sprintf('<div>%s</div>', $e->displayURL()) . PHP_EOL;
    }
    echo '</div>' . PHP_EOL;
    //	echo '<div>';
    //	echo sprintf('<div class="gwf_date">%s</div>', $e->displayDate());
    //	echo sprintf('<div>%s</div>', $e->displayUsername());
    //	if ($allow_email) { echo sprintf('<div>%s</div>', $e->displayEMail()); }
    //	if ($allow_url) { echo sprintf('<div>%s</div>', $e->displayURL()); }
    //	echo '</div>';
    echo sprintf('<div class="gwf_gbe_msg">%s', $e->displayMessage()) . PHP_EOL;
    //	echo sprintf('<hr/><div>%s</div>', $e->displayMessage());
    if ($can_sign) {
        //		echo '<hr/>';
        echo '<div class="gwf_buttons_outer gwf_buttons">' . PHP_EOL;
        echo GWF_Button::quote(GWF_WEB_ROOT . 'guestbook/sign/' . $gb->getID() . '/in/reply/to/' . $e->getID(), $tLang->lang('btn_replyto', array($e->displayUsername())));
        echo '</div>' . PHP_EOL;
    }
    if ($tVars['can_moderate']) {
        //		echo '<hr/>';
        echo '<div class="gwf_buttons_outer gwf_buttons">';
        echo $e->getToggleModButton($m);
        echo $e->getTogglePublicButton($m);
        echo $e->getEditButton($m);
        echo '</div>';
    }
    foreach ($e->getVar('childs', array()) as $child) {
        gwfGBNested($child, $allow_email, $allow_url, $can_sign, $gb, $tLang, $tVars, $m);
    }
    echo '</div>' . PHP_EOL;
    echo '</div>' . PHP_EOL;
}
Example #8
0
 public static function rankingPageButtons()
 {
     // 		return Module_WeChall::instance()->templatePHP('wcrankingbuttons.php');
     echo '<nav>' . PHP_EOL;
     echo '<div class="gwf_buttons_outer">' . PHP_EOL;
     echo '<div class="gwf_buttons">' . PHP_EOL;
     echo GWF_Button::generic(self::lang('btn_global_rank'), GWF_WEB_ROOT . 'ranking', 'generic', '', Common::getGet('me') === 'Ranking');
     echo GWF_Button::generic(self::lang('btn_site_rank'), GWF_WEB_ROOT . 'site/ranking/for/1/WeChall', 'generic', '', Common::getGet('me') === 'SiteRankings');
     echo GWF_Button::generic(self::lang('btn_lang_rank'), GWF_WEB_ROOT . 'lang_ranking/en', 'generic', '', Common::getGet('me') === 'RankingLang');
     echo GWF_Button::generic(self::lang('btn_country_rank'), GWF_WEB_ROOT . 'country_ranking', 'generic', '', Common::getGet('me') === 'RankingCountry');
     echo GWF_Button::generic(self::lang('btn_tag_rank'), GWF_WEB_ROOT . 'category_ranking', 'generic', '', Common::getGet('me') === 'RankingTag');
     echo GWF_Button::generic(self::lang('btn_site_masters'), GWF_WEB_ROOT . 'site_masters', 'generic', '', Common::getGet('me') === 'SiteMasters');
     #		echo GWF_Button::generic(self::lang('btn_grp_rank'), GWF_WEB_ROOT.'usergroup_ranking');
     echo GWF_Button::generic(self::lang('btn_stats'), GWF_WEB_ROOT . 'stats');
     echo '</div>' . PHP_EOL;
     echo '</div>' . PHP_EOL;
     echo '</nav>' . PHP_EOL;
 }
Example #9
0
     echo '<td class="gwf_num">' . $linkid . '</td>';
     echo '<td colspan="2" class="ri"><em>[' . $perm_text . ']</em></td>';
     echo '<td class="gwf_num">' . $link->getVar('link_favcount') . '</td>';
     echo '<td class="gwf_num">' . $link->getVar('link_clicks') . '</td>';
     echo sprintf('<td class="gwf_num"><span%s>%s</span></td>', $idc, $votecount);
     echo sprintf('<td class="gwf_num"><span%s>%.02f%%</span></td>', $ida, $voteperc);
     if ($wv) {
         echo '<td></td>';
     }
     if ($wv && $user !== false) {
         echo '<td></td><td></td>';
     }
 } else {
     $updown = $link->isDown() ? 'down' : 'up';
     $mayEdit = $wv ? $link->mayEdit($user, $staff) : false;
     echo '<td class="gwf_num">' . ($mayEdit ? GWF_Button::edit($link->hrefEdit(), $t_edit) : $linkid) . '</td>';
     echo '<td colspan="2" class="ri">' . $link->displayText($updown) . '</td>';
     //	echo '<td colspan="2">'.sprintf($link->isInModeration()?'<span style="color:#ff0000">%s</span>':'%s', $link->displayText()).'</td>';
     echo '<td class="gwf_num">' . $link->displayFavCount() . '</td>';
     echo '<td class="gwf_num">' . $link->displayClickCount() . '</td>';
     if ($wv) {
         echo sprintf('<td class="gwf_num"><span%s>%s</span></td>', $idc, $votecount);
         echo sprintf('<td class="gwf_num"><span%s>%.02f%%</span></td>', $ida, $voteperc);
         echo '<td class="nowrap">' . $vote->displayButtons() . '</td>';
     } else {
         echo sprintf('<td class="gwf_num"><span%s>%s</span></td>', $idc, $votecount);
         echo sprintf('<td class="gwf_num"><span%s>%.02f%%</span></td>', $ida, $voteperc);
         //			echo '<td class="gwf_num">0</td>';
         //			echo '<td class="gwf_num">50.00%</td>';
     }
     if ($user !== false && $wv) {
Example #10
0
echo $tVars['module']->templatePHP('_admin_nav.php', $tVars);
$headers = array(array($tLang->lang('th_date'), 'news_date', 'ASC'), array($tLang->lang('th_userid'), 'user_name', 'ASC'), array($tLang->lang('th_catid'), 'news_catid', 'ASC'), array($tLang->lang('th_langid')), array($tLang->lang('th_title')), array($tLang->lang('th_hidden'), 'news_options&' . GWF_News::HIDDEN, 'DESC'));
echo $tVars['page_menu'];
echo GWF_Table::start();
echo GWF_Table::displayHeaders1($headers, $tVars['sort_url']);
foreach ($tVars['news'] as $item) {
    $item instanceof GWF_News;
    $newsid = $item->getID();
    $trans = $item->getTranslations();
    $date = $item->displayDate();
    $author = $item->displayAuthor();
    $cat = $item->displayCategory();
    $lang_visible = $tLang->lang('th_visible');
    $lang_hidden = $tLang->lang('th_hidden');
    foreach ($trans as $langid => $t) {
        var_dump($langid, $t);
        if ($item->isHidden()) {
            $icon = GWF_Button::add($lang_hidden, $item->hrefEnable());
        } else {
            $icon = GWF_Button::sub($lang_visible, $item->hrefDisable());
        }
        echo GWF_Table::rowStart();
        $title = $t['newst_title'];
        $data[] = array($date, $author, $cat, GWF_Language::getByID($langid)->display('lang_nativename'), sprintf('<a href="%snews/edit/%d-%s/langid-%d">%s</a>', GWF_WEB_ROOT, $newsid, Common::urlencodeSEO($title), $langid, $title), $item->isHidden() ? $icon_hidden : $icon_visible);
        echo GWF_Table::rowEnd();
    }
}
echo GWF_Table::end();
echo $tVars['page_menu'];
echo GWF_Button::wrap(GWF_Button::add($tLang->lang('btn_add'), GWF_WEB_ROOT . 'news/add'));
Example #11
0
		</tr>
	</thead>
	<?php 
if (GWF_User::isStaffS() || WC_SiteAdmin::isSiteAdmin(GWF_Session::getUserID(), $siteid)) {
    echo WC_HTML::tableRowForm($tLang->lang('ft_edit_site', array($site->displayName())), $site->getEditButton($tVars['module'], GWF_Session::getUser()));
}
echo WC_HTML::tableRowForm($tLang->lang('th_site_country_detail'), $site->displayCountry());
$href = GWF_WEB_ROOT . 'all_sites/' . $site->getLangISO();
echo WC_HTML::tableRowForm($tLang->lang('th_site_language'), GWF_HTML::anchor($href, $site->displayLanguage()));
echo WC_HTML::tableRowForm($tLang->lang('th_site_tags'), $site->displayTags(true));
if ($is_ranked) {
    echo WC_HTML::tableRowForm($tLang->lang('th_site_admins'), $site->displaySiteAdmins());
    // 		echo WC_HTML::tableRowForm($tLang->lang('th_site_autoup'), $site->displayAutoUpdate());
    // 		echo WC_HTML::tableRowForm($tLang->lang('th_site_has_osr'), $site->displayOnSiteRank());
    if (count($boxes) > 0) {
        $warboxes = $tVars['boxcount'] . GWF_Button::forward($site->hrefWarboxes(), 'Show Wargames');
        echo WC_HTML::tableRowForm($tLang->lang('btn_warboxes'), $warboxes);
    }
    // 		echo WC_HTML::tableRowForm($tLang->lang('th_site_score'), $site->getScore());
    // 		echo WC_HTML::tableRowForm($tLang->lang('th_site_basescore'), $site->getBasescore());
    // 		echo WC_HTML::tableRowForm($tLang->lang('th_site_usercount'), $site->getUsercount());
    echo WC_HTML::tableRowForm($tLang->lang('th_site_challcount'), $site->getChallcount());
    // 		echo WC_HTML::tableRowForm($tLang->lang('th_site_linkcount'), $site->getLinkCount());
    echo WC_HTML::tableRowForm($tLang->lang('th_site_avg'), $site->displayAvg());
}
# Diff Votes
// 	$vdif = $site->getVotesDif();
// 	echo GWF_Table::rowStart().
// 		'<th>'.$tLang->lang('th_site_dif').'</th>'.PHP_EOL.
// 		'<td><span id="gwf_vsba_'.$vdif->getID().'">'.$vdif->displayPercent().'</span></td>'.PHP_EOL.
// 		GWF_Table::rowEnd();
Example #12
0
    ?>
</th>
		<th><?php 
    echo $tLang->lang('th_votes_up');
    ?>
</th>
		<th><?php 
    echo $tLang->lang('th_thread_viewcount');
    ?>
</th>
	</tr>
<?php 
    foreach ($tVars['latest_threads'] as $t) {
        $t instanceof GWF_ForumThread;
        $edit = $t->hasEditPermission() ? GWF_Button::edit($t->getEditHREF(), $tLang->lang('btn_edit')) : '';
        $unread = $t->hasRead($user) ? '' : GWF_Button::bell($tVars['href_unread']);
        $hrefLastPage = $t->getLastPageHREF();
        echo GWF_Table::rowStart();
        ?>
		<td><a href="<?php 
        echo $t->getPageHREF(1);
        ?>
"><?php 
        echo $t->display('thread_title');
        ?>
</a></td>
		<td><?php 
        echo $edit . $unread;
        ?>
</td>
		<td><?php 
Example #13
0
<?php

echo '<div class="gwf_buttons_outer">' . PHP_EOL;
echo '<div class="gwf_buttons">' . PHP_EOL;
echo GWF_Button::generic('ConvertDB', $tVars['href_convert']);
echo GWF_Button::generic('Fix Chall Tags', $tVars['href_chall_cache']);
echo GWF_Button::generic('Fix Chall DB', $tVars['href_fix_challs']);
echo GWF_Button::generic('Fix Site Tags', $tVars['href_sitetags']);
echo GWF_Button::generic('Fix IRC', $tVars['href_fix_irc']);
echo GWF_Button::generic('Recalc Everything', $tVars['href_recalc_all']);
echo GWF_Button::generic('Freeze User', $tVars['href_freeze']);
echo GWF_Button::generic('BIGMail', $tVars['href_siteminmail']);
echo '</div>' . PHP_EOL;
echo '</div>' . PHP_EOL;
echo $tVars['form_hardlink'];
Example #14
0
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();
Example #15
0
        ?>
</div>
<?php 
    }
    ?>
		<div class="gwf_newsbox_message"><?php 
    echo $news->displayMessage();
    ?>
</div>
	</div>
</div>
<?php 
}
?>
	
</div>

<?php 
echo $tVars['page_menu'];
?>

<?php 
if ($tVars['may_add']) {
    echo '<div class="gwf_buttons_outer"><div class="gwf_buttons">' . GWF_Button::add($tLang->lang('btn_add'), $tVars['href_add']) . '</div></div>';
}
?>

<?php 
if ($tVars['can_sign']) {
    echo '<div class="gwf_buttons_outer"><div class="gwf_buttons">' . GWF_Button::generic($tLang->lang('btn_sign'), $tVars['href_sign_news']) . '</div></div>';
}
Example #16
0
echo $attach;
$sig = $opts->hasSignature() ? GWF_HTML::div($opts->displaySignature(), 'gwf_forum_sig') : '';
echo $sig;
?>
		</div>

		<?php 
$edit_by = GWF_HTML::div($post->displayEditBy($tVars['module']), 'gwf_post_edited');
?>
		<?php 
$action_div = '';
if ($actions) {
    $buttons = '';
    if ($tVars['reply']) {
        $buttons .= GWF_Button::reply($post->getReplyHREF(), $tLang->lang('btn_reply'));
        $buttons .= GWF_Button::quote($post->getQuoteHREF(), $tLang->lang('btn_quote'));
    }
    if ($can_edit) {
        $buttons .= GWF_Button::edit($post->getEditHREF(), $tLang->lang('btn_edit'));
        $buttons .= GWF_Button::generic($tLang->lang('btn_add_attach'), $post->hrefAddAttach());
    }
    $action_div = GWF_HTML::div($buttons, 'gwf_buttons');
}
echo GWF_HTML::div($edit_by . $action_div, 'gwf_post_foot');
# echo GWF_Table::rowEnd();
?>
	</div>
</div>

<div class="cl"></div>
Example #17
0
        $percent2 = '???.??';
    }
    echo sprintf('<td style="width: %dpx; white-space: nowrap;"><div style="width: %dpx; background: #%s; margin-top:1px;">' . $format . '%%</div></td>', $tVars['pixels'], $percent, $color, $percent2);
    if ($may_vote) {
        echo sprintf('<td><input type="checkbox"%s onclick="%s" name="opt[%d]" /></td>', $checked, $onclick, $i);
    } else {
        echo sprintf('<td></td>');
    }
    echo GWF_Table::rowEnd();
    $i++;
}
?>
<tr><td colspan="4">
	<?php 
if ($may_edit) {
    echo GWF_Button::generic($tLang->lang('btn_edit'), $tVars['href_edit']);
}
?>
	<?php 
if ($may_vote) {
    ?>
		<input type="submit" name="vote" value="<?php 
    echo $tLang->lang('btn_vote');
    ?>
" />
	<?php 
}
?>
</td></tr>
</table>
</form>
Example #18
0
<div class="gwf_buttons_outer">
<div class="gwf_buttons">
<?php 
$m = $tVars['module'];
$m instanceof Module_Usergroups;
echo GWF_Button::generic($tLang->lang('btn_users'), $tVars['href_users'], 'generic', '', $m->isMethodSelected('Users'));
echo GWF_Button::generic($tLang->lang('btn_groups'), $tVars['href_groups'], 'generic', '', $m->isMethodSelected('ShowGroups'));
echo GWF_Button::generic($tLang->lang('btn_search'), $tVars['href_search'], 'generic', '', $m->isMethodSelected('Search'));
echo GWF_Button::generic($tLang->lang('btn_gallery'), $tVars['href_gallery'], 'generic', '', $m->isMethodSelected('AvatarGallery'));
?>
</div>
</div>
Example #19
0
        echo gwfProfileRow($tLang->lang('th_skype'), $v);
    }
    if ('' !== ($v = $p->display('prof_yahoo'))) {
        echo gwfProfileRow($tLang->lang('th_yahoo'), $v);
    }
    if ('' !== ($v = $p->display('prof_aim'))) {
        echo gwfProfileRow($tLang->lang('th_aim'), $v);
    }
    if ('' !== ($v = $p->display('prof_irc'))) {
        echo gwfProfileRow($tLang->lang('th_irc'), $v);
    }
    $buttons = '';
    if ('' !== ($email = $u->getValidMail())) {
        $txt = $tLang->lang('at_mailto', array($u->displayUsername()));
        if ($u->isOptionEnabled(GWF_User::ALLOW_EMAIL)) {
            $buttons .= GWF_Button::mail(GWF_WEB_ROOT . 'send/email/to/' . $u->urlencode('user_name'), $txt);
        }
    }
    // 	if (GWF_Session::isLoggedIn()) {
    // 		$buttons .= GWF_Button::generic($tLang->lang('btn_pm'), $u->getPMHref());
    // 	}
    if ($buttons !== '') {
        echo GWF_Table::rowStart();
        echo "<td colspan=\"2\" class=\"ce\">{$buttons}</td>" . PHP_EOL;
        echo GWF_Table::rowEnd();
    }
}
# Fav Sites
echo wcProfileFavSites($u->getID());
echo wcProfileFavCats($u->getID());
echo '</table>' . PHP_EOL;
Example #20
0
<?php

echo GWF_Button::generic($tLang->lang('btn_checker'), $tVars['href_checker']);
echo GWF_Button::generic($tLang->lang('btn_bundle'), $tVars['href_bundle']);
?>

<?php 
$headers = array(array($tLang->lang('th_filename')), array($tLang->lang('th_count')), array($tLang->lang('th_branched')), array($tLang->lang('th_filesize')));
$counter = array();
$files = $tVars['files'];
foreach ($files as $file) {
    list($fullpath, $branched, $langfile, $iso, $filename) = $file;
    if (!isset($counter[$fullpath])) {
        $counter[$fullpath] = 1;
    } else {
        $counter[$fullpath]++;
    }
}
$yes = $tLang->lang('yes');
$no = $tLang->lang('no');
echo '<table>';
echo GWF_Table::displayHeaders1($headers, '');
foreach ($files as $file) {
    list($fullpath, $branched, $langfile, $iso, $filename) = $file;
    if ($iso !== 'en') {
        continue;
    }
    $href = GWF_WEB_ROOT . 'index.php?mo=Language&amp;me=EditFiles&amp;filename=' . urlencode($fullpath);
    $count = $counter[$fullpath];
    echo GWF_Table::rowStart();
    echo sprintf('<td><a href="%s">%s</a></td>', $href, GWF_HTML::display($fullpath));
Example #21
0
<?php

echo WC_HTML::accountButtons();
?>

<?php 
$user = GWF_Session::getUser();
if (false !== ($mod_gb = GWF_Module::getModule('Guestbook'))) {
    $mod_gb->onInclude();
    if (false !== ($gb = $mod_gb->getGuestbook($user->getID()))) {
        echo GWF_Button::generic(WC_HTML::lang('btn_manage_gb'), $gb->hrefEdit());
    } elseif ($mod_gb->canCreateGuestbook($user)) {
        echo GWF_Button::generic(WC_HTML::lang('btn_manage_gb'), Module_WeChall::hrefCreateGB());
    }
}
//
//if (false !== ($mod_ug = GWF_Module::getModule('Usergroups'))) {
//	if ($mod_ug->hasGroup($user)) {
//		echo GWF_Button::generic(WC_HTML::lang('btn_manage_ug'), $mod_ug->hrefEdit($user->getID()));
//	}
//	elseif ($mod_ug->canCreateGroup($user)) {
//		echo GWF_Button::generic(WC_HTML::lang('btn_manage_ug'), $mod_ug->hrefCreate());
//	}
//}
?>
<h1><?php 
echo $tLang->lang('ft_settings');
?>
</h1>
<p><?php 
echo $tLang->lang('pi_help');
Example #22
0
<h1><?php 
echo $tLang->lang('pt_irc_chat') . ' ( ' . GWF_HTML::display($tVars['module']->cfgIRCURL()) . ' )';
?>
</h1>

<?php 
$buttons = '';
if ($tVars['gwf_chat']) {
    $buttons .= GWF_Button::generic($tLang->lang('btn_webchat'), $tVars['href_webchat'], 'generic', '', false);
}
if ($tVars['mibbit']) {
    $mib_url = $tVars['mibbit_url'];
    $onclick = "window.open('{$mib_url}', 'dummyname', 'height=undefined,width=undefined', false);";
    $buttons .= GWF_Button::generic($tLang->lang('btn_ircchat'), $tVars['href_ircchat'], 'generic', '', true);
    $buttons .= GWF_Button::generic($tLang->lang('btn_ircchat_full'), '#', 'generic', '', false, $onclick);
}
if ($buttons !== '') {
    echo '<div class="gwf_buttons_outer">' . GWF_HTML::div($buttons, 'gwf_buttons') . '</div>' . PHP_EOL;
}
?>

<iframe id="gwf_mibbit" src="<?php 
echo $tVars['mibbit_url'];
?>
">
<?php 
echo GWF_HTML::error('Chat', $tLang->lang('err_iframe'), false);
?>
</iframe>
Example #23
0
<!-- Board Actions -->
<?php 
echo '<div class="gwf_buttons_outer"><div class="gwf_buttons">' . PHP_EOL;
if ($tVars['new_thread_allowed']) {
    echo GWF_Button::generic($tLang->lang('btn_add_thread'), $b->getAddThreadHREF());
}
if (!$b->isRoot()) {
    if ($b->canSubscribe()) {
        echo GWF_Button::generic($tLang->lang('btn_subscribe'), $b->getSubscribeHREF());
    }
    if ($b->canUnSubscribe()) {
        echo GWF_Button::generic($tLang->lang('btn_unsubscribe'), $b->getUnSubscribeHREF());
    }
}
echo '</div></div>' . PHP_EOL;
?>

<!-- Admin Control -->
<?php 
if (GWF_User::isAdminS()) {
    ?>
	<div class="gwf_buttons_outer">
	<div class="gwf_buttons">
<?php 
    echo GWF_Button::generic($tLang->lang('btn_edit_board'), $b->getEditBoardHREF());
    echo GWF_Button::generic($tLang->lang('btn_add_board'), $b->getAddBoardHREF());
    ?>
	</div>
	</div>
<?php 
}
Example #24
0
<?php

echo WC_HTML::accountButtons();
echo GWF_Button::wrapStart();
echo GWF_Button::generic($tLang->lang('btn_auto_folder'), $tVars['href_auto_folder']);
echo GWF_Button::wrapEnd();
echo $tVars['form'];
if (count($tVars['ignores']) > 0) {
    $headers = array(array($tLang->lang('th_user_name')), array($tLang->lang('th_actions')));
    echo GWF_Table::start();
    echo GWF_Table::displayHeaders1($headers);
    foreach ($tVars['ignores'] as $data) {
        echo GWF_Table::rowStart();
        $uname = $data[0];
        $reason = $data[1];
        $del_href = GWF_WEB_ROOT . 'index.php?mo=PM&me=Options&unignore=' . urlencode($uname);
        echo GWF_Table::column(GWF_HTML::display($uname));
        echo GWF_Table::column(GWF_Button::delete($del_href));
        echo GWF_Table::rowEnd();
    }
    echo GWF_Table::end();
}
echo $tVars['form_ignore'];
Example #25
0
 case GWF_Form::FLOAT:
     printf('<tr><td>%s%s</td><td>%s</td><td><input type="text" name="%s" size="8" value="%s" /></td></tr>' . PHP_EOL, $req, $data[2], $tt, $key, $data[1]);
     break;
 case GWF_Form::PASSWORD:
     printf('<tr><td>%s%s</td><td>%s</td><td><input type="password" name="%s" value="" /></td></tr>' . PHP_EOL, $req, $data[2], $tt, $key);
     break;
 case GWF_Form::CHECKBOX:
     printf('<tr><td>%s%s</td><td>%s</td><td><input type="checkbox" name="%s"%s value="" /></td></tr>' . PHP_EOL, $req, $data[2], $tt, $key, $data[1] !== false ? ' checked="checked"' : '');
     break;
 case GWF_Form::SUBMIT:
     printf('<tr><td></td><td></td><td><input type="submit" name="%s" value="%s" /></td></tr>' . PHP_EOL, $key, $data[1]);
     break;
 case GWF_Form::CAPTCHA:
     $foo = empty($data[1]) ? '' : '/' . $data[1];
     printf('<tr><td>%s</td><td>%s</td><td><img src="%sCaptcha%s" onclick="this.src=\'%sCaptcha/?\'+(new Date()).getTime();" alt="Captcha" /></td></tr>' . PHP_EOL, GWF_HTML::lang('th_captcha1'), GWF_Button::tooltip(GWF_HTML::lang('tt_captcha1')), GWF_WEB_ROOT, $foo, GWF_WEB_ROOT);
     printf('<tr><td>%s</td><td>%s</td><td><input type="text" name="%s" value="%s" /></td></tr>' . PHP_EOL, GWF_HTML::lang('th_captcha2'), GWF_Button::tooltip(GWF_HTML::lang('tt_captcha2')), $key, $data[1]);
     break;
 case GWF_Form::ENUM:
 case GWF_Form::TIME:
 case GWF_Form::DATE:
 case GWF_Form::DATE_FUTURE:
 case GWF_Form::SELECT:
 case GWF_Form::SELECT_A:
 case GWF_Form::SSTRING:
     printf('<tr><td>%s%s</td><td>%s</td><td>%s</td></tr>' . PHP_EOL, $req, $data[2], $tt, $data[1]);
     break;
 case GWF_Form::DIVIDER:
     printf('<tr class="divider"><td colspan="%d"><hr/></td></tr>' . PHP_EOL, $cols);
     break;
 case GWF_Form::HEADLINE:
     if (isset($data[2])) {
Example #26
0
    }
    if ('' !== ($v = $p->display('prof_aim'))) {
        echo gwfProfileRow($tLang->lang('th_aim'), $v);
    }
    if ('' !== ($v = $p->display('prof_irc'))) {
        echo gwfProfileRow($tLang->lang('th_irc'), $v);
    }
    $buttons = '';
    if ('' !== ($email = $u->getValidMail())) {
        $txt = $tLang->lang('at_mailto', array($u->displayUsername()));
        if ($u->isOptionEnabled(GWF_User::ALLOW_EMAIL)) {
            $buttons .= GWF_Button::mail(GWF_WEB_ROOT . 'send/email/to/' . $u->urlencode('user_name'), $txt);
        }
    }
    if (GWF_Session::isLoggedIn()) {
        $buttons .= GWF_Button::generic($tLang->lang('btn_pm'), $u->getPMHref());
    }
    if ($buttons !== '') {
        echo GWF_Table::rowStart();
        echo "<td colspan=\"2\" class=\"ce\">{$buttons}</td>" . PHP_EOL;
        echo GWF_Table::rowEnd();
    }
}
# Fav Sites
echo wcProfileFavSites($u->getID());
echo wcProfileFavCats($u->getID());
echo '</table>' . PHP_EOL;
echo '</div>' . PHP_EOL;
# Regats
$regats = WC_RegAt::getRegats($u->getID(), $orderby);
if (count($regats) > 0) {
Example #27
0
        $href = $board->getShowBoardHREF();
        $forum = GWF_HTML::anchor($href, $group->getVar('group_name'));
    } else {
        $forum = $group->display('group_name');
    }
    $members = GWF_HTML::anchor(GWF_WEB_ROOT . 'users_in_group/' . $group->getID() . '/' . $group->urlencodeSEO('group_name'), $group->getVar('group_memberc'));
    echo GWF_Table::rowStart();
    echo GWF_Table::column($edit . $forum, 'nowrap');
    echo GWF_Table::column($members, 'gwf_num');
    echo GWF_Table::column($founder->displayProfileLink());
    if ($user->isGuest()) {
        echo '<td></td>' . PHP_EOL;
    } elseif ($in_grp) {
        echo GWF_Table::column(sprintf('<input type="submit" name="part[%s]" value="%s" />', $group->getVar('group_id'), $btn_part));
    } elseif ($group->isOptionEnabled(GWF_Group::FREE)) {
        echo GWF_Table::column(sprintf('<input type="submit" name="join[%s]" value="%s" />', $group->getVar('group_id'), $btn_join));
    } else {
        echo '<td></td>' . PHP_EOL;
    }
    echo GWF_Table::rowEnd();
}
echo GWF_Table::end();
echo '</form>' . PHP_EOL;
echo $tVars['page_menu'];
echo '<div class="gwf_buttons_outer">' . PHP_EOL;
echo '<div class="gwf_buttons">' . PHP_EOL;
if ($tVars['module']->canCreateGroup($user)) {
    echo GWF_Button::generic($tLang->lang('btn_add_group'), $tVars['href_add_group']);
}
echo '</div>' . PHP_EOL;
echo '</div>' . PHP_EOL;
Example #28
0
<div class="cb"></div>

<?php 
# Categories
if (count($tVars['cats'])) {
    ?>
<div>
<?php 
    foreach ($tVars['cats'] as $id => $cat) {
        # CATEGORIES
        ?>
	<div><?php 
        echo $cat;
        ?>
</div>
<?php 
    }
    ?>
</div>
<?php 
}
?>

<div class="cb"></div>
<?php 
if ($is_staff) {
    $buttons = GWF_Button::add($tLang->lang('btn_add'), $tVars['href_add']);
    $buttons .= GWF_Button::generic($tLang->lang('btn_admin_section'), $tVars['module']->getAdminSectionUrl());
    echo GWF_Button::wrap($buttons);
}
Example #29
0
<?php

echo $tVars['module']->getUserGroupButtons();
echo '<div class="gwf_buttons_outer"><div class="gwf_buttons">' . GWF_Button::generic($tLang->lang('btn_adv_search'), $tVars['href_adv']) . '</div></div>';
echo sprintf('<div>%s</div>', $tVars['form']);
$headers = array(array('', 'user_countryid'), array($tLang->lang('th_user_name'), 'user_name'), array($tLang->lang('th_user_level'), 'user_level'), array($tLang->lang('th_user_email'), 'user_email'), array($tLang->lang('th_user_regdate'), 'user_regdate'), array($tLang->lang('th_user_birthdate'), 'user_birthdate'), array($tLang->lang('th_user_lastactivity'), 'user_lastactivity'));
echo $tVars['page_menu'];
echo GWF_Table::start();
?>
	<?php 
echo GWF_Table::displayHeaders1($headers, $tVars['sort_url']);
foreach ($tVars['users'] as $user) {
    $user instanceof GWF_User;
    echo GWF_Table::rowStart();
    ?>
		<td><?php 
    echo $user->displayCountryFlag();
    ?>
</td>
		<td><a href="<?php 
    echo GWF_WEB_ROOT . 'profile/' . $user->urlencode('user_name');
    ?>
"><?php 
    echo $user->displayUsername();
    ?>
</a></td>
		<td class="gwf_num"><?php 
    echo $user->getVar('user_level');
    ?>
</td>
		<td><?php 
Example #30
0
<?php

echo '<div class="gwf_buttons_outer">' . PHP_EOL;
echo '<div class="gwf_buttons">' . PHP_EOL;
echo GWF_Button::generic('ConvertDB', $tVars['href_convert']);
echo GWF_Button::generic('Fix Chall Tags', $tVars['href_chall_cache']);
echo GWF_Button::generic('Fix Site Tags', $tVars['href_sitetags']);
echo GWF_Button::generic('Recalc Everything', $tVars['href_recalc_all']);
echo GWF_Button::generic('Freeze User', $tVars['href_freeze']);
echo '</div>' . PHP_EOL;
echo '</div>' . PHP_EOL;
$headers = array(array($tLang->lang('th_user_name'), 'user_name'), array($tLang->lang('th_site_name'), 'site_name'), array());
echo $tVars['page_menu'];
echo GWF_Form::start($tVars['form_action']);
echo GWF_Table::start();
echo GWF_Table::displayHeaders2($headers, $tVars['sort_url']);
$unfreeze = $tLang->lang('btn_unfreeze');
foreach ($tVars['frozen'] as $row) {
    $row instanceof WC_Freeze;
    $user = $row->getUser();
    $site = $row->getSite();
    echo GWF_Table::rowStart();
    echo GWF_Table::column($user->displayUsername());
    echo GWF_Table::column($site->displayName());
    echo GWF_Table::column(sprintf('<input type="submit" name="unfreeze[%s,%s]" value="%s" />', $user->getVar('user_id'), $site->getVar('site_id'), $unfreeze));
    echo GWF_Table::rowEnd();
}
echo GWF_Table::end();
echo GWF_Form::end();
echo $tVars['page_menu'];
echo $tVars['form'];