1.9k Aufrufe
Gefragt in Skripte(PHP,ASP,Perl...) von
Habt ihr vielleicht tipps, wie ich einen log in Bereich aus meinem Script bekomme. ICh hab mir ein Script herunter gelade, und möchte das gern ohne PW Abfrage also Log In haben.

Bitte hilft mir.

Eure Liselotte

5 Antworten

0 Punkte
Beantwortet von deluxestyle Mitglied (901 Punkte)
entferne einfach den Log In Bereich aus deinem Script...

Ernsthaft.
Welches Script hast du dir den runtergeladen.
Dann kann man dir evtl helfen

Aber so sind deine Infos etwas mager
0 Punkte
Beantwortet von
hier ist der code, der den log in beinhaltet
<?php
$gallerySetErrorHandler = false;
include(dirname(__FILE__) . '/bootstrap.inc');

if (!@$gallery->getConfig('setup.password')) {
/* May be invalid if a multisite install lost its config.php; galleryBaseUrl unknown */
header('Location: install/');
return;
}

if ($gallery->isEmbedded()) {
require_once(dirname(__FILE__) . '/init.inc');
} else {
/* If this is a request for a public data file, give it to the user immediately */
$unsanitizedView = isset($_GET[GALLERY_FORM_VARIABLE_PREFIX . 'view']) ?
$_GET[GALLERY_FORM_VARIABLE_PREFIX . 'view'] : null;
$itemId = (int)(isset($_GET[GALLERY_FORM_VARIABLE_PREFIX . 'itemId']) ?
$_GET[GALLERY_FORM_VARIABLE_PREFIX . 'itemId'] : null);
if ($unsanitizedView == 'core.DownloadItem' && !empty($itemId)) {
/*
* Our URLs are immutable because they have the serial numbers embedded. If the browser
* presents us with an If-Modified-Since then it has the latest version of the file already.
*/
if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])
|| (function_exists('getallheaders')
&& ($headers = getallheaders())
&& (isset($headers['If-Modified-Since'])
|| isset($headers['If-modified-since'])))) {
header('HTTP/1.0 304 Not Modified');
return;
}

/*
* Fast download depends on having data.gallery.cache set, so set it now. If for some
* reason we fail, we'll reset it in init.inc (but that's OK).
*/
$gallery->setConfig(
'data.gallery.cache', $gallery->getConfig('data.gallery.base') . 'cache/');

$path = GalleryDataCache::getCachePath(
array('type' => 'fast-download', 'itemId' => $itemId));
/* We don't have a platform yet so we have to use the raw file_exists */
/* Disable fast-download in maintenance mode, admins still get via core.DownloadItem */
if (file_exists($path) && !$gallery->getConfig('mode.maintenance')) {
include($path);
if (GalleryFastDownload()) {
return;
}
}
}

/* Otherwise, proceed with our regular process */
require_once(dirname(__FILE__) . '/init.inc');
$ret = GalleryInitFirstPass();
if ($ret) {
_GalleryMain_errorHandler($ret, null);
return;
}

/* Process the request */
GalleryMain();
}

if (!empty($gallerySetErrorHandler)) {
restore_error_handler();
$gallerySetErrorHandler = false;
}

/**
* Main handler for all Gallery pages/requests.
* @return array
*/
function GalleryMain($embedded=false) {
global $gallery;

/* Process the request */
list ($ret, $g2Data) = _GalleryMain($embedded);
if ($ret) {
_GalleryMain_errorHandler($ret, $g2Data);

/**
* @todo security question: should we be resetting the auth code (below) even if the
* storage is not initialized here?
*/
if ($gallery->isStorageInitialized()) {
/* Nuke our transaction, too */
$storage =& $gallery->getStorage();
$storage->rollbackTransaction();

if ($ret->getErrorCode() & ERROR_REQUEST_FORGED) {
/*
* The auth token was automatically reset as a side-effect when we determined that
* this request was forged, so save the session now.
*/
$session =& $gallery->getSession();
$ret2 = $session->save(true);
if ($ret2) {
GalleryCoreApi::addEventLogEntry(
'Gallery Error', 'Unable to reset the auth token', $ret2->getAsText());
}
}
}
} else {
$gallery->performShutdownActions();

/* Write out our session data */
$session =& $gallery->getSession();
$ret = $session->save();
}

} usw.
?>

ich glaub das ist alles was du brauchst, ja?.. ich kenn mich leider nicht so gut aus.
lg liselotte
0 Punkte
Beantwortet von deluxestyle Mitglied (901 Punkte)
nein, das ist sicherlich nicht alles
um welches Script handelt es sich, besser gesagt, um welche Webanwendung
0 Punkte
Beantwortet von
ich hab ein galleriescript herunter geladen, . ich würde dir gerne den Ordner schicken aber das kann ich hier leider nciht. ich such gerade die adresse heraus um sie dir zu schicken. Irgendwie comm... oder so. eine sehr bekannte Seite. Ich sitz grad auf der Leitung und mir fällts nicht ein :( ..
lg
0 Punkte
...