Example #1
0
?>
"><?php 
echo $user_info['school_full'];
?>
</a> <span class="divider">&rsaquo;</span>
				</li>
				<li class="active"><?php 
echo $otheruser['name'];
?>
</li>
			</ul>
			<div style="clear: both"></div>

			<?php 
$param = array('userid' => $user_id);
$result_json = extrabaon_api("GetUserItems", $param);
$items = $result_json['items'];
$numItems = sizeof($items);
?>
			
			<h2><?php 
echo $otheruser['name'];
?>
's Items <small><?php 
echo $numItems;
?>
 items found</small></h2>
			
			
			<!-- ITEMS -->
			<?php 
Example #2
0
<?php

include 'utilities/all.php';
require_once 'utilities/facebook.php';
include 'm_facebook.php';
if (!isGetSet('school_id')) {
    header("Location: i_changeschool.php");
}
$school_id = $_GET['school_id'];
$isLoggedIn;
if (checkLogin($user)) {
    $isLoggedIn = true;
} else {
    header("Location: index.php");
    exit(0);
}
$param = array('fb_id' => $user, 'school_id' => $school_id);
$result = extrabaon_api("EditSchool", $param);
header("Location: i_school.php?school_id={$school_id}");
Example #3
0
<?php

include 'utilities/all.php';
require_once 'utilities/facebook.php';
include 'm_facebook.php';
$isLoggedIn;
if (checkLogin($user)) {
    $isLoggedIn = true;
} else {
    header("Location: index.php");
    exit(0);
}
$fb_id = $user;
if (!isGetSet('item_id')) {
    header("Location: i_myitems.php?result=fail&action=1");
}
$item_id = $_GET['item_id'];
$param = array('fb_id' => $fb_id, 'item_id' => $item_id);
$result = extrabaon_api("ItemSold", $param);
if ($result['success']) {
    header("Location: i_myitems.php?result=success&action=2");
} else {
    header("Location: i_myitems.php?result=fail&action=2");
}
Example #4
0
				<?php 
}
?>
				
				<?php 
include 'mui_seachbar.php';
?>
				
				<?php 
$param = array('school' => $school_info['school_id'], 'category' => $category, 'query' => $query, 'page' => $page, 'num' => $numPerPage);
$result_json = extrabaon_api("Search", $param);
$items = $result_json['items'];
//print_r($items);
$numItems = sizeof($items);
$param = array('school' => $school_info['school_id'], 'category' => $category, 'query' => $query);
$result_json = extrabaon_api("GetNumberOfItems", $param);
$totalItems = $result_json['num'];
?>
				
				<br><h2>Results <small><?php 
echo $totalItems;
?>
 items found</small></h2>
				
				<?php 
if ($numItems == 0 & $query != '') {
    ?>
				<div class="alert alert-error">
					Your search - <b><?php 
    echo $query;
    ?>
Example #5
0
<?php

include 'utilities/all.php';
require_once 'utilities/facebook.php';
include 'm_facebook.php';
if ($user) {
    $user_fbprofile = $facebook->api('/me');
    $param = array('fb_id' => $user, 'name' => $user_fbprofile['name'], 'email' => $user_fbprofile['email']);
    extrabaon_api("CreateUser", $param);
    $param = array('userid' => $user);
    $user_info = extrabaon_api("GetUserDetails", $param);
    setcookie('name', $user_info['name']);
    if ($user_info['school_id'] == 0) {
        header("Location: i_changeschool.php");
        exit(0);
    } else {
        header("Location: index.php");
        exit(0);
    }
} else {
    header("Location: index.php");
    exit(0);
}
Example #6
0
<?php

include 'utilities/all.php';
require_once 'utilities/facebook.php';
include 'm_facebook.php';
$isLoggedIn;
if (checkLogin($user)) {
    $isLoggedIn = true;
} else {
    header("Location: index.php");
    exit(0);
}
$fb_id = $user;
if (!isGetSet('item_id')) {
    header("Location: i_myitems.php?result=fail&action=1");
}
$item_id = $_GET['item_id'];
$param = array('fb_id' => $fb_id, 'item_id' => $item_id);
$result = extrabaon_api("DeleteItem", $param);
if ($result['success']) {
    header("Location: i_myitems.php?result=success&action=1");
} else {
    header("Location: i_myitems.php?result=fail&action=1");
}
Example #7
0
	<?php 
}
?>
</tr>
</table>
<div style="clear: both"></div>
 
