Navigacija

Vartotojų tinkle

Prisijungusių svečių: 482
Prisijungusių narių: 0
Prisijungusių narių nėra

Registruoti nariai: 25,956
Naujausias narys: saulyzas

Naujausi straipsniai

Paskutiniai nariai

MaFetas 1 savaitė
ozzWANTED 3 savaitės
saulyzas 5 savaitės
TOMIJUS 6 savaitės
Reikalas15 savaitės
Jaunelis21 savaitės
lanis21 savaitės
And2s22 savaitės
Memento Mori27 savaitės
Quwqkibor30 savaitės
asirija33 savaitės
tomeem35 savaitės
weberiz39 savaitės
mRokass41 savaitės
kartoonas42 savaitės
grunskiz45 savaitės
Bruksnys45 savaitės
illusion46 savaitės
ordo47 savaitės
Jurgaila47 savaitės

Informacija:


OS: Unknown
Naršyklė: Nežinoma
IP: 3.149.254.229
Naujienų: 529
Straipsnių: 235
Temų: 52,588
Postų: 522,537
Postų pask. parą: 0
Shout'ų pask. parą: 0
P.S.C. pask. parą: 0
Nuorodų kataloge: 13

Lankomumo Statistika

Peržiūrų šiandien: 22

Iš viso peržiūrų: 22948724

Prisijungti

REGISTRUOTIS
Nario vardas

Slaptažodis



Pamiršai slaptažodį?
Paprašyk naujo

Aktyvuoti save

Šaukykla

Jei norite rašyti žinutes, turite prisijungti.

ozzWANTED
2024 Lap. 30 15:11:14
Taip, vis dar up šypsosi

MaFetas
2024 Lap. 13 22:11:57
hey how, geras dar veikiantis saitas?

Jaunelis
2024 Lie. 25 11:07:43
Oho vis dar veikia svetainė akinanti šypsen Šimtas metų, matau Šaukykloje nuostalgija. Smagu panaršyt po forumą ir pažiūrėt senas temas šypsosi

And2s
2024 Lie. 17 19:07:04
2008 pirmą kart čia patekau, man buvo 10m ir čia pramokau programavimo.. smagu skaityti senas žinutes, tokia nostalgija akinanti šypsen ačiū Ozz kad saugoji šitą kultūrinį reliktą šypsosi

ozzWANTED
2024 Sau. 17 01:01:00
Desperatiškus komentarus šaukykloje su accountu po mėnesio prasibuvimo, ištryniau. Pasaulis ir taip juodas. Įjungiam šviesą, prašviesės. šypsosi

Šaukyklos archyvas

Apklausa

Ar esate patenkinti lietuviško vertimo kokybe?

Taip!

Taip, bet yra ką taisyti (parašysiu komentaruose)

Ne

Norėdamas balsuoti turite prisijungti.
Archyvas
Reklama 400x60
PHP: Notice: Use of undefined constant
Forumas | PHP-Fusion, WordPress, Shopify, PHP ir MySQL (PROGRAMAVIMAS) | Kiti PHP, HTML, MySQL klausimai

Autorius: zabello Peržiūrų: 3009      Spausdinti temą
2009 Spa. 26 12:10:44          1 žinutė iš 9
Spausdinti pranešimą
kas blogai prasau padekit

Notice: Use of undefined constant baseurl - assumed 'baseurl' in /opt/lampp/htdocs/audioshare/include/config.php on line 16

Notice: Use of undefined constant baseurl - assumed 'baseurl' in /opt/lampp/htdocs/audioshare/include/config.php on line 17

Notice: Use of undefined constant basedir - assumed 'basedir' in /opt/lampp/htdocs/audioshare/include/config.php on line 20

Notice: Use of undefined constant baseurl - assumed 'baseurl' in /opt/lampp/htdocs/audioshare/include/config.php on line 21

Notice: Use of undefined constant imagedir - assumed 'imagedir' in /opt/lampp/htdocs/audioshare/include/config.php on line 22

Notice: Use of undefined constant imageurl - assumed 'imageurl' in /opt/lampp/htdocs/audioshare/include/config.php on line 23

Notice: Use of undefined constant imagedir - assumed 'imagedir' in /opt/lampp/htdocs/audioshare/include/config.php on line 24

