示例#1
0
require_once '../core/init.php';
$user = new user();
if ($user->hasPermission('logged in')) {
    redirect::to('index.php');
}
if (input::exists()) {
    if (token::check(input::get('token'))) {
        //make sure $_POST has all the required fields filled out
        $validate = new validate();
        $validation = $validate->check($_POST, array('email' => array('required' => true), 'password' => array('required' => true)));
        if ($validate->passed()) {
            $user = new user();
            //check if the login session should be stored
            $remember = input::get('remember') == 'on';
            //login
            $login = $user->login(input::get('email'), input::get('password'), $remember);
            if ($login) {
                //TODO: make sure user has permission to log in (activated and not banned)
                if ($user->data()->status == 'u') {
                    $user->logout();
                } else {
                    if ($user->data()->status == 'b') {
                        $user->logout();
                    } else {
                        // success
                    }
                }
            }
        }
    }
}
示例#2
0
			<div class="col-xs-12 col-lg-8 col-lg-offset-2">
				<div id="dataSaved" class="alert alert-success" role="alert">Event was successfully updated</div>
				<div id="dataNOTSaved" class="alert alert-danger" role="alert">Event could not be updated</div>
				<div id="eventdeleted" class="alert alert-success" role="alert">Event was successfully deleted</div>
				<div id="eventNotdeleted" class="alert alert-danger" role="alert">Event could not be deleted</div>

				<h3 class="col-xs-12"><span style="color:#00A7E1">Postpone event</span></h3>
              	<p>Please enter new operation date and time below and click Postpone Event.</p>
				<table class="table table-hover" id="mytable">
				<thead>
					<!-- <tr><td>Field</td><td>Input</td></tr> -->
				</thead>
				<tbody >
											
					<tr ><td >Organiser</td><td id="organiser" ><?php 
echo $user->data()->Full_Name;
?>
</td></tr>
					<tr class="hidden" ><td >Username</td><td id="username" ><?php 
echo $user->data()->Username;
?>
</td></tr>
					<tr><td>Hosipital</td><td id="hospital"></td></tr>
					<tr><td>Doctor</td><td id="doctor"></td></tr>
					<tr><td>New Operation Date</td><td><input id="operationdate" class="myInputs date-picker" readonly></td></tr>
					<tr><td>New Operation Time</td><td ><input id="operationtime" class="myInputs input-small" readonly></td></tr>
					
				</tbody>
			</table>
			</div>
示例#3
0
<?php

require_once '/opt/lampp/htdocs/MySpace/src/init.php';
$user = new user();
if ($user->isLoggedIn()) {
    if ($user->ShowPosts($user->data()->UserID)) {
        print_r($user->posts());
        foreach ($user->posts() as $post) {
            echo $post->Text . '<br>';
            if ($user->ShowComments($post->PostID)) {
                foreach ($user->comments() as $comment) {
                    echo '<br>';
                    //echo '<br>';
                    if ($comment[0] == $post->PostID) {
                        //print_r($comment);
                        echo '<br>' . $comment[1]->Text . '<br>';
                    }
                }
            }
        }
    }
}
?>


	
示例#4
0
				<div id="dataSaved" class="alert alert-success" role="alert">Event was successfully updated</div>
				<div id="dataNOTSaved" class="alert alert-danger" role="alert">Event could not be updated</div>
				<div id="eventdeleted" class="alert alert-success" role="alert">Event was successfully deleted</div>
				<div id="eventNotdeleted" class="alert alert-danger" role="alert">Event could not be deleted</div>

				<h3 class="col-xs-12"><span style="color:#00A7E1">Edit event</span></h3>
              	<p>Please complete event details below and click Update.</p>
				<table class="table table-hover" id="mytable">
				<thead>
					<!-- <tr><td>Field</td><td>Input</td></tr> -->
				</thead>
				<tbody >
								
					
					<tr ><td >Organiser</td><td id="organiser" ><?php 
echo $user->data()->Full_Name;
?>
</td></tr>
					<tr class="hidden" ><td >Username</td><td id="username" ><?php 
echo $user->data()->Username;
?>
</td></tr>

					<?php 
