-
-
Notifications
You must be signed in to change notification settings - Fork 294
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #653 from causefx/develop
Fixed #186 - Added CouchPotato to Homepage Fixed #316 - Added Weather ticker to Org User menu Fixed #366 - Fixed Calendar Save on Edge Fixed #373 #594 - Fixed LDAP Binding with new option Fixed #441 - Added Open in New Window for Mobile Fixed #490 - Added Media Popups for all media Fixed #567 - Added Email section to email users Fixed #569 #620 - Added Emby URL to links Fixed #618 - Media Popups respect language now Fixed #644 - Added JSON to check Fixed #646 - Settings margins fixed Added Ping for each tab Added Splash screen Added LayerCake Theme Selection Added SpeedTest History Added Built-In Chat Added New Settings Page Added New Top Bar Menu Added Mass Email Added CouchPotato to Homepage Added Weather Ticker Fixed LDAP And More...
- Loading branch information
Showing
818 changed files
with
17,032 additions
and
994 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,59 @@ | ||
<?php | ||
// Include functions | ||
require_once('functions.php'); | ||
// Lazyload settings | ||
$databaseConfig = configLazy('config/config.php'); | ||
require_once('user.php'); | ||
$USER = new User('registration_callback'); | ||
// Get Action | ||
if (isset($_POST['a'])) { $action = $_POST['a']; } | ||
if (isset($_POST['k'])) { $key = $_POST['k']; } | ||
if (isset($_POST['v'])) { $values = $_POST['v']; } | ||
if (isset($_GET['a'])) { $action = $_GET['a']; } | ||
if (isset($_GET['k'])) { $key = $_GET['k']; } | ||
if (isset($_GET['v'])) { $values = explode('|',$_GET['v']); } | ||
unset($_POST['a']); | ||
unset($_POST['k']); | ||
//Set Default Result | ||
$result = "An error has occurred"; | ||
unset($_POST['v']); | ||
|
||
//Check Key | ||
if (!isset($key)) { | ||
exit(json_encode("No API Key set")); | ||
$result['error'] = "No API Key Set"; | ||
exit(json_encode($result)); | ||
}elseif (strtolower(ORGANIZRAPI) != strtolower($key)) { | ||
exit(json_encode("API Key mismatch")); | ||
$result['error'] = "API Key mismatch"; | ||
exit(json_encode($result)); | ||
} | ||
//Start API Call | ||
if (isset($action)) { | ||
switch ($action) { | ||
case "1": | ||
$result = "test"; | ||
case "invite-user": | ||
if($values){ | ||
if(count($values) == 2){ | ||
$user = null; | ||
$email = $values[0]; | ||
$server = $values[1]; | ||
}else{ | ||
$user = $values[0]; | ||
$email = $values[1]; | ||
$server = $values[2]; | ||
} | ||
$USER->invite_user("chris", "[email protected]", "plex"); | ||
$result['data'] = "User has been invited"; | ||
//$result['data'] = "user = $user | email = $email | server = $server"; | ||
}else{ | ||
$result['error'] = "No Values Were Set For Function"; | ||
} | ||
break; | ||
case "2": | ||
$result = "other test"; | ||
break; | ||
default: | ||
$result = "$action not defined"; | ||
$result = "$action Not Defined As API Function"; | ||
} | ||
}else{ | ||
$result['error'] = "No API Action Set"; | ||
} | ||
//Set Default Result | ||
if(!$result){ | ||
$result['error'] = "An error has occurred"; | ||
} | ||
//return JSON array | ||
exit(json_encode($result)); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.