Notice: Use of undefined constant imageurl - assumed 'imageurl' in /opt/lampp/htdocs/audioshare/include/config.php on line 25

Notice: Use of undefined constant imagedir - assumed 'imagedir' in /opt/lampp/htdocs/audioshare/include/config.php on line 26

Notice: Use of undefined constant imageurl - assumed 'imageurl' in /opt/lampp/htdocs/audioshare/include/config.php on line 27

Notice: Use of undefined constant imagedir - assumed 'imagedir' in /opt/lampp/htdocs/audioshare/include/config.php on line 28

Notice: Use of undefined constant imageurl - assumed 'imageurl' in /opt/lampp/htdocs/audioshare/include/config.php on line 29

Notice: Use of undefined constant basedir - assumed 'basedir' in /opt/lampp/htdocs/audioshare/include/config.php on line 30

Notice: Use of undefined constant baseurl - assumed 'baseurl' in /opt/lampp/htdocs/audioshare/include/config.php on line 31

Notice: Use of undefined constant imageurl - assumed 'imageurl' in /opt/lampp/htdocs/audioshare/include/config.php on line 34

Notice: Use of undefined constant basedir - assumed 'basedir' in /opt/lampp/htdocs/audioshare/include/config.php on line 35

Notice: Use of undefined constant baseurl - assumed 'baseurl' in /opt/lampp/htdocs/audioshare/include/config.php on line 36

Notice: Use of undefined constant imagedir - assumed 'imagedir' in /opt/lampp/htdocs/audioshare/include/config.php on line 37

Notice: Use of undefined constant imageurl - assumed 'imageurl' in /opt/lampp/htdocs/audioshare/include/config.php on line 38

Notice: Use of undefined constant imageurl - assumed 'imageurl' in /opt/lampp/htdocs/audioshare/include/config.php on line 39

Notice: Use of undefined constant basedir - assumed 'basedir' in /opt/lampp/htdocs/audioshare/include/config.php on line 40

Notice: Use of undefined constant baseurl - assumed 'baseurl' in /opt/lampp/htdocs/audioshare/include/config.php on line 41

Notice: Use of undefined constant basedir - assumed 'basedir' in /opt/lampp/htdocs/audioshare/include/config.php on line 42

Notice: Use of undefined constant baseurl - assumed 'baseurl' in /opt/lampp/htdocs/audioshare/include/config.php on line 43

Notice: Use of undefined constant imagedir - assumed 'imagedir' in /opt/lampp/htdocs/audioshare/include/config.php on line 44

Notice: Use of undefined constant imageurl - assumed 'imageurl' in /opt/lampp/htdocs/audioshare/include/config.php on line 45

Notice: Use of undefined constant basedir - assumed 'basedir' in /opt/lampp/htdocs/audioshare/include/config.php on line 46

Notice: Use of undefined constant baseurl - assumed 'baseurl' in /opt/lampp/htdocs/audioshare/include/config.php on line 47

Notice: Use of undefined constant basedir - assumed 'basedir' in /opt/lampp/htdocs/audioshare/include/config.php on line 48

Notice: Use of undefined constant baseurl - assumed 'baseurl' in /opt/lampp/htdocs/audioshare/include/config.php on line 49

Notice: Use of undefined constant imagedir - assumed 'imagedir' in /opt/lampp/htdocs/audioshare/include/config.php on line 50

Notice: Use of undefined constant imageurl - assumed 'imageurl' in /opt/lampp/htdocs/audioshare/include/config.php on line 51

Notice: Use of undefined constant basedir - assumed 'basedir' in /opt/lampp/htdocs/audioshare/include/config.php on line 53




config.php
<?
session_start();
$config = array();

// Begin Configuration
$config['basedir']     =  '/opt/lampp/htdocs';
$config['baseurl']     =  'http://78.60.19.212/audioshare/';

$DBTYPE = 'mysql';
$DBHOST = 'localhost';
$DBUSER = 'database_username';
$DBPASSWORD = 'database_password';
$DBNAME = 'database_name';
// End Configuration