// //this section of code creates the doctor dropdown HTML
// $doctordropdown = "";
// $doctordropdown .="<select class=\"selectpicker\" id=\"doctor\">";
// if($dbh = $_db->get('Doctors', array())){
// 	if($dbh->counts() > 0){
// 		foreach($dbh->results() as $key){
// 			$doctordropdown .= "<option>{$key->Name}</option>";
示例#5
0
function user_list($vars = null)
{
    $maxperpage = isset($vars['row']) ? (int) $vars['row'] : "100";
    $cache_time = isset($vars['time']) ? (int) $vars['time'] : "-1";
    $where_sql = "WHERE `status`='1'";
    isset($vars['userid']) && ($where_sql .= " AND `uid`='{$vars['userid']}'");
    isset($vars['gid']) && ($where_sql .= " AND `gid` ='{$vars['gid']}'");
    isset($vars['type']) && ($where_sql .= " AND `type` ='{$vars['type']}'");
    if (isset($vars['pid']) && !isset($vars['pids'])) {
        $where_sql .= iPHP::where($vars['pid'], 'pid');
    }
    if (isset($vars['pids']) && !isset($vars['pid'])) {
        iPHP::import(iPHP_APP_CORE . '/iMAP.class.php');
        map::init('prop', iCMS_APP_USER);
        //$where_sql.= map::exists($vars['pid'],'`#iCMS@__user`.uid'); //map 表大的用exists
        $map_where = map::where($vars['pids']);
    }
    $by = $vars['by'] == "ASC" ? "ASC" : "DESC";
    switch ($vars['orderby']) {
        case "id":
            $order_sql = " ORDER BY `uid` {$by}";
            break;
        case "article":
            $order_sql = " ORDER BY `article` {$by}";
            break;
        case "comments":
            $order_sql = " ORDER BY `comments` {$by}";
            break;
        case "follow":
            $order_sql = " ORDER BY `follow` {$by}";
            break;
        case "fans":
            $order_sql = " ORDER BY `fans` {$by}";
            break;
        case "hits":
            $order_sql = " ORDER BY `hits` {$by}";
            break;
        default:
            $order_sql = " ORDER BY `uid` {$by}";
    }
    if ($map_where) {
        $map_sql = iCMS::map_sql($map_where);
        $where_sql = ",({$map_sql}) map {$where_sql} AND `uid` = map.`iid`";
    }
    $offset = 0;
    $limit = "LIMIT {$maxperpage}";
    if ($vars['page']) {
        $total = iPHP::total('sql.md5', "SELECT count(*) FROM `#iCMS@__user` {$where_sql} ");
        $multi = iCMS::page(array('total' => $total, 'perpage' => $maxperpage, 'unit' => iPHP::lang('iCMS:page:sql'), 'nowindex' => $GLOBALS['page']));
        $offset = $multi->offset;
        $limit = "LIMIT {$offset},{$maxperpage}";
        iPHP::assign("user_list_total", $total);
    }
    $hash = md5($where_sql . $order_sql . $limit);
    if ($map_sql || $offset) {
        if ($vars['cache']) {
            $map_cache_name = iPHP_DEVICE . '/user_map/' . $hash;
            $ids_array = iCache::get($map_cache_name);
        }
        if (empty($ids_array)) {
            $ids_array = iDB::all("SELECT `id` FROM `#iCMS@__user` {$where_sql} {$order_sql} {$limit}");
            iPHP_SQL_DEBUG && iDB::debug(1);
            $vars['cache'] && iCache::set($map_cache_name, $ids_array, $cache_time);
        }
        //iDB::debug(1);
        $ids = iCMS::get_ids($ids_array, 'uid');
        $ids = $ids ? $ids : '0';
        $where_sql = "WHERE `uid` IN({$ids})";
    }
    if ($vars['cache']) {
        $cache_name = iPHP_DEVICE . '/user_list/' . $hash;
        $resource = iCache::get($cache_name);
    }
    if (empty($resource)) {
        $resource = iDB::all("SELECT * FROM `#iCMS@__user` {$where_sql} {$order_sql} {$limit}");
        iPHP_SQL_DEBUG && iDB::debug(1);
        if ($resource) {
            foreach ($resource as $key => $value) {
                $value['url'] = user::router($value['uid'], "url");
                $value['urls'] = user::router($value['uid'], "urls");
                $value['avatar'] = user::router($value['uid'], "avatar", $vars['size'] ? $vars['size'] : 0);
                $value['at'] = '<a href="' . $value['url'] . '" class="iCMS_user_link" target="_blank" data-tip="iCMS:ucard:' . $value['uid'] . '">@' . $value['nickname'] . '</a>';
                $value['link'] = '<a href="' . $value['url'] . '" class="iCMS_user_link" target="_blank" data-tip="iCMS:ucard:' . $value['uid'] . '">' . $value['nickname'] . '</a>';
                $value['gender'] = $value['gender'] ? 'male' : 'female';
                isset($vars['data']) && ($value['data'] = (array) user::data($value['uid']));
                $resource[$key] = $value;
            }
        }
        $vars['cache'] && iCache::set($cache_name, $resource, $cache_time);
    }
    return $resource;
}
示例#6
0
文件: user.app.php 项目: sunhk25/iCMS
 public function do_profile()
 {
     $pgArray = array('base', 'avatar', 'setpassword', 'bind', 'custom');
     $pg = iS::escapeStr($_GET['pg']);
     $pg or $pg = 'base';
     if (in_array($pg, $pgArray)) {
         $this->user();
         iPHP::assign('pg', $pg);
         if ($pg == 'bind') {
             $platform = user::openid(user::$userid);
             iPHP::assign('platform', $platform);
         }
         if ($pg == 'base') {
             iPHP::assign('userdata', (array) user::data(user::$userid));
         }
         iPHP::view("iCMS://user/profile.htm");
     }
 }
