Version 3.3.4
This commit is contained in:
1 parent
78706903a2
commit
fb6b5baabc
2206 files changed
+409828
-382984
No files matched your search
@@ -0,0 +1,493 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* Stats skin functions
|
||||
* Last Updated: $LastChangedDate: 2011-05-05 12:03:47 +0100 (Thu, 05 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 14th May 2003
|
||||
* @version $Rev: 8644 $
|
||||
*/
|
||||
|
||||
class cp_skin_archive
|
||||
{
|
||||
/**
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
* @var $registry
|
||||
* @var $DB
|
||||
* @var $settings
|
||||
* @var $request
|
||||
* @var $lang
|
||||
* @var $member
|
||||
* @var $memberData
|
||||
* @var $cache
|
||||
* @var $caches
|
||||
*/
|
||||
protected $registry;
|
||||
protected $DB;
|
||||
protected $settings;
|
||||
protected $request;
|
||||
protected $lang;
|
||||
protected $member;
|
||||
protected $memberData;
|
||||
protected $cache;
|
||||
protected $caches;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param object $registry Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->member = $this->registry->member();
|
||||
$this->memberData =& $this->registry->member()->fetchMemberData();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
$this->lang = $this->registry->class_localization;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Overview screen
|
||||
*/
|
||||
public function showRestorePrefs( $restoreData ) {
|
||||
$IPBHTML = "";
|
||||
|
||||
$lang = sprintf( $this->lang->words['restore_prefs_desc'], "<input type='text' name='restoreDays' value='{$this->settings['archive_restore_days']}' class='input_text' size='3' />" );
|
||||
|
||||
//--starthtml--//
|
||||
$IPBHTML .= <<<HTML
|
||||
<form action='{$this->settings['base_url']}{$this->form_code}&do=saveRestorePrefs' id='archiveForm' method='post'>
|
||||
<div class='acp-box'>
|
||||
<h3>{$this->lang->words['restore_prefs_title']}</h3>
|
||||
<div class='pad center'>
|
||||
{$lang}
|
||||
</div>
|
||||
<div class='acp-actionbar'>
|
||||
<input type='submit' class='button' value='{$this->lang->words['arch_update']}' />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
HTML;
|
||||
|
||||
//--endhtml--//
|
||||
return $IPBHTML;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add members pop-up
|
||||
*/
|
||||
public function showAddMemberDialog($type) {
|
||||
$IPBHTML = "";
|
||||
//--starthtml--//
|
||||
$IPBHTML .= <<<HTML
|
||||
<div class='acp-box'>
|
||||
<h3>{$this->lang->words['mm_title']}</h3>
|
||||
<div class='pad center'>
|
||||
<input type='text' id='addName' name='addName' value='' autocomplete='off' style='width:210px;' class='textinput' />
|
||||
<br />
|
||||
<span class='desctext'>{$this->lang->words['mm_desc_start_typing']}</span>
|
||||
</div>
|
||||
<div class='acp-actionbar'>
|
||||
<input type='submit' class='button' data-clicklaunch="saveAddMemberDialog" data-scope="ACPArchive" data-type="{$type}" value='{$this->lang->words['arch_update']}' />
|
||||
</div>
|
||||
</div>
|
||||
HTML;
|
||||
|
||||
//--endhtml--//
|
||||
return $IPBHTML;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add forum pop-up
|
||||
*/
|
||||
public function showAddForumDialog( $options, $type ) {
|
||||
$IPBHTML = "";
|
||||
//--starthtml--//
|
||||
$IPBHTML .= <<<HTML
|
||||
<div class='acp-box'>
|
||||
<h3>{$this->lang->words['sf_title']}</h3>
|
||||
<div class='pad center'>
|
||||
<select name='forumIds[]' id='forumIds' class='input_text' size='15' multiple='multiple' style='width:95%'>{$options}</select>
|
||||
</div>
|
||||
<div class='acp-actionbar'>
|
||||
<input type='submit' class='button' data-clicklaunch="saveAddForumDialog" data-scope="ACPArchive" data-type="{$type}" value='{$this->lang->words['arch_update']}' />
|
||||
</div>
|
||||
</div>
|
||||
HTML;
|
||||
|
||||
//--endhtml--//
|
||||
return $IPBHTML;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Overview screen
|
||||
*/
|
||||
public function archiveDashboard( $restoreTopics, $restoreCount, $archTopics, $archCount, $possibleCounts, $connexTest ) {
|
||||
$IPBHTML = "";
|
||||
//--starthtml--//
|
||||
|
||||
$title = ( $this->settings['archive_on'] ) ? $this->lang->words['archive_title_on'] : $this->lang->words['archive_title_off'];
|
||||
$button = ( $this->settings['archive_on'] ) ? $this->lang->words['archive_disable'] : $this->lang->words['archive_enable'];
|
||||
$class = ( $this->settings['archive_on'] ) ? 'red' : 'green';
|
||||
|
||||
$IPBHTML .= <<<HTML
|
||||
<script type='text/javascript' src='{$this->settings['js_app_url']}acp.archive.js'></script>
|
||||
<div class='section_title'>
|
||||
<h2>{$title}
|
||||
<div class='ipsActionButton right {$class}'>
|
||||
<a href='{$this->settings['base_url']}&{$this->form_code}&do=toggleArchiving'>
|
||||
<img src='{$this->settings['skin_acp_url']}/images/icons/archives.png' alt='' />
|
||||
{$button}
|
||||
</a>
|
||||
</div>
|
||||
</h2>
|
||||
</div>
|
||||
HTML;
|
||||
|
||||
if ( $archCount && $possibleCounts['count'] )
|
||||
{
|
||||
$percent = round( ( $archCount / $possibleCounts['total'] ) * 100, 2 );
|
||||
$restoreText = sprintf( $this->lang->words['topics_to_be_unarchived'], $restoreCount );
|
||||
|
||||
$IPBHTML .= <<<HTML
|
||||
<div class='acp-box'>
|
||||
<div class='header' style='width: {$percent}%; height: 15px !important'>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div style='margin-top:-28px; padding-left: 10px;'>
|
||||
<strong>{$percent}% {$this->lang->words['archived_single']} ({$archCount}/{$possibleCounts['total']})</strong>
|
||||
</div>
|
||||
<br /><br />
|
||||
HTML;
|
||||
}
|
||||
|
||||
if ( $connexTest !== true )
|
||||
{
|
||||
if ( isset( $this->lang->words['connex_error_' . $connexTest ] ) )
|
||||
{
|
||||
$connexTest = $this->lang->words['connex_error_' . $connexTest ];
|
||||
}
|
||||
|
||||
$IPBHTML .= <<<HTML
|
||||
<div class='warning'>
|
||||
<h4>{$this->lang->words['connex_error_title']}</h4>
|
||||
{$connexTest}
|
||||
</div>
|
||||
<br />
|
||||
HTML;
|
||||
}
|
||||
|
||||
$IPBHTML .= <<<HTML
|
||||
<div class='acp-box'>
|
||||
<h3>{$restoreText}</h3>
|
||||
<table class='ipsTable'>
|
||||
<tr>
|
||||
<th width='70%'>{$this->lang->words['tbl_title']}</th>
|
||||
<th width='30%'>{$this->lang->words['tbl_last_post']}</th>
|
||||
</tr>
|
||||
HTML;
|
||||
|
||||
foreach( $restoreTopics as $id => $data )
|
||||
{
|
||||
$navHtml = '';
|
||||
$data['title'] = IPSText::truncate( $data['title'], 50 );
|
||||
$lastPost = $this->lang->getDate( $data['topic_last_post'], 'SHORT' );
|
||||
|
||||
if ( $data['nav'] )
|
||||
{
|
||||
$navHtml = $this->buildForumNav( $data['nav'] );
|
||||
}
|
||||
|
||||
$IPBHTML .= <<<HTML
|
||||
<tr>
|
||||
<td>{$navHtml}<a href="{$this->settings['public_url']}showtopic={$data['tid']}">{$data['title']}</a></td>
|
||||
<td>{$lastPost}</td>
|
||||
</tr>
|
||||
HTML;
|
||||
}
|
||||
|
||||
$descLang = sprintf( $this->lang->words['includes_manually_flagged'], $this->settings['archive_restore_days'] );
|
||||
$IPBHTML .= <<<HTML
|
||||
<tr>
|
||||
<td colspan='2' class='acp-actionbar desctext'>
|
||||
{$descLang} <a href='#' data-clicklaunch="showRestorePrefs" data-scope="ACPArchive" class='mini_button right'>{$this->lang->words['set_unarchive_prefs']}</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
HTML;
|
||||
|
||||
if ( count( $archTopics ) )
|
||||
{
|
||||
$archTitle = sprintf( $this->lang->words['topics_archived'], count($archTopics), $archCount );
|
||||
if ( $archCount > 10 )
|
||||
{
|
||||
$archTitle .= ' - ' . $this->lang->words['topics_archived_last'];
|
||||
}
|
||||
|
||||
$IPBHTML .= <<<HTML
|
||||
<br />
|
||||
<div class='acp-box'>
|
||||
<h3>{$archTitle}</h3>
|
||||
<table class='ipsTable'>
|
||||
<tr>
|
||||
<th width='70%'>{$this->lang->words['tbl_title']}</th>
|
||||
<th width='30%'>{$this->lang->words['tbl_last_post']}</th>
|
||||
</tr>
|
||||
HTML;
|
||||
|
||||
foreach( $archTopics as $id => $data )
|
||||
{
|
||||
$navHtml = '';
|
||||
$data['title'] = IPSText::truncate( $data['title'], 50 );
|
||||
$lastPost = $this->lang->getDate( $data['topic_last_post'], 'SHORT' );
|
||||
|
||||
if ( $data['nav'] )
|
||||
{
|
||||
$navHtml = $this->buildForumNav( $data['nav'] );
|
||||
}
|
||||
|
||||
$IPBHTML .= <<<HTML
|
||||
<tr>
|
||||
<td>{$navHtml}<a href="{$this->settings['public_url']}showtopic={$data['tid']}">{$data['title']}</a></td>
|
||||
<td>{$lastPost}</td>
|
||||
</tr>
|
||||
HTML;
|
||||
}
|
||||
|
||||
$IPBHTML .= <<<HTML
|
||||
</table>
|
||||
</div>
|
||||
HTML;
|
||||
}
|
||||
|
||||
//--endhtml--//
|
||||
return $IPBHTML;
|
||||
}
|
||||
|
||||
/**
|
||||
* Overview screen
|
||||
*/
|
||||
public function archiveRules( $json='{}', $textString='' ) {
|
||||
$IPBHTML = "";
|
||||
//--starthtml--//
|
||||
|
||||
$doArchivePane = $this->archivePane( 'archive' );
|
||||
$skipArchivePane = $this->archivePane( 'skip' );
|
||||
|
||||
$IPBHTML .= <<<HTML
|
||||
<script type='text/javascript' src='{$this->settings['js_app_url']}acp.archive.js'></script>
|
||||
<script tyle='text/javascript'>
|
||||
ipb.ACPArchive.inSection = 'rules';
|
||||
ipb.ACPArchive.ruleData = $json;
|
||||
</script>
|
||||
<div class='section_title'>
|
||||
<h2>{$this->lang->words['archive_rules_title']}</h2>
|
||||
</div>
|
||||
<div class='information-box' id='archiveCount'>
|
||||
{$textString}
|
||||
</div>
|
||||
<br />
|
||||
<form action='{$this->settings['base_url']}{$this->form_code}&do=saveRules' id='archiveForm' method='post'>
|
||||
<div class='acp-box'>
|
||||
<h3>{$this->lang->words['rules_title']}</h3>
|
||||
<div id='tabstrip_archive' class='ipsTabBar with_left with_right'>
|
||||
<ul>
|
||||
<li id='tab_archive'>{$this->lang->words['rules_tab_archive']}</li>
|
||||
<li id='tab_skip'>{$this->lang->words['rules_tab_skip']}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id='tabstrip_archive_content' class='ipsTabBar_content'>
|
||||
<div id='tab_archive_content' class='pad row2'>
|
||||
<div class='pad row1'>
|
||||
{$doArchivePane}
|
||||
</div>
|
||||
</div>
|
||||
<div id='tab_skip_content' class='pad _red'>
|
||||
<div class='pad row1'>
|
||||
{$skipArchivePane}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='acp-actionbar'>
|
||||
<input type='submit' name='submit' value='{$this->lang->words['rules_save']}' class='button primary' />
|
||||
</div>
|
||||
</div>
|
||||
<form>
|
||||
<script type='text/javascript'>
|
||||
jQ("#tabstrip_archive").ipsTabBar({tabWrap: "#tabstrip_archive_content", defaultTab: "tab_archive" });
|
||||
</script>
|
||||
HTML;
|
||||
|
||||
//--endhtml--//
|
||||
return $IPBHTML;
|
||||
}
|
||||
|
||||
/**
|
||||
* Overview screen
|
||||
*/
|
||||
public function archivePane( $type='archive' ) {
|
||||
$IPBHTML = "";
|
||||
//--starthtml--//
|
||||
|
||||
if ( $type == 'archive' )
|
||||
{
|
||||
$IPBHTML .= <<<HTML
|
||||
<div class='acp-box pad row1 rule'>
|
||||
{$this->lang->words['rules_topic_is']}
|
||||
<select name='{$type}_field_state' id='{$type}_field_state'>
|
||||
<option value='-' id='{$type}_field_state_any'>{$this->lang->words['rules_state_any']}</option>
|
||||
<option value='open' id='{$type}_field_state_open'>{$this->lang->words['rules_state_open']}</option>
|
||||
<option value='closed' id='{$type}_field_state_closed'>{$this->lang->words['rules_state_closed']}</option>
|
||||
</select>
|
||||
</div>
|
||||
<br />
|
||||
<div class='acp-box pad row1 rule'>
|
||||
{$this->lang->words['rules_topic_is']}
|
||||
<select name='{$type}_field_pinned' id='{$type}_field_pinned'>
|
||||
<option value='-' id='{$type}_field_pinned_any'>{$this->lang->words['rules_pinned_any']}</option>
|
||||
<option value='1' id='{$type}_field_pinned_1'>{$this->lang->words['rules_pinned_pin']}</option>
|
||||
<option value='0' id='{$type}_field_pinned_0'>{$this->lang->words['rules_pinned_not']}</option>
|
||||
</select>
|
||||
</div>
|
||||
<br />
|
||||
<div class='acp-box pad row1 rule'>
|
||||
{$this->lang->words['rules_topic_is']}
|
||||
<select name='{$type}_field_approved' id='{$type}_field_approved'>
|
||||
<option value='-' id='{$type}_field_approved_any'>{$this->lang->words['rules_approved_any']}</option>
|
||||
<option value='1' id='{$type}_field_approved_1'>{$this->lang->words['rules_approved_visible']}</option>
|
||||
<option value='0' id='{$type}_field_approved_0'>{$this->lang->words['rules_approved_hidden']}</option>
|
||||
</select>
|
||||
</div>
|
||||
<br />
|
||||
<div class='acp-box pad row1 rule'>
|
||||
{$this->lang->words['rules_topic_has']}
|
||||
<select name='{$type}_field_poll' id='{$type}_field_poll'>
|
||||
<option value='-' id='{$type}_field_poll_any'>{$this->lang->words['rules_poll_any']}</option>
|
||||
<option value='1' id='{$type}_field_poll_1'>{$this->lang->words['rules_poll_has']}</option>
|
||||
<option value='0' id='{$type}_field_poll_0'>{$this->lang->words['rules_poll_not']}</option>
|
||||
</select>
|
||||
</div>
|
||||
<br />
|
||||
HTML;
|
||||
}
|
||||
|
||||
$IPBHTML .= <<<HTML
|
||||
<div class='acp-box pad row1 rule'>
|
||||
{$this->lang->words['rules_topic_has']}
|
||||
<select name='{$type}_field_post' id='{$type}_field_post'>
|
||||
<option value='<' id='{$type}_field_post_less'>{$this->lang->words['rules_less_than']}</option>
|
||||
<option value='>' id='{$type}_field_post_more'>{$this->lang->words['rules_more_than']}</option>
|
||||
</select>
|
||||
<input type='text' class='input_text' name='{$type}_field_post_text' id='{$type}_field_post_text' size='5'>
|
||||
{$this->lang->words['rules_posts']}
|
||||
</div>
|
||||
<br />
|
||||
<div class='acp-box pad row1 rule'>
|
||||
{$this->lang->words['rules_topic_has']}
|
||||
<select name='{$type}_field_view' id='{$type}_field_view'>
|
||||
<option value='<' id='{$type}_field_view_less'>{$this->lang->words['rules_less_than']}</option>
|
||||
<option value='>' id='{$type}_field_view_more'>{$this->lang->words['rules_more_than']}</option>
|
||||
</select>
|
||||
<input type='text' class='input_text' name='{$type}_field_view_text' id='{$type}_field_view_text' size='5'>
|
||||
{$this->lang->words['rules_views']}
|
||||
</div>
|
||||
<br />
|
||||
<div class='acp-box pad row1 rule'>
|
||||
{$this->lang->words['rules_topic_rated']}
|
||||
<select name='{$type}_field_rating' id='{$type}_field_rating'>
|
||||
<option value='>' id='{$type}_field_rating_more'>{$this->lang->words['rules_more_than']}</option>
|
||||
<option value='<' id='{$type}_field_rating_less'>{$this->lang->words['rules_less_than']}</option>
|
||||
</select>
|
||||
<input type='text' class='input_text' name='{$type}_field_rating_text' id='{$type}_field_rating_text' size='2'> {$this->lang->words['rules_oo_five']}
|
||||
</div>
|
||||
HTML;
|
||||
|
||||
if ( $type == 'archive' )
|
||||
{
|
||||
$IPBHTML .= <<<HTML
|
||||
<br />
|
||||
<div class='acp-box pad row1 rule'>
|
||||
{$this->lang->words['rules_topic']}
|
||||
<select name='{$type}_field_forum' id='{$type}_field_forum'>
|
||||
<option value='+' id='{$type}_field_forum_less'>{$this->lang->words['rules_is_in_forum']}</option>
|
||||
<option value='-' id='{$type}_field_forum_more'>{$this->lang->words['rules_is_not_in_forum']}</option>
|
||||
</select>
|
||||
<input type='button' id='{$type}_addForum' value='{$this->lang->words['rules_forum_button']}' data-clicklaunch="launchAddForumDialog" data-scope="ACPArchive" data-type="{$type}" class='mini_button' />
|
||||
<div id='{$type}_forumsGoHere' class='pad' style='display:none'></div>
|
||||
<input type='hidden' name='{$type}_field_forum_text' id='{$type}_field_forum_text' />
|
||||
</div>
|
||||
<br />
|
||||
<div class='acp-box pad row1 rule'>
|
||||
{$this->lang->words['rules_topic_starter']}
|
||||
<select name='{$type}_field_member' id='{$type}_field_member'>
|
||||
<option value='+' id='{$type}_field_member_less'>{$this->lang->words['rules_includes']}</option>
|
||||
<option value='-' id='{$type}_field_member_more'>{$this->lang->words['rules_does_not_include']}</option>
|
||||
</select>
|
||||
<input type='button' id='{$type}_addMember' value='{$this->lang->words['rules_members_button']}' data-clicklaunch="launchAddMemberDialog" data-scope="ACPArchive" data-type="{$type}" class='mini_button' />
|
||||
<div id='{$type}_membersGoHere' class='pad' style='display:none'></div>
|
||||
<input type='hidden' name='{$type}_field_member_text' id='{$type}_field_member_text' />
|
||||
</div>
|
||||
|
||||
HTML;
|
||||
}
|
||||
$IPBHTML .= <<<HTML
|
||||
<br />
|
||||
<div class='acp-box pad row1 rule'>
|
||||
{$this->lang->words['rules_topic_last_post']}
|
||||
<select name='{$type}_field_lastpost' id='{$type}_field_lastpost'>
|
||||
<option value='<' id='{$type}_field_lastpost_less'>{$this->lang->words['rules_older_than']}</option>
|
||||
<option value='>' id='{$type}_field_lastpost_more'>{$this->lang->words['rules_newer_than']}</option>
|
||||
</select>
|
||||
<input type='text' class='input_text' name='{$type}_field_lastpost_text' id='{$type}_field_lastpost_text' size='5'>
|
||||
<select name='{$type}_field_lastpost_unit' id='{$type}_field_lastpost_unit'>
|
||||
<option value='d' id='{$type}_field_lastpost_unit_d'>{$this->lang->words['rules_days']}</option>
|
||||
<option value='m' id='{$type}_field_lastpost_unit_m'>{$this->lang->words['rules_months']}</option>
|
||||
<option value='y' id='{$type}_field_lastpost_unit_y'>{$this->lang->words['rules_years']}</option>
|
||||
</select>
|
||||
</div>
|
||||
HTML;
|
||||
|
||||
//--endhtml--//
|
||||
return $IPBHTML;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build nav
|
||||
*/
|
||||
function buildForumNav( $data )
|
||||
{
|
||||
if ( ! is_array( $data ) )
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
foreach( $data as $nav )
|
||||
{
|
||||
$navHtml .= '<a href="' . $this->settings['public_url'] . $nav[1] . '" class="desctext">' . $nav[0] . '</a> <span class="desctext">→</span> ';
|
||||
}
|
||||
|
||||
return $navHtml;
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -1,455 +1,407 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* Group plugin skin functions
|
||||
* Last Updated: $LastChangedDate: 2011-09-01 08:16:37 -0400 (Thu, 01 Sep 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://hatynka.in
|
||||
* @since 14th May 2003
|
||||
* @version $Rev: 9439 $
|
||||
*/
|
||||
|
||||
class cp_skin_group_form
|
||||
{
|
||||
/**
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
* @var $registry
|
||||
* @var $DB
|
||||
* @var $settings
|
||||
* @var $request
|
||||
* @var $lang
|
||||
* @var $member
|
||||
* @var $memberData
|
||||
* @var $cache
|
||||
* @var $caches
|
||||
*/
|
||||
protected $registry;
|
||||
protected $DB;
|
||||
protected $settings;
|
||||
protected $request;
|
||||
protected $lang;
|
||||
protected $member;
|
||||
protected $memberData;
|
||||
protected $cache;
|
||||
protected $caches;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param object $registry Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->member = $this->registry->member();
|
||||
$this->memberData =& $this->registry->member()->fetchMemberData();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
$this->lang = $this->registry->class_localization;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show forums group form
|
||||
*
|
||||
* @param array Group data
|
||||
* @param string Tab ID
|
||||
* @return string HTML
|
||||
*/
|
||||
public function acp_group_form_main( $group, $tabId ) {
|
||||
|
||||
$guest_legend = $group['g_id'] == $this->settings['guest_group'] ? $this->lang->words['g_applyguest'] : '';
|
||||
|
||||
$gbw_unit_type = array(
|
||||
0 => array( 0, $this->lang->words['g_dd_apprp'] ),
|
||||
1 => array( 1, $this->lang->words['g_dd_days'] ) );
|
||||
$dd_topic_rate = array(
|
||||
0 => array( 0, $this->lang->words['g_no'] ),
|
||||
1 => array( 1, $this->lang->words['g_yes1'] ),
|
||||
2 => array( 2, $this->lang->words['g_yes2'] )
|
||||
);
|
||||
|
||||
$form = array();
|
||||
$form['g_other_topics'] = $this->registry->output->formYesNo( "g_other_topics", $group['g_other_topics'] );
|
||||
$form['g_post_new_topics'] = $this->registry->output->formYesNo( "g_post_new_topics", $group['g_post_new_topics'] );
|
||||
$form['g_topic_rate_setting'] = $this->registry->output->formDropdown( "g_topic_rate_setting", $dd_topic_rate, $group['g_topic_rate_setting'] );
|
||||
$form['g_reply_own_topics'] = $this->registry->output->formYesNo( "g_reply_own_topics", $group['g_reply_own_topics'] );
|
||||
$form['g_reply_other_topics'] = $this->registry->output->formYesNo( "g_reply_other_topics", $group['g_reply_other_topics'] );
|
||||
$form['g_edit_posts'] = $this->registry->output->formYesNo( "g_edit_posts", $group['g_edit_posts'] );
|
||||
$form['g_edit_cutoff'] = $this->registry->output->formInput( "g_edit_cutoff", $group['g_edit_cutoff'] );
|
||||
$form['g_append_edit'] = $this->registry->output->formYesNo( "g_append_edit", $group['g_append_edit'] );
|
||||
$form['g_delete_own_posts'] = $this->registry->output->formYesNo( "g_delete_own_posts", $group['g_delete_own_posts'] );
|
||||
$form['g_open_close_posts'] = $this->registry->output->formYesNo( "g_open_close_posts", $group['g_open_close_posts'] );
|
||||
$form['g_edit_topic'] = $this->registry->output->formYesNo( "g_edit_topic", $group['g_edit_topic'] );
|
||||
$form['g_delete_own_topics'] = $this->registry->output->formYesNo( "g_delete_own_topics", $group['g_delete_own_topics'] );
|
||||
$form['g_post_polls'] = $this->registry->output->formYesNo( "g_post_polls", $group['g_post_polls'] );
|
||||
$form['g_vote_polls'] = $this->registry->output->formYesNo( "g_vote_polls", $group['g_vote_polls'] );
|
||||
$form['g_avoid_flood'] = $this->registry->output->formYesNo( "g_avoid_flood", $group['g_avoid_flood'] );
|
||||
$form['g_avoid_q'] = $this->registry->output->formYesNo( "g_avoid_q", $group['g_avoid_q'] );
|
||||
$form['g_post_closed'] = $this->registry->output->formYesNo( "g_post_closed", $group['g_post_closed'] );
|
||||
$form['g_mod_preview'] = $this->registry->output->formYesNo( "g_mod_preview", $group['g_mod_preview'] );
|
||||
$form['g_mod_post_unit'] = $this->registry->output->formSimpleInput( "g_mod_post_unit", $group['g_mod_post_unit'], 3 );
|
||||
$form['gbw_mod_post_unit_type'] = $this->registry->output->formDropdown( "gbw_mod_post_unit_type", $gbw_unit_type, $group['gbw_mod_post_unit_type'] );
|
||||
$form['g_ppd_limit'] = $this->registry->output->formSimpleInput( "g_ppd_limit", $group['g_ppd_limit'], 3 );
|
||||
$form['g_ppd_unit'] = $this->registry->output->formSimpleInput( "g_ppd_unit", $group['g_ppd_unit'], 3 );
|
||||
$form['gbw_ppd_unit_type'] = $this->registry->output->formDropdown( "gbw_ppd_unit_type", $gbw_unit_type, $group['gbw_ppd_unit_type'] );
|
||||
|
||||
$form['gbw_soft_delete'] = $this->registry->output->formYesNo( "gbw_soft_delete", $group['gbw_soft_delete'] );
|
||||
$form['gbw_soft_delete_own'] = $this->registry->output->formYesNo( "gbw_soft_delete_own", $group['gbw_soft_delete_own'] );
|
||||
$form['gbw_soft_delete_own_topic'] = $this->registry->output->formYesNo( "gbw_soft_delete_own_topic", $group['gbw_soft_delete_own_topic'] );
|
||||
$form['gbw_un_soft_delete'] = $this->registry->output->formYesNo( "gbw_un_soft_delete", $group['gbw_un_soft_delete'] );
|
||||
$form['gbw_soft_delete_see'] = $this->registry->output->formYesNo( "gbw_soft_delete_see", $group['gbw_soft_delete_see'] );
|
||||
$form['gbw_soft_delete_topic'] = $this->registry->output->formYesNo( "gbw_soft_delete_topic", $group['gbw_soft_delete_topic'] );
|
||||
$form['gbw_un_soft_delete_topic'] = $this->registry->output->formYesNo( "gbw_un_soft_delete_topic", $group['gbw_un_soft_delete_topic'] );
|
||||
$form['gbw_soft_delete_topic_see'] = $this->registry->output->formYesNo( "gbw_soft_delete_topic_see", $group['gbw_soft_delete_topic_see'] );
|
||||
$form['gbw_soft_delete_reason'] = $this->registry->output->formYesNo( "gbw_soft_delete_reason", $group['gbw_soft_delete_reason'] );
|
||||
$form['gbw_soft_delete_see_post'] = $this->registry->output->formYesNo( "gbw_soft_delete_see_post", $group['gbw_soft_delete_see_post'] );
|
||||
|
||||
|
||||
$IPBHTML = "";
|
||||
|
||||
$IPBHTML .= <<<EOF
|
||||
<div id='tab_GROUPS_{$tabId}_content'>
|
||||
<div>
|
||||
<table class='ipsTable'>
|
||||
<tr>
|
||||
<th colspan='2' class='head'><strong>{$this->lang->words['gf_t_rating']}</strong></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_topic_rate_setting']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['g_topic_rate_setting']}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan='2' class='head'><strong>{$this->lang->words['gf_t_viewing']}</strong></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_other_topics']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['g_other_topics']}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan='2' class='head'><strong>{$this->lang->words['gf_t_posting']}</strong></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_post_new_topics']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['g_post_new_topics']}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_reply_own_topics']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['g_reply_own_topics']}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_reply_other_topics']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['g_reply_other_topics']}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan='2' class='head'><strong>{$this->lang->words['gf_t_editing']}</strong></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_edit_posts']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['g_edit_posts']}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_edit_cutoff']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['g_edit_cutoff']}
|
||||
<div class='desctext'>{$this->lang->words['gf_edit_cuttoff_info']}</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_append_edit']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['g_append_edit']}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_edit_topic']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['g_edit_topic']}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan='2' class='head'><strong>{$this->lang->words['gf_t_deleting']}</strong></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_delete_own_posts']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['g_delete_own_posts']}
|
||||
<p class='desctext'>{$this->lang->words['hard_delete_info']}</p>
|
||||
<span class='desctext'><strong>{$this->lang->words['sup_mod_already']}</strong></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_delete_own_topics']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['g_delete_own_topics']}
|
||||
<p class='desctext'>{$this->lang->words['hard_delete_info']}</p>
|
||||
<span class='desctext'><strong>{$this->lang->words['sup_mod_already']}</strong></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_bw_soft_delete']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['gbw_soft_delete']}
|
||||
<p class='desctext'>{$this->lang->words['soft_delete_info']}</p>
|
||||
<span class='desctext'><strong>{$this->lang->words['sup_mod_already']}</strong></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_bw_soft_delete_own']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['gbw_soft_delete_own']}
|
||||
<p class='desctext'>{$this->lang->words['soft_delete_info']}</p>
|
||||
<span class='desctext'><strong>{$this->lang->words['sup_mod_already']}</strong></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_bw_un_soft_delete']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['gbw_un_soft_delete']}
|
||||
<p class='desctext'>{$this->lang->words['soft_delete_info']}</p>
|
||||
<span class='desctext'><strong>{$this->lang->words['sup_mod_already']}</strong></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_bw_soft_delete_see']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['gbw_soft_delete_see']}
|
||||
<p class='desctext'>{$this->lang->words['gbw_soft_delete_see_d']}</p>
|
||||
<span class='desctext'><strong>{$this->lang->words['sup_mod_already']}</strong></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_bw_soft_delete_topic']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['gbw_soft_delete_topic']}
|
||||
<p class='desctext'>{$this->lang->words['soft_delete_info']}</p>
|
||||
<span class='desctext'><strong>{$this->lang->words['sup_mod_already']}</strong></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_bw_soft_delete_own_topic']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['gbw_soft_delete_own_topic']}
|
||||
<p class='desctext'>{$this->lang->words['soft_delete_info']}</p>
|
||||
<span class='desctext'><strong>{$this->lang->words['sup_mod_already']}</strong></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_bw_un_soft_delete_topic']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['gbw_un_soft_delete_topic']}
|
||||
<p class='desctext'>{$this->lang->words['soft_delete_info']}</p>
|
||||
<span class='desctext'><strong>{$this->lang->words['sup_mod_already']}</strong></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_bw_soft_delete_topic_see']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['gbw_soft_delete_topic_see']}
|
||||
<p class='desctext'>{$this->lang->words['gbw_soft_delete_topic_see_d']}</p>
|
||||
<span class='desctext'><strong>{$this->lang->words['sup_mod_already']}</strong></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_bw_soft_delete_reason']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['gbw_soft_delete_reason']}
|
||||
<p class='desctext'>{$this->lang->words['soft_delete_info']}</p>
|
||||
<span class='desctext'><strong>{$this->lang->words['sup_mod_already']}</strong></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_bw_soft_delete_see_post']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['gbw_soft_delete_see_post']}
|
||||
<p class='desctext'>{$this->lang->words['gbw_soft_delete_see_post_d']}</p>
|
||||
<span class='desctext'><strong>{$this->lang->words['sup_mod_already']}</strong></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th colspan='2' class='head'><strong>{$this->lang->words['gf_t_openclose']}</strong></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['g_open_close_posts']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['g_open_close_posts']}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_post_closed']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['g_post_closed']}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan='2' class='head'><strong>{$this->lang->words['gf_t_polling']}</strong></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_post_polls']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['g_post_polls']}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class='guest_legend'>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_vote_polls']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['g_vote_polls']}<br />
|
||||
{$guest_legend}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan='2' class='head'><strong>{$this->lang->words['gf_t_avoidance']}</strong></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_avoid_flood']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['g_avoid_flood']}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_avoid_q']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['g_avoid_q']}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th colspan='2' class='head'><strong>{$this->lang->words['gf_t_restrictions']}</strong></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_mod_preview']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
<p>{$form['g_mod_preview']} {$this->lang->words['g_until']} {$form['g_mod_post_unit']} {$form['gbw_mod_post_unit_type']}</p>
|
||||
<p style='color:gray;font-size:0.8em'>{$this->lang->words['g_limit_dd']}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>
|
||||
{$this->lang->words['gf_ppd_limit']}
|
||||
<p style='color:gray;font-size:0.8em'>{$this->lang->words['g_limit_no']}</p>
|
||||
</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
<p>{$this->lang->words['g_max']} {$form['g_ppd_limit']} {$this->lang->words['g_ppd']} {$form['g_ppd_unit']} {$form['gbw_ppd_unit_type']}</p>
|
||||
<p style='color:gray;font-size:0.8em'>{$this->lang->words['g_limit_dd']}</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
EOF;
|
||||
|
||||
return $IPBHTML;
|
||||
}
|
||||
|
||||
/**
|
||||
* Display forum group form tabs
|
||||
*
|
||||
* @param array Group data
|
||||
* @param string Tab id
|
||||
* @return string HTML
|
||||
*/
|
||||
public function acp_group_form_tabs( $group, $tabId ) {
|
||||
|
||||
$IPBHTML = "";
|
||||
|
||||
$IPBHTML .= <<<EOF
|
||||
<li id='tab_GROUPS_{$tabId}'>{$this->lang->words['g_forperm']}</li>
|
||||
EOF;
|
||||
|
||||
return $IPBHTML;
|
||||
}
|
||||
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* Group plugin skin functions
|
||||
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 14th May 2003
|
||||
* @version $Rev: 10914 $
|
||||
*/
|
||||
|
||||
class cp_skin_group_form
|
||||
{
|
||||
/**
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
* @var $registry
|
||||
* @var $DB
|
||||
* @var $settings
|
||||
* @var $request
|
||||
* @var $lang
|
||||
* @var $member
|
||||
* @var $memberData
|
||||
* @var $cache
|
||||
* @var $caches
|
||||
*/
|
||||
protected $registry;
|
||||
protected $DB;
|
||||
protected $settings;
|
||||
protected $request;
|
||||
protected $lang;
|
||||
protected $member;
|
||||
protected $memberData;
|
||||
protected $cache;
|
||||
protected $caches;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param object $registry Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->member = $this->registry->member();
|
||||
$this->memberData =& $this->registry->member()->fetchMemberData();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
$this->lang = $this->registry->class_localization;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show forums group form
|
||||
*
|
||||
* @param array Group data
|
||||
* @param string Tab ID
|
||||
* @return string HTML
|
||||
*/
|
||||
public function acp_group_form_main( $group, $tabId ) {
|
||||
|
||||
$guest_legend = $group['g_id'] == $this->settings['guest_group'] ? $this->lang->words['g_applyguest'] : '';
|
||||
|
||||
$gbw_unit_type = array(
|
||||
0 => array( 0, $this->lang->words['g_dd_apprp'] ),
|
||||
1 => array( 1, $this->lang->words['g_dd_days'] ) );
|
||||
$dd_topic_rate = array(
|
||||
0 => array( 0, $this->lang->words['g_no'] ),
|
||||
1 => array( 1, $this->lang->words['g_yes1'] ),
|
||||
2 => array( 2, $this->lang->words['g_yes2'] )
|
||||
);
|
||||
|
||||
$form = array();
|
||||
$form['g_other_topics'] = $this->registry->output->formYesNo( "g_other_topics", $group['g_other_topics'] );
|
||||
$form['g_post_new_topics'] = $this->registry->output->formYesNo( "g_post_new_topics", $group['g_post_new_topics'] );
|
||||
$form['g_topic_rate_setting'] = $this->registry->output->formDropdown( "g_topic_rate_setting", $dd_topic_rate, $group['g_topic_rate_setting'] );
|
||||
$form['g_reply_own_topics'] = $this->registry->output->formYesNo( "g_reply_own_topics", $group['g_reply_own_topics'] );
|
||||
$form['g_reply_other_topics'] = $this->registry->output->formYesNo( "g_reply_other_topics", $group['g_reply_other_topics'] );
|
||||
$form['g_edit_posts'] = $this->registry->output->formYesNo( "g_edit_posts", $group['g_edit_posts'] );
|
||||
$form['g_edit_cutoff'] = $this->registry->output->formInput( "g_edit_cutoff", $group['g_edit_cutoff'] );
|
||||
$form['g_append_edit'] = $this->registry->output->formYesNo( "g_append_edit", $group['g_append_edit'] );
|
||||
$form['g_delete_own_posts'] = $this->registry->output->formYesNo( "g_delete_own_posts", $group['g_delete_own_posts'] );
|
||||
$form['g_open_close_posts'] = $this->registry->output->formYesNo( "g_open_close_posts", $group['g_open_close_posts'] );
|
||||
$form['g_edit_topic'] = $this->registry->output->formYesNo( "g_edit_topic", $group['g_edit_topic'] );
|
||||
$form['g_delete_own_topics'] = $this->registry->output->formYesNo( "g_delete_own_topics", $group['g_delete_own_topics'] );
|
||||
$form['g_post_polls'] = $this->registry->output->formYesNo( "g_post_polls", $group['g_post_polls'] );
|
||||
$form['g_vote_polls'] = $this->registry->output->formYesNo( "g_vote_polls", $group['g_vote_polls'] );
|
||||
$form['g_avoid_flood'] = $this->registry->output->formYesNo( "g_avoid_flood", $group['g_avoid_flood'] );
|
||||
$form['g_avoid_q'] = $this->registry->output->formYesNo( "g_avoid_q", $group['g_avoid_q'] );
|
||||
$form['g_post_closed'] = $this->registry->output->formYesNo( "g_post_closed", $group['g_post_closed'] );
|
||||
$form['g_mod_preview'] = $this->registry->output->formYesNo( "g_mod_preview", $group['g_mod_preview'] );
|
||||
$form['g_mod_post_unit'] = $this->registry->output->formSimpleInput( "g_mod_post_unit", $group['g_mod_post_unit'], 3 );
|
||||
$form['gbw_mod_post_unit_type'] = $this->registry->output->formDropdown( "gbw_mod_post_unit_type", $gbw_unit_type, $group['gbw_mod_post_unit_type'] );
|
||||
$form['g_ppd_limit'] = $this->registry->output->formSimpleInput( "g_ppd_limit", $group['g_ppd_limit'], 3 );
|
||||
$form['g_ppd_unit'] = $this->registry->output->formSimpleInput( "g_ppd_unit", $group['g_ppd_unit'], 3 );
|
||||
$form['gbw_ppd_unit_type'] = $this->registry->output->formDropdown( "gbw_ppd_unit_type", $gbw_unit_type, $group['gbw_ppd_unit_type'] );
|
||||
|
||||
$form['gbw_soft_delete'] = $this->registry->output->formYesNo( "gbw_soft_delete", $group['gbw_soft_delete'] );
|
||||
$form['gbw_soft_delete_own'] = $this->registry->output->formYesNo( "gbw_soft_delete_own", $group['gbw_soft_delete_own'] );
|
||||
$form['gbw_soft_delete_own_topic'] = $this->registry->output->formYesNo( "gbw_soft_delete_own_topic", $group['gbw_soft_delete_own_topic'] );
|
||||
$form['gbw_un_soft_delete'] = $this->registry->output->formYesNo( "gbw_un_soft_delete", $group['gbw_un_soft_delete'] );
|
||||
$form['gbw_soft_delete_see'] = $this->registry->output->formYesNo( "gbw_soft_delete_see", $group['gbw_soft_delete_see'] );
|
||||
$form['gbw_soft_delete_topic'] = $this->registry->output->formYesNo( "gbw_soft_delete_topic", $group['gbw_soft_delete_topic'] );
|
||||
$form['gbw_un_soft_delete_topic'] = $this->registry->output->formYesNo( "gbw_un_soft_delete_topic", $group['gbw_un_soft_delete_topic'] );
|
||||
$form['gbw_soft_delete_topic_see'] = $this->registry->output->formYesNo( "gbw_soft_delete_topic_see", $group['gbw_soft_delete_topic_see'] );
|
||||
$form['gbw_soft_delete_reason'] = $this->registry->output->formYesNo( "gbw_soft_delete_reason", $group['gbw_soft_delete_reason'] );
|
||||
$form['gbw_soft_delete_see_post'] = $this->registry->output->formYesNo( "gbw_soft_delete_see_post", $group['gbw_soft_delete_see_post'] );
|
||||
$form['gbw_view_online_lists'] = $this->registry->output->formYesNo( "gbw_view_online_lists", $group['gbw_view_online_lists'] );
|
||||
|
||||
/* Follow the. . . */
|
||||
$modCount = $this->DB->buildAndFetch( array( 'select' => 'count(*) as cnt',
|
||||
'from' => 'moderators',
|
||||
'where' => 'group_id=' . $group['g_id'] ) );
|
||||
|
||||
$IPBHTML = "";
|
||||
|
||||
$IPBHTML .= <<<EOF
|
||||
<div id='tab_GROUPS_{$tabId}_content'>
|
||||
<div>
|
||||
<table class='ipsTable'>
|
||||
<tr>
|
||||
<th colspan='2' class='head'><strong>{$this->lang->words['gf_t_rating']}</strong></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_topic_rate_setting']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['g_topic_rate_setting']}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan='2' class='head'><strong>{$this->lang->words['gf_t_viewing']}</strong></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_other_topics']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['g_other_topics']}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gbw_view_online_lists']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['gbw_view_online_lists']}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan='2' class='head'><strong>{$this->lang->words['gf_t_posting']}</strong></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_post_new_topics']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['g_post_new_topics']}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_reply_own_topics']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['g_reply_own_topics']}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_reply_other_topics']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['g_reply_other_topics']}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan='2' class='head'><strong>{$this->lang->words['gf_t_editing']}</strong></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_edit_posts']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['g_edit_posts']}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_edit_cutoff']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['g_edit_cutoff']}
|
||||
<div class='desctext'>{$this->lang->words['gf_edit_cuttoff_info']}</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_append_edit']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['g_append_edit']}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_edit_topic']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['g_edit_topic']}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan='2' class='head'><strong>{$this->lang->words['gf_t_deleting']}</strong></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_delete_own_posts']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['g_delete_own_posts']}
|
||||
<p class='desctext'>{$this->lang->words['hard_delete_info']}</p>
|
||||
<span class='desctext'><strong>{$this->lang->words['sup_mod_already']}</strong></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_delete_own_topics']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['g_delete_own_topics']}
|
||||
<p class='desctext'>{$this->lang->words['hard_delete_info']}</p>
|
||||
<span class='desctext'><strong>{$this->lang->words['sup_mod_already']}</strong></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_bw_soft_delete_own']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['gbw_soft_delete_own']}
|
||||
<p class='desctext'>{$this->lang->words['soft_delete_info']}</p>
|
||||
<span class='desctext'><strong>{$this->lang->words['sup_mod_already']}</strong></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th colspan='2' class='head'><strong>{$this->lang->words['gf_t_openclose']}</strong></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['g_open_close_posts']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['g_open_close_posts']}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_post_closed']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['g_post_closed']}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan='2' class='head'><strong>{$this->lang->words['gf_t_polling']}</strong></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_post_polls']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['g_post_polls']}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class='guest_legend'>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_vote_polls']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['g_vote_polls']}<br />
|
||||
{$guest_legend}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan='2' class='head'><strong>{$this->lang->words['gf_t_avoidance']}</strong></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_avoid_flood']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['g_avoid_flood']}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_avoid_q']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['g_avoid_q']}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th colspan='2' class='head'><strong>{$this->lang->words['gf_t_restrictions']}</strong></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_mod_preview']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
<p>{$form['g_mod_preview']}<span class='guest_legend'> {$this->lang->words['g_until']} {$form['g_mod_post_unit']} {$form['gbw_mod_post_unit_type']}</span></p>
|
||||
<p class='guest_legend' style='color:gray;font-size:0.8em'>{$this->lang->words['g_limit_dd']}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class='guest_legend'>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>
|
||||
{$this->lang->words['gf_ppd_limit']}
|
||||
<p style='color:gray;font-size:0.8em'>{$this->lang->words['g_limit_no']}</p>
|
||||
</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
<p>{$this->lang->words['g_max']} {$form['g_ppd_limit']} {$this->lang->words['g_ppd']} {$form['g_ppd_unit']} {$form['gbw_ppd_unit_type']}</p>
|
||||
<p style='color:gray;font-size:0.8em'>{$this->lang->words['g_limit_dd']}</p>
|
||||
</td>
|
||||
</tr>
|
||||
EOF;
|
||||
|
||||
if ( $modCount['cnt'] )
|
||||
{
|
||||
$form['gbw_hide_leaders_page'] = $this->registry->output->formYesNo( "gbw_hide_leaders_page", $group['gbw_hide_leaders_page'] );
|
||||
|
||||
$IPBHTML .= <<<EOF
|
||||
<tr>
|
||||
<th colspan='2' class='head'><strong>{$this->lang->words['gf_mod_title']}</strong></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['gf_mod_remove']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
<p>{$form['gbw_hide_leaders_page']}</p>
|
||||
<p style='color:gray;font-size:0.8em'>{$this->lang->words['gf_mod_remove_desc']}</p>
|
||||
</td>
|
||||
</tr>
|
||||
EOF;
|
||||
}
|
||||
else
|
||||
{
|
||||
$IPBHTML .= <<<EOF
|
||||
<input type='hidden' name='gbw_hide_leaders_page' value='{$group['gbw_hide_leaders_page']}' />
|
||||
EOF;
|
||||
}
|
||||
|
||||
$IPBHTML .= <<<EOF
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
EOF;
|
||||
|
||||
return $IPBHTML;
|
||||
}
|
||||
|
||||
/**
|
||||
* Display forum group form tabs
|
||||
*
|
||||
* @param array Group data
|
||||
* @param string Tab id
|
||||
* @return string HTML
|
||||
*/
|
||||
public function acp_group_form_tabs( $group, $tabId ) {
|
||||
|
||||
$IPBHTML = "";
|
||||
|
||||
$IPBHTML .= <<<EOF
|
||||
<li id='tab_GROUPS_{$tabId}'>{$this->lang->words['g_forperm']}</li>
|
||||
EOF;
|
||||
|
||||
return $IPBHTML;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,267 +1,267 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* Forum member form plugin
|
||||
* Last Updated: $LastChangedDate: 2011-09-01 08:16:37 -0400 (Thu, 01 Sep 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://hatynka.in
|
||||
* @since 14th May 2003
|
||||
* @version $Rev: 9439 $
|
||||
*/
|
||||
|
||||
class cp_skin_member_form
|
||||
{
|
||||
/**
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
* @var $registry
|
||||
* @var $DB
|
||||
* @var $settings
|
||||
* @var $request
|
||||
* @var $lang
|
||||
* @var $member
|
||||
* @var $memberData
|
||||
* @var $cache
|
||||
* @var $caches
|
||||
*/
|
||||
protected $registry;
|
||||
protected $DB;
|
||||
protected $settings;
|
||||
protected $request;
|
||||
protected $lang;
|
||||
protected $member;
|
||||
protected $memberData;
|
||||
protected $cache;
|
||||
protected $caches;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param object $registry Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->member = $this->registry->member();
|
||||
$this->memberData =& $this->registry->member()->fetchMemberData();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
$this->lang = $this->registry->class_localization;
|
||||
}
|
||||
|
||||
/**
|
||||
* Main ACP member form
|
||||
*
|
||||
* @param array Member data
|
||||
* @return string HTML
|
||||
*/
|
||||
public function acp_member_form_main( $member, $tabID ) {
|
||||
|
||||
$masks = array();
|
||||
|
||||
ipsRegistry::DB()->build( array( 'select' => '*', 'from' => 'forum_perms', 'order' => 'perm_name' ) );
|
||||
ipsRegistry::DB()->execute();
|
||||
|
||||
while( $data = ipsRegistry::DB()->fetch() )
|
||||
{
|
||||
$masks[] = array( $data['perm_id'], $data['perm_name'] );
|
||||
}
|
||||
|
||||
$_restrict_tick = '';
|
||||
$_restrict_timespan = '';
|
||||
$_restrict_units = '';
|
||||
$units = array( 0 => array( 'h', $this->lang->words['m_hours'] ), 1 => array( 'd', $this->lang->words['m_days'] ) );
|
||||
|
||||
if ( $member['restrict_post'] == 1 )
|
||||
{
|
||||
$_restrict_tick = 'checked="checked"';
|
||||
}
|
||||
elseif ($member['restrict_post'] > 0)
|
||||
{
|
||||
$rest_arr = IPSMember::processBanEntry( $member['restrict_post'] );
|
||||
|
||||
$hours = ceil( ( $rest_arr['date_end'] - time() ) / 3600 );
|
||||
|
||||
if( $hours < 0 )
|
||||
{
|
||||
$rest_arr['units'] = '';
|
||||
$rest_arr['timespan'] = '';
|
||||
}
|
||||
else if ( $hours > 24 and ( ($hours / 24) == ceil($hours / 24) ) )
|
||||
{
|
||||
$rest_arr['units'] = 'd';
|
||||
$rest_arr['timespan'] = $hours / 24;
|
||||
}
|
||||
else
|
||||
{
|
||||
$rest_arr['units'] = 'h';
|
||||
$rest_arr['timespan'] = $hours;
|
||||
}
|
||||
}
|
||||
|
||||
$_restrict_timespan = ipsRegistry::getClass('output')->formSimpleInput('post_timespan', $rest_arr['timespan'] );
|
||||
$_restrict_units = ipsRegistry::getClass('output')->formDropdown('post_units', $units, $rest_arr['units'] );
|
||||
|
||||
$_mod_tick = '';
|
||||
$_mod_timespan = '';
|
||||
$_mod_units = '';
|
||||
|
||||
if ( $member['mod_posts'] == 1 )
|
||||
{
|
||||
$_mod_tick = 'checked="checked"';
|
||||
}
|
||||
elseif ($member['mod_posts'] > 0)
|
||||
{
|
||||
$mod_arr = IPSMember::processBanEntry( $member['mod_posts'] );
|
||||
|
||||
$hours = ceil( ( $mod_arr['date_end'] - time() ) / 3600 );
|
||||
|
||||
if( $hours < 0 )
|
||||
{
|
||||
$mod_arr['units'] = '';
|
||||
$mod_arr['timespan'] = '';
|
||||
}
|
||||
else if ( $hours > 24 and ( ($hours / 24) == ceil($hours / 24) ) )
|
||||
{
|
||||
$mod_arr['units'] = 'd';
|
||||
$mod_arr['timespan'] = $hours / 24;
|
||||
}
|
||||
else
|
||||
{
|
||||
$mod_arr['units'] = 'h';
|
||||
$mod_arr['timespan'] = $hours;
|
||||
}
|
||||
}
|
||||
|
||||
$_mod_timespan = ipsRegistry::getClass('output')->formSimpleInput('mod_timespan', $mod_arr['timespan'] );
|
||||
$_mod_units = ipsRegistry::getClass('output')->formDropdown('mod_units', $units, $mod_arr['units'] );
|
||||
|
||||
$form_override_masks = ipsRegistry::getClass('output')->formMultiDropdown( "org_perm_id[]", $masks, explode( ",", $member['org_perm_id'] ), 8, 'org_perm_id' );
|
||||
$form_posts = ipsRegistry::getClass('output')->formInput( "posts", $member['posts'] );
|
||||
|
||||
$IPBHTML = "";
|
||||
|
||||
$IPBHTML .= <<<EOF
|
||||
|
||||
<div id='tab_MEMBERS_{$tabID}_content'>
|
||||
<table class='ipsTable double_pad'>
|
||||
|
||||
<tr>
|
||||
<th colspan='2'>{$this->lang->words['sm_settings']}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'><strong class='title'>{$this->lang->words['mem_posts']}</strong></td>
|
||||
<td class='field_field'>
|
||||
<span id='MF__posts'>{$form_posts}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class='ipsTable double_pad'>
|
||||
<tr>
|
||||
<th colspan='2'>{$this->lang->words['sm_access']}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'><strong class='title'>{$this->lang->words['m_overrride']}</strong></td>
|
||||
<td class='field_field'>
|
||||
<span id='MF__ogpm'>{$form_override_masks}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'><strong class='title'>{$this->lang->words['m_modprev']}</strong></td>
|
||||
<td class='field_field'>
|
||||
<input type='checkbox' name='mod_indef' id='mod_indef' value='1' {$_mod_tick}> {$this->lang->words['m_modindef']}
|
||||
<br />
|
||||
{$this->lang->words['m_orfor']}
|
||||
{$_mod_timespan} {$_mod_units}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'><strong class='title'>{$this->lang->words['m_restrict']}</strong></td>
|
||||
<td class='field_field'>
|
||||
<input type='checkbox' name='post_indef' id='post_indef' value='1' {$_restrict_tick}> {$this->lang->words['m_restrictindef']}
|
||||
<br />
|
||||
{$this->lang->words['m_orfor']}
|
||||
{$_restrict_timespan} {$_restrict_units}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
EOF;
|
||||
|
||||
return $IPBHTML;
|
||||
}
|
||||
|
||||
/**
|
||||
* Forums member tabs
|
||||
*
|
||||
* @param array Member data
|
||||
* @return string HTML
|
||||
*/
|
||||
public function acp_member_form_tabs( $member, $tabID ) {
|
||||
|
||||
$IPBHTML = "";
|
||||
|
||||
$IPBHTML .= <<<EOF
|
||||
<li id='tab_MEMBERS_{$tabID}'>{$this->lang->words['m_details']}</li>
|
||||
EOF;
|
||||
|
||||
return $IPBHTML;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete posts confirmation page
|
||||
*
|
||||
* @param array Member data
|
||||
* @param integer Number of topics
|
||||
* @param integer Number of posts
|
||||
* @return string HTML
|
||||
*/
|
||||
public function deletePostsStart( $member, $topics, $posts ) {
|
||||
|
||||
$IPBHTML = "";
|
||||
//--starthtml--//
|
||||
|
||||
$IPBHTML .= <<<EOF
|
||||
<form action='{$this->settings['base_url']}&{$this->form_code}&do=deleteposts_process&member_id={$member['member_id']}' method='POST'>
|
||||
<input type='hidden' name='_admin_auth_key' value='{$this->registry->getClass('adminFunctions')->_admin_auth_key}' />
|
||||
<div class='acp-box'>
|
||||
<h3>{$this->lang->words['mem_delete_posts_title']} {$member['members_display_name']}</h3>
|
||||
<table class='ipsTable'>
|
||||
<tr>
|
||||
<td class='field_title'><strong class='title'>{$this->lang->words['mem_delete_delete_posts']}</strong></td>
|
||||
<td class='field_field'><input type='checkbox' value='1' name='dposts' class='input_text' /><br /><span class='desctext'>{$this->lang->words['mem_delete_delete_posts_desc']}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'><strong class='title'>{$this->lang->words['mem_delete_delete_topics']}</strong></td>
|
||||
<td class='field_field'><input type='checkbox' value='1' name='dtopics' class='input_text' /><br /><span class='desctext'>{$this->lang->words['mem_delete_delete_topics_desc']}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'><strong class='title'>{$this->lang->words['mem_delete_delete_pergo']}</strong></td>
|
||||
<td class='field_field'><input type='input' value='50' size='3' name='dpergo' class='input_text' /><br /><span class='desctext'>{$this->lang->words['mem_delete_delete_pergo_desc']}</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class='acp-actionbar'><input type='submit' class='button primary' value='{$this->lang->words['mem_delete_process']}' /></div>
|
||||
</div>
|
||||
</form>
|
||||
EOF;
|
||||
|
||||
//--endhtml--//
|
||||
return $IPBHTML;
|
||||
}
|
||||
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* Forum member form plugin
|
||||
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 14th May 2003
|
||||
* @version $Rev: 10914 $
|
||||
*/
|
||||
|
||||
class cp_skin_member_form
|
||||
{
|
||||
/**
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
* @var $registry
|
||||
* @var $DB
|
||||
* @var $settings
|
||||
* @var $request
|
||||
* @var $lang
|
||||
* @var $member
|
||||
* @var $memberData
|
||||
* @var $cache
|
||||
* @var $caches
|
||||
*/
|
||||
protected $registry;
|
||||
protected $DB;
|
||||
protected $settings;
|
||||
protected $request;
|
||||
protected $lang;
|
||||
protected $member;
|
||||
protected $memberData;
|
||||
protected $cache;
|
||||
protected $caches;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param object $registry Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->member = $this->registry->member();
|
||||
$this->memberData =& $this->registry->member()->fetchMemberData();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
$this->lang = $this->registry->class_localization;
|
||||
}
|
||||
|
||||
/**
|
||||
* Main ACP member form
|
||||
*
|
||||
* @param array Member data
|
||||
* @return string HTML
|
||||
*/
|
||||
public function acp_member_form_main( $member, $tabID ) {
|
||||
|
||||
$masks = array();
|
||||
|
||||
ipsRegistry::DB()->build( array( 'select' => '*', 'from' => 'forum_perms', 'order' => 'perm_name' ) );
|
||||
ipsRegistry::DB()->execute();
|
||||
|
||||
while( $data = ipsRegistry::DB()->fetch() )
|
||||
{
|
||||
$masks[] = array( $data['perm_id'], $data['perm_name'] );
|
||||
}
|
||||
|
||||
$_restrict_tick = '';
|
||||
$_restrict_timespan = '';
|
||||
$_restrict_units = '';
|
||||
$units = array( 0 => array( 'h', $this->lang->words['m_hours'] ), 1 => array( 'd', $this->lang->words['m_days'] ) );
|
||||
|
||||
if ( $member['restrict_post'] == 1 )
|
||||
{
|
||||
$_restrict_tick = 'checked="checked"';
|
||||
}
|
||||
elseif ($member['restrict_post'] > 0)
|
||||
{
|
||||
$rest_arr = IPSMember::processBanEntry( $member['restrict_post'] );
|
||||
|
||||
$hours = ceil( ( $rest_arr['date_end'] - time() ) / 3600 );
|
||||
|
||||
if( $hours < 0 )
|
||||
{
|
||||
$rest_arr['units'] = '';
|
||||
$rest_arr['timespan'] = '';
|
||||
}
|
||||
else if ( $hours > 24 and ( ($hours / 24) == ceil($hours / 24) ) )
|
||||
{
|
||||
$rest_arr['units'] = 'd';
|
||||
$rest_arr['timespan'] = $hours / 24;
|
||||
}
|
||||
else
|
||||
{
|
||||
$rest_arr['units'] = 'h';
|
||||
$rest_arr['timespan'] = $hours;
|
||||
}
|
||||
}
|
||||
|
||||
$_restrict_timespan = ipsRegistry::getClass('output')->formSimpleInput('post_timespan', $rest_arr['timespan'] );
|
||||
$_restrict_units = ipsRegistry::getClass('output')->formDropdown('post_units', $units, $rest_arr['units'] );
|
||||
|
||||
$_mod_tick = '';
|
||||
$_mod_timespan = '';
|
||||
$_mod_units = '';
|
||||
|
||||
if ( $member['mod_posts'] == 1 )
|
||||
{
|
||||
$_mod_tick = 'checked="checked"';
|
||||
}
|
||||
elseif ($member['mod_posts'] > 0)
|
||||
{
|
||||
$mod_arr = IPSMember::processBanEntry( $member['mod_posts'] );
|
||||
|
||||
$hours = ceil( ( $mod_arr['date_end'] - time() ) / 3600 );
|
||||
|
||||
if( $hours < 0 )
|
||||
{
|
||||
$mod_arr['units'] = '';
|
||||
$mod_arr['timespan'] = '';
|
||||
}
|
||||
else if ( $hours > 24 and ( ($hours / 24) == ceil($hours / 24) ) )
|
||||
{
|
||||
$mod_arr['units'] = 'd';
|
||||
$mod_arr['timespan'] = $hours / 24;
|
||||
}
|
||||
else
|
||||
{
|
||||
$mod_arr['units'] = 'h';
|
||||
$mod_arr['timespan'] = $hours;
|
||||
}
|
||||
}
|
||||
|
||||
$_mod_timespan = ipsRegistry::getClass('output')->formSimpleInput('mod_timespan', $mod_arr['timespan'] );
|
||||
$_mod_units = ipsRegistry::getClass('output')->formDropdown('mod_units', $units, $mod_arr['units'] );
|
||||
|
||||
$form_override_masks = ipsRegistry::getClass('output')->formMultiDropdown( "org_perm_id[]", $masks, explode( ",", $member['org_perm_id'] ), 8, 'org_perm_id' );
|
||||
$form_posts = ipsRegistry::getClass('output')->formInput( "posts", $member['posts'] );
|
||||
|
||||
$IPBHTML = "";
|
||||
|
||||
$IPBHTML .= <<<EOF
|
||||
|
||||
<div id='tab_MEMBERS_{$tabID}_content'>
|
||||
<table class='ipsTable double_pad'>
|
||||
|
||||
<tr>
|
||||
<th colspan='2'>{$this->lang->words['sm_settings']}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'><strong class='title'>{$this->lang->words['mem_posts']}</strong></td>
|
||||
<td class='field_field'>
|
||||
<span id='MF__posts'>{$form_posts}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class='ipsTable double_pad'>
|
||||
<tr>
|
||||
<th colspan='2'>{$this->lang->words['sm_access']}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'><strong class='title'>{$this->lang->words['m_overrride']}</strong></td>
|
||||
<td class='field_field'>
|
||||
<span id='MF__ogpm'>{$form_override_masks}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'><strong class='title'>{$this->lang->words['m_modprev']}</strong></td>
|
||||
<td class='field_field'>
|
||||
<input type='checkbox' name='mod_indef' id='mod_indef' value='1' {$_mod_tick}> {$this->lang->words['m_modindef']}
|
||||
<br />
|
||||
{$this->lang->words['m_orfor']}
|
||||
{$_mod_timespan} {$_mod_units}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'><strong class='title'>{$this->lang->words['m_restrict']}</strong></td>
|
||||
<td class='field_field'>
|
||||
<input type='checkbox' name='post_indef' id='post_indef' value='1' {$_restrict_tick}> {$this->lang->words['m_restrictindef']}
|
||||
<br />
|
||||
{$this->lang->words['m_orfor']}
|
||||
{$_restrict_timespan} {$_restrict_units}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
EOF;
|
||||
|
||||
return $IPBHTML;
|
||||
}
|
||||
|
||||
/**
|
||||
* Forums member tabs
|
||||
*
|
||||
* @param array Member data
|
||||
* @return string HTML
|
||||
*/
|
||||
public function acp_member_form_tabs( $member, $tabID ) {
|
||||
|
||||
$IPBHTML = "";
|
||||
|
||||
$IPBHTML .= <<<EOF
|
||||
<li id='tab_MEMBERS_{$tabID}'>{$this->lang->words['m_details']}</li>
|
||||
EOF;
|
||||
|
||||
return $IPBHTML;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete posts confirmation page
|
||||
*
|
||||
* @param array Member data
|
||||
* @param integer Number of topics
|
||||
* @param integer Number of posts
|
||||
* @return string HTML
|
||||
*/
|
||||
public function deletePostsStart( $member, $topics, $posts ) {
|
||||
|
||||
$IPBHTML = "";
|
||||
//--starthtml--//
|
||||
|
||||
$IPBHTML .= <<<EOF
|
||||
<form action='{$this->settings['base_url']}&{$this->form_code}&do=deleteposts_process&member_id={$member['member_id']}&name={$member['name']}' method='POST'>
|
||||
<input type='hidden' name='_admin_auth_key' value='{$this->registry->getClass('adminFunctions')->_admin_auth_key}' />
|
||||
<div class='acp-box'>
|
||||
<h3>{$this->lang->words['mem_delete_posts_title']} {$member['members_display_name']}</h3>
|
||||
<table class='ipsTable'>
|
||||
<tr>
|
||||
<td class='field_title'><strong class='title'>{$this->lang->words['mem_delete_delete_posts']}</strong></td>
|
||||
<td class='field_field'><input type='checkbox' value='1' name='dposts' class='input_text' /><br /><span class='desctext'>{$this->lang->words['mem_delete_delete_posts_desc']}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'><strong class='title'>{$this->lang->words['mem_delete_delete_topics']}</strong></td>
|
||||
<td class='field_field'><input type='checkbox' value='1' name='dtopics' class='input_text' /><br /><span class='desctext'>{$this->lang->words['mem_delete_delete_topics_desc']}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'><strong class='title'>{$this->lang->words['mem_delete_delete_pergo']}</strong></td>
|
||||
<td class='field_field'><input type='input' value='50' size='3' name='dpergo' class='input_text' /><br /><span class='desctext'>{$this->lang->words['mem_delete_delete_pergo_desc']}</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class='acp-actionbar'><input type='submit' class='button primary' value='{$this->lang->words['mem_delete_process']}' /></div>
|
||||
</div>
|
||||
</form>
|
||||
EOF;
|
||||
|
||||
//--endhtml--//
|
||||
return $IPBHTML;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,290 +1,278 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* Multimods skin functions
|
||||
* Last Updated: $LastChangedDate: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://hatynka.in
|
||||
* @since 14th May 2003
|
||||
* @version $Rev: 8644 $
|
||||
*/
|
||||
|
||||
class cp_skin_multimods
|
||||
{
|
||||
/**
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
* @var $registry
|
||||
* @var $DB
|
||||
* @var $settings
|
||||
* @var $request
|
||||
* @var $lang
|
||||
* @var $member
|
||||
* @var $memberData
|
||||
* @var $cache
|
||||
* @var $caches
|
||||
*/
|
||||
protected $registry;
|
||||
protected $DB;
|
||||
protected $settings;
|
||||
protected $request;
|
||||
protected $lang;
|
||||
protected $member;
|
||||
protected $memberData;
|
||||
protected $cache;
|
||||
protected $caches;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param object $registry Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->member = $this->registry->member();
|
||||
$this->memberData =& $this->registry->member()->fetchMemberData();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
$this->lang = $this->registry->class_localization;
|
||||
}
|
||||
|
||||
/**
|
||||
* Form to add/edit multimods
|
||||
*
|
||||
* @param integer MM ID
|
||||
* @param string Action
|
||||
* @param string Description
|
||||
* @param array Form fields
|
||||
* @param string Button text
|
||||
* @return string HTML
|
||||
*/
|
||||
public function multiModerationForm( $id, $do, $description, $form, $button ) {
|
||||
|
||||
$IPBHTML = "";
|
||||
//--starthtml--//
|
||||
|
||||
$IPBHTML .= <<<HTML
|
||||
<div class='section_title'>
|
||||
<h2>{$this->lang->words['mm_title']}</h2>
|
||||
</div>
|
||||
|
||||
<form action='{$this->settings['base_url']}{$this->form_code}' method='post' name='theAdminForm' id='theAdminForm'>
|
||||
<input type='hidden' name='id' value='{$id}' />
|
||||
<input type='hidden' name='do' value='{$do}' />
|
||||
<input type='hidden' name='_admin_auth_key' value='{$this->registry->adminFunctions->_admin_auth_key}' />
|
||||
|
||||
<div class='acp-box'>
|
||||
<h3>{$this->lang->words['mm_title']}</h3>
|
||||
|
||||
<table class="ipsTable double_pad">
|
||||
<tr>
|
||||
<th colspan='2'>{$description}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['mm_titlefor']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['mm_title']}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['mm_activein']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['forums']}<br />
|
||||
<span class='desctext'>{$this->lang->words['mm_activein_desc']}</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th colspan='2'>{$this->lang->words['mm_modoptions']}</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['mm_start']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['topic_title_st']}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['mm_end']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['topic_title_end']}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['mm_state']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['topic_state']}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['mm_pinned']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['topic_pin']}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['mm_approved']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['topic_approve']}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['mm_move']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['topic_move']}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['mm_link']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['topic_move_link']}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th colspan='2'>{$this->lang->words['mm_postoptions']}</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['mm_addreply']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['topic_reply']}<br /><br />
|
||||
{$form['topic_reply_content']}<br />
|
||||
<span class='desctext'>{$this->lang->words['mm_addreply_desc']}</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['mm_postcount']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['topic_reply_postcount']}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class='acp-actionbar'>
|
||||
<input type='submit' value='{$button}' class='button primary' accesskey='s'>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
HTML;
|
||||
|
||||
//--endhtml--//
|
||||
return $IPBHTML;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show multimod overview page
|
||||
*
|
||||
* @param array MM Rows
|
||||
* @return string HTML
|
||||
*/
|
||||
public function multiModerationOverview( $rows ) {
|
||||
|
||||
$IPBHTML = "";
|
||||
//--starthtml--//
|
||||
|
||||
$IPBHTML .= <<<HTML
|
||||
<div class='section_title'>
|
||||
<h2>{$this->lang->words['mm_title']}</h2>
|
||||
<ul class='context_menu'>
|
||||
<li>
|
||||
<a href='{$this->settings['base_url']}{$this->form_code}do=new' title='{$this->lang->words['mm_addnew']}'>
|
||||
<img src='{$this->settings['skin_acp_url']}/images/icons/lightning_add.png' alt='' />
|
||||
{$this->lang->words['mm_addnew']}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class='acp-box'>
|
||||
<h3>{$this->lang->words['mm_current']}</h3>
|
||||
|
||||
<table class='ipsTable'>
|
||||
<tr>
|
||||
<th>{$this->lang->words['mm_wordtitle']}</th>
|
||||
<th class='col_buttons'> </th>
|
||||
</tr>
|
||||
HTML;
|
||||
|
||||
if( ! count( $rows ) )
|
||||
{
|
||||
$IPBHTML .= <<<HTML
|
||||
<tr>
|
||||
<td colspan='3' class='no_messages'>
|
||||
{$this->lang->words['mm_none']} <a href='{$this->settings['base_url']}{$this->form_code}do=new' title='{$this->lang->words['mm_addnew']}' class='mini_button'>{$this->lang->words['mm_createnow']}</a>
|
||||
</td>
|
||||
</tr>
|
||||
HTML;
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach( $rows as $r )
|
||||
{
|
||||
$IPBHTML .= <<<HTML
|
||||
<tr class='ipsControlRow'>
|
||||
<td><strong>{$r['mm_title']}</strong></td>
|
||||
<td>
|
||||
<ul id='menu{$r['mm_id']}_menucontent' class='ipsControlStrip'>
|
||||
<li class='i_edit'><a href='{$this->settings['base_url']}{$this->form_code}do=edit&id={$r['mm_id']}' title='{$this->lang->words['mm_wordedit']}'>{$this->lang->words['mm_wordedit']}</a></li>
|
||||
<li class='i_delete'><a href='#' onclick='return acp.confirmDelete("{$this->settings['base_url']}{$this->form_code}do=delete&id={$r['mm_id']}");' title='{$this->lang->words['mm_remove']}'>{$this->lang->words['mm_remove']}</a></li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
HTML;
|
||||
}
|
||||
}
|
||||
|
||||
$IPBHTML .= <<<HTML
|
||||
</table>
|
||||
</div>
|
||||
HTML;
|
||||
|
||||
//--endhtml--//
|
||||
return $IPBHTML;
|
||||
}
|
||||
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* Multimods skin functions
|
||||
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 14th May 2003
|
||||
* @version $Rev: 10914 $
|
||||
*/
|
||||
|
||||
class cp_skin_multimods
|
||||
{
|
||||
/**
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
* @var $registry
|
||||
* @var $DB
|
||||
* @var $settings
|
||||
* @var $request
|
||||
* @var $lang
|
||||
* @var $member
|
||||
* @var $memberData
|
||||
* @var $cache
|
||||
* @var $caches
|
||||
*/
|
||||
protected $registry;
|
||||
protected $DB;
|
||||
protected $settings;
|
||||
protected $request;
|
||||
protected $lang;
|
||||
protected $member;
|
||||
protected $memberData;
|
||||
protected $cache;
|
||||
protected $caches;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param object $registry Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->member = $this->registry->member();
|
||||
$this->memberData =& $this->registry->member()->fetchMemberData();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
$this->lang = $this->registry->class_localization;
|
||||
}
|
||||
|
||||
/**
|
||||
* Form to add/edit multimods
|
||||
*
|
||||
* @param integer MM ID
|
||||
* @param string Action
|
||||
* @param string Description
|
||||
* @param array Form fields
|
||||
* @param string Button text
|
||||
* @return string HTML
|
||||
*/
|
||||
public function multiModerationForm( $id, $do, $description, $form, $button ) {
|
||||
|
||||
$IPBHTML = "";
|
||||
//--starthtml--//
|
||||
|
||||
$IPBHTML .= <<<HTML
|
||||
<div class='section_title'>
|
||||
<h2>{$this->lang->words['mm_title']}</h2>
|
||||
</div>
|
||||
|
||||
<form action='{$this->settings['base_url']}{$this->form_code}' method='post'>
|
||||
<input type='hidden' name='id' value='{$id}' />
|
||||
<input type='hidden' name='do' value='{$do}' />
|
||||
<input type='hidden' name='_admin_auth_key' value='{$this->registry->adminFunctions->_admin_auth_key}' />
|
||||
|
||||
<div class='acp-box'>
|
||||
<h3>{$this->lang->words['mm_title']}</h3>
|
||||
<table class="ipsTable double_pad">
|
||||
<tr>
|
||||
<th colspan='2'>{$description}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['mm_titlefor']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['mm_title']}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['mm_activein']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['forums']}<br />
|
||||
<span class='desctext'>{$this->lang->words['mm_activein_desc']}</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th colspan='2'>{$this->lang->words['mm_modoptions']}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['mm_start']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['topic_title_st']}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['mm_end']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['topic_title_end']}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['mm_state']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['topic_state']}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['mm_pinned']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['topic_pin']}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['mm_approved']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['topic_approve']}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['mm_move']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['topic_move']}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['mm_link']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['topic_move_link']}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th colspan='2'>{$this->lang->words['mm_postoptions']}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['mm_addreply']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['topic_reply']}<br /><br />
|
||||
{$form['topic_reply_content']}<br />
|
||||
<span class='desctext'>{$this->lang->words['mm_addreply_desc']}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='field_title'>
|
||||
<strong class='title'>{$this->lang->words['mm_postcount']}</strong>
|
||||
</td>
|
||||
<td class='field_field'>
|
||||
{$form['topic_reply_postcount']}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class='acp-actionbar'>
|
||||
<input type='submit' value='{$button}' class='button primary' accesskey='s'>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
HTML;
|
||||
|
||||
//--endhtml--//
|
||||
return $IPBHTML;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show multimod overview page
|
||||
*
|
||||
* @param array MM Rows
|
||||
* @return string HTML
|
||||
*/
|
||||
public function multiModerationOverview( $rows ) {
|
||||
|
||||
$IPBHTML = "";
|
||||
//--starthtml--//
|
||||
|
||||
$IPBHTML .= <<<HTML
|
||||
<div class='section_title'>
|
||||
<h2>{$this->lang->words['mm_title']}</h2>
|
||||
<ul class='context_menu'>
|
||||
<li>
|
||||
<a href='{$this->settings['base_url']}{$this->form_code}do=new' title='{$this->lang->words['mm_addnew']}'>
|
||||
<img src='{$this->settings['skin_acp_url']}/images/icons/lightning_add.png' alt='' />
|
||||
{$this->lang->words['mm_addnew']}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class='acp-box'>
|
||||
<h3>{$this->lang->words['mm_current']}</h3>
|
||||
|
||||
<table class='ipsTable'>
|
||||
<tr>
|
||||
<th>{$this->lang->words['mm_wordtitle']}</th>
|
||||
<th class='col_buttons'> </th>
|
||||
</tr>
|
||||
HTML;
|
||||
|
||||
if( ! count( $rows ) )
|
||||
{
|
||||
$IPBHTML .= <<<HTML
|
||||
<tr>
|
||||
<td colspan='3' class='no_messages'>
|
||||
{$this->lang->words['mm_none']} <a href='{$this->settings['base_url']}{$this->form_code}do=new' title='{$this->lang->words['mm_addnew']}' class='mini_button'>{$this->lang->words['mm_createnow']}</a>
|
||||
</td>
|
||||
</tr>
|
||||
HTML;
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach( $rows as $r )
|
||||
{
|
||||
$IPBHTML .= <<<HTML
|
||||
<tr class='ipsControlRow'>
|
||||
<td><strong>{$r['mm_title']}</strong></td>
|
||||
<td class='col_buttons'>
|
||||
<ul class='ipsControlStrip'>
|
||||
<li class='i_edit'><a href='{$this->settings['base_url']}{$this->form_code}do=edit&id={$r['mm_id']}' title='{$this->lang->words['mm_wordedit']}'>{$this->lang->words['mm_wordedit']}</a></li>
|
||||
<li class='i_delete'><a href='#' onclick='return acp.confirmDelete("{$this->settings['base_url']}{$this->form_code}do=delete&id={$r['mm_id']}");' title='{$this->lang->words['mm_remove']}'>{$this->lang->words['mm_remove']}</a></li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
HTML;
|
||||
}
|
||||
}
|
||||
|
||||
$IPBHTML .= <<<HTML
|
||||
</table>
|
||||
</div>
|
||||
HTML;
|
||||
|
||||
//--endhtml--//
|
||||
return $IPBHTML;
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,264 +1,264 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* Stats skin functions
|
||||
* Last Updated: $LastChangedDate: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://hatynka.in
|
||||
* @since 14th May 2003
|
||||
* @version $Rev: 8644 $
|
||||
*/
|
||||
|
||||
class cp_skin_stats
|
||||
{
|
||||
/**
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
* @var $registry
|
||||
* @var $DB
|
||||
* @var $settings
|
||||
* @var $request
|
||||
* @var $lang
|
||||
* @var $member
|
||||
* @var $memberData
|
||||
* @var $cache
|
||||
* @var $caches
|
||||
*/
|
||||
protected $registry;
|
||||
protected $DB;
|
||||
protected $settings;
|
||||
protected $request;
|
||||
protected $lang;
|
||||
protected $member;
|
||||
protected $memberData;
|
||||
protected $cache;
|
||||
protected $caches;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param object $registry Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->member = $this->registry->member();
|
||||
$this->memberData =& $this->registry->member()->fetchMemberData();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
$this->lang = $this->registry->class_localization;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show spam stats
|
||||
*
|
||||
* @return string HTML
|
||||
*/
|
||||
public function spamServiceStats( $title, $rows, $total ) {
|
||||
$IPBHTML = "";
|
||||
//--starthtml--//
|
||||
|
||||
$IPBHTML .= <<<HTML
|
||||
<div class='section_title'>
|
||||
<h2>{$this->lang->words['stats_spam']}</h2>
|
||||
</div>
|
||||
|
||||
<table class='information-box' style='width:20%; background-image: none;' align='right'>
|
||||
<tr>
|
||||
<td><strong>{$this->lang->words['spam_spam']}</strong></td>
|
||||
<td><img src='{$this->settings['skin_acp_url']}/images/bar_left_red.gif' width='4' height='11' align='middle' alt=''><img src='{$this->settings['skin_acp_url']}/images/bar_red.gif' width='32' height='11' align='middle' alt=''><img src='{$this->settings['skin_acp_url']}/images/bar_right_red.gif' width='4' height='11' align='middle' alt=''><br /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>{$this->lang->words['spam_ok']}</strong></td>
|
||||
<td><img src='{$this->settings['skin_acp_url']}/images/bar_left.gif' width='4' height='11' align='middle' alt=''><img src='{$this->settings['skin_acp_url']}/images/bar.gif' width='32' height='11' align='middle' alt=''><img src='{$this->settings['skin_acp_url']}/images/bar_right.gif' width='4' height='11' align='middle' alt=''></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br class='clear'/>
|
||||
<br class='clear'/>
|
||||
|
||||
<div class='acp-box'>
|
||||
<h3>{$title}</h3>
|
||||
|
||||
<table class='ipsTable'>
|
||||
<tr>
|
||||
<th width='20%'>{$this->lang->words['stats_date']}</th>
|
||||
<th width='70%'>{$this->lang->words['stats_results']}</th>
|
||||
<th width='10%'>{$this->lang->words['stats_count']}</th>
|
||||
</tr>
|
||||
HTML;
|
||||
|
||||
foreach( $rows as $dateVal => $stats )
|
||||
{
|
||||
$IPBHTML .= <<<HTML
|
||||
<tr>
|
||||
<td width='20%'>{$dateVal}</td>
|
||||
<td width='70%'>
|
||||
<img src='{$this->settings['skin_acp_url']}/images/bar_left_red.gif' width='4' height='11' align='middle' alt=''><img src='{$this->settings['skin_acp_url']}/images/bar_red.gif' width='{$stats['spam']['_width']}' height='11' align='middle' alt=''><img src='{$this->settings['skin_acp_url']}/images/bar_right_red.gif' width='4' height='11' align='middle' alt=''><br />
|
||||
<img src='{$this->settings['skin_acp_url']}/images/bar_left.gif' width='4' height='11' align='middle' alt=''><img src='{$this->settings['skin_acp_url']}/images/bar.gif' width='{$stats['notspam']['_width']}' height='11' align='middle' alt=''><img src='{$this->settings['skin_acp_url']}/images/bar_right.gif' width='4' height='11' align='middle' alt=''>
|
||||
</td>
|
||||
<td width='10%'><center>{$this->registry->class_localization->formatNumber( $stats['spam']['count'] )}<br />{$this->registry->class_localization->formatNumber( $stats['notspam']['count'] )}</center></td>
|
||||
</tr>
|
||||
HTML;
|
||||
}
|
||||
|
||||
$IPBHTML .= <<<HTML
|
||||
<tr>
|
||||
<td width='20%'> </td>
|
||||
<td width='70%' align='right'>{$this->lang->words['stats_total']}</td>
|
||||
<td width='10%'><center><b>{$this->registry->class_localization->formatNumber( $total )}</b></center></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<br />
|
||||
HTML;
|
||||
|
||||
if( count( $rows ) <= 30 AND $total > 0 )
|
||||
{
|
||||
$IPBHTML .= <<<HTML
|
||||
<div class='center'>
|
||||
<img src='{$this->settings['base_url']}{$this->form_code}&do=spamGraph&to_month={$this->request['to_month']}&to_day={$this->request['to_day']}&to_year={$this->request['to_year']}h&from_month={$this->request['from_month']}&from_day={$this->request['from_day']}&from_year={$this->request['from_year']}&timescale={$this->request['timescale']}&sortby={$this->request['sortby']}'>
|
||||
</div>
|
||||
HTML;
|
||||
}
|
||||
//--endhtml--//
|
||||
return $IPBHTML;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the stats results
|
||||
*
|
||||
* @param string Title
|
||||
* @param array Stats rows
|
||||
* @param integer Total
|
||||
* @return string HTML
|
||||
*/
|
||||
public function statResultsScreen( $title, $rows, $total ) {
|
||||
$IPBHTML = "";
|
||||
//--starthtml--//
|
||||
|
||||
$IPBHTML .= <<<HTML
|
||||
<div class='section_title'>
|
||||
<h2>{$this->lang->words['stats_title_results']}</h2>
|
||||
</div>
|
||||
|
||||
<div class='acp-box'>
|
||||
<h3>{$title}</h3>
|
||||
|
||||
<table class='ipsTable'>
|
||||
<tr>
|
||||
<th width='20%'>{$this->lang->words['stats_date']}</th>
|
||||
<th width='70%'>{$this->lang->words['stats_results']}</th>
|
||||
<th width='10%'>{$this->lang->words['stats_count']}</th>
|
||||
</tr>
|
||||
HTML;
|
||||
|
||||
foreach( $rows as $r )
|
||||
{
|
||||
$IPBHTML .= <<<HTML
|
||||
<tr>
|
||||
<td width='20%'>{$r['_name']}</td>
|
||||
<td width='70%'>
|
||||
<img src='{$this->settings['skin_acp_url']}/images/bar_left.gif' width='4' height='11' align='middle' alt=''><img src='{$this->settings['skin_acp_url']}/images/bar.gif' width='{$r['_width']}' height='11' align='middle' alt=''><img src='{$this->settings['skin_acp_url']}/images/bar_right.gif' width='4' height='11' align='middle' alt=''>
|
||||
</td>
|
||||
<td width='10%'><center>{$this->registry->class_localization->formatNumber( $r['result_count'] )}</center></td>
|
||||
</tr>
|
||||
HTML;
|
||||
}
|
||||
|
||||
$IPBHTML .= <<<HTML
|
||||
<tr>
|
||||
<td width='20%'> </td>
|
||||
<td width='70%' align='right'>{$this->lang->words['stats_total']}</td>
|
||||
<td width='10%'><center><b>{$this->registry->class_localization->formatNumber( $total )}</b></center></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
HTML;
|
||||
|
||||
//--endhtml--//
|
||||
return $IPBHTML;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the stats main screen
|
||||
*
|
||||
* @param string Type
|
||||
* @param string Title
|
||||
* @param array Form fields
|
||||
* @return string HTML
|
||||
*/
|
||||
public function statMainScreeen( $type, $title, $form ) {
|
||||
$IPBHTML = "";
|
||||
//--starthtml--//
|
||||
|
||||
$IPBHTML .= <<<HTML
|
||||
<div class='section_title'>
|
||||
<h2>{$this->lang->words['stats_title']}</h2>
|
||||
</div>
|
||||
|
||||
<form action='{$this->settings['base_url']}{$this->form_code}' method='post' name='theAdminForm' id='theAdminForm'>
|
||||
<input type='hidden' name='do' value='{$type}' />
|
||||
<input type='hidden' name='_admin_auth_key' value='{$this->registry->adminFunctions->getSecurityKey()}' />
|
||||
|
||||
<div class='acp-box'>
|
||||
<h3>{$title}</h3>
|
||||
|
||||
<table class='ipsTable double_pad'>
|
||||
<tr>
|
||||
<td class='field_title'><strong class='title'>{$this->lang->words['stats_datefrom']}</strong></td>
|
||||
<td class='field_field'>{$form['from_month']} {$form['from_day']} {$form['from_year']}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='field_title'><strong class='title'>{$this->lang->words['stats_dateto']}</strong></td>
|
||||
<td class='field_field'>{$form['to_month']} {$form['to_day']} {$form['to_year']}</td>
|
||||
</tr>
|
||||
HTML;
|
||||
|
||||
//-----------------------------------------
|
||||
// Time scale is irrelevant to topic views
|
||||
//-----------------------------------------
|
||||
|
||||
if( $type != 'statsShowTopicViews' )
|
||||
{
|
||||
$IPBHTML .= <<<HTML
|
||||
<tr>
|
||||
<td class='field_title'><strong class='title'>{$this->lang->words['stats_timescale']}</strong></td>
|
||||
<td class='field_field'>{$form['timescale']}</td>
|
||||
</tr>
|
||||
HTML;
|
||||
}
|
||||
|
||||
$IPBHTML .= <<<HTML
|
||||
|
||||
<tr>
|
||||
<td class='field_title'><strong class='title'>{$this->lang->words['stats_sorting']}</strong></td>
|
||||
<td class='field_field'>{$form['sortby']}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class='acp-actionbar'>
|
||||
<input type='submit' value='{$this->lang->words['stats_show']}' class='button primary' accesskey='s'>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
HTML;
|
||||
|
||||
//--endhtml--//
|
||||
return $IPBHTML;
|
||||
}
|
||||
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* Stats skin functions
|
||||
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 14th May 2003
|
||||
* @version $Rev: 10914 $
|
||||
*/
|
||||
|
||||
class cp_skin_stats
|
||||
{
|
||||
/**
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
* @var $registry
|
||||
* @var $DB
|
||||
* @var $settings
|
||||
* @var $request
|
||||
* @var $lang
|
||||
* @var $member
|
||||
* @var $memberData
|
||||
* @var $cache
|
||||
* @var $caches
|
||||
*/
|
||||
protected $registry;
|
||||
protected $DB;
|
||||
protected $settings;
|
||||
protected $request;
|
||||
protected $lang;
|
||||
protected $member;
|
||||
protected $memberData;
|
||||
protected $cache;
|
||||
protected $caches;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param object $registry Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->member = $this->registry->member();
|
||||
$this->memberData =& $this->registry->member()->fetchMemberData();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
$this->lang = $this->registry->class_localization;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show spam stats
|
||||
*
|
||||
* @return string HTML
|
||||
*/
|
||||
public function spamServiceStats( $title, $rows, $total ) {
|
||||
$IPBHTML = "";
|
||||
//--starthtml--//
|
||||
|
||||
$IPBHTML .= <<<HTML
|
||||
<div class='section_title'>
|
||||
<h2>{$this->lang->words['stats_spam']}</h2>
|
||||
</div>
|
||||
|
||||
<table class='information-box' style='width:20%; background-image: none;' align='right'>
|
||||
<tr>
|
||||
<td><strong>{$this->lang->words['spam_spam']}</strong></td>
|
||||
<td><img src='{$this->settings['skin_acp_url']}/images/bar_left_red.gif' width='4' height='11' align='middle' alt=''><img src='{$this->settings['skin_acp_url']}/images/bar_red.gif' width='32' height='11' align='middle' alt=''><img src='{$this->settings['skin_acp_url']}/images/bar_right_red.gif' width='4' height='11' align='middle' alt=''><br /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>{$this->lang->words['spam_ok']}</strong></td>
|
||||
<td><img src='{$this->settings['skin_acp_url']}/images/bar_left.gif' width='4' height='11' align='middle' alt=''><img src='{$this->settings['skin_acp_url']}/images/bar.gif' width='32' height='11' align='middle' alt=''><img src='{$this->settings['skin_acp_url']}/images/bar_right.gif' width='4' height='11' align='middle' alt=''></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br class='clear'/>
|
||||
<br class='clear'/>
|
||||
|
||||
<div class='acp-box'>
|
||||
<h3>{$title}</h3>
|
||||
|
||||
<table class='ipsTable'>
|
||||
<tr>
|
||||
<th width='20%'>{$this->lang->words['stats_date']}</th>
|
||||
<th width='70%'>{$this->lang->words['stats_results']}</th>
|
||||
<th width='10%'>{$this->lang->words['stats_count']}</th>
|
||||
</tr>
|
||||
HTML;
|
||||
|
||||
foreach( $rows as $dateVal => $stats )
|
||||
{
|
||||
$IPBHTML .= <<<HTML
|
||||
<tr>
|
||||
<td width='20%'>{$dateVal}</td>
|
||||
<td width='70%'>
|
||||
<img src='{$this->settings['skin_acp_url']}/images/bar_left_red.gif' width='4' height='11' align='middle' alt=''><img src='{$this->settings['skin_acp_url']}/images/bar_red.gif' width='{$stats['spam']['_width']}' height='11' align='middle' alt=''><img src='{$this->settings['skin_acp_url']}/images/bar_right_red.gif' width='4' height='11' align='middle' alt=''><br />
|
||||
<img src='{$this->settings['skin_acp_url']}/images/bar_left.gif' width='4' height='11' align='middle' alt=''><img src='{$this->settings['skin_acp_url']}/images/bar.gif' width='{$stats['notspam']['_width']}' height='11' align='middle' alt=''><img src='{$this->settings['skin_acp_url']}/images/bar_right.gif' width='4' height='11' align='middle' alt=''>
|
||||
</td>
|
||||
<td width='10%'><center>{$this->registry->class_localization->formatNumber( $stats['spam']['count'] )}<br />{$this->registry->class_localization->formatNumber( $stats['notspam']['count'] )}</center></td>
|
||||
</tr>
|
||||
HTML;
|
||||
}
|
||||
|
||||
$IPBHTML .= <<<HTML
|
||||
<tr>
|
||||
<td width='20%'> </td>
|
||||
<td width='70%' align='right'>{$this->lang->words['stats_total']}</td>
|
||||
<td width='10%'><center><b>{$this->registry->class_localization->formatNumber( $total )}</b></center></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<br />
|
||||
HTML;
|
||||
|
||||
if( count( $rows ) <= 30 AND $total > 0 )
|
||||
{
|
||||
$IPBHTML .= <<<HTML
|
||||
<div class='center'>
|
||||
<img src='{$this->settings['base_url']}{$this->form_code}&do=spamGraph&to_month={$this->request['to_month']}&to_day={$this->request['to_day']}&to_year={$this->request['to_year']}h&from_month={$this->request['from_month']}&from_day={$this->request['from_day']}&from_year={$this->request['from_year']}&timescale={$this->request['timescale']}&sortby={$this->request['sortby']}'>
|
||||
</div>
|
||||
HTML;
|
||||
}
|
||||
//--endhtml--//
|
||||
return $IPBHTML;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the stats results
|
||||
*
|
||||
* @param string Title
|
||||
* @param array Stats rows
|
||||
* @param integer Total
|
||||
* @return string HTML
|
||||
*/
|
||||
public function statResultsScreen( $title, $rows, $total ) {
|
||||
$IPBHTML = "";
|
||||
//--starthtml--//
|
||||
|
||||
$IPBHTML .= <<<HTML
|
||||
<div class='section_title'>
|
||||
<h2>{$this->lang->words['stats_title_results']}</h2>
|
||||
</div>
|
||||
|
||||
<div class='acp-box'>
|
||||
<h3>{$title}</h3>
|
||||
|
||||
<table class='ipsTable'>
|
||||
<tr>
|
||||
<th width='20%'>{$this->lang->words['stats_date']}</th>
|
||||
<th width='70%'>{$this->lang->words['stats_results']}</th>
|
||||
<th width='10%'>{$this->lang->words['stats_count']}</th>
|
||||
</tr>
|
||||
HTML;
|
||||
|
||||
foreach( $rows as $r )
|
||||
{
|
||||
$IPBHTML .= <<<HTML
|
||||
<tr>
|
||||
<td width='20%'>{$r['_name']}</td>
|
||||
<td width='70%'>
|
||||
<img src='{$this->settings['skin_acp_url']}/images/bar_left.gif' width='4' height='11' align='middle' alt=''><img src='{$this->settings['skin_acp_url']}/images/bar.gif' width='{$r['_width']}' height='11' align='middle' alt=''><img src='{$this->settings['skin_acp_url']}/images/bar_right.gif' width='4' height='11' align='middle' alt=''>
|
||||
</td>
|
||||
<td width='10%'><center>{$this->registry->class_localization->formatNumber( $r['result_count'] )}</center></td>
|
||||
</tr>
|
||||
HTML;
|
||||
}
|
||||
|
||||
$IPBHTML .= <<<HTML
|
||||
<tr>
|
||||
<td width='20%'> </td>
|
||||
<td width='70%' align='right'>{$this->lang->words['stats_total']}</td>
|
||||
<td width='10%'><center><b>{$this->registry->class_localization->formatNumber( $total )}</b></center></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
HTML;
|
||||
|
||||
//--endhtml--//
|
||||
return $IPBHTML;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the stats main screen
|
||||
*
|
||||
* @param string Type
|
||||
* @param string Title
|
||||
* @param array Form fields
|
||||
* @return string HTML
|
||||
*/
|
||||
public function statMainScreeen( $type, $title, $form ) {
|
||||
$IPBHTML = "";
|
||||
//--starthtml--//
|
||||
|
||||
$IPBHTML .= <<<HTML
|
||||
<div class='section_title'>
|
||||
<h2>{$this->lang->words['stats_title']}</h2>
|
||||
</div>
|
||||
|
||||
<form action='{$this->settings['base_url']}{$this->form_code}' method='post'>
|
||||
<input type='hidden' name='do' value='{$type}' />
|
||||
<input type='hidden' name='_admin_auth_key' value='{$this->registry->adminFunctions->getSecurityKey()}' />
|
||||
|
||||
<div class='acp-box'>
|
||||
<h3>{$title}</h3>
|
||||
|
||||
<table class='ipsTable double_pad'>
|
||||
<tr>
|
||||
<td class='field_title'><strong class='title'>{$this->lang->words['stats_datefrom']}</strong></td>
|
||||
<td class='field_field'>{$form['from_month']} {$form['from_day']} {$form['from_year']}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='field_title'><strong class='title'>{$this->lang->words['stats_dateto']}</strong></td>
|
||||
<td class='field_field'>{$form['to_month']} {$form['to_day']} {$form['to_year']}</td>
|
||||
</tr>
|
||||
HTML;
|
||||
|
||||
//-----------------------------------------
|
||||
// Time scale is irrelevant to topic views
|
||||
//-----------------------------------------
|
||||
|
||||
if( $type != 'statsShowTopicViews' )
|
||||
{
|
||||
$IPBHTML .= <<<HTML
|
||||
<tr>
|
||||
<td class='field_title'><strong class='title'>{$this->lang->words['stats_timescale']}</strong></td>
|
||||
<td class='field_field'>{$form['timescale']}</td>
|
||||
</tr>
|
||||
HTML;
|
||||
}
|
||||
|
||||
$IPBHTML .= <<<HTML
|
||||
|
||||
<tr>
|
||||
<td class='field_title'><strong class='title'>{$this->lang->words['stats_sorting']}</strong></td>
|
||||
<td class='field_field'>{$form['sortby']}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class='acp-actionbar'>
|
||||
<input type='submit' value='{$this->lang->words['stats_show']}' class='button primary' accesskey='s'>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
HTML;
|
||||
|
||||
//--endhtml--//
|
||||
return $IPBHTML;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user