Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Commit

Permalink
Roster Trunk:
Browse files Browse the repository at this point in the history
- Added guild_id check to guild memberslist pages
- localized a string in login.php
- moved install theme styles and images around (list last commit)
  • Loading branch information
zanix committed May 27, 2012
1 parent 63e83cf commit 44c26a0
Show file tree
Hide file tree
Showing 37 changed files with 328 additions and 367 deletions.
4 changes: 4 additions & 0 deletions addons/memberslist/guild/debug.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
exit('Detected invalid access to this file!');
}

if (!isset($roster->data['guild_id'])) {
return;
}

$query = "SELECT `config_name`, `config_value` "
. "FROM `" . $roster->db->table('config_guild',$addon['basename']) . "` "
. "WHERE `guild_id` = " . $roster->data['guild_id'] . ";";
Expand Down
4 changes: 4 additions & 0 deletions addons/memberslist/guild/honorlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
exit('Detected invalid access to this file!');
}

if (!isset($roster->data['guild_id'])) {
return;
}

include_once ($addon['inc_dir'] . 'memberslist.php');

$memberlist = new memberslist;
Expand Down
4 changes: 4 additions & 0 deletions addons/memberslist/guild/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
exit('Detected invalid access to this file!');
}

if (!isset($roster->data['guild_id'])) {
return;
}

include_once ($addon['inc_dir'] . 'memberslist.php');

$memberlist = new memberslist;
Expand Down
6 changes: 5 additions & 1 deletion addons/memberslist/guild/log.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
exit('Detected invalid access to this file!');
}

if (!isset($roster->data['guild_id'])) {
return;
}

include_once ($addon['inc_dir'] . 'memberslist.php');

$memberlist = new memberslist(array('group_alts'=>-1, 'page_size'=>25));
Expand Down Expand Up @@ -188,4 +192,4 @@ function type_value ( $row, $field )
return '<div style="display:none;">'.$row['type'].'</div>'.$return;
}
//echo '<pre>';
//print_r($roster->tpl);
//print_r($roster->tpl);
4 changes: 4 additions & 0 deletions addons/memberslist/guild/skilllist.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
exit('Detected invalid access to this file!');
}

if (!isset($roster->data['guild_id'])) {
return;
}

$skill_name = isset($_POST['skill']) ? $_POST['skill'] : 'Unarmed';

include_once ($addon['inc_dir'] . 'memberslist.php');
Expand Down
4 changes: 4 additions & 0 deletions addons/memberslist/guild/statslist.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
exit('Detected invalid access to this file!');
}

if (!isset($roster->data['guild_id'])) {
return;
}

include_once ($addon['inc_dir'] . 'memberslist.php');

$memberlist = new memberslist;
Expand Down
5 changes: 3 additions & 2 deletions install.php
Original file line number Diff line number Diff line change
Expand Up @@ -520,9 +520,10 @@ function process_step1( )
// Required?
$their_gd = 'Optional';

//curl check
// CURL check
$our_curl = in_array('curl', get_loaded_extensions()) ? '<span class="positive">Yes</span>' : '<span class="negative">No</span>';
$their_curl = 'Curl is required for api usage for updating.';
$their_curl = 'Required for Blizzard API';

if( (phpversion() < $REQUIRE['php_version']) || (!extension_loaded('mysql')) )
{
$tpl->error_append('<span style="font-weight:bold;font-size:14px;">Sorry, your server does not meet the minimum requirements for WoWRoster</span>');
Expand Down
74 changes: 27 additions & 47 deletions lib/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ function checkPass( $pass, $user,$createsession )

if( $count == 1 )
{
$remember = (isset($_POST['rememberMe']) ? (int)$_POST['rememberMe'] : (int)$_COOKIE['roster_remember'] );
$remember = (isset($_POST['rememberme']) ? (int)$_POST['rememberme'] : (int)$_COOKIE['roster_remember'] );
setcookie('roster_user',$user,(time()+60*60*24*30) );
setcookie('roster_u',$row['id'],(time()+60*60*24*30) );
setcookie('roster_pass',$pass,(time()+60*60*24*30) );
Expand All @@ -133,19 +133,18 @@ function checkPass( $pass, $user,$createsession )
if ($row['active'] != 1)
{
//roster_die('Your account is nto active or has not been approved by the admin only "Public" areas can be accessed');
$roster->set_message('Your account is not active or has not been approved by the admin only "Public" areas can be accessed', '', 'error');
$roster->set_message($roster->locale->act['login_inactive'], 'Roster Auth', 'error');
$this->access = '0:';
}
else
{
$this->access = $row['access'];
}

$this->logout = '<form class="inline slim" name="roster_logout" action="' . $this->action . '" method="post" enctype="multipart/form-data"><input type="hidden" name="logout" value="1" /> <button type="submit">' . $roster->locale->act['logout'] . '</button></form>';
$this->message = '<div class="login-message">Welcome, ' . $user . ' ' . $this->logout . '</div>';
$this->message = 'Welcome, ' . $user;
$roster->db->free_result($result);
return true;

return true;
}

$roster->db->free_result($result);
Expand Down Expand Up @@ -175,7 +174,7 @@ function getAuthorized( $access )
}
}
}
$roster->set_message( sprintf($roster->locale->act['addon_no_access'],$roster->pages[0]), 'Roster Auth','warning' );
$roster->set_message( sprintf($roster->locale->act['addon_no_access'], $roster->pages[0]), 'Roster Auth', 'warning');
return false;
}