<?php

require_once '/opt/lampp/htdocs/MySpace/src/init.php';
$user = new user();
if (!$user->isLoggedIn()) {
    redirect::to('index.php');
}
if (input::exists()) {
    if (token::check(input::get('token'))) {
        $validate = new validation();
        $validation = $validate->check($_POST, array('Password' => array('required' => true, 'min' => 8), 'Npassword' => array('required' => true, 'min' => 8), 'Rpassword' => array('required' => true, 'min' => 8, 'matches' => 'Npassword')));
        if ($validation->passed()) {
            if (hash::make(input::get('Password')) !== $user->data()->Password) {
                echo 'your old password did not match';
            } else {
                if ($user->update(array('Password' => hash::make(input::get('Npassword'))))) {
                    session::flash('home', 'Your password have been updated!!');
                    redirect::to('index.php');
                }
            }
        }
    }
}
?>
<link href="<?php 
echo 'register.css';
?>
" rel='stylesheet' type='text/css'>
<form action="" method="post">
  <div class="field">
  <label id="icon" for="Password"><i class="icon-shield"></i></label>
示例#8
0
 public static function Clear()
 {
     $user = new user();
     return DB::GetInstance()->Query("DELETE FROM logs WHERE scheduledposts = (SELECT id FROM scheduledposts WHERE userid = ?)", array($user->data()->id));
 }
示例#9
0
<?php

require_once 'core/init.php';
$user2 = new user();
if (!$user2->isLoggedIn()) {
    Redirect::to('index.php');
}
switch ($user2->data()->user_type_id) {
    case 1:
        Redirect::to('userProfile.php');
        break;
    case 2:
        Redirect::to('admin.php');
        break;
    case 3:
        Redirect::to('teamLeaderProfile.php');
        break;
    case 4:
        Redirect::to('admin.php');
        break;
}
示例#10
0
<html>
<!DOCTYPE html>
<html lang="en">
<head>
	<title>Orchestrate</title>
	<?php 
require_once 'headinfo.php';
?>
   

</head> 
		
<body>
	<?php 
require_once 'slideMenu.php';
$myid = $user->data()->Id;
$myname = $user->data()->Full_Name;
$eventid = $_GET['id'];
?>
	

	<div class="container">

	<?php 
