예제 #1
0
                $results = DB\insert_db("insert into volunteers(name,email,year,branch,mobile) \t\t\t\t\tvalues(:volname,:email,:year,:branch,:mobile)", $binding, $conn);
                if ($results) {
                    $msgadd = "Volunteer Added...";
                }
            } catch (Exception $e) {
                $msgadd = 'some Server error encountered..';
                //$msg=$e->getMessage();
            }
        }
    }
    if (strcmp($_REQUEST['opt'], "save") == 0) {
        $conn = DB\connect_db($config);
        if ($conn) {
            $binding = array('volname' => $_POST['editname'], 'email' => $_POST['editemail'], 'mob' => $_POST['editmobile'], 'branch' => "IT", 'year' => $_POST['edityear'], 'volid' => $_POST['volidedit']);
            try {
                $results = DB\insert_db("update volunteers set name=:volname,email=:email,year=:year,branch=:branch,mobile=:mob where volid=:volid", $binding, $conn);
                if ($results) {
                    $msgup = "Information Updated ...";
                }
            } catch (Exception $e) {
                $msgup = 'some Server error encountered..';
                //$msg=$e->getMessage();
            }
        }
    }
}
?>
<html>
<head>
	<title>MIS- Home</title>
	<?php 
예제 #2
0
                    }
                } catch (Exception $e) {
                    $msgadd = 'some Server error encountered..';
                    //$msg=$e->getMessage();
                }
            }
        } else {
            $msgadd = "passwords does not match";
        }
    }
    if (strcmp($_REQUEST['opt'], "save") == 0) {
        $conn = DB\connect_db($config);
        if ($conn) {
            $binding = array('name' => $_POST['name'], 'email' => $_POST['email'], 'uname' => $_POST['uname'], 'password' => $_POST['password'], 'role' => $_POST['role1']);
            try {
                $results = DB\insert_db("update system_users set \n\t\t\t\t\t\t\t\t\tname=:name,email=:email,role=:role where username=:uname where password=:password", $binding, $conn);
                if ($results) {
                    $msgup = "User Updated ...";
                }
            } catch (Exception $e) {
                $msgup = 'some Server error encountered..';
                //$msg=$e->getMessage();
            }
        }
    }
}
?>
<html>
<head>
	<title>MIS- Home</title>
	<?php 
예제 #3
0
                if ($results) {
                    $msgadd = "Event Added...";
                }
            } catch (Exception $e) {
                $msgadd = 'some Server error encountered..';
                //$msg=$e->getMessage();
            }
        }
    }
    if (strcmp($_REQUEST['opt'], "save") == 0) {
        //print_r($_POST);
        $conn = DB\connect_db($config);
        if ($conn) {
            $binding = array('name' => $_POST['ename1'], 'edate' => $_POST['eventdate1'], 'efee' => $_POST['efee1'], 'expentries' => $_POST['expentry1'], 'eid' => $_POST['eid1']);
            try {
                $results = DB\insert_db("update events set\n\t\t\t\t\t\t\t\t\tname=:name,edate=:edate,efee=:efee,expentries=:expentries where eid=:eid", $binding, $conn);
                if ($results) {
                    $msgup = "Information Updated ...";
                }
            } catch (Exception $e) {
                $msgup = 'some Server error encountered..';
                //$msg=$e->getMessage();
            }
        }
    }
}
?>
<html>
<head>
	<title>MIS- Home</title>
	<?php 
예제 #4
0
<?php

require_once '../settings/dbfunctions.php';
use Web\DB;
include "../theme/req_function.php";
$msg = "gg";
$pid = "";
if (isset($_REQUEST['act'])) {
    $conn = DB\connect_db($config);
    if ($conn) {
        $pid = 101;
        $binding = array('name' => $_POST['name'], 'email' => $_POST['email'], 'mob' => $_POST['mob'], 'eid' => $_POST['event'], 'amtpaid' => $_POST['amountp'], 'rdate' => $_POST['rdate'], 'clg' => $_POST['colg']);
        try {
            $results = DB\insert_db("insert into participants(name,email,mobileno,eid,apaid,rdate,college) \t\t\t\t\tvalues(:name,:email,:mob,:eid,:amtpaid,:rdate,:clg)", $binding, $conn);
            if ($results) {
                $msg = "Data successfully entered";
            }
        } catch (Exception $e) {
            $msg = 'some Server error encountered..';
            //$msg=$e->getMessage();
        }
    }
}
?>
<html>
<head>
  <title>MIS- Home</title>
  <?php 
include "../theme/req_css.html";
?>