Expand All @@ -194,19 +193,16 @@ function getLoginForm( )

if( !$this->allow_login && !isset($_POST['logout']) )
{

$login_message = $this->getMessage();

$roster->tpl->assign_block_vars('login', array(
'U_LOGIN_ACTION' => (isset($this->action) ? $this->action : $action),
'L_LOGIN_WORD' => '',
'S_LOGIN_MESSAGE' => (bool)$login_message,
'L_LOGIN_MESSAGE' => $login_message,
'L_REGISTER' => '',
'U_LOGIN' => 0
$roster->tpl->assign_vars(array(
'U_LOGIN_ACTION' => $this->action,
'L_LOGIN_WORD' => '',
'S_LOGIN_MESSAGE' => (bool)$this->message,
'L_LOGIN_MESSAGE' => $this->message,
'L_REGISTER' => '',
'U_LOGIN' => 0
));

$roster->tpl->set_handle('roster_login', 'login_new.html');
$roster->tpl->set_handle('roster_login', 'login.html');
return $roster->tpl->fetch('roster_login');
}
else
Expand All @@ -219,34 +215,15 @@ function getMenuLoginForm()
{
global $roster;

if( !$this->allow_login )
{
$login_message = $this->getMessage();
$roster->tpl->assign_vars(array(
'U_LOGIN_ACTION' => $this->action,
'S_LOGIN_MESSAGE' => (bool)$this->message,
'L_LOGIN_MESSAGE' => $this->message,
'U_LOGIN' => $this->valid
));

$roster->tpl->assign_vars(array(
'U_LOGIN_ACTION' => $this->action,
'S_LOGIN_MESSAGE' => (bool)$login_message,
'L_LOGIN_MESSAGE' => $login_message,
'U_LOGIN' => $this->valid
));

$roster->tpl->set_handle('roster_menu_login', 'menu_login.html');
return $roster->tpl->fetch('roster_menu_login');
}
else
{
$logout_message = $this->getMessage();

$roster->tpl->assign_vars(array(
'U_LOGOUT_ACTION' => $this->action,
'S_LOGOUT_MESSAGE' => (bool)$logout_message,
'L_LOGOUT_MESSAGE' => $logout_message,
'U_LOGIN' => $this->valid
));

$roster->tpl->set_handle('roster_menu_logout', 'menu_logout.html');
return $roster->tpl->fetch('roster_menu_logout');
}
$roster->tpl->set_handle('roster_menu_login', 'menu_login.html');
return $roster->tpl->fetch('roster_menu_login');
}

function setAction( $action )
Expand Down Expand Up @@ -312,19 +289,22 @@ function getUID($user, $pass)
$result = $roster->db->query($query);
$rows = $roster->db->num_rows($result);
$row = $roster->db->fetch($result);

if ($rows == 1)
{
return $row['id'];
}else{
}
else
{
return '0';
}
}

function getUUID( $d )
{
global $roster;

return hash('ripemd128',$d);
return hash('ripemd128', $d);
}


}
1 change: 1 addition & 0 deletions localization/deDE.php
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@
$lang['logged_out'] = 'Abgemeldet';
$lang['login_invalid'] = 'Ungültiges Passwort';
$lang['login_fail'] = 'Fehler bei dem Abrufen der Passwort Informationen';
$lang['login_inactive'] = 'Your account is not active or is not approved by the admin. Only "Public" areas can be accessed.';

