Jump to content
xisto Community

ppj

Members
  • Content Count

    26
  • Joined

  • Last visited

  1. Hello, I need a bit of help. (Oh great, here we go again with a newb) The question is, as a free-hosted site, do I have access to phpMyAdmin? If not, I'd like to install it. Is there any problem with that? If you don't know what phpMyAdmin is, It's your best friend if you use php and databases. It's a web-based, visual database manager, and it's god. Thanks
  2. What site in a box do you use? I have used PHP-Nuke and E107 abd i tghought E107 was better for the uploading and that nuke was better for everything else
  3. After following the installation instructions as closely as possible, I get an error in my memberlist.php file Quote: Parse error: parse error, unexpected T_VARIABLE in /home/scottyw/public_html/forum/memberlist.php on line 25 Full code: Code: <?php /*************************************************************************** * memberlist.php * ------------------- * begin : Friday, May 11, 2001 * copyright : Š 2001 The phpBB Group * email : support@phpbb.com * * $Id: memberlist.php,v 1.36.2.10 2004/07/11 16:46:15 acydburn Exp $ * ***************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * ***************************************************************************/ define('IN_PHPBB', true); define('IN_CASHMOD', true); define('CM_MEMBERLIST', true);f $phpbb_root_path = './'; include($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'common.'.$phpEx); // // Start session management // $userdata = session_pagestart($user_ip, PAGE_VIEWMEMBERS); init_userprefs($userdata); // // End session management // $start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0; if ( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) ) { $mode = ( isset($HTTP_POST_VARS['mode']) ) ? htmlspecialchars($HTTP_POST_VARS['mode']) : htmlspecialchars($HTTP_GET_VARS['mode']); } else { $mode = 'joined'; } if(isset($HTTP_POST_VARS['order'])) { $sort_order = ($HTTP_POST_VARS['order'] == 'ASC') ? 'ASC' : 'DESC'; } else if(isset($HTTP_GET_VARS['order'])) { $sort_order = ($HTTP_GET_VARS['order'] == 'ASC') ? 'ASC' : 'DESC'; } else { $sort_order = 'ASC'; } // // Memberlist sorting // $mode_types_text = array($lang['Sort_Joined'], $lang['Sort_Username'], $lang['Sort_Location'], $lang['Sort_Posts'], $lang['Sort_Email'], $lang['Sort_Website'], $lang['Sort_Top_Ten']); $mode_types = array('joindate', 'username', 'location', 'posts', 'email', 'website', 'topten'); $cm_memberlist->droplists($mode_types_text,$mode_types); $select_sort_mode = '<select name="mode">'; for($i = 0; $i < count($mode_types_text); $i++) { $selected = ( $mode == $mode_types[$i] ) ? ' selected="selected"' : ''; $select_sort_mode .= '<option value="' . $mode_types[$i] . '"' . $selected . '>' . $mode_types_text[$i] . '</option>'; } $select_sort_mode .= '</select>'; $select_sort_order = '<select name="order">'; if($sort_order == 'ASC') { $select_sort_order .= '<option value="ASC" selected="selected">' . $lang['Sort_Ascending'] . '</option><option value="DESC">' . $lang['Sort_Descending'] . '</option>'; } else { $select_sort_order .= '<option value="ASC">' . $lang['Sort_Ascending'] . '</option><option value="DESC" selected="selected">' . $lang['Sort_Descending'] . '</option>'; } $select_sort_order .= '</select>'; // // Generate page // $page_title = $lang['Memberlist']; include($phpbb_root_path . 'includes/page_header.'.$phpEx); $template->set_filenames(array( 'body' => 'memberlist_body.tpl') ); make_jumpbox('viewforum.'.$phpEx); $template->assign_vars(array( 'L_SELECT_SORT_METHOD' => $lang['Select_sort_method'], 'L_EMAIL' => $lang['Email'], 'L_WEBSITE' => $lang['Website'], 'L_FROM' => $lang['Location'], 'L_ORDER' => $lang['Order'], 'L_SORT' => $lang['Sort'], 'L_SUBMIT' => $lang['Sort'], 'L_AIM' => $lang['AIM'], 'L_YIM' => $lang['YIM'], 'L_MSNM' => $lang['MSNM'], 'L_ICQ' => $lang['ICQ'], 'L_JOINED' => $lang['Joined'], 'L_POSTS' => $lang['Posts'], 'L_PM' => $lang['Private_Message'], 'S_MODE_SELECT' => $select_sort_mode, 'S_ORDER_SELECT' => $select_sort_order, 'S_MODE_ACTION' => append_sid("memberlist.$phpEx")) ); switch( $mode ) { case 'joined': $order_by = "user_regdate $sort_order LIMIT $start, " . $board_config['topics_per_page']; break; case 'username': $order_by = "username $sort_order LIMIT $start, " . $board_config['topics_per_page']; break; case 'location': $order_by = "user_from $sort_order LIMIT $start, " . $board_config['topics_per_page']; break; case 'posts': $order_by = "user_posts $sort_order LIMIT $start, " . $board_config['topics_per_page']; break; case 'email': $order_by = "user_email $sort_order LIMIT $start, " . $board_config['topics_per_page']; break; case 'website': $order_by = "user_website $sort_order LIMIT $start, " . $board_config['topics_per_page']; break; case 'topten': $order_by = "user_posts $sort_order LIMIT 10"; break; case $cm_memberlist->modecheck($mode): $order_by = $cm_memberlist->getfield($mode) . " $sort_order LIMIT $start, " . $board_config['topics_per_page']; break; default: $order_by = "user_regdate $sort_order LIMIT $start, " . $board_config['topics_per_page']; break; } $sql = "SELECT username, user_id, user_viewemail, user_posts, user_regdate, user_from, user_website, user_email, user_icq, user_aim, user_yim, user_msnm, user_avatar, user_avatar_type, user_allowavatar FROM " . USERS_TABLE . " WHERE user_id <> " . ANONYMOUS . " ORDER BY $order_by"; $cm_memberlist->generate_columns($template,$sql,8); if( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not query users', '', __LINE__, __FILE__, $sql); } if ( $row = $db->sql_fetchrow($result) ) { $i = 0; do { $username = $row['username']; $user_id = $row['user_id']; $from = ( !empty($row['user_from']) ) ? $row['user_from'] : ' '; $joined = create_date($lang['DATE_FORMAT'], $row['user_regdate'], $board_config['board_timezone']); $posts = ( $row['user_posts'] ) ? $row['user_posts'] : 0; $poster_avatar = ''; if ( $row['user_avatar_type'] && $user_id != ANONYMOUS && $row['user_allowavatar'] ) { switch( $row['user_avatar_type'] ) { case USER_AVATAR_UPLOAD: $poster_avatar = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $row['user_avatar'] . '" alt="" border="0" />' : ''; break; case USER_AVATAR_REMOTE: $poster_avatar = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $row['user_avatar'] . '" alt="" border="0" />' : ''; break; case USER_AVATAR_GALLERY: $poster_avatar = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $row['user_avatar'] . '" alt="" border="0" />' : ''; break; } } if ( !empty($row['user_viewemail']) || $userdata['user_level'] == ADMIN ) { $email_uri = ( $board_config['board_email_form'] ) ? append_sid("profile.$phpEx?mode=email&" . POST_USERS_URL .'=' . $user_id) : 'mailto:' . $row['user_email']; $email_img = '<a href="' . $email_uri . '"><img src="' . $images['icon_email'] . '" alt="' . $lang['Send_email'] . '" title="' . $lang['Send_email'] . '" border="0" /></a>'; $email = '<a href="' . $email_uri . '">' . $lang['Send_email'] . '</a>'; } else { $email_img = ' '; $email = ' '; } $temp_url = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$user_id"); $profile_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_profile'] . '" alt="' . $lang['Read_profile'] . '" title="' . $lang['Read_profile'] . '" border="0" /></a>'; $profile = '<a href="' . $temp_url . '">' . $lang['Read_profile'] . '</a>'; $temp_url = append_sid("privmsg.$phpEx?mode=post&" . POST_USERS_URL . "=$user_id"); $pm_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" border="0" /></a>'; $pm = '<a href="' . $temp_url . '">' . $lang['Send_private_message'] . '</a>'; $www_img = ( $row['user_website'] ) ? '<a href="' . $row['user_website'] . '" target="_userwww"><img src="' . $images['icon_www'] . '" alt="' . $lang['Visit_website'] . '" title="' . $lang['Visit_website'] . '" border="0" /></a>' : ''; $www = ( $row['user_website'] ) ? '<a href="' . $row['user_website'] . '" target="_userwww">' . $lang['Visit_website'] . '</a>' : ''; if ( !empty($row['user_icq']) ) { $icq_status_img = '<a href="http://wwp.icq.com/' . $row['user_icq'] . '#pager"><img src="http://web.icq.com/whitepages/online?icq=' . $row['user_icq'] . '&img=5" width="18" height="18" border="0" /></a>'; $icq_img = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $row['user_icq'] . '"><img src="' . $images['icon_icq'] . '" alt="' . $lang['ICQ'] . '" title="' . $lang['ICQ'] . '" border="0" /></a>'; $icq = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $row['user_icq'] . '">' . $lang['ICQ'] . '</a>'; } else { $icq_status_img = ''; $icq_img = ''; $icq = ''; } $aim_img = ( $row['user_aim'] ) ? '<a href="aim:goim?screenname=' . $row['user_aim'] . '&message=Hello+Are+you+there?"><img src="' . $images['icon_aim'] . '" alt="' . $lang['AIM'] . '" title="' . $lang['AIM'] . '" border="0" /></a>' : ''; $aim = ( $row['user_aim'] ) ? '<a href="aim:goim?screenname=' . $row['user_aim'] . '&message=Hello+Are+you+there?">' . $lang['AIM'] . '</a>' : ''; $temp_url = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$user_id"); $msn_img = ( $row['user_msnm'] ) ? '<a href="' . $temp_url . '"><img src="' . $images['icon_msnm'] . '" alt="' . $lang['MSNM'] . '" title="' . $lang['MSNM'] . '" border="0" /></a>' : ''; $msn = ( $row['user_msnm'] ) ? '<a href="' . $temp_url . '">' . $lang['MSNM'] . '</a>' : ''; $yim_img = ( $row['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&.src=pg"><img src="' . $images['icon_yim'] . '" alt="' . $lang['YIM'] . '" title="' . $lang['YIM'] . '" border="0" /></a>' : ''; $yim = ( $row['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&.src=pg">' . $lang['YIM'] . '</a>' : ''; $temp_url = append_sid("search.$phpEx?search_author=" . urlencode($username) . "&showresults=posts"); $search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . $lang['Search_user_posts'] . '" border="0" /></a>'; $search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>'; $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2']; $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2']; $template->assign_block_vars('memberrow', array( 'ROW_NUMBER' => $i + ( $start + 1 ), 'ROW_COLOR' => '#' . $row_color, 'ROW_CLASS' => $row_class, 'USERNAME' => $username, 'FROM' => $from, 'JOINED' => $joined, 'POSTS' => $posts, 'AVATAR_IMG' => $poster_avatar, 'PROFILE_IMG' => $profile_img, 'PROFILE' => $profile, 'SEARCH_IMG' => $search_img, 'SEARCH' => $search, 'PM_IMG' => $pm_img, 'PM' => $pm, 'EMAIL_IMG' => $email_img, 'EMAIL' => $email, 'WWW_IMG' => $www_img, 'WWW' => $www, 'ICQ_STATUS_IMG' => $icq_status_img, 'ICQ_IMG' => $icq_img, 'ICQ' => $icq, 'AIM_IMG' => $aim_img, 'AIM' => $aim, 'MSN_IMG' => $msn_img, 'MSN' => $msn, 'YIM_IMG' => $yim_img, 'YIM' => $yim, 'U_VIEWPROFILE' => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$user_id")) ); $cm_memberlist->listing($template,$row ); $i++; } while ( $row = $db->sql_fetchrow($result) ); $db->sql_freeresult($result); } if ( $mode != 'topten' || $board_config['topics_per_page'] < 10 ) { $sql = "SELECT count(*) AS total FROM " . USERS_TABLE . " WHERE user_id <> " . ANONYMOUS; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Error getting total users', '', __LINE__, __FILE__, $sql); } if ( $total = $db->sql_fetchrow($result) ) { $total_members = $total['total']; $pagination = generate_pagination("memberlist.$phpEx?mode=$mode&order=$sort_order", $total_members, $board_config['topics_per_page'], $start). ' '; } $db->sql_freeresult($result); } else { $pagination = ' '; $total_members = 10; } $template->assign_vars(array( 'PAGINATION' => $pagination, 'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $board_config['topics_per_page'] ) + 1 ), ceil( $total_members / $board_config['topics_per_page'] )), 'L_GOTO_PAGE' => $lang['Goto_page']) ); $template->pparse('body'); include($phpbb_root_path . 'includes/page_tail.'.$phpEx); ?> Where have I gone wrong?
  4. A good CMS http://forums.xisto.com/no_longer_exists/ a site with KOOBI CMS in action http://forums.xisto.com/no_longer_exists/ demo http://forums.xisto.com/no_longer_exists/ download
  5. You can make Gmail Singature Demo : http://forums.xisto.com/no_longer_exists/ Download Script : http://forums.xisto.com/no_longer_exists/ Good luck to you
  6. Hello everyone, i am a newbie of webdesigner, just heard about CSS. can anyone feel free to have a introduction about css? is it a format or somethin
  7. Can MS Access interface with mySQL? Does anyone know how to set it up? Is it even a good idea to?
  8. What are the best Open Source MySql developer tools?
  9. hello... what are the infos for the mysql databases ? Like the host, is it localhost ? and the username ? And what does setting up users for the databases in cpanel does ? thanks in advance
  10. ok i have a pice of code that loads an IP and a discription to a list box from a text file and nomaly it should load the full ip (like 23.435.12.34) but instead it will load 23.435 can anyone help here the code Code: Private Sub Form_Load() Open App.Path & "\config.txt" For Input As #1 Dim stra As String Input #1, stra txtPath.Text = stra Dim fora As Integer Input #1, DICount If DICount = 1 Then Input #1, IPs(1) Input #1, Descs(1) lstServer.AddItem IPs(1) & " -" & Descs(1) & "-" Else For fora = 1 To DICount Input #1, IPs(fora) Input #1, Descs(fora) lstServer.AddItem IPs(fora) & " -" & Descs(fora) & "-" Next fora End If Close #1 'DICount = 0 End Sub
  11. Does anybody here knows how to make the date in my script from 01-10-2004 to January 10, 2004. My script displays the date in this format and I want to make it like the latter but I don't know how. The script uses a database. Just wanna ask if what type should be the date in the db? I know how to make it January 10, 2004. It's like date("m i, Y") Hope somebody'll reply!
  12. have been working on this for a while, and have not yet figured out how to incorporate information from SSI scripts into flash movies. has anyone else been able to figure it out?
  13. I need realy good tutorfor complete idiots (me)
  14. This is the best source for Javascript tools. http://www.codebrain.com/
  15. the best way to start php is probably not adjusting a script IMO - that misses out a stage. - the very first stage - here... Why use php? because it allows things to be generated very quickly - without lots of html pages. It enables users you choose to allow, to input their own content to the pages you want them to. 1) save these files as anyfilename.php - pick your names, upload them to a php enabled server and go to the url they are at... 2) understand <?, ?>, .php, //////, /* */, and ; Code: <? ?> THis tells the web browser when to expect php coding. So... when writing php, this needs to encase all php code - or it will be formatted as html. Naming a filename .php allows for <? and ?> to be expected - or it will show as html. Code: <? //// hello - this line will be overlooked /* hello these lines will be overlooked*/ ?> both of these 'hello's' will not be formatted as php - these 2 bits of code exclude the contained text. Code: <? print "hello" ?> print tells the php to print the contained text - if a variable is used then ""'s are not usually needed, if "" are used then the content will be shown as html. The above WILL NOT WORK. Each line of php code needs to be ended with a ;. 3) printing basic html Code: <? print 'hello world'; ?> open the file - it will show the words hello world with no formatting. 4) printing and setting variables Code: <? $hello = 'hello world'; ///setting variables print $hello; ///printing variables ?> 5) if else with variables Code: <? $a = $_GET['a']; ///setting variables (3) if (isset($a)) { print '<a href="?a=0">Click here</a><br>'; ///printing html (2) print "a is set to:".$a; } else { print '<a href="?a=1">Click here</a><br>'; ///printing html (2) print "a is empty"; } ?> for a form... adjusting my last script from above... 6) create the form html - save as form.php. Code: <? $form = <<<HTML <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Form!</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <form action="?a=1" method="post" name="" id=""> <table width="50%" border="0" align="center" cellpadding="4" cellspacing="0"> <tr> <td width="22%">Subject</td> <td width="78%"><input name="value" type="text" id="value"></td> </tr> </table> </form> </body> </html> <br> HTML; ?> that basically mates a text box to enter something into - which posts to ?a=1 then save the following as anythingyouwant.php .... load it...and should work as a simple form. Code: <? include 'form.php'; ///include the form we just made - so that you can print it when you need to. $a = $_GET['a']; ///setting variables - has the script been submitted yet? - get the value from the url if (isset($a)) { ///the script has been submitted $value = $_POST['value']; ///retrieve the posted data. print '<a href="/?">Click here</a><br>'; ///printing html - return to script not submitted print "value is set to:".$value; } else { ////form isnt submitted - so print it. print "a is empty<br>"; print "therefore include the form<br><br>"; ///printing html (2) print $form; } ?> should work... unless i missed off a ; or something silly (let me know below...if i have) if you want to check the field to make it required - and show a form with a message if its not filled in, then this would be the edited version..... Code: <? include 'form.php'; ///include the form - so that you can print it when you need to. $a = $_GET['a']; ///setting variables - has the script been submitted yet? if (isset($a)) { ///the script has been submitted $value = $_POST['value']; ///retrieve the posted data. if(isset($value)) { /////////FIELD SET?//////////// print '<a href="/?">Click here</a><br>'; ///printing html - return to script not submitted print "value is set to:".$value; } else { //////FEILD NOT SET - show form again, with message to fill it out/////// print "The required fields are empty<br>"; print "therefore include the form<br><br>"; ///printing html (2) print $form; } } else { ////form isnt submitted - so print it. print "a is empty<br>"; print "therefore include the form<br><br>"; ///printing html (2) print $form; } ?> then learn mysql and your sorted
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.