LaCReMeL adlı üyeden alıntı: mesajı görüntüle
htaccess'e
php_flag register_globals on
yazmayi denedin mi ?
denedim hocam 404 sayfa görüntülenemiyor hatasi aldim htaccesi su sekilde yaparak
---------------------------------
Options +FollowSymLinks
RewriteEngine on
php_flag register_globals on
----------------------------


LaCReMeL adlı üyeden alıntı: mesajı görüntüle
Birde

foreach($_COOKIE as $key => $val){
       $$key= $val;
}
foreach($_SESSION as $key => $val){
       $$key= $val;
}
foreach($_POST as $key => $val){
       $$key= $val;
}
foreach($_GET as $key => $val){
       $$key= $val;
}
bu koddan $_COOKIE ve $_SESSION u kaldiralim

foreach($_POST as $key => $val){
       $$key= $val;
}
foreach($_GET as $key => $val){
       $$key= $val;
}
bu şekilde olsun yani, eskisini bununla değiştir
foksiyon dosyasina su sekilde verdigin kodu ekledim

<?
foreach($_POST as $key => $val){
       $$key= $val;
}
foreach($_GET as $key => $val){
       $$key= $val;
}  
function getNumComments($id)
{
 $sql="select * from blogsscomments where blogsid='$id' and approved='Y'";
 $res=mysql_query($sql);
 return mysql_num_rows($res);
}
function submitRating($id,$rating)
{
 $sql="select * from blogssratings where blogsid='$id'";
 $res=mysql_query($sql);
 if($obj=mysql_fetch_object($res))
 {
 $rid=$obj->ratingsid;
 $numvotes=$obj->numvotes;
 $avgrating=$obj->avgrating;
 $totrating=$obj->totrating;
 $totrating=$totrating+$rating;
 $numvotes++;
 $avgrating=round($totrating/$numvotes,2);
 $sql="update blogssratings set numvotes='$numvotes',avgrating='$avgrating',totrating='$totrating'  where ratingsid='$rid'";
 mysql_query($sql);
 }
 else
 {
 $sql="insert into blogssratings(numvotes,blogsid,avgrating,totrating) values('1','$id','$rating','$rating')";
 mysql_query($sql);
 }
}
function getRating($recid)
{
 $rating="Not Rated yet!";
 $sql="select * from blogssratings where blogsid='$recid'";
 $res=mysql_query($sql);
 while($obj=mysql_fetch_object($res))
 {
  $rating="Rated $obj->avgrating from $obj->numvotes votes";
 }
 return $rating;
}
function sendHTMLmail($fromid,$to,$subject,$message)
{ 
 $headers  = "From: $fromid\n";
 $headers .= "Reply-To: $fromid\n";
 $headers .= "MIME-Version: 1.0\n";
 $headers .= "Content-Type: text/html; charset=ISO-8859-1\n";
 $headers .= "Content-Transfer-Encoding: 8bit;\n\n";
 $headers .= nl2br(stripslashes($message));
  $headers .= "\n";
 @mail("$to", "$subject", "", "$headers");
} 
function getSetting($val)
{
 $sql="select * from blogssettings where setting='$val'";
 $res=mysql_query($sql);
 while($obj=mysql_fetch_object($res))
 { 
  return $obj->settingvalue;
 }
}
function saveSetting($key,$val)
{
 $sql="update blogssettings set settingvalue='$val' where setting='$key'";
 $res=mysql_query($sql);
}
function getTemplate($val)
{
 $sql="select * from blogssemailtemplates where usedfor='$val'";
 $res=mysql_query($sql);
 while($obj=mysql_fetch_object($res))
 { 
  $template=$obj->template;
//  $template=str_replace("\n","<br>",$template);
  return $template;
 }
}
function saveTemplate($key,$val)
{
 $sql="update blogssemailtemplates set template='$val' where usedfor='$key'";
 $res=mysql_query($sql);
}
function generateCode()
{
        for($i=0;$i<12;$i++)
        {
        $r = rand(48,90);
        if($r > 57 && $r < 65)
                $i--;
        else
            $p .= chr($r);
        }
   return $p;
}
function generateShortCode()
{
        for($i=0;$i<5;$i++)
        {
        $r = rand(48,90);
        if($r > 57 && $r < 65)
                $i--;
        else
            $p .= chr($r);
        }
   return $p;
}
function getCategoryName($catid)
{
 $sql="select * from blogcategory where categoryid='$catid'";
 $res=mysql_query($sql);
 while($obj=mysql_fetch_object($res))
 { 
  return $obj->catname;
 }
}
if (isset($_SERVER['HTTPS'])) {
        $protocol = 'https://';
    } else if (strncmp($CFG->wwwroot, 'https', 5) == 0) {
        $protocol = 'https://';
    } else {
        $protocol = 'http://';
    }
