public function __construct(ExternalServerPool $externalServerPool, SearchKey $searchKey) { if ($searchKey->getOption()) { // Options are not supported. return; } $this->serverPool = $externalServerPool; $this->serverPoolArray =& $externalServerPool->toArray(); $this->scriptRequest = self::scriptRequest($searchKey); $localServer = new LocalServer(); $this->acceptServers = $localServer->acceptSuggestedServers(); if ($this->hasServer(0)) { $this->startNextQueries(); } }
public static function addUrl($url) { if (strlen($url) > 7) { mysql_query('insert into servers' . ' (name, url) values' . ' ("' . $url . '", "' . $url . '");'); } } public static function menuLinksUnknown($url) { return self::activateLink($url) . self::blacklistLink($url) . self::deleteLink($url); } public static function menuLinksBlack($url) { return self::activateLink($url) . self::deleteLink($url); } } $localServer = new LocalServer(); if (isset($_POST['local_name'])) { if ($localServer->isEmpty()) { $localServer->setUp($_POST['local_name']); AdminServers::resetDb(); } else { $localServer->update($_POST['local_name']); } AdminServers::reload(); } if (isset($_GET['drop'])) { mysql_query('drop table servers;'); Header('Location: admin.php'); exit; } if (!$localServer->isEmpty()) {
* 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, see <http://www.gnu.org/licenses/>. */ require_once 'books/SearchKey.php'; require_once 'net/Message.php'; require_once 'net/LocalServer.php'; require_once 'books/LocalSearchExportBookList.php'; $searchKey = new SearchKey(); if (!$searchKey->isGiven()) { exit; } $localServer = new LocalServer(); if (isset($_GET['from']) && $localServer->rememberNewServers()) { require_once 'net/ExternalServer.php'; $requestingServer = ExternalServer::newFromUrlString($_GET['from']); if ($requestingServer) { require_once 'mysql_conn.php'; $query = 'insert into servers (url, next_try) values (' . '"' . $requestingServer->getUrl() . '", ' . '"9999-12-31");'; mysql_query($query); } } $bookList = new LocalSearchExportBookList($searchKey); $message = new Message($localServer->name()); if ($bookList->size() > 0) { $message->setBooks($bookList->getList()); } else { require_once 'net/ExternalServerPool.php';
$countArr = mysql_fetch_row($result); if (!$countArr) { return 0; } return $countArr[0]; } require_once 'books/LocalBookList.php'; $numberOfBooks = LocalBookList::numberOfAllBooks(); require_once 'tools/Categories.php'; $categories = new Categories(); $numberOfCategories = sizeof($categories->getArray()); require_once 'notification/Searches.php'; $searches = new Searches(); $numberOfSearches = number_of_searches(); require_once 'net/LocalServer.php'; $serverName = new LocalServer(); $numberOfServers = number_of_servers(); /* * Optionen anbieten: * MySQL-Setup, Bücher betrachten, Kategorien verändern, Serveraustausch aktivieren, Mail verschicken. */ require 'header.php'; ?> <h2>uBook läuft</h2> <table align="center"> <tr><td>Buchangebote</td><td><?php echo $numberOfBooks; ?> </td><td><a href="admin_view.php">alle einsehen</a></td></tr> <tr><td>Kategorien</td><td><?php echo $numberOfCategories;