$config['adminurl']      =  $config[baseurl].'/administrator';
$config['cssurl']      =  $config[baseurl].'/css';
$config['tmpimgpath']     =   $config['basedir'].'/uploads/temp';
$config['tmpimgpath2']     =   $config['basedir'].'/uploads/temp';
$config['imagedir']      =  $config[basedir].'/images';
$config['imageurl']      =  $config[baseurl].'/images';
$config['avatardir']      =  $config[imagedir].'/avatars';
$config['avatarurl']      =  $config[imageurl].'/avatars';
$config['cavatardir']      =  $config[imagedir].'/members';
$config['cavatarurl']      =  $config[imageurl].'/members';
$config['membersprofilepicdir']      =  $config[imagedir].'/membersprofilepic';
$config['membersprofilepicurl']      =  $config[imageurl].'/membersprofilepic';
$config['channeldir']      =  $config[imagedir].'/channels';
$config['channelurl']      =  $config[imageurl].'/channels';
$config['originalvdir']      =  $config[basedir].'/uploads/video';
$config['originalvurl']      =  $config[baseurl].'/uploads/video';
$config['profilebgdir']      =  '/profilebg/';
$config['channelbgdir']      =  '/channelbg/';
$config['channelbgurl']      =  $config[imageurl].'/channelbg';
$config['videodir']      =  $config[basedir].'/vdata';
$config['videourl']      =  $config[baseurl].'/vdata';
$config['thumbdir']      =  $config[imagedir].'/videothumbs';
$config['thumburl']      =  $config[imageurl].'/videothumbs';
$config['cthumburl']      =  $config[imageurl].'/channels';
$config['originaladir']      =  $config[basedir].'/uploads/audio';
$config['originalaurl']      =  $config[baseurl].'/uploads/audio';
$config['audiodir']      =  $config[basedir].'/adata';
$config['audiourl']      =  $config[baseurl].'/adata';
$config['athumbdir']      =  $config[imagedir].'/audiothumbs';
$config['athumburl']      =  $config[imageurl].'/audiothumbs';
$config['originalpdir']      =  $config[basedir].'/uploads/picture';
$config['originalpurl']      =  $config[baseurl].'/uploads/picture';
$config['picturedir']      =  $config[basedir].'/pdata';
$config['pictureurl']      =  $config[baseurl].'/pdata';
$config['pthumbdir']      =  $config[imagedir].'/picturethumbs';
$config['pthumburl']      =  $config[imageurl].'/picturethumbs';

require_once($config[basedir].'/smarty/libs/Smarty.class.php');
require_once($config[basedir].'/libraries/mysmarty.class.php');
require_once($config[basedir].'/libraries/SConfig.php');
require_once($config[basedir].'/libraries/SError.php');
require_once($config[basedir].'/libraries/adodb/adodb.inc.php');
require_once($config[basedir].'/libraries/phpmailer/class.phpmailer.php');
require_once($config[basedir].'/libraries/SEmail.php');

function strip_mq_gpc($arg)
{
  if (get_magic_quotes_gpc())
  {
     $arg = str_replace('"',"'",$arg);
     $arg = stripslashes($arg);
    return $arg;
  }
  else
  {
    $arg = str_replace('"',"'",$arg);
    return $arg;
  }
}

$conn = &ADONewConnection($DBTYPE);
$conn->PConnect($DBHOST, $DBUSER, $DBPASSWORD, $DBNAME);
@mysql_query("SET NAMES 'UTF8'");
$sql = "SELECT * from config";
$rsc = $conn->Execute($sql);

if($rsc){while(!$rsc->EOF)
{
$field = $rsc->fields['setting'];
$config[$field] = $rsc->fields['value'];
STemplate::assign($field, strip_mq_gpc($config[$field]));
@$rsc->MoveNext();
}}


if ($_REQUEST['language'] != "")
{
   if ($_REQUEST['language'] == "english")
   {
      SESSION_REGISTER("language");
      $_SESSION[language] = "english";
   }
   elseif ($_REQUEST['language'] == "spanish")
   {
      SESSION_REGISTER("language");
      $_SESSION[language] = "spanish";
   }
}

if ($_SESSION['language'] == "")
{
   SESSION_REGISTER("language");
   $_SESSION[language] = "english";
}

if ($_SESSION['language'] == "english")
{
include("lang/english.php");
}
elseif ($_SESSION['language'] == "spanish")
{
include("lang/spanish.php");
}
else
{
include("lang/english.php");
}

for ($i=0; $i<count($lang); $i++)
{
   STemplate::assign('lang'.$i, $lang[$i]);
}

