session_start(); $page = "index_static"; $title = "Body Corporate Management Services :: Home"; include ("include/db_connect.php"); $sql = "select * from tenants where tenant_id = '$tenant_id' and password = '$password'"; $sql_result = mysql_query($sql, $connection) or die("Could not execute query 1000"); $num = mysql_num_rows($sql_result); if ($num == 0) { $logged_in = "no"; } else if ($num == 1) { $logged_in = "yes"; $sql = "select bigpic, smallpic, complex_name, description, smalldescription from tenants, complexes where complexes.pk = tenants.complex_id and tenants.tenant_id = \"$tenant_id\""; $sql_result = mysql_query($sql, $connection) or die("Query 1 failed : " . mysql_error()); $row = mysql_fetch_array($sql_result); $bigpic = $row["bigpic"]; $smallpic = $row["smallpic"]; $complex_name = $row["complex_name"]; $description = $row["description"]; $smalldescription = $row["smalldescription"]; } $sql = "select content from pages where page = \"$page\""; $sql_result = mysql_query($sql, $connection) or die("Could not execute query 10001"); $row = mysql_fetch_array($sql_result); $content = $row["content"]; include ("include/starter.php"); ?>