<!-- Latest Items -->
<br><i class="icon-calendar r_icon-h3" ></i><h3>Latest Items from <?php 
echo $g_schoolName;
?>
</h3>
<ol>
	<?php 
$param = array('school' => $g_schoolId, 'num' => 10);
$result = extrabaon_api("GetRecentItems", $param);
$items = $result['items'];
?>
	<?php 
foreach ($items as $item) {
    ?>
	<li><a href="i_viewitem.php?item_id=<?php 
    echo $item['item_id'];
    ?>
"><?php 
    echo $item['item_title'];
    ?>
</a> 
	<!-- from <b><?php 
    echo $item['user_name'];
    ?>
Example #8
0
if (checkLogin($user)) {
    $isLoggedIn = true;
} else {
    header("Location: index.php");
    exit(0);
}
$title = $_POST['title'];
$price = $_POST['price'];
$description = $_POST['description'];
$fb_id = $user;
$cat_name = $_POST['category'];
// TODO: Add checking if the file was uploaded
if ($_FILES['filename']['name'] != '') {
    $fname = upload($_FILES['filename'], "images/", $user);
    $file_url = "images/" . $fname;
    $photo = $file_url;
    $thumbnail = $file_url;
    // TEMPORARY
} else {
    $file_url = "images/" . "picture.jpg";
    $photo = $file_url;
    $thumbnail = $file_url;
    // TEMPORARY
}
$param = array('title' => $title, 'price' => $price, 'description' => $description, 'photo' => $photo, 'thumbnail' => $thumbnail, 'fb_id' => $fb_id, 'cat_name' => $cat_name);
$result = extrabaon_api("AddItem", $param);
if ($result['success']) {
    header("Location: i_sell.php?result=success&title=" . urlencode($title));
} else {
    header("Location: i_sell.php?result=fail");
}
Example #9
0
<div id="id_schoolmenu" class="container form-actions" style="display:none; padding-bottom: 0px; margin-bottom: 0px;">
	<?php 
$schools_json = extrabaon_api("GetSchools", null);
$schools = $schools_json['schools'];
$count = 0;
?>
	
	<div class="row">
	<?php 
foreach ($schools as $school) {
    ?>
		<div class="span3"><a href="i_school.php?school_id=<?php 
    echo $school['school_id'];
    ?>
">
			<?php 
    echo $school['school_full'];
    ?>
</a></div>
		<?php 
    $count++;
    if ($count % 4 == 0) {
        echo '</div><div class="row">';
    }
}
?>
	</div>

	<div style="clear:both"></div>
	<p style="float: right"><a href="index.php">View all&raquo;</a></p>
Example #10
0
<form class="form-horizontal" action="x_sell.php" method="post" enctype="multipart/form-data">
        <fieldset>
          <div class="control-group">
            <label class="control-label" for="item_title">Title*</label>
            <div class="controls">
              <input type="text" class="input-xlarge" id="item_title" name="title">
            </div>
          </div>
          <div class="control-group">
            <label class="control-label" for="item_category">Category*</label>
            <div class="controls">
              <select id="item_category" name="category">
                <?php 
$result = extrabaon_api("GetCategories", null);
$categories = $result['categories'];
foreach ($categories as $category) {
    echo '<option>' . $category['cat_name'] . '</option>';
}
?>
              </select>
            </div>
          </div>
          <div class="control-group">
            <label class="control-label" for="item_price">Price* (PHP)</label>
            <div class="controls">
              <input type="text" class="input-xlarge" id="item_price" name="price">
            </div>
          </div>
          <div class="control-group">
            <label class="control-label" for="filename">Photo</label>
            <div class="controls">
Example #11
0
    header("Location: index.php");
}
$item_id = $_GET['item_id'];
$isLoggedIn;
if (checkLogin($user)) {
    $isLoggedIn = true;
} else {
    $isLoggedIn = false;
}
$param = array('item_id' => $item_id);
$item = extrabaon_api("GetItem", $param);
$add_date = strtotime($item['item_date']);
$add_date = date("F d, Y", $add_date);
$item_description = $item['item_description'];
$param = array('school_id' => $item['school_id']);
$school_info = extrabaon_api("GetSchoolDetails", $param);
//$reg_date = strtotime($user_info['']);
//$reg_date = date("F d, Y", $reg_date);
@(include 'm_htmldoctype.php');
?>
<html>
<head>


<?php 
@(include 'm_htmlhead-init.php');
?>

<title></title>
<meta property="fb:app_id" content="" />
<meta property="og:type" content="" />