Created
May 1, 2013 19:38
-
-
Save eftalyurtseven/5497753 to your computer and use it in GitHub Desktop.
Php ile Haber Scripti Yazmak Bölüm 2 Fonksiyon Dosyamız
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Project: Haber Scripti | |
* Author: Eftal Yurtseven | |
* Functions | |
*/ | |
/* | |
Users Tablosundaki Alan İsimler | |
user_id int(11) Auto Inc. Primary | |
user_name varchar(225) | |
user_link varchar(225) | |
user_pw varchar(225) | |
user_image varchar(225) | |
user_rank int(11) | |
user_hit int(11) | |
user_age int(11) | |
user_gender int(11) | |
user_text text | |
*/ | |
ob_start(); | |
/* Güvenlik Parametrem */ | |
function p($par){ | |
return mysql_real_Escape_string(strip_tags(rtrim($_POST[$par]))); | |
} | |
/* Yönlendirme */ | |
function go($par, $pa){ | |
if($pa){ | |
header("Refresh: {$pa}; URL={$par}"); | |
}else{ | |
header("Location: {$par}"); | |
} | |
} | |
/* Oturumu Taşı */ | |
function session($par){ | |
if($_SESSION[$par]) { return $_SESSION[$par]; } else{ return false; } | |
} | |
/* Oturum Oluştur */ | |
function set_session($par){ | |
foreach($par as $pa => $deger){ | |
$_SESSION[$pa] = $deger; | |
} | |
} | |
/* Sorgu */ | |
function query($par){ | |
return mysql_query($par); | |
} | |
/* Çıktılar */ | |
function row($par){ | |
return mysql_fetch_array($par); | |
} | |
/* Keys */ | |
function keylogger($par){ | |
return base64_encode(sha1(base64_encode(md5($par)))); | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Project: HaberScripti | |
URI: http://www.eftalyurtseven.com | |
Author: Eftal Yurtseven | |
Version: 1.0 | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment