AJAXBot/www/conn_generic.php
MallocNull e72cdf0fcf more javascript
i bet the jews did this
2014-07-14 17:02:46 -05:00

22 lines
No EOL
612 B
PHP

<?php
mysql_connect("HOSTADDRESS", "USERNAME", "PASSWORD");
mysql_select_db("DATABASE_NAME");
session_start();
$config = mysql_fetch_object(mysql_query("SELECT * FROM `config` WHERE `id`=1"));
function escapeDoubleQuotes($str) {
return str_replace('"','\\"',$str);
}
function escapeSingleQuotes($str) {
return str_replace("'","\\'",$str);
}
function checkIfLoggedIn() {
if(mysql_num_rows(mysql_query("SELECT * FROM `admin` WHERE `username`='". mysql_real_escape_string($_SESSION['user']) ."' AND `password`='". $_SESSION['pwd'] ."'")) > 0)
return true;
else
return false;
}
?>