forked from science-ation/science-ation
SQL error fix
This commit is contained in:
parent
a8b0adce05
commit
31baeaa715
3
api.php
3
api.php
@ -26,13 +26,12 @@ include "common.inc.php";
|
||||
require_once("account.inc.php");
|
||||
require_once("user.inc.php");
|
||||
require_once("schedule.inc.php");
|
||||
/*
|
||||
if($_SERVER['HTTPS']!="on") {
|
||||
$ret['status']="error";
|
||||
$ret['error']="SSL is required for API access, please access the API over https";
|
||||
echo json_encode($ret);
|
||||
exit;
|
||||
}*/
|
||||
}
|
||||
$request=explode("/",$_GET['request']);
|
||||
$ret=array();
|
||||
|
||||
|
@ -113,6 +113,9 @@ Link username to email? <input type="radio" name="link_username_to_email" value=
|
||||
<input type="submit" value="Edit Team">
|
||||
</form>
|
||||
|
||||
<h1>User Stuff</h1>
|
||||
<a href="api/user/view/">View the user</a><br/>
|
||||
|
||||
<h1>Event Schedule</h1>
|
||||
<a href="api/schedule/list">Schedule Listing</a><br/>
|
||||
|
||||
|
@ -725,7 +725,7 @@ function user_save(&$u)
|
||||
){
|
||||
mysql_query("DELETE FROM schedule_users_availability_link WHERE users_id = {$u['id']}");
|
||||
if(count($u['available_events']) > 0){
|
||||
$query = "INSERT INTO schedule_users_availability_link (users_id, schedule_id), VALUES (" . $u['id'] . ", ";
|
||||
$query = "INSERT INTO schedule_users_availability_link (users_id, schedule_id) VALUES (" . $u['id'] . ", ";
|
||||
$query .= implode('), (' . $u['id'] . ', ', $u['available_events']);
|
||||
$query .= ")";
|
||||
mysql_query($query);
|
||||
|
Loading…
Reference in New Issue
Block a user