for ($i=0; $i<count($langev); $i++)
{
   STemplate::assign('langev'.$i, $langev[$i]);
}

STemplate::assign('baseurl',       $config['baseurl']);
STemplate::assign('basedir',       $config['basedir']);
STemplate::assign('adminurl',       $config['adminurl']);
STemplate::assign('cssurl',       $config['cssurl']);
STemplate::assign('tmpimgpath',       $config['tmpimgpath']);
STemplate::assign('tmpimgpath2',       $config['tmpimgpath2']);
STemplate::assign('imagedir',        $config['imagedir']);
STemplate::assign('imageurl',        $config['imageurl']);
STemplate::assign('imgpath',        $config['imgpath']);
STemplate::assign('avatardir',        $config['avatardir']);
STemplate::assign('avatarurl',        $config['avatarurl']);
STemplate::assign('cavatardir',        $config['cavatardir']);
STemplate::assign('cavatarurl',        $config['cavatarurl']);
STemplate::assign('membersprofilepicdir',        $config['membersprofilepicdir']);
STemplate::assign('membersprofilepicurl',        $config['membersprofilepicurl']);
STemplate::assign('channeldir',        $config['channeldir']);
STemplate::assign('channelurl',        $config['channelurl']);
STemplate::assign('originalvdir',        $config['originalvdir']);
STemplate::assign('originalvurl',        $config['originalvurl']);
STemplate::assign('profilebgdir',        $config['profilebgdir']);
STemplate::assign('channelbgdir',        $config['channelbgdir']);
STemplate::assign('channelbgurl',        $config['channelbgurl']);
STemplate::assign('videodir',        $config['videodir']);
STemplate::assign('videourl',        $config['videourl']);
STemplate::assign('thumbdir',        $config['thumbdir']);
STemplate::assign('thumburl',        $config['thumburl']);
STemplate::assign('vthumburl',        $config['thumburl']);
STemplate::assign('cthumburl',        $config['cthumburl']);
STemplate::assign('originaladir',        $config['originaladir']);
STemplate::assign('originalaurl',        $config['originalaurl']);
STemplate::assign('audiodir',        $config['audiodir']);
STemplate::assign('audiourl',        $config['audiourl']);
STemplate::assign('athumbdir',        $config['athumbdir']);
STemplate::assign('athumburl',        $config['athumburl']);
STemplate::assign('originalpdir',        $config['originalpdir']);
STemplate::assign('originalpurl',        $config['originalpurl']);
STemplate::assign('picturedir',        $config['picturedir']);
STemplate::assign('pictureurl',        $config['pictureurl']);
STemplate::assign('pthumbdir',        $config['pthumbdir']);
STemplate::assign('pthumburl',        $config['pthumburl']);
STemplate::setCompileDir($config['basedir']."/temporary");
STemplate::setTplDir($config['basedir']."/themes");

function create_slrememberme() {
        $key = md5(uniqid(rand(), true));
        global $conn;
        $sql="update members set remember_me_time='".date('Y-m-d H:i:s')."', remember_me_key='".$key."' WHERE username='".mysql_real_escape_string($_SESSION[USERNAME])."'";
        $conn->execute($sql);
        setcookie('slrememberme', gzcompress(serialize(array($_SESSION[USERNAME], $key)), 9), time()+60*60*24*30);
}

function destroy_slrememberme($username) {
        if (strlen($username) > 0) {
                global $conn;
                $sql="update members set remember_me_time=NULL, remember_me_key=NULL WHERE username='".mysql_real_escape_string($username)."'";
                $conn->execute($sql);
        }
        setcookie ("slrememberme", "", time() - 3600);
}

