static function on_index_thumbnails($thumbs) { global $page, $template; $total = count($page['items']); if (count($thumbs) >= $total) { add_event_handler('loc_end_index', array('RVTS', 'on_end_index')); return $thumbs; } $url_model = str_replace('123456789', '%start%', duplicate_index_url(array('start' => 123456789))); $ajax_url_model = add_url_params($url_model, array('rvts' => '%per%')); $url_model = str_replace('&', '&', $url_model); $ajax_url_model = str_replace('&', '&', $ajax_url_model); $my_base_name = basename(dirname(__FILE__)); $ajax_loader_image = get_root_url() . "plugins/{$my_base_name}/ajax-loader.gif"; $template->func_combine_script(array('id' => 'jquery', 'load' => 'footer', 'path' => 'themes/default/js/jquery.min.js')); $template->func_combine_script(array('id' => $my_base_name, 'load' => 'async', 'path' => 'plugins/' . $my_base_name . '/rv_tscroller.min.js', 'require' => 'jquery', 'version' => RVTS_VERSION)); $start = (int) $page['start']; $per_page = $page['nb_image_page']; $moreMsg = 'See the remaining %d photos'; if ('en' != $GLOBALS['lang_info']['code']) { load_language('lang', dirname(__FILE__) . '/'); $moreMsg = l10n($moreMsg); } // the String.fromCharCode comes from google bot which somehow manage to get these urls $template->block_footer_script(null, "var RVTS = {\najaxUrlModel: String.fromCharCode(" . ord($ajax_url_model[0]) . ")+'" . substr($ajax_url_model, 1) . "',\nstart: {$start},\nperPage: {$per_page},\nnext: " . ($start + $per_page) . ",\ntotal: {$total},\nurlModel: String.fromCharCode(" . ord($url_model[0]) . ")+'" . substr($url_model, 1) . "',\nmoreMsg: '{$moreMsg}',\nprevMsg: '" . l10n("Previous") . "',\najaxLoaderImage: '{$ajax_loader_image}'\n};\njQuery('.navigationBar').hide();"); return $thumbs; }
function NBMSInfos($dir) { $path = $dir; $plg_data = implode('', file($path . 'main.inc.php')); if (preg_match("|Plugin Name: (.*)|", $plg_data, $val)) { $plugin['name'] = trim($val[1]); } if (preg_match("|Version: (.*)|", $plg_data, $val)) { $plugin['version'] = trim($val[1]); } if (preg_match("|Plugin URI: (.*)|", $plg_data, $val)) { $plugin['uri'] = trim($val[1]); } if ($desc = load_language('description.txt', $path . '/', array('return' => true))) { $plugin['description'] = trim($desc); } elseif (preg_match("|Description: (.*)|", $plg_data, $val)) { $plugin['description'] = trim($val[1]); } if (preg_match("|Author: (.*)|", $plg_data, $val)) { $plugin['author'] = trim($val[1]); } if (preg_match("|Author URI: (.*)|", $plg_data, $val)) { $plugin['author uri'] = trim($val[1]); } if (!empty($plugin['uri']) and strpos($plugin['uri'], 'extension_view.php?eid=')) { list(, $extension) = explode('extension_view.php?eid=', $plugin['uri']); if (is_numeric($extension)) { $plugin['extension'] = $extension; } } // IMPORTANT SECURITY ! $plugin = array_map('htmlspecialchars', $plugin); return $plugin; }
function osm_apply_menu($menu_ref_arr) { global $template, $page, $conf; $menu =& $menu_ref_arr[0]; if (($block = $menu->get_block('mbLinks')) != null) { include_once dirname(__FILE__) . '/include/functions.php'; include_once dirname(__FILE__) . '/include/functions_map.php'; osm_load_language(); load_language('plugin.lang', OSM_PATH); // Comment are used only with this condition index.php l294 if ($page['start'] == 0 and !isset($page['chronology_field'])) { $js_data = osm_get_items($page); if ($js_data != array()) { $local_conf = array(); $local_conf['contextmenu'] = 'false'; $local_conf['control'] = true; $local_conf['img_popup'] = false; $local_conf['popup'] = 2; $local_conf['center_lat'] = 0; $local_conf['center_lng'] = 0; $local_conf['zoom'] = 2; $local_conf['autocenter'] = 1; $local_conf['divname'] = 'mapmenu'; $local_conf['paths'] = osm_get_gps($page); $height = isset($conf['osm_conf']['main_menu']['height']) ? $conf['osm_conf']['main_menu']['height'] : '200'; $js = osm_get_js($conf, $local_conf, $js_data); $template->set_template_dir(dirname(__FILE__) . '/template/'); $template->assign(array('OSM_PATH' => embellish_url(get_gallery_home_url() . OSM_PATH), 'OSMJS' => $js, 'HEIGHT' => $height)); $block->template = 'osm-menu.tpl'; } } } }
/** * plugin initialization */ function oauth_init() { global $conf, $page, $hybridauth_conf, $template; load_language('plugin.lang', OAUTH_PATH); $conf['oauth'] = safe_unserialize($conf['oauth']); // check config if (defined('IN_ADMIN')) { if (empty($hybridauth_conf) and strpos(@$_GET['page'], 'plugin-oAuth') === false) { $page['warnings'][] = '<a href="' . OAUTH_ADMIN . '">' . l10n('Social Connect: You need to configure the credentials') . '</a>'; } if (!function_exists('curl_init')) { $page['warnings'][] = l10n('Social Connect: PHP Curl extension is needed'); } } // in case of registration aborded if (script_basename() == 'index' and ($oauth_id = pwg_get_session_var('oauth_new_user')) !== null) { pwg_unset_session_var('oauth_new_user'); if ($oauth_id[0] == 'Persona') { oauth_assign_template_vars(get_gallery_home_url()); $template->block_footer_script(null, 'navigator.id.logout();'); } else { require_once OAUTH_PATH . 'include/hybridauth/Hybrid/Auth.php'; try { $hybridauth = new Hybrid_Auth($hybridauth_conf); $adapter = $hybridauth->getAdapter($oauth_id[0]); $adapter->logout(); } catch (Exception $e) { } } } }
function TAT_no_photo_yet() { global $template; load_language('plugin.lang', PHPWG_PLUGINS_PATH . 'TakeATour/'); $template->set_prefilter('no_photo_yet', 'TAT_no_photo_yet_prefilter'); $template->assign(array('F_ACTION' => get_root_url() . 'admin.php', 'pwg_token' => get_pwg_token())); }
function osm_load_language() { global $lang, $lang_info, $conf; if (isset($lang['Map']) or $lang_info['code'] == 'en' and !$conf['debug_l10n']) { return; } load_language('lang', dirname(__FILE__) . '/../'); }
/** * 构造函数 * * 负责根据用户的 session 设置载入语言文件 * * @return Controller_OfficeBase */ function Controller_ZobBase() { if (isset($_SESSION['LANG'])) { $lang = $_SESSION['LANG']; $languages = FLEA::getAppInf('languages'); if (in_array($lang, $languages, true)) { FLEA::setAppInf('defaultLanguage', $lang); } } load_language('ui, exception'); }
function tg_groups_display() { global $conf, $template, $user, $tags, $page; load_language('plugin.lang', PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/'); load_language('lang', PHPWG_ROOT_PATH . PWG_LOCAL_DIR, array('no_fallback' => true, 'local' => true)); $template->set_prefilter('tags', 'tg_add_display_link_prefilter'); $template->assign('U_TAG_GROUPS', get_root_url() . 'tags.php?display_mode=groups'); if ($page['tg_display']) { // echo __FILE__.'::'.__LINE__.' display_mode=groups<br>'; $template->set_prefilter('tags', 'tg_groups_display_prefilter'); $template->assign('display_mode', 'groups'); // we want tags diplayed in alphabetic order usort($tags, 'tag_alpha_compare'); $current_tag_group = null; $nb_tags = count($tags); $current_column = 1; $current_tag_idx = 0; $tag_group = array('tags' => array()); foreach ($tags as $tag) { // if the tag belongs to no group, we don't show it on the "tag by // group" display mode if (strpos($tag['name'], ':') === false) { continue; } else { list($tag['group'], $tag['name']) = explode(':', $tag['name'], 2); $tag['group'] = preg_replace('/^[^=]*=/', '', $tag['group']); } if ($current_tag_idx == 0) { $current_tag_group = $tag['group']; $tag_group['TITLE'] = $tag['group']; } // new group? if ($tag['group'] !== $current_tag_group) { if ($current_column < $conf['tag_letters_column_number'] and $current_tag_idx > $current_column * $nb_tags / $conf['tag_letters_column_number']) { $tag_group['CHANGE_COLUMN'] = true; $current_column++; } $tag_group['TITLE'] = $current_tag_group; $template->append('tag_groups', $tag_group); $current_tag_group = $tag['group']; $tag_group = array('tags' => array()); } array_push($tag_group['tags'], array_merge($tag, array('URL' => make_index_url(array('tags' => array($tag)))))); $current_tag_idx++; } // flush last group if (count($tag_group['tags']) > 0) { unset($tag_group['CHANGE_COLUMN']); $tag_group['TITLE'] = $current_tag_group; $template->append('tag_groups', $tag_group); } } }
function osm_render_category() { global $template, $page, $conf, $filter; include_once dirname(__FILE__) . '/include/functions.php'; include_once dirname(__FILE__) . '/include/functions_map.php'; osm_load_language(); load_language('plugin.lang', OSM_PATH); // TF, 20160102: pass config as parameter $js_data = osm_get_items($conf, $page); if ($js_data != array()) { $local_conf = array(); $local_conf['contextmenu'] = 'false'; $local_conf['control'] = true; $local_conf['img_popup'] = false; $local_conf['popup'] = 1; $local_conf['center_lat'] = 0; $local_conf['center_lng'] = 0; $local_conf['zoom'] = 2; $local_conf['auto_center'] = 1; // TF, 20160102: pass config as parameter $local_conf['paths'] = osm_get_gps($conf, $page); $height = isset($conf['osm_conf']['category_description']['height']) ? $conf['osm_conf']['category_description']['height'] : '200'; $width = isset($conf['osm_conf']['category_description']['width']) ? $conf['osm_conf']['category_description']['width'] : 'auto'; $js = osm_get_js($conf, $local_conf, $js_data); $template->set_filename('map', dirname(__FILE__) . '/template/osm-category.tpl'); $template->assign(array('CONTENT_ENCODING' => get_pwg_charset(), 'OSM_PATH' => embellish_url(get_gallery_home_url() . OSM_PATH), 'HOME' => make_index_url(), 'HOME_PREV' => isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : get_absolute_root_url(), 'HOME_NAME' => l10n("Home"), 'HOME_PREV_NAME' => l10n("Previous"), 'OSMJS' => $js, 'HEIGHT' => $height, 'WIDTH' => $width)); $osm_content = $template->parse('map', true); //$osm_content = '<div id="osmmap"><div class="map_title">'.l10n('EDIT_MAP').'</div>' . $osm_content . '</div>'; $index = isset($conf['osm_conf']['category_description']['index']) ? $conf['osm_conf']['category_description']['index'] : 0; // 0 - PLUGIN_INDEX_CONTENT_BEGIN // 1 - PLUGIN_INDEX_CONTENT_COMMENT // 2 - PLUGIN_INDEX_CONTENT_END if ($index <= 1) { // From index category comment at L300 if ($page['start'] == 0 and !isset($page['chronology_field'])) { if (empty($page['comment'])) { $page['comment'] = $osm_content; } else { if ($index == 0) { $page['comment'] = '<div>' . $osm_content . $page['comment'] . '</div>'; } else { $page['comment'] = '<div>' . $page['comment'] . $osm_content . '</div>'; } } } } else { $osm_content = '<div id="osmmap">' . $osm_content . '</div>'; $template->concat('PLUGIN_INDEX_CONTENT_END', "\n" . $osm_content); } } }
function upgrade_100_110() { global $conf; load_language('plugin.lang', PH_PATH); // Upgrading options - Changing config variables to assoc array // ------------------------------------------------------------ // Upgrade $conf_PH options $conf_PH = unserialize($conf['PruneHistory']); $Newconf_PH = array('PHVersion' => $conf_PH[0], 'AUTOPRUNE' => $conf_PH[1], 'RANGEVALUE' => $conf_PH[2], 'RANGE' => $conf_PH[3]); // unset obsolete conf // ------------------- for ($i = 0; $i <= 3; $i++) { unset($conf_PH[$i]); } $update_conf = serialize($Newconf_PH); conf_update_param('PruneHistory', pwg_db_real_escape_string($update_conf)); }
function osm_render_element_content() { global $template, $picture, $page, $conf; load_language('plugin.lang', OSM_PATH); if (empty($page['image_id'])) { return; } // Load coordinates from picture $query = 'SELECT latitude,longitude FROM ' . IMAGES_TABLE . ' WHERE id = \'' . $page['image_id'] . '\' ;'; //FIXME LIMIT 1 ? $result = pwg_query($query); $row = pwg_db_fetch_assoc($result); if (!$row or !$row['latitude'] or empty($row['latitude'])) { return; } $lat = $row['latitude']; $lon = $row['longitude']; // Load parameter, fallback to default if unset $height = isset($conf['osm_conf']['right_panel']['height']) ? $conf['osm_conf']['right_panel']['height'] : '200'; $zoom = isset($conf['osm_conf']['right_panel']['zoom']) ? $conf['osm_conf']['right_panel']['zoom'] : '12'; $osmname = isset($conf['osm_conf']['right_panel']['link']) ? $conf['osm_conf']['right_panel']['link'] : 'Location'; $osmnamecss = isset($conf['osm_conf']['right_panel']['linkcss']) ? $conf['osm_conf']['right_panel']['linkcss'] : ''; $showosm = isset($conf['osm_conf']['right_panel']['showosm']) ? $conf['osm_conf']['right_panel']['showosm'] : 'true'; if (strlen($osmnamecss) != 0) { $osmnamecss = "style='" . $osmnamecss . "'"; } $osmlink = "https://openstreetmap.org/?mlat=" . $lat . "&mlon=" . $lon . "&zoom=12&layers=M"; $local_conf = array(); $local_conf['contextmenu'] = 'false'; $local_conf['control'] = false; $local_conf['img_popup'] = false; $local_conf['popup'] = 2; $local_conf['center_lat'] = $lat; $local_conf['center_lng'] = $lon; $local_conf['zoom'] = $zoom; // TF, 20160102: pass config as parameter $js_data = osm_get_items($conf, $page); $js = osm_get_js($conf, $local_conf, $js_data); // Select the template $template->set_filenames(array('osm_content' => dirname(__FILE__) . "/template/osm-picture.tpl")); // Assign the template variables $template->assign(array('HEIGHT' => $height, 'OSMJS' => $js, 'OSM_PATH' => embellish_url(get_gallery_home_url() . OSM_PATH), 'OSMNAME' => $osmname, 'OSMNAMECSS' => $osmnamecss, 'SHOWOSM' => $showosm, 'OSMLINK' => $osmlink)); // Return the rendered html $osm_content = $template->parse('osm_content', true); return $osm_content; }
function NBMS_prefilter($content, &$smarty) { global $template, $lang; load_language('plugin.lang', NBMS_PATH); $search = '<p class="bottomButtons">'; $addon = ' <fieldset> <legend>{\'NBMS_Section\'|@translate}</legend> <ul> <li> <span class="property">{\'NBMS_Text\'|@translate}</span> {html_radios name=\'NBM_Subscription\' options=$radio_options selected=$NBMS} </li> </ul> </fieldset> '; $replacement = $addon . $search; return str_replace($search, $replacement, $content); }
/** * Function to update plugin version number in config table * Used everytime a new version is updated even if no database * upgrade is needed */ function PH_version_update() { global $conf; load_language('plugin.lang', PH_PATH); // Get current plugin version // -------------------------- $plugin = PHInfos(PH_PATH); $version = $plugin['version']; // Upgrading options // ----------------- $query = ' SELECT value FROM ' . CONFIG_TABLE . ' WHERE param = "PruneHistory" ;'; $result = pwg_query($query); $conf_PH = pwg_db_fetch_assoc($result); $Newconf_PH = unserialize($conf_PH['value']); $Newconf_PH['PHVersion'] = $version; $update_conf = serialize($Newconf_PH); conf_update_param('PruneHistory', pwg_db_real_escape_string($update_conf)); // Check #_plugin table consistency // Only useful if a previous version upgrade has not worked correctly (rare case) // ------------------------------------------------------------------------------ $query = ' SELECT version FROM ' . PLUGINS_TABLE . ' WHERE id = "PruneHistory" ;'; $data = pwg_db_fetch_assoc(pwg_query($query)); if (empty($data['version']) or $data['version'] != $version) { $query = ' UPDATE ' . PLUGINS_TABLE . ' SET version="' . $version . '" WHERE id = "PruneHistory" LIMIT 1 ;'; pwg_query($query); } }
function upgrade_240_250() { global $conf; load_language('plugin.lang', REGFLUXBB_PATH); $plugin = RegFluxBB_Infos(REGFLUXBB_PATH); $version = $plugin['version']; // Upgrading options - Changing config variables to assoc array // ------------------------------------------------------------ $conf_RegFluxBB = isset($conf['Register_FluxBB']) ? explode(";", $conf['Register_FluxBB']) : array(); $Newconf_RegFluxBB = array('REGFLUXBB_VERSION' => $version, 'FLUXBB_PREFIX' => $conf_RegFluxBB[0], 'FLUXBB_ADMIN' => $conf_RegFluxBB[1], 'FLUXBB_GUEST' => $conf_RegFluxBB[2], 'FLUXBB_DEL_PT' => $conf_RegFluxBB[3], 'FLUXBB_CONFIRM' => $conf_RegFluxBB[4], 'FLUXBB_DETAIL' => $conf_RegFluxBB[5], 'FLUXBB_UAM_LINK' => $conf_RegFluxBB[6], 'FLUXBB_GROUP' => $conf_RegFluxBB[7]); $update_conf = serialize($Newconf_RegFluxBB); $q = ' DELETE FROM ' . CONFIG_TABLE . ' WHERE param="Register_FluxBB" LIMIT 1 ;'; pwg_query($q); $q = ' INSERT INTO ' . CONFIG_TABLE . ' (param, value, comment) VALUES ("Register_FluxBB","' . pwg_db_real_escape_string($update_conf) . '","Register_FluxBB parameters") ;'; pwg_query($q); }
function modus_smarty_prefilter($source) { global $lang, $conf; $source = str_replace('<div id="imageHeaderBar">', '<div class=titrePage id=imageHeaderBar>', $source); $source = str_replace('<div id=imageHeaderBar>', '<div class=titrePage id=imageHeaderBar>', $source); if (!isset($lang['modus_theme'])) { load_language('theme.lang', dirname(__FILE__) . '/'); } // picture page actionButtons wrap for mobile if (strpos($source, '<div id="imageToolBar">') !== false || strpos($source, '<div id=imageToolBar>') !== false) { if (!($pos = strpos($source, '<div class="actionButtons">'))) { $pos = strpos($source, '<div class=actionButtons>'); } if ($pos !== false) { $source = substr_replace($source, '<div class=actionButtonsWrapper><a id=imageActionsSwitch class=pwg-button><span class="pwg-icon pwg-icon-ellipsis"></span></a>{combine_script version=1 id=\'modus.async\' path="themes/`$themeconf.id`/js/modus.async.js" load=\'async\'}', $pos, 0); $pos = strpos($source, 'caddie', $pos + 1); $pos = strpos($source, '</div>', $pos + 1); $source = substr_replace($source, '</div>', $pos, 0); } } /* move imageNumber from imageToolBar to imageHeaderBar*/ if (preg_match('#<div[ a-zA-Z"=]+id="?imageHeaderBar"?>#', $source, $matches, PREG_OFFSET_CAPTURE) && preg_match('#<div class="?imageNumber"?>{\\$PHOTO}</div>#', $source, $matches2, PREG_OFFSET_CAPTURE, $matches[0][1] + 20)) { $source = substr_replace($source, '', $matches2[0][1], strlen($matches2[0][0])); $source = substr_replace($source, $matches2[0][0], $matches[0][1] + strlen($matches[0][0]), 0); } if (($pos = strpos($source, '<ul class="categoryActions">')) !== false || ($pos = strpos($source, '<ul class=categoryActions>')) !== false) { if (($pos2 = strpos($source, '</ul>', $pos)) !== false && substr_count($source, '<li>', $pos, $pos2 - $pos) > 2) { $source = substr_replace($source, '<a id=albumActionsSwitcher class=pwg-button><span class="pwg-icon pwg-icon-ellipsis"></span></a>{combine_script version=1 id=\'modus.async\' path="themes/`$themeconf.id`/js/modus.async.js" load=\'async\'}', $pos, 0); } } $re = preg_quote('<img title="{$cat.icon_ts.TITLE}" src="', '/') . '[^>]+' . preg_quote('/recent{if $cat.icon_ts.IS_CHILD_DATE}_by_child{/if}.png"', '/') . '[^>]+' . preg_quote('alt="(!)">', '/'); $source = preg_replace('/' . $re . '/', '<span class=albSymbol title="{$cat.icon_ts.TITLE}">{if $cat.icon_ts.IS_CHILD_DATE}' . MODUS_STR_RECENT_CHILD . '{else}' . MODUS_STR_RECENT . '{/if}</span>', $source); $re = preg_quote('<img title="{$thumbnail.icon_ts.TITLE}" src="', '/') . '[^>]+' . preg_quote('/recent.png" alt="(!)">', '/'); $source = preg_replace('/' . $re . '/', '<span class=albSymbol title="{$thumbnail.icon_ts.TITLE}">' . MODUS_STR_RECENT . '</span>', $source); return $source; }
function language_controler_switch() { global $user; $same = $user['language']; if (isset($_GET['lang'])) { include_once PHPWG_ROOT_PATH . 'admin/include/languages.class.php'; $languages = new languages(); if (!in_array($_GET['lang'], array_keys($languages->fs_languages))) { $_GET['lang'] = PHPWG_DEFAULT_LANGUAGE; } if (!empty($_GET['lang']) and file_exists(PHPWG_ROOT_PATH . 'language/' . $_GET['lang'] . '/common.lang.php')) { if (is_a_guest() or is_generic()) { pwg_set_session_var('lang_switch', $_GET['lang']); } else { $query = ' UPDATE ' . USER_INFOS_TABLE . ' SET language = \'' . $_GET['lang'] . '\' WHERE user_id = ' . $user['id'] . ' ;'; pwg_query($query); } $user['language'] = $_GET['lang']; } } elseif (is_a_guest() or is_generic()) { $user['language'] = pwg_get_session_var('lang_switch', $user['language']); } // Reload language only if it isn't the same one if ($same !== $user['language']) { load_language('common.lang', '', array('language' => $user['language'])); load_language('lang', PHPWG_ROOT_PATH . PWG_LOCAL_DIR, array('language' => $user['language'], 'no_fallback' => true, 'local' => true)); if (defined('IN_ADMIN') and IN_ADMIN) { // Never currently load_language('admin.lang', '', array('language' => $user['language'])); } } }
<?php if (!defined("IN_BTIT")) { die("non direct access!"); } require load_language("lang_staff.php"); $stafftpl = new bTemplate(); $stafftpl->set("language", $language); if ($CURUSER["view_users"] == "no") { err_msg($language["ERROR"], $language["NOT_AUTHORIZED"] . " " . strtolower($language["STAFF"]) . "!"); stdfoot(); exit; } else { $query = "SELECT u.id, u.username, u.avatar, UNIX_TIMESTAMP(u.joined) joined, "; $query .= "UNIX_TIMESTAMP(u.lastconnect) lastconnect, ul.level, ul.prefixcolor, "; $query .= "ul.suffixcolor, c.name country, c.flagpic, o.lastaction "; $query .= "FROM {$TABLE_PREFIX}users u "; $query .= "LEFT JOIN {$TABLE_PREFIX}users_level ul ON u.id_level = ul.id "; $query .= "LEFT JOIN {$TABLE_PREFIX}countries c ON u.flag = c.id "; $query .= "LEFT JOIN {$TABLE_PREFIX}online o ON u.id = o.user_id "; $query .= "WHERE u.id_level >=6 "; $query .= "AND u.id_level <=8 "; $query .= "ORDER BY u.id_level DESC, u.id ASC"; $res = do_sqlquery($query); $i = 0; while ($row = mysql_fetch_assoc($res)) { is_null($row["avatar"]) || $row["avatar"] == "" ? $avatar = "<img src='{$STYLEURL}/images/default_avatar.gif' height=80 width=80>" : ($avatar = "<img src='" . $row["avatar"] . "' height=80 width=80>"); is_null($row["lastaction"]) ? $lastseen = $row["lastconnect"] : ($lastseen = $row["lastaction"]); time() - $lastseen > 900 ? $status = "<img src='images/offline.gif' border='0' alt='" . $language["OFFLINE"] . "'>" : ($status = "<img src='images/online.gif' border='0' alt='" . $language["ONLINE"] . "'>"); if (is_null($row["flagpic"])) { $row["flagpic"] = "unknown.gif";
} $res = get_result("SELECT size FROM {$TABLE_PREFIX}files WHERE info_hash='{$id}'", true); if ($res) { $row = $res[0]; if ($row) { $tsize = 0 + $row["size"]; } } else { die("Error ID"); } if ($XBTT_USE) { $res = get_result("SELECT x.uid,x.completed, x.downloaded, x.uploaded, x.left as bytes, IF(x.left=0,'seeder','leecher') as status, x.mtime as lastupdate, u.username, u.flag, c.flagpic, c.name FROM xbt_files_users x LEFT JOIN xbt_files ON x.fid=xbt_files.fid LEFT JOIN {$TABLE_PREFIX}files f ON f.bin_hash=xbt_files.info_hash LEFT JOIN {$TABLE_PREFIX}users u ON u.id=x.uid LEFT JOIN {$TABLE_PREFIX}countries c ON u.flag=c.id WHERE f.info_hash='{$id}' AND active=1 ORDER BY status DESC, lastupdate DESC", true, $btit_settings['cache_duration']); } else { $res = get_result("SELECT * FROM {$TABLE_PREFIX}peers p LEFT JOIN {$TABLE_PREFIX}countries c ON p.dns=c.domain WHERE infohash='{$id}' ORDER BY bytes ASC, status DESC, lastupdate DESC", true, $btit_settings['cache_duration']); } require load_language("lang_peers.php"); $peerstpl = new bTemplate(); $peerstpl->set("language", $language); $peerstpl->set("peers_script", "index.php"); if (count($res) == 0) { $peerstpl->set("NOPEERS", TRUE, TRUE); } else { $peerstpl->set("NOPEERS", FALSE, TRUE); foreach ($res as $id => $row) { // for user name instead of peer if ($XBTT_USE) { $resu = TRUE; } elseif ($PRIVATE_ANNOUNCE) { $resu = get_result("SELECT u.username,u.id,c.flagpic,c.name FROM {$TABLE_PREFIX}users u LEFT JOIN {$TABLE_PREFIX}countries c ON c.id=u.flag WHERE u.pid='" . $row["pid"] . "' LIMIT 1", true, $btit_settings['cache_duration']); } else { $resu = get_result("SELECT u.username,u.id,c.flagpic,c.name FROM {$TABLE_PREFIX}users u LEFT JOIN {$TABLE_PREFIX}countries c ON c.id=u.flag WHERE u.cip='" . $row["ip"] . "' LIMIT 1", true, $btit_settings['cache_duration']);
<?php // Need upgrade? global $conf; include PHPWG_THEMES_PATH . 'smartpocket/admin/upgrade.inc.php'; load_language('theme.lang', PHPWG_THEMES_PATH . 'smartpocket/'); $config_send = array(); if (isset($_POST['submit_smartpocket'])) { $config_send['loop'] = isset($_POST['loop']); $config_send['autohide'] = isset($_POST['autohide']) ? 5000 : 0; $conf['smartpocket'] = serialize($config_send); conf_update_param('smartpocket', pwg_db_real_escape_string($conf['smartpocket'])); array_push($page['infos'], l10n('Information data registered in database')); } $template->set_filenames(array('theme_admin_content' => dirname(__FILE__) . '/admin.tpl')); $template->assign('options', unserialize($conf['smartpocket'])); $template->assign_var_from_handle('ADMIN_CONTENT', 'theme_admin_content');
/ \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ ( U | - | 2 | 3 | 2 )-( S | o | u | r | c | e )-( C | o | d | e ) \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ */ if (!defined('IN_INSTALLER09_ADMIN')) { $HTMLOUT = ''; $HTMLOUT .= "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n\t\t\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\t\t<html xmlns='http://www.w3.org/1999/xhtml'>\n\t\t<head>\n\t\t<title>Error!</title>\n\t\t</head>\n\t\t<body>\n\t<div style='font-size:33px;color:white;background-color:red;text-align:center;'>Incorrect access<br />You cannot access this file directly.</div>\n\t</body></html>"; echo $HTMLOUT; exit; } require_once INCL_DIR . 'user_functions.php'; require_once INCL_DIR . 'html_functions.php'; require_once CLASS_DIR . 'class_check.php'; $class = get_access(basename($_SERVER['REQUEST_URI'])); class_check($class); $lang = array_merge($lang, load_language('ad_stats_extra')); $inbound = array_merge($_GET, $_POST); if (!isset($inbound['mode'])) { $inbound['mode'] = ''; } $form_code = ''; $month_names = array(1 => $lang['stats_ex_jan'], $lang['stats_ex_jan'], $lang['stats_ex_feb'], $lang['stats_ex_mar'], $lang['stats_ex_apr'], $lang['stats_ex_may'], $lang['stats_ex_jun'], $lang['stats_ex_jul'], $lang['stats_ex_sep'], $lang['stats_ex_oct'], $lang['stats_ex_nov'], $lang['stats_ex_dec']); switch ($inbound['mode']) { case 'show_reg': result_screen('reg'); break; case 'show_topic': result_screen('topic'); break; case 'topic': main_screen('topic');
<?php /* Theme Name: Simple Grey Version: 2.4.3 Description: Simple Grey Theme URI: http://piwigo.org/ext/extension_view.php?eid=308 Author: Saïmon Author URI: http://saimon.org/ */ $themeconf = array('parent' => 'default', 'load_parent_css' => false, 'load_parent_local_head' => false, 'name' => 'simple-grey', 'theme_dir' => 'simple', 'icon_dir' => 'themes/simple/icon', 'admin_icon_dir' => 'themes/default/icon/admin', 'mime_icon_dir' => 'themes/default/icon/mimetypes/', 'local_head' => 'local_head.tpl', 'url' => 'http://saimon.org/blog/pages/Theme-Simple-Grey-Piwigo'); global $user; $user['maxwidth'] = 720; load_language('theme.lang', PHPWG_THEMES_PATH . 'simple/'); // debug - do not combine files // $conf['template_combine_files'] = false;
( U | - | 2 | 3 | 2 )-( S | o | u | r | c | e )-( C | o | d | e ) \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ */ if (!defined('IN_INSTALLER09_ADMIN')) { $HTMLOUT = ''; $HTMLOUT .= "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n\t\t\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\t\t<html xmlns='http://www.w3.org/1999/xhtml'>\n\t\t<head>\n\t\t<title>Error!</title>\n\t\t</head>\n\t\t<body>\n\t<div style='font-size:33px;color:white;background-color:red;text-align:center;'>Incorrect access<br />You cannot access this file directly.</div>\n\t</body></html>"; echo $HTMLOUT; exit; } require_once INCL_DIR . 'user_functions.php'; require_once INCL_DIR . 'html_functions.php'; require_once INCL_DIR . 'pager_functions.php'; require_once CLASS_DIR . 'class_check.php'; $class = get_access(basename($_SERVER['REQUEST_URI'])); class_check($class); $lang = array_merge($lang, load_language('cheaters')); $HTMLOUT = ""; if (isset($_POST["nowarned"]) && $_POST["nowarned"] == "nowarned") { if (empty($_POST["desact"]) && empty($_POST["remove"])) { stderr($lang['cheaters_err'], $lang['cheaters_seluser']); } if (!empty($_POST["remove"])) { sql_query("DELETE FROM cheaters WHERE id IN (" . implode(", ", array_map("sqlesc", $_POST["remove"])) . ")") or sqlerr(__FILE__, __LINE__); } if (!empty($_POST["desact"])) { sql_query("UPDATE users SET enabled = 'no' WHERE id IN (" . implode(", ", array_map("sqlesc", $_POST["desact"])) . ")") or sqlerr(__FILE__, __LINE__); } } $HTMLOUT .= "<div class='row'><div class='col-md-12'>"; $HTMLOUT .= "<h2>{$lang['cheaters_users']}</h2>"; $res = sql_query("SELECT COUNT(*) FROM cheaters") or sqlerr(__FILE__, __LINE__);
| Licence Info: GPL | |--------------------------------------------------------------------------| | Copyright (C) 2010 U-232 V5 | |--------------------------------------------------------------------------| | A bittorrent tracker source based on TBDev.net/tbsource/bytemonsoon. | |--------------------------------------------------------------------------| | Project Leaders: Mindless, Autotron, whocares, Swizzles. | |--------------------------------------------------------------------------| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ ( U | - | 2 | 3 | 2 )-( S | o | u | r | c | e )-( C | o | d | e ) \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ */ require_once __DIR__ . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'bittorrent.php'; require_once INCL_DIR . 'user_functions.php'; $lang = array_merge(load_language('global'), load_language('confirmemail')); if (!isset($_GET['uid']) or !isset($_GET['key']) or !isset($_GET['email'])) { stderr("{$lang['confirmmail_user_error']}", "{$lang['confirmmail_idiot']}"); } if (!preg_match("/^(?:[\\d\\w]){32}\$/", $_GET['key'])) { stderr("{$lang['confirmmail_user_error']}", "{$lang['confirmmail_no_key']}"); } if (!preg_match("/^(?:\\d){1,}\$/", $_GET['uid'])) { stderr("{$lang['confirmmail_user-error']}", "{$lang['confirmmail_no_id']}"); } $id = intval($_GET['uid']); $md5 = $_GET['key']; $email = urldecode($_GET['email']); if (!validemail($email)) { stderr("{$lang['confirmmail_user_error']}", "{$lang['confirmmail_false_email']}"); }
<?php /** * @package OTA Hotel Management * @copyright e-Novate Pte Ltd 2012-2015 */ error_reporting(E_ALL | E_STRICT); include_once dirname(__FILE__) . "/../dailyfunc.php"; include_once dirname(__FILE__) . "/../PHPExcel/Classes/PHPExcel.php"; include_once dirname(__FILE__) . "/../PHPExcel/Classes/PHPExcel/Writer/Excel2007.php"; $lang = get_language(); load_language($lang); $logofile = Get_LogoFile(); date_default_timezone_set(TIMEZONE); // Get the current settings Get_HotelSettings($hotel, $altname, $company, $register, $ebridgeid, $tax1, $tax2, $phone, $fax, $IM, $street, $city, $citycode, $state, $postcode, $countrycode, $country, $logo, $latitude, $longitude, $language, $email, $web, $ota, $chaincode); ?> <table height="500" class="listing-table"> <tbody> <tr> <?php if (accessNew('reports') && $menu == 'shiftReport') { print_rightMenu_reports(); } elseif ($menu == 'myShift') { print_rightMenu_mySettings(); } ?> <td valign="top"> <?php if (is_ebridgeCustomer() && accessNew('reports') || is_ebridgeCustomer() && $menu == 'myShift') {
} } } } } } } } } } } } define('PHPWG_URL', 'http://' . PHPWG_DOMAIN); load_language('common.lang', '', array('language' => $language, 'target_charset' => 'utf-8')); load_language('admin.lang', '', array('language' => $language, 'target_charset' => 'utf-8')); load_language('install.lang', '', array('language' => $language, 'target_charset' => 'utf-8')); header('Content-Type: text/html; charset=UTF-8'); //------------------------------------------------- check php version if (version_compare(PHP_VERSION, REQUIRED_PHP_VERSION, '<')) { include PHPWG_ROOT_PATH . 'install/php5_apache_configuration.php'; } //----------------------------------------------------- template initialization $template = new Template(PHPWG_ROOT_PATH . 'admin/themes', 'clear'); $template->set_filenames(array('install' => 'install.tpl')); if (!isset($step)) { $step = 1; } //---------------------------------------------------------------- form analyze include PHPWG_ROOT_PATH . 'include/dblayer/functions_' . $dblayer . '.inc.php'; include PHPWG_ROOT_PATH . 'admin/include/functions_install.inc.php'; include PHPWG_ROOT_PATH . 'admin/include/functions_upgrade.php';
<?php /** * http://btdev.net:1337/svn/test/Installer09_Beta * Licence Info: GPL * Copyright (C) 2010 BTDev Installer v.1 * A bittorrent tracker source based on TBDev.net/tbsource/bytemonsoon. * Project Leaders: Mindless,putyn. **/ require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'bittorrent.php'; require_once INCL_DIR . 'user_functions.php'; dbconn(false); loggedinorreturn(); $lang = load_language('reputation'); define('TIMENOW', time()); // mod or not? $is_mod = $CURUSER['class'] >= UC_STAFF ? TRUE : FALSE; //$CURUSER['class'] = 2; //$rep_maxperday = 10; //$rep_repeat = 20; $closewindow = TRUE; require_once CACHE_DIR . 'rep_settings_cache.php'; //print_r($GVARS); if (!$GVARS['rep_is_online']) { exit($lang["info_reputation_offline"]); } /////////////////////////////////////////////// // Need only deal with one input value /////////////////////////////////////////////// if (isset($_POST) || isset($_GET)) { $input = array_merge($_GET, $_POST);
/ \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ ( U | - | 2 | 3 | 2 )-( S | o | u | r | c | e )-( C | o | d | e ) \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ */ if (!defined('IN_INSTALLER09_ADMIN')) { $HTMLOUT = ''; $HTMLOUT .= "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n\t\t\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\t\t<html xmlns='http://www.w3.org/1999/xhtml'>\n\t\t<head>\n\t\t<title>Error!</title>\n\t\t</head>\n\t\t<body>\n\t<div style='font-size:33px;color:white;background-color:red;text-align:center;'>Incorrect access<br />You cannot access this file directly.</div>\n\t</body></html>"; echo $HTMLOUT; exit; } require_once INCL_DIR . 'user_functions.php'; require_once CLASS_DIR . 'class_check.php'; require_once INCL_DIR . 'password_functions.php'; $class = get_access(basename($_SERVER['REQUEST_URI'])); class_check($class); $lang = array_merge($lang, load_language('ad_delacct')); //== Account delete function by Laffin function account_delete($userid) { $secs = 350 * 86400; $maxclass = UC_STAFF; $references = array("id" => array("users", "usersachiev"), "userid" => array("blackjack", "blocks", "bookmarks", "casino", "coins", "freeslots", "friends", "happyhour", "happylog", "ips", "peers", "pmboxes", "reputation", "shoutbox", "snatched", "uploadapp", "user_blocks", "ustatus", "userhits", "usercomments"), "uid" => array("xbt_files_users", "thankyou"), "user_id" => array("poll_voters", "posts", "topics", "subscriptions", "read_posts"), "friendid" => array("friends")); $ctr = 1; foreach ($references as $field => $tablelist) { foreach ($tablelist as $table) { $tables[] = $tc = "t{$ctr}"; $joins[] = $ctr == 1 ? "users as {$tc}" : "LEFT JOIN {$table} as {$tc} on t1.id={$tc}.{$field}"; $ctr++; } } return 'DELETE ' . implode(', ', $tables) . " FROM " . implode(' ', $joins) . " WHERE t1.id='{$userid}' AND t1.class < '{$maxclass}';";
<?php /** * http://btdev.net:1337/svn/test/Installer09_Beta * Licence Info: GPL * Copyright (C) 2010 BTDev Installer v.1 * A bittorrent tracker source based on TBDev.net/tbsource/bytemonsoon. * Project Leaders: Mindless,putyn. **/ require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'bittorrent.php'; require_once INCL_DIR . 'user_functions.php'; dbconn(); loggedinorreturn(); $lang = array_merge(load_language('global')); // / Mod by dokty - tbdev.net $id = 0 + $_GET["id"]; $points = 0 + $_GET["points"]; if (!is_valid_id($id) || !is_valid_id($points)) { die; } $pointscangive = array("10", "20", "50", "100", "200", "500", "1000"); if (!in_array($points, $pointscangive)) { stderr("Error", "You can't give that amount of points!!!"); } $sdsa = mysql_query("SELECT 1 FROM coins WHERE torrentid=" . sqlesc($id) . " AND userid =" . sqlesc($CURUSER["id"])) or die; $asdd = mysql_fetch_array($sdsa); if ($asdd) { stderr("Error", "You already gave points to this torrent."); } $res = mysql_query("SELECT owner,name FROM torrents WHERE id = " . sqlesc($id)) or die; $row = mysql_fetch_assoc($res) or stderr("Error", "Torrent was not found");
|--------------------------------------------------------------------------| | Project Leaders: Mindless,putyn. | |--------------------------------------------------------------------------| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ ( U | - | 2 | 3 | 2 )-( S | o | u | r | c | e )-( C | o | d | e ) \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ */ require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'bittorrent.php'; require_once INCL_DIR . 'user_functions.php'; require_once INCL_DIR . 'html_functions.php'; //require_once INCL_DIR . 'function_ircbot.php'; //== Updated casino.php by Bigjoos dbconn(false); loggedinorreturn(); $lang = array_merge(load_language('global'), load_language('casino')); //== Config $amnt = $nobits = $abcdefgh = 0; $dummy = ''; $player = UC_USER; $mb_basic = 1024 * 1024; $max_download_user = $mb_basic * 1024 * 1024; //= 255 Gb $max_download_global = $mb_basic * $mb_basic * 1; //== 10.0 Tb $required_ratio = 0.5; //== Min ratio $user_everytimewin_mb = $mb_basic * 20; //== Means users that wins under 70 mb get a cheat_value of 0 -> win every time $cheat_value = 8; //== Higher value -> less winner
/* +------------------------------------------------ | TBDev.net BitTorrent Tracker PHP | ============================================= | by CoLdFuSiOn | (c) 2003 - 2009 TBDev.Net | http://www.tbdev.net | ============================================= | svn: http://sourceforge.net/projects/tbdevnet/ | Licence Info: GPL +------------------------------------------------ | $Date$ | $Revision$ | $Author$ | $URL$ +------------------------------------------------ */ require "include/bittorrent.php"; require_once "include/user_functions.php"; require_once "include/html_functions.php"; require_once "include/emoticons.php"; dbconn(false); loggedinorreturn(); $lang = load_language('global'); $HTMLOUT = stdhead(); $HTMLOUT .= begin_main_frame(); $HTMLOUT .= insert_smilies_frame(); $HTMLOUT .= end_main_frame(); $HTMLOUT .= stdfoot(); print $HTMLOUT;