/** * Init tabsheet for history pages * @ignore */ function history_tabsheet() { global $page, $link_start; // TabSheet $tabsheet = new tabsheet(); $tabsheet->set_id('history'); $tabsheet->select($page['page']); $tabsheet->assign(); }
} /* Update the database - No action done on the video */ $rotation_code = pwg_image::get_rotation_code_from_angle($_POST['angle']); $query = "UPDATE " . IMAGES_TABLE . " SET rotation='" . $rotation_code . "', `date_metadata_update`=CURDATE() WHERE `id`=" . $_GET['image_id'] . ";"; pwg_query($query); /* Retrieve direct information about picture */ $query = "SELECT id,path,representative_ext FROM " . IMAGES_TABLE . " WHERE " . SQL_VIDEOS . " AND id = " . $_GET['image_id'] . ";"; $row = pwg_db_fetch_assoc(pwg_query($query)); /* Delete previous derivatives */ delete_element_derivatives($row); array_push($page['infos'], l10n('The photo was updated')); } // +-----------------------------------------------------------------------+ // | Tabs | // +-----------------------------------------------------------------------+ $tabsheet = new tabsheet(); $tabsheet->set_id('photo'); $tabsheet->select('rotate'); $tabsheet->assign(); // +-----------------------------------------------------------------------+ // | template init | // +-----------------------------------------------------------------------+ $template->set_filenames(array('plugin_admin_content' => dirname(__FILE__) . '/admin_rotate.tpl')); // Retrieve direct information about picture $query = "SELECT * FROM " . IMAGES_TABLE . " WHERE " . SQL_VIDEOS . " AND id = " . $_GET['image_id'] . ";"; $row = pwg_db_fetch_assoc(pwg_query($query)); $angles = array(array('value' => 270, 'name' => l10n('90° right')), array('value' => 90, 'name' => l10n('90° left')), array('value' => 180, 'name' => l10n('180°'))); $template->assign(array('F_ACTION' => $self_url, 'TN_SRC' => DerivativeImage::thumb_url($row), 'TITLE' => render_element_name($row), 'angles' => $angles, 'angle_selected' => pwg_image::get_rotation_angle_from_code($row['rotation']), 'library' => pwg_image::get_library(), 'PWG_TOKEN' => get_pwg_token())); // +-----------------------------------------------------------------------+ // | sending html code | // +-----------------------------------------------------------------------+
$page['infos'][] = l10n('Information data registered in database'); } //------------------------------------------------------ $conf reinitialization load_conf_from_db(); } // restore default derivatives settings if ('sizes' == $page['section'] and isset($_GET['action']) and 'restore_settings' == $_GET['action']) { ImageStdParams::set_and_save(ImageStdParams::get_default_sizes()); pwg_query('DELETE FROM ' . CONFIG_TABLE . ' WHERE param = \'disabled_derivatives\''); clear_derivative_cache(); $page['infos'][] = l10n('Your configuration settings are saved'); } //----------------------------------------------------- template initialization $template->set_filename('config', 'configuration_' . $page['section'] . '.tpl'); // TabSheet $tabsheet = new tabsheet(); $tabsheet->set_id('configuration'); $tabsheet->select($page['section']); $tabsheet->assign(); $action = get_root_url() . 'admin.php?page=configuration'; $action .= '&section=' . $page['section']; $template->assign(array('U_HELP' => get_root_url() . 'admin/popuphelp.php?page=configuration', 'F_ACTION' => $action)); switch ($page['section']) { case 'main': function order_by_is_local() { @(include PHPWG_ROOT_PATH . 'local/config/config.inc.php'); if (isset($conf['local_dir_site'])) { @(include PHPWG_ROOT_PATH . PWG_LOCAL_DIR . 'config/config.inc.php'); } return isset($conf['order_by']) or isset($conf['order_by_inside_category']);
if (isset($_POST['submit'])) { check_pwg_token(); $offsetX = trim($_POST['offsetX']); $offsetY = trim($_POST['offsetY']); if (strlen($offsetX) === 0 || strlen($offsetY) === 0 || !is_numeric($offsetX) || !is_numeric($offsetY)) { $page['errors'][] = 'Invalid offset value'; } if (count($page['errors']) === 0) { $stereoTable = $prefixeTable . 'stereo'; if (isset($picture['x'])) { $query = "UPDATE {$stereoTable}\n\t\t\t\tSET x={$offsetX}, y={$offsetY}\n\t\t\t\tWHERE media_id = {$id};"; } else { $picture['x'] = $offsetX; $picture['y'] = $offsetY; $query = "INSERT INTO {$stereoTable} (media_id, x, y)\n\t\t\t\tVALUES ({$id}, {$offsetX}, {$offsetY})"; } pwg_query($query); array_push($page['infos'], l10n('STEREO_EDIT_SUCCESS')); } } // needed for the photo tabsheet $admin_photo_base_url = get_root_url() . 'admin.php?page=photo-' . $id; $self_url = Stereo_get_admin_url($id); include_once PHPWG_ROOT_PATH . 'admin/include/tabsheet.class.php'; $tabsheet = new tabsheet(); $tabsheet->set_id('photo'); $tabsheet->select('stereo'); $tabsheet->assign(); $template->assign(array('PWG_TOKEN' => get_pwg_token(), 'F_ACTION' => $self_url, 'TITLE' => render_element_name($picture), 'PICTURE' => Stereo_render_element_content('', $picture), 'OFFSET_X' => empty($picture['x']) ? 0 : $picture['x'], 'OFFSET_Y' => empty($picture['y']) ? 0 : $picture['y'])); $template->set_filename('plugin_admin_content', STEREO_PATH . 'admin.tpl'); $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
<?php // +-----------------------------------------------------------------------+ // | Piwigo - a PHP based photo gallery | // +-----------------------------------------------------------------------+ // | Copyright(C) 2008-2016 Piwigo Team http://piwigo.org | // | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net | // | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | // +-----------------------------------------------------------------------+ // | This program is free software; you can redistribute it and/or modify | // | it under the terms of the GNU General Public License as published by | // | the Free Software Foundation | // | | // | This program is distributed in the hope that it will be useful, but | // | WITHOUT ANY WARRANTY; without even the implied warranty of | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | // | General Public License for more details. | // | | // | You should have received a copy of the GNU General Public License | // | along with this program; if not, write to the Free Software | // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | // | USA. | // +-----------------------------------------------------------------------+ include_once PHPWG_ROOT_PATH . 'admin/include/tabsheet.class.php'; $my_base_url = get_root_url() . 'admin.php?page='; $tabsheet = new tabsheet(); $tabsheet->set_id('albums'); $tabsheet->select($page['tab']); $tabsheet->assign();
// | Check Access and exit when user status is not ok | // +-----------------------------------------------------------------------+ check_status(ACCESS_ADMINISTRATOR); // +-----------------------------------------------------------------------+ // | Load configuration | // +-----------------------------------------------------------------------+ $upload_form_config = get_upload_form_config(); // +-----------------------------------------------------------------------+ // | Tabs | // +-----------------------------------------------------------------------+ if (isset($_GET['section'])) { $page['tab'] = $_GET['section']; // backward compatibility if ('ploader' == $page['tab']) { $page['tab'] = 'applications'; } } else { $page['tab'] = 'direct'; } $tabsheet = new tabsheet(); $tabsheet->set_id('photos_add'); $tabsheet->select($page['tab']); $tabsheet->assign(); // +-----------------------------------------------------------------------+ // | template init | // +-----------------------------------------------------------------------+ $template->set_filenames(array('photos_add' => 'photos_add_' . $page['tab'] . '.tpl')); // +-----------------------------------------------------------------------+ // | Load the tab | // +-----------------------------------------------------------------------+ include PHPWG_ROOT_PATH . 'admin/photos_add_' . $page['tab'] . '.php';
// | it under the terms of the GNU General Public License as published by | // | the Free Software Foundation | // | | // | This program is distributed in the hope that it will be useful, but | // | WITHOUT ANY WARRANTY; without even the implied warranty of | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | // | General Public License for more details. | // | | // | You should have received a copy of the GNU General Public License | // | along with this program; if not, write to the Free Software | // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | // | USA. | // +-----------------------------------------------------------------------+ defined('PHPWG_ROOT_PATH') or die("Hacking attempt!"); include_once PHPWG_ROOT_PATH . 'admin/include/tabsheet.class.php'; $tabsheet = new tabsheet(); $tabsheet->set_id('rating'); $tabsheet->select('rating_user'); $tabsheet->assign(); $filter_min_rates = 2; if (isset($_GET['f_min_rates'])) { $filter_min_rates = (int) $_GET['f_min_rates']; } $consensus_top_number = $conf['top_number']; if (isset($_GET['consensus_top_number'])) { $consensus_top_number = (int) $_GET['consensus_top_number']; } // build users global $conf; $query = 'SELECT DISTINCT u.' . $conf['user_fields']['id'] . ' AS id,
define('PQV_BASE_URL', get_root_url() . 'admin.php?page=plugin-photo_quick_validation'); // +-----------------------------------------------------------------------+ // | Check Access and exit when user status is not ok | // +-----------------------------------------------------------------------+ check_status(ACCESS_ADMINISTRATOR); // +-----------------------------------------------------------------------+ // | Tabs | // +-----------------------------------------------------------------------+ $tabs = array(array('code' => 'config', 'label' => l10n('Configuration'))); $tab_codes = array_map(create_function('$a', 'return $a["code"];'), $tabs); if (isset($_GET['tab']) and in_array($_GET['tab'], $tab_codes)) { $page['tab'] = $_GET['tab']; } else { $page['tab'] = $tabs[0]['code']; } $tabsheet = new tabsheet(); foreach ($tabs as $tab) { $tabsheet->add($tab['code'], $tab['label'], PQV_BASE_URL . '-' . $tab['code']); } $tabsheet->select($page['tab']); $tabsheet->assign(); // +-----------------------------------------------------------------------+ // | actions | // +-----------------------------------------------------------------------+ if (!empty($_POST)) { check_input_parameter('groups', $_POST, true, PATTERN_ID); // first we must reset all groups to false $query = ' UPDATE ' . GROUPS_TABLE . ' SET pqv_enabled = \'false\' ;';
} break; case 'send': if (isset($_POST['send_submit']) and isset($_POST['send_selection']) and isset($_POST['send_customize_mail_content'])) { $check_key_treated = do_action_send_mail_notification('send', $_POST['send_selection'], stripslashes($_POST['send_customize_mail_content'])); do_timeout_treatment('send_selection', $check_key_treated); } } // +-----------------------------------------------------------------------+ // | template initialization | // +-----------------------------------------------------------------------+ $template->set_filenames(array('double_select' => 'double_select.tpl', 'notification_by_mail' => 'notification_by_mail.tpl')); $template->assign(array('U_HELP' => get_root_url() . 'admin/popuphelp.php?page=notification_by_mail', 'F_ACTION' => $base_url . get_query_string_diff(array()))); if (is_autorize_status(ACCESS_WEBMASTER)) { // TabSheet $tabsheet = new tabsheet(); $tabsheet->set_id('nbm'); $tabsheet->select($page['mode']); $tabsheet->assign(); } if ($must_repost) { // Get name of submit button $repost_submit_name = ''; if (isset($_POST['falsify'])) { $repost_submit_name = 'falsify'; } elseif (isset($_POST['trueify'])) { $repost_submit_name = 'trueify'; } elseif (isset($_POST['send_submit'])) { $repost_submit_name = 'send_submit'; } $template->assign('REPOST_SUBMIT_NAME', $repost_submit_name);
} // Check access and exit when user status is not ok check_status(ACCESS_ADMINISTRATOR); if (!isset($_GET['image_id']) or !isset($_GET['section'])) { die('Invalid data!'); } check_input_parameter('image_id', $_GET, false, PATTERN_ID); $admin_photo_base_url = get_root_url() . 'admin.php?page=photo-' . $_GET['image_id']; $self_url = get_root_url() . 'admin.php?page=plugin&section=piwigo-videojs/admin/admin_photo.php&image_id=' . $_GET['image_id']; $sync_url = get_root_url() . 'admin.php?page=plugin&section=piwigo-videojs/admin/admin_photo.php&sync_metadata=1&image_id=' . $_GET['image_id']; $delete_url = get_root_url() . 'admin.php?page=plugin&section=piwigo-videojs/admin/admin_photo.php&delete_extra=1&image_id=' . $_GET['image_id'] . '&pwg_token=' . get_pwg_token(); load_language('plugin.lang', PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/'); load_language('plugin.lang', VIDEOJS_PATH); global $template, $page, $conf; include_once PHPWG_ROOT_PATH . 'admin/include/tabsheet.class.php'; $tabsheet = new tabsheet(); $tabsheet->set_id('photo'); $tabsheet->select('videojs'); $tabsheet->assign(); $template->set_filenames(array('plugin_admin_content' => dirname(__FILE__) . '/admin_photo.tpl')); // Generate default value $sync_options = array('mediainfo' => 'mediainfo', 'ffmpeg' => 'ffmpeg', 'metadata' => true, 'poster' => true, 'postersec' => 4, 'output' => 'jpg', 'posteroverlay' => false, 'posteroverwrite' => true, 'thumb' => false, 'thumbsec' => 5, 'thumbsize' => "120x68", 'simulate' => true, 'cat_id' => 0, 'subcats_included' => true); // Override default value from configuration if (isset($conf['vjs_sync'])) { $sync_options = unserialize($conf['vjs_sync']); } // Do the Check dependencies, MediaInfo & FFMPEG, share with batch manager & photo edit & admin sync require_once dirname(__FILE__) . '/../include/function_dependencies.php'; $query = "SELECT * FROM " . IMAGES_TABLE . " WHERE " . SQL_VIDEOS . " AND id = " . $_GET['image_id'] . ";"; $picture = pwg_db_fetch_assoc(pwg_query($query)); //if (!$sync_options['metadata'] or !isset($picture['path'])) {
define('TAB_SETTINGS', 'settings'); define('TAB_CHANGELOG', 'changelog'); define('TAB_ABOUT', 'about'); // Get current tab $page['tab'] = isset($_GET['tab']) ? $_GET['tab'] : ($page['tab'] = TAB_SETTINGS); if (!in_array($page['tab'], array(TAB_SETTINGS, TAB_CHANGELOG, TAB_ABOUT))) { $page['tab'] = TAB_SETTINGS; } $themeconfig = new \BootstrapDefault\Config(); // Save settings if ($page['tab'] == TAB_SETTINGS) { if (isset($_POST['boostrapdefault_settings'])) { $themeconfig->fromPost($_POST); $themeconfig->save(); } } // TabSheet $tabsheet = new tabsheet(); $tabsheet->set_id('bsd'); $tabsheet->add(TAB_SETTINGS, l10n('Settings'), ADMIN_PATH . '&tab=' . TAB_SETTINGS); $tabsheet->add(TAB_CHANGELOG, l10n('Change Log'), ADMIN_PATH . '&tab=' . TAB_CHANGELOG); $tabsheet->add(TAB_ABOUT, l10n('About'), ADMIN_PATH . '&tab=' . TAB_ABOUT); $tabsheet->select($page['tab']); $tabsheet->assign(); // Fetch the template. global $template; // Add our template to the global template $template->set_filenames(array('theme_admin_content' => dirname(__FILE__) . '/template/' . $page['tab'] . '.tpl')); // Assign the template contents to ADMIN_CONTENT $template->assign('theme_config', $themeconfig); $template->assign_var_from_handle('ADMIN_CONTENT', 'theme_admin_content');
<?php defined('SORTORDERS_PATH') or die('Hacking attempt!'); global $template, $page, $conf; // get current tab $page['tab'] = isset($_GET['tab']) ? $_GET['tab'] : ($page['tab'] = 'config'); // plugin tabsheet is not present on photo page if ($page['tab'] != 'photo') { // tabsheet include_once PHPWG_ROOT_PATH . 'admin/include/tabsheet.class.php'; $tabsheet = new tabsheet(); $tabsheet->set_id('sortorders'); $tabsheet->add('config', l10n('Configuration'), SORTORDERS_ADMIN . '-config'); $tabsheet->select($page['tab']); $tabsheet->assign(); } // include page include SORTORDERS_PATH . 'admin/' . $page['tab'] . '.php'; // template vars $template->assign(array('SORTORDERS_PATH' => SORTORDERS_PATH, 'SORTORDERS_ABS_PATH' => realpath(SORTORDERS_PATH), 'SORTORDERS_ADMIN' => SORTORDERS_ADMIN)); // send page content $template->assign_var_from_handle('ADMIN_CONTENT', 'sortorders_content');
} } elseif (strlen($lat) == 0 and strlen($lon) == 0) { $update_query = 'latitude=NULL, longitude=NULL'; } else { $page['errors'][] = 'Both latitude/longitude must be empty or not empty'; } if (isset($update_query)) { $update_query = 'UPDATE ' . IMAGES_TABLE . ' SET ' . $update_query . ' WHERE id = ' . $_GET['image_id'] . ';'; pwg_query($update_query); } if (count($page['errors']) == 0) { array_push($page['infos'], l10n('The photo was updated')); } } include_once PHPWG_ROOT_PATH . 'admin/include/tabsheet.class.php'; $tabsheet = new tabsheet(); $tabsheet->set_id('photo'); $tabsheet->select('openstreetmap'); $tabsheet->assign(); $template->set_filenames(array('plugin_admin_content' => dirname(__FILE__) . '/admin_photo.tpl')); include_once dirname(__FILE__) . '/../include/functions_map.php'; // Retrieving direct information about picture $query = "SELECT *,\nIF(i.representative_ext IS NULL,\n CONCAT(SUBSTRING_INDEX(TRIM(LEADING '.' FROM i.path), '.', 1 ), '-sq.', SUBSTRING_INDEX(TRIM(LEADING '.' FROM i.path), '.', -1 )),\n TRIM(LEADING '.' FROM\n REPLACE(i.path, TRIM(TRAILING '.' FROM SUBSTRING_INDEX(i.path, '/', -1 )),\n CONCAT('pwg_representative/',\n CONCAT(\n TRIM(TRAILING '.' FROM SUBSTRING_INDEX( SUBSTRING_INDEX(i.path, '/', -1 ) , '.', 1 )),\n CONCAT('-sq.', i.representative_ext)\n )\n )\n )\n )\n ) AS `pathurl` FROM " . IMAGES_TABLE . " AS i WHERE id = " . $_GET['image_id'] . ";"; $picture = pwg_db_fetch_assoc(pwg_query($query)); $lat = isset($picture['latitude']) ? $picture['latitude'] : 0; $lon = isset($picture['longitude']) ? $picture['longitude'] : 0; // Load parameter, fallback to default if unset $zoom = isset($conf['osm_conf']['right_panel']['zoom']) ? $conf['osm_conf']['right_panel']['zoom'] : '18'; $baselayer = isset($conf['osm_conf']['map']['baselayer']) ? $conf['osm_conf']['map']['baselayer'] : 'mapnik'; $custombaselayer = isset($conf['osm_conf']['map']['custombaselayer']) ? $conf['osm_conf']['map']['custombaselayer'] : ''; $custombaselayerurl = isset($conf['osm_conf']['map']['custombaselayerurl']) ? $conf['osm_conf']['map']['custombaselayerurl'] : '';
// | the Free Software Foundation | // | | // | This program is distributed in the hope that it will be useful, but | // | WITHOUT ANY WARRANTY; without even the implied warranty of | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | // | General Public License for more details. | // | | // | You should have received a copy of the GNU General Public License | // | along with this program; if not, write to the Free Software | // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | // | USA. | // +-----------------------------------------------------------------------+ if (!defined("PHPWG_ROOT_PATH")) { die("Hacking attempt!"); } include_once PHPWG_ROOT_PATH . 'admin/include/tabsheet.class.php'; $my_base_url = get_root_url() . 'admin.php?page=themes'; if (isset($_GET['tab'])) { $page['tab'] = $_GET['tab']; } else { $page['tab'] = 'installed'; } $tabsheet = new tabsheet(); $tabsheet->set_id('themes'); $tabsheet->select($page['tab']); $tabsheet->assign(); if ($page['tab'] == 'update') { include PHPWG_ROOT_PATH . 'admin/updates_ext.php'; } else { include PHPWG_ROOT_PATH . 'admin/themes_' . $page['tab'] . '.php'; }
// | General Public License for more details. | // | | // | You should have received a copy of the GNU General Public License | // | along with this program; if not, write to the Free Software | // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | // | USA. | // +-----------------------------------------------------------------------+ include_once PHPWG_ROOT_PATH . 'admin/include/functions.php'; include_once PHPWG_ROOT_PATH . 'admin/include/tabsheet.class.php'; // +-----------------------------------------------------------------------+ // | Check Access and exit when user status is not ok | // +-----------------------------------------------------------------------+ check_status(ACCESS_ADMINISTRATOR); $help_link = get_root_url() . 'admin.php?page=help§ion='; $selected = null; if (!isset($_GET['section'])) { $selected = 'add_photos'; } else { $selected = $_GET['section']; } $tabsheet = new tabsheet(); $tabsheet->set_id('help'); $tabsheet->select($selected); $tabsheet->assign(); trigger_notify('loc_end_help'); $template->set_filenames(array('help' => 'help.tpl')); $template->assign(array('HELP_CONTENT' => load_language('help/help_' . $tabsheet->selected . '.html', '', array('return' => true)), 'HELP_SECTION_TITLE' => $tabsheet->sheets[$tabsheet->selected]['caption'])); // +-----------------------------------------------------------------------+ // | sending html code | // +-----------------------------------------------------------------------+ $template->assign_var_from_handle('ADMIN_CONTENT', 'help');
$UAM_Illegal_Flag_Error3 = false; $UAM_Email_Mandatory_Check = false; $dump_download = ''; // Get admin panel theme // --------------------- $themeconf = $template->get_template_vars('themeconf'); $UAM_theme = $themeconf['id']; // +-----------------------------------------------------------------------+ // | Tabssheet | // +-----------------------------------------------------------------------+ if (!isset($_GET['tab'])) { $page['tab'] = 'global'; } else { $page['tab'] = $_GET['tab']; } $tabsheet = new tabsheet(); $tabsheet->add('global', l10n('UAM_Tab_Global'), $my_base_url . '&tab=global'); $tabsheet->add('userlist', l10n('UAM_Tracking registered users'), $my_base_url . '&tab=userlist'); $tabsheet->add('usermanager', l10n('UAM_Tracking confirmations'), $my_base_url . '&tab=usermanager'); $tabsheet->add('ghosttracker', l10n('UAM_Tab_GhostTracker'), $my_base_url . '&tab=ghosttracker'); $tabsheet->select($page['tab']); $tabsheet->assign(); // +-----------------------------------------------------------------------+ // | Getting plugin version | // +-----------------------------------------------------------------------+ $plugin = PluginInfos(UAM_PATH); $version = $plugin['version']; // +----------------------------------------------------------+ // | FCK Editor for email text fields | // +----------------------------------------------------------+ $toolbar = 'Basic';
<?php defined('OAUTH_PATH') or die('Hacking attempt!'); global $template, $page, $conf; if (!$conf['allow_user_registration']) { $page['warnings'][] = l10n('Users are not allowed to register on your gallery. Social Connect will not work correctly.'); } // get current tab $page['tab'] = isset($_GET['tab']) ? $_GET['tab'] : ($page['tab'] = 'providers'); // tabsheet include_once PHPWG_ROOT_PATH . 'admin/include/tabsheet.class.php'; $tabsheet = new tabsheet(); $tabsheet->set_id('oauth'); $tabsheet->add('providers', l10n('Providers'), OAUTH_ADMIN . '-providers'); $tabsheet->add('config', l10n('Configuration'), OAUTH_ADMIN . '-config'); $tabsheet->select($page['tab']); $tabsheet->assign(); // include page include OAUTH_PATH . 'admin/' . $page['tab'] . '.php'; // template vars $template->assign('OAUTH_PATH', get_root_url() . OAUTH_PATH); // send page content $template->assign_var_from_handle('ADMIN_CONTENT', 'oauth_content');
// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | // +-----------------------------------------------------------------------+ // | This program is free software; you can redistribute it and/or modify | // | it under the terms of the GNU General Public License as published by | // | the Free Software Foundation | // | | // | This program is distributed in the hope that it will be useful, but | // | WITHOUT ANY WARRANTY; without even the implied warranty of | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | // | General Public License for more details. | // | | // | You should have received a copy of the GNU General Public License | // | along with this program; if not, write to the Free Software | // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | // | USA. | // +-----------------------------------------------------------------------+ if (!defined("PHPWG_ROOT_PATH")) { die("Hacking attempt!"); } include_once PHPWG_ROOT_PATH . 'admin/include/tabsheet.class.php'; $my_base_url = get_root_url() . 'admin.php?page=updates'; if (isset($_GET['tab'])) { $page['tab'] = $_GET['tab']; } else { $page['tab'] = 'pwg'; } $tabsheet = new tabsheet(); $tabsheet->set_id('updates'); $tabsheet->select($page['tab']); $tabsheet->assign(); include PHPWG_ROOT_PATH . 'admin/updates_' . $page['tab'] . '.php';
// and $page['nb_images'] next elements if (!isset($_REQUEST['start']) or !is_numeric($_REQUEST['start']) or $_REQUEST['start'] < 0 or isset($_REQUEST['display']) and 'all' == $_REQUEST['display']) { $page['start'] = 0; } else { $page['start'] = $_REQUEST['start']; } // +-----------------------------------------------------------------------+ // | Tabs | // +-----------------------------------------------------------------------+ $manager_link = get_root_url() . 'admin.php?page=batch_manager&mode='; if (isset($_GET['mode'])) { $page['tab'] = $_GET['mode']; } else { $page['tab'] = 'global'; } $tabsheet = new tabsheet(); $tabsheet->set_id('batch_manager'); $tabsheet->select($page['tab']); $tabsheet->assign(); // +-----------------------------------------------------------------------+ // | dimensions | // +-----------------------------------------------------------------------+ $widths = array(); $heights = array(); $ratios = array(); $dimensions = array(); // get all width, height and ratios $query = ' SELECT DISTINCT width, height FROM ' . IMAGES_TABLE . '
} ini_set('error_reporting', E_ALL); ini_set('display_errors', true); include_once PHPWG_ROOT_PATH . 'admin/include/tabsheet.class.php'; include_once PHPWG_ROOT_PATH . '/include/constants.php'; $my_base_url = get_admin_plugin_menu_link(__FILE__); load_language('plugin.lang', REGPHPBB_PATH); // +-----------------------------------------------------------------------+ // | Tabssheet | // +-----------------------------------------------------------------------+ if (!isset($_GET['tab'])) { $page['tab'] = 'info'; } else { $page['tab'] = $_GET['tab']; } $tabsheet = new tabsheet(); $tabsheet->add('info', l10n('Tab_Info'), $my_base_url . '&tab=info'); $tabsheet->add('manage', l10n('Tab_Manage'), $my_base_url . '&tab=manage'); $tabsheet->add('Migration', l10n('Tab_Migration'), $my_base_url . '&tab=Migration'); $tabsheet->add('Synchro', l10n('Tab_Synchro'), $my_base_url . '&tab=Synchro'); $tabsheet->select($page['tab']); $tabsheet->assign(); $page['infos'] = array(); $error = array(); // +-----------------------------------------------------------------------+ // | Getting plugin version | // +-----------------------------------------------------------------------+ $plugin = RegPhpBB_Infos(REGPHPBB_PATH); $version = $plugin['version']; // +-----------------------------------------------------------------------+ // | Functions
// | the Free Software Foundation | // | | // | This program is distributed in the hope that it will be useful, but | // | WITHOUT ANY WARRANTY; without even the implied warranty of | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | // | General Public License for more details. | // | | // | You should have received a copy of the GNU General Public License | // | along with this program; if not, write to the Free Software | // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | // | USA. | // +-----------------------------------------------------------------------+ if (!defined("PHPWG_ROOT_PATH")) { die("Hacking attempt!"); } include_once PHPWG_ROOT_PATH . 'admin/include/tabsheet.class.php'; $my_base_url = get_root_url() . 'admin.php?page=plugins'; if (isset($_GET['tab'])) { $page['tab'] = $_GET['tab']; } else { $page['tab'] = 'installed'; } $tabsheet = new tabsheet(); $tabsheet->set_id('plugins'); $tabsheet->select($page['tab']); $tabsheet->assign(); if ($page['tab'] == 'update') { include PHPWG_ROOT_PATH . 'admin/updates_ext.php'; } else { include PHPWG_ROOT_PATH . 'admin/plugins_' . $page['tab'] . '.php'; }
<?php defined('URLUPLOADER_PATH') or die('Hacking attempt!'); global $template, $page, $conf; load_language('plugin.lang', URLUPLOADER_PATH); // +-----------------------------------------------------------------------+ // | URL Uploader tab | // +-----------------------------------------------------------------------+ define('PHOTOS_ADD_BASE_URL', get_root_url() . 'admin.php?page=photos_add'); include_once PHPWG_ROOT_PATH . 'admin/include/functions.php'; include_once PHPWG_ROOT_PATH . 'admin/include/tabsheet.class.php'; include_once PHPWG_ROOT_PATH . 'admin/include/functions_upload.inc.php'; $tabsheet = new tabsheet(); $tabsheet->set_id('photos_add'); $tabsheet->select('url_uploader'); $tabsheet->assign(); $page['active_menu'] = get_active_menu('photo'); // +-----------------------------------------------------------------------+ // | prepare form | // +-----------------------------------------------------------------------+ include PHPWG_ROOT_PATH . 'admin/include/photos_add_direct_prepare.inc.php'; $template->set_filename('urluploader_content', realpath(URLUPLOADER_PATH . 'template/photos_add.tpl')); // template vars $template->assign(array('URLUPLOADER_PATH' => get_root_url() . URLUPLOADER_PATH, 'URLUPLOADER_ADMIN' => URLUPLOADER_ADMIN)); // send page content $template->assign_var_from_handle('ADMIN_CONTENT', 'urluploader_content');
// | General Public License for more details. | // | | // | You should have received a copy of the GNU General Public License | // | along with this program; if not, write to the Free Software | // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | // | USA. | // +-----------------------------------------------------------------------+ /** * Add users and manage users list */ // +-----------------------------------------------------------------------+ // | tabs | // +-----------------------------------------------------------------------+ include_once PHPWG_ROOT_PATH . 'admin/include/tabsheet.class.php'; $my_base_url = get_root_url() . 'admin.php?page='; $tabsheet = new tabsheet(); $tabsheet->set_id('users'); $tabsheet->select('user_list'); $tabsheet->assign(); // +-----------------------------------------------------------------------+ // | groups list | // +-----------------------------------------------------------------------+ $groups = array(); $query = ' SELECT id, name FROM ' . GROUPS_TABLE . ' ORDER BY name ASC ;'; $result = pwg_query($query); while ($row = pwg_db_fetch_assoc($result)) { $groups[$row['id']] = $row['name'];
delete_user_comment($_POST['comments']); $page['infos'][] = l10n_dec('%d user comment rejected', '%d user comments rejected', count($_POST['comments'])); } } } // +-----------------------------------------------------------------------+ // | template init | // +-----------------------------------------------------------------------+ $template->set_filenames(array('comments' => 'comments.tpl')); $template->assign(array('F_ACTION' => get_root_url() . 'admin.php?page=comments')); // +-----------------------------------------------------------------------+ // | Tabs | // +-----------------------------------------------------------------------+ include_once PHPWG_ROOT_PATH . 'admin/include/tabsheet.class.php'; $my_base_url = get_root_url() . 'admin.php?page='; $tabsheet = new tabsheet(); $tabsheet->set_id('comments'); $tabsheet->select(''); $tabsheet->assign(); // +-----------------------------------------------------------------------+ // | comments display | // +-----------------------------------------------------------------------+ $nb_total = 0; $nb_pending = 0; $query = ' SELECT COUNT(*) AS counter, validated FROM ' . COMMENTS_TABLE . ' GROUP BY validated ;';
// theoretically, all categories in $_POST['cat_false'] contain at // least one element, so Piwigo can find a representant. set_random_representant($_POST['cat_false']); break; } } } // +-----------------------------------------------------------------------+ // | template init | // +-----------------------------------------------------------------------+ $template->set_filenames(array('cat_options' => 'cat_options.tpl', 'double_select' => 'double_select.tpl')); $page['section'] = isset($_GET['section']) ? $_GET['section'] : 'status'; $base_url = PHPWG_ROOT_PATH . 'admin.php?page=cat_options&section='; $template->assign(array('U_HELP' => get_root_url() . 'admin/popuphelp.php?page=cat_options', 'F_ACTION' => $base_url . $page['section'])); // TabSheet $tabsheet = new tabsheet(); $tabsheet->set_id('cat_options'); $tabsheet->select($page['section']); $tabsheet->assign(); // +-----------------------------------------------------------------------+ // | form display | // +-----------------------------------------------------------------------+ // for each section, categories in the multiselect field can be : // // - true : commentable for comment section // - false : un-commentable for comment section // - NA : (not applicable) for virtual categories // // for true and false status, we associates an array of category ids, // function display_select_categories will use the given CSS class for each // option
} include_once PHPWG_ROOT_PATH . 'admin/include/tabsheet.class.php'; include_once LOCALEDIT_PATH . 'include/functions.inc.php'; load_language('plugin.lang', LOCALEDIT_PATH); $my_base_url = get_root_url() . 'admin.php?page=plugin-' . basename(dirname(__FILE__)); // +-----------------------------------------------------------------------+ // | Tabssheet // +-----------------------------------------------------------------------+ if (empty($conf['LocalFilesEditor_tabs'])) { $conf['LocalFilesEditor_tabs'] = array('localconf', 'css', 'tpl', 'lang', 'plug'); } $page['tab'] = isset($_GET['tab']) ? $_GET['tab'] : $conf['LocalFilesEditor_tabs'][0]; if (!in_array($page['tab'], $conf['LocalFilesEditor_tabs'])) { die('Hacking attempt!'); } $tabsheet = new tabsheet(); foreach ($conf['LocalFilesEditor_tabs'] as $tab) { $tabsheet->add($tab, l10n('locfiledit_onglet_' . $tab), $my_base_url . '-' . $tab); } $tabsheet->select($page['tab']); $tabsheet->assign(); include_once LOCALEDIT_PATH . 'include/' . $page['tab'] . '.inc.php'; // +-----------------------------------------------------------------------+ // | Load backup file // +-----------------------------------------------------------------------+ if (isset($_POST['restore'])) { $content_file = file_get_contents(get_bak_file($edited_file)); $page['infos'][] = l10n('locfiledit_bak_loaded1'); $page['infos'][] = l10n('locfiledit_bak_loaded2'); } // +-----------------------------------------------------------------------+
// | | // | You should have received a copy of the GNU General Public License | // | along with this program; if not, write to the Free Software | // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | // | USA. | // +-----------------------------------------------------------------------+ if (!defined("PHPWG_ROOT_PATH")) { die("Hacking attempt!"); } include_once PHPWG_ROOT_PATH . 'admin/include/functions.php'; // +-----------------------------------------------------------------------+ // | tabs | // +-----------------------------------------------------------------------+ include_once PHPWG_ROOT_PATH . 'admin/include/tabsheet.class.php'; $my_base_url = get_root_url() . 'admin.php?page='; $tabsheet = new tabsheet(); $tabsheet->set_id('groups'); $tabsheet->select('group_list'); $tabsheet->assign(); // +-----------------------------------------------------------------------+ // | Check Access and exit when user status is not ok | // +-----------------------------------------------------------------------+ check_status(ACCESS_ADMINISTRATOR); if (!empty($_POST) or isset($_GET['delete']) or isset($_GET['toggle_is_default'])) { check_pwg_token(); } // +-----------------------------------------------------------------------+ // | add a group | // +-----------------------------------------------------------------------+ if (isset($_POST['submit_add'])) { if (empty($_POST['groupname'])) {
// Check access and exit when user status is not ok check_status(ACCESS_ADMINISTRATOR); // Setup plugin Language load_language('plugin.lang', VIDEOJS_PATH); // Fetch the template. global $template, $conf, $lang; include_once PHPWG_ROOT_PATH . 'admin/include/tabsheet.class.php'; // Add the template to the global template $template->set_filename('plugin_admin_content', dirname(__FILE__) . '/admin.tpl'); if (!isset($_GET['tab'])) { $page['tab'] = 'config'; } else { $page['tab'] = $_GET['tab']; } $my_base_url = get_admin_plugin_menu_link(__FILE__); $tabsheet = new tabsheet(); // Configuration Tab $tabsheet->add('config', l10n('Configuration'), add_url_params($my_base_url, array('tab' => 'config'))); // Disable sync if global setting say so, http://piwigo.org/forum/viewtopic.php?id=22376 if ($conf['enable_synchronization']) { $tabsheet->add('sync', l10n('Synchronize'), add_url_params($my_base_url, array('tab' => 'sync'))); } // Tab to handle external video like Vimeo or YouTube via videosjs-plugins // https://github.com/videojs/video.js/wiki/Plugins //$tabsheet->add( 'tech', l10n('Add video'), add_url_params( $my_base_url, array('tab'=>'tech') ) ); $tabsheet->select($page['tab']); $tabsheet->assign(); $my_base_url = $tabsheet->sheets[$page['tab']]['url']; $template->set_filename('tab_data', dirname(__FILE__) . '/admin_' . $page['tab'] . '.tpl'); include_once dirname(__FILE__) . '/admin_' . $page['tab'] . '.php'; $template->assign_var_from_handle('TAB_DATA', 'tab_data');
// | the Free Software Foundation | // | | // | This program is distributed in the hope that it will be useful, but | // | WITHOUT ANY WARRANTY; without even the implied warranty of | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | // | General Public License for more details. | // | | // | You should have received a copy of the GNU General Public License | // | along with this program; if not, write to the Free Software | // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | // | USA. | // +-----------------------------------------------------------------------+ if (!defined("PHPWG_ROOT_PATH")) { die("Hacking attempt!"); } include_once PHPWG_ROOT_PATH . 'admin/include/tabsheet.class.php'; $my_base_url = get_root_url() . 'admin.php?page=languages'; if (isset($_GET['tab'])) { $page['tab'] = $_GET['tab']; } else { $page['tab'] = 'installed'; } $tabsheet = new tabsheet(); $tabsheet->set_id('languages'); $tabsheet->select($page['tab']); $tabsheet->assign(); if ($page['tab'] == 'update') { include PHPWG_ROOT_PATH . 'admin/updates_ext.php'; } else { include PHPWG_ROOT_PATH . 'admin/languages_' . $page['tab'] . '.php'; }
if (!isset($fcke_config[$area])) { $fcke_config[$area] = false; } } $conf['FCKEditor'] = serialize($fcke_config); set_fckeditor_instance($areas, $toolbar, $width, $height); } // +-----------------------------------------------------------------------+ // | Tabssheet | // +-----------------------------------------------------------------------+ if (!isset($_GET['tab'])) { $page['tab'] = 'config'; } else { $page['tab'] = $_GET['tab']; } $tabsheet = new tabsheet(); $tabsheet->add('config', l10n('PP_config_tab'), $my_base_url . '&tab=config'); $tabsheet->add('userlist', l10n('PP_Users_List_Tab'), $my_base_url . '&tab=userlist'); $tabsheet->select($page['tab']); $tabsheet->assign(); // +-----------------------------------------------------------------------+ // | Tabssheet select | // +-----------------------------------------------------------------------+ switch ($page['tab']) { // ************************************************************************* // +-----------------------------------------------------------------------+ // | Config tab | // +-----------------------------------------------------------------------+ // ************************************************************************* case 'config': if (isset($_POST['submit']) and isset($_POST['PP_Password_Enforced']) and isset($_POST['PP_AdminPassword_Enforced']) and isset($_POST['PP_PwdReset']) and isset($_POST['PP_LogFailedPassw'])) {