if (!isset($_SESSION["USERNAME"]) && isset($_COOKIE['slrememberme']))
{
        $sql="update members set remember_me_time=NULL and remember_me_key=NULL WHERE remember_me_time<'".date('Y-m-d H:i:s', mktime(0, 0, 0, date("m")-1, date("d"),   date("Y")))."'";
        $conn->execute($sql);
        list($username, $key) = @unserialize(gzuncompress(stripslashes($_COOKIE['slrememberme'])));
        if (strlen($username) > 0 && strlen($key) > 0)
      {
           $sql="SELECT * from members WHERE username='".mysql_real_escape_string($username)."' and remember_me_key='$key'";
             $rs=$conn->execute($sql);
             if($rs->recordcount()<1)
         {
            $error="Invalid Username/Key.";
         }
          elseif($rs->fields['account_status']=="Inactive")
         {
            $error = "Your account is currently inactive.";
         }
          if($error=="")
         {            
            SESSION_REGISTER("USERID");$_SESSION[USERID]=$rs->fields['USERID'];
            SESSION_REGISTER("EMAIL");$_SESSION[EMAIL]=$rs->fields['email'];
            SESSION_REGISTER("USERNAME");$_SESSION[USERNAME]=$rs->fields['username'];
            SESSION_REGISTER("VERIFIED");$_SESSION[VERIFIED]=$rs->fields['verified'];
               create_slrememberme();
           }
         else
         {
                destroy_slrememberme($username);
           }
        }
}

?>





Redagavo zabello 2009 Spa. 26 12:10:54
2009 Spa. 26 15:10:44          2 žinutė iš 9
Spausdinti pranešimą
<?
session_start();

// Begin Configuration
$config['basedir']     =  '/opt/lampp/htdocs';
$config['baseurl']     =  'http://78.60.19.212/audioshare/';

$DBTYPE = 'mysql';
$DBHOST = 'localhost';
$DBUSER = 'database_username';
$DBPASSWORD = 'database_password';
$DBNAME = 'database_name';
// End Configuration

$config['adminurl']      =  $config[baseurl].'/administrator';
$config['cssurl']      =  $config[baseurl].'/css';
$config['tmpimgpath']     =   $config['basedir'].'/uploads/temp';
$config['tmpimgpath2']     =   $config['basedir'].'/uploads/temp';
$config['imagedir']      =  $config[basedir].'/images';
$config['imageurl']      =  $config[baseurl].'/images';
$config['avatardir']      =  $config[imagedir].'/avatars';
$config['avatarurl']      =  $config[imageurl].'/avatars';
$config['cavatardir']      =  $config[imagedir].'/members';
$config['cavatarurl']      =  $config[imageurl].'/members';
$config['membersprofilepicdir']      =  $config[imagedir].'/membersprofilepic';
$config['membersprofilepicurl']      =  $config[imageurl].'/membersprofilepic';
$config['channeldir']      =  $config[imagedir].'/channels';
$config['channelurl']      =  $config[imageurl].'/channels';
$config['originalvdir']      =  $config[basedir].'/uploads/video';
$config['originalvurl']      =  $config[baseurl].'/uploads/video';
$config['profilebgdir']      =  '/profilebg/';
$config['channelbgdir']      =  '/channelbg/';
$config['channelbgurl']      =  $config[imageurl].'/channelbg';
$config['videodir']      =  $config[basedir].'/vdata';
$config['videourl']      =  $config[baseurl].'/vdata';
$config['thumbdir']      =  $config[imagedir].'/videothumbs';
$config['thumburl']      =  $config[imageurl].'/videothumbs';
$config['cthumburl']      =  $config[imageurl].'/channels';
$config['originaladir']      =  $config[basedir].'/uploads/audio';
$config['originalaurl']      =  $config[baseurl].'/uploads/audio';
$config['audiodir']      =  $config[basedir].'/adata';
$config['audiourl']      =  $config[baseurl].'/adata';
$config['athumbdir']      =  $config[imagedir].'/audiothumbs';
$config['athumburl']      =  $config[imageurl].'/audiothumbs';
$config['originalpdir']      =  $config[basedir].'/uploads/picture';
$config['originalpurl']      =  $config[baseurl].'/uploads/picture';
$config['picturedir']      =  $config[basedir].'/pdata';
$config['pictureurl']      =  $config[baseurl].'/pdata';
$config['pthumbdir']      =  $config[imagedir].'/picturethumbs';
$config['pthumburl']      =  $config[imageurl].'/picturethumbs';

require_once($config[basedir].'/smarty/libs/Smarty.class.php');
require_once($config[basedir].'/libraries/mysmarty.class.php');
require_once($config[basedir].'/libraries/SConfig.php');
require_once($config[basedir].'/libraries/SError.php');
require_once($config[basedir].'/libraries/adodb/adodb.inc.php');
require_once($config[basedir].'/libraries/phpmailer/class.phpmailer.php');
require_once($config[basedir].'/libraries/SEmail.php');