if (!isset($_GET['id'])) {
    ?>

		<div class="row" id="main1">
			<div class="col-xs-12 col-lg-10">
				<div id="dataSaved" class="alert alert-success" role="alert">Event was successfully saved</div>
				<div id="dataNOTSaved" class="alert alert-danger" role="alert">Event was not saved</div>
示例#11
0
<?php

require_once 'core/init.php';
include 'includes/header.php';
?>
<div class="box4">
			<div class="container">
				<div class="row">
					<h1>
						Hello <?php 
$user = new user();
if ($user->isLoggedIn()) {
    echo $user->data()->name;
}
?>
					</h1>
					<div class="grid_12">
						<p class="txt1">No better car service anywhere</p>
						<a href="Services.php" class="more_btn btn1">Request an appointment</a>
						<i class="icon-calendar icon1"></i>
					</div>

				</div>
			</div>
		</div>
		
<?php 
include 'includes/footer.php';
示例#12
0

<div class="box3">
	<div class="container">
   
<?php 
$resu = DB::getInstance()->get('reservation_details', array('reservation_id', '=', session::get('re_id')));
if ($resu->count()) {
    foreach ($resu->results() as $row) {
        $service_id = $row->service_id;
    }
}
?>
 
		Welcome, <?php 
echo $user2->data()->name, ' "';
?>
 
		<?php 
echo $user2->data()->username, '"</br>', 'Reschedualing Done successfully ^^ </br>';
?>
		<?php 
$id = session::get('re_id');
echo "reservation id = ", $id, '<br>';
$user_id = session::get('user_id');
echo "user id = ", $user_id, '<br>';
$date = session::get('datei');
$date--;
$start = session::get('start');
$status = session::get('status');
echo "status : ", $status, '<br>';
示例#13
0
        foreach ($message->results() as $message) {
            echo " <div class='well'>";
            //echo"<p>Created by :<a href='profile.php?user="******"'".$message->usera."";
            echo "<p>Created by:  <a href='profile.php?user="******"'>" . $message->sender . "</a> and sent to <a href='profile.php?user="******"'>" . $message->reciever . "</a></p>";
            echo "<p>Message: " . $message->message . "</p>";
            echo "</br><p>Sent on: " . $message->added . "</p>";
            echo "</div>";
        }
    }
    if (Input::exists()) {
        $validate = new Validate();
        $validation = $validate->check($_POST, array('message' => array('required' => true, 'min' => 2, 'max' => 500)));
        if ($validation->passed()) {
            $user = new user();
            try {
                $user->message(array('sender' => $user->data()->username, 'reciever' => $data->username, 'message' => Input::get('message')));
                Redirect::to('viewmessage.php?user='******'#form');
            } catch (Exception $e) {
                die($e->getMessage());
            }
        } else {
            foreach ($validation->errors() as $error) {
                echo $error, '<br>';
            }
        }
    }
    ?>

  </div>
    </div>
    <a href="#top">Back to top</a>
示例#14
0
            continue;
        }
        ?>
						<option name='type' id='type' value='<?php 
        echo $type->name;
        ?>
'><?php 
        echo $type->name;
        ?>
</option>
					   <?php 
    }
}
?>
					   <?php 
if ($user->data()->user_type_id == 4) {
    ?>
<option name='type' id='type' value='admin'>admin</option>
					   <?php 
}
?>
					</select>

        
          <input type="hidden" name="token" value="<?php 
echo token::generate();
?>
">
							</label>
								<div class="btns">
									         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
示例#15
0
 * }
 */
