Ejemplo n.º 1
0
	<?php 
include "connect.php";
session_start();
$_SESSION["userid"] = "";
if (isset($_POST['user']) and isset($_POST['pwd'])) {
    $dats = '';
    $user = mysql_real_escape_string($_POST['user']);
    $pass = mysql_real_escape_string($_POST['pwd']);
    $DB = new connectionDB();
    $DB->connecttoDB();
    $sqls = " SELECT * FROM tblusers where username=  '******'  and Password=  '******'";
    $DB->runquery($sqls);
    if ($row = $DB->result->fetch_assoc()) {
        if ($row["type"] == "member") {
            $memid = $row["id"];
            $user = new connectionDB();
            $user->connecttoDB();
            $sql = " SELECT * FROM tblproperties where id=  '{$memid}'";
            $user->runquery($sql);
            if ($row = $user->result->fetch_assoc()) {
                $_SESSION["userid"] = $memid;
                $url = $row["url"];
                header("Location: profile/" . $url);
            }
            $user->closeDB();
        } else {
            if ($row["type"] == "admin") {
                header("Location: home.php");
            }
        }
    } else {
Ejemplo n.º 2
0
      // }
      // google.maps.event.addDomListener(window, 'load', initialize);
    </script>



    
  </head>

  <body>
<?php 
include "../connect.php";
session_start();
$geturl = $_GET["url"];
$memberid = "";
$DB = new connectionDB();
$DB->connecttoDB();
$sql = " SELECT * FROM tblproperties where url =  '{$geturl}'";
$DB->runquery($sql);
if ($row = $DB->result->fetch_assoc()) {
    $memberid = $row["id"];
    if (isset($_SESSION["userid"]) && $_SESSION["userid"] == $memberid) {
        header("Location: ../CMS/profile.php?url=" . $geturl);
    }
}
$DB->closeDB();
unset($DB);
?>


Ejemplo n.º 3
0
  });


  </script>

</head>
<body>

<form role="form" action="allmembers.php" method="POST">
	<label class="control-label col-sm-2">Company Name:  </label>
   		<div class="col-sm-4">
     		<input type="text" class="form-control" name="search" placeholder="Search" id = "input"></div>
</form>
<div class= "col-sm-12" id = "display">
<?php 
    $DB = new connectionDB();
    $DB->connecttoDB();
    $sql = " SELECT * FROM tblmembers";
    $DB->runquery($sql);
    while ($row = $DB->result->fetch_assoc()) {
        echo '<div class = "col-sm-3" id ="outputs" ids = "' . $row["id"] . '"  data-toggle="modal" data-target="#myModal"" >
          <div class = "row" >
            <img class ="img-circle" src = "img/RCBC-logo.png" id ="imglogo">
          </div>
          <div class="row">
            <h3 onclick ="getname()" > ' . $row["companyname"] . '</h3>
            <p>
              <b>Telephone number</b>' . $row["telephone"] . '<br>
              <b>E-mail</b> ' . $row["email"] . '<br>
              <b>Nature of Business</b>' . $row["nature"] . '<br>
              <b>Interest</b>' . $row["interest"] . '<br>