//this needs to be exact as it is the wording in the db
$lang['professions']='Berufe';
Expand Down
1 change: 1 addition & 0 deletions localization/enUS.php
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@
$lang['logged_out'] = 'Logged out';
$lang['login_invalid'] = 'Invalid Password';
$lang['login_fail'] = 'Failed to fetch password info';
$lang['login_inactive'] = 'Your account is not active or is not approved by the admin. Only "Public" areas can be accessed.';

//this needs to be exact as it is the wording in the db
$lang['professions']='Professions';
Expand Down
1 change: 1 addition & 0 deletions localization/esES.php
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@
$lang['logged_out'] = 'Logged out';
$lang['login_invalid'] = 'Invalid Password';
$lang['login_fail'] = 'Failed to fetch password info';
$lang['login_inactive'] = 'Your account is not active or is not approved by the admin. Only "Public" areas can be accessed.';

//this needs to be exact as it is the wording in the db
$lang['professions']='Profesiones';
Expand Down
1 change: 1 addition & 0 deletions localization/frFR.php
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@
$lang['logged_out'] = 'Logged out';
$lang['login_invalid'] = 'Invalid Password';
$lang['login_fail'] = 'Failed to fetch password info';
$lang['login_inactive'] = 'Your account is not active or is not approved by the admin. Only "Public" areas can be accessed.';

//this needs to be exact as it is the wording in the db
$lang['professions']='Métiers';
Expand Down
45 changes: 1 addition & 44 deletions templates/default/style/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -226,50 +226,7 @@ textbox {
font: bold 12px/normal Arial, Helvetica, sans-serif;
overflow: hidden;
}
/*
.button-char { background: url(../images/menu/menu_char.png) no-repeat left top; }
.button-char:hover { background: url(../images/menu/menu_char.png) no-repeat left bottom; }
.button-members { background: url(../images/menu/mini_guild.png) no-repeat left top; }
.button-members:hover { background: url(../images/menu/mini_guild.png) no-repeat left bottom; }
.button-guild { background: url(../images/menu/menu_guild.png) no-repeat left top; }
.button-guild:hover { background: url(../images/menu/menu_guild.png) no-repeat left bottom; }
.button-realm { background: url(../images/menu/menu_realm.png) no-repeat left top; }
.button-realm:hover { background: url(../images/menu/menu_realm.png) no-repeat left bottom; }
.button-upload { background: url(../images/menu/menu_upload.png) no-repeat left top; }
.button-upload:hover { background: url(../images/menu/menu_upload.png) no-repeat left bottom; }
.button-user { background: url(../images/menu/menu_user.png) no-repeat left top; }
.button-user:hover { background: url(../images/menu/menu_user.png) no-repeat left bottom; }
.button-util { background: url(../images/menu/menu_utilities.png) no-repeat left top; }
.button-util:hover { background: url(../images/menu/menu_utilities.png) no-repeat left bottom; }
.button-char { background: url(../images/menu/menu_char.png);background-position: 0px 0px; width: 151px; height: 20px; display: block;}
.button-char :hover{ background: url(../images/menu/menu_char.png);background-position: 0px 80px; width: 151px; height: 20px; display: block;}
.button-char-selected { background: url(../images/menu/menu_char.png);background-position: 0px 40px; width: 151px; height: 20px; display: block;}
.button-char-selected :hover{ background: url(../images/menu/menu_char.png);background-position: 0px 80px; width: 151px; height: 20px; display: block;}
.button-members { background: url(../images/menu/mini_guild.png);background-position: 0px 0px; width: 151px; height: 20px; display: block;}
.button-members :hover{ background: url(../images/menu/mini_guild.png);background-position: 0px 80px; width: 151px; height: 20px; display: block;}
.button-members-selected { background: url(../images/menu/mini_guild.png);background-position: 0px 40px; width: 151px; height: 20px; display: block;}
.button-members-selected :hover{ background: url(../images/menu/mini_guild.png);background-position: 0px 80px; width: 151px; height: 20px; display: block;}
.button-guild { background: url(../images/menu/menu_guild.png);background-position: 0px 0px; width: 151px; height: 20px; display: block;}
.button-guild :hover{ background: url(../images/menu/menu_guild.png);background-position: 0px 80px; width: 151px; height: 20px; display: block;}
.button-guild-selected { background: url(../images/menu/menu_guild.png);background-position: 0px 40px; width: 151px; height: 20px; display: block;}
.button-guild-selected :hover{ background: url(../images/menu/menu_guild.png);background-position: 0px 80px; width: 151px; height: 20px; display: block;}
.button-realm { background: url(../images/menu/menu_realm.png);background-position: 0px 0px; width: 151px; height: 20px; display: block;}
.button-realm :hover{ background: url(../images/menu/menu_realm.png);background-position: 0px 80px; width: 151px; height: 20px; display: block;}
.button-realm-selected { background: url(../images/menu/menu_realm.png);background-position: 0px 40px; width: 151px; height: 20px; display: block;}
.button-realm-selected :hover{ background: url(../images/menu/menu_realm.png);background-position: 0px 80px; width: 151px; height: 20px; display: block;}
.button-upload { background: url(../images/menu/menu_upload.png);background-position: 0px 0px; width: 151px; height: 20px; display: block;}
.button-upload :hover{ background: url(../images/menu/menu_upload.png);background-position: 0px 80px; width: 151px; height: 20px; display: block;}
.button-upload-selected { background: url(../images/menu/menu_upload.png);background-position: 0px 40px; width: 151px; height: 20px; display: block;}
.button-upload-selected :hover{ background: url(../images/menu/menu_upload.png);background-position: 0px 80px; width: 151px; height: 20px; display: block;}
.button-user { background: url(../images/menu/menu_user.png);background-position: 0px 0px; width: 151px; height: 20px; display: block;}
.button-user :hover{ background: url(../images/menu/menu_user.png);background-position: 0px 80px; width: 151px; height: 20px; display: block;}
.button-user-selected { background: url(../images/menu/menu_user.png);background-position: 0px 40px; width: 151px; height: 20px; display: block;}
.button-user-selected :hover{ background: url(../images/menu/menu_user.png);background-position: 0px 80px; width: 151px; height: 20px; display: block;}
.button-util { background: url(../images/menu/menu_utilities.png);background-position: 0px 0px; width: 151px; height: 20px; display: block;}
.button-util :hover{ background: url(../images/menu/menu_utilities.png);background-position: 0px 80px; width: 151px; height: 20px; display: block;}
.button-util-selected { background: url(../images/menu/menu_utilities.png);background-position: 0px 40px; width: 151px; height: 20px; display: block;}
.button-util-selected :hover{ background: url(../images/menu/menu_utilities.png);background-position: 0px 80px; width: 151px; height: 20px; display: block;}
*/

