Changeset 5920 for trunk/admin/popuphelp.php
- Timestamp:
- Apr 18, 2010, 8:59:37 PM (14 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/popuphelp.php
r5917 r5920 22 22 // +-----------------------------------------------------------------------+ 23 23 24 if (!defined('PHPWG_ROOT_PATH')) 25 { 26 die('Hacking attempt!'); 27 } 24 // +-----------------------------------------------------------------------+ 25 // | initialization | 26 // +-----------------------------------------------------------------------+ 28 27 29 include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); 28 define('PHPWG_ROOT_PATH', '../'); 29 define('PWG_HELP', true); 30 define('IN_ADMIN', true); 31 include_once( PHPWG_ROOT_PATH.'include/common.inc.php' ); 30 32 31 33 // +-----------------------------------------------------------------------+ … … 34 36 check_status(ACCESS_ADMINISTRATOR); 35 37 38 $page['body_id'] = 'thePopuphelpPage'; 39 $title = l10n('Piwigo Help'); 40 $page['page_banner'] = '<h1>'.$title.'</h1>'; 41 $page['meta_robots']=array('noindex'=>1, 'nofollow'=>1); 42 include(PHPWG_ROOT_PATH.'include/page_header.php'); 43 44 if 45 ( 46 isset($_GET['page']) 47 and preg_match('/^[a-z_]*$/', $_GET['page']) 48 ) 49 { 50 $help_content = 51 load_language('help/'.$_GET['page'].'.html', '', array('return'=>true) ); 52 53 if ($help_content == false) 54 { 55 $help_content = ''; 56 } 57 58 $help_content = trigger_event( 59 'get_popup_help_content', $help_content, $_GET['page']); 60 } 61 else 62 { 63 die('Hacking attempt!'); 64 } 65 66 $template->set_filename('popuphelp','popuphelp.tpl'); 67 68 $template->assign( 69 array 70 ( 71 'HELP_CONTENT' => $help_content 72 )); 73 36 74 // +-----------------------------------------------------------------------+ 37 // | functions|75 // | html code display | 38 76 // +-----------------------------------------------------------------------+ 39 77 78 $template->pparse('popuphelp'); 40 79 41 // +-----------------------------------------------------------------------+ 42 // | categories movement | 43 // +-----------------------------------------------------------------------+ 80 include(PHPWG_ROOT_PATH.'include/page_tail.php'); 44 81 45 if (isset($_POST['submit']))46 {47 if (count($_POST['selection']) > 0)48 {49 // TODO: tests50 move_categories($_POST['selection'], $_POST['parent']);51 }52 else53 {54 array_push(55 $page['errors'],56 l10n('Select at least one category')57 );58 }59 }60 61 // +-----------------------------------------------------------------------+62 // | template initialization |63 // +-----------------------------------------------------------------------+64 $template->set_filename('cat_move', 'cat_move.tpl');65 66 $template->assign(67 array(68 'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=cat_move',69 'F_ACTION' => PHPWG_ROOT_PATH.'admin.php?page=cat_move',70 )71 );72 73 // +-----------------------------------------------------------------------+74 // | Categories display |75 // +-----------------------------------------------------------------------+76 77 $query = '78 SELECT id,name,uppercats,global_rank79 FROM '.CATEGORIES_TABLE.'80 WHERE dir IS NULL81 ;';82 display_select_cat_wrapper(83 $query,84 array(),85 'category_to_move_options'86 );87 88 $query = '89 SELECT id,name,uppercats,global_rank90 FROM '.CATEGORIES_TABLE.'91 ;';92 93 display_select_cat_wrapper(94 $query,95 array(),96 'category_parent_options'97 );98 99 // +-----------------------------------------------------------------------+100 // | sending html code |101 // +-----------------------------------------------------------------------+102 103 $template->assign_var_from_handle('ADMIN_CONTENT', 'cat_move');104 82 ?>
Note: See TracChangeset
for help on using the changeset viewer.