// Root path to the phpdoc-all directory // -- cvs co phpdoc-all define('CVS_ROOT_PATH', '/cvs/phpdoc-all/'); // Require User Login by email (needed for user file saving) $requireLogin = false; // Language information // RTL direction is defined in $translations_RTL $translations = array('Arabic' => array('ar', 'utf-8'), 'Brazilian-PT' => array('pt_BR', 'iso-8859-1'), 'Bulgarian' => array('bg', 'utf-8'), 'Catalan' => array('ca', 'iso-8859-1'), 'Chinese-HK' => array('hk', 'big5'), 'Chinese-Simplified' => array('zh', 'gb2312'), 'Chinese-Traditional' => array('tw', 'big5'), 'Czech' => array('cs', 'iso-8859-2'), 'Danish' => array('da', 'iso-8859-1'), 'Dutch' => array('nl', 'iso-8859-1'), 'Finnish' => array('fi', 'iso-8859-1'), 'French' => array('fr', 'iso-8859-1'), 'German' => array('de', 'iso-8859-1'), 'Greek' => array('el', 'iso-8859-7'), 'Hebrew' => array('he', 'windows-1255'), 'Hungarian' => array('hu', 'iso-8859-2'), 'Indonesian' => array('id', 'iso-8859-1'), 'Italian' => array('it', 'iso-8859-1'), 'Japanese' => array('ja', 'utf-8'), 'Korean' => array('kr', 'utf-8'), 'Lithuanian' => array('lt', 'iso-8859-1'), 'Norwegian' => array('no', 'utf-8'), 'Polish' => array('pl', 'iso-8859-2'), 'Romanian' => array('ro', 'utf-8'), 'Russian' => array('ru', 'utf-8'), 'Serbian' => array('fa', 'utf-8'), 'Slovak' => array('sk', 'iso-8859-2'), 'Slovenian' => array('sl', 'iso-8859-1'), 'Spanish' => array('es', 'iso-8859-1'), 'Swedish' => array('sv', 'iso-8859-1'), 'Turkish' => array('tr', 'utf-8')); $translations_RTL = array('ar', 'he'); // Users folder where their cached files are saved - must be writable // Only needed if $requireLogin is true $usersCachePath = '/path/to/editor/users/'; // Files Permissions Mod $filesChMod = 0777; foreach ($translations as $language => $lang_info) { addLanguage($language, $lang_info[0], $lang_info[1]); } // Languages and paths: (ToDo Font should be defined for better display) // Hide files (ignore) $ignoreListingFolders = array('.', '..', 'CVS'); $ignoreListingFiles = array('contributors.xml', 'contributors.ent', 'livedocs.ent'); //------- Base functions function addLanguage($lang, $id, $charset = 'utf-8', $font = 'Fixedsys') { global $phpdocLangs, $translations_RTL; $lists = get_mailing_list_info($id); $phpdocLangs[$lang]['DocCVSPath'] = CVS_ROOT_PATH . $id; $phpdocLangs[$lang]['charset'] = $charset; $phpdocLangs[$lang]['direction'] = in_array($id, $translations_RTL) ? 'RTL' : 'LTR'; $phpdocLangs[$lang]['id'] = $id; $phpdocLangs[$lang]['coordinator'] = $lists['main'];
} if (empty($_POST["level"])) { $levelErr = "Level is required"; } else { $level = $_POST['level']; $levelErr = ""; /*if ($level<1 || $level>100) { $levelErr = "Level must be a value between 1 and 100"; }*/ } } if ($languageErr == "" && $levelErr == "") { if (languageExists($_SESSION["loggedIn"], $language)) { updateLanguage($_SESSION["loggedIn"], $level, $language); } else { addLanguage($_SESSION["loggedIn"], $level, $language); } echo "You have updated your " . $language . " level to be " . $level . "! <br>"; } ?> </div> </div> </div> <style> .error {color: #FF0000;} </style> </header> </div>
printOutput($relData, $outputXML, $page, $offset); break; // Search movie releases. // Search movie releases. case 'm': verifyEmptyParameter('q'); verifyEmptyParameter('imdbid'); $maxAge = maxAge(); $page->users->addApiRequest($uid, $_SERVER['REQUEST_URI']); $offset = offset(); $imdbId = isset($_GET['imdbid']) ? $_GET['imdbid'] : '-1'; $relData = $releases->searchbyImdbId($imdbId, $offset, limit(), isset($_GET['q']) ? $_GET['q'] : '', categoryID(), $maxAge); addCoverURL($relData, function ($release) { return Misc::getCoverURL(['type' => 'movies', 'id' => $release['imdbid']]); }); addLanguage($relData, $page->settings); printOutput($relData, $outputXML, $page, $offset); break; // Get NZB. // Get NZB. case 'g': if (!isset($_GET['id'])) { showApiError(200, 'Missing parameter (id is required for downloading an NZB)'); } $relData = $releases->getByGuid($_GET['id']); if ($relData) { header('Location:' . WWW_TOP . '/getnzb?i=' . $uid . '&r=' . $apiKey . '&id=' . $relData['guid'] . (isset($_GET['del']) && $_GET['del'] == '1' ? '&del=1' : '')); } else { showApiError(300, 'No such item (the guid you provided has no release in our database)'); } break;
<?php require_once 'include.php'; $act = $_REQUEST['act']; @($id = $_REQUEST['id']); @($id_guest = $_REQUEST['id_guest']); @($id_host = $_REQUEST['id_host']); @($album_id = $_REQUEST['album_id']); @($img_path = $_REQUEST['img_path']); if ($act == "register") { $mes = register(); } elseif ($act == "addInfo") { $mes = addInfo(); } elseif ($act == "addLanguage") { $mes = addLanguage(); } elseif ($act == "addAcco") { $mes = addAcco(); } elseif ($act == "addAllAcco") { $mes = addAllAcco(); } elseif ($act == "addLocation") { $mes = addLocation(); } elseif ($act == "addCalendar") { $mes = addCalendar(); } elseif ($act == "addFromDate") { $mes = addFromDate(); } elseif ($act == "addMinDays") { $mes = addMinDays(); } elseif ($act == "addPrice") { $mes = addPrice(); } elseif ($act == "addPhotos") { $mes = addPhotos();