Yet another faked if loop

git-svn-id: file:///svn/phpbb/trunk@727 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2001-07-22 19:53:08 +00:00
parent 7d83ba703c
commit 287feac024
3 changed files with 64 additions and 48 deletions

View file

@ -167,9 +167,14 @@ $lang['No_Posts'] = "No Posts";
$lang['Forum_Index'] = "Forum Index"; $lang['Forum_Index'] = "Forum Index";
$lang['No_forums'] = "This board has no forums"; $lang['No_forums'] = "This board has no forums";
$lang['Private_Messages'] = "Private Messages";
$lang['Who_is_Online'] = "Who is Online";
// //
// Viewforum // Viewforum
// //
$lang['View_forum'] = "View Forum";
$lang['Forum_not_exist'] = "The forum you selected does not exist, please go back and try again"; $lang['Forum_not_exist'] = "The forum you selected does not exist, please go back and try again";
$lang['Reached_on_error'] = "You have reached this page in error, please go back and try again"; $lang['Reached_on_error'] = "You have reached this page in error, please go back and try again";
@ -181,6 +186,7 @@ $lang['Sticky'] = "<b>Sticky:</b>";
// Viewtopic // Viewtopic
// //
$lang['View_topic'] = "View topic"; $lang['View_topic'] = "View topic";
$lang['Guest'] = 'Guest'; $lang['Guest'] = 'Guest';
$lang['Post_subject'] = "Post subject"; $lang['Post_subject'] = "Post subject";
$lang['View_next_topic'] = "View next topic"; $lang['View_next_topic'] = "View next topic";
@ -265,6 +271,8 @@ $lang['to_return_topic'] = "to return to the topic";
// //
// Private Messaging // Private Messaging
// //
$lang['Private_Messaging'] = "Private Messaging";
$lang['You_have'] = "You have"; // followed by "x new message/s" $lang['You_have'] = "You have"; // followed by "x new message/s"
$lang['new'] = "new"; // see above $lang['new'] = "new"; // see above
$lang['message'] = "message"; // see above $lang['message'] = "message"; // see above
@ -285,6 +293,8 @@ $lang['Mark'] = "Mark";
$lang['Display_messages'] = "Display messages from previous"; // Followed by number of days/weeks/months $lang['Display_messages'] = "Display messages from previous"; // Followed by number of days/weeks/months
$lang['All_Messages'] = "All Messages"; $lang['All_Messages'] = "All Messages";
$lang['No_messages_folder'] = "You have no messages in this folder";
$lang['Cannot_send_privmsg'] = "Sorry but you are not currently allowed to send private messages."; $lang['Cannot_send_privmsg'] = "Sorry but you are not currently allowed to send private messages.";
$lang['No_to_user'] = "You must specify a username to send this message"; $lang['No_to_user'] = "You must specify a username to send this message";
$lang['No_such_user'] = "Sorry but no such user exists"; $lang['No_such_user'] = "Sorry but no such user exists";
@ -463,6 +473,7 @@ $lang['Non_member_groups'] = "Non-member groups";
$lang['Memberships_pending'] = "Memberships pending"; $lang['Memberships_pending'] = "Memberships pending";
$lang['Join_group'] = "Join Group"; $lang['Join_group'] = "Join Group";
$lang['No_group_members'] = "This group has no members";
$lang['This_open_group'] = "This is an open group, click to request membership"; $lang['This_open_group'] = "This is an open group, click to request membership";
$lang['This_closed_group'] = "This is a closed group, no more users accepted"; $lang['This_closed_group'] = "This is a closed group, no more users accepted";
@ -613,24 +624,12 @@ $lang[11] = "GMT + 11" . " " . $lang['Hours'];
$lang[12] = "GMT + 12" . " " . $lang['Hours']; $lang[12] = "GMT + 12" . " " . $lang['Hours'];
// //
// End
// -------------------------------------------------
// -------------------------------------------------
// Old format ... _DON'T_add_any_ new entries here!! // Old format ... _DON'T_add_any_ new entries here!!
// //
// Index page
// Members and profile
// Viewforum
// Private forums
// Viewtopic
// Functions
// Page_header
$l_statsblock = '$statsblock = "Our users have posted a total of -$total_posts- $l_messages.<br>
We have -$total_users- Registered Users.<br>
The newest Registered User is -<a href=\"$profile_url\">$newest_user</a>-.<br>
-$users_online- ". ($users_online==1?"user is":"users are") ." <a href=\"$online_url\">currently browsing</a> the forums.<br>";';
$l_privnotify = '$privnotify = "<br>You have $new_message <a href=\"$privmsg_url\">new private ".($new_message>1?"messages":"message")."</a>.";';
// Page_tail
// Auth
// Register // Register
$l_mailingaddress = $l_mailingaddress =
" "

View file

@ -1209,13 +1209,16 @@ if(!$pm_status = $db->sql_query($sql))
message_die(GENERAL_ERROR, "Could not query private messages.", "", __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, "Could not query private messages.", "", __LINE__, __FILE__, $sql);
} }
$pm_total = $db->sql_numrows($pm_tot_status); $pm_total = $db->sql_numrows($pm_tot_status);
$pm_count = $db->sql_numrows($pm_status);
$pm_list = $db->sql_fetchrowset($pm_status); $pm_list = $db->sql_fetchrowset($pm_status);
// //
// Okay, let's build the correct folder // Okay, let's build the correct folder
// //
for($i = 0; $i < count($pm_list); $i++) if($pm_count)
{ {
for($i = 0; $i < $pm_count; $i++)
{
$privmsg_id = $pm_list[$i]['privmsgs_id']; $privmsg_id = $pm_list[$i]['privmsgs_id'];
$flag = $pm_list[$i]['privmsgs_type']; $flag = $pm_list[$i]['privmsgs_type'];
@ -1252,7 +1255,16 @@ for($i = 0; $i < count($pm_list); $i++)
"U_READ" => $u_subject, "U_READ" => $u_subject,
"U_FROM_USER_PROFILE" => $u_from_user_profile) "U_FROM_USER_PROFILE" => $u_from_user_profile)
); );
} // for ... } // for ...
}
else
{
$template->assign_vars(array(
"L_NO_MESSAGES" => $lang['No_messages_folder'])
);
$template->assign_block_vars("nomessages", array() );
}
$template->assign_vars(array( $template->assign_vars(array(
"PAGINATION" => generate_pagination("privmsg.$phpEx?folder=$folder", $pm_total, $board_config['topics_per_page'], $start), "PAGINATION" => generate_pagination("privmsg.$phpEx?folder=$folder", $pm_total, $board_config['topics_per_page'], $start),

View file

@ -32,6 +32,11 @@
<td width="5%" align="center" valign="middle">{listrow.S_DEL_CHECKBOX}</td> <td width="5%" align="center" valign="middle">{listrow.S_DEL_CHECKBOX}</td>
</tr> </tr>
<!-- END listrow --> <!-- END listrow -->
<!-- BEGIN nomessages -->
<tr>
<td class="row1" colspan="5" align="center" valign="middle"><span class="gen">{L_NO_MESSAGES}</span></td>
</tr>
<!-- END nomessages -->
<tr> <tr>
<td class="cat" colspan="5"><table width="100%" cellspacing="0" cellpadding="0" border="0"> <td class="cat" colspan="5"><table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr> <tr>