function strip_mq_gpc($arg)
{
  if (get_magic_quotes_gpc())
  {
     $arg = str_replace('"',"'",$arg);
     $arg = stripslashes($arg);
    return $arg;
  }
  else
  {
    $arg = str_replace('"',"'",$arg);
    return $arg;
  }
}

$conn = &ADONewConnection($DBTYPE);
$conn->PConnect($DBHOST, $DBUSER, $DBPASSWORD, $DBNAME);
@mysql_query("SET NAMES 'UTF8'");
$sql = "SELECT * from config";
$rsc = $conn->Execute($sql);

if($rsc){while(!$rsc->EOF)
{
$field = $rsc->fields['setting'];
$config[$field] = $rsc->fields['value'];
STemplate::assign($field, strip_mq_gpc($config[$field]));
@$rsc->MoveNext();
}}


if ($_REQUEST['language'] != "")
{
   if ($_REQUEST['language'] == "english")
   {
      SESSION_REGISTER("language");
      $_SESSION[language] = "english";
   }
   elseif ($_REQUEST['language'] == "spanish")
   {
      SESSION_REGISTER("language");
      $_SESSION[language] = "spanish";
   }
}

if ($_SESSION['language'] == "")
{
   SESSION_REGISTER("language");
   $_SESSION[language] = "english";
}

if ($_SESSION['language'] == "english")
{
include("lang/english.php");
}
elseif ($_SESSION['language'] == "spanish")
{
include("lang/spanish.php");
}
else
{
include("lang/english.php");
}

for ($i=0; $i<count($lang); $i++)
{
   STemplate::assign('lang'.$i, $lang[$i]);
}

for ($i=0; $i<count($langev); $i++)
{
   STemplate::assign('langev'.$i, $langev[$i]);
}

STemplate::assign('baseurl',       $config['baseurl']);
STemplate::assign('basedir',       $config['basedir']);
STemplate::assign('adminurl',       $config['adminurl']);
STemplate::assign('cssurl',       $config['cssurl']);
STemplate::assign('tmpimgpath',       $config['tmpimgpath']);
STemplate::assign('tmpimgpath2',       $config['tmpimgpath2']);
STemplate::assign('imagedir',        $config['imagedir']);
STemplate::assign('imageurl',        $config['imageurl']);
STemplate::assign('imgpath',        $config['imgpath']);
STemplate::assign('avatardir',        $config['avatardir']);
STemplate::assign('avatarurl',        $config['avatarurl']);
STemplate::assign('cavatardir',        $config['cavatardir']);
STemplate::assign('cavatarurl',        $config['cavatarurl']);
STemplate::assign('membersprofilepicdir',        $config['membersprofilepicdir']);
STemplate::assign('membersprofilepicurl',        $config['membersprofilepicurl']);
STemplate::assign('channeldir',        $config['channeldir']);
STemplate::assign('channelurl',        $config['channelurl']);
STemplate::assign('originalvdir',        $config['originalvdir']);
STemplate::assign('originalvurl',        $config['originalvurl']);
STemplate::assign('profilebgdir',        $config['profilebgdir']);
STemplate::assign('channelbgdir',        $config['channelbgdir']);
STemplate::assign('channelbgurl',        $config['channelbgurl']);
STemplate::assign('videodir',        $config['videodir']);
STemplate::assign('videourl',        $config['videourl']);
STemplate::assign('thumbdir',        $config['thumbdir']);
STemplate::assign('thumburl',        $config['thumburl']);
STemplate::assign('vthumburl',        $config['thumburl']);
STemplate::assign('cthumburl',        $config['cthumburl']);
STemplate::assign('originaladir',        $config['originaladir']);
STemplate::assign('originalaurl',        $config['originalaurl']);
STemplate::assign('audiodir',        $config['audiodir']);
STemplate::assign('audiourl',        $config['audiourl']);
STemplate::assign('athumbdir',        $config['athumbdir']);
STemplate::assign('athumburl',        $config['athumburl']);
STemplate::assign('originalpdir',        $config['originalpdir']);
STemplate::assign('originalpurl',        $config['originalpurl']);
STemplate::assign('picturedir',        $config['picturedir']);
STemplate::assign('pictureurl',        $config['pictureurl']);
STemplate::assign('pthumbdir',        $config['pthumbdir']);
STemplate::assign('pthumburl',        $config['pthumburl']);
STemplate::setCompileDir($config['basedir']."/temporary");
STemplate::setTplDir($config['basedir']."/themes");

