Permalink
Browse files

should work now - need tests !

  • Loading branch information...
1 parent d1202aa commit e73c4917f271e056de1f995864211cbe3cc5e168 @Informpro committed May 4, 2011
Showing with 24,881 additions and 0 deletions.
  1. +254 −0 trunk/album/ip_root/album.php
  2. +510 −0 trunk/album/ip_root/album_allpics.php
  3. +195 −0 trunk/album/ip_root/album_avatar.php
  4. +531 −0 trunk/album/ip_root/album_cat.php
  5. +195 −0 trunk/album/ip_root/album_comment_delete.php
  6. +258 −0 trunk/album/ip_root/album_comment_edit.php
  7. +229 −0 trunk/album/ip_root/album_delete.php
  8. +136 −0 trunk/album/ip_root/album_download.php
  9. +169 −0 trunk/album/ip_root/album_edit.php
  10. +268 −0 trunk/album/ip_root/album_hotornot.php
  11. +1,000 −0 trunk/album/ip_root/album_modcp.php
  12. +680 −0 trunk/album/ip_root/album_nuffload.php
  13. +185 −0 trunk/album/ip_root/album_nuffload_pbar.php
  14. +271 −0 trunk/album/ip_root/album_otf.php
  15. +297 −0 trunk/album/ip_root/album_otf_thumbnail.php
  16. +722 −0 trunk/album/ip_root/album_personal_cat_admin.php
  17. +155 −0 trunk/album/ip_root/album_personal_index.php
  18. +250 −0 trunk/album/ip_root/album_pic.php
  19. +208 −0 trunk/album/ip_root/album_pic_nuffed.php
  20. +459 −0 trunk/album/ip_root/album_picm.php
  21. +164 −0 trunk/album/ip_root/album_rdf.php
  22. +183 −0 trunk/album/ip_root/album_rss.php
  23. +216 −0 trunk/album/ip_root/album_search.php
  24. +1,244 −0 trunk/album/ip_root/album_showpage.php
  25. +339 −0 trunk/album/ip_root/album_thumbnail.php
  26. +1,370 −0 trunk/album/ip_root/album_upload.php
  27. +168 −0 trunk/album/ip_root/plugins/album/adm/admin_album_auth.php
  28. +584 −0 trunk/album/ip_root/plugins/album/adm/admin_album_cat.php
  29. +47 −0 trunk/album/ip_root/plugins/album/adm/admin_album_config_clearcache.php
  30. +426 −0 trunk/album/ip_root/plugins/album/adm/admin_album_config_extended.php
  31. +77 −0 trunk/album/ip_root/plugins/album/adm/admin_album_config_gd_info.php
  32. +151 −0 trunk/album/ip_root/plugins/album/adm/admin_album_config_index.php
  33. +117 −0 trunk/album/ip_root/plugins/album/adm/admin_album_config_personal.php
  34. +208 −0 trunk/album/ip_root/plugins/album/adm/admin_album_config_settings.php
  35. +146 −0 trunk/album/ip_root/plugins/album/adm/admin_album_config_thumb.php
  36. +184 −0 trunk/album/ip_root/plugins/album/adm/admin_album_config_upload.php
  37. +150 −0 trunk/album/ip_root/plugins/album/adm/admin_album_personal.php
  38. +10 −0 trunk/album/ip_root/plugins/album/adm/index.html
  39. +33 −0 trunk/album/ip_root/plugins/album/adm/templates/album_auth_body.tpl
  40. +61 −0 trunk/album/ip_root/plugins/album/adm/templates/album_cat_body.tpl
  41. +59 −0 trunk/album/ip_root/plugins/album/adm/templates/album_cat_body_debug.tpl
  42. +20 −0 trunk/album/ip_root/plugins/album/adm/templates/album_cat_delete_body.tpl
  43. +60 −0 trunk/album/ip_root/plugins/album/adm/templates/album_cat_new_body.tpl
  44. +15 −0 trunk/album/ip_root/plugins/album/adm/templates/album_cat_select_body.tpl
  45. +132 −0 trunk/album/ip_root/plugins/album/adm/templates/album_config_body_extended.tpl
  46. +140 −0 trunk/album/ip_root/plugins/album/adm/templates/album_config_body_extended_vert.tpl
  47. +14 −0 trunk/album/ip_root/plugins/album/adm/templates/album_config_clearcache_body.tpl
  48. +51 −0 trunk/album/ip_root/plugins/album/adm/templates/album_config_gd_info_body.tpl
  49. +92 −0 trunk/album/ip_root/plugins/album/adm/templates/album_config_index_body.tpl
  50. +48 −0 trunk/album/ip_root/plugins/album/adm/templates/album_config_personal_body.tpl
  51. +157 −0 trunk/album/ip_root/plugins/album/adm/templates/album_config_settings_body.tpl
  52. +23 −0 trunk/album/ip_root/plugins/album/adm/templates/album_config_sub_body.tpl
  53. +96 −0 trunk/album/ip_root/plugins/album/adm/templates/album_config_thumb_body.tpl
  54. +127 −0 trunk/album/ip_root/plugins/album/adm/templates/album_config_upload_body.tpl
  55. +48 −0 trunk/album/ip_root/plugins/album/adm/templates/album_personal_body.tpl
  56. +67 −0 trunk/album/ip_root/plugins/album/adm/templates/album_personal_cat_body.tpl
  57. +31 −0 trunk/album/ip_root/plugins/album/adm/templates/album_personal_cat_delete_body.tpl
  58. +118 −0 trunk/album/ip_root/plugins/album/adm/templates/album_personal_cat_new_body.tpl
  59. +10 −0 trunk/album/ip_root/plugins/album/adm/templates/index.html
  60. +108 −0 trunk/album/ip_root/plugins/album/common.php
  61. +213 −0 trunk/album/ip_root/plugins/album/includes/acp_functions.php
  62. +321 −0 trunk/album/ip_root/plugins/album/includes/exif_info.php
  63. +1,037 −0 trunk/album/ip_root/plugins/album/includes/functions.php
  64. +180 −0 trunk/album/ip_root/plugins/album/includes/functions_otf.php
  65. +543 −0 trunk/album/ip_root/plugins/album/includes/hierarchy_auth.php
  66. +191 −0 trunk/album/ip_root/plugins/album/includes/hierarchy_debug.php
  67. +1,659 −0 trunk/album/ip_root/plugins/album/includes/hierarchy_functions.php
  68. +1,963 −0 trunk/album/ip_root/plugins/album/includes/hierarchy_sql.php
  69. +10 −0 trunk/album/ip_root/plugins/album/includes/index.html
  70. +390 −0 trunk/album/ip_root/plugins/album/includes/memberlist.php
  71. +142 −0 trunk/album/ip_root/plugins/album/includes/nuffimage_box.php
  72. +497 −0 trunk/album/ip_root/plugins/album/includes/personal.php
  73. +10 −0 trunk/album/ip_root/plugins/album/index.html
  74. +10 −0 trunk/album/ip_root/plugins/album/language/index.html
  75. +10 −0 trunk/album/ip_root/plugins/album/language/lang_english/index.html
  76. +276 −0 trunk/album/ip_root/plugins/album/language/lang_english/lang_album_admin.php
  77. +368 −0 trunk/album/ip_root/plugins/album/language/lang_english/lang_album_main.php
  78. +101 −0 trunk/album/ip_root/plugins/album/preload.php
  79. +116 −0 trunk/album/ip_root/plugins/album/templates/default/album_box.tpl
  80. +261 −0 trunk/album/ip_root/plugins/album/templates/default/album_cat_body.tpl
  81. +166 −0 trunk/album/ip_root/plugins/album/templates/default/album_comment_body.tpl
  82. +16 −0 trunk/album/ip_root/plugins/album/templates/default/album_copy_body.tpl
  83. +50 −0 trunk/album/ip_root/plugins/album/templates/default/album_edit_body.tpl
  84. +73 −0 trunk/album/ip_root/plugins/album/templates/default/album_hon.tpl
  85. +227 −0 trunk/album/ip_root/plugins/album/templates/default/album_index_body.tpl
  86. +113 −0 trunk/album/ip_root/plugins/album/templates/default/album_memberlist_body.tpl
  87. +105 −0 trunk/album/ip_root/plugins/album/templates/default/album_modcp_body.tpl
  88. +15 −0 trunk/album/ip_root/plugins/album/templates/default/album_move_body.tpl
  89. +123 −0 trunk/album/ip_root/plugins/album/templates/default/album_nuffimage_box.tpl
  90. +21 −0 trunk/album/ip_root/plugins/album/templates/default/album_nuffload_pbar_body.tpl
  91. +75 −0 trunk/album/ip_root/plugins/album/templates/default/album_otf_body.tpl
  92. +57 −0 trunk/album/ip_root/plugins/album/templates/default/album_page_body.tpl
  93. +116 −0 trunk/album/ip_root/plugins/album/templates/default/album_personal_body.tpl
  94. +71 −0 trunk/album/ip_root/plugins/album/templates/default/album_personal_cat_body.tpl
  95. +35 −0 trunk/album/ip_root/plugins/album/templates/default/album_personal_cat_delete_body.tpl
  96. +122 −0 trunk/album/ip_root/plugins/album/templates/default/album_personal_cat_new_body.tpl
  97. +44 −0 trunk/album/ip_root/plugins/album/templates/default/album_personal_index_body.tpl
  98. +77 −0 trunk/album/ip_root/plugins/album/templates/default/album_pic_nuffed_body.tpl
  99. +44 −0 trunk/album/ip_root/plugins/album/templates/default/album_search_body.tpl
  100. +270 −0 trunk/album/ip_root/plugins/album/templates/default/album_showpage_body.tpl
  101. +57 −0 trunk/album/ip_root/plugins/album/templates/default/album_slideshow_body.tpl
  102. +74 −0 trunk/album/ip_root/plugins/album/templates/default/album_slideshow_inc_js.tpl
  103. +346 −0 trunk/album/ip_root/plugins/album/templates/default/album_upload_body.tpl
  104. +10 −0 trunk/album/ip_root/plugins/album/templates/default/index.html
  105. +10 −0 trunk/album/ip_root/plugins/album/templates/index.html
