if (trim($profile) == "") { $failureMsg = "El nombre del perfil no puede quedar vacio"; $logAction .= "Failed adding (possible empty user/pass) new user [{$profile}] on page: "; } else { addedit($speedown, $attributes['WISPr-Bandwidth-Max-Down'], 'WISPr-Bandwidth-Max-Down', 'CONFIG_DB_TBL_RADGROUPREPLY'); addedit($downDaily, $attributes['CS-Input-Octets-Daily'], 'CS-Input-Octets-Daily', 'CONFIG_DB_TBL_RADGROUPCHECK'); addedit($downWeekly, $attributes['CS-Input-Octets-Weekly'], 'CS-Input-Octets-Weekly', 'CONFIG_DB_TBL_RADGROUPCHECK'); addedit($downMontly, $attributes['CS-Input-Octets-Monthly'], 'CS-Input-Octets-Monthly', 'CONFIG_DB_TBL_RADGROUPCHECK'); addedit($downAll, $attributes['CS-Input-Octet'], 'CS-Input-Octet', 'CONFIG_DB_TBL_RADGROUPCHECK'); addedit($timeDaily, $attributes['Max-Daily-Session'], 'Max-Daily-Session', 'CONFIG_DB_TBL_RADGROUPCHECK'); addedit($timeWeekly, $attributes['Max-Weekly-Session'], 'Max-Weekly-Session', 'CONFIG_DB_TBL_RADGROUPCHECK'); addedit($timeMontly, $attributes['Max-Monthly-Session'], 'Max-Monthly-Session', 'CONFIG_DB_TBL_RADGROUPCHECK'); addedit($timeAll, $attributes['Max-All-Session'], 'Max-All-Session', 'CONFIG_DB_TBL_RADGROUPCHECK'); addedit($expiration, $attributes['Expiration'], 'Expiration', 'CONFIG_DB_TBL_RADGROUPCHECK'); addedit($sessiontimeout, $attributes['Session-Timeout'], 'Session-Timeout', 'CONFIG_DB_TBL_RADGROUPREPLY'); addedit($simultaneoususe, $attributes['Simultaneous-Use'], 'Simultaneous-Use', 'CONFIG_DB_TBL_RADGROUPCHECK'); $successMsg = "Se ha agregado el perfil: <b> {$profile} </b>"; $logAction .= "Successfully added new profile [{$profile}] on page: "; } } include_once 'library/config_read.php'; $log = "visited page: "; $profile = $_GET['profile']; $sql = "SELECT Attribute, Value FROM " . $configValues['CONFIG_DB_TBL_RADGROUPREPLY'] . " WHERE GroupName='" . $dbSocket->escapeSimple($profile) . "'\n UNION SELECT Attribute, Value FROM " . $configValues['CONFIG_DB_TBL_RADGROUPCHECK'] . " WHERE GroupName='" . $dbSocket->escapeSimple($profile) . "'"; $res = $dbSocket->query($sql); while ($row = $res->fetchRow()) { $attributes[$row[0]] = $row[1]; } include 'library/closedb.php'; function timefactor($value, $tipo) {
for ($page = 1; $page < $rated['total_pages'] + 1; $page++) { $rated = $tmdb->getAccountRatedMovies($_SESSION['tmdb_id'], $_SESSION['tmdb_session_id'], $page); for ($i = 0; $i < count($rated['results']); $i++) { $ratedArr[] = $rated["results"][$i]['id']; } } } else { for ($i = 0; $i < count($rated['results']); $i++) { $ratedArr[] = $rated["results"][$i]['id']; } } foreach ($ratedArr as $r) { addedit($tmdb, $r, 'rated'); } } elseif ($_GET["action"] == 'importsingle') { $b = addedit($tmdb, intval($_GET['tmdb_id']), 'watchlist'); ?> <script>location.href = '<?php echo SUBDIR; echo $b['url']; ?> ';</script> <?php } elseif ($_GET["action"] == 'importgenres') { ob_end_flush(); $genres = $tmdb->getGenres(); foreach ($genres["genres"] as $g) { addeditgenre($tmdb, $g); } echo "<a href='import.php' class='btn'>Ready, go back</a>"; }