Update of /cvsroot/mxbb/mx_linkdb/linkdb/modules In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv9382/modules/mx_linkdb/linkdb/modules Modified Files: link_category.php link_link.php link_main.php link_rate.php link_search.php link_user_upload.php link_viewall.php Log Message: Ok, i'm starting with some code cleanup, before digging deep... Index: link_category.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/modules/link_category.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** link_category.php 5 Apr 2006 22:35:24 -0000 1.4 --- link_category.php 30 Jun 2006 19:54:14 -0000 1.5 *************** *** 13,20 **** function main( $action ) { ! global $template, $lang, $phpEx, $linkdb_config, $_REQUEST, $userdata; ! // Get the id ! if ( isset( $_REQUEST['cat_id'] ) ) { --- 13,21 ---- function main( $action ) { ! global $template, $lang, $phpEx, $linkdb_config, $_REQUEST, $userdata; ! ! // // Get the id ! // if ( isset( $_REQUEST['cat_id'] ) ) { *************** *** 75,91 **** { mx_message_die( GENERAL_MESSAGE, $lang['Cat_not_exist'] ); ! } ! // assign var for naviagation ! $this->generate_category_nav( $cat_id ); ! $template->assign_vars( array( 'L_INDEX' => sprintf( $lang['Forum_Index'], $board_config['sitename'] ), ! 'U_INDEX' => append_sid( 'index.' . $phpEx ), ! 'U_LINK' => append_sid( linkdb_this_mxurl() ), ! 'LINKS' => $lang['Links_Title'] ) ! ); $no_file_message = true; --- 76,94 ---- { mx_message_die( GENERAL_MESSAGE, $lang['Cat_not_exist'] ); ! } ! ! // // assign var for naviagation ! // $this->generate_category_nav( $cat_id ); ! $template->assign_vars( array( ! 'L_INDEX' => sprintf( $lang['Forum_Index'], $board_config['sitename'] ), ! 'U_INDEX' => append_sid( 'index.' . $phpEx ), ! 'U_LINK' => append_sid( linkdb_this_mxurl() ), ! 'LINKS' => $lang['Links_Title'] ) ! ); $no_file_message = true; *************** *** 105,108 **** } } ! ! ?> --- 108,110 ---- } } ! ?> \ No newline at end of file Index: link_user_upload.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/modules/link_user_upload.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** link_user_upload.php 5 Apr 2006 22:35:24 -0000 1.4 --- link_user_upload.php 30 Jun 2006 19:54:15 -0000 1.5 *************** *** 14,21 **** { global $_REQUEST, $_POST, $linkdb_config, $phpbb_root_path, $module_root_path, $board_config; ! global $template, $db, $lang, $userdata, $user_ip, $phpEx, $linkdb_functions; ! // Get Vars ! $cat_id = ( isset( $_REQUEST['cat_id'] ) ) ? intval( $_REQUEST['cat_id'] ) : 0; $edit_link_id = ( isset( $_REQUEST['link_id'] ) ) ? intval( $_REQUEST['link_id'] ) : 0; --- 14,22 ---- { global $_REQUEST, $_POST, $linkdb_config, $phpbb_root_path, $module_root_path, $board_config; ! global $template, $db, $lang, $userdata, $user_ip, $phpEx, $linkdb_functions; ! ! // // Get Vars ! // $cat_id = ( isset( $_REQUEST['cat_id'] ) ) ? intval( $_REQUEST['cat_id'] ) : 0; $edit_link_id = ( isset( $_REQUEST['link_id'] ) ) ? intval( $_REQUEST['link_id'] ) : 0; *************** *** 31,42 **** $message .= '<br /><br />' . sprintf( $lang['Click_return_links'], '<a href="' . append_sid( linkdb_this_mxurl() ) . '">', '</a>' ); ! $template->assign_vars( array( 'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid( linkdb_this_mxurl() ) . '">' ) ); mx_message_die( GENERAL_MESSAGE, $message ); ! } ! // Check allow guset submit site ! if ( $linkdb_config['allow_guest_submit_site'] && !$userdata['session_logged_in'] ) { --- 32,44 ---- $message .= '<br /><br />' . sprintf( $lang['Click_return_links'], '<a href="' . append_sid( linkdb_this_mxurl() ) . '">', '</a>' ); ! $template->assign_vars( array( 'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid( linkdb_this_mxurl() ) . '">' ) ); mx_message_die( GENERAL_MESSAGE, $message ); ! } ! ! // // Check allow guset submit site ! // if ( $linkdb_config['allow_guest_submit_site'] && !$userdata['session_logged_in'] ) { *************** *** 47,57 **** } $s_login_fields = '<input type="hidden" name="redirect" value="' . $redirect . '" />'; ! $template->assign_vars( array( 'ALLOW_GUEST' => '1', ! 'LINK_GUEST_REG' => $lang['Link_guest_reg'], ! 'L_ENTER_PASSWORD' => $lang['Enter_password'], ! 'S_LOGIN_FIELDS' => $s_login_fields ! ) ); $template->assign_block_vars( 'guestname', array() ); ! }elseif ( !$userdata['session_logged_in'] ) { $redirect = linkdb_this_mxurl( "action=user_upload" ); --- 49,61 ---- } $s_login_fields = '<input type="hidden" name="redirect" value="' . $redirect . '" />'; ! $template->assign_vars( array( ! 'ALLOW_GUEST' => '1', ! 'LINK_GUEST_REG' => $lang['Link_guest_reg'], ! 'L_ENTER_PASSWORD' => $lang['Enter_password'], ! 'S_LOGIN_FIELDS' => $s_login_fields ! ) ); $template->assign_block_vars( 'guestname', array() ); ! } ! elseif ( !$userdata['session_logged_in'] ) { $redirect = linkdb_this_mxurl( "action=user_upload" ); *************** *** 65,72 **** { $template->assign_vars( array( 'ALLOW_GUEST' => '0' ) ); ! } ! // IF submit then upload the link and update the sql for it ! if ( isset( $_POST['submit'] ) ) { --- 69,76 ---- { $template->assign_vars( array( 'ALLOW_GUEST' => '0' ) ); ! } ! // IF submit then upload the link and update the sql for it ! if ( isset( $_POST['submit'] ) ) { *************** *** 82,86 **** if ( $linkdb_config['email_notify'] ) { ! $sql = "SELECT user_email, user_lang FROM " . USERS_TABLE . " WHERE user_level = " . ADMIN; --- 86,90 ---- if ( $linkdb_config['email_notify'] ) { ! $sql = "SELECT user_email, user_lang FROM " . USERS_TABLE . " WHERE user_level = " . ADMIN; *************** *** 98,105 **** $emailer->from( $board_config['board_email'] ); ! $emailer->replyto( $board_config['board_email'] ); ! // set to linkdb/lauguage ! $phpbb_root_path_tmp = $phpbb_root_path; $phpbb_root_path = 'linkdb/'; --- 102,110 ---- $emailer->from( $board_config['board_email'] ); ! $emailer->replyto( $board_config['board_email'] ); ! ! // // set to linkdb/lauguage ! // $phpbb_root_path_tmp = $phpbb_root_path; $phpbb_root_path = 'linkdb/'; *************** *** 109,116 **** $emailer->email_address( $to_userdata['user_email'] ); ! $emailer->assign_vars( array( 'LINK_URL' => $link_url, ! 'SITENAME' => $board_config['sitename'] ! ) ! ); $emailer->send(); --- 114,121 ---- $emailer->email_address( $to_userdata['user_email'] ); ! $emailer->assign_vars( array( ! 'LINK_URL' => $link_url, ! 'SITENAME' => $board_config['sitename'] ! )); $emailer->send(); *************** *** 136,141 **** } ! $template->assign_vars( array( 'META' => '<meta http-equiv="refresh" content="3;url=' . linkdb_this_mxurl( "action=category&cat_id=$cat_id" ) . '">' ! ) ); mx_message_die( GENERAL_MESSAGE, $message ); --- 141,147 ---- } ! $template->assign_vars( array( ! 'META' => '<meta http-equiv="refresh" content="3;url=' . linkdb_this_mxurl( "action=category&cat_id=$cat_id" ) . '">' ! ) ); mx_message_die( GENERAL_MESSAGE, $message ); *************** *** 150,162 **** if ( $linkdb_config['allow_no_logo'] ) { ! $template->assign_vars( array( 'ALLOW_NO_LOGO' => '1', ! 'L_LINK_LOGO_SRC' => sprintf( $lang['Link_logo_src1'], $linkdb_config['width'], $linkdb_config['height'] ) ) ! ); } else { ! $template->assign_vars( array( 'ALLOW_NO_LOGO' => '0', ! 'L_LINK_LOGO_SRC' => sprintf( $lang['Link_logo_src'], $linkdb_config['width'], $linkdb_config['height'] ) ) ! ); } --- 156,170 ---- if ( $linkdb_config['allow_no_logo'] ) { ! $template->assign_vars( array( ! 'ALLOW_NO_LOGO' => '1', ! 'L_LINK_LOGO_SRC' => sprintf( $lang['Link_logo_src1'], $linkdb_config['width'], $linkdb_config['height'] ) ) ! ); } else { ! $template->assign_vars( array( ! 'ALLOW_NO_LOGO' => '0', ! 'L_LINK_LOGO_SRC' => sprintf( $lang['Link_logo_src'], $linkdb_config['width'], $linkdb_config['height'] ) ) ! ); } *************** *** 182,187 **** mx_message_die( GENERAL_ERROR, 'Couldn\'t get file info', '', __LINE__, __FILE__, $sql ); } ! $link_info = $db->sql_fetchrow( $result ); // Auth check if ( $userdata['user_id'] == $link_info['user_id'] || $userdata['user_level'] == ADMIN ) { --- 190,198 ---- mx_message_die( GENERAL_ERROR, 'Couldn\'t get file info', '', __LINE__, __FILE__, $sql ); } ! $link_info = $db->sql_fetchrow( $result ); ! ! // // Auth check + // if ( $userdata['user_id'] == $link_info['user_id'] || $userdata['user_level'] == ADMIN ) { *************** *** 190,202 **** if ( $linkdb_config['allow_no_logo'] ) { ! $template->assign_vars( array( 'ALLOW_NO_LOGO' => '1', ! 'L_LINK_LOGO_SRC' => sprintf( $lang['Link_logo_src1'], $linkdb_config['width'], $linkdb_config['height'] ) ) ! ); } else { ! $template->assign_vars( array( 'ALLOW_NO_LOGO' => '0', ! 'L_LINK_LOGO_SRC' => sprintf( $lang['Link_logo_src'], $linkdb_config['width'], $linkdb_config['height'] ) ) ! ); } --- 201,215 ---- if ( $linkdb_config['allow_no_logo'] ) { ! $template->assign_vars( array( ! 'ALLOW_NO_LOGO' => '1', ! 'L_LINK_LOGO_SRC' => sprintf( $lang['Link_logo_src1'], $linkdb_config['width'], $linkdb_config['height'] ) ) ! ); } else { ! $template->assign_vars( array( ! 'ALLOW_NO_LOGO' => '0', ! 'L_LINK_LOGO_SRC' => sprintf( $lang['Link_logo_src'], $linkdb_config['width'], $linkdb_config['height'] ) ) ! ); } *************** *** 220,273 **** } ! $template->assign_vars( array( 'S_ADD_FILE_ACTION' => append_sid( linkdb_this_mxurl() ), ! 'LINK_CAT_NOT_ALLOW' => $lang['Cat_not_allow'], ! 'LINKS' => $lang['Links_Title'], ! 'FILE_NAME' => $link_name, ! 'FILE_LONG_DESC' => $link_longdesc, ! 'LINK_LOGO_SRC' => $link_logo_src, ! 'FILE_DLURL' => $link_url, ! 'FILE_DOWNLOAD' => $link_download, ! 'CUSTOM_EXIST' => $custom_exist, ! 'APPROVED_CHECKED_YES' => $approved_checked_yes, ! 'APPROVED_CHECKED_NO' => $approved_checked_no, ! 'L_INDEX' => sprintf( $lang['Forum_Index'], $board_config['sitename'] ), ! 'L_UPLOAD' => $lang['User_upload'], ! 'L_FILE_TITLE' => $lang['AddLink'], ! 'L_FILE_APPROVED' => $lang['Approved'], ! 'L_FILE_APPROVED_INFO' => $lang['Approved_info'], ! 'L_GUESTNAME' => $lang['Guest_name'], ! 'L_FILE_NAME' => $lang['Sitename'], ! 'L_FILE_NAME_INFO' => $lang['Sitenameinfo'], ! 'L_FILE_LONG_DESC' => $lang['Siteld'], ! 'L_FILE_LONG_DESC_INFO' => $lang['Siteldinfo'], ! 'L_LINK_LOGO' => $lang['Link_logo'], ! 'L_PREVIEW' => $lang['Preview'], ! 'L_FILE_URL' => $lang['Siteurl'], ! 'L_FILE_UPLOAD' => $lang['File_upload'], ! 'L_FILEINFO_UPLOAD' => $lang['Fileinfo_upload'], ! 'L_FILE_URL_INFO' => $lang['Fileurlinfo'], ! 'L_FILE_CAT' => $lang['Sitecat'], ! 'L_FILE_CAT_INFO' => $lang['Sitecatinfo'], ! 'L_FILE_DOWNLOAD' => $lang['Link_hits'], ! 'L_NO' => $lang['No'], ! 'L_YES' => $lang['Yes'], ! 'LINK_GUEST_FIELD' => $lang['Link_guset_field'], ! 'LINK_NAME_FIELD' => $lang['Link_name_field'], ! 'LINK_URL_FIELD' => $lang['Link_url_field'], ! 'LINK_LOGO_FIELD' => $lang['Link_logo_field'], ! 'LINK_LONG_DES_FIELD' => $lang['Link_long_des_field'], ! 'S_CAT_LIST' => $link_cat_list, ! 'S_HIDDEN_FIELDS' => $s_hidden_fields, ! 'U_INDEX' => append_sid( 'index.' . $phpEx ), ! 'U_LINK' => append_sid( linkdb_this_mxurl() ) ) ! ); $this->display( $lang['Links_Title'] . ' :: ' . $lang['AddLink'], 'link_add.tpl' ); --- 233,287 ---- } ! $template->assign_vars( array( ! 'S_ADD_FILE_ACTION' => append_sid( linkdb_this_mxurl() ), ! 'LINK_CAT_NOT_ALLOW' => $lang['Cat_not_allow'], ! 'LINKS' => $lang['Links_Title'], ! 'FILE_NAME' => $link_name, ! 'FILE_LONG_DESC' => $link_longdesc, ! 'LINK_LOGO_SRC' => $link_logo_src, ! 'FILE_DLURL' => $link_url, ! 'FILE_DOWNLOAD' => $link_download, ! 'CUSTOM_EXIST' => $custom_exist, ! 'APPROVED_CHECKED_YES' => $approved_checked_yes, ! 'APPROVED_CHECKED_NO' => $approved_checked_no, ! 'L_INDEX' => sprintf( $lang['Forum_Index'], $board_config['sitename'] ), ! 'L_UPLOAD' => $lang['User_upload'], ! 'L_FILE_TITLE' => $lang['AddLink'], ! 'L_FILE_APPROVED' => $lang['Approved'], ! 'L_FILE_APPROVED_INFO' => $lang['Approved_info'], ! 'L_GUESTNAME' => $lang['Guest_name'], ! 'L_FILE_NAME' => $lang['Sitename'], ! 'L_FILE_NAME_INFO' => $lang['Sitenameinfo'], ! 'L_FILE_LONG_DESC' => $lang['Siteld'], ! 'L_FILE_LONG_DESC_INFO' => $lang['Siteldinfo'], ! 'L_LINK_LOGO' => $lang['Link_logo'], ! 'L_PREVIEW' => $lang['Preview'], ! 'L_FILE_URL' => $lang['Siteurl'], ! 'L_FILE_UPLOAD' => $lang['File_upload'], ! 'L_FILEINFO_UPLOAD' => $lang['Fileinfo_upload'], ! 'L_FILE_URL_INFO' => $lang['Fileurlinfo'], ! 'L_FILE_CAT' => $lang['Sitecat'], ! 'L_FILE_CAT_INFO' => $lang['Sitecatinfo'], ! 'L_FILE_DOWNLOAD' => $lang['Link_hits'], ! 'L_NO' => $lang['No'], ! 'L_YES' => $lang['Yes'], ! 'LINK_GUEST_FIELD' => $lang['Link_guset_field'], ! 'LINK_NAME_FIELD' => $lang['Link_name_field'], ! 'LINK_URL_FIELD' => $lang['Link_url_field'], ! 'LINK_LOGO_FIELD' => $lang['Link_logo_field'], ! 'LINK_LONG_DES_FIELD' => $lang['Link_long_des_field'], ! 'S_CAT_LIST' => $link_cat_list, ! 'S_HIDDEN_FIELDS' => $s_hidden_fields, ! 'U_INDEX' => append_sid( 'index.' . $phpEx ), ! 'U_LINK' => append_sid( linkdb_this_mxurl() ) ) ! ); $this->display( $lang['Links_Title'] . ' :: ' . $lang['AddLink'], 'link_add.tpl' ); *************** *** 285,289 **** $attach_sig = 0; ! $sql = "SELECT user_id, user_allow_pm FROM " . USERS_TABLE . " WHERE user_level = " . ADMIN; --- 299,303 ---- $attach_sig = 0; ! $sql = "SELECT user_id, user_allow_pm FROM " . USERS_TABLE . " WHERE user_level = " . ADMIN; *************** *** 294,313 **** while ( $to_userdata = $db->sql_fetchrow( $admin_result ) ) ! { ! // Has admin prevented user from sending PM's? ! if ( $to_userdata['user_allow_pm'] ) { $bbcode_uid = 0; ! $msg_time = time(); ! // See if recipient is at their inbox limit ! ! $sql = "SELECT COUNT(privmsgs_id) AS inbox_items, MIN(privmsgs_date) AS oldest_post_time ! FROM " . PRIVMSGS_TABLE . " ! WHERE ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . " ! OR privmsgs_type = " . PRIVMSGS_READ_MAIL . " ! OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " ) AND privmsgs_to_userid = " . $to_userdata['user_id']; if ( !( $result = $db->sql_query( $sql ) ) ) --- 308,328 ---- while ( $to_userdata = $db->sql_fetchrow( $admin_result ) ) ! { ! // // Has admin prevented user from sending PM's? ! // if ( $to_userdata['user_allow_pm'] ) { $bbcode_uid = 0; ! $msg_time = time(); ! ! // // See if recipient is at their inbox limit ! // ! $sql = "SELECT COUNT(privmsgs_id) AS inbox_items, MIN(privmsgs_date) AS oldest_post_time ! FROM " . PRIVMSGS_TABLE . " ! WHERE ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . " ! OR privmsgs_type = " . PRIVMSGS_READ_MAIL . " ! OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " ) AND privmsgs_to_userid = " . $to_userdata['user_id']; if ( !( $result = $db->sql_query( $sql ) ) ) *************** *** 322,330 **** if ( $inbox_info['inbox_items'] >= $board_config['max_inbox_privmsgs'] ) { ! $sql = "SELECT privmsgs_id FROM " . PRIVMSGS_TABLE . " ! WHERE ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . " ! OR privmsgs_type = " . PRIVMSGS_READ_MAIL . " ! OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " ) ! AND privmsgs_date = " . $inbox_info['oldest_post_time'] . " AND privmsgs_to_userid = " . $to_userdata['user_id']; if ( !$result = $db->sql_query( $sql ) ) --- 337,345 ---- if ( $inbox_info['inbox_items'] >= $board_config['max_inbox_privmsgs'] ) { ! $sql = "SELECT privmsgs_id FROM " . PRIVMSGS_TABLE . " ! WHERE ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . " ! OR privmsgs_type = " . PRIVMSGS_READ_MAIL . " ! OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " ) ! AND privmsgs_date = " . $inbox_info['oldest_post_time'] . " AND privmsgs_to_userid = " . $to_userdata['user_id']; if ( !$result = $db->sql_query( $sql ) ) *************** *** 335,339 **** $old_privmsgs_id = $old_privmsgs_id['privmsgs_id']; ! $sql = "DELETE $sql_priority FROM " . PRIVMSGS_TABLE . " WHERE privmsgs_id = $old_privmsgs_id"; if ( !$db->sql_query( $sql ) ) --- 350,354 ---- $old_privmsgs_id = $old_privmsgs_id['privmsgs_id']; ! $sql = "DELETE $sql_priority FROM " . PRIVMSGS_TABLE . " WHERE privmsgs_id = $old_privmsgs_id"; if ( !$db->sql_query( $sql ) ) *************** *** 342,346 **** } ! $sql = "DELETE $sql_priority FROM " . PRIVMSGS_TEXT_TABLE . " WHERE privmsgs_text_id = $old_privmsgs_id"; if ( !$db->sql_query( $sql ) ) --- 357,361 ---- } ! $sql = "DELETE $sql_priority FROM " . PRIVMSGS_TEXT_TABLE . " WHERE privmsgs_text_id = $old_privmsgs_id"; if ( !$db->sql_query( $sql ) ) *************** *** 370,379 **** { mx_message_die( GENERAL_ERROR, "Could not insert/update private message sent text.", "", __LINE__, __FILE__, $sql_info ); ! } ! // Add to the users new pm counter ! $sql = "UPDATE " . USERS_TABLE . " ! SET user_new_privmsg = user_new_privmsg + 1, user_last_privmsg = " . time() . " WHERE user_id = " . $to_userdata['user_id']; if ( !$status = $db->sql_query( $sql ) ) --- 385,395 ---- { mx_message_die( GENERAL_ERROR, "Could not insert/update private message sent text.", "", __LINE__, __FILE__, $sql_info ); ! } ! ! // // Add to the users new pm counter ! // $sql = "UPDATE " . USERS_TABLE . " ! SET user_new_privmsg = user_new_privmsg + 1, user_last_privmsg = " . time() . " WHERE user_id = " . $to_userdata['user_id']; if ( !$status = $db->sql_query( $sql ) ) *************** *** 384,387 **** } } - ?> \ No newline at end of file --- 400,402 ---- Index: link_rate.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/modules/link_rate.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** link_rate.php 5 Apr 2006 22:35:24 -0000 1.4 --- link_rate.php 30 Jun 2006 19:54:15 -0000 1.5 *************** *** 51,55 **** if ( !$userdata['session_logged_in'] ) ! { // $redirect = linkdb_this_mxurl("action=rate&link_id=$link_id"); // redirect(append_sid("login.$phpEx?redirect=" . $redirect, true)); --- 51,55 ---- if ( !$userdata['session_logged_in'] ) ! { // $redirect = linkdb_this_mxurl("action=rate&link_id=$link_id"); // redirect(append_sid("login.$phpEx?redirect=" . $redirect, true)); *************** *** 58,76 **** $this->generate_category_nav( $link_data['link_catid'] ); ! $template->assign_vars( array( 'L_INDEX' => sprintf( $lang['Forum_Index'], $board_config['sitename'] ), ! 'L_RATE' => $lang['Rate'], ! 'U_INDEX' => append_sid( 'index.' . $phpEx ), ! 'U_LINK' => append_sid( linkdb_this_mxurl() ), ! 'U_FILE_NAME' => append_sid( linkdb_this_mxurl( 'action=link&link_id=' . $link_id ) ), ! 'FILE_NAME' => $link_data['link_name'], ! 'PIN_IMAGE' => $this->display_banner( $link_data, $link_data ), ! 'L_VOTES' => $lang['Votes'], ! 'FILE_VOTES' => $link_data['total_votes'], ! 'L_RATING' => $lang['LinkRating'], ! 'RATING' => ( $link_data['rating'] != 0 ) ? round( $link_data['rating'], 2 ) . '/10' : $lang['Not_rated'], ! 'LINKS' => $lang['Links_Title'] ) ! ); if ( isset( $_POST['submit'] ) ) --- 58,77 ---- $this->generate_category_nav( $link_data['link_catid'] ); ! $template->assign_vars( array( ! 'L_INDEX' => sprintf( $lang['Forum_Index'], $board_config['sitename'] ), ! 'L_RATE' => $lang['Rate'], ! 'U_INDEX' => append_sid( 'index.' . $phpEx ), ! 'U_LINK' => append_sid( linkdb_this_mxurl() ), ! 'U_FILE_NAME' => append_sid( linkdb_this_mxurl( 'action=link&link_id=' . $link_id ) ), ! 'FILE_NAME' => $link_data['link_name'], ! 'PIN_IMAGE' => $this->display_banner( $link_data, $link_data ), ! 'L_VOTES' => $lang['Votes'], ! 'FILE_VOTES' => $link_data['total_votes'], ! 'L_RATING' => $lang['LinkRating'], ! 'RATING' => ( $link_data['rating'] != 0 ) ? round( $link_data['rating'], 2 ) . '/10' : $lang['Not_rated'], ! 'LINKS' => $lang['Links_Title'] ) ! ); if ( isset( $_POST['submit'] ) ) *************** *** 98,121 **** $rate_info = str_replace( "{filename}", $link_data['link_name'], $lang['Rateinfo'] ); ! $template->assign_vars( array( 'S_RATE_ACTION' => append_sid( linkdb_this_mxurl( 'action=rate&link_id=' . $link_id ) ), ! 'L_RATE' => $lang['Rate'], ! 'L_RERROR' => $lang['Rerror'], ! 'L_R1' => $lang['R1'], ! 'L_R2' => $lang['R2'], ! 'L_R3' => $lang['R3'], ! 'L_R4' => $lang['R4'], ! 'L_R5' => $lang['R5'], ! 'L_R6' => $lang['R6'], ! 'L_R7' => $lang['R7'], ! 'L_R8' => $lang['R8'], ! 'L_R9' => $lang['R9'], ! 'L_R10' => $lang['R10'], ! 'RATEINFO' => $rate_info, ! 'ID' => $link_id ) ! ); } $this->display( $lang['Links_Title'], 'link_rate_body.tpl' ); } } - ?> \ No newline at end of file --- 99,122 ---- $rate_info = str_replace( "{filename}", $link_data['link_name'], $lang['Rateinfo'] ); ! $template->assign_vars( array( ! 'S_RATE_ACTION' => append_sid( linkdb_this_mxurl( 'action=rate&link_id=' . $link_id ) ), ! 'L_RATE' => $lang['Rate'], ! 'L_RERROR' => $lang['Rerror'], ! 'L_R1' => $lang['R1'], ! 'L_R2' => $lang['R2'], ! 'L_R3' => $lang['R3'], ! 'L_R4' => $lang['R4'], ! 'L_R5' => $lang['R5'], ! 'L_R6' => $lang['R6'], ! 'L_R7' => $lang['R7'], ! 'L_R8' => $lang['R8'], ! 'L_R9' => $lang['R9'], ! 'L_R10' => $lang['R10'], ! 'RATEINFO' => $rate_info, ! 'ID' => $link_id ) ! ); } $this->display( $lang['Links_Title'], 'link_rate_body.tpl' ); } } ?> \ No newline at end of file Index: link_link.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/modules/link_link.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** link_link.php 5 Apr 2006 22:35:24 -0000 1.4 --- link_link.php 30 Jun 2006 19:54:15 -0000 1.5 *************** *** 32,39 **** { mx_message_die( GENERAL_ERROR, 'Couldnt select linkdb', '', __LINE__, __FILE__, $sql ); ! } ! // Id doesn't match with any link in the database another nice error message ! if ( !$file_data = $db->sql_fetchrow( $result ) ) { --- 32,40 ---- { mx_message_die( GENERAL_ERROR, 'Couldnt select linkdb', '', __LINE__, __FILE__, $sql ); ! } ! ! // // Id doesn't match with any link in the database another nice error message ! // if ( !$file_data = $db->sql_fetchrow( $result ) ) { *************** *** 43,55 **** $db->sql_freeresult( $result ); ! $link_url = $file_data['link_url']; // if($user_ip != $file_data['last_user_ip']) // { ! // Update counter ! $link_hits = intval( $file_data['link_hits'] ) + 1; ! $sql = 'UPDATE ' . LINKS_TABLE . " ! SET link_hits = $link_hits, last_user_ip = '$user_ip' WHERE link_id = $link_id"; --- 44,57 ---- $db->sql_freeresult( $result ); ! $link_url = $file_data['link_url']; // if($user_ip != $file_data['last_user_ip']) // { ! ! // // Update counter ! // $link_hits = intval( $file_data['link_hits'] ) + 1; ! $sql = 'UPDATE ' . LINKS_TABLE . " ! SET link_hits = $link_hits, last_user_ip = '$user_ip' WHERE link_id = $link_id"; *************** *** 57,61 **** { mx_message_die( GENERAL_ERROR, 'Couldnt Update Files table', '', __LINE__, __FILE__, $sql ); ! } // } // header("Location: $link_url"); --- 59,63 ---- { mx_message_die( GENERAL_ERROR, 'Couldnt Update Files table', '', __LINE__, __FILE__, $sql ); ! } // } // header("Location: $link_url"); *************** *** 64,67 **** } } - ?> \ No newline at end of file --- 66,68 ---- Index: link_search.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/modules/link_search.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** link_search.php 5 Apr 2006 22:35:24 -0000 1.5 --- link_search.php 30 Jun 2006 19:54:15 -0000 1.6 *************** *** 88,95 **** } ! $limit_sql = ( $start == 0 ) ? $linkdb_config['settings_link_page'] : $start . ',' . $linkdb_config['settings_link_page']; ! // encoding match for workaround ! $multibyte_charset = 'utf-8, big5, shift_jis, euc-kr, gb2312'; --- 88,95 ---- } ! $limit_sql = ( $start == 0 ) ? $linkdb_config['settings_link_page'] : $start . ',' . $linkdb_config['settings_link_page']; ! // encoding match for workaround ! $multibyte_charset = 'utf-8, big5, shift_jis, euc-kr, gb2312'; *************** *** 122,127 **** } ! $sql = "SELECT * ! FROM " . LINKS_TABLE . " WHERE post_username LIKE '" . str_replace( "\'", "''", $search_author ) . "'"; if ( $matching_userids ) --- 122,127 ---- } ! $sql = "SELECT * ! FROM " . LINKS_TABLE . " WHERE post_username LIKE '" . str_replace( "\'", "''", $search_author ) . "'"; if ( $matching_userids ) *************** *** 183,189 **** $match_word = addslashes( '%' . str_replace( '*', '', $split_search[$i] ) . '%' ); ! $sql = "SELECT link_id ! FROM " . LINKS_TABLE . " ! WHERE (link_name LIKE '$match_word' OR link_longdesc LIKE '$match_word')"; --- 183,189 ---- $match_word = addslashes( '%' . str_replace( '*', '', $split_search[$i] ) . '%' ); ! $sql = "SELECT link_id ! FROM " . LINKS_TABLE . " ! WHERE (link_name LIKE '$match_word' OR link_longdesc LIKE '$match_word')"; *************** *** 242,249 **** unset( $result_list ); $total_match_count = count( $search_ids ); ! } ! // Author name search ! if ( $search_author != '' ) { --- 242,250 ---- unset( $result_list ); $total_match_count = count( $search_ids ); ! } ! ! // // Author name search ! // if ( $search_author != '' ) { *************** *** 257,264 **** if ( $search_author == '' ) { ! $sql = "SELECT link_id, link_catid FROM " . LINKS_TABLE . " ! WHERE link_id IN (" . implode( ", ", $search_ids ) . ") ! $where_sql GROUP BY link_id"; } --- 258,265 ---- if ( $search_author == '' ) { ! $sql = "SELECT link_id, link_catid FROM " . LINKS_TABLE . " ! WHERE link_id IN (" . implode( ", ", $search_ids ) . ") ! $where_sql GROUP BY link_id"; } *************** *** 275,281 **** $sql = "SELECT f.link_id, f.link_catid ! FROM $from_sql ! WHERE f.link_id IN (" . implode( ", ", $search_ids ) . ") ! $where_sql GROUP BY f.link_id"; } --- 276,282 ---- $sql = "SELECT f.link_id, f.link_catid ! FROM $from_sql ! WHERE f.link_id IN (" . implode( ", ", $search_ids ) . ") ! $where_sql GROUP BY f.link_id"; } *************** *** 297,308 **** { mx_message_die( GENERAL_MESSAGE, $lang['No_search_match'] ); ! } ! // Finish building query (for all combinations) // and run it ... ! $expiry_time = $current_time - $board_config['session_length']; $sql = "SELECT session_id ! FROM " . SESSIONS_TABLE . " WHERE session_time > $expiry_time"; --- 298,310 ---- { mx_message_die( GENERAL_MESSAGE, $lang['No_search_match'] ); ! } ! ! // // Finish building query (for all combinations) // and run it ... ! // $expiry_time = $current_time - $board_config['session_length']; $sql = "SELECT session_id ! FROM " . SESSIONS_TABLE . " WHERE session_time > $expiry_time"; *************** *** 317,321 **** if ( count( $delete_search_ids ) ) { ! $sql = "DELETE FROM " . SEARCH_TABLE . " WHERE session_id NOT IN (" . implode( ", ", $delete_search_ids ) . ")"; if ( !$result = $db->sql_query( $sql ) ) --- 319,323 ---- if ( count( $delete_search_ids ) ) { ! $sql = "DELETE FROM " . SEARCH_TABLE . " WHERE session_id NOT IN (" . implode( ", ", $delete_search_ids ) . ")"; if ( !$result = $db->sql_query( $sql ) ) *************** *** 324,331 **** } } ! } ! // Store new result data ! $search_results = implode( ', ', $search_ids ); --- 326,334 ---- } } ! } ! ! // // Store new result data ! // $search_results = implode( ', ', $search_ids ); *************** *** 343,352 **** $search_id = mt_rand(); ! $sql = "UPDATE " . SEARCH_TABLE . " SET search_id = $search_id, search_array = '" . str_replace( "\'", "''", $result_array ) . "' WHERE session_id = '" . $userdata['session_id'] . "'"; if ( !( $result = $db->sql_query( $sql ) ) || !$db->sql_affectedrows() ) { ! $sql = "INSERT INTO " . SEARCH_TABLE . " (search_id, session_id, search_array) VALUES($search_id, '" . $userdata['session_id'] . "', '" . str_replace( "\'", "''", $result_array ) . "')"; if ( !( $result = $db->sql_query( $sql ) ) ) --- 346,355 ---- $search_id = mt_rand(); ! $sql = "UPDATE " . SEARCH_TABLE . " SET search_id = $search_id, search_array = '" . str_replace( "\'", "''", $result_array ) . "' WHERE session_id = '" . $userdata['session_id'] . "'"; if ( !( $result = $db->sql_query( $sql ) ) || !$db->sql_affectedrows() ) { ! $sql = "INSERT INTO " . SEARCH_TABLE . " (search_id, session_id, search_array) VALUES($search_id, '" . $userdata['session_id'] . "', '" . str_replace( "\'", "''", $result_array ) . "')"; if ( !( $result = $db->sql_query( $sql ) ) ) *************** *** 361,367 **** if ( $search_id ) { ! $sql = "SELECT search_array ! FROM " . SEARCH_TABLE . " ! WHERE search_id = $search_id AND session_id = '" . $userdata['session_id'] . "'"; if ( !( $result = $db->sql_query( $sql ) ) ) --- 364,370 ---- if ( $search_id ) { ! $sql = "SELECT search_array ! FROM " . SEARCH_TABLE . " ! WHERE search_id = $search_id AND session_id = '" . $userdata['session_id'] . "'"; if ( !( $result = $db->sql_query( $sql ) ) ) *************** *** 388,398 **** $sql = "SELECT f1.*, AVG(r.rate_point) AS rating, COUNT(r.votes_link) AS total_votes, u.user_id, u.username, c.cat_id, c.cat_name FROM " . LINKS_TABLE . " AS f1, " . LINK_VOTES_TABLE . " AS r, " . USERS_TABLE . " AS u, " . LINK_CATEGORIES_TABLE . " AS c ! WHERE f1.link_id IN ($search_results) AND f1.user_id = u.user_id(+) AND f1.link_id = r.votes_link(+) ! AND c.cat_id = f1.link_catid ! AND f1.link_approved = '1' ! GROUP BY f1.link_id ! ORDER BY $sort_method $sort_order LIMIT $limit_sql"; break; --- 391,401 ---- $sql = "SELECT f1.*, AVG(r.rate_point) AS rating, COUNT(r.votes_link) AS total_votes, u.user_id, u.username, c.cat_id, c.cat_name FROM " . LINKS_TABLE . " AS f1, " . LINK_VOTES_TABLE . " AS r, " . USERS_TABLE . " AS u, " . LINK_CATEGORIES_TABLE . " AS c ! WHERE f1.link_id IN ($search_results) AND f1.user_id = u.user_id(+) AND f1.link_id = r.votes_link(+) ! AND c.cat_id = f1.link_catid ! AND f1.link_approved = '1' ! GROUP BY f1.link_id ! ORDER BY $sort_method $sort_order LIMIT $limit_sql"; break; *************** *** 402,410 **** LEFT JOIN " . LINK_VOTES_TABLE . " AS r ON f1.link_id = r.votes_link LEFT JOIN " . USERS_TABLE . " AS u ON f1.user_id = u.user_id ! WHERE f1.link_id IN ($search_results) AND c.cat_id = f1.link_catid ! AND f1.link_approved = '1' ! GROUP BY f1.link_id ! ORDER BY $sort_method $sort_order LIMIT $limit_sql"; break; --- 405,413 ---- LEFT JOIN " . LINK_VOTES_TABLE . " AS r ON f1.link_id = r.votes_link LEFT JOIN " . USERS_TABLE . " AS u ON f1.user_id = u.user_id ! WHERE f1.link_id IN ($search_results) AND c.cat_id = f1.link_catid ! AND f1.link_approved = '1' ! GROUP BY f1.link_id ! ORDER BY $sort_method $sort_order LIMIT $limit_sql"; break; *************** *** 426,431 **** $l_search_matches = ( $total_match_count == 1 ) ? sprintf( $lang['Found_search_match'], $total_match_count ) : sprintf( $lang['Found_search_matches'], $total_match_count ); ! $template->assign_vars( array( 'L_SEARCH_MATCHES' => $l_search_matches ) ! ); if ( !$linkdb_config['split_links'] ) --- 429,433 ---- $l_search_matches = ( $total_match_count == 1 ) ? sprintf( $lang['Found_search_match'], $total_match_count ) : sprintf( $lang['Found_search_matches'], $total_match_count ); ! $template->assign_vars( array( 'L_SEARCH_MATCHES' => $l_search_matches ) ); if ( !$linkdb_config['split_links'] ) *************** *** 436,451 **** { $cat_url = append_sid( linkdb_this_mxurl( 'action=category&cat_id=' . $searchset[$i]['cat_id'] ) ); ! $file_url = append_sid( linkdb_this_mxurl( 'action=link&link_id=' . $searchset[$i]['link_id'] ) ); ! // Format the date for the given file ! ! $date = create_date( $board_config['default_dateformat'], $searchset[$i]['link_time'], $board_config['board_timezone'] ); ! // Get rating for the file and format it ! ! $rating = ( $searchset[$i]['rating'] != 0 ) ? round( $searchset[$i]['rating'], 2 ) . '/10' : $lang['Not_rated']; ! // If the file is new then put a new image in front of it ! /*$is_new = FALSE; if (time() - ($linkdb_config['settings_newdays'] * 24 * 60 * 60) < $searchset[$i]['file_time']) --- 438,456 ---- { $cat_url = append_sid( linkdb_this_mxurl( 'action=category&cat_id=' . $searchset[$i]['cat_id'] ) ); ! $file_url = append_sid( linkdb_this_mxurl( 'action=link&link_id=' . $searchset[$i]['link_id'] ) ); ! ! // // Format the date for the given file ! // ! $date = create_date( $board_config['default_dateformat'], $searchset[$i]['link_time'], $board_config['board_timezone'] ); ! ! // // Get rating for the file and format it ! // ! $rating = ( $searchset[$i]['rating'] != 0 ) ? round( $searchset[$i]['rating'], 2 ) . '/10' : $lang['Not_rated']; ! ! // // If the file is new then put a new image in front of it ! // /*$is_new = FALSE; if (time() - ($linkdb_config['settings_newdays'] * 24 * 60 * 60) < $searchset[$i]['file_time']) *************** *** 458,477 **** $poster .= ( $searchset[$i]['user_id'] != ANONYMOUS ) ? '</a>' : ''; ! $template->assign_block_vars( 'searchresults', array( 'COLOR' => ( $linkdb_config['split_links'] ) ? "row1" : ( ( $i % 2 ) ? "row2" : "row1" ), ! 'CAT_NAME' => $searchset[$i]['cat_name'], ! 'FILE_NEW_IMAGE' => $images['linkdb_link_new'], ! 'PIN_IMAGE' => $this->display_banner( $searchset[$i], $row ), ! // 'IS_NEW_FILE' => $is_new, ! 'FILE_NAME' => $searchset[$i]['link_name'], ! 'FILE_DESC' => $searchset[$i]['link_longdesc'], ! 'FILE_SUBMITER' => $poster, ! 'DATE' => $date, ! 'FILE_DLS' => $searchset[$i]['link_hits'], ! 'L_RATING' => '<a href="' . append_sid( linkdb_this_mxurl( 'action=rate&link_id=' . $searchset[$i]['link_id'] ) ) . '">' . $lang['LinkRating'] . '</a>', ! 'RATING' => $rating, ! 'FILE_VOTES' => $searchset[$i]['total_votes'], ! 'U_FILE' => $file_url, ! 'U_CAT' => $cat_url ) ! ); if ( $linkdb_config['allow_vote'] ) { --- 463,483 ---- $poster .= ( $searchset[$i]['user_id'] != ANONYMOUS ) ? '</a>' : ''; ! $template->assign_block_vars( 'searchresults', array( ! 'COLOR' => ( $linkdb_config['split_links'] ) ? "row1" : ( ( $i % 2 ) ? "row2" : "row1" ), ! 'CAT_NAME' => $searchset[$i]['cat_name'], ! 'FILE_NEW_IMAGE' => $images['linkdb_link_new'], ! 'PIN_IMAGE' => $this->display_banner( $searchset[$i], $row ), ! // 'IS_NEW_FILE' => $is_new, ! 'FILE_NAME' => $searchset[$i]['link_name'], ! 'FILE_DESC' => $searchset[$i]['link_longdesc'], ! 'FILE_SUBMITER' => $poster, ! 'DATE' => $date, ! 'FILE_DLS' => $searchset[$i]['link_hits'], ! 'L_RATING' => '<a href="' . append_sid( linkdb_this_mxurl( 'action=rate&link_id=' . $searchset[$i]['link_id'] ) ) . '">' . $lang['LinkRating'] . '</a>', ! 'RATING' => $rating, ! 'FILE_VOTES' => $searchset[$i]['total_votes'], ! 'U_FILE' => $file_url, ! 'U_CAT' => $cat_url ) ! ); if ( $linkdb_config['allow_vote'] ) { *************** *** 485,506 **** $base_url = append_sid( linkdb_this_mxurl( "action=search&search_id=$search_id" ) ); ! $template->assign_vars( array( 'PAGINATION' => generate_pagination( $base_url, $total_match_count, $linkdb_config['settings_link_page'], $start ), ! 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $linkdb_config['settings_link_page'] ) + 1 ), ceil( $total_match_count / $linkdb_config['settings_link_page'] ) ), ! 'LINKS' => $lang['Links_Title'], ! 'U_INDEX' => append_sid( 'index.' . $phpEx ), ! 'U_LINK' => append_sid( linkdb_this_mxurl() ), ! 'L_INDEX' => sprintf( $lang['Forum_Index'], $board_config['sitename'] ), ! 'L_DOWNLOADS' => $lang['Hits'], ! 'L_DATE' => $lang['Date'], ! 'L_NAME' => $lang['Sitename'], ! 'L_FILE' => $lang['Link'], ! 'L_SUBMITER' => $lang['Submiter'], ! 'L_VOTES' => $lang['Votes'], ! 'L_CATEGORY' => $lang['Category'] ! ) ! ); $this->display( $lang['Links_Title'] . ' :: ' . $lang['Link_Search'], 'link_search_result.tpl' ); --- 491,512 ---- $base_url = append_sid( linkdb_this_mxurl( "action=search&search_id=$search_id" ) ); ! $template->assign_vars( array( ! 'PAGINATION' => generate_pagination( $base_url, $total_match_count, $linkdb_config['settings_link_page'], $start ), ! 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $linkdb_config['settings_link_page'] ) + 1 ), ceil( $total_match_count / $linkdb_config['settings_link_page'] ) ), ! 'LINKS' => $lang['Links_Title'], ! 'U_INDEX' => append_sid( 'index.' . $phpEx ), ! 'U_LINK' => append_sid( linkdb_this_mxurl() ), ! 'L_INDEX' => sprintf( $lang['Forum_Index'], $board_config['sitename'] ), ! 'L_DOWNLOADS' => $lang['Hits'], ! 'L_DATE' => $lang['Date'], ! 'L_NAME' => $lang['Sitename'], ! 'L_FILE' => $lang['Link'], ! 'L_SUBMITER' => $lang['Submiter'], ! 'L_VOTES' => $lang['Votes'], ! 'L_CATEGORY' => $lang['Category'] ! )); $this->display( $lang['Links_Title'] . ' :: ' . $lang['Link_Search'], 'link_search_result.tpl' ); *************** *** 515,552 **** $dropmenu = $this->jumpmenu_option(); ! $template->assign_vars( array( 'S_SEARCH_ACTION' => append_sid( linkdb_this_mxurl() ), ! 'S_CAT_MENU' => $dropmenu, ! 'LINKS' => $lang['Links_Title'], ! 'U_INDEX' => append_sid( 'index.' . $phpEx ), ! 'U_LINK' => append_sid( linkdb_this_mxurl() ), ! 'L_YES' => $lang['Yes'], ! 'L_NO' => $lang['No'], ! 'L_SEARCH_OPTIONS' => $lang['Search_options'], ! 'L_SEARCH_KEYWORDS' => $lang['Search_keywords'], ! 'L_SEARCH_KEYWORDS_EXPLAIN' => $lang['Search_keywords_explain'], ! 'L_SEARCH_AUTHOR' => $lang['Search_author'], ! 'L_SEARCH_AUTHOR_EXPLAIN' => $lang['Search_author_explain'], ! 'L_SEARCH_ANY_TERMS' => $lang['Search_for_any'], ! 'L_SEARCH_ALL_TERMS' => $lang['Search_for_all'], ! 'L_INCLUDE_COMMENTS' => $lang['Include_comments'], ! 'L_SORT_BY' => $lang['Select_sort_method'], ! 'L_SORT_DIR' => $lang['Order'], ! 'L_SORT_ASCENDING' => $lang['Sort_Ascending'], ! 'L_SORT_DESCENDING' => $lang['Sort_Descending'], ! 'L_INDEX' => sprintf( $lang['Forum_Index'], $board_config['sitename'] ), ! 'L_RATING' => $lang['Siteld'], ! 'L_DOWNLOADS' => $lang['Hits'], ! 'L_DATE' => $lang['Date'], ! 'L_NAME' => $lang['Sitename'], ! 'L_SEARCH_FOR' => $lang['Search_for'], ! 'L_ALL' => $lang['All'], ! 'L_CHOOSE_CAT' => $lang['Choose_cat'] ) ! ); $this->display( $lang['Links_Title'] . ' :: ' . $lang['Link_Search'], 'link_search_body.tpl' ); } } - ?> \ No newline at end of file --- 521,558 ---- $dropmenu = $this->jumpmenu_option(); ! $template->assign_vars( array( ! 'S_SEARCH_ACTION' => append_sid( linkdb_this_mxurl() ), ! 'S_CAT_MENU' => $dropmenu, ! 'LINKS' => $lang['Links_Title'], ! 'U_INDEX' => append_sid( 'index.' . $phpEx ), ! 'U_LINK' => append_sid( linkdb_this_mxurl() ), ! 'L_YES' => $lang['Yes'], ! 'L_NO' => $lang['No'], ! 'L_SEARCH_OPTIONS' => $lang['Search_options'], ! 'L_SEARCH_KEYWORDS' => $lang['Search_keywords'], ! 'L_SEARCH_KEYWORDS_EXPLAIN' => $lang['Search_keywords_explain'], ! 'L_SEARCH_AUTHOR' => $lang['Search_author'], ! 'L_SEARCH_AUTHOR_EXPLAIN' => $lang['Search_author_explain'], ! 'L_SEARCH_ANY_TERMS' => $lang['Search_for_any'], ! 'L_SEARCH_ALL_TERMS' => $lang['Search_for_all'], ! 'L_INCLUDE_COMMENTS' => $lang['Include_comments'], ! 'L_SORT_BY' => $lang['Select_sort_method'], ! 'L_SORT_DIR' => $lang['Order'], ! 'L_SORT_ASCENDING' => $lang['Sort_Ascending'], ! 'L_SORT_DESCENDING' => $lang['Sort_Descending'], ! 'L_INDEX' => sprintf( $lang['Forum_Index'], $board_config['sitename'] ), ! 'L_RATING' => $lang['Siteld'], ! 'L_DOWNLOADS' => $lang['Hits'], ! 'L_DATE' => $lang['Date'], ! 'L_NAME' => $lang['Sitename'], ! 'L_SEARCH_FOR' => $lang['Search_for'], ! 'L_ALL' => $lang['All'], ! 'L_CHOOSE_CAT' => $lang['Choose_cat'] ) ! ); $this->display( $lang['Links_Title'] . ' :: ' . $lang['Link_Search'], 'link_search_body.tpl' ); } } ?> \ No newline at end of file Index: link_viewall.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/modules/link_viewall.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** link_viewall.php 5 Apr 2006 22:35:24 -0000 1.4 --- link_viewall.php 30 Jun 2006 19:54:15 -0000 1.5 *************** *** 71,83 **** } ! $template->assign_vars( array( 'L_VIEWALL' => $lang['Viewall'], ! 'L_INDEX' => sprintf( $lang['Forum_Index'], $board_config['sitename'] ), ! 'U_INDEX' => append_sid( 'index.' . $phpEx ), ! 'U_LINK' => append_sid( linkdb_this_mxurl() ), ! 'SEARCH_TYPE' => $sort_type, ! 'LINKS' => $lang['Links_Title'] ) ! ); $this->display_files( $sort_method, $sort_order, $start, true ); --- 71,84 ---- } ! $template->assign_vars( array( ! 'L_VIEWALL' => $lang['Viewall'], ! 'L_INDEX' => sprintf( $lang['Forum_Index'], $board_config['sitename'] ), ! 'U_INDEX' => append_sid( 'index.' . $phpEx ), ! 'U_LINK' => append_sid( linkdb_this_mxurl() ), ! 'SEARCH_TYPE' => $sort_type, ! 'LINKS' => $lang['Links_Title'] ) ! ); $this->display_files( $sort_method, $sort_order, $start, true ); *************** *** 86,89 **** } } ! ! ?> --- 87,89 ---- } } ! ?> \ No newline at end of file Index: link_main.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/modules/link_main.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** link_main.php 5 Apr 2006 22:35:24 -0000 1.3 --- link_main.php 30 Jun 2006 19:54:15 -0000 1.4 *************** *** 13,33 **** function main( $action ) { ! global $template, $lang, $board_config, $phpEx, $linkdb_config; ! // assign var for naviagation ! ! $template->assign_vars( array( 'L_INDEX' => sprintf( $lang['Forum_Index'], $board_config['sitename'] ), ! 'U_INDEX' => append_sid( 'index.' . $phpEx ), ! 'U_LINK' => append_sid( linkdb_this_mxurl() ), ! 'LINKS' => $lang['Links_Title'], ! 'TREE' => $menu_output, ! 'L_LINK_US' => $lang['Link_us'], ! 'U_SITE_LOGO' => $linkdb_config['site_logo'], ! 'L_LINK_US_EXPLAIN' => sprintf( $lang['Link_us_explain'], $board_config['sitename'] ), ! 'LINK_US_SYNTAX' => str_replace( " ", " ", sprintf( htmlentities( $lang['Link_us_syntax'], ENT_QUOTES ), $linkdb_config['site_url'], $linkdb_config['site_logo'], $linkdb_config['width'], $linkdb_config['height'], $board_config['sitename'] ) ) ! ) ); ! // Show the Category ! $this->category_display(); --- 13,36 ---- function main( $action ) { ! global $template, $lang, $board_config, $phpEx, $linkdb_config; ! ! // // assign var for naviagation ! // ! $template->assign_vars( array( ! 'L_INDEX' => sprintf( $lang['Forum_Index'], $board_config['sitename'] ), ! 'U_INDEX' => append_sid( 'index.' . $phpEx ), ! 'U_LINK' => append_sid( linkdb_this_mxurl() ), ! 'LINKS' => $lang['Links_Title'], ! 'TREE' => $menu_output, ! 'L_LINK_US' => $lang['Link_us'], ! 'U_SITE_LOGO' => $linkdb_config['site_logo'], ! 'L_LINK_US_EXPLAIN' => sprintf( $lang['Link_us_explain'], $board_config['sitename'] ), ! 'LINK_US_SYNTAX' => str_replace( " ", " ", sprintf( htmlentities( $lang['Link_us_syntax'], ENT_QUOTES ), $linkdb_config['site_url'], $linkdb_config['site_logo'], $linkdb_config['width'], $linkdb_config['height'], $board_config['sitename'] ) ) ! ) ); ! ! // // Show the Category ! // $this->category_display(); *************** *** 35,38 **** } } - ?> \ No newline at end of file --- 38,40 ---- |