@@ -0,0 +1,254 @@
+<?php
+/**
+*
+* @package Icy Phoenix
+* @version $Id$
+* @copyright (c) 2008 Icy Phoenix
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+*
+* @Extra credits for this file
+* Smartor (smartor_xp@hotmail.com)
+*
+*/
+
+define('IN_ICYPHOENIX', true);
+if (!defined('IP_ROOT_PATH')) define('IP_ROOT_PATH', './');
+if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
+include(IP_ROOT_PATH . 'common.' . PHP_EXT);
+
+// Start session management
+$user->session_begin();
+//$auth->acl($user->data);
+$user->setup();
+// End session management
+
+$class_plugins->register_page('album');
+require(ALBUM_ROOT_PATH . 'common.' . PHP_EXT);
+
+// ------------------------------------
+// Check $album_user_id
+// ------------------------------------
+$album_user_id = request_var('user_id', 0);
+if (empty($album_user_id))
+{
+ // if no user_id was supplied then we aren't going to show a personal gallery category
+ $album_user_id = ALBUM_PUBLIC_GALLERY;
+}
+
+if ($album_user_id != ALBUM_PUBLIC_GALLERY)
+{
+ $mode = request_var('mode', '', true);
+ $album_view_mode = strtolower($mode);
+ // make sure that it only contains some valid value
+ switch ($album_view_mode)
+ {
+ case ALBUM_VIEW_ALL:
+ $album_view_mode = ALBUM_VIEW_ALL;
+ break;
+ case ALBUM_VIEW_LIST:
+ $album_view_mode = ALBUM_VIEW_LIST;
+ break;
+ default:
+ $album_view_mode = '';
+ }
+
+ $cat_id = request_var('cat_id', 0);
+ if ($cat_id <= 0)
+ {
+ $cat_id = ALBUM_ROOT_CATEGORY;
+ }
+
+ if ($album_user_id < 1)
+ {
+ if (!$user->data['session_logged_in'])
+ {
+ redirect(append_sid(album_append_uid(CMS_PAGE_LOGIN . '?redirect=album.' . PHP_EXT, true)));
+ }
+ else
+ {
+ $album_user_id = $user->data['user_id'];
+ redirect(append_sid(album_append_uid('album.' . PHP_EXT, true)));
+ }
+ }
+
+ if (($cat_id != ALBUM_ROOT_CATEGORY) && ($cat_id != album_get_personal_root_id($album_user_id)))
+ {
+ redirect(append_sid(album_append_uid('album_cat.' . PHP_EXT . album_build_url_parameters($_GET), false)));
+ }
+}
+
+$catrows = array ();
+$options = ($album_view_mode == ALBUM_VIEW_LIST) ? ALBUM_READ_ALL_CATEGORIES|ALBUM_AUTH_VIEW : ALBUM_AUTH_VIEW;
+$catrows = album_read_tree($album_user_id, $options);
+
+album_read_tree($album_user_id);
+$album_nav_cat_desc = album_make_nav_tree($cat_id, 'album_cat.' . PHP_EXT, 'nav' , $album_user_id);
+if ($album_nav_cat_desc != '')
+{
+ $nav_server_url = create_server_url();
+ $album_nav_cat_desc = ALBUM_NAV_ARROW . $album_nav_cat_desc;
+ $breadcrumbs_address = ALBUM_NAV_ARROW . '<a href="' . $nav_server_url . append_sid('album.' . PHP_EXT) . '">' . $lang['Album'] . '</a>' . $album_nav_cat_desc;
+}
+// --------------------------------
+// Build allowed category-list (for recent pics after here)
+// $catrows array now stores all categories which this user can view.
+// --------------------------------
+$allowed_cat = ''; // For Recent Public Pics below
+for ($i = 0; $i < sizeof($catrows); $i++)
+{
+ // --------------------------------
+ // build list of allowd category id's
+ // --------------------------------
+ $allowed_cat .= ($allowed_cat == '') ? $catrows[$i]['cat_id'] : ',' . $catrows[$i]['cat_id'];
+}
+//
+// END of Categories Index
+//
+
+// ------------------------------------
+// Build the sort method and sort order
+// information
+// ------------------------------------
+
+$start = request_var('start', 0);
+$start = ($start < 0) ? 0 : $start;
+
+$sort_method = request_var('sort_method', $album_config['sort_method']);
+$sort_method = check_var_value($sort_method, array('pic_time', 'pic_title', 'username', 'pic_view_count', 'rating', 'comments', 'new_comment'));
+
+$sort_order = request_var('order', $album_config['sort_order']);
+$sort_order = check_var_value($sort_order, array('DESC', 'ASC'));
+
+// ------------------------------------
+// additional sorting options
+// ------------------------------------
+if ($album_user_id != ALBUM_PUBLIC_GALLERY)
+{
+ $sort_rating_option = '';
+ $sort_comments_option = '';
+ $sort_new_comment_option = '';
+
+ if ($album_config['rate'] == 1)
+ {
+ $sort_rating_option = '<option value="rating" ';
+ $sort_rating_option .= ($sort_method == 'rating') ? 'selected="selected"' : '';
+ $sort_rating_option .= '>' . $lang['Rating'] . '</option>';
+ }
+ if ($album_config['comment'] == 1)
+ {
+ $sort_comments_option = '<option value="comments" ';
+ $sort_comments_option .= ($sort_method == 'comments') ? 'selected="selected"' : '';
+ $sort_comments_option .= '>' . $lang['Comments'] . '</option>';
+
+ $sort_new_comment_option = '<option value="new_comment" ';
+ $sort_new_comment_option .= ($sort_method == 'new_comment') ? 'selected="selected"' : '';
+ $sort_new_comment_option .= '>' . $lang['New_Comment'] . '</option>';
+ }
+}
+
+/*
++----------------------------------------------------------
+| Start output the page
++----------------------------------------------------------
+*/
+$meta_content['page_title'] = $lang['Album'];
+$meta_content['description'] = '';
+$meta_content['keywords'] = '';
+
+// is it a public gallery ?
+if ($album_user_id == ALBUM_PUBLIC_GALLERY)
+{
+ $template_to_parse = 'album_index_body.tpl';
+
+ $cols = ($album_config['img_cols'] == 0 ? 4 : $album_config['img_cols']);
+ $cols_width = (100 / $cols) . '%';
+
+ // Last Comments
+ if ($album_config['show_last_comments'] == 1)
+ {
+ album_build_last_comments_info($allowed_cat);
+ }
+
+ // Recent Public Pics
+ if ($album_config['disp_late'] == 1)
+ {
+ album_build_recent_pics($allowed_cat);
+ }
+
+ // Highest Rated Pics
+ if ($album_config['disp_high'] == 1)
+ {
+ album_build_highest_rated_pics($allowed_cat);
+ }
+
+ // Most Viewed Pics
+ if ($album_config['disp_mostv'] == 1)
+ {
+ album_build_most_viewed_pics($allowed_cat);
+ }
+
+ //Random Pics
+ if ($album_config['disp_rand'] == 1)
+ {
+ album_build_random_pics($allowed_cat);
+ }
+
+ $template->assign_vars(array(
+ 'BREADCRUMBS_ADDRESS' => (empty($breadcrumbs_address) ? (($meta_content['page_title_clean'] != $config['sitename']) ? ($lang['Nav_Separator'] . '<a href="#" class="nav-current">' . $meta_content['page_title_clean'] . '</a>') : '') : $breadcrumbs_address),
+
+ 'ALBUM_NAV' => $album_nav_cat_desc,
+ 'S_COLS' => $cols,
+ 'S_COL_WIDTH' => $cols_width,
+ 'TARGET_BLANK' => ($album_config['fullpic_popup']) ? 'target="_blank"' : '',
+ 'L_RAND_PICS' => $lang['Random_Pictures'],
+ 'L_HI_RATINGS' => $lang['Highest_Rated_Pictures'],
+ 'L_RECENT_PUBLIC_PICS' => $lang['Recent_Public_Pics'],
+ 'L_MOST_VIEWED' => $lang['Most_Viewed_Pictures'],
+ 'L_NO_PICS' => $lang['No_Pics'],
+ 'L_PIC_TITLE' => $lang['Pic_Image'],
+ 'L_PIC_ID' => $lang['Pic_ID'],
+ 'L_VIEW' => $lang['View'],
+ 'L_POSTER' => $lang['Pic_Poster'],
+ 'L_POSTED' => $lang['Posted'],
+
+ 'L_ALBUM_ALLPICS' => $lang['All_Picture_List_Of_User'],
+ 'L_ALBUM_OTF' => $lang['Pic_Gallery'],
+ 'L_ALBUM_HON' => $lang['Hot_Or_Not'],
+ 'L_ALBUM_RDF' => $lang['Pic_RDF'],
+ 'L_ALBUM_RSS' => $lang['Pic_RSS'],
+ 'U_ALBUM_ALLPICS' => append_sid(album_append_uid('album_allpics.' . PHP_EXT)),
+ 'U_ALBUM_OTF' => append_sid(album_append_uid('album_otf.' . PHP_EXT)),
+ 'U_ALBUM_HON' => append_sid(album_append_uid('album_hotornot.' . PHP_EXT)),
+ 'U_ALBUM_RDF' => append_sid(album_append_uid('album_rdf.' . PHP_EXT)),
+ 'U_ALBUM_RSS' => append_sid(album_append_uid('album_rss.' . PHP_EXT)),
+ )
+ );
+}
+// it's a personal gallery, and in the root folder
+else
+{
+ if ($album_view_mode == ALBUM_VIEW_LIST)
+ {
+ include (ALBUM_INCLUDES_PATH . 'album_memberlist.' . PHP_EXT);
+ }
+ else
+ {
+ // include our special personal gallery files
+ // this file holds all the code to handle personal galleries
+ // except moderation and management of personal gallery categories.
+ include (ALBUM_INCLUDES_PATH . 'album_personal.' . PHP_EXT);
+ }
+}
+
+if (empty($album_view_mode))
+{
+ album_display_index($album_user_id, ALBUM_ROOT_CATEGORY, true, true, true);
+}
+
+full_page_generation($template_to_parse, $meta_content['page_title'], $meta_content['description'], $meta_content['keywords']);
+
+?>
Oops, something went wrong.

0 comments on commit e73c491

Please sign in to comment.