Example #1
0
    </div>
</div>
    </form>
          
        </div>
        
    </div>
    </div>
     
  <?php 
require_once 'functions.php';
require_once 'include/db_connect.php';
$sch = getschool($pid1, 'school');
$int = getinter($pid1, 'inter');
$gra = getgraduation($pid1, 'graduation');
$p = getpg($pid1, 'pg');
$c = \mysql_query("select id from groups where (groupname='{$sch}' and members>1) or (groupname='{$int}' and members>1) or (groupname='{$gra}' and members>1) or (groupname='{$p}' and members>1)");
if (!$c) {
    die("error" . mysql_error());
}
if (mysql_num_rows($c) > 1) {
    $pg = mysql_query("select * from post ORDER BY id desc");
    $storeArray = array();
    while ($row = mysql_fetch_array($pg)) {
        $type = $row['status'];
        if ($type == 'message') {
            $postn = getuser($row['user_id'], 'fname');
            $ava1 = getavatar($row['user_id'], 'avatar');
            $ava = "<img src='{$ava1}' height='30' width='30'>";
            $tim = $row['time'];
            $hash = $row['hash'];
Example #2
0
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>
        <?php 
require_once 'include/essential.php';
require_once 'include/db_connect.php';
$g = $_GET['g'];
$cat = $_GET['cat'];
$school = getschool($g, 'school');
$inter = getinter($g, 'inter');
$graduation = getgraduation($g, 'graduation');
$postgraduation = getpg($g, 'pg');
$shash = getshash($g, 'shash');
$hhash = gethhash($g, 'hhash');
$ghash = getghash($g, 'ghash');
$phash = getphash($g, 'phash');
if ($cat == "a") {
    $sco = mysql_query("select * from groups where category='{$cat}'");
    while ($sco1 = mysql_fetch_array($sco)) {
        $group = $sco1['groupname'];
        $hash = $sco1['ghash'];
        if ($school == $group and $shash == $hash) {
            header("location:y.php?group={$hash}");
        } else {
            header("location:home.php");
        }
    }