function getRatings($id)
{
       $sql1="select * from blogssratings where blogsid='$id'";
       $result1=mysql_query($sql1);
       if(!mysql_num_rows($result1))
       {
        $rating="Not rated yet";
        $textrating="Not rated yet";
       }
       else
       {
         $sql1="select * from blogssratings where blogsid='$id'";
         $result1=mysql_query($sql1);
         while($obj=mysql_fetch_object($result1))
         {
         $pos=$obj->avgrating;
         $textrating="<b>$obj->avgrating</b> from $obj->numvotes votes";
         $imrating="Rated $obj->avgrating from $obj->numvotes votes";
         }
         $rating="";
         for($i=0;$i<floor($pos);$i++)
                  $rating=$rating."<img alt='$imrating' src='".root."/images/starp.gif'>";
         $numleft=5-$i;
         if(($pos-$i)>=0.5)
         {
         $numleft=$numleft-1;
                  $rating=$rating."<img alt='$imrating' src='".root."/images/starm.gif'>";
         }
         for($i=0;$i<$numleft;$i++)
                  $rating=$rating."<img alt='$imrating' src='".root."/images/starn.gif'>";
       }
       if(getSetting("RATINGSIMAGE")=="Y")return $rating;else return $textrating;
}
function getNumdrinks($catid)
{
 $sql="select * from blogs where categoryid='$catid'";
 $res=mysql_query($sql);
 return mysql_num_rows($res);
}
function string_to_underscore_name($string)
{
    $string = preg_replace('/[\'"]/', '', $string);
    $string = preg_replace('/[^a-zA-Z0-9]+/', '_', $string);
    $string = trim($string, '_');
    $string = strtolower($string);
    
    return $string;
}
function autoUpdatingCopyright($startYear){
 
    // given start year (e.g. 2004)
    $startYear = intval($startYear);
 
    // current year (e.g. 2007)
    $year = intval(date('Y'));
 
    // is the current year greater than the
    // given start year?
    if ($year > $startYear)
        return $startYear .'-'. $year;
    else
        return $startYear;
}
function cropImage($nw, $nh, $source, $stype, $dest) {
         $size = getimagesize($source);
         $w = $size[0];
          $h = $size[1];
          switch($stype) {
              case 'gif':
              $simg = imagecreatefromgif($source);
              break;
              case 'jpg':
              $simg = imagecreatefromjpeg($source);
              break;
              case 'png':
              $simg = imagecreatefrompng($source);
              break;
          }
          $dimg = imagecreatetruecolor($nw, $nh);
          $wm = $w/$nw;
          $hm = $h/$nh;
          $h_height = $nh/2;
          $w_height = $nw/2;
          if($w> $h) {
              $adjusted_width = $w / $hm;
              $half_width = $adjusted_width / 2;
              $int_width = $half_width - $w_height;
              imagecopyresampled($dimg,$simg,-$int_width,0,0,0,$adjusted_width,$nh,$w,$h);
          } elseif(($w <$h) || ($w == $h)) {
              $adjusted_height = $h / $wm;
              $half_height = $adjusted_height / 2;
              $int_height = $half_height - $h_height;
              imagecopyresampled($dimg,$simg,0,-$int_height,0,0,$nw,$adjusted_height,$w,$h);
          } else {
              imagecopyresampled($dimg,$simg,0,0,0,0,$nw,$nh,$w,$h);
          }
          imagejpeg($dimg,$dest,100);
}
function random_readable_pwd($length=10){
 
    // the wordlist from which the password
    // gets generated: (adjust them here:)
    $words = 'dog,cat,sheep,sun,sky,red,ball,happy,ice,one,two,three,four,five,mobile,phone,caphone,meds,tape,cookie,creme,caffeine,org,com,net,daily,tri,abbe,curl,care,bear,corp,deaf,dill,dime,dine,dirk,dock,doll,bush,reagan,clinton,dem,rep';
    $words .= 'green,blue,music,movies,radio,green,turbo,six,seven,eight,nine,ten,vecta,pin,stick,wood,stake,magic,mouse,god,the,said,had,take,pray,gently,dorm,flat,ford,chevy,dodge,comet,buick,caddy,bike,funk,fuss,fuzz,filly,dilly,wuzy,kick,live,loss';
    $words .= 'mouse,computer,paper,water,fire,storm,chicken,fire,ide,ice,snow,rain,sleet,love,have,left,right,middle,center,align,harland,scripts,why,me,at,champ,ozzy,cliff,duwayne,pat,loot,milk,rock,peble,cough,fight,filly,willy,wuz,eagle,dog,bird,snake';
    $words .= 'boot,freedom,white,nice,player,small,eyes,black,blue,yellow,green,purple,pink,bath,geek,man,women,puter,monitor,keyboard,disk,hard,drive,sly,slay,slim,slick,slum,sack,shoe,boot,slipper,sock,pants,jacket,har,hat,glove,paint,ball,football,hockey';
    $words .= 'path,kid,box,black,flower,ping,pong,smile,frown,happy,sad,sack,moon,sun,boot,browser,bug,chat,click,lol,cursor,desktop,directory,firmware,needle,hay,sneeze,told,trim,wade,week,work,ugly,joe,wand,word,tough,hord,wild,wish,zonetort,torn,tore';
    $words .= 'coffee,colors,rainbow,plus,king,tv,ring,house,silly,putty,kool,aid,cafe,ice,hold,update,be,in,out,sideways,up,down,under,wall,plate,siver,gold,metal,spoon,fork,zoom,zole,sake,yoke,yogi,bobo,type,typo,tickle,tazer,box,wind,wasp,bee,hive,stings';
 
    // explode by ",":
    $words = explode(',', $words);
    if (count($words) == 0){ die('Wordlist is empty!'); }
 
    mt_srand((double)microtime()*1000000);
 
    // while password is smaller than $length -> add
    // words:
    $pwd = '';
    while (strlen($pwd) < $length){
        $r = mt_rand(0, count($words)-1);
        $pwd .= $words[$r];
    }
 
    // append a number at the end if length > 2 and
    // reduce the password size to $length
    $num = mt_rand(1, 999);
    if ($length > 2){ 
        $pwd = substr($pwd,0,$length-strlen($num)).$num;
    } else { 
        $pwd = substr($pwd, 0, $length);
    }
 
    return $pwd;
 
}
//$newpass=random_readable_pwd();
//echo $newpass;
//cropImage("50", "50", "friends_orgimage/Tim.jpg", "jpg", "friends_thumbs/it2.jpg");
$domain=getSetting("URLDOMAIN");
?>
ama malesef yine girmedi