.button-char { background: url(../images/menu/menu.png);background-position: 0px 0px; width: 151px; height: 20px; display: block;}
.button-char :hover{ background: url(../images/menu/menu.png);background-position: 0px 80px; width: 151px; height: 20px; display: block;}
.button-char-selected { background: url(../images/menu/menu.png);background-position: 0px 40px; width: 151px; height: 20px; display: block;}
Expand Down
19 changes: 8 additions & 11 deletions templates/default/theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ function border( $style , $mode , $header_text='' , $width='' )

if( $header_text != '' && $style != 'end' )
{
// $header_text = "\n" . '<div class="header_text ' . $backg_css . '">' . $header_text . "</div>\n";
$header_text = "\n" . '<div class="tier-2-title">' . $header_text . "</div>\n";
}
else
Expand All @@ -55,12 +54,10 @@ function border( $style , $mode , $header_text='' , $width='' )
}

// Dynamic Bordering
// $start = '<table class="border_frame" cellpadding="0" cellspacing="1"' . ( $width!=''?' style="width:' . $width . ';"':'' ) . '><tr><td class="border_color ' . $backg_css . '">' . $header_text;
$start = '<div class="tier-2-a' . ($backg_css!=''?' '.$backg_css:'') . '" style="width:' . ( $width!=''?$width:'auto' ) . ';">
$start = '<div class="tier-2-a' . ($backg_css != '' ? ' ' . $backg_css : '') . '" style="width:' . ( $width != '' ? $width : 'auto' ) . ';">
<div class="tier-2-b">
' . $header_text;

// $end = "\n</td></tr></table>\n";
$end = "\n</div>\n</div>\n";

switch( $mode )
Expand Down Expand Up @@ -105,11 +102,11 @@ function messagebox( $message , $title='Message' , $style='sgray' , $width='' )
function scrollbox( $message , $title='Message' , $style='sgray' , $width='550px' , $height='300px' )
{
return
border($style,'start',$title, $width)
border($style, 'start', $title, $width)
. '<div style="height:' . $height . ';width:100%;overflow:auto;">'
. '<div class="info-text-h">' . $message . '</div>'
. '</div>'
. border($style,'end');
. border($style, 'end');
}

