Beispiel #1
0
            if ($c2 != 1) {
                //echo "3";
                $querystring = "select * from participants where eid=:eid";
                $binding = array('eid' => $_POST['event']);
            } else {
                $msg = "please enter name or event to search";
                $flag = 0;
            }
        }
    }
    if ($flag != 0) {
        //echo $querystring;
        $conn = DB\connect_db($config);
        if ($conn) {
            try {
                $results1 = DB\select_db($querystring, $binding, $conn);
                if (($stat = $results1->rowCount()) == 0) {
                    $stat = "No";
                }
                $msg = $stat . " records found..";
            } catch (Exception $e) {
                $exp = 1;
                $msg = 'some Server error encountered..';
                //$msg=$e->getMessage();
            }
        }
    }
}
?>
<html>
<head>
Beispiel #2
0
$results1 = "";
$msg = "";
$msgdelete = "";
$msgadd = "";
$msgsave = "";
$msgup = "";
if (isset($_REQUEST['opt'])) {
    //print_r($_POST);
    if (strcmp($_REQUEST['opt'], "del") == 0) {
        //echo "uanme".$_POST['uid'];
        $conn = DB\connect_db($config);
        if ($conn) {
            $pid = 101;
            $binding = array('eid' => $_POST['eid']);
            try {
                $results = DB\select_db("delete from events where volid=:volid", $binding, $conn);
                if ($results) {
                    $msgdelete = "Volunteer deleted ";
                }
            } catch (Exception $e) {
                $msgdelete = 'some Server error encountered..';
            }
        }
    }
    if (strcmp($_REQUEST['opt'], "edit") == 0) {
        //echo "uanme".$_POST['uid'];
        $conn = DB\connect_db($config);
        if ($conn) {
            $binding = array('volid' => $_POST['eid']);
            try {
                $resultedit = DB\query_db("select * from volunteers where volid=:volid", $binding, $conn);
Beispiel #3
0
include "../theme/req_function.php";
require_once '../settings/dbfunctions.php';
use Web\DB;
$resultedit = "";
$msgdel = "";
$msgadd = "";
$msgup = "";
if (isset($_REQUEST['opt'])) {
    if (strcmp($_REQUEST['opt'], "del") == 0) {
        //echo "uanme".$_POST['uid'];
        $conn = DB\connect_db($config);
        if ($conn) {
            $pid = 101;
            $binding = array('uname' => $_POST['uid']);
            try {
                $results = DB\select_db("delete from system_users where username=:uname", $binding, $conn);
                if ($results) {
                    $msgdel = "user deleted successfully...";
                }
            } catch (Exception $e) {
                $msgdel = 'some Server error encountered..';
            }
        }
    }
    if (strcmp($_REQUEST['opt'], "edit") == 0) {
        //echo "uanme".$_POST['uid'];
        $conn = DB\connect_db($config);
        if ($conn) {
            $binding = array('uname' => $_POST['uid']);
            try {
                $resultedit = DB\query_db("select * from system_users where username=:uname", $binding, $conn);