if (session::exists('home')) {
    echo '<p>' . session::flash('home') . '</p>';
}
$user = new user();
if ($user->isLoggedIn()) {
    ?>
<link href="<?php 
    echo 'style.css';
    ?>
" rel='stylesheet' type='text/css'>
<p>
	Hello <a
		href="profile.php?User=<?php 
    echo escape($user->data()->UserID);
    ?>
"><?php 
    echo escape($user->data()->FirstName);
    ?>
</a>!
</p>
<ul>
	<li><a href="update.php">Update</a></li>
	<li><a href="logout.php">Logout</a></li>
	<li><a href="changepassword.php">Settings</a></li>
	<li><a href="friends.php">Friends directory</a></li>
	<!-- <li><a href="login2.php">Pending Requests</a> -->
</ul>
<form name="form" method="post" action="">
	<input type="text" name="FirstName" placeholder="Search">
示例#16
0
 public function options()
 {
     if ($this->exists()) {
         $userId = $this->data()->id;
         if ($result = DB::getInstance()->QueryGet("SELECT * FROM user_options WHERE userid = {$userId}")) {
             return $result->first();
         }
     } else {
         $user = new user();
         if ($user->isLoggedIn()) {
             $userId = $user->data()->id;
             if ($result = DB::getInstance()->QueryGet("SELECT * FROM user_options WHERE userid = {$userId}")) {
                 return $result->first();
             }
         }
     }
     return null;
 }
示例#17
0
<!DOCTYPE html>
<html lang="en">
	<head>
		<title>Vectrack</title>


		
	</head>
	<?php 
require_once 'add_headinfo.php';
?>



	<?php 
$myid = $user->data()->Company_Id;
// Get username of user so that only users RTU's can be dispalyed
?>
 
	<body>
		<!-- <pre>
			//<?php 
print_r($_POST);
?>
		</pre> -->

		<?php 
require_once 'add_navbar.php';
?>

		
示例#18
0
<?php

require_once '../Core/init.php';
$user = new user(null, $_log);
if (!$user->isLoggedIn()) {
    redirect::to('index.php');
}
if (!$user->hasPermission("Admin")) {
    redirect::to('index.php');
}
$files = scandir('../Log');
$_log->info('Trying to delete log');
for ($i = 2; $i < sizeof($files); $i++) {
    if ($i == sizeof($files) - 1) {
        if (file_put_contents("../Log/" . $files[$i], "") !== false) {
            $_log->info('Log file deleted by user: '******'Log file NOT deleted by user: '******'Log file NOT deleted by user: ' . $user->data()->Username);
            echo "File not deleted";
        }
    }
}
示例#19
0
    function showDrawControl(){
    	
    	if(controlExist)
    	drawControl.removeFrom(map);
		
		map.addControl(drawControl);
		controlExist = true;
    }

	</script>

	<?php 
//populate table with RTUs
//var_dump($user->data()->Company_Id);
if ($dbh = $_db->get('Units', array('Company_Id', '=', $user->data()->Company_Id))) {
    if ($dbh->counts() > 0) {
        foreach ($dbh->results() as $key) {
            echo "<script type='text/javascript'> populateRTUTable({$key->Unit_Id},'{$key->Unit_Description}'); </script>";
        }
        echo "<script type='text/javascript'> setRTUtable(); </script>";
    } else {
        echo "Nothing found in DB";
    }
} else {
    echo "Could not read from DB";
}
?>
</body>	
	
</html>
示例#20
0
					<?php 
if (isset($dbh)) {
    ?>
							<div class="alert alert-success" role="alert">SUCCESSFULLY UPDATED DB</div>
					<?php 
}
?>

					<h4> Step 1 : Please update your user profile below and click save. </h4><br/><br/>
					<table class="table table-hover"> 
						<tr><th>Field</th><th>Data</th></tr>
						<form action="" method="post" role="form">						
							<?php 
//echo $user->data()->Username;
echo "<tr><td>Username</td><td><input type=\"text\" name=\"Username\" value=\"{$user->data()->Username}\"></td></tr>";
echo "<tr><td>Cell Number</td><td><input type=\"text\" name=\"Cellno\" value=\"{$user->data()->User_Cellphone}\"></td></tr>";
?>
					</table>
					
							<h4>Step 2 : Click save to save your configuration changes.</h4>
							<input type="hidden" name="didsave" value="1" />
							<input type="hidden" name="lineid" value="<?php 
echo $user->data()->Id;
?>
"/>
							<input type="submit" value="Save" />
						</form>
					<div><a href="home.php"><br/>Return to Home Page</a></div>
				</div>
			</div>
示例#21
0
 public function FbAuth($app_id = null, $app_secret = null, $redirect = null, $oldApi = null)
 {
     if ($app_id == null || $app_secret == null || $redirect == null) {
         throw new Exception("Required parameters not supplied!");
     } else {
         $user = new user();
         // Get admin access token
         $adminAccessToken = $this->_db->QueryGet("SELECT admin_access_token FROM fbapps  WHERE appid = ? ", array($app_id))->first()->admin_access_token;
         // Get app access token
         $accessToken = $this->FbAppAuth($app_id, $app_secret, $redirect, $oldApi);
         // Check if the access token is valid
         if ($this->IsATValid($adminAccessToken)) {
             $fb_account = new FbAccount();
             if ($fb_account->UserDefaultFbAccount()) {
                 // Store user app info
                 if ($this->GetAccessToken($app_id)) {
                     $this->UpdateAccessToken($user->data()->id, $app_id, $fb_account->UserDefaultFbAccount(), $accessToken);
                 } else {
                     $this->SaveAccessToken($user->data()->id, $app_id, $fb_account->UserDefaultFbAccount(), $accessToken);
                 }
             } else {
                 throw new Exception(lang('NO_FB_ACCOUNT_SELECTED'));
             }
             // Check if the user is an admin of the facebook app otherwise add him ass a tester
             if ($this->FbAppUserHasRole($this->FbUserIdFromAt($accessToken), $app_id, $app_secret) != "administrators") {
                 if (!$this->Invite($app_id, $this->FbUserIdFromAt($accessToken), $adminAccessToken)) {
                     throw new Exception("Unable to add your facebook account as a tester.");
                 } else {
                     echo "<div class='alerts alert alert-info'>\r\n\t\t\t\t\t\t<p class='alerttext'>You will recive a developer requests, before you can post you must confirm the request.</p>\r\n\t\t\t\t\t\t<a href='https://developers.facebook.com/requests/' target='_blank'>https://developers.facebook.com/requests/.</a>\r\n\t\t\t\t\t\t</div>";
                 }
             }
         } else {
             if ($user->HasPermission("admin")) {
                 // Check if the user is an admin of the facebook app
                 if ($this->FbAppUserHasRole($this->FbUserIdFromAt($accessToken), $app_id, $app_secret) === "administrators") {
                     $fb_account = new FbAccount();
                     if ($fb_account->UserDefaultFbAccount()) {
                         // Store user app info
                         if ($this->GetAccessToken($app_id)) {
                             $this->UpdateAccessToken($user->data()->id, $app_id, $fb_account->UserDefaultFbAccount(), $accessToken);
                         } else {
                             $this->SaveAccessToken($user->data()->id, $app_id, $fb_account->UserDefaultFbAccount(), $accessToken);
                         }
                     } else {
                         throw new Exception(lang('NO_FB_ACCOUNT_SELECTED'));
                     }
                     // Store the app admin access token
                     $this->_db->Update("fbapps", "appid", $app_id, array("admin_access_token" => $accessToken));
                 } else {
                     throw new Exception("The admin must authorized this application first!");
                 }
             } else {
                 throw new Exception("The admin must authorized this application first!");
             }
         }
     }
     // End params check
 }
	<!--========================================================
														HEADER 
	=========================================================-->
	<?php 
include 'includes/header.php';
?>


<div class="box3">
	<div class="container">
   
<?php 
?>
* id : <?php 
echo $user3->data()->id, '<br>';
?>
 * name : <?php 
echo $user3->data()->name, '<br>';
?>
 * username : <?php 
echo $user3->data()->username, '<br>';
?>
 * mobile : <?php 
echo $user3->data()->Mobile, '<br>';
?>
 * email : <?php 
echo $user3->data()->email, '<br>';
?>
 * joined : <?php 
echo $user3->data()->joined, '<br>';
示例#23
0
<html>
<!DOCTYPE html>
<html lang="en">
<head>
	<title>Orchestrate</title>
	<?php 
require_once 'headinfo.php';
?>
   

</head> 
		
<body>
	<?php 
require_once 'slideMenu.php';
$myid = $user->data()->Id;
?>


	<div class="container">

	<?php 
if (!isset($_GET['id'])) {
    ?>

		<div class="row" id="main1">
			<div class="col-xs-12 col-lg-10">
				<div id="dataSaved" class="alert alert-success" role="alert">Event was successfully saved</div>
				<div id="dataNOTSaved" class="alert alert-danger" role="alert">Event was not saved</div>
				<h3 class="col-xs-12"><span style="color:#00A7E1">Usages Update</span></h3>
              	<p>Please select event to update.</p>
示例#24
0
                echo $error, '<br>';
            }
        }
    }
}
?>
<!DOCTYPE Funspecified PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<link href="<?php 
echo 'register.css';
?>
" rel='stylesheet' type='text/css'>
<form action="" method="post">
	<div class="field">
		<label for="FirstName">First Name</label>
		<input type="text" name="FirstName" value="<?php 
