You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
(95) |
Apr
(270) |
May
(111) |
Jun
|
Jul
|
Aug
(64) |
Sep
(130) |
Oct
(319) |
Nov
(17) |
Dec
(191) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(53) |
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
(387) |
Jul
(102) |
Aug
(247) |
Sep
(120) |
Oct
(1) |
Nov
(8) |
Dec
(21) |
| 2007 |
Jan
(38) |
Feb
(36) |
Mar
|
Apr
(32) |
May
(135) |
Jun
(523) |
Jul
(192) |
Aug
(103) |
Sep
(533) |
Oct
(77) |
Nov
(23) |
Dec
(203) |
| 2008 |
Jan
(312) |
Feb
(1193) |
Mar
(404) |
Apr
(67) |
May
(62) |
Jun
(497) |
Jul
(297) |
Aug
(110) |
Sep
(335) |
Oct
(256) |
Nov
(50) |
Dec
(118) |
| 2009 |
Jan
(67) |
Feb
(10) |
Mar
(1) |
Apr
(1) |
May
|
Jun
(10) |
Jul
(61) |
Aug
|
Sep
(16) |
Oct
(45) |
Nov
(12) |
Dec
(14) |
| 2010 |
Jan
(30) |
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
(7) |
Aug
(7) |
Sep
(5) |
Oct
(5) |
Nov
|
Dec
|
| 2011 |
Jan
(7) |
Feb
(3) |
Mar
(89) |
Apr
(11) |
May
(5) |
Jun
|
Jul
(8) |
Aug
(1) |
Sep
(2) |
Oct
|
Nov
(2) |
Dec
(89) |
| 2012 |
Jan
(7) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
(3) |
Oct
(42) |
Nov
(1) |
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
(19) |
Apr
(90) |
May
(38) |
Jun
(235) |
Jul
(38) |
Aug
(10) |
Sep
|
Oct
(29) |
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
(6) |
May
(52) |
Jun
|
Jul
(7) |
Aug
|
Sep
(17) |
Oct
|
Nov
|
Dec
|
|
From: Jon O. <jon...@us...> - 2006-07-01 21:31:09
|
Update of /cvsroot/mxbb/mx_pafiledb/pafiledb/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv10058/modules/mx_pafiledb/pafiledb/includes Modified Files: functions.php functions_pafiledb.php Log Message: minor fixes Index: functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/functions.php,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** functions.php 17 Jun 2006 20:13:22 -0000 1.23 --- functions.php 1 Jul 2006 21:31:06 -0000 1.24 *************** *** 1240,1244 **** function init( $item_id = 0) { ! global $db, $lang, $mx_pa_custom_field, $module_root_path, $phpbb_root_path, $phpEx, $mx_pafiledb, $userdata; // ======================================================= --- 1240,1244 ---- function init( $item_id = 0) { ! global $db, $lang, $mx_pa_custom_field, $module_root_path, $phpbb_root_path, $phpEx, $pafiledb, $userdata; // ======================================================= *************** *** 1958,1961 **** --- 1958,1962 ---- 'L_QUICK_JUMP' => $lang['Quick_jump'], 'JUMPMENU' => $pafiledb->modules[$pafiledb->module_name]->generate_jumpbox( 0, 0, array( $_GET['cat_id'] => 1 ) ), + 'S_JUMPBOX_ACTION' => append_sid( pa_this_mxurl( ) ), 'S_AUTH_LIST' => $pafiledb->modules[$pafiledb->module_name]->auth_can_list, *************** *** 1965,1969 **** 'L_MODULE_ORIG_AUTHOR' => $pa_module_orig_author, 'L_MODULE_AUTHOR' => $pa_module_author, - 'S_JUMPBOX_ACTION' => append_sid( pa_this_mxurl( ) ), 'S_TIMEZONE' => sprintf( $lang['All_times'], $lang[number_format( $board_config['board_timezone'] )] ) ) ); --- 1966,1969 ---- Index: functions_pafiledb.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/functions_pafiledb.php,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** functions_pafiledb.php 27 Jun 2006 21:38:43 -0000 1.30 --- functions_pafiledb.php 1 Jul 2006 21:31:06 -0000 1.31 *************** *** 24,27 **** --- 24,50 ---- /** + * Enter description here... + * + * @param unknown_type $module_name + */ + function adminmodule( $module_name ) + { + if ( !class_exists( 'pafiledb_' . $module_name ) ) + { + global $module_root_path, $phpEx; + + $this->module_name = $module_name; + + require_once( $module_root_path . 'pafiledb/admin/admin_' . $module_name . '.' . $phpEx ); + eval( '$this->modules[' . $module_name . '] = new pafiledb_' . $module_name . '();' ); + + if ( method_exists( $this->modules[$module_name], 'init' ) ) + { + $this->modules[$module_name]->init(); + } + } + } + + /** * load module. * *************** *** 169,173 **** $this->notification[$cat_rowset[$i]['cat_id']]['activated'] = $cat_rowset[$i]['notify'] == -1 ? (intval($pafiledb_config['notify'])) : ( intval($cat_rowset[$i]['notify']) ); // -1, 0, 1, 2 $this->notification[$cat_rowset[$i]['cat_id']]['notify_group'] = $cat_rowset[$i]['notify_group'] == -1 || $cat_rowset[$i]['notify_group'] == 0 ? (intval($pafiledb_config['notify_group'])) : ( intval($cat_rowset[$i]['notify_group']) ); // Group_id - } } --- 192,195 ---- *************** *** 522,562 **** * @return unknown */ - function new_file_in_cat_old( $cat_id ) - { - global $pafiledb_config, $board_config, $db, $_COOKIE; - - $files_new = 0; - - $time = time() - ( $pafiledb_config['settings_newdays'] * 24 * 60 * 60 ); - - $sql = 'SELECT file_time, file_catid - FROM ' . PA_FILES_TABLE . " - WHERE file_approved = '1' - AND file_catid IN (" . $this->gen_cat_ids( $cat_id ) . ') - AND file_time > ' . $time . ' - ORDER BY file_time DESC'; - - if ( !( $result = $db->sql_query( $sql ) ) ) - { - mx_message_die( GENERAL_ERROR, 'Couldnt Query Files info', '', __LINE__, __FILE__, $sql ); - } - - while ( $row = $db->sql_fetchrow( $result ) ) - { - if ( $this->auth[$row['file_catid']]['auth_read'] ) - { - $files_new++; - } - } - - return $files_new; - } - - /** - * Enter description here... - * - * @param unknown_type $cat_id - * @return unknown - */ function new_file_in_cat( $cat_id ) { --- 544,547 ---- *************** *** 952,956 **** global $db, $pafiledb_config, $pafiledb_template, $board_config; global $images, $lang, $phpEx, $pafiledb_functions; - // MX global $phpbb_root_path, $mx_root_path, $module_root_path, $is_block, $phpEx; --- 937,940 ---- *************** *** 2348,2479 **** * Enter description here... * - */ - /* - function pm_notify() - { - global $lang, $emailer, $board_config, $kb_config, $db, $module_root_path, $phpbb_root_path, $mx_root_path, $phpEx, $is_block, $page_id, $images; - - if ( $action == 2 ) - { - $email_body = $lang['Email_body']; - - include( $phpbb_root_path . 'includes/emailer.' . $phpEx ); - $emailer = new emailer( $board_config['smtp_delivery'] ); - $email_headers = 'From: ' . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\n"; - $emailer->email_address( $board_config['board_email'] ); - $emailer->set_subject( $lang['New_article'] ); - $emailer->extra_headers( $email_headers ); - $emailer->msg = $email_body; - - $emailer->send(); - $emailer->reset(); - } - else if ( $action == 1 ) - { - $sql = "UPDATE " . USERS_TABLE . " - SET user_new_privmsg = '1', user_last_privmsg = '9999999999' - WHERE user_id = " . $kb_config['admin_id']; - - if ( !( $result = $db->sql_query( $sql ) ) ) - { - mx_message_die( GENERAL_ERROR, 'Could not update users table', '', __LINE__, __FILE__, $sql ); - } - // added by snake for extended PM - $approve_pm_view = "<table width=" . "100%" . " border=" . "1" . " cellspacing=" . "0" . " cellpadding=" . "0" . "><tr><td>" . $lang['Category'] . "</td><td>" . $lang['Art_action'] . "</td></tr>"; - - $sql = "SELECT * FROM " . KB_ARTICLES_TABLE . " WHERE approved = '2' ORDER BY article_id DESC LIMIT 1"; - if ( !( $article_result = $db->sql_query( $sql ) ) ) - { - mx_message_die( GENERAL_ERROR, "Could not obtain article data", '', __LINE__, __FILE__, $sql ); - } - - while ( $article = $db->sql_fetchrow( $article_result ) ) - { - $approved_yesno = $article['approved']; - $article_description = $article['article_description']; - $article_cat = $article['article_category_id']; - $bbcode_uid = $article['bbcode_uid']; // to enadbe bbcode from article html seems to wolr by default even whwn off - $articlebody = "[quote:$bbcode_uid]" . $article['article_body'] . "<br>[/quote:$bbcode_uid]"; // include the post for approve.. - // type - $type_id = $article['article_type']; - $article_type = get_kb_type( $type_id ); - $article_date = create_date( $board_config['default_dateformat'], $article['article_date'], $board_config['board_timezone'] ); - // author information - $author_id = $article['article_author_id']; - - if ( $author_id == 0 ) - { - $author = ( $username != '' ) ? $lang['Guest'] : $article['username']; - } - else - { - $author_name = get_kb_author( $author_id ); - $temp_url = append_sid( $phpbb_root_path . "profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$author_id" ); - $author = '<a href="' . $temp_url . '" class="gen">' . $author_name . '</a>'; - } - - $article_id = $article['article_id']; - $views = $article['views']; - $article_title = $article['article_title']; - $temp_url = append_sid( this_kb_mxurl( "mode=article&k=$article_id" ) ); - $article = '<a href="' . $temp_url . '" class="gen">' . $article_title . '</a>'; - - $approve = ''; - $delete = ''; - $category_name = ''; - - $category = get_kb_cat( $article_cat ); - $category_name = $category['category_name']; - - if ( $approved_yesno == 2 ) - { - // approve - $temp_url = append_sid( PORTAL_URL . $module_root_path . "admin/admin_kb_art.$phpEx?mode=approve&a=$article_id" ); - $approve = '<a href="' . $temp_url . '"><img src="' . $images['pa_icon_approve'] . '" border="0" alt="' . $lang['Approve'] . '"></a>'; - } - else - { - // unapprove - $temp_url = append_sid( PORTAL_URL . $module_root_path . "admin/admin_kb_art.$phpEx?mode=unapprove&a=$article_id" ); - $unapprove = '<a href="' . $temp_url . '"><img src="' . $images['pa_icon_unapprove'] . '" border="0" alt="' . $lang['Un_approve'] . '"></a>'; - } - $temp_url = append_sid( PORTAL_URL . $module_root_path . "admin/admin_kb_art.$phpEx?mode=delete&a=$article_id" ); - $delete = '<a href="' . $temp_url . '"><img src="' . $images['pa_icon_delpost'] . '" border="0" alt="' . $lang['Delete'] . '"></a>'; - $approve_pm_view .= "<tr><td>$category_name</td><td>$approve ' ' $delete ' ' $unapprove</td></tr>"; // the action table - } - - $approve_pm_view .= "</table>"; // end action table - - $user_id = $kb_config['admin_id']; - $new_article_subject = $lang['New_article']; - $new_article = $lang['Email_body']; // original code - $new_article .= $articlebody; // the extended Pm body - $new_article .= '<p>' . $approve_pm_view; // the extended Pm body - $new_article .= '<br><a href=' . PORTAL_URL . $module_root_path . 'admin/admin_kb_art.' . $phpEx . '>KB Admin page</a><br>'; // the extended Pm body - $new_article = addslashes( $new_article ); - - $privmsgs_date = date( "U" ); - // End Snake Extend PM Mod - $sql = "INSERT INTO " . PRIVMSGS_TABLE . " (privmsgs_type, privmsgs_subject, privmsgs_from_userid, privmsgs_to_userid, privmsgs_date, privmsgs_enable_html, privmsgs_enable_bbcode, privmsgs_enable_smilies, privmsgs_attach_sig) VALUES ('5', '" . $new_article_subject . "', '" . $user_id . "', '" . $user_id . "', '" . $privmsgs_date . "', '0', '1', '1', '0')"; - if ( !$db->sql_query( $sql ) ) - { - mx_message_die( GENERAL_ERROR, 'Could not insert private message sent info', '', __LINE__, __FILE__, $sql ); - } - $privmsg_sent_id = $db->sql_nextid(); - $privmsgs_text = $lang['register_pm_subject']; - - $sql = "INSERT INTO " . PRIVMSGS_TEXT_TABLE . " (privmsgs_text_id, privmsgs_bbcode_uid, privmsgs_text) VALUES ($privmsg_sent_id, '" . $bbcode_uid . "', '" . $new_article . "')"; // need to aply the bbcode_uid for bbcode to work - if ( !$db->sql_query( $sql ) ) - { - mx_message_die( GENERAL_ERROR, 'Could not insert private message sent text', '', __LINE__, __FILE__, $sql ); - } - } - return; - } - */ - - /** - * Enter description here... - * * @param unknown_type $article_data * @param unknown_type $item_id --- 2332,2335 ---- |
|
From: Jon O. <jon...@us...> - 2006-07-01 21:30:34
|
Update of /cvsroot/mxbb/mx_kb/kb/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv9904/modules/mx_kb/kb/includes Modified Files: functions.php functions_kb.php Log Message: Minor fixes Index: functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/includes/functions.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** functions.php 28 Jun 2006 21:18:14 -0000 1.8 --- functions.php 1 Jul 2006 21:30:30 -0000 1.9 *************** *** 1476,1482 **** * page header. * - * @param unknown_type $page_title */ ! function kb_page_header( $page_title ) { global $kb_config, $lang, $userdata, $images, $mode; --- 1476,1481 ---- * page header. * */ ! function kb_page_header( ) { global $kb_config, $lang, $userdata, $images, $mode; *************** *** 1582,1592 **** $template->assign_vars( array( - 'QUICK_JUMP_ACTION' => this_kb_mxurl(), - 'S_HIDDEN_VARS' => $s_hidden_vars, - 'L_QUICK_GO' => $lang['Quick_go'], 'L_QUICK_NAV' => $lang['Quick_nav'], 'L_QUICK_JUMP' => $lang['Quick_jump'], 'QUICK_NAV' => $mx_kb->modules[$mx_kb->module_name]->jumpbox, 'S_AUTH_LIST' => $mx_kb->modules[$mx_kb->module_name]->auth_can_list, --- 1581,1591 ---- $template->assign_vars( array( 'L_QUICK_GO' => $lang['Quick_go'], 'L_QUICK_NAV' => $lang['Quick_nav'], 'L_QUICK_JUMP' => $lang['Quick_jump'], 'QUICK_NAV' => $mx_kb->modules[$mx_kb->module_name]->jumpbox, + 'QUICK_JUMP_ACTION' => this_kb_mxurl(), + + 'S_HIDDEN_VARS' => $s_hidden_vars, 'S_AUTH_LIST' => $mx_kb->modules[$mx_kb->module_name]->auth_can_list, Index: functions_kb.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/includes/functions_kb.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** functions_kb.php 28 Jun 2006 13:58:08 -0000 1.9 --- functions_kb.php 1 Jul 2006 21:30:30 -0000 1.10 *************** *** 24,27 **** --- 24,50 ---- /** + * Enter description here... + * + * @param unknown_type $module_name + */ + function adminmodule( $module_name ) + { + if ( !class_exists( 'linkdb_' . $module_name ) ) + { + global $module_root_path, $phpEx; + + $this->module_name = $module_name; + + require_once( $module_root_path . 'kb/admin/admin_' . $module_name . '.' . $phpEx ); + eval( '$this->modules[' . $module_name . '] = new mx_kb_' . $module_name . '();' ); + + if ( method_exists( $this->modules[$module_name], 'init' ) ) + { + $this->modules[$module_name]->init(); + } + } + } + + /** * load module * *************** *** 1285,1316 **** * Enter description here... * - * @param unknown_type $category_id - */ - function auth_can($category_id) - { - global $lang; - - $this->debug('mx_kb->auth_can', basename( __FILE__ )); - - // - // User authorisation levels output - // - $this->auth_can_list = '<br />' . ( ( $this->auth_user[$category_id]['auth_post'] ) ? $lang['KB_Rules_post_can'] : $lang['KB_Rules_post_cannot'] ) . '<br />'; - $this->auth_can_list .= ( ( $this->auth_user[$category_id]['auth_edit'] ) ? $lang['KB_Rules_edit_can'] : $lang['KB_Rules_edit_cannot'] ) . '<br />'; - $this->auth_can_list .= ( ( $this->auth_user[$category_id]['auth_delete'] ) ? $lang['KB_Rules_delete_can'] : $lang['KB_Rules_delete_cannot'] ) . '<br />'; - $this->auth_can_list .= ( ( $this->comments[$category_id]['activated'] ? (( $this->auth_user[$category_id]['auth_comment'] ? $lang['KB_Rules_comment_can'] : $lang['KB_Rules_comment_cannot'] ) . '<br />') : '' )); - $this->auth_can_list .= ( ( $this->ratings[$category_id]['activated'] ? (( $this->auth_user[$category_id]['auth_rate'] ? $lang['KB_Rules_rate_can'] : $lang['KB_Rules_rate_cannot'] ) . '<br />') : '' )); - $this->auth_can_list .= ( ( $this->auth_user[$category_id]['auth_approval'] ) ? $lang['KB_Rules_approval_can'] : $lang['KB_Rules_approval_cannot'] ) . '<br />'; - $this->auth_can_list .= ( ( $this->auth_user[$category_id]['auth_approval_edit'] ) ? $lang['KB_Rules_approval_edit_can'] : $lang['KB_Rules_approval_edit_cannot'] ) . '<br />'; - - if ( $this->auth_user[$category_id]['auth_mod'] ) - { - $this->auth_can_list .= $lang['KB_Rules_moderate_can']; - } - } - - /** - * Enter description here... - * * @param unknown_type $article_id * @param unknown_type $cat_id --- 1308,1311 ---- *************** *** 1547,1550 **** --- 1542,1573 ---- * Enter description here... * + * @param unknown_type $category_id + */ + function auth_can($category_id) + { + global $lang; + + $this->debug('mx_kb->auth_can', basename( __FILE__ )); + + // + // User authorisation levels output + // + $this->auth_can_list = '<br />' . ( ( $this->auth_user[$category_id]['auth_post'] ) ? $lang['KB_Rules_post_can'] : $lang['KB_Rules_post_cannot'] ) . '<br />'; + $this->auth_can_list .= ( ( $this->auth_user[$category_id]['auth_edit'] ) ? $lang['KB_Rules_edit_can'] : $lang['KB_Rules_edit_cannot'] ) . '<br />'; + $this->auth_can_list .= ( ( $this->auth_user[$category_id]['auth_delete'] ) ? $lang['KB_Rules_delete_can'] : $lang['KB_Rules_delete_cannot'] ) . '<br />'; + $this->auth_can_list .= ( ( $this->comments[$category_id]['activated'] ? (( $this->auth_user[$category_id]['auth_comment'] ? $lang['KB_Rules_comment_can'] : $lang['KB_Rules_comment_cannot'] ) . '<br />') : '' )); + $this->auth_can_list .= ( ( $this->ratings[$category_id]['activated'] ? (( $this->auth_user[$category_id]['auth_rate'] ? $lang['KB_Rules_rate_can'] : $lang['KB_Rules_rate_cannot'] ) . '<br />') : '' )); + $this->auth_can_list .= ( ( $this->auth_user[$category_id]['auth_approval'] ) ? $lang['KB_Rules_approval_can'] : $lang['KB_Rules_approval_cannot'] ) . '<br />'; + $this->auth_can_list .= ( ( $this->auth_user[$category_id]['auth_approval_edit'] ) ? $lang['KB_Rules_approval_edit_can'] : $lang['KB_Rules_approval_edit_cannot'] ) . '<br />'; + + if ( $this->auth_user[$category_id]['auth_mod'] ) + { + $this->auth_can_list .= $lang['KB_Rules_moderate_can']; + } + } + + /** + * Enter description here... + * * @param unknown_type $article_id * @return unknown |
|
From: Jon O. <jon...@us...> - 2006-07-01 21:30:34
|
Update of /cvsroot/mxbb/mx_kb In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv9904/modules/mx_kb Modified Files: kb.php Log Message: Minor fixes Index: kb.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb.php,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** kb.php 28 Jun 2006 21:18:14 -0000 1.35 --- kb.php 1 Jul 2006 21:30:30 -0000 1.36 *************** *** 187,193 **** if ( !$print_version ) { ! kb_page_header( $page_title ); } $template->assign_vars( array( 'U_PORTAL' => $mx_root_path, --- 187,196 ---- if ( !$print_version ) { ! kb_page_header(); } + // + // Some general template vars + // $template->assign_vars( array( 'U_PORTAL' => $mx_root_path, |
|
From: Jon O. <jon...@us...> - 2006-07-01 19:59:32
|
Update of /cvsroot/mxbb/mx_linkdb/linkdb/cache In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv3342/modules/mx_linkdb/linkdb/cache Added Files: data_global.php index.htm Log Message: starting with this module... --- NEW FILE: index.htm --- <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> </body> </html> --- NEW FILE: data_global.php --- |
|
From: Jon O. <jon...@us...> - 2006-07-01 19:58:33
|
Update of /cvsroot/mxbb/mx_linkdb/linkdb/cache In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv2917/cache Log Message: Directory /cvsroot/mxbb/mx_linkdb/linkdb/cache added to the repository |
|
From: Jon O. <jon...@us...> - 2006-06-30 21:12:14
|
Update of /cvsroot/mxbb/mx_linkdb/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv10216/modules/mx_linkdb/admin Modified Files: admin_linkdb.php Log Message: something... Index: admin_linkdb.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/admin/admin_linkdb.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** admin_linkdb.php 30 Jun 2006 19:54:14 -0000 1.5 --- admin_linkdb.php 30 Jun 2006 21:12:10 -0000 1.6 *************** *** 33,42 **** { include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); - include( $module_root_path . 'language/lang_english/lang_main.' . $phpEx ); // Notification } else { include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); - include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ); // Notification } --- 33,40 ---- |
|
From: Jon O. <jon...@us...> - 2006-06-30 21:11:02
|
Update of /cvsroot/mxbb/mx_smartor In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv9308/modules/mx_smartor Modified Files: album.php album_lists.php db_install.php db_upgrade.php hierarchy_db_migrate.php Log Message: This module is really messy. I have done some general code cleanup and security scrutiny. Still, much to do... Index: album.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/album.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** album.php 17 Jun 2006 20:51:30 -0000 1.12 --- album.php 30 Jun 2006 21:10:55 -0000 1.13 *************** *** 9,12 **** --- 9,17 ---- */ + // +--------------------------------------------------------+ + // | Powered by Photo Album 2.x.x (c) 2002-2003 Smartor | + // | with Volodymyr (CLowN) Skoryk's Service Pack 1 © 2003 | + // +--------------------------------------------------------+ + if ( !function_exists( 'read_block_config' ) ) { *************** *** 230,234 **** else { ! /* +---------------------------------------------------------- | Build Categories Index --- 235,240 ---- else { ! ! /* +---------------------------------------------------------- | Build Categories Index *************** *** 1014,1019 **** } ! $template->set_filenames( array( 'body' => 'album_index_body.tpl' ) ! ); if ( defined( 'ALBUM_SP_CONFIG_TABLE' ) ) --- 1020,1024 ---- } ! $template->set_filenames( array( 'body' => 'album_index_body.tpl' ) ); if ( defined( 'ALBUM_SP_CONFIG_TABLE' ) ) *************** *** 1057,1073 **** } ! $template->assign_vars( array( 'S_COLS' => $cols, ! 'S_COL_WIDTH' => $cols_width, ! 'TARGET_BLANK' => ( $album_config['fullpic_popup'] ) ? 'target="_blank"' : '', ! 'L_RECENT_PUBLIC_PICS' => $lang['Recent_Public_Pics'], ! 'L_TOPRATED_PUBLIC_PICS' => $lang['Toprated_Public_Pics'], ! 'L_RANDOM_PUBLIC_PICS' => $lang['Random_Public_Pics'], ! 'L_MOST_PUBLIC_PICS' => $lang['Most_Public_Pics'], ! 'L_NO_PICS' => $lang['No_Pics'], ! 'L_PIC_TITLE' => $lang['Pic_Title'], ! 'L_VIEW' => $lang['View'], ! 'L_POSTER' => $lang['Poster'], ! 'L_POSTED' => $lang['Posted'] ) ! ); } // it's a personal gallery, and in the root folder --- 1062,1079 ---- } ! $template->assign_vars( array( ! 'S_COLS' => $cols, ! 'S_COL_WIDTH' => $cols_width, ! 'TARGET_BLANK' => ( $album_config['fullpic_popup'] ) ? 'target="_blank"' : '', ! 'L_RECENT_PUBLIC_PICS' => $lang['Recent_Public_Pics'], ! 'L_TOPRATED_PUBLIC_PICS' => $lang['Toprated_Public_Pics'], ! 'L_RANDOM_PUBLIC_PICS' => $lang['Random_Public_Pics'], ! 'L_MOST_PUBLIC_PICS' => $lang['Most_Public_Pics'], ! 'L_NO_PICS' => $lang['No_Pics'], ! 'L_PIC_TITLE' => $lang['Pic_Title'], ! 'L_VIEW' => $lang['View'], ! 'L_POSTER' => $lang['Poster'], ! 'L_POSTED' => $lang['Posted'] ) ! ); } // it's a personal gallery, and in the root folder *************** *** 1101,1109 **** include( $mx_root_path . 'includes/page_tail.' . $phpEx ); } - // +--------------------------------------------------------+ - // | Powered by Photo Album 2.x.x (c) 2002-2003 Smartor | - // | with Volodymyr (CLowN) Skoryk's Service Pack 1 © 2003 | - // +--------------------------------------------------------+ } - ?> \ No newline at end of file --- 1107,1110 ---- Index: hierarchy_db_migrate.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/hierarchy_db_migrate.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** hierarchy_db_migrate.php 5 Apr 2006 23:03:48 -0000 1.3 --- hierarchy_db_migrate.php 30 Jun 2006 21:10:55 -0000 1.4 *************** *** 8,12 **** * */ ! define( 'IN_PORTAL', true ); $album_root_path = '../modules/mx_smartor/album_mod/'; --- 8,12 ---- * */ ! define( 'IN_PORTAL', true ); $album_root_path = '../modules/mx_smartor/album_mod/'; *************** *** 49,53 **** if ( $db->sql_numrows( $result ) == 0 ) ! { // mx_message_die(GENERAL_ERROR, 'There aren\'t any \'old\' personal galleries. Script is ending.'); echo '<li><font color="#0000FF"><b>NOTICE:</b></font> There aren\'t any \'old\' personal galleries to migrate. Script is ending.</li><br />'; --- 49,53 ---- if ( $db->sql_numrows( $result ) == 0 ) ! { // mx_message_die(GENERAL_ERROR, 'There aren\'t any \'old\' personal galleries. Script is ending.'); echo '<li><font color="#0000FF"><b>NOTICE:</b></font> There aren\'t any \'old\' personal galleries to migrate. Script is ending.</li><br />'; *************** *** 64,68 **** $sql = ""; for( $i = 0; $i < count( $personal_gallery_info ); $i++ ) ! { // check wheter the personal gallery root id already exists...it shouldn't tho'. $sql = "SELECT cat_id --- 64,68 ---- $sql = ""; for( $i = 0; $i < count( $personal_gallery_info ); $i++ ) ! { // check wheter the personal gallery root id already exists...it shouldn't tho'. $sql = "SELECT cat_id *************** *** 76,80 **** $error = $db->sql_error(); ! echo '<li>' . $sql . '<br /><font color="#FF0000"><b>ERROR:</b></font> ' . $error['message'] . '</li><br />'; // try the next personal gallery continue; --- 76,80 ---- $error = $db->sql_error(); ! echo '<li>' . $sql . '<br /><font color="#FF0000"><b>ERROR:</b></font> ' . $error['message'] . '</li><br />'; // try the next personal gallery continue; *************** *** 106,113 **** echo '<li>' . $sql . '<br /><font color="#FF0000"><b>ERROR:</b></font> ' . $error['message'] . '</li><br />'; echo ' Personal gallery was <b>NOT</b> created for user : \'' . $personal_gallery_info[$i]['pic_username'] . '\'<br />'; ! echo ' Please inform IdleVoid (the Author) about this, including the user name<br />'; // try the next personal gallery and by that skip the updating of this users personal gallery continue; ! } // get the newly created personal gallery root id. $sql = "SELECT cat_id --- 106,113 ---- echo '<li>' . $sql . '<br /><font color="#FF0000"><b>ERROR:</b></font> ' . $error['message'] . '</li><br />'; echo ' Personal gallery was <b>NOT</b> created for user : \'' . $personal_gallery_info[$i]['pic_username'] . '\'<br />'; ! echo ' Please inform IdleVoid (the Author) about this, including the user name<br />'; // try the next personal gallery and by that skip the updating of this users personal gallery continue; ! } // get the newly created personal gallery root id. $sql = "SELECT cat_id *************** *** 127,131 **** $row = $db->sql_fetchrow( $result ); ! $root_cat_id = $row['cat_id']; // move the pictures of this user into the $sql = "UPDATE " . ALBUM_TABLE . " --- 127,131 ---- $row = $db->sql_fetchrow( $result ); ! $root_cat_id = $row['cat_id']; // move the pictures of this user into the $sql = "UPDATE " . ALBUM_TABLE . " *************** *** 151,154 **** echo '<tr><th>Finish</th></tr><tr><td><span class="genmed"><center><br />Installation is now finished.<br /></center></span></td></tr></table></td></tr></table>'; // include($phpbb_root_path . 'includes/page_tail.'.$phpEx); - ?> \ No newline at end of file --- 151,153 ---- Index: album_lists.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/album_lists.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** album_lists.php 17 Jun 2006 20:51:30 -0000 1.15 --- album_lists.php 30 Jun 2006 21:10:55 -0000 1.16 *************** *** 9,12 **** --- 9,17 ---- */ + // +--------------------------------------------------------+ + // | Powered by Photo Album 2.x.x (c) 2002-2003 Smartor | + // | with Volodymyr (CLowN) Skoryk's Service Pack 1 © 2003 | + // +--------------------------------------------------------+ + if ( !function_exists( 'read_block_config' ) ) { *************** *** 88,102 **** // Set ALBUM Version ! $template->assign_vars( array( 'ALBUM_VERSION' => '2' . $album_config['album_version'], ! 'ALBUM_VERSION_INFO' => 'This script (Smartor Album v. 2.71 :: MX-Portal Module 2004, with Volodymyr (CLowN) Skoryks SP1 addon) is modified by <a href="http://www.mx-system.com">MX-Team</a> ', ! 'PAFILEDB_SEARCH_ACTION' => append_sid( this_smartor_mxurl() ), ! 'PAFILEDB_SEARCH_HIDDEN' => '<input type="hidden" name="smartor_mode" value="album_search"><input type="hidden" name="page" value="' . $page_id . '">', ! 'L_TITLE' => $title, ! 'L_INDEX' => '<<', ! 'U_INDEX' => append_sid( $mx_root_path . "index." . $phpEx ), ! 'L_ALBUM' => $lang['Album'], ! 'U_ALBUM' => append_sid( this_smartor_mxurl() ) ! ) ! ); // Read block Configuration --- 93,107 ---- // Set ALBUM Version ! $template->assign_vars( array( ! 'ALBUM_VERSION' => '2' . $album_config['album_version'], ! 'ALBUM_VERSION_INFO' => 'This script (Smartor Album v. 2.71 :: MX-Portal Module 2004, with Volodymyr (CLowN) Skoryks SP1 addon) is modified by <a href="http://www.mx-system.com">MX-Team</a> ', ! 'PAFILEDB_SEARCH_ACTION' => append_sid( this_smartor_mxurl() ), ! 'PAFILEDB_SEARCH_HIDDEN' => '<input type="hidden" name="smartor_mode" value="album_search"><input type="hidden" name="page" value="' . $page_id . '">', ! 'L_TITLE' => $title, ! 'L_INDEX' => '<<', ! 'U_INDEX' => append_sid( $mx_root_path . "index." . $phpEx ), ! 'L_ALBUM' => $lang['Album'], ! 'U_ALBUM' => append_sid( this_smartor_mxurl() ) ! )); // Read block Configuration *************** *** 209,234 **** } ! $template->assign_block_vars( 'recent_pics_block.recent_pics.recent_col', array( 'TITLE' => $recentrow[$j]['pic_title'], ! 'POSTER' => $recent_poster, ! 'VIEW' => $recentrow[$j]['pic_view_count'], ! 'U_PIC' => ( $album_config['fullpic_popup'] ) ? append_sid( this_smartor_mxurl( "smartor_mode=album_pic&pic_id=" . $recentrow[$j]['pic_id'], true ) ) : append_sid( this_smartor_mxurl( "smartor_mode=album_showpage&pic_id=" . $recentrow[$j]['pic_id'], false, $smartor_page_id ) ), ! 'THUMBNAIL' => append_sid( this_smartor_mxurl( "smartor_mode=album_thumbnail&pic_id=" . $recentrow[$j]['pic_id'], true ) ), ! 'DESC' => $recentrow[$j]['pic_desc'] ! ) ! ); $rating_image = ImageRating( $recentrow[$j]['rating'] ); ! $template->assign_block_vars( 'recent_pics_block.recent_pics.recent_detail', array( 'TITLE' => $recentrow[$j]['pic_title'], ! 'POSTER' => $recent_poster, ! 'TIME' => create_date( $board_config['default_dateformat'], $recentrow[$j]['pic_time'], $board_config['board_timezone'] ), ! 'VIEW' => $recentrow[$j]['pic_view_count'], ! 'RATING' => ( $album_config['rate'] == 1 ) ? ( $lang['Rating'] . ': ' . $rating_image . ', ' ) : '', ! 'COMMENTS' => ( $album_config['comment'] == 1 ) ? ( '<a href="' . append_sid( this_smartor_mxurl( "smartor_mode=album_showpage&pic_id=" . $recentrow[$j]['pic_id'], false, $smartor_page_id ) ) . '">' . $lang['Comments'] . '</a>: ' . $recentrow[$j]['comments'] . '<br />' ) : '' ! // 'IP' => ($userdata['user_level'] == ADMIN) ? $lang['IP_Address'] . ': <a href="http://www.nic.com/cgi-bin/whois.cgi?query=' . decode_ip($recentrow[$j]['pic_user_ip']) . '" target="_blank">' . decode_ip($recentrow[$j]['pic_user_ip']) .'</a><br />' : '' ! ) ! ); } } --- 214,239 ---- } ! $template->assign_block_vars( 'recent_pics_block.recent_pics.recent_col', array( ! 'TITLE' => $recentrow[$j]['pic_title'], ! 'POSTER' => $recent_poster, ! 'VIEW' => $recentrow[$j]['pic_view_count'], ! 'U_PIC' => ( $album_config['fullpic_popup'] ) ? append_sid( this_smartor_mxurl( "smartor_mode=album_pic&pic_id=" . $recentrow[$j]['pic_id'], true ) ) : append_sid( this_smartor_mxurl( "smartor_mode=album_showpage&pic_id=" . $recentrow[$j]['pic_id'], false, $smartor_page_id ) ), ! 'THUMBNAIL' => append_sid( this_smartor_mxurl( "smartor_mode=album_thumbnail&pic_id=" . $recentrow[$j]['pic_id'], true ) ), ! 'DESC' => $recentrow[$j]['pic_desc'] ! )); $rating_image = ImageRating( $recentrow[$j]['rating'] ); ! $template->assign_block_vars( 'recent_pics_block.recent_pics.recent_detail', array( ! 'TITLE' => $recentrow[$j]['pic_title'], ! 'POSTER' => $recent_poster, ! 'TIME' => create_date( $board_config['default_dateformat'], $recentrow[$j]['pic_time'], $board_config['board_timezone'] ), ! 'VIEW' => $recentrow[$j]['pic_view_count'], ! 'RATING' => ( $album_config['rate'] == 1 ) ? ( $lang['Rating'] . ': ' . $rating_image . ', ' ) : '', ! 'COMMENTS' => ( $album_config['comment'] == 1 ) ? ( '<a href="' . append_sid( this_smartor_mxurl( "smartor_mode=album_showpage&pic_id=" . $recentrow[$j]['pic_id'], false, $smartor_page_id ) ) . '">' . $lang['Comments'] . '</a>: ' . $recentrow[$j]['comments'] . '<br />' ) : '' ! // 'IP' => ($userdata['user_level'] == ADMIN) ? $lang['IP_Address'] . ': <a href="http://www.nic.com/cgi-bin/whois.cgi?query=' . decode_ip($recentrow[$j]['pic_user_ip']) . '" target="_blank">' . decode_ip($recentrow[$j]['pic_user_ip']) .'</a><br />' : '' ! )); } } *************** *** 238,242 **** // No Pics Found - $template->assign_block_vars( 'recent_pics_block.no_pics', array() ); } --- 243,246 ---- *************** *** 246,250 **** // No Cats Found - $template->assign_block_vars( 'recent_pics_block.no_pics', array() ); } --- 250,253 ---- *************** *** 307,332 **** } ! $template->assign_block_vars( 'most_pics_block.most_pics.most_col', array( 'TITLE' => $mostrow[$j]['pic_title'], ! 'POSTER' => $most_poster, ! 'VIEW' => $mostrow[$j]['pic_view_count'], ! 'U_PIC' => ( $album_config['fullpic_popup'] || 1 == 2 ) ? append_sid( this_smartor_mxurl( "smartor_mode=album_pic&pic_id=" . $mostrow[$j]['pic_id'], true ) ) : append_sid( this_smartor_mxurl( "smartor_mode=album_showpage&pic_id=" . $mostrow[$j]['pic_id'], false, $smartor_page_id ) ), ! 'THUMBNAIL' => append_sid( this_smartor_mxurl( "smartor_mode=album_thumbnail&pic_id=" . $mostrow[$j]['pic_id'], true ) ), ! 'DESC' => $mostrow[$j]['pic_desc'] ! ) ! ); $rating_image = ImageRating( $mostrow[$j]['rating'] ); ! $template->assign_block_vars( 'most_pics_block.most_pics.most_detail', array( 'TITLE' => $mostrow[$j]['pic_title'], ! 'POSTER' => $most_poster, ! 'TIME' => create_date( $board_config['default_dateformat'], $mostrow[$j]['pic_time'], $board_config['board_timezone'] ), ! 'VIEW' => $mostrow[$j]['pic_view_count'], ! 'RATING' => ( $album_config['rate'] == 1 ) ? ( $lang['Rating'] . ': ' . $rating_image . ', ' ) : '', ! 'COMMENTS' => ( $album_config['comment'] == 1 ) ? ( '<a href="' . append_sid( this_smartor_mxurl( "smartor_mode=album_showpage&pic_id=" . $mostrow[$j]['pic_id'], false, $smartor_page_id ) ) . '">' . $lang['Comments'] . '</a>: ' . $mostrow[$j]['comments'] . '<br />' ) : '' ! // 'IP' => ($userdata['user_level'] == ADMIN) ? $lang['IP_Address'] . ': <a href="http://www.nic.com/cgi-bin/whois.cgi?query=' . decode_ip($recentrow[$j]['pic_user_ip']) . '" target="_blank">' . decode_ip($recentrow[$j]['pic_user_ip']) .'</a><br />' : '' ! ) ! ); } } --- 310,335 ---- } ! $template->assign_block_vars( 'most_pics_block.most_pics.most_col', array( ! 'TITLE' => $mostrow[$j]['pic_title'], ! 'POSTER' => $most_poster, ! 'VIEW' => $mostrow[$j]['pic_view_count'], ! 'U_PIC' => ( $album_config['fullpic_popup'] || 1 == 2 ) ? append_sid( this_smartor_mxurl( "smartor_mode=album_pic&pic_id=" . $mostrow[$j]['pic_id'], true ) ) : append_sid( this_smartor_mxurl( "smartor_mode=album_showpage&pic_id=" . $mostrow[$j]['pic_id'], false, $smartor_page_id ) ), ! 'THUMBNAIL' => append_sid( this_smartor_mxurl( "smartor_mode=album_thumbnail&pic_id=" . $mostrow[$j]['pic_id'], true ) ), ! 'DESC' => $mostrow[$j]['pic_desc'] ! )); $rating_image = ImageRating( $mostrow[$j]['rating'] ); ! $template->assign_block_vars( 'most_pics_block.most_pics.most_detail', array( ! 'TITLE' => $mostrow[$j]['pic_title'], ! 'POSTER' => $most_poster, ! 'TIME' => create_date( $board_config['default_dateformat'], $mostrow[$j]['pic_time'], $board_config['board_timezone'] ), ! 'VIEW' => $mostrow[$j]['pic_view_count'], ! 'RATING' => ( $album_config['rate'] == 1 ) ? ( $lang['Rating'] . ': ' . $rating_image . ', ' ) : '', ! 'COMMENTS' => ( $album_config['comment'] == 1 ) ? ( '<a href="' . append_sid( this_smartor_mxurl( "smartor_mode=album_showpage&pic_id=" . $mostrow[$j]['pic_id'], false, $smartor_page_id ) ) . '">' . $lang['Comments'] . '</a>: ' . $mostrow[$j]['comments'] . '<br />' ) : '' ! // 'IP' => ($userdata['user_level'] == ADMIN) ? $lang['IP_Address'] . ': <a href="http://www.nic.com/cgi-bin/whois.cgi?query=' . decode_ip($recentrow[$j]['pic_user_ip']) . '" target="_blank">' . decode_ip($recentrow[$j]['pic_user_ip']) .'</a><br />' : '' ! )); } } *************** *** 336,340 **** // No Pics Found - $template->assign_block_vars( 'most_pics_block.no_pics', array() ); } --- 339,342 ---- *************** *** 344,348 **** // No Cats Found - $template->assign_block_vars( 'most_pics_block.no_pics', array() ); } --- 346,349 ---- *************** *** 406,431 **** } ! $template->assign_block_vars( 'highest_pics_block.highest_pics.highest_col', array( 'H_TITLE' => $highestrow[$j]['pic_title'], ! 'H_POSTER' => $highest_poster, ! 'H_VIEW' => $highestrow[$j]['pic_view_count'], ! 'U_PIC' => ( $album_config['fullpic_popup'] || 1 == 2 ) ? append_sid( this_smartor_mxurl( "smartor_mode=album_pic&pic_id=" . $highestrow[$j]['pic_id'], true ) ) : append_sid( this_smartor_mxurl( "smartor_mode=album_showpage&pic_id=" . $highestrow[$j]['pic_id'], false, $smartor_page_id ) ), ! 'THUMBNAIL' => append_sid( this_smartor_mxurl( "smartor_mode=album_thumbnail&pic_id=" . $highestrow[$j]['pic_id'], true ) ), ! 'DESC' => $highestrow[$j]['pic_desc'] ! ) ! ); $rating_image = ImageRating( $highestrow[$j]['rating'] ); ! $template->assign_block_vars( 'highest_pics_block.highest_pics.highest_detail', array( 'H_TITLE' => $highestrow[$j]['pic_title'], ! 'H_POSTER' => $highest_poster, ! 'H_TIME' => create_date( $board_config['default_dateformat'], $highestrow[$j]['pic_time'], $board_config['board_timezone'] ), ! 'H_VIEW' => $highestrow[$j]['pic_view_count'], ! 'H_RATING' => ( $album_config['rate'] == 1 ) ? ( $lang['Rating'] . ': ' . $rating_image . ', ' ) : '', ! 'H_COMMENTS' => ( $album_config['comment'] == 1 ) ? ( '<a href="' . append_sid( this_smartor_mxurl( "smartor_mode=album_showpage&pic_id=" . $highestrow[$j]['pic_id'], false, $smartor_page_id ) ) . '">' . $lang['Comments'] . '</a>: ' . $highestrow[$j]['comments'] . '<br />' ) : '' ! // 'H_IP' => ($userdata['user_level'] == ADMIN) ? $lang['IP_Address'] . ': <a href="http://www.nic.com/cgi-bin/whois.cgi?query=' . decode_ip($highestrow[$j]['pic_user_ip']) . '" target="_blank">' . decode_ip($highestrow[$j]['pic_user_ip']) .'</a><br />' : '' ! ) ! ); } } --- 407,432 ---- } ! $template->assign_block_vars( 'highest_pics_block.highest_pics.highest_col', array( ! 'H_TITLE' => $highestrow[$j]['pic_title'], ! 'H_POSTER' => $highest_poster, ! 'H_VIEW' => $highestrow[$j]['pic_view_count'], ! 'U_PIC' => ( $album_config['fullpic_popup'] || 1 == 2 ) ? append_sid( this_smartor_mxurl( "smartor_mode=album_pic&pic_id=" . $highestrow[$j]['pic_id'], true ) ) : append_sid( this_smartor_mxurl( "smartor_mode=album_showpage&pic_id=" . $highestrow[$j]['pic_id'], false, $smartor_page_id ) ), ! 'THUMBNAIL' => append_sid( this_smartor_mxurl( "smartor_mode=album_thumbnail&pic_id=" . $highestrow[$j]['pic_id'], true ) ), ! 'DESC' => $highestrow[$j]['pic_desc'] ! )); $rating_image = ImageRating( $highestrow[$j]['rating'] ); ! $template->assign_block_vars( 'highest_pics_block.highest_pics.highest_detail', array( ! 'H_TITLE' => $highestrow[$j]['pic_title'], ! 'H_POSTER' => $highest_poster, ! 'H_TIME' => create_date( $board_config['default_dateformat'], $highestrow[$j]['pic_time'], $board_config['board_timezone'] ), ! 'H_VIEW' => $highestrow[$j]['pic_view_count'], ! 'H_RATING' => ( $album_config['rate'] == 1 ) ? ( $lang['Rating'] . ': ' . $rating_image . ', ' ) : '', ! 'H_COMMENTS' => ( $album_config['comment'] == 1 ) ? ( '<a href="' . append_sid( this_smartor_mxurl( "smartor_mode=album_showpage&pic_id=" . $highestrow[$j]['pic_id'], false, $smartor_page_id ) ) . '">' . $lang['Comments'] . '</a>: ' . $highestrow[$j]['comments'] . '<br />' ) : '' ! // 'H_IP' => ($userdata['user_level'] == ADMIN) ? $lang['IP_Address'] . ': <a href="http://www.nic.com/cgi-bin/whois.cgi?query=' . decode_ip($highestrow[$j]['pic_user_ip']) . '" target="_blank">' . decode_ip($highestrow[$j]['pic_user_ip']) .'</a><br />' : '' ! )); } } *************** *** 505,531 **** } ! $template->assign_block_vars( 'random_pics_block.rand_pics.rand_col', array( 'TITLE' => $randrow[$j]['pic_title'], ! 'POSTER' => $rand_poster, ! 'VIEW' => $randrow[$j]['pic_view_count'], ! 'U_PIC' => ( $album_config['fullpic_popup'] || 1 == 2 ) ? append_sid( this_smartor_mxurl( "smartor_mode=album_pic&pic_id=" . $randrow[$j]['pic_id'], true ) ) : append_sid( this_smartor_mxurl( "smartor_mode=album_showpage&pic_id=" . $randrow[$j]['pic_id'], false, $smartor_page_id ) ), ! 'THUMBNAIL' => append_sid( this_smartor_mxurl( "smartor_mode=album_thumbnail&pic_id=" . $randrow[$j]['pic_id'], true ) ), ! 'DESC' => $randrow[$j]['pic_desc'] ! ) ! ); $rating_image = ImageRating( $randrow[$j]['rating'] ); ! $template->assign_block_vars( 'random_pics_block.rand_pics.rand_detail', array( 'TITLE' => $randrow[$j]['pic_title'], ! 'POSTER' => $rand_poster, ! 'TIME' => create_date( $board_config['default_dateformat'], $randrow[$j]['pic_time'], $board_config['board_timezone'] ), ! 'VIEW' => $randrow[$j]['pic_view_count'], ! 'RATING' => ( $album_config['rate'] == 1 ) ? ( $lang['Rating'] . ': ' . $rating_image . ', ' ) : '', ! 'COMMENTS' => ( $album_config['comment'] == 1 ) ? ( '<a href="' . append_sid( this_smartor_mxurl( "smartor_mode=album_showpage&pic_id=" . $randrow[$j]['pic_id'], false, $smartor_page_id ) ) . '">' . $lang['Comments'] . '</a>: ' . $randrow[$j]['comments'] . '<br />' ) : '' ! // 'IP' => ($userdata['user_level'] == ADMIN) ? $lang['IP_Address'] . ': <a href="http://www.nic.com/cgi-bin/whois.cgi?query=' . decode_ip($randrow[$j]['pic_user_ip']) . '" target="_blank">' . decode_ip($randrow[$j]['pic_user_ip']) .'</a><br />' : '' ! ) ! ); } } --- 506,532 ---- } ! $template->assign_block_vars( 'random_pics_block.rand_pics.rand_col', array( ! 'TITLE' => $randrow[$j]['pic_title'], ! 'POSTER' => $rand_poster, ! 'VIEW' => $randrow[$j]['pic_view_count'], ! 'U_PIC' => ( $album_config['fullpic_popup'] || 1 == 2 ) ? append_sid( this_smartor_mxurl( "smartor_mode=album_pic&pic_id=" . $randrow[$j]['pic_id'], true ) ) : append_sid( this_smartor_mxurl( "smartor_mode=album_showpage&pic_id=" . $randrow[$j]['pic_id'], false, $smartor_page_id ) ), ! 'THUMBNAIL' => append_sid( this_smartor_mxurl( "smartor_mode=album_thumbnail&pic_id=" . $randrow[$j]['pic_id'], true ) ), ! 'DESC' => $randrow[$j]['pic_desc'] ! )); $rating_image = ImageRating( $randrow[$j]['rating'] ); ! $template->assign_block_vars( 'random_pics_block.rand_pics.rand_detail', array( ! 'TITLE' => $randrow[$j]['pic_title'], ! 'POSTER' => $rand_poster, ! 'TIME' => create_date( $board_config['default_dateformat'], $randrow[$j]['pic_time'], $board_config['board_timezone'] ), ! 'VIEW' => $randrow[$j]['pic_view_count'], ! 'RATING' => ( $album_config['rate'] == 1 ) ? ( $lang['Rating'] . ': ' . $rating_image . ', ' ) : '', ! 'COMMENTS' => ( $album_config['comment'] == 1 ) ? ( '<a href="' . append_sid( this_smartor_mxurl( "smartor_mode=album_showpage&pic_id=" . $randrow[$j]['pic_id'], false, $smartor_page_id ) ) . '">' . $lang['Comments'] . '</a>: ' . $randrow[$j]['comments'] . '<br />' ) : '' ! // 'IP' => ($userdata['user_level'] == ADMIN) ? $lang['IP_Address'] . ': <a href="http://www.nic.com/cgi-bin/whois.cgi?query=' . decode_ip($randrow[$j]['pic_user_ip']) . '" target="_blank">' . decode_ip($randrow[$j]['pic_user_ip']) .'</a><br />' : '' ! )); } } *************** *** 535,539 **** // No Pics Found - $template->assign_block_vars( 'random_pics_block.no_pics', array() ); } --- 536,539 ---- *************** *** 543,547 **** // No Cats Found - $template->assign_block_vars( 'random_pics_block.no_pics', array() ); } --- 543,546 ---- *************** *** 560,600 **** } ! $template->set_filenames( array( 'body' => 'album_lists.tpl' ) ! ); ! $template->assign_vars( array( 'L_INDEX' => '<<', ! 'U_INDEX' => append_sid( $mx_root_path . "index." . $phpEx ), ! 'L_ALBUM' => $lang['Album'], ! 'U_ALBUM' => append_sid( this_smartor_mxurl() ), ! 'L_CATEGORY' => $lang['Category'], ! 'L_PICS' => $lang['Pics'], ! 'L_LAST_PIC' => $lang['Last_Pic'], ! 'L_INDEX' => '<<', ! 'U_INDEX' => append_sid( $mx_root_path . "index." . $phpEx ), ! 'L_ALBUM' => $lang['Album'], ! 'U_ALBUM' => append_sid( this_smartor_mxurl() ), ! 'U_YOUR_PERSONAL_GALLERY' => append_sid( this_smartor_mxurl( "smartor_mode=album_personal&user_id=" . $userdata['user_id'] ) ), ! 'L_YOUR_PERSONAL_GALLERY' => $lang['Your_Personal_Gallery'], ! 'U_USERS_PERSONAL_GALLERIES' => append_sid( this_smartor_mxurl( "smartor_mode=album_personal_index" ) ), ! 'L_USERS_PERSONAL_GALLERIES' => $lang['Users_Personal_Galleries'], ! 'S_COLS' => $album_sp_config['img_cols'], ! 'S_COL_WIDTH' => ( 100 / $album_sp_config['img_cols'] ) . '%', ! 'TARGET_BLANK' => ( $album_config['fullpic_popup'] ) ? 'target="_blank"' : '', ! 'L_RECENT_PUBLIC_PICS' => $lang['Recent_Public_Pics'], ! 'L_TOPRATED_PUBLIC_PICS' => $lang['Toprated_Public_Pics'], ! 'L_RANDOM_PUBLIC_PICS' => $lang['Random_Public_Pics'], ! 'L_MOST_PUBLIC_PICS' => $lang['Most_Public_Pics'], ! 'L_NO_PICS' => $lang['No_Pics'], ! 'L_PIC_TITLE' => $lang['Pic_Title'], ! 'L_VIEW' => $lang['View'], ! 'L_POSTER' => $lang['Poster'], ! 'L_POSTED' => $lang['Pic_Posted'], ! 'L_PUBLIC_CATS' => $lang['Public_Categories'] ) ! ); // Generate the page --- 559,599 ---- } ! $template->set_filenames( array( 'body' => 'album_lists.tpl' ) ); ! $template->assign_vars( array( ! 'L_INDEX' => '<<', ! 'U_INDEX' => append_sid( $mx_root_path . "index." . $phpEx ), ! 'L_ALBUM' => $lang['Album'], ! 'U_ALBUM' => append_sid( this_smartor_mxurl() ), ! 'L_CATEGORY' => $lang['Category'], ! 'L_PICS' => $lang['Pics'], ! 'L_LAST_PIC' => $lang['Last_Pic'], ! 'L_INDEX' => '<<', ! 'U_INDEX' => append_sid( $mx_root_path . "index." . $phpEx ), ! 'L_ALBUM' => $lang['Album'], ! 'U_ALBUM' => append_sid( this_smartor_mxurl() ), ! 'U_YOUR_PERSONAL_GALLERY' => append_sid( this_smartor_mxurl( "smartor_mode=album_personal&user_id=" . $userdata['user_id'] ) ), ! 'L_YOUR_PERSONAL_GALLERY' => $lang['Your_Personal_Gallery'], ! 'U_USERS_PERSONAL_GALLERIES' => append_sid( this_smartor_mxurl( "smartor_mode=album_personal_index" ) ), ! 'L_USERS_PERSONAL_GALLERIES' => $lang['Users_Personal_Galleries'], ! 'S_COLS' => $album_sp_config['img_cols'], ! 'S_COL_WIDTH' => ( 100 / $album_sp_config['img_cols'] ) . '%', ! 'TARGET_BLANK' => ( $album_config['fullpic_popup'] ) ? 'target="_blank"' : '', ! 'L_RECENT_PUBLIC_PICS' => $lang['Recent_Public_Pics'], ! 'L_TOPRATED_PUBLIC_PICS' => $lang['Toprated_Public_Pics'], ! 'L_RANDOM_PUBLIC_PICS' => $lang['Random_Public_Pics'], ! 'L_MOST_PUBLIC_PICS' => $lang['Most_Public_Pics'], ! 'L_NO_PICS' => $lang['No_Pics'], ! 'L_PIC_TITLE' => $lang['Pic_Title'], ! 'L_VIEW' => $lang['View'], ! 'L_POSTER' => $lang['Poster'], ! 'L_POSTED' => $lang['Pic_Posted'], ! 'L_PUBLIC_CATS' => $lang['Public_Categories'] ) ! ); // Generate the page *************** *** 606,612 **** include( $mx_root_path . 'includes/page_tail.' . $phpEx ); } - // +--------------------------------------------------------+ - // | Powered by Photo Album 2.x.x (c) 2002-2003 Smartor | - // | with Volodymyr (CLowN) Skoryk's Service Pack 1 © 2003 | - // +--------------------------------------------------------+ ?> \ No newline at end of file --- 605,607 ---- Index: db_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/db_install.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** db_install.php 2 May 2006 23:29:32 -0000 1.11 --- db_install.php 30 Jun 2006 21:10:55 -0000 1.12 *************** *** 30,34 **** } ! $mx_module_version = '2.0.0'; $mx_module_copy = 'Original phpBB <i>Album</i> MOD by <a href="http://smartor.is-root.com" target="_blank">Smartor & Clown</a> :: Adapted for mxBB by <a href="http://www.mxbb-portal.com" target="_blank">Jon</a>'; --- 30,34 ---- } ! $mx_module_version = '2.8.0'; $mx_module_copy = 'Original phpBB <i>Album</i> MOD by <a href="http://smartor.is-root.com" target="_blank">Smartor & Clown</a> :: Adapted for mxBB by <a href="http://www.mxbb-portal.com" target="_blank">Jon</a>'; Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/db_upgrade.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** db_upgrade.php 2 May 2006 23:29:32 -0000 1.11 --- db_upgrade.php 30 Jun 2006 21:10:55 -0000 1.12 *************** *** 30,34 **** } ! $mx_module_version = '2.0.0'; $mx_module_copy = 'Original phpBB <i>Album</i> MOD by <a href="http://smartor.is-root.com" target="_blank">Smartor & Clown</a> :: Adapted for mxBB by <a href="http://www.mxbb-portal.com" target="_blank">Jon</a>'; --- 30,34 ---- } ! $mx_module_version = '2.8.0'; $mx_module_copy = 'Original phpBB <i>Album</i> MOD by <a href="http://smartor.is-root.com" target="_blank">Smartor & Clown</a> :: Adapted for mxBB by <a href="http://www.mxbb-portal.com" target="_blank">Jon</a>'; |
|
From: Jon O. <jon...@us...> - 2006-06-30 21:11:01
|
Update of /cvsroot/mxbb/mx_smartor/album_mod In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv9308/modules/mx_smartor/album_mod Modified Files: album_common.php album_constants.php album_functions.php album_hierarchy_auth.php album_hierarchy_debug.php album_hierarchy_functions.php album_hierarchy_sql.php clown_album_functions.php Log Message: This module is really messy. I have done some general code cleanup and security scrutiny. Still, much to do... Index: album_constants.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/album_mod/album_constants.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** album_constants.php 5 Apr 2006 23:03:48 -0000 1.8 --- album_constants.php 30 Jun 2006 21:10:55 -0000 1.9 *************** *** 9,12 **** --- 9,16 ---- */ + // +------------------------------------------------------+ + // | Powered by Photo Album 2.x.x (c) 2002-2003 Smartor | + // +------------------------------------------------------+ + if ( !defined( 'IN_PORTAL' ) ) { *************** *** 98,102 **** include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ); include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_hierarchy_album.' . $phpEx ); ! } if (is_object($mx_page)) --- 102,106 ---- include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ); include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_hierarchy_album.' . $phpEx ); ! } if (is_object($mx_page)) *************** *** 110,116 **** // ------------------------------------------------------------------------- $mx_user->extend(MX_LANG_NONE); ! $mx_page->add_copyright( 'mxBB Smartor Album Module' ); } - ?> \ No newline at end of file --- 114,119 ---- // ------------------------------------------------------------------------- $mx_user->extend(MX_LANG_NONE); ! $mx_page->add_copyright( 'mxBB Smartor Album Module' ); } ?> \ No newline at end of file Index: album_hierarchy_auth.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/album_mod/album_hierarchy_auth.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** album_hierarchy_auth.php 5 Apr 2006 23:03:48 -0000 1.3 --- album_hierarchy_auth.php 30 Jun 2006 21:10:55 -0000 1.4 *************** *** 8,17 **** * */ ! ! if ( !defined( 'IN_PHPBB' ) ) { die( 'Hacking attempt' ); } ! // Album Data Structur description // indexes : --- 8,17 ---- * */ ! ! if ( !defined( 'IN_PORTAL' ) ) { die( 'Hacking attempt' ); } ! // Album Data Structur description // indexes : *************** *** 32,36 **** function album_create_user_auth( $user_id ) { ! global $album_data; // read the user auth if requiered if ( empty ( $album_data['auth'] ) ) --- 32,36 ---- function album_create_user_auth( $user_id ) { ! global $album_data; // read the user auth if requiered if ( empty ( $album_data['auth'] ) ) *************** *** 41,45 **** { $cat = $album_data['data'][$idx]; ! $cat_id = $cat['cat_id']; // check all access rights for current user // $album_user_access = album_user_access($cat_id, $cat, 1, 1, 1, 1, 1, 1); --- 41,45 ---- { $cat = $album_data['data'][$idx]; ! $cat_id = $cat['cat_id']; // check all access rights for current user // $album_user_access = album_user_access($cat_id, $cat, 1, 1, 1, 1, 1, 1); *************** *** 80,84 **** $keys = array (); ! $last_i = -1; // add the level if ( ( $max < ALBUM_ROOT_CATEGORY + 1 ) || ( $level < $max ) || --- 80,84 ---- $keys = array (); ! $last_i = -1; // add the level if ( ( $max < ALBUM_ROOT_CATEGORY + 1 ) || ( $level < $max ) || *************** *** 86,92 **** { if ( $cur_cat_id == ALBUM_ROOT_CATEGORY || album_check_permission( $album_data['auth'][$cur_cat_id], $auth_key ) || $all ) ! { // if child of cat, align the level on the parent one ! $orig_level = $level; // store this level $last_i ++; --- 86,92 ---- { if ( $cur_cat_id == ALBUM_ROOT_CATEGORY || album_check_permission( $album_data['auth'][$cur_cat_id], $auth_key ) || $all ) ! { // if child of cat, align the level on the parent one ! $orig_level = $level; // store this level $last_i ++; *************** *** 96,105 **** $keys['real_level'][$last_i] = $orig_level; $keys['level'][$last_i] = $level; ! $keys['idx'][$last_i] = ( isset ( $album_data['keys'][$cur_cat_id] ) ? $album_data['keys'][$cur_cat_id] : ALBUM_ROOT_CATEGORY ); // get sub-levels for ( $i = 0; $i < count( $album_data['sub'][$cur_cat_id] ); $i ++ ) { $subkeys = array (); ! $subkeys = album_get_auth_keys( $album_data['sub'][$cur_cat_id][$i], $auth_key, $all, $orig_level + 1, $max ); // add sub-levels for ( $j = 0; $j < count( $subkeys['id'] ); $j ++ ) --- 96,105 ---- $keys['real_level'][$last_i] = $orig_level; $keys['level'][$last_i] = $level; ! $keys['idx'][$last_i] = ( isset ( $album_data['keys'][$cur_cat_id] ) ? $album_data['keys'][$cur_cat_id] : ALBUM_ROOT_CATEGORY ); // get sub-levels for ( $i = 0; $i < count( $album_data['sub'][$cur_cat_id] ); $i ++ ) { $subkeys = array (); ! $subkeys = album_get_auth_keys( $album_data['sub'][$cur_cat_id][$i], $auth_key, $all, $orig_level + 1, $max ); // add sub-levels for ( $j = 0; $j < count( $subkeys['id'] ); $j ++ ) *************** *** 149,153 **** $comment_check = ( int ) checkFlag( $permission_checks, ALBUM_AUTH_COMMENT ); $edit_check = ( int ) checkFlag( $permission_checks, ALBUM_AUTH_EDIT ); ! $delete_check = ( int ) checkFlag( $permission_checks, ALBUM_AUTH_DELETE ); // ------------------------------------------------------------------------ // if we are checkinfg the personal gallery cateogry management permission --- 149,153 ---- $comment_check = ( int ) checkFlag( $permission_checks, ALBUM_AUTH_COMMENT ); $edit_check = ( int ) checkFlag( $permission_checks, ALBUM_AUTH_EDIT ); ! $delete_check = ( int ) checkFlag( $permission_checks, ALBUM_AUTH_DELETE ); // ------------------------------------------------------------------------ // if we are checkinfg the personal gallery cateogry management permission *************** *** 158,162 **** $view_check = 1; $upload_check = 1; ! } // ------------------------------------------------------------------------ // did we pass some category data or not ? --- 158,162 ---- $view_check = 1; $upload_check = 1; ! } // ------------------------------------------------------------------------ // did we pass some category data or not ? *************** *** 171,180 **** { mx_message_die( GENERAL_ERROR, 'Could not query Album Category information for authentication' , '' , __LINE__, __FILE__, $sql ); ! } // ------------------------------------------------------------------------ // did we find the category or not ? // ------------------------------------------------------------------------ if ( $db->sql_numrows( $result ) == 0 ) ! { // ------------------------------------------------------------------------ // is it a personal gallery ? --- 171,180 ---- { mx_message_die( GENERAL_ERROR, 'Could not query Album Category information for authentication' , '' , __LINE__, __FILE__, $sql ); ! } // ------------------------------------------------------------------------ // did we find the category or not ? // ------------------------------------------------------------------------ if ( $db->sql_numrows( $result ) == 0 ) ! { // ------------------------------------------------------------------------ // is it a personal gallery ? *************** *** 197,201 **** else { ! $thiscat = $catdata; // ------------------------------------------------------------------------ // it is the root category of a non existing personal gallery --- 197,201 ---- else { ! $thiscat = $catdata; // ------------------------------------------------------------------------ // it is the root category of a non existing personal gallery *************** *** 205,209 **** $album_permission = personal_gallery_access( 1, 1 ); //$view_check, $upload_check); } ! } // ------------------------------------------------------------------------ // if we set our $thiscat and not our permission array then we must --- 205,209 ---- $album_permission = personal_gallery_access( 1, 1 ); //$view_check, $upload_check); } ! } // ------------------------------------------------------------------------ // if we set our $thiscat and not our permission array then we must *************** *** 223,227 **** { album_debug( 'album_permissions : after album_user_access : %s(id=%d), $album_permission = %s', $thiscat['cat_title'], $thiscat['cat_id'], $album_permission ); ! } // ------------------------------------------------------------------------ // as default nobody can manage the galleries (personal galleries that is) --- 223,227 ---- { album_debug( 'album_permissions : after album_user_access : %s(id=%d), $album_permission = %s', $thiscat['cat_title'], $thiscat['cat_id'], $album_permission ); ! } // ------------------------------------------------------------------------ // as default nobody can manage the galleries (personal galleries that is) *************** *** 229,233 **** // to manage the categories in the public galleries, only in the ACP // ------------------------------------------------------------------------ ! $album_permission['manage'] = 0; // ------------------------------------------------------------------------ // $album_permission should now hold our permission stuff for either a personal --- 229,233 ---- // to manage the categories in the public galleries, only in the ACP // ------------------------------------------------------------------------ ! $album_permission['manage'] = 0; // ------------------------------------------------------------------------ // $album_permission should now hold our permission stuff for either a personal *************** *** 244,253 **** switch ( $album_config['personal_gallery'] ) { ! case ALBUM_USER: // ------------------------------------------------------------------------ // are we checking a non existing personal gallery ? // ------------------------------------------------------------------------ if ( empty( $thiscat ) || $thiscat['cat_id'] == 0 || $cat_id == ALBUM_ROOT_CATEGORY ) ! { // ------------------------------------------------------------------------ // if the admin has set the creation of personal galleries to 'registered users' --- 244,253 ---- switch ( $album_config['personal_gallery'] ) { ! case ALBUM_USER: // ------------------------------------------------------------------------ // are we checking a non existing personal gallery ? // ------------------------------------------------------------------------ if ( empty( $thiscat ) || $thiscat['cat_id'] == 0 || $cat_id == ALBUM_ROOT_CATEGORY ) ! { // ------------------------------------------------------------------------ // if the admin has set the creation of personal galleries to 'registered users' *************** *** 257,261 **** { $album_permission['upload'] = 0; ! } // ------------------------------------------------------------------------ // set the other permissions to the same value of the upload --- 257,261 ---- { $album_permission['upload'] = 0; ! } // ------------------------------------------------------------------------ // set the other permissions to the same value of the upload *************** *** 268,272 **** } break; ! case ALBUM_ADMIN: // ------------------------------------------------------------------------ // Only admins can upload images to users personal gallery --- 268,272 ---- } break; ! case ALBUM_ADMIN: // ------------------------------------------------------------------------ // Only admins can upload images to users personal gallery *************** *** 277,283 **** } break; ! default: // NOTHING; ! } // ------------------------------------------------------------------------ // we need to check the upload permission again to full fill all the --- 277,283 ---- } break; ! default: // NOTHING; ! } // ------------------------------------------------------------------------ // we need to check the upload permission again to full fill all the *************** *** 286,290 **** switch ( $thiscat['cat_upload_level'] ) { ! case ALBUM_PRIVATE: // ------------------------------------------------------------------------ // make sure the owner of the personal gallery can upload to his personal gallery --- 286,290 ---- switch ( $thiscat['cat_upload_level'] ) { ! case ALBUM_PRIVATE: // ------------------------------------------------------------------------ // make sure the owner of the personal gallery can upload to his personal gallery *************** *** 304,310 **** } break; ! default: // NOTHING; ! } // ------------------------------------------------------------------------ // Check if we can moderate the personal gallery AND also check if we can --- 304,310 ---- } break; ! default: // NOTHING; ! } // ------------------------------------------------------------------------ // Check if we can moderate the personal gallery AND also check if we can *************** *** 321,325 **** $album_permission['manage'] = 1; } ! } // ------------------------------------------------------------------------ // If $moderator_check was called and this user is a MODERATOR the user --- 321,325 ---- $album_permission['manage'] = 1; } ! } // ------------------------------------------------------------------------ // If $moderator_check was called and this user is a MODERATOR the user *************** *** 358,365 **** // ------------------------------------------------------------------------ function album_check_permission( $auth_data, $access_check, $or_check = false ) ! { // NOTE : ALBUM_AUTH_CREATE_PERSONAL and ALBUM_AUTH_UPLOAD are synomous for each other // and thus only the ALBUM_AUTH_UPLOAD is present here ! $access_type = array ( ALBUM_AUTH_VIEW => 'view', ALBUM_AUTH_UPLOAD => 'upload', --- 358,365 ---- // ------------------------------------------------------------------------ function album_check_permission( $auth_data, $access_check, $or_check = false ) ! { // NOTE : ALBUM_AUTH_CREATE_PERSONAL and ALBUM_AUTH_UPLOAD are synomous for each other // and thus only the ALBUM_AUTH_UPLOAD is present here ! $access_type = array ( ALBUM_AUTH_VIEW => 'view', ALBUM_AUTH_UPLOAD => 'upload', *************** *** 369,373 **** ALBUM_AUTH_DELETE => 'delete', ALBUM_AUTH_MODERATOR => 'moderator', ! ALBUM_AUTH_MANAGE_PERSONAL_CATEGORIES => 'manage' ); --- 369,373 ---- ALBUM_AUTH_DELETE => 'delete', ALBUM_AUTH_MODERATOR => 'moderator', ! ALBUM_AUTH_MANAGE_PERSONAL_CATEGORIES => 'manage' ); *************** *** 379,386 **** '5' => ALBUM_AUTH_DELETE, '6' => ALBUM_AUTH_MODERATOR, ! '7' => ALBUM_AUTH_MANAGE_PERSONAL_CATEGORIES ); ! $access_to_check = array (); // build up the array of checks to perform for ( $idx = 0; $idx < count( $access_index ); $idx ++ ) --- 379,386 ---- '5' => ALBUM_AUTH_DELETE, '6' => ALBUM_AUTH_MODERATOR, ! '7' => ALBUM_AUTH_MANAGE_PERSONAL_CATEGORIES ); ! $access_to_check = array (); // build up the array of checks to perform for ( $idx = 0; $idx < count( $access_index ); $idx ++ ) *************** *** 392,404 **** } ! $result = 0; // now check every check in the acess_check array for ( $idx = 0; $idx < count( $access_to_check ); $idx ++ ) ! { // $access_string should hold strings like 'view', 'upload' and so on $access_string = $access_type[$access_to_check[$idx]]; if ( $auth_data[$access_string] == 1 ) { ! $result += $access_to_check[$idx]; // simulate that all check got verified successfully if ( $or_check == true ) --- 392,404 ---- } ! $result = 0; // now check every check in the acess_check array for ( $idx = 0; $idx < count( $access_to_check ); $idx ++ ) ! { // $access_string should hold strings like 'view', 'upload' and so on $access_string = $access_type[$access_to_check[$idx]]; if ( $auth_data[$access_string] == 1 ) { ! $result += $access_to_check[$idx]; // simulate that all check got verified successfully if ( $or_check == true ) *************** *** 408,412 **** } } ! } // $result now holds to total sum of check // which should be qual to the value of --- 408,412 ---- } } ! } // $result now holds to total sum of check // which should be qual to the value of *************** *** 423,427 **** if ( $cat_id != ALBUM_ROOT_CATEGORY && ( !isset ( $album_data ) || !is_array( $album_data ) || count( $album_data ) == 0 ) ) ! { // $auth_data = //album_user_access($cat_id, 0, 1, 1, 1, 1, 1, 1); $auth_data = album_permissions( 0, $cat_id, 0, ALBUM_AUTH_ALL ); --- 423,427 ---- if ( $cat_id != ALBUM_ROOT_CATEGORY && ( !isset ( $album_data ) || !is_array( $album_data ) || count( $album_data ) == 0 ) ) ! { // $auth_data = //album_user_access($cat_id, 0, 1, 1, 1, 1, 1, 1); $auth_data = album_permissions( 0, $cat_id, 0, ALBUM_AUTH_ALL ); *************** *** 471,475 **** $auth_list .= ( $auth_data[$auth_key[$i]] == 1 ) ? $lang['Album_' . $auth_key[$i] . '_can'] : $lang['Album_' . $auth_key[$i] . '_cannot']; $auth_list .= '<br />'; ! } // ------------------------------------------------------------------------ // add Moderator Control Panel here --- 471,475 ---- $auth_list .= ( $auth_data[$auth_key[$i]] == 1 ) ? $lang['Album_' . $auth_key[$i] . '_can'] : $lang['Album_' . $auth_key[$i] . '_cannot']; $auth_list .= '<br />'; ! } // ------------------------------------------------------------------------ // add Moderator Control Panel here *************** *** 479,483 **** $auth_list .= sprintf( $lang['Album_moderate_can'], '<a href="' . append_sid( album_append_uid( this_smartor_mxurl( "smartor_mode=album_modcp&cat_id=$cat_id" ) ) ) . '">', '</a>' ); $auth_list .= '<br />'; ! } // ------------------------------------------------------------------------ // if admin has allowed user to manage his sub categories AND also have --- 479,483 ---- $auth_list .= sprintf( $lang['Album_moderate_can'], '<a href="' . append_sid( album_append_uid( this_smartor_mxurl( "smartor_mode=album_modcp&cat_id=$cat_id" ) ) ) . '">', '</a>' ); $auth_list .= '<br />'; ! } // ------------------------------------------------------------------------ // if admin has allowed user to manage his sub categories AND also have *************** *** 497,500 **** return $auth_list; } - ?> \ No newline at end of file --- 497,499 ---- Index: album_hierarchy_sql.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/album_mod/album_hierarchy_sql.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** album_hierarchy_sql.php 5 Apr 2006 23:03:48 -0000 1.4 --- album_hierarchy_sql.php 30 Jun 2006 21:10:55 -0000 1.5 *************** *** 8,13 **** * */ ! ! if ( !defined( 'IN_PHPBB' ) ) { die( 'Hacking attempt' ); --- 8,13 ---- * */ ! [...1023 lines suppressed...] $template->assign_block_vars( 'random_pics_block', array() ); $template->assign_block_vars( 'random_pics_block.no_pics', array() ); } } - ?> \ No newline at end of file --- 1453,1463 ---- if ( empty( $cats ) ) ! { ! // // No Cats Found ! // $template->assign_block_vars( 'random_pics_block', array() ); $template->assign_block_vars( 'random_pics_block.no_pics', array() ); } } ?> \ No newline at end of file Index: album_functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/album_mod/album_functions.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** album_functions.php 5 Apr 2006 23:03:48 -0000 1.5 --- album_functions.php 30 Jun 2006 21:10:55 -0000 1.6 *************** *** 8,17 **** * */ ! // ------------------------------------ // All common functions are here! // ------------------------------------ // You cannot call this file directly from your browser ! if ( !defined( 'IN_PORTAL' ) ) { --- 8,21 ---- * */ ! ! // +------------------------------------------------------+ ! // | Powered by Photo Album 2.x.x (c) 2002-2003 Smartor | ! // +------------------------------------------------------+ ! // ------------------------------------ // All common functions are here! // ------------------------------------ // You cannot call this file directly from your browser ! // if ( !defined( 'IN_PORTAL' ) ) { *************** *** 27,42 **** // ... but $passed_auth will make it worked very much faster (because this function is often // called in a loop) ! function album_user_access( $cat_id, $passed_auth = 0, $view_check, $upload_check, $rate_check, $comment_check, $edit_check, $delete_check ) { ! global $db, $album_config, $userdata; // -------------------------------- // Force to check moderator status // -------------------------------- ! $moderator_check = 1; // -------------------------------- // Here the array which this function would return. Now we initiate it! // -------------------------------- ! $album_user_access = array( 'view' => 0, 'upload' => 0, 'rate' => 0, --- 31,47 ---- // ... but $passed_auth will make it worked very much faster (because this function is often // called in a loop) ! // function album_user_access( $cat_id, $passed_auth = 0, $view_check, $upload_check, $rate_check, $comment_check, $edit_check, $delete_check ) { ! global $db, $album_config, $userdata; // -------------------------------- // Force to check moderator status // -------------------------------- ! $moderator_check = 1; // -------------------------------- // Here the array which this function would return. Now we initiate it! // -------------------------------- ! $album_user_access = array( ! 'view' => 0, 'upload' => 0, 'rate' => 0, *************** *** 44,53 **** 'edit' => 0, 'delete' => 0, ! 'moderator' => 0 ! ); ! $album_user_access_keys = array_keys( $album_user_access ); ! // END initiation $album_user_access ! // -------------------------------- // Check $cat_id --- 49,58 ---- 'edit' => 0, 'delete' => 0, ! 'moderator' => 0 ! ); ! $album_user_access_keys = array_keys( $album_user_access ); ! // END initiation $album_user_access ! // -------------------------------- // Check $cat_id *************** *** 84,96 **** } else if ($cat_id < 0) ! */ ! if ( $cat_id <= ALBUM_ROOT_CATEGORY && !is_array( $passed_auth ) ) ! // --- Album Category Hierarchy : end ! { ! mx_message_die( GENERAL_ERROR, 'Bad cat_id arguments for function album_user_access()' ); ! } ! // END check $cat_id ! // -------------------------------- // If the current user is an ADMIN (ALBUM_ADMIN == ADMIN) --- 89,102 ---- } else if ($cat_id < 0) ! */ ! ! if ( $cat_id <= ALBUM_ROOT_CATEGORY && !is_array( $passed_auth ) ) ! // --- Album Category Hierarchy : end ! { ! mx_message_die( GENERAL_ERROR, 'Bad cat_id arguments for function album_user_access()' ); ! } ! // END check $cat_id ! // -------------------------------- // If the current user is an ADMIN (ALBUM_ADMIN == ADMIN) *************** *** 101,113 **** { $album_user_access[$album_user_access_keys[$i]] = 1; // Authorised All ! } ! // Function EXIT here - return $album_user_access; ! } ! // END check ADMIN ! // -------------------------------- // if this is a GUEST, we will ignore some checking --- 107,118 ---- { $album_user_access[$album_user_access_keys[$i]] = 1; // Authorised All ! } ! // Function EXIT here return $album_user_access; ! } ! // END check ADMIN ! // -------------------------------- // if this is a GUEST, we will ignore some checking *************** *** 118,125 **** $delete_check = 0; $moderator_check = 0; ! } ! // END check GUEST ! // -------------------------------- // check if RATE or COMMENT are turned off by Album Config, so we can ignore them --- 123,130 ---- $delete_check = 0; $moderator_check = 0; ! } ! // END check GUEST ! // -------------------------------- // check if RATE or COMMENT are turned off by Album Config, so we can ignore them *************** *** 132,139 **** { $comment_check = 0; ! } ! // END Check RATE & COMMENT ! // -------------------------------- // The array that list all access type this function will look for (except MODERATOR) --- 137,144 ---- { $comment_check = 0; ! } ! // END Check RATE & COMMENT ! // -------------------------------- // The array that list all access type this function will look for (except MODERATOR) *************** *** 169,189 **** { $access_type[] = 'delete'; ! } ! // END generating array $access_type ! // -------------------------------- // If everything is empty // -------------------------------- if ( empty( $access_type ) and ( !$moderator_check ) ) ! { ! // Function EXIT here ! return $album_user_access; ! } ! // END check empty ! // -------------------------------- // Generate the SQL query based on $access_type and $moderator_check --- 174,194 ---- { $access_type[] = 'delete'; ! } ! // END generating array $access_type ! // -------------------------------- // If everything is empty // -------------------------------- if ( empty( $access_type ) and ( !$moderator_check ) ) ! { ! // // Function EXIT here ! // return $album_user_access; ! } ! // END check empty ! // -------------------------------- // Generate the SQL query based on $access_type and $moderator_check *************** *** 208,215 **** $sql .= " FROM " . ALBUM_CAT_TABLE . " ! WHERE cat_id = '$cat_id'"; ! // END SQL query generating ! // -------------------------------- // Query the $sql then Fetchrow if $passed_auth == 0 --- 213,220 ---- $sql .= " FROM " . ALBUM_CAT_TABLE . " ! WHERE cat_id = '$cat_id'"; ! // END SQL query generating ! // -------------------------------- // Query the $sql then Fetchrow if $passed_auth == 0 *************** *** 227,234 **** { $thiscat = $passed_auth; ! } ! // END Query and Fetchrow ! // -------------------------------- // Maybe the access level is not PRIVATE or the groups list is empty --- 232,239 ---- { $thiscat = $passed_auth; ! } ! // END Query and Fetchrow ! // -------------------------------- // Maybe the access level is not PRIVATE or the groups list is empty *************** *** 258,266 **** break; ! case ALBUM_MOD: // this will be checked later break; ! case ALBUM_ADMIN: // ADMIN already returned before at the checking code // at the top of this function. So this user cannot be authorised --- 263,271 ---- break; ! case ALBUM_MOD: // this will be checked later break; ! case ALBUM_ADMIN: // ADMIN already returned before at the checking code // at the top of this function. So this user cannot be authorised *************** *** 271,294 **** $album_user_access[$access_type[$i]] = 0; } ! } ! // END Check Access Level ! // -------------------------------- // We can return now if $groups_access is empty AND $moderator_check == 0 // -------------------------------- if ( ( $moderator_check == 1 ) and ( $thiscat['cat_moderator_groups'] != '' ) ) ! { // We can merge them now $groups_access[] = 'moderator'; } if ( empty( $groups_access ) ) ! { ! // Function EXIT here ! return $album_user_access; ! } // -------------------------------- // Now we have the list of usergroups have PRIVATE/MODERATOR access --- 276,302 ---- $album_user_access[$access_type[$i]] = 0; } ! } ! // END Check Access Level ! // -------------------------------- // We can return now if $groups_access is empty AND $moderator_check == 0 // -------------------------------- if ( ( $moderator_check == 1 ) and ( $thiscat['cat_moderator_groups'] != '' ) ) ! { ! // // We can merge them now + // $groups_access[] = 'moderator'; } if ( empty( $groups_access ) ) ! { ! // // Function EXIT here ! // return $album_user_access; ! } ! // -------------------------------- // Now we have the list of usergroups have PRIVATE/MODERATOR access *************** *** 313,320 **** $album_user_access[$groups_access[$i]] = 1; } ! } ! // END check PRIVATE/MODERATOR groups ! // -------------------------------- // If $moderator_check was called and this user is a MODERATOR he --- 321,328 ---- $album_user_access[$groups_access[$i]] = 1; } ! } ! // END check PRIVATE/MODERATOR groups ! // -------------------------------- // If $moderator_check was called and this user is a MODERATOR he *************** *** 330,337 **** } } ! } ! // END Moderator ! // -------------------------------- // Return result... --- 338,345 ---- } } ! } ! // END Moderator ! // -------------------------------- // Return result... *************** *** 347,355 **** function personal_gallery_access( $check_view, $check_upload ) { ! global $db, $userdata, $album_config; // This array will contain the result ! $personal_gallery_access = array( 'view' => 0, ! 'upload' => 0, ! ); // -------------------------------- // Who can create personal gallery? --- 355,364 ---- function personal_gallery_access( $check_view, $check_upload ) { ! global $db, $userdata, $album_config; // This array will contain the result ! $personal_gallery_access = array( ! 'view' => 0, ! 'upload' => 0, ! ); // -------------------------------- // Who can create personal gallery? *************** *** 396,400 **** break; } ! } // -------------------------------- // Who can view other personal gallery? --- 405,409 ---- break; } ! } // -------------------------------- // Who can view other personal gallery? *************** *** 449,462 **** function init_personal_gallery_cat( $user_id = 0 ) ! { // --- Album Category Hierarchy : begin // --- version : 1.1.0beta6 // --- added : ,$album_config ! global $userdata, $db, $lang, $album_config; // --- Album Category Hierarchy : end if ( $user_id == 0 ) { $user_id = $userdata['user_id']; ! } // --- Album Category Heirarchy : begin // --- version : 1.1.0beta6 --- 458,471 ---- function init_personal_gallery_cat( $user_id = 0 ) ! { // --- Album Category Hierarchy : begin // --- version : 1.1.0beta6 // --- added : ,$album_config ! global $userdata, $db, $lang, $album_config; // --- Album Category Hierarchy : end if ( $user_id == 0 ) { $user_id = $userdata['user_id']; ! } // --- Album Category Heirarchy : begin // --- version : 1.1.0beta6 *************** *** 470,474 **** FROM " . ALBUM_TABLE . ", " . ALBUM_CAT_TABLE . " WHERE pic_cat_id = cat_id ! AND cat_user_id = " . $user_id; // --- Album Category Heirarchy : end if ( !( $result = $db->sql_query( $sql ) ) ) --- 479,483 ---- FROM " . ALBUM_TABLE . ", " . ALBUM_CAT_TABLE . " WHERE pic_cat_id = cat_id ! AND cat_user_id = " . $user_id; // --- Album Category Heirarchy : end if ( !( $result = $db->sql_query( $sql ) ) ) *************** *** 500,512 **** } ! $thiscat = array( 'cat_id' => 0, 'cat_title' => sprintf( $lang['Personal_Gallery_Of_User'], $username ), 'cat_desc' => '', 'cat_order' => 0, ! 'count' => $count, // --- Album Category Heirarchy : begin // --- version : 1.1.0beta6 'personal' => 1, ! 'cat_user_id' => $user_id, // --- Album Category Heirarchy : end 'cat_view_level' => $album_config['personal_gallery_view'], --- 509,522 ---- } ! $thiscat = array( ! 'cat_id' => 0, 'cat_title' => sprintf( $lang['Personal_Gallery_Of_User'], $username ), 'cat_desc' => '', 'cat_order' => 0, ! 'count' => $count, // --- Album Category Heirarchy : begin // --- version : 1.1.0beta6 'personal' => 1, ! 'cat_user_id' => $user_id, // --- Album Category Heirarchy : end 'cat_view_level' => $album_config['personal_gallery_view'], *************** *** 524,529 **** 'cat_delete_groups' => $album_config['personal_gallery_private'], 'cat_moderator_groups' => '', ! 'cat_approval' => 0 ! ); return $thiscat; --- 534,539 ---- 'cat_delete_groups' => $album_config['personal_gallery_private'], 'cat_moderator_groups' => '', ! 'cat_approval' => 0 ! ); return $thiscat; *************** *** 570,576 **** return $mxurl; } - // +------------------------------------------------------+ - // | Powered by Photo Album 2.x.x (c) 2002-2003 Smartor | - // +------------------------------------------------------+ - ?> \ No newline at end of file --- 580,582 ---- Index: album_common.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/album_mod/album_common.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** album_common.php 5 Apr 2006 23:03:48 -0000 1.13 --- album_common.php 30 Jun 2006 21:10:55 -0000 1.14 *************** *** 21,26 **** include_once( $album_root_path . 'album_constants.' . $phpEx ); // Get Album Config ! $sql = "SELECT * FROM " . ALBUM_CONFIG_TABLE; --- 21,27 ---- include_once( $album_root_path . 'album_constants.' . $phpEx ); + // // Get Album Config ! // $sql = "SELECT * FROM " . ALBUM_CONFIG_TABLE; *************** *** 73,87 **** // Set ALBUM Version ! $template->assign_vars( array( 'ALBUM_VERSION' => '2' . $album_config['album_version'], ! 'ALBUM_VERSION_INFO' => 'This script (Smartor Album v. 2.0.0 :: mxBB Portal Module 2004, with Volodymyr (CLowN) Skoryks SP1 addon, IdleVoid\'s Album Category Hierarchy mod) is modified by <a href="http://www.mx-system.com">mxBB Team</a> ', ! 'PAFILEDB_SEARCH_ACTION' => append_sid( album_append_uid( this_smartor_mxurl() ) ), ! 'PAFILEDB_SEARCH_HIDDEN' => '<input type="hidden" name="smartor_mode" value="album_search"><input type="hidden" name="page" value="' . $page_id . '">', ! 'L_INDEX' => '<<', ! 'U_INDEX' => append_sid( $mx_root_path . "index." . $phpEx ), ! 'L_ALBUM' => $lang['Album'], ! 'L_TITLE' => $title, ! 'U_ALBUM' => append_sid( album_append_uid( this_smartor_mxurl() ) ) ! ) ! ); ! ?> \ No newline at end of file --- 74,87 ---- // Set ALBUM Version ! $template->assign_vars( array( ! 'ALBUM_VERSION' => '2' . $album_config['album_version'], ! 'ALBUM_VERSION_INFO' => 'This script (Smartor Album v. 2.0.0 :: mxBB Portal Module 2004, with Volodymyr (CLowN) Skoryks SP1 addon, IdleVoid\'s Album Category Hierarchy mod) is modified by <a href="http://www.mx-system.com">mxBB Team</a> ', ! 'PAFILEDB_SEARCH_ACTION' => append_sid( album_append_uid( this_smartor_mxurl() ) ), ! 'PAFILEDB_SEARCH_HIDDEN' => '<input type="hidden" name="smartor_mode" value="album_search"><input type="hidden" name="page" value="' . $page_id . '">', ! 'L_INDEX' => '<<', ! 'U_INDEX' => append_sid( $mx_root_path . "index." . $phpEx ), ! 'L_ALBUM' => $lang['Album'], ! 'L_TITLE' => $title, ! 'U_ALBUM' => append_sid( album_append_uid( this_smartor_mxurl() ) ) ! )); ?> \ No newline at end of file Index: album_hierarchy_functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/album_mod/album_hierarchy_functions.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** album_hierarchy_functions.php 5 Apr 2006 23:03:48 -0000 1.4 --- album_hierarchy_functions.php 30 Jun 2006 21:10:55 -0000 1.5 *************** *** 8,13 **** * */ ! ! if ( !defined( 'IN_PHPBB' ) ) { die( 'Hacking attempt' ); --- 8,13 ---- * */ ! [...1381 lines suppressed...] } if ( $album_config['show_index_last_comment'] == 1 && $indexes[$i] == 5 ) { ! $template->assign_vars( array( ! 'COL5' => $rowClass, ! 'LAST_COMMENT_OVER_COLOR' => $overColor, ! 'LAST_COMMENT_OUT_COLOR' => $outColor ! )); } if ( $album_config['show_index_last_pic'] == 1 && $indexes[$i] == 6 ) { ! $template->assign_vars( array( ! 'COL6' => $rowClass, ! 'LAST_PIC_OVER_COLOR' => $overColor, ! 'LAST_PIC_OUT_COLOR' => $outColor ! )); } $toggle = !$toggle; Index: clown_album_functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/album_mod/clown_album_functions.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** clown_album_functions.php 18 Jun 2006 10:47:56 -0000 1.6 --- clown_album_functions.php 30 Jun 2006 21:10:55 -0000 1.7 *************** *** 21,210 **** if ( $album_sp_config['rate_type'] == 0 ) // display only images { ! if ( !$rating ) ! return $lang['Not_rated']; ! else { ! $r = ""; ! for ( $temp = 1; $temp <= $rating; $temp++ ) ! { ! $r .= "<img src='" . $module_root_path . "album_mod/rank.gif' style='$css_style'/> "; ! } ! ! return ( $r ); } } ! else if ( $album_sp_config['rate_type'] == 1 ) // display just text { ! if ( !$rating ) ! return $lang['Not_rated']; ! else ! return ( round( $rating, 2 ) ); ! } ! else // display both images and text ! { ! if ( !$rating ) ! return $lang['Not_rated']; ! else ! { ! $r = ""; ! for ( $temp = 1; $temp <= $rating; $temp++ ) ! { ! $r .= "<img src='" . $module_root_path . "album_mod/rank.gif' style='$css_style'/> "; ! } ! } ! ! return ( round( $rating, 2 ) . ' ' . $r ); ! } } ! // to have smilies window popup ! function smartor_generate_smilies( $mode, $page_id ) ! { ! global $db, $board_config, $template, $lang, $images, $theme, $phpEx, $mx_root_path; ! global $user_ip, $session_length, $starttime; ! global $userdata; ! // MX ! global $is_block; ! $inline_columns = $board_config['smilie_columns']; ! $inline_rows = $board_config['smilie_rows']; ! $window_columns = $board_config['smilie_window_columns']; - if ( $mode == 'window' ) - { - $userdata = session_pagestart( $user_ip, $page_id ); - init_userprefs( $userdata ); ! $gen_simple_header = true; ! $page_title = "Smilies"; ! if ( !$is_block ) ! { ! include( $mx_root_path . 'includes/page_header.' . $phpEx ); ! } ! $template->set_filenames( array( 'smiliesbody' => 'album_posting_smilies.tpl' ) ); ! } ! $sql = "SELECT emoticon, code, smile_url ! FROM " . SMILIES_TABLE . " ! ORDER BY smilies_id"; ! if ( $result = $db->sql_query( $sql ) ) ! { ! $num_smilies = 0; ! $rowset = array(); ! while ( $row = $db->sql_fetchrow( $result ) ) ! { ! if ( empty( $rowset[$row['smile_url']] ) ) ! { ! $rowset[$row['smile_url']]['code'] = str_replace( "'", "\\'", str_replace( '\\', '\\\\', $row['code'] ) ); ! $rowset[$row['smile_url']]['emoticon'] = $row['emoticon']; ! $num_smilies++; ! } ! } ! if ( $num_smilies ) ! { ! $smilies_count = ( $mode == 'inline' ) ? min( ( ( $inline_columns * $inline_rows ) - 1 ), $num_smilies ) : $num_smilies; ! $smilies_split_row = ( $mode == 'inline' ) ? $inline_columns - 1 : $window_columns - 1; ! $s_colspan = 0; ! $row = 0; ! $col = 0; ! while ( list( $smile_url, $data ) = @each( $rowset ) ) ! { ! if ( !$col ) ! { ! $template->assign_block_vars( 'smilies_row', array() ); ! } ! $template->assign_block_vars( 'smilies_row.smilies_col', array( 'SMILEY_CODE' => $data['code'], ! 'SMILEY_IMG' => $board_config['smilies_path'] . '/' . $smile_url, ! 'SMILEY_DESC' => $data['emoticon'] ) ! ); ! $s_colspan = max( $s_colspan, $col + 1 ); ! if ( $col == $smilies_split_row ) ! { ! if ( $mode == 'inline' && $row == $inline_rows - 1 ) ! { ! break; ! } ! $col = 0; ! $row++; ! } ! else ! { ! $col++; ! } ! } ! if ( $mode == 'inline' && $num_smilies > $inline_rows * $inline_columns ) ! { ! $template->assign_block_vars( 'switch_smilies_extra', array() ); ! $template->assign_vars( array( 'L_MORE_SMILIES' => $lang['More_emoticons'], ! 'U_MORE_SMILIES' => append_sid( $phpbb_root_path . "posting.$phpEx?mode=smilies" ) ) ! ); ! } ! $template->assign_vars( array( 'L_EMOTICONS' => $lang['Emoticons'], ! 'L_CLOSE_WINDOW' => $lang['Close_window'], ! 'S_SMILIES_COLSPAN' => $s_colspan ) ! ); ! } ! } ! if ( $mode == 'window' ) { ! $template->pparse( 'smiliesbody' ); ! ! if ( !$is_block ) { ! include( $mx_root_path . 'includes/page_tail.' . $phpEx ); } } } ! function CanRated ( $picID, $userID ) { ! // PRE: deside if user can rate things on hot or not ! global $db, $album_sp_config, $userdata; ! if ( ! $userdata['session_logged_in'] && $album_sp_config['hon_rate_users'] == 1 ) ! { ! $alowed = true; ! } ! else if ( $userdata['session_logged_in'] && $album_sp_config['hon_rate_times'] == 0 ) ! { ! $sql = "SELECT * ! FROM " . ALBUM_RATE_TABLE . " ! WHERE rate_pic_id = $picID ! AND rate_user_id = $userID ! LIMIT 1"; ! if ( !$result = $db->sql_query( $sql ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not query rating information', '', __LINE__, __FILE__, $sql ); ! } ! if ( $db->sql_numrows( $result ) > 0 ) ! { ! $alowed = false; ! } ! else ! { ! $alowed = true; ! } ! } ! else ! { ! $alowed = true; ! } ! return ( $alowed ); ! } ! ?> \ No newline at end of file --- 21,221 ---- if ( $album_sp_config['rate_type'] == 0 ) // display only images + { + if ( !$rating ) { ! return $lang['Not_rated']; ! } ! else ! { ! $r = ""; ! for ( $temp = 1; $temp <= $rating; $temp++ ) { ! $r .= "<img src='" . $module_root_path . "album_mod/rank.gif' style='$css_style'/> "; } + return ( $r ); } ! } ! else if ( $album_sp_config['rate_type'] == 1 ) // display just text ! { ! if ( !$rating ) ! { ! return $lang['Not_rated']; ! } ! else ! { ! return ( round( $rating, 2 ) ); ! } ! } ! else // display both images and text ! { ! if ( !$rating ) ! { ! return $lang['Not_rated']; ! } ! else ! { ! $r = ""; ! for ( $temp = 1; $temp <= $rating; $temp++ ) { ! $r .= "<img src='" . $module_root_path . "album_mod/rank.gif' style='$css_style'/> "; } ! } ! return ( round( $rating, 2 ) . ' ' . $r ); ! } ! } ! // to have smilies window popup ! function smartor_generate_smilies( $mode, $page_id ) ! { ! global $db, $board_config, $template, $lang, $images, $theme, $phpEx, $mx_root_path; ! global $user_ip, $session_length, $starttime; ! global $userdata; ! global $is_block; ! $inline_columns = $board_config['smilie_columns']; ! $inline_rows = $board_config['smilie_rows']; ! $window_columns = $board_config['smilie_window_columns']; ! if ( $mode == 'window' ) ! { ! $userdata = session_pagestart( $user_ip, $page_id ); ! init_userprefs( $userdata ); ! $gen_simple_header = true; ! $page_title = "Smilies"; ! if ( !$is_block ) ! { ! include( $mx_root_path . 'includes/page_header.' . $phpEx ); ! } ! $template->set_filenames( array( 'smiliesbody' => 'album_posting_smilies.tpl' ) ); ! } ! $sql = "SELECT emoticon, code, smile_url ! FROM " . SMILIES_TABLE . " ! ORDER BY smilies_id"; ! if ( $result = $db->sql_query( $sql ) ) ! { ! $num_smilies = 0; ! $rowset = array(); ! while ( $row = $db->sql_fetchrow( $result ) ) ! { ! if ( empty( $rowset[$row['smile_url']] ) ) ! { ! $rowset[$row['smile_url']]['code'] = str_replace( "'", "\\'", str_replace( '\\', '\\\\', $row['code'] ) ); ! $rowset[$row['smile_url']]['emoticon'] = $row['emoticon']; ! $num_smilies++; ! } ! } ! if ( $num_smilies ) ! { ! $smilies_count = ( $mode == 'inline' ) ? min( ( ( $inline_columns * $inline_rows ) - 1 ), $num_smilies ) : $num_smilies; ! $smilies_split_row = ( $mode == 'inline' ) ? $inline_columns - 1 : $window_columns - 1; ! $s_colspan = 0; ! $row = 0; ! $col = 0; ! while ( list( $smile_url, $data ) = @each( $rowset ) ) ! { ! if ( !$col ) ! { ! $template->assign_block_vars( 'smilies_row', array() ); ! } ! $template->assign_block_vars( 'smilies_row.smilies_col', array( ! 'SMILEY_CODE' => $data['code'], ! 'SMILEY_IMG' => $board_config['smilies_path'] . '/' . $smile_url, ! 'SMILEY_DESC' => $data['emoticon'] ) ! ); ! $s_colspan = max( $s_colspan, $col + 1 ); ! if ( $col == $smilies_split_row ) { ! if ( $mode == 'inline' && $row == $inline_rows - 1 ) { ! break; } + $col = 0; + $row++; + } + else + { + $col++; } } ! if ( $mode == 'inline' && $num_smilies > $inline_rows * $inline_columns ) { ! $template->assign_block_vars( 'switch_smilies_extra', array() ); ! $template->assign_vars( array( ! 'L_MORE_SMILIES' => $lang['More_emoticons'], ! 'U_MORE_SMILIES' => append_sid( $phpbb_root_path . "posting.$phpEx?mode=smilies" ) ) ! ); ! } ! $template->assign_vars( array( ! 'L_EMOTICONS' => $lang['Emoticons'], ! 'L_CLOSE_WINDOW' => $lang['Close_window'], ! 'S_SMILIES_COLSPAN' => $s_colspan ) ! ); ! } ! } ! if ( $mode == 'window' ) ! { ! $template->pparse( 'smiliesbody' ); ! if ( !$is_block ) ! { ! include( $mx_root_path . 'includes/page_tail.' . $phpEx ); ! } ! } ! } ! function CanRated ( $picID, $userID ) ! { ! // PRE: deside if user can rate things on hot or not ! global $db, $album_sp_config, $userdata; ! ! if ( ! $userdata['session_logged_in'] && $album_sp_config['hon_rate_users'] == 1 ) ! { ! $alowed = true; ! } ! else if ( $userdata['session_logged_in'] && $album_sp_config['hon_rate_times'] == 0 ) ! { ! $sql = "SELECT * ! FROM " . ALBUM_RATE_TABLE . " ! WHERE rate_pic_id = $picID ! AND rate_user_id = $userID ! LIMIT 1"; ! ! if ( !$result = $db->sql_query( $sql ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not query rating information', '', __LINE__, __FILE__, $sql ); ! } ! ! if ( $db->sql_numrows( $result ) > 0 ) ! { ! $alowed = false; ! } ! else ! { ! $alowed = true; ! } ! } ! else ! { ! $alowed = true; ! } ! ! return ( $alowed ); ! } ! ?> \ No newline at end of file Index: album_hierarchy_debug.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/album_mod/album_hierarchy_debug.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** album_hierarchy_debug.php 5 Apr 2006 23:03:48 -0000 1.3 --- album_hierarchy_debug.php 30 Jun 2006 21:10:55 -0000 1.4 *************** *** 8,16 **** * */ ! ! if ( !defined( 'IN_PHPBB' ) ) { die( 'Hacking attempt' ); ! } // ----------------------------------------------- // Debug helper functions --- 8,16 ---- * */ ! ! if ( !defined( 'IN_PORTAL' ) ) { die( 'Hacking attempt' ); ! } // ----------------------------------------------- // Debug helper functions *************** *** 42,46 **** if ( $album_config['album_debug_mode'] == 1 || album_is_debug_enabled() == true ) ! { // simulate the $file and $line parameters for album_debugEx $tmparray = array( 0 => '', 1 => '' ); --- 42,46 ---- if ( $album_config['album_debug_mode'] == 1 || album_is_debug_enabled() == true ) ! { // simulate the $file and $line parameters for album_debugEx $tmparray = array( 0 => '', 1 => '' ); *************** *** 180,183 **** } } - ?> \ No newline at end of file --- 180,182 ---- |
Update of /cvsroot/mxbb/mx_smartor/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv9308/modules/mx_smartor/includes Modified Files: album_cat.php album_cat_sort.php album_comment.php album_comment_delete.php album_comment_edit.php album_delete.php album_edit.php album_hotornot.php album_memberlist.php album_modcp.php album_page.php album_personal.php album_personal_cat_admin.php album_personal_index.php album_personal_old.php album_pic.php album_picm.php album_rate.php album_search.php album_showpage.php album_thumbnail.php album_upload.php Log Message: This module is really messy. I have done some general code cleanup and security scrutiny. Still, much to do... Index: album_personal.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/includes/album_personal.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** album_personal.php 5 Apr 2006 23:03:49 -0000 1.5 --- album_personal.php 30 Jun 2006 21:10:56 -0000 1.6 *************** *** 9,12 **** --- 9,17 ---- */ + // +-------------------------------------------------------------+ + // | Powered by Photo Album 2.x.x (c) 2002-2003 Smartor | + // | with Volodymyr (CLowN) Skoryk's Service Pack 1 © 2003-2004 | + // +-------------------------------------------------------------+ + if ( !defined( 'IN_PORTAL' ) ) { *************** *** 33,37 **** // check if personal gallery root category exists if ( ALBUM_ROOT_CATEGORY == ( $check_cat_id = album_get_personal_root_id( $album_user_id ) ) ) ! { // if it doesn't then create the 'fake' category so we can authenticate it $thiscat = init_personal_gallery_cat( $album_user_id ); --- 38,42 ---- // check if personal gallery root category exists if ( ALBUM_ROOT_CATEGORY == ( $check_cat_id = album_get_personal_root_id( $album_user_id ) ) ) ! { // if it doesn't then create the 'fake' category so we can authenticate it $thiscat = init_personal_gallery_cat( $album_user_id ); *************** *** 109,114 **** } ! $template->set_filenames( array( 'body' => 'album_cat_body.tpl' ) ! ); $auth_list = album_build_auth_list( $album_user_id, $cat_id, $auth_data ); --- 114,118 ---- } ! $template->set_filenames( array( 'body' => 'album_cat_body.tpl' ) ); $auth_list = album_build_auth_list( $album_user_id, $cat_id, $auth_data ); *************** *** 246,250 **** // $album_nav_cat_desc .= ALBUM_NAV_ARROW . '<a href="'. append_sid(album_append_uid("album.$phpEx?cat_id$cat_id")) .'" class="nav">'.sprintf($lang['Personal_Gallery_Of_User'], $username)."</a>"; $album_nav_cat_desc .= ALBUM_NAV_ARROW . '<a href="' . this_smartor_mxurl( "user_id=$album_user_id" ) . '" class="nav">' . sprintf( $lang['Personal_Gallery_Of_User'], $username ) . "</a>"; ! } // ------------------------------------------------------------------------ // check if there is _any_ pictures at all in the personal gallery of this user. --- 250,254 ---- // $album_nav_cat_desc .= ALBUM_NAV_ARROW . '<a href="'. append_sid(album_append_uid("album.$phpEx?cat_id$cat_id")) .'" class="nav">'.sprintf($lang['Personal_Gallery_Of_User'], $username)."</a>"; $album_nav_cat_desc .= ALBUM_NAV_ARROW . '<a href="' . this_smartor_mxurl( "user_id=$album_user_id" ) . '" class="nav">' . sprintf( $lang['Personal_Gallery_Of_User'], $username ) . "</a>"; ! } // ------------------------------------------------------------------------ // check if there is _any_ pictures at all in the personal gallery of this user. *************** *** 256,260 **** FROM ' . ALBUM_TABLE . ' AS p, ' . ALBUM_CAT_TABLE . ' AS c WHERE c.cat_user_id = ' . $album_user_id . ' ! AND c.cat_id IN (' . $allowed_cat . ') AND p.pic_cat_id = c.cat_id'; --- 260,264 ---- FROM ' . ALBUM_TABLE . ' AS p, ' . ALBUM_CAT_TABLE . ' AS c WHERE c.cat_user_id = ' . $album_user_id . ' ! AND c.cat_id IN (' . $allowed_cat . ') AND p.pic_cat_id = c.cat_id'; *************** *** 316,385 **** // Do our template info... // ------------------------------------------------------------------------ ! $template->assign_vars( array( 'L_ALBUM' => $lang['Album'], ! ! 'U_VIEW_CAT' => append_sid( album_append_uid( this_smartor_mxurl() ) ), ! // 'U_VIEW_CAT' => append_sid(album_append_uid(this_smartor_mxurl("$album_page_url?cat_id=$cat_id"))), ! 'CAT_TITLE' => ( $is_root_cat || $album_view_mode == ALBUM_VIEW_ALL ) ? sprintf( $lang['Personal_Gallery_Of_User'], $username ) : $thiscat['cat_title'], ! 'ALBUM_NAVIGATION_ARROW' => ALBUM_NAV_ARROW, ! 'NAV_CAT_DESC' => $album_nav_cat_desc, ! ! 'L_PERSONAL_GALLERY_EXPLAIN' => $lang['Personal_Gallery_Explain'], ! ! 'L_MODERATORS' => $lang['Moderators'], ! 'MODERATORS' => $moderators_list, ! ! 'U_UPLOAD_PIC' => append_sid( album_append_uid( this_smartor_mxurl( "smartor_mode=album_upload&cat_id=" . intval( $cat_id ) ) ) ), ! // 'U_UPLOAD_PIC' => append_sid(album_append_uid(this_smartor_mxurl("smartor_mode=album_upload&cat_id=$cat_id"))), ! 'UPLOAD_PIC_IMG' => $images['upload_pic'], ! 'L_UPLOAD_PIC' => $lang['Upload_Pic'], ! 'U_TOGGLE_VIEW_ALL' => $view_mode_url, ! 'TOGGLE_VIEW_ALL_IMG' => $image_toggle_button, ! 'L_TOGGLE_VIEW_ALL' => $view_mode_text, ! 'L_CATEGORY' => sprintf( $lang['Personal_Gallery_Of_User'], $username ), ! 'L_NO_PICS' => $no_picture_message, ! 'L_RECENT_PUBLIC_PICS' => sprintf( $lang['Recent_Personal_Pics'], $username ), ! 'S_COLS' => $album_config['cols_per_page'], ! 'S_COL_WIDTH' => ( 100 / $album_config['cols_per_page'] ) . '%', ! 'L_VIEW' => $lang['View'], ! 'L_PIC_CAT' => $lang['Pic_Cat'], ! 'L_POSTER' => $lang['Poster'], ! 'L_POSTED' => $lang['Posted'], ! 'ALBUM_JUMPBOX' => $album_jumpbox, ! // 'S_ALBUM_ACTION' => append_sid(album_append_uid(this_smartor_mxurl("$album_page_url?cat_id=" . intval($cat_id)))), ! 'S_ALBUM_ACTION' => append_sid( album_append_uid( this_smartor_mxurl( "$album_page_url?cat_id=$cat_id" ) ) ), ! 'TARGET_BLANK' => ( $album_config['fullpic_popup'] ) ? 'target="_blank"' : '', ! 'L_SELECT_SORT_METHOD' => $lang['Select_sort_method'], ! 'L_ORDER' => $lang['Order'], ! 'L_SORT' => $lang['Sort'], ! 'L_TIME' => $lang['Time'], ! 'L_PIC_TITLE' => $lang['Pic_Title'], ! 'SORT_TIME' => ( $sort_method == 'pic_time' ) ? 'selected="selected"' : '', ! 'SORT_PIC_TITLE' => ( $sort_method == 'pic_title' ) ? 'selected="selected"' : '', ! 'SORT_VIEW' => ( $sort_method == 'pic_view_count' ) ? 'selected="selected"' : '', ! 'SORT_RATING_OPTION' => $sort_rating_option, ! 'SORT_COMMENTS_OPTION' => $sort_comments_option, ! 'SORT_NEW_COMMENT_OPTION' => $sort_new_comment_option, ! 'SORT_USERNAME_OPTION' => $sort_username_option, ! 'L_ASC' => $lang['Sort_Ascending'], ! 'L_DESC' => $lang['Sort_Descending'], ! 'SORT_ASC' => ( $sort_order == 'ASC' ) ? 'selected="selected"' : '', ! 'SORT_DESC' => ( $sort_order == 'DESC' ) ? 'selected="selected"' : '', ! 'S_AUTH_LIST' => $auth_list ) ! ); ?> \ No newline at end of file --- 320,386 ---- // Do our template info... // ------------------------------------------------------------------------ ! $template->assign_vars( array( ! 'L_ALBUM' => $lang['Album'], ! 'U_VIEW_CAT' => append_sid( album_append_uid( this_smartor_mxurl() ) ), ! // 'U_VIEW_CAT' => append_sid(album_append_uid(this_smartor_mxurl("$album_page_url?cat_id=$cat_id"))), ! 'CAT_TITLE' => ( $is_root_cat || $album_view_mode == ALBUM_VIEW_ALL ) ? sprintf( $lang['Personal_Gallery_Of_User'], $username ) : $thiscat['cat_title'], ! 'ALBUM_NAVIGATION_ARROW' => ALBUM_NAV_ARROW, ! 'NAV_CAT_DESC' => $album_nav_cat_desc, ! 'L_PERSONAL_GALLERY_EXPLAIN' => $lang['Personal_Gallery_Explain'], ! 'L_MODERATORS' => $lang['Moderators'], ! 'MODERATORS' => $moderators_list, ! 'U_UPLOAD_PIC' => append_sid( album_append_uid( this_smartor_mxurl( "smartor_mode=album_upload&cat_id=" . intval( $cat_id ) ) ) ), ! // 'U_UPLOAD_PIC' => append_sid(album_append_uid(this_smartor_mxurl("smartor_mode=album_upload&cat_id=$cat_id"))), ! 'UPLOAD_PIC_IMG' => $images['upload_pic'], ! 'L_UPLOAD_PIC' => $lang['Upload_Pic'], ! 'U_TOGGLE_VIEW_ALL' => $view_mode_url, ! 'TOGGLE_VIEW_ALL_IMG' => $image_toggle_button, ! 'L_TOGGLE_VIEW_ALL' => $view_mode_text, ! 'L_CATEGORY' => sprintf( $lang['Personal_Gallery_Of_User'], $username ), ! 'L_NO_PICS' => $no_picture_message, ! 'L_RECENT_PUBLIC_PICS' => sprintf( $lang['Recent_Personal_Pics'], $username ), ! 'S_COLS' => $album_config['cols_per_page'], ! 'S_COL_WIDTH' => ( 100 / $album_config['cols_per_page'] ) . '%', ! 'L_VIEW' => $lang['View'], ! 'L_PIC_CAT' => $lang['Pic_Cat'], ! 'L_POSTER' => $lang['Poster'], ! 'L_POSTED' => $lang['Posted'], ! 'ALBUM_JUMPBOX' => $album_jumpbox, ! // 'S_ALBUM_ACTION' => append_sid(album_append_uid(this_smartor_mxurl("$album_page_url?cat_id=" . intval($cat_id)))), ! 'S_ALBUM_ACTION' => append_sid( album_append_uid( this_smartor_mxurl( "$album_page_url?cat_id=$cat_id" ) ) ), ! 'TARGET_BLANK' => ( $album_config['fullpic_popup'] ) ? 'target="_blank"' : '', ! 'L_SELECT_SORT_METHOD' => $lang['Select_sort_method'], ! 'L_ORDER' => $lang['Order'], ! 'L_SORT' => $lang['Sort'], ! 'L_TIME' => $lang['Time'], ! 'L_PIC_TITLE' => $lang['Pic_Title'], ! 'SORT_TIME' => ( $sort_method == 'pic_time' ) ? 'selected="selected"' : '', ! 'SORT_PIC_TITLE' => ( $sort_method == 'pic_title' ) ? 'selected="selected"' : '', ! 'SORT_VIEW' => ( $sort_method == 'pic_view_count' ) ? 'selected="selected"' : '', ! 'SORT_RATING_OPTION' => $sort_rating_option, ! 'SORT_COMMENTS_OPTION' => $sort_comments_option, ! 'SORT_NEW_COMMENT_OPTION' => $sort_new_comment_option, ! 'SORT_USERNAME_OPTION' => $sort_username_option, ! 'L_ASC' => $lang['Sort_Ascending'], ! 'L_DESC' => $lang['Sort_Descending'], ! 'SORT_ASC' => ( $sort_order == 'ASC' ) ? 'selected="selected"' : '', ! 'SORT_DESC' => ( $sort_order == 'DESC' ) ? 'selected="selected"' : '', + 'S_AUTH_LIST' => $auth_list ) + ); ?> \ No newline at end of file Index: album_edit.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/includes/album_edit.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** album_edit.php 5 Apr 2006 23:03:49 -0000 1.5 --- album_edit.php 30 Jun 2006 21:10:55 -0000 1.6 *************** *** 8,12 **** * */ ! if ( !defined( 'IN_PORTAL' ) ) { --- 8,16 ---- * */ ! ! // +------------------------------------------------------+ ! // | Powered by Photo Album 2.x.x (c) 2002-2003 Smartor | ! // +------------------------------------------------------+ ! if ( !defined( 'IN_PORTAL' ) ) { *************** *** 149,156 **** if ( !isset( $HTTP_POST_VARS['pic_title'] ) ) ! { ! // Start output of page ! $page_title = $lang['Album']; if ( !$is_block ) --- 153,160 ---- if ( !isset( $HTTP_POST_VARS['pic_title'] ) ) ! { ! // Start output of page ! $page_title = $lang['Album']; if ( !$is_block ) *************** *** 159,191 **** } ! $template->set_filenames( array( 'body' => 'album_edit_body.tpl' ) ! ); ! $template->assign_vars( array( 'L_EDIT_PIC_INFO' => $lang['Edit_Pic_Info'], ! 'CAT_TITLE' => $thiscat['cat_title'], ! 'U_VIEW_CAT' => append_sid( this_smartor_mxurl( "smartor_mode=album_cat&cat_id=$cat_id" ) ), ! 'L_PIC_TITLE' => $lang['Pic_Title'], ! 'PIC_TITLE' => $thispic['pic_title'], ! 'PIC_DESC' => $thispic['pic_desc'], ! 'L_PIC_DESC' => $lang['Pic_Desc'], ! 'L_PLAIN_TEXT_ONLY' => $lang['Plain_text_only'], ! 'L_MAX_LENGTH' => $lang['Max_length'], ! 'L_UPLOAD_NO_TITLE' => $lang['Upload_no_title'], ! 'L_DESC_TOO_LONG' => $lang['Desc_too_long'], ! 'S_PIC_DESC_MAX_LENGTH' => $album_config['desc_length'], ! 'L_RESET' => $lang['Reset'], ! 'L_SUBMIT' => $lang['Submit'], - 'S_ALBUM_ACTION' => append_sid( this_smartor_mxurl( "smartor_mode=album_edit&pic_id=$pic_id" ) ), - ) - ); - // Generate the page ! $template->pparse( 'body' ); --- 163,194 ---- } ! $template->set_filenames( array( 'body' => 'album_edit_body.tpl' ) ); ! $template->assign_vars( array( ! 'L_EDIT_PIC_INFO' => $lang['Edit_Pic_Info'], ! 'CAT_TITLE' => $thiscat['cat_title'], ! 'U_VIEW_CAT' => append_sid( this_smartor_mxurl( "smartor_mode=album_cat&cat_id=$cat_id" ) ), ! 'L_PIC_TITLE' => $lang['Pic_Title'], ! 'PIC_TITLE' => $thispic['pic_title'], ! 'PIC_DESC' => $thispic['pic_desc'], ! 'L_PIC_DESC' => $lang['Pic_Desc'], ! 'L_PLAIN_TEXT_ONLY' => $lang['Plain_text_only'], ! 'L_MAX_LENGTH' => $lang['Max_length'], ! 'L_UPLOAD_NO_TITLE' => $lang['Upload_no_title'], ! 'L_DESC_TOO_LONG' => $lang['Desc_too_long'], ! 'S_PIC_DESC_MAX_LENGTH' => $album_config['desc_length'], ! 'L_RESET' => $lang['Reset'], ! 'L_SUBMIT' => $lang['Submit'], ! ! 'S_ALBUM_ACTION' => append_sid( this_smartor_mxurl( "smartor_mode=album_edit&pic_id=$pic_id" ) ), ! )); // Generate the page ! $template->pparse( 'body' ); *************** *** 196,200 **** } else ! { // -------------------------------- // Check posted info --- 199,203 ---- } else ! { // -------------------------------- // Check posted info *************** *** 207,211 **** { mx_message_die( GENERAL_ERROR, $lang['Missed_pic_title'] ); ! } // -------------------------------- // Update the DB --- 210,214 ---- { mx_message_die( GENERAL_ERROR, $lang['Missed_pic_title'] ); ! } // -------------------------------- // Update the DB *************** *** 217,221 **** { mx_message_die( GENERAL_ERROR, 'Could not update pic information', '', __LINE__, __FILE__, $sql ); ! } // -------------------------------- // Complete... now send a message to user --- 220,224 ---- { mx_message_die( GENERAL_ERROR, 'Could not update pic information', '', __LINE__, __FILE__, $sql ); ! } // -------------------------------- // Complete... now send a message to user *************** *** 223,228 **** $message = $lang['Pics_updated_successfully']; ! $template->assign_vars( array( 'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid( this_smartor_mxurl( "smartor_mode=album_cat&cat_id=$cat_id" ) ) . '">' ) ! ); if ( $album_user_id == ALBUM_PUBLIC_GALLERY ) --- 226,230 ---- $message = $lang['Pics_updated_successfully']; ! $template->assign_vars( array( 'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid( this_smartor_mxurl( "smartor_mode=album_cat&cat_id=$cat_id" ) ) . '">' ) ); if ( $album_user_id == ALBUM_PUBLIC_GALLERY ) *************** *** 239,245 **** mx_message_die( GENERAL_MESSAGE, $message ); } - // +------------------------------------------------------+ - // | Powered by Photo Album 2.x.x (c) 2002-2003 Smartor | - // +------------------------------------------------------+ - ?> \ No newline at end of file --- 241,243 ---- Index: album_comment_edit.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/includes/album_comment_edit.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** album_comment_edit.php 5 Apr 2006 23:03:49 -0000 1.5 --- album_comment_edit.php 30 Jun 2006 21:10:55 -0000 1.6 *************** *** 8,12 **** * */ ! if ( !defined( 'IN_PORTAL' ) ) { --- 8,16 ---- * */ ! ! // +------------------------------------------------------+ ! // | Powered by Photo Album 2.x.x (c) 2002-2003 Smartor | ! // +------------------------------------------------------+ ! if ( !defined( 'IN_PORTAL' ) ) { *************** *** 181,188 **** { $poster = '<a href="' . append_sid( $phpbb_root_path . "profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $thispic['user_id'] ) . '">' . $thispic['username'] . '</a>'; ! } ! // Start output of page ! $page_title = $lang['Album']; if ( !$is_block ) --- 185,192 ---- { $poster = '<a href="' . append_sid( $phpbb_root_path . "profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $thispic['user_id'] ) . '">' . $thispic['username'] . '</a>'; ! } ! // Start output of page ! $page_title = $lang['Album']; if ( !$is_block ) *************** *** 191,208 **** } ! $template->set_filenames( array( 'body' => 'album_comment_body.tpl' ) ! ); ! $template->assign_block_vars( 'switch_comment_post', array() ); // --- Album Category Hierarchy : begin // --- version : 1.1.0 if ( defined( 'ALBUM_SP_CONFIG_TABLE' ) ) { ! $image_rating = ImageRating( $thispic['rating'] ); // begin shows smilies $max_smilies = 20; $sql = 'SELECT emoticon, code, smile_url ! FROM ' . SMILIES_TABLE . ' GROUP BY smile_url ORDER BY smilies_id LIMIT ' . $max_smilies; --- 195,211 ---- } ! $template->set_filenames( array( 'body' => 'album_comment_body.tpl' ) ); ! $template->assign_block_vars( 'switch_comment_post', array() ); // --- Album Category Hierarchy : begin // --- version : 1.1.0 if ( defined( 'ALBUM_SP_CONFIG_TABLE' ) ) { ! $image_rating = ImageRating( $thispic['rating'] ); // begin shows smilies $max_smilies = 20; $sql = 'SELECT emoticon, code, smile_url ! FROM ' . SMILIES_TABLE . ' GROUP BY smile_url ORDER BY smilies_id LIMIT ' . $max_smilies; *************** *** 217,267 **** for ( $i = 1; $i < $smilies_count + 1; $i++ ) { ! $template->assign_block_vars( 'switch_comment_post.smilies', array( 'CODE' => $smilies_data[$i - 1]['code'], ! 'URL' => $phpbb_root_path . $board_config['smilies_path'] . '/' . $smilies_data[$i - 1]['smile_url'], ! 'DESC' => $smilies_data[$i - 1]['emoticon'] ! ) ); if ( is_integer( $i / 5 ) ) $template->assign_block_vars( 'switch_comment_post.smilies.new_col', array() ); } ! } // --- changed $thiscat to $thispic ! $template->assign_vars( array( 'CAT_TITLE' => $thispic['cat_title'], ! 'U_VIEW_CAT' => append_sid( album_append_uid( this_smartor_mxurl( "smartor_mode=album_cat&cat_id=$cat_id" ) ) ), ! // --- Album Category Hierarchy : end ! 'U_THUMBNAIL' => append_sid( this_smartor_mxurl( "smartor_mode=album_thumbnail&pic_id=$pic_id" ) ), ! 'U_PIC' => append_sid( this_smartor_mxurl( "smartor_mode=album_thumbnail&pic_id=$pic_id", true ) ), ! 'PIC_TITLE' => $thispic['pic_title'], ! 'PIC_DESC' => nl2br( $thispic['pic_desc'] ), ! 'POSTER' => $poster, ! 'PIC_TIME' => create_date( $board_config['default_dateformat'], $thispic['pic_time'], $board_config['board_timezone'] ), ! 'PIC_VIEW' => $thispic['pic_view_count'], ! 'PIC_COMMENTS' => $total_comments, ! 'S_MESSAGE' => $thiscomment['comment_text'], ! 'L_PIC_TITLE' => $lang['Pic_Title'], ! 'L_PIC_DESC' => $lang['Pic_Desc'], ! 'L_POSTER' => $lang['Poster'], ! 'L_POSTED' => $lang['Posted'], ! 'L_VIEW' => $lang['View'], ! 'L_COMMENTS' => $lang['Comments'], ! 'L_POST_YOUR_COMMENT' => $lang['Post_your_comment'], ! 'L_MESSAGE' => $lang['Message'], ! 'L_USERNAME' => $lang['Username'], ! 'L_COMMENT_NO_TEXT' => $lang['Comment_no_text'], ! 'L_COMMENT_TOO_LONG' => $lang['Comment_too_long'], ! 'L_MAX_LENGTH' => $lang['Max_length'], ! 'S_MAX_LENGTH' => $album_config['desc_length'], ! 'L_SUBMIT' => $lang['Submit'], - 'S_ALBUM_ACTION' => append_sid( this_smartor_mxurl( "smartor_mode=album_comment_edit&comment_id=$comment_id" ) ) - ) - ); - // Generate the page ! $template->pparse( 'body' ); --- 220,271 ---- for ( $i = 1; $i < $smilies_count + 1; $i++ ) { ! $template->assign_block_vars( 'switch_comment_post.smilies', array( ! 'CODE' => $smilies_data[$i - 1]['code'], ! 'URL' => $phpbb_root_path . $board_config['smilies_path'] . '/' . $smilies_data[$i - 1]['smile_url'], ! 'DESC' => $smilies_data[$i - 1]['emoticon'] ! ) ); if ( is_integer( $i / 5 ) ) $template->assign_block_vars( 'switch_comment_post.smilies.new_col', array() ); } ! } // --- changed $thiscat to $thispic ! $template->assign_vars( array( ! 'CAT_TITLE' => $thispic['cat_title'], ! 'U_VIEW_CAT' => append_sid( album_append_uid( this_smartor_mxurl( "smartor_mode=album_cat&cat_id=$cat_id" ) ) ), ! // --- Album Category Hierarchy : end ! 'U_THUMBNAIL' => append_sid( this_smartor_mxurl( "smartor_mode=album_thumbnail&pic_id=$pic_id" ) ), ! 'U_PIC' => append_sid( this_smartor_mxurl( "smartor_mode=album_thumbnail&pic_id=$pic_id", true ) ), ! 'PIC_TITLE' => $thispic['pic_title'], ! 'PIC_DESC' => nl2br( $thispic['pic_desc'] ), ! 'POSTER' => $poster, ! 'PIC_TIME' => create_date( $board_config['default_dateformat'], $thispic['pic_time'], $board_config['board_timezone'] ), ! 'PIC_VIEW' => $thispic['pic_view_count'], ! 'PIC_COMMENTS' => $total_comments, ! 'S_MESSAGE' => $thiscomment['comment_text'], ! 'L_PIC_TITLE' => $lang['Pic_Title'], ! 'L_PIC_DESC' => $lang['Pic_Desc'], ! 'L_POSTER' => $lang['Poster'], ! 'L_POSTED' => $lang['Posted'], ! 'L_VIEW' => $lang['View'], ! 'L_COMMENTS' => $lang['Comments'], ! 'L_POST_YOUR_COMMENT' => $lang['Post_your_comment'], ! 'L_MESSAGE' => $lang['Message'], ! 'L_USERNAME' => $lang['Username'], ! 'L_COMMENT_NO_TEXT' => $lang['Comment_no_text'], ! 'L_COMMENT_TOO_LONG' => $lang['Comment_too_long'], ! 'L_MAX_LENGTH' => $lang['Max_length'], ! 'S_MAX_LENGTH' => $album_config['desc_length'], ! 'L_SUBMIT' => $lang['Submit'], ! ! 'S_ALBUM_ACTION' => append_sid( this_smartor_mxurl( "smartor_mode=album_comment_edit&comment_id=$comment_id" ) ) ! )); // Generate the page ! $template->pparse( 'body' ); *************** *** 282,291 **** { mx_message_die( GENERAL_ERROR, $lang['Comment_no_text'] ); ! } // -------------------------------- // Prepare variables // -------------------------------- $comment_edit_time = time(); ! $comment_edit_user_id = $userdata['user_id']; // -------------------------------- // Update the DB --- 286,295 ---- { mx_message_die( GENERAL_ERROR, $lang['Comment_no_text'] ); ! } // -------------------------------- // Prepare variables // -------------------------------- $comment_edit_time = time(); ! $comment_edit_user_id = $userdata['user_id']; // -------------------------------- // Update the DB *************** *** 298,307 **** { mx_message_die( GENERAL_ERROR, 'Could not update comment data', '', __LINE__, __FILE__, $sql ); ! } // -------------------------------- // Complete... now send a message to user // -------------------------------- ! $template->assign_vars( array( 'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid( this_smartor_mxurl( "smartor_mode=album_showpage&comment_id=$comment_id" ) ) . '#' . $comment_id . '">' ) ! ); $message = $lang['Stored'] . "<br /><br />" . sprintf( $lang['Click_view_message'], "<a href=\"" . append_sid( this_smartor_mxurl( "smartor_mode=album_showpage&comment_id=$comment_id" ) ) . "#$comment_id\">", "</a>" ) . "<br /><br />" . sprintf( $lang['Click_return_album_index'], "<a href=\"" . append_sid( album_append_uid( this_smartor_mxurl() ) ) . "\">", "</a>" ); --- 302,310 ---- { mx_message_die( GENERAL_ERROR, 'Could not update comment data', '', __LINE__, __FILE__, $sql ); ! } // -------------------------------- // Complete... now send a message to user // -------------------------------- ! $template->assign_vars( array( 'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid( this_smartor_mxurl( "smartor_mode=album_showpage&comment_id=$comment_id" ) ) . '#' . $comment_id . '">' ) ); $message = $lang['Stored'] . "<br /><br />" . sprintf( $lang['Click_view_message'], "<a href=\"" . append_sid( this_smartor_mxurl( "smartor_mode=album_showpage&comment_id=$comment_id" ) ) . "#$comment_id\">", "</a>" ) . "<br /><br />" . sprintf( $lang['Click_return_album_index'], "<a href=\"" . append_sid( album_append_uid( this_smartor_mxurl() ) ) . "\">", "</a>" ); *************** *** 309,316 **** mx_message_die( GENERAL_MESSAGE, $message ); } - // +--------------------------------------------------------+ - // | Powered by Photo Album 2.x.x (c) 2002-2003 Smartor | - // | with Volodymyr (CLowN) Skoryk's Service Pack 1 © 2003 | - // +--------------------------------------------------------+ - ?> \ No newline at end of file --- 312,314 ---- Index: album_modcp.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/includes/album_modcp.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** album_modcp.php 5 Apr 2006 23:03:49 -0000 1.5 --- album_modcp.php 30 Jun 2006 21:10:55 -0000 1.6 *************** *** 8,16 **** * */ ! if ( !defined( 'IN_PORTAL' ) ) { die( "Hacking attempt" ); } // ------------------------------------ // Get the $pic_id from GET method then query out the category --- 8,22 ---- [...984 lines suppressed...] } @unlink( ALBUM_UPLOAD_PATH . $filerow[$i]['pic_filename'] ); ! } // Delete DB entry $sql = "DELETE FROM " . ALBUM_TABLE . " *************** *** 1039,1045 **** } } ! // +------------------------------------------------------+ ! // | Powered by Photo Album 2.x.x (c) 2002-2003 Smartor | ! // +------------------------------------------------------+ ! ! ?> \ No newline at end of file --- 1042,1044 ---- } } ! ?> \ No newline at end of file Index: album_search.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/includes/album_search.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** album_search.php 5 Apr 2006 23:03:49 -0000 1.4 --- album_search.php 30 Jun 2006 21:10:56 -0000 1.5 *************** *** 9,12 **** --- 9,17 ---- */ + // +-------------------------------------------------------------+ + // | Powered by Photo Album 2.x.x (c) 2002-2003 Smartor | + // | with Volodymyr (CLowN) Skoryk's Service Pack 1 © 2003-2004 | + // +-------------------------------------------------------------+ + if ( !defined( 'IN_PORTAL' ) ) { *************** *** 20,27 **** } ! $template->set_filenames( array( 'body' => 'album_search_body.tpl' ) ); ! include_once( $module_root_path . 'album_mod/album_common.' . $phpEx ); // +-+-------------------------------------------------------+-+-+-+-+-+-+-+-+ if ( ( isset( $HTTP_POST_VARS['search'] ) || isset( $HTTP_GET_VARS['search'] ) ) && ( $HTTP_POST_VARS['search'] != '' || $HTTP_GET_VARS['search'] != '' ) ) --- 25,32 ---- } ! $template->set_filenames( array( 'body' => 'album_search_body.tpl' ) ); ! include_once( $module_root_path . 'album_mod/album_common.' . $phpEx ); // +-+-------------------------------------------------------+-+-+-+-+-+-+-+-+ if ( ( isset( $HTTP_POST_VARS['search'] ) || isset( $HTTP_GET_VARS['search'] ) ) && ( $HTTP_POST_VARS['search'] != '' || $HTTP_GET_VARS['search'] != '' ) ) *************** *** 50,54 **** $sql = "SELECT p.pic_id, p.pic_title, p.pic_desc, p.pic_user_id, p.pic_username, p.pic_time, p.pic_cat_id, p.pic_approval, c.cat_id, c.cat_title, c.cat_user_id FROM " . ALBUM_TABLE . ' AS p,' . ALBUM_CAT_TABLE . " AS c ! WHERE p.pic_approval = 1 AND " . $where . " LIKE '%" . $s . "%' AND p.pic_cat_id = c.cat_id OR p.pic_cat_id = 0 AND p.pic_approval = 1 AND " . $where . " LIKE '%" . $s . "%' ORDER BY p.pic_time DESC"; --- 55,59 ---- $sql = "SELECT p.pic_id, p.pic_title, p.pic_desc, p.pic_user_id, p.pic_username, p.pic_time, p.pic_cat_id, p.pic_approval, c.cat_id, c.cat_title, c.cat_user_id FROM " . ALBUM_TABLE . ' AS p,' . ALBUM_CAT_TABLE . " AS c ! WHERE p.pic_approval = 1 AND " . $where . " LIKE '%" . $s . "%' AND p.pic_cat_id = c.cat_id OR p.pic_cat_id = 0 AND p.pic_approval = 1 AND " . $where . " LIKE '%" . $s . "%' ORDER BY p.pic_time DESC"; *************** *** 69,83 **** $album_user_id = $row['cat_user_id']; $user_cat_root_id = album_get_personal_root_id( $album_user_id ); ! $template->assign_block_vars( 'switch_search_results.search_results', array( 'L_USERNAME' => $row['pic_username'], ! 'U_PROFILE' => append_sid( $phpbb_root_path . 'profile.php?mode=viewprofile&u=' . $row['pic_user_id'] ), ! 'L_CAT' => ( $row['cat_user_id'] != ALBUM_PUBLIC_GALLERY ) ? 'User personal' : $row['cat_title'], ! 'U_CAT' => ( $row['cat_id'] == $user_cat_root_id ) ? append_sid( this_smartor_mxurl() ) : append_sid( this_smartor_mxurl( 'smartor_mode=album_cat&cat_id=' . $row['cat_id'] ) ), ! 'L_PIC' => $row['pic_title'], ! 'U_PIC' => append_sid( this_smartor_mxurl( 'smartor_mode=album_showpage&pic_id=' . $row['pic_id'] ) ), ! 'L_TIME' => create_date( $board_config['default_dateformat'], $row['pic_time'], $board_config['board_timezone'] ) ! ) ); $in[$numres] = $row['pic_id']; --- 74,89 ---- $album_user_id = $row['cat_user_id']; $user_cat_root_id = album_get_personal_root_id( $album_user_id ); ! $template->assign_block_vars( 'switch_search_results.search_results', array( ! 'L_USERNAME' => $row['pic_username'], ! 'U_PROFILE' => append_sid( $phpbb_root_path . 'profile.php?mode=viewprofile&u=' . $row['pic_user_id'] ), ! 'L_CAT' => ( $row['cat_user_id'] != ALBUM_PUBLIC_GALLERY ) ? 'User personal' : $row['cat_title'], ! 'U_CAT' => ( $row['cat_id'] == $user_cat_root_id ) ? append_sid( this_smartor_mxurl() ) : append_sid( this_smartor_mxurl( 'smartor_mode=album_cat&cat_id=' . $row['cat_id'] ) ), ! 'L_PIC' => $row['pic_title'], ! 'U_PIC' => append_sid( this_smartor_mxurl( 'smartor_mode=album_showpage&pic_id=' . $row['pic_id'] ) ), ! 'L_TIME' => create_date( $board_config['default_dateformat'], $row['pic_time'], $board_config['board_timezone'] ) ! ) ); $in[$numres] = $row['pic_id']; *************** *** 87,96 **** while ( $row = $db->sql_fetchrow( $result ) ); ! $template->assign_vars( array( 'L_NRESULTS' => $numres, ! 'L_TCATEGORY' => 'Category', ! 'L_TTITLE' => 'Title', ! 'L_TSUBMITER' => 'Submiter', ! 'L_TSUBMITED' => 'Submited on' ! ) ); } else --- 93,103 ---- while ( $row = $db->sql_fetchrow( $result ) ); ! $template->assign_vars( array( ! 'L_NRESULTS' => $numres, ! 'L_TCATEGORY' => 'Category', ! 'L_TTITLE' => 'Title', ! 'L_TSUBMITER' => 'Submiter', ! 'L_TSUBMITED' => 'Submited on' ! ) ); } else *************** *** 102,106 **** { $template->assign_block_vars( 'switch_search', array() ); ! } // +-+-------------------------------------------------------+-+-+-+-+-+-+-+-+ $template->pparse( 'body' ); --- 109,113 ---- { $template->assign_block_vars( 'switch_search', array() ); ! } // +-+-------------------------------------------------------+-+-+-+-+-+-+-+-+ $template->pparse( 'body' ); *************** *** 108,116 **** { include( $phpbb_root_path . 'includes/page_tail.' . $phpEx ); ! } ! // +-------------------------------------------------------------+ ! // | Powered by Photo Album 2.x.x (c) 2002-2003 Smartor | ! // | with Volodymyr (CLowN) Skoryk's Service Pack 1 © 2003-2004 | ! // +-------------------------------------------------------------+ ! ?> \ No newline at end of file --- 115,118 ---- { include( $phpbb_root_path . 'includes/page_tail.' . $phpEx ); ! } ?> \ No newline at end of file Index: album_delete.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/includes/album_delete.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** album_delete.php 5 Apr 2006 23:03:49 -0000 1.5 --- album_delete.php 30 Jun 2006 21:10:55 -0000 1.6 *************** *** 8,12 **** * */ ! if ( !defined( 'IN_PORTAL' ) ) { --- 8,16 ---- * */ ! ! // +------------------------------------------------------+ ! // | Powered by Photo Album 2.x.x (c) 2002-2003 Smartor | ! // +------------------------------------------------------+ ! if ( !defined( 'IN_PORTAL' ) ) { *************** *** 149,153 **** if ( !isset( $HTTP_POST_VARS['confirm'] ) ) ! { // -------------------------------- // If user give up deleting... --- 153,157 ---- if ( !isset( $HTTP_POST_VARS['confirm'] ) ) ! { // -------------------------------- // If user give up deleting... *************** *** 157,164 **** redirect( append_sid( album_append_uid( this_smartor_mxurl( "smartor_mode=album_cat&cat_id=$cat_id" ) ) ) ); exit; ! } ! // Start output of page ! $page_title = $lang['Album']; if ( !$is_block ) --- 161,168 ---- redirect( append_sid( album_append_uid( this_smartor_mxurl( "smartor_mode=album_cat&cat_id=$cat_id" ) ) ) ); exit; ! } ! // Start output of page ! $page_title = $lang['Album']; if ( !$is_block ) *************** *** 167,186 **** } ! $template->set_filenames( array( 'body' => 'confirm_body.tpl' ) ! ); ! $template->assign_vars( array( 'MESSAGE_TITLE' => $lang['Confirm'], ! 'MESSAGE_TEXT' => $lang['Album_delete_confirm'], ! 'L_NO' => $lang['No'], ! 'L_YES' => $lang['Yes'], - 'S_CONFIRM_ACTION' => append_sid( this_smartor_mxurl( "smartor_mode=album_delete&pic_id=$pic_id" ) ), - ) - ); - // Generate the page ! $template->pparse( 'body' ); --- 171,189 ---- } ! $template->set_filenames( array( 'body' => 'confirm_body.tpl' ) ); ! $template->assign_vars( array( ! 'MESSAGE_TITLE' => $lang['Confirm'], ! 'MESSAGE_TEXT' => $lang['Album_delete_confirm'], ! 'L_NO' => $lang['No'], ! 'L_YES' => $lang['Yes'], ! ! 'S_CONFIRM_ACTION' => append_sid( this_smartor_mxurl( "smartor_mode=album_delete&pic_id=$pic_id" ) ), ! )); // Generate the page ! $template->pparse( 'body' ); *************** *** 191,195 **** } else ! { // -------------------------------- // It's confirmed. First delete all comments --- 194,198 ---- } else ! { // -------------------------------- // It's confirmed. First delete all comments *************** *** 200,204 **** { mx_message_die( GENERAL_ERROR, 'Could not delete related comments', '', __LINE__, __FILE__, $sql ); ! } // -------------------------------- // Delete all ratings --- 203,207 ---- { mx_message_die( GENERAL_ERROR, 'Could not delete related comments', '', __LINE__, __FILE__, $sql ); ! } // -------------------------------- // Delete all ratings *************** *** 209,213 **** { mx_message_die( GENERAL_ERROR, 'Could not delete related ratings', '', __LINE__, __FILE__, $sql ); ! } // -------------------------------- // Delete cached thumbnail --- 212,216 ---- { mx_message_die( GENERAL_ERROR, 'Could not delete related ratings', '', __LINE__, __FILE__, $sql ); ! } // -------------------------------- // Delete cached thumbnail *************** *** 216,224 **** { @unlink( ALBUM_CACHE_PATH . $thispic['pic_thumbnail'] ); ! } // -------------------------------- // Delete File // -------------------------------- ! @unlink( ALBUM_UPLOAD_PATH . $thispic['pic_filename'] ); // -------------------------------- // Delete DB entry --- 219,227 ---- { @unlink( ALBUM_CACHE_PATH . $thispic['pic_thumbnail'] ); ! } // -------------------------------- // Delete File // -------------------------------- ! @unlink( ALBUM_UPLOAD_PATH . $thispic['pic_filename'] ); // -------------------------------- // Delete DB entry *************** *** 229,233 **** { mx_message_die( GENERAL_ERROR, 'Could not delete DB entry', '', __LINE__, __FILE__, $sql ); ! } // -------------------------------- // Complete... now send a message to user --- 232,236 ---- { mx_message_die( GENERAL_ERROR, 'Could not delete DB entry', '', __LINE__, __FILE__, $sql ); ! } // -------------------------------- // Complete... now send a message to user *************** *** 235,240 **** $message = $lang['Pics_deleted_successfully']; ! $template->assign_vars( array( 'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid( album_append_uid( this_smartor_mxurl( "smartor_mode=album_cat&cat_id=$cat_id" ) ) ) . '">' ) ! ); if ( $album_user_id == ALBUM_PUBLIC_GALLERY ) --- 238,242 ---- $message = $lang['Pics_deleted_successfully']; ! $template->assign_vars( array( 'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid( album_append_uid( this_smartor_mxurl( "smartor_mode=album_cat&cat_id=$cat_id" ) ) ) . '">' ) ); if ( $album_user_id == ALBUM_PUBLIC_GALLERY ) *************** *** 251,257 **** mx_message_die( GENERAL_MESSAGE, $message ); } - // +------------------------------------------------------+ - // | Powered by Photo Album 2.x.x (c) 2002-2003 Smartor | - // +------------------------------------------------------+ - ?> \ No newline at end of file --- 253,255 ---- Index: album_page.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/includes/album_page.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** album_page.php 5 Apr 2006 23:03:49 -0000 1.5 --- album_page.php 30 Jun 2006 21:10:55 -0000 1.6 *************** *** 8,12 **** * */ ! if ( !defined( 'IN_PORTAL' ) ) { --- 8,17 ---- * */ ! ! // +-------------------------------------------------------------+ ! // | Powered by Photo Album 2.x.x (c) 2002-2003 Smartor | ! // | with Volodymyr (CLowN) Skoryk's Service Pack 1 © 2003-2004 | ! // +-------------------------------------------------------------+ ! if ( !defined( 'IN_PORTAL' ) ) { *************** *** 170,174 **** } ! $template->set_filenames( array( 'body' => 'album_page_body.tpl' ) ); --- 175,179 ---- } ! $template->set_filenames( array( 'body' => 'album_page_body.tpl' ) ); *************** *** 182,220 **** } ! $template->assign_vars( array( 'CAT_TITLE' => $thiscat['cat_title'], ! 'U_VIEW_CAT' => ( $cat_id != PERSONAL_GALLERY ) ? append_sid( this_smartor_mxurl( "smartor_mode=album_cat&cat_id=$cat_id" ) ) : append_sid( this_smartor_mxurl( "smartor_mode=album_personal&user_id=$user_id" ) ), ! ! 'U_PIC' => append_sid( this_smartor_mxurl( "smartor_mode=album_pic&pic_id=$pic_id" ) ), ! ! 'PIC_TITLE' => $thispic['pic_title'], ! 'PIC_DESC' => nl2br( $thispic['pic_desc'] ), ! ! 'POSTER' => $poster, ! ! 'PIC_TIME' => create_date( $board_config['default_dateformat'], $thispic['pic_time'], $board_config['board_timezone'] ), ! ! 'PIC_VIEW' => $thispic['pic_view_count'], ! 'PIC_RATING' => ( $thispic['rating'] != 0 ) ? round( $thispic['rating'], 2 ) : $lang['Not_rated'], ! 'PIC_COMMENTS' => $thispic['comments'], ! 'U_RATE' => append_sid( this_smartor_mxurl( "smartor_mode=album_rate&pic_id=$pic_id" ) ), ! 'U_COMMENT' => append_sid( this_smartor_mxurl( "smartor_mode=album_comment&pic_id=$pic_id" ) ), ! 'U_NEXT' => append_sid( this_smartor_mxurl( "smartor_mode=album_page&pic_id=$pic_id&mode=next" ) ), ! 'U_PREVIOUS' => append_sid( this_smartor_mxurl( "smartor_mode=album_page&pic_id=$pic_id&mode=previous" ) ), ! 'L_NEXT' => $lang['Next'], ! 'L_PREVIOUS' => $lang['Previous'], ! 'L_RATING' => $lang['Rating'], ! 'L_PIC_TITLE' => $lang['Pic_Title'], ! 'L_PIC_DESC' => $lang['Pic_Desc'], ! 'L_POSTER' => $lang['Poster'], ! 'L_POSTED' => $lang['Posted'], ! 'L_VIEW' => $lang['View'], ! 'L_COMMENTS' => $lang['Comments'] ) ! ); if ( $album_config['rate'] ) --- 187,221 ---- } ! $template->assign_vars( array( ! 'CAT_TITLE' => $thiscat['cat_title'], ! 'U_VIEW_CAT' => ( $cat_id != PERSONAL_GALLERY ) ? append_sid( this_smartor_mxurl( "smartor_mode=album_cat&cat_id=$cat_id" ) ) : append_sid( this_smartor_mxurl( "smartor_mode=album_personal&user_id=$user_id" ) ), ! 'U_PIC' => append_sid( this_smartor_mxurl( "smartor_mode=album_pic&pic_id=$pic_id" ) ), ! 'PIC_TITLE' => $thispic['pic_title'], ! 'PIC_DESC' => nl2br( $thispic['pic_desc'] ), ! 'POSTER' => $poster, ! 'PIC_TIME' => create_date( $board_config['default_dateformat'], $thispic['pic_time'], $board_config['board_timezone'] ), ! 'PIC_VIEW' => $thispic['pic_view_count'], ! 'PIC_RATING' => ( $thispic['rating'] != 0 ) ? round( $thispic['rating'], 2 ) : $lang['Not_rated'], ! 'PIC_COMMENTS' => $thispic['comments'], ! 'U_RATE' => append_sid( this_smartor_mxurl( "smartor_mode=album_rate&pic_id=$pic_id" ) ), ! 'U_COMMENT' => append_sid( this_smartor_mxurl( "smartor_mode=album_comment&pic_id=$pic_id" ) ), ! 'U_NEXT' => append_sid( this_smartor_mxurl( "smartor_mode=album_page&pic_id=$pic_id&mode=next" ) ), ! 'U_PREVIOUS' => append_sid( this_smartor_mxurl( "smartor_mode=album_page&pic_id=$pic_id&mode=previous" ) ), ! 'L_NEXT' => $lang['Next'], ! 'L_PREVIOUS' => $lang['Previous'], ! 'L_RATING' => $lang['Rating'], ! 'L_PIC_TITLE' => $lang['Pic_Title'], ! 'L_PIC_DESC' => $lang['Pic_Desc'], ! 'L_POSTER' => $lang['Poster'], ! 'L_POSTED' => $lang['Posted'], ! 'L_VIEW' => $lang['View'], ! 'L_COMMENTS' => $lang['Comments'] ) ! ); if ( $album_config['rate'] ) *************** *** 236,242 **** include( $mx_root_path . 'includes/page_tail.' . $phpEx ); } - // +------------------------------------------------------+ - // | Powered by Photo Album 2.x.x (c) 2002-2003 Smartor | - // +------------------------------------------------------+ - ?> \ No newline at end of file --- 237,239 ---- Index: album_pic.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/includes/album_pic.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** album_pic.php 5 Apr 2006 23:03:49 -0000 1.4 --- album_pic.php 30 Jun 2006 21:10:56 -0000 1.5 *************** *** 8,12 **** * */ ! if ( !defined( 'IN_PORTAL' ) ) { --- 8,17 ---- * */ ! ! // +-------------------------------------------------------------+ ! // | Powered by Photo Album 2.x.x (c) 2002-2003 Smartor | ! // | with Volodymyr (CLowN) Skoryk's Service Pack 1 © 2003-2004 | ! // +-------------------------------------------------------------+ ! if ( !defined( 'IN_PORTAL' ) ) { *************** *** 16,22 **** if ( defined( 'ALBUM_SP_CONFIG_TABLE' ) ) { ! // // Function for watermark ! // function mergePics( $sourcefile, $insertfile, $pos = 0, $transition = 50, $filetype ) { --- 21,27 ---- if ( defined( 'ALBUM_SP_CONFIG_TABLE' ) ) { ! // // Function for watermark ! // function mergePics( $sourcefile, $insertfile, $pos = 0, $transition = 50, $filetype ) { *************** *** 24,28 **** switch ( $filetype ) ! { // GIF support case '.gif': --- 29,33 ---- switch ( $filetype ) ! { // GIF support case '.gif': *************** *** 37,41 **** default: break; ! } // Get the size of both pics $sourcefile_width = imageSX( $sourcefile_id ); --- 42,46 ---- default: break; ! } // Get the size of both pics $sourcefile_width = imageSX( $sourcefile_id ); *************** *** 92,101 **** default: break; ! } // Merge the two pix ! imageCopyMerge( $sourcefile_id, $insertfile_id, $dest_x, $dest_y, 0, 0, $insertfile_width, $insertfile_height, $transition ); // Create the final image switch ( $filetype ) ! { // GIF support case '.gif': --- 97,106 ---- default: break; ! } // Merge the two pix ! imageCopyMerge( $sourcefile_id, $insertfile_id, $dest_x, $dest_y, 0, 0, $insertfile_width, $insertfile_height, $transition ); // Create the final image switch ( $filetype ) ! { // GIF support case '.gif': *************** *** 113,120 **** ImageDestroy( $sourcefile_id ); ! } ! // // END: Function for watermark ! // } // ------------------------------------ --- 118,125 ---- ImageDestroy( $sourcefile_id ); ! } ! // // END: Function for watermark ! // } // ------------------------------------ *************** *** 135,195 **** /* ! // ------------------------------------ ! // Get this pic info ! // ------------------------------------ ! $sql = "SELECT * ! FROM ". ALBUM_TABLE ." ! WHERE pic_id = '$pic_id'"; ! if( !$result = $db->sql_query($sql) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not query pic information', '', __LINE__, __FILE__, $sql); ! } ! $thispic = $db->sql_fetchrow($result); ! $db->sql_freeresult($result); ! $cat_id = $thispic['pic_cat_id']; ! $user_id = $thispic['pic_user_id']; ! $pic_filetype = substr($thispic['pic_filename'], strlen($thispic['pic_filename']) - 4, 4); ! $pic_filename = $thispic['pic_filename']; ! $pic_thumbnail = $thispic['pic_thumbnail']; ! if( empty($thispic) or !file_exists(ALBUM_UPLOAD_PATH . $pic_filename) ) ! { ! mx_message_die(GENERAL_MESSAGE, $lang['Pic_not_exist']); ! } ! // ------------------------------------ ! // Get the current Category Info ! // ------------------------------------ ! if( $cat_id != PERSONAL_GALLERY ) ! { ! $sql = "SELECT * ! FROM ". ALBUM_CAT_TABLE ." ! WHERE cat_id = '$cat_id'"; ! if( !$result = $db->sql_query($sql) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not query category information', '', __LINE__, __FILE__, $sql); ! } ! $thiscat = $db->sql_fetchrow($result); ! } ! else ! { ! $thiscat = init_personal_gallery_cat($user_id); ! } ! if( empty($thiscat) ) ! { ! mx_message_die(GENERAL_MESSAGE, $lang['Category_not_exist']); ! } ! // ------------------------------------ ! // Check the permissions ! // ------------------------------------ ! $album_user_access = album_user_access($cat_id, $thiscat, 1, 0, 0, 0, 0, 0); // VIEW */ // --- Album category Hierarchy : begin --- 140,200 ---- /* ! // ------------------------------------ ! // Get this pic info ! // ------------------------------------ ! $sql = "SELECT * ! FROM ". ALBUM_TABLE ." ! WHERE pic_id = '$pic_id'"; ! if( !$result = $db->sql_query($sql) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not query pic information', '', __LINE__, __FILE__, $sql); ! } ! $thispic = $db->sql_fetchrow($result); ! $db->sql_freeresult($result); ! $cat_id = $thispic['pic_cat_id']; ! $user_id = $thispic['pic_user_id']; ! $pic_filetype = substr($thispic['pic_filename'], strlen($thispic['pic_filename']) - 4, 4); ! $pic_filename = $thispic['pic_filename']; ! $pic_thumbnail = $thispic['pic_thumbnail']; ! if( empty($thispic) or !file_exists(ALBUM_UPLOAD_PATH . $pic_filename) ) ! { ! mx_message_die(GENERAL_MESSAGE, $lang['Pic_not_exist']); ! } ! // ------------------------------------ ! // Get the current Category Info ! // ------------------------------------ ! if( $cat_id != PERSONAL_GALLERY ) ! { ! $sql = "SELECT * ! FROM ". ALBUM_CAT_TABLE ." ! WHERE cat_id = '$cat_id'"; ! if( !$result = $db->sql_query($sql) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not query category information', '', __LINE__, __FILE__, $sql); ! } ! $thiscat = $db->sql_fetchrow($result); ! } ! else ! { ! $thiscat = init_personal_gallery_cat($user_id); ! } ! if( empty($thiscat) ) ! { ! mx_message_die(GENERAL_MESSAGE, $lang['Category_not_exist']); ! } ! // ------------------------------------ ! // Check the permissions ! // ------------------------------------ ! $album_user_access = album_user_access($cat_id, $thiscat, 1, 0, 0, 0, 0, 0); // VIEW */ // --- Album category Hierarchy : begin *************** *** 221,225 **** { mx_message_die( GENERAL_MESSAGE, $lang['Pic_not_exist'] ); ! } // ------------------------------------ // Check the permissions --- 226,230 ---- { mx_message_die( GENERAL_MESSAGE, $lang['Pic_not_exist'] ); ! } // ------------------------------------ // Check the permissions *************** *** 230,234 **** { mx_message_die( GENERAL_MESSAGE, $lang['Not_Authorised'] ); ! } // ------------------------------------ // Check Pic Approval --- 235,239 ---- { mx_message_die( GENERAL_MESSAGE, $lang['Not_Authorised'] ); ! } // ------------------------------------ // Check Pic Approval *************** *** 243,247 **** } } ! } // --- Album category Hierarchy : end // ------------------------------------ --- 248,252 ---- } } ! } // --- Album category Hierarchy : end // ------------------------------------ *************** *** 280,298 **** } ! /* ! +---------------------------------------------------------- ! | Main work here... ! +---------------------------------------------------------- ! */ // ------------------------------------ // Increase view counter // ------------------------------------ ! $sql = "UPDATE " . ALBUM_TABLE . " ! SET pic_view_count = pic_view_count + 1 WHERE pic_id = '$pic_id'"; if ( !$result = $db->sql_query( $sql ) ) { mx_message_die( GENERAL_ERROR, 'Could not update pic information', '', __LINE__, __FILE__, $sql ); ! } // ------------------------------------ // Okay, now we can send image to the browser --- 285,303 ---- } ! /* ! +---------------------------------------------------------- ! | Main work here... ! +---------------------------------------------------------- ! */ // ------------------------------------ // Increase view counter // ------------------------------------ ! $sql = "UPDATE " . ALBUM_TABLE . " ! SET pic_view_count = pic_view_count + 1 WHERE pic_id = '$pic_id'"; if ( !$result = $db->sql_query( $sql ) ) { mx_message_die( GENERAL_ERROR, 'Could not update pic information', '', __LINE__, __FILE__, $sql ); ! } // ------------------------------------ // Okay, now we can send image to the browser *************** *** 347,355 **** readfile( ALBUM_UPLOAD_PATH . $thispic['pic_filename'] ); ! exit; ! // +--------------------------------------------------------+ ! // | Powered by Photo Album 2.x.x (c) 2002-2003 Smartor | ! // | with Volodymyr (CLowN) Skoryk's Service Pack 1 © 2003 | ! // +--------------------------------------------------------+ ! ! ?> \ No newline at end of file --- 352,355 ---- readfile( ALBUM_UPLOAD_PATH . $thispic['pic_filename'] ); ! exit; ! ?> \ No newline at end of file Index: album_cat_sort.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/includes/album_cat_sort.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** album_cat_sort.php 18 Jun 2006 10:47:56 -0000 1.7 --- album_cat_sort.php 30 Jun 2006 21:10:55 -0000 1.8 *************** *** 9,12 **** --- 9,17 ---- */ + // +--------------------------------------------------------+ + // | Powered by Photo Album 2.x.x (c) 2002-2003 Smartor | + // | with Volodymyr (CLowN) Skoryk's Service Pack 1 © 2003 | + // +--------------------------------------------------------+ + define( 'IN_PORTAL', true ); $mx_root_path = '../'; *************** *** 157,163 **** for ( $i = 0; $i < ( count( $auth_data ) - 1 ); $i++ ) // ignore MODERATOR in this loop { ! // we should skip a loop if RATE and COMMENT is disabled ! if ( ( ( $album_config['rate'] == 0 ) and ( $auth_key[$i] == 'rate' ) ) or ( ( $album_config['comment'] == 0 ) and ( $auth_key[$i] == 'comment' ) ) ) { --- 162,168 ---- for ( $i = 0; $i < ( count( $auth_data ) - 1 ); $i++ ) // ignore MODERATOR in this loop { ! // // we should skip a loop if RATE and COMMENT is disabled ! // if ( ( ( $album_config['rate'] == 0 ) and ( $auth_key[$i] == 'rate' ) ) or ( ( $album_config['comment'] == 0 ) and ( $auth_key[$i] == 'comment' ) ) ) { *************** *** 168,172 **** --- 173,180 ---- $auth_list .= '<br />'; } + + // // add Moderator Control Panel here + // if ( ( $userdata['user_level'] == ADMIN ) or ( $auth_data['moderator'] == 1 ) ) { *************** *** 391,409 **** { $approval_mode = ( $picrow[$j]['pic_approval'] == 0 ) ? 'approval' : 'unapproval'; - $approval_link = '<a href="' . append_sid( this_smartor_mxurl( "smartor_mode=album_modcp&mode=$approval_mode&pic_id=" . $picrow[$j]['pic_id'] ) ) . '">'; - $approval_link .= ( $picrow[$j]['pic_approval'] == 0 ) ? '<b>' . $lang['Approve'] . '</b>' : $lang['Unapprove']; - $approval_link .= '</a>'; } } ! $template->assign_block_vars( 'picrow.piccol', array( 'U_PIC' => ( $album_config['fullpic_popup'] ) ? append_sid( this_smartor_mxurl( "smartor_mode=album_pic&pic_id=" . $picrow[$j]['pic_id'] ) ) : append_sid( this_smartor_mxurl( "smartor_mode=album_page&pic_id=" . $picrow[$j]['pic_id'] ) ), ! 'THUMBNAIL' => append_sid( this_smartor_mxurl( "smartor_mode=album_thumbnail&pic_id=" . $picrow[$j]['pic_id'] ) ), ! 'DESC' => $picrow[$j]['pic_desc'], ! 'APPROVAL' => $approval_link, ! ) ! ); if ( ( $picrow[$j]['user_id'] == ALBUM_GUEST ) or ( $picrow[$j]['username'] == '' ) ) --- 399,414 ---- { $approval_mode = ( $picrow[$j]['pic_approval'] == 0 ) ? 'approval' : 'unapproval'; $approval_link = '<a href="' . append_sid( this_smartor_mxurl( "smartor_mode=album_modcp&mode=$approval_mode&pic_id=" . $picrow[$j]['pic_id'] ) ) . '">'; $approval_link .= ( $picrow[$j]['pic_approval'] == 0 ) ? '<b>' . $lang['Approve'] . '</b>' : $lang['Unapprove']; $approval_link .= '</a>'; } } ! $template->assign_block_vars( 'picrow.piccol', array( ! 'U_PIC' => ( $album_config['fullpic_popup'] ) ? append_sid( this_smartor_mxurl( "smartor_mode=album_pic&pic_id=" . $picrow[$j]['pic_id'] ) ) : append_sid( this_smartor_mxurl( "smartor_mode=album_page&pic_id=" . $picrow[$j]['pic_id'] ) ), ! 'THUMBNAIL' => append_sid( this_smartor_mxurl( "smartor_mode=album_thumbnail&pic_id=" . $picrow[$j]['pic_id'] ) ), ! 'DESC' => $picrow[$j]['pic_desc'], ! 'APPROVAL' => $approval_link, ! )); if ( ( $picrow[$j]['user_id'] == ALBUM_GUEST ) or ( $picrow[$j]['username'] == '' ) ) *************** *** 416,447 **** } ! $template->assign_block_vars( 'picrow.pic_detail', array( 'TITLE' => $picrow[$j]['pic_title'], ! 'POSTER' => $pic_poster, ! 'TIME' => create_date( $board_config['default_dateformat'], $picrow[$j]['pic_time'], $board_config['board_timezone'] ), ! ! 'VIEW' => $picrow[$j]['pic_view_count'], ! ! 'RATING' => ( $album_config['rate'] == 1 ) ? ( '<a href="' . append_sid( this_smartor_mxurl( "smartor_mode=album_rate&pic_id=" . $picrow[$j]['pic_id'] ) ) . '">' . $lang['Rating'] . '</a> : ' . $picrow[$j]['rating'] . '<br />' ) : '', ! ! 'COMMENTS' => ( $album_config['comment'] == 1 ) ? ( '<a href="' . append_sid( this_smartor_mxurl( "smartor_mode=album_comment&pic_id=" . $picrow[$j]['pic_id'] ) ) . '">' . $lang['Comments'] . '</a> : ' . $picrow[$j]['comments'] . '<br />' ) : '', ! ! 'EDIT' => ( ( $auth_data['edit'] and ( $picrow[$j]['pic_user_id'] == $userdata['user_id'] ) ) or ( $auth_data['moderator'] and ( $thiscat['cat_edit_level'] != ALBUM_ADMIN ) ) or ( $userdata['user_level'] == ADMIN ) ) ? '<a href="' . append_sid( this_smartor_mxurl( "smartor_mode=album_edit&pic_id=" . $picrow[$j]['pic_id'] ) ) . '">' . $lang['Edit_pic'] . '</a>' : '', ! ! 'DELETE' => ( ( $auth_data['delete'] and ( $picrow[$j]['pic_user_id'] == $userdata['user_id'] ) ) or ( $auth_data['moderator'] and ( $thiscat['cat_delete_level'] != ALBUM_ADMIN ) ) or ( $userdata['user_level'] == ADMIN ) ) ? '<a href="' . append_sid( this_smartor_mxurl( "smartor_mode=album_delete&pic_id=" . $picrow[$j]['pic_id'] ) ) . '">' . $lang['Delete_pic'] . '</a>' : '', ! ! 'MOVE' => ( $auth_data['moderator'] ) ? '<a href="' . append_sid( this_smartor_mxurl( "smartor_mode=album_modcp&mode=move&pic_id=" . $picrow[$j]['pic_id'] ) ) . '">' . $lang['Move'] . '</a>' : '', ! ! 'LOCK' => ( $auth_data['moderator'] ) ? '<a href="' . append_sid( this_smartor_mxurl( "smartor_mode=album_modcp&mode=" . ( ( $picrow[$j]['pic_lock'] == 0 ) ? 'lock' : 'unlock' ) . "&pic_id=" . $picrow[$j]['pic_id'] ) ) . '">' . ( ( $picrow[$j]['pic_lock'] == 0 ) ? $lang['Lock'] : $lang['Unlock'] ) . '</a>' : '', ! ! 'IP' => ( $userdata['user_level'] == ADMIN ) ? $lang['IP_Address'] . ': <a href="http://www.nic.com/cgi-bin/whois.cgi?query=' . decode_ip( $picrow[$j]['pic_user_ip'] ) . '" target="_blank">' . decode_ip( $picrow[$j]['pic_user_ip'] ) . '</a><br />' : '' ! ) ! ); } } // (watch out Jaime's Initials Mod includes $initial in the pagination link) ! $template->assign_vars( array( 'PAGINATION' => generate_pagination( append_sid( this_smartor_mxurl( "smartor_mode=album_cat&cat_id=$cat_id&sort_method=$sort_method&sort_order=$sort_order&initial=" . ( ( isset( $HTTP_GET_VARS['initial'] ) ) ? ( $HTTP_GET_VARS['initial'] ) : 'all' ) ) ), $total_pics, $pics_per_page, $start ), ! 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $pics_per_page ) + 1 ), ceil( $total_pics / $pics_per_page ) ) ! ) ! ); } else --- 421,444 ---- } ! $template->assign_block_vars( 'picrow.pic_detail', array( ! 'TITLE' => $picrow[$j]['pic_title'], ! 'POSTER' => $pic_poster, ! 'TIME' => create_date( $board_config['default_dateformat'], $picrow[$j]['pic_time'], $board_config['board_timezone'] ), ! 'VIEW' => $picrow[$j]['pic_view_count'], ! 'RATING' => ( $album_config['rate'] == 1 ) ? ( '<a href="' . append_sid( this_smartor_mxurl( "smartor_mode=album_rate&pic_id=" . $picrow[$j]['pic_id'] ) ) . '">' . $lang['Rating'] . '</a> : ' . $picrow[$j]['rating'] . '<br />' ) : '', ! 'COMMENTS' => ( $album_config['comment'] == 1 ) ? ( '<a href="' . append_sid( this_smartor_mxurl( "smartor_mode=album_comment&pic_id=" . $picrow[$j]['pic_id'] ) ) . '">' . $lang['Comments'] . '</a> : ' . $picrow[$j]['comments'] . '<br />' ) : '', ! 'EDIT' => ( ( $auth_data['edit'] and ( $picrow[$j]['pic_user_id'] == $userdata['user_id'] ) ) or ( $auth_data['moderator'] and ( $thiscat['cat_edit_level'] != ALBUM_ADMIN ) ) or ( $userdata['user_level'] == ADMIN ) ) ? '<a href="' . append_sid( this_smartor_mxurl( "smartor_mode=album_edit&pic_id=" . $picrow[$j]['pic_id'] ) ) . '">' . $lang['Edit_pic'] . '</a>' : '', ! 'DELETE' => ( ( $auth_data['delete'] and ( $picrow[$j]['pic_user_id'] == $userdata['user_id'] ) ) or ( $auth_data['moderator'] and ( $thiscat['cat_delete_level'] != ALBUM_ADMIN ) ) or ( $userdata['user_level'] == ADMIN ) ) ? '<a href="' . append_sid( this_smartor_mxurl( "smartor_mode=album_delete&pic_id=" . $picrow[$j]['pic_id'] ) ) . '">' . $lang['Delete_pic'] . '</a>' : '', ! 'MOVE' => ( $auth_data['moderator'] ) ? '<a href="' . append_sid( this_smartor_mxurl( "smartor_mode=album_modcp&mode=move&pic_id=" . $picrow[$j]['pic_id'] ) ) . '">' . $lang['Move'] . '</a>' : '', ! 'LOCK' => ( $auth_data['moderator'] ) ? '<a href="' . append_sid( this_smartor_mxurl( "smartor_mode=album_modcp&mode=" . ( ( $picrow[$j]['pic_lock'] == 0 ) ? 'lock' : 'unlock' ) . "&pic_id=" . $picrow[$j]['pic_id'] ) ) . '">' . ( ( $picrow[$j]['pic_lock'] == 0 ) ? $lang['Lock'] : $lang['Unlock'] ) . '</a>' : '', ! 'IP' => ( $userdata['user_level'] == ADMIN ) ? $lang['IP_Address'] . ': <a href="http://www.nic.com/cgi-bin/whois.cgi?query=' . decode_ip( $picrow[$j]['pic_user_ip'] ) . '" target="_blank">' . decode_ip( $picrow[$j]['pic_user_ip'] ) . '</a><br />' : '' ! )); } } // (watch out Jaime's Initials Mod includes $initial in the pagination link) ! $template->assign_vars( array( ! 'PAGINATION' => generate_pagination( append_sid( this_smartor_mxurl( "smartor_mode=album_cat&cat_id=$cat_id&sort_method=$sort_method&sort_order=$sort_order&initial=" . ( ( isset( $HTTP_GET_VARS['initial'] ) ) ? ( $HTTP_GET_VARS['initial'] ) : 'all' ) ) ), $total_pics, $pics_per_page, $start ), ! 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $pics_per_page ) + 1 ), ceil( $total_pics / $pics_per_page ) ) ! )); } else *************** *** 535,596 **** } ... [truncated message content] |
Update of /cvsroot/mxbb/mx_smartor/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv9308/modules/mx_smartor/admin Modified Files: admin_album_auth.php admin_album_cat.php admin_album_clearcache.php admin_album_clown_SP.php admin_album_config.php admin_album_personal.php Log Message: This module is really messy. I have done some general code cleanup and security scrutiny. Still, much to do... Index: admin_album_auth.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/admin/admin_album_auth.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** admin_album_auth.php 2 May 2006 23:29:32 -0000 1.8 --- admin_album_auth.php 30 Jun 2006 21:10:54 -0000 1.9 *************** *** 9,12 **** --- 9,14 ---- */ + /* Powered by Photo Album v2.x.x (c) 2002-2003 Smartor */ + define( 'IN_PORTAL', 1 ); *************** *** 25,29 **** require( $mx_root_path . 'admin/pagestart.' . $phpEx ); include_once( $module_root_path . 'album_mod/album_common.' . $phpEx ); ! include_once( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); $album_user_id = ALBUM_PUBLIC_GALLERY; --- 27,42 ---- require( $mx_root_path . 'admin/pagestart.' . $phpEx ); include_once( $module_root_path . 'album_mod/album_common.' . $phpEx ); ! ! // ********************************************************************** ! // Read language definition ! // ********************************************************************** ! if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) ! { ! include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); ! } ! else ! { ! include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); ! } $album_user_id = ALBUM_PUBLIC_GALLERY; *************** *** 59,70 **** ); ! $template->assign_vars( array( 'L_ALBUM_AUTH_TITLE' => $lang['Album_Auth_Title'], ! 'L_ALBUM_AUTH_EXPLAIN' => $lang['Album_Auth_Explain'], ! 'L_SELECT_CAT' => $lang['Select_a_Category'], ! 'S_ALBUM_ACTION' => append_sid( "admin_album_auth.$phpEx" ), ! 'L_LOOK_UP_CAT' => $lang['Look_up_Category'], ! // --- Album Category Hierarchy : begin ! // --- version : 1.1.0 ! 'CAT_SELECT_TITLE' => $s_album_cat_list ) // --- Album Category Hierarchy : end ); --- 72,84 ---- ); ! $template->assign_vars( array( ! 'L_ALBUM_AUTH_TITLE' => $lang['Album_Auth_Title'], ! 'L_ALBUM_AUTH_EXPLAIN' => $lang['Album_Auth_Explain'], ! 'L_SELECT_CAT' => $lang['Select_a_Category'], ! 'S_ALBUM_ACTION' => append_sid( "admin_album_auth.$phpEx" ), ! 'L_LOOK_UP_CAT' => $lang['Look_up_Category'], ! // --- Album Category Hierarchy : begin ! // --- version : 1.1.0 ! 'CAT_SELECT_TITLE' => $s_album_cat_list ) // --- Album Category Hierarchy : end ); *************** *** 80,105 **** $cat_id = intval( $HTTP_POST_VARS['cat_id'] ); ! $template->set_filenames( array( 'body' => 'admin/album_auth_body.tpl' ) ! ); ! $template->assign_vars( array( 'L_ALBUM_AUTH_TITLE' => $lang['Album_Auth_Title'], ! 'L_ALBUM_AUTH_EXPLAIN' => $lang['Album_Auth_Explain'], ! 'L_SUBMIT' => $lang['Submit'], ! 'L_RESET' => $lang['Reset'], ! 'L_GROUPS' => $lang['Usergroups'], ! 'L_VIEW' => $lang['View'], ! 'L_UPLOAD' => $lang['Upload'], ! 'L_RATE' => $lang['Rate'], ! 'L_COMMENT' => $lang['Comment'], ! 'L_EDIT' => $lang['Edit'], ! 'L_DELETE' => $lang['Delete'], ! 'L_IS_MODERATOR' => $lang['Is_Moderator'], ! 'S_ALBUM_ACTION' => append_sid( "admin_album_auth.$phpEx?cat_id=$cat_id" ), ! ) ! ); // Get the list of phpBB usergroups $sql = "SELECT group_id, group_name FROM " . GROUPS_TABLE . " --- 94,121 ---- $cat_id = intval( $HTTP_POST_VARS['cat_id'] ); ! $template->set_filenames( array( 'body' => 'admin/album_auth_body.tpl' ) ); ! $template->assign_vars( array( ! 'L_ALBUM_AUTH_TITLE' => $lang['Album_Auth_Title'], ! 'L_ALBUM_AUTH_EXPLAIN' => $lang['Album_Auth_Explain'], ! 'L_SUBMIT' => $lang['Submit'], ! 'L_RESET' => $lang['Reset'], ! 'L_GROUPS' => $lang['Usergroups'], ! 'L_VIEW' => $lang['View'], ! 'L_UPLOAD' => $lang['Upload'], ! 'L_RATE' => $lang['Rate'], ! 'L_COMMENT' => $lang['Comment'], ! 'L_EDIT' => $lang['Edit'], ! 'L_DELETE' => $lang['Delete'], ! 'L_IS_MODERATOR' => $lang['Is_Moderator'], ! 'S_ALBUM_ACTION' => append_sid( "admin_album_auth.$phpEx?cat_id=$cat_id" ), ! )); ! ! // // Get the list of phpBB usergroups + // $sql = "SELECT group_id, group_name FROM " . GROUPS_TABLE . " *************** *** 115,119 **** --- 131,138 ---- $groupdata[] = $row; } + + // // Get info of this cat + // $sql = "SELECT cat_id, cat_title, cat_view_groups, cat_upload_groups, cat_rate_groups, cat_comment_groups, cat_edit_groups, cat_delete_groups, cat_moderator_groups FROM " . ALBUM_CAT_TABLE . " *************** *** 137,157 **** for ( $i = 0; $i < count( $groupdata ); $i++ ) { ! $template->assign_block_vars( 'grouprow', array( 'GROUP_ID' => $groupdata[$i]['group_id'], ! 'GROUP_NAME' => $groupdata[$i]['group_name'], ! ! 'VIEW_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $view_groups ) ) ? 'checked="checked"' : '', ! ! 'UPLOAD_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $upload_groups ) ) ? 'checked="checked"' : '', ! ! 'RATE_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $rate_groups ) ) ? 'checked="checked"' : '', ! ! 'COMMENT_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $comment_groups ) ) ? 'checked="checked"' : '', ! ! 'EDIT_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $edit_groups ) ) ? 'checked="checked"' : '', ! ! 'DELETE_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $delete_groups ) ) ? 'checked="checked"' : '', ! ! 'MODERATOR_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $moderator_groups ) ) ? 'checked="checked"' : '' ) ! ); } --- 156,170 ---- for ( $i = 0; $i < count( $groupdata ); $i++ ) { ! $template->assign_block_vars( 'grouprow', array( ! 'GROUP_ID' => $groupdata[$i]['group_id'], ! 'GROUP_NAME' => $groupdata[$i]['group_name'], ! 'VIEW_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $view_groups ) ) ? 'checked="checked"' : '', ! 'UPLOAD_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $upload_groups ) ) ? 'checked="checked"' : '', ! 'RATE_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $rate_groups ) ) ? 'checked="checked"' : '', ! 'COMMENT_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $comment_groups ) ) ? 'checked="checked"' : '', ! 'EDIT_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $edit_groups ) ) ? 'checked="checked"' : '', ! 'DELETE_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $delete_groups ) ) ? 'checked="checked"' : '', ! 'MODERATOR_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $moderator_groups ) ) ? 'checked="checked"' : '' ) ! ); } *************** *** 186,191 **** } } - - /* Powered by Photo Album v2.x.x (c) 2002-2003 Smartor */ - ?> \ No newline at end of file --- 199,201 ---- Index: admin_album_clearcache.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/admin/admin_album_clearcache.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** admin_album_clearcache.php 2 May 2006 23:29:32 -0000 1.8 --- admin_album_clearcache.php 30 Jun 2006 21:10:55 -0000 1.9 *************** *** 9,12 **** --- 9,14 ---- */ + /* Powered by Photo Album v2.x.x (c) 2002-2003 Smartor */ + define( 'IN_PORTAL', 1 ); *************** *** 18,23 **** } // Let's set the root dir for phpBB ! $module_root_path = './../'; $mx_root_path = './../../../'; --- 20,26 ---- } + // // Let's set the root dir for phpBB ! // $module_root_path = './../'; $mx_root_path = './../../../'; *************** *** 25,51 **** require( $mx_root_path . 'admin/pagestart.' . $phpEx ); include_once( $module_root_path . 'album_mod/album_common.' . $phpEx ); - include_once( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); ! if ( !isset( $HTTP_POST_VARS['confirm'] ) ) { // Start output of page ! $template->set_filenames( array( 'body' => 'confirm_body.tpl' ) ! ); ! ! $template->assign_vars( array( 'MESSAGE_TITLE' => $lang['Confirm'], ! 'MESSAGE_TEXT' => $lang['Album_clear_cache_confirm'], ! 'L_NO' => $lang['No'], ! 'L_YES' => $lang['Yes'], ! 'S_CONFIRM_ACTION' => append_sid( "admin_album_clearcache.$phpEx" ), ! ) ! ); // Generate the page ! $template->pparse( 'body' ); --- 28,65 ---- require( $mx_root_path . 'admin/pagestart.' . $phpEx ); include_once( $module_root_path . 'album_mod/album_common.' . $phpEx ); ! // ********************************************************************** ! // Read language definition ! // ********************************************************************** ! if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) { + include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); + } + else + { + include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); + } + if ( !isset( $HTTP_POST_VARS['confirm'] ) ) + { + // // Start output of page + // + $template->set_filenames( array( 'body' => 'confirm_body.tpl' ) ); ! $template->assign_vars( array( ! 'MESSAGE_TITLE' => $lang['Confirm'], ! 'MESSAGE_TEXT' => $lang['Album_clear_cache_confirm'], ! 'L_NO' => $lang['No'], ! 'L_YES' => $lang['Yes'], ! 'S_CONFIRM_ACTION' => append_sid( "admin_album_clearcache.$phpEx" ), ! )); + // // Generate the page ! // $template->pparse( 'body' ); *************** *** 68,73 **** mx_message_die( GENERAL_MESSAGE, $lang['Thumbnail_cache_cleared_successfully'] ); } - - /* Powered by Photo Album v2.x.x (c) 2002-2003 Smartor */ - ?> \ No newline at end of file --- 82,84 ---- Index: admin_album_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/admin/admin_album_cat.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** admin_album_cat.php 2 May 2006 23:29:32 -0000 1.8 --- admin_album_cat.php 30 Jun 2006 21:10:55 -0000 1.9 *************** *** 9,12 **** --- 9,14 ---- */ + /* Powered by Photo Album v2.x.x (c) 2002-2003 Smartor */ + define( 'IN_PORTAL', 1 ); *************** *** 18,23 **** } // Let's set the root dir for phpBB ! $module_root_path = './../'; $mx_root_path = './../../../'; --- 20,26 ---- } + // // Let's set the root dir for phpBB ! // $module_root_path = './../'; $mx_root_path = './../../../'; *************** *** 26,56 **** include_once( $module_root_path . 'album_mod/album_common.' . $phpEx ); - include_once( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); ! /* ! define('IN_PHPBB', true); ! ! if( !empty($setmodules) ) { ! $filename = basename(__FILE__); ! $module['Photo_Album']['Categories'] = $filename; ! return; } - - // - // Let's set the root dir for phpBB - // - $phpbb_root_path = '../'; - //--- Album Category Hierarchy : begin - //--- version : <= 1.1.0 - $album_root_path = $phpbb_root_path . 'album_mod/'; - //--- Album Category Hierarchy : end - $phpEx = substr(strrchr(__FILE__, '.'), 1); - require('./pagestart.' . $phpEx); - require($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx); - require($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx); - - require($album_root_path. 'album_common.'.$phpEx); - */ if ( !isset( $HTTP_POST_VARS['mode'] ) ) --- 29,44 ---- include_once( $module_root_path . 'album_mod/album_common.' . $phpEx ); ! // ********************************************************************** ! // Read language definition ! // ********************************************************************** ! if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); ! } ! else ! { ! include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); } if ( !isset( $HTTP_POST_VARS['mode'] ) ) *************** *** 66,88 **** then go back to this template file 'admin/album_cat_body.tpl'. */ ! $template->set_filenames( array( 'body' => 'admin/album_cat_body.tpl' ) ! ); // --- Album Category Hierarchy : end ! $template->assign_vars( array( 'S_ALBUM_ACTION' => append_sid( "admin_album_cat.$phpEx" ), ! 'L_CREATE_CATEGORY' => $lang['Create_category'], ! // --- Album Category Hierarchy : begin ! // --- version <= 1.1.0 ! 'L_ALBUM_INDEX' => $lang['Album_Categories_Title'] ! // --- Album Category Hierarchy : end ! ) ! ); // --- Album Category Hierarchy : begin // --- version <= 1.1.0 // get the values of level selected if ( !empty( $cat_id ) ) $parent = $cat_id; if ( !isset( $album_cat_tree['keys'][$parent] ) ) $parent = ALBUM_ROOT_CATEGORY; // display the tree album_display_admin_index( $parent ); --- 54,79 ---- then go back to this template file 'admin/album_cat_body.tpl'. */ ! $template->set_filenames( array( 'body' => 'admin/album_cat_body.tpl' ) ); // --- Album Category Hierarchy : end ! $template->assign_vars( array( ! 'S_ALBUM_ACTION' => append_sid( "admin_album_cat.$phpEx" ), ! 'L_CREATE_CATEGORY' => $lang['Create_category'], ! // --- Album Category Hierarchy : begin ! // --- version <= 1.1.0 ! 'L_ALBUM_INDEX' => $lang['Album_Categories_Title'] ! // --- Album Category Hierarchy : end ! )); // --- Album Category Hierarchy : begin // --- version <= 1.1.0 // get the values of level selected if ( !empty( $cat_id ) ) + { $parent = $cat_id; + } if ( !isset( $album_cat_tree['keys'][$parent] ) ) + { $parent = ALBUM_ROOT_CATEGORY; + } // display the tree album_display_admin_index( $parent ); *************** *** 118,211 **** $s_album_cat_list = album_get_tree_option( $catrow['cat_parent_id'], ALBUM_AUTH_VIEW, ALBUM_SELECTBOX_INCLUDE_ALL | ALBUM_SELECTBOX_INCLUDE_ROOT ); // --- Album Category Hierarchy : end ! $template->set_filenames( array( 'body' => 'admin/album_cat_new_body.tpl' ) ! ); ! $template->assign_block_vars( 'acp', array( 'L_ALBUM_CAT_TITLE' => $lang['Album_Categories_Title'], ! 'L_ALBUM_CAT_EXPLAIN' => $lang['Album_Categories_Explain'] ! ) ! ); $template->assign_vars( array( ! // --- Album Category Hierarchy : begin ! // --- version = 1.1.0 ! // -- deleted ! // --- Album Category Hierarchy : end ! 'S_ALBUM_ACTION' => append_sid( "admin_album_cat.$phpEx?cat_id=$cat_id" ), ! 'L_CAT_TITLE' => $lang['Category_Title'], ! 'L_CAT_DESC' => $lang['Category_Desc'], ! // --- Album Category Hierarchy : begin ! // --- version <= 1.1.0 ! 'L_CAT_PARENT_TITLE' => $lang['Parent_Category'], ! // --- Album Category Hierarchy : end ! 'L_CAT_PERMISSIONS' => $lang['Category_Permissions'], ! 'L_VIEW_LEVEL' => $lang['View_level'], ! 'L_UPLOAD_LEVEL' => $lang['Upload_level'], ! 'L_RATE_LEVEL' => $lang['Rate_level'], ! 'L_COMMENT_LEVEL' => $lang['Comment_level'], ! 'L_EDIT_LEVEL' => $lang['Edit_level'], ! 'L_DELETE_LEVEL' => $lang['Delete_level'], ! 'L_PICS_APPROVAL' => $lang['Pics_Approval'], ! 'L_GUEST' => $lang['Forum_ALL'], ! 'L_REG' => $lang['Forum_REG'], ! 'L_PRIVATE' => $lang['Forum_PRIVATE'], ! 'L_MOD' => $lang['Forum_MOD'], ! 'L_ADMIN' => $lang['Forum_ADMIN'], ! ! 'L_DISABLED' => $lang['Disabled'], ! 'S_CAT_TITLE' => $catrow['cat_title'], ! 'S_CAT_DESC' => $catrow['cat_desc'], ! // --- Album Category Hierarchy : begin ! // --- version <= 1.1.0 ! 'S_CAT_PARENT_OPTIONS' => $s_album_cat_list, ! // --- Album Category Hierarchy : end ! 'VIEW_GUEST' => ( $catrow['cat_view_level'] == ALBUM_GUEST ) ? 'selected="selected"' : '', ! 'VIEW_REG' => ( $catrow['cat_view_level'] == ALBUM_USER ) ? 'selected="selected"' : '', ! 'VIEW_PRIVATE' => ( $catrow['cat_view_level'] == ALBUM_PRIVATE ) ? 'selected="selected"' : '', ! 'VIEW_MOD' => ( $catrow['cat_view_level'] == ALBUM_MOD ) ? 'selected="selected"' : '', ! 'VIEW_ADMIN' => ( $catrow['cat_view_level'] == ALBUM_ADMIN ) ? 'selected="selected"' : '', ! 'UPLOAD_GUEST' => ( $catrow['cat_upload_level'] == ALBUM_GUEST ) ? 'selected="selected"' : '', ! 'UPLOAD_REG' => ( $catrow['cat_upload_level'] == ALBUM_USER ) ? 'selected="selected"' : '', ! 'UPLOAD_PRIVATE' => ( $catrow['cat_upload_level'] == ALBUM_PRIVATE ) ? 'selected="selected"' : '', ! 'UPLOAD_MOD' => ( $catrow['cat_upload_level'] == ALBUM_MOD ) ? 'selected="selected"' : '', ! 'UPLOAD_ADMIN' => ( $catrow['cat_upload_level'] == ALBUM_ADMIN ) ? 'selected="selected"' : '', ! 'RATE_GUEST' => ( $catrow['cat_rate_level'] == ALBUM_GUEST ) ? 'selected="selected"' : '', ! 'RATE_REG' => ( $catrow['cat_rate_level'] == ALBUM_USER ) ? 'selected="selected"' : '', ! 'RATE_PRIVATE' => ( $catrow['cat_rate_level'] == ALBUM_PRIVATE ) ? 'selected="selected"' : '', ! 'RATE_MOD' => ( $catrow['cat_rate_level'] == ALBUM_MOD ) ? 'selected="selected"' : '', ! 'RATE_ADMIN' => ( $catrow['cat_rate_level'] == ALBUM_ADMIN ) ? 'selected="selected"' : '', ! 'COMMENT_GUEST' => ( $catrow['cat_comment_level'] == ALBUM_GUEST ) ? 'selected="selected"' : '', ! 'COMMENT_REG' => ( $catrow['cat_comment_level'] == ALBUM_USER ) ? 'selected="selected"' : '', ! 'COMMENT_PRIVATE' => ( $catrow['cat_comment_level'] == ALBUM_PRIVATE ) ? 'selected="selected"' : '', ! 'COMMENT_MOD' => ( $catrow['cat_comment_level'] == ALBUM_MOD ) ? 'selected="selected"' : '', ! 'COMMENT_ADMIN' => ( $catrow['cat_comment_level'] == ALBUM_ADMIN ) ? 'selected="selected"' : '', ! 'EDIT_REG' => ( $catrow['cat_edit_level'] == ALBUM_USER ) ? 'selected="selected"' : '', ! 'EDIT_PRIVATE' => ( $catrow['cat_edit_level'] == ALBUM_PRIVATE ) ? 'selected="selected"' : '', ! 'EDIT_MOD' => ( $catrow['cat_edit_level'] == ALBUM_MOD ) ? 'selected="selected"' : '', ! 'EDIT_ADMIN' => ( $catrow['cat_edit_level'] == ALBUM_ADMIN ) ? 'selected="selected"' : '', ! 'DELETE_REG' => ( $catrow['cat_delete_level'] == ALBUM_USER ) ? 'selected="selected"' : '', ! 'DELETE_PRIVATE' => ( $catrow['cat_delete_level'] == ALBUM_PRIVATE ) ? 'selected="selected"' : '', ! 'DELETE_MOD' => ( $catrow['cat_delete_level'] == ALBUM_MOD ) ? 'selected="selected"' : '', ! 'DELETE_ADMIN' => ( $catrow['cat_delete_level'] == ALBUM_ADMIN ) ? 'selected="selected"' : '', ! 'APPROVAL_DISABLED' => ( $catrow['cat_approval'] == ALBUM_USER ) ? 'selected="selected"' : '', ! 'APPROVAL_MOD' => ( $catrow['cat_approval'] == ALBUM_MOD ) ? 'selected="selected"' : '', ! 'APPROVAL_ADMIN' => ( $catrow['cat_approval'] == ALBUM_ADMIN ) ? 'selected="selected"' : '', ! 'S_MODE' => 'edit', ! 'S_GUEST' => ALBUM_GUEST, ! 'S_USER' => ALBUM_USER, ! 'S_PRIVATE' => ALBUM_PRIVATE, ! 'S_MOD' => ALBUM_MOD, ! 'S_ADMIN' => ALBUM_ADMIN, ! 'L_PANEL_TITLE' => $lang['Edit_Category'] ) ! ); $template->pparse( 'body' ); --- 109,200 ---- $s_album_cat_list = album_get_tree_option( $catrow['cat_parent_id'], ALBUM_AUTH_VIEW, ALBUM_SELECTBOX_INCLUDE_ALL | ALBUM_SELECTBOX_INCLUDE_ROOT ); // --- Album Category Hierarchy : end ! $template->set_filenames( array( 'body' => 'admin/album_cat_new_body.tpl' ) ); ! $template->assign_block_vars( 'acp', array( ! 'L_ALBUM_CAT_TITLE' => $lang['Album_Categories_Title'], ! 'L_ALBUM_CAT_EXPLAIN' => $lang['Album_Categories_Explain'] ! )); $template->assign_vars( array( ! // --- Album Category Hierarchy : begin ! // --- version = 1.1.0 ! // -- deleted ! // --- Album Category Hierarchy : end ! 'S_ALBUM_ACTION' => append_sid( "admin_album_cat.$phpEx?cat_id=$cat_id" ), ! 'L_CAT_TITLE' => $lang['Category_Title'], ! 'L_CAT_DESC' => $lang['Category_Desc'], ! // --- Album Category Hierarchy : begin ! // --- version <= 1.1.0 ! 'L_CAT_PARENT_TITLE' => $lang['Parent_Category'], ! // --- Album Category Hierarchy : end ! 'L_CAT_PERMISSIONS' => $lang['Category_Permissions'], ! 'L_VIEW_LEVEL' => $lang['View_level'], ! 'L_UPLOAD_LEVEL' => $lang['Upload_level'], ! 'L_RATE_LEVEL' => $lang['Rate_level'], ! 'L_COMMENT_LEVEL' => $lang['Comment_level'], ! 'L_EDIT_LEVEL' => $lang['Edit_level'], ! 'L_DELETE_LEVEL' => $lang['Delete_level'], ! 'L_PICS_APPROVAL' => $lang['Pics_Approval'], ! 'L_GUEST' => $lang['Forum_ALL'], ! 'L_REG' => $lang['Forum_REG'], ! 'L_PRIVATE' => $lang['Forum_PRIVATE'], ! 'L_MOD' => $lang['Forum_MOD'], ! 'L_ADMIN' => $lang['Forum_ADMIN'], ! 'L_DISABLED' => $lang['Disabled'], ! 'S_CAT_TITLE' => $catrow['cat_title'], ! 'S_CAT_DESC' => $catrow['cat_desc'], ! // --- Album Category Hierarchy : begin ! // --- version <= 1.1.0 ! 'S_CAT_PARENT_OPTIONS' => $s_album_cat_list, ! // --- Album Category Hierarchy : end ! 'VIEW_GUEST' => ( $catrow['cat_view_level'] == ALBUM_GUEST ) ? 'selected="selected"' : '', ! 'VIEW_REG' => ( $catrow['cat_view_level'] == ALBUM_USER ) ? 'selected="selected"' : '', ! 'VIEW_PRIVATE' => ( $catrow['cat_view_level'] == ALBUM_PRIVATE ) ? 'selected="selected"' : '', ! 'VIEW_MOD' => ( $catrow['cat_view_level'] == ALBUM_MOD ) ? 'selected="selected"' : '', ! 'VIEW_ADMIN' => ( $catrow['cat_view_level'] == ALBUM_ADMIN ) ? 'selected="selected"' : '', ! 'UPLOAD_GUEST' => ( $catrow['cat_upload_level'] == ALBUM_GUEST ) ? 'selected="selected"' : '', ! 'UPLOAD_REG' => ( $catrow['cat_upload_level'] == ALBUM_USER ) ? 'selected="selected"' : '', ! 'UPLOAD_PRIVATE' => ( $catrow['cat_upload_level'] == ALBUM_PRIVATE ) ? 'selected="selected"' : '', ! 'UPLOAD_MOD' => ( $catrow['cat_upload_level'] == ALBUM_MOD ) ? 'selected="selected"' : '', ! 'UPLOAD_ADMIN' => ( $catrow['cat_upload_level'] == ALBUM_ADMIN ) ? 'selected="selected"' : '', ! 'RATE_GUEST' => ( $catrow['cat_rate_level'] == ALBUM_GUEST ) ? 'selected="selected"' : '', ! 'RATE_REG' => ( $catrow['cat_rate_level'] == ALBUM_USER ) ? 'selected="selected"' : '', ! 'RATE_PRIVATE' => ( $catrow['cat_rate_level'] == ALBUM_PRIVATE ) ? 'selected="selected"' : '', ! 'RATE_MOD' => ( $catrow['cat_rate_level'] == ALBUM_MOD ) ? 'selected="selected"' : '', ! 'RATE_ADMIN' => ( $catrow['cat_rate_level'] == ALBUM_ADMIN ) ? 'selected="selected"' : '', ! 'COMMENT_GUEST' => ( $catrow['cat_comment_level'] == ALBUM_GUEST ) ? 'selected="selected"' : '', ! 'COMMENT_REG' => ( $catrow['cat_comment_level'] == ALBUM_USER ) ? 'selected="selected"' : '', ! 'COMMENT_PRIVATE' => ( $catrow['cat_comment_level'] == ALBUM_PRIVATE ) ? 'selected="selected"' : '', ! 'COMMENT_MOD' => ( $catrow['cat_comment_level'] == ALBUM_MOD ) ? 'selected="selected"' : '', ! 'COMMENT_ADMIN' => ( $catrow['cat_comment_level'] == ALBUM_ADMIN ) ? 'selected="selected"' : '', ! 'EDIT_REG' => ( $catrow['cat_edit_level'] == ALBUM_USER ) ? 'selected="selected"' : '', ! 'EDIT_PRIVATE' => ( $catrow['cat_edit_level'] == ALBUM_PRIVATE ) ? 'selected="selected"' : '', ! 'EDIT_MOD' => ( $catrow['cat_edit_level'] == ALBUM_MOD ) ? 'selected="selected"' : '', ! 'EDIT_ADMIN' => ( $catrow['cat_edit_level'] == ALBUM_ADMIN ) ? 'selected="selected"' : '', ! 'DELETE_REG' => ( $catrow['cat_delete_level'] == ALBUM_USER ) ? 'selected="selected"' : '', ! 'DELETE_PRIVATE' => ( $catrow['cat_delete_level'] == ALBUM_PRIVATE ) ? 'selected="selected"' : '', ! 'DELETE_MOD' => ( $catrow['cat_delete_level'] == ALBUM_MOD ) ? 'selected="selected"' : '', ! 'DELETE_ADMIN' => ( $catrow['cat_delete_level'] == ALBUM_ADMIN ) ? 'selected="selected"' : '', ! 'APPROVAL_DISABLED' => ( $catrow['cat_approval'] == ALBUM_USER ) ? 'selected="selected"' : '', ! 'APPROVAL_MOD' => ( $catrow['cat_approval'] == ALBUM_MOD ) ? 'selected="selected"' : '', ! 'APPROVAL_ADMIN' => ( $catrow['cat_approval'] == ALBUM_ADMIN ) ? 'selected="selected"' : '', ! 'S_MODE' => 'edit', ! 'S_GUEST' => ALBUM_GUEST, ! 'S_USER' => ALBUM_USER, ! 'S_PRIVATE' => ALBUM_PRIVATE, ! 'S_MOD' => ALBUM_MOD, ! 'S_ADMIN' => ALBUM_ADMIN, ! 'L_PANEL_TITLE' => $lang['Edit_Category'] ) ! ); $template->pparse( 'body' ); *************** *** 249,264 **** $select_to .= '</select>'; // --- Album Category Hierarchy : end ! $template->set_filenames( array( 'body' => 'admin/album_cat_delete_body.tpl' ) ! ); ! $template->assign_vars( array( 'S_ALBUM_ACTION' => append_sid( "admin_album_cat.$phpEx?cat_id=$cat_id" ), ! 'L_CAT_DELETE' => $lang['Delete_Category'], ! 'L_CAT_DELETE_EXPLAIN' => $lang['Delete_Category_Explain'], ! 'L_CAT_TITLE' => $lang['Category_Title'], ! 'S_CAT_TITLE' => $thiscat['cat_title'], ! 'L_MOVE_CONTENTS' => $lang['Move_contents'], ! 'L_MOVE_DELETE' => $lang['Move_and_Delete'], ! 'S_SELECT_TO' => $select_to ) ! ); $template->pparse( 'body' ); --- 238,253 ---- $select_to .= '</select>'; // --- Album Category Hierarchy : end ! $template->set_filenames( array( 'body' => 'admin/album_cat_delete_body.tpl' )); ! $template->assign_vars( array( ! 'S_ALBUM_ACTION' => append_sid( "admin_album_cat.$phpEx?cat_id=$cat_id" ), ! 'L_CAT_DELETE' => $lang['Delete_Category'], ! 'L_CAT_DELETE_EXPLAIN' => $lang['Delete_Category_Explain'], ! 'L_CAT_TITLE' => $lang['Category_Title'], ! 'S_CAT_TITLE' => $thiscat['cat_title'], ! 'L_MOVE_CONTENTS' => $lang['Move_contents'], ! 'L_MOVE_DELETE' => $lang['Move_and_Delete'], ! 'S_SELECT_TO' => $select_to ) ! ); $template->pparse( 'body' ); *************** *** 302,357 **** $s_album_cat_list = album_get_tree_option( $cat_parent, ALBUM_AUTH_VIEW, ALBUM_SELECTBOX_INCLUDE_ALL ); // --- Album Category Hierarchy : end ! $template->set_filenames( array( 'body' => 'admin/album_cat_new_body.tpl' ) ! ); ! $template->assign_vars( array( 'L_ALBUM_CAT_TITLE' => $lang['Album_Categories_Title'], ! 'L_ALBUM_CAT_EXPLAIN' => $lang['Album_Categories_Explain'], ! 'S_ALBUM_ACTION' => append_sid( "admin_album_cat.$phpEx" ), ! 'L_CAT_TITLE' => $lang['Category_Title'], ! 'L_CAT_DESC' => $lang['Category_Desc'], ! // --- Album Category Hierarchy : begin ! // --- version <= 1.1.0 ! 'L_CAT_PARENT_TITLE' => $lang['Parent_Category'], ! // --- Album Category Hierarchy : end ! 'L_CAT_PERMISSIONS' => $lang['Category_Permissions'], ! 'L_VIEW_LEVEL' => $lang['View_level'], ! 'L_UPLOAD_LEVEL' => $lang['Upload_level'], ! 'L_RATE_LEVEL' => $lang['Rate_level'], ! 'L_COMMENT_LEVEL' => $lang['Comment_level'], ! 'L_EDIT_LEVEL' => $lang['Edit_level'], ! 'L_DELETE_LEVEL' => $lang['Delete_level'], ! 'L_PICS_APPROVAL' => $lang['Pics_Approval'], ! 'L_GUEST' => $lang['Forum_ALL'], ! 'L_REG' => $lang['Forum_REG'], ! 'L_PRIVATE' => $lang['Forum_PRIVATE'], ! 'L_MOD' => $lang['Forum_MOD'], ! 'L_ADMIN' => $lang['Forum_ADMIN'], ! 'L_DISABLED' => $lang['Disabled'], ! // --- Album Category Hierarchy : begin ! // --- version <= 1.1.0 ! 'S_CAT_TITLE' => $cat_title, ! 'S_CAT_PARENT_OPTIONS' => $s_album_cat_list, ! // --- Album Category Hierarchy : end ! 'VIEW_GUEST' => 'selected="selected"', ! 'UPLOAD_REG' => 'selected="selected"', ! 'RATE_REG' => 'selected="selected"', ! 'COMMENT_REG' => 'selected="selected"', ! 'EDIT_REG' => 'selected="selected"', ! 'DELETE_MOD' => 'selected="selected"', ! 'APPROVAL_DISABLED' => 'selected="selected"', ! 'S_MODE' => 'new', ! 'S_GUEST' => ALBUM_GUEST, ! 'S_USER' => ALBUM_USER, ! 'S_PRIVATE' => ALBUM_PRIVATE, ! 'S_MOD' => ALBUM_MOD, ! 'S_ADMIN' => ALBUM_ADMIN, ! 'L_PANEL_TITLE' => $lang['Create_category'] ) ! ); $template->pparse( 'body' ); --- 291,346 ---- $s_album_cat_list = album_get_tree_option( $cat_parent, ALBUM_AUTH_VIEW, ALBUM_SELECTBOX_INCLUDE_ALL ); // --- Album Category Hierarchy : end ! $template->set_filenames( array( 'body' => 'admin/album_cat_new_body.tpl' ) ); ! $template->assign_vars( array( ! 'L_ALBUM_CAT_TITLE' => $lang['Album_Categories_Title'], ! 'L_ALBUM_CAT_EXPLAIN' => $lang['Album_Categories_Explain'], ! 'S_ALBUM_ACTION' => append_sid( "admin_album_cat.$phpEx" ), ! 'L_CAT_TITLE' => $lang['Category_Title'], ! 'L_CAT_DESC' => $lang['Category_Desc'], ! // --- Album Category Hierarchy : begin ! // --- version <= 1.1.0 ! 'L_CAT_PARENT_TITLE' => $lang['Parent_Category'], ! // --- Album Category Hierarchy : end ! 'L_CAT_PERMISSIONS' => $lang['Category_Permissions'], ! 'L_VIEW_LEVEL' => $lang['View_level'], ! 'L_UPLOAD_LEVEL' => $lang['Upload_level'], ! 'L_RATE_LEVEL' => $lang['Rate_level'], ! 'L_COMMENT_LEVEL' => $lang['Comment_level'], ! 'L_EDIT_LEVEL' => $lang['Edit_level'], ! 'L_DELETE_LEVEL' => $lang['Delete_level'], ! 'L_PICS_APPROVAL' => $lang['Pics_Approval'], ! 'L_GUEST' => $lang['Forum_ALL'], ! 'L_REG' => $lang['Forum_REG'], ! 'L_PRIVATE' => $lang['Forum_PRIVATE'], ! 'L_MOD' => $lang['Forum_MOD'], ! 'L_ADMIN' => $lang['Forum_ADMIN'], ! 'L_DISABLED' => $lang['Disabled'], ! // --- Album Category Hierarchy : begin ! // --- version <= 1.1.0 ! 'S_CAT_TITLE' => $cat_title, ! 'S_CAT_PARENT_OPTIONS' => $s_album_cat_list, ! // --- Album Category Hierarchy : end ! 'VIEW_GUEST' => 'selected="selected"', ! 'UPLOAD_REG' => 'selected="selected"', ! 'RATE_REG' => 'selected="selected"', ! 'COMMENT_REG' => 'selected="selected"', ! 'EDIT_REG' => 'selected="selected"', ! 'DELETE_MOD' => 'selected="selected"', ! 'APPROVAL_DISABLED' => 'selected="selected"', ! 'S_MODE' => 'new', ! 'S_GUEST' => ALBUM_GUEST, ! 'S_USER' => ALBUM_USER, ! 'S_PRIVATE' => ALBUM_PRIVATE, ! 'S_MOD' => ALBUM_MOD, ! 'S_ADMIN' => ALBUM_ADMIN, ! 'L_PANEL_TITLE' => $lang['Create_category'] ) ! ); $template->pparse( 'body' ); *************** *** 447,460 **** if ( $target == 0 ) // Delete All ! { ! // --- Album Category Hierarchy : begin ! // --- version <= 1.1.0 ! // check if the selected category is a parent to another category ! $sql = "SELECT cat_id FROM " . ALBUM_CAT_TABLE . " WHERE cat_parent = " . $cat_id . ";"; if ( !$result = $db->sql_query( $sql ) ) { mx_message_die( GENERAL_ERROR, 'Could not query Album information for existing child categories', '', __LINE__, __FILE__, $sql ); } // the selected category is parent to another...proceed if ( $db->sql_numrows( $result ) > 0 ) { --- 436,453 ---- if ( $target == 0 ) // Delete All ! { ! // --- Album Category Hierarchy : begin ! // --- version <= 1.1.0 ! // check if the selected category is a parent to another category ! $sql = "SELECT cat_id FROM " . ALBUM_CAT_TABLE . " WHERE cat_parent = " . $cat_id . ";"; ! if ( !$result = $db->sql_query( $sql ) ) { mx_message_die( GENERAL_ERROR, 'Could not query Album information for existing child categories', '', __LINE__, __FILE__, $sql ); } + + // // the selected category is parent to another...proceed + // if ( $db->sql_numrows( $result ) > 0 ) { *************** *** 509,517 **** // Delete all physical pic & cached thumbnail files for ( $i = 0; $i < count( $picrow ); $i++ ) ! { ! @unlink( '../' . ALBUM_CACHE_PATH . $picrow[$i]['pic_thumbnail'] ); ! @unlink( '../' . ALBUM_UPLOAD_PATH . $picrow[$i]['pic_filename'] ); ! } $pic_id_sql = '(' . implode( ',', $pic_id_row ) . ')'; --- 502,510 ---- // Delete all physical pic & cached thumbnail files for ( $i = 0; $i < count( $picrow ); $i++ ) ! { ! @unlink( '../' . ALBUM_CACHE_PATH . $picrow[$i]['pic_thumbnail'] ); ! @unlink( '../' . ALBUM_UPLOAD_PATH . $picrow[$i]['pic_filename'] ); ! } $pic_id_sql = '(' . implode( ',', $pic_id_row ) . ')'; *************** *** 560,567 **** } else // Move content... ! { ! $sql = "UPDATE " . ALBUM_TABLE . " ! SET pic_cat_id = '$target' ! WHERE pic_cat_id = '$cat_id'"; if ( !$result = $db->sql_query( $sql ) ) --- 553,560 ---- } else // Move content... ! { ! $sql = "UPDATE " . ALBUM_TABLE . " ! SET pic_cat_id = '$target' ! WHERE pic_cat_id = '$cat_id'"; if ( !$result = $db->sql_query( $sql ) ) *************** *** 585,590 **** } } - - /* Powered by Photo Album v2.x.x (c) 2002-2003 Smartor */ - ?> \ No newline at end of file --- 578,580 ---- Index: admin_album_personal.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/admin/admin_album_personal.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** admin_album_personal.php 2 May 2006 23:29:32 -0000 1.8 --- admin_album_personal.php 30 Jun 2006 21:10:55 -0000 1.9 *************** *** 9,12 **** --- 9,14 ---- */ + /* Powered by Photo Album v2.x.x (c) 2002-2003 Smartor */ + define( 'IN_PORTAL', 1 ); *************** *** 25,35 **** require( $mx_root_path . 'admin/pagestart.' . $phpEx ); include_once( $module_root_path . 'album_mod/album_common.' . $phpEx ); ! include_once( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); if ( !isset( $HTTP_POST_VARS['submit'] ) ) { ! $template->set_filenames( array( 'body' => 'admin/album_personal_body.tpl' ) ! ); // Get the list of phpBB usergroups $sql = "SELECT group_id, group_name FROM " . GROUPS_TABLE . " --- 27,50 ---- require( $mx_root_path . 'admin/pagestart.' . $phpEx ); include_once( $module_root_path . 'album_mod/album_common.' . $phpEx ); ! ! // ********************************************************************** ! // Read language definition ! // ********************************************************************** ! if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) ! { ! include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); ! } ! else ! { ! include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); ! } if ( !isset( $HTTP_POST_VARS['submit'] ) ) { ! $template->set_filenames( array( 'body' => 'admin/album_personal_body.tpl' ) ); ! ! // // Get the list of phpBB usergroups + // $sql = "SELECT group_id, group_name FROM " . GROUPS_TABLE . " *************** *** 45,49 **** --- 60,67 ---- $groupdata[] = $row; } + + // // Get the current album settings for non created personal galleries + // $sql = "SELECT * FROM " . ALBUM_CONFIG_TABLE . " *************** *** 88,144 **** // --- added $template->assign_block_vars( 'creation_grouprow', array( ! // --- Album Category Hierarchy : end ! 'GROUP_ID' => $groupdata[$i]['group_id'], ! 'GROUP_NAME' => $groupdata[$i]['group_name'], ! 'PRIVATE_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $private_groups ) ) ? 'checked="checked"' : '' ! ) // end array ! ); // --- Album Category Hierarchy : begin // --- version : 1.1.0beta6 ! $template->assign_block_vars( 'grouprow', array( 'GROUP_ID' => $groupdata[$i]['group_id'], ! 'GROUP_NAME' => $groupdata[$i]['group_name'], ! ! 'VIEW_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $view_groups ) ) ? 'checked="checked"' : '', ! ! 'UPLOAD_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $upload_groups ) ) ? 'checked="checked"' : '', ! ! 'RATE_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $rate_groups ) ) ? 'checked="checked"' : '', ! ! 'COMMENT_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $comment_groups ) ) ? 'checked="checked"' : '', ! ! 'EDIT_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $edit_groups ) ) ? 'checked="checked"' : '', ! ! 'DELETE_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $delete_groups ) ) ? 'checked="checked"' : '', ! ! 'MODERATOR_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $moderator_groups ) ) ? 'checked="checked"' : '' ) ! ); // --- Album Category Hierarchy : end } ! $template->assign_vars( array( 'L_ALBUM_PERSONAL_TITLE' => $lang['Album_personal_gallery_title'], ! 'L_ALBUM_PERSONAL_EXPLAIN' => $lang['Album_personal_gallery_explain'], ! // --- Album Category Hierarchy : begin ! // --- version : 1.1.0beta6 ! 'L_ALBUM_AUTH_EXPLAIN' => $lang['Album_Personal_Auth_Explain'], ! // --- Album Category Hierarchy : end ! 'L_SUBMIT' => $lang['Submit'], ! 'L_RESET' => $lang['Reset'], ! 'L_GROUP_CONTROL' => $lang['Auth_Control_Group'], ! 'L_GROUPS' => $lang['Usergroups'], ! // --- Album Category Hierarchy : begin ! // --- version : 1.1.0beta6 ! 'L_VIEW' => $lang['View'], ! 'L_UPLOAD' => $lang['Upload'], ! 'L_RATE' => $lang['Rate'], ! 'L_COMMENT' => $lang['Comment'], ! 'L_EDIT' => $lang['Edit'], ! 'L_DELETE' => $lang['Delete'], ! 'L_IS_MODERATOR' => $lang['Is_Moderator'], ! // --- Album Category Hierarchy : end ! 'L_PRIVATE_ACCESS' => $lang['Private_access'], ! 'S_ALBUM_ACTION' => append_sid( 'admin_album_personal.' . $phpEx ) ! ) ! ); $template->pparse( 'body' ); --- 106,155 ---- // --- added $template->assign_block_vars( 'creation_grouprow', array( ! // --- Album Category Hierarchy : end ! 'GROUP_ID' => $groupdata[$i]['group_id'], ! 'GROUP_NAME' => $groupdata[$i]['group_name'], ! 'PRIVATE_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $private_groups ) ) ? 'checked="checked"' : '' ! )); // --- Album Category Hierarchy : begin // --- version : 1.1.0beta6 ! $template->assign_block_vars( 'grouprow', array( ! 'GROUP_ID' => $groupdata[$i]['group_id'], ! 'GROUP_NAME' => $groupdata[$i]['group_name'], ! 'VIEW_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $view_groups ) ) ? 'checked="checked"' : '', ! 'UPLOAD_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $upload_groups ) ) ? 'checked="checked"' : '', ! 'RATE_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $rate_groups ) ) ? 'checked="checked"' : '', ! 'COMMENT_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $comment_groups ) ) ? 'checked="checked"' : '', ! 'EDIT_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $edit_groups ) ) ? 'checked="checked"' : '', ! 'DELETE_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $delete_groups ) ) ? 'checked="checked"' : '', ! 'MODERATOR_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $moderator_groups ) ) ? 'checked="checked"' : '' ) ! ); // --- Album Category Hierarchy : end } ! $template->assign_vars( array( ! 'L_ALBUM_PERSONAL_TITLE' => $lang['Album_personal_gallery_title'], ! 'L_ALBUM_PERSONAL_EXPLAIN' => $lang['Album_personal_gallery_explain'], ! // --- Album Category Hierarchy : begin ! // --- version : 1.1.0beta6 ! 'L_ALBUM_AUTH_EXPLAIN' => $lang['Album_Personal_Auth_Explain'], ! // --- Album Category Hierarchy : end ! 'L_SUBMIT' => $lang['Submit'], ! 'L_RESET' => $lang['Reset'], ! 'L_GROUP_CONTROL' => $lang['Auth_Control_Group'], ! 'L_GROUPS' => $lang['Usergroups'], ! // --- Album Category Hierarchy : begin ! // --- version : 1.1.0beta6 ! 'L_VIEW' => $lang['View'], ! 'L_UPLOAD' => $lang['Upload'], ! 'L_RATE' => $lang['Rate'], ! 'L_COMMENT' => $lang['Comment'], ! 'L_EDIT' => $lang['Edit'], ! 'L_DELETE' => $lang['Delete'], ! 'L_IS_MODERATOR' => $lang['Is_Moderator'], ! // --- Album Category Hierarchy : end ! 'L_PRIVATE_ACCESS' => $lang['Private_access'], ! 'S_ALBUM_ACTION' => append_sid( 'admin_album_personal.' . $phpEx ) ! )); $template->pparse( 'body' ); *************** *** 185,190 **** mx_message_die( GENERAL_MESSAGE, $message ); } - - /* Powered by Photo Album v2.x.x (c) 2002-2003 Smartor */ - ?> \ No newline at end of file --- 196,198 ---- Index: admin_album_config.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/admin/admin_album_config.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** admin_album_config.php 2 May 2006 23:29:32 -0000 1.8 --- admin_album_config.php 30 Jun 2006 21:10:55 -0000 1.9 *************** *** 9,12 **** --- 9,14 ---- */ + /* Powered by Photo Album v2.x.x (c) 2002-2003 Smartor */ + define( 'IN_PORTAL', 1 ); *************** *** 18,23 **** } // Let's set the root dir for phpBB ! $module_root_path = './../'; $mx_root_path = './../../../'; --- 20,26 ---- } + // // Let's set the root dir for phpBB ! // $module_root_path = './../'; $mx_root_path = './../../../'; *************** *** 30,37 **** // ------------------------------ include_once( $module_root_path . 'album_mod/album_common.' . $phpEx ); - include_once( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); ! // Pull all config data $sql = "SELECT * FROM " . ALBUM_CONFIG_TABLE; if ( !$result = $db->sql_query( $sql ) ) --- 33,52 ---- // ------------------------------ include_once( $module_root_path . 'album_mod/album_common.' . $phpEx ); ! // ********************************************************************** ! // Read language definition ! // ********************************************************************** ! if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) ! { ! include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); ! } ! else ! { ! include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); ! } + // + // Pull all config data + // $sql = "SELECT * FROM " . ALBUM_CONFIG_TABLE; if ( !$result = $db->sql_query( $sql ) ) *************** *** 69,305 **** } ! $template->set_filenames( array( "body" => "admin/album_config_body.tpl" ) ! ); ! $template->assign_vars( array( 'L_ALBUM_CONFIG' => $lang['Album_config'], ! 'L_ALBUM_CONFIG_EXPLAIN' => $lang['Album_config_explain'], ! 'S_ALBUM_CONFIG_ACTION' => append_sid( 'admin_album_config.' . $phpEx ), ! 'MAX_PICS' => $new['max_pics'], ! 'MAX_FILE_SIZE' => $new['max_file_size'], ! 'MAX_WIDTH' => $new['max_width'], ! 'MAX_HEIGHT' => $new['max_height'], ! 'ROWS_PER_PAGE' => $new['rows_per_page'], ! 'COLS_PER_PAGE' => $new['cols_per_page'], ! 'THUMBNAIL_QUALITY' => $new['thumbnail_quality'], ! 'THUMBNAIL_SIZE' => $new['thumbnail_size'], ! 'PERSONAL_GALLERY_LIMIT' => $new['personal_gallery_limit'], ! 'USER_PICS_LIMIT' => $new['user_pics_limit'], ! 'MOD_PICS_LIMIT' => $new['mod_pics_limit'], ! 'THUMBNAIL_CACHE_ENABLED' => ( $new['thumbnail_cache'] == 1 ) ? 'checked="checked"' : '', ! 'THUMBNAIL_CACHE_DISABLED' => ( $new['thumbnail_cache'] == 0 ) ? 'checked="checked"' : '', ! // --- Album Category Hierarchy : begin ! // --- version : <= 1.1.0 ! 'INDEX_SHOW_SUBCATS_ENABLED' => ( $new['show_index_subcats'] == 1 ) ? 'checked="checked"' : '', ! 'INDEX_SHOW_SUBCATS_DISABLED' => ( $new['show_index_subcats'] == 0 ) ? 'checked="checked"' : '', ! 'INDEX_THUMB_ENABLED' => ( $new['show_index_thumb'] == 1 ) ? 'checked="checked"' : '', ! 'INDEX_THUMB_DISABLED' => ( $new['show_index_thumb'] == 0 ) ? 'checked="checked"' : '', ! 'INDEX_TOTAL_PICS_ENABLED' => ( $new['show_index_total_pics'] == 1 ) ? 'checked="checked"' : '', ! 'INDEX_TOTAL_PICS_DISABLED' => ( $new['show_index_total_pics'] == 0 ) ? 'checked="checked"' : '', ! 'INDEX_TOTAL_COMMENTS_ENABLED' => ( $new['show_index_total_comments'] == 1 ) ? 'checked="checked"' : '', ! 'INDEX_TOTAL_COMMENTS_DISABLED' => ( $new['show_index_total_comments'] == 0 ) ? 'checked="checked"' : '', ! 'INDEX_PICS_ENABLED' => ( $new['show_index_pics'] == 1 ) ? 'checked="checked"' : '', ! 'INDEX_PICS_DISABLED' => ( $new['show_index_pics'] == 0 ) ? 'checked="checked"' : '', ! 'INDEX_COMMENTS_ENABLED' => ( $new['show_index_comments'] == 1 ) ? 'checked="checked"' : '', ! 'INDEX_COMMENTS_DISABLED' => ( $new['show_index_comments'] == 0 ) ? 'checked="checked"' : '', ! 'INDEX_LAST_COMMENT_ENABLED' => ( $new['show_index_last_comment'] == 1 ) ? 'checked="checked"' : '', ! 'INDEX_LAST_COMMENT_DISABLED' => ( $new['show_index_last_comment'] == 0 ) ? 'checked="checked"' : '', ! 'INDEX_LAST_PIC_ENABLED' => ( $new['show_index_last_pic'] == 1 ) ? 'checked="checked"' : '', ! 'INDEX_LAST_PIC_DISABLED' => ( $new['show_index_last_pic'] == 0 ) ? 'checked="checked"' : '', ! 'INDEX_LINEBREAK_ENABLED' => ( $new['line_break_subcats'] == 1 ) ? 'checked="checked"' : '', ! 'INDEX_LINEBREAK_DISABLED' => ( $new['line_break_subcats'] == 0 ) ? 'checked="checked"' : '', ! 'SHOW_RECENT_IN_SUBCATS_ENABLED' => ( $new['show_recent_in_subcats'] == 1 ) ? 'checked="checked"' : '', ! 'SHOW_RECENT_IN_SUBCATS_DISABLED' => ( $new['show_recent_in_subcats'] == 0 ) ? 'checked="checked"' : '', ! 'SHOW_RECENT_INSTEAD_OF_NOPICS_ENABLED' => ( $new['show_recent_instead_of_nopics'] == 1 ) ? 'checked="checked"' : '', ! 'SHOW_RECENT_INSTEAD_OF_NOPICS_DISABLED' => ( $new['show_recent_instead_of_nopics'] == 0 ) ? 'checked="checked"' : '', ! 'INDEX_SHOW_PERSONAL_GALLERY_LINK_ENABLED' => ( $new['show_personal_gallery_link'] == 1 ) ? 'checked="checked"' : '', ! 'INDEX_SHOW_PERSONAL_GALLERY_LINK_DISABLED' => ( $new['show_personal_gallery_link'] == 0 ) ? 'checked="checked"' : '', ! 'ALBUM_CATEGORY_SORTING_ID' => ( $new['album_category_sorting'] == 'cat_id' ) ? 'checked="checked"' : '', ! 'ALBUM_CATEGORY_SORTING_NAME' => ( $new['album_category_sorting'] == 'cat_title' ) ? 'checked="checked"' : '', ! 'ALBUM_CATEGORY_SORTING_ORDER' => ( $new['album_category_sorting'] == 'cat_order' ) ? 'checked="checked"' : '', ! 'ALBUM_CATEGORY_SORTING_ASC' => ( $new['album_category_sorting_direction'] == 'ASC' ) ? 'checked="checked"' : '', ! 'ALBUM_CATEGORY_SORTING_DESC' => ( $new['album_category_sorting_direction'] == 'DESC' ) ? 'checked="checked"' : '', ! 'PERSONAL_SHOW_RECENT_IN_SUBCATS_ENABLED' => ( $new['personal_show_recent_in_subcats'] == 1 ) ? 'checked="checked"' : '', ! 'PERSONAL_SHOW_RECENT_IN_SUBCATS_DISABLED' => ( $new['personal_show_recent_in_subcats'] == 0 ) ? 'checked="checked"' : '', ! 'PERSONAL_SHOW_RECENT_INSTEAD_OF_NOPICS_ENABLED' => ( $new['personal_show_recent_instead_of_nopics'] == 1 ) ? 'checked="checked"' : '', ! 'PERSONAL_SHOW_RECENT_INSTEAD_OF_NOPICS_DISABLED' => ( $new['personal_show_recent_instead_of_nopics'] == 0 ) ? 'checked="checked"' : '', ! 'PERSONAL_MOD_ENABLED' => ( $new['personal_allow_gallery_mod'] == 1 ) ? 'checked="checked"' : '', ! 'PERSONAL_MOD_DISABLED' => ( $new['personal_allow_gallery_mod'] == 0 ) ? 'checked="checked"' : '', ! 'PERSONAL_SUBCAT_ENABLED' => ( $new['personal_allow_sub_categories'] == 1 ) ? 'checked="checked"' : '', ! 'PERSONAL_SUBCAT_DISABLED' => ( $new['personal_allow_sub_categories'] == 0 ) ? 'checked="checked"' : '', ! 'PERSONAL_SUB_GALLERY_LIMIT' => $new['personal_sub_category_limit'], ! 'PERSONAL_SHOW_SUBCATS_ENABLED' => ( $new['personal_show_subcats_in_index'] == 1 ) ? 'checked="checked"' : '', ! 'PERSONAL_SHOW_SUBCATS_DISABLED' => ( $new['personal_show_subcats_in_index'] == 0 ) ? 'checked="checked"' : '', ! // --- version : 1.2.0 ! 'ALBUM_DEBUG_MODE_ENABLED' => ( $new['album_debug_mode'] == 1 ) ? 'checked="checked"' : '', ! 'ALBUM_DEBUG_MODE_DISABLED' => ( $new['album_debug_mode'] == 0 ) ? 'checked="checked"' : '', ! 'PERSONAL_SHOW_ALL_PICS_ENABLED' => ( $new['show_all_in_personal_gallery'] == 1 ) ? 'checked="checked"' : '', ! 'PERSONAL_SHOW_ALL_PICS_DISABLED' => ( $new['show_all_in_personal_gallery'] == 0 ) ? 'checked="checked"' : '', ! 'NEW_PIC_CHECK_INTERVAL' => $new['new_pic_check_interval'], ! // --- version : 1.3.0 ! 'INDEX_SUPERCELLS_ENABLED' => ( $new['index_enable_supercells'] == 1 ) ? 'checked="checked"' : '', ! 'INDEX_SUPERCELLS_DISABLED' => ( $new['index_enable_supercells'] == 0 ) ? 'checked="checked"' : '', ! // --- Album Category Hierarchy : end ! 'JPG_ENABLED' => ( $new['jpg_allowed'] == 1 ) ? 'checked="checked"' : '', ! 'JPG_DISABLED' => ( $new['jpg_allowed'] == 0 ) ? 'checked="checked"' : '', ! 'PNG_ENABLED' => ( $new['png_allowed'] == 1 ) ? 'checked="checked"' : '', ! 'PNG_DISABLED' => ( $new['png_allowed'] == 0 ) ? 'checked="checked"' : '', ! 'GIF_ENABLED' => ( $new['gif_allowed'] == 1 ) ? 'checked="checked"' : '', ! 'GIF_DISABLED' => ( $new['gif_allowed'] == 0 ) ? 'checked="checked"' : '', ! 'PIC_DESC_MAX_LENGTH' => $new['desc_length'], ! 'HOTLINK_PREVENT_ENABLED' => ( $new['hotlink_prevent'] == 1 ) ? 'checked="checked"' : '', ! 'HOTLINK_PREVENT_DISABLED' => ( $new['hotlink_prevent'] == 0 ) ? 'checked="checked"' : '', ! 'HOTLINK_ALLOWED' => $new['hotlink_allowed'], ! 'PERSONAL_GALLERY_USER' => ( $new['personal_gallery'] == ALBUM_USER ) ? 'checked="checked"' : '', ! 'PERSONAL_GALLERY_PRIVATE' => ( $new['personal_gallery'] == ALBUM_PRIVATE ) ? 'checked="checked"' : '', ! 'PERSONAL_GALLERY_ADMIN' => ( $new['personal_gallery'] == ALBUM_ADMIN ) ? 'checked="checked"' : '', ! 'PERSONAL_GALLERY_VIEW_ALL' => ( $new['personal_gallery_view'] == ALBUM_GUEST ) ? 'checked="checked"' : '', ! 'PERSONAL_GALLERY_VIEW_REG' => ( $new['personal_gallery_view'] == ALBUM_USER ) ? 'checked="checked"' : '', ! 'PERSONAL_GALLERY_VIEW_PRIVATE' => ( $new['personal_gallery_view'] == ALBUM_PRIVATE ) ? 'checked="checked"' : '', ! 'RATE_ENABLED' => ( $new['rate'] == 1 ) ? 'checked="checked"' : '', ! 'RATE_DISABLED' => ( $new['rate'] == 0 ) ? 'checked="checked"' : '', ! 'RATE_SCALE' => $new['rate_scale'], ! 'COMMENT_ENABLED' => ( $new['comment'] == 1 ) ? 'checked="checked"' : '', ! 'COMMENT_DISABLED' => ( $new['comment'] == 0 ) ? 'checked="checked"' : '', ! 'NO_GD' => ( $new['gd_version'] == 0 ) ? 'checked="checked"' : '', ! 'GD_V1' => ( $new['gd_version'] == 1 ) ? 'checked="checked"' : '', ! 'GD_V2' => ( $new['gd_version'] == 2 ) ? 'checked="checked"' : '', ! 'SORT_TIME' => ( $new['sort_method'] == 'pic_time' ) ? 'selected="selected"' : '', ! 'SORT_PIC_TITLE' => ( $new['sort_method'] == 'pic_title' ) ? 'selected="selected"' : '', ! 'SORT_USERNAME' => ( $new['sort_method'] == 'pic_user_id' ) ? 'selected="selected"' : '', ! 'SORT_VIEW' => ( $new['sort_method'] == 'pic_view_count' ) ? 'selected="selected"' : '', ! 'SORT_RATING' => ( $new['sort_method'] == 'rating' ) ? 'selected="selected"' : '', ! 'SORT_COMMENTS' => ( $new['sort_method'] == 'comments' ) ? 'selected="selected"' : '', ! 'SORT_NEW_COMMENT' => ( $new['sort_method'] == 'new_comment' ) ? 'selected="selected"' : '', ! 'SORT_ASC' => ( $new['sort_order'] == 'ASC' ) ? 'selected="selected"' : '', ! 'SORT_DESC' => ( $new['sort_order'] == 'DESC' ) ? 'selected="selected"' : '', ! 'FULLPIC_POPUP_ENABLED' => ( $new['fullpic_popup'] == 1 ) ? 'checked="checked"' : '', ! 'FULLPIC_POPUP_DISABLED' => ( $new['fullpic_popup'] == 0 ) ? 'checked="checked"' : '', ! 'S_GUEST' => ALBUM_GUEST, ! 'S_USER' => ALBUM_USER, ! 'S_PRIVATE' => ALBUM_PRIVATE, ! 'S_MOD' => ALBUM_MOD, ! 'S_ADMIN' => ALBUM_ADMIN, ! 'L_MAX_PICS' => $lang['Max_pics'], ! 'L_MAX_FILE_SIZE' => $lang['Max_file_size'], ! 'L_MAX_WIDTH' => $lang['Max_width'], ! 'L_MAX_HEIGHT' => $lang['Max_height'], ! 'L_USER_PICS_LIMIT' => $lang['User_pics_limit'], ! 'L_MOD_PICS_LIMIT' => $lang['Moderator_pics_limit'], ! 'L_ROWS_PER_PAGE' => $lang['Rows_per_page'], ! 'L_COLS_PER_PAGE' => $lang['Cols_per_page'], ! 'L_MANUAL_THUMBNAIL' => $lang['Manual_thumbnail'], ! 'L_THUMBNAIL_QUALITY' => $lang['Thumbnail_quality'], ! 'L_THUMBNAIL_SIZE' => $lang['Thumbnail_size'], ! 'L_THUMBNAIL_CACHE' => $lang['Thumbnail_cache'], ! 'L_JPG_ALLOWED' => $lang['JPG_allowed'], ! 'L_PNG_ALLOWED' => $lang['PNG_allowed'], ! 'L_GIF_ALLOWED' => $lang['GIF_allowed'], ! 'L_PIC_DESC_MAX_LENGTH' => $lang['Pic_Desc_Max_Length'], ! 'L_HOTLINK_PREVENT' => $lang['Hotlink_prevent'], ! 'L_HOTLINK_ALLOWED' => $lang['Hotlink_allowed'], ! 'L_PERSONAL_GALLERY' => $lang['Personal_gallery'], ! 'L_PERSONAL_GALLERY_LIMIT' => $lang['Personal_gallery_limit'], ! 'L_PERSONAL_GALLERY_VIEW' => $lang['Personal_gallery_view'], ! 'L_RATE_SYSTEM' => $lang['Rate_system'], ! 'L_RATE_SCALE' => $lang['Rate_Scale'], ! 'L_COMMENT_SYSTEM' => $lang['Comment_system'], ! 'L_GD_VERSION' => $lang['GD_version'], ! 'L_THUMBNAIL_SETTINGS' => $lang['Thumbnail_Settings'], ! 'L_EXTRA_SETTINGS' => $lang['Extra_Settings'], ! 'L_DEFAULT_SORT_METHOD' => $lang['Default_Sort_Method'], ! 'L_TIME' => $lang['Time'], ! 'L_PIC_TITLE' => $lang['Pic_Title'], ! 'L_USERNAME' => $lang['Sort_Username'], ! 'L_VIEW' => $lang['View'], ! 'L_RATING' => $lang['Rating'], ! 'L_COMMENTS' => $lang['Comments'], ! 'L_NEW_COMMENT' => $lang['New_Comment'], ! 'L_DEFAULT_SORT_ORDER' => $lang['Default_Sort_Order'], ! 'L_ASC' => $lang['Sort_Ascending'], ! 'L_DESC' => $lang['Sort_Descending'], ! 'L_FULLPIC_POPUP' => $lang['Fullpic_Popup'], ! 'L_GUEST' => $lang['Forum_ALL'], ! 'L_REG' => $lang['Forum_REG'], ! 'L_PRIVATE' => $lang['Forum_PRIVATE'], ! 'L_MOD' => $lang['Forum_MOD'], ! 'L_ADMIN' => $lang['Forum_ADMIN'], ! // --- Album Category Hierarchy : begin ! // --- version : <= 1.1.0 ! 'L_ALBUM_INDEX_SETTINGS' => $lang['Album_Index_Settings'], ! 'L_INDEX_SHOW_SUBCATS' => $lang['Show_Index_Subcats'], ! 'L_INDEX_THUMB' => $lang['Show_Index_Thumb'], ! 'L_INDEX_TOTAL_PICS' => $lang['Show_Index_Total_Pics'], ! 'L_INDEX_TOTAL_COMMENTS' => $lang['Show_Index_Total_Comments'], ! 'L_INDEX_PICS' => $lang['Show_Index_Pics'], ! 'L_INDEX_COMMENTS' => $lang['Show_Index_Comments'], ! 'L_INDEX_LAST_COMMENT' => $lang['Show_Index_Last_Comment'], ! 'L_INDEX_LAST_PIC' => $lang['Show_Index_Last_Pic'], ! 'L_INDEX_LINEBREAK_SUBCATS' => $lang['Line_Break_Subcats'], ! 'L_SHOW_RECENT_IN_SUBCATS' => $lang['Show_Recent_In_Subcats'], ! 'L_SHOW_RECENT_INSTEAD_OF_NOPICS' => $lang['Show_Recent_Instead_of_NoPics'], ! 'L_SHOW_PERSONAL_GALLERY_LINK' => $lang['Show_Personal_Gallery_Link'], ! 'L_ALBUM_CATEGORY_SORTING' => $lang['Album_Category_Sorting'], ! 'L_ALBUM_CATEGORY_SORTING_ID' => $lang['Album_Category_Sorting_Id'], ! 'L_ALBUM_CATEGORY_SORTING_NAME' => $lang['Album_Category_Sorting_Name'], ! 'L_ALBUM_CATEGORY_SORTING_ORDER' => $lang['Album_Category_Sorting_Order'], ! 'L_ALBUM_CATEGORY_DIRECTION' => $lang['Album_Category_Sorting_Direction'], ! 'L_ALBUM_CATEGORY_SORTING_ASC' => $lang['Album_Category_Sorting_Asc'], ! 'L_ALBUM_CATEGORY_SORTING_DESC' => $lang['Album_Category_Sorting_Desc'], ! 'L_ALBUM_PERSONAL_GALLERY_SETTINGS' => $lang['Album_Personal_Settings'], ! 'L_ALBUM_PERSONAL_MODERATOR' => $lang['Personal_Gallery_MOD'], ! 'L_PERSONAL_SUB_GALLERY_LIMIT' => $lang['Personal_Sub_Cat_Limit'], ! 'L_PERSONAL_ALLOW_SUB_GATTEGORY' => $lang['User_Can_Create_Personal_SubCats'], ! 'L_PERSONAL_SHOW_SUBCATS' => $lang['Show_Personal_Sub_Cats'], ! 'L_PERSONAL_SHOW_RECENT_IN_SUBCATS' => $lang['Show_Recent_In_Personal_Subcats'], ! 'L_PERSONAL_SHOW_RECENT_INSTEAD_OF_NOPICS' => $lang['Show_Recent_Instead_of_Personal_NoPics'], ! // --- version : 1.2.0 ! 'L_ALBUM_DEBUG_MODE' => $lang['Album_debug_mode'], ! 'L_PERSONAL_SHOW_ALL_PICS' => $lang['Enable_Show_All_Pics'], ! 'L_NEW_PIC_CHECK_INTERVAL' => $lang['New_Pic_Check_Interval'], ! 'L_NEW_PIC_CHECK_INTERVAL_DESC' => $lang['New_Pic_Check_Interval_Desc'], ! // --- version : 1.3.0 ! 'L_ENABLE_SUPERCELLS' => $lang['Enable_Index_Supercells'], ! // --- Album Category Hierarchy : end ! 'L_DISABLED' => $lang['Disabled'], ! 'L_ENABLED' => $lang['Enabled'], ! 'L_YES' => $lang['Yes'], ! 'L_NO' => $lang['No'], ! 'L_SUBMIT' => $lang['Submit'], ! 'L_RESET' => $lang['Reset'] ) ! ); $template->pparse( "body" ); include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); - - /* Powered by Photo Album v2.x.x (c) 2002-2003 Smartor */ - ?> \ No newline at end of file --- 84,317 ---- } ! $template->set_filenames( array( "body" => "admin/album_config_body.tpl" )); ! $template->assign_vars( array( ! 'L_ALBUM_CONFIG' => $lang['Album_config'], ! 'L_ALBUM_CONFIG_EXPLAIN' => $lang['Album_config_explain'], ! 'S_ALBUM_CONFIG_ACTION' => append_sid( 'admin_album_config.' . $phpEx ), ! 'MAX_PICS' => $new['max_pics'], ! 'MAX_FILE_SIZE' => $new['max_file_size'], ! 'MAX_WIDTH' => $new['max_width'], ! 'MAX_HEIGHT' => $new['max_height'], ! 'ROWS_PER_PAGE' => $new['rows_per_page'], ! 'COLS_PER_PAGE' => $new['cols_per_page'], ! 'THUMBNAIL_QUALITY' => $new['thumbnail_quality'], ! 'THUMBNAIL_SIZE' => $new['thumbnail_size'], ! 'PERSONAL_GALLERY_LIMIT' => $new['personal_gallery_limit'], ! 'USER_PICS_LIMIT' => $new['user_pics_limit'], ! 'MOD_PICS_LIMIT' => $new['mod_pics_limit'], ! 'THUMBNAIL_CACHE_ENABLED' => ( $new['thumbnail_cache'] == 1 ) ? 'checked="checked"' : '', ! 'THUMBNAIL_CACHE_DISABLED' => ( $new['thumbnail_cache'] == 0 ) ? 'checked="checked"' : '', ! // --- Album Category Hierarchy : begin ! // --- version : <= 1.1.0 ! 'INDEX_SHOW_SUBCATS_ENABLED' => ( $new['show_index_subcats'] == 1 ) ? 'checked="checked"' : '', ! 'INDEX_SHOW_SUBCATS_DISABLED' => ( $new['show_index_subcats'] == 0 ) ? 'checked="checked"' : '', ! 'INDEX_THUMB_ENABLED' => ( $new['show_index_thumb'] == 1 ) ? 'checked="checked"' : '', ! 'INDEX_THUMB_DISABLED' => ( $new['show_index_thumb'] == 0 ) ? 'checked="checked"' : '', ! 'INDEX_TOTAL_PICS_ENABLED' => ( $new['show_index_total_pics'] == 1 ) ? 'checked="checked"' : '', ! 'INDEX_TOTAL_PICS_DISABLED' => ( $new['show_index_total_pics'] == 0 ) ? 'checked="checked"' : '', ! 'INDEX_TOTAL_COMMENTS_ENABLED' => ( $new['show_index_total_comments'] == 1 ) ? 'checked="checked"' : '', ! 'INDEX_TOTAL_COMMENTS_DISABLED' => ( $new['show_index_total_comments'] == 0 ) ? 'checked="checked"' : '', ! 'INDEX_PICS_ENABLED' => ( $new['show_index_pics'] == 1 ) ? 'checked="checked"' : '', ! 'INDEX_PICS_DISABLED' => ( $new['show_index_pics'] == 0 ) ? 'checked="checked"' : '', ! 'INDEX_COMMENTS_ENABLED' => ( $new['show_index_comments'] == 1 ) ? 'checked="checked"' : '', ! 'INDEX_COMMENTS_DISABLED' => ( $new['show_index_comments'] == 0 ) ? 'checked="checked"' : '', ! 'INDEX_LAST_COMMENT_ENABLED' => ( $new['show_index_last_comment'] == 1 ) ? 'checked="checked"' : '', ! 'INDEX_LAST_COMMENT_DISABLED' => ( $new['show_index_last_comment'] == 0 ) ? 'checked="checked"' : '', ! 'INDEX_LAST_PIC_ENABLED' => ( $new['show_index_last_pic'] == 1 ) ? 'checked="checked"' : '', ! 'INDEX_LAST_PIC_DISABLED' => ( $new['show_index_last_pic'] == 0 ) ? 'checked="checked"' : '', ! 'INDEX_LINEBREAK_ENABLED' => ( $new['line_break_subcats'] == 1 ) ? 'checked="checked"' : '', ! 'INDEX_LINEBREAK_DISABLED' => ( $new['line_break_subcats'] == 0 ) ? 'checked="checked"' : '', ! 'SHOW_RECENT_IN_SUBCATS_ENABLED' => ( $new['show_recent_in_subcats'] == 1 ) ? 'checked="checked"' : '', ! 'SHOW_RECENT_IN_SUBCATS_DISABLED' => ( $new['show_recent_in_subcats'] == 0 ) ? 'checked="checked"' : '', ! 'SHOW_RECENT_INSTEAD_OF_NOPICS_ENABLED' => ( $new['show_recent_instead_of_nopics'] == 1 ) ? 'checked="checked"' : '', ! 'SHOW_RECENT_INSTEAD_OF_NOPICS_DISABLED' => ( $new['show_recent_instead_of_nopics'] == 0 ) ? 'check... [truncated message content] |
|
From: Jon O. <jon...@us...> - 2006-06-30 19:54:27
|
Update of /cvsroot/mxbb/mx_linkdb/linkdb/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv9382/modules/mx_linkdb/linkdb/admin Modified Files: admin_cat_manage.php admin_link_manage.php admin_setting.php Log Message: Ok, i'm starting with some code cleanup, before digging deep... Index: admin_cat_manage.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/admin/admin_cat_manage.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** admin_cat_manage.php 5 Apr 2006 22:35:24 -0000 1.4 --- admin_cat_manage.php 30 Jun 2006 19:54:14 -0000 1.5 *************** *** 34,38 **** mx_message_die( GENERAL_MESSAGE, $message ); } ! }elseif ( $mode == 'do_add' && $cat_id ) { $cat_id = $this->update_add_cat( $cat_id ); --- 34,39 ---- mx_message_die( GENERAL_MESSAGE, $message ); } ! } ! elseif ( $mode == 'do_add' && $cat_id ) { $cat_id = $this->update_add_cat( $cat_id ); *************** *** 43,47 **** mx_message_die( GENERAL_MESSAGE, $message ); } ! }elseif ( $mode == 'do_delete' ) { $this->delete_cat( $cat_id ); --- 44,49 ---- mx_message_die( GENERAL_MESSAGE, $message ); } ! } ! elseif ( $mode == 'do_delete' ) { $this->delete_cat( $cat_id ); *************** *** 52,62 **** mx_message_die( GENERAL_MESSAGE, $message ); } ! }elseif ( $mode == 'cat_order' ) { $this->order_cat( $cat_id_other ); ! }elseif ( $mode == 'sync' ) { $this->sync( $cat_id_other ); ! }elseif ( $mode == 'sync_all' ) { $this->sync_all(); --- 54,67 ---- mx_message_die( GENERAL_MESSAGE, $message ); } ! } ! elseif ( $mode == 'cat_order' ) { $this->order_cat( $cat_id_other ); ! } ! elseif ( $mode == 'sync' ) { $this->sync( $cat_id_other ); ! } ! elseif ( $mode == 'sync_all' ) { $this->sync_all(); *************** *** 95,123 **** } ! $template->set_filenames( array( 'body' => $template_file ) ! ); if ( sizeof( $this->error ) ) $template->assign_block_vars( 'linkdb_error', array() ); ! $template->assign_vars( array( 'L_CAT_TITLE' => $l_title, ! 'L_CAT_EXPLAIN' => $l_explain, ! 'ERROR' => ( sizeof( $this->error ) ) ? implode( '<br />', $this->error ) : '', ! 'S_HIDDEN_FIELDS' => $s_hidden_fields, ! 'S_CAT_ACTION' => append_sid( "admin_linkdb.$phpEx?action=cat_manage" ) ) ! ); if ( $mode == '' || $mode == 'cat_order' || $mode == 'sync' || $mode == 'sync_all' ) { ! $template->assign_vars( array( 'L_CREATE_CATEGORY' => $lang['Create_category'], ! 'L_EDIT' => $lang['Edit'], ! 'L_DELETE' => $lang['Delete'], ! 'L_MOVE_UP' => $lang['Move_up'], ! 'L_MOVE_DOWN' => $lang['Move_down'], ! 'L_SUB_CAT' => $lang['Sub_category'], ! 'L_RESYNC' => $lang['Resync'] ) ! ); $this->admin_cat_main( $cat_id ); ! }elseif ( $mode == 'add' || $mode == 'edit' ) { if ( $mode == 'add' ) --- 100,130 ---- } ! $template->set_filenames( array( 'body' => $template_file ) ); if ( sizeof( $this->error ) ) $template->assign_block_vars( 'linkdb_error', array() ); ! $template->assign_vars( array( ! 'L_CAT_TITLE' => $l_title, ! 'L_CAT_EXPLAIN' => $l_explain, ! 'ERROR' => ( sizeof( $this->error ) ) ? implode( '<br />', $this->error ) : '', ! 'S_HIDDEN_FIELDS' => $s_hidden_fields, ! 'S_CAT_ACTION' => append_sid( "admin_linkdb.$phpEx?action=cat_manage" ) ) ! ); if ( $mode == '' || $mode == 'cat_order' || $mode == 'sync' || $mode == 'sync_all' ) { ! $template->assign_vars( array( ! 'L_CREATE_CATEGORY' => $lang['Create_category'], ! 'L_EDIT' => $lang['Edit'], ! 'L_DELETE' => $lang['Delete'], ! 'L_MOVE_UP' => $lang['Move_up'], ! 'L_MOVE_DOWN' => $lang['Move_down'], ! 'L_SUB_CAT' => $lang['Sub_category'], ! 'L_RESYNC' => $lang['Resync'] ) ! ); $this->admin_cat_main( $cat_id ); ! } ! elseif ( $mode == 'add' || $mode == 'edit' ) { if ( $mode == 'add' ) *************** *** 149,180 **** } ! $template->assign_vars( array( 'CAT_NAME' => $cat_name, ! 'L_CAT_NAME' => $lang['Catname'], ! 'L_CAT_NAME_INFO' => $lang['Catnameinfo'], ! 'L_CAT_PARENT' => $lang['Catparent'], ! 'L_CAT_PARENT_INFO' => $lang['Catparentinfo'], ! 'L_NONE' => $lang['None'], ! 'L_CAT_NAME_FIELD_EMPTY' => $lang['Cat_name_missing'], ! 'S_CAT_LIST' => $cat_list ) ! ); ! }elseif ( $mode == 'delete' ) { $select_cat = $this->jumpmenu_option( 0, 0, array( $cat_id => 1 ) ); $file_to_select_cat = $this->jumpmenu_option( 0, 0, '', true ); ! $template->assign_vars( array( 'S_SELECT_CAT' => $select_cat, ! 'S_FILE_SELECT_CAT' => $file_to_select_cat, ! 'LINK_SAME_CAT' => $lang['Link_same_cat'], ! 'LINK_MOVE_CAT' => $lang['Link_move_cat'], ! 'L_DELETE' => $lang['Delete'], ! 'L_DO_FILE' => $lang['Dellinks'], ! 'L_DO_CAT' => $lang['Do_cat'], ! 'L_MOVE_TO' => $lang['Move_to'], ! 'L_SELECT_CAT' => $lang['Select_a_Category'], ! 'L_DELETE' => $lang['Delete'], ! 'L_MOVE' => $lang['Move'] ) ! ); } --- 156,190 ---- } ! $template->assign_vars( array( ! 'CAT_NAME' => $cat_name, ! 'L_CAT_NAME' => $lang['Catname'], ! 'L_CAT_NAME_INFO' => $lang['Catnameinfo'], ! 'L_CAT_PARENT' => $lang['Catparent'], ! 'L_CAT_PARENT_INFO' => $lang['Catparentinfo'], ! 'L_NONE' => $lang['None'], ! 'L_CAT_NAME_FIELD_EMPTY' => $lang['Cat_name_missing'], ! 'S_CAT_LIST' => $cat_list ) ! ); ! } ! elseif ( $mode == 'delete' ) { $select_cat = $this->jumpmenu_option( 0, 0, array( $cat_id => 1 ) ); $file_to_select_cat = $this->jumpmenu_option( 0, 0, '', true ); ! $template->assign_vars( array( ! 'S_SELECT_CAT' => $select_cat, ! 'S_FILE_SELECT_CAT' => $file_to_select_cat, ! 'LINK_SAME_CAT' => $lang['Link_same_cat'], ! 'LINK_MOVE_CAT' => $lang['Link_move_cat'], ! 'L_DELETE' => $lang['Delete'], ! 'L_DO_FILE' => $lang['Dellinks'], ! 'L_DO_CAT' => $lang['Do_cat'], ! 'L_MOVE_TO' => $lang['Move_to'], ! 'L_SELECT_CAT' => $lang['Select_a_Category'], ! 'L_DELETE' => $lang['Delete'], ! 'L_MOVE' => $lang['Move'] ) ! ); } *************** *** 202,215 **** $str = ( $i % 2 ) ? "row1" : "row2"; } ! $template->assign_block_vars( 'cat_row', array( 'COLOR' => $str, ! 'U_CAT' => append_sid( "admin_linkdb.$phpEx?action=cat_manage&cat_id" . $subcat_id ), ! 'U_CAT_EDIT' => append_sid( "admin_linkdb.$phpEx?action=cat_manage&mode=edit&cat_id=$subcat_id" ), ! 'U_CAT_DELETE' => append_sid( "admin_linkdb.$phpEx?action=cat_manage&mode=delete&cat_id=$subcat_id" ), ! 'U_CAT_MOVE_UP' => append_sid( "admin_linkdb.$phpEx?action=cat_manage&mode=cat_order&move=-15&cat_id_other=$subcat_id" ), ! 'U_CAT_MOVE_DOWN' => append_sid( "admin_linkdb.$phpEx?action=cat_manage&mode=cat_order&move=15&cat_id_other=$subcat_id" ), ! 'U_CAT_RESYNC' => append_sid( "admin_linkdb.$phpEx?action=cat_manage&mode=sync&cat_id_other=$subcat_id" ), ! 'CAT_NAME' => $cat_data['cat_name'], ! 'PRE' => $pre ) ! ); $this->admin_cat_main( $subcat_id, $depth + 1 ); } --- 212,226 ---- $str = ( $i % 2 ) ? "row1" : "row2"; } ! $template->assign_block_vars( 'cat_row', array( ! 'COLOR' => $str, ! 'U_CAT' => append_sid( "admin_linkdb.$phpEx?action=cat_manage&cat_id" . $subcat_id ), ! 'U_CAT_EDIT' => append_sid( "admin_linkdb.$phpEx?action=cat_manage&mode=edit&cat_id=$subcat_id" ), ! 'U_CAT_DELETE' => append_sid( "admin_linkdb.$phpEx?action=cat_manage&mode=delete&cat_id=$subcat_id" ), ! 'U_CAT_MOVE_UP' => append_sid( "admin_linkdb.$phpEx?action=cat_manage&mode=cat_order&move=-15&cat_id_other=$subcat_id" ), ! 'U_CAT_MOVE_DOWN' => append_sid( "admin_linkdb.$phpEx?action=cat_manage&mode=cat_order&move=15&cat_id_other=$subcat_id" ), ! 'U_CAT_RESYNC' => append_sid( "admin_linkdb.$phpEx?action=cat_manage&mode=sync&cat_id_other=$subcat_id" ), ! 'CAT_NAME' => $cat_data['cat_name'], ! 'PRE' => $pre ) ! ); $this->admin_cat_main( $subcat_id, $depth + 1 ); } *************** *** 219,222 **** } } - ?> \ No newline at end of file --- 230,232 ---- Index: admin_link_manage.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/admin/admin_link_manage.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** admin_link_manage.php 5 Apr 2006 22:35:24 -0000 1.4 --- admin_link_manage.php 30 Jun 2006 19:54:14 -0000 1.5 *************** *** 82,90 **** } ! $s_file_actions = array( 'unapproved' => $lang['Unapproved_links'], 'approved' => $lang['Approved_links'], 'file_cat' => $lang['Link_cat'], ! '' => $lang['All_links'] ! ); switch ( $mode ) --- 82,91 ---- } ! $s_file_actions = array( ! 'unapproved' => $lang['Unapproved_links'], 'approved' => $lang['Approved_links'], 'file_cat' => $lang['Link_cat'], ! '' => $lang['All_links'] ! ); switch ( $mode ) *************** *** 101,105 **** $template_file = 'admin/linkdb_admin_link.tpl'; $l_title = $lang['Link_manage']; ! $l_explain = $lang['Linkexplain']; // $s_hidden_fields = '<input type="hidden" name="mode" value="add">'; break; --- 102,106 ---- $template_file = 'admin/linkdb_admin_link.tpl'; $l_title = $lang['Link_manage']; ! $l_explain = $lang['Linkexplain']; // $s_hidden_fields = '<input type="hidden" name="mode" value="add">'; break; *************** *** 129,133 **** $message = $lang['Linkadded'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_linkdb.$phpEx?action=link_manage" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); ! }elseif ( $mode == 'do_add' && $link_id ) { $link_id = $this->update_add_link( $link_id ); --- 130,135 ---- $message = $lang['Linkadded'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_linkdb.$phpEx?action=link_manage" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); ! } ! elseif ( $mode == 'do_add' && $link_id ) { $link_id = $this->update_add_link( $link_id ); *************** *** 137,141 **** $message = $lang['Linkeedited'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_linkdb.$phpEx?action=link_manage" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( "index.$phpEx?pane=right" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); ! }elseif ( $mode == 'delete' ) { if ( is_array( $file_ids ) && !empty( $file_ids ) ) --- 139,144 ---- $message = $lang['Linkeedited'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_linkdb.$phpEx?action=link_manage" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( "index.$phpEx?pane=right" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); ! } ! elseif ( $mode == 'delete' ) { if ( is_array( $file_ids ) && !empty( $file_ids ) ) *************** *** 151,155 **** } $this->_linkdb(); ! }elseif ( $mode == 'do_approve' || $mode == 'do_unapprove' ) { if ( is_array( $file_ids ) && !empty( $file_ids ) ) --- 154,159 ---- } $this->_linkdb(); ! } ! elseif ( $mode == 'do_approve' || $mode == 'do_unapprove' ) { if ( is_array( $file_ids ) && !empty( $file_ids ) ) *************** *** 167,180 **** } ! $template->set_filenames( array( 'body' => $template_file ) ! ); ! $template->assign_vars( array( 'L_FILE_TITLE' => $l_title, ! 'L_FILE_EXPLAIN' => $l_explain, ! 'L_ADD_FILE' => $lang['AddLink'], ! 'S_HIDDEN_FIELDS' => $s_hidden_fields, ! 'S_FILE_ACTION' => append_sid( "admin_linkdb.$phpEx?action=link_manage" ) ) ! ); if ( in_array( $mode, array( '', 'unapproved', 'approved', 'broken', 'do_approve', 'do_unapprove', 'delete', 'file_cat' ) ) ) --- 171,184 ---- } ! $template->set_filenames( array( 'body' => $template_file ) ); ! $template->assign_vars( array( ! 'L_FILE_TITLE' => $l_title, ! 'L_FILE_EXPLAIN' => $l_explain, ! 'L_ADD_FILE' => $lang['AddLink'], ! 'S_HIDDEN_FIELDS' => $s_hidden_fields, ! 'S_FILE_ACTION' => append_sid( "admin_linkdb.$phpEx?action=link_manage" ) ) ! ); if ( in_array( $mode, array( '', 'unapproved', 'approved', 'broken', 'do_approve', 'do_unapprove', 'delete', 'file_cat' ) ) ) *************** *** 284,288 **** if ( $mode == '' ) { ! $global_array = array( 0 => array( 'lang_var' => $lang['Unapproved_links'], 'row_set' => $unapproved_file_rowset, 'approval' => 'approve' ), --- 288,293 ---- if ( $mode == '' ) { ! $global_array = array( ! 0 => array( 'lang_var' => $lang['Unapproved_links'], 'row_set' => $unapproved_file_rowset, 'approval' => 'approve' ), *************** *** 293,307 **** 'row_set' => $broken_file_rowset, 'approval' => 'both')*/ ); ! }elseif ( $mode == 'approved' || $mode == 'file_cat' ) { $global_array = array( 0 => array( 'lang_var' => $lang['Approved_links'], 'row_set' => $approved_rowset, 'approval' => 'unapprove' ) ); ! }elseif ( $mode == 'unapproved' ) { $global_array = array( 0 => array( 'lang_var' => $lang['Unapproved_links'], 'row_set' => $unapproved_file_rowset, 'approval' => 'approve' ) ); ! }elseif ( $mode == 'broken' ) { $global_array = array( 0 => array( 'lang_var' => $lang['Broken_files'], --- 298,315 ---- 'row_set' => $broken_file_rowset, 'approval' => 'both')*/ ); ! } ! elseif ( $mode == 'approved' || $mode == 'file_cat' ) { $global_array = array( 0 => array( 'lang_var' => $lang['Approved_links'], 'row_set' => $approved_rowset, 'approval' => 'unapprove' ) ); ! } ! elseif ( $mode == 'unapproved' ) { $global_array = array( 0 => array( 'lang_var' => $lang['Unapproved_links'], 'row_set' => $unapproved_file_rowset, 'approval' => 'approve' ) ); ! } ! elseif ( $mode == 'broken' ) { $global_array = array( 0 => array( 'lang_var' => $lang['Broken_files'], *************** *** 334,355 **** $cat_list .= '</select>'; ! $template->assign_vars( array( 'L_EDIT' => $lang['Edit'], ! 'L_DELETE' => $lang['Delete'], ! 'L_CATEGORY' => $lang['Category'], ! 'L_MODE' => $lang['View'], ! 'L_GO' => $lang['Go'], ! 'L_DELETE_FILE' => $lang['Delete_selected'], ! 'L_APPROVE' => $lang['Approve'], ! 'L_UNAPPROVE' => $lang['Unapprove'], ! 'L_APPROVE_FILE' => $lang['Approve_selected'], ! 'L_UNAPPROVE_FILE' => $lang['Unapprove_selected'], ! 'L_NO_FILES' => $lang['No_link'], ! 'PAGINATION' => generate_pagination( append_sid( "admin_linkdb.$phpEx?action=link_manage&mode=$mode&sort_method=$sort_method&sort_order=$sort_order&cat_id=$cat_id" ), $total_files, $linkdb_config['settings_link_page'], $start ), ! 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $linkdb_config['settings_link_page'] ) + 1 ), ceil( $total_files / $linkdb_config['settings_link_page'] ) ), ! 'S_CAT_LIST' => $cat_list, ! 'S_MODE_SELECT' => $s_file_list ) ! ); foreach( $global_array as $files_data ) --- 342,364 ---- $cat_list .= '</select>'; ! $template->assign_vars( array( ! 'L_EDIT' => $lang['Edit'], ! 'L_DELETE' => $lang['Delete'], ! 'L_CATEGORY' => $lang['Category'], ! 'L_MODE' => $lang['View'], ! 'L_GO' => $lang['Go'], ! 'L_DELETE_FILE' => $lang['Delete_selected'], ! 'L_APPROVE' => $lang['Approve'], ! 'L_UNAPPROVE' => $lang['Unapprove'], ! 'L_APPROVE_FILE' => $lang['Approve_selected'], ! 'L_UNAPPROVE_FILE' => $lang['Unapprove_selected'], ! 'L_NO_FILES' => $lang['No_link'], ! 'PAGINATION' => generate_pagination( append_sid( "admin_linkdb.$phpEx?action=link_manage&mode=$mode&sort_method=$sort_method&sort_order=$sort_order&cat_id=$cat_id" ), $total_files, $linkdb_config['settings_link_page'], $start ), ! 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $linkdb_config['settings_link_page'] ) + 1 ), ceil( $total_files / $linkdb_config['settings_link_page'] ) ), ! 'S_CAT_LIST' => $cat_list, ! 'S_MODE_SELECT' => $s_file_list ) ! ); foreach( $global_array as $files_data ) *************** *** 368,376 **** } ! $template->assign_block_vars( 'file_mode', array( 'L_FILE_MODE' => $files_data['lang_var'], ! 'DATA' => ( isset( $files_data['row_set'] ) ) ? true : false, ! 'APPROVE' => $approve, ! 'UNAPPROVE' => $unapprove ) ! ); if ( isset( $files_data['row_set'] ) ) --- 377,386 ---- } ! $template->assign_block_vars( 'file_mode', array( ! 'L_FILE_MODE' => $files_data['lang_var'], ! 'DATA' => ( isset( $files_data['row_set'] ) ) ? true : false, ! 'APPROVE' => $approve, ! 'UNAPPROVE' => $unapprove ) ! ); if ( isset( $files_data['row_set'] ) ) *************** *** 386,399 **** $file_poster .= ( $file_data['user_id'] != ANONYMOUS ) ? '</a>' : ''; ! $template->assign_block_vars( 'file_mode.file_row', array( 'COLOR' => ( ++$j % 2 ) ? "row1" : "row2", ! 'FILE_NAME' => "<a href=" . $file_data['link_url'] . " target=_blank>" . $file_data['link_name'] . "</a>", ! 'FILE_SUBMITED_BY' => $file_poster, ! 'FILE_NUMBER' => $i++, ! 'FILE_ID' => $file_data['link_id'], ! 'U_FILE_EDIT' => append_sid( "admin_linkdb.$phpEx?action=link_manage&mode=edit&link_id={$file_data['link_id']}" ), ! 'U_FILE_DELETE' => append_sid( "admin_linkdb.$phpEx?action=link_manage&mode=delete&link_id={$file_data['link_id']}" ), ! 'U_FILE_APPROVE' => append_sid( "admin_linkdb.$phpEx?action=link_manage&mode=$approve_mode&link_id={$file_data['link_id']}" ), ! 'L_APPROVE' => ( $file_data['link_approved'] ) ? $lang['Unapprove'] : $lang['Approve'] ) ! ); } } --- 396,410 ---- $file_poster .= ( $file_data['user_id'] != ANONYMOUS ) ? '</a>' : ''; ! $template->assign_block_vars( 'file_mode.file_row', array( ! 'COLOR' => ( ++$j % 2 ) ? "row1" : "row2", ! 'FILE_NAME' => "<a href=" . $file_data['link_url'] . " target=_blank>" . $file_data['link_name'] . "</a>", ! 'FILE_SUBMITED_BY' => $file_poster, ! 'FILE_NUMBER' => $i++, ! 'FILE_ID' => $file_data['link_id'], ! 'U_FILE_EDIT' => append_sid( "admin_linkdb.$phpEx?action=link_manage&mode=edit&link_id={$file_data['link_id']}" ), ! 'U_FILE_DELETE' => append_sid( "admin_linkdb.$phpEx?action=link_manage&mode=delete&link_id={$file_data['link_id']}" ), ! 'U_FILE_APPROVE' => append_sid( "admin_linkdb.$phpEx?action=link_manage&mode=$approve_mode&link_id={$file_data['link_id']}" ), ! 'L_APPROVE' => ( $file_data['link_approved'] ) ? $lang['Unapprove'] : $lang['Approve'] ) ! ); } } *************** *** 439,492 **** } ! $template->assign_vars( array( 'LINK_CAT_NOT_ALLOW' => $lang['Cat_not_allow'], ! 'FILE_NAME' => $link_name, ! 'FILE_LONG_DESC' => $link_longdesc, ! 'LINK_LOGO_SRC' => $link_logo_src, ! 'FILE_DLURL' => $file_url, ! 'FILE_DOWNLOAD' => $file_download, ! 'APPROVED_CHECKED_YES' => $approved_checked_yes, ! 'APPROVED_CHECKED_NO' => $approved_checked_no, ! 'L_FILE_APPROVED' => $lang['Approved'], ! 'L_FILE_APPROVED_INFO' => $lang['Approved_info'], ! '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_LINK_LOGO_SRC' => sprintf( $lang['Link_logo_src1'], $linkdb_config['width'], $linkdb_config['height'] ), ! 'L_PREVIEW' => $lang['Preview'], ! 'L_FILE_URL' => $lang['Siteurl'], ! 'L_FILE_UPLOAD' => $lang['File_upload'], ! 'L_FILEINFO_UPLOAD' => $lang['Fileinfo_upload'], ! 'L_FILE_CAT' => $lang['Sitecat'], ! 'L_FILE_CAT_INFO' => $lang['Sitecatinfo'], ! 'L_FILE_DOWNLOAD' => $lang['Link_hits'], ! 'L_UPLOADED_FILE' => $lang['Uploaded_file'], ! 'L_NO' => $lang['No'], ! 'L_YES' => $lang['Yes'], ! 'LINK_NAME_FIELD' => $lang['Link_name_field'], ! 'LINK_URL_FIELD' => $lang['Link_url_field'], ! 'LINK_LONG_DES_FIELD' => $lang['Link_long_des_field'], ! 'S_POSTICONS' => $file_posticons, ! 'S_LICENSE_LIST' => $file_license, ! 'S_CAT_LIST' => $file_cat_list ) ! ); } if ( sizeof( $this->error ) ) $template->assign_block_vars( 'linkdb_error', array() ); ! $template->assign_vars( array( 'ERROR' => ( sizeof( $this->error ) ) ? implode( '<br />', $this->error ) : '' ) ! ); $template->pparse( 'body' ); } } - ?> \ No newline at end of file --- 450,502 ---- } ! $template->assign_vars( array( ! 'LINK_CAT_NOT_ALLOW' => $lang['Cat_not_allow'], ! 'FILE_NAME' => $link_name, ! 'FILE_LONG_DESC' => $link_longdesc, ! 'LINK_LOGO_SRC' => $link_logo_src, ! 'FILE_DLURL' => $file_url, ! 'FILE_DOWNLOAD' => $file_download, ! 'APPROVED_CHECKED_YES' => $approved_checked_yes, ! 'APPROVED_CHECKED_NO' => $approved_checked_no, ! 'L_FILE_APPROVED' => $lang['Approved'], ! 'L_FILE_APPROVED_INFO' => $lang['Approved_info'], ! '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_LINK_LOGO_SRC' => sprintf( $lang['Link_logo_src1'], $linkdb_config['width'], $linkdb_config['height'] ), ! 'L_PREVIEW' => $lang['Preview'], ! 'L_FILE_URL' => $lang['Siteurl'], ! 'L_FILE_UPLOAD' => $lang['File_upload'], ! 'L_FILEINFO_UPLOAD' => $lang['Fileinfo_upload'], ! 'L_FILE_CAT' => $lang['Sitecat'], ! 'L_FILE_CAT_INFO' => $lang['Sitecatinfo'], ! 'L_FILE_DOWNLOAD' => $lang['Link_hits'], ! 'L_UPLOADED_FILE' => $lang['Uploaded_file'], ! 'L_NO' => $lang['No'], ! 'L_YES' => $lang['Yes'], ! 'LINK_NAME_FIELD' => $lang['Link_name_field'], ! 'LINK_URL_FIELD' => $lang['Link_url_field'], ! 'LINK_LONG_DES_FIELD' => $lang['Link_long_des_field'], ! 'S_POSTICONS' => $file_posticons, ! 'S_LICENSE_LIST' => $file_license, ! 'S_CAT_LIST' => $file_cat_list ) ! ); } if ( sizeof( $this->error ) ) $template->assign_block_vars( 'linkdb_error', array() ); ! $template->assign_vars( array( 'ERROR' => ( sizeof( $this->error ) ) ? implode( '<br />', $this->error ) : '' ) ); $template->pparse( 'body' ); } } ?> \ No newline at end of file Index: admin_setting.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/admin/admin_setting.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** admin_setting.php 5 Apr 2006 22:35:24 -0000 1.4 --- admin_setting.php 30 Jun 2006 19:54:14 -0000 1.5 *************** *** 52,134 **** } ! $template->set_filenames( array( 'body' => 'admin/linkdb_admin_settings.tpl' ) ! ); ! $template->assign_vars( array( 'S_SETTINGS_ACTION' => append_sid( "admin_linkdb.$phpEx" ), ! 'L_SETTINGS' => $lang['Configuration'], ! 'L_SETTINGSTITLE' => $lang['Settingstitle'], ! 'L_SETTINGSEXPLAIN' => $lang['Settingsexplain'], ! 'LOCK_SUBMIT_SITE_YES' => ( $new['lock_submit_site'] ) ? "checked=\"checked\"" : "", ! 'LOCK_SUBMIT_SITE_NO' => ( !$new['lock_submit_site'] ) ? "checked=\"checked\"" : "", ! 'L_LOCK_SUBMIT_SITE' => $lang['lock_submit_site'], ! 'CAT_COL' => $new['cat_col'], ! 'L_CAT_COL' => $lang['cat_col'], ! 'SPLIT_LINKS_YES' => ( $new['split_links'] ) ? "checked=\"checked\"" : "", ! 'SPLIT_LINKS_NO' => ( !$new['split_links'] ) ? "checked=\"checked\"" : "", ! 'L_SPLIT_LINKS' => $lang['split_links'], ! 'L_SITE_LOGO' => $lang['site_logo'], ! 'L_SITE_URL' => $lang['site_url'], ! 'L_WIDTH' => $lang['width'], ! 'L_HEIGHT' => $lang['height'], ! 'L_SETTINGS_LINK_PAGE' => $lang['settings_link_page'], ! 'L_DISPLAY_INTERVAL' => $lang['interval'], ! 'L_DISPLAY_LOGO_NUM' => $lang['display_logo'], ! 'INTERVAL' => $new['display_interval'], ! 'LOGO_NUM' => $new['display_logo_num'], ! 'SITE_LOGO' => $new['site_logo'], ! 'SITE_URL' => $new['site_url'], ! 'WIDTH' => $new['width'], ! 'HEIGHT' => $new['height'], ! 'SETTINGS_LINK_PAGE' => $new['settings_link_page'], ! 'ALLOW_GUEST_SUBMIT_SITE_YES' => ( $new['allow_guest_submit_site'] ) ? "checked=\"checked\"" : "", ! 'ALLOW_GUEST_SUBMIT_SITE_NO' => ( !$new['allow_guest_submit_site'] ) ? "checked=\"checked\"" : "", ! 'L_ALLOW_GUEST_SUBMIT_SITE' => $lang['allow_guest_submit_site'], ! 'ALLOW_NO_LOGO_YES' => ( $new['allow_no_logo'] ) ? "checked=\"checked\"" : "", ! 'ALLOW_NO_LOGO_NO' => ( !$new['allow_no_logo'] ) ? "checked=\"checked\"" : "", ! 'L_ALLOW_NO_LOGO' => $lang['allow_no_logo'], ! 'DISLAY_LINKS_LOGO_YES' => ( $new['display_links_logo'] ) ? "checked=\"checked\"" : "", ! 'DISLAY_LINKS_LOGO_NO' => ( !$new['display_links_logo'] ) ? "checked=\"checked\"" : "", ! 'L_DISPLAY_LINKS_LOGO' => $lang['Link_display_links_logo'], ! 'EMAIL_YES' => ( $new['email_notify'] ) ? "checked=\"checked\"" : "", ! 'EMAIL_NO' => ( !$new['email_notify'] ) ? "checked=\"checked\"" : "", ! 'L_LINK_EMAIL_NOTIFY' => $lang['Link_email_notify'], ! 'PM_YES' => ( $new['pm_notify'] ) ? "checked=\"checked\"" : "", ! 'PM_NO' => ( !$new['pm_notify'] ) ? "checked=\"checked\"" : "", ! 'L_LINK_PM_NOTIFY' => $lang['Link_pm_notify'], ! 'RATE_YES' => ( $new['allow_vote'] ) ? "checked=\"checked\"" : "", ! 'RATE_NO' => ( !$new['allow_vote'] ) ? "checked=\"checked\"" : "", ! 'L_LINK_ALLOW_RATE' => $lang['Link_allow_rate'], ! 'L_YES' => $lang['Yes'], ! 'L_NO' => $lang['No'], ! 'NEED_VALIDATION_YES' => ( $new['link_validation'] ) ? "checked=\"checked\"" : "", ! 'NEED_VALIDATION_NO' => ( !$new['link_validation'] ) ? "checked=\"checked\"" : "", ! 'L_NEED_VALIDATION' => $lang['Need_validation'], ! 'L_DEFAULT_SORT_METHOD' => $lang['Default_sort_method'], ! 'L_DEFAULT_SORT_ORDER' => $lang['Default_sort_order'], ! 'L_DOWNLOADS' => $lang['Hits'], ! 'L_DATE' => $lang['Date'], ! 'L_NAME' => $lang['Sitename'], ! 'L_LINK_SITE_DESC' => $lang['Siteld'], ! 'L_ASC' => $lang['Sort_Ascending'], ! 'L_DESC' => $lang['Sort_Descending'], ! 'SORT_NAME' => ( $new['sort_method'] == 'link_name' ) ? 'selected="selected"' : '', ! 'SORT_TIME' => ( $new['sort_method'] == 'link_time' ) ? 'selected="selected"' : '', ! 'SORT_RATING' => ( $new['sort_method'] == 'link_longdesc' ) ? 'selected="selected"' : '', ! 'SORT_DOWNLOADS' => ( $new['sort_method'] == 'link_hits' ) ? 'selected="selected"' : '', ! 'SORT_ASC' => ( $new['sort_order'] == 'ASC' ) ? 'selected="selected"' : '', ! 'SORT_DESC' => ( $new['sort_order'] == 'DESC' ) ? 'selected="selected"' : '', ! 'L_SUBMIT' => $lang['Submit'], ! 'L_RESET' => $lang['Reset'] ) ! ); $template->pparse( 'body' ); } } - ?> \ No newline at end of file --- 52,133 ---- } ! $template->set_filenames( array( 'body' => 'admin/linkdb_admin_settings.tpl' ) ); ! $template->assign_vars( array( ! 'S_SETTINGS_ACTION' => append_sid( "admin_linkdb.$phpEx" ), ! 'L_SETTINGS' => $lang['Configuration'], ! 'L_SETTINGSTITLE' => $lang['Settingstitle'], ! 'L_SETTINGSEXPLAIN' => $lang['Settingsexplain'], ! 'LOCK_SUBMIT_SITE_YES' => ( $new['lock_submit_site'] ) ? "checked=\"checked\"" : "", ! 'LOCK_SUBMIT_SITE_NO' => ( !$new['lock_submit_site'] ) ? "checked=\"checked\"" : "", ! 'L_LOCK_SUBMIT_SITE' => $lang['lock_submit_site'], ! 'CAT_COL' => $new['cat_col'], ! 'L_CAT_COL' => $lang['cat_col'], ! 'SPLIT_LINKS_YES' => ( $new['split_links'] ) ? "checked=\"checked\"" : "", ! 'SPLIT_LINKS_NO' => ( !$new['split_links'] ) ? "checked=\"checked\"" : "", ! 'L_SPLIT_LINKS' => $lang['split_links'], ! 'L_SITE_LOGO' => $lang['site_logo'], ! 'L_SITE_URL' => $lang['site_url'], ! 'L_WIDTH' => $lang['width'], ! 'L_HEIGHT' => $lang['height'], ! 'L_SETTINGS_LINK_PAGE' => $lang['settings_link_page'], ! 'L_DISPLAY_INTERVAL' => $lang['interval'], ! 'L_DISPLAY_LOGO_NUM' => $lang['display_logo'], ! 'INTERVAL' => $new['display_interval'], ! 'LOGO_NUM' => $new['display_logo_num'], ! 'SITE_LOGO' => $new['site_logo'], ! 'SITE_URL' => $new['site_url'], ! 'WIDTH' => $new['width'], ! 'HEIGHT' => $new['height'], ! 'SETTINGS_LINK_PAGE' => $new['settings_link_page'], ! 'ALLOW_GUEST_SUBMIT_SITE_YES' => ( $new['allow_guest_submit_site'] ) ? "checked=\"checked\"" : "", ! 'ALLOW_GUEST_SUBMIT_SITE_NO' => ( !$new['allow_guest_submit_site'] ) ? "checked=\"checked\"" : "", ! 'L_ALLOW_GUEST_SUBMIT_SITE' => $lang['allow_guest_submit_site'], ! 'ALLOW_NO_LOGO_YES' => ( $new['allow_no_logo'] ) ? "checked=\"checked\"" : "", ! 'ALLOW_NO_LOGO_NO' => ( !$new['allow_no_logo'] ) ? "checked=\"checked\"" : "", ! 'L_ALLOW_NO_LOGO' => $lang['allow_no_logo'], ! 'DISLAY_LINKS_LOGO_YES' => ( $new['display_links_logo'] ) ? "checked=\"checked\"" : "", ! 'DISLAY_LINKS_LOGO_NO' => ( !$new['display_links_logo'] ) ? "checked=\"checked\"" : "", ! 'L_DISPLAY_LINKS_LOGO' => $lang['Link_display_links_logo'], ! 'EMAIL_YES' => ( $new['email_notify'] ) ? "checked=\"checked\"" : "", ! 'EMAIL_NO' => ( !$new['email_notify'] ) ? "checked=\"checked\"" : "", ! 'L_LINK_EMAIL_NOTIFY' => $lang['Link_email_notify'], ! 'PM_YES' => ( $new['pm_notify'] ) ? "checked=\"checked\"" : "", ! 'PM_NO' => ( !$new['pm_notify'] ) ? "checked=\"checked\"" : "", ! 'L_LINK_PM_NOTIFY' => $lang['Link_pm_notify'], ! 'RATE_YES' => ( $new['allow_vote'] ) ? "checked=\"checked\"" : "", ! 'RATE_NO' => ( !$new['allow_vote'] ) ? "checked=\"checked\"" : "", ! 'L_LINK_ALLOW_RATE' => $lang['Link_allow_rate'], ! 'L_YES' => $lang['Yes'], ! 'L_NO' => $lang['No'], ! 'NEED_VALIDATION_YES' => ( $new['link_validation'] ) ? "checked=\"checked\"" : "", ! 'NEED_VALIDATION_NO' => ( !$new['link_validation'] ) ? "checked=\"checked\"" : "", ! 'L_NEED_VALIDATION' => $lang['Need_validation'], ! 'L_DEFAULT_SORT_METHOD' => $lang['Default_sort_method'], ! 'L_DEFAULT_SORT_ORDER' => $lang['Default_sort_order'], ! 'L_DOWNLOADS' => $lang['Hits'], ! 'L_DATE' => $lang['Date'], ! 'L_NAME' => $lang['Sitename'], ! 'L_LINK_SITE_DESC' => $lang['Siteld'], ! 'L_ASC' => $lang['Sort_Ascending'], ! 'L_DESC' => $lang['Sort_Descending'], ! 'SORT_NAME' => ( $new['sort_method'] == 'link_name' ) ? 'selected="selected"' : '', ! 'SORT_TIME' => ( $new['sort_method'] == 'link_time' ) ? 'selected="selected"' : '', ! 'SORT_RATING' => ( $new['sort_method'] == 'link_longdesc' ) ? 'selected="selected"' : '', ! 'SORT_DOWNLOADS' => ( $new['sort_method'] == 'link_hits' ) ? 'selected="selected"' : '', ! 'SORT_ASC' => ( $new['sort_order'] == 'ASC' ) ? 'selected="selected"' : '', ! 'SORT_DESC' => ( $new['sort_order'] == 'DESC' ) ? 'selected="selected"' : '', ! 'L_SUBMIT' => $lang['Submit'], ! 'L_RESET' => $lang['Reset'] ) ! ); $template->pparse( 'body' ); } } ?> \ No newline at end of file |
|
From: Jon O. <jon...@us...> - 2006-06-30 19:54:26
|
Update of /cvsroot/mxbb/mx_linkdb/linkdb/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv9382/modules/mx_linkdb/linkdb/includes Modified Files: functions_linkdb.php functions_linkdb_field.php linkdb_common.php linkdb_constants.php Log Message: Ok, i'm starting with some code cleanup, before digging deep... Index: linkdb_common.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/includes/linkdb_common.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** linkdb_common.php 17 Jun 2006 20:48:33 -0000 1.5 --- linkdb_common.php 30 Jun 2006 19:54:14 -0000 1.6 *************** *** 14,19 **** } // addslashes to vars if magic_quotes_gpc is off ! if ( !@function_exists( 'slash_input_data' ) ) { --- 14,20 ---- } + // // addslashes to vars if magic_quotes_gpc is off ! // if ( !@function_exists( 'slash_input_data' ) ) { *************** *** 31,36 **** } // to make it work with php version under 4.1 and other stuff ! if ( @phpversion() < '4.1' ) { --- 32,38 ---- } + // // to make it work with php version under 4.1 and other stuff ! // if ( @phpversion() < '4.1' ) { *************** *** 57,61 **** --- 59,65 ---- } + // // Include linkdb data file + // include_once( $module_root_path . 'linkdb/includes/linkdb_constants.' . $phpEx ); include_once( $module_root_path . 'linkdb/includes/functions.' . $phpEx ); *************** *** 66,72 **** $linkdb = new linkdb_public(); // MX add-on // Generate paths for page and standalone mode ! // ...function based on original function written by Markus :-) function linkdb_this_mxurl( $args = '', $force_standalone_mode = false ) { --- 70,78 ---- $linkdb = new linkdb_public(); + + // // MX add-on // Generate paths for page and standalone mode ! // function linkdb_this_mxurl( $args = '', $force_standalone_mode = false ) { *************** *** 91,94 **** return $mxurl; } - ?> \ No newline at end of file --- 97,99 ---- Index: functions_linkdb.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/includes/functions_linkdb.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** functions_linkdb.php 17 Jun 2006 20:48:33 -0000 1.7 --- functions_linkdb.php 30 Jun 2006 19:54:14 -0000 1.8 *************** *** 14,17 **** --- 14,18 ---- } + // // public linkdb class // *************** *** 60,63 **** --- 61,65 ---- } + // // this will be replaced by the loaded module // *************** *** 67,74 **** } // go ahead and output the page // $page title : send page title // $tpl_name : template file name ! function display( $page_title1, $tpl_name ) { --- 69,77 ---- } + // // go ahead and output the page // $page title : send page title // $tpl_name : template file name ! // function display( $page_title1, $tpl_name ) { *************** *** 80,85 **** } // linkdb class ! class linkdb { --- 83,89 ---- } + // // linkdb class ! // class linkdb { *************** *** 123,126 **** --- 127,131 ---- } + // // Jump menu function // $cat_id : to handle parent cat_id *************** *** 129,133 **** // $for_file: TRUE high category ids will be -1 // $check_upload: if true permission for upload will be checked ! function jumpmenu_option( $cat_id = 0, $depth = 0, $default = '', $for_file = false, $check_upload = false ) { --- 134,138 ---- // $for_file: TRUE high category ids will be -1 // $check_upload: if true permission for upload will be checked ! // function jumpmenu_option( $cat_id = 0, $depth = 0, $default = '', $for_file = false, $check_upload = false ) { *************** *** 192,197 **** } // if there is no cat ! function cat_empty() { --- 197,203 ---- } + // // if there is no cat ! // function cat_empty() { *************** *** 204,210 **** } // get all sub category in side certain category // $cat_id : category id ! function get_sub_cat( $cat_id ) { --- 210,217 ---- } + // // get all sub category in side certain category // $cat_id : category id ! // function get_sub_cat( $cat_id ) { *************** *** 310,322 **** foreach ( $cat_nav as $parent_cat_id => $parent_name ) { ! $template->assign_block_vars( 'navlinks', array( 'CAT_NAME' => $parent_name, ! 'U_VIEW_CAT' => append_sid( linkdb_this_mxurl( 'action=category&cat_id=' . $parent_cat_id ) ) ) ! ); } } ! $template->assign_block_vars( 'navlinks', array( 'CAT_NAME' => $this->cat_rowset[$cat_id]['cat_name'], ! 'U_VIEW_CAT' => append_sid( linkdb_this_mxurl( 'action=category&cat_id=' . $this->cat_rowset[$cat_id]['cat_id'] ) ) ) ! ); return; --- 317,331 ---- foreach ( $cat_nav as $parent_cat_id => $parent_name ) { ! $template->assign_block_vars( 'navlinks', array( ! 'CAT_NAME' => $parent_name, ! 'U_VIEW_CAT' => append_sid( linkdb_this_mxurl( 'action=category&cat_id=' . $parent_cat_id ) ) ) ! ); } } ! $template->assign_block_vars( 'navlinks', array( ! 'CAT_NAME' => $this->cat_rowset[$cat_id]['cat_name'], ! 'U_VIEW_CAT' => append_sid( linkdb_this_mxurl( 'action=category&cat_id=' . $this->cat_rowset[$cat_id]['cat_id'] ) ) ) ! ); return; *************** *** 407,420 **** $template->assign_block_vars( 'CAT_PARENT', array() ); ! $template->assign_vars( array( 'L_SUB_CAT' => $lang['Sub_category'], ! 'L_CATEGORY' => $lang['Category'], ! 'L_FILES' => $lang['Files'] ) ! ); // output the root level category if ( isset( $this->subcat_rowset[$cat_id] ) ) { ! // Separate link categories into $catcol columns, script by CRLin ! $catnum = count( $this->subcat_rowset[$cat_id] ); $catcol = $linkdb_config['cat_col']; --- 416,430 ---- $template->assign_block_vars( 'CAT_PARENT', array() ); ! $template->assign_vars( array( ! 'L_SUB_CAT' => $lang['Sub_category'], ! 'L_CATEGORY' => $lang['Category'], ! 'L_FILES' => $lang['Files'] ) ! ); // output the root level category if ( isset( $this->subcat_rowset[$cat_id] ) ) { ! // // Separate link categories into $catcol columns, script by CRLin ! // $catnum = count( $this->subcat_rowset[$cat_id] ); $catcol = $linkdb_config['cat_col']; *************** *** 433,443 **** $sub_cat = $this->get_sub_cat( $subcat_id ); ! $template->assign_block_vars( 'CAT_PARENT.catcol.no_cat_parent', array( 'U_CAT' => append_sid( linkdb_this_mxurl( 'action=category&cat_id=' . $subcat_id ) ), ! // 'SUB_CAT' => ( !empty($sub_cat) ) ? $sub_cat : $lang['None'], ! 'SUB_CAT' => ( !empty( $sub_cat ) ) ? " $sub_cat" : "", ! 'CAT_IMAGE' => $images['linkdb_folder'], ! 'CAT_NAME' => $subcat_row['cat_name'], ! 'FILECAT' => $this->file_in_cat( $subcat_id ) ) ! ); } } --- 443,454 ---- $sub_cat = $this->get_sub_cat( $subcat_id ); ! $template->assign_block_vars( ! 'CAT_PARENT.catcol.no_cat_parent', array( 'U_CAT' => append_sid( linkdb_this_mxurl( 'action=category&cat_id=' . $subcat_id ) ), ! // 'SUB_CAT' => ( !empty($sub_cat) ) ? $sub_cat : $lang['None'], ! 'SUB_CAT' => ( !empty( $sub_cat ) ) ? " $sub_cat" : "", ! 'CAT_IMAGE' => $images['linkdb_folder'], ! 'CAT_NAME' => $subcat_row['cat_name'], ! 'FILECAT' => $this->file_in_cat( $subcat_id ) ) ! ); } } *************** *** 521,554 **** $action = ( empty( $cat_id ) ) ? 'viewall' : 'category&cat_id=' . $cat_id; ! $template->assign_vars( array( 'L_CATEGORY' => $lang['Category'], ! 'L_LINK_SITE_DESC' => $lang['Siteld'], ! 'L_DOWNLOADS' => $lang['Hits'], ! 'L_DATE' => $lang['Date'], ! 'L_NAME' => $lang['Sitename'], ! 'L_FILE' => $lang['Link'], ! 'L_SUBMITED_BY' => $lang['Submiter'], ! 'L_VOTES' => $lang['Votes'], ! 'L_SELECT_SORT_METHOD' => $lang['Select_sort_method'], ! 'L_ORDER' => $lang['Order'], ! 'L_SORT' => $lang['Sort'], ! 'L_ASC' => $lang['Sort_Ascending'], ! 'L_DESC' => $lang['Sort_Descending'], ! 'SORT_NAME' => ( $sort_method == 'link_name' ) ? 'selected="selected"' : '', ! 'SORT_TIME' => ( $sort_method == 'link_time' ) ? 'selected="selected"' : '', ! 'SORT_LONGDESC' => ( $sort_method == 'link_longdesc' ) ? 'selected="selected"' : '', ! 'SORT_DOWNLOADS' => ( $sort_method == 'link_hits' ) ? 'selected="selected"' : '', ! 'SORT_RATINGS' => ( $sort_method == 'rating' ) ? 'selected="selected"' : '', ! 'SORT_ASC' => ( $sort_order == 'ASC' ) ? 'selected="selected"' : '', ! 'SORT_DESC' => ( $sort_order == 'DESC' ) ? 'selected="selected"' : '', ! 'PAGINATION' => generate_pagination( append_sid( linkdb_this_mxurl( "action=$action&sort_method=$sort_method&sort_order=$sort_order" ) ), $total_file, $linkdb_config['settings_link_page'], $start ), ! 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $linkdb_config['settings_link_page'] ) + 1 ), ceil( $total_file / $linkdb_config['settings_link_page'] ) ), ! 'ID' => $cat_id, ! 'START' => $start, ! 'S_ACTION_SORT' => append_sid( linkdb_this_mxurl( "action=$action" ) ) ) ! ); if ( !$linkdb_config['split_links'] ) --- 532,566 ---- $action = ( empty( $cat_id ) ) ? 'viewall' : 'category&cat_id=' . $cat_id; ! $template->assign_vars( array( ! 'L_CATEGORY' => $lang['Category'], ! 'L_LINK_SITE_DESC' => $lang['Siteld'], ! 'L_DOWNLOADS' => $lang['Hits'], ! 'L_DATE' => $lang['Date'], ! 'L_NAME' => $lang['Sitename'], ! 'L_FILE' => $lang['Link'], ! 'L_SUBMITED_BY' => $lang['Submiter'], ! 'L_VOTES' => $lang['Votes'], ! 'L_SELECT_SORT_METHOD' => $lang['Select_sort_method'], ! 'L_ORDER' => $lang['Order'], ! 'L_SORT' => $lang['Sort'], ! 'L_ASC' => $lang['Sort_Ascending'], ! 'L_DESC' => $lang['Sort_Descending'], ! 'SORT_NAME' => ( $sort_method == 'link_name' ) ? 'selected="selected"' : '', ! 'SORT_TIME' => ( $sort_method == 'link_time' ) ? 'selected="selected"' : '', ! 'SORT_LONGDESC' => ( $sort_method == 'link_longdesc' ) ? 'selected="selected"' : '', ! 'SORT_DOWNLOADS' => ( $sort_method == 'link_hits' ) ? 'selected="selected"' : '', ! 'SORT_RATINGS' => ( $sort_method == 'rating' ) ? 'selected="selected"' : '', ! 'SORT_ASC' => ( $sort_order == 'ASC' ) ? 'selected="selected"' : '', ! 'SORT_DESC' => ( $sort_order == 'DESC' ) ? 'selected="selected"' : '', ! 'PAGINATION' => generate_pagination( append_sid( linkdb_this_mxurl( "action=$action&sort_method=$sort_method&sort_order=$sort_order" ) ), $total_file, $linkdb_config['settings_link_page'], $start ), ! 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $linkdb_config['settings_link_page'] ) + 1 ), ceil( $total_file / $linkdb_config['settings_link_page'] ) ), ! 'ID' => $cat_id, ! 'START' => $start, ! 'S_ACTION_SORT' => append_sid( linkdb_this_mxurl( "action=$action" ) ) ) ! ); if ( !$linkdb_config['split_links'] ) *************** *** 558,568 **** for ( $i = 0; $i < count( $file_rowset ); $i++ ) { ! // Format the date for the given file ! $date = create_date( $board_config['default_dateformat'], $file_rowset[$i]['link_time'], $board_config['board_timezone'] ); // 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) < $file_rowset[$i]['link_time']) --- 570,581 ---- for ( $i = 0; $i < count( $file_rowset ); $i++ ) { ! // // Format the date for the given file ! // $date = create_date( $board_config['default_dateformat'], $file_rowset[$i]['link_time'], $board_config['board_timezone'] ); + // // 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) < $file_rowset[$i]['link_time']) *************** *** 581,604 **** // Assign Vars ! $template->assign_block_vars( "FILELIST.file_rows", array( 'COLOR' => ( $linkdb_config['split_links'] ) ? "row1" : ( ( $i % 2 ) ? "row2" : "row1" ), ! 'L_NEW_FILE' => $lang['New_file'], ! 'PIN_IMAGE' => $this->display_banner( $file_rowset[$i], $row ), ! 'FILE_NEW_IMAGE' => $images['linkdb_link_new'], ! 'FILE_NAME' => $file_rowset[$i]['link_name'], ! 'FILE_DESC' => $file_rowset[$i]['link_longdesc'], ! 'DATE' => $date, ! 'POSTER' => $file_poster, ! 'FILE_DLS' => $file_rowset[$i]['link_hits'], ! 'FILE_VOTES' => $file_rowset[$i]['total_votes'], ! 'L_RATING' => '<a href="' . append_sid( linkdb_this_mxurl( 'action=rate&link_id=' . $file_rowset[$i]['link_id'] ) ) . '">' . $lang['LinkRating'] . '</a>', ! 'RATING' => $file_rating, ! 'CAT_NAME' => $cat_name, ! 'IS_NEW_FILE' => $is_new, - 'U_CAT' => $cat_url, - 'U_FILE' => append_sid( linkdb_this_mxurl( 'action=link&link_id=' . $file_rowset[$i]['link_id'] ) ) ) - ); if ( $linkdb_config['allow_vote'] ) { --- 594,619 ---- // Assign Vars ! $template->assign_block_vars( "FILELIST.file_rows", array( ! 'COLOR' => ( $linkdb_config['split_links'] ) ? "row1" : ( ( $i % 2 ) ? "row2" : "row1" ), ! 'L_NEW_FILE' => $lang['New_file'], ! 'PIN_IMAGE' => $this->display_banner( $file_rowset[$i], $row ), ! 'FILE_NEW_IMAGE' => $images['linkdb_link_new'], ! 'FILE_NAME' => $file_rowset[$i]['link_name'], ! 'FILE_DESC' => $file_rowset[$i]['link_longdesc'], ! 'DATE' => $date, ! 'POSTER' => $file_poster, ! 'FILE_DLS' => $file_rowset[$i]['link_hits'], ! 'FILE_VOTES' => $file_rowset[$i]['total_votes'], ! 'L_RATING' => '<a href="' . append_sid( linkdb_this_mxurl( 'action=rate&link_id=' . $file_rowset[$i]['link_id'] ) ) . '">' . $lang['LinkRating'] . '</a>', ! 'RATING' => $file_rating, ! 'CAT_NAME' => $cat_name, ! 'IS_NEW_FILE' => $is_new, ! ! 'U_CAT' => $cat_url, ! 'U_FILE' => append_sid( linkdb_this_mxurl( 'action=link&link_id=' . $file_rowset[$i]['link_id'] ) ) ) ! ); if ( $linkdb_config['allow_vote'] ) { *************** *** 614,621 **** { $template->assign_block_vars( 'NO_FILE', array() ); ! $template->assign_vars( array( 'NO_FILE' => $show_file_message, ! 'L_NO_FILES' => $lang['No_links'], ! 'L_NO_FILES_CAT' => $lang['No_links_cat'] ) ! ); } } --- 629,637 ---- { $template->assign_block_vars( 'NO_FILE', array() ); ! $template->assign_vars( array( ! 'NO_FILE' => $show_file_message, ! 'L_NO_FILES' => $lang['No_links'], ! 'L_NO_FILES_CAT' => $lang['No_links_cat'] ) ! ); } } *************** *** 1117,1120 **** } } - ?> \ No newline at end of file --- 1133,1135 ---- Index: linkdb_constants.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/includes/linkdb_constants.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** linkdb_constants.php 17 Jun 2006 20:12:00 -0000 1.7 --- linkdb_constants.php 30 Jun 2006 19:54:14 -0000 1.8 *************** *** 16,20 **** --- 16,22 ---- define( 'LINKDB_ROOT_CAT', 0 ); + // // Field Types + // define( 'INPUT', 0 ); define( 'TEXTAREA', 1 ); *************** *** 24,28 **** define( 'CHECKBOX', 5 ); ! // tables define( 'LINKS_TABLE', $mx_table_prefix . 'linkdb' ); define( 'LINK_CATEGORIES_TABLE', $mx_table_prefix . 'linkdb_categories' ); --- 26,32 ---- define( 'CHECKBOX', 5 ); ! // ! // Tables ! // define( 'LINKS_TABLE', $mx_table_prefix . 'linkdb' ); define( 'LINK_CATEGORIES_TABLE', $mx_table_prefix . 'linkdb_categories' ); Index: functions_linkdb_field.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/includes/functions_linkdb_field.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** functions_linkdb_field.php 17 Jun 2006 20:12:00 -0000 1.5 --- functions_linkdb_field.php 30 Jun 2006 19:54:14 -0000 1.6 *************** *** 19,24 **** var $field_data_rowset = array(); // prepare data ! function init() { --- 19,25 ---- var $field_data_rowset = array(); + // // prepare data ! // function init() { *************** *** 59,64 **** } // check if there is a data in the database ! function field_data_exist() { --- 60,66 ---- } + // // check if there is a data in the database ! // function field_data_exist() { *************** *** 79,84 **** } // display data in the file page ! function display_data( $file_id ) { --- 81,87 ---- } + // // display data in the file page ! // function display_data( $file_id ) { *************** *** 106,112 **** } ! $template->assign_block_vars( 'custom_field', array( 'CUSTOM_NAME' => $this->field_rowset[$field_id]['custom_name'], ! 'DATA' => $field_data ) ! ); } else --- 109,116 ---- } ! $template->assign_block_vars( 'custom_field', array( ! 'CUSTOM_NAME' => $this->field_rowset[$field_id]['custom_name'], ! 'DATA' => $field_data ) ! ); } else *************** *** 176,184 **** { global $template; ! $template->assign_block_vars( 'input', array( 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'], ! 'FIELD_VALUE' => ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : '' ) ! ); } --- 180,189 ---- { global $template; ! $template->assign_block_vars( 'input', array( ! 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'], ! 'FIELD_VALUE' => ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : '' ) ! ); } *************** *** 186,194 **** { global $template; ! $template->assign_block_vars( 'textarea', array( 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'], ! 'FIELD_VALUE' => ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : '' ) ! ); } --- 191,200 ---- { global $template; ! $template->assign_block_vars( 'textarea', array( ! 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'], ! 'FIELD_VALUE' => ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : '' ) ! ); } *************** *** 196,203 **** { global $template; ! $template->assign_block_vars( 'radio', array( 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ! ); $data = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : array(); --- 202,210 ---- { global $template; ! $template->assign_block_vars( 'radio', array( ! 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ! ); $data = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : array(); *************** *** 208,214 **** foreach( $field_datas as $key => $value ) { ! $template->assign_block_vars( 'radio.row', array( 'FIELD_VALUE' => $value, ! 'FIELD_SELECTED' => ( $data == $value ) ? ' checked="checked"' : '' ) ! ); } } --- 215,222 ---- foreach( $field_datas as $key => $value ) { ! $template->assign_block_vars( 'radio.row', array( ! 'FIELD_VALUE' => $value, ! 'FIELD_SELECTED' => ( $data == $value ) ? ' checked="checked"' : '' ) ! ); } } *************** *** 218,225 **** { global $template; ! $template->assign_block_vars( 'select', array( 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ! ); $data = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : ''; --- 226,234 ---- { global $template; ! $template->assign_block_vars( 'select', array( ! 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ! ); $data = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : ''; *************** *** 230,236 **** foreach( $field_datas as $key => $value ) { ! $template->assign_block_vars( 'select.row', array( 'FIELD_VALUE' => $value, ! 'FIELD_SELECTED' => ( $data == $value ) ? ' selected="selected"' : '' ) ! ); } } --- 239,246 ---- foreach( $field_datas as $key => $value ) { ! $template->assign_block_vars( 'select.row', array( ! 'FIELD_VALUE' => $value, ! 'FIELD_SELECTED' => ( $data == $value ) ? ' selected="selected"' : '' ) ! ); } } *************** *** 240,247 **** { global $template; ! $template->assign_block_vars( 'select_multiple', array( 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ! ); $data = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? unserialize( $this->field_data_rowset[$file_id][$field_id]['data'] ) : array(); --- 250,258 ---- { global $template; ! $template->assign_block_vars( 'select_multiple', array( ! 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ! ); $data = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? unserialize( $this->field_data_rowset[$file_id][$field_id]['data'] ) : array(); *************** *** 261,267 **** } } ! $template->assign_block_vars( 'select_multiple.row', array( 'FIELD_VALUE' => $value, ! 'FIELD_SELECTED' => $selected ) ! ); } } --- 272,279 ---- } } ! $template->assign_block_vars( 'select_multiple.row', array( ! 'FIELD_VALUE' => $value, ! 'FIELD_SELECTED' => $selected ) ! ); } } *************** *** 271,278 **** { global $template; ! $template->assign_block_vars( 'checkbox', array( 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ! ); $data = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? unserialize( $this->field_data_rowset[$file_id][$field_id]['data'] ) : array(); --- 283,291 ---- { global $template; ! $template->assign_block_vars( 'checkbox', array( ! 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ! ); $data = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? unserialize( $this->field_data_rowset[$file_id][$field_id]['data'] ) : array(); *************** *** 292,298 **** } } ! $template->assign_block_vars( 'checkbox.row', array( 'FIELD_VALUE' => $value, ! 'FIELD_CHECKED' => $checked ) ! ); } } --- 305,312 ---- } } ! $template->assign_block_vars( 'checkbox.row', array( ! 'FIELD_VALUE' => $value, ! 'FIELD_CHECKED' => $checked ) ! ); } } *************** *** 452,455 **** } } - ?> \ No newline at end of file --- 466,468 ---- |
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 ---- |
|
From: Jon O. <jon...@us...> - 2006-06-30 19:54:21
|
Update of /cvsroot/mxbb/mx_linkdb/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv9382/modules/mx_linkdb/admin Modified Files: admin_linkdb.php Log Message: Ok, i'm starting with some code cleanup, before digging deep... Index: admin_linkdb.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/admin/admin_linkdb.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** admin_linkdb.php 2 May 2006 23:27:29 -0000 1.4 --- admin_linkdb.php 30 Jun 2006 19:54:14 -0000 1.5 *************** *** 20,33 **** } - // Load default header - - /* - $phpbb_root_path = "./../"; - require($phpbb_root_path . 'extension.inc'); - require('./pagestart.' . $phpEx); - - include($phpbb_root_path . 'linkdb/includes/linkdb_common.'.$phpEx); - */ - $mx_root_path = '../../../'; $module_root_path = "../"; --- 20,23 ---- *************** *** 37,52 **** include( $module_root_path . 'linkdb/includes/linkdb_common.' . $phpEx ); ! // Get action variable other wise set it to the main $action = ( isset( $_REQUEST['action'] ) ) ? htmlspecialchars( $_REQUEST['action'] ) : 'setting'; // an array of all expected actions ! $actions = array( 'setting' => 'setting', 'cat_manage' => 'cat_manage', 'link_manage' => 'link_manage' ); // Lets Build the page ! $linkdb->adminmodule( $actions[$action] ); $linkdb->modules[$actions[$action]]->main( $action ); --- 27,59 ---- include( $module_root_path . 'linkdb/includes/linkdb_common.' . $phpEx ); ! // ********************************************************************** ! // Read language definition ! // ********************************************************************** ! if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) ! { ! include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); ! include( $module_root_path . 'language/lang_english/lang_main.' . $phpEx ); // Notification ! } ! else ! { ! include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); ! include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ); // Notification ! } + // + // Get action variable other wise set it to the main + // $action = ( isset( $_REQUEST['action'] ) ) ? htmlspecialchars( $_REQUEST['action'] ) : 'setting'; + // // an array of all expected actions ! // $actions = array( 'setting' => 'setting', 'cat_manage' => 'cat_manage', 'link_manage' => 'link_manage' ); + // // Lets Build the page ! // $linkdb->adminmodule( $actions[$action] ); $linkdb->modules[$actions[$action]]->main( $action ); |
|
From: Jon O. <jon...@us...> - 2006-06-30 19:54:20
|
Update of /cvsroot/mxbb/mx_linkdb In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv9382/modules/mx_linkdb Modified Files: db_install.php db_upgrade.php linkdb.php Log Message: Ok, i'm starting with some code cleanup, before digging deep... Index: db_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/db_install.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** db_install.php 2 May 2006 23:27:29 -0000 1.8 --- db_install.php 30 Jun 2006 19:54:14 -0000 1.9 *************** *** 30,34 **** } ! $mx_module_version = '1.0.0'; $mx_module_copy = 'Original phpBB <i>LinkDb</i> MOD by <a href="http://www.phpbb.com/phpBB/viewtopic.php?p=1183059" target="_blank">CRLin</a>, <a href="http://www.hostsector.com/~mohd/" target="_blank">pafileDB</a> & <a href="http://www.phpbb.com/phpBB/viewtopic.php?t=110836" target="_blank">Advanced Links Mod</a> :: Adapted for mxBB by <a href="http://www.mxbb-portal.com" target="_blank">Jon</a>'; --- 30,34 ---- } ! $mx_module_version = '2.8.0'; $mx_module_copy = 'Original phpBB <i>LinkDb</i> MOD by <a href="http://www.phpbb.com/phpBB/viewtopic.php?p=1183059" target="_blank">CRLin</a>, <a href="http://www.hostsector.com/~mohd/" target="_blank">pafileDB</a> & <a href="http://www.phpbb.com/phpBB/viewtopic.php?t=110836" target="_blank">Advanced Links Mod</a> :: Adapted for mxBB by <a href="http://www.mxbb-portal.com" target="_blank">Jon</a>'; Index: linkdb.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** linkdb.php 17 Jun 2006 20:48:33 -0000 1.8 --- linkdb.php 30 Jun 2006 19:54:14 -0000 1.9 *************** *** 16,25 **** include_once( $mx_root_path . 'common.' . $phpEx ); // Start session management ! $mx_user->init($user_ip, PAGE_INDEX); - // End session management - $block_id = ( !empty( $HTTP_GET_VARS['block_id'] ) ) ? $HTTP_GET_VARS['block_id'] : $HTTP_POST_VARS['id']; if ( empty( $block_id ) ) --- 16,24 ---- include_once( $mx_root_path . 'common.' . $phpEx ); + // // Start session management ! // $mx_user->init($user_ip, PAGE_INDEX); $block_id = ( !empty( $HTTP_GET_VARS['block_id'] ) ) ? $HTTP_GET_VARS['block_id'] : $HTTP_POST_VARS['id']; if ( empty( $block_id ) ) *************** *** 41,44 **** --- 40,44 ---- die("Hacking attempt"); } + // // Read Block Settings *************** *** 52,83 **** } - /* - define('IN_PHPBB', true); - - $phpbb_root_path = './'; - include($phpbb_root_path . 'extension.inc'); - include($phpbb_root_path . 'common.'.$phpEx); - - // - // Start session management - // - $userdata = session_pagestart($user_ip, PAGE_LINKDB); - init_userprefs($userdata); // - // End session management - // - - */ - // Include the common file ! include( $module_root_path . 'linkdb/includes/linkdb_common.' . $phpEx ); // Get action variable other wise set it to the main ! $action = ( isset( $_REQUEST['action'] ) ) ? htmlspecialchars( $_REQUEST['action'] ) : 'main'; // an array of all expected actions ! $actions = array( 'category' => 'category', 'link' => 'link', --- 52,68 ---- } // // Include the common file ! // include( $module_root_path . 'linkdb/includes/linkdb_common.' . $phpEx ); + // // Get action variable other wise set it to the main ! // $action = ( isset( $_REQUEST['action'] ) ) ? htmlspecialchars( $_REQUEST['action'] ) : 'main'; + // // an array of all expected actions ! // $actions = array( 'category' => 'category', 'link' => 'link', *************** *** 88,93 **** 'main' => 'main' ); // Lets Build the page ! $linkdb->module( $actions[$action] ); $linkdb->modules[$actions[$action]]->main( $action ); --- 73,79 ---- 'main' => 'main' ); + // // Lets Build the page ! // $linkdb->module( $actions[$action] ); $linkdb->modules[$actions[$action]]->main( $action ); *************** *** 97,102 **** } // page header for linkdb ! if ( $action == 'category' ) { --- 83,89 ---- } + // // page header for linkdb ! // if ( $action == 'category' ) { *************** *** 113,165 **** } ! $template->set_filenames( array( 'pa_header' => "pa_header.tpl" ) ! ); ! $template->assign_vars( array( 'L_TITLE' => $title, ! // BEGIN linkdb ! 'LINKS' => $lang['Links_Title'], ! 'U_LINK' => append_sid( linkdb_this_mxurl() ), ! // END linkdb ! 'L_SEARCH' => $lang['Link_Search'], ! 'L_UPLOAD' => $lang['AddLink'], ! 'L_VIEW_ALL' => $lang['Viewall'], ! 'L_DESCEND_BY_HITS' => $lang['Descend_by_hits'], ! 'L_DESCEND_BY_JOIN' => $lang['Descend_by_joindate'], ! 'L_STATS_MOST_POPULAR' => $lang['Link_most_popular'], ! 'L_STATS_LATEST' => $lang['Link_latest'], ! 'L_STATS_TOPRATED' => $lang['Link_toprated'], ! 'U_PASEARCH' => append_sid( linkdb_this_mxurl( "action=search" ) ), ! 'U_UPLOAD' => $upload_url, ! 'U_VIEW_ALL' => append_sid( linkdb_this_mxurl( "action=viewall" ) ), ! 'U_DESCEND_BY_HITS' => append_sid( linkdb_this_mxurl( "action=viewall&&sort_method=link_hits&sort_order=DESC" ) ), ! 'U_DESCEND_BY_JOIN' => append_sid( linkdb_this_mxurl( "action=viewall&sort_method=link_time&sort_order=DESC" ) ), ! 'U_DESCEND_BY_RATINGS' => append_sid( linkdb_this_mxurl( "action=viewall&sort_method=rating&sort_order=DESC" ) ), ! 'L_JUMP' => $lang['Jump'], ! 'JUMPMENU' => $linkdb->modules[$linkdb->module_name]->jumpmenu_option(), ! 'S_JUMPBOX_ACTION' => append_sid( "index." . $phpEx ), ! 'U_PORTAL_PAGE' => $page_id ! ) ! ); $template->pparse( 'pa_header' ); // page body for linkdb ! ! $template->set_filenames( array( 'body' => $linkdb_tpl_name ) ! ); $template->pparse( 'body' ); // page footer for linkdb ! $template->set_filenames( array( 'pa_footer' => "pa_footer.tpl" ) ! ); - $template->assign_vars( array( 'S_TIMEZONE' => sprintf( $lang['All_times'], $lang[number_format( $board_config['board_timezone'] )] ), - 'LINKDB_VERSION' => $linkdb_config['linkdb_versions'] - ) ); $linkdb->modules[$linkdb->module_name]->_linkdb(); --- 100,153 ---- } ! $template->set_filenames( array( 'pa_header' => "pa_header.tpl" )); ! $template->assign_vars( array( ! 'L_TITLE' => $title, ! // BEGIN linkdb ! 'LINKS' => $lang['Links_Title'], ! 'U_LINK' => append_sid( linkdb_this_mxurl() ), ! // END linkdb ! 'L_SEARCH' => $lang['Link_Search'], ! 'L_UPLOAD' => $lang['AddLink'], ! 'L_VIEW_ALL' => $lang['Viewall'], ! 'L_DESCEND_BY_HITS' => $lang['Descend_by_hits'], ! 'L_DESCEND_BY_JOIN' => $lang['Descend_by_joindate'], ! 'L_STATS_MOST_POPULAR' => $lang['Link_most_popular'], ! 'L_STATS_LATEST' => $lang['Link_latest'], ! 'L_STATS_TOPRATED' => $lang['Link_toprated'], ! 'U_PASEARCH' => append_sid( linkdb_this_mxurl( "action=search" ) ), ! 'U_UPLOAD' => $upload_url, ! 'U_VIEW_ALL' => append_sid( linkdb_this_mxurl( "action=viewall" ) ), ! 'U_DESCEND_BY_HITS' => append_sid( linkdb_this_mxurl( "action=viewall&&sort_method=link_hits&sort_order=DESC" ) ), ! 'U_DESCEND_BY_JOIN' => append_sid( linkdb_this_mxurl( "action=viewall&sort_method=link_time&sort_order=DESC" ) ), ! 'U_DESCEND_BY_RATINGS' => append_sid( linkdb_this_mxurl( "action=viewall&sort_method=rating&sort_order=DESC" ) ), ! 'L_JUMP' => $lang['Jump'], ! 'JUMPMENU' => $linkdb->modules[$linkdb->module_name]->jumpmenu_option(), ! 'S_JUMPBOX_ACTION' => append_sid( "index." . $phpEx ), ! 'U_PORTAL_PAGE' => $page_id ! )); $template->pparse( 'pa_header' ); + // // page body for linkdb ! // ! $template->set_filenames( array( 'body' => $linkdb_tpl_name ) ); $template->pparse( 'body' ); + // // page footer for linkdb + // + $template->set_filenames( array( 'pa_footer' => "pa_footer.tpl" ) ); ! $template->assign_vars( array( ! 'S_TIMEZONE' => sprintf( $lang['All_times'], $lang[number_format( $board_config['board_timezone'] )] ), ! 'LINKDB_VERSION' => $linkdb_config['linkdb_versions'] ! ) ); $linkdb->modules[$linkdb->module_name]->_linkdb(); *************** *** 170,173 **** include( $mx_root_path . 'includes/page_tail.' . $phpEx ); } - ?> \ No newline at end of file --- 158,160 ---- Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/db_upgrade.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** db_upgrade.php 2 May 2006 23:27:29 -0000 1.10 --- db_upgrade.php 30 Jun 2006 19:54:14 -0000 1.11 *************** *** 30,34 **** } ! $mx_module_version = '1.0.0'; $mx_module_copy = 'Original phpBB <i>LinkDb</i> MOD by <a href="http://www.phpbb.com/phpBB/viewtopic.php?p=1183059" target="_blank">CRLin</a>, <a href="http://www.hostsector.com/~mohd/" target="_blank">pafileDB</a> & <a href="http://www.phpbb.com/phpBB/viewtopic.php?t=110836" target="_blank">Advanced Links Mod</a> :: Adapted for mxBB by <a href="http://www.mxbb-portal.com" target="_blank">Jon</a>'; --- 30,34 ---- } ! $mx_module_version = '2.8.0'; $mx_module_copy = 'Original phpBB <i>LinkDb</i> MOD by <a href="http://www.phpbb.com/phpBB/viewtopic.php?p=1183059" target="_blank">CRLin</a>, <a href="http://www.hostsector.com/~mohd/" target="_blank">pafileDB</a> & <a href="http://www.phpbb.com/phpBB/viewtopic.php?t=110836" target="_blank">Advanced Links Mod</a> :: Adapted for mxBB by <a href="http://www.mxbb-portal.com" target="_blank">Jon</a>'; |
|
From: Jon O. <jon...@us...> - 2006-06-30 19:54:19
|
Update of /cvsroot/mxbb/mx_linkdb/language/lang_english In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv9382/modules/mx_linkdb/language/lang_english Modified Files: lang_admin.php lang_main.php Log Message: Ok, i'm starting with some code cleanup, before digging deep... Index: lang_main.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/language/lang_english/lang_main.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** lang_main.php 5 Apr 2006 22:35:24 -0000 1.2 --- lang_main.php 30 Jun 2006 19:54:14 -0000 1.3 *************** *** 8,13 **** * */ ! // Main $lang['Viewall'] = 'View All Links'; $lang['Descend_by_hits'] = 'Search By Hits - Descending'; --- 8,15 ---- * */ ! ! // // Main + // $lang['Viewall'] = 'View All Links'; $lang['Descend_by_hits'] = 'Search By Hits - Descending'; *************** *** 16,24 **** $lang['Sub_category'] = 'Sub Category'; $lang['Lock_submit_site'] = 'Submit site was locked'; ! $lang['Link_us'] = 'Link to us'; $lang['Link_us_explain'] = 'Please feel free to link to <b>%s</b>. Use the following HTML (You can copy and paste to your page):'; $lang['Link_us_syntax'] = '<a href="%s" target="_blank"><img src="%s" width="%d" height="%d" border="0" alt="%s" /></a>'; ! // Sort $lang['Sort'] = 'Sort'; --- 18,28 ---- $lang['Sub_category'] = 'Sub Category'; $lang['Lock_submit_site'] = 'Submit site was locked'; ! $lang['Link_us'] = 'Link to us'; $lang['Link_us_explain'] = 'Please feel free to link to <b>%s</b>. Use the following HTML (You can copy and paste to your page):'; $lang['Link_us_syntax'] = '<a href="%s" target="_blank"><img src="%s" width="%d" height="%d" border="0" alt="%s" /></a>'; ! // ! // Sort ! // $lang['Sort'] = 'Sort'; *************** *** 29,33 **** --- 33,39 ---- $lang['Link_not_exist'] = 'The link you selected does not exist.'; + // // Link + // $lang['Link'] = 'Links'; $lang['Date'] = 'Date'; *************** *** 36,46 **** $lang['No_Display_Links_Logo'] = '<font color=brown>•</font>'; // You can edit color // User Upload $lang['Link_guest_reg'] = 'Please fill in the form below or log in'; $lang['Guest_name'] = 'Guest Name'; ! $lang['Link_pm_notify_subject'] = 'Link added'; ! $lang['Link_pm_notify_message'] = '\n Link %s added,\n please go to Links Management and validate it.'; // Search $lang['Link_Search'] = 'Search Site'; $lang['All'] = 'All Categories'; --- 42,56 ---- $lang['No_Display_Links_Logo'] = '<font color=brown>•</font>'; // You can edit color + // // User Upload + // $lang['Link_guest_reg'] = 'Please fill in the form below or log in'; $lang['Guest_name'] = 'Guest Name'; ! $lang['Link_pm_notify_subject'] = 'Link added'; ! $lang['Link_pm_notify_message'] = '\n Link %s added,\n please go to Links Management and validate it.'; + // // Search + // $lang['Link_Search'] = 'Search Site'; $lang['All'] = 'All Categories'; *************** *** 49,53 **** --- 59,65 ---- $lang['LinkRating'] = 'Rating'; + // // Rate + // $lang['Not_allow_vote'] = 'Can\'t vote'; $lang['Rate'] = 'Rate Link'; *************** *** 67,71 **** --- 79,85 ---- $lang['Not_rated'] = 'Not Rated'; + // // Java script messages and php errors + // $lang['Cat_not_allow'] = 'You can\'t add link to category that does not allow links on it'; $lang['Link_guset_field'] = 'Please fill the Guest Name field'; *************** *** 74,87 **** --- 88,106 ---- $lang['Link_logo_field'] = 'Please fill the Site Logo field'; $lang['Link_long_des_field'] = 'Please fill the Site Descritpion field'; + // BEGIN linkdb $lang['Links_Title'] = 'Links'; // END linkdb + // // Stats + // $lang['Link_most_popular'] = 'Most popular'; $lang['Link_latest'] = 'Latest links'; $lang['Link_toprated'] = 'Toprated'; + // // Link + // $lang['AddLink'] = 'Add Link'; $lang['Elinktitle'] = 'Edit Link'; *************** *** 106,110 **** $lang['Approved_info'] = 'Use this option to make the link available for users, and also to approve a link that has been submitted by the users.'; $lang['Link_hits'] = 'Hits'; - - ?> \ No newline at end of file --- 125,127 ---- Index: lang_admin.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/language/lang_english/lang_admin.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** lang_admin.php 5 Apr 2006 22:35:24 -0000 1.2 --- lang_admin.php 30 Jun 2006 19:54:14 -0000 1.3 *************** *** 8,13 **** * */ ! // Categories $lang['All_links'] = 'All Links'; $lang['Approved_links'] = 'Approved Links'; --- 8,15 ---- * */ ! ! // // Categories + // $lang['All_links'] = 'All Links'; $lang['Approved_links'] = 'Approved Links'; *************** *** 21,27 **** $lang['Delete_selected'] = 'Delete Selected'; $lang['No_link'] = 'There is no links'; ! $lang['Acattitle'] = 'Add Category'; $lang['Ecattitle'] = 'Edit Category'; ! $lang['Dcattitle'] = 'Delete Category'; $lang['Catexplain'] = 'You can use the Category Management section to add, edit, delete and reorder categories. In order to add links to your database, you must have at least one category created. You can select a link below to manage your categories.'; $lang['Catadded'] = 'The new category has been successfully added'; --- 23,29 ---- $lang['Delete_selected'] = 'Delete Selected'; $lang['No_link'] = 'There is no links'; ! $lang['Acattitle'] = 'Add Category'; $lang['Ecattitle'] = 'Edit Category'; ! $lang['Dcattitle'] = 'Delete Category'; $lang['Catexplain'] = 'You can use the Category Management section to add, edit, delete and reorder categories. In order to add links to your database, you must have at least one category created. You can select a link below to manage your categories.'; $lang['Catadded'] = 'The new category has been successfully added'; *************** *** 38,42 **** --- 40,46 ---- $lang['Cdelerror'] = 'You didn\'t select any categories to delete'; + // //Catgories Permission + // $lang['Select_a_Category'] = 'Select a Category'; $lang['Click_return'] = 'Click %sHere%s to return to the previous page'; *************** *** 44,50 **** $lang['Category'] = 'Category'; // Configuration $lang['Settingstitle'] ='Link Config Control'; ! $lang['Settingsexplain'] = 'You can change the general settings of your link here'; $lang['lock_submit_site'] = 'Lock user submit site'; $lang['cat_col'] = 'How many column of categories are to be listed'; --- 48,56 ---- $lang['Category'] = 'Category'; + // // Configuration + // $lang['Settingstitle'] ='Link Config Control'; ! $lang['Settingsexplain'] = 'You can change the general settings of your link here'; $lang['lock_submit_site'] = 'Lock user submit site'; $lang['cat_col'] = 'How many column of categories are to be listed'; *************** *** 68,72 **** --- 74,80 ---- $lang['Click_return_link_config'] = 'Click %sHere%s to return to the Link Config Manager'; + // //Java script messages and php errors + // $lang['Cat_name_missing'] = 'Please fill the category name field'; $lang['Missing_field'] = 'Please complete all the required fields'; |
|
From: Jon O. <jon...@us...> - 2006-06-30 12:44:32
|
Update of /cvsroot/mxbb/mx_who_am_i In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv29613/modules/mx_who_am_i Modified Files: mx_who_am_i.pak Log Message: updated pak file Index: mx_who_am_i.pak =================================================================== RCS file: /cvsroot/mxbb/mx_who_am_i/mx_who_am_i.pak,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** mx_who_am_i.pak 17 Dec 2005 14:44:19 -0000 1.3 --- mx_who_am_i.pak 30 Jun 2006 12:44:26 -0000 1.4 *************** *** 1,6 **** ! module=+:60=+:Who Am I=+:modules/mx_who_am_i/=+:mx_who_am_i version 1.0=+:0 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:60=+:105=+:Who Am I=+:Who Am I=+:mx_who_am_i.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Who Am I=+:Demo block=+:105=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 function=+:0=+:0=+:0=+:endoflist=+:0=+:0 --- 1,6 ---- ! module=+:61=+:Who Am I=+:modules/mx_who_am_i/=+:mx_who_am_i version 1.0=+:0 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:61=+:88=+:Who Am I=+:Who Am I=+:mx_who_am_i.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Who Am I=+:Demo block=+:88=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 function=+:0=+:0=+:0=+:endoflist=+:0=+:0 |
|
From: Jon O. <jon...@us...> - 2006-06-30 12:42:48
|
Update of /cvsroot/mxbb/mx_sitestats/templates/subSilver In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv28746/modules/mx_sitestats/templates/subSilver Added Files: subSilver.cfg Log Message: fix for images --- NEW FILE: subSilver.cfg --- <?php /** * * @package mxBB Portal Module - mx_phpbb2blocks * @version $Id: subSilver.cfg,v 1.1 2006/06/30 12:42:44 jonohlsson Exp $ * @copyright (c) 2002-2006 mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ // // ** Configuration file for subSilver template ** // // ** copyright (C) 2001 The phpBB Group ** // ** Created by subBlue design ** // ** www.subBlue.com ** // // ** subSilver dev. forum: www.subSky.com/phpBB2/ ** // // $Id: subSilver.cfg,v 1.1 2006/06/30 12:42:44 jonohlsson Exp $ // // Please note that to enable support of different languages // the {LANG} place holder is available. This will be replaced // with xxx where xxx is the users selected language. If // that language isn't available it will default to english. // Therefore you MUST ensure you have at least a english // directory if you choose to localise your template // // // Do not alter this line! // define(MX_TEMPLATE_CONFIG, TRUE); $mx_template_config = true; // ------------------------------------------------------------------------- // Prefix with PORTAL_URL // ------------------------------------------------------------------------- $current_template_images = PORTAL_URL . $current_template_path . "/images"; // ------------------------------------------------------------------------- // (Re)Define images // ------------------------------------------------------------------------- // // Poll/Statistics Block // $mx_images['mx_voting_graphic'] = $images['voting_graphic']; // Array() $mx_images['mx_vote_bar'] = PHPBB_URL . $images['mx_graphics']['phpbb_icons'] . "/voting_bar.gif"; $mx_images['mx_vote_lcap'] = PHPBB_URL . $images['mx_graphics']['phpbb_icons'] . "/vote_lcap.gif"; $mx_images['mx_vote_rcap'] = PHPBB_URL . $images['mx_graphics']['phpbb_icons'] . "/vote_rcap.gif"; ?> |
|
From: Jon O. <jon...@us...> - 2006-06-30 12:42:47
|
Update of /cvsroot/mxbb/mx_sitestats/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv28746/modules/mx_sitestats/includes Modified Files: common.php Log Message: fix for images Index: common.php =================================================================== RCS file: /cvsroot/mxbb/mx_sitestats/includes/common.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** common.php 29 Jun 2006 19:08:04 -0000 1.7 --- common.php 30 Jun 2006 12:42:41 -0000 1.8 *************** *** 43,67 **** define( 'SITESTATS_REFERER_TABLE', $mx_table_prefix . 'sitestats_referer' ); - // - // Load language files. - // - if ( file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) - { - include_once( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); - } - else - { - include_once( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); - } - - if ( file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ) ) - { - include_once( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ); - } - else - { - include_once( $module_root_path . 'language/lang_english/lang_main.' . $phpEx ); - } - // ================================================================================ // [ SITESTATS CONFIG ] --- 43,46 ---- *************** *** 112,115 **** --- 91,110 ---- $sitestats_config['referers_show_disabled'] = ( $sitestats_config['referers_show_disabled'] == 1 ) ? true : false; } + + // ------------------------------------------------------------------------- + // Footer Copyrights + // ------------------------------------------------------------------------- + if (is_object($mx_page)) + { + // ------------------------------------------------------------------------- + // Extend User Style with module lang and images + // Usage: $mx_user->extend(LANG, IMAGES) + // Switches: + // - LANG: MX_LANG_MAIN (default), MX_LANG_ADMIN, MX_LANG_ALL, MX_LANG_NONE + // - IMAGES: MX_IMAGES (default), MX_IMAGES_NONE + // ------------------------------------------------------------------------- + $mx_user->extend(MX_LANG_ALL, MX_IMAGES); + } + // ================================================================================ // [ COMMON CLASSES ] *************** *** 406,413 **** $vote_bar = $images['mx_vote_bar']; ! $template->assign_vars( array( 'LEFT_GRAPH_IMAGE' => $vote_left, ! 'RIGHT_GRAPH_IMAGE' => $vote_right, ! 'GRAPH_IMAGE' => $vote_bar ) ! ); } } //class sitestats_phpbb --- 401,409 ---- $vote_bar = $images['mx_vote_bar']; ! $template->assign_vars( array( ! 'LEFT_GRAPH_IMAGE' => $vote_left, ! 'RIGHT_GRAPH_IMAGE' => $vote_right, ! 'GRAPH_IMAGE' => $vote_bar ) ! ); } } //class sitestats_phpbb |
|
From: Jon O. <jon...@us...> - 2006-06-30 12:30:06
|
Update of /cvsroot/mxbb/mx_sitestats In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv23590/modules/mx_sitestats Modified Files: SiteStats.pak db_install.php db_upgrade.php Log Message: updated pak file updated module version Index: SiteStats.pak =================================================================== RCS file: /cvsroot/mxbb/mx_sitestats/SiteStats.pak,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SiteStats.pak 15 Oct 2005 22:18:27 -0000 1.1 --- SiteStats.pak 30 Jun 2006 12:30:01 -0000 1.2 *************** *** 1,70 **** ! module=+:48=+:SiteStats=+:modules/mx_sitestats/=+:Site Statistics module v1.3.1=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:48=+:62=+:SiteStats Administrative=+:=+:adminstats.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - SiteStats Administrative=+:Demo block=+:62=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:48=+:60=+:Counter=+:=+:counter.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Counter=+:Demo block=+:60=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:48=+:68=+:SiteStats FastestUsers=+:=+:fastestusers.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - SiteStats FastestUsers=+:Demo block=+:68=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:48=+:63=+:SiteStats MonthlyPosts=+:=+:monthlyposts.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - SiteStats MonthlyPosts=+:Demo block=+:63=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:48=+:64=+:SiteStats MonthlyTopics=+:=+:monthlytopics.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - SiteStats MonthlyTopics=+:Demo block=+:64=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:48=+:65=+:SiteStats MonthlyUsers=+:=+:monthlyusers.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - SiteStats MonthlyUsers=+:Demo block=+:65=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:48=+:70=+:SiteStats MostInTopics=+:=+:mostintopics.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - SiteStats MostInTopics=+:Demo block=+:70=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:48=+:75=+:SiteStats Staff=+:=+:sitestaff.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - SiteStats Staff=+:Demo block=+:75=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:48=+:72=+:SiteStats TopAvatars=+:=+:topavatars.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - SiteStats TopAvatars=+:Demo block=+:72=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:48=+:66=+:SiteStats TopPosters=+:=+:topposters.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - SiteStats TopPosters=+:Demo block=+:66=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:48=+:76=+:SiteStats TopPosters (Tiny)=+:=+:topposters_tiny.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - SiteStats TopPosters (Tiny)=+:Demo block=+:76=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:48=+:61=+:SiteStats TopReferers=+:=+:topreferers.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - SiteStats TopReferers=+:Demo block=+:61=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:48=+:71=+:SiteStats TopSmilies=+:=+:topsmilies.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - SiteStats TopSmilies=+:Demo block=+:71=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:48=+:67=+:SiteStats TopStarters=+:=+:topstarters.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - SiteStats TopStarters=+:Demo block=+:67=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:48=+:69=+:SiteStats TopTopics=+:=+:toptopics.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - SiteStats TopTopics=+:Demo block=+:69=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:48=+:73=+:SiteStats TopWords=+:=+:topwords.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - SiteStats TopWords=+:Demo block=+:73=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:48=+:74=+:SiteStats UsersRanks=+:=+:usersranks.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - SiteStats UsersRanks=+:Demo block=+:74=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 function=+:0=+:0=+:0=+:endoflist=+:0=+:0 --- 1,86 ---- ! module=+:60=+:SiteStats=+:modules/mx_sitestats/=+:Site Statistics module v1.3.1=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:60=+:71=+:SiteStats Administrative=+:=+:adminstats.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - SiteStats Administrative=+:Demo block=+:71=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! function=+:0=+:0=+:0=+:endoflist=+:0=+:0 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:60=+:72=+:Counter=+:=+:counter.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Counter=+:Demo block=+:72=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! function=+:0=+:0=+:0=+:endoflist=+:0=+:0 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:60=+:73=+:SiteStats FastestUsers=+:=+:fastestusers.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - SiteStats FastestUsers=+:Demo block=+:73=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! function=+:0=+:0=+:0=+:endoflist=+:0=+:0 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:60=+:74=+:SiteStats MonthlyPosts=+:=+:monthlyposts.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - SiteStats MonthlyPosts=+:Demo block=+:74=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! function=+:0=+:0=+:0=+:endoflist=+:0=+:0 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:60=+:75=+:SiteStats MonthlyTopics=+:=+:monthlytopics.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - SiteStats MonthlyTopics=+:Demo block=+:75=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! function=+:0=+:0=+:0=+:endoflist=+:0=+:0 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:60=+:76=+:SiteStats MonthlyUsers=+:=+:monthlyusers.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - SiteStats MonthlyUsers=+:Demo block=+:76=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! function=+:0=+:0=+:0=+:endoflist=+:0=+:0 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:60=+:77=+:SiteStats MostInTopics=+:=+:mostintopics.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - SiteStats MostInTopics=+:Demo block=+:77=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! function=+:0=+:0=+:0=+:endoflist=+:0=+:0 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:60=+:78=+:SiteStats Staff=+:=+:sitestaff.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - SiteStats Staff=+:Demo block=+:78=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! function=+:0=+:0=+:0=+:endoflist=+:0=+:0 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:60=+:79=+:SiteStats TopAvatars=+:=+:topavatars.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - SiteStats TopAvatars=+:Demo block=+:79=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! function=+:0=+:0=+:0=+:endoflist=+:0=+:0 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:60=+:80=+:SiteStats TopPosters=+:=+:topposters.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - SiteStats TopPosters=+:Demo block=+:80=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! function=+:0=+:0=+:0=+:endoflist=+:0=+:0 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:60=+:81=+:SiteStats TopPosters (Tiny)=+:=+:topposters_tiny.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - SiteStats TopPosters (Tiny)=+:Demo block=+:81=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! function=+:0=+:0=+:0=+:endoflist=+:0=+:0 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:60=+:82=+:SiteStats TopReferers=+:=+:topreferers.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - SiteStats TopReferers=+:Demo block=+:82=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! function=+:0=+:0=+:0=+:endoflist=+:0=+:0 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:60=+:83=+:SiteStats TopSmilies=+:=+:topsmilies.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - SiteStats TopSmilies=+:Demo block=+:83=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! function=+:0=+:0=+:0=+:endoflist=+:0=+:0 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:60=+:84=+:SiteStats TopStarters=+:=+:topstarters.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - SiteStats TopStarters=+:Demo block=+:84=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! function=+:0=+:0=+:0=+:endoflist=+:0=+:0 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:60=+:85=+:SiteStats TopTopics=+:=+:toptopics.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - SiteStats TopTopics=+:Demo block=+:85=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! function=+:0=+:0=+:0=+:endoflist=+:0=+:0 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:60=+:86=+:SiteStats TopWords=+:=+:topwords.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - SiteStats TopWords=+:Demo block=+:86=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! function=+:0=+:0=+:0=+:endoflist=+:0=+:0 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:60=+:87=+:SiteStats UsersRanks=+:=+:usersranks.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - SiteStats UsersRanks=+:Demo block=+:87=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 function=+:0=+:0=+:0=+:endoflist=+:0=+:0 Index: db_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_sitestats/db_install.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** db_install.php 29 Jun 2006 19:08:04 -0000 1.7 --- db_install.php 30 Jun 2006 12:30:01 -0000 1.8 *************** *** 30,34 **** } ! $mx_module_version = '2.0.0'; $mx_module_copy = 'Original mxBB <i>SiteStats</i> module by <a href="http://www.phpmix.com" target="_blank">Markus</a>'; --- 30,34 ---- } ! $mx_module_version = '2.8.0'; $mx_module_copy = 'Original mxBB <i>SiteStats</i> module by <a href="http://www.phpmix.com" target="_blank">Markus</a>'; Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/mx_sitestats/db_upgrade.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** db_upgrade.php 29 Jun 2006 19:08:04 -0000 1.5 --- db_upgrade.php 30 Jun 2006 12:30:01 -0000 1.6 *************** *** 33,37 **** // // ! $mx_module_version = '2.0.0'; $mx_module_copy = 'Original mxBB <i>SiteStats</i> module by <a href="http://www.phpmix.com" target="_blank">Markus</a>'; --- 33,37 ---- // // ! $mx_module_version = '2.8.0'; $mx_module_copy = 'Original mxBB <i>SiteStats</i> module by <a href="http://www.phpmix.com" target="_blank">Markus</a>'; |
|
From: Jon O. <jon...@us...> - 2006-06-30 12:29:40
|
Update of /cvsroot/mxbb/mx_simpledoc In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv23557/modules/mx_simpledoc Modified Files: SimpleDoc.pak db_install.php db_upgrade.php Log Message: updated pak file updated module version Index: SimpleDoc.pak =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/SimpleDoc.pak,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SimpleDoc.pak 23 Apr 2006 19:21:27 -0000 1.1 --- SimpleDoc.pak 30 Jun 2006 12:29:34 -0000 1.2 *************** *** 1,8 **** ! module=+:61=+:SimpleDoc=+:modules/mx_simpledoc/=+:A small docs management module=+: New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:61=+:106=+:manageDoc=+:Manage Docs=+:mx_simpledoc.php=+: ! parameter=+:106=+:349=+:project_folder=+:Text=+:=+:=+:0 ! parameter=+:106=+:348=+:project_name=+:Text=+:=+:=+:0 parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - manageDoc=+:Demo block=+:106=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 function=+:0=+:0=+:0=+:endoflist=+:0=+:0 --- 1,8 ---- ! module=+:59=+:SimpleDoc=+:modules/mx_simpledoc/=+:A small docs management module=+: New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:59=+:70=+:manageDoc=+:Manage Docs=+:mx_simpledoc.php=+: ! parameter=+:70=+:150=+:project_folder=+:Text=+:=+:=+:0 ! parameter=+:70=+:151=+:project_name=+:Text=+:=+:=+:0 parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - manageDoc=+:Demo block=+:70=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 function=+:0=+:0=+:0=+:endoflist=+:0=+:0 Index: db_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/db_install.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** db_install.php 2 May 2006 23:28:59 -0000 1.2 --- db_install.php 30 Jun 2006 12:29:34 -0000 1.3 *************** *** 31,35 **** } ! $mx_module_version = '1.0.0'; $mx_module_copy = 'Original <i> SimpleDoc</i> script by <a href="http://www.gosu.pl" target="_blank">Cezary Tomczak</a> :: Adapted for mxBB and developed further by <a href="http://www.mxbb-portal.com" target="_blank">Jon</a>'; --- 31,35 ---- } ! $mx_module_version = '2.8.0'; $mx_module_copy = 'Original <i> SimpleDoc</i> script by <a href="http://www.gosu.pl" target="_blank">Cezary Tomczak</a> :: Adapted for mxBB and developed further by <a href="http://www.mxbb-portal.com" target="_blank">Jon</a>'; Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/db_upgrade.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** db_upgrade.php 2 May 2006 23:28:59 -0000 1.2 --- db_upgrade.php 30 Jun 2006 12:29:34 -0000 1.3 *************** *** 31,35 **** } ! $mx_module_version = '1.0.0'; $mx_module_copy = 'Original <i> SimpleDoc</i> script by <a href="http://www.gosu.pl" target="_blank">Cezary Tomczak</a> :: Adapted for mxBB and developed further by <a href="http://www.mxbb-portal.com" target="_blank">Jon</a>'; --- 31,35 ---- } ! $mx_module_version = '2.8.0'; $mx_module_copy = 'Original <i> SimpleDoc</i> script by <a href="http://www.gosu.pl" target="_blank">Cezary Tomczak</a> :: Adapted for mxBB and developed further by <a href="http://www.mxbb-portal.com" target="_blank">Jon</a>'; |
|
From: Jon O. <jon...@us...> - 2006-06-30 12:24:42
|
Update of /cvsroot/mxbb/mx_simpledoc In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv21570/modules/mx_simpledoc Modified Files: mx_simpledoc.php Log Message: fixes for Edit Lock Index: mx_simpledoc.php =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/mx_simpledoc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mx_simpledoc.php 30 Jun 2006 11:17:23 -0000 1.2 --- mx_simpledoc.php 30 Jun 2006 12:24:38 -0000 1.3 *************** *** 41,45 **** // Page Auth and IP filter // ! if ( !( ( $mx_block->auth_view && ($mode == 'view' || $mode == 'view_plain') && $mx_block->show_block ) || $mx_block->auth_mod ) ) { echo('Not authorized - to view'); --- 41,45 ---- // Page Auth and IP filter // ! if ( !( ( $mx_block->auth_view && $mx_block->show_block ) || $mx_block->auth_mod || $mode == 'index' ) ) { echo('Not authorized - to view'); *************** *** 97,99 **** --- 97,105 ---- // //simpledoc_page_footer(); + + // + // Update cache + // + $mx_simpledoc_cache->unload(); + ?> \ No newline at end of file |
|
From: Jon O. <jon...@us...> - 2006-06-30 12:24:42
|
Update of /cvsroot/mxbb/mx_simpledoc/simpledoc In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv21570/modules/mx_simpledoc/simpledoc Modified Files: simpledoc_common.php Log Message: fixes for Edit Lock Index: simpledoc_common.php =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/simpledoc/simpledoc_common.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** simpledoc_common.php 30 Jun 2006 11:17:24 -0000 1.2 --- simpledoc_common.php 30 Jun 2006 12:24:39 -0000 1.3 *************** *** 29,41 **** // Cache // if ( $mx_simpledoc_cache->exists( 'config' ) ) { ! //$simpledoc_config = $mx_simpledoc_cache->get( 'config' ); } else { ! //$simpledoc_config = $mx_simpledoc_functions->simpledoc_config(); ! //$mx_simpledoc_cache->put( 'config', $simpledoc_config ); } // --- 29,43 ---- // Cache // + /* if ( $mx_simpledoc_cache->exists( 'config' ) ) { ! $simpledoc_config = $mx_simpledoc_cache->get( 'config' ); } else { ! $simpledoc_config = $mx_simpledoc_functions->simpledoc_config(); ! $mx_simpledoc_cache->put( 'config', $simpledoc_config ); } + */ // |
|
From: Jon O. <jon...@us...> - 2006-06-30 12:24:41
|
Update of /cvsroot/mxbb/mx_simpledoc/simpledoc/modules In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv21570/modules/mx_simpledoc/simpledoc/modules Modified Files: simpledoc_index.php Log Message: fixes for Edit Lock Index: simpledoc_index.php =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/simpledoc/modules/simpledoc_index.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** simpledoc_index.php 30 Jun 2006 11:17:24 -0000 1.3 --- simpledoc_index.php 30 Jun 2006 12:24:38 -0000 1.4 *************** *** 24,28 **** // Edit lock // ! $this->edit_lock(); $template->set_filenames( array( 'body' => 'simpledoc_index.tpl' )); --- 24,31 ---- // Edit lock // ! if ( !$this->edit_lock() ) ! { ! mx_message_die(GENERAL_MESSAGE, 'Sorry, this doc is currently locked by another user.'); ! } $template->set_filenames( array( 'body' => 'simpledoc_index.tpl' )); |
|
From: Jon O. <jon...@us...> - 2006-06-30 12:24:41
|
Update of /cvsroot/mxbb/mx_simpledoc/simpledoc/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv21570/modules/mx_simpledoc/simpledoc/includes Modified Files: functions_cache.php functions_simpledoc.php Log Message: fixes for Edit Lock Index: functions_cache.php =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/simpledoc/includes/functions_cache.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** functions_cache.php 17 Jun 2006 20:50:47 -0000 1.2 --- functions_cache.php 30 Jun 2006 12:24:38 -0000 1.3 *************** *** 24,27 **** --- 24,28 ---- global $phpbb_root_path; global $mx_root_path, $module_root_path, $is_block, $phpEx; + $this->cache_dir = $module_root_path . 'simpledoc/cache/'; } Index: functions_simpledoc.php =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/simpledoc/includes/functions_simpledoc.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** functions_simpledoc.php 30 Jun 2006 11:17:24 -0000 1.3 --- functions_simpledoc.php 30 Jun 2006 12:24:38 -0000 1.4 *************** *** 419,423 **** { $edit_lock = $mx_simpledoc_cache->get( 'edit_lock' ); ! die('use_cache' . var_export($edit_lock)); } else --- 419,456 ---- { $edit_lock = $mx_simpledoc_cache->get( 'edit_lock' ); ! ! // ! // Is cached simpledoc user online? ! // ! $sql = "SELECT u.username, u.user_id, u.user_level ! FROM ".USERS_TABLE." u, ".SESSIONS_TABLE." s ! WHERE u.user_id = s.session_user_id ! AND u.user_id = " . $edit_lock['user_id'] . " ! AND s.session_logged_in = '1' ! ORDER BY u.username ASC, s.session_ip ASC"; ! ! if( !($result = $db->sql_query($sql)) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not obtain user/online information', '', __LINE__, __FILE__, $sql); ! } ! ! $row = array(); ! if( $total_users = $db->sql_numrows($result) ) ! { ! $row = $db->sql_fetchrow($result); ! } ! $db->sql_freeresult($result); ! ! if ($total_users == 0) ! { ! $edit_lock['user_id'] = $userdata['user_id']; ! $edit_lock['user_name'] = $userdata['username']; ! $mx_simpledoc_cache->put( 'edit_lock', $edit_lock ); ! } ! else if ($userdata['user_id'] != $row['user_id']) ! { ! return false; ! } ! } else *************** *** 425,446 **** $edit_lock['user_id'] = $userdata['user_id']; $edit_lock['user_name'] = $userdata['username']; ! $mx_simpledoc_cache->put( 'config', $edit_lock ); ! die('recaching...' . var_export($edit_lock)); } ! echo(var_export($edit_lock)); ! ! /* ! $sql = "SELECT u.username, u.user_id, u.user_allow_viewonline, u.user_level, s.session_logged_in, s.session_ip ! FROM ".USERS_TABLE." u, ".SESSIONS_TABLE." s ! WHERE u.user_id = s.session_user_id ! AND s.session_time >= ".( time() - 300 ) . " ! ORDER BY u.username ASC, s.session_ip ASC"; ! ! if( !($result = $db->sql_query($sql)) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not obtain user/online information', '', __LINE__, __FILE__, $sql); ! } ! */ } } --- 458,465 ---- $edit_lock['user_id'] = $userdata['user_id']; $edit_lock['user_name'] = $userdata['username']; ! $mx_simpledoc_cache->put( 'edit_lock', $edit_lock ); } ! return true; } } |