Ejemplo n.º 1
0
        }
    } else {
        $query = executequery("select * from member where id=" . $_POST['id']);
        $row = mysql_fetch_array($query);
        if (copy($_SERVER['DOCUMENT_ROOT'] . "/joinfamily/pic/" . str_replace($row['profilepic'], " ", "%20"), $_SERVER['DOCUMENT_ROOT'] . "/images/user/" . str_replace($row['profilepic'], " ", "%20"))) {
            unlink("pic/" . $row['profilepic']);
        } else {
            echo urlencode($_SERVER['DOCUMENT_ROOT'] . "/joinfamily/pic/" . $row['profilepic']);
            echo "<br>";
            echo urlencode($_SERVER['DOCUMENT_ROOT'] . "/images/user/" . $row['profilepic']);
            die("For some reason not able to upload your profile pic");
        }
        header("Location:../main.php");
    }
}
$query = executequery("select * from member where id=" . $_GET['id']);
$row = mysql_fetch_array($query);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <link href="../style.css" rel="stylesheet" type="text/css" />
        <link href="../../ajax/css/smoothness/jquery-ui-1.8.14.custom.css" rel="stylesheet" type="text/css" />
        <title>Bansavali</title>
        <script type="text/javascript" src="../../ajax/jquery.js"></script>
        <script type="text/javascript" src="../../ajax/jquery-ui.js"></script>
        <script type="text/javascript" src="../inputbox.js"></script>
        <script type="text/javascript" src="../leftoption.js"></script>
        <style type="text/css">
            .error
            {
Ejemplo n.º 2
0
/*
 error codes
 1 no such father found
 2 no such son found
 3 already dead
*/
require "../header.php";
connecttodatabase();
$firstname = $_POST["firstname"];
$fatherfirstname = $_POST["fatherfirstname"];
if ($firstname != "" && $fatherfirstname != "") {
    $query = executequery("SELECT * FROM member WHERE membername LIKE '" . $firstname . "%'");
    while ($row = mysql_fetch_array($query)) {
        $fatherid = $row['sonof'];
        if ($fatherid != -1) {
            $query2 = executequery("select * from member where id=" . $fatherid);
            if (!stristr(mysql_result($query2, 0, "membername"), $fatherfirstname) == False) {
                ?>
                <table cellspacing="3" style="background-color: greenyellow" width="100%">
                    <tr><td><?php 
                echo $row['membername'];
                ?>
</td></tr>
                    <tr><td><?php 
                echo mysql_result($query2, 0, "membername");
                ?>
</td></tr>
                    <tr><td><button onclick="thisisme(<?php 
                echo $row['id'];
                ?>
,<?php 
Ejemplo n.º 3
0
                    <td>
                        <input type="password" name="confirmpassword" id="confirmpassword"/>
                    </td>
                    <td>

                    </td>
                </tr>
                <tr>
                    <td>
                        Father's Name:
                    </td>
                    <td>
                        <?php 
$query2 = executequery("select * from member where id={$row['1']}");
$row2 = mysql_fetch_array($query2);
$query2 = executequery("select * from member where id=" . $row2['sonof']);
$row2 = mysql_fetch_array($query2);
if (is_null($row2['lastlogin'])) {
    ?>
                            <input type="edit" name="fathername" value="<?php 
    echo $row2['membername'];
    ?>
" id="fathername"/>
                            <?php 
} else {
    ?>
                            <input type="hidden" value="<?php 
    echo $row2['membername'];
    ?>
" name="fathername" id="fathername"/><?php 
    echo $row2['membername'];
Ejemplo n.º 4
0
?>

<table width="300" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td><form name="form1" method="post" action="inc-ac.php">
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
<td colspan="3"><strong>Introducere incasari </strong></td>
</tr>
<tr>
<td width="71">Partida</td>
<td width="6">:</td>
<td width="301"><input name="par" type="number" id="par">
<?php 
if (isset($_GET['par'])) {
    executequery($_GET['par']);
}
?>
</td>
</tr>
<tr>
<td>Nume</td>
<td>:</td>m
<td><input name="nume" type="text" id="nume"><?php 
if (isset($_GET['par'])) {
    while ($row = $stmt->fetch(PDO::FETCH_OBJ)) {
        echo $row->par;
    }
}
?>
</td>
Ejemplo n.º 5
0
            </tr>

        </table>
        <?php 
} else {
    $sonid = $_POST['sonid'];
    $fatherid = $_POST['fatherid'];
    $emailid = $_POST['emailid'];
    $personalmessage = $_POST['personalmessage'];
    $filename = $sonid . "_" . $_FILES['pic']['name'];
    $fileext = fileext($_FILES['pic']['name'], false);
    $token = generate_token();
    if ($sonid && $fatherid) {
        //upload pic
        if ($_FILES["pic"]['error'] == 0 && ($_FILES['pic']["type"] == "image/jpeg" || $_FILES['pic']["type"] == "image/gif" || $_FILES['pic']["type"] == "image/png")) {
            if (executequery("insert into joinrequest (formember,pic,personalmessage,emailid) Values ({$sonid},'{$filename}','{$personalmessage}','{$emailid}')")) {
                move_uploaded_file($_FILES['pic']['tmp_name'], "pic/{$filename}");
            }
            ?>
                <table style="height: 100%; width: 100%; margin-top: 15px;">
                    <tr>
                        <td style="background-color: #9FE7FA; padding: 15px;">
                            <span style=" padding: 5px; font: 35px normal;">Thank You!</span>
                        </td></tr>
                    <tr><td align="center" style="background-color: lightcyan">
                            <h4>You will soon be informed via your email whenever administrator responds to your request. In the mean time you can explore the family tree and find more of your family members<br><a href="../main.php">Home</a></h4>
                        </td>
                    </tr>
                </table>
                <?php 
        } else {
Ejemplo n.º 6
0
<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
require "header.php";
connecttodatabase();
$emailid = $_GET['emailid'];
$token = $_GET['token'];
$query = executequery("Select * from member where tokenforact='{$token}' and emailid='{$emailid}'");
$row = mysql_fetch_array($query);
if ($emailid == $row['emailid'] and $token == $row['tokenforact']) {
    executequery("update member set approved=1 where id=" . $row['id']);
    authenticateuser($row['id'], $row['membername']);
    header("Location:index.php?#" . $row['id']);
} else {
    echo "<h1>An Unexpected error occured</h1>";
}