echo escape($user->data()->FirstName);
?>
">
		 
		<label for="LastName">Last Name</label>
		<input type="text" name="LastName" value="<?php 
echo escape($user->data()->LastName);
?>
">
		
		<label for="Hometown">Home Town</label>
		<input type="text" name="Hometown" value="<?php 
echo escape($user->data()->Hometown);
?>
">
		 
示例#25
0
}
$id_make;
$car_make = DB::getInstance()->get('car_make', array('make', '=', input::get('make')));
if ($car_make->count()) {
    foreach ($car_make->results() as $one) {
        $id_make = $one->id;
    }
}
$id_model;
$cars_model = DB::getInstance()->get('car_model', array('model', '=', input::get('modelSelect')));
if ($cars_model->count()) {
    foreach ($cars_model->results() as $model) {
        $id_model = $model->id;
    }
}
$user_id = $user->data()->id;
$res = DB::getInstance()->get('reservation', array());
$explode = explode('|', $slots_booked);
foreach ($explode as $slot) {
    if ($slot) {
        $condition;
        $reservations = DB::getInstance()->get('reservation', array('user_id', '=', $user_id));
        if ($reservations->count()) {
            foreach ($reservations->results() as $reservation_cond) {
                $condition = $reservation_cond->status;
            }
        }
        if ($reservations->count() && $condition == 'waiting') {
            foreach ($reservations->results() as $reservation) {
                DB::getInstance()->insert('reservation_history', array('user_id' => $user_id, 'date' => $reservation->date, 'start' => $reservation->start, 'status' => 'Updated', 'car_make_id' => $reservation->car_make_id, 'car_model_id' => $reservation->car_model_id, 'pay_method' => $reservation->pay_method));
                $res_u_id = $reservation->id;
示例#26
0
<?php

require_once '../core/init.php';
req::once('functions/rand_pass.php');
$user = new user();
if ($user->notHasPermission('logged in')) {
    redirect::to('index.php');
}
if (input::exists()) {
    $validate = new validate();
    $validate->check($_POST, array('name' => array('required' => true, 'max' => 256), 'amount' => array('required' => true)));
    if ($validate->passed()) {
        try {
            $db = db::getInstance();
            $item_id = $db->insert('items', array('name' => input::get('name'), 'amount' => input::get('amount'), 'added-by' => $user->data()->id));
            $list_data = $db->get('lists', input::get('list_id'));
            if (!empty($data)) {
                $data = $data->firstResult();
            } else {
                die;
            }
            $new_items = $list_data->items . ',' . $item_id;
            $db->update('lists', $list_data->id, array('items' => $new_items));
        } catch (Exception $e) {
            die($e->getMessage());
        }
    }
}
示例#27
0
 ?>
                 <li>
                     <a href="about.php">ABOUT</a>
                 </li>
                 <li>
                     <a href="contact.php">CONTACT</a>
                 </li>
             </ul>
         <!--                button logout-->
             <ul class="nav navbar-nav navbar-right">
                 <li><a href="logout.php"><span class="glyphicon glyphicon-log-out"></span>  LOGOUT</a></li>
             </ul>
             <!--                -->
         <?php 
 $user = new user();
 $user_id = $user->data()->id;
 $userNotificationDet = DB::getInstance();
 $userNotificationDet->query('SELECT * FROM notification n, user_notification un WHERE un.uID = ? and n.nID = un.nID ORDER BY n.nID DESC', array($user_id));
 $count1 = $userNotificationDet->count();
 $resultSet1 = $userNotificationDet->results();
 $userRepeatExamNotifDet = DB::getInstance();
 $userRepeatExamNotifDet->query('SELECT * FROM repeatExam_notification WHERE uID = ?', array($user_id));
 $count2 = $userRepeatExamNotifDet->count();
 $resultSet2 = $userRepeatExamNotifDet->results();
 $count = $count1 + $count2;
 ?>
             <ul class="nav navbar-nav navbar-right" title="Notifications">
                 <div class="col-sm-2">
                     <li>
                         <a id="dLabel" role="button" data-toggle="dropdown" data-target="#" href="/page.html">
                             <?php 
<?php

require_once '../Core/init.php';
$user = new user(null, $_log);
$_db = db::getInstance();
if (input::existsVal('userID')) {
    $userid = input::get('userID');
} else {
    $userid = $user->data()->Id;
}
if (input::existsVal('active')) {
    $active = input::get('active');
}
if (!$user->isLoggedIn()) {
    redirect::to('../index.php');
}
$events = array();
$singleEvent = array();
$hospitalname = '';
$doctorname = '';
$equipemtrequired = '';
$organiser = '';
$date = '';
$driver = '';
$dbh = null;
if ($active == 1) {
    if ($dbh = $_db->get('Event_Req', array('Organiser', '=', $userid, 'Operation_Date', '>=', $_GET["start"], 'Operation_Date', '<=', $_GET["end"], 'Status', '=', 'delivered'))) {
        if ($dbh->counts() > 0) {
            $i = 0;
            foreach ($dbh->results() as $key) {
                $delivered = 0;
示例#29
0
<html>
<!DOCTYPE html>
<html lang="en">
<head>
	<title>Orchestrate</title>
	<?php 
require_once 'headinfo.php';
?>
   

</head> 
		
<body>
	<?php 
require_once 'slideMenu.php';
$myid = $user->data()->Id;
?>


	<div class="container">

	<?php 
if (!isset($_GET['id'])) {
    ?>

		<div class="row" id="main1">
			<div class="col-xs-12 col-lg-10">
				<div id="dataSaved" class="alert alert-success" role="alert">Event was successfully saved</div>
				<div id="dataNOTSaved" class="alert alert-danger" role="alert">Event was not saved</div>
				<h3 class="col-xs-12"><span style="color:#00A7E1">Collection Update</span></h3>
              	<p>Please select event to update.</p>
示例#30
0
if (session::exists('home')) {
    echo '<p>' . session::flash('home') . '</p>';
}
$user = new user();
if ($user->isLoggedIn()) {
    redirect::to('index.php');
} else {
    if (input::exists()) {
        if (token::check(input::get('token'))) {
            $validate = new validation();
            $validation = $validate->check($_POST, array('UserID' => array('required' => true), 'emailAddr' => array('required' => true)));
            if ($validation->passed()) {
                $user = new user();
                $id = $user->find(input::get('UserID'));
                $newobj = new user($id);
                if ($newobj->find(input::get('UserID')) && $newobj->data()->EmailAddress) {
                    ?>
<form action="" method="post">
	<div class="field">
		<label id="icon" for="Password"><i class="icon-user"></i></label> <input
			type="password" name="NPassword" id="UserID"
			placeholder="New Password" autocomplete="off" required /> <label
			id="icon" for="password"><i class="icon-shield"></i></label> <input
			type="password" name="RPassword" id="Password" placeholder="Re-enter"
			autocomplete="off" required />
<?php 
                    $validate = new validation();
                    $validation = $validate->check($_POST, array('Npassword' => array('required' => true, 'min' => 8), 'Rpassword' => array('required' => true, 'min' => 8, 'matches' => 'Npassword')));
                    if ($validation->passed()) {
                        if (hash::make(input::get('NPassword')) !== $user->data()->Password) {
                            echo 'your passwords does not match';