Version 3.0.5

This commit is contained in:
Neo committed 2025-12-19 00:31:03 -08:00
1 parent 19b38c7c74
commit 1d4720f3e2
3755 files changed
+508378 -664541

No files matched your search

@@ -0,0 +1,182 @@
<?php
/**
* Invision Power Services
* IP.Board v3.0.5
* ACP ban filters skin file
* Last Updated: $Date: 2009-09-24 16:56:42 -0400 (Thu, 24 Sep 2009) $
*
* @author $Author: rikki $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.iinvisionpower.com/community/board/license.html
* @package Invision Power Board
* @subpackage Members
* @link http://www.iinvisionpower.com
* @since 20th February 2002
* @version $Rev: 5154 $
*
*/
class cp_skin_banfilters extends output
{
/**
* Prevent our main destructor being called by this class
*
* @access public
* @return void
*/
public function __destruct()
{
}
/**
* Ban filter overview screen
*
* @access public
* @param array IPs
* @param array Emails
* @param array Usernames
* @return string HTML
*/
public function banOverview( $ips, $emails, $names ) {
$IPBHTML = "";
//--starthtml--//
$IPBHTML .= <<<HTML
<div class='section_title'>
<h2>{$this->lang->words['ban_title']}</h2>
</div>
<form method='post' action='{$this->settings['base_url']}{$this->form_code}&amp;do=ban_add'>
<input type='hidden' name='_admin_auth_key' value='{$this->registry->adminFunctions->_admin_auth_key}' />
<input type='text' size='30' class='input_text' value='' name='bantext' />
<select class='input_select' name='bantype' style='vertical-align:middle;'>
<option value='ip'>{$this->lang->words['ban_ip']}</option>
<option value='email'>{$this->lang->words['ban_email']}</option>
<option value='name'>{$this->lang->words['ban_name']}</option>
</select>
<input type='submit' value='{$this->lang->words['ban_addnew']}' class='button primary' />
</form>
<div class='acp-box' style='margin-top: 4px;'>
<h3>{$this->lang->words['ban_bancontrol']}</h3>
<form method='post' id='ban-delete' action='{$this->settings['base_url']}{$this->form_code}&amp;do=ban_delete'>
<input type='hidden' name='_admin_auth_key' value='{$this->registry->adminFunctions->_admin_auth_key}' />
<table width='100%' class='alternate_rows double_pad'>
<tr>
<th colspan='3'>{$this->lang->words['ban_ips']}</th>
</tr>
HTML;
if( is_array( $ips ) && count( $ips ) )
{
foreach( $ips as $r )
{
$IPBHTML .= <<<HTML
<tr>
<td width='1%'>{$r['_checkbox']}</td>
<td width='80%'>{$r['ban_content']}</td>
<td width='20%'>{$r['_date']}</td>
</tr>
HTML;
}
}
else
{
$IPBHTML .= <<<HTML
<tr>
<td colspan='3'>{$this->lang->words['ban_ips_none']}</td>
</tr>
HTML;
}
$IPBHTML .= <<<HTML
<tr>
<th colspan='3'>{$this->lang->words['ban_emails']}</th>
</tr>
HTML;
if( is_array( $emails ) && count( $emails ) )
{
foreach( $emails as $r )
{
$IPBHTML .= <<<HTML
<tr>
<td width='1%'>{$r['_checkbox']}</td>
<td width='80%'>{$r['ban_content']}</td>
<td width='20%'>{$r['_date']}</td>
</tr>
HTML;
}
}
else
{
$IPBHTML .= <<<HTML
<tr>
<td colspan='3'>{$this->lang->words['ban_emails_none']}</td>
</tr>
HTML;
}
$IPBHTML .= <<<HTML
<tr>
<th colspan='3'>{$this->lang->words['ban_names']}</th>
</tr>
HTML;
if( is_array( $names ) && count( $names ) )
{
foreach( $names as $r )
{
$IPBHTML .= <<<HTML
<tr>
<td width='1%'>{$r['_checkbox']}</td>
<td width='80%'>{$r['ban_content']}</td>
<td width='20%'>{$r['_date']}</td>
</tr>
HTML;
}
}
else
{
$IPBHTML .= <<<HTML
<tr>
<td colspan='3'>{$this->lang->words['ban_names_none']}</td>
</tr>
HTML;
}
$IPBHTML .= <<<HTML
</tr>
</table>
<div class='acp-actionbar'>
<input type='submit' value='{$this->lang->words['ban_deletebutton']}' class='realbutton redbutton' />
</div>
</form>
</div>
<script type='text/javascript'>
$('ban-delete').observe( 'submit', function( e ){
var checkboxes = $('ban-delete').getElementsByTagName( 'input' );
for( var i = 0; i < checkboxes.length; i++ )
{
if( checkboxes[i].checked )
{
return true;
}
}
alert( '{$this->lang->words['no_ban_to_delete']}' );
Event.stop( e );
});
</script>
HTML;
//--endhtml--//
return $IPBHTML;
}
}
@@ -0,0 +1,530 @@
<?php
/**
* Invision Power Services
* IP.Board v3.0.5
* ACP bulk mail skin file
* Last Updated: $Date: 2009-09-22 11:55:32 -0400 (Tue, 22 Sep 2009) $
*
* @author $Author: matt $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.iinvisionpower.com/community/board/license.html
* @package Invision Power Board
* @subpackage Members
* @link http://www.iinvisionpower.com
* @since 20th February 2002
* @version $Rev: 5139 $
*
*/
class cp_skin_bulkmail extends output
{
/**
* Prevent our main destructor being called by this class
*
* @access public
* @return void
*/
public function __destruct()
{
}
/**
* Bulk mail start
*
* @access public
* @param array Mail data
* @param int Number of members to send this to
* @return string HTML
*/
public function mailSendStart( $mail, $count=0 ) {
$countmembers = sprintf($this->lang->words['b_countmember'], $count );
$IPBHTML = "";
//--starthtml--//
$IPBHTML .= <<<HTML
<div class='section_title'>
<h2>{$this->lang->words['b_title']}</h2>
</div>
<form name='theAdminForm' id='adminform' action='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=mail_send_complete' method='post'>
<input type='hidden' name='id' value='{$mail['mail_id']}' />
<input type='hidden' name='_admin_auth_key' value='{$this->registry->getClass('adminFunctions')->_admin_auth_key}' />
<div class='acp-box'>
<h3>{$countmembers}</h3>
<table class='form_table double_pad alternate_rows' cellspacing='0' cellpadding='0'>
<tr>
<th colspan='2'>{$this->lang->words['b_maildetails']}</th>
</tr>
<tr>
<td style='width: 40%;'>
<label>{$this->lang->words['b_subject']}</label>
</td>
<td style='width: 60%'>
{$mail['mail_subject']}
</td>
</tr>
<tr>
<td colspan='2'>
<label>{$this->lang->words['b_content']}</label>
<br />
<div style='margin-top: 10px; margin-left: 15px;'>
<iframe width='100%' height='200px' scrollbars='auto' src='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=mail_preview_do&amp;id={$mail['mail_id']}'></iframe>
</div>
</td>
</tr>
<tr>
<th colspan='2'>{$this->lang->words['b_sending']}</th>
</tr>
<tr>
<td colspan='2'>
{$this->lang->words['b_sending_info']}
</td>
</tr>
</table>
</div>
<div class='acp-actionbar'>
{$this->lang->words['b_percycle']} <input type='text' class='realbutton' size='5' name='pergo' value='20' /> &nbsp; <input type='submit' value='{$this->lang->words['b_mailbutton']}' class='realbutton' />
</div>
</form>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Bulk mail form
*
* @access public
* @param string Type (add|edit)
* @param array Mail data
* @param string Mail content
* @return string HTML
*/
public function mailForm( $type, $mail, $mail_content ) {
$dd_ltmt = array(
0 => array( 'lt' , $this->lang->words['b_lessthan'] ),
1 => array( 'mt' , $this->lang->words['b_morethan'] )
);
if ( $type == 'add' )
{
$title = $this->lang->words['b_step1'];
$button = $this->lang->words['b_proceed'];
$honour_checked = 1;
$html_checked = 0;
}
else
{
$title = $this->lang->words['b_editstored'];
$button = $this->lang->words['b_edit'];
//-----------------------------------------
// Unpack more..
//-----------------------------------------
$tmp = unserialize( stripslashes( $mail['mail_opts'] ) );
if ( is_array( $tmp ) and count ( $tmp ) )
{
foreach( $tmp as $k => $v )
{
if ( ! $mail[ $k ] )
{
$mail[ $k ] = $v;
}
}
}
$honour_checked = 1; // We no longer support not honoring $mail['mail_honor'];
$html_checked = $mail['mail_html_on'];
}
$form = array();
$form['groups'] = '';
$form['mail_subject'] = $this->registry->output->formInput( 'mail_subject', htmlspecialchars( IPSText::stripslashes( $_POST['mail_subject'] ? $_POST['mail_subject'] : $mail['mail_subject'] ), ENT_QUOTES ) );
$form['mail_content'] = $this->registry->output->formTextarea( 'mail_content', $mail_content, 60, 14, '', '', "' style='width: 100%'" ); // Hacky CSS thing, but eh
$form['mail_honor'] = $this->registry->output->formCheckbox( 'mail_honor', $honour_checked );
$form['mail_html'] = $this->registry->output->formCheckbox( 'mail_html_on', $html_checked );
$form['mail_post_ltmt'] = $this->registry->output->formDropdown( 'mail_post_ltmt', $dd_ltmt, $_POST['mail_post_ltml'] ? $_POST['mail_post_ltml'] : $mail['mail_post_ltmt'] );
$form['mail_filter_post'] = $this->registry->output->formSimpleInput( "mail_filter_post", $_POST['mail_filter_post'] ? $_POST['mail_filter_post'] : $mail['mail_filter_post'], 7 );
$form['mail_visit_ltmt'] = $this->registry->output->formDropdown( 'mail_visit_ltmt', $dd_ltmt, $_POST['mail_visit_ltml'] ? $_POST['mail_visit_ltml'] : $mail['mail_visit_ltmt'] );
$form['mail_filter_visit'] = $this->registry->output->formSimpleInput( "mail_filter_visit", $_POST['mail_filter_visit'] ? $_POST['mail_filter_visit'] : $mail['mail_filter_visit'], 7 );
$form['mail_joined_ltmt'] = $this->registry->output->formDropdown( 'mail_joined_ltmt', $dd_ltmt, $_POST['mail_joined_ltml'] ? $_POST['mail_joined_ltml'] : $mail['mail_joined_ltmt'] );
$form['mail_filter_joined'] = $this->registry->output->formSimpleInput( "mail_filter_joined", $_POST['mail_filter_joined'] ? $_POST['mail_filter_joined'] : $mail['mail_filter_joined'], 7 );
foreach( $this->cache->getCache('group_cache') as $g )
{
if ( $g['g_id'] == $this->settings['guest_group'] )
{
continue;
}
$checked = 0;
if ( $mail['mail_groups'] )
{
if ( strstr( ',' . $mail['mail_groups'] . ',', ',' . $g['g_id'] . ',' ) )
{
$checked = 1;
}
}
$form['groups'] .= $this->registry->output->formCheckbox( 'sg_' . $g['g_id'], $checked ) . "&nbsp;&nbsp;<b>{$g['g_title']}</b><br />";
}
$IPBHTML = "";
//--starthtml--//
$IPBHTML .= <<<HTML
<div class='section_title'>
<h2>{$this->lang->words['b_title']}</h2>
</div>
<script type='text/javascript'>
function runpreview()
{
thisval = document.theAdminForm.mail_content.value;
if( document.theAdminForm.mail_html_on.checked == true )
{
thatval = 1;
}
else
{
thatval = 0;
}
myUrl = '{$this->settings['base_url']}{$this->form_code_js}&do=mail_preview';
myUrl = myUrl.replace( /&amp;/g, '&' );
myWin = window.open( myUrl,'newWin','width=500,height=500,resizable=yes,scrollbars=yes');
}
</script>
<form name='theAdminForm' id='adminform' action='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=mail_save' method='post'>
<input type='hidden' name='id' value='{$mail['mail_id']}' />
<input type='hidden' name='type' value='{$type}' />
<input type='hidden' name='_admin_auth_key' value='{$this->registry->getClass('adminFunctions')->_admin_auth_key}' />
<div class='acp-box'>
<h3>{$title}</h3>
<table class='form_table double_pad alternate_rows' cellspacing='0' cellpadding='0'>
<tr>
<th colspan='2'>{$this->lang->words['b_step1_title']}</th>
</tr>
<tr>
<td style='width: 40%;'>
<label>{$this->lang->words['b_subject']}</label>
</td>
<td style='width: 60%'>
{$form['mail_subject']}
</td>
</tr>
<tr>
<td colspan='2'>
<label>{$this->lang->words['b_content']}</label>
<br />
<div style='margin-top: 10px; margin-left: 15px;'>{$form['mail_content']}</div>
</td>
</tr>
<tr>
<td>
<label>{$this->lang->words['b_html']}</label>
</td>
<td>
{$form['mail_html']}&nbsp;
</td>
</tr>
</table>
</div>
<br />
<div class='acp-box'>
<h3>{$this->lang->words['b_step2']}</h3>
<div style='width: 100%;'>
<table class='form_table double_pad alternate_rows' cellspacing='0' cellpadding='0'>
<tr>
<th colspan='2'>{$this->lang->words['b_addfilters']}</th>
<th>{$this->lang->words['b_groups']}</th>
</tr>
<tr>
<td style='width: 40%;'>
<label>{$this->lang->words['b_nposts']}</label><br />
<span class='desctext'>{$this->lang->words['b_leaveblank']}</span>
</td>
<td style='width: 40%'>
{$form['mail_post_ltmt']} {$form['mail_filter_post']}
</td>
<td style='width: 20%;' rowspan='3'>
{$form['groups']}
</td>
</tr>
<tr>
<td>
<label>{$this->lang->words['b_ndays']}</label><br />
<span class='desctext'>{$this->lang->words['b_leaveblank']}</span>
</td>
<td>
{$form['mail_visit_ltmt']} {$form['mail_filter_visit']}
</td>
</tr>
<tr>
<td>
<label>{$this->lang->words['b_njoined']}</label><br />
<span class='desctext'>{$this->lang->words['b_leaveblank']}</span>
</td>
<td>
{$form['mail_joined_ltmt']} {$form['mail_filter_joined']}
</td>
</tr>
</table>
</div>
</div>
<br />
<div class='acp-actionbar'>
<input class='realbutton' onclick='runpreview()' type='button' value='{$this->lang->words['b_preview']}' /> &nbsp; &nbsp; <input class='realbutton' type='submit' value='{$button}' />
</div>
<br />
<div class='information-box'>
<h4>{$this->lang->words['b_qtag']}</h4>
{$this->lang->words['b_qtag_info']}
<br /><br />
<table cellpadding='2' width='100%' cellspacing='0' border='0'>
<tr>
<td><strong>{board_name}</strong></td>
<td>{$this->lang->words['b_qbname']}</td>
<td><strong>{board_url}</strong></td>
<td>{$this->lang->words['b_qboardurl']}</td>
</tr>
<tr>
<td><strong>{reg_total}</strong></td>
<td>{$this->lang->words['b_qmtotal']}</td>
<td><strong>{total_posts}</strong></td>
<td>{$this->lang->words['b_qptotal']}</td>
</tr>
<tr>
<td><strong>{busy_count}</strong></td>
<td>{$this->lang->words['b_qonline']}</td>
<td><strong>{busy_time}</strong></td>
<td>{$this->lang->words['b_qonlinetime']}</td>
</tr>
<tr>
<td><strong>{member_id}</strong></td>
<td>{$this->lang->words['b_qid']}</td>
<td><strong>{member_name}</strong></td>
<td>{$this->lang->words['b_qmname']}</td>
</tr>
<tr>
<td><strong>{member_joined}</strong></td>
<td>{$this->lang->words['b_qjoin']}</td>
<td><strong>{member_posts}</strong></td>
<td>{$this->lang->words['b_qposts']}</td>
</tr>
</table>
</div>
</form>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* HTML to show inside preview iframe
*
* @access public
* @param string Content
* @return string HTML
*/
public function mailIframeContent( $content ) {
$IPBHTML = "";
//--starthtml--//
$IPBHTML .= <<<HTML
<html>
<body>
<div style='padding:6px;text-align:left;font-family:courier, monospace;font-size:12px'>
{$content}
</div>
</body>
</html>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* HTML to show in popup
*
* @access public
* @return string HTML
*/
public function mailPopupContent() {
$IPBHTML = "";
//--starthtml--//
$IPBHTML .= <<<HTML
<html>
<body onload='doitdude()'>
<script type='text/javascript'>
posty = opener.thisval;
pisty = opener.thatval;
function doitdude()
{
document.peekaboo.action = '{$this->settings['base_url']}&{$this->form_code_js}&do=mail_preview_do';
document.peekaboo.action = document.peekaboo.action.replace( /&amp;/, '&' );
document.peekaboo.text.value = posty;
document.peekaboo.html.value = pisty;
document.peekaboo.submit();
}
</script>
<form name='peekaboo' method='post'>
<input type='hidden' name='text' />
<input type='hidden' name='html' />
</form>
</body>
</html>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Saved bulk mails overview
*
* @access public
* @param string Content
* @return string HTML
*/
public function mailOverviewWrapper( $content, $pages ) {
$IPBHTML = "";
//--starthtml--//
$IPBHTML .= <<<HTML
<div class='section_title'>
<h2>{$this->lang->words['b_title']}</h2>
<ul class='context_menu'>
<li><a href='{$this->settings['base_url']}{$this->form_code}&amp;do=mail_new'><img src='{$this->settings['skin_acp_url']}/_newimages/icons/add.png' alt='' /> {$this->lang->words['b_create']}</a></li>
</ul>
</div>
<div class='acp-box'>
<h3>{$this->lang->words['b_stored']}</h3>
<table class='alternate_rows' width='100%'>
<tr>
<th width='1%'>&nbsp;</th>
<th width='30%'>{$this->lang->words['b_lsubject']}</th>
<th width='15%'>{$this->lang->words['b_lsenton']}</th>
<th width='15%'>{$this->lang->words['b_lsentto']}</th>
<th width='15%'>{$this->lang->words['b_ltime']}</th>
<th width='1%'>&nbsp;</th>
</tr>
HTML;
if( $content )
{
$IPBHTML .= <<<HTML
{$content}
HTML;
}
else
{
$IPBHTML .= <<<HTML
<tr>
<td colspan='6' class='no_items'>{$this->lang->words['b_nobulk']}</td>
</tr>
HTML;
}
$IPBHTML .= <<<HTML
</table>
<div class='acp-actionbar'>
<div class="leftaction">{$pages}</div>
</div>
</div>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Bulk mail row
*
* @access public
* @param array Mail data
* @return string HTML
*/
public function mailOverviewRow( $r ) {
$IPBHTML = "";
//--starthtml--//
$inprogress = "";
$time_taken = "";
if ( $r['mail_updated'] == $r['mail_start'] )
{
$time_taken = $this->lang->words['b_notyet'];
}
else
{
$time_taken = intval($r['mail_updated'] - $r['mail_start']);
if ( $time_taken < 0 )
{
$time_taken = 0;
}
if ( $time_taken )
{
$time_taken = ceil( $time_taken / 60 );
}
$time_taken .= $this->lang->words['b_minutes'];
}
if ( $r['mail_active'] )
{
$inprogress = " <em>( {$this->lang->words['b_inprogress']} - <a href='#' class='cancel' onclick=\"acp.confirmDelete('{$this->settings['base_url']}&{$this->form_code_js}&do=mail_send_cancel', '{$this->lang->words['b_cancelconfirm']}'); return false;\">{$this->lang->words['b_cancel']}</a> )</em>";
}
$IPBHTML .= <<<HTML
<tr>
<td><img src='{$this->settings['skin_acp_url']}/_newimages/icons/email.png' /></td>
<td><b>{$r['mail_subject']}</b> {$inprogress}</td>
<td>{$r['_mail_start']}</td>
<td>{$r['_mail_sentto']}</td>
<td>{$time_taken}</td>
<td>
<img id='mid-{$r['mail_id']}' src='{$this->settings['skin_acp_url']}/_newimages/menu_open.png' border='0' alt='{$this->lang->words['b_options']}' class='ipbmenu' />
<ul class='acp-menu' id='mid-{$r['mail_id']}_menucontent'>
<li class='icon info'><a href='{$this->settings['base_url']}&{$this->form_code}&do=mail_send_start&id={$r['mail_id']}'>{$this->lang->words['b_resenddot']}</a></li>
<li class='icon edit'><a href='{$this->settings['base_url']}&{$this->form_code}&do=mail_edit&id={$r['mail_id']}'>{$this->lang->words['b_editdot']}</a></li>
<li class='icon delete'><a href='#' onclick='return acp.confirmDelete("{$this->settings['base_url']}&{$this->form_code}&do=mail_delete&id={$r['mail_id']}");'>{$this->lang->words['b_deletedot']}</a></li>
</ul>
</td>
</tr>
HTML;
//--endhtml--//
return $IPBHTML;
}
}
@@ -0,0 +1,936 @@
<?php
/**
* Invision Power Services
* IP.Board v3.0.5
* ACP groups skin file
* Last Updated: $Date: 2009-11-25 05:46:35 -0500 (Wed, 25 Nov 2009) $
*
* @author $Author: matt $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.iinvisionpower.com/community/board/license.html
* @package Invision Power Board
* @subpackage Members
* @link http://www.iinvisionpower.com
* @since 20th February 2002
* @version $Rev: 5468 $
*
*/
class cp_skin_groups extends output
{
/**
* Prevent our main destructor being called by this class
*
* @access public
* @return void
*/
public function __destruct()
{
}
/**
* Should this admin group get ACP restrictions?
*
* @access public
* @return string HTML
*/
public function groupAdminConfirm( $group_id ) {
$IPBHTML = "";
//--starthtml--//
$IPBHTML .= <<<HTML
<!--SKINNOTE: Not yet skinned-->
<div class='tableborder'>
<div class='tableheaderalt'>{$this->lang->words['sm_configrest']}</div>
<div class='tablerow1'>
{$this->lang->words['sm_detectacp']}
<br /><br />
{$this->lang->words['sm_setrestrict']}
</div>
<div class='tablesubheader' align='center'>
<span class='fauxbutton'><a href='{$this->settings['base_url']}&amp;{$this->form_code}'>{$this->lang->words['sm_nothanks']}</a></span>&nbsp;&nbsp;
<span class='fauxbutton'><a href='{$this->settings['base_url']}&amp;module=restrictions&amp;section=restrictions&amp;do=acpperms-group-add-complete&amp;entered_group={$group_id}'>{$this->lang->words['sm_yesplease']}</a></span>
</div>
</div>
<br />
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Group form
*
* @access public
* @param string Type (add|edit)
* @param array Group data
* @param array Permission masks
* @param array Extra tabs
* @return string HTML
*/
public function groupsForm( $type, $group, $permission_masks, $content=array(), $firsttab='' ) {
//-----------------------------------------
// Format some of the data
//-----------------------------------------
list($group['g_promotion_id'], $group['g_promotion_posts']) = explode( '&', $group['g_promotion'] );
list($p_max, $p_width, $p_height) = explode( ":", $group['g_photo_max_vars'] );
list( $limit, $flood ) = explode( ":", $group['g_email_limit'] );
if ($group['g_promotion_posts'] < 1)
{
$group['g_promotion_posts'] = '';
}
if( $type == 'edit' AND $group['g_attach_max'] == 0 )
{
$group['g_attach_maxdis'] = $this->lang->words['g_unlimited'];
}
else if( $type == 'edit' AND $group['g_attach_max'] == -1 )
{
$group['g_attach_maxdis'] = $this->lang->words['g_disabled'];
}
else
{
$group['g_attach_maxdis'] = IPSLib::sizeFormat( $group['g_attach_max'] * 1024 );
}
if( $type == 'edit' AND $group['g_attach_per_post'] == 0 )
{
$group['g_attach_per_postdis'] = $this->lang->words['g_unlimited'];
}
else if( $type == 'edit' AND $group['g_attach_per_post'] == -1 )
{
$group['g_attach_per_postdis'] = $this->lang->words['g_disabled'];
}
else
{
$group['g_attach_per_postdis'] = IPSLib::sizeFormat( $group['g_attach_per_post'] * 1024 );
}
//-----------------------------------------
// Set some of the form variables
//-----------------------------------------
$form_code = $type == 'edit' ? 'doedit' : 'doadd';
$button = $type == 'edit' ? $this->lang->words['g_compedit'] : $this->lang->words['g_addgroup'];
$ini_max = @ini_get( 'upload_max_filesize' ) ? @ini_get( 'upload_max_filesize' ) : $this->lang->words['g_cannotobt'];
$guest_legend = $group['g_id'] == $this->settings['guest_group'] ? $this->lang->words['g_appguests'] : '';
$secure_key = ipsRegistry::getClass('adminFunctions')->getSecurityKey();
//-----------------------------------------
// Start off the form fields
//-----------------------------------------
$all_groups = array( 0 => array ( 'none', $this->lang->words['g_dontprom'] ) );
foreach( $this->cache->getCache('group_cache') as $group_data )
{
$all_groups[] = array( $group_data['g_id'], $group_data['g_title'] );
}
$gbw_unit_type = array(
0 => array( 0, $this->lang->words['g_dd_apprp'] ),
1 => array( 1, $this->lang->words['g_dd_days'] ) );
$form = array();
$form['g_title'] = $this->registry->output->formInput( "g_title", $group['g_title'], '', 32, 'text', '', '', 32 );
$form['permid'] = $this->registry->output->formMultiDropdown( "permid[]", $permission_masks, explode( ",", $group['g_perm_id'] ) );
$form['g_icon'] = $this->registry->output->formTextarea( "g_icon", htmlspecialchars( $group['g_icon'], ENT_QUOTES ) );
$form['prefix'] = $this->registry->output->formInput( "prefix", htmlspecialchars( $group['prefix'], ENT_QUOTES ) );
$form['suffix'] = $this->registry->output->formInput( "suffix", htmlspecialchars( $group['suffix'], ENT_QUOTES ) );
$form['g_hide_from_list'] = $this->registry->output->formYesNo( "g_hide_from_list", $group['g_hide_from_list'] );
$form['g_attach_max'] = $this->registry->output->formInput( "g_attach_max", $group['g_attach_max'] );
$form['g_attach_per_post'] = $this->registry->output->formInput( "g_attach_per_post", $group['g_attach_per_post'] );
$form['p_max'] = $this->registry->output->formInput( "p_max", $p_max );
$form['p_width'] = $this->registry->output->formSimpleInput( "p_width", $p_width, 3 );
$form['p_height'] = $this->registry->output->formSimpleInput( "p_height", $p_height, 3 );
$form['g_avatar_upload'] = $this->registry->output->formYesNo( "g_avatar_upload", $group['g_avatar_upload'] );
$form['g_can_msg_attach'] = $this->registry->output->formYesNo( "g_can_msg_attach", $group['g_can_msg_attach'] );
$form['g_view_board'] = $this->registry->output->formYesNo( "g_view_board", $group['g_view_board'] );
$form['g_access_offline'] = $this->registry->output->formYesNo( "g_access_offline", $group['g_access_offline'] );
$form['g_mem_info'] = $this->registry->output->formYesNo( "g_mem_info", $group['g_mem_info'] );
$form['g_can_add_friends'] = $this->registry->output->formYesNo( "g_can_add_friends", $group['g_can_add_friends'] );
$form['g_hide_online_list'] = $this->registry->output->formYesNo( "g_hide_online_list", $group['g_hide_online_list'] );
$form['g_use_search'] = $this->registry->output->formYesNo( "g_use_search", $group['g_use_search'] );
$form['g_search_flood'] = $this->registry->output->formInput( "g_search_flood", $group['g_search_flood'] );
$form['g_email_friend'] = $this->registry->output->formYesNo( "g_email_friend", $group['g_email_friend'] );
$form['join_limit'] = $this->registry->output->formSimpleInput( "join_limit", $limit, 2 );
$form['join_flood'] = $this->registry->output->formSimpleInput( "join_flood", $flood, 2 );
$form['g_edit_profile'] = $this->registry->output->formYesNo( "g_edit_profile", $group['g_edit_profile'] );
$form['g_use_pm'] = $this->registry->output->formYesNo( "g_use_pm", $group['g_use_pm'] );
$form['g_max_mass_pm'] = $this->registry->output->formInput( "g_max_mass_pm", $group['g_max_mass_pm'] );
$form['g_max_messages'] = $this->registry->output->formInput( "g_max_messages", $group['g_max_messages'] );
$form['g_pm_perday'] = $this->registry->output->formSimpleInput( "g_pm_perday", $group['g_pm_perday'], 4 );
$form['g_pm_flood_mins'] = $this->registry->output->formSimpleInput( "g_pm_flood_mins", $group['g_pm_flood_mins'], 3 );
$form['g_dohtml'] = $this->registry->output->formYesNo( "g_dohtml", $group['g_dohtml'] );
$form['g_bypass_badwords'] = $this->registry->output->formYesNo( "g_bypass_badwords", $group['g_bypass_badwords'] );
$form['g_dname_date'] = $this->registry->output->formSimpleInput( "g_dname_date", $group['g_dname_date'], 3 );
$form['g_dname_changes'] = $this->registry->output->formSimpleInput( "g_dname_changes", $group['g_dname_changes'], 3 );
$form['g_is_supmod'] = $this->registry->output->formYesNo( "g_is_supmod", $group['g_is_supmod'] );
$form['g_access_cp'] = $this->registry->output->formYesNo( "g_access_cp", $group['g_access_cp'] );
$form['g_promotion_id'] = $this->registry->output->formDropdown( "g_promotion_id", $all_groups, $group['g_promotion_id'] );
$form['g_promotion_posts'] = $this->registry->output->formSimpleInput( 'g_promotion_posts', $group['g_promotion_posts'] );
$form['g_new_perm_set'] = $this->registry->output->formInput( "g_new_perm_set", '' );
$form['g_rep_max_positive'] = $this->registry->output->formInput( "g_rep_max_positive", $group['g_rep_max_positive'] );
$form['g_rep_max_negative'] = $this->registry->output->formInput( "g_rep_max_negative", $group['g_rep_max_negative'] );
$sig_limits = explode( ':', $group['g_signature_limits'] );
$form['use_signatures'] = $this->registry->output->formYesNo( "use_signatures", $sig_limits[0] );
$form['max_images'] = $this->registry->output->formInput( "max_images", $sig_limits[1] );
$form['max_dims'] = $this->registry->output->formSimpleInput( "max_dims_x", $sig_limits[2] ) . ' x ' . $this->registry->output->formSimpleInput( "max_dims_y", $sig_limits[3] );
$form['max_urls'] = $this->registry->output->formInput( "max_urls", $sig_limits[4] );
$form['max_lines'] = $this->registry->output->formInput( "max_lines", $sig_limits[5] );
$form['g_displayname_unit'] = $this->registry->output->formSimpleInput( "g_displayname_unit", $group['g_displayname_unit'], 3 );
$form['gbw_displayname_unit_type'] = $this->registry->output->formDropdown( "gbw_displayname_unit_type", $gbw_unit_type, $group['gbw_displayname_unit_type'] );
$form['g_sig_unit'] = $this->registry->output->formSimpleInput( "g_sig_unit", $group['g_sig_unit'], 3 );
$form['gbw_sig_unit_type'] = $this->registry->output->formDropdown( "gbw_sig_unit_type", $gbw_unit_type, $group['gbw_sig_unit_type'] );
$form['gbw_promote_unit_type'] = $this->registry->output->formDropdown( "gbw_promote_unit_type", $gbw_unit_type, $group['gbw_promote_unit_type'] );
$form['gbw_no_status_update'] = $this->registry->output->formYesNo( "gbw_no_status_update", $group['gbw_no_status_update'] );
if( $type == 'edit' )
{
$title = $this->lang->words['g_editing'] . $group['g_title'];
}
else
{
$title = $this->lang->words['g_adding'];
}
$IPBHTML = "";
//--starthtml--//
$IPBHTML .= <<<HTML
<div class='section_title'>
<h2>{$title}</h2>
</div>
<script type='text/javascript' src='{$this->settings['js_app_url']}ipsEditGroup.js'></script>
<script type='text/javascript'>
HTML;
foreach( $permission_masks as $d )
{
$IPBHTML .= " perms_{$d[0]} = '{$d[1]}';\n";
}
$IPBHTML .= <<<HTML
</script>
<form action='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do={$form_code}&amp;secure_key={$secure_key}' method='post' id='adform' name='adform' onsubmit='return checkform();'>
<input type='hidden' name='id' value='{$group['g_id']}' />
<ul id='tabstrip_group' class='tab_bar no_title'>
<li id='tabtab-GROUPS|1' class=''>{$this->lang->words['g_globalsett']}</li>
<li id='tabtab-GROUPS|2' class=''>{$this->lang->words['g_globalperm']}</li>
HTML;
// Got blocks from other apps?
$IPBHTML .= implode( "\n", $content['tabs'] );
$semaillimit = sprintf( $this->lang->words['g_semail_limit'], $form['join_limit'] );
$semailflood = sprintf( $this->lang->words['g_semail_flood'], $form['join_flood'] );
$pmlimit = sprintf( $this->lang->words['g_pm_limit'], $form['g_pm_perday'] );
$pmflood = sprintf( $this->lang->words['g_pm_flood'], $form['g_pm_flood_mins'] );
$_firstTab = ( $firsttab ) ? '\'GROUPS|' . $firsttab . "'" : "''";
$IPBHTML .= <<<HTML
</ul>
<script type="text/javascript">
//<![CDATA[
document.observe("dom:loaded",function()
{
ipbAcpTabStrips.first_on_load = $_firstTab;
ipbAcpTabStrips.register('tabstrip_group');
});
//]]>
</script>
<div class='acp-box'>
<div id='tabpane-GROUPS|1'>
<table width='100%' cellpadding='0' cellspacing='0' class='form_table alternate_rows double_pad'>
<tr>
<th colspan='2'>{$this->lang->words['gt_details']}</th>
</tr>
<tr>
<td style='width: 40%'>
<label>{$this->lang->words['g_gtitle']}</label>
</td>
<td style='width: 60%'>
{$form['g_title']}
</td>
</tr>
<tr>
<td>
<label>{$this->lang->words['g_gicon']}</label><br />
<span class='desctext'>{$this->lang->words['g_gicon_info']}</span>
</td>
<td>
{$form['g_icon']}
</td>
</tr>
<tr>
<td>
<label>{$this->lang->words['g_gformpre']}</label><br />
<span class='desctext'>{$this->lang->words['g_gformpre_info']}</span>
</td>
<td>
{$form['prefix']}
</td>
</tr>
<tr>
<td>
<label>{$this->lang->words['g_gformsuf']}</label><br />
<span class='desctext'>{$this->lang->words['g_gformsuf_info']}</span>
</td>
<td>
{$form['suffix']}
</td>
</tr>
<tr>
<th colspan='2'>{$this->lang->words['gt_permissions']}</th>
</tr>
<tr>
<td>
<label>{$this->lang->words['g_permset']}</label><br />
<span class='desctext'>{$this->lang->words['g_permset_info']}</span>
</td>
<td>
{$form['permid']}
</td>
</tr>
<tr>
<td>
<label>{$this->lang->words['g_newpermset']}</label><br />
<span class='desctext'>{$this->lang->words['g_newpermset_info']}</span>
</td>
<td>
{$form['g_new_perm_set']}
</td>
</tr>
<tr class='guest_legend'>
<td>
<label>{$this->lang->words['g_hide']}</label>
{$guest_legend}
</td>
<td>
{$form['g_hide_from_list']}
</td>
</tr>
<tr class='guest_legend'>
<td>
<label>{$this->lang->words['g_hide_online']}</label>
{$guest_legend}
</td>
<td>
{$form['g_hide_online_list']}
</td>
</tr>
<tr>
<th colspan='2'>{$this->lang->words['gt_display_name']}</th>
</tr>
<tr>
<td>
<label>{$this->lang->words['g_dmax']}</label><br />
<span class='desctext'>{$this->lang->words['g_dmax_info']}</span>
</td>
<td>
<p>{$form['g_dname_changes']} &nbsp; {$this->lang->words['g_when']} {$form['g_displayname_unit']} {$form['gbw_displayname_unit_type']}</p>
<p style='color:gray;font-size:0.8em'>{$this->lang->words['g_limit_dd']}</p>
</td>
</tr>
<tr>
<td>
<label>{$this->lang->words['g_dlimit']}</label><br />
<span class='desctext'>{$this->lang->words['g_dlimit_info']}</span>
</td>
<td>
{$form['g_dname_date']}
</td>
</tr>
<tr class='guest_legend'>
<th colspan='2'>{$this->lang->words['gt_access_control']}</th>
</tr>
<tr class='guest_legend'>
<td>
<label>{$this->lang->words['g_msup']}</label>
{$guest_legend}
</td>
<td>
{$form['g_is_supmod']}
</td>
</tr>
<tr class='guest_legend'>
<td>
<label>{$this->lang->words['g_macp']}</label>
{$guest_legend}
</td>
<td>
{$form['g_access_cp']}
</td>
</tr>
<tr class='guest_legend'>
<th colspan='2'>{$this->lang->words['gt_promotion']}</th>
</tr>
<tr class='guest_legend'>
<td>
<label>{$this->lang->words['g_mpromote']}</label><br />
{$guest_legend}
<span class='desctext'>{$this->registry->output->javascriptHelpLink('mg_promote')}</span>
</td>
<td>
HTML;
if( $group['g_access_cp'] )
{
$IPBHTML .= "{$this->lang->words['g_mpromote_no']}";
}
else
{
$promotegrouptxt = sprintf( $this->lang->words['g_mpromote_to'], $form['g_promotion_id'], $form['g_promotion_posts'], $form['gbw_promote_unit_type'] );
$IPBHTML .= "{$promotegrouptxt}";
}
$IPBHTML .= <<<HTML
</td>
</tr>
</table>
</div>
<div id='tabpane-GROUPS|2'>
<table class='form_table alternate_rows double_pad' cellspacing='0'>
<tr>
<th colspan='2'>{$this->lang->words['gt_access_permissions']}</th>
</tr>
<tr>
<td style='width: 40%'>
<label>{$this->lang->words['g_ssite']}</label>
</td>
<td style='width: 60%'>
{$form['g_view_board']}
</td>
</tr>
<tr>
<td>
<label>{$this->lang->words['g_soffline']}</label>
</td>
<td>
{$form['g_access_offline']}
</td>
</tr>
<tr>
<td>
<label>{$this->lang->words['g_sprofile']}</label>
</td>
<td>
{$form['g_mem_info']}
</td>
</tr>
<tr class='guest_legend'>
<td>
<label>{$this->lang->words['g_addfriends']}{$guest_legend}</label>
</td>
<td>
{$form['g_can_add_friends']}
</td>
</tr>
<tr class='guest_legend'>
<td>
<label>{$this->lang->words['g_editprofile']}</label>
{$guest_legend}
</td>
<td>
{$form['g_edit_profile']}
</td>
</tr>
<tr class='guest_legend'>
<td>
<label>{$this->lang->words['g_shtml']}</label><br />
{$guest_legend}
<span class='desctext'>{$this->registry->output->javascriptHelpLink('mg_dohtml')}</span>
</td>
<td>
{$form['g_dohtml']}
</td>
</tr>
<tr class='guest_legend'>
<td>
<label>{$this->lang->words['g_semail']}</label><br />
{$guest_legend}
<span class='desctext'>{$this->lang->words['g_semail_info']}</span>
</td>
<td>
{$form['g_email_friend']}
<br />{$semaillimit}
<br />{$semailflood}
</td>
</tr>
<tr class='guest_legend'>
<td>
<label>{$this->lang->words['g_uav']}</label>
{$guest_legend}
</td>
<td>
{$form['g_avatar_upload']}
</td>
</tr>
<tr class='guest_legend'>
<td>
<label>{$this->lang->words['g_sbadword']}</label>
{$guest_legend}
</td>
<td>
{$form['g_bypass_badwords']}
</td>
</tr>
<tr class='guest_legend'>
<td>
<label>{$this->lang->words['g_no_status']}</label>
{$guest_legend}
</td>
<td>
{$form['gbw_no_status_update']}
</td>
</tr>
<tr>
<th colspan='2'>{$this->lang->words['gt_search']}</th>
</tr>
<tr>
<td>
<label>{$this->lang->words['g_ssearch']}</label>
</td>
<td>
{$form['g_use_search']}
</td>
</tr>
<tr>
<td>
<label>{$this->lang->words['g_sflood']}</label><br />
<span class='desctext'>{$this->lang->words['g_sflood_info']}</span>
</td>
<td>
{$form['g_search_flood']}
</td>
</tr>
<tr class='guest_legend'>
<th colspan='2'>{$this->lang->words['gt_pms']}</th>
</tr>
<tr class='guest_legend'>
<td>
<label>{$this->lang->words['g_spm']}</label><br />
{$guest_legend}
<span class='desctext'>{$this->lang->words['g_spmperday_info']}</span>
</td>
<td>
{$form['g_use_pm']}
<br />{$pmlimit}
<br />{$pmflood}
</td>
</tr>
<tr class='guest_legend'>
<td>
<label>{$this->lang->words['g_spmmax']}</label><br />
{$guest_legend}
<span class='desctext'>{$this->lang->words['g_spmmax_info']}</span>
</td>
<td>
{$form['g_max_mass_pm']}
</td>
</tr>
<tr class='guest_legend'>
<td>
<label>{$this->lang->words['g_spmmaxstor']}</label>
{$guest_legend}
</td>
<td>
{$form['g_max_messages']}
</td>
</tr>
<tr class='guest_legend'>
<td>
<label>{$this->lang->words['g_upm']}</label>
{$guest_legend}
</td>
<td>
{$form['g_can_msg_attach']}
</td>
</tr>
<tr>
<th colspan='2'>{$this->lang->words['gt_reps']}</th>
</tr>
<tr>
<td>
<label>{$this->lang->words['g_repmaxpos']}</label><br />
<span class='desctext'>{$this->lang->words['g_repnum_info']}</span>
</td>
<td>
{$form['g_rep_max_positive']}
</td>
</tr>
<tr>
<td>
<label>{$this->lang->words['g_repmaxneg']}</label><br />
<span class='desctext'>{$this->lang->words['g_repnum_info']}</span>
</td>
<td>
{$form['g_rep_max_negative']}
</td>
</tr>
<tr>
<th colspan='2'>{$this->lang->words['gt_sigs']}</th>
</tr>
<tr>
<td>
<label>{$this->lang->words['g_usesigs']}</label>
</td>
<td>
<p>{$form['use_signatures']} &nbsp; {$this->lang->words['g_until']} {$form['g_sig_unit']} {$form['gbw_sig_unit_type']}</p>
<p style='color:gray;font-size:0.8em'>{$this->lang->words['g_limit_dd']}</p>
</td>
</tr>
<tr>
<td>
<label>{$this->lang->words['g_sigmaximages']}</label>
</td>
<td>
{$form['max_images']}
</td>
</tr>
<tr>
<td>
<label>{$this->lang->words['g_sigmaxdims']}</label>
</td>
<td>
{$form['max_dims']}
</td>
</tr>
<tr>
<td>
<label>{$this->lang->words['g_sigmaxurls']}</label>
</td>
<td>
{$form['max_urls']}
</td>
</tr>
<tr>
<td>
<label>{$this->lang->words['g_sigmaxtext']}</label>
</td>
<td>
{$form['max_lines']}
</td>
</tr>
<tr>
<th colspan='2'>{$this->lang->words['gt_uploads']}</th>
</tr>
<tr>
<td>
<label>{$this->lang->words['g_uglobal']}</label><br />
<span class='desctext'>{$this->registry->output->javascriptHelpLink('mg_upload')}<br />{$this->lang->words['g_uglobal_info']}</span>
</td>
<td>
{$form['g_attach_max']}
{$this->lang->words['g_inkb']} ({$this->lang->words['g_ucurrently']}{$group['g_attach_maxdis']})
<br />{$this->lang->words['g_usingle']}{$ini_max}
</td>
</tr>
<tr>
<td>
<label>{$this->lang->words['g_upost']}</label><br />
<span class='desctext'>{$this->registry->output->javascriptHelpLink('mg_upload')}<br />{$this->lang->words['g_upost_info']}</span>
</td>
<td>
{$form['g_attach_per_post']}
{$this->lang->words['g_inkb']} ({$this->lang->words['g_ucurrently']}{$group['g_attach_per_postdis']})
<br />{$this->lang->words['g_usingle']}{$ini_max}
</td>
</tr>
<tr class='guest_legend'>
<td>
<label>{$this->lang->words['g_upersonalpho']}</label><br />
{$guest_legend}
<span class='desc'>{$this->lang->words['g_upersonalpho_l']}</span>
</td>
<td>
{$form['p_max']}{$this->lang->words['g_inkb']}
<br />{$this->lang->words['g_upersonalpho_w']}{$form['p_width']} x {$this->lang->words['g_upersonalpho_h']}{$form['p_height']}
</td>
</tr>
</table>
</div>
HTML;
// Got blocks from other apps?
$IPBHTML .= implode( "\n", $content['area'] );
$IPBHTML .= <<<HTML
<div class='acp-actionbar'>
<input type='submit' value=' {$button} ' class='realbutton' />
</div>
</div>
</form>
<script type="text/javascript">
HTML;
if( $group['g_id'] == $this->settings['guest_group'] )
{
$IPBHTML .= "stripGuestLegend();";
}
$IPBHTML .= <<<HTML
</script>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Overview of groups
*
* @access public
* @param string Groups HTML
* @param array Groups
* @return string HTML
*/
public function groupsOverviewWrapper( $content, $g_array ) {
$new_dd = $this->registry->output->formDropdown( "id", $g_array, 3 );
$IPBHTML = "";
//--starthtml--//
$leSigh = ( $this->request['showSecondary'] ) ? ' class="closed"' : '';
$leBigh = ( $this->request['showSecondary'] ) ? 0 : 1;
$IPBHTML .= <<<HTML
<div class='section_title'>
<h2>{$this->lang->words['g_title']}</h2>
</div>
<div class='acp-box'>
<h3>{$this->lang->words['g_usergroupman']}</h3>
<table class='alternate_rows double_pad' width='100%'>
<tr>
<th width='1%'>&nbsp;</th>
<th width='30%'>{$this->lang->words['g_grouptitle']}</th>
<th width='15%' align='center' style='text-align:center'>{$this->lang->words['g_canaccessacp']}</th>
<th width='15%' align='center' style='text-align:center'>{$this->lang->words['g_issupermod']}</th>
<th width='10%' align='center' style='text-align:center'>{$this->lang->words['g_membercount']}</th>
<th width='1%'>&nbsp;</th>
</tr>
{$content}
</table>
</div>
<br />
<div class='section_title'>
<ul class='context_menu'>
<li{$leSigh}>
<a href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=groups_overview&amp;showSecondary={$leBigh}'><img src='{$this->settings['skin_acp_url']}/_newimages/icons/cog.png' /> {$this->lang->words['g_calc_with_secondary']}</a>
</li>
</ul>
</div>
<br />
<form action='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=add' 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['g_createnew']}</h3>
<table cellpadding='4' cellspacing='0' width='100%'>
<tr>
<th width='40%'>{$this->lang->words['g_basenewon']}</th>
<th width='60%'>{$new_dd}</th>
</tr>
</table>
<div class='acp-actionbar'>
<div class='centeraction'>
<input type='submit' value='{$this->lang->words['g_createbutton']}' class='button primary' />
</div>
</div>
</div>
</form>
HTML;
if ( IN_DEV )
{
$IPBHTML .= "<br /><div><a href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=master_xml_export'>Экспортировать XML</a></div>";
}
//--endhtml--//
return $IPBHTML;
}
/**
* Group row
*
* @access public
* @param array Group
* @return string HTML
*/
public function groupsOverviewRow( $r="" ) {
$IPBHTML = "";
//--starthtml--//
$r['_can_acp_img'] = $r['_can_acp'] ? 'accept.png' : 'cross.png';
$r['_can_supmod_img'] = $r['_can_supmod'] ? 'accept.png' : 'cross.png';
$r['_title'] = IPSLib::makeNameFormatted( $r['g_title'], $r['g_id'] );
$IPBHTML .= <<<HTML
<tr>
<td><img src='{$this->settings['skin_acp_url']}/_newimages/icons/group.png' border='0' /></td>
<td><a href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=edit&amp;id={$r['g_id']}' style='font-weight:bold'>{$r['_title']}</a> <small>({$this->lang->words['g_id']}: {$r['g_id']})</small></td>
<td align='center'><img src='{$this->settings['skin_acp_url']}/_newimages/icons/{$r['_can_acp_img']}' border='0' alt='-' class='ipd' /></td>
<td align='center'><img src='{$this->settings['skin_acp_url']}/_newimages/icons/{$r['_can_supmod_img']}' border='0' alt='-' class='ipd' /></td>
<td align='center'>
HTML;
if ( $r['g_id'] != $this->settings['guest_group'] )
{
$IPBHTML .= <<<HTML
<a href='{$this->settings['_base_url']}app=members&amp;section=members&amp;module=members&amp;__update=1&amp;f_primary_group={$r['g_id']}' title='{$this->lang->words['g_listusers']}'>{$r['count']}</a>
HTML;
}
else
{
$IPBHTML .= <<<HTML
{$r['count']}
HTML;
}
$IPBHTML .= <<<HTML
</td>
<td align='right'>
<img id="menu{$r['g_id']}" src='{$this->settings['skin_acp_url']}/_newimages/menu_open.png' border='0' alt='{$this->lang->words['a_options']}' class='ipbmenu' />
<ul class='acp-menu' id='menu{$r['g_id']}_menucontent'>
<li class='icon edit'><a href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=edit&amp;id={$r['g_id']}'>{$this->lang->words['g_editg']}</a></li>
HTML;
if ( ! in_array( $r['g_id'], array( $this->settings['auth_group'], $this->settings['guest_group'], $this->settings['member_group'] ) ) )
{
$IPBHTML .= <<<HTML
<li class='icon delete'><a href='#' onclick='return acp.confirmDelete("{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=delete&amp;_admin_auth_key={$this->registry->getClass('adminFunctions')->_admin_auth_key}&amp;id={$r['g_id']}");'>{$this->lang->words['g_deleteg']}</a></li>
HTML;
}
else
{
$IPBHTML .= <<<HTML
<li class='icon delete'>{$this->lang->words['g_cannotdel']}</li>
HTML;
}
$IPBHTML .= <<<HTML
</ul>
</td>
</tr>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Delete group confirmation
*
* @access public
* @param array Group
* @param int Members with this group as primary group
* @param int Members with this group as secondary group
* @return string HTML
*/
public function groupDelete( $group, $primary=0, $secondary=0 ) {
$IPBHTML = "";
//--starthtml--//
//-----------------------------------------
// Grab group, and other groups
//-----------------------------------------
$mem_groups = array();
foreach( $this->caches['group_cache'] as $g_id => $r )
{
if( $g_id == $group['g_id'] )
{
continue;
}
$mem_groups[] = array( $r['g_id'], $r['g_title'] );
}
$dropDown = $this->registry->output->formDropdown( "to_id", $mem_groups, $this->settings['member_group'] );
$IPBHTML .= <<<HTML
<div class='section_title'>
<h2>{$this->lang->words['g_deleting']}</h2>
</div>
<div class='acp-box'>
<h3>{$this->lang->words['g_removeconf']}{$group['g_title']}</h3>
<form name='theAdminForm' id='adminform' action='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=dodelete' method='post'>
<input type='hidden' name='id' value='{$group['g_id']}' />
<input type='hidden' name='_admin_auth_key' value='{$this->registry->getClass('adminFunctions')->_admin_auth_key}' />
<table class='alternate_rows' width='100%'>
<tr>
<td width='40%'>{$this->lang->words['g_numusers']}</td>
<td width='60%'>
<a href='{$this->settings['_base_url']}&amp;app=members&amp;module=members&amp;section=members&amp;__update=1&amp;f_primary_group={$group['g_id']}'>{$primary}</a>
</td>
</tr>
<tr>
<td width='40%'>{$this->lang->words['g_numusers_sec']}</td>
<td width='60%'>
<a href='{$this->settings['_base_url']}&amp;app=members&amp;module=members&amp;section=members&amp;__update=1&amp;f_secondary_group={$group['g_id']}'>{$secondary}</a>
</td>
</tr>
<tr>
<td width='40%'>{$this->lang->words['g_moveusersto']}</td>
<td width='60%'>{$dropDown}</td>
</tr>
</table>
<div class='acp-actionbar'>
<div class='centeraction'>
<input type='submit' class='button primary' value=' {$this->lang->words['g_deletebutton']} ' />
</div>
</div>
</form>
</div>
HTML;
//--endhtml--//
return $IPBHTML;
}
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,344 @@
<?php
/**
* Invision Power Services
* IP.Board v3.0.5
* ACP member forms skin file
* Last Updated: $Date: 2009-04-03 05:25:46 -0400 (Fri, 03 Apr 2009) $
*
* @author $Author: matt $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.iinvisionpower.com/community/board/license.html
* @package Invision Power Board
* @subpackage Members
* @link http://www.iinvisionpower.com
* @since 20th February 2002
* @version $Rev: 4398 $
*
*/
class cp_skin_member_form extends output
{
/**
* Prevent our main destructor being called by this class
*
* @access public
* @return void
*/
public function __destruct()
{
}
/**
* Ban member dhtml window
*
* @access public
* @param array Member data
* @param array Form data
* @return string HTML
*/
public function inline_ban_member_form( $member, $form )
{
$IPBHTML = "";
$IPBHTML .= <<<EOF
<form action='{$this->settings['base_url']}&amp;module=members&amp;section=members&amp;do=ban_member&amp;member_id={$member['member_id']}' method='post'>
<div class='acp-box'>
<h3>{$this->lang->words['sm_banmanage']}</h3>
<ul class='acp-form'>
<li>
{$form['member']}
{$this->lang->words['mf_banperm']}
</li>
<li>
{$form['groups_confirm']}
{$this->lang->words['mf_movefrom']} '{$member['_group_title']}' {$this->lang->words['mf_to']}<br />
<span style='margin-left: 25px;'>{$form['groups']}</span>
</li>
<li>
{$form['email']}
{$this->lang->words['mf_banemail']} '{$member['email']}'
</li>
<li>
{$form['name']}
{$this->lang->words['mf_banname']} '{$member['name']}'
</li>
EOF;
if( $form['ips'] && count( $form['ips'] ) )
{
$IPBHTML .= "<li><label class='head'>IP адреса</label></li>";
foreach( $form['ips'] as $ip => $form_field )
{
$IPBHTML .= <<<EOF
<li style='padding-left: 25px;'>
{$form_field}
{$this->lang->words['mf_banip']} '{$ip}'
</li>
EOF;
}
}
$IPBHTML .= <<<EOF
<li>
{$form['note']}
{$this->lang->words['mf_addnote']} <span style='font-weight:normal;'>[<a href='#' onclick="return acp.openWindow('{$this->settings['board_url']}/index.php?app=members&amp;module=warn&amp;section=warn&amp;mid={$member['member_id']}&amp;do=view&amp;popup=1','980','600'); return false;">{$this->lang->words['mf_viewnotes']}</a>]</span>
<br />
<div style='margin-top: 5px'>{$form['note_field']}</div>
</li>
<li>
<a href='{$this->settings['base_url']}&amp;module=members&amp;section=members&amp;do=banmember&amp;member_id={$member['member_id']}'>{$this->lang->words['mf_clickhere']}</a> {$this->lang->words['mf_tosuspend']}<br />
{$this->lang->words['mf_justor']} <a href='#' onclick="new Effect.Fade( $('inlineFormWrap'), {duration: 0.3} ); acp.members.goToTab( 'tabtab-MEMBERS|7' ); return false;">{$this->lang->words['mf_clickhere']}</a> {$this->lang->words['mf_topostrestrict']}
</li>
</ul>
<div class='acp-actionbar'>
<input type='submit' value=' {$this->lang->words['mf_alterban']} ' class='realbutton' />
</div>
</div>
</form>
EOF;
return $IPBHTML;
}
/**
* Edit email dhtml window
*
* @access public
* @param array Member data
* @return string HTML
*/
public function inline_email( $member )
{
$IPBHTML = "";
$IPBHTML .= <<<EOF
<script type='text/javascript'>
acp.members.fields['MF__email'] = {};
acp.members.fields['MF__email']['fields'] = $A(['email']);
acp.members.fields['MF__email']['url'] = "app=members&amp;module=ajax&amp;section=editform&amp;do=save_email&amp;member_id={$member['member_id']}";
acp.members.fields['MF__email']['callback'] = function( t, json ){
$('MF__email').innerHTML = json['email'];
new Effect.Pulsate( $('MF__email'), { pulses: 3 } );
}
</script>
<div class='acp-box'>
<h3>{$this->lang->words['mem_ajfo_email']}</h3>
<ul class='acp-form'>
<li>
<label for='email'>{$this->lang->words['mem_ajfo_email1']}</label>
<input type='text' size='30' id='email' name='email' value="{$member['email']}" class='input_text' />
</li>
</ul>
<div class='acp-actionbar'>
<input type='submit' value='{$this->lang->words['mf_save']}' class='realbutton' id='MF__email_save' />
</div>
</div>
EOF;
return $IPBHTML;
}
/**
* Upload photo dhtml window
*
* @access public
* @param array Member data
* @return string HTML
*/
public function inline_form_new_photo( $member )
{
$IPBHTML = "";
$IPBHTML .= <<<EOF
<form action='{$this->settings['base_url']}&amp;module=members&amp;section=members&amp;do=new_photo&amp;member_id={$member['member_id']}' method='post' enctype='multipart/form-data'>
<div class='acp-box'>
<h3>{$this->lang->words['mem_ajfo_photo']}</h3>
<ul class='acp-form'>
<li>
<label for='upload_photo'>{$this->lang->words['mf_newphoto']}</label>
<input type='file' size='30' id='upload_photo' name='upload_photo' />
</li>
</ul>
<div class='acp-actionbar'>
<input type='submit' value='{$this->lang->words['mf_save']}' class='realbutton' />
</div>
</div>
</form>
<!--
<div class='inlineFormEntry'>
<div class='inlineFormLabel'>
{$this->lang->words['mf_newphoto']}
</div>
<div class='inlineFormInput'>
<input type='file' size='30' id='upload_photo' name='upload_photo' />
</div>
</div>
<div class='inlineFormSubmit'><input type='submit' value=' {$this->lang->words['mf_upload']} ' /></div>
</form>-->
EOF;
return $IPBHTML;
}
/**
* Edit password dhtml window
*
* @access public
* @param array Member data
* @return string HTML
*/
public function inline_password( $member )
{
$IPBHTML = "";
$_form_new_salt = ipsRegistry::getClass('output')->formYesNo( "new_salt", 1 );
$_form_new_pepper = ipsRegistry::getClass('output')->formYesNo( "new_key" , 1 );
$IPBHTML .= <<<EOF
<script type='text/javascript'>
acp.members.fields['MF__password'] = {};
acp.members.fields['MF__password']['fields'] = $A(['password', 'password2', 'new_salt', 'new_key']);
acp.members.fields['MF__password']['url'] = "app=members&amp;module=ajax&amp;section=editform&amp;do=save_password&amp;member_id={$member['member_id']}";
acp.members.fields['MF__password']['callback'] = function( t, json ){
$('MF__password').innerHTML = json['password'];
new Effect.Pulsate( $('MF__password'), { pulses: 3 } );
}
</script>
<div class='acp-box'>
<h3>{$this->lang->words['mem_ajfo_password']}</h3>
<ul class='acp-form'>
<li>
<label for='password'>{$this->lang->words['mem_ajfo_password1']}</label>
<input type='password' size='30' id='password' name='password' class='input_text' />
</li>
<li>
<label for='password2'>{$this->lang->words['mem_ajfo_password2']}</label>
<input type='password' size='30' id='password2' name='password2' class='input_text' />
</li>
<li>
<label for='new_key'>{$this->lang->words['mem_afjo_new_key']}<br /><span class='desctext'>{$this->lang->words['mem_afjo_new_key_desc']}</span></label>
{$_form_new_pepper}
</li>
<li>
<label for='new_key'>{$this->lang->words['mem_afjo_new_salt']}</label>
{$_form_new_salt}
</li>
</ul>
<div class='acp-actionbar'>
<input type='submit' value='{$this->lang->words['mf_save']}' class='realbutton' id='MF__password_save' />
</div>
</div>
EOF;
return $IPBHTML;
}
/**
* Change name dhtml window
*
* @access public
* @param array Member data
* @return string HTML
*/
public function inline_form_name( $member )
{
$IPBHTML = "";
$_form_send_email = ipsRegistry::getClass('output')->formYesNo( "send_email", 1 );
$_form_email_contents = ipsRegistry::getClass('output')->formTextarea( "email_contents", $this->lang->words['mem_afjo_email_contents'] );
$IPBHTML .= <<<EOF
<script type='text/javascript'>
acp.members.fields['MF__name'] = {};
acp.members.fields['MF__name']['fields'] = $A(['name', 'send_email', 'email_contents']);
acp.members.fields['MF__name']['url'] = "app=members&amp;module=ajax&amp;section=editform&amp;do=save_name&amp;member_id={$member['member_id']}";
acp.members.fields['MF__name']['callback'] = function( t, json ){
$('MF__name').innerHTML = json['display_name'];
new Effect.Pulsate( $('MF__name'), { pulses: 3 } );
}
</script>
<div class='acp-box'>
<h3>{$this->lang->words['mem_edit_login_name']}</h3>
<ul class='acp-form'>
<li>
<label for='name'>{$this->lang->words['mem_ajfo_name']}</label>
<input type='text' size='30' id='name' name='name' value='{$member['name']}' />
</li>
<li>
<label for=''>{$this->lang->words['mem_afjo_send_email']}</label>
{$_form_send_email}
</li>
<li style='text-align: center; padding: 10px;'>
{$_form_email_contents}
<br /><span class='desctext'>{$this->lang->words['mem_afjo_send_email_desc']}</span>
</li>
</ul>
<div class='acp-actionbar'>
<input type='submit' value='{$this->lang->words['mf_save']}' class='realbutton' id='MF__name_save' />
</div>
</div>
EOF;
return $IPBHTML;
}
/**
* Change display name dhtml window
*
* @access public
* @param array Member data
* @return string HTML
*/
public function inline_form_display_name( $member )
{
$IPBHTML = "";
$IPBHTML .= <<<EOF
<script type='text/javascript'>
acp.members.fields['MF__member_display_name'] = {};
acp.members.fields['MF__member_display_name']['fields'] = $A(['display_name']);
acp.members.fields['MF__member_display_name']['url'] = "app=members&amp;module=ajax&amp;section=editform&amp;do=save_display_name&amp;member_id={$member['member_id']}";
acp.members.fields['MF__member_display_name']['callback'] = function( t, json ){
$('MF__member_display_name').innerHTML = json['display_name'];
new Effect.Pulsate( $('MF__member_display_name'), { pulses: 3 } );
}
</script>
<div class='acp-box'>
<h3>{$this->lang->words['mem_edit_display_name']}</h3>
<ul class='acp-form'>
<li>
<label for='name'>{$this->lang->words['mem_display_name']}</label>
<input type='text' size='30' id='display_name' name='display_name' value='{$member['members_display_name']}' />
</li>
</ul>
<div class='acp-actionbar'>
<input type='submit' value='{$this->lang->words['mf_save']}' class='realbutton' id='MF__member_display_name_save' />
</div>
</div>
EOF;
return $IPBHTML;
}
}
@@ -0,0 +1,589 @@
<?php
/**
* Invision Power Services
* IP.Board v3.0.5
* ACP permissions skin file
* Last Updated: $Date: 2009-11-13 19:55:00 -0500 (Fri, 13 Nov 2009) $
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.iinvisionpower.com/community/board/license.html
* @package Invision Power Board
* @subpackage Members
* @link http://www.iinvisionpower.com
* @since 20th February 2002
* @version $Rev: 5405 $
*
*/
class cp_skin_permissions extends output
{
/**
* Prevent our main destructor being called by this class
*
* @access public
* @return void
*/
public function __destruct()
{
}
/**
* Confirmation page that perm set was removed
*
* @access public
* @param string Name
* @return string HTML
*/
public function permissionSetRemoveDone( $name ) {
$IPBHTML = "";
//--starthtml--//
$IPBHTML .= <<<HTML
<div class='tableheaderalt'>{$this->lang->words['per_result']}</div>
<table width='100%' cellspacing='0' cellpadding='5' align='center' border='0'>
<tr>
<td class='tablerow1' width='100%' valign='middle'>{$this->lang->words['per_removecustom']}<b>{$name}</b>.</td>
</tr>
</table>
</div>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Show users assigned to the perm mask
*
* @access public
* @param integer Perm mask id
* @param string Permission set name
* @param array Users with this mask
* @return string HTML
*/
public function permissionSetUsers( $perm_id, $set, $rows ) {
$IPBHTML = "";
//--starthtml--//
$IPBHTML .= <<<HTML
<div class='tableborder'>
<div class='tableheaderalt'>{$this->lang->words['per_membersusing']}{$set}</div>
<table width='100%' cellspacing='0' cellpadding='5' align='center' border='0'>
<tr>
<td class='tablesubheader' width='50%' align='center'>{$this->lang->words['per_userdetail']}</td>
<td class='tablesubheader' width='50%' align='center'>{$this->lang->words['per_action']}</td>
</tr>
HTML;
foreach( $rows as $r )
{
$also_using = '';
if ( $r['_extra'] )
{
$also_using = "<br />\n&#149;&nbsp;{$this->lang->words['per_alsousing']}{$r['_extra']}\n";
}
$IPBHTML .= <<<HTML
<tr>
<td class='tablerow1' width='50%' valign='middle'>
<div style='font-weight:bold;font-size:11px;padding-bottom:6px;margin-bottom:3px;border-bottom:1px solid #000'>{$r['members_display_name']}</div>
&#149;&nbsp;{$this->lang->words['per_posts']}{$r['posts']}<br />
&#149;&nbsp;{$this->lang->words['per_email']}{$r['email']}
{$also_using}
</td>
<td class='tablerow2' width='50%' valign='middle'>
&#149;&nbsp;<a href='{$this->settings['base_url']}{$this->form_code}do=remove_mask&amp;id={$r['member_id']}&amp;pid={$perm_id}' title='{$this->lang->words['per_removethis']}'>{$this->lang->words['per_removethisset']}</a><br />
&#149;&nbsp;<a href='{$this->settings['base_url']}{$this->form_code}do=remove_mask&amp;id={$r['member_id']}&amp;pid=all' title='{$this->lang->words['per_removeall']}'>{$this->lang->words['per_removeall']}</a><br /><br />
</td>
</tr>
HTML;
}
$IPBHTML .= <<<HTML
</table>
</div>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Permissions matrix
*
* @access public
* @param array Permission names
* @param array Compiled grids
* @param array Permissions checked
* @param array Colors
* @return string HTML
*/
public function permissionMatrix( $perm_names, $perm_matrix, $perm_checked, $colors )
{
$IPBHTML = "";
//--starthtml--//
$cols = count( $perm_names ) + 1;
$width = ceil( 83 / count( $perm_names ) );
$IPBHTML .= <<<HTML
<div class='acp-box'>
<h3>{$this->lang->words['frm_enterthematrix']}</h3>
<script type='text/javascript' src='{$this->settings['js_main_url']}acp.permissions2.js'></script>
<table cellpadding='0' cellspacing='0' border='0' class='permission_table' id='perm_matrix'>
<tr>
<th style='width: 13%'>&nbsp;</th>
HTML;
foreach( $perm_names as $k => $v )
{
$IPBHTML .= <<<HTML
<th style='width: {$width}%; text-align: center;'>{$v}</td>
HTML;
}
$IPBHTML .= <<<HTML
</tr>
<tr>
<td class='section' colspan='{$cols}'>{$this->lang->words['frm_global']}</td>
</tr>
<tr>
<td class='off'>&nbsp;</td>
HTML;
$col_num = 0;
foreach( $perm_names as $k => $v )
{
$col_num++;
$IPBHTML .= <<<HTML
<!-- Check an entire column -->
<td style='background-color:{$colors[$k]}' class='perm column' id='column_{$col_num}'>
{$v}<br />
<input type='checkbox' name='perms[$k][*]' id='col_{$col_num}' value='1'{$perm_checked['*'][$k]}>
</td>
HTML;
}
$IPBHTML .= <<<HTML
</tr>
HTML;
$row_num = 0;
foreach( $perm_matrix as $set => $row )
{
$set = explode( '%', $set );
$row_num++;
$col_num = 0;
$IPBHTML .= <<<HTML
<tr>
<td class='section' colspan='{$cols}'><strong>{$set[1]}</strong></td>
</tr>
<tr id='forum_row_{$row_num}'>
<td class='off'>
<input type='button' id='forum_select_row_1_{$row_num}' value=' + ' class='select_row' />&nbsp;
<input type='button' id='forum_select_row_0_{$row_num}' value=' &ndash; ' class='select_row' />
</td>
HTML;
foreach( $row as $key => $perm )
{
$col_num++;
$IPBHTML .= <<<HTML
<td class='perm' id='clickable_{$col_num}' style='background-color:{$colors[$key]}'>
{$perm}<br />
<input type='checkbox' name='perms[{$key}][{$set[0]}]' id='perm_{$row_num}_{$col_num}' value='1'{$perm_checked[$set[0]][$key]}>
</td>
HTML;
}
$IPBHTML .= <<<HTML
</tr>
HTML;
}
$IPBHTML .= <<<HTML
</table>
</div>
<script type='text/javascript'>
var permissions = new acp.permissions( { 'form': 'adminform', 'table': 'perm_matrix', 'app': 'forum' } );
</script>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Permission set matrix
*
* @access public
* @param array Perm names
* @param array Perm grids
* @param array Boxes to check
* @param array Colors
* @param string Application
* @param string Type
* @return string HTML
*/
public function permissionSetMatrix( $perm_names, $perm_matrix, $perm_checked, $colors, $app, $type )
{
$IPBHTML = "";
//--starthtml--//
if( !is_array( $perm_matrix ) || !count( $perm_matrix ) ){ return ''; }
$IPBHTML .= <<<HTML
<table cellpadding='0' cellspacing='0' border='0' class='permission_table' id='perm_matrix_{$app}'>
HTML;
if( is_array( $perm_names ) && count( $perm_names ) )
{
$col_num = 0;
$col_width = floor( 87 / count( $perm_names ) );
$IPBHTML .= <<<HTML
<tr>
<td style='padding: 0px;'>
<table cellpadding='0' cellspacing='0' border='0' width='100%'>
<tr>
<td style='width: 13%'>&nbsp;</td>
HTML;
foreach( $perm_names as $key => $text )
{
$col_num++;
$IPBHTML .= <<<HTML
<td class='perm' style='background-color: {$colors[$key]}; width: {$col_width}%'>
<input type='button' id='{$app}_select_col_1_{$col_num}' value=' + ' class='select_col' />&nbsp;
<input type='button' id='{$app}_select_col_0_{$col_num}' value=' &ndash; ' class='select_col' />
</td>
HTML;
}
$IPBHTML .= <<<HTML
</tr>
</table>
</td>
</tr>
HTML;
}
$row_num = 0;
foreach( $perm_matrix as $set => $row )
{
$set = explode( '%', $set );
$row_num++;
$IPBHTML .= <<<HTML
<tr>
<td class='section'><strong>{$set[1]}</strong></td>
</tr>
<tr>
<td style='padding: 0px;'>
<table cellpadding='0' cellspacing='0' border='0' width='100%'>
<tr id='{$app}_row_{$row_num}'>
<td class='off' style='width: 13%; text-align: right;'>
<input type='button' id='{$app}_select_row_1_{$row_num}' value=' + ' class='select_row' />&nbsp;
<input type='button' id='{$app}_select_row_0_{$row_num}' value=' &ndash; ' class='select_row' />
</td>
HTML;
$col_num = 0;
//$col_width = floor( 87 / count( $row ) );
foreach( $perm_names as $key => $perm )
{
$col_num++;
if( isset( $row[ $key ] ) )
{
$IPBHTML .= <<<HTML
<td class='perm' style='background-color:{$colors[$key]}; width: {$col_width}%'>
{$perm}<br />
<input type='checkbox' id='{$app}_{$col_num}_{$row_num}' name='perms[{$app}][{$type}][{$key}][{$set[0]}]' value='1'{$perm_checked[$set[0]][$key]}>
</td>
HTML;
}
else
{
$IPBHTML .= <<<HTML
<td class='perm' style='background-color:{$colors[$key]}; width: {$col_width}%'>
<em class='desctext'>{$this->lang->words['per_notused']}</em>
</td>
HTML;
}
}
$IPBHTML .= <<<HTML
</tr>
</table>
</td>
</tr>
HTML;
}
$IPBHTML .= <<<HTML
</table>
<script type='text/javascript'>
perms["{$app}"] = new acp.permissions( { 'form': 'adminform', 'table': 'perm_matrix_{$app}', 'app': '{$app}' } );
</script>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Show dialog to advise user to apply group restrictions
*
* @access public
* @return string HTML
*/
public function groupAdminConfirm( $group_id ) {
$IPBHTML = "";
//--starthtml--//
$IPBHTML .= <<<HTML
<!--SKINNOTE: Not yet skinned-->
<div class='tableborder'>
<div class='tableheaderalt'>{$this->lang->words['sm_configrest']}</div>
<div class='tablerow1'>
{$this->lang->words['sm_detectacp']}
<br /><br />
{$this->lang->words['sm_setrestrict']}
</div>
<div class='tablesubheader' align='center'>
<span class='fauxbutton'><a href='{$this->settings['base_url']}&amp;{$this->form_code}'>{$this->lang->words['sm_nothanks']}</a></span>&nbsp;&nbsp;
<span class='fauxbutton'><a href='{$this->settings['base_url']}&amp;module=restrictions&amp;section=restrictions&amp;do=acpperms-group-add-complete&amp;entered_group={$group_id}'>{$this->lang->words['sm_yesplease']}</a></span>
</div>
</div>
<br />
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Edit permissions mask
*
* @access public
* @param string Set name
* @param array Perm grids
* @param integer Id
* @param array Applications
* @return string HTML
*/
public function permissionEditor( $set_name, $perm_matricies, $id, $apps ) {
$IPBHTML = "";
//--starthtml--//
$i = 1;
$IPBHTML .= <<<HTML
<script type="text/javascript">
//<![CDATA[
document.observe("dom:loaded",function()
{
ipbAcpTabStrips.register('tab_perms');
});
//]]>
</script>
<div class='section_title'>
<h2>{$set_name}</h2>
</div>
<script type='text/javascript' src='{$this->settings['js_main_url']}acp.permissions2.js'></script>
<script type='text/javascript'>
var perms = {};
</script>
<form action='{$this->settings['base_url']}{$this->form_code}do=do_edit_set&amp;id={$this->request['id']}' method='post' id='adminform'>
<input type='hidden' name='_from' value='{$this->request['_from']}' />
<div class='acp-box'>
<h3>{$this->lang->words['per_editset']}</h3>
<table class='alternate_rows' width='100%'>
<tr>
<td>{$this->lang->words['per_setname']}</td>
<td><input type='text' class='input' size='30' name='perm_name' value='{$set_name}' /></td>
</tr>
</table>
</div>
<br />
HTML;
foreach( $apps as $app => $type )
{
$IPBHTML .= <<<HTML
<input type='hidden' name='apps[{$app}][{$type}]' value='1' />
HTML;
}
$IPBHTML .= <<<HTML
<input type='hidden' name='_admin_auth_key' value='{$this->registry->adminFunctions->getSecurityKey()}' />
<ul id='tab_perms' class='tab_bar no_title'>
HTML;
foreach( $perm_matricies as $type => $matrix )
{
if( !$matrix ){ continue; }
$IPBHTML .= " <li id='tabtab-MEMBERS|" . $i ."' class=''>" . $type . "</li>";
$i++;
}
$IPBHTML .= <<<HTML
</ul>
HTML;
$i = 1;
foreach( $perm_matricies as $type => $matrix )
{
if( !$matrix ){ continue; }
$IPBHTML .= <<<HTML
<div id='tabpane-MEMBERS|{$i}'>
{$matrix}
</div>
HTML;
$i++;
}
$IPBHTML .= <<<HTML
<div class='acp-actionbar'><input type='submit' value='{$this->lang->words['frm_savechanges']}' class='realbutton' /></div>
<br style='clear: both' />
</form>
<br /><br /><br /><br /><br />
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Mask splash page
*
* @access public
* @param array Masks
* @param string Dropdown lsit
* @return string HTML
*/
public function permissionsSplash( $rows, $dlist ) {
$IPBHTML = "";
//--starthtml--//
$IPBHTML .= <<<HTML
<div class='section_title'>
<h2>{$this->lang->words['per_title']}</h2>
</div>
<div class='acp-box'>
<h3>{$this->lang->words['per_setname']}</h3>
<table class='alternate_rows' width='100%'>
<tr>
<th width='20%'>{$this->lang->words['per_name']}</th>
<th width='15%'>{$this->lang->words['per_usedgroups']}</th>
<th width='20%'>{$this->lang->words['per_usedmembers']}</th>
<th width='1%'>&nbsp;</th>
</tr>
HTML;
/* ROW */
foreach( $rows as $r )
{
$IPBHTML .= <<<HTML
<tr>
<td><strong>{$r['name']}</strong></td>
<td>{$r['groups']}</td>
<td align='right'>
HTML;
if ( $r['mems'] > 0 )
{
$IPBHTML .= <<<HTML
{$r['mems']} (<a href='#' onclick='return acp.openWindow("{$this->settings['base_url']}{$this->form_code_js}do=view_perm_users&amp;id={$r['id']}", "{$this->lang->words['per_user']}", "500","350");' title='{$this->lang->words['per_viewnames']}'>{$this->lang->words['per_view']}</a>)
HTML;
}
else
{
$IPBHTML .= <<<HTML
{$this->lang->words['per_nomember']}
HTML;
}
$IPBHTML .= <<<HTML
</td>
<td class='tablerow1' align='center'>
<img id="menu{$r['id']}" src='{$this->settings['skin_acp_url']}/_newimages/menu_open.png' border='0' alt='{$this->lang->words['per_options']}' class='ipbmenu' />
<ul class='acp-menu' id='menu{$r['id']}_menucontent'>
<li class='icon edit'><a href='{$this->settings['base_url']}{$this->form_code}do=edit_set_form&amp;id={$r['id']}'>{$this->lang->words['per_editset']}</a></li>
HTML;
if ( ! $r['isactive'] )
{
$IPBHTML .= <<<HTML
<li class='icon delete'><a href='#' onclick='return acp.confirmDelete("{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=delete_set&amp;id={$r['id']}");'>{$this->lang->words['per_deleteset']}</a></li>
HTML;
}
else
{
$IPBHTML .= <<<HTML
<li class='icon delete'>{$this->lang->words['per_inuse']}</li>
HTML;
}
$IPBHTML .= <<<HTML
</ul>
</td>
</tr>
HTML;
}
/* / ROW */
$IPBHTML .= <<<HTML
</table>
</div>
<br />
<form name='theAdminForm' id='adminform' action='{$this->settings['base_url']}{$this->form_code}' method='post'>
<input type='hidden' name='do' value='do_create_set' />
<input type='hidden' name='_admin_auth_key' value='{$this->registry->adminFunctions->_admin_auth_key}' />
<div class='acp-box'>
<h3>{$this->lang->words['per_createnew']}</h3>
<table class='alternate_rows' width='100%'>
<tr>
<td>{$this->lang->words['per_setname']}</td>
<td><input type='text' class='input' size='30' name='new_perm_name' /></td>
</tr>
<tr>
<td>{$this->lang->words['per_baseon']}</td>
<td><select name='new_perm_copy' class='dropdown'>{$dlist}</select></td>
</tr>
</table>
<div class='acp-actionbar'>
<div class='centeraction'>
<input type='submit' value='{$this->lang->words['per_createbutton']}' class='button primary' />
</div>
</div>
</div>
</form>
HTML;
//--endhtml--//
return $IPBHTML;
}
}
@@ -0,0 +1,517 @@
<?php
/**
* Invision Power Services
* IP.Board v3.0.5
* ACP profile fields skin file
* Last Updated: $Date: 2009-07-06 03:32:52 -0400 (Mon, 06 Jul 2009) $
*
* @author $Author: matt $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.iinvisionpower.com/community/board/license.html
* @package Invision Power Board
* @subpackage Members
* @link http://www.iinvisionpower.com
* @since 20th February 2002
* @version $Rev: 4840 $
*
*/
class cp_skin_profilefields extends output
{
/**
* Prevent our main destructor being called by this class
*
* @access public
* @return void
*/
public function __destruct()
{
}
/**
* Add/edit a group
*
* @access public
* @param int ID
* @param array Group data
* @param string Page title
* @param string Action
* @return string HTML
*/
public function groupForm( $id, $data, $title, $do ) {
$IPBHTML = "";
//--starthtml--//
$IPBHTML .= <<<HTML
<div class='section_title'>
<h2>{$title}</h2>
</div>
<form action='{$this->settings['base_url']}{$this->form_code}' method='post' name='theAdminForm' id='theAdminForm'>
<input type='hidden' name='do' value='{$do}' />
<input type='hidden' name='id' value='{$id}' />
<input type='hidden' name='_admin_auth_key' value='{$this->memberData['form_hash']}' />
<div class='acp-box'>
<h3>{$title}</h3>
<ul class='acp-form alternate_rows'>
<li>
<label>{$this->lang->words['cf_g_name']}</label>
<input type='text' name='pf_group_name' value="{$data['pf_group_name']}" size='30' class='textinput'>
</li>
<li>
<label>{$this->lang->words['cf_g_key']}<span class='desctext'>{$this->lang->words['cf_g_key_desc']}</span></label>
<input type='text' name='pf_group_key' value="{$data['pf_group_key']}" size='30' class='textinput'>
</li>
</ul>
<div class='acp-actionbar'>
<div class='centeraction'>
<input type='submit' value='{$this->lang->words['cf_g_save']}' class='button primary' accesskey='s'>
</div>
</div>
</div>
</form>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* List all the gropus
*
* @access public
* @param array Groups
* @return string HTML
*/
public function groupList( $rows )
{
$IPBHTML = "";
//--starthtml--//
$IPBHTML .= <<<HTML
<div class='section_title'>
<h2>{$this->lang->words['cf_g_groups']}</h2>
<ul class='context_menu'>
<li><a href='{$this->settings['base_url']}{$this->form_code}do=group_form_add'><img src='{$this->settings['skin_acp_url']}/_newimages/icons/add.png' alt='' /> {$this->lang->words['cf_g_add']}</a></li>
</ul>
</div>
<div class='acp-box'>
<h3>{$this->lang->words['cf_g_groups']}</h3>
<table class='alternate_rows' width='100%'>
HTML;
if( ! count( $rows ) )
{
$IPBHTML .= <<<HTML
<tr>
<td>{$this->lang->words['cf_nonefound']}</td>
</tr>
HTML;
}
else
{
foreach( $rows as $r )
{
$IPBHTML .= <<<HTML
<tr>
<td width='95%'><strong>{$r['pf_group_name']}</strong><div class='graytext'>({$r['pf_group_key']})</div></td>
<td width='5%'>
<img class='ipbmenu' id="menu{$r['pf_group_id']}" src='{$this->settings['skin_acp_url']}/_newimages/menu_open.png' alt='{$this->lang->words['a_options']}' />
<ul class='acp-menu' id='menu{$r['pf_group_id']}_menucontent'>
<li class='icon edit'><a href='{$this->settings['base_url']}{$this->form_code}&amp;do=group_form_edit&id={$r['pf_group_id']}'>{$this->lang->words['cf_g_edit']}</a></li>
<li class='icon delete'><a href='#' onclick='return acp.confirmDelete("{$this->settings['base_url']}{$this->form_code}&amp;do=group_form_delete&id={$r['pf_group_id']}")'>{$this->lang->words['cf_g_delete']}</a></li>
</ul>
</td>
</tr>
HTML;
}
}
$IPBHTML .= <<<HTML
</table>
</div>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* List custom profile fields
*
* @access public
* @param array Fields
* @return string HTML
*/
public function customProfileFieldsList( $rows )
{
$IPBHTML = "";
//--starthtml--//
$IPBHTML .= <<<HTML
<div class='section_title'>
<h2>{$this->lang->words['cf_management']}</h2>
<ul class='context_menu'>
<li><a href='{$this->settings['base_url']}{$this->form_code}do=add'><img src='{$this->settings['skin_acp_url']}/_newimages/icons/add.png' alt='' /> {$this->lang->words['cf_addbutton']}</a></li>
</ul>
</div>
<div class='acp-box'>
<h3>{$this->lang->words['cf_management']}</h3>
<div>
<table width='100%' border='0' cellspacing='0' cellpadding='0'>
<tr>
<td class='tablesubheader' style='width: 2%'>&nbsp;</td>
<td class='tablesubheader' style='width: 24%'>{$this->lang->words['cf_title']}</td>
<td class='tablesubheader' style='width: 20%'>{$this->lang->words['cf_type']}</td>
<td class='tablesubheader' style='width: 13%; text-align: center;'>{$this->lang->words['cf_required']}</td>
<td class='tablesubheader' style='width: 13%; text-align: center;'>{$this->lang->words['cf_notpublic']}</td>
<td class='tablesubheader' style='width: 13%; text-align: center;'>{$this->lang->words['cf_showreg']}</td>
<td class='tablesubheader' style='width: 13%; text-align: center;'>{$this->lang->words['cf_adminonly']}</td>
<td class='tablesubheader' style='width: 2%; text-align: center;'>&nbsp;</td>
</tr>
</table>
</div>
HTML;
if( ! count( $rows ) )
{
$IPBHTML .= <<<HTML
<li style='width:100%; clear:both;'>
<div style='width:100%;'>{$this->lang->words['cf_nonefound']}</div>
</li>
</ul>
HTML;
}
else
{
$IPBHTML .= <<<HTML
</ul>
HTML;
$incrementer = 1;
foreach( $rows as $group => $fields )
{
$IPBHTML .= <<<HTML
<ul id='handle_{$incrementer}' class='alternate_rows'>
<li class='tablesubsubheader'>
<strong>{$group}</strong>
</li>
HTML;
foreach( $fields as $r )
{
$IPBHTML .= <<<HTML
<li class='isDraggable' style='width:100%;' id='field_{$r['pf_id']}'>
<table width='100%' cellpadding='0' cellspacing='0' class='double_pad'>
<tr>
<td style='width: 2%'>
<div class='draghandle'><img src='{$this->settings['skin_acp_url']}/_newimages/drag_icon.png' alt='drag' /></div>
</td>
<td style='width: 24%'>
HTML;
if( $r['pf_icon'] )
{
$IPBHTML .= "<img src='{$this->settings['public_dir']}{$r['pf_icon']}' alt='Иконка' />&nbsp;";
}
$IPBHTML .= <<<HTML
<a href="{$this->settings['base_url']}{$this->form_code}do=edit&amp;id={$r['pf_id']}"><strong>{$r['pf_title']}</strong></a>
HTML;
if( $r['pf_desc'] )
{
$IPBHTML .= <<<HTML
<br /><span class='desctext'>{$r['pf_desc']}</span>
HTML;
}
$IPBHTML .= <<<HTML
</td>
<td style='width: 20%'>
{$r['pf_type']}
</td>
<td style='width: 13%; text-align: center;'>
<img src='{$this->settings['skin_acp_url']}/_newimages/icons/{$r['_req']}' alt='Иконка' />
</td>
<td style='width: 13%; text-align: center;'>
<img src='{$this->settings['skin_acp_url']}/_newimages/icons/{$r['_hide']}' alt='Иконка' />
</td>
<td style='width: 13%; text-align: center;'>
<img src='{$this->settings['skin_acp_url']}/_newimages/icons/{$r['_regi']}' alt='Иконка' />
</td>
<td style='width: 13%; text-align: center;'>
<img src='{$this->settings['skin_acp_url']}/_newimages/icons/{$r['_admin']}' alt='Иконка' />
</td>
<td style='width: 2%'>
<img class='ipbmenu' id="menu{$r['pf_id']}" src='{$this->settings['skin_acp_url']}/_newimages/menu_open.png' alt='{$this->lang->words['a_options']}' />
<ul class='acp-menu' id='menu{$r['pf_id']}_menucontent'>
<li class='icon edit'><a href="{$this->settings['base_url']}{$this->form_code}do=edit&amp;id={$r['pf_id']}">{$this->lang->words['cf_edit']}</a></li>
<li class='icon delete'><a href="{$this->settings['base_url']}{$this->form_code}do=delete&amp;id={$r['pf_id']}">{$this->lang->words['cf_delete']}</a></li>
</ul>
</td>
</tr>
</table>
</li>
HTML;
}
$IPBHTML .= <<<HTML
</ul>
<script type="text/javascript">
dropItLikeItsHot{$incrementer} = function( draggableObject, mouseObject )
{
var options = {
method : 'post',
parameters : Sortable.serialize( 'handle_{$incrementer}', { tag: 'li', name: 'fields' } )
};
new Ajax.Request( "{$this->settings['base_url']}&{$this->form_code_js}&do=reorder&md5check={$this->registry->adminFunctions->getSecurityKey()}".replace( /&amp;/g, '&' ), options );
return false;
};
Sortable.create( 'handle_{$incrementer}', { only: 'isDraggable', revert: true, format: 'field_([0-9]+)', onUpdate: dropItLikeItsHot{$incrementer}, handle: 'draghandle' } );
</script>
HTML;
$incrementer++;
}
}
$IPBHTML .= <<<HTML
</div>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Add/edit profile field form
*
* @access public
* @param int ID
* @param string Action
* @param string Button text
* @param array Field data
* @param string Page title
* @return string HTML
*/
public function customProfileFieldForm( $id, $do, $button, $data, $title )
{
$IPBHTML = "";
$IPBHTML .= <<<HTML
<div class='section_title'>
<h2>{$title}</h2>
</div>
<form action='{$this->settings['base_url']}{$this->form_code}' method='post' name='theAdminForm' id='theAdminForm'>
<input type='hidden' name='do' value='{$do}' />
<input type='hidden' name='id' value='{$id}' />
<input type='hidden' name='_admin_auth_key' value='' />
<div class='acp-box'>
<h3>{$this->lang->words['cf_settings']}</h3>
<table class='form_table double_pad alternate_rows' cellspacing='0' cellpadding='0'>
<tr>
<td style='width: 40%;'>
<label>{$this->lang->words['cf_f_title']}</label><br />
<span class='desctext'>{$this->lang->words['cf_f_title_info']}</span>
</td>
<td style='width: 60%'>
<input type='text' name='pf_title' value="{$data['pf_title']}" size='30' class='textinput'>
</td>
</tr>
<tr>
<td>
<label>{$this->lang->words['cf_f_desc']}</label><br />
<span class='desctext'>{$this->lang->words['cf_f_desc_info']}</span>
</td>
<td>
<input type='text' name='pf_desc' value="{$data['pf_desc']}" size='30' class='textinput'>
</td>
</tr>
<tr>
<td>
<label>{$this->lang->words['cf_f_type']}</label>
</td>
<td>
{$data['pf_type']}
</td>
</tr>
<tr>
<td>
<label>{$this->lang->words['cf_f_group']}</label>
</td>
<td>
{$data['pf_group_id']}
</td>
</tr>
<tr>
<td>
<label>{$this->lang->words['cf_f_icon']}</label>
</td>
<td>
{$data['pf_icon']}
</td>
</tr>
<tr>
<td>
<label>{$this->lang->words['cf_f_key']}</label><br />
<span class='desctext'>{$this->lang->words['cf_f_key_info']}</span>
</td>
<td>
{$data['pf_key']}
</td>
</tr>
<tr>
<td>
<label>{$this->lang->words['cf_f_max']}</label><br />
<span class='desctext'>{$this->lang->words['cf_f_max_info']}</span>
</td>
<td>
<input type='text' name='pf_max_input' value="{$data['pf_max_input']}" size='30' class='textinput'>
</td>
</tr>
<tr>
<td>
<label>{$this->lang->words['cf_f_order']}</label><br />
<span class='desctext'>{$this->lang->words['cf_f_order_info']}</span>
</td>
<td>
<input type='text' name='pf_position' value="{$data['pf_position']}" size='30' class='textinput'>
</td>
</tr>
<tr>
<td>
<label>{$this->lang->words['cf_f_form']}</label><br />
<span class='desctext'>{$this->lang->words['cf_f_form_info']}</span>
</td>
<td>
<input type='text' name='pf_input_format' value="{$data['pf_input_format']}" size='30' class='textinput'>
</td>
</tr>
<tr>
<td>
<label>{$this->lang->words['cf_f_option']}</label><br />
<span class='desctext'>{$this->lang->words['cf_f_option_info']}</span>
</td>
<td>
<textarea name='pf_content' cols='45' rows='5' wrap='soft' id='pf_content' class='multitext'>{$data['pf_content']}</textarea>
</td>
</tr>
<tr>
<td>
<label>{$this->lang->words['cf_f_reg']}</label><br />
<span class='desctext'>{$this->lang->words['cf_f_reg_info']}</span>
</td>
<td>
{$data['pf_show_on_reg']}
</td>
</tr>
<tr>
<td>
<label>{$this->lang->words['cf_f_must']}</label><br />
<span class='desctext'>{$this->lang->words['cf_f_must_info']}</span>
</td>
<td>
{$data['pf_not_null']}
</td>
</tr>
<tr>
<td>
<label>{$this->lang->words['cf_f_edit']}</label><br />
<span class='desctext'>{$this->lang->words['cf_f_edit_info']}</span>
</td>
<td>
{$data['pf_member_edit']}
</td>
</tr>
<tr>
<td>
<label>{$this->lang->words['cf_f_priv']}</label><br />
<span class='desctext'>{$this->lang->words['cf_f_priv_info']}</span>
</td>
<td>
{$data['pf_member_hide']}
</td>
</tr>
<tr>
<td>
<label>{$this->lang->words['cf_f_admin']}</label><br />
<span class='desctext'>{$this->lang->words['cf_f_admin_info']}</span>
</td>
<td>
{$data['pf_admin_only']}
</td>
</tr>
<tr>
<td>
<label>{$this->lang->words['cf_f_view']}</label><br />
<span class='desctext'>{$this->lang->words['cf_f_view_info']}</span>
</td>
<td>
<textarea name='pf_topic_format' cols='60' rows='5' wrap='soft' id='pf_topic_format' class='multitext'>{$data['pf_topic_format']}</textarea>
</td>
</tr>
</table>
<div class='acp-actionbar'>
<input type='submit' value=' {$button} ' class='realbutton' accesskey='s' />
</div>
</div>
</form>
HTML;
return $IPBHTML;
}
/**
* Delete field confirmation
*
* @access public
* @param int ID
* @param string Title
* @return string HTML
*/
public function customProfileFieldDelete( $id, $title )
{
$IPBHTML = "";
$IPBHTML .= <<<HTML
<form action='{$this->settings['base_url']}{$this->form_code}' method='post' name='theAdminForm' id='theAdminForm'>
<input type='hidden' name='do' value='dodelete' />
<input type='hidden' name='id' value='{$id}' />
<input type='hidden' name='_admin_auth_key' value='' />
<div class='tableborder'>
<div class='tableheaderalt'>{$this->lang->words['cf_removeconf']}</div>
<table width='100%' cellspacing='0' cellpadding='5' align='center' border='0'>
<tr>
<td class='tablerow1' width='40%' valign='middle'>{$this->lang->words['cf_removeto']}</td>
<td class='tablerow2' width='60%' valign='middle'><b>{$title}</b></td>
</tr>
<tr>
<td align='center' class='tablesubheader' colspan='2' ><input type='submit' value='{$this->lang->words['cf_deletebutton']}' class='realbutton' accesskey='s'></td>
</tr>
</table>
</div>
</form>
HTML;
return $IPBHTML;
}
}
@@ -0,0 +1,187 @@
<?php
/**
* Invision Power Services
* IP.Board v3.0.5
* ACP ranks skin file
* Last Updated: $Date: 2009-07-06 03:32:52 -0400 (Mon, 06 Jul 2009) $
*
* @author $Author: matt $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.iinvisionpower.com/community/board/license.html
* @package Invision Power Board
* @subpackage Members
* @link http://www.iinvisionpower.com
* @since 20th February 2002
* @version $Rev: 4840 $
*
*/
class cp_skin_ranks extends output
{
/**
* Prevent our main destructor being called by this class
*
* @access public
* @return void
*/
public function __destruct()
{
}
/**
* Ranks overview page
*
* @access public
* @param array Rows
* @return string HTML
*/
public function titlesOverview( $rows ) {
$IPBHTML = "";
//--starthtml--//
$IPBHTML .= <<<HTML
<div class='section_title'>
<h2>{$this->lang->words['rnk_titles']}</h2>
</div>
<div class='acp-box'>
<h3>{$this->lang->words['rnk_titles']}</h3>
<table class='alternate_rows' width='100%'>
<tr>
<th width='40%'>{$this->lang->words['rnk_title']}</th>
<th width='20%'>{$this->lang->words['rnk_minposts']}</th>
<th width='30%'>{$this->lang->words['rnk_pips']}</th>
<th width='10%'>&nbsp;</th>
</tr>
HTML;
if( count($rows) )
{
foreach( $rows as $rank )
{
$rank['img'] = "";
if( preg_match( "/[a-zA-Z]{1,}/", $rank['pips'] ) )
{
$rank['img'] = "<img src='" . $this->settings['public_dir'] . "style_extra/team_icons/{$rank['pips']}' border='0'>";
}
else
{
for ( $i = 1; $i <= $rank['pips']; $i++ )
{
$rank['img'] .= $rank['A_STAR'];
}
}
$IPBHTML .= <<<HTML
<tr>
<td><strong>{$rank['title']}</strong></td>
<td>{$rank['posts']}</td>
<td>{$rank['img']}</td>
<td align='right'>
<img class="ipbmenu" id="menu{$rank['id']}" src="{$this->settings['skin_acp_url']}/_newimages/menu_open.png" alt="">
<ul style="position: absolute; display: none; z-index: 9999;" class="acp-menu" id='menu{$rank['id']}_menucontent'>
<li style="z-index: 10000;" class='icon edit'><a style="z-index: 10000;" href='{$this->settings['base_url']}{$this->form_code}&do=rank_edit&id={$rank['id']}'>{$this->lang->words['rnk_editlink']}</a></li>
<li style="z-index: 10000;" class='icon delete'><a style="z-index: 10000;" href='#' onclick='return acp.confirmDelete( "{$this->settings['base_url']}{$this->form_code}&do=rank_delete&id={$rank['id']}" )'>{$this->lang->words['rnk_deletelink']}</a></li>
</ul>
</td>
</tr>
HTML;
}
}
$IPBHTML .= <<<HTML
</table>
</div>
<br />
<form action='{$this->settings['base_url']}{$this->form_code}&amp;do=do_add_rank' method='post'>
<div class='acp-box'>
<h3>{$this->lang->words['rnk_addarank']}</h3>
<ul class='acp-form alternate_rows'>
<li>
<label>{$this->lang->words['rnk_ranktitle']}</label>
<input type='text' name='title' />
</li>
<li>
<label>{$this->lang->words['rnk_minpostsneeded']}</label>
<input type='text' name='posts' />
</li>
<li>
<label>{$this->lang->words['rnk_numpips']}<span class='desctext'>{$this->lang->words['rnk_numpips_info']}</span></label>
<input type='text' name='pips' />
</li>
</ul>
<div class='acp-actionbar'>
<div class='centeraction'>
<input type='submit' value='{$this->lang->words['rnk_addrank']}' class='button primary'/>
</div>
</div>
</div>
</form>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Ranks form
*
* @access public
* @param array Rank data
* @param string Action code
* @param string Button text
* @return string HTML
*/
public function titlesForm( $rank, $action, $button ) {
$IPBHTML = "";
//--starthtml--//
$IPBHTML .= <<<HTML
<div class='section_title'>
<h2>{$button}</h2>
</div>
<form action='{$this->settings['base_url']}{$this->form_code}&amp;do={$action}' method='post'>
<input type='hidden' name='id' value='{$rank['id']}' />
<div class='acp-box'>
<h3>{$button}</h3>
<ul class='acp-form alternate_rows'>
<li>
<label>{$this->lang->words['rnk_ranktitle']}</label>
<input type='text' name='title' value='{$rank['title']}' />
</li>
<li>
<label>{$this->lang->words['rnk_minpostsneeded']}</label>
<input type='text' name='posts' value='{$rank['posts']}' />
</li>
<li>
<label>{$this->lang->words['rnk_numpips']}<span class='desctext'>{$this->lang->words['rnk_numpips_info']}</span></label>
<input type='text' name='pips' value='{$rank['pips']}' />
</li>
</ul>
<div class='acp-actionbar'>
<div class='centeraction'>
<input type='submit' value='{$button}' class='button primary' />
</div>
</div>
</div>
</form>
HTML;
//--endhtml--//
return $IPBHTML;
}
}
@@ -0,0 +1,171 @@
<?php
/**
* Invision Power Services
* IP.Board v3.0.5
* ACP reputation skin file
* Last Updated: $Date: 2009-09-28 10:53:45 -0400 (Mon, 28 Sep 2009) $
*
* @author $Author: josh $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.iinvisionpower.com/community/board/license.html
* @package Invision Power Board
* @subpackage Members
* @link http://www.iinvisionpower.com
* @since 20th February 2002
* @version $Revision: 5167 $
*
*/
class cp_skin_reputation extends output
{
/**
* Prevent our main destructor being called by this class
*
* @access public
* @return void
*/
public function __destruct()
{
}
/**
* Reputation form
*
* @access public
* @param int ID
* @param string Action
* @param string Title
* @param array Form elements
* @param array Errors
* @return string HTML
*/
public function reputationForm( $id, $do, $title, $form, $errors ) {
$IPBHTML = "";
//--starthtml--//
if( count( $errors ) )
{
$IPBHTML .= <<<HTML
<h2>{$this->lang->words['errors']}</h2>
<ul>
HTML;
foreach( $errors as $err )
{
$IPBHTML .= <<<HTML
<li>$err</li>
HTML;
}
$IPBHTML .= <<<HTML
</ul>
HTML;
}
$IPBHTML .= <<<HTML
<form action='{$this->settings['base_url']}{$this->form_code}' method='post'>
<input type='hidden' name='do' value='{$do}'>
<input type='hidden' name='id' value='{$id}'>
<div class='acp-box'>
<h3>{$title}</h3>
<ul class='acp-form alternate_rows'>
<li>
<label>{$this->lang->words['rep_form_title']}<span class='desctext'>{$this->lang->words['rep_form_title_help']}</span></label>
{$form['level_title']}
</li>
<li>
<label>{$this->lang->words['rep_form_image']}<span class='desctext'>{$this->lang->words['rep_form_image_help']}{$this->settings['public_dir']}style_extra/reputation_icons/</span></label>
{$form['level_image']}
</li>
<li>
<label>{$this->lang->words['rep_form_points']}<span class='desctext'>{$this->lang->words['rep_form_points_help']}</span></label>
{$form['level_points']}
</li>
</ul>
<div class='acp-actionbar'>
<div class='centeraction'>
<input type='submit' value='{$this->lang->words['rep_save_changes']}' class='button primary'/>
</div>
</div>
</div>
</form>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Reputation overview screen
*
* @access public
* @param array Rep levels
* @return string HTML
*/
public function reputationOverview( $levels=array() ) {
$IPBHTML = "";
//--starthtml--//
$IPBHTML .= <<<HTML
<div class='section_title'>
<h2>{$this->lang->words['rep_lvl_manage']}</h2>
<ul class='context_menu'>
<li><a href='{$this->settings['base_url']}{$this->form_code}&amp;do=add_level_form'><img src='{$this->settings['skin_acp_url']}/_newimages/icons/add.png' alt='' /> {$this->lang->words['rep_level_new']}</a></li>
</ul>
</div>
<div class='acp-box'>
<h3>{$this->lang->words['rep_lvl_manage']}</h3>
<table class='alternate_rows' width='100%'>
<tr>
<th width='40%'>{$this->lang->words['rep_form_title']}</th>
<th width='20%'>{$this->lang->words['rep_form_image']}</th>
<th width='30%'>{$this->lang->words['rep_form_points']}</th>
<th width='10%'>&nbsp;</th>
</tr>
HTML;
if( is_array( $levels ) && count( $levels ) )
{
foreach( $levels as $r )
{
$IPBHTML .= <<<HTML
<tr>
<td>{$r['level_title']}</td>
<td>{$r['level_image']}</td>
<td>{$r['level_points']}</td>
<td align='right'>
<img class="ipbmenu" id="menu{$r['level_id']}" src="{$this->settings['skin_acp_url']}/_newimages/menu_open.png" alt="">
<ul style="position: absolute; display: none; z-index: 9999;" class="acp-menu" id='menu{$r['level_id']}_menucontent'>
<li style="z-index: 10000;" class='icon edit'><a style="z-index: 10000;" href='{$this->settings['base_url']}{$this->form_code}&amp;do=edit_level_form&amp;id={$r['level_id']}'>{$this->lang->words['edit']}</a></li>
<li style="z-index: 10000;" class='icon delete'><a style="z-index: 10000;" href='#' onclick='return acp.confirmDelete( "{$this->settings['base_url']}{$this->form_code}&amp;do=delete_level&amp;id={$r['level_id']}" );'>{$this->lang->words['delete']}</a></li>
</ul>
</td>
</tr>
HTML;
}
}
else
{
$IPBHTML .= <<<HTML
<tr>
<td colspan='4'><em>{$this->lang->words['rep_no_levels']}</em></td>
</tr>
HTML;
}
$IPBHTML .= <<<HTML
</table>
</div>
HTML;
//--endhtml--//
return $IPBHTML;
}
}
@@ -0,0 +1,398 @@
<?php
/**
* Invision Power Services
* IP.Board v3.0.5
* ACP restrictions skin file
* Last Updated: $Date: 2009-03-27 11:41:38 -0400 (Fri, 27 Mar 2009) $
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.iinvisionpower.com/community/board/license.html
* @package Invision Power Board
* @subpackage Members
* @link http://www.iinvisionpower.com
* @since 20th February 2002
* @version $Rev: 4333 $
*
*/
class cp_skin_restrictions extends output
{
/**
* Prevent our main destructor being called by this class
*
* @access public
* @return void
*/
public function __destruct()
{
}
/**
* Form to add a new restricted member
*
* @access public
* @return string HTML
*/
public function restrictionsMemberForm() {
$IPBHTML = "";
//--starthtml--//
$IPBHTML .= <<<HTML
<div class='section_title'>
<h2>{$this->lang->words['r_title']}</h2>
</div>
<form id='postingform' action="{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=acpperms-member-add-complete" method="post" name="REPLIER">
<input type='hidden' name='_admin_auth_key' value='{$this->registry->getClass('adminFunctions')->_admin_auth_key}' />
<div class='tableborder'>
<div class='tableheaderalt'>{$this->lang->words['r_findadmin']}</div>
<div class='tablesubheader'>&nbsp;</div>
<table width='100%' cellspacing='0' cellpadding='5' align='center' border='0'>
<tr>
<td class='tablerow1' width='50%' valign='middle'>{$this->lang->words['r_displayname']}<div style='color:gray'>{$this->lang->words['r_displayname_info']}</div></td>
<td class='tablerow2' width='50%' valign='middle'><input type="text" id='entered_name' name="entered_name" size="30" autocomplete='off' style='width:210px' value="" tabindex="1" /></td>
</tr>
<tr>
<td align='center' class='tablesubheader' colspan='2' ><input type='submit' value='{$this->lang->words['r_proceed']}' class='realbutton' accesskey='s'></td>
</tr>
</table>
</div>
<script type="text/javascript">
document.observe("dom:loaded", function(){
var search = new ipb.Autocomplete( $('entered_name'), { multibox: false, url: acp.autocompleteUrl, templates: { wrap: acp.autocompleteWrap, item: acp.autocompleteItem } } );
});
</script>
</form>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Form to add a new restricted group
*
* @access public
* @return string HTML
*/
public function restrictionsGroupForm() {
$IPBHTML = "";
//--starthtml--//
$all_groups = array();
foreach( $this->cache->getCache('group_cache') as $group_data )
{
if( $group_data['g_access_cp'] )
{
$all_groups[] = array( $group_data['g_id'], $group_data['g_title'] );
}
}
$dropDown = $this->registry->output->formDropdown( "entered_group", $all_groups );
$IPBHTML .= <<<HTML
<div class='section_title'>
<h2>{$this->lang->words['r_title']}</h2>
</div>
<form id='postingform' action="{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=acpperms-group-add-complete" method="post" name="REPLIER">
<input type='hidden' name='_admin_auth_key' value='{$this->registry->getClass('adminFunctions')->_admin_auth_key}' />
<div class='tableborder'>
<div class='tableheaderalt'>{$this->lang->words['r_selectgroup']}</div>
<div class='tablesubheader'>&nbsp;</div>
<table width='100%' cellspacing='0' cellpadding='5' align='center' border='0'>
<tr>
<td class='tablerow1' width='50%' valign='middle'>{$this->lang->words['r_whatgroup']}</td>
<td class='tablerow2' width='50%' valign='middle'>{$dropDown}</td>
</tr>
<tr>
<td align='center' class='tablesubheader' colspan='2' ><input type='submit' value='{$this->lang->words['r_proceed']}' class='realbutton' accesskey='s'></td>
</tr>
</table>
</div>
</form>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* ACP restrictions overview
*
* @access public
* @param array Members
* @param array Groups
* @return string HTML
*/
public function acpPermsOverview( $members, $groups ) {
$IPBHTML = "";
//--starthtml--//
$IPBHTML .= <<<HTML
<div class='section_title'>
<h2>{$this->lang->words['r_title']}</h2>
</div>
<div class='acp-box'>
<h3>{$this->lang->words['r_memberrestrict']}</h3>
<table class='alternate_rows double_pad' width='100%'>
<tr>
<th width='35%'>{$this->lang->words['r_member']}</th>
<th width='20%'>{$this->lang->words['r_primary']}</th>
<th width='20%'>{$this->lang->words['r_secondary']}</th>
<th width='20%'>{$this->lang->words['r_updated']}</th>
<th width='5%'>&nbsp;</th>
</tr>
{$members}
</table>
<div class='acp-actionbar'>
<div class='rightaction'><input type='button' value='{$this->lang->words['r_findadmin']}' onclick="window.location='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=acpperms-member-add'" class='button primary' accesskey='s'></div>
</div>
</div>
<br />
<div class='acp-box'>
<h3>{$this->lang->words['r_grouprestrict']}</h3>
<table cellpadding='0' cellspacing='0' width='100%' class='alternate_rows double_pad'>
<tr>
<th width='55%'>{$this->lang->words['r_group']}</th>
<th width='20%' align='center'>{$this->lang->words['r_totalmem']}</th>
<th width='20%' align='center'>{$this->lang->words['r_updated']}</th>
<th width='5%'>&nbsp;</th>
</tr>
{$groups}
</table>
<div class='acp-actionbar'>
<div class='rightaction'><input type='button' value='{$this->lang->words['r_findgroup']}' onclick="window.location='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=acpperms-group-add'" class='button primary' accesskey='s'></div>
</div>
</div>
<br />
<form action='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=accperms-xml-import' method='post' name='uploadform' enctype='multipart/form-data' id='uploadform'>
<input type='hidden' name='_admin_auth_key' value='{$this->registry->getClass('adminFunctions')->_admin_auth_key}' />
<input type='hidden' name='MAX_FILE_SIZE' value='10000000000'>
<div class='acp-box'>
<h3>{$this->lang->words['r_importxml']}</h3>
<table width='100%' class='alternate_rows'>
<tr>
<td width='50%'>{$this->lang->words['r_uploadxml']}<br /><span class='desctext'>{$this->lang->words['r_uploadxml_info']}</span></td>
<td width='50%'><input class='textinput' type='file' size='30' name='FILE_UPLOAD'></td>
</tr>
<tr>
<td width='50%'>{$this->lang->words['r_filexml']}<br /><span class='desctext'>{$this->lang->words['r_filexml_info']}</span></td>
<td width='50%'><input type='text' name='file_location' value='ipb_acpperms.xml' size='30' class='textinput'></td>
</tr>
</table>
<div class='acp-actionbar'>
<div class='centeraction'><input type='submit' value='{$this->lang->words['r_xmlbutton']}' class='button primary' accesskey='s'></div>
</div>
</div>
</form>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Restricted member
*
* @access public
* @param array Member data
* @return string HTML
*/
public function acpMemberRow( $data ) {
$IPBHTML = "";
//--starthtml--//
$IPBHTML .= <<<HTML
<tr>
<td>
<img src='{$this->settings['skin_acp_url']}/images/lock_close.gif' border='0' alt='@' style='vertical-align:top' />
<strong>{$data['members_display_name']}</strong>
</td>
<td>{$data['_group_name']}</td>
<td>{$data['_other_groups']}</td>
<td>{$data['_date']}</td>
<td>
<img class='ipbmenu' id="menumember{$data['member_id']}" src='{$this->settings['skin_acp_url']}/_newimages/menu_open.png' border='0' alt='{$this->lang->words['r_options']}' />
<ul class='acp-menu' id='menumember{$data['member_id']}_menucontent'>
<li class='icon edit'><a href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=accperms-member-edit&amp;mid={$data['member_id']}'>{$this->lang->words['r_managerestrict']}</a></li>
<li class='icon delete'><a href='#' onclick='return acp.confirmDelete("{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=accperms-member-remove&amp;mid={$data['member_id']}");'>{$this->lang->words['r_removeall']}</a></li>
</ul>
</td>
</tr>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Restricted group
*
* @access public
* @param array Group data
* @return string HTML
*/
public function acpGroupRow( $data ) {
$IPBHTML = "";
//--starthtml--//
$IPBHTML .= <<<HTML
<tr>
<td class='tablerow1'>
<img src='{$this->settings['skin_acp_url']}/images/lock_close.gif' border='0' alt='@' style='vertical-align:top' />
<strong>{$data['_group_name']}</strong>
</td>
<td class='tablerow2' align='center'>{$data['_total']}</td>
<td class='tablerow2' align='center'>{$data['_date']}</td>
<td class='tablerow1'>
<img id="menugroup{$data['row_id']}" src='{$this->settings['skin_acp_url']}/_newimages/menu_open.png' border='0' alt='{$this->lang->words['r_options']}' class='ipbmenu' />
<ul class='acp-menu' id='menugroup{$data['row_id']}_menucontent'>
<li class='icon edit'><a href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=accperms-group-edit&amp;gid={$data['row_id']}'>{$this->lang->words['r_managerestrictg']}</a></li>
<li class='icon delete'><a href='#' onclick='return acp.confirmDelete("{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=accperms-group-remove&amp;gid={$data['row_id']}");'>{$this->lang->words['r_removeallg']}</a></li>
</ul>
</td>
</tr>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Add new restrictions form
*
* @access public
* @param int Role id
* @param string Role type
* @param array Permissions
* @param array Access capabilities
* @return string HTML
*/
public function restrictionsForm( $role_id=0, $role_type='member', $permissions=array(), $access=array() ) {
$IPBHTML = "";
//--starthtml--//
$IPBHTML .= <<<HTML
<script type="text/javascript" src='{$this->settings['js_main_url']}acp.permissions.js'></script>
<script type="text/javascript">
//<![CDATA[
document.observe("dom:loaded",function()
{
ipbAcpTabStrips.register('tab_restrictions');
});
//]]>
</script>
<form action='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=acpperms-save&amp;secure_key={$secure_key}' method='post' id='adform' name='adform'>
<input type='hidden' name='id' value='{$role_id}' />
<input type='hidden' name='type' value='{$role_type}' />
<ul id='tab_restrictions' class='tab_bar no_title'>
HTML;
foreach( ipsRegistry::$applications as $application )
{
$IPBHTML .= "<li id='tabtab-TOP|{$application['app_id']}' class=''>{$application['app_title']}</li>\n";
}
$IPBHTML .= <<<HTML
</ul>
<div class='acp-box'>
HTML;
foreach( ipsRegistry::$applications as $app_dir => $application )
{
$checked = in_array( $application['app_id'], $access['applications'] ) ? 1 : 0;
$form = $this->registry->output->formCheckbox( 'app_' . $application['app_id'], $checked );
$IPBHTML .= <<<HTML
<div id='tabpane-TOP|{$application['app_id']}'>
<div class='tablesubheader'>{$form} {$this->lang->words['r_grantto']} приложению «{$application['app_title']}»?</div>
HTML;
if( !is_array(ipsRegistry::$modules[ $app_dir ]) OR !count(ipsRegistry::$modules[ $app_dir ]) )
{
continue;
}
foreach( ipsRegistry::$modules[ $app_dir ] as $module )
{
$checked = in_array( $module['sys_module_id'], $access['modules'] ) ? 1 : 0;
$form = $this->registry->output->formCheckbox( 'module_' . $module['sys_module_id'], $checked );
$IPBHTML .= <<<HTML
<div class='tablesubheader'>{$form} {$this->lang->words['r_grantto']} модулю «{$module['sys_module_title']}»?</div>
HTML;
if( is_array( $permissions ) AND is_array($permissions[ $application['app_id'] ][ $module['sys_module_id'] ]) AND count($permissions[ $application['app_id'] ][ $module['sys_module_id'] ]) )
{
// Call me lazy if you wish :P
$shorten = $permissions[ $application['app_id'] ][ $module['sys_module_id'] ];
foreach( $shorten as $group => $shorter )
{
if( !is_array($shorter) OR !count($shorter) )
{
continue;
}
$IPBHTML .= <<<HTML
<div class='tablesubheader'>{$shorter['title']}</div>
<ul class='acp-form alternate_rows'>
HTML;
if( is_array($shorter['items']) AND count($shorter['items']) )
{
foreach( $shorter['items'] as $item_key => $item_text )
{
$checked = (is_array($access['items'][ $module['sys_module_id'] ]) AND in_array($item_key, $access['items'][ $module['sys_module_id'] ] )) ? 1 : 0;
$form = $this->registry->output->formCheckbox( 'item_' . $module['sys_module_id'] . '_' . $item_key, $checked );
$IPBHTML .= <<<HTML
<li><label>{$item_text}</label>{$form}</li>
HTML;
}
}
$IPBHTML .= <<<HTML
</ul>
<br />
HTML;
}
}
}
$IPBHTML .= <<<HTML
</div>
HTML;
}
$IPBHTML .= <<<HTML
</div>
<div class='tablesubheader' style='text-align:center;'><input type='submit' value=' {$this->lang->words['r_savebutton']} ' /></div>
</form>
HTML;
//--endhtml--//
return $IPBHTML;
}
}
@@ -0,0 +1,956 @@
<?php
/**
* Invision Power Services
* IP.Board v3.0.5
* ACP tools skin file
* Last Updated: $Date: 2009-11-09 21:06:29 -0500 (Mon, 09 Nov 2009) $
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.iinvisionpower.com/community/board/license.html
* @package Invision Power Board
* @subpackage Members
* @link http://www.iinvisionpower.com
* @since 20th February 2002
* @version $Rev: 5342 $
*
*/
class cp_skin_tools extends output
{
/**
* Prevent our main destructor being called by this class
*
* @access public
* @return void
*/
public function __destruct()
{
}
/**
* Merge start form
*
* @access public
* @param array Member data
* @return string HTML
*/
public function mergeStart( $member ){
$IPBHTML = "";
$title = sprintf( $this->lang->words['merge_users_title'], $member['members_display_name'] );
$desc = sprintf( $this->lang->words['merge_explanation'], $member['members_display_name'], $member['members_display_name'] );
$IPBHTML .= <<<HTML
<div class='information-box'>
{$desc}
</div>
<br />
<form name='theAdminForm' id='adminform' action='{$this->settings['base_url']}&amp;module=members&amp;section=tools&amp;do=doMerge' method='post'>
<input type='hidden' name='member_id' value='{$member['member_id']}' />
<input type='hidden' name='_admin_auth_key' value='{$this->registry->getClass('adminFunctions')->_admin_auth_key}' />
<div class='acp-box'>
<h3>{$title}</h3>
<ul class='acp-form alternate_rows'>
<li>
<label>{$this->lang->words['merge_find_name']}</label>
<input type='text' class='textinput' id='members_display_name' name='members_display_name' value='' />
</li>
</ul>
<div class='acp-actionbar'>
<div class='centeraction'>
<input type='submit' class='button primary' value=' {$this->lang->words['merge_continue_button']} ' />
</div>
</div>
</div>
</form>
<script type='text/javascript'>
document.observe("dom:loaded", function(){
var autoComplete = new ipb.Autocomplete( $('members_display_name'), { multibox: false, url: acp.autocompleteUrl, templates: { wrap: acp.autocompleteWrap, item: acp.autocompleteItem } } );
});
</script>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Confirm merge of two members
*
* @access public
* @param array Member data
* @param array Member data
* @return string HTML
*/
public function mergeConfirm( $member, $member2 ){
$IPBHTML = "";
$desc = sprintf( $this->lang->words['merge_confirmation'], $member2['members_display_name'], $member['members_display_name'], $member2['members_display_name'] );
$IPBHTML .= <<<HTML
<div class='information-box'>
{$desc}
</div>
<br />
<form name='theAdminForm' id='adminform' action='{$this->settings['base_url']}&amp;module=members&amp;section=tools&amp;do=doMerge' method='post'>
<input type='hidden' name='member_id' value='{$member['member_id']}' />
<input type='hidden' name='member_id2' value='{$member2['member_id']}' />
<input type='hidden' name='confirm' value='1' />
<input type='hidden' name='_admin_auth_key' value='{$this->registry->getClass('adminFunctions')->_admin_auth_key}' />
<div class='acp-box'>
<h3>{$this->lang->words['merge_confirm_title']}</h3>
<ul class='acp-form alternate_rows'>
<li>
<label>{$this->lang->words['merge_remove']}</label>
<a href='{$this->settings['_original_base_url']}/index.php?showuser={$member2['member_id']}'>{$member2['members_display_name']}</a>
</li>
<li>
<label>{$this->lang->words['merge_keep']}</label>
<a href='{$this->settings['_original_base_url']}/index.php?showuser={$member['member_id']}'>{$member['members_display_name']}</a>
</li>
</ul>
<div class='acp-actionbar'>
<div class='centeraction'>
<input type='submit' class='button primary' value=' {$this->lang->words['merge_submit']} ' />
</div>
</div>
</div>
</form>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Member tools splash page
*
* @access public
* @param string Message
* @param array Form elements
* @return string HTML
*/
public function toolsIndex( $message, $form=array() ) {
$IPBHTML = "";
//--starthtml--//
if( $message )
{
$IPBHTML .= <<<HTML
<div class='acp-box'>
<h3>{$this->lang->words['t_message']}</h3>
<p>{$message}</p>
</div>
<br />
HTML;
}
$form_ip = ipsRegistry::getClass('output')->formInput( "ip", isset($_POST['ip']) ? IPSText::stripslashes($_POST['ip']) : '' );
$IPBHTML .= <<<HTML
<div class='section_title'>
<h2>{$this->lang->words['t_iptoolstitle']}</h2>
</div>
<form action='{$this->settings['base_url']}&amp;module=members&amp;section=tools&amp;do=show_all_ips' method='post' name='theAdminForm' id='theAdminForm'>
<div class='acp-box'>
<h3>{$this->lang->words['t_showallip']}</h3>
<ul class='acp-form alternate_rows'>
<li>
<label>{$form['text']}</label>
{$form['form']}
</li>
</ul>
<div class='acp-actionbar'>
<input type='submit' class='button primary' value=' {$this->lang->words['t_showallbutton']} ' />
</div>
</div>
</form>
<br />
<form action='{$this->settings['base_url']}&amp;module=members&amp;section=tools&amp;do=learn_ip' method='post'>
<div class='acp-box'>
<h3>{$this->lang->words['t_ipmulti']}</h3>
<ul class='acp-form alternate_rows'>
<li>
<label>{$this->lang->words['t_showme']}</label>
{$form_ip}
</li>
</ul>
<div class='acp-actionbar'>
<input type='submit' class='button primary' value=' {$this->lang->words['t_showmebutton']} ' />
</div>
</div>
</form>
<script type='text/javascript'>
document.observe("dom:loaded", function(){
var search = new ipb.Autocomplete( $('name'), { multibox: false, url: acp.autocompleteUrl, templates: { wrap: acp.autocompleteWrap, item: acp.autocompleteItem } } );
});
</script>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Delete PM wrapper
*
* @access public
* @param array Member
* @param int Total topics
* @param int Total replies
* @return string HTML
*/
public function deleteMessagesWrapper( $member, $countTopics, $countReplies )
{
$IPBHTML = "";
//--starthtml--//
$countTopics['total'] = intval($countTopics['total']);
$countReplies['total'] = intval($countReplies['total']);
$this->lang->words['total_pms_topics'] = sprintf( $this->lang->words['total_pms_topics'], $countTopics['total'] );
$this->lang->words['total_pms_replies'] = sprintf( $this->lang->words['total_pms_replies'], $countReplies['total'] );
$topicsYesNo = $this->registry->output->formYesNo( 'topics', 0 );
$repliesYesNo = $this->registry->output->formYesNo( 'replies', 0 );
$IPBHTML .= <<<HTML
<div class='section_title'>
<h2>Управление пользователем</h2>
</div>
<form action='{$this->settings['base_url']}&amp;module=members&amp;section=tools&amp;do=deleteMessages&amp;member_id={$member['member_id']}&amp;confirm=1' method='post'>
<div class='acp-box'>
<h3>Удаление всех личных сообщений {$member['members_display_name']}</h3>
<table class='form_table alternate_rows double_pad'>
<tr>
<td style='width: 40%'>
<strong>{$this->lang->words['total_pms_topics']}</strong>
</td>
<td style='width: 60%'>
{$topicsYesNo}
</td>
</tr>
<tr>
<td>
<strong>{$this->lang->words['total_pms_replies']}</strong>
</td>
<td>
{$repliesYesNo}
</td>
</tr>
</table>
<div class='acp-actionbar'>
<input type='submit' value='{$this->lang->words['confirm_pm_button']}' class='realbutton' />
</div>
</div>
</form>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Show all of a member's IP addresses
*
* @access public
* @param array Member data
* @param array All IPs
* @param string Page links
* @param array Member's registering with IP
* @return string HTML
*/
public function showAllIPs( $member, $allips, $links, $reg=array() ) {
$IPBHTML = "";
//--starthtml--//
$count = count($allips);
$counttxt = sprintf( $this->lang->words['t_counttxt'], $member['members_display_name'], $count );
$IPBHTML .= <<<HTML
<div class='acp-box'>
<h3>{$counttxt}</h3>
<table class='alternate_rows' width='100%'>
<tr>
<th width='20%'>{$this->lang->words['t_ipaddy']}</th>
<th width='10%'>{$this->lang->words['t_timesused']}</th>
<th width='25%'>{$this->lang->words['t_lastused']}</th>
<th width='20%'>{$this->lang->words['t_usedotherreg']}</th>
<th width='25%'>{$this->lang->words['t_iptool']}</th>
</tr>
HTML;
if( is_array($allips) AND count($allips) )
{
foreach( $allips as $ip_address => $use_info )
{
$date = $use_info[1] ? ipsRegistry::getClass( 'class_localization')->getDate( $use_info[1], 'SHORT' ) : 'No Info';
$others = intval( count( $reg[ $ip_address ] ) );
$IPBHTML .= <<<HTML
<tr>
<td><strong>{$ip_address}</strong></td>
<td>{$use_info[0]}</td>
<td>{$date}</td>
<td>{$others}</td>
<td><a href='{$this->settings['base_url']}&amp;module=members&amp;section=tools&amp;do=learn_ip&amp;ip={$ip_address}'>{$this->lang->words['t_learnmore']}</a></td>
</tr>
HTML;
}
}
else
{
$IPBHTML .= <<<HTML
<tr>
<th colspan='5' align='center'>{$this->lang->words['t_noips']}</th>
</tr>
HTML;
}
$IPBHTML .= <<<HTML
</table>
<div class='acp-actionbar'>
<div class='rightaction'>
{$links}
</div>
</div>
</div>
<br />
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Learn about an IP
*
* @access public
* @param string Host address
* @param array All registering members
* @param array All posting members
* @param array All voting members
* @param array All emailing members
* @param array All validating members
* @param array All other instances of IP
* @return string HTML
*/
public function learnIPResults( $hostAddr, $registered=array(), $posted=array(), $voted=array(), $emailed=array(), $validating=array(), $results=array() ) {
$IPBHTML = "";
//--starthtml--//
$IPBHTML .= <<<HTML
<div class='acp-box'>
<h3>{$this->lang->words['hostaddress_for']} {$this->request['ip']}</h3>
<table class='alternate_rows' width='100%'>
<tr>
<td width='40%'>{$this->lang->words['t_ipresolves']}</td>
<td width='60%'>{$hostAddr}</td>
</tr>
</table>
</div>
<br />
<div class='acp-box'>
<h3>{$this->lang->words['t_ipreg']}</h3>
<table class='alternate_rows' width='100%'>
<tr>
<th width='30%'>{$this->lang->words['t_ipname']}</th>
<th width='20%'>{$this->lang->words['t_ipemail']}</th>
<th width='10%'>{$this->lang->words['t_ipposts']}</th>
<th width='20%'>{$this->lang->words['t_ipip']}</th>
<th width='20%'>{$this->lang->words['t_ipregistered']}</th>
</tr>
HTML;
if( is_array($registered) AND count($registered) )
{
foreach( $registered as $member )
{
$IPBHTML .= <<<HTML
<tr>
<td><strong>{$member['members_display_name']}</strong></td>
<td>{$member['email']}</td>
<td>{$member['posts']}</td>
<td>{$member['ip_address']}</td>
<td>{$member['_joined']}</td>
</tr>
HTML;
}
}
else
{
$IPBHTML .= <<<HTML
<tr>
<td colspan='5' align='center'>{$this->lang->words['t_nomatches']}</td>
</tr>
HTML;
}
$IPBHTML .= <<<HTML
</table>
</div>
<br />
<div class='acp-box'>
<h3>{$this->lang->words['t_ipposting']}</h3>
<table class='alternate_rows' width='100%'>
<tr>
<th width='30%'>{$this->lang->words['t_ipname']}</th>
<th width='20%'>{$this->lang->words['t_ipemail']}</th>
<th width='20%'>{$this->lang->words['t_ipip']}</th>
<th width='20%'>{$this->lang->words['t_ipposted']}</th>
<th width='10%'>{$this->lang->words['t_ipview']}</th>
</tr>
HTML;
if( is_array($posted) AND count($posted) )
{
foreach( $posted as $member )
{
$IPBHTML .= <<<HTML
<tr>
<td><strong>{$member['members_display_name']}</strong></td>
<td>{$member['email']}</td>
<td>{$member['ip_address']}</td>
<td>{$member['_post_date']}</td>
<td align='center'><a href='{$this->settings['board_url']}/index.php?app=forums&amp;module=forums&amp;section=findpost&amp;pid={$member['pid']}' target='_blank'>{$this->lang->words['t_ipviewpost']}</a></td>
</tr>
HTML;
}
}
else
{
$IPBHTML .= <<<HTML
<tr>
<td colspan='5' align='center'>{$this->lang->words['t_nomatches']}</td>
</tr>
HTML;
}
$IPBHTML .= <<<HTML
</table>
</div>
<br />
<div class='acp-box'>
<h3>{$this->lang->words['t_ipvoting']}</h3>
<table class='alternate_rows' width='100%'>
<tr>
<th width='30%'>{$this->lang->words['t_ipname']}</th>
<th width='20%'>{$this->lang->words['t_ipemail']}</th>
<th width='20%'>{$this->lang->words['t_ipip']}</th>
<th width='20%'>{$this->lang->words['t_ipfirstused']}</th>
<th width='10%'>{$this->lang->words['t_ipview']}</th>
</tr>
HTML;
if( is_array($voted) AND count($voted) )
{
foreach( $voted as $member )
{
$IPBHTML .= <<<HTML
<tr>
<td><strong>{$member['members_display_name']}</strong></td>
<td>{$member['email']}</td>
<td>{$member['ip_address']}</td>
<td>{$member['_vote_date']}</td>
<td align='center'><a href='{$this->settings['board_url']}/index.php?showtopic={$member['tid']}' target='_blank'>{$this->lang->words['t_ipviewpoll']}</a></td>
</tr>
HTML;
}
}
else
{
$IPBHTML .= <<<HTML
<tr>
<td colspan='5' align='center'>{$this->lang->words['t_nomatches']}</td>
</tr>
HTML;
}
$IPBHTML .= <<<HTML
</table>
</div>
<br />
<div class='acp-box'>
<h3>{$this->lang->words['t_ipemailing']}</h3>
<table class='alternate_rows' width='100%'>
<tr>
<th width='30%'>{$this->lang->words['t_ipname']}</th>
<th width='30%'>{$this->lang->words['t_ipemail']}</th>
<th width='20%'>{$this->lang->words['t_ipip']}</th>
<th width='20%'>{$this->lang->words['t_ipfirstused']}</th>
</tr>
HTML;
if( is_array($emailed) AND count($emailed) )
{
foreach( $emailed as $member )
{
$IPBHTML .= <<<HTML
<tr>
<td><strong>{$member['members_display_name']}</strong></td>
<td>{$member['email']}</td>
<td>{$member['from_ip_address']}</td>
<td>{$member['_email_date']}</td>
</tr>
HTML;
}
}
else
{
$IPBHTML .= <<<HTML
<tr>
<td colspan='5' align='center'>{$this->lang->words['t_nomatches']}</td>
</tr>
HTML;
}
$IPBHTML .= <<<HTML
</table>
</div>
<br />
<div class='acp-box'>
<h3>{$this->lang->words['t_ipvalidating']}</h3>
<table class='alternate_rows' width='100%'>
<tr>
<th width='30%'>{$this->lang->words['t_ipname']}</th>
<th width='30%'>{$this->lang->words['t_ipemail']}</th>
<th width='20%'>{$this->lang->words['t_ipip']}</th>
<th width='20%'>{$this->lang->words['t_ipfirstused']}</th>
</tr>
HTML;
if( is_array($validating) AND count($validating) )
{
foreach( $validating as $member )
{
$IPBHTML .= <<<HTML
<tr>
<td><strong>{$member['members_display_name']}</strong></td>
<td>{$member['email']}</td>
<td>{$member['ip_address']}</td>
<td>{$member['_entry_date']}</td>
</tr>
HTML;
}
}
else
{
$IPBHTML .= <<<HTML
<tr>
<td colspan='5' align='center'>{$this->lang->words['t_nomatches']}</td>
</tr>
HTML;
}
$IPBHTML .= <<<HTML
</table>
</div>
<br />
<div class='acp-box'>
<h3>{$this->lang->words['t_ipalsofound']}</h3>
<table class='alternate_rows' width='100%'>
<tr>
<th width='30%'>{$this->lang->words['t_ipname']}</th>
<th width='30%'>{$this->lang->words['t_ip_table']}</th>
<th width='20%'>{$this->lang->words['t_ipip']}</th>
<th width='20%'>{$this->lang->words['t_ipfirstused']}</th>
</tr>
HTML;
if( is_array($results) AND count($results) )
{
foreach( $results as $table => $result )
{
if( count($result) )
{
foreach( $result as $member )
{
$date = $member['date'] ? ipsRegistry::getClass( 'class_localization')->getDate( $member['date'], 'SHORT' ) : '';
$member['members_display_name'] = $member['members_display_name'] ? $member['members_display_name'] : $this->lang->words['t_guest'];
$IPBHTML .= <<<HTML
<tr>
<td><strong>{$member['members_display_name']}</strong></td>
<td>{$table}</td>
<td>{$member['ip_address']}</td>
<td>{$date}</td>
</tr>
HTML;
}
}
}
}
else
{
$IPBHTML .= <<<HTML
<tr>
<td colspan='5' align='center'>{$this->lang->words['t_nomatches']}</td>
</tr>
HTML;
}
$IPBHTML .= <<<HTML
</table>
</div>
<br />
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Validation queue wrapper
*
* @access public
* @param string Type of queue
* @param string Queue HTML
* @param int Page start
* @param string New order
* @param string Page links
* @return string HTML
*/
public function queueWrapper( $type, $name, $content, $st, $new_ord, $links ) {
$IPBHTML = "";
//--starthtml--//
$table_text = mb_strtolower($name);
$this->form_code = 'module=members&amp;section=tools';
$memberq = sprintf( $this->lang->words['t_memberq'], $table_text );
$_do = $this->request['do'];
if( $_do == 'do_validating' )
{
$_do = 'validating';
}
else if( $_do == 'do_locked' )
{
$_do = 'locked';
}
else if( $_do == 'do_banned' )
{
$_do = 'banned';
}
else if( $_do == 'do_spam' )
{
$_do = 'spam';
}
$IPBHTML .= <<<HTML
<div class='section_title'>
<h2>{$memberq}</h2>
</div>
<script type="text/javascript" src='{$this->settings['js_app_url']}ipsMemberQueue.js'></script>
HTML;
if ( $_do == 'validating' )
{
$IPBHTML .= <<<HTML
<form name='selectform' id='selectform' action='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do={$_do}' method='post'>
<input type='hidden' name='_admin_auth_key' value='{$this->registry->getClass('adminFunctions')->_admin_auth_key}' />
<select name='filter'>
<option value='all'>{$this->lang->words['t_qshowall']}</option>
<option value='reg_user_validate'>{$this->lang->words['t_qshowreg']}</option>
<option value='reg_admin_validate'>{$this->lang->words['t_qshowadmin']}</option>
<option value='email_chg'>{$this->lang->words['t_qemailchange']}</option>
<option value='coppa'>{$this->lang->words['t_qcoppa']}</option>
</select>
<input type='submit' class='realbutton' value=' {$this->lang->words['t_qgobutton']} ' />
</form>
HTML;
}
$IPBHTML .= <<<HTML
<form name='theAdminForm' id='adminform' action='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=do_{$type}' method='post'>
<input type='hidden' name='_admin_auth_key' value='{$this->registry->getClass('adminFunctions')->_admin_auth_key}' />
{$links}
<br style='clear: both' />
<div class='acp-box'>
<h3>{$memberq}</h3>
<table class='alternate_rows double_pad' cellspacing='0' cellpadding='0'>
<tr>
<th width='1%'>&nbsp;</th>
<th>
{$this->lang->words['t_qdisplayname']}
<a href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do={$type}&amp;st={$st}&amp;sort=mem&amp;ord=desc' title='{$this->lang->words['sort_desc']}'><img src='{$this->settings['skin_acp_url']}/_newimages/sort_desc.png' /></a>
<a href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do={$type}&amp;st={$st}&amp;sort=mem&amp;ord=asc' title='{$this->lang->words['sort_asc']}'><img src='{$this->settings['skin_acp_url']}/_newimages/sort_asc.png' /></a>
</th>
<th>
{$this->lang->words['t_qaddress']}
<a href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do={$type}&amp;st={$st}&amp;sort=email&amp;ord=desc' title='{$this->lang->words['sort_desc']}'><img src='{$this->settings['skin_acp_url']}/_newimages/sort_desc.png' /></a>
<a href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do={$type}&amp;st={$st}&amp;sort=email&amp;ord=asc' title='{$this->lang->words['sort_asc']}'><img src='{$this->settings['skin_acp_url']}/_newimages/sort_asc.png' /></a>
</th>
<th>
{$this->lang->words['t_qposts']}
<a href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do={$type}&amp;st={$st}&amp;sort=posts&amp;ord=desc' title='{$this->lang->words['sort_desc']}'><img src='{$this->settings['skin_acp_url']}/_newimages/sort_desc.png' /></a>
<a href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do={$type}&amp;st={$st}&amp;sort=posts&amp;ord=asc' title='{$this->lang->words['sort_asc']}'><img src='{$this->settings['skin_acp_url']}/_newimages/sort_asc.png' /></a>
</th>
<th>
HTML;
switch( $type )
{
case 'validating':
$IPBHTML .= <<<HTML
{$this->lang->words['t_qsent']}
<a href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do={$type}&amp;st={$st}&amp;sort=sent&amp;ord=desc' title='{$this->lang->words['sort_desc']}'><img src='{$this->settings['skin_acp_url']}/_newimages/sort_desc.png' /></a>
<a href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do={$type}&amp;st={$st}&amp;sort=sent&amp;ord=asc' title='{$this->lang->words['sort_asc']}'><img src='{$this->settings['skin_acp_url']}/_newimages/sort_asc.png' /></a>
HTML;
break;
case 'locked':
$IPBHTML .= <<<HTML
{$this->lang->words['t_qfailed']}
<a href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do={$type}&amp;st={$st}&amp;sort=failed&amp;ord=desc' title='{$this->lang->words['sort_desc']}'><img src='{$this->settings['skin_acp_url']}/_newimages/sort_desc.png' /></a>
<a href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do={$type}&amp;st={$st}&amp;sort=failed&amp;ord=asc' title='{$this->lang->words['sort_asc']}'><img src='{$this->settings['skin_acp_url']}/_newimages/sort_asc.png' /></a>
HTML;
case 'banned':
$IPBHTML .= <<<HTML
{$this->lang->words['t_qgroup']}
<a href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do={$type}&amp;st={$st}&amp;sort=group&amp;ord=desc' title='{$this->lang->words['sort_desc']}'><img src='{$this->settings['skin_acp_url']}/_newimages/sort_desc.png' /></a>
<a href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do={$type}&amp;st={$st}&amp;sort=group&amp;ord=asc' title='{$this->lang->words['sort_asc']}'><img src='{$this->settings['skin_acp_url']}/_newimages/sort_asc.png' /></a>
HTML;
break;
case 'spam':
$IPBHTML .= <<<HTML
{$this->lang->words['t_qgroup']}
<a href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do={$type}&amp;st={$st}&amp;sort=group&amp;ord=desc' title='{$this->lang->words['sort_desc']}'><img src='{$this->settings['skin_acp_url']}/_newimages/sort_desc.png' /></a>
<a href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do={$type}&amp;st={$st}&amp;sort=group&amp;ord=asc' title='{$this->lang->words['sort_asc']}'><img src='{$this->settings['skin_acp_url']}/_newimages/sort_asc.png' /></a>
HTML;
break;
}
$IPBHTML .= <<<HTML
</th>
<th>
{$this->lang->words['t_qjoined']}
<a href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do={$type}&amp;st={$st}&amp;sort=joined&amp;ord=desc' title='{$this->lang->words['sort_desc']}'><img src='{$this->settings['skin_acp_url']}/_newimages/sort_desc.png' /></a>
<a href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do={$type}&amp;st={$st}&amp;sort=joined&amp;ord=asc' title='{$this->lang->words['sort_asc']}'><img src='{$this->settings['skin_acp_url']}/_newimages/sort_asc.png' /></a>
</th>
<th style='text-align: center'><input type='checkbox' id='maincheckbox' onclick='check_boxes()' /></th>
</tr>
{$content}
</table>
<div class='acp-actionbar' style='text-align: right'>
<select name='type' id='manage_type' class='dropdown'>
HTML;
switch( $type )
{
case 'validating':
$IPBHTML .= <<<HTML
<option value='approve'>{$this->lang->words['t_qapprove']}</option>
<option value='ban'>{$this->lang->words['t_qban']}</option>
<option value='spam'>{$this->lang->words['ts_spam_mark']}</option>
<option value='delete'>{$this->lang->words['t_qdelete']}</option>
<option value='resend'>{$this->lang->words['t_qresend']}</option>
HTML;
break;
case 'locked':
$IPBHTML .= <<<HTML
<option value='approve'>{$this->lang->words['t_qban']}</option>
<option value='delete'>{$this->lang->words['t_qdelete']}</option>
<option value='unlock'>{$this->lang->words['t_qunlock']}</option>
HTML;
break;
case 'banned':
$IPBHTML .= <<<HTML
<option value='unban'>{$this->lang->words['t_qunban']}</option>
<option value='delete'>{$this->lang->words['t_qdelete']}</option>
HTML;
break;
case 'spam':
$IPBHTML .= <<<HTML
<option value='unspam'>{$this->lang->words['ts_spam_un']}</option>
<option value='unspam_posts'>{$this->lang->words['ts_spam_un_posts']}</option>
<option value='ban'>{$this->lang->words['ts_spam_ban']}</option>
<option value='ban_blacklist'>{$this->lang->words['ts_spam_blacklist']}</option>
HTML;
break;
}
$IPBHTML .= <<<HTML
</select>
<input type='submit' class='realbutton' value=' {$this->lang->words['t_processbutton']} ' />
</div>
</div>
{$links}
</form>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* No rows in queue
*
* @access public
* @param string Language bit
* @return string HTML
*/
public function queueNoRows( $lang ) {
$IPBHTML = "";
//--starthtml--//
$IPBHTML .= <<<HTML
<tr>
<td class='tablerow2' colspan='8'><strong>{$lang}</strong></td>
</tr>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Validating row
*
* @access public
* @param array Record
* @return string HTML
*/
public function validatingRow( $r="" ) {
$IPBHTML = "";
//--starthtml--//
$daysandhours = sprintf( $this->lang->words['t_daysandhours'], $r['_days'], $r['_rhours'] );
$image = ( $r['user_verified'] ) ? 'normal_tick.png' : 'normal_lock.png';
$color = ( $r['user_verified'] ) ? 'red' : 'green';
$IPBHTML .= <<<HTML
<tr>
<td><img src='{$this->settings['skin_acp_url']}/_newimages/members/{$image}' alt='*' /></td>
<td class='tablerow2'><a href='{$this->settings['base_url']}&amp;module=members&amp;section=members&amp;do=viewmember&amp;member_id={$r['member_id']}'><strong>{$r['members_display_name']}</strong></a>{$r['_coppa']}<div class='desctext'>{$this->lang->words['t_ipcolon']} <a href='{$this->settings['base_url']}&amp;module=members&amp;section=tools&amp;do=learn_ip&amp;ip={$r['ip_address']}'>{$r['ip_address']}</a></div></td>
<td class='tablerow1'>{$r['email']}</td>
<td class='tablerow1' align='center'>{$r['posts']}</td>
<td class='tablerow1'><span style='color:{$color}'>{$r['_where']}</span><br />{$r['_entry']}<div class='desctext'>{$daysandhours}</div></td>
<td class='tablerow1'>{$r['_joined']}</td>
<td class='tablerow1' align='center'><input type='checkbox' id="mid_{$r['member_id']}" name='mid_{$r['member_id']}' value='1' /></td>
</tr>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Locked row
*
* @access public
* @param array Record
* @return string HTML
*/
public function lockedRow( $r="" ) {
$failuresatlife = sprintf( $this->lang->words['t_failures'], $r['oldest_fail'], $r['newest_fail'], $r['failed_login_count'] );
$IPBHTML = "";
//--starthtml--//
$IPBHTML .= <<<HTML
<tr>
<td><img src='{$this->settings['skin_acp_url']}/_newimages/members/normal_lock.png' alt='*' /></td>
<td class='tablerow2'><a href='{$this->settings['base_url']}&amp;module=members&amp;section=members&amp;do=viewmember&amp;member_id={$r['member_id']}'><strong>{$r['members_display_name']}</strong></a><div class='desctext'>{$this->lang->words['t_groupcolon']} {$r['group_title']}</div><div class='desctext'>{$r['ip_addresses']}</div></td>
<td class='tablerow1'>{$r['email']}</td>
<td class='tablerow1' align='center'>{$r['posts']}</td>
<td class='tablerow1'>{$failuresatlife}</td>
<td class='tablerow1'>{$r['_joined']}</td>
<td class='tablerow1' align='center'><input type='checkbox' id="mid_{$r['member_id']}" name='mid_{$r['member_id']}' value='1' /></td>
</tr>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Banned row
*
* @access public
* @param array Record
* @return string HTML
*/
public function bannedRow( $r="" ) {
$IPBHTML = "";
//--starthtml--//
$IPBHTML .= <<<HTML
<tr>
<td><img src='{$this->settings['skin_acp_url']}/_newimages/members/normal_alert.png' alt='*' /></td>
<td class='tablerow2'><a href='{$this->settings['base_url']}&amp;module=members&amp;section=members&amp;do=viewmember&amp;member_id={$r['member_id']}'><strong>{$r['members_display_name']}</strong></a></td>
<td class='tablerow1'>{$r['email']}</td>
<td class='tablerow1' align='center'>{$r['posts']}</td>
<td class='tablerow1'>{$r['group_title']}</td>
<td class='tablerow1'>{$r['_joined']}</td>
<td class='tablerow1' align='center'><input type='checkbox' id="mid_{$r['member_id']}" name='mid_{$r['member_id']}' value='1' /></td>
</tr>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Banned row
*
* @access public
* @param array Record
* @return string HTML
*/
public function spamRow( $r="" ) {
$IPBHTML = "";
//--starthtml--//
$IPBHTML .= <<<HTML
<tr>
<td><img src='{$this->settings['skin_acp_url']}/_newimages/members/normal_spam.png' alt='*' /></td>
<td class='tablerow2'><a href='{$this->settings['base_url']}&amp;module=members&amp;section=members&amp;do=viewmember&amp;member_id={$r['member_id']}'><strong>{$r['members_display_name']}</strong></a></td>
<td class='tablerow1'>{$r['email']}</td>
<td class='tablerow1' align='center'>{$r['posts']}</td>
<td class='tablerow1'>{$r['group_title']}</td>
<td class='tablerow1'>{$r['_joined']}</td>
<td class='tablerow1' align='center'><input type='checkbox' id="mid_{$r['member_id']}" name='mid_{$r['member_id']}' value='1' /></td>
</tr>
HTML;
//--endhtml--//
return $IPBHTML;
}
}
@@ -0,0 +1 @@
<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.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