Changeset 1699
- Timestamp:
- Jan 8, 2007, 1:16:10 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 23 added
- 16 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin.php
r1682 r1699 55 55 // +-----------------------------------------------------------------------+ 56 56 57 if (isset($_GET['page']) 57 unset($page['page']); 58 59 if 60 ( 61 isset($_GET['page']) 58 62 and preg_match('/^[a-z_]*$/', $_GET['page']) 59 and is_file(PHPWG_ROOT_PATH.'admin/'.$_GET['page'].'.php')) 60 { 61 $page['page'] = $_GET['page']; 62 } 63 else 64 { 65 $page['page'] = 'intro'; 63 ) 64 { 65 if 66 ( 67 (!isset($_GET['page_type']) or $_GET['page_type'] == 'standard') 68 and is_file(PHPWG_ROOT_PATH.'admin/'.$_GET['page'].'.php') 69 ) 70 { 71 $page['page']['type'] = 'standard'; 72 $page['page']['name'] = $_GET['page']; 73 } 74 else if 75 ( 76 (isset($_GET['page_type']) and $_GET['page_type'] == 'plugin') 77 and isset($_GET['plugin_id']) 78 and preg_match('/^[a-z_]*$/', $_GET['plugin_id']) 79 and is_file(PHPWG_PLUGINS_PATH.$_GET['plugin_id'].'/admin/'.$_GET['page'].'.php') 80 ) 81 { 82 if (function_exists('mysql_real_escape_string')) 83 { 84 $page['page']['plugin_id'] = mysql_real_escape_string($_GET['plugin_id']); 85 } 86 else 87 { 88 $page['page']['plugin_id'] = mysql_escape_string($_GET['plugin_id']); 89 } 90 91 $check_db_plugin = get_db_plugins('', $page['page']['plugin_id']); 92 if (!empty($check_db_plugin)) 93 { 94 $page['page']['type'] = $_GET['page_type']; 95 $page['page']['name'] = $_GET['page']; 96 } 97 else 98 { 99 unset($page['page']); 100 } 101 unset($check_db_plugin); 102 } 103 } 104 105 if (!isset($page['page'])) 106 { 107 if (isset($_GET['page_type']) and $_GET['page_type'] == 'plugin') 108 { 109 $page['page']['type'] = 'standard'; 110 $page['page']['name'] = 'plugins'; 111 } 112 else 113 { 114 $page['page']['type'] = 'standard'; 115 $page['page']['name'] = 'intro'; 116 } 66 117 } 67 118 … … 136 187 trigger_action('plugin_admin_menu'); 137 188 138 include(PHPWG_ROOT_PATH.'admin/'.$page['page'].'.php'); 189 switch($page['page']['type']) 190 { 191 case 'standard': 192 { 193 include(PHPWG_ROOT_PATH.'admin/'.$page['page']['name'].'.php'); 194 break; 195 } 196 case 'plugin': 197 { 198 include(PHPWG_PLUGINS_PATH.$page['page']['plugin_id'].'/admin/'.$page['page']['name'].'.php'); 199 break; 200 } 201 default: 202 { 203 die ("Hacking attempt!"); 204 break; 205 } 206 } 207 139 208 140 209 //------------------------------------------------------------- content display -
trunk/admin/advanced_feature.php
r1688 r1699 3 3 // | PhpWebGallery - a PHP based picture gallery | 4 4 // | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net | 5 // | Copyright (C) 2003-200 5PhpWebGallery Team - http://phpwebgallery.net |5 // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net | 6 6 // +-----------------------------------------------------------------------+ 7 7 // | branch : BSF (Best So Far) … … 37 37 38 38 // +-----------------------------------------------------------------------+ 39 // | actions|39 // | Actions | 40 40 // +-----------------------------------------------------------------------+ 41 41 … … 55 55 56 56 // +-----------------------------------------------------------------------+ 57 // | template init | 57 // | Define advanced features | 58 // +-----------------------------------------------------------------------+ 59 60 $advanced_features = array(); 61 62 // Add advanced features 63 /*array_push($advanced_features, 64 array 65 ( 66 'CAPTION' => l10n('???'), 67 'URL' => $start_url.'???' 68 ));*/ 69 70 array_push($advanced_features, 71 array 72 ( 73 'CAPTION' => l10n('Elements_not_linked'), 74 'URL' => get_root_url().'admin.php?page=element_set&cat=not_linked' 75 )); 76 77 array_push($advanced_features, 78 array 79 ( 80 'CAPTION' => l10n('Duplicates'), 81 'URL' => get_root_url().'admin.php?page=element_set&cat=duplicates' 82 )); 83 84 //$advanced_features is array of array composed of CAPTION & URL 85 $advanced_features = 86 trigger_event('array_advanced_features', $advanced_features); 87 88 // +-----------------------------------------------------------------------+ 89 // | Template init | 58 90 // +-----------------------------------------------------------------------+ 59 91 60 92 $template->set_filenames(array('advanced_feature'=>'admin/advanced_feature.tpl')); 61 93 62 $start_url = PHPWG_ROOT_PATH.'admin.php?page=advanced_feature&action=';94 $start_url = get_root_url().'admin.php?page=advanced_feature&action='; 63 95 64 96 $template->assign_vars( 65 array( 66 // 'U_ADV_????' => $start_url.'???', 67 'U_ADV_ELEMENT_NOT_LINKED' => PHPWG_ROOT_PATH.'admin.php?page=element_set&cat=not_linked', 68 'U_ADV_DUP_FILES' => PHPWG_ROOT_PATH.'admin.php?page=element_set&cat=duplicates', 69 'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=advanced_feature' 70 ) 71 ); 97 array 98 ( 99 'U_HELP' => get_root_url().'popuphelp.php?page=advanced_feature' 100 )); 101 102 // advanced_features 103 if (count($advanced_features) > 0) 104 { 105 foreach ($advanced_features as $advanced_feature) 106 { 107 $template->assign_block_vars('advanced_features.advanced_feature', $advanced_feature); 108 } 109 } 72 110 73 111 // +-----------------------------------------------------------------------+ 74 // | sending html code|112 // | Sending html code | 75 113 // +-----------------------------------------------------------------------+ 76 114 77 115 $template->assign_var_from_handle('ADMIN_CONTENT', 'advanced_feature'); 116 78 117 ?> -
trunk/admin/include/functions_notification_by_mail.inc.php
r1679 r1699 255 255 // language files 256 256 include(get_language_filepath('common.lang.php')); 257 @include(get_language_filepath('local.lang.php'));258 257 // No test admin because script is checked admin (user selected no) 259 258 // Translations are in admin file too 260 259 include(get_language_filepath('admin.lang.php')); 260 trigger_action('loading_lang'); 261 @include(get_language_filepath('local.lang.php')); 261 262 } 262 263 } -
trunk/admin/plugins.php
r1655 r1699 43 43 if ( isset($_REQUEST['action']) and isset($_REQUEST['plugin']) ) 44 44 { 45 $plugin_id = $_REQUEST['plugin']; 45 if (function_exists('mysql_real_escape_string')) 46 { 47 $plugin_id = mysql_real_escape_string($_REQUEST['plugin']); 48 } 49 else 50 { 51 $plugin_id = mysql_escape_string($_REQUEST['plugin']); 52 } 53 46 54 $crt_db_plugin = get_db_plugins('', $plugin_id); 47 55 if (!empty($crt_db_plugin)) -
trunk/admin/site_manager.php
r1654 r1699 206 206 207 207 $template->assign_vars( array( 208 'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page= remote_site',208 'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=site_manager', 209 209 'F_ACTION' => PHPWG_ROOT_PATH.'admin.php' 210 210 .get_query_string_diff( array('action','site') ) … … 294 294 ); 295 295 } 296 297 $plugin_links = array(); 298 //$plugin_links is array of array composed of U_HREF, U_HINT & U_CAPTION 299 $plugin_links = 300 trigger_event('array_site_manager_plugin_links', 301 $plugin_links, $row['id'], $is_remote); 302 303 // plugin_links 304 if (count($plugin_links) > 0) 305 { 306 foreach ($plugin_links as $plugin_link) 307 { 308 $template->assign_block_vars('sites.site.plugin_links.plugin_link', $plugin_link); 309 } 310 } 311 296 312 } 297 313 -
trunk/include/common.inc.php
r1692 r1699 150 150 include_once(get_language_filepath('admin.lang.php')); 151 151 } 152 trigger_action('loading_lang'); 152 153 @include_once(get_language_filepath('local.lang.php')); 153 154 -
trunk/include/functions.inc.php
r1690 r1699 641 641 $user = build_user( $conf['guest_id'], true); 642 642 include_once(get_language_filepath('common.lang.php')); 643 trigger_action('loading_lang'); 643 644 @include_once(get_language_filepath('local.lang.php')); 644 645 list($tmpl, $thm) = explode('/', $conf['default_template']); -
trunk/include/functions_plugins.inc.php
r1616 r1699 34 34 */ 35 35 36 define('PHPWG_PLUGINS_PATH', PHPWG_ROOT_PATH.'plugins/');36 define('PHPWG_PLUGINS_PATH', PHPWG_ROOT_PATH.'plugins/'); 37 37 38 38 define('EVENT_HANDLER_PRIORITY_NEUTRAL', 50); -
trunk/include/functions_user.inc.php
r1677 r1699 822 822 * 823 823 * @param string filename 824 * @param string dirname 824 825 * @return string filepath 825 826 */ 826 function get_language_filepath($filename )827 function get_language_filepath($filename, $dirname = '') 827 828 { 828 829 global $user, $conf; 830 831 if (empty($dirname)) 832 { 833 $dirname = PHPWG_ROOT_PATH; 834 } 835 $dirname .= 'language'.'/'; 829 836 830 837 $directories = array(); 831 838 if ( isset($user['language']) ) 832 839 { 833 $directories[] = PHPWG_ROOT_PATH.'language/'.$user['language'];834 } 835 $directories[] = PHPWG_ROOT_PATH.'language/'.$conf['default_language'];836 $directories[] = PHPWG_ROOT_PATH.'language/'.PHPWG_DEFAULT_LANGUAGE;840 $directories[] = $dirname.$user['language']; 841 } 842 $directories[] = $dirname.$conf['default_language']; 843 $directories[] = $dirname.PHPWG_DEFAULT_LANGUAGE; 837 844 838 845 foreach ($directories as $directory) -
trunk/language/en_UK.iso-8859-1/help/advanced_feature.html
r1688 r1699 1 1 <h2>Advanced features</h2> 2 2 3 <p>List special functionnalties for expert PWG administrator .</p>3 <p>List special functionnalties for expert PWG administrator:</p> 4 4 5 5 <ul> -
trunk/language/fr_FR.iso-8859-1/help/advanced_feature.html
r1688 r1699 1 1 <h2>Fonctions avancées</h2> 2 2 3 <p>Liste des fonctionnalités spéciales pour les administrateurs experts de PWG .</p>3 <p>Liste des fonctionnalités spéciales pour les administrateurs experts de PWG:</p> 4 4 5 5 <ul> 6 6 7 7 <li> 8 <strong>Eléments non liés 8 <strong>Eléments non liés:</strong> 9 9 Affiche les images qui ne sont pas associées à une catégorie virtuelle 10 10 </li> 11 11 <li> 12 <strong>Fichiers portant le même nom dans plusieurs catégories physiques 12 <strong>Fichiers portant le même nom dans plusieurs catégories physiques:</strong> 13 13 Affiche les images ou les éventuels fichiers qui pourraient être trouvés dans plusieurs catégories. 14 14 </li> -
trunk/nbm.php
r1118 r1699 36 36 // Translations are in admin file too 37 37 include(get_language_filepath('admin.lang.php')); 38 // Need to update a second time 39 trigger_action('loading_lang'); 40 @include(get_language_filepath('local.lang.php')); 41 38 42 39 43 // +-----------------------------------------------------------------------+ -
trunk/plugins/admin_advices/main.inc.php
r1694 r1699 14 14 // This Plugin works only on the Admin page 15 15 if ( isset($page['body_id']) and $page['body_id']=='theAdminPage' 16 and isset($page['page']) and $page['page'] == 'intro' ) 16 and isset($page['page']['name']) and $page['page']['name'] == 'intro' 17 and isset($page['page']['type']) and $page['page']['type'] == 'standard' 18 ) 17 19 { 18 20 // Setup Advice Language (Maybe there is already a variable) -
trunk/popuphelp.php
r1072 r1699 43 43 include(PHPWG_ROOT_PATH.'include/page_header.php'); 44 44 45 $template->set_filenames( 46 array( 47 'help_content' => get_language_filepath('help/'.$_GET['page'].'.html') 48 ) 49 ); 45 if 46 ( 47 isset($_GET['page']) 48 and preg_match('/^[a-z_]*$/', $_GET['page']) 49 ) 50 { 51 $help_content = 52 @file_get_contents(get_language_filepath('help/'.$_GET['page'].'.html')); 53 54 if ($help_content == false) 55 { 56 $help_content = ''; 57 } 58 59 $help_content = trigger_event( 60 'get_popup_help_content', $help_content, $_GET['page']); 61 } 62 else 63 { 64 die('Hacking attempt!'); 65 } 50 66 51 67 $template->set_filenames(array('popuphelp' => 'popuphelp.tpl')); 52 68 53 $template->assign_var_from_handle('HELP_CONTENT', 'help_content'); 69 $template->assign_vars( 70 array 71 ( 72 'HELP_CONTENT' => $help_content 73 )); 54 74 55 75 // +-----------------------------------------------------------------------+ … … 60 80 61 81 include(PHPWG_ROOT_PATH.'include/page_tail.php'); 82 62 83 ?> -
trunk/template/yoga/admin/advanced_feature.tpl
r1688 r1699 8 8 9 9 <ul> 10 <!-- <li><a href="{U_ADV_????}" {TAG_INPUT_ENABLED}>{lang:update categories informations}</a></li>--> 11 <li><a href="{U_ADV_ELEMENT_NOT_LINKED}" {TAG_INPUT_ENABLED}>{lang:Elements_not_linked}</a></li> 12 <li><a href="{U_ADV_DUP_FILES}" {TAG_INPUT_ENABLED}>{lang:Duplicates}</a></li> 10 <!-- BEGIN advanced_features --> 11 <!-- BEGIN advanced_feature --> 12 <li><a href="{advanced_features.advanced_feature.URL}" {TAG_INPUT_ENABLED}>{advanced_features.advanced_feature.CAPTION}</a></li> 13 <!-- END advanced_feature --> 14 <!-- END advanced_features --> 13 15 </ul> -
trunk/template/yoga/admin/site_manager.tpl
r1458 r1699 51 51 [<a href="{sites.site.remote.U_CLEAN}" title="{lang:remote_site_clean_hint}" {TAG_INPUT_ENABLED}>{lang:remote_site_clean}</a>] 52 52 <!-- END remote --> 53 <!-- BEGIN plugin_links --> 54 <br> 55 <!-- BEGIN plugin_link --> 56 [<a href="{sites.site.plugin_links.plugin_link.U_HREF}" title='{sites.site.plugin_links.plugin_link.U_HINT}' {TAG_INPUT_ENABLED}>{sites.site.plugin_links.plugin_link.U_CAPTION}</a>] 57 <!-- END plugin_link --> 58 <!-- END plugin_links --> 53 59 </td></tr> 54 60 <!-- END site -->
Note: See TracChangeset
for help on using the changeset viewer.