/**
Expand All @@ -129,11 +126,11 @@ function messageboxtoggle( $message , $title='Message' , $style='sgray' , $open=
$toggleboxes++;

$title = "<div style=\"cursor:pointer;width:100%;\" onclick=\"showHide('msgbox_" . $toggleboxes . "','msgboximg_" . $toggleboxes . "','" . $roster->config['theme_path'] . "/images/button_open.png','" . $roster->config['theme_path'] . "/images/button_close.png');\">"
. "<img src=\"" . $roster->config['theme_path'] . '/images/button_' . (($open)?'open':'close') . ".png\" style=\"float:right;\" alt=\"\" id=\"msgboximg_" . $toggleboxes . "\" />" . $title . "</div>";
. "<img src=\"" . $roster->config['theme_path'] . '/images/button_' . ($open ? 'open' : 'close') . ".png\" style=\"float:right;\" alt=\"\" id=\"msgboximg_" . $toggleboxes . "\" />" . $title . "</div>";

return
border($style, 'start', $title, $width)
. '<div style="display:' . (($open)?'inline':'none') . ';" id="msgbox_' . $toggleboxes . '">'
. '<div style="display:' . ($open ? 'inline' : 'none') . ';" id="msgbox_' . $toggleboxes . '">'
. '<div class="info-text-h">' . $message . '</div>'
. '</div>'
. border($style, 'end');
Expand All @@ -156,12 +153,12 @@ function scrollboxtoggle( $message , $title='Message' , $style='sgray' , $open=f
$toggleboxes++;

$title = "<div style=\"cursor:pointer;width:100%;\" onclick=\"showHide('msgbox_" . $toggleboxes . "','msgboximg_" . $toggleboxes . "','" . $roster->config['theme_path'] . "/images/button_open.png','" . $roster->config['theme_path'] . "/images/button_close.png');\">"
. "<img src=\"" . $roster->config['theme_path'] . '/images/button_' . (($open)?'open':'close') . ".png\" style=\"float:right;\" alt=\"\" id=\"msgboximg_" . $toggleboxes . "\" />" . $title . "</div>";
. "<img src=\"" . $roster->config['theme_path'] . '/images/button_' . ($open ? 'open' : 'close') . ".png\" style=\"float:right;\" alt=\"\" id=\"msgboximg_" . $toggleboxes . "\" />" . $title . "</div>";

return
border($style,'start',$title, $width)
. '<div style="height:' . $height . ';width:100%;overflow:auto;display:'.(($open)?'inline':'none').';" id="msgbox_'.$toggleboxes.'">'
. '<div style="height:' . $height . ';width:100%;overflow:auto;display:' . ($open ? 'inline' : 'none') . ';" id="msgbox_' . $toggleboxes . '">'
. '<div class="info-text-h">' . $message . '</div>'
. '</div>'
. border($style,'end');
. border($style, 'end');
}
10 changes: 5 additions & 5 deletions templates/install/install_header.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
<title>WoWRoster Installation - Step {INSTALL_STEP}</title>

<link rel="icon" href="favicon.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" media="screen" href="{TEMPLATE_PATH}/jquery-ui.css" />
<link rel="stylesheet" type="text/css" media="screen" href="{TEMPLATE_PATH}/ui.selectmenu.css" />
<link rel="stylesheet" type="text/css" media="screen" href="{TEMPLATE_PATH}/style.css" />
<link rel="stylesheet" type="text/css" media="screen" href="{TEMPLATE_PATH}/install.css" />
<link rel="stylesheet" type="text/css" media="screen" href="{TEMPLATE_PATH}/style/jquery-ui.css" />
<link rel="stylesheet" type="text/css" media="screen" href="{TEMPLATE_PATH}/style/ui.selectmenu.css" />
<link rel="stylesheet" type="text/css" media="screen" href="{TEMPLATE_PATH}/style/style.css" />
<link rel="stylesheet" type="text/css" media="screen" href="{TEMPLATE_PATH}/style/install.css" />

<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery-ui.js"></script>
<script type="text/javascript" src="js/ui.selectmenu.js"></script>
<script type="text/javascript" src="{THEME_PATH}/script.js"></script>
<script type="text/javascript" src="{THEME_PATH}/theme.js"></script>
<script type="text/javascript" src="js/overlib.js"></script>
</head>

Expand Down
Loading

0 comments on commit 44c26a0

Please sign in to comment.