function create_slrememberme() {
        $key = md5(uniqid(rand(), true));
        global $conn;
        $sql="update members set remember_me_time='".date('Y-m-d H:i:s')."', remember_me_key='".$key."' WHERE username='".mysql_real_escape_string($_SESSION[USERNAME])."'";
        $conn->execute($sql);
        setcookie('slrememberme', gzcompress(serialize(array($_SESSION[USERNAME], $key)), 9), time()+60*60*24*30);
}

function destroy_slrememberme($username) {
        if (strlen($username) > 0) {
                global $conn;
                $sql="update members set remember_me_time=NULL, remember_me_key=NULL WHERE username='".mysql_real_escape_string($username)."'";
                $conn->execute($sql);
        }
        setcookie ("slrememberme", "", time() - 3600);
}

if (!isset($_SESSION["USERNAME"]) && isset($_COOKIE['slrememberme']))
{
        $sql="update members set remember_me_time=NULL and remember_me_key=NULL WHERE remember_me_time<'".date('Y-m-d H:i:s', mktime(0, 0, 0, date("m")-1, date("d"),   date("Y")))."'";
        $conn->execute($sql);
        list($username, $key) = @unserialize(gzuncompress(stripslashes($_COOKIE['slrememberme'])));
        if (strlen($username) > 0 && strlen($key) > 0)
      {
           $sql="SELECT * from members WHERE username='".mysql_real_escape_string($username)."' and remember_me_key='$key'";
             $rs=$conn->execute($sql);
             if($rs->recordcount()<1)
         {
            $error="Invalid Username/Key.";
         }
          elseif($rs->fields['account_status']=="Inactive")
         {
            $error = "Your account is currently inactive.";
         }
          if($error=="")
         {           
            SESSION_REGISTER("USERID");$_SESSION[USERID]=$rs->fields['USERID'];
            SESSION_REGISTER("EMAIL");$_SESSION[EMAIL]=$rs->fields['email'];
            SESSION_REGISTER("USERNAME");$_SESSION[USERNAME]=$rs->fields['username'];
            SESSION_REGISTER("VERIFIED");$_SESSION[VERIFIED]=$rs->fields['verified'];
               create_slrememberme();
           }
         else
         {
                destroy_slrememberme($username);
           }
        }
}

?>





www.MAFIACLUB.lt
2009 Spa. 26 17:10:34          3 žinutė iš 9
Spausdinti pranešimą
tas pats, gal kas gali nors pasakyti ka sis eroras reiskia, ir ko nori is manes ?

2009 Spa. 29 13:10:46          4 žinutė iš 9
Spausdinti pranešimą
Jaučiu nesupranta konstantos basedir. šypsosi
2009 Spa. 29 20:10:14          5 žinutė iš 9
Spausdinti pranešimą
geria turbut susitvarkiau su tom konstantom dar liko keli erorai


Notice: A session had already been started - ignoring session_start() in /opt/lampp/htdocs/audioshare/include/config.php on line 2




ka reiskia jis ? antroje eiluteje yra sitas: session_start();

2009 Spa. 29 20:10:50          6 žinutė iš 9
Spausdinti pranešimą
Prieš tai sesija jau buvo pradėta, kodas ignoruoja antroje eilutėje esančią session_start();. šypsosi
2009 Spa. 29 20:10:42          7 žinutė iš 9
Spausdinti pranešimą
sekantis akinanti šypsen Strict Standards: Non-static method STemplate::assign() should not be called statically in /opt/lampp/htdocs/audioshare/include/config.php on line 165

2009 Spa. 29 21:10:34          8 žinutė iš 9
Spausdinti pranešimą
assign(); f-cija neatitinka griežtų kodo reikalavimų. Koks aš geras vertėjas. juokiasijuokiasijuokiasi
2009 Spa. 29 21:10:00          9 žinutė iš 9
Spausdinti pranešimą
jo tik vertimas nelabai padeda akinanti šypsen man reikia kad kas padetu sutvarkyti viena gera CMS'a

Peršokti į forumą: